diff --git a/.changelog.yml b/.changelog.yml index 942138327..657dfa1c0 100644 --- a/.changelog.yml +++ b/.changelog.yml @@ -14,28 +14,28 @@ groups: name: BREAKING labels: - kind/breaking - - - name: FEATURES - labels: - - kind/feature - name: SECURITY labels: - kind/security + - + name: FEATURES + labels: + - kind/feature - name: API labels: - kind/api - - - name: BUGFIXES - labels: - - kind/bug - name: ENHANCEMENTS labels: - kind/enhancement - kind/refactor - kind/ui + - + name: BUGFIXES + labels: + - kind/bug - name: TESTING labels: diff --git a/.drone.yml b/.drone.yml index 74dbf107b..7be296fa5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,28 +4,30 @@ name: compliance platform: os: linux - arch: arm64 + arch: amd64 -workspace: - base: /go - path: src/code.gitea.io/gitea +trigger: + event: + - push + - tag + - pull_request steps: - name: deps-frontend pull: always - image: node:14 + image: node:16 commands: - make node_modules - name: lint-frontend - image: node:14 + image: node:16 commands: - make lint-frontend depends_on: [deps-frontend] - name: lint-backend pull: always - image: golang:1.15 + image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env commands: - make lint-backend environment: @@ -35,7 +37,7 @@ steps: - name: lint-backend-windows pull: always - image: golang:1.15 + image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env commands: - make golangci-lint vet environment: @@ -47,7 +49,7 @@ steps: - name: lint-backend-gogit pull: always - image: golang:1.15 + image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env commands: - make lint-backend environment: @@ -56,27 +58,33 @@ steps: TAGS: bindata gogit sqlite sqlite_unlock_notify - name: checks-frontend - image: node:14 + image: node:16 commands: - make checks-frontend depends_on: [deps-frontend] - name: checks-backend pull: always - image: golang:1.14 + image: golang:1.17 commands: - make checks-backend depends_on: [lint-backend] + - name: test-frontend + image: node:16 + commands: + - make test-frontend + depends_on: [lint-frontend] + - name: build-frontend - image: node:14 + image: node:16 commands: - make frontend - depends_on: [lint-frontend] + depends_on: [test-frontend] - name: build-backend-no-gcc pull: always - image: golang:1.13 # this step is kept as the lowest version of golang that we support + image: golang:1.16 # this step is kept as the lowest version of golang that we support environment: GO111MODULE: on GOPROXY: off @@ -85,7 +93,7 @@ steps: depends_on: [checks-backend] - name: build-backend-arm64 - image: golang:1.15 + image: golang:1.17 environment: GO111MODULE: on GOPROXY: off @@ -98,7 +106,7 @@ steps: depends_on: [checks-backend] - name: build-backend-windows - image: golang:1.15 + image: golang:1.17 environment: GO111MODULE: on GOPROXY: off @@ -110,7 +118,7 @@ steps: depends_on: [checks-backend] - name: build-backend-386 - image: golang:1.15 + image: golang:1.17 environment: GO111MODULE: on GOPROXY: off @@ -131,9 +139,11 @@ platform: depends_on: - compliance -workspace: - base: /go - path: src/code.gitea.io/gitea +trigger: + event: + - push + - tag + - pull_request services: - name: mysql @@ -143,7 +153,7 @@ services: MYSQL_DATABASE: test - name: mysql8 - image: mysql:8.0 + image: mysql:8 environment: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: testgitea @@ -164,7 +174,7 @@ services: image: elasticsearch:7.5.0 - name: minio - image: minio/minio:RELEASE.2020-10-09T22-55-05Z + image: minio/minio:RELEASE.2021-03-12T00-00-47Z commands: - minio server /data environment: @@ -183,7 +193,7 @@ steps: - name: build pull: always - image: golang:1.15 + image: golang:1.17 commands: - make backend environment: @@ -198,35 +208,36 @@ steps: - git update-ref refs/heads/tag_test ${DRONE_COMMIT_SHA} - name: unit-test - image: golang:1.15 + image: golang:1.17 commands: - make unit-test-coverage test-check environment: GOPROXY: off TAGS: bindata sqlite sqlite_unlock_notify + RACE_ENABLED: true GITHUB_READ_TOKEN: from_secret: github_read_token - name: unit-test-gogit pull: always - image: golang:1.15 + image: golang:1.17 commands: - make unit-test-coverage test-check environment: GOPROXY: off TAGS: bindata gogit sqlite sqlite_unlock_notify + RACE_ENABLED: true GITHUB_READ_TOKEN: from_secret: github_read_token - name: test-mysql - image: golang:1.15 + image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - make test-mysql-migration integration-test-coverage environment: GOPROXY: off TAGS: bindata + RACE_ENABLED: true TEST_LDAP: 1 USE_REPO_TEST_DIR: 1 TEST_INDEXER_CODE_ES_URL: "http://elastic:changeme@elasticsearch:9200" @@ -234,35 +245,33 @@ steps: - build - name: test-mysql8 - image: golang:1.15 + image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - timeout -s ABRT 40m make test-mysql8-migration test-mysql8 environment: GOPROXY: off TAGS: bindata + RACE_ENABLED: true TEST_LDAP: 1 USE_REPO_TEST_DIR: 1 depends_on: - build - name: test-mssql - image: golang:1.15 + image: gitea/test_env:linux-amd64 # https://gitea.com/gitea/test-env commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - make test-mssql-migration test-mssql environment: GOPROXY: off TAGS: bindata + RACE_ENABLED: true TEST_LDAP: 1 USE_REPO_TEST_DIR: 1 depends_on: - build - name: generate-coverage - image: golang:1.15 + image: golang:1.17 commands: - make coverage environment: @@ -273,7 +282,7 @@ steps: - test-mysql when: branch: - - master + - main event: - push - pull_request @@ -290,7 +299,7 @@ steps: - generate-coverage when: branch: - - master + - main event: - push - pull_request @@ -306,14 +315,16 @@ platform: depends_on: - compliance -workspace: - base: /go - path: src/code.gitea.io/gitea +trigger: + event: + - push + - tag + - pull_request services: - name: pgsql pull: default - image: postgres:9.5 + image: postgres:10 environment: POSTGRES_DB: test POSTGRES_PASSWORD: postgres @@ -334,37 +345,35 @@ steps: - name: build pull: always - image: golang:1.15 + image: golang:1.17 commands: - make backend environment: GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not GOSUMDB: sum.golang.org - TAGS: bindata sqlite sqlite_unlock_notify + TAGS: bindata gogit sqlite sqlite_unlock_notify - name: test-sqlite - image: golang:1.15 + image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - timeout -s ABRT 40m make test-sqlite-migration test-sqlite environment: GOPROXY: off TAGS: bindata gogit sqlite sqlite_unlock_notify + RACE_ENABLED: true TEST_TAGS: gogit sqlite sqlite_unlock_notify USE_REPO_TEST_DIR: 1 depends_on: - build - name: test-pgsql - image: golang:1.15 + image: gitea/test_env:linux-arm64 # https://gitea.com/gitea/test-env commands: - - "curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash" - - apt-get install -y git-lfs - timeout -s ABRT 40m make test-pgsql-migration test-pgsql environment: GOPROXY: off TAGS: bindata gogit + RACE_ENABLED: true TEST_TAGS: gogit TEST_LDAP: 1 USE_REPO_TEST_DIR: 1 @@ -373,21 +382,19 @@ steps: --- kind: pipeline -name: translations +name: update_translations platform: os: linux arch: arm64 -workspace: - base: /go - path: src/code.gitea.io/gitea - trigger: branch: - - master + - main event: - - push + - cron + cron: + - update_translations steps: - name: download @@ -404,7 +411,7 @@ steps: - name: update pull: default - image: alpine:3.12 + image: alpine:3.13 commands: - ./build/update-locales.sh @@ -414,6 +421,7 @@ steps: settings: author_email: "teabot@gitea.io" author_name: GiteaBot + branch: main commit: true commit_message: "[skip ci] Updated translations via Crowdin" remote: "git@github.com:go-gitea/gitea.git" @@ -433,6 +441,42 @@ steps: CROWDIN_KEY: from_secret: crowdin_key +--- +kind: pipeline +name: update_gitignore_and_licenses + +platform: + os: linux + arch: arm64 + +trigger: + branch: + - main + event: + - cron + cron: + - update_gitignore_and_licenses + +steps: + - name: download + image: golang:1.17 + commands: + - timeout -s ABRT 40m make generate-license generate-gitignore + + - name: push + pull: always + image: appleboy/drone-git-push + settings: + author_email: "teabot@gitea.io" + author_name: GiteaBot + branch: main + commit: true + commit_message: "[skip ci] Updated licenses and gitignores " + remote: "git@github.com:go-gitea/gitea.git" + environment: + GIT_PUSH_SSH_KEY: + from_secret: git_push_ssh_key + --- kind: pipeline name: release-latest @@ -442,12 +486,12 @@ platform: arch: amd64 workspace: - base: /go - path: src/code.gitea.io/gitea + base: /source + path: / trigger: branch: - - master + - main - "release/*" event: - push @@ -455,7 +499,6 @@ trigger: depends_on: - testing-amd64 - testing-arm64 - - translations steps: - name: fetch-tags @@ -465,9 +508,9 @@ steps: - name: static pull: always - image: techknowlogick/xgo:go-1.15.x + image: techknowlogick/xgo:go-1.16.x commands: - - curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs + - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs - export PATH=$PATH:$GOPATH/bin - make release environment: @@ -494,7 +537,7 @@ steps: image: plugins/s3:1 settings: acl: public-read - bucket: releases + bucket: gitea-artifacts endpoint: https://storage.gitea.io path_style: true source: "dist/release/*" @@ -511,16 +554,16 @@ steps: event: - push - - name: release-master + - name: release-main image: plugins/s3:1 settings: acl: public-read - bucket: releases + bucket: gitea-artifacts endpoint: https://storage.gitea.io path_style: true source: "dist/release/*" strip_prefix: dist/release/ - target: /gitea/master + target: /gitea/main environment: AWS_ACCESS_KEY_ID: from_secret: aws_access_key_id @@ -528,7 +571,7 @@ steps: from_secret: aws_secret_access_key when: branch: - - master + - main event: - push @@ -541,8 +584,8 @@ platform: arch: amd64 workspace: - base: /go - path: src/code.gitea.io/gitea + base: /source + path: / trigger: event: @@ -561,9 +604,9 @@ steps: - name: static pull: always - image: techknowlogick/xgo:go-1.15.x + image: techknowlogick/xgo:go-1.16.x commands: - - curl -sL https://deb.nodesource.com/setup_14.x | bash - && apt -y install nodejs + - curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs - export PATH=$PATH:$GOPATH/bin - make release environment: @@ -590,7 +633,7 @@ steps: image: plugins/s3:1 settings: acl: public-read - bucket: releases + bucket: gitea-artifacts endpoint: https://storage.gitea.io path_style: true source: "dist/release/*" @@ -623,6 +666,12 @@ platform: depends_on: - compliance +trigger: + event: + - push + - tag + - pull_request + steps: - name: build-docs pull: always @@ -643,30 +692,28 @@ steps: from_secret: netlify_token when: branch: - - master + - main event: - push --- kind: pipeline -name: docker-linux-amd64-release +name: docker-linux-amd64-release-version platform: os: linux arch: amd64 -workspace: - base: /go - path: src/code.gitea.io/gitea - depends_on: - testing-amd64 - testing-arm64 trigger: ref: - - refs/heads/master - "refs/tags/**" + event: + exclude: + - cron steps: - name: fetch-tags @@ -676,7 +723,7 @@ steps: - name: publish pull: always - image: plugins/docker:linux-amd64 + image: techknowlogick/drone-docker:latest settings: auto_tag: true auto_tag_suffix: linux-amd64 @@ -693,7 +740,7 @@ steps: - pull_request - name: publish-rootless - image: plugins/docker:linux-amd64 + image: techknowlogick/drone-docker:latest settings: dockerfile: Dockerfile.rootless auto_tag: true @@ -713,6 +760,70 @@ steps: exclude: - pull_request +--- +kind: pipeline +name: docker-linux-amd64-release + +platform: + os: linux + arch: amd64 + +depends_on: + - testing-amd64 + - testing-arm64 + +trigger: + ref: + - refs/heads/main + event: + exclude: + - cron + +steps: + - name: fetch-tags + image: docker:git + commands: + - git fetch --tags --force + + - name: publish + pull: always + image: techknowlogick/drone-docker:latest + settings: + auto_tag: false + tags: dev-linux-amd64 + repo: gitea/gitea + build_args: + - GOPROXY=off + password: + from_secret: docker_password + username: + from_secret: docker_username + when: + event: + exclude: + - pull_request + + - name: publish-rootless + image: techknowlogick/drone-docker:latest + settings: + dockerfile: Dockerfile.rootless + auto_tag: false + tags: dev-linux-amd64-rootless + repo: gitea/gitea + build_args: + - GOPROXY=off + password: + from_secret: docker_password + username: + from_secret: docker_username + environment: + PLUGIN_MIRROR: + from_secret: plugin_mirror + when: + event: + exclude: + - pull_request + --- kind: pipeline name: docker-linux-arm64-dry-run @@ -721,10 +832,6 @@ platform: os: linux arch: arm64 -workspace: - base: /go - path: src/code.gitea.io/gitea - depends_on: - compliance @@ -735,7 +842,7 @@ trigger: steps: - name: dryrun pull: always - image: plugins/docker:linux-arm64 + image: techknowlogick/drone-docker:latest settings: dry_run: true repo: gitea/gitea @@ -751,24 +858,23 @@ steps: --- kind: pipeline -name: docker-linux-arm64-release +name: docker-linux-arm64-release-version platform: os: linux arch: arm64 -workspace: - base: /go - path: src/code.gitea.io/gitea - depends_on: - testing-amd64 - testing-arm64 trigger: ref: - - refs/heads/master - "refs/tags/**" + event: + exclude: + - cron + steps: - name: fetch-tags image: docker:git @@ -777,7 +883,7 @@ steps: - name: publish pull: always - image: plugins/docker:linux-arm64 + image: techknowlogick/drone-docker:latest settings: auto_tag: true auto_tag_suffix: linux-arm64 @@ -797,7 +903,7 @@ steps: - pull_request - name: publish-rootless - image: plugins/docker:linux-arm64 + image: techknowlogick/drone-docker:latest settings: dockerfile: Dockerfile.rootless auto_tag: true @@ -819,7 +925,73 @@ steps: --- kind: pipeline -name: docker-manifest +name: docker-linux-arm64-release + +platform: + os: linux + arch: arm64 + +depends_on: + - testing-amd64 + - testing-arm64 + +trigger: + ref: + - refs/heads/main + event: + exclude: + - cron + +steps: + - name: fetch-tags + image: docker:git + commands: + - git fetch --tags --force + + - name: publish + pull: always + image: techknowlogick/drone-docker:latest + settings: + auto_tag: false + tags: dev-linux-arm64 + repo: gitea/gitea + build_args: + - GOPROXY=off + password: + from_secret: docker_password + username: + from_secret: docker_username + environment: + PLUGIN_MIRROR: + from_secret: plugin_mirror + when: + event: + exclude: + - pull_request + + - name: publish-rootless + image: techknowlogick/drone-docker:latest + settings: + dockerfile: Dockerfile.rootless + auto_tag: false + tags: dev-linux-arm64-rootless + repo: gitea/gitea + build_args: + - GOPROXY=off + password: + from_secret: docker_password + username: + from_secret: docker_username + environment: + PLUGIN_MIRROR: + from_secret: plugin_mirror + when: + event: + exclude: + - pull_request +--- +kind: pipeline +name: docker-manifest-version platform: os: linux @@ -851,8 +1023,53 @@ steps: trigger: ref: - - refs/heads/master - "refs/tags/**" + event: + exclude: + - cron + +depends_on: + - docker-linux-amd64-release-version + - docker-linux-arm64-release-version + +--- +kind: pipeline +name: docker-manifest + +platform: + os: linux + arch: amd64 + +steps: + - name: manifest-rootless + pull: always + image: plugins/manifest + settings: + auto_tag: false + ignore_missing: true + spec: docker/manifest.rootless.tmpl + password: + from_secret: docker_password + username: + from_secret: docker_username + + - name: manifest + image: plugins/manifest + settings: + auto_tag: false + ignore_missing: true + spec: docker/manifest.tmpl + password: + from_secret: docker_password + username: + from_secret: docker_username + +trigger: + ref: + - refs/heads/main + event: + exclude: + - cron depends_on: - docker-linux-amd64-release @@ -871,7 +1088,7 @@ clone: trigger: branch: - - master + - main - "release/*" event: - push @@ -883,12 +1100,14 @@ trigger: depends_on: - testing-amd64 - testing-arm64 - - translations - release-version - release-latest - docker-linux-amd64-release - docker-linux-arm64-release + - docker-linux-amd64-release-version + - docker-linux-arm64-release-version - docker-manifest + - docker-manifest-version - docs steps: diff --git a/.editorconfig b/.editorconfig index 54738e883..0f8603e5a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -12,6 +12,15 @@ insert_final_newline = true [*.{go,tmpl,html}] indent_style = tab +[templates/custom/*.tmpl] +insert_final_newline = false + +[templates/swagger/v1_json.tmpl] +indent_style = space + +[templates/user/auth/oidc_wellknown.tmpl] +indent_style = space + [Makefile] indent_style = tab diff --git a/.eslintrc b/.eslintrc index 0a56f6aaa..98f843495 100644 --- a/.eslintrc +++ b/.eslintrc @@ -53,6 +53,12 @@ overrides: rules: import/no-unresolved: [0] import/no-extraneous-dependencies: [0] + - files: ["*.test.js"] + env: + jest: true + - files: ["*.config.js"] + rules: + import/no-unused-modules: [0] rules: accessor-pairs: [2] @@ -119,6 +125,7 @@ rules: import/no-deprecated: [0] import/no-dynamic-require: [0] import/no-extraneous-dependencies: [2] + import/no-import-module-exports: [0] import/no-internal-modules: [0] import/no-mutable-exports: [2] import/no-named-as-default-member: [0] @@ -127,6 +134,7 @@ rules: import/no-named-export: [0] import/no-namespace: [0] import/no-nodejs-modules: [0] + import/no-relative-packages: [0] import/no-relative-parent-imports: [0] import/no-restricted-paths: [0] import/no-self-import: [2] @@ -344,6 +352,7 @@ rules: unicode-bom: [2, never] unicorn/better-regex: [0] unicorn/catch-error-name: [0] + unicorn/consistent-destructuring: [2] unicorn/consistent-function-scoping: [2] unicorn/custom-error-definition: [0] unicorn/empty-brace-spaces: [2] @@ -356,51 +365,77 @@ rules: unicorn/import-style: [0] unicorn/new-for-builtins: [2] unicorn/no-abusive-eslint-disable: [0] + unicorn/no-array-for-each: [0] unicorn/no-array-instanceof: [0] + unicorn/no-array-method-this-argument: [2] + unicorn/no-array-push-push: [2] unicorn/no-console-spaces: [0] + unicorn/no-document-cookie: [2] unicorn/no-fn-reference-in-iterator: [0] unicorn/no-for-loop: [0] unicorn/no-hex-escape: [0] unicorn/no-keyword-prefix: [0] unicorn/no-lonely-if: [2] unicorn/no-nested-ternary: [0] + unicorn/no-new-array: [0] unicorn/no-new-buffer: [0] unicorn/no-null: [0] unicorn/no-object-as-default-parameter: [2] unicorn/no-process-exit: [0] unicorn/no-reduce: [2] + unicorn/no-static-only-class: [2] + unicorn/no-this-assignment: [2] unicorn/no-unreadable-array-destructuring: [0] unicorn/no-unsafe-regex: [0] unicorn/no-unused-properties: [2] + unicorn/no-useless-length-check: [2] + unicorn/no-useless-spread: [2] unicorn/no-useless-undefined: [0] unicorn/no-zero-fractions: [2] unicorn/number-literal-case: [0] unicorn/numeric-separators-style: [0] unicorn/prefer-add-event-listener: [2] unicorn/prefer-array-find: [2] + unicorn/prefer-array-flat-map: [2] + unicorn/prefer-array-flat: [2] + unicorn/prefer-array-index-of: [2] + unicorn/prefer-array-some: [2] + unicorn/prefer-at: [0] unicorn/prefer-dataset: [2] unicorn/prefer-date-now: [2] + unicorn/prefer-default-parameters: [0] unicorn/prefer-event-key: [2] unicorn/prefer-includes: [2] unicorn/prefer-math-trunc: [2] unicorn/prefer-modern-dom-apis: [0] + unicorn/prefer-module: [2] unicorn/prefer-negative-index: [2] unicorn/prefer-node-append: [0] + unicorn/prefer-node-protocol: [0] unicorn/prefer-node-remove: [0] unicorn/prefer-number-properties: [0] + unicorn/prefer-object-from-entries: [2] + unicorn/prefer-object-has-own: [0] unicorn/prefer-optional-catch-binding: [2] + unicorn/prefer-prototype-methods: [0] unicorn/prefer-query-selector: [0] unicorn/prefer-reflect-apply: [0] + unicorn/prefer-regexp-test: [2] unicorn/prefer-replace-all: [0] unicorn/prefer-set-has: [0] unicorn/prefer-spread: [0] unicorn/prefer-starts-ends-with: [2] unicorn/prefer-string-slice: [0] + unicorn/prefer-switch: [0] unicorn/prefer-ternary: [0] unicorn/prefer-text-content: [2] + unicorn/prefer-top-level-await: [0] unicorn/prefer-trim-start-end: [2] unicorn/prefer-type-error: [0] unicorn/prevent-abbreviations: [0] + unicorn/require-array-join-separator: [2] + unicorn/require-number-to-fixed-digits-argument: [2] + unicorn/require-post-message-target-origin: [0] unicorn/string-content: [0] unicorn/throw-new-error: [2] use-isnan: [2] diff --git a/.gitattributes b/.gitattributes index e8d2162cf..6ee47c85d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,3 +4,4 @@ /templates/**/*.tmpl linguist-language=Handlebars /.eslintrc linguist-language=YAML /.stylelintrc linguist-language=YAML +/web_src/fomantic/build/** linguist-generated diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 1447a6ea3..624a2d97d 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ open_collective: gitea +custom: https://www.bountysource.com/teams/gitea diff --git a/.github/issue_template.md b/.github/issue_template.md index 69ff704bb..95b97e4de 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -30,6 +30,9 @@ ## Description + ... diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 702062490..9f5ecab4b 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,6 +1,6 @@ Please check the following: -1. Make sure you are targeting the `master` branch, pull requests on release branches are only allowed for bug fixes. +1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes. 2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/master/CONTRIBUTING.md 3. Describe what your pull request does and which issue you're targeting (if any) diff --git a/.gitignore b/.gitignore index 8d8863546..5bf71be65 100644 --- a/.gitignore +++ b/.gitignore @@ -32,6 +32,7 @@ _testmain.go *coverage.out coverage.all +cpu.out /modules/options/bindata.go /modules/options/bindata.go.hash @@ -75,11 +76,14 @@ coverage.all /integrations/mssql.ini /node_modules /yarn.lock +/yarn-error.log +/npm-debug.log* /public/js /public/serviceworker.js /public/css /public/fonts /public/img/webpack +/web_src/fomantic/node_modules /web_src/fomantic/build/* !/web_src/fomantic/build/semantic.js !/web_src/fomantic/build/semantic.css @@ -106,3 +110,6 @@ prime/ # Make evidence files /.make_evidence + +# Manpage +/man diff --git a/.golangci.yml b/.golangci.yml index 34752127e..c3dd47ec2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -26,7 +26,7 @@ linters-settings: gocritic: disabled-checks: - ifElseChain - - singleCaseSwitch # Every time this occured in the code, there was no other way. + - singleCaseSwitch # Every time this occurred in the code, there was no other way. issues: exclude-rules: @@ -70,9 +70,6 @@ issues: - path: modules/log/ linters: - errcheck - - path: routers/routes/macaron.go - linters: - - dupl - path: routers/api/v1/repo/issue_subscription.go linters: - dupl @@ -110,3 +107,8 @@ issues: - text: "exitAfterDefer:" linters: - gocritic + - path: modules/graceful/manager_windows.go + linters: + - staticcheck + text: "svc.IsAnInteractiveSession is deprecated: Use IsWindowsService instead." + diff --git a/.npmrc b/.npmrc index c5ac9901c..8dcb4185b 100644 --- a/.npmrc +++ b/.npmrc @@ -1,4 +1,5 @@ audit=false fund=false +update-notifier=false package-lock=true save-exact=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 020212043..3a7d159b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,823 @@ This changelog goes through all the changes that have been made in each release without substantial changes to our git log; to see the highlights of what has been added to each release, please refer to the [blog](https://blog.gitea.io). +## [1.15.0](https://github.com/go-gitea/gitea/releases/tag/v1.15.0) - 2021-08-21 + +* BREAKING + * Make app.ini permissions more restrictive (#16266) + * Refactor Webhook + Add X-Hub-Signature (#16176) + * Add asymmetric JWT signing (#16010) + * Clean-up the settings hierarchy for issue_indexer queue (#16001) + * Change default queue settings to be low go-routines (#15964) + * Improve assets handler middleware (#15961) + * Rename StaticUrlPrefix to AssetUrlPrefix (#15779) + * Use a generic markup class to display externally rendered files and diffs (#15735) + * Add frontend testing, require node 12 (#15315) + * Move (custom) assets into subpath `/assets` (#15219) + * Use level config in log section when sub log section not set level (#15176) + * Links in markdown should be absolute to the repository not the server (#15088) + * Upgrade to the latest version of golang-jwt (#16590) (#16606) + * Set minimum supported version of go to 1.16 (#16710) +* SECURITY + * Encrypt LDAP bind password in db with SECRET_KEY (#15547) + * Remove random password in Dockerfiles (#15362) + * Upgrade to the latest version of golang-jwt and increase minimum go to 1.15 (#16590) (#16606) + * Correctly create of git-daemon-export-ok files (#16508) (#16514) + * Don't show private user's repo in explore view (#16550) (#16554) + * Update node tar dependency to 6.1.6 (#16622) (#16623) +* FEATURES + * Update Go-Git to take advantage of LargeObjectThreshold (#16316) + * Support custom mime type mapping for text files (#16304) + * Link to previous blames in file blame page (#16259) + * Add LRU mem cache implementation (#16226) + * Localize Email Templates (#16200) + * Make command in authorized keys a template (#16003) + * Add possibility to make branch in branch page (#15960) + * Add email headers (#15939) + * Make tasklist checkboxes clickable (#15791) + * Add selecting tags on the compare page (#15723) + * Add cron job to delete old actions from database (#15688) + * On open repository open common cat file batch and batch-check (#15667) + * Add tag protection (#15629) + * Add push to remote mirror repository (#15157) + * Add Image Diff for SVG files (#14867) + * Add dashboard milestone search and repo milestone search by name. (#14866) + * Add LFS Migration and Mirror (#14726) + * Improve notifications for WIP draft PR's (#14663) + * Disable Stars config option (#14653) + * GPG Key Ownership verification with Signed Token (#14054) + * OAuth2 auto-register (#5123) +* API + * Return updated repository when changing repository using API (#16420) + * Let branch/tag name be a valid ref to get CI status (#16400) + * Add endpoint to get commits of PR (#16300) + * Allow COMMENT reviews to not specify a body (#16229) + * Add subject-type filter to list notification API endpoints (#16177) + * ListReleases add filter for draft and pre-releases (#16175) + * ListIssues add more filters (#16174) + * Issue Search Add filter for MilestoneNames (#16173) + * GET / SET User Settings (#16169) + * Expose repo.GetReviewers() & repo.GetAssignees() (#16168) + * User expose counters (#16167) + * Add repoGetTag (#16166) + * Add repoCreateTag (#16165) + * Creating a repo from a template repo via API (#15958) + * Add Active and ProhibitLogin to API (#15689) + * Add Location, Website and Description to API (#15675) + * Expose resolver via API (#15167) + * Swagger AccessToken fixes (#16574) (#16597) + * Set AllowedHeaders on API CORS handler (#16524) (#16618) +* ENHANCEMENTS + * Support HTTP/2 in Let's Encrypt (#16371) + * Introduce NotifySubjectType (#16320) + * Add forge emojies (#16296) + * Implemented head_commit for webhooks (#16282) + * Upgrade Gliderlabs SSH to 0.3.3 and add FailedConnectionCallback (#16278) + * Add previous/next buttons to review comments (#16273) + * Review comments: break-word for long file names (#16272) + * Add configuration to restrict allowed user visibility modes (#16271) + * Add scroll-margin-top to account for sticky header (#16269) + * Add --quiet and --verbose to gitea web to control initial logging (#16260) + * Use gitea logging module for git module (#16243) + * Add tests for all webhooks (#16214) + * Add button to delete undeleted repositories from failed migrations (#16197) + * Speed up git diff highlight generation (#16180) + * Add OpenID claims "profile" and "email". (#16141) + * Reintroduce squash merge default comment as a config setting (#16134) + * Add sanitizer rules per renderer (#16110) + * Improve performance of dashboard list orgs (#16099) + * Refactor assert statements in tests (#16089) + * Add sso.Group, context.Auth, context.APIAuth to allow auth special routes (#16086) + * Remove unnecessary goroutine (#16080) + * Add attachments for PR reviews (#16075) + * Make the github migration less rate limit waiting to get comment per page from repository but not per issue (#16070) + * Add Visible modes function from Organisation to Users too (#16069) + * Add checkbox to delete pull branch after successful merge (#16049) + * Make commit info cancelable (#16032) + * Make modules/context.Context a context.Context (#16031) + * Unified custom config creation (#16012) + * Make sshd_config more flexible regarding connections (#16009) + * Append to existing trailers in generated squash commit message (#15980) + * Always store primary email address into email_address table and also the state (#15956) + * Load issue/PR context popup data only when needed (#15955) + * Remove remaining fontawesome usage in templates (#15952) + * Remove fomantic accordion module (#15951) + * Small refactoring of modules/private (#15947) + * Double the avatar size factor (#15941) + * Add curl to rootless docker image (#15908) + * Replace clipboard.js with async clipboard api (#15899) + * Allow custom highlight mapping beyond file extensions (#15808) + * Add trace logging to SSO methods (#15803) + * Refactor routers directory (#15800) + * Allow only internal registration (#15795) + * Add a new internal hook to save ssh log (#15787) + * Respect default merge message syntax when parsing item references (#15772) + * OAuth2 login: Set account link to "login" as default behavior (#15768) + * Use single shared random string generation function (#15741) + * Hold the event source when there are no listeners (#15725) + * Code comments improvements (#15722) + * Provide OIDC compliant user info endpoint (#15721) + * Fix webkit calendar icon color on arc-green (#15713) + * Improve Light Chroma style (#15699) + * Only use boost workers for leveldb shadow queues (#15696) + * Add compare tag dropdown to releases page (#15695) + * Add caret styling CSS (#15651) + * Remove x-ua-compatible meta tag (#15640) + * Refactor of link creation (#15619) + * Add a new table issue_index to store the max issue index so that issue could be deleted with no duplicated index (#15599) + * Rewrite of the LFS server (#15523) + * Display more repository type on admin repository management (#15440) + * Remove usage of some JS globals (#15378) + * SHA in merged commit comment should be rendered ui sha (#15376) + * Add well-known config for OIDC (#15355) + * Use route rather than use thus reducing the number of stack frames (#15301) + * Code Formats, Nits & Unused Func/Var deletions (#15286) + * Let package git depend on setting but not opposite (#15241) + * Fixed sanitize errors (#15240) + * response simple text message for not html request when 404 (#15229) + * Remove file-loader dependency (#15196) + * Refactor renders (#15175) + * Add mimetype mapping settings (#15133) + * Add Status Updates whilst Gitea migrations are occurring (#15076) + * Reload locales in initialisation if needed by utilizing i18n.Reset (#15073) + * Counterwork seemingly unclickable repo button labels (#15064) + * Add DefaultMergeStyle option to repository (#14789) + * Added support for gopher URLs. (#14749) + * Rework repository archive (#14723) + * Add links to toggle WIP status (#14677) + * Add Tabular Diff for CSV files (#14661) + * Use milestone deadline when sorting issues (#14551) +* BUGFIXES + * Fix invalid params and typo of email templates (#16394) + * Fix activation of primary email addresses (#16385) + * Fix calculation for finalPage in repo-search component (#16382) + * Specify user in rootless container numerically (#16361) + * Detect encoding changes while parsing diff (#16330) + * Fix U2F error reasons always hidden (#16327) + * Prevent zombie processes (#16314) + * Escape reference to `user` table in models.SearchEmails (#16313) + * Fix default push instructions on empty repos (#16302) + * Fix modified files list in webhooks when there is a space (#16288) + * Fix webhook commits wrong hash on HEAD reset (#16283) + * Fuzzer finds an NPE due to incorrect URLPrefix (#16249) + * Don't WARN log UserNotExist errors on ExternalUserLogin failure (#16238) + * Do not show No match found for tribute (#16231) + * Fix "Copy Link" for pull requests (#16230) + * Fix diff expansion is missing final line in a file (#16222) + * Fix private repo permission problem (#16142) + * Fix not able to update local created non-urlencoded wiki pages (#16139) + * More efficiently parse shas for shaPostProcessor (#16101) + * Fix `doctor --run check-db-consistency --fix` with label fix (#16094) + * Prevent webhook action buttons from shifting (#16087) + * Change default TMPDIR path in rootless containers (#16077) + * Fix typo and add TODO notice (#16064) + * Use git log name-status in get last commit (#16059) + * Fix 500 Error with branch and tag sharing the same name (#16040) + * Fix get tag when migration (#16014) + * Add custom emoji support (#16004) + * Use filepath.ToSlash and Join in indexer defaults and queues (#15971) + * Add permission check for ``GenerateRepository`` (#15946) + * Ensure settings for Service and Mailer are read on the install page (#15943) + * Fix layout of milestone view (#15927) + * Unregister non-matching serviceworkers (#15834) + * Multiple Queue improvements: LevelDB Wait on empty, shutdown empty shadow level queue, reduce goroutines etc (#15693) + * Attachment support repository route (#15580) + * Fix missing icons and colorpicker when mounted on suburl (#15501) + * Create a session on ReverseProxy and ensure that ReverseProxy users cannot change username (#15304) + * Prevent double-login for Git HTTP and LFS and simplify login (#15303) + * Resolve Object { type: "error", data: undefined } in stopwatch.js (#15278) + * Fix heatmap activity (#15252) + * Remove vendored copy of fomantic-dropdown (#15193) + * Update repository size on cron gc task (#15177) + * Add NeedPostProcess for Parser interface to improve performance of csv parser and some external parser (#15153) + * Add code block highlight to orgmode back (#14222) + * Remove User.GetOrganizations() (#14032) + * Restore Accessibility for Dropdown (#16576) (#16617) + * Pass down SignedUserName down to AccessLogger context (#16605) (#16616) + * Fix table alignment in markdown (#16596) (#16602) + * Fix 500 on first wiki page (#16586) (#16598) + * Lock goth/gothic and Re-attempt OAuth2 registration on login if registration failed at startup (#16564) (#16570) + * Upgrade levelqueue to v0.4.0 (#16560) (#16561) + * Handle too long PR titles correctly (#16517) (#16549) + * Fix data race in bleve indexer (#16474) (#16509) + * Restore CORS on git smart http protocol (#16496) (#16506) + * Fix race in log (#16490) (#16505) + * Fix prepareWikiFileName to respect existing unescaped files (#16487) (#16498) + * Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480) + * Update notification table with only latest data (#16445) (#16469) + * Fix crash following ldap authentication update (#16447) (#16448) + * Fix direct creation of external users on admin page (partial #16612) (#16613) + * Prevent 500 on draft releases without tag (#16634) (#16636) + * Restore creation of git-daemon-export-ok files (#16508) (#16514) + * Fix data race in bleve indexer (#16474) (#16509) + * Restore CORS on git smart http protocol (#16496) (#16506) + * Fix race in log (#16490) (#16505) + * Fix prepareWikiFileName to respect existing unescaped files (#16487) (#16498) + * Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16480) + * Update notification table with only latest data (#16445) (#16469) + * Fix crash following ldap authentication update (#16447) (#16448) + * Restore compatibility with SQLServer 2008 R2 in migrations (#16638) + * Fix direct creation of external users on admin page (#16613) + * Fix go-git implementation of GetNote when passed a non-existent commit (#16658) (#16659) + * Fix NPE in fuzzer (#16680) (#16682) + * Set issue_index when finishing migration (#16685) (#16687) + * Skip patch download when no patch file exists (#16356) (#16681) + * Ensure empty lines are copiable and final new line too (#16678) (#16692) + * Fix wrong user in OpenID response (#16736) (#16741) + * Do not use thin scrollbars on Firefox (#16738) (#16745) + * Recreate Tables should Recreate indexes on MySQL (#16718) (#16739) + * Keep attachments on tasklist update (#16750) (#16757) +* TESTING + * Bump `postgres` and `mysql` versions (#15710) + * Add tests for clone from wiki (#15513) + * Fix Benchmark tests, remove a broken one & add two new (#15250) + * Create Proper Migration tests (#15116) +* TRANSLATION + * Use a special name for update default branch on repository setting (#15893) + * Fix mirror_lfs source string in en-US locale (#15369) +* BUILD + * Upgrade xorm to v1.1.1 (#16339) + * Disable legal comments in esbuild (#15929) + * Switch to Node 16 to build fronted (#15804) + * Use esbuild to minify CSS (#15756) + * Use binary version of revive linter (#15739) + * Fix: npx webpack make: *** [Makefile:699: public/js/index.js] Error -… (#15465) + * Stop packaging node_modules in release tarballs (#15273) + * Introduce esbuild on webpack (#14578) +* DOCS + * Update queue workers documentation (#15999) + * Comment out app.example.ini (#15807) + * Improve logo customization docs (#15754) + * Add some response status on api docs (#15399) + * Rework Token API comments (#15162) + * Add better errors for disabled account recovery (#15117) +* MISC + * Remove utf8 option from installation page (#16126) + * Use Wants= over Requires= in systemd file (#15897) + +## [1.14.6](https://github.com/go-gitea/gitea/releases/tag/v1.14.6) - 2021-08-04 + +* SECURITY + * Bump github.com/markbates/goth from v1.67.1 to v1.68.0 (#16538) (#16540) + * Switch to maintained JWT lib (#16532) (#16535) + * Upgrade to latest version of golang-jwt (as forked for 1.14) (#16590) (#16607) +* BUGFIXES + * Add basic edit ldap auth test & actually fix #16252 (#16465) (#16495) + * Make cancel from CatFileBatch and CatFileBatchCheck wait for the command to end (#16479) (#16481) + +## [1.14.5](https://github.com/go-gitea/gitea/releases/tag/v1.14.5) - 2021-07-16 + +* SECURITY + * Hide mirror passwords on repo settings page (#16022) (#16355) + * Update bluemonday to v1.0.15 (#16379) (#16380) +* BUGFIXES + * Retry rename on lock induced failures (#16435) (#16439) + * Validate issue index before querying DB (#16406) (#16410) + * Fix crash following ldap authentication update (#16447) (#16449) +* ENHANCEMENTS + * Redirect on bad CSRF instead of presenting bad page (#14937) (#16378) + +## [1.14.4](https://github.com/go-gitea/gitea/releases/tag/v1.14.4) - 2021-07-06 + +* BUGFIXES + * Fix relative links in postprocessed images (#16334) (#16340) + * Fix list_options GetStartEnd (#16303) (#16305) + * Fix API to use author for commits instead of committer (#16276) (#16277) + * Handle misencoding of login_source cfg in mssql (#16268) (#16275) + * Fixed issues not updated by commits (#16254) (#16261) + * Improve efficiency in FindRenderizableReferenceNumeric and getReference (#16251) (#16255) + * Use html.Parse rather than html.ParseFragment (#16223) (#16225) + * Fix milestone counters on new issue (#16183) (#16224) + * reqOrgMembership calls need to be preceded by reqToken (#16198) (#16219) + +## [1.14.3](https://github.com/go-gitea/gitea/releases/tag/v1.14.3) - 2021-06-18 + +* SECURITY + * Encrypt migration credentials at rest (#15895) (#16187) + * Only check access tokens if they are likely to be tokens (#16164) (#16171) + * Add missing SameSite settings for the i_like_gitea cookie (#16037) (#16039) + * Fix setting of SameSite on cookies (#15989) (#15991) +* API + * Repository object only count releases as releases (#16184) (#16190) + * EditOrg respect RepoAdminChangeTeamAccess option (#16184) (#16190) + * Fix overly strict edit pr permissions (#15900) (#16081) +* BUGFIXES + * Run processors on whole of text (#16155) (#16185) + * Class `issue-keyword` is being incorrectly stripped off spans (#16163) (#16172) + * Fix language switch for install page (#16043) (#16128) + * Fix bug on getIssueIDsByRepoID (#16119) (#16124) + * Set self-adjusting deadline for connection writing (#16068) (#16123) + * Fix http path bug (#16117) (#16120) + * Fix data URI scramble (#16098) (#16118) + * Merge all deleteBranch as one function and also fix bug when delete branch don't close related PRs (#16067) (#16097) + * git migration: don't prompt interactively for clone credentials (#15902) (#16082) + * Fix case change in ownernames (#16045) (#16050) + * Don't manipulate input params in email notification (#16011) (#16033) + * Remove branch URL before IssueRefURL (#15968) (#15970) + * Fix layout of milestone view (#15927) (#15940) + * GitHub Migration, migrate draft releases too (#15884) (#15888) + * Close the gitrepo when deleting the repository (#15876) (#15887) + * Upgrade xorm to v1.1.0 (#15869) (#15885) + * Fix blame row height alignment (#15863) (#15883) + * Fix error message when saving generated LOCAL_ROOT_URL config (#15880) (#15882) + * Backport Fix LFS commit finder not working (#15856) (#15874) + * Stop calling WriteHeader in Write (#15862) (#15873) + * Add timeout to writing to responses (#15831) (#15872) + * Return go-get info on subdirs (#15642) (#15871) + * Restore PAM user autocreation functionality (#15825) (#15867) + * Fix truncate utf8 string (#15828) (#15854) + * Fix bound address/port for caddy's certmagic library (#15758) (#15848) + * Upgrade unrolled/render to v1.1.1 (#15845) (#15846) + * Queue manager FlushAll can loop rapidly - add delay (#15733) (#15840) + * Tagger can be empty, as can Commit and Author - tolerate this (#15835) (#15839) + * Set autocomplete off on branches selector (#15809) (#15833) + * Add missing error to Doctor log (#15813) (#15824) + * Move restore repo to internal router and invoke from command to avoid open the same db file or queues files (#15790) (#15816) +* ENHANCEMENTS + * Removable media support to snap package (#16136) (#16138) + * Move sans-serif fallback font higher than emoji fonts (#15855) (#15892) +* DOCKER + * Only write config in environment-to-ini if there are changes (#15861) (#15868) + * Only offer hostcertificates if they exist (#15849) (#15853) + +## [1.14.2](https://github.com/go-gitea/gitea/releases/tag/v1.14.2) - 2021-05-09 + +* API + * Make change repo settings work on empty repos (#15778) (#15789) + * Add pull "merged" notification subject status to API (#15344) (#15654) +* BUGFIXES + * Ensure that ctx.Written is checked after issues(...) calls (#15797) (#15798) + * Use pulls in commit graph unless pulls are disabled (#15734 & #15740 & #15774) (#15775) + * Set GIT_DIR correctly if it is not set (#15751) (#15769) + * Fix bug where repositories appear unadopted (#15757) (#15767) + * Not show `ref-in-new-issue` pop when issue was disabled (#15761) (#15765) + * Drop back to use IsAnInteractiveSession for SVC (#15749) (#15762) + * Fix setting version table in dump (#15753) (#15759) + * Fix close button change on delete in simplemde area (#15737) (#15747) + * Defer closing the gitrepo until the end of the wrapped context functions (#15653) (#15746) + * Fix some ui bug about draft release (#15137) (#15745) + * Only log Error on getLastCommitStatus error to let pull list still be visible (#15716) (#15715) + * Move tooltip down to allow selection of Remove File on error (#15672) (#15714) + * Fix setting redis db path (#15698) (#15708) + * Fix DB session cleanup (#15697) (#15700) + * Fixed several activation bugs (#15473) (#15685) + * Delete references if repository gets deleted (#15681) (#15684) + * Fix orphaned objects deletion bug (#15657) (#15683) + * Delete protected branch if repository gets removed (#15658) (#15676) + * Remove spurious set name from eventsource.sharedworker.js (#15643) (#15652) + * Not update updated uinx for `git gc` (#15637) (#15641) + * Fix commit graph author link (#15627) (#15630) + * Fix webhook timeout bug (#15613) (#15621) + * Resolve panic on failed interface conversion in migration v156 (#15604) (#15610) + * Fix missing storage init (#15589) (#15598) + * If the default branch is not present do not report error on stats indexing (#15546 & #15583) (#15594) + * Fix lfs management find (#15537) (#15578) + * Fix NPE on view commit with notes (#15561) (#15573) + * Fix bug on commit graph (#15517) (#15530) + * Send size to /avatars if requested (#15459) (#15528) + * Prevent migration 156 failure if tag commit missing (#15519) (#15527) +* ENHANCEMENTS + * Display conflict-free merge messages for pull requests (#15773) (#15796) + * Exponential Backoff for ByteFIFO (#15724) (#15793) + * Issue list alignment tweaks (#15483) (#15766) + * Implement delete release attachments and update release attachments' name (#14130) (#15666) + * Add placeholder text to deploy key textarea (#15575) (#15576) + * Project board improvements (#15429) (#15560) + * Repo branch page: label size, PR ref, new PR button alignment (#15363) (#15365) +* MISC + * Fix webkit calendar icon color on arc-green (#15713) (#15728) + * Performance improvement for last commit cache and show-ref (#15455) (#15701) + * Bump unrolled/render to v1.1.0 (#15581) (#15608) + * Add ETag header (#15370) (#15552) + +## [1.14.1](https://github.com/go-gitea/gitea/releases/tag/v1.14.1) - 2021-04-15 + +* BUGFIXES + * Fix bug clone wiki (#15499) (#15502) + * Github Migration ignore rate limit, if not enabled (#15490) (#15495) + * Use subdir for URL (#15446) (#15493) + * Query the DB for the hash before inserting in to email_hash (#15457) (#15491) + * Ensure review dismissal only dismisses the correct review (#15477) (#15489) + * Use index of the supported tags to choose user lang (#15452) (#15488) + * Fix wrong file link in code search page (#15466) (#15486) + * Quick template fix for built-in SSH server in admin config (#15464) (#15481) + * Prevent superfluous response.WriteHeader (#15456) (#15476) + * Fix ambiguous argument error on tags (#15432) (#15474) + * Add created_unix instead of expiry to migration (#15458) (#15463) + * Fix repository search (#15428) (#15442) + * Prevent NPE on avatar direct rendering if federated avatars disabled (#15434) (#15439) + * Fix wiki clone urls (#15430) (#15431) + * Fix dingtalk icon url at webhook (#15417) (#15426) + * Standardise icon on projects PR page (#15387) (#15408) +* ENHANCEMENTS + * Add option to skip LFS/attachment files for `dump` (#15407) (#15492) + * Clone panel fixes (#15436) + * Use semantic dropdown for code search query type (#15276) (#15364) +* BUILD + * Build go-git variants for windows (#15482) (#15487) + * Lock down build-images dependencies (Partial #15479) (#15480) +* MISC + * Performance improvement for list pull requests (#15447) (#15500) + * Fix potential copy lfs records failure when fork a repository (#15441) (#15485) + +## [1.14.0](https://github.com/go-gitea/gitea/releases/tag/v1.14.0) - 2021-04-11 + +* SECURITY + * Respect approved email domain list for externally validated user registration (#15014) + * Add reverse proxy configuration support for remote IP address detection (#14959) + * Ensure validation occurs on clone addresses too (#14994) + * Fix several render issues highlighted during fuzzing (#14986) +* BREAKING + * Fix double 'push tag' action feed (#15078) (#15083) + * Remove possible resource leak (#15067) (#15082) + * Handle unauthorized user events gracefully (#15071) (#15074) + * Restore Access.log following migration to Chi framework (Stops access logging of /api/internal routes) (#14475) + * Migrate from Macaron to Chi framework (#14293) + * Deprecate building for mips (#14174) + * Consolidate Logos and update README header (#14136) + * Inline manifest.json (#14038) + * Store repository data in data path if not previously set (#13991) + * Rename "gitea" png to "logo" (#13974) + * Standardise logging of failed authentication attempts in internal SSH (#13962) + * Add markdown support in organization description (#13549) + * Improve users management through the CLI (#6001) (#10492) +* FEATURES + * Create a new issue with reference to lines of code from file view (#14863) + * Repository transfer has to be confirmed, if user can not create repo for new owner (#14792) + * Allow blocking some email domains from registering an account (#14667) + * Create a new issue based on reference to an issue comment (#14366) + * Add support to migrate from gogs (#14342) + * Add pager to the branches page (#14202) + * Minimal OpenID Connect implementation (#14139) + * Display current stopwatch in navbar (#14122) + * Display SVG files as images instead of text (#14101) + * Disable SSH key deletion of externally managed Keys (#13985) + * Add support for ed25519_sk and ecdsa_sk SSH keys (#13462) + * Add support for Mastodon OAuth2 provider (#13293) + * Add gitea sendmail command (#13079) + * Create DB session provider(based on xorm) (#13031) + * Add dismiss review feature (#12674) + * Make manual merge autodetection optional and add manual merge as merge method (#12543) + * Dump github/gitlab/gitea repository data to a local directory and restore to gitea (#12244) + * Create Rootless Docker image (#10154) +* API + * Speedup issue search (#15179) (#15192) + * Get pull, return head branch sha, even if deleted (#14931) + * Export LFS & TimeTracking function status (#14753) + * Show Gitea version in swagger (#14654) + * Fix PATCH /repos/{owner}/{repo} panic (#14637) + * Add Restricted Field to User (#14630) + * Add support for ref parameter to get raw file API (#14602) + * Add affected files of commits to commit struct (#14579) + * Fix CJK fonts again and misc. font issues (#14575) + * Add delete release by tag & delete tag (#14563) & (#13358) + * Add pagination to ListBranches (#14524) + * Add signoff option in commit form (#14516) + * GetRelease by tag only return release (#14397) + * Add MirrorInterval to the API (#14163) + * Make BasicAuth Prefix case insensitive (#14106) + * Add user filter to issueTrackedTimes, enable usage for issue managers (#14081) + * Add ref to create/edit issue options & deprecated assignee (#13992) + * Add Ref to Issue (#13946) + * Expose default theme in meta and API (#13809) + * Send error message when CSRF token is missing (#13676) + * List, Check, Add & delete endpoints for repository teams (#13630) + * Admin EditUser: Make FullName, Email, Website & Location optional (#13562) + * Add more filters to issues search (#13514) + * Add review request api (#11355) +* BUGFIXES + * Fix delete nonexist oauth application 500 and prevent deadlock (#15384) (#15396) + * Always set the merge base used to merge the commit (#15352) (#15385) + * Upgrade to bluemonday 1.0.7 (#15379) (#15380) + * Turn RepoRef and RepoAssignment back into func(*Context) (#15372) (#15377) + * Move FCGI req.URL.Path fix-up to the FCGI listener (#15292) (#15361) + * Show diff on rename with diff changes (#15338) (#15339) + * Fix handling of logout event (#15323) (#15337) + * Fix CanCreateRepo check (#15311) (#15321) + * Fix xorm log stack level (#15285) (#15316) + * Fix bug in Wrap (#15302) (#15309) + * Drop the event source if we are unauthorized (#15275) (#15280) + * Backport Fix graph pagination (#15225) (#15249) + * Prevent NPE in CommentMustAsDiff if no hunk header (#15199) (#15200) + * should run RetrieveRepoMetas() for empty pr (#15187) (#15190) + * Move setting to enable closing issue via commit in non default branch to repo settings (#14965) + * Show correct issues for team dashboard (#14952) + * Ensure that new pull request button works on forked forks owned by owner of the root and reduce ambiguity (#14932) + * Only allow issue labels from owner repository or organization (#14928) + * Fix alignment of People and Teams right arrow on org homepage (#14924) + * Fix overdue marking of closed issues and milestones (#14923) + * Prevent panic when empty MilestoneID in repo/issue/list (#14911) + * Fix migration context data (#14910) + * Handle URLs with trailing slash (#14852) + * Add CORS config on to /login/oauth/access_token endpoint (#14850) + * Make searching issues by keyword case insensitive on DB (#14848) + * Prevent use of double sub-path and incorrect asset path in manifest (#14827) + * Fix link account ui (#14763) + * Fix preview status switch button on wiki editor (#14742) + * Fix github download on migration (#14703) + * Fix svg spacing (#14638) + * Prevent adding nil label to .AddedLabels or .RemovedLabels (#14623) + * Truncated organizations name (#14615) + * Exclude the current dump file from the dump (#14606) + * Use OldRef instead of CommitSHA for DeleteBranch comments (#14604) + * Ensure memcache caching works when TTL greater than 30 days (#14592) + * Remove NULs byte arrays passed to PostProcess (#14587) + * Restore detection of branches are equal on compare page (#14586) + * Fix incorrect key name so registerManualConfirm works (#14455) + * Fix close/reopen with comment (#14436) + * Allow passcode invalid error to appear (#14371) + * Escape branch names in compare url (#14364) + * Label and milestone webhooks on issue/pull creation (#14363) + * Handle NotifyCreateRef as create branch in feeds (#14245) + * Prevent clipping input text in Chrome + Segoe UI Font (#14179) + * Fix UI on edit auth source page (#14137) + * Fix git.parseTagData (#14105) + * Refactor get tag to remove unnecessary steps (#14058) + * Fix integrations test error with space in CURDIR path (#14056) + * Dropdown triangle fixes (#14028) + * Fix label of --id in admin delete user (#14005) + * Cause NotifyMigrateRepository to emit a repo create webhook (#14004) + * Update HEAD to match defaultBranch in template generation (#13948) + * Fix action avatar loading (#13909) + * Fix issue participants (#13893) + * Fix avatar template error (#13833) + * Fix review request notification email links when external issue tracker is enabled (#13723) + * Fix blame line alignment (#13542) + * Include OriginalAuthor in Reaction constraint (#13505) + * Comments on review should have the same sha (#13448) + * Fix whitespace rendering in diff (#13415) + * Fixed git args duplication (#13411) + * Fix bug on release publisherid migrations (#13410) + * Fix --port setting (#13288) + * Keep database transactions not too big (#13254) + * Git version check, ignore pre-releases constraints (#13234) + * Handle and propagate errors when checking if paths are Dirs, Files or Exist (#13186) + * Update Mirror IsEmpty status on synchronize (#13185) + * Use GO variable in go-check target (#13146) (#13147) +* ENHANCEMENTS + * UI style improvements + * Dropzone styling improvements (#15291) (#15374) + * Add size to Save function (#15264) (#15270) + * Monaco improvements (#15333) (#15345) + * Support .mailmap in code activity stats (#15009) + * Sort release attachments by name (#15008) + * Add ui.explore settings to control view of explore pages (#14094) + * Make internal SSH server host key path configurable (#14918) + * Hide resync all ssh principals when using internal ssh server (#14904) + * Add SameSite setting for cookies (#14900) + * Move Bleve and Elastic code indexers to use a common cat-file --batch (#14781) + * Add environment-to-ini to docker image (#14762) + * Add preview support for wiki editor when disable simpleMDE (#14757) + * Add easyMDE(simpleMDE) support for release content editor (#14744) + * Organization removal confirmation using name not password (#14738) + * Make branch names in PR description clickable (#14716) + * Add Password Algorithm option to install page (#14701) + * Add fullTextSearch to dropdowns by default (#14694) + * Fix truncated organization names (#14655) + * Whitespace in commits (#14650) + * Sort / move project boards (#14634) + * Make fileheader sticky in diffs (#14616) + * Add helper descriptions on new repo page (#14591) + * Move the stopwatches to the eventsource stream (#14588) + * Add Content-Length header to HEAD requests (#14542) + * Add Image Diff options in Diff view (#14450) + * Improve Description in new/ edit Project template (#14429) + * Allow ssh-keygen on Windows to detect ssh key type (#14413) + * Display error if twofaSecret cannot be retrieved (#14372) + * Sort issue search results by revelance (#14353) + * Implement ghost comment mitigation (#14349) + * Upgrade blevesearch dependency to v2.0.1 (#14346) + * Add edit, delete and reaction support to code review comments on issue page (#14339) + * Merge default and system webhooks under one menu (#14244) + * Add option for administrator to reset user 2FA (#14243) + * Add option to change username to the admin panel (#14229) + * Check for 'main' as potential default branch name (#14193) + * Project: show referenced PRs in issue cards (#14183) + * Use caddy's certmagic library for extensible/robust ACME handling (#14177) + * CLI support for OAuth sources custom icons (#14166) + * Custom icons for OAuth sources (#14161) + * Team dashboards (#14159) + * KanBan: be able to set default board (#14147) + * Disable Fomantic's custom scrollbars (#14109) + * Add UI to delete tracked times (#14100) + * Rework heatmap permissions (#14080) + * Issue and pull request filters on organization dashboard (#14072) + * Fix webhook list styling (#14001) + * Show dropdown with all statuses for commit (#13977) + * Show status check for merged PRs (#13975) + * Diff stat improvements (#13954) + * Report permissions denied in internal SSH (#13953) + * Markdown task list improvements (#13952) + * Heatmap days clickable (#13935) + * chore: use octicon-mirror for feeds display (#13928) + * Move diff split code into own template file (#13919) + * Markdown: Enable wrapping in code blocks and a color tweak (#13894) + * Do not reload page after adding comments in Pull Request reviews (#13877) + * Add pull request manually merge instruction (#13840) + * add thumbnail preview section to issue attachments (#13826) + * Move Repo APIFormat to convert package (#13787) + * Move notification APIFormat (#13783) + * Swap swagger-ui with swagger-ui-dist (#13777) + * User Settings: Ignore empty language codes & validate (#13755) + * Improve migrate page and add card CSS (#13751) + * Add block on official review requests branch protection (#13705) + * Add review requested filter on pull request overview (#13701) + * Use chronological commit order in default squash message (#13696) + * Clickable links in pull request (and issue) titles (#13695) + * Support shortened commit SHAs in URLs (#13686) + * Use native git variants by default with go-git variants as build tag (#13673) + * Don't render dropdown when only 1 merge style is available (#13670) + * Move webhook type from int to string (#13664) + * Direct avatar rendering (#13649) + * Verify password for local-account activation (#13631) + * Prevent clone protocol button flash on page load (#13626) + * Remove fetch request from heatmap (#13623) + * Refactor combine label comments with tests (#13619) + * Move metrics from macaron to chi (#13601) + * Issue and Pulls lists rework (#13594) + * HTTP cache rework and enable caching for storage assets (#13569) + * Use mount but not register for chi routes (#13555) + * Use monaco for the git hook editor (#13552) + * Make heatmap colors more distinct (#13533) + * Lazy-load issue reviewers and assignees avatars (#13526) + * Change search and filter icons to SVG (#13473) + * Create tag on ui (#13467) + * updateSize when create a repo with init commit (#13441) + * Added title and action buttons to Project view page (#13437) + * Override fomantic monospace fonts and set size (#13435) + * Rework focused comment styling (#13434) + * Tags cleanup (#13428) + * Various style tweaks (#13418) + * Refactor push update (#13381) + * Comment box tweaks and SVG dropdown triangles (#13376) + * Various style fixes (#13372) + * Change repo home page icons to SVG (#13364) + * Use CSS Vars for primary color (#13361) + * Refactor image paste code (#13354) + * Switch from SimpleMDE to EasyMDE (#13333) + * Group Label Changed Comments in timeline (#13304) + * Make the logger an interface (#13294) + * Fix PR/Issue titles on mobile (#13292) + * Rearrange the order of the merged by etc. in locale (#13284) + * Replace footer and modal icons with SVG (#13245) + * Issues overview should not show issues from archived repos (#13220) + * Show stale label for stale code comment which is marked as resolved (#13213) + * Use CSS Variables for fonts, remove postcss-loader (#13204) + * Add mentionable teams to tributeValues and change team mention rules to gh's style (#13198) + * Move install pages out of main macaron routes (#13195) + * Update outdated label to use Fomantic UI style (#13181) + * Added option to disable webhooks (#13176) + * Change order of possible-owner organizations to alphabetical (#13160) + * Log IP on SSH authentication failure for Built-in SSH server (#13150) + * Added option to disable migrations (#13114) + * New "Add Mirror" Button in the Organization view (#13105) + * Manually approve new registration (#13083) + * Cron job to cleanup hook_task table (#13080) + * Use the headline comment of pull-request as the squash commit's message (#13071) + * Clarify the suffices and prefixes of setting.AppSubURL and setting.AppURL (#12999) + * Slightly simplify the queue settings code to help reduce the risk of problems (#12976) + * Add precise search type for Elastic Search (#12869) + * Move APIFormat functions into convert package (#12856) + * Multiple GitGraph improvements: Exclude PR heads, Add branch/PR links, Show only certain branches, (#12766) + * Add TrN for repository limit (#12492) + * Refactor doctor (#12264) + * Add the tag list page to the release page (#12096) + * Redirect on changed user and org name (#11649) + * load U2F js only on pages which need it (#11585) + * Make archival asynchronous (#11296) + * Introduce go chi web framework as frontend of macaron, so that we can move routes from macaron to chi step by step (#7420) + * Improve vfsgen to not unzip bindata files but send to browser directly (#7109) + * Enhance release list (#6025) +* DOCS + * Swagger show models by default (#14880) + * Add missing repo.projects unit into swagger (#14876) + * Update docs and comments to remove macaron (#14491) + * Issue template addition: Are you using Gitea behind CloudFlare? (#14098) + * Generate man pages (#13901) + * Reformat/fine-tune docs (#13897) + * Added Table of Contents to long documentation pages (#13890) + * Add docs command (#13429) + * Update external-renderers.en-us.md (#13165) +* MISC + * Add builds for apple M1 (darwin arm64) (#14951) + * Migrate to use jsoniter instead of encoding/json (#14841) + * Reduce make verbosity (#13803) + * Add git command error directory on log (#13194) + +## [1.13.7](https://github.com/go-gitea/gitea/releases/tag/v1.13.7) - 2021-04-07 + +* SECURITY + * Update to bluemonday-1.0.6 (#15294) (#15298) + * Clusterfuzz found another way (#15160) (#15169) +* API + * Fix wrong user returned in API (#15139) (#15150) +* BUGFIXES + * Add 'fonts' into 'KnownPublicEntries' (#15188) (#15317) + * Speed up `enry.IsVendor` (#15213) (#15246) + * Response 404 for diff/patch of a commit that not exist (#15221) (#15238) + * Prevent NPE in CommentMustAsDiff if no hunk header (#15199) (#15201) +* MISC + * Add size to Save function (#15264) (#15271) + +## [1.13.6](https://github.com/go-gitea/gitea/releases/tag/v1.13.6) - 2021-03-23 + +* SECURITY + * Fix bug on avatar middleware (#15124) (#15125) + * Fix another clusterfuzz identified issue (#15096) (#15114) +* API + * Fix nil exeption for get pull reviews API #15104 (#15106) +* BUGFIXES + * Fix markdown rendering in milestone content (#15056) (#15092) + +## [1.13.5](https://github.com/go-gitea/gitea/releases/tag/v1.13.5) - 2021-03-21 + +* SECURITY + * Update to goldmark 1.3.3 (#15059) (#15061) + * Another clusterfuzz spotted issue (#15032) (#15034) +* API + * Fix set milestone on PR creation (#14981) (#15001) + * Prevent panic when editing forked repos by API (#14960) (#14963) +* BUGFIXES + * Fix bug when upload on web (#15042) (#15055) + * Delete Labels & IssueLabels on Repo Delete too (#15039) (#15051) + * Fix postgres ID sequences broken by recreate-table (#15015) (#15029) + * Fix several render issues (#14986) (#15013) + * Make sure sibling images get a link too (#14979) (#14995) + * Fix Anchor jumping with escaped query components (#14969) (#14977) + * Fix release mail html template (#14976) + * Fix excluding more than two labels on issues list (#14962) (#14973) + * Don't mark each comment poster as OP (#14971) (#14972) + * Add "captcha" to list of reserved usernames (#14930) + * Re-enable import local paths after reversion from #13610 (#14925) (#14927) + +## [1.13.4](https://github.com/go-gitea/gitea/releases/tag/v1.13.4) - 2021-03-07 + +* SECURITY + * Fix issue popups (#14898) (#14899) +* BUGFIXES + * Fix race in LFS ContentStore.Put(...) (#14895) (#14913) + * Fix a couple of issues with a feeds (#14897) (#14903) + * When transfering repository and database transaction failed, rollback the renames (#14864) (#14902) + * Fix race in local storage (#14888) (#14901) + * Fix 500 on pull view page if user is not loged in (#14885) (#14886) +* DOCS + * Fix how lfs data path is set (#14855) (#14884) + +## [1.13.3](https://github.com/go-gitea/gitea/releases/tag/v1.13.3) - 2021-03-04 + +* BREAKING + * Turn default hash password algorithm back to pbkdf2 from argon2 until we find a better one (#14673) (#14675) +* BUGFIXES + * Fix paging of file commit logs (#14831) (#14879) + * Print useful error if SQLite is used in settings but not supported (#14476) (#14874) + * Fix display since time round (#14226) (#14873) + * When Deleting Repository only explicitly close PRs whose base is not this repository (#14823) (#14842) + * Set HCaptchaSiteKey on Link Account pages (#14834) (#14839) + * Fix a couple of CommentAsPatch issues. (#14804) (#14820) + * Disable broken OAuth2 providers at startup (#14802) (#14811) + * Repo Transfer permission checks (#14792) (#14794) + * Fix double alert in oauth2 application edit view (#14764) (#14768) + * Fix broken spans in diffs (#14678) (#14683) + * Prevent race in PersistableChannelUniqueQueue.Has (#14651) (#14676) + * HasPreviousCommit causes recursive load of commits unnecessarily (#14598) (#14649) + * Do not assume all 40 char strings are SHA1s (#14624) (#14648) + * Allow org labels to be set with issue templates (#14593) (#14647) + * Accept multiple SSH keys in single LDAP SSHPublicKey attribute (#13989) (#14607) + * Fix bug about ListOptions and stars/watchers pagnation (#14556) (#14573) + * Fix GPG key deletion during account deletion (#14561) (#14569) + +## [1.13.2](https://github.com/go-gitea/gitea/releases/tag/v1.13.2) - 2021-01-31 + +* SECURITY + * Prevent panic on fuzzer provided string (#14405) (#14409) + * Add secure/httpOnly attributes to the lang cookie (#14279) (#14280) +* API + * If release publisher is deleted use ghost user (#14375) +* BUGFIXES + * Internal ssh server respect Ciphers, MACs and KeyExchanges settings (#14523) (#14530) + * Set the name Mapper in migrations (#14526) (#14529) + * Fix wiki preview (#14515) + * Update code.gitea.io/sdk/gitea v0.13.1 -> v0.13.2 (#14497) + * ChangeUserName: rename user files back on DB issue (#14447) + * Fix lfs preview bug (#14428) (#14433) + * Ensure timeout error is shown on u2f timeout (#14417) (#14431) + * Fix Deadlock & Delete affected reactions on comment deletion (#14392) (#14425) + * Use path not filepath in routers/editor (#14390) (#14396) + * Check if label template exist first (#14384) (#14389) + * Fix migration v141 (#14387) (#14388) + * Use Request.URL.RequestURI() for fcgi (#14347) + * Use ServerError provided by Context (#14333) (#14345) + * Fix edit-label form init (#14337) + * Fix mailIssueCommentBatch for pull request (#14252) (#14296) + * Render links for commit hashes followed by comma (#14224) (#14227) + * Send notifications for mentions in pulls, issues, (code-)comments (#14218) (#14221) + * Fix avatar bugs (#14217) (#14220) + * Ensure that schema search path is set with every connection on postgres (#14131) (#14216) + * Fix dashboard issues labels filter bug (#14210) (#14214) + * When visit /favicon.ico but the static file is not exist return 404 but not continue to handle the route (#14211) (#14213) + * Fix branch selector on new issue page (#14194) (#14207) + * Check for notExist on profile repository page (#14197) (#14203) + ## [1.13.1](https://github.com/go-gitea/gitea/releases/tag/v1.13.1) - 2020-12-29 * SECURITY @@ -139,7 +956,7 @@ been added to each release, please refer to the [blog](https://blog.gitea.io). * Fix scrolling to resolved comment anchors (#13343) (#13371) * Storage configuration support `[storage]` (#13314) (#13379) * When creating line diffs do not split within an html entity (#13357) (#13375) (#13425) (#13427) - * Fix reactions on code comments (#13390) (#13401) + * Fix reactions on code comments (#13390) (#13401) * Add missing full names when DEFAULT_SHOW_FULL_NAME is enabled (#13424) * Replies to outdated code comments should also be outdated (#13217) (#13433) * Fix panic bug in handling multiple references in commit (#13486) (#13487) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f62c94c88..026536868 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,12 +3,14 @@ ## Table of Contents - [Contribution Guidelines](#contribution-guidelines) + - [Table of Contents](#table-of-contents) - [Introduction](#introduction) - [Bug reports](#bug-reports) - [Discuss your design](#discuss-your-design) - [Testing redux](#testing-redux) - [Vendoring](#vendoring) - [Translation](#translation) + - [Building Gitea](#building-gitea) - [Code review](#code-review) - [Styleguide](#styleguide) - [Design guideline](#design-guideline) @@ -205,6 +207,10 @@ In general, HTTP methods are chosen as follows: An endpoint which changes/edits an object expects all fields to be optional (except ones to identify the object, which are required). +### Endpoints returning lists should + * support pagination (`page` & `limit` options in query) + * set `X-Total-Count` header via **SetTotalCountHeader** ([example](https://github.com/go-gitea/gitea/blob/7aae98cc5d4113f1e9918b7ee7dd09f67c189e3e/routers/api/v1/repo/issue.go#L444)) + ## Developer Certificate of Origin (DCO) @@ -226,18 +232,18 @@ We assume in good faith that the information you provide is legally binding. We adopted a release schedule to streamline the process of working on, finishing, and issuing releases. The overall goal is to make a -minor release every two months, which breaks down into one month of +minor release every three or four months, which breaks down into two or three months of general development followed by one month of testing and polishing known as the release freeze. All the feature pull requests should be -merged in the first month of one release period. And, during the frozen -period, a corresponding release branch is open for fixes backported from -master. Release candidates are made during this period for user testing to +merged before feature freeze. And, during the frozen period, a corresponding +release branch is open for fixes backported from main branch. Release candidates +are made during this period for user testing to obtain a final version that is maintained in this branch. A release is maintained by issuing patch releases to only correct critical problems such as crashes or security issues. -Major release cycles are bimonthly. They always begin on the 25th and end on -the 24th (i.e., the 25th of December to February 24th). +Major release cycles are seasonal. They always begin on the 25th and end on +the 24th (i.e., the 25th of December to March 24th). During a development cycle, we may also publish any necessary minor releases for the previous version. For example, if the latest, published release is diff --git a/Dockerfile b/Dockerfile index 8800738bd..382f6f330 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ################################### #Build stage -FROM golang:1.15-alpine3.12 AS build-env +FROM golang:1.17-alpine3.13 AS build-env ARG GOPROXY ENV GOPROXY ${GOPROXY:-direct} @@ -22,7 +22,10 @@ WORKDIR ${GOPATH}/src/code.gitea.io/gitea RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \ && make clean-all build -FROM alpine:3.12 +# Begin env-to-ini build +RUN go build contrib/environment-to-ini/environment-to-ini.go + +FROM alpine:3.13 LABEL maintainer="maintainers@gitea.io" EXPOSE 22 3000 @@ -50,7 +53,7 @@ RUN addgroup \ -u 1000 \ -G git \ git && \ - echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd + echo "git:*" | chpasswd -e ENV USER git ENV GITEA_CUSTOM /data/gitea @@ -62,4 +65,5 @@ CMD ["/bin/s6-svscan", "/etc/s6"] COPY docker/root / COPY --from=build-env /go/src/code.gitea.io/gitea/gitea /app/gitea/gitea +COPY --from=build-env /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini RUN ln -s /app/gitea/gitea /usr/local/bin/gitea diff --git a/Dockerfile.rootless b/Dockerfile.rootless index 7dbd8b021..64dd12bb6 100644 --- a/Dockerfile.rootless +++ b/Dockerfile.rootless @@ -1,7 +1,7 @@ ################################### #Build stage -FROM golang:1.15-alpine3.12 AS build-env +FROM golang:1.17-alpine3.13 AS build-env ARG GOPROXY ENV GOPROXY ${GOPROXY:-direct} @@ -22,7 +22,10 @@ WORKDIR ${GOPATH}/src/code.gitea.io/gitea RUN if [ -n "${GITEA_VERSION}" ]; then git checkout "${GITEA_VERSION}"; fi \ && make clean-all build -FROM alpine:3.12 +# Begin env-to-ini build +RUN go build contrib/environment-to-ini/environment-to-ini.go + +FROM alpine:3.13 LABEL maintainer="maintainers@gitea.io" EXPOSE 2222 3000 @@ -32,6 +35,7 @@ RUN apk --no-cache add \ ca-certificates \ gettext \ git \ + curl \ gnupg RUN addgroup \ @@ -43,19 +47,22 @@ RUN addgroup \ -s /bin/bash \ -u 1000 \ -G git \ - git && \ - echo "git:$(dd if=/dev/urandom bs=24 count=1 status=none | base64)" | chpasswd + git RUN mkdir -p /var/lib/gitea /etc/gitea RUN chown git:git /var/lib/gitea /etc/gitea COPY docker/rootless / COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/gitea /usr/local/bin/gitea +COPY --from=build-env --chown=root:root /go/src/code.gitea.io/gitea/environment-to-ini /usr/local/bin/environment-to-ini -USER git:git +#git:git +USER 1000:1000 ENV GITEA_WORK_DIR /var/lib/gitea ENV GITEA_CUSTOM /var/lib/gitea/custom ENV GITEA_TEMP /tmp/gitea +ENV TMPDIR /tmp/gitea + #TODO add to docs the ability to define the ini to load (usefull to test and revert a config) ENV GITEA_APP_INI /etc/gitea/app.ini ENV HOME "/var/lib/gitea/git" diff --git a/MAINTAINERS b/MAINTAINERS index dadbb788a..f43ba5ab9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -39,3 +39,8 @@ David Svantesson (@davidsvantesson) a1012112796 <1012112796@qq.com> (@a1012112796) Karl Heinz Marbaise (@khmarbaise) Norwin Roosen (@noerw) +Kyle Dumont (@kdumontnu) +Patrick Schratz (@pat-s) +Janis Estelmann (@KN4CK3R) +Steven Kriegler (@justusbunsi) +Jimmy Praet (@jpraet) diff --git a/Makefile b/Makefile index dc8faf817..953d9348b 100644 --- a/Makefile +++ b/Makefile @@ -24,9 +24,9 @@ SHASUM ?= shasum -a 256 HAS_GO = $(shell hash $(GO) > /dev/null 2>&1 && echo "GO" || echo "NOGO" ) COMMA := , -XGO_VERSION := go-1.15.x -MIN_GO_VERSION := 001013000 -MIN_NODE_VERSION := 010013000 +XGO_VERSION := go-1.17.x +MIN_GO_VERSION := 001016000 +MIN_NODE_VERSION := 012017000 DOCKER_IMAGE ?= gitea/gitea DOCKER_TAG ?= latest @@ -43,6 +43,9 @@ endif ifeq ($(OS), Windows_NT) GOFLAGS := -v -buildmode=exe EXECUTABLE ?= gitea.exe +else ifeq ($(OS), Windows) + GOFLAGS := -v -buildmode=exe + EXECUTABLE ?= gitea.exe else GOFLAGS := -v EXECUTABLE ?= gitea @@ -61,8 +64,9 @@ EXTRA_GOFLAGS ?= MAKE_VERSION := $(shell $(MAKE) -v | head -n 1) MAKE_EVIDENCE_DIR := .make_evidence -ifneq ($(RACE_ENABLED),) - GOTESTFLAGS ?= -race +ifeq ($(RACE_ENABLED),true) + GOFLAGS += -race + GOTESTFLAGS += -race endif STORED_VERSION_FILE := VERSION @@ -74,7 +78,7 @@ else ifneq ($(DRONE_BRANCH),) VERSION ?= $(subst release/v,,$(DRONE_BRANCH)) else - VERSION ?= master + VERSION ?= main endif STORED_VERSION=$(shell cat $(STORED_VERSION_FILE) 2>/dev/null) @@ -87,11 +91,11 @@ endif LDFLAGS := $(LDFLAGS) -X "main.MakeVersion=$(MAKE_VERSION)" -X "main.Version=$(GITEA_VERSION)" -X "main.Tags=$(TAGS)" -GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/integrations/migration-test,$(filter-out code.gitea.io/gitea/integrations,$(shell $(GO) list -mod=vendor ./... | grep -v /vendor/))) +LINUX_ARCHS ?= linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64 -FOMANTIC_CONFIGS := semantic.json web_src/fomantic/theme.config.less web_src/fomantic/_site/globals/site.variables -FOMANTIC_DEST := web_src/fomantic/build/semantic.js web_src/fomantic/build/semantic.css -FOMANTIC_DEST_DIR := web_src/fomantic/build +GO_PACKAGES ?= $(filter-out code.gitea.io/gitea/models/migrations code.gitea.io/gitea/integrations/migration-test code.gitea.io/gitea/integrations,$(shell $(GO) list -mod=vendor ./... | grep -v /vendor/)) + +FOMANTIC_WORK_DIR := web_src/fomantic WEBPACK_SOURCES := $(shell find web_src/js web_src/less -type f) WEBPACK_CONFIGS := webpack.config.js @@ -111,6 +115,8 @@ TAGS_EVIDENCE := $(MAKE_EVIDENCE_DIR)/tags TEST_TAGS ?= sqlite sqlite_unlock_notify +TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) + GO_DIRS := cmd integrations models modules routers build services vendor tools GO_SOURCES := $(wildcard *.go) @@ -125,8 +131,8 @@ GO_SOURCES_OWN := $(filter-out vendor/% %/bindata.go, $(GO_SOURCES)) #To update swagger use: GO111MODULE=on go get -u github.com/go-swagger/go-swagger/cmd/swagger SWAGGER := $(GO) run -mod=vendor github.com/go-swagger/go-swagger/cmd/swagger SWAGGER_SPEC := templates/swagger/v1_json.tmpl -SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g -SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g +SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|g +SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl \| JSEscape \| Safe}}/api/v1"|"basePath": "/api/v1"|g SWAGGER_EXCLUDE := code.gitea.io/sdk SWAGGER_NEWLINE_COMMAND := -e '$$a\' @@ -169,6 +175,9 @@ help: @echo " - checks run various consistency checks" @echo " - checks-frontend check frontend files" @echo " - checks-backend check backend files" + @echo " - test test everything" + @echo " - test-frontend test frontend files" + @echo " - test-backend test backend files" @echo " - webpack build webpack files" @echo " - svg build svg files" @echo " - fomantic build fomantic files" @@ -176,6 +185,7 @@ help: @echo " - fmt format the Go code" @echo " - generate-license update license files" @echo " - generate-gitignore update gitignore files" + @echo " - generate-manpage generate manpage" @echo " - generate-swagger generate the swagger spec from code comments" @echo " - swagger-validate check if the swagger spec is valid" @echo " - golangci-lint run golangci-lint linter" @@ -190,7 +200,7 @@ help: go-check: $(eval GO_VERSION := $(shell printf "%03d%03d%03d" $(shell $(GO) version | grep -Eo '[0-9]+\.[0-9.]+' | tr '.' ' ');)) @if [ "$(GO_VERSION)" -lt "$(MIN_GO_VERSION)" ]; then \ - echo "Gitea requires Go 1.13 or greater to build. You can get it at https://golang.org/dl/"; \ + echo "Gitea requires Go 1.16 or greater to build. You can get it at https://golang.org/dl/"; \ exit 1; \ fi @@ -204,15 +214,16 @@ git-check: .PHONY: node-check node-check: $(eval NODE_VERSION := $(shell printf "%03d%03d%03d" $(shell node -v | cut -c2- | tr '.' ' ');)) + $(eval MIN_NODE_VER_FMT := $(shell printf "%g.%g.%g" $(shell echo $(MIN_NODE_VERSION) | grep -o ...))) $(eval NPM_MISSING := $(shell hash npm > /dev/null 2>&1 || echo 1)) @if [ "$(NODE_VERSION)" -lt "$(MIN_NODE_VERSION)" -o "$(NPM_MISSING)" = "1" ]; then \ - echo "Gitea requires Node.js 10 or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \ + echo "Gitea requires Node.js $(MIN_NODE_VER_FMT) or greater and npm to build. You can get it at https://nodejs.org/en/download/"; \ exit 1; \ fi .PHONY: clean-all clean-all: clean - rm -rf $(WEBPACK_DEST_ENTRIES) + rm -rf $(WEBPACK_DEST_ENTRIES) node_modules .PHONY: clean clean: @@ -221,7 +232,7 @@ clean: integrations*.test \ integrations/gitea-integration-pgsql/ integrations/gitea-integration-mysql/ integrations/gitea-integration-mysql8/ integrations/gitea-integration-sqlite/ \ integrations/gitea-integration-mssql/ integrations/indexers-mysql/ integrations/indexers-mysql8/ integrations/indexers-pgsql integrations/indexers-sqlite \ - integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini + integrations/indexers-mssql integrations/mysql.ini integrations/mysql8.ini integrations/pgsql.ini integrations/mssql.ini man/ .PHONY: fmt fmt: @@ -232,7 +243,7 @@ fmt: vet: @echo "Running go vet..." @$(GO) vet $(GO_PACKAGES) - @$(GO) build -mod=vendor code.gitea.io/gitea-vet + @GOOS= GOARCH= $(GO) build -mod=vendor code.gitea.io/gitea-vet @$(GO) vet -vettool=gitea-vet $(GO_PACKAGES) .PHONY: $(TAGS_EVIDENCE) @@ -275,7 +286,10 @@ errcheck: .PHONY: revive revive: - GO111MODULE=on $(GO) run -mod=vendor build/lint.go -config .revive.toml -exclude=./vendor/... ./... || exit 1 + @hash revive > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ + GO111MODULE=off $(GO) get -u github.com/mgechev/revive; \ + fi + @revive -config .revive.toml -exclude=./vendor/... ./... .PHONY: misspell-check misspell-check: @@ -283,7 +297,7 @@ misspell-check: GO111MODULE=off $(GO) get -u github.com/client9/misspell/cmd/misspell; \ fi @echo "Running misspell-check..." - @misspell -error -i unknwon,destory $(GO_SOURCES_OWN) + @misspell -error -i unknwon $(GO_SOURCES_OWN) .PHONY: misspell misspell: @@ -317,8 +331,9 @@ lint: lint-frontend lint-backend .PHONY: lint-frontend lint-frontend: node_modules - npx eslint --color --max-warnings=0 web_src/js build templates webpack.config.js + npx eslint --color --max-warnings=0 web_src/js build templates *.config.js npx stylelint --color --max-warnings=0 web_src/less + npx editorconfig-checker templates .PHONY: lint-backend lint-backend: golangci-lint revive vet @@ -340,16 +355,23 @@ watch-backend: go-check air -c .air.conf .PHONY: test -test: - @echo "Running go test with -tags '$(TEST_TAGS)'..." +test: test-frontend test-backend + +.PHONY: test-backend +test-backend: + @echo "Running go test with $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..." @$(GO) test $(GOTESTFLAGS) -mod=vendor -tags='$(TEST_TAGS)' $(GO_PACKAGES) +.PHONY: test-frontend +test-frontend: node_modules + @NODE_OPTIONS="--experimental-vm-modules --no-warnings" npx jest --color + .PHONY: test-check test-check: @echo "Running test-check..."; @diff=$$(git status -s); \ if [ -n "$$diff" ]; then \ - echo "make test has changed files in the source tree:"; \ + echo "make test-backend has changed files in the source tree:"; \ echo "$${diff}"; \ echo "You should change the tests to create these files in a temporary directory."; \ echo "Do not simply add these files to .gitignore"; \ @@ -359,15 +381,17 @@ test-check: .PHONY: test\#% test\#%: @echo "Running go test with -tags '$(TEST_TAGS)'..." - @$(GO) test -mod=vendor -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_PACKAGES) + @$(GO) test -mod=vendor $(GOTESTFLAGS) -tags='$(TEST_TAGS)' -run $(subst .,/,$*) $(GO_PACKAGES) .PHONY: coverage coverage: - GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage.out $(shell find . -type f -name "coverage.out") > coverage.all + grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' coverage.out > coverage-bodged.out + grep '^\(mode: .*\)\|\(.*:[0-9]\+\.[0-9]\+,[0-9]\+\.[0-9]\+ [0-9]\+ [0-9]\+\)$$' integration.coverage.out > integration.coverage-bodged.out + GO111MODULE=on $(GO) run -mod=vendor build/gocovmerge.go integration.coverage-bodged.out coverage-bodged.out > coverage.all || (echo "gocovmerge failed"; echo "integration.coverage.out"; cat integration.coverage.out; echo "coverage.out"; cat coverage.out; exit 1) .PHONY: unit-test-coverage unit-test-coverage: - @echo "Running unit-test-coverage -tags '$(TEST_TAGS)'..." + @echo "Running unit-test-coverage $(GOTESTFLAGS) -tags '$(TEST_TAGS)'..." @$(GO) test $(GOTESTFLAGS) -mod=vendor -tags='$(TEST_TAGS)' -cover -coverprofile coverage.out $(GO_PACKAGES) && echo "\n==>\033[32m Ok\033[m\n" || exit 1 .PHONY: vendor @@ -396,8 +420,9 @@ test-sqlite\#%: integrations.sqlite.test generate-ini-sqlite GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./integrations.sqlite.test -test.run $(subst .,/,$*) .PHONY: test-sqlite-migration -test-sqlite-migration: migrations.sqlite.test generate-ini-sqlite +test-sqlite-migration: migrations.sqlite.test migrations.individual.sqlite.test generate-ini-sqlite GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.sqlite.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/sqlite.ini ./migrations.individual.sqlite.test generate-ini-mysql: sed -e 's|{{TEST_MYSQL_HOST}}|${TEST_MYSQL_HOST}|g' \ @@ -416,8 +441,9 @@ test-mysql\#%: integrations.mysql.test generate-ini-mysql GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./integrations.mysql.test -test.run $(subst .,/,$*) .PHONY: test-mysql-migration -test-mysql-migration: migrations.mysql.test generate-ini-mysql +test-mysql-migration: migrations.mysql.test migrations.individual.mysql.test generate-ini-mysql GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.mysql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql.ini ./migrations.individual.mysql.test generate-ini-mysql8: sed -e 's|{{TEST_MYSQL8_HOST}}|${TEST_MYSQL8_HOST}|g' \ @@ -436,8 +462,9 @@ test-mysql8\#%: integrations.mysql8.test generate-ini-mysql8 GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./integrations.mysql8.test -test.run $(subst .,/,$*) .PHONY: test-mysql8-migration -test-mysql8-migration: migrations.mysql8.test generate-ini-mysql8 +test-mysql8-migration: migrations.mysql8.test migrations.individual.mysql8.test generate-ini-mysql8 GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.mysql8.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mysql8.ini ./migrations.individual.mysql8.test generate-ini-pgsql: sed -e 's|{{TEST_PGSQL_HOST}}|${TEST_PGSQL_HOST}|g' \ @@ -457,8 +484,9 @@ test-pgsql\#%: integrations.pgsql.test generate-ini-pgsql GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./integrations.pgsql.test -test.run $(subst .,/,$*) .PHONY: test-pgsql-migration -test-pgsql-migration: migrations.pgsql.test generate-ini-pgsql +test-pgsql-migration: migrations.pgsql.test migrations.individual.pgsql.test generate-ini-pgsql GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.pgsql.test + GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/pgsql.ini ./migrations.individual.pgsql.test generate-ini-mssql: sed -e 's|{{TEST_MSSQL_HOST}}|${TEST_MSSQL_HOST}|g' \ @@ -477,8 +505,9 @@ test-mssql\#%: integrations.mssql.test generate-ini-mssql GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./integrations.mssql.test -test.run $(subst .,/,$*) .PHONY: test-mssql-migration -test-mssql-migration: migrations.mssql.test generate-ini-mssql +test-mssql-migration: migrations.mssql.test migrations.individual.mssql.test generate-ini-mssql GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.mssql.test -test.failfast + GITEA_ROOT="$(CURDIR)" GITEA_CONF=integrations/mssql.ini ./migrations.individual.mssql.test -test.failfast .PHONY: bench-sqlite bench-sqlite: integrations.sqlite.test generate-ini-sqlite @@ -538,6 +567,26 @@ migrations.mssql.test: $(GO_SOURCES) migrations.sqlite.test: $(GO_SOURCES) $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/integrations/migration-test -o migrations.sqlite.test -tags '$(TEST_TAGS)' +.PHONY: migrations.individual.mysql.test +migrations.individual.mysql.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mysql.test + +.PHONY: migrations.individual.mysql8.test +migrations.individual.mysql8.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mysql8.test + +.PHONY: migrations.individual.pgsql.test +migrations.individual.pgsql.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.pgsql.test + +.PHONY: migrations.individual.mssql.test +migrations.individual.mssql.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.mssql.test + +.PHONY: migrations.individual.sqlite.test +migrations.individual.sqlite.test: $(GO_SOURCES) + $(GO) test $(GOTESTFLAGS) -c code.gitea.io/gitea/models/migrations -o migrations.individual.sqlite.test -tags '$(TEST_TAGS)' + .PHONY: check check: test @@ -549,7 +598,7 @@ install: $(wildcard *.go) build: frontend backend .PHONY: frontend -frontend: node-check $(WEBPACK_DEST) +frontend: $(WEBPACK_DEST) .PHONY: backend backend: go-check generate $(EXECUTABLE) @@ -571,10 +620,12 @@ $(DIST_DIRS): .PHONY: release-windows release-windows: | $(DIST_DIRS) @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ + $(GO) install src.techknowlogick.com/xgo@latest; \ fi - @echo "Warning: windows version is built using golang 1.14" - CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . + CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . +ifeq (,$(findstring gogit,$(TAGS))) + CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -buildmode exe -dest $(DIST)/binaries -tags 'netgo osusergo gogit $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION)-gogit . +endif ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -582,9 +633,9 @@ endif .PHONY: release-linux release-linux: | $(DIST_DIRS) @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ + $(GO) install src.techknowlogick.com/xgo@latest; \ fi - CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64' -out gitea-$(VERSION) . + CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets '$(LINUX_ARCHS)' -out gitea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -592,9 +643,9 @@ endif .PHONY: release-darwin release-darwin: | $(DIST_DIRS) @hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ - GO111MODULE=off $(GO) get -u src.techknowlogick.com/xgo; \ + $(GO) install src.techknowlogick.com/xgo@latest; \ fi - CGO_CFLAGS="$(CGO_CFLAGS)" GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) . + CGO_CFLAGS="$(CGO_CFLAGS)" xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin-10.12/amd64,darwin-10.12/arm64' -out gitea-$(VERSION) . ifeq ($(CI),drone) cp /build/* $(DIST)/binaries endif @@ -615,9 +666,11 @@ release-compress: | $(DIST_DIRS) cd $(DIST)/release/; for file in `find . -type f -name "*"`; do echo "compressing $${file}" && gxz -k -9 $${file}; done; .PHONY: release-sources -release-sources: | $(DIST_DIRS) node_modules +release-sources: | $(DIST_DIRS) echo $(VERSION) > $(STORED_VERSION_FILE) - tar --exclude=./$(DIST) --exclude=./.git --exclude=./$(MAKE_EVIDENCE_DIR) --exclude=./node_modules/.cache --exclude=./$(AIR_TMP_DIR) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz . +# bsdtar needs a ^ to prevent matching subdirectories + $(eval EXCL := --exclude=$(shell tar --help | grep -q bsdtar && echo "^")./) + tar $(addprefix $(EXCL),$(TAR_EXCLUDES)) -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz . rm -f $(STORED_VERSION_FILE) .PHONY: release-docs @@ -643,22 +696,20 @@ npm-update: node-check | node_modules @touch node_modules .PHONY: fomantic -fomantic: $(FOMANTIC_DEST) - -$(FOMANTIC_DEST): $(FOMANTIC_CONFIGS) | node_modules - @if [ ! -d node_modules/fomantic-ui ]; then \ - npm install --no-save --no-package-lock fomantic-ui@2.8.7; \ - fi - rm -rf $(FOMANTIC_DEST_DIR) - cp -f web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config - cp -rf web_src/fomantic/_site/* node_modules/fomantic-ui/src/_site/ - npx gulp -f node_modules/fomantic-ui/gulpfile.js build - @touch $(FOMANTIC_DEST) +fomantic: + rm -rf $(FOMANTIC_WORK_DIR)/build + cd $(FOMANTIC_WORK_DIR) && npm install --no-save + cp -f $(FOMANTIC_WORK_DIR)/theme.config.less $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/theme.config + cp -rf $(FOMANTIC_WORK_DIR)/_site $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/ + cp -f web_src/js/vendor/dropdown.js $(FOMANTIC_WORK_DIR)/node_modules/fomantic-ui/src/definitions/modules + cd $(FOMANTIC_WORK_DIR) && npx gulp -f node_modules/fomantic-ui/gulpfile.js build + rm -f $(FOMANTIC_WORK_DIR)/build/*.min.* .PHONY: webpack webpack: $(WEBPACK_DEST) -$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json | node_modules +$(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json + @$(MAKE) -s node-check node_modules rm -rf $(WEBPACK_DEST_ENTRIES) npx webpack @touch $(WEBPACK_DEST) @@ -697,10 +748,18 @@ generate-gitignore: GO111MODULE=on $(GO) run build/generate-gitignores.go .PHONY: generate-images -generate-images: - npm install --no-save --no-package-lock fabric imagemin-zopfli +generate-images: | node_modules + npm install --no-save --no-package-lock fabric@4 imagemin-zopfli@7 node build/generate-images.js $(TAGS) +.PHONY: generate-manpage +generate-manpage: + @[ -f gitea ] || make backend + @mkdir -p man/man1/ man/man5 + @./gitea docs --man > man/man1/gitea.1 + @gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created + @#TODO A smal script witch format config-cheat-sheet.en-us.md nicely to suit as config man page + .PHONY: pr\#% pr\#%: clean-all $(GO) run contrib/pr/checkout.go $* @@ -709,7 +768,7 @@ pr\#%: clean-all golangci-lint: @hash golangci-lint > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ export BINARY="golangci-lint"; \ - curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.31.0; \ + curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(GOPATH)/bin v1.37.0; \ fi golangci-lint run --timeout 10m diff --git a/README.md b/README.md index 8fd3f5f60..5e7ef1390 100644 --- a/README.md +++ b/README.md @@ -1,24 +1,21 @@

- Gitea + Gitea

Gitea - Git with a cup of tea

- + - - - - + - + @@ -42,6 +39,9 @@ + + +

@@ -73,14 +73,12 @@ or if sqlite support is required: The `build` target is split into two sub-targets: -- `make backend` which requires [Go 1.13](https://golang.org/dl/) or greater. -- `make frontend` which requires [Node.js 10.13](https://nodejs.org/en/download/) or greater. +- `make backend` which requires [Go 1.16](https://golang.org/dl/) or greater. +- `make frontend` which requires [Node.js 12.17](https://nodejs.org/en/download/) or greater and Internet connectivity to download npm dependencies. -If pre-built frontend files are present it is possible to only build the backend: +When building from the official source tarballs which include pre-built frontend files, the `frontend` target will not be triggered, making it possible to build without Node.js and Internet connectivity. - TAGS="bindata" make backend - -Parallelism is not supported for these targets, so please don't include `-j `. +Parallelism (`make -j `) is not supported. More info: https://docs.gitea.io/en-us/install-from-source/ @@ -100,6 +98,16 @@ NOTES: 1. **YOU MUST READ THE [CONTRIBUTORS GUIDE](CONTRIBUTING.md) BEFORE STARTING TO WORK ON A PULL REQUEST.** 2. If you have found a vulnerability in the project, please write privately to **security@gitea.io**. Thanks! +## Translating + +Translations are done through Crowdin. If you want to translate to a new language ask one of the managers in the Crowdin project to add a new language there. + +You can also just create an issue for adding a language or ask on discord on the #translation channel. If you need context or find some translation issues, you can leave a comment on the string or ask on Discord. For general translation questions there is a section in the docs. Currently a bit empty but we hope fo fill it as questions pop up. + +https://docs.gitea.io/en-us/translation-guidelines/ + +[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea) + ## Further information For more information and instructions about how to install Gitea, please look at our [documentation](https://docs.gitea.io/en-us/). @@ -149,7 +157,7 @@ We're [working on it](https://github.com/go-gitea/gitea/issues/1029). ## License This project is licensed under the MIT License. -See the [LICENSE](https://github.com/go-gitea/gitea/blob/master/LICENSE) file +See the [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) file for the full license text. ## Screenshots diff --git a/README_ZH.md b/README_ZH.md index cb3c7d64b..874383862 100644 --- a/README_ZH.md +++ b/README_ZH.md @@ -1,24 +1,21 @@

- Gitea + Gitea

Gitea - Git with a cup of tea

- + - - - - + - + @@ -42,6 +39,9 @@ + + +

@@ -68,6 +68,11 @@ Gitea 的首要目标是创建一个极易安装,运行非常快速,安装 Fork -> Patch -> Push -> Pull Request +## 翻译 + +多语言翻译是基于Crowdin进行的. +[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea) + ## 作者 * [Maintainers](https://github.com/orgs/go-gitea/people) @@ -76,7 +81,7 @@ Fork -> Patch -> Push -> Pull Request ## 授权许可 -本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/go-gitea/gitea/blob/master/LICENSE) 文件中。 +本项目采用 MIT 开源授权许可证,完整的授权说明已放置在 [LICENSE](https://github.com/go-gitea/gitea/blob/main/LICENSE) 文件中。 ## 截图 diff --git a/build.go b/build.go index ab57fb1d9..aa5614134 100644 --- a/build.go +++ b/build.go @@ -2,7 +2,8 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -//+build vendor +//go:build vendor +// +build vendor package main @@ -10,14 +11,6 @@ package main // These libraries will not be included in a normal compilation. import ( - // for lint - _ "github.com/mgechev/dots" - _ "github.com/mgechev/revive/formatter" - _ "github.com/mgechev/revive/lint" - _ "github.com/mgechev/revive/rule" - _ "github.com/mitchellh/go-homedir" - _ "github.com/pelletier/go-toml" - // for embed _ "github.com/shurcooL/vfsgen" diff --git a/build/generate-bindata.go b/build/generate-bindata.go index fa1669fcf..efd172f77 100644 --- a/build/generate-bindata.go +++ b/build/generate-bindata.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build ignore // +build ignore package main diff --git a/build/generate-emoji.go b/build/generate-emoji.go index 00d60acac..da4e12373 100644 --- a/build/generate-emoji.go +++ b/build/generate-emoji.go @@ -3,12 +3,12 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build ignore // +build ignore package main import ( - "encoding/json" "flag" "fmt" "go/format" @@ -20,6 +20,8 @@ import ( "strconv" "strings" "unicode/utf8" + + "code.gitea.io/gitea/modules/json" ) const ( @@ -174,7 +176,7 @@ func generate() ([]byte, error) { s = append(s, k) } else { // insert into slice after first element because all emoji that support skin tones - // have that modifer placed at this spot + // have that modifier placed at this spot s = append(s, "") copy(s[2:], s[1:]) s[1] = k diff --git a/build/generate-gitignores.go b/build/generate-gitignores.go index 846bb0763..d0b972e80 100644 --- a/build/generate-gitignores.go +++ b/build/generate-gitignores.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package main diff --git a/build/generate-images.js b/build/generate-images.js index c9108ce71..b6616810a 100755 --- a/build/generate-images.js +++ b/build/generate-images.js @@ -1,12 +1,12 @@ -#!/usr/bin/env node -'use strict'; - -const imageminZopfli = require('imagemin-zopfli'); -const Svgo = require('svgo'); -const {fabric} = require('fabric'); -const {readFile, writeFile} = require('fs').promises; -const {resolve} = require('path'); +import imageminZopfli from 'imagemin-zopfli'; +import {optimize, extendDefaultPlugins} from 'svgo'; +import {fabric} from 'fabric'; +import fs from 'fs'; +import {resolve, dirname} from 'path'; +import {fileURLToPath} from 'url'; +const {readFile, writeFile} = fs.promises; +const __dirname = dirname(fileURLToPath(import.meta.url)); const logoFile = resolve(__dirname, '../assets/logo.svg'); function exit(err) { @@ -24,14 +24,15 @@ function loadSvg(svg) { async function generate(svg, outputFile, {size, bg}) { if (outputFile.endsWith('.svg')) { - const svgo = new Svgo({ - plugins: [ - {removeDimensions: true}, - {addAttributesToSVGElement: {attributes: [{width: size}, {height: size}]}}, - ], + const {data} = optimize(svg, { + plugins: extendDefaultPlugins([ + 'removeDimensions', + { + name: 'addAttributesToSVGElement', + params: {attributes: [{width: size}, {height: size}]} + }, + ]), }); - - const {data} = await svgo.optimize(svg); await writeFile(outputFile, data); return; } diff --git a/build/generate-licenses.go b/build/generate-licenses.go index 9dd13adf9..4009a0351 100644 --- a/build/generate-licenses.go +++ b/build/generate-licenses.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore package main diff --git a/build/generate-svg.js b/build/generate-svg.js index 52d2c519e..f1704712f 100755 --- a/build/generate-svg.js +++ b/build/generate-svg.js @@ -1,11 +1,11 @@ -#!/usr/bin/env node -'use strict'; - -const fastGlob = require('fast-glob'); -const Svgo = require('svgo'); -const {resolve, parse} = require('path'); -const {readFile, writeFile, mkdir} = require('fs').promises; +import fastGlob from 'fast-glob'; +import {optimize} from 'svgo'; +import {resolve, parse, dirname} from 'path'; +import fs from 'fs'; +import {fileURLToPath} from 'url'; +const {readFile, writeFile, mkdir} = fs.promises; +const __dirname = dirname(fileURLToPath(import.meta.url)); const glob = (pattern) => fastGlob.sync(pattern, {cwd: resolve(__dirname), absolute: true}); const outputDir = resolve(__dirname, '../public/img/svg'); @@ -25,31 +25,15 @@ async function processFile(file, {prefix, fullName} = {}) { if (prefix === 'octicon') name = name.replace(/-[0-9]+$/, ''); // chop of '-16' on octicons } - const svgo = new Svgo({ + const {data} = optimize(await readFile(file, 'utf8'), { plugins: [ - {removeXMLNS: true}, - {removeDimensions: true}, - { - addClassesToSVGElement: { - classNames: [ - 'svg', - name, - ], - }, - }, - { - addAttributesToSVGElement: { - attributes: [ - {'width': '16'}, - {'height': '16'}, - {'aria-hidden': 'true'}, - ], - }, - }, + {name: 'preset-default'}, + {name: 'removeXMLNS'}, + {name: 'removeDimensions'}, + {name: 'addClassesToSVGElement', params: {classNames: ['svg', name]}}, + {name: 'addAttributesToSVGElement', params: {attributes: [{'width': '16'}, {'height': '16'}, {'aria-hidden': 'true'}]}}, ], }); - - const {data} = await svgo.optimize(await readFile(file, 'utf8')); await writeFile(resolve(outputDir, `${name}.svg`), data); } @@ -65,7 +49,7 @@ async function main() { await Promise.all([ ...processFiles('../node_modules/@primer/octicons/build/svg/*-16.svg', {prefix: 'octicon'}), ...processFiles('../web_src/svg/*.svg'), - ...processFiles('../assets/logo.svg', {fullName: 'gitea-gitea'}), + ...processFiles('../public/img/gitea.svg', {fullName: 'gitea-gitea'}), ]); } diff --git a/build/gocovmerge.go b/build/gocovmerge.go index 65d6f2cd6..6a1af5b58 100644 --- a/build/gocovmerge.go +++ b/build/gocovmerge.go @@ -6,6 +6,7 @@ // gocovmerge takes the results from multiple `go test -coverprofile` runs and // merges them into one profile +//go:build ignore // +build ignore package main @@ -108,7 +109,7 @@ func main() { for _, file := range flag.Args() { profiles, err := cover.ParseProfiles(file) if err != nil { - log.Fatalf("failed to parse profiles: %v", err) + log.Fatalf("failed to parse profile '%s': %v", file, err) } for _, p := range profiles { merged = addProfile(merged, p) diff --git a/build/lint.go b/build/lint.go deleted file mode 100644 index 60e93697a..000000000 --- a/build/lint.go +++ /dev/null @@ -1,325 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Copyright (c) 2018 Minko Gechev. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -// +build ignore - -package main - -import ( - "flag" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "strings" - - "github.com/mgechev/dots" - "github.com/mgechev/revive/formatter" - "github.com/mgechev/revive/lint" - "github.com/mgechev/revive/rule" - "github.com/mitchellh/go-homedir" - "github.com/pelletier/go-toml" -) - -func fail(err string) { - fmt.Fprintln(os.Stderr, err) - os.Exit(1) -} - -var defaultRules = []lint.Rule{ - &rule.VarDeclarationsRule{}, - &rule.PackageCommentsRule{}, - &rule.DotImportsRule{}, - &rule.BlankImportsRule{}, - &rule.ExportedRule{}, - &rule.VarNamingRule{}, - &rule.IndentErrorFlowRule{}, - &rule.IfReturnRule{}, - &rule.RangeRule{}, - &rule.ErrorfRule{}, - &rule.ErrorNamingRule{}, - &rule.ErrorStringsRule{}, - &rule.ReceiverNamingRule{}, - &rule.IncrementDecrementRule{}, - &rule.ErrorReturnRule{}, - &rule.UnexportedReturnRule{}, - &rule.TimeNamingRule{}, - &rule.ContextKeysType{}, - &rule.ContextAsArgumentRule{}, -} - -var allRules = append([]lint.Rule{ - &rule.ArgumentsLimitRule{}, - &rule.CyclomaticRule{}, - &rule.FileHeaderRule{}, - &rule.EmptyBlockRule{}, - &rule.SuperfluousElseRule{}, - &rule.ConfusingNamingRule{}, - &rule.GetReturnRule{}, - &rule.ModifiesParamRule{}, - &rule.ConfusingResultsRule{}, - &rule.DeepExitRule{}, - &rule.UnusedParamRule{}, - &rule.UnreachableCodeRule{}, - &rule.AddConstantRule{}, - &rule.FlagParamRule{}, - &rule.UnnecessaryStmtRule{}, - &rule.StructTagRule{}, - &rule.ModifiesValRecRule{}, - &rule.ConstantLogicalExprRule{}, - &rule.BoolLiteralRule{}, - &rule.RedefinesBuiltinIDRule{}, - &rule.ImportsBlacklistRule{}, - &rule.FunctionResultsLimitRule{}, - &rule.MaxPublicStructsRule{}, - &rule.RangeValInClosureRule{}, - &rule.RangeValAddress{}, - &rule.WaitGroupByValueRule{}, - &rule.AtomicRule{}, - &rule.EmptyLinesRule{}, - &rule.LineLengthLimitRule{}, - &rule.CallToGCRule{}, - &rule.DuplicatedImportsRule{}, - &rule.ImportShadowingRule{}, - &rule.BareReturnRule{}, - &rule.UnusedReceiverRule{}, - &rule.UnhandledErrorRule{}, - &rule.CognitiveComplexityRule{}, - &rule.StringOfIntRule{}, -}, defaultRules...) - -var allFormatters = []lint.Formatter{ - &formatter.Stylish{}, - &formatter.Friendly{}, - &formatter.JSON{}, - &formatter.NDJSON{}, - &formatter.Default{}, - &formatter.Unix{}, - &formatter.Checkstyle{}, - &formatter.Plain{}, -} - -func getFormatters() map[string]lint.Formatter { - result := map[string]lint.Formatter{} - for _, f := range allFormatters { - result[f.Name()] = f - } - return result -} - -func getLintingRules(config *lint.Config) []lint.Rule { - rulesMap := map[string]lint.Rule{} - for _, r := range allRules { - rulesMap[r.Name()] = r - } - - lintingRules := []lint.Rule{} - for name := range config.Rules { - rule, ok := rulesMap[name] - if !ok { - fail("cannot find rule: " + name) - } - lintingRules = append(lintingRules, rule) - } - - return lintingRules -} - -func parseConfig(path string) *lint.Config { - config := &lint.Config{} - file, err := ioutil.ReadFile(path) - if err != nil { - fail("cannot read the config file") - } - err = toml.Unmarshal(file, config) - if err != nil { - fail("cannot parse the config file: " + err.Error()) - } - return config -} - -func normalizeConfig(config *lint.Config) { - if config.Confidence == 0 { - config.Confidence = 0.8 - } - severity := config.Severity - if severity != "" { - for k, v := range config.Rules { - if v.Severity == "" { - v.Severity = severity - } - config.Rules[k] = v - } - for k, v := range config.Directives { - if v.Severity == "" { - v.Severity = severity - } - config.Directives[k] = v - } - } -} - -func getConfig() *lint.Config { - config := defaultConfig() - if configPath != "" { - config = parseConfig(configPath) - } - normalizeConfig(config) - return config -} - -func getFormatter() lint.Formatter { - formatters := getFormatters() - formatter := formatters["default"] - if formatterName != "" { - f, ok := formatters[formatterName] - if !ok { - fail("unknown formatter " + formatterName) - } - formatter = f - } - return formatter -} - -func buildDefaultConfigPath() string { - var result string - if homeDir, err := homedir.Dir(); err == nil { - result = filepath.Join(homeDir, "revive.toml") - if _, err := os.Stat(result); err != nil { - result = "" - } - } - - return result -} - -func defaultConfig() *lint.Config { - defaultConfig := lint.Config{ - Confidence: 0.0, - Severity: lint.SeverityWarning, - Rules: map[string]lint.RuleConfig{}, - } - for _, r := range defaultRules { - defaultConfig.Rules[r.Name()] = lint.RuleConfig{} - } - return &defaultConfig -} - -func normalizeSplit(strs []string) []string { - res := []string{} - for _, s := range strs { - t := strings.Trim(s, " \t") - if len(t) > 0 { - res = append(res, t) - } - } - return res -} - -func getPackages() [][]string { - globs := normalizeSplit(flag.Args()) - if len(globs) == 0 { - globs = append(globs, ".") - } - - packages, err := dots.ResolvePackages(globs, normalizeSplit(excludePaths)) - if err != nil { - fail(err.Error()) - } - - return packages -} - -type arrayFlags []string - -func (i *arrayFlags) String() string { - return strings.Join([]string(*i), " ") -} - -func (i *arrayFlags) Set(value string) error { - *i = append(*i, value) - return nil -} - -var configPath string -var excludePaths arrayFlags -var formatterName string -var help bool - -var originalUsage = flag.Usage - -func init() { - flag.Usage = func() { - originalUsage() - } - // command line help strings - const ( - configUsage = "path to the configuration TOML file, defaults to $HOME/revive.toml, if present (i.e. -config myconf.toml)" - excludeUsage = "list of globs which specify files to be excluded (i.e. -exclude foo/...)" - formatterUsage = "formatter to be used for the output (i.e. -formatter stylish)" - ) - - defaultConfigPath := buildDefaultConfigPath() - - flag.StringVar(&configPath, "config", defaultConfigPath, configUsage) - flag.Var(&excludePaths, "exclude", excludeUsage) - flag.StringVar(&formatterName, "formatter", "", formatterUsage) - flag.Parse() -} - -func main() { - config := getConfig() - formatter := getFormatter() - packages := getPackages() - - revive := lint.New(func(file string) ([]byte, error) { - return ioutil.ReadFile(file) - }) - - lintingRules := getLintingRules(config) - - failures, err := revive.Lint(packages, lintingRules, *config) - if err != nil { - fail(err.Error()) - } - - formatChan := make(chan lint.Failure) - exitChan := make(chan bool) - - var output string - go (func() { - output, err = formatter.Format(formatChan, *config) - if err != nil { - fail(err.Error()) - } - exitChan <- true - })() - - exitCode := 0 - for f := range failures { - if f.Confidence < config.Confidence { - continue - } - if exitCode == 0 { - exitCode = config.WarningCode - } - if c, ok := config.Rules[f.RuleName]; ok && c.Severity == lint.SeverityError { - exitCode = config.ErrorCode - } - if c, ok := config.Directives[f.RuleName]; ok && c.Severity == lint.SeverityError { - exitCode = config.ErrorCode - } - - formatChan <- f - } - - close(formatChan) - <-exitChan - if output != "" { - fmt.Println(output) - } - - os.Exit(exitCode) -} diff --git a/cmd/admin.go b/cmd/admin.go index 3ddf8eddf..94e78186c 100644 --- a/cmd/admin.go +++ b/cmd/admin.go @@ -14,13 +14,14 @@ import ( "text/tabwriter" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth/oauth2" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" pwd "code.gitea.io/gitea/modules/password" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/services/auth/source/oauth2" "github.com/urfave/cli" ) @@ -489,6 +490,10 @@ func runDeleteUser(c *cli.Context) error { return err } + if err := storage.Init(); err != nil { + return err + } + var err error var user *models.User if c.IsSet("email") { @@ -512,7 +517,7 @@ func runDeleteUser(c *cli.Context) error { return models.DeleteUser(user) } -func runRepoSyncReleases(c *cli.Context) error { +func runRepoSyncReleases(_ *cli.Context) error { if err := initDB(); err != nil { return err } @@ -578,21 +583,21 @@ func getReleaseCount(id int64) (int64, error) { ) } -func runRegenerateHooks(c *cli.Context) error { +func runRegenerateHooks(_ *cli.Context) error { if err := initDB(); err != nil { return err } return repo_module.SyncRepositoryHooks(graceful.GetManager().ShutdownContext()) } -func runRegenerateKeys(c *cli.Context) error { +func runRegenerateKeys(_ *cli.Context) error { if err := initDB(); err != nil { return err } return models.RewriteAllPublicKeys() } -func parseOAuth2Config(c *cli.Context) *models.OAuth2Config { +func parseOAuth2Config(c *cli.Context) *oauth2.Source { var customURLMapping *oauth2.CustomURLMapping if c.IsSet("use-custom-urls") { customURLMapping = &oauth2.CustomURLMapping{ @@ -604,7 +609,7 @@ func parseOAuth2Config(c *cli.Context) *models.OAuth2Config { } else { customURLMapping = nil } - return &models.OAuth2Config{ + return &oauth2.Source{ Provider: c.String("provider"), ClientID: c.String("key"), ClientSecret: c.String("secret"), @@ -620,10 +625,10 @@ func runAddOauth(c *cli.Context) error { } return models.CreateLoginSource(&models.LoginSource{ - Type: models.LoginOAuth2, - Name: c.String("name"), - IsActived: true, - Cfg: parseOAuth2Config(c), + Type: models.LoginOAuth2, + Name: c.String("name"), + IsActive: true, + Cfg: parseOAuth2Config(c), }) } @@ -641,7 +646,7 @@ func runUpdateOauth(c *cli.Context) error { return err } - oAuth2Config := source.OAuth2() + oAuth2Config := source.Cfg.(*oauth2.Source) if c.IsSet("name") { source.Name = c.String("name") @@ -723,7 +728,7 @@ func runListAuth(c *cli.Context) error { w := tabwriter.NewWriter(os.Stdout, c.Int("min-width"), c.Int("tab-width"), c.Int("padding"), padChar, flags) fmt.Fprintf(w, "ID\tName\tType\tEnabled\n") for _, source := range loginSources { - fmt.Fprintf(w, "%d\t%s\t%s\t%t\n", source.ID, source.Name, models.LoginNames[source.Type], source.IsActived) + fmt.Fprintf(w, "%d\t%s\t%s\t%t\n", source.ID, source.Name, models.LoginNames[source.Type], source.IsActive) } w.Flush() diff --git a/cmd/admin_auth_ldap.go b/cmd/admin_auth_ldap.go index 5ab64ec7d..4314930a3 100644 --- a/cmd/admin_auth_ldap.go +++ b/cmd/admin_auth_ldap.go @@ -9,7 +9,7 @@ import ( "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth/ldap" + "code.gitea.io/gitea/services/auth/source/ldap" "github.com/urfave/cli" ) @@ -172,7 +172,7 @@ func parseLoginSource(c *cli.Context, loginSource *models.LoginSource) { loginSource.Name = c.String("name") } if c.IsSet("not-active") { - loginSource.IsActived = !c.Bool("not-active") + loginSource.IsActive = !c.Bool("not-active") } if c.IsSet("synchronize-users") { loginSource.IsSyncEnabled = c.Bool("synchronize-users") @@ -180,70 +180,70 @@ func parseLoginSource(c *cli.Context, loginSource *models.LoginSource) { } // parseLdapConfig assigns values on config according to command line flags. -func parseLdapConfig(c *cli.Context, config *models.LDAPConfig) error { +func parseLdapConfig(c *cli.Context, config *ldap.Source) error { if c.IsSet("name") { - config.Source.Name = c.String("name") + config.Name = c.String("name") } if c.IsSet("host") { - config.Source.Host = c.String("host") + config.Host = c.String("host") } if c.IsSet("port") { - config.Source.Port = c.Int("port") + config.Port = c.Int("port") } if c.IsSet("security-protocol") { p, ok := findLdapSecurityProtocolByName(c.String("security-protocol")) if !ok { return fmt.Errorf("Unknown security protocol name: %s", c.String("security-protocol")) } - config.Source.SecurityProtocol = p + config.SecurityProtocol = p } if c.IsSet("skip-tls-verify") { - config.Source.SkipVerify = c.Bool("skip-tls-verify") + config.SkipVerify = c.Bool("skip-tls-verify") } if c.IsSet("bind-dn") { - config.Source.BindDN = c.String("bind-dn") + config.BindDN = c.String("bind-dn") } if c.IsSet("user-dn") { - config.Source.UserDN = c.String("user-dn") + config.UserDN = c.String("user-dn") } if c.IsSet("bind-password") { - config.Source.BindPassword = c.String("bind-password") + config.BindPassword = c.String("bind-password") } if c.IsSet("user-search-base") { - config.Source.UserBase = c.String("user-search-base") + config.UserBase = c.String("user-search-base") } if c.IsSet("username-attribute") { - config.Source.AttributeUsername = c.String("username-attribute") + config.AttributeUsername = c.String("username-attribute") } if c.IsSet("firstname-attribute") { - config.Source.AttributeName = c.String("firstname-attribute") + config.AttributeName = c.String("firstname-attribute") } if c.IsSet("surname-attribute") { - config.Source.AttributeSurname = c.String("surname-attribute") + config.AttributeSurname = c.String("surname-attribute") } if c.IsSet("email-attribute") { - config.Source.AttributeMail = c.String("email-attribute") + config.AttributeMail = c.String("email-attribute") } if c.IsSet("attributes-in-bind") { - config.Source.AttributesInBind = c.Bool("attributes-in-bind") + config.AttributesInBind = c.Bool("attributes-in-bind") } if c.IsSet("public-ssh-key-attribute") { - config.Source.AttributeSSHPublicKey = c.String("public-ssh-key-attribute") + config.AttributeSSHPublicKey = c.String("public-ssh-key-attribute") } if c.IsSet("page-size") { - config.Source.SearchPageSize = uint32(c.Uint("page-size")) + config.SearchPageSize = uint32(c.Uint("page-size")) } if c.IsSet("user-filter") { - config.Source.Filter = c.String("user-filter") + config.Filter = c.String("user-filter") } if c.IsSet("admin-filter") { - config.Source.AdminFilter = c.String("admin-filter") + config.AdminFilter = c.String("admin-filter") } if c.IsSet("restricted-filter") { - config.Source.RestrictedFilter = c.String("restricted-filter") + config.RestrictedFilter = c.String("restricted-filter") } if c.IsSet("allow-deactivate-all") { - config.Source.AllowDeactivateAll = c.Bool("allow-deactivate-all") + config.AllowDeactivateAll = c.Bool("allow-deactivate-all") } return nil } @@ -251,7 +251,7 @@ func parseLdapConfig(c *cli.Context, config *models.LDAPConfig) error { // findLdapSecurityProtocolByName finds security protocol by its name ignoring case. // It returns the value of the security protocol and if it was found. func findLdapSecurityProtocolByName(name string) (ldap.SecurityProtocol, bool) { - for i, n := range models.SecurityProtocolNames { + for i, n := range ldap.SecurityProtocolNames { if strings.EqualFold(name, n) { return i, true } @@ -289,17 +289,15 @@ func (a *authService) addLdapBindDn(c *cli.Context) error { } loginSource := &models.LoginSource{ - Type: models.LoginLDAP, - IsActived: true, // active by default - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Enabled: true, // always true - }, + Type: models.LoginLDAP, + IsActive: true, // active by default + Cfg: &ldap.Source{ + Enabled: true, // always true }, } parseLoginSource(c, loginSource) - if err := parseLdapConfig(c, loginSource.LDAP()); err != nil { + if err := parseLdapConfig(c, loginSource.Cfg.(*ldap.Source)); err != nil { return err } @@ -318,7 +316,7 @@ func (a *authService) updateLdapBindDn(c *cli.Context) error { } parseLoginSource(c, loginSource) - if err := parseLdapConfig(c, loginSource.LDAP()); err != nil { + if err := parseLdapConfig(c, loginSource.Cfg.(*ldap.Source)); err != nil { return err } @@ -336,17 +334,15 @@ func (a *authService) addLdapSimpleAuth(c *cli.Context) error { } loginSource := &models.LoginSource{ - Type: models.LoginDLDAP, - IsActived: true, // active by default - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Enabled: true, // always true - }, + Type: models.LoginDLDAP, + IsActive: true, // active by default + Cfg: &ldap.Source{ + Enabled: true, // always true }, } parseLoginSource(c, loginSource) - if err := parseLdapConfig(c, loginSource.LDAP()); err != nil { + if err := parseLdapConfig(c, loginSource.Cfg.(*ldap.Source)); err != nil { return err } @@ -365,7 +361,7 @@ func (a *authService) updateLdapSimpleAuth(c *cli.Context) error { } parseLoginSource(c, loginSource) - if err := parseLdapConfig(c, loginSource.LDAP()); err != nil { + if err := parseLdapConfig(c, loginSource.Cfg.(*ldap.Source)); err != nil { return err } diff --git a/cmd/admin_auth_ldap_test.go b/cmd/admin_auth_ldap_test.go index 87f4f789a..692b11e3f 100644 --- a/cmd/admin_auth_ldap_test.go +++ b/cmd/admin_auth_ldap_test.go @@ -8,7 +8,7 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth/ldap" + "code.gitea.io/gitea/services/auth/source/ldap" "github.com/stretchr/testify/assert" "github.com/urfave/cli" @@ -54,30 +54,28 @@ func TestAddLdapBindDn(t *testing.T) { loginSource: &models.LoginSource{ Type: models.LoginLDAP, Name: "ldap (via Bind DN) source full", - IsActived: false, + IsActive: false, IsSyncEnabled: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (via Bind DN) source full", - Host: "ldap-bind-server full", - Port: 9876, - SecurityProtocol: ldap.SecurityProtocol(1), - SkipVerify: true, - BindDN: "cn=readonly,dc=full-domain-bind,dc=org", - BindPassword: "secret-bind-full", - UserBase: "ou=Users,dc=full-domain-bind,dc=org", - AttributeUsername: "uid-bind full", - AttributeName: "givenName-bind full", - AttributeSurname: "sn-bind full", - AttributeMail: "mail-bind full", - AttributesInBind: true, - AttributeSSHPublicKey: "publickey-bind full", - SearchPageSize: 99, - Filter: "(memberOf=cn=user-group,ou=example,dc=full-domain-bind,dc=org)", - AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-bind,dc=org)", - RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-bind,dc=org)", - Enabled: true, - }, + Cfg: &ldap.Source{ + Name: "ldap (via Bind DN) source full", + Host: "ldap-bind-server full", + Port: 9876, + SecurityProtocol: ldap.SecurityProtocol(1), + SkipVerify: true, + BindDN: "cn=readonly,dc=full-domain-bind,dc=org", + BindPassword: "secret-bind-full", + UserBase: "ou=Users,dc=full-domain-bind,dc=org", + AttributeUsername: "uid-bind full", + AttributeName: "givenName-bind full", + AttributeSurname: "sn-bind full", + AttributeMail: "mail-bind full", + AttributesInBind: true, + AttributeSSHPublicKey: "publickey-bind full", + SearchPageSize: 99, + Filter: "(memberOf=cn=user-group,ou=example,dc=full-domain-bind,dc=org)", + AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-bind,dc=org)", + RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-bind,dc=org)", + Enabled: true, }, }, }, @@ -94,20 +92,18 @@ func TestAddLdapBindDn(t *testing.T) { "--email-attribute", "mail-bind min", }, loginSource: &models.LoginSource{ - Type: models.LoginLDAP, - Name: "ldap (via Bind DN) source min", - IsActived: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (via Bind DN) source min", - Host: "ldap-bind-server min", - Port: 1234, - SecurityProtocol: ldap.SecurityProtocol(0), - UserBase: "ou=Users,dc=min-domain-bind,dc=org", - AttributeMail: "mail-bind min", - Filter: "(memberOf=cn=user-group,ou=example,dc=min-domain-bind,dc=org)", - Enabled: true, - }, + Type: models.LoginLDAP, + Name: "ldap (via Bind DN) source min", + IsActive: true, + Cfg: &ldap.Source{ + Name: "ldap (via Bind DN) source min", + Host: "ldap-bind-server min", + Port: 1234, + SecurityProtocol: ldap.SecurityProtocol(0), + UserBase: "ou=Users,dc=min-domain-bind,dc=org", + AttributeMail: "mail-bind min", + Filter: "(memberOf=cn=user-group,ou=example,dc=min-domain-bind,dc=org)", + Enabled: true, }, }, }, @@ -276,28 +272,26 @@ func TestAddLdapSimpleAuth(t *testing.T) { "--user-dn", "cn=%s,ou=Users,dc=full-domain-simple,dc=org", }, loginSource: &models.LoginSource{ - Type: models.LoginDLDAP, - Name: "ldap (simple auth) source full", - IsActived: false, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (simple auth) source full", - Host: "ldap-simple-server full", - Port: 987, - SecurityProtocol: ldap.SecurityProtocol(2), - SkipVerify: true, - UserDN: "cn=%s,ou=Users,dc=full-domain-simple,dc=org", - UserBase: "ou=Users,dc=full-domain-simple,dc=org", - AttributeUsername: "uid-simple full", - AttributeName: "givenName-simple full", - AttributeSurname: "sn-simple full", - AttributeMail: "mail-simple full", - AttributeSSHPublicKey: "publickey-simple full", - Filter: "(&(objectClass=posixAccount)(full-simple-cn=%s))", - AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-simple,dc=org)", - RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-simple,dc=org)", - Enabled: true, - }, + Type: models.LoginDLDAP, + Name: "ldap (simple auth) source full", + IsActive: false, + Cfg: &ldap.Source{ + Name: "ldap (simple auth) source full", + Host: "ldap-simple-server full", + Port: 987, + SecurityProtocol: ldap.SecurityProtocol(2), + SkipVerify: true, + UserDN: "cn=%s,ou=Users,dc=full-domain-simple,dc=org", + UserBase: "ou=Users,dc=full-domain-simple,dc=org", + AttributeUsername: "uid-simple full", + AttributeName: "givenName-simple full", + AttributeSurname: "sn-simple full", + AttributeMail: "mail-simple full", + AttributeSSHPublicKey: "publickey-simple full", + Filter: "(&(objectClass=posixAccount)(full-simple-cn=%s))", + AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-simple,dc=org)", + RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-simple,dc=org)", + Enabled: true, }, }, }, @@ -314,20 +308,18 @@ func TestAddLdapSimpleAuth(t *testing.T) { "--user-dn", "cn=%s,ou=Users,dc=min-domain-simple,dc=org", }, loginSource: &models.LoginSource{ - Type: models.LoginDLDAP, - Name: "ldap (simple auth) source min", - IsActived: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (simple auth) source min", - Host: "ldap-simple-server min", - Port: 123, - SecurityProtocol: ldap.SecurityProtocol(0), - UserDN: "cn=%s,ou=Users,dc=min-domain-simple,dc=org", - AttributeMail: "mail-simple min", - Filter: "(&(objectClass=posixAccount)(min-simple-cn=%s))", - Enabled: true, - }, + Type: models.LoginDLDAP, + Name: "ldap (simple auth) source min", + IsActive: true, + Cfg: &ldap.Source{ + Name: "ldap (simple auth) source min", + Host: "ldap-simple-server min", + Port: 123, + SecurityProtocol: ldap.SecurityProtocol(0), + UserDN: "cn=%s,ou=Users,dc=min-domain-simple,dc=org", + AttributeMail: "mail-simple min", + Filter: "(&(objectClass=posixAccount)(min-simple-cn=%s))", + Enabled: true, }, }, }, @@ -516,41 +508,37 @@ func TestUpdateLdapBindDn(t *testing.T) { }, id: 23, existingLoginSource: &models.LoginSource{ - Type: models.LoginLDAP, - IsActived: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Enabled: true, - }, + Type: models.LoginLDAP, + IsActive: true, + Cfg: &ldap.Source{ + Enabled: true, }, }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, Name: "ldap (via Bind DN) source full", - IsActived: false, + IsActive: false, IsSyncEnabled: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (via Bind DN) source full", - Host: "ldap-bind-server full", - Port: 9876, - SecurityProtocol: ldap.SecurityProtocol(1), - SkipVerify: true, - BindDN: "cn=readonly,dc=full-domain-bind,dc=org", - BindPassword: "secret-bind-full", - UserBase: "ou=Users,dc=full-domain-bind,dc=org", - AttributeUsername: "uid-bind full", - AttributeName: "givenName-bind full", - AttributeSurname: "sn-bind full", - AttributeMail: "mail-bind full", - AttributesInBind: false, - AttributeSSHPublicKey: "publickey-bind full", - SearchPageSize: 99, - Filter: "(memberOf=cn=user-group,ou=example,dc=full-domain-bind,dc=org)", - AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-bind,dc=org)", - RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-bind,dc=org)", - Enabled: true, - }, + Cfg: &ldap.Source{ + Name: "ldap (via Bind DN) source full", + Host: "ldap-bind-server full", + Port: 9876, + SecurityProtocol: ldap.SecurityProtocol(1), + SkipVerify: true, + BindDN: "cn=readonly,dc=full-domain-bind,dc=org", + BindPassword: "secret-bind-full", + UserBase: "ou=Users,dc=full-domain-bind,dc=org", + AttributeUsername: "uid-bind full", + AttributeName: "givenName-bind full", + AttributeSurname: "sn-bind full", + AttributeMail: "mail-bind full", + AttributesInBind: false, + AttributeSSHPublicKey: "publickey-bind full", + SearchPageSize: 99, + Filter: "(memberOf=cn=user-group,ou=example,dc=full-domain-bind,dc=org)", + AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-bind,dc=org)", + RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-bind,dc=org)", + Enabled: true, }, }, }, @@ -562,9 +550,7 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Cfg: &ldap.Source{}, }, }, // case 2 @@ -577,10 +563,8 @@ func TestUpdateLdapBindDn(t *testing.T) { loginSource: &models.LoginSource{ Type: models.LoginLDAP, Name: "ldap (via Bind DN) source", - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (via Bind DN) source", - }, + Cfg: &ldap.Source{ + Name: "ldap (via Bind DN) source", }, }, }, @@ -592,18 +576,14 @@ func TestUpdateLdapBindDn(t *testing.T) { "--not-active", }, existingLoginSource: &models.LoginSource{ - Type: models.LoginLDAP, - IsActived: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Type: models.LoginLDAP, + IsActive: true, + Cfg: &ldap.Source{}, }, loginSource: &models.LoginSource{ - Type: models.LoginLDAP, - IsActived: false, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Type: models.LoginLDAP, + IsActive: false, + Cfg: &ldap.Source{}, }, }, // case 4 @@ -615,10 +595,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - SecurityProtocol: ldap.SecurityProtocol(1), - }, + Cfg: &ldap.Source{ + SecurityProtocol: ldap.SecurityProtocol(1), }, }, }, @@ -631,10 +609,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - SkipVerify: true, - }, + Cfg: &ldap.Source{ + SkipVerify: true, }, }, }, @@ -647,10 +623,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Host: "ldap-server", - }, + Cfg: &ldap.Source{ + Host: "ldap-server", }, }, }, @@ -663,10 +637,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Port: 389, - }, + Cfg: &ldap.Source{ + Port: 389, }, }, }, @@ -679,10 +651,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - UserBase: "ou=Users,dc=domain,dc=org", - }, + Cfg: &ldap.Source{ + UserBase: "ou=Users,dc=domain,dc=org", }, }, }, @@ -695,10 +665,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Filter: "(memberOf=cn=user-group,ou=example,dc=domain,dc=org)", - }, + Cfg: &ldap.Source{ + Filter: "(memberOf=cn=user-group,ou=example,dc=domain,dc=org)", }, }, }, @@ -711,10 +679,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=domain,dc=org)", - }, + Cfg: &ldap.Source{ + AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=domain,dc=org)", }, }, }, @@ -727,10 +693,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeUsername: "uid", - }, + Cfg: &ldap.Source{ + AttributeUsername: "uid", }, }, }, @@ -743,10 +707,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeName: "givenName", - }, + Cfg: &ldap.Source{ + AttributeName: "givenName", }, }, }, @@ -759,10 +721,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeSurname: "sn", - }, + Cfg: &ldap.Source{ + AttributeSurname: "sn", }, }, }, @@ -775,10 +735,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeMail: "mail", - }, + Cfg: &ldap.Source{ + AttributeMail: "mail", }, }, }, @@ -791,10 +749,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributesInBind: true, - }, + Cfg: &ldap.Source{ + AttributesInBind: true, }, }, }, @@ -807,10 +763,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeSSHPublicKey: "publickey", - }, + Cfg: &ldap.Source{ + AttributeSSHPublicKey: "publickey", }, }, }, @@ -823,10 +777,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - BindDN: "cn=readonly,dc=domain,dc=org", - }, + Cfg: &ldap.Source{ + BindDN: "cn=readonly,dc=domain,dc=org", }, }, }, @@ -839,10 +791,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - BindPassword: "secret", - }, + Cfg: &ldap.Source{ + BindPassword: "secret", }, }, }, @@ -856,9 +806,7 @@ func TestUpdateLdapBindDn(t *testing.T) { loginSource: &models.LoginSource{ Type: models.LoginLDAP, IsSyncEnabled: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Cfg: &ldap.Source{}, }, }, // case 20 @@ -870,10 +818,8 @@ func TestUpdateLdapBindDn(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - SearchPageSize: 12, - }, + Cfg: &ldap.Source{ + SearchPageSize: 12, }, }, }, @@ -901,9 +847,7 @@ func TestUpdateLdapBindDn(t *testing.T) { }, existingLoginSource: &models.LoginSource{ Type: models.LoginOAuth2, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Cfg: &ldap.Source{}, }, errMsg: "Invalid authentication type. expected: LDAP (via BindDN), actual: OAuth2", }, @@ -933,9 +877,7 @@ func TestUpdateLdapBindDn(t *testing.T) { } return &models.LoginSource{ Type: models.LoginLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Cfg: &ldap.Source{}, }, nil }, } @@ -994,27 +936,25 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, id: 7, loginSource: &models.LoginSource{ - Type: models.LoginDLDAP, - Name: "ldap (simple auth) source full", - IsActived: false, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (simple auth) source full", - Host: "ldap-simple-server full", - Port: 987, - SecurityProtocol: ldap.SecurityProtocol(2), - SkipVerify: true, - UserDN: "cn=%s,ou=Users,dc=full-domain-simple,dc=org", - UserBase: "ou=Users,dc=full-domain-simple,dc=org", - AttributeUsername: "uid-simple full", - AttributeName: "givenName-simple full", - AttributeSurname: "sn-simple full", - AttributeMail: "mail-simple full", - AttributeSSHPublicKey: "publickey-simple full", - Filter: "(&(objectClass=posixAccount)(full-simple-cn=%s))", - AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-simple,dc=org)", - RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-simple,dc=org)", - }, + Type: models.LoginDLDAP, + Name: "ldap (simple auth) source full", + IsActive: false, + Cfg: &ldap.Source{ + Name: "ldap (simple auth) source full", + Host: "ldap-simple-server full", + Port: 987, + SecurityProtocol: ldap.SecurityProtocol(2), + SkipVerify: true, + UserDN: "cn=%s,ou=Users,dc=full-domain-simple,dc=org", + UserBase: "ou=Users,dc=full-domain-simple,dc=org", + AttributeUsername: "uid-simple full", + AttributeName: "givenName-simple full", + AttributeSurname: "sn-simple full", + AttributeMail: "mail-simple full", + AttributeSSHPublicKey: "publickey-simple full", + Filter: "(&(objectClass=posixAccount)(full-simple-cn=%s))", + AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=full-domain-simple,dc=org)", + RestrictedFilter: "(memberOf=cn=restricted-group,ou=example,dc=full-domain-simple,dc=org)", }, }, }, @@ -1026,9 +966,7 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Cfg: &ldap.Source{}, }, }, // case 2 @@ -1041,10 +979,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { loginSource: &models.LoginSource{ Type: models.LoginDLDAP, Name: "ldap (simple auth) source", - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Name: "ldap (simple auth) source", - }, + Cfg: &ldap.Source{ + Name: "ldap (simple auth) source", }, }, }, @@ -1056,18 +992,14 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { "--not-active", }, existingLoginSource: &models.LoginSource{ - Type: models.LoginDLDAP, - IsActived: true, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Type: models.LoginDLDAP, + IsActive: true, + Cfg: &ldap.Source{}, }, loginSource: &models.LoginSource{ - Type: models.LoginDLDAP, - IsActived: false, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Type: models.LoginDLDAP, + IsActive: false, + Cfg: &ldap.Source{}, }, }, // case 4 @@ -1079,10 +1011,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - SecurityProtocol: ldap.SecurityProtocol(2), - }, + Cfg: &ldap.Source{ + SecurityProtocol: ldap.SecurityProtocol(2), }, }, }, @@ -1095,10 +1025,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - SkipVerify: true, - }, + Cfg: &ldap.Source{ + SkipVerify: true, }, }, }, @@ -1111,10 +1039,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Host: "ldap-server", - }, + Cfg: &ldap.Source{ + Host: "ldap-server", }, }, }, @@ -1127,10 +1053,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Port: 987, - }, + Cfg: &ldap.Source{ + Port: 987, }, }, }, @@ -1143,10 +1067,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - UserBase: "ou=Users,dc=domain,dc=org", - }, + Cfg: &ldap.Source{ + UserBase: "ou=Users,dc=domain,dc=org", }, }, }, @@ -1159,10 +1081,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - Filter: "(&(objectClass=posixAccount)(cn=%s))", - }, + Cfg: &ldap.Source{ + Filter: "(&(objectClass=posixAccount)(cn=%s))", }, }, }, @@ -1175,10 +1095,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=domain,dc=org)", - }, + Cfg: &ldap.Source{ + AdminFilter: "(memberOf=cn=admin-group,ou=example,dc=domain,dc=org)", }, }, }, @@ -1191,10 +1109,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeUsername: "uid", - }, + Cfg: &ldap.Source{ + AttributeUsername: "uid", }, }, }, @@ -1207,10 +1123,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeName: "givenName", - }, + Cfg: &ldap.Source{ + AttributeName: "givenName", }, }, }, @@ -1223,10 +1137,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeSurname: "sn", - }, + Cfg: &ldap.Source{ + AttributeSurname: "sn", }, }, }, @@ -1239,10 +1151,9 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeMail: "mail", - }, + Cfg: &ldap.Source{ + + AttributeMail: "mail", }, }, }, @@ -1255,10 +1166,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - AttributeSSHPublicKey: "publickey", - }, + Cfg: &ldap.Source{ + AttributeSSHPublicKey: "publickey", }, }, }, @@ -1271,10 +1180,8 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, loginSource: &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{ - UserDN: "cn=%s,ou=Users,dc=domain,dc=org", - }, + Cfg: &ldap.Source{ + UserDN: "cn=%s,ou=Users,dc=domain,dc=org", }, }, }, @@ -1302,9 +1209,7 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { }, existingLoginSource: &models.LoginSource{ Type: models.LoginPAM, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Cfg: &ldap.Source{}, }, errMsg: "Invalid authentication type. expected: LDAP (simple auth), actual: PAM", }, @@ -1334,9 +1239,7 @@ func TestUpdateLdapSimpleAuth(t *testing.T) { } return &models.LoginSource{ Type: models.LoginDLDAP, - Cfg: &models.LDAPConfig{ - Source: &ldap.Source{}, - }, + Cfg: &ldap.Source{}, }, nil }, } diff --git a/cmd/cmd.go b/cmd/cmd.go index bb768cc15..8d9d1ee07 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -7,9 +7,13 @@ package cmd import ( + "context" "errors" "fmt" + "os" + "os/signal" "strings" + "syscall" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/setting" @@ -66,3 +70,25 @@ func initDBDisableConsole(disableConsole bool) error { } return nil } + +func installSignals() (context.Context, context.CancelFunc) { + ctx, cancel := context.WithCancel(context.Background()) + go func() { + // install notify + signalChannel := make(chan os.Signal, 1) + + signal.Notify( + signalChannel, + syscall.SIGINT, + syscall.SIGTERM, + ) + select { + case <-signalChannel: + case <-ctx.Done(): + } + cancel() + signal.Reset() + }() + + return ctx, cancel +} diff --git a/cmd/convert.go b/cmd/convert.go index 23a3d8dbe..e2ffd403a 100644 --- a/cmd/convert.go +++ b/cmd/convert.go @@ -27,10 +27,10 @@ func runConvert(ctx *cli.Context) error { return err } - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) + log.Info("AppPath: %s", setting.AppPath) + log.Info("AppWorkPath: %s", setting.AppWorkPath) + log.Info("Custom path: %s", setting.CustomPath) + log.Info("Log path: %s", setting.LogRootPath) setting.InitDBConfig() if !setting.Database.UseMySQL { diff --git a/cmd/dump.go b/cmd/dump.go index 1a2e62576..9ce7c2636 100644 --- a/cmd/dump.go +++ b/cmd/dump.go @@ -6,7 +6,6 @@ package cmd import ( - "encoding/json" "fmt" "io/ioutil" "os" @@ -16,12 +15,13 @@ import ( "time" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/util" - "gitea.com/macaron/session" + "gitea.com/go-chi/session" archiver "github.com/mholt/archiver/v3" "github.com/urfave/cli" ) @@ -49,38 +49,6 @@ func addFile(w archiver.Writer, filePath string, absPath string, verbose bool) e }) } -func addRecursive(w archiver.Writer, dirPath string, absPath string, verbose bool) error { - if verbose { - log.Info("Adding dir %s\n", dirPath) - } - dir, err := os.Open(absPath) - if err != nil { - return fmt.Errorf("Could not open directory %s: %s", absPath, err) - } - defer dir.Close() - - files, err := dir.Readdir(0) - if err != nil { - return fmt.Errorf("Unable to list files in %s: %s", absPath, err) - } - - if err := addFile(w, dirPath, absPath, false); err != nil { - return err - } - - for _, fileInfo := range files { - if fileInfo.IsDir() { - err = addRecursive(w, filepath.Join(dirPath, fileInfo.Name()), filepath.Join(absPath, fileInfo.Name()), verbose) - } else { - err = addFile(w, filepath.Join(dirPath, fileInfo.Name()), filepath.Join(absPath, fileInfo.Name()), verbose) - } - if err != nil { - return err - } - } - return nil -} - func isSubdir(upper string, lower string) (bool, error) { if relPath, err := filepath.Rel(upper, lower); err != nil { return false, err @@ -157,6 +125,18 @@ It can be used for backup and capture Gitea server image to send to maintainer`, Name: "skip-log, L", Usage: "Skip the log dumping", }, + cli.BoolFlag{ + Name: "skip-custom-dir", + Usage: "Skip custom directory", + }, + cli.BoolFlag{ + Name: "skip-lfs-data", + Usage: "Skip LFS data", + }, + cli.BoolFlag{ + Name: "skip-attachment-data", + Usage: "Skip attachment data", + }, cli.GenericFlag{ Name: "type", Value: outputTypeEnum, @@ -211,6 +191,11 @@ func runDump(ctx *cli.Context) error { } defer file.Close() + absFileName, err := filepath.Abs(fileName) + if err != nil { + return err + } + verbose := ctx.Bool("verbose") outType := ctx.String("type") var iface interface{} @@ -233,11 +218,13 @@ func runDump(ctx *cli.Context) error { log.Info("Skip dumping local repositories") } else { log.Info("Dumping local repositories... %s", setting.RepoRootPath) - if err := addRecursive(w, "repos", setting.RepoRootPath, verbose); err != nil { + if err := addRecursiveExclude(w, "repos", setting.RepoRootPath, []string{absFileName}, verbose); err != nil { fatal("Failed to include repositories: %v", err) } - if err := storage.LFS.IterateObjects(func(objPath string, object storage.Object) error { + if ctx.IsSet("skip-lfs-data") && ctx.Bool("skip-lfs-data") { + log.Info("Skip dumping LFS data") + } else if err := storage.LFS.IterateObjects(func(objPath string, object storage.Object) error { info, err := object.Stat() if err != nil { return err @@ -292,17 +279,21 @@ func runDump(ctx *cli.Context) error { } } - customDir, err := os.Stat(setting.CustomPath) - if err == nil && customDir.IsDir() { - if is, _ := isSubdir(setting.AppDataPath, setting.CustomPath); !is { - if err := addRecursive(w, "custom", setting.CustomPath, verbose); err != nil { - fatal("Failed to include custom: %v", err) + if ctx.IsSet("skip-custom-dir") && ctx.Bool("skip-custom-dir") { + log.Info("Skipping custom directory") + } else { + customDir, err := os.Stat(setting.CustomPath) + if err == nil && customDir.IsDir() { + if is, _ := isSubdir(setting.AppDataPath, setting.CustomPath); !is { + if err := addRecursiveExclude(w, "custom", setting.CustomPath, []string{absFileName}, verbose); err != nil { + fatal("Failed to include custom: %v", err) + } + } else { + log.Info("Custom dir %s is inside data dir %s, skipped", setting.CustomPath, setting.AppDataPath) } } else { - log.Info("Custom dir %s is inside data dir %s, skipped", setting.CustomPath, setting.AppDataPath) + log.Info("Custom dir %s doesn't exist, skipped", setting.CustomPath) } - } else { - log.Info("Custom dir %s doesn't exist, skipped", setting.CustomPath) } isExist, err := util.IsExist(setting.AppDataPath) @@ -325,12 +316,15 @@ func runDump(ctx *cli.Context) error { excludes = append(excludes, setting.LFS.Path) excludes = append(excludes, setting.Attachment.Path) excludes = append(excludes, setting.LogRootPath) + excludes = append(excludes, absFileName) if err := addRecursiveExclude(w, "data", setting.AppDataPath, excludes, verbose); err != nil { fatal("Failed to include data directory: %v", err) } } - if err := storage.Attachments.IterateObjects(func(objPath string, object storage.Object) error { + if ctx.IsSet("skip-attachment-data") && ctx.Bool("skip-attachment-data") { + log.Info("Skip dumping attachment data") + } else if err := storage.Attachments.IterateObjects(func(objPath string, object storage.Object) error { info, err := object.Stat() if err != nil { return err @@ -358,7 +352,7 @@ func runDump(ctx *cli.Context) error { log.Error("Unable to check if %s exists. Error: %v", setting.LogRootPath, err) } if isExist { - if err := addRecursive(w, "log", setting.LogRootPath, verbose); err != nil { + if err := addRecursiveExclude(w, "log", setting.LogRootPath, []string{absFileName}, verbose); err != nil { fatal("Failed to include log: %v", err) } } diff --git a/cmd/dump_repo.go b/cmd/dump_repo.go index cea640b53..69813e3c8 100644 --- a/cmd/dump_repo.go +++ b/cmd/dump_repo.go @@ -69,7 +69,7 @@ var CmdDumpRepository = cli.Command{ cli.StringFlag{ Name: "units", Value: "", - Usage: `Which items will be migrated, one or more units should be separated as comma. + Usage: `Which items will be migrated, one or more units should be separated as comma. wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.`, }, }, @@ -80,10 +80,10 @@ func runDumpRepository(ctx *cli.Context) error { return err } - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) + log.Info("AppPath: %s", setting.AppPath) + log.Info("AppWorkPath: %s", setting.AppWorkPath) + log.Info("Custom path: %s", setting.CustomPath) + log.Info("Log path: %s", setting.LogRootPath) setting.InitDBConfig() var ( diff --git a/cmd/embedded.go b/cmd/embedded.go index 363b85c06..2aeaba478 100644 --- a/cmd/embedded.go +++ b/cmd/embedded.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build bindata // +build bindata package cmd @@ -19,6 +20,7 @@ import ( "code.gitea.io/gitea/modules/public" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/util" "github.com/gobwas/glob" "github.com/urfave/cli" @@ -271,7 +273,7 @@ func extractAsset(d string, a asset, overwrite, rename bool) error { } else if !fi.Mode().IsRegular() { return fmt.Errorf("%s already exists, but it's not a regular file", dest) } else if rename { - if err := os.Rename(dest, dest+".bak"); err != nil { + if err := util.Rename(dest, dest+".bak"); err != nil { return fmt.Errorf("Error creating backup for %s: %v", dest, err) } // Attempt to respect file permissions mask (even if user:group will be set anew) diff --git a/cmd/embedded_stub.go b/cmd/embedded_stub.go index 1f9af7b86..0e9e3e6ec 100644 --- a/cmd/embedded_stub.go +++ b/cmd/embedded_stub.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !bindata // +build !bindata package cmd diff --git a/cmd/generate.go b/cmd/generate.go index 13a99c94f..35c77a815 100644 --- a/cmd/generate.go +++ b/cmd/generate.go @@ -71,7 +71,7 @@ func runGenerateInternalToken(c *cli.Context) error { } func runGenerateLfsJwtSecret(c *cli.Context) error { - JWTSecretBase64, err := generate.NewJwtSecret() + JWTSecretBase64, err := generate.NewJwtSecretBase64() if err != nil { return err } diff --git a/cmd/hook.go b/cmd/hook.go index 1fcc0a18c..fb43add8d 100644 --- a/cmd/hook.go +++ b/cmd/hook.go @@ -38,6 +38,7 @@ var ( subcmdHookPreReceive, subcmdHookUpdate, subcmdHookPostReceive, + subcmdHookProcReceive, }, } @@ -74,6 +75,18 @@ var ( }, }, } + // Note: new hook since git 2.29 + subcmdHookProcReceive = cli.Command{ + Name: "proc-receive", + Usage: "Delegate proc-receive Git hook", + Description: "This command should only be called by Git", + Action: runHookProcReceive, + Flags: []cli.Flag{ + cli.BoolFlag{ + Name: "debug", + }, + }, + } ) type delayWriter struct { @@ -152,21 +165,22 @@ func runHookPreReceive(c *cli.Context) error { if os.Getenv(models.EnvIsInternal) == "true" { return nil } + ctx, cancel := installSignals() + defer cancel() setup("hooks/pre-receive.log", c.Bool("debug")) if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { if setting.OnlyAllowPushIfGiteaEnvironmentSet { - fail(`Rejecting changes as Gitea environment not set. + return fail(`Rejecting changes as Gitea environment not set. If you are pushing over SSH you must push with a key managed by Gitea or set your environment appropriately.`, "") - } else { - return nil } + return nil } - // the environment setted on serv command - isWiki := (os.Getenv(models.EnvRepoIsWiki) == "true") + // the environment is set by serv command + isWiki := os.Getenv(models.EnvRepoIsWiki) == "true" username := os.Getenv(models.EnvRepoUsername) reponame := os.Getenv(models.EnvRepoName) userID, _ := strconv.ParseInt(os.Getenv(models.EnvPusherID), 10, 64) @@ -179,7 +193,7 @@ Gitea or set your environment appropriately.`, "") GitObjectDirectory: os.Getenv(private.GitObjectDirectory), GitQuarantinePath: os.Getenv(private.GitQuarantinePath), GitPushOptions: pushOptions(), - ProtectedBranchID: prID, + PullRequestID: prID, IsDeployKey: isDeployKey, } @@ -204,6 +218,11 @@ Gitea or set your environment appropriately.`, "") } } + supportProcRecive := false + if git.CheckGitVersionAtLeast("2.29") == nil { + supportProcRecive = true + } + for scanner.Scan() { // TODO: support news feeds for wiki if isWiki { @@ -221,8 +240,10 @@ Gitea or set your environment appropriately.`, "") total++ lastline++ - // If the ref is a branch, check if it's protected - if strings.HasPrefix(refFullName, git.BranchPrefix) { + // If the ref is a branch or tag, check if it's protected + // if supportProcRecive all ref should be checked because + // permission check was delayed + if supportProcRecive || strings.HasPrefix(refFullName, git.BranchPrefix) || strings.HasPrefix(refFullName, git.TagPrefix) { oldCommitIDs[count] = oldCommitID newCommitIDs[count] = newCommitID refFullNames[count] = refFullName @@ -230,19 +251,19 @@ Gitea or set your environment appropriately.`, "") fmt.Fprintf(out, "*") if count >= hookBatchSize { - fmt.Fprintf(out, " Checking %d branches\n", count) + fmt.Fprintf(out, " Checking %d references\n", count) hookOptions.OldCommitIDs = oldCommitIDs hookOptions.NewCommitIDs = newCommitIDs hookOptions.RefFullNames = refFullNames - statusCode, msg := private.HookPreReceive(username, reponame, hookOptions) + statusCode, msg := private.HookPreReceive(ctx, username, reponame, hookOptions) switch statusCode { case http.StatusOK: // no-op case http.StatusInternalServerError: - fail("Internal Server Error", msg) + return fail("Internal Server Error", msg) default: - fail(msg, "") + return fail(msg, "") } count = 0 lastline = 0 @@ -261,14 +282,14 @@ Gitea or set your environment appropriately.`, "") hookOptions.NewCommitIDs = newCommitIDs[:count] hookOptions.RefFullNames = refFullNames[:count] - fmt.Fprintf(out, " Checking %d branches\n", count) + fmt.Fprintf(out, " Checking %d references\n", count) - statusCode, msg := private.HookPreReceive(username, reponame, hookOptions) + statusCode, msg := private.HookPreReceive(ctx, username, reponame, hookOptions) switch statusCode { case http.StatusInternalServerError: - fail("Internal Server Error", msg) + return fail("Internal Server Error", msg) case http.StatusForbidden: - fail(msg, "") + return fail(msg, "") } } else if lastline > 0 { fmt.Fprintf(out, "\n") @@ -285,8 +306,11 @@ func runHookUpdate(c *cli.Context) error { } func runHookPostReceive(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + // First of all run update-server-info no matter what - if _, err := git.NewCommand("update-server-info").Run(); err != nil { + if _, err := git.NewCommand("update-server-info").SetParentContext(ctx).Run(); err != nil { return fmt.Errorf("Failed to call 'git update-server-info': %v", err) } @@ -299,12 +323,11 @@ func runHookPostReceive(c *cli.Context) error { if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { if setting.OnlyAllowPushIfGiteaEnvironmentSet { - fail(`Rejecting changes as Gitea environment not set. + return fail(`Rejecting changes as Gitea environment not set. If you are pushing over SSH you must push with a key managed by Gitea or set your environment appropriately.`, "") - } else { - return nil } + return nil } var out io.Writer @@ -320,9 +343,9 @@ Gitea or set your environment appropriately.`, "") } } - // the environment setted on serv command + // the environment is set by serv command repoUser := os.Getenv(models.EnvRepoUsername) - isWiki := (os.Getenv(models.EnvRepoIsWiki) == "true") + isWiki := os.Getenv(models.EnvRepoIsWiki) == "true" repoName := os.Getenv(models.EnvRepoName) pusherID, _ := strconv.ParseInt(os.Getenv(models.EnvPusherID), 10, 64) pusherName := os.Getenv(models.EnvPusherName) @@ -371,11 +394,11 @@ Gitea or set your environment appropriately.`, "") hookOptions.OldCommitIDs = oldCommitIDs hookOptions.NewCommitIDs = newCommitIDs hookOptions.RefFullNames = refFullNames - resp, err := private.HookPostReceive(repoUser, repoName, hookOptions) + resp, err := private.HookPostReceive(ctx, repoUser, repoName, hookOptions) if resp == nil { _ = dWriter.Close() hookPrintResults(results) - fail("Internal Server Error", err) + return fail("Internal Server Error", err) } wasEmpty = wasEmpty || resp.RepoWasEmpty results = append(results, resp.Results...) @@ -386,9 +409,9 @@ Gitea or set your environment appropriately.`, "") if count == 0 { if wasEmpty && masterPushed { // We need to tell the repo to reset the default branch to master - err := private.SetDefaultBranch(repoUser, repoName, "master") + err := private.SetDefaultBranch(ctx, repoUser, repoName, "master") if err != nil { - fail("Internal Server Error", "SetDefaultBranch failed with Error: %v", err) + return fail("Internal Server Error", "SetDefaultBranch failed with Error: %v", err) } } fmt.Fprintf(out, "Processed %d references in total\n", total) @@ -404,11 +427,11 @@ Gitea or set your environment appropriately.`, "") fmt.Fprintf(out, " Processing %d references\n", count) - resp, err := private.HookPostReceive(repoUser, repoName, hookOptions) + resp, err := private.HookPostReceive(ctx, repoUser, repoName, hookOptions) if resp == nil { _ = dWriter.Close() hookPrintResults(results) - fail("Internal Server Error", err) + return fail("Internal Server Error", err) } wasEmpty = wasEmpty || resp.RepoWasEmpty results = append(results, resp.Results...) @@ -417,9 +440,9 @@ Gitea or set your environment appropriately.`, "") if wasEmpty && masterPushed { // We need to tell the repo to reset the default branch to master - err := private.SetDefaultBranch(repoUser, repoName, "master") + err := private.SetDefaultBranch(ctx, repoUser, repoName, "master") if err != nil { - fail("Internal Server Error", "SetDefaultBranch failed with Error: %v", err) + return fail("Internal Server Error", "SetDefaultBranch failed with Error: %v", err) } } _ = dWriter.Close() @@ -460,3 +483,327 @@ func pushOptions() map[string]string { } return opts } + +func runHookProcReceive(c *cli.Context) error { + setup("hooks/proc-receive.log", c.Bool("debug")) + + if len(os.Getenv("SSH_ORIGINAL_COMMAND")) == 0 { + if setting.OnlyAllowPushIfGiteaEnvironmentSet { + return fail(`Rejecting changes as Gitea environment not set. +If you are pushing over SSH you must push with a key managed by +Gitea or set your environment appropriately.`, "") + } + return nil + } + + ctx, cancel := installSignals() + defer cancel() + + if git.CheckGitVersionAtLeast("2.29") != nil { + return fail("Internal Server Error", "git not support proc-receive.") + } + + reader := bufio.NewReader(os.Stdin) + repoUser := os.Getenv(models.EnvRepoUsername) + repoName := os.Getenv(models.EnvRepoName) + pusherID, _ := strconv.ParseInt(os.Getenv(models.EnvPusherID), 10, 64) + pusherName := os.Getenv(models.EnvPusherName) + + // 1. Version and features negotiation. + // S: PKT-LINE(version=1\0push-options atomic...) / PKT-LINE(version=1\n) + // S: flush-pkt + // H: PKT-LINE(version=1\0push-options...) + // H: flush-pkt + + rs, err := readPktLine(reader, pktLineTypeData) + if err != nil { + return err + } + + const VersionHead string = "version=1" + + var ( + hasPushOptions bool + response = []byte(VersionHead) + requestOptions []string + ) + + index := bytes.IndexByte(rs.Data, byte(0)) + if index >= len(rs.Data) { + return fail("Internal Server Error", "pkt-line: format error "+fmt.Sprint(rs.Data)) + } + + if index < 0 { + if len(rs.Data) == 10 && rs.Data[9] == '\n' { + index = 9 + } else { + return fail("Internal Server Error", "pkt-line: format error "+fmt.Sprint(rs.Data)) + } + } + + if string(rs.Data[0:index]) != VersionHead { + return fail("Internal Server Error", "Received unsupported version: %s", string(rs.Data[0:index])) + } + requestOptions = strings.Split(string(rs.Data[index+1:]), " ") + + for _, option := range requestOptions { + if strings.HasPrefix(option, "push-options") { + response = append(response, byte(0)) + response = append(response, []byte("push-options")...) + hasPushOptions = true + } + } + response = append(response, '\n') + + _, err = readPktLine(reader, pktLineTypeFlush) + if err != nil { + return err + } + + err = writeDataPktLine(os.Stdout, response) + if err != nil { + return err + } + + err = writeFlushPktLine(os.Stdout) + if err != nil { + return err + } + + // 2. receive commands from server. + // S: PKT-LINE( ) + // S: ... ... + // S: flush-pkt + // # [receive push-options] + // S: PKT-LINE(push-option) + // S: ... ... + // S: flush-pkt + hookOptions := private.HookOptions{ + UserName: pusherName, + UserID: pusherID, + } + hookOptions.OldCommitIDs = make([]string, 0, hookBatchSize) + hookOptions.NewCommitIDs = make([]string, 0, hookBatchSize) + hookOptions.RefFullNames = make([]string, 0, hookBatchSize) + + for { + // note: pktLineTypeUnknow means pktLineTypeFlush and pktLineTypeData all allowed + rs, err = readPktLine(reader, pktLineTypeUnknow) + if err != nil { + return err + } + + if rs.Type == pktLineTypeFlush { + break + } + t := strings.SplitN(string(rs.Data), " ", 3) + if len(t) != 3 { + continue + } + hookOptions.OldCommitIDs = append(hookOptions.OldCommitIDs, t[0]) + hookOptions.NewCommitIDs = append(hookOptions.NewCommitIDs, t[1]) + hookOptions.RefFullNames = append(hookOptions.RefFullNames, t[2]) + } + + hookOptions.GitPushOptions = make(map[string]string) + + if hasPushOptions { + for { + rs, err = readPktLine(reader, pktLineTypeUnknow) + if err != nil { + return err + } + + if rs.Type == pktLineTypeFlush { + break + } + + kv := strings.SplitN(string(rs.Data), "=", 2) + if len(kv) == 2 { + hookOptions.GitPushOptions[kv[0]] = kv[1] + } + } + } + + // 3. run hook + resp, err := private.HookProcReceive(ctx, repoUser, repoName, hookOptions) + if err != nil { + return fail("Internal Server Error", "run proc-receive hook failed :%v", err) + } + + // 4. response result to service + // # a. OK, but has an alternate reference. The alternate reference name + // # and other status can be given in option directives. + // H: PKT-LINE(ok ) + // H: PKT-LINE(option refname ) + // H: PKT-LINE(option old-oid ) + // H: PKT-LINE(option new-oid ) + // H: PKT-LINE(option forced-update) + // H: ... ... + // H: flush-pkt + // # b. NO, I reject it. + // H: PKT-LINE(ng ) + // # c. Fall through, let 'receive-pack' to execute it. + // H: PKT-LINE(ok ) + // H: PKT-LINE(option fall-through) + + for _, rs := range resp.Results { + if len(rs.Err) > 0 { + err = writeDataPktLine(os.Stdout, []byte("ng "+rs.OriginalRef+" "+rs.Err)) + if err != nil { + return err + } + continue + } + + if rs.IsNotMatched { + err = writeDataPktLine(os.Stdout, []byte("ok "+rs.OriginalRef)) + if err != nil { + return err + } + err = writeDataPktLine(os.Stdout, []byte("option fall-through")) + if err != nil { + return err + } + continue + } + + err = writeDataPktLine(os.Stdout, []byte("ok "+rs.OriginalRef)) + if err != nil { + return err + } + err = writeDataPktLine(os.Stdout, []byte("option refname "+rs.Ref)) + if err != nil { + return err + } + if rs.OldOID != git.EmptySHA { + err = writeDataPktLine(os.Stdout, []byte("option old-oid "+rs.OldOID)) + if err != nil { + return err + } + } + err = writeDataPktLine(os.Stdout, []byte("option new-oid "+rs.NewOID)) + if err != nil { + return err + } + if rs.IsForcePush { + err = writeDataPktLine(os.Stdout, []byte("option forced-update")) + if err != nil { + return err + } + } + } + err = writeFlushPktLine(os.Stdout) + + return err +} + +// git PKT-Line api +// pktLineType message type of pkt-line +type pktLineType int64 + +const ( + // UnKnow type + pktLineTypeUnknow pktLineType = 0 + // flush-pkt "0000" + pktLineTypeFlush pktLineType = iota + // data line + pktLineTypeData +) + +// gitPktLine pkt-line api +type gitPktLine struct { + Type pktLineType + Length uint64 + Data []byte +} + +func readPktLine(in *bufio.Reader, requestType pktLineType) (*gitPktLine, error) { + var ( + err error + r *gitPktLine + ) + + // read prefix + lengthBytes := make([]byte, 4) + for i := 0; i < 4; i++ { + lengthBytes[i], err = in.ReadByte() + if err != nil { + return nil, fail("Internal Server Error", "Pkt-Line: read stdin failed : %v", err) + } + } + + r = new(gitPktLine) + r.Length, err = strconv.ParseUint(string(lengthBytes), 16, 32) + if err != nil { + return nil, fail("Internal Server Error", "Pkt-Line format is wrong :%v", err) + } + + if r.Length == 0 { + if requestType == pktLineTypeData { + return nil, fail("Internal Server Error", "Pkt-Line format is wrong") + } + r.Type = pktLineTypeFlush + return r, nil + } + + if r.Length <= 4 || r.Length > 65520 || requestType == pktLineTypeFlush { + return nil, fail("Internal Server Error", "Pkt-Line format is wrong") + } + + r.Data = make([]byte, r.Length-4) + for i := range r.Data { + r.Data[i], err = in.ReadByte() + if err != nil { + return nil, fail("Internal Server Error", "Pkt-Line: read stdin failed : %v", err) + } + } + + r.Type = pktLineTypeData + + return r, nil +} + +func writeFlushPktLine(out io.Writer) error { + l, err := out.Write([]byte("0000")) + if err != nil { + return fail("Internal Server Error", "Pkt-Line response failed: %v", err) + } + if l != 4 { + return fail("Internal Server Error", "Pkt-Line response failed: %v", err) + } + + return nil +} + +func writeDataPktLine(out io.Writer, data []byte) error { + hexchar := []byte("0123456789abcdef") + hex := func(n uint64) byte { + return hexchar[(n)&15] + } + + length := uint64(len(data) + 4) + tmp := make([]byte, 4) + tmp[0] = hex(length >> 12) + tmp[1] = hex(length >> 8) + tmp[2] = hex(length >> 4) + tmp[3] = hex(length) + + lr, err := out.Write(tmp) + if err != nil { + return fail("Internal Server Error", "Pkt-Line response failed: %v", err) + } + if 4 != lr { + return fail("Internal Server Error", "Pkt-Line response failed: %v", err) + } + + lr, err = out.Write(data) + if err != nil { + return fail("Internal Server Error", "Pkt-Line response failed: %v", err) + } + if int(length-4) != lr { + return fail("Internal Server Error", "Pkt-Line response failed: %v", err) + } + + return nil +} diff --git a/cmd/hook_test.go b/cmd/hook_test.go new file mode 100644 index 000000000..92c7e82a9 --- /dev/null +++ b/cmd/hook_test.go @@ -0,0 +1,41 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package cmd + +import ( + "bufio" + "bytes" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestPktLine(t *testing.T) { + // test read + s := strings.NewReader("0000") + r := bufio.NewReader(s) + result, err := readPktLine(r, pktLineTypeFlush) + assert.NoError(t, err) + assert.Equal(t, pktLineTypeFlush, result.Type) + + s = strings.NewReader("0006a\n") + r = bufio.NewReader(s) + result, err = readPktLine(r, pktLineTypeData) + assert.NoError(t, err) + assert.Equal(t, pktLineTypeData, result.Type) + assert.Equal(t, []byte("a\n"), result.Data) + + // test write + w := bytes.NewBuffer([]byte{}) + err = writeFlushPktLine(w) + assert.NoError(t, err) + assert.Equal(t, []byte("0000"), w.Bytes()) + + w.Reset() + err = writeDataPktLine(w, []byte("a\nb")) + assert.NoError(t, err) + assert.Equal(t, []byte("0007a\nb"), w.Bytes()) +} diff --git a/cmd/keys.go b/cmd/keys.go index 7456815cd..684aca64e 100644 --- a/cmd/keys.go +++ b/cmd/keys.go @@ -62,9 +62,12 @@ func runKeys(c *cli.Context) error { return errors.New("No key type and content provided") } + ctx, cancel := installSignals() + defer cancel() + setup("keys.log", false) - authorizedString, err := private.AuthorizedPublicKeyByContent(content) + authorizedString, err := private.AuthorizedPublicKeyByContent(ctx, content) if err != nil { return err } diff --git a/cmd/mailer.go b/cmd/mailer.go index ee11b56cc..1a4b0902e 100644 --- a/cmd/mailer.go +++ b/cmd/mailer.go @@ -14,6 +14,9 @@ import ( ) func runSendMail(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + setting.NewContext() if err := argsSet(c, "title"); err != nil { @@ -39,7 +42,7 @@ func runSendMail(c *cli.Context) error { } } - status, message := private.SendEmail(subject, body, nil) + status, message := private.SendEmail(ctx, subject, body, nil) if status != http.StatusOK { fmt.Printf("error: %s\n", message) return nil diff --git a/cmd/manager.go b/cmd/manager.go index 20c785868..99d283b44 100644 --- a/cmd/manager.go +++ b/cmd/manager.go @@ -236,10 +236,13 @@ func runRemoveLogger(c *cli.Context) error { group = log.DEFAULT } name := c.Args().First() - statusCode, msg := private.RemoveLogger(group, name) + ctx, cancel := installSignals() + defer cancel() + + statusCode, msg := private.RemoveLogger(ctx, group, name) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) @@ -371,10 +374,13 @@ func commonAddLogger(c *cli.Context, mode string, vals map[string]interface{}) e if c.IsSet("name") { name = c.String("name") } - statusCode, msg := private.AddLogger(group, name, mode, vals) + ctx, cancel := installSignals() + defer cancel() + + statusCode, msg := private.AddLogger(ctx, group, name, mode, vals) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) @@ -382,11 +388,14 @@ func commonAddLogger(c *cli.Context, mode string, vals map[string]interface{}) e } func runShutdown(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + setup("manager", c.Bool("debug")) - statusCode, msg := private.Shutdown() + statusCode, msg := private.Shutdown(ctx) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) @@ -394,11 +403,14 @@ func runShutdown(c *cli.Context) error { } func runRestart(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + setup("manager", c.Bool("debug")) - statusCode, msg := private.Restart() + statusCode, msg := private.Restart(ctx) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) @@ -406,11 +418,14 @@ func runRestart(c *cli.Context) error { } func runFlushQueues(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + setup("manager", c.Bool("debug")) - statusCode, msg := private.FlushQueues(c.Duration("timeout"), c.Bool("non-blocking")) + statusCode, msg := private.FlushQueues(ctx, c.Duration("timeout"), c.Bool("non-blocking")) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) @@ -418,11 +433,14 @@ func runFlushQueues(c *cli.Context) error { } func runPauseLogging(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + setup("manager", c.Bool("debug")) - statusCode, msg := private.PauseLogging() + statusCode, msg := private.PauseLogging(ctx) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) @@ -430,11 +448,14 @@ func runPauseLogging(c *cli.Context) error { } func runResumeLogging(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + setup("manager", c.Bool("debug")) - statusCode, msg := private.ResumeLogging() + statusCode, msg := private.ResumeLogging(ctx) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) @@ -442,11 +463,14 @@ func runResumeLogging(c *cli.Context) error { } func runReleaseReopenLogging(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + setup("manager", c.Bool("debug")) - statusCode, msg := private.ReleaseReopenLogging() + statusCode, msg := private.ReleaseReopenLogging(ctx) switch statusCode { case http.StatusInternalServerError: - fail("InternalServerError", msg) + return fail("InternalServerError", msg) } fmt.Fprintln(os.Stdout, msg) diff --git a/cmd/migrate.go b/cmd/migrate.go index 242892588..23bc97b0c 100644 --- a/cmd/migrate.go +++ b/cmd/migrate.go @@ -28,10 +28,10 @@ func runMigrate(ctx *cli.Context) error { return err } - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) + log.Info("AppPath: %s", setting.AppPath) + log.Info("AppWorkPath: %s", setting.AppWorkPath) + log.Info("Custom path: %s", setting.CustomPath) + log.Info("Log path: %s", setting.LogRootPath) setting.InitDBConfig() if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil { diff --git a/cmd/migrate_storage.go b/cmd/migrate_storage.go index 871baed92..8123716f9 100644 --- a/cmd/migrate_storage.go +++ b/cmd/migrate_storage.go @@ -110,10 +110,10 @@ func runMigrateStorage(ctx *cli.Context) error { return err } - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) + log.Info("AppPath: %s", setting.AppPath) + log.Info("AppWorkPath: %s", setting.AppWorkPath) + log.Info("Custom path: %s", setting.CustomPath) + log.Info("Log path: %s", setting.LogRootPath) setting.InitDBConfig() if err := models.NewEngine(context.Background(), migrations.Migrate); err != nil { @@ -184,7 +184,7 @@ func runMigrateStorage(ctx *cli.Context) error { return fmt.Errorf("Unsupported storage: %s", ctx.String("type")) } - log.Warn("All files have been copied to the new placement but old files are still on the orignial placement.") + log.Warn("All files have been copied to the new placement but old files are still on the original placement.") return nil } diff --git a/cmd/restore_repo.go b/cmd/restore_repo.go index 541995879..1208796c9 100644 --- a/cmd/restore_repo.go +++ b/cmd/restore_repo.go @@ -5,15 +5,12 @@ package cmd import ( - "context" - "strings" + "errors" + "net/http" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/migrations" - "code.gitea.io/gitea/modules/migrations/base" + "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" - pull_service "code.gitea.io/gitea/services/pull" "github.com/urfave/cli" ) @@ -43,77 +40,29 @@ var CmdRestoreRepository = cli.Command{ cli.StringFlag{ Name: "units", Value: "", - Usage: `Which items will be restored, one or more units should be separated as comma. + Usage: `Which items will be restored, one or more units should be separated as comma. wiki, issues, labels, releases, release_assets, milestones, pull_requests, comments are allowed. Empty means all units.`, }, }, } -func runRestoreRepository(ctx *cli.Context) error { - if err := initDB(); err != nil { - return err +func runRestoreRepository(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + + setting.NewContext() + + statusCode, errStr := private.RestoreRepo( + ctx, + c.String("repo_dir"), + c.String("owner_name"), + c.String("repo_name"), + c.StringSlice("units"), + ) + if statusCode == http.StatusOK { + return nil } - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) - setting.InitDBConfig() - - if err := storage.Init(); err != nil { - return err - } - - if err := pull_service.Init(); err != nil { - return err - } - - var opts = base.MigrateOptions{ - RepoName: ctx.String("repo_name"), - } - - if len(ctx.String("units")) == 0 { - opts.Wiki = true - opts.Issues = true - opts.Milestones = true - opts.Labels = true - opts.Releases = true - opts.Comments = true - opts.PullRequests = true - opts.ReleaseAssets = true - } else { - units := strings.Split(ctx.String("units"), ",") - for _, unit := range units { - switch strings.ToLower(unit) { - case "wiki": - opts.Wiki = true - case "issues": - opts.Issues = true - case "milestones": - opts.Milestones = true - case "labels": - opts.Labels = true - case "releases": - opts.Releases = true - case "release_assets": - opts.ReleaseAssets = true - case "comments": - opts.Comments = true - case "pull_requests": - opts.PullRequests = true - } - } - } - - if err := migrations.RestoreRepository( - context.Background(), - ctx.String("repo_dir"), - ctx.String("owner_name"), - ctx.String("repo_name"), - ); err != nil { - log.Fatal("Failed to restore repository: %v", err) - return err - } - - return nil + log.Fatal("Failed to restore repository: %v", errStr) + return errors.New(errStr) } diff --git a/cmd/serv.go b/cmd/serv.go index fb1e58113..2173a3a38 100644 --- a/cmd/serv.go +++ b/cmd/serv.go @@ -6,7 +6,6 @@ package cmd import ( - "encoding/json" "fmt" "net/http" "net/url" @@ -18,13 +17,15 @@ import ( "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/pprof" "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/services/lfs" - "github.com/dgrijalva/jwt-go" + "github.com/golang-jwt/jwt" "github.com/kballard/go-shellquote" "github.com/urfave/cli" ) @@ -58,7 +59,7 @@ func setup(logPath string, debug bool) { } setting.NewContext() if debug { - setting.ProdMode = false + setting.RunMode = "dev" } } @@ -72,19 +73,30 @@ var ( alphaDashDotPattern = regexp.MustCompile(`[^\w-\.]`) ) -func fail(userMessage, logMessage string, args ...interface{}) { +func fail(userMessage, logMessage string, args ...interface{}) error { + // There appears to be a chance to cause a zombie process and failure to read the Exit status + // if nothing is outputted on stdout. + fmt.Fprintln(os.Stdout, "") fmt.Fprintln(os.Stderr, "Gitea:", userMessage) if len(logMessage) > 0 { - if !setting.ProdMode { + if !setting.IsProd() { fmt.Fprintf(os.Stderr, logMessage+"\n", args...) } } + ctx, cancel := installSignals() + defer cancel() - os.Exit(1) + if len(logMessage) > 0 { + _ = private.SSHLog(ctx, true, fmt.Sprintf(logMessage+": ", args...)) + } + return cli.NewExitError(fmt.Sprintf("Gitea: %s", userMessage), 1) } func runServ(c *cli.Context) error { + ctx, cancel := installSignals() + defer cancel() + // FIXME: This needs to internationalised setup("serv.log", c.Bool("debug")) @@ -102,18 +114,18 @@ func runServ(c *cli.Context) error { keys := strings.Split(c.Args()[0], "-") if len(keys) != 2 || keys[0] != "key" { - fail("Key ID format error", "Invalid key argument: %s", c.Args()[0]) + return fail("Key ID format error", "Invalid key argument: %s", c.Args()[0]) } keyID, err := strconv.ParseInt(keys[1], 10, 64) if err != nil { - fail("Key ID format error", "Invalid key argument: %s", c.Args()[1]) + return fail("Key ID format error", "Invalid key argument: %s", c.Args()[1]) } cmd := os.Getenv("SSH_ORIGINAL_COMMAND") if len(cmd) == 0 { - key, user, err := private.ServNoCommand(keyID) + key, user, err := private.ServNoCommand(ctx, keyID) if err != nil { - fail("Internal error", "Failed to check provided key: %v", err) + return fail("Internal error", "Failed to check provided key: %v", err) } switch key.Type { case models.KeyTypeDeploy: @@ -131,11 +143,18 @@ func runServ(c *cli.Context) error { words, err := shellquote.Split(cmd) if err != nil { - fail("Error parsing arguments", "Failed to parse arguments: %v", err) + return fail("Error parsing arguments", "Failed to parse arguments: %v", err) } if len(words) < 2 { - fail("Too few arguments", "Too few arguments in cmd: %s", cmd) + if git.CheckGitVersionAtLeast("2.29") == nil { + // for AGit Flow + if cmd == "ssh_info" { + fmt.Print(`{"type":"gitea","version":1}`) + return nil + } + } + return fail("Too few arguments", "Too few arguments in cmd: %s", cmd) } verb := words[0] @@ -147,7 +166,7 @@ func runServ(c *cli.Context) error { var lfsVerb string if verb == lfsAuthenticateVerb { if !setting.LFS.StartServer { - fail("Unknown git command", "LFS authentication request over SSH denied, LFS support is disabled") + return fail("Unknown git command", "LFS authentication request over SSH denied, LFS support is disabled") } if len(words) > 2 { @@ -160,37 +179,37 @@ func runServ(c *cli.Context) error { rr := strings.SplitN(repoPath, "/", 2) if len(rr) != 2 { - fail("Invalid repository path", "Invalid repository path: %v", repoPath) + return fail("Invalid repository path", "Invalid repository path: %v", repoPath) } username := strings.ToLower(rr[0]) reponame := strings.ToLower(strings.TrimSuffix(rr[1], ".git")) if alphaDashDotPattern.MatchString(reponame) { - fail("Invalid repo name", "Invalid repo name: %s", reponame) + return fail("Invalid repo name", "Invalid repo name: %s", reponame) } if setting.EnablePprof || c.Bool("enable-pprof") { if err := os.MkdirAll(setting.PprofDataPath, os.ModePerm); err != nil { - fail("Error while trying to create PPROF_DATA_PATH", "Error while trying to create PPROF_DATA_PATH: %v", err) + return fail("Error while trying to create PPROF_DATA_PATH", "Error while trying to create PPROF_DATA_PATH: %v", err) } stopCPUProfiler, err := pprof.DumpCPUProfileForUsername(setting.PprofDataPath, username) if err != nil { - fail("Internal Server Error", "Unable to start CPU profile: %v", err) + return fail("Internal Server Error", "Unable to start CPU profile: %v", err) } defer func() { stopCPUProfiler() err := pprof.DumpMemProfileForUsername(setting.PprofDataPath, username) if err != nil { - fail("Internal Server Error", "Unable to dump Mem Profile: %v", err) + _ = fail("Internal Server Error", "Unable to dump Mem Profile: %v", err) } }() } requestedMode, has := allowedCommands[verb] if !has { - fail("Unknown git command", "Unknown git command %s", verb) + return fail("Unknown git command", "Unknown git command %s", verb) } if verb == lfsAuthenticateVerb { @@ -199,21 +218,20 @@ func runServ(c *cli.Context) error { } else if lfsVerb == "download" { requestedMode = models.AccessModeRead } else { - fail("Unknown LFS verb", "Unknown lfs verb %s", lfsVerb) + return fail("Unknown LFS verb", "Unknown lfs verb %s", lfsVerb) } } - results, err := private.ServCommand(keyID, username, reponame, requestedMode, verb, lfsVerb) + results, err := private.ServCommand(ctx, keyID, username, reponame, requestedMode, verb, lfsVerb) if err != nil { if private.IsErrServCommand(err) { errServCommand := err.(private.ErrServCommand) if errServCommand.StatusCode != http.StatusInternalServerError { - fail("Unauthorized", "%s", errServCommand.Error()) - } else { - fail("Internal Server Error", "%s", errServCommand.Error()) + return fail("Unauthorized", "%s", errServCommand.Error()) } + return fail("Internal Server Error", "%s", errServCommand.Error()) } - fail("Internal Server Error", "%s", err.Error()) + return fail("Internal Server Error", "%s", err.Error()) } os.Setenv(models.EnvRepoIsWiki, strconv.FormatBool(results.IsWiki)) os.Setenv(models.EnvRepoName, results.RepoName) @@ -246,7 +264,7 @@ func runServ(c *cli.Context) error { // Sign and get the complete encoded token as a string using the secret tokenString, err := token.SignedString(setting.LFS.JWTSecretBytes) if err != nil { - fail("Internal error", "Failed to sign JWT token: %v", err) + return fail("Internal error", "Failed to sign JWT token: %v", err) } tokenAuthentication := &models.LFSTokenResponse{ @@ -258,7 +276,7 @@ func runServ(c *cli.Context) error { enc := json.NewEncoder(os.Stdout) err = enc.Encode(tokenAuthentication) if err != nil { - fail("Internal error", "Failed to encode LFS json response: %v", err) + return fail("Internal error", "Failed to encode LFS json response: %v", err) } return nil } @@ -271,9 +289,9 @@ func runServ(c *cli.Context) error { var gitcmd *exec.Cmd verbs := strings.Split(verb, " ") if len(verbs) == 2 { - gitcmd = exec.Command(verbs[0], verbs[1], repoPath) + gitcmd = exec.CommandContext(ctx, verbs[0], verbs[1], repoPath) } else { - gitcmd = exec.Command(verb, repoPath) + gitcmd = exec.CommandContext(ctx, verb, repoPath) } gitcmd.Dir = setting.RepoRootPath @@ -281,13 +299,13 @@ func runServ(c *cli.Context) error { gitcmd.Stdin = os.Stdin gitcmd.Stderr = os.Stderr if err = gitcmd.Run(); err != nil { - fail("Internal error", "Failed to execute git command: %v", err) + return fail("Internal error", "Failed to execute git command: %v", err) } // Update user key activity. if results.KeyID > 0 { - if err = private.UpdatePublicKeyInRepo(results.KeyID, results.RepoID); err != nil { - fail("Internal error", "UpdatePublicKeyInRepo: %v", err) + if err = private.UpdatePublicKeyInRepo(ctx, results.KeyID, results.RepoID); err != nil { + return fail("Internal error", "UpdatePublicKeyInRepo: %v", err) } } diff --git a/cmd/web.go b/cmd/web.go index 063e41c94..963c81620 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -16,13 +16,11 @@ import ( "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers" - "code.gitea.io/gitea/routers/routes" + "code.gitea.io/gitea/routers/install" context2 "github.com/gorilla/context" "github.com/urfave/cli" - "golang.org/x/crypto/acme/autocert" ini "gopkg.in/ini.v1" ) @@ -49,6 +47,14 @@ and it takes care of all the other things for you`, Value: setting.PIDFile, Usage: "Custom pid file path", }, + cli.BoolFlag{ + Name: "quiet, q", + Usage: "Only display Fatal logging errors until logging is set-up", + }, + cli.BoolFlag{ + Name: "verbose", + Usage: "Set initial logging to TRACE level until logging is properly set-up", + }, }, } @@ -65,44 +71,27 @@ func runHTTPRedirector() { http.Redirect(w, r, target, http.StatusTemporaryRedirect) }) - var err = runHTTP("tcp", source, context2.ClearHandler(handler)) + var err = runHTTP("tcp", source, "HTTP Redirector", context2.ClearHandler(handler)) if err != nil { log.Fatal("Failed to start port redirection: %v", err) } } -func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler) error { - certManager := autocert.Manager{ - Prompt: autocert.AcceptTOS, - HostPolicy: autocert.HostWhitelist(domain), - Cache: autocert.DirCache(directory), - Email: email, +func runWeb(ctx *cli.Context) error { + if ctx.Bool("verbose") { + _ = log.DelLogger("console") + log.NewLogger(0, "console", "console", fmt.Sprintf(`{"level": "trace", "colorize": %t, "stacktraceLevel": "none"}`, log.CanColorStdout)) + } else if ctx.Bool("quiet") { + _ = log.DelLogger("console") + log.NewLogger(0, "console", "console", fmt.Sprintf(`{"level": "fatal", "colorize": %t, "stacktraceLevel": "none"}`, log.CanColorStdout)) } - go func() { - log.Info("Running Let's Encrypt handler on %s", setting.HTTPAddr+":"+setting.PortToRedirect) - // all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validation happens here) - var err = runHTTP("tcp", setting.HTTPAddr+":"+setting.PortToRedirect, certManager.HTTPHandler(http.HandlerFunc(runLetsEncryptFallbackHandler))) - if err != nil { - log.Fatal("Failed to start the Let's Encrypt handler on port %s: %v", setting.PortToRedirect, err) + defer func() { + if panicked := recover(); panicked != nil { + log.Fatal("PANIC: %v\n%s", panicked, string(log.Stack(2))) } }() - return runHTTPSWithTLSConfig("tcp", listenAddr, certManager.TLSConfig(), context2.ClearHandler(m)) -} -func runLetsEncryptFallbackHandler(w http.ResponseWriter, r *http.Request) { - if r.Method != "GET" && r.Method != "HEAD" { - http.Error(w, "Use HTTPS", http.StatusBadRequest) - return - } - // Remove the trailing slash at the end of setting.AppURL, the request - // URI always contains a leading slash, which would result in a double - // slash - target := strings.TrimSuffix(setting.AppURL, "/") + r.URL.RequestURI() - http.Redirect(w, r, target, http.StatusFound) -} - -func runWeb(ctx *cli.Context) error { managerCtx, cancel := context.WithCancel(context.Background()) graceful.InitManager(managerCtx) defer cancel() @@ -120,7 +109,7 @@ func runWeb(ctx *cli.Context) error { } // Perform pre-initialization - needsInstall := routers.PreInstallInit(graceful.GetManager().HammerContext()) + needsInstall := install.PreloadSettings(graceful.GetManager().HammerContext()) if needsInstall { // Flag for port number in case first time run conflict if ctx.IsSet("port") { @@ -133,8 +122,7 @@ func runWeb(ctx *cli.Context) error { return err } } - c := routes.NewChi() - routes.RegisterInstallRoute(c) + c := install.Routes() err := listen(c, false) select { case <-graceful.GetManager().IsShutdown(): @@ -165,11 +153,9 @@ func runWeb(ctx *cli.Context) error { return err } } - // Set up Chi routes - c := routes.NewChi() - c.Mount("/", routes.NormalRoutes()) - routes.DelegateToMacaron(c) + // Set up Chi routes + c := routers.NormalRoutes() err := listen(c, true) <-graceful.GetManager().Done() log.Info("PID: %d Gitea Web Finished", os.Getpid()) @@ -186,19 +172,6 @@ func setPort(port string) error { case setting.FCGI: case setting.FCGIUnix: default: - // Save LOCAL_ROOT_URL if port changed - cfg := ini.Empty() - isFile, err := util.IsFile(setting.CustomConf) - if err != nil { - log.Fatal("Unable to check if %s is a file", err) - } - if isFile { - // Keeps custom settings if there is already something. - if err := cfg.Append(setting.CustomConf); err != nil { - return fmt.Errorf("Failed to load custom conf '%s': %v", setting.CustomConf, err) - } - } - defaultLocalURL := string(setting.Protocol) + "://" if setting.HTTPAddr == "0.0.0.0" { defaultLocalURL += "localhost" @@ -207,10 +180,10 @@ func setPort(port string) error { } defaultLocalURL += ":" + setting.HTTPPort + "/" - cfg.Section("server").Key("LOCAL_ROOT_URL").SetValue(defaultLocalURL) - if err := cfg.SaveTo(setting.CustomConf); err != nil { - return fmt.Errorf("Error saving generated JWT Secret to custom config: %v", err) - } + // Save LOCAL_ROOT_URL if port changed + setting.CreateOrAppendToCustomConf(func(cfg *ini.File) { + cfg.Section("server").Key("LOCAL_ROOT_URL").SetValue(defaultLocalURL) + }) } return nil } @@ -232,7 +205,7 @@ func listen(m http.Handler, handleRedirector bool) error { if handleRedirector { NoHTTPRedirector() } - err = runHTTP("tcp", listenAddr, context2.ClearHandler(m)) + err = runHTTP("tcp", listenAddr, "Web", context2.ClearHandler(m)) case setting.HTTPS: if setting.EnableLetsEncrypt { err = runLetsEncrypt(listenAddr, setting.Domain, setting.LetsEncryptDirectory, setting.LetsEncryptEmail, context2.ClearHandler(m)) @@ -245,22 +218,22 @@ func listen(m http.Handler, handleRedirector bool) error { NoHTTPRedirector() } } - err = runHTTPS("tcp", listenAddr, setting.CertFile, setting.KeyFile, context2.ClearHandler(m)) + err = runHTTPS("tcp", listenAddr, "Web", setting.CertFile, setting.KeyFile, context2.ClearHandler(m)) case setting.FCGI: if handleRedirector { NoHTTPRedirector() } - err = runFCGI("tcp", listenAddr, context2.ClearHandler(m)) + err = runFCGI("tcp", listenAddr, "FCGI Web", context2.ClearHandler(m)) case setting.UnixSocket: if handleRedirector { NoHTTPRedirector() } - err = runHTTP("unix", listenAddr, context2.ClearHandler(m)) + err = runHTTP("unix", listenAddr, "Web", context2.ClearHandler(m)) case setting.FCGIUnix: if handleRedirector { NoHTTPRedirector() } - err = runFCGI("unix", listenAddr, context2.ClearHandler(m)) + err = runFCGI("unix", listenAddr, "Web", context2.ClearHandler(m)) default: log.Fatal("Invalid protocol: %s", setting.Protocol) } diff --git a/cmd/web_graceful.go b/cmd/web_graceful.go index 9e039de69..91ac024dd 100644 --- a/cmd/web_graceful.go +++ b/cmd/web_graceful.go @@ -9,21 +9,23 @@ import ( "net" "net/http" "net/http/fcgi" + "strings" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" ) -func runHTTP(network, listenAddr string, m http.Handler) error { - return graceful.HTTPListenAndServe(network, listenAddr, m) +func runHTTP(network, listenAddr, name string, m http.Handler) error { + return graceful.HTTPListenAndServe(network, listenAddr, name, m) } -func runHTTPS(network, listenAddr, certFile, keyFile string, m http.Handler) error { - return graceful.HTTPListenAndServeTLS(network, listenAddr, certFile, keyFile, m) +func runHTTPS(network, listenAddr, name, certFile, keyFile string, m http.Handler) error { + return graceful.HTTPListenAndServeTLS(network, listenAddr, name, certFile, keyFile, m) } -func runHTTPSWithTLSConfig(network, listenAddr string, tlsConfig *tls.Config, m http.Handler) error { - return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, tlsConfig, m) +func runHTTPSWithTLSConfig(network, listenAddr, name string, tlsConfig *tls.Config, m http.Handler) error { + return graceful.HTTPListenAndServeTLSConfig(network, listenAddr, name, tlsConfig, m) } // NoHTTPRedirector tells our cleanup routine that we will not be using a fallback http redirector @@ -43,12 +45,17 @@ func NoInstallListener() { graceful.GetManager().InformCleanup() } -func runFCGI(network, listenAddr string, m http.Handler) error { +func runFCGI(network, listenAddr, name string, m http.Handler) error { // This needs to handle stdin as fcgi point - fcgiServer := graceful.NewServer(network, listenAddr) + fcgiServer := graceful.NewServer(network, listenAddr, name) err := fcgiServer.ListenAndServe(func(listener net.Listener) error { - return fcgi.Serve(listener, m) + return fcgi.Serve(listener, http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + if setting.AppSubURL != "" { + req.URL.Path = strings.TrimPrefix(req.URL.Path, setting.AppSubURL) + } + m.ServeHTTP(resp, req) + })) }) if err != nil { log.Fatal("Failed to start FCGI main server: %v", err) diff --git a/cmd/web_letsencrypt.go b/cmd/web_letsencrypt.go new file mode 100644 index 000000000..a68399979 --- /dev/null +++ b/cmd/web_letsencrypt.go @@ -0,0 +1,83 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package cmd + +import ( + "net/http" + "strconv" + "strings" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + + "github.com/caddyserver/certmagic" + context2 "github.com/gorilla/context" +) + +func runLetsEncrypt(listenAddr, domain, directory, email string, m http.Handler) error { + + // If HTTP Challenge enabled, needs to be serving on port 80. For TLSALPN needs 443. + // Due to docker port mapping this can't be checked programmatically + // TODO: these are placeholders until we add options for each in settings with appropriate warning + enableHTTPChallenge := true + enableTLSALPNChallenge := true + altHTTPPort := 0 + altTLSALPNPort := 0 + + if p, err := strconv.Atoi(setting.PortToRedirect); err == nil { + altHTTPPort = p + } + if p, err := strconv.Atoi(setting.HTTPPort); err == nil { + altTLSALPNPort = p + } + + magic := certmagic.NewDefault() + magic.Storage = &certmagic.FileStorage{Path: directory} + myACME := certmagic.NewACMEManager(magic, certmagic.ACMEManager{ + Email: email, + Agreed: setting.LetsEncryptTOS, + DisableHTTPChallenge: !enableHTTPChallenge, + DisableTLSALPNChallenge: !enableTLSALPNChallenge, + ListenHost: setting.HTTPAddr, + AltTLSALPNPort: altTLSALPNPort, + AltHTTPPort: altHTTPPort, + }) + + magic.Issuers = []certmagic.Issuer{myACME} + + // this obtains certificates or renews them if necessary + err := magic.ManageSync([]string{domain}) + if err != nil { + return err + } + + tlsConfig := magic.TLSConfig() + tlsConfig.NextProtos = append(tlsConfig.NextProtos, "h2") + + if enableHTTPChallenge { + go func() { + log.Info("Running Let's Encrypt handler on %s", setting.HTTPAddr+":"+setting.PortToRedirect) + // all traffic coming into HTTP will be redirect to HTTPS automatically (LE HTTP-01 validation happens here) + var err = runHTTP("tcp", setting.HTTPAddr+":"+setting.PortToRedirect, "Let's Encrypt HTTP Challenge", myACME.HTTPChallengeHandler(http.HandlerFunc(runLetsEncryptFallbackHandler))) + if err != nil { + log.Fatal("Failed to start the Let's Encrypt handler on port %s: %v", setting.PortToRedirect, err) + } + }() + } + + return runHTTPSWithTLSConfig("tcp", listenAddr, "Web", tlsConfig, context2.ClearHandler(m)) +} + +func runLetsEncryptFallbackHandler(w http.ResponseWriter, r *http.Request) { + if r.Method != "GET" && r.Method != "HEAD" { + http.Error(w, "Use HTTPS", http.StatusBadRequest) + return + } + // Remove the trailing slash at the end of setting.AppURL, the request + // URI always contains a leading slash, which would result in a double + // slash + target := strings.TrimSuffix(setting.AppURL, "/") + r.URL.RequestURI() + http.Redirect(w, r, target, http.StatusFound) +} diff --git a/contrib/environment-to-ini/README b/contrib/environment-to-ini/README index 642a82d28..f1d3f2ae8 100644 --- a/contrib/environment-to-ini/README +++ b/contrib/environment-to-ini/README @@ -22,11 +22,13 @@ The environment variables should be of the form: GITEA__SECTION_NAME__KEY_NAME +Note, SECTION_NAME in the notation above is case-insensitive. + Environment variables are usually restricted to a reduced character set "0-9A-Z_" - in order to allow the setting of sections with characters outside of that set, they should be escaped as following: -"_0X2E_" for ".". The entire section and key names can be escaped as -a UTF8 byte string if necessary. E.g. to configure: +"_0X2E_" for "." and "_0X2D_" for "-". The entire section and key names +can be escaped as a UTF8 byte string if necessary. E.g. to configure: """ ... @@ -40,27 +42,6 @@ You would set the environment variables: "GITEA__LOG_0x2E_CONSOLE__COLORIZE=fals and "GITEA__LOG_0x2E_CONSOLE__STDERR=false". Other examples can be found on the configuration cheat sheet. -To plug this command in to the docker, you simply compile the provided go file using: - - go build environment-to-ini.go - -And copy the resulting `environment-to-ini` command to /app/gitea in the docker. - -Apply the below patch to /etc/s6/gitea.setup to wire this in. - -If you find this useful please comment on #7287 - - -diff --git a/docker/root/etc/s6/gitea/setup b/docker/root/etc/s6/gitea/setup -index f87ce9115..565bfcba9 100755 ---- a/docker/root/etc/s6/gitea/setup -+++ b/docker/root/etc/s6/gitea/setup -@@ -44,6 +44,8 @@ if [ ! -f ${GITEA_CUSTOM}/conf/app.ini ]; then - SECRET_KEY=${SECRET_KEY:-""} \ - envsubst < /etc/templates/app.ini > ${GITEA_CUSTOM}/conf/app.ini - -+ /app/gitea/environment-to-ini -c ${GITEA_CUSTOM}/conf/app.ini -+ - chown ${USER}:git ${GITEA_CUSTOM}/conf/app.ini - fi +To build locally, run: + go build contrib/environment-to-ini/environment-to-ini.go diff --git a/contrib/environment-to-ini/environment-to-ini.go b/contrib/environment-to-ini/environment-to-ini.go index bfba2c314..aade25190 100644 --- a/contrib/environment-to-ini/environment-to-ini.go +++ b/contrib/environment-to-ini/environment-to-ini.go @@ -110,6 +110,8 @@ func runEnvironmentToIni(c *cli.Context) error { } cfg.NameMapper = ini.SnackCase + changed := false + prefix := c.String("prefix") + "__" for _, kv := range os.Environ() { @@ -143,15 +145,21 @@ func runEnvironmentToIni(c *cli.Context) error { continue } } + oldValue := key.Value() + if !changed && oldValue != value { + changed = true + } key.SetValue(value) } destination := c.String("out") if len(destination) == 0 { destination = setting.CustomConf } - err = cfg.SaveTo(destination) - if err != nil { - return err + if destination != setting.CustomConf || changed { + err = cfg.SaveTo(destination) + if err != nil { + return err + } } if c.Bool("clear") { for _, kv := range os.Environ() { @@ -224,5 +232,6 @@ func DecodeSectionKey(encoded string) (string, string) { } else { key += remaining } + section = strings.ToLower(section) return section, key } diff --git a/contrib/pr/checkout.go b/contrib/pr/checkout.go index 9346577bd..902c9ea62 100644 --- a/contrib/pr/checkout.go +++ b/contrib/pr/checkout.go @@ -26,12 +26,12 @@ import ( "time" "code.gitea.io/gitea/models" + gitea_git "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/external" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers" - "code.gitea.io/gitea/routers/routes" "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/config" @@ -80,7 +80,7 @@ func runPR() { setting.RunUser = curUser.Username log.Printf("[PR] Loading fixtures data ...\n") - setting.CheckLFSVersion() + gitea_git.CheckLFSVersion() //models.LoadConfigs() /* setting.Database.Type = "sqlite3" @@ -114,11 +114,9 @@ func runPR() { log.Printf("[PR] Setting up router\n") //routers.GlobalInit() - external.RegisterParsers() + external.RegisterRenderers() markup.Init() - c := routes.NewChi() - c.Mount("/", routes.NormalRoutes()) - routes.DelegateToMacaron(c) + c := routers.NormalRoutes() log.Printf("[PR] Ready for testing !\n") log.Printf("[PR] Login with user1, user2, user3, ... with pass: password\n") diff --git a/contrib/systemd/gitea.service b/contrib/systemd/gitea.service index ac6a13ec5..d6a4377ec 100644 --- a/contrib/systemd/gitea.service +++ b/contrib/systemd/gitea.service @@ -3,14 +3,23 @@ Description=Gitea (Git with a cup of tea) After=syslog.target After=network.target ### -# Don't forget to add the database service requirements +# Don't forget to add the database service dependencies ### # -#Requires=mysql.service -#Requires=mariadb.service -#Requires=postgresql.service -#Requires=memcached.service -#Requires=redis.service +#Wants=mysql.service +#After=mysql.service +# +#Wants=mariadb.service +#After=mariadb.service +# +#Wants=postgresql.service +#After=postgresql.service +# +#Wants=memcached.service +#After=memcached.service +# +#Wants=redis.service +#After=redis.service # ### # If using socket activation for main http/s diff --git a/contrib/update_dependencies.sh b/contrib/update_dependencies.sh new file mode 100755 index 000000000..f6f26c66c --- /dev/null +++ b/contrib/update_dependencies.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +grep 'git' go.mod | grep '\.com' | grep -v indirect | grep -v replace | cut -f 2 | cut -d ' ' -f 1 | while read line; do + go get -u "$line" + make vendor + git add . + git commit -S -m "update $line" +done diff --git a/custom/conf/app.example.ini b/custom/conf/app.example.ini index 045b4cfed..40d5742ef 100644 --- a/custom/conf/app.example.ini +++ b/custom/conf/app.example.ini @@ -1,1239 +1,2138 @@ ; This file lists the default values used by Gitea -; Copy required sections to your own app.ini (default is custom/conf/app.ini) -; and modify as needed. -; Do not copy the whole file as-is, as it contains some invalid sections for illustrative purposes. -; If you don't know what a setting is you should not set it. +;; Copy required sections to your own app.ini (default is custom/conf/app.ini) +;; and modify as needed. +;; Do not copy the whole file as-is, as it contains some invalid sections for illustrative purposes. +;; If you don't know what a setting is you should not set it. +;; +;; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation. -; see https://docs.gitea.io/en-us/config-cheat-sheet/ for additional documentation. -; App name that shows in every page title -APP_NAME = Gitea: Git with a cup of tea -; Change it if you run locally -RUN_USER = git -; Application run mode, affects performance and debugging. Either "dev", "prod" or "test", default is "prod" -RUN_MODE = prod - -[project] -; Default templates for project boards -PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done -PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed - -[repository] -; Root path for storing all repository data. It must be an absolute path. By default it is stored in a sub-directory of `APP_DATA_PATH`. -ROOT = -; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available. -SCRIPT_TYPE = bash -; DETECTED_CHARSETS_ORDER tie-break order for detected charsets. -; If the charsets have equal confidence, tie-breaking will be done by order in this list -; with charsets earlier in the list chosen in preference to those later. -; Adding "defaults" will place the unused charsets at that position. -DETECTED_CHARSETS_ORDER = UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr -; Default ANSI charset to override non-UTF-8 charsets to -ANSI_CHARSET = -; Force every new repository to be private -FORCE_PRIVATE = false -; Default privacy setting when creating a new repository, allowed values: last, private, public. Default is last which means the last setting used. -DEFAULT_PRIVATE = last -; Default private when using push-to-create -DEFAULT_PUSH_CREATE_PRIVATE = true -; Global limit of repositories per user, applied at creation time. -1 means no limit -MAX_CREATION_LIMIT = -1 -; Mirror sync queue length, increase if mirror syncing starts hanging -MIRROR_QUEUE_LENGTH = 1000 -; Patch test queue length, increase if pull request patch testing starts hanging -PULL_REQUEST_QUEUE_LENGTH = 1000 -; Preferred Licenses to place at the top of the List -; The name here must match the filename in conf/license or custom/conf/license -PREFERRED_LICENSES = Apache License 2.0,MIT License -; Disable the ability to interact with repositories using the HTTP protocol -DISABLE_HTTP_GIT = false -; Value for Access-Control-Allow-Origin header, default is not to present -; WARNING: This maybe harmful to you website if you do not give it a right value. -ACCESS_CONTROL_ALLOW_ORIGIN = -; Force ssh:// clone url instead of scp-style uri when default SSH port is used -USE_COMPAT_SSH_URI = false -; Close issues as long as a commit on any branch marks it as fixed -DEFAULT_CLOSE_ISSUES_VIA_COMMITS_IN_ANY_BRANCH = false -; Allow users to push local repositories to Gitea and have them automatically created for a user or an org -ENABLE_PUSH_CREATE_USER = false -ENABLE_PUSH_CREATE_ORG = false -; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki -DISABLED_REPO_UNITS = -; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects. -; Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility. -; External wiki and issue tracker can't be enabled by default as it requires additional settings. -; Disabled repo units will not be added to new repositories regardless if it is in the default list. -DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects -; Prefix archive files by placing them in a directory named after the repository -PREFIX_ARCHIVE_FILES = true -; Disable the creation of new mirrors. Pre-existing mirrors remain valid. -DISABLE_MIRRORS = false -; Disable migrating feature. -DISABLE_MIGRATIONS = false -; The default branch name of new repositories -DEFAULT_BRANCH = master -; Allow adoption of unadopted repositories -ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES = false -; Allow deletion of unadopted repositories -ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false - -[repository.editor] -; List of file extensions for which lines should be wrapped in the Monaco editor -; Separate extensions with a comma. To line wrap files without an extension, just put a comma -LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd, -; Valid file modes that have a preview API associated with them, such as api/v1/markdown -; Separate the values by commas. The preview tab in edit mode won't be displayed if the file extension doesn't match -PREVIEWABLE_FILE_MODES = markdown - -[repository.local] -; Path for local repository copy. Defaults to `tmp/local-repo` -LOCAL_COPY_PATH = tmp/local-repo - -[repository.upload] -; Whether repository file uploads are enabled. Defaults to `true` -ENABLED = true -; Path for uploads. Defaults to `data/tmp/uploads` (tmp gets deleted on gitea restart) -TEMP_PATH = data/tmp/uploads -; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. -ALLOWED_TYPES = -; Max size of each file in megabytes. Defaults to 3MB -FILE_MAX_SIZE = 3 -; Max number of files per upload. Defaults to 5 -MAX_FILES = 5 - -[repository.pull-request] -; List of prefixes used in Pull Request title to mark them as Work In Progress -WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP] -; List of keywords used in Pull Request comments to automatically close a related issue -CLOSE_KEYWORDS = close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved -; List of keywords used in Pull Request comments to automatically reopen a related issue -REOPEN_KEYWORDS = reopen,reopens,reopened -; In the default merge message for squash commits include at most this many commits -DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT = 50 -; In the default merge message for squash commits limit the size of the commit messages to this -DEFAULT_MERGE_MESSAGE_SIZE = 5120 -; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list -DEFAULT_MERGE_MESSAGE_ALL_AUTHORS = false -; In default merge messages limit the number of approvers listed as Reviewed-by: to this many -DEFAULT_MERGE_MESSAGE_MAX_APPROVERS = 10 -; In default merge messages only include approvers who are official -DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = true - -[repository.issue] -; List of reasons why a Pull Request or Issue can be locked -LOCK_REASONS = Too heated,Off-topic,Resolved,Spam - -[repository.release] -; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. -ALLOWED_TYPES = - -[repository.signing] -; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey -; run in the context of the RUN_USER -; Switch to none to stop signing completely -SIGNING_KEY = default -; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer. -; These should match a publicized name and email address for the key. (When SIGNING_KEY is default these are set to -; the results of git config --get user.name and git config --get user.email respectively and can only be overrided -; by setting the SIGNING_KEY ID to the correct ID.) -SIGNING_NAME = -SIGNING_EMAIL = -; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter -DEFAULT_TRUST_MODEL = collaborator -; Determines when gitea should sign the initial commit when creating a repository -; Either: -; - never -; - pubkey: only sign if the user has a pubkey -; - twofa: only sign if the user has logged in with twofa -; - always -; options other than none and always can be combined as comma separated list -INITIAL_COMMIT = always -; Determines when to sign for CRUD actions -; - as above -; - parentsigned: requires that the parent commit is signed. -CRUD_ACTIONS = pubkey, twofa, parentsigned -; Determines when to sign Wiki commits -; - as above -WIKI = never -; Determines when to sign on merges -; - basesigned: require that the parent of commit on the base repo is signed. -; - commitssigned: require that all the commits in the head branch are signed. -; - approved: only sign when merging an approved pr to a protected branch -MERGES = pubkey, twofa, basesigned, commitssigned - -[cors] -; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers -; enable cors headers (disabled by default) -ENABLED = false -; scheme of allowed requests -SCHEME = http -; list of requesting domains that are allowed -ALLOW_DOMAIN = * -; allow subdomains of headers listed above to request -ALLOW_SUBDOMAIN = false -; list of methods allowed to request -METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS -; max time to cache response -MAX_AGE = 10m -; allow request with credentials -ALLOW_CREDENTIALS = false - -[ui] -; Number of repositories that are displayed on one explore page -EXPLORE_PAGING_NUM = 20 -; Number of issues that are displayed on one page -ISSUE_PAGING_NUM = 10 -; Number of maximum commits displayed in one activity feed -FEED_MAX_COMMIT_NUM = 5 -; Number of items that are displayed in home feed -FEED_PAGING_NUM = 20 -; Number of maximum commits displayed in commit graph. -GRAPH_MAX_COMMIT_NUM = 100 -; Number of line of codes shown for a code comment -CODE_COMMENT_LINES = 4 -; Value of `theme-color` meta tag, used by Android >= 5.0 -; An invalid color like "none" or "disable" will have the default style -; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android -THEME_COLOR_META_TAG = `#6cc644` -; Max size of files to be displayed (default is 8MiB) -MAX_DISPLAY_FILE_SIZE = 8388608 -; Whether the email of the user should be shown in the Explore Users page -SHOW_USER_EMAIL = true -; Set the default theme for the Gitea install -DEFAULT_THEME = gitea -; All available themes. Allow users select personalized themes regardless of the value of `DEFAULT_THEME`. -THEMES = gitea,arc-green -;All available reactions users can choose on issues/prs and comments. -;Values can be emoji alias (:smile:) or a unicode emoji. -;For custom reactions, add a tightly cropped square image to public/emoji/img/reaction_name.png -REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes -; Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used. -DEFAULT_SHOW_FULL_NAME = false -; Whether to search within description at repository search on explore page. -SEARCH_REPO_DESCRIPTION = true -; Whether to enable a Service Worker to cache frontend assets -USE_SERVICE_WORKER = true - -[ui.admin] -; Number of users that are displayed on one page -USER_PAGING_NUM = 50 -; Number of repos that are displayed on one page -REPO_PAGING_NUM = 50 -; Number of notices that are displayed on one page -NOTICE_PAGING_NUM = 25 -; Number of organizations that are displayed on one page -ORG_PAGING_NUM = 50 - -[ui.user] -; Number of repos that are displayed on one page -REPO_PAGING_NUM = 15 - -[ui.meta] -AUTHOR = Gitea - Git with a cup of tea -DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go -KEYWORDS = go,git,self-hosted,gitea - -[ui.notification] -; Control how often the notification endpoint is polled to update the notification -; The timeout will increase to MAX_TIMEOUT in TIMEOUT_STEPs if the notification count is unchanged -; Set MIN_TIMEOUT to 0 to turn off -MIN_TIMEOUT = 10s -MAX_TIMEOUT = 60s -TIMEOUT_STEP = 10s -; This setting determines how often the db is queried to get the latest notification counts. -; If the browser client supports EventSource and SharedWorker, a SharedWorker will be used in preference to polling notification. Set to -1 to disable the EventSource -EVENT_SOURCE_UPDATE_TIME = 10s - -[ui.svg] -; Whether to render SVG files as images. If SVG rendering is disabled, SVG files are displayed as text and cannot be embedded in markdown files as images. -ENABLE_RENDER = true - -[markdown] -; Render soft line breaks as hard line breaks, which means a single newline character between -; paragraphs will cause a line break and adding trailing whitespace to paragraphs is not -; necessary to force a line break. -; Render soft line breaks as hard line breaks for comments -ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true -; Render soft line breaks as hard line breaks for markdown documents -ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS = false -; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown -; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes) -; URLs starting with http and https are always displayed, whatever is put in this entry. -CUSTOM_URL_SCHEMES = -; List of file extensions that should be rendered/edited as Markdown -; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma -FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; General Settings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; App name that shows in every page title +APP_NAME = ; Gitea: Git with a cup of tea +;; +;; RUN_USER will automatically detect the current user - but you can set it here change it if you run locally +RUN_USER = ; git +;; +;; Application run mode, affects performance and debugging. Either "dev", "prod" or "test", default is "prod" +RUN_MODE = ; prod +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [server] -; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'. -PROTOCOL = http -DOMAIN = localhost -ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/ -; when STATIC_URL_PREFIX is empty it will follow ROOT_URL -STATIC_URL_PREFIX = -; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket. -HTTP_ADDR = 0.0.0.0 -; The port to listen on. Leave empty when using a unix socket. -HTTP_PORT = 3000 -; If REDIRECT_OTHER_PORT is true, and PROTOCOL is set to https an http server -; will be started on PORT_TO_REDIRECT and it will redirect plain, non-secure http requests to the main -; ROOT_URL. Defaults are false for REDIRECT_OTHER_PORT and 80 for -; PORT_TO_REDIRECT. -REDIRECT_OTHER_PORT = false -PORT_TO_REDIRECT = 80 -; Permission for unix socket -UNIX_SOCKET_PERMISSION = 666 -; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service. -; In most cases you do not need to change the default value. -; Alter it only if your SSH server node is not the same as HTTP node. -; Do not set this variable if PROTOCOL is set to 'unix'. -LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/ -; Disable SSH feature when not available -DISABLE_SSH = false -; Whether to use the builtin SSH server or not. -START_SSH_SERVER = false -; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER. -BUILTIN_SSH_SERVER_USER = -; Domain name to be exposed in clone URL -SSH_DOMAIN = %(DOMAIN)s -; The network interface the builtin SSH server should listen on -SSH_LISTEN_HOST = -; Port number to be exposed in clone URL -SSH_PORT = 22 -; The port number the builtin SSH server should listen on -SSH_LISTEN_PORT = %(SSH_PORT)s -; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'. -SSH_ROOT_PATH = -; Gitea will create a authorized_keys file by default when it is not using the internal ssh server -; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off. -SSH_CREATE_AUTHORIZED_KEYS_FILE = true -; Gitea will create a authorized_principals file by default when it is not using the internal ssh server -; If you intend to use the AuthorizedPrincipalsCommand functionality then you should turn this off. -SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE = true -; For the built-in SSH server, choose the ciphers to support for SSH connections, -; for system SSH this setting has no effect -SSH_SERVER_CIPHERS = aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128 -; For the built-in SSH server, choose the key exchange algorithms to support for SSH connections, -; for system SSH this setting has no effect -SSH_SERVER_KEY_EXCHANGES = diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, curve25519-sha256@libssh.org -; For the built-in SSH server, choose the MACs to support for SSH connections, -; for system SSH this setting has no effect -SSH_SERVER_MACS = hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1, hmac-sha1-96 -; Directory to create temporary files in when testing public keys using ssh-keygen, -; default is the system temporary directory. -SSH_KEY_TEST_PATH = -; Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call. -SSH_KEYGEN_PATH = ssh-keygen -; Enable SSH Authorized Key Backup when rewriting all keys, default is true -SSH_AUTHORIZED_KEYS_BACKUP = true -; Determines which principals to allow -; - empty: if SSH_TRUSTED_USER_CA_KEYS is empty this will default to off, otherwise will default to email, username. -; - off: Do not allow authorized principals -; - email: the principal must match the user's email -; - username: the principal must match the user's username -; - anything: there will be no checking on the content of the principal -SSH_AUTHORIZED_PRINCIPALS_ALLOW = email, username -; Enable SSH Authorized Principals Backup when rewriting all keys, default is true -SSH_AUTHORIZED_PRINCIPALS_BACKUP = true -; Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. -; Multiple keys should be comma separated. -; E.g."ssh- ". or "ssh- , ssh- ". -; For more information see "TrustedUserCAKeys" in the sshd config manpages. -SSH_TRUSTED_USER_CA_KEYS = -; Absolute path of the `TrustedUserCaKeys` file gitea will manage. -; Default this `RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem -; If you're running your own ssh server and you want to use the gitea managed file you'll also need to modify your -; sshd_config to point to this file. The official docker image will automatically work without further configuration. -SSH_TRUSTED_USER_CA_KEYS_FILENAME = -; Enable exposure of SSH clone URL to anonymous visitors, default is false -SSH_EXPOSE_ANONYMOUS = false -; Indicate whether to check minimum key size with corresponding type -MINIMUM_KEY_SIZE_CHECK = false -; Disable CDN even in "prod" mode -OFFLINE_MODE = false -DISABLE_ROUTER_LOG = false -; Generate steps: -; $ ./gitea cert -ca=true -duration=8760h0m0s -host=myhost.example.com -; -; Or from a .pfx file exported from the Windows certificate store (do -; not forget to export the private key): -; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys -; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes -; Paths are relative to CUSTOM_PATH -CERT_FILE = https/cert.pem -KEY_FILE = https/key.pem -; Root directory containing templates and static files. -; default is the path where Gitea is executed -STATIC_ROOT_PATH = -; Default path for App data -APP_DATA_PATH = data -; Enable gzip compression for runtime-generated content, static resources excluded -ENABLE_GZIP = false -; Application profiling (memory and cpu) -; For "web" command it listens on localhost:6060 -; For "serve" command it dumps to disk at PPROF_DATA_PATH as (cpuprofile|memprofile)__ -ENABLE_PPROF = false -; PPROF_DATA_PATH, use an absolute path when you start gitea as service -PPROF_DATA_PATH = data/tmp/pprof -; Landing page, can be "home", "explore", "organizations" or "login" -; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in. -LANDING_PAGE = home -; Enables git-lfs support. true or false, default is false. -LFS_START_SERVER = false -; Where your lfs files reside, default is data/lfs. -LFS_CONTENT_PATH = data/lfs -; LFS authentication secret, change this yourself +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; The protocol the server listens on. One of 'http', 'https', 'unix' or 'fcgi'. Defaults to 'http' +;PROTOCOL = http +;; +;; Set the domain for the server +;DOMAIN = localhost +;; +;; Overwrite the automatically generated public URL. Necessary for proxies and docker. +;ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/ +;; +;; when STATIC_URL_PREFIX is empty it will follow ROOT_URL +;STATIC_URL_PREFIX = +;; +;; The address to listen on. Either a IPv4/IPv6 address or the path to a unix socket. +;HTTP_ADDR = 0.0.0.0 +;; +;; The port to listen on. Leave empty when using a unix socket. +;HTTP_PORT = 3000 +;; +;; If REDIRECT_OTHER_PORT is true, and PROTOCOL is set to https an http server +;; will be started on PORT_TO_REDIRECT and it will redirect plain, non-secure http requests to the main +;; ROOT_URL. Defaults are false for REDIRECT_OTHER_PORT and 80 for +;; PORT_TO_REDIRECT. +;REDIRECT_OTHER_PORT = false +;PORT_TO_REDIRECT = 80 +;; +;; Timeout for any write to the connection. (Set to 0 to disable all timeouts.) +;PER_WRITE_TIMEOUT = 30s +;; +;; Timeout per Kb written to connections. +;PER_WRITE_PER_KB_TIMEOUT = 30s +;; +;; Permission for unix socket +;UNIX_SOCKET_PERMISSION = 666 +;; +;; Local (DMZ) URL for Gitea workers (such as SSH update) accessing web service. +;; In most cases you do not need to change the default value. +;; Alter it only if your SSH server node is not the same as HTTP node. +;; Do not set this variable if PROTOCOL is set to 'unix'. +;LOCAL_ROOT_URL = %(PROTOCOL)s://%(HTTP_ADDR)s:%(HTTP_PORT)s/ +;; +;; Disable SSH feature when not available +;DISABLE_SSH = false +;; +;; Whether to use the builtin SSH server or not. +;START_SSH_SERVER = false +;; +;; Username to use for the builtin SSH server. If blank, then it is the value of RUN_USER. +;BUILTIN_SSH_SERVER_USER = +;; +;; Domain name to be exposed in clone URL +;SSH_DOMAIN = %(DOMAIN)s +;; +;; The network interface the builtin SSH server should listen on +;SSH_LISTEN_HOST = +;; +;; Port number to be exposed in clone URL +;SSH_PORT = 22 +;; +;; The port number the builtin SSH server should listen on +;SSH_LISTEN_PORT = %(SSH_PORT)s +;; +;; Root path of SSH directory, default is '~/.ssh', but you have to use '/home/git/.ssh'. +;SSH_ROOT_PATH = +;; +;; Gitea will create a authorized_keys file by default when it is not using the internal ssh server +;; If you intend to use the AuthorizedKeysCommand functionality then you should turn this off. +;SSH_CREATE_AUTHORIZED_KEYS_FILE = true +;; +;; Gitea will create a authorized_principals file by default when it is not using the internal ssh server +;; If you intend to use the AuthorizedPrincipalsCommand functionality then you should turn this off. +;SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE = true +;; +;; For the built-in SSH server, choose the ciphers to support for SSH connections, +;; for system SSH this setting has no effect +;SSH_SERVER_CIPHERS = aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128 +;; +;; For the built-in SSH server, choose the key exchange algorithms to support for SSH connections, +;; for system SSH this setting has no effect +;SSH_SERVER_KEY_EXCHANGES = diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, curve25519-sha256@libssh.org +;; +;; For the built-in SSH server, choose the MACs to support for SSH connections, +;; for system SSH this setting has no effect +;SSH_SERVER_MACS = hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1, hmac-sha1-96 +;; +;; For the built-in SSH server, choose the keypair to offer as the host key +;; The private key should be at SSH_SERVER_HOST_KEY and the public SSH_SERVER_HOST_KEY.pub +;; relative paths are made absolute relative to the APP_DATA_PATH +;SSH_SERVER_HOST_KEYS=ssh/gitea.rsa, ssh/gogs.rsa +;; +;; Directory to create temporary files in when testing public keys using ssh-keygen, +;; default is the system temporary directory. +;SSH_KEY_TEST_PATH = +;; +;; Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call. +;SSH_KEYGEN_PATH = ssh-keygen +;; +;; Enable SSH Authorized Key Backup when rewriting all keys, default is true +;SSH_AUTHORIZED_KEYS_BACKUP = true +;; +;; Determines which principals to allow +;; - empty: if SSH_TRUSTED_USER_CA_KEYS is empty this will default to off, otherwise will default to email, username. +;; - off: Do not allow authorized principals +;; - email: the principal must match the user's email +;; - username: the principal must match the user's username +;; - anything: there will be no checking on the content of the principal +;SSH_AUTHORIZED_PRINCIPALS_ALLOW = email, username +;; +;; Enable SSH Authorized Principals Backup when rewriting all keys, default is true +;SSH_AUTHORIZED_PRINCIPALS_BACKUP = true +;; +;; Specifies the public keys of certificate authorities that are trusted to sign user certificates for authentication. +;; Multiple keys should be comma separated. +;; E.g."ssh- ". or "ssh- , ssh- ". +;; For more information see "TrustedUserCAKeys" in the sshd config manpages. +;SSH_TRUSTED_USER_CA_KEYS = +;; Absolute path of the `TrustedUserCaKeys` file gitea will manage. +;; Default this `RUN_USER`/.ssh/gitea-trusted-user-ca-keys.pem +;; If you're running your own ssh server and you want to use the gitea managed file you'll also need to modify your +;; sshd_config to point to this file. The official docker image will automatically work without further configuration. +;SSH_TRUSTED_USER_CA_KEYS_FILENAME = +;; +;; Enable exposure of SSH clone URL to anonymous visitors, default is false +;SSH_EXPOSE_ANONYMOUS = false +;; +;; Timeout for any write to ssh connections. (Set to 0 to disable all timeouts.) +;; Will default to the PER_WRITE_TIMEOUT. +;SSH_PER_WRITE_TIMEOUT = 30s +;; +;; Timeout per Kb written to ssh connections. +;; Will default to the PER_WRITE_PER_KB_TIMEOUT. +;SSH_PER_WRITE_PER_KB_TIMEOUT = 30s +;; +;; Indicate whether to check minimum key size with corresponding type +;MINIMUM_KEY_SIZE_CHECK = false +;; +;; Disable CDN even in "prod" mode +;OFFLINE_MODE = false +;DISABLE_ROUTER_LOG = false +;; +;; Generate steps: +;; $ ./gitea cert -ca=true -duration=8760h0m0s -host=myhost.example.com +;; +;; Or from a .pfx file exported from the Windows certificate store (do +;; not forget to export the private key): +;; $ openssl pkcs12 -in cert.pfx -out cert.pem -nokeys +;; $ openssl pkcs12 -in cert.pfx -out key.pem -nocerts -nodes +;; Paths are relative to CUSTOM_PATH +;CERT_FILE = https/cert.pem +;KEY_FILE = https/key.pem +;; +;; Root directory containing templates and static files. +;; default is the path where Gitea is executed +;STATIC_ROOT_PATH = +;; +;; Default path for App data +;APP_DATA_PATH = data +;; +;; Enable gzip compression for runtime-generated content, static resources excluded +;ENABLE_GZIP = false +;; +;; Application profiling (memory and cpu) +;; For "web" command it listens on localhost:6060 +;; For "serve" command it dumps to disk at PPROF_DATA_PATH as (cpuprofile|memprofile)__ +;ENABLE_PPROF = false +;; +;; PPROF_DATA_PATH, use an absolute path when you start gitea as service +;PPROF_DATA_PATH = data/tmp/pprof +;; +;; Landing page, can be "home", "explore", "organizations" or "login" +;; The "login" choice is not a security measure but just a UI flow change, use REQUIRE_SIGNIN_VIEW to force users to log in. +;LANDING_PAGE = home +;; +;; Enables git-lfs support. true or false, default is false. +;LFS_START_SERVER = false +;; +;; Where your lfs files reside, default is data/lfs. +;LFS_CONTENT_PATH = data/lfs +;; +;; LFS authentication secret, change this yourself LFS_JWT_SECRET = -; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail. -LFS_HTTP_AUTH_EXPIRY = 20m -; Maximum allowed LFS file size in bytes (Set to 0 for no limit). -LFS_MAX_FILE_SIZE = 0 -; Maximum number of locks returned per page -LFS_LOCKS_PAGING_NUM = 50 -; Allow graceful restarts using SIGHUP to fork -ALLOW_GRACEFUL_RESTARTS = true -; After a restart the parent will finish ongoing requests before -; shutting down. Force shutdown if this process takes longer than this delay. -; set to a negative value to disable -GRACEFUL_HAMMER_TIME = 60s -; Allows the setting of a startup timeout and waithint for Windows as SVC service -; 0 disables this. -STARTUP_TIMEOUT = 0 -; Static resources, includes resources on custom/, public/ and all uploaded avatars web browser cache time. Note that this cache is disabled when RUN_MODE is "dev". Default is 6h -STATIC_CACHE_TIME = 6h - -; Define allowed algorithms and their minimum key length (use -1 to disable a type) -[ssh.minimum_key_sizes] -ED25519 = 256 -ECDSA = 256 -RSA = 2048 -DSA = -1 ; set to 1024 to switch on +;; +;; LFS authentication validity period (in time.Duration), pushes taking longer than this may fail. +;LFS_HTTP_AUTH_EXPIRY = 20m +;; +;; Maximum allowed LFS file size in bytes (Set to 0 for no limit). +;LFS_MAX_FILE_SIZE = 0 +;; +;; Maximum number of locks returned per page +;LFS_LOCKS_PAGING_NUM = 50 +;; +;; Allow graceful restarts using SIGHUP to fork +;ALLOW_GRACEFUL_RESTARTS = true +;; +;; After a restart the parent will finish ongoing requests before +;; shutting down. Force shutdown if this process takes longer than this delay. +;; set to a negative value to disable +;GRACEFUL_HAMMER_TIME = 60s +;; +;; Allows the setting of a startup timeout and waithint for Windows as SVC service +;; 0 disables this. +;STARTUP_TIMEOUT = 0 +;; +;; Static resources, includes resources on custom/, public/ and all uploaded avatars web browser cache time. Note that this cache is disabled when RUN_MODE is "dev". Default is 6h +;STATIC_CACHE_TIME = 6h +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [database] -; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3". +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Database to use. Either "mysql", "postgres", "mssql" or "sqlite3". +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; MySQL Configuration +;; DB_TYPE = mysql -HOST = 127.0.0.1:3306 +HOST = 127.0.0.1:3306 ; can use socket e.g. /var/run/mysqld/mysqld.sock NAME = gitea USER = root -; Use PASSWD = `your password` for quoting if you use special characters in the password. -PASSWD = -; For Postgres, schema to use if different from "public". The schema must exist beforehand, -; the user must have creation privileges on it, and the user search path must be set -; to the look into the schema first. e.g.:ALTER USER user SET SEARCH_PATH = schema_name,"$user",public; -SCHEMA = -; For Postgres, either "disable" (default), "require", or "verify-full" -; For MySQL, either "false" (default), "true", or "skip-verify" -SSL_MODE = disable -; For MySQL only, either "utf8" or "utf8mb4", default is "utf8mb4". -; NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this. -CHARSET = utf8mb4 -; For "sqlite3" and "tidb", use an absolute path when you start gitea as service -PATH = data/gitea.db -; For "sqlite3" only. Query timeout -SQLITE_TIMEOUT = 500 -; For iterate buffer, default is 50 -ITERATE_BUFFER_SIZE = 50 -; Show the database generated SQL -LOG_SQL = true -; Maximum number of DB Connect retries -DB_RETRIES = 10 -; Backoff time per DB retry (time.Duration) -DB_RETRY_BACKOFF = 3s -; Max idle database connections on connnection pool, default is 2 -MAX_IDLE_CONNS = 2 -; Database connection max life time, default is 0 or 3s mysql (See #6804 & #7071 for reasoning) -CONN_MAX_LIFETIME = 3s -; Database maximum number of open connections, default is 0 meaning no maximum -MAX_OPEN_CONNS = 0 - -[indexer] -; Issue indexer type, currently support: bleve, db or elasticsearch, default is bleve -ISSUE_INDEXER_TYPE = bleve -; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch -ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200 -; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch -ISSUE_INDEXER_NAME = gitea_issues -; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve -ISSUE_INDEXER_PATH = indexers/issues.bleve -; Issue indexer queue, currently support: channel, levelqueue or redis, default is levelqueue -ISSUE_INDEXER_QUEUE_TYPE = levelqueue -; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the path where the queue will be saved. -; This can be overriden by `ISSUE_INDEXER_QUEUE_CONN_STR`. -; default is indexers/issues.queue -ISSUE_INDEXER_QUEUE_DIR = indexers/issues.queue -; When `ISSUE_INDEXER_QUEUE_TYPE` is `redis`, this will store the redis connection string. -; When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this is a directory or additional options of -; the form `leveldb://path/to/db?option=value&....`, and overrides `ISSUE_INDEXER_QUEUE_DIR`. -ISSUE_INDEXER_QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0" -; Batch queue number, default is 20 -ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20 -; Timeout the indexer if it takes longer than this to start. -; Set to zero to disable timeout. -STARTUP_TIMEOUT = 30s - -; repo indexer by default disabled, since it uses a lot of disk space -REPO_INDEXER_ENABLED = false -; Code search engine type, could be `bleve` or `elasticsearch`. -REPO_INDEXER_TYPE = bleve -; Index file used for code search. -REPO_INDEXER_PATH = indexers/repos.bleve -; Code indexer connection string, available when `REPO_INDEXER_TYPE` is elasticsearch. i.e. http://elastic:changeme@localhost:9200 -REPO_INDEXER_CONN_STR = -; Code indexer name, available when `REPO_INDEXER_TYPE` is elasticsearch -REPO_INDEXER_NAME = gitea_codes - -UPDATE_BUFFER_LEN = 20 -MAX_FILE_SIZE = 1048576 -; A comma separated list of glob patterns (see https://github.com/gobwas/glob) to include -; in the index; default is empty -REPO_INDEXER_INCLUDE = -; A comma separated list of glob patterns to exclude from the index; ; default is empty -REPO_INDEXER_EXCLUDE = - -[queue] -; Specific queues can be individually configured with [queue.name]. [queue] provides defaults -; -; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy -; default to persistable-channel -TYPE = persistable-channel -; data-dir for storing persistable queues and level queues, individual queues will be named by their type -DATADIR = queues/ -; Default queue length before a channel queue will block -LENGTH = 20 -; Batch size to send for batched queues -BATCH_LENGTH = 20 -; Connection string for redis queues this will store the redis connection string. -; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb -; or additional options of the form `leveldb://path/to/db?option=value&....`, and will override `DATADIR`. -CONN_STR = "addrs=127.0.0.1:6379 db=0" -; Provides the suffix of the default redis/disk queue name - specific queues can be overriden within in their [queue.name] sections. -QUEUE_NAME = "_queue" -; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overriden within in their [queue.name] sections. -SET_NAME = "_unique" -; If the queue cannot be created at startup - level queues may need a timeout at startup - wrap the queue: -WRAP_IF_NECESSARY = true -; Attempt to create the wrapped queue at max -MAX_ATTEMPTS = 10 -; Timeout queue creation -TIMEOUT = 15m30s -; Create a pool with this many workers -WORKERS = 1 -; Dynamically scale the worker pool to at this many workers -MAX_WORKERS = 10 -; Add boost workers when the queue blocks for BLOCK_TIMEOUT -BLOCK_TIMEOUT = 1s -; Remove the boost workers after BOOST_TIMEOUT -BOOST_TIMEOUT = 5m -; During a boost add BOOST_WORKERS -BOOST_WORKERS = 5 - -[admin] -; Disallow regular (non-admin) users from creating organizations. -DISABLE_REGULAR_ORG_CREATION = false -; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled -DEFAULT_EMAIL_NOTIFICATIONS = enabled +;PASSWD = ;Use PASSWD = `your password` for quoting if you use special characters in the password. +;SSL_MODE = false ; either "false" (default), "true", or "skip-verify" +;CHARSET = utf8mb4 ;either "utf8" or "utf8mb4", default is "utf8mb4". +;; +;; NOTICE: for "utf8mb4" you must use MySQL InnoDB > 5.6. Gitea is unable to check this. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Postgres Configuration +;; +;DB_TYPE = postgres +;HOST = 127.0.0.1:5432 ; can use socket e.g. /var/run/postgresql/ +;NAME = gitea +;USER = root +;PASSWD = +;SCHEMA = +;SSL_MODE=disable ;either "disable" (default), "require", or "verify-full" +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; SQLite Configuration +;; +;DB_TYPE = sqlite3 +;PATH= ; defaults to data/gitea.db +;SQLITE_TIMEOUT = ; Query timeout defaults to: 500 +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; MSSQL Configuration +;; +;DB_TYPE = mssql +;HOST = 172.17.0.2:1433 +;NAME = gitea +;USER = SA +;PASSWD = MwantsaSecurePassword1 +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Other settings +;; +;; For iterate buffer, default is 50 +;ITERATE_BUFFER_SIZE = 50 +;; +;; Show the database generated SQL +LOG_SQL = false ; if unset defaults to true +;; +;; Maximum number of DB Connect retries +;DB_RETRIES = 10 +;; +;; Backoff time per DB retry (time.Duration) +;DB_RETRY_BACKOFF = 3s +;; +;; Max idle database connections on connection pool, default is 2 +;MAX_IDLE_CONNS = 2 +;; +;; Database connection max life time, default is 0 or 3s mysql (See #6804 & #7071 for reasoning) +;CONN_MAX_LIFETIME = 3s +;; +;; Database maximum number of open connections, default is 0 meaning no maximum +;MAX_OPEN_CONNS = 0 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [security] -; Whether the installer is disabled +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Whether the installer is disabled (set to true to disable the installer) INSTALL_LOCK = false -; !!CHANGE THIS TO KEEP YOUR USER DATA SAFE!! -SECRET_KEY = !#@FDEWREWR&*( -; How long to remember that a user is logged in before requiring relogin (in days) -LOGIN_REMEMBER_DAYS = 7 -COOKIE_USERNAME = gitea_awesome -COOKIE_REMEMBER_NAME = gitea_incredible -; Reverse proxy authentication header name of user name -REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER -REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL -; The minimum password length for new Users -MIN_PASSWORD_LENGTH = 6 -; Set to true to allow users to import local server paths -IMPORT_LOCAL_PATHS = false -; Set to false to allow users with git hook privileges to create custom git hooks. -; Custom git hooks can be used to perform arbitrary code execution on the host operating system. -; This enables the users to access and modify this config file and the Gitea database and interrupt the Gitea service. -; By modifying the Gitea database, users can gain Gitea administrator privileges. -; It also enables them to access other resources available to the user on the operating system that is running the Gitea instance and perform arbitrary actions in the name of the Gitea OS user. -; WARNING: This maybe harmful to you website or your operating system. -DISABLE_GIT_HOOKS = true -; Set to false to allow pushes to gitea repositories despite having an incomplete environment - NOT RECOMMENDED -ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true -;Comma separated list of character classes required to pass minimum complexity. -;If left empty or no valid values are specified, the default is off (no checking) -;Classes include "lower,upper,digit,spec" -PASSWORD_COMPLEXITY = off -; Password Hash algorithm, either "argon2", "pbkdf2", "scrypt" or "bcrypt" -PASSWORD_HASH_ALGO = argon2 -; Set false to allow JavaScript to read CSRF cookie -CSRF_COOKIE_HTTP_ONLY = true -; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed -PASSWORD_CHECK_PWN = false - -[openid] -; -; OpenID is an open, standard and decentralized authentication protocol. -; Your identity is the address of a webpage you provide, which describes -; how to prove you are in control of that page. -; -; For more info: https://en.wikipedia.org/wiki/OpenID -; -; Current implementation supports OpenID-2.0 -; -; Tested to work providers at the time of writing: -; - Any GNUSocial node (your.hostname.tld/username) -; - Any SimpleID provider (http://simpleid.koinic.net) -; - http://openid.org.cn/ -; - openid.stackexchange.com -; - login.launchpad.net -; - .livejournal.com -; -; Whether to allow signin in via OpenID -ENABLE_OPENID_SIGNIN = true -; Whether to allow registering via OpenID -; Do not include to rely on rhw DISABLE_REGISTRATION setting -;ENABLE_OPENID_SIGNUP = true -; Allowed URI patterns (POSIX regexp). -; Space separated. -; Only these would be allowed if non-blank. -; Example value: trusted.domain.org trusted.domain.net -WHITELISTED_URIS = -; Forbidden URI patterns (POSIX regexp). -; Space separated. -; Only used if WHITELISTED_URIS is blank. -; Example value: loadaverage.org/badguy stackexchange.com/.*spammer -BLACKLISTED_URIS = - -[service] -; Time limit to confirm account/email registration -ACTIVE_CODE_LIVE_MINUTES = 180 -; Time limit to perform the reset of a forgotten password -RESET_PASSWD_CODE_LIVE_MINUTES = 180 -; Whether a new user needs to confirm their email when registering. -REGISTER_EMAIL_CONFIRM = false -; Whether a new user needs to be confirmed manually after registration. (Requires `REGISTER_EMAIL_CONFIRM` to be disabled.) -REGISTER_MANUAL_CONFIRM = false -; List of domain names that are allowed to be used to register on a Gitea instance -; gitea.io,example.com -EMAIL_DOMAIN_WHITELIST = -; Disallow registration, only allow admins to create accounts. -DISABLE_REGISTRATION = false -; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false -ALLOW_ONLY_EXTERNAL_REGISTRATION = false -; User must sign in to view anything. -REQUIRE_SIGNIN_VIEW = false -; Mail notification -ENABLE_NOTIFY_MAIL = false -; This setting enables gitea to be signed in with HTTP BASIC Authentication using the user's password -; If you set this to false you will not be able to access the tokens endpoints on the API with your password -; Please note that setting this to false will not disable OAuth Basic or Basic authentication using a token -ENABLE_BASIC_AUTHENTICATION = true -; More detail: https://github.com/gogits/gogs/issues/165 -ENABLE_REVERSE_PROXY_AUTHENTICATION = false -ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false -ENABLE_REVERSE_PROXY_EMAIL = false -; Enable captcha validation for registration -ENABLE_CAPTCHA = false -; Type of captcha you want to use. Options: image, recaptcha, hcaptcha -CAPTCHA_TYPE = image -; Enable recaptcha to use Google's recaptcha service -; Go to https://www.google.com/recaptcha/admin to sign up for a key -RECAPTCHA_SECRET = -RECAPTCHA_SITEKEY = -; For hCaptcha, create an account at https://accounts.hcaptcha.com/login to get your keys -HCAPTCHA_SECRET = -HCAPTCHA_SITEKEY = -; Change this to use recaptcha.net or other recaptcha service -RECAPTCHA_URL = https://www.google.com/recaptcha/ -; Default value for KeepEmailPrivate -; Each new user will get the value of this setting copied into their profile -DEFAULT_KEEP_EMAIL_PRIVATE = false -; Default value for AllowCreateOrganization -; Every new user will have rights set to create organizations depending on this setting -DEFAULT_ALLOW_CREATE_ORGANIZATION = true -; Either "public", "limited" or "private", default is "public" -; Limited is for signed user only -; Private is only for member of the organization -; Public is for everyone -DEFAULT_ORG_VISIBILITY = public -; Default value for DefaultOrgMemberVisible -; True will make the membership of the users visible when added to the organisation -DEFAULT_ORG_MEMBER_VISIBLE = false -; Default value for EnableDependencies -; Repositories will use dependencies by default depending on this setting -DEFAULT_ENABLE_DEPENDENCIES = true -; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. -ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true -; Enable heatmap on users profiles. -ENABLE_USER_HEATMAP = true -; Enable Timetracking -ENABLE_TIMETRACKING = true -; Default value for EnableTimetracking -; Repositories will use timetracking by default depending on this setting -DEFAULT_ENABLE_TIMETRACKING = true -; Default value for AllowOnlyContributorsToTrackTime -; Only users with write permissions can track time if this is true -DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true -; Default value for the domain part of the user's email address in the git log -; if he has set KeepEmailPrivate to true. The user's email will be replaced with a -; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS. -NO_REPLY_ADDRESS = noreply.%(DOMAIN)s -; Show Registration button -SHOW_REGISTRATION_BUTTON = true -; Show milestones dashboard page - a view of all the user's milestones -SHOW_MILESTONES_DASHBOARD_PAGE = true -; Default value for AutoWatchNewRepos -; When adding a repo to a team or creating a new repo all team members will watch the -; repo automatically if enabled -AUTO_WATCH_NEW_REPOS = true -; Default value for AutoWatchOnChanges -; Make the user watch a repository When they commit for the first time -AUTO_WATCH_ON_CHANGES = false - -[webhook] -; Hook task queue length, increase if webhook shooting starts hanging -QUEUE_LENGTH = 1000 -; Deliver timeout in seconds -DELIVER_TIMEOUT = 5 -; Allow insecure certification -SKIP_TLS_VERIFY = false -; Number of history information in each page -PAGING_NUM = 10 -; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy -PROXY_URL = -; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. -PROXY_HOSTS = - -[mailer] -ENABLED = false -; Buffer length of channel, keep it as it is if you don't know what it is. -SEND_BUFFER_LEN = 100 -; Prefix displayed before subject in mail -SUBJECT_PREFIX = -; Mail server -; Gmail: smtp.gmail.com:587 -; QQ: smtp.qq.com:465 -; Using STARTTLS on port 587 is recommended per RFC 6409. -; Note, if the port ends with "465", SMTPS will be used. -HOST = -; Disable HELO operation when hostnames are different. -DISABLE_HELO = -; Custom hostname for HELO operation, if no value is provided, one is retrieved from system. -HELO_HOSTNAME = -; Whether or not to skip verification of certificates; `true` to disable verification. This option is unsafe. Consider adding the certificate to the system trust store instead. -SKIP_VERIFY = false -; Use client certificate -USE_CERTIFICATE = false -CERT_FILE = custom/mailer/cert.pem -KEY_FILE = custom/mailer/key.pem -; Should SMTP connect with TLS, (if port ends with 465 TLS will always be used.) -; If this is false but STARTTLS is supported the connection will be upgraded to TLS opportunistically. -IS_TLS_ENABLED = false -; Mail from address, RFC 5322. This can be just an email address, or the `"Name" ` format -FROM = -; Mailer user name and password -; Please Note: Authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via STARTTLS) or `HOST=localhost`. -USER = -; Use PASSWD = `your password` for quoting if you use special characters in the password. -PASSWD = -; Send mails as plain text -SEND_AS_PLAIN_TEXT = false -; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log) -MAILER_TYPE = smtp -; Specify an alternative sendmail binary -SENDMAIL_PATH = sendmail -; Specify any extra sendmail arguments -SENDMAIL_ARGS = -; Timeout for Sendmail -SENDMAIL_TIMEOUT = 5m - -[cache] -; if the cache enabled -ENABLED = true -; Either "memory", "redis", or "memcache", default is "memory" -ADAPTER = memory -; For "memory" only, GC interval in seconds, default is 60 -INTERVAL = 60 -; For "redis" and "memcache", connection host address -; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 -; memcache: `127.0.0.1:11211` -HOST = -; Time to keep items in cache if not used, default is 16 hours. -; Setting it to 0 disables caching -ITEM_TTL = 16h - -; Last commit cache -[cache.last_commit] -; if the cache enabled -ENABLED = true -; Time to keep items in cache if not used, default is 8760 hours. -; Setting it to 0 disables caching -ITEM_TTL = 8760h -; Only enable the cache when repository's commits count great than -COMMITS_COUNT = 1000 - -[session] -; Either "memory", "file", or "redis", default is "memory" -PROVIDER = memory -; Provider config options -; memory: doesn't have any config yet -; file: session file path, e.g. `data/sessions` -; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 -; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table` -PROVIDER_CONFIG = data/sessions -; Session cookie name -COOKIE_NAME = i_like_gitea -; If you use session in https only, default is false -COOKIE_SECURE = false -; Session GC time interval in seconds, default is 86400 (1 day) -GC_INTERVAL_TIME = 86400 -; Session life time in seconds, default is 86400 (1 day) -SESSION_LIFE_TIME = 86400 - -[picture] -AVATAR_UPLOAD_PATH = data/avatars -REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars -; How Gitea deals with missing repository avatars -; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used -REPOSITORY_AVATAR_FALLBACK = none -REPOSITORY_AVATAR_FALLBACK_IMAGE = /img/repo_default.png -; Max Width and Height of uploaded avatars. -; This is to limit the amount of RAM used when resizing the image. -AVATAR_MAX_WIDTH = 4096 -AVATAR_MAX_HEIGHT = 3072 -; Maximum alloved file size for uploaded avatars. -; This is to limit the amount of RAM used when resizing the image. -AVATAR_MAX_FILE_SIZE = 1048576 -; Chinese users can choose "duoshuo" -; or a custom avatar source, like: http://cn.gravatar.com/avatar/ -GRAVATAR_SOURCE = gravatar -; This value will always be true in offline mode. -DISABLE_GRAVATAR = false -; Federated avatar lookup uses DNS to discover avatar associated -; with emails, see https://www.libravatar.org -; This value will always be false in offline mode or when Gravatar is disabled. -ENABLE_FEDERATED_AVATAR = false - -[attachment] -; Whether issue and pull request attachments are enabled. Defaults to `true` -ENABLED = true -; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. -ALLOWED_TYPES = .docx,.gif,.gz,.jpeg,.jpg,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip -; Max size of each file. Defaults to 4MB -MAX_SIZE = 4 -; Max number of files per upload. Defaults to 5 -MAX_FILES = 5 -; Storage type for attachments, `local` for local disk or `minio` for s3 compatible -; object storage service, default is `local`. -STORAGE_TYPE = local -; Allows the storage driver to redirect to authenticated URLs to serve files directly -; Currently, only `minio` is supported. -SERVE_DIRECT = false -; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local` -PATH = data/attachments -; Minio endpoint to connect only available when STORAGE_TYPE is `minio` -MINIO_ENDPOINT = localhost:9000 -; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` -MINIO_ACCESS_KEY_ID = -; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` -MINIO_SECRET_ACCESS_KEY = -; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio` -MINIO_BUCKET = gitea -; Minio location to create bucket only available when STORAGE_TYPE is `minio` -MINIO_LOCATION = us-east-1 -; Minio base path on the bucket only available when STORAGE_TYPE is `minio` -MINIO_BASE_PATH = attachments/ -; Minio enabled ssl only available when STORAGE_TYPE is `minio` -MINIO_USE_SSL = false - -[time] -; Specifies the format for fully outputted dates. Defaults to RFC1123 -; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano -; For more information about the format see http://golang.org/pkg/time/#pkg-constants -FORMAT = -; Location the UI time display i.e. Asia/Shanghai -; Empty means server's location setting -DEFAULT_UI_LOCATION = - -[log] -ROOT_PATH = -; Either "console", "file", "conn", "smtp" or "database", default is "console" -; Use comma to separate multiple modes, e.g. "console, file" -MODE = console -; Buffer length of the channel, keep it as it is if you don't know what it is. -BUFFER_LEN = 10000 -REDIRECT_MACARON_LOG = false -MACARON = file -; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Info" -ROUTER_LOG_LEVEL = Info -ROUTER = console -ENABLE_ACCESS_LOG = false -ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}" -ACCESS = file -; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace" -LEVEL = Info -; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "None" -STACKTRACE_LEVEL = None - -; Generic log modes -[log.x] -FLAGS = stdflags -EXPRESSION = -PREFIX = -COLORIZE = false - -; For "console" mode only -[log.console] -LEVEL = -STDERR = false - -; For "file" mode only -[log.file] -LEVEL = -; Set the file_name for the logger. If this is a relative path this -; will be relative to ROOT_PATH -FILE_NAME = -; This enables automated log rotate(switch of following options), default is true -LOG_ROTATE = true -; Max size shift of a single file, default is 28 means 1 << 28, 256MB -MAX_SIZE_SHIFT = 28 -; Segment log daily, default is true -DAILY_ROTATE = true -; delete the log file after n days, default is 7 -MAX_DAYS = 7 -; compress logs with gzip -COMPRESS = true -; compression level see godoc for compress/gzip -COMPRESSION_LEVEL = -1 - -; For "conn" mode only -[log.conn] -LEVEL = -; Reconnect host for every single message, default is false -RECONNECT_ON_MSG = false -; Try to reconnect when connection is lost, default is false -RECONNECT = false -; Either "tcp", "unix" or "udp", default is "tcp" -PROTOCOL = tcp -; Host address -ADDR = - -; For "smtp" mode only -[log.smtp] -LEVEL = -; Name displayed in mail title, default is "Diagnostic message from server" -SUBJECT = Diagnostic message from server -; Mail server -HOST = -; Mailer user name and password -USER = -; Use PASSWD = `your password` for quoting if you use special characters in the password. -PASSWD = -; Receivers, can be one or more, e.g. 1@example.com,2@example.com -RECEIVERS = - -[cron] -; Enable running all cron tasks periodically with default settings. -ENABLED = false -; Run cron tasks when Gitea starts. -RUN_AT_START = false - -; Basic cron tasks - enabled by default - -; Clean up old repository archives -[cron.archive_cleanup] -; Whether to enable the job -ENABLED = true -; Whether to always run at least once at start up time (if ENABLED) -RUN_AT_START = true -; Notice if not success -NO_SUCCESS_NOTICE = false -; Time interval for job to run -SCHEDULE = @every 24h -; Archives created more than OLDER_THAN ago are subject to deletion -OLDER_THAN = 24h - -; Update mirrors -[cron.update_mirrors] -SCHEDULE = @every 10m -; Enable running Update mirrors task periodically. -ENABLED = true -; Run Update mirrors task when Gitea starts. -RUN_AT_START = false -; Notice if not success -NO_SUCCESS_NOTICE = true - -; Repository health check -[cron.repo_health_check] -SCHEDULE = @every 24h -; Enable running Repository health check task periodically. -ENABLED = true -; Run Repository health check task when Gitea starts. -RUN_AT_START = false -; Notice if not success -NO_SUCCESS_NOTICE = false -TIMEOUT = 60s -; Arguments for command 'git fsck', e.g. "--unreachable --tags" -; see more on http://git-scm.com/docs/git-fsck -ARGS = - -; Check repository statistics -[cron.check_repo_stats] -; Enable running check repository statistics task periodically. -ENABLED = true -; Run check repository statistics task when Gitea starts. -RUN_AT_START = true -; Notice if not success -NO_SUCCESS_NOTICE = false -SCHEDULE = @every 24h - -[cron.update_migration_poster_id] -; Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts. -ENABLED = true -; Update migrated repositories' issues and comments' posterid when starting server (default true) -RUN_AT_START = true -; Notice if not success -NO_SUCCESS_NOTICE = false -; Interval as a duration between each synchronization. (default every 24h) -SCHEDULE = @every 24h - -; Synchronize external user data (only LDAP user synchronization is supported) -[cron.sync_external_users] -ENABLED = true -; Synchronize external user data when starting server (default false) -RUN_AT_START = false -; Notice if not success -NO_SUCCESS_NOTICE = false -; Interval as a duration between each synchronization (default every 24h) -SCHEDULE = @every 24h -; Create new users, update existing user data and disable users that are not in external source anymore (default) -; or only create new users if UPDATE_EXISTING is set to false -UPDATE_EXISTING = true - -; Clean-up deleted branches -[cron.deleted_branches_cleanup] -ENABLED = true -; Clean-up deleted branches when starting server (default true) -RUN_AT_START = true -; Notice if not success -NO_SUCCESS_NOTICE = false -; Interval as a duration between each synchronization (default every 24h) -SCHEDULE = @every 24h -; deleted branches than OLDER_THAN ago are subject to deletion -OLDER_THAN = 24h - -; Extended cron task - not enabled by default - -; Delete all unactivated accounts -[cron.delete_inactive_accounts] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @annually -OLDER_THAN = 168h - -; Delete all repository archives -[cron.delete_repo_archives] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @annually - -; Garbage collect all repositories -[cron.git_gc_repos] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @every 72h -TIMEOUT = 60s -; Arguments for command 'git gc' -; The default value is same with [git] -> GC_ARGS -ARGS = - -; Update the '.ssh/authorized_keys' file with Gitea SSH keys -[cron.resync_all_sshkeys] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @every 72h - -; Resynchronize pre-receive, update and post-receive hooks of all repositories. -[cron.resync_all_hooks] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @every 72h - -; Reinitialize all missing Git repositories for which records exist -[cron.reinit_missing_repos] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @every 72h - -; Delete all repositories missing their Git files -[cron.delete_missing_repos] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @every 72h - -; Delete generated repository avatars -[cron.delete_generated_repository_avatars] -ENABLED = false -RUN_AT_START = false -NO_SUCCESS_NOTICE = false -SCHEDULE = @every 72h - -[git] -; The path of git executable. If empty, Gitea searches through the PATH environment. -PATH = -; Disables highlight of added and removed changes -DISABLE_DIFF_HIGHLIGHT = false -; Max number of lines allowed in a single file in diff view -MAX_GIT_DIFF_LINES = 1000 -; Max number of allowed characters in a line in diff view -MAX_GIT_DIFF_LINE_CHARACTERS = 5000 -; Max number of files shown in diff view -MAX_GIT_DIFF_FILES = 100 -; Arguments for command 'git gc', e.g. "--aggressive --auto" -; see more on http://git-scm.com/docs/git-gc/ -GC_ARGS = -; If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1 -ENABLE_AUTO_GIT_WIRE_PROTOCOL = true -; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled) -PULL_REQUEST_PUSH_MESSAGE = true - -; Operation timeout in seconds -[git.timeout] -DEFAULT = 360 -MIGRATE = 600 -MIRROR = 300 -CLONE = 300 -PULL = 300 -GC = 60 - -[mirror] -; Default interval as a duration between each check -DEFAULT_INTERVAL = 8h -; Min interval as a duration must be > 1m -MIN_INTERVAL = 10m - -[api] -; Enables Swagger. True or false; default is true. -ENABLE_SWAGGER = true -; Max number of items in a page -MAX_RESPONSE_ITEMS = 50 -; Default paging number of api -DEFAULT_PAGING_NUM = 30 -; Default and maximum number of items per page for git trees api -DEFAULT_GIT_TREES_PER_PAGE = 1000 -; Default size of a blob returned by the blobs API (default is 10MiB) -DEFAULT_MAX_BLOB_SIZE = 10485760 +;; +;; Global secret key that will be used - if blank will be regenerated. +SECRET_KEY = +;; +;; Secret used to validate communication within Gitea binary. +INTERNAL_TOKEN= +;; +;; Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: file:/etc/gitea/internal_token) +;INTERNAL_TOKEN_URI = ;e.g. /etc/gitea/internal_token +;; +;; How long to remember that a user is logged in before requiring relogin (in days) +;LOGIN_REMEMBER_DAYS = 7 +;; +;; Name of the cookie used to store the current username. +;COOKIE_USERNAME = gitea_awesome +;; +;; Name of cookie used to store authentication information. +;COOKIE_REMEMBER_NAME = gitea_incredible +;; +;; Reverse proxy authentication header name of user name and email +;REVERSE_PROXY_AUTHENTICATION_USER = X-WEBAUTH-USER +;REVERSE_PROXY_AUTHENTICATION_EMAIL = X-WEBAUTH-EMAIL +;; +;; Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request +;REVERSE_PROXY_LIMIT = 1 +;; +;; List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all. +;REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.0/8,::1/128 +;; +;; The minimum password length for new Users +;MIN_PASSWORD_LENGTH = 6 +;; +;; Set to true to allow users to import local server paths +;IMPORT_LOCAL_PATHS = false +;; +;; Set to false to allow users with git hook privileges to create custom git hooks. +;; Custom git hooks can be used to perform arbitrary code execution on the host operating system. +;; This enables the users to access and modify this config file and the Gitea database and interrupt the Gitea service. +;; By modifying the Gitea database, users can gain Gitea administrator privileges. +;; It also enables them to access other resources available to the user on the operating system that is running the Gitea instance and perform arbitrary actions in the name of the Gitea OS user. +;; WARNING: This maybe harmful to you website or your operating system. +;DISABLE_GIT_HOOKS = true +;; +;; Set to true to disable webhooks feature. +;DISABLE_WEBHOOKS = false +;; +;; Set to false to allow pushes to gitea repositories despite having an incomplete environment - NOT RECOMMENDED +;ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET = true +;; +;;Comma separated list of character classes required to pass minimum complexity. +;;If left empty or no valid values are specified, the default is off (no checking) +;;Classes include "lower,upper,digit,spec" +;PASSWORD_COMPLEXITY = off +;; +;; Password Hash algorithm, either "argon2", "pbkdf2", "scrypt" or "bcrypt" +;PASSWORD_HASH_ALGO = pbkdf2 +;; +;; Set false to allow JavaScript to read CSRF cookie +;CSRF_COOKIE_HTTP_ONLY = true +;; +;; Validate against https://haveibeenpwned.com/Passwords to see if a password has been exposed +;PASSWORD_CHECK_PWN = false +;; +;; Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations. +;; This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security. +;SUCCESSFUL_TOKENS_CACHE_SIZE = 20 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [oauth2] -; Enables OAuth2 provider +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Enables OAuth2 provider ENABLE = true -; Lifetime of an OAuth2 access token in seconds -ACCESS_TOKEN_EXPIRATION_TIME = 3600 -; Lifetime of an OAuth2 refresh token in hours -REFRESH_TOKEN_EXPIRATION_TIME = 730 -; Check if refresh token got already used -INVALIDATE_REFRESH_TOKENS = false -; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate -JWT_SECRET = -; Maximum length of oauth2 token/cookie stored on server -MAX_TOKEN_LENGTH = 32767 - -[i18n] -LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR -NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,français,Nederlands,latviešu,русский,Українська,日本語,español,português do Brasil,Português de Portugal,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어 +;; +;; Algorithm used to sign OAuth2 tokens. Valid values: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512, EdDSA +;JWT_SIGNING_ALGORITHM = RS256 +;; +;; Private key file path used to sign OAuth2 tokens. The path is relative to APP_DATA_PATH. +;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to RS256, RS384, RS512, ES256, ES384 or ES512. +;; The file must contain a RSA or ECDSA private key in the PKCS8 format. If no key exists a 4096 bit key will be created for you. +;JWT_SIGNING_PRIVATE_KEY_FILE = jwt/private.pem +;; +;; OAuth2 authentication secret for access and refresh tokens, change this yourself to a unique string. CLI generate option is helpful in this case. https://docs.gitea.io/en-us/command-line/#generate +;; This setting is only needed if JWT_SIGNING_ALGORITHM is set to HS256, HS384 or HS512. +;JWT_SECRET = +;; +;; Lifetime of an OAuth2 access token in seconds +;ACCESS_TOKEN_EXPIRATION_TIME = 3600 +;; +;; Lifetime of an OAuth2 refresh token in hours +;REFRESH_TOKEN_EXPIRATION_TIME = 730 +;; +;; Check if refresh token got already used +;INVALIDATE_REFRESH_TOKENS = false +;; +;; Maximum length of oauth2 token/cookie stored on server +;MAX_TOKEN_LENGTH = 32767 +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; [U2F] -; NOTE: THE DEFAULT VALUES HERE WILL NEED TO BE CHANGED -; Two Factor authentication with security keys -; https://developers.yubico.com/U2F/App_ID.html -;APP_ID = http://localhost:3000/ -; Comma separated list of trusted facets -;TRUSTED_FACETS = http://localhost:3000/ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; NOTE: THE DEFAULT VALUES HERE WILL NEED TO BE CHANGED +;; Two Factor authentication with security keys +;; https://developers.yubico.com/U2F/App_ID.html +APP_ID = ; e.g. http://localhost:3000/ +;; Comma separated list of trusted facets +TRUSTED_FACETS = ; e.g. http://localhost:3000/ -; Extension mapping to highlight class -; e.g. .toml=ini -[highlight.mapping] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[log] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Root path for the log files - defaults to %(GITEA_WORK_DIR)/log +;ROOT_PATH = +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Main Logger +;; +;; Either "console", "file", "conn", "smtp" or "database", default is "console" +;; Use comma to separate multiple modes, e.g. "console, file" +MODE = console +;; +;; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace" +LEVEL = Info +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Router Logger +;; +;; Switch off the router log +;DISABLE_ROUTER_LOG= ; false +;; +;; Set the log "modes" for the router log (if file is set the log file will default to router.log) +ROUTER = console +;; +;; The level at which the router logs +;ROUTER_LOG_LEVEL = Info +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Access Logger (Creates log in NCSA common log format) +;; +;ENABLE_ACCESS_LOG = false +;; Set the log "modes" for the access log (if file is set the log file will default to access.log) +;ACCESS = file +;; +;; Sets the template used to create the access log. +;ACCESS_LOG_TEMPLATE = {{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}" +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; SSH log (Creates log from ssh git request) +;; +;ENABLE_SSH_LOG = false +;; +;; Other Settings +;; +;; Print Stacktraces with logs. (Rarely helpful.) Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "None" +;STACKTRACE_LEVEL = None +;; +;; Buffer length of the channel, keep it as it is if you don't know what it is. +;BUFFER_LEN = 10000 -[other] -SHOW_FOOTER_BRANDING = false -; Show version information about Gitea and Go in the footer -SHOW_FOOTER_VERSION = true -; Show template execution time in the footer -SHOW_FOOTER_TEMPLATE_LOAD_TIME = true +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Creating specific log configuration +;; +;; You can set specific configuration for individual modes and subloggers +;; +;; Configuration available to all log modes/subloggers +;LEVEL= +;FLAGS = stdflags +;EXPRESSION = +;PREFIX = +;COLORIZE = false +;; +;; For "console" mode only +;STDERR = false +;; +;; For "file" mode only +;LEVEL = +;; Set the file_name for the logger. If this is a relative path this +;; will be relative to ROOT_PATH +;FILE_NAME = +;; This enables automated log rotate(switch of following options), default is true +;LOG_ROTATE = true +;; Max size shift of a single file, default is 28 means 1 << 28, 256MB +;MAX_SIZE_SHIFT = 28 +;; Segment log daily, default is true +;DAILY_ROTATE = true +;; delete the log file after n days, default is 7 +;MAX_DAYS = 7 +;; compress logs with gzip +;COMPRESS = true +;; compression level see godoc for compress/gzip +;COMPRESSION_LEVEL = -1 +; +;; For "conn" mode only +;LEVEL = +;; Reconnect host for every single message, default is false +;RECONNECT_ON_MSG = false +;; Try to reconnect when connection is lost, default is false +;RECONNECT = false +;; Either "tcp", "unix" or "udp", default is "tcp" +;PROTOCOL = tcp +;; Host address +;ADDR = +; +;; For "smtp" mode only +;LEVEL = +;; Name displayed in mail title, default is "Diagnostic message from server" +;SUBJECT = Diagnostic message from server +;; Mail server +;HOST = +;; Mailer user name and password +;USER = +;; Use PASSWD = `your password` for quoting if you use special characters in the password. +;PASSWD = +;; Receivers, can be one or more, e.g. 1@example.com,2@example.com +;RECEIVERS = -[markup.sanitizer.1] -; The following keys can appear once to define a sanitation policy rule. -; This section can appear multiple times by adding a unique alphanumeric suffix to define multiple rules. -; e.g., [markup.sanitizer.1] -> [markup.sanitizer.2] -> [markup.sanitizer.TeX] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[git] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; The path of git executable. If empty, Gitea searches through the PATH environment. +PATH = +;; +;; Disables highlight of added and removed changes +;DISABLE_DIFF_HIGHLIGHT = false +;; +;; Max number of lines allowed in a single file in diff view +;MAX_GIT_DIFF_LINES = 1000 +;; +;; Max number of allowed characters in a line in diff view +;MAX_GIT_DIFF_LINE_CHARACTERS = 5000 +;; +;; Max number of files shown in diff view +;MAX_GIT_DIFF_FILES = 100 +;; +;; Set the default commits range size +;COMMITS_RANGE_SIZE = 50 +;; +;; Set the default branches range size +;BRANCHES_RANGE_SIZE = 20 +;; +;; Arguments for command 'git gc', e.g. "--aggressive --auto" +;; see more on http://git-scm.com/docs/git-gc/ +;GC_ARGS = +;; +;; If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1 +;ENABLE_AUTO_GIT_WIRE_PROTOCOL = true +;; +;; Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled) +;PULL_REQUEST_PUSH_MESSAGE = true +;; +;; (Go-Git only) Don't cache objects greater than this in memory. (Set to 0 to disable.) +;LARGE_OBJECT_THRESHOLD = 1048576 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +[service] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Time limit to confirm account/email registration +;ACTIVE_CODE_LIVE_MINUTES = 180 +;; +;; Time limit to perform the reset of a forgotten password +;RESET_PASSWD_CODE_LIVE_MINUTES = 180 +;; +;; Whether a new user needs to confirm their email when registering. +;REGISTER_EMAIL_CONFIRM = false +;; +;; Whether a new user needs to be confirmed manually after registration. (Requires `REGISTER_EMAIL_CONFIRM` to be disabled.) +;REGISTER_MANUAL_CONFIRM = false +;; +;; List of domain names that are allowed to be used to register on a Gitea instance +;; gitea.io,example.com +;EMAIL_DOMAIN_WHITELIST = +;; +;; Comma-separated list of domain names that are not allowed to be used to register on a Gitea instance +;EMAIL_DOMAIN_BLOCKLIST = +;; +;; Disallow registration, only allow admins to create accounts. +;DISABLE_REGISTRATION = false +;; +;; Allow registration only using gitea itself, it works only when DISABLE_REGISTRATION is false +;ALLOW_ONLY_INTERNAL_REGISTRATION = false +;; +;; Allow registration only using third-party services, it works only when DISABLE_REGISTRATION is false +;ALLOW_ONLY_EXTERNAL_REGISTRATION = false +;; +;; User must sign in to view anything. +;REQUIRE_SIGNIN_VIEW = false +;; +;; Mail notification +;ENABLE_NOTIFY_MAIL = false +;; +;; This setting enables gitea to be signed in with HTTP BASIC Authentication using the user's password +;; If you set this to false you will not be able to access the tokens endpoints on the API with your password +;; Please note that setting this to false will not disable OAuth Basic or Basic authentication using a token +;ENABLE_BASIC_AUTHENTICATION = true +;; +;; More detail: https://github.com/gogits/gogs/issues/165 +;ENABLE_REVERSE_PROXY_AUTHENTICATION = false +;ENABLE_REVERSE_PROXY_AUTO_REGISTRATION = false +;ENABLE_REVERSE_PROXY_EMAIL = false +;; +;; Enable captcha validation for registration +;ENABLE_CAPTCHA = false +;; +;; Type of captcha you want to use. Options: image, recaptcha, hcaptcha +;CAPTCHA_TYPE = image +;; +;; Enable recaptcha to use Google's recaptcha service +;; Go to https://www.google.com/recaptcha/admin to sign up for a key +;RECAPTCHA_SECRET = +;RECAPTCHA_SITEKEY = +;; +;; For hCaptcha, create an account at https://accounts.hcaptcha.com/login to get your keys +;HCAPTCHA_SECRET = +;HCAPTCHA_SITEKEY = +;; +;; Change this to use recaptcha.net or other recaptcha service +;RECAPTCHA_URL = https://www.google.com/recaptcha/ +;; +;; Default value for KeepEmailPrivate +;; Each new user will get the value of this setting copied into their profile +;DEFAULT_KEEP_EMAIL_PRIVATE = false +;; +;; Default value for AllowCreateOrganization +;; Every new user will have rights set to create organizations depending on this setting +;DEFAULT_ALLOW_CREATE_ORGANIZATION = true +;; Default value for IsRestricted +;; Every new user will have restricted permissions depending on this setting +;DEFAULT_USER_IS_RESTRICTED = false +;; +;; Either "public", "limited" or "private", default is "public" +;; Limited is for users visible only to signed users +;; Private is for users visible only to members of their organizations +;; Public is for users visible for everyone +;DEFAULT_USER_VISIBILITY = public +;; +;; Set which visibility modes a user can have +;ALLOWED_USER_VISIBILITY_MODES = public,limited,private +;; +;; Either "public", "limited" or "private", default is "public" +;; Limited is for organizations visible only to signed users +;; Private is for organizations visible only to members of the organization +;; Public is for organizations visible to everyone +;DEFAULT_ORG_VISIBILITY = public +;; +;; Default value for DefaultOrgMemberVisible +;; True will make the membership of the users visible when added to the organisation +;DEFAULT_ORG_MEMBER_VISIBLE = false +;; +;; Default value for EnableDependencies +;; Repositories will use dependencies by default depending on this setting +;DEFAULT_ENABLE_DEPENDENCIES = true +;; +;; Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. +;ALLOW_CROSS_REPOSITORY_DEPENDENCIES = true +;; +;; Enable heatmap on users profiles. +;ENABLE_USER_HEATMAP = true +;; +;; Enable Timetracking +;ENABLE_TIMETRACKING = true +;; +;; Default value for EnableTimetracking +;; Repositories will use timetracking by default depending on this setting +;DEFAULT_ENABLE_TIMETRACKING = true +;; +;; Default value for AllowOnlyContributorsToTrackTime +;; Only users with write permissions can track time if this is true +;DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME = true +;; +;; Value for the domain part of the user's email address in the git log if user +;; has set KeepEmailPrivate to true. The user's email will be replaced with a +;; concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS. Default +;; value is "noreply." + DOMAIN, where DOMAIN resolves to the value from server.DOMAIN +;; Note: do not use the notation below +;NO_REPLY_ADDRESS = ; noreply. +;; +;; Show Registration button +;SHOW_REGISTRATION_BUTTON = true +;; +;; Show milestones dashboard page - a view of all the user's milestones +;SHOW_MILESTONES_DASHBOARD_PAGE = true +;; +;; Default value for AutoWatchNewRepos +;; When adding a repo to a team or creating a new repo all team members will watch the +;; repo automatically if enabled +;AUTO_WATCH_NEW_REPOS = true +;; +;; Default value for AutoWatchOnChanges +;; Make the user watch a repository When they commit for the first time +;AUTO_WATCH_ON_CHANGES = false +;; +;; Minimum amount of time a user must exist before comments are kept when the user is deleted. +;USER_DELETE_WITH_COMMENTS_MAX_TIME = 0 +;; Valid site url schemes for user profiles +;VALID_SITE_URL_SCHEMES=http,https + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Other Settings +;; +;; Uncomment the [section.header] if you wish to +;; set the below settings. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Root path for storing all repository data. It must be an absolute path. By default, it is stored in a sub-directory of `APP_DATA_PATH`. +;ROOT = +;; +;; The script type this server supports. Usually this is `bash`, but some users report that only `sh` is available. +;SCRIPT_TYPE = bash +;; +;; DETECTED_CHARSETS_ORDER tie-break order for detected charsets. +;; If the charsets have equal confidence, tie-breaking will be done by order in this list +;; with charsets earlier in the list chosen in preference to those later. +;; Adding "defaults" will place the unused charsets at that position. +;DETECTED_CHARSETS_ORDER = UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE, ISO-8859, windows-1252, ISO-8859, windows-1250, ISO-8859, ISO-8859, ISO-8859, windows-1253, ISO-8859, windows-1255, ISO-8859, windows-1251, windows-1256, KOI8-R, ISO-8859, windows-1254, Shift_JIS, GB18030, EUC-JP, EUC-KR, Big5, ISO-2022, ISO-2022, ISO-2022, IBM424_rtl, IBM424_ltr, IBM420_rtl, IBM420_ltr +;; +;; Default ANSI charset to override non-UTF-8 charsets to +;ANSI_CHARSET = +;; +;; Force every new repository to be private +;FORCE_PRIVATE = false +;; +;; Default privacy setting when creating a new repository, allowed values: last, private, public. Default is last which means the last setting used. +;DEFAULT_PRIVATE = last +;; +;; Default private when using push-to-create +;DEFAULT_PUSH_CREATE_PRIVATE = true +;; +;; Global limit of repositories per user, applied at creation time. -1 means no limit +;MAX_CREATION_LIMIT = -1 +;; +;; Mirror sync queue length, increase if mirror syncing starts hanging +;MIRROR_QUEUE_LENGTH = 1000 +;; +;; Patch test queue length, increase if pull request patch testing starts hanging +;PULL_REQUEST_QUEUE_LENGTH = 1000 +;; +;; Preferred Licenses to place at the top of the List +;; The name here must match the filename in conf/license or custom/conf/license +;PREFERRED_LICENSES = Apache License 2.0,MIT License +;; +;; Disable the ability to interact with repositories using the HTTP protocol +;;DISABLE_HTTP_GIT = false +;; +;; Value for Access-Control-Allow-Origin header, default is not to present +;; WARNING: This may be harmful to your website if you do not give it a right value. +;ACCESS_CONTROL_ALLOW_ORIGIN = +;; +;; Force ssh:// clone url instead of scp-style uri when default SSH port is used +;USE_COMPAT_SSH_URI = false +;; +;; Close issues as long as a commit on any branch marks it as fixed +;; Comma separated list of globally disabled repo units. Allowed values: repo.issues, repo.ext_issues, repo.pulls, repo.wiki, repo.ext_wiki +;DISABLED_REPO_UNITS = +;; +;; Comma separated list of default repo units. Allowed values: repo.code, repo.releases, repo.issues, repo.pulls, repo.wiki, repo.projects. +;; Note: Code and Releases can currently not be deactivated. If you specify default repo units you should still list them for future compatibility. +;; External wiki and issue tracker can't be enabled by default as it requires additional settings. +;; Disabled repo units will not be added to new repositories regardless if it is in the default list. +;DEFAULT_REPO_UNITS = repo.code,repo.releases,repo.issues,repo.pulls,repo.wiki,repo.projects +;; +;; Prefix archive files by placing them in a directory named after the repository +;PREFIX_ARCHIVE_FILES = true +;; +;; Disable the creation of new mirrors. Pre-existing mirrors remain valid. +;DISABLE_MIRRORS = false +;; +;; Disable migrating feature. +;DISABLE_MIGRATIONS = false +;; +;; Disable stars feature. +;DISABLE_STARS = false +;; +;; The default branch name of new repositories +;DEFAULT_BRANCH = master +;; +;; Allow adoption of unadopted repositories +;ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES = false +;; +;; Allow deletion of unadopted repositories +;ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES = false + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.editor] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; List of file extensions for which lines should be wrapped in the Monaco editor +;; Separate extensions with a comma. To line wrap files without an extension, just put a comma +;LINE_WRAP_EXTENSIONS = .txt,.md,.markdown,.mdown,.mkd, +;; +;; Valid file modes that have a preview API associated with them, such as api/v1/markdown +;; Separate the values by commas. The preview tab in edit mode won't be displayed if the file extension doesn't match +;PREVIEWABLE_FILE_MODES = markdown + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.local] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Path for local repository copy. Defaults to `tmp/local-repo` +;LOCAL_COPY_PATH = tmp/local-repo + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.upload] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Whether repository file uploads are enabled. Defaults to `true` +;ENABLED = true +;; +;; Path for uploads. Defaults to `data/tmp/uploads` (tmp gets deleted on gitea restart) +;TEMP_PATH = data/tmp/uploads +;; +;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +;ALLOWED_TYPES = +;; +;; Max size of each file in megabytes. Defaults to 3MB +;FILE_MAX_SIZE = 3 +;; +;; Max number of files per upload. Defaults to 5 +;MAX_FILES = 5 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.pull-request] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; List of prefixes used in Pull Request title to mark them as Work In Progress +;WORK_IN_PROGRESS_PREFIXES = WIP:,[WIP] +;; +;; List of keywords used in Pull Request comments to automatically close a related issue +;CLOSE_KEYWORDS = close,closes,closed,fix,fixes,fixed,resolve,resolves,resolved +;; +;; List of keywords used in Pull Request comments to automatically reopen a related issue +;REOPEN_KEYWORDS = reopen,reopens,reopened +;; +;; In the default merge message for squash commits include at most this many commits +;DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT = 50 +;; +;; In the default merge message for squash commits limit the size of the commit messages to this +;DEFAULT_MERGE_MESSAGE_SIZE = 5120 +;; +;; In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list +;DEFAULT_MERGE_MESSAGE_ALL_AUTHORS = false +;; +;; In default merge messages limit the number of approvers listed as Reviewed-by: to this many +;DEFAULT_MERGE_MESSAGE_MAX_APPROVERS = 10 +;; +;; In default merge messages only include approvers who are official +;DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY = true + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.issue] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; List of reasons why a Pull Request or Issue can be locked +;LOCK_REASONS = Too heated,Off-topic,Resolved,Spam + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.release] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +;ALLOWED_TYPES = +;DEFAULT_PAGING_NUM = 10 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.signing] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; GPG key to use to sign commits, Defaults to the default - that is the value of git config --get user.signingkey +;; run in the context of the RUN_USER +;; Switch to none to stop signing completely +;SIGNING_KEY = default +;; +;; If a SIGNING_KEY ID is provided and is not set to default, use the provided Name and Email address as the signer. +;; These should match a publicized name and email address for the key. (When SIGNING_KEY is default these are set to +;; the results of git config --get user.name and git config --get user.email respectively and can only be overridden +;; by setting the SIGNING_KEY ID to the correct ID.) +;SIGNING_NAME = +;SIGNING_EMAIL = +;; +;; Sets the default trust model for repositories. Options are: collaborator, committer, collaboratorcommitter +;DEFAULT_TRUST_MODEL = collaborator +;; +;; Determines when gitea should sign the initial commit when creating a repository +;; Either: +;; - never +;; - pubkey: only sign if the user has a pubkey +;; - twofa: only sign if the user has logged in with twofa +;; - always +;; options other than none and always can be combined as comma separated list +;INITIAL_COMMIT = always +;; +;; Determines when to sign for CRUD actions +;; - as above +;; - parentsigned: requires that the parent commit is signed. +;CRUD_ACTIONS = pubkey, twofa, parentsigned +;; Determines when to sign Wiki commits +;; - as above +;WIKI = never +;; +;; Determines when to sign on merges +;; - basesigned: require that the parent of commit on the base repo is signed. +;; - commitssigned: require that all the commits in the head branch are signed. +;; - approved: only sign when merging an approved pr to a protected branch +;MERGES = pubkey, twofa, basesigned, commitssigned + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[repository.mimetype_mapping] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Custom MIME type mapping for downloadable files +;.apk=application/vnd.android.package-archive + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[project] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Default templates for project boards +;PROJECT_BOARD_BASIC_KANBAN_TYPE = To Do, In Progress, Done +;PROJECT_BOARD_BUG_TRIAGE_TYPE = Needs Triage, High Priority, Low Priority, Closed + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cors] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; More information about CORS can be found here: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#The_HTTP_response_headers +;; enable cors headers (disabled by default) +;ENABLED = false +;; +;; scheme of allowed requests +;SCHEME = http +;; +;; list of requesting domains that are allowed +;ALLOW_DOMAIN = * +;; +;; allow subdomains of headers listed above to request +;ALLOW_SUBDOMAIN = false +;; +;; list of methods allowed to request +;METHODS = GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS +;; +;; max time to cache response +;MAX_AGE = 10m +;; +;; allow request with credentials +;ALLOW_CREDENTIALS = false +;; +;; set X-FRAME-OPTIONS header +;X_FRAME_OPTIONS = SAMEORIGIN + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ui] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Number of repositories that are displayed on one explore page +;EXPLORE_PAGING_NUM = 20 +;; +;; Number of issues that are displayed on one page +;ISSUE_PAGING_NUM = 10 +;; +;; Number of maximum commits displayed in one activity feed +;FEED_MAX_COMMIT_NUM = 5 +;; +;; Number of items that are displayed in home feed +;FEED_PAGING_NUM = 20 +;; +;; Number of maximum commits displayed in commit graph. +;GRAPH_MAX_COMMIT_NUM = 100 +;; +;; Number of line of codes shown for a code comment +;CODE_COMMENT_LINES = 4 +;; +;; Value of `theme-color` meta tag, used by Android >= 5.0 +;; An invalid color like "none" or "disable" will have the default style +;; More info: https://developers.google.com/web/updates/2014/11/Support-for-theme-color-in-Chrome-39-for-Android +;THEME_COLOR_META_TAG = `#6cc644` +;; +;; Max size of files to be displayed (default is 8MiB) +;MAX_DISPLAY_FILE_SIZE = 8388608 +;; +;; Whether the email of the user should be shown in the Explore Users page +;SHOW_USER_EMAIL = true +;; +;; Set the default theme for the Gitea install +;DEFAULT_THEME = gitea +;; +;; All available themes. Allow users select personalized themes regardless of the value of `DEFAULT_THEME`. +;THEMES = gitea,arc-green +;; +;; All available reactions users can choose on issues/prs and comments. +;; Values can be emoji alias (:smile:) or a unicode emoji. +;; For custom reactions, add a tightly cropped square image to public/img/emoji/reaction_name.png +;REACTIONS = +1, -1, laugh, hooray, confused, heart, rocket, eyes +;; +;; Additional Emojis not defined in the utf8 standard +;; By default we support gitea (:gitea:), to add more copy them to public/img/emoji/emoji_name.png and add it to this config. +;; Dont mistake it for Reactions. +;CUSTOM_EMOJIS = gitea, codeberg, gitlab, git, github, gogs +;; +;; Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used. +;DEFAULT_SHOW_FULL_NAME = false +;; +;; Whether to search within description at repository search on explore page. +;SEARCH_REPO_DESCRIPTION = true +;; +;; Whether to enable a Service Worker to cache frontend assets +;USE_SERVICE_WORKER = true + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ui.admin] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Number of users that are displayed on one page +;USER_PAGING_NUM = 50 +;; +;; Number of repos that are displayed on one page +;REPO_PAGING_NUM = 50 +;; +;; Number of notices that are displayed on one page +;NOTICE_PAGING_NUM = 25 +;; +;; Number of organizations that are displayed on one page +;ORG_PAGING_NUM = 50 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ui.user] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Number of repos that are displayed on one page +;REPO_PAGING_NUM = 15 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ui.meta] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;AUTHOR = Gitea - Git with a cup of tea +;DESCRIPTION = Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go +;KEYWORDS = go,git,self-hosted,gitea + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ui.notification] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Control how often the notification endpoint is polled to update the notification +;; The timeout will increase to MAX_TIMEOUT in TIMEOUT_STEPs if the notification count is unchanged +;; Set MIN_TIMEOUT to 0 to turn off +;MIN_TIMEOUT = 10s +;MAX_TIMEOUT = 60s +;TIMEOUT_STEP = 10s +;; +;; This setting determines how often the db is queried to get the latest notification counts. +;; If the browser client supports EventSource and SharedWorker, a SharedWorker will be used in preference to polling notification. Set to -1 to disable the EventSource +;EVENT_SOURCE_UPDATE_TIME = 10s + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ui.svg] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Whether to render SVG files as images. If SVG rendering is disabled, SVG files are displayed as text and cannot be embedded in markdown files as images. +;ENABLE_RENDER = true + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ui.csv] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Maximum allowed file size in bytes to render CSV files as table. (Set to 0 for no limit). +;MAX_FILE_SIZE = 524288 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[markdown] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Render soft line breaks as hard line breaks, which means a single newline character between +;; paragraphs will cause a line break and adding trailing whitespace to paragraphs is not +;; necessary to force a line break. +;; Render soft line breaks as hard line breaks for comments +;ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true +;; +;; Render soft line breaks as hard line breaks for markdown documents +;ENABLE_HARD_LINE_BREAK_IN_DOCUMENTS = false +;; +;; Comma separated list of custom URL-Schemes that are allowed as links when rendering Markdown +;; for example git,magnet,ftp (more at https://en.wikipedia.org/wiki/List_of_URI_schemes) +;; URLs starting with http and https are always displayed, whatever is put in this entry. +;CUSTOM_URL_SCHEMES = +;; +;; List of file extensions that should be rendered/edited as Markdown +;; Separate the extensions with a comma. To render files without any extension as markdown, just put a comma +;FILE_EXTENSIONS = .md,.markdown,.mdown,.mkd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[ssh.minimum_key_sizes] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Define allowed algorithms and their minimum key length (use -1 to disable a type) +;ED25519 = 256 +;ECDSA = 256 +;RSA = 2048 +;DSA = -1 ; set to 1024 to switch on + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[indexer] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Issue Indexer settings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Issue indexer type, currently support: bleve, db or elasticsearch, default is bleve +;ISSUE_INDEXER_TYPE = bleve +;; +;; Issue indexer storage path, available when ISSUE_INDEXER_TYPE is bleve +;ISSUE_INDEXER_PATH = indexers/issues.bleve +;; +;; Issue indexer connection string, available when ISSUE_INDEXER_TYPE is elasticsearch +;ISSUE_INDEXER_CONN_STR = http://elastic:changeme@localhost:9200 +;; +;; Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch +;ISSUE_INDEXER_NAME = gitea_issues +;; +;; Timeout the indexer if it takes longer than this to start. +;; Set to zero to disable timeout. +;STARTUP_TIMEOUT = 30s +;; +;; Issue indexer queue, currently support: channel, levelqueue or redis, default is levelqueue (deprecated - use [queue.issue_indexer]) +;ISSUE_INDEXER_QUEUE_TYPE = levelqueue; **DEPRECATED** use settings in `[queue.issue_indexer]`. +;; +;; When ISSUE_INDEXER_QUEUE_TYPE is levelqueue, this will be the path where the queue will be saved. +;; This can be overridden by `ISSUE_INDEXER_QUEUE_CONN_STR`. +;; default is queues/common +;ISSUE_INDEXER_QUEUE_DIR = queues/common; **DEPRECATED** use settings in `[queue.issue_indexer]`. +;; +;; When `ISSUE_INDEXER_QUEUE_TYPE` is `redis`, this will store the redis connection string. +;; When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this is a directory or additional options of +;; the form `leveldb://path/to/db?option=value&....`, and overrides `ISSUE_INDEXER_QUEUE_DIR`. +;ISSUE_INDEXER_QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0"; **DEPRECATED** use settings in `[queue.issue_indexer]`. +;; +;; Batch queue number, default is 20 +;ISSUE_INDEXER_QUEUE_BATCH_NUMBER = 20; **DEPRECATED** use settings in `[queue.issue_indexer]`. + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Repository Indexer settings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; repo indexer by default disabled, since it uses a lot of disk space +;REPO_INDEXER_ENABLED = false +;; +;; Code search engine type, could be `bleve` or `elasticsearch`. +;REPO_INDEXER_TYPE = bleve +;; +;; Index file used for code search. available when `REPO_INDEXER_TYPE` is bleve +;REPO_INDEXER_PATH = indexers/repos.bleve +;; +;; Code indexer connection string, available when `REPO_INDEXER_TYPE` is elasticsearch. i.e. http://elastic:changeme@localhost:9200 +;REPO_INDEXER_CONN_STR = +;; +;; Code indexer name, available when `REPO_INDEXER_TYPE` is elasticsearch +;REPO_INDEXER_NAME = gitea_codes +;; +;; A comma separated list of glob patterns (see https://github.com/gobwas/glob) to include +;; in the index; default is empty +;REPO_INDEXER_INCLUDE = +;; +;; A comma separated list of glob patterns to exclude from the index; ; default is empty +;REPO_INDEXER_EXCLUDE = +;; +;; +;UPDATE_BUFFER_LEN = 20; **DEPRECATED** use settings in `[queue.issue_indexer]`. +;MAX_FILE_SIZE = 1048576 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[queue] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Specific queues can be individually configured with [queue.name]. [queue] provides defaults +;; ([queue.issue_indexer] is special due to the old configuration described above) +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; General queue queue type, currently support: persistable-channel, channel, level, redis, dummy +;; default to persistable-channel +;TYPE = persistable-channel +;; +;; data-dir for storing persistable queues and level queues, individual queues will default to `queues/common` meaning the queue is shared. +;DATADIR = queues/ +;; +;; Default queue length before a channel queue will block +;LENGTH = 20 +;; +;; Batch size to send for batched queues +;BATCH_LENGTH = 20 +;; +;; Connection string for redis queues this will store the redis connection string. +;; When `TYPE` is `persistable-channel`, this provides a directory for the underlying leveldb +;; or additional options of the form `leveldb://path/to/db?option=value&....`, and will override `DATADIR`. +;CONN_STR = "addrs=127.0.0.1:6379 db=0" +;; +;; Provides the suffix of the default redis/disk queue name - specific queues can be overridden within in their [queue.name] sections. +;QUEUE_NAME = "_queue" +;; +;; Provides the suffix of the default redis/disk unique queue set name - specific queues can be overridden within in their [queue.name] sections. +;SET_NAME = "_unique" +;; +;; If the queue cannot be created at startup - level queues may need a timeout at startup - wrap the queue: +;WRAP_IF_NECESSARY = true +;; +;; Attempt to create the wrapped queue at max +;MAX_ATTEMPTS = 10 +;; +;; Timeout queue creation +;TIMEOUT = 15m30s +;; +;; Create a pool with this many workers +;WORKERS = 0 +;; +;; Dynamically scale the worker pool to at this many workers +;MAX_WORKERS = 10 +;; +;; Add boost workers when the queue blocks for BLOCK_TIMEOUT +;BLOCK_TIMEOUT = 1s +;; +;; Remove the boost workers after BOOST_TIMEOUT +;BOOST_TIMEOUT = 5m +;; +;; During a boost add BOOST_WORKERS +;BOOST_WORKERS = 1 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[admin] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Disallow regular (non-admin) users from creating organizations. +;DISABLE_REGULAR_ORG_CREATION = false +;; +;; Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disabled +;DEFAULT_EMAIL_NOTIFICATIONS = enabled + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[openid] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; OpenID is an open, standard and decentralized authentication protocol. +;; Your identity is the address of a webpage you provide, which describes +;; how to prove you are in control of that page. +;; +;; For more info: https://en.wikipedia.org/wiki/OpenID +;; +;; Current implementation supports OpenID-2.0 +;; +;; Tested to work providers at the time of writing: +;; - Any GNUSocial node (your.hostname.tld/username) +;; - Any SimpleID provider (http://simpleid.koinic.net) +;; - http://openid.org.cn/ +;; - openid.stackexchange.com +;; - login.launchpad.net +;; - .livejournal.com +;; +;; Whether to allow signin in via OpenID +;ENABLE_OPENID_SIGNIN = true +;; +;; Whether to allow registering via OpenID +;; Do not include to rely on rhw DISABLE_REGISTRATION setting +;;ENABLE_OPENID_SIGNUP = true +;; +;; Allowed URI patterns (POSIX regexp). +;; Space separated. +;; Only these would be allowed if non-blank. +;; Example value: trusted.domain.org trusted.domain.net +;WHITELISTED_URIS = +;; +;; Forbidden URI patterns (POSIX regexp). +;; Space separated. +;; Only used if WHITELISTED_URIS is blank. +;; Example value: loadaverage.org/badguy stackexchange.com/.*spammer +;BLACKLISTED_URIS = + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[oauth2_client] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Whether a new auto registered oauth2 user needs to confirm their email. +;; Do not include to use the REGISTER_EMAIL_CONFIRM setting from the `[service]` section. +;REGISTER_EMAIL_CONFIRM = +;; +;; Scopes for the openid connect oauth2 provider (separated by space, the openid scope is implicitly added). +;; Typical values are profile and email. +;; For more information about the possible values see https://openid.net/specs/openid-connect-core-1_0.html#ScopeClaims +;OPENID_CONNECT_SCOPES = +;; +;; Automatically create user accounts for new oauth2 users. +;ENABLE_AUTO_REGISTRATION = false +;; +;; The source of the username for new oauth2 accounts: +;; userid = use the userid / sub attribute +;; nickname = use the nickname attribute +;; email = use the username part of the email attribute +;USERNAME = nickname +;; +;; Update avatar if available from oauth2 provider. +;; Update will be performed on each login. +;UPDATE_AVATAR = false +;; +;; How to handle if an account / email already exists: +;; disabled = show an error +;; login = show an account linking login +;; auto = link directly with the account +;ACCOUNT_LINKING = login + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[webhook] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Hook task queue length, increase if webhook shooting starts hanging +;QUEUE_LENGTH = 1000 +;; +;; Deliver timeout in seconds +;DELIVER_TIMEOUT = 5 +;; +;; Allow insecure certification +;SKIP_TLS_VERIFY = false +;; +;; Number of history information in each page +;PAGING_NUM = 10 +;; +;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy +;PROXY_URL = +;; +;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. +;PROXY_HOSTS = + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[mailer] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;ENABLED = false +;; +;; Buffer length of channel, keep it as it is if you don't know what it is. +;SEND_BUFFER_LEN = 100 +;; +;; Prefix displayed before subject in mail +;SUBJECT_PREFIX = +;; +;; Mail server +;; Gmail: smtp.gmail.com:587 +;; QQ: smtp.qq.com:465 +;; As per RFC 8314 using Implicit TLS/SMTPS on port 465 (if supported) is recommended, +;; otherwise STARTTLS on port 587 should be used. +;HOST = +;; +;; Disable HELO operation when hostnames are different. +;DISABLE_HELO = +;; +;; Custom hostname for HELO operation, if no value is provided, one is retrieved from system. +;HELO_HOSTNAME = +;; +;; Whether or not to skip verification of certificates; `true` to disable verification. This option is unsafe. Consider adding the certificate to the system trust store instead. +;SKIP_VERIFY = false +;; +;; Use client certificate +;USE_CERTIFICATE = false +;CERT_FILE = custom/mailer/cert.pem +;KEY_FILE = custom/mailer/key.pem +;; +;; Should SMTP connect with TLS, (if port ends with 465 TLS will always be used.) +;; If this is false but STARTTLS is supported the connection will be upgraded to TLS opportunistically. +;IS_TLS_ENABLED = false +;; +;; Mail from address, RFC 5322. This can be just an email address, or the `"Name" ` format +;FROM = +;; +;; Mailer user name and password +;; Please Note: Authentication is only supported when the SMTP server communication is encrypted with TLS (this can be via STARTTLS) or `HOST=localhost`. +;USER = +;; +;; Use PASSWD = `your password` for quoting if you use special characters in the password. +;PASSWD = +;; +;; Send mails as plain text +;SEND_AS_PLAIN_TEXT = false +;; +;; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log) +;MAILER_TYPE = smtp +;; +;; Specify an alternative sendmail binary +;SENDMAIL_PATH = sendmail +;; +;; Specify any extra sendmail arguments +;SENDMAIL_ARGS = +;; +;; Timeout for Sendmail +;SENDMAIL_TIMEOUT = 5m + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cache] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; if the cache enabled +;ENABLED = true +;; +;; Either "memory", "redis", "memcache", or "twoqueue". default is "memory" +;ADAPTER = memory +;; +;; For "memory" only, GC interval in seconds, default is 60 +;INTERVAL = 60 +;; +;; For "redis" and "memcache", connection host address +;; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 +;; memcache: `127.0.0.1:11211` +;; twoqueue: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000` +;HOST = +;; +;; Time to keep items in cache if not used, default is 16 hours. +;; Setting it to 0 disables caching +;ITEM_TTL = 16h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Last commit cache +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cache.last_commit] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; if the cache enabled +;ENABLED = true +;; +;; Time to keep items in cache if not used, default is 8760 hours. +;; Setting it to 0 disables caching +;ITEM_TTL = 8760h +;; +;; Only enable the cache when repository's commits count great than +;COMMITS_COUNT = 1000 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[session] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Either "memory", "file", or "redis", default is "memory" +;PROVIDER = memory +;; +;; Provider config options +;; memory: doesn't have any config yet +;; file: session file path, e.g. `data/sessions` +;; redis: network=tcp,addr=:6379,password=macaron,db=0,pool_size=100,idle_timeout=180 +;; mysql: go-sql-driver/mysql dsn config string, e.g. `root:password@/session_table` +;PROVIDER_CONFIG = data/sessions +;; +;; Session cookie name +;COOKIE_NAME = i_like_gitea +;; +;; If you use session in https only, default is false +;COOKIE_SECURE = false +;; +;; Session GC time interval in seconds, default is 86400 (1 day) +;GC_INTERVAL_TIME = 86400 +;; +;; Session life time in seconds, default is 86400 (1 day) +;SESSION_LIFE_TIME = 86400 +;; +;; SameSite settings. Either "none", "lax", or "strict" +;SAME_SITE=lax + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[picture] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;AVATAR_UPLOAD_PATH = data/avatars +;REPOSITORY_AVATAR_UPLOAD_PATH = data/repo-avatars +;; +;; How Gitea deals with missing repository avatars +;; none = no avatar will be displayed; random = random avatar will be displayed; image = default image will be used +;REPOSITORY_AVATAR_FALLBACK = none +;REPOSITORY_AVATAR_FALLBACK_IMAGE = /img/repo_default.png +;; +;; Max Width and Height of uploaded avatars. +;; This is to limit the amount of RAM used when resizing the image. +;AVATAR_MAX_WIDTH = 4096 +;AVATAR_MAX_HEIGHT = 3072 +;; +;; Maximum allowed file size for uploaded avatars. +;; This is to limit the amount of RAM used when resizing the image. +;AVATAR_MAX_FILE_SIZE = 1048576 +;; +;; Chinese users can choose "duoshuo" +;; or a custom avatar source, like: http://cn.gravatar.com/avatar/ +;GRAVATAR_SOURCE = gravatar +;; +;; This value will always be true in offline mode. +;DISABLE_GRAVATAR = false +;; +;; Federated avatar lookup uses DNS to discover avatar associated +;; with emails, see https://www.libravatar.org +;; This value will always be false in offline mode or when Gravatar is disabled. +;ENABLE_FEDERATED_AVATAR = false + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[attachment] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Whether issue and pull request attachments are enabled. Defaults to `true` +;ENABLED = true +;; +;; Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +;ALLOWED_TYPES = .docx,.gif,.gz,.jpeg,.jpg,.log,.pdf,.png,.pptx,.txt,.xlsx,.zip +;; +;; Max size of each file. Defaults to 4MB +;MAX_SIZE = 4 +;; +;; Max number of files per upload. Defaults to 5 +;MAX_FILES = 5 +;; +;; Storage type for attachments, `local` for local disk or `minio` for s3 compatible +;; object storage service, default is `local`. +;STORAGE_TYPE = local +;; +;; Allows the storage driver to redirect to authenticated URLs to serve files directly +;; Currently, only `minio` is supported. +;SERVE_DIRECT = false +;; +;; Path for attachments. Defaults to `data/attachments` only available when STORAGE_TYPE is `local` +;PATH = data/attachments +;; +;; Minio endpoint to connect only available when STORAGE_TYPE is `minio` +;MINIO_ENDPOINT = localhost:9000 +;; +;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` +;MINIO_ACCESS_KEY_ID = +;; +;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` +;MINIO_SECRET_ACCESS_KEY = +;; +;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio` +;MINIO_BUCKET = gitea +;; +;; Minio location to create bucket only available when STORAGE_TYPE is `minio` +;MINIO_LOCATION = us-east-1 +;; +;; Minio base path on the bucket only available when STORAGE_TYPE is `minio` +;MINIO_BASE_PATH = attachments/ +;; +;; Minio enabled ssl only available when STORAGE_TYPE is `minio` +;MINIO_USE_SSL = false + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[time] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Specifies the format for fully outputted dates. Defaults to RFC1123 +;; Special supported values are ANSIC, UnixDate, RubyDate, RFC822, RFC822Z, RFC850, RFC1123, RFC1123Z, RFC3339, RFC3339Nano, Kitchen, Stamp, StampMilli, StampMicro and StampNano +;; For more information about the format see http://golang.org/pkg/time/#pkg-constants +;FORMAT = +;; +;; Location the UI time display i.e. Asia/Shanghai +;; Empty means server's location setting +;DEFAULT_UI_LOCATION = + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Common settings +;; +;; Setting this to true will enable all cron tasks periodically with default settings. +;ENABLED = false +;; Setting this to true will run all enabled cron tasks when Gitea starts. +;RUN_AT_START = false +;; +;; Note: ``SCHEDULE`` accept formats +;; - Full crontab specs, e.g. "* * * * * ?" +;; - Descriptors, e.g. "@midnight", "@every 1h30m" +;; See more: https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Basic cron tasks - enabled by default +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Clean up old repository archives +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.archive_cleanup] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Whether to enable the job +;ENABLED = true +;; Whether to always run at least once at start up time (if ENABLED) +;RUN_AT_START = true +;; Notice if not success +;NO_SUCCESS_NOTICE = false +;; Time interval for job to run +;SCHEDULE = @midnight +;; Archives created more than OLDER_THAN ago are subject to deletion +;OLDER_THAN = 24h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Update mirrors +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.update_mirrors] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;SCHEDULE = @every 10m +;; Enable running Update mirrors task periodically. +;ENABLED = true +;; Run Update mirrors task when Gitea starts. +;RUN_AT_START = false +;; Notice if not success +;NO_SUCCESS_NOTICE = true + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Repository health check +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.repo_health_check] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;SCHEDULE = @midnight +;; Enable running Repository health check task periodically. +;ENABLED = true +;; Run Repository health check task when Gitea starts. +;RUN_AT_START = false +;; Notice if not success +;NO_SUCCESS_NOTICE = false +;TIMEOUT = 60s +;; Arguments for command 'git fsck', e.g. "--unreachable --tags" +;; see more on http://git-scm.com/docs/git-fsck +;ARGS = + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Check repository statistics +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.check_repo_stats] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Enable running check repository statistics task periodically. +;ENABLED = true +;; Run check repository statistics task when Gitea starts. +;RUN_AT_START = true +;; Notice if not success +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @midnight + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.update_migration_poster_id] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Update migrated repositories' issues and comments' posterid, it will always attempt synchronization when the instance starts. +;ENABLED = true +;; Update migrated repositories' issues and comments' posterid when starting server (default true) +;RUN_AT_START = true +;; Notice if not success +;NO_SUCCESS_NOTICE = false +;; Interval as a duration between each synchronization. (default every 24h) +;SCHEDULE = @midnight + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Synchronize external user data (only LDAP user synchronization is supported) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.sync_external_users] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = true +;; Synchronize external user data when starting server (default false) +;RUN_AT_START = false +;; Notice if not success +;NO_SUCCESS_NOTICE = false +;; Interval as a duration between each synchronization (default every 24h) +;SCHEDULE = @midnight +;; Create new users, update existing user data and disable users that are not in external source anymore (default) +;; or only create new users if UPDATE_EXISTING is set to false +;UPDATE_EXISTING = true + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Clean-up deleted branches +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.deleted_branches_cleanup] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = true +;; Clean-up deleted branches when starting server (default true) +;RUN_AT_START = true +;; Notice if not success +;NO_SUCCESS_NOTICE = false +;; Interval as a duration between each synchronization (default every 24h) +;SCHEDULE = @midnight +;; deleted branches than OLDER_THAN ago are subject to deletion +;OLDER_THAN = 24h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Cleanup hook_task table +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.cleanup_hook_task_table] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Whether to enable the job +;ENABLED = true +;; Whether to always run at start up time (if ENABLED) +;RUN_AT_START = false +;; Time interval for job to run +;SCHEDULE = @midnight +;; OlderThan or PerWebhook. How the records are removed, either by age (i.e. how long ago hook_task record was delivered) or by the number to keep per webhook (i.e. keep most recent x deliveries per webhook). +;CLEANUP_TYPE = OlderThan +;; If CLEANUP_TYPE is set to OlderThan, then any delivered hook_task records older than this expression will be deleted. +;OLDER_THAN = 168h +;; If CLEANUP_TYPE is set to PerWebhook, this is number of hook_task records to keep for a webhook (i.e. keep the most recent x deliveries). +;NUMBER_TO_KEEP = 10 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; Extended cron task - not enabled by default +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete all unactivated accounts +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.delete_inactive_accounts] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @annually +;OLDER_THAN = 168h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete all repository archives +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.delete_repo_archives] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @annually; + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Garbage collect all repositories +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.git_gc_repos] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @every 72h +;TIMEOUT = 60s +;; Arguments for command 'git gc' +;; The default value is same with [git] -> GC_ARGS +;ARGS = + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Update the '.ssh/authorized_keys' file with Gitea SSH keys +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.resync_all_sshkeys] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @every 72h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Resynchronize pre-receive, update and post-receive hooks of all repositories. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.resync_all_hooks] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @every 72h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Reinitialize all missing Git repositories for which records exist +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.reinit_missing_repos] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = f;alse +;SCHEDULE = @every 72h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete all repositories missing their Git files +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.delete_missing_repos] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @every 72h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete generated repository avatars +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.delete_generated_repository_avatars] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = f;alse +;SCHEDULE = @every 72h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Delete all old actions from database +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[cron.delete_old_actions] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;ENABLED = false +;RUN_AT_START = false +;NO_SUCCESS_NOTICE = false +;SCHEDULE = @every 168h +;OLDER_THAN = 8760h + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Git Operation timeout in seconds +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[git.timeout] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;DEFAULT = 360 +;MIGRATE = 600 +;MIRROR = 300 +;CLONE = 300 +;PULL = 300 +;GC = 60 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[mirror] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Default interval as a duration between each check +;DEFAULT_INTERVAL = 8h +;; Min interval as a duration must be > 1m +;MIN_INTERVAL = 10m + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[api] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Enables Swagger. True or false; default is true. +;ENABLE_SWAGGER = true +;; Max number of items in a page +;MAX_RESPONSE_ITEMS = 50 +;; Default paging number of api +;DEFAULT_PAGING_NUM = 30 +;; Default and maximum number of items per page for git trees api +;DEFAULT_GIT_TREES_PER_PAGE = 1000 +;; Default size of a blob returned by the blobs API (default is 10MiB) +;DEFAULT_MAX_BLOB_SIZE = 10485760 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[i18n] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;LANGS = en-US,zh-CN,zh-HK,zh-TW,de-DE,fr-FR,nl-NL,lv-LV,ru-RU,uk-UA,ja-JP,es-ES,pt-BR,pt-PT,pl-PL,bg-BG,it-IT,fi-FI,tr-TR,cs-CZ,sr-SP,sv-SE,ko-KR +;NAMES = English,简体中文,繁體中文(香港),繁體中文(台灣),Deutsch,français,Nederlands,latviešu,русский,Українська,日本語,español,português do Brasil,Português de Portugal,polski,български,italiano,suomi,Türkçe,čeština,српски,svenska,한국어 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[highlight.mapping] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Extension mapping to highlight class +;; e.g. .toml=ini + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[other] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;SHOW_FOOTER_BRANDING = false +;; Show version information about Gitea and Go in the footer +;SHOW_FOOTER_VERSION = true +;; Show template execution time in the footer +;SHOW_FOOTER_TEMPLATE_LOAD_TIME = true + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[markup] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Set the maximum number of characters in a mermaid source. (Set to -1 to disable limits) +;MERMAID_MAX_SOURCE_CHARACTERS = 5000 + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[markup.sanitizer.1] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; The following keys can appear once to define a sanitation policy rule. +;; This section can appear multiple times by adding a unique alphanumeric suffix to define multiple rules. +;; e.g., [markup.sanitizer.1] -> [markup.sanitizer.2] -> [markup.sanitizer.TeX] ;ELEMENT = span ;ALLOW_ATTR = class ;REGEXP = ^(info|warning|error)$ +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Other markup formats e.g. asciidoc +;; +;; uncomment and enable the below section. +;; (You can add other markup formats by copying the section and adjusting +;; the section name suffix "asciidoc" to something else.) +;[markup.asciidoc] +;ENABLED = false +;; List of file extensions that should be rendered by an external command +;FILE_EXTENSIONS = .adoc,.asciidoc +;; External command to render all matching extensions +;RENDER_COMMAND = "asciidoc --out-file=- -" +;; Don't pass the file on STDIN, pass the filename as argument instead. +;IS_INPUT_FILE = false -[markup.asciidoc] -ENABLED = false -; List of file extensions that should be rendered by an external command -FILE_EXTENSIONS = .adoc,.asciidoc -; External command to render all matching extensions -RENDER_COMMAND = "asciidoc --out-file=- -" -; Don't pass the file on STDIN, pass the filename as argument instead. -IS_INPUT_FILE = false +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[metrics] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Enables metrics endpoint. True or false; default is false. +;ENABLED = false +;; If you want to add authorization, specify a token here +;TOKEN = -[metrics] -; Enables metrics endpoint. True or false; default is false. -ENABLED = false -; If you want to add authorization, specify a token here -TOKEN = +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[task] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Task queue type, could be `channel` or `redis`. +;QUEUE_TYPE = channel +;; +;; Task queue length, available only when `QUEUE_TYPE` is `channel`. +;QUEUE_LENGTH = 1000 +;; +;; Task queue connection string, available only when `QUEUE_TYPE` is `redis`. +;; If there is a password of redis, use `addrs=127.0.0.1:6379 password=123 db=0`. +;QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0" -[task] -; Task queue type, could be `channel` or `redis`. -QUEUE_TYPE = channel -; Task queue length, available only when `QUEUE_TYPE` is `channel`. -QUEUE_LENGTH = 1000 -; Task queue connection string, available only when `QUEUE_TYPE` is `redis`. -; If there is a password of redis, use `addrs=127.0.0.1:6379 password=123 db=0`. -QUEUE_CONN_STR = "addrs=127.0.0.1:6379 db=0" +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[migrations] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +;; Max attempts per http/https request on migrations. +;MAX_ATTEMPTS = 3 +;; +;; Backoff time per http/https request retry (seconds) +;RETRY_BACKOFF = 3 +;; +;; Allowed domains for migrating, default is blank. Blank means everything will be allowed. +;; Multiple domains could be separated by commas. +;ALLOWED_DOMAINS = +;; +;; Blocklist for migrating, default is blank. Multiple domains could be separated by commas. +;; When ALLOWED_DOMAINS is not blank, this option will be ignored. +;BLOCKED_DOMAINS = +;; +;; Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 (false by default) +;ALLOW_LOCALNETWORKS = false -[migrations] -; Max attempts per http/https request on migrations. -MAX_ATTEMPTS = 3 -; Backoff time per http/https request retry (seconds) -RETRY_BACKOFF = 3 -; Allowed domains for migrating, default is blank. Blank means everything will be allowed. -; Multiple domains could be separated by commas. -ALLOWED_DOMAINS = -; Blocklist for migrating, default is blank. Multiple domains could be separated by commas. -; When ALLOWED_DOMAINS is not blank, this option will be ignored. -BLOCKED_DOMAINS = -; Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 (false by default) -ALLOW_LOCALNETWORKS = false +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; default storage for attachments, lfs and avatars +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[storage] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; storage type +;STORAGE_TYPE = local -; default storage for attachments, lfs and avatars -[storage] -; storage type -STORAGE_TYPE = local +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; settings for repository archives, will override storage setting +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;[storage.repo-archive] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; storage type +;STORAGE_TYPE = local -; lfs storage will override storage -[lfs] -STORAGE_TYPE = local +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; lfs storage will override storage +;; +;[lfs] +;STORAGE_TYPE = local -; customize storage +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; customize storage ;[storage.my_minio] ;STORAGE_TYPE = minio -; Minio endpoint to connect only available when STORAGE_TYPE is `minio` +;; +;; Minio endpoint to connect only available when STORAGE_TYPE is `minio` ;MINIO_ENDPOINT = localhost:9000 -; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` +;; +;; Minio accessKeyID to connect only available when STORAGE_TYPE is `minio` ;MINIO_ACCESS_KEY_ID = -; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` +;; +;; Minio secretAccessKey to connect only available when STORAGE_TYPE is `minio` ;MINIO_SECRET_ACCESS_KEY = -; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio` +;; +;; Minio bucket to store the attachments only available when STORAGE_TYPE is `minio` ;MINIO_BUCKET = gitea -; Minio location to create bucket only available when STORAGE_TYPE is `minio` +;; +;; Minio location to create bucket only available when STORAGE_TYPE is `minio` ;MINIO_LOCATION = us-east-1 -; Minio enabled ssl only available when STORAGE_TYPE is `minio` +;; +;; Minio enabled ssl only available when STORAGE_TYPE is `minio` ;MINIO_USE_SSL = false + +;[proxy] +;; Enable the proxy, all requests to external via HTTP will be affected +;PROXY_ENABLED = false +;; Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy/no_proxy +;PROXY_URL = +;; Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. +;PROXY_HOSTS = diff --git a/docker/manifest.rootless.tmpl b/docker/manifest.rootless.tmpl index aed36caa4..1d14041ff 100644 --- a/docker/manifest.rootless.tmpl +++ b/docker/manifest.rootless.tmpl @@ -1,18 +1,19 @@ -image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}-rootless +image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-rootless {{#if build.tags}} tags: {{#each build.tags}} - {{this}}-rootless {{/each}} + - "latest-rootless" {{/if}} manifests: - - image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64-rootless + image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-amd64-rootless platform: architecture: amd64 os: linux - - image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64-rootless + image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}}-linux-arm64-rootless platform: architecture: arm64 os: linux diff --git a/docker/manifest.tmpl b/docker/manifest.tmpl index 967844962..43a57f7f2 100644 --- a/docker/manifest.tmpl +++ b/docker/manifest.tmpl @@ -1,19 +1,20 @@ -image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}} +image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}dev{{/if}} {{#if build.tags}} tags: {{#each build.tags}} - {{this}} {{/each}} + - "latest" {{/if}} manifests: - - image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64 + image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{else}}dev-{{/if}}linux-amd64 platform: architecture: amd64 os: linux - - image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64 + image: gitea/gitea:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{else}}dev-{{/if}}linux-arm64 platform: architecture: arm64 os: linux - variant: v8 + variant: v8 \ No newline at end of file diff --git a/docker/root/etc/s6/gitea/setup b/docker/root/etc/s6/gitea/setup index 4449420b9..d8f6a3b31 100755 --- a/docker/root/etc/s6/gitea/setup +++ b/docker/root/etc/s6/gitea/setup @@ -23,7 +23,7 @@ if [ ! -f ${GITEA_CUSTOM}/conf/app.ini ]; then INSTALL_LOCK=true fi - # Substitude the environment variables in the template + # Substitute the environment variables in the template APP_NAME=${APP_NAME:-"Gitea: Git with a cup of tea"} \ RUN_MODE=${RUN_MODE:-"prod"} \ DOMAIN=${DOMAIN:-"localhost"} \ @@ -48,6 +48,9 @@ if [ ! -f ${GITEA_CUSTOM}/conf/app.ini ]; then chown ${USER}:git ${GITEA_CUSTOM}/conf/app.ini fi +# Replace app.ini settings with env variables in the form GITEA__SECTION_NAME__KEY_NAME +environment-to-ini --config ${GITEA_CUSTOM}/conf/app.ini + # only chown if current owner is not already the gitea ${USER}. No recursive check to save time if ! [[ $(ls -ld /data/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /data/gitea; fi if ! [[ $(ls -ld /app/gitea | awk '{print $3}') = ${USER} ]]; then chown -R ${USER}:git /app/gitea; fi diff --git a/docker/root/etc/s6/openssh/setup b/docker/root/etc/s6/openssh/setup index 2a5eb9b09..89c03092b 100755 --- a/docker/root/etc/s6/openssh/setup +++ b/docker/root/etc/s6/openssh/setup @@ -24,9 +24,31 @@ if [ ! -f /data/ssh/ssh_host_ecdsa_key ]; then ssh-keygen -t ecdsa -b 256 -f /data/ssh/ssh_host_ecdsa_key -N "" > /dev/null fi +if [ -e /data/ssh/ssh_host_ed25519_cert ]; then + SSH_ED25519_CERT=${SSH_ED25519_CERT:-"/data/ssh/ssh_host_ed25519_cert"} +fi + +if [ -e /data/ssh/ssh_host_rsa_cert ]; then + SSH_RSA_CERT=${SSH_RSA_CERT:-"/data/ssh/ssh_host_rsa_cert"} +fi + +if [ -e /data/ssh/ssh_host_ecdsa_cert ]; then + SSH_ECDSA_CERT=${SSH_ECDSA_CERT:-"/data/ssh/ssh_host_ecdsa_cert"} +fi + +if [ -e /data/ssh/ssh_host_dsa_cert ]; then + SSH_DSA_CERT=${SSH_DSA_CERT:-"/data/ssh/ssh_host_dsa_cert"} +fi + if [ -d /etc/ssh ]; then SSH_PORT=${SSH_PORT:-"22"} \ SSH_LISTEN_PORT=${SSH_LISTEN_PORT:-"${SSH_PORT}"} \ + SSH_ED25519_CERT="${SSH_ED25519_CERT:+"HostCertificate "}${SSH_ED25519_CERT}" \ + SSH_RSA_CERT="${SSH_RSA_CERT:+"HostCertificate "}${SSH_RSA_CERT}" \ + SSH_ECDSA_CERT="${SSH_ECDSA_CERT:+"HostCertificate "}${SSH_ECDSA_CERT}" \ + SSH_DSA_CERT="${SSH_DSA_CERT:+"HostCertificate "}${SSH_DSA_CERT}" \ + SSH_MAX_STARTUPS="${SSH_MAX_STARTUPS:+"MaxStartups "}${SSH_MAX_STARTUPS}" \ + SSH_MAX_SESSIONS="${SSH_MAX_SESSIONS:+"MaxSessions "}${SSH_MAX_SESSIONS}" \ envsubst < /etc/templates/sshd_config > /etc/ssh/sshd_config chmod 0644 /etc/ssh/sshd_config diff --git a/docker/root/etc/templates/app.ini b/docker/root/etc/templates/app.ini index 1a831a6d1..c5212a935 100644 --- a/docker/root/etc/templates/app.ini +++ b/docker/root/etc/templates/app.ini @@ -47,14 +47,14 @@ PATH = /data/gitea/attachments [log] MODE = console LEVEL = info -REDIRECT_MACARON_LOG = true -MACARON = console ROUTER = console ROOT_PATH = /data/gitea/log [security] INSTALL_LOCK = $INSTALL_LOCK SECRET_KEY = $SECRET_KEY +REVERSE_PROXY_LIMIT = 1 +REVERSE_PROXY_TRUSTED_PROXIES = * [service] DISABLE_REGISTRATION = $DISABLE_REGISTRATION diff --git a/docker/root/etc/templates/sshd_config b/docker/root/etc/templates/sshd_config index 26e26feb4..8d336f3a8 100644 --- a/docker/root/etc/templates/sshd_config +++ b/docker/root/etc/templates/sshd_config @@ -5,16 +5,19 @@ AddressFamily any ListenAddress 0.0.0.0 ListenAddress :: +${SSH_MAX_STARTUPS} +${SSH_MAX_SESSIONS} + LogLevel INFO HostKey /data/ssh/ssh_host_ed25519_key -HostCertificate /data/ssh/ssh_host_ed25519_cert +${SSH_ED25519_CERT} HostKey /data/ssh/ssh_host_rsa_key -HostCertificate /data/ssh/ssh_host_rsa_cert +${SSH_RSA_CERT} HostKey /data/ssh/ssh_host_ecdsa_key -HostCertificate /data/ssh/ssh_host_ecdsa_cert +${SSH_ECDSA_CERT} HostKey /data/ssh/ssh_host_dsa_key -HostCertificate /data/ssh/ssh_host_dsa_cert +${SSH_DSA_CERT} AuthorizedKeysFile .ssh/authorized_keys AuthorizedPrincipalsFile .ssh/authorized_principals diff --git a/docker/rootless/etc/templates/app.ini b/docker/rootless/etc/templates/app.ini index 92755575b..905b2adb3 100644 --- a/docker/rootless/etc/templates/app.ini +++ b/docker/rootless/etc/templates/app.ini @@ -49,6 +49,8 @@ ROOT_PATH = $GITEA_WORK_DIR/data/log [security] INSTALL_LOCK = $INSTALL_LOCK SECRET_KEY = $SECRET_KEY +REVERSE_PROXY_LIMIT = 1 +REVERSE_PROXY_TRUSTED_PROXIES = * [service] DISABLE_REGISTRATION = $DISABLE_REGISTRATION diff --git a/docker/rootless/usr/local/bin/docker-setup.sh b/docker/rootless/usr/local/bin/docker-setup.sh index 9764ff3c5..47645726c 100755 --- a/docker/rootless/usr/local/bin/docker-setup.sh +++ b/docker/rootless/usr/local/bin/docker-setup.sh @@ -25,7 +25,7 @@ if [ ! -f ${GITEA_APP_INI} ]; then INSTALL_LOCK=true fi - # Substitude the environment variables in the template + # Substitute the environment variables in the template APP_NAME=${APP_NAME:-"Gitea: Git with a cup of tea"} \ RUN_MODE=${RUN_MODE:-"prod"} \ RUN_USER=${USER:-"git"} \ @@ -46,3 +46,6 @@ if [ ! -f ${GITEA_APP_INI} ]; then SECRET_KEY=${SECRET_KEY:-""} \ envsubst < /etc/templates/app.ini > ${GITEA_APP_INI} fi + +# Replace app.ini settings with env variables in the form GITEA__SECTION_NAME__KEY_NAME +environment-to-ini --config ${GITEA_APP_INI} diff --git a/docs/Makefile b/docs/Makefile index 487e16cf6..68afe03e7 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -31,4 +31,4 @@ update: $(THEME) $(THEME): $(THEME)/theme.toml $(THEME)/theme.toml: mkdir -p $$(dirname $@) - curl -s $(ARCHIVE) | tar xz -C $$(dirname $@) + curl -L -s $(ARCHIVE) | tar xz -C $$(dirname $@) diff --git a/docs/config.yaml b/docs/config.yaml index 98d18c06c..885a4e0e8 100644 --- a/docs/config.yaml +++ b/docs/config.yaml @@ -18,10 +18,10 @@ params: description: Git with a cup of tea author: The Gitea Authors website: https://docs.gitea.io - version: 1.13.1 - minGoVersion: 1.13 - goVersion: 1.15 - minNodeVersion: 10.13 + version: 1.15.0 + minGoVersion: 1.16 + goVersion: 1.17 + minNodeVersion: 12.17 outputs: home: @@ -147,15 +147,15 @@ languages: url: https://blog.gitea.io/ weight: 30 pre: rss - - name: 程式碼 - url: https://code.gitea.io/ + - name: 商店 + url: https://shop.gitea.io/ weight: 40 - pre: code - - name: 翻译 + pre: shopping-cart + - name: 翻譯 url: https://crowdin.com/project/gitea weight: 41 pre: language - - name: 下载 + - name: 下載 url: https://dl.gitea.io/ weight: 50 pre: download @@ -163,11 +163,11 @@ languages: url: https://github.com/go-gitea/ weight: 60 pre: github - - name: Discord Chat + - name: Discord 聊天室 url: https://discord.gg/Gitea weight: 70 pre: comment - - name: Forum + - name: 討論區 url: https://discourse.gitea.io/ weight: 80 pre: group @@ -313,20 +313,20 @@ languages: weight: 80 pre: group - pt-pt: + de-de: weight: 6 - languageName: Português de Portugal + languageName: Deutsch menu: page: - - name: Página inicial - url: https://gitea.io/pt-pt/ + - name: Webseite + url: https://gitea.io/en-us/ weight: 10 pre: home - - name: Documentação - url: /pt-pt/ + post: active + - name: Dokumentation + url: /de-de/ weight: 20 pre: question - post: active - name: API url: https://try.gitea.io/api/swagger weight: 45 @@ -335,15 +335,15 @@ languages: url: https://blog.gitea.io/ weight: 30 pre: rss - - name: Código-fonte + - name: Code url: https://code.gitea.io/ weight: 40 pre: code - - name: Tradução + - name: Übersetzung url: https://crowdin.com/project/gitea weight: 41 pre: language - - name: Descarregamentos + - name: Downloads url: https://dl.gitea.io/ weight: 50 pre: download @@ -351,11 +351,11 @@ languages: url: https://github.com/go-gitea/ weight: 60 pre: github - - name: Discussão no Discord + - name: Discord Chat url: https://discord.gg/Gitea weight: 70 pre: comment - - name: Fórum + - name: Forum url: https://discourse.gitea.io/ weight: 80 pre: group diff --git a/docs/content/doc/advanced.zh-tw.md b/docs/content/doc/advanced.zh-tw.md new file mode 100644 index 000000000..ebfe51978 --- /dev/null +++ b/docs/content/doc/advanced.zh-tw.md @@ -0,0 +1,13 @@ +--- +date: "2016-12-01T16:00:00+02:00" +title: "進階" +slug: "advanced" +weight: 30 +toc: false +draft: false +menu: + sidebar: + name: "進階" + weight: 40 + identifier: "advanced" +--- diff --git a/docs/content/doc/advanced/adding-legal-pages.en-us.md b/docs/content/doc/advanced/adding-legal-pages.en-us.md index b13337a4a..8535a6e86 100644 --- a/docs/content/doc/advanced/adding-legal-pages.en-us.md +++ b/docs/content/doc/advanced/adding-legal-pages.en-us.md @@ -32,7 +32,7 @@ You absolutely must not place a general ToS or privacy statement that implies th Create or append to `/path/to/custom/templates/custom/extra_links_footer.tmpl`: ```go -Privacy Policy +Privacy Policy ``` Restart Gitea to see the changes. diff --git a/docs/content/doc/advanced/clone-filter.en-us.md b/docs/content/doc/advanced/clone-filter.en-us.md new file mode 100644 index 000000000..810a7030c --- /dev/null +++ b/docs/content/doc/advanced/clone-filter.en-us.md @@ -0,0 +1,65 @@ +--- +date: "2021-02-02" +title: "Clone filters (partial clone)" +slug: "clone-filters" +weight: 25 +draft: false +toc: false +menu: + sidebar: + parent: "advanced" + name: "Clone filters" + weight: 25 + identifier: "clone-filters" +--- + +# Clone filters (partial clone) + +Git introduces `--filter` option to `git clone` command, which filters out +large files and objects (such as blobs) to create partial clone of a repo. +Clone filters are especially useful for large repo and/or metered connection, +where full clone (without `--filter`) can be expensive (as all history data +must be downloaded). + +This requires Git version 2.22 or later, both on the Gitea server and on the +client. For clone filters to work properly, make sure that Git version +on the client is at least the same as on the server (or later). Login to +Gitea server as admin and head to Site Administration -> Configuration to +see Git version of the server. + +By default, clone filters are disabled, which cause the server to ignore +`--filter` option. + +To enable clone filters on per-repo basis, edit the repo's `config` on +repository location. Consult `ROOT` option on `repository` section of +Gitea configuration (`app.ini`) for the exact location. For example, to +enable clone filters for `some-repo`, edit +`/var/gitea/data/gitea-repositories/some-user/some-repo.git/config` and add: + +```ini +[uploadpack] + allowfilter = true +``` + +To enable clone filters globally, add that config above to `~/.gitconfig` +of user that run Gitea (for example `git`). + +Alternatively, you can use `git config` to set the option. + +To enable for a specific repo: + +```bash +cd /var/gitea/data/gitea-repositories/some-user/some-repo.git +git config --local uploadpack.allowfilter true +``` +To enable globally, login as user that run Gitea and: + +```bash +git config --global uploadpack.allowfilter true +``` + +See [GitHub blog post: Get up to speed with partial clone](https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/) +for common use cases of clone filters (blobless and treeless clones), and +[Gitlab docs for partial clone](https://docs.gitlab.com/ee/topics/git/partial_clone.html) +for more advanced use cases (such as filter by file size and remove +filters to turn partial clone into full clone). diff --git a/docs/content/doc/advanced/config-cheat-sheet.en-us.md b/docs/content/doc/advanced/config-cheat-sheet.en-us.md index 17d349b58..242189f5b 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.en-us.md +++ b/docs/content/doc/advanced/config-cheat-sheet.en-us.md @@ -59,7 +59,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `MIRROR_QUEUE_LENGTH`: **1000**: Patch test queue length, increase if pull request patch testing starts hanging. - `PREFERRED_LICENSES`: **Apache License 2.0,MIT License**: Preferred Licenses to place at - the top of the list. Name must match file name in conf/license or custom/conf/license. + the top of the list. Name must match file name in options/license or custom/options/license. - `DISABLE_HTTP_GIT`: **false**: Disable the ability to interact with repositories over the HTTP protocol. - `USE_COMPAT_SSH_URI`: **false**: Force ssh:// clone url instead of scp-style uri when @@ -75,6 +75,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `PREFIX_ARCHIVE_FILES`: **true**: Prefix archive files by placing them in a directory named after the repository. - `DISABLE_MIRRORS`: **false**: Disable the creation of **new** mirrors. Pre-existing mirrors remain valid. - `DISABLE_MIGRATIONS`: **false**: Disable migrating feature. +- `DISABLE_STARS`: **false**: Disable stars feature. - `DEFAULT_BRANCH`: **master**: Default branch name of all repositories. - `ALLOW_ADOPTION_OF_UNADOPTED_REPOSITORIES`: **false**: Allow non-admin users to adopt unadopted repositories - `ALLOW_DELETION_OF_UNADOPTED_REPOSITORIES`: **false**: Allow non-admin users to delete unadopted repositories @@ -93,10 +94,11 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `REOPEN_KEYWORDS`: **reopen**, **reopens**, **reopened**: List of keywords used in Pull Request comments to automatically reopen a related issue - `DEFAULT_MERGE_MESSAGE_COMMITS_LIMIT`: **50**: In the default merge message for squash commits include at most this many commits. Set to `-1` to include all commits -- `DEFAULT_MERGE_MESSAGE_SIZE`: **5120**: In the default merge message for squash commits limit the size of the commit messages. Set to `-1` to have no limit. +- `DEFAULT_MERGE_MESSAGE_SIZE`: **5120**: In the default merge message for squash commits limit the size of the commit messages. Set to `-1` to have no limit. Only used if `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES` is `true`. - `DEFAULT_MERGE_MESSAGE_ALL_AUTHORS`: **false**: In the default merge message for squash commits walk all commits to include all authors in the Co-authored-by otherwise just use those in the limited list - `DEFAULT_MERGE_MESSAGE_MAX_APPROVERS`: **10**: In default merge messages limit the number of approvers listed as `Reviewed-by:`. Set to `-1` to include all. - `DEFAULT_MERGE_MESSAGE_OFFICIAL_APPROVERS_ONLY`: **true**: In default merge messages only include approvers who are officially allowed to review. +- `POPULATE_SQUASH_COMMENT_WITH_COMMIT_MESSAGES`: **false**: In default squash-merge messages include the commit message of all commits comprising the pull request. ### Repository - Issue (`repository.issue`) @@ -113,6 +115,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. ### Repository - Release (`repository.release`) - `ALLOWED_TYPES`: **\**: Comma-separated list of allowed file extensions (`.zip`), mime types (`text/plain`) or wildcard type (`image/*`, `audio/*`, `video/*`). Empty value or `*/*` allows all types. +- `DEFAULT_PAGING_NUM`: **10**: The default paging number of releases user interface ### Repository - Signing (`repository.signing`) @@ -126,8 +129,8 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - Options other than `never` and `always` can be combined as a comma separated list. - `DEFAULT_TRUST_MODEL`: **collaborator**: \[collaborator, committer, collaboratorcommitter\]: The default trust model used for verifying commits. - `collaborator`: Trust signatures signed by keys of collaborators. - - `committer`: Trust signatures that match committers (This matches GitHub and will force Gitea signed commits to have Gitea as the commmitter). - - `collaboratorcommitter`: Trust signatures signed by keys of collaborators which match the commiter. + - `committer`: Trust signatures that match committers (This matches GitHub and will force Gitea signed commits to have Gitea as the committer). + - `collaboratorcommitter`: Trust signatures signed by keys of collaborators which match the committer. - `WIKI`: **never**: \[never, pubkey, twofa, always, parentsigned\]: Sign commits to wiki. - `CRUD_ACTIONS`: **pubkey, twofa, parentsigned**: \[never, pubkey, twofa, parentsigned, always\]: Sign CRUD actions. - Options as above, with the addition of: @@ -142,6 +145,15 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `LOCAL_COPY_PATH`: **tmp/local-repo**: Path for temporary local repository copies. Defaults to `tmp/local-repo` +## Repository - MIME type mapping (`repository.mimetype_mapping`) + +Configuration for set the expected MIME type based on file extensions of downloadable files. Configuration presents in key-value pairs and file extensions starts with leading `.`. + +The following configuration set `Content-Type: application/vnd.android.package-archive` header when downloading files with `.apk` file extension. +```ini +.apk=application/vnd.android.package-archive +``` + ## CORS (`cors`) - `ENABLED`: **false**: enable cors headers (disabled by default) @@ -151,6 +163,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `METHODS`: **GET,HEAD,POST,PUT,PATCH,DELETE,OPTIONS**: list of methods allowed to request - `MAX_AGE`: **10m**: max time to cache response - `ALLOW_CREDENTIALS`: **false**: allow request with credentials +- `X_FRAME_OPTIONS`: **SAMEORIGIN**: Set the `X-Frame-Options` header value. ## UI (`ui`) @@ -169,7 +182,10 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `MAX_DISPLAY_FILE_SIZE`: **8388608**: Max size of files to be displayed (default is 8MiB) - `REACTIONS`: All available reactions users can choose on issues/prs and comments Values can be emoji alias (:smile:) or a unicode emoji. - For custom reactions, add a tightly cropped square image to public/emoji/img/reaction_name.png + For custom reactions, add a tightly cropped square image to public/img/emoji/reaction_name.png +- `CUSTOM_EMOJIS`: **gitea, codeberg, gitlab, git, github, gogs**: Additional Emojis not defined in the utf8 standard. + By default we support gitea (:gitea:), to add more copy them to public/img/emoji/emoji_name.png and + add it to this config. - `DEFAULT_SHOW_FULL_NAME`: **false**: Whether the full name of the users should be shown where possible. If the full name isn't set, the username will be used. - `SEARCH_REPO_DESCRIPTION`: **true**: Whether to search within description at repository search on explore page. - `USE_SERVICE_WORKER`: **true**: Whether to enable a Service Worker to cache frontend assets. @@ -198,6 +214,10 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `ENABLE_RENDER`: **true**: Whether to render SVG files as images. If SVG rendering is disabled, SVG files are displayed as text and cannot be embedded in markdown files as images. +### UI - CSV Files (`ui.csv`) + +- `MAX_FILE_SIZE`: **524288** (512kb): Maximum allowed file size in bytes to render CSV files as table. (Set to 0 for no limit). + ## Markdown (`markdown`) - `ENABLE_HARD_LINE_BREAK_IN_COMMENTS`: **true**: Render soft line breaks as hard line breaks in comments, which @@ -237,6 +257,9 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. most cases you do not need to change the default value. Alter it only if your SSH server node is not the same as HTTP node. Do not set this variable if `PROTOCOL` is set to `unix`. +- `PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the connection. (Set to 0 to + disable all timeouts.) +- `PER_WRITE_PER_KB_TIMEOUT`: **10s**: Timeout per Kb written to connections. - `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. - `START_SSH_SERVER`: **false**: When enabled, use the built-in SSH server. @@ -253,12 +276,17 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `SSH_AUTHORIZED_PRINCIPALS_ALLOW`: **off** or **username, email**: \[off, username, email, anything\]: Specify the principals values that users are allowed to use as principal. When set to `anything` no checks are done on the principal string. When set to `off` authorized principal are not allowed to be set. - `SSH_CREATE_AUTHORIZED_PRINCIPALS_FILE`: **false/true**: Gitea will create a authorized_principals file by default when it is not using the internal ssh server and `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`. - `SSH_AUTHORIZED_PRINCIPALS_BACKUP`: **false/true**: Enable SSH Authorized Principals Backup when rewriting all keys, default is true if `SSH_AUTHORIZED_PRINCIPALS_ALLOW` is not `off`. +- `SSH_AUTHORIZED_KEYS_COMMAND_TEMPLATE`: **{{.AppPath}} --config={{.CustomConf}} serv key-{{.Key.ID}}**: Set the template for the command to passed on authorized keys. Possible keys are: AppPath, AppWorkPath, CustomConf, CustomPath, Key - where Key is a `models.PublicKey` and the others are strings which are shellquoted. - `SSH_SERVER_CIPHERS`: **aes128-ctr, aes192-ctr, aes256-ctr, aes128-gcm@openssh.com, arcfour256, arcfour128**: For the built-in SSH server, choose the ciphers to support for SSH connections, for system SSH this setting has no effect. - `SSH_SERVER_KEY_EXCHANGES`: **diffie-hellman-group1-sha1, diffie-hellman-group14-sha1, ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, curve25519-sha256@libssh.org**: For the built-in SSH server, choose the key exchange algorithms to support for SSH connections, for system SSH this setting has no effect. - `SSH_SERVER_MACS`: **hmac-sha2-256-etm@openssh.com, hmac-sha2-256, hmac-sha1, hmac-sha1-96**: For the built-in SSH server, choose the MACs to support for SSH connections, for system SSH this setting has no effect +- `SSH_SERVER_HOST_KEYS`: **ssh/gitea.rsa, ssh/gogs.rsa**: For the built-in SSH server, choose the keypairs to offer as the host key. The private key should be at `SSH_SERVER_HOST_KEY` and the public `SSH_SERVER_HOST_KEY.pub`. Relative paths are made absolute relative to the `APP_DATA_PATH`. If no key exists a 4096 bit RSA key will be created for you. - `SSH_KEY_TEST_PATH`: **/tmp**: Directory to create temporary files in when testing public keys using ssh-keygen, default is the system temporary directory. - `SSH_KEYGEN_PATH`: **ssh-keygen**: Path to ssh-keygen, default is 'ssh-keygen' which means the shell is responsible for finding out which one to call. - `SSH_EXPOSE_ANONYMOUS`: **false**: Enable exposure of SSH clone URL to anonymous visitors, default is false. +- `SSH_PER_WRITE_TIMEOUT`: **30s**: Timeout for any write to the SSH connections. (Set to + 0 to disable all timeouts.) +- `SSH_PER_WRITE_PER_KB_TIMEOUT`: **10s**: Timeout per Kb written to SSH connections. - `MINIMUM_KEY_SIZE_CHECK`: **true**: Indicate whether to check minimum key size with corresponding type. - `OFFLINE_MODE`: **false**: Disables use of CDN for static files and Gravatar for profile pictures. @@ -274,7 +302,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `LANDING_PAGE`: **home**: Landing page for unauthenticated users \[home, explore, organizations, login\]. - `LFS_START_SERVER`: **false**: Enables git-lfs support. -- `LFS_CONTENT_PATH`: **%(APP_DATA_PATH)/lfs**: Default LFS content path. (if it is on local storage.) +- `LFS_CONTENT_PATH`: **%(APP_DATA_PATH)/lfs**: Default LFS content path. (if it is on local storage.) **DEPRECATED** use settings in `[lfs]`. - `LFS_JWT_SECRET`: **\**: LFS authentication secret, change this a unique string. - `LFS_HTTP_AUTH_EXPIRY`: **20m**: LFS authentication validity period in time.Duration, pushes taking longer than this may fail. - `LFS_MAX_FILE_SIZE`: **0**: Maximum allowed LFS file size in bytes (Set to 0 for no limit). @@ -319,9 +347,9 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`. - `PATH`: **data/gitea.db**: For SQLite3 only, the database file path. - `LOG_SQL`: **true**: Log the executed SQL. - `DB_RETRIES`: **10**: How many ORM init / DB connect attempts allowed. -- `DB_RETRY_BACKOFF`: **3s**: time.Duration to wait before trying another ORM init / DB connect attempt, if failure occured. +- `DB_RETRY_BACKOFF`: **3s**: time.Duration to wait before trying another ORM init / DB connect attempt, if failure occurred. - `MAX_OPEN_CONNS` **0**: Database maximum open connections - default is 0, meaning there is no limit. -- `MAX_IDLE_CONNS` **2**: Max idle database connections on connnection pool, default is 2 - this will be capped to `MAX_OPEN_CONNS`. +- `MAX_IDLE_CONNS` **2**: Max idle database connections on connection pool, default is 2 - this will be capped to `MAX_OPEN_CONNS`. - `CONN_MAX_LIFETIME` **0 or 3s**: Sets the maximum amount of time a DB connection may be reused - default is 0, meaning there is no limit (except on MySQL where it is 3s - see #6804 & #7071). Please see #8540 & #8273 for further discussion of the appropriate values for `MAX_OPEN_CONNS`, `MAX_IDLE_CONNS` & `CONN_MAX_LIFETIME` and their @@ -334,10 +362,10 @@ relation to port exhaustion. - `ISSUE_INDEXER_NAME`: **gitea_issues**: Issue indexer name, available when ISSUE_INDEXER_TYPE is elasticsearch - `ISSUE_INDEXER_PATH`: **indexers/issues.bleve**: Index file used for issue search; available when ISSUE_INDEXER_TYPE is bleve and elasticsearch. - The next 4 configuration values are deprecated and should be set in `queue.issue_indexer` however are kept for backwards compatibility: -- `ISSUE_INDEXER_QUEUE_TYPE`: **levelqueue**: Issue indexer queue, currently supports:`channel`, `levelqueue`, `redis`. -- `ISSUE_INDEXER_QUEUE_DIR`: **indexers/issues.queue**: When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this will be the path where the queue will be saved. -- `ISSUE_INDEXER_QUEUE_CONN_STR`: **addrs=127.0.0.1:6379 db=0**: When `ISSUE_INDEXER_QUEUE_TYPE` is `redis`, this will store the redis connection string. When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this is a directory or additional options of the form `leveldb://path/to/db?option=value&....`, and overrides `ISSUE_INDEXER_QUEUE_DIR`. -- `ISSUE_INDEXER_QUEUE_BATCH_NUMBER`: **20**: Batch queue number. +- `ISSUE_INDEXER_QUEUE_TYPE`: **levelqueue**: Issue indexer queue, currently supports:`channel`, `levelqueue`, `redis`. **DEPRECATED** use settings in `[queue.issue_indexer]`. +- `ISSUE_INDEXER_QUEUE_DIR`: **queues/common**: When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this will be the path where the queue will be saved. **DEPRECATED** use settings in `[queue.issue_indexer]`. +- `ISSUE_INDEXER_QUEUE_CONN_STR`: **addrs=127.0.0.1:6379 db=0**: When `ISSUE_INDEXER_QUEUE_TYPE` is `redis`, this will store the redis connection string. When `ISSUE_INDEXER_QUEUE_TYPE` is `levelqueue`, this is a directory or additional options of the form `leveldb://path/to/db?option=value&....`, and overrides `ISSUE_INDEXER_QUEUE_DIR`. **DEPRECATED** use settings in `[queue.issue_indexer]`. +- `ISSUE_INDEXER_QUEUE_BATCH_NUMBER`: **20**: Batch queue number. **DEPRECATED** use settings in `[queue.issue_indexer]`. - `REPO_INDEXER_ENABLED`: **false**: Enables code search (uses a lot of disk space, about 6 times more than the repository size). - `REPO_INDEXER_TYPE`: **bleve**: Code search engine type, could be `bleve` or `elasticsearch`. @@ -348,29 +376,29 @@ relation to port exhaustion. - `REPO_INDEXER_INCLUDE`: **empty**: A comma separated list of glob patterns (see https://github.com/gobwas/glob) to **include** in the index. Use `**.txt` to match any files with .txt extension. An empty list means include all files. - `REPO_INDEXER_EXCLUDE`: **empty**: A comma separated list of glob patterns (see https://github.com/gobwas/glob) to **exclude** from the index. Files that match this list will not be indexed, even if they match in `REPO_INDEXER_INCLUDE`. - `REPO_INDEXER_EXCLUDE_VENDORED`: **true**: Exclude vendored files from index. -- `UPDATE_BUFFER_LEN`: **20**: Buffer length of index request. +- `UPDATE_BUFFER_LEN`: **20**: Buffer length of index request. **DEPRECATED** use settings in `[queue.issue_indexer]`. - `MAX_FILE_SIZE`: **1048576**: Maximum size in bytes of files to be indexed. - `STARTUP_TIMEOUT`: **30s**: If the indexer takes longer than this timeout to start - fail. (This timeout will be added to the hammer time above for child processes - as bleve will not start until the previous parent is shutdown.) Set to zero to never timeout. ## Queue (`queue` and `queue.*`) - `TYPE`: **persistable-channel**: General queue type, currently support: `persistable-channel` (uses a LevelDB internally), `channel`, `level`, `redis`, `dummy` -- `DATADIR`: **queues/**: Base DataDir for storing persistent and level queues. `DATADIR` for individual queues can be set in `queue.name` sections but will default to `DATADIR/`**`name`**. +- `DATADIR`: **queues/**: Base DataDir for storing persistent and level queues. `DATADIR` for individual queues can be set in `queue.name` sections but will default to `DATADIR/`**`common`**. (Previously each queue would default to `DATADIR/`**`name`**.) - `LENGTH`: **20**: Maximal queue size before channel queues block - `BATCH_LENGTH`: **20**: Batch data before passing to the handler - `CONN_STR`: **redis://127.0.0.1:6379/0**: Connection string for the redis queue type. Options can be set using query params. Similarly LevelDB options can also be set using: **leveldb://relative/path?option=value** or **leveldb:///absolute/path?option=value**, and will override `DATADIR` -- `QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overriden in the specific `queue.name` section. +- `QUEUE_NAME`: **_queue**: The suffix for default redis and disk queue name. Individual queues will default to **`name`**`QUEUE_NAME` but can be overridden in the specific `queue.name` section. - `SET_NAME`: **_unique**: The suffix that will be added to the default redis and disk queue `set` name for unique queues. Individual queues will default to **`name`**`QUEUE_NAME`_`SET_NAME`_ but can be overridden in the specific `queue.name` section. - `WRAP_IF_NECESSARY`: **true**: Will wrap queues with a timeoutable queue if the selected queue is not ready to be created - (Only relevant for the level queue.) - `MAX_ATTEMPTS`: **10**: Maximum number of attempts to create the wrapped queue - `TIMEOUT`: **GRACEFUL_HAMMER_TIME + 30s**: Timeout the creation of the wrapped queue if it takes longer than this to create. - Queues by default come with a dynamically scaling worker pool. The following settings configure this: -- `WORKERS`: **1**: Number of initial workers for the queue. +- `WORKERS`: **0** (v1.14 and before: **1**): Number of initial workers for the queue. - `MAX_WORKERS`: **10**: Maximum number of worker go-routines for the queue. - `BLOCK_TIMEOUT`: **1s**: If the queue blocks for this time, boost the number of workers - the `BLOCK_TIMEOUT` will then be doubled before boosting again whilst the boost is ongoing. - `BOOST_TIMEOUT`: **5m**: Boost workers will timeout after this long. -- `BOOST_WORKERS`: **5**: This many workers will be added to the worker pool if there is a boost. +- `BOOST_WORKERS`: **1** (v1.14 and before: **5**): This many workers will be added to the worker pool if there is a boost. ## Admin (`admin`) @@ -389,6 +417,9 @@ relation to port exhaustion. authentication. - `REVERSE_PROXY_AUTHENTICATION_EMAIL`: **X-WEBAUTH-EMAIL**: Header name for reverse proxy authentication provided email. +- `REVERSE_PROXY_LIMIT`: **1**: Interpret X-Forwarded-For header or the X-Real-IP header and set this as the remote IP for the request. + Number of trusted proxy count. Set to zero to not use these headers. +- `REVERSE_PROXY_TRUSTED_PROXIES`: **127.0.0.0/8,::1/128**: List of IP addresses and networks separated by comma of trusted proxy servers. Use `*` to trust all. - `DISABLE_GIT_HOOKS`: **true**: Set to `false` to enable users with git hook privilege to create custom git hooks. WARNING: Custom git hooks can be used to perform arbitrary code execution on the host operating system. This enables the users to access and modify this config file and the Gitea database and interrupt the Gitea service. @@ -396,11 +427,12 @@ relation to port exhaustion. It also enables them to access other resources available to the user on the operating system that is running the Gitea instance and perform arbitrary actions in the name of the Gitea OS user. This maybe harmful to you website or your operating system. +- `DISABLE_WEBHOOKS`: **false**: Set to `true` to disable webhooks feature. - `ONLY_ALLOW_PUSH_IF_GITEA_ENVIRONMENT_SET`: **true**: Set to `false` to allow local users to push to gitea-repositories without setting up the Gitea environment. This is not recommended and if you want local users to push to gitea repositories you should set the environment appropriately. - `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server. - `INTERNAL_TOKEN`: **\**: Secret used to validate communication within Gitea binary. - `INTERNAL_TOKEN_URI`: ****: Instead of defining internal token in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`) -- `PASSWORD_HASH_ALGO`: **argon2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\]. +- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others. - `CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie. - `MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users. - `PASSWORD_COMPLEXITY`: **off**: Comma separated list of character classes required to pass minimum complexity. If left empty or no valid values are specified, checking is disabled (off): @@ -410,6 +442,7 @@ relation to port exhaustion. - spec - use one or more special characters as ``!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~`` - off - do not check password complexity - `PASSWORD_CHECK_PWN`: **false**: Check [HaveIBeenPwned](https://haveibeenpwned.com/Passwords) to see if a password has been exposed. +- `SUCCESSFUL_TOKENS_CACHE_SIZE`: **20**: Cache successful token hashes. API tokens are stored in the DB as pbkdf2 hashes however, this means that there is a potentially significant hashing load when there are multiple API operations. This cache will store the successfully hashed tokens in a LRU cache as a balance between performance and security. ## OpenID (`openid`) @@ -420,6 +453,21 @@ relation to port exhaustion. - `BLACKLISTED_URIS`: **\**: If non-empty, list of POSIX regex patterns matching OpenID URI's to block. +## OAuth2 Client (`oauth2_client`) + +- `REGISTER_EMAIL_CONFIRM`: *[service]* **REGISTER\_EMAIL\_CONFIRM**: Set this to enable or disable email confirmation of OAuth2 auto-registration. (Overwrites the REGISTER\_EMAIL\_CONFIRM setting of the `[service]` section) +- `OPENID_CONNECT_SCOPES`: **\**: List of additional openid connect scopes. (`openid` is implicitly added) +- `ENABLE_AUTO_REGISTRATION`: **false**: Automatically create user accounts for new oauth2 users. +- `USERNAME`: **nickname**: The source of the username for new oauth2 accounts: + - userid - use the userid / sub attribute + - nickname - use the nickname attribute + - email - use the username part of the email attribute +- `UPDATE_AVATAR`: **false**: Update avatar if available from oauth2 provider. Update will be performed on each login. +- `ACCOUNT_LINKING`: **login**: How to handle if an account / email already exists: + - disabled - show an error + - login - show an account linking login + - auto - automatically link with the account (Please be aware that this will grant access to an existing account just because the same username or email is provided. You must make sure that this does not cause issues with your authentication providers.) + ## Service (`service`) - `ACTIVE_CODE_LIVE_MINUTES`: **180**: Time limit (min) to confirm account/email registration. @@ -457,23 +505,35 @@ relation to port exhaustion. - `HCAPTCHA_SITEKEY`: **""**: Sign up at https://www.hcaptcha.com/ to get a sitekey for hcaptcha. - `DEFAULT_KEEP_EMAIL_PRIVATE`: **false**: By default set users to keep their email address private. - `DEFAULT_ALLOW_CREATE_ORGANIZATION`: **true**: Allow new users to create organizations by default. +- `DEFAULT_USER_IS_RESTRICTED`: **false**: Give new users restricted permissions by default - `DEFAULT_ENABLE_DEPENDENCIES`: **true**: Enable this to have dependencies enabled by default. - `ALLOW_CROSS_REPOSITORY_DEPENDENCIES` : **true** Enable this to allow dependencies on issues from any repository where the user is granted access. - `ENABLE_USER_HEATMAP`: **true**: Enable this to display the heatmap on users profiles. - `ENABLE_TIMETRACKING`: **true**: Enable Timetracking feature. -- `DEFAULT_ENABLE_TIMETRACKING`: **true**: Allow repositories to use timetracking by deault. +- `DEFAULT_ENABLE_TIMETRACKING`: **true**: Allow repositories to use timetracking by default. - `DEFAULT_ALLOW_ONLY_CONTRIBUTORS_TO_TRACK_TIME`: **true**: Only allow users with write permissions to track time. - `EMAIL_DOMAIN_WHITELIST`: **\**: If non-empty, list of domain names that can only be used to register on this instance. +- `EMAIL_DOMAIN_BLOCKLIST`: **\**: If non-empty, list of domain names that cannot be used to register on this instance - `SHOW_REGISTRATION_BUTTON`: **! DISABLE\_REGISTRATION**: Show Registration Button - `SHOW_MILESTONES_DASHBOARD_PAGE`: **true** Enable this to show the milestones dashboard page - a view of all the user's milestones - `AUTO_WATCH_NEW_REPOS`: **true**: Enable this to let all organisation users watch new repos when they are created - `AUTO_WATCH_ON_CHANGES`: **false**: Enable this to make users watch a repository after their first commit to it +- `DEFAULT_USER_VISIBILITY`: **public**: Set default visibility mode for users, either "public", "limited" or "private". +- `ALLOWED_USER_VISIBILITY_MODES`: **public,limited,private**: Set which visibility modes a user can have - `DEFAULT_ORG_VISIBILITY`: **public**: Set default visibility mode for organisations, either "public", "limited" or "private". - `DEFAULT_ORG_MEMBER_VISIBLE`: **false** True will make the membership of the users visible when added to the organisation. +- `ALLOW_ONLY_INTERNAL_REGISTRATION`: **false** Set to true to force registration only via gitea. - `ALLOW_ONLY_EXTERNAL_REGISTRATION`: **false** Set to true to force registration only using third-party services. -- `NO_REPLY_ADDRESS`: **DOMAIN** Default value for the domain part of the user's email address in the git log if he has set KeepEmailPrivate to true. +- `NO_REPLY_ADDRESS`: **noreply.DOMAIN** Value for the domain part of the user's email address in the git log if user has set KeepEmailPrivate to true. DOMAIN resolves to the value in server.DOMAIN. The user's email will be replaced with a concatenation of the user name in lower case, "@" and NO_REPLY_ADDRESS. +- `USER_DELETE_WITH_COMMENTS_MAX_TIME`: **0** Minimum amount of time a user must exist before comments are kept when the user is deleted. +- `VALID_SITE_URL_SCHEMES`: **http, https**: Valid site url schemes for user profiles + +### Service - Explore (`service.explore`) + +- `REQUIRE_SIGNIN_VIEW`: **false**: Only allow signed in users to view the explore pages. +- `DISABLE_USERS_PAGE`: **false**: Disable the users explore page. ## SSH Minimum Key Sizes (`ssh.minimum_key_sizes`) @@ -490,8 +550,8 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type - `DELIVER_TIMEOUT`: **5**: Delivery timeout (sec) for shooting webhooks. - `SKIP_TLS_VERIFY`: **false**: Allow insecure certification. - `PAGING_NUM`: **10**: Number of webhook history events that are shown in one page. -- `PROXY_URL`: ****: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy -- `PROXY_HOSTS`: ****: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. +- `PROXY_URL`: **\**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy. If not given, will use global proxy setting. +- `PROXY_HOSTS`: **\`**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. If not given, will use global proxy setting. ## Mailer (`mailer`) @@ -499,9 +559,9 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type - `DISABLE_HELO`: **\**: Disable HELO operation. - `HELO_HOSTNAME`: **\**: Custom hostname for HELO operation. - `HOST`: **\**: SMTP mail host address and port (example: smtp.gitea.io:587). - - Using opportunistic TLS via STARTTLS on port 587 is recommended per RFC 6409. + - As per RFC 8314, if supported, Implicit TLS/SMTPS on port 465 is recommended, otherwise opportunistic TLS via STARTTLS on port 587 should be used. - `IS_TLS_ENABLED` : **false** : Forcibly use TLS to connect even if not on a default SMTPS port. - - Note, if the port ends with `465` SMTPS/SMTP over TLS will be used despite this setting. + - Note, if the port ends with `465` Implicit TLS/SMTPS/SMTP over TLS will be used despite this setting. - Otherwise if `IS_TLS_ENABLED=false` and the server supports `STARTTLS` this will be used. Thus if `STARTTLS` is preferred you should set `IS_TLS_ENABLED=false`. - `FROM`: **\**: Mail from address, RFC 5322. This can be just an email address, or the "Name" \ format. @@ -533,11 +593,12 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type ## Cache (`cache`) - `ENABLED`: **true**: Enable the cache. -- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, or `memcache`. -- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory cache only. -- `HOST`: **\**: Connection string for `redis` and `memcache`. +- `ADAPTER`: **memory**: Cache engine adapter, either `memory`, `redis`, `twoqueue` or `memcache`. (`twoqueue` represents a size limited LRU cache.) +- `INTERVAL`: **60**: Garbage Collection interval (sec), for memory and twoqueue cache only. +- `HOST`: **\**: Connection string for `redis` and `memcache`. For `twoqueue` sets configuration for the queue. - Redis: `redis://:macaron@127.0.0.1:6379/0?pool_size=100&idle_timeout=180s` - Memcache: `127.0.0.1:9090;127.0.0.1:9091` + - TwoQueue LRU cache: `{"size":50000,"recent_ratio":0.25,"ghost_ratio":0.5}` or `50000` representing the maximum number of objects stored in the cache. - `ITEM_TTL`: **16h**: Time to keep items in cache if not used, Setting it to 0 disables caching. ## Cache - LastCommitCache settings (`cache.last_commit`) @@ -548,12 +609,14 @@ Define allowed algorithms and their minimum key length (use -1 to disable a type ## Session (`session`) -- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, mysql, couchbase, memcache, nodb, postgres\]. -- `PROVIDER_CONFIG`: **data/sessions**: For file, the root path; for others, the connection string. +- `PROVIDER`: **memory**: Session engine provider \[memory, file, redis, db, mysql, couchbase, memcache, postgres\]. +- `PROVIDER_CONFIG`: **data/sessions**: For file, the root path; for db, empty (database config will be used); for others, the connection string. - `COOKIE_SECURE`: **false**: Enable this to force using HTTPS for all session access. - `COOKIE_NAME`: **i\_like\_gitea**: The name of the cookie used for the session ID. - `GC_INTERVAL_TIME`: **86400**: GC interval in seconds. - `SESSION_LIFE_TIME`: **86400**: Session life time in seconds, default is 86400 (1 day) +- `DOMAIN`: **\**: Sets the cookie Domain +- `SAME_SITE`: **lax** \[strict, lax, none\]: Set the SameSite setting for the cookie. ## Picture (`picture`) @@ -608,16 +671,15 @@ Default templates for project boards: - `MODE`: **console**: Logging mode. For multiple modes, use a comma to separate values. You can configure each mode in per mode log subsections `\[log.modename\]`. By default the file mode will log to `$ROOT_PATH/gitea.log`. - `LEVEL`: **Info**: General log level. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\] - `STACKTRACE_LEVEL`: **None**: Default log level at which to log create stack traces. \[Trace, Debug, Info, Warn, Error, Critical, Fatal, None\] -- `REDIRECT_MACARON_LOG`: **false**: Redirects the Macaron log to its own logger or the default logger. -- `MACARON`: **file**: Logging mode for the macaron logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.macaron\]`. By default the file mode will log to `$ROOT_PATH/macaron.log`. (If you set this to `,` it will log to default gitea logger.) - `ROUTER_LOG_LEVEL`: **Info**: The log level that the router should log at. (If you are setting the access log, its recommended to place this at Debug.) - `ROUTER`: **console**: The mode or name of the log the router should log to. (If you set this to `,` it will log to default gitea logger.) -NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`. +NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take effect. Configure each mode in per mode log subsections `\[log.modename.router\]`. - `ENABLE_ACCESS_LOG`: **false**: Creates an access.log in NCSA common log format, or as per the following template +- `ENABLE_SSH_LOG`: **false**: save ssh log to log file - `ACCESS`: **file**: Logging mode for the access logger, use a comma to separate values. Configure each mode in per mode log subsections `\[log.modename.access\]`. By default the file mode will log to `$ROOT_PATH/access.log`. (If you set this to `,` it will log to the default gitea logger.) - `ACCESS_LOG_TEMPLATE`: **`{{.Ctx.RemoteAddr}} - {{.Identity}} {{.Start.Format "[02/Jan/2006:15:04:05 -0700]" }} "{{.Ctx.Req.Method}} {{.Ctx.Req.URL.RequestURI}} {{.Ctx.Req.Proto}}" {{.ResponseWriter.Status}} {{.ResponseWriter.Size}} "{{.Ctx.Req.Referer}}\" \"{{.Ctx.Req.UserAgent}}"`**: Sets the template used to create the access log. - The following variables are available: - - `Ctx`: the `macaron.Context` of the request. + - `Ctx`: the `context.Context` of the request. - `Identity`: the SignedUserName or `"-"` if not logged in. - `Start`: the start time of the request. - `ResponseWriter`: the responseWriter from the request. @@ -670,13 +732,18 @@ NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` - `RUN_AT_START`: **false**: Run cron tasks at application start-up. - `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. +- `SCHEDULE` accept formats + - Full crontab specs, e.g. `* * * * * ?` + - Descriptors, e.g. `@midnight`, `@every 1h30m` ... + - See more: [cron decument](https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14) + ### Basic cron tasks - enabled by default #### Cron - Cleanup old repository archives (`cron.archive_cleanup`) - `ENABLED`: **true**: Enable service. - `RUN_AT_START`: **true**: Run tasks at start up time (if ENABLED). -- `SCHEDULE`: **@every 24h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. +- `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. - `OLDER_THAN`: **24h**: Archives created more than `OLDER_THAN` ago are subject to deletion, e.g. `12h`. #### Cron - Update Mirrors (`cron.update_mirrors`) @@ -686,22 +753,31 @@ NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` #### Cron - Repository Health Check (`cron.repo_health_check`) -- `SCHEDULE`: **@every 24h**: Cron syntax for scheduling repository health check. +- `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository health check. - `TIMEOUT`: **60s**: Time duration syntax for health check execution timeout. - `ARGS`: **\**: Arguments for command `git fsck`, e.g. `--unreachable --tags`. See more on http://git-scm.com/docs/git-fsck #### Cron - Repository Statistics Check (`cron.check_repo_stats`) - `RUN_AT_START`: **true**: Run repository statistics check at start time. -- `SCHEDULE`: **@every 24h**: Cron syntax for scheduling repository statistics check. +- `SCHEDULE`: **@midnight**: Cron syntax for scheduling repository statistics check. + +### Cron - Cleanup hook_task Table (`cron.cleanup_hook_task_table`) + +- `ENABLED`: **true**: Enable cleanup hook_task job. +- `RUN_AT_START`: **false**: Run cleanup hook_task at start time (if ENABLED). +- `SCHEDULE`: **@midnight**: Cron syntax for cleaning hook_task table. +- `CLEANUP_TYPE` **OlderThan** OlderThan or PerWebhook Method to cleanup hook_task, either by age (i.e. how long ago hook_task record was delivered) or by the number to keep per webhook (i.e. keep most recent x deliveries per webhook). +- `OLDER_THAN`: **168h**: If CLEANUP_TYPE is set to OlderThan, then any delivered hook_task records older than this expression will be deleted. +- `NUMBER_TO_KEEP`: **10**: If CLEANUP_TYPE is set to PerWebhook, this is number of hook_task records to keep for a webhook (i.e. keep the most recent x deliveries). #### Cron - Update Migration Poster ID (`cron.update_migration_poster_id`) -- `SCHEDULE`: **@every 24h** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. +- `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. #### Cron - Sync External Users (`cron.sync_external_users`) -- `SCHEDULE`: **@every 24h** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. +- `SCHEDULE`: **@midnight** : Interval as a duration between each synchronization, it will always attempt synchronization when the instance starts. - `UPDATE_EXISTING`: **true**: Create new users, update existing user data and disable users that are not in external source anymore (default) or only create new users if UPDATE_EXISTING is set to false. ### Extended cron tasks (not enabled by default) @@ -744,19 +820,28 @@ NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` - `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. - `SCHEDULE`: **@every 72h**: Cron syntax for scheduling repository archive cleanup, e.g. `@every 1h`. +#### Cron - Delete all old actions from database ('cron.delete_old_actions') +- `ENABLED`: **false**: Enable service. +- `RUN_AT_START`: **false**: Run tasks at start up time (if ENABLED). +- `NO_SUCCESS_NOTICE`: **false**: Set to true to switch off success notices. +- `SCHEDULE`: **@every 128h**: Cron syntax for scheduling a work, e.g. `@every 128h`. +- `OLDER_THAN`: **@every 8760h**: any action older than this expression will be deleted from database, suggest using `8760h` (1 year) because that's the max length of heatmap. + ## Git (`git`) - `PATH`: **""**: The path of git executable. If empty, Gitea searches through the PATH environment. - `DISABLE_DIFF_HIGHLIGHT`: **false**: Disables highlight of added and removed changes. -- `MAX_GIT_DIFF_LINES`: **100**: Max number of lines allowed of a single file in diff view. +- `MAX_GIT_DIFF_LINES`: **1000**: Max number of lines allowed of a single file in diff view. - `MAX_GIT_DIFF_LINE_CHARACTERS`: **5000**: Max character count per line highlighted in diff view. - `MAX_GIT_DIFF_FILES`: **100**: Max number of files shown in diff view. +- `COMMITS_RANGE_SIZE`: **50**: Set the default commits range size +- `BRANCHES_RANGE_SIZE`: **20**: Set the default branches range size - `GC_ARGS`: **\**: Arguments for command `git gc`, e.g. `--aggressive --auto`. See more on http://git-scm.com/docs/git-gc/ - `ENABLE_AUTO_GIT_WIRE_PROTOCOL`: **true**: If use git wire protocol version 2 when git version >= 2.18, default is true, set to false when you always want git wire protocol version 1 - `PULL_REQUEST_PUSH_MESSAGE`: **true**: Respond to pushes to a non-default branch with a URL for creating a Pull Request (if the repository has them enabled) - `VERBOSE_PUSH`: **true**: Print status information about pushes as they are being processed. - `VERBOSE_PUSH_DELAY`: **5s**: Only print verbose information if push takes longer than this delay. - +- `LARGE_OBJECT_THRESHOLD`: **1048576**: (Go-Git only), don't cache objects greater than this in memory. (Set to 0 to disable.) ## Git - Timeout settings (`git.timeout`) - `DEFAUlT`: **360**: Git operations default timeout seconds. - `MIGRATE`: **600**: Migrate external repositories timeout seconds. @@ -784,7 +869,9 @@ NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` - `ACCESS_TOKEN_EXPIRATION_TIME`: **3600**: Lifetime of an OAuth2 access token in seconds - `REFRESH_TOKEN_EXPIRATION_TIME`: **730**: Lifetime of an OAuth2 refresh token in hours - `INVALIDATE_REFRESH_TOKENS`: **false**: Check if refresh token has already been used -- `JWT_SECRET`: **\**: OAuth2 authentication secret for access and refresh tokens, change this a unique string. +- `JWT_SIGNING_ALGORITHM`: **RS256**: Algorithm used to sign OAuth2 tokens. Valid values: \[`HS256`, `HS384`, `HS512`, `RS256`, `RS384`, `RS512`, `ES256`, `ES384`, `ES512`\] +- `JWT_SECRET`: **\**: OAuth2 authentication secret for access and refresh tokens, change this to a unique string. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `HS256`, `HS384` or `HS512`. +- `JWT_SIGNING_PRIVATE_KEY_FILE`: **jwt/private.pem**: Private key file path used to sign OAuth2 tokens. The path is relative to `APP_DATA_PATH`. This setting is only needed if `JWT_SIGNING_ALGORITHM` is set to `RS256`, `RS384`, `RS512`, `ES256`, `ES384` or `ES512`. The file must contain a RSA or ECDSA private key in the PKCS8 format. If no key exists a 4096 bit key will be created for you. - `MAX_TOKEN_LENGTH`: **32767**: Maximum length of token/cookie to accept from OAuth2 provider ## i18n (`i18n`) @@ -798,19 +885,23 @@ NB: You must `REDIRECT_MACARON_LOG` and have `DISABLE_ROUTER_LOG` set to `false` ## Markup (`markup`) +- `MERMAID_MAX_SOURCE_CHARACTERS`: **5000**: Set the maximum size of a Mermaid source. (Set to -1 to disable) + Gitea can support Markup using external tools. The example below will add a markup named `asciidoc`. ```ini [markup.asciidoc] ENABLED = true +NEED_POSTPROCESS = true FILE_EXTENSIONS = .adoc,.asciidoc RENDER_COMMAND = "asciidoc --out-file=- -" IS_INPUT_FILE = false ``` - ENABLED: **false** Enable markup support; set to **true** to enable this renderer. +- NEED\_POSTPROCESS: **true** set to **true** to replace links / sha1 and etc. - FILE\_EXTENSIONS: **\** List of file extensions that should be rendered by an external - command. Multiple extentions needs a comma as splitter. + command. Multiple extensions needs a comma as splitter. - RENDER\_COMMAND: External command to render all matching extensions. - IS\_INPUT\_FILE: **false** Input is not a standard input but a file param followed `RENDER_COMMAND`. @@ -828,17 +919,21 @@ Gitea supports customizing the sanitization policy for rendered HTML. The exampl ELEMENT = span ALLOW_ATTR = class REGEXP = ^\s*((math(\s+|$)|inline(\s+|$)|display(\s+|$)))+ +ALLOW_DATA_URI_IMAGES = true ``` - `ELEMENT`: The element this policy applies to. Must be non-empty. - `ALLOW_ATTR`: The attribute this policy allows. Must be non-empty. - `REGEXP`: A regex to match the contents of the attribute against. Must be present but may be empty for unconditional whitelisting of this attribute. + - `ALLOW_DATA_URI_IMAGES`: **false** Allow data uri images (``). Multiple sanitisation rules can be defined by adding unique subsections, e.g. `[markup.sanitizer.TeX-2]`. +To apply a sanitisation rules only for a specify external renderer they must use the renderer name, e.g. `[markup.sanitizer.asciidoc.rule-1]`. +If the rule is defined above the renderer ini section or the name does not match a renderer it is applied to every renderer. ## Time (`time`) -- `FORMAT`: Time format to diplay on UI. i.e. RFC1123 or 2006-01-02 15:04:05 +- `FORMAT`: Time format to display on UI. i.e. RFC1123 or 2006-01-02 15:04:05 - `DEFAULT_UI_LOCATION`: Default location of time on the UI, so that we can display correct user's time on UI. i.e. Shanghai/Asia ## Task (`task`) @@ -856,6 +951,7 @@ Task queue configuration has been moved to `queue.task`. However, the below conf - `ALLOWED_DOMAINS`: **\**: Domains allowlist for migrating repositories, default is blank. It means everything will be allowed. Multiple domains could be separated by commas. - `BLOCKED_DOMAINS`: **\**: Domains blocklist for migrating repositories, default is blank. Multiple domains could be separated by commas. When `ALLOWED_DOMAINS` is not blank, this option will be ignored. - `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918, RFC 1122, RFC 4632 and RFC 4291 +- `SKIP_TLS_VERIFY`: **false**: Allow skip tls verify ## Mirror (`mirror`) @@ -870,7 +966,7 @@ is `data/lfs` and the default of `MINIO_BASE_PATH` is `lfs/`. - `STORAGE_TYPE`: **local**: Storage type for lfs, `local` for local disk or `minio` for s3 compatible object storage service or other name defined with `[storage.xxx]` - `SERVE_DIRECT`: **false**: Allows the storage driver to redirect to authenticated URLs to serve files directly. Currently, only Minio/S3 is supported via signed URLs, local does nothing. -- `CONTENT_PATH`: **./data/lfs**: Where to store LFS files, only available when `STORAGE_TYPE` is `local`. +- `PATH`: **./data/lfs**: Where to store LFS files, only available when `STORAGE_TYPE` is `local`. If not set it fall back to deprecated LFS_CONTENT_PATH value in [server] section. - `MINIO_ENDPOINT`: **localhost:9000**: Minio endpoint to connect only available when `STORAGE_TYPE` is `minio` - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID to connect only available when `STORAGE_TYPE` is `minio` - `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey to connect only available when `STORAGE_TYPE is` `minio` @@ -912,6 +1008,36 @@ MINIO_USE_SSL = false And used by `[attachment]`, `[lfs]` and etc. as `STORAGE_TYPE`. +## Repository Archive Storage (`storage.repo-archive`) + +Configuration for repository archive storage. It will inherit from default `[storage]` or +`[storage.xxx]` when set `STORAGE_TYPE` to `xxx`. The default of `PATH` +is `data/repo-archive` and the default of `MINIO_BASE_PATH` is `repo-archive/`. + +- `STORAGE_TYPE`: **local**: Storage type for repo archive, `local` for local disk or `minio` for s3 compatible object storage service or other name defined with `[storage.xxx]` +- `SERVE_DIRECT`: **false**: Allows the storage driver to redirect to authenticated URLs to serve files directly. Currently, only Minio/S3 is supported via signed URLs, local does nothing. +- `PATH`: **./data/repo-archive**: Where to store archive files, only available when `STORAGE_TYPE` is `local`. +- `MINIO_ENDPOINT`: **localhost:9000**: Minio endpoint to connect only available when `STORAGE_TYPE` is `minio` +- `MINIO_ACCESS_KEY_ID`: Minio accessKeyID to connect only available when `STORAGE_TYPE` is `minio` +- `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey to connect only available when `STORAGE_TYPE is` `minio` +- `MINIO_BUCKET`: **gitea**: Minio bucket to store the lfs only available when `STORAGE_TYPE` is `minio` +- `MINIO_LOCATION`: **us-east-1**: Minio location to create bucket only available when `STORAGE_TYPE` is `minio` +- `MINIO_BASE_PATH`: **repo-archive/**: Minio base path on the bucket only available when `STORAGE_TYPE` is `minio` +- `MINIO_USE_SSL`: **false**: Minio enabled ssl only available when `STORAGE_TYPE` is `minio` + +## Proxy (`proxy`) + +- `PROXY_ENABLED`: **false**: Enable the proxy if true, all requests to external via HTTP will be affected, if false, no proxy will be used even environment http_proxy/https_proxy +- `PROXY_URL`: **\**: Proxy server URL, support http://, https//, socks://, blank will follow environment http_proxy/https_proxy +- `PROXY_HOSTS`: **\**: Comma separated list of host names requiring proxy. Glob patterns (*) are accepted; use ** to match all hosts. + +i.e. +```ini +PROXY_ENABLED = true +PROXY_URL = socks://127.0.0.1:1080 +PROXY_HOSTS = *.github.com +``` + ## Other (`other`) - `SHOW_FOOTER_BRANDING`: **false**: Show Gitea branding in the footer. diff --git a/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md b/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md index da2d02c11..fcbf49f1a 100644 --- a/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md +++ b/docs/content/doc/advanced/config-cheat-sheet.zh-cn.md @@ -36,6 +36,11 @@ menu: - `MAX_CREATION_LIMIT`: 全局最大每个用户创建的git工程数目, `-1` 表示没限制。 - `PULL_REQUEST_QUEUE_LENGTH`: 小心:合并请求测试队列的长度,尽量放大。 +### Repository - Release (`repository.release`) + +- `ALLOWED_TYPES`: **\**: 允许扩展名的列表,用逗号分隔 (`.zip`), mime 类型 (`text/plain`) 或者匹配符号 (`image/*`, `audio/*`, `video/*`). 空值或者 `*/*` 允许所有类型。 +- `DEFAULT_PAGING_NUM`: **10**: 默认的发布版本页面分页。 + ## UI (`ui`) - `EXPLORE_PAGING_NUM`: 探索页面每页显示的仓库数量。 @@ -75,6 +80,7 @@ menu: - `LFS_START_SERVER`: 是否启用 git-lfs 支持. 可以为 `true` 或 `false`, 默认是 `false`。 - `LFS_JWT_SECRET`: LFS 认证密钥,改成自己的。 +- `LFS_CONTENT_PATH`: **已废弃**, 存放 lfs 命令上传的文件的地方,默认是 `data/lfs`。 ## Database (`database`) @@ -134,6 +140,11 @@ menu: - `ENABLE_REVERSE_PROXY_AUTO_REGISTRATION`: 允许通过反向认证做自动注册。 - `ENABLE_CAPTCHA`: 注册时使用图片验证码。 +### Service - Expore (`service.explore`) + +- `REQUIRE_SIGNIN_VIEW`: **false**: 仅允许已登录的用户查看探索页面。 +- `DISABLE_USERS_PAGE`: **false**: 不显示用户探索页面。 + ## Webhook (`webhook`) - `QUEUE_LENGTH`: 说明: Hook 任务队列长度。 @@ -239,6 +250,11 @@ test01.xls: application/vnd.ms-excel; charset=binary - `ENABLED`: 是否在后台运行定期任务。 - `RUN_AT_START`: 是否启动时自动运行。 +- `SCHEDULE` 所接受的格式 + - 完整 crontab 控制, 例如 `* * * * * ?` + - 描述符, 例如 `@midnight`, `@every 1h30m` ... + - 更多细节参见 [cron api文档](https://pkg.go.dev/github.com/gogs/cron@v0.0.0-20171120032916-9f6c956d3e14) + ### Cron - Update Mirrors (`cron.update_mirrors`) @@ -246,18 +262,18 @@ test01.xls: application/vnd.ms-excel; charset=binary ### Cron - Repository Health Check (`cron.repo_health_check`) -- `SCHEDULE`: 仓库健康监测的Cron语法,比如:`@every 24h`。 +- `SCHEDULE`: 仓库健康监测的Cron语法,比如:`@midnight`。 - `TIMEOUT`: 仓库健康监测的超时时间,比如:`60s`. - `ARGS`: 执行 `git fsck` 命令的参数,比如:`--unreachable --tags`。 ### Cron - Repository Statistics Check (`cron.check_repo_stats`) - `RUN_AT_START`: 是否启动时自动运行仓库统计。 -- `SCHEDULE`: 仓库统计时的Cron 语法,比如:`@every 24h`. +- `SCHEDULE`: 仓库统计时的Cron 语法,比如:`@midnight`. ### Cron - Update Migration Poster ID (`cron.update_migration_poster_id`) -- `SCHEDULE`: **@every 24h** : 每次同步的间隔时间。此任务总是在启动时自动进行。 +- `SCHEDULE`: **@midnight** : 每次同步的间隔时间。此任务总是在启动时自动进行。 ## Git (`git`) @@ -291,12 +307,14 @@ test01.xls: application/vnd.ms-excel; charset=binary ```ini [markup.asciidoc] ENABLED = false +NEED_POSTPROCESS = true FILE_EXTENSIONS = .adoc,.asciidoc RENDER_COMMAND = "asciidoc --out-file=- -" IS_INPUT_FILE = false ``` - ENABLED: 是否启用,默认为false。 +- NEED\_POSTPROCESS: **true** 设置为 true 则会替换渲染文件中的内部链接和Commit ID 等。 - FILE_EXTENSIONS: 关联的文档的扩展名,多个扩展名用都好分隔。 - RENDER_COMMAND: 工具的命令行命令及参数。 - IS_INPUT_FILE: 输入方式是最后一个参数为文件路径还是从标准输入读取。 @@ -319,6 +337,7 @@ IS_INPUT_FILE = false - `ALLOWED_DOMAINS`: **\**: 迁移仓库的域名白名单,默认为空,表示允许从任意域名迁移仓库,多个域名用逗号分隔。 - `BLOCKED_DOMAINS`: **\**: 迁移仓库的域名黑名单,默认为空,多个域名用逗号分隔。如果 `ALLOWED_DOMAINS` 不为空,此选项将会被忽略。 - `ALLOW_LOCALNETWORKS`: **false**: Allow private addresses defined by RFC 1918 +- `SKIP_TLS_VERIFY`: **false**: 允许忽略 TLS 认证 ## LFS (`lfs`) @@ -326,7 +345,7 @@ LFS 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配置将从 `[stora - `STORAGE_TYPE`: **local**: LFS 的存储类型,`local` 将存储到磁盘,`minio` 将存储到 s3 兼容的对象服务。 - `SERVE_DIRECT`: **false**: 允许直接重定向到存储系统。当前,仅 Minio/S3 是支持的。 -- `CONTENT_PATH`: 存放 lfs 命令上传的文件的地方,默认是 `data/lfs`。 +- `PATH`: 存放 lfs 命令上传的文件的地方,默认是 `data/lfs`。 - `MINIO_ENDPOINT`: **localhost:9000**: Minio 地址,仅当 `LFS_STORAGE_TYPE` 为 `minio` 时有效。 - `MINIO_ACCESS_KEY_ID`: Minio accessKeyID,仅当 `LFS_STORAGE_TYPE` 为 `minio` 时有效。 - `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey,仅当 `LFS_STORAGE_TYPE` 为 `minio` 时有效。 @@ -369,6 +388,34 @@ MINIO_USE_SSL = false 然后你在 `[attachment]`, `[lfs]` 等中可以把这个名字用作 `STORAGE_TYPE` 的值。 +## Repository Archive Storage (`storage.repo-archive`) + +Repository archive 的存储配置。 如果 `STORAGE_TYPE` 为空,则此配置将从 `[storage]` 继承。如果不为 `local` 或者 `minio` 而为 `xxx`, 则从 `[storage.xxx]` 继承。当继承时, `PATH` 默认为 `data/repo-archive`,`MINIO_BASE_PATH` 默认为 `repo-archive/`。 + +- `STORAGE_TYPE`: **local**: Repository archive 的存储类型,`local` 将存储到磁盘,`minio` 将存储到 s3 兼容的对象服务。 +- `SERVE_DIRECT`: **false**: 允许直接重定向到存储系统。当前,仅 Minio/S3 是支持的。 +- `PATH`: 存放 Repository archive 上传的文件的地方,默认是 `data/repo-archive`。 +- `MINIO_ENDPOINT`: **localhost:9000**: Minio 地址,仅当 `STORAGE_TYPE` 为 `minio` 时有效。 +- `MINIO_ACCESS_KEY_ID`: Minio accessKeyID,仅当 `STORAGE_TYPE` 为 `minio` 时有效。 +- `MINIO_SECRET_ACCESS_KEY`: Minio secretAccessKey,仅当 `STORAGE_TYPE` 为 `minio` 时有效。 +- `MINIO_BUCKET`: **gitea**: Minio bucket,仅当 `STORAGE_TYPE` 为 `minio` 时有效。 +- `MINIO_LOCATION`: **us-east-1**: Minio location ,仅当 `STORAGE_TYPE` 为 `minio` 时有效。 +- `MINIO_BASE_PATH`: **repo-archive/**: Minio base path ,仅当 `STORAGE_TYPE` 为 `minio` 时有效。 +- `MINIO_USE_SSL`: **false**: Minio 是否启用 ssl ,仅当 `STORAGE_TYPE` 为 `minio` 时有效。 + +## Proxy (`proxy`) + +- `PROXY_ENABLED`: **false**: 是否启用全局代理。如果为否,则不使用代理,环境变量中的代理也不使用 +- `PROXY_URL`: **\**: 代理服务器地址,支持 http://, https//, socks://,为空则不启用代理而使用环境变量中的 http_proxy/https_proxy +- `PROXY_HOSTS`: **\**: 逗号分隔的多个需要代理的网址,支持 * 号匹配符号, ** 表示匹配所有网站 + +i.e. +```ini +PROXY_ENABLED = true +PROXY_URL = socks://127.0.0.1:1080 +PROXY_HOSTS = *.github.com +``` + ## Other (`other`) - `SHOW_FOOTER_BRANDING`: 为真则在页面底部显示Gitea的字样。 diff --git a/docs/content/doc/advanced/customizing-gitea.en-us.md b/docs/content/doc/advanced/customizing-gitea.en-us.md index 9f1a43c01..fe18a801f 100644 --- a/docs/content/doc/advanced/customizing-gitea.en-us.md +++ b/docs/content/doc/advanced/customizing-gitea.en-us.md @@ -30,18 +30,19 @@ the Linux Filesystem Standard. Gitea will attempt to create required folders, in `custom/`. Distributions may provide a symlink for `custom` using `/etc/gitea/`. Application settings can be found in file `CustomConf` which is by default, -`CustomPath/conf/app.ini` but may be different if your build has set this differently. +`$GITEA_CUSTOM/conf/app.ini` but may be different if your build has set this differently. Again `gitea help` will allow you review this variable and you can override it using the `--config` option on the `gitea` binary. - [Quick Cheat Sheet](https://docs.gitea.io/en-us/config-cheat-sheet/) -- [Complete List](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) +- [Complete List](https://github.com/go-gitea/gitea/blob/main/custom/conf/app.example.ini) If the `CustomPath` folder can't be found despite checking `gitea help`, check the `GITEA_CUSTOM` environment variable; this can be used to override the default path to something else. -`GITEA_CUSTOM` might, for example, be set by an init script. +`GITEA_CUSTOM` might, for example, be set by an init script. You can check whether the value +is set under the "Configuration" tab on the site administration page. -- [List of Environment Variables](https://docs.gitea.io/en-us/specific-variables/) +- [List of Environment Variables](https://docs.gitea.io/en-us/environment-variables/) **Note:** Gitea must perform a full restart to see configuration changes. @@ -52,27 +53,23 @@ environment variable; this can be used to override the default path to something ## Serving custom public files To make Gitea serve custom public files (like pages and images), use the folder -`custom/public/` as the webroot. Symbolic links will be followed. +`$GITEA_CUSTOM/public/` as the webroot. Symbolic links will be followed. -For example, a file `image.png` stored in `custom/public/`, can be accessed with -the url `http://gitea.domain.tld/image.png`. +For example, a file `image.png` stored in `$GITEA_CUSTOM/public/`, can be accessed with +the url `http://gitea.domain.tld/assets/image.png`. -## Changing the default logo +## Changing the logo -To build a custom logo replace `assets/logo.svg` and run `make generate-images`. This will update -these customizable logo files which you can then place in `custom/public/img` on your server: +To build a custom logo clone the Gitea source repository, replace `assets/logo.svg` and run +`make generate-images`. This will update below output files which you can then place in `$GITEA_CUSTOM/public/img` on your server: -- `public/img/logo.svg` -- `public/img/logo.png` -- `public/img/favicon.png` -- `public/img/avatar_default.png` -- `public/img/apple-touch-icon.png` +- `public/img/logo.svg` - Used for favicon, site icon, app icon +- `public/img/logo.png` - Used for Open Graph +- `public/img/favicon.png` - Used as fallback for browsers that don't support SVG favicons +- `public/img/avatar_default.png` - Used as the default avatar image +- `public/img/apple-touch-icon.png` - Used on iOS devices for bookmarks -## Changing the default avatar - -Either generate it via above method or place the png image at the following path: - -- `custom/public/img/avatar_default.png` +In case the source image is not in vector format, you can attempt to convert a raster image using tools like [this](https://www.aconvert.com/image/png-to-svg/). ## Customizing Gitea pages and resources @@ -80,43 +77,43 @@ Gitea's executable contains all the resources required to run: templates, images and translations. Any of them can be overridden by placing a replacement in a matching path inside the `custom` directory. For example, to replace the default `.gitignore` provided for C++ repositories, we want to replace `options/gitignore/C++`. To do this, a replacement -must be placed in `custom/options/gitignore/C++` (see about the location of the `custom` +must be placed in `$GITEA_CUSTOM/options/gitignore/C++` (see about the location of the `CustomPath` directory at the top of this document). Every single page of Gitea can be changed. Dynamic content is generated using [go templates](https://golang.org/pkg/html/template/), -which can be modified by placing replacements below the `custom/templates` directory. +which can be modified by placing replacements below the `$GITEA_CUSTOM/templates` directory. -To obtain any embedded file (including templates), the [`gitea embedded` tool]({{< relref "doc/advanced/cmd-embedded.en-us.md" >}}) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/master/templates) directory of Gitea source (Note: the example link is from the `master` branch. Make sure to use templates compatible with the release you are using). +To obtain any embedded file (including templates), the [`gitea embedded` tool]({{< relref "doc/advanced/cmd-embedded.en-us.md" >}}) can be used. Alternatively, they can be found in the [`templates`](https://github.com/go-gitea/gitea/tree/main/templates) directory of Gitea source (Note: the example link is from the `main` branch. Make sure to use templates compatible with the release you are using). Be aware that any statement contained inside `{{` and `}}` are Gitea's template syntax and shouldn't be touched without fully understanding these components. ### Customizing startpage / homepage -Copy [`home.tmpl`](https://github.com/go-gitea/gitea/blob/master/templates/home.tmpl) for your version of Gitea from `templates` to `custom/templates`. +Copy [`home.tmpl`](https://github.com/go-gitea/gitea/blob/main/templates/home.tmpl) for your version of Gitea from `templates` to `$GITEA_CUSTOM/templates`. Edit as you wish. Dont forget to restart your gitea to apply the changes. ### Adding links and tabs -If all you want is to add extra links to the top navigation bar or footer, or extra tabs to the repository view, you can put them in `extra_links.tmpl` (links added to the navbar), `extra_links_footer.tmpl` (links added to the left side of footer), and `extra_tabs.tmpl` inside your `custom/templates/custom/` directory. +If all you want is to add extra links to the top navigation bar or footer, or extra tabs to the repository view, you can put them in `extra_links.tmpl` (links added to the navbar), `extra_links_footer.tmpl` (links added to the left side of footer), and `extra_tabs.tmpl` inside your `$GITEA_CUSTOM/templates/custom/` directory. For instance, let's say you are in Germany and must add the famously legally-required "Impressum"/about page, listing who is responsible for the site's content: -just place it under your "custom/public/" directory (for instance `custom/public/impressum.html`) and put a link to it in either `custom/templates/custom/extra_links.tmpl` or `custom/templates/custom/extra_links_footer.tmpl`. +just place it under your "$GITEA_CUSTOM/public/" directory (for instance `$GITEA_CUSTOM/public/impressum.html`) and put a link to it in either `$GITEA_CUSTOM/templates/custom/extra_links.tmpl` or `$GITEA_CUSTOM/templates/custom/extra_links_footer.tmpl`. To match the current style, the link should have the class name "item", and you can use `{{AppSubUrl}}` to get the base URL: -`Impressum` +`Impressum` For more information, see [Adding Legal Pages](https://docs.gitea.io/en-us/adding-legal-pages). You can add new tabs in the same way, putting them in `extra_tabs.tmpl`. The exact HTML needed to match the style of other tabs is in the file `templates/repo/header.tmpl` -([source in GitHub](https://github.com/go-gitea/gitea/blob/master/templates/repo/header.tmpl)) +([source in GitHub](https://github.com/go-gitea/gitea/blob/main/templates/repo/header.tmpl)) ### Other additions to the page -Apart from `extra_links.tmpl` and `extra_tabs.tmpl`, there are other useful templates you can put in your `custom/templates/custom/` directory: +Apart from `extra_links.tmpl` and `extra_tabs.tmpl`, there are other useful templates you can put in your `$GITEA_CUSTOM/templates/custom/` directory: - `header.tmpl`, just before the end of the `` tag where you can add custom CSS files for instance. - `body_outer_pre.tmpl`, right after the start of ``. @@ -132,7 +129,7 @@ The data is encoded and sent to the PlantUML server which generates the picture. demo server at http://www.plantuml.com/plantuml, but if you (or your users) have sensitive data you can set up your own [PlantUML server](https://plantuml.com/server) instead. To set up PlantUML rendering, copy javascript files from https://gitea.com/davidsvantesson/plantuml-code-highlight and put them in your -`custom/public` folder. Then add the following to `custom/footer.tmpl`: +`$GITEA_CUSTOM/public` folder. Then add the following to `custom/footer.tmpl`: ```html {{if .RequireHighlightJS}} @@ -141,7 +138,7 @@ copy javascript files from https://gitea.com/davidsvantesson/plantuml-code-highl {{end}} ``` @@ -177,13 +174,13 @@ You can display STL file directly in Gitea by adding: if ($('.view-raw>a[href$=".stl" i]').length) { $("body").append( - '' + '' ); Promise.all([ - lS("/Madeleine.js/src/lib/stats.js"), - lS("/Madeleine.js/src/lib/detector.js"), - lS("/Madeleine.js/src/lib/three.min.js"), - lS("/Madeleine.js/src/Madeleine.js"), + lS("/assets/Madeleine.js/src/lib/stats.js"), + lS("/assets/Madeleine.js/src/lib/detector.js"), + lS("/assets/Madeleine.js/src/lib/three.min.js"), + lS("/assets/Madeleine.js/src/Madeleine.js"), ]).then(function () { $(".view-raw") .attr("id", "view-raw") @@ -191,7 +188,7 @@ You can display STL file directly in Gitea by adding: new Madeleine({ target: "view-raw", data: $('.view-raw>a[href$=".stl" i]').attr("href"), - path: "/Madeleine.js/src", + path: "/assets/Madeleine.js/src", }); $('.view-raw>a[href$=".stl"]').remove(); }); @@ -201,15 +198,15 @@ You can display STL file directly in Gitea by adding: to the file `templates/custom/footer.tmpl` -You also need to download the content of the library [Madeleine.js](https://jinjunho.github.io/Madeleine.js/) and place it under `custom/public/` folder. +You also need to download the content of the library [Madeleine.js](https://jinjunho.github.io/Madeleine.js/) and place it under `$GITEA_CUSTOM/public/` folder. -You should end-up with a folder structucture similar to: +You should end-up with a folder structure similar to: ``` -custom/templates +$GITEA_CUSTOM/templates -- custom `-- footer.tmpl -custom/public +$GITEA_CUSTOM/public -- Madeleine.js |-- LICENSE |-- README.md @@ -255,11 +252,11 @@ Then restart gitea and open a STL file on your gitea instance. ## Customizing Gitea mails -The `custom/templates/mail` folder allows changing the body of every mail of Gitea. +The `$GITEA_CUSTOM/templates/mail` folder allows changing the body of every mail of Gitea. Templates to override can be found in the -[`templates/mail`](https://github.com/go-gitea/gitea/tree/master/templates/mail) +[`templates/mail`](https://github.com/go-gitea/gitea/tree/main/templates/mail) directory of Gitea source. -Override by making a copy of the file under `custom/templates/mail` using a +Override by making a copy of the file under `$GITEA_CUSTOM/templates/mail` using a full path structure matching source. Any statement contained inside `{{` and `}}` are Gitea's template @@ -267,7 +264,7 @@ syntax and shouldn't be touched without fully understanding these components. ## Adding Analytics to Gitea -Google Analytics, Matomo (previously Piwik), and other analytics services can be added to Gitea. To add the tracking code, refer to the `Other additions to the page` section of this document, and add the JavaScript to the `custom/templates/custom/header.tmpl` file. +Google Analytics, Matomo (previously Piwik), and other analytics services can be added to Gitea. To add the tracking code, refer to the `Other additions to the page` section of this document, and add the JavaScript to the `$GITEA_CUSTOM/templates/custom/header.tmpl` file. ## Customizing gitignores, labels, licenses, locales, and readmes. @@ -277,22 +274,22 @@ Place custom files in corresponding sub-folder under `custom/options`. ### gitignores -To add custom .gitignore, add a file with existing [.gitignore rules](https://git-scm.com/docs/gitignore) in it to `custom/options/gitignore` +To add custom .gitignore, add a file with existing [.gitignore rules](https://git-scm.com/docs/gitignore) in it to `$GITEA_CUSTOM/options/gitignore` ### Labels -To add a custom label set, add a file that follows the [label format](https://github.com/go-gitea/gitea/blob/master/options/label/Default) to `custom/options/label` +To add a custom label set, add a file that follows the [label format](https://github.com/go-gitea/gitea/blob/main/options/label/Default) to `$GITEA_CUSTOM/options/label` `#hex-color label name ; label description` ### Licenses -To add a custom license, add a file with the license text to `custom/options/license` +To add a custom license, add a file with the license text to `$GITEA_CUSTOM/options/license` ### Locales -Locales are managed via our [crowdin](https://crowdin.com/project/gitea). -You can override a locale by placing an altered locale file in `custom/options/locale`. -Gitea's default locale files can be found in the [`options/locale`](https://github.com/go-gitea/gitea/tree/master/options/locale) source folder and these should be used as examples for your changes. +Locales are managed via our [crowdin](https://crowdin.com/project/gitea). +You can override a locale by placing an altered locale file in `$GITEA_CUSTOM/options/locale`. +Gitea's default locale files can be found in the [`options/locale`](https://github.com/go-gitea/gitea/tree/main/options/locale) source folder and these should be used as examples for your changes. To add a completely new locale, as well as placing the file in the above location, you will need to add the new lang and name to the `[i18n]` section in your `app.ini`. Keep in mind that Gitea will use those settings as **overrides**, so if you want to keep the other languages as well you will need to copy/paste the default values and add your own to them. @@ -306,9 +303,9 @@ Locales may change between versions, so keeping track of your customized locales ### Readmes -To add a custom Readme, add a markdown formatted file (without an `.md` extension) to `custom/options/readme` +To add a custom Readme, add a markdown formatted file (without an `.md` extension) to `$GITEA_CUSTOM/options/readme` -**NOTE:** readme templates support **variable expansion**. +**NOTE:** readme templates support **variable expansion**. currently there are `{Name}` (name of repository), `{Description}`, `{CloneURL.SSH}`, `{CloneURL.HTTPS}` and `{OwnerName}` ### Reactions @@ -324,8 +321,21 @@ A full list of supported emoji's is at [emoji list](https://gitea.com/gitea/gite ## Customizing the look of Gitea -As of version 1.6.0 Gitea has built-in themes. The two built-in themes are, the default theme `gitea`, and a dark theme `arc-green`. To change the look of your Gitea install change the value of `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` to another one of the available options. -As of version 1.8.0 Gitea also has per-user themes. The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini` (defaults to `gitea` and `arc-green`, light and dark respectively) +The default built-in themes are `gitea` (light) and `arc-green` (dark). +The default theme can be changed via `DEFAULT_THEME` in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini`. + +Gitea also has support for user themes, which means every user can select which theme should be used. +The list of themes a user can choose from can be configured with the `THEMES` value in the [ui](https://docs.gitea.io/en-us/config-cheat-sheet/#ui-ui) section of `app.ini`. + +To make a custom theme available to all users: + +1. Add a CSS file to `$GITEA_PUBLIC/public/css/theme-.css`. + The value of `$GITEA_PUBLIC` of your instance can be queried by calling `gitea help` and looking up the value of "CustomPath". +2. Add `` to the comma-separated list of setting `THEMES` in `app.ini` + +Community themes are listed in [gitea/awesome-gitea#themes](https://gitea.com/gitea/awesome-gitea#themes). + +The `arc-green` theme source can be found [here](https://github.com/go-gitea/gitea/blob/main/web_src/less/themes/theme-arc-green.less). ## Customizing fonts diff --git a/docs/content/doc/advanced/customizing-gitea.zh-cn.md b/docs/content/doc/advanced/customizing-gitea.zh-cn.md index 91762b13d..bb55f35e1 100644 --- a/docs/content/doc/advanced/customizing-gitea.zh-cn.md +++ b/docs/content/doc/advanced/customizing-gitea.zh-cn.md @@ -40,7 +40,7 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板 将自定义的公共文件(比如页面和图片)作为 webroot 放在 `custom/public/` 中来让 Gitea 提供这些自定义内容(符号链接将被追踪)。 -举例说明:`image.png` 存放在 `custom/public/`中,那么它可以通过链接 http://gitea.domain.tld/image.png 访问。 +举例说明:`image.png` 存放在 `custom/public/`中,那么它可以通过链接 http://gitea.domain.tld/assets/image.png 访问。 ## 修改默认头像 @@ -61,7 +61,7 @@ Gitea 引用 `custom` 目录中的自定义配置文件来覆盖配置、模板 "custom/public/"目录下(比如 `custom/public/impressum.html`)并且将它与 `custom/templates/custom/extra_links.tmpl` 链接起来即可。 这个链接应当使用一个名为“item”的 class 来匹配当前样式,您可以使用 `{{AppSubUrl}}` 来获取 base URL: -`Impressum` +`Impressum` 同理,您可以将页签添加到 `extra_tabs.tmpl` 中,使用同样的方式来添加页签。它的具体样式需要与 `templates/repo/header.tmpl` 中已有的其他选项卡的样式匹配 diff --git a/docs/content/doc/advanced/environment-variables.en-us.md b/docs/content/doc/advanced/environment-variables.en-us.md index deb195aeb..288358f69 100644 --- a/docs/content/doc/advanced/environment-variables.en-us.md +++ b/docs/content/doc/advanced/environment-variables.en-us.md @@ -58,15 +58,6 @@ For documentation about each of the variables available, refer to the - `HOMEDRIVE`: Main drive path used to access the home directory (C:) - `HOMEPATH`: Home relative path in the given home drive path -## Macaron (framework used by Gitea) - -- `HOST`: Host Macaron will listen on -- `PORT`: Port Macaron will listen on -- `MACARON_ENV`: global variable to provide special functionality for development environments - vs. production environments. If MACARON_ENV is set to "" or "development", then templates will - be recompiled on every request. For more performance, set the MACARON_ENV environment variable - to "production". - ## Miscellaneous - `SKIP_MINWINSVC`: If set to 1, do not run as a service on Windows. diff --git a/docs/content/doc/advanced/environment-variables.zh-cn.md b/docs/content/doc/advanced/environment-variables.zh-cn.md index 4b936a53f..63ee4c693 100644 --- a/docs/content/doc/advanced/environment-variables.zh-cn.md +++ b/docs/content/doc/advanced/environment-variables.zh-cn.md @@ -50,13 +50,6 @@ GITEA_CUSTOM=/home/gitea/custom ./gitea web * `HOMEDRIVE`: 用于访问 home 目录的主驱动器路径(C盘) * `HOMEPATH`:在指定主驱动器下的 home 目录相对路径 -## Macaron(Gitea 使用的 web 框架) - - * `HOST`:Macaron 监听的主机地址 - * `PORT`:Macaron 监听的端口地址 - * `MACARON_ENV`:为开发环境和生产环境提供特殊功能性配置的全局变量,当 MACARON_ENV 设置为 "" 或 "development" - 时,每次请求都会重编译页面模板。为了提高性能表现,可将它设置为 "production"。 - ## Miscellaneous * `SKIP_MINWINSVC`:如果设置为 1,在 Windows 上不会以 service 的形式运行。 diff --git a/docs/content/doc/advanced/external-renderers.en-us.md b/docs/content/doc/advanced/external-renderers.en-us.md index 11e7f73ae..e5de7e8ef 100644 --- a/docs/content/doc/advanced/external-renderers.en-us.md +++ b/docs/content/doc/advanced/external-renderers.en-us.md @@ -64,13 +64,13 @@ IS_INPUT_FILE = false [markup.jupyter] ENABLED = true FILE_EXTENSIONS = .ipynb -RENDER_COMMAND = "jupyter nbconvert --stdout --to html --template basic " -IS_INPUT_FILE = true +RENDER_COMMAND = "jupyter nbconvert --stdin --stdout --to html --template basic" +IS_INPUT_FILE = false [markup.restructuredtext] ENABLED = true FILE_EXTENSIONS = .rst -RENDER_COMMAND = rst2html.py +RENDER_COMMAND = "timeout 30s pandoc +RTS -M512M -RTS -f rst" IS_INPUT_FILE = false ``` @@ -90,11 +90,79 @@ FILE_EXTENSIONS = .md,.markdown RENDER_COMMAND = pandoc -f markdown -t html --katex ``` -You must define `ELEMENT`, `ALLOW_ATTR`, and `REGEXP` in each section. +You must define `ELEMENT` and `ALLOW_ATTR` in each section. To define multiple entries, add a unique alphanumeric suffix (e.g., `[markup.sanitizer.1]` and `[markup.sanitizer.something]`). +To apply a sanitisation rules only for a specify external renderer they must use the renderer name, e.g. `[markup.sanitizer.asciidoc.rule-1]`, `[markup.sanitizer..rule-1]`. + +**Note**: If the rule is defined above the renderer ini section or the name does not match a renderer it is applied to every renderer. + Once your configuration changes have been made, restart Gitea to have changes take effect. **Note**: Prior to Gitea 1.12 there was a single `markup.sanitiser` section with keys that were redefined for multiple rules, however, there were significant problems with this method of configuration necessitating configuration through multiple sections. + +### Example: Office DOCX + +Display Office DOCX files with [`pandoc`](https://pandoc.org/): +```ini +[markup.docx] +ENABLED = true +FILE_EXTENSIONS = .docx +RENDER_COMMAND = "pandoc --from docx --to html --self-contained --template /path/to/basic.html" + +[markup.sanitizer.docx.img] +ALLOW_DATA_URI_IMAGES = true +``` + +The template file has the following content: +``` +$body$ +``` + +### Example: Jupyter Notebook + +Display Jupyter Notebook files with [`nbconvert`](https://github.com/jupyter/nbconvert): +```ini +[markup.jupyter] +ENABLED = true +FILE_EXTENSIONS = .ipynb +RENDER_COMMAND = "jupyter-nbconvert --stdin --stdout --to html --template basic" + +[markup.sanitizer.jupyter.img] +ALLOW_DATA_URI_IMAGES = true +``` + +## Customizing CSS +The external renderer is specified in the .ini in the format `[markup.XXXXX]` and the HTML supplied by your external renderer will be wrapped in a `

` with classes `markup` and `XXXXX`. The `markup` class provides out of the box styling (as does `markdown` if `XXXXX` is `markdown`). Otherwise you can use these classes to specifically target the contents of your rendered HTML. + +And so you could write some CSS: +```css +.markup.XXXXX html { + font-size: 100%; + overflow-y: scroll; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +.markup.XXXXX body { + color: #444; + font-family: Georgia, Palatino, 'Palatino Linotype', Times, 'Times New Roman', serif; + font-size: 12px; + line-height: 1.7; + padding: 1em; + margin: auto; + max-width: 42em; + background: #fefefe; +} + +.markup.XXXXX p { + color: orangered; +} +``` + +Add your stylesheet to your custom directory e.g `custom/public/css/my-style-XXXXX.css` and import it using a custom header file `custom/templates/custom/header.tmpl`: +```html + +``` diff --git a/docs/content/doc/advanced/logging-documentation.en-us.md b/docs/content/doc/advanced/logging-documentation.en-us.md index bf9fc4888..478b6418c 100644 --- a/docs/content/doc/advanced/logging-documentation.en-us.md +++ b/docs/content/doc/advanced/logging-documentation.en-us.md @@ -27,7 +27,6 @@ The fundamental thing to be aware of in Gitea is that there are several log groups: - The "Default" logger -- The Macaron logger - The Router logger - The Access logger - The XORM logger @@ -67,44 +66,14 @@ The provider type of the sublogger can be set using the `MODE` value in its subsection, but will default to the name. This allows you to have multiple subloggers that will log to files. -### The "Macaron" logger - -By default Macaron will log to its own go `log` instance. This writes -to `os.Stdout`. You can redirect this log to a Gitea configurable logger -through setting the `REDIRECT_MACARON_LOG` setting in the `[log]` -section which you can configure the outputs of by setting the `MACARON` -value in the `[log]` section of the configuration. `MACARON` defaults -to `file` if unset. - -Please note, the macaron logger will log at `INFO` level, setting the -`LEVEL` of this logger to `WARN` or above will result in no macaron logs. - -Each output sublogger for this logger is configured in -`[log.sublogger.macaron]` sections. There are certain default values -which will not be inherited from the `[log]` or relevant -`[log.sublogger]` sections: - -- `FLAGS` is `stdflags` (Equal to - `date,time,medfile,shortfuncname,levelinitial`) -- `FILE_NAME` will default to `%(ROOT_PATH)/macaron.log` -- `EXPRESSION` will default to `""` -- `PREFIX` will default to `""` - -NB: You can redirect the macaron logger to send its events to the gitea -log using the value: `MACARON = ,` - ### The "Router" logger -There are two types of Router log. By default Macaron send its own -router log which will be directed to Macaron's go `log`, however if you -`REDIRECT_MACARON_LOG` you will enable Gitea's router log. You can -disable both types of Router log by setting `DISABLE_ROUTER_LOG`. +You can disable Router log by setting `DISABLE_ROUTER_LOG`. -If you enable the redirect, you can configure the outputs of this +You can configure the outputs of this router log by setting the `ROUTER` value in the `[log]` section of the configuration. `ROUTER` will default to `console` if unset. The Gitea -Router logs the same data as the Macaron log but has slightly different -coloring. It logs at the `Info` level by default, but this can be +Router logs at the `Info` level by default, but this can be changed if desired by setting the `ROUTER_LOG_LEVEL` value. Please note, setting the `LEVEL` of this logger to a level above @@ -162,11 +131,11 @@ This value represent a go template. It's default value is: The template is passed following options: -- `Ctx` is the `macaron.Context` +- `Ctx` is the `context.Context` - `Identity` is the `SignedUserName` or `"-"` if the user is not logged in - `Start` is the start time of the request -- `ResponseWriter` is the `macaron.ResponseWriter` +- `ResponseWriter` is the `http.ResponseWriter` Caution must be taken when changing this template as it runs outside of the standard panic recovery trap. The template should also be as simple @@ -211,7 +180,7 @@ Certain configuration is common to all modes of log output: - `STACKTRACE_LEVEL` is the lowest level that this output will print a stacktrace. This value is inherited. - `MODE` is the mode of the log output. It will default to the sublogger - name. Thus `[log.console.macaron]` will default to `MODE = console`. + name. Thus `[log.console.router]` will default to `MODE = console`. - `COLORIZE` will default to `true` for `console` as described, otherwise it will default to `false`. @@ -309,13 +278,11 @@ LOG_SQL = false ; SQL logs are rarely helpful unless we specifically ask for the [log] MODE = console LEVEL = debug ; please set the level to debug when we are debugging a problem -REDIRECT_MACARON_LOG = true -MACARON = console ROUTER = console COLORIZE = false ; this can be true if you can strip out the ansi coloring ``` -Sometimes it will be helpful get some specific `TRACE` level logging retricted +Sometimes it will be helpful get some specific `TRACE` level logging restricted to messages that match a specific `EXPRESSION`. Adjusting the `MODE` in the `[log]` section to `MODE = console,traceconsole` to add a new logger output `traceconsole` and then adding its corresponding section would be helpful: @@ -343,7 +310,6 @@ ROOT_PATH = %(GITEA_WORK_DIR)/log MODE = console LEVEL = Info STACKTRACE_LEVEL = None -REDIRECT_MACARON_LOG = false ENABLE_ACCESS_LOG = false ENABLE_XORM_LOG = true XORM = , @@ -374,7 +340,7 @@ recommended that pausing only done for a very short period of time. ## Adding and removing logging whilst Gitea is running It is possible to add and remove logging whilst Gitea is running using the `gitea manager logging add` and `remove` subcommands. -This functionality can only adjust running log systems and cannot be used to start the access, macaron or router loggers if they +This functionality can only adjust running log systems and cannot be used to start the access or router loggers if they were not already initialised. If you wish to start these systems you are advised to adjust the app.ini and (gracefully) restart the Gitea service. @@ -471,7 +437,8 @@ Gitea includes built-in log rotation, which should be enough for most deployment - Disable built-in log rotation by setting `LOG_ROTATE` to `false` in your `app.ini`. - Install `logrotate`. -- Configure `logrotate` to match your deployment requirements, see `man 8 logrotate` for configuration syntax details. In the `postrotate/endscript` block send Gitea a `USR1` signal via `kill -USR1` or `kill -10`, or run `gitea manager logging release-and-reopen` (with the appropriate environment). Ensure that your configurations apply to all files emitted by Gitea loggers as described in the above sections. -- Always do `logrotate /etc/logrotate.conf --debug` to test your configurations. +- Configure `logrotate` to match your deployment requirements, see `man 8 logrotate` for configuration syntax details. In the `postrotate/endscript` block send Gitea a `USR1` signal via `kill -USR1` or `kill -10` to the `gitea` process itself, or run `gitea manager logging release-and-reopen` (with the appropriate environment). Ensure that your configurations apply to all files emitted by Gitea loggers as described in the above sections. +- Always do `logrotate /etc/logrotate.conf --debug` to test your configurations. +- If you are using docker and are running from outside of the container you can use `docker exec -u $OS_USER $CONTAINER_NAME sh -c 'gitea manager logging release-and-reopen'` or `docker exec $CONTAINER_NAME sh -c '/bin/s6-svc -1 /etc/s6/gitea/'` or send `USR1` directly to the gitea process itself. The next `logrotate` jobs will include your configurations, so no restart is needed. You can also immediately reload `logrotate` with `logrotate /etc/logrotate.conf --force`. diff --git a/docs/content/doc/advanced/mail-templates-us.md b/docs/content/doc/advanced/mail-templates-us.md index 247f31f68..bf1daff8e 100644 --- a/docs/content/doc/advanced/mail-templates-us.md +++ b/docs/content/doc/advanced/mail-templates-us.md @@ -130,7 +130,7 @@ did not include a subject part), Gitea's **internal default** will be used. The internal default (fallback) subject is the equivalent of: ```sh -{{.SubjectPrefix}}[{{.Repo}}] {{.Issue.Title}} (#.Issue.Index) +{{.SubjectPrefix}}[{{.Repo}}] {{.Issue.Title}} (#{{.Issue.Index}}) ``` For example: `Re: [mike/stuff] New color palette (#38)` diff --git a/docs/content/doc/advanced/make.fr-fr.md b/docs/content/doc/advanced/make.fr-fr.md index e8ba1912e..f30b709f0 100644 --- a/docs/content/doc/advanced/make.fr-fr.md +++ b/docs/content/doc/advanced/make.fr-fr.md @@ -37,8 +37,8 @@ sudo yum install make Si vous utilisez Windows, vous pouvez télécharger une des versions suivantes de Make: -- [Simple binaire](http://www.equation.com/servlet/equation.cmd?fa=make). Copiez le quelque part et mettez à jour `PATH`. +- [Simple binaire](http://www.equation.com/servlet/equation.cmd?fa=make). Copiez-le quelque part et mettez à jour `PATH`. - [32-bits version](ftp://ftp.equation.com/make/32/make.exe) - [64-bits version](ftp://ftp.equation.com/make/64/make.exe) -- [MinGW](http://www.mingw.org/) includes a build. The binary is called `mingw32-make.exe` instead of `make.exe`. Add the `bin` folder to your `PATH`. -- [Chocolatey package](https://chocolatey.org/packages/make). Run `choco install make` +- [MinGW](http://www.mingw.org/) inclut un _build_. Le fichier binaire est nommé `mingw32-make.exe` plutôt que `make.exe`. Ajoutez le dossier `bin` à votre `PATH`. +- [Chocolatey package](https://chocolatey.org/packages/make). Exécutez `choco install make`. diff --git a/docs/content/doc/advanced/protected-tags.en-us.md b/docs/content/doc/advanced/protected-tags.en-us.md new file mode 100644 index 000000000..4d109c227 --- /dev/null +++ b/docs/content/doc/advanced/protected-tags.en-us.md @@ -0,0 +1,57 @@ +--- +date: "2021-05-14T00:00:00-00:00" +title: "Protected tags" +slug: "protected-tags" +weight: 45 +toc: false +draft: false +menu: + sidebar: + parent: "advanced" + name: "Protected tags" + weight: 45 + identifier: "protected-tags" +--- + +# Protected tags + +Protected tags allow control over who has permission to create or update git tags. Each rule allows you to match either an individual tag name, or use an appropriate pattern to control multiple tags at once. + +**Table of Contents** + +{{< toc >}} + +## Setting up protected tags + +To protect a tag, you need to follow these steps: + +1. Go to the repository’s **Settings** > **Tags** page. +1. Type a pattern to match a name. You can use a single name, a [glob pattern](https://pkg.go.dev/github.com/gobwas/glob#Compile) or a regular expression. +1. Choose the allowed users and/or teams. If you leave these fields empty no one is allowed to create or modify this tag. +1. Select **Save** to save the configuration. + +## Pattern protected tags + +The pattern uses [glob](https://pkg.go.dev/github.com/gobwas/glob#Compile) or regular expressions to match a tag name. For regular expressions you need to enclose the pattern in slashes. + +Examples: + +| Type | Pattern Protected Tag | Possible Matching Tags | +| ----- | ------------------------ | --------------------------------------- | +| Glob | `v*` | `v`, `v-1`, `version2` | +| Glob | `v[0-9]` | `v0`, `v1` up to `v9` | +| Glob | `*-release` | `2.1-release`, `final-release` | +| Glob | `gitea` | only `gitea` | +| Glob | `*gitea*` | `gitea`, `2.1-gitea`, `1_gitea-release` | +| Glob | `{v,rel}-*` | `v-`, `v-1`, `v-final`, `rel-`, `rel-x` | +| Glob | `*` | matches all possible tag names | +| Regex | `/\Av/` | `v`, `v-1`, `version2` | +| Regex | `/\Av[0-9]\z/` | `v0`, `v1` up to `v9` | +| Regex | `/\Av\d+\.\d+\.\d+\z/` | `v1.0.17`, `v2.1.0` | +| Regex | `/\Av\d+(\.\d+){0,2}\z/` | `v1`, `v2.1`, `v1.2.34` | +| Regex | `/-release\z/` | `2.1-release`, `final-release` | +| Regex | `/gitea/` | `gitea`, `2.1-gitea`, `1_gitea-release` | +| Regex | `/\Agitea\z/` | only `gitea` | +| Regex | `/^gitea$/` | only `gitea` | +| Regex | `/\A(v\|rel)-/` | `v-`, `v-1`, `v-final`, `rel-`, `rel-x` | +| Regex | `/.+/` | matches all possible tag names | diff --git a/docs/content/doc/advanced/repo-mirror.en-us.md b/docs/content/doc/advanced/repo-mirror.en-us.md new file mode 100644 index 000000000..bda5b0fa5 --- /dev/null +++ b/docs/content/doc/advanced/repo-mirror.en-us.md @@ -0,0 +1,88 @@ +--- +date: "2021-05-13T00:00:00-00:00" +title: "Repository Mirror" +slug: "repo-mirror" +weight: 45 +toc: false +draft: false +menu: + sidebar: + parent: "advanced" + name: "Repository Mirror" + weight: 45 + identifier: "repo-mirror" +--- + +# Repository Mirror + +Repository mirroring allows for the mirroring of repositories to and from external sources. You can use it to mirror branches, tags, and commits between repositories. + +**Table of Contents** + +{{< toc >}} + +## Use cases + +The following are some possible use cases for repository mirroring: + +- You migrated to Gitea but still need to keep your project in another source. In that case, you can simply set it up to mirror to Gitea (pull) and all the essential history of commits, tags, and branches are available in your Gitea instance. +- You have old projects in another source that you don’t use actively anymore, but don’t want to remove for archiving purposes. In that case, you can create a push mirror so that your active Gitea repository can push its changes to the old location. + +## Pulling from a remote repository + +For an existing remote repository, you can set up pull mirroring as follows: + +1. Select **New Migration** in the **Create...** menu on the top right. +2. Select the remote repository service. +3. Enter a repository URL. +4. If the repository needs authentication fill in your authentication information. +5. Check the box **This repository will be a mirror**. +5. Select **Migrate repository** to save the configuration. + +The repository now gets mirrored periodically from the remote repository. You can force a sync by selecting **Synchronize Now** in the repository settings. + +## Pushing to a remote repository + +For an existing repository, you can set up push mirroring as follows: + +1. In your repository, go to **Settings** > **Repository**, and then the **Mirror Settings** section. +2. Enter a repository URL. +3. If the repository needs authentication expand the **Authorization** section and fill in your authentication information. +4. Select **Add Push Mirror** to save the configuration. + +The repository now gets mirrored periodically to the remote repository. You can force a sync by selecting **Synchronize Now**. In case of an error a message displayed to help you resolve it. + +:exclamation::exclamation: **NOTE:** This will force push to the remote repository. This will overwrite any changes in the remote repository! :exclamation::exclamation: + +### Setting up a push mirror from Gitea to GitHub + +To set up a mirror from Gitea to GitHub, you need to follow these steps: + +1. Create a [GitHub personal access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) with the *public_repo* box checked. +2. Fill in the **Git Remote Repository URL**: `https://github.com//.git`. +3. Fill in the **Authorization** fields with your GitHub username and the personal access token. +4. Select **Add Push Mirror** to save the configuration. + +The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button. + +### Setting up a push mirror from Gitea to GitLab + +To set up a mirror from Gitea to GitLab, you need to follow these steps: + +1. Create a [GitLab personal access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) with *write_repository* scope. +2. Fill in the **Git Remote Repository URL**: `https:////.git`. +3. Fill in the **Authorization** fields with `oauth2` as **Username** and your GitLab personal access token as **Password**. +4. Select **Add Push Mirror** to save the configuration. + +The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button. + +### Setting up a push mirror from Gitea to Bitbucket + +To set up a mirror from Gitea to Bitbucket, you need to follow these steps: + +1. Create a [Bitbucket app password](https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/) with the *Repository Write* box checked. +2. Fill in the **Git Remote Repository URL**: `https://bitbucket.org//.git`. +3. Fill in the **Authorization** fields with your Bitbucket username and the app password as **Password**. +4. Select **Add Push Mirror** to save the configuration. + +The repository pushes shortly thereafter. To force a push, select the **Synchronize Now** button. diff --git a/docs/content/doc/advanced/signing.en-us.md b/docs/content/doc/advanced/signing.en-us.md index 926f6b1f4..71af33fad 100644 --- a/docs/content/doc/advanced/signing.en-us.md +++ b/docs/content/doc/advanced/signing.en-us.md @@ -109,7 +109,7 @@ when creating a repository. The possible values are: - `always`: Always sign Options other than `never` and `always` can be combined as a comma -separated list. +separated list. The commit will be signed if all selected options are true. ### `WIKI` @@ -123,7 +123,7 @@ The possible values are: - `always`: Always sign Options other than `never` and `always` can be combined as a comma -separated list. +separated list. The commit will be signed if all selected options are true. ### `CRUD_ACTIONS` @@ -137,7 +137,7 @@ editor or API CRUD actions. The possible values are: - `always`: Always sign Options other than `never` and `always` can be combined as a comma -separated list. +separated list. The change will be signed if all selected options are true. ### `MERGES` @@ -154,7 +154,7 @@ The possible options are: - `always`: Always sign Options other than `never` and `always` can be combined as a comma -separated list. +separated list. The merge will be signed if all selected options are true. ## Obtaining the Public Key of the Signing Key diff --git a/docs/content/doc/developers.zh-tw.md b/docs/content/doc/developers.zh-tw.md new file mode 100644 index 000000000..e2fbd4a34 --- /dev/null +++ b/docs/content/doc/developers.zh-tw.md @@ -0,0 +1,13 @@ +--- +date: "2016-12-01T16:00:00+02:00" +title: "開發人員" +slug: "developers" +weight: 40 +toc: false +draft: false +menu: + sidebar: + name: "開發人員" + weight: 50 + identifier: "developers" +--- diff --git a/docs/content/doc/developers/api-usage.en-us.md b/docs/content/doc/developers/api-usage.en-us.md index 5253cbaa1..06cbc9b72 100644 --- a/docs/content/doc/developers/api-usage.en-us.md +++ b/docs/content/doc/developers/api-usage.en-us.md @@ -40,8 +40,42 @@ better understand this by looking at the code -- as of this writing, Gitea parses queries and headers to find the token in [modules/auth/auth.go](https://github.com/go-gitea/gitea/blob/6efdcaed86565c91a3dc77631372a9cc45a58e89/modules/auth/auth.go#L47). -You can create an API key token via your Gitea installation's web interface: -`Settings | Applications | Generate New Token`. +## Generating and listing API tokens + +A new token can be generated with a `POST` request to +`/users/:name/tokens`. + +Note that `/users/:name/tokens` is a special endpoint and requires you +to authenticate using `BasicAuth` and a password, as follows: + + +```sh +$ curl -XPOST -H "Content-Type: application/json" -k -d '{"name":"test"}' -u username:password https://gitea.your.host/api/v1/users//tokens +{"id":1,"name":"test","sha1":"9fcb1158165773dd010fca5f0cf7174316c3e37d","token_last_eight":"16c3e37d"} +``` + +The ``sha1`` (the token) is only returned once and is not stored in +plain-text. It will not be displayed when listing tokens with a `GET` +request; e.g. + +```sh +$ curl --request GET --url https://yourusername:password@gitea.your.host/api/v1/users//tokens +[{"name":"test","sha1":"","token_last_eight:"........":},{"name":"dev","sha1":"","token_last_eight":"........"}] +``` + +To use the API with basic authentication with two factor authentication +enabled, you'll need to send an additional header that contains the one +time password (6 digitrotating token). +An example of the header is `X-Gitea-OTP: 123456` where `123456` +is where you'd place the code from your authenticator. +Here is how the request would look like in curl: + +```sh +$ curl -H "X-Gitea-OTP: 123456" --request GET --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens +``` + +You can also create an API key token via your Gitea installation's web +interface: `Settings | Applications | Generate New Token`. ## OAuth2 Provider @@ -79,25 +113,8 @@ API Reference guide is auto-generated by swagger and available on: or on [gitea demo instance](https://try.gitea.io/api/swagger) -## Listing your issued tokens via the API - -As mentioned in -[#3842](https://github.com/go-gitea/gitea/issues/3842#issuecomment-397743346), -`/users/:name/tokens` is special and requires you to authenticate -using BasicAuth, as follows: - -### Using basic authentication: - -```sh -$ curl --request GET --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens -[{"name":"test","sha1":"..."},{"name":"dev","sha1":"..."}] -``` - -As of v1.8.0 of Gitea, if using basic authentication with the API and your user has two factor authentication enabled, you'll need to send an additional header that contains the one time password (6 digit rotating token). An example of the header is `X-Gitea-OTP: 123456` where `123456` is where you'd place the code from your authenticator. Here is how the request would look like in curl: - -```sh -$ curl -H "X-Gitea-OTP: 123456" --request GET --url https://yourusername:yourpassword@gitea.your.host/api/v1/users/yourusername/tokens -``` +The OpenAPI document is at: +`https://gitea.your.host/swagger.v1.json` ## Sudo diff --git a/docs/content/doc/developers/hacking-on-gitea.en-us.md b/docs/content/doc/developers/hacking-on-gitea.en-us.md index 516a33d2a..23e3b3768 100644 --- a/docs/content/doc/developers/hacking-on-gitea.en-us.md +++ b/docs/content/doc/developers/hacking-on-gitea.en-us.md @@ -73,6 +73,8 @@ One of these three distributions of Make will run on Windows: - The binary is called `mingw32-make.exe` instead of `make.exe`. Add the `bin` folder to `PATH`. - [Chocolatey package](https://chocolatey.org/packages/make). Run `choco install make` +**Note**: If you are attempting to build using make with Windows Command Prompt, you may run into issues. The above prompts (git bash, or mingw) are recommended, however if you only have command prompt (or potentially powershell) you can set environment variables using the [set](https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/set_1) command, e.g. `set TAGS=bindata`. + ## Downloading and cloning the Gitea source code The recommended method of obtaining the source code is by using `git clone`. @@ -86,7 +88,7 @@ from within the `$GOPATH`, hence the `go get` approach is no longer recommended. ## Forking Gitea -Download the master Gitea source code as above. Then, fork the +Download the main Gitea source code as above. Then, fork the [Gitea repository](https://github.com/go-gitea/gitea) on GitHub, and either switch the git remote origin for your fork or add your fork as another remote: @@ -123,11 +125,11 @@ TAGS="bindata sqlite sqlite_unlock_notify" make build The `build` target will execute both `frontend` and `backend` sub-targets. If the `bindata` tag is present, the frontend files will be compiled into the binary. It is recommended to leave out the tag when doing frontend development so that changes will be reflected. -See `make help` for all available `make` targets. Also see [`.drone.yml`](https://github.com/go-gitea/gitea/blob/master/.drone.yml) to see how our continuous integration works. +See `make help` for all available `make` targets. Also see [`.drone.yml`](https://github.com/go-gitea/gitea/blob/main/.drone.yml) to see how our continuous integration works. ## Building continuously -To run and continously rebuild when source files change: +To run and continuously rebuild when source files change: ```bash make watch @@ -216,7 +218,7 @@ You should validate your generated Swagger file and spell-check it with: make swagger-validate misspell-check ``` -You should commit the changed swagger JSON file. The continous integration +You should commit the changed swagger JSON file. The continuous integration server will check that this has been done using: ```bash @@ -276,7 +278,7 @@ require `git lfs` to be installed. Other database tests are available but may need adjustment to the local environment. Look at -[`integrations/README.md`](https://github.com/go-gitea/gitea/blob/master/integrations/README.md) +[`integrations/README.md`](https://github.com/go-gitea/gitea/blob/main/integrations/README.md) for more information and how to run a single test. Our continuous integration will test the code passes its unit tests and that @@ -304,19 +306,32 @@ be cleaned up. A `launch.json` and `tasks.json` are provided within `contrib/ide/vscode` for Visual Studio Code. Look at -[`contrib/ide/README.md`](https://github.com/go-gitea/gitea/blob/master/contrib/ide/README.md) +[`contrib/ide/README.md`](https://github.com/go-gitea/gitea/blob/main/contrib/ide/README.md) for more information. +## GoLand + +Clicking the `Run Application` arrow on the function `func main()` in `/main.go` +can quickly start a debuggable gitea instance. + +The `Output Directory` in `Run/Debug Configuration` MUST be set to the +gitea project directory (which contains `main.go` and `go.mod`), +otherwise, the started instance's working directory is a GoLand's temporary directory +and prevents gitea from loading dynamic resources (eg: templates) in a development environment. + +To run unit tests with SQLite in GoLand, set `-tags sqlite,sqlite_unlock_notify` +in `Go tool arguments` of `Run/Debug Configuration`. + ## Submitting PRs Once you're happy with your changes, push them up and open a pull request. It is recommended that you allow Gitea Managers and Owners to modify your PR -branches as we will need to update it to master before merging and/or may be +branches as we will need to update it to main before merging and/or may be able to help fix issues directly. Any PR requires two approvals from the Gitea maintainers and needs to pass the -continous integration. Take a look at our -[`CONTRIBUTING.md`](https://github.com/go-gitea/gitea/blob/master/CONTRIBUTING.md) +continuous integration. Take a look at our +[`CONTRIBUTING.md`](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md) document. If you need more help pop on to [Discord](https://discord.gg/gitea) #Develop diff --git a/docs/content/doc/developers/integrations.en-us.md b/docs/content/doc/developers/integrations.en-us.md index a1d8f0f93..15d5e7e59 100644 --- a/docs/content/doc/developers/integrations.en-us.md +++ b/docs/content/doc/developers/integrations.en-us.md @@ -20,7 +20,26 @@ projects. We are curating a list over at [awesome-gitea](https://gitea.com/gitea/awesome-gitea) to track these! -If you are looking for [CI/CD](https://gitea.com/gitea/awesome-gitea#devops), -an [SDK](https://gitea.com/gitea/awesome-gitea#sdk), -or even some extra [themes](https://gitea.com/gitea/awesome-gitea#themes), +If you are looking for [CI/CD](https://gitea.com/gitea/awesome-gitea#user-content-devops), +an [SDK](https://gitea.com/gitea/awesome-gitea#user-content-sdk), +or even some extra [themes](https://gitea.com/gitea/awesome-gitea#user-content-themes), you can find them listed in the [awesome-gitea](https://gitea.com/gitea/awesome-gitea) repository! + +## Pre-Fill New File name and contents + +If you'd like to open a new file with a given name and contents, +you can do so with query parameters: + +```txt +GET /{{org}}/{{repo}}/_new/{{filepath}} + ?filename={{filename}} + &value={{content}} +``` + +For example: + +```txt +GET https://git.example.com/johndoe/bliss/_new/articles/ + ?filename=hello-world.md + &value=Hello%2C%20World! +``` diff --git a/docs/content/doc/developers/integrations.zh-tw.md b/docs/content/doc/developers/integrations.zh-tw.md new file mode 100644 index 000000000..6991ec4ae --- /dev/null +++ b/docs/content/doc/developers/integrations.zh-tw.md @@ -0,0 +1,22 @@ +--- +date: "2019-04-15T17:29:00+08:00" +title: "整合" +slug: "integrations" +weight: 40 +toc: false +draft: false +menu: + sidebar: + parent: "developers" + name: "整合" + weight: 65 + identifier: "integrations" +--- + +# 整合 + +Gitea 有著很棒的第三方整合社群, 以及其它有著一流支援的專案。 + +我們持續的整理一份清單以追蹤他們!請到 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 查看。 + +如果您正在找尋有關 [CI/CD](https://gitea.com/gitea/awesome-gitea#user-content-devops)、[SDK](https://gitea.com/gitea/awesome-gitea#user-content-sdk) 或是其它佈景主題,您可以在存儲庫 [awesome-gitea](https://gitea.com/gitea/awesome-gitea) 找到他們。 diff --git a/docs/content/doc/developers/migrations.en-us.md b/docs/content/doc/developers/migrations.en-us.md index 6e1a7e019..e432ea3b3 100644 --- a/docs/content/doc/developers/migrations.en-us.md +++ b/docs/content/doc/developers/migrations.en-us.md @@ -20,7 +20,7 @@ repository data from other git host platforms to Gitea or, in the future, migrat git host platforms. Currently, migrations from Github, Gitlab, and other Gitea instances are implemented. -First of all, Gitea defines some standard objects in packages [modules/migrations/base](https://github.com/go-gitea/gitea/tree/master/modules/migrations/base). +First of all, Gitea defines some standard objects in packages [modules/migrations/base](https://github.com/go-gitea/gitea/tree/main/modules/migrations/base). They are `Repository`, `Milestone`, `Release`, `ReleaseAsset`, `Label`, `Issue`, `Comment`, `PullRequest`, `Reaction`, `Review`, `ReviewComment`. ## Downloader Interfaces @@ -31,11 +31,11 @@ To migrate from a new git host platform, there are two steps to be updated. - You should implement a `DownloaderFactory` which will be used to detect if the URL matches and create the above `Downloader`. - You'll need to register the `DownloaderFactory` via `RegisterDownloaderFactory` on `init()`. -You can find these interfaces in [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/downloader.go). +You can find these interfaces in [downloader.go](https://github.com/go-gitea/gitea/blob/main/modules/migrations/base/downloader.go). ## Uploader Interface Currently, only a `GiteaLocalUploader` is implemented, so we only save downloaded data via this `Uploader` to the local Gitea instance. Other uploaders are not supported at this time. -You can find these interfaces in [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/uploader.go). +You can find these interfaces in [uploader.go](https://github.com/go-gitea/gitea/blob/main/modules/migrations/base/uploader.go). diff --git a/docs/content/doc/developers/migrations.zh-tw.md b/docs/content/doc/developers/migrations.zh-tw.md new file mode 100644 index 000000000..06fd93d68 --- /dev/null +++ b/docs/content/doc/developers/migrations.zh-tw.md @@ -0,0 +1,39 @@ +--- +date: "2019-04-15T17:29:00+08:00" +title: "遷移介面" +slug: "migrations-interfaces" +weight: 30 +toc: false +draft: false +menu: + sidebar: + parent: "developers" + name: "遷移介面" + weight: 55 + identifier: "migrations-interfaces" +--- + +# 遷移功能 + +完整的遷移從 Gitea 1.9.0 開始提供。它定義了兩個介面用來從其它 Git 託管平臺遷移儲存庫資料到 Gitea,未來或許會提供遷移到其它 git 託管平臺。 +目前已實作了從 Github, Gitlab 和其它 Gitea 遷移資料。 + +Gitea 定義了一些基本物件於套件 [modules/migrations/base](https://github.com/go-gitea/gitea/tree/master/modules/migrations/base)。 +分別是 `Repository`, `Milestone`, `Release`, `ReleaseAsset`, `Label`, `Issue`, `Comment`, `PullRequest`, `Reaction`, `Review`, `ReviewComment`。 + +## Downloader 介面 + +從新的 Git 託管平臺遷移,有兩個新的步驟。 + +- 您必須實作一個 `Downloader`,它用來取得儲存庫資訊。 +- 您必須實作一個 `DownloaderFactory`,它用來偵測 URL 是否符合並建立上述的 `Downloader`。 + - 您需要在 `init()` 透過 `RegisterDownloaderFactory` 來註冊 `DownloaderFactory`。 + +您可以在 [downloader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/downloader.go) 中找到這些介面。 + +## Uploader 介面 + +目前只有 `GiteaLocalUploader` 被實作出來,所以我們只能通過 `Uploader` 儲存已下載的資料到本地的 Gitea 實例。 +目前尚未支援其它 Uploader。 + +您可以在 [uploader.go](https://github.com/go-gitea/gitea/blob/master/modules/migrations/base/uploader.go) 中找到這些介面。 diff --git a/docs/content/doc/developers/oauth2-provider.md b/docs/content/doc/developers/oauth2-provider.md index 29305a24c..efe78eed9 100644 --- a/docs/content/doc/developers/oauth2-provider.md +++ b/docs/content/doc/developers/oauth2-provider.md @@ -23,10 +23,13 @@ Gitea supports acting as an OAuth2 provider to allow third party applications to ## Endpoints -| Endpoint | URL | -| ---------------------- | --------------------------- | -| Authorization Endpoint | `/login/oauth/authorize` | -| Access Token Endpoint | `/login/oauth/access_token` | +| Endpoint | URL | +| ------------------------ | ----------------------------------- | +| OpenID Connect Discovery | `/.well-known/openid-configuration` | +| Authorization Endpoint | `/login/oauth/authorize` | +| Access Token Endpoint | `/login/oauth/access_token` | +| OpenID Connect UserInfo | `/login/oauth/userinfo` | +| JSON Web Key Set | `/login/oauth/keys` | ## Supported OAuth2 Grants diff --git a/docs/content/doc/developers/oauth2-provider.zh-tw.md b/docs/content/doc/developers/oauth2-provider.zh-tw.md new file mode 100644 index 000000000..a2013feac --- /dev/null +++ b/docs/content/doc/developers/oauth2-provider.zh-tw.md @@ -0,0 +1,96 @@ +--- +date: "2019-04-19:44:00+01:00" +title: "OAuth2 提供者" +slug: "oauth2-provider" +weight: 41 +toc: false +draft: false +menu: + sidebar: + parent: "developers" + name: "OAuth2 提供者" + weight: 41 + identifier: "oauth2-provider" +--- + +# OAuth2 提供者 + +**目錄** + +{{< toc >}} + +Gitea 支援作為 OAuth2 提供者,能讓第三方程式能在使用者同意下存取 Gitea 的資源。此功能自 1.8.0 版開始提供。 + +## Endpoint + +| Endpoint | URL | +| ---------------------- | --------------------------- | +| Authorization Endpoint | `/login/oauth/authorize` | +| Access Token Endpoint | `/login/oauth/access_token` | + +## 支援的 OAuth2 Grant + +目前 Gitea 只支援 [**Authorization Code Grant**](https://tools.ietf.org/html/rfc6749#section-1.3.1) 標準並額外支援下列擴充標準: + +- [Proof Key for Code Exchange (PKCE)](https://tools.ietf.org/html/rfc7636) +- [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth) + +若想要讓第三方程式使用 Authorization Code Grant,需先在「設定」(`/user/settings/applications`)中註冊一個新的應用程式。 + +## Scope + +目前 Gitea 尚未支援 scope (參見 [#4300](https://github.com/go-gitea/gitea/issues/4300)),所有的第三方程式都可獲得該使用者及他所屬的組織中所有資源的存取權。 + +## 範例 + +**備註:** 此範例未使用 PKCE。 + +1. 重新導向使用者到 authorization endpoint 以獲得他同意授權存取資源: + + + ```curl + https://[YOUR-GITEA-URL]/login/oauth/authorize?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI& response_type=code&state=STATE + ``` + + 在設定中註冊應用程式以獲得 `CLIENT_ID`。`STATE` 是一個隨機的字串,它將在使用者授權後發送回您的應用程式。`state` 參數是選用的,但應該要用它來防止 CSRF 攻擊。 + + ![Authorization Page](/authorize.png) + + 使用者將會被詢問是否授權給您的應用程式。如果它們同意了,使用者將被重新導向到 `REDIRECT_URL`,例如: + + ```curl + https://[REDIRECT_URI]?code=RETURNED_CODE&state=STATE + ``` + +1. 使用重新導向提供的 `code`,您可以要求一個新的應用程式和 Refresh Token。Access Token Endpoint 接受 POST 請求使用 `application/json` 或 `application/x-www-form-urlencoded` 類型的請求內容,例如: + + ```curl + POST https://[YOUR-GITEA-URL]/login/oauth/access_token + ``` + + ```json + { + "client_id": "YOUR_CLIENT_ID", + "client_secret": "YOUR_CLIENT_SECRET", + "code": "RETURNED_CODE", + "grant_type": "authorization_code", + "redirect_uri": "REDIRECT_URI" + } + ``` + + 回應: + + ```json + { + "access_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjowLCJleHAiOjE1NTUxNzk5MTIsImlhdCI6MTU1NTE3NjMxMn0.0-iFsAwBtxuckA0sNZ6QpBQmywVPz129u75vOM7wPJecw5wqGyBkmstfJHAjEOqrAf_V5Z-1QYeCh_Cz4RiKug", + "token_type": "bearer", + "expires_in": 3600, + "refresh_token": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJnbnQiOjIsInR0IjoxLCJjbnQiOjEsImV4cCI6MTU1NzgwNDMxMiwiaWF0IjoxNTU1MTc2MzEyfQ.S_HZQBy4q9r5SEzNGNIoFClT43HPNDbUdHH-GYNYYdkRfft6XptJBkUQscZsGxOW975Yk6RbgtGvq1nkEcklOw" + } + ``` + + `CLIENT_SECRET` 是產生給此應用程式的唯一密鑰。請記住該密鑰只會在您於 Gitea 建立/註冊應用程式時出現一次。若您遺失密鑰,您必須在該應用程式的設定中重新產生密鑰。 + + `access_token` 請求中的 `REDIRECT_URI` 必須符合 `authorize` 請求中的 `REDIRECT_URI`。 + +1. 發送 [API requests](https://docs.gitea.io/en-us/api-usage#oauth2) 時使用 `access_token` 以存取使用者的資源。 diff --git a/docs/content/doc/features/authentication.en-us.md b/docs/content/doc/features/authentication.en-us.md index 0c83fa4d2..b075d4a26 100644 --- a/docs/content/doc/features/authentication.en-us.md +++ b/docs/content/doc/features/authentication.en-us.md @@ -88,8 +88,8 @@ Adds the following fields: - Bind Password (optional) - The password for the Bind DN specified above, if any. _Note: The password - is stored in plaintext at the server. As such, ensure that the Bind DN - has as few privileges as possible._ + is stored encrypted with the SECRET_KEY on the server. It is still recommended + to ensure that the Bind DN has as few privileges as possible._ - User Search Base **(required)** @@ -170,6 +170,8 @@ To configure PAM, set the 'PAM Service Name' to a filename in `/etc/pam.d/`. To work with normal Linux passwords, the user running Gitea must have read access to `/etc/shadow`. +**Note**: PAM support is added via [build-time flags](https://docs.gitea.io/en-us/install-from-source/#build), and the official binaries provided do not have this enabled. + ## SMTP (Simple Mail Transfer Protocol) This option allows Gitea to log in to an SMTP host as a Gitea user. To @@ -199,16 +201,18 @@ configure this, set the fields below: with multiple domains. - Example: `gitea.io,mydomain.com,mydomain2.com` -- Enable TLS Encryption +- Force SMTPS - - Enable TLS encryption on authentication. + - SMTPS will be used by default for connections to port 465, if you wish to use SMTPS + for other ports. Set this value. + - Otherwise if the server provides the `STARTTLS` extension this will be used. - Skip TLS Verify - Disable TLS verify on authentication. -- This authentication is activate - - Enable or disable this auth. +- This Authentication Source is Activated + - Enable or disable this authentication source. ## FreeIPA @@ -259,7 +263,7 @@ Before activating SSPI single sign-on authentication (SSO) you have to prepare y - Create a service principal name for the host where `gitea.exe` is running with class `HTTP`: - - Start `Command Prompt` or `PowerShell` as a priviledged domain user (eg. Domain Administrator) + - Start `Command Prompt` or `PowerShell` as a privileged domain user (eg. Domain Administrator) - Run the command below, replacing `host.domain.local` with the fully qualified domain name (FQDN) of the server where the web application will be running, and `domain\user` with the name of the account created in the previous step: ```sh @@ -283,7 +287,7 @@ Before activating SSPI single sign-on authentication (SSO) you have to prepare y - Click the `Sign In` button on the dashboard and choose SSPI to be automatically logged in with the same user that is currently logged on to the computer - If it does not work, make sure that: - - You are not running the web browser on the same server where gitea is running. You should be running the web browser on a domain joined computer (client) that is different from the server. If both the client and server are runnning on the same computer NTLM will be prefered over Kerberos. + - You are not running the web browser on the same server where gitea is running. You should be running the web browser on a domain joined computer (client) that is different from the server. If both the client and server are running on the same computer NTLM will be preferred over Kerberos. - There is only one `HTTP/...` SPN for the host - The SPN contains only the hostname, without the port - You have added the URL of the web app to the `Local intranet zone` diff --git a/docs/content/doc/features/comparison.en-us.md b/docs/content/doc/features/comparison.en-us.md index 0bd06da24..a70376685 100644 --- a/docs/content/doc/features/comparison.en-us.md +++ b/docs/content/doc/features/comparison.en-us.md @@ -33,26 +33,26 @@ _Symbols used in table:_ ## General Features -| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | -| ----------------------------------- | -------------------------------------------------- | ---- | --------- | --------- | --------- | --------- | ------------ | -| Open source and free | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | -| Low resource usage (RAM/CPU) | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | -| Multiple database support | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ | -| Multiple OS support | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | -| Easy upgrade process | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ | -| Markdown support | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| Orgmode support | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? | -| CSV support | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? | -| Third-party render tool support | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? | -| Static Git-powered pages | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Integrated Git-powered wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | -| Deploy Tokens | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | -| Repository Tokens with write rights | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ | -| Built-in Container Registry | [✘](https://github.com/go-gitea/gitea/issues/2316) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | -| External git mirroring | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ | -| FIDO U2F (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | -| Built-in CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Subgroups: groups within groups | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ | +| Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | +| ----------------------------------- | -------------------------------------------------- | ---- | --------- | --------- | --------- | -------------- | ------------ | +| Open source and free | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | +| Low resource usage (RAM/CPU) | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | +| Multiple database support | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ | +| Multiple OS support | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | +| Easy upgrade process | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ | +| Markdown support | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Orgmode support | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? | +| CSV support | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? | +| Third-party render tool support | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? | +| Static Git-powered pages | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Integrated Git-powered wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (cloud only) | ✘ | +| Deploy Tokens | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Repository Tokens with write rights | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Built-in Container Registry | [✘](https://github.com/go-gitea/gitea/issues/2316) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| External git mirroring | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ | +| FIDO U2F (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| Built-in CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Subgroups: groups within groups | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ | ## Code management @@ -61,12 +61,12 @@ _Symbols used in table:_ | Repository topics | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | | Repository code search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | | Global code search | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ | -| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ⁄ | ✓ | +| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | | Group Milestones | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | | Granular user roles (Code, Issues, Wiki etc) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | | Verified Committer | ⁄ | ✘ | ? | ✓ | ✓ | ✓ | ✘ | | GPG Signed Commits | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | -| Reject unsigned commits | [✓](https://github.com/go-gitea/gitea/pull/9708) | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ | +| Reject unsigned commits | [✓](https://github.com/go-gitea/gitea/pull/9708) | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | | Repository Activity page | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | | Branch manager | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | | Create new branches | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | @@ -77,24 +77,24 @@ _Symbols used in table:_ ## Issue Tracker | Feature | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | -| ------------------------------- | -------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------------------------------------------------- | --------- | --------- | ------------ | -| Issue tracker | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | -| Issue templates | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Labels | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Time tracking | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Multiple assignees for issues | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ | -| Related issues | ✘ | ✘ | ⁄ | [✓](https://docs.gitlab.com/ce/user/project/issues/related_issues.html) | ✓ | ✘ | ✘ | -| Confidential issues | [✘](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | -| Comment reactions | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Lock Discussion | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Batch issue handling | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | -| Issue Boards (Kanban) | [✓](https://github.com/go-gitea/gitea/pull/8346) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | -| Create new branches from issues | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | -| Issue search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | -| Global issue search | [✘](https://github.com/go-gitea/gitea/issues/2434) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | -| Issue dependency | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | -| Create issue via email | [✘](https://github.com/go-gitea/gitea/issues/6226) | [✘](https://github.com/gogs/gogs/issues/2602) | ✘ | ✘ | ✓ | ✓ | ✘ | -| Service Desk | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | [✓](https://gitlab.com/groups/gitlab-org/-/epics/3103) | ✓ | ✘ | ✘ | +| ------------------------------- | -------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------------------------------------------------- | --------- | -------------- | ------------ | +| Issue tracker | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ (cloud only) | ✘ | +| Issue templates | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Labels | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Time tracking | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Multiple assignees for issues | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ | +| Related issues | ✘ | ✘ | ⁄ | [✓](https://docs.gitlab.com/ce/user/project/issues/related_issues.html) | ✓ | ✘ | ✘ | +| Confidential issues | [✘](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| Comment reactions | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Lock Discussion | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Batch issue handling | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Issue Boards (Kanban) | [✓](https://github.com/go-gitea/gitea/pull/8346) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| Create new branches from issues | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| Issue search | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| Global issue search | [✘](https://github.com/go-gitea/gitea/issues/2434) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| Issue dependency | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | +| Create issue via email | [✘](https://github.com/go-gitea/gitea/issues/6226) | [✘](https://github.com/gogs/gogs/issues/2602) | ✘ | ✘ | ✓ | ✓ | ✘ | +| Service Desk | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | [✓](https://gitlab.com/groups/gitlab-org/-/epics/3103) | ✓ | ✘ | ✘ | ## Pull/Merge requests diff --git a/docs/content/doc/features/comparison.zh-tw.md b/docs/content/doc/features/comparison.zh-tw.md new file mode 100644 index 000000000..666e82d3c --- /dev/null +++ b/docs/content/doc/features/comparison.zh-tw.md @@ -0,0 +1,131 @@ +--- +date: "2018-05-07T13:00:00+02:00" +title: "比較 Gitea 和其它自託管 Git 服務" +slug: "comparison" +weight: 5 +toc: false +draft: false +menu: + sidebar: + parent: "features" + name: "比較" + weight: 5 + identifier: "comparison" +--- + +# 比較 Gitea 和其它自託管 Git 服務 + +**目錄** + +{{< toc >}} + +為了幫助您判斷 Gitea 是否適合您的需求,這裡列出了它和其它自託管 Git 服務的比較。 + +請注意我們不會經常檢查其它產品的功能異動,所以這份清單可能過期,如果您在下方表格中找到需要更新的資料,請在 [GitHub 的 Issue](https://github.com/go-gitea/gitea/issues) 回報。 + +表格中使用的符號: + +- ✓ - 支援 + +- ⁄ - 有限度的支援 + +- ✘ - 不支援 + +## 一般功能 + +| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | +| ------------------------ | -------------------------------------------------- | ---- | --------- | --------- | --------- | --------- | ------------ | +| 免費及開放原始碼 | ✓ | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | +| 低資源使用 (RAM/CPU) | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | +| 支援多種資料庫 | ✓ | ✓ | ✘ | ⁄ | ⁄ | ✓ | ✓ | +| 支援多種作業系統 | ✓ | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | +| 簡單的升級程序 | ✓ | ✓ | ✘ | ✓ | ✓ | ✘ | ✓ | +| 支援 Markdown | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 支援 Orgmode | ✓ | ✘ | ✓ | ✘ | ✘ | ✘ | ? | +| 支援 CSV | ✓ | ✘ | ✓ | ✘ | ✘ | ✓ | ? | +| 支援第三方渲染工具 | ✓ | ✘ | ✘ | ✘ | ✘ | ✓ | ? | +| Git 驅動的靜態頁面 | [✘](https://github.com/go-gitea/gitea/issues/302) | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Git 驅動的整合 wiki | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 部署 Token | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 有寫入權限的儲存庫 Token | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ | +| 內建 Container Registry | [✘](https://github.com/go-gitea/gitea/issues/2316) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| 對外部 Git 鏡像 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ | +| FIDO U2F (2FA) | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 內建 CI/CD | ✘ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 子群組: 群組中的群組 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✓ | + +## 程式碼管理 + +| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | +| ----------------------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ | +| 儲存庫主題描述 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 儲存庫程式碼搜尋 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 全域程式碼搜尋 | ✓ | ✘ | ✓ | ✘ | ✓ | ✓ | ✓ | +| Git LFS 2.0 | ✓ | ✘ | ✓ | ✓ | ✓ | ⁄ | ✓ | +| 群組里程碑 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| 精細的使用者權限(程式碼, 問題, Wiki 等) | ✓ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| 驗證提交者 | ⁄ | ✘ | ? | ✓ | ✓ | ✓ | ✘ | +| GPG 簽署提交 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 拒絕未經簽署的提交 | [✓](https://github.com/go-gitea/gitea/pull/9708) | ✘ | ✓ | ✓ | ✓ | ✘ | ✓ | +| 儲存庫動態頁 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 分支管理 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 建立新分支 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 網頁程式碼編輯器 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 提交線圖 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 儲存庫範本 | [✓](https://github.com/go-gitea/gitea/pull/8768) | ✘ | ✓ | ✘ | ✓ | ✓ | ✘ | + +## 問題追蹤器 + +| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | +| -------------------- | -------------------------------------------------- | --------------------------------------------- | --------- | ----------------------------------------------------------------------- | --------- | --------- | ------------ | +| 問題追蹤器 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 問題範本 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 標籤 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 時間追蹤 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 指派問題給多個成員 | ✓ | ✘ | ✓ | ✘ | ✓ | ✘ | ✘ | +| 相關問題 | ✘ | ✘ | ⁄ | [✓](https://docs.gitlab.com/ce/user/project/issues/related_issues.html) | ✓ | ✘ | ✘ | +| 機密問題 | [✘](https://github.com/go-gitea/gitea/issues/3217) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| 對留言的反應 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 鎖定對話 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 批次處理問題 | ✓ | ✘ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 問題看板(看板方法) | [✓](https://github.com/go-gitea/gitea/pull/8346) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| 從問題建立新分支 | ✘ | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| 問題搜尋 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 全域問題搜尋 | [✘](https://github.com/go-gitea/gitea/issues/2434) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 問題相依 | ✓ | ✘ | ✘ | ✘ | ✘ | ✘ | ✘ | +| 從電子郵件建立問題 | [✘](https://github.com/go-gitea/gitea/issues/6226) | [✘](https://github.com/gogs/gogs/issues/2602) | ✘ | ✘ | ✓ | ✓ | ✘ | +| 服務台 | [✘](https://github.com/go-gitea/gitea/issues/6219) | ✘ | ✘ | [✓](https://gitlab.com/groups/gitlab-org/-/epics/3103) | ✓ | ✘ | ✘ | + +## 拉取/合併請求 + +| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | +| -------------------------- | -------------------------------------------------- | ---- | --------- | --------------------------------------------------------------------------------- | --------- | ------------------------------------------------------------------------ | ------------ | +| 拉取/合併請求 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| Squash 合併 | ✓ | ✘ | ✓ | [✓](https://docs.gitlab.com/ce/user/project/merge_requests/squash_and_merge.html) | ✓ | ✓ | ✓ | +| Rebase 合併 | ✓ | ✓ | ✓ | ✘ | ⁄ | ✘ | ✓ | +| 拉取/合併請求的行內留言 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 拉取/合併請求的核可 | ✓ | ✘ | ⁄ | ✓ | ✓ | ✓ | ✓ | +| 解決合併衝突 | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 限制某些使用者的推送及合併 | ✓ | ✘ | ✓ | ⁄ | ✓ | ✓ | ✓ | +| 還原指定的提交或合併請求 | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 拉取/合併請求範本 | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | +| Cherry-picking 變更 | [✘](https://github.com/go-gitea/gitea/issues/5158) | ✘ | ✘ | ✓ | ✓ | ✘ | ✘ | +| 下載 Patch | ✓ | ✘ | ✓ | ✓ | ✓ | [/](https://jira.atlassian.com/plugins/servlet/mobile#issue/BCLOUD-8323) | ✘ | + +## 第三方整合 + +| 功能 | Gitea | Gogs | GitHub EE | GitLab CE | GitLab EE | BitBucket | RhodeCode CE | +| ------------------------- | ------------------------------------------------ | ---- | --------- | --------- | --------- | --------- | ------------ | +| 支援 Webhook | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 自訂 Git Hook | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 整合 AD / LDAP | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 支援多重 LDAP / AD 伺服器 | ✓ | ✓ | ✘ | ✘ | ✓ | ✓ | ✓ | +| 同步 LDAP 使用者 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | +| 支援 OpenId Connect | ✓ | ✘ | ✓ | ✓ | ✓ | ? | ✘ | +| 整合 OAuth 2.0 (外部驗證) | ✓ | ✘ | ⁄ | ✓ | ✓ | ? | ✓ | +| 成為 OAuth 2.0 提供者 | [✓](https://github.com/go-gitea/gitea/pull/5378) | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 兩步驟驗證 (2FA) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 整合 Mattermost/Slack | ✓ | ✓ | ⁄ | ✓ | ✓ | ⁄ | ✓ | +| 整合 Discord | ✓ | ✓ | ✓ | ✓ | ✓ | ✘ | ✘ | +| 整合 Microsoft Teams | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✘ | +| 顯示外部 CI/CD 狀態 | ✓ | ✘ | ✓ | ✓ | ✓ | ✓ | ✓ | diff --git a/docs/content/doc/features/localization.zh-tw.md b/docs/content/doc/features/localization.zh-tw.md index b311cc543..e10006360 100644 --- a/docs/content/doc/features/localization.zh-tw.md +++ b/docs/content/doc/features/localization.zh-tw.md @@ -13,6 +13,18 @@ menu: identifier: "localization" --- -# Localization +# 在地化 -## TBD +我們在 [Crowdin 專案](https://crowdin.com/project/gitea)上進行在地化工作。 + +**英語系**的翻譯,可在修改[英文語言檔](https://github.com/go-gitea/gitea/blob/master/options/locale/locale_en-US.ini)後提出合併請求。 + +**非英語系**的翻譯,請前往上述的 Crowdin 專案。 + +## 已支援的語言 + +上述 Crowdin 專案中列出的語言在翻譯超過 25% 後將被支援。 + +翻譯被認可後將在下次 Crowdin 同步後進入到主儲存庫,通常是在任何合併請求被合併之後。 +這表示更改的翻譯要到下次 Gitea 發佈後才會出現。 +如果您使用的是最新建置,它將會在同步完成、您更新後出現。 diff --git a/docs/content/doc/features/webhooks.en-us.md b/docs/content/doc/features/webhooks.en-us.md index 5d792f5f5..7a88f2a5e 100644 --- a/docs/content/doc/features/webhooks.en-us.md +++ b/docs/content/doc/features/webhooks.en-us.md @@ -27,6 +27,7 @@ All event pushes are POST requests. The methods currently supported are: - Telegram - Microsoft Teams - Feishu +- Wechatwork ### Event information diff --git a/docs/content/doc/features/webhooks.zh-cn.md b/docs/content/doc/features/webhooks.zh-cn.md index fe9008717..f3a312eee 100644 --- a/docs/content/doc/features/webhooks.zh-cn.md +++ b/docs/content/doc/features/webhooks.zh-cn.md @@ -15,4 +15,17 @@ menu: # Webhooks +Gitea 的存储 webhook。这可以有存储库管路设定页 `/:username/:reponame/settings/hooks` 中的。Webhook 也可以按照组织调整或全系统调整,所有时间的推送都是POST请求 +。此方法目前被下列服务支援: + +- Gitea (也可以是 GET 請求) +- Gogs +- Slack +- Discord +- Dingtalk +- Telegram +- Microsoft Teams +- Feishu +- Wechatwork + ## TBD diff --git a/docs/content/doc/features/webhooks.zh-tw.md b/docs/content/doc/features/webhooks.zh-tw.md index fe9008717..697b41391 100644 --- a/docs/content/doc/features/webhooks.zh-tw.md +++ b/docs/content/doc/features/webhooks.zh-tw.md @@ -1,6 +1,6 @@ --- date: "2016-12-01T16:00:00+02:00" -title: "Webhooks" +title: "Webhook" slug: "webhooks" weight: 10 toc: false @@ -8,11 +8,180 @@ draft: false menu: sidebar: parent: "features" - name: "Webhooks" + name: "Webhook" weight: 30 identifier: "webhooks" --- -# Webhooks +# Webhook -## TBD +Gitea 的儲存庫事件支援 web hook。這可以有儲存庫管理員在設定頁 `/:username/:reponame/settings/hooks` 中調整。Webhook 也可以按照組織調整或按照全系統調整。 +所有的事件推送都是 POST 請求。此方法目前被下列服務支援: + +- Gitea (也可以是 GET 請求) +- Gogs +- Slack +- Discord +- Dingtalk +- Telegram +- Microsoft Teams +- Feishu +- Wechatwork + +### 事件資訊 + +**警告**: Payload 中的 `secret` 欄位已經在 Gitea 1.13.0 棄用,並且將在 1.14.0 移除: https://github.com/go-gitea/gitea/issues/11755 + +下面是一個將由 Gitea 發送到 Payload URL 的事件資訊的範例: + +``` +X-GitHub-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473 +X-GitHub-Event: push +X-Gogs-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473 +X-Gogs-Event: push +X-Gitea-Delivery: f6266f16-1bf3-46a5-9ea4-602e06ead473 +X-Gitea-Event: push +``` + +```json +{ + "secret": "3gEsCfjlV2ugRwgpU#w1*WaW*wa4NXgGmpCfkbG3", + "ref": "refs/heads/develop", + "before": "28e1879d029cb852e4844d9c718537df08844e03", + "after": "bffeb74224043ba2feb48d137756c8a9331c449a", + "compare_url": "http://localhost:3000/gitea/webhooks/compare/28e1879d029cb852e4844d9c718537df08844e03...bffeb74224043ba2feb48d137756c8a9331c449a", + "commits": [ + { + "id": "bffeb74224043ba2feb48d137756c8a9331c449a", + "message": "Webhooks Yay!", + "url": "http://localhost:3000/gitea/webhooks/commit/bffeb74224043ba2feb48d137756c8a9331c449a", + "author": { + "name": "Gitea", + "email": "someone@gitea.io", + "username": "gitea" + }, + "committer": { + "name": "Gitea", + "email": "someone@gitea.io", + "username": "gitea" + }, + "timestamp": "2017-03-13T13:52:11-04:00" + } + ], + "repository": { + "id": 140, + "owner": { + "id": 1, + "login": "gitea", + "full_name": "Gitea", + "email": "someone@gitea.io", + "avatar_url": "https://localhost:3000/avatars/1", + "username": "gitea" + }, + "name": "webhooks", + "full_name": "gitea/webhooks", + "description": "", + "private": false, + "fork": false, + "html_url": "http://localhost:3000/gitea/webhooks", + "ssh_url": "ssh://gitea@localhost:2222/gitea/webhooks.git", + "clone_url": "http://localhost:3000/gitea/webhooks.git", + "website": "", + "stars_count": 0, + "forks_count": 1, + "watchers_count": 1, + "open_issues_count": 7, + "default_branch": "master", + "created_at": "2017-02-26T04:29:06-05:00", + "updated_at": "2017-03-13T13:51:58-04:00" + }, + "pusher": { + "id": 1, + "login": "gitea", + "full_name": "Gitea", + "email": "someone@gitea.io", + "avatar_url": "https://localhost:3000/avatars/1", + "username": "gitea" + }, + "sender": { + "id": 1, + "login": "gitea", + "full_name": "Gitea", + "email": "someone@gitea.io", + "avatar_url": "https://localhost:3000/avatars/1", + "username": "gitea" + } +} +``` + +### 範例 + +此範例示範在發生推送事件時,如何使用 webhook 觸發 php 程式。 +使用下列參數在您的儲存庫設定 Webhook 中建立一個 Gitea webhook: + +- 目標 URL: http://mydomain.com/webhook.php +- HTTP 請求方法:POST +- POST Content Type:application/json +- Secret:123 +- 觸發條件:推送事件 +- 啟用:勾選 + +現在請到您的伺服器上建立 webhook.php 檔案 + +``` +}}) for a solution with nginx. + ## Custom Templates not loading or working incorrectly Gitea's custom templates must be added to the correct location or Gitea will not find and use them. @@ -120,13 +126,14 @@ For more information, refer to Gitea's [API docs]({{< relref "doc/developers/api There are multiple things you can combine to prevent spammers. -1. By only whitelisting certain domains with OpenID (see below) -2. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY` -3. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/usage/command-line.en-us.md" >}}), [API]({{< relref "doc/developers/api-usage.en-us.md" >}}), or Gitea's Admin UI +1. By whitelisting or blocklisting certain email domains +2. By only whitelisting certain domains with OpenID (see below) +3. Setting `ENABLE_CAPTCHA` to `true` in your `app.ini` and properly configuring `RECAPTCHA_SECRET` and `RECAPTCHA_SITEKEY` +4. Settings `DISABLE_REGISTRATION` to `true` and creating new users via the [CLI]({{< relref "doc/usage/command-line.en-us.md" >}}), [API]({{< relref "doc/developers/api-usage.en-us.md" >}}), or Gitea's Admin UI -### Only allow certain email domains +### Only allow/block certain email domains -You can configure `EMAIL_DOMAIN_WHITELIST` in your app.ini under `[service]` +You can configure `EMAIL_DOMAIN_WHITELIST` or `EMAIL_DOMAIN_BLOCKLIST` in your app.ini under `[service]` ### Only allow/block certain OpenID providers @@ -141,7 +148,7 @@ The current way to achieve this is to create/modify a user with a max repo creat Restricted users are limited to a subset of the content based on their organization/team memberships and collaborations, ignoring the public flag on organizations/repos etc.\_\_ -Example use case: A company runs a Gitea instance that requires login. Most repos are public (accessible/browseable by all co-workers). +Example use case: A company runs a Gitea instance that requires login. Most repos are public (accessible/browsable by all co-workers). At some point, a customer or third party needs access to a specific repo and only that repo. Making such a customer account restricted and granting any needed access using team membership(s) and/or collaboration(s) is a simple way to achieve that without the need to make everything private. @@ -323,7 +330,13 @@ is too small. Gitea requires that the `ROWFORMAT` for its tables is `DYNAMIC`. If you are receiving an error line containing `Error 1071: Specified key was too long; max key length is 1000 bytes...` then you are attempting to run Gitea on tables which use the ISAM engine. While this may have worked by chance in previous versions of Gitea, it has never been officially supported and -you must use InnoDB. You should run `ALTER TABLE table_name ENGINE=InnoDB;` for each table in the database. +you must use InnoDB. You should run `ALTER TABLE table_name ENGINE=InnoDB;` for each table in the database. +If you are using MySQL 5, another possible fix is +```mysql +SET GLOBAL innodb_file_format=Barracuda; +SET GLOBAL innodb_file_per_table=1; +SET GLOBAL innodb_large_prefix=1; +``` ## Why Are Emoji Broken On MySQL diff --git a/docs/content/doc/help/search.zh-tw.md b/docs/content/doc/help/search.zh-tw.md index 52fae9def..ef3c74a90 100644 --- a/docs/content/doc/help/search.zh-tw.md +++ b/docs/content/doc/help/search.zh-tw.md @@ -1,6 +1,6 @@ --- date: "2019-11-12T16:00:00+02:00" -title: "搜索" +title: "搜尋" slug: "search" weight: 4 toc: false @@ -8,7 +8,7 @@ draft: false menu: sidebar: parent: "help" - name: "搜索" + name: "搜尋" weight: 4 identifier: "search" sitemap: diff --git a/docs/content/doc/help/seek-help.en-us.md b/docs/content/doc/help/seek-help.en-us.md index 56e3eb9d8..1c01f94ae 100644 --- a/docs/content/doc/help/seek-help.en-us.md +++ b/docs/content/doc/help/seek-help.en-us.md @@ -33,4 +33,4 @@ If you found a bug, please create an [issue on GitHub](https://github.com/go-git ## Chinese Support -Support for the Chinese language is provided at [gocn.vip](https://gocn.vip/topic/gitea). +Support for the Chinese language is provided at [Our discourse](https://discourse.gitea.io/c/5-category/5). diff --git a/docs/content/doc/help/seek-help.zh-cn.md b/docs/content/doc/help/seek-help.zh-cn.md index 77973d591..33c066ff7 100644 --- a/docs/content/doc/help/seek-help.zh-cn.md +++ b/docs/content/doc/help/seek-help.zh-cn.md @@ -18,6 +18,6 @@ menu: 如果您在使用或者开发过程中遇到问题,请到以下渠道咨询: - 到[Github issue](https://github.com/go-gitea/gitea/issues)提问(因为项目维护人员来自世界各地,为保证沟通顺畅,请使用英文提问) -- 中文问题到[gocn.vip](https://gocn.vip/topic/gitea)提问 +- 中文问题到 [Gitea 论坛](https://discourse.gitea.io/c/5-category/5)提问 - 访问 [Discord server - 英文](https://discord.gg/Gitea) - 加入 QQ群 328432459 获得进一步的支持 diff --git a/docs/content/doc/help/seek-help.zh-tw.md b/docs/content/doc/help/seek-help.zh-tw.md new file mode 100644 index 000000000..0d9be5cc5 --- /dev/null +++ b/docs/content/doc/help/seek-help.zh-tw.md @@ -0,0 +1,31 @@ +--- +date: "2018-05-21T15:00:00+00:00" +title: "取得協助" +slug: "seek-help" +weight: 10 +toc: false +draft: false +menu: + sidebar: + parent: "help" + name: "取得協助" + weight: 20 + identifier: "seek-help" +--- + +# 取得協助 + +- [Discord 聊天室](https://discord.gg/Gitea) +- [Discourse 討論區](https://discourse.gitea.io/) + +**備註:** 尋求支援時,若能先備妥下列資訊將可讓提供協助的人能快速地分析您的問題: + +1. 您的 `app.ini` (必要時清除掉任何機密資訊) +2. `gitea.log` (以及任何有關的日誌檔案) + * 例:如果錯誤和資料庫相關,提供 `xorm.log` 可能會有幫助 +3. 您看到的任何錯誤訊息 +5. 儘可能地在 [try.gitea.io](https://try.gitea.io) 觸發您的問題並記下步驟,以便其他人能重現那個問題。 + * 這將讓我們更有機會快速地找出問題的根源並解決它。 + +## 錯誤回報 +如果您發現錯誤,請到 [Github 的 Issue](https://github.com/go-gitea/gitea/issues) 回報。 diff --git a/docs/content/doc/installation/from-binary.en-us.md b/docs/content/doc/installation/from-binary.en-us.md index 229a3cde4..aa075bb23 100644 --- a/docs/content/doc/installation/from-binary.en-us.md +++ b/docs/content/doc/installation/from-binary.en-us.md @@ -32,13 +32,17 @@ chmod +x gitea ``` ## Verify GPG signature -Gitea signs all binaries with a [GPG key](https://keys.openpgp.org/search?q=teabot%40gitea.io) to prevent against unwanted modification of binaries. To validate the binary, download the signature file which ends in `.asc` for the binary you downloaded and use the gpg command line tool. +Gitea signs all binaries with a [GPG key](https://keys.openpgp.org/search?q=teabot%40gitea.io) to prevent against unwanted modification of binaries. +To validate the binary, download the signature file which ends in `.asc` for the binary you downloaded and use the gpg command line tool. ```sh gpg --keyserver keys.openpgp.org --recv 7C9E68152594688862D62AF62D9AE806EC1592E2 gpg --verify gitea-{{< version >}}-linux-amd64.asc gitea-{{< version >}}-linux-amd64 ``` +Look for the text `Good signature from "Teabot "` to assert a good binary, +despite warnings like `This key is not certified with a trusted signature!`. + ## Recommended server configuration **NOTE:** Many of the following directories can be configured using [Environment Variables]({{< relref "doc/advanced/environment-variables.en-us.md" >}}) as well! @@ -79,7 +83,7 @@ chmod 770 /etc/gitea chmod 750 /etc/gitea chmod 640 /etc/gitea/app.ini ``` -If you don't want the web installer to be able to write the config file at all, it is also possible to make the config file read-only for the gitea user (owner/group `root:root`, mode `0660`), and set `INSTALL_LOCK = true`. In that case all database configuration details must be set beforehand in the config file, as well as the `SECRET_KEY` and `INTERNAL_TOKEN` values. See the [command line documentation]({{< relref "doc/usage/command-line.en-us.md" >}}) for information on using `gitea generate secret INTERNAL_TOKEN`. +If you don't want the web installer to be able to write the config file at all, it is also possible to make the config file read-only for the gitea user (owner/group `root:git`, mode `0640`), and set `INSTALL_LOCK = true`. In that case all database configuration details must be set beforehand in the config file, as well as the `SECRET_KEY` and `INTERNAL_TOKEN` values. See the [command line documentation]({{< relref "doc/usage/command-line.en-us.md" >}}) for information on using `gitea generate secret INTERNAL_TOKEN`. ### Configure Gitea's working directory diff --git a/docs/content/doc/installation/from-package.en-us.md b/docs/content/doc/installation/from-package.en-us.md index a294c9d69..e4081024b 100644 --- a/docs/content/doc/installation/from-package.en-us.md +++ b/docs/content/doc/installation/from-package.en-us.md @@ -2,7 +2,7 @@ date: "2016-12-01T16:00:00+02:00" title: "Installation from package" slug: "install-from-package" -weight: 10 +weight: 20 toc: false draft: false menu: @@ -43,6 +43,19 @@ Arch Linux ARM provides packages for [aarch64](https://archlinuxarm.org/packages pacman -S gitea ``` +## Canonical Snap + +There is a [Gitea Snap](https://snapcraft.io/gitea) package which follows the latest stable version. + +``sh +snap install gitea +`` + +## SUSE and openSUSE + +OpenSUSE build service provides packages for [openSUSE and SLE](https://software.opensuse.org/download/package?package=gitea&project=devel%3Atools%3Ascm) +in the Development Software Configuration Management Repository + ## Windows There is a [Gitea](https://chocolatey.org/packages/gitea) package for Windows by [Chocolatey](https://chocolatey.org/). @@ -87,18 +100,6 @@ is in `/usr/local/etc/rc.d/gitea`. To enable Gitea to run as a service, run `sysrc gitea_enable=YES` and start it with `service gitea start`. -## Cloudron - -Gitea is available as a 1-click install on [Cloudron](https://cloudron.io). -Cloudron makes it easy to run apps like Gitea on your server and keep them up-to-date and secure. - -[![Install](/cloudron.svg)](https://cloudron.io/button.html?app=io.gitea.cloudronapp) - -The Gitea package is maintained [here](https://git.cloudron.io/cloudron/gitea-app). - -There is a [demo instance](https://my.demo.cloudron.io) (username: cloudron password: cloudron) where -you can experiment with running Gitea. - ## Third-party Various other third-party packages of Gitea exist. diff --git a/docs/content/doc/installation/from-source.en-us.md b/docs/content/doc/installation/from-source.en-us.md index bff206a86..496111e95 100644 --- a/docs/content/doc/installation/from-source.en-us.md +++ b/docs/content/doc/installation/from-source.en-us.md @@ -54,8 +54,8 @@ git clone https://github.com/go-gitea/gitea no longer necessary.) Decide which version of Gitea to build and install. Currently, there are -multiple options to choose from. The `master` branch represents the current -development version. To build with master, skip to the [build section](#build). +multiple options to choose from. The `main` branch represents the current +development version. To build with main, skip to the [build section](#build). To work with tagged releases, the following commands can be used: @@ -89,7 +89,7 @@ To build from source, the following programs must be present on the system: - `node` {{< min-node-version >}} or higher with `npm`, see [here](https://nodejs.org/en/download/) - `make`, see here -Various [make tasks](https://github.com/go-gitea/gitea/blob/master/Makefile) +Various [make tasks](https://github.com/go-gitea/gitea/blob/main/Makefile) are provided to keep the build process as simple as possible. Depending on requirements, the following build tags can be included. @@ -186,3 +186,11 @@ CC=aarch64-unknown-linux-gnu-gcc GOOS=linux GOARCH=arm64 TAGS="bindata sqlite sq ``` Replace `CC`, `GOOS`, and `GOARCH` as appropriate for your architecture target. + +You will sometimes need to build a static compiled image. To do this you will need to add: + +``` +LDFLAGS="-linkmode external -extldflags '-static' $LDFLAGS" TAGS="netgo osusergo $TAGS" make build +``` + +This can be combined with `CC`, `GOOS`, and `GOARCH` as above. diff --git a/docs/content/doc/installation/on-cloud-provider.md b/docs/content/doc/installation/on-cloud-provider.md new file mode 100644 index 000000000..7647ae2cf --- /dev/null +++ b/docs/content/doc/installation/on-cloud-provider.md @@ -0,0 +1,50 @@ +--- +date: "2016-12-01T16:00:00+02:00" +title: "Install on Cloud Provider" +slug: "install-on-cloud-provider" +weight: 20 +toc: false +draft: false +menu: + sidebar: + parent: "installation" + name: "On cloud provider" + weight: 20 + identifier: "install-on-cloud-provider" +--- + +# Installation on Cloud Provider + +**Table of Contents** + +{{< toc >}} + +## Cloudron + +Gitea is available as a 1-click install on [Cloudron](https://cloudron.io). +Cloudron makes it easy to run apps like Gitea on your server and keep them up-to-date and secure. + +[![Install](/cloudron.svg)](https://cloudron.io/button.html?app=io.gitea.cloudronapp) + +The Gitea package is maintained [here](https://git.cloudron.io/cloudron/gitea-app). + +There is a [demo instance](https://my.demo.cloudron.io) (username: cloudron password: cloudron) where +you can experiment with running Gitea. + +## Vultr + +Gitea can found in [Vultr](https://www.vultr.com)'s marketplace. + +To deploy Gitea to Vultr, have a look at the [Vultr Marketplace](https://www.vultr.com/marketplace/apps/gitea). + +## DigitalOcean + +[DigitalOcean](https://www.digitalocean.com) has Gitea as droplet in their marketplace. + +To deploy Gitea to DigitalOcean, have a look at the [DigitalOcean Marketplace](https://marketplace.digitalocean.com/apps/gitea). + +## Linode + +[Linode](https://www.linode.com/) has Gitea as an app in their marketplace. + +To deploy Gitea to Linode, have a look at the [Linode Marketplace](https://www.linode.com/marketplace/apps/linode/gitea/). diff --git a/docs/content/doc/installation/on-kubernetes.zh-tw.md b/docs/content/doc/installation/on-kubernetes.zh-tw.md new file mode 100644 index 000000000..9add5c4ee --- /dev/null +++ b/docs/content/doc/installation/on-kubernetes.zh-tw.md @@ -0,0 +1,27 @@ +--- +date: "2020-03-19T19:27:00+02:00" +title: "在 Kubernetes 安裝" +slug: "install-on-kubernetes" +weight: 10 +toc: false +draft: false +menu: + sidebar: + parent: "installation" + name: "Kubernetes" + weight: 50 + identifier: "install-on-kubernetes" +--- + +# 使用 Helm 安裝 (在 Kubernetes) + +Gitea 提供 Helm Chart 用來安裝於 kubernetes。 + +非自訂安裝可使用下列指令: + +``` +helm repo add gitea-charts https://dl.gitea.io/charts/ +helm install gitea gitea-charts/gitea +``` + +若您想自訂安裝(包括使用 kubernetes ingress),請前往完整的 [Gitea helm chart configuration details](https://gitea.com/gitea/helm-chart/) diff --git a/docs/content/doc/installation/run-as-service-in-ubuntu.zh-tw.md b/docs/content/doc/installation/run-as-service-in-ubuntu.zh-tw.md new file mode 100644 index 000000000..2bd1f92ae --- /dev/null +++ b/docs/content/doc/installation/run-as-service-in-ubuntu.zh-tw.md @@ -0,0 +1,71 @@ +--- +date: "2017-07-21T12:00:00+02:00" +title: "在 Linux 中以服務執行" +slug: "linux-service" +weight: 10 +toc: false +draft: false +menu: + sidebar: + parent: "installation" + name: "Linux 服務" + weight: 20 + identifier: "linux-service" +--- + +### 以 Linux 服務執行 Gitea + +您可使用 systemd 或 supervisor 以服務的方式執行 Gitea。下列步驟已在 Ubuntu 16.04 中測試,但它們應該適用於所有的 Linux 發行版(只需要一些小小的調整)。 + +#### 使用 systemd + +複製範例 [gitea.service](https://github.com/go-gitea/gitea/blob/master/contrib/systemd/gitea.service) 到 `/etc/systemd/system/gitea.service` 後用您喜愛的文字編輯器開啟檔案。 + +取消註解任何需要在此系統上啟動的服務像是 MySQL。 + +修改 user, home directory 和其它必要的啟動參數。若預設埠已被占用請修改埠號或移除「-p」旗標。 + +在系統啟動時啟用並執行 Gitea: + +``` +sudo systemctl enable gitea +sudo systemctl start gitea +``` + +若您使用 systemd 220 或更新版本,您能以一行指令啟動並立即執行 Gitea: + +``` +sudo systemctl enable gitea --now +``` + +#### 使用 supervisor + +在終端機使用下列指令安裝 supervisor: + +``` +sudo apt install supervisor +``` + +為 supervisor 建立 log 資料夾: + +``` +# assuming Gitea is installed in /home/git/gitea/ +mkdir /home/git/gitea/log/supervisor +``` + +附加範例 [supervisord config](https://github.com/go-gitea/gitea/blob/master/contrib/supervisor/gitea) 的設定值到 `/etc/supervisor/supervisord.conf`。 + +用您喜愛的文字編輯器修改使用者(git)和家目錄(/home/git)設定以符合部署環境。若預設埠已被占用請修改埠號或移除「-p」旗標。 + +最後設定在系統啟動時啟用並執行 supervisor: + +``` +sudo systemctl enable supervisor +sudo systemctl start supervisor +``` + +若您使用 systemd 220 或更新版本,您能以一行指令啟動並立即執行 supervisor: + +``` +sudo systemctl enable supervisor --now +``` diff --git a/docs/content/doc/installation/windows-service.fr-fr.md b/docs/content/doc/installation/windows-service.fr-fr.md index 8a6c4f44e..df6bbdf78 100644 --- a/docs/content/doc/installation/windows-service.fr-fr.md +++ b/docs/content/doc/installation/windows-service.fr-fr.md @@ -21,9 +21,9 @@ Pour activer le service Windows Gitea, ouvrez une `cmd` en tant qu'Administrateu sc create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" ``` -N'oubliez pas de remplacer `C:\gitea` par le chemin que vous avez utilisez pour votre installation. +N'oubliez pas de remplacer `C:\gitea` par le chemin que vous avez utilisé pour votre installation. -Ensuite, ouvrez "Services Windows", puis recherchez le service `gitea`, faites un clique droit et selectionnez "Run". Si tout fonctionne, vous devriez être capable d'accèder à Gitea à l'URL `http://localhost:3000` (ou sur le port configuré si différent de 3000). +Ensuite, ouvrez "Services Windows", puis recherchez le service `gitea`, faites un clic droit et selectionnez "Run". Si tout fonctionne, vous devriez être capable d'accèder à Gitea à l'URL `http://localhost:3000` (ou sur le port configuré si différent de 3000). ## Désactiver un service Windows diff --git a/docs/content/doc/installation/windows-service.zh-tw.md b/docs/content/doc/installation/windows-service.zh-tw.md index 37b068c58..158ac56c8 100644 --- a/docs/content/doc/installation/windows-service.zh-tw.md +++ b/docs/content/doc/installation/windows-service.zh-tw.md @@ -13,22 +13,43 @@ menu: identifier: "windows-service" --- -# 註冊為 Windows 服務 +# 事前準備 -要註冊為 Windows 服務,首先要以管理者身份執行 `cmd`,跳出命令列視窗後執行底下指令: +確認您的 C:\gitea\custom\conf\app.ini 中包含: ``` -sc create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" +RUN_USER = COMPUTERNAME$ +``` + +設定 Gitea 以本地使用者身份執行。 + +請將在命令提示字元(cmd)執行 `echo %COMPUTERNAME%` 的結果輸入 `COMPUTERNAME`。若回應為 `USER-PC`,請輸入 `RUN_USER = USER-PC$` + +## 使用絕對路徑 + +如果您使用 sqlite3,修改 `PATH` 為完整路徑: + +``` +[database] +PATH = c:/gitea/data/gitea.db +``` + +# 註冊為 Windows 服務 + +要註冊為 Windows 服務,請先以系統管理員身份開啟命令提示字元,接著執行下列指令: + +``` +sc.exe create gitea start= auto binPath= "\"C:\gitea\gitea.exe\" web --config \"C:\gitea\custom\conf\app.ini\"" ``` 別忘記將 `C:\gitea` 取代為您的 Gitea 安裝路徑。 -之後打開 "Windows Services",並且搜尋服務名稱 "gitea",按右鍵選擇 "Run"。在瀏覽器打開 `http://localhost:3000` 就可以成功看到畫面 (如果修改過連接埠,請自行修正,3000 是預設值)。 +開啟 Windows 的「服務」,並且搜尋服務名稱「gitea」,按右鍵選擇「啟動」。在瀏覽器打開 `http://localhost:3000` 就可以成功看到畫面 (如果修改過連接埠,請自行修正,3000 是預設值)。 ## 刪除服務 -要刪除 Gitea 服務,請用管理者身份執行 `cmd` 並且執行底下指令: +要刪除 Gitea 服務,請用系統管理員身份開啟命令提示字元,接著執行下列指令: ``` -sc delete gitea +sc.exe delete gitea ``` diff --git a/docs/content/doc/installation/with-docker-rootless.en-us.md b/docs/content/doc/installation/with-docker-rootless.en-us.md index e13822fee..62902a886 100644 --- a/docs/content/doc/installation/with-docker-rootless.en-us.md +++ b/docs/content/doc/installation/with-docker-rootless.en-us.md @@ -32,15 +32,14 @@ image as a service. Since there is no database available, one can be initialized Create a directory for `data` and `config` then paste the following content into a file named `docker-compose.yml`. Note that the volume should be owned by the user/group with the UID/GID specified in the config file. By default Gitea in docker will use uid:1000 gid:1000. If needed you can set ownership on those folders with the command: `sudo chown 1000:1000 config/ data/` If you don't give the volume correct permissions, the container may not start. -Also be aware that the tag `:latest-rootless` will install the current development version. -For a stable release you can use `:1-rootless` or specify a certain release like `:{{< version >}}-rootless`. +For a stable release you could use `:latest-rootless`, `:1-rootless` or specify a certain release like `:{{< version >}}-rootless`, but if you'd like to use the latest development version then `:dev-rootless` would be an appropriate tag. ```yaml version: "2" services: server: - image: gitea/gitea:latest-rootless + image: gitea/gitea:{{< version >}}-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -63,7 +62,7 @@ version: "2" services: server: - image: gitea/gitea:latest-rootless + image: gitea/gitea:{{< version >}}-rootless restart: always volumes: - ./data:/var/lib/gitea @@ -87,13 +86,13 @@ version: "2" services: server: - image: gitea/gitea:latest-rootless + image: gitea/gitea:{{< version >}}-rootless + environment: -+ - DB_TYPE=mysql -+ - DB_HOST=db:3306 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__DB_TYPE=mysql ++ - GITEA__database__HOST=db:3306 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always volumes: - ./data:/var/lib/gitea @@ -107,7 +106,7 @@ services: + - db + + db: -+ image: mysql:5.7 ++ image: mysql:8 + restart: always + environment: + - MYSQL_ROOT_PASSWORD=gitea @@ -128,13 +127,13 @@ version: "2" services: server: - image: gitea/gitea:latest-rootless + image: gitea/gitea:{{< version >}}-rootless environment: -+ - DB_TYPE=postgres -+ - DB_HOST=db:5432 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__DB_TYPE=postgres ++ - GITEA__database__HOST=db:5432 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always volumes: - ./data:/var/lib/gitea @@ -148,7 +147,7 @@ services: + - db + + db: -+ image: postgres:9.6 ++ image: postgres:13 + restart: always + environment: + - POSTGRES_USER=gitea @@ -174,7 +173,7 @@ version: "2" + services: server: - image: gitea/gitea:latest-rootless + image: gitea/gitea:{{< version >}}-rootless restart: always volumes: - - ./data:/var/lib/gitea @@ -201,7 +200,7 @@ version: "2" services: server: - image: gitea/gitea:latest-rootless + image: gitea/gitea:{{< version >}}-rootless restart: always + user: 1001 volumes: @@ -233,31 +232,6 @@ favorite browser to finalize the installation. Visit http://server-ip:3000 and f installation wizard. If the database was started with the `docker-compose` setup as documented above, please note that `db` must be used as the database hostname. -## Environments variables - -You can configure some of Gitea's settings via environment variables: - -(Default values are provided in **bold**) - -* `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title. -* `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test". -* `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed clone URL in Gitea's UI. -* `SSH_PORT`: **2222**: SSH port displayed in clone URL. -* `SSH_LISTEN_PORT`: **%(SSH\_PORT)s**: Port for the built-in SSH server. -* `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. -* `HTTP_PORT`: **3000**: HTTP listen port. -* `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). -* `LFS_START_SERVER`: **false**: Enables git-lfs support. -* `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\]. -* `DB_HOST`: **localhost:3306**: Database host address and port. -* `DB_NAME`: **gitea**: Database name. -* `DB_USER`: **root**: Database username. -* `DB_PASSWD`: **"\"**: Database user password. Use \`your password\` for quoting if you use special characters in the password. -* `INSTALL_LOCK`: **false**: Disallow access to the install page. -* `SECRET_KEY`: **""**: Global secret key. This should be changed. If this has a value and `INSTALL_LOCK` is empty, `INSTALL_LOCK` will automatically set to `true`. -* `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users. -* `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page. - # Customization Customization files described [here](https://docs.gitea.io/en-us/customizing-gitea/) should @@ -287,7 +261,29 @@ docker-compose up -d - Rename folder (inside volume) gitea to custom - Edit app.ini if needed - Set START_SSH_SERVER = true -- Use image gitea/gitea:latest-rootless +- Use image gitea/gitea:{{< version >}}-rootless + +## Managing Deployments With Environment Variables + +In addition to the environment variables above, any settings in `app.ini` can be set or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. These settings are applied each time the docker container starts. Full information [here](https://github.com/go-gitea/gitea/tree/main/contrib/environment-to-ini). + +These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable an smtp mail server if the required env variables `GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host or in a `.env` file in the same directory as `docker-compose.yml`: + +```bash +... +services: + server: + environment: + - GITEA__mailer__ENABLED=true + - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} + - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} + - GITEA__mailer__IS_TLS_ENABLED=true + - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} + - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" +``` + +To set required TOKEN and SECRET values, consider using gitea's built-in [generate utility functions](https://docs.gitea.io/en-us/command-line/#generate). # SSH Container Passthrough (not tested) diff --git a/docs/content/doc/installation/with-docker.en-us.md b/docs/content/doc/installation/with-docker.en-us.md index 563e85c22..3c51852fb 100644 --- a/docs/content/doc/installation/with-docker.en-us.md +++ b/docs/content/doc/installation/with-docker.en-us.md @@ -34,8 +34,7 @@ image as a service. Since there is no database available, one can be initialized Create a directory like `gitea` and paste the following content into a file named `docker-compose.yml`. Note that the volume should be owned by the user/group with the UID/GID specified in the config file. If you don't give the volume correct permissions, the container may not start. -Also be aware that the tag `:latest` will install the current development version. -For a stable release you can use `:1` or specify a certain release like `:{{< version >}}`. +For a stable release you can use `:latest`, `:1` or specify a certain release like `:{{< version >}}`, but if you'd like to use the latest development version of Gitea then you could use the `:dev` tag. ```yaml version: "3" @@ -118,11 +117,11 @@ services: environment: - USER_UID=1000 - USER_GID=1000 -+ - DB_TYPE=mysql -+ - DB_HOST=db:3306 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__DB_TYPE=mysql ++ - GITEA__database__HOST=db:3306 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always networks: - gitea @@ -137,7 +136,7 @@ services: + - db + + db: -+ image: mysql:5.7 ++ image: mysql:8 + restart: always + environment: + - MYSQL_ROOT_PASSWORD=gitea @@ -169,11 +168,11 @@ services: environment: - USER_UID=1000 - USER_GID=1000 -+ - DB_TYPE=postgres -+ - DB_HOST=db:5432 -+ - DB_NAME=gitea -+ - DB_USER=gitea -+ - DB_PASSWD=gitea ++ - GITEA__database__DB_TYPE=postgres ++ - GITEA__database__HOST=db:5432 ++ - GITEA__database__NAME=gitea ++ - GITEA__database__USER=gitea ++ - GITEA__database__PASSWD=gitea restart: always networks: - gitea @@ -188,7 +187,7 @@ services: + - db + + db: -+ image: postgres:9.6 ++ image: postgres:13 + restart: always + environment: + - POSTGRES_USER=gitea @@ -256,31 +255,9 @@ favorite browser to finalize the installation. Visit http://server-ip:3000 and f installation wizard. If the database was started with the `docker-compose` setup as documented above, please note that `db` must be used as the database hostname. -## Environment variables +## Configure the user inside Gitea using environment variables -You can configure some of Gitea's settings via environment variables: - -(Default values are provided in **bold**) - -- `APP_NAME`: **"Gitea: Git with a cup of tea"**: Application name, used in the page title. -- `RUN_MODE`: **prod**: Application run mode, affects performance and debugging. Either "dev", "prod" or "test". -- `DOMAIN`: **localhost**: Domain name of this server, used for the displayed http clone URL in Gitea's UI. -- `SSH_DOMAIN`: **localhost**: Domain name of this server, used for the displayed ssh clone URL in Gitea's UI. If the install page is enabled, SSH Domain Server takes DOMAIN value in the form (which overwrite this setting on save). -- `SSH_PORT`: **22**: SSH port displayed in clone URL. -- `SSH_LISTEN_PORT`: **%(SSH_PORT)s**: Port for the built-in SSH server. -- `DISABLE_SSH`: **false**: Disable SSH feature when it's not available. If you want to disable SSH feature, you should set SSH port to `0` when installing Gitea. -- `HTTP_PORT`: **3000**: HTTP listen port. -- `ROOT_URL`: **""**: Overwrite the automatically generated public URL. This is useful if the internal and the external URL don't match (e.g. in Docker). -- `LFS_START_SERVER`: **false**: Enables git-lfs support. -- `DB_TYPE`: **sqlite3**: The database type in use \[mysql, postgres, mssql, sqlite3\]. -- `DB_HOST`: **localhost:3306**: Database host address and port. -- `DB_NAME`: **gitea**: Database name. -- `DB_USER`: **root**: Database username. -- `DB_PASSWD`: **"\"**: Database user password. Use \`your password\` for quoting if you use special characters in the password. -- `INSTALL_LOCK`: **false**: Disallow access to the install page. -- `SECRET_KEY`: **""**: Global secret key. This should be changed. If this has a value and `INSTALL_LOCK` is empty, `INSTALL_LOCK` will automatically set to `true`. -- `DISABLE_REGISTRATION`: **false**: Disable registration, after which only admin can create accounts for users. -- `REQUIRE_SIGNIN_VIEW`: **false**: Enable this to force users to log in to view any page. +- `USER`: **git**: The username of the user that runs Gitea within the container. - `USER_UID`: **1000**: The UID (Unix user ID) of the user that runs Gitea within the container. Match this to the UID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). - `USER_GID`: **1000**: The GID (Unix group ID) of the user that runs Gitea within the container. Match this to the GID of the owner of the `/data` volume if using host volumes (this is not necessary with named volumes). @@ -306,6 +283,28 @@ docker-compose pull docker-compose up -d ``` +## Managing Deployments With Environment Variables + +In addition to the environment variables above, any settings in `app.ini` can be set or overridden with an environment variable of the form: `GITEA__SECTION_NAME__KEY_NAME`. These settings are applied each time the docker container starts. Full information [here](https://github.com/go-gitea/gitea/tree/master/contrib/environment-to-ini). + +These environment variables can be passed to the docker container in `docker-compose.yml`. The following example will enable an smtp mail server if the required env variables `GITEA__mailer__FROM`, `GITEA__mailer__HOST`, `GITEA__mailer__PASSWD` are set on the host or in a `.env` file in the same directory as `docker-compose.yml`: + +```bash +... +services: + server: + environment: + - GITEA__mailer__ENABLED=true + - GITEA__mailer__FROM=${GITEA__mailer__FROM:?GITEA__mailer__FROM not set} + - GITEA__mailer__MAILER_TYPE=smtp + - GITEA__mailer__HOST=${GITEA__mailer__HOST:?GITEA__mailer__HOST not set} + - GITEA__mailer__IS_TLS_ENABLED=true + - GITEA__mailer__USER=${GITEA__mailer__USER:-apikey} + - GITEA__mailer__PASSWD="""${GITEA__mailer__PASSWD:?GITEA__mailer__PASSWD not set}""" +``` + +To set required TOKEN and SECRET values, consider using gitea's built-in [generate utility functions](https://docs.gitea.io/en-us/command-line/#generate). + ## SSH Container Passthrough Since SSH is running inside the container, SSH needs to be passed through from the host to the container if SSH support is desired. One option would be to run the container SSH on a non-standard port (or moving the host port to a non-standard port). Another option which might be more straightforward is to forward SSH connections from the host to the container. This setup is explained in the following. @@ -345,19 +344,23 @@ ports: - "127.0.0.1:2222:22" ``` -In addition, `/home/git/.ssh/authorized_keys` on the host needs to be modified. It needs to act in the same way as `authorized_keys` within the Gitea container. Therefore add +In addition, `/home/git/.ssh/authorized_keys` on the host needs to be modified. It needs to act in the same way as `authorized_keys` within the Gitea container. Therefore add the public key of the key you created above ("Gitea Host Key") to `~/git/.ssh/authorized_keys`. +This can be done via `echo "$(cat /home/git/.ssh/id_rsa.pub)" >> /home/git/.ssh/authorized_keys`. +Important: The pubkey from the `git` user needs to be added "as is" while all other pubkeys added via the Gitea web interface will be prefixed with `command="/app [...]`. + +The file should then look somewhat like ```bash -command="/app/gitea/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa +# SSH pubkey from git user +ssh-rsa + +# other keys from users +command="/app/gitea/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ``` -and replace `` with a valid SSH public key of yours. - -In addition the public key of the `git` user on the host needs to be added to `/home/git/.ssh/authorized_keys` so authentication against the container can succeed: `echo "$(cat /home/git/.ssh/id_rsa.pub)" >> /home/git/.ssh/authorized_keys`. - Here is a detailed explanation what is happening when a SSH request is made: -1. A SSH request is made against the host using the `git` user, e.g. `git clone git@domain:user/repo.git`. +1. A SSH request is made against the host (usually port 22) using the `git` user, e.g. `git clone git@domain:user/repo.git`. 2. In `/home/git/.ssh/authorized_keys` , the command executes the `/app/gitea/gitea` script. 3. `/app/gitea/gitea` forwards the SSH request to port 2222 which is mapped to the SSH port (22) of the container. 4. Due to the existence of the public key of the `git` user in `/home/git/.ssh/authorized_keys` the authentication host → container succeeds and the SSH request get forwarded to Gitea running in the docker container. diff --git a/docs/content/doc/installation/with-docker.zh-cn.md b/docs/content/doc/installation/with-docker.zh-cn.md index af9b0d451..f823e0d74 100644 --- a/docs/content/doc/installation/with-docker.zh-cn.md +++ b/docs/content/doc/installation/with-docker.zh-cn.md @@ -1,6 +1,6 @@ --- date: "2016-12-01T16:00:00+02:00" -title: "从Docker安装" +title: "使用 Docker 安装" slug: "install-with-docker" weight: 10 toc: false @@ -8,39 +8,338 @@ draft: false menu: sidebar: parent: "installation" - name: "从Docker安装" + name: "使用 Docker 安装" weight: 10 identifier: "install-with-docker" --- -# 从Docker安装 +# 使用 Docker 安装 -阅读本章之前我们已经假设您对docker已经有了解并能够正常使用docker。 +Gitea 在其 Docker Hub 组织内提供自动更新的 Docker 镜像。可以始终使用最新的稳定标签或使用其他服务来更新 Docker 镜像。 + +该参考设置指导用户完成基于 `docker-compose` 的设置,但是 `docker-compose` 的安装不在本文档的范围之内。要安装 `docker-compose` 本身,请遵循官方[安装说明](https://docs.docker.com/compose/install/)。 {{< toc >}} -我们在 Docker Hub 的 Gitea 组织中提供了自动更新的 Docker 镜像,它会保持最新的稳定版。你也可以用其它 Docker 服务来更新。首先你需要pull镜像: +## 基本 -``` -docker pull gitea/gitea:latest +最简单的设置只是创建一个卷和一个网络,然后将 `gitea/gitea:latest` 镜像作为服务启动。由于没有可用的数据库,因此可以使用 SQLite3 初始化数据库。创建一个类似 `gitea` 的目录,并将以下内容粘贴到名为 `docker-compose.yml` 的文件中。请注意,该卷应由配置文件中指定的 UID/GID 的用户/组拥有。如果您不授予卷正确的权限,则容器可能无法启动。另请注意,标签 `:latest` 将安装当前的开发版本。对于稳定的发行版,您可以使用 `:1` 或指定某个发行版,例如 `:1.13.0`。 + +```yaml +version: "3" + +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:{{< version >}} + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always + networks: + - gitea + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" ``` -如果要将git和其它数据持久化,你需要创建一个目录来作为数据存储的地方: +## 端口 -``` -sudo mkdir -p /var/lib/gitea +要将集成的 openSSH 守护进程和 Web 服务器绑定到其他端口,请调整端口部分。通常,只需更改主机端口,容器内的端口保持原样即可。 + +```diff +version: "3" + +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:{{< version >}} + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always + networks: + - gitea + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: +- - "3000:3000" +- - "222:22" ++ - "8080:3000" ++ - "2221:22" ``` -然后就可以运行 docker 容器了,这很简单。 当然你需要定义端口数数据目录: +## 数据库 -``` -docker run -d --name=gitea -p 10022:22 -p 10080:3000 -v /var/lib/gitea:/data gitea/gitea:latest +### MySQL 数据库 + +要将 Gitea 与 MySQL 数据库结合使用,请将这些更改应用于上面创建的 `docker-compose.yml` 文件。 + +```diff +version: "3" + +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:{{< version >}} + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 ++ - DB_TYPE=mysql ++ - DB_HOST=db:3306 ++ - DB_NAME=gitea ++ - DB_USER=gitea ++ - DB_PASSWD=gitea + restart: always + networks: + - gitea + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" ++ depends_on: ++ - db ++ ++ db: ++ image: mysql:8 ++ restart: always ++ environment: ++ - MYSQL_ROOT_PASSWORD=gitea ++ - MYSQL_USER=gitea ++ - MYSQL_PASSWORD=gitea ++ - MYSQL_DATABASE=gitea ++ networks: ++ - gitea ++ volumes: ++ - ./mysql:/var/lib/mysql ``` -然后 容器已经运行成功,在浏览器中访问 http://hostname:10080 就可以看到界面了。你可以尝试在上面创建项目,clone操作 `git clone ssh://git@hostname:10022/username/repo.git`. +### PostgreSQL 数据库 -注意:目前端口改为非3000时,需要修改配置文件 `LOCAL_ROOT_URL = http://localhost:3000/`。 +要将 Gitea 与 PostgreSQL 数据库结合使用,请将这些更改应用于上面创建的 `docker-compose.yml` 文件。 -## 需要帮助? +```diff +version: "3" -如果从本页中没有找到你需要的内容,请访问 [帮助页面]({{< relref "seek-help.zh-cn.md" >}}) +networks: + gitea: + external: false + +services: + server: + image: gitea/gitea:{{< version >}} + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 ++ - DB_TYPE=postgres ++ - DB_HOST=db:5432 ++ - DB_NAME=gitea ++ - DB_USER=gitea ++ - DB_PASSWD=gitea + restart: always + networks: + - gitea + volumes: + - ./gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" ++ depends_on: ++ - db ++ ++ db: ++ image: postgres:13 ++ restart: always ++ environment: ++ - POSTGRES_USER=gitea ++ - POSTGRES_PASSWORD=gitea ++ - POSTGRES_DB=gitea ++ networks: ++ - gitea ++ volumes: ++ - ./postgres:/var/lib/postgresql/data +``` + +## 命名卷 + +要使用命名卷而不是主机卷,请在 `docker-compose.yml` 配置中定义并使用命名卷。此更改将自动创建所需的卷。您无需担心命名卷的权限;Docker 将自动处理该问题。 + +```diff +version: "3" + +networks: + gitea: + external: false + ++volumes: ++ gitea: ++ driver: local ++ +services: + server: + image: gitea/gitea:{{< version >}} + container_name: gitea + restart: always + networks: + - gitea + volumes: +- - ./gitea:/data ++ - gitea:/data + - /etc/timezone:/etc/timezone:ro + - /etc/localtime:/etc/localtime:ro + ports: + - "3000:3000" + - "222:22" +``` + +MySQL 或 PostgreSQL 容器将需要分别创建。 + +## 启动 + +要基于 `docker-compose` 启动此设置,请执行 `docker-compose up -d`,以在后台启动 Gitea。使用 `docker-compose ps` 将显示 Gitea 是否正确启动。可以使用 `docker-compose logs` 查看日志。 + +要关闭设置,请执行 `docker-compose down`。这将停止并杀死容器。这些卷将仍然存在。 + +注意:如果在 http 上使用非 3000 端口,请更改 app.ini 以匹配 `LOCAL_ROOT_URL = http://localhost:3000/`。 + +## 安装 + +通过 `docker-compose` 启动 Docker 安装后,应该可以使用喜欢的浏览器访问 Gitea,以完成安装。访问 http://server-ip:3000 并遵循安装向导。如果数据库是通过上述 `docker-compose` 设置启动的,请注意,必须将 `db` 用作数据库主机名。 + +## 环境变量 + +您可以通过环境变量配置 Gitea 的一些设置: + +(默认值以**粗体**显示) + +- `APP_NAME`:**“Gitea: Git with a cup of tea”**:应用程序名称,在页面标题中使用。 +- `RUN_MODE`:**prod**:应用程序运行模式,会影响性能和调试。"dev","prod"或"test"。 +- `DOMAIN`:**localhost**:此服务器的域名,用于 Gitea UI 中显示的 http 克隆 URL。 +- `SSH_DOMAIN`:**localhost**:该服务器的域名,用于 Gitea UI 中显示的 ssh 克隆 URL。如果启用了安装页面,则 SSH 域服务器将采用以下形式的 DOMAIN 值(保存时将覆盖此设置)。 +- `SSH_PORT`:**22**:克隆 URL 中显示的 SSH 端口。 +- `SSH_LISTEN_PORT`:**%(SSH_PORT)s**:内置 SSH 服务器的端口。 +- `DISABLE_SSH`:**false**:如果不可用,请禁用 SSH 功能。如果要禁用 SSH 功能,则在安装 Gitea 时应将 SSH 端口设置为 `0`。 +- `HTTP_PORT`:**3000**:HTTP 监听端口。 +- `ROOT_URL`:**""**:覆盖自动生成的公共 URL。如果内部 URL 和外部 URL 不匹配(例如在 Docker 中),这很有用。 +- `LFS_START_SERVER`:**false**:启用 git-lfs 支持。 +- `DB_TYPE`:**sqlite3**:正在使用的数据库类型[mysql,postgres,mssql,sqlite3]。 +- `DB_HOST`:**localhost:3306**:数据库主机地址和端口。 +- `DB_NAME`:**gitea**:数据库名称。 +- `DB_USER`:**root**:数据库用户名。 +- `DB_PASSWD`:**"\"** :数据库用户密码。如果您在密码中使用特殊字符,请使用“您的密码”进行引用。 +- `INSTALL_LOCK`:**false**:禁止访问安装页面。 +- `SECRET_KEY`:**""** :全局密钥。这应该更改。如果它具有一个值并且 `INSTALL_LOCK` 为空,则 `INSTALL_LOCK` 将自动设置为 `true`。 +- `DISABLE_REGISTRATION`:**false**:禁用注册,之后只有管理员才能为用户创建帐户。 +- `REQUIRE_SIGNIN_VIEW`:**false**:启用此选项可强制用户登录以查看任何页面。 +- `USER_UID`:**1000**:在容器内运行 Gitea 的用户的 UID(Unix 用户 ID)。如果使用主机卷,则将其与 `/data` 卷的所有者的 UID 匹配(对于命名卷,则不需要这样做)。 +- `USER_GID`:**1000**:在容器内运行 Gitea 的用户的 GID(Unix 组 ID)。如果使用主机卷,则将其与 `/data` 卷的所有者的 GID 匹配(对于命名卷,则不需要这样做)。 + +## 自定义 + +[此处](https://docs.gitea.io/zh-cn/customizing-gitea/)描述的定制文件应放在 `/data/gitea` 目录中。如果使用主机卷,则访问这些文件非常容易;对于命名卷,可以通过另一个容器或通过直接访问 `/var/lib/docker/volumes/gitea_gitea/_data` 来完成。安装后,配置文件将保存在 `/data/gitea/conf/app.ini` 中。 + +## 升级 + +:exclamation::exclamation: **确保已将数据卷到 Docker 容器外部的某个位置** :exclamation::exclamation: + +要将安装升级到最新版本: + +```bash +# Edit `docker-compose.yml` to update the version, if you have one specified +# Pull new images +docker-compose pull +# Start a new container, automatically removes old one +docker-compose up -d +``` + +## SSH 容器直通 + +由于 SSH 在容器内运行,因此,如果需要 SSH 支持,则需要将 SSH 从主机传递到容器。一种选择是在非标准端口上运行容器 SSH(或将主机端口移至非标准端口)。另一个可能更直接的选择是将 SSH 连接从主机转发到容器。下面将说明此设置。 + +本指南假定您已经在名为 `git` 的主机上创建了一个用户,该用户与容器值 `USER_UID`/`USER_GID` 共享相同的 `UID`/`GID`。这些值可以在 `docker-compose.yml` 中设置为环境变量: + +```bash +environment: + - USER_UID=1000 + - USER_GID=1000 +``` + +接下来将主机的 `/home/git/.ssh` 装入容器。否则,SSH 身份验证将无法在容器内运行。 + +```bash +volumes: + - /home/git/.ssh/:/data/git/.ssh +``` + +现在,需要在主机上创建 SSH 密钥对。该密钥对将用于向主机验证主机上的 `git` 用户。 + +```bash +sudo -u git ssh-keygen -t rsa -b 4096 -C "Gitea Host Key" +``` + +在下一步中,需要在主机上创建一个名为 `/app/gitea/gitea` 的文件(具有可执行权限)。该文件将发出从主机到容器的 SSH 转发。将以下内容添加到 `/app/gitea/gitea`: + +```bash +ssh -p 2222 -o StrictHostKeyChecking=no git@127.0.0.1 "SSH_ORIGINAL_COMMAND=\"$SSH_ORIGINAL_COMMAND\" $0 $@" +``` + +为了使转发正常工作,需要将容器(22)的 SSH 端口映射到 `docker-compose.yml` 中的主机端口 2222。由于此端口不需要暴露给外界,因此可以将其映射到主机的 `localhost`: + +```bash +ports: + # [...] + - "127.0.0.1:2222:22" +``` + +另外,主机上的 `/home/git/.ssh/authorized_keys` 需要修改。它需要以与 Gitea 容器内的 `authorized_keys` 相同的方式进行操作。因此,将您在上面创建的密钥(“Gitea 主机密钥”)的公共密钥添加到 `~/git/.ssh/authorized_keys`。这可以通过 `echo "$(cat /home/git/.ssh/id_rsa.pub)" >> /home/git/.ssh/authorized_keys` 完成。重要提示:来自 `git` 用户的公钥需要“按原样”添加,而通过 Gitea 网络界面添加的所有其他公钥将以 `command="/app [...]` 作为前缀。 + +该文件应该看起来像: + +```bash +# SSH pubkey from git user +ssh-rsa + +# other keys from users +command="/app/gitea/gitea --config=/data/gitea/conf/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty +``` + +这是详细的说明,当发出 SSH 请求时会发生什么: + +1. 使用 `git` 用户向主机发出 SSH 请求,例如 `git clone git@domain:user/repo.git`。 +2. 在 `/home/git/.ssh/authorized_keys` 中,该命令执行 `/app/gitea/gitea` 脚本。 +3. `/app/gitea/gitea` 将 SSH 请求转发到端口 2222,该端口已映射到容器的 SSH 端口(22)。 +4. 由于 `/home/git/.ssh/authorized_keys` 中存在 `git` 用户的公钥,因此身份验证主机 → 容器成功,并且 SSH 请求转发到在 docker 容器中运行的 Gitea。 + +如果在 Gitea Web 界面中添加了新的 SSH 密钥,它将以与现有密钥相同的方式附加到 `.ssh/authorized_keys` 中。 + +**注意** + +SSH 容器直通仅在以下情况下有效 + +- 在容器中使用 `opensshd` +- 如果未将 `AuthorizedKeysCommand` 与 `SSH_CREATE_AUTHORIZED_KEYS_FILE = false` 结合使用以禁用授权文件密钥生成 +- `LOCAL_ROOT_URL` 不变 diff --git a/docs/content/doc/translation.de-de.md b/docs/content/doc/translation.de-de.md new file mode 100644 index 000000000..585783a70 --- /dev/null +++ b/docs/content/doc/translation.de-de.md @@ -0,0 +1,13 @@ +--- +date: "2021-01-22T00:00:00+02:00" +title: "Übersetzung" +slug: "translation" +weight: 35 +toc: false +draft: false +menu: + sidebar: + name: "Übersetzung" + weight: 45 + identifier: "translation" +--- diff --git a/docs/content/doc/translation.en-us.md b/docs/content/doc/translation.en-us.md new file mode 100644 index 000000000..208eb32ab --- /dev/null +++ b/docs/content/doc/translation.en-us.md @@ -0,0 +1,13 @@ +--- +date: "2021-01-22T00:00:00+02:00" +title: "Translation" +slug: "translation" +weight: 35 +toc: false +draft: false +menu: + sidebar: + name: "Translation" + weight: 45 + identifier: "translation" +--- diff --git a/docs/content/doc/translation.zh-tw.md b/docs/content/doc/translation.zh-tw.md new file mode 100644 index 000000000..ca820c093 --- /dev/null +++ b/docs/content/doc/translation.zh-tw.md @@ -0,0 +1,13 @@ +--- +date: "2021-01-22T00:00:00+02:00" +title: "翻譯" +slug: "translation" +weight: 35 +toc: false +draft: false +menu: + sidebar: + name: "翻譯" + weight: 45 + identifier: "translation" +--- diff --git a/docs/content/doc/translation/guidelines.de-de.md b/docs/content/doc/translation/guidelines.de-de.md new file mode 100644 index 000000000..9f4b84ca9 --- /dev/null +++ b/docs/content/doc/translation/guidelines.de-de.md @@ -0,0 +1,61 @@ +--- +date: "2021-01-22T00:00:00+02:00" +title: "Übersetzungs Richtlinien" +weight: 10 +toc: true +draft: false +menu: + sidebar: + parent: "translation" + name: "Übersetzungsrichtlinien" + weight: 70 + identifier: "translation-guidelines" +--- + +## Allgemeines + +Anrede: Wenig förmlich: +* "Du"-Form +* Keine "Amtsdeusch"-Umschreibungen, einfach so als ob man den Nutzer direkt persönlich ansprechen würde + +Genauer definiert: +* "falsch" anstatt "nicht korrekt/inkorrekt" +* Benutzerkonto oder Konto? Oder Account? +* "Wende dich an ..." anstatt "kontaktiere ..." +* In der selben Zeit übersetzen (sonst wird aus "is" "war") +* Richtige Anführungszeichen verwenden. Also `"` statt `''` oder `'` oder \` oder `´` + * `„` für beginnende Anführungszeichen, `“` für schließende Anführungszeichen + +Es gelten Artikel und Worttrennungen aus dem Duden. + +## Formulierungen in Modals und Buttons + +Es sollten die gleichen Formulierungen auf Buttons und Modals verwendet werden. + +Beispiel: Wenn der Button mit `löschen` beschriftet ist, sollte im Modal die Frage lauten `Willst du das wirklich löschen?` und nicht `Willst du das wirklich entfernen?`. Gleiches gilt für Success/Errormeldungen nach der Aktion. + +## Trennungen + +* Pull-Request +* Time-Tracker +* E-Mail-Adresse (siehe Duden) + +## Artikeldefinitionen für Anglizismen + +* _Der_ Commit (m.) +* _Der_ Branch (m.) +* _Das_ Issue (n.) +* _Der_ Fork (m.) +* _Das_ Repository (n.) +* _Der_ Pull-Request (m.) +* _Der_ Token (m.) +* _Das_ Review (n.) +* _Der_ Key (m.) +* _Der_ Committer (m.) + +## Weiterführende Links + +Diese beiden Links sind sehr empfehlenswert: + +* http://docs.translatehouse.org/projects/localization-guide/en/latest/guide/translation_guidelines_german.html +* https://docs.qgis.org/2.18/en/docs/documentation_guidelines/do_translations.html diff --git a/docs/content/doc/translation/guidelines.en-us.md b/docs/content/doc/translation/guidelines.en-us.md new file mode 100644 index 000000000..f99574362 --- /dev/null +++ b/docs/content/doc/translation/guidelines.en-us.md @@ -0,0 +1,17 @@ +--- +date: "2021-01-22T00:00:00+02:00" +title: "Translation Guidelines" +weight: 10 +toc: true +draft: false +menu: + sidebar: + parent: "translation" + name: "Translation Guidelines" + weight: 70 + identifier: "translation-guidelines" +--- + +This place is used to provide a common set of rules to make sure the translation is consistent. + +* [German](/de-de/übersetzungs-richtlinien/) diff --git a/docs/content/doc/upgrade/from-gogs.en-us.md b/docs/content/doc/upgrade/from-gogs.en-us.md index 794ab3e87..778c1a173 100644 --- a/docs/content/doc/upgrade/from-gogs.en-us.md +++ b/docs/content/doc/upgrade/from-gogs.en-us.md @@ -96,7 +96,7 @@ See [#4286](https://github.com/go-gitea/gitea/issues/4286). ## Add Gitea to startup on Unix -Update the appropriate file from [gitea/contrib](https://github.com/go-gitea/gitea/tree/master/contrib) +Update the appropriate file from [gitea/contrib](https://github.com/go-gitea/gitea/tree/main/contrib) with the right environment variables. For distros with systemd: diff --git a/docs/content/doc/upgrade/from-gogs.zh-tw.md b/docs/content/doc/upgrade/from-gogs.zh-tw.md index 1440fff54..793d74df8 100644 --- a/docs/content/doc/upgrade/from-gogs.zh-tw.md +++ b/docs/content/doc/upgrade/from-gogs.zh-tw.md @@ -8,19 +8,100 @@ draft: false menu: sidebar: parent: "upgrade" - name: "從 Gogs 升級" + name: "從 Gogs" weight: 10 identifier: "upgrade-from-gogs" --- # 從 Gogs 升級 -假如您正在運行 Gogs 0.9.146 以下版本,你可以很平順的升級到 Gitea,請參考底下升級步驟: +**目錄** -* 停止 Gogs 服務。 -* 複製 Gogs 設定檔 `custom/conf/app.ini` 到 Gitea 相對應位置。 -* 複製 Gogs `conf/` 目錄到 Gitea `options/` 目錄。 -* 假如您還有更多自訂的檔案在 `custom/` 目錄,像是多國語系檔案或模板,你應該手動將設定轉移到 Gitea 上,因為這些檔案在 Gitea 上有些不同。 -* 複製 `data/` 目錄到 Gitea 相對應目錄,此目錄包含 issue 附件檔及頭像。 -* 啟動 Gitea 服務 -* 進入 Gitea 管理介面,執行 `重新產生 '.ssh/authorized_keys' 檔案` (警告: 非 Gitea 金鑰將被刪除) 和 `重新產生全部倉庫 update hook` (當自訂設定檔已經被修改,則需要此步驟)。 +{{< toc >}} + +若您正在執行 Gogs 0.9.146 以下版本,您可以很簡單地遷移到 Gitea。 + +請參考下列步驟。在 Linux 系統上請以 Gogs 的使用者身份執行: + +- 使用 `gogs backup` 建立 Gogs 的備份。這會建立檔案 `gogs-backup-[timestamp].zip` 包含所有重要的 Gogs 資料。 + 如果稍後您要恢復到 `gogs` 時會用到它。 +- 從[下載頁](https://dl.gitea.io/gitea/)下載對應您平臺的檔案。請下載 `1.0.x` 版,從 `gogs` 遷移到其它版本是不可行的。 +- 將二進位檔放到適當的安裝位置。 +- 複製 `gogs/custom/conf/app.ini` 到 `gitea/custom/conf/app.ini`。 +- 從 `gogs/custom/` 複製自訂 `templates, public` 到 `gitea/custom/`。 +- `gogs/custom/conf` 中的其它自訂資料夾如: `gitignore, label, license, locale, readme`, + 請複製到 `gitea/custom/options`。 +- 複製 `gogs/data/` 到 `gitea/data/`。它包含了問題附件和大頭貼。 +- 以指令 `gitea web` 啟動 Gitea 驗證上列設定是否正確。 +- 從網頁 UI 進入 Gitea 管理員面板, 執行 `Rewrite '.ssh/authorized_keys' file`。 +- 執行每個主要版本的二進位檔 ( `1.1.4` → `1.2.3` → `1.3.4` → `1.4.2` → 等等 ) 以遷移資料庫。 +- 如果變更了自訂檔、設定檔路徑,請執行 `Rewrite all update hook of repositories`。 + +## 修改指定的 gogs 資訊 + +- 重新命名 `gogs-repositories/` 為 `gitea-repositories/` +- 重新命名 `gogs-data/` 為 `gitea-data/` +- 在 `gitea/custom/conf/app.ini` 中修改: + + 修改前: + + ```ini + [database] + PATH = /home/:USER/gogs/data/:DATABASE.db + [attachment] + PATH = /home/:USER/gogs-data/attachments + [picture] + AVATAR_UPLOAD_PATH = /home/:USER/gogs-data/avatars + [log] + ROOT_PATH = /home/:USER/gogs/log + ``` + + 修改後: + + ```ini + [database] + PATH = /home/:USER/gitea/data/:DATABASE.db + [attachment] + PATH = /home/:USER/gitea-data/attachments + [picture] + AVATAR_UPLOAD_PATH = /home/:USER/gitea-data/avatars + [log] + ROOT_PATH = /home/:USER/gitea/log + ``` + +- 執行 `gitea web` 啟動 Gitea 檢查是否正確執行 + +## 升級到最新版的 `gitea` + +成功從 `gogs` 升級到 `gitea 1.0.x` 後再用 2 個步驟即可升級到最新版的 `gitea`。 + +請先升級到 [`gitea 1.6.4`](https://dl.gitea.io/gitea/1.6.4/),先從[下載頁](https://dl.gitea.io/gitea/1.6.4/)下載 +您平臺的二進位檔取代既有的。至少執行一次 Gitea 並確認一切符合預期。 + +接著重複上述步驟,但這次請使用[最新發行版本](https://dl.gitea.io/gitea/{{< version >}}/)。 + +## 從更新版本的 Gogs 升級 + +您也可以從更新版本的 Gogs 升級,但需要更多步驟。 +請參考 [#4286](https://github.com/go-gitea/gitea/issues/4286)。 + +## 疑難排解 + +- 如果錯誤和 `gitea/custom/templates` 中 的自訂樣板有關,請試著逐一移除它們。 + 它們可能和 Gitea 或更新不相容。 + +## 在 Unix 啟動時執行 Gitea + +從 [gitea/contrib](https://github.com/go-gitea/gitea/tree/master/contrib) 更新必要的檔案以取得正確的環境變數。 + +使用 systemd 的發行版: + +- 複製新的腳本到 `/etc/systemd/system/gitea.service` +- 啟動系統時執行服務: `sudo systemctl enable gitea` +- 停用舊的 gogs 腳本: `sudo systemctl disable gogs` + +使用 SysVinit 的發行版: + +- 複製新的腳本到 `/etc/init.d/gitea` +- 啟動系統時執行服務: `sudo rc-update add gitea` +- 停用舊的 gogs 腳本: `sudo rc-update del gogs` diff --git a/docs/content/doc/usage.zh-tw.md b/docs/content/doc/usage.zh-tw.md new file mode 100644 index 000000000..b74bfe017 --- /dev/null +++ b/docs/content/doc/usage.zh-tw.md @@ -0,0 +1,13 @@ +--- +date: "2016-12-27T16:00:00+02:00" +title: "使用" +slug: "usage" +weight: 35 +toc: false +draft: false +menu: + sidebar: + name: "使用" + weight: 35 + identifier: "usage" +--- diff --git a/docs/content/doc/usage/backup-and-restore.en-us.md b/docs/content/doc/usage/backup-and-restore.en-us.md index 5e822dc05..fb0216cd1 100644 --- a/docs/content/doc/usage/backup-and-restore.en-us.md +++ b/docs/content/doc/usage/backup-and-restore.en-us.md @@ -72,15 +72,21 @@ involves moving files to their correct locations and restoring a database dump. Example: ```sh -apt-get install gitea -unzip gitea-dump-1482906742.zip -cd gitea-dump-1482906742 -mv custom/conf/app.ini /etc/gitea/conf/app.ini # or mv app.ini /etc/gitea/conf/app.ini -unzip gitea-repo.zip -mv gitea-repo/* /var/lib/gitea/repositories/ -chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea/repositories/ +unzip gitea-dump-1610949662.zip +cd gitea-dump-1610949662 +mv data/conf/app.ini /etc/gitea/conf/app.ini +mv data/* /var/lib/gitea/data/ +mv log/* /var/lib/gitea/log/ +mv repos/* /var/lib/gitea/repositories/ +chown -R gitea:gitea /etc/gitea/conf/app.ini /var/lib/gitea + +# mysql mysql --default-character-set=utf8mb4 -u$USER -p$PASS $DATABASE }} -To use Gitea's built-in Email support, update the `app.ini` config file [mailer] section: +Gitea has mailer functionality for sending transactional emails (such as registration confirmation). It can be configured to either use Sendmail (or compatible MTAs like Postfix and msmtp) or directly use SMTP server. -## Sendmail version +## Using Sendmail -Use the operating system’s sendmail command instead of SMTP. This is common on Linux servers. -Note: For use in the official Gitea Docker image, please configure with the SMTP version. +Use `sendmail` command as mailer. + +Note: For use in the official Gitea Docker image, please configure with the SMTP version (see the following section). + +Note: For Internet-facing sites consult documentation of your MTA for instructions to send emails over TLS. Also set up SPF, DMARC, and DKIM DNS records to make emails sent be accepted as legitimate by various email providers. ```ini [mailer] @@ -34,7 +37,9 @@ MAILER_TYPE = sendmail SENDMAIL_PATH = /usr/sbin/sendmail ``` -## SMTP version +## Using SMTP + +Directly use SMTP server as relay. This option is useful if you don't want to set up MTA on your instance but you have an account at email provider. ```ini [mailer] @@ -47,17 +52,19 @@ USER = gitea@mydomain.com PASSWD = `password` ``` -- Restart Gitea for the configuration changes to take effect. +Restart Gitea for the configuration changes to take effect. -- To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration. +To send a test email to validate the settings, go to Gitea > Site Administration > Configuration > SMTP Mailer Configuration. For the full list of options check the [Config Cheat Sheet]({{< relref "doc/advanced/config-cheat-sheet.en-us.md" >}}) -- Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through: - - Via the server supporting TLS through STARTTLS - usually provided on port 587. (Also known as Opportunistic TLS.) - - SMTPS connection (SMTP over transport layer security) via the default port 465. +Please note: authentication is only supported when the SMTP server communication is encrypted with TLS or `HOST=localhost`. TLS encryption can be through: + - STARTTLS (also known as Opportunistic TLS) via port 587. Initial connection is done over cleartext, but then be upgraded over TLS if the server supports it. + - SMTPS connection (SMTP over TLS) via the default port 465. Connection to the server use TLS from the beginning. - Forced SMTPS connection with `IS_TLS_ENABLED=true`. (These are both known as Implicit TLS.) -- This is due to protections imposed by the Go internal libraries against STRIPTLS attacks. +This is due to protections imposed by the Go internal libraries against STRIPTLS attacks. + +Note that Implicit TLS is recommended by [RFC8314](https://tools.ietf.org/html/rfc8314#section-3) since 2018. ### Gmail @@ -74,3 +81,4 @@ MAILER_TYPE = smtp IS_TLS_ENABLED = true HELO_HOSTNAME = example.com ``` + diff --git a/docs/content/doc/usage/fail2ban-setup.en-us.md b/docs/content/doc/usage/fail2ban-setup.en-us.md index 790d4c020..0821b23a9 100644 --- a/docs/content/doc/usage/fail2ban-setup.en-us.md +++ b/docs/content/doc/usage/fail2ban-setup.en-us.md @@ -29,22 +29,32 @@ on a bad authentication from the web or CLI using SSH or HTTP respectively: ```log 2020/10/15 16:05:09 modules/ssh/ssh.go:143:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx ``` +(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.) ```log 2020/10/15 16:05:09 modules/ssh/ssh.go:155:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx ``` +(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.) ```log 2020/10/15 16:05:09 modules/ssh/ssh.go:198:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx ``` +(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.) ```log 2020/10/15 16:05:09 modules/ssh/ssh.go:213:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx ``` +(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.) ```log 2020/10/15 16:05:09 modules/ssh/ssh.go:227:publicKeyHandler() [W] Failed authentication attempt from xxx.xxx.xxx.xxx ``` +(DEPRECATED: This may be a false positive as the user may still go on to correctly authenticate.) + +```log +2020/10/15 16:05:09 modules/ssh/ssh.go:249:sshConnectionFailed() [W] Failed authentication attempt from xxx.xxx.xxx.xxx +``` +(From 1.15 this new message will available and doesn't have any of the false positive results that above messages from publicKeyHandler do. This will only be logged if the user has completely failed authentication.) ```log 2020/10/15 16:08:44 ...s/context/context.go:204:HandleText() [E] invalid credentials from xxx.xxx.xxx.xxx @@ -98,3 +108,12 @@ this to your Nginx configuration so that IPs don't show up as 127.0.0.1: ``` proxy_set_header X-Real-IP $remote_addr; ``` + +The security options in `app.ini` need to be adjusted to allow the interpretation of the headers +as well as the list of IP addresses and networks that describe trusted proxy servers +(See the [configuration cheat sheet](https://docs.gitea.io/en-us/config-cheat-sheet/#security-security) for more information). + +``` +REVERSE_PROXY_LIMIT = 1 +REVERSE_PROXY_TRUSTED_PROXIES = 127.0.0.1/8 ; 172.17.0.0/16 for the docker default network +``` diff --git a/docs/content/doc/usage/git-lfs-support.md b/docs/content/doc/usage/git-lfs-support.md index 66e521761..a8f935de2 100644 --- a/docs/content/doc/usage/git-lfs-support.md +++ b/docs/content/doc/usage/git-lfs-support.md @@ -24,3 +24,5 @@ LFS_START_SERVER = true ; Where your lfs files reside, default is data/lfs. LFS_CONTENT_PATH = /home/gitea/data/lfs ``` + +**Note**: LFS server support needs at least Git v2.1.2 installed on the server diff --git a/docs/content/doc/usage/pull-request.zh-tw.md b/docs/content/doc/usage/pull-request.zh-tw.md new file mode 100644 index 000000000..ee09e1893 --- /dev/null +++ b/docs/content/doc/usage/pull-request.zh-tw.md @@ -0,0 +1,32 @@ +--- +date: "2018-06-01T19:00:00+02:00" +title: "使用: 合併請求" +slug: "pull-request" +weight: 13 +toc: false +draft: false +menu: + sidebar: + parent: "usage" + name: "合併請求" + weight: 13 + identifier: "pull-request" +--- + +# 合併請求 + +## 「還在進行中(WIP)」的合併請求 + +將合併請求標記為還在進行中(Work In Progress, WIP)可避免意外地被合併。 +要將合併請求標記為還在進行中請在標題中使用 `WIP:` 或 `[WIP]` 前綴(不分大小寫)。這些值可在您的 `app.ini` 中設定: + +```ini +[repository.pull-request] +WORK_IN_PROGRESS_PREFIXES=WIP:,[WIP] +``` + +網頁提示會使用第一個值作為範例。 + +## 合併請求範本 + +您可以在[問題與合併請求範本](../issue-pull-request-templates)找到更多關於合併請求範本的資訊。 diff --git a/docs/content/doc/usage/push-options.zh-tw.md b/docs/content/doc/usage/push-options.zh-tw.md new file mode 100644 index 000000000..b0fc75ac2 --- /dev/null +++ b/docs/content/doc/usage/push-options.zh-tw.md @@ -0,0 +1,31 @@ +--- +date: "2020-07-06T16:00:00+02:00" +title: "使用: Push Options" +slug: "push-options" +weight: 15 +toc: false +draft: false +menu: + sidebar: + parent: "usage" + name: "Push Options" + weight: 15 + identifier: "push-options" +--- + +# Push Options + +Gitea 從 `1.13` 版開始支援某些 [push options](https://git-scm.com/docs/git-push#Documentation/git-push.txt--oltoptiongt) +。 + +## 支援的 Options + +- `repo.private` (true|false) - 修改儲存庫的可見性。 + 與 push-to-create 一起使用時特別有用。 +- `repo.template` (true|false) - 修改儲存庫是否為範本儲存庫。 + +以下範例修改儲存庫的可見性為公開: + +```shell +git push -o repo.private=false -u origin master +``` diff --git a/docs/content/doc/usage/reverse-proxies.en-us.md b/docs/content/doc/usage/reverse-proxies.en-us.md index 74e39039d..5f1e6685e 100644 --- a/docs/content/doc/usage/reverse-proxies.en-us.md +++ b/docs/content/doc/usage/reverse-proxies.en-us.md @@ -120,6 +120,14 @@ server { } ``` +## Resolving Error: 413 Request Entity Too Large + +This error indicates nginx is configured to restrict the file upload size. + +In your nginx config file containing your Gitea proxy directive, find the `location { ... }` block for Gitea and add the line +`client_max_body_size 16M;` to set this limit to 16 megabytes or any other number of choice. + + ## Apache HTTPD If you want Apache HTTPD to serve your Gitea instance, you can add the following to your Apache HTTPD configuration (usually located at `/etc/apache2/httpd.conf` in Ubuntu): @@ -221,12 +229,28 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a ```xml + + + + + + + + + + + + + + + + - + - + @@ -255,6 +279,16 @@ If you wish to run Gitea with IIS. You will need to setup IIS with URL Rewrite a + + + + + + + + + ``` diff --git a/docs/content/page/index.de-de.md b/docs/content/page/index.de-de.md new file mode 100644 index 000000000..7b3454976 --- /dev/null +++ b/docs/content/page/index.de-de.md @@ -0,0 +1,36 @@ +--- +date: "2016-11-08T16:00:00+02:00" +title: "Dokumentation" +slug: "documentation" +url: "/de-de/" +weight: 10 +toc: false +draft: false +--- + +# Was ist Gitea? + +Gitea ist ein einfacher, selbst gehosteter Git-Service. Änlich wie GitHub, Bitbucket oder GitLab. +Gitea ist ein [Gogs](http://gogs.io)-Fork. + +## Ziele + + * Einfach zu installieren + * Plattformübergreifend + * Leichtgewichtig + * Quelloffen + +## System Voraussetzungen + +- A Raspberry Pi 3 is powerful enough to run Gitea for small workloads. +- 2 CPU cores and 1GB RAM is typically sufficient for small teams/projects. +- Gitea should be run with a dedicated non-root system account on UNIX-type systems. + - Note: Gitea manages the `~/.ssh/authorized_keys` file. Running Gitea as a regular user could break that user's ability to log in. +- [Git](https://git-scm.com/) version 1.7.2 or later is required. Version 1.9.0 or later is recommended. Also please note: + - Git [large file storage](https://git-lfs.github.com/) will be available if enabled when git >= 2.1.2. + - Git commit-graph rendering will be enabled automatically when git >= 2.18. + +## Browser Unterstützung + +- Letzten 2 Versions von Chrome, Firefox, Safari und Edge +- Firefox ESR diff --git a/docs/content/page/index.en-us.md b/docs/content/page/index.en-us.md index d190b20ae..a5204e17d 100644 --- a/docs/content/page/index.en-us.md +++ b/docs/content/page/index.en-us.md @@ -117,7 +117,7 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others. - Configuration viewer - Everything in config file - System notices - - When somthing unexpected happens + - When something unexpected happens - Monitoring - Current processes - Cron jobs @@ -155,7 +155,7 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others. - Libravatar - Custom - Password - - Mutiple email addresses + - Multiple email addresses - SSH Keys - Connected applications - Two factor authentication @@ -262,12 +262,12 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others. ## Browser Support -- Last 2 versions of Chrome, Firefox, Safari, Edge (EdgeHTML) and Edge (Chromium) +- Last 2 versions of Chrome, Firefox, Safari and Edge - Firefox ESR ## Components -* Web framework: [Macaron](http://go-macaron.com/) +* Web framework: [Chi](http://github.com/go-chi/chi) * ORM: [XORM](https://xorm.io) * UI components: * [Semantic UI](http://semantic-ui.com/) diff --git a/docs/content/page/index.fr-fr.md b/docs/content/page/index.fr-fr.md index 4bbf08c4d..17e22e8b5 100755 --- a/docs/content/page/index.fr-fr.md +++ b/docs/content/page/index.fr-fr.md @@ -254,7 +254,7 @@ Le but de ce projet est de fournir de la manière la plus simple, la plus rapide ## Composants -* Framework web : [Macaron](http://go-macaron.com/) +* Framework web : [Chi](http://github.com/go-chi/chi) * ORM: [XORM](https://xorm.io) * Interface graphique : * [Semantic UI](http://semantic-ui.com/) diff --git a/docs/content/page/index.zh-cn.md b/docs/content/page/index.zh-cn.md index 453715a84..cb6a1da79 100644 --- a/docs/content/page/index.zh-cn.md +++ b/docs/content/page/index.zh-cn.md @@ -47,7 +47,7 @@ Gitea的首要目标是创建一个极易安装,运行非常快速,安装和 ## 组件 -* Web框架: [Macaron](http://go-macaron.com/) +* Web框架: [Chi](http://github.com/go-chi/chi) * ORM: [XORM](https://xorm.io) * UI组件: * [Semantic UI](http://semantic-ui.com/) diff --git a/docs/content/page/index.zh-tw.md b/docs/content/page/index.zh-tw.md index 4c7979f41..488dac16a 100644 --- a/docs/content/page/index.zh-tw.md +++ b/docs/content/page/index.zh-tw.md @@ -10,57 +10,280 @@ draft: false # 關於 Gitea -Gitea 是一個可自行託管的 Git 服務。你可以拿 GitHub、Bitbucket 或 Gitlab 來比較看看。初期是從 [Gogs](http://gogs.io) 發展而來,不過我們已經 Fork 並且命名為 Gitea。如果您想更深入了解 Fork 原因,請直接參考[這裡](https://blog.gitea.io/2016/12/welcome-to-gitea/)。 +Gitea 是一個可自行託管的 Git 服務。你可以拿 GitHub、Bitbucket 或 Gitlab 來比較看看。 +Gitea 是從 [Gogs](http://gogs.io) Fork 出來的,請閱讀部落格文章 [Gitea 公告](https://blog.gitea.io/2016/12/welcome-to-gitea/)以了解我們 Fork 的理由。 ## 目標 -Gitea 的首要目標是建立一個容易安裝,運行快速,安装和使用體驗良好的自建 Git 服務。我們採用 GO 為後端語言,Go 可以產生各平台使用的執行檔。除了支援 Linux、macOS 和 Windows 外,甚至還包含 ARM 和 PowerPC。 +本專案的首要目標是建立一個容易安裝,執行快速,安装和使用體驗良好的自建 Git 服務。我們採用 GO 為後端語言,Go 可以產生各平台使用的執行檔。它支援 Linux、macOS 和 Windows 外,處理器架構包含 amd64、i386、ARM 和 PowerPC 等。 ## 功能 -- 支援個人活動時間表 -- 支援 SSH 和 HTTP/HTTPS 協定 -- 支援 SMTP/LDAP/Reverse 代理認證 -- 支援反向代理子路徑 -- 支援帳號/組織/儲存庫管理 -- 支援新增/刪除儲存庫合作帳號 -- 支援儲存庫/組織 webhooks (包含 Slack) -- 支援儲存庫 Git hooks/部署金鑰 -- 支援儲存庫問題列表 (issues), 合併請求 (pull requests) 及 wiki -- 支援遷移及複製儲存庫及 wiki -- 支援線上編輯儲存庫檔案及 wiki -- 支援自訂來源 Gravatar 及 Federated avatar -- 支援郵件服務 -- 支援後台管理 -- 支援 MySQL, PostgreSQL, SQLite3, MSSQL 和 [TiDB](https://github.com/pingcap/tidb) (實驗性) -- 支援多國語言 ([21 國語言](https://github.com/go-gitea/gitea/tree/master/options/locale)) +- 使用者面板 + - 內容切換(組織或目前使用者) + - 動態時間軸 + - 提交 + - 問題 + - 合併請求 + - 儲存庫的建立 + - 可搜尋的儲存庫清單 + - 組織清單 + - 鏡像儲存庫清單 +- 問題面板 + - 內容切換(組織或目前使用者) + - 篩選器 + - 開放中 + - 已關閉 + - 您的儲存庫 + - 被指派的問題 + - 您的問題 + - 儲存庫 + - 排序 + - 最舊 + - 最近更新 + - 留言數量 +- 合併請求面板 + - 和問題面板相同 +- 儲存庫類型 + - 鏡像 + - 一般 + - 已遷移 +- 通知(email 和網頁) + - 已讀 + - 未讀 + - 釘選 +- 探索頁面 + - 使用者 + - 儲存庫 + - 組織 + - 搜尋 +- 自訂範本 +- 複寫 public 檔案(logo, css 等) +- CSRF 與 XSS 保護 +- 支援 HTTPS +- 設定允許上傳的檔案大小和類型 +- 日誌 +- 組態 + - 資料庫 + - MySQL + - PostgreSQL + - SQLite3 + - MSSQL + - TiDB(實驗中, 不建議使用) + - 設定檔 + - [app.ini](https://github.com/go-gitea/gitea/blob/master/custom/conf/app.example.ini) + - 管理員面板 + - 系統摘要 + - 維護操作 + - 刪除未啟用帳戶 + - 刪除快取的儲存庫存檔 + - 刪除遺失 Git 檔案的儲存庫 + - 對儲存庫進行垃圾回收 + - 重寫 SSH 金鑰 + - 重新同步 hooks + - 重新建立遺失的儲存庫 + - 伺服器狀態 + - 執行時間 + - 記憶體 + - 目前的 Goroutines 數量 + - 還有更多…… + - 使用者管理 + - 搜尋 + - 排序 + - 最後登入時間 + - 認證來源 + - 儲存庫上限 + - 停用帳戶 + - 管理員權限 + - 建立 Git Hook 的權限 + - 建立組織的權限 + - 匯入儲存庫的權限 + - 組織管理 + - 成員 + - 團隊 + - 大頭貼 + - Hook + - 儲存庫管理 + - 查看所有儲存庫資訊和管理儲存庫 + - 認證來源 + - OAuth + - PAM + - LDAP + - SMTP + - 組態檢視器 + - 所有設定檔中的值 + - 系統提示 + - 當有未預期的事情發生時 + - 應用監控面板 + - 目前的處理程序 + - Cron 任務 + - 更新鏡像 + - 儲存庫健康檢查 + - 檢查儲存庫的統計資料 + - 刪除舊的儲存庫存檔 + - 環境變數 + - 命令列選項 +- 支援多國語言 ([21 種語言](https://github.com/go-gitea/gitea/tree/master/options/locale)) +- 支援 [Mermaid](https://mermaidjs.github.io/) 圖表 +- 郵件服務 + - 通知 + - 確認註冊 + - 重設密碼 +- 支援反向代理(Reverse Proxy) + - 包含子路徑 +- 使用者 + + - 個人資料 + - 姓名 + - 帳號 + - 電子信箱 + - 網站 + - 加入日期 + - 追蹤者和追蹤中 + - 組織 + - 儲存庫 + - 動態 + - 已加星號的儲存庫 + - 設定 + - 和個人資料相同並包含下列功能 + - 隱藏電子信箱 + - 大頭貼 + - Gravatar + - Libravatar + - 自訂 + - 密碼 + - 多個電子信箱 + - SSH 金鑰 + - 已連結的應用程式 + - 兩步驟驗證 + - 已連結 OAuth2 來源 + - 刪除帳戶 + +- 儲存庫 + - 以 SSH/HTTP/HTTPS Clone + - Git LFS + - 關注、星號、Fork + - 檢視關注、已加星號、Fork 的使用者 + - 程式碼 + - 瀏覽分支 + - 從網頁上傳和建立檔案 + - Clone url + - 下載 + - ZIP + - TAR.GZ + - 網頁程式碼編輯器 + - Markdown 編輯器 + - 文本編輯器 + - 語法高亮 + - 預覽差異 + - 預覽 + - 選擇提交目標分支 + - 檢視檔案歷史 + - 刪除檔案 + - 檢視 raw + - 問題 + - 問題範本 + - 里程碑 + - 標籤 + - 指派問題 + - 時間追蹤 + - 表情反應 + - 篩選器 + - 開放中 + - 已關閉 + - 被指派的人 + - 您的問題 + - 提及您 + - 排序 + - 最舊 + - 最近更新 + - 留言數量 + - 搜尋 + - 留言 + - 附件 + - 合併請求 + - 功能和問題相同 + - 提交 + - 提交線圖 + - 不同分支的提交 + - 搜尋 + - 在所有分支中搜尋 + - 檢視差異(diff) + - 檢視 SHA + - 檢視作者(author) + - 瀏覽提交中的檔案 + - 版本發佈 + - 附件 + - 標題 + - 內容 + - 刪除 + - 標記為 pre-release + - 選擇分支 + - Wiki + - 匯入 + - Markdown 編輯器 + - 設定 + - 選項 + - 名稱 + - 描述 + - 私有/公開 + - 網站 + - Wiki + - 開啟/關閉 + - 內部/外部 + - 問題 + - 開啟/關閉 + - 內部/外部 + - 外部問題追蹤器支援 URL 重寫(URL Rewrite)以獲得更好的整合性 + - 開啟/關閉合併請求 + - 轉移儲存庫所有權 + - 刪除 wiki + - 刪除儲存庫 + - 協作者 + - 讀取/寫入/管理員 + - 分支 + - 預設分支 + - 分支保護 + - Webhook + - Git hook + - 部署金鑰 ## 系統需求 -- 最低的系統需求就是一片便宜的樹莓派 (Raspberry Pi)。 -- 如果用於團隊,建議使用 2 核 CPU 和 1GB 記憶體。 +- Raspberry Pi 3 的效能足夠讓 Gitea 承擔小型工作負載。 +- 雙核心 CPU 和 1GB 記憶體通常足以應付小型團隊/專案。 +- 在類 UNIX 系統上, 應該以專用的非 root 系統帳號來執行 Gitea。 + - 備註:Gitea 管理著 `~/.ssh/authorized_keys` 檔案。以一般身份使用者執行 Gitea 可能會破壞該使用者的登入能力。 + +- [Git](https://git-scm.com/) 的最低需求為 1.7.2 或更新版本。建議使用 1.9.0 或更新版本。並請留意: + - 當 git 版本 >= 2.1.2 時,可啟用 Git [large file storage](https://git-lfs.github.com/)。 + - 當 git 版本 >= 2.18 時,將自動啟用 Git 提交線圖渲染。 ## 瀏覽器支援 -- 請參考 [Semantic UI](https://github.com/Semantic-Org/Semantic-UI#browser-support) 所支援的瀏覽器列表。 -- 官方支援最小 UI 尺寸為 **1024*768**, UI 在更小尺寸也看起來不錯,但是我們並不保證。 +- 最近 2 個版本的 Chrome, Firefox, Safari, Edge +- Firefox ESR ## 元件 -* Web 框架: [Macaron](http://go-macaron.com/) -* ORM: [XORM](https://xorm.io) -* UI 元件: - * [Semantic UI](http://semantic-ui.com/) - * [GitHub Octicons](https://octicons.github.com/) - * [Font Awesome](http://fontawesome.io/) - * [DropzoneJS](http://www.dropzonejs.com/) - * [Highlight](https://highlightjs.org/) - * [Clipboard](https://zenorocha.github.io/clipboard.js/) - * [CodeMirror](https://codemirror.net/) - * [jQuery MiniColors](https://github.com/claviska/jquery-minicolors) -* 資料庫: - * [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) - * [github.com/lib/pq](https://github.com/lib/pq) - * [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) - * [github.com/pingcap/tidb](https://github.com/pingcap/tidb) - * [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) +- Web 框架: [Chi](http://github.com/go-chi/chi) +- ORM: [XORM](https://xorm.io) +- UI 元件: + - [Semantic UI](http://semantic-ui.com/) + - [GitHub Octicons](https://octicons.github.com/) + - [Font Awesome](http://fontawesome.io/) + - [DropzoneJS](http://www.dropzonejs.com/) + - [Highlight](https://highlightjs.org/) + - [Clipboard](https://zenorocha.github.io/clipboard.js/) + - [CodeMirror](https://codemirror.net/) + - [jQuery MiniColors](https://github.com/claviska/jquery-minicolors) +- 資料庫驅動程式: + - [github.com/go-sql-driver/mysql](https://github.com/go-sql-driver/mysql) + - [github.com/lib/pq](https://github.com/lib/pq) + - [github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3) + - [github.com/pingcap/tidb](https://github.com/pingcap/tidb) + - [github.com/denisenkom/go-mssqldb](https://github.com/denisenkom/go-mssqldb) + +## 軟體和服務支援 + +- [Drone](https://github.com/drone/drone) (CI) diff --git a/go.mod b/go.mod index b736a7302..ed557a30a 100644 --- a/go.mod +++ b/go.mod @@ -1,130 +1,147 @@ module code.gitea.io/gitea -go 1.14 +go 1.16 require ( + cloud.google.com/go v0.78.0 // indirect code.gitea.io/gitea-vet v0.2.1 - code.gitea.io/sdk/gitea v0.13.1 + code.gitea.io/sdk/gitea v0.14.0 + gitea.com/go-chi/binding v0.0.0-20210301195521-1fe1c9a555e7 + gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e + gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e gitea.com/go-chi/session v0.0.0-20210108030337-0cb48c5ba8ee - gitea.com/lunny/levelqueue v0.3.0 - gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b - gitea.com/macaron/cache v0.0.0-20200924044943-905232fba10b - gitea.com/macaron/captcha v0.0.0-20200825161008-e8597820aaca - gitea.com/macaron/cors v0.0.0-20190826180238-95aec09ea8b4 - gitea.com/macaron/csrf v0.0.0-20190822024205-3dc5a4474439 - gitea.com/macaron/gzip v0.0.0-20200827120000-efa5e8477cf5 - gitea.com/macaron/i18n v0.0.0-20200911004404-4ca3dd0cbd60 - gitea.com/macaron/inject v0.0.0-20190805023432-d4c86e31027a - gitea.com/macaron/macaron v1.5.1-0.20201027213641-0db5d4584804 - gitea.com/macaron/session v0.0.0-20201103015045-a177a2701dee - gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7 - github.com/PuerkitoBio/goquery v1.5.1 - github.com/RoaringBitmap/roaring v0.5.5 // indirect - github.com/alecthomas/chroma v0.8.2 - github.com/andybalholm/brotli v1.0.1 // indirect - github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be // indirect - github.com/blevesearch/bleve v1.0.14 - github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect - github.com/denisenkom/go-mssqldb v0.9.0 - github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/dlclark/regexp2 v1.4.0 // indirect + gitea.com/lunny/levelqueue v0.4.1 + github.com/Microsoft/go-winio v0.5.0 // indirect + github.com/NYTimes/gziphandler v1.1.1 + github.com/ProtonMail/go-crypto v0.0.0-20210705153151-cc34b1f6908b // indirect + github.com/PuerkitoBio/goquery v1.7.0 + github.com/RoaringBitmap/roaring v0.9.1 // indirect + github.com/alecthomas/chroma v0.9.2 + github.com/andybalholm/brotli v1.0.3 // indirect + github.com/andybalholm/cascadia v1.2.0 // indirect + github.com/blevesearch/bleve/v2 v2.0.6 + github.com/boombuler/barcode v1.0.1 // indirect + github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b // indirect + github.com/caddyserver/certmagic v0.14.1 + github.com/chi-middleware/proxy v1.1.1 + github.com/couchbase/go-couchbase v0.0.0-20210224140812-5740cd35f448 // indirect + github.com/couchbase/gomemcached v0.1.2 // indirect + github.com/couchbase/goutils v0.0.0-20210118111533-e33d3ffb5401 // indirect + github.com/denisenkom/go-mssqldb v0.10.0 + github.com/djherbis/buffer v1.2.0 + github.com/djherbis/nio/v3 v3.0.1 github.com/dustin/go-humanize v1.0.0 - github.com/editorconfig/editorconfig-core-go/v2 v2.3.9 + github.com/editorconfig/editorconfig-core-go/v2 v2.4.2 github.com/emirpasic/gods v1.12.0 - github.com/ethantkoenig/rupture v0.0.0-20181029165146-c3b3b810dc77 - github.com/gliderlabs/ssh v0.3.1 - github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a // indirect - github.com/go-chi/chi v1.5.1 - github.com/go-enry/go-enry/v2 v2.6.0 - github.com/go-git/go-billy/v5 v5.0.0 - github.com/go-git/go-git/v5 v5.2.0 - github.com/go-ldap/ldap/v3 v3.2.4 - github.com/go-redis/redis/v7 v7.4.0 - github.com/go-sql-driver/mysql v1.5.0 - github.com/go-swagger/go-swagger v0.25.0 - github.com/go-testfixtures/testfixtures/v3 v3.4.1 + github.com/ethantkoenig/rupture v1.0.0 + github.com/gliderlabs/ssh v0.3.3 + github.com/go-asn1-ber/asn1-ber v1.5.3 // indirect + github.com/go-chi/chi v1.5.4 + github.com/go-chi/cors v1.2.0 + github.com/go-enry/go-enry/v2 v2.7.1 + github.com/go-git/go-billy/v5 v5.3.1 + github.com/go-git/go-git/v5 v5.4.3-0.20210630082519-b4368b2a2ca4 + github.com/go-ldap/ldap/v3 v3.3.0 + github.com/go-redis/redis/v8 v8.11.0 + github.com/go-sql-driver/mysql v1.6.0 + github.com/go-swagger/go-swagger v0.27.0 + github.com/go-testfixtures/testfixtures/v3 v3.6.1 github.com/gobwas/glob v0.2.3 github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28 github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14 - github.com/google/go-github/v32 v32.1.0 - github.com/google/uuid v1.1.2 + github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 + github.com/golang-jwt/jwt v3.2.2+incompatible + github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-github/v37 v37.0.0 + github.com/google/go-querystring v1.1.0 // indirect + github.com/google/uuid v1.2.0 github.com/gorilla/context v1.1.1 - github.com/hashicorp/go-retryablehttp v0.6.8 // indirect - github.com/hashicorp/go-version v1.2.1 + github.com/gorilla/mux v1.8.0 // indirect + github.com/gorilla/sessions v1.2.1 // indirect + github.com/hashicorp/go-cleanhttp v0.5.2 // indirect + github.com/hashicorp/go-retryablehttp v0.7.0 // indirect + github.com/hashicorp/go-version v1.3.1 + github.com/hashicorp/golang-lru v0.5.4 github.com/huandu/xstrings v1.3.2 - github.com/imdario/mergo v0.3.11 // indirect - github.com/issue9/assert v1.3.2 // indirect - github.com/issue9/identicon v1.0.1 + github.com/issue9/identicon v1.2.0 github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 + github.com/json-iterator/go v1.1.11 github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 + github.com/kevinburke/ssh_config v1.1.0 // indirect github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4 - github.com/klauspost/compress v1.11.3 + github.com/klauspost/compress v1.13.1 + github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/klauspost/pgzip v1.2.5 // indirect - github.com/lafriks/xormstore v1.3.2 - github.com/lib/pq v1.8.1-0.20200908161135-083382b7e6fc + github.com/lafriks/xormstore v1.4.0 + github.com/lib/pq v1.10.2 github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96 - github.com/markbates/goth v1.65.0 - github.com/mattn/go-colorable v0.1.7 // indirect - github.com/mattn/go-isatty v0.0.12 - github.com/mattn/go-runewidth v0.0.9 // indirect - github.com/mattn/go-sqlite3 v1.14.4 - github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 - github.com/mgechev/revive v1.0.3-0.20200921231451-246eac737dc7 + github.com/markbates/goth v1.68.0 + github.com/mattn/go-isatty v0.0.13 + github.com/mattn/go-runewidth v0.0.13 // indirect + github.com/mattn/go-sqlite3 v1.14.8 github.com/mholt/archiver/v3 v3.5.0 - github.com/microcosm-cc/bluemonday v1.0.4 - github.com/minio/minio-go/v7 v7.0.6 - github.com/mitchellh/go-homedir v1.1.0 - github.com/msteinert/pam v0.0.0-20200810204841-913b8f8cdf8b + github.com/microcosm-cc/bluemonday v1.0.15 + github.com/miekg/dns v1.1.43 // indirect + github.com/minio/md5-simd v1.1.2 // indirect + github.com/minio/minio-go/v7 v7.0.12 + github.com/minio/sha256-simd v1.0.0 // indirect + github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect + github.com/msteinert/pam v0.0.0-20201130170657-e61372126161 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 - github.com/niklasfasching/go-org v1.3.2 + github.com/niklasfasching/go-org v1.5.0 + github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/oliamb/cutter v0.2.2 - github.com/olivere/elastic/v7 v7.0.21 - github.com/pelletier/go-toml v1.8.1 - github.com/pierrec/lz4/v4 v4.1.1 // indirect + github.com/olivere/elastic/v7 v7.0.25 + github.com/pelletier/go-toml v1.9.0 // indirect + github.com/pierrec/lz4/v4 v4.1.8 // indirect github.com/pkg/errors v0.9.1 - github.com/pquerna/otp v1.2.0 - github.com/prometheus/client_golang v1.8.0 + github.com/pquerna/otp v1.3.0 + github.com/prometheus/client_golang v1.11.0 github.com/quasoft/websspi v1.0.0 - github.com/sergi/go-diff v1.1.0 + github.com/rs/xid v1.3.0 // indirect + github.com/russross/blackfriday/v2 v2.1.0 // indirect + github.com/sergi/go-diff v1.2.0 github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 - github.com/spf13/viper v1.7.1 // indirect github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect - github.com/stretchr/testify v1.6.1 + github.com/stretchr/testify v1.7.0 github.com/syndtr/goleveldb v1.0.0 - github.com/tinylib/msgp v1.1.5 // indirect github.com/tstranex/u2f v1.0.0 - github.com/ulikunitz/xz v0.5.8 // indirect + github.com/ulikunitz/xz v0.5.10 // indirect github.com/unknwon/com v1.0.1 - github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c + github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44 github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae - github.com/unrolled/render v1.0.3 + github.com/unrolled/render v1.4.0 github.com/urfave/cli v1.22.5 - github.com/willf/bitset v1.1.11 // indirect - github.com/xanzy/go-gitlab v0.39.0 + github.com/xanzy/go-gitlab v0.50.1 github.com/yohcop/openid-go v1.0.0 - github.com/yuin/goldmark v1.2.1 - github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691 + github.com/yuin/goldmark v1.4.0 + github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01 github.com/yuin/goldmark-meta v1.0.0 + go.etcd.io/bbolt v1.3.6 // indirect go.jolheiser.com/hcaptcha v0.0.4 go.jolheiser.com/pwn v0.0.3 - golang.org/x/crypto v0.0.0-20201217014255-9d1352758620 - golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 - golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 - golang.org/x/sys v0.0.0-20201211090839-8ad439b19e0f - golang.org/x/text v0.3.4 - golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e // indirect - golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9 + go.uber.org/atomic v1.9.0 // indirect + go.uber.org/multierr v1.7.0 // indirect + go.uber.org/zap v1.19.0 // indirect + golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 + golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d + golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 + golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf + golang.org/x/text v0.3.7 + golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 // indirect + golang.org/x/tools v0.1.0 + google.golang.org/protobuf v1.27.1 // indirect gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc // indirect gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df gopkg.in/ini.v1 v1.62.0 - gopkg.in/yaml.v2 v2.3.0 + gopkg.in/yaml.v2 v2.4.0 mvdan.cc/xurls/v2 v2.2.0 strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 - xorm.io/builder v0.3.7 - xorm.io/xorm v1.0.6 + xorm.io/builder v0.3.9 + xorm.io/xorm v1.2.2 ) -replace github.com/hashicorp/go-version => github.com/6543/go-version v1.2.4 +replace github.com/hashicorp/go-version => github.com/6543/go-version v1.3.1 -replace github.com/microcosm-cc/bluemonday => github.com/lunny/bluemonday v1.0.5-0.20201227154428-ca34796141e8 +replace github.com/golang-jwt/jwt v3.2.1+incompatible => github.com/golang-jwt/jwt v3.2.2+incompatible diff --git a/go.sum b/go.sum index d90bdc20b..a76bfc8a4 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,9 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= -cloud.google.com/go v0.37.4/go.mod h1:NHPJ89PdicEuT9hdPXMROBD91xc5uRDxsMtSB16k7hw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= -cloud.google.com/go v0.46.3 h1:AVXDdKsrtX33oR9fbCMu/+c1o8Ofjq6Ku/MInaLVg5Y= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= @@ -15,8 +13,11 @@ cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKV cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= -cloud.google.com/go v0.67.0 h1:YIkzmqUfVGiGPpT98L8sVvUIkDno6UlrDxw4NR6z5ak= cloud.google.com/go v0.67.0/go.mod h1:YNan/mUhNZFrYUor0vqrsQ0Ffl7Xtm/ACOy/vsTS858= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.78.0 h1:oKpsiyKMfVpwR3zSAkQixGzlVE5ovitBuO0qSmCf0bI= +cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= @@ -37,90 +38,71 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= code.gitea.io/gitea-vet v0.2.1 h1:b30by7+3SkmiftK0RjuXqFvZg2q4p68uoPGuxhzBN0s= code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFjGGfE= -code.gitea.io/sdk/gitea v0.13.1 h1:Y7bpH2iO6Q0KhhMJfjP/LZ0AmiYITeRQlCD8b0oYqhk= -code.gitea.io/sdk/gitea v0.13.1/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= +code.gitea.io/sdk/gitea v0.14.0 h1:m4J352I3p9+bmJUfS+g0odeQzBY/5OXP91Gv6D4fnJ0= +code.gitea.io/sdk/gitea v0.14.0/go.mod h1:89WiyOX1KEcvjP66sRHdu0RafojGo60bT9UqW17VbWs= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= +gitea.com/go-chi/binding v0.0.0-20210301195521-1fe1c9a555e7 h1:xCVJPY823C8RWpgMabTw2kOglDrg0iS3GcQU6wdwHkU= +gitea.com/go-chi/binding v0.0.0-20210301195521-1fe1c9a555e7/go.mod h1:AyfTrwtfYN54R/HmVvMYPnSTenH5bVoyh8x6tBluxEA= +gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e h1:zgPGaf3kXP0cVm9J0l8ZA2+XDzILYATg0CXbihR6N+o= +gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0= +gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e h1:YjaQU6XFicdhPN+MlGolcXO8seYY2+EY5g7vZPB17CQ= +gitea.com/go-chi/captcha v0.0.0-20210110083842-e7696c336a1e/go.mod h1:nfA7JaGv3hbGQ1ktdhAsZhdS84qKffI8NMlHr+Opsog= gitea.com/go-chi/session v0.0.0-20210108030337-0cb48c5ba8ee h1:9U6HuKUBt/cGK6T/64dEuz0r7Yp97WAAEJvXHDlY3ws= gitea.com/go-chi/session v0.0.0-20210108030337-0cb48c5ba8ee/go.mod h1:Ozg8IchVNb/Udg+ui39iHRYqVHSvf3C99ixdpLR8Vu0= -gitea.com/lunny/levelqueue v0.3.0 h1:MHn1GuSZkxvVEDMyAPqlc7A3cOW+q8RcGhRgH/xtm6I= -gitea.com/lunny/levelqueue v0.3.0/go.mod h1:HBqmLbz56JWpfEGG0prskAV97ATNRoj5LDmPicD22hU= -gitea.com/lunny/log v0.0.0-20190322053110-01b5df579c4e h1:r1en/D7xJmcY24VkHkjkcJFa+7ZWubVWPBrvsHkmHxk= -gitea.com/lunny/log v0.0.0-20190322053110-01b5df579c4e/go.mod h1:uJEsN4LQpeGYRCjuPXPZBClU7N5pWzGuyF4uqLpE/e0= -gitea.com/lunny/nodb v0.0.0-20200923032308-3238c4655727 h1:ZF2Bd6rqVlwhIDhYiS0uGYcT+GaVNGjuKVJkTNqWMIs= -gitea.com/lunny/nodb v0.0.0-20200923032308-3238c4655727/go.mod h1:h0OwsgcpJLSYtHcM5+Xciw9OEeuxi6ty4HDiO8C7aIY= -gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b h1:vXt85uYV17KURaUlhU7v4GbCShkqRZDSfo0TkC0YCjQ= -gitea.com/macaron/binding v0.0.0-20190822013154-a5f53841ed2b/go.mod h1:Cxadig6POWpPYYSfg23E7jo35Yf0yvsdC1lifoKWmPo= -gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76 h1:mMsMEg90c5KXQgRWsH8D6GHXfZIW1RAe5S9VYIb12lM= -gitea.com/macaron/cache v0.0.0-20190822004001-a6e7fee4ee76/go.mod h1:NFHb9Of+LUnU86bU20CiXXg6ZlgCJ4XytP14UsHOXFs= -gitea.com/macaron/cache v0.0.0-20200924044943-905232fba10b h1:2ZE0JE3bKVBcP1VTrWeE1jqWwCAMIzfOQm1U9EGbBKU= -gitea.com/macaron/cache v0.0.0-20200924044943-905232fba10b/go.mod h1:W5hKG8T1GBfypp5CRQlgoJU4figIL0jhx02y4XA/NOA= -gitea.com/macaron/captcha v0.0.0-20200825161008-e8597820aaca h1:f5P41nXmXd/YOh8f6098Q0F1Y0QfpyRPSSIkni2XH4Q= -gitea.com/macaron/captcha v0.0.0-20200825161008-e8597820aaca/go.mod h1:J5h3N+1nKTXtU1x4GxexaQKgAz8UiWecNwi/CfX7CtQ= -gitea.com/macaron/cors v0.0.0-20190826180238-95aec09ea8b4 h1:e2rAFDejB0qN8OrY4xP4XSu8/yT6QmWxDZpB3J7r2GU= -gitea.com/macaron/cors v0.0.0-20190826180238-95aec09ea8b4/go.mod h1:rtOK4J20kpMD9XcNsnO5YA843YSTe/MUMbDj/TJ/Q7A= -gitea.com/macaron/csrf v0.0.0-20190822024205-3dc5a4474439 h1:88c34YM29a1GlWLrLBaG/GTT2htDdJz1u3n9+lmPolg= -gitea.com/macaron/csrf v0.0.0-20190822024205-3dc5a4474439/go.mod h1:IsQPHx73HnnqFBYiVHjg87q4XBZyGXXu77xANukvZuk= -gitea.com/macaron/gzip v0.0.0-20200827120000-efa5e8477cf5 h1:6rbhThlqfOb+sSmhrsVFz3bZoAeoloe7TZqyeiPbbWI= -gitea.com/macaron/gzip v0.0.0-20200827120000-efa5e8477cf5/go.mod h1:z8vCjuhqDfvzPUJDowGqbsgoeYBvDbl95S5k6y43Pxo= -gitea.com/macaron/i18n v0.0.0-20200911004404-4ca3dd0cbd60 h1:tNWNe5HBIlsfapFMtT4twTbXQmInRQWmdWNi8Di1ct0= -gitea.com/macaron/i18n v0.0.0-20200911004404-4ca3dd0cbd60/go.mod h1:g5ope1b+iWhBdHzAn6EJ9u9Gp3FRESxpG+CDf7HYc/A= -gitea.com/macaron/inject v0.0.0-20190803172902-8375ba841591/go.mod h1:h6E4kLao1Yko6DOU6QDnQPcuoNzvbZqzj2mtPcEn1aM= -gitea.com/macaron/inject v0.0.0-20190805023432-d4c86e31027a h1:aOKEXkDTnh4euoH0so/THLXeHtQuqHmDPb1xEk6Ehok= -gitea.com/macaron/inject v0.0.0-20190805023432-d4c86e31027a/go.mod h1:h6E4kLao1Yko6DOU6QDnQPcuoNzvbZqzj2mtPcEn1aM= -gitea.com/macaron/macaron v1.3.3-0.20190803174002-53e005ff4827/go.mod h1:/rvxMjIkOq4BM8uPUb+VHuU02ZfAO6R4+wD//tiCiRw= -gitea.com/macaron/macaron v1.3.3-0.20190821202302-9646c0587edb/go.mod h1:0coI+mSPSwbsyAbOuFllVS38awuk9mevhLD52l50Gjs= -gitea.com/macaron/macaron v1.5.0 h1:TvWEcHw1/zaHlo0GTuKEukLh3A99+QsU2mjBrXLXjVQ= -gitea.com/macaron/macaron v1.5.0/go.mod h1:P7hfDbQjcW22lkYkXlxdRIfWOXxH2+K4EogN4Q0UlLY= -gitea.com/macaron/macaron v1.5.1-0.20201027213641-0db5d4584804 h1:yUiJVZKzdXsBe2tumTAXHBZa1qPGoGXM3fBG4RJ5fQg= -gitea.com/macaron/macaron v1.5.1-0.20201027213641-0db5d4584804/go.mod h1:P7hfDbQjcW22lkYkXlxdRIfWOXxH2+K4EogN4Q0UlLY= -gitea.com/macaron/session v0.0.0-20190821211443-122c47c5f705/go.mod h1:1ujH0jD6Ca4iK9NL0Q2a7fG2chvXx5hVa7hBfABwpkA= -gitea.com/macaron/session v0.0.0-20201103015045-a177a2701dee h1:8/N3a56RXRJ66nnep0z+T7oHCB0bY6lpvtjv9Y9FPhE= -gitea.com/macaron/session v0.0.0-20201103015045-a177a2701dee/go.mod h1:5tJCkDbrwpGv+MQUSIZSOW0wFrkh0exsonJgOvBs1Dw= -gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7 h1:N9QFoeNsUXLhl14mefLzGluqV7w2mGU3u+iZU+jCeWk= -gitea.com/macaron/toolbox v0.0.0-20190822013122-05ff0fc766b7/go.mod h1:kgsbFPPS4P+acDYDOPDa3N4IWWOuDJt5/INKRUz7aks= +gitea.com/lunny/levelqueue v0.4.1 h1:RZ+AFx5gBsZuyqCvofhAkPQ9uaVDPJnsULoJZIYaJNw= +gitea.com/lunny/levelqueue v0.4.1/go.mod h1:HBqmLbz56JWpfEGG0prskAV97ATNRoj5LDmPicD22hU= gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a h1:lSA0F4e9A2NcQSqGqTOXqu2aRi/XEQxDCBwM8yJtE6s= gitea.com/xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:EXuID2Zs0pAQhH8yz+DNjUbjppKQzKFAn28TMYPB6IU= -github.com/6543/go-version v1.2.4 h1:MPsSnqNrM0HwA9tnmWNnsMdQMg4/u4fflARjwomoof4= -github.com/6543/go-version v1.2.4/go.mod h1:oqFAHCwtLVUTLdhQmVZWYvaHXTdsbB4SY85at64SQEo= +github.com/6543/go-version v1.3.1 h1:HvOp+Telns7HWJ2Xo/05YXQSB2bE0WmVgbHqwMPZT4U= +github.com/6543/go-version v1.3.1/go.mod h1:oqFAHCwtLVUTLdhQmVZWYvaHXTdsbB4SY85at64SQEo= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c h1:/IBSNwUN8+eKzUzbJPqhK839ygXJ82sde8x3ogr6R28= github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c/go.mod h1:chxPXzSsl7ZWRAuOIE23GDNzjWuZquvFlgA8xmpunjU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/GeertJohan/go.incremental v1.0.0/go.mod h1:6fAjUhbVuX1KcMD3c8TEgVUqmo4seqhv0i0kdATSkM0= -github.com/GeertJohan/go.rice v1.0.0/go.mod h1:eH6gbSOAUv07dQuZVnBmoDP8mgsM1rtixis4Tib9if0= +github.com/Julusian/godocdown v0.0.0-20170816220326-6d19f8ff2df8/go.mod h1:INZr5t32rG59/5xeltqoCJoNY7e5x/3xoY9WSWVWg74= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= +github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= +github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= +github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0= +github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU= +github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= +github.com/NYTimes/gziphandler v1.1.1 h1:ZUDjpQae29j0ryrS0u/B8HZfJBtBQHjqw2rQ2cqUQ3I= +github.com/NYTimes/gziphandler v1.1.1/go.mod h1:n/CVRwUEOgIxrgPvAQhUUr9oeUtvrhMomdKFjzJNB0c= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= -github.com/PuerkitoBio/goquery v1.5.1 h1:PSPBGne8NIUWw+/7vFBV+kG2J/5MOjbzc7154OaKCSE= +github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= +github.com/ProtonMail/go-crypto v0.0.0-20210705153151-cc34b1f6908b h1:BF5p87XWvmgdrTPPzcRMwC0TMQbviwQ+uBKfNfWJy50= +github.com/ProtonMail/go-crypto v0.0.0-20210705153151-cc34b1f6908b/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= +github.com/PuerkitoBio/goquery v1.7.0 h1:O5SP3b9JWqMSVMG69zMfj577zwkSNpxrFf7ybS74eiw= +github.com/PuerkitoBio/goquery v1.7.0/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= -github.com/RoaringBitmap/roaring v0.4.23 h1:gpyfd12QohbqhFO4NVDUdoPOCXsyahYRQhINmlHxKeo= +github.com/RoaringBitmap/gocroaring v0.4.0/go.mod h1:NieMwz7ZqwU2DD73/vvYwv7r4eWBKuPVSXZIpsaMwCI= +github.com/RoaringBitmap/real-roaring-datasets v0.0.0-20190726190000-eb7c87156f76/go.mod h1:oM0MHmQ3nDsq609SS36p+oYbRi16+oVvU2Bw4Ipv0SE= github.com/RoaringBitmap/roaring v0.4.23/go.mod h1:D0gp8kJQgE1A4LQ5wFLggQEyvDi06Mq5mKs52e1TwOo= -github.com/RoaringBitmap/roaring v0.5.5 h1:naNqvO1mNnghk2UvcsqnzHDBn9DRbCIRy94GmDTRVTQ= -github.com/RoaringBitmap/roaring v0.5.5/go.mod h1:puNo5VdzwbaIQxSiDIwfXl4Hnc+fbovcX4IW/dSTtUk= +github.com/RoaringBitmap/roaring v0.7.3/go.mod h1:jdT9ykXwHFNdJbEtxePexlFYH9LXucApeS0/+/g+p1I= +github.com/RoaringBitmap/roaring v0.9.1 h1:5PRizBmoN/PfV17nPNQou4dHQ7NcJi8FO/bihdYyCEM= +github.com/RoaringBitmap/roaring v0.9.1/go.mod h1:h1B7iIUOmnAeb5ytYMvnHJwxMc6LUrwBnzXWRuqTQUc= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/Unknwon/com v0.0.0-20190321035513-0fed4efef755/go.mod h1:voKvFVpXBJxdIPeqjoJuLK+UVcRlo/JLjeToGxPYu68= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= +github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/akavel/rsrc v0.8.0/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs= -github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38 h1:smF2tmSOzy2Mm+0dGI2AIUHY+w0BUc+4tn40djz7+6U= github.com/alecthomas/assert v0.0.0-20170929043011-405dbfeb8e38/go.mod h1:r7bzyVFMNntcxPZXK3/+KdruV1H5KSlyVY0gc+NgInI= github.com/alecthomas/chroma v0.7.2-0.20200305040604-4f3623dce67a/go.mod h1:fv5SzZPFJbwp2NXJWpFIX7DZS4HgV1K4ew4Pc2OZD9s= -github.com/alecthomas/chroma v0.8.2 h1:x3zkuE2lUk/RIekyAJ3XRqSCP4zwWDfcw/YJCuCAACg= github.com/alecthomas/chroma v0.8.2/go.mod h1:sko8vR34/90zvl5QdcUdvzL3J8NKjAUx9va9jPuFNoM= +github.com/alecthomas/chroma v0.9.2 h1:yU1sE2+TZbLIQPMk30SolL2Hn53SR/Pv750f7qZ/XMs= +github.com/alecthomas/chroma v0.9.2/go.mod h1:eMuEnpA18XbG/WhOWtCzJHS7WqEtDAI+HxdwoW0nVSk= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721 h1:JHZL0hZKJ1VENNfmXvHbgYlbUOvpzYzvy2aZU5gXVeo= github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/kong v0.1.17-0.20190424132513-439c674f7ae0/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= github.com/alecthomas/kong v0.2.1-0.20190708041108-0548c6b1afae/go.mod h1:+inYUSluD+p4L8KdviBSgzcqEjUQOfC5fQDRFuc36lI= github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= -github.com/alecthomas/kong-hcl v0.1.8-0.20190615233001-b21fea9723c8/go.mod h1:MRgZdU3vrFd05IQ89AxUZ0aYdF39BYoNFa324SodPCA= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897 h1:p9Sln00KOTlrYkxI1zYWl1QLnEqAqEARBEYa8FQnQcY= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -128,12 +110,13 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/brotli v1.0.1 h1:KqhlKozYbRtJvsPrrEeXcO+N2l6NYT5A2QAFmSULpEc= -github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= -github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo= +github.com/andybalholm/brotli v1.0.3 h1:fpcw+r1N1h0Poc1F/pHbW40cUm/lMEQslZtCkBQ0UnM= +github.com/andybalholm/brotli v1.0.3/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= -github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= +github.com/andybalholm/cascadia v1.2.0 h1:vuRCkM5Ozh/BfmsaTm26kbjm0mIOM3yS5Ek/F5h18aE= +github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxBp0T0eFw1RUQY= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= @@ -149,48 +132,72 @@ github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6l github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= -github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535 h1:4daAzAu0S6Vi7/lbWECcX0j45yZReDZ56BQsrVBOEEY= github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= -github.com/aws/aws-sdk-go v1.34.13/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= +github.com/aws/aws-sdk-go v1.38.17/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= +github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8= +github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= +github.com/bits-and-blooms/bitset v1.2.0 h1:Kn4yilvwNtMACtf1eYDlG8H77R07mZSPbMjLyS07ChA= +github.com/bits-and-blooms/bitset v1.2.0/go.mod h1:gIdJ4wp64HaoK2YrL1Q5/N7Y16edYb8uY+O0FJTyyDA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= -github.com/blevesearch/bleve v1.0.14 h1:Q8r+fHTt35jtGXJUM0ULwM3Tzg+MRfyai4ZkWDy2xO4= -github.com/blevesearch/bleve v1.0.14/go.mod h1:e/LJTr+E7EaoVdkQZTfoz7dt4KoDNvDbLb8MSKuNTLQ= -github.com/blevesearch/blevex v1.0.0 h1:pnilj2Qi3YSEGdWgLj1Pn9Io7ukfXPoQcpAI1Bv8n/o= -github.com/blevesearch/blevex v1.0.0/go.mod h1:2rNVqoG2BZI8t1/P1awgTKnGlx5MP9ZbtEciQaNhswc= -github.com/blevesearch/cld2 v0.0.0-20200327141045-8b5f551d37f5/go.mod h1:PN0QNTLs9+j1bKy3d/GB/59wsNBFC4sWLWG3k69lWbc= +github.com/blevesearch/bleve/v2 v2.0.1/go.mod h1:OBP2Pktqik8vEiUlGhuWjYx7KiO4zD542+DHqICwM5w= +github.com/blevesearch/bleve/v2 v2.0.6 h1:2dV2S4pyUqQHftUFzM0htUCWC8MeRg2qsmgIvjnKlgU= +github.com/blevesearch/bleve/v2 v2.0.6/go.mod h1:UhqLjgDhN4mji6F1dL3fPghcqaBV6r6bXwKCdaBa3Is= +github.com/blevesearch/bleve_index_api v1.0.0 h1:Ds3XeuTxjXCkG6pgIwWDRyooJKNIuOKemnN0N0IkhTU= +github.com/blevesearch/bleve_index_api v1.0.0/go.mod h1:fiwKS0xLEm+gBRgv5mumf0dhgFr2mDgZah1pqv1c1M4= github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo= github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M= github.com/blevesearch/mmap-go v1.0.2 h1:JtMHb+FgQCTTYIhtMvimw15dJwu1Y5lrZDMOFXVWPk0= github.com/blevesearch/mmap-go v1.0.2/go.mod h1:ol2qBqYaOUsGdm7aRMRrYGgPvnwLe6Y+7LMvAB5IbSA= +github.com/blevesearch/scorch_segment_api v1.0.0 h1:BUkCPWDg2gimTEyVDXf85I2buqqt4lh28uaVMiJsIYk= +github.com/blevesearch/scorch_segment_api v1.0.0/go.mod h1:KgRYmlfYC27NeM6cXOHx8LBgq7jn0atpV8mVWoBKBng= +github.com/blevesearch/scorch_segment_api/v2 v2.0.1 h1:fd+hPtZ8GsbqPK1HslGp7Vhoik4arZteA/IsCEgOisw= +github.com/blevesearch/scorch_segment_api/v2 v2.0.1/go.mod h1:lq7yK2jQy1yQjtjTfU931aVqz7pYxEudHaDwOt1tXfU= github.com/blevesearch/segment v0.9.0 h1:5lG7yBCx98or7gK2cHMKPukPZ/31Kag7nONpoBt22Ac= github.com/blevesearch/segment v0.9.0/go.mod h1:9PfHYUdQCgHktBgvtUOF4x+pc4/l8rdH0u5spnW85UQ= github.com/blevesearch/snowballstem v0.9.0 h1:lMQ189YspGP6sXvZQ4WZ+MLawfV8wOmPoD/iWeNXm8s= github.com/blevesearch/snowballstem v0.9.0/go.mod h1:PivSj3JMc8WuaFkTSRDW2SlrulNWPl4ABg1tC/hlgLs= -github.com/blevesearch/zap/v11 v11.0.14 h1:IrDAvtlzDylh6H2QCmS0OGcN9Hpf6mISJlfKjcwJs7k= -github.com/blevesearch/zap/v11 v11.0.14/go.mod h1:MUEZh6VHGXv1PKx3WnCbdP404LGG2IZVa/L66pyFwnY= -github.com/blevesearch/zap/v12 v12.0.14 h1:2o9iRtl1xaRjsJ1xcqTyLX414qPAwykHNV7wNVmbp3w= -github.com/blevesearch/zap/v12 v12.0.14/go.mod h1:rOnuZOiMKPQj18AEKEHJxuI14236tTQ1ZJz4PAnWlUg= -github.com/blevesearch/zap/v13 v13.0.6 h1:r+VNSVImi9cBhTNNR+Kfl5uiGy8kIbb0JMz/h8r6+O4= -github.com/blevesearch/zap/v13 v13.0.6/go.mod h1:L89gsjdRKGyGrRN6nCpIScCvvkyxvmeDCwZRcjjPCrw= -github.com/blevesearch/zap/v14 v14.0.5 h1:NdcT+81Nvmp2zL+NhwSvGSLh7xNgGL8QRVZ67njR0NU= -github.com/blevesearch/zap/v14 v14.0.5/go.mod h1:bWe8S7tRrSBTIaZ6cLRbgNH4TUDaC9LZSpRGs85AsGY= -github.com/blevesearch/zap/v15 v15.0.3 h1:Ylj8Oe+mo0P25tr9iLPp33lN6d4qcztGjaIsP51UxaY= -github.com/blevesearch/zap/v15 v15.0.3/go.mod h1:iuwQrImsh1WjWJ0Ue2kBqY83a0rFtJTqfa9fp1rbVVU= -github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc h1:biVzkmvwrH8WK8raXaxBx6fRVTlJILwEwQGL1I/ByEI= +github.com/blevesearch/upsidedown_store_api v1.0.1 h1:1SYRwyoFLwG3sj0ed89RLtM15amfX2pXlYbFOnF8zNU= +github.com/blevesearch/upsidedown_store_api v1.0.1/go.mod h1:MQDVGpHZrpe3Uy26zJBf/a8h0FZY6xJbthIMm8myH2Q= +github.com/blevesearch/vellum v1.0.5 h1:L5dJ7hKauRVbuH7I8uqLeSK92CPPY6FfrbAmLhAug8A= +github.com/blevesearch/vellum v1.0.5/go.mod h1:atE0EH3fvk43zzS7t1YNdNC7DbmcC3uz+eMD5xZ2OyQ= +github.com/blevesearch/zapx/v11 v11.1.10/go.mod h1:DTjbcBqrr/Uo82UBilDC8lEew42gN/OcIyiTNFtSijc= +github.com/blevesearch/zapx/v11 v11.2.1 h1:udluDHdr99gGSeL3vZLtJbML0OJ98mK1Peivtm5OYho= +github.com/blevesearch/zapx/v11 v11.2.1/go.mod h1:TBkJF5Qq0EwZbbBQmkW6/AQVSYwXXpp0xwtQ5wXHVMI= +github.com/blevesearch/zapx/v12 v12.1.10/go.mod h1:14NmKnPrnKAIyiEJM566k/Jk+FQpuiflT5d3uaaK3MI= +github.com/blevesearch/zapx/v12 v12.2.1 h1:nbeecR8M3dEcIIYfKDaSRpJ9E205E7BvjhVwf/l5ajI= +github.com/blevesearch/zapx/v12 v12.2.1/go.mod h1:sSXvgEs7MKqqDIRSpyFd6ZJUEVlhxuDB0d8/WT2WlgA= +github.com/blevesearch/zapx/v13 v13.1.10/go.mod h1:YsVY6YGpTEAlJOMjdL7EsdBLvjWd8kPa2gwJDNpqLJo= +github.com/blevesearch/zapx/v13 v13.2.1 h1:6K797fvkurY6heEMPhyUlq3VULIpkD1sbBqqQUMFf4g= +github.com/blevesearch/zapx/v13 v13.2.1/go.mod h1:Fblcy4ykPy7XiaZ2svvpQaYgEqI+8vkdvMVx5zcawF4= +github.com/blevesearch/zapx/v14 v14.1.10/go.mod h1:hsULl5eJSxs5NEfBsmeT9qrqdCP+/ecpVZKt60M4V64= +github.com/blevesearch/zapx/v14 v14.2.1 h1:V3RzDc7XZ51Kv9ZhhzMlHCSoY4+jxqy9VBqHxTqW4pg= +github.com/blevesearch/zapx/v14 v14.2.1/go.mod h1:veKtVCDzl4vvYeT5zULXEXqPR948uilzixzmmdtpCkU= +github.com/blevesearch/zapx/v15 v15.1.10/go.mod h1:4ypq25bwtSQKzwEF1UERyIhmGTbMT3brY/n4NC5gRnM= +github.com/blevesearch/zapx/v15 v15.2.1 h1:ZaqQiWLo0srtPvy3ozgpR9+Oabs3HQrF4uJM0HiKVBY= +github.com/blevesearch/zapx/v15 v15.2.1/go.mod h1:pUCN72ZJkVd7dU9lA4Fd8E3+fl5wv3JPpThk4FQ5bpA= github.com/boombuler/barcode v1.0.1-0.20190219062509-6c824513bacc/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= -github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668 h1:U/lr3Dgy4WK+hNk4tyD+nuGjpVLPEHuJSFXMw11/HPA= +github.com/boombuler/barcode v1.0.1 h1:NDBbPmhS+EqABEs5Kg3n/5ZNjy73Pz7SIV+KCeqyXcs= +github.com/boombuler/barcode v1.0.1/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/gomemcache v0.0.0-20190329173943-551aad21a668/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b h1:L/QXpzIa3pOvUGt1D1lA5KjYhPBAN/3iWdP7xeFS9F0= +github.com/bradfitz/gomemcache v0.0.0-20190913173617-a41fca850d0b/go.mod h1:H0wQNHz2YrLsuXOZozoeDmnHXkNCRmMW0gwFWDfEZDA= +github.com/caddyserver/certmagic v0.14.1 h1:8RIFS/LbGne/I7Op56Kkm2annnei7io9VW/IWDttE9U= +github.com/caddyserver/certmagic v0.14.1/go.mod h1:oRQOZmUVKwlpgNidslysHt05osM9uMrJ4YMk+Ot4P4Q= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= @@ -198,16 +205,16 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30= -github.com/chris-ramon/douceur v0.2.0 h1:IDMEdxlEUUBYBKE4z/mJnFyVXox+MjuEVDJNN27glkU= -github.com/chris-ramon/douceur v0.2.0/go.mod h1:wDW5xjJdeoMm1mRt4sD4c/LbF/mWdEpRXQKjTR8nIBE= +github.com/chi-middleware/proxy v1.1.1 h1:4HaXUp8o2+bhHr1OhVy+VjN0+L7/07JDcn6v7YrTjrQ= +github.com/chi-middleware/proxy v1.1.1/go.mod h1:jQwMEJct2tz9VmtCELxvnXoMfa+SOdikvbVJVHv/M+0= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= -github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= @@ -224,21 +231,17 @@ github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7 github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/couchbase/ghistogram v0.1.0/go.mod h1:s1Jhy76zqfEecpNWJfWUiKZookAFaiGOEoyzgHt9i7k= -github.com/couchbase/go-couchbase v0.0.0-20201026062457-7b3be89bbd89 h1:uNLXQ6QO1TocD8BaN/KkRki0Xw0brCM1PKl/ZA5pgfs= github.com/couchbase/go-couchbase v0.0.0-20201026062457-7b3be89bbd89/go.mod h1:+/bddYDxXsf9qt0xpDUtRR47A2GjaXmGGAqQ/k3GJ8A= -github.com/couchbase/gomemcached v0.0.0-20190515232915-c4b4ca0eb21d/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= -github.com/couchbase/gomemcached v0.1.0 h1:whUde87n8CScx8ckMp2En5liqAlcuG3aKy/BQeBPu84= -github.com/couchbase/gomemcached v0.1.0/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= -github.com/couchbase/gomemcached v0.1.1 h1:xCS8ZglJDhrlQg3jmK7Rn1V8f7bPjXABLC05CgLQauc= +github.com/couchbase/go-couchbase v0.0.0-20210224140812-5740cd35f448 h1:6fX3IYPArCLhzUcyJS6wezHY8nqSvqUy9NrkMwkXSeg= +github.com/couchbase/go-couchbase v0.0.0-20210224140812-5740cd35f448/go.mod h1:+/bddYDxXsf9qt0xpDUtRR47A2GjaXmGGAqQ/k3GJ8A= github.com/couchbase/gomemcached v0.1.1/go.mod h1:mxliKQxOv84gQ0bJWbI+w9Wxdpt9HjDvgW9MjCym5Vo= -github.com/couchbase/goutils v0.0.0-20190315194238-f9d42b11473b/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= -github.com/couchbase/goutils v0.0.0-20201030094643-5e82bb967e67 h1:NCqJ6fwen6YP0WlV/IyibaT0kPt3JEI1rA62V/UPKT4= +github.com/couchbase/gomemcached v0.1.2 h1:GKLSnC6RyTXkJ9vyd0q44doU8rfe34PpKkQ+c1bsWmA= +github.com/couchbase/gomemcached v0.1.2/go.mod h1:mxliKQxOv84gQ0bJWbI+w9Wxdpt9HjDvgW9MjCym5Vo= github.com/couchbase/goutils v0.0.0-20201030094643-5e82bb967e67/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= +github.com/couchbase/goutils v0.0.0-20210118111533-e33d3ffb5401 h1:4KDlx3vjalrHD/EfsjCpV91HNX3JPaIqRtt83zZ7x+Y= +github.com/couchbase/goutils v0.0.0-20210118111533-e33d3ffb5401/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= github.com/couchbase/moss v0.1.0/go.mod h1:9MaHIaRuy9pvLPUJxB8sh8OrLfyDczECVL37grCIubs= -github.com/couchbase/vellum v1.0.2 h1:BrbP0NKiyDdndMPec8Jjhy0U47CZ0Lgx3xUC2r9rZqw= github.com/couchbase/vellum v1.0.2/go.mod h1:FcwrEivFpNi24R3jLOs3n+fs5RnuQnQqCLBJ1uAg1W4= -github.com/couchbaselabs/go-couchbase v0.0.0-20190708161019-23e7ca2ce2b7 h1:1XjEY/gnjQ+AfXef2U6dxCquhiRzkEpxZuWqs+QxTL8= -github.com/couchbaselabs/go-couchbase v0.0.0-20190708161019-23e7ca2ce2b7/go.mod h1:mby/05p8HE5yHEAKiIH/555NoblMs7PtW6NrYshDruc= github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= @@ -247,29 +250,23 @@ github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsr github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= -github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d h1:SwD98825d6bdB+pEuTxWOXiSjBrHdOl/UVp75eI7JT8= -github.com/cznic/b v0.0.0-20181122101859-a26611c4d92d/go.mod h1:URriBxXwVq5ijiJ12C7iIZqlA69nTlI+LgI6/pwftG8= -github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548 h1:iwZdTE0PVqJCos1vaoKsclOGD3ADKpshg3SRtYBbwso= -github.com/cznic/mathutil v0.0.0-20181122101859-297441e03548/go.mod h1:e6NPNENfs9mPDVNRekM7lKScauxd5kXTr1Mfyig6TDM= -github.com/cznic/strutil v0.0.0-20181122101858-275e90344537 h1:MZRmHqDBd0vxNwenEbKSQqRVT24d3C05ft8kduSwlqM= -github.com/cznic/strutil v0.0.0-20181122101858-275e90344537/go.mod h1:AHHPPPXTw0h6pVabbcbyGRK1DckRn7r/STdZEeIDzZc= -github.com/daaku/go.zipexe v1.0.0/go.mod h1:z8IiR6TsVLEYKwXAoE/I+8ys/sDkgTzSL0CLnGVd57E= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= -github.com/denisenkom/go-mssqldb v0.0.0-20190924004331-208c0a498538/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc h1:VRRKCwnzqk8QCaRC4os14xoKDdbHqqlJtJA0oc1ZAjg= github.com/denisenkom/go-mssqldb v0.0.0-20200428022330-06a60b6afbbc/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/denisenkom/go-mssqldb v0.9.0 h1:RSohk2RsiZqLZ0zCjtfn3S4Gp4exhpBWHyQ7D0yGjAk= -github.com/denisenkom/go-mssqldb v0.9.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= +github.com/denisenkom/go-mssqldb v0.10.0 h1:QykgLZBorFE95+gO3u9esLd0BmbvpWp0/waNNZfHBM8= +github.com/denisenkom/go-mssqldb v0.10.0/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= +github.com/djherbis/buffer v1.1.0/go.mod h1:VwN8VdFkMY0DCALdY8o00d3IZ6Amz/UNVMWcSaJT44o= +github.com/djherbis/buffer v1.2.0 h1:PH5Dd2ss0C7CRRhQCZ2u7MssF+No9ide8Ye71nPHcrQ= +github.com/djherbis/buffer v1.2.0/go.mod h1:fjnebbZjCUpPinBRD+TDwXSOeNQ7fPQWLfGQqiAiUyE= +github.com/djherbis/nio/v3 v3.0.1 h1:6wxhnuppteMa6RHA4L81Dq7ThkZH8SwnDzXDYy95vB4= +github.com/djherbis/nio/v3 v3.0.1/go.mod h1:Ng4h80pbZFMla1yKzm61cF0tqqilXZYrogmWgZxOcmg= github.com/dlclark/regexp2 v1.1.6/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.2.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= @@ -282,35 +279,28 @@ github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdf github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= +github.com/dvyukov/go-fuzz v0.0.0-20210429054444-fca39067bc72/go.mod h1:11Gm+ccJnvAhCNLlf5+cS9KjtbaD5I5zaZpFMsTHWTw= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= -github.com/editorconfig/editorconfig-core-go/v2 v2.3.9 h1:4vZN3UCLAUbT408wDutTKGZwOlgGMpV3vhahYufNbV8= -github.com/editorconfig/editorconfig-core-go/v2 v2.3.9/go.mod h1:yoHDFR3nO8O5ssvhITSRsf0owQqIs0c9+nBTtarunPo= +github.com/editorconfig/editorconfig-core-go/v2 v2.4.2 h1:1lkDpSoAaFLrgYTVJ/eNCV+lkDSv/j9Wm0jcvDfVVEo= +github.com/editorconfig/editorconfig-core-go/v2 v2.4.2/go.mod h1:IXeWRVO4LZRoNunhHh/oP6BQvTs94nB2pNvbw32l8tQ= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= +github.com/elazarl/go-bindata-assetfs v1.0.1/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/ethantkoenig/rupture v0.0.0-20181029165146-c3b3b810dc77 h1:ZLWiTTzTUBb0WEXUxobYI/RxULIzOoIP7pgfDd4p1cw= -github.com/ethantkoenig/rupture v0.0.0-20181029165146-c3b3b810dc77/go.mod h1:MkKY/CB98aVE4VxO63X5vTQKUgcn+3XP15LMASe3lYs= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c h1:8ISkoahWXwZR41ois5lSJBSVw4D0OV19Ht/JSTzvSv0= -github.com/facebookgo/ensure v0.0.0-20200202191622-63f1cf65ac4c/go.mod h1:Yg+htXGokKKdzcwhuNDwVvN+uBxDGXJ7G/VN1d8fa64= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052 h1:JWuenKqqX8nojtoVVWjGfOF9635RETekkoH6Cc9SX0A= -github.com/facebookgo/stack v0.0.0-20160209184415-751773369052/go.mod h1:UbMTZqLaRiH3MsBH8va0n7s1pQYcu3uTb8G4tygF4Zg= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= -github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= +github.com/ethantkoenig/rupture v1.0.0 h1:gPInt1N30UErGNzd8t5js5Qbnpjcd1l6yU2MCrJxIe8= +github.com/ethantkoenig/rupture v1.0.0/go.mod h1:GyE9QabHfxA6ch0NZgwsHopRbOLcYjUr9g4FTJmq0WM= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/fatih/color v1.9.0 h1:8xPHl4/q1VyqGIPif1F+1V3Y3lSmrq01EabUW3CoW5s= -github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= -github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= -github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= +github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= @@ -320,41 +310,45 @@ github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMo github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= -github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= -github.com/gliderlabs/ssh v0.3.1 h1:L6VrMUGZaMlNIMN8Hj+CHh4U9yodJE3FAt/rgvfaKvE= -github.com/gliderlabs/ssh v0.3.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= +github.com/gliderlabs/ssh v0.3.3 h1:mBQ8NiOgDkINJrZtoizkC3nDNYgSaWtxyem6S2XHBtA= +github.com/gliderlabs/ssh v0.3.3/go.mod h1:ZSS+CUoKHDrqVakTfTWUlKSr9MtMFkC4UvtQKD7O914= github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/glycerine/go-unsnap-stream v0.0.0-20181221182339-f9677308dec2/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a h1:FQqoVvjbiUioBBFUL5up+h+GdCa/AnJsL/1bIs/veSI= -github.com/glycerine/go-unsnap-stream v0.0.0-20190901134440-81cf024a9e0a/go.mod h1:/20jfyN9Y5QPEAprSgKAUr+glWDY39ZiUEAYOEv5dsE= -github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31 h1:gclg6gY70GLy3PbkQ1AERPfmLMMagS60DKF78eWwLn8= github.com/glycerine/goconvey v0.0.0-20190410193231-58a59202ab31/go.mod h1:Ogl1Tioa0aV7gstGFO7KhffUsb9M4ydbEbbxpcEDc24= -github.com/go-asn1-ber/asn1-ber v1.5.1 h1:pDbRAunXzIUXfx4CB2QJFv5IuPiuoW+sWvr/Us009o8= github.com/go-asn1-ber/asn1-ber v1.5.1/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= -github.com/go-chi/chi v1.5.1 h1:kfTK3Cxd/dkMu/rKs5ZceWYp+t5CtiE7vmaTv3LjC6w= +github.com/go-asn1-ber/asn1-ber v1.5.3 h1:u7utq56RUFiynqUzgVMFDymapcOtQ/MZkh3H4QYkxag= +github.com/go-asn1-ber/asn1-ber v1.5.3/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0= github.com/go-chi/chi v1.5.1/go.mod h1:REp24E+25iKvxgeTfHmdUoL5x15kBiDBlnIl5bCwe2k= -github.com/go-enry/go-enry/v2 v2.6.0 h1:nbGWQBpO+D+cJuRxNgSDFnFY9QWz3QM/CeZxU7VAH20= -github.com/go-enry/go-enry/v2 v2.6.0/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ= +github.com/go-chi/chi v1.5.4 h1:QHdzF2szwjqVV4wmByUnTcsbIg7UGaQ0tPF2t5GcAIs= +github.com/go-chi/chi v1.5.4/go.mod h1:uaf8YgoFazUOkPBG7fxPftUylNumIev9awIWOENIuEg= +github.com/go-chi/chi/v5 v5.0.1 h1:ALxjCrTf1aflOlkhMnCUP86MubbWFrzB3gkRPReLpTo= +github.com/go-chi/chi/v5 v5.0.1/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= +github.com/go-chi/cors v1.2.0 h1:tV1g1XENQ8ku4Bq3K9ub2AtgG+p16SmzeMSGTwrOKdE= +github.com/go-chi/cors v1.2.0/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58= +github.com/go-enry/go-enry/v2 v2.7.1 h1:WCqtfyteIz61GYk9lRVy8HblvIv4cP9GIiwm/6txCbU= +github.com/go-enry/go-enry/v2 v2.7.1/go.mod h1:GVzIiAytiS5uT/QiuakK7TF1u4xDab87Y8V5EJRpsIQ= github.com/go-enry/go-oniguruma v1.2.1 h1:k8aAMuJfMrqm/56SG2lV9Cfti6tC4x8673aHCcBk+eo= github.com/go-enry/go-oniguruma v1.2.1/go.mod h1:bWDhYP+S6xZQgiRL7wlTScFYBe023B6ilRZbCAD5Hf4= github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.0.0 h1:7NQHvd9FVid8VL4qVUMm8XifBK+2xCoZ2lSk0agRrHM= -github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M= -github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw= -github.com/go-git/go-git/v5 v5.2.0 h1:YPBLG/3UK1we1ohRkncLjaXWLW+HKp5QNM/jTli2JgI= -github.com/go-git/go-git/v5 v5.2.0/go.mod h1:kh02eMX+wdqqxgNMEyq8YgwlIOsDOa9homkUq1PoTMs= +github.com/go-git/go-billy/v5 v5.2.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34= +github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0= +github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2SubfXjIWgci8= +github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= +github.com/go-git/go-git/v5 v5.4.3-0.20210630082519-b4368b2a2ca4 h1:1RSUwVK7VjTeA82kcLIqz1EU70QRwFdZUlJW58gP4GY= +github.com/go-git/go-git/v5 v5.4.3-0.20210630082519-b4368b2a2ca4/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= -github.com/go-ldap/ldap/v3 v3.2.4 h1:PFavAq2xTgzo/loE8qNXcQaofAaqIpI4WgaLdv+1l3E= -github.com/go-ldap/ldap/v3 v3.2.4/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= +github.com/go-ldap/ldap/v3 v3.3.0 h1:lwx+SJpgOHd8tG6SumBQZXCmNX51zM8B1cfxJ5gv4tQ= +github.com/go-ldap/ldap/v3 v3.3.0/go.mod h1:iYS1MdmrmceOJ1QOTnRXrIs7i3kloqtmGQjRvjKpyMg= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= @@ -364,85 +358,113 @@ github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpR github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= -github.com/go-openapi/analysis v0.19.10 h1:5BHISBAXOc/aJK25irLZnx2D3s6WyYaY9D4gmuz9fdE= github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0 h1:UN09o0kNhleunxW7LR+KnltD0YrJ8FF03pSqvAN3Vro= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= -github.com/go-openapi/errors v0.19.6 h1:xZMThgv5SQ7SMbWtKFkCf9bBdvR2iEyw9k3zGZONuys= github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.0 h1:Sxpo9PjEHDzhs3FbnGNonvDgWcMW2U7wGTcDDSFSceM= +github.com/go-openapi/errors v0.20.0/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= -github.com/go-openapi/jsonpointer v0.19.3 h1:gihV7YNZK1iK6Tgwwsxo2rJbD1GTbdm72325Bq8FI3w= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= +github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= -github.com/go-openapi/jsonreference v0.19.4 h1:3Vw+rh13uq2JFNxgnMTGE1rnoieU9FmyE1gvnyylsYg= -github.com/go-openapi/jsonreference v0.19.4/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.5 h1:1WJP/wi4OjB4iV8KVbH73rQaoialJrqv8gitZLxGLtM= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= -github.com/go-openapi/loads v0.19.5 h1:jZVYWawIQiA1NBnHla28ktg6hrcfTHsCE+3QLVRBIls= github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2 h1:z5p5Xf5wujMxS1y8aP+vxwW5qYT2zdJBbXKmQUG3lcc= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= -github.com/go-openapi/runtime v0.19.20 h1:J/t+QIjbcoq8WJvjGxRKiFBhqUE8slS9SbmD0Oi/raQ= -github.com/go-openapi/runtime v0.19.20/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.19.27 h1:4zrQCJoP7rqNCUaApDv1MdPkaa5TuPfO05Lq5WLhX9I= +github.com/go-openapi/runtime v0.19.27/go.mod h1:BvrQtn6iVb2QmiVXRsFAm6ZCAZBpbVKFfN6QWCp582M= github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= -github.com/go-openapi/spec v0.19.8 h1:qAdZLh1r6QF/hI/gTq+TJTvsQUodZsM7KLqkAJdiJNg= github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3 h1:uH9RQ6vdyPSs2pSy9fL8QPspDF2AMIMPtmK5coSSjtQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= -github.com/go-openapi/strfmt v0.19.5 h1:0utjKrw+BAh8s57XE9Xz8DUBsVvPmRUB6styvl9wWIM= github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.1 h1:1VgxvehFne1mbChGeCmZ5pc0LxUf6yaACVSIYAR91Xc= +github.com/go-openapi/strfmt v0.20.1/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= -github.com/go-openapi/swag v0.19.9 h1:1IxuqvBUU3S2Bi4YC7tlP9SJF1gVpCvqN0T2Qof4azE= github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= -github.com/go-openapi/validate v0.19.10 h1:tG3SZ5DC5KF4cyt7nqLVcQXGj5A7mpaYkAcNPlDK+Yk= github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.2 h1:AhqDegYV3J3iQkMPJSXkvzymHKMTw0BST3RK3hTT4ts= +github.com/go-openapi/validate v0.20.2/go.mod h1:e7OJoKNgd0twXZwIn0A43tHbvIcr/rZIVCbJBpTUoY0= github.com/go-redis/redis v6.15.2+incompatible h1:9SpNVG76gr6InJGxoZ6IuuxaCOQwDAhzyXg+Bs+0Sb4= github.com/go-redis/redis v6.15.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= -github.com/go-redis/redis/v7 v7.4.0 h1:7obg6wUoj05T0EpY0o8B59S9w5yeMWql7sw2kwNW1x4= -github.com/go-redis/redis/v7 v7.4.0/go.mod h1:JDNMw23GTyLNC4GZu9njt15ctBQVn7xjRfnwdHj/Dcg= github.com/go-redis/redis/v8 v8.4.0/go.mod h1:A1tbYoHSa1fXwN+//ljcCYYJeLmVrwL9hbQN45Jdy0M= +github.com/go-redis/redis/v8 v8.11.0 h1:O1Td0mQ8UFChQ3N9zFQqo6kTU2cJ+/it88gDB+zg0wo= +github.com/go-redis/redis/v8 v8.11.0/go.mod h1:DLomh7y2e3ggQXQLd1YgmvIfecPJoFl7WU5SOQ/r06M= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= -github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= +github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= +github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= -github.com/go-swagger/go-swagger v0.25.0 h1:FxhyrWWV8V/A9P6GtI5szWordAdbb6Y0nqdY/y9So2w= -github.com/go-swagger/go-swagger v0.25.0/go.mod h1:9639ioXrPX9E6BbnbaDklGXjNz7upAXoNBwL4Ok11Vk= +github.com/go-swagger/go-swagger v0.27.0 h1:K7+nkBuf4oS1jTBrdvWqYFpqD69V5CN8HamZzCDDhAI= +github.com/go-swagger/go-swagger v0.27.0/go.mod h1:WodZVysInJilkW7e6IRw+dZGp5yW6rlMFZ4cb+THl9A= github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013 h1:l9rI6sNaZgNC0LnF3MiE+qTmyBA/tZAg1rtyrGbUMK0= github.com/go-swagger/scan-repo-boundary v0.0.0-20180623220736-973b3573c013/go.mod h1:b65mBPzqzZWxOZGxSWrqs4GInLIn+u99Q9q7p+GKni0= -github.com/go-testfixtures/testfixtures/v3 v3.4.1 h1:Qz9y0wUOXPHzKhK6C79A/menChtEu/xd0Dn5ngVyMD0= -github.com/go-testfixtures/testfixtures/v3 v3.4.1/go.mod h1:P4L3WxgOsCLbAeUC50qX5rdj1ULZfUMqgCbqah3OH5U= -github.com/go-xorm/sqlfiddle v0.0.0-20180821085327-62ce714f951a/go.mod h1:56xuuqnHyryaerycW3BfssRdxQstACi0Epw/yC5E2xM= +github.com/go-testfixtures/testfixtures/v3 v3.6.1 h1:n4Fv95Exp0D05G6l6CAZv22Ck1EJK0pa0TfPqE4ncSs= +github.com/go-testfixtures/testfixtures/v3 v3.6.1/go.mod h1:Bsb2MoHAfHnNsPpSwAjtOs102mqDuM+1u3nE2OCi0N0= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= @@ -469,8 +491,10 @@ github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/V github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/gofrs/uuid v3.2.0+incompatible h1:y12jRkkFxsd7GpqdSZ+/KCs/fJbqpEXSGd4+jfEaewE= +github.com/goccy/go-json v0.7.4 h1:B44qRUFwz/vxPKPISQ1KhvzRi9kZ28RAf6YtjriBZ5k= +github.com/goccy/go-json v0.7.4/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= +github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= @@ -479,6 +503,10 @@ github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28 h1:gBeyun7mySAKWg7Fb0 github.com/gogs/chardet v0.0.0-20191104214054-4b6791f73a28/go.mod h1:Pcatq5tYkCW2Q6yrR2VRHlbHpZ/R4/7qyL1TCF7vl14= github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14 h1:yXtpJr/LV6PFu4nTLgfjQdcMdzjbqqXMEnHfq0Or6p8= github.com/gogs/cron v0.0.0-20171120032916-9f6c956d3e14/go.mod h1:jPoNZLWDAqA5N3G5amEoiNbhVrmM+ZQEcnQvNQ2KaZk= +github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85 h1:UjoPNDAQ5JPCjlxoJd6K8ALZqSDDhk2ymieAZOVaDg0= +github.com/gogs/go-gogs-client v0.0.0-20210131175652-1d7215cd8d85/go.mod h1:fR6z1Ie6rtF7kl/vBYMfgD5/G5B1blui7z426/sj2DU= +github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY= +github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -506,15 +534,17 @@ github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrU github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= -github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= -github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= -github.com/golang/snappy v0.0.2 h1:aeE13tS0IiQgFjYdoL8qN3K1N2bXXtI6Vi51/y7BpMw= github.com/golang/snappy v0.0.2/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= +github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= +github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= @@ -522,21 +552,23 @@ github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.0 h1:/QaMHBdZ26BB3SSst0Iwl10Epc+xhTquomWX0oZEB6w= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.2 h1:X2ev0eStA3AbceY54o37/0PQ/UWqKEiiO2dKL5OPaFM= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.4 h1:L8R9j+yAqZuZjsqh/z+F1NCffTKKLShY6zXTItVIZ8M= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v32 v32.1.0 h1:GWkQOdXqviCPx7Q7Fj+KyPoGm4SwHRh8rheoPhd27II= -github.com/google/go-github/v32 v32.1.0/go.mod h1:rIEpZD9CTDQwDK9GDrtMTycQNA4JU3qBsCizh3q2WCI= -github.com/google/go-querystring v1.0.0 h1:Xkwi/a1rcvNg1PPYe5vI8GbeBY/jrVuDX5ASuANWTrk= +github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= +github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-github/v37 v37.0.0 h1:rCspN8/6kB1BAJWZfuafvHhyfIo5fkAulaP/3bOQ/tM= +github.com/google/go-github/v37 v37.0.0/go.mod h1:LM7in3NmXDrX58GbEHy7FtNLbI2JijX93RnMKvWG3m4= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= +github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= +github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -545,37 +577,39 @@ github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200905233945-acf8798be1f7/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/google/uuid v1.1.2 h1:EVhdT+1Kseyi1/pUmXKaFxYsDNy9RQYkMWRH68J/W7Y= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= +github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99 h1:twflg0XRTjwKpxb/jFExr4HGq6on2dEOmnL6FV+fgPw= github.com/gopherjs/gopherjs v0.0.0-20190910122728-9d188e94fb99/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= -github.com/gorilla/csrf v1.6.0/go.mod h1:7tSf8kmjNYr7IWDCYhd3U8Ck34iQ/Yw5CJu7bAkHEGI= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gorilla/handlers v1.4.1/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= -github.com/gorilla/handlers v1.4.2 h1:0QniY0USkHQ1RGCLfKxeNHK9bkDHGRYGNDFBCS+YARg= -github.com/gorilla/handlers v1.4.2/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= -github.com/gorilla/mux v1.7.3 h1:gnP5JzjVOuiZD07fKKToCAOjS0yOpj/qPETTXCCS6hw= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= +github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= +github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1 h1:LqbZZ9sNMWVjeXS4NN5oVvhMjDyLhmA1LG86oSo+IqY= github.com/gorilla/pat v0.0.0-20180118222023-199c85a7f6d1/go.mod h1:YeAe0gNeiNT5hoiZRI4yiOky6jVdNvfO2N6Kav/HmxY= github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= github.com/gorilla/sessions v1.1.1/go.mod h1:8KCfur6+4Mqcc6S0FEfKuN15Vl5MgXW92AE8ovaJD0w= -github.com/gorilla/sessions v1.2.0 h1:S7P+1Hm5V/AT9cjEcUD5uDaQSX0OE577aCXgoaKpYbQ= github.com/gorilla/sessions v1.2.0/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= +github.com/gorilla/sessions v1.2.1 h1:DHd3rPN5lE3Ts3D8rKkQ8x/0kqfeNmBAaiSi+o7FsgI= +github.com/gorilla/sessions v1.2.1/go.mod h1:dk2InVEVJ0sfLlnXv9EAgkf6ecYs/i80K/zI+bUmuGM= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -588,16 +622,17 @@ github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoP github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= +github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2 h1:CG6TE5H9/JXsFWJCfoIVpKFIkFe6ysEuHirp4DxCsHI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= -github.com/hashicorp/go-retryablehttp v0.6.8 h1:92lWxgpa+fF3FozM4B3UZtHZMJX8T5XT+TFdCxsPyWs= github.com/hashicorp/go-retryablehttp v0.6.8/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= +github.com/hashicorp/go-retryablehttp v0.7.0 h1:eu1EI/mbirUgP5C8hVsTNaGZreBDlYiwC1FZWkvQPQ4= +github.com/hashicorp/go-retryablehttp v0.7.0/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= @@ -606,30 +641,28 @@ github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= +github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ikawaha/kagome.ipadic v1.1.2/go.mod h1:DPSBbU0czaJhAb/5uKQZHMc9MTVRpDugJfX+HddPHHg= -github.com/imdario/mergo v0.3.9 h1:UauaLniWCFHWd+Jp9oCEkTBj8VO/9DKg3PV3VCNMDIg= -github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= -github.com/imdario/mergo v0.3.11 h1:3tnifQM4i+fbajXKBHXWEH+KvNHqojZ778UH75j3bGA= -github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= +github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/issue9/assert v1.3.1/go.mod h1:9Ger+iz8X7r1zMYYwEhh++2wMGWcNN2oVI+zIQXxcio= -github.com/issue9/assert v1.3.2 h1:IaTa37u4m1fUuTH9K9ldO5IONKVDXjLiUO1T9vj0OF0= -github.com/issue9/assert v1.3.2/go.mod h1:9Ger+iz8X7r1zMYYwEhh++2wMGWcNN2oVI+zIQXxcio= -github.com/issue9/identicon v1.0.1 h1:pCDfjMDM6xWK0Chxo8Lif+ST/nOEtmXgMITgV1YA9Og= -github.com/issue9/identicon v1.0.1/go.mod h1:UKNVkUFI68RPz/RlLhsAr1aX6bBSaYEWRHVfdjrMUmk= +github.com/issue9/assert v1.4.1 h1:gUtOpMTeaE4JTe9kACma5foOHBvVt1p5XTFrULDwdXI= +github.com/issue9/assert v1.4.1/go.mod h1:Yktk83hAVl1SPSYtd9kjhBizuiBIqUQyj+D5SE2yjVY= +github.com/issue9/identicon v1.2.0 h1:ek+UcTTyMW/G0iNbLOAlrPC13eSzXTWhbJSs8PHhHGQ= +github.com/issue9/identicon v1.2.0/go.mod h1:A9toNT0ky/1WP5iNFyDmrkNiYH6eX3HcN5V6uH0g0ec= github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0= github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo= github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk= @@ -638,12 +671,17 @@ github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgO github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA= github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE= github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s= -github.com/jackc/pgconn v1.5.0 h1:oFSOilzIZkyg787M1fEmyMfOUUvwj0daqYMfaWwNL4o= +github.com/jackc/pgconn v1.4.0/go.mod h1:Y2O3ZDF0q4mMacyWV3AstPJpeHXWGEetiFttmq5lahk= github.com/jackc/pgconn v1.5.0/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.5.1-0.20200601181101-fa742c524853/go.mod h1:QeD3lBfpTFe8WUnPZWN5KY/mB8FGMIYRdd8P8Jr0fAI= +github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o= +github.com/jackc/pgconn v1.8.1/go.mod h1:JV6m6b6jhjdmzchES0drzCcYcAHS1OPD5xu3OZ/lE2g= +github.com/jackc/pgconn v1.9.0 h1:gqibKSTJup/ahCsNKyMZAniPuZEfIqfXFc8FOWVYR+Q= +github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY= github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE= github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8= -github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2 h1:JVX6jT/XfzNqIjye4717ITLaNwV9mWbJx0dLCpcRzdA= github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE= +github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c= github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A= @@ -652,36 +690,50 @@ github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg= github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM= -github.com/jackc/pgproto3/v2 v2.0.1 h1:Rdjp4NFjwHnEslx2b66FfCI2S0LhO4itac3hXz6WX9M= github.com/jackc/pgproto3/v2 v2.0.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= -github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8 h1:Q3tB+ExeflWUW7AFcAhXqk40s9mnNYLk1nOkKNZ5GnU= +github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= +github.com/jackc/pgproto3/v2 v2.1.1 h1:7PQ/4gLoqnl87ZxL7xjO0DR5gYuviDCZxQJsUlFW1eI= +github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA= github.com/jackc/pgservicefile v0.0.0-20200307190119-3430c5407db8/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg= +github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E= github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg= github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc= github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw= -github.com/jackc/pgtype v1.3.0 h1:l8JvKrby3RI7Kg3bYEeU9TA4vqC38QDpFCfcrC7KuN0= +github.com/jackc/pgtype v1.2.0/go.mod h1:5m2OfMh1wTK7x+Fk952IDmI4nw3nPrvtQdM0ZT4WpC0= github.com/jackc/pgtype v1.3.0/go.mod h1:b0JqxHvPmljG+HQ5IsvQ0yqeSi4nGcDTVjFoiLDb0Ik= +github.com/jackc/pgtype v1.3.1-0.20200510190516-8cd94a14c75a/go.mod h1:vaogEUkALtxZMCH411K+tKzNpwzCKU+AnPzBKZ+I+Po= +github.com/jackc/pgtype v1.3.1-0.20200606141011-f6355165a91c/go.mod h1:cvk9Bgu/VzJ9/lxTO5R5sf80p0DiucVtN7ZxvaC4GmQ= +github.com/jackc/pgtype v1.7.0/go.mod h1:ZnHF+rMePVqDKaOfJVI4Q8IVvAQMryDlDkZnKOI75BE= +github.com/jackc/pgtype v1.8.0 h1:iFVCcVhYlw0PulYCVoguRGm0SE9guIcPcccnLzHj8bA= +github.com/jackc/pgtype v1.8.0/go.mod h1:PqDKcEBtllAtk/2p6z6SHdXW5UB+MhE75tUol2OKexE= github.com/jackc/pgx v3.6.2+incompatible h1:2zP5OD7kiyR3xzRYMhOcXVvkDZsImVXfj+yIyTQf3/o= github.com/jackc/pgx v3.6.2+incompatible/go.mod h1:0ZGrqGqkRlliWnWB4zKnWtjbSWbGkVEFm4TeybAXq+I= github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y= github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM= github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc= -github.com/jackc/pgx/v4 v4.6.0 h1:Fh0O9GdlG4gYpjpwOqjdEodJUQM9jzN3Hdv7PN0xmm0= +github.com/jackc/pgx/v4 v4.5.0/go.mod h1:EpAKPLdnTorwmPUUsqrPxy5fphV18j9q3wrfRXgo+kA= github.com/jackc/pgx/v4 v4.6.0/go.mod h1:vPh43ZzxijXUVJ+t/EmXBtFmbFVO72cuneCT9oAlxAg= +github.com/jackc/pgx/v4 v4.6.1-0.20200510190926-94ba730bb1e9/go.mod h1:t3/cdRQl6fOLDxqtlyhe9UWgfIi9R8+8v8GKV5TRA/o= +github.com/jackc/pgx/v4 v4.6.1-0.20200606145419-4e5062306904/go.mod h1:ZDaNWkt9sW1JMiNn0kdYBaLelIhw7Pg4qd+Vk6tw7Hg= +github.com/jackc/pgx/v4 v4.11.0/go.mod h1:i62xJgdrtVDsnL3U8ekyrQXEwGNTRoG7/8r+CIdYfcc= +github.com/jackc/pgx/v4 v4.12.0 h1:xiP3TdnkwyslWNp77yE5XAPfxAsU9RMFDe0c1SwN8h4= +github.com/jackc/pgx/v4 v4.12.0/go.mod h1:fE547h6VulLPA3kySjfnSG/e2D861g/50JlVUa/ub60= github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jackc/puddle v1.1.0/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.1/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= +github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk= github.com/jarcoal/httpmock v0.0.0-20180424175123-9c70cfe4a1da/go.mod h1:ks+b9deReOc7jgqp+e7LuFiCBH6Rm5hL32cLcEAArb4= github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7 h1:g0fAGBisHaEQ0TRq1iBvemFRf+8AEWEmBESSiWB3Vsc= github.com/jaytaylor/html2text v0.0.0-20200412013138-3577fbdbcff7/go.mod h1:CVKlgaMiht+LXvHG173ujK6JUhZXKb2u/BQtjPDIvyk= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jessevdk/go-flags v1.4.0 h1:4IU2WS7AumrZ/40jfhf4QVDMsQwqA7VEHozFRrGARJA= -github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= -github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= -github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= -github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/joho/godotenv v1.3.0 h1:Zjp+RcGpHhGlrMbJzXTrZZPrWj+1vfm90La1wgB6Bhc= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -691,8 +743,9 @@ github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= -github.com/json-iterator/go v1.1.10 h1:Kz6Cvnvv2wGdaG/V8yMvfkmNiXq9Ya2KUv4rouJJr68= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= @@ -704,24 +757,28 @@ github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaR github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 h1:Z9n2FFNUXsshfwJMBgNA0RU6/i7WVaAegv3PtuIHPMs= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd h1:Coekwdh0v2wtGp9Gmz1Ze3eVRAWJMLokvN3QjdzCHLY= -github.com/kevinburke/ssh_config v0.0.0-20190725054713-01f96b0aa0cd/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o= +github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4 h1:cTxwSmnaqLoo+4tLukHoB9iqHOu3LmLhRmgUxZo6Vp4= github.com/keybase/go-crypto v0.0.0-20200123153347-de78d2cb44f4/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= -github.com/klauspost/compress v1.9.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.10.10/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= -github.com/klauspost/compress v1.11.3 h1:dB4Bn0tN3wdCzQxnS8r06kV74qN/TAfaIS0bVE8h3jc= -github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.13.1 h1:wXr2uRxZTJXHLly6qhJabee5JqIhTRoLBhDOA74hDEQ= +github.com/klauspost/compress v1.13.1/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.3/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.3.1 h1:5JNjFYYQrZeKRJ0734q51WCEEn2huer72Dc7K+R/b6s= github.com/klauspost/cpuid v1.3.1/go.mod h1:bYW4mA6ZgKPob1/Dlai2LviZJO7KGI3uoWLd42rAQw4= -github.com/klauspost/pgzip v1.2.4 h1:TQ7CNpYKovDOmqzRHKxJh0BeaBI7UdQZYc6p7pMQh1A= +github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.6/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= +github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= +github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/klauspost/pgzip v1.2.4/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= @@ -732,93 +789,96 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pretty v0.2.0 h1:s5hAObm+yFO5uHYt5dYjxi2rXrsnmRpJx4OYvIWUaQs= -github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= +github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/lafriks/xormstore v1.3.2 h1:hqi3F8s/B4rz8GuEZZDuHuOxRjeuOpEI/cC7vcnWwH4= -github.com/lafriks/xormstore v1.3.2/go.mod h1:mVNIwIa25QIr8rfR7YlVjrqN/apswHkVdtLCyVYBzXw= +github.com/lafriks/xormstore v1.4.0 h1:DX1yS9WUhVY+MTHGaOJ2tDVpwL1w/247iro5KR0BQEQ= +github.com/lafriks/xormstore v1.4.0/go.mod h1:5a3wJ6Ro0TFJmJcH1ywtHO/fBEIWYfSfO4WTYmM7qEk= github.com/lestrrat-go/jwx v0.9.0/go.mod h1:iEoxlYfZjvoGpuWwxUz+eR5e6KTJGsaRcy/YNA/UnBk= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.7.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/lib/pq v1.8.1-0.20200908161135-083382b7e6fc h1:ERSU1OvZ6MdWhHieo2oT7xwR/HCksqKdgK6iYPU5pHI= -github.com/lib/pq v1.8.1-0.20200908161135-083382b7e6fc/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8= +github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= +github.com/libdns/libdns v0.2.1 h1:Wu59T7wSHRgtA0cfxC+n1c/e+O3upJGWytknkmFEDis= +github.com/libdns/libdns v0.2.1/go.mod h1:yQCXzk1lEZmmCPa857bnk4TsOiqYasqpyOEeSObbb40= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/lunny/bluemonday v1.0.5-0.20201227154428-ca34796141e8 h1:1omo92DLtxQu6VwVPSZAmduHaK5zssed6cvkHyl1XOg= -github.com/lunny/bluemonday v1.0.5-0.20201227154428-ca34796141e8/go.mod h1:8iwZnFn2CDDNZ0r6UXhF4xawGvzaqzCRa1n3/lO3W2w= github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96 h1:uNwtsDp7ci48vBTTxDuwcoTXz4lwtDTe7TjCQ0noaWY= github.com/lunny/dingtalk_webhook v0.0.0-20171025031554-e3534c89ef96/go.mod h1:mmIfjCSQlGYXmJ95jFN84AkQFnVABtKuJL8IrzwvUKQ= -github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de h1:nyxwRdWHAVxpFcDThedEgQ07DbcRc5xgNObtbTp76fk= github.com/lunny/log v0.0.0-20160921050905-7887c61bf0de/go.mod h1:3q8WtuPQsoRbatJuy3nvq/hRSvuBJrHHr+ybPPiNvHQ= -github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af h1:UaWHNBdukWrSG3DRvHFR/hyfg681fceqQDYVTBncKfQ= github.com/lunny/nodb v0.0.0-20160621015157-fc1ef06ad4af/go.mod h1:Cqz6pqow14VObJ7peltM+2n3PWOz7yTrfUuGbVFkzN0= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= -github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= +github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= -github.com/mailru/easyjson v0.7.1 h1:mdxE1MF9o53iCb2Ghj1VfWvh7ZOwHpnVG/xwXrV90U8= github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= -github.com/mailru/easyjson v0.7.6 h1:8yTIVnZgCoiM1TgqoeTl+LfU5Jg6/xL3QhGQnimLYnA= github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/going v1.0.0 h1:DQw0ZP7NbNlFGcKbcE/IVSOAFzScxRtLpd0rLMzLhq0= github.com/markbates/going v1.0.0/go.mod h1:I6mnB4BPnEeqo85ynXIx1ZFLLbtiLHNXVgWeFO9OGOA= -github.com/markbates/goth v1.65.0 h1:IbXpMneUhqbxgJ8JP1Ghl8ghlAaVX66jWDAapU1KxqU= -github.com/markbates/goth v1.65.0/go.mod h1:65frybxoeSCfORin51KOKqAKbIh7wREIDvdCkdWj//4= +github.com/markbates/goth v1.68.0 h1:90sKvjRAKHcl9V2uC9x/PJXeD78cFPiBsyP1xVhoQfA= +github.com/markbates/goth v1.68.0/go.mod h1:V2VcDMzDiMHW+YmqYl7i0cMiAUeCkAe4QE6jRKBhXZw= github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= +github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= +github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.7 h1:bQGKb3vps/j0E9GfJQ03JyhRuxsvdAanXlT9BTw3mdw= -github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= -github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= +github.com/mattn/go-isatty v0.0.13 h1:qdl+GuBjcsKKDco5BsxPJlId98mSWNKqYA+Co0SC1yA= +github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= -github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-sqlite3 v1.10.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= +github.com/mattn/go-runewidth v0.0.13 h1:lTGmDsbAYt5DmK6OnoV7EuIF1wEIFAcxld6ypU4OSgU= +github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-sqlite3 v1.11.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= -github.com/mattn/go-sqlite3 v1.14.4 h1:4rQjbDxdu9fSgI/r3KN72G3c2goxknAqHHgPWWs8UlI= -github.com/mattn/go-sqlite3 v1.14.4/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI= +github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.7/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/mattn/go-sqlite3 v1.14.8 h1:gDp86IdQsN/xWjIEmr9MF6o9mpksUgh0fu+9ByFxzIU= +github.com/mattn/go-sqlite3 v1.14.8/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81 h1:QASJXOGm2RZ5Ardbc86qNFvby9AqkLDibfChMtAg5QM= -github.com/mgechev/dots v0.0.0-20190921121421-c36f7dcfbb81/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/mgechev/revive v1.0.3-0.20200921231451-246eac737dc7 h1:ydVkpU/M4/c45yT3e5lzMeguKJm9GxGgsawx4/XlwK0= -github.com/mgechev/revive v1.0.3-0.20200921231451-246eac737dc7/go.mod h1:no/hfevHbndpXR5CaJahkYCfM/FFpmM/dSOwFGU7Z1o= +github.com/mholt/acmez v0.1.3 h1:J7MmNIk4Qf9b8mAGqAh4XkNeowv3f1zW816yf4zt7Qk= +github.com/mholt/acmez v0.1.3/go.mod h1:8qnn8QA/Ewx8E3ZSsmscqsIjhhpxuy9vqdgbX2ceceM= github.com/mholt/archiver/v3 v3.5.0 h1:nE8gZIrw66cu4osS/U7UW7YDuGMHssxKutU8IfWxwWE= github.com/mholt/archiver/v3 v3.5.0/go.mod h1:qqTTPUK/HZPFgFQ/TJ3BzvTpF/dPtFVJXdQbCmeMxwc= +github.com/microcosm-cc/bluemonday v1.0.15 h1:J4uN+qPng9rvkBZBoBb8YGR+ijuklIMpSOZZLjYpbeY= +github.com/microcosm-cc/bluemonday v1.0.15/go.mod h1:ZLvAzeakRwrGnzQEvstVzVt3ZpqOF2+sdFr0Om+ce30= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/minio/md5-simd v1.1.0 h1:QPfiOqlZH+Cj9teu0t9b1nTBfPbyTl16Of5MeuShdK4= +github.com/miekg/dns v1.1.42/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= +github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= +github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw= -github.com/minio/minio-go/v7 v7.0.6 h1:9czXaG0LEZ9s74smSqy0rm034MxngQoP6HTTuSc5GEs= -github.com/minio/minio-go/v7 v7.0.6/go.mod h1:HcIuq+11d/3MfavIPZiswSzfQ1VJ2Lwxp/XLtW46IWQ= -github.com/minio/sha256-simd v0.1.1 h1:5QHSlgo3nt5yKOJrC7W8w7X+NFl8cMPZm96iu8kKUJU= +github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34= +github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM= +github.com/minio/minio-go/v7 v7.0.12 h1:/4pxUdwn9w0QEryNkrrWaodIESPRX+NxpO0Q6hVdaAA= +github.com/minio/minio-go/v7 v7.0.12/go.mod h1:S23iSP5/gbMwtxeY5FM71R+TkAYyzEdoNEDDwpt8yWs= github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM= +github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g= +github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= @@ -828,8 +888,11 @@ github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS4 github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= -github.com/mitchellh/mapstructure v1.3.2 h1:mRS76wmkOn3KkKAyXDu42V+6ebnXWIztFSYGN7GeoRg= github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1 h1:CpVNEelQCZBooIPDn+AR3NpivK/TIKU8bDxdASFVQag= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -837,13 +900,14 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= -github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c h1:3wkDRdxK92dF+c1ke2dtj7ZzemFWBHB9plnJOtlwdFA= github.com/mrjones/oauth v0.0.0-20180629183705-f4e24b6d100c/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM= +github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 h1:j2kD3MT1z4PXCiUllUJF9mWUESr9TWKS7iEKsQ/IipM= +github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450/go.mod h1:skjdDftzkFALcuGzYSklqYd8gvat6F1gZJ4YPVbkZpM= github.com/mschoch/smat v0.0.0-20160514031455-90eadee771ae/go.mod h1:qAyveg+e4CE+eKJXWVjKXM4ck2QobLqTDytGJbLLhJg= github.com/mschoch/smat v0.2.0 h1:8imxQsjDm8yFEAVBe7azKmKSgzSkZXDuKkSq9374khM= github.com/mschoch/smat v0.2.0/go.mod h1:kc9mz7DoBKqDyiRL7VZN8KvXQMWeTaVnttLRXOlotKw= -github.com/msteinert/pam v0.0.0-20200810204841-913b8f8cdf8b h1:UZ7RWBA77dedMow4Zkek/gfJ/DRbti7C+Ny/Pf9D3gM= -github.com/msteinert/pam v0.0.0-20200810204841-913b8f8cdf8b/go.mod h1:np1wUFZ6tyoke22qDJZY40URn9Ae51gX7ljIWXN5TJs= +github.com/msteinert/pam v0.0.0-20201130170657-e61372126161 h1:XQ1+fYPzaWZCVdu1xzjL917Xy9Yb7imLEU0wHelafKA= +github.com/msteinert/pam v0.0.0-20201130170657-e61372126161/go.mod h1:np1wUFZ6tyoke22qDJZY40URn9Ae51gX7ljIWXN5TJs= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -855,42 +919,38 @@ github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxzi github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= -github.com/niklasfasching/go-org v1.3.2 h1:ZKTSd+GdJYkoZl1pBXLR/k7DRiRXnmB96TRiHmHdzwI= -github.com/niklasfasching/go-org v1.3.2/go.mod h1:AsLD6X7djzRIz4/RFZu8vwRL0VGjUvGZCCH1Nz0VdrU= -github.com/nkovacs/streamquote v0.0.0-20170412213628-49af9bddb229/go.mod h1:0aYXnNPJ8l7uZxf45rWW1a/uME32OF0rhiYGNQ2oF2E= +github.com/niklasfasching/go-org v1.5.0 h1:V8IwoSPm/d61bceyWFxxnQLtlvNT+CjiYIhtZLdnMF0= +github.com/niklasfasching/go-org v1.5.0/go.mod h1:sSb8ylwnAG+h8MGFDB3R1D5bxf8wA08REfhjShg3kjA= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= -github.com/olekukonko/tablewriter v0.0.4 h1:vHD/YYe1Wolo78koG299f7V/VAS08c6IpCLn+Ejf/w8= -github.com/olekukonko/tablewriter v0.0.4/go.mod h1:zq6QwlOf5SlnkVbMSr5EoBv3636FWnp+qbPhuoO21uA= +github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= +github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= github.com/oliamb/cutter v0.2.2 h1:Lfwkya0HHNU1YLnGv2hTkzHfasrSMkgv4Dn+5rmlk3k= github.com/oliamb/cutter v0.2.2/go.mod h1:4BenG2/4GuRBDbVm/OPahDVqbrOemzpPiG5mi1iryBU= -github.com/olivere/elastic/v7 v7.0.21 h1:58a2pMlLketCsLyKg8kJNJG+OZIFKrSQXX6gJBpqqlg= -github.com/olivere/elastic/v7 v7.0.21/go.mod h1:Kh7iIsXIBl5qRQOBFoylCsXVTtye3keQU2Y/YbR7HD8= +github.com/olivere/elastic/v7 v7.0.25 h1:q3ef8PqC4PyT3b8BAcjDVo48KNzr0HVKosMqMsF+oME= +github.com/olivere/elastic/v7 v7.0.25/go.mod h1:ySKeM+7yrE9HmsUi6+vSp0anvWiDOuPa9kpuknxjKbU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.10.1 h1:q/mM8GF/n0shIN8SaAZ0V+jnLPzen6WIVZdiwrRlMlo= -github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= -github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M= github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +github.com/onsi/ginkgo v1.15.0 h1:1V1NfVQR87RtWAgp1lv9JZJ5Jap+XFGKPi00andXGi4= +github.com/onsi/ginkgo v1.15.0/go.mod h1:hF8qUzuuC8DJGygJH3726JnCZX4MYbRB8yFfISqnKUg= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= -github.com/onsi/gomega v1.7.0 h1:XPnZz8VVBHjVsy1vzJmRwIcSwiUO+JFfrv/xGiigmME= -github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/onsi/gomega v1.10.5 h1:7n6FEkpFmfCoo2t+YYqXH0evK+a9ICQz0xcAy9dYcaQ= +github.com/onsi/gomega v1.10.5/go.mod h1:gza4q3jKQJijlu05nKWRCW/GavJumGt8aNRxWg7mt48= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= @@ -906,21 +966,18 @@ github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FI github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= -github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= -github.com/pelletier/go-toml v1.8.1 h1:1Nf83orprkJyknT6h7zbuEGUEjcyVlCxSUGTENmNCRM= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= +github.com/pelletier/go-toml v1.9.0 h1:NOd0BRdOKpPf0SxkL3HxSQOG7rNh+4kl6PHcBPFs7Q0= +github.com/pelletier/go-toml v1.9.0/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= -github.com/philhofer/fwd v1.0.0 h1:UbZqGr5Y38ApvM/V/jEljVxwocdweyH+vmYvRPBnbqQ= github.com/philhofer/fwd v1.0.0/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= -github.com/philhofer/fwd v1.1.1 h1:GdGcTjf5RNAxwS4QLsiMzJYj5KEvPJD3Abr261yRQXQ= -github.com/philhofer/fwd v1.1.1/go.mod h1:gk3iGcWd9+svBvR0sR+KPcfE+RNWozjowpeBVG3ZVNU= github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc= github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= -github.com/pierrec/lz4/v4 v4.0.3 h1:vNQKSVZNYUEAvRY9FaUXAF1XPbSOHJtDTiP41kzDz2E= github.com/pierrec/lz4/v4 v4.0.3/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= -github.com/pierrec/lz4/v4 v4.1.1 h1:cS6aGkNLJr4u+UwaA21yp+gbWN3WJWtKo1axmPDObMA= -github.com/pierrec/lz4/v4 v4.1.1/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= +github.com/pierrec/lz4/v4 v4.1.8 h1:ieHkV+i2BRzngO4Wd/3HGowuZStgq6QkPsD1eolNAO4= +github.com/pierrec/lz4/v4 v4.1.8/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= @@ -930,21 +987,20 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= -github.com/pquerna/otp v1.2.0 h1:/A3+Jn+cagqayeR3iHs/L62m5ue7710D35zl1zJ1kok= -github.com/pquerna/otp v1.2.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= +github.com/pquerna/cachecontrol v0.0.0-20201205024021-ac21108117ac/go.mod h1:hoLfEwdY11HjRfKFH6KqnPsfxlo3BP6bJehpDv8t6sQ= +github.com/pquerna/otp v1.3.0 h1:oJV/SkzR33anKXwQU3Of42rL4wbrffP4uvUf1SvS5Xs= +github.com/pquerna/otp v1.3.0/go.mod h1:dkJfzwRKNiegxyNb54X/3fLwhCynbMspSyWKnvi1AEg= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= -github.com/prometheus/client_golang v1.8.0 h1:zvJNkoCFAnYFNC24FV8nW4JdRJ3GIFcLbg65lL/JDcw= -github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= @@ -955,16 +1011,16 @@ github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.14.0 h1:RHRyE8UocrbjU+6UvRzwi6HjiDfxrrBU91TtbKzkGp4= -github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.2.0 h1:wH4vA7pcjKuZzjF7lM8awk4fnuJO6idemZXoKnULUx4= -github.com/prometheus/procfs v0.2.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= +github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= +github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/quasoft/websspi v1.0.0 h1:5nDgdM5xSur9s+B5w2xQ5kxf5nUGqgFgU4W0aDLZ8Mw= github.com/quasoft/websspi v1.0.0/go.mod h1:HmVdl939dQ0WIXZhyik+ARdI03M6bQzaSEKcgpFmewk= @@ -972,36 +1028,41 @@ github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqn github.com/rcrowley/go-metrics v0.0.0-20190826022208-cac0b30c2563/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0 h1:OdAsTTz6OkFY5QxjkYwrChwuRruF69c169dPK26NUlk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/robertkrimen/godocdown v0.0.0-20130622164427-0bfa04905481/go.mod h1:C9WhFzY47SzYBIvzFqSvHIR6ROgDo4TtdTuRaOMjF/s= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= -github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= +github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= +github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= +github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24 h1:pntxY8Ary0t43dCZ5dqY4YTJCObLY1kIXl0uzMv+7DE= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= +github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= +github.com/shopspring/decimal v0.0.0-20200227202807-02e2044944cc/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 h1:bUGsEnyNbVPw06Bs80sCeARAlK8lhwqGyi6UT8ymuGk= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 h1:pXY9qYc/MP5zdvqWEUH6SjNiu7VhSjuVFTFiTcphaLU= github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= github.com/siddontang/go v0.0.0-20180604090527-bdc77568d726/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= -github.com/siddontang/go-snappy v0.0.0-20140704025258-d8f7bb82a96d h1:qQWKKOvHN7Q9c6GdmUteCef2F9ubxMpxY1IKwpIKz68= github.com/siddontang/go-snappy v0.0.0-20140704025258-d8f7bb82a96d/go.mod h1:vq0tzqLRu6TS7Id0wMo2N5QzJoKedVeovOpHjnykSzY= github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92/go.mod h1:mF1DpOSOUiJRMR+FDqaqu3EBqrybQtrDDszLUZ6oxPg= github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= @@ -1011,15 +1072,14 @@ github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMB github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/assertions v1.0.1 h1:voD4ITNjPL5jjBfgR/r8fPIIBrliWrWHeiJApdr3r4w= -github.com/smartystreets/assertions v1.0.1/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/assertions v1.1.1 h1:T/YLemO5Yp7KPzS+lVtu+WsHn8yoSwTfItdAd1r3cck= github.com/smartystreets/assertions v1.1.1/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= -github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v0.0.0-20190731233626-505e41936337/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= @@ -1028,13 +1088,14 @@ github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4k github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= -github.com/spf13/afero v1.3.2 h1:GDarE4TJQI52kYSbSAmLiId1Elfj+xgSDqrUZxFhxlU= -github.com/spf13/afero v1.3.2/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= +github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= +github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1 h1:nFm6S0SMdyzrzcmThSipiEubIDy8WEXKNZ0UOgiRpng= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/cobra v1.1.3/go.mod h1:pGADOWyqRD/YMrPZigI/zbliZ2wVD/23d+is3pSWzOo= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= @@ -1043,12 +1104,12 @@ github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnIn github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= -github.com/spf13/viper v1.7.0 h1:xVKxvI7ouOI5I+U9s2eeiUfMaWBVoXA3AWskkrqK0VM= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf h1:pvbZ0lM0XWPBqUKqFU8cmavspvIl9nulOYwdy6IFRRo= github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02nZ62WenDCkgHFerpIOmW0iT7GKmXM= +github.com/stephens2424/writerset v1.0.2/go.mod h1:aS2JhsMn6eA7e82oNmW4rfsgAOp9COBTTl8mzkwADnc= github.com/steveyen/gtreap v0.1.0 h1:CjhzTa274PyJLJuMZwIzCO1PfC00oRa8d1Kc78bFXJM= github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= @@ -1061,57 +1122,49 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= -github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= +github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/goleveldb v1.0.0 h1:fBdIW9lB4Iz0n9khmH8w27SJ3QEJ7+IgjPEwGSZiFdE= github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ= -github.com/tebeka/snowball v0.4.2/go.mod h1:4IfL14h1lvwZcp1sfXuuc7/7yCsvVffTWxWxCLfFpYg= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c h1:g+WoO5jjkqGAzHWCjJB1zZfXPIAaDpzXIEJ0eS6B5Ok= -github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c/go.mod h1:ahpPrc7HpcfEWDQRZEmnXMzHY03mLDYMCxeDzy46i+8= github.com/tidwall/pretty v1.0.0 h1:HsD+QiTn7sK6flMKIvNmpqz1qrpP3Ps6jOKIKMooyg4= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tinylib/msgp v1.1.0/go.mod h1:+d+yLhGm8mzTaHzB+wgMYrodPfmZrzkirds8fDWklFE= -github.com/tinylib/msgp v1.1.5 h1:2gXmtWueD2HefZHQe1QOy9HVzmFrLOVvsXwXBQ0ayy0= -github.com/tinylib/msgp v1.1.5/go.mod h1:eQsjooMTnV42mHu917E26IogZ2930nFyBQdofk10Udg= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ= github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= github.com/tstranex/u2f v1.0.0 h1:HhJkSzDDlVSVIVt7pDJwCHQj67k7A5EeBgPmeD+pVsQ= github.com/tstranex/u2f v1.0.0/go.mod h1:eahSLaqAS0zsIEv80+vXT7WanXs7MQQDg3j3wGBSayo= -github.com/ttacon/chalk v0.0.0-20160626202418-22c06c80ed31/go.mod h1:onvgF043R+lC5RZ8IT9rBXDaEDnpnw/Cl+HFiw+v/7Q= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= -github.com/ulikunitz/xz v0.5.6 h1:jGHAfXawEGZQ3blwU5wnWKQJvAraT7Ftq9EXjnXYgt8= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= -github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= -github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= +github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= +github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/unknwon/com v0.0.0-20190804042917-757f69c95f3e/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM= github.com/unknwon/com v1.0.1 h1:3d1LTxD+Lnf3soQiD4Cp/0BRB+Rsa/+RTvz8GMMzIXs= github.com/unknwon/com v1.0.1/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM= -github.com/unknwon/i18n v0.0.0-20190805065654-5c6446a380b6/go.mod h1:+5rDk6sDGpl3azws3O+f+GpFSyN9GVr0K8cvQLQM2ZQ= -github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c h1:679/gJXwrsHC3RATr0YYjZvDMJPYN7W9FGSGNoLmKxM= -github.com/unknwon/i18n v0.0.0-20200823051745-09abd91c7f2c/go.mod h1:+5rDk6sDGpl3azws3O+f+GpFSyN9GVr0K8cvQLQM2ZQ= +github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44 h1:7bSo/vjZKVYUoZfxpYh9Y9JV+9hi1gYJp4WIykhrZag= +github.com/unknwon/i18n v0.0.0-20210321134014-0ebbf2df1c44/go.mod h1:+5rDk6sDGpl3azws3O+f+GpFSyN9GVr0K8cvQLQM2ZQ= github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae h1:ihaXiJkaca54IaCSnEXtE/uSZOmPxKZhDfVLrzZLFDs= github.com/unknwon/paginater v0.0.0-20200328080006-042474bd0eae/go.mod h1:1fdkY6xxl6ExVs2QFv7R0F5IRZHKA8RahhB9fMC9RvM= -github.com/unrolled/render v1.0.3 h1:baO+NG1bZSF2WR4zwh+0bMWauWky7DVrTOfvE2w+aFo= -github.com/unrolled/render v1.0.3/go.mod h1:gN9T0NhL4Bfbwu8ann7Ry/TGHYfosul+J0obPf6NBdM= +github.com/unrolled/render v1.4.0 h1:p73obhpsXuE3paXOtcuXTBKgBJpLCfmABnsUiO35x+Q= +github.com/unrolled/render v1.4.0/go.mod h1:cK4RSTTVdND5j9EYEc0LAMOvdG11JeiKjyjfyZRvV2w= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.5 h1:lNq9sAHXK2qfdI8W+GRItjCEkI+2oR4d+MEHy1CKXoU= github.com/urfave/cli v1.22.5/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= -github.com/willf/bitset v1.1.10 h1:NotGKqX0KwQ72NUzqrjZq5ipPNDQex9lo3WpaS8L2sc= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/willf/bitset v1.1.10/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= -github.com/willf/bitset v1.1.11 h1:N7Z7E9UvjW+sGsEl7k/SJrvY2reP1A07MrGuCjIOjRE= -github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= -github.com/xanzy/go-gitlab v0.39.0 h1:7aiZ03fJfCdqoHFhsZq/SoVYp2lR91hfYWmiXLOU5Qo= -github.com/xanzy/go-gitlab v0.39.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= -github.com/xanzy/ssh-agent v0.2.1 h1:TCbipTQL2JiiCprBWx9frJ2eJlCYT00NmctrHxVAr70= -github.com/xanzy/ssh-agent v0.2.1/go.mod h1:mLlQY/MoOhWBj+gOGMQkOeiEvkx+8pJSI+0Bx9h2kr4= +github.com/xanzy/go-gitlab v0.50.1 h1:eH1G0/ZV1j81rhGrtbcePjbM5Ern7mPA4Xjt+yE+2PQ= +github.com/xanzy/go-gitlab v0.50.1/go.mod h1:Q+hQhV508bDPoBijv7YjK/Lvlb4PhVhJdKqXVQrUoAE= +github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI= +github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= @@ -1120,22 +1173,25 @@ github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yohcop/openid-go v1.0.0 h1:EciJ7ZLETHR3wOtxBvKXx9RV6eyHZpCaSZ1inbBaUXE= github.com/yohcop/openid-go v1.0.0/go.mod h1:/408xiwkeItSPJZSTPF7+VtZxPkPrRRpRNK2vjGh6yI= -github.com/yuin/goldmark v1.1.22/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1 h1:ruQGxdhGHe7FWOJPT0mKs5+pD2Xs1Bm/kdGlHO04FmM= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691 h1:VWSxtAiQNh3zgHJpdpkpVYjTPqRE3P6UZCOPa1nRDio= -github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691/go.mod h1:YLF3kDffRfUH/bTxOxHhV6lxwIB3Vfj91rEwNMS9MXo= +github.com/yuin/goldmark v1.3.6/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark v1.4.0 h1:OtISOGfH6sOWa1/qXqqAiOIAO6Z5J3AEAE18WAq6BiQ= +github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= +github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01 h1:0SJnXjE4jDClMW6grE0xpNhwpqbPwkBTn8zpVw5C0SI= +github.com/yuin/goldmark-highlighting v0.0.0-20210516132338-9216f9c5aa01/go.mod h1:TwKQPa5XkCCRC2GRZ5wtfNUTQ2+9/i19mGRijFeJ4BE= github.com/yuin/goldmark-meta v1.0.0 h1:ScsatUIT2gFS6azqzLGUjgOnELsBOxMXerM3ogdJhAM= github.com/yuin/goldmark-meta v1.0.0/go.mod h1:zsNNOrZ4nLuyHAJeLQEZcQat8dm70SmB2kHbls092Gc= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= github.com/ziutek/mymysql v1.5.4/go.mod h1:LMSpPZ6DbqWFxNCHW77HeMg9I646SAhApZ/wKdgO/C0= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= +go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= +go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.jolheiser.com/hcaptcha v0.0.4 h1:RrDERcr/Tz/kWyJenjVtI+V09RtLinXxlAemiwN5F+I= go.jolheiser.com/hcaptcha v0.0.4/go.mod h1:aw32WQOxnQZ6E06C0LypCf+sxNxPACyOnq+ZGnrIYho= @@ -1145,8 +1201,11 @@ go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qL go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= -go.mongodb.org/mongo-driver v1.3.5 h1:S0ZOruh4YGHjD7JoN7mIsTrNjnQbOjrmgrx6l6pZN7I= -go.mongodb.org/mongo-driver v1.3.5/go.mod h1:Ual6Gkco7ZGQw8wE1t4tLnvBsf6yVSM60qW6TgOeJ5c= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1 h1:9nOVLGDfOaZ9R0tBumx/BcuqkbFpyTCU2r/Po7A2azI= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= @@ -1154,16 +1213,32 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opentelemetry.io/otel v0.14.0/go.mod h1:vH5xEuwy7Rts0GNtsCW3HYQoZDY+OmBJ6t1bFGGlxgw= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= +go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= +go.uber.org/goleak v1.1.10 h1:z+mqJhf6ss6BSfSM671tgKyZBFPTTJM+HLxnhPC3wu0= +go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= +go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= +go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.15.0/go.mod h1:Mb2vm2krFEG5DV0W9qcHBYFtp/Wku1cvYaqPsS/WYfc= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= +go.uber.org/zap v1.19.0 h1:mZQZefskPPCMIBCSEH0v2/iUqqLrYtaeqwD6FUGUnFE= +go.uber.org/zap v1.19.0/go.mod h1:xg/QME4nWcxGxrpdeYfq7UvYrLh66cuVKdrbD1XF/NI= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -1180,19 +1255,21 @@ golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190911031432-227b76d455e7/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190927123631-a832865fa7ad/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a h1:vclmkQCjlDX5OydZ9wv8rBCcS0QyQY66Mpf/7BZbInM= -golang.org/x/crypto v0.0.0-20200820211705-5c72a883971a/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 h1:pLI5jrR7OSLijeIDcmRxNmw2api+jEfxLoykJVice/E= -golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/crypto v0.0.0-20201217014255-9d1352758620 h1:3wPMTskHO3+O6jqTEXyFcsnuxMQOqYSaHsDxcbUXpqA= -golang.org/x/crypto v0.0.0-20201217014255-9d1352758620/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= +golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1215,6 +1292,8 @@ golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -1222,15 +1301,17 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1250,7 +1331,6 @@ golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -1268,22 +1348,35 @@ golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200927032502-5d4f70055728/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= -golang.org/x/net v0.0.0-20200930145003-4acb6c075d10 h1:YfxMZzv3PjGonQYNUaeU2+DhAdqOxerQ30JFB6WgAXo= -golang.org/x/net v0.0.0-20200930145003-4acb6c075d10/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200930145003-4acb6c075d10/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20201031054903-ff519b6c9102 h1:42cLlJJdEh+ySyeUUbEQ5bsTiq8voBeTuweGVkY6Puw= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k= +golang.org/x/net v0.0.0-20210331060903-cb1fcc7394e5/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d h1:LO7XpTYMwTqxjLcGWPijK3vRXg1aWdlNOVOHRq45d7c= +golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d h1:TzXSXBo42m9gQenoE3b9BGiEpg5IG2JkU5FkPIawgtw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= -golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43 h1:ld7aEMNHoBnnDAX15v1T6z31v8HwR2A9FYOuAhWqkwc= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210323180902-22b0adad7558/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 h1:3B43BWw0xEBsLZ/NO1VALz6fppU3481pik+2Ksv45z8= +golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1294,6 +1387,9 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1306,7 +1402,6 @@ golang.org/x/sys v0.0.0-20181128092732-4ed8d59d0b35/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181221143128-b4a75ba826a6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190221075227-b4e8571b14e0/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1325,16 +1420,15 @@ golang.org/x/sys v0.0.0-20190730183949-1393eb018365/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191010194322-b09406accb47/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1351,40 +1445,57 @@ golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200923182605-d9f96fdee20d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211 h1:9UQO31fZ+0aKQOFldThf7BKPMJTiBfWycGh/u3UoO88= -golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201211090839-8ad439b19e0f h1:QdHQnPce6K4XQewki9WNbG5KOROuDzqO3NaYjI1cXJ0= -golang.org/x/sys v0.0.0-20201211090839-8ad439b19e0f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/term v0.0.0-20201117132131-f5c789dd3221 h1:/ZHdbVpdR/jk3g30/d4yUL0JU9kksj8+F/bnQUVLGDM= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201126233918-771906719818/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210525143221-35b2ab0089ea/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf h1:2ucpDCmfkl8Bd/FsLtiD653Wf96cW37s+iGx93zsu4k= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.3 h1:cokOdA+Jmi5PJGXLlLllQSgYigAEfHXJAERHVMaCc2k= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.4 h1:0YWbFKbhXG/wIiuHDSKpS0Iy7FSA+u45VtBMfQcFTTc= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e h1:EHBhcS0mlXEAVwNyO2dLfjToGsyY4j24pTs2ScHnX7s= -golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6 h1:Vv0JUPWTyeqUq42B2WJ1FeIDjjvGKoA2Ss+Ts0lAVbs= +golang.org/x/time v0.0.0-20210611083556-38a9dc6acbc6/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -1409,6 +1520,7 @@ golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= @@ -1419,7 +1531,6 @@ golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= -golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= @@ -1430,32 +1541,25 @@ golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapK golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200325010219-a49f79bcc224/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= -golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200717024301-6ddee64345a6/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= -golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= -golang.org/x/tools v0.0.0-20200921210052-fa0125251cc4 h1:v8Jgq9X6Es9K9otVr9jxENEJigepKMZgA9OmrIZDtFA= -golang.org/x/tools v0.0.0-20200921210052-fa0125251cc4/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= golang.org/x/tools v0.0.0-20200928182047-19e03678916f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20200929161345-d7fc70abf50f h1:18s2P7JILnVhIF2+ZtGJQ9czV5bvTsb13/UGtNPDbjA= golang.org/x/tools v0.0.0-20200929161345-d7fc70abf50f/go.mod h1:z6u4i615ZeAfBE4XtMziQW1fSVJXACjjbWkB/mvPzlU= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9 h1:sEvmEcJVKBNUvgCUClbUQeHOAa9U0I2Ce1BooMvVCY4= -golang.org/x/tools v0.0.0-20201022035929-9cf592e881e9/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201124115921-2c860bdd6e78/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1481,22 +1585,21 @@ google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0M google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.32.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= -google.golang.org/appengine v1.6.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= -google.golang.org/appengine v1.6.4/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190404172233-64821d5d2107/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1527,6 +1630,11 @@ google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200929141702-51c3e5b607fe/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1546,6 +1654,9 @@ google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -1555,30 +1666,31 @@ google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2 google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= -google.golang.org/protobuf v1.25.0 h1:Ejskq+SyPohKW+1uil0JJMtmHCgJPJ/qWTxr8qp+R4c= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= +google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= +google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc h1:2gGKlE2+asNV9m7xrywl36YYNnBG5ZQ0r/BOOxqPpmk= gopkg.in/alexcesaro/quotedprintable.v3 v3.0.0-20150716171945-2caba252f4dc/go.mod h1:m7x9LTH6d71AHyAX77c9yqWCCa3UKHcVEj9y7hAtKDk= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df h1:n7WqCuqOuCbNr617RXOY0AWRXxgwEyPp2z+p0+hgMuE= gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df/go.mod h1:LRQQ+SO6ZHR7tOkpBDuZnXENFzX8qRjMDMyPD6BRkCw= gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s= -gopkg.in/ini.v1 v1.44.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.44.2/go.mod h1:M3Cogqpuv0QCi3ExAY5V4uOt4qb/R3xZubo9m8lK5wg= gopkg.in/ini.v1 v1.46.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.57.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.60.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU= gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= @@ -1592,14 +1704,15 @@ gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 h1:tQIYjPdBoyREyB9XMu+nnTclpTYkz2zFM+lzLJFO4gQ= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= +gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -1608,23 +1721,45 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +lukechampine.com/uint128 v1.1.1 h1:pnxCASz787iMf+02ssImqk6OLt+Z5QHMoZyUXR4z6JU= +lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= +modernc.org/cc/v3 v3.33.6 h1:r63dgSzVzRxUpAJFPQWHy1QeZeY1ydNENUDaBx1GqYc= +modernc.org/cc/v3 v3.33.6/go.mod h1:iPJg1pkwXqAV16SNgFBVYmggfMg6xhs+2oiO0vclK3g= +modernc.org/ccgo/v3 v3.9.5 h1:dEuUSf8WN51rDkprFuAqjfchKEzN0WttP/Py3enBwjk= +modernc.org/ccgo/v3 v3.9.5/go.mod h1:umuo2EP2oDSBnD3ckjaVUXMrmeAw8C8OSICVa0iFf60= +modernc.org/httpfs v1.0.6/go.mod h1:7dosgurJGp0sPaRanU53W4xZYKh14wfzX420oZADeHM= +modernc.org/libc v1.7.13-0.20210308123627-12f642a52bb8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= +modernc.org/libc v1.9.8/go.mod h1:U1eq8YWr/Kc1RWCMFUWEdkTg8OTcfLw2kY8EDwl039w= +modernc.org/libc v1.9.11 h1:QUxZMs48Ahg2F7SN41aERvMfGLY2HU/ADnB9DC4Yts8= +modernc.org/libc v1.9.11/go.mod h1:NyF3tsA5ArIjJ83XB0JlqhjTabTCHm9aX4XMPHyQn0Q= +modernc.org/mathutil v1.1.1/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.2.2/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/mathutil v1.4.0 h1:GCjoRaBew8ECCKINQA2nYjzvufFW9YiEuuB+rQ9bn2E= +modernc.org/mathutil v1.4.0/go.mod h1:mZW8CKdRPY1v87qxC/wUdX5O1qDzXMP5TH3wjfpga6E= +modernc.org/memory v1.0.4 h1:utMBrFcpnQDdNsmM6asmyH/FM9TqLPS7XF7otpJmrwM= +modernc.org/memory v1.0.4/go.mod h1:nV2OApxradM3/OVbs2/0OsP6nPfakXpi50C7dcoHXlc= +modernc.org/opt v0.1.1 h1:/0RX92k9vwVeDXj+Xn23DKp2VJubL7k8qNffND6qn3A= +modernc.org/opt v0.1.1/go.mod h1:WdSiB5evDcignE70guQKxYUl14mgWtbClRi5wmkkTX0= +modernc.org/sqlite v1.11.2 h1:ShWQpeD3ag/bmx6TqidBlIWonWmQaSQKls3aenCbt+w= +modernc.org/sqlite v1.11.2/go.mod h1:+mhs/P1ONd+6G7hcAs6irwDi/bjTQ7nLW6LHRBsEa3A= +modernc.org/strutil v1.1.1 h1:xv+J1BXY3Opl2ALrBwyfEikFAj8pmqcpnfmuwUwcozs= +modernc.org/strutil v1.1.1/go.mod h1:DE+MQQ/hjKBZS2zNInV5hhcipt5rLPWkmpbGeW5mmdw= +modernc.org/tcl v1.5.5/go.mod h1:ADkaTUuwukkrlhqwERyq0SM8OvyXo7+TjFz7yAF56EI= +modernc.org/token v1.0.0 h1:a0jaWiNMDhDUtqOj09wvjWWAqd3q7WpBulmL9H2egsk= +modernc.org/token v1.0.0/go.mod h1:UGzOrNV1mAFSEB63lOFHIpNRUVMvYTc6yu1SMY/XTDM= +modernc.org/z v1.0.1/go.mod h1:8/SRk5C/HgiQWCgXdfpb+1RvhORdkz5sw72d3jjtyqA= mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A= mvdan.cc/xurls/v2 v2.2.0/go.mod h1:EV1RMtya9D6G5DMYPGD8zTQzaHet6Jh8gFlRgGRJeO8= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251 h1:mUcz5b3FJbP5Cvdq7Khzn6J9OCUQJaBwgBkCR+MOwSs= strk.kbt.io/projects/go/libravatar v0.0.0-20191008002943-06d1c002b251/go.mod h1:FJGmPh3vz9jSos1L/F91iAgnC/aejc0wIIrF2ZwJxdY= -xorm.io/builder v0.3.6/go.mod h1:LEFAPISnRzG+zxaxj2vPicRwz67BdhFreKg8yv8/TgU= -xorm.io/builder v0.3.7 h1:2pETdKRK+2QG4mLX4oODHEhn5Z8j1m8sXa7jfu+/SZI= xorm.io/builder v0.3.7/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE= -xorm.io/core v0.7.2 h1:mEO22A2Z7a3fPaZMk6gKL/jMD80iiyNwRrX5HOv3XLw= -xorm.io/core v0.7.2/go.mod h1:jJfd0UAEzZ4t87nbQYtVjmqpIODugN6PD2D9E+dJvdM= -xorm.io/xorm v0.8.0/go.mod h1:ZkJLEYLoVyg7amJK/5r779bHyzs2AU8f8VMiP6BM7uY= -xorm.io/xorm v1.0.6 h1:7eco1c8QUpGz+3dztpLDj9gU1bTiQdFC/KtmPaLxUJk= +xorm.io/builder v0.3.9 h1:Sd65/LdWyO7LR8+Cbd+e7mm3sK/7U9k0jS3999IDHMc= +xorm.io/builder v0.3.9/go.mod h1:aUW0S9eb9VCaPohFCH3j7czOx1PMW3i1HrSzbLYGBSE= xorm.io/xorm v1.0.6/go.mod h1:uF9EtbhODq5kNWxMbnBEj8hRRZnlcNSz2t2N7HW/+A4= +xorm.io/xorm v1.2.2 h1:FFBOEvJ++8fYBA9cywf2sxDVmFktl1SpJzTAG1ab06Y= +xorm.io/xorm v1.2.2/go.mod h1:fTG8tSjk6O1BYxwuohZUK+S1glnRycsCF05L1qQyEU0= diff --git a/integrations/README.md b/integrations/README.md index ccb55377f..0b91a7d25 100644 --- a/integrations/README.md +++ b/integrations/README.md @@ -28,7 +28,7 @@ make test-sqlite Setup a mysql database inside docker ``` docker run -e "MYSQL_DATABASE=test" -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" -p 3306:3306 --rm --name mysql mysql:latest #(just ctrl-c to stop db and clean the container) -docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --rm --name elasticsearch elasticsearch:7.6.0 #(in a secound terminal, just ctrl-c to stop db and clean the container) +docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --rm --name elasticsearch elasticsearch:7.6.0 #(in a second terminal, just ctrl-c to stop db and clean the container) ``` Start tests based on the database container ``` diff --git a/integrations/README_ZH.md b/integrations/README_ZH.md index fd3176456..39639f9b8 100644 --- a/integrations/README_ZH.md +++ b/integrations/README_ZH.md @@ -26,7 +26,7 @@ make test-sqlite ## 如何使用 mysql 数据库进行集成测试 首先在docker容器里部署一个 mysql 数据库 ``` -docker run -e "MYSQL_DATABASE=test" -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" -p 3306:3306 --rm --name mysql mysql:5.7 #(just ctrl-c to stop db and clean the container) +docker run -e "MYSQL_DATABASE=test" -e "MYSQL_ALLOW_EMPTY_PASSWORD=yes" -p 3306:3306 --rm --name mysql mysql:8 #(just ctrl-c to stop db and clean the container) ``` 之后便可以基于这个数据库进行集成测试 ``` @@ -36,7 +36,7 @@ TEST_MYSQL_HOST=localhost:3306 TEST_MYSQL_DBNAME=test TEST_MYSQL_USERNAME=root T ## 如何使用 pgsql 数据库进行集成测试 同上,首先在 docker 容器里部署一个 pgsql 数据库 ``` -docker run -e "POSTGRES_DB=test" -p 5432:5432 --rm --name pgsql postgres:9.5 #(just ctrl-c to stop db and clean the container) +docker run -e "POSTGRES_DB=test" -p 5432:5432 --rm --name pgsql postgres:13 #(just ctrl-c to stop db and clean the container) ``` 之后便可以基于这个数据库进行集成测试 ``` diff --git a/integrations/admin_user_test.go b/integrations/admin_user_test.go index f6b4590d2..96233436e 100644 --- a/integrations/admin_user_test.go +++ b/integrations/admin_user_test.go @@ -15,7 +15,7 @@ import ( ) func TestAdminViewUsers(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() session := loginUser(t, "user1") req := NewRequest(t, "GET", "/admin/users") @@ -27,7 +27,7 @@ func TestAdminViewUsers(t *testing.T) { } func TestAdminViewUser(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() session := loginUser(t, "user1") req := NewRequest(t, "GET", "/admin/users/1") @@ -39,7 +39,7 @@ func TestAdminViewUser(t *testing.T) { } func TestAdminEditUser(t *testing.T) { - prepareTestEnv(t) + defer prepareTestEnv(t)() testSuccessfullEdit(t, models.User{ID: 2, Name: "newusername", LoginName: "otherlogin", Email: "new@e-mail.gitea"}) } diff --git a/integrations/api_admin_test.go b/integrations/api_admin_test.go index 79fdc4a9f..da6a89c97 100644 --- a/integrations/api_admin_test.go +++ b/integrations/api_admin_test.go @@ -5,12 +5,12 @@ package integrations import ( - "encoding/json" "fmt" "net/http" "testing" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" "github.com/stretchr/testify/assert" @@ -192,4 +192,18 @@ func TestAPIEditUser(t *testing.T) { errMap := make(map[string]interface{}) json.Unmarshal(resp.Body.Bytes(), &errMap) assert.EqualValues(t, "email is not allowed to be empty string", errMap["message"].(string)) + + user2 := models.AssertExistsAndLoadBean(t, &models.User{LoginName: "user2"}).(*models.User) + assert.False(t, user2.IsRestricted) + bTrue := true + req = NewRequestWithJSON(t, "PATCH", urlStr, api.EditUserOption{ + // required + LoginName: "user2", + SourceID: 0, + // to change + Restricted: &bTrue, + }) + session.MakeRequest(t, req, http.StatusOK) + user2 = models.AssertExistsAndLoadBean(t, &models.User{LoginName: "user2"}).(*models.User) + assert.True(t, user2.IsRestricted) } diff --git a/integrations/api_branch_test.go b/integrations/api_branch_test.go index 26d8fb4b4..d898266af 100644 --- a/integrations/api_branch_test.go +++ b/integrations/api_branch_test.go @@ -151,22 +151,28 @@ func testAPICreateBranches(t *testing.T, giteaURL *url.URL) { for _, test := range tests { defer resetFixtures(t) session := ctx.Session - token := getTokenForLoggedInUser(t, session) - req := NewRequestWithJSON(t, "POST", "/api/v1/repos/user2/my-noo-repo/branches?token="+token, &api.CreateBranchRepoOption{ - BranchName: test.NewBranch, - OldBranchName: test.OldBranch, - }) - resp := session.MakeRequest(t, req, test.ExpectedHTTPStatus) - - var branch api.Branch - DecodeJSON(t, resp, &branch) - - if test.ExpectedHTTPStatus == http.StatusCreated { - assert.EqualValues(t, test.NewBranch, branch.Name) - } + testAPICreateBranch(t, session, "user2", "my-noo-repo", test.OldBranch, test.NewBranch, test.ExpectedHTTPStatus) } } +func testAPICreateBranch(t testing.TB, session *TestSession, user, repo, oldBranch, newBranch string, status int) bool { + token := getTokenForLoggedInUser(t, session) + req := NewRequestWithJSON(t, "POST", "/api/v1/repos/"+user+"/"+repo+"/branches?token="+token, &api.CreateBranchRepoOption{ + BranchName: newBranch, + OldBranchName: oldBranch, + }) + resp := session.MakeRequest(t, req, status) + + var branch api.Branch + DecodeJSON(t, resp, &branch) + + if status == http.StatusCreated { + assert.EqualValues(t, newBranch, branch.Name) + } + + return resp.Result().StatusCode == status +} + func TestAPIBranchProtection(t *testing.T) { defer prepareTestEnv(t)() diff --git a/integrations/api_gpg_keys_test.go b/integrations/api_gpg_keys_test.go index e664c3c25..8fc4124a4 100644 --- a/integrations/api_gpg_keys_test.go +++ b/integrations/api_gpg_keys_test.go @@ -29,14 +29,13 @@ func TestGPGKeys(t *testing.T) { results []int }{ {name: "NoLogin", makeRequest: MakeRequest, token: "", - results: []int{http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized}, + results: []int{http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized, http.StatusUnauthorized}, }, {name: "LoggedAsUser2", makeRequest: session.MakeRequest, token: token, - results: []int{http.StatusOK, http.StatusOK, http.StatusNotFound, http.StatusNoContent, http.StatusUnprocessableEntity, http.StatusNotFound, http.StatusCreated, http.StatusCreated}}, + results: []int{http.StatusOK, http.StatusOK, http.StatusNotFound, http.StatusNoContent, http.StatusUnprocessableEntity, http.StatusNotFound, http.StatusCreated, http.StatusNotFound, http.StatusCreated}}, } for _, tc := range tt { - //Basic test on result code t.Run(tc.name, func(t *testing.T) { t.Run("ViewOwnGPGKeys", func(t *testing.T) { @@ -61,7 +60,7 @@ func TestGPGKeys(t *testing.T) { t.Run("CreateValidGPGKey", func(t *testing.T) { testCreateValidGPGKey(t, tc.makeRequest, tc.token, tc.results[6]) }) - t.Run("CreateValidSecondaryEmailGPGKey", func(t *testing.T) { + t.Run("CreateValidSecondaryEmailGPGKeyNotActivated", func(t *testing.T) { testCreateValidSecondaryEmailGPGKey(t, tc.makeRequest, tc.token, tc.results[7]) }) }) @@ -75,46 +74,32 @@ func TestGPGKeys(t *testing.T) { req := NewRequest(t, "GET", "/api/v1/user/gpg_keys?token="+token) //GET all keys resp := session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &keys) + assert.Len(t, keys, 1) primaryKey1 := keys[0] //Primary key 1 assert.EqualValues(t, "38EA3BCED732982C", primaryKey1.KeyID) - assert.EqualValues(t, 1, len(primaryKey1.Emails)) + assert.Len(t, primaryKey1.Emails, 1) assert.EqualValues(t, "user2@example.com", primaryKey1.Emails[0].Email) - assert.EqualValues(t, true, primaryKey1.Emails[0].Verified) + assert.True(t, primaryKey1.Emails[0].Verified) subKey := primaryKey1.SubsKey[0] //Subkey of 38EA3BCED732982C assert.EqualValues(t, "70D7C694D17D03AD", subKey.KeyID) - assert.EqualValues(t, 0, len(subKey.Emails)) - - primaryKey2 := keys[1] //Primary key 2 - assert.EqualValues(t, "FABF39739FE1E927", primaryKey2.KeyID) - assert.EqualValues(t, 1, len(primaryKey2.Emails)) - assert.EqualValues(t, "user21@example.com", primaryKey2.Emails[0].Email) - assert.EqualValues(t, false, primaryKey2.Emails[0].Verified) + assert.Empty(t, subKey.Emails) var key api.GPGKey req = NewRequest(t, "GET", "/api/v1/user/gpg_keys/"+strconv.FormatInt(primaryKey1.ID, 10)+"?token="+token) //Primary key 1 resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &key) assert.EqualValues(t, "38EA3BCED732982C", key.KeyID) - assert.EqualValues(t, 1, len(key.Emails)) + assert.Len(t, key.Emails, 1) assert.EqualValues(t, "user2@example.com", key.Emails[0].Email) - assert.EqualValues(t, true, key.Emails[0].Verified) + assert.True(t, key.Emails[0].Verified) req = NewRequest(t, "GET", "/api/v1/user/gpg_keys/"+strconv.FormatInt(subKey.ID, 10)+"?token="+token) //Subkey of 38EA3BCED732982C resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &key) assert.EqualValues(t, "70D7C694D17D03AD", key.KeyID) - assert.EqualValues(t, 0, len(key.Emails)) - - req = NewRequest(t, "GET", "/api/v1/user/gpg_keys/"+strconv.FormatInt(primaryKey2.ID, 10)+"?token="+token) //Primary key 2 - resp = session.MakeRequest(t, req, http.StatusOK) - DecodeJSON(t, resp, &key) - assert.EqualValues(t, "FABF39739FE1E927", key.KeyID) - assert.EqualValues(t, 1, len(key.Emails)) - assert.EqualValues(t, "user21@example.com", key.Emails[0].Email) - assert.EqualValues(t, false, key.Emails[0].Verified) - + assert.Empty(t, key.Emails) }) //Check state after basic add @@ -124,7 +109,7 @@ func TestGPGKeys(t *testing.T) { req := NewRequest(t, "GET", "/api/v1/repos/user2/repo16/branches/not-signed?token="+token) resp := session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &branch) - assert.EqualValues(t, false, branch.Commit.Verification.Verified) + assert.False(t, branch.Commit.Verification.Verified) }) t.Run("SignedWithNotValidatedEmail", func(t *testing.T) { @@ -132,7 +117,7 @@ func TestGPGKeys(t *testing.T) { req := NewRequest(t, "GET", "/api/v1/repos/user2/repo16/branches/good-sign-not-yet-validated?token="+token) resp := session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &branch) - assert.EqualValues(t, false, branch.Commit.Verification.Verified) + assert.False(t, branch.Commit.Verification.Verified) }) t.Run("SignedWithValidEmail", func(t *testing.T) { @@ -140,7 +125,7 @@ func TestGPGKeys(t *testing.T) { req := NewRequest(t, "GET", "/api/v1/repos/user2/repo16/branches/good-sign?token="+token) resp := session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &branch) - assert.EqualValues(t, true, branch.Commit.Verification.Verified) + assert.True(t, branch.Commit.Verification.Verified) }) }) } @@ -231,35 +216,46 @@ uy6MA3VSB99SK9ducGmE1Jv8mcziREroz2TEGr0zPs6h } func testCreateValidSecondaryEmailGPGKey(t *testing.T, makeRequest makeRequestFunc, token string, expected int) { - //User2 //secondary and not activated + //User2 //secondary and not activated testCreateGPGKey(t, makeRequest, token, expected, `-----BEGIN PGP PUBLIC KEY BLOCK----- -mQENBFmGWN4BCAC18V4tVGO65VLCV7p14FuXJlUtZ5CuYMvgEkcOqrvRaBSW9ao4 -PGESOhJpfWpnW3QgJniYndLzPpsmdHEclEER6aZjiNgReWPOjHD5tykWocZAJqXD -eY1ym59gvVMLcfbV2yQsyR2hbJlc+dJsl16tigSEe3nwxZSw2IsW92pgEzT9JNUr -Q+mC8dw4dqY0tYmFazYUGNxufUc/twgQT/Or1aNs0az5Q6Jft4rrTRsh/S7We0VB -COKGkdcQyYgAls7HJBuPjQRi6DM9VhgBSHLAgSLyaUcZvhZBJr8Qe/q4PP3/kYDJ -wm4RMnjOLz2pFZPgtRqgcAwpmFtLrACbEB3JABEBAAG0GlVzZXIyIDx1c2VyMjFA -ZXhhbXBsZS5jb20+iQFUBBMBCAA+FiEEPOLHOjPSO42DWM57+r85c5/h6ScFAlmG -WN4CGwMFCQPCZwAFCwkIBwIGFQgJCgsCBBYCAwECHgECF4AACgkQ+r85c5/h6Sfx -Lgf/dq64NBV8+X9an3seaLxePRviva48e4K67/wV/JxtXNO5Z/DhMGz5kHXCsG9D -CXuWYO8ehlTjEnMZ6qqdDnY+H6bQsb2OS5oPn4RwpPXslAjEKtojPAr0dDsMS2DB -dUuIm1AoOnewOVO0OFRf1EqX1bivxnN0FVMcO0m8AczfnKDaGb0y/qg/Y9JAsKqp -j5pZNMWUkntRtGySeJ4CVJMmkVKJAHsa1Qj6MKdFeid4h4y94cBJ4ZdyBxNdpQOx -ydf0doicovfeqGNO4oWzsGP4RBK2CqGPCUT+EFl20jPvMkKwOjxgqc8p0z3b2UT9 -+9bnmCGHgF/fW1HJ3iKmfFPqnLkBDQRZhljeAQgA5AirU/NJGgm19ZJYFOiHftjS -azbrPxGeD3cSqmvDPIMc1DNZGfQV5D4EVumnVbQBtL6xHFoGKz9KisUMbe4a/X2J -S8JmIphQWG0vMJX1DaZIzr2gT71MnPD7JMGsSUCh5dIKpTNTZX4w+oGPGOu0/UlL -x0448AryKwp30J2p6D4GeI0nb03n35S2lTOpnHDn1wj7Jl/8LS2fdFOdNaNHXSZe -twdSwJKhyBEiScgeHBDyKqo8zWkYoSb9eA2HiYlbVaiNtp24KP1mIEpiUdrRjWno -zauYSZGHZlOFMgF4dKWuetPiuH9m7UYZGKyMLfQ9vYFb+xcPh2bLCQHJ1OEmMQAR -AQABiQE8BBgBCAAmFiEEPOLHOjPSO42DWM57+r85c5/h6ScFAlmGWN4CGwwFCQPC -ZwAACgkQ+r85c5/h6Sfjfwf+O4WEjRdvPJLxNy7mfAGoAqDMHIwyH/tVzYgyVhnG -h/+cfRxJbGc3rpjYdr8dmvghzjEAout8uibPWaIqs63RCAPGPqgWLfxNO5c8+y8V -LZMVOTV26l2olkkdBWAuhLqKTNh6TiQva03yhOgHWj4XDvFfxICWPFXVd6t5ELpD -iApGu1OAj8JfhmzbG03Yzx+Ku7bWDxMonx3V/IDEu5LS5zrboHYDKCA53bXXghoi -Aceqql+PKrDwEjoY4bptwMHLmcjGjdCQ//Qx1neho7nZcS7xjTucY8gQuulwCyXF -y6wM+wMz8dunIG9gw4+Re6c4Rz9tX1kzxLrU7Pl21tMqfg== -=0N/9 +mQGNBGC2K2cBDAC1+Xgk+8UfhASVgRngQi4rnQ8k0t+bWsBz4Czd26+cxVDRwlTT +8PALdrbrY/e9iXjcVcZ8Npo4UYe7/LfnL57dc7tgbenRGYYrWyVoNNv58BVw4xCY +RmgvdHWIIPGuz3aME0smHxbJ2KewYTqjTPuVKF/wrHTwCpVWdjYKC5KDo3yx0mro +xf9vOJOnkWNMiEw7TiZfkrbUqxyA53BVsSNKRX5C3b4FJcVT7eiAq7sDAaFxjEHy +ahZslmvg7XZxWzSVzxDNesR7f4xuop8HBjzaluJoVuwiyWculTvz1b6hyHVQr+ad +h8JGjj1tySI65OTFsTuptsfHXjtjl/NR4P6BXkf+FVwweaTQaEzpHkv0m9b9pY43 +CY/8XtS4uNPermiLG/Z0BB1eOCdoOQVHpjOa55IXQWhxXB6NZVyowiUbrR7jLDQy +5JP7D1HmErTR8JRm3VDqGbSaCgugRgFX+lb/fpgFp9k02OeK+JQudolZOt1mVk+T +C4xmEWxfiH15/JMAEQEAAbQbdXNlcjIgPHVzZXIyLTJAZXhhbXBsZS5jb20+iQHU +BBMBCAA+FiEEB/Y4DM3Ba2H9iXmlPO9G70C+/D4FAmC2K2cCGwMFCQPCZwAFCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQPO9G70C+/D59/Av/XZIhCH4X2FpxCO3d +oCa+sbYkBL5xeUoPfAx5ThXzqL/tllO88TKTMEGZF3k5pocXWH0xmhqlvDTcdb0i +W3O0CN8FLmuotU51c0JC1mt9zwJP9PeJNyqxrMm01Yzj55z/Dz3QHSTlDjrWTWjn +YBqDf2HfdM177oydfSYmevZni1aDmBalWpFPRvqISCO7uFnvg1hJQ5mD/0qie663 +QJ8LAAANg32H9DyPnYi9wU62WX0DMUVTjKctT3cnYCbirjjJ7ZlCCm+cf61CRX1B +E1Ng/Ef3ZcUfXWitZSjfET/pKEMSNjsQawFpZ/LPCBl+UPHzaTPAASeGJvcbZ3py +wZQLQc1MCu2hmMBQ8zHQTdS2Pp0RISxCQLYvVQL6DrcJDNiSqn9p9RQt5c5r5Pjx +80BIPcjj3glOVP7PYE2azQAkt6reEjhimwCfjeDpiPnkBTY7Av2jCcUFhhemDY/j +TRXK1paLphhJ36zC22SeHGxNNakjjuUakqB85DEUeoWuVm6ouQGNBGC2K2cBDADx +G2rIAgMjdPtofhkEZXwv6zdNwmYOlIIM+59bam9Ep/vFq8F5f+xldevm5dvM8SeR +pNwDGSOUf5OKBWBdsJFhlYBl7+EcKd/Tent/XS6JoA9ffF33b+r04L543+ykiKON +WYeYi0F4WwYTIQgqZHJze1sPVkYGR5F0bL8PAcLuwd5dzZVi/q2HakrGdg29N8oY +b/XnoR7FflPrNYdzO6hawi5Inx7KS7aWa0ZkARb0F4HSct+/m6nAZVsoJINLudyQ +ut2NWeU8rWIm1hqyIxQFvuQJy46umq++10J/sWA98bkg41Rx+72+eP7DM5v8IgUp +clJsfljRXIBWbmRAVZvtNI7PX9fwMMhf4M7wHO7G2WV39o1exKps5xFFcn8PUQiX +jCSR81M145CgCdmLUR1y0pdkN/WIqjXBhkPIvO2dxEcodMNHb1aUUuUOnww6+xIP +8rGVw+a2DUiALc8Qr5RP21AYKRctfiwhSQh2KODveMtyLI3U9C/eLRPp+QM3XB8A +EQEAAYkBvAQYAQgAJhYhBAf2OAzNwWth/Yl5pTzvRu9Avvw+BQJgtitnAhsMBQkD +wmcAAAoJEDzvRu9Avvw+3FcMAJBwupyJ4zwQFxTJ5BkDlusG3U2FXEf3bDrXhvNd +qi8eS8Vo/vRiH/w/my5JFpz1o2tJToryF71D+uF5DTItalKquhsQ9reAEmXggqOh +9Jd9mWJIEEWcRORiLNDKENKvE8bouw4U4hRaSF0IaGzAe5mO+oOvwal8L97wFxrZ +4leM1GzkopiuNfbkkBBw2KJcMjYBHzzXSCALnVwhjbgkBEWPIg38APT3cr9KfnMM +q8+tvsGLj4piAl3Lww7+GhSsDOUXH8btR41BSAQDrbO5q6oi/h4nuxoNmQIDW/Ug +s+dd5hnY2FtHRjb4FCR9kAjdTE6stc8wzohWfbg1N+12TTA2ylByAumICVXixavH +RJ7l0OiWJk388qw9mqh3k8HcBxL7OfDlFC9oPmCS0iYiIwW/Yc80kBhoxcvl/Xa7 +mIMMn8taHIaQO7v9ln2EVQYTzbNCmwTw9ovTM0j/Pbkg2EftfP1TCoxQHvBnsCED +6qgtsUdi5eviONRkBgeZtN3oxA== +=MgDv -----END PGP PUBLIC KEY BLOCK-----`) } diff --git a/integrations/api_helper_for_declarative_test.go b/integrations/api_helper_for_declarative_test.go index b8e513958..5d44cde5b 100644 --- a/integrations/api_helper_for_declarative_test.go +++ b/integrations/api_helper_for_declarative_test.go @@ -6,17 +6,18 @@ package integrations import ( "context" - "encoding/json" "fmt" "io/ioutil" "net/http" + "net/url" "testing" "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/queue" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/services/forms" "github.com/stretchr/testify/assert" ) @@ -71,6 +72,23 @@ func doAPICreateRepository(ctx APITestContext, empty bool, callback ...func(*tes } } +func doAPIEditRepository(ctx APITestContext, editRepoOption *api.EditRepoOption, callback ...func(*testing.T, api.Repository)) func(*testing.T) { + return func(t *testing.T) { + req := NewRequestWithJSON(t, "PATCH", fmt.Sprintf("/api/v1/repos/%s/%s?token=%s", url.PathEscape(ctx.Username), url.PathEscape(ctx.Reponame), ctx.Token), editRepoOption) + if ctx.ExpectedCode != 0 { + ctx.Session.MakeRequest(t, req, ctx.ExpectedCode) + return + } + resp := ctx.Session.MakeRequest(t, req, http.StatusOK) + + var repository api.Repository + DecodeJSON(t, resp, &repository) + if len(callback) > 0 { + callback[0](t, repository) + } + } +} + func doAPIAddCollaborator(ctx APITestContext, username string, mode models.AccessMode) func(*testing.T) { return func(t *testing.T) { permission := "read" @@ -212,6 +230,26 @@ func doAPICreatePullRequest(ctx APITestContext, owner, repo, baseBranch, headBra expected = ctx.ExpectedCode } resp := ctx.Session.MakeRequest(t, req, expected) + + decoder := json.NewDecoder(resp.Body) + pr := api.PullRequest{} + err := decoder.Decode(&pr) + return pr, err + } +} + +func doAPIGetPullRequest(ctx APITestContext, owner, repo string, index int64) func(*testing.T) (api.PullRequest, error) { + return func(t *testing.T) (api.PullRequest, error) { + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d?token=%s", + owner, repo, index, ctx.Token) + req := NewRequest(t, http.MethodGet, urlStr) + + expected := 200 + if ctx.ExpectedCode != 0 { + expected = ctx.ExpectedCode + } + resp := ctx.Session.MakeRequest(t, req, expected) + decoder := json.NewDecoder(resp.Body) pr := api.PullRequest{} err := decoder.Decode(&pr) @@ -223,7 +261,7 @@ func doAPIMergePullRequest(ctx APITestContext, owner, repo string, index int64) return func(t *testing.T) { urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s", owner, repo, index, ctx.Token) - req := NewRequestWithJSON(t, http.MethodPost, urlStr, &auth.MergePullRequestForm{ + req := NewRequestWithJSON(t, http.MethodPost, urlStr, &forms.MergePullRequestForm{ MergeMessageField: "doAPIMergePullRequest Merge", Do: string(models.MergeStyleMerge), }) @@ -235,7 +273,7 @@ func doAPIMergePullRequest(ctx APITestContext, owner, repo string, index int64) DecodeJSON(t, resp, &err) assert.EqualValues(t, "Please try again later", err.Message) queue.GetManager().FlushAll(context.Background(), 5*time.Second) - req = NewRequestWithJSON(t, http.MethodPost, urlStr, &auth.MergePullRequestForm{ + req = NewRequestWithJSON(t, http.MethodPost, urlStr, &forms.MergePullRequestForm{ MergeMessageField: "doAPIMergePullRequest Merge", Do: string(models.MergeStyleMerge), }) @@ -254,6 +292,23 @@ func doAPIMergePullRequest(ctx APITestContext, owner, repo string, index int64) } } +func doAPIManuallyMergePullRequest(ctx APITestContext, owner, repo, commitID string, index int64) func(*testing.T) { + return func(t *testing.T) { + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s", + owner, repo, index, ctx.Token) + req := NewRequestWithJSON(t, http.MethodPost, urlStr, &forms.MergePullRequestForm{ + Do: string(models.MergeStyleManuallyMerged), + MergeCommitID: commitID, + }) + + if ctx.ExpectedCode != 0 { + ctx.Session.MakeRequest(t, req, ctx.ExpectedCode) + return + } + ctx.Session.MakeRequest(t, req, 200) + } +} + func doAPIGetBranch(ctx APITestContext, branch string, callback ...func(*testing.T, api.Branch)) func(*testing.T) { return func(t *testing.T) { req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/branches/%s?token=%s", ctx.Username, ctx.Reponame, branch, ctx.Token) diff --git a/integrations/api_issue_label_test.go b/integrations/api_issue_label_test.go index ddcfdd661..64c3515dd 100644 --- a/integrations/api_issue_label_test.go +++ b/integrations/api_issue_label_test.go @@ -91,22 +91,22 @@ func TestAPIAddIssueLabels(t *testing.T) { repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) issue := models.AssertExistsAndLoadBean(t, &models.Issue{RepoID: repo.ID}).(*models.Issue) - label := models.AssertExistsAndLoadBean(t, &models.Label{RepoID: repo.ID}).(*models.Label) + _ = models.AssertExistsAndLoadBean(t, &models.Label{RepoID: repo.ID, ID: 2}).(*models.Label) owner := models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session) urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/issues/%d/labels?token=%s", - owner.Name, repo.Name, issue.Index, token) + repo.OwnerName, repo.Name, issue.Index, token) req := NewRequestWithJSON(t, "POST", urlStr, &api.IssueLabelsOption{ - Labels: []int64{label.ID}, + Labels: []int64{1, 2}, }) resp := session.MakeRequest(t, req, http.StatusOK) var apiLabels []*api.Label DecodeJSON(t, resp, &apiLabels) assert.Len(t, apiLabels, models.GetCount(t, &models.IssueLabel{IssueID: issue.ID})) - models.AssertExistsAndLoadBean(t, &models.IssueLabel{IssueID: issue.ID, LabelID: label.ID}) + models.AssertExistsAndLoadBean(t, &models.IssueLabel{IssueID: issue.ID, LabelID: 2}) } func TestAPIReplaceIssueLabels(t *testing.T) { diff --git a/integrations/api_issue_reaction_test.go b/integrations/api_issue_reaction_test.go index 20b83db2a..ad4adc1ea 100644 --- a/integrations/api_issue_reaction_test.go +++ b/integrations/api_issue_reaction_test.go @@ -61,7 +61,7 @@ func TestAPIIssuesReactions(t *testing.T) { DecodeJSON(t, resp, &apiReactions) expectResponse := make(map[int]api.Reaction) expectResponse[0] = api.Reaction{ - User: convert.ToUser(user2, true, true), + User: convert.ToUser(user2, user2), Reaction: "eyes", Created: time.Unix(1573248003, 0), } @@ -121,12 +121,12 @@ func TestAPICommentReactions(t *testing.T) { DecodeJSON(t, resp, &apiReactions) expectResponse := make(map[int]api.Reaction) expectResponse[0] = api.Reaction{ - User: convert.ToUser(user2, true, true), + User: convert.ToUser(user2, user2), Reaction: "laugh", Created: time.Unix(1573248004, 0), } expectResponse[1] = api.Reaction{ - User: convert.ToUser(user1, true, true), + User: convert.ToUser(user1, user1), Reaction: "laugh", Created: time.Unix(1573248005, 0), } diff --git a/integrations/api_issue_stopwatch_test.go b/integrations/api_issue_stopwatch_test.go index 39b9b9741..c0b8fd9c6 100644 --- a/integrations/api_issue_stopwatch_test.go +++ b/integrations/api_issue_stopwatch_test.go @@ -7,7 +7,6 @@ package integrations import ( "net/http" "testing" - "time" "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" @@ -31,14 +30,11 @@ func TestAPIListStopWatches(t *testing.T) { issue := models.AssertExistsAndLoadBean(t, &models.Issue{ID: stopwatch.IssueID}).(*models.Issue) if assert.Len(t, apiWatches, 1) { assert.EqualValues(t, stopwatch.CreatedUnix.AsTime().Unix(), apiWatches[0].Created.Unix()) - apiWatches[0].Created = time.Time{} - assert.EqualValues(t, api.StopWatch{ - Created: time.Time{}, - IssueIndex: issue.Index, - IssueTitle: issue.Title, - RepoName: repo.Name, - RepoOwnerName: repo.OwnerName, - }, *apiWatches[0]) + assert.EqualValues(t, issue.Index, apiWatches[0].IssueIndex) + assert.EqualValues(t, issue.Title, apiWatches[0].IssueTitle) + assert.EqualValues(t, repo.Name, apiWatches[0].RepoName) + assert.EqualValues(t, repo.OwnerName, apiWatches[0].RepoOwnerName) + assert.Greater(t, int64(apiWatches[0].Seconds), int64(0)) } } diff --git a/integrations/api_issue_test.go b/integrations/api_issue_test.go index f932f79fe..245ab76c7 100644 --- a/integrations/api_issue_test.go +++ b/integrations/api_issue_test.go @@ -25,9 +25,10 @@ func TestAPIListIssues(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues?state=all&token=%s", - owner.Name, repo.Name, token) - resp := session.MakeRequest(t, req, http.StatusOK) + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/issues", owner.Name, repo.Name)) + + link.RawQuery = url.Values{"token": {token}, "state": {"all"}}.Encode() + resp := session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) var apiIssues []*api.Issue DecodeJSON(t, resp, &apiIssues) assert.Len(t, apiIssues, models.GetCount(t, &models.Issue{RepoID: repo.ID})) @@ -36,15 +37,34 @@ func TestAPIListIssues(t *testing.T) { } // test milestone filter - req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/issues?state=all&type=all&milestones=ignore,milestone1,3,4&token=%s", - owner.Name, repo.Name, token) - resp = session.MakeRequest(t, req, http.StatusOK) + link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "type": {"all"}, "milestones": {"ignore,milestone1,3,4"}}.Encode() + resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) DecodeJSON(t, resp, &apiIssues) if assert.Len(t, apiIssues, 2) { assert.EqualValues(t, 3, apiIssues[0].Milestone.ID) assert.EqualValues(t, 1, apiIssues[1].Milestone.ID) } + link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "created_by": {"user2"}}.Encode() + resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + if assert.Len(t, apiIssues, 1) { + assert.EqualValues(t, 5, apiIssues[0].ID) + } + + link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "assigned_by": {"user1"}}.Encode() + resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + if assert.Len(t, apiIssues, 1) { + assert.EqualValues(t, 1, apiIssues[0].ID) + } + + link.RawQuery = url.Values{"token": {token}, "state": {"all"}, "mentioned_by": {"user4"}}.Encode() + resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + if assert.Len(t, apiIssues, 1) { + assert.EqualValues(t, 1, apiIssues[0].ID) + } } func TestAPICreateIssue(t *testing.T) { @@ -65,8 +85,8 @@ func TestAPICreateIssue(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusCreated) var apiIssue api.Issue DecodeJSON(t, resp, &apiIssue) - assert.Equal(t, apiIssue.Body, body) - assert.Equal(t, apiIssue.Title, title) + assert.Equal(t, body, apiIssue.Body) + assert.Equal(t, title, apiIssue.Title) models.AssertExistsAndLoadBean(t, &models.Issue{ RepoID: repoBefore.ID, @@ -186,7 +206,7 @@ func TestAPISearchIssues(t *testing.T) { req = NewRequest(t, "GET", link.String()) resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &apiIssues) - assert.EqualValues(t, "14", resp.Header().Get("X-Total-Count")) + assert.EqualValues(t, "15", resp.Header().Get("X-Total-Count")) assert.Len(t, apiIssues, 10) //there are more but 10 is page item limit query.Add("limit", "20") @@ -194,7 +214,7 @@ func TestAPISearchIssues(t *testing.T) { req = NewRequest(t, "GET", link.String()) resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &apiIssues) - assert.Len(t, apiIssues, 14) + assert.Len(t, apiIssues, 15) query = url.Values{"assigned": {"true"}, "state": {"all"}} link.RawQuery = query.Encode() @@ -202,6 +222,41 @@ func TestAPISearchIssues(t *testing.T) { resp = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &apiIssues) assert.Len(t, apiIssues, 1) + + query = url.Values{"milestones": {"milestone1"}, "state": {"all"}} + link.RawQuery = query.Encode() + req = NewRequest(t, "GET", link.String()) + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + assert.Len(t, apiIssues, 1) + + query = url.Values{"milestones": {"milestone1,milestone3"}, "state": {"all"}} + link.RawQuery = query.Encode() + req = NewRequest(t, "GET", link.String()) + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + assert.Len(t, apiIssues, 2) + + query = url.Values{"owner": {"user2"}} // user + link.RawQuery = query.Encode() + req = NewRequest(t, "GET", link.String()) + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + assert.Len(t, apiIssues, 6) + + query = url.Values{"owner": {"user3"}} // organization + link.RawQuery = query.Encode() + req = NewRequest(t, "GET", link.String()) + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + assert.Len(t, apiIssues, 3) + + query = url.Values{"owner": {"user3"}, "team": {"team1"}} // organization + team + link.RawQuery = query.Encode() + req = NewRequest(t, "GET", link.String()) + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &apiIssues) + assert.Len(t, apiIssues, 2) } func TestAPISearchIssuesWithLabels(t *testing.T) { diff --git a/integrations/api_issue_tracked_time_test.go b/integrations/api_issue_tracked_time_test.go index 1a0ee99a4..9731c5a93 100644 --- a/integrations/api_issue_tracked_time_test.go +++ b/integrations/api_issue_tracked_time_test.go @@ -30,7 +30,7 @@ func TestAPIGetTrackedTimes(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusOK) var apiTimes api.TrackedTimeList DecodeJSON(t, resp, &apiTimes) - expect, err := models.GetTrackedTimes(models.FindTrackedTimesOptions{IssueID: issue2.ID}) + expect, err := models.GetTrackedTimes(&models.FindTrackedTimesOptions{IssueID: issue2.ID}) assert.NoError(t, err) assert.Len(t, apiTimes, 3) diff --git a/integrations/api_notification_test.go b/integrations/api_notification_test.go index 420417342..96af14fb8 100644 --- a/integrations/api_notification_test.go +++ b/integrations/api_notification_test.go @@ -45,14 +45,14 @@ func TestAPINotification(t *testing.T) { assert.Len(t, apiNL, 3) assert.EqualValues(t, 4, apiNL[0].ID) - assert.EqualValues(t, true, apiNL[0].Unread) - assert.EqualValues(t, false, apiNL[0].Pinned) + assert.True(t, apiNL[0].Unread) + assert.False(t, apiNL[0].Pinned) assert.EqualValues(t, 3, apiNL[1].ID) - assert.EqualValues(t, false, apiNL[1].Unread) - assert.EqualValues(t, true, apiNL[1].Pinned) + assert.False(t, apiNL[1].Unread) + assert.True(t, apiNL[1].Pinned) assert.EqualValues(t, 2, apiNL[2].ID) - assert.EqualValues(t, false, apiNL[2].Unread) - assert.EqualValues(t, false, apiNL[2].Pinned) + assert.False(t, apiNL[2].Unread) + assert.False(t, apiNL[2].Pinned) // -- GET /repos/{owner}/{repo}/notifications -- req = NewRequest(t, "GET", fmt.Sprintf("/api/v1/repos/%s/%s/notifications?status-types=unread&token=%s", user2.Name, repo1.Name, token)) @@ -74,8 +74,8 @@ func TestAPINotification(t *testing.T) { DecodeJSON(t, resp, &apiN) assert.EqualValues(t, 5, apiN.ID) - assert.EqualValues(t, false, apiN.Pinned) - assert.EqualValues(t, true, apiN.Unread) + assert.False(t, apiN.Pinned) + assert.True(t, apiN.Unread) assert.EqualValues(t, "issue4", apiN.Subject.Title) assert.EqualValues(t, "Issue", apiN.Subject.Type) assert.EqualValues(t, thread5.Issue.APIURL(), apiN.Subject.URL) diff --git a/integrations/api_oauth2_apps_test.go b/integrations/api_oauth2_apps_test.go index 998043a6f..5c90dbb3b 100644 --- a/integrations/api_oauth2_apps_test.go +++ b/integrations/api_oauth2_apps_test.go @@ -92,6 +92,10 @@ func testAPIDeleteOAuth2Application(t *testing.T) { session.MakeRequest(t, req, http.StatusNoContent) models.AssertNotExistsBean(t, &models.OAuth2Application{UID: oldApp.UID, Name: oldApp.Name}) + + // Delete again will return not found + req = NewRequest(t, "DELETE", urlStr) + session.MakeRequest(t, req, http.StatusNotFound) } func testAPIGetOAuth2Application(t *testing.T) { @@ -119,7 +123,7 @@ func testAPIGetOAuth2Application(t *testing.T) { assert.EqualValues(t, existApp.ClientID, expectedApp.ClientID) assert.Len(t, expectedApp.ClientID, 36) assert.Empty(t, expectedApp.ClientSecret) - assert.EqualValues(t, len(expectedApp.RedirectURIs), 1) + assert.Len(t, expectedApp.RedirectURIs, 1) assert.EqualValues(t, existApp.RedirectURIs[0], expectedApp.RedirectURIs[0]) models.AssertExistsAndLoadBean(t, &models.OAuth2Application{ID: expectedApp.ID, Name: expectedApp.Name}) } @@ -152,7 +156,7 @@ func testAPIUpdateOAuth2Application(t *testing.T) { DecodeJSON(t, resp, &app) expectedApp := app - assert.EqualValues(t, len(expectedApp.RedirectURIs), 2) + assert.Len(t, expectedApp.RedirectURIs, 2) assert.EqualValues(t, expectedApp.RedirectURIs[0], appBody.RedirectURIs[0]) assert.EqualValues(t, expectedApp.RedirectURIs[1], appBody.RedirectURIs[1]) models.AssertExistsAndLoadBean(t, &models.OAuth2Application{ID: expectedApp.ID, Name: expectedApp.Name}) diff --git a/integrations/api_org_test.go b/integrations/api_org_test.go index 551da3032..bc4428b99 100644 --- a/integrations/api_org_test.go +++ b/integrations/api_org_test.go @@ -69,7 +69,7 @@ func TestAPIOrgCreate(t *testing.T) { // user1 on this org is public var users []*api.User DecodeJSON(t, resp, &users) - assert.EqualValues(t, 1, len(users)) + assert.Len(t, users, 1) assert.EqualValues(t, "user1", users[0].UserName) }) } diff --git a/integrations/api_pull_commits_test.go b/integrations/api_pull_commits_test.go new file mode 100644 index 000000000..30682d9c1 --- /dev/null +++ b/integrations/api_pull_commits_test.go @@ -0,0 +1,37 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "net/http" + "testing" + + "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" +) + +func TestAPIPullCommits(t *testing.T) { + defer prepareTestEnv(t)() + pullIssue := models.AssertExistsAndLoadBean(t, &models.PullRequest{ID: 2}).(*models.PullRequest) + assert.NoError(t, pullIssue.LoadIssue()) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: pullIssue.HeadRepoID}).(*models.Repository) + + session := loginUser(t, "user2") + req := NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/commits", repo.OwnerName, repo.Name, pullIssue.Index) + resp := session.MakeRequest(t, req, http.StatusOK) + + var commits []*api.Commit + DecodeJSON(t, resp, &commits) + + if !assert.Len(t, commits, 2) { + return + } + + assert.Equal(t, "5f22f7d0d95d614d25a5b68592adb345a4b5c7fd", commits[0].SHA) + assert.Equal(t, "4a357436d925b5c974181ff12a994538ddc5a269", commits[1].SHA) +} + +// TODO add tests for already merged PR and closed PR diff --git a/integrations/api_pull_review_test.go b/integrations/api_pull_review_test.go index 261a3a8bf..b0e380376 100644 --- a/integrations/api_pull_review_test.go +++ b/integrations/api_pull_review_test.go @@ -10,7 +10,9 @@ import ( "testing" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" ) @@ -37,15 +39,15 @@ func TestAPIPullReview(t *testing.T) { assert.EqualValues(t, 8, reviews[3].ID) assert.EqualValues(t, "APPROVED", reviews[3].State) assert.EqualValues(t, 0, reviews[3].CodeCommentsCount) - assert.EqualValues(t, true, reviews[3].Stale) - assert.EqualValues(t, false, reviews[3].Official) + assert.True(t, reviews[3].Stale) + assert.False(t, reviews[3].Official) assert.EqualValues(t, 10, reviews[5].ID) assert.EqualValues(t, "REQUEST_CHANGES", reviews[5].State) assert.EqualValues(t, 1, reviews[5].CodeCommentsCount) assert.EqualValues(t, -1, reviews[5].Reviewer.ID) // ghost user - assert.EqualValues(t, false, reviews[5].Stale) - assert.EqualValues(t, true, reviews[5].Official) + assert.False(t, reviews[5].Stale) + assert.True(t, reviews[5].Official) // test GetPullReview req = NewRequestf(t, http.MethodGet, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, reviews[3].ID, token) @@ -66,7 +68,7 @@ func TestAPIPullReview(t *testing.T) { var reviewComments []*api.PullReviewComment DecodeJSON(t, resp, &reviewComments) assert.Len(t, reviewComments, 1) - assert.EqualValues(t, "Ghost", reviewComments[0].Reviewer.UserName) + assert.EqualValues(t, "Ghost", reviewComments[0].Poster.UserName) assert.EqualValues(t, "a review from a deleted user", reviewComments[0].Body) assert.EqualValues(t, comment.ID, reviewComments[0].ID) assert.EqualValues(t, comment.UpdatedUnix, reviewComments[0].Updated.Unix()) @@ -111,6 +113,22 @@ func TestAPIPullReview(t *testing.T) { assert.EqualValues(t, "APPROVED", review.State) assert.EqualValues(t, 3, review.CodeCommentsCount) + // test dismiss review + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d/dismissals?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, review.ID, token), &api.DismissPullReviewOptions{ + Message: "test", + }) + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &review) + assert.EqualValues(t, 6, review.ID) + assert.True(t, review.Dismissed) + + // test dismiss review + req = NewRequest(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews/%d/undismissals?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, review.ID, token)) + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &review) + assert.EqualValues(t, 6, review.ID) + assert.False(t, review.Dismissed) + // test DeletePullReview req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, token), &api.CreatePullReviewOptions{ Body: "just a comment", @@ -123,6 +141,58 @@ func TestAPIPullReview(t *testing.T) { req = NewRequestf(t, http.MethodDelete, "/api/v1/repos/%s/%s/pulls/%d/reviews/%d?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, review.ID, token) resp = session.MakeRequest(t, req, http.StatusNoContent) + // test CreatePullReview Comment without body but with comments + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, token), &api.CreatePullReviewOptions{ + // Body: "", + Event: "COMMENT", + Comments: []api.CreatePullReviewComment{{ + Path: "README.md", + Body: "first new line", + OldLineNum: 0, + NewLineNum: 1, + }, { + Path: "README.md", + Body: "first old line", + OldLineNum: 1, + NewLineNum: 0, + }, + }, + }) + var commentReview api.PullReview + + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &commentReview) + assert.EqualValues(t, "COMMENT", commentReview.State) + assert.EqualValues(t, 2, commentReview.CodeCommentsCount) + assert.EqualValues(t, "", commentReview.Body) + assert.EqualValues(t, false, commentReview.Dismissed) + + // test CreatePullReview Comment with body but without comments + commentBody := "This is a body of the comment." + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, token), &api.CreatePullReviewOptions{ + Body: commentBody, + Event: "COMMENT", + Comments: []api.CreatePullReviewComment{}, + }) + + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &commentReview) + assert.EqualValues(t, "COMMENT", commentReview.State) + assert.EqualValues(t, 0, commentReview.CodeCommentsCount) + assert.EqualValues(t, commentBody, commentReview.Body) + assert.EqualValues(t, false, commentReview.Dismissed) + + // test CreatePullReview Comment without body and no comments + req = NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/reviews?token=%s", repo.OwnerName, repo.Name, pullIssue.Index, token), &api.CreatePullReviewOptions{ + Body: "", + Event: "COMMENT", + Comments: []api.CreatePullReviewComment{}, + }) + resp = session.MakeRequest(t, req, http.StatusUnprocessableEntity) + errMap := make(map[string]interface{}) + json.Unmarshal(resp.Body.Bytes(), &errMap) + assert.EqualValues(t, "review event COMMENT requires a body or a comment", errMap["message"].(string)) + // test get review requests // to make it simple, use same api with get review pullIssue12 := models.AssertExistsAndLoadBean(t, &models.Issue{ID: 12}).(*models.Issue) @@ -135,15 +205,15 @@ func TestAPIPullReview(t *testing.T) { assert.EqualValues(t, 11, reviews[0].ID) assert.EqualValues(t, "REQUEST_REVIEW", reviews[0].State) assert.EqualValues(t, 0, reviews[0].CodeCommentsCount) - assert.EqualValues(t, false, reviews[0].Stale) - assert.EqualValues(t, true, reviews[0].Official) + assert.False(t, reviews[0].Stale) + assert.True(t, reviews[0].Official) assert.EqualValues(t, "test_team", reviews[0].ReviewerTeam.Name) assert.EqualValues(t, 12, reviews[1].ID) assert.EqualValues(t, "REQUEST_REVIEW", reviews[1].State) assert.EqualValues(t, 0, reviews[0].CodeCommentsCount) - assert.EqualValues(t, false, reviews[1].Stale) - assert.EqualValues(t, true, reviews[1].Official) + assert.False(t, reviews[1].Stale) + assert.True(t, reviews[1].Official) assert.EqualValues(t, 1, reviews[1].Reviewer.ID) } diff --git a/integrations/api_pull_test.go b/integrations/api_pull_test.go index 61daf917f..e6a4aca15 100644 --- a/integrations/api_pull_test.go +++ b/integrations/api_pull_test.go @@ -10,9 +10,9 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/services/forms" issue_service "code.gitea.io/gitea/services/issue" "github.com/stretchr/testify/assert" @@ -50,7 +50,7 @@ func TestAPIMergePullWIP(t *testing.T) { session := loginUser(t, owner.Name) token := getTokenForLoggedInUser(t, session) - req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s", owner.Name, repo.Name, pr.Index, token), &auth.MergePullRequestForm{ + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls/%d/merge?token=%s", owner.Name, repo.Name, pr.Index, token), &forms.MergePullRequestForm{ MergeMessageField: pr.Issue.Title, Do: string(models.MergeStyleMerge), }) @@ -74,8 +74,79 @@ func TestAPICreatePullSuccess(t *testing.T) { Base: "master", Title: "create a failure pr", }) - session.MakeRequest(t, req, 201) + session.MakeRequest(t, req, http.StatusUnprocessableEntity) // second request should fail +} + +func TestAPICreatePullWithFieldsSuccess(t *testing.T) { + defer prepareTestEnv(t)() + // repo10 have code, pulls units. + repo10 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 10}).(*models.Repository) + owner10 := models.AssertExistsAndLoadBean(t, &models.User{ID: repo10.OwnerID}).(*models.User) + // repo11 only have code unit but should still create pulls + repo11 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 11}).(*models.Repository) + owner11 := models.AssertExistsAndLoadBean(t, &models.User{ID: repo11.OwnerID}).(*models.User) + + session := loginUser(t, owner11.Name) + token := getTokenForLoggedInUser(t, session) + + opts := &api.CreatePullRequestOption{ + Head: fmt.Sprintf("%s:master", owner11.Name), + Base: "master", + Title: "create a failure pr", + Body: "foobaaar", + Milestone: 5, + Assignees: []string{owner10.Name}, + Labels: []int64{5}, + } + + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls?token=%s", owner10.Name, repo10.Name, token), opts) + + res := session.MakeRequest(t, req, 201) + pull := new(api.PullRequest) + DecodeJSON(t, res, pull) + + assert.NotNil(t, pull.Milestone) + assert.EqualValues(t, opts.Milestone, pull.Milestone.ID) + if assert.Len(t, pull.Assignees, 1) { + assert.EqualValues(t, opts.Assignees[0], owner10.Name) + } + assert.NotNil(t, pull.Labels) + assert.EqualValues(t, opts.Labels[0], pull.Labels[0].ID) +} + +func TestAPICreatePullWithFieldsFailure(t *testing.T) { + defer prepareTestEnv(t)() + // repo10 have code, pulls units. + repo10 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 10}).(*models.Repository) + owner10 := models.AssertExistsAndLoadBean(t, &models.User{ID: repo10.OwnerID}).(*models.User) + // repo11 only have code unit but should still create pulls + repo11 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 11}).(*models.Repository) + owner11 := models.AssertExistsAndLoadBean(t, &models.User{ID: repo11.OwnerID}).(*models.User) + + session := loginUser(t, owner11.Name) + token := getTokenForLoggedInUser(t, session) + + opts := &api.CreatePullRequestOption{ + Head: fmt.Sprintf("%s:master", owner11.Name), + Base: "master", + } + + req := NewRequestWithJSON(t, http.MethodPost, fmt.Sprintf("/api/v1/repos/%s/%s/pulls?token=%s", owner10.Name, repo10.Name, token), opts) + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + opts.Title = "is required" + + opts.Milestone = 666 + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + opts.Milestone = 5 + + opts.Assignees = []string{"qweruqweroiuyqweoiruywqer"} + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + opts.Assignees = []string{owner10.LoginName} + + opts.Labels = []int64{55555} + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + opts.Labels = []int64{5} } func TestAPIEditPull(t *testing.T) { diff --git a/integrations/api_releases_test.go b/integrations/api_releases_test.go index 8328b014d..027b28203 100644 --- a/integrations/api_releases_test.go +++ b/integrations/api_releases_test.go @@ -7,7 +7,7 @@ package integrations import ( "fmt" "net/http" - "strings" + "net/url" "testing" "code.gitea.io/gitea/models" @@ -17,6 +17,58 @@ import ( "github.com/stretchr/testify/assert" ) +func TestAPIListReleases(t *testing.T) { + defer prepareTestEnv(t)() + + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + session := loginUser(t, user2.LowerName) + token := getTokenForLoggedInUser(t, session) + + link, _ := url.Parse(fmt.Sprintf("/api/v1/repos/%s/%s/releases", user2.Name, repo.Name)) + link.RawQuery = url.Values{"token": {token}}.Encode() + resp := session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) + var apiReleases []*api.Release + DecodeJSON(t, resp, &apiReleases) + if assert.Len(t, apiReleases, 3) { + for _, release := range apiReleases { + switch release.ID { + case 1: + assert.False(t, release.IsDraft) + assert.False(t, release.IsPrerelease) + case 4: + assert.True(t, release.IsDraft) + assert.False(t, release.IsPrerelease) + case 5: + assert.False(t, release.IsDraft) + assert.True(t, release.IsPrerelease) + default: + assert.NoError(t, fmt.Errorf("unexpected release: %v", release)) + } + } + } + + // test filter + testFilterByLen := func(auth bool, query url.Values, expectedLength int, msgAndArgs ...string) { + link.RawQuery = query.Encode() + if auth { + query.Set("token", token) + resp = session.MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) + } else { + resp = MakeRequest(t, NewRequest(t, "GET", link.String()), http.StatusOK) + } + DecodeJSON(t, resp, &apiReleases) + assert.Len(t, apiReleases, expectedLength, msgAndArgs) + } + + testFilterByLen(false, url.Values{"draft": {"true"}}, 0, "anon should not see drafts") + testFilterByLen(true, url.Values{"draft": {"true"}}, 1, "repo owner should see drafts") + testFilterByLen(true, url.Values{"draft": {"false"}}, 2, "exclude drafts") + testFilterByLen(true, url.Values{"draft": {"false"}, "pre-release": {"false"}}, 1, "exclude drafts and pre-releases") + testFilterByLen(true, url.Values{"pre-release": {"true"}}, 1, "only get pre-release") + testFilterByLen(true, url.Values{"draft": {"true"}, "pre-release": {"true"}}, 0, "there is no pre-release draft") +} + func createNewReleaseUsingAPI(t *testing.T, session *TestSession, token string, owner *models.User, repo *models.Repository, name, target, title, desc string) *api.Release { urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases?token=%s", owner.Name, repo.Name, token) @@ -131,7 +183,7 @@ func TestAPIGetReleaseByTag(t *testing.T) { tag := "v1.1" - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s/", + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s", owner.Name, repo.Name, tag) req := NewRequestf(t, "GET", urlStr) @@ -144,7 +196,7 @@ func TestAPIGetReleaseByTag(t *testing.T) { nonexistingtag := "nonexistingtag" - urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s/", + urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/%s", owner.Name, repo.Name, nonexistingtag) req = NewRequestf(t, "GET", urlStr) @@ -152,10 +204,10 @@ func TestAPIGetReleaseByTag(t *testing.T) { var err *api.APIError DecodeJSON(t, resp, &err) - assert.True(t, strings.HasPrefix(err.Message, "release tag does not exist")) + assert.EqualValues(t, "Not Found", err.Message) } -func TestAPIDeleteTagByName(t *testing.T) { +func TestAPIDeleteReleaseByTagName(t *testing.T) { defer prepareTestEnv(t)() repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) @@ -163,17 +215,17 @@ func TestAPIDeleteTagByName(t *testing.T) { session := loginUser(t, owner.LowerName) token := getTokenForLoggedInUser(t, session) - urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/delete-tag/?token=%s", - owner.Name, repo.Name, token) + createNewReleaseUsingAPI(t, session, token, owner, repo, "release-tag", "", "Release Tag", "test") - req := NewRequestf(t, http.MethodDelete, urlStr) + // delete release + req := NewRequestf(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/release-tag?token=%s", owner.Name, repo.Name, token)) _ = session.MakeRequest(t, req, http.StatusNoContent) - // Make sure that actual releases can't be deleted outright - createNewReleaseUsingAPI(t, session, token, owner, repo, "release-tag", "", "Release Tag", "test") - urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/release-tag/?token=%s", - owner.Name, repo.Name, token) + // make sure release is deleted + req = NewRequestf(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/releases/tags/release-tag?token=%s", owner.Name, repo.Name, token)) + _ = session.MakeRequest(t, req, http.StatusNotFound) - req = NewRequestf(t, http.MethodDelete, urlStr) - _ = session.MakeRequest(t, req, http.StatusConflict) + // delete release tag too + req = NewRequestf(t, http.MethodDelete, fmt.Sprintf("/api/v1/repos/%s/%s/tags/release-tag?token=%s", owner.Name, repo.Name, token)) + _ = session.MakeRequest(t, req, http.StatusNoContent) } diff --git a/integrations/api_repo_edit_test.go b/integrations/api_repo_edit_test.go index c1b513d07..618c1f0ad 100644 --- a/integrations/api_repo_edit_test.go +++ b/integrations/api_repo_edit_test.go @@ -130,11 +130,14 @@ func getNewRepoEditOption(opts *api.EditRepoOption) *api.EditRepoOption { func TestAPIRepoEdit(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { + bFalse, bTrue := false, true + user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo1 & repo16 user3 := models.AssertExistsAndLoadBean(t, &models.User{ID: 3}).(*models.User) // owner of the repo3, is an org user4 := models.AssertExistsAndLoadBean(t, &models.User{ID: 4}).(*models.User) // owner of neither repos repo1 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) // public repo repo3 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 3}).(*models.Repository) // public repo + repo15 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 15}).(*models.Repository) // empty repo repo16 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 16}).(*models.Repository) // private repo // Get user2's token @@ -286,9 +289,8 @@ func TestAPIRepoEdit(t *testing.T) { // Test making a repo public that is private repo16 = models.AssertExistsAndLoadBean(t, &models.Repository{ID: 16}).(*models.Repository) assert.True(t, repo16.IsPrivate) - private := false repoEditOption = &api.EditRepoOption{ - Private: &private, + Private: &bFalse, } url = fmt.Sprintf("/api/v1/repos/%s/%s?token=%s", user2.Name, repo16.Name, token2) req = NewRequestWithJSON(t, "PATCH", url, &repoEditOption) @@ -296,11 +298,24 @@ func TestAPIRepoEdit(t *testing.T) { repo16 = models.AssertExistsAndLoadBean(t, &models.Repository{ID: 16}).(*models.Repository) assert.False(t, repo16.IsPrivate) // Make it private again - private = true - repoEditOption.Private = &private + repoEditOption.Private = &bTrue req = NewRequestWithJSON(t, "PATCH", url, &repoEditOption) _ = session.MakeRequest(t, req, http.StatusOK) + // Test to change empty repo + assert.False(t, repo15.IsArchived) + url = fmt.Sprintf("/api/v1/repos/%s/%s?token=%s", user2.Name, repo15.Name, token2) + req = NewRequestWithJSON(t, "PATCH", url, &api.EditRepoOption{ + Archived: &bTrue, + }) + _ = session.MakeRequest(t, req, http.StatusOK) + repo15 = models.AssertExistsAndLoadBean(t, &models.Repository{ID: 15}).(*models.Repository) + assert.True(t, repo15.IsArchived) + req = NewRequestWithJSON(t, "PATCH", url, &api.EditRepoOption{ + Archived: &bFalse, + }) + _ = session.MakeRequest(t, req, http.StatusOK) + // Test using org repo "user3/repo3" where user2 is a collaborator origRepoEditOption = getRepoEditOptionFromRepo(repo3) repoEditOption = getNewRepoEditOption(origRepoEditOption) diff --git a/integrations/api_repo_file_create_test.go b/integrations/api_repo_file_create_test.go index 853224f09..17ed6cb7c 100644 --- a/integrations/api_repo_file_create_test.go +++ b/integrations/api_repo_file_create_test.go @@ -105,6 +105,36 @@ func getExpectedFileResponseForCreate(commitID, treePath string) *api.FileRespon } } +func BenchmarkAPICreateFileSmall(b *testing.B) { + onGiteaRunTB(b, func(t testing.TB, u *url.URL) { + b := t.(*testing.B) + user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo1 & repo16 + repo1 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) // public repo + + for n := 0; n < b.N; n++ { + treePath := fmt.Sprintf("update/file%d.txt", n) + createFileInBranch(user2, repo1, treePath, repo1.DefaultBranch, treePath) + } + }) +} + +func BenchmarkAPICreateFileMedium(b *testing.B) { + data := make([]byte, 10*1024*1024) + + onGiteaRunTB(b, func(t testing.TB, u *url.URL) { + b := t.(*testing.B) + user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo1 & repo16 + repo1 := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) // public repo + + b.ResetTimer() + for n := 0; n < b.N; n++ { + treePath := fmt.Sprintf("update/file%d.txt", n) + copy(data, treePath) + createFileInBranch(user2, repo1, treePath, repo1.DefaultBranch, treePath) + } + }) +} + func TestAPICreateFile(t *testing.T) { onGiteaRun(t, func(t *testing.T, u *url.URL) { user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo1 & repo16 diff --git a/integrations/api_repo_file_helpers.go b/integrations/api_repo_file_helpers.go index 80fefe8ab..1dba136de 100644 --- a/integrations/api_repo_file_helpers.go +++ b/integrations/api_repo_file_helpers.go @@ -10,11 +10,11 @@ import ( api "code.gitea.io/gitea/modules/structs" ) -func createFileInBranch(user *models.User, repo *models.Repository, treePath, branchName string) (*api.FileResponse, error) { +func createFileInBranch(user *models.User, repo *models.Repository, treePath, branchName, content string) (*api.FileResponse, error) { opts := &repofiles.UpdateRepoFileOptions{ OldBranch: branchName, TreePath: treePath, - Content: "This is a NEW file", + Content: content, IsNewFile: true, Author: nil, Committer: nil, @@ -23,5 +23,5 @@ func createFileInBranch(user *models.User, repo *models.Repository, treePath, br } func createFile(user *models.User, repo *models.Repository, treePath string) (*api.FileResponse, error) { - return createFileInBranch(user, repo, treePath, repo.DefaultBranch) + return createFileInBranch(user, repo, treePath, repo.DefaultBranch, "This is a NEW file") } diff --git a/integrations/api_repo_git_commits_test.go b/integrations/api_repo_git_commits_test.go index 5b0f82e85..d6bd5fc62 100644 --- a/integrations/api_repo_git_commits_test.go +++ b/integrations/api_repo_git_commits_test.go @@ -14,6 +14,14 @@ import ( "github.com/stretchr/testify/assert" ) +func compareCommitFiles(t *testing.T, expect []string, files []*api.CommitAffectedFiles) { + var actual []string + for i := range files { + actual = append(actual, files[i].Filename) + } + assert.ElementsMatch(t, expect, actual) +} + func TestAPIReposGitCommits(t *testing.T) { defer prepareTestEnv(t)() user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) @@ -56,10 +64,13 @@ func TestAPIReposGitCommitList(t *testing.T) { var apiData []api.Commit DecodeJSON(t, resp, &apiData) - assert.Equal(t, 3, len(apiData)) - assert.Equal(t, "69554a64c1e6030f051e5c3f94bfbd773cd6a324", apiData[0].CommitMeta.SHA) - assert.Equal(t, "27566bd5738fc8b4e3fef3c5e72cce608537bd95", apiData[1].CommitMeta.SHA) - assert.Equal(t, "5099b81332712fe655e34e8dd63574f503f61811", apiData[2].CommitMeta.SHA) + assert.Len(t, apiData, 3) + assert.EqualValues(t, "69554a64c1e6030f051e5c3f94bfbd773cd6a324", apiData[0].CommitMeta.SHA) + compareCommitFiles(t, []string{"readme.md"}, apiData[0].Files) + assert.EqualValues(t, "27566bd5738fc8b4e3fef3c5e72cce608537bd95", apiData[1].CommitMeta.SHA) + compareCommitFiles(t, []string{"readme.md"}, apiData[1].Files) + assert.EqualValues(t, "5099b81332712fe655e34e8dd63574f503f61811", apiData[2].CommitMeta.SHA) + compareCommitFiles(t, []string{"readme.md"}, apiData[2].Files) } func TestAPIReposGitCommitListPage2Empty(t *testing.T) { @@ -76,7 +87,7 @@ func TestAPIReposGitCommitListPage2Empty(t *testing.T) { var apiData []api.Commit DecodeJSON(t, resp, &apiData) - assert.Equal(t, 0, len(apiData)) + assert.Len(t, apiData, 0) } func TestAPIReposGitCommitListDifferentBranch(t *testing.T) { @@ -93,6 +104,7 @@ func TestAPIReposGitCommitListDifferentBranch(t *testing.T) { var apiData []api.Commit DecodeJSON(t, resp, &apiData) - assert.Equal(t, 1, len(apiData)) + assert.Len(t, apiData, 1) assert.Equal(t, "f27c2b2b03dcab38beaf89b0ab4ff61f6de63441", apiData[0].CommitMeta.SHA) + compareCommitFiles(t, []string{"readme.md"}, apiData[0].Files) } diff --git a/integrations/api_repo_git_notes_test.go b/integrations/api_repo_git_notes_test.go new file mode 100644 index 000000000..6eae5e970 --- /dev/null +++ b/integrations/api_repo_git_notes_test.go @@ -0,0 +1,39 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "net/http" + "net/url" + "testing" + + "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" +) + +func TestAPIReposGitNotes(t *testing.T) { + onGiteaRun(t, func(*testing.T, *url.URL) { + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + // Login as User2. + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session) + + // check invalid requests + req := NewRequestf(t, "GET", "/api/v1/repos/%s/repo1/git/notes/12345?token=%s", user.Name, token) + session.MakeRequest(t, req, http.StatusNotFound) + + req = NewRequestf(t, "GET", "/api/v1/repos/%s/repo1/git/notes/..?token=%s", user.Name, token) + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + + // check valid request + req = NewRequestf(t, "GET", "/api/v1/repos/%s/repo1/git/notes/65f1bf27bc3bf70f64657658635e66094edbcb4d?token=%s", user.Name, token) + resp := session.MakeRequest(t, req, http.StatusOK) + + var apiData api.Note + DecodeJSON(t, resp, &apiData) + assert.Equal(t, "This is a test note\n", apiData.Message) + }) +} diff --git a/integrations/api_repo_git_tags_test.go b/integrations/api_repo_git_tags_test.go index ad710a452..bf6fc7c85 100644 --- a/integrations/api_repo_git_tags_test.go +++ b/integrations/api_repo_git_tags_test.go @@ -5,6 +5,7 @@ package integrations import ( + "fmt" "net/http" "testing" @@ -59,3 +60,26 @@ func TestAPIGitTags(t *testing.T) { badReq := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/git/tags/%s?token=%s", user.Name, repo.Name, commit.ID.String(), token) session.MakeRequest(t, badReq, http.StatusBadRequest) } + +func TestAPIDeleteTagByName(t *testing.T) { + defer prepareTestEnv(t)() + + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + owner := models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) + session := loginUser(t, owner.LowerName) + token := getTokenForLoggedInUser(t, session) + + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/tags/delete-tag?token=%s", + owner.Name, repo.Name, token) + + req := NewRequestf(t, http.MethodDelete, urlStr) + _ = session.MakeRequest(t, req, http.StatusNoContent) + + // Make sure that actual releases can't be deleted outright + createNewReleaseUsingAPI(t, session, token, owner, repo, "release-tag", "", "Release Tag", "test") + urlStr = fmt.Sprintf("/api/v1/repos/%s/%s/tags/release-tag?token=%s", + owner.Name, repo.Name, token) + + req = NewRequestf(t, http.MethodDelete, urlStr) + _ = session.MakeRequest(t, req, http.StatusConflict) +} diff --git a/integrations/api_repo_lfs_locks_test.go b/integrations/api_repo_lfs_locks_test.go index 69981d1c4..03549c11f 100644 --- a/integrations/api_repo_lfs_locks_test.go +++ b/integrations/api_repo_lfs_locks_test.go @@ -11,6 +11,7 @@ import ( "time" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -40,11 +41,11 @@ func TestAPILFSLocksNotLogin(t *testing.T) { repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) req := NewRequestf(t, "GET", "/%s/%s.git/info/lfs/locks", user.Name, repo.Name) - req.Header.Set("Accept", "application/vnd.git-lfs+json") + req.Header.Set("Accept", lfs.MediaType) resp := MakeRequest(t, req, http.StatusUnauthorized) var lfsLockError api.LFSLockError DecodeJSON(t, resp, &lfsLockError) - assert.Equal(t, "Unauthorized", lfsLockError.Message) + assert.Equal(t, "You must have pull access to list locks", lfsLockError.Message) } func TestAPILFSLocksLogged(t *testing.T) { @@ -102,8 +103,8 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range tests { session := loginUser(t, test.user.Name) req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks", test.repo.FullName()), map[string]string{"path": test.path}) - req.Header.Set("Accept", "application/vnd.git-lfs+json") - req.Header.Set("Content-Type", "application/vnd.git-lfs+json") + req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Content-Type", lfs.MediaType) resp := session.MakeRequest(t, req, test.httpResult) if len(test.addTime) > 0 { var lfsLock api.LFSLockResponse @@ -119,7 +120,7 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range resultsTests { session := loginUser(t, test.user.Name) req := NewRequestf(t, "GET", "/%s.git/info/lfs/locks", test.repo.FullName()) - req.Header.Set("Accept", "application/vnd.git-lfs+json") + req.Header.Set("Accept", lfs.MediaType) resp := session.MakeRequest(t, req, http.StatusOK) var lfsLocks api.LFSLockList DecodeJSON(t, resp, &lfsLocks) @@ -131,8 +132,8 @@ func TestAPILFSLocksLogged(t *testing.T) { } req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks/verify", test.repo.FullName()), map[string]string{}) - req.Header.Set("Accept", "application/vnd.git-lfs+json") - req.Header.Set("Content-Type", "application/vnd.git-lfs+json") + req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Content-Type", lfs.MediaType) resp = session.MakeRequest(t, req, http.StatusOK) var lfsLocksVerify api.LFSLockListVerify DecodeJSON(t, resp, &lfsLocksVerify) @@ -155,8 +156,8 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range deleteTests { session := loginUser(t, test.user.Name) req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/%s.git/info/lfs/locks/%s/unlock", test.repo.FullName(), test.lockID), map[string]string{}) - req.Header.Set("Accept", "application/vnd.git-lfs+json") - req.Header.Set("Content-Type", "application/vnd.git-lfs+json") + req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Content-Type", lfs.MediaType) resp := session.MakeRequest(t, req, http.StatusOK) var lfsLockRep api.LFSLockResponse DecodeJSON(t, resp, &lfsLockRep) @@ -168,7 +169,7 @@ func TestAPILFSLocksLogged(t *testing.T) { for _, test := range resultsTests { session := loginUser(t, test.user.Name) req := NewRequestf(t, "GET", "/%s.git/info/lfs/locks", test.repo.FullName()) - req.Header.Set("Accept", "application/vnd.git-lfs+json") + req.Header.Set("Accept", lfs.MediaType) resp := session.MakeRequest(t, req, http.StatusOK) var lfsLocks api.LFSLockList DecodeJSON(t, resp, &lfsLocks) diff --git a/integrations/api_repo_lfs_migrate_test.go b/integrations/api_repo_lfs_migrate_test.go new file mode 100644 index 000000000..7280658b7 --- /dev/null +++ b/integrations/api_repo_lfs_migrate_test.go @@ -0,0 +1,49 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "net/http" + "path" + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" + + "github.com/stretchr/testify/assert" +) + +func TestAPIRepoLFSMigrateLocal(t *testing.T) { + defer prepareTestEnv(t)() + + oldImportLocalPaths := setting.ImportLocalPaths + oldAllowLocalNetworks := setting.Migrations.AllowLocalNetworks + setting.ImportLocalPaths = true + setting.Migrations.AllowLocalNetworks = true + + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User) + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session) + + req := NewRequestWithJSON(t, "POST", "/api/v1/repos/migrate?token="+token, &api.MigrateRepoOptions{ + CloneAddr: path.Join(setting.RepoRootPath, "migration/lfs-test.git"), + RepoOwnerID: user.ID, + RepoName: "lfs-test-local", + LFS: true, + }) + resp := MakeRequest(t, req, NoExpectedStatus) + assert.EqualValues(t, http.StatusCreated, resp.Code) + + store := lfs.NewContentStore() + ok, _ := store.Verify(lfs.Pointer{Oid: "fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041", Size: 6}) + assert.True(t, ok) + ok, _ = store.Verify(lfs.Pointer{Oid: "d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152", Size: 6}) + assert.True(t, ok) + + setting.ImportLocalPaths = oldImportLocalPaths + setting.Migrations.AllowLocalNetworks = oldAllowLocalNetworks +} diff --git a/integrations/api_repo_lfs_test.go b/integrations/api_repo_lfs_test.go new file mode 100644 index 000000000..56a6fa81f --- /dev/null +++ b/integrations/api_repo_lfs_test.go @@ -0,0 +1,475 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "bytes" + "net/http" + "path" + "strconv" + "strings" + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/setting" + + "github.com/stretchr/testify/assert" +) + +func TestAPILFSNotStarted(t *testing.T) { + defer prepareTestEnv(t)() + + setting.LFS.StartServer = false + + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + req := NewRequestf(t, "POST", "/%s/%s.git/info/lfs/objects/batch", user.Name, repo.Name) + MakeRequest(t, req, http.StatusNotFound) + req = NewRequestf(t, "PUT", "/%s/%s.git/info/lfs/objects/oid/10", user.Name, repo.Name) + MakeRequest(t, req, http.StatusNotFound) + req = NewRequestf(t, "GET", "/%s/%s.git/info/lfs/objects/oid/name", user.Name, repo.Name) + MakeRequest(t, req, http.StatusNotFound) + req = NewRequestf(t, "GET", "/%s/%s.git/info/lfs/objects/oid", user.Name, repo.Name) + MakeRequest(t, req, http.StatusNotFound) + req = NewRequestf(t, "POST", "/%s/%s.git/info/lfs/verify", user.Name, repo.Name) + MakeRequest(t, req, http.StatusNotFound) +} + +func TestAPILFSMediaType(t *testing.T) { + defer prepareTestEnv(t)() + + setting.LFS.StartServer = true + + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + req := NewRequestf(t, "POST", "/%s/%s.git/info/lfs/objects/batch", user.Name, repo.Name) + MakeRequest(t, req, http.StatusUnsupportedMediaType) + req = NewRequestf(t, "POST", "/%s/%s.git/info/lfs/verify", user.Name, repo.Name) + MakeRequest(t, req, http.StatusUnsupportedMediaType) +} + +func createLFSTestRepository(t *testing.T, name string) *models.Repository { + ctx := NewAPITestContext(t, "user2", "lfs-"+name+"-repo") + t.Run("CreateRepo", doAPICreateRepository(ctx, false)) + + repo, err := models.GetRepositoryByOwnerAndName("user2", "lfs-"+name+"-repo") + assert.NoError(t, err) + + return repo +} + +func TestAPILFSBatch(t *testing.T) { + defer prepareTestEnv(t)() + + setting.LFS.StartServer = true + + repo := createLFSTestRepository(t, "batch") + + content := []byte("dummy1") + oid := storeObjectInRepo(t, repo.ID, &content) + defer repo.RemoveLFSMetaObjectByOid(oid) + + session := loginUser(t, "user2") + + newRequest := func(t testing.TB, br *lfs.BatchRequest) *http.Request { + req := NewRequestWithJSON(t, "POST", "/user2/lfs-batch-repo.git/info/lfs/objects/batch", br) + req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Content-Type", lfs.MediaType) + return req + } + decodeResponse := func(t *testing.T, b *bytes.Buffer) *lfs.BatchResponse { + var br lfs.BatchResponse + + assert.NoError(t, json.Unmarshal(b.Bytes(), &br)) + return &br + } + + t.Run("InvalidJsonRequest", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, nil) + + session.MakeRequest(t, req, http.StatusBadRequest) + }) + + t.Run("InvalidOperation", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "dummy", + }) + + session.MakeRequest(t, req, http.StatusBadRequest) + }) + + t.Run("InvalidPointer", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "download", + Objects: []lfs.Pointer{ + {Oid: "dummy"}, + {Oid: oid, Size: -1}, + }, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 2) + assert.Equal(t, "dummy", br.Objects[0].Oid) + assert.Equal(t, oid, br.Objects[1].Oid) + assert.Equal(t, int64(0), br.Objects[0].Size) + assert.Equal(t, int64(-1), br.Objects[1].Size) + assert.NotNil(t, br.Objects[0].Error) + assert.NotNil(t, br.Objects[1].Error) + assert.Equal(t, http.StatusUnprocessableEntity, br.Objects[0].Error.Code) + assert.Equal(t, http.StatusUnprocessableEntity, br.Objects[1].Error.Code) + assert.Equal(t, "Oid or size are invalid", br.Objects[0].Error.Message) + assert.Equal(t, "Oid or size are invalid", br.Objects[1].Error.Message) + }) + + t.Run("PointerSizeMismatch", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "download", + Objects: []lfs.Pointer{ + {Oid: oid, Size: 1}, + }, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.NotNil(t, br.Objects[0].Error) + assert.Equal(t, http.StatusUnprocessableEntity, br.Objects[0].Error.Code) + assert.Equal(t, "Object "+oid+" is not 1 bytes", br.Objects[0].Error.Message) + }) + + t.Run("Download", func(t *testing.T) { + defer PrintCurrentTest(t)() + + t.Run("PointerNotInStore", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "download", + Objects: []lfs.Pointer{ + {Oid: "fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab042", Size: 6}, + }, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.NotNil(t, br.Objects[0].Error) + assert.Equal(t, http.StatusNotFound, br.Objects[0].Error.Code) + }) + + t.Run("MetaNotFound", func(t *testing.T) { + defer PrintCurrentTest(t)() + + p := lfs.Pointer{Oid: "05eeb4eb5be71f2dd291ca39157d6d9effd7d1ea19cbdc8a99411fe2a8f26a00", Size: 6} + + contentStore := lfs.NewContentStore() + exist, err := contentStore.Exists(p) + assert.NoError(t, err) + assert.False(t, exist) + err = contentStore.Put(p, bytes.NewReader([]byte("dummy0"))) + assert.NoError(t, err) + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "download", + Objects: []lfs.Pointer{p}, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.NotNil(t, br.Objects[0].Error) + assert.Equal(t, http.StatusNotFound, br.Objects[0].Error.Code) + }) + + t.Run("Success", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "download", + Objects: []lfs.Pointer{ + {Oid: oid, Size: 6}, + }, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.Nil(t, br.Objects[0].Error) + assert.Contains(t, br.Objects[0].Actions, "download") + l := br.Objects[0].Actions["download"] + assert.NotNil(t, l) + assert.NotEmpty(t, l.Href) + }) + }) + + t.Run("Upload", func(t *testing.T) { + defer PrintCurrentTest(t)() + + t.Run("FileTooBig", func(t *testing.T) { + defer PrintCurrentTest(t)() + + oldMaxFileSize := setting.LFS.MaxFileSize + setting.LFS.MaxFileSize = 2 + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "upload", + Objects: []lfs.Pointer{ + {Oid: "fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab042", Size: 6}, + }, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.NotNil(t, br.Objects[0].Error) + assert.Equal(t, http.StatusUnprocessableEntity, br.Objects[0].Error.Code) + assert.Equal(t, "Size must be less than or equal to 2", br.Objects[0].Error.Message) + + setting.LFS.MaxFileSize = oldMaxFileSize + }) + + t.Run("AddMeta", func(t *testing.T) { + defer PrintCurrentTest(t)() + + p := lfs.Pointer{Oid: "05eeb4eb5be71f2dd291ca39157d6d9effd7d1ea19cbdc8a99411fe2a8f26a00", Size: 6} + + contentStore := lfs.NewContentStore() + exist, err := contentStore.Exists(p) + assert.NoError(t, err) + assert.True(t, exist) + + repo2 := createLFSTestRepository(t, "batch2") + content := []byte("dummy0") + storeObjectInRepo(t, repo2.ID, &content) + + meta, err := repo.GetLFSMetaObjectByOid(p.Oid) + assert.Nil(t, meta) + assert.Equal(t, models.ErrLFSObjectNotExist, err) + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "upload", + Objects: []lfs.Pointer{p}, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.Nil(t, br.Objects[0].Error) + assert.Empty(t, br.Objects[0].Actions) + + meta, err = repo.GetLFSMetaObjectByOid(p.Oid) + assert.NoError(t, err) + assert.NotNil(t, meta) + }) + + t.Run("AlreadyExists", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "upload", + Objects: []lfs.Pointer{ + {Oid: oid, Size: 6}, + }, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.Nil(t, br.Objects[0].Error) + assert.Empty(t, br.Objects[0].Actions) + }) + + t.Run("NewFile", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.BatchRequest{ + Operation: "upload", + Objects: []lfs.Pointer{ + {Oid: "d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0153", Size: 1}, + }, + }) + + resp := session.MakeRequest(t, req, http.StatusOK) + br := decodeResponse(t, resp.Body) + assert.Len(t, br.Objects, 1) + assert.Nil(t, br.Objects[0].Error) + assert.Contains(t, br.Objects[0].Actions, "upload") + ul := br.Objects[0].Actions["upload"] + assert.NotNil(t, ul) + assert.NotEmpty(t, ul.Href) + assert.Contains(t, br.Objects[0].Actions, "verify") + vl := br.Objects[0].Actions["verify"] + assert.NotNil(t, vl) + assert.NotEmpty(t, vl.Href) + }) + }) +} + +func TestAPILFSUpload(t *testing.T) { + defer prepareTestEnv(t)() + + setting.LFS.StartServer = true + + repo := createLFSTestRepository(t, "upload") + + content := []byte("dummy3") + oid := storeObjectInRepo(t, repo.ID, &content) + defer repo.RemoveLFSMetaObjectByOid(oid) + + session := loginUser(t, "user2") + + newRequest := func(t testing.TB, p lfs.Pointer, content string) *http.Request { + req := NewRequestWithBody(t, "PUT", path.Join("/user2/lfs-upload-repo.git/info/lfs/objects/", p.Oid, strconv.FormatInt(p.Size, 10)), strings.NewReader(content)) + return req + } + + t.Run("InvalidPointer", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, lfs.Pointer{Oid: "dummy"}, "") + + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + }) + + t.Run("AlreadyExistsInStore", func(t *testing.T) { + defer PrintCurrentTest(t)() + + p := lfs.Pointer{Oid: "83de2e488b89a0aa1c97496b888120a28b0c1e15463a4adb8405578c540f36d4", Size: 6} + + contentStore := lfs.NewContentStore() + exist, err := contentStore.Exists(p) + assert.NoError(t, err) + assert.False(t, exist) + err = contentStore.Put(p, bytes.NewReader([]byte("dummy5"))) + assert.NoError(t, err) + + meta, err := repo.GetLFSMetaObjectByOid(p.Oid) + assert.Nil(t, meta) + assert.Equal(t, models.ErrLFSObjectNotExist, err) + + t.Run("InvalidAccess", func(t *testing.T) { + req := newRequest(t, p, "invalid") + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + }) + + t.Run("ValidAccess", func(t *testing.T) { + req := newRequest(t, p, "dummy5") + + session.MakeRequest(t, req, http.StatusOK) + meta, err = repo.GetLFSMetaObjectByOid(p.Oid) + assert.NoError(t, err) + assert.NotNil(t, meta) + }) + }) + + t.Run("MetaAlreadyExists", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, lfs.Pointer{Oid: oid, Size: 6}, "") + + session.MakeRequest(t, req, http.StatusOK) + }) + + t.Run("HashMismatch", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, lfs.Pointer{Oid: "2581dd7bbc1fe44726de4b7dd806a087a978b9c5aec0a60481259e34be09b06a", Size: 1}, "a") + + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + }) + + t.Run("SizeMismatch", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, lfs.Pointer{Oid: "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb", Size: 2}, "a") + + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + }) + + t.Run("Success", func(t *testing.T) { + defer PrintCurrentTest(t)() + + p := lfs.Pointer{Oid: "6ccce4863b70f258d691f59609d31b4502e1ba5199942d3bc5d35d17a4ce771d", Size: 5} + + req := newRequest(t, p, "gitea") + + session.MakeRequest(t, req, http.StatusOK) + + contentStore := lfs.NewContentStore() + exist, err := contentStore.Exists(p) + assert.NoError(t, err) + assert.True(t, exist) + + meta, err := repo.GetLFSMetaObjectByOid(p.Oid) + assert.NoError(t, err) + assert.NotNil(t, meta) + }) +} + +func TestAPILFSVerify(t *testing.T) { + defer prepareTestEnv(t)() + + setting.LFS.StartServer = true + + repo := createLFSTestRepository(t, "verify") + + content := []byte("dummy3") + oid := storeObjectInRepo(t, repo.ID, &content) + defer repo.RemoveLFSMetaObjectByOid(oid) + + session := loginUser(t, "user2") + + newRequest := func(t testing.TB, p *lfs.Pointer) *http.Request { + req := NewRequestWithJSON(t, "POST", "/user2/lfs-verify-repo.git/info/lfs/verify", p) + req.Header.Set("Accept", lfs.MediaType) + req.Header.Set("Content-Type", lfs.MediaType) + return req + } + + t.Run("InvalidJsonRequest", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, nil) + + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + }) + + t.Run("InvalidPointer", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.Pointer{}) + + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + }) + + t.Run("PointerNotExisting", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.Pointer{Oid: "fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab042", Size: 6}) + + session.MakeRequest(t, req, http.StatusNotFound) + }) + + t.Run("Success", func(t *testing.T) { + defer PrintCurrentTest(t)() + + req := newRequest(t, &lfs.Pointer{Oid: oid, Size: 6}) + + session.MakeRequest(t, req, http.StatusOK) + }) +} diff --git a/integrations/api_repo_tags_test.go b/integrations/api_repo_tags_test.go index 9988a4830..0bf54d3a9 100644 --- a/integrations/api_repo_tags_test.go +++ b/integrations/api_repo_tags_test.go @@ -5,6 +5,7 @@ package integrations import ( + "fmt" "net/http" "testing" @@ -15,23 +16,67 @@ import ( "github.com/stretchr/testify/assert" ) -func TestAPIReposGetTags(t *testing.T) { +func TestAPIRepoTags(t *testing.T) { defer prepareTestEnv(t)() user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // Login as User2. session := loginUser(t, user.Name) token := getTokenForLoggedInUser(t, session) - req := NewRequestf(t, "GET", "/api/v1/repos/%s/repo1/tags?token="+token, user.Name) + repoName := "repo1" + + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/tags?token=%s", user.Name, repoName, token) resp := session.MakeRequest(t, req, http.StatusOK) var tags []*api.Tag DecodeJSON(t, resp, &tags) - assert.EqualValues(t, 1, len(tags)) + assert.Len(t, tags, 1) assert.Equal(t, "v1.1", tags[0].Name) + assert.Equal(t, "Initial commit", tags[0].Message) assert.Equal(t, "65f1bf27bc3bf70f64657658635e66094edbcb4d", tags[0].Commit.SHA) assert.Equal(t, setting.AppURL+"api/v1/repos/user2/repo1/git/commits/65f1bf27bc3bf70f64657658635e66094edbcb4d", tags[0].Commit.URL) assert.Equal(t, setting.AppURL+"user2/repo1/archive/v1.1.zip", tags[0].ZipballURL) assert.Equal(t, setting.AppURL+"user2/repo1/archive/v1.1.tar.gz", tags[0].TarballURL) + + newTag := createNewTagUsingAPI(t, session, token, user.Name, repoName, "gitea/22", "", "nice!\nand some text") + resp = session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &tags) + assert.Len(t, tags, 2) + for _, tag := range tags { + if tag.Name != "v1.1" { + assert.EqualValues(t, newTag.Name, tag.Name) + assert.EqualValues(t, newTag.Message, tag.Message) + assert.EqualValues(t, "nice!\nand some text", tag.Message) + assert.EqualValues(t, newTag.Commit.SHA, tag.Commit.SHA) + } + } + + // get created tag + req = NewRequestf(t, "GET", "/api/v1/repos/%s/%s/tags/%s?token=%s", user.Name, repoName, newTag.Name, token) + resp = session.MakeRequest(t, req, http.StatusOK) + var tag *api.Tag + DecodeJSON(t, resp, &tag) + assert.EqualValues(t, newTag, tag) + + // delete tag + delReq := NewRequestf(t, "DELETE", "/api/v1/repos/%s/%s/tags/%s?token=%s", user.Name, repoName, newTag.Name, token) + resp = session.MakeRequest(t, delReq, http.StatusNoContent) + + // check if it's gone + resp = session.MakeRequest(t, req, http.StatusNotFound) +} + +func createNewTagUsingAPI(t *testing.T, session *TestSession, token string, ownerName, repoName, name, target, msg string) *api.Tag { + urlStr := fmt.Sprintf("/api/v1/repos/%s/%s/tags?token=%s", ownerName, repoName, token) + req := NewRequestWithJSON(t, "POST", urlStr, &api.CreateTagOption{ + TagName: name, + Message: msg, + Target: target, + }) + resp := session.MakeRequest(t, req, http.StatusCreated) + + var respObj api.Tag + DecodeJSON(t, resp, &respObj) + return &respObj } diff --git a/integrations/api_repo_teams_test.go b/integrations/api_repo_teams_test.go new file mode 100644 index 000000000..4a155130b --- /dev/null +++ b/integrations/api_repo_teams_test.go @@ -0,0 +1,77 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "fmt" + "net/http" + "testing" + + "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" + + "github.com/stretchr/testify/assert" +) + +func TestAPIRepoTeams(t *testing.T) { + defer prepareTestEnv(t)() + + // publicOrgRepo = user3/repo21 + publicOrgRepo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 32}).(*models.Repository) + // user4 + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 4}).(*models.User) + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session) + + // ListTeams + url := fmt.Sprintf("/api/v1/repos/%s/teams?token=%s", publicOrgRepo.FullName(), token) + req := NewRequest(t, "GET", url) + res := session.MakeRequest(t, req, http.StatusOK) + var teams []*api.Team + DecodeJSON(t, res, &teams) + if assert.Len(t, teams, 2) { + assert.EqualValues(t, "Owners", teams[0].Name) + assert.False(t, teams[0].CanCreateOrgRepo) + assert.EqualValues(t, []string{"repo.code", "repo.issues", "repo.pulls", "repo.releases", "repo.wiki", "repo.ext_wiki", "repo.ext_issues"}, teams[0].Units) + assert.EqualValues(t, "owner", teams[0].Permission) + + assert.EqualValues(t, "test_team", teams[1].Name) + assert.False(t, teams[1].CanCreateOrgRepo) + assert.EqualValues(t, []string{"repo.issues"}, teams[1].Units) + assert.EqualValues(t, "write", teams[1].Permission) + } + + // IsTeam + url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "Test_Team", token) + req = NewRequest(t, "GET", url) + res = session.MakeRequest(t, req, http.StatusOK) + var team *api.Team + DecodeJSON(t, res, &team) + assert.EqualValues(t, teams[1], team) + + url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "NonExistingTeam", token) + req = NewRequest(t, "GET", url) + res = session.MakeRequest(t, req, http.StatusNotFound) + + // AddTeam with user4 + url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token) + req = NewRequest(t, "PUT", url) + res = session.MakeRequest(t, req, http.StatusForbidden) + + // AddTeam with user2 + user = models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + session = loginUser(t, user.Name) + token = getTokenForLoggedInUser(t, session) + url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token) + req = NewRequest(t, "PUT", url) + res = session.MakeRequest(t, req, http.StatusNoContent) + res = session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request + + // DeleteTeam + url = fmt.Sprintf("/api/v1/repos/%s/teams/%s?token=%s", publicOrgRepo.FullName(), "team1", token) + req = NewRequest(t, "DELETE", url) + res = session.MakeRequest(t, req, http.StatusNoContent) + res = session.MakeRequest(t, req, http.StatusUnprocessableEntity) // test duplicate request +} diff --git a/integrations/api_repo_test.go b/integrations/api_repo_test.go index b6d41fe1e..3948489f5 100644 --- a/integrations/api_repo_test.go +++ b/integrations/api_repo_test.go @@ -309,7 +309,7 @@ func TestAPIRepoMigrate(t *testing.T) { {ctxUserID: 2, userID: 1, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-bad", expectedStatus: http.StatusForbidden}, {ctxUserID: 2, userID: 3, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-org", expectedStatus: http.StatusCreated}, {ctxUserID: 2, userID: 6, cloneURL: "https://github.com/go-gitea/test_repo.git", repoName: "git-bad-org", expectedStatus: http.StatusForbidden}, - {ctxUserID: 2, userID: 3, cloneURL: "https://localhost:3000/user/test_repo.git", repoName: "local-ip", expectedStatus: http.StatusUnprocessableEntity}, + {ctxUserID: 2, userID: 3, cloneURL: "https://localhost:3000/user/test_repo.git", repoName: "private-ip", expectedStatus: http.StatusUnprocessableEntity}, {ctxUserID: 2, userID: 3, cloneURL: "https://10.0.0.1/user/test_repo.git", repoName: "private-ip", expectedStatus: http.StatusUnprocessableEntity}, } @@ -330,11 +330,8 @@ func TestAPIRepoMigrate(t *testing.T) { switch respJSON["message"] { case "Remote visit addressed rate limitation.": t.Log("test hit github rate limitation") - case "migrate from '10.0.0.1' is not allowed: the host resolve to a private ip address '10.0.0.1'": + case "You are not allowed to import from private IPs.": assert.EqualValues(t, "private-ip", testCase.repoName) - case "migrate from 'localhost:3000' is not allowed: the host resolve to a private ip address '::1'", - "migrate from 'localhost:3000' is not allowed: the host resolve to a private ip address '127.0.0.1'": - assert.EqualValues(t, "local-ip", testCase.repoName) default: t.Errorf("unexpected error '%v' on url '%s'", respJSON["message"], testCase.cloneURL) } @@ -444,12 +441,22 @@ func TestAPIRepoTransfer(t *testing.T) { teams *[]int64 expectedStatus int }{ - {ctxUserID: 1, newOwner: "user2", teams: nil, expectedStatus: http.StatusAccepted}, - {ctxUserID: 2, newOwner: "user1", teams: nil, expectedStatus: http.StatusAccepted}, - {ctxUserID: 2, newOwner: "user6", teams: nil, expectedStatus: http.StatusForbidden}, - {ctxUserID: 1, newOwner: "user2", teams: &[]int64{2}, expectedStatus: http.StatusUnprocessableEntity}, + // Disclaimer for test story: "user1" is an admin, "user2" is normal user and part of in owner team of org "user3" + + // Transfer to a user with teams in another org should fail {ctxUserID: 1, newOwner: "user3", teams: &[]int64{5}, expectedStatus: http.StatusForbidden}, + // Transfer to a user with non-existent team IDs should fail + {ctxUserID: 1, newOwner: "user2", teams: &[]int64{2}, expectedStatus: http.StatusUnprocessableEntity}, + // Transfer should go through {ctxUserID: 1, newOwner: "user3", teams: &[]int64{2}, expectedStatus: http.StatusAccepted}, + // Let user transfer it back to himself + {ctxUserID: 2, newOwner: "user2", expectedStatus: http.StatusAccepted}, + // And revert transfer + {ctxUserID: 2, newOwner: "user3", teams: &[]int64{2}, expectedStatus: http.StatusAccepted}, + // Cannot start transfer to an existing repo + {ctxUserID: 2, newOwner: "user3", teams: nil, expectedStatus: http.StatusUnprocessableEntity}, + // Start transfer, repo is now in pending transfer mode + {ctxUserID: 2, newOwner: "user6", teams: nil, expectedStatus: http.StatusCreated}, } defer prepareTestEnv(t)() @@ -459,7 +466,7 @@ func TestAPIRepoTransfer(t *testing.T) { session := loginUser(t, user.Name) token := getTokenForLoggedInUser(t, session) repoName := "moveME" - repo := new(models.Repository) + apiRepo := new(api.Repository) req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/user/repos?token=%s", token), &api.CreateRepoOption{ Name: repoName, Description: "repo move around", @@ -468,12 +475,12 @@ func TestAPIRepoTransfer(t *testing.T) { AutoInit: true, }) resp := session.MakeRequest(t, req, http.StatusCreated) - DecodeJSON(t, resp, repo) + DecodeJSON(t, resp, apiRepo) //start testing for _, testCase := range testCases { user = models.AssertExistsAndLoadBean(t, &models.User{ID: testCase.ctxUserID}).(*models.User) - repo = models.AssertExistsAndLoadBean(t, &models.Repository{ID: repo.ID}).(*models.Repository) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: apiRepo.ID}).(*models.Repository) session = loginUser(t, user.Name) token = getTokenForLoggedInUser(t, session) req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/transfer?token=%s", repo.OwnerName, repo.Name, token), &api.TransferRepoOption{ @@ -484,6 +491,71 @@ func TestAPIRepoTransfer(t *testing.T) { } //cleanup - repo = models.AssertExistsAndLoadBean(t, &models.Repository{ID: repo.ID}).(*models.Repository) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: apiRepo.ID}).(*models.Repository) _ = models.DeleteRepository(user, repo.OwnerID, repo.ID) } + +func TestAPIGenerateRepo(t *testing.T) { + defer prepareTestEnv(t)() + + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 1}).(*models.User) + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session) + + templateRepo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 44}).(*models.Repository) + + // user + repo := new(api.Repository) + req := NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/generate?token=%s", templateRepo.OwnerName, templateRepo.Name, token), &api.GenerateRepoOption{ + Owner: user.Name, + Name: "new-repo", + Description: "test generate repo", + Private: false, + GitContent: true, + }) + resp := session.MakeRequest(t, req, http.StatusCreated) + DecodeJSON(t, resp, repo) + + assert.Equal(t, "new-repo", repo.Name) + + // org + req = NewRequestWithJSON(t, "POST", fmt.Sprintf("/api/v1/repos/%s/%s/generate?token=%s", templateRepo.OwnerName, templateRepo.Name, token), &api.GenerateRepoOption{ + Owner: "user3", + Name: "new-repo", + Description: "test generate repo", + Private: false, + GitContent: true, + }) + resp = session.MakeRequest(t, req, http.StatusCreated) + DecodeJSON(t, resp, repo) + + assert.Equal(t, "new-repo", repo.Name) +} + +func TestAPIRepoGetReviewers(t *testing.T) { + defer prepareTestEnv(t)() + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/reviewers?token=%s", user.Name, repo.Name, token) + resp := session.MakeRequest(t, req, http.StatusOK) + var reviewers []*api.User + DecodeJSON(t, resp, &reviewers) + assert.Len(t, reviewers, 4) +} + +func TestAPIRepoGetAssignees(t *testing.T) { + defer prepareTestEnv(t)() + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + session := loginUser(t, user.Name) + token := getTokenForLoggedInUser(t, session) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + req := NewRequestf(t, "GET", "/api/v1/repos/%s/%s/assignees?token=%s", user.Name, repo.Name, token) + resp := session.MakeRequest(t, req, http.StatusOK) + var assignees []*api.User + DecodeJSON(t, resp, &assignees) + assert.Len(t, assignees, 1) +} diff --git a/integrations/api_repo_topic_test.go b/integrations/api_repo_topic_test.go index b96489ae2..bab17a68b 100644 --- a/integrations/api_repo_topic_test.go +++ b/integrations/api_repo_topic_test.go @@ -7,6 +7,7 @@ package integrations import ( "fmt" "net/http" + "net/url" "testing" "code.gitea.io/gitea/models" @@ -15,6 +16,38 @@ import ( "github.com/stretchr/testify/assert" ) +func TestAPITopicSearch(t *testing.T) { + defer prepareTestEnv(t)() + searchURL, _ := url.Parse("/api/v1/topics/search") + var topics struct { + TopicNames []*api.TopicResponse `json:"topics"` + } + + query := url.Values{"page": []string{"1"}, "limit": []string{"4"}} + + searchURL.RawQuery = query.Encode() + res := MakeRequest(t, NewRequest(t, "GET", searchURL.String()), http.StatusOK) + DecodeJSON(t, res, &topics) + assert.Len(t, topics.TopicNames, 4) + assert.EqualValues(t, "6", res.Header().Get("x-total-count")) + + query.Add("q", "topic") + searchURL.RawQuery = query.Encode() + res = MakeRequest(t, NewRequest(t, "GET", searchURL.String()), http.StatusOK) + DecodeJSON(t, res, &topics) + assert.Len(t, topics.TopicNames, 2) + + query.Set("q", "database") + searchURL.RawQuery = query.Encode() + res = MakeRequest(t, NewRequest(t, "GET", searchURL.String()), http.StatusOK) + DecodeJSON(t, res, &topics) + if assert.Len(t, topics.TopicNames, 1) { + assert.EqualValues(t, 2, topics.TopicNames[0].ID) + assert.EqualValues(t, "database", topics.TopicNames[0].Name) + assert.EqualValues(t, 1, topics.TopicNames[0].RepoCount) + } +} + func TestAPIRepoTopic(t *testing.T) { defer prepareTestEnv(t)() user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of repo2 @@ -88,7 +121,7 @@ func TestAPIRepoTopic(t *testing.T) { req = NewRequest(t, "GET", url) res = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, res, &topics) - assert.Equal(t, 25, len(topics.TopicNames)) + assert.Len(t, topics.TopicNames, 25) // Test writing more topics than allowed newTopics = append(newTopics, "t26") @@ -115,7 +148,7 @@ func TestAPIRepoTopic(t *testing.T) { req = NewRequest(t, "GET", url) res = session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, res, &topics) - assert.Equal(t, 0, len(topics.TopicNames)) + assert.Empty(t, topics.TopicNames) // Test add a topic to repo with write access (requires repo admin access) req = NewRequestf(t, "PUT", "/api/v1/repos/%s/%s/topics/%s?token=%s", user3.Name, repo3.Name, "topicName", token4) diff --git a/integrations/api_settings_test.go b/integrations/api_settings_test.go index 19a005387..fdd8b02d6 100644 --- a/integrations/api_settings_test.go +++ b/integrations/api_settings_test.go @@ -43,9 +43,11 @@ func TestAPIExposedSettings(t *testing.T) { DecodeJSON(t, resp, &repo) assert.EqualValues(t, &api.GeneralRepoSettings{ - MirrorsDisabled: setting.Repository.DisableMirrors, - HTTPGitDisabled: setting.Repository.DisableHTTPGit, - MigrationsDisabled: setting.Repository.DisableMigrations, + MirrorsDisabled: setting.Repository.DisableMirrors, + HTTPGitDisabled: setting.Repository.DisableHTTPGit, + MigrationsDisabled: setting.Repository.DisableMigrations, + TimeTrackingDisabled: false, + LFSDisabled: !setting.LFS.StartServer, }, repo) attachment := new(api.GeneralAttachmentSettings) diff --git a/integrations/api_team_test.go b/integrations/api_team_test.go index d89385447..0b77dc3be 100644 --- a/integrations/api_team_test.go +++ b/integrations/api_team_test.go @@ -144,17 +144,21 @@ func TestAPITeamSearch(t *testing.T) { var results TeamSearchResults session := loginUser(t, user.Name) + csrf := GetCSRF(t, session, "/"+org.Name) req := NewRequestf(t, "GET", "/api/v1/orgs/%s/teams/search?q=%s", org.Name, "_team") + req.Header.Add("X-Csrf-Token", csrf) resp := session.MakeRequest(t, req, http.StatusOK) DecodeJSON(t, resp, &results) assert.NotEmpty(t, results.Data) - assert.Equal(t, 1, len(results.Data)) + assert.Len(t, results.Data, 1) assert.Equal(t, "test_team", results.Data[0].Name) // no access if not organization member user5 := models.AssertExistsAndLoadBean(t, &models.User{ID: 5}).(*models.User) session = loginUser(t, user5.Name) + csrf = GetCSRF(t, session, "/"+org.Name) req = NewRequestf(t, "GET", "/api/v1/orgs/%s/teams/search?q=%s", org.Name, "team") + req.Header.Add("X-Csrf-Token", csrf) resp = session.MakeRequest(t, req, http.StatusForbidden) } diff --git a/integrations/api_team_user_test.go b/integrations/api_team_user_test.go index eec8634cb..5a8fba512 100644 --- a/integrations/api_team_user_test.go +++ b/integrations/api_team_user_test.go @@ -31,5 +31,13 @@ func TestAPITeamUser(t *testing.T) { user2.Created = user2.Created.In(time.Local) user := models.AssertExistsAndLoadBean(t, &models.User{Name: "user2"}).(*models.User) - assert.Equal(t, convert.ToUser(user, true, false), user2) + expectedUser := convert.ToUser(user, user) + + // test time via unix timestamp + assert.EqualValues(t, expectedUser.LastLogin.Unix(), user2.LastLogin.Unix()) + assert.EqualValues(t, expectedUser.Created.Unix(), user2.Created.Unix()) + expectedUser.LastLogin = user2.LastLogin + expectedUser.Created = user2.Created + + assert.Equal(t, expectedUser, user2) } diff --git a/integrations/api_user_email_test.go b/integrations/api_user_email_test.go new file mode 100644 index 000000000..9d2b7485d --- /dev/null +++ b/integrations/api_user_email_test.go @@ -0,0 +1,105 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "net/http" + "testing" + + api "code.gitea.io/gitea/modules/structs" + + "github.com/stretchr/testify/assert" +) + +func TestAPIListEmails(t *testing.T) { + defer prepareTestEnv(t)() + + normalUsername := "user2" + session := loginUser(t, normalUsername) + token := getTokenForLoggedInUser(t, session) + + req := NewRequest(t, "GET", "/api/v1/user/emails?token="+token) + resp := session.MakeRequest(t, req, http.StatusOK) + + var emails []*api.Email + DecodeJSON(t, resp, &emails) + + assert.EqualValues(t, []*api.Email{ + { + Email: "user2@example.com", + Verified: true, + Primary: true, + }, + { + Email: "user2-2@example.com", + Verified: false, + Primary: false, + }, + }, emails) +} + +func TestAPIAddEmail(t *testing.T) { + defer prepareTestEnv(t)() + + normalUsername := "user2" + session := loginUser(t, normalUsername) + token := getTokenForLoggedInUser(t, session) + + opts := api.CreateEmailOption{ + Emails: []string{"user101@example.com"}, + } + + req := NewRequestWithJSON(t, "POST", "/api/v1/user/emails?token="+token, &opts) + session.MakeRequest(t, req, http.StatusUnprocessableEntity) + + opts = api.CreateEmailOption{ + Emails: []string{"user2-3@example.com"}, + } + req = NewRequestWithJSON(t, "POST", "/api/v1/user/emails?token="+token, &opts) + resp := session.MakeRequest(t, req, http.StatusCreated) + + var emails []*api.Email + DecodeJSON(t, resp, &emails) + assert.EqualValues(t, []*api.Email{ + { + Email: "user2-3@example.com", + Verified: true, + Primary: false, + }, + }, emails) +} + +func TestAPIDeleteEmail(t *testing.T) { + defer prepareTestEnv(t)() + + normalUsername := "user2" + session := loginUser(t, normalUsername) + token := getTokenForLoggedInUser(t, session) + + opts := api.DeleteEmailOption{ + Emails: []string{"user2-3@example.com"}, + } + req := NewRequestWithJSON(t, "DELETE", "/api/v1/user/emails?token="+token, &opts) + session.MakeRequest(t, req, http.StatusNotFound) + + opts = api.DeleteEmailOption{ + Emails: []string{"user2-2@example.com"}, + } + req = NewRequestWithJSON(t, "DELETE", "/api/v1/user/emails?token="+token, &opts) + session.MakeRequest(t, req, http.StatusNoContent) + + req = NewRequest(t, "GET", "/api/v1/user/emails?token="+token) + resp := session.MakeRequest(t, req, http.StatusOK) + + var emails []*api.Email + DecodeJSON(t, resp, &emails) + assert.EqualValues(t, []*api.Email{ + { + Email: "user2@example.com", + Verified: true, + Primary: true, + }, + }, emails) +} diff --git a/integrations/api_user_heatmap_test.go b/integrations/api_user_heatmap_test.go index 105d39e9a..a0f0552a1 100644 --- a/integrations/api_user_heatmap_test.go +++ b/integrations/api_user_heatmap_test.go @@ -26,7 +26,7 @@ func TestUserHeatmap(t *testing.T) { var heatmap []*models.UserHeatmapData DecodeJSON(t, resp, &heatmap) var dummyheatmap []*models.UserHeatmapData - dummyheatmap = append(dummyheatmap, &models.UserHeatmapData{Timestamp: 1603152000, Contributions: 1}) + dummyheatmap = append(dummyheatmap, &models.UserHeatmapData{Timestamp: 1603227600, Contributions: 1}) assert.Equal(t, dummyheatmap, heatmap) } diff --git a/integrations/api_user_orgs_test.go b/integrations/api_user_orgs_test.go index 849cb74c4..c72ee7609 100644 --- a/integrations/api_user_orgs_test.go +++ b/integrations/api_user_orgs_test.go @@ -19,15 +19,12 @@ func TestUserOrgs(t *testing.T) { defer prepareTestEnv(t)() adminUsername := "user1" normalUsername := "user2" - session := loginUser(t, adminUsername) - token := getTokenForLoggedInUser(t, session) - urlStr := fmt.Sprintf("/api/v1/users/%s/orgs?token=%s", normalUsername, token) - req := NewRequest(t, "GET", urlStr) - resp := session.MakeRequest(t, req, http.StatusOK) - var orgs []*api.Organization - user3 := models.AssertExistsAndLoadBean(t, &models.User{Name: "user3"}).(*models.User) + privateMemberUsername := "user4" + unrelatedUsername := "user5" - DecodeJSON(t, resp, &orgs) + orgs := getUserOrgs(t, adminUsername, normalUsername) + + user3 := models.AssertExistsAndLoadBean(t, &models.User{Name: "user3"}).(*models.User) assert.Equal(t, []*api.Organization{ { @@ -41,16 +38,46 @@ func TestUserOrgs(t *testing.T) { Visibility: "public", }, }, orgs) + + // user itself should get it's org's he is a member of + orgs = getUserOrgs(t, privateMemberUsername, privateMemberUsername) + assert.Len(t, orgs, 1) + + // unrelated user should not get private org membership of privateMemberUsername + orgs = getUserOrgs(t, unrelatedUsername, privateMemberUsername) + assert.Len(t, orgs, 0) + + // not authenticated call also should hide org membership + orgs = getUserOrgs(t, "", privateMemberUsername) + assert.Len(t, orgs, 0) +} + +func getUserOrgs(t *testing.T, userDoer, userCheck string) (orgs []*api.Organization) { + var token = "" + session := emptyTestSession(t) + if len(userDoer) != 0 { + session = loginUser(t, userDoer) + token = getTokenForLoggedInUser(t, session) + } + urlStr := fmt.Sprintf("/api/v1/users/%s/orgs?token=%s", userCheck, token) + req := NewRequest(t, "GET", urlStr) + resp := session.MakeRequest(t, req, http.StatusOK) + DecodeJSON(t, resp, &orgs) + return orgs } func TestMyOrgs(t *testing.T) { defer prepareTestEnv(t)() + session := emptyTestSession(t) + req := NewRequest(t, "GET", "/api/v1/user/orgs") + resp := session.MakeRequest(t, req, http.StatusUnauthorized) + normalUsername := "user2" - session := loginUser(t, normalUsername) + session = loginUser(t, normalUsername) token := getTokenForLoggedInUser(t, session) - req := NewRequest(t, "GET", "/api/v1/user/orgs?token="+token) - resp := session.MakeRequest(t, req, http.StatusOK) + req = NewRequest(t, "GET", "/api/v1/user/orgs?token="+token) + resp = session.MakeRequest(t, req, http.StatusOK) var orgs []*api.Organization DecodeJSON(t, resp, &orgs) user3 := models.AssertExistsAndLoadBean(t, &models.User{Name: "user3"}).(*models.User) diff --git a/integrations/api_user_search_test.go b/integrations/api_user_search_test.go index c5295fbba..f7349827e 100644 --- a/integrations/api_user_search_test.go +++ b/integrations/api_user_search_test.go @@ -59,3 +59,34 @@ func TestAPIUserSearchNotLoggedIn(t *testing.T) { } } } + +func TestAPIUserSearchAdminLoggedInUserHidden(t *testing.T) { + defer prepareTestEnv(t)() + adminUsername := "user1" + session := loginUser(t, adminUsername) + token := getTokenForLoggedInUser(t, session) + query := "user31" + req := NewRequestf(t, "GET", "/api/v1/users/search?token=%s&q=%s", token, query) + req.SetBasicAuth(token, "x-oauth-basic") + resp := session.MakeRequest(t, req, http.StatusOK) + + var results SearchResults + DecodeJSON(t, resp, &results) + assert.NotEmpty(t, results.Data) + for _, user := range results.Data { + assert.Contains(t, user.UserName, query) + assert.NotEmpty(t, user.Email) + assert.EqualValues(t, "private", user.Visibility) + } +} + +func TestAPIUserSearchNotLoggedInUserHidden(t *testing.T) { + defer prepareTestEnv(t)() + query := "user31" + req := NewRequestf(t, "GET", "/api/v1/users/search?q=%s", query) + resp := MakeRequest(t, req, http.StatusOK) + + var results SearchResults + DecodeJSON(t, resp, &results) + assert.Empty(t, results.Data) +} diff --git a/integrations/attachment_test.go b/integrations/attachment_test.go index dd734145d..052f27605 100644 --- a/integrations/attachment_test.go +++ b/integrations/attachment_test.go @@ -72,7 +72,7 @@ func TestCreateIssueAttachment(t *testing.T) { resp := session.MakeRequest(t, req, http.StatusOK) htmlDoc := NewHTMLParser(t, resp.Body) - link, exists := htmlDoc.doc.Find("form").Attr("action") + link, exists := htmlDoc.doc.Find("form#new-issue").Attr("action") assert.True(t, exists, "The template has changed") postData := map[string]string{ @@ -122,7 +122,7 @@ func TestGetAttachment(t *testing.T) { t.Run(tc.name, func(t *testing.T) { //Write empty file to be available for response if tc.createFile { - _, err := storage.Attachments.Save(models.AttachmentRelativePath(tc.uuid), strings.NewReader("hello world")) + _, err := storage.Attachments.Save(models.AttachmentRelativePath(tc.uuid), strings.NewReader("hello world"), -1) assert.NoError(t, err) } //Actual test diff --git a/integrations/auth_ldap_test.go b/integrations/auth_ldap_test.go index 4d82c092e..6eb017017 100644 --- a/integrations/auth_ldap_test.go +++ b/integrations/auth_ldap_test.go @@ -11,7 +11,7 @@ import ( "strings" "testing" - "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth" "github.com/stretchr/testify/assert" "github.com/unknwon/i18n" @@ -144,6 +144,60 @@ func TestLDAPUserSignin(t *testing.T) { assert.Equal(t, u.Email, htmlDoc.Find(`label[for="email"]`).Siblings().First().Text()) } +func TestLDAPAuthChange(t *testing.T) { + defer prepareTestEnv(t)() + addAuthSourceLDAP(t, "") + + session := loginUser(t, "user1") + req := NewRequest(t, "GET", "/admin/auths") + resp := session.MakeRequest(t, req, http.StatusOK) + doc := NewHTMLParser(t, resp.Body) + href, exists := doc.Find("table.table td a").Attr("href") + if !exists { + assert.True(t, exists, "No authentication source found") + return + } + + req = NewRequest(t, "GET", href) + resp = session.MakeRequest(t, req, http.StatusOK) + doc = NewHTMLParser(t, resp.Body) + csrf := doc.GetCSRF() + host, _ := doc.Find(`input[name="host"]`).Attr("value") + assert.Equal(t, host, getLDAPServerHost()) + binddn, _ := doc.Find(`input[name="bind_dn"]`).Attr("value") + assert.Equal(t, binddn, "uid=gitea,ou=service,dc=planetexpress,dc=com") + + req = NewRequestWithValues(t, "POST", href, map[string]string{ + "_csrf": csrf, + "type": "2", + "name": "ldap", + "host": getLDAPServerHost(), + "port": "389", + "bind_dn": "uid=gitea,ou=service,dc=planetexpress,dc=com", + "bind_password": "password", + "user_base": "ou=people,dc=planetexpress,dc=com", + "filter": "(&(objectClass=inetOrgPerson)(memberOf=cn=git,ou=people,dc=planetexpress,dc=com)(uid=%s))", + "admin_filter": "(memberOf=cn=admin_staff,ou=people,dc=planetexpress,dc=com)", + "restricted_filter": "(uid=leela)", + "attribute_username": "uid", + "attribute_name": "givenName", + "attribute_surname": "sn", + "attribute_mail": "mail", + "attribute_ssh_public_key": "", + "is_sync_enabled": "on", + "is_active": "on", + }) + session.MakeRequest(t, req, http.StatusFound) + + req = NewRequest(t, "GET", href) + resp = session.MakeRequest(t, req, http.StatusOK) + doc = NewHTMLParser(t, resp.Body) + host, _ = doc.Find(`input[name="host"]`).Attr("value") + assert.Equal(t, host, getLDAPServerHost()) + binddn, _ = doc.Find(`input[name="bind_dn"]`).Attr("value") + assert.Equal(t, binddn, "uid=gitea,ou=service,dc=planetexpress,dc=com") +} + func TestLDAPUserSync(t *testing.T) { if skipLDAPTests() { t.Skip() @@ -151,7 +205,7 @@ func TestLDAPUserSync(t *testing.T) { } defer prepareTestEnv(t)() addAuthSourceLDAP(t, "") - models.SyncExternalUsers(context.Background(), true) + auth.SyncExternalUsers(context.Background(), true) session := loginUser(t, "user1") // Check if users exists @@ -216,7 +270,7 @@ func TestLDAPUserSSHKeySync(t *testing.T) { defer prepareTestEnv(t)() addAuthSourceLDAP(t, "sshPublicKey") - models.SyncExternalUsers(context.Background(), true) + auth.SyncExternalUsers(context.Background(), true) // Check if users has SSH keys synced for _, u := range gitLDAPUsers { diff --git a/integrations/benchmarks_test.go b/integrations/benchmarks_test.go index 7c7aff994..841ecbf7e 100644 --- a/integrations/benchmarks_test.go +++ b/integrations/benchmarks_test.go @@ -7,64 +7,14 @@ package integrations import ( "math/rand" "net/http" + "net/url" "testing" "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" ) -func BenchmarkRepo(b *testing.B) { - samples := []struct { - url string - name string - skipShort bool - }{ - {url: "https://github.com/go-gitea/gitea.git", name: "gitea"}, - {url: "https://github.com/ethantkoenig/manyfiles.git", name: "manyfiles"}, - {url: "https://github.com/moby/moby.git", name: "moby", skipShort: true}, - {url: "https://github.com/golang/go.git", name: "go", skipShort: true}, - {url: "https://github.com/torvalds/linux.git", name: "linux", skipShort: true}, - } - defer prepareTestEnv(b)() - session := loginUser(b, "user2") - b.ResetTimer() - - for _, s := range samples { - b.Run(s.name, func(b *testing.B) { - if testing.Short() && s.skipShort { - b.Skip("skipping test in short mode.") - } - b.Run("Migrate", func(b *testing.B) { - for i := 0; i < b.N; i++ { - testRepoMigrate(b, session, s.url, s.name) - } - }) - b.Run("Access", func(b *testing.B) { - var branches []*api.Branch - b.Run("APIBranchList", func(b *testing.B) { - for i := 0; i < b.N; i++ { - req := NewRequestf(b, "GET", "/api/v1/repos/%s/%s/branches", "user2", s.name) - resp := session.MakeRequest(b, req, http.StatusOK) - b.StopTimer() - if len(branches) == 0 { - DecodeJSON(b, resp, &branches) //Store for next phase - } - b.StartTimer() - } - }) - branchCount := len(branches) - b.Run("WebViewCommit", func(b *testing.B) { - for i := 0; i < b.N; i++ { - req := NewRequestf(b, "GET", "/%s/%s/commit/%s", "user2", s.name, branches[i%branchCount].Commit.ID) - session.MakeRequest(b, req, http.StatusOK) - } - }) - }) - }) - } -} - -//StringWithCharset random string (from https://www.calhoun.io/creating-random-strings-in-go/) +// StringWithCharset random string (from https://www.calhoun.io/creating-random-strings-in-go/) func StringWithCharset(length int, charset string) string { b := make([]byte, length) for i := range b { @@ -74,40 +24,48 @@ func StringWithCharset(length int, charset string) string { } func BenchmarkRepoBranchCommit(b *testing.B) { - samples := []int64{1, 3, 15, 16} - defer prepareTestEnv(b)() - b.ResetTimer() + onGiteaRunTB(b, func(t testing.TB, u *url.URL) { + b := t.(*testing.B) - for _, repoID := range samples { - b.StopTimer() - repo := models.AssertExistsAndLoadBean(b, &models.Repository{ID: repoID}).(*models.Repository) - b.StartTimer() - b.Run(repo.Name, func(b *testing.B) { - owner := models.AssertExistsAndLoadBean(b, &models.User{ID: repo.OwnerID}).(*models.User) - session := loginUser(b, owner.LoginName) - b.ResetTimer() - b.Run("Create", func(b *testing.B) { - for i := 0; i < b.N; i++ { + samples := []int64{1, 2, 3} + b.ResetTimer() + + for _, repoID := range samples { + b.StopTimer() + repo := models.AssertExistsAndLoadBean(b, &models.Repository{ID: repoID}).(*models.Repository) + b.StartTimer() + b.Run(repo.Name, func(b *testing.B) { + session := loginUser(b, "user2") + b.ResetTimer() + b.Run("CreateBranch", func(b *testing.B) { b.StopTimer() branchName := StringWithCharset(5+rand.Intn(10), "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789") b.StartTimer() - testCreateBranch(b, session, owner.LoginName, repo.Name, "branch/master", branchName, http.StatusFound) - } - }) - b.Run("Access", func(b *testing.B) { - var branches []*api.Branch - req := NewRequestf(b, "GET", "/api/v1/%s/branches", repo.FullName()) - resp := session.MakeRequest(b, req, http.StatusOK) - DecodeJSON(b, resp, &branches) - branchCount := len(branches) - b.ResetTimer() //We measure from here - for i := 0; i < b.N; i++ { - req := NewRequestf(b, "GET", "/%s/%s/commits/%s", owner.Name, repo.Name, branches[i%branchCount].Name) + for i := 0; i < b.N; i++ { + b.Run("new_"+branchName, func(b *testing.B) { + b.Skip("benchmark broken") // TODO fix + testAPICreateBranch(b, session, repo.OwnerName, repo.Name, repo.DefaultBranch, "new_"+branchName, http.StatusCreated) + }) + } + }) + b.Run("GetBranches", func(b *testing.B) { + req := NewRequestf(b, "GET", "/api/v1/repos/%s/branches", repo.FullName()) session.MakeRequest(b, req, http.StatusOK) - } + }) + b.Run("AccessCommits", func(b *testing.B) { + var branches []*api.Branch + req := NewRequestf(b, "GET", "/api/v1/repos/%s/branches", repo.FullName()) + resp := session.MakeRequest(b, req, http.StatusOK) + DecodeJSON(b, resp, &branches) + b.ResetTimer() //We measure from here + if len(branches) != 0 { + for i := 0; i < b.N; i++ { + req := NewRequestf(b, "GET", "/api/v1/repos/%s/commits?sha=%s", repo.FullName(), branches[i%len(branches)].Name) + session.MakeRequest(b, req, http.StatusOK) + } + } + }) }) - }) - } + } + }) } - -//TODO list commits /repos/{owner}/{repo}/commits diff --git a/integrations/branches_test.go b/integrations/branches_test.go index 2b9fc8dda..b2230e703 100644 --- a/integrations/branches_test.go +++ b/integrations/branches_test.go @@ -57,7 +57,9 @@ func branchAction(t *testing.T, button string) (*HTMLDoc, string) { htmlDoc := NewHTMLParser(t, resp.Body) link, exists := htmlDoc.doc.Find(button).Attr("data-url") - assert.True(t, exists, "The template has changed") + if !assert.True(t, exists, "The template has changed") { + t.Skip() + } req = NewRequestWithValues(t, "POST", link, map[string]string{ "_csrf": getCsrf(t, htmlDoc.doc), @@ -69,7 +71,7 @@ func branchAction(t *testing.T, button string) (*HTMLDoc, string) { req = NewRequest(t, "GET", "/user2/repo1/branches") resp = session.MakeRequest(t, req, http.StatusOK) - return NewHTMLParser(t, resp.Body), url.Query()["name"][0] + return NewHTMLParser(t, resp.Body), url.Query().Get("name") } func getCsrf(t *testing.T, doc *goquery.Document) string { diff --git a/integrations/compare_test.go b/integrations/compare_test.go new file mode 100644 index 000000000..08468cbfd --- /dev/null +++ b/integrations/compare_test.go @@ -0,0 +1,24 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "net/http" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCompareTag(t *testing.T) { + defer prepareTestEnv(t)() + + session := loginUser(t, "user2") + req := NewRequest(t, "GET", "/user2/repo1/compare/v1.1...master") + resp := session.MakeRequest(t, req, http.StatusOK) + htmlDoc := NewHTMLParser(t, resp.Body) + selection := htmlDoc.doc.Find(".choose.branch .filter.dropdown") + // A dropdown for both base and head. + assert.Lenf(t, selection.Nodes, 2, "The template has changed") +} diff --git a/integrations/create_no_session_test.go b/integrations/create_no_session_test.go index ae0d9f812..d6b363426 100644 --- a/integrations/create_no_session_test.go +++ b/integrations/create_no_session_test.go @@ -5,7 +5,6 @@ package integrations import ( - "encoding/json" "io/ioutil" "net/http" "net/http/httptest" @@ -13,11 +12,12 @@ import ( "path/filepath" "testing" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" - "code.gitea.io/gitea/routers/routes" + "code.gitea.io/gitea/routers" - "gitea.com/macaron/session" + "gitea.com/go-chi/session" "github.com/stretchr/testify/assert" ) @@ -58,12 +58,11 @@ func TestSessionFileCreation(t *testing.T) { oldSessionConfig := setting.SessionConfig.ProviderConfig defer func() { setting.SessionConfig.ProviderConfig = oldSessionConfig - c = routes.NewChi() - c.Mount("/", routes.NormalRoutes()) - routes.DelegateToMacaron(c) + c = routers.NormalRoutes() }() var config session.Options + err := json.Unmarshal([]byte(oldSessionConfig), &config) assert.NoError(t, err) @@ -84,9 +83,7 @@ func TestSessionFileCreation(t *testing.T) { setting.SessionConfig.ProviderConfig = string(newConfigBytes) - c = routes.NewChi() - c.Mount("/", routes.NormalRoutes()) - routes.DelegateToMacaron(c) + c = routers.NormalRoutes() t.Run("NoSessionOnViewIssue", func(t *testing.T) { defer PrintCurrentTest(t)() diff --git a/integrations/download_test.go b/integrations/download_test.go index 305155e9a..38de75f47 100644 --- a/integrations/download_test.go +++ b/integrations/download_test.go @@ -8,6 +8,7 @@ import ( "net/http" "testing" + "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" ) @@ -62,3 +63,30 @@ func TestDownloadByIDMediaForSVGUsesSecureHeaders(t *testing.T) { assert.Equal(t, "image/svg+xml", resp.HeaderMap.Get("Content-Type")) assert.Equal(t, "nosniff", resp.HeaderMap.Get("X-Content-Type-Options")) } + +func TestDownloadRawTextFileWithoutMimeTypeMapping(t *testing.T) { + defer prepareTestEnv(t)() + + session := loginUser(t, "user2") + + req := NewRequest(t, "GET", "/user2/repo2/raw/branch/master/test.xml") + resp := session.MakeRequest(t, req, http.StatusOK) + + assert.Equal(t, "text/plain; charset=utf-8", resp.HeaderMap.Get("Content-Type")) +} + +func TestDownloadRawTextFileWithMimeTypeMapping(t *testing.T) { + defer prepareTestEnv(t)() + setting.MimeTypeMap.Map[".xml"] = "text/xml" + setting.MimeTypeMap.Enabled = true + + session := loginUser(t, "user2") + + req := NewRequest(t, "GET", "/user2/repo2/raw/branch/master/test.xml") + resp := session.MakeRequest(t, req, http.StatusOK) + + assert.Equal(t, "text/xml; charset=utf-8", resp.HeaderMap.Get("Content-Type")) + + delete(setting.MimeTypeMap.Map, ".xml") + setting.MimeTypeMap.Enabled = false +} diff --git a/integrations/git_clone_wiki_test.go b/integrations/git_clone_wiki_test.go new file mode 100644 index 000000000..4e48df69f --- /dev/null +++ b/integrations/git_clone_wiki_test.go @@ -0,0 +1,51 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "context" + "fmt" + "io/ioutil" + "net/url" + "path/filepath" + "testing" + + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/util" + "github.com/stretchr/testify/assert" +) + +func assertFileExist(t *testing.T, p string) { + exist, err := util.IsExist(p) + assert.NoError(t, err) + assert.True(t, exist) +} + +func assertFileEqual(t *testing.T, p string, content []byte) { + bs, err := ioutil.ReadFile(p) + assert.NoError(t, err) + assert.EqualValues(t, content, bs) +} + +func TestRepoCloneWiki(t *testing.T) { + onGiteaRun(t, func(t *testing.T, u *url.URL) { + defer prepareTestEnv(t)() + + dstPath, err := ioutil.TempDir("", "clone_wiki") + assert.NoError(t, err) + + r := fmt.Sprintf("%suser2/repo1.wiki.git", u.String()) + u, _ = url.Parse(r) + u.User = url.UserPassword("user2", userPassword) + t.Run("Clone", func(t *testing.T) { + assert.NoError(t, git.CloneWithArgs(context.Background(), u.String(), dstPath, allowLFSFilters(), git.CloneRepoOptions{})) + assertFileEqual(t, filepath.Join(dstPath, "Home.md"), []byte("# Home page\n\nThis is the home page!\n")) + assertFileExist(t, filepath.Join(dstPath, "Page-With-Image.md")) + assertFileExist(t, filepath.Join(dstPath, "Page-With-Spaced-Name.md")) + assertFileExist(t, filepath.Join(dstPath, "images")) + assertFileExist(t, filepath.Join(dstPath, "jpeg.jpg")) + }) + }) +} diff --git a/integrations/git_helper_for_declarative_test.go b/integrations/git_helper_for_declarative_test.go index d99d80a7c..5a5b1314c 100644 --- a/integrations/git_helper_for_declarative_test.go +++ b/integrations/git_helper_for_declarative_test.go @@ -76,7 +76,7 @@ func allowLFSFilters() []string { return filteredLFSGlobalArgs[:j] } -func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bool) { +func onGiteaRunTB(t testing.TB, callback func(testing.TB, *url.URL), prepare ...bool) { if len(prepare) == 0 || prepare[0] { defer prepareTestEnv(t, 1)() } @@ -108,6 +108,12 @@ func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bo callback(t, u) } +func onGiteaRun(t *testing.T, callback func(*testing.T, *url.URL), prepare ...bool) { + onGiteaRunTB(t, func(t testing.TB, u *url.URL) { + callback(t.(*testing.T), u) + }, prepare...) +} + func doGitClone(dstLocalPath string, u *url.URL) func(*testing.T) { return func(t *testing.T) { assert.NoError(t, git.CloneWithArgs(context.Background(), u.String(), dstLocalPath, allowLFSFilters(), git.CloneRepoOptions{})) diff --git a/integrations/git_smart_http_test.go b/integrations/git_smart_http_test.go new file mode 100644 index 000000000..9a4e3689c --- /dev/null +++ b/integrations/git_smart_http_test.go @@ -0,0 +1,69 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "io/ioutil" + "net/http" + "net/url" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestGitSmartHTTP(t *testing.T) { + onGiteaRun(t, testGitSmartHTTP) +} + +func testGitSmartHTTP(t *testing.T, u *url.URL) { + var kases = []struct { + p string + code int + }{ + { + p: "user2/repo1/info/refs", + code: 200, + }, + { + p: "user2/repo1/HEAD", + code: 200, + }, + { + p: "user2/repo1/objects/info/alternates", + code: 404, + }, + { + p: "user2/repo1/objects/info/http-alternates", + code: 404, + }, + { + p: "user2/repo1/../../custom/conf/app.ini", + code: 404, + }, + { + p: "user2/repo1/objects/info/../../../../custom/conf/app.ini", + code: 404, + }, + { + p: `user2/repo1/objects/info/..\..\..\..\custom\conf\app.ini`, + code: 400, + }, + } + + for _, kase := range kases { + t.Run(kase.p, func(t *testing.T) { + p := u.String() + kase.p + req, err := http.NewRequest("GET", p, nil) + assert.NoError(t, err) + req.SetBasicAuth("user2", userPassword) + resp, err := http.DefaultClient.Do(req) + assert.NoError(t, err) + defer resp.Body.Close() + assert.EqualValues(t, kase.code, resp.StatusCode) + _, err = ioutil.ReadAll(resp.Body) + assert.NoError(t, err) + }) + } +} diff --git a/integrations/git_test.go b/integrations/git_test.go index c3c112682..38d7b29b2 100644 --- a/integrations/git_test.go +++ b/integrations/git_test.go @@ -5,6 +5,7 @@ package integrations import ( + "encoding/hex" "fmt" "io/ioutil" "math/rand" @@ -18,6 +19,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" @@ -68,7 +70,9 @@ func testGit(t *testing.T, u *url.URL) { rawTest(t, &httpContext, little, big, littleLFS, bigLFS) mediaTest(t, &httpContext, little, big, littleLFS, bigLFS) + t.Run("CreateAgitFlowPull", doCreateAgitFlowPull(dstPath, &httpContext, "master", "test/head")) t.Run("BranchProtectMerge", doBranchProtectPRMerge(&httpContext, dstPath)) + t.Run("CreatePRAndSetManuallyMerged", doCreatePRAndSetManuallyMerged(httpContext, httpContext, dstPath, "master", "test-manually-merge")) t.Run("MergeFork", func(t *testing.T) { defer PrintCurrentTest(t)() t.Run("CreatePRAndMerge", doMergeFork(httpContext, forkedUserCtx, "master", httpContext.Username+":master")) @@ -108,6 +112,7 @@ func testGit(t *testing.T, u *url.URL) { rawTest(t, &sshContext, little, big, littleLFS, bigLFS) mediaTest(t, &sshContext, little, big, littleLFS, bigLFS) + t.Run("CreateAgitFlowPull", doCreateAgitFlowPull(dstPath, &sshContext, "master", "test/head2")) t.Run("BranchProtectMerge", doBranchProtectPRMerge(&sshContext, dstPath)) t.Run("MergeFork", func(t *testing.T) { defer PrintCurrentTest(t)() @@ -140,7 +145,7 @@ func standardCommitAndPushTest(t *testing.T, dstPath string) (little, big string func lfsCommitAndPushTest(t *testing.T, dstPath string) (littleLFS, bigLFS string) { t.Run("LFS", func(t *testing.T) { defer PrintCurrentTest(t)() - setting.CheckLFSVersion() + git.CheckLFSVersion() if !setting.LFS.StartServer { t.Skip() return @@ -207,27 +212,32 @@ func rawTest(t *testing.T, ctx *APITestContext, little, big, littleLFS, bigLFS s // Request raw paths req := NewRequest(t, "GET", path.Join("/", username, reponame, "/raw/branch/master/", little)) - resp := session.MakeRequest(t, req, http.StatusOK) - assert.Equal(t, littleSize, resp.Body.Len()) + resp := session.MakeRequestNilResponseRecorder(t, req, http.StatusOK) + assert.Equal(t, littleSize, resp.Length) - setting.CheckLFSVersion() + git.CheckLFSVersion() if setting.LFS.StartServer { req = NewRequest(t, "GET", path.Join("/", username, reponame, "/raw/branch/master/", littleLFS)) - resp = session.MakeRequest(t, req, http.StatusOK) + resp := session.MakeRequest(t, req, http.StatusOK) assert.NotEqual(t, littleSize, resp.Body.Len()) - assert.Contains(t, resp.Body.String(), models.LFSMetaFileIdentifier) + assert.LessOrEqual(t, resp.Body.Len(), 1024) + if resp.Body.Len() != littleSize && resp.Body.Len() <= 1024 { + assert.Contains(t, resp.Body.String(), lfs.MetaFileIdentifier) + } } if !testing.Short() { req = NewRequest(t, "GET", path.Join("/", username, reponame, "/raw/branch/master/", big)) - resp = session.MakeRequest(t, req, http.StatusOK) - assert.Equal(t, bigSize, resp.Body.Len()) + resp := session.MakeRequestNilResponseRecorder(t, req, http.StatusOK) + assert.Equal(t, bigSize, resp.Length) if setting.LFS.StartServer { req = NewRequest(t, "GET", path.Join("/", username, reponame, "/raw/branch/master/", bigLFS)) - resp = session.MakeRequest(t, req, http.StatusOK) + resp := session.MakeRequest(t, req, http.StatusOK) assert.NotEqual(t, bigSize, resp.Body.Len()) - assert.Contains(t, resp.Body.String(), models.LFSMetaFileIdentifier) + if resp.Body.Len() != bigSize && resp.Body.Len() <= 1024 { + assert.Contains(t, resp.Body.String(), lfs.MetaFileIdentifier) + } } } }) @@ -247,7 +257,7 @@ func mediaTest(t *testing.T, ctx *APITestContext, little, big, littleLFS, bigLFS resp := session.MakeRequestNilResponseRecorder(t, req, http.StatusOK) assert.Equal(t, littleSize, resp.Length) - setting.CheckLFSVersion() + git.CheckLFSVersion() if setting.LFS.StartServer { req = NewRequest(t, "GET", path.Join("/", username, reponame, "/media/branch/master/", littleLFS)) resp = session.MakeRequestNilResponseRecorder(t, req, http.StatusOK) @@ -444,27 +454,64 @@ func doMergeFork(ctx, baseCtx APITestContext, baseBranch, headBranch string) fun t.Run("EnsureCanSeePull", doEnsureCanSeePull(baseCtx, pr)) // Then get the diff string - var diffStr string + var diffHash string + var diffLength int t.Run("GetDiff", func(t *testing.T) { req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/pulls/%d.diff", url.PathEscape(baseCtx.Username), url.PathEscape(baseCtx.Reponame), pr.Index)) - resp := ctx.Session.MakeRequest(t, req, http.StatusOK) - diffStr = resp.Body.String() + resp := ctx.Session.MakeRequestNilResponseHashSumRecorder(t, req, http.StatusOK) + diffHash = string(resp.Hash.Sum(nil)) + diffLength = resp.Length }) // Now: Merge the PR & make sure that doesn't break the PR page or change its diff t.Run("MergePR", doAPIMergePullRequest(baseCtx, baseCtx.Username, baseCtx.Reponame, pr.Index)) t.Run("EnsureCanSeePull", doEnsureCanSeePull(baseCtx, pr)) - t.Run("EnsureDiffNoChange", doEnsureDiffNoChange(baseCtx, pr, diffStr)) + t.Run("CheckPR", func(t *testing.T) { + oldMergeBase := pr.MergeBase + pr2, err := doAPIGetPullRequest(baseCtx, baseCtx.Username, baseCtx.Reponame, pr.Index)(t) + assert.NoError(t, err) + assert.Equal(t, oldMergeBase, pr2.MergeBase) + }) + t.Run("EnsurDiffNoChange", doEnsureDiffNoChange(baseCtx, pr, diffHash, diffLength)) // Then: Delete the head branch & make sure that doesn't break the PR page or change its diff t.Run("DeleteHeadBranch", doBranchDelete(baseCtx, baseCtx.Username, baseCtx.Reponame, headBranch)) t.Run("EnsureCanSeePull", doEnsureCanSeePull(baseCtx, pr)) - t.Run("EnsureDiffNoChange", doEnsureDiffNoChange(baseCtx, pr, diffStr)) + t.Run("EnsureDiffNoChange", doEnsureDiffNoChange(baseCtx, pr, diffHash, diffLength)) // Delete the head repository & make sure that doesn't break the PR page or change its diff t.Run("DeleteHeadRepository", doAPIDeleteRepository(ctx)) t.Run("EnsureCanSeePull", doEnsureCanSeePull(baseCtx, pr)) - t.Run("EnsureDiffNoChange", doEnsureDiffNoChange(baseCtx, pr, diffStr)) + t.Run("EnsureDiffNoChange", doEnsureDiffNoChange(baseCtx, pr, diffHash, diffLength)) + } +} + +func doCreatePRAndSetManuallyMerged(ctx, baseCtx APITestContext, dstPath, baseBranch, headBranch string) func(t *testing.T) { + return func(t *testing.T) { + defer PrintCurrentTest(t)() + var ( + pr api.PullRequest + err error + lastCommitID string + ) + + trueBool := true + falseBool := false + + t.Run("AllowSetManuallyMergedAndSwitchOffAutodetectManualMerge", doAPIEditRepository(baseCtx, &api.EditRepoOption{ + HasPullRequests: &trueBool, + AllowManualMerge: &trueBool, + AutodetectManualMerge: &falseBool, + })) + + t.Run("CreateHeadBranch", doGitCreateBranch(dstPath, headBranch)) + t.Run("PushToHeadBranch", doGitPushTestRepository(dstPath, "origin", headBranch)) + t.Run("CreateEmptyPullRequest", func(t *testing.T) { + pr, err = doAPICreatePullRequest(ctx, baseCtx.Username, baseCtx.Reponame, baseBranch, headBranch)(t) + assert.NoError(t, err) + }) + lastCommitID = pr.Base.Sha + t.Run("ManuallyMergePR", doAPIManuallyMergePullRequest(ctx, baseCtx.Username, baseCtx.Reponame, lastCommitID, pr.Index)) } } @@ -479,11 +526,15 @@ func doEnsureCanSeePull(ctx APITestContext, pr api.PullRequest) func(t *testing. } } -func doEnsureDiffNoChange(ctx APITestContext, pr api.PullRequest, diffStr string) func(t *testing.T) { +func doEnsureDiffNoChange(ctx APITestContext, pr api.PullRequest, diffHash string, diffLength int) func(t *testing.T) { return func(t *testing.T) { req := NewRequest(t, "GET", fmt.Sprintf("/%s/%s/pulls/%d.diff", url.PathEscape(ctx.Username), url.PathEscape(ctx.Reponame), pr.Index)) - resp := ctx.Session.MakeRequest(t, req, http.StatusOK) - assert.Equal(t, diffStr, resp.Body.String()) + resp := ctx.Session.MakeRequestNilResponseHashSumRecorder(t, req, http.StatusOK) + actual := string(resp.Hash.Sum(nil)) + actualLength := resp.Length + + equal := diffHash == actual + assert.True(t, equal, "Unexpected change in the diff string: expected hash: %s size: %d but was actually: %s size: %d", hex.EncodeToString([]byte(diffHash)), diffLength, hex.EncodeToString([]byte(actual)), actualLength) } } @@ -544,3 +595,162 @@ func doBranchDelete(ctx APITestContext, owner, repo, branch string) func(*testin ctx.Session.MakeRequest(t, req, http.StatusOK) } } + +func doCreateAgitFlowPull(dstPath string, ctx *APITestContext, baseBranch, headBranch string) func(t *testing.T) { + return func(t *testing.T) { + defer PrintCurrentTest(t)() + + // skip this test if git version is low + if git.CheckGitVersionAtLeast("2.29") != nil { + return + } + + gitRepo, err := git.OpenRepository(dstPath) + if !assert.NoError(t, err) { + return + } + defer gitRepo.Close() + + var ( + pr1, pr2 *models.PullRequest + commit string + ) + repo, err := models.GetRepositoryByOwnerAndName(ctx.Username, ctx.Reponame) + if !assert.NoError(t, err) { + return + } + + pullNum := models.GetCount(t, &models.PullRequest{}) + + t.Run("CreateHeadBranch", doGitCreateBranch(dstPath, headBranch)) + + t.Run("AddCommit", func(t *testing.T) { + err := ioutil.WriteFile(path.Join(dstPath, "test_file"), []byte("## test content"), 0666) + if !assert.NoError(t, err) { + return + } + + err = git.AddChanges(dstPath, true) + assert.NoError(t, err) + + err = git.CommitChanges(dstPath, git.CommitChangesOptions{ + Committer: &git.Signature{ + Email: "user2@example.com", + Name: "user2", + When: time.Now(), + }, + Author: &git.Signature{ + Email: "user2@example.com", + Name: "user2", + When: time.Now(), + }, + Message: "Testing commit 1", + }) + assert.NoError(t, err) + commit, err = gitRepo.GetRefCommitID("HEAD") + assert.NoError(t, err) + }) + + t.Run("Push", func(t *testing.T) { + _, err := git.NewCommand("push", "origin", "HEAD:refs/for/master", "-o", "topic="+headBranch).RunInDir(dstPath) + if !assert.NoError(t, err) { + return + } + models.AssertCount(t, &models.PullRequest{}, pullNum+1) + pr1 = models.AssertExistsAndLoadBean(t, &models.PullRequest{ + HeadRepoID: repo.ID, + Flow: models.PullRequestFlowAGit, + }).(*models.PullRequest) + if !assert.NotEmpty(t, pr1) { + return + } + prMsg, err := doAPIGetPullRequest(*ctx, ctx.Username, ctx.Reponame, pr1.Index)(t) + if !assert.NoError(t, err) { + return + } + assert.Equal(t, "user2/"+headBranch, pr1.HeadBranch) + assert.Equal(t, false, prMsg.HasMerged) + assert.Contains(t, "Testing commit 1", prMsg.Body) + assert.Equal(t, commit, prMsg.Head.Sha) + + _, err = git.NewCommand("push", "origin", "HEAD:refs/for/master/test/"+headBranch).RunInDir(dstPath) + if !assert.NoError(t, err) { + return + } + models.AssertCount(t, &models.PullRequest{}, pullNum+2) + pr2 = models.AssertExistsAndLoadBean(t, &models.PullRequest{ + HeadRepoID: repo.ID, + Index: pr1.Index + 1, + Flow: models.PullRequestFlowAGit, + }).(*models.PullRequest) + if !assert.NotEmpty(t, pr2) { + return + } + prMsg, err = doAPIGetPullRequest(*ctx, ctx.Username, ctx.Reponame, pr2.Index)(t) + if !assert.NoError(t, err) { + return + } + assert.Equal(t, "user2/test/"+headBranch, pr2.HeadBranch) + assert.Equal(t, false, prMsg.HasMerged) + }) + + if pr1 == nil || pr2 == nil { + return + } + + t.Run("AddCommit2", func(t *testing.T) { + err := ioutil.WriteFile(path.Join(dstPath, "test_file"), []byte("## test content \n ## test content 2"), 0666) + if !assert.NoError(t, err) { + return + } + + err = git.AddChanges(dstPath, true) + assert.NoError(t, err) + + err = git.CommitChanges(dstPath, git.CommitChangesOptions{ + Committer: &git.Signature{ + Email: "user2@example.com", + Name: "user2", + When: time.Now(), + }, + Author: &git.Signature{ + Email: "user2@example.com", + Name: "user2", + When: time.Now(), + }, + Message: "Testing commit 2", + }) + assert.NoError(t, err) + commit, err = gitRepo.GetRefCommitID("HEAD") + assert.NoError(t, err) + }) + + t.Run("Push2", func(t *testing.T) { + _, err := git.NewCommand("push", "origin", "HEAD:refs/for/master", "-o", "topic="+headBranch).RunInDir(dstPath) + if !assert.NoError(t, err) { + return + } + models.AssertCount(t, &models.PullRequest{}, pullNum+2) + prMsg, err := doAPIGetPullRequest(*ctx, ctx.Username, ctx.Reponame, pr1.Index)(t) + if !assert.NoError(t, err) { + return + } + assert.Equal(t, false, prMsg.HasMerged) + assert.Equal(t, commit, prMsg.Head.Sha) + + _, err = git.NewCommand("push", "origin", "HEAD:refs/for/master/test/"+headBranch).RunInDir(dstPath) + if !assert.NoError(t, err) { + return + } + models.AssertCount(t, &models.PullRequest{}, pullNum+2) + prMsg, err = doAPIGetPullRequest(*ctx, ctx.Username, ctx.Reponame, pr2.Index)(t) + if !assert.NoError(t, err) { + return + } + assert.Equal(t, false, prMsg.HasMerged) + assert.Equal(t, commit, prMsg.Head.Sha) + }) + t.Run("Merge", doAPIMergePullRequest(*ctx, ctx.Username, ctx.Reponame, pr1.Index)) + t.Run("CheckoutMasterAgain", doGitCheckoutBranch(dstPath, "master")) + } +} diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/HEAD b/integrations/gitea-repositories-meta/migration/lfs-test.git/HEAD new file mode 100644 index 000000000..cb089cd89 --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/HEAD @@ -0,0 +1 @@ +ref: refs/heads/master diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/config b/integrations/gitea-repositories-meta/migration/lfs-test.git/config new file mode 100644 index 000000000..3f8f41b6b --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/config @@ -0,0 +1,7 @@ +[core] + bare = false + repositoryformatversion = 0 + filemode = false + symlinks = false + ignorecase = true + logallrefupdates = true diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/description b/integrations/gitea-repositories-meta/migration/lfs-test.git/description new file mode 100644 index 000000000..498b267a8 --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/description @@ -0,0 +1 @@ +Unnamed repository; edit this file 'description' to name the repository. diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout new file mode 100644 index 000000000..cab40f264 --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-checkout @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n"; exit 2; } +git lfs post-checkout "$@" diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit new file mode 100644 index 000000000..9443f4161 --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-commit @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n"; exit 2; } +git lfs post-commit "$@" diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge new file mode 100644 index 000000000..828b70891 --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/post-merge @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n"; exit 2; } +git lfs post-merge "$@" diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push new file mode 100644 index 000000000..81a9cc639 --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/hooks/pre-push @@ -0,0 +1,3 @@ +#!/bin/sh +command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n"; exit 2; } +git lfs pre-push "$@" diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/index b/integrations/gitea-repositories-meta/migration/lfs-test.git/index new file mode 100644 index 000000000..13f8e2696 Binary files /dev/null and b/integrations/gitea-repositories-meta/migration/lfs-test.git/index differ diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 b/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 new file mode 100644 index 000000000..e9b0a4e8a --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/d6/f1/d6f175817f886ec6fbbc1515326465fa96c3bfd54a4ea06cfd6dbbd8340e0152 @@ -0,0 +1 @@ +dummy2 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 b/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 new file mode 100644 index 000000000..71676cd9c --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/lfs/objects/fb/8f/fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041 @@ -0,0 +1 @@ +dummy1 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 new file mode 100644 index 000000000..0db52afbc Binary files /dev/null and b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/54/6244003622c64b2fc3c2cd544d7a29882c8383 differ diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec new file mode 100644 index 000000000..8a96927e5 Binary files /dev/null and b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/6a/6ccf5d874fec134ee712572cc03a0f2dd7afec differ diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed new file mode 100644 index 000000000..122f87efc Binary files /dev/null and b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/a6/7134b8484c2abe9fa954e1fd83b39b271383ed differ diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 new file mode 100644 index 000000000..554b7f05b Binary files /dev/null and b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/b7/01ed6ffe410f0c3ac204b929ea47cfec6cef54 differ diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 new file mode 100644 index 000000000..ae6fdce5a Binary files /dev/null and b/integrations/gitea-repositories-meta/migration/lfs-test.git/objects/f2/07b74f55cd7f9e800b7550d587cbc488f6eaf1 differ diff --git a/integrations/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master b/integrations/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master new file mode 100644 index 000000000..cd602fb93 --- /dev/null +++ b/integrations/gitea-repositories-meta/migration/lfs-test.git/refs/heads/master @@ -0,0 +1 @@ +546244003622c64b2fc3c2cd544d7a29882c8383 diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 b/integrations/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 new file mode 100644 index 000000000..892c6bffe Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.git/objects/3f/a2f829675543ecfc16b2891aebe8bf0608a8f4 differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 b/integrations/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 new file mode 100644 index 000000000..d7ef93c61 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.git/objects/d4/a1a6dcf7bd42891f264d484e80dac7e66b5410 differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 b/integrations/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 new file mode 100644 index 000000000..6039ff661 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.git/objects/d7/bd5b8cfb680f460e37b6fd7cf74c284e059118 differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.git/refs/notes/commits b/integrations/gitea-repositories-meta/user2/repo1.git/refs/notes/commits new file mode 100644 index 000000000..6f837536f --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo1.git/refs/notes/commits @@ -0,0 +1 @@ +3fa2f829675543ecfc16b2891aebe8bf0608a8f4 diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 b/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 new file mode 100644 index 000000000..a46c1925e Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/0d/ca5bd9b5d7ef937710e056f575e86c0184ba85 differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c b/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c new file mode 100644 index 000000000..062641bee Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo1.wiki.git/objects/89/43a1d5f93c00439d5ffc0f8e36f5d60abae46c differ diff --git a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master b/integrations/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master index 1b1d96a1f..38984b12b 100644 --- a/integrations/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master +++ b/integrations/gitea-repositories-meta/user2/repo1.wiki.git/refs/heads/master @@ -1 +1 @@ -423313fbd38093bb10d0c8387db9105409c6f196 +0dca5bd9b5d7ef937710e056f575e86c0184ba85 diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 b/integrations/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 new file mode 100644 index 000000000..736e40878 --- /dev/null +++ b/integrations/gitea-repositories-meta/user2/repo2.git/objects/10/32bbf17fbc0d9c95bb5418dabe8f8c99278700 @@ -0,0 +1,2 @@ +xK +0Eg %":u􊕦J|p˭Q~% 9لG6G ͦw(E4}*{)`YƆleMJOܚ>%^ݿL!]N[v#E6U~/0 ZU'gpJ5 \ No newline at end of file diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d b/integrations/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d new file mode 100644 index 000000000..c3e7e778c Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo2.git/objects/26/f842bcad37fa40a1bb34cbb5ee219ee35d863d differ diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec b/integrations/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec new file mode 100644 index 000000000..add9a3af0 Binary files /dev/null and b/integrations/gitea-repositories-meta/user2/repo2.git/objects/ba/1aed4e2ea2443d76cec241b96be4ec990852ec differ diff --git a/integrations/gitea-repositories-meta/user2/repo2.git/refs/heads/master b/integrations/gitea-repositories-meta/user2/repo2.git/refs/heads/master index 10967a9b8..334d09ca0 100644 --- a/integrations/gitea-repositories-meta/user2/repo2.git/refs/heads/master +++ b/integrations/gitea-repositories-meta/user2/repo2.git/refs/heads/master @@ -1 +1 @@ -205ac761f3326a7ebe416e8673760016450b5cec +1032bbf17fbc0d9c95bb5418dabe8f8c99278700 diff --git a/integrations/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive b/integrations/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive new file mode 100644 index 000000000..0f13243bf --- /dev/null +++ b/integrations/gitea-repositories-meta/user27/repo49.git/refs/heads/test/archive @@ -0,0 +1 @@ +aacbdfe9e1c4b47f60abe81849045fa4e96f1d75 diff --git a/integrations/goget_test.go b/integrations/goget_test.go new file mode 100644 index 000000000..1003d7102 --- /dev/null +++ b/integrations/goget_test.go @@ -0,0 +1,35 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "fmt" + "net/http" + "testing" + + "code.gitea.io/gitea/modules/setting" + "github.com/stretchr/testify/assert" +) + +func TestGoGet(t *testing.T) { + defer prepareTestEnv(t)() + + req := NewRequest(t, "GET", "/blah/glah/plah?go-get=1") + resp := MakeRequest(t, req, http.StatusOK) + + expected := fmt.Sprintf(` + + + + + + + go get --insecure %[1]s:%[2]s/blah/glah + + +`, setting.Domain, setting.HTTPPort, setting.AppURL) + + assert.Equal(t, expected, resp.Body.String()) +} diff --git a/integrations/integration_test.go b/integrations/integration_test.go index f3b2644c7..1003f136d 100644 --- a/integrations/integration_test.go +++ b/integrations/integration_test.go @@ -8,8 +8,9 @@ import ( "bytes" "context" "database/sql" - "encoding/json" "fmt" + "hash" + "hash/fnv" "io" "net/http" "net/http/cookiejar" @@ -25,21 +26,22 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/queue" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers" - "code.gitea.io/gitea/routers/routes" "github.com/PuerkitoBio/goquery" - "github.com/go-chi/chi" "github.com/stretchr/testify/assert" ) -var c chi.Router +var c *web.Route type NilResponseRecorder struct { httptest.ResponseRecorder @@ -58,6 +60,26 @@ func NewNilResponseRecorder() *NilResponseRecorder { } } +type NilResponseHashSumRecorder struct { + httptest.ResponseRecorder + Hash hash.Hash + Length int +} + +func (n *NilResponseHashSumRecorder) Write(b []byte) (int, error) { + _, _ = n.Hash.Write(b) + n.Length += len(b) + return len(b), nil +} + +// NewRecorder returns an initialized ResponseRecorder. +func NewNilResponseHashSumRecorder() *NilResponseHashSumRecorder { + return &NilResponseHashSumRecorder{ + Hash: fnv.New32(), + ResponseRecorder: *httptest.NewRecorder(), + } +} + func TestMain(m *testing.M) { defer log.Close() @@ -66,9 +88,7 @@ func TestMain(m *testing.M) { defer cancel() initIntegrationTest() - c = routes.NewChi() - c.Mount("/", routes.NormalRoutes()) - routes.DelegateToMacaron(c) + c = routers.NormalRoutes() // integration test settings... if setting.Cfg != nil { @@ -100,7 +120,7 @@ func TestMain(m *testing.M) { } exitCode := m.Run() - writerCloser.t = nil + writerCloser.Reset() if err = util.RemoveAll(setting.Indexer.IssuePath); err != nil { fmt.Printf("util.RemoveAll: %v\n", err) @@ -143,7 +163,7 @@ func initIntegrationTest() { setting.SetCustomPathAndConf("", "", "") setting.NewContext() util.RemoveAll(models.LocalCopyPath()) - setting.CheckLFSVersion() + git.CheckLFSVersion() setting.InitDBConfig() if err := storage.Init(); err != nil { fmt.Printf("Init storage failed: %v", err) @@ -286,6 +306,23 @@ func (s *TestSession) MakeRequestNilResponseRecorder(t testing.TB, req *http.Req return resp } +func (s *TestSession) MakeRequestNilResponseHashSumRecorder(t testing.TB, req *http.Request, expectedStatus int) *NilResponseHashSumRecorder { + t.Helper() + baseURL, err := url.Parse(setting.AppURL) + assert.NoError(t, err) + for _, c := range s.jar.Cookies(baseURL) { + req.AddCookie(c) + } + resp := MakeRequestNilResponseHashSumRecorder(t, req, expectedStatus) + + ch := http.Header{} + ch.Add("Cookie", strings.Join(resp.Header()["Set-Cookie"], ";")) + cr := http.Request{Header: ch} + s.jar.SetCookies(baseURL, cr.Cookies()) + + return resp +} + const userPassword = "password" var loginSessionCache = make(map[string]*TestSession, 10) @@ -378,6 +415,7 @@ func NewRequestWithValues(t testing.TB, method, urlStr string, values map[string func NewRequestWithJSON(t testing.TB, method, urlStr string, v interface{}) *http.Request { t.Helper() + jsonBytes, err := json.Marshal(v) assert.NoError(t, err) req := NewRequestWithBody(t, method, urlStr, bytes.NewBuffer(jsonBytes)) @@ -387,6 +425,9 @@ func NewRequestWithJSON(t testing.TB, method, urlStr string, v interface{}) *htt func NewRequestWithBody(t testing.TB, method, urlStr string, body io.Reader) *http.Request { t.Helper() + if !strings.HasPrefix(urlStr, "http") && !strings.HasPrefix(urlStr, "/") { + urlStr = "/" + urlStr + } request, err := http.NewRequest(method, urlStr, body) assert.NoError(t, err) request.RequestURI = urlStr @@ -426,6 +467,19 @@ func MakeRequestNilResponseRecorder(t testing.TB, req *http.Request, expectedSta return recorder } +func MakeRequestNilResponseHashSumRecorder(t testing.TB, req *http.Request, expectedStatus int) *NilResponseHashSumRecorder { + t.Helper() + recorder := NewNilResponseHashSumRecorder() + c.ServeHTTP(recorder, req) + if expectedStatus != NoExpectedStatus { + if !assert.EqualValues(t, expectedStatus, recorder.Code, + "Request: %s %s", req.Method, req.URL.String()) { + logUnexpectedResponse(t, &recorder.ResponseRecorder) + } + } + return recorder +} + // logUnexpectedResponse logs the contents of an unexpected response. func logUnexpectedResponse(t testing.TB, recorder *httptest.ResponseRecorder) { t.Helper() @@ -452,6 +506,7 @@ func logUnexpectedResponse(t testing.TB, recorder *httptest.ResponseRecorder) { func DecodeJSON(t testing.TB, resp *httptest.ResponseRecorder, v interface{}) { t.Helper() + decoder := json.NewDecoder(resp.Body) assert.NoError(t, decoder.Decode(v)) } diff --git a/integrations/lfs_getobject_test.go b/integrations/lfs_getobject_test.go index 180182dd4..063f72b25 100644 --- a/integrations/lfs_getobject_test.go +++ b/integrations/lfs_getobject_test.go @@ -7,57 +7,36 @@ package integrations import ( "archive/zip" "bytes" - "crypto/sha256" - "encoding/hex" - "io" "io/ioutil" "net/http" "net/http/httptest" "testing" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/routers/web" - "gitea.com/macaron/gzip" gzipp "github.com/klauspost/compress/gzip" "github.com/stretchr/testify/assert" ) -func GenerateLFSOid(content io.Reader) (string, error) { - h := sha256.New() - if _, err := io.Copy(h, content); err != nil { - return "", err - } - sum := h.Sum(nil) - return hex.EncodeToString(sum), nil -} - -var lfsID = int64(20000) - func storeObjectInRepo(t *testing.T, repositoryID int64, content *[]byte) string { - oid, err := GenerateLFSOid(bytes.NewReader(*content)) + pointer, err := lfs.GeneratePointer(bytes.NewReader(*content)) assert.NoError(t, err) - var lfsMetaObject *models.LFSMetaObject - if setting.Database.UsePostgreSQL { - lfsMetaObject = &models.LFSMetaObject{ID: lfsID, Oid: oid, Size: int64(len(*content)), RepositoryID: repositoryID} - } else { - lfsMetaObject = &models.LFSMetaObject{Oid: oid, Size: int64(len(*content)), RepositoryID: repositoryID} - } - - lfsID++ - lfsMetaObject, err = models.NewLFSMetaObject(lfsMetaObject) + _, err = models.NewLFSMetaObject(&models.LFSMetaObject{Pointer: pointer, RepositoryID: repositoryID}) assert.NoError(t, err) - contentStore := &lfs.ContentStore{ObjectStorage: storage.LFS} - exist, err := contentStore.Exists(lfsMetaObject) + contentStore := lfs.NewContentStore() + exist, err := contentStore.Exists(pointer) assert.NoError(t, err) if !exist { - err := contentStore.Put(lfsMetaObject, bytes.NewReader(*content)) + err := contentStore.Put(pointer, bytes.NewReader(*content)) assert.NoError(t, err) } - return oid + return pointer.Oid } func storeAndGetLfs(t *testing.T, content *[]byte, extraHeader *http.Header, expectedStatus int) *httptest.ResponseRecorder { @@ -103,7 +82,7 @@ func checkResponseTestContentEncoding(t *testing.T, content *[]byte, resp *httpt func TestGetLFSSmall(t *testing.T) { defer prepareTestEnv(t)() - setting.CheckLFSVersion() + git.CheckLFSVersion() if !setting.LFS.StartServer { t.Skip() return @@ -116,12 +95,12 @@ func TestGetLFSSmall(t *testing.T) { func TestGetLFSLarge(t *testing.T) { defer prepareTestEnv(t)() - setting.CheckLFSVersion() + git.CheckLFSVersion() if !setting.LFS.StartServer { t.Skip() return } - content := make([]byte, gzip.MinSize*10) + content := make([]byte, web.GzipMinSize*10) for i := range content { content[i] = byte(i % 256) } @@ -132,12 +111,12 @@ func TestGetLFSLarge(t *testing.T) { func TestGetLFSGzip(t *testing.T) { defer prepareTestEnv(t)() - setting.CheckLFSVersion() + git.CheckLFSVersion() if !setting.LFS.StartServer { t.Skip() return } - b := make([]byte, gzip.MinSize*10) + b := make([]byte, web.GzipMinSize*10) for i := range b { b[i] = byte(i % 256) } @@ -153,12 +132,12 @@ func TestGetLFSGzip(t *testing.T) { func TestGetLFSZip(t *testing.T) { defer prepareTestEnv(t)() - setting.CheckLFSVersion() + git.CheckLFSVersion() if !setting.LFS.StartServer { t.Skip() return } - b := make([]byte, gzip.MinSize*10) + b := make([]byte, web.GzipMinSize*10) for i := range b { b[i] = byte(i % 256) } @@ -176,7 +155,7 @@ func TestGetLFSZip(t *testing.T) { func TestGetLFSRangeNo(t *testing.T) { defer prepareTestEnv(t)() - setting.CheckLFSVersion() + git.CheckLFSVersion() if !setting.LFS.StartServer { t.Skip() return @@ -189,7 +168,7 @@ func TestGetLFSRangeNo(t *testing.T) { func TestGetLFSRange(t *testing.T) { defer prepareTestEnv(t)() - setting.CheckLFSVersion() + git.CheckLFSVersion() if !setting.LFS.StartServer { t.Skip() return @@ -223,7 +202,14 @@ func TestGetLFSRange(t *testing.T) { "Range": []string{tt.in}, } resp := storeAndGetLfs(t, &content, &h, tt.status) - assert.Equal(t, tt.out, resp.Body.String()) + if tt.status == http.StatusPartialContent || tt.status == http.StatusOK { + assert.Equal(t, tt.out, resp.Body.String()) + } else { + var er lfs.ErrorResponse + err := json.Unmarshal(resp.Body.Bytes(), &er) + assert.NoError(t, err) + assert.Equal(t, tt.out, er.Message) + } }) } } diff --git a/integrations/lfs_local_endpoint_test.go b/integrations/lfs_local_endpoint_test.go new file mode 100644 index 000000000..eda418c42 --- /dev/null +++ b/integrations/lfs_local_endpoint_test.go @@ -0,0 +1,117 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "fmt" + "io/ioutil" + "net/url" + "os" + "path/filepath" + "testing" + + "code.gitea.io/gitea/modules/lfs" + + "github.com/stretchr/testify/assert" +) + +func str2url(raw string) *url.URL { + u, _ := url.Parse(raw) + return u +} + +func TestDetermineLocalEndpoint(t *testing.T) { + defer prepareTestEnv(t)() + + root, _ := ioutil.TempDir("", "lfs_test") + defer os.RemoveAll(root) + + rootdotgit, _ := ioutil.TempDir("", "lfs_test") + defer os.RemoveAll(rootdotgit) + os.Mkdir(filepath.Join(rootdotgit, ".git"), 0700) + + lfsroot, _ := ioutil.TempDir("", "lfs_test") + defer os.RemoveAll(lfsroot) + + // Test cases + var cases = []struct { + cloneurl string + lfsurl string + expected *url.URL + }{ + // case 0 + { + cloneurl: root, + lfsurl: "", + expected: str2url(fmt.Sprintf("file://%s", root)), + }, + // case 1 + { + cloneurl: root, + lfsurl: lfsroot, + expected: str2url(fmt.Sprintf("file://%s", lfsroot)), + }, + // case 2 + { + cloneurl: "https://git.com/repo.git", + lfsurl: lfsroot, + expected: str2url(fmt.Sprintf("file://%s", lfsroot)), + }, + // case 3 + { + cloneurl: rootdotgit, + lfsurl: "", + expected: str2url(fmt.Sprintf("file://%s", filepath.Join(rootdotgit, ".git"))), + }, + // case 4 + { + cloneurl: "", + lfsurl: rootdotgit, + expected: str2url(fmt.Sprintf("file://%s", filepath.Join(rootdotgit, ".git"))), + }, + // case 5 + { + cloneurl: rootdotgit, + lfsurl: rootdotgit, + expected: str2url(fmt.Sprintf("file://%s", filepath.Join(rootdotgit, ".git"))), + }, + // case 6 + { + cloneurl: fmt.Sprintf("file://%s", root), + lfsurl: "", + expected: str2url(fmt.Sprintf("file://%s", root)), + }, + // case 7 + { + cloneurl: fmt.Sprintf("file://%s", root), + lfsurl: fmt.Sprintf("file://%s", lfsroot), + expected: str2url(fmt.Sprintf("file://%s", lfsroot)), + }, + // case 8 + { + cloneurl: root, + lfsurl: fmt.Sprintf("file://%s", lfsroot), + expected: str2url(fmt.Sprintf("file://%s", lfsroot)), + }, + // case 9 + { + cloneurl: "", + lfsurl: "/does/not/exist", + expected: nil, + }, + // case 10 + { + cloneurl: "", + lfsurl: "file:///does/not/exist", + expected: str2url("file:///does/not/exist"), + }, + } + + for n, c := range cases { + ep := lfs.DetermineEndpoint(c.cloneurl, c.lfsurl) + + assert.Equal(t, c.expected, ep, "case %d: error should match", n) + } +} diff --git a/integrations/links_test.go b/integrations/links_test.go index 2c674c104..03229e10e 100644 --- a/integrations/links_test.go +++ b/integrations/links_test.go @@ -32,10 +32,11 @@ func TestLinksNoLogin(t *testing.T) { "/user/login", "/user/forgot_password", "/api/swagger", - "/api/v1/swagger", "/user2/repo1", "/user2/repo1/projects", "/user2/repo1/projects/1", + "/assets/img/404.png", + "/assets/img/500.png", } for _, link := range links { @@ -52,7 +53,8 @@ func TestRedirectsNoLogin(t *testing.T) { "/user2/repo1/src/master": "/user2/repo1/src/branch/master", "/user2/repo1/src/master/file.txt": "/user2/repo1/src/branch/master/file.txt", "/user2/repo1/src/master/directory/file.txt": "/user2/repo1/src/branch/master/directory/file.txt", - "/user/avatar/Ghost/-1": "/img/avatar_default.png", + "/user/avatar/Ghost/-1": "/assets/img/avatar_default.png", + "/api/v1/swagger": "/api/swagger", } for link, redirectLink := range redirects { req := NewRequest(t, "GET", link) @@ -86,7 +88,6 @@ func testLinksAsUser(userName string, t *testing.T) { "/", "/user/forgot_password", "/api/swagger", - "/api/v1/swagger", "/issues", "/issues?type=your_repositories&repos=[0]&sort=&state=open", "/issues?type=assigned&repos=[0]&sort=&state=open", diff --git a/integrations/migrate_test.go b/integrations/migrate_test.go new file mode 100644 index 000000000..b0395fbc3 --- /dev/null +++ b/integrations/migrate_test.go @@ -0,0 +1,42 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "io/ioutil" + "os" + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/migrations" + "code.gitea.io/gitea/modules/setting" + + "github.com/stretchr/testify/assert" +) + +func TestMigrateLocalPath(t *testing.T) { + assert.NoError(t, models.PrepareTestDatabase()) + + adminUser := models.AssertExistsAndLoadBean(t, &models.User{Name: "user1"}).(*models.User) + + old := setting.ImportLocalPaths + setting.ImportLocalPaths = true + + lowercasePath, err := ioutil.TempDir("", "lowercase") // may not be lowercase because TempDir creates a random directory name which may be mixedcase + assert.NoError(t, err) + defer os.RemoveAll(lowercasePath) + + err = migrations.IsMigrateURLAllowed(lowercasePath, adminUser) + assert.NoError(t, err, "case lowercase path") + + mixedcasePath, err := ioutil.TempDir("", "mIxeDCaSe") + assert.NoError(t, err) + defer os.RemoveAll(mixedcasePath) + + err = migrations.IsMigrateURLAllowed(mixedcasePath, adminUser) + assert.NoError(t, err, "case mixedcase path") + + setting.ImportLocalPaths = old +} diff --git a/integrations/migration-test/migration_test.go b/integrations/migration-test/migration_test.go index 852c0b737..209ff5a05 100644 --- a/integrations/migration-test/migration_test.go +++ b/integrations/migration-test/migration_test.go @@ -23,6 +23,7 @@ import ( "code.gitea.io/gitea/models/migrations" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/charset" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" @@ -61,7 +62,7 @@ func initMigrationTest(t *testing.T) func() { assert.NoError(t, util.RemoveAll(setting.RepoRootPath)) assert.NoError(t, util.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), setting.RepoRootPath)) - setting.CheckLFSVersion() + git.CheckLFSVersion() setting.InitDBConfig() setting.NewLogServices(true) return deferFn diff --git a/integrations/mirror_pull_test.go b/integrations/mirror_pull_test.go new file mode 100644 index 000000000..3908f3555 --- /dev/null +++ b/integrations/mirror_pull_test.go @@ -0,0 +1,94 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "context" + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + migration "code.gitea.io/gitea/modules/migrations/base" + "code.gitea.io/gitea/modules/repository" + mirror_service "code.gitea.io/gitea/services/mirror" + release_service "code.gitea.io/gitea/services/release" + + "github.com/stretchr/testify/assert" +) + +func TestMirrorPull(t *testing.T) { + defer prepareTestEnv(t)() + + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + repoPath := models.RepoPath(user.Name, repo.Name) + + opts := migration.MigrateOptions{ + RepoName: "test_mirror", + Description: "Test mirror", + Private: false, + Mirror: true, + CloneAddr: repoPath, + Wiki: true, + Releases: false, + } + + mirrorRepo, err := repository.CreateRepository(user, user, models.CreateRepoOptions{ + Name: opts.RepoName, + Description: opts.Description, + IsPrivate: opts.Private, + IsMirror: opts.Mirror, + Status: models.RepositoryBeingMigrated, + }) + assert.NoError(t, err) + + ctx := context.Background() + + mirror, err := repository.MigrateRepositoryGitData(ctx, user, mirrorRepo, opts) + assert.NoError(t, err) + + gitRepo, err := git.OpenRepository(repoPath) + assert.NoError(t, err) + defer gitRepo.Close() + + findOptions := models.FindReleasesOptions{IncludeDrafts: true, IncludeTags: true} + initCount, err := models.GetReleaseCountByRepoID(mirror.ID, findOptions) + assert.NoError(t, err) + + assert.NoError(t, release_service.CreateRelease(gitRepo, &models.Release{ + RepoID: repo.ID, + Repo: repo, + PublisherID: user.ID, + Publisher: user, + TagName: "v0.2", + Target: "master", + Title: "v0.2 is released", + Note: "v0.2 is released", + IsDraft: false, + IsPrerelease: false, + IsTag: true, + }, nil, "")) + + err = mirror.GetMirror() + assert.NoError(t, err) + + ok := mirror_service.SyncPullMirror(ctx, mirror.ID) + assert.True(t, ok) + + count, err := models.GetReleaseCountByRepoID(mirror.ID, findOptions) + assert.NoError(t, err) + assert.EqualValues(t, initCount+1, count) + + release, err := models.GetRelease(repo.ID, "v0.2") + assert.NoError(t, err) + assert.NoError(t, release_service.DeleteReleaseByID(release.ID, user, true)) + + ok = mirror_service.SyncPullMirror(ctx, mirror.ID) + assert.True(t, ok) + + count, err = models.GetReleaseCountByRepoID(mirror.ID, findOptions) + assert.NoError(t, err) + assert.EqualValues(t, initCount, count) +} diff --git a/integrations/mirror_push_test.go b/integrations/mirror_push_test.go new file mode 100644 index 000000000..3191ef770 --- /dev/null +++ b/integrations/mirror_push_test.go @@ -0,0 +1,86 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "context" + "fmt" + "net/http" + "net/url" + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/modules/setting" + mirror_service "code.gitea.io/gitea/services/mirror" + + "github.com/stretchr/testify/assert" +) + +func TestMirrorPush(t *testing.T) { + onGiteaRun(t, testMirrorPush) +} + +func testMirrorPush(t *testing.T, u *url.URL) { + defer prepareTestEnv(t)() + + setting.Migrations.AllowLocalNetworks = true + + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + srcRepo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + mirrorRepo, err := repository.CreateRepository(user, user, models.CreateRepoOptions{ + Name: "test-push-mirror", + }) + assert.NoError(t, err) + + ctx := NewAPITestContext(t, user.LowerName, srcRepo.Name) + + doCreatePushMirror(ctx, fmt.Sprintf("%s%s/%s", u.String(), url.PathEscape(ctx.Username), url.PathEscape(mirrorRepo.Name)), user.LowerName, userPassword)(t) + + mirrors, err := models.GetPushMirrorsByRepoID(srcRepo.ID) + assert.NoError(t, err) + assert.Len(t, mirrors, 1) + + ok := mirror_service.SyncPushMirror(context.Background(), mirrors[0].ID) + assert.True(t, ok) + + srcGitRepo, err := git.OpenRepository(srcRepo.RepoPath()) + assert.NoError(t, err) + defer srcGitRepo.Close() + + srcCommit, err := srcGitRepo.GetBranchCommit("master") + assert.NoError(t, err) + + mirrorGitRepo, err := git.OpenRepository(mirrorRepo.RepoPath()) + assert.NoError(t, err) + defer mirrorGitRepo.Close() + + mirrorCommit, err := mirrorGitRepo.GetBranchCommit("master") + assert.NoError(t, err) + + assert.Equal(t, srcCommit.ID, mirrorCommit.ID) +} + +func doCreatePushMirror(ctx APITestContext, address, username, password string) func(t *testing.T) { + return func(t *testing.T) { + csrf := GetCSRF(t, ctx.Session, fmt.Sprintf("/%s/%s/settings", url.PathEscape(ctx.Username), url.PathEscape(ctx.Reponame))) + + req := NewRequestWithValues(t, "POST", fmt.Sprintf("/%s/%s/settings", url.PathEscape(ctx.Username), url.PathEscape(ctx.Reponame)), map[string]string{ + "_csrf": csrf, + "action": "push-mirror-add", + "push_mirror_address": address, + "push_mirror_username": username, + "push_mirror_password": password, + "push_mirror_interval": "0", + }) + ctx.Session.MakeRequest(t, req, http.StatusFound) + + flashCookie := ctx.Session.GetCookie("macaron_flash") + assert.NotNil(t, flashCookie) + assert.Contains(t, flashCookie.Value, "success") + } +} diff --git a/integrations/mssql.ini.tmpl b/integrations/mssql.ini.tmpl index 44c0a7eed..0a7710fc5 100644 --- a/integrations/mssql.ini.tmpl +++ b/integrations/mssql.ini.tmpl @@ -10,9 +10,10 @@ PASSWD = {{TEST_MSSQL_PASSWORD}} SSL_MODE = disable [indexer] -ISSUE_INDEXER_PATH = integrations/indexers-mssql/issues.bleve +ISSUE_INDEXER_PATH = integrations/gitea-integration-mssql/indexers/issues.bleve +ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mssql/indexers/issues.queue REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/indexers-mssql/repos.bleve +REPO_INDEXER_PATH = integrations/gitea-integration-mssql/indexers/repos.bleve [queue.code_indexer] TYPE = immediate @@ -24,8 +25,10 @@ TYPE = immediate ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mssql/gitea-repositories [repository.local] -LOCAL_COPY_PATH = tmp/local-repo-mssql -LOCAL_WIKI_PATH = tmp/local-wiki-mssql +LOCAL_COPY_PATH = integrations/gitea-integration-mssql/tmp/local-repo + +[repository.upload] +TEMP_PATH = integrations/gitea-integration-mssql/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -39,14 +42,14 @@ SSH_LISTEN_HOST = localhost SSH_PORT = 2201 START_SSH_SERVER = true LFS_START_SERVER = true -LFS_CONTENT_PATH = integrations/gitea-integration-mssql/data/lfs-mssql +LFS_CONTENT_PATH = integrations/gitea-integration-mssql/data/lfs OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w APP_DATA_PATH = integrations/gitea-integration-mssql/data BUILTIN_SSH_SERVER_USER = git [attachment] -PATH = integrations/gitea-integration-mssql/data +PATH = integrations/gitea-integration-mssql/data/attachments [mailer] ENABLED = true @@ -78,10 +81,9 @@ PROVIDER_CONFIG = integrations/gitea-integration-mssql/data/sessions [log] MODE = test,file ROOT_PATH = mssql-log -REDIRECT_MACARON_LOG = true ROUTER = , -MACARON = , XORM = file +ENABLE_SSH_LOG = true [log.test] LEVEL = Info diff --git a/integrations/mysql.ini.tmpl b/integrations/mysql.ini.tmpl index 2b044498e..a78b0425a 100644 --- a/integrations/mysql.ini.tmpl +++ b/integrations/mysql.ini.tmpl @@ -12,9 +12,9 @@ SSL_MODE = disable [indexer] ISSUE_INDEXER_TYPE = elasticsearch ISSUE_INDEXER_CONN_STR = http://elastic:changeme@elasticsearch:9200 -ISSUE_INDEXER_PATH = integrations/indexers-mysql/issues.bleve +ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mysql/indexers/issues.queue REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/indexers-mysql/repos.bleve +REPO_INDEXER_PATH = integrations/gitea-integration-mysql/indexers/repos.bleve [queue.code_indexer] TYPE = immediate @@ -26,8 +26,10 @@ TYPE = immediate ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mysql/gitea-repositories [repository.local] -LOCAL_COPY_PATH = tmp/local-repo-mysql -LOCAL_WIKI_PATH = tmp/local-wiki-mysql +LOCAL_COPY_PATH = integrations/gitea-integration-mysql/tmp/local-repo + +[repository.upload] +TEMP_PATH = integrations/gitea-integration-mysql/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -97,10 +99,9 @@ PROVIDER_CONFIG = integrations/gitea-integration-mysql/data/sessions [log] MODE = test,file ROOT_PATH = mysql-log -REDIRECT_MACARON_LOG = true ROUTER = , -MACARON = , XORM = file +ENABLE_SSH_LOG = true [log.test] LEVEL = Info diff --git a/integrations/mysql8.ini.tmpl b/integrations/mysql8.ini.tmpl index 798ab7852..1151b6abc 100644 --- a/integrations/mysql8.ini.tmpl +++ b/integrations/mysql8.ini.tmpl @@ -10,9 +10,10 @@ PASSWD = {{TEST_MYSQL8_PASSWORD}} SSL_MODE = disable [indexer] -ISSUE_INDEXER_PATH = integrations/indexers-mysql8/issues.bleve +ISSUE_INDEXER_PATH = integrations/gitea-integration-mysql8/indexers/issues.bleve +ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-mysql8/indexers/issues.queue REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/indexers-mysql8/repos.bleve +REPO_INDEXER_PATH = integrations/gitea-integration-mysql8/indexers/repos.bleve [queue.code_indexer] TYPE = immediate @@ -24,8 +25,10 @@ TYPE = immediate ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-mysql8/gitea-repositories [repository.local] -LOCAL_COPY_PATH = tmp/local-repo-mysql8 -LOCAL_WIKI_PATH = tmp/local-wiki-mysql8 +LOCAL_COPY_PATH = integrations/gitea-integration-mysql8/tmp/local-repo + +[repository.upload] +TEMP_PATH = integrations/gitea-integration-mysql8/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -39,12 +42,15 @@ SSH_LISTEN_HOST = localhost SSH_PORT = 2204 START_SSH_SERVER = true LFS_START_SERVER = true -LFS_CONTENT_PATH = data/lfs-mysql8 +LFS_CONTENT_PATH = integrations/gitea-integration-mysql8/data/lfs OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w APP_DATA_PATH = integrations/gitea-integration-mysql8/data BUILTIN_SSH_SERVER_USER = git +[attachment] +PATH = integrations/gitea-integration-mysql8/data/attachments + [mailer] ENABLED = false @@ -60,20 +66,21 @@ DEFAULT_ALLOW_CREATE_ORGANIZATION = true NO_REPLY_ADDRESS = noreply.example.org [picture] -DISABLE_GRAVATAR = false -ENABLE_FEDERATED_AVATAR = false +DISABLE_GRAVATAR = false +ENABLE_FEDERATED_AVATAR = false +AVATAR_UPLOAD_PATH = integrations/gitea-integration-mysql8/data/avatars +REPOSITORY_AVATAR_UPLOAD_PATH = integrations/gitea-integration-mysql8/data/repo-avatars [session] PROVIDER = file -PROVIDER_CONFIG = data/sessions-mysql8 +PROVIDER_CONFIG = integrations/gitea-integration-mysql8/data/sessions [log] MODE = test,file ROOT_PATH = mysql8-log -REDIRECT_MACARON_LOG = true ROUTER = , -MACARON = , XORM = file +ENABLE_SSH_LOG = true [log.test] LEVEL = Info @@ -82,10 +89,8 @@ COLORIZE = true [log.file] LEVEL = Debug - [security] DISABLE_GIT_HOOKS = false INSTALL_LOCK = true SECRET_KEY = 9pCviYTWSb INTERNAL_TOKEN = eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYmYiOjE0OTU1NTE2MTh9.hhSVGOANkaKk3vfCd2jDOIww4pUk0xtg9JRde5UogyQ - diff --git a/integrations/oauth_test.go b/integrations/oauth_test.go index a9e48b061..c97db777b 100644 --- a/integrations/oauth_test.go +++ b/integrations/oauth_test.go @@ -6,10 +6,10 @@ package integrations import ( "bytes" - "encoding/json" "io/ioutil" "testing" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" @@ -70,6 +70,7 @@ func TestAccessTokenExchange(t *testing.T) { RefreshToken string `json:"refresh_token"` } parsed := new(response) + assert.NoError(t, json.Unmarshal(resp.Body.Bytes(), parsed)) assert.True(t, len(parsed.AccessToken) > 10) assert.True(t, len(parsed.RefreshToken) > 10) @@ -93,6 +94,7 @@ func TestAccessTokenExchangeWithoutPKCE(t *testing.T) { RefreshToken string `json:"refresh_token"` } parsed := new(response) + assert.NoError(t, json.Unmarshal(resp.Body.Bytes(), parsed)) assert.True(t, len(parsed.AccessToken) > 10) assert.True(t, len(parsed.RefreshToken) > 10) @@ -181,6 +183,7 @@ func TestAccessTokenExchangeWithBasicAuth(t *testing.T) { RefreshToken string `json:"refresh_token"` } parsed := new(response) + assert.NoError(t, json.Unmarshal(resp.Body.Bytes(), parsed)) assert.True(t, len(parsed.AccessToken) > 10) assert.True(t, len(parsed.RefreshToken) > 10) @@ -223,6 +226,7 @@ func TestRefreshTokenInvalidation(t *testing.T) { RefreshToken string `json:"refresh_token"` } parsed := new(response) + assert.NoError(t, json.Unmarshal(resp.Body.Bytes(), parsed)) // test without invalidation @@ -235,7 +239,7 @@ func TestRefreshTokenInvalidation(t *testing.T) { "redirect_uri": "a", "refresh_token": parsed.RefreshToken, }) - // tip: Why this changed, because macaron will set req.Body back when consume the req but chi will not. + bs, err := ioutil.ReadAll(refreshReq.Body) assert.NoError(t, err) diff --git a/integrations/org_count_test.go b/integrations/org_count_test.go index 755ee3cee..20917dc17 100644 --- a/integrations/org_count_test.go +++ b/integrations/org_count_test.go @@ -114,11 +114,12 @@ func doCheckOrgCounts(username string, orgCounts map[string]int, strict bool, ca Name: username, }).(*models.User) - user.GetOrganizations(&models.SearchOrganizationsOptions{All: true}) + orgs, err := models.GetOrgsByUserID(user.ID, true) + assert.NoError(t, err) calcOrgCounts := map[string]int{} - for _, org := range user.Orgs { + for _, org := range orgs { calcOrgCounts[org.LowerName] = org.NumRepos count, ok := canonicalCounts[org.LowerName] if ok { diff --git a/integrations/org_test.go b/integrations/org_test.go index b0212f4af..ee61aae6f 100644 --- a/integrations/org_test.go +++ b/integrations/org_test.go @@ -33,7 +33,7 @@ func TestOrgRepos(t *testing.T) { htmlDoc := NewHTMLParser(t, resp.Body) sel := htmlDoc.doc.Find("a.name") - assert.EqualValues(t, len(repos), len(sel.Nodes)) + assert.Len(t, repos, len(sel.Nodes)) for i := 0; i < len(repos); i++ { assert.EqualValues(t, repos[i], strings.TrimSpace(sel.Eq(i).Text())) } diff --git a/integrations/pgsql.ini.tmpl b/integrations/pgsql.ini.tmpl index 5f082f04e..f11d4faba 100644 --- a/integrations/pgsql.ini.tmpl +++ b/integrations/pgsql.ini.tmpl @@ -11,9 +11,10 @@ SCHEMA = {{TEST_PGSQL_SCHEMA}} SSL_MODE = disable [indexer] -ISSUE_INDEXER_PATH = integrations/indexers-pgsql/issues.bleve +ISSUE_INDEXER_PATH = integrations/gitea-integration-pgsql/indexers/issues.bleve +ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-pgsql/indexers/issues.queue REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/indexers-pgsql/repos.bleve +REPO_INDEXER_PATH = integrations/gitea-integration-pgsql/indexers/repos.bleve [queue.code_indexer] TYPE = immediate @@ -25,8 +26,10 @@ TYPE = immediate ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-pgsql/gitea-repositories [repository.local] -LOCAL_COPY_PATH = tmp/local-repo-pgsql -LOCAL_WIKI_PATH = tmp/local-wiki-pgsql +LOCAL_COPY_PATH = integrations/gitea-integration-pgsql/tmp/local-repo + +[repository.upload] +TEMP_PATH = integrations/gitea-integration-pgsql/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -40,14 +43,14 @@ SSH_LISTEN_HOST = localhost SSH_PORT = 2202 START_SSH_SERVER = true LFS_START_SERVER = true -LFS_CONTENT_PATH = integrations/gitea-integration-pgsql/data/lfs-pgsql +LFS_CONTENT_PATH = integrations/gitea-integration-pgsql/data/lfs OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w APP_DATA_PATH = integrations/gitea-integration-pgsql/data BUILTIN_SSH_SERVER_USER = git [attachment] -PATH = integrations/gitea-integration-pgsql/data +PATH = integrations/gitea-integration-pgsql/data/attachments [mailer] ENABLED = true @@ -79,10 +82,9 @@ PROVIDER_CONFIG = integrations/gitea-integration-pgsql/data/sessions [log] MODE = test,file ROOT_PATH = pgsql-log -REDIRECT_MACARON_LOG = true ROUTER = , -MACARON = , XORM = file +ENABLE_SSH_LOG = true [log.test] LEVEL = Info diff --git a/integrations/privateactivity_test.go b/integrations/privateactivity_test.go index 381cb6b33..23c6a7e8c 100644 --- a/integrations/privateactivity_test.go +++ b/integrations/privateactivity_test.go @@ -268,9 +268,6 @@ func TestPrivateActivityNoHeatmapVisibleForAdmin(t *testing.T) { } // check heatmap visibility if the visibility is disabled -// this behavior, in special the one for the admin, is -// due to the fact that the heatmap is the same for all viewers; -// otherwise, there is no reason for it func TestPrivateActivityYesHeatmapInvisibleForPublic(t *testing.T) { defer prepareTestEnv(t)() @@ -282,7 +279,7 @@ func TestPrivateActivityYesHeatmapInvisibleForPublic(t *testing.T) { assert.False(t, visible, "user should have no visible heatmap") } -func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtProfile(t *testing.T) { +func TestPrivateActivityYesHeatmapVisibleForUserItselfAtProfile(t *testing.T) { defer prepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -290,10 +287,10 @@ func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtProfile(t *testing.T) session := loginUser(t, privateActivityTestUser) visible := testPrivateActivityHelperHasVisibleProfileHeatmapFromSession(t, session) - assert.False(t, visible, "user should have no visible heatmap") + assert.True(t, visible, "user should have visible heatmap") } -func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtDashboard(t *testing.T) { +func TestPrivateActivityYesHeatmapVisibleForUserItselfAtDashboard(t *testing.T) { defer prepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -301,7 +298,7 @@ func TestPrivateActivityYesHeatmapInvisibleForUserItselfAtDashboard(t *testing.T session := loginUser(t, privateActivityTestUser) visible := testPrivateActivityHelperHasVisibleDashboardHeatmapFromSession(t, session) - assert.False(t, visible, "user should have no visible heatmap") + assert.True(t, visible, "user should have visible heatmap") } func TestPrivateActivityYesHeatmapInvisibleForOtherUser(t *testing.T) { @@ -315,7 +312,7 @@ func TestPrivateActivityYesHeatmapInvisibleForOtherUser(t *testing.T) { assert.False(t, visible, "user should have no visible heatmap") } -func TestPrivateActivityYesHeatmapInvsisibleForAdmin(t *testing.T) { +func TestPrivateActivityYesHeatmapVisibleForAdmin(t *testing.T) { defer prepareTestEnv(t)() testPrivateActivityDoSomethingForActionEntries(t) testPrivateActivityHelperEnablePrivateActivity(t) @@ -323,7 +320,7 @@ func TestPrivateActivityYesHeatmapInvsisibleForAdmin(t *testing.T) { session := loginUser(t, privateActivityTestAdmin) visible := testPrivateActivityHelperHasVisibleProfileHeatmapFromSession(t, session) - assert.False(t, visible, "user should have no visible heatmap") + assert.True(t, visible, "user should have visible heatmap") } // check heatmap api provides content if the visibility is enabled diff --git a/integrations/pull_merge_test.go b/integrations/pull_merge_test.go index 79f62c32c..b4a3397a4 100644 --- a/integrations/pull_merge_test.go +++ b/integrations/pull_merge_test.go @@ -197,10 +197,8 @@ func TestCantMergeWorkInProgress(t *testing.T) { text := strings.TrimSpace(htmlDoc.doc.Find(".merge-section > .item").Last().Text()) assert.NotEmpty(t, text, "Can't find WIP text") - // remove from lang - expected := i18n.Tr("en", "repo.pulls.cannot_merge_work_in_progress", "[wip]") - replacer := strings.NewReplacer("", "", "", "") - assert.Equal(t, replacer.Replace(expected), text, "Unable to find WIP text") + assert.Contains(t, text, i18n.Tr("en", "repo.pulls.cannot_merge_work_in_progress"), "Unable to find WIP text") + assert.Contains(t, text, "[wip]", "Unable to find WIP text") }) } diff --git a/integrations/pull_status_test.go b/integrations/pull_status_test.go index fc4c7ca33..7c6f3d44c 100644 --- a/integrations/pull_status_test.go +++ b/integrations/pull_status_test.go @@ -115,6 +115,6 @@ func TestPullCreate_EmptyChangesWithCommits(t *testing.T) { doc := NewHTMLParser(t, resp.Body) text := strings.TrimSpace(doc.doc.Find(".merge-section").Text()) - assert.Contains(t, text, "This pull request can be merged automatically.") + assert.Contains(t, text, "This branch is equal with the target branch.") }) } diff --git a/integrations/pull_update_test.go b/integrations/pull_update_test.go index 2dc966316..3e3b987b6 100644 --- a/integrations/pull_update_test.go +++ b/integrations/pull_update_test.go @@ -47,6 +47,34 @@ func TestAPIPullUpdate(t *testing.T) { }) } +func TestAPIPullUpdateByRebase(t *testing.T) { + onGiteaRun(t, func(t *testing.T, giteaURL *url.URL) { + //Create PR to test + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + org26 := models.AssertExistsAndLoadBean(t, &models.User{ID: 26}).(*models.User) + pr := createOutdatedPR(t, user, org26) + + //Test GetDiverging + diffCount, err := pull_service.GetDiverging(pr) + assert.NoError(t, err) + assert.EqualValues(t, 1, diffCount.Behind) + assert.EqualValues(t, 1, diffCount.Ahead) + assert.NoError(t, pr.LoadBaseRepo()) + assert.NoError(t, pr.LoadIssue()) + + session := loginUser(t, "user2") + token := getTokenForLoggedInUser(t, session) + req := NewRequestf(t, "POST", "/api/v1/repos/%s/%s/pulls/%d/update?style=rebase&token="+token, pr.BaseRepo.OwnerName, pr.BaseRepo.Name, pr.Issue.Index) + session.MakeRequest(t, req, http.StatusOK) + + //Test GetDiverging after update + diffCount, err = pull_service.GetDiverging(pr) + assert.NoError(t, err) + assert.EqualValues(t, 0, diffCount.Behind) + assert.EqualValues(t, 1, diffCount.Ahead) + }) +} + func createOutdatedPR(t *testing.T, actor, forkOrg *models.User) *models.PullRequest { baseRepo, err := repo_service.CreateRepository(actor, actor, models.CreateRepoOptions{ Name: "repo-pr-update", @@ -60,7 +88,11 @@ func createOutdatedPR(t *testing.T, actor, forkOrg *models.User) *models.PullReq assert.NoError(t, err) assert.NotEmpty(t, baseRepo) - headRepo, err := repo_module.ForkRepository(actor, forkOrg, baseRepo, "repo-pr-update", "desc") + headRepo, err := repo_module.ForkRepository(actor, forkOrg, models.ForkRepoOptions{ + BaseRepo: baseRepo, + Name: "repo-pr-update", + Description: "desc", + }) assert.NoError(t, err) assert.NotEmpty(t, headRepo) diff --git a/integrations/release_test.go b/integrations/release_test.go index a14ad8434..4458387ef 100644 --- a/integrations/release_test.go +++ b/integrations/release_test.go @@ -10,9 +10,11 @@ import ( "testing" "time" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" + "github.com/PuerkitoBio/goquery" "github.com/stretchr/testify/assert" "github.com/unknwon/i18n" ) @@ -83,7 +85,7 @@ func TestCreateRelease(t *testing.T) { session := loginUser(t, "user2") createNewRelease(t, session, "/user2/repo1", "v0.0.1", "v0.0.1", false, false) - checkLatestReleaseAndCount(t, session, "/user2/repo1", "v0.0.1", i18n.Tr("en", "repo.release.stable"), 2) + checkLatestReleaseAndCount(t, session, "/user2/repo1", "v0.0.1", i18n.Tr("en", "repo.release.stable"), 4) } func TestCreateReleasePreRelease(t *testing.T) { @@ -92,7 +94,7 @@ func TestCreateReleasePreRelease(t *testing.T) { session := loginUser(t, "user2") createNewRelease(t, session, "/user2/repo1", "v0.0.1", "v0.0.1", true, false) - checkLatestReleaseAndCount(t, session, "/user2/repo1", "v0.0.1", i18n.Tr("en", "repo.release.prerelease"), 2) + checkLatestReleaseAndCount(t, session, "/user2/repo1", "v0.0.1", i18n.Tr("en", "repo.release.prerelease"), 4) } func TestCreateReleaseDraft(t *testing.T) { @@ -101,7 +103,7 @@ func TestCreateReleaseDraft(t *testing.T) { session := loginUser(t, "user2") createNewRelease(t, session, "/user2/repo1", "v0.0.1", "v0.0.1", false, true) - checkLatestReleaseAndCount(t, session, "/user2/repo1", "v0.0.1", i18n.Tr("en", "repo.release.draft"), 2) + checkLatestReleaseAndCount(t, session, "/user2/repo1", "v0.0.1", i18n.Tr("en", "repo.release.draft"), 4) } func TestCreateReleasePaging(t *testing.T) { @@ -114,7 +116,7 @@ func TestCreateReleasePaging(t *testing.T) { setting.API.DefaultPagingNum = 10 session := loginUser(t, "user2") - // Create enaugh releases to have paging + // Create enough releases to have paging for i := 0; i < 12; i++ { version := fmt.Sprintf("v0.0.%d", i) createNewRelease(t, session, "/user2/repo1", version, version, false, false) @@ -127,3 +129,83 @@ func TestCreateReleasePaging(t *testing.T) { session2 := loginUser(t, "user4") checkLatestReleaseAndCount(t, session2, "/user2/repo1", "v0.0.11", i18n.Tr("en", "repo.release.stable"), 10) } + +func TestViewReleaseListNoLogin(t *testing.T) { + defer prepareTestEnv(t)() + + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + link := repo.Link() + "/releases" + + req := NewRequest(t, "GET", link) + rsp := MakeRequest(t, req, http.StatusOK) + + htmlDoc := NewHTMLParser(t, rsp.Body) + releases := htmlDoc.Find("#release-list li.ui.grid") + assert.Equal(t, 2, releases.Length()) + + links := make([]string, 0, 5) + releases.Each(func(i int, s *goquery.Selection) { + link, exist := s.Find(".release-list-title a").Attr("href") + if !exist { + return + } + links = append(links, link) + }) + + assert.EqualValues(t, []string{"/user2/repo1/releases/tag/v1.0", "/user2/repo1/releases/tag/v1.1"}, links) +} + +func TestViewReleaseListLogin(t *testing.T) { + defer prepareTestEnv(t)() + + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + link := repo.Link() + "/releases" + + session := loginUser(t, "user1") + req := NewRequest(t, "GET", link) + rsp := session.MakeRequest(t, req, http.StatusOK) + + htmlDoc := NewHTMLParser(t, rsp.Body) + releases := htmlDoc.Find("#release-list li.ui.grid") + assert.Equal(t, 3, releases.Length()) + + links := make([]string, 0, 5) + releases.Each(func(i int, s *goquery.Selection) { + link, exist := s.Find(".release-list-title a").Attr("href") + if !exist { + return + } + links = append(links, link) + }) + + assert.EqualValues(t, []string{ + "/user2/repo1/releases/tag/draft-release", + "/user2/repo1/releases/tag/v1.0", + "/user2/repo1/releases/tag/v1.1", + }, links) +} + +func TestViewTagsList(t *testing.T) { + defer prepareTestEnv(t)() + + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + link := repo.Link() + "/tags" + + session := loginUser(t, "user1") + req := NewRequest(t, "GET", link) + rsp := session.MakeRequest(t, req, http.StatusOK) + + htmlDoc := NewHTMLParser(t, rsp.Body) + tags := htmlDoc.Find(".tag-list tr") + assert.Equal(t, 3, tags.Length()) + + tagNames := make([]string, 0, 5) + tags.Each(func(i int, s *goquery.Selection) { + tagNames = append(tagNames, s.Find(".tag a.df.ac").Text()) + }) + + assert.EqualValues(t, []string{"v1.0", "delete-tag", "v1.1"}, tagNames) +} diff --git a/integrations/repo_branch_test.go b/integrations/repo_branch_test.go index de4e66898..af5c475ea 100644 --- a/integrations/repo_branch_test.go +++ b/integrations/repo_branch_test.go @@ -11,6 +11,7 @@ import ( "strings" "testing" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" "github.com/stretchr/testify/assert" @@ -134,5 +135,13 @@ func TestCreateBranchInvalidCSRF(t *testing.T) { "_csrf": "fake_csrf", "new_branch_name": "test", }) - session.MakeRequest(t, req, http.StatusBadRequest) + resp := session.MakeRequest(t, req, http.StatusFound) + loc := resp.Header().Get("Location") + assert.Equal(t, setting.AppSubURL+"/", loc) + resp = session.MakeRequest(t, NewRequest(t, "GET", loc), http.StatusOK) + htmlDoc := NewHTMLParser(t, resp.Body) + assert.Equal(t, + "Bad Request: Invalid CSRF token", + strings.TrimSpace(htmlDoc.doc.Find(".ui.message").Text()), + ) } diff --git a/integrations/repo_commits_test.go b/integrations/repo_commits_test.go index f26960271..4be1e4ec8 100644 --- a/integrations/repo_commits_test.go +++ b/integrations/repo_commits_test.go @@ -5,12 +5,12 @@ package integrations import ( - "encoding/json" "net/http" "net/http/httptest" "path" "testing" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -66,32 +66,42 @@ func doTestRepoCommitWithStatus(t *testing.T, state string, classes ...string) { doc = NewHTMLParser(t, resp.Body) // Check if commit status is displayed in message column sel := doc.doc.Find("#commits-table tbody tr td.message a.commit-statuses-trigger i.commit-status") - assert.Equal(t, sel.Length(), 1) + assert.Equal(t, 1, sel.Length()) for _, class := range classes { assert.True(t, sel.HasClass(class)) } //By SHA req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/commits/"+path.Base(commitURL)+"/statuses") - testRepoCommitsWithStatus(t, session.MakeRequest(t, req, http.StatusOK), state) + reqOne := NewRequest(t, "GET", "/api/v1/repos/user2/repo1/commits/"+path.Base(commitURL)+"/status") + testRepoCommitsWithStatus(t, session.MakeRequest(t, req, http.StatusOK), session.MakeRequest(t, reqOne, http.StatusOK), state) + //By Ref req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/commits/master/statuses") - testRepoCommitsWithStatus(t, session.MakeRequest(t, req, http.StatusOK), state) + reqOne = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/commits/master/status") + testRepoCommitsWithStatus(t, session.MakeRequest(t, req, http.StatusOK), session.MakeRequest(t, reqOne, http.StatusOK), state) req = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/commits/v1.1/statuses") - testRepoCommitsWithStatus(t, session.MakeRequest(t, req, http.StatusOK), state) + reqOne = NewRequest(t, "GET", "/api/v1/repos/user2/repo1/commits/v1.1/status") + testRepoCommitsWithStatus(t, session.MakeRequest(t, req, http.StatusOK), session.MakeRequest(t, reqOne, http.StatusOK), state) } -func testRepoCommitsWithStatus(t *testing.T, resp *httptest.ResponseRecorder, state string) { - decoder := json.NewDecoder(resp.Body) - statuses := []*api.CommitStatus{} - assert.NoError(t, decoder.Decode(&statuses)) - assert.Len(t, statuses, 1) - for _, s := range statuses { - assert.Equal(t, api.CommitStatusState(state), s.State) - assert.Equal(t, setting.AppURL+"api/v1/repos/user2/repo1/statuses/65f1bf27bc3bf70f64657658635e66094edbcb4d", s.URL) - assert.Equal(t, "http://test.ci/", s.TargetURL) - assert.Equal(t, "", s.Description) - assert.Equal(t, "testci", s.Context) +func testRepoCommitsWithStatus(t *testing.T, resp, respOne *httptest.ResponseRecorder, state string) { + var statuses []*api.CommitStatus + assert.NoError(t, json.Unmarshal(resp.Body.Bytes(), &statuses)) + var status api.CombinedStatus + assert.NoError(t, json.Unmarshal(respOne.Body.Bytes(), &status)) + assert.NotNil(t, status) + + if assert.Len(t, statuses, 1) { + assert.Equal(t, api.CommitStatusState(state), statuses[0].State) + assert.Equal(t, setting.AppURL+"api/v1/repos/user2/repo1/statuses/65f1bf27bc3bf70f64657658635e66094edbcb4d", statuses[0].URL) + assert.Equal(t, "http://test.ci/", statuses[0].TargetURL) + assert.Equal(t, "", statuses[0].Description) + assert.Equal(t, "testci", statuses[0].Context) + + assert.Len(t, status.Statuses, 1) + assert.Equal(t, statuses[0], status.Statuses[0]) + assert.Equal(t, "65f1bf27bc3bf70f64657658635e66094edbcb4d", status.SHA) } } diff --git a/integrations/repo_tag_test.go b/integrations/repo_tag_test.go new file mode 100644 index 000000000..eb3f2b47f --- /dev/null +++ b/integrations/repo_tag_test.go @@ -0,0 +1,74 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "io/ioutil" + "net/url" + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/release" + + "github.com/stretchr/testify/assert" +) + +func TestCreateNewTagProtected(t *testing.T) { + defer prepareTestEnv(t)() + + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + owner := models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) + + t.Run("API", func(t *testing.T) { + defer PrintCurrentTest(t)() + + err := release.CreateNewTag(owner, repo, "master", "v-1", "first tag") + assert.NoError(t, err) + + err = models.InsertProtectedTag(&models.ProtectedTag{ + RepoID: repo.ID, + NamePattern: "v-*", + }) + assert.NoError(t, err) + err = models.InsertProtectedTag(&models.ProtectedTag{ + RepoID: repo.ID, + NamePattern: "v-1.1", + AllowlistUserIDs: []int64{repo.OwnerID}, + }) + assert.NoError(t, err) + + err = release.CreateNewTag(owner, repo, "master", "v-2", "second tag") + assert.Error(t, err) + assert.True(t, models.IsErrProtectedTagName(err)) + + err = release.CreateNewTag(owner, repo, "master", "v-1.1", "third tag") + assert.NoError(t, err) + }) + + t.Run("Git", func(t *testing.T) { + onGiteaRun(t, func(t *testing.T, u *url.URL) { + username := "user2" + httpContext := NewAPITestContext(t, username, "repo1") + + dstPath, err := ioutil.TempDir("", httpContext.Reponame) + assert.NoError(t, err) + defer util.RemoveAll(dstPath) + + u.Path = httpContext.GitPath() + u.User = url.UserPassword(username, userPassword) + + doGitClone(dstPath, u)(t) + + _, err = git.NewCommand("tag", "v-2").RunInDir(dstPath) + assert.NoError(t, err) + + _, err = git.NewCommand("push", "--tags").RunInDir(dstPath) + assert.Error(t, err) + assert.Contains(t, err.Error(), "Tag v-2 is protected") + }) + }) +} diff --git a/integrations/repo_test.go b/integrations/repo_test.go index c1652aeb1..8c4cdf5a9 100644 --- a/integrations/repo_test.go +++ b/integrations/repo_test.go @@ -154,12 +154,12 @@ func TestViewRepoWithSymlinks(t *testing.T) { file := strings.Trim(s.Find("A").Text(), " \t\n") return fmt.Sprintf("%s: %s", file, cls) }) - assert.Equal(t, len(items), 5) - assert.Equal(t, items[0], "a: svg octicon-file-directory") - assert.Equal(t, items[1], "link_b: svg octicon-file-submodule") - assert.Equal(t, items[2], "link_d: svg octicon-file-symlink-file") - assert.Equal(t, items[3], "link_hi: svg octicon-file-symlink-file") - assert.Equal(t, items[4], "link_link: svg octicon-file-symlink-file") + assert.Len(t, items, 5) + assert.Equal(t, "a: svg octicon-file-directory", items[0]) + assert.Equal(t, "link_b: svg octicon-file-submodule", items[1]) + assert.Equal(t, "link_d: svg octicon-file-symlink-file", items[2]) + assert.Equal(t, "link_hi: svg octicon-file-symlink-file", items[3]) + assert.Equal(t, "link_link: svg octicon-file-symlink-file", items[4]) } // TestViewAsRepoAdmin tests PR #2167 diff --git a/integrations/signup_test.go b/integrations/signup_test.go index 5208a42ce..66ff8ac2d 100644 --- a/integrations/signup_test.go +++ b/integrations/signup_test.go @@ -10,6 +10,7 @@ import ( "strings" "testing" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" "github.com/unknwon/i18n" @@ -33,6 +34,28 @@ func TestSignup(t *testing.T) { MakeRequest(t, req, http.StatusOK) } +func TestSignupAsRestricted(t *testing.T) { + defer prepareTestEnv(t)() + + setting.Service.EnableCaptcha = false + setting.Service.DefaultUserIsRestricted = true + + req := NewRequestWithValues(t, "POST", "/user/sign_up", map[string]string{ + "user_name": "restrictedUser", + "email": "restrictedUser@example.com", + "password": "examplePassword!1", + "retype": "examplePassword!1", + }) + MakeRequest(t, req, http.StatusFound) + + // should be able to view new user's page + req = NewRequest(t, "GET", "/restrictedUser") + MakeRequest(t, req, http.StatusOK) + + user2 := models.AssertExistsAndLoadBean(t, &models.User{Name: "restrictedUser"}).(*models.User) + assert.True(t, user2.IsRestricted) +} + func TestSignupEmail(t *testing.T) { defer prepareTestEnv(t)() diff --git a/integrations/sqlite.ini.tmpl b/integrations/sqlite.ini.tmpl index 5ed096b0a..71ac39a44 100644 --- a/integrations/sqlite.ini.tmpl +++ b/integrations/sqlite.ini.tmpl @@ -6,9 +6,10 @@ DB_TYPE = sqlite3 PATH = integrations/gitea-integration-sqlite/gitea.db [indexer] -ISSUE_INDEXER_PATH = integrations/indexers-sqlite/issues.bleve +ISSUE_INDEXER_PATH = integrations/gitea-integration-sqlite/indexers/issues.bleve +ISSUE_INDEXER_QUEUE_DIR = integrations/gitea-integration-sqlite/indexers/issues.queue REPO_INDEXER_ENABLED = true -REPO_INDEXER_PATH = integrations/indexers-sqlite/repos.bleve +REPO_INDEXER_PATH = integrations/gitea-integration-sqlite/indexers/repos.bleve [queue.code_indexer] TYPE = immediate @@ -20,8 +21,10 @@ TYPE = immediate ROOT = {{REPO_TEST_DIR}}integrations/gitea-integration-sqlite/gitea-repositories [repository.local] -LOCAL_COPY_PATH = tmp/local-repo-sqlite -LOCAL_WIKI_PATH = tmp/local-wiki-sqlite +LOCAL_COPY_PATH = integrations/gitea-integration-sqlite/tmp/local-repo + +[repository.upload] +TEMP_PATH = integrations/gitea-integration-sqlite/tmp/uploads [repository.signing] SIGNING_KEY = none @@ -35,7 +38,7 @@ SSH_LISTEN_HOST = localhost SSH_PORT = 2203 START_SSH_SERVER = true LFS_START_SERVER = true -LFS_CONTENT_PATH = integrations/gitea-integration-sqlite/data +LFS_CONTENT_PATH = integrations/gitea-integration-sqlite/data/lfs OFFLINE_MODE = false LFS_JWT_SECRET = Tv_MjmZuHqpIY6GFl12ebgkRAMt4RlWt0v4EHKSXO0w APP_DATA_PATH = integrations/gitea-integration-sqlite/data @@ -43,7 +46,7 @@ ENABLE_GZIP = true BUILTIN_SSH_SERVER_USER = git [attachment] -PATH = integrations/gitea-integration-sqlite/data +PATH = integrations/gitea-integration-sqlite/data/attachments [mailer] ENABLED = true @@ -67,7 +70,6 @@ ENABLE_FEDERATED_AVATAR = false AVATAR_UPLOAD_PATH = integrations/gitea-integration-sqlite/data/avatars REPOSITORY_AVATAR_UPLOAD_PATH = integrations/gitea-integration-sqlite/data/repo-avatars - [session] PROVIDER = file PROVIDER_CONFIG = integrations/gitea-integration-sqlite/data/sessions @@ -75,10 +77,9 @@ PROVIDER_CONFIG = integrations/gitea-integration-sqlite/data/sessions [log] MODE = test,file ROOT_PATH = sqlite-log -REDIRECT_MACARON_LOG = true ROUTER = , -MACARON = , XORM = file +ENABLE_SSH_LOG = true [log.test] LEVEL = Info diff --git a/integrations/testlogger.go b/integrations/testlogger.go index f84ed47e4..69db480c1 100644 --- a/integrations/testlogger.go +++ b/integrations/testlogger.go @@ -6,7 +6,6 @@ package integrations import ( "context" - "encoding/json" "fmt" "os" "runtime" @@ -15,6 +14,7 @@ import ( "testing" "time" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/queue" ) @@ -90,6 +90,21 @@ func (w *testLoggerWriterCloser) Close() error { return nil } +func (w *testLoggerWriterCloser) Reset() { + w.Lock() + if len(w.t) > 0 { + for _, t := range w.t { + if t == nil { + continue + } + fmt.Fprintf(os.Stdout, "Unclosed logger writer in test: %s", (*t).Name()) + (*t).Errorf("Unclosed logger writer in test: %s", (*t).Name()) + } + w.t = nil + } + w.Unlock() +} + // PrintCurrentTest prints the current test to os.Stdout func PrintCurrentTest(t testing.TB, skip ...int) func() { start := time.Now() @@ -121,7 +136,7 @@ func PrintCurrentTest(t testing.TB, skip ...int) func() { fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", t.Name(), slowFlush) } }) - if err := queue.GetManager().FlushAll(context.Background(), -1); err != nil { + if err := queue.GetManager().FlushAll(context.Background(), 2*time.Minute); err != nil { t.Errorf("Flushing queues failed with error %v", err) } timer.Stop() diff --git a/integrations/user_avatar_test.go b/integrations/user_avatar_test.go new file mode 100644 index 000000000..1a3a85128 --- /dev/null +++ b/integrations/user_avatar_test.go @@ -0,0 +1,87 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package integrations + +import ( + "bytes" + "image/png" + "io" + "mime/multipart" + "net/http" + "net/url" + "strings" + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/avatar" + "github.com/stretchr/testify/assert" +) + +func TestUserAvatar(t *testing.T) { + onGiteaRun(t, func(t *testing.T, u *url.URL) { + user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo3, is an org + + seed := user2.Email + if len(seed) == 0 { + seed = user2.Name + } + + img, err := avatar.RandomImage([]byte(seed)) + if err != nil { + assert.NoError(t, err) + return + } + + session := loginUser(t, "user2") + csrf := GetCSRF(t, session, "/user/settings") + + imgData := &bytes.Buffer{} + + body := &bytes.Buffer{} + + //Setup multi-part + writer := multipart.NewWriter(body) + writer.WriteField("source", "local") + part, err := writer.CreateFormFile("avatar", "avatar-for-testuseravatar.png") + if err != nil { + assert.NoError(t, err) + return + } + + if err := png.Encode(imgData, img); err != nil { + assert.NoError(t, err) + return + } + + if _, err := io.Copy(part, imgData); err != nil { + assert.NoError(t, err) + return + } + + if err := writer.Close(); err != nil { + assert.NoError(t, err) + return + } + + req := NewRequestWithBody(t, "POST", "/user/settings/avatar", body) + req.Header.Add("X-Csrf-Token", csrf) + req.Header.Add("Content-Type", writer.FormDataContentType()) + + session.MakeRequest(t, req, http.StatusFound) + + user2 = models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo3, is an org + + req = NewRequest(t, "GET", user2.AvatarLink()) + resp := session.MakeRequest(t, req, http.StatusFound) + location := resp.Header().Get("Location") + if !strings.HasPrefix(location, "/avatars") { + assert.Fail(t, "Avatar location is not local: %s", location) + } + req = NewRequest(t, "GET", location) + session.MakeRequest(t, req, http.StatusOK) + + // Can't test if the response matches because the image is regened on upload but checking that this at least doesn't give a 404 should be enough. + }) +} diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 000000000..6937a52fc --- /dev/null +++ b/jest.config.js @@ -0,0 +1,10 @@ +export default { + rootDir: 'web_src', + setupFilesAfterEnv: ['jest-extended'], + testEnvironment: 'jsdom', + testMatch: ['/**/*.test.js'], + testTimeout: 20000, + transform: {}, + verbose: false, +}; + diff --git a/models/access.go b/models/access.go index 4b72a752b..5d0b0b06c 100644 --- a/models/access.go +++ b/models/access.go @@ -121,8 +121,8 @@ func (user *User) GetRepositoryAccesses() (map[*Repository]AccessMode, error) { } defer rows.Close() - var repos = make(map[*Repository]AccessMode, 10) - var ownerCache = make(map[int64]*User, 10) + repos := make(map[*Repository]AccessMode, 10) + ownerCache := make(map[int64]*User, 10) for rows.Next() { var repo repoAccess err = rows.Scan(&repo) @@ -246,7 +246,7 @@ func (repo *Repository) recalculateTeamAccesses(e Engine, ignTeamID int64) (err return fmt.Errorf("refreshCollaboratorAccesses: %v", err) } - if err = repo.Owner.getTeams(e); err != nil { + if err = repo.Owner.loadTeams(e); err != nil { return err } diff --git a/models/action.go b/models/action.go index 2fdab7f4e..3462a5e3f 100644 --- a/models/action.go +++ b/models/action.go @@ -26,30 +26,32 @@ type ActionType int // Possible action types. const ( - ActionCreateRepo ActionType = iota + 1 // 1 - ActionRenameRepo // 2 - ActionStarRepo // 3 - ActionWatchRepo // 4 - ActionCommitRepo // 5 - ActionCreateIssue // 6 - ActionCreatePullRequest // 7 - ActionTransferRepo // 8 - ActionPushTag // 9 - ActionCommentIssue // 10 - ActionMergePullRequest // 11 - ActionCloseIssue // 12 - ActionReopenIssue // 13 - ActionClosePullRequest // 14 - ActionReopenPullRequest // 15 - ActionDeleteTag // 16 - ActionDeleteBranch // 17 - ActionMirrorSyncPush // 18 - ActionMirrorSyncCreate // 19 - ActionMirrorSyncDelete // 20 - ActionApprovePullRequest // 21 - ActionRejectPullRequest // 22 - ActionCommentPull // 23 - ActionPublishRelease // 24 + ActionCreateRepo ActionType = iota + 1 // 1 + ActionRenameRepo // 2 + ActionStarRepo // 3 + ActionWatchRepo // 4 + ActionCommitRepo // 5 + ActionCreateIssue // 6 + ActionCreatePullRequest // 7 + ActionTransferRepo // 8 + ActionPushTag // 9 + ActionCommentIssue // 10 + ActionMergePullRequest // 11 + ActionCloseIssue // 12 + ActionReopenIssue // 13 + ActionClosePullRequest // 14 + ActionReopenPullRequest // 15 + ActionDeleteTag // 16 + ActionDeleteBranch // 17 + ActionMirrorSyncPush // 18 + ActionMirrorSyncCreate // 19 + ActionMirrorSyncDelete // 20 + ActionApprovePullRequest // 21 + ActionRejectPullRequest // 22 + ActionCommentPull // 23 + ActionPublishRelease // 24 + ActionPullReviewDismissed // 25 + ActionPullRequestReadyForReview // 26 ) // Action represents user operation type and other information to @@ -185,7 +187,7 @@ func (a *Action) GetRepoLink() string { } // GetRepositoryFromMatch returns a *Repository from a username and repo strings -func GetRepositoryFromMatch(ownerName string, repoName string) (*Repository, error) { +func GetRepositoryFromMatch(ownerName, repoName string) (*Repository, error) { var err error refRepo, err := GetRepositoryByOwnerAndName(ownerName, repoName) if err != nil { @@ -217,7 +219,7 @@ func (a *Action) getCommentLink(e Engine) string { if len(a.GetIssueInfos()) == 0 { return "#" } - //Return link to issue + // Return link to issue issueIDString := a.GetIssueInfos()[0] issueID, err := strconv.ParseInt(issueIDString, 10, 64) if err != nil { @@ -259,7 +261,7 @@ func (a *Action) GetCreate() time.Time { // GetIssueInfos returns a list of issues associated with // the action. func (a *Action) GetIssueInfos() []string { - return strings.SplitN(a.Content, "|", 2) + return strings.SplitN(a.Content, "|", 3) } // GetIssueTitle returns the title of first issue associated @@ -288,12 +290,13 @@ func (a *Action) GetIssueContent() string { // GetFeedsOptions options for retrieving feeds type GetFeedsOptions struct { - RequestedUser *User // the user we want activity for - RequestedTeam *Team // the team we want activity for - Actor *User // the user viewing the activity - IncludePrivate bool // include private actions - OnlyPerformedBy bool // only actions performed by requested user - IncludeDeleted bool // include deleted actions + RequestedUser *User // the user we want activity for + RequestedTeam *Team // the team we want activity for + Actor *User // the user viewing the activity + IncludePrivate bool // include private actions + OnlyPerformedBy bool // only actions performed by requested user + IncludeDeleted bool // include deleted actions + Date string // the day we want activity for: YYYY-MM-DD } // GetFeeds returns actions according to the provided options @@ -320,7 +323,7 @@ func GetFeeds(opts GetFeedsOptions) ([]*Action, error) { return actions, nil } -func activityReadable(user *User, doer *User) bool { +func activityReadable(user, doer *User) bool { var doerID int64 if doer != nil { doerID = doer.ID @@ -379,5 +382,27 @@ func activityQueryCondition(opts GetFeedsOptions) (builder.Cond, error) { cond = cond.And(builder.Eq{"is_deleted": false}) } + if opts.Date != "" { + dateLow, err := time.ParseInLocation("2006-01-02", opts.Date, setting.DefaultUILocation) + if err != nil { + log.Warn("Unable to parse %s, filter not applied: %v", opts.Date, err) + } else { + dateHigh := dateLow.Add(86399000000000) // 23h59m59s + + cond = cond.And(builder.Gte{"created_unix": dateLow.Unix()}) + cond = cond.And(builder.Lte{"created_unix": dateHigh.Unix()}) + } + } + return cond, nil } + +// DeleteOldActions deletes all old actions from database. +func DeleteOldActions(olderThan time.Duration) (err error) { + if olderThan <= 0 { + return nil + } + + _, err = x.Where("created_unix < ?", time.Now().Add(-olderThan).Unix()).Delete(&Action{}) + return +} diff --git a/models/action_test.go b/models/action_test.go index c6aaaaf06..6dab676a7 100644 --- a/models/action_test.go +++ b/models/action_test.go @@ -26,7 +26,7 @@ func TestAction_GetRepoLink(t *testing.T) { repo := AssertExistsAndLoadBean(t, &Repository{}).(*Repository) owner := AssertExistsAndLoadBean(t, &User{ID: repo.OwnerID}).(*User) action := &Action{RepoID: repo.ID} - setting.AppSubURL = "/suburl/" + setting.AppSubURL = "/suburl" expected := path.Join(setting.AppSubURL, owner.Name, repo.Name) assert.Equal(t, expected, action.GetRepoLink()) } diff --git a/models/admin.go b/models/admin.go index 4635676d0..3a784d669 100644 --- a/models/admin.go +++ b/models/admin.go @@ -14,11 +14,11 @@ import ( "code.gitea.io/gitea/modules/util" ) -//NoticeType describes the notice type +// NoticeType describes the notice type type NoticeType int const ( - //NoticeRepository type + // NoticeRepository type NoticeRepository NoticeType = iota + 1 // NoticeTask type NoticeTask @@ -75,7 +75,7 @@ func removeStorageWithNotice(e Engine, bucket storage.ObjectStorage, title, path if err := bucket.Delete(path); err != nil { desc := fmt.Sprintf("%s [%s]: %v", title, path, err) log.Warn(title+" [%s]: %v", path, err) - if err = createNotice(x, NoticeRepository, desc); err != nil { + if err = createNotice(e, NoticeRepository, desc); err != nil { log.Error("CreateRepositoryNotice: %v", err) } } @@ -114,6 +114,11 @@ func DeleteNotice(id int64) error { // DeleteNotices deletes all notices with ID from start to end (inclusive). func DeleteNotices(start, end int64) error { + if start == 0 && end == 0 { + _, err := x.Exec("DELETE FROM notice") + return err + } + sess := x.Where("id >= ?", start) if end > 0 { sess.And("id <= ?", end) diff --git a/models/attachment.go b/models/attachment.go index 55a6cfc01..e12609f81 100644 --- a/models/attachment.go +++ b/models/attachment.go @@ -85,7 +85,7 @@ func (a *Attachment) LinkedRepository() (*Repository, UnitType, error) { func NewAttachment(attach *Attachment, buf []byte, file io.Reader) (_ *Attachment, err error) { attach.UUID = gouuid.New().String() - size, err := storage.Attachments.Save(attach.RelativePath(), io.MultiReader(bytes.NewReader(buf), file)) + size, err := storage.Attachments.Save(attach.RelativePath(), io.MultiReader(bytes.NewReader(buf), file), -1) if err != nil { return nil, fmt.Errorf("Create: %v", err) } @@ -125,8 +125,8 @@ func getAttachmentByUUID(e Engine, uuid string) (*Attachment, error) { } // GetAttachmentsByUUIDs returns attachment by given UUID list. -func GetAttachmentsByUUIDs(uuids []string) ([]*Attachment, error) { - return getAttachmentsByUUIDs(x, uuids) +func GetAttachmentsByUUIDs(ctx DBContext, uuids []string) ([]*Attachment, error) { + return getAttachmentsByUUIDs(ctx.e, uuids) } func getAttachmentsByUUIDs(e Engine, uuids []string) ([]*Attachment, error) { @@ -183,22 +183,22 @@ func getAttachmentByReleaseIDFileName(e Engine, releaseID int64, fileName string // DeleteAttachment deletes the given attachment and optionally the associated file. func DeleteAttachment(a *Attachment, remove bool) error { - _, err := DeleteAttachments([]*Attachment{a}, remove) + _, err := DeleteAttachments(DefaultDBContext(), []*Attachment{a}, remove) return err } // DeleteAttachments deletes the given attachments and optionally the associated files. -func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) { +func DeleteAttachments(ctx DBContext, attachments []*Attachment, remove bool) (int, error) { if len(attachments) == 0 { return 0, nil } - var ids = make([]int64, 0, len(attachments)) + ids := make([]int64, 0, len(attachments)) for _, a := range attachments { ids = append(ids, a.ID) } - cnt, err := x.In("id", ids).NoAutoCondition().Delete(attachments[0]) + cnt, err := ctx.e.In("id", ids).NoAutoCondition().Delete(attachments[0]) if err != nil { return 0, err } @@ -216,23 +216,21 @@ func DeleteAttachments(attachments []*Attachment, remove bool) (int, error) { // DeleteAttachmentsByIssue deletes all attachments associated with the given issue. func DeleteAttachmentsByIssue(issueID int64, remove bool) (int, error) { attachments, err := GetAttachmentsByIssueID(issueID) - if err != nil { return 0, err } - return DeleteAttachments(attachments, remove) + return DeleteAttachments(DefaultDBContext(), attachments, remove) } // DeleteAttachmentsByComment deletes all attachments associated with the given comment. func DeleteAttachmentsByComment(commentID int64, remove bool) (int, error) { attachments, err := GetAttachmentsByCommentID(commentID) - if err != nil { return 0, err } - return DeleteAttachments(attachments, remove) + return DeleteAttachments(DefaultDBContext(), attachments, remove) } // UpdateAttachment updates the given attachment in database @@ -240,6 +238,15 @@ func UpdateAttachment(atta *Attachment) error { return updateAttachment(x, atta) } +// UpdateAttachmentByUUID Updates attachment via uuid +func UpdateAttachmentByUUID(ctx DBContext, attach *Attachment, cols ...string) error { + if attach.UUID == "" { + return fmt.Errorf("Attachement uuid should not blank") + } + _, err := ctx.e.Where("uuid=?", attach.UUID).Cols(cols...).Update(attach) + return err +} + func updateAttachment(e Engine, atta *Attachment) error { var sess *xorm.Session if atta.ID != 0 && atta.UUID == "" { @@ -263,7 +270,7 @@ func IterateAttachment(f func(attach *Attachment) error) error { var start int const batchSize = 100 for { - var attachments = make([]*Attachment, 0, batchSize) + attachments := make([]*Attachment, 0, batchSize) if err := x.Limit(batchSize, start).Find(&attachments); err != nil { return err } diff --git a/models/attachment_test.go b/models/attachment_test.go index 7d681e051..700b7c09d 100644 --- a/models/attachment_test.go +++ b/models/attachment_test.go @@ -17,12 +17,12 @@ func TestUploadAttachment(t *testing.T) { user := AssertExistsAndLoadBean(t, &User{ID: 1}).(*User) - var fPath = "./attachment_test.go" + fPath := "./attachment_test.go" f, err := os.Open(fPath) assert.NoError(t, err) defer f.Close() - var buf = make([]byte, 1024) + buf := make([]byte, 1024) n, err := f.Read(buf) assert.NoError(t, err) buf = buf[:n] @@ -61,11 +61,11 @@ func TestGetByCommentOrIssueID(t *testing.T) { // count of attachments from issue ID attachments, err := GetAttachmentsByIssueID(1) assert.NoError(t, err) - assert.Equal(t, 1, len(attachments)) + assert.Len(t, attachments, 1) attachments, err = GetAttachmentsByCommentID(1) assert.NoError(t, err) - assert.Equal(t, 2, len(attachments)) + assert.Len(t, attachments, 2) } func TestDeleteAttachments(t *testing.T) { @@ -120,9 +120,9 @@ func TestUpdateAttachment(t *testing.T) { func TestGetAttachmentsByUUIDs(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - attachList, err := GetAttachmentsByUUIDs([]string{"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a17", "not-existing-uuid"}) + attachList, err := GetAttachmentsByUUIDs(DefaultDBContext(), []string{"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a17", "not-existing-uuid"}) assert.NoError(t, err) - assert.Equal(t, 2, len(attachList)) + assert.Len(t, attachList, 2) assert.Equal(t, "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11", attachList[0].UUID) assert.Equal(t, "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a17", attachList[1].UUID) assert.Equal(t, int64(1), attachList[0].IssueID) @@ -152,7 +152,6 @@ func TestLinkedRepository(t *testing.T) { assert.Equal(t, tc.expectedRepo.ID, repo.ID) } assert.Equal(t, tc.expectedUnitType, unitType) - }) } } diff --git a/models/avatar.go b/models/avatar.go index 166ca337c..b4c078f8c 100644 --- a/models/avatar.go +++ b/models/avatar.go @@ -32,7 +32,7 @@ func DefaultAvatarLink() string { return "" } - u.Path = path.Join(u.Path, "/img/avatar_default.png") + u.Path = path.Join(u.Path, "/assets/img/avatar_default.png") return u.String() } @@ -44,7 +44,7 @@ const DefaultAvatarSize = -1 const DefaultAvatarPixelSize = 28 // AvatarRenderedSizeFactor is the factor by which the default size is increased for finer rendering -const AvatarRenderedSizeFactor = 2 +const AvatarRenderedSizeFactor = 4 // HashEmail hashes email address to MD5 string. // https://en.gravatar.com/site/implement/hash/ @@ -81,7 +81,7 @@ func LibravatarURL(email string) (*url.URL, error) { } // HashedAvatarLink returns an avatar link for a provided email -func HashedAvatarLink(email string) string { +func HashedAvatarLink(email string, size int) string { lowerEmail := strings.ToLower(strings.TrimSpace(email)) sum := fmt.Sprintf("%x", md5.Sum([]byte(lowerEmail))) _, _ = cache.GetString("Avatar:"+sum, func() (string, error) { @@ -96,6 +96,11 @@ func HashedAvatarLink(email string) string { // we don't care about any DB problem just return the lowerEmail return lowerEmail, nil } + has, err := sess.Where("email = ? AND hash = ?", emailHash.Email, emailHash.Hash).Get(new(EmailHash)) + if has || err != nil { + // Seriously we don't care about any DB problems just return the lowerEmail - we expect the transaction to fail most of the time + return lowerEmail, nil + } _, _ = sess.Insert(emailHash) if err := sess.Commit(); err != nil { // Seriously we don't care about any DB problems just return the lowerEmail - we expect the transaction to fail most of the time @@ -103,6 +108,9 @@ func HashedAvatarLink(email string) string { } return lowerEmail, nil }) + if size > 0 { + return setting.AppSubURL + "/avatar/" + url.PathEscape(sum) + "?size=" + strconv.Itoa(size) + } return setting.AppSubURL + "/avatar/" + url.PathEscape(sum) } @@ -124,7 +132,7 @@ func SizedAvatarLink(email string, size int) string { // This is the slow path that would need to call LibravatarURL() which // does DNS lookups. Avoid it by issuing a redirect so we don't block // the template render with network requests. - return HashedAvatarLink(email) + return HashedAvatarLink(email, size) } else if !setting.DisableGravatar { // copy GravatarSourceURL, because we will modify its Path. copyOfGravatarSourceURL := *setting.GravatarSourceURL diff --git a/models/avatar_test.go b/models/avatar_test.go index 89540705a..09f1a8066 100644 --- a/models/avatar_test.go +++ b/models/avatar_test.go @@ -40,8 +40,10 @@ func TestHashEmail(t *testing.T) { } func TestSizedAvatarLink(t *testing.T) { + setting.AppSubURL = "/testsuburl" + disableGravatar() - assert.Equal(t, "/suburl/img/avatar_default.png", + assert.Equal(t, "/testsuburl/assets/img/avatar_default.png", SizedAvatarLink("gitea@example.com", 100)) enableGravatar(t) diff --git a/models/branches.go b/models/branches.go index 80df8c433..e13d84ee0 100644 --- a/models/branches.go +++ b/models/branches.go @@ -157,7 +157,8 @@ func (protectBranch *ProtectedBranch) HasEnoughApprovals(pr *PullRequest) bool { func (protectBranch *ProtectedBranch) GetGrantedApprovalsCount(pr *PullRequest) int64 { sess := x.Where("issue_id = ?", pr.IssueID). And("type = ?", ReviewTypeApprove). - And("official = ?", true) + And("official = ?", true). + And("dismissed = ?", false) if protectBranch.DismissStaleApprovals { sess = sess.And("stale = ?", false) } @@ -178,6 +179,7 @@ func (protectBranch *ProtectedBranch) MergeBlockedByRejectedReview(pr *PullReque rejectExist, err := x.Where("issue_id = ?", pr.IssueID). And("type = ?", ReviewTypeReject). And("official = ?", true). + And("dismissed = ?", false). Exist(new(Review)) if err != nil { log.Error("MergeBlockedByRejectedReview: %v", err) @@ -217,7 +219,7 @@ func (protectBranch *ProtectedBranch) GetProtectedFilePatterns() []glob.Glob { expr = strings.TrimSpace(expr) if expr != "" { if g, err := glob.Compile(expr, '.', '/'); err != nil { - log.Info("Invalid glob expresion '%s' (skipped): %v", expr, err) + log.Info("Invalid glob expression '%s' (skipped): %v", expr, err) } else { extarr = append(extarr, g) } @@ -258,12 +260,6 @@ func (protectBranch *ProtectedBranch) IsProtectedFile(patterns []glob.Glob, path return r } -// GetProtectedBranchByRepoID getting protected branch by repo ID -func GetProtectedBranchByRepoID(repoID int64) ([]*ProtectedBranch, error) { - protectedBranches := make([]*ProtectedBranch, 0) - return protectedBranches, x.Where("repo_id = ?", repoID).Desc("updated_unix").Find(&protectedBranches) -} - // GetProtectedBranchBy getting protected branch by ID/Name func GetProtectedBranchBy(repoID int64, branchName string) (*ProtectedBranch, error) { return getProtectedBranchBy(x, repoID, branchName) @@ -281,19 +277,6 @@ func getProtectedBranchBy(e Engine, repoID int64, branchName string) (*Protected return rel, nil } -// GetProtectedBranchByID getting protected branch by ID -func GetProtectedBranchByID(id int64) (*ProtectedBranch, error) { - rel := &ProtectedBranch{} - has, err := x.ID(id).Get(rel) - if err != nil { - return nil, err - } - if !has { - return nil, nil - } - return rel, nil -} - // WhitelistOptions represent all sorts of whitelists used for protected branches type WhitelistOptions struct { UserIDs []int64 @@ -379,11 +362,7 @@ func (repo *Repository) GetBranchProtection(branchName string) (*ProtectedBranch } // IsProtectedBranch checks if branch is protected -func (repo *Repository) IsProtectedBranch(branchName string, doer *User) (bool, error) { - if doer == nil { - return true, nil - } - +func (repo *Repository) IsProtectedBranch(branchName string) (bool, error) { protectedBranch := &ProtectedBranch{ RepoID: repo.ID, BranchName: branchName, @@ -396,27 +375,6 @@ func (repo *Repository) IsProtectedBranch(branchName string, doer *User) (bool, return has, nil } -// IsProtectedBranchForPush checks if branch is protected for push -func (repo *Repository) IsProtectedBranchForPush(branchName string, doer *User) (bool, error) { - if doer == nil { - return true, nil - } - - protectedBranch := &ProtectedBranch{ - RepoID: repo.ID, - BranchName: branchName, - } - - has, err := x.Get(protectedBranch) - if err != nil { - return true, err - } else if has { - return !protectedBranch.CanUserPush(doer.ID), nil - } - - return false, nil -} - // updateApprovalWhitelist checks whether the user whitelist changed and returns a whitelist with // the users from newWhitelist which have explicit read or write access to the repo. func updateApprovalWhitelist(repo *Repository, currentWhitelist, newWhitelist []int64) (whitelist []int64, err error) { diff --git a/models/commit.go b/models/commit.go new file mode 100644 index 000000000..474825820 --- /dev/null +++ b/models/commit.go @@ -0,0 +1,20 @@ +// Copyright 2021 Gitea. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "code.gitea.io/gitea/modules/git" +) + +// ConvertFromGitCommit converts git commits into SignCommitWithStatuses +func ConvertFromGitCommit(commits []*git.Commit, repo *Repository) []*SignCommitWithStatuses { + return ParseCommitsWithStatus( + ParseCommitsWithSignature( + ValidateCommitsWithEmails(commits), + repo, + ), + repo, + ) +} diff --git a/models/commit_status.go b/models/commit_status.go index 5d637afc2..1ee3ead21 100644 --- a/models/commit_status.go +++ b/models/commit_status.go @@ -5,7 +5,6 @@ package models import ( - "container/list" "crypto/sha1" "fmt" "strings" @@ -160,7 +159,7 @@ func getLatestCommitStatus(e Engine, repoID int64, sha string, listOptions ListO if len(ids) == 0 { return statuses, nil } - return statuses, x.In("id", ids).Find(&statuses) + return statuses, e.In("id", ids).Find(&statuses) } // FindRepoRecentCommitStatusContexts returns repository's recent commit status contexts @@ -176,12 +175,11 @@ func FindRepoRecentCommitStatusContexts(repoID int64, before time.Duration) ([]s return nil, err } - var contexts = make([]string, 0, len(ids)) + contexts := make([]string, 0, len(ids)) if len(ids) == 0 { return contexts, nil } return contexts, x.Select("context").Table("commit_status").In("id", ids).Find(&contexts) - } // NewCommitStatusOptions holds options for creating a CommitStatus @@ -258,16 +256,12 @@ type SignCommitWithStatuses struct { } // ParseCommitsWithStatus checks commits latest statuses and calculates its worst status state -func ParseCommitsWithStatus(oldCommits *list.List, repo *Repository) *list.List { - var ( - newCommits = list.New() - e = oldCommits.Front() - ) +func ParseCommitsWithStatus(oldCommits []*SignCommit, repo *Repository) []*SignCommitWithStatuses { + newCommits := make([]*SignCommitWithStatuses, 0, len(oldCommits)) - for e != nil { - c := e.Value.(SignCommit) - commit := SignCommitWithStatuses{ - SignCommit: &c, + for _, c := range oldCommits { + commit := &SignCommitWithStatuses{ + SignCommit: c, } statuses, err := GetLatestCommitStatus(repo.ID, commit.ID.String(), ListOptions{}) if err != nil { @@ -277,8 +271,7 @@ func ParseCommitsWithStatus(oldCommits *list.List, repo *Repository) *list.List commit.Status = CalcCommitStatus(statuses) } - newCommits.PushBack(commit) - e = e.Next() + newCommits = append(newCommits, commit) } return newCommits } diff --git a/models/commit_status_test.go b/models/commit_status_test.go index 90d72cd74..57b97f660 100644 --- a/models/commit_status_test.go +++ b/models/commit_status_test.go @@ -18,7 +18,7 @@ func TestGetCommitStatuses(t *testing.T) { sha1 := "1234123412341234123412341234123412341234" - statuses, maxResults, err := GetCommitStatuses(repo1, sha1, &CommitStatusOptions{}) + statuses, maxResults, err := GetCommitStatuses(repo1, sha1, &CommitStatusOptions{ListOptions: ListOptions{Page: 1, PageSize: 50}}) assert.NoError(t, err) assert.Equal(t, int(maxResults), 5) assert.Len(t, statuses, 5) diff --git a/models/consistency.go b/models/consistency.go index fbb99ca80..f037b0515 100644 --- a/models/consistency.go +++ b/models/consistency.go @@ -5,10 +5,13 @@ package models import ( + "fmt" "reflect" + "regexp" "strings" "testing" + "code.gitea.io/gitea/modules/setting" "github.com/stretchr/testify/assert" "xorm.io/builder" ) @@ -138,6 +141,12 @@ func (milestone *Milestone) checkForConsistency(t *testing.T) { actual := getCount(t, x.Where("is_closed=?", true), &Issue{MilestoneID: milestone.ID}) assert.EqualValues(t, milestone.NumClosedIssues, actual, "Unexpected number of closed issues for milestone %+v", milestone) + + completeness := 0 + if milestone.NumIssues > 0 { + completeness = milestone.NumClosedIssues * 100 / milestone.NumIssues + } + assert.Equal(t, completeness, milestone.Completeness) } func (label *Label) checkForConsistency(t *testing.T) { @@ -177,17 +186,21 @@ func CountOrphanedLabels() (int64, error) { } norepo, err := x.Table("label"). - Join("LEFT", "repository", "label.repo_id=repository.id"). - Where(builder.IsNull{"repository.id"}).And(builder.Gt{"label.repo_id": 0}). - Count("id") + Where(builder.And( + builder.Gt{"repo_id": 0}, + builder.NotIn("repo_id", builder.Select("id").From("repository")), + )). + Count() if err != nil { return 0, err } noorg, err := x.Table("label"). - Join("LEFT", "`user`", "label.org_id=`user`.id"). - Where(builder.IsNull{"`user`.id"}).And(builder.Gt{"label.org_id": 0}). - Count("id") + Where(builder.And( + builder.Gt{"org_id": 0}, + builder.NotIn("org_id", builder.Select("id").From("user")), + )). + Count() if err != nil { return 0, err } @@ -203,17 +216,21 @@ func DeleteOrphanedLabels() error { } // delete labels with none existing repos - if _, err := x.In("id", builder.Select("label.id").From("label"). - Join("LEFT", "repository", "label.repo_id=repository.id"). - Where(builder.IsNull{"repository.id"}).And(builder.Gt{"label.repo_id": 0})). + if _, err := x. + Where(builder.And( + builder.Gt{"repo_id": 0}, + builder.NotIn("repo_id", builder.Select("id").From("repository")), + )). Delete(Label{}); err != nil { return err } // delete labels with none existing orgs - if _, err := x.In("id", builder.Select("label.id").From("label"). - Join("LEFT", "`user`", "label.org_id=`user`.id"). - Where(builder.IsNull{"`user`.id"}).And(builder.Gt{"label.org_id": 0})). + if _, err := x. + Where(builder.And( + builder.Gt{"org_id": 0}, + builder.NotIn("org_id", builder.Select("id").From("user")), + )). Delete(Label{}); err != nil { return err } @@ -221,6 +238,22 @@ func DeleteOrphanedLabels() error { return nil } +// CountOrphanedIssueLabels return count of IssueLabels witch have no label behind anymore +func CountOrphanedIssueLabels() (int64, error) { + return x.Table("issue_label"). + NotIn("label_id", builder.Select("id").From("label")). + Count() +} + +// DeleteOrphanedIssueLabels delete IssueLabels witch have no label behind anymore +func DeleteOrphanedIssueLabels() error { + _, err := x. + NotIn("label_id", builder.Select("id").From("label")). + Delete(IssueLabel{}) + + return err +} + // CountOrphanedIssues count issues without a repo func CountOrphanedIssues() (int64, error) { return x.Table("issue"). @@ -276,11 +309,15 @@ func CountOrphanedObjects(subject, refobject, joinCond string) (int64, error) { // DeleteOrphanedObjects delete subjects with have no existing refobject anymore func DeleteOrphanedObjects(subject, refobject, joinCond string) error { - _, err := x.In("id", builder.Select("`"+subject+"`.id"). + subQuery := builder.Select("`"+subject+"`.id"). From("`"+subject+"`"). Join("LEFT", "`"+refobject+"`", joinCond). - Where(builder.IsNull{"`" + refobject + "`.id"})). - Delete("`" + subject + "`") + Where(builder.IsNull{"`" + refobject + "`.id"}) + sql, args, err := builder.Delete(builder.In("id", subQuery)).From("`" + subject + "`").ToSQL() + if err != nil { + return err + } + _, err = x.Exec(append([]interface{}{sql}, args...)...) return err } @@ -291,7 +328,144 @@ func CountNullArchivedRepository() (int64, error) { // FixNullArchivedRepository sets is_archived to false where it is null func FixNullArchivedRepository() (int64, error) { - return x.Where(builder.IsNull{"is_archived"}).Cols("is_archived").Update(&Repository{ + return x.Where(builder.IsNull{"is_archived"}).Cols("is_archived").NoAutoTime().Update(&Repository{ IsArchived: false, }) } + +// CountWrongUserType count OrgUser who have wrong type +func CountWrongUserType() (int64, error) { + return x.Where(builder.Eq{"type": 0}.And(builder.Neq{"num_teams": 0})).Count(new(User)) +} + +// FixWrongUserType fix OrgUser who have wrong type +func FixWrongUserType() (int64, error) { + return x.Where(builder.Eq{"type": 0}.And(builder.Neq{"num_teams": 0})).Cols("type").NoAutoTime().Update(&User{Type: 1}) +} + +// CountCommentTypeLabelWithEmptyLabel count label comments with empty label +func CountCommentTypeLabelWithEmptyLabel() (int64, error) { + return x.Where(builder.Eq{"type": CommentTypeLabel, "label_id": 0}).Count(new(Comment)) +} + +// FixCommentTypeLabelWithEmptyLabel count label comments with empty label +func FixCommentTypeLabelWithEmptyLabel() (int64, error) { + return x.Where(builder.Eq{"type": CommentTypeLabel, "label_id": 0}).Delete(new(Comment)) +} + +// CountCommentTypeLabelWithOutsideLabels count label comments with outside label +func CountCommentTypeLabelWithOutsideLabels() (int64, error) { + return x.Where("comment.type = ? AND ((label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id))", CommentTypeLabel). + Table("comment"). + Join("inner", "label", "label.id = comment.label_id"). + Join("inner", "issue", "issue.id = comment.issue_id "). + Join("inner", "repository", "issue.repo_id = repository.id"). + Count(new(Comment)) +} + +// FixCommentTypeLabelWithOutsideLabels count label comments with outside label +func FixCommentTypeLabelWithOutsideLabels() (int64, error) { + res, err := x.Exec(`DELETE FROM comment WHERE comment.id IN ( + SELECT il_too.id FROM ( + SELECT com.id + FROM comment AS com + INNER JOIN label ON com.label_id = label.id + INNER JOIN issue on issue.id = com.issue_id + INNER JOIN repository ON issue.repo_id = repository.id + WHERE + com.type = ? AND ((label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id)) + ) AS il_too)`, CommentTypeLabel) + if err != nil { + return 0, err + } + + return res.RowsAffected() +} + +// CountIssueLabelWithOutsideLabels count label comments with outside label +func CountIssueLabelWithOutsideLabels() (int64, error) { + return x.Where(builder.Expr("(label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id)")). + Table("issue_label"). + Join("inner", "label", "issue_label.label_id = label.id "). + Join("inner", "issue", "issue.id = issue_label.issue_id "). + Join("inner", "repository", "issue.repo_id = repository.id"). + Count(new(IssueLabel)) +} + +// FixIssueLabelWithOutsideLabels fix label comments with outside label +func FixIssueLabelWithOutsideLabels() (int64, error) { + res, err := x.Exec(`DELETE FROM issue_label WHERE issue_label.id IN ( + SELECT il_too.id FROM ( + SELECT il_too_too.id + FROM issue_label AS il_too_too + INNER JOIN label ON il_too_too.label_id = label.id + INNER JOIN issue on issue.id = il_too_too.issue_id + INNER JOIN repository on repository.id = issue.repo_id + WHERE + (label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id) + ) AS il_too )`) + + if err != nil { + return 0, err + } + + return res.RowsAffected() +} + +// CountBadSequences looks for broken sequences from recreate-table mistakes +func CountBadSequences() (int64, error) { + if !setting.Database.UsePostgreSQL { + return 0, nil + } + + sess := x.NewSession() + defer sess.Close() + + var sequences []string + schema := sess.Engine().Dialect().URI().Schema + + sess.Engine().SetSchema("") + if err := sess.Table("information_schema.sequences").Cols("sequence_name").Where("sequence_name LIKE 'tmp_recreate__%_id_seq%' AND sequence_catalog = ?", setting.Database.Name).Find(&sequences); err != nil { + return 0, err + } + sess.Engine().SetSchema(schema) + + return int64(len(sequences)), nil +} + +// FixBadSequences fixes for broken sequences from recreate-table mistakes +func FixBadSequences() error { + if !setting.Database.UsePostgreSQL { + return nil + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + var sequences []string + schema := sess.Engine().Dialect().URI().Schema + + sess.Engine().SetSchema("") + if err := sess.Table("information_schema.sequences").Cols("sequence_name").Where("sequence_name LIKE 'tmp_recreate__%_id_seq%' AND sequence_catalog = ?", setting.Database.Name).Find(&sequences); err != nil { + return err + } + sess.Engine().SetSchema(schema) + + sequenceRegexp := regexp.MustCompile(`tmp_recreate__(\w+)_id_seq.*`) + + for _, sequence := range sequences { + tableName := sequenceRegexp.FindStringSubmatch(sequence)[1] + newSequenceName := tableName + "_id_seq" + if _, err := sess.Exec(fmt.Sprintf("ALTER SEQUENCE `%s` RENAME TO `%s`", sequence, newSequenceName)); err != nil { + return err + } + if _, err := sess.Exec(fmt.Sprintf("SELECT setval('%s', COALESCE((SELECT MAX(id)+1 FROM `%s`), 1), false)", newSequenceName, tableName)); err != nil { + return err + } + } + + return sess.Commit() +} diff --git a/models/consistency_test.go b/models/consistency_test.go new file mode 100644 index 000000000..0a91d9f3d --- /dev/null +++ b/models/consistency_test.go @@ -0,0 +1,32 @@ +// Copyright 2021 Gitea. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestDeleteOrphanedObjects(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + countBefore, err := x.Count(&PullRequest{}) + assert.NoError(t, err) + + _, err = x.Insert(&PullRequest{IssueID: 1000}, &PullRequest{IssueID: 1001}, &PullRequest{IssueID: 1003}) + assert.NoError(t, err) + + orphaned, err := CountOrphanedObjects("pull_request", "issue", "pull_request.issue_id=issue.id") + assert.NoError(t, err) + assert.EqualValues(t, 3, orphaned) + + err = DeleteOrphanedObjects("pull_request", "issue", "pull_request.issue_id=issue.id") + assert.NoError(t, err) + + countAfter, err := x.Count(&PullRequest{}) + assert.NoError(t, err) + assert.EqualValues(t, countBefore, countAfter) +} diff --git a/models/context.go b/models/context.go index 4fbd3b669..1221ab7de 100644 --- a/models/context.go +++ b/models/context.go @@ -42,7 +42,7 @@ func WithContext(f func(ctx DBContext) error) error { return f(DBContext{x}) } -// WithTx represents executing database operations on a trasaction +// WithTx represents executing database operations on a transaction func WithTx(f func(ctx DBContext) error) error { sess := x.NewSession() if err := sess.Begin(); err != nil { diff --git a/models/convert.go b/models/convert.go index baa63bb38..1deb7c66f 100644 --- a/models/convert.go +++ b/models/convert.go @@ -8,10 +8,16 @@ import ( "fmt" "code.gitea.io/gitea/modules/setting" + + "xorm.io/xorm/schemas" ) // ConvertUtf8ToUtf8mb4 converts database and tables from utf8 to utf8mb4 if it's mysql and set ROW_FORMAT=dynamic func ConvertUtf8ToUtf8mb4() error { + if x.Dialect().URI().DBType != schemas.MYSQL { + return nil + } + _, err := x.Exec(fmt.Sprintf("ALTER DATABASE `%s` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci", setting.Database.Name)) if err != nil { return err diff --git a/models/error.go b/models/error.go index 7f1eda1b1..fd8f2771a 100644 --- a/models/error.go +++ b/models/error.go @@ -72,8 +72,7 @@ func (err ErrNameCharsNotAllowed) Error() string { } // ErrSSHDisabled represents an "SSH disabled" error. -type ErrSSHDisabled struct { -} +type ErrSSHDisabled struct{} // IsErrSSHDisabled checks if an error is a ErrSSHDisabled. func IsErrSSHDisabled(err error) bool { @@ -146,6 +145,21 @@ func (err ErrUserNotExist) Error() string { return fmt.Sprintf("user does not exist [uid: %d, name: %s, keyid: %d]", err.UID, err.Name, err.KeyID) } +// ErrUserRedirectNotExist represents a "UserRedirectNotExist" kind of error. +type ErrUserRedirectNotExist struct { + Name string +} + +// IsErrUserRedirectNotExist check if an error is an ErrUserRedirectNotExist. +func IsErrUserRedirectNotExist(err error) bool { + _, ok := err.(ErrUserRedirectNotExist) + return ok +} + +func (err ErrUserRedirectNotExist) Error() string { + return fmt.Sprintf("user redirect does not exist [name: %s]", err.Name) +} + // ErrUserProhibitLogin represents a "ErrUserProhibitLogin" kind of error. type ErrUserProhibitLogin struct { UID int64 @@ -208,6 +222,36 @@ func (err ErrEmailInvalid) Error() string { return fmt.Sprintf("e-mail invalid [email: %s]", err.Email) } +// ErrEmailAddressNotExist email address not exist +type ErrEmailAddressNotExist struct { + Email string +} + +// IsErrEmailAddressNotExist checks if an error is an ErrEmailAddressNotExist +func IsErrEmailAddressNotExist(err error) bool { + _, ok := err.(ErrEmailAddressNotExist) + return ok +} + +func (err ErrEmailAddressNotExist) Error() string { + return fmt.Sprintf("Email address does not exist [email: %s]", err.Email) +} + +// ErrPrimaryEmailCannotDelete primary email address cannot be deleted +type ErrPrimaryEmailCannotDelete struct { + Email string +} + +// IsErrPrimaryEmailCannotDelete checks if an error is an ErrPrimaryEmailCannotDelete +func IsErrPrimaryEmailCannotDelete(err error) bool { + _, ok := err.(ErrPrimaryEmailCannotDelete) + return ok +} + +func (err ErrPrimaryEmailCannotDelete) Error() string { + return fmt.Sprintf("Primary email address cannot be deleted [email: %s]", err.Email) +} + // ErrOpenIDAlreadyUsed represents a "OpenIDAlreadyUsed" kind of error. type ErrOpenIDAlreadyUsed struct { OpenID string @@ -254,8 +298,7 @@ func (err ErrUserHasOrgs) Error() string { } // ErrUserNotAllowedCreateOrg represents a "UserNotAllowedCreateOrg" kind of error. -type ErrUserNotAllowedCreateOrg struct { -} +type ErrUserNotAllowedCreateOrg struct{} // IsErrUserNotAllowedCreateOrg checks if an error is an ErrUserNotAllowedCreateOrg. func IsErrUserNotAllowedCreateOrg(err error) bool { @@ -408,6 +451,7 @@ func (err ErrKeyNameAlreadyUsed) Error() string { // ErrGPGNoEmailFound represents a "ErrGPGNoEmailFound" kind of error. type ErrGPGNoEmailFound struct { FailedEmails []string + ID string } // IsErrGPGNoEmailFound checks if an error is a ErrGPGNoEmailFound. @@ -420,6 +464,22 @@ func (err ErrGPGNoEmailFound) Error() string { return fmt.Sprintf("none of the emails attached to the GPG key could be found: %v", err.FailedEmails) } +// ErrGPGInvalidTokenSignature represents a "ErrGPGInvalidTokenSignature" kind of error. +type ErrGPGInvalidTokenSignature struct { + Wrapped error + ID string +} + +// IsErrGPGInvalidTokenSignature checks if an error is a ErrGPGInvalidTokenSignature. +func IsErrGPGInvalidTokenSignature(err error) bool { + _, ok := err.(ErrGPGInvalidTokenSignature) + return ok +} + +func (err ErrGPGInvalidTokenSignature) Error() string { + return "the provided signature does not sign the token with the provided key" +} + // ErrGPGKeyParsing represents a "ErrGPGKeyParsing" kind of error. type ErrGPGKeyParsing struct { ParseError error @@ -588,8 +648,7 @@ func (err ErrAccessTokenNotExist) Error() string { } // ErrAccessTokenEmpty represents a "AccessTokenEmpty" kind of error. -type ErrAccessTokenEmpty struct { -} +type ErrAccessTokenEmpty struct{} // IsErrAccessTokenEmpty checks if an error is a ErrAccessTokenEmpty. func IsErrAccessTokenEmpty(err error) bool { @@ -742,6 +801,40 @@ func (err ErrRepoNotExist) Error() string { err.ID, err.UID, err.OwnerName, err.Name) } +// ErrNoPendingRepoTransfer is an error type for repositories without a pending +// transfer request +type ErrNoPendingRepoTransfer struct { + RepoID int64 +} + +func (e ErrNoPendingRepoTransfer) Error() string { + return fmt.Sprintf("repository doesn't have a pending transfer [repo_id: %d]", e.RepoID) +} + +// IsErrNoPendingTransfer is an error type when a repository has no pending +// transfers +func IsErrNoPendingTransfer(err error) bool { + _, ok := err.(ErrNoPendingRepoTransfer) + return ok +} + +// ErrRepoTransferInProgress represents the state of a repository that has an +// ongoing transfer +type ErrRepoTransferInProgress struct { + Uname string + Name string +} + +// IsErrRepoTransferInProgress checks if an error is a ErrRepoTransferInProgress. +func IsErrRepoTransferInProgress(err error) bool { + _, ok := err.(ErrRepoTransferInProgress) + return ok +} + +func (err ErrRepoTransferInProgress) Error() string { + return fmt.Sprintf("repository is already being transferred [uname: %s, name: %s]", err.Uname, err.Name) +} + // ErrRepoAlreadyExist represents a "RepoAlreadyExist" kind of error. type ErrRepoAlreadyExist struct { Uname string @@ -809,20 +902,43 @@ func (err ErrRepoRedirectNotExist) Error() string { // ErrInvalidCloneAddr represents a "InvalidCloneAddr" kind of error. type ErrInvalidCloneAddr struct { + Host string IsURLError bool IsInvalidPath bool + IsProtocolInvalid bool IsPermissionDenied bool + LocalPath bool + NotResolvedIP bool + PrivateNet string } // IsErrInvalidCloneAddr checks if an error is a ErrInvalidCloneAddr. func IsErrInvalidCloneAddr(err error) bool { - _, ok := err.(ErrInvalidCloneAddr) + _, ok := err.(*ErrInvalidCloneAddr) return ok } -func (err ErrInvalidCloneAddr) Error() string { - return fmt.Sprintf("invalid clone address [is_url_error: %v, is_invalid_path: %v, is_permission_denied: %v]", - err.IsURLError, err.IsInvalidPath, err.IsPermissionDenied) +func (err *ErrInvalidCloneAddr) Error() string { + if err.NotResolvedIP { + return fmt.Sprintf("migration/cloning from '%s' is not allowed: unknown hostname", err.Host) + } + if len(err.PrivateNet) != 0 { + return fmt.Sprintf("migration/cloning from '%s' is not allowed: the host resolve to a private ip address '%s'", err.Host, err.PrivateNet) + } + if err.IsInvalidPath { + return fmt.Sprintf("migration/cloning from '%s' is not allowed: the provided path is invalid", err.Host) + } + if err.IsProtocolInvalid { + return fmt.Sprintf("migration/cloning from '%s' is not allowed: the provided url protocol is not allowed", err.Host) + } + if err.IsPermissionDenied { + return fmt.Sprintf("migration/cloning from '%s' is not allowed.", err.Host) + } + if err.IsURLError { + return fmt.Sprintf("migration/cloning from '%s' is not allowed: the provided url is invalid", err.Host) + } + + return fmt.Sprintf("migration/cloning from '%s' is not allowed", err.Host) } // ErrUpdateTaskNotExist represents a "UpdateTaskNotExist" kind of error. @@ -886,6 +1002,21 @@ func (err ErrInvalidTagName) Error() string { return fmt.Sprintf("release tag name is not valid [tag_name: %s]", err.TagName) } +// ErrProtectedTagName represents a "ProtectedTagName" kind of error. +type ErrProtectedTagName struct { + TagName string +} + +// IsErrProtectedTagName checks if an error is a ErrProtectedTagName. +func IsErrProtectedTagName(err error) bool { + _, ok := err.(ErrProtectedTagName) + return ok +} + +func (err ErrProtectedTagName) Error() string { + return fmt.Sprintf("release tag name is protected [tag_name: %s]", err.TagName) +} + // ErrRepoFileAlreadyExists represents a "RepoFileAlreadyExist" kind of error. type ErrRepoFileAlreadyExists struct { Path string @@ -1000,7 +1131,7 @@ func IsErrUserDoesNotHaveAccessToRepo(err error) bool { } func (err ErrUserDoesNotHaveAccessToRepo) Error() string { - return fmt.Sprintf("user doesn't have acces to repo [user_id: %d, repo_name: %s]", err.UserID, err.RepoName) + return fmt.Sprintf("user doesn't have access to repo [user_id: %d, repo_name: %s]", err.UserID, err.RepoName) } // ErrWontSign explains the first reason why a commit would not be signed @@ -1019,29 +1150,6 @@ func IsErrWontSign(err error) bool { return ok } -// ErrMigrationNotAllowed explains why a migration from an url is not allowed -type ErrMigrationNotAllowed struct { - Host string - NotResolvedIP bool - PrivateNet string -} - -func (e *ErrMigrationNotAllowed) Error() string { - if e.NotResolvedIP { - return fmt.Sprintf("migrate from '%s' is not allowed: unknown hostname", e.Host) - } - if len(e.PrivateNet) != 0 { - return fmt.Sprintf("migrate from '%s' is not allowed: the host resolve to a private ip address '%s'", e.Host, e.PrivateNet) - } - return fmt.Sprintf("migrate from '%s is not allowed'", e.Host) -} - -// IsErrMigrationNotAllowed checks if an error is a ErrMigrationNotAllowed -func IsErrMigrationNotAllowed(err error) bool { - _, ok := err.(*ErrMigrationNotAllowed) - return ok -} - // __________ .__ // \______ \____________ ____ ____ | |__ // | | _/\_ __ \__ \ / \_/ ___\| | \ @@ -1198,7 +1306,7 @@ func IsErrSHAOrCommitIDNotProvided(err error) bool { } func (err ErrSHAOrCommitIDNotProvided) Error() string { - return "a SHA or commmit ID must be proved when updating a file" + return "a SHA or commit ID must be proved when updating a file" } // __ __ ___. .__ __ diff --git a/models/external_login_user.go b/models/external_login_user.go index ff153dfb8..aa5da8134 100644 --- a/models/external_login_user.go +++ b/models/external_login_user.go @@ -45,7 +45,6 @@ func ListAccountLinks(user *User) ([]*ExternalLoginUser, error) { err := x.Where("user_id=?", user.ID). Desc("login_source_id"). Find(&externalAccounts) - if err != nil { return nil, err } @@ -87,7 +86,7 @@ func removeAllAccountLinks(e Engine, user *User) error { } // GetUserIDByExternalUserID get user id according to provider and userID -func GetUserIDByExternalUserID(provider string, userID string) (int64, error) { +func GetUserIDByExternalUserID(provider, userID string) (int64, error) { var id int64 _, err := x.Table("external_login_user"). Select("user_id"). @@ -147,7 +146,7 @@ type FindExternalUserOptions struct { } func (opts FindExternalUserOptions) toConds() builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if len(opts.Provider) > 0 { cond = cond.And(builder.Eq{"provider": opts.Provider}) } diff --git a/models/fixture_generation.go b/models/fixture_generation.go index e3be7bce3..64cf16036 100644 --- a/models/fixture_generation.go +++ b/models/fixture_generation.go @@ -12,7 +12,6 @@ import ( // GetYamlFixturesAccess returns a string containing the contents // for the access table, as recalculated using repo.RecalculateAccesses() func GetYamlFixturesAccess() (string, error) { - repos := make([]*Repository, 0, 50) if err := x.Find(&repos); err != nil { return "", err diff --git a/models/fixtures/action.yml b/models/fixtures/action.yml index 14cfd9042..e3f3d2a97 100644 --- a/models/fixtures/action.yml +++ b/models/fixtures/action.yml @@ -32,3 +32,27 @@ repo_id: 22 is_private: true created_unix: 1603267920 + +- id: 5 + user_id: 10 + op_type: 1 # create repo + act_user_id: 10 + repo_id: 6 + is_private: true + created_unix: 1603010100 + +- id: 6 + user_id: 10 + op_type: 1 # create repo + act_user_id: 10 + repo_id: 7 + is_private: true + created_unix: 1603011300 + +- id: 7 + user_id: 10 + op_type: 1 # create repo + act_user_id: 10 + repo_id: 8 + is_private: false + created_unix: 1603011540 # grouped with id:7 diff --git a/models/fixtures/email_address.yml b/models/fixtures/email_address.yml index c37d9a787..e7df5fdc5 100644 --- a/models/fixtures/email_address.yml +++ b/models/fixtures/email_address.yml @@ -1,35 +1,279 @@ - id: 1 - uid: 1 + uid: 11 email: user11@example.com + lower_email: user11@example.com is_activated: false + is_primary: true - id: 2 - uid: 1 + uid: 12 email: user12@example.com - is_activated: false + lower_email: user12@example.com + is_activated: true + is_primary: true - id: 3 uid: 2 email: user2@example.com + lower_email: user2@example.com is_activated: true + is_primary: true - id: 4 - uid: 2 + uid: 21 email: user21@example.com - is_activated: false + lower_email: user21@example.com + is_activated: true + is_primary: true - id: 5 uid: 9999999 email: user9999999@example.com + lower_email: user9999999@example.com is_activated: true + is_primary: false - id: 6 uid: 10 - email: user101@example.com + email: user10@example.com + lower_email: user10@example.com is_activated: true + is_primary: true + +- + id: 7 + uid: 10 + email: user101@example.com + lower_email: user101@example.com + is_activated: true + is_primary: false + +- + id: 8 + uid: 9 + email: user9@example.com + lower_email: user9@example.com + is_activated: false + is_primary: true + +- + id: 9 + uid: 1 + email: user1@example.com + lower_email: user1@example.com + is_activated: true + is_primary: true + +- + id: 10 + uid: 3 + email: user3@example.com + lower_email: user3@example.com + is_activated: true + is_primary: true + +- + id: 11 + uid: 4 + email: user4@example.com + lower_email: user4@example.com + is_activated: true + is_primary: true + +- + id: 12 + uid: 5 + email: user5@example.com + lower_email: user5@example.com + is_activated: true + is_primary: true + +- + id: 13 + uid: 6 + email: user6@example.com + lower_email: user6@example.com + is_activated: true + is_primary: true + +- + id: 14 + uid: 7 + email: user7@example.com + lower_email: user7@example.com + is_activated: true + is_primary: true + +- + id: 15 + uid: 8 + email: user8@example.com + lower_email: user8@example.com + is_activated: true + is_primary: true + +- + id: 16 + uid: 13 + email: user13@example.com + lower_email: user13@example.com + is_activated: true + is_primary: true + +- + id: 17 + uid: 14 + email: user14@example.com + lower_email: user14@example.com + is_activated: true + is_primary: true + +- + id: 18 + uid: 15 + email: user15@example.com + lower_email: user15@example.com + is_activated: true + is_primary: true + +- + id: 19 + uid: 16 + email: user16@example.com + lower_email: user16@example.com + is_activated: true + is_primary: true + +- + id: 20 + uid: 17 + email: user17@example.com + lower_email: user17@example.com + is_activated: true + is_primary: true + +- + id: 21 + uid: 18 + email: user18@example.com + lower_email: user18@example.com + is_activated: true + is_primary: true + +- + id: 22 + uid: 19 + email: user19@example.com + lower_email: user19@example.com + is_activated: true + is_primary: true + +- + id: 23 + uid: 20 + email: user20@example.com + lower_email: user20@example.com + is_activated: true + is_primary: true + +- + id: 24 + uid: 22 + email: limited_org@example.com + lower_email: limited_org@example.com + is_activated: true + is_primary: true + +- + id: 25 + uid: 23 + email: privated_org@example.com + lower_email: privated_org@example.com + is_activated: true + is_primary: true + +- + id: 26 + uid: 24 + email: user24@example.com + lower_email: user24@example.com + is_activated: true + is_primary: true + +- + id: 27 + uid: 25 + email: org25@example.com + lower_email: org25@example.com + is_activated: true + is_primary: true + +- + id: 28 + uid: 26 + email: org26@example.com + lower_email: org26@example.com + is_activated: true + is_primary: true + +- + id: 29 + uid: 27 + email: user27@example.com + lower_email: user27@example.com + is_activated: true + is_primary: true + +- + id: 30 + uid: 28 + email: user28@example.com + lower_email: user28@example.com + is_activated: true + is_primary: true + +- + id: 31 + uid: 29 + email: user29@example.com + lower_email: user29@example.com + is_activated: true + is_primary: true + +- + id: 32 + uid: 30 + email: user30@example.com + lower_email: user30@example.com + is_activated: true + is_primary: true + +- + id: 33 + uid: 1 + email: user1-2@example.com + lower_email: user1-2@example.com + is_activated: true + is_primary: false + +- + id: 34 + uid: 1 + email: user1-3@example.com + lower_email: user1-3@example.com + is_activated: true + is_primary: false + +- + id: 35 + uid: 2 + email: user2-2@example.com + lower_email: user2-2@example.com + is_activated: false + is_primary: false \ No newline at end of file diff --git a/models/fixtures/issue.yml b/models/fixtures/issue.yml index 31df00d9e..d5738d5db 100644 --- a/models/fixtures/issue.yml +++ b/models/fixtures/issue.yml @@ -152,7 +152,7 @@ - id: 13 repo_id: 50 - index: 0 + index: 1 poster_id: 2 name: issue in active repo content: we'll be testing github issue 13171 with this. @@ -164,7 +164,7 @@ - id: 14 repo_id: 51 - index: 0 + index: 1 poster_id: 2 name: issue in archived repo content: we'll be testing github issue 13171 with this. @@ -172,3 +172,15 @@ is_pull: false created_unix: 1602935696 updated_unix: 1602935696 + +- + id: 15 + repo_id: 5 + index: 1 + poster_id: 2 + name: issue in repo not linked to team1 + content: content + is_closed: false + is_pull: false + created_unix: 1602935696 + updated_unix: 1602935696 diff --git a/models/fixtures/issue_index.yml b/models/fixtures/issue_index.yml new file mode 100644 index 000000000..49d95c57a --- /dev/null +++ b/models/fixtures/issue_index.yml @@ -0,0 +1,24 @@ +- + group_id: 1 + max_index: 5 +- + group_id: 2 + max_index: 2 +- + group_id: 3 + max_index: 2 +- + group_id: 10 + max_index: 1 +- + group_id: 48 + max_index: 1 +- + group_id: 42 + max_index: 1 +- + group_id: 50 + max_index: 1 +- + group_id: 51 + max_index: 1 \ No newline at end of file diff --git a/models/fixtures/issue_user.yml b/models/fixtures/issue_user.yml index 8039b1e40..64824316e 100644 --- a/models/fixtures/issue_user.yml +++ b/models/fixtures/issue_user.yml @@ -17,4 +17,4 @@ uid: 4 issue_id: 1 is_read: false - is_mentioned: false + is_mentioned: true diff --git a/models/fixtures/label.yml b/models/fixtures/label.yml index 3ad82eebe..1b7ce7468 100644 --- a/models/fixtures/label.yml +++ b/models/fixtures/label.yml @@ -33,3 +33,11 @@ num_issues: 1 num_closed_issues: 0 +- + id: 5 + repo_id: 10 + org_id: 0 + name: pull-test-label + color: '#000000' + num_issues: 0 + num_closed_issues: 0 diff --git a/models/fixtures/milestone.yml b/models/fixtures/milestone.yml index b9894a100..2cd994e63 100644 --- a/models/fixtures/milestone.yml +++ b/models/fixtures/milestone.yml @@ -29,3 +29,11 @@ content: content random is_closed: false num_issues: 0 + +- + id: 5 + repo_id: 10 + name: milestone of repo 10 + content: for testing with PRs + is_closed: false + num_issues: 0 diff --git a/models/fixtures/oauth2_grant.yml b/models/fixtures/oauth2_grant.yml index 105e3f22d..e52a2bce9 100644 --- a/models/fixtures/oauth2_grant.yml +++ b/models/fixtures/oauth2_grant.yml @@ -5,3 +5,19 @@ scope: "openid profile" created_unix: 1546869730 updated_unix: 1546869730 + +- id: 2 + user_id: 3 + application_id: 1 + counter: 1 + scope: "openid" + created_unix: 1546869730 + updated_unix: 1546869730 + +- id: 3 + user_id: 5 + application_id: 1 + counter: 1 + scope: "openid profile email" + created_unix: 1546869730 + updated_unix: 1546869730 \ No newline at end of file diff --git a/models/fixtures/release.yml b/models/fixtures/release.yml index 8d3f5840e..1703f959d 100644 --- a/models/fixtures/release.yml +++ b/models/fixtures/release.yml @@ -1,5 +1,4 @@ -- - id: 1 +- id: 1 repo_id: 1 publisher_id: 2 tag_name: "v1.1" @@ -13,8 +12,7 @@ is_tag: false created_unix: 946684800 -- - id: 2 +- id: 2 repo_id: 40 publisher_id: 2 tag_name: "v1.1" @@ -28,8 +26,7 @@ is_tag: false created_unix: 946684800 -- - id: 3 +- id: 3 repo_id: 1 publisher_id: 2 tag_name: "delete-tag" @@ -43,3 +40,29 @@ is_tag: true created_unix: 946684800 +- id: 4 + repo_id: 1 + publisher_id: 2 + tag_name: "draft-release" + lower_tag_name: "draft-release" + target: "master" + title: "draft-release" + is_draft: true + is_prerelease: false + is_tag: false + created_unix: 1619524806 + +- id: 5 + repo_id: 1 + publisher_id: 2 + tag_name: "v1.0" + lower_tag_name: "v1.0" + target: "master" + title: "pre-release" + note: "some text for a pre release" + sha1: "65f1bf27bc3bf70f64657658635e66094edbcb4d" + num_commits: 1 + is_draft: false + is_prerelease: true + is_tag: false + created_unix: 946684800 diff --git a/models/fixtures/repo_archiver.yml b/models/fixtures/repo_archiver.yml new file mode 100644 index 000000000..ca780a73a --- /dev/null +++ b/models/fixtures/repo_archiver.yml @@ -0,0 +1 @@ +[] # empty diff --git a/models/fixtures/repo_transfer.yml b/models/fixtures/repo_transfer.yml new file mode 100644 index 000000000..b841b5e98 --- /dev/null +++ b/models/fixtures/repo_transfer.yml @@ -0,0 +1,7 @@ +- + id: 1 + doer_id: 3 + recipient_id: 1 + repo_id: 3 + created_unix: 1553610671 + updated_unix: 1553610671 diff --git a/models/fixtures/repository.yml b/models/fixtures/repository.yml index 952408b0c..6860d00b3 100644 --- a/models/fixtures/repository.yml +++ b/models/fixtures/repository.yml @@ -73,7 +73,7 @@ lower_name: repo5 name: repo5 is_private: true - num_issues: 0 + num_issues: 1 num_closed_issues: 0 num_pulls: 0 num_closed_pulls: 0 @@ -148,6 +148,7 @@ num_closed_issues: 0 num_pulls: 1 num_closed_pulls: 0 + num_milestones: 1 is_mirror: false num_forks: 1 status: 0 @@ -734,4 +735,4 @@ num_watches: 0 num_projects: 0 num_closed_projects: 0 - status: 0 \ No newline at end of file + status: 0 diff --git a/models/fixtures/review.yml b/models/fixtures/review.yml index c7c16fb10..d44d0cde9 100644 --- a/models/fixtures/review.yml +++ b/models/fixtures/review.yml @@ -104,4 +104,4 @@ issue_id: 12 official: true updated_unix: 1603196749 - created_unix: 1603196749 \ No newline at end of file + created_unix: 1603196749 diff --git a/models/fixtures/user.yml b/models/fixtures/user.yml index d903a7942..850ee4041 100644 --- a/models/fixtures/user.yml +++ b/models/fixtures/user.yml @@ -508,7 +508,6 @@ num_repos: 0 is_active: true - - id: 30 lower_name: user30 @@ -525,3 +524,20 @@ avatar_email: user30@example.com num_repos: 2 is_active: true + +- + id: 31 + lower_name: user31 + name: user31 + full_name: "user31" + email: user31@example.com + passwd_hash_algo: argon2 + passwd: a3d5fcd92bae586c2e3dbe72daea7a0d27833a8d0227aa1704f4bbd775c1f3b03535b76dd93b0d4d8d22a519dca47df1547b # password + type: 0 # individual + salt: ZogKvWdyEx + is_admin: false + visibility: 2 + avatar: avatar31 + avatar_email: user31@example.com + num_repos: 0 + is_active: true diff --git a/models/fixtures/user_redirect.yml b/models/fixtures/user_redirect.yml new file mode 100644 index 000000000..8ff799339 --- /dev/null +++ b/models/fixtures/user_redirect.yml @@ -0,0 +1,4 @@ +- + id: 1 + lower_name: olduser1 + redirect_user_id: 1 diff --git a/models/gpg_key.go b/models/gpg_key.go index b944fdcbf..1072813b1 100644 --- a/models/gpg_key.go +++ b/models/gpg_key.go @@ -5,27 +5,25 @@ package models import ( - "bytes" - "container/list" - "crypto" - "encoding/base64" "fmt" - "hash" - "io" "strings" "time" - "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "github.com/keybase/go-crypto/openpgp" - "github.com/keybase/go-crypto/openpgp/armor" "github.com/keybase/go-crypto/openpgp/packet" "xorm.io/xorm" ) +// __________________ ________ ____ __. +// / _____/\______ \/ _____/ | |/ _|____ ___.__. +// / \ ___ | ___/ \ ___ | <_/ __ < | | +// \ \_\ \| | \ \_\ \ | | \ ___/\___ | +// \______ /|____| \______ / |____|__ \___ > ____| +// \/ \/ \/ \/\/ + // GPGKey represents a GPG key. type GPGKey struct { ID int64 `xorm:"pk autoincr"` @@ -38,18 +36,13 @@ type GPGKey struct { AddedUnix timeutil.TimeStamp SubsKey []*GPGKey `xorm:"-"` Emails []*EmailAddress + Verified bool `xorm:"NOT NULL DEFAULT false"` CanSign bool CanEncryptComms bool CanEncryptStorage bool CanCertify bool } -//GPGKeyImport the original import of key -type GPGKeyImport struct { - KeyID string `xorm:"pk CHAR(16) NOT NULL"` - Content string `xorm:"TEXT NOT NULL"` -} - // BeforeInsert will be invoked by XORM before inserting a record func (key *GPGKey) BeforeInsert() { key.AddedUnix = timeutil.TimeStampNow() @@ -65,7 +58,11 @@ func (key *GPGKey) AfterLoad(session *xorm.Session) { // ListGPGKeys returns a list of public keys belongs to given user. func ListGPGKeys(uid int64, listOptions ListOptions) ([]*GPGKey, error) { - sess := x.Where("owner_id=? AND primary_key_id=''", uid) + return listGPGKeys(x, uid, listOptions) +} + +func listGPGKeys(e Engine, uid int64, listOptions ListOptions) ([]*GPGKey, error) { + sess := e.Table(&GPGKey{}).Where("owner_id=? AND primary_key_id=''", uid) if listOptions.Page != 0 { sess = listOptions.setSessionPagination(sess) } @@ -74,6 +71,11 @@ func ListGPGKeys(uid int64, listOptions ListOptions) ([]*GPGKey, error) { return keys, sess.Find(&keys) } +// CountUserGPGKeys return number of gpg keys a user own +func CountUserGPGKeys(userID int64) (int64, error) { + return x.Where("owner_id=? AND primary_key_id=''", userID).Count(&GPGKey{}) +} + // GetGPGKeyByID returns public key by given ID. func GetGPGKeyByID(keyID int64) (*GPGKey, error) { key := new(GPGKey) @@ -92,132 +94,7 @@ func GetGPGKeysByKeyID(keyID string) ([]*GPGKey, error) { return keys, x.Where("key_id=?", keyID).Find(&keys) } -// GetGPGImportByKeyID returns the import public armored key by given KeyID. -func GetGPGImportByKeyID(keyID string) (*GPGKeyImport, error) { - key := new(GPGKeyImport) - has, err := x.ID(keyID).Get(key) - if err != nil { - return nil, err - } else if !has { - return nil, ErrGPGKeyImportNotExist{keyID} - } - return key, nil -} - -// checkArmoredGPGKeyString checks if the given key string is a valid GPG armored key. -// The function returns the actual public key on success -func checkArmoredGPGKeyString(content string) (openpgp.EntityList, error) { - list, err := openpgp.ReadArmoredKeyRing(strings.NewReader(content)) - if err != nil { - return nil, ErrGPGKeyParsing{err} - } - return list, nil -} - -//addGPGKey add key, import and subkeys to database -func addGPGKey(e Engine, key *GPGKey, content string) (err error) { - //Add GPGKeyImport - if _, err = e.Insert(GPGKeyImport{ - KeyID: key.KeyID, - Content: content, - }); err != nil { - return err - } - // Save GPG primary key. - if _, err = e.Insert(key); err != nil { - return err - } - // Save GPG subs key. - for _, subkey := range key.SubsKey { - if err := addGPGSubKey(e, subkey); err != nil { - return err - } - } - return nil -} - -//addGPGSubKey add subkeys to database -func addGPGSubKey(e Engine, key *GPGKey) (err error) { - // Save GPG primary key. - if _, err = e.Insert(key); err != nil { - return err - } - // Save GPG subs key. - for _, subkey := range key.SubsKey { - if err := addGPGSubKey(e, subkey); err != nil { - return err - } - } - return nil -} - -// AddGPGKey adds new public key to database. -func AddGPGKey(ownerID int64, content string) ([]*GPGKey, error) { - ekeys, err := checkArmoredGPGKeyString(content) - if err != nil { - return nil, err - } - sess := x.NewSession() - defer sess.Close() - if err = sess.Begin(); err != nil { - return nil, err - } - keys := make([]*GPGKey, 0, len(ekeys)) - for _, ekey := range ekeys { - // Key ID cannot be duplicated. - has, err := sess.Where("key_id=?", ekey.PrimaryKey.KeyIdString()). - Get(new(GPGKey)) - if err != nil { - return nil, err - } else if has { - return nil, ErrGPGKeyIDAlreadyUsed{ekey.PrimaryKey.KeyIdString()} - } - - //Get DB session - - key, err := parseGPGKey(ownerID, ekey) - if err != nil { - return nil, err - } - - if err = addGPGKey(sess, key, content); err != nil { - return nil, err - } - keys = append(keys, key) - } - return keys, sess.Commit() -} - -//base64EncPubKey encode public key content to base 64 -func base64EncPubKey(pubkey *packet.PublicKey) (string, error) { - var w bytes.Buffer - err := pubkey.Serialize(&w) - if err != nil { - return "", err - } - return base64.StdEncoding.EncodeToString(w.Bytes()), nil -} - -//base64DecPubKey decode public key content from base 64 -func base64DecPubKey(content string) (*packet.PublicKey, error) { - b, err := readerFromBase64(content) - if err != nil { - return nil, err - } - //Read key - p, err := packet.Read(b) - if err != nil { - return nil, err - } - //Check type - pkey, ok := p.(*packet.PublicKey) - if !ok { - return nil, fmt.Errorf("key is not a public key") - } - return pkey, nil -} - -//GPGKeyToEntity retrieve the imported key and the traducted entity +// GPGKeyToEntity retrieve the imported key and the traducted entity func GPGKeyToEntity(k *GPGKey) (*openpgp.Entity, error) { impKey, err := GetGPGImportByKeyID(k.KeyID) if err != nil { @@ -230,7 +107,7 @@ func GPGKeyToEntity(k *GPGKey) (*openpgp.Entity, error) { return keys[0], err } -//parseSubGPGKey parse a sub Key +// parseSubGPGKey parse a sub Key func parseSubGPGKey(ownerID int64, primaryID string, pubkey *packet.PublicKey, expiry time.Time) (*GPGKey, error) { content, err := base64EncPubKey(pubkey) if err != nil { @@ -250,31 +127,12 @@ func parseSubGPGKey(ownerID int64, primaryID string, pubkey *packet.PublicKey, e }, nil } -//getExpiryTime extract the expire time of primary key based on sig -func getExpiryTime(e *openpgp.Entity) time.Time { - expiry := time.Time{} - //Extract self-sign for expire date based on : https://github.com/golang/crypto/blob/master/openpgp/keys.go#L165 - var selfSig *packet.Signature - for _, ident := range e.Identities { - if selfSig == nil { - selfSig = ident.SelfSignature - } else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { - selfSig = ident.SelfSignature - break - } - } - if selfSig.KeyLifetimeSecs != nil { - expiry = e.PrimaryKey.CreationTime.Add(time.Duration(*selfSig.KeyLifetimeSecs) * time.Second) - } - return expiry -} - -//parseGPGKey parse a PrimaryKey entity (primary key + subs keys + self-signature) -func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) { +// parseGPGKey parse a PrimaryKey entity (primary key + subs keys + self-signature) +func parseGPGKey(ownerID int64, e *openpgp.Entity, verified bool) (*GPGKey, error) { pubkey := e.PrimaryKey expiry := getExpiryTime(e) - //Parse Subkeys + // Parse Subkeys subkeys := make([]*GPGKey, len(e.Subkeys)) for i, k := range e.Subkeys { subs, err := parseSubGPGKey(ownerID, pubkey.KeyIdString(), k.PublicKey, expiry) @@ -284,7 +142,7 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) { subkeys[i] = subs } - //Check emails + // Check emails userEmails, err := GetEmailAddresses(ownerID) if err != nil { return nil, err @@ -297,20 +155,22 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) { } email := strings.ToLower(strings.TrimSpace(ident.UserId.Email)) for _, e := range userEmails { - if e.Email == email { + if e.IsActivated && e.LowerEmail == email { emails = append(emails, e) break } } } - //In the case no email as been found - if len(emails) == 0 { - failedEmails := make([]string, 0, len(e.Identities)) - for _, ident := range e.Identities { - failedEmails = append(failedEmails, ident.UserId.Email) + if !verified { + // In the case no email as been found + if len(emails) == 0 { + failedEmails := make([]string, 0, len(e.Identities)) + for _, ident := range e.Identities { + failedEmails = append(failedEmails, ident.UserId.Email) + } + return nil, ErrGPGNoEmailFound{failedEmails, e.PrimaryKey.KeyIdString()} } - return nil, ErrGPGNoEmailFound{failedEmails} } content, err := base64EncPubKey(pubkey) @@ -326,6 +186,7 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) { ExpiredUnix: timeutil.TimeStamp(expiry.Unix()), Emails: emails, SubsKey: subkeys, + Verified: verified, CanSign: pubkey.CanSign(), CanEncryptComms: pubkey.PubKeyAlgo.CanEncrypt(), CanEncryptStorage: pubkey.PubKeyAlgo.CanEncrypt(), @@ -336,9 +197,9 @@ func parseGPGKey(ownerID int64, e *openpgp.Entity) (*GPGKey, error) { // deleteGPGKey does the actual key deletion func deleteGPGKey(e *xorm.Session, keyID string) (int64, error) { if keyID == "" { - return 0, fmt.Errorf("empty KeyId forbidden") //Should never happen but just to be sure + return 0, fmt.Errorf("empty KeyId forbidden") // Should never happen but just to be sure } - //Delete imported key + // Delete imported key n, err := e.Where("key_id=?", keyID).Delete(new(GPGKeyImport)) if err != nil { return n, err @@ -374,545 +235,32 @@ func DeleteGPGKey(doer *User, id int64) (err error) { return sess.Commit() } -// CommitVerification represents a commit validation of signature -type CommitVerification struct { - Verified bool - Warning bool - Reason string - SigningUser *User - CommittingUser *User - SigningEmail string - SigningKey *GPGKey - TrustStatus string -} - -// SignCommit represents a commit with validation of signature. -type SignCommit struct { - Verification *CommitVerification - *UserCommit -} - -const ( - // BadSignature is used as the reason when the signature has a KeyID that is in the db - // but no key that has that ID verifies the signature. This is a suspicious failure. - BadSignature = "gpg.error.probable_bad_signature" - // BadDefaultSignature is used as the reason when the signature has a KeyID that matches the - // default Key but is not verified by the default key. This is a suspicious failure. - BadDefaultSignature = "gpg.error.probable_bad_default_signature" - // NoKeyFound is used as the reason when no key can be found to verify the signature. - NoKeyFound = "gpg.error.no_gpg_keys_found" -) - -func readerFromBase64(s string) (io.Reader, error) { - bs, err := base64.StdEncoding.DecodeString(s) - if err != nil { - return nil, err - } - return bytes.NewBuffer(bs), nil -} - -func populateHash(hashFunc crypto.Hash, msg []byte) (hash.Hash, error) { - h := hashFunc.New() - if _, err := h.Write(msg); err != nil { - return nil, err - } - return h, nil -} - -// readArmoredSign read an armored signature block with the given type. https://sourcegraph.com/github.com/golang/crypto/-/blob/openpgp/read.go#L24:6-24:17 -func readArmoredSign(r io.Reader) (body io.Reader, err error) { - block, err := armor.Decode(r) - if err != nil { - return - } - if block.Type != openpgp.SignatureType { - return nil, fmt.Errorf("expected '" + openpgp.SignatureType + "', got: " + block.Type) - } - return block.Body, nil -} - -func extractSignature(s string) (*packet.Signature, error) { - r, err := readArmoredSign(strings.NewReader(s)) - if err != nil { - return nil, fmt.Errorf("Failed to read signature armor") - } - p, err := packet.Read(r) - if err != nil { - return nil, fmt.Errorf("Failed to read signature packet") - } - sig, ok := p.(*packet.Signature) - if !ok { - return nil, fmt.Errorf("Packet is not a signature") - } - return sig, nil -} - -func verifySign(s *packet.Signature, h hash.Hash, k *GPGKey) error { - //Check if key can sign - if !k.CanSign { - return fmt.Errorf("key can not sign") - } - //Decode key - pkey, err := base64DecPubKey(k.Content) - if err != nil { - return err - } - return pkey.VerifySignature(h, s) -} - -func hashAndVerify(sig *packet.Signature, payload string, k *GPGKey, committer, signer *User, email string) *CommitVerification { - //Generating hash of commit - hash, err := populateHash(sig.Hash, []byte(payload)) - if err != nil { //Skipping failed to generate hash - log.Error("PopulateHash: %v", err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.generate_hash", - } - } - - if err := verifySign(sig, hash, k); err == nil { - return &CommitVerification{ //Everything is ok - CommittingUser: committer, - Verified: true, - Reason: fmt.Sprintf("%s / %s", signer.Name, k.KeyID), - SigningUser: signer, - SigningKey: k, - SigningEmail: email, - } - } - return nil -} - -func hashAndVerifyWithSubKeys(sig *packet.Signature, payload string, k *GPGKey, committer, signer *User, email string) *CommitVerification { - commitVerification := hashAndVerify(sig, payload, k, committer, signer, email) - if commitVerification != nil { - return commitVerification - } - - //And test also SubsKey - for _, sk := range k.SubsKey { - commitVerification := hashAndVerify(sig, payload, sk, committer, signer, email) - if commitVerification != nil { - return commitVerification - } - } - return nil -} - -func hashAndVerifyForKeyID(sig *packet.Signature, payload string, committer *User, keyID, name, email string) *CommitVerification { - if keyID == "" { - return nil - } - keys, err := GetGPGKeysByKeyID(keyID) - if err != nil { - log.Error("GetGPGKeysByKeyID: %v", err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.failed_retrieval_gpg_keys", - } - } - if len(keys) == 0 { - return nil - } +func checkKeyEmails(email string, keys ...*GPGKey) (bool, string) { + uid := int64(0) + var userEmails []*EmailAddress + var user *User for _, key := range keys { - var primaryKeys []*GPGKey - if key.PrimaryKeyID != "" { - primaryKeys, err = GetGPGKeysByKeyID(key.PrimaryKeyID) - if err != nil { - log.Error("GetGPGKeysByKeyID: %v", err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.failed_retrieval_gpg_keys", - } + for _, e := range key.Emails { + if e.IsActivated && (email == "" || strings.EqualFold(e.Email, email)) { + return true, e.Email } } - activated := false - if len(email) != 0 { - for _, e := range key.Emails { - if e.IsActivated && strings.EqualFold(e.Email, email) { - activated = true - email = e.Email - break + if key.Verified && key.OwnerID != 0 { + if uid != key.OwnerID { + userEmails, _ = GetEmailAddresses(key.OwnerID) + uid = key.OwnerID + user = &User{ID: uid} + _, _ = GetUser(user) + } + for _, e := range userEmails { + if e.IsActivated && (email == "" || strings.EqualFold(e.Email, email)) { + return true, e.Email } } - if !activated { - for _, pkey := range primaryKeys { - for _, e := range pkey.Emails { - if e.IsActivated && strings.EqualFold(e.Email, email) { - activated = true - email = e.Email - break - } - } - if activated { - break - } - } + if user.KeepEmailPrivate && strings.EqualFold(email, user.GetEmail()) { + return true, user.GetEmail() } - } else { - for _, e := range key.Emails { - if e.IsActivated { - activated = true - email = e.Email - break - } - } - if !activated { - for _, pkey := range primaryKeys { - for _, e := range pkey.Emails { - if e.IsActivated { - activated = true - email = e.Email - break - } - } - if activated { - break - } - } - } - } - - if !activated { - continue - } - signer := &User{ - Name: name, - Email: email, - } - if key.OwnerID != 0 { - owner, err := GetUserByID(key.OwnerID) - if err == nil { - signer = owner - } else if !IsErrUserNotExist(err) { - log.Error("Failed to GetUserByID: %d for key ID: %d (%s) %v", key.OwnerID, key.ID, key.KeyID, err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.no_committer_account", - } - } - } - commitVerification := hashAndVerifyWithSubKeys(sig, payload, key, committer, signer, email) - if commitVerification != nil { - return commitVerification } } - // This is a bad situation ... We have a key id that is in our database but the signature doesn't match. - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Warning: true, - Reason: BadSignature, - } -} - -// ParseCommitWithSignature check if signature is good against keystore. -func ParseCommitWithSignature(c *git.Commit) *CommitVerification { - var committer *User - if c.Committer != nil { - var err error - //Find Committer account - committer, err = GetUserByEmail(c.Committer.Email) //This finds the user by primary email or activated email so commit will not be valid if email is not - if err != nil { //Skipping not user for commiter - committer = &User{ - Name: c.Committer.Name, - Email: c.Committer.Email, - } - // We can expect this to often be an ErrUserNotExist. in the case - // it is not, however, it is important to log it. - if !IsErrUserNotExist(err) { - log.Error("GetUserByEmail: %v", err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.no_committer_account", - } - } - - } - } - - // If no signature just report the committer - if c.Signature == nil { - return &CommitVerification{ - CommittingUser: committer, - Verified: false, //Default value - Reason: "gpg.error.not_signed_commit", //Default value - } - } - - //Parsing signature - sig, err := extractSignature(c.Signature.Signature) - if err != nil { //Skipping failed to extract sign - log.Error("SignatureRead err: %v", err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.extract_sign", - } - } - - keyID := "" - if sig.IssuerKeyId != nil && (*sig.IssuerKeyId) != 0 { - keyID = fmt.Sprintf("%X", *sig.IssuerKeyId) - } - if keyID == "" && sig.IssuerFingerprint != nil && len(sig.IssuerFingerprint) > 0 { - keyID = fmt.Sprintf("%X", sig.IssuerFingerprint[12:20]) - } - defaultReason := NoKeyFound - - // First check if the sig has a keyID and if so just look at that - if commitVerification := hashAndVerifyForKeyID( - sig, - c.Signature.Payload, - committer, - keyID, - setting.AppName, - ""); commitVerification != nil { - if commitVerification.Reason == BadSignature { - defaultReason = BadSignature - } else { - return commitVerification - } - } - - // Now try to associate the signature with the committer, if present - if committer.ID != 0 { - keys, err := ListGPGKeys(committer.ID, ListOptions{}) - if err != nil { //Skipping failed to get gpg keys of user - log.Error("ListGPGKeys: %v", err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.failed_retrieval_gpg_keys", - } - } - - for _, k := range keys { - //Pre-check (& optimization) that emails attached to key can be attached to the commiter email and can validate - canValidate := false - email := "" - for _, e := range k.Emails { - if e.IsActivated && strings.EqualFold(e.Email, c.Committer.Email) { - canValidate = true - email = e.Email - break - } - } - if !canValidate { - continue //Skip this key - } - - commitVerification := hashAndVerifyWithSubKeys(sig, c.Signature.Payload, k, committer, committer, email) - if commitVerification != nil { - return commitVerification - } - } - } - - if setting.Repository.Signing.SigningKey != "" && setting.Repository.Signing.SigningKey != "default" && setting.Repository.Signing.SigningKey != "none" { - // OK we should try the default key - gpgSettings := git.GPGSettings{ - Sign: true, - KeyID: setting.Repository.Signing.SigningKey, - Name: setting.Repository.Signing.SigningName, - Email: setting.Repository.Signing.SigningEmail, - } - if err := gpgSettings.LoadPublicKeyContent(); err != nil { - log.Error("Error getting default signing key: %s %v", gpgSettings.KeyID, err) - } else if commitVerification := verifyWithGPGSettings(&gpgSettings, sig, c.Signature.Payload, committer, keyID); commitVerification != nil { - if commitVerification.Reason == BadSignature { - defaultReason = BadSignature - } else { - return commitVerification - } - } - } - - defaultGPGSettings, err := c.GetRepositoryDefaultPublicGPGKey(false) - if err != nil { - log.Error("Error getting default public gpg key: %v", err) - } else if defaultGPGSettings == nil { - log.Warn("Unable to get defaultGPGSettings for unattached commit: %s", c.ID.String()) - } else if defaultGPGSettings.Sign { - if commitVerification := verifyWithGPGSettings(defaultGPGSettings, sig, c.Signature.Payload, committer, keyID); commitVerification != nil { - if commitVerification.Reason == BadSignature { - defaultReason = BadSignature - } else { - return commitVerification - } - } - } - - return &CommitVerification{ //Default at this stage - CommittingUser: committer, - Verified: false, - Warning: defaultReason != NoKeyFound, - Reason: defaultReason, - SigningKey: &GPGKey{ - KeyID: keyID, - }, - } -} - -func verifyWithGPGSettings(gpgSettings *git.GPGSettings, sig *packet.Signature, payload string, committer *User, keyID string) *CommitVerification { - // First try to find the key in the db - if commitVerification := hashAndVerifyForKeyID(sig, payload, committer, gpgSettings.KeyID, gpgSettings.Name, gpgSettings.Email); commitVerification != nil { - return commitVerification - } - - // Otherwise we have to parse the key - ekeys, err := checkArmoredGPGKeyString(gpgSettings.PublicKeyContent) - if err != nil { - log.Error("Unable to get default signing key: %v", err) - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.generate_hash", - } - } - for _, ekey := range ekeys { - pubkey := ekey.PrimaryKey - content, err := base64EncPubKey(pubkey) - if err != nil { - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.generate_hash", - } - } - k := &GPGKey{ - Content: content, - CanSign: pubkey.CanSign(), - KeyID: pubkey.KeyIdString(), - } - for _, subKey := range ekey.Subkeys { - content, err := base64EncPubKey(subKey.PublicKey) - if err != nil { - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Reason: "gpg.error.generate_hash", - } - } - k.SubsKey = append(k.SubsKey, &GPGKey{ - Content: content, - CanSign: subKey.PublicKey.CanSign(), - KeyID: subKey.PublicKey.KeyIdString(), - }) - } - if commitVerification := hashAndVerifyWithSubKeys(sig, payload, k, committer, &User{ - Name: gpgSettings.Name, - Email: gpgSettings.Email, - }, gpgSettings.Email); commitVerification != nil { - return commitVerification - } - if keyID == k.KeyID { - // This is a bad situation ... We have a key id that matches our default key but the signature doesn't match. - return &CommitVerification{ - CommittingUser: committer, - Verified: false, - Warning: true, - Reason: BadSignature, - } - } - } - return nil -} - -// ParseCommitsWithSignature checks if signaute of commits are corresponding to users gpg keys. -func ParseCommitsWithSignature(oldCommits *list.List, repository *Repository) *list.List { - var ( - newCommits = list.New() - e = oldCommits.Front() - ) - keyMap := map[string]bool{} - - for e != nil { - c := e.Value.(UserCommit) - signCommit := SignCommit{ - UserCommit: &c, - Verification: ParseCommitWithSignature(c.Commit), - } - - _ = CalculateTrustStatus(signCommit.Verification, repository, &keyMap) - - newCommits.PushBack(signCommit) - e = e.Next() - } - return newCommits -} - -// CalculateTrustStatus will calculate the TrustStatus for a commit verification within a repository -func CalculateTrustStatus(verification *CommitVerification, repository *Repository, keyMap *map[string]bool) (err error) { - if !verification.Verified { - return - } - - // There are several trust models in Gitea - trustModel := repository.GetTrustModel() - - // In the Committer trust model a signature is trusted if it matches the committer - // - it doesn't matter if they're a collaborator, the owner, Gitea or Github - // NB: This model is commit verification only - if trustModel == CommitterTrustModel { - // default to "unmatched" - verification.TrustStatus = "unmatched" - - // We can only verify against users in our database but the default key will match - // against by email if it is not in the db. - if (verification.SigningUser.ID != 0 && - verification.CommittingUser.ID == verification.SigningUser.ID) || - (verification.SigningUser.ID == 0 && verification.CommittingUser.ID == 0 && - verification.SigningUser.Email == verification.CommittingUser.Email) { - verification.TrustStatus = "trusted" - } - return - } - - // Now we drop to the more nuanced trust models... - verification.TrustStatus = "trusted" - - if verification.SigningUser.ID == 0 { - // This commit is signed by the default key - but this key is not assigned to a user in the DB. - - // However in the CollaboratorCommitterTrustModel we cannot mark this as trusted - // unless the default key matches the email of a non-user. - if trustModel == CollaboratorCommitterTrustModel && (verification.CommittingUser.ID != 0 || - verification.SigningUser.Email != verification.CommittingUser.Email) { - verification.TrustStatus = "untrusted" - } - return - } - - var isMember bool - if keyMap != nil { - var has bool - isMember, has = (*keyMap)[verification.SigningKey.KeyID] - if !has { - isMember, err = repository.IsOwnerMemberCollaborator(verification.SigningUser.ID) - (*keyMap)[verification.SigningKey.KeyID] = isMember - } - } else { - isMember, err = repository.IsOwnerMemberCollaborator(verification.SigningUser.ID) - } - - if !isMember { - verification.TrustStatus = "untrusted" - if verification.CommittingUser.ID != verification.SigningUser.ID { - // The committing user and the signing user are not the same - // This should be marked as questionable unless the signing user is a collaborator/team member etc. - verification.TrustStatus = "unmatched" - } - } else if trustModel == CollaboratorCommitterTrustModel && verification.CommittingUser.ID != verification.SigningUser.ID { - // The committing user and the signing user are not the same and our trustmodel states that they must match - verification.TrustStatus = "unmatched" - } - - return + return false, email } diff --git a/models/gpg_key_add.go b/models/gpg_key_add.go new file mode 100644 index 000000000..1e589e7fe --- /dev/null +++ b/models/gpg_key_add.go @@ -0,0 +1,125 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "strings" + + "code.gitea.io/gitea/modules/log" + + "github.com/keybase/go-crypto/openpgp" +) + +// __________________ ________ ____ __. +// / _____/\______ \/ _____/ | |/ _|____ ___.__. +// / \ ___ | ___/ \ ___ | <_/ __ < | | +// \ \_\ \| | \ \_\ \ | | \ ___/\___ | +// \______ /|____| \______ / |____|__ \___ > ____| +// \/ \/ \/ \/\/ +// _____ .___ .___ +// / _ \ __| _/__| _/ +// / /_\ \ / __ |/ __ | +// / | \/ /_/ / /_/ | +// \____|__ /\____ \____ | +// \/ \/ \/ + +// This file contains functions relating to adding GPG Keys + +// addGPGKey add key, import and subkeys to database +func addGPGKey(e Engine, key *GPGKey, content string) (err error) { + // Add GPGKeyImport + if _, err = e.Insert(GPGKeyImport{ + KeyID: key.KeyID, + Content: content, + }); err != nil { + return err + } + // Save GPG primary key. + if _, err = e.Insert(key); err != nil { + return err + } + // Save GPG subs key. + for _, subkey := range key.SubsKey { + if err := addGPGSubKey(e, subkey); err != nil { + return err + } + } + return nil +} + +// addGPGSubKey add subkeys to database +func addGPGSubKey(e Engine, key *GPGKey) (err error) { + // Save GPG primary key. + if _, err = e.Insert(key); err != nil { + return err + } + // Save GPG subs key. + for _, subkey := range key.SubsKey { + if err := addGPGSubKey(e, subkey); err != nil { + return err + } + } + return nil +} + +// AddGPGKey adds new public key to database. +func AddGPGKey(ownerID int64, content, token, signature string) ([]*GPGKey, error) { + ekeys, err := checkArmoredGPGKeyString(content) + if err != nil { + return nil, err + } + + sess := x.NewSession() + defer sess.Close() + if err = sess.Begin(); err != nil { + return nil, err + } + keys := make([]*GPGKey, 0, len(ekeys)) + + verified := false + // Handle provided signature + if signature != "" { + signer, err := openpgp.CheckArmoredDetachedSignature(ekeys, strings.NewReader(token), strings.NewReader(signature)) + if err != nil { + signer, err = openpgp.CheckArmoredDetachedSignature(ekeys, strings.NewReader(token+"\n"), strings.NewReader(signature)) + } + if err != nil { + signer, err = openpgp.CheckArmoredDetachedSignature(ekeys, strings.NewReader(token+"\r\n"), strings.NewReader(signature)) + } + if err != nil { + log.Error("Unable to validate token signature. Error: %v", err) + return nil, ErrGPGInvalidTokenSignature{ + ID: ekeys[0].PrimaryKey.KeyIdString(), + Wrapped: err, + } + } + ekeys = []*openpgp.Entity{signer} + verified = true + } + + for _, ekey := range ekeys { + // Key ID cannot be duplicated. + has, err := sess.Where("key_id=?", ekey.PrimaryKey.KeyIdString()). + Get(new(GPGKey)) + if err != nil { + return nil, err + } else if has { + return nil, ErrGPGKeyIDAlreadyUsed{ekey.PrimaryKey.KeyIdString()} + } + + // Get DB session + + key, err := parseGPGKey(ownerID, ekey, verified) + if err != nil { + return nil, err + } + + if err = addGPGKey(sess, key, content); err != nil { + return nil, err + } + keys = append(keys, key) + } + return keys, sess.Commit() +} diff --git a/models/gpg_key_commit_verification.go b/models/gpg_key_commit_verification.go new file mode 100644 index 000000000..a4c7d7028 --- /dev/null +++ b/models/gpg_key_commit_verification.go @@ -0,0 +1,514 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "fmt" + "hash" + "strings" + + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + + "github.com/keybase/go-crypto/openpgp/packet" +) + +// __________________ ________ ____ __. +// / _____/\______ \/ _____/ | |/ _|____ ___.__. +// / \ ___ | ___/ \ ___ | <_/ __ < | | +// \ \_\ \| | \ \_\ \ | | \ ___/\___ | +// \______ /|____| \______ / |____|__ \___ > ____| +// \/ \/ \/ \/\/ +// _________ .__ __ +// \_ ___ \ ____ _____ _____ |__|/ |_ +// / \ \/ / _ \ / \ / \| \ __\ +// \ \___( <_> ) Y Y \ Y Y \ || | +// \______ /\____/|__|_| /__|_| /__||__| +// \/ \/ \/ +// ____ ____ .__ _____.__ __ .__ +// \ \ / /___________|__|/ ____\__| ____ _____ _/ |_|__| ____ ____ +// \ Y // __ \_ __ \ \ __\| |/ ___\\__ \\ __\ |/ _ \ / \ +// \ /\ ___/| | \/ || | | \ \___ / __ \| | | ( <_> ) | \ +// \___/ \___ >__| |__||__| |__|\___ >____ /__| |__|\____/|___| / +// \/ \/ \/ \/ + +// This file provides functions relating commit verification + +// CommitVerification represents a commit validation of signature +type CommitVerification struct { + Verified bool + Warning bool + Reason string + SigningUser *User + CommittingUser *User + SigningEmail string + SigningKey *GPGKey + TrustStatus string +} + +// SignCommit represents a commit with validation of signature. +type SignCommit struct { + Verification *CommitVerification + *UserCommit +} + +const ( + // BadSignature is used as the reason when the signature has a KeyID that is in the db + // but no key that has that ID verifies the signature. This is a suspicious failure. + BadSignature = "gpg.error.probable_bad_signature" + // BadDefaultSignature is used as the reason when the signature has a KeyID that matches the + // default Key but is not verified by the default key. This is a suspicious failure. + BadDefaultSignature = "gpg.error.probable_bad_default_signature" + // NoKeyFound is used as the reason when no key can be found to verify the signature. + NoKeyFound = "gpg.error.no_gpg_keys_found" +) + +// ParseCommitsWithSignature checks if signaute of commits are corresponding to users gpg keys. +func ParseCommitsWithSignature(oldCommits []*UserCommit, repository *Repository) []*SignCommit { + newCommits := make([]*SignCommit, 0, len(oldCommits)) + keyMap := map[string]bool{} + + for _, c := range oldCommits { + signCommit := &SignCommit{ + UserCommit: c, + Verification: ParseCommitWithSignature(c.Commit), + } + + _ = CalculateTrustStatus(signCommit.Verification, repository, &keyMap) + + newCommits = append(newCommits, signCommit) + } + return newCommits +} + +// ParseCommitWithSignature check if signature is good against keystore. +func ParseCommitWithSignature(c *git.Commit) *CommitVerification { + var committer *User + if c.Committer != nil { + var err error + // Find Committer account + committer, err = GetUserByEmail(c.Committer.Email) // This finds the user by primary email or activated email so commit will not be valid if email is not + if err != nil { // Skipping not user for committer + committer = &User{ + Name: c.Committer.Name, + Email: c.Committer.Email, + } + // We can expect this to often be an ErrUserNotExist. in the case + // it is not, however, it is important to log it. + if !IsErrUserNotExist(err) { + log.Error("GetUserByEmail: %v", err) + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.no_committer_account", + } + } + + } + } + + // If no signature just report the committer + if c.Signature == nil { + return &CommitVerification{ + CommittingUser: committer, + Verified: false, // Default value + Reason: "gpg.error.not_signed_commit", // Default value + } + } + + // Parsing signature + sig, err := extractSignature(c.Signature.Signature) + if err != nil { // Skipping failed to extract sign + log.Error("SignatureRead err: %v", err) + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.extract_sign", + } + } + + keyID := "" + if sig.IssuerKeyId != nil && (*sig.IssuerKeyId) != 0 { + keyID = fmt.Sprintf("%X", *sig.IssuerKeyId) + } + if keyID == "" && sig.IssuerFingerprint != nil && len(sig.IssuerFingerprint) > 0 { + keyID = fmt.Sprintf("%X", sig.IssuerFingerprint[12:20]) + } + defaultReason := NoKeyFound + + // First check if the sig has a keyID and if so just look at that + if commitVerification := hashAndVerifyForKeyID( + sig, + c.Signature.Payload, + committer, + keyID, + setting.AppName, + ""); commitVerification != nil { + if commitVerification.Reason == BadSignature { + defaultReason = BadSignature + } else { + return commitVerification + } + } + + // Now try to associate the signature with the committer, if present + if committer.ID != 0 { + keys, err := ListGPGKeys(committer.ID, ListOptions{}) + if err != nil { // Skipping failed to get gpg keys of user + log.Error("ListGPGKeys: %v", err) + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.failed_retrieval_gpg_keys", + } + } + + committerEmailAddresses, _ := GetEmailAddresses(committer.ID) + activated := false + for _, e := range committerEmailAddresses { + if e.IsActivated && strings.EqualFold(e.Email, c.Committer.Email) { + activated = true + break + } + } + + for _, k := range keys { + // Pre-check (& optimization) that emails attached to key can be attached to the committer email and can validate + canValidate := false + email := "" + if k.Verified && activated { + canValidate = true + email = c.Committer.Email + } + if !canValidate { + for _, e := range k.Emails { + if e.IsActivated && strings.EqualFold(e.Email, c.Committer.Email) { + canValidate = true + email = e.Email + break + } + } + } + if !canValidate { + continue // Skip this key + } + + commitVerification := hashAndVerifyWithSubKeysCommitVerification(sig, c.Signature.Payload, k, committer, committer, email) + if commitVerification != nil { + return commitVerification + } + } + } + + if setting.Repository.Signing.SigningKey != "" && setting.Repository.Signing.SigningKey != "default" && setting.Repository.Signing.SigningKey != "none" { + // OK we should try the default key + gpgSettings := git.GPGSettings{ + Sign: true, + KeyID: setting.Repository.Signing.SigningKey, + Name: setting.Repository.Signing.SigningName, + Email: setting.Repository.Signing.SigningEmail, + } + if err := gpgSettings.LoadPublicKeyContent(); err != nil { + log.Error("Error getting default signing key: %s %v", gpgSettings.KeyID, err) + } else if commitVerification := verifyWithGPGSettings(&gpgSettings, sig, c.Signature.Payload, committer, keyID); commitVerification != nil { + if commitVerification.Reason == BadSignature { + defaultReason = BadSignature + } else { + return commitVerification + } + } + } + + defaultGPGSettings, err := c.GetRepositoryDefaultPublicGPGKey(false) + if err != nil { + log.Error("Error getting default public gpg key: %v", err) + } else if defaultGPGSettings == nil { + log.Warn("Unable to get defaultGPGSettings for unattached commit: %s", c.ID.String()) + } else if defaultGPGSettings.Sign { + if commitVerification := verifyWithGPGSettings(defaultGPGSettings, sig, c.Signature.Payload, committer, keyID); commitVerification != nil { + if commitVerification.Reason == BadSignature { + defaultReason = BadSignature + } else { + return commitVerification + } + } + } + + return &CommitVerification{ // Default at this stage + CommittingUser: committer, + Verified: false, + Warning: defaultReason != NoKeyFound, + Reason: defaultReason, + SigningKey: &GPGKey{ + KeyID: keyID, + }, + } +} + +func verifyWithGPGSettings(gpgSettings *git.GPGSettings, sig *packet.Signature, payload string, committer *User, keyID string) *CommitVerification { + // First try to find the key in the db + if commitVerification := hashAndVerifyForKeyID(sig, payload, committer, gpgSettings.KeyID, gpgSettings.Name, gpgSettings.Email); commitVerification != nil { + return commitVerification + } + + // Otherwise we have to parse the key + ekeys, err := checkArmoredGPGKeyString(gpgSettings.PublicKeyContent) + if err != nil { + log.Error("Unable to get default signing key: %v", err) + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.generate_hash", + } + } + for _, ekey := range ekeys { + pubkey := ekey.PrimaryKey + content, err := base64EncPubKey(pubkey) + if err != nil { + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.generate_hash", + } + } + k := &GPGKey{ + Content: content, + CanSign: pubkey.CanSign(), + KeyID: pubkey.KeyIdString(), + } + for _, subKey := range ekey.Subkeys { + content, err := base64EncPubKey(subKey.PublicKey) + if err != nil { + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.generate_hash", + } + } + k.SubsKey = append(k.SubsKey, &GPGKey{ + Content: content, + CanSign: subKey.PublicKey.CanSign(), + KeyID: subKey.PublicKey.KeyIdString(), + }) + } + if commitVerification := hashAndVerifyWithSubKeysCommitVerification(sig, payload, k, committer, &User{ + Name: gpgSettings.Name, + Email: gpgSettings.Email, + }, gpgSettings.Email); commitVerification != nil { + return commitVerification + } + if keyID == k.KeyID { + // This is a bad situation ... We have a key id that matches our default key but the signature doesn't match. + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Warning: true, + Reason: BadSignature, + } + } + } + return nil +} + +func verifySign(s *packet.Signature, h hash.Hash, k *GPGKey) error { + // Check if key can sign + if !k.CanSign { + return fmt.Errorf("key can not sign") + } + // Decode key + pkey, err := base64DecPubKey(k.Content) + if err != nil { + return err + } + return pkey.VerifySignature(h, s) +} + +func hashAndVerify(sig *packet.Signature, payload string, k *GPGKey) (*GPGKey, error) { + // Generating hash of commit + hash, err := populateHash(sig.Hash, []byte(payload)) + if err != nil { // Skipping as failed to generate hash + log.Error("PopulateHash: %v", err) + return nil, err + } + // We will ignore errors in verification as they don't need to be propagated up + err = verifySign(sig, hash, k) + if err != nil { + return nil, nil + } + return k, nil +} + +func hashAndVerifyWithSubKeys(sig *packet.Signature, payload string, k *GPGKey) (*GPGKey, error) { + verified, err := hashAndVerify(sig, payload, k) + if err != nil || verified != nil { + return verified, err + } + for _, sk := range k.SubsKey { + verified, err := hashAndVerify(sig, payload, sk) + if err != nil || verified != nil { + return verified, err + } + } + return nil, nil +} + +func hashAndVerifyWithSubKeysCommitVerification(sig *packet.Signature, payload string, k *GPGKey, committer, signer *User, email string) *CommitVerification { + key, err := hashAndVerifyWithSubKeys(sig, payload, k) + if err != nil { // Skipping failed to generate hash + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.generate_hash", + } + } + + if key != nil { + return &CommitVerification{ // Everything is ok + CommittingUser: committer, + Verified: true, + Reason: fmt.Sprintf("%s / %s", signer.Name, key.KeyID), + SigningUser: signer, + SigningKey: key, + SigningEmail: email, + } + } + return nil +} + +func hashAndVerifyForKeyID(sig *packet.Signature, payload string, committer *User, keyID, name, email string) *CommitVerification { + if keyID == "" { + return nil + } + keys, err := GetGPGKeysByKeyID(keyID) + if err != nil { + log.Error("GetGPGKeysByKeyID: %v", err) + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.failed_retrieval_gpg_keys", + } + } + if len(keys) == 0 { + return nil + } + for _, key := range keys { + var primaryKeys []*GPGKey + if key.PrimaryKeyID != "" { + primaryKeys, err = GetGPGKeysByKeyID(key.PrimaryKeyID) + if err != nil { + log.Error("GetGPGKeysByKeyID: %v", err) + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.failed_retrieval_gpg_keys", + } + } + } + + activated, email := checkKeyEmails(email, append([]*GPGKey{key}, primaryKeys...)...) + if !activated { + continue + } + + signer := &User{ + Name: name, + Email: email, + } + if key.OwnerID != 0 { + owner, err := GetUserByID(key.OwnerID) + if err == nil { + signer = owner + } else if !IsErrUserNotExist(err) { + log.Error("Failed to GetUserByID: %d for key ID: %d (%s) %v", key.OwnerID, key.ID, key.KeyID, err) + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Reason: "gpg.error.no_committer_account", + } + } + } + commitVerification := hashAndVerifyWithSubKeysCommitVerification(sig, payload, key, committer, signer, email) + if commitVerification != nil { + return commitVerification + } + } + // This is a bad situation ... We have a key id that is in our database but the signature doesn't match. + return &CommitVerification{ + CommittingUser: committer, + Verified: false, + Warning: true, + Reason: BadSignature, + } +} + +// CalculateTrustStatus will calculate the TrustStatus for a commit verification within a repository +func CalculateTrustStatus(verification *CommitVerification, repository *Repository, keyMap *map[string]bool) (err error) { + if !verification.Verified { + return + } + + // There are several trust models in Gitea + trustModel := repository.GetTrustModel() + + // In the Committer trust model a signature is trusted if it matches the committer + // - it doesn't matter if they're a collaborator, the owner, Gitea or Github + // NB: This model is commit verification only + if trustModel == CommitterTrustModel { + // default to "unmatched" + verification.TrustStatus = "unmatched" + + // We can only verify against users in our database but the default key will match + // against by email if it is not in the db. + if (verification.SigningUser.ID != 0 && + verification.CommittingUser.ID == verification.SigningUser.ID) || + (verification.SigningUser.ID == 0 && verification.CommittingUser.ID == 0 && + verification.SigningUser.Email == verification.CommittingUser.Email) { + verification.TrustStatus = "trusted" + } + return + } + + // Now we drop to the more nuanced trust models... + verification.TrustStatus = "trusted" + + if verification.SigningUser.ID == 0 { + // This commit is signed by the default key - but this key is not assigned to a user in the DB. + + // However in the CollaboratorCommitterTrustModel we cannot mark this as trusted + // unless the default key matches the email of a non-user. + if trustModel == CollaboratorCommitterTrustModel && (verification.CommittingUser.ID != 0 || + verification.SigningUser.Email != verification.CommittingUser.Email) { + verification.TrustStatus = "untrusted" + } + return + } + + var isMember bool + if keyMap != nil { + var has bool + isMember, has = (*keyMap)[verification.SigningKey.KeyID] + if !has { + isMember, err = repository.IsOwnerMemberCollaborator(verification.SigningUser.ID) + (*keyMap)[verification.SigningKey.KeyID] = isMember + } + } else { + isMember, err = repository.IsOwnerMemberCollaborator(verification.SigningUser.ID) + } + + if !isMember { + verification.TrustStatus = "untrusted" + if verification.CommittingUser.ID != verification.SigningUser.ID { + // The committing user and the signing user are not the same + // This should be marked as questionable unless the signing user is a collaborator/team member etc. + verification.TrustStatus = "unmatched" + } + } else if trustModel == CollaboratorCommitterTrustModel && verification.CommittingUser.ID != verification.SigningUser.ID { + // The committing user and the signing user are not the same and our trustmodel states that they must match + verification.TrustStatus = "unmatched" + } + + return +} diff --git a/models/gpg_key_common.go b/models/gpg_key_common.go new file mode 100644 index 000000000..72803625e --- /dev/null +++ b/models/gpg_key_common.go @@ -0,0 +1,137 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "bytes" + "crypto" + "encoding/base64" + "fmt" + "hash" + "io" + "strings" + "time" + + "github.com/keybase/go-crypto/openpgp" + "github.com/keybase/go-crypto/openpgp/armor" + "github.com/keybase/go-crypto/openpgp/packet" +) + +// __________________ ________ ____ __. +// / _____/\______ \/ _____/ | |/ _|____ ___.__. +// / \ ___ | ___/ \ ___ | <_/ __ < | | +// \ \_\ \| | \ \_\ \ | | \ ___/\___ | +// \______ /|____| \______ / |____|__ \___ > ____| +// \/ \/ \/ \/\/ +// _________ +// \_ ___ \ ____ _____ _____ ____ ____ +// / \ \/ / _ \ / \ / \ / _ \ / \ +// \ \___( <_> ) Y Y \ Y Y ( <_> ) | \ +// \______ /\____/|__|_| /__|_| /\____/|___| / +// \/ \/ \/ \/ + +// This file provides common functions relating to GPG Keys + +// checkArmoredGPGKeyString checks if the given key string is a valid GPG armored key. +// The function returns the actual public key on success +func checkArmoredGPGKeyString(content string) (openpgp.EntityList, error) { + list, err := openpgp.ReadArmoredKeyRing(strings.NewReader(content)) + if err != nil { + return nil, ErrGPGKeyParsing{err} + } + return list, nil +} + +// base64EncPubKey encode public key content to base 64 +func base64EncPubKey(pubkey *packet.PublicKey) (string, error) { + var w bytes.Buffer + err := pubkey.Serialize(&w) + if err != nil { + return "", err + } + return base64.StdEncoding.EncodeToString(w.Bytes()), nil +} + +func readerFromBase64(s string) (io.Reader, error) { + bs, err := base64.StdEncoding.DecodeString(s) + if err != nil { + return nil, err + } + return bytes.NewBuffer(bs), nil +} + +// base64DecPubKey decode public key content from base 64 +func base64DecPubKey(content string) (*packet.PublicKey, error) { + b, err := readerFromBase64(content) + if err != nil { + return nil, err + } + // Read key + p, err := packet.Read(b) + if err != nil { + return nil, err + } + // Check type + pkey, ok := p.(*packet.PublicKey) + if !ok { + return nil, fmt.Errorf("key is not a public key") + } + return pkey, nil +} + +// getExpiryTime extract the expire time of primary key based on sig +func getExpiryTime(e *openpgp.Entity) time.Time { + expiry := time.Time{} + // Extract self-sign for expire date based on : https://github.com/golang/crypto/blob/master/openpgp/keys.go#L165 + var selfSig *packet.Signature + for _, ident := range e.Identities { + if selfSig == nil { + selfSig = ident.SelfSignature + } else if ident.SelfSignature.IsPrimaryId != nil && *ident.SelfSignature.IsPrimaryId { + selfSig = ident.SelfSignature + break + } + } + if selfSig.KeyLifetimeSecs != nil { + expiry = e.PrimaryKey.CreationTime.Add(time.Duration(*selfSig.KeyLifetimeSecs) * time.Second) + } + return expiry +} + +func populateHash(hashFunc crypto.Hash, msg []byte) (hash.Hash, error) { + h := hashFunc.New() + if _, err := h.Write(msg); err != nil { + return nil, err + } + return h, nil +} + +// readArmoredSign read an armored signature block with the given type. https://sourcegraph.com/github.com/golang/crypto/-/blob/openpgp/read.go#L24:6-24:17 +func readArmoredSign(r io.Reader) (body io.Reader, err error) { + block, err := armor.Decode(r) + if err != nil { + return + } + if block.Type != openpgp.SignatureType { + return nil, fmt.Errorf("expected '" + openpgp.SignatureType + "', got: " + block.Type) + } + return block.Body, nil +} + +func extractSignature(s string) (*packet.Signature, error) { + r, err := readArmoredSign(strings.NewReader(s)) + if err != nil { + return nil, fmt.Errorf("Failed to read signature armor") + } + p, err := packet.Read(r) + if err != nil { + return nil, fmt.Errorf("Failed to read signature packet") + } + sig, ok := p.(*packet.Signature) + if !ok { + return nil, fmt.Errorf("Packet is not a signature") + } + return sig, nil +} diff --git a/models/gpg_key_import.go b/models/gpg_key_import.go new file mode 100644 index 000000000..bd1d530ec --- /dev/null +++ b/models/gpg_key_import.go @@ -0,0 +1,38 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +// __________________ ________ ____ __. +// / _____/\______ \/ _____/ | |/ _|____ ___.__. +// / \ ___ | ___/ \ ___ | <_/ __ < | | +// \ \_\ \| | \ \_\ \ | | \ ___/\___ | +// \______ /|____| \______ / |____|__ \___ > ____| +// \/ \/ \/ \/\/ +// .___ __ +// | | _____ ______ ____________/ |_ +// | |/ \\____ \ / _ \_ __ \ __\ +// | | Y Y \ |_> > <_> ) | \/| | +// |___|__|_| / __/ \____/|__| |__| +// \/|__| + +// This file contains functions related to the original import of a key + +// GPGKeyImport the original import of key +type GPGKeyImport struct { + KeyID string `xorm:"pk CHAR(16) NOT NULL"` + Content string `xorm:"TEXT NOT NULL"` +} + +// GetGPGImportByKeyID returns the import public armored key by given KeyID. +func GetGPGImportByKeyID(keyID string) (*GPGKeyImport, error) { + key := new(GPGKeyImport) + has, err := x.ID(keyID).Get(key) + if err != nil { + return nil, err + } else if !has { + return nil, ErrGPGKeyImportNotExist{keyID} + } + return key, nil +} diff --git a/models/gpg_key_test.go b/models/gpg_key_test.go index 92131f597..be2d8a223 100644 --- a/models/gpg_key_test.go +++ b/models/gpg_key_test.go @@ -47,7 +47,7 @@ MkM/fdpyc2hY7Dl/+qFmN5MG5yGmMpQcX+RNNR222ibNC1D3wg== key, err := checkArmoredGPGKeyString(testGPGArmor) assert.NoError(t, err, "Could not parse a valid GPG public armored rsa key", key) - //TODO verify value of key + // TODO verify value of key } func TestCheckArmoredbrainpoolP256r1GPGKeyString(t *testing.T) { @@ -68,7 +68,7 @@ OyjLLnFQiVmq7kEA/0z0CQe3ZQiQIq5zrs7Nh1XRkFAo8GlU/SGC9XFFi722 key, err := checkArmoredGPGKeyString(testGPGArmor) assert.NoError(t, err, "Could not parse a valid GPG public armored brainpoolP256r1 key", key) - //TODO verify value of key + // TODO verify value of key } func TestExtractSignature(t *testing.T) { @@ -103,6 +103,9 @@ MkM/fdpyc2hY7Dl/+qFmN5MG5yGmMpQcX+RNNR222ibNC1D3wg== =i9b7 -----END PGP PUBLIC KEY BLOCK-----` keys, err := checkArmoredGPGKeyString(testGPGArmor) + if !assert.NotEmpty(t, keys) { + return + } ekey := keys[0] assert.NoError(t, err, "Could not parse a valid GPG armored key", ekey) @@ -167,19 +170,19 @@ committer Antoine GIRARD 1489013107 +0100 Unknown GPG key with good email ` - //Reading Sign + // Reading Sign goodSig, err := extractSignature(testGoodSigArmor) assert.NoError(t, err, "Could not parse a valid GPG armored signature", testGoodSigArmor) badSig, err := extractSignature(testBadSigArmor) assert.NoError(t, err, "Could not parse a valid GPG armored signature", testBadSigArmor) - //Generating hash of commit + // Generating hash of commit goodHash, err := populateHash(goodSig.Hash, []byte(testGoodPayload)) assert.NoError(t, err, "Could not generate a valid hash of payload", testGoodPayload) badHash, err := populateHash(badSig.Hash, []byte(testBadPayload)) assert.NoError(t, err, "Could not generate a valid hash of payload", testBadPayload) - //Verify + // Verify err = verifySign(goodSig, goodHash, key) assert.NoError(t, err, "Could not validate a good signature") err = verifySign(badSig, badHash, key) @@ -189,6 +192,10 @@ Unknown GPG key with good email } func TestCheckGPGUserEmail(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + _ = AssertExistsAndLoadBean(t, &User{ID: 1}).(*User) + testEmailWithUpperCaseLetters := `-----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v1 @@ -220,11 +227,13 @@ Q0KHb+QcycSgbDx0ZAvdIacuKvBBcbxrsmFUI4LR+oIup0G9gUc0roPvr014jYQL =zHo9 -----END PGP PUBLIC KEY BLOCK-----` - keys, err := AddGPGKey(1, testEmailWithUpperCaseLetters) + keys, err := AddGPGKey(1, testEmailWithUpperCaseLetters, "", "") assert.NoError(t, err) - key := keys[0] - if assert.Len(t, key.Emails, 1) { - assert.Equal(t, "user1@example.com", key.Emails[0].Email) + if assert.NotEmpty(t, keys) { + key := keys[0] + if assert.Len(t, key.Emails, 1) { + assert.Equal(t, "user1@example.com", key.Emails[0].Email) + } } } @@ -374,7 +383,9 @@ epiDVQ== ` keys, err := checkArmoredGPGKeyString(testIssue6599) assert.NoError(t, err) - ekey := keys[0] - expire := getExpiryTime(ekey) - assert.Equal(t, time.Unix(1586105389, 0), expire) + if assert.NotEmpty(t, keys) { + ekey := keys[0] + expire := getExpiryTime(ekey) + assert.Equal(t, time.Unix(1586105389, 0), expire) + } } diff --git a/models/gpg_key_verify.go b/models/gpg_key_verify.go new file mode 100644 index 000000000..15774dc05 --- /dev/null +++ b/models/gpg_key_verify.go @@ -0,0 +1,113 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "strconv" + "time" + + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/log" +) + +// __________________ ________ ____ __. +// / _____/\______ \/ _____/ | |/ _|____ ___.__. +// / \ ___ | ___/ \ ___ | <_/ __ < | | +// \ \_\ \| | \ \_\ \ | | \ ___/\___ | +// \______ /|____| \______ / |____|__ \___ > ____| +// \/ \/ \/ \/\/ +// ____ ____ .__ _____ +// \ \ / /___________|__|/ ____\__.__. +// \ Y // __ \_ __ \ \ __< | | +// \ /\ ___/| | \/ || | \___ | +// \___/ \___ >__| |__||__| / ____| +// \/ \/ + +// This file provides functions relating verifying gpg keys + +// VerifyGPGKey marks a GPG key as verified +func VerifyGPGKey(ownerID int64, keyID, token, signature string) (string, error) { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return "", err + } + + key := new(GPGKey) + + has, err := sess.Where("owner_id = ? AND key_id = ?", ownerID, keyID).Get(key) + if err != nil { + return "", err + } else if !has { + return "", ErrGPGKeyNotExist{} + } + + sig, err := extractSignature(signature) + if err != nil { + return "", ErrGPGInvalidTokenSignature{ + ID: key.KeyID, + Wrapped: err, + } + } + + signer, err := hashAndVerifyWithSubKeys(sig, token, key) + if err != nil { + return "", ErrGPGInvalidTokenSignature{ + ID: key.KeyID, + Wrapped: err, + } + } + if signer == nil { + signer, err = hashAndVerifyWithSubKeys(sig, token+"\n", key) + + if err != nil { + return "", ErrGPGInvalidTokenSignature{ + ID: key.KeyID, + Wrapped: err, + } + } + } + if signer == nil { + signer, err = hashAndVerifyWithSubKeys(sig, token+"\n\n", key) + if err != nil { + return "", ErrGPGInvalidTokenSignature{ + ID: key.KeyID, + Wrapped: err, + } + } + } + + if signer == nil { + log.Error("Unable to validate token signature. Error: %v", err) + return "", ErrGPGInvalidTokenSignature{ + ID: key.KeyID, + } + } + + if signer.PrimaryKeyID != key.KeyID && signer.KeyID != key.KeyID { + return "", ErrGPGKeyNotExist{} + } + + key.Verified = true + if _, err := sess.ID(key.ID).SetExpr("verified", true).Update(new(GPGKey)); err != nil { + return "", err + } + + if err := sess.Commit(); err != nil { + return "", err + } + + return key.KeyID, nil +} + +// VerificationToken returns token for the user that will be valid in minutes (time) +func VerificationToken(user *User, minutes int) string { + return base.EncodeSha256( + time.Now().Truncate(1*time.Minute).Add(time.Duration(minutes)*time.Minute).Format(time.RFC1123Z) + ":" + + user.CreatedUnix.FormatLong() + ":" + + user.Name + ":" + + user.Email + ":" + + strconv.FormatInt(user.ID, 10)) +} diff --git a/models/helper.go b/models/helper.go index a284424bb..c499b5512 100644 --- a/models/helper.go +++ b/models/helper.go @@ -4,8 +4,14 @@ package models +import ( + "encoding/binary" + + "code.gitea.io/gitea/modules/json" +) + func keysInt64(m map[int64]struct{}) []int64 { - var keys = make([]int64, 0, len(m)) + keys := make([]int64, 0, len(m)) for k := range m { keys = append(keys, k) } @@ -13,7 +19,7 @@ func keysInt64(m map[int64]struct{}) []int64 { } func valuesRepository(m map[int64]*Repository) []*Repository { - var values = make([]*Repository, 0, len(m)) + values := make([]*Repository, 0, len(m)) for _, v := range m { values = append(values, v) } @@ -21,9 +27,38 @@ func valuesRepository(m map[int64]*Repository) []*Repository { } func valuesUser(m map[int64]*User) []*User { - var values = make([]*User, 0, len(m)) + values := make([]*User, 0, len(m)) for _, v := range m { values = append(values, v) } return values } + +// JSONUnmarshalHandleDoubleEncode - due to a bug in xorm (see https://gitea.com/xorm/xorm/pulls/1957) - it's +// possible that a Blob may be double encoded or gain an unwanted prefix of 0xff 0xfe. +func JSONUnmarshalHandleDoubleEncode(bs []byte, v interface{}) error { + err := json.Unmarshal(bs, v) + if err != nil { + ok := true + rs := []byte{} + temp := make([]byte, 2) + for _, rn := range string(bs) { + if rn > 0xffff { + ok = false + break + } + binary.LittleEndian.PutUint16(temp, uint16(rn)) + rs = append(rs, temp...) + } + if ok { + if rs[0] == 0xff && rs[1] == 0xfe { + rs = rs[2:] + } + err = json.Unmarshal(rs, v) + } + } + if err != nil && len(bs) > 2 && bs[0] == 0xff && bs[1] == 0xfe { + err = json.Unmarshal(bs[2:], v) + } + return err +} diff --git a/models/helper_environment.go b/models/helper_environment.go index 8924d0a28..922a5790b 100644 --- a/models/helper_environment.go +++ b/models/helper_environment.go @@ -74,5 +74,4 @@ func FullPushingEnvironment(author, committer *User, repo *Repository, repoName } return environ - } diff --git a/models/index.go b/models/index.go new file mode 100644 index 000000000..121a149ca --- /dev/null +++ b/models/index.go @@ -0,0 +1,113 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "errors" + "fmt" + + "code.gitea.io/gitea/modules/setting" +) + +// ResourceIndex represents a resource index which could be used as issue/release and others +// We can create different tables i.e. issue_index, release_index and etc. +type ResourceIndex struct { + GroupID int64 `xorm:"pk"` + MaxIndex int64 `xorm:"index"` +} + +// IssueIndex represents the issue index table +type IssueIndex ResourceIndex + +// upsertResourceIndex the function will not return until it acquires the lock or receives an error. +func upsertResourceIndex(e Engine, tableName string, groupID int64) (err error) { + // An atomic UPSERT operation (INSERT/UPDATE) is the only operation + // that ensures that the key is actually locked. + switch { + case setting.Database.UseSQLite3 || setting.Database.UsePostgreSQL: + _, err = e.Exec(fmt.Sprintf("INSERT INTO %s (group_id, max_index) "+ + "VALUES (?,1) ON CONFLICT (group_id) DO UPDATE SET max_index = %s.max_index+1", + tableName, tableName), groupID) + case setting.Database.UseMySQL: + _, err = e.Exec(fmt.Sprintf("INSERT INTO %s (group_id, max_index) "+ + "VALUES (?,1) ON DUPLICATE KEY UPDATE max_index = max_index+1", tableName), + groupID) + case setting.Database.UseMSSQL: + // https://weblogs.sqlteam.com/dang/2009/01/31/upsert-race-condition-with-merge/ + _, err = e.Exec(fmt.Sprintf("MERGE %s WITH (HOLDLOCK) as target "+ + "USING (SELECT ? AS group_id) AS src "+ + "ON src.group_id = target.group_id "+ + "WHEN MATCHED THEN UPDATE SET target.max_index = target.max_index+1 "+ + "WHEN NOT MATCHED THEN INSERT (group_id, max_index) "+ + "VALUES (src.group_id, 1);", tableName), + groupID) + default: + return fmt.Errorf("database type not supported") + } + return +} + +var ( + // ErrResouceOutdated represents an error when request resource outdated + ErrResouceOutdated = errors.New("resource outdated") + // ErrGetResourceIndexFailed represents an error when resource index retries 3 times + ErrGetResourceIndexFailed = errors.New("get resource index failed") +) + +const ( + maxDupIndexAttempts = 3 +) + +// GetNextResourceIndex retried 3 times to generate a resource index +func GetNextResourceIndex(tableName string, groupID int64) (int64, error) { + for i := 0; i < maxDupIndexAttempts; i++ { + idx, err := getNextResourceIndex(tableName, groupID) + if err == ErrResouceOutdated { + continue + } + if err != nil { + return 0, err + } + return idx, nil + } + return 0, ErrGetResourceIndexFailed +} + +// deleteResouceIndex delete resource index +func deleteResouceIndex(e Engine, tableName string, groupID int64) error { + _, err := e.Exec(fmt.Sprintf("DELETE FROM %s WHERE group_id=?", tableName), groupID) + return err +} + +// getNextResourceIndex return the next index +func getNextResourceIndex(tableName string, groupID int64) (int64, error) { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return 0, err + } + var preIdx int64 + _, err := sess.SQL(fmt.Sprintf("SELECT max_index FROM %s WHERE group_id = ?", tableName), groupID).Get(&preIdx) + if err != nil { + return 0, err + } + + if err := upsertResourceIndex(sess, tableName, groupID); err != nil { + return 0, err + } + + var curIdx int64 + has, err := sess.SQL(fmt.Sprintf("SELECT max_index FROM %s WHERE group_id = ? AND max_index=?", tableName), groupID, preIdx+1).Get(&curIdx) + if err != nil { + return 0, err + } + if !has { + return 0, ErrResouceOutdated + } + if err := sess.Commit(); err != nil { + return 0, err + } + return curIdx, nil +} diff --git a/models/index_test.go b/models/index_test.go new file mode 100644 index 000000000..40e570ad9 --- /dev/null +++ b/models/index_test.go @@ -0,0 +1,27 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "fmt" + "sync" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestResourceIndex(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + var wg sync.WaitGroup + for i := 0; i < 100; i++ { + wg.Add(1) + go func(i int) { + testInsertIssue(t, fmt.Sprintf("issue %d", i+1), "my issue", 0) + wg.Done() + }(i) + } + wg.Wait() +} diff --git a/models/issue.go b/models/issue.go index b517f334c..9e63ac4e5 100644 --- a/models/issue.go +++ b/models/issue.go @@ -36,7 +36,7 @@ type Issue struct { OriginalAuthor string OriginalAuthorID int64 `xorm:"index"` Title string `xorm:"name"` - Content string `xorm:"TEXT"` + Content string `xorm:"LONGTEXT"` RenderedContent string `xorm:"-"` Labels []*Label `xorm:"-"` MilestoneID int64 `xorm:"INDEX"` @@ -77,9 +77,10 @@ var ( issueTasksDonePat *regexp.Regexp ) -const issueTasksRegexpStr = `(^\s*[-*]\s\[[\sxX]\]\s.)|(\n\s*[-*]\s\[[\sxX]\]\s.)` -const issueTasksDoneRegexpStr = `(^\s*[-*]\s\[[xX]\]\s.)|(\n\s*[-*]\s\[[xX]\]\s.)` -const issueMaxDupIndexAttempts = 3 +const ( + issueTasksRegexpStr = `(^\s*[-*]\s\[[\sxX]\]\s.)|(\n\s*[-*]\s\[[\sxX]\]\s.)` + issueTasksDoneRegexpStr = `(^\s*[-*]\s\[[xX]\]\s.)|(\n\s*[-*]\s\[[xX]\]\s.)` +) func init() { issueTasksPat = regexp.MustCompile(issueTasksRegexpStr) @@ -88,7 +89,7 @@ func init() { func (issue *Issue) loadTotalTimes(e Engine) (err error) { opts := FindTrackedTimesOptions{IssueID: issue.ID} - issue.TotalTrackedTime, err = opts.ToSession(e).SumInt(&TrackedTime{}, "time") + issue.TotalTrackedTime, err = opts.toSession(e).SumInt(&TrackedTime{}, "time") if err != nil { return err } @@ -97,6 +98,9 @@ func (issue *Issue) loadTotalTimes(e Engine) (err error) { // IsOverdue checks if the issue is overdue func (issue *Issue) IsOverdue() bool { + if issue.IsClosed { + return issue.ClosedUnix >= issue.DeadlineUnix + } return timeutil.TimeStampNow() >= issue.DeadlineUnix } @@ -210,7 +214,7 @@ func (issue *Issue) loadCommentsByType(e Engine, tp CommentType) (err error) { if issue.Comments != nil { return nil } - issue.Comments, err = findComments(e, FindCommentsOptions{ + issue.Comments, err = findComments(e, &FindCommentsOptions{ IssueID: issue.ID, Type: tp, }) @@ -510,6 +514,10 @@ func (issue *Issue) ReplaceLabels(labels []*Label, doer *User) (err error) { return err } + if err = issue.loadRepo(sess); err != nil { + return err + } + if err = issue.loadLabels(sess); err != nil { return err } @@ -524,10 +532,18 @@ func (issue *Issue) ReplaceLabels(labels []*Label, doer *User) (err error) { addLabel := labels[addIndex] removeLabel := issue.Labels[removeIndex] if addLabel.ID == removeLabel.ID { + // Silently drop invalid labels + if removeLabel.RepoID != issue.RepoID && removeLabel.OrgID != issue.Repo.OwnerID { + toRemove = append(toRemove, removeLabel) + } + addIndex++ removeIndex++ } else if addLabel.ID < removeLabel.ID { - toAdd = append(toAdd, addLabel) + // Only add if the label is valid + if addLabel.RepoID == issue.RepoID || addLabel.OrgID == issue.Repo.OwnerID { + toAdd = append(toAdd, addLabel) + } addIndex++ } else { toRemove = append(toRemove, removeLabel) @@ -563,7 +579,7 @@ func (issue *Issue) ReadBy(userID int64) error { return err } - return setNotificationStatusReadIfUnread(x, userID, issue.ID) + return setIssueNotificationStatusReadIfUnread(x, userID, issue.ID) } func updateIssueCols(e Engine, issue *Issue, cols ...string) error { @@ -631,8 +647,10 @@ func (issue *Issue) doChangeStatus(e *xorm.Session, doer *User, isMergePull bool } // Update issue count of milestone - if err := updateMilestoneClosedNum(e, issue.MilestoneID); err != nil { - return nil, err + if issue.MilestoneID > 0 { + if err := updateMilestoneCounters(e, issue.MilestoneID); err != nil { + return nil, err + } } if err := issue.updateClosedNum(e); err != nil { @@ -699,7 +717,7 @@ func (issue *Issue) ChangeTitle(doer *User, oldTitle string) (err error) { return fmt.Errorf("loadRepo: %v", err) } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: CommentTypeChangeTitle, Doer: doer, Repo: issue.Repo, @@ -744,12 +762,12 @@ func AddDeletePRBranchComment(doer *User, repo *Repository, issueID int64, branc if err := sess.Begin(); err != nil { return err } - var opts = &CreateCommentOptions{ - Type: CommentTypeDeleteBranch, - Doer: doer, - Repo: repo, - Issue: issue, - CommitSHA: branchName, + opts := &CreateCommentOptions{ + Type: CommentTypeDeleteBranch, + Doer: doer, + Repo: repo, + Issue: issue, + OldRef: branchName, } if _, err = createComment(sess, opts); err != nil { return err @@ -879,27 +897,23 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) { } } - // Milestone validation should happen before insert actual object. - if _, err := e.SetExpr("`index`", "coalesce(MAX(`index`),0)+1"). - Where("repo_id=?", opts.Issue.RepoID). - Insert(opts.Issue); err != nil { - return ErrNewIssueInsert{err} + if opts.Issue.Index <= 0 { + return fmt.Errorf("no issue index provided") + } + if opts.Issue.ID > 0 { + return fmt.Errorf("issue exist") } - inserted, err := getIssueByID(e, opts.Issue.ID) - if err != nil { + if _, err := e.Insert(opts.Issue); err != nil { return err } - // Patch Index with the value calculated by the database - opts.Issue.Index = inserted.Index - if opts.Issue.MilestoneID > 0 { - if _, err = e.Exec("UPDATE `milestone` SET num_issues=num_issues+1 WHERE id=?", opts.Issue.MilestoneID); err != nil { + if err := updateMilestoneCounters(e, opts.Issue.MilestoneID); err != nil { return err } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: CommentTypeMilestone, Doer: doer, Repo: opts.Repo, @@ -968,26 +982,40 @@ func newIssue(e *xorm.Session, doer *User, opts NewIssueOptions) (err error) { return opts.Issue.addCrossReferences(e, doer, false) } -// NewIssue creates new issue with labels for repository. -func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) (err error) { - // Retry several times in case INSERT fails due to duplicate key for (repo_id, index); see #7887 - i := 0 - for { - if err = newIssueAttempt(repo, issue, labelIDs, uuids); err == nil { - return nil - } - if !IsErrNewIssueInsert(err) { - return err - } - if i++; i == issueMaxDupIndexAttempts { - break - } - log.Error("NewIssue: error attempting to insert the new issue; will retry. Original error: %v", err) +// RecalculateIssueIndexForRepo create issue_index for repo if not exist and +// update it based on highest index of existing issues assigned to a repo +func RecalculateIssueIndexForRepo(repoID int64) error { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err } - return fmt.Errorf("NewIssue: too many errors attempting to insert the new issue. Last error was: %v", err) + + if err := upsertResourceIndex(sess, "issue_index", repoID); err != nil { + return err + } + + var max int64 + if _, err := sess.Select(" MAX(`index`)").Table("issue").Where("repo_id=?", repoID).Get(&max); err != nil { + return err + } + + if _, err := sess.Exec("UPDATE `issue_index` SET max_index=? WHERE group_id=?", max, repoID); err != nil { + return err + } + + return sess.Commit() } -func newIssueAttempt(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) (err error) { +// NewIssue creates new issue with labels for repository. +func NewIssue(repo *Repository, issue *Issue, labelIDs []int64, uuids []string) (err error) { + idx, err := GetNextResourceIndex("issue_index", repo.ID) + if err != nil { + return fmt.Errorf("generate issue index failed: %v", err) + } + + issue.Index = idx + sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { @@ -1015,6 +1043,9 @@ func newIssueAttempt(repo *Repository, issue *Issue, labelIDs []int64, uuids []s // GetIssueByIndex returns raw issue without loading attributes by index in a repository. func GetIssueByIndex(repoID, index int64) (*Issue, error) { + if index < 1 { + return nil, ErrIssueNotExist{} + } issue := &Issue{ RepoID: repoID, Index: index, @@ -1068,8 +1099,8 @@ func getIssuesByIDs(e Engine, issueIDs []int64) ([]*Issue, error) { } func getIssueIDsByRepoID(e Engine, repoID int64) ([]int64, error) { - var ids = make([]int64, 0, 10) - err := e.Table("issue").Where("repo_id = ?", repoID).Find(&ids) + ids := make([]int64, 0, 10) + err := e.Table("issue").Cols("id").Where("repo_id = ?", repoID).Find(&ids) return ids, err } @@ -1090,6 +1121,7 @@ type IssuesOptions struct { AssigneeID int64 PosterID int64 MentionedID int64 + ReviewRequestedID int64 MilestoneIDs []int64 ProjectID int64 ProjectBoardID int64 @@ -1098,6 +1130,7 @@ type IssuesOptions struct { LabelIDs []int64 IncludedLabelNames []string ExcludedLabelNames []string + IncludeMilestones []string SortType string IssueIDs []int64 UpdatedAfterUnix int64 @@ -1125,9 +1158,18 @@ func sortIssuesSession(sess *xorm.Session, sortType string, priorityRepoID int64 sess.Desc("issue.priority") case "nearduedate": // 253370764800 is 01/01/9999 @ 12:00am (UTC) - sess.OrderBy("CASE WHEN issue.deadline_unix = 0 THEN 253370764800 ELSE issue.deadline_unix END ASC") + sess.Join("LEFT", "milestone", "issue.milestone_id = milestone.id"). + OrderBy("CASE " + + "WHEN issue.deadline_unix = 0 AND (milestone.deadline_unix = 0 OR milestone.deadline_unix IS NULL) THEN 253370764800 " + + "WHEN milestone.deadline_unix = 0 OR milestone.deadline_unix IS NULL THEN issue.deadline_unix " + + "WHEN milestone.deadline_unix < issue.deadline_unix OR issue.deadline_unix = 0 THEN milestone.deadline_unix " + + "ELSE issue.deadline_unix END ASC") case "farduedate": - sess.Desc("issue.deadline_unix") + sess.Join("LEFT", "milestone", "issue.milestone_id = milestone.id"). + OrderBy("CASE " + + "WHEN milestone.deadline_unix IS NULL THEN issue.deadline_unix " + + "WHEN milestone.deadline_unix < issue.deadline_unix OR issue.deadline_unix = 0 THEN milestone.deadline_unix " + + "ELSE issue.deadline_unix END DESC") case "priorityrepo": sess.OrderBy("CASE WHEN issue.repo_id = " + strconv.FormatInt(priorityRepoID, 10) + " THEN 1 ELSE 2 END, issue.created_unix DESC") default: @@ -1151,8 +1193,7 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) { } if len(opts.RepoIDs) > 0 { - // In case repository IDs are provided but actually no repository has issue. - sess.In("issue.repo_id", opts.RepoIDs) + applyReposCondition(sess, opts.RepoIDs) } switch opts.IsClosed { @@ -1163,18 +1204,19 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) { } if opts.AssigneeID > 0 { - sess.Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). - And("issue_assignees.assignee_id = ?", opts.AssigneeID) + applyAssigneeCondition(sess, opts.AssigneeID) } if opts.PosterID > 0 { - sess.And("issue.poster_id=?", opts.PosterID) + applyPosterCondition(sess, opts.PosterID) } if opts.MentionedID > 0 { - sess.Join("INNER", "issue_user", "issue.id = issue_user.issue_id"). - And("issue_user.is_mentioned = ?", true). - And("issue_user.uid = ?", opts.MentionedID) + applyMentionedCondition(sess, opts.MentionedID) + } + + if opts.ReviewRequestedID > 0 { + applyReviewRequestedCondition(sess, opts.ReviewRequestedID) } if len(opts.MilestoneIDs) > 0 { @@ -1209,7 +1251,7 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) { } if opts.IsArchived != util.OptionalBoolNone { - sess.Join("INNER", "repository", "issue.repo_id = repository.id").And(builder.Eq{"repository.is_archived": opts.IsArchived.IsTrue()}) + sess.And(builder.Eq{"repository.is_archived": opts.IsArchived.IsTrue()}) } if opts.LabelIDs != nil { @@ -1230,6 +1272,41 @@ func (opts *IssuesOptions) setupSession(sess *xorm.Session) { if len(opts.ExcludedLabelNames) > 0 { sess.And(builder.NotIn("issue.id", BuildLabelNamesIssueIDsCondition(opts.ExcludedLabelNames))) } + + if len(opts.IncludeMilestones) > 0 { + sess.In("issue.milestone_id", + builder.Select("id"). + From("milestone"). + Where(builder.In("name", opts.IncludeMilestones))) + } +} + +func applyReposCondition(sess *xorm.Session, repoIDs []int64) *xorm.Session { + return sess.In("issue.repo_id", repoIDs) +} + +func applyAssigneeCondition(sess *xorm.Session, assigneeID int64) *xorm.Session { + return sess.Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). + And("issue_assignees.assignee_id = ?", assigneeID) +} + +func applyPosterCondition(sess *xorm.Session, posterID int64) *xorm.Session { + return sess.And("issue.poster_id=?", posterID) +} + +func applyMentionedCondition(sess *xorm.Session, mentionedID int64) *xorm.Session { + return sess.Join("INNER", "issue_user", "issue.id = issue_user.issue_id"). + And("issue_user.is_mentioned = ?", true). + And("issue_user.uid = ?", mentionedID) +} + +func applyReviewRequestedCondition(sess *xorm.Session, reviewRequestedID int64) *xorm.Session { + return sess.Join("INNER", []string{"review", "r"}, "issue.id = r.issue_id"). + And("issue.poster_id <> ?", reviewRequestedID). + And("r.type = ?", ReviewTypeRequest). + And("r.reviewer_id = ? and r.id in (select max(id) from review where issue_id = r.issue_id and reviewer_id = r.reviewer_id and type in (?, ?, ?))"+ + " or r.reviewer_team_id in (select team_id from team_user where uid = ?)", + reviewRequestedID, ReviewTypeApprove, ReviewTypeReject, ReviewTypeRequest, reviewRequestedID) } // CountIssuesByRepo map from repoID to number of issues matching the options @@ -1237,6 +1314,8 @@ func CountIssuesByRepo(opts *IssuesOptions) (map[int64]int64, error) { sess := x.NewSession() defer sess.Close() + sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id") + opts.setupSession(sess) countsSlice := make([]*struct { @@ -1263,11 +1342,12 @@ func GetRepoIDsForIssuesOptions(opts *IssuesOptions, user *User) ([]int64, error sess := x.NewSession() defer sess.Close() + sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id") + opts.setupSession(sess) accessCond := accessibleRepositoryCondition(user) if err := sess.Where(accessCond). - Join("INNER", "repository", "`issue`.repo_id = `repository`.id"). Distinct("issue.repo_id"). Table("issue"). Find(&repoIDs); err != nil { @@ -1282,6 +1362,7 @@ func Issues(opts *IssuesOptions) ([]*Issue, error) { sess := x.NewSession() defer sess.Close() + sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id") opts.setupSession(sess) sortIssuesSession(sess, opts.SortType, opts.PriorityRepoID) @@ -1309,6 +1390,7 @@ func CountIssues(opts *IssuesOptions) (int64, error) { }, 0, 1) sess.Select("COUNT(issue.id) AS count").Table("issue") + sess.Join("INNER", "repository", "`issue`.repo_id = `repository`.id") opts.setupSession(sess) if err := sess.Find(&countsSlice); err != nil { return 0, fmt.Errorf("Find: %v", err) @@ -1364,6 +1446,7 @@ type IssueStats struct { AssignCount int64 CreateCount int64 MentionCount int64 + ReviewRequestedCount int64 } // Filter modes. @@ -1372,6 +1455,7 @@ const ( FilterModeAssign FilterModeCreate FilterModeMention + FilterModeReviewRequested ) func parseCountResult(results []map[string][]byte) int64 { @@ -1387,14 +1471,15 @@ func parseCountResult(results []map[string][]byte) int64 { // IssueStatsOptions contains parameters accepted by GetIssueStats. type IssueStatsOptions struct { - RepoID int64 - Labels string - MilestoneID int64 - AssigneeID int64 - MentionedID int64 - PosterID int64 - IsPull util.OptionalBool - IssueIDs []int64 + RepoID int64 + Labels string + MilestoneID int64 + AssigneeID int64 + MentionedID int64 + PosterID int64 + ReviewRequestedID int64 + IsPull util.OptionalBool + IssueIDs []int64 } // GetIssueStats returns issue statistic information by given conditions. @@ -1423,6 +1508,7 @@ func GetIssueStats(opts *IssueStatsOptions) (*IssueStats, error) { accum.AssignCount += stats.AssignCount accum.CreateCount += stats.CreateCount accum.OpenCount += stats.MentionCount + accum.ReviewRequestedCount += stats.ReviewRequestedCount i = chunk } return accum, nil @@ -1460,18 +1546,19 @@ func getIssueStatsChunk(opts *IssueStatsOptions, issueIDs []int64) (*IssueStats, } if opts.AssigneeID > 0 { - sess.Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). - And("issue_assignees.assignee_id = ?", opts.AssigneeID) + applyAssigneeCondition(sess, opts.AssigneeID) } if opts.PosterID > 0 { - sess.And("issue.poster_id = ?", opts.PosterID) + applyPosterCondition(sess, opts.PosterID) } if opts.MentionedID > 0 { - sess.Join("INNER", "issue_user", "issue.id = issue_user.issue_id"). - And("issue_user.uid = ?", opts.MentionedID). - And("issue_user.is_mentioned = ?", true) + applyMentionedCondition(sess, opts.MentionedID) + } + + if opts.ReviewRequestedID > 0 { + applyReviewRequestedCondition(sess, opts.ReviewRequestedID) } switch opts.IsPull { @@ -1539,57 +1626,66 @@ func GetUserIssueStats(opts UserIssueStatsOptions) (*IssueStats, error) { switch opts.FilterMode { case FilterModeAll: - stats.OpenCount, err = sess(cond).And("issue.is_closed = ?", false). - And(builder.In("issue.repo_id", opts.UserRepoIDs)). + stats.OpenCount, err = applyReposCondition(sess(cond), opts.UserRepoIDs). + And("issue.is_closed = ?", false). Count(new(Issue)) if err != nil { return nil, err } - stats.ClosedCount, err = sess(cond).And("issue.is_closed = ?", true). - And(builder.In("issue.repo_id", opts.UserRepoIDs)). + stats.ClosedCount, err = applyReposCondition(sess(cond), opts.UserRepoIDs). + And("issue.is_closed = ?", true). Count(new(Issue)) if err != nil { return nil, err } case FilterModeAssign: - stats.OpenCount, err = sess(cond).And("issue.is_closed = ?", false). - Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). - And("issue_assignees.assignee_id = ?", opts.UserID). + stats.OpenCount, err = applyAssigneeCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", false). Count(new(Issue)) if err != nil { return nil, err } - stats.ClosedCount, err = sess(cond).And("issue.is_closed = ?", true). - Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). - And("issue_assignees.assignee_id = ?", opts.UserID). + stats.ClosedCount, err = applyAssigneeCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", true). Count(new(Issue)) if err != nil { return nil, err } case FilterModeCreate: - stats.OpenCount, err = sess(cond).And("issue.is_closed = ?", false). - And("issue.poster_id = ?", opts.UserID). + stats.OpenCount, err = applyPosterCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", false). Count(new(Issue)) if err != nil { return nil, err } - stats.ClosedCount, err = sess(cond).And("issue.is_closed = ?", true). - And("issue.poster_id = ?", opts.UserID). + stats.ClosedCount, err = applyPosterCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", true). Count(new(Issue)) if err != nil { return nil, err } case FilterModeMention: - stats.OpenCount, err = sess(cond).And("issue.is_closed = ?", false). - Join("INNER", "issue_user", "issue.id = issue_user.issue_id and issue_user.is_mentioned = ?", true). - And("issue_user.uid = ?", opts.UserID). + stats.OpenCount, err = applyMentionedCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", false). Count(new(Issue)) if err != nil { return nil, err } - stats.ClosedCount, err = sess(cond).And("issue.is_closed = ?", true). - Join("INNER", "issue_user", "issue.id = issue_user.issue_id and issue_user.is_mentioned = ?", true). - And("issue_user.uid = ?", opts.UserID). + stats.ClosedCount, err = applyMentionedCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", true). + Count(new(Issue)) + if err != nil { + return nil, err + } + case FilterModeReviewRequested: + stats.OpenCount, err = applyReviewRequestedCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", false). + Count(new(Issue)) + if err != nil { + return nil, err + } + stats.ClosedCount, err = applyReviewRequestedCondition(sess(cond), opts.UserID). + And("issue.is_closed = ?", true). Count(new(Issue)) if err != nil { return nil, err @@ -1597,32 +1693,27 @@ func GetUserIssueStats(opts UserIssueStatsOptions) (*IssueStats, error) { } cond = cond.And(builder.Eq{"issue.is_closed": opts.IsClosed}) - stats.AssignCount, err = sess(cond). - Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). - And("issue_assignees.assignee_id = ?", opts.UserID). - Count(new(Issue)) + stats.AssignCount, err = applyAssigneeCondition(sess(cond), opts.UserID).Count(new(Issue)) if err != nil { return nil, err } - stats.CreateCount, err = sess(cond). - And("poster_id = ?", opts.UserID). - Count(new(Issue)) + stats.CreateCount, err = applyPosterCondition(sess(cond), opts.UserID).Count(new(Issue)) if err != nil { return nil, err } - stats.MentionCount, err = sess(cond). - Join("INNER", "issue_user", "issue.id = issue_user.issue_id and issue_user.is_mentioned = ?", true). - And("issue_user.uid = ?", opts.UserID). - Count(new(Issue)) + stats.MentionCount, err = applyMentionedCondition(sess(cond), opts.UserID).Count(new(Issue)) if err != nil { return nil, err } - stats.YourRepositoriesCount, err = sess(cond). - And(builder.In("issue.repo_id", opts.UserRepoIDs)). - Count(new(Issue)) + stats.YourRepositoriesCount, err = applyReposCondition(sess(cond), opts.UserRepoIDs).Count(new(Issue)) + if err != nil { + return nil, err + } + + stats.ReviewRequestedCount, err = applyReviewRequestedCondition(sess(cond), opts.UserID).Count(new(Issue)) if err != nil { return nil, err } @@ -1631,7 +1722,7 @@ func GetUserIssueStats(opts UserIssueStatsOptions) (*IssueStats, error) { } // GetRepoIssueStats returns number of open and closed repository issues by given filter mode. -func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen int64, numClosed int64) { +func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen, numClosed int64) { countSession := func(isClosed, isPull bool, repoID int64) *xorm.Session { sess := x. Where("is_closed = ?", isClosed). @@ -1646,13 +1737,11 @@ func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen switch filterMode { case FilterModeAssign: - openCountSession.Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). - And("issue_assignees.assignee_id = ?", uid) - closedCountSession.Join("INNER", "issue_assignees", "issue.id = issue_assignees.issue_id"). - And("issue_assignees.assignee_id = ?", uid) + applyAssigneeCondition(openCountSession, uid) + applyAssigneeCondition(closedCountSession, uid) case FilterModeCreate: - openCountSession.And("poster_id = ?", uid) - closedCountSession.And("poster_id = ?", uid) + applyPosterCondition(openCountSession, uid) + applyPosterCondition(closedCountSession, uid) } openResult, _ := openCountSession.Count(new(Issue)) @@ -1663,29 +1752,39 @@ func GetRepoIssueStats(repoID, uid int64, filterMode int, isPull bool) (numOpen // SearchIssueIDsByKeyword search issues on database func SearchIssueIDsByKeyword(kw string, repoIDs []int64, limit, start int) (int64, []int64, error) { - var repoCond = builder.In("repo_id", repoIDs) - var subQuery = builder.Select("id").From("issue").Where(repoCond) - var cond = builder.And( + repoCond := builder.In("repo_id", repoIDs) + subQuery := builder.Select("id").From("issue").Where(repoCond) + kw = strings.ToUpper(kw) + cond := builder.And( repoCond, builder.Or( - builder.Like{"name", kw}, - builder.Like{"content", kw}, + builder.Like{"UPPER(name)", kw}, + builder.Like{"UPPER(content)", kw}, builder.In("id", builder.Select("issue_id"). From("comment"). Where(builder.And( builder.Eq{"type": CommentTypeComment}, builder.In("issue_id", subQuery), - builder.Like{"content", kw}, + builder.Like{"UPPER(content)", kw}, )), ), ), ) - var ids = make([]int64, 0, limit) - err := x.Distinct("id").Table("issue").Where(cond).Limit(limit, start).Find(&ids) + ids := make([]int64, 0, limit) + res := make([]struct { + ID int64 + UpdatedUnix int64 + }, 0, limit) + err := x.Distinct("id", "updated_unix").Table("issue").Where(cond). + OrderBy("`updated_unix` DESC").Limit(limit, start). + Find(&res) if err != nil { return 0, nil, err } + for _, r := range res { + ids = append(ids, r.ID) + } total, err := x.Distinct("id").Table("issue").Where(cond).Count() if err != nil { @@ -1724,7 +1823,7 @@ func UpdateIssueByAPI(issue *Issue, doer *User) (statusChangeComment *Comment, t titleChanged = currentIssue.Title != issue.Title if titleChanged { - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: CommentTypeChangeTitle, Doer: doer, Repo: issue.Repo, @@ -1753,7 +1852,6 @@ func UpdateIssueByAPI(issue *Issue, doer *User) (statusChangeComment *Comment, t // UpdateIssueDeadline updates an issue deadline and adds comments. Setting a deadline to 0 means deleting it. func UpdateIssueDeadline(issue *Issue, deadlineUnix timeutil.TimeStamp, doer *User) (err error) { - // if the deadline hasn't changed do nothing if issue.DeadlineUnix == deadlineUnix { return nil @@ -1813,7 +1911,7 @@ func (issue *Issue) getBlockedByDependencies(e Engine) (issueDeps []*DependencyI Join("INNER", "repository", "repository.id = issue.repo_id"). Join("INNER", "issue_dependency", "issue_dependency.dependency_id = issue.id"). Where("issue_id = ?", issue.ID). - //sort by repo id then created date, with the issues of the same repo at the beginning of the list + // sort by repo id then created date, with the issues of the same repo at the beginning of the list OrderBy("CASE WHEN issue.repo_id = " + strconv.FormatInt(issue.RepoID, 10) + " THEN 0 ELSE issue.repo_id END, issue.created_unix DESC"). Find(&issueDeps) } @@ -1825,7 +1923,7 @@ func (issue *Issue) getBlockingDependencies(e Engine) (issueDeps []*DependencyIn Join("INNER", "repository", "repository.id = issue.repo_id"). Join("INNER", "issue_dependency", "issue_dependency.issue_id = issue.id"). Where("dependency_id = ?", issue.ID). - //sort by repo id then created date, with the issues of the same repo at the beginning of the list + // sort by repo id then created date, with the issues of the same repo at the beginning of the list OrderBy("CASE WHEN issue.repo_id = " + strconv.FormatInt(issue.RepoID, 10) + " THEN 0 ELSE issue.repo_id END, issue.created_unix DESC"). Find(&issueDeps) } diff --git a/models/issue_assignees.go b/models/issue_assignees.go index 05e1797c1..e05c0f0fd 100644 --- a/models/issue_assignees.go +++ b/models/issue_assignees.go @@ -82,7 +82,7 @@ func isUserAssignedToIssue(e Engine, issue *Issue, user *User) (isAssigned bool, } // ClearAssigneeByUserID deletes all assignments of an user -func clearAssigneeByUserID(sess *xorm.Session, userID int64) (err error) { +func clearAssigneeByUserID(sess Engine, userID int64) (err error) { _, err = sess.Delete(&IssueAssignees{AssigneeID: userID}) return } @@ -119,7 +119,7 @@ func (issue *Issue) toggleAssignee(sess *xorm.Session, doer *User, assigneeID in return false, nil, fmt.Errorf("loadRepo: %v", err) } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: CommentTypeAssignees, Doer: doer, Repo: issue.Repo, @@ -143,7 +143,6 @@ func (issue *Issue) toggleAssignee(sess *xorm.Session, doer *User, assigneeID in // toggles user assignee state in database func toggleUserAssignee(e *xorm.Session, issue *Issue, assigneeID int64) (removed bool, err error) { - // Check if the user exists assignee, err := getUserByID(e, assigneeID) if err != nil { @@ -180,7 +179,6 @@ func toggleUserAssignee(e *xorm.Session, issue *Issue, assigneeID int64) (remove // MakeIDsFromAPIAssigneesToAdd returns an array with all assignee IDs func MakeIDsFromAPIAssigneesToAdd(oneAssignee string, multipleAssignees []string) (assigneeIDs []int64, err error) { - var requestAssignees []string // Keeping the old assigning method for compatibility reasons @@ -188,7 +186,7 @@ func MakeIDsFromAPIAssigneesToAdd(oneAssignee string, multipleAssignees []string requestAssignees = append(requestAssignees, oneAssignee) } - //Prevent empty assignees + // Prevent empty assignees if len(multipleAssignees) > 0 && multipleAssignees[0] != "" { requestAssignees = append(requestAssignees, multipleAssignees...) } diff --git a/models/issue_assignees_test.go b/models/issue_assignees_test.go index 79257013f..e0359b0b9 100644 --- a/models/issue_assignees_test.go +++ b/models/issue_assignees_test.go @@ -61,6 +61,11 @@ func TestUpdateAssignee(t *testing.T) { } func TestMakeIDsFromAPIAssigneesToAdd(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + _ = AssertExistsAndLoadBean(t, &User{ID: 1}).(*User) + _ = AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + IDs, err := MakeIDsFromAPIAssigneesToAdd("", []string{""}) assert.NoError(t, err) assert.Equal(t, []int64{}, IDs) diff --git a/models/issue_comment.go b/models/issue_comment.go index dd979edcd..10a7d0b11 100644 --- a/models/issue_comment.go +++ b/models/issue_comment.go @@ -7,8 +7,6 @@ package models import ( - "container/list" - "encoding/json" "fmt" "regexp" "strconv" @@ -16,7 +14,9 @@ import ( "unicode/utf8" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/references" "code.gitea.io/gitea/modules/structs" @@ -36,69 +36,71 @@ const ( // Enumerate all the comment types const ( - // Plain comment, can be associated with a commit (CommitID > 0) and a line (LineNum > 0) + // 0 Plain comment, can be associated with a commit (CommitID > 0) and a line (LineNum > 0) CommentTypeComment CommentType = iota - CommentTypeReopen - CommentTypeClose + CommentTypeReopen // 1 + CommentTypeClose // 2 - // References. + // 3 References. CommentTypeIssueRef - // Reference from a commit (not part of a pull request) + // 4 Reference from a commit (not part of a pull request) CommentTypeCommitRef - // Reference from a comment + // 5 Reference from a comment CommentTypeCommentRef - // Reference from a pull request + // 6 Reference from a pull request CommentTypePullRef - // Labels changed + // 7 Labels changed CommentTypeLabel - // Milestone changed + // 8 Milestone changed CommentTypeMilestone - // Assignees changed + // 9 Assignees changed CommentTypeAssignees - // Change Title + // 10 Change Title CommentTypeChangeTitle - // Delete Branch + // 11 Delete Branch CommentTypeDeleteBranch - // Start a stopwatch for time tracking + // 12 Start a stopwatch for time tracking CommentTypeStartTracking - // Stop a stopwatch for time tracking + // 13 Stop a stopwatch for time tracking CommentTypeStopTracking - // Add time manual for time tracking + // 14 Add time manual for time tracking CommentTypeAddTimeManual - // Cancel a stopwatch for time tracking + // 15 Cancel a stopwatch for time tracking CommentTypeCancelTracking - // Added a due date + // 16 Added a due date CommentTypeAddedDeadline - // Modified the due date + // 17 Modified the due date CommentTypeModifiedDeadline - // Removed a due date + // 18 Removed a due date CommentTypeRemovedDeadline - // Dependency added + // 19 Dependency added CommentTypeAddDependency - //Dependency removed + // 20 Dependency removed CommentTypeRemoveDependency - // Comment a line of code + // 21 Comment a line of code CommentTypeCode - // Reviews a pull request by giving general feedback + // 22 Reviews a pull request by giving general feedback CommentTypeReview - // Lock an issue, giving only collaborators access + // 23 Lock an issue, giving only collaborators access CommentTypeLock - // Unlocks a previously locked issue + // 24 Unlocks a previously locked issue CommentTypeUnlock - // Change pull request's target branch + // 25 Change pull request's target branch CommentTypeChangeTargetBranch - // Delete time manual for time tracking + // 26 Delete time manual for time tracking CommentTypeDeleteTimeManual - // add or remove Request from one + // 27 add or remove Request from one CommentTypeReviewRequest - // merge pull request + // 28 merge pull request CommentTypeMergePull - // push to PR head branch + // 29 push to PR head branch CommentTypePullPush - // Project changed + // 30 Project changed CommentTypeProject - // Project board changed + // 31 Project board changed CommentTypeProjectBoard + // Dismiss Review + CommentTypeDismissReview ) // CommentTag defines comment tag type @@ -134,6 +136,8 @@ type Comment struct { MilestoneID int64 OldMilestone *Milestone `xorm:"-"` Milestone *Milestone `xorm:"-"` + TimeID int64 + Time *TrackedTime `xorm:"-"` AssigneeID int64 RemovedAssignee bool Assignee *User `xorm:"-"` @@ -151,12 +155,12 @@ type Comment struct { CommitID int64 Line int64 // - previous line / + proposed line TreePath string - Content string `xorm:"TEXT"` + Content string `xorm:"LONGTEXT"` RenderedContent string `xorm:"-"` // Path represents the 4 lines of code cemented by this comment Patch string `xorm:"-"` - PatchQuoted string `xorm:"TEXT patch"` + PatchQuoted string `xorm:"LONGTEXT patch"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` @@ -179,18 +183,18 @@ type Comment struct { RefRepoID int64 `xorm:"index"` // Repo where the referencing RefIssueID int64 `xorm:"index"` RefCommentID int64 `xorm:"index"` // 0 if origin is Issue title or content (or PR's) - RefAction references.XRefAction `xorm:"SMALLINT"` // What hapens if RefIssueID resolves + RefAction references.XRefAction `xorm:"SMALLINT"` // What happens if RefIssueID resolves RefIsPull bool RefRepo *Repository `xorm:"-"` RefIssue *Issue `xorm:"-"` RefComment *Comment `xorm:"-"` - Commits *list.List `xorm:"-"` - OldCommit string `xorm:"-"` - NewCommit string `xorm:"-"` - CommitsNum int64 `xorm:"-"` - IsForcePush bool `xorm:"-"` + Commits []*SignCommitWithStatuses `xorm:"-"` + OldCommit string `xorm:"-"` + NewCommit string `xorm:"-"` + CommitsNum int64 `xorm:"-"` + IsForcePush bool `xorm:"-"` } // PushActionContent is content of push pull comment @@ -263,7 +267,6 @@ func (c *Comment) AfterDelete() { } _, err := DeleteAttachmentsByComment(c.ID, true) - if err != nil { log.Info("Could not delete files for comment %d on issue #%d: %s", c.ID, c.IssueID, err) } @@ -387,7 +390,6 @@ func (c *Comment) LoadLabel() error { // LoadProject if comment.Type is CommentTypeProject, then load project. func (c *Comment) LoadProject() error { - if c.OldProjectID > 0 { var oldProject Project has, err := x.ID(c.OldProjectID).Get(&oldProject) @@ -539,6 +541,16 @@ func (c *Comment) LoadDepIssueDetails() (err error) { return err } +// LoadTime loads the associated time for a CommentTypeAddTimeManual +func (c *Comment) LoadTime() error { + if c.Time != nil || c.TimeID == 0 { + return nil + } + var err error + c.Time, err = GetTrackedTimeByID(c.TimeID) + return err +} + func (c *Comment) loadReactions(e Engine, repo *Repository) (err error) { if c.Reactions != nil { return nil @@ -662,13 +674,8 @@ func (c *Comment) LoadPushCommits() (err error) { } defer gitRepo.Close() - c.Commits = gitRepo.GetCommitsFromIDs(data.CommitIDs) - c.CommitsNum = int64(c.Commits.Len()) - if c.CommitsNum > 0 { - c.Commits = ValidateCommitsWithEmails(c.Commits) - c.Commits = ParseCommitsWithSignature(c.Commits, c.Issue.Repo) - c.Commits = ParseCommitsWithStatus(c.Commits, c.Issue.Repo) - } + c.Commits = ConvertFromGitCommit(gitRepo.GetCommitsFromIDs(data.CommitIDs), c.Issue.Repo) + c.CommitsNum = int64(len(c.Commits)) } return err @@ -690,6 +697,7 @@ func createComment(e *xorm.Session, opts *CreateCommentOptions) (_ *Comment, err MilestoneID: opts.MilestoneID, OldProjectID: opts.OldProjectID, ProjectID: opts.ProjectID, + TimeID: opts.TimeID, RemovedAssignee: opts.RemovedAssignee, AssigneeID: opts.AssigneeID, AssigneeTeamID: opts.AssigneeTeamID, @@ -747,6 +755,8 @@ func updateCommentInfos(e *xorm.Session, opts *CreateCommentOptions, comment *Co } } fallthrough + case CommentTypeReview: + fallthrough case CommentTypeComment: if _, err = e.Exec("UPDATE `issue` SET num_comments=num_comments+1 WHERE id=?", opts.Issue.ID); err != nil { return err @@ -797,7 +807,7 @@ func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlin return nil, err } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: commentType, Doer: doer, Repo: issue.Repo, @@ -812,7 +822,7 @@ func createDeadlineComment(e *xorm.Session, doer *User, issue *Issue, newDeadlin } // Creates issue dependency comment -func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dependentIssue *Issue, add bool) (err error) { +func createIssueDependencyComment(e *xorm.Session, doer *User, issue, dependentIssue *Issue, add bool) (err error) { cType := CommentTypeAddDependency if !add { cType = CommentTypeRemoveDependency @@ -822,7 +832,7 @@ func createIssueDependencyComment(e *xorm.Session, doer *User, issue *Issue, dep } // Make two comments, one in each issue - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: cType, Doer: doer, Repo: issue.Repo, @@ -857,6 +867,7 @@ type CreateCommentOptions struct { MilestoneID int64 OldProjectID int64 ProjectID int64 + TimeID int64 AssigneeID int64 AssigneeTeamID int64 RemovedAssignee bool @@ -960,7 +971,7 @@ type FindCommentsOptions struct { } func (opts *FindCommentsOptions) toConds() builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if opts.RepoID > 0 { cond = cond.And(builder.Eq{"issue.repo_id": opts.RepoID}) } @@ -988,7 +999,7 @@ func (opts *FindCommentsOptions) toConds() builder.Cond { return cond } -func findComments(e Engine, opts FindCommentsOptions) ([]*Comment, error) { +func findComments(e Engine, opts *FindCommentsOptions) ([]*Comment, error) { comments := make([]*Comment, 0, 10) sess := e.Where(opts.toConds()) if opts.RepoID > 0 { @@ -1008,10 +1019,19 @@ func findComments(e Engine, opts FindCommentsOptions) ([]*Comment, error) { } // FindComments returns all comments according options -func FindComments(opts FindCommentsOptions) ([]*Comment, error) { +func FindComments(opts *FindCommentsOptions) ([]*Comment, error) { return findComments(x, opts) } +// CountComments count all comments according options by ignoring pagination +func CountComments(opts *FindCommentsOptions) (int64, error) { + sess := x.Where(opts.toConds()) + if opts.RepoID > 0 { + sess.Join("INNER", "issue", "issue.id = comment.issue_id") + } + return sess.Count(&Comment{}) +} + // UpdateComment updates information of comment. func UpdateComment(c *Comment, doer *User) error { sess := x.NewSession() @@ -1037,33 +1057,41 @@ func UpdateComment(c *Comment, doer *User) error { } // DeleteComment deletes the comment -func DeleteComment(comment *Comment, doer *User) error { +func DeleteComment(comment *Comment) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { return err } - if _, err := sess.Delete(&Comment{ + if err := deleteComment(sess, comment); err != nil { + return err + } + + return sess.Commit() +} + +func deleteComment(e Engine, comment *Comment) error { + if _, err := e.Delete(&Comment{ ID: comment.ID, }); err != nil { return err } if comment.Type == CommentTypeComment { - if _, err := sess.Exec("UPDATE `issue` SET num_comments = num_comments - 1 WHERE id = ?", comment.IssueID); err != nil { + if _, err := e.Exec("UPDATE `issue` SET num_comments = num_comments - 1 WHERE id = ?", comment.IssueID); err != nil { return err } } - if _, err := sess.Where("comment_id = ?", comment.ID).Cols("is_deleted").Update(&Action{IsDeleted: true}); err != nil { + if _, err := e.Where("comment_id = ?", comment.ID).Cols("is_deleted").Update(&Action{IsDeleted: true}); err != nil { return err } - if err := comment.neuterCrossReferences(sess); err != nil { + if err := comment.neuterCrossReferences(e); err != nil { return err } - return sess.Commit() + return deleteReaction(e, &ReactionOptions{Comment: comment}) } // CodeComments represents comments on code by using this structure: FILENAME -> LINE (+ == proposed; - == previous) -> COMMENTS @@ -1124,7 +1152,7 @@ func findCodeComments(e Engine, opts FindCommentsOptions, issue *Issue, currentU // Find all reviews by ReviewID reviews := make(map[int64]*Review) - var ids = make([]int64, 0, len(comments)) + ids := make([]int64, 0, len(comments)) for _, comment := range comments { if comment.ReviewID != 0 { ids = append(ids, comment.ReviewID) @@ -1155,8 +1183,13 @@ func findCodeComments(e Engine, opts FindCommentsOptions, issue *Issue, currentU return nil, err } - comment.RenderedContent = string(markdown.Render([]byte(comment.Content), issue.Repo.Link(), - issue.Repo.ComposeMetas())) + var err error + if comment.RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: issue.Repo.Link(), + Metas: issue.Repo.ComposeMetas(), + }, comment.Content); err != nil { + return nil, err + } } return comments[:n], nil } @@ -1197,7 +1230,7 @@ func UpdateCommentsMigrationsByType(tp structs.GitServiceType, originalAuthorID return err } -// CreatePushPullComment create push code to pull base commend +// CreatePushPullComment create push code to pull base comment func CreatePushPullComment(pusher *User, pr *PullRequest, oldCommitID, newCommitID string) (comment *Comment, err error) { if pr.HasMerged || oldCommitID == "" || newCommitID == "" { return nil, nil @@ -1217,6 +1250,7 @@ func CreatePushPullComment(pusher *User, pr *PullRequest, oldCommitID, newCommit } ops.Issue = pr.Issue + dataJSON, err := json.Marshal(data) if err != nil { return nil, err @@ -1229,7 +1263,7 @@ func CreatePushPullComment(pusher *User, pr *PullRequest, oldCommitID, newCommit return } -// getCommitsFromRepo get commit IDs from repo in betwern oldCommitID and newCommitID +// getCommitsFromRepo get commit IDs from repo in between oldCommitID and newCommitID // isForcePush will be true if oldCommit isn't on the branch // Commit on baseBranch will skip func getCommitIDsFromRepo(repo *Repository, oldCommitID, newCommitID, baseBranch string) (commitIDs []string, isForcePush bool, err error) { @@ -1262,21 +1296,17 @@ func getCommitIDsFromRepo(repo *Repository, oldCommitID, newCommitID, baseBranch return nil, false, err } - var ( - commits *list.List - commitChecks map[string]commitBranchCheckItem - ) - commits, err = newCommit.CommitsBeforeUntil(oldCommitID) + commits, err := newCommit.CommitsBeforeUntil(oldCommitID) if err != nil { return nil, false, err } - commitIDs = make([]string, 0, commits.Len()) - commitChecks = make(map[string]commitBranchCheckItem) + commitIDs = make([]string, 0, len(commits)) + commitChecks := make(map[string]*commitBranchCheckItem) - for e := commits.Front(); e != nil; e = e.Next() { - commitChecks[e.Value.(*git.Commit).ID.String()] = commitBranchCheckItem{ - Commit: e.Value.(*git.Commit), + for _, commit := range commits { + commitChecks[commit.ID.String()] = &commitBranchCheckItem{ + Commit: commit, Checked: false, } } @@ -1285,8 +1315,8 @@ func getCommitIDsFromRepo(repo *Repository, oldCommitID, newCommitID, baseBranch return } - for e := commits.Back(); e != nil; e = e.Prev() { - commitID := e.Value.(*git.Commit).ID.String() + for i := len(commits) - 1; i >= 0; i-- { + commitID := commits[i].ID.String() if item, ok := commitChecks[commitID]; ok && item.Checked { commitIDs = append(commitIDs, commitID) } @@ -1300,64 +1330,49 @@ type commitBranchCheckItem struct { Checked bool } -func commitBranchCheck(gitRepo *git.Repository, startCommit *git.Commit, endCommitID, baseBranch string, commitList map[string]commitBranchCheckItem) (err error) { - var ( - item commitBranchCheckItem - ok bool - listItem *list.Element - tmp string - ) - +func commitBranchCheck(gitRepo *git.Repository, startCommit *git.Commit, endCommitID, baseBranch string, commitList map[string]*commitBranchCheckItem) error { if startCommit.ID.String() == endCommitID { - return + return nil } - checkStack := list.New() - checkStack.PushBack(startCommit.ID.String()) - listItem = checkStack.Back() + checkStack := make([]string, 0, 10) + checkStack = append(checkStack, startCommit.ID.String()) - for listItem != nil { - tmp = listItem.Value.(string) - checkStack.Remove(listItem) + for len(checkStack) > 0 { + commitID := checkStack[0] + checkStack = checkStack[1:] - if item, ok = commitList[tmp]; !ok { - listItem = checkStack.Back() + item, ok := commitList[commitID] + if !ok { continue } if item.Commit.ID.String() == endCommitID { - listItem = checkStack.Back() continue } - if err = item.Commit.LoadBranchName(); err != nil { - return + if err := item.Commit.LoadBranchName(); err != nil { + return err } if item.Commit.Branch == baseBranch { - listItem = checkStack.Back() continue } if item.Checked { - listItem = checkStack.Back() continue } item.Checked = true - commitList[tmp] = item parentNum := item.Commit.ParentCount() for i := 0; i < parentNum; i++ { - var parentCommit *git.Commit - parentCommit, err = item.Commit.Parent(i) + parentCommit, err := item.Commit.Parent(i) if err != nil { - return + return err } - checkStack.PushBack(parentCommit.ID.String()) + checkStack = append(checkStack, parentCommit.ID.String()) } - - listItem = checkStack.Back() } return nil } diff --git a/models/issue_comment_list.go b/models/issue_comment_list.go index f8739e32a..df1b1ac55 100644 --- a/models/issue_comment_list.go +++ b/models/issue_comment_list.go @@ -24,9 +24,9 @@ func (comments CommentList) loadPosters(e Engine) error { posterIDs := comments.getPosterIDs() posterMaps := make(map[int64]*User, len(posterIDs)) - var left = len(posterIDs) + left := len(posterIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -53,7 +53,7 @@ func (comments CommentList) loadPosters(e Engine) error { } func (comments CommentList) getCommentIDs() []int64 { - var ids = make([]int64, 0, len(comments)) + ids := make([]int64, 0, len(comments)) for _, comment := range comments { ids = append(ids, comment.ID) } @@ -61,7 +61,7 @@ func (comments CommentList) getCommentIDs() []int64 { } func (comments CommentList) getLabelIDs() []int64 { - var ids = make(map[int64]struct{}, len(comments)) + ids := make(map[int64]struct{}, len(comments)) for _, comment := range comments { if _, ok := ids[comment.LabelID]; !ok { ids[comment.LabelID] = struct{}{} @@ -75,11 +75,11 @@ func (comments CommentList) loadLabels(e Engine) error { return nil } - var labelIDs = comments.getLabelIDs() - var commentLabels = make(map[int64]*Label, len(labelIDs)) - var left = len(labelIDs) + labelIDs := comments.getLabelIDs() + commentLabels := make(map[int64]*Label, len(labelIDs)) + left := len(labelIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -111,7 +111,7 @@ func (comments CommentList) loadLabels(e Engine) error { } func (comments CommentList) getMilestoneIDs() []int64 { - var ids = make(map[int64]struct{}, len(comments)) + ids := make(map[int64]struct{}, len(comments)) for _, comment := range comments { if _, ok := ids[comment.MilestoneID]; !ok { ids[comment.MilestoneID] = struct{}{} @@ -131,9 +131,9 @@ func (comments CommentList) loadMilestones(e Engine) error { } milestoneMaps := make(map[int64]*Milestone, len(milestoneIDs)) - var left = len(milestoneIDs) + left := len(milestoneIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -154,7 +154,7 @@ func (comments CommentList) loadMilestones(e Engine) error { } func (comments CommentList) getOldMilestoneIDs() []int64 { - var ids = make(map[int64]struct{}, len(comments)) + ids := make(map[int64]struct{}, len(comments)) for _, comment := range comments { if _, ok := ids[comment.OldMilestoneID]; !ok { ids[comment.OldMilestoneID] = struct{}{} @@ -174,9 +174,9 @@ func (comments CommentList) loadOldMilestones(e Engine) error { } milestoneMaps := make(map[int64]*Milestone, len(milestoneIDs)) - var left = len(milestoneIDs) + left := len(milestoneIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -197,7 +197,7 @@ func (comments CommentList) loadOldMilestones(e Engine) error { } func (comments CommentList) getAssigneeIDs() []int64 { - var ids = make(map[int64]struct{}, len(comments)) + ids := make(map[int64]struct{}, len(comments)) for _, comment := range comments { if _, ok := ids[comment.AssigneeID]; !ok { ids[comment.AssigneeID] = struct{}{} @@ -211,11 +211,11 @@ func (comments CommentList) loadAssignees(e Engine) error { return nil } - var assigneeIDs = comments.getAssigneeIDs() - var assignees = make(map[int64]*User, len(assigneeIDs)) - var left = len(assigneeIDs) + assigneeIDs := comments.getAssigneeIDs() + assignees := make(map[int64]*User, len(assigneeIDs)) + left := len(assigneeIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -250,7 +250,7 @@ func (comments CommentList) loadAssignees(e Engine) error { // getIssueIDs returns all the issue ids on this comment list which issue hasn't been loaded func (comments CommentList) getIssueIDs() []int64 { - var ids = make(map[int64]struct{}, len(comments)) + ids := make(map[int64]struct{}, len(comments)) for _, comment := range comments { if comment.Issue != nil { continue @@ -264,7 +264,7 @@ func (comments CommentList) getIssueIDs() []int64 { // Issues returns all the issues of comments func (comments CommentList) Issues() IssueList { - var issues = make(map[int64]*Issue, len(comments)) + issues := make(map[int64]*Issue, len(comments)) for _, comment := range comments { if comment.Issue != nil { if _, ok := issues[comment.Issue.ID]; !ok { @@ -273,7 +273,7 @@ func (comments CommentList) Issues() IssueList { } } - var issueList = make([]*Issue, 0, len(issues)) + issueList := make([]*Issue, 0, len(issues)) for _, issue := range issues { issueList = append(issueList, issue) } @@ -285,11 +285,11 @@ func (comments CommentList) loadIssues(e Engine) error { return nil } - var issueIDs = comments.getIssueIDs() - var issues = make(map[int64]*Issue, len(issueIDs)) - var left = len(issueIDs) + issueIDs := comments.getIssueIDs() + issues := make(map[int64]*Issue, len(issueIDs)) + left := len(issueIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -325,7 +325,7 @@ func (comments CommentList) loadIssues(e Engine) error { } func (comments CommentList) getDependentIssueIDs() []int64 { - var ids = make(map[int64]struct{}, len(comments)) + ids := make(map[int64]struct{}, len(comments)) for _, comment := range comments { if comment.DependentIssue != nil { continue @@ -342,11 +342,11 @@ func (comments CommentList) loadDependentIssues(e Engine) error { return nil } - var issueIDs = comments.getDependentIssueIDs() - var issues = make(map[int64]*Issue, len(issueIDs)) - var left = len(issueIDs) + issueIDs := comments.getDependentIssueIDs() + issues := make(map[int64]*Issue, len(issueIDs)) + left := len(issueIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -391,11 +391,11 @@ func (comments CommentList) loadAttachments(e Engine) (err error) { return nil } - var attachments = make(map[int64][]*Attachment, len(comments)) - var commentsIDs = comments.getCommentIDs() - var left = len(commentsIDs) + attachments := make(map[int64][]*Attachment, len(comments)) + commentsIDs := comments.getCommentIDs() + left := len(commentsIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -429,7 +429,7 @@ func (comments CommentList) loadAttachments(e Engine) (err error) { } func (comments CommentList) getReviewIDs() []int64 { - var ids = make(map[int64]struct{}, len(comments)) + ids := make(map[int64]struct{}, len(comments)) for _, comment := range comments { if _, ok := ids[comment.ReviewID]; !ok { ids[comment.ReviewID] = struct{}{} @@ -443,11 +443,11 @@ func (comments CommentList) loadReviews(e Engine) error { return nil } - var reviewIDs = comments.getReviewIDs() - var reviews = make(map[int64]*Review, len(reviewIDs)) - var left = len(reviewIDs) + reviewIDs := comments.getReviewIDs() + reviews := make(map[int64]*Review, len(reviewIDs)) + left := len(reviewIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } diff --git a/models/issue_dependency.go b/models/issue_dependency.go index c880bd59c..4008008f3 100644 --- a/models/issue_dependency.go +++ b/models/issue_dependency.go @@ -71,7 +71,7 @@ func CreateIssueDependency(user *User, issue, dep *Issue) error { } // RemoveIssueDependency removes a dependency from an issue -func RemoveIssueDependency(user *User, issue *Issue, dep *Issue, depType DependencyType) (err error) { +func RemoveIssueDependency(user *User, issue, dep *Issue, depType DependencyType) (err error) { sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { @@ -107,7 +107,7 @@ func RemoveIssueDependency(user *User, issue *Issue, dep *Issue, depType Depende } // Check if the dependency already exists -func issueDepExists(e Engine, issueID int64, depID int64) (bool, error) { +func issueDepExists(e Engine, issueID, depID int64) (bool, error) { return e.Where("(issue_id = ? AND dependency_id = ?)", issueID, depID).Exist(&IssueDependency{}) } @@ -128,7 +128,7 @@ func issueNoDependenciesLeft(e Engine, issue *Issue) (bool, error) { return !exists, err } -// IsDependenciesEnabled returns if dependecies are enabled and returns the default setting if not set. +// IsDependenciesEnabled returns if dependencies are enabled and returns the default setting if not set. func (repo *Repository) IsDependenciesEnabled() bool { return repo.isDependenciesEnabled(x) } diff --git a/models/issue_label.go b/models/issue_label.go index ea12b42ae..936dd71e3 100644 --- a/models/issue_label.go +++ b/models/issue_label.go @@ -8,6 +8,7 @@ package models import ( "fmt" "html/template" + "math" "regexp" "strconv" "strings" @@ -47,7 +48,7 @@ type Label struct { func GetLabelTemplateFile(name string) ([][3]string, error) { data, err := GetRepoInitFile("label", name) if err != nil { - return nil, fmt.Errorf("GetRepoInitFile: %v", err) + return nil, ErrIssueLabelTemplateLoad{name, fmt.Errorf("GetRepoInitFile: %v", err)} } lines := strings.Split(string(data), "\n") @@ -62,7 +63,7 @@ func GetLabelTemplateFile(name string) ([][3]string, error) { fields := strings.SplitN(parts[0], " ", 2) if len(fields) != 2 { - return nil, fmt.Errorf("line is malformed: %s", line) + return nil, ErrIssueLabelTemplateLoad{name, fmt.Errorf("line is malformed: %s", line)} } color := strings.Trim(fields[0], " ") @@ -70,7 +71,7 @@ func GetLabelTemplateFile(name string) ([][3]string, error) { color = "#" + color } if !LabelColorPattern.MatchString(color) { - return nil, fmt.Errorf("bad HTML color code in line: %s", line) + return nil, ErrIssueLabelTemplateLoad{name, fmt.Errorf("bad HTML color code in line: %s", line)} } var description string @@ -138,19 +139,44 @@ func (label *Label) BelongsToRepo() bool { return label.RepoID > 0 } +// SrgbToLinear converts a component of an sRGB color to its linear intensity +// See: https://en.wikipedia.org/wiki/SRGB#The_reverse_transformation_(sRGB_to_CIE_XYZ) +func SrgbToLinear(color uint8) float64 { + flt := float64(color) / 255 + if flt <= 0.04045 { + return flt / 12.92 + } + return math.Pow((flt+0.055)/1.055, 2.4) +} + +// Luminance returns the luminance of an sRGB color +func Luminance(color uint32) float64 { + r := SrgbToLinear(uint8(0xFF & (color >> 16))) + g := SrgbToLinear(uint8(0xFF & (color >> 8))) + b := SrgbToLinear(uint8(0xFF & color)) + + // luminance ratios for sRGB + return 0.2126*r + 0.7152*g + 0.0722*b +} + +// LuminanceThreshold is the luminance at which white and black appear to have the same contrast +// i.e. x such that 1.05 / (x + 0.05) = (x + 0.05) / 0.05 +// i.e. math.Sqrt(1.05*0.05) - 0.05 +const LuminanceThreshold float64 = 0.179 + // ForegroundColor calculates the text color for labels based // on their background color. func (label *Label) ForegroundColor() template.CSS { if strings.HasPrefix(label.Color, "#") { if color, err := strconv.ParseUint(label.Color[1:], 16, 64); err == nil { - r := float32(0xFF & (color >> 16)) - g := float32(0xFF & (color >> 8)) - b := float32(0xFF & color) - luminance := (0.2126*r + 0.7152*g + 0.0722*b) / 255 + // NOTE: see web_src/js/components/ContextPopup.vue for similar implementation + luminance := Luminance(uint32(color)) - if luminance < 0.66 { + // prefer white or black based upon contrast + if luminance < LuminanceThreshold { return template.CSS("#fff") } + return template.CSS("#000") } } @@ -167,7 +193,7 @@ func (label *Label) ForegroundColor() template.CSS { func loadLabels(labelTemplate string) ([]string, error) { list, err := GetLabelTemplateFile(labelTemplate) if err != nil { - return nil, ErrIssueLabelTemplateLoad{labelTemplate, err} + return nil, err } labels := make([]string, len(list)) @@ -186,7 +212,7 @@ func LoadLabelsFormatted(labelTemplate string) (string, error) { func initializeLabels(e Engine, id int64, labelTemplate string, isOrg bool) error { list, err := GetLabelTemplateFile(labelTemplate) if err != nil { - return ErrIssueLabelTemplateLoad{labelTemplate, err} + return err } labels := make([]*Label, len(list)) @@ -256,7 +282,6 @@ func UpdateLabel(l *Label) error { // DeleteLabel delete a label func DeleteLabel(id, labelID int64) error { - label, err := GetLabelByID(labelID) if err != nil { if IsErrLabelNotExist(err) { @@ -321,7 +346,7 @@ func GetLabelsByIDs(labelIDs []int64) ([]*Label, error) { return labels, x.Table("label"). In("id", labelIDs). Asc("name"). - Cols("id"). + Cols("id", "repo_id", "org_id"). Find(&labels) } @@ -445,6 +470,11 @@ func GetLabelsByRepoID(repoID int64, sortType string, listOptions ListOptions) ( return getLabelsByRepoID(x, repoID, sortType, listOptions) } +// CountLabelsByRepoID count number of all labels that belong to given repository by ID. +func CountLabelsByRepoID(repoID int64) (int64, error) { + return x.Where("repo_id = ?", repoID).Count(&Label{}) +} + // ________ // \_____ \_______ ____ // / | \_ __ \/ ___\ @@ -511,19 +541,6 @@ func GetLabelIDsInOrgByNames(orgID int64, labelNames []string) ([]int64, error) Find(&labelIDs) } -// GetLabelIDsInOrgsByNames returns a list of labelIDs by names in one of the given -// organization. -// it silently ignores label names that do not belong to the organization. -func GetLabelIDsInOrgsByNames(orgIDs []int64, labelNames []string) ([]int64, error) { - labelIDs := make([]int64, 0, len(labelNames)) - return labelIDs, x.Table("label"). - In("org_id", orgIDs). - In("name", labelNames). - Asc("name"). - Cols("id"). - Find(&labelIDs) -} - // GetLabelInOrgByID returns a label by ID in given organization. func GetLabelInOrgByID(orgID, labelID int64) (*Label, error) { return getLabelInOrgByID(x, orgID, labelID) @@ -570,6 +587,11 @@ func GetLabelsByOrgID(orgID int64, sortType string, listOptions ListOptions) ([] return getLabelsByOrgID(x, orgID, sortType, listOptions) } +// CountLabelsByOrgID count all labels that belong to given organization by ID. +func CountLabelsByOrgID(orgID int64) (int64, error) { + return x.Where("org_id = ?", orgID).Count(&Label{}) +} + // .___ // | | ______ ________ __ ____ // | |/ ___// ___/ | \_/ __ \ @@ -632,6 +654,8 @@ func HasIssueLabel(issueID, labelID int64) bool { return hasIssueLabel(x, issueID, labelID) } +// newIssueLabel this function creates a new label it does not check if the label is valid for the issue +// YOU MUST CHECK THIS BEFORE THIS FUNCTION func newIssueLabel(e *xorm.Session, issue *Issue, label *Label, doer *User) (err error) { if _, err = e.Insert(&IssueLabel{ IssueID: issue.ID, @@ -644,7 +668,7 @@ func newIssueLabel(e *xorm.Session, issue *Issue, label *Label, doer *User) (err return } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: CommentTypeLabel, Doer: doer, Repo: issue.Repo, @@ -671,6 +695,15 @@ func NewIssueLabel(issue *Issue, label *Label, doer *User) (err error) { return err } + if err = issue.loadRepo(sess); err != nil { + return err + } + + // Do NOT add invalid labels + if issue.RepoID != label.RepoID && issue.Repo.OwnerID != label.OrgID { + return nil + } + if err = newIssueLabel(sess, issue, label, doer); err != nil { return err } @@ -683,13 +716,19 @@ func NewIssueLabel(issue *Issue, label *Label, doer *User) (err error) { return sess.Commit() } +// newIssueLabels add labels to an issue. It will check if the labels are valid for the issue func newIssueLabels(e *xorm.Session, issue *Issue, labels []*Label, doer *User) (err error) { - for i := range labels { - if hasIssueLabel(e, issue.ID, labels[i].ID) { + if err = issue.loadRepo(e); err != nil { + return err + } + for _, label := range labels { + // Don't add already present labels and invalid labels + if hasIssueLabel(e, issue.ID, label.ID) || + (label.RepoID != issue.RepoID && label.OrgID != issue.Repo.OwnerID) { continue } - if err = newIssueLabel(e, issue, labels[i], doer); err != nil { + if err = newIssueLabel(e, issue, label, doer); err != nil { return fmt.Errorf("newIssueLabel: %v", err) } } @@ -731,7 +770,7 @@ func deleteIssueLabel(e *xorm.Session, issue *Issue, label *Label, doer *User) ( return } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: CommentTypeLabel, Doer: doer, Repo: issue.Repo, @@ -764,3 +803,15 @@ func DeleteIssueLabel(issue *Issue, label *Label, doer *User) (err error) { return sess.Commit() } + +func deleteLabelsByRepoID(sess Engine, repoID int64) error { + deleteCond := builder.Select("id").From("label").Where(builder.Eq{"label.repo_id": repoID}) + + if _, err := sess.In("label_id", deleteCond). + Delete(&IssueLabel{}); err != nil { + return err + } + + _, err := sess.Delete(&Label{RepoID: repoID}) + return err +} diff --git a/models/issue_label_test.go b/models/issue_label_test.go index b3fe4d877..3dde1a406 100644 --- a/models/issue_label_test.go +++ b/models/issue_label_test.go @@ -135,7 +135,7 @@ func TestGetLabelsByRepoID(t *testing.T) { testSuccess(1, "default", []int64{1, 2}) } -// Org vrsions +// Org versions func TestGetLabelInOrgByName(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) @@ -231,7 +231,6 @@ func TestGetLabelsByOrgID(t *testing.T) { _, err = GetLabelsByOrgID(-1, "leastissues", ListOptions{}) assert.True(t, IsErrOrgLabelNotExist(err)) - } // diff --git a/models/issue_list.go b/models/issue_list.go index 628058eb3..87ad318dc 100644 --- a/models/issue_list.go +++ b/models/issue_list.go @@ -35,9 +35,9 @@ func (issues IssueList) loadRepositories(e Engine) ([]*Repository, error) { repoIDs := issues.getRepoIDs() repoMaps := make(map[int64]*Repository, len(repoIDs)) - var left = len(repoIDs) + left := len(repoIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -53,6 +53,9 @@ func (issues IssueList) loadRepositories(e Engine) ([]*Repository, error) { for _, issue := range issues { issue.Repo = repoMaps[issue.RepoID] + if issue.PullRequest != nil { + issue.PullRequest.BaseRepo = issue.Repo + } } return valuesRepository(repoMaps), nil } @@ -79,9 +82,9 @@ func (issues IssueList) loadPosters(e Engine) error { posterIDs := issues.getPosterIDs() posterMaps := make(map[int64]*User, len(posterIDs)) - var left = len(posterIDs) + left := len(posterIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -108,7 +111,7 @@ func (issues IssueList) loadPosters(e Engine) error { } func (issues IssueList) getIssueIDs() []int64 { - var ids = make([]int64, 0, len(issues)) + ids := make([]int64, 0, len(issues)) for _, issue := range issues { ids = append(ids, issue.ID) } @@ -125,11 +128,11 @@ func (issues IssueList) loadLabels(e Engine) error { IssueLabel *IssueLabel `xorm:"extends"` } - var issueLabels = make(map[int64][]*Label, len(issues)*3) - var issueIDs = issues.getIssueIDs() - var left = len(issueIDs) + issueLabels := make(map[int64][]*Label, len(issues)*3) + issueIDs := issues.getIssueIDs() + left := len(issueIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -169,7 +172,7 @@ func (issues IssueList) loadLabels(e Engine) error { } func (issues IssueList) getMilestoneIDs() []int64 { - var ids = make(map[int64]struct{}, len(issues)) + ids := make(map[int64]struct{}, len(issues)) for _, issue := range issues { if _, ok := ids[issue.MilestoneID]; !ok { ids[issue.MilestoneID] = struct{}{} @@ -185,9 +188,9 @@ func (issues IssueList) loadMilestones(e Engine) error { } milestoneMaps := make(map[int64]*Milestone, len(milestoneIDs)) - var left = len(milestoneIDs) + left := len(milestoneIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -217,11 +220,11 @@ func (issues IssueList) loadAssignees(e Engine) error { Assignee *User `xorm:"extends"` } - var assignees = make(map[int64][]*User, len(issues)) - var issueIDs = issues.getIssueIDs() - var left = len(issueIDs) + assignees := make(map[int64][]*User, len(issues)) + issueIDs := issues.getIssueIDs() + left := len(issueIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -259,7 +262,7 @@ func (issues IssueList) loadAssignees(e Engine) error { } func (issues IssueList) getPullIssueIDs() []int64 { - var ids = make([]int64, 0, len(issues)) + ids := make([]int64, 0, len(issues)) for _, issue := range issues { if issue.IsPull && issue.PullRequest == nil { ids = append(ids, issue.ID) @@ -275,9 +278,9 @@ func (issues IssueList) loadPullRequests(e Engine) error { } pullRequestMaps := make(map[int64]*PullRequest, len(issuesIDs)) - var left = len(issuesIDs) + left := len(issuesIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -317,11 +320,11 @@ func (issues IssueList) loadAttachments(e Engine) (err error) { return nil } - var attachments = make(map[int64][]*Attachment, len(issues)) - var issuesIDs = issues.getIssueIDs() - var left = len(issuesIDs) + attachments := make(map[int64][]*Attachment, len(issues)) + issuesIDs := issues.getIssueIDs() + left := len(issuesIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -362,11 +365,11 @@ func (issues IssueList) loadComments(e Engine, cond builder.Cond) (err error) { return nil } - var comments = make(map[int64][]*Comment, len(issues)) - var issuesIDs = issues.getIssueIDs() - var left = len(issuesIDs) + comments := make(map[int64][]*Comment, len(issues)) + issuesIDs := issues.getIssueIDs() + left := len(issuesIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -411,18 +414,18 @@ func (issues IssueList) loadTotalTrackedTimes(e Engine) (err error) { if len(issues) == 0 { return nil } - var trackedTimes = make(map[int64]int64, len(issues)) + trackedTimes := make(map[int64]int64, len(issues)) - var ids = make([]int64, 0, len(issues)) + ids := make([]int64, 0, len(issues)) for _, issue := range issues { if issue.Repo.IsTimetrackerEnabled() { ids = append(ids, issue.ID) } } - var left = len(ids) + left := len(ids) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -516,6 +519,11 @@ func (issues IssueList) LoadDiscussComments() error { return issues.loadComments(x, builder.Eq{"comment.type": CommentTypeComment}) } +// LoadPullRequests loads pull requests +func (issues IssueList) LoadPullRequests() error { + return issues.loadPullRequests(x) +} + // GetApprovalCounts returns a map of issue ID to slice of approval counts // FIXME: only returns official counts due to double counting of non-official approvals func (issues IssueList) GetApprovalCounts() (map[int64][]*ReviewCount, error) { @@ -530,7 +538,7 @@ func (issues IssueList) getApprovalCounts(e Engine) (map[int64][]*ReviewCount, e } sess := e.In("issue_id", ids) err := sess.Select("issue_id, type, count(id) as `count`"). - Where("official = ?", true). + Where("official = ? AND dismissed = ?", true, false). GroupBy("issue_id, type"). OrderBy("issue_id"). Table("review"). diff --git a/models/issue_lock.go b/models/issue_lock.go index 77f9bf08b..78b2c5cdb 100644 --- a/models/issue_lock.go +++ b/models/issue_lock.go @@ -45,7 +45,7 @@ func updateIssueLock(opts *IssueLockOptions, lock bool) error { return err } - var opt = &CreateCommentOptions{ + opt := &CreateCommentOptions{ Doer: opts.Doer, Issue: opts.Issue, Repo: opts.Issue.Repo, diff --git a/models/issue_milestone.go b/models/issue_milestone.go index 5c34834e2..e6976a46c 100644 --- a/models/issue_milestone.go +++ b/models/issue_milestone.go @@ -63,8 +63,10 @@ func (m *Milestone) AfterLoad() { } m.DeadlineString = m.DeadlineUnix.Format("2006-01-02") - if timeutil.TimeStampNow() >= m.DeadlineUnix { - m.IsOverdue = true + if m.IsClosed { + m.IsOverdue = m.ClosedDateUnix >= m.DeadlineUnix + } else { + m.IsOverdue = timeutil.TimeStampNow() >= m.DeadlineUnix } } @@ -127,8 +129,12 @@ func GetMilestoneByRepoIDANDName(repoID int64, name string) (*Milestone, error) // GetMilestoneByID returns the milestone via id . func GetMilestoneByID(id int64) (*Milestone, error) { + return getMilestoneByID(x, id) +} + +func getMilestoneByID(e Engine, id int64) (*Milestone, error) { var m Milestone - has, err := x.ID(id).Get(&m) + has, err := e.ID(id).Get(&m) if err != nil { return nil, err } else if !has { @@ -153,10 +159,6 @@ func UpdateMilestone(m *Milestone, oldIsClosed bool) error { return err } - if err := updateMilestoneCompleteness(sess, m.ID); err != nil { - return err - } - // if IsClosed changed, update milestone numbers of repository if oldIsClosed != m.IsClosed { if err := updateRepoMilestoneNum(sess, m.RepoID); err != nil { @@ -169,23 +171,31 @@ func UpdateMilestone(m *Milestone, oldIsClosed bool) error { func updateMilestone(e Engine, m *Milestone) error { m.Name = strings.TrimSpace(m.Name) - _, err := e.ID(m.ID).AllCols(). + _, err := e.ID(m.ID).AllCols().Update(m) + if err != nil { + return err + } + return updateMilestoneCounters(e, m.ID) +} + +// updateMilestoneCounters calculates NumIssues, NumClosesIssues and Completeness +func updateMilestoneCounters(e Engine, id int64) error { + _, err := e.ID(id). SetExpr("num_issues", builder.Select("count(*)").From("issue").Where( - builder.Eq{"milestone_id": m.ID}, + builder.Eq{"milestone_id": id}, )). SetExpr("num_closed_issues", builder.Select("count(*)").From("issue").Where( builder.Eq{ - "milestone_id": m.ID, + "milestone_id": id, "is_closed": true, }, )). - Update(m) - return err -} - -func updateMilestoneCompleteness(e Engine, milestoneID int64) error { - _, err := e.Exec("UPDATE `milestone` SET completeness=100*num_closed_issues/(CASE WHEN num_issues > 0 THEN num_issues ELSE 1 END) WHERE id=?", - milestoneID, + Update(&Milestone{}) + if err != nil { + return err + } + _, err = e.Exec("UPDATE `milestone` SET completeness=100*num_closed_issues/(CASE WHEN num_issues > 0 THEN num_issues ELSE 1 END) WHERE id=?", + id, ) return err } @@ -254,25 +264,15 @@ func changeMilestoneAssign(e *xorm.Session, doer *User, issue *Issue, oldMilesto } if oldMilestoneID > 0 { - if err := updateMilestoneTotalNum(e, oldMilestoneID); err != nil { + if err := updateMilestoneCounters(e, oldMilestoneID); err != nil { return err } - if issue.IsClosed { - if err := updateMilestoneClosedNum(e, oldMilestoneID); err != nil { - return err - } - } } if issue.MilestoneID > 0 { - if err := updateMilestoneTotalNum(e, issue.MilestoneID); err != nil { + if err := updateMilestoneCounters(e, issue.MilestoneID); err != nil { return err } - if issue.IsClosed { - if err := updateMilestoneClosedNum(e, issue.MilestoneID); err != nil { - return err - } - } } if oldMilestoneID > 0 || issue.MilestoneID > 0 { @@ -280,7 +280,7 @@ func changeMilestoneAssign(e *xorm.Session, doer *User, issue *Issue, oldMilesto return err } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: CommentTypeMilestone, Doer: doer, Repo: issue.Repo, @@ -364,7 +364,7 @@ func DeleteMilestoneByRepoID(repoID, id int64) error { type MilestoneList []*Milestone func (milestones MilestoneList) getMilestoneIDs() []int64 { - var ids = make([]int64, 0, len(milestones)) + ids := make([]int64, 0, len(milestones)) for _, ms := range milestones { ids = append(ids, ms.ID) } @@ -380,24 +380,33 @@ type GetMilestonesOption struct { SortType string } -// GetMilestones returns milestones filtered by GetMilestonesOption's -func GetMilestones(opts GetMilestonesOption) (MilestoneList, error) { - sess := x.Where("repo_id = ?", opts.RepoID) +func (opts GetMilestonesOption) toCond() builder.Cond { + cond := builder.NewCond() + if opts.RepoID != 0 { + cond = cond.And(builder.Eq{"repo_id": opts.RepoID}) + } switch opts.State { case api.StateClosed: - sess = sess.And("is_closed = ?", true) + cond = cond.And(builder.Eq{"is_closed": true}) case api.StateAll: break // api.StateOpen: default: - sess = sess.And("is_closed = ?", false) + cond = cond.And(builder.Eq{"is_closed": false}) } if len(opts.Name) != 0 { - sess = sess.And(builder.Like{"name", opts.Name}) + cond = cond.And(builder.Like{"name", opts.Name}) } + return cond +} + +// GetMilestones returns milestones filtered by GetMilestonesOption's +func GetMilestones(opts GetMilestonesOption) (MilestoneList, int64, error) { + sess := x.Where(opts.toCond()) + if opts.Page != 0 { sess = opts.setSessionPagination(sess) } @@ -420,13 +429,17 @@ func GetMilestones(opts GetMilestonesOption) (MilestoneList, error) { } miles := make([]*Milestone, 0, opts.PageSize) - return miles, sess.Find(&miles) + total, err := sess.FindAndCount(&miles) + return miles, total, err } // SearchMilestones search milestones -func SearchMilestones(repoCond builder.Cond, page int, isClosed bool, sortType string) (MilestoneList, error) { +func SearchMilestones(repoCond builder.Cond, page int, isClosed bool, sortType string, keyword string) (MilestoneList, error) { miles := make([]*Milestone, 0, setting.UI.IssuePagingNum) sess := x.Where("is_closed = ?", isClosed) + if len(keyword) > 0 { + sess = sess.And(builder.Like{"UPPER(name)", strings.ToUpper(keyword)}) + } if repoCond.IsValid() { sess.In("repo_id", builder.Select("id").From("repository").Where(repoCond)) } @@ -458,6 +471,7 @@ func GetMilestonesByRepoIDs(repoIDs []int64, page int, isClosed bool, sortType s page, isClosed, sortType, + "", ) } @@ -504,6 +518,38 @@ func GetMilestonesStatsByRepoCond(repoCond builder.Cond) (*MilestonesStats, erro return stats, nil } +// GetMilestonesStatsByRepoCondAndKw returns milestone statistic information for dashboard by given repo conditions and name keyword. +func GetMilestonesStatsByRepoCondAndKw(repoCond builder.Cond, keyword string) (*MilestonesStats, error) { + var err error + stats := &MilestonesStats{} + + sess := x.Where("is_closed = ?", false) + if len(keyword) > 0 { + sess = sess.And(builder.Like{"UPPER(name)", strings.ToUpper(keyword)}) + } + if repoCond.IsValid() { + sess.And(builder.In("repo_id", builder.Select("id").From("repository").Where(repoCond))) + } + stats.OpenCount, err = sess.Count(new(Milestone)) + if err != nil { + return nil, err + } + + sess = x.Where("is_closed = ?", true) + if len(keyword) > 0 { + sess = sess.And(builder.Like{"UPPER(name)", strings.ToUpper(keyword)}) + } + if repoCond.IsValid() { + sess.And(builder.In("repo_id", builder.Select("id").From("repository").Where(repoCond))) + } + stats.ClosedCount, err = sess.Count(new(Milestone)) + if err != nil { + return nil, err + } + + return stats, nil +} + func countRepoMilestones(e Engine, repoID int64) (int64, error) { return e. Where("repo_id=?", repoID). @@ -546,6 +592,34 @@ func CountMilestonesByRepoCond(repoCond builder.Cond, isClosed bool) (map[int64] return countMap, nil } +// CountMilestonesByRepoCondAndKw map from repo conditions and the keyword of milestones' name to number of milestones matching the options` +func CountMilestonesByRepoCondAndKw(repoCond builder.Cond, keyword string, isClosed bool) (map[int64]int64, error) { + sess := x.Where("is_closed = ?", isClosed) + if len(keyword) > 0 { + sess = sess.And(builder.Like{"UPPER(name)", strings.ToUpper(keyword)}) + } + if repoCond.IsValid() { + sess.In("repo_id", builder.Select("id").From("repository").Where(repoCond)) + } + + countsSlice := make([]*struct { + RepoID int64 + Count int64 + }, 0, 10) + if err := sess.GroupBy("repo_id"). + Select("repo_id AS repo_id, COUNT(*) AS count"). + Table("milestone"). + Find(&countsSlice); err != nil { + return nil, err + } + + countMap := make(map[int64]int64, len(countsSlice)) + for _, c := range countsSlice { + countMap[c.RepoID] = c.Count + } + return countMap, nil +} + func updateRepoMilestoneNum(e Engine, repoID int64) error { _, err := e.Exec("UPDATE `repository` SET num_milestones=(SELECT count(*) FROM milestone WHERE repo_id=?),num_closed_milestones=(SELECT count(*) FROM milestone WHERE repo_id=? AND is_closed=?) WHERE id=?", repoID, @@ -556,29 +630,6 @@ func updateRepoMilestoneNum(e Engine, repoID int64) error { return err } -func updateMilestoneTotalNum(e Engine, milestoneID int64) (err error) { - if _, err = e.Exec("UPDATE `milestone` SET num_issues=(SELECT count(*) FROM issue WHERE milestone_id=?) WHERE id=?", - milestoneID, - milestoneID, - ); err != nil { - return - } - - return updateMilestoneCompleteness(e, milestoneID) -} - -func updateMilestoneClosedNum(e Engine, milestoneID int64) (err error) { - if _, err = e.Exec("UPDATE `milestone` SET num_closed_issues=(SELECT count(*) FROM issue WHERE milestone_id=? AND is_closed=?) WHERE id=?", - milestoneID, - true, - milestoneID, - ); err != nil { - return - } - - return updateMilestoneCompleteness(e, milestoneID) -} - // _____ _ _ _____ _ // |_ _| __ __ _ ___| | _____ __| |_ _(_)_ __ ___ ___ ___ // | || '__/ _` |/ __| |/ / _ \/ _` | | | | | '_ ` _ \ / _ \/ __| @@ -594,7 +645,7 @@ func (milestones MilestoneList) loadTotalTrackedTimes(e Engine) error { if len(milestones) == 0 { return nil } - var trackedTimes = make(map[int64]int64, len(milestones)) + trackedTimes := make(map[int64]int64, len(milestones)) // Get total tracked time by milestone_id rows, err := e.Table("issue"). diff --git a/models/issue_milestone_test.go b/models/issue_milestone_test.go index af264aa27..1472c951e 100644 --- a/models/issue_milestone_test.go +++ b/models/issue_milestone_test.go @@ -50,7 +50,7 @@ func TestGetMilestonesByRepoID(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) test := func(repoID int64, state api.StateType) { repo := AssertExistsAndLoadBean(t, &Repository{ID: repoID}).(*Repository) - milestones, err := GetMilestones(GetMilestonesOption{ + milestones, _, err := GetMilestones(GetMilestonesOption{ RepoID: repo.ID, State: state, }) @@ -87,7 +87,7 @@ func TestGetMilestonesByRepoID(t *testing.T) { test(3, api.StateClosed) test(3, api.StateAll) - milestones, err := GetMilestones(GetMilestonesOption{ + milestones, _, err := GetMilestones(GetMilestonesOption{ RepoID: NonexistentID, State: api.StateOpen, }) @@ -100,7 +100,7 @@ func TestGetMilestones(t *testing.T) { repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) test := func(sortType string, sortCond func(*Milestone) int) { for _, page := range []int{0, 1} { - milestones, err := GetMilestones(GetMilestonesOption{ + milestones, _, err := GetMilestones(GetMilestonesOption{ ListOptions: ListOptions{ Page: page, PageSize: setting.UI.IssuePagingNum, @@ -117,7 +117,7 @@ func TestGetMilestones(t *testing.T) { } assert.True(t, sort.IntsAreSorted(values)) - milestones, err = GetMilestones(GetMilestonesOption{ + milestones, _, err = GetMilestones(GetMilestonesOption{ ListOptions: ListOptions{ Page: page, PageSize: setting.UI.IssuePagingNum, @@ -215,7 +215,7 @@ func TestChangeMilestoneStatus(t *testing.T) { CheckConsistencyFor(t, &Repository{ID: milestone.RepoID}, &Milestone{}) } -func TestUpdateMilestoneClosedNum(t *testing.T) { +func TestUpdateMilestoneCounters(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) issue := AssertExistsAndLoadBean(t, &Issue{MilestoneID: 1}, "is_closed=0").(*Issue) @@ -224,14 +224,14 @@ func TestUpdateMilestoneClosedNum(t *testing.T) { issue.ClosedUnix = timeutil.TimeStampNow() _, err := x.ID(issue.ID).Cols("is_closed", "closed_unix").Update(issue) assert.NoError(t, err) - assert.NoError(t, updateMilestoneClosedNum(x, issue.MilestoneID)) + assert.NoError(t, updateMilestoneCounters(x, issue.MilestoneID)) CheckConsistencyFor(t, &Milestone{}) issue.IsClosed = false issue.ClosedUnix = 0 _, err = x.ID(issue.ID).Cols("is_closed", "closed_unix").Update(issue) assert.NoError(t, err) - assert.NoError(t, updateMilestoneClosedNum(x, issue.MilestoneID)) + assert.NoError(t, updateMilestoneCounters(x, issue.MilestoneID)) CheckConsistencyFor(t, &Milestone{}) } diff --git a/models/issue_reaction.go b/models/issue_reaction.go index 104afce5c..80fae1ca5 100644 --- a/models/issue_reaction.go +++ b/models/issue_reaction.go @@ -38,14 +38,14 @@ type FindReactionsOptions struct { } func (opts *FindReactionsOptions) toConds() builder.Cond { - //If Issue ID is set add to Query - var cond = builder.NewCond() + // If Issue ID is set add to Query + cond := builder.NewCond() if opts.IssueID > 0 { cond = cond.And(builder.Eq{"reaction.issue_id": opts.IssueID}) } - //If CommentID is > 0 add to Query - //If it is 0 Query ignore CommentID to select - //If it is -1 it explicit search of Issue Reactions where CommentID = 0 + // If CommentID is > 0 add to Query + // If it is 0 Query ignore CommentID to select + // If it is -1 it explicit search of Issue Reactions where CommentID = 0 if opts.CommentID > 0 { cond = cond.And(builder.Eq{"reaction.comment_id": opts.CommentID}) } else if opts.CommentID == -1 { @@ -68,7 +68,8 @@ func (opts *FindReactionsOptions) toConds() builder.Cond { func FindCommentReactions(comment *Comment) (ReactionList, error) { return findReactions(x, FindReactionsOptions{ IssueID: comment.IssueID, - CommentID: comment.ID}) + CommentID: comment.ID, + }) } // FindIssueReactions returns a ReactionList of all reactions from an issue @@ -178,11 +179,15 @@ func CreateCommentReaction(doer *User, issue *Issue, comment *Comment, content s }) } -func deleteReaction(e *xorm.Session, opts *ReactionOptions) error { +func deleteReaction(e Engine, opts *ReactionOptions) error { reaction := &Reaction{ - Type: opts.Type, - UserID: opts.Doer.ID, - IssueID: opts.Issue.ID, + Type: opts.Type, + } + if opts.Doer != nil { + reaction.UserID = opts.Doer.ID + } + if opts.Issue != nil { + reaction.IssueID = opts.Issue.ID } if opts.Comment != nil { reaction.CommentID = opts.Comment.ID @@ -256,7 +261,7 @@ func (list ReactionList) HasUser(userID int64) bool { // GroupByType returns reactions grouped by type func (list ReactionList) GroupByType() map[string]ReactionList { - var reactions = make(map[string]ReactionList) + reactions := make(map[string]ReactionList) for _, reaction := range list { reactions[reaction.Type] = append(reactions[reaction.Type], reaction) } @@ -310,7 +315,7 @@ func (list ReactionList) LoadUsers(repo *Repository) ([]*User, error) { // GetFirstUsers returns first reacted user display names separated by comma func (list ReactionList) GetFirstUsers() string { var buffer bytes.Buffer - var rem = setting.UI.ReactionMaxUserNum + rem := setting.UI.ReactionMaxUserNum for _, reaction := range list { if buffer.Len() > 0 { buffer.WriteString(", ") diff --git a/models/issue_stopwatch.go b/models/issue_stopwatch.go index 4b2bf1505..9322e26bf 100644 --- a/models/issue_stopwatch.go +++ b/models/issue_stopwatch.go @@ -9,6 +9,8 @@ import ( "time" "code.gitea.io/gitea/modules/timeutil" + + "xorm.io/xorm" ) // Stopwatch represents a stopwatch for time tracking. @@ -19,6 +21,16 @@ type Stopwatch struct { CreatedUnix timeutil.TimeStamp `xorm:"created"` } +// Seconds returns the amount of time passed since creation, based on local server time +func (s Stopwatch) Seconds() int64 { + return int64(timeutil.TimeStampNow() - s.CreatedUnix) +} + +// Duration returns a human-readable duration string based on local server time +func (s Stopwatch) Duration() string { + return SecToTime(s.Seconds()) +} + func getStopwatch(e Engine, userID, issueID int64) (sw *Stopwatch, exists bool, err error) { sw = new(Stopwatch) exists, err = e. @@ -43,16 +55,25 @@ func GetUserStopwatches(userID int64, listOptions ListOptions) ([]*Stopwatch, er return sws, nil } +// CountUserStopwatches return count of all stopwatches of a user +func CountUserStopwatches(userID int64) (int64, error) { + return x.Where("user_id = ?", userID).Count(&Stopwatch{}) +} + // StopwatchExists returns true if the stopwatch exists -func StopwatchExists(userID int64, issueID int64) bool { +func StopwatchExists(userID, issueID int64) bool { _, exists, _ := getStopwatch(x, userID, issueID) return exists } // HasUserStopwatch returns true if the user has a stopwatch func HasUserStopwatch(userID int64) (exists bool, sw *Stopwatch, err error) { + return hasUserStopwatch(x, userID) +} + +func hasUserStopwatch(e Engine, userID int64) (exists bool, sw *Stopwatch, err error) { sw = new(Stopwatch) - exists, err = x. + exists, err = e. Where("user_id = ?", userID). Get(sw) return @@ -60,11 +81,23 @@ func HasUserStopwatch(userID int64) (exists bool, sw *Stopwatch, err error) { // CreateOrStopIssueStopwatch will create or remove a stopwatch and will log it into issue's timeline. func CreateOrStopIssueStopwatch(user *User, issue *Issue) error { - sw, exists, err := getStopwatch(x, user.ID, issue.ID) + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + if err := createOrStopIssueStopwatch(sess, user, issue); err != nil { + return err + } + return sess.Commit() +} + +func createOrStopIssueStopwatch(e *xorm.Session, user *User, issue *Issue) error { + sw, exists, err := getStopwatch(e, user.ID, issue.ID) if err != nil { return err } - if err := issue.loadRepo(x); err != nil { + if err := issue.loadRepo(e); err != nil { return err } @@ -80,34 +113,35 @@ func CreateOrStopIssueStopwatch(user *User, issue *Issue) error { Time: timediff, } - if _, err := x.Insert(tt); err != nil { + if _, err := e.Insert(tt); err != nil { return err } - if _, err := CreateComment(&CreateCommentOptions{ + if _, err := createComment(e, &CreateCommentOptions{ Doer: user, Issue: issue, Repo: issue.Repo, Content: SecToTime(timediff), Type: CommentTypeStopTracking, + TimeID: tt.ID, }); err != nil { return err } - if _, err := x.Delete(sw); err != nil { + if _, err := e.Delete(sw); err != nil { return err } } else { - //if another stopwatch is running: stop it - exists, sw, err := HasUserStopwatch(user.ID) + // if another stopwatch is running: stop it + exists, sw, err := hasUserStopwatch(e, user.ID) if err != nil { return err } if exists { - issue, err := getIssueByID(x, sw.IssueID) + issue, err := getIssueByID(e, sw.IssueID) if err != nil { return err } - if err := CreateOrStopIssueStopwatch(user, issue); err != nil { + if err := createOrStopIssueStopwatch(e, user, issue); err != nil { return err } } @@ -118,11 +152,11 @@ func CreateOrStopIssueStopwatch(user *User, issue *Issue) error { IssueID: issue.ID, } - if _, err := x.Insert(sw); err != nil { + if _, err := e.Insert(sw); err != nil { return err } - if _, err := CreateComment(&CreateCommentOptions{ + if _, err := createComment(e, &CreateCommentOptions{ Doer: user, Issue: issue, Repo: issue.Repo, @@ -136,21 +170,33 @@ func CreateOrStopIssueStopwatch(user *User, issue *Issue) error { // CancelStopwatch removes the given stopwatch and logs it into issue's timeline. func CancelStopwatch(user *User, issue *Issue) error { - sw, exists, err := getStopwatch(x, user.ID, issue.ID) + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + if err := cancelStopwatch(sess, user, issue); err != nil { + return err + } + return sess.Commit() +} + +func cancelStopwatch(e *xorm.Session, user *User, issue *Issue) error { + sw, exists, err := getStopwatch(e, user.ID, issue.ID) if err != nil { return err } if exists { - if _, err := x.Delete(sw); err != nil { + if _, err := e.Delete(sw); err != nil { return err } - if err := issue.loadRepo(x); err != nil { + if err := issue.loadRepo(e); err != nil { return err } - if _, err := CreateComment(&CreateCommentOptions{ + if _, err := createComment(e, &CreateCommentOptions{ Doer: user, Issue: issue, Repo: issue.Repo, diff --git a/models/issue_stopwatch_test.go b/models/issue_stopwatch_test.go index 6fc2b1ce5..b6af5e93b 100644 --- a/models/issue_stopwatch_test.go +++ b/models/issue_stopwatch_test.go @@ -67,7 +67,7 @@ func TestCreateOrStopIssueStopwatch(t *testing.T) { assert.NoError(t, CreateOrStopIssueStopwatch(user3, issue1)) sw := AssertExistsAndLoadBean(t, &Stopwatch{UserID: 3, IssueID: 1}).(*Stopwatch) - assert.Equal(t, true, sw.CreatedUnix <= timeutil.TimeStampNow()) + assert.LessOrEqual(t, sw.CreatedUnix, timeutil.TimeStampNow()) assert.NoError(t, CreateOrStopIssueStopwatch(user2, issue2)) AssertNotExistsBean(t, &Stopwatch{UserID: 2, IssueID: 2}) diff --git a/models/issue_test.go b/models/issue_test.go index 1f65cb433..f2c9b7a68 100644 --- a/models/issue_test.go +++ b/models/issue_test.go @@ -36,6 +36,14 @@ func TestIssue_ReplaceLabels(t *testing.T) { testSuccess(1, []int64{}) } +func Test_GetIssueIDsByRepoID(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + ids, err := GetIssueIDsByRepoID(1) + assert.NoError(t, err) + assert.Len(t, ids, 5) +} + func TestIssueAPIURL(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) issue := AssertExistsAndLoadBean(t, &Issue{ID: 1}).(*Issue) @@ -47,7 +55,7 @@ func TestIssueAPIURL(t *testing.T) { func TestGetIssuesByIDs(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - testSuccess := func(expectedIssueIDs []int64, nonExistentIssueIDs []int64) { + testSuccess := func(expectedIssueIDs, nonExistentIssueIDs []int64) { issues, err := GetIssuesByIDs(append(expectedIssueIDs, nonExistentIssueIDs...)) assert.NoError(t, err) actualIssueIDs := make([]int64, len(issues)) @@ -55,7 +63,6 @@ func TestGetIssuesByIDs(t *testing.T) { actualIssueIDs[i] = issue.ID } assert.Equal(t, expectedIssueIDs, actualIssueIDs) - } testSuccess([]int64{1, 2, 3}, []int64{}) testSuccess([]int64{1, 2, 3}, []int64{NonexistentID}) @@ -87,7 +94,7 @@ func TestGetParticipantIDsByIssue(t *testing.T) { } func TestIssue_ClearLabels(t *testing.T) { - var tests = []struct { + tests := []struct { issueID int64 doerID int64 }{ @@ -299,7 +306,7 @@ func TestIssue_SearchIssueIDsByKeyword(t *testing.T) { total, ids, err = SearchIssueIDsByKeyword("for", []int64{1}, 10, 0) assert.NoError(t, err) assert.EqualValues(t, 5, total) - assert.EqualValues(t, []int64{1, 2, 3, 5, 11}, ids) + assert.ElementsMatch(t, []int64{1, 2, 3, 5, 11}, ids) // issue1's comment id 2 total, ids, err = SearchIssueIDsByKeyword("good", []int64{1}, 10, 0) @@ -338,37 +345,45 @@ func TestGetRepoIDsForIssuesOptions(t *testing.T) { } } -func testInsertIssue(t *testing.T, title, content string) { - repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) - user := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) - - var issue = Issue{ - RepoID: repo.ID, - PosterID: user.ID, - Title: title, - Content: content, - } - err := NewIssue(repo, &issue, nil, nil) - assert.NoError(t, err) - +func testInsertIssue(t *testing.T, title, content string, expectIndex int64) *Issue { var newIssue Issue - has, err := x.ID(issue.ID).Get(&newIssue) - assert.NoError(t, err) - assert.True(t, has) - assert.EqualValues(t, issue.Title, newIssue.Title) - assert.EqualValues(t, issue.Content, newIssue.Content) - // there are 5 issues and max index is 5 on repository 1, so this one should 6 - assert.EqualValues(t, 6, newIssue.Index) + t.Run(title, func(t *testing.T) { + repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) + user := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) - _, err = x.ID(issue.ID).Delete(new(Issue)) - assert.NoError(t, err) + issue := Issue{ + RepoID: repo.ID, + PosterID: user.ID, + Title: title, + Content: content, + } + err := NewIssue(repo, &issue, nil, nil) + assert.NoError(t, err) + + has, err := x.ID(issue.ID).Get(&newIssue) + assert.NoError(t, err) + assert.True(t, has) + assert.EqualValues(t, issue.Title, newIssue.Title) + assert.EqualValues(t, issue.Content, newIssue.Content) + if expectIndex > 0 { + assert.EqualValues(t, expectIndex, newIssue.Index) + } + }) + return &newIssue } func TestIssue_InsertIssue(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - testInsertIssue(t, "my issue1", "special issue's comments?") - testInsertIssue(t, `my issue2, this is my son's love \n \r \ `, "special issue's '' comments?") + // there are 5 issues and max index is 5 on repository 1, so this one should 6 + issue := testInsertIssue(t, "my issue1", "special issue's comments?", 6) + _, err := x.ID(issue.ID).Delete(new(Issue)) + assert.NoError(t, err) + + issue = testInsertIssue(t, `my issue2, this is my son's love \n \r \ `, "special issue's '' comments?", 7) + _, err = x.ID(issue.ID).Delete(new(Issue)) + assert.NoError(t, err) + } func TestIssue_ResolveMentions(t *testing.T) { diff --git a/models/issue_tracked_time.go b/models/issue_tracked_time.go index 195f3e785..e7769b41d 100644 --- a/models/issue_tracked_time.go +++ b/models/issue_tracked_time.go @@ -79,8 +79,8 @@ type FindTrackedTimesOptions struct { CreatedBeforeUnix int64 } -// ToCond will convert each condition into a xorm-Cond -func (opts *FindTrackedTimesOptions) ToCond() builder.Cond { +// toCond will convert each condition into a xorm-Cond +func (opts *FindTrackedTimesOptions) toCond() builder.Cond { cond := builder.NewCond().And(builder.Eq{"tracked_time.deleted": false}) if opts.IssueID != 0 { cond = cond.And(builder.Eq{"issue_id": opts.IssueID}) @@ -103,14 +103,14 @@ func (opts *FindTrackedTimesOptions) ToCond() builder.Cond { return cond } -// ToSession will convert the given options to a xorm Session by using the conditions from ToCond and joining with issue table if required -func (opts *FindTrackedTimesOptions) ToSession(e Engine) Engine { +// toSession will convert the given options to a xorm Session by using the conditions from toCond and joining with issue table if required +func (opts *FindTrackedTimesOptions) toSession(e Engine) Engine { sess := e if opts.RepositoryID > 0 || opts.MilestoneID > 0 { sess = e.Join("INNER", "issue", "issue.id = tracked_time.issue_id") } - sess = sess.Where(opts.ToCond()) + sess = sess.Where(opts.toCond()) if opts.Page != 0 { sess = opts.setEnginePagination(sess) @@ -119,18 +119,27 @@ func (opts *FindTrackedTimesOptions) ToSession(e Engine) Engine { return sess } -func getTrackedTimes(e Engine, options FindTrackedTimesOptions) (trackedTimes TrackedTimeList, err error) { - err = options.ToSession(e).Find(&trackedTimes) +func getTrackedTimes(e Engine, options *FindTrackedTimesOptions) (trackedTimes TrackedTimeList, err error) { + err = options.toSession(e).Find(&trackedTimes) return } // GetTrackedTimes returns all tracked times that fit to the given options. -func GetTrackedTimes(opts FindTrackedTimesOptions) (TrackedTimeList, error) { +func GetTrackedTimes(opts *FindTrackedTimesOptions) (TrackedTimeList, error) { return getTrackedTimes(x, opts) } +// CountTrackedTimes returns count of tracked times that fit to the given options. +func CountTrackedTimes(opts *FindTrackedTimesOptions) (int64, error) { + sess := x.Where(opts.toCond()) + if opts.RepositoryID > 0 || opts.MilestoneID > 0 { + sess = sess.Join("INNER", "issue", "issue.id = tracked_time.issue_id") + } + return sess.Count(&TrackedTime{}) +} + func getTrackedSeconds(e Engine, opts FindTrackedTimesOptions) (trackedSeconds int64, err error) { - return opts.ToSession(e).SumInt(&TrackedTime{}, "time") + return opts.toSession(e).SumInt(&TrackedTime{}, "time") } // GetTrackedSeconds return sum of seconds @@ -162,6 +171,7 @@ func AddTime(user *User, issue *Issue, amount int64, created time.Time) (*Tracke Doer: user, Content: SecToTime(amount), Type: CommentTypeAddTimeManual, + TimeID: t.ID, }); err != nil { return nil, err } @@ -187,19 +197,19 @@ func addTime(e Engine, user *User, issue *Issue, amount int64, created time.Time } // TotalTimes returns the spent time for each user by an issue -func TotalTimes(options FindTrackedTimesOptions) (map[*User]string, error) { +func TotalTimes(options *FindTrackedTimesOptions) (map[*User]string, error) { trackedTimes, err := GetTrackedTimes(options) if err != nil { return nil, err } - //Adding total time per user ID + // Adding total time per user ID totalTimesByUser := make(map[int64]int64) for _, t := range trackedTimes { totalTimesByUser[t.UserID] += t.Time } totalTimes := make(map[*User]string) - //Fetching User and making time human readable + // Fetching User and making time human readable for userID, total := range totalTimesByUser { user, err := GetUserByID(userID) if err != nil { @@ -282,13 +292,12 @@ func DeleteTime(t *TrackedTime) error { } func deleteTimes(e Engine, opts FindTrackedTimesOptions) (removedTime int64, err error) { - removedTime, err = getTrackedSeconds(e, opts) if err != nil || removedTime == 0 { return } - _, err = opts.ToSession(e).Table("tracked_time").Cols("deleted").Update(&TrackedTime{Deleted: true}) + _, err = opts.toSession(e).Table("tracked_time").Cols("deleted").Update(&TrackedTime{Deleted: true}) return } diff --git a/models/issue_tracked_time_test.go b/models/issue_tracked_time_test.go index 551c918d7..9de1dd699 100644 --- a/models/issue_tracked_time_test.go +++ b/models/issue_tracked_time_test.go @@ -20,7 +20,7 @@ func TestAddTime(t *testing.T) { issue1, err := GetIssueByID(1) assert.NoError(t, err) - //3661 = 1h 1min 1s + // 3661 = 1h 1min 1s trackedTime, err := AddTime(user3, issue1, 3661, time.Now()) assert.NoError(t, err) assert.Equal(t, int64(3), trackedTime.UserID) @@ -38,27 +38,27 @@ func TestGetTrackedTimes(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) // by Issue - times, err := GetTrackedTimes(FindTrackedTimesOptions{IssueID: 1}) + times, err := GetTrackedTimes(&FindTrackedTimesOptions{IssueID: 1}) assert.NoError(t, err) assert.Len(t, times, 1) assert.Equal(t, int64(400), times[0].Time) - times, err = GetTrackedTimes(FindTrackedTimesOptions{IssueID: -1}) + times, err = GetTrackedTimes(&FindTrackedTimesOptions{IssueID: -1}) assert.NoError(t, err) assert.Len(t, times, 0) // by User - times, err = GetTrackedTimes(FindTrackedTimesOptions{UserID: 1}) + times, err = GetTrackedTimes(&FindTrackedTimesOptions{UserID: 1}) assert.NoError(t, err) assert.Len(t, times, 3) assert.Equal(t, int64(400), times[0].Time) - times, err = GetTrackedTimes(FindTrackedTimesOptions{UserID: 3}) + times, err = GetTrackedTimes(&FindTrackedTimesOptions{UserID: 3}) assert.NoError(t, err) assert.Len(t, times, 0) // by Repo - times, err = GetTrackedTimes(FindTrackedTimesOptions{RepositoryID: 2}) + times, err = GetTrackedTimes(&FindTrackedTimesOptions{RepositoryID: 2}) assert.NoError(t, err) assert.Len(t, times, 3) assert.Equal(t, int64(1), times[0].Time) @@ -66,11 +66,11 @@ func TestGetTrackedTimes(t *testing.T) { assert.NoError(t, err) assert.Equal(t, issue.RepoID, int64(2)) - times, err = GetTrackedTimes(FindTrackedTimesOptions{RepositoryID: 1}) + times, err = GetTrackedTimes(&FindTrackedTimesOptions{RepositoryID: 1}) assert.NoError(t, err) assert.Len(t, times, 5) - times, err = GetTrackedTimes(FindTrackedTimesOptions{RepositoryID: 10}) + times, err = GetTrackedTimes(&FindTrackedTimesOptions{RepositoryID: 10}) assert.NoError(t, err) assert.Len(t, times, 0) } @@ -78,7 +78,7 @@ func TestGetTrackedTimes(t *testing.T) { func TestTotalTimes(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - total, err := TotalTimes(FindTrackedTimesOptions{IssueID: 1}) + total, err := TotalTimes(&FindTrackedTimesOptions{IssueID: 1}) assert.NoError(t, err) assert.Len(t, total, 1) for user, time := range total { @@ -86,7 +86,7 @@ func TestTotalTimes(t *testing.T) { assert.Equal(t, "6min 40s", time) } - total, err = TotalTimes(FindTrackedTimesOptions{IssueID: 2}) + total, err = TotalTimes(&FindTrackedTimesOptions{IssueID: 2}) assert.NoError(t, err) assert.Len(t, total, 2) for user, time := range total { @@ -99,7 +99,7 @@ func TestTotalTimes(t *testing.T) { } } - total, err = TotalTimes(FindTrackedTimesOptions{IssueID: 5}) + total, err = TotalTimes(&FindTrackedTimesOptions{IssueID: 5}) assert.NoError(t, err) assert.Len(t, total, 1) for user, time := range total { @@ -107,7 +107,7 @@ func TestTotalTimes(t *testing.T) { assert.Equal(t, "1s", time) } - total, err = TotalTimes(FindTrackedTimesOptions{IssueID: 4}) + total, err = TotalTimes(&FindTrackedTimesOptions{IssueID: 4}) assert.NoError(t, err) assert.Len(t, total, 2) } diff --git a/models/issue_watch.go b/models/issue_watch.go index 9a2985fb6..a3cbbf2c1 100644 --- a/models/issue_watch.go +++ b/models/issue_watch.go @@ -119,7 +119,7 @@ func getIssueWatchers(e Engine, issueID int64, listOptions ListOptions) (IssueWa return watches, sess.Find(&watches) } -func removeIssueWatchersByRepoID(e Engine, userID int64, repoID int64) error { +func removeIssueWatchersByRepoID(e Engine, userID, repoID int64) error { _, err := e. Join("INNER", "issue", "`issue`.id = `issue_watch`.issue_id AND `issue`.repo_id = ?", repoID). Where("`issue_watch`.user_id = ?", userID). diff --git a/models/issue_watch_test.go b/models/issue_watch_test.go index 762b1486c..013ca67e1 100644 --- a/models/issue_watch_test.go +++ b/models/issue_watch_test.go @@ -32,7 +32,7 @@ func TestGetIssueWatch(t *testing.T) { iw, exists, err := GetIssueWatch(2, 2) assert.True(t, exists) assert.NoError(t, err) - assert.EqualValues(t, false, iw.IsWatching) + assert.False(t, iw.IsWatching) _, exists, err = GetIssueWatch(3, 1) assert.False(t, exists) diff --git a/models/issue_xref.go b/models/issue_xref.go index 7834b6ecc..fc8dd70f7 100644 --- a/models/issue_xref.go +++ b/models/issue_xref.go @@ -27,7 +27,7 @@ type crossReferencesContext struct { RemoveOld bool } -func findOldCrossReferences(e Engine, issueID int64, commentID int64) ([]*Comment, error) { +func findOldCrossReferences(e Engine, issueID, commentID int64) ([]*Comment, error) { active := make([]*Comment, 0, 10) return active, e.Where("`ref_action` IN (?, ?, ?)", references.XRefActionNone, references.XRefActionCloses, references.XRefActionReopens). And("`ref_issue_id` = ?", issueID). @@ -35,7 +35,7 @@ func findOldCrossReferences(e Engine, issueID int64, commentID int64) ([]*Commen Find(&active) } -func neuterCrossReferences(e Engine, issueID int64, commentID int64) error { +func neuterCrossReferences(e Engine, issueID, commentID int64) error { active, err := findOldCrossReferences(e, issueID, commentID) if err != nil { return err @@ -115,7 +115,7 @@ func (issue *Issue) createCrossReferences(e *xorm.Session, ctx *crossReferencesC if ctx.OrigComment != nil { refCommentID = ctx.OrigComment.ID } - var opts = &CreateCommentOptions{ + opts := &CreateCommentOptions{ Type: ctx.Type, Doer: ctx.Doer, Repo: xref.Issue.Repo, @@ -194,7 +194,6 @@ func (issue *Issue) updateCrossReferenceList(list []*crossReference, xref *cross // verifyReferencedIssue will check if the referenced issue exists, and whether the doer has permission to do what func (issue *Issue) verifyReferencedIssue(e Engine, ctx *crossReferencesContext, repo *Repository, ref references.IssueReference) (*Issue, references.XRefAction, error) { - refIssue := &Issue{RepoID: repo.ID, Index: ref.Index} refAction := ref.Action @@ -291,6 +290,9 @@ func CommentTypeIsRef(t CommentType) bool { // RefCommentHTMLURL returns the HTML URL for the comment that created this reference func (comment *Comment) RefCommentHTMLURL() string { + if comment.RefCommentID == 0 { + return "" + } if err := comment.LoadRefComment(); err != nil { // Silently dropping errors :unamused: log.Error("LoadRefComment(%d): %v", comment.RefCommentID, err) return "" diff --git a/models/issue_xref_test.go b/models/issue_xref_test.go index 936d1124b..a2d1a4b11 100644 --- a/models/issue_xref_test.go +++ b/models/issue_xref_test.go @@ -25,7 +25,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { ref := AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: pr.ID, RefCommentID: 0}).(*Comment) assert.Equal(t, CommentTypePullRef, ref.Type) assert.Equal(t, pr.RepoID, ref.RefRepoID) - assert.Equal(t, true, ref.RefIsPull) + assert.True(t, ref.RefIsPull) assert.Equal(t, references.XRefActionCloses, ref.RefAction) // Comment on PR to reopen issue #1 @@ -34,7 +34,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { ref = AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: pr.ID, RefCommentID: c.ID}).(*Comment) assert.Equal(t, CommentTypeCommentRef, ref.Type) assert.Equal(t, pr.RepoID, ref.RefRepoID) - assert.Equal(t, true, ref.RefIsPull) + assert.True(t, ref.RefIsPull) assert.Equal(t, references.XRefActionReopens, ref.RefAction) // Issue mentioning issue #1 @@ -43,7 +43,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { ref = AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}).(*Comment) assert.Equal(t, CommentTypeIssueRef, ref.Type) assert.Equal(t, pr.RepoID, ref.RefRepoID) - assert.Equal(t, false, ref.RefIsPull) + assert.False(t, ref.RefIsPull) assert.Equal(t, references.XRefActionNone, ref.RefAction) // Issue #4 to test against @@ -55,7 +55,7 @@ func TestXRef_AddCrossReferences(t *testing.T) { ref = AssertExistsAndLoadBean(t, &Comment{IssueID: itarget.ID, RefIssueID: i.ID, RefCommentID: 0}).(*Comment) assert.Equal(t, CommentTypeIssueRef, ref.Type) assert.Equal(t, i.RepoID, ref.RefRepoID) - assert.Equal(t, false, ref.RefIsPull) + assert.False(t, ref.RefIsPull) assert.Equal(t, references.XRefActionNone, ref.RefAction) // Cross-reference to issue #4 with no permission @@ -125,12 +125,27 @@ func TestXRef_ResolveCrossReferences(t *testing.T) { func testCreateIssue(t *testing.T, repo, doer int64, title, content string, ispull bool) *Issue { r := AssertExistsAndLoadBean(t, &Repository{ID: repo}).(*Repository) d := AssertExistsAndLoadBean(t, &User{ID: doer}).(*User) - i := &Issue{RepoID: r.ID, PosterID: d.ID, Poster: d, Title: title, Content: content, IsPull: ispull} + + idx, err := GetNextResourceIndex("issue_index", r.ID) + assert.NoError(t, err) + i := &Issue{ + RepoID: r.ID, + PosterID: d.ID, + Poster: d, + Title: title, + Content: content, + IsPull: ispull, + Index: idx, + } sess := x.NewSession() defer sess.Close() + assert.NoError(t, sess.Begin()) - _, err := sess.SetExpr("`index`", "coalesce(MAX(`index`),0)+1").Where("repo_id=?", repo).Insert(i) + err = newIssue(sess, d, NewIssueOptions{ + Repo: r, + Issue: i, + }) assert.NoError(t, err) i, err = getIssueByID(sess, i.ID) assert.NoError(t, err) diff --git a/models/lfs.go b/models/lfs.go index 274b32a73..c8abb1cd4 100644 --- a/models/lfs.go +++ b/models/lfs.go @@ -5,13 +5,9 @@ package models import ( - "crypto/sha256" - "encoding/hex" "errors" - "fmt" - "io" - "path" + "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/timeutil" "xorm.io/builder" @@ -19,28 +15,13 @@ import ( // LFSMetaObject stores metadata for LFS tracked files. type LFSMetaObject struct { - ID int64 `xorm:"pk autoincr"` - Oid string `xorm:"UNIQUE(s) INDEX NOT NULL"` - Size int64 `xorm:"NOT NULL"` + ID int64 `xorm:"pk autoincr"` + lfs.Pointer `xorm:"extends"` RepositoryID int64 `xorm:"UNIQUE(s) INDEX NOT NULL"` Existing bool `xorm:"-"` CreatedUnix timeutil.TimeStamp `xorm:"created"` } -// RelativePath returns the relative path of the lfs object -func (m *LFSMetaObject) RelativePath() string { - if len(m.Oid) < 5 { - return m.Oid - } - - return path.Join(m.Oid[0:2], m.Oid[2:4], m.Oid[4:]) -} - -// Pointer returns the string representation of an LFS pointer file -func (m *LFSMetaObject) Pointer() string { - return fmt.Sprintf("%s\n%s%s\nsize %d\n", LFSMetaFileIdentifier, LFSMetaFileOidPrefix, m.Oid, m.Size) -} - // LFSTokenResponse defines the JSON structure in which the JWT token is stored. // This structure is fetched via SSH and passed by the Git LFS client to the server // endpoint for authorization. @@ -49,20 +30,9 @@ type LFSTokenResponse struct { Href string `json:"href"` } -var ( - // ErrLFSObjectNotExist is returned from lfs models functions in order - // to differentiate between database and missing object errors. - ErrLFSObjectNotExist = errors.New("LFS Meta object does not exist") -) - -const ( - // LFSMetaFileIdentifier is the string appearing at the first line of LFS pointer files. - // https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md - LFSMetaFileIdentifier = "version https://git-lfs.github.com/spec/v1" - - // LFSMetaFileOidPrefix appears in LFS pointer files on a line before the sha256 hash. - LFSMetaFileOidPrefix = "oid sha256:" -) +// ErrLFSObjectNotExist is returned from lfs models functions in order +// to differentiate between database and missing object errors. +var ErrLFSObjectNotExist = errors.New("LFS Meta object does not exist") // NewLFSMetaObject stores a given populated LFSMetaObject structure in the database // if it is not already present. @@ -92,16 +62,6 @@ func NewLFSMetaObject(m *LFSMetaObject) (*LFSMetaObject, error) { return m, sess.Commit() } -// GenerateLFSOid generates a Sha256Sum to represent an oid for arbitrary content -func GenerateLFSOid(content io.Reader) (string, error) { - h := sha256.New() - if _, err := io.Copy(h, content); err != nil { - return "", err - } - sum := h.Sum(nil) - return hex.EncodeToString(sum), nil -} - // GetLFSMetaObjectByOid selects a LFSMetaObject entry from database by its OID. // It may return ErrLFSObjectNotExist or a database error. If the error is nil, // the returned pointer is a valid LFSMetaObject. @@ -110,7 +70,7 @@ func (repo *Repository) GetLFSMetaObjectByOid(oid string) (*LFSMetaObject, error return nil, ErrLFSObjectNotExist } - m := &LFSMetaObject{Oid: oid, RepositoryID: repo.ID} + m := &LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}, RepositoryID: repo.ID} has, err := x.Get(m) if err != nil { return nil, err @@ -133,12 +93,12 @@ func (repo *Repository) RemoveLFSMetaObjectByOid(oid string) (int64, error) { return -1, err } - m := &LFSMetaObject{Oid: oid, RepositoryID: repo.ID} + m := &LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}, RepositoryID: repo.ID} if _, err := sess.Delete(m); err != nil { return -1, err } - count, err := sess.Count(&LFSMetaObject{Oid: oid}) + count, err := sess.Count(&LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}}) if err != nil { return count, err } @@ -170,12 +130,12 @@ func (repo *Repository) CountLFSMetaObjects() (int64, error) { // LFSObjectAccessible checks if a provided Oid is accessible to the user func LFSObjectAccessible(user *User, oid string) (bool, error) { if user.IsAdmin { - count, err := x.Count(&LFSMetaObject{Oid: oid}) - return (count > 0), err + count, err := x.Count(&LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}}) + return count > 0, err } cond := accessibleRepositoryCondition(user) - count, err := x.Where(cond).Join("INNER", "repository", "`lfs_meta_object`.repository_id = `repository`.id").Count(&LFSMetaObject{Oid: oid}) - return (count > 0), err + count, err := x.Where(cond).Join("INNER", "repository", "`lfs_meta_object`.repository_id = `repository`.id").Count(&LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}}) + return count > 0, err } // LFSAutoAssociate auto associates accessible LFSMetaObjects @@ -218,7 +178,7 @@ func IterateLFS(f func(mo *LFSMetaObject) error) error { var start int const batchSize = 100 for { - var mos = make([]*LFSMetaObject, 0, batchSize) + mos := make([]*LFSMetaObject, 0, batchSize) if err := x.Limit(batchSize, start).Find(&mos); err != nil { return err } diff --git a/models/lfs_lock.go b/models/lfs_lock.go index 913c54a49..6c3d7c87c 100644 --- a/models/lfs_lock.go +++ b/models/lfs_lock.go @@ -138,7 +138,7 @@ func DeleteLFSLockByID(id int64, u *User, force bool) (*LFSLock, error) { return lock, err } -//CheckLFSAccessForRepo check needed access mode base on action +// CheckLFSAccessForRepo check needed access mode base on action func CheckLFSAccessForRepo(u *User, repo *Repository, mode AccessMode) error { if u == nil { return ErrLFSUnauthorizedAction{repo.ID, "undefined", mode} diff --git a/models/list_options.go b/models/list_options.go index 091235535..ff02933f9 100644 --- a/models/list_options.go +++ b/models/list_options.go @@ -16,13 +16,13 @@ type ListOptions struct { Page int // start from 1 } -func (opts ListOptions) getPaginatedSession() *xorm.Session { +func (opts *ListOptions) getPaginatedSession() *xorm.Session { opts.setDefaultValues() return x.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize) } -func (opts ListOptions) setSessionPagination(sess *xorm.Session) *xorm.Session { +func (opts *ListOptions) setSessionPagination(sess *xorm.Session) *xorm.Session { opts.setDefaultValues() if opts.PageSize <= 0 { @@ -31,21 +31,21 @@ func (opts ListOptions) setSessionPagination(sess *xorm.Session) *xorm.Session { return sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize) } -func (opts ListOptions) setEnginePagination(e Engine) Engine { +func (opts *ListOptions) setEnginePagination(e Engine) Engine { opts.setDefaultValues() return e.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize) } // GetStartEnd returns the start and end of the ListOptions -func (opts ListOptions) GetStartEnd() (start, end int) { +func (opts *ListOptions) GetStartEnd() (start, end int) { opts.setDefaultValues() start = (opts.Page - 1) * opts.PageSize - end = start + opts.Page + end = start + opts.PageSize return } -func (opts ListOptions) setDefaultValues() { +func (opts *ListOptions) setDefaultValues() { if opts.PageSize <= 0 { opts.PageSize = setting.API.DefaultPagingNum } diff --git a/models/log.go b/models/log.go index 942dbc744..caeab094b 100644 --- a/models/log.go +++ b/models/log.go @@ -26,6 +26,8 @@ func NewXORMLogger(showSQL bool) xormlog.Logger { } } +const stackLevel = 8 + // Log a message with defined skip and at logging level func (l *XORMLogBridge) Log(skip int, level log.Level, format string, v ...interface{}) error { return l.logger.Log(skip+1, level, format, v...) @@ -33,42 +35,42 @@ func (l *XORMLogBridge) Log(skip int, level log.Level, format string, v ...inter // Debug show debug log func (l *XORMLogBridge) Debug(v ...interface{}) { - _ = l.Log(2, log.DEBUG, fmt.Sprint(v...)) + _ = l.Log(stackLevel, log.DEBUG, fmt.Sprint(v...)) } // Debugf show debug log func (l *XORMLogBridge) Debugf(format string, v ...interface{}) { - _ = l.Log(2, log.DEBUG, format, v...) + _ = l.Log(stackLevel, log.DEBUG, format, v...) } // Error show error log func (l *XORMLogBridge) Error(v ...interface{}) { - _ = l.Log(2, log.ERROR, fmt.Sprint(v...)) + _ = l.Log(stackLevel, log.ERROR, fmt.Sprint(v...)) } // Errorf show error log func (l *XORMLogBridge) Errorf(format string, v ...interface{}) { - _ = l.Log(2, log.ERROR, format, v...) + _ = l.Log(stackLevel, log.ERROR, format, v...) } // Info show information level log func (l *XORMLogBridge) Info(v ...interface{}) { - _ = l.Log(2, log.INFO, fmt.Sprint(v...)) + _ = l.Log(stackLevel, log.INFO, fmt.Sprint(v...)) } // Infof show information level log func (l *XORMLogBridge) Infof(format string, v ...interface{}) { - _ = l.Log(2, log.INFO, format, v...) + _ = l.Log(stackLevel, log.INFO, format, v...) } // Warn show warning log func (l *XORMLogBridge) Warn(v ...interface{}) { - _ = l.Log(2, log.WARN, fmt.Sprint(v...)) + _ = l.Log(stackLevel, log.WARN, fmt.Sprint(v...)) } // Warnf show warnning log func (l *XORMLogBridge) Warnf(format string, v ...interface{}) { - _ = l.Log(2, log.WARN, format, v...) + _ = l.Log(stackLevel, log.WARN, format, v...) } // Level get logger level diff --git a/models/login_source.go b/models/login_source.go index d351f1286..3a48074e9 100644 --- a/models/login_source.go +++ b/models/login_source.go @@ -6,22 +6,11 @@ package models import ( - "crypto/tls" - "encoding/json" - "errors" - "fmt" - "net/smtp" - "net/textproto" + "reflect" "strconv" - "strings" - "code.gitea.io/gitea/modules/auth/ldap" - "code.gitea.io/gitea/modules/auth/oauth2" - "code.gitea.io/gitea/modules/auth/pam" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/modules/util" "xorm.io/xorm" "xorm.io/xorm/convert" @@ -42,6 +31,16 @@ const ( LoginSSPI // 7 ) +// String returns the string name of the LoginType +func (typ LoginType) String() string { + return LoginNames[typ] +} + +// Int returns the int value of the LoginType +func (typ LoginType) Int() int { + return int(typ) +} + // LoginNames contains the name of LoginType values. var LoginNames = map[LoginType]string{ LoginLDAP: "LDAP (via BindDN)", @@ -52,123 +51,66 @@ var LoginNames = map[LoginType]string{ LoginSSPI: "SPNEGO with SSPI", } -// SecurityProtocolNames contains the name of SecurityProtocol values. -var SecurityProtocolNames = map[ldap.SecurityProtocol]string{ - ldap.SecurityProtocolUnencrypted: "Unencrypted", - ldap.SecurityProtocolLDAPS: "LDAPS", - ldap.SecurityProtocolStartTLS: "StartTLS", +// LoginConfig represents login config as far as the db is concerned +type LoginConfig interface { + convert.Conversion } -// Ensure structs implemented interface. -var ( - _ convert.Conversion = &LDAPConfig{} - _ convert.Conversion = &SMTPConfig{} - _ convert.Conversion = &PAMConfig{} - _ convert.Conversion = &OAuth2Config{} - _ convert.Conversion = &SSPIConfig{} -) - -// LDAPConfig holds configuration for LDAP login source. -type LDAPConfig struct { - *ldap.Source +// SkipVerifiable configurations provide a IsSkipVerify to check if SkipVerify is set +type SkipVerifiable interface { + IsSkipVerify() bool } -// FromDB fills up a LDAPConfig from serialized format. -func (cfg *LDAPConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, &cfg) +// HasTLSer configurations provide a HasTLS to check if TLS can be enabled +type HasTLSer interface { + HasTLS() bool } -// ToDB exports a LDAPConfig to a serialized format. -func (cfg *LDAPConfig) ToDB() ([]byte, error) { - return json.Marshal(cfg) +// UseTLSer configurations provide a HasTLS to check if TLS is enabled +type UseTLSer interface { + UseTLS() bool } -// SecurityProtocolName returns the name of configured security -// protocol. -func (cfg *LDAPConfig) SecurityProtocolName() string { - return SecurityProtocolNames[cfg.SecurityProtocol] +// SSHKeyProvider configurations provide ProvidesSSHKeys to check if they provide SSHKeys +type SSHKeyProvider interface { + ProvidesSSHKeys() bool } -// SMTPConfig holds configuration for the SMTP login source. -type SMTPConfig struct { - Auth string - Host string - Port int - AllowedDomains string `xorm:"TEXT"` - TLS bool - SkipVerify bool +// RegisterableSource configurations provide RegisterSource which needs to be run on creation +type RegisterableSource interface { + RegisterSource() error + UnregisterSource() error } -// FromDB fills up an SMTPConfig from serialized format. -func (cfg *SMTPConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, cfg) +// LoginSourceSettable configurations can have their loginSource set on them +type LoginSourceSettable interface { + SetLoginSource(*LoginSource) } -// ToDB exports an SMTPConfig to a serialized format. -func (cfg *SMTPConfig) ToDB() ([]byte, error) { - return json.Marshal(cfg) +// RegisterLoginTypeConfig register a config for a provided type +func RegisterLoginTypeConfig(typ LoginType, exemplar LoginConfig) { + if reflect.TypeOf(exemplar).Kind() == reflect.Ptr { + // Pointer: + registeredLoginConfigs[typ] = func() LoginConfig { + return reflect.New(reflect.ValueOf(exemplar).Elem().Type()).Interface().(LoginConfig) + } + return + } + + // Not a Pointer + registeredLoginConfigs[typ] = func() LoginConfig { + return reflect.New(reflect.TypeOf(exemplar)).Elem().Interface().(LoginConfig) + } } -// PAMConfig holds configuration for the PAM login source. -type PAMConfig struct { - ServiceName string // pam service (e.g. system-auth) -} - -// FromDB fills up a PAMConfig from serialized format. -func (cfg *PAMConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, &cfg) -} - -// ToDB exports a PAMConfig to a serialized format. -func (cfg *PAMConfig) ToDB() ([]byte, error) { - return json.Marshal(cfg) -} - -// OAuth2Config holds configuration for the OAuth2 login source. -type OAuth2Config struct { - Provider string - ClientID string - ClientSecret string - OpenIDConnectAutoDiscoveryURL string - CustomURLMapping *oauth2.CustomURLMapping - IconURL string -} - -// FromDB fills up an OAuth2Config from serialized format. -func (cfg *OAuth2Config) FromDB(bs []byte) error { - return json.Unmarshal(bs, cfg) -} - -// ToDB exports an SMTPConfig to a serialized format. -func (cfg *OAuth2Config) ToDB() ([]byte, error) { - return json.Marshal(cfg) -} - -// SSPIConfig holds configuration for SSPI single sign-on. -type SSPIConfig struct { - AutoCreateUsers bool - AutoActivateUsers bool - StripDomainNames bool - SeparatorReplacement string - DefaultLanguage string -} - -// FromDB fills up an SSPIConfig from serialized format. -func (cfg *SSPIConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, cfg) -} - -// ToDB exports an SSPIConfig to a serialized format. -func (cfg *SSPIConfig) ToDB() ([]byte, error) { - return json.Marshal(cfg) -} +var registeredLoginConfigs = map[LoginType]func() LoginConfig{} // LoginSource represents an external way for authorizing users. type LoginSource struct { ID int64 `xorm:"pk autoincr"` Type LoginType Name string `xorm:"UNIQUE"` - IsActived bool `xorm:"INDEX NOT NULL DEFAULT false"` + IsActive bool `xorm:"INDEX NOT NULL DEFAULT false"` IsSyncEnabled bool `xorm:"INDEX NOT NULL DEFAULT false"` Cfg convert.Conversion `xorm:"TEXT"` @@ -192,19 +134,14 @@ func Cell2Int64(val xorm.Cell) int64 { // BeforeSet is invoked from XORM before setting the value of a field of this object. func (source *LoginSource) BeforeSet(colName string, val xorm.Cell) { if colName == "type" { - switch LoginType(Cell2Int64(val)) { - case LoginLDAP, LoginDLDAP: - source.Cfg = new(LDAPConfig) - case LoginSMTP: - source.Cfg = new(SMTPConfig) - case LoginPAM: - source.Cfg = new(PAMConfig) - case LoginOAuth2: - source.Cfg = new(OAuth2Config) - case LoginSSPI: - source.Cfg = new(SSPIConfig) - default: - panic(fmt.Sprintf("unrecognized login source type: %v", *val)) + typ := LoginType(Cell2Int64(val)) + constructor, ok := registeredLoginConfigs[typ] + if !ok { + return + } + source.Cfg = constructor() + if settable, ok := source.Cfg.(LoginSourceSettable); ok { + settable.SetLoginSource(source) } } } @@ -246,59 +183,21 @@ func (source *LoginSource) IsSSPI() bool { // HasTLS returns true of this source supports TLS. func (source *LoginSource) HasTLS() bool { - return ((source.IsLDAP() || source.IsDLDAP()) && - source.LDAP().SecurityProtocol > ldap.SecurityProtocolUnencrypted) || - source.IsSMTP() + hasTLSer, ok := source.Cfg.(HasTLSer) + return ok && hasTLSer.HasTLS() } // UseTLS returns true of this source is configured to use TLS. func (source *LoginSource) UseTLS() bool { - switch source.Type { - case LoginLDAP, LoginDLDAP: - return source.LDAP().SecurityProtocol != ldap.SecurityProtocolUnencrypted - case LoginSMTP: - return source.SMTP().TLS - } - - return false + useTLSer, ok := source.Cfg.(UseTLSer) + return ok && useTLSer.UseTLS() } // SkipVerify returns true if this source is configured to skip SSL // verification. func (source *LoginSource) SkipVerify() bool { - switch source.Type { - case LoginLDAP, LoginDLDAP: - return source.LDAP().SkipVerify - case LoginSMTP: - return source.SMTP().SkipVerify - } - - return false -} - -// LDAP returns LDAPConfig for this source, if of LDAP type. -func (source *LoginSource) LDAP() *LDAPConfig { - return source.Cfg.(*LDAPConfig) -} - -// SMTP returns SMTPConfig for this source, if of SMTP type. -func (source *LoginSource) SMTP() *SMTPConfig { - return source.Cfg.(*SMTPConfig) -} - -// PAM returns PAMConfig for this source, if of PAM type. -func (source *LoginSource) PAM() *PAMConfig { - return source.Cfg.(*PAMConfig) -} - -// OAuth2 returns OAuth2Config for this source, if of OAuth2 type. -func (source *LoginSource) OAuth2() *OAuth2Config { - return source.Cfg.(*OAuth2Config) -} - -// SSPI returns SSPIConfig for this source, if of SSPI type. -func (source *LoginSource) SSPI() *SSPIConfig { - return source.Cfg.(*SSPIConfig) + skipVerifiable, ok := source.Cfg.(SkipVerifiable) + return ok && skipVerifiable.IsSkipVerify() } // CreateLoginSource inserts a LoginSource in the DB if not already @@ -310,22 +209,34 @@ func CreateLoginSource(source *LoginSource) error { } else if has { return ErrLoginSourceAlreadyExist{source.Name} } - // Synchronization is only aviable with LDAP for now + // Synchronization is only available with LDAP for now if !source.IsLDAP() { source.IsSyncEnabled = false } _, err = x.Insert(source) - if err == nil && source.IsOAuth2() && source.IsActived { - oAuth2Config := source.OAuth2() - err = oauth2.RegisterProvider(source.Name, oAuth2Config.Provider, oAuth2Config.ClientID, oAuth2Config.ClientSecret, oAuth2Config.OpenIDConnectAutoDiscoveryURL, oAuth2Config.CustomURLMapping) - err = wrapOpenIDConnectInitializeError(err, source.Name, oAuth2Config) - if err != nil { - // remove the LoginSource in case of errors while registering OAuth2 providers - if _, err := x.Delete(source); err != nil { - log.Error("CreateLoginSource: Error while wrapOpenIDConnectInitializeError: %v", err) - } - return err + if err != nil { + return err + } + + if !source.IsActive { + return nil + } + + if settable, ok := source.Cfg.(LoginSourceSettable); ok { + settable.SetLoginSource(source) + } + + registerableSource, ok := source.Cfg.(RegisterableSource) + if !ok { + return nil + } + + err = registerableSource.RegisterSource() + if err != nil { + // remove the LoginSource in case of errors while registering configuration + if _, err := x.Delete(source); err != nil { + log.Error("CreateLoginSource: Error while wrapOpenIDConnectInitializeError: %v", err) } } return err @@ -346,10 +257,19 @@ func LoginSourcesByType(loginType LoginType) ([]*LoginSource, error) { return sources, nil } +// AllActiveLoginSources returns all active sources +func AllActiveLoginSources() ([]*LoginSource, error) { + sources := make([]*LoginSource, 0, 5) + if err := x.Where("is_active = ?", true).Find(&sources); err != nil { + return nil, err + } + return sources, nil +} + // ActiveLoginSources returns all active sources of the specified type func ActiveLoginSources(loginType LoginType) ([]*LoginSource, error) { sources := make([]*LoginSource, 0, 1) - if err := x.Where("is_actived = ? and type = ?", true, loginType).Find(&sources); err != nil { + if err := x.Where("is_active = ? and type = ?", true, loginType).Find(&sources); err != nil { return nil, err } return sources, nil @@ -372,6 +292,14 @@ func IsSSPIEnabled() bool { // GetLoginSourceByID returns login source by given ID. func GetLoginSourceByID(id int64) (*LoginSource, error) { source := new(LoginSource) + if id == 0 { + source.Cfg = registeredLoginConfigs[LoginNoType]() + // Set this source to active + // FIXME: allow disabling of db based password authentication in future + source.IsActive = true + return source, nil + } + has, err := x.ID(id).Get(source) if err != nil { return nil, err @@ -393,16 +321,28 @@ func UpdateSource(source *LoginSource) error { } _, err := x.ID(source.ID).AllCols().Update(source) - if err == nil && source.IsOAuth2() && source.IsActived { - oAuth2Config := source.OAuth2() - err = oauth2.RegisterProvider(source.Name, oAuth2Config.Provider, oAuth2Config.ClientID, oAuth2Config.ClientSecret, oAuth2Config.OpenIDConnectAutoDiscoveryURL, oAuth2Config.CustomURLMapping) - err = wrapOpenIDConnectInitializeError(err, source.Name, oAuth2Config) - if err != nil { - // restore original values since we cannot update the provider it self - if _, err := x.ID(source.ID).AllCols().Update(originalLoginSource); err != nil { - log.Error("UpdateSource: Error while wrapOpenIDConnectInitializeError: %v", err) - } - return err + if err != nil { + return err + } + + if !source.IsActive { + return nil + } + + if settable, ok := source.Cfg.(LoginSourceSettable); ok { + settable.SetLoginSource(source) + } + + registerableSource, ok := source.Cfg.(RegisterableSource) + if !ok { + return nil + } + + err = registerableSource.RegisterSource() + if err != nil { + // restore original values since we cannot update the provider it self + if _, err := x.ID(source.ID).AllCols().Update(originalLoginSource); err != nil { + log.Error("UpdateSource: Error while wrapOpenIDConnectInitializeError: %v", err) } } return err @@ -424,8 +364,10 @@ func DeleteSource(source *LoginSource) error { return ErrLoginSourceInUse{source.ID} } - if source.IsOAuth2() { - oauth2.RemoveProvider(source.Name) + if registerableSource, ok := source.Cfg.(RegisterableSource); ok { + if err := registerableSource.UnregisterSource(); err != nil { + return err + } } _, err = x.ID(source.ID).Delete(new(LoginSource)) @@ -437,389 +379,3 @@ func CountLoginSources() int64 { count, _ := x.Count(new(LoginSource)) return count } - -// .____ ________ _____ __________ -// | | \______ \ / _ \\______ \ -// | | | | \ / /_\ \| ___/ -// | |___ | ` \/ | \ | -// |_______ \/_______ /\____|__ /____| -// \/ \/ \/ - -func composeFullName(firstname, surname, username string) string { - switch { - case len(firstname) == 0 && len(surname) == 0: - return username - case len(firstname) == 0: - return surname - case len(surname) == 0: - return firstname - default: - return firstname + " " + surname - } -} - -// LoginViaLDAP queries if login/password is valid against the LDAP directory pool, -// and create a local user if success when enabled. -func LoginViaLDAP(user *User, login, password string, source *LoginSource) (*User, error) { - sr := source.Cfg.(*LDAPConfig).SearchEntry(login, password, source.Type == LoginDLDAP) - if sr == nil { - // User not in LDAP, do nothing - return nil, ErrUserNotExist{0, login, 0} - } - - var isAttributeSSHPublicKeySet = len(strings.TrimSpace(source.LDAP().AttributeSSHPublicKey)) > 0 - - // Update User admin flag if exist - if isExist, err := IsUserExist(0, sr.Username); err != nil { - return nil, err - } else if isExist { - if user == nil { - user, err = GetUserByName(sr.Username) - if err != nil { - return nil, err - } - } - if user != nil && !user.ProhibitLogin { - cols := make([]string, 0) - if len(source.LDAP().AdminFilter) > 0 && user.IsAdmin != sr.IsAdmin { - // Change existing admin flag only if AdminFilter option is set - user.IsAdmin = sr.IsAdmin - cols = append(cols, "is_admin") - } - if !user.IsAdmin && len(source.LDAP().RestrictedFilter) > 0 && user.IsRestricted != sr.IsRestricted { - // Change existing restricted flag only if RestrictedFilter option is set - user.IsRestricted = sr.IsRestricted - cols = append(cols, "is_restricted") - } - if len(cols) > 0 { - err = UpdateUserCols(user, cols...) - if err != nil { - return nil, err - } - } - } - } - - if user != nil { - if isAttributeSSHPublicKeySet && synchronizeLdapSSHPublicKeys(user, source, sr.SSHPublicKey) { - return user, RewriteAllPublicKeys() - } - - return user, nil - } - - // Fallback. - if len(sr.Username) == 0 { - sr.Username = login - } - - if len(sr.Mail) == 0 { - sr.Mail = fmt.Sprintf("%s@localhost", sr.Username) - } - - user = &User{ - LowerName: strings.ToLower(sr.Username), - Name: sr.Username, - FullName: composeFullName(sr.Name, sr.Surname, sr.Username), - Email: sr.Mail, - LoginType: source.Type, - LoginSource: source.ID, - LoginName: login, - IsActive: true, - IsAdmin: sr.IsAdmin, - IsRestricted: sr.IsRestricted, - } - - err := CreateUser(user) - - if err == nil && isAttributeSSHPublicKeySet && addLdapSSHPublicKeys(user, source, sr.SSHPublicKey) { - err = RewriteAllPublicKeys() - } - - return user, err -} - -// _________ __________________________ -// / _____/ / \__ ___/\______ \ -// \_____ \ / \ / \| | | ___/ -// / \/ Y \ | | | -// /_______ /\____|__ /____| |____| -// \/ \/ - -type smtpLoginAuth struct { - username, password string -} - -func (auth *smtpLoginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) { - return "LOGIN", []byte(auth.username), nil -} - -func (auth *smtpLoginAuth) Next(fromServer []byte, more bool) ([]byte, error) { - if more { - switch string(fromServer) { - case "Username:": - return []byte(auth.username), nil - case "Password:": - return []byte(auth.password), nil - } - } - return nil, nil -} - -// SMTP authentication type names. -const ( - SMTPPlain = "PLAIN" - SMTPLogin = "LOGIN" -) - -// SMTPAuths contains available SMTP authentication type names. -var SMTPAuths = []string{SMTPPlain, SMTPLogin} - -// SMTPAuth performs an SMTP authentication. -func SMTPAuth(a smtp.Auth, cfg *SMTPConfig) error { - c, err := smtp.Dial(fmt.Sprintf("%s:%d", cfg.Host, cfg.Port)) - if err != nil { - return err - } - defer c.Close() - - if err = c.Hello("gogs"); err != nil { - return err - } - - if cfg.TLS { - if ok, _ := c.Extension("STARTTLS"); ok { - if err = c.StartTLS(&tls.Config{ - InsecureSkipVerify: cfg.SkipVerify, - ServerName: cfg.Host, - }); err != nil { - return err - } - } else { - return errors.New("SMTP server unsupports TLS") - } - } - - if ok, _ := c.Extension("AUTH"); ok { - return c.Auth(a) - } - return ErrUnsupportedLoginType -} - -// LoginViaSMTP queries if login/password is valid against the SMTP, -// and create a local user if success when enabled. -func LoginViaSMTP(user *User, login, password string, sourceID int64, cfg *SMTPConfig) (*User, error) { - // Verify allowed domains. - if len(cfg.AllowedDomains) > 0 { - idx := strings.Index(login, "@") - if idx == -1 { - return nil, ErrUserNotExist{0, login, 0} - } else if !util.IsStringInSlice(login[idx+1:], strings.Split(cfg.AllowedDomains, ","), true) { - return nil, ErrUserNotExist{0, login, 0} - } - } - - var auth smtp.Auth - if cfg.Auth == SMTPPlain { - auth = smtp.PlainAuth("", login, password, cfg.Host) - } else if cfg.Auth == SMTPLogin { - auth = &smtpLoginAuth{login, password} - } else { - return nil, errors.New("Unsupported SMTP auth type") - } - - if err := SMTPAuth(auth, cfg); err != nil { - // Check standard error format first, - // then fallback to worse case. - tperr, ok := err.(*textproto.Error) - if (ok && tperr.Code == 535) || - strings.Contains(err.Error(), "Username and Password not accepted") { - return nil, ErrUserNotExist{0, login, 0} - } - return nil, err - } - - if user != nil { - return user, nil - } - - username := login - idx := strings.Index(login, "@") - if idx > -1 { - username = login[:idx] - } - - user = &User{ - LowerName: strings.ToLower(username), - Name: strings.ToLower(username), - Email: login, - Passwd: password, - LoginType: LoginSMTP, - LoginSource: sourceID, - LoginName: login, - IsActive: true, - } - return user, CreateUser(user) -} - -// __________ _____ _____ -// \______ \/ _ \ / \ -// | ___/ /_\ \ / \ / \ -// | | / | \/ Y \ -// |____| \____|__ /\____|__ / -// \/ \/ - -// LoginViaPAM queries if login/password is valid against the PAM, -// and create a local user if success when enabled. -func LoginViaPAM(user *User, login, password string, sourceID int64, cfg *PAMConfig) (*User, error) { - pamLogin, err := pam.Auth(cfg.ServiceName, login, password) - if err != nil { - if strings.Contains(err.Error(), "Authentication failure") { - return nil, ErrUserNotExist{0, login, 0} - } - return nil, err - } - - if user != nil { - return user, nil - } - - // Allow PAM sources with `@` in their name, like from Active Directory - username := pamLogin - idx := strings.Index(pamLogin, "@") - if idx > -1 { - username = pamLogin[:idx] - } - - user = &User{ - LowerName: strings.ToLower(username), - Name: username, - Email: pamLogin, - Passwd: password, - LoginType: LoginPAM, - LoginSource: sourceID, - LoginName: login, // This is what the user typed in - IsActive: true, - } - return user, CreateUser(user) -} - -// ExternalUserLogin attempts a login using external source types. -func ExternalUserLogin(user *User, login, password string, source *LoginSource) (*User, error) { - if !source.IsActived { - return nil, ErrLoginSourceNotActived - } - - var err error - switch source.Type { - case LoginLDAP, LoginDLDAP: - user, err = LoginViaLDAP(user, login, password, source) - case LoginSMTP: - user, err = LoginViaSMTP(user, login, password, source.ID, source.Cfg.(*SMTPConfig)) - case LoginPAM: - user, err = LoginViaPAM(user, login, password, source.ID, source.Cfg.(*PAMConfig)) - default: - return nil, ErrUnsupportedLoginType - } - - if err != nil { - return nil, err - } - - // WARN: DON'T check user.IsActive, that will be checked on reqSign so that - // user could be hint to resend confirm email. - if user.ProhibitLogin { - return nil, ErrUserProhibitLogin{user.ID, user.Name} - } - - return user, nil -} - -// UserSignIn validates user name and password. -func UserSignIn(username, password string) (*User, error) { - var user *User - if strings.Contains(username, "@") { - user = &User{Email: strings.ToLower(strings.TrimSpace(username))} - // check same email - cnt, err := x.Count(user) - if err != nil { - return nil, err - } - if cnt > 1 { - return nil, ErrEmailAlreadyUsed{ - Email: user.Email, - } - } - } else { - trimmedUsername := strings.TrimSpace(username) - if len(trimmedUsername) == 0 { - return nil, ErrUserNotExist{0, username, 0} - } - - user = &User{LowerName: strings.ToLower(trimmedUsername)} - } - - hasUser, err := x.Get(user) - if err != nil { - return nil, err - } - - if hasUser { - switch user.LoginType { - case LoginNoType, LoginPlain, LoginOAuth2: - if user.IsPasswordSet() && user.ValidatePassword(password) { - - // Update password hash if server password hash algorithm have changed - if user.PasswdHashAlgo != setting.PasswordHashAlgo { - if err = user.SetPassword(password); err != nil { - return nil, err - } - if err = UpdateUserCols(user, "passwd", "passwd_hash_algo", "salt"); err != nil { - return nil, err - } - } - - // WARN: DON'T check user.IsActive, that will be checked on reqSign so that - // user could be hint to resend confirm email. - if user.ProhibitLogin { - return nil, ErrUserProhibitLogin{user.ID, user.Name} - } - - return user, nil - } - - return nil, ErrUserNotExist{user.ID, user.Name, 0} - - default: - var source LoginSource - hasSource, err := x.ID(user.LoginSource).Get(&source) - if err != nil { - return nil, err - } else if !hasSource { - return nil, ErrLoginSourceNotExist{user.LoginSource} - } - - return ExternalUserLogin(user, user.LoginName, password, &source) - } - } - - sources := make([]*LoginSource, 0, 5) - if err = x.Where("is_actived = ?", true).Find(&sources); err != nil { - return nil, err - } - - for _, source := range sources { - if source.IsOAuth2() || source.IsSSPI() { - // don't try to authenticate against OAuth2 and SSPI sources here - continue - } - authUser, err := ExternalUserLogin(nil, username, password, source) - if err == nil { - return authUser, nil - } - - log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err) - } - - return nil, ErrUserNotExist{user.ID, user.Name, 0} -} diff --git a/models/migrate.go b/models/migrate.go index 2715c5bd9..28b670747 100644 --- a/models/migrate.go +++ b/models/migrate.go @@ -39,6 +39,7 @@ func InsertMilestones(ms ...*Milestone) (err error) { // InsertIssues insert issues to database func InsertIssues(issues ...*Issue) error { sess := x.NewSession() + defer sess.Close() if err := sess.Begin(); err != nil { return err } @@ -55,8 +56,8 @@ func insertIssue(sess *xorm.Session, issue *Issue) error { if _, err := sess.NoAutoTime().Insert(issue); err != nil { return err } - var issueLabels = make([]IssueLabel, 0, len(issue.Labels)) - var labelIDs = make([]int64, 0, len(issue.Labels)) + issueLabels := make([]IssueLabel, 0, len(issue.Labels)) + labelIDs := make([]int64, 0, len(issue.Labels)) for _, label := range issue.Labels { issueLabels = append(issueLabels, IssueLabel{ IssueID: issue.ID, @@ -137,7 +138,7 @@ func InsertIssueComments(comments []*Comment) error { return nil } - var issueIDs = make(map[int64]bool) + issueIDs := make(map[int64]bool) for _, comment := range comments { issueIDs[comment.IssueID] = true } @@ -194,6 +195,7 @@ func InsertPullRequests(prs ...*PullRequest) error { // InsertReleases migrates release func InsertReleases(rels ...*Release) error { sess := x.NewSession() + defer sess.Close() if err := sess.Begin(); err != nil { return err } diff --git a/models/migrations/fixtures/Test_deleteOrphanedIssueLabels/issue_label.yml b/models/migrations/fixtures/Test_deleteOrphanedIssueLabels/issue_label.yml new file mode 100644 index 000000000..96104ac04 --- /dev/null +++ b/models/migrations/fixtures/Test_deleteOrphanedIssueLabels/issue_label.yml @@ -0,0 +1,29 @@ +# Issue_Label 1 should not be deleted +- + id: 1 + issue_id: 1 + label_id: 1 + +# Issue_label 2 should be deleted +- + id: 2 + issue_id: 5 + label_id: 99 + +# Issue_Label 3 should not be deleted +- + id: 3 + issue_id: 2 + label_id: 1 + +# Issue_Label 4 should not be deleted +- + id: 4 + issue_id: 2 + label_id: 4 + +- + id: 5 + issue_id: 2 + label_id: 87 + diff --git a/models/migrations/fixtures/Test_deleteOrphanedIssueLabels/label.yml b/models/migrations/fixtures/Test_deleteOrphanedIssueLabels/label.yml new file mode 100644 index 000000000..d651c87d5 --- /dev/null +++ b/models/migrations/fixtures/Test_deleteOrphanedIssueLabels/label.yml @@ -0,0 +1,43 @@ +- + id: 1 + repo_id: 1 + org_id: 0 + name: label1 + color: '#abcdef' + num_issues: 2 + num_closed_issues: 0 + +- + id: 2 + repo_id: 1 + org_id: 0 + name: label2 + color: '#000000' + num_issues: 1 + num_closed_issues: 1 +- + id: 3 + repo_id: 0 + org_id: 3 + name: orglabel3 + color: '#abcdef' + num_issues: 0 + num_closed_issues: 0 + +- + id: 4 + repo_id: 0 + org_id: 3 + name: orglabel4 + color: '#000000' + num_issues: 1 + num_closed_issues: 0 + +- + id: 5 + repo_id: 10 + org_id: 0 + name: pull-test-label + color: '#000000' + num_issues: 0 + num_closed_issues: 0 diff --git a/models/migrations/fixtures/Test_removeInvalidLabels/comment.yml b/models/migrations/fixtures/Test_removeInvalidLabels/comment.yml new file mode 100644 index 000000000..4f44e2966 --- /dev/null +++ b/models/migrations/fixtures/Test_removeInvalidLabels/comment.yml @@ -0,0 +1,52 @@ +# type Comment struct { +# ID int64 `xorm:"pk autoincr"` +# Type int `xorm:"INDEX"` +# IssueID int64 `xorm:"INDEX"` +# LabelID int64 +# } +# +# we are only interested in type 7 +# + +- + id: 1 # Should remain + type: 6 + issue_id: 1 + label_id: 0 + should_remain: true +- + id: 2 # Should remain + type: 7 + issue_id: 1 # repo_id: 1 + label_id: 1 # repo_id: 1 + should_remain: true +- + id: 3 # Should remain + type: 7 + issue_id: 2 # repo_id: 2 owner_id: 1 + label_id: 2 # org_id: 1 + should_remain: true +- + id: 4 # Should be DELETED + type: 7 + issue_id: 1 # repo_id: 1 + label_id: 3 # repo_id: 2 + should_remain: false +- + id: 5 # Should remain + type: 7 + issue_id: 3 # repo_id: 1 + label_id: 1 # repo_id: 1 + should_remain: true +- + id: 6 # Should be DELETED + type: 7 + issue_id: 3 # repo_id: 1 owner_id: 2 + label_id: 2 # org_id: 1 + should_remain: false +- + id: 7 # Should be DELETED + type: 7 + issue_id: 3 # repo_id: 1 owner_id: 2 + label_id: 5 # repo_id: 3 + should_remain: false diff --git a/models/migrations/fixtures/Test_removeInvalidLabels/issue.yml b/models/migrations/fixtures/Test_removeInvalidLabels/issue.yml new file mode 100644 index 000000000..46ad46c17 --- /dev/null +++ b/models/migrations/fixtures/Test_removeInvalidLabels/issue.yml @@ -0,0 +1,21 @@ +# type Issue struct { +# ID int64 `xorm:"pk autoincr"` +# RepoID int64 `xorm:"INDEX UNIQUE(repo_index)"` +# Index int64 `xorm:"UNIQUE(repo_index)"` // Index in one repository. +# } +- + id: 1 + repo_id: 1 + index: 1 +- + id: 2 + repo_id: 2 + index: 1 +- + id: 3 + repo_id: 1 + index: 2 +- + id: 4 + repo_id: 3 + index: 1 diff --git a/models/migrations/fixtures/Test_removeInvalidLabels/issue_label.yml b/models/migrations/fixtures/Test_removeInvalidLabels/issue_label.yml new file mode 100644 index 000000000..5f5b8cb10 --- /dev/null +++ b/models/migrations/fixtures/Test_removeInvalidLabels/issue_label.yml @@ -0,0 +1,35 @@ +# type IssueLabel struct { +# ID int64 `xorm:"pk autoincr"` +# IssueID int64 `xorm:"UNIQUE(s)"` +# LabelID int64 `xorm:"UNIQUE(s)"` +# } +- + id: 1 # Should remain - matches comment 2 + issue_id: 1 + label_id: 1 + should_remain: true +- + id: 2 # Should remain + issue_id: 2 + label_id: 2 + should_remain: true +- + id: 3 # Should be deleted + issue_id: 1 + label_id: 3 + should_remain: false +- + id: 4 # Should remain + issue_id: 3 + label_id: 1 + should_remain: true +- + id: 5 # Should be deleted + issue_id: 3 + label_id: 2 + should_remain: false +- + id: 6 # Should be deleted + issue_id: 3 + label_id: 5 + should_remain: false diff --git a/models/migrations/fixtures/Test_removeInvalidLabels/label.yml b/models/migrations/fixtures/Test_removeInvalidLabels/label.yml new file mode 100644 index 000000000..094b811d9 --- /dev/null +++ b/models/migrations/fixtures/Test_removeInvalidLabels/label.yml @@ -0,0 +1,26 @@ +# type Label struct { +# ID int64 `xorm:"pk autoincr"` +# RepoID int64 `xorm:"INDEX"` +# OrgID int64 `xorm:"INDEX"` +# } +- + id: 1 + repo_id: 1 + org_id: 0 +- + id: 2 + repo_id: 0 + org_id: 1 +- + id: 3 + repo_id: 2 + org_id: 0 +- + id: 4 + repo_id: 1 + org_id: 0 +- + id: 5 + repo_id: 3 + org_id: 0 + diff --git a/models/migrations/fixtures/Test_removeInvalidLabels/repository.yml b/models/migrations/fixtures/Test_removeInvalidLabels/repository.yml new file mode 100644 index 000000000..180f11b37 --- /dev/null +++ b/models/migrations/fixtures/Test_removeInvalidLabels/repository.yml @@ -0,0 +1,17 @@ +# type Repository struct { +# ID int64 `xorm:"pk autoincr"` +# OwnerID int64 `xorm:"UNIQUE(s) index"` +# LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` +# } +- + id: 1 + owner_id: 2 + lower_name: "repo1" +- + id: 2 + owner_id: 1 + lower_name: "repo2" +- + id: 3 + owner_id: 2 + lower_name: "repo3" diff --git a/models/migrations/fixtures/Test_unwrapLDAPSourceCfg/login_source.yml b/models/migrations/fixtures/Test_unwrapLDAPSourceCfg/login_source.yml new file mode 100644 index 000000000..4b72ba145 --- /dev/null +++ b/models/migrations/fixtures/Test_unwrapLDAPSourceCfg/login_source.yml @@ -0,0 +1,48 @@ +# type LoginSource struct { +# ID int64 `xorm:"pk autoincr"` +# Type int +# Cfg []byte `xorm:"TEXT"` +# Expected []byte `xorm:"TEXT"` +# } +- + id: 1 + type: 1 + is_actived: false + cfg: "{\"Source\":{\"A\":\"string\",\"B\":1}}" + expected: "{\"Source\":{\"A\":\"string\",\"B\":1}}" +- + id: 2 + type: 2 + is_actived: true + cfg: "{\"Source\":{\"A\":\"string2\",\"B\":2}}" + expected: "{\"A\":\"string2\",\"B\":2}" +- + id: 3 + type: 3 + is_actived: false + cfg: "{\"Source\":{\"A\":\"string3\",\"B\":3}}" + expected: "{\"Source\":{\"A\":\"string3\",\"B\":3}}" +- + id: 4 + type: 4 + is_actived: true + cfg: "{\"Source\":{\"A\":\"string4\",\"B\":4}}" + expected: "{\"Source\":{\"A\":\"string4\",\"B\":4}}" +- + id: 5 + type: 5 + is_actived: false + cfg: "{\"Source\":{\"A\":\"string5\",\"B\":5}}" + expected: "{\"A\":\"string5\",\"B\":5}" +- + id: 6 + type: 2 + is_actived: true + cfg: "{\"A\":\"string6\",\"B\":6}" + expected: "{\"A\":\"string6\",\"B\":6}" +- + id: 7 + type: 5 + is_actived: false + cfg: "{\"A\":\"string7\",\"B\":7}" + expected: "{\"A\":\"string7\",\"B\":7}" diff --git a/models/migrations/migrations.go b/models/migrations/migrations.go index f62bba2a7..79b1e90ec 100644 --- a/models/migrations/migrations.go +++ b/models/migrations/migrations.go @@ -17,6 +17,7 @@ import ( "code.gitea.io/gitea/modules/setting" "xorm.io/xorm" + "xorm.io/xorm/names" "xorm.io/xorm/schemas" ) @@ -186,7 +187,7 @@ var migrations = []Migration{ // v122 -> v123 NewMigration("Add Require Signed Commits to ProtectedBranch", addRequireSignedCommits), // v123 -> v124 - NewMigration("Add original informations for reactions", addReactionOriginals), + NewMigration("Add original information for reactions", addReactionOriginals), // v124 -> v125 NewMigration("Add columns to user and repository", addUserRepoMissingColumns), // v125 -> v126 @@ -279,6 +280,64 @@ var migrations = []Migration{ NewMigration("Convert hook task type from char(16) to varchar(16) and trim the column", convertHookTaskTypeToVarcharAndTrim), // v166 -> v167 NewMigration("Where Password is Valid with Empty String delete it", recalculateUserEmptyPWD), + // v167 -> v168 + NewMigration("Add user redirect", addUserRedirect), + // v168 -> v169 + NewMigration("Recreate user table to fix default values", recreateUserTableToFixDefaultValues), + // v169 -> v170 + NewMigration("Update DeleteBranch comments to set the old_ref to the commit_sha", commentTypeDeleteBranchUseOldRef), + // v170 -> v171 + NewMigration("Add Dismissed to Review table", addDismissedReviewColumn), + // v171 -> v172 + NewMigration("Add Sorting to ProjectBoard table", addSortingColToProjectBoard), + // v172 -> v173 + NewMigration("Add sessions table for go-chi/session", addSessionTable), + // v173 -> v174 + NewMigration("Add time_id column to Comment", addTimeIDCommentColumn), + // v174 -> v175 + NewMigration("Create repo transfer table", addRepoTransfer), + // v175 -> v176 + NewMigration("Fix Postgres ID Sequences broken by recreate-table", fixPostgresIDSequences), + // v176 -> v177 + NewMigration("Remove invalid labels from comments", removeInvalidLabels), + // v177 -> v178 + NewMigration("Delete orphaned IssueLabels", deleteOrphanedIssueLabels), + + // Gitea 1.14.0 ends at v178 + + // v178 -> v179 + NewMigration("Add LFS columns to Mirror", addLFSMirrorColumns), + // v179 -> v180 + NewMigration("Convert avatar url to text", convertAvatarURLToText), + // v180 -> v181 + NewMigration("Delete credentials from past migrations", deleteMigrationCredentials), + // v181 -> v182 + NewMigration("Always save primary email on email address table", addPrimaryEmail2EmailAddress), + // v182 -> v183 + NewMigration("Add issue resource index table", addIssueResourceIndexTable), + // v183 -> v184 + NewMigration("Create PushMirror table", createPushMirrorTable), + // v184 -> v185 + NewMigration("Rename Task errors to message", renameTaskErrorsToMessage), + // v185 -> v186 + NewMigration("Add new table repo_archiver", addRepoArchiver), + // v186 -> v187 + NewMigration("Create protected tag table", createProtectedTagTable), + // v187 -> v188 + NewMigration("Drop unneeded webhook related columns", dropWebhookColumns), + // v188 -> v189 + NewMigration("Add key is verified to gpg key", addKeyIsVerified), + + // Gitea 1.15.0 ends at v189 + + // v189 -> v190 + NewMigration("Unwrap ldap.Sources", unwrapLDAPSourceCfg), + // v190 -> v191 + NewMigration("Add agit flow pull request support", addAgitFlowPullRequest), + // v191 -> v192 + NewMigration("Alter issue/comment table TEXT fields to LONGTEXT", alterIssueAndCommentTextFieldsToLongText), + // v192 -> v193 + NewMigration("RecreateIssueResourceIndexTable to have a primary key instead of an unique index", recreateIssueResourceIndexTable), } // GetCurrentDBVersion returns the current db version @@ -329,6 +388,8 @@ func EnsureUpToDate(x *xorm.Engine) error { // Migrate database to current version func Migrate(x *xorm.Engine) error { + // Set a new clean the default mapper to GonicMapper as that is the default for Gitea. + x.SetMapper(names.GonicMapper{}) if err := x.Sync(new(Version)); err != nil { return fmt.Errorf("sync: %v", err) } @@ -367,8 +428,10 @@ Please try upgrading to a lower version first (suggested v1.6.4), then upgrade t // Migrate for i, m := range migrations[v-minDBVersion:] { log.Info("Migration[%d]: %s", v+int64(i), m.Description()) + // Reset the mapper between each migration - migrations are not supposed to depend on each other + x.SetMapper(names.GonicMapper{}) if err = m.Migrate(x); err != nil { - return fmt.Errorf("do migrate: %v", err) + return fmt.Errorf("migration[%d]: %s failed: %v", v+int64(i), m.Description(), err) } currentVersion.Version = v + int64(i) + 1 if _, err = x.ID(1).Update(currentVersion); err != nil { @@ -538,12 +601,52 @@ func recreateTable(sess *xorm.Session, bean interface{}) error { return err } + if err := sess.Table(tempTableName).DropIndexes(bean); err != nil { + log.Error("Unable to drop indexes on temporary table %s. Error: %v", tempTableName, err) + return err + } + // SQLite and MySQL will move all the constraints from the temporary table to the new table if _, err := sess.Exec(fmt.Sprintf("ALTER TABLE `%s` RENAME TO `%s`", tempTableName, tableName)); err != nil { log.Error("Unable to rename %s to %s. Error: %v", tempTableName, tableName, err) return err } + + if err := sess.Table(tableName).CreateIndexes(bean); err != nil { + log.Error("Unable to recreate indexes on table %s. Error: %v", tableName, err) + return err + } + + if err := sess.Table(tableName).CreateUniques(bean); err != nil { + log.Error("Unable to recreate uniques on table %s. Error: %v", tableName, err) + return err + } case setting.Database.UsePostgreSQL: + var originalSequences []string + type sequenceData struct { + LastValue int `xorm:"'last_value'"` + IsCalled bool `xorm:"'is_called'"` + } + sequenceMap := map[string]sequenceData{} + + schema := sess.Engine().Dialect().URI().Schema + sess.Engine().SetSchema("") + if err := sess.Table("information_schema.sequences").Cols("sequence_name").Where("sequence_name LIKE ? || '_%' AND sequence_catalog = ?", tableName, setting.Database.Name).Find(&originalSequences); err != nil { + log.Error("Unable to rename %s to %s. Error: %v", tempTableName, tableName, err) + return err + } + sess.Engine().SetSchema(schema) + + for _, sequence := range originalSequences { + sequenceData := sequenceData{} + if _, err := sess.Table(sequence).Cols("last_value", "is_called").Get(&sequenceData); err != nil { + log.Error("Unable to get last_value and is_called from %s. Error: %v", sequence, err) + return err + } + sequenceMap[sequence] = sequenceData + + } + // CASCADE causes postgres to drop all the constraints on the old table if _, err := sess.Exec(fmt.Sprintf("DROP TABLE `%s` CASCADE", tableName)); err != nil { log.Error("Unable to drop old table %s. Error: %v", tableName, err) @@ -557,7 +660,6 @@ func recreateTable(sess *xorm.Session, bean interface{}) error { } var indices []string - schema := sess.Engine().Dialect().URI().Schema sess.Engine().SetSchema("") if err := sess.Table("pg_indexes").Cols("indexname").Where("tablename = ? ", tableName).Find(&indices); err != nil { log.Error("Unable to rename %s to %s. Error: %v", tempTableName, tableName, err) @@ -573,6 +675,43 @@ func recreateTable(sess *xorm.Session, bean interface{}) error { } } + var sequences []string + sess.Engine().SetSchema("") + if err := sess.Table("information_schema.sequences").Cols("sequence_name").Where("sequence_name LIKE 'tmp_recreate__' || ? || '_%' AND sequence_catalog = ?", tableName, setting.Database.Name).Find(&sequences); err != nil { + log.Error("Unable to rename %s to %s. Error: %v", tempTableName, tableName, err) + return err + } + sess.Engine().SetSchema(schema) + + for _, sequence := range sequences { + newSequenceName := strings.Replace(sequence, "tmp_recreate__", "", 1) + if _, err := sess.Exec(fmt.Sprintf("ALTER SEQUENCE `%s` RENAME TO `%s`", sequence, newSequenceName)); err != nil { + log.Error("Unable to rename %s sequence to %s. Error: %v", sequence, newSequenceName, err) + return err + } + val, ok := sequenceMap[newSequenceName] + if newSequenceName == tableName+"_id_seq" { + if ok && val.LastValue != 0 { + if _, err := sess.Exec(fmt.Sprintf("SELECT setval('%s', %d, %t)", newSequenceName, val.LastValue, val.IsCalled)); err != nil { + log.Error("Unable to reset %s to %d. Error: %v", newSequenceName, val, err) + return err + } + } else { + // We're going to try to guess this + if _, err := sess.Exec(fmt.Sprintf("SELECT setval('%s', COALESCE((SELECT MAX(id)+1 FROM `%s`), 1), false)", newSequenceName, tableName)); err != nil { + log.Error("Unable to reset %s. Error: %v", newSequenceName, err) + return err + } + } + } else if ok { + if _, err := sess.Exec(fmt.Sprintf("SELECT setval('%s', %d, %t)", newSequenceName, val.LastValue, val.IsCalled)); err != nil { + log.Error("Unable to reset %s to %d. Error: %v", newSequenceName, val, err) + return err + } + } + + } + case setting.Database.UseMSSQL: // MSSQL will drop all the constraints on the old table if _, err := sess.Exec(fmt.Sprintf("DROP TABLE `%s`", tableName)); err != nil { @@ -723,7 +862,7 @@ func dropTableColumns(sess *xorm.Session, tableName string, columnNames ...strin } cols += "`" + strings.ToLower(col) + "`" } - sql := fmt.Sprintf("SELECT Name FROM SYS.DEFAULT_CONSTRAINTS WHERE PARENT_OBJECT_ID = OBJECT_ID('%[1]s') AND PARENT_COLUMN_ID IN (SELECT column_id FROM sys.columns WHERE lower(NAME) IN (%[2]s) AND object_id = OBJECT_ID('%[1]s'))", + sql := fmt.Sprintf("SELECT Name FROM sys.default_constraints WHERE parent_object_id = OBJECT_ID('%[1]s') AND parent_column_id IN (SELECT column_id FROM sys.columns WHERE LOWER(name) IN (%[2]s) AND object_id = OBJECT_ID('%[1]s'))", tableName, strings.ReplaceAll(cols, "`", "'")) constraints := make([]string, 0) if err := sess.SQL(sql).Find(&constraints); err != nil { @@ -731,9 +870,21 @@ func dropTableColumns(sess *xorm.Session, tableName string, columnNames ...strin } for _, constraint := range constraints { if _, err := sess.Exec(fmt.Sprintf("ALTER TABLE `%s` DROP CONSTRAINT `%s`", tableName, constraint)); err != nil { - return fmt.Errorf("Drop table `%s` constraint `%s`: %v", tableName, constraint, err) + return fmt.Errorf("Drop table `%s` default constraint `%s`: %v", tableName, constraint, err) } } + sql = fmt.Sprintf("SELECT DISTINCT Name FROM sys.indexes INNER JOIN sys.index_columns ON indexes.index_id = index_columns.index_id AND indexes.object_id = index_columns.object_id WHERE indexes.object_id = OBJECT_ID('%[1]s') AND index_columns.column_id IN (SELECT column_id FROM sys.columns WHERE LOWER(name) IN (%[2]s) AND object_id = OBJECT_ID('%[1]s'))", + tableName, strings.ReplaceAll(cols, "`", "'")) + constraints = make([]string, 0) + if err := sess.SQL(sql).Find(&constraints); err != nil { + return fmt.Errorf("Find constraints: %v", err) + } + for _, constraint := range constraints { + if _, err := sess.Exec(fmt.Sprintf("DROP INDEX `%[2]s` ON `%[1]s`", tableName, constraint)); err != nil { + return fmt.Errorf("Drop index `%[2]s` on `%[1]s`: %v", tableName, constraint, err) + } + } + if _, err := sess.Exec(fmt.Sprintf("ALTER TABLE `%s` DROP COLUMN %s", tableName, cols)); err != nil { return fmt.Errorf("Drop table `%s` columns %v: %v", tableName, columnNames, err) } diff --git a/models/migrations/migrations_test.go b/models/migrations/migrations_test.go new file mode 100644 index 000000000..634bfc848 --- /dev/null +++ b/models/migrations/migrations_test.go @@ -0,0 +1,342 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "database/sql" + "fmt" + "os" + "path" + "path/filepath" + "runtime" + "testing" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" + "github.com/stretchr/testify/assert" + "github.com/unknwon/com" + "xorm.io/xorm" + "xorm.io/xorm/names" +) + +func TestMain(m *testing.M) { + giteaRoot := base.SetupGiteaRoot() + if giteaRoot == "" { + fmt.Println("Environment variable $GITEA_ROOT not set") + os.Exit(1) + } + giteaBinary := "gitea" + if runtime.GOOS == "windows" { + giteaBinary += ".exe" + } + setting.AppPath = path.Join(giteaRoot, giteaBinary) + if _, err := os.Stat(setting.AppPath); err != nil { + fmt.Printf("Could not find gitea binary at %s\n", setting.AppPath) + os.Exit(1) + } + + giteaConf := os.Getenv("GITEA_CONF") + if giteaConf == "" { + giteaConf = path.Join(filepath.Dir(setting.AppPath), "integrations/sqlite.ini") + fmt.Printf("Environment variable $GITEA_CONF not set - defaulting to %s\n", giteaConf) + } + + if !path.IsAbs(giteaConf) { + setting.CustomConf = path.Join(giteaRoot, giteaConf) + } else { + setting.CustomConf = giteaConf + } + + setting.SetCustomPathAndConf("", "", "") + setting.NewContext() + git.CheckLFSVersion() + setting.InitDBConfig() + setting.NewLogServices(true) + + exitStatus := m.Run() + + if err := removeAllWithRetry(setting.RepoRootPath); err != nil { + fmt.Fprintf(os.Stderr, "os.RemoveAll: %v\n", err) + } + if err := removeAllWithRetry(setting.AppDataPath); err != nil { + fmt.Fprintf(os.Stderr, "os.RemoveAll: %v\n", err) + } + os.Exit(exitStatus) +} + +func removeAllWithRetry(dir string) error { + var err error + for i := 0; i < 20; i++ { + err = os.RemoveAll(dir) + if err == nil { + break + } + time.Sleep(100 * time.Millisecond) + } + return err +} + +// SetEngine sets the xorm.Engine +func SetEngine() (*xorm.Engine, error) { + x, err := models.GetNewEngine() + if err != nil { + return x, fmt.Errorf("Failed to connect to database: %v", err) + } + + x.SetMapper(names.GonicMapper{}) + // WARNING: for serv command, MUST remove the output to os.stdout, + // so use log file to instead print to stdout. + x.SetLogger(models.NewXORMLogger(setting.Database.LogSQL)) + x.ShowSQL(setting.Database.LogSQL) + x.SetMaxOpenConns(setting.Database.MaxOpenConns) + x.SetMaxIdleConns(setting.Database.MaxIdleConns) + x.SetConnMaxLifetime(setting.Database.ConnMaxLifetime) + return x, nil +} + +func deleteDB() error { + switch { + case setting.Database.UseSQLite3: + if err := util.Remove(setting.Database.Path); err != nil { + return err + } + return os.MkdirAll(path.Dir(setting.Database.Path), os.ModePerm) + + case setting.Database.UseMySQL: + db, err := sql.Open("mysql", fmt.Sprintf("%s:%s@tcp(%s)/", + setting.Database.User, setting.Database.Passwd, setting.Database.Host)) + if err != nil { + return err + } + defer db.Close() + + if _, err = db.Exec(fmt.Sprintf("DROP DATABASE IF EXISTS %s", setting.Database.Name)); err != nil { + return err + } + + if _, err = db.Exec(fmt.Sprintf("CREATE DATABASE IF NOT EXISTS %s", setting.Database.Name)); err != nil { + return err + } + return nil + case setting.Database.UsePostgreSQL: + db, err := sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/?sslmode=%s", + setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.SSLMode)) + if err != nil { + return err + } + defer db.Close() + + if _, err = db.Exec(fmt.Sprintf("DROP DATABASE IF EXISTS %s", setting.Database.Name)); err != nil { + return err + } + + if _, err = db.Exec(fmt.Sprintf("CREATE DATABASE %s", setting.Database.Name)); err != nil { + return err + } + db.Close() + + // Check if we need to setup a specific schema + if len(setting.Database.Schema) != 0 { + db, err = sql.Open("postgres", fmt.Sprintf("postgres://%s:%s@%s/%s?sslmode=%s", + setting.Database.User, setting.Database.Passwd, setting.Database.Host, setting.Database.Name, setting.Database.SSLMode)) + if err != nil { + return err + } + defer db.Close() + + schrows, err := db.Query(fmt.Sprintf("SELECT 1 FROM information_schema.schemata WHERE schema_name = '%s'", setting.Database.Schema)) + if err != nil { + return err + } + defer schrows.Close() + + if !schrows.Next() { + // Create and setup a DB schema + _, err = db.Exec(fmt.Sprintf("CREATE SCHEMA %s", setting.Database.Schema)) + if err != nil { + return err + } + } + + // Make the user's default search path the created schema; this will affect new connections + _, err = db.Exec(fmt.Sprintf(`ALTER USER "%s" SET search_path = %s`, setting.Database.User, setting.Database.Schema)) + if err != nil { + return err + } + return nil + } + case setting.Database.UseMSSQL: + host, port := setting.ParseMSSQLHostPort(setting.Database.Host) + db, err := sql.Open("mssql", fmt.Sprintf("server=%s; port=%s; database=%s; user id=%s; password=%s;", + host, port, "master", setting.Database.User, setting.Database.Passwd)) + if err != nil { + return err + } + defer db.Close() + + if _, err = db.Exec(fmt.Sprintf("DROP DATABASE IF EXISTS [%s]", setting.Database.Name)); err != nil { + return err + } + if _, err = db.Exec(fmt.Sprintf("CREATE DATABASE [%s]", setting.Database.Name)); err != nil { + return err + } + } + + return nil +} + +// prepareTestEnv prepares the test environment and reset the database. The skip parameter should usually be 0. +// Provide models to be sync'd with the database - in particular any models you expect fixtures to be loaded from. +// +// fixtures in `models/migrations/fixtures/` will be loaded automatically +func prepareTestEnv(t *testing.T, skip int, syncModels ...interface{}) (*xorm.Engine, func()) { + t.Helper() + ourSkip := 2 + ourSkip += skip + deferFn := PrintCurrentTest(t, ourSkip) + assert.NoError(t, os.RemoveAll(setting.RepoRootPath)) + + assert.NoError(t, com.CopyDir(path.Join(filepath.Dir(setting.AppPath), "integrations/gitea-repositories-meta"), + setting.RepoRootPath)) + + if err := deleteDB(); err != nil { + t.Errorf("unable to reset database: %v", err) + return nil, deferFn + } + + x, err := SetEngine() + assert.NoError(t, err) + if x != nil { + oldDefer := deferFn + deferFn = func() { + oldDefer() + if err := x.Close(); err != nil { + t.Errorf("error during close: %v", err) + } + if err := deleteDB(); err != nil { + t.Errorf("unable to reset database: %v", err) + } + } + } + if err != nil { + return x, deferFn + } + + if len(syncModels) > 0 { + if err := x.Sync2(syncModels...); err != nil { + t.Errorf("error during sync: %v", err) + return x, deferFn + } + } + + fixturesDir := filepath.Join(filepath.Dir(setting.AppPath), "models", "migrations", "fixtures", t.Name()) + + if _, err := os.Stat(fixturesDir); err == nil { + t.Logf("initializing fixtures from: %s", fixturesDir) + if err := models.InitFixtures(fixturesDir, x); err != nil { + t.Errorf("error whilst initializing fixtures from %s: %v", fixturesDir, err) + return x, deferFn + } + if err := models.LoadFixtures(x); err != nil { + t.Errorf("error whilst loading fixtures from %s: %v", fixturesDir, err) + return x, deferFn + } + } else if !os.IsNotExist(err) { + t.Errorf("unexpected error whilst checking for existence of fixtures: %v", err) + } else { + t.Logf("no fixtures found in: %s", fixturesDir) + } + + return x, deferFn +} + +func Test_dropTableColumns(t *testing.T) { + x, deferable := prepareTestEnv(t, 0) + if x == nil || t.Failed() { + defer deferable() + return + } + defer deferable() + + type DropTest struct { + ID int64 `xorm:"pk autoincr"` + FirstColumn string + ToDropColumn string `xorm:"unique"` + AnotherColumn int64 + CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` + UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` + } + + columns := []string{ + "first_column", + "to_drop_column", + "another_column", + "created_unix", + "updated_unix", + } + + for i := range columns { + x.SetMapper(names.GonicMapper{}) + if err := x.Sync2(new(DropTest)); err != nil { + t.Errorf("unable to create DropTest table: %v", err) + return + } + sess := x.NewSession() + if err := sess.Begin(); err != nil { + sess.Close() + t.Errorf("unable to begin transaction: %v", err) + return + } + if err := dropTableColumns(sess, "drop_test", columns[i:]...); err != nil { + sess.Close() + t.Errorf("Unable to drop columns[%d:]: %s from drop_test: %v", i, columns[i:], err) + return + } + if err := sess.Commit(); err != nil { + sess.Close() + t.Errorf("unable to commit transaction: %v", err) + return + } + sess.Close() + if err := x.DropTables(new(DropTest)); err != nil { + t.Errorf("unable to drop table: %v", err) + return + } + for j := range columns[i+1:] { + x.SetMapper(names.GonicMapper{}) + if err := x.Sync2(new(DropTest)); err != nil { + t.Errorf("unable to create DropTest table: %v", err) + return + } + dropcols := append([]string{columns[i]}, columns[j+i+1:]...) + sess := x.NewSession() + if err := sess.Begin(); err != nil { + sess.Close() + t.Errorf("unable to begin transaction: %v", err) + return + } + if err := dropTableColumns(sess, "drop_test", dropcols...); err != nil { + sess.Close() + t.Errorf("Unable to drop columns: %s from drop_test: %v", dropcols, err) + return + } + if err := sess.Commit(); err != nil { + sess.Close() + t.Errorf("unable to commit transaction: %v", err) + return + } + sess.Close() + if err := x.DropTables(new(DropTest)); err != nil { + t.Errorf("unable to drop table: %v", err) + return + } + } + } +} diff --git a/models/migrations/testlogger_test.go b/models/migrations/testlogger_test.go new file mode 100644 index 000000000..5e3d880b5 --- /dev/null +++ b/models/migrations/testlogger_test.go @@ -0,0 +1,187 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "context" + "fmt" + "os" + "runtime" + "strings" + "sync" + "testing" + "time" + + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/queue" +) + +var ( + prefix string + slowTest = 10 * time.Second + slowFlush = 5 * time.Second +) + +// TestLogger is a logger which will write to the testing log +type TestLogger struct { + log.WriterLogger +} + +var writerCloser = &testLoggerWriterCloser{} + +type testLoggerWriterCloser struct { + sync.RWMutex + t []*testing.TB +} + +func (w *testLoggerWriterCloser) setT(t *testing.TB) { + w.Lock() + w.t = append(w.t, t) + w.Unlock() +} + +func (w *testLoggerWriterCloser) Write(p []byte) (int, error) { + w.RLock() + var t *testing.TB + if len(w.t) > 0 { + t = w.t[len(w.t)-1] + } + w.RUnlock() + if t != nil && *t != nil { + if len(p) > 0 && p[len(p)-1] == '\n' { + p = p[:len(p)-1] + } + + defer func() { + err := recover() + if err == nil { + return + } + var errString string + errErr, ok := err.(error) + if ok { + errString = errErr.Error() + } else { + errString, ok = err.(string) + } + if !ok { + panic(err) + } + if !strings.HasPrefix(errString, "Log in goroutine after ") { + panic(err) + } + }() + + (*t).Log(string(p)) + return len(p), nil + } + return len(p), nil +} + +func (w *testLoggerWriterCloser) Close() error { + w.Lock() + if len(w.t) > 0 { + w.t = w.t[:len(w.t)-1] + } + w.Unlock() + return nil +} + +// PrintCurrentTest prints the current test to os.Stdout +func PrintCurrentTest(t testing.TB, skip ...int) func() { + start := time.Now() + actualSkip := 1 + if len(skip) > 0 { + actualSkip = skip[0] + } + _, filename, line, _ := runtime.Caller(actualSkip) + + if log.CanColorStdout { + fmt.Fprintf(os.Stdout, "=== %s (%s:%d)\n", fmt.Formatter(log.NewColoredValue(t.Name())), strings.TrimPrefix(filename, prefix), line) + } else { + fmt.Fprintf(os.Stdout, "=== %s (%s:%d)\n", t.Name(), strings.TrimPrefix(filename, prefix), line) + } + writerCloser.setT(&t) + return func() { + took := time.Since(start) + if took > slowTest { + if log.CanColorStdout { + fmt.Fprintf(os.Stdout, "+++ %s is a slow test (took %v)\n", fmt.Formatter(log.NewColoredValue(t.Name(), log.Bold, log.FgYellow)), fmt.Formatter(log.NewColoredValue(took, log.Bold, log.FgYellow))) + } else { + fmt.Fprintf(os.Stdout, "+++ %s is a slow tets (took %v)\n", t.Name(), took) + } + } + timer := time.AfterFunc(slowFlush, func() { + if log.CanColorStdout { + fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", fmt.Formatter(log.NewColoredValue(t.Name(), log.Bold, log.FgRed)), slowFlush) + } else { + fmt.Fprintf(os.Stdout, "+++ %s ... still flushing after %v ...\n", t.Name(), slowFlush) + } + }) + if err := queue.GetManager().FlushAll(context.Background(), -1); err != nil { + t.Errorf("Flushing queues failed with error %v", err) + } + timer.Stop() + flushTook := time.Since(start) - took + if flushTook > slowFlush { + if log.CanColorStdout { + fmt.Fprintf(os.Stdout, "+++ %s had a slow clean-up flush (took %v)\n", fmt.Formatter(log.NewColoredValue(t.Name(), log.Bold, log.FgRed)), fmt.Formatter(log.NewColoredValue(flushTook, log.Bold, log.FgRed))) + } else { + fmt.Fprintf(os.Stdout, "+++ %s had a slow clean-up flush (took %v)\n", t.Name(), flushTook) + } + } + _ = writerCloser.Close() + } +} + +// Printf takes a format and args and prints the string to os.Stdout +func Printf(format string, args ...interface{}) { + if log.CanColorStdout { + for i := 0; i < len(args); i++ { + args[i] = log.NewColoredValue(args[i]) + } + } + fmt.Fprintf(os.Stdout, "\t"+format, args...) +} + +// NewTestLogger creates a TestLogger as a log.LoggerProvider +func NewTestLogger() log.LoggerProvider { + logger := &TestLogger{} + logger.Colorize = log.CanColorStdout + logger.Level = log.TRACE + return logger +} + +// Init inits connection writer with json config. +// json config only need key "level". +func (log *TestLogger) Init(config string) error { + err := json.Unmarshal([]byte(config), log) + if err != nil { + return err + } + log.NewWriterLogger(writerCloser) + return nil +} + +// Flush when log should be flushed +func (log *TestLogger) Flush() { +} + +//ReleaseReopen does nothing +func (log *TestLogger) ReleaseReopen() error { + return nil +} + +// GetName returns the default name for this implementation +func (log *TestLogger) GetName() string { + return "test" +} + +func init() { + log.Register("test", NewTestLogger) + _, filename, _, _ := runtime.Caller(0) + prefix = strings.TrimSuffix(filename, "integrations/testlogger.go") +} diff --git a/models/migrations/v100.go b/models/migrations/v100.go index 6a4e98af1..0ff59e004 100644 --- a/models/migrations/v100.go +++ b/models/migrations/v100.go @@ -26,7 +26,7 @@ func updateMigrationServiceTypes(x *xorm.Engine) error { var last int const batchSize = 50 for { - var results = make([]Repository, 0, batchSize) + results := make([]Repository, 0, batchSize) err := x.Where("original_url <> '' AND original_url IS NOT NULL"). And("original_service_type = 0 OR original_service_type IS NULL"). OrderBy("id"). @@ -48,7 +48,7 @@ func updateMigrationServiceTypes(x *xorm.Engine) error { if err != nil { return err } - var serviceType = PlainGitService + serviceType := PlainGitService if strings.EqualFold(u.Host, "github.com") { serviceType = GithubService } diff --git a/models/migrations/v104.go b/models/migrations/v104.go index f3ec3c88c..72e236404 100644 --- a/models/migrations/v104.go +++ b/models/migrations/v104.go @@ -9,7 +9,6 @@ import ( ) func removeLabelUneededCols(x *xorm.Engine) error { - // Make sure the columns exist before dropping them type Label struct { QueryString string diff --git a/models/migrations/v105.go b/models/migrations/v105.go index 6c9a5817a..5d9a98cce 100644 --- a/models/migrations/v105.go +++ b/models/migrations/v105.go @@ -9,7 +9,6 @@ import ( ) func addTeamIncludesAllRepositories(x *xorm.Engine) error { - type Team struct { ID int64 `xorm:"pk autoincr"` IncludesAllRepositories bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v107.go b/models/migrations/v107.go index 3d6aeebaf..22990a0fa 100644 --- a/models/migrations/v107.go +++ b/models/migrations/v107.go @@ -9,7 +9,6 @@ import ( ) func addTemplateToRepo(x *xorm.Engine) error { - type Repository struct { IsTemplate bool `xorm:"INDEX NOT NULL DEFAULT false"` TemplateID int64 `xorm:"INDEX"` diff --git a/models/migrations/v111.go b/models/migrations/v111.go index 93831de94..95f0ec22d 100644 --- a/models/migrations/v111.go +++ b/models/migrations/v111.go @@ -141,8 +141,8 @@ func addBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error { return perm, err } - // Prevent strangers from checking out public repo of private orginization - // Allow user if they are collaborator of a repo within a private orginization but not a member of the orginization itself + // Prevent strangers from checking out public repo of private organization + // Allow user if they are collaborator of a repo within a private organization but not a member of the organization itself hasOrgVisible := true // Not SignedUser if user == nil { @@ -380,7 +380,7 @@ func addBranchProtectionCanPushAndEnableWhitelist(x *xorm.Engine) error { } totalPages := totalIssues / pageSize - var executeBody = func(page, pageSize int64) error { + executeBody := func(page, pageSize int64) error { // Find latest review of each user in each pull request, and set official field if appropriate reviews := []*Review{} diff --git a/models/migrations/v114.go b/models/migrations/v114.go index 25a187f6e..4dd07c9e5 100644 --- a/models/migrations/v114.go +++ b/models/migrations/v114.go @@ -11,7 +11,6 @@ import ( ) func sanitizeOriginalURL(x *xorm.Engine) error { - type Repository struct { ID int64 OriginalURL string `xorm:"VARCHAR(2048)"` @@ -20,7 +19,7 @@ func sanitizeOriginalURL(x *xorm.Engine) error { var last int const batchSize = 50 for { - var results = make([]Repository, 0, batchSize) + results := make([]Repository, 0, batchSize) err := x.Where("original_url <> '' AND original_url IS NOT NULL"). And("original_service_type = 0 OR original_service_type IS NULL"). OrderBy("id"). diff --git a/models/migrations/v115.go b/models/migrations/v115.go index fcec1f549..8222a8cee 100644 --- a/models/migrations/v115.go +++ b/models/migrations/v115.go @@ -151,7 +151,7 @@ func copyOldAvatarToNewLocation(userID int64, oldAvatar string) (string, error) return newAvatar, nil } - if err := ioutil.WriteFile(filepath.Join(setting.Avatar.Path, newAvatar), data, 0666); err != nil { + if err := ioutil.WriteFile(filepath.Join(setting.Avatar.Path, newAvatar), data, 0o666); err != nil { return "", fmt.Errorf("ioutil.WriteFile: %v", err) } diff --git a/models/migrations/v116.go b/models/migrations/v116.go index 254d4e7a1..c684c05fd 100644 --- a/models/migrations/v116.go +++ b/models/migrations/v116.go @@ -9,7 +9,6 @@ import ( ) func extendTrackedTimes(x *xorm.Engine) error { - type TrackedTime struct { Time int64 `xorm:"NOT NULL"` Deleted bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v122.go b/models/migrations/v122.go index e28adc1d8..7f4a49e69 100644 --- a/models/migrations/v122.go +++ b/models/migrations/v122.go @@ -9,7 +9,6 @@ import ( ) func addRequireSignedCommits(x *xorm.Engine) error { - type ProtectedBranch struct { RequireSignedCommits bool `xorm:"NOT NULL DEFAULT false"` } diff --git a/models/migrations/v124.go b/models/migrations/v124.go index e1a900065..0b61a04cb 100644 --- a/models/migrations/v124.go +++ b/models/migrations/v124.go @@ -9,7 +9,6 @@ import ( ) func addUserRepoMissingColumns(x *xorm.Engine) error { - type VisibleType int type User struct { PasswdHashAlgo string `xorm:"NOT NULL DEFAULT 'pbkdf2'"` diff --git a/models/migrations/v128.go b/models/migrations/v128.go index 9f698e3e5..746702338 100644 --- a/models/migrations/v128.go +++ b/models/migrations/v128.go @@ -40,7 +40,7 @@ func fixMergeBase(x *xorm.Engine) error { MergedCommitID string `xorm:"VARCHAR(40)"` } - var limit = setting.Database.IterateBufferSize + limit := setting.Database.IterateBufferSize if limit <= 0 { limit = 50 } diff --git a/models/migrations/v129.go b/models/migrations/v129.go index 26f8ed343..e935f2e07 100644 --- a/models/migrations/v129.go +++ b/models/migrations/v129.go @@ -9,7 +9,6 @@ import ( ) func purgeUnusedDependencies(x *xorm.Engine) error { - if _, err := x.Exec("DELETE FROM issue_dependency WHERE issue_id NOT IN (SELECT id FROM issue)"); err != nil { return err } diff --git a/models/migrations/v130.go b/models/migrations/v130.go index f7be11c40..7ffed3fd1 100644 --- a/models/migrations/v130.go +++ b/models/migrations/v130.go @@ -5,15 +5,13 @@ package migrations import ( - "encoding/json" - + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" "xorm.io/xorm" ) func expandWebhooks(x *xorm.Engine) error { - type HookEvents struct { Create bool `json:"create"` Delete bool `json:"delete"` @@ -58,7 +56,7 @@ func expandWebhooks(x *xorm.Engine) error { if err := sess.Begin(); err != nil { return err } - var results = make([]Webhook, 0, batchSize) + results := make([]Webhook, 0, batchSize) err := x.OrderBy("id"). Limit(batchSize, last). Find(&results) diff --git a/models/migrations/v134.go b/models/migrations/v134.go index 3ad94e736..df08cb39c 100644 --- a/models/migrations/v134.go +++ b/models/migrations/v134.go @@ -40,7 +40,7 @@ func refixMergeBase(x *xorm.Engine) error { MergedCommitID string `xorm:"VARCHAR(40)"` } - var limit = setting.Database.IterateBufferSize + limit := setting.Database.IterateBufferSize if limit <= 0 { limit = 50 } diff --git a/models/migrations/v136.go b/models/migrations/v136.go index 2203f1538..101cf7595 100644 --- a/models/migrations/v136.go +++ b/models/migrations/v136.go @@ -65,7 +65,7 @@ func addCommitDivergenceToPulls(x *xorm.Engine) error { if err := sess.Begin(); err != nil { return err } - var results = make([]*PullRequest, 0, batchSize) + results := make([]*PullRequest, 0, batchSize) err := sess.Where("has_merged = ?", false).OrderBy("id").Limit(batchSize, last).Find(&results) if err != nil { return err diff --git a/models/migrations/v141.go b/models/migrations/v141.go index b5824ecd4..ab05698b8 100644 --- a/models/migrations/v141.go +++ b/models/migrations/v141.go @@ -12,7 +12,7 @@ import ( func addKeepActivityPrivateUserColumn(x *xorm.Engine) error { type User struct { - KeepActivityPrivate bool + KeepActivityPrivate bool `xorm:"NOT NULL DEFAULT false"` } if err := x.Sync2(new(User)); err != nil { diff --git a/models/migrations/v144.go b/models/migrations/v144.go index beb089dde..311bb93e3 100644 --- a/models/migrations/v144.go +++ b/models/migrations/v144.go @@ -11,7 +11,7 @@ import ( ) func updateMatrixWebhookHTTPMethod(x *xorm.Engine) error { - var matrixHookTaskType = 9 // value comes from the models package + matrixHookTaskType := 9 // value comes from the models package type Webhook struct { HTTPMethod string } diff --git a/models/migrations/v146.go b/models/migrations/v146.go index 847bcf567..092589820 100644 --- a/models/migrations/v146.go +++ b/models/migrations/v146.go @@ -11,7 +11,6 @@ import ( ) func addProjectsInfo(x *xorm.Engine) error { - // Create new tables type ( ProjectType uint8 diff --git a/models/migrations/v147.go b/models/migrations/v147.go index a39b22403..ad4ec4ef7 100644 --- a/models/migrations/v147.go +++ b/models/migrations/v147.go @@ -75,7 +75,7 @@ func createReviewsForCodeComments(x *xorm.Engine) error { RefRepoID int64 `xorm:"index"` // Repo where the referencing RefIssueID int64 `xorm:"index"` RefCommentID int64 `xorm:"index"` // 0 if origin is Issue title or content (or PR's) - RefAction int `xorm:"SMALLINT"` // What hapens if RefIssueID resolves + RefAction int `xorm:"SMALLINT"` // What happens if RefIssueID resolves RefIsPull bool } @@ -83,7 +83,7 @@ func createReviewsForCodeComments(x *xorm.Engine) error { return err } - var updateComment = func(comments []*Comment) error { + updateComment := func(comments []*Comment) error { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { @@ -131,10 +131,10 @@ func createReviewsForCodeComments(x *xorm.Engine) error { return sess.Commit() } - var start = 0 - var batchSize = 100 + start := 0 + batchSize := 100 for { - var comments = make([]*Comment, 0, batchSize) + comments := make([]*Comment, 0, batchSize) if err := x.Where("review_id = 0 and type = 21").Limit(batchSize, start).Find(&comments); err != nil { return err } diff --git a/models/migrations/v156.go b/models/migrations/v156.go index 976d1a2d1..7158d7bb6 100644 --- a/models/migrations/v156.go +++ b/models/migrations/v156.go @@ -26,7 +26,6 @@ func userPath(userName string) string { } func fixPublisherIDforTagReleases(x *xorm.Engine) error { - type Release struct { ID int64 RepoID int64 @@ -89,6 +88,7 @@ func fixPublisherIDforTagReleases(x *xorm.Engine) error { repo = new(Repository) has, err := sess.ID(release.RepoID).Get(repo) if err != nil { + log.Error("Error whilst loading repository[%d] for release[%d] with tag name %s. Error: %v", release.RepoID, release.ID, release.TagName, err) return err } else if !has { log.Warn("Release[%d] is orphaned and refers to non-existing repository %d", release.ID, release.RepoID) @@ -100,28 +100,55 @@ func fixPublisherIDforTagReleases(x *xorm.Engine) error { // v120.go migration may not have been run correctly - we'll just replicate it here // because this appears to be a common-ish problem. if _, err := sess.Exec("UPDATE repository SET owner_name = (SELECT name FROM `user` WHERE `user`.id = repository.owner_id)"); err != nil { + log.Error("Error whilst updating repository[%d] owner name", repo.ID) return err } if _, err := sess.ID(release.RepoID).Get(repo); err != nil { + log.Error("Error whilst loading repository[%d] for release[%d] with tag name %s. Error: %v", release.RepoID, release.ID, release.TagName, err) return err } } gitRepo, err = git.OpenRepository(repoPath(repo.OwnerName, repo.Name)) if err != nil { + log.Error("Error whilst opening git repo for [%d]%s/%s. Error: %v", repo.ID, repo.OwnerName, repo.Name, err) return err } } commit, err := gitRepo.GetTagCommit(release.TagName) if err != nil { + if git.IsErrNotExist(err) { + log.Warn("Unable to find commit %s for Tag: %s in [%d]%s/%s. Cannot update publisher ID.", err.(git.ErrNotExist).ID, release.TagName, repo.ID, repo.OwnerName, repo.Name) + continue + } + log.Error("Error whilst getting commit for Tag: %s in [%d]%s/%s. Error: %v", release.TagName, repo.ID, repo.OwnerName, repo.Name, err) return fmt.Errorf("GetTagCommit: %v", err) } + if commit.Author.Email == "" { + log.Warn("Tag: %s in Repo[%d]%s/%s does not have a tagger.", release.TagName, repo.ID, repo.OwnerName, repo.Name) + commit, err = gitRepo.GetCommit(commit.ID.String()) + if err != nil { + if git.IsErrNotExist(err) { + log.Warn("Unable to find commit %s for Tag: %s in [%d]%s/%s. Cannot update publisher ID.", err.(git.ErrNotExist).ID, release.TagName, repo.ID, repo.OwnerName, repo.Name) + continue + } + log.Error("Error whilst getting commit for Tag: %s in [%d]%s/%s. Error: %v", release.TagName, repo.ID, repo.OwnerName, repo.Name, err) + return fmt.Errorf("GetCommit: %v", err) + } + } + + if commit.Author.Email == "" { + log.Warn("Tag: %s in Repo[%d]%s/%s does not have a Tagger and its underlying commit does not have an Author either!", release.TagName, repo.ID, repo.OwnerName, repo.Name) + continue + } + if user == nil || !strings.EqualFold(user.Email, commit.Author.Email) { user = new(User) _, err = sess.Where("email=?", commit.Author.Email).Get(user) if err != nil { + log.Error("Error whilst getting commit author by email: %s for Tag: %s in [%d]%s/%s. Error: %v", commit.Author.Email, release.TagName, repo.ID, repo.OwnerName, repo.Name, err) return err } @@ -134,6 +161,7 @@ func fixPublisherIDforTagReleases(x *xorm.Engine) error { release.PublisherID = user.ID if _, err := sess.ID(release.ID).Cols("publisher_id").Update(release); err != nil { + log.Error("Error whilst updating publisher[%d] for release[%d] with tag name %s. Error: %v", release.PublisherID, release.ID, release.TagName, err) return err } } diff --git a/models/migrations/v157.go b/models/migrations/v157.go index 9689281c8..e6738fd4d 100644 --- a/models/migrations/v157.go +++ b/models/migrations/v157.go @@ -9,7 +9,6 @@ import ( ) func fixRepoTopics(x *xorm.Engine) error { - type Topic struct { ID int64 `xorm:"pk autoincr"` Name string `xorm:"UNIQUE VARCHAR(25)"` diff --git a/models/migrations/v158.go b/models/migrations/v158.go index a6f2178f8..472516d70 100644 --- a/models/migrations/v158.go +++ b/models/migrations/v158.go @@ -51,10 +51,12 @@ func updateCodeCommentReplies(x *xorm.Engine) error { AND comment.id != first.id AND comment.commit_sha != first.commit_sha` - var sqlCmd string - var start = 0 - var batchSize = 100 - sess := x.NewSession() + var ( + sqlCmd string + start = 0 + batchSize = 100 + sess = x.NewSession() + ) defer sess.Close() for { if err := sess.Begin(); err != nil { @@ -68,7 +70,7 @@ func updateCodeCommentReplies(x *xorm.Engine) error { } } - var comments = make([]*Comment, 0, batchSize) + comments := make([]*Comment, 0, batchSize) switch { case setting.Database.UseMySQL: diff --git a/models/migrations/v161.go b/models/migrations/v161.go index 3eff7df8a..7ef06b4c2 100644 --- a/models/migrations/v161.go +++ b/models/migrations/v161.go @@ -19,18 +19,20 @@ func convertTaskTypeToString(x *xorm.Engine) error { MSTEAMS FEISHU MATRIX + WECHATWORK ) - var hookTaskTypes = map[int]string{ - GITEA: "gitea", - GOGS: "gogs", - SLACK: "slack", - DISCORD: "discord", - DINGTALK: "dingtalk", - TELEGRAM: "telegram", - MSTEAMS: "msteams", - FEISHU: "feishu", - MATRIX: "matrix", + hookTaskTypes := map[int]string{ + GITEA: "gitea", + GOGS: "gogs", + SLACK: "slack", + DISCORD: "discord", + DINGTALK: "dingtalk", + TELEGRAM: "telegram", + MSTEAMS: "msteams", + FEISHU: "feishu", + MATRIX: "matrix", + WECHATWORK: "wechatwork", } type HookTask struct { diff --git a/models/migrations/v162.go b/models/migrations/v162.go index b65eb4cd9..cf2baadbc 100644 --- a/models/migrations/v162.go +++ b/models/migrations/v162.go @@ -19,18 +19,20 @@ func convertWebhookTaskTypeToString(x *xorm.Engine) error { MSTEAMS FEISHU MATRIX + WECHATWORK ) - var hookTaskTypes = map[int]string{ - GITEA: "gitea", - GOGS: "gogs", - SLACK: "slack", - DISCORD: "discord", - DINGTALK: "dingtalk", - TELEGRAM: "telegram", - MSTEAMS: "msteams", - FEISHU: "feishu", - MATRIX: "matrix", + hookTaskTypes := map[int]string{ + GITEA: "gitea", + GOGS: "gogs", + SLACK: "slack", + DISCORD: "discord", + DINGTALK: "dingtalk", + TELEGRAM: "telegram", + MSTEAMS: "msteams", + FEISHU: "feishu", + MATRIX: "matrix", + WECHATWORK: "wechatwork", } type Webhook struct { diff --git a/models/migrations/v166.go b/models/migrations/v166.go index 3d6cf4f57..1b6e68b57 100644 --- a/models/migrations/v166.go +++ b/models/migrations/v166.go @@ -106,10 +106,8 @@ func recalculateUserEmptyPWD(x *xorm.Engine) (err error) { } // delete salt and algo where password is empty - if _, err = sess.Where(builder.Eq{"passwd": ""}.And(builder.Neq{"salt": ""}.Or(builder.Neq{"passwd_hash_algo": ""}))). - Cols("salt", "passwd_hash_algo").Update(&User{}); err != nil { - return err - } + _, err = sess.Where(builder.Eq{"passwd": ""}.And(builder.Neq{"salt": ""}.Or(builder.Neq{"passwd_hash_algo": ""}))). + Cols("salt", "passwd_hash_algo").Update(&User{}) - return sess.Commit() + return err } diff --git a/models/migrations/v167.go b/models/migrations/v167.go new file mode 100644 index 000000000..fd91f226a --- /dev/null +++ b/models/migrations/v167.go @@ -0,0 +1,24 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +func addUserRedirect(x *xorm.Engine) (err error) { + type UserRedirect struct { + ID int64 `xorm:"pk autoincr"` + LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + RedirectUserID int64 + } + + if err := x.Sync2(new(UserRedirect)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + return nil +} diff --git a/models/migrations/v168.go b/models/migrations/v168.go new file mode 100644 index 000000000..c34bb1d40 --- /dev/null +++ b/models/migrations/v168.go @@ -0,0 +1,11 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import "xorm.io/xorm" + +func recreateUserTableToFixDefaultValues(_ *xorm.Engine) error { + return nil +} diff --git a/models/migrations/v169.go b/models/migrations/v169.go new file mode 100644 index 000000000..e976281c5 --- /dev/null +++ b/models/migrations/v169.go @@ -0,0 +1,14 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" +) + +func commentTypeDeleteBranchUseOldRef(x *xorm.Engine) error { + _, err := x.Exec("UPDATE comment SET old_ref = commit_sha, commit_sha = '' WHERE type = 11") + return err +} diff --git a/models/migrations/v170.go b/models/migrations/v170.go new file mode 100644 index 000000000..853a23d29 --- /dev/null +++ b/models/migrations/v170.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +func addDismissedReviewColumn(x *xorm.Engine) error { + type Review struct { + Dismissed bool `xorm:"NOT NULL DEFAULT false"` + } + + if err := x.Sync2(new(Review)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + return nil +} diff --git a/models/migrations/v171.go b/models/migrations/v171.go new file mode 100644 index 000000000..2547ff0f7 --- /dev/null +++ b/models/migrations/v171.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +func addSortingColToProjectBoard(x *xorm.Engine) error { + type ProjectBoard struct { + Sorting int8 `xorm:"NOT NULL DEFAULT 0"` + } + + if err := x.Sync2(new(ProjectBoard)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + return nil +} diff --git a/models/migrations/v172.go b/models/migrations/v172.go new file mode 100644 index 000000000..125522a4b --- /dev/null +++ b/models/migrations/v172.go @@ -0,0 +1,20 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "code.gitea.io/gitea/modules/timeutil" + + "xorm.io/xorm" +) + +func addSessionTable(x *xorm.Engine) error { + type Session struct { + Key string `xorm:"pk CHAR(16)"` + Data []byte `xorm:"BLOB"` + Expiry timeutil.TimeStamp + } + return x.Sync2(new(Session)) +} diff --git a/models/migrations/v173.go b/models/migrations/v173.go new file mode 100644 index 000000000..dd4589066 --- /dev/null +++ b/models/migrations/v173.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +func addTimeIDCommentColumn(x *xorm.Engine) error { + type Comment struct { + TimeID int64 + } + + if err := x.Sync2(new(Comment)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + return nil +} diff --git a/models/migrations/v174.go b/models/migrations/v174.go new file mode 100644 index 000000000..5915d3626 --- /dev/null +++ b/models/migrations/v174.go @@ -0,0 +1,35 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +func addRepoTransfer(x *xorm.Engine) error { + type RepoTransfer struct { + ID int64 `xorm:"pk autoincr"` + DoerID int64 + RecipientID int64 + RepoID int64 + TeamIDs []int64 + CreatedUnix int64 `xorm:"INDEX NOT NULL created"` + UpdatedUnix int64 `xorm:"INDEX NOT NULL updated"` + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + if err := sess.Sync2(new(RepoTransfer)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + + return sess.Commit() +} diff --git a/models/migrations/v175.go b/models/migrations/v175.go new file mode 100644 index 000000000..0044ed184 --- /dev/null +++ b/models/migrations/v175.go @@ -0,0 +1,53 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + "regexp" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "xorm.io/xorm" +) + +func fixPostgresIDSequences(x *xorm.Engine) error { + if !setting.Database.UsePostgreSQL { + return nil + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + var sequences []string + schema := sess.Engine().Dialect().URI().Schema + + sess.Engine().SetSchema("") + if err := sess.Table("information_schema.sequences").Cols("sequence_name").Where("sequence_name LIKE 'tmp_recreate__%_id_seq%' AND sequence_catalog = ?", setting.Database.Name).Find(&sequences); err != nil { + log.Error("Unable to find sequences: %v", err) + return err + } + sess.Engine().SetSchema(schema) + + sequenceRegexp := regexp.MustCompile(`tmp_recreate__(\w+)_id_seq.*`) + + for _, sequence := range sequences { + tableName := sequenceRegexp.FindStringSubmatch(sequence)[1] + newSequenceName := tableName + "_id_seq" + if _, err := sess.Exec(fmt.Sprintf("ALTER SEQUENCE `%s` RENAME TO `%s`", sequence, newSequenceName)); err != nil { + log.Error("Unable to rename %s to %s. Error: %v", sequence, newSequenceName, err) + return err + } + if _, err := sess.Exec(fmt.Sprintf("SELECT setval('%s', COALESCE((SELECT MAX(id)+1 FROM `%s`), 1), false)", newSequenceName, tableName)); err != nil { + log.Error("Unable to reset sequence %s for %s. Error: %v", newSequenceName, tableName, err) + return err + } + } + + return sess.Commit() +} diff --git a/models/migrations/v176.go b/models/migrations/v176.go new file mode 100644 index 000000000..6436330a8 --- /dev/null +++ b/models/migrations/v176.go @@ -0,0 +1,77 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" +) + +// removeInvalidLabels looks through the database to look for comments and issue_labels +// that refer to labels do not belong to the repository or organization that repository +// that the issue is in +func removeInvalidLabels(x *xorm.Engine) error { + type Comment struct { + ID int64 `xorm:"pk autoincr"` + Type int `xorm:"INDEX"` + IssueID int64 `xorm:"INDEX"` + LabelID int64 + } + + type Issue struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"INDEX UNIQUE(repo_index)"` + Index int64 `xorm:"UNIQUE(repo_index)"` // Index in one repository. + } + + type Repository struct { + ID int64 `xorm:"pk autoincr"` + OwnerID int64 `xorm:"UNIQUE(s) index"` + LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + } + + type Label struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"INDEX"` + OrgID int64 `xorm:"INDEX"` + } + + type IssueLabel struct { + ID int64 `xorm:"pk autoincr"` + IssueID int64 `xorm:"UNIQUE(s)"` + LabelID int64 `xorm:"UNIQUE(s)"` + } + + if err := x.Sync2(new(Comment), new(Issue), new(Repository), new(Label), new(IssueLabel)); err != nil { + return err + } + + if _, err := x.Exec(`DELETE FROM issue_label WHERE issue_label.id IN ( + SELECT il_too.id FROM ( + SELECT il_too_too.id + FROM issue_label AS il_too_too + INNER JOIN label ON il_too_too.label_id = label.id + INNER JOIN issue on issue.id = il_too_too.issue_id + INNER JOIN repository on repository.id = issue.repo_id + WHERE + (label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id) + ) AS il_too )`); err != nil { + return err + } + + if _, err := x.Exec(`DELETE FROM comment WHERE comment.id IN ( + SELECT il_too.id FROM ( + SELECT com.id + FROM comment AS com + INNER JOIN label ON com.label_id = label.id + INNER JOIN issue on issue.id = com.issue_id + INNER JOIN repository on repository.id = issue.repo_id + WHERE + com.type = ? AND ((label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != repository.owner_id)) + ) AS il_too)`, 7); err != nil { + return err + } + + return nil +} diff --git a/models/migrations/v176_test.go b/models/migrations/v176_test.go new file mode 100644 index 000000000..2763e4f12 --- /dev/null +++ b/models/migrations/v176_test.go @@ -0,0 +1,128 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_removeInvalidLabels(t *testing.T) { + // Models used by the migration + type Comment struct { + ID int64 `xorm:"pk autoincr"` + Type int `xorm:"INDEX"` + IssueID int64 `xorm:"INDEX"` + LabelID int64 + ShouldRemain bool // <- Flag for testing the migration + } + + type Issue struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"INDEX UNIQUE(repo_index)"` + Index int64 `xorm:"UNIQUE(repo_index)"` // Index in one repository. + } + + type Repository struct { + ID int64 `xorm:"pk autoincr"` + OwnerID int64 `xorm:"UNIQUE(s) index"` + LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + } + + type Label struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"INDEX"` + OrgID int64 `xorm:"INDEX"` + } + + type IssueLabel struct { + ID int64 `xorm:"pk autoincr"` + IssueID int64 `xorm:"UNIQUE(s)"` + LabelID int64 `xorm:"UNIQUE(s)"` + ShouldRemain bool // <- Flag for testing the migration + } + + // load and prepare the test database + x, deferable := prepareTestEnv(t, 0, new(Comment), new(Issue), new(Repository), new(IssueLabel), new(Label)) + if x == nil || t.Failed() { + defer deferable() + return + } + defer deferable() + + var issueLabels []*IssueLabel + ilPreMigration := map[int64]*IssueLabel{} + ilPostMigration := map[int64]*IssueLabel{} + + var comments []*Comment + comPreMigration := map[int64]*Comment{} + comPostMigration := map[int64]*Comment{} + + // Get pre migration values + if err := x.Find(&issueLabels); err != nil { + t.Errorf("Unable to find issueLabels: %v", err) + return + } + for _, issueLabel := range issueLabels { + ilPreMigration[issueLabel.ID] = issueLabel + } + if err := x.Find(&comments); err != nil { + t.Errorf("Unable to find comments: %v", err) + return + } + for _, comment := range comments { + comPreMigration[comment.ID] = comment + } + + // Run the migration + if err := removeInvalidLabels(x); err != nil { + t.Errorf("unable to RemoveInvalidLabels: %v", err) + } + + // Get the post migration values + issueLabels = issueLabels[:0] + if err := x.Find(&issueLabels); err != nil { + t.Errorf("Unable to find issueLabels: %v", err) + return + } + for _, issueLabel := range issueLabels { + ilPostMigration[issueLabel.ID] = issueLabel + } + comments = comments[:0] + if err := x.Find(&comments); err != nil { + t.Errorf("Unable to find comments: %v", err) + return + } + for _, comment := range comments { + comPostMigration[comment.ID] = comment + } + + // Finally test results of the migration + for id, comment := range comPreMigration { + post, ok := comPostMigration[id] + if ok { + if !comment.ShouldRemain { + t.Errorf("Comment[%d] remained but should have been deleted", id) + } + assert.Equal(t, comment, post) + } else if comment.ShouldRemain { + t.Errorf("Comment[%d] was deleted but should have remained", id) + } + } + + for id, il := range ilPreMigration { + post, ok := ilPostMigration[id] + if ok { + if !il.ShouldRemain { + t.Errorf("IssueLabel[%d] remained but should have been deleted", id) + } + assert.Equal(t, il, post) + } else if il.ShouldRemain { + t.Errorf("IssueLabel[%d] was deleted but should have remained", id) + } + } + +} diff --git a/models/migrations/v177.go b/models/migrations/v177.go new file mode 100644 index 000000000..c65fd3de0 --- /dev/null +++ b/models/migrations/v177.go @@ -0,0 +1,43 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +// deleteOrphanedIssueLabels looks through the database for issue_labels where the label no longer exists and deletes them. +func deleteOrphanedIssueLabels(x *xorm.Engine) error { + type IssueLabel struct { + ID int64 `xorm:"pk autoincr"` + IssueID int64 `xorm:"UNIQUE(s)"` + LabelID int64 `xorm:"UNIQUE(s)"` + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + if err := sess.Sync2(new(IssueLabel)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + + if _, err := sess.Exec(`DELETE FROM issue_label WHERE issue_label.id IN ( + SELECT ill.id FROM ( + SELECT il.id + FROM issue_label AS il + LEFT JOIN label ON il.label_id = label.id + WHERE + label.id IS NULL + ) AS ill)`); err != nil { + return err + } + + return sess.Commit() +} diff --git a/models/migrations/v177_test.go b/models/migrations/v177_test.go new file mode 100644 index 000000000..02cb1d265 --- /dev/null +++ b/models/migrations/v177_test.go @@ -0,0 +1,88 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "testing" + + "code.gitea.io/gitea/modules/timeutil" + "github.com/stretchr/testify/assert" +) + +func Test_deleteOrphanedIssueLabels(t *testing.T) { + // Create the models used in the migration + type IssueLabel struct { + ID int64 `xorm:"pk autoincr"` + IssueID int64 `xorm:"UNIQUE(s)"` + LabelID int64 `xorm:"UNIQUE(s)"` + } + + type Label struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"INDEX"` + OrgID int64 `xorm:"INDEX"` + Name string + Description string + Color string `xorm:"VARCHAR(7)"` + NumIssues int + NumClosedIssues int + CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` + UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` + } + + // Prepare and load the testing database + x, deferable := prepareTestEnv(t, 0, new(IssueLabel), new(Label)) + if x == nil || t.Failed() { + defer deferable() + return + } + defer deferable() + + var issueLabels []*IssueLabel + preMigration := map[int64]*IssueLabel{} + postMigration := map[int64]*IssueLabel{} + + // Load issue labels that exist in the database pre-migration + if err := x.Find(&issueLabels); err != nil { + assert.NoError(t, err) + return + } + for _, issueLabel := range issueLabels { + preMigration[issueLabel.ID] = issueLabel + } + + // Run the migration + if err := deleteOrphanedIssueLabels(x); err != nil { + assert.NoError(t, err) + return + } + + // Load the remaining issue-labels + issueLabels = issueLabels[:0] + if err := x.Find(&issueLabels); err != nil { + assert.NoError(t, err) + return + } + for _, issueLabel := range issueLabels { + postMigration[issueLabel.ID] = issueLabel + } + + // Now test what is left + if _, ok := postMigration[2]; ok { + t.Errorf("Orphaned Label[2] survived the migration") + return + } + + if _, ok := postMigration[5]; ok { + t.Errorf("Orphaned Label[5] survived the migration") + return + } + + for id, post := range postMigration { + pre := preMigration[id] + assert.Equal(t, pre, post, "migration changed issueLabel %d", id) + } + +} diff --git a/models/migrations/v178.go b/models/migrations/v178.go new file mode 100644 index 000000000..c2a9af618 --- /dev/null +++ b/models/migrations/v178.go @@ -0,0 +1,18 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" +) + +func addLFSMirrorColumns(x *xorm.Engine) error { + type Mirror struct { + LFS bool `xorm:"lfs_enabled NOT NULL DEFAULT false"` + LFSEndpoint string `xorm:"lfs_endpoint TEXT"` + } + + return x.Sync2(new(Mirror)) +} diff --git a/models/migrations/v179.go b/models/migrations/v179.go new file mode 100644 index 000000000..735e6b62d --- /dev/null +++ b/models/migrations/v179.go @@ -0,0 +1,26 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" + "xorm.io/xorm/schemas" +) + +func convertAvatarURLToText(x *xorm.Engine) error { + dbType := x.Dialect().URI().DBType + if dbType == schemas.SQLITE { // For SQLITE, varchar or char will always be represented as TEXT + return nil + } + + // Some oauth2 providers may give very long avatar urls (i.e. Google) + return modifyColumn(x, "external_login_user", &schemas.Column{ + Name: "avatar_url", + SQLType: schemas.SQLType{ + Name: schemas.Text, + }, + Nullable: true, + }) +} diff --git a/models/migrations/v180.go b/models/migrations/v180.go new file mode 100644 index 000000000..1b735c203 --- /dev/null +++ b/models/migrations/v180.go @@ -0,0 +1,122 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/util" + + "xorm.io/builder" + "xorm.io/xorm" +) + +func deleteMigrationCredentials(x *xorm.Engine) (err error) { + // Task represents a task + type Task struct { + ID int64 + DoerID int64 `xorm:"index"` // operator + OwnerID int64 `xorm:"index"` // repo owner id, when creating, the repoID maybe zero + RepoID int64 `xorm:"index"` + Type int + Status int `xorm:"index"` + StartTime int64 + EndTime int64 + PayloadContent string `xorm:"TEXT"` + Errors string `xorm:"TEXT"` // if task failed, saved the error reason + Created int64 `xorm:"created"` + } + + const TaskTypeMigrateRepo = 0 + const TaskStatusStopped = 2 + + const batchSize = 100 + + // only match migration tasks, that are not pending or running + cond := builder.Eq{ + "type": TaskTypeMigrateRepo, + }.And(builder.Gte{ + "status": TaskStatusStopped, + }) + + sess := x.NewSession() + defer sess.Close() + + for start := 0; ; start += batchSize { + tasks := make([]*Task, 0, batchSize) + if err = sess.Limit(batchSize, start).Where(cond, 0).Find(&tasks); err != nil { + return + } + if len(tasks) == 0 { + break + } + if err = sess.Begin(); err != nil { + return + } + for _, t := range tasks { + if t.PayloadContent, err = removeCredentials(t.PayloadContent); err != nil { + return + } + if _, err = sess.ID(t.ID).Cols("payload_content").Update(t); err != nil { + return + } + } + if err = sess.Commit(); err != nil { + return + } + } + return +} + +func removeCredentials(payload string) (string, error) { + // MigrateOptions defines the way a repository gets migrated + // this is for internal usage by migrations module and func who interact with it + type MigrateOptions struct { + // required: true + CloneAddr string `json:"clone_addr" binding:"Required"` + CloneAddrEncrypted string `json:"clone_addr_encrypted,omitempty"` + AuthUsername string `json:"auth_username"` + AuthPassword string `json:"-"` + AuthPasswordEncrypted string `json:"auth_password_encrypted,omitempty"` + AuthToken string `json:"-"` + AuthTokenEncrypted string `json:"auth_token_encrypted,omitempty"` + // required: true + UID int `json:"uid" binding:"Required"` + // required: true + RepoName string `json:"repo_name" binding:"Required"` + Mirror bool `json:"mirror"` + LFS bool `json:"lfs"` + LFSEndpoint string `json:"lfs_endpoint"` + Private bool `json:"private"` + Description string `json:"description"` + OriginalURL string + GitServiceType int + Wiki bool + Issues bool + Milestones bool + Labels bool + Releases bool + Comments bool + PullRequests bool + ReleaseAssets bool + MigrateToRepoID int64 + MirrorInterval string `json:"mirror_interval"` + } + + var opts MigrateOptions + err := json.Unmarshal([]byte(payload), &opts) + if err != nil { + return "", err + } + + opts.AuthPassword = "" + opts.AuthToken = "" + opts.CloneAddr = util.NewStringURLSanitizer(opts.CloneAddr, true).Replace(opts.CloneAddr) + + confBytes, err := json.Marshal(opts) + if err != nil { + return "", err + } + return string(confBytes), nil +} diff --git a/models/migrations/v181.go b/models/migrations/v181.go new file mode 100644 index 000000000..65045593a --- /dev/null +++ b/models/migrations/v181.go @@ -0,0 +1,93 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "strings" + + "xorm.io/xorm" +) + +func addPrimaryEmail2EmailAddress(x *xorm.Engine) (err error) { + type User struct { + ID int64 `xorm:"pk autoincr"` + Email string `xorm:"NOT NULL"` + IsActive bool `xorm:"INDEX"` // Activate primary email + } + + type EmailAddress1 struct { + ID int64 `xorm:"pk autoincr"` + UID int64 `xorm:"INDEX NOT NULL"` + Email string `xorm:"UNIQUE NOT NULL"` + LowerEmail string + IsActivated bool + IsPrimary bool `xorm:"DEFAULT(false) NOT NULL"` + } + + // Add lower_email and is_primary columns + if err = x.Table("email_address").Sync2(new(EmailAddress1)); err != nil { + return + } + + if _, err = x.Exec("UPDATE email_address SET lower_email=LOWER(email), is_primary=?", false); err != nil { + return + } + + type EmailAddress struct { + ID int64 `xorm:"pk autoincr"` + UID int64 `xorm:"INDEX NOT NULL"` + Email string `xorm:"UNIQUE NOT NULL"` + LowerEmail string `xorm:"UNIQUE NOT NULL"` + IsActivated bool + IsPrimary bool `xorm:"DEFAULT(false) NOT NULL"` + } + + // change lower_email as unique + if err = x.Sync2(new(EmailAddress)); err != nil { + return + } + + sess := x.NewSession() + defer sess.Close() + + const batchSize = 100 + + for start := 0; ; start += batchSize { + users := make([]*User, 0, batchSize) + if err = sess.Limit(batchSize, start).Find(&users); err != nil { + return + } + if len(users) == 0 { + break + } + + for _, user := range users { + var exist bool + exist, err = sess.Where("email=?", user.Email).Table("email_address").Exist() + if err != nil { + return + } + if !exist { + if _, err = sess.Insert(&EmailAddress{ + UID: user.ID, + Email: user.Email, + LowerEmail: strings.ToLower(user.Email), + IsActivated: user.IsActive, + IsPrimary: true, + }); err != nil { + return + } + } else { + if _, err = sess.Where("email=?", user.Email).Cols("is_primary").Update(&EmailAddress{ + IsPrimary: true, + }); err != nil { + return + } + } + } + } + + return nil +} diff --git a/models/migrations/v181_test.go b/models/migrations/v181_test.go new file mode 100644 index 000000000..b392a9b71 --- /dev/null +++ b/models/migrations/v181_test.go @@ -0,0 +1,54 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_addPrimaryEmail2EmailAddress(t *testing.T) { + type User struct { + ID int64 + Email string + IsActive bool + } + + // Prepare and load the testing database + x, deferable := prepareTestEnv(t, 0, new(User)) + if x == nil || t.Failed() { + defer deferable() + return + } + defer deferable() + + err := addPrimaryEmail2EmailAddress(x) + assert.NoError(t, err) + + type EmailAddress struct { + ID int64 `xorm:"pk autoincr"` + UID int64 `xorm:"INDEX NOT NULL"` + Email string `xorm:"UNIQUE NOT NULL"` + LowerEmail string `xorm:"UNIQUE NOT NULL"` + IsActivated bool + IsPrimary bool `xorm:"DEFAULT(false) NOT NULL"` + } + + var users = make([]User, 0, 20) + err = x.Find(&users) + assert.NoError(t, err) + + for _, user := range users { + var emailAddress EmailAddress + has, err := x.Where("lower_email=?", strings.ToLower(user.Email)).Get(&emailAddress) + assert.NoError(t, err) + assert.True(t, has) + assert.True(t, emailAddress.IsPrimary) + assert.EqualValues(t, user.IsActive, emailAddress.IsActivated) + assert.EqualValues(t, user.ID, emailAddress.UID) + } +} diff --git a/models/migrations/v182.go b/models/migrations/v182.go new file mode 100644 index 000000000..29c2d2654 --- /dev/null +++ b/models/migrations/v182.go @@ -0,0 +1,42 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" +) + +func addIssueResourceIndexTable(x *xorm.Engine) error { + type ResourceIndex struct { + GroupID int64 `xorm:"pk"` + MaxIndex int64 `xorm:"index"` + } + + sess := x.NewSession() + defer sess.Close() + + if err := sess.Begin(); err != nil { + return err + } + + if err := sess.Table("issue_index").Sync2(new(ResourceIndex)); err != nil { + return err + } + + // Remove data we're goint to rebuild + if _, err := sess.Table("issue_index").Where("1=1").Delete(&ResourceIndex{}); err != nil { + return err + } + + // Create current data for all repositories with issues and PRs + if _, err := sess.Exec("INSERT INTO issue_index (group_id, max_index) " + + "SELECT max_data.repo_id, max_data.max_index " + + "FROM ( SELECT issue.repo_id AS repo_id, max(issue.`index`) AS max_index " + + "FROM issue GROUP BY issue.repo_id) AS max_data"); err != nil { + return err + } + + return sess.Commit() +} diff --git a/models/migrations/v182_test.go b/models/migrations/v182_test.go new file mode 100644 index 000000000..9fb371e07 --- /dev/null +++ b/models/migrations/v182_test.go @@ -0,0 +1,59 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func Test_addIssueResourceIndexTable(t *testing.T) { + // Create the models used in the migration + type Issue struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"UNIQUE(s)"` + Index int64 `xorm:"UNIQUE(s)"` + } + + // Prepare and load the testing database + x, deferable := prepareTestEnv(t, 0, new(Issue)) + if x == nil || t.Failed() { + defer deferable() + return + } + defer deferable() + + // Run the migration + if err := addIssueResourceIndexTable(x); err != nil { + assert.NoError(t, err) + return + } + + type ResourceIndex struct { + GroupID int64 `xorm:"pk"` + MaxIndex int64 `xorm:"index"` + } + + var start = 0 + const batchSize = 1000 + for { + var indexes = make([]ResourceIndex, 0, batchSize) + err := x.Table("issue_index").Limit(batchSize, start).Find(&indexes) + assert.NoError(t, err) + + for _, idx := range indexes { + var maxIndex int + has, err := x.SQL("SELECT max(`index`) FROM issue WHERE repo_id = ?", idx.GroupID).Get(&maxIndex) + assert.NoError(t, err) + assert.True(t, has) + assert.EqualValues(t, maxIndex, idx.MaxIndex) + } + if len(indexes) < batchSize { + break + } + start += len(indexes) + } +} diff --git a/models/migrations/v183.go b/models/migrations/v183.go new file mode 100644 index 000000000..cc752bf82 --- /dev/null +++ b/models/migrations/v183.go @@ -0,0 +1,39 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + "time" + + "code.gitea.io/gitea/modules/timeutil" + + "xorm.io/xorm" +) + +func createPushMirrorTable(x *xorm.Engine) error { + type PushMirror struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"INDEX"` + RemoteName string + + Interval time.Duration + CreatedUnix timeutil.TimeStamp `xorm:"created"` + LastUpdateUnix timeutil.TimeStamp `xorm:"INDEX last_update"` + LastError string `xorm:"text"` + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + if err := sess.Sync2(new(PushMirror)); err != nil { + return fmt.Errorf("Sync2: %v", err) + } + + return sess.Commit() +} diff --git a/models/migrations/v184.go b/models/migrations/v184.go new file mode 100644 index 000000000..b7be342b8 --- /dev/null +++ b/models/migrations/v184.go @@ -0,0 +1,47 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "code.gitea.io/gitea/modules/setting" + + "xorm.io/xorm" +) + +func renameTaskErrorsToMessage(x *xorm.Engine) error { + type Task struct { + Errors string `xorm:"TEXT"` // if task failed, saved the error reason + Type int + Status int `xorm:"index"` + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + if err := sess.Sync2(new(Task)); err != nil { + return fmt.Errorf("error on Sync2: %v", err) + } + + switch { + case setting.Database.UseMySQL: + if _, err := sess.Exec("ALTER TABLE `task` CHANGE errors message text"); err != nil { + return err + } + case setting.Database.UseMSSQL: + if _, err := sess.Exec("sp_rename 'task.errors', 'message', 'COLUMN'"); err != nil { + return err + } + default: + if _, err := sess.Exec("ALTER TABLE `task` RENAME COLUMN errors TO message"); err != nil { + return err + } + } + return sess.Commit() +} diff --git a/models/migrations/v185.go b/models/migrations/v185.go new file mode 100644 index 000000000..096994889 --- /dev/null +++ b/models/migrations/v185.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" +) + +func addRepoArchiver(x *xorm.Engine) error { + // RepoArchiver represents all archivers + type RepoArchiver struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"index unique(s)"` + Type int `xorm:"unique(s)"` + Status int + CommitID string `xorm:"VARCHAR(40) unique(s)"` + CreatedUnix int64 `xorm:"INDEX NOT NULL created"` + } + return x.Sync2(new(RepoArchiver)) +} diff --git a/models/migrations/v186.go b/models/migrations/v186.go new file mode 100644 index 000000000..eb6ec7118 --- /dev/null +++ b/models/migrations/v186.go @@ -0,0 +1,26 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "code.gitea.io/gitea/modules/timeutil" + + "xorm.io/xorm" +) + +func createProtectedTagTable(x *xorm.Engine) error { + type ProtectedTag struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 + NamePattern string + AllowlistUserIDs []int64 `xorm:"JSON TEXT"` + AllowlistTeamIDs []int64 `xorm:"JSON TEXT"` + + CreatedUnix timeutil.TimeStamp `xorm:"created"` + UpdatedUnix timeutil.TimeStamp `xorm:"updated"` + } + + return x.Sync2(new(ProtectedTag)) +} diff --git a/models/migrations/v187.go b/models/migrations/v187.go new file mode 100644 index 000000000..627423717 --- /dev/null +++ b/models/migrations/v187.go @@ -0,0 +1,46 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" +) + +func dropWebhookColumns(x *xorm.Engine) error { + // Make sure the columns exist before dropping them + type Webhook struct { + Signature string `xorm:"TEXT"` + IsSSL bool `xorm:"is_ssl"` + } + if err := x.Sync2(new(Webhook)); err != nil { + return err + } + + type HookTask struct { + Typ string `xorm:"VARCHAR(16) index"` + URL string `xorm:"TEXT"` + Signature string `xorm:"TEXT"` + HTTPMethod string `xorm:"http_method"` + ContentType int + IsSSL bool + } + if err := x.Sync2(new(HookTask)); err != nil { + return err + } + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + if err := dropTableColumns(sess, "webhook", "signature", "is_ssl"); err != nil { + return err + } + if err := dropTableColumns(sess, "hook_task", "typ", "url", "signature", "http_method", "content_type", "is_ssl"); err != nil { + return err + } + + return sess.Commit() +} diff --git a/models/migrations/v188.go b/models/migrations/v188.go new file mode 100644 index 000000000..52ef4aaa8 --- /dev/null +++ b/models/migrations/v188.go @@ -0,0 +1,15 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import "xorm.io/xorm" + +func addKeyIsVerified(x *xorm.Engine) error { + type GPGKey struct { + Verified bool `xorm:"NOT NULL DEFAULT false"` + } + + return x.Sync(new(GPGKey)) +} diff --git a/models/migrations/v189.go b/models/migrations/v189.go new file mode 100644 index 000000000..f136a89b4 --- /dev/null +++ b/models/migrations/v189.go @@ -0,0 +1,111 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "encoding/binary" + "fmt" + + "code.gitea.io/gitea/modules/json" + + "xorm.io/xorm" +) + +func unwrapLDAPSourceCfg(x *xorm.Engine) error { + jsonUnmarshalHandleDoubleEncode := func(bs []byte, v interface{}) error { + err := json.Unmarshal(bs, v) + if err != nil { + ok := true + rs := []byte{} + temp := make([]byte, 2) + for _, rn := range string(bs) { + if rn > 0xffff { + ok = false + break + } + binary.LittleEndian.PutUint16(temp, uint16(rn)) + rs = append(rs, temp...) + } + if ok { + if rs[0] == 0xff && rs[1] == 0xfe { + rs = rs[2:] + } + err = json.Unmarshal(rs, v) + } + } + if err != nil && len(bs) > 2 && bs[0] == 0xff && bs[1] == 0xfe { + err = json.Unmarshal(bs[2:], v) + } + return err + } + + // LoginSource represents an external way for authorizing users. + type LoginSource struct { + ID int64 `xorm:"pk autoincr"` + Type int + IsActived bool `xorm:"INDEX NOT NULL DEFAULT false"` + IsActive bool `xorm:"INDEX NOT NULL DEFAULT false"` + Cfg string `xorm:"TEXT"` + } + + const ldapType = 2 + const dldapType = 5 + + type WrappedSource struct { + Source map[string]interface{} + } + + // change lower_email as unique + if err := x.Sync2(new(LoginSource)); err != nil { + return err + } + + sess := x.NewSession() + defer sess.Close() + + const batchSize = 100 + for start := 0; ; start += batchSize { + sources := make([]*LoginSource, 0, batchSize) + if err := sess.Limit(batchSize, start).Where("`type` = ? OR `type` = ?", ldapType, dldapType).Find(&sources); err != nil { + return err + } + if len(sources) == 0 { + break + } + + for _, source := range sources { + wrapped := &WrappedSource{ + Source: map[string]interface{}{}, + } + err := jsonUnmarshalHandleDoubleEncode([]byte(source.Cfg), &wrapped) + if err != nil { + return fmt.Errorf("failed to unmarshal %s: %w", string(source.Cfg), err) + } + if wrapped.Source != nil && len(wrapped.Source) > 0 { + bs, err := json.Marshal(wrapped.Source) + if err != nil { + return err + } + source.Cfg = string(bs) + if _, err := sess.ID(source.ID).Cols("cfg").Update(source); err != nil { + return err + } + } + } + } + + if _, err := x.SetExpr("is_active", "is_actived").Update(&LoginSource{}); err != nil { + return fmt.Errorf("SetExpr Update failed: %w", err) + } + + if err := sess.Begin(); err != nil { + return err + } + if err := dropTableColumns(sess, "login_source", "is_actived"); err != nil { + return err + } + + return sess.Commit() +} diff --git a/models/migrations/v189_test.go b/models/migrations/v189_test.go new file mode 100644 index 000000000..fcae5dcc7 --- /dev/null +++ b/models/migrations/v189_test.go @@ -0,0 +1,84 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "testing" + + "code.gitea.io/gitea/modules/json" + + "github.com/stretchr/testify/assert" +) + +// LoginSource represents an external way for authorizing users. +type LoginSourceOriginalV189 struct { + ID int64 `xorm:"pk autoincr"` + Type int + IsActived bool `xorm:"INDEX NOT NULL DEFAULT false"` + Cfg string `xorm:"TEXT"` + Expected string `xorm:"TEXT"` +} + +func (ls *LoginSourceOriginalV189) TableName() string { + return "login_source" +} + +func Test_unwrapLDAPSourceCfg(t *testing.T) { + + // Prepare and load the testing database + x, deferable := prepareTestEnv(t, 0, new(LoginSourceOriginalV189)) + if x == nil || t.Failed() { + defer deferable() + return + } + defer deferable() + + // LoginSource represents an external way for authorizing users. + type LoginSource struct { + ID int64 `xorm:"pk autoincr"` + Type int + IsActive bool `xorm:"INDEX NOT NULL DEFAULT false"` + Cfg string `xorm:"TEXT"` + Expected string `xorm:"TEXT"` + } + + // Run the migration + if err := unwrapLDAPSourceCfg(x); err != nil { + assert.NoError(t, err) + return + } + + const batchSize = 100 + for start := 0; ; start += batchSize { + sources := make([]*LoginSource, 0, batchSize) + if err := x.Table("login_source").Limit(batchSize, start).Find(&sources); err != nil { + assert.NoError(t, err) + return + } + + if len(sources) == 0 { + break + } + + for _, source := range sources { + converted := map[string]interface{}{} + expected := map[string]interface{}{} + + if err := json.Unmarshal([]byte(source.Cfg), &converted); err != nil { + assert.NoError(t, err) + return + } + + if err := json.Unmarshal([]byte(source.Expected), &expected); err != nil { + assert.NoError(t, err) + return + } + + assert.EqualValues(t, expected, converted, "unwrapLDAPSourceCfg failed for %d", source.ID) + assert.EqualValues(t, source.ID%2 == 0, source.IsActive, "unwrapLDAPSourceCfg failed for %d", source.ID) + } + } + +} diff --git a/models/migrations/v190.go b/models/migrations/v190.go new file mode 100644 index 000000000..8d1fba837 --- /dev/null +++ b/models/migrations/v190.go @@ -0,0 +1,24 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "fmt" + + "xorm.io/xorm" +) + +func addAgitFlowPullRequest(x *xorm.Engine) error { + type PullRequestFlow int + + type PullRequest struct { + Flow PullRequestFlow `xorm:"NOT NULL DEFAULT 0"` + } + + if err := x.Sync2(new(PullRequest)); err != nil { + return fmt.Errorf("sync2: %v", err) + } + return nil +} diff --git a/models/migrations/v191.go b/models/migrations/v191.go new file mode 100644 index 000000000..10dfad4f0 --- /dev/null +++ b/models/migrations/v191.go @@ -0,0 +1,29 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "code.gitea.io/gitea/modules/setting" + "xorm.io/xorm" +) + +func alterIssueAndCommentTextFieldsToLongText(x *xorm.Engine) error { + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + if setting.Database.UseMySQL { + if _, err := sess.Exec("ALTER TABLE `issue` CHANGE `content` `content` LONGTEXT"); err != nil { + return err + } + if _, err := sess.Exec("ALTER TABLE `comment` CHANGE `content` `content` LONGTEXT, CHANGE `patch` `patch` LONGTEXT"); err != nil { + return err + } + } + return sess.Commit() +} diff --git a/models/migrations/v192.go b/models/migrations/v192.go new file mode 100644 index 000000000..f436e93d6 --- /dev/null +++ b/models/migrations/v192.go @@ -0,0 +1,18 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package migrations + +import ( + "xorm.io/xorm" +) + +func recreateIssueResourceIndexTable(x *xorm.Engine) error { + type IssueIndex struct { + GroupID int64 `xorm:"pk"` + MaxIndex int64 `xorm:"index"` + } + + return RecreateTables(new(IssueIndex))(x) +} diff --git a/models/migrations/v70.go b/models/migrations/v70.go index ea7ead60d..7d34c89d1 100644 --- a/models/migrations/v70.go +++ b/models/migrations/v70.go @@ -14,7 +14,6 @@ import ( ) func addIssueDependencies(x *xorm.Engine) (err error) { - type IssueDependency struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"NOT NULL"` @@ -90,7 +89,7 @@ func addIssueDependencies(x *xorm.Engine) (err error) { Created time.Time `xorm:"-"` } - //Updating existing issue units + // Updating existing issue units units := make([]*RepoUnit, 0, 100) err = x.Where("`type` = ?", v16UnitTypeIssues).Find(&units) if err != nil { diff --git a/models/migrations/v71.go b/models/migrations/v71.go index 0b6aff61b..e4ed46a21 100644 --- a/models/migrations/v71.go +++ b/models/migrations/v71.go @@ -8,8 +8,8 @@ import ( "crypto/sha256" "fmt" - "code.gitea.io/gitea/modules/generate" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" "golang.org/x/crypto/pbkdf2" "xorm.io/xorm" @@ -53,7 +53,7 @@ func addScratchHash(x *xorm.Engine) error { for _, tfa := range tfas { // generate salt - salt, err := generate.GetRandomString(10) + salt, err := util.RandomString(10) if err != nil { return err } @@ -79,7 +79,6 @@ func addScratchHash(x *xorm.Engine) error { return err } return sess.Commit() - } func hashToken(token, salt string) string { diff --git a/models/migrations/v76.go b/models/migrations/v76.go index 6bfe0c2d9..a82ae40ba 100644 --- a/models/migrations/v76.go +++ b/models/migrations/v76.go @@ -40,7 +40,7 @@ func addPullRequestRebaseWithMerge(x *xorm.Engine) error { return err } - //Updating existing issue units + // Updating existing issue units units := make([]*RepoUnit, 0, 100) if err := sess.Where("`type` = ?", v16UnitTypePRs).Find(&units); err != nil { return fmt.Errorf("Query repo units: %v", err) diff --git a/models/migrations/v79.go b/models/migrations/v79.go index 3c3e77b8d..818bfa4a0 100644 --- a/models/migrations/v79.go +++ b/models/migrations/v79.go @@ -11,7 +11,6 @@ import ( ) func addCanCloseIssuesViaCommitInAnyBranch(x *xorm.Engine) error { - type Repository struct { ID int64 `xorm:"pk autoincr"` CloseIssuesViaCommitInAnyBranch bool `xorm:"NOT NULL DEFAULT false"` diff --git a/models/migrations/v85.go b/models/migrations/v85.go index 8c92f10b6..bdbcebeb0 100644 --- a/models/migrations/v85.go +++ b/models/migrations/v85.go @@ -7,9 +7,9 @@ package migrations import ( "fmt" - "code.gitea.io/gitea/modules/generate" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" "xorm.io/xorm" ) @@ -65,7 +65,7 @@ func hashAppToken(x *xorm.Engine) error { for _, token := range tokens { // generate salt - salt, err := generate.GetRandomString(10) + salt, err := util.RandomString(10) if err != nil { return err } diff --git a/models/migrations/v88.go b/models/migrations/v88.go index 7318995a8..11cc26209 100644 --- a/models/migrations/v88.go +++ b/models/migrations/v88.go @@ -29,9 +29,9 @@ func addCommitStatusContext(x *xorm.Engine) error { sess := x.NewSession() defer sess.Close() - var start = 0 + start := 0 for { - var statuses = make([]*CommitStatus, 0, 100) + statuses := make([]*CommitStatus, 0, 100) err := sess.OrderBy("id").Limit(100, start).Find(&statuses) if err != nil { return err diff --git a/models/migrations/v92.go b/models/migrations/v92.go index 7ad511817..e343dedb6 100644 --- a/models/migrations/v92.go +++ b/models/migrations/v92.go @@ -10,7 +10,6 @@ import ( ) func removeLingeringIndexStatus(x *xorm.Engine) error { - _, err := x.Exec(builder.Delete(builder.NotIn("`repo_id`", builder.Select("`id`").From("`repository`"))).From("`repo_indexer_status`")) return err } diff --git a/models/migrations/v96.go b/models/migrations/v96.go index f471ac384..eaeab72b0 100644 --- a/models/migrations/v96.go +++ b/models/migrations/v96.go @@ -25,7 +25,7 @@ func deleteOrphanedAttachments(x *xorm.Engine) error { sess := x.NewSession() defer sess.Close() - var limit = setting.Database.IterateBufferSize + limit := setting.Database.IterateBufferSize if limit <= 0 { limit = 50 } @@ -42,7 +42,7 @@ func deleteOrphanedAttachments(x *xorm.Engine) error { return nil } - var ids = make([]int64, 0, limit) + ids := make([]int64, 0, limit) for _, attachment := range attachements { ids = append(ids, attachment.ID) } diff --git a/models/models.go b/models/models.go old mode 100644 new mode 100755 index f12a4e8b3..4e1448241 --- a/models/models.go +++ b/models/models.go @@ -17,6 +17,7 @@ import ( // Needed for the MySQL driver _ "github.com/go-sql-driver/mysql" + lru "github.com/hashicorp/golang-lru" "xorm.io/xorm" "xorm.io/xorm/names" "xorm.io/xorm/schemas" @@ -33,7 +34,7 @@ type Engine interface { Table(tableNameOrBean interface{}) *xorm.Session Count(...interface{}) (int64, error) Decr(column string, arg ...interface{}) *xorm.Session - Delete(interface{}) (int64, error) + Delete(...interface{}) (int64, error) Exec(...interface{}) (sql.Result, error) Find(interface{}, ...interface{}) error Get(interface{}) (bool, error) @@ -128,9 +129,16 @@ func init() { new(Task), new(LanguageStat), new(EmailHash), + new(UserRedirect), new(Project), new(ProjectBoard), new(ProjectIssue), + new(Session), + new(RepoTransfer), + new(IssueIndex), + new(PushMirror), + new(RepoArchiver), + new(ProtectedTag), ) gonicNames := []string{"SSL", "UID"} @@ -139,7 +147,8 @@ func init() { } } -func getEngine() (*xorm.Engine, error) { +// GetNewEngine returns a new xorm engine from the configuration +func GetNewEngine() (*xorm.Engine, error) { connStr, err := setting.DBConnStr() if err != nil { return nil, err @@ -167,22 +176,26 @@ func getEngine() (*xorm.Engine, error) { return engine, nil } +func syncTables() error { + return x.StoreEngine("InnoDB").Sync2(tables...) +} + // NewTestEngine sets a new test xorm.Engine func NewTestEngine() (err error) { - x, err = getEngine() + x, err = GetNewEngine() if err != nil { return fmt.Errorf("Connect to database: %v", err) } x.SetMapper(names.GonicMapper{}) - x.SetLogger(NewXORMLogger(!setting.ProdMode)) - x.ShowSQL(!setting.ProdMode) - return x.StoreEngine("InnoDB").Sync2(tables...) + x.SetLogger(NewXORMLogger(!setting.IsProd())) + x.ShowSQL(!setting.IsProd()) + return syncTables() } // SetEngine sets the xorm.Engine func SetEngine() (err error) { - x, err = getEngine() + x, err = GetNewEngine() if err != nil { return fmt.Errorf("Failed to connect to database: %v", err) } @@ -218,10 +231,19 @@ func NewEngine(ctx context.Context, migrateFunc func(*xorm.Engine) error) (err e return fmt.Errorf("migrate: %v", err) } - if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil { + if err = syncTables(); err != nil { return fmt.Errorf("sync database struct error: %v", err) } + if setting.SuccessfulTokensCacheSize > 0 { + successfulAccessTokenCache, err = lru.New(setting.SuccessfulTokensCacheSize) + if err != nil { + return fmt.Errorf("unable to allocate AccessToken cache: %v", err) + } + } else { + successfulAccessTokenCache = nil + } + return nil } @@ -260,7 +282,8 @@ type Statistic struct { Counter struct { User, Org, PublicKey, Repo, Watch, Star, Action, Access, - Issue, Comment, Oauth, Follow, + Issue, IssueClosed, IssueOpen, + Comment, Oauth, Follow, Mirror, Release, LoginSource, Webhook, Milestone, Label, HookTask, Team, UpdateTask, Attachment int64 @@ -277,7 +300,24 @@ func GetStatistic() (stats Statistic) { stats.Counter.Star, _ = x.Count(new(Star)) stats.Counter.Action, _ = x.Count(new(Action)) stats.Counter.Access, _ = x.Count(new(Access)) - stats.Counter.Issue, _ = x.Count(new(Issue)) + + type IssueCount struct { + Count int64 + IsClosed bool + } + issueCounts := []IssueCount{} + + _ = x.Select("COUNT(*) AS count, is_closed").Table("issue").GroupBy("is_closed").Find(&issueCounts) + for _, c := range issueCounts { + if c.IsClosed { + stats.Counter.IssueClosed = c.Count + } else { + stats.Counter.IssueOpen = c.Count + } + } + + stats.Counter.Issue = stats.Counter.IssueClosed + stats.Counter.IssueOpen + stats.Counter.Comment, _ = x.Count(new(Comment)) stats.Counter.Oauth = 0 stats.Counter.Follow, _ = x.Count(new(Follow)) @@ -302,7 +342,7 @@ func Ping() error { } // DumpDatabase dumps all data from database according the special database SQL syntax to file system. -func DumpDatabase(filePath string, dbType string) error { +func DumpDatabase(filePath, dbType string) error { var tbs []*schemas.Table for _, t := range tables { t, err := x.TableInfo(t) @@ -316,7 +356,7 @@ func DumpDatabase(filePath string, dbType string) error { ID int64 `xorm:"pk autoincr"` Version int64 } - t, err := x.TableInfo(Version{}) + t, err := x.TableInfo(&Version{}) if err != nil { return err } diff --git a/models/models_test.go b/models/models_test.go index 2441ad7fb..c75c299e4 100644 --- a/models/models_test.go +++ b/models/models_test.go @@ -5,12 +5,15 @@ package models import ( + "encoding/json" "io/ioutil" "os" "path/filepath" + "strings" "testing" "code.gitea.io/gitea/modules/setting" + "xorm.io/xorm/schemas" "github.com/stretchr/testify/assert" ) @@ -25,10 +28,53 @@ func TestDumpDatabase(t *testing.T) { ID int64 `xorm:"pk autoincr"` Version int64 } - assert.NoError(t, x.Sync2(Version{})) + assert.NoError(t, x.Sync2(new(Version))) for _, dbName := range setting.SupportedDatabases { dbType := setting.GetDBTypeByName(dbName) assert.NoError(t, DumpDatabase(filepath.Join(dir, dbType+".sql"), dbType)) } } + +type TestSource struct { + Provider string + ClientID string + ClientSecret string + OpenIDConnectAutoDiscoveryURL string + IconURL string +} + +// FromDB fills up a LDAPConfig from serialized format. +func (source *TestSource) FromDB(bs []byte) error { + return json.Unmarshal(bs, &source) +} + +// ToDB exports a LDAPConfig to a serialized format. +func (source *TestSource) ToDB() ([]byte, error) { + return json.Marshal(source) +} + +func TestDumpLoginSource(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + loginSourceSchema, err := x.TableInfo(new(LoginSource)) + assert.NoError(t, err) + + RegisterLoginTypeConfig(LoginOAuth2, new(TestSource)) + + CreateLoginSource(&LoginSource{ + Type: LoginOAuth2, + Name: "TestSource", + IsActive: false, + Cfg: &TestSource{ + Provider: "ConvertibleSourceName", + ClientID: "42", + }, + }) + + sb := new(strings.Builder) + + x.DumpTables([]*schemas.Table{loginSourceSchema}, sb) + + assert.Contains(t, sb.String(), `"Provider":"ConvertibleSourceName"`) +} diff --git a/models/notification.go b/models/notification.go index 362b49099..30bb7596a 100644 --- a/models/notification.go +++ b/models/notification.go @@ -6,7 +6,7 @@ package models import ( "fmt" - "path" + "strconv" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" @@ -39,6 +39,8 @@ const ( NotificationSourcePullRequest // NotificationSourceCommit is a notification of a commit NotificationSourceCommit + // NotificationSourceRepository is a notification for a repository + NotificationSourceRepository ) // Notification represents a notification @@ -72,6 +74,7 @@ type FindNotificationOptions struct { RepoID int64 IssueID int64 Status []NotificationStatus + Source []NotificationSource UpdatedAfterUnix int64 UpdatedBeforeUnix int64 } @@ -91,6 +94,9 @@ func (opts *FindNotificationOptions) ToCond() builder.Cond { if len(opts.Status) > 0 { cond = cond.And(builder.In("notification.status", opts.Status)) } + if len(opts.Source) > 0 { + cond = cond.And(builder.In("notification.source", opts.Source)) + } if opts.UpdatedAfterUnix != 0 { cond = cond.And(builder.Gte{"notification.updated_unix": opts.UpdatedAfterUnix}) } @@ -109,16 +115,61 @@ func (opts *FindNotificationOptions) ToSession(e Engine) *xorm.Session { return sess } -func getNotifications(e Engine, options FindNotificationOptions) (nl NotificationList, err error) { +func getNotifications(e Engine, options *FindNotificationOptions) (nl NotificationList, err error) { err = options.ToSession(e).OrderBy("notification.updated_unix DESC").Find(&nl) return } // GetNotifications returns all notifications that fit to the given options. -func GetNotifications(opts FindNotificationOptions) (NotificationList, error) { +func GetNotifications(opts *FindNotificationOptions) (NotificationList, error) { return getNotifications(x, opts) } +// CountNotifications count all notifications that fit to the given options and ignore pagination. +func CountNotifications(opts *FindNotificationOptions) (int64, error) { + return x.Where(opts.ToCond()).Count(&Notification{}) +} + +// CreateRepoTransferNotification creates notification for the user a repository was transferred to +func CreateRepoTransferNotification(doer, newOwner *User, repo *Repository) error { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + var notify []*Notification + + if newOwner.IsOrganization() { + users, err := getUsersWhoCanCreateOrgRepo(sess, newOwner.ID) + if err != nil || len(users) == 0 { + return err + } + for i := range users { + notify = append(notify, &Notification{ + UserID: users[i].ID, + RepoID: repo.ID, + Status: NotificationStatusUnread, + UpdatedBy: doer.ID, + Source: NotificationSourceRepository, + }) + } + } else { + notify = []*Notification{{ + UserID: newOwner.ID, + RepoID: repo.ID, + Status: NotificationStatusUnread, + UpdatedBy: doer.ID, + Source: NotificationSourceRepository, + }} + } + + if _, err := sess.InsertMulti(notify); err != nil { + return err + } + + return sess.Commit() +} + // CreateOrUpdateIssueNotifications creates an issue notification // for each watcher, or updates it if already exists // receiverID > 0 just send to reciver, else send to all watcher @@ -140,7 +191,6 @@ func createOrUpdateIssueNotifications(e Engine, issueID, commentID, notification // init var toNotify map[int64]struct{} notifications, err := getNotificationsByIssueID(e, issueID) - if err != nil { return err } @@ -162,13 +212,14 @@ func createOrUpdateIssueNotifications(e Engine, issueID, commentID, notification for _, id := range issueWatches { toNotify[id] = struct{}{} } - - repoWatches, err := getRepoWatchersIDs(e, issue.RepoID) - if err != nil { - return err - } - for _, id := range repoWatches { - toNotify[id] = struct{}{} + if !(issue.IsPull && HasWorkInProgressPrefix(issue.Title)) { + repoWatches, err := getRepoWatchersIDs(e, issue.RepoID) + if err != nil { + return err + } + for _, id := range repoWatches { + toNotify[id] = struct{}{} + } } issueParticipants, err := issue.getParticipantIDsByIssue(e) if err != nil { @@ -363,7 +414,7 @@ func (n *Notification) loadRepo(e Engine) (err error) { } func (n *Notification) loadIssue(e Engine) (err error) { - if n.Issue == nil { + if n.Issue == nil && n.IssueID != 0 { n.Issue, err = getIssueByID(e, n.IssueID) if err != nil { return fmt.Errorf("getIssueByID [%d]: %v", n.IssueID, err) @@ -374,7 +425,7 @@ func (n *Notification) loadIssue(e Engine) (err error) { } func (n *Notification) loadComment(e Engine) (err error) { - if n.Comment == nil && n.CommentID > 0 { + if n.Comment == nil && n.CommentID != 0 { n.Comment, err = getCommentByID(e, n.CommentID) if err != nil { return fmt.Errorf("GetCommentByID [%d] for issue ID [%d]: %v", n.CommentID, n.IssueID, err) @@ -405,15 +456,23 @@ func (n *Notification) GetIssue() (*Issue, error) { // HTMLURL formats a URL-string to the notification func (n *Notification) HTMLURL() string { - if n.Comment != nil { - return n.Comment.HTMLURL() + switch n.Source { + case NotificationSourceIssue, NotificationSourcePullRequest: + if n.Comment != nil { + return n.Comment.HTMLURL() + } + return n.Issue.HTMLURL() + case NotificationSourceCommit: + return n.Repository.HTMLURL() + "/commit/" + n.CommitID + case NotificationSourceRepository: + return n.Repository.HTMLURL() } - return n.Issue.HTMLURL() + return "" } // APIURL formats a URL-string to the notification func (n *Notification) APIURL() string { - return setting.AppURL + path.Join("api/v1/notifications/threads", fmt.Sprintf("%d", n.ID)) + return setting.AppURL + "api/v1/notifications/threads/" + strconv.FormatInt(n.ID, 10) } // NotificationList contains a list of notifications @@ -431,7 +490,7 @@ func (nl NotificationList) LoadAttributes() (err error) { } func (nl NotificationList) getPendingRepoIDs() []int64 { - var ids = make(map[int64]struct{}, len(nl)) + ids := make(map[int64]struct{}, len(nl)) for _, notification := range nl { if notification.Repository != nil { continue @@ -449,11 +508,11 @@ func (nl NotificationList) LoadRepos() (RepositoryList, []int, error) { return RepositoryList{}, []int{}, nil } - var repoIDs = nl.getPendingRepoIDs() - var repos = make(map[int64]*Repository, len(repoIDs)) - var left = len(repoIDs) + repoIDs := nl.getPendingRepoIDs() + repos := make(map[int64]*Repository, len(repoIDs)) + left := len(repoIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -482,7 +541,7 @@ func (nl NotificationList) LoadRepos() (RepositoryList, []int, error) { failed := []int{} - var reposList = make(RepositoryList, 0, len(repoIDs)) + reposList := make(RepositoryList, 0, len(repoIDs)) for i, notification := range nl { if notification.Repository == nil { notification.Repository = repos[notification.RepoID] @@ -507,7 +566,7 @@ func (nl NotificationList) LoadRepos() (RepositoryList, []int, error) { } func (nl NotificationList) getPendingIssueIDs() []int64 { - var ids = make(map[int64]struct{}, len(nl)) + ids := make(map[int64]struct{}, len(nl)) for _, notification := range nl { if notification.Issue != nil { continue @@ -525,11 +584,11 @@ func (nl NotificationList) LoadIssues() ([]int, error) { return []int{}, nil } - var issueIDs = nl.getPendingIssueIDs() - var issues = make(map[int64]*Issue, len(issueIDs)) - var left = len(issueIDs) + issueIDs := nl.getPendingIssueIDs() + issues := make(map[int64]*Issue, len(issueIDs)) + left := len(issueIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -562,8 +621,10 @@ func (nl NotificationList) LoadIssues() ([]int, error) { if notification.Issue == nil { notification.Issue = issues[notification.IssueID] if notification.Issue == nil { - log.Error("Notification[%d]: IssueID: %d Not Found", notification.ID, notification.IssueID) - failures = append(failures, i) + if notification.IssueID != 0 { + log.Error("Notification[%d]: IssueID: %d Not Found", notification.ID, notification.IssueID) + failures = append(failures, i) + } continue } notification.Issue.Repo = notification.Repository @@ -591,7 +652,7 @@ func (nl NotificationList) Without(failures []int) NotificationList { } func (nl NotificationList) getPendingCommentIDs() []int64 { - var ids = make(map[int64]struct{}, len(nl)) + ids := make(map[int64]struct{}, len(nl)) for _, notification := range nl { if notification.CommentID == 0 || notification.Comment != nil { continue @@ -609,11 +670,11 @@ func (nl NotificationList) LoadComments() ([]int, error) { return []int{}, nil } - var commentIDs = nl.getPendingCommentIDs() - var comments = make(map[int64]*Comment, len(commentIDs)) - var left = len(commentIDs) + commentIDs := nl.getPendingCommentIDs() + comments := make(map[int64]*Comment, len(commentIDs)) + left := len(commentIDs) for left > 0 { - var limit = defaultMaxInSize + limit := defaultMaxInSize if left < limit { limit = left } @@ -683,7 +744,7 @@ func GetUIDsAndNotificationCounts(since, until timeutil.TimeStamp) ([]UserIDCoun return res, x.SQL(sql, since, until, NotificationStatusUnread).Find(&res) } -func setNotificationStatusReadIfUnread(e Engine, userID, issueID int64) error { +func setIssueNotificationStatusReadIfUnread(e Engine, userID, issueID int64) error { notification, err := getIssueNotification(e, userID, issueID) // ignore if not exists if err != nil { @@ -700,6 +761,16 @@ func setNotificationStatusReadIfUnread(e Engine, userID, issueID int64) error { return err } +func setRepoNotificationStatusReadIfUnread(e Engine, userID, repoID int64) error { + _, err := e.Where(builder.Eq{ + "user_id": userID, + "status": NotificationStatusUnread, + "source": NotificationSourceRepository, + "repo_id": repoID, + }).Cols("status").Update(&Notification{Status: NotificationStatusRead}) + return err +} + // SetNotificationStatus change the notification status func SetNotificationStatus(notificationID int64, user *User, status NotificationStatus) error { notification, err := getNotificationByID(x, notificationID) @@ -727,7 +798,6 @@ func getNotificationByID(e Engine, notificationID int64) (*Notification, error) ok, err := e. Where("id = ?", notificationID). Get(notification) - if err != nil { return nil, err } @@ -740,7 +810,7 @@ func getNotificationByID(e Engine, notificationID int64) (*Notification, error) } // UpdateNotificationStatuses updates the statuses of all of a user's notifications that are of the currentStatus type to the desiredStatus -func UpdateNotificationStatuses(user *User, currentStatus NotificationStatus, desiredStatus NotificationStatus) error { +func UpdateNotificationStatuses(user *User, currentStatus, desiredStatus NotificationStatus) error { n := &Notification{Status: desiredStatus, UpdatedBy: user.ID} _, err := x. Where("user_id = ? AND status = ?", user.ID, currentStatus). diff --git a/models/oauth2.go b/models/oauth2.go index 241e11a44..127e8d760 100644 --- a/models/oauth2.go +++ b/models/oauth2.go @@ -4,83 +4,10 @@ package models -import ( - "sort" - - "code.gitea.io/gitea/modules/auth/oauth2" -) - -// OAuth2Provider describes the display values of a single OAuth2 provider -type OAuth2Provider struct { - Name string - DisplayName string - Image string - CustomURLMapping *oauth2.CustomURLMapping -} - -// OAuth2Providers contains the map of registered OAuth2 providers in Gitea (based on goth) -// key is used to map the OAuth2Provider with the goth provider type (also in LoginSource.OAuth2Config.Provider) -// value is used to store display data -var OAuth2Providers = map[string]OAuth2Provider{ - "bitbucket": {Name: "bitbucket", DisplayName: "Bitbucket", Image: "/img/auth/bitbucket.png"}, - "dropbox": {Name: "dropbox", DisplayName: "Dropbox", Image: "/img/auth/dropbox.png"}, - "facebook": {Name: "facebook", DisplayName: "Facebook", Image: "/img/auth/facebook.png"}, - "github": {Name: "github", DisplayName: "GitHub", Image: "/img/auth/github.png", - CustomURLMapping: &oauth2.CustomURLMapping{ - TokenURL: oauth2.GetDefaultTokenURL("github"), - AuthURL: oauth2.GetDefaultAuthURL("github"), - ProfileURL: oauth2.GetDefaultProfileURL("github"), - EmailURL: oauth2.GetDefaultEmailURL("github"), - }, - }, - "gitlab": {Name: "gitlab", DisplayName: "GitLab", Image: "/img/auth/gitlab.png", - CustomURLMapping: &oauth2.CustomURLMapping{ - TokenURL: oauth2.GetDefaultTokenURL("gitlab"), - AuthURL: oauth2.GetDefaultAuthURL("gitlab"), - ProfileURL: oauth2.GetDefaultProfileURL("gitlab"), - }, - }, - "gplus": {Name: "gplus", DisplayName: "Google", Image: "/img/auth/google.png"}, - "openidConnect": {Name: "openidConnect", DisplayName: "OpenID Connect", Image: "/img/auth/openid_connect.svg"}, - "twitter": {Name: "twitter", DisplayName: "Twitter", Image: "/img/auth/twitter.png"}, - "discord": {Name: "discord", DisplayName: "Discord", Image: "/img/auth/discord.png"}, - "gitea": {Name: "gitea", DisplayName: "Gitea", Image: "/img/auth/gitea.png", - CustomURLMapping: &oauth2.CustomURLMapping{ - TokenURL: oauth2.GetDefaultTokenURL("gitea"), - AuthURL: oauth2.GetDefaultAuthURL("gitea"), - ProfileURL: oauth2.GetDefaultProfileURL("gitea"), - }, - }, - "nextcloud": {Name: "nextcloud", DisplayName: "Nextcloud", Image: "/img/auth/nextcloud.png", - CustomURLMapping: &oauth2.CustomURLMapping{ - TokenURL: oauth2.GetDefaultTokenURL("nextcloud"), - AuthURL: oauth2.GetDefaultAuthURL("nextcloud"), - ProfileURL: oauth2.GetDefaultProfileURL("nextcloud"), - }, - }, - "yandex": {Name: "yandex", DisplayName: "Yandex", Image: "/img/auth/yandex.png"}, - "mastodon": {Name: "mastodon", DisplayName: "Mastodon", Image: "/img/auth/mastodon.png", - CustomURLMapping: &oauth2.CustomURLMapping{ - AuthURL: oauth2.GetDefaultAuthURL("mastodon"), - }, - }, -} - -// OAuth2DefaultCustomURLMappings contains the map of default URL's for OAuth2 providers that are allowed to have custom urls -// key is used to map the OAuth2Provider -// value is the mapping as defined for the OAuth2Provider -var OAuth2DefaultCustomURLMappings = map[string]*oauth2.CustomURLMapping{ - "github": OAuth2Providers["github"].CustomURLMapping, - "gitlab": OAuth2Providers["gitlab"].CustomURLMapping, - "gitea": OAuth2Providers["gitea"].CustomURLMapping, - "nextcloud": OAuth2Providers["nextcloud"].CustomURLMapping, - "mastodon": OAuth2Providers["mastodon"].CustomURLMapping, -} - // GetActiveOAuth2ProviderLoginSources returns all actived LoginOAuth2 sources func GetActiveOAuth2ProviderLoginSources() ([]*LoginSource, error) { sources := make([]*LoginSource, 0, 1) - if err := x.Where("is_actived = ? and type = ?", true, LoginOAuth2).Find(&sources); err != nil { + if err := x.Where("is_active = ? and type = ?", true, LoginOAuth2).Find(&sources); err != nil { return nil, err } return sources, nil @@ -89,73 +16,10 @@ func GetActiveOAuth2ProviderLoginSources() ([]*LoginSource, error) { // GetActiveOAuth2LoginSourceByName returns a OAuth2 LoginSource based on the given name func GetActiveOAuth2LoginSourceByName(name string) (*LoginSource, error) { loginSource := new(LoginSource) - has, err := x.Where("name = ? and type = ? and is_actived = ?", name, LoginOAuth2, true).Get(loginSource) + has, err := x.Where("name = ? and type = ? and is_active = ?", name, LoginOAuth2, true).Get(loginSource) if !has || err != nil { return nil, err } return loginSource, nil } - -// GetActiveOAuth2Providers returns the map of configured active OAuth2 providers -// key is used as technical name (like in the callbackURL) -// values to display -func GetActiveOAuth2Providers() ([]string, map[string]OAuth2Provider, error) { - // Maybe also separate used and unused providers so we can force the registration of only 1 active provider for each type - - loginSources, err := GetActiveOAuth2ProviderLoginSources() - if err != nil { - return nil, nil, err - } - - var orderedKeys []string - providers := make(map[string]OAuth2Provider) - for _, source := range loginSources { - prov := OAuth2Providers[source.OAuth2().Provider] - if source.OAuth2().IconURL != "" { - prov.Image = source.OAuth2().IconURL - } - providers[source.Name] = prov - orderedKeys = append(orderedKeys, source.Name) - } - - sort.Strings(orderedKeys) - - return orderedKeys, providers, nil -} - -// InitOAuth2 initialize the OAuth2 lib and register all active OAuth2 providers in the library -func InitOAuth2() error { - if err := oauth2.Init(x); err != nil { - return err - } - return initOAuth2LoginSources() -} - -// ResetOAuth2 clears existing OAuth2 providers and loads them from DB -func ResetOAuth2() error { - oauth2.ClearProviders() - return initOAuth2LoginSources() -} - -// initOAuth2LoginSources is used to load and register all active OAuth2 providers -func initOAuth2LoginSources() error { - loginSources, _ := GetActiveOAuth2ProviderLoginSources() - for _, source := range loginSources { - oAuth2Config := source.OAuth2() - err := oauth2.RegisterProvider(source.Name, oAuth2Config.Provider, oAuth2Config.ClientID, oAuth2Config.ClientSecret, oAuth2Config.OpenIDConnectAutoDiscoveryURL, oAuth2Config.CustomURLMapping) - if err != nil { - return err - } - } - return nil -} - -// wrapOpenIDConnectInitializeError is used to wrap the error but this cannot be done in modules/auth/oauth2 -// inside oauth2: import cycle not allowed models -> modules/auth/oauth2 -> models -func wrapOpenIDConnectInitializeError(err error, providerName string, oAuth2Config *OAuth2Config) error { - if err != nil && "openidConnect" == oAuth2Config.Provider { - err = ErrOpenIDConnectInitialize{ProviderName: providerName, OpenIDConnectAutoDiscoveryURL: oAuth2Config.OpenIDConnectAutoDiscoveryURL, Cause: err} - } - return err -} diff --git a/models/oauth2_application.go b/models/oauth2_application.go index 1b544e4e9..9cf236f0c 100644 --- a/models/oauth2_application.go +++ b/models/oauth2_application.go @@ -10,14 +10,11 @@ import ( "fmt" "net/url" "strings" - "time" "code.gitea.io/gitea/modules/secret" - "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - "github.com/dgrijalva/jwt-go" uuid "github.com/google/uuid" "golang.org/x/crypto/bcrypt" "xorm.io/xorm" @@ -210,7 +207,7 @@ func UpdateOAuth2Application(opts UpdateOAuth2ApplicationOptions) (*OAuth2Applic return nil, err } if app.UID != opts.UserID { - return nil, fmt.Errorf("UID missmatch") + return nil, fmt.Errorf("UID mismatch") } app.Name = opts.Name @@ -235,7 +232,7 @@ func deleteOAuth2Application(sess *xorm.Session, id, userid int64) error { if deleted, err := sess.Delete(&OAuth2Application{ID: id, UID: userid}); err != nil { return err } else if deleted == 0 { - return fmt.Errorf("cannot find oauth2 application") + return ErrOAuthApplicationNotFound{ID: id} } codes := make([]*OAuth2AuthorizationCode, 0) // delete correlating auth codes @@ -261,6 +258,7 @@ func deleteOAuth2Application(sess *xorm.Session, id, userid int64) error { // DeleteOAuth2Application deletes the application with the given id and the grants and auth codes related to it. It checks if the userid was the creator of the app. func DeleteOAuth2Application(id, userid int64) error { sess := x.NewSession() + defer sess.Close() if err := sess.Begin(); err != nil { return err } @@ -271,7 +269,7 @@ func DeleteOAuth2Application(id, userid int64) error { } // ListOAuth2Applications returns a list of oauth2 applications belongs to given user. -func ListOAuth2Applications(uid int64, listOptions ListOptions) ([]*OAuth2Application, error) { +func ListOAuth2Applications(uid int64, listOptions ListOptions) ([]*OAuth2Application, int64, error) { sess := x. Where("uid=?", uid). Desc("id") @@ -280,11 +278,13 @@ func ListOAuth2Applications(uid int64, listOptions ListOptions) ([]*OAuth2Applic sess = listOptions.setSessionPagination(sess) apps := make([]*OAuth2Application, 0, listOptions.PageSize) - return apps, sess.Find(&apps) + total, err := sess.FindAndCount(&apps) + return apps, total, err } apps := make([]*OAuth2Application, 0, 5) - return apps, sess.Find(&apps) + total, err := sess.FindAndCount(&apps) + return apps, total, err } ////////////////////////////////////////////////////// @@ -375,7 +375,7 @@ func getOAuth2AuthorizationByCode(e Engine, code string) (auth *OAuth2Authorizat ////////////////////////////////////////////////////// -// OAuth2Grant represents the permission of an user for a specifc application to access resources +// OAuth2Grant represents the permission of an user for a specific application to access resources type OAuth2Grant struct { ID int64 `xorm:"pk autoincr"` UserID int64 `xorm:"INDEX unique(user_application)"` @@ -393,7 +393,7 @@ func (grant *OAuth2Grant) TableName() string { return "oauth2_grant" } -// GenerateNewAuthorizationCode generates a new authorization code for a grant and saves it to the databse +// GenerateNewAuthorizationCode generates a new authorization code for a grant and saves it to the database func (grant *OAuth2Grant) GenerateNewAuthorizationCode(redirectURI, codeChallenge, codeChallengeMethod string) (*OAuth2AuthorizationCode, error) { return grant.generateNewAuthorizationCode(x, redirectURI, codeChallenge, codeChallengeMethod) } @@ -515,62 +515,3 @@ func revokeOAuth2Grant(e Engine, grantID, userID int64) error { _, err := e.Delete(&OAuth2Grant{ID: grantID, UserID: userID}) return err } - -////////////////////////////////////////////////////////////// - -// OAuth2TokenType represents the type of token for an oauth application -type OAuth2TokenType int - -const ( - // TypeAccessToken is a token with short lifetime to access the api - TypeAccessToken OAuth2TokenType = 0 - // TypeRefreshToken is token with long lifetime to refresh access tokens obtained by the client - TypeRefreshToken = iota -) - -// OAuth2Token represents a JWT token used to authenticate a client -type OAuth2Token struct { - GrantID int64 `json:"gnt"` - Type OAuth2TokenType `json:"tt"` - Counter int64 `json:"cnt,omitempty"` - jwt.StandardClaims -} - -// ParseOAuth2Token parses a singed jwt string -func ParseOAuth2Token(jwtToken string) (*OAuth2Token, error) { - parsedToken, err := jwt.ParseWithClaims(jwtToken, &OAuth2Token{}, func(token *jwt.Token) (interface{}, error) { - if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok { - return nil, fmt.Errorf("unexpected signing algo: %v", token.Header["alg"]) - } - return setting.OAuth2.JWTSecretBytes, nil - }) - if err != nil { - return nil, err - } - var token *OAuth2Token - var ok bool - if token, ok = parsedToken.Claims.(*OAuth2Token); !ok || !parsedToken.Valid { - return nil, fmt.Errorf("invalid token") - } - return token, nil -} - -// SignToken signs the token with the JWT secret -func (token *OAuth2Token) SignToken() (string, error) { - token.IssuedAt = time.Now().Unix() - jwtToken := jwt.NewWithClaims(jwt.SigningMethodHS512, token) - return jwtToken.SignedString(setting.OAuth2.JWTSecretBytes) -} - -// OIDCToken represents an OpenID Connect id_token -type OIDCToken struct { - jwt.StandardClaims - Nonce string `json:"nonce,omitempty"` -} - -// SignToken signs an id_token with the (symmetric) client secret key -func (token *OIDCToken) SignToken(clientSecret string) (string, error) { - token.IssuedAt = time.Now().Unix() - jwtToken := jwt.NewWithClaims(jwt.SigningMethodHS256, token) - return jwtToken.SignedString([]byte(clientSecret)) -} diff --git a/models/oauth2_application_test.go b/models/oauth2_application_test.go index 511d01946..7a4bce85c 100644 --- a/models/oauth2_application_test.go +++ b/models/oauth2_application_test.go @@ -219,11 +219,11 @@ func TestOAuth2AuthorizationCode_GenerateRedirectURI(t *testing.T) { redirect, err := code.GenerateRedirectURI("thestate") assert.NoError(t, err) - assert.Equal(t, redirect.String(), "https://example.com/callback?code=thecode&state=thestate") + assert.Equal(t, "https://example.com/callback?code=thecode&state=thestate", redirect.String()) redirect, err = code.GenerateRedirectURI("") assert.NoError(t, err) - assert.Equal(t, redirect.String(), "https://example.com/callback?code=thecode") + assert.Equal(t, "https://example.com/callback?code=thecode", redirect.String()) } func TestOAuth2AuthorizationCode_Invalidate(t *testing.T) { diff --git a/models/org.go b/models/org.go index f45c9af7a..9540c4240 100644 --- a/models/org.go +++ b/models/org.go @@ -52,7 +52,7 @@ func (org *User) GetOwnerTeam() (*Team, error) { return org.getOwnerTeam(x) } -func (org *User) getTeams(e Engine) error { +func (org *User) loadTeams(e Engine) error { if org.Teams != nil { return nil } @@ -62,13 +62,9 @@ func (org *User) getTeams(e Engine) error { Find(&org.Teams) } -// GetTeams returns paginated teams that belong to organization. -func (org *User) GetTeams(opts *SearchTeamOptions) error { - if opts.Page != 0 { - return org.getTeams(opts.getPaginatedSession()) - } - - return org.getTeams(x) +// LoadTeams load teams if not loaded. +func (org *User) LoadTeams() error { + return org.loadTeams(x) } // GetMembers returns all members of organization. @@ -79,7 +75,7 @@ func (org *User) GetMembers() (err error) { return } -// FindOrgMembersOpts represensts find org members condtions +// FindOrgMembersOpts represensts find org members conditions type FindOrgMembersOpts struct { ListOptions OrgID int64 @@ -87,7 +83,7 @@ type FindOrgMembersOpts struct { } // CountOrgMembers counts the organization's members -func CountOrgMembers(opts FindOrgMembersOpts) (int64, error) { +func CountOrgMembers(opts *FindOrgMembersOpts) (int64, error) { sess := x.Where("org_id=?", opts.OrgID) if opts.PublicOnly { sess.And("is_public = ?", true) @@ -102,8 +98,8 @@ func FindOrgMembers(opts *FindOrgMembersOpts) (UserList, map[int64]bool, error) return nil, nil, err } - var ids = make([]int64, len(ous)) - var idsIsPublic = make(map[int64]bool, len(ous)) + ids := make([]int64, len(ous)) + idsIsPublic := make(map[int64]bool, len(ous)) for i, ou := range ous { ids[i] = ou.UID idsIsPublic[ou.UID] = ou.IsPublic @@ -171,6 +167,10 @@ func CreateOrganization(org, owner *User) (err error) { return err } + if err = deleteUserRedirect(sess, org.Name); err != nil { + return err + } + if _, err = sess.Insert(org); err != nil { return fmt.Errorf("insert organization: %v", err) } @@ -201,7 +201,7 @@ func CreateOrganization(org, owner *User) (err error) { } // insert units for team - var units = make([]TeamUnit, 0, len(AllRepoUnitTypes)) + units := make([]TeamUnit, 0, len(AllRepoUnitTypes)) for _, tp := range AllRepoUnitTypes { units = append(units, TeamUnit{ OrgID: org.ID, @@ -387,6 +387,20 @@ func CanCreateOrgRepo(orgID, uid int64) (bool, error) { Exist(new(Team)) } +// GetUsersWhoCanCreateOrgRepo returns users which are able to create repo in organization +func GetUsersWhoCanCreateOrgRepo(orgID int64) ([]*User, error) { + return getUsersWhoCanCreateOrgRepo(x, orgID) +} + +func getUsersWhoCanCreateOrgRepo(e Engine, orgID int64) ([]*User, error) { + users := make([]*User, 0, 10) + return users, x. + Join("INNER", "`team_user`", "`team_user`.uid=`user`.id"). + Join("INNER", "`team`", "`team`.id=`team_user`.team_id"). + Where(builder.Eq{"team.can_create_org_repo": true}.Or(builder.Eq{"team.authorize": AccessModeOwner})). + And("team_user.org_id = ?", orgID).Asc("`user`.name").Find(&users) +} + func getOrgsByUserID(sess *xorm.Session, userID int64, showAll bool) ([]*User, error) { orgs := make([]*User, 0, 10) if !showAll { @@ -407,6 +421,69 @@ func GetOrgsByUserID(userID int64, showAll bool) ([]*User, error) { return getOrgsByUserID(sess, userID, showAll) } +// MinimalOrg represents a simple orgnization with only needed columns +type MinimalOrg = User + +// GetUserOrgsList returns one user's all orgs list +func GetUserOrgsList(user *User) ([]*MinimalOrg, error) { + sess := x.NewSession() + defer sess.Close() + + schema, err := x.TableInfo(new(User)) + if err != nil { + return nil, err + } + + outputCols := []string{ + "id", + "name", + "full_name", + "visibility", + "avatar", + "avatar_email", + "use_custom_avatar", + } + + groupByCols := &strings.Builder{} + for _, col := range outputCols { + fmt.Fprintf(groupByCols, "`%s`.%s,", schema.Name, col) + } + groupByStr := groupByCols.String() + groupByStr = groupByStr[0 : len(groupByStr)-1] + + sess.Select(groupByStr+", count(repo_id) as org_count"). + Table("user"). + Join("INNER", "team", "`team`.org_id = `user`.id"). + Join("INNER", "team_user", "`team`.id = `team_user`.team_id"). + Join("LEFT", builder. + Select("id as repo_id, owner_id as repo_owner_id"). + From("repository"). + Where(accessibleRepositoryCondition(user)), "`repository`.repo_owner_id = `team`.org_id"). + Where("`team_user`.uid = ?", user.ID). + GroupBy(groupByStr) + + type OrgCount struct { + User `xorm:"extends"` + OrgCount int + } + + orgCounts := make([]*OrgCount, 0, 10) + + if err := sess. + Asc("`user`.name"). + Find(&orgCounts); err != nil { + return nil, err + } + + orgs := make([]*MinimalOrg, len(orgCounts)) + for i, orgCount := range orgCounts { + orgCount.User.NumRepos = orgCount.OrgCount + orgs[i] = &orgCount.User + } + + return orgs, nil +} + func getOwnedOrgsByUserID(sess *xorm.Session, userID int64) ([]*User, error) { orgs := make([]*User, 0, 10) return orgs, sess. @@ -418,22 +495,22 @@ func getOwnedOrgsByUserID(sess *xorm.Session, userID int64) ([]*User, error) { Find(&orgs) } -// HasOrgVisible tells if the given user can see the given org -func HasOrgVisible(org *User, user *User) bool { - return hasOrgVisible(x, org, user) +// HasOrgOrUserVisible tells if the given user can see the given org or user +func HasOrgOrUserVisible(org, user *User) bool { + return hasOrgOrUserVisible(x, org, user) } -func hasOrgVisible(e Engine, org *User, user *User) bool { +func hasOrgOrUserVisible(e Engine, orgOrUser, user *User) bool { // Not SignedUser if user == nil { - return org.Visibility == structs.VisibleTypePublic + return orgOrUser.Visibility == structs.VisibleTypePublic } - if user.IsAdmin { + if user.IsAdmin || orgOrUser.ID == user.ID { return true } - if (org.Visibility == structs.VisibleTypePrivate || user.IsRestricted) && !org.hasMemberWithUserID(e, user.ID) { + if (orgOrUser.Visibility == structs.VisibleTypePrivate || user.IsRestricted) && !orgOrUser.hasMemberWithUserID(e, user.ID) { return false } return true @@ -446,7 +523,7 @@ func HasOrgsVisible(orgs []*User, user *User) bool { } for _, org := range orgs { - if HasOrgVisible(org, user) { + if HasOrgOrUserVisible(org, user) { return true } } @@ -795,7 +872,7 @@ func (org *User) AccessibleTeamReposEnv(team *Team) AccessibleReposEnvironment { } func (env *accessibleReposEnv) cond() builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if env.team != nil { cond = cond.And(builder.Eq{"team_repo.team_id": env.team.ID}) } else { diff --git a/models/org_team.go b/models/org_team.go index a3f1eb92a..c380c8cd8 100644 --- a/models/org_team.go +++ b/models/org_team.go @@ -61,7 +61,7 @@ func SearchTeam(opts *SearchTeamOptions) ([]*Team, int64, error) { opts.PageSize = 10 } - var cond = builder.NewCond() + cond := builder.NewCond() if len(opts.Keyword) > 0 { lowerKeyword := strings.ToLower(opts.Keyword) @@ -80,7 +80,6 @@ func SearchTeam(opts *SearchTeamOptions) ([]*Team, int64, error) { count, err := sess. Where(cond). Count(new(Team)) - if err != nil { return nil, 0, err } @@ -109,7 +108,6 @@ func (t *Team) ColorFormat(s fmt.State) { t.Name, log.NewColoredIDValue(t.OrgID), t.Authorize) - } // GetUnits return a list of available units for a team @@ -608,7 +606,7 @@ func GetTeamNamesByID(teamIDs []int64) ([]string, error) { } // UpdateTeam updates information of team. -func UpdateTeam(t *Team, authChanged bool, includeAllChanged bool) (err error) { +func UpdateTeam(t *Team, authChanged, includeAllChanged bool) (err error) { if len(t.Name) == 0 { return errors.New("empty team name") } @@ -792,16 +790,6 @@ func GetTeamMembers(teamID int64) ([]*User, error) { return getTeamMembers(x, teamID) } -func getUserTeams(e Engine, userID int64, listOptions ListOptions) (teams []*Team, err error) { - sess := e. - Join("INNER", "team_user", "team_user.team_id = team.id"). - Where("team_user.uid=?", userID) - if listOptions.Page != 0 { - sess = listOptions.setSessionPagination(sess) - } - return teams, sess.Find(&teams) -} - func getUserOrgTeams(e Engine, orgID, userID int64) (teams []*Team, err error) { return teams, e. Join("INNER", "team_user", "team_user.team_id = team.id"). @@ -825,11 +813,6 @@ func GetUserOrgTeams(orgID, userID int64) ([]*Team, error) { return getUserOrgTeams(x, orgID, userID) } -// GetUserTeams returns all teams that user belongs across all organizations. -func GetUserTeams(userID int64, listOptions ListOptions) ([]*Team, error) { - return getUserTeams(x, userID, listOptions) -} - // AddTeamMember adds new membership of given team to given organization, // the user will have membership to given organization automatically when needed. func AddTeamMember(team *Team, userID int64) error { @@ -963,7 +946,7 @@ func isUserInTeams(e Engine, userID int64, teamIDs []int64) (bool, error) { } // UsersInTeamsCount counts the number of users which are in userIDs and teamIDs -func UsersInTeamsCount(userIDs []int64, teamIDs []int64) (int64, error) { +func UsersInTeamsCount(userIDs, teamIDs []int64) (int64, error) { var ids []int64 if err := x.In("uid", userIDs).In("team_id", teamIDs). Table("team_user"). diff --git a/models/org_team_test.go b/models/org_team_test.go index 41040651b..9dc26fd81 100644 --- a/models/org_team_test.go +++ b/models/org_team_test.go @@ -286,7 +286,7 @@ func TestGetTeamMembers(t *testing.T) { func TestGetUserTeams(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) test := func(userID int64) { - teams, err := GetUserTeams(userID, ListOptions{}) + teams, _, err := SearchTeam(&SearchTeamOptions{UserID: userID}) assert.NoError(t, err) for _, team := range teams { AssertExistsAndLoadBean(t, &TeamUser{TeamID: team.ID, UID: userID}) @@ -364,7 +364,7 @@ func TestHasTeamRepo(t *testing.T) { func TestUsersInTeamsCount(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - test := func(teamIDs []int64, userIDs []int64, expected int64) { + test := func(teamIDs, userIDs []int64, expected int64) { count, err := UsersInTeamsCount(teamIDs, userIDs) assert.NoError(t, err) assert.Equal(t, expected, count) diff --git a/models/org_test.go b/models/org_test.go index 79f8b060e..7ba9d8ee8 100644 --- a/models/org_test.go +++ b/models/org_test.go @@ -86,7 +86,7 @@ func TestUser_GetOwnerTeam(t *testing.T) { func TestUser_GetTeams(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) org := AssertExistsAndLoadBean(t, &User{ID: 3}).(*User) - assert.NoError(t, org.GetTeams(&SearchTeamOptions{})) + assert.NoError(t, org.LoadTeams()) if assert.Len(t, org.Teams, 4) { assert.Equal(t, int64(1), org.Teams[0].ID) assert.Equal(t, int64(2), org.Teams[1].ID) @@ -374,12 +374,14 @@ func TestGetOrgUsersByUserID(t *testing.T) { ID: orgUsers[0].ID, OrgID: 6, UID: 5, - IsPublic: true}, *orgUsers[0]) + IsPublic: true, + }, *orgUsers[0]) assert.Equal(t, OrgUser{ ID: orgUsers[1].ID, OrgID: 7, UID: 5, - IsPublic: false}, *orgUsers[1]) + IsPublic: false, + }, *orgUsers[1]) } publicOrgUsers, err := GetOrgUsersByUserID(5, &SearchOrganizationsOptions{All: false}) @@ -406,12 +408,14 @@ func TestGetOrgUsersByOrgID(t *testing.T) { ID: orgUsers[0].ID, OrgID: 3, UID: 2, - IsPublic: true}, *orgUsers[0]) + IsPublic: true, + }, *orgUsers[0]) assert.Equal(t, OrgUser{ ID: orgUsers[1].ID, OrgID: 3, UID: 4, - IsPublic: false}, *orgUsers[1]) + IsPublic: false, + }, *orgUsers[1]) } orgUsers, err = GetOrgUsersByOrgID(&FindOrgMembersOpts{ @@ -449,7 +453,7 @@ func TestAddOrgUser(t *testing.T) { assert.NoError(t, AddOrgUser(orgID, userID)) ou := &OrgUser{OrgID: orgID, UID: userID} AssertExistsAndLoadBean(t, ou) - assert.Equal(t, ou.IsPublic, isPublic) + assert.Equal(t, isPublic, ou.IsPublic) org = AssertExistsAndLoadBean(t, &User{ID: orgID}).(*User) assert.EqualValues(t, expectedNumMembers, org.NumMembers) } @@ -582,12 +586,12 @@ func TestHasOrgVisibleTypePublic(t *testing.T) { assert.NoError(t, CreateOrganization(org, owner)) org = AssertExistsAndLoadBean(t, &User{Name: org.Name, Type: UserTypeOrganization}).(*User) - test1 := HasOrgVisible(org, owner) - test2 := HasOrgVisible(org, user3) - test3 := HasOrgVisible(org, nil) - assert.Equal(t, test1, true) // owner of org - assert.Equal(t, test2, true) // user not a part of org - assert.Equal(t, test3, true) // logged out user + test1 := HasOrgOrUserVisible(org, owner) + test2 := HasOrgOrUserVisible(org, user3) + test3 := HasOrgOrUserVisible(org, nil) + assert.True(t, test1) // owner of org + assert.True(t, test2) // user not a part of org + assert.True(t, test3) // logged out user } func TestHasOrgVisibleTypeLimited(t *testing.T) { @@ -605,12 +609,12 @@ func TestHasOrgVisibleTypeLimited(t *testing.T) { assert.NoError(t, CreateOrganization(org, owner)) org = AssertExistsAndLoadBean(t, &User{Name: org.Name, Type: UserTypeOrganization}).(*User) - test1 := HasOrgVisible(org, owner) - test2 := HasOrgVisible(org, user3) - test3 := HasOrgVisible(org, nil) - assert.Equal(t, test1, true) // owner of org - assert.Equal(t, test2, true) // user not a part of org - assert.Equal(t, test3, false) // logged out user + test1 := HasOrgOrUserVisible(org, owner) + test2 := HasOrgOrUserVisible(org, user3) + test3 := HasOrgOrUserVisible(org, nil) + assert.True(t, test1) // owner of org + assert.True(t, test2) // user not a part of org + assert.False(t, test3) // logged out user } func TestHasOrgVisibleTypePrivate(t *testing.T) { @@ -628,10 +632,28 @@ func TestHasOrgVisibleTypePrivate(t *testing.T) { assert.NoError(t, CreateOrganization(org, owner)) org = AssertExistsAndLoadBean(t, &User{Name: org.Name, Type: UserTypeOrganization}).(*User) - test1 := HasOrgVisible(org, owner) - test2 := HasOrgVisible(org, user3) - test3 := HasOrgVisible(org, nil) - assert.Equal(t, test1, true) // owner of org - assert.Equal(t, test2, false) // user not a part of org - assert.Equal(t, test3, false) // logged out user + test1 := HasOrgOrUserVisible(org, owner) + test2 := HasOrgOrUserVisible(org, user3) + test3 := HasOrgOrUserVisible(org, nil) + assert.True(t, test1) // owner of org + assert.False(t, test2) // user not a part of org + assert.False(t, test3) // logged out user +} + +func TestGetUsersWhoCanCreateOrgRepo(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + users, err := GetUsersWhoCanCreateOrgRepo(3) + assert.NoError(t, err) + assert.Len(t, users, 2) + var ids []int64 + for i := range users { + ids = append(ids, users[i].ID) + } + assert.ElementsMatch(t, ids, []int64{2, 28}) + + users, err = GetUsersWhoCanCreateOrgRepo(7) + assert.NoError(t, err) + assert.Len(t, users, 1) + assert.EqualValues(t, 5, users[0].ID) } diff --git a/models/project.go b/models/project.go index e032da351..7c976711b 100644 --- a/models/project.go +++ b/models/project.go @@ -89,7 +89,6 @@ func GetProjects(opts ProjectSearchOptions) ([]*Project, int64, error) { } func getProjects(e Engine, opts ProjectSearchOptions) ([]*Project, int64, error) { - projects := make([]*Project, 0, setting.UI.IssuePagingNum) var cond builder.Cond = builder.Eq{"repo_id": opts.RepoID} diff --git a/models/project_board.go b/models/project_board.go index 260fc8304..4b313ed8f 100644 --- a/models/project_board.go +++ b/models/project_board.go @@ -8,6 +8,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + "xorm.io/builder" "xorm.io/xorm" ) @@ -35,6 +36,7 @@ type ProjectBoard struct { ID int64 `xorm:"pk autoincr"` Title string Default bool `xorm:"NOT NULL DEFAULT false"` // issues not assigned to a specific board will be assigned to this board + Sorting int8 `xorm:"NOT NULL DEFAULT 0"` ProjectID int64 `xorm:"INDEX NOT NULL"` CreatorID int64 `xorm:"NOT NULL"` @@ -56,7 +58,6 @@ func IsProjectBoardTypeValid(p ProjectBoardType) bool { } func createBoardsForProjectsType(sess *xorm.Session, project *Project) error { - var items []string switch project.BoardType { @@ -77,7 +78,7 @@ func createBoardsForProjectsType(sess *xorm.Session, project *Project) error { return nil } - var boards = make([]ProjectBoard, 0, len(items)) + boards := make([]ProjectBoard, 0, len(items)) for _, v := range items { boards = append(boards, ProjectBoard{ @@ -156,30 +157,60 @@ func getProjectBoard(e Engine, boardID int64) (*ProjectBoard, error) { return board, nil } -// UpdateProjectBoard updates the title of a project board +// UpdateProjectBoard updates a project board func UpdateProjectBoard(board *ProjectBoard) error { return updateProjectBoard(x, board) } func updateProjectBoard(e Engine, board *ProjectBoard) error { - _, err := e.ID(board.ID).Cols( - "title", - "default", - ).Update(board) + var fieldToUpdate []string + + if board.Sorting != 0 { + fieldToUpdate = append(fieldToUpdate, "sorting") + } + + if board.Title != "" { + fieldToUpdate = append(fieldToUpdate, "title") + } + + _, err := e.ID(board.ID).Cols(fieldToUpdate...).Update(board) + return err } // GetProjectBoards fetches all boards related to a project -func GetProjectBoards(projectID int64) ([]*ProjectBoard, error) { - - var boards = make([]*ProjectBoard, 0, 5) - - sess := x.Where("project_id=?", projectID) - return boards, sess.Find(&boards) +// if no default board set, first board is a temporary "Uncategorized" board +func GetProjectBoards(projectID int64) (ProjectBoardList, error) { + return getProjectBoards(x, projectID) } -// GetUncategorizedBoard represents a board for issues not assigned to one -func GetUncategorizedBoard(projectID int64) (*ProjectBoard, error) { +func getProjectBoards(e Engine, projectID int64) ([]*ProjectBoard, error) { + boards := make([]*ProjectBoard, 0, 5) + + if err := e.Where("project_id=? AND `default`=?", projectID, false).OrderBy("Sorting").Find(&boards); err != nil { + return nil, err + } + + defaultB, err := getDefaultBoard(e, projectID) + if err != nil { + return nil, err + } + + return append([]*ProjectBoard{defaultB}, boards...), nil +} + +// getDefaultBoard return default board and create a dummy if none exist +func getDefaultBoard(e Engine, projectID int64) (*ProjectBoard, error) { + var board ProjectBoard + exist, err := e.Where("project_id=? AND `default`=?", projectID, true).Get(&board) + if err != nil { + return nil, err + } + if exist { + return &board, nil + } + + // represents a board for issues not assigned to one return &ProjectBoard{ ProjectID: projectID, Title: "Uncategorized", @@ -187,22 +218,59 @@ func GetUncategorizedBoard(projectID int64) (*ProjectBoard, error) { }, nil } +// SetDefaultBoard represents a board for issues not assigned to one +// if boardID is 0 unset default +func SetDefaultBoard(projectID, boardID int64) error { + sess := x + + _, err := sess.Where(builder.Eq{ + "project_id": projectID, + "`default`": true, + }).Cols("`default`").Update(&ProjectBoard{Default: false}) + if err != nil { + return err + } + + if boardID > 0 { + _, err = sess.ID(boardID).Where(builder.Eq{"project_id": projectID}). + Cols("`default`").Update(&ProjectBoard{Default: true}) + } + + return err +} + // LoadIssues load issues assigned to this board func (b *ProjectBoard) LoadIssues() (IssueList, error) { - var boardID int64 - if !b.Default { - boardID = b.ID + issueList := make([]*Issue, 0, 10) - } else { - // Issues without ProjectBoardID - boardID = -1 + if b.ID != 0 { + issues, err := Issues(&IssuesOptions{ + ProjectBoardID: b.ID, + ProjectID: b.ProjectID, + }) + if err != nil { + return nil, err + } + issueList = issues } - issues, err := Issues(&IssuesOptions{ - ProjectBoardID: boardID, - ProjectID: b.ProjectID, - }) - b.Issues = issues - return issues, err + + if b.Default { + issues, err := Issues(&IssuesOptions{ + ProjectBoardID: -1, // Issues without ProjectBoardID + ProjectID: b.ProjectID, + }) + if err != nil { + return nil, err + } + issueList = append(issueList, issues...) + } + + if err := IssueList(issueList).LoadComments(); err != nil { + return nil, err + } + + b.Issues = issueList + return issueList, nil } // LoadIssues load issues assigned to the boards @@ -218,3 +286,16 @@ func (bs ProjectBoardList) LoadIssues() (IssueList, error) { } return issues, nil } + +// UpdateProjectBoardSorting update project board sorting +func UpdateProjectBoardSorting(bs ProjectBoardList) error { + for i := range bs { + _, err := x.ID(bs[i].ID).Cols( + "sorting", + ).Update(bs[i]) + if err != nil { + return err + } + } + return nil +} diff --git a/models/project_issue.go b/models/project_issue.go index c41bfe515..e35307158 100644 --- a/models/project_issue.go +++ b/models/project_issue.go @@ -124,7 +124,6 @@ func (p *Project) NumOpenIssues() int { // ChangeProjectAssign changes the project associated with an issue func ChangeProjectAssign(issue *Issue, doer *User, newProjectID int64) error { - sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { @@ -139,7 +138,6 @@ func ChangeProjectAssign(issue *Issue, doer *User, newProjectID int64) error { } func addUpdateIssueProject(e *xorm.Session, issue *Issue, doer *User, newProjectID int64) error { - oldProjectID := issue.projectID(e) if _, err := e.Where("project_issue.issue_id=?", issue.ID).Delete(&ProjectIssue{}); err != nil { @@ -179,7 +177,6 @@ func addUpdateIssueProject(e *xorm.Session, issue *Issue, doer *User, newProject // MoveIssueAcrossProjectBoards move a card from one board to another func MoveIssueAcrossProjectBoards(issue *Issue, board *ProjectBoard) error { - sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { diff --git a/models/project_test.go b/models/project_test.go index 49c46f918..23ad56eb3 100644 --- a/models/project_test.go +++ b/models/project_test.go @@ -15,7 +15,7 @@ import ( func TestIsProjectTypeValid(t *testing.T) { const UnknownType ProjectType = 15 - var cases = []struct { + cases := []struct { typ ProjectType valid bool }{ diff --git a/models/protected_tag.go b/models/protected_tag.go new file mode 100644 index 000000000..88f20dd29 --- /dev/null +++ b/models/protected_tag.go @@ -0,0 +1,131 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "regexp" + "strings" + + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/timeutil" + + "github.com/gobwas/glob" +) + +// ProtectedTag struct +type ProtectedTag struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 + NamePattern string + RegexPattern *regexp.Regexp `xorm:"-"` + GlobPattern glob.Glob `xorm:"-"` + AllowlistUserIDs []int64 `xorm:"JSON TEXT"` + AllowlistTeamIDs []int64 `xorm:"JSON TEXT"` + + CreatedUnix timeutil.TimeStamp `xorm:"created"` + UpdatedUnix timeutil.TimeStamp `xorm:"updated"` +} + +// InsertProtectedTag inserts a protected tag to database +func InsertProtectedTag(pt *ProtectedTag) error { + _, err := x.Insert(pt) + return err +} + +// UpdateProtectedTag updates the protected tag +func UpdateProtectedTag(pt *ProtectedTag) error { + _, err := x.ID(pt.ID).AllCols().Update(pt) + return err +} + +// DeleteProtectedTag deletes a protected tag by ID +func DeleteProtectedTag(pt *ProtectedTag) error { + _, err := x.ID(pt.ID).Delete(&ProtectedTag{}) + return err +} + +// EnsureCompiledPattern ensures the glob pattern is compiled +func (pt *ProtectedTag) EnsureCompiledPattern() error { + if pt.RegexPattern != nil || pt.GlobPattern != nil { + return nil + } + + var err error + if len(pt.NamePattern) >= 2 && strings.HasPrefix(pt.NamePattern, "/") && strings.HasSuffix(pt.NamePattern, "/") { + pt.RegexPattern, err = regexp.Compile(pt.NamePattern[1 : len(pt.NamePattern)-1]) + } else { + pt.GlobPattern, err = glob.Compile(pt.NamePattern) + } + return err +} + +// IsUserAllowed returns true if the user is allowed to modify the tag +func (pt *ProtectedTag) IsUserAllowed(userID int64) (bool, error) { + if base.Int64sContains(pt.AllowlistUserIDs, userID) { + return true, nil + } + + if len(pt.AllowlistTeamIDs) == 0 { + return false, nil + } + + in, err := IsUserInTeams(userID, pt.AllowlistTeamIDs) + if err != nil { + return false, err + } + return in, nil +} + +// GetProtectedTags gets all protected tags of the repository +func (repo *Repository) GetProtectedTags() ([]*ProtectedTag, error) { + tags := make([]*ProtectedTag, 0) + return tags, x.Find(&tags, &ProtectedTag{RepoID: repo.ID}) +} + +// GetProtectedTagByID gets the protected tag with the specific id +func GetProtectedTagByID(id int64) (*ProtectedTag, error) { + tag := new(ProtectedTag) + has, err := x.ID(id).Get(tag) + if err != nil { + return nil, err + } + if !has { + return nil, nil + } + return tag, nil +} + +// IsUserAllowedToControlTag checks if a user can control the specific tag. +// It returns true if the tag name is not protected or the user is allowed to control it. +func IsUserAllowedToControlTag(tags []*ProtectedTag, tagName string, userID int64) (bool, error) { + isAllowed := true + for _, tag := range tags { + err := tag.EnsureCompiledPattern() + if err != nil { + return false, err + } + + if !tag.matchString(tagName) { + continue + } + + isAllowed, err = tag.IsUserAllowed(userID) + if err != nil { + return false, err + } + if isAllowed { + break + } + } + + return isAllowed, nil +} + +func (pt *ProtectedTag) matchString(name string) bool { + if pt.RegexPattern != nil { + return pt.RegexPattern.MatchString(name) + } + return pt.GlobPattern.Match(name) +} diff --git a/models/protected_tag_test.go b/models/protected_tag_test.go new file mode 100644 index 000000000..3dc895c69 --- /dev/null +++ b/models/protected_tag_test.go @@ -0,0 +1,162 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestIsUserAllowed(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + pt := &ProtectedTag{} + allowed, err := pt.IsUserAllowed(1) + assert.NoError(t, err) + assert.False(t, allowed) + + pt = &ProtectedTag{ + AllowlistUserIDs: []int64{1}, + } + allowed, err = pt.IsUserAllowed(1) + assert.NoError(t, err) + assert.True(t, allowed) + + allowed, err = pt.IsUserAllowed(2) + assert.NoError(t, err) + assert.False(t, allowed) + + pt = &ProtectedTag{ + AllowlistTeamIDs: []int64{1}, + } + allowed, err = pt.IsUserAllowed(1) + assert.NoError(t, err) + assert.False(t, allowed) + + allowed, err = pt.IsUserAllowed(2) + assert.NoError(t, err) + assert.True(t, allowed) + + pt = &ProtectedTag{ + AllowlistUserIDs: []int64{1}, + AllowlistTeamIDs: []int64{1}, + } + allowed, err = pt.IsUserAllowed(1) + assert.NoError(t, err) + assert.True(t, allowed) + + allowed, err = pt.IsUserAllowed(2) + assert.NoError(t, err) + assert.True(t, allowed) +} + +func TestIsUserAllowedToControlTag(t *testing.T) { + cases := []struct { + name string + userid int64 + allowed bool + }{ + { + name: "test", + userid: 1, + allowed: true, + }, + { + name: "test", + userid: 3, + allowed: true, + }, + { + name: "gitea", + userid: 1, + allowed: true, + }, + { + name: "gitea", + userid: 3, + allowed: false, + }, + { + name: "test-gitea", + userid: 1, + allowed: true, + }, + { + name: "test-gitea", + userid: 3, + allowed: false, + }, + { + name: "gitea-test", + userid: 1, + allowed: true, + }, + { + name: "gitea-test", + userid: 3, + allowed: true, + }, + { + name: "v-1", + userid: 1, + allowed: false, + }, + { + name: "v-1", + userid: 2, + allowed: true, + }, + { + name: "release", + userid: 1, + allowed: false, + }, + } + + t.Run("Glob", func(t *testing.T) { + protectedTags := []*ProtectedTag{ + { + NamePattern: `*gitea`, + AllowlistUserIDs: []int64{1}, + }, + { + NamePattern: `v-*`, + AllowlistUserIDs: []int64{2}, + }, + { + NamePattern: "release", + }, + } + + for n, c := range cases { + isAllowed, err := IsUserAllowedToControlTag(protectedTags, c.name, c.userid) + assert.NoError(t, err) + assert.Equal(t, c.allowed, isAllowed, "case %d: error should match", n) + } + }) + + t.Run("Regex", func(t *testing.T) { + protectedTags := []*ProtectedTag{ + { + NamePattern: `/gitea\z/`, + AllowlistUserIDs: []int64{1}, + }, + { + NamePattern: `/\Av-/`, + AllowlistUserIDs: []int64{2}, + }, + { + NamePattern: "/release/", + }, + } + + for n, c := range cases { + isAllowed, err := IsUserAllowedToControlTag(protectedTags, c.name, c.userid) + assert.NoError(t, err) + assert.Equal(t, c.allowed, isAllowed, "case %d: error should match", n) + } + }) +} diff --git a/models/pull.go b/models/pull.go index 9b6f0830d..ea8f28999 100644 --- a/models/pull.go +++ b/models/pull.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" ) // PullRequestType defines pull request type @@ -34,6 +35,17 @@ const ( PullRequestStatusMergeable PullRequestStatusManuallyMerged PullRequestStatusError + PullRequestStatusEmpty +) + +// PullRequestFlow the flow of pull request +type PullRequestFlow int + +const ( + // PullRequestFlowGithub github flow from head branch to base branch + PullRequestFlowGithub PullRequestFlow = iota + // PullRequestFlowAGit Agit flow pull request, head branch is not exist + PullRequestFlowAGit ) // PullRequest represents relation between pull request and repositories. @@ -56,6 +68,7 @@ type PullRequest struct { BaseRepoID int64 `xorm:"INDEX"` BaseRepo *Repository `xorm:"-"` HeadBranch string + HeadCommitID string `xorm:"-"` BaseBranch string ProtectedBranch *ProtectedBranch `xorm:"-"` MergeBase string `xorm:"VARCHAR(40)"` @@ -67,6 +80,8 @@ type PullRequest struct { MergedUnix timeutil.TimeStamp `xorm:"updated INDEX"` isHeadRepoLoaded bool `xorm:"-"` + + Flow PullRequestFlow `xorm:"NOT NULL DEFAULT 0"` } // MustHeadUserName returns the HeadRepo's username if failed return blank @@ -210,12 +225,21 @@ func (pr *PullRequest) GetDefaultMergeMessage() string { log.Error("Cannot load issue %d for PR id %d: Error: %v", pr.IssueID, pr.ID, err) return "" } - - if pr.BaseRepoID == pr.HeadRepoID { - return fmt.Sprintf("Merge pull request '%s' (#%d) from %s into %s", pr.Issue.Title, pr.Issue.Index, pr.HeadBranch, pr.BaseBranch) + if err := pr.LoadBaseRepo(); err != nil { + log.Error("LoadBaseRepo: %v", err) + return "" } - return fmt.Sprintf("Merge pull request '%s' (#%d) from %s:%s into %s", pr.Issue.Title, pr.Issue.Index, pr.HeadRepo.FullName(), pr.HeadBranch, pr.BaseBranch) + issueReference := "#" + if pr.BaseRepo.UnitEnabled(UnitTypeExternalTracker) { + issueReference = "!" + } + + if pr.BaseRepoID == pr.HeadRepoID { + return fmt.Sprintf("Merge pull request '%s' (%s%d) from %s into %s", pr.Issue.Title, issueReference, pr.Issue.Index, pr.HeadBranch, pr.BaseBranch) + } + + return fmt.Sprintf("Merge pull request '%s' (%s%d) from %s:%s into %s", pr.Issue.Title, issueReference, pr.Issue.Index, pr.HeadRepo.FullName(), pr.HeadBranch, pr.BaseBranch) } // ReviewCount represents a count of Reviews @@ -234,12 +258,11 @@ func (pr *PullRequest) GetApprovalCounts() ([]*ReviewCount, error) { func (pr *PullRequest) getApprovalCounts(e Engine) ([]*ReviewCount, error) { rCounts := make([]*ReviewCount, 0, 6) sess := e.Where("issue_id = ?", pr.IssueID) - return rCounts, sess.Select("issue_id, type, count(id) as `count`").Where("official = ?", true).GroupBy("issue_id, type").Table("review").Find(&rCounts) + return rCounts, sess.Select("issue_id, type, count(id) as `count`").Where("official = ? AND dismissed = ?", true, false).GroupBy("issue_id, type").Table("review").Find(&rCounts) } // GetApprovers returns the approvers of the pull request func (pr *PullRequest) GetApprovers() string { - stringBuilder := strings.Builder{} if err := pr.getReviewedByLines(&stringBuilder); err != nil { log.Error("Unable to getReviewedByLines: Error: %v", err) @@ -331,6 +354,11 @@ func (pr *PullRequest) CanAutoMerge() bool { return pr.Status == PullRequestStatusMergeable } +// IsEmpty returns true if this pull request is empty. +func (pr *PullRequest) IsEmpty() bool { + return pr.Status == PullRequestStatusEmpty +} + // MergeStyle represents the approach to merge commits into base branch. type MergeStyle string @@ -343,6 +371,10 @@ const ( MergeStyleRebaseMerge MergeStyle = "rebase-merge" // MergeStyleSquash squash commits into single commit before merging MergeStyleSquash MergeStyle = "squash" + // MergeStyleManuallyMerged pr has been merged manually, just mark it as merged directly + MergeStyleManuallyMerged MergeStyle = "manually-merged" + // MergeStyleRebaseUpdate not a merge style, used to update pull head by rebase + MergeStyleRebaseUpdate MergeStyle = "rebase-update-only" ) // SetMerged sets a pull request to merged and closes the corresponding issue @@ -398,7 +430,8 @@ func (pr *PullRequest) SetMerged() (bool, error) { return false, fmt.Errorf("Issue.changeStatus: %v", err) } - if _, err := sess.Where("id = ?", pr.ID).Cols("has_merged, status, merged_commit_id, merger_id, merged_unix").Update(pr); err != nil { + // We need to save all of the data used to compute this merge as it may have already been changed by TestPatch. FIXME: need to set some state to prevent TestPatch from running whilst we are merging. + if _, err := sess.Where("id = ?", pr.ID).Cols("has_merged, status, merge_base, merged_commit_id, merger_id, merged_unix").Update(pr); err != nil { return false, fmt.Errorf("Failed to update pr[%d]: %v", pr.ID, err) } @@ -409,34 +442,23 @@ func (pr *PullRequest) SetMerged() (bool, error) { } // NewPullRequest creates new pull request with labels for repository. -func NewPullRequest(repo *Repository, pull *Issue, labelIDs []int64, uuids []string, pr *PullRequest) (err error) { - // Retry several times in case INSERT fails due to duplicate key for (repo_id, index); see #7887 - i := 0 - for { - if err = newPullRequestAttempt(repo, pull, labelIDs, uuids, pr); err == nil { - return nil - } - if !IsErrNewIssueInsert(err) { - return err - } - if i++; i == issueMaxDupIndexAttempts { - break - } - log.Error("NewPullRequest: error attempting to insert the new issue; will retry. Original error: %v", err) +func NewPullRequest(repo *Repository, issue *Issue, labelIDs []int64, uuids []string, pr *PullRequest) (err error) { + idx, err := GetNextResourceIndex("issue_index", repo.ID) + if err != nil { + return fmt.Errorf("generate issue index failed: %v", err) } - return fmt.Errorf("NewPullRequest: too many errors attempting to insert the new issue. Last error was: %v", err) -} -func newPullRequestAttempt(repo *Repository, pull *Issue, labelIDs []int64, uuids []string, pr *PullRequest) (err error) { + issue.Index = idx + sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { return err } - if err = newIssue(sess, pull.Poster, NewIssueOptions{ + if err = newIssue(sess, issue.Poster, NewIssueOptions{ Repo: repo, - Issue: pull, + Issue: issue, LabelIDs: labelIDs, Attachments: uuids, IsPull: true, @@ -447,10 +469,9 @@ func newPullRequestAttempt(repo *Repository, pull *Issue, labelIDs []int64, uuid return fmt.Errorf("newIssue: %v", err) } - pr.Index = pull.Index + pr.Index = issue.Index pr.BaseRepo = repo - - pr.IssueID = pull.ID + pr.IssueID = issue.ID if _, err = sess.Insert(pr); err != nil { return fmt.Errorf("insert pull repo: %v", err) } @@ -464,11 +485,11 @@ func newPullRequestAttempt(repo *Repository, pull *Issue, labelIDs []int64, uuid // GetUnmergedPullRequest returns a pull request that is open and has not been merged // by given head/base and repo/branch. -func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch string) (*PullRequest, error) { +func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch string, flow PullRequestFlow) (*PullRequest, error) { pr := new(PullRequest) has, err := x. - Where("head_repo_id=? AND head_branch=? AND base_repo_id=? AND base_branch=? AND has_merged=? AND issue.is_closed=?", - headRepoID, headBranch, baseRepoID, baseBranch, false, false). + Where("head_repo_id=? AND head_branch=? AND base_repo_id=? AND base_branch=? AND has_merged=? AND flow = ? AND issue.is_closed=?", + headRepoID, headBranch, baseRepoID, baseBranch, false, flow, false). Join("INNER", "issue", "issue.id=pull_request.issue_id"). Get(pr) if err != nil { @@ -485,7 +506,7 @@ func GetUnmergedPullRequest(headRepoID, baseRepoID int64, headBranch, baseBranch func GetLatestPullRequestByHeadInfo(repoID int64, branch string) (*PullRequest, error) { pr := new(PullRequest) has, err := x. - Where("head_repo_id = ? AND head_branch = ?", repoID, branch). + Where("head_repo_id = ? AND head_branch = ? AND flow = ?", repoID, branch, PullRequestFlowGithub). OrderBy("id DESC"). Get(pr) if !has { @@ -495,7 +516,7 @@ func GetLatestPullRequestByHeadInfo(repoID int64, branch string) (*PullRequest, } // GetPullRequestByIndex returns a pull request by the given index -func GetPullRequestByIndex(repoID int64, index int64) (*PullRequest, error) { +func GetPullRequestByIndex(repoID, index int64) (*PullRequest, error) { pr := &PullRequest{ BaseRepoID: repoID, Index: index, @@ -560,6 +581,20 @@ func getPullRequestByIssueID(e Engine, issueID int64) (*PullRequest, error) { return pr, pr.loadAttributes(e) } +// GetAllUnmergedAgitPullRequestByPoster get all unmerged agit flow pull request +// By poster id. +func GetAllUnmergedAgitPullRequestByPoster(uid int64) ([]*PullRequest, error) { + pulls := make([]*PullRequest, 0, 10) + + err := x. + Where("has_merged=? AND flow = ? AND issue.is_closed=? AND issue.poster_id=?", + false, PullRequestFlowAGit, false, uid). + Join("INNER", "issue", "issue.id=pull_request.issue_id"). + Find(&pulls) + + return pulls, err +} + // GetPullRequestByIssueID returns pull request by given issue ID. func GetPullRequestByIssueID(issueID int64) (*PullRequest, error) { return getPullRequestByIssueID(x, issueID) @@ -589,9 +624,13 @@ func (pr *PullRequest) IsWorkInProgress() bool { log.Error("LoadIssue: %v", err) return false } + return HasWorkInProgressPrefix(pr.Issue.Title) +} +// HasWorkInProgressPrefix determines if the given PR title has a Work In Progress prefix +func HasWorkInProgressPrefix(title string) bool { for _, prefix := range setting.Repository.PullRequest.WorkInProgressPrefixes { - if strings.HasPrefix(strings.ToUpper(pr.Issue.Title), prefix) { + if strings.HasPrefix(strings.ToUpper(title), prefix) { return true } } @@ -638,3 +677,31 @@ func (pr *PullRequest) updateCommitDivergence(e Engine, ahead, behind int) error func (pr *PullRequest) IsSameRepo() bool { return pr.BaseRepoID == pr.HeadRepoID } + +// GetBaseBranchHTMLURL returns the HTML URL of the base branch +func (pr *PullRequest) GetBaseBranchHTMLURL() string { + if err := pr.LoadBaseRepo(); err != nil { + log.Error("LoadBaseRepo: %v", err) + return "" + } + if pr.BaseRepo == nil { + return "" + } + return pr.BaseRepo.HTMLURL() + "/src/branch/" + util.PathEscapeSegments(pr.BaseBranch) +} + +// GetHeadBranchHTMLURL returns the HTML URL of the head branch +func (pr *PullRequest) GetHeadBranchHTMLURL() string { + if pr.Flow == PullRequestFlowAGit { + return "" + } + + if err := pr.LoadHeadRepo(); err != nil { + log.Error("LoadHeadRepo: %v", err) + return "" + } + if pr.HeadRepo == nil { + return "" + } + return pr.HeadRepo.HTMLURL() + "/src/branch/" + util.PathEscapeSegments(pr.HeadBranch) +} diff --git a/models/pull_list.go b/models/pull_list.go index 989de4689..2f685e19f 100644 --- a/models/pull_list.go +++ b/models/pull_list.go @@ -51,8 +51,8 @@ func listPullRequestStatement(baseRepoID int64, opts *PullRequestsOptions) (*xor func GetUnmergedPullRequestsByHeadInfo(repoID int64, branch string) ([]*PullRequest, error) { prs := make([]*PullRequest, 0, 2) return prs, x. - Where("head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ?", - repoID, branch, false, false). + Where("head_repo_id = ? AND head_branch = ? AND has_merged = ? AND issue.is_closed = ? AND flow = ?", + repoID, branch, false, false, PullRequestFlowGithub). Join("INNER", "issue", "issue.id = pull_request.issue_id"). Find(&prs) } diff --git a/models/pull_sign.go b/models/pull_sign.go index 10a6522eb..e7cf4ab66 100644 --- a/models/pull_sign.go +++ b/models/pull_sign.go @@ -118,8 +118,7 @@ Loop: if err != nil { return false, "", nil, err } - for e := commitList.Front(); e != nil; e = e.Next() { - commit = e.Value.(*git.Commit) + for _, commit := range commitList { verification := ParseCommitWithSignature(commit) if !verification.Verified { return false, "", nil, &ErrWontSign{commitsSigned} diff --git a/models/pull_test.go b/models/pull_test.go index 3cc6abfec..07216da32 100644 --- a/models/pull_test.go +++ b/models/pull_test.go @@ -92,11 +92,11 @@ func TestPullRequestsOldest(t *testing.T) { func TestGetUnmergedPullRequest(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - pr, err := GetUnmergedPullRequest(1, 1, "branch2", "master") + pr, err := GetUnmergedPullRequest(1, 1, "branch2", "master", PullRequestFlowGithub) assert.NoError(t, err) assert.Equal(t, int64(2), pr.ID) - _, err = GetUnmergedPullRequest(1, 9223372036854775807, "branch1", "master") + _, err = GetUnmergedPullRequest(1, 9223372036854775807, "branch1", "master", PullRequestFlowGithub) assert.Error(t, err) assert.True(t, IsErrPullRequestNotExist(err)) } @@ -234,3 +234,36 @@ func TestPullRequest_GetWorkInProgressPrefixWorkInProgress(t *testing.T) { pr.Issue.Title = "[wip] " + original assert.Equal(t, "[wip]", pr.GetWorkInProgressPrefix()) } + +func TestPullRequest_GetDefaultMergeMessage_InternalTracker(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + pr := AssertExistsAndLoadBean(t, &PullRequest{ID: 2}).(*PullRequest) + + assert.Equal(t, "Merge pull request 'issue3' (#3) from branch2 into master", pr.GetDefaultMergeMessage()) + + pr.BaseRepoID = 1 + pr.HeadRepoID = 2 + assert.Equal(t, "Merge pull request 'issue3' (#3) from user2/repo1:branch2 into master", pr.GetDefaultMergeMessage()) +} + +func TestPullRequest_GetDefaultMergeMessage_ExternalTracker(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + externalTracker := RepoUnit{ + Type: UnitTypeExternalTracker, + Config: &ExternalTrackerConfig{ + ExternalTrackerFormat: "https://someurl.com/{user}/{repo}/{issue}", + }, + } + baseRepo := &Repository{Name: "testRepo", ID: 1} + baseRepo.Owner = &User{Name: "testOwner"} + baseRepo.Units = []*RepoUnit{&externalTracker} + + pr := AssertExistsAndLoadBean(t, &PullRequest{ID: 2, BaseRepo: baseRepo}).(*PullRequest) + + assert.Equal(t, "Merge pull request 'issue3' (!3) from branch2 into master", pr.GetDefaultMergeMessage()) + + pr.BaseRepoID = 1 + pr.HeadRepoID = 2 + assert.Equal(t, "Merge pull request 'issue3' (!3) from user2/repo1:branch2 into master", pr.GetDefaultMergeMessage()) +} diff --git a/models/release.go b/models/release.go index 547327e65..1ce88a821 100644 --- a/models/release.go +++ b/models/release.go @@ -6,6 +6,7 @@ package models import ( + "errors" "fmt" "sort" "strings" @@ -13,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" "xorm.io/builder" ) @@ -117,17 +119,20 @@ func UpdateRelease(ctx DBContext, rel *Release) error { } // AddReleaseAttachments adds a release attachments -func AddReleaseAttachments(releaseID int64, attachmentUUIDs []string) (err error) { +func AddReleaseAttachments(ctx DBContext, releaseID int64, attachmentUUIDs []string) (err error) { // Check attachments - attachments, err := GetAttachmentsByUUIDs(attachmentUUIDs) + attachments, err := getAttachmentsByUUIDs(ctx.e, attachmentUUIDs) if err != nil { return fmt.Errorf("GetAttachmentsByUUIDs [uuids: %v]: %v", attachmentUUIDs, err) } for i := range attachments { + if attachments[i].ReleaseID != 0 { + return errors.New("release permission denied") + } attachments[i].ReleaseID = releaseID // No assign value could be 0, so ignore AllCols(). - if _, err = x.ID(attachments[i].ID).Update(attachments[i]); err != nil { + if _, err = ctx.e.ID(attachments[i].ID).Update(attachments[i]); err != nil { return fmt.Errorf("update attachment [%d]: %v", attachments[i].ID, err) } } @@ -169,11 +174,13 @@ type FindReleasesOptions struct { ListOptions IncludeDrafts bool IncludeTags bool + IsPreRelease util.OptionalBool + IsDraft util.OptionalBool TagNames []string } func (opts *FindReleasesOptions) toConds(repoID int64) builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() cond = cond.And(builder.Eq{"repo_id": repoID}) if !opts.IncludeDrafts { @@ -185,6 +192,12 @@ func (opts *FindReleasesOptions) toConds(repoID int64) builder.Cond { if len(opts.TagNames) > 0 { cond = cond.And(builder.In("tag_name", opts.TagNames)) } + if !opts.IsPreRelease.IsNone() { + cond = cond.And(builder.Eq{"is_prerelease": opts.IsPreRelease.IsTrue()}) + } + if !opts.IsDraft.IsNone() { + cond = cond.And(builder.Eq{"is_draft": opts.IsDraft.IsTrue()}) + } return cond } @@ -202,6 +215,11 @@ func GetReleasesByRepoID(repoID int64, opts FindReleasesOptions) ([]*Release, er return rels, sess.Find(&rels) } +// CountReleasesByRepoID returns a number of releases matching FindReleaseOptions and RepoID. +func CountReleasesByRepoID(repoID int64, opts FindReleasesOptions) (int64, error) { + return x.Where(opts.toConds(repoID)).Count(new(Release)) +} + // GetLatestReleaseByRepoID returns the latest release for a repository func GetLatestReleaseByRepoID(repoID int64) (*Release, error) { cond := builder.NewCond(). @@ -246,10 +264,12 @@ type releaseMetaSearch struct { func (s releaseMetaSearch) Len() int { return len(s.ID) } + func (s releaseMetaSearch) Swap(i, j int) { s.ID[i], s.ID[j] = s.ID[j], s.ID[i] s.Rel[i], s.Rel[j] = s.Rel[j], s.Rel[i] } + func (s releaseMetaSearch) Less(i, j int) bool { return s.ID[i] < s.ID[j] } @@ -269,7 +289,7 @@ func getReleaseAttachments(e Engine, rels ...*Release) (err error) { // then merge join them // Sort - var sortedRels = releaseMetaSearch{ID: make([]int64, len(rels)), Rel: make([]*Release, len(rels))} + sortedRels := releaseMetaSearch{ID: make([]int64, len(rels)), Rel: make([]*Release, len(rels))} var attachments []*Attachment for index, element := range rels { element.Attachments = []*Attachment{} @@ -280,7 +300,7 @@ func getReleaseAttachments(e Engine, rels ...*Release) (err error) { // Select attachments err = e. - Asc("release_id"). + Asc("release_id", "name"). In("release_id", sortedRels.ID). Find(&attachments, Attachment{}) if err != nil { @@ -288,7 +308,7 @@ func getReleaseAttachments(e Engine, rels ...*Release) (err error) { } // merge join - var currentIndex = 0 + currentIndex := 0 for _, attachment := range attachments { for sortedRels.ID[currentIndex] < attachment.ReleaseID { currentIndex++ diff --git a/models/repo.go b/models/repo.go index f2453cc5c..94af31878 100644 --- a/models/repo.go +++ b/models/repo.go @@ -25,6 +25,7 @@ import ( "strings" "time" + "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/options" @@ -139,8 +140,9 @@ type RepositoryStatus int // all kinds of RepositoryStatus const ( - RepositoryReady RepositoryStatus = iota // a normal repository - RepositoryBeingMigrated // repository is migrating + RepositoryReady RepositoryStatus = iota // a normal repository + RepositoryBeingMigrated // repository is migrating + RepositoryPendingTransfer // repository pending in ownership transfer state ) // TrustModelType defines the types of trust model for this repository @@ -214,12 +216,13 @@ type Repository struct { NumClosedProjects int `xorm:"NOT NULL DEFAULT 0"` NumOpenProjects int `xorm:"-"` - IsPrivate bool `xorm:"INDEX"` - IsEmpty bool `xorm:"INDEX"` - IsArchived bool `xorm:"INDEX"` - IsMirror bool `xorm:"INDEX"` - *Mirror `xorm:"-"` - Status RepositoryStatus `xorm:"NOT NULL DEFAULT 0"` + IsPrivate bool `xorm:"INDEX"` + IsEmpty bool `xorm:"INDEX"` + IsArchived bool `xorm:"INDEX"` + IsMirror bool `xorm:"INDEX"` + *Mirror `xorm:"-"` + PushMirrors []*PushMirror `xorm:"-"` + Status RepositoryStatus `xorm:"NOT NULL DEFAULT 0"` RenderingMetas map[string]string `xorm:"-"` DocumentRenderingMetas map[string]string `xorm:"-"` @@ -253,7 +256,12 @@ func (repo *Repository) SanitizedOriginalURL() string { if repo.OriginalURL == "" { return "" } - return util.SanitizeURLCredentials(repo.OriginalURL, false) + u, err := url.Parse(repo.OriginalURL) + if err != nil { + return "" + } + u.User = nil + return u.String() } // ColorFormat returns a colored string to represent this repo @@ -264,7 +272,7 @@ func (repo *Repository) ColorFormat(s fmt.State) { repo.Name) } -// IsBeingMigrated indicates that repository is being migtated +// IsBeingMigrated indicates that repository is being migrated func (repo *Repository) IsBeingMigrated() bool { return repo.Status == RepositoryBeingMigrated } @@ -318,7 +326,7 @@ func (repo *Repository) CommitLink(commitID string) (result string) { // APIURL returns the repository API URL func (repo *Repository) APIURL() string { - return setting.AppURL + path.Join("api/v1/repos", repo.FullName()) + return setting.AppURL + "api/v1/repos/" + repo.FullName() } // GetCommitsCountCacheKey returns cache key used for commits count caching. @@ -577,8 +585,7 @@ func (repo *Repository) getReviewers(e Engine, doerID, posterID int64) ([]*User, var users []*User - if repo.IsPrivate || - (repo.Owner.IsOrganization() && repo.Owner.Visibility == api.VisibleTypePrivate) { + if repo.IsPrivate || repo.Owner.Visibility == api.VisibleTypePrivate { // This a private repository: // Anyone who can read the repository is a requestable reviewer if err := e. @@ -593,15 +600,19 @@ func (repo *Repository) getReviewers(e Engine, doerID, posterID int64) ([]*User, } // This is a "public" repository: - // Any user that has write access or who is a watcher can be requested to review + // Any user that has read access, is a watcher or organization member can be requested to review if err := e. SQL("SELECT * FROM `user` WHERE id IN ( "+ - "SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? AND user_id NOT IN ( ?, ?) "+ + "SELECT user_id FROM `access` WHERE repo_id = ? AND mode >= ? "+ "UNION "+ - "SELECT user_id FROM `watch` WHERE repo_id = ? AND user_id NOT IN ( ?, ?) AND mode IN (?, ?) "+ - ") ORDER BY name", - repo.ID, AccessModeRead, doerID, posterID, - repo.ID, doerID, posterID, RepoWatchModeNormal, RepoWatchModeAuto). + "SELECT user_id FROM `watch` WHERE repo_id = ? AND mode IN (?, ?) "+ + "UNION "+ + "SELECT uid AS user_id FROM `org_user` WHERE org_id = ? "+ + ") AND id NOT IN (?, ?) ORDER BY name", + repo.ID, AccessModeRead, + repo.ID, RepoWatchModeNormal, RepoWatchModeAuto, + repo.OwnerID, + doerID, posterID). Find(&users); err != nil { return nil, err } @@ -611,9 +622,9 @@ func (repo *Repository) getReviewers(e Engine, doerID, posterID int64) ([]*User, // GetReviewers get all users can be requested to review: // * for private repositories this returns all users that have read access or higher to the repository. -// * for public repositories this returns all users that have write access or higher to the repository, -// and all repo watchers. -// TODO: may be we should hava a busy choice for users to block review request to them. +// * for public repositories this returns all users that have read access or higher to the repository, +// all repo watchers and all organization members. +// TODO: may be we should have a busy choice for users to block review request to them. func (repo *Repository) GetReviewers(doerID, posterID int64) ([]*User, error) { return repo.getReviewers(x, doerID, posterID) } @@ -651,6 +662,12 @@ func (repo *Repository) GetMirror() (err error) { return err } +// LoadPushMirrors populates the repository push mirrors. +func (repo *Repository) LoadPushMirrors() (err error) { + repo.PushMirrors, err = GetPushMirrorsByRepoID(repo.ID) + return err +} + // GetBaseRepo populates repo.BaseRepo for a fork repository and // returns an error on failure (NOTE: no error is returned for // non-fork repositories, and BaseRepo will be left untouched) @@ -735,16 +752,13 @@ func (repo *Repository) updateSize(e Engine) error { return fmt.Errorf("updateSize: %v", err) } - objs, err := repo.GetLFSMetaObjects(-1, 0) + lfsSize, err := e.Where("repository_id = ?", repo.ID).SumInt(new(LFSMetaObject), "size") if err != nil { return fmt.Errorf("updateSize: GetLFSMetaObjects: %v", err) } - for _, obj := range objs { - size += obj.Size - } - repo.Size = size - _, err = e.ID(repo.ID).Cols("size").Update(repo) + repo.Size = size + lfsSize + _, err = e.ID(repo.ID).Cols("size").NoAutoTime().Update(repo) return err } @@ -860,7 +874,10 @@ func (repo *Repository) getUsersWithAccessMode(e Engine, mode AccessMode) (_ []* // DescriptionHTML does special handles to description and return HTML string. func (repo *Repository) DescriptionHTML() template.HTML { - desc, err := markup.RenderDescriptionHTML([]byte(repo.Description), repo.HTMLURL(), repo.ComposeMetas()) + desc, err := markup.RenderDescriptionHTML(&markup.RenderContext{ + URLPrefix: repo.HTMLURL(), + Metas: repo.ComposeMetas(), + }, repo.Description) if err != nil { log.Error("Failed to render description for %s (ID: %d): %v", repo.Name, repo.ID, err) return template.HTML(markup.Sanitize(repo.Description)) @@ -868,6 +885,11 @@ func (repo *Repository) DescriptionHTML() template.HTML { return template.HTML(markup.Sanitize(string(desc))) } +// ReadBy sets repo to be visited by given user. +func (repo *Repository) ReadBy(userID int64) error { + return setRepoNotificationStatusReadIfUnread(x, userID, repo.ID) +} + func isRepositoryExist(e Engine, u *User, repoName string) (bool, error) { has, err := e.Get(&Repository{ OwnerID: u.ID, @@ -982,6 +1004,13 @@ type CreateRepoOptions struct { MirrorInterval string } +// ForkRepoOptions contains the fork repository options +type ForkRepoOptions struct { + BaseRepo *Repository + Name string + Description string +} + // GetRepoInitFile returns repository init files func GetRepoInitFile(tp, name string) ([]byte, error) { cleanedName := strings.TrimLeft(path.Clean("/"+name), "/") @@ -1013,7 +1042,7 @@ func GetRepoInitFile(tp, name string) ([]byte, error) { var ( reservedRepoNames = []string{".", ".."} - reservedRepoPatterns = []string{"*.git", "*.wiki"} + reservedRepoPatterns = []string{"*.git", "*.wiki", "*.rss", "*.atom"} ) // IsUsableRepoName returns true when repository is usable @@ -1060,7 +1089,7 @@ func CreateRepository(ctx DBContext, doer, u *User, repo *Repository, overwriteO } // insert units for repo - var units = make([]RepoUnit, 0, len(DefaultRepoUnits)) + units := make([]RepoUnit, 0, len(DefaultRepoUnits)) for _, tp := range DefaultRepoUnits { if tp == UnitTypeIssues { units = append(units, RepoUnit{ @@ -1076,7 +1105,7 @@ func CreateRepository(ctx DBContext, doer, u *User, repo *Repository, overwriteO units = append(units, RepoUnit{ RepoID: repo.ID, Type: tp, - Config: &PullRequestsConfig{AllowMerge: true, AllowRebase: true, AllowRebaseMerge: true, AllowSquash: true}, + Config: &PullRequestsConfig{AllowMerge: true, AllowRebase: true, AllowRebaseMerge: true, AllowSquash: true, DefaultMergeStyle: MergeStyleMerge}, }) } else { units = append(units, RepoUnit{ @@ -1103,8 +1132,8 @@ func CreateRepository(ctx DBContext, doer, u *User, repo *Repository, overwriteO // Give access to all members in teams with access to all repositories. if u.IsOrganization() { - if err := u.GetTeams(&SearchTeamOptions{}); err != nil { - return fmt.Errorf("GetTeams: %v", err) + if err := u.loadTeams(ctx.e); err != nil { + return fmt.Errorf("loadTeams: %v", err) } for _, t := range u.Teams { if t.IncludesAllRepositories { @@ -1130,6 +1159,16 @@ func CreateRepository(ctx DBContext, doer, u *User, repo *Repository, overwriteO return fmt.Errorf("recalculateAccesses: %v", err) } + if u.Visibility == api.VisibleTypePublic && !repo.IsPrivate { + // Create/Remove git-daemon-export-ok for git-daemon... + daemonExportFile := path.Join(repo.RepoPath(), `git-daemon-export-ok`) + if f, err := os.Create(daemonExportFile); err != nil { + log.Error("Failed to create %s: %v", daemonExportFile, err) + } else { + f.Close() + } + } + if setting.Service.AutoWatchNewRepos { if err = watchRepo(ctx.e, doer.ID, repo.ID, true); err != nil { return fmt.Errorf("watchRepo: %v", err) @@ -1185,140 +1224,6 @@ func IncrementRepoForkNum(ctx DBContext, repoID int64) error { return err } -// TransferOwnership transfers all corresponding setting from old user to new one. -func TransferOwnership(doer *User, newOwnerName string, repo *Repository) error { - newOwner, err := GetUserByName(newOwnerName) - if err != nil { - return fmt.Errorf("get new owner '%s': %v", newOwnerName, err) - } - - // Check if new owner has repository with same name. - has, err := IsRepositoryExist(newOwner, repo.Name) - if err != nil { - return fmt.Errorf("IsRepositoryExist: %v", err) - } else if has { - return ErrRepoAlreadyExist{newOwnerName, repo.Name} - } - - sess := x.NewSession() - defer sess.Close() - if err = sess.Begin(); err != nil { - return fmt.Errorf("sess.Begin: %v", err) - } - - oldOwner := repo.Owner - - // Note: we have to set value here to make sure recalculate accesses is based on - // new owner. - repo.OwnerID = newOwner.ID - repo.Owner = newOwner - repo.OwnerName = newOwner.Name - - // Update repository. - if _, err := sess.ID(repo.ID).Update(repo); err != nil { - return fmt.Errorf("update owner: %v", err) - } - - // Remove redundant collaborators. - collaborators, err := repo.getCollaborators(sess, ListOptions{}) - if err != nil { - return fmt.Errorf("getCollaborators: %v", err) - } - - // Dummy object. - collaboration := &Collaboration{RepoID: repo.ID} - for _, c := range collaborators { - if c.ID != newOwner.ID { - isMember, err := isOrganizationMember(sess, newOwner.ID, c.ID) - if err != nil { - return fmt.Errorf("IsOrgMember: %v", err) - } else if !isMember { - continue - } - } - collaboration.UserID = c.ID - if _, err = sess.Delete(collaboration); err != nil { - return fmt.Errorf("remove collaborator '%d': %v", c.ID, err) - } - } - - // Remove old team-repository relations. - if oldOwner.IsOrganization() { - if err = oldOwner.removeOrgRepo(sess, repo.ID); err != nil { - return fmt.Errorf("removeOrgRepo: %v", err) - } - } - - if newOwner.IsOrganization() { - if err := newOwner.getTeams(sess); err != nil { - return fmt.Errorf("GetTeams: %v", err) - } - for _, t := range newOwner.Teams { - if t.IncludesAllRepositories { - if err := t.addRepository(sess, repo); err != nil { - return fmt.Errorf("addRepository: %v", err) - } - } - } - } else if err = repo.recalculateAccesses(sess); err != nil { - // Organization called this in addRepository method. - return fmt.Errorf("recalculateAccesses: %v", err) - } - - // Update repository count. - if _, err = sess.Exec("UPDATE `user` SET num_repos=num_repos+1 WHERE id=?", newOwner.ID); err != nil { - return fmt.Errorf("increase new owner repository count: %v", err) - } else if _, err = sess.Exec("UPDATE `user` SET num_repos=num_repos-1 WHERE id=?", oldOwner.ID); err != nil { - return fmt.Errorf("decrease old owner repository count: %v", err) - } - - if err = watchRepo(sess, doer.ID, repo.ID, true); err != nil { - return fmt.Errorf("watchRepo: %v", err) - } - - // Remove watch for organization. - if oldOwner.IsOrganization() { - if err = watchRepo(sess, oldOwner.ID, repo.ID, false); err != nil { - return fmt.Errorf("watchRepo [false]: %v", err) - } - } - - // Rename remote repository to new path and delete local copy. - dir := UserPath(newOwner.Name) - - if err := os.MkdirAll(dir, os.ModePerm); err != nil { - return fmt.Errorf("Failed to create dir %s: %v", dir, err) - } - - if err = os.Rename(RepoPath(oldOwner.Name, repo.Name), RepoPath(newOwner.Name, repo.Name)); err != nil { - return fmt.Errorf("rename repository directory: %v", err) - } - - // Rename remote wiki repository to new path and delete local copy. - wikiPath := WikiPath(oldOwner.Name, repo.Name) - isExist, err := util.IsExist(wikiPath) - if err != nil { - log.Error("Unable to check if %s exists. Error: %v", wikiPath, err) - return err - } - if isExist { - if err = os.Rename(wikiPath, WikiPath(newOwner.Name, repo.Name)); err != nil { - return fmt.Errorf("rename repository wiki: %v", err) - } - } - - // If there was previously a redirect at this location, remove it. - if err = deleteRepoRedirect(sess, newOwner.ID, repo.Name); err != nil { - return fmt.Errorf("delete repo redirect: %v", err) - } - - if err := NewRepoRedirect(DBContext{sess}, oldOwner.ID, repo.ID, repo.Name, repo.Name); err != nil { - return fmt.Errorf("NewRepoRedirect: %v", err) - } - - return sess.Commit() -} - // ChangeRepositoryName changes all corresponding setting from old repository name to new one. func ChangeRepositoryName(doer *User, repo *Repository, newRepoName string) (err error) { oldRepoName := repo.Name @@ -1339,7 +1244,7 @@ func ChangeRepositoryName(doer *User, repo *Repository, newRepoName string) (err } newRepoPath := RepoPath(repo.Owner.Name, newRepoName) - if err = os.Rename(repo.RepoPath(), newRepoPath); err != nil { + if err = util.Rename(repo.RepoPath(), newRepoPath); err != nil { return fmt.Errorf("rename repository directory: %v", err) } @@ -1350,7 +1255,7 @@ func ChangeRepositoryName(doer *User, repo *Repository, newRepoName string) (err return err } if isExist { - if err = os.Rename(wikiPath, WikiPath(repo.Owner.Name, newRepoName)); err != nil { + if err = util.Rename(wikiPath, WikiPath(repo.Owner.Name, newRepoName)); err != nil { return fmt.Errorf("rename repository wiki: %v", err) } } @@ -1361,12 +1266,7 @@ func ChangeRepositoryName(doer *User, repo *Repository, newRepoName string) (err return fmt.Errorf("sess.Begin: %v", err) } - // If there was previously a redirect at this location, remove it. - if err = deleteRepoRedirect(sess, repo.OwnerID, newRepoName); err != nil { - return fmt.Errorf("delete repo redirect: %v", err) - } - - if err := NewRepoRedirect(DBContext{sess}, repo.Owner.ID, repo.ID, oldRepoName, newRepoName); err != nil { + if err := newRepoRedirect(sess, repo.Owner.ID, repo.ID, oldRepoName, newRepoName); err != nil { return err } @@ -1427,15 +1327,16 @@ func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err e // Create/Remove git-daemon-export-ok for git-daemon... daemonExportFile := path.Join(repo.RepoPath(), `git-daemon-export-ok`) isExist, err := util.IsExist(daemonExportFile) + isPublic := !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePublic if err != nil { log.Error("Unable to check if %s exists. Error: %v", daemonExportFile, err) return err } - if repo.IsPrivate && isExist { + if !isPublic && isExist { if err = util.Remove(daemonExportFile); err != nil { log.Error("Failed to remove %s: %v", daemonExportFile, err) } - } else if !repo.IsPrivate && !isExist { + } else if isPublic && !isExist { if f, err := os.Create(daemonExportFile); err != nil { log.Error("Failed to create %s: %v", daemonExportFile, err) } else { @@ -1478,6 +1379,26 @@ func UpdateRepository(repo *Repository, visibilityChanged bool) (err error) { return sess.Commit() } +// UpdateRepositoryOwnerNames updates repository owner_names (this should only be used when the ownerName has changed case) +func UpdateRepositoryOwnerNames(ownerID int64, ownerName string) error { + if ownerID == 0 { + return nil + } + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + if _, err := sess.Where("owner_id = ?", ownerID).Cols("owner_name").Update(&Repository{ + OwnerName: ownerName, + }); err != nil { + return err + } + + return sess.Commit() +} + // UpdateRepositoryUpdatedTime updates a repository's updated time func UpdateRepositoryUpdatedTime(repoID int64, updateTime time.Time) error { _, err := x.Exec("UPDATE repository SET updated_unix = ? WHERE id = ?", updateTime.Unix(), repoID) @@ -1511,26 +1432,27 @@ func UpdateRepositoryUnits(repo *Repository, units []RepoUnit, deleteUnitTypes [ } // DeleteRepository deletes a repository for a user or organization. +// make sure if you call this func to close open sessions (sqlite will otherwise get a deadlock) func DeleteRepository(doer *User, uid, repoID int64) error { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + // In case is a organization. - org, err := GetUserByID(uid) + org, err := getUserByID(sess, uid) if err != nil { return err } if org.IsOrganization() { - if err = org.GetTeams(&SearchTeamOptions{}); err != nil { + if err = org.loadTeams(sess); err != nil { return err } } - sess := x.NewSession() - defer sess.Close() - if err = sess.Begin(); err != nil { - return err - } - - repo := &Repository{ID: repoID, OwnerID: uid} - has, err := sess.Get(repo) + repo := &Repository{OwnerID: uid} + has, err := sess.ID(repoID).Get(repo) if err != nil { return err } else if !has { @@ -1538,7 +1460,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error { } // Delete Deploy Keys - deployKeys, err := listDeployKeys(sess, repo.ID, ListOptions{}) + deployKeys, err := listDeployKeys(sess, &ListDeployKeysOptions{RepoID: repoID}) if err != nil { return fmt.Errorf("listDeployKeys: %v", err) } @@ -1575,56 +1497,72 @@ func DeleteRepository(doer *User, uid, repoID int64) error { releaseAttachments = append(releaseAttachments, attachments[i].RelativePath()) } - if _, err = sess.Exec("UPDATE `user` SET num_stars=num_stars-1 WHERE id IN (SELECT `uid` FROM `star` WHERE repo_id = ?)", repo.ID); err != nil { + if _, err = sess.In("release_id", builder.Select("id").From("`release`").Where(builder.Eq{"`release`.repo_id": repoID})). + Delete(&Attachment{}); err != nil { return err } - if err = deleteBeans(sess, + if _, err := sess.Exec("UPDATE `user` SET num_stars=num_stars-1 WHERE id IN (SELECT `uid` FROM `star` WHERE repo_id = ?)", repo.ID); err != nil { + return err + } + + if err := deleteBeans(sess, &Access{RepoID: repo.ID}, &Action{RepoID: repo.ID}, - &Watch{RepoID: repoID}, - &Star{RepoID: repoID}, - &Mirror{RepoID: repoID}, - &Milestone{RepoID: repoID}, - &Release{RepoID: repoID}, &Collaboration{RepoID: repoID}, - &PullRequest{BaseRepoID: repoID}, - &RepoUnit{RepoID: repoID}, - &RepoRedirect{RedirectRepoID: repoID}, - &Webhook{RepoID: repoID}, - &HookTask{RepoID: repoID}, - &Notification{RepoID: repoID}, - &CommitStatus{RepoID: repoID}, - &RepoIndexerStatus{RepoID: repoID}, - &LanguageStat{RepoID: repoID}, &Comment{RefRepoID: repoID}, + &CommitStatus{RepoID: repoID}, + &DeletedBranch{RepoID: repoID}, + &HookTask{RepoID: repoID}, + &LFSLock{RepoID: repoID}, + &LanguageStat{RepoID: repoID}, + &Milestone{RepoID: repoID}, + &Mirror{RepoID: repoID}, + &Notification{RepoID: repoID}, + &ProtectedBranch{RepoID: repoID}, + &ProtectedTag{RepoID: repoID}, + &PullRequest{BaseRepoID: repoID}, + &PushMirror{RepoID: repoID}, + &Release{RepoID: repoID}, + &RepoIndexerStatus{RepoID: repoID}, + &RepoRedirect{RedirectRepoID: repoID}, + &RepoUnit{RepoID: repoID}, + &Star{RepoID: repoID}, &Task{RepoID: repoID}, + &Watch{RepoID: repoID}, + &Webhook{RepoID: repoID}, ); err != nil { return fmt.Errorf("deleteBeans: %v", err) } + // Delete Labels and related objects + if err := deleteLabelsByRepoID(sess, repoID); err != nil { + return err + } + // Delete Issues and related objects var attachmentPaths []string if attachmentPaths, err = deleteIssuesByRepoID(sess, repoID); err != nil { return err } - if _, err = sess.Where("repo_id = ?", repoID).Delete(new(RepoUnit)); err != nil { + // Delete issue index + if err := deleteResouceIndex(sess, "issue_index", repoID); err != nil { return err } if repo.IsFork { - if _, err = sess.Exec("UPDATE `repository` SET num_forks=num_forks-1 WHERE id=?", repo.ForkID); err != nil { + if _, err := sess.Exec("UPDATE `repository` SET num_forks=num_forks-1 WHERE id=?", repo.ForkID); err != nil { return fmt.Errorf("decrease fork count: %v", err) } } - if _, err = sess.Exec("UPDATE `user` SET num_repos=num_repos-1 WHERE id=?", uid); err != nil { + if _, err := sess.Exec("UPDATE `user` SET num_repos=num_repos-1 WHERE id=?", uid); err != nil { return err } if len(repo.Topics) > 0 { - if err = removeTopicsFromRepo(sess, repo.ID); err != nil { + if err := removeTopicsFromRepo(sess, repo.ID); err != nil { return err } } @@ -1657,7 +1595,7 @@ func DeleteRepository(doer *User, uid, repoID int64) error { } for _, v := range lfsObjects { - count, err := sess.Count(&LFSMetaObject{Oid: v.Oid}) + count, err := sess.Count(&LFSMetaObject{Pointer: lfs.Pointer{Oid: v.Oid}}) if err != nil { return err } @@ -1672,6 +1610,22 @@ func DeleteRepository(doer *User, uid, repoID int64) error { return err } + // Remove archives + var archives []*RepoArchiver + if err = sess.Where("repo_id=?", repoID).Find(&archives); err != nil { + return err + } + + for _, v := range archives { + v.Repo = repo + p, _ := v.RelativePath() + removeStorageWithNotice(sess, storage.RepoArchives, "Delete repo archive file", p) + } + + if _, err := sess.Delete(&RepoArchiver{RepoID: repoID}); err != nil { + return err + } + if repo.NumForks > 0 { if _, err = sess.Exec("UPDATE `repository` SET fork_id=0,is_fork=? WHERE fork_id=?", false, repo.ID); err != nil { log.Error("reset 'fork_id' and 'is_fork': %v", err) @@ -1679,20 +1633,13 @@ func DeleteRepository(doer *User, uid, repoID int64) error { } if err = sess.Commit(); err != nil { - sess.Close() - if len(deployKeys) > 0 { - // We need to rewrite the public keys because the commit failed - if err2 := RewriteAllPublicKeys(); err2 != nil { - return fmt.Errorf("Commit: %v SSH Keys: %v", err, err2) - } - } - return fmt.Errorf("Commit: %v", err) + return err } sess.Close() // We should always delete the files after the database transaction succeed. If - // we delete the file but the database rollback, the repository will be borken. + // we delete the file but the database rollback, the repository will be broken. // Remove issue attachment files. for i := range attachmentPaths { @@ -1771,7 +1718,7 @@ func GetRepositoryByIDCtx(ctx DBContext, id int64) (*Repository, error) { // GetRepositoriesMapByIDs returns the repositories by given id slice. func GetRepositoriesMapByIDs(ids []int64) (map[int64]*Repository, error) { - var repos = make(map[int64]*Repository, len(ids)) + repos := make(map[int64]*Repository, len(ids)) return repos, x.In("id", ids).Find(&repos) } @@ -1781,7 +1728,7 @@ func GetUserRepositories(opts *SearchRepoOptions) ([]*Repository, int64, error) opts.OrderBy = "updated_unix DESC" } - var cond = builder.NewCond() + cond := builder.NewCond() cond = cond.And(builder.Eq{"owner_id": opts.Actor.ID}) if !opts.Private { cond = cond.And(builder.Eq{"is_private": false}) @@ -1840,84 +1787,49 @@ func GetPrivateRepositoryCount(u *User) (int64, error) { return getPrivateRepositoryCount(x, u) } -// DeleteRepositoryArchives deletes all repositories' archives. -func DeleteRepositoryArchives(ctx context.Context) error { - return x. - Where("id > 0"). - Iterate(new(Repository), - func(idx int, bean interface{}) error { - repo := bean.(*Repository) - select { - case <-ctx.Done(): - return ErrCancelledf("before deleting repository archives for %s", repo.FullName()) - default: - } - return util.RemoveAll(filepath.Join(repo.RepoPath(), "archives")) - }) -} - // DeleteOldRepositoryArchives deletes old repository archives. func DeleteOldRepositoryArchives(ctx context.Context, olderThan time.Duration) error { log.Trace("Doing: ArchiveCleanup") - if err := x.Where("id > 0").Iterate(new(Repository), func(idx int, bean interface{}) error { - return deleteOldRepositoryArchives(ctx, olderThan, idx, bean) - }); err != nil { - log.Trace("Error: ArchiveClean: %v", err) - return err + for { + var archivers []RepoArchiver + err := x.Where("created_unix < ?", time.Now().Add(-olderThan).Unix()). + Asc("created_unix"). + Limit(100). + Find(&archivers) + if err != nil { + log.Trace("Error: ArchiveClean: %v", err) + return err + } + + for _, archiver := range archivers { + if err := deleteOldRepoArchiver(ctx, &archiver); err != nil { + return err + } + } + if len(archivers) < 100 { + break + } } log.Trace("Finished: ArchiveCleanup") return nil } -func deleteOldRepositoryArchives(ctx context.Context, olderThan time.Duration, idx int, bean interface{}) error { - repo := bean.(*Repository) - basePath := filepath.Join(repo.RepoPath(), "archives") +var delRepoArchiver = new(RepoArchiver) - for _, ty := range []string{"zip", "targz"} { - select { - case <-ctx.Done(): - return ErrCancelledf("before deleting old repository archives with filetype %s for %s", ty, repo.FullName()) - default: - } - - path := filepath.Join(basePath, ty) - file, err := os.Open(path) - if err != nil { - if !os.IsNotExist(err) { - log.Warn("Unable to open directory %s: %v", path, err) - return err - } - - // If the directory doesn't exist, that's okay. - continue - } - - files, err := file.Readdir(0) - file.Close() - if err != nil { - log.Warn("Unable to read directory %s: %v", path, err) - return err - } - - minimumOldestTime := time.Now().Add(-olderThan) - for _, info := range files { - if info.ModTime().Before(minimumOldestTime) && !info.IsDir() { - select { - case <-ctx.Done(): - return ErrCancelledf("before deleting old repository archive file %s with filetype %s for %s", info.Name(), ty, repo.FullName()) - default: - } - toDelete := filepath.Join(path, info.Name()) - // This is a best-effort purge, so we do not check error codes to confirm removal. - if err = util.Remove(toDelete); err != nil { - log.Trace("Unable to delete %s, but proceeding: %v", toDelete, err) - } - } - } +func deleteOldRepoArchiver(ctx context.Context, archiver *RepoArchiver) error { + p, err := archiver.RelativePath() + if err != nil { + return err + } + _, err = x.ID(archiver.ID).Delete(delRepoArchiver) + if err != nil { + return err + } + if err := storage.RepoArchives.Delete(p); err != nil { + log.Error("delete repo archive file failed: %v", err) } - return nil } @@ -2231,9 +2143,9 @@ func DoctorUserStarNum() (err error) { // IterateRepository iterate repositories func IterateRepository(f func(repo *Repository) error) error { var start int - var batchSize = setting.Database.IterateBufferSize + batchSize := setting.Database.IterateBufferSize for { - var repos = make([]*Repository, 0, batchSize) + repos := make([]*Repository, 0, batchSize) if err := x.Limit(batchSize, start).Find(&repos); err != nil { return err } diff --git a/models/repo_archiver.go b/models/repo_archiver.go new file mode 100644 index 000000000..677f0d3e8 --- /dev/null +++ b/models/repo_archiver.go @@ -0,0 +1,87 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "fmt" + + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/timeutil" +) + +// RepoArchiverStatus represents repo archive status +type RepoArchiverStatus int + +// enumerate all repo archive statuses +const ( + RepoArchiverGenerating = iota // the archiver is generating + RepoArchiverReady // it's ready +) + +// RepoArchiver represents all archivers +type RepoArchiver struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"index unique(s)"` + Repo *Repository `xorm:"-"` + Type git.ArchiveType `xorm:"unique(s)"` + Status RepoArchiverStatus + CommitID string `xorm:"VARCHAR(40) unique(s)"` + CreatedUnix timeutil.TimeStamp `xorm:"INDEX NOT NULL created"` +} + +// LoadRepo loads repository +func (archiver *RepoArchiver) LoadRepo() (*Repository, error) { + if archiver.Repo != nil { + return archiver.Repo, nil + } + + var repo Repository + has, err := x.ID(archiver.RepoID).Get(&repo) + if err != nil { + return nil, err + } + if !has { + return nil, ErrRepoNotExist{ + ID: archiver.RepoID, + } + } + return &repo, nil +} + +// RelativePath returns relative path +func (archiver *RepoArchiver) RelativePath() (string, error) { + return fmt.Sprintf("%d/%s/%s.%s", archiver.RepoID, archiver.CommitID[:2], archiver.CommitID, archiver.Type.String()), nil +} + +// GetRepoArchiver get an archiver +func GetRepoArchiver(ctx DBContext, repoID int64, tp git.ArchiveType, commitID string) (*RepoArchiver, error) { + var archiver RepoArchiver + has, err := ctx.e.Where("repo_id=?", repoID).And("`type`=?", tp).And("commit_id=?", commitID).Get(&archiver) + if err != nil { + return nil, err + } + if has { + return &archiver, nil + } + return nil, nil +} + +// AddRepoArchiver adds an archiver +func AddRepoArchiver(ctx DBContext, archiver *RepoArchiver) error { + _, err := ctx.e.Insert(archiver) + return err +} + +// UpdateRepoArchiverStatus updates archiver's status +func UpdateRepoArchiverStatus(ctx DBContext, archiver *RepoArchiver) error { + _, err := ctx.e.ID(archiver.ID).Cols("status").Update(archiver) + return err +} + +// DeleteAllRepoArchives deletes all repo archives records +func DeleteAllRepoArchives() error { + _, err := x.Where("1=1").Delete(new(RepoArchiver)) + return err +} diff --git a/models/repo_collaboration.go b/models/repo_collaboration.go index b9488f5e2..a8b715bbc 100644 --- a/models/repo_collaboration.go +++ b/models/repo_collaboration.go @@ -102,6 +102,11 @@ func (repo *Repository) GetCollaborators(listOptions ListOptions) ([]*Collaborat return repo.getCollaborators(x, listOptions) } +// CountCollaborators returns total number of collaborators for a repository +func (repo *Repository) CountCollaborators() (int64, error) { + return x.Where("repo_id = ? ", repo.ID).Count(&Collaboration{}) +} + func (repo *Repository) getCollaboration(e Engine, uid int64) (*Collaboration, error) { collaboration := &Collaboration{ RepoID: repo.ID, diff --git a/models/repo_generate.go b/models/repo_generate.go index b0016494c..66682903f 100644 --- a/models/repo_generate.go +++ b/models/repo_generate.go @@ -5,13 +5,14 @@ package models import ( + "bufio" + "bytes" "strconv" "strings" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/storage" - "code.gitea.io/gitea/modules/util" "github.com/gobwas/glob" ) @@ -49,9 +50,9 @@ func (gt GiteaTemplate) Globs() []glob.Glob { } gt.globs = make([]glob.Glob, 0) - lines := strings.Split(string(util.NormalizeEOL(gt.Content)), "\n") - for _, line := range lines { - line = strings.TrimSpace(line) + scanner := bufio.NewScanner(bytes.NewReader(gt.Content)) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) if line == "" || strings.HasPrefix(line, "#") { continue } @@ -110,7 +111,7 @@ func GenerateGitHooks(ctx DBContext, templateRepo, generateRepo *Repository) err // GenerateWebhooks generates webhooks from a template repository func GenerateWebhooks(ctx DBContext, templateRepo, generateRepo *Repository) error { - templateWebhooks, err := GetWebhooksByRepoID(templateRepo.ID, ListOptions{}) + templateWebhooks, err := ListWebhooksByOpts(&ListWebhookOptions{RepoID: templateRepo.ID}) if err != nil { return err } diff --git a/models/repo_generate_test.go b/models/repo_generate_test.go index 53ab4fcd3..e7a93433a 100644 --- a/models/repo_generate_test.go +++ b/models/repo_generate_test.go @@ -25,7 +25,7 @@ text/*.txt func TestGiteaTemplate(t *testing.T) { gt := GiteaTemplate{Content: giteaTemplate} - assert.Equal(t, len(gt.Globs()), 3) + assert.Len(t, gt.Globs(), 3) tt := []struct { Path string diff --git a/models/repo_language_stats.go b/models/repo_language_stats.go index e60e441c7..8760726ae 100644 --- a/models/repo_language_stats.go +++ b/models/repo_language_stats.go @@ -193,7 +193,7 @@ func CopyLanguageStat(originalRepo, destRepo *Repository) error { RepoLang[i].RepoID = destRepo.ID RepoLang[i].CreatedUnix = timeutil.TimeStampNow() } - //update destRepo's indexer status + // update destRepo's indexer status tmpCommitID := RepoLang[0].CommitID if err := destRepo.updateIndexerStatus(sess, RepoIndexerTypeStats, tmpCommitID); err != nil { return err diff --git a/models/repo_list.go b/models/repo_list.go index de3562a2a..772bd20be 100644 --- a/models/repo_list.go +++ b/models/repo_list.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/util" "xorm.io/builder" + "xorm.io/xorm" ) // RepositoryListDefaultPageSize is the default number of repositories @@ -142,15 +143,16 @@ type SearchRepoOptions struct { OrderBy SearchOrderBy Private bool // Include private repositories in results StarredByID int64 + WatchedByID int64 AllPublic bool // Include also all public repositories of users and public organisations AllLimited bool // Include also all public repositories of limited organisations // None -> include public and private // True -> include just private - // False -> incude just public + // False -> include just public IsPrivate util.OptionalBool // None -> include collaborative AND non-collaborative // True -> include just collaborative - // False -> incude just non-collaborative + // False -> include just non-collaborative Collaborate util.OptionalBool // None -> include forks AND non-forks // True -> include just forks @@ -180,7 +182,7 @@ type SearchRepoOptions struct { LowerNames []string } -//SearchOrderBy is used to sort the result +// SearchOrderBy is used to sort the result type SearchOrderBy string func (s SearchOrderBy) String() string { @@ -207,7 +209,7 @@ const ( // SearchRepositoryCondition creates a query condition according search repository options func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if opts.Private { if opts.Actor != nil && !opts.Actor.IsAdmin && opts.Actor.ID != opts.OwnerID { @@ -215,16 +217,14 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { cond = cond.And(accessibleRepositoryCondition(opts.Actor)) } } else { - // Not looking at private organisations + // Not looking at private organisations and users // We should be able to see all non-private repositories that // isn't in a private or limited organisation. cond = cond.And( builder.Eq{"is_private": false}, builder.NotIn("owner_id", builder.Select("id").From("`user`").Where( - builder.And( - builder.Eq{"type": UserTypeOrganization}, - builder.Or(builder.Eq{"visibility": structs.VisibleTypeLimited}, builder.Eq{"visibility": structs.VisibleTypePrivate}), - )))) + builder.Or(builder.Eq{"visibility": structs.VisibleTypeLimited}, builder.Eq{"visibility": structs.VisibleTypePrivate}), + ))) } if opts.IsPrivate != util.OptionalBoolNone { @@ -240,9 +240,14 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { cond = cond.And(builder.In("id", builder.Select("repo_id").From("star").Where(builder.Eq{"uid": opts.StarredByID}))) } + // Restrict to watched repositories + if opts.WatchedByID > 0 { + cond = cond.And(builder.In("id", builder.Select("repo_id").From("watch").Where(builder.Eq{"user_id": opts.WatchedByID}))) + } + // Restrict repositories to those the OwnerID owns or contributes to as per opts.Collaborate if opts.OwnerID > 0 { - var accessCond = builder.NewCond() + accessCond := builder.NewCond() if opts.Collaborate != util.OptionalBoolTrue { accessCond = builder.Eq{"owner_id": opts.OwnerID} } @@ -301,7 +306,7 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { if opts.Keyword != "" { // separate keyword - var subQueryCond = builder.NewCond() + subQueryCond := builder.NewCond() for _, v := range strings.Split(opts.Keyword, ",") { if opts.TopicOnly { subQueryCond = subQueryCond.Or(builder.Eq{"topic.name": strings.ToLower(v)}) @@ -314,9 +319,9 @@ func SearchRepositoryCondition(opts *SearchRepoOptions) builder.Cond { Where(subQueryCond). GroupBy("repo_topic.repo_id") - var keywordCond = builder.In("id", subQuery) + keywordCond := builder.In("id", subQuery) if !opts.TopicOnly { - var likes = builder.NewCond() + likes := builder.NewCond() for _, v := range strings.Split(opts.Keyword, ",") { likes = likes.Or(builder.Like{"lower_name", strings.ToLower(v)}) if opts.IncludeDescription { @@ -363,6 +368,35 @@ func SearchRepository(opts *SearchRepoOptions) (RepositoryList, int64, error) { // SearchRepositoryByCondition search repositories by condition func SearchRepositoryByCondition(opts *SearchRepoOptions, cond builder.Cond, loadAttributes bool) (RepositoryList, int64, error) { + sess, count, err := searchRepositoryByCondition(opts, cond) + if err != nil { + return nil, 0, err + } + defer sess.Close() + + defaultSize := 50 + if opts.PageSize > 0 { + defaultSize = opts.PageSize + } + repos := make(RepositoryList, 0, defaultSize) + if err := sess.Find(&repos); err != nil { + return nil, 0, fmt.Errorf("Repo: %v", err) + } + + if opts.PageSize <= 0 { + count = int64(len(repos)) + } + + if loadAttributes { + if err := repos.loadAttributes(sess); err != nil { + return nil, 0, fmt.Errorf("LoadAttributes: %v", err) + } + } + + return repos, count, nil +} + +func searchRepositoryByCondition(opts *SearchRepoOptions, cond builder.Cond) (*xorm.Session, int64, error) { if opts.Page <= 0 { opts.Page = 1 } @@ -376,37 +410,29 @@ func SearchRepositoryByCondition(opts *SearchRepoOptions, cond builder.Cond, loa } sess := x.NewSession() - defer sess.Close() - count, err := sess. - Where(cond). - Count(new(Repository)) - - if err != nil { - return nil, 0, fmt.Errorf("Count: %v", err) + var count int64 + if opts.PageSize > 0 { + var err error + count, err = sess. + Where(cond). + Count(new(Repository)) + if err != nil { + _ = sess.Close() + return nil, 0, fmt.Errorf("Count: %v", err) + } } - repos := make(RepositoryList, 0, opts.PageSize) sess.Where(cond).OrderBy(opts.OrderBy.String()) if opts.PageSize > 0 { sess.Limit(opts.PageSize, (opts.Page-1)*opts.PageSize) } - if err = sess.Find(&repos); err != nil { - return nil, 0, fmt.Errorf("Repo: %v", err) - } - - if loadAttributes { - if err = repos.loadAttributes(sess); err != nil { - return nil, 0, fmt.Errorf("LoadAttributes: %v", err) - } - } - - return repos, count, nil + return sess, count, nil } // accessibleRepositoryCondition takes a user a returns a condition for checking if a repository is accessible func accessibleRepositoryCondition(user *User) builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if user == nil || !user.IsRestricted || user.ID <= 0 { orgVisibilityLimit := []structs.VisibleType{structs.VisibleTypePrivate} @@ -457,6 +483,33 @@ func SearchRepositoryByName(opts *SearchRepoOptions) (RepositoryList, int64, err return SearchRepository(opts) } +// SearchRepositoryIDs takes keyword and part of repository name to search, +// it returns results in given range and number of total results. +func SearchRepositoryIDs(opts *SearchRepoOptions) ([]int64, int64, error) { + opts.IncludeDescription = false + + cond := SearchRepositoryCondition(opts) + + sess, count, err := searchRepositoryByCondition(opts, cond) + if err != nil { + return nil, 0, err + } + defer sess.Close() + + defaultSize := 50 + if opts.PageSize > 0 { + defaultSize = opts.PageSize + } + + ids := make([]int64, 0, defaultSize) + err = sess.Select("id").Table("repository").Find(&ids) + if opts.PageSize <= 0 { + count = int64(len(ids)) + } + + return ids, count, err +} + // AccessibleRepoIDsQuery queries accessible repository ids. Usable as a subquery wherever repo ids need to be filtered. func AccessibleRepoIDsQuery(user *User) *builder.Builder { // NB: Please note this code needs to still work if user is nil diff --git a/models/repo_list_test.go b/models/repo_list_test.go index 37af9d598..d1fefc3e3 100644 --- a/models/repo_list_test.go +++ b/models/repo_list_test.go @@ -119,90 +119,146 @@ func TestSearchRepository(t *testing.T) { opts *SearchRepoOptions count int }{ - {name: "PublicRepositoriesByName", + { + name: "PublicRepositoriesByName", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{PageSize: 10}, Collaborate: util.OptionalBoolFalse}, - count: 7}, - {name: "PublicAndPrivateRepositoriesByName", + count: 7, + }, + { + name: "PublicAndPrivateRepositoriesByName", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{Page: 1, PageSize: 10}, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 14}, - {name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitFirstPage", + count: 14, + }, + { + name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitFirstPage", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{Page: 1, PageSize: 5}, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 14}, - {name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitSecondPage", + count: 14, + }, + { + name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitSecondPage", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{Page: 2, PageSize: 5}, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 14}, - {name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitThirdPage", + count: 14, + }, + { + name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitThirdPage", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{Page: 3, PageSize: 5}, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 14}, - {name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitFourthPage", + count: 14, + }, + { + name: "PublicAndPrivateRepositoriesByNameWithPagesizeLimitFourthPage", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{Page: 3, PageSize: 5}, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 14}, - {name: "PublicRepositoriesOfUser", + count: 14, + }, + { + name: "PublicRepositoriesOfUser", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, Collaborate: util.OptionalBoolFalse}, - count: 2}, - {name: "PublicRepositoriesOfUser2", + count: 2, + }, + { + name: "PublicRepositoriesOfUser2", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 18, Collaborate: util.OptionalBoolFalse}, - count: 0}, - {name: "PublicRepositoriesOfUser3", + count: 0, + }, + { + name: "PublicRepositoriesOfUser3", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 20, Collaborate: util.OptionalBoolFalse}, - count: 2}, - {name: "PublicAndPrivateRepositoriesOfUser", + count: 2, + }, + { + name: "PublicAndPrivateRepositoriesOfUser", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 4}, - {name: "PublicAndPrivateRepositoriesOfUser2", + count: 4, + }, + { + name: "PublicAndPrivateRepositoriesOfUser2", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 18, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 0}, - {name: "PublicAndPrivateRepositoriesOfUser3", + count: 0, + }, + { + name: "PublicAndPrivateRepositoriesOfUser3", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 20, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 4}, - {name: "PublicRepositoriesOfUserIncludingCollaborative", + count: 4, + }, + { + name: "PublicRepositoriesOfUserIncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 15}, - count: 5}, - {name: "PublicRepositoriesOfUser2IncludingCollaborative", + count: 5, + }, + { + name: "PublicRepositoriesOfUser2IncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 18}, - count: 1}, - {name: "PublicRepositoriesOfUser3IncludingCollaborative", + count: 1, + }, + { + name: "PublicRepositoriesOfUser3IncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 20}, - count: 3}, - {name: "PublicAndPrivateRepositoriesOfUserIncludingCollaborative", + count: 3, + }, + { + name: "PublicAndPrivateRepositoriesOfUserIncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, Private: true}, - count: 9}, - {name: "PublicAndPrivateRepositoriesOfUser2IncludingCollaborative", + count: 9, + }, + { + name: "PublicAndPrivateRepositoriesOfUser2IncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 18, Private: true}, - count: 4}, - {name: "PublicAndPrivateRepositoriesOfUser3IncludingCollaborative", + count: 4, + }, + { + name: "PublicAndPrivateRepositoriesOfUser3IncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 20, Private: true}, - count: 7}, - {name: "PublicRepositoriesOfOrganization", + count: 7, + }, + { + name: "PublicRepositoriesOfOrganization", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 17, Collaborate: util.OptionalBoolFalse}, - count: 1}, - {name: "PublicAndPrivateRepositoriesOfOrganization", + count: 1, + }, + { + name: "PublicAndPrivateRepositoriesOfOrganization", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 17, Private: true, Collaborate: util.OptionalBoolFalse}, - count: 2}, - {name: "AllPublic/PublicRepositoriesByName", + count: 2, + }, + { + name: "AllPublic/PublicRepositoriesByName", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{PageSize: 10}, AllPublic: true, Collaborate: util.OptionalBoolFalse}, - count: 7}, - {name: "AllPublic/PublicAndPrivateRepositoriesByName", + count: 7, + }, + { + name: "AllPublic/PublicAndPrivateRepositoriesByName", opts: &SearchRepoOptions{Keyword: "big_test_", ListOptions: ListOptions{Page: 1, PageSize: 10}, Private: true, AllPublic: true, Collaborate: util.OptionalBoolFalse}, - count: 14}, - {name: "AllPublic/PublicRepositoriesOfUserIncludingCollaborative", + count: 14, + }, + { + name: "AllPublic/PublicRepositoriesOfUserIncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, AllPublic: true, Template: util.OptionalBoolFalse}, - count: 28}, - {name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborative", + count: 28, + }, + { + name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborative", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, Private: true, AllPublic: true, AllLimited: true, Template: util.OptionalBoolFalse}, - count: 33}, - {name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborativeByName", + count: 33, + }, + { + name: "AllPublic/PublicAndPrivateRepositoriesOfUserIncludingCollaborativeByName", opts: &SearchRepoOptions{Keyword: "test", ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 15, Private: true, AllPublic: true}, - count: 15}, - {name: "AllPublic/PublicAndPrivateRepositoriesOfUser2IncludingCollaborativeByName", + count: 15, + }, + { + name: "AllPublic/PublicAndPrivateRepositoriesOfUser2IncludingCollaborativeByName", opts: &SearchRepoOptions{Keyword: "test", ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 18, Private: true, AllPublic: true}, - count: 13}, - {name: "AllPublic/PublicRepositoriesOfOrganization", + count: 13, + }, + { + name: "AllPublic/PublicRepositoriesOfOrganization", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, OwnerID: 17, AllPublic: true, Collaborate: util.OptionalBoolFalse, Template: util.OptionalBoolFalse}, - count: 28}, - {name: "AllTemplates", + count: 28, + }, + { + name: "AllTemplates", opts: &SearchRepoOptions{ListOptions: ListOptions{Page: 1, PageSize: 10}, Template: util.OptionalBoolTrue}, - count: 2}, + count: 2, + }, } for _, testCase := range testCases { @@ -216,7 +272,7 @@ func TestSearchRepository(t *testing.T) { if page <= 0 { page = 1 } - var expectedLen = testCase.opts.PageSize + expectedLen := testCase.opts.PageSize if testCase.opts.PageSize*page > testCase.count+testCase.opts.PageSize { expectedLen = 0 } else if testCase.opts.PageSize*page > testCase.count { @@ -274,15 +330,21 @@ func TestSearchRepositoryByTopicName(t *testing.T) { opts *SearchRepoOptions count int }{ - {name: "AllPublic/SearchPublicRepositoriesFromTopicAndName", + { + name: "AllPublic/SearchPublicRepositoriesFromTopicAndName", opts: &SearchRepoOptions{OwnerID: 21, AllPublic: true, Keyword: "graphql"}, - count: 2}, - {name: "AllPublic/OnlySearchPublicRepositoriesFromTopic", + count: 2, + }, + { + name: "AllPublic/OnlySearchPublicRepositoriesFromTopic", opts: &SearchRepoOptions{OwnerID: 21, AllPublic: true, Keyword: "graphql", TopicOnly: true}, - count: 1}, - {name: "AllPublic/OnlySearchMultipleKeywordPublicRepositoriesFromTopic", + count: 1, + }, + { + name: "AllPublic/OnlySearchMultipleKeywordPublicRepositoriesFromTopic", opts: &SearchRepoOptions{OwnerID: 21, AllPublic: true, Keyword: "graphql,golang", TopicOnly: true}, - count: 2}, + count: 2, + }, } for _, testCase := range testCases { diff --git a/models/repo_mirror.go b/models/repo_mirror.go index 10b0a7b13..cd1f74cb2 100644 --- a/models/repo_mirror.go +++ b/models/repo_mirror.go @@ -14,6 +14,12 @@ import ( "xorm.io/xorm" ) +// RemoteMirrorer defines base methods for pull/push mirrors. +type RemoteMirrorer interface { + GetRepository() *Repository + GetRemoteName() string +} + // Mirror represents mirror information of a repository. type Mirror struct { ID int64 `xorm:"pk autoincr"` @@ -25,6 +31,9 @@ type Mirror struct { UpdatedUnix timeutil.TimeStamp `xorm:"INDEX"` NextUpdateUnix timeutil.TimeStamp `xorm:"INDEX"` + LFS bool `xorm:"lfs_enabled NOT NULL DEFAULT false"` + LFSEndpoint string `xorm:"lfs_endpoint TEXT"` + Address string `xorm:"-"` } @@ -49,6 +58,16 @@ func (m *Mirror) AfterLoad(session *xorm.Session) { } } +// GetRepository returns the repository. +func (m *Mirror) GetRepository() *Repository { + return m.Repo +} + +// GetRemoteName returns the name of the remote. +func (m *Mirror) GetRemoteName() string { + return "origin" +} + // ScheduleNextUpdate calculates and sets next update time. func (m *Mirror) ScheduleNextUpdate() { if m.Interval != 0 { diff --git a/models/repo_permission.go b/models/repo_permission.go index 138613b2e..f5138fc54 100644 --- a/models/repo_permission.go +++ b/models/repo_permission.go @@ -176,9 +176,9 @@ func getUserRepoPermission(e Engine, repo *Repository, user *User) (perm Permiss return } - // Prevent strangers from checking out public repo of private orginization - // Allow user if they are collaborator of a repo within a private orginization but not a member of the orginization itself - if repo.Owner.IsOrganization() && !hasOrgVisible(e, repo.Owner, user) && !isCollaborator { + // Prevent strangers from checking out public repo of private organization/users + // Allow user if they are collaborator of a repo within a private user or a private organization but not a member of the organization itself + if !hasOrgOrUserVisible(e, repo.Owner, user) && !isCollaborator { perm.AccessMode = AccessModeNone return } @@ -351,7 +351,7 @@ func hasAccessUnit(e Engine, user *User, repo *Repository, unitType UnitType, te return testMode <= mode, err } -// HasAccessUnit returns ture if user has testMode to the unit of the repository +// HasAccessUnit returns true if user has testMode to the unit of the repository func HasAccessUnit(user *User, repo *Repository, unitType UnitType, testMode AccessMode) (bool, error) { return hasAccessUnit(x, user, repo, unitType, testMode) } diff --git a/models/repo_pushmirror.go b/models/repo_pushmirror.go new file mode 100644 index 000000000..439972ffa --- /dev/null +++ b/models/repo_pushmirror.go @@ -0,0 +1,106 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "errors" + "time" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/timeutil" + + "xorm.io/xorm" +) + +var ( + // ErrPushMirrorNotExist mirror does not exist error + ErrPushMirrorNotExist = errors.New("PushMirror does not exist") +) + +// PushMirror represents mirror information of a repository. +type PushMirror struct { + ID int64 `xorm:"pk autoincr"` + RepoID int64 `xorm:"INDEX"` + Repo *Repository `xorm:"-"` + RemoteName string + + Interval time.Duration + CreatedUnix timeutil.TimeStamp `xorm:"created"` + LastUpdateUnix timeutil.TimeStamp `xorm:"INDEX last_update"` + LastError string `xorm:"text"` +} + +// AfterLoad is invoked from XORM after setting the values of all fields of this object. +func (m *PushMirror) AfterLoad(session *xorm.Session) { + if m == nil { + return + } + + var err error + m.Repo, err = getRepositoryByID(session, m.RepoID) + if err != nil { + log.Error("getRepositoryByID[%d]: %v", m.ID, err) + } +} + +// GetRepository returns the path of the repository. +func (m *PushMirror) GetRepository() *Repository { + return m.Repo +} + +// GetRemoteName returns the name of the remote. +func (m *PushMirror) GetRemoteName() string { + return m.RemoteName +} + +// InsertPushMirror inserts a push-mirror to database +func InsertPushMirror(m *PushMirror) error { + _, err := x.Insert(m) + return err +} + +// UpdatePushMirror updates the push-mirror +func UpdatePushMirror(m *PushMirror) error { + _, err := x.ID(m.ID).AllCols().Update(m) + return err +} + +// DeletePushMirrorByID deletes a push-mirrors by ID +func DeletePushMirrorByID(ID int64) error { + _, err := x.ID(ID).Delete(&PushMirror{}) + return err +} + +// DeletePushMirrorsByRepoID deletes all push-mirrors by repoID +func DeletePushMirrorsByRepoID(repoID int64) error { + _, err := x.Delete(&PushMirror{RepoID: repoID}) + return err +} + +// GetPushMirrorByID returns push-mirror information. +func GetPushMirrorByID(ID int64) (*PushMirror, error) { + m := &PushMirror{} + has, err := x.ID(ID).Get(m) + if err != nil { + return nil, err + } else if !has { + return nil, ErrPushMirrorNotExist + } + return m, nil +} + +// GetPushMirrorsByRepoID returns push-mirror information of a repository. +func GetPushMirrorsByRepoID(repoID int64) ([]*PushMirror, error) { + mirrors := make([]*PushMirror, 0, 10) + return mirrors, x.Where("repo_id=?", repoID).Find(&mirrors) +} + +// PushMirrorsIterate iterates all push-mirror repositories. +func PushMirrorsIterate(f func(idx int, bean interface{}) error) error { + return x. + Where("last_update + (`interval` / ?) <= ?", time.Second, time.Now().Unix()). + And("`interval` != 0"). + Iterate(new(PushMirror), f) +} diff --git a/models/repo_pushmirror_test.go b/models/repo_pushmirror_test.go new file mode 100644 index 000000000..66c499b1c --- /dev/null +++ b/models/repo_pushmirror_test.go @@ -0,0 +1,49 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "testing" + "time" + + "code.gitea.io/gitea/modules/timeutil" + + "github.com/stretchr/testify/assert" +) + +func TestPushMirrorsIterate(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + now := timeutil.TimeStampNow() + + InsertPushMirror(&PushMirror{ + RemoteName: "test-1", + LastUpdateUnix: now, + Interval: 1, + }) + + long, _ := time.ParseDuration("24h") + InsertPushMirror(&PushMirror{ + RemoteName: "test-2", + LastUpdateUnix: now, + Interval: long, + }) + + InsertPushMirror(&PushMirror{ + RemoteName: "test-3", + LastUpdateUnix: now, + Interval: 0, + }) + + time.Sleep(1 * time.Millisecond) + + PushMirrorsIterate(func(idx int, bean interface{}) error { + m, ok := bean.(*PushMirror) + assert.True(t, ok) + assert.Equal(t, "test-1", m.RemoteName) + assert.Equal(t, m.RemoteName, m.GetRemoteName()) + return nil + }) +} diff --git a/models/repo_redirect.go b/models/repo_redirect.go index 182b6b41a..afbfeb499 100644 --- a/models/repo_redirect.go +++ b/models/repo_redirect.go @@ -28,16 +28,16 @@ func LookupRepoRedirect(ownerID int64, repoName string) (int64, error) { return redirect.RedirectRepoID, nil } -// NewRepoRedirect create a new repo redirect -func NewRepoRedirect(ctx DBContext, ownerID, repoID int64, oldRepoName, newRepoName string) error { +// newRepoRedirect create a new repo redirect +func newRepoRedirect(e Engine, ownerID, repoID int64, oldRepoName, newRepoName string) error { oldRepoName = strings.ToLower(oldRepoName) newRepoName = strings.ToLower(newRepoName) - if err := deleteRepoRedirect(ctx.e, ownerID, newRepoName); err != nil { + if err := deleteRepoRedirect(e, ownerID, newRepoName); err != nil { return err } - if _, err := ctx.e.Insert(&RepoRedirect{ + if _, err := e.Insert(&RepoRedirect{ OwnerID: ownerID, LowerName: oldRepoName, RedirectRepoID: repoID, diff --git a/models/repo_redirect_test.go b/models/repo_redirect_test.go index 44ec2b4e9..4c3184a0f 100644 --- a/models/repo_redirect_test.go +++ b/models/repo_redirect_test.go @@ -26,7 +26,7 @@ func TestNewRepoRedirect(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) - assert.NoError(t, NewRepoRedirect(DefaultDBContext(), repo.OwnerID, repo.ID, repo.Name, "newreponame")) + assert.NoError(t, newRepoRedirect(x, repo.OwnerID, repo.ID, repo.Name, "newreponame")) AssertExistsAndLoadBean(t, &RepoRedirect{ OwnerID: repo.OwnerID, @@ -45,7 +45,7 @@ func TestNewRepoRedirect2(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) repo := AssertExistsAndLoadBean(t, &Repository{ID: 1}).(*Repository) - assert.NoError(t, NewRepoRedirect(DefaultDBContext(), repo.OwnerID, repo.ID, repo.Name, "oldrepo1")) + assert.NoError(t, newRepoRedirect(x, repo.OwnerID, repo.ID, repo.Name, "oldrepo1")) AssertExistsAndLoadBean(t, &RepoRedirect{ OwnerID: repo.OwnerID, @@ -64,7 +64,7 @@ func TestNewRepoRedirect3(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) repo := AssertExistsAndLoadBean(t, &Repository{ID: 2}).(*Repository) - assert.NoError(t, NewRepoRedirect(DefaultDBContext(), repo.OwnerID, repo.ID, repo.Name, "newreponame")) + assert.NoError(t, newRepoRedirect(x, repo.OwnerID, repo.ID, repo.Name, "newreponame")) AssertExistsAndLoadBean(t, &RepoRedirect{ OwnerID: repo.OwnerID, diff --git a/models/repo_test.go b/models/repo_test.go index a366772d5..28eb9baa1 100644 --- a/models/repo_test.go +++ b/models/repo_test.go @@ -61,8 +61,8 @@ func TestMetas(t *testing.T) { metas = repo.ComposeMetas() assert.Contains(t, metas, "org") assert.Contains(t, metas, "teams") - assert.Equal(t, metas["org"], "user3") - assert.Equal(t, metas["teams"], ",owners,team1,") + assert.Equal(t, "user3", metas["org"]) + assert.Equal(t, ",owners,team1,", metas["teams"]) } func TestGetRepositoryCount(t *testing.T) { @@ -75,7 +75,7 @@ func TestGetRepositoryCount(t *testing.T) { assert.NoError(t, err2) assert.NoError(t, err3) assert.Equal(t, int64(3), count) - assert.Equal(t, (privateCount + publicCount), count) + assert.Equal(t, privateCount+publicCount, count) } func TestGetPublicRepositoryCount(t *testing.T) { @@ -111,7 +111,7 @@ func TestUpdateRepositoryVisibilityChanged(t *testing.T) { _, err = x.ID(3).Get(&act) assert.NoError(t, err) - assert.Equal(t, true, act.IsPrivate) + assert.True(t, act.IsPrivate) } func TestGetUserFork(t *testing.T) { @@ -141,7 +141,6 @@ func TestRepoAPIURL(t *testing.T) { } func TestUploadAvatar(t *testing.T) { - // Generate image myImage := image.NewRGBA(image.Rect(0, 0, 1, 1)) var buff bytes.Buffer @@ -156,7 +155,6 @@ func TestUploadAvatar(t *testing.T) { } func TestUploadBigAvatar(t *testing.T) { - // Generate BIG image myImage := image.NewRGBA(image.Rect(0, 0, 5000, 1)) var buff bytes.Buffer @@ -170,7 +168,6 @@ func TestUploadBigAvatar(t *testing.T) { } func TestDeleteAvatar(t *testing.T) { - // Generate image myImage := image.NewRGBA(image.Rect(0, 0, 1, 1)) var buff bytes.Buffer @@ -202,13 +199,13 @@ func TestRepoGetReviewers(t *testing.T) { reviewers, err := repo1.GetReviewers(2, 2) assert.NoError(t, err) - assert.Equal(t, 4, len(reviewers)) + assert.Len(t, reviewers, 4) // test private repo repo2 := AssertExistsAndLoadBean(t, &Repository{ID: 2}).(*Repository) reviewers, err = repo2.GetReviewers(2, 2) assert.NoError(t, err) - assert.Equal(t, 0, len(reviewers)) + assert.Empty(t, reviewers) } func TestRepoGetReviewerTeams(t *testing.T) { @@ -222,5 +219,5 @@ func TestRepoGetReviewerTeams(t *testing.T) { repo3 := AssertExistsAndLoadBean(t, &Repository{ID: 3}).(*Repository) teams, err = repo3.GetReviewerTeams() assert.NoError(t, err) - assert.Equal(t, 2, len(teams)) + assert.Len(t, teams, 2) } diff --git a/models/repo_transfer.go b/models/repo_transfer.go new file mode 100644 index 000000000..09b629029 --- /dev/null +++ b/models/repo_transfer.go @@ -0,0 +1,397 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "fmt" + "os" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" +) + +// RepoTransfer is used to manage repository transfers +type RepoTransfer struct { + ID int64 `xorm:"pk autoincr"` + DoerID int64 + Doer *User `xorm:"-"` + RecipientID int64 + Recipient *User `xorm:"-"` + RepoID int64 + TeamIDs []int64 + Teams []*Team `xorm:"-"` + + CreatedUnix timeutil.TimeStamp `xorm:"INDEX NOT NULL created"` + UpdatedUnix timeutil.TimeStamp `xorm:"INDEX NOT NULL updated"` +} + +// LoadAttributes fetches the transfer recipient from the database +func (r *RepoTransfer) LoadAttributes() error { + if r.Recipient == nil { + u, err := GetUserByID(r.RecipientID) + if err != nil { + return err + } + + r.Recipient = u + } + + if r.Recipient.IsOrganization() && len(r.TeamIDs) != len(r.Teams) { + for _, v := range r.TeamIDs { + team, err := GetTeamByID(v) + if err != nil { + return err + } + + if team.OrgID != r.Recipient.ID { + return fmt.Errorf("team %d belongs not to org %d", v, r.Recipient.ID) + } + + r.Teams = append(r.Teams, team) + } + } + + if r.Doer == nil { + u, err := GetUserByID(r.DoerID) + if err != nil { + return err + } + + r.Doer = u + } + + return nil +} + +// CanUserAcceptTransfer checks if the user has the rights to accept/decline a repo transfer. +// For user, it checks if it's himself +// For organizations, it checks if the user is able to create repos +func (r *RepoTransfer) CanUserAcceptTransfer(u *User) bool { + if err := r.LoadAttributes(); err != nil { + log.Error("LoadAttributes: %v", err) + return false + } + + if !r.Recipient.IsOrganization() { + return r.RecipientID == u.ID + } + + allowed, err := CanCreateOrgRepo(r.RecipientID, u.ID) + if err != nil { + log.Error("CanCreateOrgRepo: %v", err) + return false + } + + return allowed +} + +// GetPendingRepositoryTransfer fetches the most recent and ongoing transfer +// process for the repository +func GetPendingRepositoryTransfer(repo *Repository) (*RepoTransfer, error) { + transfer := new(RepoTransfer) + + has, err := x.Where("repo_id = ? ", repo.ID).Get(transfer) + if err != nil { + return nil, err + } + + if !has { + return nil, ErrNoPendingRepoTransfer{RepoID: repo.ID} + } + + return transfer, nil +} + +func deleteRepositoryTransfer(e Engine, repoID int64) error { + _, err := e.Where("repo_id = ?", repoID).Delete(&RepoTransfer{}) + return err +} + +// CancelRepositoryTransfer marks the repository as ready and remove pending transfer entry, +// thus cancel the transfer process. +func CancelRepositoryTransfer(repo *Repository) error { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + repo.Status = RepositoryReady + if err := updateRepositoryCols(sess, repo, "status"); err != nil { + return err + } + + if err := deleteRepositoryTransfer(sess, repo.ID); err != nil { + return err + } + + return sess.Commit() +} + +// TestRepositoryReadyForTransfer make sure repo is ready to transfer +func TestRepositoryReadyForTransfer(status RepositoryStatus) error { + switch status { + case RepositoryBeingMigrated: + return fmt.Errorf("repo is not ready, currently migrating") + case RepositoryPendingTransfer: + return ErrRepoTransferInProgress{} + } + return nil +} + +// CreatePendingRepositoryTransfer transfer a repo from one owner to a new one. +// it marks the repository transfer as "pending" +func CreatePendingRepositoryTransfer(doer, newOwner *User, repoID int64, teams []*Team) error { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + + repo, err := getRepositoryByID(sess, repoID) + if err != nil { + return err + } + + // Make sure repo is ready to transfer + if err := TestRepositoryReadyForTransfer(repo.Status); err != nil { + return err + } + + repo.Status = RepositoryPendingTransfer + if err := updateRepositoryCols(sess, repo, "status"); err != nil { + return err + } + + // Check if new owner has repository with same name. + if has, err := isRepositoryExist(sess, newOwner, repo.Name); err != nil { + return fmt.Errorf("IsRepositoryExist: %v", err) + } else if has { + return ErrRepoAlreadyExist{newOwner.LowerName, repo.Name} + } + + transfer := &RepoTransfer{ + RepoID: repo.ID, + RecipientID: newOwner.ID, + CreatedUnix: timeutil.TimeStampNow(), + UpdatedUnix: timeutil.TimeStampNow(), + DoerID: doer.ID, + TeamIDs: make([]int64, 0, len(teams)), + } + + for k := range teams { + transfer.TeamIDs = append(transfer.TeamIDs, teams[k].ID) + } + + if _, err := sess.Insert(transfer); err != nil { + return err + } + + return sess.Commit() +} + +// TransferOwnership transfers all corresponding repository items from old user to new one. +func TransferOwnership(doer *User, newOwnerName string, repo *Repository) (err error) { + repoRenamed := false + wikiRenamed := false + oldOwnerName := doer.Name + + defer func() { + if !repoRenamed && !wikiRenamed { + return + } + + recoverErr := recover() + if err == nil && recoverErr == nil { + return + } + + if repoRenamed { + if err := util.Rename(RepoPath(newOwnerName, repo.Name), RepoPath(oldOwnerName, repo.Name)); err != nil { + log.Critical("Unable to move repository %s/%s directory from %s back to correct place %s: %v", oldOwnerName, repo.Name, RepoPath(newOwnerName, repo.Name), RepoPath(oldOwnerName, repo.Name), err) + } + } + + if wikiRenamed { + if err := util.Rename(WikiPath(newOwnerName, repo.Name), WikiPath(oldOwnerName, repo.Name)); err != nil { + log.Critical("Unable to move wiki for repository %s/%s directory from %s back to correct place %s: %v", oldOwnerName, repo.Name, WikiPath(newOwnerName, repo.Name), WikiPath(oldOwnerName, repo.Name), err) + } + } + + if recoverErr != nil { + log.Error("Panic within TransferOwnership: %v\n%s", recoverErr, log.Stack(2)) + panic(recoverErr) + } + }() + + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return fmt.Errorf("sess.Begin: %v", err) + } + + newOwner, err := getUserByName(sess, newOwnerName) + if err != nil { + return fmt.Errorf("get new owner '%s': %v", newOwnerName, err) + } + newOwnerName = newOwner.Name // ensure capitalisation matches + + // Check if new owner has repository with same name. + if has, err := isRepositoryExist(sess, newOwner, repo.Name); err != nil { + return fmt.Errorf("IsRepositoryExist: %v", err) + } else if has { + return ErrRepoAlreadyExist{newOwnerName, repo.Name} + } + + oldOwner := repo.Owner + oldOwnerName = oldOwner.Name + + // Note: we have to set value here to make sure recalculate accesses is based on + // new owner. + repo.OwnerID = newOwner.ID + repo.Owner = newOwner + repo.OwnerName = newOwner.Name + + // Update repository. + if _, err := sess.ID(repo.ID).Update(repo); err != nil { + return fmt.Errorf("update owner: %v", err) + } + + // Remove redundant collaborators. + collaborators, err := repo.getCollaborators(sess, ListOptions{}) + if err != nil { + return fmt.Errorf("getCollaborators: %v", err) + } + + // Dummy object. + collaboration := &Collaboration{RepoID: repo.ID} + for _, c := range collaborators { + if c.ID != newOwner.ID { + isMember, err := isOrganizationMember(sess, newOwner.ID, c.ID) + if err != nil { + return fmt.Errorf("IsOrgMember: %v", err) + } else if !isMember { + continue + } + } + collaboration.UserID = c.ID + if _, err := sess.Delete(collaboration); err != nil { + return fmt.Errorf("remove collaborator '%d': %v", c.ID, err) + } + } + + // Remove old team-repository relations. + if oldOwner.IsOrganization() { + if err := oldOwner.removeOrgRepo(sess, repo.ID); err != nil { + return fmt.Errorf("removeOrgRepo: %v", err) + } + } + + if newOwner.IsOrganization() { + if err := newOwner.loadTeams(sess); err != nil { + return fmt.Errorf("LoadTeams: %v", err) + } + for _, t := range newOwner.Teams { + if t.IncludesAllRepositories { + if err := t.addRepository(sess, repo); err != nil { + return fmt.Errorf("addRepository: %v", err) + } + } + } + } else if err := repo.recalculateAccesses(sess); err != nil { + // Organization called this in addRepository method. + return fmt.Errorf("recalculateAccesses: %v", err) + } + + // Update repository count. + if _, err := sess.Exec("UPDATE `user` SET num_repos=num_repos+1 WHERE id=?", newOwner.ID); err != nil { + return fmt.Errorf("increase new owner repository count: %v", err) + } else if _, err := sess.Exec("UPDATE `user` SET num_repos=num_repos-1 WHERE id=?", oldOwner.ID); err != nil { + return fmt.Errorf("decrease old owner repository count: %v", err) + } + + if err := watchRepo(sess, doer.ID, repo.ID, true); err != nil { + return fmt.Errorf("watchRepo: %v", err) + } + + // Remove watch for organization. + if oldOwner.IsOrganization() { + if err := watchRepo(sess, oldOwner.ID, repo.ID, false); err != nil { + return fmt.Errorf("watchRepo [false]: %v", err) + } + } + + // Delete labels that belong to the old organization and comments that added these labels + if oldOwner.IsOrganization() { + if _, err := sess.Exec(`DELETE FROM issue_label WHERE issue_label.id IN ( + SELECT il_too.id FROM ( + SELECT il_too_too.id + FROM issue_label AS il_too_too + INNER JOIN label ON il_too_too.label_id = label.id + INNER JOIN issue on issue.id = il_too_too.issue_id + WHERE + issue.repo_id = ? AND ((label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != ?)) + ) AS il_too )`, repo.ID, newOwner.ID); err != nil { + return fmt.Errorf("Unable to remove old org labels: %v", err) + } + + if _, err := sess.Exec(`DELETE FROM comment WHERE comment.id IN ( + SELECT il_too.id FROM ( + SELECT com.id + FROM comment AS com + INNER JOIN label ON com.label_id = label.id + INNER JOIN issue ON issue.id = com.issue_id + WHERE + com.type = ? AND issue.repo_id = ? AND ((label.org_id = 0 AND issue.repo_id != label.repo_id) OR (label.repo_id = 0 AND label.org_id != ?)) + ) AS il_too)`, CommentTypeLabel, repo.ID, newOwner.ID); err != nil { + return fmt.Errorf("Unable to remove old org label comments: %v", err) + } + } + + // Rename remote repository to new path and delete local copy. + dir := UserPath(newOwner.Name) + + if err := os.MkdirAll(dir, os.ModePerm); err != nil { + return fmt.Errorf("Failed to create dir %s: %v", dir, err) + } + + if err := util.Rename(RepoPath(oldOwner.Name, repo.Name), RepoPath(newOwner.Name, repo.Name)); err != nil { + return fmt.Errorf("rename repository directory: %v", err) + } + repoRenamed = true + + // Rename remote wiki repository to new path and delete local copy. + wikiPath := WikiPath(oldOwner.Name, repo.Name) + + if isExist, err := util.IsExist(wikiPath); err != nil { + log.Error("Unable to check if %s exists. Error: %v", wikiPath, err) + return err + } else if isExist { + if err := util.Rename(wikiPath, WikiPath(newOwner.Name, repo.Name)); err != nil { + return fmt.Errorf("rename repository wiki: %v", err) + } + wikiRenamed = true + } + + if err := deleteRepositoryTransfer(sess, repo.ID); err != nil { + return fmt.Errorf("deleteRepositoryTransfer: %v", err) + } + repo.Status = RepositoryReady + if err := updateRepositoryCols(sess, repo, "status"); err != nil { + return err + } + + // If there was previously a redirect at this location, remove it. + if err := deleteRepoRedirect(sess, newOwner.ID, repo.Name); err != nil { + return fmt.Errorf("delete repo redirect: %v", err) + } + + if err := newRepoRedirect(sess, oldOwner.ID, repo.ID, repo.Name, repo.Name); err != nil { + return fmt.Errorf("newRepoRedirect: %v", err) + } + + return sess.Commit() +} diff --git a/models/repo_transfer_test.go b/models/repo_transfer_test.go new file mode 100644 index 000000000..8b1aba896 --- /dev/null +++ b/models/repo_transfer_test.go @@ -0,0 +1,53 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRepositoryTransfer(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + doer := AssertExistsAndLoadBean(t, &User{ID: 3}).(*User) + repo := AssertExistsAndLoadBean(t, &Repository{ID: 3}).(*Repository) + + transfer, err := GetPendingRepositoryTransfer(repo) + assert.NoError(t, err) + assert.NotNil(t, transfer) + + // Cancel transfer + assert.NoError(t, CancelRepositoryTransfer(repo)) + + transfer, err = GetPendingRepositoryTransfer(repo) + assert.Error(t, err) + assert.Nil(t, transfer) + assert.True(t, IsErrNoPendingTransfer(err)) + + user2 := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + + assert.NoError(t, CreatePendingRepositoryTransfer(doer, user2, repo.ID, nil)) + + transfer, err = GetPendingRepositoryTransfer(repo) + assert.Nil(t, err) + assert.NoError(t, transfer.LoadAttributes()) + assert.Equal(t, "user2", transfer.Recipient.Name) + + user6 := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + + // Only transfer can be started at any given time + err = CreatePendingRepositoryTransfer(doer, user6, repo.ID, nil) + assert.Error(t, err) + assert.True(t, IsErrRepoTransferInProgress(err)) + + // Unknown user + err = CreatePendingRepositoryTransfer(doer, &User{ID: 1000, LowerName: "user1000"}, repo.ID, nil) + assert.Error(t, err) + + // Cancel transfer + assert.NoError(t, CancelRepositoryTransfer(repo)) +} diff --git a/models/repo_unit.go b/models/repo_unit.go index 8c2d45875..2a20205fe 100644 --- a/models/repo_unit.go +++ b/models/repo_unit.go @@ -5,9 +5,9 @@ package models import ( - "encoding/json" "fmt" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/timeutil" "xorm.io/xorm" @@ -24,12 +24,11 @@ type RepoUnit struct { } // UnitConfig describes common unit config -type UnitConfig struct { -} +type UnitConfig struct{} // FromDB fills up a UnitConfig from serialized format. func (cfg *UnitConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, &cfg) + return JSONUnmarshalHandleDoubleEncode(bs, &cfg) } // ToDB exports a UnitConfig to a serialized format. @@ -44,7 +43,7 @@ type ExternalWikiConfig struct { // FromDB fills up a ExternalWikiConfig from serialized format. func (cfg *ExternalWikiConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, &cfg) + return JSONUnmarshalHandleDoubleEncode(bs, &cfg) } // ToDB exports a ExternalWikiConfig to a serialized format. @@ -61,7 +60,7 @@ type ExternalTrackerConfig struct { // FromDB fills up a ExternalTrackerConfig from serialized format. func (cfg *ExternalTrackerConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, &cfg) + return JSONUnmarshalHandleDoubleEncode(bs, &cfg) } // ToDB exports a ExternalTrackerConfig to a serialized format. @@ -78,7 +77,7 @@ type IssuesConfig struct { // FromDB fills up a IssuesConfig from serialized format. func (cfg *IssuesConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, &cfg) + return JSONUnmarshalHandleDoubleEncode(bs, &cfg) } // ToDB exports a IssuesConfig to a serialized format. @@ -88,16 +87,20 @@ func (cfg *IssuesConfig) ToDB() ([]byte, error) { // PullRequestsConfig describes pull requests config type PullRequestsConfig struct { - IgnoreWhitespaceConflicts bool - AllowMerge bool - AllowRebase bool - AllowRebaseMerge bool - AllowSquash bool + IgnoreWhitespaceConflicts bool + AllowMerge bool + AllowRebase bool + AllowRebaseMerge bool + AllowSquash bool + AllowManualMerge bool + AutodetectManualMerge bool + DefaultDeleteBranchAfterMerge bool + DefaultMergeStyle MergeStyle } // FromDB fills up a PullRequestsConfig from serialized format. func (cfg *PullRequestsConfig) FromDB(bs []byte) error { - return json.Unmarshal(bs, &cfg) + return JSONUnmarshalHandleDoubleEncode(bs, &cfg) } // ToDB exports a PullRequestsConfig to a serialized format. @@ -110,7 +113,17 @@ func (cfg *PullRequestsConfig) IsMergeStyleAllowed(mergeStyle MergeStyle) bool { return mergeStyle == MergeStyleMerge && cfg.AllowMerge || mergeStyle == MergeStyleRebase && cfg.AllowRebase || mergeStyle == MergeStyleRebaseMerge && cfg.AllowRebaseMerge || - mergeStyle == MergeStyleSquash && cfg.AllowSquash + mergeStyle == MergeStyleSquash && cfg.AllowSquash || + mergeStyle == MergeStyleManuallyMerged && cfg.AllowManualMerge +} + +// GetDefaultMergeStyle returns the default merge style for this pull request +func (cfg *PullRequestsConfig) GetDefaultMergeStyle() MergeStyle { + if len(cfg.DefaultMergeStyle) != 0 { + return cfg.DefaultMergeStyle + } + + return MergeStyleMerge } // AllowedMergeStyleCount returns the total count of allowed merge styles for the PullRequestsConfig diff --git a/models/repo_watch.go b/models/repo_watch.go index 0e4645f26..656696b34 100644 --- a/models/repo_watch.go +++ b/models/repo_watch.go @@ -312,6 +312,6 @@ func watchIfAuto(e Engine, userID, repoID int64, isWrite bool) error { } // WatchIfAuto subscribes to repo if AutoWatchOnChanges is set -func WatchIfAuto(userID int64, repoID int64, isWrite bool) error { +func WatchIfAuto(userID, repoID int64, isWrite bool) error { return watchIfAuto(x, userID, repoID, isWrite) } diff --git a/models/review.go b/models/review.go index aeb5f21ea..1ffff8feb 100644 --- a/models/review.go +++ b/models/review.go @@ -63,9 +63,10 @@ type Review struct { IssueID int64 `xorm:"index"` Content string `xorm:"TEXT"` // Official is a review made by an assigned approver (counts towards approval) - Official bool `xorm:"NOT NULL DEFAULT false"` - CommitID string `xorm:"VARCHAR(40)"` - Stale bool `xorm:"NOT NULL DEFAULT false"` + Official bool `xorm:"NOT NULL DEFAULT false"` + CommitID string `xorm:"VARCHAR(40)"` + Stale bool `xorm:"NOT NULL DEFAULT false"` + Dismissed bool `xorm:"NOT NULL DEFAULT false"` CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` @@ -174,7 +175,7 @@ type FindReviewOptions struct { } func (opts *FindReviewOptions) toCond() builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if opts.IssueID > 0 { cond = cond.And(builder.Eq{"issue_id": opts.IssueID}) } @@ -207,6 +208,11 @@ func FindReviews(opts FindReviewOptions) ([]*Review, error) { return findReviews(x, opts) } +// CountReviews returns count of reviews passing FindReviewOptions +func CountReviews(opts FindReviewOptions) (int64, error) { + return x.Where(opts.toCond()).Count(&Review{}) +} + // CreateReviewOptions represent the options to create a review. Type, Issue and Reviewer are required. type CreateReviewOptions struct { Content string @@ -333,8 +339,7 @@ func GetCurrentReview(reviewer *User, issue *Issue) (*Review, error) { } // ContentEmptyErr represents an content empty error -type ContentEmptyErr struct { -} +type ContentEmptyErr struct{} func (ContentEmptyErr) Error() string { return "Review content is empty" @@ -347,14 +352,14 @@ func IsContentEmptyErr(err error) bool { } // SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist -func SubmitReview(doer *User, issue *Issue, reviewType ReviewType, content, commitID string, stale bool) (*Review, *Comment, error) { +func SubmitReview(doer *User, issue *Issue, reviewType ReviewType, content, commitID string, stale bool, attachmentUUIDs []string) (*Review, *Comment, error) { sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { return nil, nil, err } - var official = false + official := false review, err := getCurrentReview(sess, doer, issue) if err != nil { @@ -419,12 +424,13 @@ func SubmitReview(doer *User, issue *Issue, reviewType ReviewType, content, comm } comm, err := createComment(sess, &CreateCommentOptions{ - Type: CommentTypeReview, - Doer: doer, - Content: review.Content, - Issue: issue, - Repo: issue.Repo, - ReviewID: review.ID, + Type: CommentTypeReview, + Doer: doer, + Content: review.Content, + Issue: issue, + Repo: issue.Repo, + ReviewID: review.ID, + Attachments: attachmentUUIDs, }) if err != nil || comm == nil { return nil, nil, err @@ -465,9 +471,9 @@ func GetReviewersByIssueID(issueID int64) ([]*Review, error) { return nil, err } - // Get latest review of each reviwer, sorted in order they were made - if err := sess.SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id = ? AND reviewer_team_id = 0 AND type in (?, ?, ?) AND original_author_id = 0 GROUP BY issue_id, reviewer_id) ORDER BY review.updated_unix ASC", - issueID, ReviewTypeApprove, ReviewTypeReject, ReviewTypeRequest). + // Get latest review of each reviewer, sorted in order they were made + if err := sess.SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id = ? AND reviewer_team_id = 0 AND type in (?, ?, ?) AND dismissed = ? AND original_author_id = 0 GROUP BY issue_id, reviewer_id) ORDER BY review.updated_unix ASC", + issueID, ReviewTypeApprove, ReviewTypeReject, ReviewTypeRequest, false). Find(&reviews); err != nil { return nil, err } @@ -490,7 +496,7 @@ func GetReviewersByIssueID(issueID int64) ([]*Review, error) { func GetReviewersFromOriginalAuthorsByIssueID(issueID int64) ([]*Review, error) { reviews := make([]*Review, 0, 10) - // Get latest review of each reviwer, sorted in order they were made + // Get latest review of each reviewer, sorted in order they were made if err := x.SQL("SELECT * FROM review WHERE id IN (SELECT max(id) as id FROM review WHERE issue_id = ? AND reviewer_team_id = 0 AND type in (?, ?, ?) AND original_author_id <> 0 GROUP BY issue_id, original_author_id) ORDER BY review.updated_unix ASC", issueID, ReviewTypeApprove, ReviewTypeReject, ReviewTypeRequest). Find(&reviews); err != nil { @@ -558,6 +564,23 @@ func MarkReviewsAsNotStale(issueID int64, commitID string) (err error) { return } +// DismissReview change the dismiss status of a review +func DismissReview(review *Review, isDismiss bool) (err error) { + if review.Dismissed == isDismiss || (review.Type != ReviewTypeApprove && review.Type != ReviewTypeReject) { + return nil + } + + review.Dismissed = isDismiss + + if review.ID == 0 { + return ErrReviewNotExist{} + } + + _, err = x.ID(review.ID).Cols("dismissed").Update(review) + + return +} + // InsertReviews inserts review and review comments func InsertReviews(reviews []*Review) error { sess := x.NewSession() @@ -654,7 +677,7 @@ func AddReviewRequest(issue *Issue, reviewer, doer *User) (*Comment, error) { return comment, sess.Commit() } -//RemoveReviewRequest remove a review request from one reviewer +// RemoveReviewRequest remove a review request from one reviewer func RemoveReviewRequest(issue *Issue, reviewer, doer *User) (*Comment, error) { sess := x.NewSession() defer sess.Close() @@ -766,7 +789,7 @@ func AddTeamReviewRequest(issue *Issue, reviewer *Team, doer *User) (*Comment, e return comment, sess.Commit() } -//RemoveTeamReviewRequest remove a review request from one team +// RemoveTeamReviewRequest remove a review request from one team func RemoveTeamReviewRequest(issue *Issue, reviewer *Team, doer *User) (*Comment, error) { sess := x.NewSession() defer sess.Close() diff --git a/models/review_test.go b/models/review_test.go index 702e21682..accc18419 100644 --- a/models/review_test.go +++ b/models/review_test.go @@ -34,7 +34,6 @@ func TestReview_LoadAttributes(t *testing.T) { invalidReview2 := AssertExistsAndLoadBean(t, &Review{ID: 3}).(*Review) assert.Error(t, invalidReview2.LoadAttributes()) - } func TestReview_LoadCodeComments(t *testing.T) { @@ -142,3 +141,59 @@ func TestGetReviewersByIssueID(t *testing.T) { } } } + +func TestDismissReview(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + rejectReviewExample := AssertExistsAndLoadBean(t, &Review{ID: 9}).(*Review) + requestReviewExample := AssertExistsAndLoadBean(t, &Review{ID: 11}).(*Review) + approveReviewExample := AssertExistsAndLoadBean(t, &Review{ID: 8}).(*Review) + assert.False(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + assert.False(t, approveReviewExample.Dismissed) + + assert.NoError(t, DismissReview(rejectReviewExample, true)) + rejectReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 9}).(*Review) + requestReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 11}).(*Review) + assert.True(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + + assert.NoError(t, DismissReview(requestReviewExample, true)) + rejectReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 9}).(*Review) + requestReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 11}).(*Review) + assert.True(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + assert.False(t, approveReviewExample.Dismissed) + + assert.NoError(t, DismissReview(requestReviewExample, true)) + rejectReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 9}).(*Review) + requestReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 11}).(*Review) + assert.True(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + assert.False(t, approveReviewExample.Dismissed) + + assert.NoError(t, DismissReview(requestReviewExample, false)) + rejectReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 9}).(*Review) + requestReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 11}).(*Review) + assert.True(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + assert.False(t, approveReviewExample.Dismissed) + + assert.NoError(t, DismissReview(requestReviewExample, false)) + rejectReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 9}).(*Review) + requestReviewExample = AssertExistsAndLoadBean(t, &Review{ID: 11}).(*Review) + assert.True(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + assert.False(t, approveReviewExample.Dismissed) + + assert.NoError(t, DismissReview(rejectReviewExample, false)) + assert.False(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + assert.False(t, approveReviewExample.Dismissed) + + assert.NoError(t, DismissReview(approveReviewExample, true)) + assert.False(t, rejectReviewExample.Dismissed) + assert.False(t, requestReviewExample.Dismissed) + assert.True(t, approveReviewExample.Dismissed) + +} diff --git a/models/session.go b/models/session.go new file mode 100644 index 000000000..b2e4837be --- /dev/null +++ b/models/session.go @@ -0,0 +1,122 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "fmt" + + "code.gitea.io/gitea/modules/timeutil" +) + +// Session represents a session compatible for go-chi session +type Session struct { + Key string `xorm:"pk CHAR(16)"` // has to be Key to match with go-chi/session + Data []byte `xorm:"BLOB"` + Expiry timeutil.TimeStamp // has to be Expiry to match with go-chi/session +} + +// UpdateSession updates the session with provided id +func UpdateSession(key string, data []byte) error { + _, err := x.ID(key).Update(&Session{ + Data: data, + Expiry: timeutil.TimeStampNow(), + }) + return err +} + +// ReadSession reads the data for the provided session +func ReadSession(key string) (*Session, error) { + session := Session{ + Key: key, + } + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return nil, err + } + + if has, err := sess.Get(&session); err != nil { + return nil, err + } else if !has { + session.Expiry = timeutil.TimeStampNow() + _, err := sess.Insert(&session) + if err != nil { + return nil, err + } + } + + return &session, sess.Commit() +} + +// ExistSession checks if a session exists +func ExistSession(key string) (bool, error) { + session := Session{ + Key: key, + } + return x.Get(&session) +} + +// DestroySession destroys a session +func DestroySession(key string) error { + _, err := x.Delete(&Session{ + Key: key, + }) + return err +} + +// RegenerateSession regenerates a session from the old id +func RegenerateSession(oldKey, newKey string) (*Session, error) { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return nil, err + } + + if has, err := sess.Get(&Session{ + Key: newKey, + }); err != nil { + return nil, err + } else if has { + return nil, fmt.Errorf("session Key: %s already exists", newKey) + } + + if has, err := sess.Get(&Session{ + Key: oldKey, + }); err != nil { + return nil, err + } else if !has { + _, err := sess.Insert(&Session{ + Key: oldKey, + Expiry: timeutil.TimeStampNow(), + }) + if err != nil { + return nil, err + } + } + + if _, err := sess.Exec("UPDATE "+sess.Engine().TableName(&Session{})+" SET `key` = ? WHERE `key`=?", newKey, oldKey); err != nil { + return nil, err + } + + s := Session{ + Key: newKey, + } + if _, err := sess.Get(&s); err != nil { + return nil, err + } + + return &s, sess.Commit() +} + +// CountSessions returns the number of sessions +func CountSessions() (int64, error) { + return x.Count(&Session{}) +} + +// CleanupSessions cleans up expired sessions +func CleanupSessions(maxLifetime int64) error { + _, err := x.Where("expiry <= ?", timeutil.TimeStampNow().Add(-maxLifetime)).Delete(&Session{}) + return err +} diff --git a/models/ssh_key.go b/models/ssh_key.go index 70512dccf..a2f4c610e 100644 --- a/models/ssh_key.go +++ b/models/ssh_key.go @@ -6,46 +6,18 @@ package models import ( - "bufio" - "crypto/rsa" - "crypto/x509" - "encoding/asn1" - "encoding/base64" - "encoding/binary" - "encoding/pem" - "errors" "fmt" - "io" - "io/ioutil" - "math/big" - "os" - "path/filepath" - "strconv" "strings" - "sync" "time" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/process" - "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" - "golang.org/x/crypto/ssh" + "xorm.io/builder" - "xorm.io/xorm" ) -const ( - tplCommentPrefix = `# gitea public key` - tplCommand = "%s --config=%s serv key-%d" - tplPublicKey = tplCommentPrefix + "\n" + `command=%s,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s` + "\n" - - authorizedPrincipalsFile = "authorized_principals" -) - -var sshOpLocker sync.Mutex - // KeyType specifies the key type type KeyType int @@ -87,405 +59,10 @@ func (key *PublicKey) OmitEmail() string { } // AuthorizedString returns formatted public key string for authorized_keys file. +// +// TODO: Consider dropping this function func (key *PublicKey) AuthorizedString() string { - return fmt.Sprintf(tplPublicKey, util.ShellEscape(fmt.Sprintf(tplCommand, util.ShellEscape(setting.AppPath), util.ShellEscape(setting.CustomConf), key.ID)), key.Content) -} - -func extractTypeFromBase64Key(key string) (string, error) { - b, err := base64.StdEncoding.DecodeString(key) - if err != nil || len(b) < 4 { - return "", fmt.Errorf("invalid key format: %v", err) - } - - keyLength := int(binary.BigEndian.Uint32(b)) - if len(b) < 4+keyLength { - return "", fmt.Errorf("invalid key format: not enough length %d", keyLength) - } - - return string(b[4 : 4+keyLength]), nil -} - -const ssh2keyStart = "---- BEGIN SSH2 PUBLIC KEY ----" - -// parseKeyString parses any key string in OpenSSH or SSH2 format to clean OpenSSH string (RFC4253). -func parseKeyString(content string) (string, error) { - // remove whitespace at start and end - content = strings.TrimSpace(content) - - var keyType, keyContent, keyComment string - - if strings.HasPrefix(content, ssh2keyStart) { - // Parse SSH2 file format. - - // Transform all legal line endings to a single "\n". - content = strings.NewReplacer("\r\n", "\n", "\r", "\n").Replace(content) - - lines := strings.Split(content, "\n") - continuationLine := false - - for _, line := range lines { - // Skip lines that: - // 1) are a continuation of the previous line, - // 2) contain ":" as that are comment lines - // 3) contain "-" as that are begin and end tags - if continuationLine || strings.ContainsAny(line, ":-") { - continuationLine = strings.HasSuffix(line, "\\") - } else { - keyContent += line - } - } - - t, err := extractTypeFromBase64Key(keyContent) - if err != nil { - return "", fmt.Errorf("extractTypeFromBase64Key: %v", err) - } - keyType = t - } else { - if strings.Contains(content, "-----BEGIN") { - // Convert PEM Keys to OpenSSH format - // Transform all legal line endings to a single "\n". - content = strings.NewReplacer("\r\n", "\n", "\r", "\n").Replace(content) - - block, _ := pem.Decode([]byte(content)) - if block == nil { - return "", fmt.Errorf("failed to parse PEM block containing the public key") - } - - pub, err := x509.ParsePKIXPublicKey(block.Bytes) - if err != nil { - var pk rsa.PublicKey - _, err2 := asn1.Unmarshal(block.Bytes, &pk) - if err2 != nil { - return "", fmt.Errorf("failed to parse DER encoded public key as either PKIX or PEM RSA Key: %v %v", err, err2) - } - pub = &pk - } - - sshKey, err := ssh.NewPublicKey(pub) - if err != nil { - return "", fmt.Errorf("unable to convert to ssh public key: %v", err) - } - content = string(ssh.MarshalAuthorizedKey(sshKey)) - } - // Parse OpenSSH format. - - // Remove all newlines - content = strings.NewReplacer("\r\n", "", "\n", "").Replace(content) - - parts := strings.SplitN(content, " ", 3) - switch len(parts) { - case 0: - return "", errors.New("empty key") - case 1: - keyContent = parts[0] - case 2: - keyType = parts[0] - keyContent = parts[1] - default: - keyType = parts[0] - keyContent = parts[1] - keyComment = parts[2] - } - - // If keyType is not given, extract it from content. If given, validate it. - t, err := extractTypeFromBase64Key(keyContent) - if err != nil { - return "", fmt.Errorf("extractTypeFromBase64Key: %v", err) - } - if len(keyType) == 0 { - keyType = t - } else if keyType != t { - return "", fmt.Errorf("key type and content does not match: %s - %s", keyType, t) - } - } - // Finally we need to check whether we can actually read the proposed key: - _, _, _, _, err := ssh.ParseAuthorizedKey([]byte(keyType + " " + keyContent + " " + keyComment)) - if err != nil { - return "", fmt.Errorf("invalid ssh public key: %v", err) - } - return keyType + " " + keyContent + " " + keyComment, nil -} - -// writeTmpKeyFile writes key content to a temporary file -// and returns the name of that file, along with any possible errors. -func writeTmpKeyFile(content string) (string, error) { - tmpFile, err := ioutil.TempFile(setting.SSH.KeyTestPath, "gitea_keytest") - if err != nil { - return "", fmt.Errorf("TempFile: %v", err) - } - defer tmpFile.Close() - - if _, err = tmpFile.WriteString(content); err != nil { - return "", fmt.Errorf("WriteString: %v", err) - } - return tmpFile.Name(), nil -} - -// SSHKeyGenParsePublicKey extracts key type and length using ssh-keygen. -func SSHKeyGenParsePublicKey(key string) (string, int, error) { - // The ssh-keygen in Windows does not print key type, so no need go further. - if setting.IsWindows { - return "", 0, nil - } - - tmpName, err := writeTmpKeyFile(key) - if err != nil { - return "", 0, fmt.Errorf("writeTmpKeyFile: %v", err) - } - defer func() { - if err := util.Remove(tmpName); err != nil { - log.Warn("Unable to remove temporary key file: %s: Error: %v", tmpName, err) - } - }() - - stdout, stderr, err := process.GetManager().Exec("SSHKeyGenParsePublicKey", setting.SSH.KeygenPath, "-lf", tmpName) - if err != nil { - return "", 0, fmt.Errorf("fail to parse public key: %s - %s", err, stderr) - } - if strings.Contains(stdout, "is not a public key file") { - return "", 0, ErrKeyUnableVerify{stdout} - } - - fields := strings.Split(stdout, " ") - if len(fields) < 4 { - return "", 0, fmt.Errorf("invalid public key line: %s", stdout) - } - - keyType := strings.Trim(fields[len(fields)-1], "()\r\n") - length, err := strconv.ParseInt(fields[0], 10, 32) - if err != nil { - return "", 0, err - } - return strings.ToLower(keyType), int(length), nil -} - -// SSHNativeParsePublicKey extracts the key type and length using the golang SSH library. -func SSHNativeParsePublicKey(keyLine string) (string, int, error) { - fields := strings.Fields(keyLine) - if len(fields) < 2 { - return "", 0, fmt.Errorf("not enough fields in public key line: %s", keyLine) - } - - raw, err := base64.StdEncoding.DecodeString(fields[1]) - if err != nil { - return "", 0, err - } - - pkey, err := ssh.ParsePublicKey(raw) - if err != nil { - if strings.Contains(err.Error(), "ssh: unknown key algorithm") { - return "", 0, ErrKeyUnableVerify{err.Error()} - } - return "", 0, fmt.Errorf("ParsePublicKey: %v", err) - } - - // The ssh library can parse the key, so next we find out what key exactly we have. - switch pkey.Type() { - case ssh.KeyAlgoDSA: - rawPub := struct { - Name string - P, Q, G, Y *big.Int - }{} - if err := ssh.Unmarshal(pkey.Marshal(), &rawPub); err != nil { - return "", 0, err - } - // as per https://bugzilla.mindrot.org/show_bug.cgi?id=1647 we should never - // see dsa keys != 1024 bit, but as it seems to work, we will not check here - return "dsa", rawPub.P.BitLen(), nil // use P as per crypto/dsa/dsa.go (is L) - case ssh.KeyAlgoRSA: - rawPub := struct { - Name string - E *big.Int - N *big.Int - }{} - if err := ssh.Unmarshal(pkey.Marshal(), &rawPub); err != nil { - return "", 0, err - } - return "rsa", rawPub.N.BitLen(), nil // use N as per crypto/rsa/rsa.go (is bits) - case ssh.KeyAlgoECDSA256: - return "ecdsa", 256, nil - case ssh.KeyAlgoECDSA384: - return "ecdsa", 384, nil - case ssh.KeyAlgoECDSA521: - return "ecdsa", 521, nil - case ssh.KeyAlgoED25519: - return "ed25519", 256, nil - } - return "", 0, fmt.Errorf("unsupported key length detection for type: %s", pkey.Type()) -} - -// CheckPublicKeyString checks if the given public key string is recognized by SSH. -// It returns the actual public key line on success. -func CheckPublicKeyString(content string) (_ string, err error) { - if setting.SSH.Disabled { - return "", ErrSSHDisabled{} - } - - content, err = parseKeyString(content) - if err != nil { - return "", err - } - - content = strings.TrimRight(content, "\n\r") - if strings.ContainsAny(content, "\n\r") { - return "", errors.New("only a single line with a single key please") - } - - // remove any unnecessary whitespace now - content = strings.TrimSpace(content) - - if !setting.SSH.MinimumKeySizeCheck { - return content, nil - } - - var ( - fnName string - keyType string - length int - ) - if setting.SSH.StartBuiltinServer { - fnName = "SSHNativeParsePublicKey" - keyType, length, err = SSHNativeParsePublicKey(content) - } else { - fnName = "SSHKeyGenParsePublicKey" - keyType, length, err = SSHKeyGenParsePublicKey(content) - } - if err != nil { - return "", fmt.Errorf("%s: %v", fnName, err) - } - log.Trace("Key info [native: %v]: %s-%d", setting.SSH.StartBuiltinServer, keyType, length) - - if minLen, found := setting.SSH.MinimumKeySizes[keyType]; found && length >= minLen { - return content, nil - } else if found && length < minLen { - return "", fmt.Errorf("key length is not enough: got %d, needs %d", length, minLen) - } - return "", fmt.Errorf("key type is not allowed: %s", keyType) -} - -// appendAuthorizedKeysToFile appends new SSH keys' content to authorized_keys file. -func appendAuthorizedKeysToFile(keys ...*PublicKey) error { - // Don't need to rewrite this file if builtin SSH server is enabled. - if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile { - return nil - } - - sshOpLocker.Lock() - defer sshOpLocker.Unlock() - - if setting.SSH.RootPath != "" { - // First of ensure that the RootPath is present, and if not make it with 0700 permissions - // This of course doesn't guarantee that this is the right directory for authorized_keys - // but at least if it's supposed to be this directory and it doesn't exist and we're the - // right user it will at least be created properly. - err := os.MkdirAll(setting.SSH.RootPath, 0700) - if err != nil { - log.Error("Unable to MkdirAll(%s): %v", setting.SSH.RootPath, err) - return err - } - } - - fPath := filepath.Join(setting.SSH.RootPath, "authorized_keys") - f, err := os.OpenFile(fPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0600) - if err != nil { - return err - } - defer f.Close() - - // Note: chmod command does not support in Windows. - if !setting.IsWindows { - fi, err := f.Stat() - if err != nil { - return err - } - - // .ssh directory should have mode 700, and authorized_keys file should have mode 600. - if fi.Mode().Perm() > 0600 { - log.Error("authorized_keys file has unusual permission flags: %s - setting to -rw-------", fi.Mode().Perm().String()) - if err = f.Chmod(0600); err != nil { - return err - } - } - } - - for _, key := range keys { - if key.Type == KeyTypePrincipal { - continue - } - if _, err = f.WriteString(key.AuthorizedString()); err != nil { - return err - } - } - return nil -} - -// checkKeyFingerprint only checks if key fingerprint has been used as public key, -// it is OK to use same key as deploy key for multiple repositories/users. -func checkKeyFingerprint(e Engine, fingerprint string) error { - has, err := e.Get(&PublicKey{ - Fingerprint: fingerprint, - }) - if err != nil { - return err - } else if has { - return ErrKeyAlreadyExist{0, fingerprint, ""} - } - return nil -} - -func calcFingerprintSSHKeygen(publicKeyContent string) (string, error) { - // Calculate fingerprint. - tmpPath, err := writeTmpKeyFile(publicKeyContent) - if err != nil { - return "", err - } - defer func() { - if err := util.Remove(tmpPath); err != nil { - log.Warn("Unable to remove temporary key file: %s: Error: %v", tmpPath, err) - } - }() - stdout, stderr, err := process.GetManager().Exec("AddPublicKey", "ssh-keygen", "-lf", tmpPath) - if err != nil { - if strings.Contains(stderr, "is not a public key file") { - return "", ErrKeyUnableVerify{stderr} - } - return "", fmt.Errorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr) - } else if len(stdout) < 2 { - return "", errors.New("not enough output for calculating fingerprint: " + stdout) - } - return strings.Split(stdout, " ")[1], nil -} - -func calcFingerprintNative(publicKeyContent string) (string, error) { - // Calculate fingerprint. - pk, _, _, _, err := ssh.ParseAuthorizedKey([]byte(publicKeyContent)) - if err != nil { - return "", err - } - return ssh.FingerprintSHA256(pk), nil -} - -func calcFingerprint(publicKeyContent string) (string, error) { - //Call the method based on configuration - var ( - fnName, fp string - err error - ) - if setting.SSH.StartBuiltinServer { - fnName = "calcFingerprintNative" - fp, err = calcFingerprintNative(publicKeyContent) - } else { - fnName = "calcFingerprintSSHKeygen" - fp, err = calcFingerprintSSHKeygen(publicKeyContent) - } - if err != nil { - if IsErrKeyUnableVerify(err) { - log.Info("%s", publicKeyContent) - return "", err - } - return "", fmt.Errorf("%s: %v", fnName, err) - } - return fp, nil + return AuthorizedStringForKey(key) } func addKey(e Engine, key *PublicKey) (err error) { @@ -628,8 +205,14 @@ func ListPublicKeys(uid int64, listOptions ListOptions) ([]*PublicKey, error) { return keys, sess.Find(&keys) } -// ListPublicLdapSSHKeys returns a list of synchronized public ldap ssh keys belongs to given user and login source. -func ListPublicLdapSSHKeys(uid int64, loginSourceID int64) ([]*PublicKey, error) { +// CountPublicKeys count public keys a user has +func CountPublicKeys(userID int64) (int64, error) { + sess := x.Where("owner_id = ? AND type != ?", userID, KeyTypePrincipal) + return sess.Count(&PublicKey{}) +} + +// ListPublicKeysBySource returns a list of synchronized public keys for a given user and login source. +func ListPublicKeysBySource(uid, loginSourceID int64) ([]*PublicKey, error) { keys := make([]*PublicKey, 0, 5) return keys, x. Where("owner_id = ? AND login_source_id = ?", uid, loginSourceID). @@ -701,11 +284,7 @@ keyloop: } } - ldapSource := source.LDAP() - if ldapSource != nil && - source.IsSyncEnabled && - (source.Type == LoginLDAP || source.Type == LoginDLDAP) && - len(strings.TrimSpace(ldapSource.AttributeSSHPublicKey)) > 0 { + if sshKeyProvider, ok := source.Cfg.(SSHKeyProvider); ok && sshKeyProvider.ProvidesSSHKeys() { // Disable setting SSH keys for this user externals[i] = true } @@ -730,11 +309,7 @@ func PublicKeyIsExternallyManaged(id int64) (bool, error) { } return false, err } - ldapSource := source.LDAP() - if ldapSource != nil && - source.IsSyncEnabled && - (source.Type == LoginLDAP || source.Type == LoginDLDAP) && - len(strings.TrimSpace(ldapSource.AttributeSSHPublicKey)) > 0 { + if sshKeyProvider, ok := source.Cfg.(SSHKeyProvider); ok && sshKeyProvider.ProvidesSSHKeys() { // Disable setting SSH keys for this user return true, nil } @@ -775,603 +350,139 @@ func DeletePublicKey(doer *User, id int64) (err error) { return RewriteAllPublicKeys() } -// RewriteAllPublicKeys removes any authorized key and rewrite all keys from database again. -// Note: x.Iterate does not get latest data after insert/delete, so we have to call this function -// outside any session scope independently. -func RewriteAllPublicKeys() error { - return rewriteAllPublicKeys(x) -} - -func rewriteAllPublicKeys(e Engine) error { - //Don't rewrite key if internal server - if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile { - return nil - } - - sshOpLocker.Lock() - defer sshOpLocker.Unlock() - - if setting.SSH.RootPath != "" { - // First of ensure that the RootPath is present, and if not make it with 0700 permissions - // This of course doesn't guarantee that this is the right directory for authorized_keys - // but at least if it's supposed to be this directory and it doesn't exist and we're the - // right user it will at least be created properly. - err := os.MkdirAll(setting.SSH.RootPath, 0700) - if err != nil { - log.Error("Unable to MkdirAll(%s): %v", setting.SSH.RootPath, err) - return err - } - } - - fPath := filepath.Join(setting.SSH.RootPath, "authorized_keys") - tmpPath := fPath + ".tmp" - t, err := os.OpenFile(tmpPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600) - if err != nil { - return err - } - defer func() { - t.Close() - if err := util.Remove(tmpPath); err != nil { - log.Warn("Unable to remove temporary authorized keys file: %s: Error: %v", tmpPath, err) - } - }() - - if setting.SSH.AuthorizedKeysBackup { - isExist, err := util.IsExist(fPath) - if err != nil { - log.Error("Unable to check if %s exists. Error: %v", fPath, err) - return err - } - if isExist { - bakPath := fmt.Sprintf("%s_%d.gitea_bak", fPath, time.Now().Unix()) - if err = util.CopyFile(fPath, bakPath); err != nil { - return err - } - } - } - - if err := regeneratePublicKeys(e, t); err != nil { - return err - } - - t.Close() - return os.Rename(tmpPath, fPath) -} - -// RegeneratePublicKeys regenerates the authorized_keys file -func RegeneratePublicKeys(t io.StringWriter) error { - return regeneratePublicKeys(x, t) -} - -func regeneratePublicKeys(e Engine, t io.StringWriter) error { - if err := e.Where("type != ?", KeyTypePrincipal).Iterate(new(PublicKey), func(idx int, bean interface{}) (err error) { - _, err = t.WriteString((bean.(*PublicKey)).AuthorizedString()) - return err - }); err != nil { - return err - } - - fPath := filepath.Join(setting.SSH.RootPath, "authorized_keys") - isExist, err := util.IsExist(fPath) - if err != nil { - log.Error("Unable to check if %s exists. Error: %v", fPath, err) - return err - } - if isExist { - f, err := os.Open(fPath) - if err != nil { - return err - } - scanner := bufio.NewScanner(f) - for scanner.Scan() { - line := scanner.Text() - if strings.HasPrefix(line, tplCommentPrefix) { - scanner.Scan() - continue - } - _, err = t.WriteString(line + "\n") - if err != nil { - f.Close() - return err - } - } - f.Close() - } - return nil -} - -// ________ .__ ____ __. -// \______ \ ____ ______ | | ____ ___.__.| |/ _|____ ___.__. -// | | \_/ __ \\____ \| | / _ < | || <_/ __ < | | -// | ` \ ___/| |_> > |_( <_> )___ || | \ ___/\___ | -// /_______ /\___ > __/|____/\____// ____||____|__ \___ > ____| -// \/ \/|__| \/ \/ \/\/ - -// DeployKey represents deploy key information and its relation with repository. -type DeployKey struct { - ID int64 `xorm:"pk autoincr"` - KeyID int64 `xorm:"UNIQUE(s) INDEX"` - RepoID int64 `xorm:"UNIQUE(s) INDEX"` - Name string - Fingerprint string - Content string `xorm:"-"` - - Mode AccessMode `xorm:"NOT NULL DEFAULT 1"` - - CreatedUnix timeutil.TimeStamp `xorm:"created"` - UpdatedUnix timeutil.TimeStamp `xorm:"updated"` - HasRecentActivity bool `xorm:"-"` - HasUsed bool `xorm:"-"` -} - -// AfterLoad is invoked from XORM after setting the values of all fields of this object. -func (key *DeployKey) AfterLoad() { - key.HasUsed = key.UpdatedUnix > key.CreatedUnix - key.HasRecentActivity = key.UpdatedUnix.AddDuration(7*24*time.Hour) > timeutil.TimeStampNow() -} - -// GetContent gets associated public key content. -func (key *DeployKey) GetContent() error { - pkey, err := GetPublicKeyByID(key.KeyID) - if err != nil { - return err - } - key.Content = pkey.Content - return nil -} - -// IsReadOnly checks if the key can only be used for read operations -func (key *DeployKey) IsReadOnly() bool { - return key.Mode == AccessModeRead -} - -func checkDeployKey(e Engine, keyID, repoID int64, name string) error { - // Note: We want error detail, not just true or false here. - has, err := e. - Where("key_id = ? AND repo_id = ?", keyID, repoID). - Get(new(DeployKey)) - if err != nil { - return err - } else if has { - return ErrDeployKeyAlreadyExist{keyID, repoID} - } - - has, err = e. - Where("repo_id = ? AND name = ?", repoID, name). - Get(new(DeployKey)) - if err != nil { - return err - } else if has { - return ErrDeployKeyNameAlreadyUsed{repoID, name} - } - - return nil -} - -// addDeployKey adds new key-repo relation. -func addDeployKey(e *xorm.Session, keyID, repoID int64, name, fingerprint string, mode AccessMode) (*DeployKey, error) { - if err := checkDeployKey(e, keyID, repoID, name); err != nil { - return nil, err - } - - key := &DeployKey{ - KeyID: keyID, - RepoID: repoID, - Name: name, - Fingerprint: fingerprint, - Mode: mode, - } - _, err := e.Insert(key) - return key, err -} - -// HasDeployKey returns true if public key is a deploy key of given repository. -func HasDeployKey(keyID, repoID int64) bool { - has, _ := x. - Where("key_id = ? AND repo_id = ?", keyID, repoID). - Get(new(DeployKey)) - return has -} - -// AddDeployKey add new deploy key to database and authorized_keys file. -func AddDeployKey(repoID int64, name, content string, readOnly bool) (*DeployKey, error) { - fingerprint, err := calcFingerprint(content) - if err != nil { - return nil, err - } - - accessMode := AccessModeRead - if !readOnly { - accessMode = AccessModeWrite - } - - sess := x.NewSession() - defer sess.Close() - if err = sess.Begin(); err != nil { - return nil, err - } - - pkey := &PublicKey{ - Fingerprint: fingerprint, - } - has, err := sess.Get(pkey) - if err != nil { - return nil, err - } - - if has { - if pkey.Type != KeyTypeDeploy { - return nil, ErrKeyAlreadyExist{0, fingerprint, ""} - } - } else { - // First time use this deploy key. - pkey.Mode = accessMode - pkey.Type = KeyTypeDeploy - pkey.Content = content - pkey.Name = name - if err = addKey(sess, pkey); err != nil { - return nil, fmt.Errorf("addKey: %v", err) - } - } - - key, err := addDeployKey(sess, pkey.ID, repoID, name, pkey.Fingerprint, accessMode) - if err != nil { - return nil, err - } - - return key, sess.Commit() -} - -// GetDeployKeyByID returns deploy key by given ID. -func GetDeployKeyByID(id int64) (*DeployKey, error) { - return getDeployKeyByID(x, id) -} - -func getDeployKeyByID(e Engine, id int64) (*DeployKey, error) { - key := new(DeployKey) - has, err := e.ID(id).Get(key) - if err != nil { - return nil, err - } else if !has { - return nil, ErrDeployKeyNotExist{id, 0, 0} - } - return key, nil -} - -// GetDeployKeyByRepo returns deploy key by given public key ID and repository ID. -func GetDeployKeyByRepo(keyID, repoID int64) (*DeployKey, error) { - return getDeployKeyByRepo(x, keyID, repoID) -} - -func getDeployKeyByRepo(e Engine, keyID, repoID int64) (*DeployKey, error) { - key := &DeployKey{ - KeyID: keyID, - RepoID: repoID, - } - has, err := e.Get(key) - if err != nil { - return nil, err - } else if !has { - return nil, ErrDeployKeyNotExist{0, keyID, repoID} - } - return key, nil -} - -// UpdateDeployKeyCols updates deploy key information in the specified columns. -func UpdateDeployKeyCols(key *DeployKey, cols ...string) error { - _, err := x.ID(key.ID).Cols(cols...).Update(key) - return err -} - -// UpdateDeployKey updates deploy key information. -func UpdateDeployKey(key *DeployKey) error { - _, err := x.ID(key.ID).AllCols().Update(key) - return err -} - -// DeleteDeployKey deletes deploy key from its repository authorized_keys file if needed. -func DeleteDeployKey(doer *User, id int64) error { +// deleteKeysMarkedForDeletion returns true if ssh keys needs update +func deleteKeysMarkedForDeletion(keys []string) (bool, error) { + // Start session sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { - return err - } - if err := deleteDeployKey(sess, doer, id); err != nil { - return err - } - return sess.Commit() -} - -func deleteDeployKey(sess Engine, doer *User, id int64) error { - key, err := getDeployKeyByID(sess, id) - if err != nil { - if IsErrDeployKeyNotExist(err) { - return nil - } - return fmt.Errorf("GetDeployKeyByID: %v", err) + return false, err } - // Check if user has access to delete this key. - if !doer.IsAdmin { - repo, err := getRepositoryByID(sess, key.RepoID) + // Delete keys marked for deletion + var sshKeysNeedUpdate bool + for _, KeyToDelete := range keys { + key, err := searchPublicKeyByContentWithEngine(sess, KeyToDelete) if err != nil { - return fmt.Errorf("GetRepositoryByID: %v", err) + log.Error("SearchPublicKeyByContent: %v", err) + continue } - has, err := isUserRepoAdmin(sess, repo, doer) - if err != nil { - return fmt.Errorf("GetUserRepoPermission: %v", err) - } else if !has { - return ErrKeyAccessDenied{doer.ID, key.ID, "deploy"} + if err = deletePublicKeys(sess, key.ID); err != nil { + log.Error("deletePublicKeys: %v", err) + continue } + sshKeysNeedUpdate = true } - if _, err = sess.ID(key.ID).Delete(new(DeployKey)); err != nil { - return fmt.Errorf("delete deploy key [%d]: %v", key.ID, err) + if err := sess.Commit(); err != nil { + return false, err } - // Check if this is the last reference to same key content. - has, err := sess. - Where("key_id = ?", key.KeyID). - Get(new(DeployKey)) - if err != nil { - return err - } else if !has { - if err = deletePublicKeys(sess, key.KeyID); err != nil { - return err - } - - // after deleted the public keys, should rewrite the public keys file - if err = rewriteAllPublicKeys(sess); err != nil { - return err - } - } - - return nil + return sshKeysNeedUpdate, nil } -// ListDeployKeys returns all deploy keys by given repository ID. -func ListDeployKeys(repoID int64, listOptions ListOptions) ([]*DeployKey, error) { - return listDeployKeys(x, repoID, listOptions) -} - -func listDeployKeys(e Engine, repoID int64, listOptions ListOptions) ([]*DeployKey, error) { - sess := e.Where("repo_id = ?", repoID) - if listOptions.Page != 0 { - sess = listOptions.setSessionPagination(sess) - - keys := make([]*DeployKey, 0, listOptions.PageSize) - return keys, sess.Find(&keys) - } - - keys := make([]*DeployKey, 0, 5) - return keys, sess.Find(&keys) -} - -// SearchDeployKeys returns a list of deploy keys matching the provided arguments. -func SearchDeployKeys(repoID int64, keyID int64, fingerprint string) ([]*DeployKey, error) { - keys := make([]*DeployKey, 0, 5) - cond := builder.NewCond() - if repoID != 0 { - cond = cond.And(builder.Eq{"repo_id": repoID}) - } - if keyID != 0 { - cond = cond.And(builder.Eq{"key_id": keyID}) - } - if fingerprint != "" { - cond = cond.And(builder.Eq{"fingerprint": fingerprint}) - } - return keys, x.Where(cond).Find(&keys) -} - -// __________ .__ .__ .__ -// \______ _______|__| ____ ____ |_____________ | | ______ -// | ___\_ __ | |/ \_/ ___\| \____ \__ \ | | / ___/ -// | | | | \| | | \ \___| | |_> / __ \| |__\___ \ -// |____| |__| |__|___| /\___ |__| __(____ |____/____ > -// \/ \/ |__| \/ \/ - -// AddPrincipalKey adds new principal to database and authorized_principals file. -func AddPrincipalKey(ownerID int64, content string, loginSourceID int64) (*PublicKey, error) { - sess := x.NewSession() - defer sess.Close() - if err := sess.Begin(); err != nil { - return nil, err - } - - // Principals cannot be duplicated. - has, err := sess. - Where("content = ? AND type = ?", content, KeyTypePrincipal). - Get(new(PublicKey)) - if err != nil { - return nil, err - } else if has { - return nil, ErrKeyAlreadyExist{0, "", content} - } - - key := &PublicKey{ - OwnerID: ownerID, - Name: content, - Content: content, - Mode: AccessModeWrite, - Type: KeyTypePrincipal, - LoginSourceID: loginSourceID, - } - if err = addPrincipalKey(sess, key); err != nil { - return nil, fmt.Errorf("addKey: %v", err) - } - - if err = sess.Commit(); err != nil { - return nil, err - } - - sess.Close() - - return key, RewriteAllPrincipalKeys() -} - -func addPrincipalKey(e Engine, key *PublicKey) (err error) { - // Save Key representing a principal. - if _, err = e.Insert(key); err != nil { - return err - } - - return nil -} - -// CheckPrincipalKeyString strips spaces and returns an error if the given principal contains newlines -func CheckPrincipalKeyString(user *User, content string) (_ string, err error) { - if setting.SSH.Disabled { - return "", ErrSSHDisabled{} - } - - content = strings.TrimSpace(content) - if strings.ContainsAny(content, "\r\n") { - return "", errors.New("only a single line with a single principal please") - } - - // check all the allowed principals, email, username or anything - // if any matches, return ok - for _, v := range setting.SSH.AuthorizedPrincipalsAllow { - switch v { - case "anything": - return content, nil - case "email": - emails, err := GetEmailAddresses(user.ID) +// AddPublicKeysBySource add a users public keys. Returns true if there are changes. +func AddPublicKeysBySource(usr *User, s *LoginSource, sshPublicKeys []string) bool { + var sshKeysNeedUpdate bool + for _, sshKey := range sshPublicKeys { + var err error + found := false + keys := []byte(sshKey) + loop: + for len(keys) > 0 && err == nil { + var out ssh.PublicKey + // We ignore options as they are not relevant to Gitea + out, _, _, keys, err = ssh.ParseAuthorizedKey(keys) if err != nil { - return "", err + break loop } - for _, email := range emails { - if !email.IsActivated { - continue + found = true + marshalled := string(ssh.MarshalAuthorizedKey(out)) + marshalled = marshalled[:len(marshalled)-1] + sshKeyName := fmt.Sprintf("%s-%s", s.Name, ssh.FingerprintSHA256(out)) + + if _, err := AddPublicKey(usr.ID, sshKeyName, marshalled, s.ID); err != nil { + if IsErrKeyAlreadyExist(err) { + log.Trace("AddPublicKeysBySource[%s]: Public SSH Key %s already exists for user", sshKeyName, usr.Name) + } else { + log.Error("AddPublicKeysBySource[%s]: Error adding Public SSH Key for user %s: %v", sshKeyName, usr.Name, err) } - if content == email.Email { - return content, nil - } - } - - case "username": - if content == user.Name { - return content, nil + } else { + log.Trace("AddPublicKeysBySource[%s]: Added Public SSH Key for user %s", sshKeyName, usr.Name) + sshKeysNeedUpdate = true } } - } - - return "", fmt.Errorf("didn't match allowed principals: %s", setting.SSH.AuthorizedPrincipalsAllow) -} - -// RewriteAllPrincipalKeys removes any authorized principal and rewrite all keys from database again. -// Note: x.Iterate does not get latest data after insert/delete, so we have to call this function -// outside any session scope independently. -func RewriteAllPrincipalKeys() error { - return rewriteAllPrincipalKeys(x) -} - -func rewriteAllPrincipalKeys(e Engine) error { - // Don't rewrite key if internal server - if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedPrincipalsFile { - return nil - } - - sshOpLocker.Lock() - defer sshOpLocker.Unlock() - - if setting.SSH.RootPath != "" { - // First of ensure that the RootPath is present, and if not make it with 0700 permissions - // This of course doesn't guarantee that this is the right directory for authorized_keys - // but at least if it's supposed to be this directory and it doesn't exist and we're the - // right user it will at least be created properly. - err := os.MkdirAll(setting.SSH.RootPath, 0700) - if err != nil { - log.Error("Unable to MkdirAll(%s): %v", setting.SSH.RootPath, err) - return err + if !found && err != nil { + log.Warn("AddPublicKeysBySource[%s]: Skipping invalid Public SSH Key for user %s: %v", s.Name, usr.Name, sshKey) } } + return sshKeysNeedUpdate +} - fPath := filepath.Join(setting.SSH.RootPath, authorizedPrincipalsFile) - tmpPath := fPath + ".tmp" - t, err := os.OpenFile(tmpPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600) +// SynchronizePublicKeys updates a users public keys. Returns true if there are changes. +func SynchronizePublicKeys(usr *User, s *LoginSource, sshPublicKeys []string) bool { + var sshKeysNeedUpdate bool + + log.Trace("synchronizePublicKeys[%s]: Handling Public SSH Key synchronization for user %s", s.Name, usr.Name) + + // Get Public Keys from DB with current LDAP source + var giteaKeys []string + keys, err := ListPublicKeysBySource(usr.ID, s.ID) if err != nil { - return err + log.Error("synchronizePublicKeys[%s]: Error listing Public SSH Keys for user %s: %v", s.Name, usr.Name, err) } - defer func() { - t.Close() - os.Remove(tmpPath) - }() - if setting.SSH.AuthorizedPrincipalsBackup { - isExist, err := util.IsExist(fPath) - if err != nil { - log.Error("Unable to check if %s exists. Error: %v", fPath, err) - return err - } - if isExist { - bakPath := fmt.Sprintf("%s_%d.gitea_bak", fPath, time.Now().Unix()) - if err = util.CopyFile(fPath, bakPath); err != nil { - return err + for _, v := range keys { + giteaKeys = append(giteaKeys, v.OmitEmail()) + } + + // Process the provided keys to remove duplicates and name part + var providedKeys []string + for _, v := range sshPublicKeys { + sshKeySplit := strings.Split(v, " ") + if len(sshKeySplit) > 1 { + key := strings.Join(sshKeySplit[:2], " ") + if !util.ExistsInSlice(key, providedKeys) { + providedKeys = append(providedKeys, key) } } } - if err := regeneratePrincipalKeys(e, t); err != nil { - return err + // Check if Public Key sync is needed + if util.IsEqualSlice(giteaKeys, providedKeys) { + log.Trace("synchronizePublicKeys[%s]: Public Keys are already in sync for %s (Source:%v/DB:%v)", s.Name, usr.Name, len(providedKeys), len(giteaKeys)) + return false + } + log.Trace("synchronizePublicKeys[%s]: Public Key needs update for user %s (Source:%v/DB:%v)", s.Name, usr.Name, len(providedKeys), len(giteaKeys)) + + // Add new Public SSH Keys that doesn't already exist in DB + var newKeys []string + for _, key := range providedKeys { + if !util.ExistsInSlice(key, giteaKeys) { + newKeys = append(newKeys, key) + } + } + if AddPublicKeysBySource(usr, s, newKeys) { + sshKeysNeedUpdate = true } - t.Close() - return os.Rename(tmpPath, fPath) -} - -// ListPrincipalKeys returns a list of principals belongs to given user. -func ListPrincipalKeys(uid int64, listOptions ListOptions) ([]*PublicKey, error) { - sess := x.Where("owner_id = ? AND type = ?", uid, KeyTypePrincipal) - if listOptions.Page != 0 { - sess = listOptions.setSessionPagination(sess) - - keys := make([]*PublicKey, 0, listOptions.PageSize) - return keys, sess.Find(&keys) + // Mark keys from DB that no longer exist in the source for deletion + var giteaKeysToDelete []string + for _, giteaKey := range giteaKeys { + if !util.ExistsInSlice(giteaKey, providedKeys) { + log.Trace("synchronizePublicKeys[%s]: Marking Public SSH Key for deletion for user %s: %v", s.Name, usr.Name, giteaKey) + giteaKeysToDelete = append(giteaKeysToDelete, giteaKey) + } } - keys := make([]*PublicKey, 0, 5) - return keys, sess.Find(&keys) -} - -// RegeneratePrincipalKeys regenerates the authorized_principals file -func RegeneratePrincipalKeys(t io.StringWriter) error { - return regeneratePrincipalKeys(x, t) -} - -func regeneratePrincipalKeys(e Engine, t io.StringWriter) error { - if err := e.Where("type = ?", KeyTypePrincipal).Iterate(new(PublicKey), func(idx int, bean interface{}) (err error) { - _, err = t.WriteString((bean.(*PublicKey)).AuthorizedString()) - return err - }); err != nil { - return err - } - - fPath := filepath.Join(setting.SSH.RootPath, authorizedPrincipalsFile) - isExist, err := util.IsExist(fPath) + // Delete keys from DB that no longer exist in the source + needUpd, err := deleteKeysMarkedForDeletion(giteaKeysToDelete) if err != nil { - log.Error("Unable to check if %s exists. Error: %v", fPath, err) - return err + log.Error("synchronizePublicKeys[%s]: Error deleting Public Keys marked for deletion for user %s: %v", s.Name, usr.Name, err) } - if isExist { - f, err := os.Open(fPath) - if err != nil { - return err - } - scanner := bufio.NewScanner(f) - for scanner.Scan() { - line := scanner.Text() - if strings.HasPrefix(line, tplCommentPrefix) { - scanner.Scan() - continue - } - _, err = t.WriteString(line + "\n") - if err != nil { - f.Close() - return err - } - } - f.Close() + if needUpd { + sshKeysNeedUpdate = true } - return nil + + return sshKeysNeedUpdate } diff --git a/models/ssh_key_authorized_keys.go b/models/ssh_key_authorized_keys.go new file mode 100644 index 000000000..5736477a0 --- /dev/null +++ b/models/ssh_key_authorized_keys.go @@ -0,0 +1,219 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "bufio" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "sync" + "time" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" +) + +// _____ __ .__ .__ .___ +// / _ \ __ ___/ |_| |__ ___________|__|_______ ____ __| _/ +// / /_\ \| | \ __\ | \ / _ \_ __ \ \___ // __ \ / __ | +// / | \ | /| | | Y ( <_> ) | \/ |/ /\ ___// /_/ | +// \____|__ /____/ |__| |___| /\____/|__| |__/_____ \\___ >____ | +// \/ \/ \/ \/ \/ +// ____ __. +// | |/ _|____ ___.__. ______ +// | <_/ __ < | |/ ___/ +// | | \ ___/\___ |\___ \ +// |____|__ \___ > ____/____ > +// \/ \/\/ \/ +// +// This file contains functions for creating authorized_keys files +// +// There is a dependence on the database within RegeneratePublicKeys however most of these functions probably belong in a module + +const ( + tplCommentPrefix = `# gitea public key` + tplPublicKey = tplCommentPrefix + "\n" + `command=%s,no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty %s` + "\n" +) + +var sshOpLocker sync.Mutex + +// AuthorizedStringForKey creates the authorized keys string appropriate for the provided key +func AuthorizedStringForKey(key *PublicKey) string { + sb := &strings.Builder{} + _ = setting.SSH.AuthorizedKeysCommandTemplateTemplate.Execute(sb, map[string]interface{}{ + "AppPath": util.ShellEscape(setting.AppPath), + "AppWorkPath": util.ShellEscape(setting.AppWorkPath), + "CustomConf": util.ShellEscape(setting.CustomConf), + "CustomPath": util.ShellEscape(setting.CustomPath), + "Key": key, + }) + + return fmt.Sprintf(tplPublicKey, util.ShellEscape(sb.String()), key.Content) +} + +// appendAuthorizedKeysToFile appends new SSH keys' content to authorized_keys file. +func appendAuthorizedKeysToFile(keys ...*PublicKey) error { + // Don't need to rewrite this file if builtin SSH server is enabled. + if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile { + return nil + } + + sshOpLocker.Lock() + defer sshOpLocker.Unlock() + + if setting.SSH.RootPath != "" { + // First of ensure that the RootPath is present, and if not make it with 0700 permissions + // This of course doesn't guarantee that this is the right directory for authorized_keys + // but at least if it's supposed to be this directory and it doesn't exist and we're the + // right user it will at least be created properly. + err := os.MkdirAll(setting.SSH.RootPath, 0o700) + if err != nil { + log.Error("Unable to MkdirAll(%s): %v", setting.SSH.RootPath, err) + return err + } + } + + fPath := filepath.Join(setting.SSH.RootPath, "authorized_keys") + f, err := os.OpenFile(fPath, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o600) + if err != nil { + return err + } + defer f.Close() + + // Note: chmod command does not support in Windows. + if !setting.IsWindows { + fi, err := f.Stat() + if err != nil { + return err + } + + // .ssh directory should have mode 700, and authorized_keys file should have mode 600. + if fi.Mode().Perm() > 0o600 { + log.Error("authorized_keys file has unusual permission flags: %s - setting to -rw-------", fi.Mode().Perm().String()) + if err = f.Chmod(0o600); err != nil { + return err + } + } + } + + for _, key := range keys { + if key.Type == KeyTypePrincipal { + continue + } + if _, err = f.WriteString(key.AuthorizedString()); err != nil { + return err + } + } + return nil +} + +// RewriteAllPublicKeys removes any authorized key and rewrite all keys from database again. +// Note: x.Iterate does not get latest data after insert/delete, so we have to call this function +// outside any session scope independently. +func RewriteAllPublicKeys() error { + return rewriteAllPublicKeys(x) +} + +func rewriteAllPublicKeys(e Engine) error { + // Don't rewrite key if internal server + if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedKeysFile { + return nil + } + + sshOpLocker.Lock() + defer sshOpLocker.Unlock() + + if setting.SSH.RootPath != "" { + // First of ensure that the RootPath is present, and if not make it with 0700 permissions + // This of course doesn't guarantee that this is the right directory for authorized_keys + // but at least if it's supposed to be this directory and it doesn't exist and we're the + // right user it will at least be created properly. + err := os.MkdirAll(setting.SSH.RootPath, 0o700) + if err != nil { + log.Error("Unable to MkdirAll(%s): %v", setting.SSH.RootPath, err) + return err + } + } + + fPath := filepath.Join(setting.SSH.RootPath, "authorized_keys") + tmpPath := fPath + ".tmp" + t, err := os.OpenFile(tmpPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o600) + if err != nil { + return err + } + defer func() { + t.Close() + if err := util.Remove(tmpPath); err != nil { + log.Warn("Unable to remove temporary authorized keys file: %s: Error: %v", tmpPath, err) + } + }() + + if setting.SSH.AuthorizedKeysBackup { + isExist, err := util.IsExist(fPath) + if err != nil { + log.Error("Unable to check if %s exists. Error: %v", fPath, err) + return err + } + if isExist { + bakPath := fmt.Sprintf("%s_%d.gitea_bak", fPath, time.Now().Unix()) + if err = util.CopyFile(fPath, bakPath); err != nil { + return err + } + } + } + + if err := regeneratePublicKeys(e, t); err != nil { + return err + } + + t.Close() + return util.Rename(tmpPath, fPath) +} + +// RegeneratePublicKeys regenerates the authorized_keys file +func RegeneratePublicKeys(t io.StringWriter) error { + return regeneratePublicKeys(x, t) +} + +func regeneratePublicKeys(e Engine, t io.StringWriter) error { + if err := e.Where("type != ?", KeyTypePrincipal).Iterate(new(PublicKey), func(idx int, bean interface{}) (err error) { + _, err = t.WriteString((bean.(*PublicKey)).AuthorizedString()) + return err + }); err != nil { + return err + } + + fPath := filepath.Join(setting.SSH.RootPath, "authorized_keys") + isExist, err := util.IsExist(fPath) + if err != nil { + log.Error("Unable to check if %s exists. Error: %v", fPath, err) + return err + } + if isExist { + f, err := os.Open(fPath) + if err != nil { + return err + } + scanner := bufio.NewScanner(f) + for scanner.Scan() { + line := scanner.Text() + if strings.HasPrefix(line, tplCommentPrefix) { + scanner.Scan() + continue + } + _, err = t.WriteString(line + "\n") + if err != nil { + f.Close() + return err + } + } + f.Close() + } + return nil +} diff --git a/models/ssh_key_authorized_principals.go b/models/ssh_key_authorized_principals.go new file mode 100644 index 000000000..f90ab267a --- /dev/null +++ b/models/ssh_key_authorized_principals.go @@ -0,0 +1,142 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "bufio" + "fmt" + "io" + "os" + "path/filepath" + "strings" + "time" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" +) + +// _____ __ .__ .__ .___ +// / _ \ __ ___/ |_| |__ ___________|__|_______ ____ __| _/ +// / /_\ \| | \ __\ | \ / _ \_ __ \ \___ // __ \ / __ | +// / | \ | /| | | Y ( <_> ) | \/ |/ /\ ___// /_/ | +// \____|__ /____/ |__| |___| /\____/|__| |__/_____ \\___ >____ | +// \/ \/ \/ \/ \/ +// __________ .__ .__ .__ +// \______ _______|__| ____ ____ |_____________ | | ______ +// | ___\_ __ | |/ \_/ ___\| \____ \__ \ | | / ___/ +// | | | | \| | | \ \___| | |_> / __ \| |__\___ \ +// |____| |__| |__|___| /\___ |__| __(____ |____/____ > +// \/ \/ |__| \/ \/ +// +// This file contains functions for creating authorized_principals files +// +// There is a dependence on the database within RewriteAllPrincipalKeys & RegeneratePrincipalKeys +// The sshOpLocker is used from ssh_key_authorized_keys.go + +const authorizedPrincipalsFile = "authorized_principals" + +// RewriteAllPrincipalKeys removes any authorized principal and rewrite all keys from database again. +// Note: x.Iterate does not get latest data after insert/delete, so we have to call this function +// outside any session scope independently. +func RewriteAllPrincipalKeys() error { + return rewriteAllPrincipalKeys(x) +} + +func rewriteAllPrincipalKeys(e Engine) error { + // Don't rewrite key if internal server + if setting.SSH.StartBuiltinServer || !setting.SSH.CreateAuthorizedPrincipalsFile { + return nil + } + + sshOpLocker.Lock() + defer sshOpLocker.Unlock() + + if setting.SSH.RootPath != "" { + // First of ensure that the RootPath is present, and if not make it with 0700 permissions + // This of course doesn't guarantee that this is the right directory for authorized_keys + // but at least if it's supposed to be this directory and it doesn't exist and we're the + // right user it will at least be created properly. + err := os.MkdirAll(setting.SSH.RootPath, 0o700) + if err != nil { + log.Error("Unable to MkdirAll(%s): %v", setting.SSH.RootPath, err) + return err + } + } + + fPath := filepath.Join(setting.SSH.RootPath, authorizedPrincipalsFile) + tmpPath := fPath + ".tmp" + t, err := os.OpenFile(tmpPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0o600) + if err != nil { + return err + } + defer func() { + t.Close() + os.Remove(tmpPath) + }() + + if setting.SSH.AuthorizedPrincipalsBackup { + isExist, err := util.IsExist(fPath) + if err != nil { + log.Error("Unable to check if %s exists. Error: %v", fPath, err) + return err + } + if isExist { + bakPath := fmt.Sprintf("%s_%d.gitea_bak", fPath, time.Now().Unix()) + if err = util.CopyFile(fPath, bakPath); err != nil { + return err + } + } + } + + if err := regeneratePrincipalKeys(e, t); err != nil { + return err + } + + t.Close() + return util.Rename(tmpPath, fPath) +} + +// RegeneratePrincipalKeys regenerates the authorized_principals file +func RegeneratePrincipalKeys(t io.StringWriter) error { + return regeneratePrincipalKeys(x, t) +} + +func regeneratePrincipalKeys(e Engine, t io.StringWriter) error { + if err := e.Where("type = ?", KeyTypePrincipal).Iterate(new(PublicKey), func(idx int, bean interface{}) (err error) { + _, err = t.WriteString((bean.(*PublicKey)).AuthorizedString()) + return err + }); err != nil { + return err + } + + fPath := filepath.Join(setting.SSH.RootPath, authorizedPrincipalsFile) + isExist, err := util.IsExist(fPath) + if err != nil { + log.Error("Unable to check if %s exists. Error: %v", fPath, err) + return err + } + if isExist { + f, err := os.Open(fPath) + if err != nil { + return err + } + scanner := bufio.NewScanner(f) + for scanner.Scan() { + line := scanner.Text() + if strings.HasPrefix(line, tplCommentPrefix) { + scanner.Scan() + continue + } + _, err = t.WriteString(line + "\n") + if err != nil { + f.Close() + return err + } + } + f.Close() + } + return nil +} diff --git a/models/ssh_key_deploy.go b/models/ssh_key_deploy.go new file mode 100644 index 000000000..e7d486b9f --- /dev/null +++ b/models/ssh_key_deploy.go @@ -0,0 +1,311 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "fmt" + "time" + + "code.gitea.io/gitea/modules/timeutil" + "xorm.io/builder" + "xorm.io/xorm" +) + +// ________ .__ ____ __. +// \______ \ ____ ______ | | ____ ___.__.| |/ _|____ ___.__. +// | | \_/ __ \\____ \| | / _ < | || <_/ __ < | | +// | ` \ ___/| |_> > |_( <_> )___ || | \ ___/\___ | +// /_______ /\___ > __/|____/\____// ____||____|__ \___ > ____| +// \/ \/|__| \/ \/ \/\/ +// +// This file contains functions specific to DeployKeys + +// DeployKey represents deploy key information and its relation with repository. +type DeployKey struct { + ID int64 `xorm:"pk autoincr"` + KeyID int64 `xorm:"UNIQUE(s) INDEX"` + RepoID int64 `xorm:"UNIQUE(s) INDEX"` + Name string + Fingerprint string + Content string `xorm:"-"` + + Mode AccessMode `xorm:"NOT NULL DEFAULT 1"` + + CreatedUnix timeutil.TimeStamp `xorm:"created"` + UpdatedUnix timeutil.TimeStamp `xorm:"updated"` + HasRecentActivity bool `xorm:"-"` + HasUsed bool `xorm:"-"` +} + +// AfterLoad is invoked from XORM after setting the values of all fields of this object. +func (key *DeployKey) AfterLoad() { + key.HasUsed = key.UpdatedUnix > key.CreatedUnix + key.HasRecentActivity = key.UpdatedUnix.AddDuration(7*24*time.Hour) > timeutil.TimeStampNow() +} + +// GetContent gets associated public key content. +func (key *DeployKey) GetContent() error { + pkey, err := GetPublicKeyByID(key.KeyID) + if err != nil { + return err + } + key.Content = pkey.Content + return nil +} + +// IsReadOnly checks if the key can only be used for read operations +func (key *DeployKey) IsReadOnly() bool { + return key.Mode == AccessModeRead +} + +func checkDeployKey(e Engine, keyID, repoID int64, name string) error { + // Note: We want error detail, not just true or false here. + has, err := e. + Where("key_id = ? AND repo_id = ?", keyID, repoID). + Get(new(DeployKey)) + if err != nil { + return err + } else if has { + return ErrDeployKeyAlreadyExist{keyID, repoID} + } + + has, err = e. + Where("repo_id = ? AND name = ?", repoID, name). + Get(new(DeployKey)) + if err != nil { + return err + } else if has { + return ErrDeployKeyNameAlreadyUsed{repoID, name} + } + + return nil +} + +// addDeployKey adds new key-repo relation. +func addDeployKey(e *xorm.Session, keyID, repoID int64, name, fingerprint string, mode AccessMode) (*DeployKey, error) { + if err := checkDeployKey(e, keyID, repoID, name); err != nil { + return nil, err + } + + key := &DeployKey{ + KeyID: keyID, + RepoID: repoID, + Name: name, + Fingerprint: fingerprint, + Mode: mode, + } + _, err := e.Insert(key) + return key, err +} + +// HasDeployKey returns true if public key is a deploy key of given repository. +func HasDeployKey(keyID, repoID int64) bool { + has, _ := x. + Where("key_id = ? AND repo_id = ?", keyID, repoID). + Get(new(DeployKey)) + return has +} + +// AddDeployKey add new deploy key to database and authorized_keys file. +func AddDeployKey(repoID int64, name, content string, readOnly bool) (*DeployKey, error) { + fingerprint, err := calcFingerprint(content) + if err != nil { + return nil, err + } + + accessMode := AccessModeRead + if !readOnly { + accessMode = AccessModeWrite + } + + sess := x.NewSession() + defer sess.Close() + if err = sess.Begin(); err != nil { + return nil, err + } + + pkey := &PublicKey{ + Fingerprint: fingerprint, + } + has, err := sess.Get(pkey) + if err != nil { + return nil, err + } + + if has { + if pkey.Type != KeyTypeDeploy { + return nil, ErrKeyAlreadyExist{0, fingerprint, ""} + } + } else { + // First time use this deploy key. + pkey.Mode = accessMode + pkey.Type = KeyTypeDeploy + pkey.Content = content + pkey.Name = name + if err = addKey(sess, pkey); err != nil { + return nil, fmt.Errorf("addKey: %v", err) + } + } + + key, err := addDeployKey(sess, pkey.ID, repoID, name, pkey.Fingerprint, accessMode) + if err != nil { + return nil, err + } + + return key, sess.Commit() +} + +// GetDeployKeyByID returns deploy key by given ID. +func GetDeployKeyByID(id int64) (*DeployKey, error) { + return getDeployKeyByID(x, id) +} + +func getDeployKeyByID(e Engine, id int64) (*DeployKey, error) { + key := new(DeployKey) + has, err := e.ID(id).Get(key) + if err != nil { + return nil, err + } else if !has { + return nil, ErrDeployKeyNotExist{id, 0, 0} + } + return key, nil +} + +// GetDeployKeyByRepo returns deploy key by given public key ID and repository ID. +func GetDeployKeyByRepo(keyID, repoID int64) (*DeployKey, error) { + return getDeployKeyByRepo(x, keyID, repoID) +} + +func getDeployKeyByRepo(e Engine, keyID, repoID int64) (*DeployKey, error) { + key := &DeployKey{ + KeyID: keyID, + RepoID: repoID, + } + has, err := e.Get(key) + if err != nil { + return nil, err + } else if !has { + return nil, ErrDeployKeyNotExist{0, keyID, repoID} + } + return key, nil +} + +// UpdateDeployKeyCols updates deploy key information in the specified columns. +func UpdateDeployKeyCols(key *DeployKey, cols ...string) error { + _, err := x.ID(key.ID).Cols(cols...).Update(key) + return err +} + +// UpdateDeployKey updates deploy key information. +func UpdateDeployKey(key *DeployKey) error { + _, err := x.ID(key.ID).AllCols().Update(key) + return err +} + +// DeleteDeployKey deletes deploy key from its repository authorized_keys file if needed. +func DeleteDeployKey(doer *User, id int64) error { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return err + } + if err := deleteDeployKey(sess, doer, id); err != nil { + return err + } + return sess.Commit() +} + +func deleteDeployKey(sess Engine, doer *User, id int64) error { + key, err := getDeployKeyByID(sess, id) + if err != nil { + if IsErrDeployKeyNotExist(err) { + return nil + } + return fmt.Errorf("GetDeployKeyByID: %v", err) + } + + // Check if user has access to delete this key. + if !doer.IsAdmin { + repo, err := getRepositoryByID(sess, key.RepoID) + if err != nil { + return fmt.Errorf("GetRepositoryByID: %v", err) + } + has, err := isUserRepoAdmin(sess, repo, doer) + if err != nil { + return fmt.Errorf("GetUserRepoPermission: %v", err) + } else if !has { + return ErrKeyAccessDenied{doer.ID, key.ID, "deploy"} + } + } + + if _, err = sess.ID(key.ID).Delete(new(DeployKey)); err != nil { + return fmt.Errorf("delete deploy key [%d]: %v", key.ID, err) + } + + // Check if this is the last reference to same key content. + has, err := sess. + Where("key_id = ?", key.KeyID). + Get(new(DeployKey)) + if err != nil { + return err + } else if !has { + if err = deletePublicKeys(sess, key.KeyID); err != nil { + return err + } + + // after deleted the public keys, should rewrite the public keys file + if err = rewriteAllPublicKeys(sess); err != nil { + return err + } + } + + return nil +} + +// ListDeployKeysOptions are options for ListDeployKeys +type ListDeployKeysOptions struct { + ListOptions + RepoID int64 + KeyID int64 + Fingerprint string +} + +func (opt ListDeployKeysOptions) toCond() builder.Cond { + cond := builder.NewCond() + if opt.RepoID != 0 { + cond = cond.And(builder.Eq{"repo_id": opt.RepoID}) + } + if opt.KeyID != 0 { + cond = cond.And(builder.Eq{"key_id": opt.KeyID}) + } + if opt.Fingerprint != "" { + cond = cond.And(builder.Eq{"fingerprint": opt.Fingerprint}) + } + return cond +} + +// ListDeployKeys returns a list of deploy keys matching the provided arguments. +func ListDeployKeys(opts *ListDeployKeysOptions) ([]*DeployKey, error) { + return listDeployKeys(x, opts) +} + +func listDeployKeys(e Engine, opts *ListDeployKeysOptions) ([]*DeployKey, error) { + sess := e.Where(opts.toCond()) + + if opts.Page != 0 { + sess = opts.setSessionPagination(sess) + + keys := make([]*DeployKey, 0, opts.PageSize) + return keys, sess.Find(&keys) + } + + keys := make([]*DeployKey, 0, 5) + return keys, sess.Find(&keys) +} + +// CountDeployKeys returns count deploy keys matching the provided arguments. +func CountDeployKeys(opts *ListDeployKeysOptions) (int64, error) { + return x.Where(opts.toCond()).Count(&DeployKey{}) +} diff --git a/models/ssh_key_fingerprint.go b/models/ssh_key_fingerprint.go new file mode 100644 index 000000000..96cc7d9c4 --- /dev/null +++ b/models/ssh_key_fingerprint.go @@ -0,0 +1,97 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "errors" + "fmt" + "strings" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/process" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "golang.org/x/crypto/ssh" +) + +// ___________.__ .__ __ +// \_ _____/|__| ____ ____ ________________________|__| _____/ |_ +// | __) | |/ \ / ___\_/ __ \_ __ \____ \_ __ \ |/ \ __\ +// | \ | | | \/ /_/ > ___/| | \/ |_> > | \/ | | \ | +// \___ / |__|___| /\___ / \___ >__| | __/|__| |__|___| /__| +// \/ \//_____/ \/ |__| \/ +// +// This file contains functions for fingerprinting SSH keys +// +// The database is used in checkKeyFingerprint however most of these functions probably belong in a module + +// checkKeyFingerprint only checks if key fingerprint has been used as public key, +// it is OK to use same key as deploy key for multiple repositories/users. +func checkKeyFingerprint(e Engine, fingerprint string) error { + has, err := e.Get(&PublicKey{ + Fingerprint: fingerprint, + }) + if err != nil { + return err + } else if has { + return ErrKeyAlreadyExist{0, fingerprint, ""} + } + return nil +} + +func calcFingerprintSSHKeygen(publicKeyContent string) (string, error) { + // Calculate fingerprint. + tmpPath, err := writeTmpKeyFile(publicKeyContent) + if err != nil { + return "", err + } + defer func() { + if err := util.Remove(tmpPath); err != nil { + log.Warn("Unable to remove temporary key file: %s: Error: %v", tmpPath, err) + } + }() + stdout, stderr, err := process.GetManager().Exec("AddPublicKey", "ssh-keygen", "-lf", tmpPath) + if err != nil { + if strings.Contains(stderr, "is not a public key file") { + return "", ErrKeyUnableVerify{stderr} + } + return "", fmt.Errorf("'ssh-keygen -lf %s' failed with error '%s': %s", tmpPath, err, stderr) + } else if len(stdout) < 2 { + return "", errors.New("not enough output for calculating fingerprint: " + stdout) + } + return strings.Split(stdout, " ")[1], nil +} + +func calcFingerprintNative(publicKeyContent string) (string, error) { + // Calculate fingerprint. + pk, _, _, _, err := ssh.ParseAuthorizedKey([]byte(publicKeyContent)) + if err != nil { + return "", err + } + return ssh.FingerprintSHA256(pk), nil +} + +func calcFingerprint(publicKeyContent string) (string, error) { + // Call the method based on configuration + var ( + fnName, fp string + err error + ) + if setting.SSH.StartBuiltinServer { + fnName = "calcFingerprintNative" + fp, err = calcFingerprintNative(publicKeyContent) + } else { + fnName = "calcFingerprintSSHKeygen" + fp, err = calcFingerprintSSHKeygen(publicKeyContent) + } + if err != nil { + if IsErrKeyUnableVerify(err) { + log.Info("%s", publicKeyContent) + return "", err + } + return "", fmt.Errorf("%s: %v", fnName, err) + } + return fp, nil +} diff --git a/models/ssh_key_parse.go b/models/ssh_key_parse.go new file mode 100644 index 000000000..a86b7de02 --- /dev/null +++ b/models/ssh_key_parse.go @@ -0,0 +1,309 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "crypto/rsa" + "crypto/x509" + "encoding/asn1" + "encoding/base64" + "encoding/binary" + "encoding/pem" + "errors" + "fmt" + "io/ioutil" + "math/big" + "strconv" + "strings" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/process" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "golang.org/x/crypto/ssh" +) + +// ____ __. __________ +// | |/ _|____ ___.__. \______ \_____ _______ ______ ___________ +// | <_/ __ < | | | ___/\__ \\_ __ \/ ___// __ \_ __ \ +// | | \ ___/\___ | | | / __ \| | \/\___ \\ ___/| | \/ +// |____|__ \___ > ____| |____| (____ /__| /____ >\___ >__| +// \/ \/\/ \/ \/ \/ +// +// This file contains functiosn for parsing ssh-keys +// +// TODO: Consider if these functions belong in models - no other models function call them or are called by them +// They may belong in a service or a module + +const ssh2keyStart = "---- BEGIN SSH2 PUBLIC KEY ----" + +func extractTypeFromBase64Key(key string) (string, error) { + b, err := base64.StdEncoding.DecodeString(key) + if err != nil || len(b) < 4 { + return "", fmt.Errorf("invalid key format: %v", err) + } + + keyLength := int(binary.BigEndian.Uint32(b)) + if len(b) < 4+keyLength { + return "", fmt.Errorf("invalid key format: not enough length %d", keyLength) + } + + return string(b[4 : 4+keyLength]), nil +} + +// parseKeyString parses any key string in OpenSSH or SSH2 format to clean OpenSSH string (RFC4253). +func parseKeyString(content string) (string, error) { + // remove whitespace at start and end + content = strings.TrimSpace(content) + + var keyType, keyContent, keyComment string + + if strings.HasPrefix(content, ssh2keyStart) { + // Parse SSH2 file format. + + // Transform all legal line endings to a single "\n". + content = strings.NewReplacer("\r\n", "\n", "\r", "\n").Replace(content) + + lines := strings.Split(content, "\n") + continuationLine := false + + for _, line := range lines { + // Skip lines that: + // 1) are a continuation of the previous line, + // 2) contain ":" as that are comment lines + // 3) contain "-" as that are begin and end tags + if continuationLine || strings.ContainsAny(line, ":-") { + continuationLine = strings.HasSuffix(line, "\\") + } else { + keyContent += line + } + } + + t, err := extractTypeFromBase64Key(keyContent) + if err != nil { + return "", fmt.Errorf("extractTypeFromBase64Key: %v", err) + } + keyType = t + } else { + if strings.Contains(content, "-----BEGIN") { + // Convert PEM Keys to OpenSSH format + // Transform all legal line endings to a single "\n". + content = strings.NewReplacer("\r\n", "\n", "\r", "\n").Replace(content) + + block, _ := pem.Decode([]byte(content)) + if block == nil { + return "", fmt.Errorf("failed to parse PEM block containing the public key") + } + + pub, err := x509.ParsePKIXPublicKey(block.Bytes) + if err != nil { + var pk rsa.PublicKey + _, err2 := asn1.Unmarshal(block.Bytes, &pk) + if err2 != nil { + return "", fmt.Errorf("failed to parse DER encoded public key as either PKIX or PEM RSA Key: %v %v", err, err2) + } + pub = &pk + } + + sshKey, err := ssh.NewPublicKey(pub) + if err != nil { + return "", fmt.Errorf("unable to convert to ssh public key: %v", err) + } + content = string(ssh.MarshalAuthorizedKey(sshKey)) + } + // Parse OpenSSH format. + + // Remove all newlines + content = strings.NewReplacer("\r\n", "", "\n", "").Replace(content) + + parts := strings.SplitN(content, " ", 3) + switch len(parts) { + case 0: + return "", errors.New("empty key") + case 1: + keyContent = parts[0] + case 2: + keyType = parts[0] + keyContent = parts[1] + default: + keyType = parts[0] + keyContent = parts[1] + keyComment = parts[2] + } + + // If keyType is not given, extract it from content. If given, validate it. + t, err := extractTypeFromBase64Key(keyContent) + if err != nil { + return "", fmt.Errorf("extractTypeFromBase64Key: %v", err) + } + if len(keyType) == 0 { + keyType = t + } else if keyType != t { + return "", fmt.Errorf("key type and content does not match: %s - %s", keyType, t) + } + } + // Finally we need to check whether we can actually read the proposed key: + _, _, _, _, err := ssh.ParseAuthorizedKey([]byte(keyType + " " + keyContent + " " + keyComment)) + if err != nil { + return "", fmt.Errorf("invalid ssh public key: %v", err) + } + return keyType + " " + keyContent + " " + keyComment, nil +} + +// CheckPublicKeyString checks if the given public key string is recognized by SSH. +// It returns the actual public key line on success. +func CheckPublicKeyString(content string) (_ string, err error) { + if setting.SSH.Disabled { + return "", ErrSSHDisabled{} + } + + content, err = parseKeyString(content) + if err != nil { + return "", err + } + + content = strings.TrimRight(content, "\n\r") + if strings.ContainsAny(content, "\n\r") { + return "", errors.New("only a single line with a single key please") + } + + // remove any unnecessary whitespace now + content = strings.TrimSpace(content) + + if !setting.SSH.MinimumKeySizeCheck { + return content, nil + } + + var ( + fnName string + keyType string + length int + ) + if setting.SSH.StartBuiltinServer { + fnName = "SSHNativeParsePublicKey" + keyType, length, err = SSHNativeParsePublicKey(content) + } else { + fnName = "SSHKeyGenParsePublicKey" + keyType, length, err = SSHKeyGenParsePublicKey(content) + } + if err != nil { + return "", fmt.Errorf("%s: %v", fnName, err) + } + log.Trace("Key info [native: %v]: %s-%d", setting.SSH.StartBuiltinServer, keyType, length) + + if minLen, found := setting.SSH.MinimumKeySizes[keyType]; found && length >= minLen { + return content, nil + } else if found && length < minLen { + return "", fmt.Errorf("key length is not enough: got %d, needs %d", length, minLen) + } + return "", fmt.Errorf("key type is not allowed: %s", keyType) +} + +// SSHNativeParsePublicKey extracts the key type and length using the golang SSH library. +func SSHNativeParsePublicKey(keyLine string) (string, int, error) { + fields := strings.Fields(keyLine) + if len(fields) < 2 { + return "", 0, fmt.Errorf("not enough fields in public key line: %s", keyLine) + } + + raw, err := base64.StdEncoding.DecodeString(fields[1]) + if err != nil { + return "", 0, err + } + + pkey, err := ssh.ParsePublicKey(raw) + if err != nil { + if strings.Contains(err.Error(), "ssh: unknown key algorithm") { + return "", 0, ErrKeyUnableVerify{err.Error()} + } + return "", 0, fmt.Errorf("ParsePublicKey: %v", err) + } + + // The ssh library can parse the key, so next we find out what key exactly we have. + switch pkey.Type() { + case ssh.KeyAlgoDSA: + rawPub := struct { + Name string + P, Q, G, Y *big.Int + }{} + if err := ssh.Unmarshal(pkey.Marshal(), &rawPub); err != nil { + return "", 0, err + } + // as per https://bugzilla.mindrot.org/show_bug.cgi?id=1647 we should never + // see dsa keys != 1024 bit, but as it seems to work, we will not check here + return "dsa", rawPub.P.BitLen(), nil // use P as per crypto/dsa/dsa.go (is L) + case ssh.KeyAlgoRSA: + rawPub := struct { + Name string + E *big.Int + N *big.Int + }{} + if err := ssh.Unmarshal(pkey.Marshal(), &rawPub); err != nil { + return "", 0, err + } + return "rsa", rawPub.N.BitLen(), nil // use N as per crypto/rsa/rsa.go (is bits) + case ssh.KeyAlgoECDSA256: + return "ecdsa", 256, nil + case ssh.KeyAlgoECDSA384: + return "ecdsa", 384, nil + case ssh.KeyAlgoECDSA521: + return "ecdsa", 521, nil + case ssh.KeyAlgoED25519: + return "ed25519", 256, nil + case ssh.KeyAlgoSKECDSA256: + return "ecdsa-sk", 256, nil + case ssh.KeyAlgoSKED25519: + return "ed25519-sk", 256, nil + } + return "", 0, fmt.Errorf("unsupported key length detection for type: %s", pkey.Type()) +} + +// writeTmpKeyFile writes key content to a temporary file +// and returns the name of that file, along with any possible errors. +func writeTmpKeyFile(content string) (string, error) { + tmpFile, err := ioutil.TempFile(setting.SSH.KeyTestPath, "gitea_keytest") + if err != nil { + return "", fmt.Errorf("TempFile: %v", err) + } + defer tmpFile.Close() + + if _, err = tmpFile.WriteString(content); err != nil { + return "", fmt.Errorf("WriteString: %v", err) + } + return tmpFile.Name(), nil +} + +// SSHKeyGenParsePublicKey extracts key type and length using ssh-keygen. +func SSHKeyGenParsePublicKey(key string) (string, int, error) { + tmpName, err := writeTmpKeyFile(key) + if err != nil { + return "", 0, fmt.Errorf("writeTmpKeyFile: %v", err) + } + defer func() { + if err := util.Remove(tmpName); err != nil { + log.Warn("Unable to remove temporary key file: %s: Error: %v", tmpName, err) + } + }() + + stdout, stderr, err := process.GetManager().Exec("SSHKeyGenParsePublicKey", setting.SSH.KeygenPath, "-lf", tmpName) + if err != nil { + return "", 0, fmt.Errorf("fail to parse public key: %s - %s", err, stderr) + } + if strings.Contains(stdout, "is not a public key file") { + return "", 0, ErrKeyUnableVerify{stdout} + } + + fields := strings.Split(stdout, " ") + if len(fields) < 4 { + return "", 0, fmt.Errorf("invalid public key line: %s", stdout) + } + + keyType := strings.Trim(fields[len(fields)-1], "()\r\n") + length, err := strconv.ParseInt(fields[0], 10, 32) + if err != nil { + return "", 0, err + } + return strings.ToLower(keyType), int(length), nil +} diff --git a/models/ssh_key_principals.go b/models/ssh_key_principals.go new file mode 100644 index 000000000..3459e43c8 --- /dev/null +++ b/models/ssh_key_principals.go @@ -0,0 +1,125 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "errors" + "fmt" + "strings" + + "code.gitea.io/gitea/modules/setting" +) + +// __________ .__ .__ .__ +// \______ _______|__| ____ ____ |_____________ | | ______ +// | ___\_ __ | |/ \_/ ___\| \____ \__ \ | | / ___/ +// | | | | \| | | \ \___| | |_> / __ \| |__\___ \ +// |____| |__| |__|___| /\___ |__| __(____ |____/____ > +// \/ \/ |__| \/ \/ +// +// This file contains functions related to principals + +// AddPrincipalKey adds new principal to database and authorized_principals file. +func AddPrincipalKey(ownerID int64, content string, loginSourceID int64) (*PublicKey, error) { + sess := x.NewSession() + defer sess.Close() + if err := sess.Begin(); err != nil { + return nil, err + } + + // Principals cannot be duplicated. + has, err := sess. + Where("content = ? AND type = ?", content, KeyTypePrincipal). + Get(new(PublicKey)) + if err != nil { + return nil, err + } else if has { + return nil, ErrKeyAlreadyExist{0, "", content} + } + + key := &PublicKey{ + OwnerID: ownerID, + Name: content, + Content: content, + Mode: AccessModeWrite, + Type: KeyTypePrincipal, + LoginSourceID: loginSourceID, + } + if err = addPrincipalKey(sess, key); err != nil { + return nil, fmt.Errorf("addKey: %v", err) + } + + if err = sess.Commit(); err != nil { + return nil, err + } + + sess.Close() + + return key, RewriteAllPrincipalKeys() +} + +func addPrincipalKey(e Engine, key *PublicKey) (err error) { + // Save Key representing a principal. + if _, err = e.Insert(key); err != nil { + return err + } + + return nil +} + +// CheckPrincipalKeyString strips spaces and returns an error if the given principal contains newlines +func CheckPrincipalKeyString(user *User, content string) (_ string, err error) { + if setting.SSH.Disabled { + return "", ErrSSHDisabled{} + } + + content = strings.TrimSpace(content) + if strings.ContainsAny(content, "\r\n") { + return "", errors.New("only a single line with a single principal please") + } + + // check all the allowed principals, email, username or anything + // if any matches, return ok + for _, v := range setting.SSH.AuthorizedPrincipalsAllow { + switch v { + case "anything": + return content, nil + case "email": + emails, err := GetEmailAddresses(user.ID) + if err != nil { + return "", err + } + for _, email := range emails { + if !email.IsActivated { + continue + } + if content == email.Email { + return content, nil + } + } + + case "username": + if content == user.Name { + return content, nil + } + } + } + + return "", fmt.Errorf("didn't match allowed principals: %s", setting.SSH.AuthorizedPrincipalsAllow) +} + +// ListPrincipalKeys returns a list of principals belongs to given user. +func ListPrincipalKeys(uid int64, listOptions ListOptions) ([]*PublicKey, error) { + sess := x.Where("owner_id = ? AND type = ?", uid, KeyTypePrincipal) + if listOptions.Page != 0 { + sess = listOptions.setSessionPagination(sess) + + keys := make([]*PublicKey, 0, listOptions.PageSize) + return keys, sess.Find(&keys) + } + + keys := make([]*PublicKey, 0, 5) + return keys, sess.Find(&keys) +} diff --git a/models/ssh_key_test.go b/models/ssh_key_test.go index 282c26e73..cc78f2604 100644 --- a/models/ssh_key_test.go +++ b/models/ssh_key_test.go @@ -21,16 +21,19 @@ func init() { func Test_SSHParsePublicKey(t *testing.T) { testCases := []struct { - name string - keyType string - length int - content string + name string + skipSSHKeygen bool + keyType string + length int + content string }{ - {"dsa-1024", "dsa", 1024, "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"}, - {"rsa-1024", "rsa", 1024, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"}, - {"rsa-2048", "rsa", 2048, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"}, - {"ecdsa-256", "ecdsa", 256, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"}, - {"ecdsa-384", "ecdsa", 384, "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"}, + {"dsa-1024", false, "dsa", 1024, "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"}, + {"rsa-1024", false, "rsa", 1024, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"}, + {"rsa-2048", false, "rsa", 2048, "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"}, + {"ecdsa-256", false, "ecdsa", 256, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"}, + {"ecdsa-384", false, "ecdsa", 384, "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"}, + {"ecdsa-sk", true, "ecdsa-sk", 256, "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGXEEzWmm1dxb+57RoK5KVCL0w2eNv9cqJX2AGGVlkFsVDhOXHzsadS3LTK4VlEbbrDMJdoti9yM8vclA8IeRacAAAAEc3NoOg== nocomment"}, + {"ed25519-sk", true, "ed25519-sk", 256, "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIE7kM1R02+4ertDKGKEDcKG0s+2vyDDcIvceJ0Gqv5f1AAAABHNzaDo= nocomment"}, } for _, tc := range testCases { @@ -41,6 +44,9 @@ func Test_SSHParsePublicKey(t *testing.T) { assert.Equal(t, tc.keyType, keyTypeN) assert.EqualValues(t, tc.length, lengthN) }) + if tc.skipSSHKeygen { + return + } t.Run("SSHKeygen", func(t *testing.T) { keyTypeK, lengthK, err := SSHKeyGenParsePublicKey(tc.content) if err != nil { @@ -68,6 +74,8 @@ func Test_CheckPublicKeyString(t *testing.T) { {"ssh-rsa AAAAB3NzaC1yc2EA\r\nAAADAQABAAAAgQDAu7tvI\nvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+\r\nBZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvW\nqIwC4prx/WVk2wLTJjzBAhyNx\r\nfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\r\n\r\n"}, {"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICV0MGX/W9IvLA4FXpIuUcdDcbj5KX4syHgsTy7soVgf"}, {"\r\nssh-ed25519 \r\nAAAAC3NzaC1lZDI1NTE5AAAAICV0MGX/W9IvLA4FXpIuUcdDcbj5KX4syHgsTy7soVgf\r\n\r\n"}, + {"sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGXEEzWmm1dxb+57RoK5KVCL0w2eNv9cqJX2AGGVlkFsVDhOXHzsadS3LTK4VlEbbrDMJdoti9yM8vclA8IeRacAAAAEc3NoOg== nocomment"}, + {"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIE7kM1R02+4ertDKGKEDcKG0s+2vyDDcIvceJ0Gqv5f1AAAABHNzaDo= nocomment"}, {`---- BEGIN SSH2 PUBLIC KEY ---- Comment: "1024-bit DSA, converted by andrew@phaedra from OpenSSH" AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3 @@ -150,15 +158,18 @@ AAAAC3NzaC1lZDI1NTE5AAAAICV0MGX/W9IvLA4FXpIuUcdDcbj5KX4syHgsTy7soVgf func Test_calcFingerprint(t *testing.T) { testCases := []struct { - name string - fp string - content string + name string + skipSSHKeygen bool + fp string + content string }{ - {"dsa-1024", "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc", "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"}, - {"rsa-1024", "SHA256:vSnDkvRh/xM6kMxPidLgrUhq3mCN7CDaronCEm2joyQ", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"}, - {"rsa-2048", "SHA256:ZHD//a1b9VuTq9XSunAeYjKeU1xDa2tBFZYrFr2Okkg", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"}, - {"ecdsa-256", "SHA256:Bqx/xgWqRKLtkZ0Lr4iZpgb+5lYsFpSwXwVZbPwuTRw", "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"}, - {"ecdsa-384", "SHA256:4qfJOgJDtUd8BrEjyVNdI8IgjiZKouztVde43aDhe1E", "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"}, + {"dsa-1024", false, "SHA256:fSIHQlpKMDsGPVAXI8BPYfRp+e2sfvSt1sMrPsFiXrc", "ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ibZ2OkQ3S0SqDIa0HXSEJ1zaExQdmbO+Ux/wsytWZmCczWOVsaszBZSl90q8UnWlSH6P+/YA+RWJm5SFtuV9PtGIhyZgoNuz5kBQ7K139wuQsecdKktISwTakzAAAAFQCzKsO2JhNKlL+wwwLGOcLffoAmkwAAAIBpK7/3xvduajLBD/9vASqBQIHrgK2J+wiQnIb/Wzy0UsVmvfn8A+udRbBo+csM8xrSnlnlJnjkJS3qiM5g+eTwsLIV1IdKPEwmwB+VcP53Cw6lSyWyJcvhFb0N6s08NZysLzvj0N+ZC/FnhKTLzIyMtkHf/IrPCwlM+pV/M/96YgAAAIEAqQcGn9CKgzgPaguIZooTAOQdvBLMI5y0bQjOW6734XOpqQGf/Kra90wpoasLKZjSYKNPjE+FRUOrStLrxcNs4BeVKhy2PYTRnybfYVk1/dmKgH6P1YSRONsGKvTsH6c5IyCRG0ncCgYeF8tXppyd642982daopE7zQ/NPAnJfag= nocomment"}, + {"rsa-1024", false, "SHA256:vSnDkvRh/xM6kMxPidLgrUhq3mCN7CDaronCEm2joyQ", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDAu7tvIvX6ZHrRXuZNfkR3XLHSsuCK9Zn3X58lxBcQzuo5xZgB6vRwwm/QtJuF+zZPtY5hsQILBLmF+BZ5WpKZp1jBeSjH2G7lxet9kbcH+kIVj0tPFEoyKI9wvWqIwC4prx/WVk2wLTJjzBAhyNxfEq7C9CeiX9pQEbEqJfkKCQ== nocomment\n"}, + {"rsa-2048", false, "SHA256:ZHD//a1b9VuTq9XSunAeYjKeU1xDa2tBFZYrFr2Okkg", "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDMZXh+1OBUwSH9D45wTaxErQIN9IoC9xl7MKJkqvTvv6O5RR9YW/IK9FbfjXgXsppYGhsCZo1hFOOsXHMnfOORqu/xMDx4yPuyvKpw4LePEcg4TDipaDFuxbWOqc/BUZRZcXu41QAWfDLrInwsltWZHSeG7hjhpacl4FrVv9V1pS6Oc5Q1NxxEzTzuNLS/8diZrTm/YAQQ/+B+mzWI3zEtF4miZjjAljWd1LTBPvU23d29DcBmmFahcZ441XZsTeAwGxG/Q6j8NgNXj9WxMeWwxXV2jeAX/EBSpZrCVlCQ1yJswT6xCp8TuBnTiGWYMBNTbOZvPC4e0WI2/yZW/s5F nocomment"}, + {"ecdsa-256", false, "SHA256:Bqx/xgWqRKLtkZ0Lr4iZpgb+5lYsFpSwXwVZbPwuTRw", "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFQacN3PrOll7PXmN5B/ZNVahiUIqI05nbBlZk1KXsO3d06ktAWqbNflv2vEmA38bTFTfJ2sbn2B5ksT52cDDbA= nocomment"}, + {"ecdsa-384", false, "SHA256:4qfJOgJDtUd8BrEjyVNdI8IgjiZKouztVde43aDhe1E", "ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBINmioV+XRX1Fm9Qk2ehHXJ2tfVxW30ypUWZw670Zyq5GQfBAH6xjygRsJ5wWsHXBsGYgFUXIHvMKVAG1tpw7s6ax9oA+dJOJ7tj+vhn8joFqT+sg3LYHgZkHrfqryRasQ== nocomment"}, + {"ecdsa-sk", true, "SHA256:4wcIu4z+53gHc+db85OPfy8IydyNzPLCr6kHIs625LQ", "sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb20AAAAIbmlzdHAyNTYAAABBBGXEEzWmm1dxb+57RoK5KVCL0w2eNv9cqJX2AGGVlkFsVDhOXHzsadS3LTK4VlEbbrDMJdoti9yM8vclA8IeRacAAAAEc3NoOg== nocomment"}, + {"ed25519-sk", true, "SHA256:RB4ku1OeWKN7fLMrjxz38DK0mp1BnOPBx4BItjTvJ0g", "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIE7kM1R02+4ertDKGKEDcKG0s+2vyDDcIvceJ0Gqv5f1AAAABHNzaDo= nocomment"}, } for _, tc := range testCases { @@ -168,6 +179,9 @@ func Test_calcFingerprint(t *testing.T) { assert.NoError(t, err) assert.Equal(t, tc.fp, fpN) }) + if tc.skipSSHKeygen { + return + } t.Run("SSHKeygen", func(t *testing.T) { fpK, err := calcFingerprintSSHKeygen(tc.content) assert.NoError(t, err) diff --git a/models/store.go b/models/store.go new file mode 100644 index 000000000..e8eba28fb --- /dev/null +++ b/models/store.go @@ -0,0 +1,16 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import "github.com/lafriks/xormstore" + +// CreateStore creates a xormstore for the provided table and key +func CreateStore(table, key string) (*xormstore.Store, error) { + store, err := xormstore.NewOptions(x, xormstore.Options{ + TableName: table, + }, []byte(key)) + + return store, err +} diff --git a/models/task.go b/models/task.go index b729bb863..7dfcaea2e 100644 --- a/models/task.go +++ b/models/task.go @@ -5,12 +5,15 @@ package models import ( - "encoding/json" "fmt" + "code.gitea.io/gitea/modules/json" migration "code.gitea.io/gitea/modules/migrations/base" + "code.gitea.io/gitea/modules/secret" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" "xorm.io/builder" ) @@ -29,10 +32,16 @@ type Task struct { StartTime timeutil.TimeStamp EndTime timeutil.TimeStamp PayloadContent string `xorm:"TEXT"` - Errors string `xorm:"TEXT"` // if task failed, saved the error reason + Message string `xorm:"TEXT"` // if task failed, saved the error reason Created timeutil.TimeStamp `xorm:"created"` } +// TranslatableMessage represents JSON struct that can be translated with a Locale +type TranslatableMessage struct { + Format string + Args []interface{} `json:"omitempty"` +} + // LoadRepo loads repository of the task func (task *Task) LoadRepo() error { return task.loadRepo(x) @@ -109,6 +118,24 @@ func (task *Task) MigrateConfig() (*migration.MigrateOptions, error) { if err != nil { return nil, err } + + // decrypt credentials + if opts.CloneAddrEncrypted != "" { + if opts.CloneAddr, err = secret.DecryptSecret(setting.SecretKey, opts.CloneAddrEncrypted); err != nil { + return nil, err + } + } + if opts.AuthPasswordEncrypted != "" { + if opts.AuthPassword, err = secret.DecryptSecret(setting.SecretKey, opts.AuthPasswordEncrypted); err != nil { + return nil, err + } + } + if opts.AuthTokenEncrypted != "" { + if opts.AuthToken, err = secret.DecryptSecret(setting.SecretKey, opts.AuthTokenEncrypted); err != nil { + return nil, err + } + } + return &opts, nil } return nil, fmt.Errorf("Task type is %s, not Migrate Repo", task.Type.Name()) @@ -134,7 +161,7 @@ func (err ErrTaskDoesNotExist) Error() string { // GetMigratingTask returns the migrating task by repo's id func GetMigratingTask(repoID int64) (*Task, error) { - var task = Task{ + task := Task{ RepoID: repoID, Type: structs.TaskTypeMigrateRepo, } @@ -149,7 +176,7 @@ func GetMigratingTask(repoID int64) (*Task, error) { // GetMigratingTaskByID returns the migrating task by repo's id func GetMigratingTaskByID(id, doerID int64) (*Task, *migration.MigrateOptions, error) { - var task = Task{ + task := Task{ ID: id, DoerID: doerID, Type: structs.TaskTypeMigrateRepo, @@ -175,7 +202,7 @@ type FindTaskOptions struct { // ToConds generates conditions for database operation. func (opts FindTaskOptions) ToConds() builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if opts.Status >= 0 { cond = cond.And(builder.Eq{"status": opts.Status}) } @@ -184,7 +211,7 @@ func (opts FindTaskOptions) ToConds() builder.Cond { // FindTasks find all tasks func FindTasks(opts FindTaskOptions) ([]*Task, error) { - var tasks = make([]*Task, 0, 10) + tasks := make([]*Task, 0, 10) err := x.Where(opts.ToConds()).Find(&tasks) return tasks, err } @@ -203,12 +230,30 @@ func createTask(e Engine, task *Task) error { func FinishMigrateTask(task *Task) error { task.Status = structs.TaskStatusFinished task.EndTime = timeutil.TimeStampNow() + + // delete credentials when we're done, they're a liability. + conf, err := task.MigrateConfig() + if err != nil { + return err + } + conf.AuthPassword = "" + conf.AuthToken = "" + conf.CloneAddr = util.NewStringURLSanitizer(conf.CloneAddr, true).Replace(conf.CloneAddr) + conf.AuthPasswordEncrypted = "" + conf.AuthTokenEncrypted = "" + conf.CloneAddrEncrypted = "" + confBytes, err := json.Marshal(conf) + if err != nil { + return err + } + task.PayloadContent = string(confBytes) + sess := x.NewSession() defer sess.Close() if err := sess.Begin(); err != nil { return err } - if _, err := sess.ID(task.ID).Cols("status", "end_time").Update(task); err != nil { + if _, err := sess.ID(task.ID).Cols("status", "end_time", "payload_content").Update(task); err != nil { return err } diff --git a/models/test_fixtures.go b/models/test_fixtures.go index 5cca7c16e..c1f84c661 100644 --- a/models/test_fixtures.go +++ b/models/test_fixtures.go @@ -10,16 +10,22 @@ import ( "time" "github.com/go-testfixtures/testfixtures/v3" + "xorm.io/xorm" "xorm.io/xorm/schemas" ) var fixtures *testfixtures.Loader // InitFixtures initialize test fixtures for a test database -func InitFixtures(dir string) (err error) { +func InitFixtures(dir string, engine ...*xorm.Engine) (err error) { + e := x + if len(engine) == 1 { + e = engine[0] + } + testfiles := testfixtures.Directory(dir) dialect := "unknown" - switch x.Dialect().URI().DBType { + switch e.Dialect().URI().DBType { case schemas.POSTGRES: dialect = "postgres" case schemas.MYSQL: @@ -33,13 +39,13 @@ func InitFixtures(dir string) (err error) { os.Exit(1) } loaderOptions := []func(loader *testfixtures.Loader) error{ - testfixtures.Database(x.DB().DB), + testfixtures.Database(e.DB().DB), testfixtures.Dialect(dialect), testfixtures.DangerousSkipTestDatabaseCheck(), testfiles, } - if x.Dialect().URI().DBType == schemas.POSTGRES { + if e.Dialect().URI().DBType == schemas.POSTGRES { loaderOptions = append(loaderOptions, testfixtures.SkipResetSequences()) } @@ -52,7 +58,11 @@ func InitFixtures(dir string) (err error) { } // LoadFixtures load fixtures for a test database -func LoadFixtures() error { +func LoadFixtures(engine ...*xorm.Engine) error { + e := x + if len(engine) == 1 { + e = engine[0] + } var err error // Database transaction conflicts could occur and result in ROLLBACK // As a simple workaround, we just retry 20 times. @@ -67,8 +77,8 @@ func LoadFixtures() error { fmt.Printf("LoadFixtures failed after retries: %v\n", err) } // Now if we're running postgres we need to tell it to update the sequences - if x.Dialect().URI().DBType == schemas.POSTGRES { - results, err := x.QueryString(`SELECT 'SELECT SETVAL(' || + if e.Dialect().URI().DBType == schemas.POSTGRES { + results, err := e.QueryString(`SELECT 'SELECT SETVAL(' || quote_literal(quote_ident(PGT.schemaname) || '.' || quote_ident(S.relname)) || ', COALESCE(MAX(' ||quote_ident(C.attname)|| '), 1) ) FROM ' || quote_ident(PGT.schemaname)|| '.'||quote_ident(T.relname)|| ';' @@ -90,7 +100,7 @@ func LoadFixtures() error { } for _, r := range results { for _, value := range r { - _, err = x.Exec(value) + _, err = e.Exec(value) if err != nil { fmt.Printf("Failed to update sequence: %s Error: %v\n", value, err) return err diff --git a/models/token.go b/models/token.go index 1245098df..9baa763f1 100644 --- a/models/token.go +++ b/models/token.go @@ -10,12 +10,15 @@ import ( "time" "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/generate" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" gouuid "github.com/google/uuid" + lru "github.com/hashicorp/golang-lru" ) +var successfulAccessTokenCache *lru.Cache + // AccessToken represents a personal access token. type AccessToken struct { ID int64 `xorm:"pk autoincr"` @@ -40,7 +43,7 @@ func (t *AccessToken) AfterLoad() { // NewAccessToken creates new access token. func NewAccessToken(t *AccessToken) error { - salt, err := generate.GetRandomString(10) + salt, err := util.RandomString(10) if err != nil { return err } @@ -52,25 +55,67 @@ func NewAccessToken(t *AccessToken) error { return err } +func getAccessTokenIDFromCache(token string) int64 { + if successfulAccessTokenCache == nil { + return 0 + } + tInterface, ok := successfulAccessTokenCache.Get(token) + if !ok { + return 0 + } + t, ok := tInterface.(int64) + if !ok { + return 0 + } + return t +} + // GetAccessTokenBySHA returns access token by given token value func GetAccessTokenBySHA(token string) (*AccessToken, error) { if token == "" { return nil, ErrAccessTokenEmpty{} } - if len(token) < 8 { + // A token is defined as being SHA1 sum these are 40 hexadecimal bytes long + if len(token) != 40 { return nil, ErrAccessTokenNotExist{token} } - var tokens []AccessToken + for _, x := range []byte(token) { + if x < '0' || (x > '9' && x < 'a') || x > 'f' { + return nil, ErrAccessTokenNotExist{token} + } + } + lastEight := token[len(token)-8:] + + if id := getAccessTokenIDFromCache(token); id > 0 { + token := &AccessToken{ + TokenLastEight: lastEight, + } + // Re-get the token from the db in case it has been deleted in the intervening period + has, err := x.ID(id).Get(token) + if err != nil { + return nil, err + } + if has { + return token, nil + } + successfulAccessTokenCache.Remove(token) + } + + var tokens []AccessToken err := x.Table(&AccessToken{}).Where("token_last_eight = ?", lastEight).Find(&tokens) if err != nil { return nil, err } else if len(tokens) == 0 { return nil, ErrAccessTokenNotExist{token} } + for _, t := range tokens { tempHash := hashToken(token, t.TokenSalt) if subtle.ConstantTimeCompare([]byte(t.TokenHash), []byte(tempHash)) == 1 { + if successfulAccessTokenCache != nil { + successfulAccessTokenCache.Add(token, t.ID) + } return &t, nil } } @@ -116,6 +161,15 @@ func UpdateAccessToken(t *AccessToken) error { return err } +// CountAccessTokens count access tokens belongs to given user by options +func CountAccessTokens(opts ListAccessTokensOptions) (int64, error) { + sess := x.Where("uid=?", opts.UserID) + if len(opts.Name) != 0 { + sess = sess.Where("name=?", opts.Name) + } + return sess.Count(&AccessToken{}) +} + // DeleteAccessTokenByID deletes access token by given ID. func DeleteAccessTokenByID(id, userID int64) error { cnt, err := x.ID(id).Delete(&AccessToken{ diff --git a/models/token_test.go b/models/token_test.go index 23d902adb..0f24c7527 100644 --- a/models/token_test.go +++ b/models/token_test.go @@ -28,7 +28,6 @@ func TestNewAccessToken(t *testing.T) { } func TestAccessTokenByNameExists(t *testing.T) { - name := "Token Gitea" assert.NoError(t, PrepareTestDatabase()) diff --git a/models/topic.go b/models/topic.go index 1969c57db..7fc34f5be 100644 --- a/models/topic.go +++ b/models/topic.go @@ -60,7 +60,7 @@ func ValidateTopic(topic string) bool { } // SanitizeAndValidateTopics sanitizes and checks an array or topics -func SanitizeAndValidateTopics(topics []string) (validTopics []string, invalidTopics []string) { +func SanitizeAndValidateTopics(topics []string) (validTopics, invalidTopics []string) { validTopics = make([]string, 0) mValidTopics := make(map[string]struct{}) invalidTopics = make([]string, 0) @@ -171,7 +171,7 @@ type FindTopicOptions struct { } func (opts *FindTopicOptions) toConds() builder.Cond { - var cond = builder.NewCond() + cond := builder.NewCond() if opts.RepoID > 0 { cond = cond.And(builder.Eq{"repo_topic.repo_id": opts.RepoID}) } @@ -184,7 +184,7 @@ func (opts *FindTopicOptions) toConds() builder.Cond { } // FindTopics retrieves the topics via FindTopicOptions -func FindTopics(opts *FindTopicOptions) (topics []*Topic, err error) { +func FindTopics(opts *FindTopicOptions) ([]*Topic, int64, error) { sess := x.Select("topic.*").Where(opts.toConds()) if opts.RepoID > 0 { sess.Join("INNER", "repo_topic", "repo_topic.topic_id = topic.id") @@ -192,15 +192,27 @@ func FindTopics(opts *FindTopicOptions) (topics []*Topic, err error) { if opts.PageSize != 0 && opts.Page != 0 { sess = opts.setSessionPagination(sess) } - return topics, sess.Desc("topic.repo_count").Find(&topics) + topics := make([]*Topic, 0, 10) + total, err := sess.Desc("topic.repo_count").FindAndCount(&topics) + return topics, total, err } -// GetRepoTopicByName retrives topic from name for a repo if it exist +// CountTopics counts the number of topics matching the FindTopicOptions +func CountTopics(opts *FindTopicOptions) (int64, error) { + sess := x.Where(opts.toConds()) + if opts.RepoID > 0 { + sess.Join("INNER", "repo_topic", "repo_topic.topic_id = topic.id") + } + return sess.Count(new(Topic)) +} + +// GetRepoTopicByName retrieves topic from name for a repo if it exist func GetRepoTopicByName(repoID int64, topicName string) (*Topic, error) { return getRepoTopicByName(x, repoID, topicName) } + func getRepoTopicByName(e Engine, repoID int64, topicName string) (*Topic, error) { - var cond = builder.NewCond() + cond := builder.NewCond() var topic Topic cond = cond.And(builder.Eq{"repo_topic.repo_id": repoID}).And(builder.Eq{"topic.name": topicName}) sess := e.Table("topic").Where(cond) @@ -268,7 +280,7 @@ func DeleteTopic(repoID int64, topicName string) (*Topic, error) { // SaveTopics save topics to a repository func SaveTopics(repoID int64, topicNames ...string) error { - topics, err := FindTopics(&FindTopicOptions{ + topics, _, err := FindTopics(&FindTopicOptions{ RepoID: repoID, }) if err != nil { diff --git a/models/topic_test.go b/models/topic_test.go index b6ef8f565..9386a71e3 100644 --- a/models/topic_test.go +++ b/models/topic_test.go @@ -17,33 +17,34 @@ func TestAddTopic(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - topics, err := FindTopics(&FindTopicOptions{}) + topics, _, err := FindTopics(&FindTopicOptions{}) assert.NoError(t, err) - assert.EqualValues(t, totalNrOfTopics, len(topics)) + assert.Len(t, topics, totalNrOfTopics) - topics, err = FindTopics(&FindTopicOptions{ + topics, total, err := FindTopics(&FindTopicOptions{ ListOptions: ListOptions{Page: 1, PageSize: 2}, }) assert.NoError(t, err) - assert.EqualValues(t, 2, len(topics)) + assert.Len(t, topics, 2) + assert.EqualValues(t, 6, total) - topics, err = FindTopics(&FindTopicOptions{ + topics, _, err = FindTopics(&FindTopicOptions{ RepoID: 1, }) assert.NoError(t, err) - assert.EqualValues(t, repo1NrOfTopics, len(topics)) + assert.Len(t, topics, repo1NrOfTopics) assert.NoError(t, SaveTopics(2, "golang")) repo2NrOfTopics = 1 - topics, err = FindTopics(&FindTopicOptions{}) + topics, _, err = FindTopics(&FindTopicOptions{}) assert.NoError(t, err) - assert.EqualValues(t, totalNrOfTopics, len(topics)) + assert.Len(t, topics, totalNrOfTopics) - topics, err = FindTopics(&FindTopicOptions{ + topics, _, err = FindTopics(&FindTopicOptions{ RepoID: 2, }) assert.NoError(t, err) - assert.EqualValues(t, repo2NrOfTopics, len(topics)) + assert.Len(t, topics, repo2NrOfTopics) assert.NoError(t, SaveTopics(2, "golang", "gitea")) repo2NrOfTopics = 2 @@ -52,15 +53,15 @@ func TestAddTopic(t *testing.T) { assert.NoError(t, err) assert.EqualValues(t, 1, topic.RepoCount) - topics, err = FindTopics(&FindTopicOptions{}) + topics, _, err = FindTopics(&FindTopicOptions{}) assert.NoError(t, err) - assert.EqualValues(t, totalNrOfTopics, len(topics)) + assert.Len(t, topics, totalNrOfTopics) - topics, err = FindTopics(&FindTopicOptions{ + topics, _, err = FindTopics(&FindTopicOptions{ RepoID: 2, }) assert.NoError(t, err) - assert.EqualValues(t, repo2NrOfTopics, len(topics)) + assert.Len(t, topics, repo2NrOfTopics) } func TestTopicValidator(t *testing.T) { diff --git a/models/twofactor.go b/models/twofactor.go index a84da8cdb..c19c5d120 100644 --- a/models/twofactor.go +++ b/models/twofactor.go @@ -11,10 +11,10 @@ import ( "encoding/base64" "fmt" - "code.gitea.io/gitea/modules/generate" "code.gitea.io/gitea/modules/secret" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" "github.com/pquerna/otp/totp" "golang.org/x/crypto/pbkdf2" @@ -34,11 +34,11 @@ type TwoFactor struct { // GenerateScratchToken recreates the scratch token the user is using. func (t *TwoFactor) GenerateScratchToken() (string, error) { - token, err := generate.GetRandomString(8) + token, err := util.RandomString(8) if err != nil { return "", err } - t.ScratchSalt, _ = generate.GetRandomString(10) + t.ScratchSalt, _ = util.RandomString(10) t.ScratchHash = hashToken(token, t.ScratchSalt) return token, nil } diff --git a/models/unit_tests.go b/models/unit_tests.go index 329963063..f8d681933 100644 --- a/models/unit_tests.go +++ b/models/unit_tests.go @@ -74,6 +74,8 @@ func MainTest(m *testing.M, pathToGiteaRoot string) { setting.RepoAvatar.Storage.Path = filepath.Join(setting.AppDataPath, "repo-avatars") + setting.RepoArchive.Storage.Path = filepath.Join(setting.AppDataPath, "repo-archive") + if err = storage.Init(); err != nil { fatalTestError("storage.Init: %v\n", err) } @@ -103,7 +105,7 @@ func CreateTestEngine(fixturesDir string) error { return err } x.SetMapper(names.GonicMapper{}) - if err = x.StoreEngine("InnoDB").Sync2(tables...); err != nil { + if err = syncTables(); err != nil { return err } switch os.Getenv("GITEA_UNIT_TESTS_VERBOSE") { @@ -207,7 +209,7 @@ func AssertSuccessfulInsert(t testing.TB, beans ...interface{}) { } // AssertCount assert the count of a bean -func AssertCount(t testing.TB, bean interface{}, expected interface{}) { +func AssertCount(t testing.TB, bean, expected interface{}) { assert.EqualValues(t, expected, GetCount(t, bean)) } diff --git a/models/user.go b/models/user.go index de12b804f..a2d185de3 100644 --- a/models/user.go +++ b/models/user.go @@ -6,7 +6,6 @@ package models import ( - "container/list" "context" "crypto/sha256" "crypto/subtle" @@ -22,10 +21,8 @@ import ( "unicode/utf8" "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/generate" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/public" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/structs" @@ -36,9 +33,7 @@ import ( "golang.org/x/crypto/bcrypt" "golang.org/x/crypto/pbkdf2" "golang.org/x/crypto/scrypt" - "golang.org/x/crypto/ssh" "xorm.io/builder" - "xorm.io/xorm" ) // UserType defines the user type @@ -57,7 +52,17 @@ const ( algoScrypt = "scrypt" algoArgon2 = "argon2" algoPbkdf2 = "pbkdf2" +) +// AvailableHashAlgorithms represents the available password hashing algorithms +var AvailableHashAlgorithms = []string{ + algoPbkdf2, + algoArgon2, + algoScrypt, + algoBcrypt, +} + +const ( // EmailNotificationsEnabled indicates that the user would like to receive all email notifications EmailNotificationsEnabled = "enabled" // EmailNotificationsOnMention indicates that the user would like to be notified via email when mentioned. @@ -67,12 +72,6 @@ const ( ) var ( - // ErrUserNotKeyOwner user does not own this key error - ErrUserNotKeyOwner = errors.New("User does not own this public key") - - // ErrEmailNotExist e-mail does not exist error - ErrEmailNotExist = errors.New("E-mail does not exist") - // ErrEmailNotActivated e-mail address has not been activated error ErrEmailNotActivated = errors.New("E-mail address has not been activated") @@ -111,7 +110,6 @@ type User struct { LoginName string Type UserType OwnedOrgs []*User `xorm:"-"` - Orgs []*User `xorm:"-"` Repos []*Repository `xorm:"-"` Location string Website string @@ -230,10 +228,10 @@ func (u *User) GetEmail() string { return u.Email } -// GetAllUsers returns a slice of all users found in DB. +// GetAllUsers returns a slice of all individual users found in DB. func GetAllUsers() ([]*User, error) { users := make([]*User, 0) - return users, x.OrderBy("id").Find(&users) + return users, x.OrderBy("id").Where("type = ?", UserTypeIndividual).Find(&users) } // IsLocal returns true if user login type is LoginPlain. @@ -287,7 +285,7 @@ func (u *User) CanEditGitHook() bool { // CanImportLocal returns true if user can migrate repository by local path. func (u *User) CanImportLocal() bool { - if !setting.ImportLocalPaths { + if !setting.ImportLocalPaths || u == nil { return false } return u.IsAdmin || u.AllowImportLocal @@ -296,7 +294,7 @@ func (u *User) CanImportLocal() bool { // DashboardLink returns the user dashboard page link. func (u *User) DashboardLink() string { if u.IsOrganization() { - return setting.AppSubURL + "/org/" + u.Name + "/dashboard/" + return u.OrganisationLink() + "/dashboard/" } return setting.AppSubURL + "/" } @@ -311,6 +309,11 @@ func (u *User) HTMLURL() string { return setting.AppURL + u.Name } +// OrganisationLink returns the organization sub page link. +func (u *User) OrganisationLink() string { + return setting.AppSubURL + "/org/" + u.Name +} + // GenerateEmailActivateCode generates an activate code based on user information and given e-mail. func (u *User) GenerateEmailActivateCode(email string) string { code := base.CreateTimeLimitCode( @@ -322,11 +325,6 @@ func (u *User) GenerateEmailActivateCode(email string) string { return code } -// GenerateActivateCode generates an activate code based on user information. -func (u *User) GenerateActivateCode() string { - return u.GenerateEmailActivateCode(u.Email) -} - // GetFollowers returns range of user's followers. func (u *User) GetFollowers(listOptions ListOptions) ([]*User, error) { sess := x. @@ -432,6 +430,62 @@ func (u *User) IsPasswordSet() bool { return len(u.Passwd) != 0 } +// IsVisibleToUser check if viewer is able to see user profile +func (u *User) IsVisibleToUser(viewer *User) bool { + return u.isVisibleToUser(x, viewer) +} + +func (u *User) isVisibleToUser(e Engine, viewer *User) bool { + if viewer != nil && viewer.IsAdmin { + return true + } + + switch u.Visibility { + case structs.VisibleTypePublic: + return true + case structs.VisibleTypeLimited: + if viewer == nil || viewer.IsRestricted { + return false + } + return true + case structs.VisibleTypePrivate: + if viewer == nil || viewer.IsRestricted { + return false + } + + // If they follow - they see each over + follower := IsFollowing(u.ID, viewer.ID) + if follower { + return true + } + + // Now we need to check if they in some organization together + count, err := x.Table("team_user"). + Where( + builder.And( + builder.Eq{"uid": viewer.ID}, + builder.Or( + builder.Eq{"org_id": u.ID}, + builder.In("org_id", + builder.Select("org_id"). + From("team_user", "t2"). + Where(builder.Eq{"uid": u.ID}))))). + Count(new(TeamUser)) + if err != nil { + return false + } + + if count < 0 { + // No common organization + return false + } + + // they are in an organization together + return true + } + return false +} + // IsOrganization returns true if user is actually a organization. func (u *User) IsOrganization() bool { return u.Type == UserTypeOrganization @@ -602,58 +656,6 @@ func (u *User) GetOwnedOrganizations() (err error) { return err } -// GetOrganizations returns paginated organizations that user belongs to. -// TODO: does not respect All and show orgs you privately participate -func (u *User) GetOrganizations(opts *SearchOrganizationsOptions) error { - sess := x.NewSession() - defer sess.Close() - - schema, err := x.TableInfo(new(User)) - if err != nil { - return err - } - groupByCols := &strings.Builder{} - for _, col := range schema.Columns() { - fmt.Fprintf(groupByCols, "`%s`.%s,", schema.Name, col.Name) - } - groupByStr := groupByCols.String() - groupByStr = groupByStr[0 : len(groupByStr)-1] - - sess.Select("`user`.*, count(repo_id) as org_count"). - Table("user"). - Join("INNER", "org_user", "`org_user`.org_id=`user`.id"). - Join("LEFT", builder. - Select("id as repo_id, owner_id as repo_owner_id"). - From("repository"). - Where(accessibleRepositoryCondition(u)), "`repository`.repo_owner_id = `org_user`.org_id"). - And("`org_user`.uid=?", u.ID). - GroupBy(groupByStr) - if opts.PageSize != 0 { - sess = opts.setSessionPagination(sess) - } - type OrgCount struct { - User `xorm:"extends"` - OrgCount int - } - orgCounts := make([]*OrgCount, 0, 10) - - if err := sess. - Asc("`user`.name"). - Find(&orgCounts); err != nil { - return err - } - - orgs := make([]*User, len(orgCounts)) - for i, orgCount := range orgCounts { - orgCount.User.NumRepos = orgCount.OrgCount - orgs[i] = &orgCount.User - } - - u.Orgs = orgs - - return nil -} - // DisplayName returns full name if it's not empty, // returns username otherwise. func (u *User) DisplayName() string { @@ -741,7 +743,7 @@ func IsUserExist(uid int64, name string) (bool, error) { // GetUserSalt returns a random user salt token. func GetUserSalt() (string, error) { - return generate.GetRandomString(10) + return util.RandomString(10) } // NewGhostUser creates and returns a fake user for someone has deleted his/her account. @@ -771,7 +773,7 @@ func (u *User) IsGhost() bool { } var ( - reservedUsernames = append([]string{ + reservedUsernames = []string{ ".", "..", ".well-known", @@ -780,10 +782,12 @@ var ( "assets", "attachments", "avatars", + "captcha", "commits", "debug", "error", "explore", + "favicon.ico", "ghost", "help", "install", @@ -802,12 +806,13 @@ var ( "repo", "robots.txt", "search", + "serviceworker.js", "stars", "template", "user", - }, public.KnownPublicEntries...) + } - reservedUserPatterns = []string{"*.keys", "*.gpg"} + reservedUserPatterns = []string{"*.keys", "*.gpg", "*.rss", "*.atom"} ) // isUsableName checks if name is reserved or pattern of name is not allowed @@ -845,18 +850,42 @@ func IsUsableUsername(name string) error { return isUsableName(reservedUsernames, reservedUserPatterns, name) } +// CreateUserOverwriteOptions are an optional options who overwrite system defaults on user creation +type CreateUserOverwriteOptions struct { + Visibility structs.VisibleType +} + // CreateUser creates record of a new user. -func CreateUser(u *User) (err error) { +func CreateUser(u *User, overwriteDefault ...*CreateUserOverwriteOptions) (err error) { if err = IsUsableUsername(u.Name); err != nil { return err } + // set system defaults + u.KeepEmailPrivate = setting.Service.DefaultKeepEmailPrivate + u.Visibility = setting.Service.DefaultUserVisibilityMode + u.AllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization && !setting.Admin.DisableRegularOrgCreation + u.EmailNotificationsPreference = setting.Admin.DefaultEmailNotification + u.MaxRepoCreation = -1 + u.Theme = setting.UI.DefaultTheme + + // overwrite defaults if set + if len(overwriteDefault) != 0 && overwriteDefault[0] != nil { + u.Visibility = overwriteDefault[0].Visibility + } + sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { return err } + // validate data + + if err := validateUser(u); err != nil { + return err + } + isExist, err := isUserExist(sess, 0, u.Name) if err != nil { return err @@ -864,20 +893,6 @@ func CreateUser(u *User) (err error) { return ErrUserAlreadyExist{u.Name} } - u.Email = strings.ToLower(u.Email) - isExist, err = sess. - Where("email=?", u.Email). - Get(new(User)) - if err != nil { - return err - } else if isExist { - return ErrEmailAlreadyUsed{u.Email} - } - - if err = ValidateEmail(u.Email); err != nil { - return err - } - isExist, err = isEmailUsed(sess, u.Email) if err != nil { return err @@ -885,7 +900,7 @@ func CreateUser(u *User) (err error) { return ErrEmailAlreadyUsed{u.Email} } - u.KeepEmailPrivate = setting.Service.DefaultKeepEmailPrivate + // prepare for database u.LowerName = strings.ToLower(u.Name) u.AvatarEmail = u.Email @@ -895,15 +910,28 @@ func CreateUser(u *User) (err error) { if err = u.SetPassword(u.Passwd); err != nil { return err } - u.AllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization && !setting.Admin.DisableRegularOrgCreation - u.EmailNotificationsPreference = setting.Admin.DefaultEmailNotification - u.MaxRepoCreation = -1 - u.Theme = setting.UI.DefaultTheme + + // save changes to database + + if err = deleteUserRedirect(sess, u.Name); err != nil { + return err + } if _, err = sess.Insert(u); err != nil { return err } + // insert email address + if _, err := sess.Insert(&EmailAddress{ + UID: u.ID, + Email: u.Email, + LowerEmail: strings.ToLower(u.Email), + IsActivated: u.IsActive, + IsPrimary: true, + }); err != nil { + return err + } + return sess.Commit() } @@ -974,6 +1002,7 @@ func VerifyActiveEmailCode(code, email string) *EmailAddress { // ChangeUserName changes all corresponding setting from old user name to new one. func ChangeUserName(u *User, newUserName string) (err error) { + oldUserName := u.Name if err = IsUsableUsername(newUserName); err != nil { return err } @@ -991,16 +1020,28 @@ func ChangeUserName(u *User, newUserName string) (err error) { return ErrUserAlreadyExist{newUserName} } - if _, err = sess.Exec("UPDATE `repository` SET owner_name=? WHERE owner_name=?", newUserName, u.Name); err != nil { + if _, err = sess.Exec("UPDATE `repository` SET owner_name=? WHERE owner_name=?", newUserName, oldUserName); err != nil { return fmt.Errorf("Change repo owner name: %v", err) } // Do not fail if directory does not exist - if err = os.Rename(UserPath(u.Name), UserPath(newUserName)); err != nil && !os.IsNotExist(err) { + if err = util.Rename(UserPath(oldUserName), UserPath(newUserName)); err != nil && !os.IsNotExist(err) { return fmt.Errorf("Rename user directory: %v", err) } - return sess.Commit() + if err = newUserRedirect(sess, u.ID, oldUserName, newUserName); err != nil { + return err + } + + if err = sess.Commit(); err != nil { + if err2 := util.Rename(UserPath(newUserName), UserPath(oldUserName)); err2 != nil && !os.IsNotExist(err2) { + log.Critical("Unable to rollback directory change during failed username change from: %s to: %s. DB Error: %v. Filesystem Error: %v", oldUserName, newUserName, err, err2) + return fmt.Errorf("failed to rollback directory change during failed username change from: %s to: %s. DB Error: %w. Filesystem Error: %v", oldUserName, newUserName, err, err2) + } + return err + } + + return nil } // checkDupEmail checks whether there are the same email with the user @@ -1019,12 +1060,22 @@ func checkDupEmail(e Engine, u *User) error { return nil } -func updateUser(e Engine, u *User) (err error) { +// validateUser check if user is valide to insert / update into database +func validateUser(u *User) error { + if !setting.Service.AllowedUserVisibilityModesSlice.IsAllowedVisibility(u.Visibility) { + return fmt.Errorf("visibility Mode not allowed: %s", u.Visibility.String()) + } + u.Email = strings.ToLower(u.Email) - if err = ValidateEmail(u.Email); err != nil { + return ValidateEmail(u.Email) +} + +func updateUser(e Engine, u *User) error { + if err := validateUser(u); err != nil { return err } - _, err = e.ID(u.ID).AllCols().Update(u) + + _, err := e.ID(u.ID).AllCols().Update(u) return err } @@ -1039,6 +1090,10 @@ func UpdateUserCols(u *User, cols ...string) error { } func updateUserCols(e Engine, u *User, cols ...string) error { + if err := validateUser(u); err != nil { + return err + } + _, err := e.ID(u.ID).Cols(cols...).Update(u) return err } @@ -1071,8 +1126,7 @@ func deleteBeans(e Engine, beans ...interface{}) (err error) { return nil } -// FIXME: need some kind of mechanism to record failure. HINT: system notice -func deleteUser(e *xorm.Session, u *User) error { +func deleteUser(e Engine, u *User) error { // Note: A user owns any repository or belongs to any organization // cannot perform delete operation. @@ -1151,6 +1205,33 @@ func deleteUser(e *xorm.Session, u *User) error { return fmt.Errorf("deleteBeans: %v", err) } + if setting.Service.UserDeleteWithCommentsMaxTime != 0 && + u.CreatedUnix.AsTime().Add(setting.Service.UserDeleteWithCommentsMaxTime).After(time.Now()) { + + // Delete Comments + const batchSize = 50 + for start := 0; ; start += batchSize { + comments := make([]*Comment, 0, batchSize) + if err = e.Where("type=? AND poster_id=?", CommentTypeComment, u.ID).Limit(batchSize, start).Find(&comments); err != nil { + return err + } + if len(comments) == 0 { + break + } + + for _, comment := range comments { + if err = deleteComment(e, comment); err != nil { + return err + } + } + } + + // Delete Reactions + if err = deleteReaction(e, &ReactionOptions{Doer: u}); err != nil { + return err + } + } + // ***** START: PublicKey ***** if _, err = e.Delete(&PublicKey{OwnerID: u.ID}); err != nil { return fmt.Errorf("deletePublicKeys: %v", err) @@ -1166,6 +1247,16 @@ func deleteUser(e *xorm.Session, u *User) error { // ***** END: PublicKey ***** // ***** START: GPGPublicKey ***** + keys, err := listGPGKeys(e, u.ID, ListOptions{}) + if err != nil { + return fmt.Errorf("ListGPGKeys: %v", err) + } + // Delete GPGKeyImport(s). + for _, key := range keys { + if _, err = e.Delete(&GPGKeyImport{KeyID: key.KeyID}); err != nil { + return fmt.Errorf("deleteGPGKeyImports: %v", err) + } + } if _, err = e.Delete(&GPGKey{OwnerID: u.ID}); err != nil { return fmt.Errorf("deleteGPGKeys: %v", err) } @@ -1186,18 +1277,21 @@ func deleteUser(e *xorm.Session, u *User) error { return fmt.Errorf("Delete: %v", err) } - // FIXME: system notice // Note: There are something just cannot be roll back, // so just keep error logs of those operations. path := UserPath(u.Name) - if err := util.RemoveAll(path); err != nil { - return fmt.Errorf("Failed to RemoveAll %s: %v", path, err) + if err = util.RemoveAll(path); err != nil { + err = fmt.Errorf("Failed to RemoveAll %s: %v", path, err) + _ = createNotice(e, NoticeTask, fmt.Sprintf("delete user '%s': %v", u.Name, err)) + return err } if len(u.Avatar) > 0 { avatarPath := u.CustomAvatarRelativePath() - if err := storage.Avatars.Delete(avatarPath); err != nil { - return fmt.Errorf("Failed to remove %s: %v", avatarPath, err) + if err = storage.Avatars.Delete(avatarPath); err != nil { + err = fmt.Errorf("Failed to remove %s: %v", avatarPath, err) + _ = createNotice(e, NoticeTask, fmt.Sprintf("delete user '%s': %v", u.Name, err)) + return err } } @@ -1205,7 +1299,8 @@ func deleteUser(e *xorm.Session, u *User) error { } // DeleteUser completely and permanently deletes everything of a user, -// but issues/comments/pulls will be kept and shown as someone has been deleted. +// but issues/comments/pulls will be kept and shown as someone has been deleted, +// unless the user is younger than USER_DELETE_WITH_COMMENTS_MAX_DAYS. func DeleteUser(u *User) (err error) { if u.IsOrganization() { return fmt.Errorf("%s is an organization not a user", u.Name) @@ -1240,7 +1335,6 @@ func DeleteInactiveUsers(ctx context.Context, olderThan time.Duration) (err erro Find(&users); err != nil { return fmt.Errorf("get all inactive users: %v", err) } - } // FIXME: should only update authorized_keys file once after all deletions. for _, u := range users { @@ -1388,6 +1482,13 @@ func GetUserIDsByNames(names []string, ignoreNonExistent bool) ([]int64, error) return ids, nil } +// GetUsersBySource returns a list of Users for a login source +func GetUsersBySource(s *LoginSource) ([]*User, error) { + var users []*User + err := x.Where("login_type = ? AND login_source = ?", s.Type, s.ID).Find(&users) + return users, err +} + // UserCommit represents a commit with validation of user. type UserCommit struct { User *User @@ -1407,16 +1508,13 @@ func ValidateCommitWithEmail(c *git.Commit) *User { } // ValidateCommitsWithEmails checks if authors' e-mails of commits are corresponding to users. -func ValidateCommitsWithEmails(oldCommits *list.List) *list.List { +func ValidateCommitsWithEmails(oldCommits []*git.Commit) []*UserCommit { var ( - u *User - emails = map[string]*User{} - newCommits = list.New() - e = oldCommits.Front() + emails = make(map[string]*User) + newCommits = make([]*UserCommit, 0, len(oldCommits)) ) - for e != nil { - c := e.Value.(*git.Commit) - + for _, c := range oldCommits { + var u *User if c.Author != nil { if v, ok := emails[c.Author.Email]; !ok { u, _ = GetUserByEmail(c.Author.Email) @@ -1424,15 +1522,12 @@ func ValidateCommitsWithEmails(oldCommits *list.List) *list.List { } else { u = v } - } else { - u = nil } - newCommits.PushBack(UserCommit{ + newCommits = append(newCommits, &UserCommit{ User: u, Commit: c, }) - e = e.Next() } return newCommits } @@ -1505,7 +1600,6 @@ type SearchUserOptions struct { func (opts *SearchUserOptions) toConds() builder.Cond { var cond builder.Cond = builder.Eq{"type": opts.Type} - if len(opts.Keyword) > 0 { lowerKeyword := strings.ToLower(opts.Keyword) keywordCond := builder.Or( @@ -1519,31 +1613,35 @@ func (opts *SearchUserOptions) toConds() builder.Cond { cond = cond.And(keywordCond) } + // If visibility filtered if len(opts.Visible) > 0 { cond = cond.And(builder.In("visibility", opts.Visible)) - } else { - cond = cond.And(builder.In("visibility", structs.VisibleTypePublic)) } if opts.Actor != nil { - var exprCond builder.Cond - if setting.Database.UseMySQL { - exprCond = builder.Expr("org_user.org_id = user.id") - } else if setting.Database.UseMSSQL { - exprCond = builder.Expr("org_user.org_id = [user].id") - } else { - exprCond = builder.Expr("org_user.org_id = \"user\".id") + var exprCond builder.Cond = builder.Expr("org_user.org_id = `user`.id") + + // If Admin - they see all users! + if !opts.Actor.IsAdmin { + // Force visibility for privacy + var accessCond builder.Cond + if !opts.Actor.IsRestricted { + accessCond = builder.Or( + builder.In("id", builder.Select("org_id").From("org_user").LeftJoin("`user`", exprCond).Where(builder.And(builder.Eq{"uid": opts.Actor.ID}, builder.Eq{"visibility": structs.VisibleTypePrivate}))), + builder.In("visibility", structs.VisibleTypePublic, structs.VisibleTypeLimited)) + } else { + // restricted users only see orgs they are a member of + accessCond = builder.In("id", builder.Select("org_id").From("org_user").LeftJoin("`user`", exprCond).Where(builder.And(builder.Eq{"uid": opts.Actor.ID}))) + } + // Don't forget about self + accessCond = accessCond.Or(builder.Eq{"id": opts.Actor.ID}) + cond = cond.And(accessCond) } - var accessCond = builder.NewCond() - if !opts.Actor.IsRestricted { - accessCond = builder.Or( - builder.In("id", builder.Select("org_id").From("org_user").LeftJoin("`user`", exprCond).Where(builder.And(builder.Eq{"uid": opts.Actor.ID}, builder.Eq{"visibility": structs.VisibleTypePrivate}))), - builder.In("visibility", structs.VisibleTypePublic, structs.VisibleTypeLimited)) - } else { - // restricted users only see orgs they are a member of - accessCond = builder.In("id", builder.Select("org_id").From("org_user").LeftJoin("`user`", exprCond).Where(builder.And(builder.Eq{"uid": opts.Actor.ID}))) - } - cond = cond.And(accessCond) + + } else { + // Force visibility for privacy + // Not logged in - only public users + cond = cond.And(builder.In("visibility", structs.VisibleTypePublic)) } if opts.UID > 0 { @@ -1599,7 +1697,7 @@ func GetStarredRepos(userID int64, private bool, listOptions ListOptions) ([]*Re } // GetWatchedRepos returns the repos watched by a particular user -func GetWatchedRepos(userID int64, private bool, listOptions ListOptions) ([]*Repository, error) { +func GetWatchedRepos(userID int64, private bool, listOptions ListOptions) ([]*Repository, int64, error) { sess := x.Where("watch.user_id=?", userID). And("`watch`.mode<>?", RepoWatchModeDont). Join("LEFT", "watch", "`repository`.id=`watch`.repo_id") @@ -1611,352 +1709,21 @@ func GetWatchedRepos(userID int64, private bool, listOptions ListOptions) ([]*Re sess = listOptions.setSessionPagination(sess) repos := make([]*Repository, 0, listOptions.PageSize) - return repos, sess.Find(&repos) + total, err := sess.FindAndCount(&repos) + return repos, total, err } repos := make([]*Repository, 0, 10) - return repos, sess.Find(&repos) -} - -// deleteKeysMarkedForDeletion returns true if ssh keys needs update -func deleteKeysMarkedForDeletion(keys []string) (bool, error) { - // Start session - sess := x.NewSession() - defer sess.Close() - if err := sess.Begin(); err != nil { - return false, err - } - - // Delete keys marked for deletion - var sshKeysNeedUpdate bool - for _, KeyToDelete := range keys { - key, err := searchPublicKeyByContentWithEngine(sess, KeyToDelete) - if err != nil { - log.Error("SearchPublicKeyByContent: %v", err) - continue - } - if err = deletePublicKeys(sess, key.ID); err != nil { - log.Error("deletePublicKeys: %v", err) - continue - } - sshKeysNeedUpdate = true - } - - if err := sess.Commit(); err != nil { - return false, err - } - - return sshKeysNeedUpdate, nil -} - -// addLdapSSHPublicKeys add a users public keys. Returns true if there are changes. -func addLdapSSHPublicKeys(usr *User, s *LoginSource, sshPublicKeys []string) bool { - var sshKeysNeedUpdate bool - for _, sshKey := range sshPublicKeys { - var err error - found := false - keys := []byte(sshKey) - loop: - for len(keys) > 0 && err == nil { - var out ssh.PublicKey - // We ignore options as they are not relevant to Gitea - out, _, _, keys, err = ssh.ParseAuthorizedKey(keys) - if err != nil { - break loop - } - found = true - marshalled := string(ssh.MarshalAuthorizedKey(out)) - marshalled = marshalled[:len(marshalled)-1] - sshKeyName := fmt.Sprintf("%s-%s", s.Name, ssh.FingerprintSHA256(out)) - - if _, err := AddPublicKey(usr.ID, sshKeyName, marshalled, s.ID); err != nil { - if IsErrKeyAlreadyExist(err) { - log.Trace("addLdapSSHPublicKeys[%s]: LDAP Public SSH Key %s already exists for user", sshKeyName, usr.Name) - } else { - log.Error("addLdapSSHPublicKeys[%s]: Error adding LDAP Public SSH Key for user %s: %v", sshKeyName, usr.Name, err) - } - } else { - log.Trace("addLdapSSHPublicKeys[%s]: Added LDAP Public SSH Key for user %s", sshKeyName, usr.Name) - sshKeysNeedUpdate = true - } - } - if !found && err != nil { - log.Warn("addLdapSSHPublicKeys[%s]: Skipping invalid LDAP Public SSH Key for user %s: %v", s.Name, usr.Name, sshKey) - } - } - return sshKeysNeedUpdate -} - -// synchronizeLdapSSHPublicKeys updates a users public keys. Returns true if there are changes. -func synchronizeLdapSSHPublicKeys(usr *User, s *LoginSource, sshPublicKeys []string) bool { - var sshKeysNeedUpdate bool - - log.Trace("synchronizeLdapSSHPublicKeys[%s]: Handling LDAP Public SSH Key synchronization for user %s", s.Name, usr.Name) - - // Get Public Keys from DB with current LDAP source - var giteaKeys []string - keys, err := ListPublicLdapSSHKeys(usr.ID, s.ID) - if err != nil { - log.Error("synchronizeLdapSSHPublicKeys[%s]: Error listing LDAP Public SSH Keys for user %s: %v", s.Name, usr.Name, err) - } - - for _, v := range keys { - giteaKeys = append(giteaKeys, v.OmitEmail()) - } - - // Get Public Keys from LDAP and skip duplicate keys - var ldapKeys []string - for _, v := range sshPublicKeys { - sshKeySplit := strings.Split(v, " ") - if len(sshKeySplit) > 1 { - ldapKey := strings.Join(sshKeySplit[:2], " ") - if !util.ExistsInSlice(ldapKey, ldapKeys) { - ldapKeys = append(ldapKeys, ldapKey) - } - } - } - - // Check if Public Key sync is needed - if util.IsEqualSlice(giteaKeys, ldapKeys) { - log.Trace("synchronizeLdapSSHPublicKeys[%s]: LDAP Public Keys are already in sync for %s (LDAP:%v/DB:%v)", s.Name, usr.Name, len(ldapKeys), len(giteaKeys)) - return false - } - log.Trace("synchronizeLdapSSHPublicKeys[%s]: LDAP Public Key needs update for user %s (LDAP:%v/DB:%v)", s.Name, usr.Name, len(ldapKeys), len(giteaKeys)) - - // Add LDAP Public SSH Keys that doesn't already exist in DB - var newLdapSSHKeys []string - for _, LDAPPublicSSHKey := range ldapKeys { - if !util.ExistsInSlice(LDAPPublicSSHKey, giteaKeys) { - newLdapSSHKeys = append(newLdapSSHKeys, LDAPPublicSSHKey) - } - } - if addLdapSSHPublicKeys(usr, s, newLdapSSHKeys) { - sshKeysNeedUpdate = true - } - - // Mark LDAP keys from DB that doesn't exist in LDAP for deletion - var giteaKeysToDelete []string - for _, giteaKey := range giteaKeys { - if !util.ExistsInSlice(giteaKey, ldapKeys) { - log.Trace("synchronizeLdapSSHPublicKeys[%s]: Marking LDAP Public SSH Key for deletion for user %s: %v", s.Name, usr.Name, giteaKey) - giteaKeysToDelete = append(giteaKeysToDelete, giteaKey) - } - } - - // Delete LDAP keys from DB that doesn't exist in LDAP - needUpd, err := deleteKeysMarkedForDeletion(giteaKeysToDelete) - if err != nil { - log.Error("synchronizeLdapSSHPublicKeys[%s]: Error deleting LDAP Public SSH Keys marked for deletion for user %s: %v", s.Name, usr.Name, err) - } - if needUpd { - sshKeysNeedUpdate = true - } - - return sshKeysNeedUpdate -} - -// SyncExternalUsers is used to synchronize users with external authorization source -func SyncExternalUsers(ctx context.Context, updateExisting bool) error { - log.Trace("Doing: SyncExternalUsers") - - ls, err := LoginSources() - if err != nil { - log.Error("SyncExternalUsers: %v", err) - return err - } - - for _, s := range ls { - if !s.IsActived || !s.IsSyncEnabled { - continue - } - select { - case <-ctx.Done(): - log.Warn("SyncExternalUsers: Cancelled before update of %s", s.Name) - return ErrCancelledf("Before update of %s", s.Name) - default: - } - - if s.IsLDAP() { - log.Trace("Doing: SyncExternalUsers[%s]", s.Name) - - var existingUsers []int64 - var isAttributeSSHPublicKeySet = len(strings.TrimSpace(s.LDAP().AttributeSSHPublicKey)) > 0 - var sshKeysNeedUpdate bool - - // Find all users with this login type - var users []*User - err = x.Where("login_type = ?", LoginLDAP). - And("login_source = ?", s.ID). - Find(&users) - if err != nil { - log.Error("SyncExternalUsers: %v", err) - return err - } - select { - case <-ctx.Done(): - log.Warn("SyncExternalUsers: Cancelled before update of %s", s.Name) - return ErrCancelledf("Before update of %s", s.Name) - default: - } - - sr, err := s.LDAP().SearchEntries() - if err != nil { - log.Error("SyncExternalUsers LDAP source failure [%s], skipped", s.Name) - continue - } - - if len(sr) == 0 { - if !s.LDAP().AllowDeactivateAll { - log.Error("LDAP search found no entries but did not report an error. Refusing to deactivate all users") - continue - } else { - log.Warn("LDAP search found no entries but did not report an error. All users will be deactivated as per settings") - } - } - - for _, su := range sr { - select { - case <-ctx.Done(): - log.Warn("SyncExternalUsers: Cancelled at update of %s before completed update of users", s.Name) - // Rewrite authorized_keys file if LDAP Public SSH Key attribute is set and any key was added or removed - if sshKeysNeedUpdate { - err = RewriteAllPublicKeys() - if err != nil { - log.Error("RewriteAllPublicKeys: %v", err) - } - } - return ErrCancelledf("During update of %s before completed update of users", s.Name) - default: - } - if len(su.Username) == 0 { - continue - } - - if len(su.Mail) == 0 { - su.Mail = fmt.Sprintf("%s@localhost", su.Username) - } - - var usr *User - // Search for existing user - for _, du := range users { - if du.LowerName == strings.ToLower(su.Username) { - usr = du - break - } - } - - fullName := composeFullName(su.Name, su.Surname, su.Username) - // If no existing user found, create one - if usr == nil { - log.Trace("SyncExternalUsers[%s]: Creating user %s", s.Name, su.Username) - - usr = &User{ - LowerName: strings.ToLower(su.Username), - Name: su.Username, - FullName: fullName, - LoginType: s.Type, - LoginSource: s.ID, - LoginName: su.Username, - Email: su.Mail, - IsAdmin: su.IsAdmin, - IsRestricted: su.IsRestricted, - IsActive: true, - } - - err = CreateUser(usr) - - if err != nil { - log.Error("SyncExternalUsers[%s]: Error creating user %s: %v", s.Name, su.Username, err) - } else if isAttributeSSHPublicKeySet { - log.Trace("SyncExternalUsers[%s]: Adding LDAP Public SSH Keys for user %s", s.Name, usr.Name) - if addLdapSSHPublicKeys(usr, s, su.SSHPublicKey) { - sshKeysNeedUpdate = true - } - } - } else if updateExisting { - existingUsers = append(existingUsers, usr.ID) - - // Synchronize SSH Public Key if that attribute is set - if isAttributeSSHPublicKeySet && synchronizeLdapSSHPublicKeys(usr, s, su.SSHPublicKey) { - sshKeysNeedUpdate = true - } - - // Check if user data has changed - if (len(s.LDAP().AdminFilter) > 0 && usr.IsAdmin != su.IsAdmin) || - (len(s.LDAP().RestrictedFilter) > 0 && usr.IsRestricted != su.IsRestricted) || - !strings.EqualFold(usr.Email, su.Mail) || - usr.FullName != fullName || - !usr.IsActive { - - log.Trace("SyncExternalUsers[%s]: Updating user %s", s.Name, usr.Name) - - usr.FullName = fullName - usr.Email = su.Mail - // Change existing admin flag only if AdminFilter option is set - if len(s.LDAP().AdminFilter) > 0 { - usr.IsAdmin = su.IsAdmin - } - // Change existing restricted flag only if RestrictedFilter option is set - if !usr.IsAdmin && len(s.LDAP().RestrictedFilter) > 0 { - usr.IsRestricted = su.IsRestricted - } - usr.IsActive = true - - err = UpdateUserCols(usr, "full_name", "email", "is_admin", "is_restricted", "is_active") - if err != nil { - log.Error("SyncExternalUsers[%s]: Error updating user %s: %v", s.Name, usr.Name, err) - } - } - } - } - - // Rewrite authorized_keys file if LDAP Public SSH Key attribute is set and any key was added or removed - if sshKeysNeedUpdate { - err = RewriteAllPublicKeys() - if err != nil { - log.Error("RewriteAllPublicKeys: %v", err) - } - } - - select { - case <-ctx.Done(): - log.Warn("SyncExternalUsers: Cancelled during update of %s before delete users", s.Name) - return ErrCancelledf("During update of %s before delete users", s.Name) - default: - } - - // Deactivate users not present in LDAP - if updateExisting { - for _, usr := range users { - found := false - for _, uid := range existingUsers { - if usr.ID == uid { - found = true - break - } - } - if !found { - log.Trace("SyncExternalUsers[%s]: Deactivating user %s", s.Name, usr.Name) - - usr.IsActive = false - err = UpdateUserCols(usr, "is_active") - if err != nil { - log.Error("SyncExternalUsers[%s]: Error deactivating user %s: %v", s.Name, usr.Name, err) - } - } - } - } - } - } - return nil + total, err := sess.FindAndCount(&repos) + return repos, total, err } // IterateUser iterate users func IterateUser(f func(user *User) error) error { var start int - var batchSize = setting.Database.IterateBufferSize + batchSize := setting.Database.IterateBufferSize for { - var users = make([]*User, 0, batchSize) + users := make([]*User, 0, batchSize) if err := x.Limit(batchSize, start).Find(&users); err != nil { return err } diff --git a/models/user_avatar.go b/models/user_avatar.go index 1e9f0e2da..d336684a2 100644 --- a/models/user_avatar.go +++ b/models/user_avatar.go @@ -63,7 +63,7 @@ func (u *User) generateRandomAvatar(e Engine) error { // the local explore page. Function returns immediately. // When applicable, the link is for an avatar of the indicated size (in pixels). func (u *User) SizedRelAvatarLink(size int) string { - return strings.TrimSuffix(setting.AppSubURL, "/") + "/user/avatar/" + u.Name + "/" + strconv.Itoa(size) + return setting.AppSubURL + "/user/avatar/" + u.Name + "/" + strconv.Itoa(size) } // RealSizedAvatarLink returns a link to the user's avatar. When @@ -82,6 +82,9 @@ func (u *User) RealSizedAvatarLink(size int) string { if u.Avatar == "" { return DefaultAvatarLink() } + if size > 0 { + return setting.AppSubURL + "/avatars/" + u.Avatar + "?size=" + strconv.Itoa(size) + } return setting.AppSubURL + "/avatars/" + u.Avatar case setting.DisableGravatar, setting.OfflineMode: if u.Avatar == "" { @@ -89,7 +92,9 @@ func (u *User) RealSizedAvatarLink(size int) string { log.Error("GenerateRandomAvatar: %v", err) } } - + if size > 0 { + return setting.AppSubURL + "/avatars/" + u.Avatar + "?size=" + strconv.Itoa(size) + } return setting.AppSubURL + "/avatars/" + u.Avatar } return SizedAvatarLink(u.AvatarEmail, size) diff --git a/models/user_heatmap.go b/models/user_heatmap.go index f51824911..306bd1819 100644 --- a/models/user_heatmap.go +++ b/models/user_heatmap.go @@ -16,7 +16,7 @@ type UserHeatmapData struct { } // GetUserHeatmapDataByUser returns an array of UserHeatmapData -func GetUserHeatmapDataByUser(user *User, doer *User) ([]*UserHeatmapData, error) { +func GetUserHeatmapDataByUser(user, doer *User) ([]*UserHeatmapData, error) { return getUserHeatmapData(user, nil, doer) } @@ -32,17 +32,14 @@ func getUserHeatmapData(user *User, team *Team, doer *User) ([]*UserHeatmapData, return hdata, nil } - var groupBy string - var groupByName = "timestamp" // We need this extra case because mssql doesn't allow grouping by alias + // Group by 15 minute intervals which will allow the client to accurately shift the timestamp to their timezone. + // The interval is based on the fact that there are timezones such as UTC +5:30 and UTC +12:45. + groupBy := "created_unix / 900 * 900" + groupByName := "timestamp" // We need this extra case because mssql doesn't allow grouping by alias switch { - case setting.Database.UseSQLite3: - groupBy = "strftime('%s', strftime('%Y-%m-%d', created_unix, 'unixepoch'))" case setting.Database.UseMySQL: - groupBy = "UNIX_TIMESTAMP(DATE(FROM_UNIXTIME(created_unix)))" - case setting.Database.UsePostgreSQL: - groupBy = "extract(epoch from date_trunc('day', to_timestamp(created_unix)))" + groupBy = "created_unix DIV 900 * 900" case setting.Database.UseMSSQL: - groupBy = "datediff(SECOND, '19700101', dateadd(DAY, 0, datediff(day, 0, dateadd(s, created_unix, '19700101'))))" groupByName = groupBy } @@ -65,7 +62,7 @@ func getUserHeatmapData(user *User, team *Team, doer *User) ([]*UserHeatmapData, Select(groupBy+" AS timestamp, count(user_id) as contributions"). Table("action"). Where(cond). - And("created_unix > ?", (timeutil.TimeStampNow() - 31536000)). + And("created_unix > ?", timeutil.TimeStampNow()-31536000). GroupBy(groupByName). OrderBy("timestamp"). Find(&hdata) diff --git a/models/user_heatmap_test.go b/models/user_heatmap_test.go index d98c4c63e..bdf776665 100644 --- a/models/user_heatmap_test.go +++ b/models/user_heatmap_test.go @@ -5,10 +5,11 @@ package models import ( - "encoding/json" "fmt" "testing" + "code.gitea.io/gitea/modules/json" + "github.com/stretchr/testify/assert" ) @@ -19,12 +20,20 @@ func TestGetUserHeatmapDataByUser(t *testing.T) { CountResult int JSONResult string }{ - {2, 2, 1, `[{"timestamp":1603152000,"contributions":1}]`}, // self looks at action in private repo - {2, 1, 1, `[{"timestamp":1603152000,"contributions":1}]`}, // admin looks at action in private repo - {2, 3, 0, `[]`}, // other user looks at action in private repo - {2, 0, 0, `[]`}, // nobody looks at action in private repo - {16, 15, 1, `[{"timestamp":1603238400,"contributions":1}]`}, // collaborator looks at action in private repo - {3, 3, 0, `[]`}, // no action action not performed by target user + // self looks at action in private repo + {2, 2, 1, `[{"timestamp":1603227600,"contributions":1}]`}, + // admin looks at action in private repo + {2, 1, 1, `[{"timestamp":1603227600,"contributions":1}]`}, + // other user looks at action in private repo + {2, 3, 0, `[]`}, + // nobody looks at action in private repo + {2, 0, 0, `[]`}, + // collaborator looks at action in private repo + {16, 15, 1, `[{"timestamp":1603267200,"contributions":1}]`}, + // no action action not performed by target user + {3, 3, 0, `[]`}, + // multiple actions performed with two grouped together + {10, 10, 3, `[{"timestamp":1603009800,"contributions":1},{"timestamp":1603010700,"contributions":2}]`}, } // Prepare assert.NoError(t, PrepareTestDatabase()) @@ -51,11 +60,15 @@ func TestGetUserHeatmapDataByUser(t *testing.T) { // Get the heatmap and compare heatmap, err := GetUserHeatmapDataByUser(user, doer) + var contributions int + for _, hm := range heatmap { + contributions += int(hm.Contributions) + } assert.NoError(t, err) - assert.Equal(t, len(actions), len(heatmap), "invalid action count: did the test data became too old?") - assert.Equal(t, tc.CountResult, len(heatmap), fmt.Sprintf("testcase %d", i)) + assert.Len(t, actions, contributions, "invalid action count: did the test data became too old?") + assert.Equal(t, tc.CountResult, contributions, fmt.Sprintf("testcase %d", i)) - //Test JSON rendering + // Test JSON rendering jsonData, err := json.Marshal(heatmap) assert.NoError(t, err) assert.Equal(t, tc.JSONResult, string(jsonData)) diff --git a/models/user_mail.go b/models/user_mail.go index 1e56a5cd8..f8b084a00 100644 --- a/models/user_mail.go +++ b/models/user_mail.go @@ -6,7 +6,6 @@ package models import ( - "errors" "fmt" "net/mail" "strings" @@ -18,19 +17,22 @@ import ( "xorm.io/builder" ) -var ( - // ErrEmailAddressNotExist email address not exist - ErrEmailAddressNotExist = errors.New("Email address does not exist") -) - -// EmailAddress is the list of all email addresses of a user. Can contain the -// primary email address, but is not obligatory. +// EmailAddress is the list of all email addresses of a user. It also contains the +// primary email address which is saved in user table. type EmailAddress struct { ID int64 `xorm:"pk autoincr"` UID int64 `xorm:"INDEX NOT NULL"` Email string `xorm:"UNIQUE NOT NULL"` + LowerEmail string `xorm:"UNIQUE NOT NULL"` IsActivated bool - IsPrimary bool `xorm:"-"` + IsPrimary bool `xorm:"DEFAULT(false) NOT NULL"` +} + +// BeforeInsert will be invoked by XORM before inserting a record +func (email *EmailAddress) BeforeInsert() { + if email.LowerEmail == "" { + email.LowerEmail = strings.ToLower(email.Email) + } } // ValidateEmail check if email is a allowed address @@ -53,34 +55,10 @@ func GetEmailAddresses(uid int64) ([]*EmailAddress, error) { emails := make([]*EmailAddress, 0, 5) if err := x. Where("uid=?", uid). + Asc("id"). Find(&emails); err != nil { return nil, err } - - u, err := GetUserByID(uid) - if err != nil { - return nil, err - } - - isPrimaryFound := false - for _, email := range emails { - if email.Email == u.Email { - isPrimaryFound = true - email.IsPrimary = true - } else { - email.IsPrimary = false - } - } - - // We always want the primary email address displayed, even if it's not in - // the email address table (yet). - if !isPrimaryFound { - emails = append(emails, &EmailAddress{ - Email: u.Email, - IsActivated: u.IsActive, - IsPrimary: true, - }) - } return emails, nil } @@ -96,40 +74,24 @@ func GetEmailAddressByID(uid, id int64) (*EmailAddress, error) { return email, nil } -func isEmailActive(e Engine, email string, userID, emailID int64) (bool, error) { +// isEmailActive check if email is activated with a different emailID +func isEmailActive(e Engine, email string, excludeEmailID int64) (bool, error) { if len(email) == 0 { return true, nil } // Can't filter by boolean field unless it's explicit cond := builder.NewCond() - cond = cond.And(builder.Eq{"email": email}, builder.Neq{"id": emailID}) + cond = cond.And(builder.Eq{"lower_email": strings.ToLower(email)}, builder.Neq{"id": excludeEmailID}) if setting.Service.RegisterEmailConfirm { // Inactive (unvalidated) addresses don't count as active if email validation is required cond = cond.And(builder.Eq{"is_activated": true}) } - em := EmailAddress{} - + var em EmailAddress if has, err := e.Where(cond).Get(&em); has || err != nil { if has { - log.Info("isEmailActive('%s',%d,%d) found duplicate in email ID %d", email, userID, emailID, em.ID) - } - return has, err - } - - // Can't filter by boolean field unless it's explicit - cond = builder.NewCond() - cond = cond.And(builder.Eq{"email": email}, builder.Neq{"id": userID}) - if setting.Service.RegisterEmailConfirm { - cond = cond.And(builder.Eq{"is_active": true}) - } - - us := User{} - - if has, err := e.Where(cond).Get(&us); has || err != nil { - if has { - log.Info("isEmailActive('%s',%d,%d) found duplicate in user ID %d", email, userID, emailID, us.ID) + log.Info("isEmailActive(%q, %d) found duplicate in email ID %d", email, excludeEmailID, em.ID) } return has, err } @@ -142,7 +104,7 @@ func isEmailUsed(e Engine, email string) (bool, error) { return true, nil } - return e.Where("email=?", email).Get(&EmailAddress{}) + return e.Where("lower_email=?", strings.ToLower(email)).Get(&EmailAddress{}) } // IsEmailUsed returns true if the email has been used. @@ -151,7 +113,7 @@ func IsEmailUsed(email string) (bool, error) { } func addEmailAddress(e Engine, email *EmailAddress) error { - email.Email = strings.ToLower(strings.TrimSpace(email.Email)) + email.Email = strings.TrimSpace(email.Email) used, err := isEmailUsed(e, email.Email) if err != nil { return err @@ -180,7 +142,7 @@ func AddEmailAddresses(emails []*EmailAddress) error { // Check if any of them has been used for i := range emails { - emails[i].Email = strings.ToLower(strings.TrimSpace(emails[i].Email)) + emails[i].Email = strings.TrimSpace(emails[i].Email) used, err := IsEmailUsed(emails[i].Email) if err != nil { return err @@ -229,23 +191,30 @@ func (email *EmailAddress) updateActivation(e Engine, activate bool) error { // DeleteEmailAddress deletes an email address of given user. func DeleteEmailAddress(email *EmailAddress) (err error) { + if email.IsPrimary { + return ErrPrimaryEmailCannotDelete{Email: email.Email} + } + var deleted int64 // ask to check UID - var address = EmailAddress{ + address := EmailAddress{ UID: email.UID, } if email.ID > 0 { deleted, err = x.ID(email.ID).Delete(&address) } else { + if email.Email != "" && email.LowerEmail == "" { + email.LowerEmail = strings.ToLower(email.Email) + } deleted, err = x. - Where("email=?", email.Email). + Where("lower_email=?", email.LowerEmail). Delete(&address) } if err != nil { return err } else if deleted != 1 { - return ErrEmailAddressNotExist + return ErrEmailAddressNotExist{Email: email.Email} } return nil } @@ -267,7 +236,7 @@ func MakeEmailPrimary(email *EmailAddress) error { if err != nil { return err } else if !has { - return ErrEmailNotExist + return ErrEmailAddressNotExist{Email: email.Email} } if !email.IsActivated { @@ -282,32 +251,31 @@ func MakeEmailPrimary(email *EmailAddress) error { return ErrUserNotExist{email.UID, "", 0} } - // Make sure the former primary email doesn't disappear. - formerPrimaryEmail := &EmailAddress{UID: user.ID, Email: user.Email} - has, err = x.Get(formerPrimaryEmail) - if err != nil { - return err - } - sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { return err } - if !has { - formerPrimaryEmail.UID = user.ID - formerPrimaryEmail.IsActivated = user.IsActive - if _, err = sess.Insert(formerPrimaryEmail); err != nil { - return err - } - } - + // 1. Update user table user.Email = email.Email if _, err = sess.ID(user.ID).Cols("email").Update(user); err != nil { return err } + // 2. Update old primary email + if _, err = sess.Where("uid=? AND is_primary=?", email.UID, true).Cols("is_primary").Update(&EmailAddress{ + IsPrimary: false, + }); err != nil { + return err + } + + // 3. update new primary email + email.IsPrimary = true + if _, err = sess.ID(email.ID).Cols("is_primary").Update(email); err != nil { + return err + } + return sess.Commit() } @@ -320,10 +288,10 @@ func (s SearchEmailOrderBy) String() string { // Strings for sorting result const ( - SearchEmailOrderByEmail SearchEmailOrderBy = "emails.email ASC, is_primary DESC, sortid ASC" - SearchEmailOrderByEmailReverse SearchEmailOrderBy = "emails.email DESC, is_primary ASC, sortid DESC" - SearchEmailOrderByName SearchEmailOrderBy = "`user`.lower_name ASC, is_primary DESC, sortid ASC" - SearchEmailOrderByNameReverse SearchEmailOrderBy = "`user`.lower_name DESC, is_primary ASC, sortid DESC" + SearchEmailOrderByEmail SearchEmailOrderBy = "email_address.lower_email ASC, email_address.is_primary DESC, email_address.id ASC" + SearchEmailOrderByEmailReverse SearchEmailOrderBy = "email_address.lower_email DESC, email_address.is_primary ASC, email_address.id DESC" + SearchEmailOrderByName SearchEmailOrderBy = "`user`.lower_name ASC, email_address.is_primary DESC, email_address.id ASC" + SearchEmailOrderByNameReverse SearchEmailOrderBy = "`user`.lower_name DESC, email_address.is_primary ASC, email_address.id DESC" ) // SearchEmailOptions are options to search e-mail addresses for the admin panel @@ -349,54 +317,32 @@ type SearchEmailResult struct { // SearchEmails takes options i.e. keyword and part of email name to search, // it returns results in given range and number of total results. func SearchEmails(opts *SearchEmailOptions) ([]*SearchEmailResult, int64, error) { - // Unfortunately, UNION support for SQLite in xorm is currently broken, so we must - // build the SQL ourselves. - where := make([]string, 0, 5) - args := make([]interface{}, 0, 5) - - emailsSQL := "(SELECT id as sortid, uid, email, is_activated, 0 as is_primary " + - "FROM email_address " + - "UNION ALL " + - "SELECT id as sortid, id AS uid, email, is_active AS is_activated, 1 as is_primary " + - "FROM `user` " + - "WHERE type = ?) AS emails" - args = append(args, UserTypeIndividual) - + var cond builder.Cond = builder.Eq{"`user`.`type`": UserTypeIndividual} if len(opts.Keyword) > 0 { - // Note: % can be injected in the Keyword parameter, but it won't do any harm. - where = append(where, "(lower(`user`.full_name) LIKE ? OR `user`.lower_name LIKE ? OR emails.email LIKE ?)") likeStr := "%" + strings.ToLower(opts.Keyword) + "%" - args = append(args, likeStr) - args = append(args, likeStr) - args = append(args, likeStr) + cond = cond.And(builder.Or( + builder.Like{"lower(`user`.full_name)", likeStr}, + builder.Like{"`user`.lower_name", likeStr}, + builder.Like{"email_address.lower_email", likeStr}, + )) } switch { case opts.IsPrimary.IsTrue(): - where = append(where, "emails.is_primary = ?") - args = append(args, true) + cond = cond.And(builder.Eq{"email_address.is_primary": true}) case opts.IsPrimary.IsFalse(): - where = append(where, "emails.is_primary = ?") - args = append(args, false) + cond = cond.And(builder.Eq{"email_address.is_primary": false}) } switch { case opts.IsActivated.IsTrue(): - where = append(where, "emails.is_activated = ?") - args = append(args, true) + cond = cond.And(builder.Eq{"email_address.is_activated": true}) case opts.IsActivated.IsFalse(): - where = append(where, "emails.is_activated = ?") - args = append(args, false) + cond = cond.And(builder.Eq{"email_address.is_activated": false}) } - var whereStr string - if len(where) > 0 { - whereStr = "WHERE " + strings.Join(where, " AND ") - } - - joinSQL := "FROM " + emailsSQL + " INNER JOIN `user` ON `user`.id = emails.uid " + whereStr - - count, err := x.SQL("SELECT count(*) "+joinSQL, args...).Count() + count, err := x.Join("INNER", "`user`", "`user`.ID = email_address.uid"). + Where(cond).Count(new(EmailAddress)) if err != nil { return nil, 0, fmt.Errorf("Count: %v", err) } @@ -406,97 +352,71 @@ func SearchEmails(opts *SearchEmailOptions) ([]*SearchEmailResult, int64, error) orderby = SearchEmailOrderByEmail.String() } - querySQL := "SELECT emails.uid, emails.email, emails.is_activated, emails.is_primary, " + - "`user`.name, `user`.full_name " + joinSQL + " ORDER BY " + orderby - opts.setDefaultValues() - rows, err := x.SQL(querySQL, args...).Rows(new(SearchEmailResult)) - if err != nil { - return nil, 0, fmt.Errorf("Emails: %v", err) - } - - // Page manually because xorm can't handle Limit() with raw SQL - defer rows.Close() - emails := make([]*SearchEmailResult, 0, opts.PageSize) - skip := (opts.Page - 1) * opts.PageSize - - for rows.Next() { - var email SearchEmailResult - if err := rows.Scan(&email); err != nil { - return nil, 0, err - } - if skip > 0 { - skip-- - continue - } - emails = append(emails, &email) - if len(emails) == opts.PageSize { - break - } - } + err = x.Table("email_address"). + Select("email_address.*, `user`.name, `user`.full_name"). + Join("INNER", "`user`", "`user`.ID = email_address.uid"). + Where(cond). + OrderBy(orderby). + Limit(opts.PageSize, (opts.Page-1)*opts.PageSize). + Find(&emails) return emails, count, err } // ActivateUserEmail will change the activated state of an email address, -// either primary (in the user table) or secondary (in the email_address table) -func ActivateUserEmail(userID int64, email string, primary, activate bool) (err error) { +// either primary or secondary (all in the email_address table) +func ActivateUserEmail(userID int64, email string, activate bool) (err error) { sess := x.NewSession() defer sess.Close() if err = sess.Begin(); err != nil { return err } - if primary { - // Activate/deactivate a user's primary email address + + // Activate/deactivate a user's secondary email address + // First check if there's another user active with the same address + addr := EmailAddress{UID: userID, LowerEmail: strings.ToLower(email)} + if has, err := sess.Get(&addr); err != nil { + return err + } else if !has { + return fmt.Errorf("no such email: %d (%s)", userID, email) + } + if addr.IsActivated == activate { + // Already in the desired state; no action + return nil + } + if activate { + if used, err := isEmailActive(sess, email, addr.ID); err != nil { + return fmt.Errorf("unable to check isEmailActive() for %s: %v", email, err) + } else if used { + return ErrEmailAlreadyUsed{Email: email} + } + } + if err = addr.updateActivation(sess, activate); err != nil { + return fmt.Errorf("unable to updateActivation() for %d:%s: %w", addr.ID, addr.Email, err) + } + + // Activate/deactivate a user's primary email address and account + if addr.IsPrimary { user := User{ID: userID, Email: email} if has, err := sess.Get(&user); err != nil { return err } else if !has { - return fmt.Errorf("no such user: %d (%s)", userID, email) + return fmt.Errorf("no user with ID: %d and Email: %s", userID, email) } - if user.IsActive == activate { - // Already in the desired state; no action - return nil - } - if activate { - if used, err := isEmailActive(sess, email, userID, 0); err != nil { - return fmt.Errorf("isEmailActive(): %v", err) - } else if used { - return ErrEmailAlreadyUsed{Email: email} + // The user's activation state should be synchronized with the primary email + if user.IsActive != activate { + user.IsActive = activate + if user.Rands, err = GetUserSalt(); err != nil { + return fmt.Errorf("unable to generate salt: %v", err) } - } - user.IsActive = activate - if user.Rands, err = GetUserSalt(); err != nil { - return fmt.Errorf("generate salt: %v", err) - } - if err = updateUserCols(sess, &user, "is_active", "rands"); err != nil { - return fmt.Errorf("updateUserCols(): %v", err) - } - } else { - // Activate/deactivate a user's secondary email address - // First check if there's another user active with the same address - addr := EmailAddress{UID: userID, Email: email} - if has, err := sess.Get(&addr); err != nil { - return err - } else if !has { - return fmt.Errorf("no such email: %d (%s)", userID, email) - } - if addr.IsActivated == activate { - // Already in the desired state; no action - return nil - } - if activate { - if used, err := isEmailActive(sess, email, 0, addr.ID); err != nil { - return fmt.Errorf("isEmailActive(): %v", err) - } else if used { - return ErrEmailAlreadyUsed{Email: email} + if err = updateUserCols(sess, &user, "is_active", "rands"); err != nil { + return fmt.Errorf("unable to updateUserCols() for user ID: %d: %v", userID, err) } } - if err = addr.updateActivation(sess, activate); err != nil { - return fmt.Errorf("updateActivation(): %v", err) - } } + return sess.Commit() } diff --git a/models/user_mail_test.go b/models/user_mail_test.go index 8237ce664..829a38c18 100644 --- a/models/user_mail_test.go +++ b/models/user_mail_test.go @@ -17,9 +17,9 @@ func TestGetEmailAddresses(t *testing.T) { emails, _ := GetEmailAddresses(int64(1)) if assert.Len(t, emails, 3) { - assert.False(t, emails[0].IsPrimary) + assert.True(t, emails[0].IsPrimary) assert.True(t, emails[2].IsActivated) - assert.True(t, emails[2].IsPrimary) + assert.False(t, emails[2].IsPrimary) } emails, _ = GetEmailAddresses(int64(2)) @@ -45,13 +45,15 @@ func TestAddEmailAddress(t *testing.T) { assert.NoError(t, AddEmailAddress(&EmailAddress{ Email: "user1234567890@example.com", + LowerEmail: "user1234567890@example.com", IsPrimary: true, IsActivated: true, })) // ErrEmailAlreadyUsed err := AddEmailAddress(&EmailAddress{ - Email: "user1234567890@example.com", + Email: "user1234567890@example.com", + LowerEmail: "user1234567890@example.com", }) assert.Error(t, err) assert.True(t, IsErrEmailAlreadyUsed(err)) @@ -64,10 +66,12 @@ func TestAddEmailAddresses(t *testing.T) { emails := make([]*EmailAddress, 2) emails[0] = &EmailAddress{ Email: "user1234@example.com", + LowerEmail: "user1234@example.com", IsActivated: true, } emails[1] = &EmailAddress{ Email: "user5678@example.com", + LowerEmail: "user5678@example.com", IsActivated: true, } assert.NoError(t, AddEmailAddresses(emails)) @@ -82,20 +86,23 @@ func TestDeleteEmailAddress(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) assert.NoError(t, DeleteEmailAddress(&EmailAddress{ - UID: int64(1), - ID: int64(1), - Email: "user11@example.com", + UID: int64(1), + ID: int64(33), + Email: "user1-2@example.com", + LowerEmail: "user1-2@example.com", })) assert.NoError(t, DeleteEmailAddress(&EmailAddress{ - UID: int64(1), - Email: "user12@example.com", + UID: int64(1), + Email: "user1-3@example.com", + LowerEmail: "user1-3@example.com", })) // Email address does not exist err := DeleteEmailAddress(&EmailAddress{ - UID: int64(1), - Email: "user1234567890@example.com", + UID: int64(1), + Email: "user1234567890@example.com", + LowerEmail: "user1234567890@example.com", }) assert.Error(t, err) } @@ -106,13 +113,15 @@ func TestDeleteEmailAddresses(t *testing.T) { // delete multiple email address emails := make([]*EmailAddress, 2) emails[0] = &EmailAddress{ - UID: int64(2), - ID: int64(3), - Email: "user2@example.com", + UID: int64(2), + ID: int64(3), + Email: "user2@example.com", + LowerEmail: "user2@example.com", } emails[1] = &EmailAddress{ - UID: int64(2), - Email: "user21@example.com", + UID: int64(2), + Email: "user2-2@example.com", + LowerEmail: "user2-2@example.com", } assert.NoError(t, DeleteEmailAddresses(emails)) @@ -129,14 +138,14 @@ func TestMakeEmailPrimary(t *testing.T) { } err := MakeEmailPrimary(email) assert.Error(t, err) - assert.Equal(t, ErrEmailNotExist.Error(), err.Error()) + assert.EqualError(t, err, ErrEmailAddressNotExist{email.Email}.Error()) email = &EmailAddress{ Email: "user11@example.com", } err = MakeEmailPrimary(email) assert.Error(t, err) - assert.Equal(t, ErrEmailNotActivated.Error(), err.Error()) + assert.EqualError(t, err, ErrEmailNotActivated.Error()) email = &EmailAddress{ Email: "user9999999@example.com", @@ -168,15 +177,21 @@ func TestActivate(t *testing.T) { emails, _ := GetEmailAddresses(int64(1)) assert.Len(t, emails, 3) assert.True(t, emails[0].IsActivated) + assert.True(t, emails[0].IsPrimary) + assert.False(t, emails[1].IsPrimary) assert.True(t, emails[2].IsActivated) - assert.True(t, emails[2].IsPrimary) + assert.False(t, emails[2].IsPrimary) } func TestListEmails(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) // Must find all users and their emails - opts := &SearchEmailOptions{} + opts := &SearchEmailOptions{ + ListOptions: ListOptions{ + PageSize: 10000, + }, + } emails, count, err := SearchEmails(opts) assert.NoError(t, err) assert.NotEqual(t, int64(0), count) @@ -232,6 +247,6 @@ func TestListEmails(t *testing.T) { } emails, count, err = SearchEmails(opts) assert.NoError(t, err) - assert.Equal(t, 5, len(emails)) - assert.True(t, count > int64(len(emails))) + assert.Len(t, emails, 5) + assert.Greater(t, count, int64(len(emails))) } diff --git a/models/user_openid.go b/models/user_openid.go index 503c2a52d..597f19d77 100644 --- a/models/user_openid.go +++ b/models/user_openid.go @@ -11,10 +11,8 @@ import ( "code.gitea.io/gitea/modules/log" ) -var ( - // ErrOpenIDNotExist openid is not known - ErrOpenIDNotExist = errors.New("OpenID is unknown") -) +// ErrOpenIDNotExist openid is not known +var ErrOpenIDNotExist = errors.New("OpenID is unknown") // UserOpenID is the list of all OpenID identities of a user. type UserOpenID struct { @@ -37,6 +35,7 @@ func GetUserOpenIDs(uid int64) ([]*UserOpenID, error) { return openids, nil } +// isOpenIDUsed returns true if the openid has been used. func isOpenIDUsed(e Engine, uri string) (bool, error) { if len(uri) == 0 { return true, nil @@ -45,11 +44,6 @@ func isOpenIDUsed(e Engine, uri string) (bool, error) { return e.Get(&UserOpenID{URI: uri}) } -// IsOpenIDUsed returns true if the openid has been used. -func IsOpenIDUsed(openid string) (bool, error) { - return isOpenIDUsed(x, openid) -} - // NOTE: make sure openid.URI is normalized already func addUserOpenID(e Engine, openid *UserOpenID) error { used, err := isOpenIDUsed(e, openid.URI) @@ -72,7 +66,7 @@ func AddUserOpenID(openid *UserOpenID) error { func DeleteUserOpenID(openid *UserOpenID) (err error) { var deleted int64 // ask to check UID - var address = UserOpenID{ + address := UserOpenID{ UID: openid.UID, } if openid.ID > 0 { diff --git a/models/user_openid_test.go b/models/user_openid_test.go index 18f84bef7..d04b07227 100644 --- a/models/user_openid_test.go +++ b/models/user_openid_test.go @@ -15,15 +15,15 @@ func TestGetUserOpenIDs(t *testing.T) { oids, err := GetUserOpenIDs(int64(1)) if assert.NoError(t, err) && assert.Len(t, oids, 2) { - assert.Equal(t, oids[0].URI, "https://user1.domain1.tld/") + assert.Equal(t, "https://user1.domain1.tld/", oids[0].URI) assert.False(t, oids[0].Show) - assert.Equal(t, oids[1].URI, "http://user1.domain2.tld/") + assert.Equal(t, "http://user1.domain2.tld/", oids[1].URI) assert.True(t, oids[1].Show) } oids, err = GetUserOpenIDs(int64(2)) if assert.NoError(t, err) && assert.Len(t, oids, 1) { - assert.Equal(t, oids[0].URI, "https://domain1.tld/user2/") + assert.Equal(t, "https://domain1.tld/user2/", oids[0].URI) assert.True(t, oids[0].Show) } } @@ -38,12 +38,12 @@ func TestGetUserByOpenID(t *testing.T) { user, err := GetUserByOpenID("https://user1.domain1.tld") if assert.NoError(t, err) { - assert.Equal(t, user.ID, int64(1)) + assert.Equal(t, int64(1), user.ID) } user, err = GetUserByOpenID("https://domain1.tld/user2/") if assert.NoError(t, err) { - assert.Equal(t, user.ID, int64(2)) + assert.Equal(t, int64(2), user.ID) } } diff --git a/models/user_redirect.go b/models/user_redirect.go new file mode 100644 index 000000000..1da8b4408 --- /dev/null +++ b/models/user_redirect.go @@ -0,0 +1,52 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import "strings" + +// UserRedirect represents that a user name should be redirected to another +type UserRedirect struct { + ID int64 `xorm:"pk autoincr"` + LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"` + RedirectUserID int64 // userID to redirect to +} + +// LookupUserRedirect look up userID if a user has a redirect name +func LookupUserRedirect(userName string) (int64, error) { + userName = strings.ToLower(userName) + redirect := &UserRedirect{LowerName: userName} + if has, err := x.Get(redirect); err != nil { + return 0, err + } else if !has { + return 0, ErrUserRedirectNotExist{Name: userName} + } + return redirect.RedirectUserID, nil +} + +// newUserRedirect create a new user redirect +func newUserRedirect(e Engine, ID int64, oldUserName, newUserName string) error { + oldUserName = strings.ToLower(oldUserName) + newUserName = strings.ToLower(newUserName) + + if err := deleteUserRedirect(e, newUserName); err != nil { + return err + } + + if _, err := e.Insert(&UserRedirect{ + LowerName: oldUserName, + RedirectUserID: ID, + }); err != nil { + return err + } + return nil +} + +// deleteUserRedirect delete any redirect from the specified user name to +// anything else +func deleteUserRedirect(e Engine, userName string) error { + userName = strings.ToLower(userName) + _, err := e.Delete(&UserRedirect{LowerName: userName}) + return err +} diff --git a/models/user_redirect_test.go b/models/user_redirect_test.go new file mode 100644 index 000000000..791c920bc --- /dev/null +++ b/models/user_redirect_test.go @@ -0,0 +1,69 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package models + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestLookupUserRedirect(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + + userID, err := LookupUserRedirect("olduser1") + assert.NoError(t, err) + assert.EqualValues(t, 1, userID) + + _, err = LookupUserRedirect("doesnotexist") + assert.True(t, IsErrUserRedirectNotExist(err)) +} + +func TestNewUserRedirect(t *testing.T) { + // redirect to a completely new name + assert.NoError(t, PrepareTestDatabase()) + + user := AssertExistsAndLoadBean(t, &User{ID: 1}).(*User) + assert.NoError(t, newUserRedirect(x, user.ID, user.Name, "newusername")) + + AssertExistsAndLoadBean(t, &UserRedirect{ + LowerName: user.LowerName, + RedirectUserID: user.ID, + }) + AssertExistsAndLoadBean(t, &UserRedirect{ + LowerName: "olduser1", + RedirectUserID: user.ID, + }) +} + +func TestNewUserRedirect2(t *testing.T) { + // redirect to previously used name + assert.NoError(t, PrepareTestDatabase()) + + user := AssertExistsAndLoadBean(t, &User{ID: 1}).(*User) + assert.NoError(t, newUserRedirect(x, user.ID, user.Name, "olduser1")) + + AssertExistsAndLoadBean(t, &UserRedirect{ + LowerName: user.LowerName, + RedirectUserID: user.ID, + }) + AssertNotExistsBean(t, &UserRedirect{ + LowerName: "olduser1", + RedirectUserID: user.ID, + }) +} + +func TestNewUserRedirect3(t *testing.T) { + // redirect for a previously-unredirected user + assert.NoError(t, PrepareTestDatabase()) + + user := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + assert.NoError(t, newUserRedirect(x, user.ID, user.Name, "newusername")) + + AssertExistsAndLoadBean(t, &UserRedirect{ + LowerName: user.LowerName, + RedirectUserID: user.ID, + }) +} diff --git a/models/user_test.go b/models/user_test.go index ac4001596..a76bca0ed 100644 --- a/models/user_test.go +++ b/models/user_test.go @@ -11,6 +11,7 @@ import ( "testing" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" @@ -36,7 +37,7 @@ func TestUserIsPublicMember(t *testing.T) { } } -func testUserIsPublicMember(t *testing.T, uid int64, orgID int64, expected bool) { +func testUserIsPublicMember(t *testing.T, uid, orgID int64, expected bool) { user, err := GetUserByID(uid) assert.NoError(t, err) assert.Equal(t, expected, user.IsPublicMember(orgID)) @@ -62,7 +63,7 @@ func TestIsUserOrgOwner(t *testing.T) { } } -func testIsUserOrgOwner(t *testing.T, uid int64, orgID int64, expected bool) { +func testIsUserOrgOwner(t *testing.T, uid, orgID int64, expected bool) { user, err := GetUserByID(uid) assert.NoError(t, err) assert.Equal(t, expected, user.IsUserOrgOwner(orgID)) @@ -189,6 +190,7 @@ func TestDeleteUser(t *testing.T) { func TestEmailNotificationPreferences(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) + for _, test := range []struct { expected string userID int64 @@ -338,7 +340,6 @@ func TestCreateUserInvalidEmail(t *testing.T) { } func TestCreateUser_Issue5882(t *testing.T) { - // Init settings _ = setting.Admin @@ -369,29 +370,32 @@ func TestCreateUser_Issue5882(t *testing.T) { } func TestGetUserIDsByNames(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) - //ignore non existing + // ignore non existing IDs, err := GetUserIDsByNames([]string{"user1", "user2", "none_existing_user"}, true) assert.NoError(t, err) assert.Equal(t, []int64{1, 2}, IDs) - //ignore non existing + // ignore non existing IDs, err = GetUserIDsByNames([]string{"user1", "do_not_exist"}, false) assert.Error(t, err) assert.Equal(t, []int64(nil), IDs) } func TestGetMaileableUsersByIDs(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + results, err := GetMaileableUsersByIDs([]int64{1, 4}, false) assert.NoError(t, err) - assert.Equal(t, 1, len(results)) + assert.Len(t, results, 1) if len(results) > 1 { assert.Equal(t, results[0].ID, 1) } results, err = GetMaileableUsersByIDs([]int64{1, 4}, true) assert.NoError(t, err) - assert.Equal(t, 2, len(results)) + assert.Len(t, results, 2) if len(results) > 2 { assert.Equal(t, results[0].ID, 1) assert.Equal(t, results[1].ID, 4) @@ -449,13 +453,13 @@ ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ib for i, kase := range testCases { s.ID = int64(i) + 20 - addLdapSSHPublicKeys(user, s, []string{kase.keyString}) - keys, err := ListPublicLdapSSHKeys(user.ID, s.ID) + AddPublicKeysBySource(user, s, []string{kase.keyString}) + keys, err := ListPublicKeysBySource(user.ID, s.ID) assert.NoError(t, err) if err != nil { continue } - assert.Equal(t, kase.number, len(keys)) + assert.Len(t, keys, kase.number) for _, key := range keys { assert.Contains(t, kase.keyContents, key.Content) @@ -465,3 +469,23 @@ ssh-dss AAAAB3NzaC1kc3MAAACBAOChCC7lf6Uo9n7BmZ6M8St19PZf4Tn59NriyboW2x/DZuYAz3ib } } } + +func TestUpdateUser(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + user := AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + + user.KeepActivityPrivate = true + assert.NoError(t, UpdateUser(user)) + user = AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + assert.True(t, user.KeepActivityPrivate) + + setting.Service.AllowedUserVisibilityModesSlice = []bool{true, false, false} + user.KeepActivityPrivate = false + user.Visibility = structs.VisibleTypePrivate + assert.Error(t, UpdateUser(user)) + user = AssertExistsAndLoadBean(t, &User{ID: 2}).(*User) + assert.True(t, user.KeepActivityPrivate) + + user.Email = "no mail@mail.org" + assert.Error(t, UpdateUser(user)) +} diff --git a/models/userlist.go b/models/userlist.go index a2a424848..53e380cd7 100644 --- a/models/userlist.go +++ b/models/userlist.go @@ -10,14 +10,14 @@ import ( "code.gitea.io/gitea/modules/log" ) -//UserList is a list of user. +// UserList is a list of user. // This type provide valuable methods to retrieve information for a group of users efficiently. type UserList []*User func (users UserList) getUserIDs() []int64 { userIDs := make([]int64, len(users)) for _, user := range users { - userIDs = append(userIDs, user.ID) //Considering that user id are unique in the list + userIDs = append(userIDs, user.ID) // Considering that user id are unique in the list } return userIDs } @@ -26,7 +26,7 @@ func (users UserList) getUserIDs() []int64 { func (users UserList) IsUserOrgOwner(orgID int64) map[int64]bool { results := make(map[int64]bool, len(users)) for _, user := range users { - results[user.ID] = false //Set default to false + results[user.ID] = false // Set default to false } ownerMaps, err := users.loadOrganizationOwners(x, orgID) if err == nil { @@ -66,7 +66,7 @@ func (users UserList) loadOrganizationOwners(e Engine, orgID int64) (map[int64]* func (users UserList) GetTwoFaStatus() map[int64]bool { results := make(map[int64]bool, len(users)) for _, user := range users { - results[user.ID] = false //Set default to false + results[user.ID] = false // Set default to false } tokenMaps, err := users.loadTwoFactorStatus(x) if err == nil { diff --git a/models/userlist_test.go b/models/userlist_test.go index c48cfb61c..5c1af6c20 100644 --- a/models/userlist_test.go +++ b/models/userlist_test.go @@ -29,12 +29,12 @@ func TestUserListIsPublicMember(t *testing.T) { }) } } + func testUserListIsPublicMember(t *testing.T, orgID int64, expected map[int64]bool) { org, err := GetUserByID(orgID) assert.NoError(t, err) assert.NoError(t, org.GetMembers()) assert.Equal(t, expected, org.MembersIsPublic) - } func TestUserListIsUserOrgOwner(t *testing.T) { diff --git a/models/webhook.go b/models/webhook.go index e0a75843d..79ce70a0d 100644 --- a/models/webhook.go +++ b/models/webhook.go @@ -6,17 +6,20 @@ package models import ( - "encoding/json" + "context" "fmt" "strings" "time" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" gouuid "github.com/google/uuid" + "xorm.io/builder" ) // HookContentType is the content type of a web hook @@ -39,6 +42,26 @@ func ToHookContentType(name string) HookContentType { return hookContentTypes[name] } +// HookTaskCleanupType is the type of cleanup to perform on hook_task +type HookTaskCleanupType int + +const ( + // OlderThan hook_task rows will be cleaned up by the age of the row + OlderThan HookTaskCleanupType = iota + // PerWebhook hook_task rows will be cleaned up by leaving the most recent deliveries for each webhook + PerWebhook +) + +var hookTaskCleanupTypes = map[string]HookTaskCleanupType{ + "OlderThan": OlderThan, + "PerWebhook": PerWebhook, +} + +// ToHookTaskCleanupType returns HookTaskCleanupType by given name. +func ToHookTaskCleanupType(name string) HookTaskCleanupType { + return hookTaskCleanupTypes[name] +} + // Name returns the name of a given web hook's content type func (t HookContentType) Name() string { switch t { @@ -88,6 +111,23 @@ type HookEvent struct { HookEvents `json:"events"` } +// HookType is the type of a webhook +type HookType = string + +// Types of webhooks +const ( + GITEA HookType = "gitea" + GOGS HookType = "gogs" + SLACK HookType = "slack" + DISCORD HookType = "discord" + DINGTALK HookType = "dingtalk" + TELEGRAM HookType = "telegram" + MSTEAMS HookType = "msteams" + FEISHU HookType = "feishu" + MATRIX HookType = "matrix" + WECHATWORK HookType = "wechatwork" +) + // HookStatus is the status of a web hook type HookStatus int @@ -105,17 +145,15 @@ type Webhook struct { OrgID int64 `xorm:"INDEX"` IsSystemWebhook bool URL string `xorm:"url TEXT"` - Signature string `xorm:"TEXT"` HTTPMethod string `xorm:"http_method"` ContentType HookContentType Secret string `xorm:"TEXT"` Events string `xorm:"TEXT"` *HookEvent `xorm:"-"` - IsSSL bool `xorm:"is_ssl"` - IsActive bool `xorm:"INDEX"` - Type HookTaskType `xorm:"VARCHAR(16) 'type'"` - Meta string `xorm:"TEXT"` // store hook-specific attributes - LastStatus HookStatus // Last delivery status + IsActive bool `xorm:"INDEX"` + Type HookType `xorm:"VARCHAR(16) 'type'"` + Meta string `xorm:"TEXT"` // store hook-specific attributes + LastStatus HookStatus // Last delivery status CreatedUnix timeutil.TimeStamp `xorm:"INDEX created"` UpdatedUnix timeutil.TimeStamp `xorm:"INDEX updated"` @@ -351,67 +389,51 @@ func GetWebhookByOrgID(orgID, id int64) (*Webhook, error) { }) } -// GetActiveWebhooksByRepoID returns all active webhooks of repository. -func GetActiveWebhooksByRepoID(repoID int64) ([]*Webhook, error) { - return getActiveWebhooksByRepoID(x, repoID) +// ListWebhookOptions are options to filter webhooks on ListWebhooksByOpts +type ListWebhookOptions struct { + ListOptions + RepoID int64 + OrgID int64 + IsActive util.OptionalBool } -func getActiveWebhooksByRepoID(e Engine, repoID int64) ([]*Webhook, error) { - webhooks := make([]*Webhook, 0, 5) - return webhooks, e.Where("is_active=?", true). - Find(&webhooks, &Webhook{RepoID: repoID}) +func (opts *ListWebhookOptions) toCond() builder.Cond { + cond := builder.NewCond() + if opts.RepoID != 0 { + cond = cond.And(builder.Eq{"webhook.repo_id": opts.RepoID}) + } + if opts.OrgID != 0 { + cond = cond.And(builder.Eq{"webhook.org_id": opts.OrgID}) + } + if !opts.IsActive.IsNone() { + cond = cond.And(builder.Eq{"webhook.is_active": opts.IsActive.IsTrue()}) + } + return cond } -// GetWebhooksByRepoID returns all webhooks of a repository. -func GetWebhooksByRepoID(repoID int64, listOptions ListOptions) ([]*Webhook, error) { - if listOptions.Page == 0 { - webhooks := make([]*Webhook, 0, 5) - return webhooks, x.Find(&webhooks, &Webhook{RepoID: repoID}) +func listWebhooksByOpts(e Engine, opts *ListWebhookOptions) ([]*Webhook, error) { + sess := e.Where(opts.toCond()) + + if opts.Page != 0 { + sess = opts.setSessionPagination(sess) + webhooks := make([]*Webhook, 0, opts.PageSize) + err := sess.Find(&webhooks) + return webhooks, err } - sess := listOptions.getPaginatedSession() - webhooks := make([]*Webhook, 0, listOptions.PageSize) - - return webhooks, sess.Find(&webhooks, &Webhook{RepoID: repoID}) + webhooks := make([]*Webhook, 0, 10) + err := sess.Find(&webhooks) + return webhooks, err } -// GetActiveWebhooksByOrgID returns all active webhooks for an organization. -func GetActiveWebhooksByOrgID(orgID int64) (ws []*Webhook, err error) { - return getActiveWebhooksByOrgID(x, orgID) +// ListWebhooksByOpts return webhooks based on options +func ListWebhooksByOpts(opts *ListWebhookOptions) ([]*Webhook, error) { + return listWebhooksByOpts(x, opts) } -func getActiveWebhooksByOrgID(e Engine, orgID int64) (ws []*Webhook, err error) { - err = e. - Where("org_id=?", orgID). - And("is_active=?", true). - Find(&ws) - return ws, err -} - -// GetWebhooksByOrgID returns paginated webhooks for an organization. -func GetWebhooksByOrgID(orgID int64, listOptions ListOptions) ([]*Webhook, error) { - if listOptions.Page == 0 { - ws := make([]*Webhook, 0, 5) - return ws, x.Find(&ws, &Webhook{OrgID: orgID}) - } - - sess := listOptions.getPaginatedSession() - ws := make([]*Webhook, 0, listOptions.PageSize) - return ws, sess.Find(&ws, &Webhook{OrgID: orgID}) -} - -// GetDefaultWebhook returns admin-default webhook by given ID. -func GetDefaultWebhook(id int64) (*Webhook, error) { - webhook := &Webhook{ID: id} - has, err := x. - Where("repo_id=? AND org_id=? AND is_system_webhook=?", 0, 0, false). - Get(webhook) - if err != nil { - return nil, err - } else if !has { - return nil, ErrWebhookNotExist{id} - } - return webhook, nil +// CountWebhooksByOpts count webhooks based on options and ignore pagination +func CountWebhooksByOpts(opts *ListWebhookOptions) (int64, error) { + return x.Where(opts.toCond()).Count(&Webhook{}) } // GetDefaultWebhooks returns all admin-default webhooks. @@ -426,11 +448,11 @@ func getDefaultWebhooks(e Engine) ([]*Webhook, error) { Find(&webhooks) } -// GetSystemWebhook returns admin system webhook by given ID. -func GetSystemWebhook(id int64) (*Webhook, error) { +// GetSystemOrDefaultWebhook returns admin system or default webhook by given ID. +func GetSystemOrDefaultWebhook(id int64) (*Webhook, error) { webhook := &Webhook{ID: id} has, err := x. - Where("repo_id=? AND org_id=? AND is_system_webhook=?", 0, 0, true). + Where("repo_id=? AND org_id=?", 0, 0). Get(webhook) if err != nil { return nil, err @@ -548,22 +570,6 @@ func copyDefaultWebhooksToRepo(e Engine, repoID int64) error { // \___|_ / \____/ \____/|__|_ \ |____| (____ /____ >__|_ \ // \/ \/ \/ \/ \/ -// HookTaskType is the type of an hook task -type HookTaskType = string - -// Types of hook tasks -const ( - GITEA HookTaskType = "gitea" - GOGS HookTaskType = "gogs" - SLACK HookTaskType = "slack" - DISCORD HookTaskType = "discord" - DINGTALK HookTaskType = "dingtalk" - TELEGRAM HookTaskType = "telegram" - MSTEAMS HookTaskType = "msteams" - FEISHU HookTaskType = "feishu" - MATRIX HookTaskType = "matrix" -) - // HookEventType is the type of an hook event type HookEventType string @@ -625,7 +631,9 @@ func (h HookEventType) Event() string { // HookRequest represents hook task request information. type HookRequest struct { - Headers map[string]string `json:"headers"` + URL string `json:"url"` + HTTPMethod string `json:"http_method"` + Headers map[string]string `json:"headers"` } // HookResponse represents hook task response information. @@ -641,15 +649,9 @@ type HookTask struct { RepoID int64 `xorm:"INDEX"` HookID int64 UUID string - Typ HookTaskType `xorm:"VARCHAR(16) index"` - URL string `xorm:"TEXT"` - Signature string `xorm:"TEXT"` api.Payloader `xorm:"-"` PayloadContent string `xorm:"TEXT"` - HTTPMethod string `xorm:"http_method"` - ContentType HookContentType EventType HookEventType - IsSSL bool IsDelivered bool Delivered int64 DeliveredString string `xorm:"-"` @@ -752,3 +754,69 @@ func FindRepoUndeliveredHookTasks(repoID int64) ([]*HookTask, error) { } return tasks, nil } + +// CleanupHookTaskTable deletes rows from hook_task as needed. +func CleanupHookTaskTable(ctx context.Context, cleanupType HookTaskCleanupType, olderThan time.Duration, numberToKeep int) error { + log.Trace("Doing: CleanupHookTaskTable") + + if cleanupType == OlderThan { + deleteOlderThan := time.Now().Add(-olderThan).UnixNano() + deletes, err := x. + Where("is_delivered = ? and delivered < ?", true, deleteOlderThan). + Delete(new(HookTask)) + if err != nil { + return err + } + log.Trace("Deleted %d rows from hook_task", deletes) + } else if cleanupType == PerWebhook { + hookIDs := make([]int64, 0, 10) + err := x.Table("webhook"). + Where("id > 0"). + Cols("id"). + Find(&hookIDs) + if err != nil { + return err + } + for _, hookID := range hookIDs { + select { + case <-ctx.Done(): + return ErrCancelledf("Before deleting hook_task records for hook id %d", hookID) + default: + } + if err = deleteDeliveredHookTasksByWebhook(hookID, numberToKeep); err != nil { + return err + } + } + } + log.Trace("Finished: CleanupHookTaskTable") + return nil +} + +func deleteDeliveredHookTasksByWebhook(hookID int64, numberDeliveriesToKeep int) error { + log.Trace("Deleting hook_task rows for webhook %d, keeping the most recent %d deliveries", hookID, numberDeliveriesToKeep) + deliveryDates := make([]int64, 0, 10) + err := x.Table("hook_task"). + Where("hook_task.hook_id = ? AND hook_task.is_delivered = ? AND hook_task.delivered is not null", hookID, true). + Cols("hook_task.delivered"). + Join("INNER", "webhook", "hook_task.hook_id = webhook.id"). + OrderBy("hook_task.delivered desc"). + Limit(1, int(numberDeliveriesToKeep)). + Find(&deliveryDates) + if err != nil { + return err + } + + if len(deliveryDates) > 0 { + deletes, err := x. + Where("hook_id = ? and is_delivered = ? and delivered <= ?", hookID, true, deliveryDates[0]). + Delete(new(HookTask)) + if err != nil { + return err + } + log.Trace("Deleted %d hook_task rows for webhook %d", deletes, hookID) + } else { + log.Trace("No hook_task rows to delete for webhook %d", hookID) + } + + return nil +} diff --git a/models/webhook_test.go b/models/webhook_test.go index 20acb4e93..625d64385 100644 --- a/models/webhook_test.go +++ b/models/webhook_test.go @@ -5,10 +5,13 @@ package models import ( - "encoding/json" + "context" "testing" + "time" + "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" ) @@ -61,11 +64,13 @@ func TestWebhook_UpdateEvent(t *testing.T) { } func TestWebhook_EventsArray(t *testing.T) { - assert.Equal(t, []string{"create", "delete", "fork", "push", + assert.Equal(t, []string{ + "create", "delete", "fork", "push", "issues", "issue_assign", "issue_label", "issue_milestone", "issue_comment", "pull_request", "pull_request_assign", "pull_request_label", "pull_request_milestone", "pull_request_comment", "pull_request_review_approved", "pull_request_review_rejected", - "pull_request_review_comment", "pull_request_sync", "repository", "release"}, + "pull_request_review_comment", "pull_request_sync", "repository", "release", + }, (&Webhook{ HookEvent: &HookEvent{SendEverything: true}, }).EventsArray(), @@ -114,7 +119,7 @@ func TestGetWebhookByOrgID(t *testing.T) { func TestGetActiveWebhooksByRepoID(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - hooks, err := GetActiveWebhooksByRepoID(1) + hooks, err := ListWebhooksByOpts(&ListWebhookOptions{RepoID: 1, IsActive: util.OptionalBoolTrue}) assert.NoError(t, err) if assert.Len(t, hooks, 1) { assert.Equal(t, int64(1), hooks[0].ID) @@ -124,7 +129,7 @@ func TestGetActiveWebhooksByRepoID(t *testing.T) { func TestGetWebhooksByRepoID(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - hooks, err := GetWebhooksByRepoID(1, ListOptions{}) + hooks, err := ListWebhooksByOpts(&ListWebhookOptions{RepoID: 1}) assert.NoError(t, err) if assert.Len(t, hooks, 2) { assert.Equal(t, int64(1), hooks[0].ID) @@ -134,7 +139,7 @@ func TestGetWebhooksByRepoID(t *testing.T) { func TestGetActiveWebhooksByOrgID(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - hooks, err := GetActiveWebhooksByOrgID(3) + hooks, err := ListWebhooksByOpts(&ListWebhookOptions{OrgID: 3, IsActive: util.OptionalBoolTrue}) assert.NoError(t, err) if assert.Len(t, hooks, 1) { assert.Equal(t, int64(3), hooks[0].ID) @@ -144,13 +149,12 @@ func TestGetActiveWebhooksByOrgID(t *testing.T) { func TestGetWebhooksByOrgID(t *testing.T) { assert.NoError(t, PrepareTestDatabase()) - hooks, err := GetWebhooksByOrgID(3, ListOptions{}) + hooks, err := ListWebhooksByOpts(&ListWebhookOptions{OrgID: 3}) assert.NoError(t, err) if assert.Len(t, hooks, 1) { assert.Equal(t, int64(3), hooks[0].ID) assert.True(t, hooks[0].IsActive) } - } func TestUpdateWebhook(t *testing.T) { @@ -203,8 +207,6 @@ func TestCreateHookTask(t *testing.T) { hookTask := &HookTask{ RepoID: 3, HookID: 3, - Typ: GITEA, - URL: "http://www.example.com/unit_test", Payloader: &api.PushPayload{}, } AssertNotExistsBean(t, hookTask) @@ -223,3 +225,103 @@ func TestUpdateHookTask(t *testing.T) { assert.NoError(t, UpdateHookTask(hook)) AssertExistsAndLoadBean(t, hook) } + +func TestCleanupHookTaskTable_PerWebhook_DeletesDelivered(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + hookTask := &HookTask{ + RepoID: 3, + HookID: 3, + Payloader: &api.PushPayload{}, + IsDelivered: true, + Delivered: time.Now().UnixNano(), + } + AssertNotExistsBean(t, hookTask) + assert.NoError(t, CreateHookTask(hookTask)) + AssertExistsAndLoadBean(t, hookTask) + + assert.NoError(t, CleanupHookTaskTable(context.Background(), PerWebhook, 168*time.Hour, 0)) + AssertNotExistsBean(t, hookTask) +} + +func TestCleanupHookTaskTable_PerWebhook_LeavesUndelivered(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + hookTask := &HookTask{ + RepoID: 2, + HookID: 4, + Payloader: &api.PushPayload{}, + IsDelivered: false, + } + AssertNotExistsBean(t, hookTask) + assert.NoError(t, CreateHookTask(hookTask)) + AssertExistsAndLoadBean(t, hookTask) + + assert.NoError(t, CleanupHookTaskTable(context.Background(), PerWebhook, 168*time.Hour, 0)) + AssertExistsAndLoadBean(t, hookTask) +} + +func TestCleanupHookTaskTable_PerWebhook_LeavesMostRecentTask(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + hookTask := &HookTask{ + RepoID: 2, + HookID: 4, + Payloader: &api.PushPayload{}, + IsDelivered: true, + Delivered: time.Now().UnixNano(), + } + AssertNotExistsBean(t, hookTask) + assert.NoError(t, CreateHookTask(hookTask)) + AssertExistsAndLoadBean(t, hookTask) + + assert.NoError(t, CleanupHookTaskTable(context.Background(), PerWebhook, 168*time.Hour, 1)) + AssertExistsAndLoadBean(t, hookTask) +} + +func TestCleanupHookTaskTable_OlderThan_DeletesDelivered(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + hookTask := &HookTask{ + RepoID: 3, + HookID: 3, + Payloader: &api.PushPayload{}, + IsDelivered: true, + Delivered: time.Now().AddDate(0, 0, -8).UnixNano(), + } + AssertNotExistsBean(t, hookTask) + assert.NoError(t, CreateHookTask(hookTask)) + AssertExistsAndLoadBean(t, hookTask) + + assert.NoError(t, CleanupHookTaskTable(context.Background(), OlderThan, 168*time.Hour, 0)) + AssertNotExistsBean(t, hookTask) +} + +func TestCleanupHookTaskTable_OlderThan_LeavesUndelivered(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + hookTask := &HookTask{ + RepoID: 2, + HookID: 4, + Payloader: &api.PushPayload{}, + IsDelivered: false, + } + AssertNotExistsBean(t, hookTask) + assert.NoError(t, CreateHookTask(hookTask)) + AssertExistsAndLoadBean(t, hookTask) + + assert.NoError(t, CleanupHookTaskTable(context.Background(), OlderThan, 168*time.Hour, 0)) + AssertExistsAndLoadBean(t, hookTask) +} + +func TestCleanupHookTaskTable_OlderThan_LeavesTaskEarlierThanAgeToDelete(t *testing.T) { + assert.NoError(t, PrepareTestDatabase()) + hookTask := &HookTask{ + RepoID: 2, + HookID: 4, + Payloader: &api.PushPayload{}, + IsDelivered: true, + Delivered: time.Now().AddDate(0, 0, -6).UnixNano(), + } + AssertNotExistsBean(t, hookTask) + assert.NoError(t, CreateHookTask(hookTask)) + AssertExistsAndLoadBean(t, hookTask) + + assert.NoError(t, CleanupHookTaskTable(context.Background(), OlderThan, 168*time.Hour, 0)) + AssertExistsAndLoadBean(t, hookTask) +} diff --git a/modules/analyze/vendor.go b/modules/analyze/vendor.go new file mode 100644 index 000000000..12ae8dbd8 --- /dev/null +++ b/modules/analyze/vendor.go @@ -0,0 +1,70 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package analyze + +import ( + "regexp" + "sort" + "strings" + + "github.com/go-enry/go-enry/v2/data" +) + +var isVendorRegExp *regexp.Regexp + +func init() { + matchers := data.VendorMatchers + + caretStrings := make([]string, 0, 10) + caretShareStrings := make([]string, 0, 10) + + matcherStrings := make([]string, 0, len(matchers)) + for _, matcher := range matchers { + str := matcher.String() + if str[0] == '^' { + caretStrings = append(caretStrings, str[1:]) + } else if str[0:5] == "(^|/)" { + caretShareStrings = append(caretShareStrings, str[5:]) + } else { + matcherStrings = append(matcherStrings, str) + } + } + + sort.Strings(caretShareStrings) + sort.Strings(caretStrings) + sort.Strings(matcherStrings) + + sb := &strings.Builder{} + sb.WriteString("(?:^(?:") + sb.WriteString(caretStrings[0]) + for _, matcher := range caretStrings[1:] { + sb.WriteString(")|(?:") + sb.WriteString(matcher) + } + sb.WriteString("))") + sb.WriteString("|") + sb.WriteString("(?:(?:^|/)(?:") + sb.WriteString(caretShareStrings[0]) + for _, matcher := range caretShareStrings[1:] { + sb.WriteString(")|(?:") + sb.WriteString(matcher) + } + sb.WriteString("))") + sb.WriteString("|") + sb.WriteString("(?:") + sb.WriteString(matcherStrings[0]) + for _, matcher := range matcherStrings[1:] { + sb.WriteString(")|(?:") + sb.WriteString(matcher) + } + sb.WriteString(")") + combined := sb.String() + isVendorRegExp = regexp.MustCompile(combined) +} + +// IsVendor returns whether or not path is a vendor path. +func IsVendor(path string) bool { + return isVendorRegExp.MatchString(path) +} diff --git a/modules/analyze/vendor_test.go b/modules/analyze/vendor_test.go new file mode 100644 index 000000000..2784e49d3 --- /dev/null +++ b/modules/analyze/vendor_test.go @@ -0,0 +1,42 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package analyze + +import "testing" + +func TestIsVendor(t *testing.T) { + tests := []struct { + path string + want bool + }{ + {"cache/", true}, + {"random/cache/", true}, + {"cache", false}, + {"dependencies/", true}, + {"Dependencies/", true}, + {"dependency/", false}, + {"dist/", true}, + {"dist", false}, + {"random/dist/", true}, + {"random/dist", false}, + {"deps/", true}, + {"configure", true}, + {"a/configure", true}, + {"config.guess", true}, + {"config.guess/", false}, + {".vscode/", true}, + {"doc/_build/", true}, + {"a/docs/_build/", true}, + {"a/dasdocs/_build-vsdoc.js", true}, + {"a/dasdocs/_build-vsdoc.j", false}, + } + for _, tt := range tests { + t.Run(tt.path, func(t *testing.T) { + if got := IsVendor(tt.path); got != tt.want { + t.Errorf("IsVendor() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/modules/auth/admin.go b/modules/auth/admin.go deleted file mode 100644 index f2d026355..000000000 --- a/modules/auth/admin.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" -) - -// AdminCreateUserForm form for admin to create user -type AdminCreateUserForm struct { - LoginType string `binding:"Required"` - LoginName string - UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"` - Email string `binding:"Required;Email;MaxSize(254)"` - Password string `binding:"MaxSize(255)"` - SendNotify bool - MustChangePassword bool -} - -// Validate validates form fields -func (f *AdminCreateUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// AdminEditUserForm form for admin to create user -type AdminEditUserForm struct { - LoginType string `binding:"Required"` - UserName string `binding:"AlphaDashDot;MaxSize(40)"` - LoginName string - FullName string `binding:"MaxSize(100)"` - Email string `binding:"Required;Email;MaxSize(254)"` - Password string `binding:"MaxSize(255)"` - Website string `binding:"ValidUrl;MaxSize(255)"` - Location string `binding:"MaxSize(50)"` - MaxRepoCreation int - Active bool - Admin bool - Restricted bool - AllowGitHook bool - AllowImportLocal bool - AllowCreateOrganization bool - ProhibitLogin bool - Reset2FA bool `form:"reset_2fa"` -} - -// Validate validates form fields -func (f *AdminEditUserForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// AdminDashboardForm form for admin dashboard operations -type AdminDashboardForm struct { - Op string `binding:"required"` - From string -} - -// Validate validates form fields -func (f *AdminDashboardForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} diff --git a/modules/auth/auth.go b/modules/auth/auth.go deleted file mode 100644 index 1f4b9ec5b..000000000 --- a/modules/auth/auth.go +++ /dev/null @@ -1,149 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "reflect" - "strings" - - "code.gitea.io/gitea/modules/validation" - - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" - "github.com/unknwon/com" -) - -// IsAPIPath if URL is an api path -func IsAPIPath(url string) bool { - return strings.HasPrefix(url, "/api/") -} - -// Form form binding interface -type Form interface { - binding.Validator -} - -func init() { - binding.SetNameMapper(com.ToSnakeCase) -} - -// AssignForm assign form values back to the template data. -func AssignForm(form interface{}, data map[string]interface{}) { - typ := reflect.TypeOf(form) - val := reflect.ValueOf(form) - - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } - - for i := 0; i < typ.NumField(); i++ { - field := typ.Field(i) - - fieldName := field.Tag.Get("form") - // Allow ignored fields in the struct - if fieldName == "-" { - continue - } else if len(fieldName) == 0 { - fieldName = com.ToSnakeCase(field.Name) - } - - data[fieldName] = val.Field(i).Interface() - } -} - -func getRuleBody(field reflect.StructField, prefix string) string { - for _, rule := range strings.Split(field.Tag.Get("binding"), ";") { - if strings.HasPrefix(rule, prefix) { - return rule[len(prefix) : len(rule)-1] - } - } - return "" -} - -// GetSize get size int form tag -func GetSize(field reflect.StructField) string { - return getRuleBody(field, "Size(") -} - -// GetMinSize get minimal size in form tag -func GetMinSize(field reflect.StructField) string { - return getRuleBody(field, "MinSize(") -} - -// GetMaxSize get max size in form tag -func GetMaxSize(field reflect.StructField) string { - return getRuleBody(field, "MaxSize(") -} - -// GetInclude get include in form tag -func GetInclude(field reflect.StructField) string { - return getRuleBody(field, "Include(") -} - -func validate(errs binding.Errors, data map[string]interface{}, f Form, l macaron.Locale) binding.Errors { - if errs.Len() == 0 { - return errs - } - - data["HasError"] = true - // If the field with name errs[0].FieldNames[0] is not found in form - // somehow, some code later on will panic on Data["ErrorMsg"].(string). - // So initialize it to some default. - data["ErrorMsg"] = l.Tr("form.unknown_error") - AssignForm(f, data) - - typ := reflect.TypeOf(f) - val := reflect.ValueOf(f) - - if typ.Kind() == reflect.Ptr { - typ = typ.Elem() - val = val.Elem() - } - - if field, ok := typ.FieldByName(errs[0].FieldNames[0]); ok { - fieldName := field.Tag.Get("form") - if fieldName != "-" { - data["Err_"+field.Name] = true - - trName := field.Tag.Get("locale") - if len(trName) == 0 { - trName = l.Tr("form." + field.Name) - } else { - trName = l.Tr(trName) - } - - switch errs[0].Classification { - case binding.ERR_REQUIRED: - data["ErrorMsg"] = trName + l.Tr("form.require_error") - case binding.ERR_ALPHA_DASH: - data["ErrorMsg"] = trName + l.Tr("form.alpha_dash_error") - case binding.ERR_ALPHA_DASH_DOT: - data["ErrorMsg"] = trName + l.Tr("form.alpha_dash_dot_error") - case validation.ErrGitRefName: - data["ErrorMsg"] = trName + l.Tr("form.git_ref_name_error") - case binding.ERR_SIZE: - data["ErrorMsg"] = trName + l.Tr("form.size_error", GetSize(field)) - case binding.ERR_MIN_SIZE: - data["ErrorMsg"] = trName + l.Tr("form.min_size_error", GetMinSize(field)) - case binding.ERR_MAX_SIZE: - data["ErrorMsg"] = trName + l.Tr("form.max_size_error", GetMaxSize(field)) - case binding.ERR_EMAIL: - data["ErrorMsg"] = trName + l.Tr("form.email_error") - case binding.ERR_URL: - data["ErrorMsg"] = trName + l.Tr("form.url_error") - case binding.ERR_INCLUDE: - data["ErrorMsg"] = trName + l.Tr("form.include_error", GetInclude(field)) - case validation.ErrGlobPattern: - data["ErrorMsg"] = trName + l.Tr("form.glob_pattern_error", errs[0].Message) - default: - data["ErrorMsg"] = l.Tr("form.unknown_error") + " " + errs[0].Classification - } - return errs - } - } - return errs -} diff --git a/modules/auth/ldap/README.md b/modules/auth/ldap/README.md deleted file mode 100644 index 76841f44a..000000000 --- a/modules/auth/ldap/README.md +++ /dev/null @@ -1,123 +0,0 @@ -Gitea LDAP Authentication Module -=============================== - -## About - -This authentication module attempts to authorize and authenticate a user -against an LDAP server. It provides two methods of authentication: LDAP via -BindDN, and LDAP simple authentication. - -LDAP via BindDN functions like most LDAP authentication systems. First, it -queries the LDAP server using a Bind DN and searches for the user that is -attempting to sign in. If the user is found, the module attempts to bind to the -server using the user's supplied credentials. If this succeeds, the user has -been authenticated, and his account information is retrieved and passed to the -Gogs login infrastructure. - -LDAP simple authentication does not utilize a Bind DN. Instead, it binds -directly with the LDAP server using the user's supplied credentials. If the bind -succeeds and no filter rules out the user, the user is authenticated. - -LDAP via BindDN is recommended for most users. By using a Bind DN, the server -can perform authorization by restricting which entries the Bind DN account can -read. Further, using a Bind DN with reduced permissions can reduce security risk -in the face of application bugs. - -## Usage - -To use this module, add an LDAP authentication source via the Authentications -section in the admin panel. Both the LDAP via BindDN and the simple auth LDAP -share the following fields: - -* Authorization Name **(required)** - * A name to assign to the new method of authorization. - -* Host **(required)** - * The address where the LDAP server can be reached. - * Example: mydomain.com - -* Port **(required)** - * The port to use when connecting to the server. - * Example: 636 - -* Enable TLS Encryption (optional) - * Whether to use TLS when connecting to the LDAP server. - -* Admin Filter (optional) - * An LDAP filter specifying if a user should be given administrator - privileges. If a user accounts passes the filter, the user will be - privileged as an administrator. - * Example: (objectClass=adminAccount) - -* First name attribute (optional) - * The attribute of the user's LDAP record containing the user's first name. - This will be used to populate their account information. - * Example: givenName - -* Surname attribute (optional) - * The attribute of the user's LDAP record containing the user's surname This - will be used to populate their account information. - * Example: sn - -* E-mail attribute **(required)** - * The attribute of the user's LDAP record containing the user's email - address. This will be used to populate their account information. - * Example: mail - -**LDAP via BindDN** adds the following fields: - -* Bind DN (optional) - * The DN to bind to the LDAP server with when searching for the user. This - may be left blank to perform an anonymous search. - * Example: cn=Search,dc=mydomain,dc=com - -* Bind Password (optional) - * The password for the Bind DN specified above, if any. _Note: The password - is stored in plaintext at the server. As such, ensure that your Bind DN - has as few privileges as possible._ - -* User Search Base **(required)** - * The LDAP base at which user accounts will be searched for. - * Example: ou=Users,dc=mydomain,dc=com - -* User Filter **(required)** - * An LDAP filter declaring how to find the user record that is attempting to - authenticate. The '%s' matching parameter will be substituted with the - user's username. - * Example: (&(objectClass=posixAccount)(uid=%s)) - -**LDAP using simple auth** adds the following fields: - -* User DN **(required)** - * A template to use as the user's DN. The `%s` matching parameter will be - substituted with the user's username. - * Example: cn=%s,ou=Users,dc=mydomain,dc=com - * Example: uid=%s,ou=Users,dc=mydomain,dc=com - -* User Search Base (optional) - * The LDAP base at which user accounts will be searched for. - * Example: ou=Users,dc=mydomain,dc=com - -* User Filter **(required)** - * An LDAP filter declaring when a user should be allowed to log in. The `%s` - matching parameter will be substituted with the user's username. - * Example: (&(objectClass=posixAccount)(cn=%s)) - * Example: (&(objectClass=posixAccount)(uid=%s)) - -**Verify group membership in LDAP** uses the following fields: - -* Group Search Base (optional) - * The LDAP DN used for groups. - * Example: ou=group,dc=mydomain,dc=com - -* Group Name Filter (optional) - * An LDAP filter declaring how to find valid groups in the above DN. - * Example: (|(cn=gitea_users)(cn=admins)) - -* User Attribute in Group (optional) - * Which user LDAP attribute is listed in the group. - * Example: uid - -* Group Attribute for User (optional) - * Which group LDAP attribute contains an array above user attribute names. - * Example: memberUid diff --git a/modules/auth/ldap/ldap.go b/modules/auth/ldap/ldap.go deleted file mode 100644 index 6c557de01..000000000 --- a/modules/auth/ldap/ldap.go +++ /dev/null @@ -1,485 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -// Package ldap provide functions & structure to query a LDAP ldap directory -// For now, it's mainly tested again an MS Active Directory service, see README.md for more information -package ldap - -import ( - "crypto/tls" - "fmt" - "strings" - - "code.gitea.io/gitea/modules/log" - - "github.com/go-ldap/ldap/v3" -) - -// SecurityProtocol protocol type -type SecurityProtocol int - -// Note: new type must be added at the end of list to maintain compatibility. -const ( - SecurityProtocolUnencrypted SecurityProtocol = iota - SecurityProtocolLDAPS - SecurityProtocolStartTLS -) - -// Source Basic LDAP authentication service -type Source struct { - Name string // canonical name (ie. corporate.ad) - Host string // LDAP host - Port int // port number - SecurityProtocol SecurityProtocol - SkipVerify bool - BindDN string // DN to bind with - BindPassword string // Bind DN password - UserBase string // Base search path for users - UserDN string // Template for the DN of the user for simple auth - AttributeUsername string // Username attribute - AttributeName string // First name attribute - AttributeSurname string // Surname attribute - AttributeMail string // E-mail attribute - AttributesInBind bool // fetch attributes in bind context (not user) - AttributeSSHPublicKey string // LDAP SSH Public Key attribute - SearchPageSize uint32 // Search with paging page size - Filter string // Query filter to validate entry - AdminFilter string // Query filter to check if user is admin - RestrictedFilter string // Query filter to check if user is restricted - Enabled bool // if this source is disabled - AllowDeactivateAll bool // Allow an empty search response to deactivate all users from this source - GroupsEnabled bool // if the group checking is enabled - GroupDN string // Group Search Base - GroupFilter string // Group Name Filter - GroupMemberUID string // Group Attribute containing array of UserUID - UserUID string // User Attribute listed in Group -} - -// SearchResult : user data -type SearchResult struct { - Username string // Username - Name string // Name - Surname string // Surname - Mail string // E-mail address - SSHPublicKey []string // SSH Public Key - IsAdmin bool // if user is administrator - IsRestricted bool // if user is restricted -} - -func (ls *Source) sanitizedUserQuery(username string) (string, bool) { - // See http://tools.ietf.org/search/rfc4515 - badCharacters := "\x00()*\\" - if strings.ContainsAny(username, badCharacters) { - log.Debug("'%s' contains invalid query characters. Aborting.", username) - return "", false - } - - return fmt.Sprintf(ls.Filter, username), true -} - -func (ls *Source) sanitizedUserDN(username string) (string, bool) { - // See http://tools.ietf.org/search/rfc4514: "special characters" - badCharacters := "\x00()*\\,='\"#+;<>" - if strings.ContainsAny(username, badCharacters) { - log.Debug("'%s' contains invalid DN characters. Aborting.", username) - return "", false - } - - return fmt.Sprintf(ls.UserDN, username), true -} - -func (ls *Source) sanitizedGroupFilter(group string) (string, bool) { - // See http://tools.ietf.org/search/rfc4515 - badCharacters := "\x00*\\" - if strings.ContainsAny(group, badCharacters) { - log.Trace("Group filter invalid query characters: %s", group) - return "", false - } - - return group, true -} - -func (ls *Source) sanitizedGroupDN(groupDn string) (string, bool) { - // See http://tools.ietf.org/search/rfc4514: "special characters" - badCharacters := "\x00()*\\'\"#+;<>" - if strings.ContainsAny(groupDn, badCharacters) || strings.HasPrefix(groupDn, " ") || strings.HasSuffix(groupDn, " ") { - log.Trace("Group DN contains invalid query characters: %s", groupDn) - return "", false - } - - return groupDn, true -} - -func (ls *Source) findUserDN(l *ldap.Conn, name string) (string, bool) { - log.Trace("Search for LDAP user: %s", name) - - // A search for the user. - userFilter, ok := ls.sanitizedUserQuery(name) - if !ok { - return "", false - } - - log.Trace("Searching for DN using filter %s and base %s", userFilter, ls.UserBase) - search := ldap.NewSearchRequest( - ls.UserBase, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, - false, userFilter, []string{}, nil) - - // Ensure we found a user - sr, err := l.Search(search) - if err != nil || len(sr.Entries) < 1 { - log.Debug("Failed search using filter[%s]: %v", userFilter, err) - return "", false - } else if len(sr.Entries) > 1 { - log.Debug("Filter '%s' returned more than one user.", userFilter) - return "", false - } - - userDN := sr.Entries[0].DN - if userDN == "" { - log.Error("LDAP search was successful, but found no DN!") - return "", false - } - - return userDN, true -} - -func dial(ls *Source) (*ldap.Conn, error) { - log.Trace("Dialing LDAP with security protocol (%v) without verifying: %v", ls.SecurityProtocol, ls.SkipVerify) - - tlsCfg := &tls.Config{ - ServerName: ls.Host, - InsecureSkipVerify: ls.SkipVerify, - } - if ls.SecurityProtocol == SecurityProtocolLDAPS { - return ldap.DialTLS("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port), tlsCfg) - } - - conn, err := ldap.Dial("tcp", fmt.Sprintf("%s:%d", ls.Host, ls.Port)) - if err != nil { - return nil, fmt.Errorf("Dial: %v", err) - } - - if ls.SecurityProtocol == SecurityProtocolStartTLS { - if err = conn.StartTLS(tlsCfg); err != nil { - conn.Close() - return nil, fmt.Errorf("StartTLS: %v", err) - } - } - - return conn, nil -} - -func bindUser(l *ldap.Conn, userDN, passwd string) error { - log.Trace("Binding with userDN: %s", userDN) - err := l.Bind(userDN, passwd) - if err != nil { - log.Debug("LDAP auth. failed for %s, reason: %v", userDN, err) - return err - } - log.Trace("Bound successfully with userDN: %s", userDN) - return err -} - -func checkAdmin(l *ldap.Conn, ls *Source, userDN string) bool { - if len(ls.AdminFilter) == 0 { - return false - } - log.Trace("Checking admin with filter %s and base %s", ls.AdminFilter, userDN) - search := ldap.NewSearchRequest( - userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, ls.AdminFilter, - []string{ls.AttributeName}, - nil) - - sr, err := l.Search(search) - - if err != nil { - log.Error("LDAP Admin Search failed unexpectedly! (%v)", err) - } else if len(sr.Entries) < 1 { - log.Trace("LDAP Admin Search found no matching entries.") - } else { - return true - } - return false -} - -func checkRestricted(l *ldap.Conn, ls *Source, userDN string) bool { - if len(ls.RestrictedFilter) == 0 { - return false - } - if ls.RestrictedFilter == "*" { - return true - } - log.Trace("Checking restricted with filter %s and base %s", ls.RestrictedFilter, userDN) - search := ldap.NewSearchRequest( - userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, ls.RestrictedFilter, - []string{ls.AttributeName}, - nil) - - sr, err := l.Search(search) - - if err != nil { - log.Error("LDAP Restrictred Search failed unexpectedly! (%v)", err) - } else if len(sr.Entries) < 1 { - log.Trace("LDAP Restricted Search found no matching entries.") - } else { - return true - } - return false -} - -// SearchEntry : search an LDAP source if an entry (name, passwd) is valid and in the specific filter -func (ls *Source) SearchEntry(name, passwd string, directBind bool) *SearchResult { - // See https://tools.ietf.org/search/rfc4513#section-5.1.2 - if len(passwd) == 0 { - log.Debug("Auth. failed for %s, password cannot be empty", name) - return nil - } - l, err := dial(ls) - if err != nil { - log.Error("LDAP Connect error, %s:%v", ls.Host, err) - ls.Enabled = false - return nil - } - defer l.Close() - - var userDN string - if directBind { - log.Trace("LDAP will bind directly via UserDN template: %s", ls.UserDN) - - var ok bool - userDN, ok = ls.sanitizedUserDN(name) - - if !ok { - return nil - } - - err = bindUser(l, userDN, passwd) - if err != nil { - return nil - } - - if ls.UserBase != "" { - // not everyone has a CN compatible with input name so we need to find - // the real userDN in that case - - userDN, ok = ls.findUserDN(l, name) - if !ok { - return nil - } - } - } else { - log.Trace("LDAP will use BindDN.") - - var found bool - - if ls.BindDN != "" && ls.BindPassword != "" { - err := l.Bind(ls.BindDN, ls.BindPassword) - if err != nil { - log.Debug("Failed to bind as BindDN[%s]: %v", ls.BindDN, err) - return nil - } - log.Trace("Bound as BindDN %s", ls.BindDN) - } else { - log.Trace("Proceeding with anonymous LDAP search.") - } - - userDN, found = ls.findUserDN(l, name) - if !found { - return nil - } - } - - if !ls.AttributesInBind { - // binds user (checking password) before looking-up attributes in user context - err = bindUser(l, userDN, passwd) - if err != nil { - return nil - } - } - - userFilter, ok := ls.sanitizedUserQuery(name) - if !ok { - return nil - } - - var isAttributeSSHPublicKeySet = len(strings.TrimSpace(ls.AttributeSSHPublicKey)) > 0 - - attribs := []string{ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail} - if len(strings.TrimSpace(ls.UserUID)) > 0 { - attribs = append(attribs, ls.UserUID) - } - if isAttributeSSHPublicKeySet { - attribs = append(attribs, ls.AttributeSSHPublicKey) - } - - log.Trace("Fetching attributes '%v', '%v', '%v', '%v', '%v', '%v' with filter '%s' and base '%s'", ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail, ls.AttributeSSHPublicKey, ls.UserUID, userFilter, userDN) - search := ldap.NewSearchRequest( - userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, userFilter, - attribs, nil) - - sr, err := l.Search(search) - if err != nil { - log.Error("LDAP Search failed unexpectedly! (%v)", err) - return nil - } else if len(sr.Entries) < 1 { - if directBind { - log.Trace("User filter inhibited user login.") - } else { - log.Trace("LDAP Search found no matching entries.") - } - - return nil - } - - var sshPublicKey []string - - username := sr.Entries[0].GetAttributeValue(ls.AttributeUsername) - firstname := sr.Entries[0].GetAttributeValue(ls.AttributeName) - surname := sr.Entries[0].GetAttributeValue(ls.AttributeSurname) - mail := sr.Entries[0].GetAttributeValue(ls.AttributeMail) - uid := sr.Entries[0].GetAttributeValue(ls.UserUID) - - // Check group membership - if ls.GroupsEnabled { - groupFilter, ok := ls.sanitizedGroupFilter(ls.GroupFilter) - if !ok { - return nil - } - groupDN, ok := ls.sanitizedGroupDN(ls.GroupDN) - if !ok { - return nil - } - - log.Trace("Fetching groups '%v' with filter '%s' and base '%s'", ls.GroupMemberUID, groupFilter, groupDN) - groupSearch := ldap.NewSearchRequest( - groupDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, groupFilter, - []string{ls.GroupMemberUID}, - nil) - - srg, err := l.Search(groupSearch) - if err != nil { - log.Error("LDAP group search failed: %v", err) - return nil - } else if len(srg.Entries) < 1 { - log.Error("LDAP group search failed: 0 entries") - return nil - } - - isMember := false - Entries: - for _, group := range srg.Entries { - for _, member := range group.GetAttributeValues(ls.GroupMemberUID) { - if (ls.UserUID == "dn" && member == sr.Entries[0].DN) || member == uid { - isMember = true - break Entries - } - } - } - - if !isMember { - log.Error("LDAP group membership test failed") - return nil - } - } - - if isAttributeSSHPublicKeySet { - sshPublicKey = sr.Entries[0].GetAttributeValues(ls.AttributeSSHPublicKey) - } - isAdmin := checkAdmin(l, ls, userDN) - var isRestricted bool - if !isAdmin { - isRestricted = checkRestricted(l, ls, userDN) - } - - if !directBind && ls.AttributesInBind { - // binds user (checking password) after looking-up attributes in BindDN context - err = bindUser(l, userDN, passwd) - if err != nil { - return nil - } - } - - return &SearchResult{ - Username: username, - Name: firstname, - Surname: surname, - Mail: mail, - SSHPublicKey: sshPublicKey, - IsAdmin: isAdmin, - IsRestricted: isRestricted, - } -} - -// UsePagedSearch returns if need to use paged search -func (ls *Source) UsePagedSearch() bool { - return ls.SearchPageSize > 0 -} - -// SearchEntries : search an LDAP source for all users matching userFilter -func (ls *Source) SearchEntries() ([]*SearchResult, error) { - l, err := dial(ls) - if err != nil { - log.Error("LDAP Connect error, %s:%v", ls.Host, err) - ls.Enabled = false - return nil, err - } - defer l.Close() - - if ls.BindDN != "" && ls.BindPassword != "" { - err := l.Bind(ls.BindDN, ls.BindPassword) - if err != nil { - log.Debug("Failed to bind as BindDN[%s]: %v", ls.BindDN, err) - return nil, err - } - log.Trace("Bound as BindDN %s", ls.BindDN) - } else { - log.Trace("Proceeding with anonymous LDAP search.") - } - - userFilter := fmt.Sprintf(ls.Filter, "*") - - var isAttributeSSHPublicKeySet = len(strings.TrimSpace(ls.AttributeSSHPublicKey)) > 0 - - attribs := []string{ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail} - if isAttributeSSHPublicKeySet { - attribs = append(attribs, ls.AttributeSSHPublicKey) - } - - log.Trace("Fetching attributes '%v', '%v', '%v', '%v', '%v' with filter %s and base %s", ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail, ls.AttributeSSHPublicKey, userFilter, ls.UserBase) - search := ldap.NewSearchRequest( - ls.UserBase, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, userFilter, - attribs, nil) - - var sr *ldap.SearchResult - if ls.UsePagedSearch() { - sr, err = l.SearchWithPaging(search, ls.SearchPageSize) - } else { - sr, err = l.Search(search) - } - if err != nil { - log.Error("LDAP Search failed unexpectedly! (%v)", err) - return nil, err - } - - result := make([]*SearchResult, len(sr.Entries)) - - for i, v := range sr.Entries { - result[i] = &SearchResult{ - Username: v.GetAttributeValue(ls.AttributeUsername), - Name: v.GetAttributeValue(ls.AttributeName), - Surname: v.GetAttributeValue(ls.AttributeSurname), - Mail: v.GetAttributeValue(ls.AttributeMail), - IsAdmin: checkAdmin(l, ls, v.DN), - } - if !result[i].IsAdmin { - result[i].IsRestricted = checkRestricted(l, ls, v.DN) - } - if isAttributeSSHPublicKeySet { - result[i].SSHPublicKey = v.GetAttributeValues(ls.AttributeSSHPublicKey) - } - } - - return result, nil -} diff --git a/modules/auth/oauth2/oauth2.go b/modules/auth/oauth2/oauth2.go deleted file mode 100644 index e2c97b72f..000000000 --- a/modules/auth/oauth2/oauth2.go +++ /dev/null @@ -1,291 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package oauth2 - -import ( - "net/http" - "net/url" - - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - - uuid "github.com/google/uuid" - "github.com/lafriks/xormstore" - "github.com/markbates/goth" - "github.com/markbates/goth/gothic" - "github.com/markbates/goth/providers/bitbucket" - "github.com/markbates/goth/providers/discord" - "github.com/markbates/goth/providers/dropbox" - "github.com/markbates/goth/providers/facebook" - "github.com/markbates/goth/providers/gitea" - "github.com/markbates/goth/providers/github" - "github.com/markbates/goth/providers/gitlab" - "github.com/markbates/goth/providers/google" - "github.com/markbates/goth/providers/mastodon" - "github.com/markbates/goth/providers/nextcloud" - "github.com/markbates/goth/providers/openidConnect" - "github.com/markbates/goth/providers/twitter" - "github.com/markbates/goth/providers/yandex" - "xorm.io/xorm" -) - -var ( - sessionUsersStoreKey = "gitea-oauth2-sessions" - providerHeaderKey = "gitea-oauth2-provider" -) - -// CustomURLMapping describes the urls values to use when customizing OAuth2 provider URLs -type CustomURLMapping struct { - AuthURL string - TokenURL string - ProfileURL string - EmailURL string -} - -// Init initialize the setup of the OAuth2 library -func Init(x *xorm.Engine) error { - store, err := xormstore.NewOptions(x, xormstore.Options{ - TableName: "oauth2_session", - }, []byte(sessionUsersStoreKey)) - - if err != nil { - return err - } - // according to the Goth lib: - // set the maxLength of the cookies stored on the disk to a larger number to prevent issues with: - // securecookie: the value is too long - // when using OpenID Connect , since this can contain a large amount of extra information in the id_token - - // Note, when using the FilesystemStore only the session.ID is written to a browser cookie, so this is explicit for the storage on disk - store.MaxLength(setting.OAuth2.MaxTokenLength) - gothic.Store = store - - gothic.SetState = func(req *http.Request) string { - return uuid.New().String() - } - - gothic.GetProviderName = func(req *http.Request) (string, error) { - return req.Header.Get(providerHeaderKey), nil - } - - return nil -} - -// Auth OAuth2 auth service -func Auth(provider string, request *http.Request, response http.ResponseWriter) error { - // not sure if goth is thread safe (?) when using multiple providers - request.Header.Set(providerHeaderKey, provider) - - // don't use the default gothic begin handler to prevent issues when some error occurs - // normally the gothic library will write some custom stuff to the response instead of our own nice error page - //gothic.BeginAuthHandler(response, request) - - url, err := gothic.GetAuthURL(response, request) - if err == nil { - http.Redirect(response, request, url, http.StatusTemporaryRedirect) - } - return err -} - -// ProviderCallback handles OAuth callback, resolve to a goth user and send back to original url -// this will trigger a new authentication request, but because we save it in the session we can use that -func ProviderCallback(provider string, request *http.Request, response http.ResponseWriter) (goth.User, error) { - // not sure if goth is thread safe (?) when using multiple providers - request.Header.Set(providerHeaderKey, provider) - - user, err := gothic.CompleteUserAuth(response, request) - if err != nil { - return user, err - } - - return user, nil -} - -// RegisterProvider register a OAuth2 provider in goth lib -func RegisterProvider(providerName, providerType, clientID, clientSecret, openIDConnectAutoDiscoveryURL string, customURLMapping *CustomURLMapping) error { - provider, err := createProvider(providerName, providerType, clientID, clientSecret, openIDConnectAutoDiscoveryURL, customURLMapping) - - if err == nil && provider != nil { - goth.UseProviders(provider) - } - - return err -} - -// RemoveProvider removes the given OAuth2 provider from the goth lib -func RemoveProvider(providerName string) { - delete(goth.GetProviders(), providerName) -} - -// ClearProviders clears all OAuth2 providers from the goth lib -func ClearProviders() { - goth.ClearProviders() -} - -// used to create different types of goth providers -func createProvider(providerName, providerType, clientID, clientSecret, openIDConnectAutoDiscoveryURL string, customURLMapping *CustomURLMapping) (goth.Provider, error) { - callbackURL := setting.AppURL + "user/oauth2/" + url.PathEscape(providerName) + "/callback" - - var provider goth.Provider - var err error - - switch providerType { - case "bitbucket": - provider = bitbucket.New(clientID, clientSecret, callbackURL, "account") - case "dropbox": - provider = dropbox.New(clientID, clientSecret, callbackURL) - case "facebook": - provider = facebook.New(clientID, clientSecret, callbackURL, "email") - case "github": - authURL := github.AuthURL - tokenURL := github.TokenURL - profileURL := github.ProfileURL - emailURL := github.EmailURL - if customURLMapping != nil { - if len(customURLMapping.AuthURL) > 0 { - authURL = customURLMapping.AuthURL - } - if len(customURLMapping.TokenURL) > 0 { - tokenURL = customURLMapping.TokenURL - } - if len(customURLMapping.ProfileURL) > 0 { - profileURL = customURLMapping.ProfileURL - } - if len(customURLMapping.EmailURL) > 0 { - emailURL = customURLMapping.EmailURL - } - } - provider = github.NewCustomisedURL(clientID, clientSecret, callbackURL, authURL, tokenURL, profileURL, emailURL) - case "gitlab": - authURL := gitlab.AuthURL - tokenURL := gitlab.TokenURL - profileURL := gitlab.ProfileURL - if customURLMapping != nil { - if len(customURLMapping.AuthURL) > 0 { - authURL = customURLMapping.AuthURL - } - if len(customURLMapping.TokenURL) > 0 { - tokenURL = customURLMapping.TokenURL - } - if len(customURLMapping.ProfileURL) > 0 { - profileURL = customURLMapping.ProfileURL - } - } - provider = gitlab.NewCustomisedURL(clientID, clientSecret, callbackURL, authURL, tokenURL, profileURL, "read_user") - case "gplus": // named gplus due to legacy gplus -> google migration (Google killed Google+). This ensures old connections still work - provider = google.New(clientID, clientSecret, callbackURL) - case "openidConnect": - if provider, err = openidConnect.New(clientID, clientSecret, callbackURL, openIDConnectAutoDiscoveryURL); err != nil { - log.Warn("Failed to create OpenID Connect Provider with name '%s' with url '%s': %v", providerName, openIDConnectAutoDiscoveryURL, err) - } - case "twitter": - provider = twitter.NewAuthenticate(clientID, clientSecret, callbackURL) - case "discord": - provider = discord.New(clientID, clientSecret, callbackURL, discord.ScopeIdentify, discord.ScopeEmail) - case "gitea": - authURL := gitea.AuthURL - tokenURL := gitea.TokenURL - profileURL := gitea.ProfileURL - if customURLMapping != nil { - if len(customURLMapping.AuthURL) > 0 { - authURL = customURLMapping.AuthURL - } - if len(customURLMapping.TokenURL) > 0 { - tokenURL = customURLMapping.TokenURL - } - if len(customURLMapping.ProfileURL) > 0 { - profileURL = customURLMapping.ProfileURL - } - } - provider = gitea.NewCustomisedURL(clientID, clientSecret, callbackURL, authURL, tokenURL, profileURL) - case "nextcloud": - authURL := nextcloud.AuthURL - tokenURL := nextcloud.TokenURL - profileURL := nextcloud.ProfileURL - if customURLMapping != nil { - if len(customURLMapping.AuthURL) > 0 { - authURL = customURLMapping.AuthURL - } - if len(customURLMapping.TokenURL) > 0 { - tokenURL = customURLMapping.TokenURL - } - if len(customURLMapping.ProfileURL) > 0 { - profileURL = customURLMapping.ProfileURL - } - } - provider = nextcloud.NewCustomisedURL(clientID, clientSecret, callbackURL, authURL, tokenURL, profileURL) - case "yandex": - // See https://tech.yandex.com/passport/doc/dg/reference/response-docpage/ - provider = yandex.New(clientID, clientSecret, callbackURL, "login:email", "login:info", "login:avatar") - case "mastodon": - instanceURL := mastodon.InstanceURL - if customURLMapping != nil && len(customURLMapping.AuthURL) > 0 { - instanceURL = customURLMapping.AuthURL - } - provider = mastodon.NewCustomisedURL(clientID, clientSecret, callbackURL, instanceURL) - } - - // always set the name if provider is created so we can support multiple setups of 1 provider - if err == nil && provider != nil { - provider.SetName(providerName) - } - - return provider, err -} - -// GetDefaultTokenURL return the default token url for the given provider -func GetDefaultTokenURL(provider string) string { - switch provider { - case "github": - return github.TokenURL - case "gitlab": - return gitlab.TokenURL - case "gitea": - return gitea.TokenURL - case "nextcloud": - return nextcloud.TokenURL - } - return "" -} - -// GetDefaultAuthURL return the default authorize url for the given provider -func GetDefaultAuthURL(provider string) string { - switch provider { - case "github": - return github.AuthURL - case "gitlab": - return gitlab.AuthURL - case "gitea": - return gitea.AuthURL - case "nextcloud": - return nextcloud.AuthURL - case "mastodon": - return mastodon.InstanceURL - } - return "" -} - -// GetDefaultProfileURL return the default profile url for the given provider -func GetDefaultProfileURL(provider string) string { - switch provider { - case "github": - return github.ProfileURL - case "gitlab": - return gitlab.ProfileURL - case "gitea": - return gitea.ProfileURL - case "nextcloud": - return nextcloud.ProfileURL - } - return "" -} - -// GetDefaultEmailURL return the default email url for the given provider -func GetDefaultEmailURL(provider string) string { - if provider == "github" { - return github.EmailURL - } - return "" -} diff --git a/modules/auth/org.go b/modules/auth/org.go deleted file mode 100644 index 20e2b0999..000000000 --- a/modules/auth/org.go +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/structs" - - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" -) - -// ________ .__ __ .__ -// \_____ \_______ _________ ____ |__|____________ _/ |_|__| ____ ____ -// / | \_ __ \/ ___\__ \ / \| \___ /\__ \\ __\ |/ _ \ / \ -// / | \ | \/ /_/ > __ \| | \ |/ / / __ \| | | ( <_> ) | \ -// \_______ /__| \___ (____ /___| /__/_____ \(____ /__| |__|\____/|___| / -// \/ /_____/ \/ \/ \/ \/ \/ - -// CreateOrgForm form for creating organization -type CreateOrgForm struct { - OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"` - Visibility structs.VisibleType - RepoAdminChangeTeamAccess bool -} - -// Validate validates the fields -func (f *CreateOrgForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// UpdateOrgSettingForm form for updating organization settings -type UpdateOrgSettingForm struct { - Name string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"` - FullName string `binding:"MaxSize(100)"` - Description string `binding:"MaxSize(255)"` - Website string `binding:"ValidUrl;MaxSize(255)"` - Location string `binding:"MaxSize(50)"` - Visibility structs.VisibleType - MaxRepoCreation int - RepoAdminChangeTeamAccess bool -} - -// Validate validates the fields -func (f *UpdateOrgSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ___________ -// \__ ___/___ _____ _____ -// | |_/ __ \\__ \ / \ -// | |\ ___/ / __ \| Y Y \ -// |____| \___ >____ /__|_| / -// \/ \/ \/ - -// CreateTeamForm form for creating team -type CreateTeamForm struct { - TeamName string `binding:"Required;AlphaDashDot;MaxSize(30)"` - Description string `binding:"MaxSize(255)"` - Permission string - Units []models.UnitType - RepoAccess string - CanCreateOrgRepo bool -} - -// Validate validates the fields -func (f *CreateTeamForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} diff --git a/modules/auth/pam/pam.go b/modules/auth/pam/pam.go index f21602c6b..73ecae0c2 100644 --- a/modules/auth/pam/pam.go +++ b/modules/auth/pam/pam.go @@ -1,9 +1,10 @@ -// +build pam - // Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build pam +// +build pam + package pam import ( diff --git a/modules/auth/pam/pam_stub.go b/modules/auth/pam/pam_stub.go index 02d8da3c5..815ccf2b0 100644 --- a/modules/auth/pam/pam_stub.go +++ b/modules/auth/pam/pam_stub.go @@ -1,9 +1,10 @@ -// +build !pam - // Copyright 2014 The Gogs Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !pam +// +build !pam + package pam import ( diff --git a/modules/auth/pam/pam_test.go b/modules/auth/pam/pam_test.go new file mode 100644 index 000000000..d6d78a748 --- /dev/null +++ b/modules/auth/pam/pam_test.go @@ -0,0 +1,21 @@ +//go:build pam +// +build pam + +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package pam + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestPamAuth(t *testing.T) { + result, err := Auth("gitea", "user1", "false-pwd") + assert.Error(t, err) + assert.EqualError(t, err, "Authentication failure") + assert.Len(t, result, 0) +} diff --git a/modules/auth/repo_branch_form.go b/modules/auth/repo_branch_form.go deleted file mode 100644 index a4baabe35..000000000 --- a/modules/auth/repo_branch_form.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" -) - -// NewBranchForm form for creating a new branch -type NewBranchForm struct { - NewBranchName string `binding:"Required;MaxSize(100);GitRefName"` -} - -// Validate validates the fields -func (f *NewBranchForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} diff --git a/modules/auth/repo_form.go b/modules/auth/repo_form.go deleted file mode 100644 index 78b2197a2..000000000 --- a/modules/auth/repo_form.go +++ /dev/null @@ -1,775 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "net/url" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/util" - "code.gitea.io/gitea/routers/utils" - - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" -) - -// _______________________________________ _________.______________________ _______________.___. -// \______ \_ _____/\______ \_____ \ / _____/| \__ ___/\_____ \\______ \__ | | -// | _/| __)_ | ___// | \ \_____ \ | | | | / | \| _// | | -// | | \| \ | | / | \/ \| | | | / | \ | \\____ | -// |____|_ /_______ / |____| \_______ /_______ /|___| |____| \_______ /____|_ // ______| -// \/ \/ \/ \/ \/ \/ \/ - -// CreateRepoForm form for creating repository -type CreateRepoForm struct { - UID int64 `binding:"Required"` - RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"` - Private bool - Description string `binding:"MaxSize(255)"` - DefaultBranch string `binding:"GitRefName;MaxSize(100)"` - AutoInit bool - Gitignores string - IssueLabels string - License string - Readme string - Template bool - - RepoTemplate int64 - GitContent bool - Topics bool - GitHooks bool - Webhooks bool - Avatar bool - Labels bool - TrustModel string -} - -// Validate validates the fields -func (f *CreateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// MigrateRepoForm form for migrating repository -// this is used to interact with web ui -type MigrateRepoForm struct { - // required: true - CloneAddr string `json:"clone_addr" binding:"Required"` - Service structs.GitServiceType `json:"service"` - AuthUsername string `json:"auth_username"` - AuthPassword string `json:"auth_password"` - AuthToken string `json:"auth_token"` - // required: true - UID int64 `json:"uid" binding:"Required"` - // required: true - RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"` - Mirror bool `json:"mirror"` - Private bool `json:"private"` - Description string `json:"description" binding:"MaxSize(255)"` - Wiki bool `json:"wiki"` - Milestones bool `json:"milestones"` - Labels bool `json:"labels"` - Issues bool `json:"issues"` - PullRequests bool `json:"pull_requests"` - Releases bool `json:"releases"` - MirrorInterval string `json:"mirror_interval"` -} - -// Validate validates the fields -func (f *MigrateRepoForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ParseRemoteAddr checks if given remote address is valid, -// and returns composed URL with needed username and password. -// It also checks if given user has permission when remote address -// is actually a local path. -func ParseRemoteAddr(remoteAddr, authUsername, authPassword string, user *models.User) (string, error) { - remoteAddr = strings.TrimSpace(remoteAddr) - // Remote address can be HTTP/HTTPS/Git URL or local path. - if strings.HasPrefix(remoteAddr, "http://") || - strings.HasPrefix(remoteAddr, "https://") || - strings.HasPrefix(remoteAddr, "git://") { - u, err := url.Parse(remoteAddr) - if err != nil { - return "", models.ErrInvalidCloneAddr{IsURLError: true} - } - if len(authUsername)+len(authPassword) > 0 { - u.User = url.UserPassword(authUsername, authPassword) - } - remoteAddr = u.String() - if u.Scheme == "git" && u.Port() != "" && (strings.Contains(remoteAddr, "%0d") || strings.Contains(remoteAddr, "%0a")) { - return "", models.ErrInvalidCloneAddr{IsURLError: true} - } - } else if !user.CanImportLocal() { - return "", models.ErrInvalidCloneAddr{IsPermissionDenied: true} - } else { - isDir, err := util.IsDir(remoteAddr) - if err != nil { - log.Error("Unable to check if %s is a directory: %v", remoteAddr, err) - return "", err - } - if !isDir { - return "", models.ErrInvalidCloneAddr{IsInvalidPath: true} - } - } - - return remoteAddr, nil -} - -// RepoSettingForm form for changing repository settings -type RepoSettingForm struct { - RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"` - Description string `binding:"MaxSize(255)"` - Website string `binding:"ValidUrl;MaxSize(255)"` - Interval string - MirrorAddress string - MirrorUsername string - MirrorPassword string - Private bool - Template bool - EnablePrune bool - - // Advanced settings - EnableWiki bool - EnableExternalWiki bool - ExternalWikiURL string - EnableIssues bool - EnableExternalTracker bool - ExternalTrackerURL string - TrackerURLFormat string - TrackerIssueStyle string - EnableProjects bool - EnablePulls bool - PullsIgnoreWhitespace bool - PullsAllowMerge bool - PullsAllowRebase bool - PullsAllowRebaseMerge bool - PullsAllowSquash bool - EnableTimetracker bool - AllowOnlyContributorsToTrackTime bool - EnableIssueDependencies bool - IsArchived bool - - // Signing Settings - TrustModel string - - // Admin settings - EnableHealthCheck bool - EnableCloseIssuesViaCommitInAnyBranch bool -} - -// Validate validates the fields -func (f *RepoSettingForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// __________ .__ -// \______ \____________ ____ ____ | |__ -// | | _/\_ __ \__ \ / \_/ ___\| | \ -// | | \ | | \// __ \| | \ \___| Y \ -// |______ / |__| (____ /___| /\___ >___| / -// \/ \/ \/ \/ \/ - -// ProtectBranchForm form for changing protected branch settings -type ProtectBranchForm struct { - Protected bool - EnablePush string - WhitelistUsers string - WhitelistTeams string - WhitelistDeployKeys bool - EnableMergeWhitelist bool - MergeWhitelistUsers string - MergeWhitelistTeams string - EnableStatusCheck bool - StatusCheckContexts []string - RequiredApprovals int64 - EnableApprovalsWhitelist bool - ApprovalsWhitelistUsers string - ApprovalsWhitelistTeams string - BlockOnRejectedReviews bool - BlockOnOfficialReviewRequests bool - BlockOnOutdatedBranch bool - DismissStaleApprovals bool - RequireSignedCommits bool - ProtectedFilePatterns string -} - -// Validate validates the fields -func (f *ProtectBranchForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// __ __ ___. .__ .__ __ -// / \ / \ ____\_ |__ | |__ | |__ ____ | | __ -// \ \/\/ // __ \| __ \| | \| | \ / _ \| |/ / -// \ /\ ___/| \_\ \ Y \ Y ( <_> ) < -// \__/\ / \___ >___ /___| /___| /\____/|__|_ \ -// \/ \/ \/ \/ \/ \/ - -// WebhookForm form for changing web hook -type WebhookForm struct { - Events string - Create bool - Delete bool - Fork bool - Issues bool - IssueAssign bool - IssueLabel bool - IssueMilestone bool - IssueComment bool - Release bool - Push bool - PullRequest bool - PullRequestAssign bool - PullRequestLabel bool - PullRequestMilestone bool - PullRequestComment bool - PullRequestReview bool - PullRequestSync bool - Repository bool - Active bool - BranchFilter string `binding:"GlobPattern"` -} - -// PushOnly if the hook will be triggered when push -func (f WebhookForm) PushOnly() bool { - return f.Events == "push_only" -} - -// SendEverything if the hook will be triggered any event -func (f WebhookForm) SendEverything() bool { - return f.Events == "send_everything" -} - -// ChooseEvents if the hook will be triggered choose events -func (f WebhookForm) ChooseEvents() bool { - return f.Events == "choose_events" -} - -// NewWebhookForm form for creating web hook -type NewWebhookForm struct { - PayloadURL string `binding:"Required;ValidUrl"` - HTTPMethod string `binding:"Required;In(POST,GET)"` - ContentType int `binding:"Required"` - Secret string - WebhookForm -} - -// Validate validates the fields -func (f *NewWebhookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewGogshookForm form for creating gogs hook -type NewGogshookForm struct { - PayloadURL string `binding:"Required;ValidUrl"` - ContentType int `binding:"Required"` - Secret string - WebhookForm -} - -// Validate validates the fields -func (f *NewGogshookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewSlackHookForm form for creating slack hook -type NewSlackHookForm struct { - PayloadURL string `binding:"Required;ValidUrl"` - Channel string `binding:"Required"` - Username string - IconURL string - Color string - WebhookForm -} - -// Validate validates the fields -func (f *NewSlackHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// HasInvalidChannel validates the channel name is in the right format -func (f NewSlackHookForm) HasInvalidChannel() bool { - return !utils.IsValidSlackChannel(f.Channel) -} - -// NewDiscordHookForm form for creating discord hook -type NewDiscordHookForm struct { - PayloadURL string `binding:"Required;ValidUrl"` - Username string - IconURL string - WebhookForm -} - -// Validate validates the fields -func (f *NewDiscordHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewDingtalkHookForm form for creating dingtalk hook -type NewDingtalkHookForm struct { - PayloadURL string `binding:"Required;ValidUrl"` - WebhookForm -} - -// Validate validates the fields -func (f *NewDingtalkHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewTelegramHookForm form for creating telegram hook -type NewTelegramHookForm struct { - BotToken string `binding:"Required"` - ChatID string `binding:"Required"` - WebhookForm -} - -// Validate validates the fields -func (f *NewTelegramHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewMatrixHookForm form for creating Matrix hook -type NewMatrixHookForm struct { - HomeserverURL string `binding:"Required;ValidUrl"` - RoomID string `binding:"Required"` - AccessToken string `binding:"Required"` - MessageType int - WebhookForm -} - -// Validate validates the fields -func (f *NewMatrixHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewMSTeamsHookForm form for creating MS Teams hook -type NewMSTeamsHookForm struct { - PayloadURL string `binding:"Required;ValidUrl"` - WebhookForm -} - -// Validate validates the fields -func (f *NewMSTeamsHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewFeishuHookForm form for creating feishu hook -type NewFeishuHookForm struct { - PayloadURL string `binding:"Required;ValidUrl"` - WebhookForm -} - -// Validate validates the fields -func (f *NewFeishuHookForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// .___ -// | | ______ ________ __ ____ -// | |/ ___// ___/ | \_/ __ \ -// | |\___ \ \___ \| | /\ ___/ -// |___/____ >____ >____/ \___ > -// \/ \/ \/ - -// CreateIssueForm form for creating issue -type CreateIssueForm struct { - Title string `binding:"Required;MaxSize(255)"` - LabelIDs string `form:"label_ids"` - AssigneeIDs string `form:"assignee_ids"` - Ref string `form:"ref"` - MilestoneID int64 - ProjectID int64 - AssigneeID int64 - Content string - Files []string -} - -// Validate validates the fields -func (f *CreateIssueForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// CreateCommentForm form for creating comment -type CreateCommentForm struct { - Content string - Status string `binding:"OmitEmpty;In(reopen,close)"` - Files []string -} - -// Validate validates the fields -func (f *CreateCommentForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ReactionForm form for adding and removing reaction -type ReactionForm struct { - Content string `binding:"Required"` -} - -// Validate validates the fields -func (f *ReactionForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// IssueLockForm form for locking an issue -type IssueLockForm struct { - Reason string `binding:"Required"` -} - -// Validate validates the fields -func (i *IssueLockForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, i, ctx.Locale) -} - -// HasValidReason checks to make sure that the reason submitted in -// the form matches any of the values in the config -func (i IssueLockForm) HasValidReason() bool { - if strings.TrimSpace(i.Reason) == "" { - return true - } - - for _, v := range setting.Repository.Issue.LockReasons { - if v == i.Reason { - return true - } - } - - return false -} - -// __________ __ __ -// \______ \_______ ____ |__| ____ _____/ |_ ______ -// | ___/\_ __ \/ _ \ | |/ __ \_/ ___\ __\/ ___/ -// | | | | \( <_> ) | \ ___/\ \___| | \___ \ -// |____| |__| \____/\__| |\___ >\___ >__| /____ > -// \______| \/ \/ \/ - -// CreateProjectForm form for creating a project -type CreateProjectForm struct { - Title string `binding:"Required;MaxSize(100)"` - Content string - BoardType models.ProjectBoardType -} - -// UserCreateProjectForm is a from for creating an individual or organization -// form. -type UserCreateProjectForm struct { - Title string `binding:"Required;MaxSize(100)"` - Content string - BoardType models.ProjectBoardType - UID int64 `binding:"Required"` -} - -// EditProjectBoardTitleForm is a form for editing the title of a project's -// board -type EditProjectBoardTitleForm struct { - Title string `binding:"Required;MaxSize(100)"` -} - -// _____ .__.__ __ -// / \ |__| | ____ _______/ |_ ____ ____ ____ -// / \ / \| | | _/ __ \ / ___/\ __\/ _ \ / \_/ __ \ -// / Y \ | |_\ ___/ \___ \ | | ( <_> ) | \ ___/ -// \____|__ /__|____/\___ >____ > |__| \____/|___| /\___ > -// \/ \/ \/ \/ \/ - -// CreateMilestoneForm form for creating milestone -type CreateMilestoneForm struct { - Title string `binding:"Required;MaxSize(50)"` - Content string - Deadline string -} - -// Validate validates the fields -func (f *CreateMilestoneForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// .____ ___. .__ -// | | _____ \_ |__ ____ | | -// | | \__ \ | __ \_/ __ \| | -// | |___ / __ \| \_\ \ ___/| |__ -// |_______ (____ /___ /\___ >____/ -// \/ \/ \/ \/ - -// CreateLabelForm form for creating label -type CreateLabelForm struct { - ID int64 - Title string `binding:"Required;MaxSize(50)" locale:"repo.issues.label_title"` - Description string `binding:"MaxSize(200)" locale:"repo.issues.label_description"` - Color string `binding:"Required;Size(7)" locale:"repo.issues.label_color"` -} - -// Validate validates the fields -func (f *CreateLabelForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// InitializeLabelsForm form for initializing labels -type InitializeLabelsForm struct { - TemplateName string `binding:"Required"` -} - -// Validate validates the fields -func (f *InitializeLabelsForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// __________ .__ .__ __________ __ -// \______ \__ __| | | | \______ \ ____ ________ __ ____ _______/ |_ -// | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\ -// | | | | / |_| |__ | | \ ___< <_| | | /\ ___/ \___ \ | | -// |____| |____/|____/____/ |____|_ /\___ >__ |____/ \___ >____ > |__| -// \/ \/ |__| \/ \/ - -// MergePullRequestForm form for merging Pull Request -// swagger:model MergePullRequestOption -type MergePullRequestForm struct { - // required: true - // enum: merge,rebase,rebase-merge,squash - Do string `binding:"Required;In(merge,rebase,rebase-merge,squash)"` - MergeTitleField string - MergeMessageField string - ForceMerge *bool `json:"force_merge,omitempty"` -} - -// Validate validates the fields -func (f *MergePullRequestForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// CodeCommentForm form for adding code comments for PRs -type CodeCommentForm struct { - Origin string `binding:"Required;In(timeline,diff)"` - Content string `binding:"Required"` - Side string `binding:"Required;In(previous,proposed)"` - Line int64 - TreePath string `form:"path" binding:"Required"` - IsReview bool `form:"is_review"` - Reply int64 `form:"reply"` - LatestCommitID string -} - -// Validate validates the fields -func (f *CodeCommentForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// SubmitReviewForm for submitting a finished code review -type SubmitReviewForm struct { - Content string - Type string `binding:"Required;In(approve,comment,reject)"` - CommitID string -} - -// Validate validates the fields -func (f *SubmitReviewForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ReviewType will return the corresponding reviewtype for type -func (f SubmitReviewForm) ReviewType() models.ReviewType { - switch f.Type { - case "approve": - return models.ReviewTypeApprove - case "comment": - return models.ReviewTypeComment - case "reject": - return models.ReviewTypeReject - default: - return models.ReviewTypeUnknown - } -} - -// HasEmptyContent checks if the content of the review form is empty. -func (f SubmitReviewForm) HasEmptyContent() bool { - reviewType := f.ReviewType() - - return (reviewType == models.ReviewTypeComment || reviewType == models.ReviewTypeReject) && - len(strings.TrimSpace(f.Content)) == 0 -} - -// __________ .__ -// \______ \ ____ | | ____ _____ ______ ____ -// | _// __ \| | _/ __ \\__ \ / ___// __ \ -// | | \ ___/| |_\ ___/ / __ \_\___ \\ ___/ -// |____|_ /\___ >____/\___ >____ /____ >\___ > -// \/ \/ \/ \/ \/ \/ - -// NewReleaseForm form for creating release -type NewReleaseForm struct { - TagName string `binding:"Required;GitRefName;MaxSize(255)"` - Target string `form:"tag_target" binding:"Required;MaxSize(255)"` - Title string `binding:"Required;MaxSize(255)"` - Content string - Draft string - Prerelease bool - Files []string -} - -// Validate validates the fields -func (f *NewReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// EditReleaseForm form for changing release -type EditReleaseForm struct { - Title string `form:"title" binding:"Required;MaxSize(255)"` - Content string `form:"content"` - Draft string `form:"draft"` - Prerelease bool `form:"prerelease"` - Files []string -} - -// Validate validates the fields -func (f *EditReleaseForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// __ __.__ __ .__ -// / \ / \__| | _|__| -// \ \/\/ / | |/ / | -// \ /| | <| | -// \__/\ / |__|__|_ \__| -// \/ \/ - -// NewWikiForm form for creating wiki -type NewWikiForm struct { - Title string `binding:"Required"` - Content string `binding:"Required"` - Message string -} - -// Validate validates the fields -// FIXME: use code generation to generate this method. -func (f *NewWikiForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ___________ .___.__ __ -// \_ _____/ __| _/|__|/ |_ -// | __)_ / __ | | \ __\ -// | \/ /_/ | | || | -// /_______ /\____ | |__||__| -// \/ \/ - -// EditRepoFileForm form for changing repository file -type EditRepoFileForm struct { - TreePath string `binding:"Required;MaxSize(500)"` - Content string - CommitSummary string `binding:"MaxSize(100)"` - CommitMessage string - CommitChoice string `binding:"Required;MaxSize(50)"` - NewBranchName string `binding:"GitRefName;MaxSize(100)"` - LastCommit string -} - -// Validate validates the fields -func (f *EditRepoFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// EditPreviewDiffForm form for changing preview diff -type EditPreviewDiffForm struct { - Content string -} - -// Validate validates the fields -func (f *EditPreviewDiffForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ____ ___ .__ .___ -// | | \______ | | _________ __| _/ -// | | /\____ \| | / _ \__ \ / __ | -// | | / | |_> > |_( <_> ) __ \_/ /_/ | -// |______/ | __/|____/\____(____ /\____ | -// |__| \/ \/ -// - -// UploadRepoFileForm form for uploading repository file -type UploadRepoFileForm struct { - TreePath string `binding:"MaxSize(500)"` - CommitSummary string `binding:"MaxSize(100)"` - CommitMessage string - CommitChoice string `binding:"Required;MaxSize(50)"` - NewBranchName string `binding:"GitRefName;MaxSize(100)"` - Files []string -} - -// Validate validates the fields -func (f *UploadRepoFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// RemoveUploadFileForm form for removing uploaded file -type RemoveUploadFileForm struct { - File string `binding:"Required;MaxSize(50)"` -} - -// Validate validates the fields -func (f *RemoveUploadFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ________ .__ __ -// \______ \ ____ | | _____/ |_ ____ -// | | \_/ __ \| | _/ __ \ __\/ __ \ -// | ` \ ___/| |_\ ___/| | \ ___/ -// /_______ /\___ >____/\___ >__| \___ > -// \/ \/ \/ \/ - -// DeleteRepoFileForm form for deleting repository file -type DeleteRepoFileForm struct { - CommitSummary string `binding:"MaxSize(100)"` - CommitMessage string - CommitChoice string `binding:"Required;MaxSize(50)"` - NewBranchName string `binding:"GitRefName;MaxSize(100)"` - LastCommit string -} - -// Validate validates the fields -func (f *DeleteRepoFileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ___________.__ ___________ __ -// \__ ___/|__| _____ ____ \__ ___/___________ ____ | | __ ___________ -// | | | |/ \_/ __ \ | | \_ __ \__ \ _/ ___\| |/ // __ \_ __ \ -// | | | | Y Y \ ___/ | | | | \// __ \\ \___| <\ ___/| | \/ -// |____| |__|__|_| /\___ > |____| |__| (____ /\___ >__|_ \\___ >__| -// \/ \/ \/ \/ \/ \/ - -// AddTimeManuallyForm form that adds spent time manually. -type AddTimeManuallyForm struct { - Hours int `binding:"Range(0,1000)"` - Minutes int `binding:"Range(0,1000)"` -} - -// Validate validates the fields -func (f *AddTimeManuallyForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// SaveTopicForm form for save topics for repository -type SaveTopicForm struct { - Topics []string `binding:"topics;Required;"` -} - -// DeadlineForm hold the validation rules for deadlines -type DeadlineForm struct { - DateString string `form:"date" binding:"Required;Size(10)"` -} - -// Validate validates the fields -func (f *DeadlineForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} diff --git a/modules/auth/sso/basic.go b/modules/auth/sso/basic.go deleted file mode 100644 index d2d25c6ce..000000000 --- a/modules/auth/sso/basic.go +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package sso - -import ( - "net/http" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/timeutil" -) - -// Ensure the struct implements the interface. -var ( - _ SingleSignOn = &Basic{} -) - -// Basic implements the SingleSignOn interface and authenticates requests (API requests -// only) by looking for Basic authentication data or "x-oauth-basic" token in the "Authorization" -// header. -type Basic struct { -} - -// Init does nothing as the Basic implementation does not need to allocate any resources -func (b *Basic) Init() error { - return nil -} - -// Free does nothing as the Basic implementation does not have to release any resources -func (b *Basic) Free() error { - return nil -} - -// IsEnabled returns true as this plugin is enabled by default and its not possible to disable -// it from settings. -func (b *Basic) IsEnabled() bool { - return setting.Service.EnableBasicAuth -} - -// VerifyAuthData extracts and validates Basic data (username and password/token) from the -// "Authorization" header of the request and returns the corresponding user object for that -// name/token on successful validation. -// Returns nil if header is empty or validation fails. -func (b *Basic) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { - baHead := req.Header.Get("Authorization") - if len(baHead) == 0 { - return nil - } - - auths := strings.Fields(baHead) - if len(auths) != 2 || (auths[0] != "Basic" && auths[0] != "basic") { - return nil - } - - var u *models.User - uname, passwd, _ := base.BasicAuthDecode(auths[1]) - - // Check if username or password is a token - isUsernameToken := len(passwd) == 0 || passwd == "x-oauth-basic" - // Assume username is token - authToken := uname - if !isUsernameToken { - // Assume password is token - authToken = passwd - } - - uid := CheckOAuthAccessToken(authToken) - if uid != 0 { - var err error - store.GetData()["IsApiToken"] = true - - u, err = models.GetUserByID(uid) - if err != nil { - log.Error("GetUserByID: %v", err) - return nil - } - } - token, err := models.GetAccessTokenBySHA(authToken) - if err == nil { - u, err = models.GetUserByID(token.UID) - if err != nil { - log.Error("GetUserByID: %v", err) - return nil - } - - token.UpdatedUnix = timeutil.TimeStampNow() - if err = models.UpdateAccessToken(token); err != nil { - log.Error("UpdateAccessToken: %v", err) - } - } else if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) { - log.Error("GetAccessTokenBySha: %v", err) - } - - if u == nil { - u, err = models.UserSignIn(uname, passwd) - if err != nil { - if !models.IsErrUserNotExist(err) { - log.Error("UserSignIn: %v", err) - } - return nil - } - } else { - store.GetData()["IsApiToken"] = true - } - - return u -} diff --git a/modules/auth/sso/interface.go b/modules/auth/sso/interface.go deleted file mode 100644 index c957fad02..000000000 --- a/modules/auth/sso/interface.go +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package sso - -import ( - "net/http" - - "code.gitea.io/gitea/models" -) - -// DataStore represents a data store -type DataStore interface { - GetData() map[string]interface{} -} - -// SessionStore represents a session store -type SessionStore interface { - Get(interface{}) interface{} - Set(interface{}, interface{}) error - Delete(interface{}) error -} - -// SingleSignOn represents a SSO authentication method (plugin) for HTTP requests. -type SingleSignOn interface { - // Init should be called exactly once before using any of the other methods, - // in order to allow the plugin to allocate necessary resources - Init() error - - // Free should be called exactly once before application closes, in order to - // give chance to the plugin to free any allocated resources - Free() error - - // IsEnabled checks if the current SSO method has been enabled in settings. - IsEnabled() bool - - // VerifyAuthData tries to verify the SSO authentication data contained in the request. - // If verification is successful returns either an existing user object (with id > 0) - // or a new user object (with id = 0) populated with the information that was found - // in the authentication data (username or email). - // Returns nil if verification fails. - VerifyAuthData(http *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User -} diff --git a/modules/auth/sso/oauth2.go b/modules/auth/sso/oauth2.go deleted file mode 100644 index fc22e2728..000000000 --- a/modules/auth/sso/oauth2.go +++ /dev/null @@ -1,140 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package sso - -import ( - "net/http" - "strings" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/timeutil" -) - -// Ensure the struct implements the interface. -var ( - _ SingleSignOn = &OAuth2{} -) - -// CheckOAuthAccessToken returns uid of user from oauth token -func CheckOAuthAccessToken(accessToken string) int64 { - // JWT tokens require a "." - if !strings.Contains(accessToken, ".") { - return 0 - } - token, err := models.ParseOAuth2Token(accessToken) - if err != nil { - log.Trace("ParseOAuth2Token: %v", err) - return 0 - } - var grant *models.OAuth2Grant - if grant, err = models.GetOAuth2GrantByID(token.GrantID); err != nil || grant == nil { - return 0 - } - if token.Type != models.TypeAccessToken { - return 0 - } - if token.ExpiresAt < time.Now().Unix() || token.IssuedAt > time.Now().Unix() { - return 0 - } - return grant.UserID -} - -// OAuth2 implements the SingleSignOn interface and authenticates requests -// (API requests only) by looking for an OAuth token in query parameters or the -// "Authorization" header. -type OAuth2 struct { -} - -// Init does nothing as the OAuth2 implementation does not need to allocate any resources -func (o *OAuth2) Init() error { - return nil -} - -// Free does nothing as the OAuth2 implementation does not have to release any resources -func (o *OAuth2) Free() error { - return nil -} - -// userIDFromToken returns the user id corresponding to the OAuth token. -func (o *OAuth2) userIDFromToken(req *http.Request, store DataStore) int64 { - // Check access token. - tokenSHA := req.Form.Get("token") - if len(tokenSHA) == 0 { - tokenSHA = req.Form.Get("access_token") - } - if len(tokenSHA) == 0 { - // Well, check with header again. - auHead := req.Header.Get("Authorization") - if len(auHead) > 0 { - auths := strings.Fields(auHead) - if len(auths) == 2 && (auths[0] == "token" || strings.ToLower(auths[0]) == "bearer") { - tokenSHA = auths[1] - } - } - } - if len(tokenSHA) == 0 { - return 0 - } - - // Let's see if token is valid. - if strings.Contains(tokenSHA, ".") { - uid := CheckOAuthAccessToken(tokenSHA) - if uid != 0 { - store.GetData()["IsApiToken"] = true - } - return uid - } - t, err := models.GetAccessTokenBySHA(tokenSHA) - if err != nil { - if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) { - log.Error("GetAccessTokenBySHA: %v", err) - } - return 0 - } - t.UpdatedUnix = timeutil.TimeStampNow() - if err = models.UpdateAccessToken(t); err != nil { - log.Error("UpdateAccessToken: %v", err) - } - store.GetData()["IsApiToken"] = true - return t.UID -} - -// IsEnabled returns true as this plugin is enabled by default and its not possible -// to disable it from settings. -func (o *OAuth2) IsEnabled() bool { - return true -} - -// VerifyAuthData extracts the user ID from the OAuth token in the query parameters -// or the "Authorization" header and returns the corresponding user object for that ID. -// If verification is successful returns an existing user object. -// Returns nil if verification fails. -func (o *OAuth2) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { - if !models.HasEngine { - return nil - } - - if isInternalPath(req) || !isAPIPath(req) && !isAttachmentDownload(req) { - return nil - } - - id := o.userIDFromToken(req, store) - if id <= 0 { - return nil - } - - user, err := models.GetUserByID(id) - if err != nil { - if !models.IsErrUserNotExist(err) { - log.Error("GetUserByName: %v", err) - } - return nil - } - - return user -} diff --git a/modules/auth/sso/reverseproxy.go b/modules/auth/sso/reverseproxy.go deleted file mode 100644 index ca9450e71..000000000 --- a/modules/auth/sso/reverseproxy.go +++ /dev/null @@ -1,114 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package sso - -import ( - "net/http" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - - gouuid "github.com/google/uuid" -) - -// Ensure the struct implements the interface. -var ( - _ SingleSignOn = &ReverseProxy{} -) - -// ReverseProxy implements the SingleSignOn interface, but actually relies on -// a reverse proxy for authentication of users. -// On successful authentication the proxy is expected to populate the username in the -// "setting.ReverseProxyAuthUser" header. Optionally it can also populate the email of the -// user in the "setting.ReverseProxyAuthEmail" header. -type ReverseProxy struct { -} - -// getUserName extracts the username from the "setting.ReverseProxyAuthUser" header -func (r *ReverseProxy) getUserName(req *http.Request) string { - webAuthUser := strings.TrimSpace(req.Header.Get(setting.ReverseProxyAuthUser)) - if len(webAuthUser) == 0 { - return "" - } - return webAuthUser -} - -// Init does nothing as the ReverseProxy implementation does not need initialization -func (r *ReverseProxy) Init() error { - return nil -} - -// Free does nothing as the ReverseProxy implementation does not have to release resources -func (r *ReverseProxy) Free() error { - return nil -} - -// IsEnabled checks if EnableReverseProxyAuth setting is true -func (r *ReverseProxy) IsEnabled() bool { - return setting.Service.EnableReverseProxyAuth -} - -// VerifyAuthData extracts the username from the "setting.ReverseProxyAuthUser" header -// of the request and returns the corresponding user object for that name. -// Verification of header data is not performed as it should have already been done by -// the revese proxy. -// If a username is available in the "setting.ReverseProxyAuthUser" header an existing -// user object is returned (populated with username or email found in header). -// Returns nil if header is empty. -func (r *ReverseProxy) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { - username := r.getUserName(req) - if len(username) == 0 { - return nil - } - - user, err := models.GetUserByName(username) - if err != nil { - if models.IsErrUserNotExist(err) && r.isAutoRegisterAllowed() { - return r.newUser(req) - } - log.Error("GetUserByName: %v", err) - return nil - } - - return user -} - -// isAutoRegisterAllowed checks if EnableReverseProxyAutoRegister setting is true -func (r *ReverseProxy) isAutoRegisterAllowed() bool { - return setting.Service.EnableReverseProxyAutoRegister -} - -// newUser creates a new user object for the purpose of automatic registration -// and populates its name and email with the information present in request headers. -func (r *ReverseProxy) newUser(req *http.Request) *models.User { - username := r.getUserName(req) - if len(username) == 0 { - return nil - } - - email := gouuid.New().String() + "@localhost" - if setting.Service.EnableReverseProxyEmail { - webAuthEmail := req.Header.Get(setting.ReverseProxyAuthEmail) - if len(webAuthEmail) > 0 { - email = webAuthEmail - } - } - - user := &models.User{ - Name: username, - Email: email, - Passwd: username, - IsActive: true, - } - if err := models.CreateUser(user); err != nil { - // FIXME: should I create a system notice? - log.Error("CreateUser: %v", err) - return nil - } - return user -} diff --git a/modules/auth/sso/session.go b/modules/auth/sso/session.go deleted file mode 100644 index 7a546577d..000000000 --- a/modules/auth/sso/session.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package sso - -import ( - "net/http" - - "code.gitea.io/gitea/models" -) - -// Ensure the struct implements the interface. -var ( - _ SingleSignOn = &Session{} -) - -// Session checks if there is a user uid stored in the session and returns the user -// object for that uid. -type Session struct { -} - -// Init does nothing as the Session implementation does not need to allocate any resources -func (s *Session) Init() error { - return nil -} - -// Free does nothing as the Session implementation does not have to release any resources -func (s *Session) Free() error { - return nil -} - -// IsEnabled returns true as this plugin is enabled by default and its not possible to disable -// it from settings. -func (s *Session) IsEnabled() bool { - return true -} - -// VerifyAuthData checks if there is a user uid stored in the session and returns the user -// object for that uid. -// Returns nil if there is no user uid stored in the session. -func (s *Session) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { - user := SessionUser(sess) - if user != nil { - return user - } - return nil -} diff --git a/modules/auth/sso/sso.go b/modules/auth/sso/sso.go deleted file mode 100644 index d54310168..000000000 --- a/modules/auth/sso/sso.go +++ /dev/null @@ -1,146 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package sso - -import ( - "fmt" - "net/http" - "reflect" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/middlewares" - "code.gitea.io/gitea/modules/setting" -) - -// ssoMethods contains the list of SSO authentication plugins in the order they are expected to be -// executed. -// -// The OAuth2 plugin is expected to be executed first, as it must ignore the user id stored -// in the session (if there is a user id stored in session other plugins might return the user -// object for that id). -// -// The Session plugin is expected to be executed second, in order to skip authentication -// for users that have already signed in. -var ssoMethods = []SingleSignOn{ - &OAuth2{}, - &Session{}, - &ReverseProxy{}, - &Basic{}, -} - -// The purpose of the following three function variables is to let the linter know that -// those functions are not dead code and are actually being used -var ( - _ = handleSignIn -) - -// Methods returns the instances of all registered SSO methods -func Methods() []SingleSignOn { - return ssoMethods -} - -// Register adds the specified instance to the list of available SSO methods -func Register(method SingleSignOn) { - ssoMethods = append(ssoMethods, method) -} - -// Init should be called exactly once when the application starts to allow SSO plugins -// to allocate necessary resources -func Init() { - for _, method := range Methods() { - err := method.Init() - if err != nil { - log.Error("Could not initialize '%s' SSO method, error: %s", reflect.TypeOf(method).String(), err) - } - } -} - -// Free should be called exactly once when the application is terminating to allow SSO plugins -// to release necessary resources -func Free() { - for _, method := range Methods() { - err := method.Free() - if err != nil { - log.Error("Could not free '%s' SSO method, error: %s", reflect.TypeOf(method).String(), err) - } - } -} - -// SessionUser returns the user object corresponding to the "uid" session variable. -func SessionUser(sess SessionStore) *models.User { - // Get user ID - uid := sess.Get("uid") - if uid == nil { - return nil - } - id, ok := uid.(int64) - if !ok { - return nil - } - - // Get user object - user, err := models.GetUserByID(id) - if err != nil { - if !models.IsErrUserNotExist(err) { - log.Error("GetUserById: %v", err) - } - return nil - } - return user -} - -// isAPIPath returns true if the specified URL is an API path -func isAPIPath(req *http.Request) bool { - return strings.HasPrefix(req.URL.Path, "/api/") -} - -// isInternalPath returns true if the specified URL is an internal API path -func isInternalPath(req *http.Request) bool { - return strings.HasPrefix(req.URL.Path, "/api/internal/") -} - -// isAttachmentDownload check if request is a file download (GET) with URL to an attachment -func isAttachmentDownload(req *http.Request) bool { - return strings.HasPrefix(req.URL.Path, "/attachments/") && req.Method == "GET" -} - -// handleSignIn clears existing session variables and stores new ones for the specified user object -func handleSignIn(resp http.ResponseWriter, req *http.Request, sess SessionStore, user *models.User) { - _ = sess.Delete("openid_verified_uri") - _ = sess.Delete("openid_signin_remember") - _ = sess.Delete("openid_determined_email") - _ = sess.Delete("openid_determined_username") - _ = sess.Delete("twofaUid") - _ = sess.Delete("twofaRemember") - _ = sess.Delete("u2fChallenge") - _ = sess.Delete("linkAccount") - err := sess.Set("uid", user.ID) - if err != nil { - log.Error(fmt.Sprintf("Error setting session: %v", err)) - } - err = sess.Set("uname", user.Name) - if err != nil { - log.Error(fmt.Sprintf("Error setting session: %v", err)) - } - - // Language setting of the user overwrites the one previously set - // If the user does not have a locale set, we save the current one. - if len(user.Language) == 0 { - lc := middlewares.Locale(resp, req) - user.Language = lc.Language() - if err := models.UpdateUserCols(user, "language"); err != nil { - log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", user.ID, user.Language)) - return - } - } - - middlewares.SetCookie(resp, "lang", user.Language, nil, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - - // Clear whatever CSRF has right now, force to generate a new one - middlewares.SetCookie(resp, setting.CSRFCookieName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) -} diff --git a/modules/auth/sso/user.go b/modules/auth/sso/user.go deleted file mode 100644 index 48eebb1e9..000000000 --- a/modules/auth/sso/user.go +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package sso - -import ( - "net/http" - - "code.gitea.io/gitea/models" -) - -// SignedInUser returns the user object of signed user. -// It returns a bool value to indicate whether user uses basic auth or not. -func SignedInUser(req *http.Request, w http.ResponseWriter, ds DataStore, sess SessionStore) (*models.User, bool) { - if !models.HasEngine { - return nil, false - } - - // Try to sign in with each of the enabled plugins - for _, ssoMethod := range Methods() { - if !ssoMethod.IsEnabled() { - continue - } - user := ssoMethod.VerifyAuthData(req, w, ds, sess) - if user != nil { - _, isBasic := ssoMethod.(*Basic) - return user, isBasic - } - } - - return nil, false -} diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go deleted file mode 100644 index b94b8e0a4..000000000 --- a/modules/auth/user_form.go +++ /dev/null @@ -1,366 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "mime/multipart" - "strings" - - "code.gitea.io/gitea/modules/setting" - - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" -) - -// InstallForm form for installation page -type InstallForm struct { - DbType string `binding:"Required"` - DbHost string - DbUser string - DbPasswd string - DbName string - SSLMode string - Charset string `binding:"Required;In(utf8,utf8mb4)"` - DbPath string - DbSchema string - - AppName string `binding:"Required" locale:"install.app_name"` - RepoRootPath string `binding:"Required"` - LFSRootPath string - RunUser string `binding:"Required"` - Domain string `binding:"Required"` - SSHPort int - HTTPPort string `binding:"Required"` - AppURL string `binding:"Required"` - LogRootPath string `binding:"Required"` - - SMTPHost string - SMTPFrom string - SMTPUser string `binding:"OmitEmpty;MaxSize(254)" locale:"install.mailer_user"` - SMTPPasswd string - RegisterConfirm bool - MailNotify bool - - OfflineMode bool - DisableGravatar bool - EnableFederatedAvatar bool - EnableOpenIDSignIn bool - EnableOpenIDSignUp bool - DisableRegistration bool - AllowOnlyExternalRegistration bool - EnableCaptcha bool - RequireSignInView bool - DefaultKeepEmailPrivate bool - DefaultAllowCreateOrganization bool - DefaultEnableTimetracking bool - NoReplyAddress string - - AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"` - AdminPasswd string `binding:"OmitEmpty;MaxSize(255)" locale:"install.admin_password"` - AdminConfirmPasswd string - AdminEmail string `binding:"OmitEmpty;MinSize(3);MaxSize(254);Include(@)" locale:"install.admin_email"` -} - -// Validate validates the fields -func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// _____ ____ _________________ ___ -// / _ \ | | \__ ___/ | \ -// / /_\ \| | / | | / ~ \ -// / | \ | / | | \ Y / -// \____|__ /______/ |____| \___|_ / -// \/ \/ - -// RegisterForm form for registering -type RegisterForm struct { - UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"` - Email string `binding:"Required;Email;MaxSize(254)"` - Password string `binding:"MaxSize(255)"` - Retype string - GRecaptchaResponse string `form:"g-recaptcha-response"` - HcaptchaResponse string `form:"h-captcha-response"` -} - -// Validate validates the fields -func (f *RegisterForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// IsEmailDomainWhitelisted validates that the email address -// provided by the user matches what has been configured . -// If the domain whitelist from the config is empty, it marks the -// email as whitelisted -func (f RegisterForm) IsEmailDomainWhitelisted() bool { - if len(setting.Service.EmailDomainWhitelist) == 0 { - return true - } - - n := strings.LastIndex(f.Email, "@") - if n <= 0 { - return false - } - - domain := strings.ToLower(f.Email[n+1:]) - - for _, v := range setting.Service.EmailDomainWhitelist { - if strings.ToLower(v) == domain { - return true - } - } - - return false -} - -// MustChangePasswordForm form for updating your password after account creation -// by an admin -type MustChangePasswordForm struct { - Password string `binding:"Required;MaxSize(255)"` - Retype string -} - -// Validate validates the fields -func (f *MustChangePasswordForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// SignInForm form for signing in with user/password -type SignInForm struct { - UserName string `binding:"Required;MaxSize(254)"` - // TODO remove required from password for SecondFactorAuthentication - Password string `binding:"Required;MaxSize(255)"` - Remember bool -} - -// Validate validates the fields -func (f *SignInForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// AuthorizationForm form for authorizing oauth2 clients -type AuthorizationForm struct { - ResponseType string `binding:"Required;In(code)"` - ClientID string `binding:"Required"` - RedirectURI string - State string - Scope string - Nonce string - - // PKCE support - CodeChallengeMethod string // S256, plain - CodeChallenge string -} - -// Validate validates the fields -func (f *AuthorizationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// GrantApplicationForm form for authorizing oauth2 clients -type GrantApplicationForm struct { - ClientID string `binding:"Required"` - RedirectURI string - State string - Scope string - Nonce string -} - -// Validate validates the fields -func (f *GrantApplicationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// AccessTokenForm for issuing access tokens from authorization codes or refresh tokens -type AccessTokenForm struct { - GrantType string `json:"grant_type"` - ClientID string `json:"client_id"` - ClientSecret string `json:"client_secret"` - RedirectURI string `json:"redirect_uri"` - Code string `json:"code"` - RefreshToken string `json:"refresh_token"` - - // PKCE support - CodeVerifier string `json:"code_verifier"` -} - -// Validate validates the fields -func (f *AccessTokenForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// __________________________________________.___ _______ ________ _________ -// / _____/\_ _____/\__ ___/\__ ___/| |\ \ / _____/ / _____/ -// \_____ \ | __)_ | | | | | |/ | \/ \ ___ \_____ \ -// / \ | \ | | | | | / | \ \_\ \/ \ -// /_______ //_______ / |____| |____| |___\____|__ /\______ /_______ / -// \/ \/ \/ \/ \/ - -// UpdateProfileForm form for updating profile -type UpdateProfileForm struct { - Name string `binding:"AlphaDashDot;MaxSize(40)"` - FullName string `binding:"MaxSize(100)"` - KeepEmailPrivate bool - Website string `binding:"ValidUrl;MaxSize(255)"` - Location string `binding:"MaxSize(50)"` - Language string - Description string `binding:"MaxSize(255)"` - KeepActivityPrivate bool -} - -// Validate validates the fields -func (f *UpdateProfileForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// Avatar types -const ( - AvatarLocal string = "local" - AvatarByMail string = "bymail" -) - -// AvatarForm form for changing avatar -type AvatarForm struct { - Source string - Avatar *multipart.FileHeader - Gravatar string `binding:"OmitEmpty;Email;MaxSize(254)"` - Federavatar bool -} - -// Validate validates the fields -func (f *AvatarForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// AddEmailForm form for adding new email -type AddEmailForm struct { - Email string `binding:"Required;Email;MaxSize(254)"` -} - -// Validate validates the fields -func (f *AddEmailForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// UpdateThemeForm form for updating a users' theme -type UpdateThemeForm struct { - Theme string `binding:"Required;MaxSize(30)"` -} - -// Validate validates the field -func (f *UpdateThemeForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// IsThemeExists checks if the theme is a theme available in the config. -func (f UpdateThemeForm) IsThemeExists() bool { - var exists bool - - for _, v := range setting.UI.Themes { - if strings.EqualFold(v, f.Theme) { - exists = true - break - } - } - - return exists -} - -// ChangePasswordForm form for changing password -type ChangePasswordForm struct { - OldPassword string `form:"old_password" binding:"MaxSize(255)"` - Password string `form:"password" binding:"Required;MaxSize(255)"` - Retype string `form:"retype"` -} - -// Validate validates the fields -func (f *ChangePasswordForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// AddOpenIDForm is for changing openid uri -type AddOpenIDForm struct { - Openid string `binding:"Required;MaxSize(256)"` -} - -// Validate validates the fields -func (f *AddOpenIDForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// AddKeyForm form for adding SSH/GPG key -type AddKeyForm struct { - Type string `binding:"OmitEmpty"` - Title string `binding:"Required;MaxSize(50)"` - Content string `binding:"Required"` - IsWritable bool -} - -// Validate validates the fields -func (f *AddKeyForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// NewAccessTokenForm form for creating access token -type NewAccessTokenForm struct { - Name string `binding:"Required;MaxSize(255)"` -} - -// Validate validates the fields -func (f *NewAccessTokenForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// EditOAuth2ApplicationForm form for editing oauth2 applications -type EditOAuth2ApplicationForm struct { - Name string `binding:"Required;MaxSize(255)" form:"application_name"` - RedirectURI string `binding:"Required" form:"redirect_uri"` -} - -// Validate validates the fields -func (f *EditOAuth2ApplicationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// TwoFactorAuthForm for logging in with 2FA token. -type TwoFactorAuthForm struct { - Passcode string `binding:"Required"` -} - -// Validate validates the fields -func (f *TwoFactorAuthForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// TwoFactorScratchAuthForm for logging in with 2FA scratch token. -type TwoFactorScratchAuthForm struct { - Token string `binding:"Required"` -} - -// Validate validates the fields -func (f *TwoFactorScratchAuthForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// U2FRegistrationForm for reserving an U2F name -type U2FRegistrationForm struct { - Name string `binding:"Required"` -} - -// Validate validates the fields -func (f *U2FRegistrationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// U2FDeleteForm for deleting U2F keys -type U2FDeleteForm struct { - ID int64 `binding:"Required"` -} - -// Validate validates the fields -func (f *U2FDeleteForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} diff --git a/modules/auth/user_form_auth_openid.go b/modules/auth/user_form_auth_openid.go deleted file mode 100644 index 841dbd840..000000000 --- a/modules/auth/user_form_auth_openid.go +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" -) - -// SignInOpenIDForm form for signing in with OpenID -type SignInOpenIDForm struct { - Openid string `binding:"Required;MaxSize(256)"` - Remember bool -} - -// Validate validates the fields -func (f *SignInOpenIDForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// SignUpOpenIDForm form for signin up with OpenID -type SignUpOpenIDForm struct { - UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"` - Email string `binding:"Required;Email;MaxSize(254)"` - GRecaptchaResponse string `form:"g-recaptcha-response"` - HcaptchaResponse string `form:"h-captcha-response"` -} - -// Validate validates the fields -func (f *SignUpOpenIDForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} - -// ConnectOpenIDForm form for connecting an existing account to an OpenID URI -type ConnectOpenIDForm struct { - UserName string `binding:"Required;MaxSize(254)"` - Password string `binding:"Required;MaxSize(255)"` -} - -// Validate validates the fields -func (f *ConnectOpenIDForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) -} diff --git a/modules/auth/user_form_test.go b/modules/auth/user_form_test.go deleted file mode 100644 index 084174622..000000000 --- a/modules/auth/user_form_test.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2018 The Gogs Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package auth - -import ( - "testing" - - "code.gitea.io/gitea/modules/setting" - - "github.com/stretchr/testify/assert" -) - -func TestRegisterForm_IsDomainWhiteList_Empty(t *testing.T) { - _ = setting.Service - - setting.Service.EmailDomainWhitelist = []string{} - - form := RegisterForm{} - - assert.True(t, form.IsEmailDomainWhitelisted()) -} - -func TestRegisterForm_IsDomainWhiteList_InvalidEmail(t *testing.T) { - _ = setting.Service - - setting.Service.EmailDomainWhitelist = []string{"gitea.io"} - - tt := []struct { - email string - }{ - {"securitygieqqq"}, - {"hdudhdd"}, - } - - for _, v := range tt { - form := RegisterForm{Email: v.email} - - assert.False(t, form.IsEmailDomainWhitelisted()) - } -} - -func TestRegisterForm_IsDomainWhiteList_ValidEmail(t *testing.T) { - _ = setting.Service - - setting.Service.EmailDomainWhitelist = []string{"gitea.io"} - - tt := []struct { - email string - valid bool - }{ - {"security@gitea.io", true}, - {"security@gITea.io", true}, - {"hdudhdd", false}, - {"seee@example.com", false}, - } - - for _, v := range tt { - form := RegisterForm{Email: v.email} - - assert.Equal(t, v.valid, form.IsEmailDomainWhitelisted()) - } -} diff --git a/modules/avatar/avatar.go b/modules/avatar/avatar.go index 44b56c26c..5411a9079 100644 --- a/modules/avatar/avatar.go +++ b/modules/avatar/avatar.go @@ -10,12 +10,12 @@ import ( "image" "image/color/palette" - // Enable PNG support: - _ "image/png" - "math/rand" - "time" + _ "image/gif" // for processing gif images + _ "image/jpeg" // for processing jpeg images + _ "image/png" // for processing png images "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" "github.com/issue9/identicon" "github.com/nfnt/resize" @@ -29,8 +29,11 @@ const AvatarSize = 290 // in custom size (height and width). func RandomImageSize(size int, data []byte) (image.Image, error) { randExtent := len(palette.WebSafe) - 32 - rand.Seed(time.Now().UnixNano()) - colorIndex := rand.Intn(randExtent) + integer, err := util.RandomInt(int64(randExtent)) + if err != nil { + return nil, fmt.Errorf("util.RandomInt: %v", err) + } + colorIndex := int(integer) backColorIndex := colorIndex - 1 if backColorIndex < 0 { backColorIndex = randExtent - 1 diff --git a/modules/avatar/avatar_test.go b/modules/avatar/avatar_test.go index 853560565..f48266c85 100644 --- a/modules/avatar/avatar_test.go +++ b/modules/avatar/avatar_test.go @@ -13,12 +13,17 @@ import ( "github.com/stretchr/testify/assert" ) -func Test_RandomImage(t *testing.T) { - _, err := RandomImage([]byte("gogs@local")) - assert.NoError(t, err) - - _, err = RandomImageSize(0, []byte("gogs@local")) +func Test_RandomImageSize(t *testing.T) { + _, err := RandomImageSize(0, []byte("gitea@local")) assert.Error(t, err) + + _, err = RandomImageSize(64, []byte("gitea@local")) + assert.NoError(t, err) +} + +func Test_RandomImage(t *testing.T) { + _, err := RandomImage([]byte("gitea@local")) + assert.NoError(t, err) } func Test_PrepareWithPNG(t *testing.T) { diff --git a/modules/base/natural_sort_test.go b/modules/base/natural_sort_test.go index b8d45e4ec..2faa5acf3 100644 --- a/modules/base/natural_sort_test.go +++ b/modules/base/natural_sort_test.go @@ -17,8 +17,8 @@ func TestNaturalSortLess(t *testing.T) { test("v1.20.0", "v1.2.0", false) test("v1.20.0", "v1.29.0", true) test("v1.20.0", "v1.20.0", false) - test("abc", "bcd", "abc" < "bcd") + test("abc", "bcd", true) test("a-1-a", "a-1-b", true) test("2", "12", true) - test("a", "ab", "a" < "ab") + test("a", "ab", true) } diff --git a/modules/base/tool.go b/modules/base/tool.go index c497bee44..775fd709c 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -12,15 +12,14 @@ import ( "encoding/hex" "errors" "fmt" - "net/http" "os" "path/filepath" - "regexp" "runtime" "strconv" "strings" "time" "unicode" + "unicode/utf8" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" @@ -29,15 +28,6 @@ import ( "github.com/dustin/go-humanize" ) -// Use at most this many bytes to determine Content Type. -const sniffLen = 512 - -// SVGMimeType MIME type of SVG images. -const SVGMimeType = "image/svg+xml" - -var svgTagRegex = regexp.MustCompile(`(?s)\A\s*(?:\s*)*\s*(?:\s*)*= 0x80 && unicode.IsLetter(ch) } -// DetectContentType extends http.DetectContentType with more content types. -func DetectContentType(data []byte) string { - ct := http.DetectContentType(data) - - if len(data) > sniffLen { - data = data[:sniffLen] - } - - if setting.UI.SVG.Enabled && - ((strings.Contains(ct, "text/plain") || strings.Contains(ct, "text/html")) && svgTagRegex.Match(data) || - strings.Contains(ct, "text/xml") && svgTagInXMLRegex.Match(data)) { - - // SVG is unsupported. https://github.com/golang/go/issues/15888 - return SVGMimeType - } - return ct -} - -// IsRepresentableAsText returns true if file content can be represented as -// plain text or is empty. -func IsRepresentableAsText(data []byte) bool { - return IsTextFile(data) || IsSVGImageFile(data) -} - -// IsTextFile returns true if file content format is plain text or empty. -func IsTextFile(data []byte) bool { - if len(data) == 0 { - return true - } - return strings.Contains(DetectContentType(data), "text/") -} - -// IsImageFile detects if data is an image format -func IsImageFile(data []byte) bool { - return strings.Contains(DetectContentType(data), "image/") -} - -// IsSVGImageFile detects if data is an SVG image format -func IsSVGImageFile(data []byte) bool { - return strings.Contains(DetectContentType(data), SVGMimeType) -} - -// IsPDFFile detects if data is a pdf format -func IsPDFFile(data []byte) bool { - return strings.Contains(DetectContentType(data), "application/pdf") -} - -// IsVideoFile detects if data is an video format -func IsVideoFile(data []byte) bool { - return strings.Contains(DetectContentType(data), "video/") -} - -// IsAudioFile detects if data is an video format -func IsAudioFile(data []byte) bool { - return strings.Contains(DetectContentType(data), "audio/") -} - // EntryIcon returns the octicon class for displaying files/directories func EntryIcon(entry *git.TreeEntry) string { switch { diff --git a/modules/base/tool_test.go b/modules/base/tool_test.go index cda1685da..5280827e8 100644 --- a/modules/base/tool_test.go +++ b/modules/base/tool_test.go @@ -5,7 +5,9 @@ package base import ( + "os" "testing" + "time" "github.com/stretchr/testify/assert" ) @@ -53,11 +55,48 @@ func TestBasicAuthDecode(t *testing.T) { func TestBasicAuthEncode(t *testing.T) { assert.Equal(t, "Zm9vOmJhcg==", BasicAuthEncode("foo", "bar")) + assert.Equal(t, "MjM6IjotLS0t", BasicAuthEncode("23:\"", "----")) } -// TODO: Test PBKDF2() -// TODO: Test VerifyTimeLimitCode() -// TODO: Test CreateTimeLimitCode() +func TestVerifyTimeLimitCode(t *testing.T) { + tc := []struct { + data string + minutes int + code string + valid bool + }{{ + data: "data", + minutes: 2, + code: testCreateTimeLimitCode(t, "data", 2), + valid: true, + }, { + data: "abc123-ß", + minutes: 1, + code: testCreateTimeLimitCode(t, "abc123-ß", 1), + valid: true, + }, { + data: "data", + minutes: 2, + code: "2021012723240000005928251dac409d2c33a6eb82c63410aaad569bed", + valid: false, + }} + for _, test := range tc { + actualValid := VerifyTimeLimitCode(test.data, test.minutes, test.code) + assert.Equal(t, test.valid, actualValid, "data: '%s' code: '%s' should be valid: %t", test.data, test.code, test.valid) + } +} + +func testCreateTimeLimitCode(t *testing.T, data string, m int) string { + result0 := CreateTimeLimitCode(data, m, nil) + result1 := CreateTimeLimitCode(data, m, time.Now().Format("200601021504")) + result2 := CreateTimeLimitCode(data, m, time.Unix(time.Now().Unix()+int64(time.Minute)*int64(m), 0).Format("200601021504")) + + assert.Equal(t, result0, result1) + assert.NotEqual(t, result0, result2) + + assert.True(t, len(result0) != 0) + return result0 +} func TestFileSize(t *testing.T) { var size int64 = 512 @@ -76,6 +115,12 @@ func TestFileSize(t *testing.T) { assert.Equal(t, "2.0 EiB", FileSize(size)) } +func TestPrettyNumber(t *testing.T) { + assert.Equal(t, "23,342,432", PrettyNumber(23342432)) + assert.Equal(t, "0", PrettyNumber(0)) + assert.Equal(t, "-100,000", PrettyNumber(-100000)) +} + func TestSubtract(t *testing.T) { toFloat64 := func(n interface{}) float64 { switch v := n.(type) { @@ -124,6 +169,10 @@ func TestEllipsisString(t *testing.T) { assert.Equal(t, "fo...", EllipsisString("foobar", 5)) assert.Equal(t, "foobar", EllipsisString("foobar", 6)) assert.Equal(t, "foobar", EllipsisString("foobar", 10)) + assert.Equal(t, "测...", EllipsisString("测试文本一二三四", 4)) + assert.Equal(t, "测试...", EllipsisString("测试文本一二三四", 5)) + assert.Equal(t, "测试文...", EllipsisString("测试文本一二三四", 6)) + assert.Equal(t, "测试文本一二三四", EllipsisString("测试文本一二三四", 10)) } func TestTruncateString(t *testing.T) { @@ -135,6 +184,10 @@ func TestTruncateString(t *testing.T) { assert.Equal(t, "fooba", TruncateString("foobar", 5)) assert.Equal(t, "foobar", TruncateString("foobar", 6)) assert.Equal(t, "foobar", TruncateString("foobar", 7)) + assert.Equal(t, "测试文本", TruncateString("测试文本一二三四", 4)) + assert.Equal(t, "测试文本一", TruncateString("测试文本一二三四", 5)) + assert.Equal(t, "测试文本一二", TruncateString("测试文本一二三四", 6)) + assert.Equal(t, "测试文本一二三", TruncateString("测试文本一二三四", 7)) } func TestStringsToInt64s(t *testing.T) { @@ -168,6 +221,13 @@ func TestInt64sToMap(t *testing.T) { ) } +func TestInt64sContains(t *testing.T) { + assert.Equal(t, map[int64]bool{}, Int64sToMap([]int64{})) + assert.True(t, Int64sContains([]int64{6, 44324, 4324, 32, 1, 2323}, 1)) + assert.True(t, Int64sContains([]int64{2323}, 2323)) + assert.False(t, Int64sContains([]int64{6, 44324, 4324, 32, 1, 2323}, 232)) +} + func TestIsLetter(t *testing.T) { assert.True(t, IsLetter('a')) assert.True(t, IsLetter('e')) @@ -181,63 +241,17 @@ func TestIsLetter(t *testing.T) { assert.False(t, IsLetter('-')) assert.False(t, IsLetter('1')) assert.False(t, IsLetter('$')) + assert.False(t, IsLetter(0x00)) + assert.False(t, IsLetter(0x93)) } -func TestDetectContentTypeLongerThanSniffLen(t *testing.T) { - // Pre-condition: Shorter than sniffLen detects SVG. - assert.Equal(t, "image/svg+xml", DetectContentType([]byte(``))) - // Longer than sniffLen detects something else. - assert.Equal(t, "text/plain; charset=utf-8", DetectContentType([]byte(``))) -} +// TODO: Test EntryIcon -func TestIsTextFile(t *testing.T) { - assert.True(t, IsTextFile([]byte{})) - assert.True(t, IsTextFile([]byte("lorem ipsum"))) -} - -func TestIsSVGImageFile(t *testing.T) { - assert.True(t, IsSVGImageFile([]byte(""))) - assert.True(t, IsSVGImageFile([]byte(" "))) - assert.True(t, IsSVGImageFile([]byte(``))) - assert.True(t, IsSVGImageFile([]byte(""))) - assert.True(t, IsSVGImageFile([]byte(``))) - assert.True(t, IsSVGImageFile([]byte(` - `))) - assert.True(t, IsSVGImageFile([]byte(` - - `))) - assert.True(t, IsSVGImageFile([]byte(` - `))) - assert.True(t, IsSVGImageFile([]byte(` - - `))) - assert.True(t, IsSVGImageFile([]byte(` - - - `))) - assert.True(t, IsSVGImageFile([]byte(` - - `))) - assert.False(t, IsSVGImageFile([]byte{})) - assert.False(t, IsSVGImageFile([]byte("svg"))) - assert.False(t, IsSVGImageFile([]byte(""))) - assert.False(t, IsSVGImageFile([]byte("text"))) - assert.False(t, IsSVGImageFile([]byte(""))) - assert.False(t, IsSVGImageFile([]byte(``))) - assert.False(t, IsSVGImageFile([]byte(` - `))) - assert.False(t, IsSVGImageFile([]byte(` - - `))) +func TestSetupGiteaRoot(t *testing.T) { + _ = os.Setenv("GITEA_ROOT", "test") + assert.Equal(t, "test", SetupGiteaRoot()) + _ = os.Setenv("GITEA_ROOT", "") + assert.NotEqual(t, "test", SetupGiteaRoot()) } func TestFormatNumberSI(t *testing.T) { @@ -247,6 +261,3 @@ func TestFormatNumberSI(t *testing.T) { assert.Equal(t, "45.7G", FormatNumberSI(45721317675)) assert.Equal(t, "", FormatNumberSI("test")) } - -// TODO: IsImageFile(), currently no idea how to test -// TODO: IsPDFFile(), currently no idea how to test diff --git a/modules/cache/cache.go b/modules/cache/cache.go index 42227f928..3a2732c34 100644 --- a/modules/cache/cache.go +++ b/modules/cache/cache.go @@ -10,9 +10,9 @@ import ( "code.gitea.io/gitea/modules/setting" - mc "gitea.com/macaron/cache" + mc "gitea.com/go-chi/cache" - _ "gitea.com/macaron/cache/memcache" // memcache plugin for cache + _ "gitea.com/go-chi/cache/memcache" // memcache plugin for cache ) var ( @@ -20,31 +20,13 @@ var ( ) func newCache(cacheConfig setting.Cache) (mc.Cache, error) { - return mc.NewCacher(cacheConfig.Adapter, mc.Options{ + return mc.NewCacher(mc.Options{ Adapter: cacheConfig.Adapter, AdapterConfig: cacheConfig.Conn, Interval: cacheConfig.Interval, }) } -// Cache is the interface that operates the cache data. -type Cache interface { - // Put puts value into cache with key and expire time. - Put(key string, val interface{}, timeout int64) error - // Get gets cached value by given key. - Get(key string) interface{} - // Delete deletes cached value by given key. - Delete(key string) error - // Incr increases cached int-type value by given key as a counter. - Incr(key string) error - // Decr decreases cached int-type value by given key as a counter. - Decr(key string) error - // IsExist returns true if cached value exists. - IsExist(key string) bool - // Flush deletes all cached data. - Flush() error -} - // NewContext start cache service func NewContext() error { var err error @@ -59,7 +41,7 @@ func NewContext() error { } // GetCache returns the currently configured cache -func GetCache() Cache { +func GetCache() mc.Cache { return conn } @@ -76,7 +58,7 @@ func GetString(key string, getFunc func() (string, error)) (string, error) { if value, err = getFunc(); err != nil { return value, err } - err = conn.Put(key, value, int64(setting.CacheService.TTL.Seconds())) + err = conn.Put(key, value, setting.CacheService.TTLSeconds()) if err != nil { return "", err } @@ -104,7 +86,7 @@ func GetInt(key string, getFunc func() (int, error)) (int, error) { if value, err = getFunc(); err != nil { return value, err } - err = conn.Put(key, value, int64(setting.CacheService.TTL.Seconds())) + err = conn.Put(key, value, setting.CacheService.TTLSeconds()) if err != nil { return 0, err } @@ -136,7 +118,7 @@ func GetInt64(key string, getFunc func() (int64, error)) (int64, error) { if value, err = getFunc(); err != nil { return value, err } - err = conn.Put(key, value, int64(setting.CacheService.TTL.Seconds())) + err = conn.Put(key, value, setting.CacheService.TTLSeconds()) if err != nil { return 0, err } diff --git a/modules/cache/cache_redis.go b/modules/cache/cache_redis.go index 96e865a38..148725ae6 100644 --- a/modules/cache/cache_redis.go +++ b/modules/cache/cache_redis.go @@ -8,10 +8,11 @@ import ( "fmt" "time" + "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/nosql" - "gitea.com/macaron/cache" - "github.com/go-redis/redis/v7" + "gitea.com/go-chi/cache" + "github.com/go-redis/redis/v8" "github.com/unknwon/com" ) @@ -28,7 +29,7 @@ type RedisCacher struct { func (c *RedisCacher) Put(key string, val interface{}, expire int64) error { key = c.prefix + key if expire == 0 { - if err := c.c.Set(key, com.ToStr(val), 0).Err(); err != nil { + if err := c.c.Set(graceful.GetManager().HammerContext(), key, com.ToStr(val), 0).Err(); err != nil { return err } } else { @@ -36,7 +37,7 @@ func (c *RedisCacher) Put(key string, val interface{}, expire int64) error { if err != nil { return err } - if err = c.c.Set(key, com.ToStr(val), dur).Err(); err != nil { + if err = c.c.Set(graceful.GetManager().HammerContext(), key, com.ToStr(val), dur).Err(); err != nil { return err } } @@ -44,12 +45,12 @@ func (c *RedisCacher) Put(key string, val interface{}, expire int64) error { if c.occupyMode { return nil } - return c.c.HSet(c.hsetName, key, "0").Err() + return c.c.HSet(graceful.GetManager().HammerContext(), c.hsetName, key, "0").Err() } // Get gets cached value by given key. func (c *RedisCacher) Get(key string) interface{} { - val, err := c.c.Get(c.prefix + key).Result() + val, err := c.c.Get(graceful.GetManager().HammerContext(), c.prefix+key).Result() if err != nil { return nil } @@ -59,14 +60,14 @@ func (c *RedisCacher) Get(key string) interface{} { // Delete deletes cached value by given key. func (c *RedisCacher) Delete(key string) error { key = c.prefix + key - if err := c.c.Del(key).Err(); err != nil { + if err := c.c.Del(graceful.GetManager().HammerContext(), key).Err(); err != nil { return err } if c.occupyMode { return nil } - return c.c.HDel(c.hsetName, key).Err() + return c.c.HDel(graceful.GetManager().HammerContext(), c.hsetName, key).Err() } // Incr increases cached int-type value by given key as a counter. @@ -74,7 +75,7 @@ func (c *RedisCacher) Incr(key string) error { if !c.IsExist(key) { return fmt.Errorf("key '%s' not exist", key) } - return c.c.Incr(c.prefix + key).Err() + return c.c.Incr(graceful.GetManager().HammerContext(), c.prefix+key).Err() } // Decr decreases cached int-type value by given key as a counter. @@ -82,17 +83,17 @@ func (c *RedisCacher) Decr(key string) error { if !c.IsExist(key) { return fmt.Errorf("key '%s' not exist", key) } - return c.c.Decr(c.prefix + key).Err() + return c.c.Decr(graceful.GetManager().HammerContext(), c.prefix+key).Err() } // IsExist returns true if cached value exists. func (c *RedisCacher) IsExist(key string) bool { - if c.c.Exists(c.prefix+key).Val() == 1 { + if c.c.Exists(graceful.GetManager().HammerContext(), c.prefix+key).Val() == 1 { return true } if !c.occupyMode { - c.c.HDel(c.hsetName, c.prefix+key) + c.c.HDel(graceful.GetManager().HammerContext(), c.hsetName, c.prefix+key) } return false } @@ -100,17 +101,17 @@ func (c *RedisCacher) IsExist(key string) bool { // Flush deletes all cached data. func (c *RedisCacher) Flush() error { if c.occupyMode { - return c.c.FlushDB().Err() + return c.c.FlushDB(graceful.GetManager().HammerContext()).Err() } - keys, err := c.c.HKeys(c.hsetName).Result() + keys, err := c.c.HKeys(graceful.GetManager().HammerContext(), c.hsetName).Result() if err != nil { return err } - if err = c.c.Del(keys...).Err(); err != nil { + if err = c.c.Del(graceful.GetManager().HammerContext(), keys...).Err(); err != nil { return err } - return c.c.Del(c.hsetName).Err() + return c.c.Del(graceful.GetManager().HammerContext(), c.hsetName).Err() } // StartAndGC starts GC routine based on config string settings. @@ -132,7 +133,7 @@ func (c *RedisCacher) StartAndGC(opts cache.Options) error { } } - return c.c.Ping().Err() + return c.c.Ping(graceful.GetManager().HammerContext()).Err() } func init() { diff --git a/modules/cache/cache_test.go b/modules/cache/cache_test.go new file mode 100644 index 000000000..92be69252 --- /dev/null +++ b/modules/cache/cache_test.go @@ -0,0 +1,151 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package cache + +import ( + "fmt" + "testing" + "time" + + "code.gitea.io/gitea/modules/setting" + + "github.com/stretchr/testify/assert" +) + +func createTestCache() { + conn, _ = newCache(setting.Cache{ + Adapter: "memory", + TTL: time.Minute, + }) +} + +func TestNewContext(t *testing.T) { + assert.NoError(t, NewContext()) + + setting.CacheService.Cache = setting.Cache{Enabled: true, Adapter: "redis", Conn: "some random string"} + con, err := newCache(setting.Cache{ + Adapter: "rand", + Conn: "false conf", + Interval: 100, + }) + assert.Error(t, err) + assert.Nil(t, con) +} + +func TestGetCache(t *testing.T) { + createTestCache() + + assert.NotNil(t, GetCache()) +} + +func TestGetString(t *testing.T) { + createTestCache() + + data, err := GetString("key", func() (string, error) { + return "", fmt.Errorf("some error") + }) + assert.Error(t, err) + assert.Equal(t, "", data) + + data, err = GetString("key", func() (string, error) { + return "", nil + }) + assert.NoError(t, err) + assert.Equal(t, "", data) + + // data, err = GetString("key", func() (string, error) { + // return "some data", nil + // }) + // assert.NoError(t, err) + // assert.Equal(t, "", data) + // Remove("key") + + data, err = GetString("key", func() (string, error) { + return "some data", nil + }) + assert.NoError(t, err) + assert.Equal(t, "some data", data) + + // data, err = GetString("key", func() (string, error) { + // return "", fmt.Errorf("some error") + // }) + // assert.NoError(t, err) + // assert.Equal(t, "some data", data) + + // TODO: uncommented code works in IDE but not with go test +} + +func TestGetInt(t *testing.T) { + createTestCache() + + data, err := GetInt("key", func() (int, error) { + return 0, fmt.Errorf("some error") + }) + assert.Error(t, err) + assert.Equal(t, 0, data) + + data, err = GetInt("key", func() (int, error) { + return 0, nil + }) + assert.NoError(t, err) + assert.Equal(t, 0, data) + + // data, err = GetInt("key", func() (int, error) { + // return 100, nil + // }) + // assert.NoError(t, err) + // assert.Equal(t, 0, data) + // Remove("key") + + data, err = GetInt("key", func() (int, error) { + return 100, nil + }) + assert.NoError(t, err) + assert.Equal(t, 100, data) + + // data, err = GetInt("key", func() (int, error) { + // return 0, fmt.Errorf("some error") + // }) + // assert.NoError(t, err) + // assert.Equal(t, 100, data) + + // TODO: uncommented code works in IDE but not with go test +} +func TestGetInt64(t *testing.T) { + createTestCache() + + data, err := GetInt64("key", func() (int64, error) { + return 0, fmt.Errorf("some error") + }) + assert.Error(t, err) + assert.EqualValues(t, 0, data) + + data, err = GetInt64("key", func() (int64, error) { + return 0, nil + }) + assert.NoError(t, err) + assert.EqualValues(t, 0, data) + + // data, err = GetInt64("key", func() (int64, error) { + // return 100, nil + // }) + // assert.NoError(t, err) + // assert.EqualValues(t, 0, data) + // Remove("key") + + data, err = GetInt64("key", func() (int64, error) { + return 100, nil + }) + assert.NoError(t, err) + assert.EqualValues(t, 100, data) + + // data, err = GetInt64("key", func() (int, error) { + // return 0, fmt.Errorf("some error") + // }) + // assert.NoError(t, err) + // assert.EqualValues(t, 100, data) + + // TODO: uncommented code works in IDE but not with go test +} diff --git a/modules/cache/cache_twoqueue.go b/modules/cache/cache_twoqueue.go new file mode 100644 index 000000000..275b73f06 --- /dev/null +++ b/modules/cache/cache_twoqueue.go @@ -0,0 +1,204 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package cache + +import ( + "strconv" + "sync" + "time" + + "code.gitea.io/gitea/modules/json" + + mc "gitea.com/go-chi/cache" + lru "github.com/hashicorp/golang-lru" +) + +// TwoQueueCache represents a LRU 2Q cache adapter implementation +type TwoQueueCache struct { + lock sync.Mutex + cache *lru.TwoQueueCache + interval int +} + +// TwoQueueCacheConfig describes the configuration for TwoQueueCache +type TwoQueueCacheConfig struct { + Size int `ini:"SIZE" json:"size"` + RecentRatio float64 `ini:"RECENT_RATIO" json:"recent_ratio"` + GhostRatio float64 `ini:"GHOST_RATIO" json:"ghost_ratio"` +} + +// MemoryItem represents a memory cache item. +type MemoryItem struct { + Val interface{} + Created int64 + Timeout int64 +} + +func (item *MemoryItem) hasExpired() bool { + return item.Timeout > 0 && + (time.Now().Unix()-item.Created) >= item.Timeout +} + +var _ mc.Cache = &TwoQueueCache{} + +// Put puts value into cache with key and expire time. +func (c *TwoQueueCache) Put(key string, val interface{}, timeout int64) error { + item := &MemoryItem{ + Val: val, + Created: time.Now().Unix(), + Timeout: timeout, + } + c.lock.Lock() + defer c.lock.Unlock() + c.cache.Add(key, item) + return nil +} + +// Get gets cached value by given key. +func (c *TwoQueueCache) Get(key string) interface{} { + c.lock.Lock() + defer c.lock.Unlock() + cached, ok := c.cache.Get(key) + if !ok { + return nil + } + item, ok := cached.(*MemoryItem) + + if !ok || item.hasExpired() { + c.cache.Remove(key) + return nil + } + + return item.Val +} + +// Delete deletes cached value by given key. +func (c *TwoQueueCache) Delete(key string) error { + c.lock.Lock() + defer c.lock.Unlock() + c.cache.Remove(key) + return nil +} + +// Incr increases cached int-type value by given key as a counter. +func (c *TwoQueueCache) Incr(key string) error { + c.lock.Lock() + defer c.lock.Unlock() + cached, ok := c.cache.Get(key) + if !ok { + return nil + } + item, ok := cached.(*MemoryItem) + + if !ok || item.hasExpired() { + c.cache.Remove(key) + return nil + } + + var err error + item.Val, err = mc.Incr(item.Val) + return err +} + +// Decr decreases cached int-type value by given key as a counter. +func (c *TwoQueueCache) Decr(key string) error { + c.lock.Lock() + defer c.lock.Unlock() + cached, ok := c.cache.Get(key) + if !ok { + return nil + } + item, ok := cached.(*MemoryItem) + + if !ok || item.hasExpired() { + c.cache.Remove(key) + return nil + } + + var err error + item.Val, err = mc.Decr(item.Val) + return err +} + +// IsExist returns true if cached value exists. +func (c *TwoQueueCache) IsExist(key string) bool { + c.lock.Lock() + defer c.lock.Unlock() + cached, ok := c.cache.Peek(key) + if !ok { + return false + } + item, ok := cached.(*MemoryItem) + if !ok || item.hasExpired() { + c.cache.Remove(key) + return false + } + + return true +} + +// Flush deletes all cached data. +func (c *TwoQueueCache) Flush() error { + c.lock.Lock() + defer c.lock.Unlock() + c.cache.Purge() + return nil +} + +func (c *TwoQueueCache) checkAndInvalidate(key interface{}) { + c.lock.Lock() + defer c.lock.Unlock() + cached, ok := c.cache.Peek(key) + if !ok { + return + } + item, ok := cached.(*MemoryItem) + if !ok || item.hasExpired() { + c.cache.Remove(item) + } +} + +func (c *TwoQueueCache) startGC() { + if c.interval < 0 { + return + } + for _, key := range c.cache.Keys() { + c.checkAndInvalidate(key) + } + time.AfterFunc(time.Duration(c.interval)*time.Second, c.startGC) +} + +// StartAndGC starts GC routine based on config string settings. +func (c *TwoQueueCache) StartAndGC(opts mc.Options) error { + var err error + size := 50000 + if opts.AdapterConfig != "" { + size, err = strconv.Atoi(opts.AdapterConfig) + } + if err != nil { + if !json.Valid([]byte(opts.AdapterConfig)) { + return err + } + + cfg := &TwoQueueCacheConfig{ + Size: 50000, + RecentRatio: lru.Default2QRecentRatio, + GhostRatio: lru.Default2QGhostEntries, + } + _ = json.Unmarshal([]byte(opts.AdapterConfig), cfg) + c.cache, err = lru.New2QParams(cfg.Size, cfg.RecentRatio, cfg.GhostRatio) + } else { + c.cache, err = lru.New2Q(size) + } + c.interval = opts.Interval + if c.interval > 0 { + go c.startGC() + } + return err +} + +func init() { + mc.Register("twoqueue", &TwoQueueCache{}) +} diff --git a/modules/charset/charset.go b/modules/charset/charset.go index a7e427db9..3000864c2 100644 --- a/modules/charset/charset.go +++ b/modules/charset/charset.go @@ -7,6 +7,8 @@ package charset import ( "bytes" "fmt" + "io" + "io/ioutil" "strings" "unicode/utf8" @@ -21,6 +23,33 @@ import ( // UTF8BOM is the utf-8 byte-order marker var UTF8BOM = []byte{'\xef', '\xbb', '\xbf'} +// ToUTF8WithFallbackReader detects the encoding of content and coverts to UTF-8 reader if possible +func ToUTF8WithFallbackReader(rd io.Reader) io.Reader { + var buf = make([]byte, 2048) + n, err := rd.Read(buf) + if err != nil { + return rd + } + + charsetLabel, err := DetectEncoding(buf[:n]) + if err != nil || charsetLabel == "UTF-8" { + return io.MultiReader(bytes.NewReader(RemoveBOMIfPresent(buf[:n])), rd) + } + + encoding, _ := charset.Lookup(charsetLabel) + if encoding == nil { + return io.MultiReader(bytes.NewReader(buf[:n]), rd) + } + + return transform.NewReader( + io.MultiReader( + bytes.NewReader(RemoveBOMIfPresent(buf[:n])), + rd, + ), + encoding.NewDecoder(), + ) +} + // ToUTF8WithErr converts content to UTF8 encoding func ToUTF8WithErr(content []byte) (string, error) { charsetLabel, err := DetectEncoding(content) @@ -49,24 +78,8 @@ func ToUTF8WithErr(content []byte) (string, error) { // ToUTF8WithFallback detects the encoding of content and coverts to UTF-8 if possible func ToUTF8WithFallback(content []byte) []byte { - charsetLabel, err := DetectEncoding(content) - if err != nil || charsetLabel == "UTF-8" { - return RemoveBOMIfPresent(content) - } - - encoding, _ := charset.Lookup(charsetLabel) - if encoding == nil { - return content - } - - // If there is an error, we concatenate the nicely decoded part and the - // original left over. This way we won't lose data. - result, n, err := transform.Bytes(encoding.NewDecoder(), content) - if err != nil { - return append(result, content[n:]...) - } - - return RemoveBOMIfPresent(result) + bs, _ := ioutil.ReadAll(ToUTF8WithFallbackReader(bytes.NewReader(content))) + return bs } // ToUTF8 converts content to UTF8 encoding and ignore error diff --git a/modules/context/access_log.go b/modules/context/access_log.go new file mode 100644 index 000000000..1a10c4763 --- /dev/null +++ b/modules/context/access_log.go @@ -0,0 +1,62 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package context + +import ( + "bytes" + "context" + "html/template" + "net/http" + "time" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" +) + +type routerLoggerOptions struct { + req *http.Request + Identity *string + Start *time.Time + ResponseWriter http.ResponseWriter + Ctx map[string]interface{} +} + +var signedUserNameStringPointerKey interface{} = "signedUserNameStringPointerKey" + +// AccessLogger returns a middleware to log access logger +func AccessLogger() func(http.Handler) http.Handler { + logger := log.GetLogger("access") + logTemplate, _ := template.New("log").Parse(setting.AccessLogTemplate) + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + start := time.Now() + identity := "-" + r := req.WithContext(context.WithValue(req.Context(), signedUserNameStringPointerKey, &identity)) + + next.ServeHTTP(w, r) + rw := w.(ResponseWriter) + + buf := bytes.NewBuffer([]byte{}) + err := logTemplate.Execute(buf, routerLoggerOptions{ + req: req, + Identity: &identity, + Start: &start, + ResponseWriter: rw, + Ctx: map[string]interface{}{ + "RemoteAddr": req.RemoteAddr, + "Req": req, + }, + }) + if err != nil { + log.Error("Could not set up chi access logger: %v", err.Error()) + } + + err = logger.SendLog(log.INFO, "", "", 0, buf.String(), "") + if err != nil { + log.Error("Could not set up chi access logger: %v", err.Error()) + } + }) + } +} diff --git a/modules/context/api.go b/modules/context/api.go index aa4b6b9e8..47ea8acfe 100644 --- a/modules/context/api.go +++ b/modules/context/api.go @@ -6,7 +6,9 @@ package context import ( + "context" "fmt" + "html" "net/http" "net/url" "strings" @@ -15,12 +17,13 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/auth" - "gitea.com/macaron/csrf" - "gitea.com/macaron/macaron" + "gitea.com/go-chi/session" ) -// APIContext is a specific macaron context for API service +// APIContext is a specific context for API service type APIContext struct { *Context Org *APIOrganization @@ -73,6 +76,11 @@ type APIRedirect struct{} // swagger:response string type APIString string +// ServerError responds with error message, status is 500 +func (ctx *APIContext) ServerError(title string, err error) { + ctx.Error(http.StatusInternalServerError, title, err) +} + // Error responds with an error message to client with given obj as the message. // If status is 500, also it prints error to log. func (ctx *APIContext) Error(status int, title string, obj interface{}) { @@ -86,7 +94,7 @@ func (ctx *APIContext) Error(status int, title string, obj interface{}) { if status == http.StatusInternalServerError { log.ErrorWithSkip(1, "%s: %s", title, message) - if macaron.Env == macaron.PROD && !(ctx.User != nil && ctx.User.IsAdmin) { + if setting.IsProd() && !(ctx.User != nil && ctx.User.IsAdmin) { message = "" } } @@ -103,7 +111,7 @@ func (ctx *APIContext) InternalServerError(err error) { log.ErrorWithSkip(1, "InternalServerError: %v", err) var message string - if macaron.Env != macaron.PROD || (ctx.User != nil && ctx.User.IsAdmin) { + if !setting.IsProd() || (ctx.User != nil && ctx.User.IsAdmin) { message = err.Error() } @@ -113,6 +121,20 @@ func (ctx *APIContext) InternalServerError(err error) { }) } +var ( + apiContextKey interface{} = "default_api_context" +) + +// WithAPIContext set up api context in request +func WithAPIContext(req *http.Request, ctx *APIContext) *http.Request { + return req.WithContext(context.WithValue(req.Context(), apiContextKey, ctx)) +} + +// GetAPIContext returns a context for API routes +func GetAPIContext(req *http.Request) *APIContext { + return req.Context().Value(apiContextKey).(*APIContext) +} + func genAPILinks(curURL *url.URL, total, pageSize, curPage int) []string { page := NewPagination(total, pageSize, curPage, 0) paginater := page.Paginater @@ -155,10 +177,27 @@ func genAPILinks(curURL *url.URL, total, pageSize, curPage int) []string { // SetLinkHeader sets pagination link header by given total number and page size. func (ctx *APIContext) SetLinkHeader(total, pageSize int) { - links := genAPILinks(ctx.Req.URL, total, pageSize, ctx.QueryInt("page")) + links := genAPILinks(ctx.Req.URL, total, pageSize, ctx.FormInt("page")) if len(links) > 0 { ctx.Header().Set("Link", strings.Join(links, ",")) + ctx.AppendAccessControlExposeHeaders("Link") + } +} + +// SetTotalCountHeader set "X-Total-Count" header +func (ctx *APIContext) SetTotalCountHeader(total int64) { + ctx.Header().Set("X-Total-Count", fmt.Sprint(total)) + ctx.AppendAccessControlExposeHeaders("X-Total-Count") +} + +// AppendAccessControlExposeHeaders append headers by name to "Access-Control-Expose-Headers" header +func (ctx *APIContext) AppendAccessControlExposeHeaders(names ...string) { + val := ctx.Header().Get("Access-Control-Expose-Headers") + if len(val) != 0 { + ctx.Header().Set("Access-Control-Expose-Headers", fmt.Sprintf("%s, %s", val, strings.Join(names, ", "))) + } else { + ctx.Header().Set("Access-Control-Expose-Headers", strings.Join(names, ", ")) } } @@ -167,7 +206,7 @@ func (ctx *APIContext) RequireCSRF() { headerToken := ctx.Req.Header.Get(ctx.csrf.GetHeaderName()) formValueToken := ctx.Req.FormValue(ctx.csrf.GetFormName()) if len(headerToken) > 0 || len(formValueToken) > 0 { - csrf.Validate(ctx.Context.Context, ctx.csrf) + Validate(ctx.Context, ctx.csrf) } else { ctx.Context.Error(401, "Missing CSRF token.") } @@ -181,12 +220,12 @@ func (ctx *APIContext) CheckForOTP() { if models.IsErrTwoFactorNotEnrolled(err) { return // No 2FA enrollment for this user } - ctx.Context.Error(500) + ctx.Context.Error(http.StatusInternalServerError) return } ok, err := twofa.ValidateTOTP(otpHeader) if err != nil { - ctx.Context.Error(500) + ctx.Context.Error(http.StatusInternalServerError) return } if !ok { @@ -195,43 +234,109 @@ func (ctx *APIContext) CheckForOTP() { } } -// APIContexter returns apicontext as macaron middleware -func APIContexter() macaron.Handler { - return func(c *Context) { - ctx := &APIContext{ - Context: c, +// APIAuth converts auth.Auth as a middleware +func APIAuth(authMethod auth.Method) func(*APIContext) { + return func(ctx *APIContext) { + // Get user from session if logged in. + ctx.User = authMethod.Verify(ctx.Req, ctx.Resp, ctx, ctx.Session) + if ctx.User != nil { + ctx.IsBasicAuth = ctx.Data["AuthedMethod"].(string) == new(auth.Basic).Name() + ctx.IsSigned = true + ctx.Data["IsSigned"] = ctx.IsSigned + ctx.Data["SignedUser"] = ctx.User + ctx.Data["SignedUserID"] = ctx.User.ID + ctx.Data["SignedUserName"] = ctx.User.Name + ctx.Data["IsAdmin"] = ctx.User.IsAdmin + } else { + ctx.Data["SignedUserID"] = int64(0) + ctx.Data["SignedUserName"] = "" } - c.Map(ctx) + } +} + +// APIContexter returns apicontext as middleware +func APIContexter() func(http.Handler) http.Handler { + var csrfOpts = getCsrfOpts() + + return func(next http.Handler) http.Handler { + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + var locale = middleware.Locale(w, req) + var ctx = APIContext{ + Context: &Context{ + Resp: NewResponse(w), + Data: map[string]interface{}{}, + Locale: locale, + Session: session.GetSession(req), + Repo: &Repository{ + PullRequest: &PullRequest{}, + }, + Org: &Organization{}, + }, + Org: &APIOrganization{}, + } + + ctx.Req = WithAPIContext(WithContext(req, ctx.Context), &ctx) + ctx.csrf = Csrfer(csrfOpts, ctx.Context) + + // If request sends files, parse them here otherwise the Query() can't be parsed and the CsrfToken will be invalid. + if ctx.Req.Method == "POST" && strings.Contains(ctx.Req.Header.Get("Content-Type"), "multipart/form-data") { + if err := ctx.Req.ParseMultipartForm(setting.Attachment.MaxSize << 20); err != nil && !strings.Contains(err.Error(), "EOF") { // 32MB max size + ctx.InternalServerError(err) + return + } + } + + ctx.Resp.Header().Set(`X-Frame-Options`, setting.CORSConfig.XFrameOptions) + + ctx.Data["CsrfToken"] = html.EscapeString(ctx.csrf.GetToken()) + + next.ServeHTTP(ctx.Resp, ctx.Req) + + // Handle adding signedUserName to the context for the AccessLogger + usernameInterface := ctx.Data["SignedUserName"] + identityPtrInterface := ctx.Req.Context().Value(signedUserNameStringPointerKey) + if usernameInterface != nil && identityPtrInterface != nil { + username := usernameInterface.(string) + identityPtr := identityPtrInterface.(*string) + if identityPtr != nil && username != "" { + *identityPtr = username + } + } + }) } } // ReferencesGitRepo injects the GitRepo into the Context -func ReferencesGitRepo(allowEmpty bool) macaron.Handler { - return func(ctx *APIContext) { - // Empty repository does not have reference information. - if !allowEmpty && ctx.Repo.Repository.IsEmpty { - return - } - - // For API calls. - if ctx.Repo.GitRepo == nil { - repoPath := models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name) - gitRepo, err := git.OpenRepository(repoPath) - if err != nil { - ctx.Error(500, "RepoRef Invalid repo "+repoPath, err) +func ReferencesGitRepo(allowEmpty bool) func(http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + ctx := GetAPIContext(req) + // Empty repository does not have reference information. + if !allowEmpty && ctx.Repo.Repository.IsEmpty { return } - ctx.Repo.GitRepo = gitRepo - // We opened it, we should close it - defer func() { - // If it's been set to nil then assume someone else has closed it. - if ctx.Repo.GitRepo != nil { - ctx.Repo.GitRepo.Close() - } - }() - } - ctx.Next() + // For API calls. + if ctx.Repo.GitRepo == nil { + repoPath := models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name) + gitRepo, err := git.OpenRepository(repoPath) + if err != nil { + ctx.Error(http.StatusInternalServerError, "RepoRef Invalid repo "+repoPath, err) + return + } + ctx.Repo.GitRepo = gitRepo + // We opened it, we should close it + defer func() { + // If it's been set to nil then assume someone else has closed it. + if ctx.Repo.GitRepo != nil { + ctx.Repo.GitRepo.Close() + } + }() + } + + next.ServeHTTP(w, req) + }) } } @@ -253,7 +358,7 @@ func (ctx *APIContext) NotFound(objs ...interface{}) { } } - ctx.JSON(404, map[string]interface{}{ + ctx.JSON(http.StatusNotFound, map[string]interface{}{ "message": message, "documentation_url": setting.API.SwaggerURL, "errors": errors, @@ -261,8 +366,9 @@ func (ctx *APIContext) NotFound(objs ...interface{}) { } // RepoRefForAPI handles repository reference names when the ref name is not explicitly given -func RepoRefForAPI() macaron.Handler { - return func(ctx *APIContext) { +func RepoRefForAPI(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + ctx := GetAPIContext(req) // Empty repository does not have reference information. if ctx.Repo.Repository.IsEmpty { return @@ -314,6 +420,6 @@ func RepoRefForAPI() macaron.Handler { return } - ctx.Next() - } + next.ServeHTTP(w, req) + }) } diff --git a/modules/context/auth.go b/modules/context/auth.go index 02248384e..ed220d542 100644 --- a/modules/context/auth.go +++ b/modules/context/auth.go @@ -6,13 +6,12 @@ package context import ( + "net/http" + "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - - "gitea.com/macaron/csrf" - "gitea.com/macaron/macaron" + "code.gitea.io/gitea/modules/web/middleware" ) // ToggleOptions contains required or check options @@ -24,47 +23,28 @@ type ToggleOptions struct { } // Toggle returns toggle options as middleware -func Toggle(options *ToggleOptions) macaron.Handler { +func Toggle(options *ToggleOptions) func(ctx *Context) { return func(ctx *Context) { - isAPIPath := auth.IsAPIPath(ctx.Req.URL.Path) - // Check prohibit login users. if ctx.IsSigned { if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { ctx.Data["Title"] = ctx.Tr("auth.active_your_account") - if isAPIPath { - ctx.JSON(403, map[string]string{ - "message": "This account is not activated.", - }) - return - } - ctx.HTML(200, "user/auth/activate") + ctx.HTML(http.StatusOK, "user/auth/activate") return - } else if !ctx.User.IsActive || ctx.User.ProhibitLogin { + } + if !ctx.User.IsActive || ctx.User.ProhibitLogin { log.Info("Failed authentication attempt for %s from %s", ctx.User.Name, ctx.RemoteAddr()) ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") - if isAPIPath { - ctx.JSON(403, map[string]string{ - "message": "This account is prohibited from signing in, please contact your site administrator.", - }) - return - } - ctx.HTML(200, "user/auth/prohibit_login") + ctx.HTML(http.StatusOK, "user/auth/prohibit_login") return } if ctx.User.MustChangePassword { - if isAPIPath { - ctx.JSON(403, map[string]string{ - "message": "You must change your password. Change it at: " + setting.AppURL + "/user/change_password", - }) - return - } if ctx.Req.URL.Path != "/user/settings/change_password" { ctx.Data["Title"] = ctx.Tr("auth.must_change_password") ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/change_password" if ctx.Req.URL.Path != "/user/events" { - ctx.SetCookie("redirect_to", setting.AppSubURL+ctx.Req.URL.RequestURI(), 0, setting.AppSubURL) + middleware.SetRedirectToCookie(ctx.Resp, setting.AppSubURL+ctx.Req.URL.RequestURI()) } ctx.Redirect(setting.AppSubURL + "/user/settings/change_password") return @@ -82,8 +62,8 @@ func Toggle(options *ToggleOptions) macaron.Handler { return } - if !options.SignOutRequired && !options.DisableCSRF && ctx.Req.Method == "POST" && !auth.IsAPIPath(ctx.Req.URL.Path) { - csrf.Validate(ctx.Context, ctx.csrf) + if !options.SignOutRequired && !options.DisableCSRF && ctx.Req.Method == "POST" { + Validate(ctx, ctx.csrf) if ctx.Written() { return } @@ -91,52 +71,23 @@ func Toggle(options *ToggleOptions) macaron.Handler { if options.SignInRequired { if !ctx.IsSigned { - // Restrict API calls with error message. - if isAPIPath { - ctx.JSON(403, map[string]string{ - "message": "Only signed in user is allowed to call APIs.", - }) - return - } if ctx.Req.URL.Path != "/user/events" { - ctx.SetCookie("redirect_to", setting.AppSubURL+ctx.Req.URL.RequestURI(), 0, setting.AppSubURL) + middleware.SetRedirectToCookie(ctx.Resp, setting.AppSubURL+ctx.Req.URL.RequestURI()) } ctx.Redirect(setting.AppSubURL + "/user/login") return } else if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { ctx.Data["Title"] = ctx.Tr("auth.active_your_account") - ctx.HTML(200, "user/auth/activate") + ctx.HTML(http.StatusOK, "user/auth/activate") return } - if ctx.IsSigned && isAPIPath && ctx.IsBasicAuth { - twofa, err := models.GetTwoFactorByUID(ctx.User.ID) - if err != nil { - if models.IsErrTwoFactorNotEnrolled(err) { - return // No 2FA enrollment for this user - } - ctx.Error(500) - return - } - otpHeader := ctx.Req.Header.Get("X-Gitea-OTP") - ok, err := twofa.ValidateTOTP(otpHeader) - if err != nil { - ctx.Error(500) - return - } - if !ok { - ctx.JSON(403, map[string]string{ - "message": "Only signed in user is allowed to call APIs.", - }) - return - } - } } // Redirect to log in page if auto-signin info is provided and has not signed in. - if !options.SignOutRequired && !ctx.IsSigned && !isAPIPath && + if !options.SignOutRequired && !ctx.IsSigned && len(ctx.GetCookie(setting.CookieUserName)) > 0 { if ctx.Req.URL.Path != "/user/events" { - ctx.SetCookie("redirect_to", setting.AppSubURL+ctx.Req.URL.RequestURI(), 0, setting.AppSubURL) + middleware.SetRedirectToCookie(ctx.Resp, setting.AppSubURL+ctx.Req.URL.RequestURI()) } ctx.Redirect(setting.AppSubURL + "/user/login") return @@ -144,7 +95,90 @@ func Toggle(options *ToggleOptions) macaron.Handler { if options.AdminRequired { if !ctx.User.IsAdmin { - ctx.Error(403) + ctx.Error(http.StatusForbidden) + return + } + ctx.Data["PageIsAdmin"] = true + } + } +} + +// ToggleAPI returns toggle options as middleware +func ToggleAPI(options *ToggleOptions) func(ctx *APIContext) { + return func(ctx *APIContext) { + // Check prohibit login users. + if ctx.IsSigned { + if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { + ctx.Data["Title"] = ctx.Tr("auth.active_your_account") + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "This account is not activated.", + }) + return + } + if !ctx.User.IsActive || ctx.User.ProhibitLogin { + log.Info("Failed authentication attempt for %s from %s", ctx.User.Name, ctx.RemoteAddr()) + ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "This account is prohibited from signing in, please contact your site administrator.", + }) + return + } + + if ctx.User.MustChangePassword { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "You must change your password. Change it at: " + setting.AppURL + "/user/change_password", + }) + return + } + } + + // Redirect to dashboard if user tries to visit any non-login page. + if options.SignOutRequired && ctx.IsSigned && ctx.Req.URL.RequestURI() != "/" { + ctx.Redirect(setting.AppSubURL + "/") + return + } + + if options.SignInRequired { + if !ctx.IsSigned { + // Restrict API calls with error message. + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only signed in user is allowed to call APIs.", + }) + return + } else if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { + ctx.Data["Title"] = ctx.Tr("auth.active_your_account") + ctx.HTML(http.StatusOK, "user/auth/activate") + return + } + if ctx.IsSigned && ctx.IsBasicAuth { + twofa, err := models.GetTwoFactorByUID(ctx.User.ID) + if err != nil { + if models.IsErrTwoFactorNotEnrolled(err) { + return // No 2FA enrollment for this user + } + ctx.InternalServerError(err) + return + } + otpHeader := ctx.Req.Header.Get("X-Gitea-OTP") + ok, err := twofa.ValidateTOTP(otpHeader) + if err != nil { + ctx.InternalServerError(err) + return + } + if !ok { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only signed in user is allowed to call APIs.", + }) + return + } + } + } + + if options.AdminRequired { + if !ctx.User.IsAdmin { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "You have no permission to request for this.", + }) return } ctx.Data["PageIsAdmin"] = true diff --git a/modules/context/captcha.go b/modules/context/captcha.go new file mode 100644 index 000000000..b8540136a --- /dev/null +++ b/modules/context/captcha.go @@ -0,0 +1,28 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package context + +import ( + "sync" + + "code.gitea.io/gitea/modules/cache" + "code.gitea.io/gitea/modules/setting" + + "gitea.com/go-chi/captcha" +) + +var imageCaptchaOnce sync.Once +var cpt *captcha.Captcha + +// GetImageCaptcha returns global image captcha +func GetImageCaptcha() *captcha.Captcha { + imageCaptchaOnce.Do(func() { + cpt = captcha.NewCaptcha(captcha.Options{ + SubURL: setting.AppSubURL, + }) + cpt.Store = cache.GetCache() + }) + return cpt +} diff --git a/modules/context/context.go b/modules/context/context.go index 1ee31e0eb..3dbc2bb9d 100644 --- a/modules/context/context.go +++ b/modules/context/context.go @@ -6,37 +6,56 @@ package context import ( + "context" + "crypto/sha256" + "encoding/hex" + "fmt" "html" "html/template" "io" "net/http" "net/url" "path" + "strconv" "strings" "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/auth/sso" "code.gitea.io/gitea/modules/base" + mc "code.gitea.io/gitea/modules/cache" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/auth" - "gitea.com/macaron/cache" - "gitea.com/macaron/csrf" - "gitea.com/macaron/i18n" - "gitea.com/macaron/macaron" - "gitea.com/macaron/session" + "gitea.com/go-chi/cache" + "gitea.com/go-chi/session" + "github.com/go-chi/chi" "github.com/unknwon/com" + "github.com/unknwon/i18n" + "github.com/unrolled/render" + "golang.org/x/crypto/pbkdf2" ) +// Render represents a template render +type Render interface { + TemplateLookup(tmpl string) *template.Template + HTML(w io.Writer, status int, name string, binding interface{}, htmlOpt ...render.HTMLOptions) error +} + // Context represents context of a request. type Context struct { - *macaron.Context + Resp ResponseWriter + Req *http.Request + Data map[string]interface{} + Render Render + translation.Locale Cache cache.Cache - csrf csrf.CSRF - Flash *session.Flash + csrf CSRF + Flash *middleware.Flash Session session.Store Link string // current request URL @@ -90,6 +109,26 @@ func (ctx *Context) IsUserRepoReaderAny() bool { return ctx.Repo.HasAccess() } +// RedirectToUser redirect to a differently-named user +func RedirectToUser(ctx *Context, userName string, redirectUserID int64) { + user, err := models.GetUserByID(redirectUserID) + if err != nil { + ctx.ServerError("GetUserByID", err) + return + } + + redirectPath := strings.Replace( + ctx.Req.URL.Path, + userName, + user.Name, + 1, + ) + if ctx.Req.URL.RawQuery != "" { + redirectPath += "?" + ctx.Req.URL.RawQuery + } + ctx.Redirect(path.Join(setting.AppSubURL, redirectPath)) +} + // HasAPIError returns true if error occurs in form validation. func (ctx *Context) HasAPIError() bool { hasErr, ok := ctx.Data["HasError"] @@ -143,17 +182,38 @@ func (ctx *Context) RedirectToFirst(location ...string) { // HTML calls Context.HTML and converts template name to string. func (ctx *Context) HTML(status int, name base.TplName) { log.Debug("Template: %s", name) - ctx.Context.HTML(status, string(name)) + var startTime = time.Now() + ctx.Data["TmplLoadTimes"] = func() string { + return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms" + } + if err := ctx.Render.HTML(ctx.Resp, status, string(name), ctx.Data); err != nil { + if status == http.StatusInternalServerError && name == base.TplName("status/500") { + ctx.PlainText(http.StatusInternalServerError, []byte("Unable to find status/500 template")) + return + } + ctx.ServerError("Render failed", err) + } +} + +// HTMLString render content to a string but not http.ResponseWriter +func (ctx *Context) HTMLString(name string, data interface{}) (string, error) { + var buf strings.Builder + var startTime = time.Now() + ctx.Data["TmplLoadTimes"] = func() string { + return fmt.Sprint(time.Since(startTime).Nanoseconds()/1e6) + "ms" + } + err := ctx.Render.HTML(&buf, 200, string(name), data) + return buf.String(), err } // RenderWithErr used for page has form validation but need to prompt error to users. func (ctx *Context) RenderWithErr(msg string, tpl base.TplName, form interface{}) { if form != nil { - auth.AssignForm(form, ctx.Data) + middleware.AssignForm(form, ctx.Data) } ctx.Flash.ErrorMsg = msg ctx.Data["Flash"] = ctx.Flash - ctx.HTML(200, tpl) + ctx.HTML(http.StatusOK, tpl) } // NotFound displays a 404 (Not Found) page and prints the given error, if any. @@ -164,11 +224,28 @@ func (ctx *Context) NotFound(title string, err error) { func (ctx *Context) notFoundInternal(title string, err error) { if err != nil { log.ErrorWithSkip(2, "%s: %v", title, err) - if macaron.Env != macaron.PROD { + if !setting.IsProd() { ctx.Data["ErrorMsg"] = err } } + // response simple meesage if Accept isn't text/html + reqTypes, has := ctx.Req.Header["Accept"] + if has && len(reqTypes) > 0 { + notHTML := true + for _, part := range reqTypes { + if strings.Contains(part, "text/html") { + notHTML = false + break + } + } + + if notHTML { + ctx.PlainText(404, []byte("Not found.\n")) + return + } + } + ctx.Data["IsRepo"] = ctx.Repo.Repository != nil ctx.Data["Title"] = "Page Not Found" ctx.HTML(http.StatusNotFound, base.TplName("status/404")) @@ -183,7 +260,7 @@ func (ctx *Context) ServerError(title string, err error) { func (ctx *Context) serverErrorInternal(title string, err error) { if err != nil { log.ErrorWithSkip(2, "%s: %v", title, err) - if macaron.Env != macaron.PROD { + if !setting.IsProd() { ctx.Data["ErrorMsg"] = err } } @@ -204,6 +281,11 @@ func (ctx *Context) NotFoundOrServerError(title string, errck func(error) bool, ctx.serverErrorInternal(title, err) } +// Header returns a header +func (ctx *Context) Header() http.Header { + return ctx.Resp.Header() +} + // HandleText handles HTTP status code func (ctx *Context) HandleText(status int, title string) { if (status/100 == 4) || (status/100 == 5) { @@ -229,89 +311,287 @@ func (ctx *Context) ServeContent(name string, r io.ReadSeeker, params ...interfa ctx.Resp.Header().Set("Cache-Control", "must-revalidate") ctx.Resp.Header().Set("Pragma", "public") ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition") - http.ServeContent(ctx.Resp, ctx.Req.Request, name, modtime, r) + http.ServeContent(ctx.Resp, ctx.Req, name, modtime, r) } -// Contexter initializes a classic context for a request. -func Contexter() macaron.Handler { - return func(c *macaron.Context, l i18n.Locale, cache cache.Cache, sess session.Store, f *session.Flash, x csrf.CSRF) { - ctx := &Context{ - Context: c, - Cache: cache, - csrf: x, - Flash: f, - Session: sess, - Link: setting.AppSubURL + strings.TrimSuffix(c.Req.URL.EscapedPath(), "/"), - Repo: &Repository{ - PullRequest: &PullRequest{}, - }, - Org: &Organization{}, +// PlainText render content as plain text +func (ctx *Context) PlainText(status int, bs []byte) { + ctx.Resp.WriteHeader(status) + ctx.Resp.Header().Set("Content-Type", "text/plain;charset=utf-8") + if _, err := ctx.Resp.Write(bs); err != nil { + ctx.ServerError("Render JSON failed", err) + } +} + +// ServeFile serves given file to response. +func (ctx *Context) ServeFile(file string, names ...string) { + var name string + if len(names) > 0 { + name = names[0] + } else { + name = path.Base(file) + } + ctx.Resp.Header().Set("Content-Description", "File Transfer") + ctx.Resp.Header().Set("Content-Type", "application/octet-stream") + ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+name) + ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary") + ctx.Resp.Header().Set("Expires", "0") + ctx.Resp.Header().Set("Cache-Control", "must-revalidate") + ctx.Resp.Header().Set("Pragma", "public") + http.ServeFile(ctx.Resp, ctx.Req, file) +} + +// ServeStream serves file via io stream +func (ctx *Context) ServeStream(rd io.Reader, name string) { + ctx.Resp.Header().Set("Content-Description", "File Transfer") + ctx.Resp.Header().Set("Content-Type", "application/octet-stream") + ctx.Resp.Header().Set("Content-Disposition", "attachment; filename="+name) + ctx.Resp.Header().Set("Content-Transfer-Encoding", "binary") + ctx.Resp.Header().Set("Expires", "0") + ctx.Resp.Header().Set("Cache-Control", "must-revalidate") + ctx.Resp.Header().Set("Pragma", "public") + _, err := io.Copy(ctx.Resp, rd) + if err != nil { + ctx.ServerError("Download file failed", err) + } +} + +// Error returned an error to web browser +func (ctx *Context) Error(status int, contents ...string) { + var v = http.StatusText(status) + if len(contents) > 0 { + v = contents[0] + } + http.Error(ctx.Resp, v, status) +} + +// JSON render content as JSON +func (ctx *Context) JSON(status int, content interface{}) { + ctx.Resp.Header().Set("Content-Type", "application/json;charset=utf-8") + ctx.Resp.WriteHeader(status) + if err := json.NewEncoder(ctx.Resp).Encode(content); err != nil { + ctx.ServerError("Render JSON failed", err) + } +} + +// Redirect redirect the request +func (ctx *Context) Redirect(location string, status ...int) { + code := http.StatusFound + if len(status) == 1 { + code = status[0] + } + + http.Redirect(ctx.Resp, ctx.Req, location, code) +} + +// SetCookie convenience function to set most cookies consistently +// CSRF and a few others are the exception here +func (ctx *Context) SetCookie(name, value string, expiry int) { + middleware.SetCookie(ctx.Resp, name, value, + expiry, + setting.AppSubURL, + setting.SessionConfig.Domain, + setting.SessionConfig.Secure, + true, + middleware.SameSite(setting.SessionConfig.SameSite)) +} + +// DeleteCookie convenience function to delete most cookies consistently +// CSRF and a few others are the exception here +func (ctx *Context) DeleteCookie(name string) { + middleware.SetCookie(ctx.Resp, name, "", + -1, + setting.AppSubURL, + setting.SessionConfig.Domain, + setting.SessionConfig.Secure, + true, + middleware.SameSite(setting.SessionConfig.SameSite)) +} + +// GetCookie returns given cookie value from request header. +func (ctx *Context) GetCookie(name string) string { + return middleware.GetCookie(ctx.Req, name) +} + +// GetSuperSecureCookie returns given cookie value from request header with secret string. +func (ctx *Context) GetSuperSecureCookie(secret, name string) (string, bool) { + val := ctx.GetCookie(name) + return ctx.CookieDecrypt(secret, val) +} + +// CookieDecrypt returns given value from with secret string. +func (ctx *Context) CookieDecrypt(secret, val string) (string, bool) { + if val == "" { + return "", false + } + + text, err := hex.DecodeString(val) + if err != nil { + return "", false + } + + key := pbkdf2.Key([]byte(secret), []byte(secret), 1000, 16, sha256.New) + text, err = com.AESGCMDecrypt(key, text) + return string(text), err == nil +} + +// SetSuperSecureCookie sets given cookie value to response header with secret string. +func (ctx *Context) SetSuperSecureCookie(secret, name, value string, expiry int) { + text := ctx.CookieEncrypt(secret, value) + + ctx.SetCookie(name, text, expiry) +} + +// CookieEncrypt encrypts a given value using the provided secret +func (ctx *Context) CookieEncrypt(secret, value string) string { + key := pbkdf2.Key([]byte(secret), []byte(secret), 1000, 16, sha256.New) + text, err := com.AESGCMEncrypt(key, []byte(value)) + if err != nil { + panic("error encrypting cookie: " + err.Error()) + } + + return hex.EncodeToString(text) +} + +// GetCookieInt returns cookie result in int type. +func (ctx *Context) GetCookieInt(name string) int { + r, _ := strconv.Atoi(ctx.GetCookie(name)) + return r +} + +// GetCookieInt64 returns cookie result in int64 type. +func (ctx *Context) GetCookieInt64(name string) int64 { + r, _ := strconv.ParseInt(ctx.GetCookie(name), 10, 64) + return r +} + +// GetCookieFloat64 returns cookie result in float64 type. +func (ctx *Context) GetCookieFloat64(name string) float64 { + v, _ := strconv.ParseFloat(ctx.GetCookie(name), 64) + return v +} + +// RemoteAddr returns the client machie ip address +func (ctx *Context) RemoteAddr() string { + return ctx.Req.RemoteAddr +} + +// Params returns the param on route +func (ctx *Context) Params(p string) string { + s, _ := url.PathUnescape(chi.URLParam(ctx.Req, strings.TrimPrefix(p, ":"))) + return s +} + +// ParamsInt64 returns the param on route as int64 +func (ctx *Context) ParamsInt64(p string) int64 { + v, _ := strconv.ParseInt(ctx.Params(p), 10, 64) + return v +} + +// SetParams set params into routes +func (ctx *Context) SetParams(k, v string) { + chiCtx := chi.RouteContext(ctx) + chiCtx.URLParams.Add(strings.TrimPrefix(k, ":"), url.PathEscape(v)) +} + +// Write writes data to webbrowser +func (ctx *Context) Write(bs []byte) (int, error) { + return ctx.Resp.Write(bs) +} + +// Written returns true if there are something sent to web browser +func (ctx *Context) Written() bool { + return ctx.Resp.Status() > 0 +} + +// Status writes status code +func (ctx *Context) Status(status int) { + ctx.Resp.WriteHeader(status) +} + +// Deadline is part of the interface for context.Context and we pass this to the request context +func (ctx *Context) Deadline() (deadline time.Time, ok bool) { + return ctx.Req.Context().Deadline() +} + +// Done is part of the interface for context.Context and we pass this to the request context +func (ctx *Context) Done() <-chan struct{} { + return ctx.Req.Context().Done() +} + +// Err is part of the interface for context.Context and we pass this to the request context +func (ctx *Context) Err() error { + return ctx.Req.Context().Err() +} + +// Value is part of the interface for context.Context and we pass this to the request context +func (ctx *Context) Value(key interface{}) interface{} { + return ctx.Req.Context().Value(key) +} + +// Handler represents a custom handler +type Handler func(*Context) + +// enumerate all content +var ( + contextKey interface{} = "default_context" +) + +// WithContext set up install context in request +func WithContext(req *http.Request, ctx *Context) *http.Request { + return req.WithContext(context.WithValue(req.Context(), contextKey, ctx)) +} + +// GetContext retrieves install context from request +func GetContext(req *http.Request) *Context { + return req.Context().Value(contextKey).(*Context) +} + +// SignedUserName returns signed user's name via context +func SignedUserName(req *http.Request) string { + if middleware.IsInternalPath(req) { + return "" + } + if middleware.IsAPIPath(req) { + ctx, ok := req.Context().Value(apiContextKey).(*APIContext) + if ok { + v := ctx.Data["SignedUserName"] + if res, ok := v.(string); ok { + return res + } } - ctx.Data["Language"] = ctx.Locale.Language() - c.Data["Link"] = ctx.Link - ctx.Data["CurrentURL"] = setting.AppSubURL + c.Req.URL.RequestURI() - ctx.Data["PageStartTime"] = time.Now() - // Quick responses appropriate go-get meta with status 200 - // regardless of if user have access to the repository, - // or the repository does not exist at all. - // This is particular a workaround for "go get" command which does not respect - // .netrc file. - if ctx.Query("go-get") == "1" { - ownerName := c.Params(":username") - repoName := c.Params(":reponame") - trimmedRepoName := strings.TrimSuffix(repoName, ".git") - - if ownerName == "" || trimmedRepoName == "" { - _, _ = c.Write([]byte(` - - - invalid import path - - -`)) - c.WriteHeader(400) - return + } else { + ctx, ok := req.Context().Value(contextKey).(*Context) + if ok { + v := ctx.Data["SignedUserName"] + if res, ok := v.(string); ok { + return res } - branchName := "master" - - repo, err := models.GetRepositoryByOwnerAndName(ownerName, repoName) - if err == nil && len(repo.DefaultBranch) > 0 { - branchName = repo.DefaultBranch - } - prefix := setting.AppURL + path.Join(url.PathEscape(ownerName), url.PathEscape(repoName), "src", "branch", util.PathEscapeSegments(branchName)) - - appURL, _ := url.Parse(setting.AppURL) - - insecure := "" - if appURL.Scheme == string(setting.HTTP) { - insecure = "--insecure " - } - c.Header().Set("Content-Type", "text/html") - c.WriteHeader(http.StatusOK) - _, _ = c.Write([]byte(com.Expand(` - - - - - - - go get {Insecure}{GoGetImport} - - -`, map[string]string{ - "GoGetImport": ComposeGoGetImport(ownerName, trimmedRepoName), - "CloneLink": models.ComposeHTTPSCloneURL(ownerName, repoName), - "GoDocDirectory": prefix + "{/dir}", - "GoDocFile": prefix + "{/dir}/{file}#L{line}", - "Insecure": insecure, - }))) - return } + } + return "" +} - // Get user from session if logged in. - ctx.User, ctx.IsBasicAuth = sso.SignedInUser(ctx.Req.Request, c.Resp, ctx, ctx.Session) +func getCsrfOpts() CsrfOptions { + return CsrfOptions{ + Secret: setting.SecretKey, + Cookie: setting.CSRFCookieName, + SetCookie: true, + Secure: setting.SessionConfig.Secure, + CookieHTTPOnly: setting.CSRFCookieHTTPOnly, + Header: "X-Csrf-Token", + CookieDomain: setting.SessionConfig.Domain, + CookiePath: setting.SessionConfig.CookiePath, + SameSite: setting.SessionConfig.SameSite, + } +} +// Auth converts auth.Auth as a middleware +func Auth(authMethod auth.Method) func(*Context) { + return func(ctx *Context) { + ctx.User = authMethod.Verify(ctx.Req, ctx.Resp, ctx, ctx.Session) if ctx.User != nil { + ctx.IsBasicAuth = ctx.Data["AuthedMethod"].(string) == new(auth.Basic).Name() ctx.IsSigned = true ctx.Data["IsSigned"] = ctx.IsSigned ctx.Data["SignedUser"] = ctx.User @@ -321,38 +601,150 @@ func Contexter() macaron.Handler { } else { ctx.Data["SignedUserID"] = int64(0) ctx.Data["SignedUserName"] = "" + + // ensure the session uid is deleted + _ = ctx.Session.Delete("uid") } - - // If request sends files, parse them here otherwise the Query() can't be parsed and the CsrfToken will be invalid. - if ctx.Req.Method == "POST" && strings.Contains(ctx.Req.Header.Get("Content-Type"), "multipart/form-data") { - if err := ctx.Req.ParseMultipartForm(setting.Attachment.MaxSize << 20); err != nil && !strings.Contains(err.Error(), "EOF") { // 32MB max size - ctx.ServerError("ParseMultipartForm", err) - return - } - } - - ctx.Resp.Header().Set(`X-Frame-Options`, `SAMEORIGIN`) - - ctx.Data["CsrfToken"] = html.EscapeString(x.GetToken()) - ctx.Data["CsrfTokenHtml"] = template.HTML(``) - log.Debug("Session ID: %s", sess.ID()) - log.Debug("CSRF Token: %v", ctx.Data["CsrfToken"]) - - ctx.Data["IsLandingPageHome"] = setting.LandingPageURL == setting.LandingPageHome - ctx.Data["IsLandingPageExplore"] = setting.LandingPageURL == setting.LandingPageExplore - ctx.Data["IsLandingPageOrganizations"] = setting.LandingPageURL == setting.LandingPageOrganizations - - ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton - ctx.Data["ShowMilestonesDashboardPage"] = setting.Service.ShowMilestonesDashboardPage - ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding - ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion - - ctx.Data["EnableSwagger"] = setting.API.EnableSwagger - ctx.Data["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn - ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations - - ctx.Data["ManifestData"] = setting.ManifestData - - c.Map(ctx) + } +} + +// Contexter initializes a classic context for a request. +func Contexter() func(next http.Handler) http.Handler { + var rnd = templates.HTMLRenderer() + var csrfOpts = getCsrfOpts() + + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + var locale = middleware.Locale(resp, req) + var startTime = time.Now() + var link = setting.AppSubURL + strings.TrimSuffix(req.URL.EscapedPath(), "/") + var ctx = Context{ + Resp: NewResponse(resp), + Cache: mc.GetCache(), + Locale: locale, + Link: link, + Render: rnd, + Session: session.GetSession(req), + Repo: &Repository{ + PullRequest: &PullRequest{}, + }, + Org: &Organization{}, + Data: map[string]interface{}{ + "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), + "PageStartTime": startTime, + "Link": link, + }, + } + + ctx.Req = WithContext(req, &ctx) + ctx.csrf = Csrfer(csrfOpts, &ctx) + + // Get flash. + flashCookie := ctx.GetCookie("macaron_flash") + vals, _ := url.ParseQuery(flashCookie) + if len(vals) > 0 { + f := &middleware.Flash{ + DataStore: &ctx, + Values: vals, + ErrorMsg: vals.Get("error"), + SuccessMsg: vals.Get("success"), + InfoMsg: vals.Get("info"), + WarningMsg: vals.Get("warning"), + } + ctx.Data["Flash"] = f + } + + f := &middleware.Flash{ + DataStore: &ctx, + Values: url.Values{}, + ErrorMsg: "", + WarningMsg: "", + InfoMsg: "", + SuccessMsg: "", + } + ctx.Resp.Before(func(resp ResponseWriter) { + if flash := f.Encode(); len(flash) > 0 { + middleware.SetCookie(resp, "macaron_flash", flash, 0, + setting.SessionConfig.CookiePath, + middleware.Domain(setting.SessionConfig.Domain), + middleware.HTTPOnly(true), + middleware.Secure(setting.SessionConfig.Secure), + middleware.SameSite(setting.SessionConfig.SameSite), + ) + return + } + + middleware.SetCookie(ctx.Resp, "macaron_flash", "", -1, + setting.SessionConfig.CookiePath, + middleware.Domain(setting.SessionConfig.Domain), + middleware.HTTPOnly(true), + middleware.Secure(setting.SessionConfig.Secure), + middleware.SameSite(setting.SessionConfig.SameSite), + ) + }) + + ctx.Flash = f + + // If request sends files, parse them here otherwise the Query() can't be parsed and the CsrfToken will be invalid. + if ctx.Req.Method == "POST" && strings.Contains(ctx.Req.Header.Get("Content-Type"), "multipart/form-data") { + if err := ctx.Req.ParseMultipartForm(setting.Attachment.MaxSize << 20); err != nil && !strings.Contains(err.Error(), "EOF") { // 32MB max size + ctx.ServerError("ParseMultipartForm", err) + return + } + } + + ctx.Resp.Header().Set(`X-Frame-Options`, setting.CORSConfig.XFrameOptions) + + ctx.Data["CsrfToken"] = html.EscapeString(ctx.csrf.GetToken()) + ctx.Data["CsrfTokenHtml"] = template.HTML(``) + log.Debug("Session ID: %s", ctx.Session.ID()) + log.Debug("CSRF Token: %v", ctx.Data["CsrfToken"]) + + // FIXME: do we really always need these setting? There should be someway to have to avoid having to always set these + ctx.Data["IsLandingPageHome"] = setting.LandingPageURL == setting.LandingPageHome + ctx.Data["IsLandingPageExplore"] = setting.LandingPageURL == setting.LandingPageExplore + ctx.Data["IsLandingPageOrganizations"] = setting.LandingPageURL == setting.LandingPageOrganizations + + ctx.Data["ShowRegistrationButton"] = setting.Service.ShowRegistrationButton + ctx.Data["ShowMilestonesDashboardPage"] = setting.Service.ShowMilestonesDashboardPage + ctx.Data["ShowFooterBranding"] = setting.ShowFooterBranding + ctx.Data["ShowFooterVersion"] = setting.ShowFooterVersion + + ctx.Data["EnableSwagger"] = setting.API.EnableSwagger + ctx.Data["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn + ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations + ctx.Data["DisableStars"] = setting.Repository.DisableStars + + ctx.Data["ManifestData"] = setting.ManifestData + + ctx.Data["UnitWikiGlobalDisabled"] = models.UnitTypeWiki.UnitGlobalDisabled() + ctx.Data["UnitIssuesGlobalDisabled"] = models.UnitTypeIssues.UnitGlobalDisabled() + ctx.Data["UnitPullsGlobalDisabled"] = models.UnitTypePullRequests.UnitGlobalDisabled() + ctx.Data["UnitProjectsGlobalDisabled"] = models.UnitTypeProjects.UnitGlobalDisabled() + + ctx.Data["i18n"] = locale + ctx.Data["Tr"] = i18n.Tr + ctx.Data["Lang"] = locale.Language() + ctx.Data["AllLangs"] = translation.AllLangs() + for _, lang := range translation.AllLangs() { + if lang.Lang == locale.Language() { + ctx.Data["LangName"] = lang.Name + break + } + } + + next.ServeHTTP(ctx.Resp, ctx.Req) + + // Handle adding signedUserName to the context for the AccessLogger + usernameInterface := ctx.Data["SignedUserName"] + identityPtrInterface := ctx.Req.Context().Value(signedUserNameStringPointerKey) + if usernameInterface != nil && identityPtrInterface != nil { + username := usernameInterface.(string) + identityPtr := identityPtrInterface.(*string) + if identityPtr != nil && username != "" { + *identityPtr = username + } + } + }) } } diff --git a/modules/context/csrf.go b/modules/context/csrf.go new file mode 100644 index 000000000..8d179ca90 --- /dev/null +++ b/modules/context/csrf.go @@ -0,0 +1,301 @@ +// Copyright 2013 Martini Authors +// Copyright 2014 The Macaron Authors +// Copyright 2021 The Gitea Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"): you may +// not use this file except in compliance with the License. You may obtain +// a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +// License for the specific language governing permissions and limitations +// under the License. + +// a middleware that generates and validates CSRF tokens. + +package context + +import ( + "net/http" + "time" + + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web/middleware" + + "github.com/unknwon/com" +) + +// CSRF represents a CSRF service and is used to get the current token and validate a suspect token. +type CSRF interface { + // Return HTTP header to search for token. + GetHeaderName() string + // Return form value to search for token. + GetFormName() string + // Return cookie name to search for token. + GetCookieName() string + // Return cookie path + GetCookiePath() string + // Return the flag value used for the csrf token. + GetCookieHTTPOnly() bool + // Return cookie domain + GetCookieDomain() string + // Return the token. + GetToken() string + // Validate by token. + ValidToken(t string) bool + // Error replies to the request with a custom function when ValidToken fails. + Error(w http.ResponseWriter) +} + +type csrf struct { + // Header name value for setting and getting csrf token. + Header string + // Form name value for setting and getting csrf token. + Form string + // Cookie name value for setting and getting csrf token. + Cookie string + //Cookie domain + CookieDomain string + //Cookie path + CookiePath string + // Cookie HttpOnly flag value used for the csrf token. + CookieHTTPOnly bool + // Token generated to pass via header, cookie, or hidden form value. + Token string + // This value must be unique per user. + ID string + // Secret used along with the unique id above to generate the Token. + Secret string + // ErrorFunc is the custom function that replies to the request when ValidToken fails. + ErrorFunc func(w http.ResponseWriter) +} + +// GetHeaderName returns the name of the HTTP header for csrf token. +func (c *csrf) GetHeaderName() string { + return c.Header +} + +// GetFormName returns the name of the form value for csrf token. +func (c *csrf) GetFormName() string { + return c.Form +} + +// GetCookieName returns the name of the cookie for csrf token. +func (c *csrf) GetCookieName() string { + return c.Cookie +} + +// GetCookiePath returns the path of the cookie for csrf token. +func (c *csrf) GetCookiePath() string { + return c.CookiePath +} + +// GetCookieHTTPOnly returns the flag value used for the csrf token. +func (c *csrf) GetCookieHTTPOnly() bool { + return c.CookieHTTPOnly +} + +// GetCookieDomain returns the flag value used for the csrf token. +func (c *csrf) GetCookieDomain() string { + return c.CookieDomain +} + +// GetToken returns the current token. This is typically used +// to populate a hidden form in an HTML template. +func (c *csrf) GetToken() string { + return c.Token +} + +// ValidToken validates the passed token against the existing Secret and ID. +func (c *csrf) ValidToken(t string) bool { + return ValidToken(t, c.Secret, c.ID, "POST") +} + +// Error replies to the request when ValidToken fails. +func (c *csrf) Error(w http.ResponseWriter) { + c.ErrorFunc(w) +} + +// CsrfOptions maintains options to manage behavior of Generate. +type CsrfOptions struct { + // The global secret value used to generate Tokens. + Secret string + // HTTP header used to set and get token. + Header string + // Form value used to set and get token. + Form string + // Cookie value used to set and get token. + Cookie string + // Cookie domain. + CookieDomain string + // Cookie path. + CookiePath string + CookieHTTPOnly bool + // SameSite set the cookie SameSite type + SameSite http.SameSite + // Key used for getting the unique ID per user. + SessionKey string + // oldSessionKey saves old value corresponding to SessionKey. + oldSessionKey string + // If true, send token via X-CSRFToken header. + SetHeader bool + // If true, send token via _csrf cookie. + SetCookie bool + // Set the Secure flag to true on the cookie. + Secure bool + // Disallow Origin appear in request header. + Origin bool + // The function called when Validate fails. + ErrorFunc func(w http.ResponseWriter) + // Cookie life time. Default is 0 + CookieLifeTime int +} + +func prepareOptions(options []CsrfOptions) CsrfOptions { + var opt CsrfOptions + if len(options) > 0 { + opt = options[0] + } + + // Defaults. + if len(opt.Secret) == 0 { + opt.Secret = string(com.RandomCreateBytes(10)) + } + if len(opt.Header) == 0 { + opt.Header = "X-CSRFToken" + } + if len(opt.Form) == 0 { + opt.Form = "_csrf" + } + if len(opt.Cookie) == 0 { + opt.Cookie = "_csrf" + } + if len(opt.CookiePath) == 0 { + opt.CookiePath = "/" + } + if len(opt.SessionKey) == 0 { + opt.SessionKey = "uid" + } + opt.oldSessionKey = "_old_" + opt.SessionKey + if opt.ErrorFunc == nil { + opt.ErrorFunc = func(w http.ResponseWriter) { + http.Error(w, "Invalid csrf token.", http.StatusBadRequest) + } + } + + return opt +} + +// Csrfer maps CSRF to each request. If this request is a Get request, it will generate a new token. +// Additionally, depending on options set, generated tokens will be sent via Header and/or Cookie. +func Csrfer(opt CsrfOptions, ctx *Context) CSRF { + opt = prepareOptions([]CsrfOptions{opt}) + x := &csrf{ + Secret: opt.Secret, + Header: opt.Header, + Form: opt.Form, + Cookie: opt.Cookie, + CookieDomain: opt.CookieDomain, + CookiePath: opt.CookiePath, + CookieHTTPOnly: opt.CookieHTTPOnly, + ErrorFunc: opt.ErrorFunc, + } + + if opt.Origin && len(ctx.Req.Header.Get("Origin")) > 0 { + return x + } + + x.ID = "0" + uid := ctx.Session.Get(opt.SessionKey) + if uid != nil { + x.ID = com.ToStr(uid) + } + + needsNew := false + oldUID := ctx.Session.Get(opt.oldSessionKey) + if oldUID == nil || oldUID.(string) != x.ID { + needsNew = true + _ = ctx.Session.Set(opt.oldSessionKey, x.ID) + } else { + // If cookie present, map existing token, else generate a new one. + if val := ctx.GetCookie(opt.Cookie); len(val) > 0 { + // FIXME: test coverage. + x.Token = val + } else { + needsNew = true + } + } + + if needsNew { + // FIXME: actionId. + x.Token = GenerateToken(x.Secret, x.ID, "POST") + if opt.SetCookie { + var expires interface{} + if opt.CookieLifeTime == 0 { + expires = time.Now().AddDate(0, 0, 1) + } + middleware.SetCookie(ctx.Resp, opt.Cookie, x.Token, + opt.CookieLifeTime, + opt.CookiePath, + opt.CookieDomain, + opt.Secure, + opt.CookieHTTPOnly, + expires, + middleware.SameSite(opt.SameSite), + ) + } + } + + if opt.SetHeader { + ctx.Resp.Header().Add(opt.Header, x.Token) + } + return x +} + +// Validate should be used as a per route middleware. It attempts to get a token from a "X-CSRFToken" +// HTTP header and then a "_csrf" form value. If one of these is found, the token will be validated +// using ValidToken. If this validation fails, custom Error is sent in the reply. +// If neither a header or form value is found, http.StatusBadRequest is sent. +func Validate(ctx *Context, x CSRF) { + if token := ctx.Req.Header.Get(x.GetHeaderName()); len(token) > 0 { + if !x.ValidToken(token) { + // Delete the cookie + middleware.SetCookie(ctx.Resp, x.GetCookieName(), "", + -1, + x.GetCookiePath(), + x.GetCookieDomain()) // FIXME: Do we need to set the Secure, httpOnly and SameSite values too? + if middleware.IsAPIPath(ctx.Req) { + x.Error(ctx.Resp) + return + } + ctx.Flash.Error(ctx.Tr("error.invalid_csrf")) + ctx.Redirect(setting.AppSubURL + "/") + } + return + } + if token := ctx.Req.FormValue(x.GetFormName()); len(token) > 0 { + if !x.ValidToken(token) { + // Delete the cookie + middleware.SetCookie(ctx.Resp, x.GetCookieName(), "", + -1, + x.GetCookiePath(), + x.GetCookieDomain()) // FIXME: Do we need to set the Secure, httpOnly and SameSite values too? + if middleware.IsAPIPath(ctx.Req) { + x.Error(ctx.Resp) + return + } + ctx.Flash.Error(ctx.Tr("error.invalid_csrf")) + ctx.Redirect(setting.AppSubURL + "/") + } + return + } + if middleware.IsAPIPath(ctx.Req) { + http.Error(ctx.Resp, "Bad Request: no CSRF token present", http.StatusBadRequest) + return + } + ctx.Flash.Error(ctx.Tr("error.missing_csrf")) + ctx.Redirect(setting.AppSubURL + "/") +} diff --git a/modules/context/form.go b/modules/context/form.go new file mode 100644 index 000000000..8d1859097 --- /dev/null +++ b/modules/context/form.go @@ -0,0 +1,64 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package context + +import ( + "strconv" + "strings" + + "code.gitea.io/gitea/modules/util" +) + +// FormString returns the first value matching the provided key in the form as a string +func (ctx *Context) FormString(key string) string { + return ctx.Req.FormValue(key) +} + +// FormStrings returns a string slice for the provided key from the form +func (ctx *Context) FormStrings(key string) []string { + if ctx.Req.Form == nil { + if err := ctx.Req.ParseMultipartForm(32 << 20); err != nil { + return nil + } + } + if v, ok := ctx.Req.Form[key]; ok { + return v + } + return nil +} + +// FormTrim returns the first value for the provided key in the form as a space trimmed string +func (ctx *Context) FormTrim(key string) string { + return strings.TrimSpace(ctx.Req.FormValue(key)) +} + +// FormInt returns the first value for the provided key in the form as an int +func (ctx *Context) FormInt(key string) int { + v, _ := strconv.Atoi(ctx.Req.FormValue(key)) + return v +} + +// FormInt64 returns the first value for the provided key in the form as an int64 +func (ctx *Context) FormInt64(key string) int64 { + v, _ := strconv.ParseInt(ctx.Req.FormValue(key), 10, 64) + return v +} + +// FormBool returns true if the value for the provided key in the form is "1" or "true" +func (ctx *Context) FormBool(key string) bool { + v, _ := strconv.ParseBool(ctx.Req.FormValue(key)) + return v +} + +// FormOptionalBool returns an OptionalBoolTrue or OptionalBoolFalse if the value +// for the provided key exists in the form else it returns OptionalBoolNone +func (ctx *Context) FormOptionalBool(key string) util.OptionalBool { + value := ctx.Req.FormValue(key) + if len(value) == 0 { + return util.OptionalBoolNone + } + v, _ := strconv.ParseBool(ctx.Req.FormValue(key)) + return util.OptionalBoolOf(v) +} diff --git a/modules/context/org.go b/modules/context/org.go index 9b87fba9f..fd67212a1 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -9,9 +9,6 @@ import ( "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/setting" - - "gitea.com/macaron/macaron" ) // Organization contains organization context @@ -54,7 +51,14 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { ctx.Org.Organization, err = models.GetUserByName(orgName) if err != nil { if models.IsErrUserNotExist(err) { - ctx.NotFound("GetUserByName", err) + redirectUserID, err := models.LookupUserRedirect(orgName) + if err == nil { + RedirectToUser(ctx, orgName, redirectUserID) + } else if models.IsErrUserRedirectNotExist(err) { + ctx.NotFound("GetUserByName", err) + } else { + ctx.ServerError("LookupUserRedirect", err) + } } else { ctx.ServerError("GetUserByName", err) } @@ -65,7 +69,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { // Force redirection when username is actually a user. if !org.IsOrganization() { - ctx.Redirect(setting.AppSubURL + "/" + org.Name) + ctx.Redirect(org.HomeLink()) return } @@ -113,14 +117,14 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { ctx.Data["IsOrganizationMember"] = ctx.Org.IsMember ctx.Data["CanCreateOrgRepo"] = ctx.Org.CanCreateOrgRepo - ctx.Org.OrgLink = setting.AppSubURL + "/org/" + org.Name + ctx.Org.OrgLink = org.OrganisationLink() ctx.Data["OrgLink"] = ctx.Org.OrgLink // Team. if ctx.Org.IsMember { if ctx.Org.IsOwner { - if err := org.GetTeams(&models.SearchTeamOptions{}); err != nil { - ctx.ServerError("GetTeams", err) + if err := org.LoadTeams(); err != nil { + ctx.ServerError("LoadTeams", err) return } } else { @@ -165,8 +169,8 @@ func HandleOrgAssignment(ctx *Context, args ...bool) { } } -// OrgAssignment returns a macaron middleware to handle organization assignment -func OrgAssignment(args ...bool) macaron.Handler { +// OrgAssignment returns a middleware to handle organization assignment +func OrgAssignment(args ...bool) func(ctx *Context) { return func(ctx *Context) { HandleOrgAssignment(ctx, args...) } diff --git a/modules/context/pagination.go b/modules/context/pagination.go index a6638f408..b678fccd1 100644 --- a/modules/context/pagination.go +++ b/modules/context/pagination.go @@ -53,4 +53,5 @@ func (p *Pagination) SetDefaultParams(ctx *Context) { p.AddParam(ctx, "sort", "SortType") p.AddParam(ctx, "q", "Keyword") p.AddParam(ctx, "tab", "TabName") + p.AddParam(ctx, "t", "queryType") } diff --git a/modules/context/permission.go b/modules/context/permission.go index 151be9f83..b9cdf93de 100644 --- a/modules/context/permission.go +++ b/modules/context/permission.go @@ -7,12 +7,10 @@ package context import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/log" - - "gitea.com/macaron/macaron" ) -// RequireRepoAdmin returns a macaron middleware for requiring repository admin permission -func RequireRepoAdmin() macaron.Handler { +// RequireRepoAdmin returns a middleware for requiring repository admin permission +func RequireRepoAdmin() func(ctx *Context) { return func(ctx *Context) { if !ctx.IsSigned || !ctx.Repo.IsAdmin() { ctx.NotFound(ctx.Req.URL.RequestURI(), nil) @@ -21,8 +19,8 @@ func RequireRepoAdmin() macaron.Handler { } } -// RequireRepoWriter returns a macaron middleware for requiring repository write to the specify unitType -func RequireRepoWriter(unitType models.UnitType) macaron.Handler { +// RequireRepoWriter returns a middleware for requiring repository write to the specify unitType +func RequireRepoWriter(unitType models.UnitType) func(ctx *Context) { return func(ctx *Context) { if !ctx.Repo.CanWrite(unitType) { ctx.NotFound(ctx.Req.URL.RequestURI(), nil) @@ -31,8 +29,8 @@ func RequireRepoWriter(unitType models.UnitType) macaron.Handler { } } -// RequireRepoWriterOr returns a macaron middleware for requiring repository write to one of the unit permission -func RequireRepoWriterOr(unitTypes ...models.UnitType) macaron.Handler { +// RequireRepoWriterOr returns a middleware for requiring repository write to one of the unit permission +func RequireRepoWriterOr(unitTypes ...models.UnitType) func(ctx *Context) { return func(ctx *Context) { for _, unitType := range unitTypes { if ctx.Repo.CanWrite(unitType) { @@ -43,8 +41,8 @@ func RequireRepoWriterOr(unitTypes ...models.UnitType) macaron.Handler { } } -// RequireRepoReader returns a macaron middleware for requiring repository read to the specify unitType -func RequireRepoReader(unitType models.UnitType) macaron.Handler { +// RequireRepoReader returns a middleware for requiring repository read to the specify unitType +func RequireRepoReader(unitType models.UnitType) func(ctx *Context) { return func(ctx *Context) { if !ctx.Repo.CanRead(unitType) { if log.IsTrace() { @@ -69,8 +67,8 @@ func RequireRepoReader(unitType models.UnitType) macaron.Handler { } } -// RequireRepoReaderOr returns a macaron middleware for requiring repository write to one of the unit permission -func RequireRepoReaderOr(unitTypes ...models.UnitType) macaron.Handler { +// RequireRepoReaderOr returns a middleware for requiring repository write to one of the unit permission +func RequireRepoReaderOr(unitTypes ...models.UnitType) func(ctx *Context) { return func(ctx *Context) { for _, unitType := range unitTypes { if ctx.Repo.CanRead(unitType) { diff --git a/modules/context/private.go b/modules/context/private.go new file mode 100644 index 000000000..dfefa1d2f --- /dev/null +++ b/modules/context/private.go @@ -0,0 +1,45 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package context + +import ( + "context" + "net/http" +) + +// PrivateContext represents a context for private routes +type PrivateContext struct { + *Context +} + +var ( + privateContextKey interface{} = "default_private_context" +) + +// WithPrivateContext set up private context in request +func WithPrivateContext(req *http.Request, ctx *PrivateContext) *http.Request { + return req.WithContext(context.WithValue(req.Context(), privateContextKey, ctx)) +} + +// GetPrivateContext returns a context for Private routes +func GetPrivateContext(req *http.Request) *PrivateContext { + return req.Context().Value(privateContextKey).(*PrivateContext) +} + +// PrivateContexter returns apicontext as middleware +func PrivateContexter() func(http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + ctx := &PrivateContext{ + Context: &Context{ + Resp: NewResponse(w), + Data: map[string]interface{}{}, + }, + } + ctx.Req = WithPrivateContext(req, ctx) + next.ServeHTTP(ctx.Resp, ctx.Req) + }) + } +} diff --git a/modules/context/repo.go b/modules/context/repo.go index 2aee6caca..df7163835 100644 --- a/modules/context/repo.go +++ b/modules/context/repo.go @@ -6,6 +6,7 @@ package context import ( + "context" "fmt" "io/ioutil" "net/url" @@ -21,7 +22,6 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" - "gitea.com/macaron/macaron" "github.com/editorconfig/editorconfig-core-go/v2" "github.com/unknwon/com" ) @@ -38,7 +38,7 @@ var IssueTemplateDirCandidates = []string{ ".gitlab/issue_template", } -// PullRequest contains informations to make a pull request +// PullRequest contains information to make a pull request type PullRequest struct { BaseRepo *models.Repository Allowed bool @@ -81,7 +81,7 @@ func (r *Repository) CanCreateBranch() bool { } // RepoMustNotBeArchived checks if a repo is archived -func RepoMustNotBeArchived() macaron.Handler { +func RepoMustNotBeArchived() func(ctx *Context) { return func(ctx *Context) { if ctx.Repo.Repository.IsArchived { ctx.NotFound("IsArchived", fmt.Errorf(ctx.Tr("repo.archive.title"))) @@ -346,7 +346,7 @@ func repoAssignment(ctx *Context, repo *models.Repository) { // Check access. if ctx.Repo.Permission.AccessMode == models.AccessModeNone { - if ctx.Query("go-get") == "1" { + if ctx.FormString("go-get") == "1" { EarlyResponseForGoGetMeta(ctx) return } @@ -360,21 +360,25 @@ func repoAssignment(ctx *Context, repo *models.Repository) { var err error ctx.Repo.Mirror, err = models.GetMirrorByRepoID(repo.ID) if err != nil { - ctx.ServerError("GetMirror", err) + ctx.ServerError("GetMirrorByRepoID", err) return } ctx.Data["MirrorEnablePrune"] = ctx.Repo.Mirror.EnablePrune ctx.Data["MirrorInterval"] = ctx.Repo.Mirror.Interval ctx.Data["Mirror"] = ctx.Repo.Mirror } + if err = repo.LoadPushMirrors(); err != nil { + ctx.ServerError("LoadPushMirrors", err) + return + } ctx.Repo.Repository = repo ctx.Data["RepoName"] = ctx.Repo.Repository.Name ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty } -// RepoIDAssignment returns a macaron handler which assigns the repo to the context. -func RepoIDAssignment() macaron.Handler { +// RepoIDAssignment returns a handler which assigns the repo to the context. +func RepoIDAssignment() func(ctx *Context) { return func(ctx *Context) { repoID := ctx.ParamsInt64(":repoid") @@ -393,218 +397,234 @@ func RepoIDAssignment() macaron.Handler { } } -// RepoAssignment returns a macaron to handle repository assignment -func RepoAssignment() macaron.Handler { - return func(ctx *Context) { - var ( - owner *models.User - err error - ) +// RepoAssignment returns a middleware to handle repository assignment +func RepoAssignment(ctx *Context) (cancel context.CancelFunc) { + var ( + owner *models.User + err error + ) - userName := ctx.Params(":username") - repoName := ctx.Params(":reponame") + userName := ctx.Params(":username") + repoName := ctx.Params(":reponame") + repoName = strings.TrimSuffix(repoName, ".git") - // Check if the user is the same as the repository owner - if ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) { - owner = ctx.User - } else { - owner, err = models.GetUserByName(userName) - if err != nil { - if models.IsErrUserNotExist(err) { - if ctx.Query("go-get") == "1" { - EarlyResponseForGoGetMeta(ctx) - return - } - ctx.NotFound("GetUserByName", nil) - } else { - ctx.ServerError("GetUserByName", err) - } - return - } - } - ctx.Repo.Owner = owner - ctx.Data["Username"] = ctx.Repo.Owner.Name - - // Get repository. - repo, err := models.GetRepositoryByName(owner.ID, repoName) + // Check if the user is the same as the repository owner + if ctx.IsSigned && ctx.User.LowerName == strings.ToLower(userName) { + owner = ctx.User + } else { + owner, err = models.GetUserByName(userName) if err != nil { - if models.IsErrRepoNotExist(err) { - redirectRepoID, err := models.LookupRepoRedirect(owner.ID, repoName) - if err == nil { - RedirectToRepo(ctx, redirectRepoID) - } else if models.IsErrRepoRedirectNotExist(err) { - if ctx.Query("go-get") == "1" { - EarlyResponseForGoGetMeta(ctx) - return - } - ctx.NotFound("GetRepositoryByName", nil) - } else { - ctx.ServerError("LookupRepoRedirect", err) + if models.IsErrUserNotExist(err) { + if ctx.FormString("go-get") == "1" { + EarlyResponseForGoGetMeta(ctx) + return } + ctx.NotFound("GetUserByName", nil) } else { - ctx.ServerError("GetRepositoryByName", err) + ctx.ServerError("GetUserByName", err) } return } - repo.Owner = owner + } + ctx.Repo.Owner = owner + ctx.Data["Username"] = ctx.Repo.Owner.Name - repoAssignment(ctx, repo) + // Get repository. + repo, err := models.GetRepositoryByName(owner.ID, repoName) + if err != nil { + if models.IsErrRepoNotExist(err) { + redirectRepoID, err := models.LookupRepoRedirect(owner.ID, repoName) + if err == nil { + RedirectToRepo(ctx, redirectRepoID) + } else if models.IsErrRepoRedirectNotExist(err) { + if ctx.FormString("go-get") == "1" { + EarlyResponseForGoGetMeta(ctx) + return + } + ctx.NotFound("GetRepositoryByName", nil) + } else { + ctx.ServerError("LookupRepoRedirect", err) + } + } else { + ctx.ServerError("GetRepositoryByName", err) + } + return + } + repo.Owner = owner + + repoAssignment(ctx, repo) + if ctx.Written() { + return + } + + ctx.Repo.RepoLink = repo.Link() + ctx.Data["RepoLink"] = ctx.Repo.RepoLink + ctx.Data["RepoRelPath"] = ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name + + unit, err := ctx.Repo.Repository.GetUnit(models.UnitTypeExternalTracker) + if err == nil { + ctx.Data["RepoExternalIssuesLink"] = unit.ExternalTrackerConfig().ExternalTrackerURL + } + + ctx.Data["NumTags"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ + IncludeTags: true, + }) + if err != nil { + ctx.ServerError("GetReleaseCountByRepoID", err) + return + } + ctx.Data["NumReleases"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{}) + if err != nil { + ctx.ServerError("GetReleaseCountByRepoID", err) + return + } + + ctx.Data["Title"] = owner.Name + "/" + repo.Name + ctx.Data["Repository"] = repo + ctx.Data["Owner"] = ctx.Repo.Repository.Owner + ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner() + ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin() + ctx.Data["RepoOwnerIsOrganization"] = repo.Owner.IsOrganization() + ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(models.UnitTypeCode) + ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(models.UnitTypeIssues) + ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(models.UnitTypePullRequests) + + if ctx.Data["CanSignedUserFork"], err = ctx.Repo.Repository.CanUserFork(ctx.User); err != nil { + ctx.ServerError("CanUserFork", err) + return + } + + ctx.Data["DisableSSH"] = setting.SSH.Disabled + ctx.Data["ExposeAnonSSH"] = setting.SSH.ExposeAnonymous + ctx.Data["DisableHTTP"] = setting.Repository.DisableHTTPGit + ctx.Data["RepoSearchEnabled"] = setting.Indexer.RepoIndexerEnabled + ctx.Data["CloneLink"] = repo.CloneLink() + ctx.Data["WikiCloneLink"] = repo.WikiCloneLink() + + if ctx.IsSigned { + ctx.Data["IsWatchingRepo"] = models.IsWatching(ctx.User.ID, repo.ID) + ctx.Data["IsStaringRepo"] = models.IsStaring(ctx.User.ID, repo.ID) + } + + if repo.IsFork { + RetrieveBaseRepo(ctx, repo) if ctx.Written() { return } - - ctx.Repo.RepoLink = repo.Link() - ctx.Data["RepoLink"] = ctx.Repo.RepoLink - ctx.Data["RepoRelPath"] = ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name - - unit, err := ctx.Repo.Repository.GetUnit(models.UnitTypeExternalTracker) - if err == nil { - ctx.Data["RepoExternalIssuesLink"] = unit.ExternalTrackerConfig().ExternalTrackerURL - } - - ctx.Data["NumTags"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ - IncludeTags: true, - }) - if err != nil { - ctx.ServerError("GetReleaseCountByRepoID", err) - return - } - ctx.Data["NumReleases"], err = models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{}) - if err != nil { - ctx.ServerError("GetReleaseCountByRepoID", err) - return - } - - ctx.Data["Title"] = owner.Name + "/" + repo.Name - ctx.Data["Repository"] = repo - ctx.Data["Owner"] = ctx.Repo.Repository.Owner - ctx.Data["IsRepositoryOwner"] = ctx.Repo.IsOwner() - ctx.Data["IsRepositoryAdmin"] = ctx.Repo.IsAdmin() - ctx.Data["RepoOwnerIsOrganization"] = repo.Owner.IsOrganization() - ctx.Data["CanWriteCode"] = ctx.Repo.CanWrite(models.UnitTypeCode) - ctx.Data["CanWriteIssues"] = ctx.Repo.CanWrite(models.UnitTypeIssues) - ctx.Data["CanWritePulls"] = ctx.Repo.CanWrite(models.UnitTypePullRequests) - - if ctx.Data["CanSignedUserFork"], err = ctx.Repo.Repository.CanUserFork(ctx.User); err != nil { - ctx.ServerError("CanUserFork", err) - return - } - - ctx.Data["DisableSSH"] = setting.SSH.Disabled - ctx.Data["ExposeAnonSSH"] = setting.SSH.ExposeAnonymous - ctx.Data["DisableHTTP"] = setting.Repository.DisableHTTPGit - ctx.Data["RepoSearchEnabled"] = setting.Indexer.RepoIndexerEnabled - ctx.Data["CloneLink"] = repo.CloneLink() - ctx.Data["WikiCloneLink"] = repo.WikiCloneLink() - - if ctx.IsSigned { - ctx.Data["IsWatchingRepo"] = models.IsWatching(ctx.User.ID, repo.ID) - ctx.Data["IsStaringRepo"] = models.IsStaring(ctx.User.ID, repo.ID) - } - - if repo.IsFork { - RetrieveBaseRepo(ctx, repo) - if ctx.Written() { - return - } - } - - if repo.IsGenerated() { - RetrieveTemplateRepo(ctx, repo) - if ctx.Written() { - return - } - } - - // Disable everything when the repo is being created - if ctx.Repo.Repository.IsBeingCreated() { - ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch - return - } - - gitRepo, err := git.OpenRepository(models.RepoPath(userName, repoName)) - if err != nil { - ctx.ServerError("RepoAssignment Invalid repo "+models.RepoPath(userName, repoName), err) - return - } - ctx.Repo.GitRepo = gitRepo - - // We opened it, we should close it - defer func() { - // If it's been set to nil then assume someone else has closed it. - if ctx.Repo.GitRepo != nil { - ctx.Repo.GitRepo.Close() - } - }() - - // Stop at this point when the repo is empty. - if ctx.Repo.Repository.IsEmpty { - ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch - ctx.Next() - return - } - - tags, err := ctx.Repo.GitRepo.GetTags() - if err != nil { - ctx.ServerError("GetTags", err) - return - } - ctx.Data["Tags"] = tags - - brs, err := ctx.Repo.GitRepo.GetBranches() - if err != nil { - ctx.ServerError("GetBranches", err) - return - } - ctx.Data["Branches"] = brs - ctx.Data["BranchesCount"] = len(brs) - - ctx.Data["TagName"] = ctx.Repo.TagName - - // If not branch selected, try default one. - // If default branch doesn't exists, fall back to some other branch. - if len(ctx.Repo.BranchName) == 0 { - if len(ctx.Repo.Repository.DefaultBranch) > 0 && gitRepo.IsBranchExist(ctx.Repo.Repository.DefaultBranch) { - ctx.Repo.BranchName = ctx.Repo.Repository.DefaultBranch - } else if len(brs) > 0 { - ctx.Repo.BranchName = brs[0] - } - } - ctx.Data["BranchName"] = ctx.Repo.BranchName - ctx.Data["CommitID"] = ctx.Repo.CommitID - - // People who have push access or have forked repository can propose a new pull request. - canPush := ctx.Repo.CanWrite(models.UnitTypeCode) || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) - canCompare := false - - // Pull request is allowed if this is a fork repository - // and base repository accepts pull requests. - if repo.BaseRepo != nil && repo.BaseRepo.AllowsPulls() { - canCompare = true - ctx.Data["BaseRepo"] = repo.BaseRepo - ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo - ctx.Repo.PullRequest.Allowed = canPush - ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName - } else if repo.AllowsPulls() { - // Or, this is repository accepts pull requests between branches. - canCompare = true - ctx.Data["BaseRepo"] = repo - ctx.Repo.PullRequest.BaseRepo = repo - ctx.Repo.PullRequest.Allowed = canPush - ctx.Repo.PullRequest.SameRepo = true - ctx.Repo.PullRequest.HeadInfo = ctx.Repo.BranchName - } - ctx.Data["CanCompareOrPull"] = canCompare - ctx.Data["PullRequestCtx"] = ctx.Repo.PullRequest - - if ctx.Query("go-get") == "1" { - ctx.Data["GoGetImport"] = ComposeGoGetImport(owner.Name, repo.Name) - prefix := setting.AppURL + path.Join(owner.Name, repo.Name, "src", "branch", ctx.Repo.BranchName) - ctx.Data["GoDocDirectory"] = prefix + "{/dir}" - ctx.Data["GoDocFile"] = prefix + "{/dir}/{file}#L{line}" - } - ctx.Next() } + + if repo.IsGenerated() { + RetrieveTemplateRepo(ctx, repo) + if ctx.Written() { + return + } + } + + // Disable everything when the repo is being created + if ctx.Repo.Repository.IsBeingCreated() { + ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch + return + } + + gitRepo, err := git.OpenRepository(models.RepoPath(userName, repoName)) + if err != nil { + ctx.ServerError("RepoAssignment Invalid repo "+models.RepoPath(userName, repoName), err) + return + } + ctx.Repo.GitRepo = gitRepo + + // We opened it, we should close it + cancel = func() { + // If it's been set to nil then assume someone else has closed it. + if ctx.Repo.GitRepo != nil { + ctx.Repo.GitRepo.Close() + } + } + + // Stop at this point when the repo is empty. + if ctx.Repo.Repository.IsEmpty { + ctx.Data["BranchName"] = ctx.Repo.Repository.DefaultBranch + return + } + + tags, err := ctx.Repo.GitRepo.GetTags() + if err != nil { + ctx.ServerError("GetTags", err) + return + } + ctx.Data["Tags"] = tags + + brs, _, err := ctx.Repo.GitRepo.GetBranches(0, 0) + if err != nil { + ctx.ServerError("GetBranches", err) + return + } + ctx.Data["Branches"] = brs + ctx.Data["BranchesCount"] = len(brs) + + ctx.Data["TagName"] = ctx.Repo.TagName + + // If not branch selected, try default one. + // If default branch doesn't exists, fall back to some other branch. + if len(ctx.Repo.BranchName) == 0 { + if len(ctx.Repo.Repository.DefaultBranch) > 0 && gitRepo.IsBranchExist(ctx.Repo.Repository.DefaultBranch) { + ctx.Repo.BranchName = ctx.Repo.Repository.DefaultBranch + } else if len(brs) > 0 { + ctx.Repo.BranchName = brs[0] + } + } + ctx.Data["BranchName"] = ctx.Repo.BranchName + ctx.Data["CommitID"] = ctx.Repo.CommitID + + // People who have push access or have forked repository can propose a new pull request. + canPush := ctx.Repo.CanWrite(models.UnitTypeCode) || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) + canCompare := false + + // Pull request is allowed if this is a fork repository + // and base repository accepts pull requests. + if repo.BaseRepo != nil && repo.BaseRepo.AllowsPulls() { + canCompare = true + ctx.Data["BaseRepo"] = repo.BaseRepo + ctx.Repo.PullRequest.BaseRepo = repo.BaseRepo + ctx.Repo.PullRequest.Allowed = canPush + ctx.Repo.PullRequest.HeadInfo = ctx.Repo.Owner.Name + ":" + ctx.Repo.BranchName + } else if repo.AllowsPulls() { + // Or, this is repository accepts pull requests between branches. + canCompare = true + ctx.Data["BaseRepo"] = repo + ctx.Repo.PullRequest.BaseRepo = repo + ctx.Repo.PullRequest.Allowed = canPush + ctx.Repo.PullRequest.SameRepo = true + ctx.Repo.PullRequest.HeadInfo = ctx.Repo.BranchName + } + ctx.Data["CanCompareOrPull"] = canCompare + ctx.Data["PullRequestCtx"] = ctx.Repo.PullRequest + + if ctx.Repo.Repository.Status == models.RepositoryPendingTransfer { + repoTransfer, err := models.GetPendingRepositoryTransfer(ctx.Repo.Repository) + if err != nil { + ctx.ServerError("GetPendingRepositoryTransfer", err) + return + } + + if err := repoTransfer.LoadAttributes(); err != nil { + ctx.ServerError("LoadRecipient", err) + return + } + + ctx.Data["RepoTransfer"] = repoTransfer + if ctx.User != nil { + ctx.Data["CanUserAcceptTransfer"] = repoTransfer.CanUserAcceptTransfer(ctx.User) + } + } + + if ctx.FormString("go-get") == "1" { + ctx.Data["GoGetImport"] = ComposeGoGetImport(owner.Name, repo.Name) + prefix := setting.AppURL + path.Join(owner.Name, repo.Name, "src", "branch", ctx.Repo.BranchName) + ctx.Data["GoDocDirectory"] = prefix + "{/dir}" + ctx.Data["GoDocFile"] = prefix + "{/dir}/{file}#L{line}" + } + return } // RepoRefType type of repo reference @@ -629,7 +649,7 @@ const ( // RepoRef handles repository reference names when the ref name is not // explicitly given -func RepoRef() macaron.Handler { +func RepoRef() func(*Context) context.CancelFunc { // since no ref name is explicitly specified, ok to just use branch return RepoRefByType(RepoRefBranch) } @@ -708,8 +728,8 @@ func getRefName(ctx *Context, pathType RepoRefType) string { // RepoRefByType handles repository reference name for a specific type // of repository reference -func RepoRefByType(refType RepoRefType) macaron.Handler { - return func(ctx *Context) { +func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context) context.CancelFunc { + return func(ctx *Context) (cancel context.CancelFunc) { // Empty repository does not have reference information. if ctx.Repo.Repository.IsEmpty { return @@ -728,12 +748,12 @@ func RepoRefByType(refType RepoRefType) macaron.Handler { return } // We opened it, we should close it - defer func() { + cancel = func() { // If it's been set to nil then assume someone else has closed it. if ctx.Repo.GitRepo != nil { ctx.Repo.GitRepo.Close() } - }() + } } // Get default branch. @@ -741,7 +761,7 @@ func RepoRefByType(refType RepoRefType) macaron.Handler { refName = ctx.Repo.Repository.DefaultBranch ctx.Repo.BranchName = refName if !ctx.Repo.GitRepo.IsBranchExist(refName) { - brs, err := ctx.Repo.GitRepo.GetBranches() + brs, _, err := ctx.Repo.GitRepo.GetBranches(0, 0) if err != nil { ctx.ServerError("GetBranches", err) return @@ -797,6 +817,9 @@ func RepoRefByType(refType RepoRefType) macaron.Handler { util.URLJoin(setting.AppURL, strings.Replace(ctx.Req.URL.RequestURI(), refName, ctx.Repo.Commit.ID.String(), 1)))) } } else { + if len(ignoreNotExistErr) > 0 && ignoreNotExistErr[0] { + return + } ctx.NotFound("RepoRef invalid repo", fmt.Errorf("branch or tag not exist: %s", refName)) return } @@ -827,13 +850,12 @@ func RepoRefByType(refType RepoRefType) macaron.Handler { return } ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount - - ctx.Next() + return } } // GitHookService checks if repository Git hooks service has been enabled. -func GitHookService() macaron.Handler { +func GitHookService() func(ctx *Context) { return func(ctx *Context) { if !ctx.User.CanEditGitHook() { ctx.NotFound("GitHookService", nil) @@ -842,8 +864,8 @@ func GitHookService() macaron.Handler { } } -// UnitTypes returns a macaron middleware to set unit types to context variables. -func UnitTypes() macaron.Handler { +// UnitTypes returns a middleware to set unit types to context variables. +func UnitTypes() func(ctx *Context) { return func(ctx *Context) { ctx.Data["UnitTypeCode"] = models.UnitTypeCode ctx.Data["UnitTypeIssues"] = models.UnitTypeIssues @@ -887,12 +909,18 @@ func (ctx *Context) IssueTemplatesFromDefaultBranch() []api.IssueTemplate { log.Debug("DataAsync: %v", err) continue } - defer r.Close() + closed := false + defer func() { + if !closed { + _ = r.Close() + } + }() data, err := ioutil.ReadAll(r) if err != nil { log.Debug("ReadAll: %v", err) continue } + _ = r.Close() var it api.IssueTemplate content, err := markdown.ExtractMetadata(string(data), &it) if err != nil { diff --git a/modules/context/response.go b/modules/context/response.go new file mode 100644 index 000000000..a20fc6353 --- /dev/null +++ b/modules/context/response.go @@ -0,0 +1,99 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package context + +import ( + "net/http" +) + +// ResponseWriter represents a response writer for HTTP +type ResponseWriter interface { + http.ResponseWriter + Flush() + Status() int + Before(func(ResponseWriter)) + Size() int +} + +var ( + _ ResponseWriter = &Response{} +) + +// Response represents a response +type Response struct { + http.ResponseWriter + written int + status int + befores []func(ResponseWriter) + beforeExecuted bool +} + +// Size return written size +func (r *Response) Size() int { + return r.written +} + +// Write writes bytes to HTTP endpoint +func (r *Response) Write(bs []byte) (int, error) { + if !r.beforeExecuted { + for _, before := range r.befores { + before(r) + } + r.beforeExecuted = true + } + size, err := r.ResponseWriter.Write(bs) + r.written += size + if err != nil { + return size, err + } + if r.status == 0 { + r.status = http.StatusOK + } + return size, nil +} + +// WriteHeader write status code +func (r *Response) WriteHeader(statusCode int) { + if !r.beforeExecuted { + for _, before := range r.befores { + before(r) + } + r.beforeExecuted = true + } + if r.status == 0 { + r.status = statusCode + r.ResponseWriter.WriteHeader(statusCode) + } +} + +// Flush flush cached data +func (r *Response) Flush() { + if f, ok := r.ResponseWriter.(http.Flusher); ok { + f.Flush() + } +} + +// Status returned status code written +func (r *Response) Status() int { + return r.status +} + +// Before allows for a function to be called before the ResponseWriter has been written to. This is +// useful for setting headers or any other operations that must happen before a response has been written. +func (r *Response) Before(f func(ResponseWriter)) { + r.befores = append(r.befores, f) +} + +// NewResponse creates a response +func NewResponse(resp http.ResponseWriter) *Response { + if v, ok := resp.(*Response); ok { + return v + } + return &Response{ + ResponseWriter: resp, + status: 0, + befores: make([]func(ResponseWriter), 0), + } +} diff --git a/vendor/gitea.com/macaron/csrf/xsrf.go b/modules/context/xsrf.go similarity index 90% rename from vendor/gitea.com/macaron/csrf/xsrf.go rename to modules/context/xsrf.go index 7f31894f9..10e63a418 100644 --- a/vendor/gitea.com/macaron/csrf/xsrf.go +++ b/modules/context/xsrf.go @@ -1,5 +1,6 @@ // Copyright 2012 Google Inc. All Rights Reserved. // Copyright 2014 The Macaron Authors +// Copyright 2020 The Gitea Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13,7 +14,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package csrf +package context import ( "bytes" @@ -27,13 +28,13 @@ import ( "time" ) -// The duration that XSRF tokens are valid. +// Timeout represents the duration that XSRF tokens are valid. // It is exported so clients may set cookie timeouts that match generated tokens. -const TIMEOUT = 24 * time.Hour +const Timeout = 24 * time.Hour // clean sanitizes a string for inclusion in a token by replacing all ":"s. func clean(s string) string { - return strings.Replace(s, ":", "_", -1) + return strings.ReplaceAll(s, ":", "_") } // GenerateToken returns a URL-safe secure XSRF token that expires in 24 hours. @@ -53,7 +54,7 @@ func generateTokenAtTime(key, userID, actionID string, now time.Time) string { return base64.RawURLEncoding.EncodeToString([]byte(tok)) } -// Valid returns true if token is a valid, unexpired token returned by Generate. +// ValidToken returns true if token is a valid, unexpired token returned by Generate. func ValidToken(token, key, userID, actionID string) bool { return validTokenAtTime(token, key, userID, actionID, time.Now()) } @@ -78,7 +79,7 @@ func validTokenAtTime(token, key, userID, actionID string, now time.Time) bool { issueTime := time.Unix(0, nanos) // Check that the token is not expired. - if now.Sub(issueTime) >= TIMEOUT { + if now.Sub(issueTime) >= Timeout { return false } diff --git a/modules/context/xsrf_test.go b/modules/context/xsrf_test.go new file mode 100644 index 000000000..c0c711bf0 --- /dev/null +++ b/modules/context/xsrf_test.go @@ -0,0 +1,90 @@ +// Copyright 2012 Google Inc. All Rights Reserved. +// Copyright 2014 The Macaron Authors +// Copyright 2020 The Gitea Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package context + +import ( + "encoding/base64" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +const ( + key = "quay" + userID = "12345678" + actionID = "POST /form" +) + +var ( + now = time.Now() + oneMinuteFromNow = now.Add(1 * time.Minute) +) + +func Test_ValidToken(t *testing.T) { + t.Run("Validate token", func(t *testing.T) { + tok := generateTokenAtTime(key, userID, actionID, now) + assert.True(t, validTokenAtTime(tok, key, userID, actionID, oneMinuteFromNow)) + assert.True(t, validTokenAtTime(tok, key, userID, actionID, now.Add(Timeout-1*time.Nanosecond))) + assert.True(t, validTokenAtTime(tok, key, userID, actionID, now.Add(-1*time.Minute))) + }) +} + +// Test_SeparatorReplacement tests that separators are being correctly substituted +func Test_SeparatorReplacement(t *testing.T) { + t.Run("Test two separator replacements", func(t *testing.T) { + assert.NotEqual(t, generateTokenAtTime("foo:bar", "baz", "wah", now), + generateTokenAtTime("foo", "bar:baz", "wah", now)) + }) +} + +func Test_InvalidToken(t *testing.T) { + t.Run("Test invalid tokens", func(t *testing.T) { + invalidTokenTests := []struct { + name, key, userID, actionID string + t time.Time + }{ + {"Bad key", "foobar", userID, actionID, oneMinuteFromNow}, + {"Bad userID", key, "foobar", actionID, oneMinuteFromNow}, + {"Bad actionID", key, userID, "foobar", oneMinuteFromNow}, + {"Expired", key, userID, actionID, now.Add(Timeout)}, + {"More than 1 minute from the future", key, userID, actionID, now.Add(-1*time.Nanosecond - 1*time.Minute)}, + } + + tok := generateTokenAtTime(key, userID, actionID, now) + for _, itt := range invalidTokenTests { + assert.False(t, validTokenAtTime(tok, itt.key, itt.userID, itt.actionID, itt.t)) + } + }) +} + +// Test_ValidateBadData primarily tests that no unexpected panics are triggered during parsing +func Test_ValidateBadData(t *testing.T) { + t.Run("Validate bad data", func(t *testing.T) { + badDataTests := []struct { + name, tok string + }{ + {"Invalid Base64", "ASDab24(@)$*=="}, + {"No delimiter", base64.URLEncoding.EncodeToString([]byte("foobar12345678"))}, + {"Invalid time", base64.URLEncoding.EncodeToString([]byte("foobar:foobar"))}, + } + + for _, bdt := range badDataTests { + assert.False(t, validTokenAtTime(bdt.tok, key, userID, actionID, oneMinuteFromNow)) + } + }) +} diff --git a/modules/convert/convert.go b/modules/convert/convert.go index 109931dbc..9a4714b4e 100644 --- a/modules/convert/convert.go +++ b/modules/convert/convert.go @@ -8,6 +8,7 @@ package convert import ( "fmt" "strconv" + "strings" "time" "code.gitea.io/gitea/models" @@ -135,6 +136,7 @@ func ToBranchProtection(bp *models.ProtectedBranch) *api.BranchProtection { func ToTag(repo *models.Repository, t *git.Tag) *api.Tag { return &api.Tag{ Name: t.Name, + Message: strings.TrimSpace(t.Message), ID: t.ID.String(), Commit: ToCommitMeta(repo, t), ZipballURL: util.URLJoin(repo.HTMLURL(), "archive", t.Name+".zip"), @@ -189,6 +191,7 @@ func ToGPGKey(key *models.GPGKey) *api.GPGKey { CanEncryptComms: k.CanEncryptComms, CanEncryptStorage: k.CanEncryptStorage, CanCertify: k.CanSign, + Verified: k.Verified, } } emails := make([]*api.GPGKeyEmail, len(key.Emails)) @@ -208,6 +211,7 @@ func ToGPGKey(key *models.GPGKey) *api.GPGKey { CanEncryptComms: key.CanEncryptComms, CanEncryptStorage: key.CanEncryptStorage, CanCertify: key.CanSign, + Verified: key.Verified, } } diff --git a/modules/convert/git_commit.go b/modules/convert/git_commit.go index 87dfb51e7..fd4f12ecf 100644 --- a/modules/convert/git_commit.go +++ b/modules/convert/git_commit.go @@ -86,13 +86,13 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string] } if ok { - apiAuthor = ToUser(cacheAuthor, false, false) + apiAuthor = ToUser(cacheAuthor, nil) } else { author, err := models.GetUserByEmail(commit.Author.Email) if err != nil && !models.IsErrUserNotExist(err) { return nil, err } else if err == nil { - apiAuthor = ToUser(author, false, false) + apiAuthor = ToUser(author, nil) if userCache != nil { userCache[commit.Author.Email] = author } @@ -108,13 +108,13 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string] } if ok { - apiCommitter = ToUser(cacheCommitter, false, false) + apiCommitter = ToUser(cacheCommitter, nil) } else { committer, err := models.GetUserByEmail(commit.Committer.Email) if err != nil && !models.IsErrUserNotExist(err) { return nil, err } else if err == nil { - apiCommitter = ToUser(committer, false, false) + apiCommitter = ToUser(committer, nil) if userCache != nil { userCache[commit.Committer.Email] = committer } @@ -131,6 +131,20 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string] } } + // Retrieve files affected by the commit + fileStatus, err := git.GetCommitFileStatus(repo.RepoPath(), commit.ID.String()) + if err != nil { + return nil, err + } + affectedFileList := make([]*api.CommitAffectedFiles, 0, len(fileStatus.Added)+len(fileStatus.Removed)+len(fileStatus.Modified)) + for _, files := range [][]string{fileStatus.Added, fileStatus.Removed, fileStatus.Modified} { + for _, filename := range files { + affectedFileList = append(affectedFileList, &api.CommitAffectedFiles{ + Filename: filename, + }) + } + } + return &api.Commit{ CommitMeta: &api.CommitMeta{ URL: repo.APIURL() + "/git/commits/" + commit.ID.String(), @@ -141,8 +155,8 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string] URL: repo.APIURL() + "/git/commits/" + commit.ID.String(), Author: &api.CommitUser{ Identity: api.Identity{ - Name: commit.Committer.Name, - Email: commit.Committer.Email, + Name: commit.Author.Name, + Email: commit.Author.Email, }, Date: commit.Author.When.Format(time.RFC3339), }, @@ -162,5 +176,6 @@ func ToCommit(repo *models.Repository, commit *git.Commit, userCache map[string] Author: apiAuthor, Committer: apiCommitter, Parents: apiParents, + Files: affectedFileList, }, nil } diff --git a/modules/convert/issue.go b/modules/convert/issue.go index 36446da2d..da09aeaca 100644 --- a/modules/convert/issue.go +++ b/modules/convert/issue.go @@ -31,7 +31,7 @@ func ToAPIIssue(issue *models.Issue) *api.Issue { URL: issue.APIURL(), HTMLURL: issue.HTMLURL(), Index: issue.Index, - Poster: ToUser(issue.Poster, false, false), + Poster: ToUser(issue.Poster, nil), Title: issue.Title, Body: issue.Content, Ref: issue.Ref, @@ -66,9 +66,9 @@ func ToAPIIssue(issue *models.Issue) *api.Issue { } if len(issue.Assignees) > 0 { for _, assignee := range issue.Assignees { - apiIssue.Assignees = append(apiIssue.Assignees, ToUser(assignee, false, false)) + apiIssue.Assignees = append(apiIssue.Assignees, ToUser(assignee, nil)) } - apiIssue.Assignee = ToUser(issue.Assignees[0], false, false) // For compatibility, we're keeping the first assignee as `apiIssue.Assignee` + apiIssue.Assignee = ToUser(issue.Assignees[0], nil) // For compatibility, we're keeping the first assignee as `apiIssue.Assignee` } if issue.IsPull { if err := issue.LoadPullRequest(); err != nil { @@ -147,6 +147,8 @@ func ToStopWatches(sws []*models.Stopwatch) (api.StopWatches, error) { result = append(result, api.StopWatch{ Created: sw.CreatedUnix.AsTime(), + Seconds: sw.Seconds(), + Duration: sw.Duration(), IssueIndex: issue.Index, IssueTitle: issue.Title, RepoOwnerName: repo.OwnerName, diff --git a/modules/convert/issue_comment.go b/modules/convert/issue_comment.go index cf65c876d..1610b9f0d 100644 --- a/modules/convert/issue_comment.go +++ b/modules/convert/issue_comment.go @@ -13,7 +13,7 @@ import ( func ToComment(c *models.Comment) *api.Comment { return &api.Comment{ ID: c.ID, - Poster: ToUser(c.Poster, false, false), + Poster: ToUser(c.Poster, nil), HTMLURL: c.HTMLURL(), IssueURL: c.IssueURL(), PRURL: c.PRURL(), diff --git a/modules/convert/notification.go b/modules/convert/notification.go index fff891b15..b0888ee09 100644 --- a/modules/convert/notification.go +++ b/modules/convert/notification.go @@ -27,7 +27,7 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread { //handle Subject switch n.Source { case models.NotificationSourceIssue: - result.Subject = &api.NotificationSubject{Type: "Issue"} + result.Subject = &api.NotificationSubject{Type: api.NotifySubjectIssue} if n.Issue != nil { result.Subject.Title = n.Issue.Title result.Subject.URL = n.Issue.APIURL() @@ -38,7 +38,7 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread { } } case models.NotificationSourcePullRequest: - result.Subject = &api.NotificationSubject{Type: "Pull"} + result.Subject = &api.NotificationSubject{Type: api.NotifySubjectPull} if n.Issue != nil { result.Subject.Title = n.Issue.Title result.Subject.URL = n.Issue.APIURL() @@ -47,13 +47,24 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread { if err == nil && comment != nil { result.Subject.LatestCommentURL = comment.APIURL() } + + pr, _ := n.Issue.GetPullRequest() + if pr != nil && pr.HasMerged { + result.Subject.State = "merged" + } } case models.NotificationSourceCommit: result.Subject = &api.NotificationSubject{ - Type: "Commit", + Type: api.NotifySubjectCommit, Title: n.CommitID, + URL: n.Repository.HTMLURL() + "/commit/" + n.CommitID, + } + case models.NotificationSourceRepository: + result.Subject = &api.NotificationSubject{ + Type: api.NotifySubjectRepository, + Title: n.Repository.FullName(), + URL: n.Repository.Link(), } - //unused until now } return result diff --git a/modules/convert/pull.go b/modules/convert/pull.go index 87eabcf53..6c5d15c82 100644 --- a/modules/convert/pull.go +++ b/modules/convert/pull.go @@ -95,7 +95,25 @@ func ToAPIPullRequest(pr *models.PullRequest) *api.PullRequest { } } - if pr.HeadRepo != nil { + if pr.Flow == models.PullRequestFlowAGit { + gitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) + if err != nil { + log.Error("OpenRepository[%s]: %v", pr.GetGitRefName(), err) + return nil + } + defer gitRepo.Close() + + apiPullRequest.Head.Sha, err = gitRepo.GetRefCommitID(pr.GetGitRefName()) + if err != nil { + log.Error("GetRefCommitID[%s]: %v", pr.GetGitRefName(), err) + return nil + } + apiPullRequest.Head.RepoID = pr.BaseRepoID + apiPullRequest.Head.Repository = apiPullRequest.Base.Repository + apiPullRequest.Head.Name = "" + } + + if pr.HeadRepo != nil && pr.Flow == models.PullRequestFlowGithub { apiPullRequest.Head.RepoID = pr.HeadRepo.ID apiPullRequest.Head.Repository = ToRepo(pr.HeadRepo, models.AccessModeNone) @@ -134,6 +152,24 @@ func ToAPIPullRequest(pr *models.PullRequest) *api.PullRequest { } } + if len(apiPullRequest.Head.Sha) == 0 && len(apiPullRequest.Head.Ref) != 0 { + baseGitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) + if err != nil { + log.Error("OpenRepository[%s]: %v", pr.BaseRepo.RepoPath(), err) + return nil + } + defer baseGitRepo.Close() + refs, err := baseGitRepo.GetRefsFiltered(apiPullRequest.Head.Ref) + if err != nil { + log.Error("GetRefsFiltered[%s]: %v", apiPullRequest.Head.Ref, err) + return nil + } else if len(refs) == 0 { + log.Error("unable to resolve PR head ref") + } else { + apiPullRequest.Head.Sha = refs[0].Object.String() + } + } + if pr.Status != models.PullRequestStatusChecking { mergeable := !(pr.Status == models.PullRequestStatusConflict || pr.Status == models.PullRequestStatusError) && !pr.IsWorkInProgress() apiPullRequest.Mergeable = mergeable @@ -141,7 +177,7 @@ func ToAPIPullRequest(pr *models.PullRequest) *api.PullRequest { if pr.HasMerged { apiPullRequest.Merged = pr.MergedUnix.AsTimePtr() apiPullRequest.MergedCommitID = &pr.MergedCommitID - apiPullRequest.MergedBy = ToUser(pr.Merger, false, false) + apiPullRequest.MergedBy = ToUser(pr.Merger, nil) } return apiPullRequest diff --git a/modules/convert/pull_review.go b/modules/convert/pull_review.go index 0ef1fec39..b461b27b5 100644 --- a/modules/convert/pull_review.go +++ b/modules/convert/pull_review.go @@ -20,20 +20,16 @@ func ToPullReview(r *models.Review, doer *models.User) (*api.PullReview, error) r.Reviewer = models.NewGhostUser() } - auth := false - if doer != nil { - auth = doer.IsAdmin || doer.ID == r.ReviewerID - } - result := &api.PullReview{ ID: r.ID, - Reviewer: ToUser(r.Reviewer, doer != nil, auth), + Reviewer: ToUser(r.Reviewer, doer), ReviewerTeam: ToTeam(r.ReviewerTeam), State: api.ReviewStateUnknown, Body: r.Content, CommitID: r.CommitID, Stale: r.Stale, Official: r.Official, + Dismissed: r.Dismissed, CodeCommentsCount: r.GetCodeCommentsCount(), Submitted: r.CreatedUnix.AsTime(), HTMLURL: r.HTMLURL(), @@ -84,18 +80,14 @@ func ToPullReviewCommentList(review *models.Review, doer *models.User) ([]*api.P apiComments := make([]*api.PullReviewComment, 0, len(review.CodeComments)) - auth := false - if doer != nil { - auth = doer.IsAdmin || doer.ID == review.ReviewerID - } - for _, lines := range review.CodeComments { for _, comments := range lines { for _, comment := range comments { apiComment := &api.PullReviewComment{ ID: comment.ID, Body: comment.Content, - Reviewer: ToUser(review.Reviewer, doer != nil, auth), + Poster: ToUser(comment.Poster, doer), + Resolver: ToUser(comment.ResolveDoer, doer), ReviewID: review.ID, Created: comment.CreatedUnix.AsTime(), Updated: comment.UpdatedUnix.AsTime(), diff --git a/modules/convert/release.go b/modules/convert/release.go index d9def8963..70f0d6e76 100644 --- a/modules/convert/release.go +++ b/modules/convert/release.go @@ -29,7 +29,7 @@ func ToRelease(r *models.Release) *api.Release { IsPrerelease: r.IsPrerelease, CreatedAt: r.CreatedUnix.AsTime(), PublishedAt: r.CreatedUnix.AsTime(), - Publisher: ToUser(r.Publisher, false, false), + Publisher: ToUser(r.Publisher, nil), Attachments: assets, } } diff --git a/modules/convert/repository.go b/modules/convert/repository.go index 813201ca6..7f3d67137 100644 --- a/modules/convert/repository.go +++ b/modules/convert/repository.go @@ -71,6 +71,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool) allowRebase := false allowRebaseMerge := false allowSquash := false + defaultMergeStyle := models.MergeStyleMerge if unit, err := repo.GetUnit(models.UnitTypePullRequests); err == nil { config := unit.PullRequestsConfig() hasPullRequests = true @@ -79,6 +80,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool) allowRebase = config.AllowRebase allowRebaseMerge = config.AllowRebaseMerge allowSquash = config.AllowSquash + defaultMergeStyle = config.GetDefaultMergeStyle() } hasProjects := false if _, err := repo.GetUnit(models.UnitTypeProjects); err == nil { @@ -89,7 +91,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool) return nil } - numReleases, _ := models.GetReleaseCountByRepoID(repo.ID, models.FindReleasesOptions{IncludeDrafts: false, IncludeTags: true}) + numReleases, _ := models.GetReleaseCountByRepoID(repo.ID, models.FindReleasesOptions{IncludeDrafts: false, IncludeTags: false}) mirrorInterval := "" if repo.IsMirror { @@ -100,7 +102,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool) return &api.Repository{ ID: repo.ID, - Owner: ToUser(repo.Owner, mode != models.AccessModeNone, mode >= models.AccessModeAdmin), + Owner: ToUserWithAccessMode(repo.Owner, mode), Name: repo.Name, FullName: repo.FullName(), Description: repo.Description, @@ -139,6 +141,7 @@ func innerToRepo(repo *models.Repository, mode models.AccessMode, isParent bool) AllowRebase: allowRebase, AllowRebaseMerge: allowRebaseMerge, AllowSquash: allowSquash, + DefaultMergeStyle: string(defaultMergeStyle), AvatarURL: repo.AvatarLink(), Internal: !repo.IsPrivate && repo.Owner.Visibility == api.VisibleTypePrivate, MirrorInterval: mirrorInterval, diff --git a/modules/convert/status.go b/modules/convert/status.go index f972fc333..bb2f964fe 100644 --- a/modules/convert/status.go +++ b/modules/convert/status.go @@ -24,7 +24,7 @@ func ToCommitStatus(status *models.CommitStatus) *api.CommitStatus { if status.CreatorID != 0 { creator, _ := models.GetUserByID(status.CreatorID) - apiStatus.Creator = ToUser(creator, false, false) + apiStatus.Creator = ToUser(creator, nil) } return apiStatus diff --git a/modules/convert/user.go b/modules/convert/user.go index 010c92b96..164ffb71f 100644 --- a/modules/convert/user.go +++ b/modules/convert/user.go @@ -11,28 +11,87 @@ import ( ) // ToUser convert models.User to api.User -// signed shall only be set if requester is logged in. authed shall only be set if user is site admin or user himself -func ToUser(user *models.User, signed, authed bool) *api.User { +// if doer is set, private information is added if the doer has the permission to see it +func ToUser(user, doer *models.User) *api.User { if user == nil { return nil } - result := &api.User{ - ID: user.ID, - UserName: user.Name, - FullName: markup.Sanitize(user.FullName), - Email: user.GetEmail(), - AvatarURL: user.AvatarLink(), - Created: user.CreatedUnix.AsTime(), + authed := false + signed := false + if doer != nil { + signed = true + authed = doer.ID == user.ID || doer.IsAdmin } + return toUser(user, signed, authed) +} + +// ToUsers convert list of models.User to list of api.User +func ToUsers(doer *models.User, users []*models.User) []*api.User { + result := make([]*api.User, len(users)) + for i := range users { + result[i] = ToUser(users[i], doer) + } + return result +} + +// ToUserWithAccessMode convert models.User to api.User +// AccessMode is not none show add some more information +func ToUserWithAccessMode(user *models.User, accessMode models.AccessMode) *api.User { + if user == nil { + return nil + } + return toUser(user, accessMode != models.AccessModeNone, false) +} + +// toUser convert models.User to api.User +// signed shall only be set if requester is logged in. authed shall only be set if user is site admin or user himself +func toUser(user *models.User, signed, authed bool) *api.User { + result := &api.User{ + ID: user.ID, + UserName: user.Name, + FullName: markup.Sanitize(user.FullName), + Email: user.GetEmail(), + AvatarURL: user.AvatarLink(), + Created: user.CreatedUnix.AsTime(), + Restricted: user.IsRestricted, + Location: user.Location, + Website: user.Website, + Description: user.Description, + // counter's + Followers: user.NumFollowers, + Following: user.NumFollowing, + StarredRepos: user.NumStars, + } + + result.Visibility = user.Visibility.String() + // hide primary email if API caller is anonymous or user keep email private if signed && (!user.KeepEmailPrivate || authed) { result.Email = user.Email } + // only site admin will get these information and possibly user himself if authed { result.IsAdmin = user.IsAdmin result.LastLogin = user.LastLoginUnix.AsTime() result.Language = user.Language + result.IsActive = user.IsActive + result.ProhibitLogin = user.ProhibitLogin } return result } + +// User2UserSettings return UserSettings based on a user +func User2UserSettings(user *models.User) api.UserSettings { + return api.UserSettings{ + FullName: user.FullName, + Website: user.Website, + Location: user.Location, + Language: user.Language, + Description: user.Description, + Theme: user.Theme, + HideEmail: user.KeepEmailPrivate, + HideActivity: user.KeepActivityPrivate, + DiffViewStyle: user.DiffViewStyle, + } +} diff --git a/modules/convert/user_test.go b/modules/convert/user_test.go index eff60d518..679c4f989 100644 --- a/modules/convert/user_test.go +++ b/modules/convert/user_test.go @@ -8,21 +8,31 @@ import ( "testing" "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" ) func TestUser_ToUser(t *testing.T) { + assert.NoError(t, models.PrepareTestDatabase()) user1 := models.AssertExistsAndLoadBean(t, &models.User{ID: 1, IsAdmin: true}).(*models.User) - apiUser := ToUser(user1, true, true) + apiUser := toUser(user1, true, true) assert.True(t, apiUser.IsAdmin) user2 := models.AssertExistsAndLoadBean(t, &models.User{ID: 2, IsAdmin: false}).(*models.User) - apiUser = ToUser(user2, true, true) + apiUser = toUser(user2, true, true) assert.False(t, apiUser.IsAdmin) - apiUser = ToUser(user1, false, false) + apiUser = toUser(user1, false, false) assert.False(t, apiUser.IsAdmin) + assert.EqualValues(t, api.VisibleTypePublic.String(), apiUser.Visibility) + + user31 := models.AssertExistsAndLoadBean(t, &models.User{ID: 31, IsAdmin: false, Visibility: api.VisibleTypePrivate}).(*models.User) + + apiUser = toUser(user31, true, true) + assert.False(t, apiUser.IsAdmin) + assert.EqualValues(t, api.VisibleTypePrivate.String(), apiUser.Visibility) } diff --git a/modules/convert/utils.go b/modules/convert/utils.go index 69de30668..a0463d7b1 100644 --- a/modules/convert/utils.go +++ b/modules/convert/utils.go @@ -33,6 +33,8 @@ func ToGitServiceType(value string) structs.GitServiceType { return structs.GitlabService case "gogs": return structs.GogsService + case "onedev": + return structs.OneDevService default: return structs.PlainGitService } diff --git a/modules/convert/utils_test.go b/modules/convert/utils_test.go new file mode 100644 index 000000000..bd59299c0 --- /dev/null +++ b/modules/convert/utils_test.go @@ -0,0 +1,39 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package convert + +import ( + "testing" + + _ "github.com/mattn/go-sqlite3" + "github.com/stretchr/testify/assert" +) + +func TestToCorrectPageSize(t *testing.T) { + assert.EqualValues(t, 30, ToCorrectPageSize(0)) + assert.EqualValues(t, 30, ToCorrectPageSize(-10)) + assert.EqualValues(t, 20, ToCorrectPageSize(20)) + assert.EqualValues(t, 50, ToCorrectPageSize(100)) +} + +func TestToGitServiceType(t *testing.T) { + tc := []struct { + typ string + enum int + }{{ + typ: "github", enum: 2, + }, { + typ: "gitea", enum: 3, + }, { + typ: "gitlab", enum: 4, + }, { + typ: "gogs", enum: 5, + }, { + typ: "trash", enum: 1, + }} + for _, test := range tc { + assert.EqualValues(t, test.enum, ToGitServiceType(test.typ)) + } +} diff --git a/modules/cron/setting.go b/modules/cron/setting.go index 5fe9ca6e1..d55e5b60a 100644 --- a/modules/cron/setting.go +++ b/modules/cron/setting.go @@ -40,6 +40,14 @@ type UpdateExistingConfig struct { UpdateExisting bool } +// CleanupHookTaskConfig represents a cron task with settings to cleanup hook_task +type CleanupHookTaskConfig struct { + BaseConfig + CleanupType string + OlderThan time.Duration + NumberToKeep int +} + // GetSchedule returns the schedule for the base config func (b *BaseConfig) GetSchedule() string { return b.Schedule diff --git a/modules/cron/tasks_basic.go b/modules/cron/tasks_basic.go index a45704e88..6c61d628c 100644 --- a/modules/cron/tasks_basic.go +++ b/modules/cron/tasks_basic.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/migrations" repository_service "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/services/auth" mirror_service "code.gitea.io/gitea/services/mirror" ) @@ -36,7 +37,7 @@ func registerRepoHealthCheck() { BaseConfig: BaseConfig{ Enabled: true, RunAtStart: false, - Schedule: "@every 24h", + Schedule: "@midnight", }, Timeout: 60 * time.Second, Args: []string{}, @@ -50,7 +51,7 @@ func registerCheckRepoStats() { RegisterTaskFatal("check_repo_stats", &BaseConfig{ Enabled: true, RunAtStart: true, - Schedule: "@every 24h", + Schedule: "@midnight", }, func(ctx context.Context, _ *models.User, _ Config) error { return models.CheckRepoStats(ctx) }) @@ -61,7 +62,7 @@ func registerArchiveCleanup() { BaseConfig: BaseConfig{ Enabled: true, RunAtStart: true, - Schedule: "@every 24h", + Schedule: "@midnight", }, OlderThan: 24 * time.Hour, }, func(ctx context.Context, _ *models.User, config Config) error { @@ -75,12 +76,12 @@ func registerSyncExternalUsers() { BaseConfig: BaseConfig{ Enabled: true, RunAtStart: false, - Schedule: "@every 24h", + Schedule: "@midnight", }, UpdateExisting: true, }, func(ctx context.Context, _ *models.User, config Config) error { realConfig := config.(*UpdateExistingConfig) - return models.SyncExternalUsers(ctx, realConfig.UpdateExisting) + return auth.SyncExternalUsers(ctx, realConfig.UpdateExisting) }) } @@ -89,7 +90,7 @@ func registerDeletedBranchesCleanup() { BaseConfig: BaseConfig{ Enabled: true, RunAtStart: true, - Schedule: "@every 24h", + Schedule: "@midnight", }, OlderThan: 24 * time.Hour, }, func(ctx context.Context, _ *models.User, config Config) error { @@ -103,12 +104,28 @@ func registerUpdateMigrationPosterID() { RegisterTaskFatal("update_migration_poster_id", &BaseConfig{ Enabled: true, RunAtStart: true, - Schedule: "@every 24h", + Schedule: "@midnight", }, func(ctx context.Context, _ *models.User, _ Config) error { return migrations.UpdateMigrationPosterID(ctx) }) } +func registerCleanupHookTaskTable() { + RegisterTaskFatal("cleanup_hook_task_table", &CleanupHookTaskConfig{ + BaseConfig: BaseConfig{ + Enabled: true, + RunAtStart: false, + Schedule: "@midnight", + }, + CleanupType: "OlderThan", + OlderThan: 168 * time.Hour, + NumberToKeep: 10, + }, func(ctx context.Context, _ *models.User, config Config) error { + realConfig := config.(*CleanupHookTaskConfig) + return models.CleanupHookTaskTable(ctx, models.ToHookTaskCleanupType(realConfig.CleanupType), realConfig.OlderThan, realConfig.NumberToKeep) + }) +} + func initBasicTasks() { registerUpdateMirrorTask() registerRepoHealthCheck() @@ -119,4 +136,5 @@ func initBasicTasks() { if !setting.Repository.DisableMigrations { registerUpdateMigrationPosterID() } + registerCleanupHookTaskTable() } diff --git a/modules/cron/tasks_extended.go b/modules/cron/tasks_extended.go index f0742eb47..680f83e50 100644 --- a/modules/cron/tasks_extended.go +++ b/modules/cron/tasks_extended.go @@ -33,7 +33,7 @@ func registerDeleteRepositoryArchives() { RunAtStart: false, Schedule: "@annually", }, func(ctx context.Context, _ *models.User, _ Config) error { - return models.DeleteRepositoryArchives(ctx) + return repo_module.DeleteRepositoryArchives(ctx) }) } @@ -117,6 +117,20 @@ func registerRemoveRandomAvatars() { }) } +func registerDeleteOldActions() { + RegisterTaskFatal("delete_old_actions", &OlderThanConfig{ + BaseConfig: BaseConfig{ + Enabled: false, + RunAtStart: false, + Schedule: "@every 168h", + }, + OlderThan: 365 * 24 * time.Hour, + }, func(ctx context.Context, _ *models.User, config Config) error { + olderThanConfig := config.(*OlderThanConfig) + return models.DeleteOldActions(olderThanConfig.OlderThan) + }) +} + func initExtendedTasks() { registerDeleteInactiveUsers() registerDeleteRepositoryArchives() @@ -127,4 +141,5 @@ func initExtendedTasks() { registerReinitMissingRepositories() registerDeleteMissingRepositories() registerRemoveRandomAvatars() + registerDeleteOldActions() } diff --git a/modules/csv/csv.go b/modules/csv/csv.go new file mode 100644 index 000000000..35486edd8 --- /dev/null +++ b/modules/csv/csv.go @@ -0,0 +1,108 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package csv + +import ( + "bytes" + stdcsv "encoding/csv" + "errors" + "io" + "regexp" + "strings" + + "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/modules/util" +) + +var quoteRegexp = regexp.MustCompile(`["'][\s\S]+?["']`) + +// CreateReader creates a csv.Reader with the given delimiter. +func CreateReader(input io.Reader, delimiter rune) *stdcsv.Reader { + rd := stdcsv.NewReader(input) + rd.Comma = delimiter + rd.TrimLeadingSpace = true + return rd +} + +// CreateReaderAndGuessDelimiter tries to guess the field delimiter from the content and creates a csv.Reader. +func CreateReaderAndGuessDelimiter(rd io.Reader) (*stdcsv.Reader, error) { + var data = make([]byte, 1e4) + size, err := rd.Read(data) + if err != nil { + return nil, err + } + + delimiter := guessDelimiter(data[:size]) + + var newInput io.Reader + if size < 1e4 { + newInput = bytes.NewReader(data[:size]) + } else { + newInput = io.MultiReader(bytes.NewReader(data), rd) + } + + return CreateReader(newInput, delimiter), nil +} + +// guessDelimiter scores the input CSV data against delimiters, and returns the best match. +// Reads at most 10k bytes & 10 lines. +func guessDelimiter(data []byte) rune { + maxLines := 10 + maxBytes := util.Min(len(data), 1e4) + text := string(data[:maxBytes]) + text = quoteRegexp.ReplaceAllLiteralString(text, "") + lines := strings.SplitN(text, "\n", maxLines+1) + lines = lines[:util.Min(maxLines, len(lines))] + + delimiters := []rune{',', ';', '\t', '|', '@'} + bestDelim := delimiters[0] + bestScore := 0.0 + for _, delim := range delimiters { + score := scoreDelimiter(lines, delim) + if score > bestScore { + bestScore = score + bestDelim = delim + } + } + + return bestDelim +} + +// scoreDelimiter uses a count & regularity metric to evaluate a delimiter against lines of CSV. +func scoreDelimiter(lines []string, delim rune) float64 { + countTotal := 0 + countLineMax := 0 + linesNotEqual := 0 + + for _, line := range lines { + if len(line) == 0 { + continue + } + + countLine := strings.Count(line, string(delim)) + countTotal += countLine + if countLine != countLineMax { + if countLineMax != 0 { + linesNotEqual++ + } + countLineMax = util.Max(countLine, countLineMax) + } + } + + return float64(countTotal) * (1 - float64(linesNotEqual)/float64(len(lines))) +} + +// FormatError converts csv errors into readable messages. +func FormatError(err error, locale translation.Locale) (string, error) { + var perr *stdcsv.ParseError + if errors.As(err, &perr) { + if perr.Err == stdcsv.ErrFieldCount { + return locale.Tr("repo.error.csv.invalid_field_count", perr.Line), nil + } + return locale.Tr("repo.error.csv.unexpected", perr.Line, perr.Column), nil + } + + return "", err +} diff --git a/modules/csv/csv_test.go b/modules/csv/csv_test.go new file mode 100644 index 000000000..3cc09c40a --- /dev/null +++ b/modules/csv/csv_test.go @@ -0,0 +1,43 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package csv + +import ( + "bytes" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestCreateReader(t *testing.T) { + rd := CreateReader(bytes.NewReader([]byte{}), ',') + assert.Equal(t, ',', rd.Comma) +} + +func TestCreateReaderAndGuessDelimiter(t *testing.T) { + input := "a;b;c\n1;2;3\n4;5;6" + + rd, err := CreateReaderAndGuessDelimiter(strings.NewReader(input)) + assert.NoError(t, err) + assert.Equal(t, ';', rd.Comma) +} + +func TestGuessDelimiter(t *testing.T) { + var kases = map[string]rune{ + "a": ',', + "1,2": ',', + "1;2": ';', + "1\t2": '\t', + "1|2": '|', + "1,2,3;4,5,6;7,8,9\na;b;c": ';', + "\"1,2,3,4\";\"a\nb\"\nc;d": ';', + "
": ',', + } + + for k, v := range kases { + assert.EqualValues(t, guessDelimiter([]byte(k)), v) + } +} diff --git a/modules/doctor/checkOldArchives.go b/modules/doctor/checkOldArchives.go new file mode 100644 index 000000000..a4e2ffbd1 --- /dev/null +++ b/modules/doctor/checkOldArchives.go @@ -0,0 +1,59 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package doctor + +import ( + "os" + "path/filepath" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/util" +) + +func checkOldArchives(logger log.Logger, autofix bool) error { + numRepos := 0 + numReposUpdated := 0 + err := iterateRepositories(func(repo *models.Repository) error { + if repo.IsEmpty { + return nil + } + + p := filepath.Join(repo.RepoPath(), "archives") + isDir, err := util.IsDir(p) + if err != nil { + log.Warn("check if %s is directory failed: %v", p, err) + } + if isDir { + numRepos++ + if autofix { + if err := os.RemoveAll(p); err == nil { + numReposUpdated++ + } else { + log.Warn("remove %s failed: %v", p, err) + } + } + } + return nil + }) + + if autofix { + logger.Info("%d / %d old archives in repository deleted", numReposUpdated, numRepos) + } else { + logger.Info("%d old archives in repository need to be deleted", numRepos) + } + + return err +} + +func init() { + Register(&Check{ + Title: "Check old archives", + Name: "check-old-archives", + IsDefault: false, + Run: checkOldArchives, + Priority: 7, + }) +} diff --git a/modules/doctor/dbconsistency.go b/modules/doctor/dbconsistency.go index f09aaa6d1..23e8331e7 100644 --- a/modules/doctor/dbconsistency.go +++ b/modules/doctor/dbconsistency.go @@ -10,6 +10,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/models/migrations" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" ) func checkDBConsistency(logger log.Logger, autofix bool) error { @@ -22,14 +23,13 @@ func checkDBConsistency(logger log.Logger, autofix bool) error { // find labels without existing repo or org count, err := models.CountOrphanedLabels() if err != nil { - logger.Critical("Error: %v whilst counting orphaned labels") + logger.Critical("Error: %v whilst counting orphaned labels", err) return err } - if count > 0 { if autofix { if err = models.DeleteOrphanedLabels(); err != nil { - logger.Critical("Error: %v whilst deleting orphaned labels") + logger.Critical("Error: %v whilst deleting orphaned labels", err) return err } logger.Info("%d labels without existing repository/organisation deleted", count) @@ -38,16 +38,34 @@ func checkDBConsistency(logger log.Logger, autofix bool) error { } } + // find IssueLabels without existing label + count, err = models.CountOrphanedIssueLabels() + if err != nil { + logger.Critical("Error: %v whilst counting orphaned issue_labels", err) + return err + } + if count > 0 { + if autofix { + if err = models.DeleteOrphanedIssueLabels(); err != nil { + logger.Critical("Error: %v whilst deleting orphaned issue_labels", err) + return err + } + logger.Info("%d issue_labels without existing label deleted", count) + } else { + logger.Warn("%d issue_labels without existing label", count) + } + } + // find issues without existing repository count, err = models.CountOrphanedIssues() if err != nil { - logger.Critical("Error: %v whilst counting orphaned issues") + logger.Critical("Error: %v whilst counting orphaned issues", err) return err } if count > 0 { if autofix { if err = models.DeleteOrphanedIssues(); err != nil { - logger.Critical("Error: %v whilst deleting orphaned issues") + logger.Critical("Error: %v whilst deleting orphaned issues", err) return err } logger.Info("%d issues without existing repository deleted", count) @@ -59,13 +77,13 @@ func checkDBConsistency(logger log.Logger, autofix bool) error { // find pulls without existing issues count, err = models.CountOrphanedObjects("pull_request", "issue", "pull_request.issue_id=issue.id") if err != nil { - logger.Critical("Error: %v whilst counting orphaned objects") + logger.Critical("Error: %v whilst counting orphaned objects", err) return err } if count > 0 { if autofix { if err = models.DeleteOrphanedObjects("pull_request", "issue", "pull_request.issue_id=issue.id"); err != nil { - logger.Critical("Error: %v whilst deleting orphaned objects") + logger.Critical("Error: %v whilst deleting orphaned objects", err) return err } logger.Info("%d pull requests without existing issue deleted", count) @@ -77,13 +95,13 @@ func checkDBConsistency(logger log.Logger, autofix bool) error { // find tracked times without existing issues/pulls count, err = models.CountOrphanedObjects("tracked_time", "issue", "tracked_time.issue_id=issue.id") if err != nil { - logger.Critical("Error: %v whilst counting orphaned objects") + logger.Critical("Error: %v whilst counting orphaned objects", err) return err } if count > 0 { if autofix { if err = models.DeleteOrphanedObjects("tracked_time", "issue", "tracked_time.issue_id=issue.id"); err != nil { - logger.Critical("Error: %v whilst deleting orphaned objects") + logger.Critical("Error: %v whilst deleting orphaned objects", err) return err } logger.Info("%d tracked times without existing issue deleted", count) @@ -95,14 +113,14 @@ func checkDBConsistency(logger log.Logger, autofix bool) error { // find null archived repositories count, err = models.CountNullArchivedRepository() if err != nil { - logger.Critical("Error: %v whilst counting null archived repositories") + logger.Critical("Error: %v whilst counting null archived repositories", err) return err } if count > 0 { if autofix { updatedCount, err := models.FixNullArchivedRepository() if err != nil { - logger.Critical("Error: %v whilst fixing null archived repositories") + logger.Critical("Error: %v whilst fixing null archived repositories", err) return err } logger.Info("%d repositories with null is_archived updated", updatedCount) @@ -111,8 +129,139 @@ func checkDBConsistency(logger log.Logger, autofix bool) error { } } + // find label comments with empty labels + count, err = models.CountCommentTypeLabelWithEmptyLabel() + if err != nil { + logger.Critical("Error: %v whilst counting label comments with empty labels", err) + return err + } + if count > 0 { + if autofix { + updatedCount, err := models.FixCommentTypeLabelWithEmptyLabel() + if err != nil { + logger.Critical("Error: %v whilst removing label comments with empty labels", err) + return err + } + logger.Info("%d label comments with empty labels removed", updatedCount) + } else { + logger.Warn("%d label comments with empty labels", count) + } + } + + // find label comments with labels from outside the repository + count, err = models.CountCommentTypeLabelWithOutsideLabels() + if err != nil { + logger.Critical("Error: %v whilst counting label comments with outside labels", err) + return err + } + if count > 0 { + if autofix { + updatedCount, err := models.FixCommentTypeLabelWithOutsideLabels() + if err != nil { + logger.Critical("Error: %v whilst removing label comments with outside labels", err) + return err + } + log.Info("%d label comments with outside labels removed", updatedCount) + } else { + log.Warn("%d label comments with outside labels", count) + } + } + + // find issue_label with labels from outside the repository + count, err = models.CountIssueLabelWithOutsideLabels() + if err != nil { + logger.Critical("Error: %v whilst counting issue_labels from outside the repository or organisation", err) + return err + } + if count > 0 { + if autofix { + updatedCount, err := models.FixIssueLabelWithOutsideLabels() + if err != nil { + logger.Critical("Error: %v whilst removing issue_labels from outside the repository or organisation", err) + return err + } + logger.Info("%d issue_labels from outside the repository or organisation removed", updatedCount) + } else { + logger.Warn("%d issue_labels from outside the repository or organisation", count) + } + } + // TODO: function to recalc all counters + if setting.Database.UsePostgreSQL { + count, err = models.CountBadSequences() + if err != nil { + logger.Critical("Error: %v whilst checking sequence values", err) + return err + } + if count > 0 { + if autofix { + err := models.FixBadSequences() + if err != nil { + logger.Critical("Error: %v whilst attempting to fix sequences", err) + return err + } + logger.Info("%d sequences updated", count) + } else { + logger.Warn("%d sequences with incorrect values", count) + } + } + } + + // find protected branches without existing repository + count, err = models.CountOrphanedObjects("protected_branch", "repository", "protected_branch.repo_id=repository.id") + if err != nil { + logger.Critical("Error: %v whilst counting orphaned objects", err) + return err + } + if count > 0 { + if autofix { + if err = models.DeleteOrphanedObjects("protected_branch", "repository", "protected_branch.repo_id=repository.id"); err != nil { + logger.Critical("Error: %v whilst deleting orphaned objects", err) + return err + } + logger.Info("%d protected branches without existing repository deleted", count) + } else { + logger.Warn("%d protected branches without existing repository", count) + } + } + + // find deleted branches without existing repository + count, err = models.CountOrphanedObjects("deleted_branch", "repository", "deleted_branch.repo_id=repository.id") + if err != nil { + logger.Critical("Error: %v whilst counting orphaned objects", err) + return err + } + if count > 0 { + if autofix { + if err = models.DeleteOrphanedObjects("deleted_branch", "repository", "deleted_branch.repo_id=repository.id"); err != nil { + logger.Critical("Error: %v whilst deleting orphaned objects", err) + return err + } + logger.Info("%d deleted branches without existing repository deleted", count) + } else { + logger.Warn("%d deleted branches without existing repository", count) + } + } + + // find LFS locks without existing repository + count, err = models.CountOrphanedObjects("lfs_lock", "repository", "lfs_lock.repo_id=repository.id") + if err != nil { + logger.Critical("Error: %v whilst counting orphaned objects", err) + return err + } + if count > 0 { + if autofix { + if err = models.DeleteOrphanedObjects("lfs_lock", "repository", "lfs_lock.repo_id=repository.id"); err != nil { + logger.Critical("Error: %v whilst deleting orphaned objects", err) + return err + } + logger.Info("%d LFS locks without existing repository deleted", count) + } else { + logger.Warn("%d LFS locks without existing repository", count) + } + } + return nil } diff --git a/modules/doctor/dbversion.go b/modules/doctor/dbversion.go index f82cf7209..c5cac3bf9 100644 --- a/modules/doctor/dbversion.go +++ b/modules/doctor/dbversion.go @@ -23,7 +23,7 @@ func checkDBVersion(logger log.Logger, autofix bool) error { err = models.NewEngine(context.Background(), migrations.Migrate) if err != nil { - logger.Critical("Error: %v during migration") + logger.Critical("Error: %v during migration", err) } return err } diff --git a/modules/doctor/misc.go b/modules/doctor/misc.go index 0ca1e841e..47fee8f7f 100644 --- a/modules/doctor/misc.go +++ b/modules/doctor/misc.go @@ -6,7 +6,9 @@ package doctor import ( "fmt" + "os" "os/exec" + "path" "strings" "code.gitea.io/gitea/models" @@ -14,6 +16,9 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/util" + lru "github.com/hashicorp/golang-lru" "xorm.io/builder" ) @@ -75,6 +80,7 @@ func checkUserStarNum(logger log.Logger, autofix bool) error { func checkEnablePushOptions(logger log.Logger, autofix bool) error { numRepos := 0 numNeedUpdate := 0 + if err := iterateRepositories(func(repo *models.Repository) error { numRepos++ r, err := git.OpenRepository(repo.RepoPath()) @@ -114,6 +120,66 @@ func checkEnablePushOptions(logger log.Logger, autofix bool) error { return nil } +func checkDaemonExport(logger log.Logger, autofix bool) error { + numRepos := 0 + numNeedUpdate := 0 + cache, err := lru.New(512) + if err != nil { + logger.Critical("Unable to create cache: %v", err) + return err + } + if err := iterateRepositories(func(repo *models.Repository) error { + numRepos++ + + if owner, has := cache.Get(repo.OwnerID); has { + repo.Owner = owner.(*models.User) + } else { + if err := repo.GetOwner(); err != nil { + return err + } + cache.Add(repo.OwnerID, repo.Owner) + } + + // Create/Remove git-daemon-export-ok for git-daemon... + daemonExportFile := path.Join(repo.RepoPath(), `git-daemon-export-ok`) + isExist, err := util.IsExist(daemonExportFile) + if err != nil { + log.Error("Unable to check if %s exists. Error: %v", daemonExportFile, err) + return err + } + isPublic := !repo.IsPrivate && repo.Owner.Visibility == structs.VisibleTypePublic + + if isPublic != isExist { + numNeedUpdate++ + if autofix { + if !isPublic && isExist { + if err = util.Remove(daemonExportFile); err != nil { + log.Error("Failed to remove %s: %v", daemonExportFile, err) + } + } else if isPublic && !isExist { + if f, err := os.Create(daemonExportFile); err != nil { + log.Error("Failed to create %s: %v", daemonExportFile, err) + } else { + f.Close() + } + } + } + } + return nil + }); err != nil { + logger.Critical("Unable to checkDaemonExport: %v", err) + return err + } + + if autofix { + logger.Info("Updated git-daemon-export-ok files for %d of %d repositories.", numNeedUpdate, numRepos) + } else { + logger.Info("Checked %d repositories, %d need updates.", numRepos, numNeedUpdate) + } + + return nil +} + func init() { Register(&Check{ Title: "Check if SCRIPT_TYPE is available", @@ -143,4 +209,11 @@ func init() { Run: checkEnablePushOptions, Priority: 7, }) + Register(&Check{ + Title: "Check git-daemon-export-ok files", + Name: "check-git-daemon-export-ok", + IsDefault: false, + Run: checkDaemonExport, + Priority: 8, + }) } diff --git a/modules/doctor/usertype.go b/modules/doctor/usertype.go new file mode 100644 index 000000000..26c0d34cd --- /dev/null +++ b/modules/doctor/usertype.go @@ -0,0 +1,40 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package doctor + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" +) + +func checkUserType(logger log.Logger, autofix bool) error { + count, err := models.CountWrongUserType() + if err != nil { + logger.Critical("Error: %v whilst counting wrong user types") + return err + } + if count > 0 { + if autofix { + if count, err = models.FixWrongUserType(); err != nil { + logger.Critical("Error: %v whilst fixing wrong user types") + return err + } + logger.Info("%d users with wrong type fixed", count) + } else { + logger.Warn("%d users with wrong type exist", count) + } + } + return nil +} + +func init() { + Register(&Check{ + Title: "Check if user with wrong type exist", + Name: "check-user-type", + IsDefault: true, + Run: checkUserType, + Priority: 3, + }) +} diff --git a/modules/emoji/emoji.go b/modules/emoji/emoji.go index 169ee0a18..85df2d697 100644 --- a/modules/emoji/emoji.go +++ b/modules/emoji/emoji.go @@ -6,6 +6,7 @@ package emoji import ( + "io" "sort" "strings" "sync" @@ -30,6 +31,9 @@ var ( // aliasMap provides a map of the alias to its emoji data. aliasMap map[string]int + // emptyReplacer is the string replacer for emoji codes. + emptyReplacer *strings.Replacer + // codeReplacer is the string replacer for emoji codes. codeReplacer *strings.Replacer @@ -49,6 +53,7 @@ func loadMap() { // process emoji codes and aliases codePairs := make([]string, 0) + emptyPairs := make([]string, 0) aliasPairs := make([]string, 0) // sort from largest to small so we match combined emoji first @@ -64,6 +69,7 @@ func loadMap() { // setup codes codeMap[e.Emoji] = i codePairs = append(codePairs, e.Emoji, ":"+e.Aliases[0]+":") + emptyPairs = append(emptyPairs, e.Emoji, e.Emoji) // setup aliases for _, a := range e.Aliases { @@ -77,6 +83,7 @@ func loadMap() { } // create replacers + emptyReplacer = strings.NewReplacer(emptyPairs...) codeReplacer = strings.NewReplacer(codePairs...) aliasReplacer = strings.NewReplacer(aliasPairs...) }) @@ -127,38 +134,57 @@ func ReplaceAliases(s string) string { return aliasReplacer.Replace(s) } +type rememberSecondWriteWriter struct { + pos int + idx int + end int + writecount int +} + +func (n *rememberSecondWriteWriter) Write(p []byte) (int, error) { + n.writecount++ + if n.writecount == 2 { + n.idx = n.pos + n.end = n.pos + len(p) + n.pos += len(p) + return len(p), io.EOF + } + n.pos += len(p) + return len(p), nil +} + +func (n *rememberSecondWriteWriter) WriteString(s string) (int, error) { + n.writecount++ + if n.writecount == 2 { + n.idx = n.pos + n.end = n.pos + len(s) + n.pos += len(s) + return len(s), io.EOF + } + n.pos += len(s) + return len(s), nil +} + // FindEmojiSubmatchIndex returns index pair of longest emoji in a string func FindEmojiSubmatchIndex(s string) []int { loadMap() - found := make(map[int]int) - keys := make([]int, 0) + secondWriteWriter := rememberSecondWriteWriter{} - //see if there are any emoji in string before looking for position of specific ones - //no performance difference when there is a match but 10x faster when there are not - if s == ReplaceCodes(s) { + // A faster and clean implementation would copy the trie tree formation in strings.NewReplacer but + // we can be lazy here. + // + // The implementation of strings.Replacer.WriteString is such that the first index of the emoji + // submatch is simply the second thing that is written to WriteString in the writer. + // + // Therefore we can simply take the index of the second write as our first emoji + // + // FIXME: just copy the trie implementation from strings.NewReplacer + _, _ = emptyReplacer.WriteString(&secondWriteWriter, s) + + // if we wrote less than twice then we never "replaced" + if secondWriteWriter.writecount < 2 { return nil } - // get index of first emoji occurrence while also checking for longest combination - for j := range GemojiData { - i := strings.Index(s, GemojiData[j].Emoji) - if i != -1 { - if _, ok := found[i]; !ok { - if len(keys) == 0 || i < keys[0] { - found[i] = j - keys = []int{i} - } - if i == 0 { - break - } - } - } - } - - if len(keys) > 0 { - index := keys[0] - return []int{index, index + len(GemojiData[found[index]].Emoji)} - } - - return nil + return []int{secondWriteWriter.idx, secondWriteWriter.end} } diff --git a/modules/emoji/emoji_test.go b/modules/emoji/emoji_test.go index 3eca3a8d8..def252896 100644 --- a/modules/emoji/emoji_test.go +++ b/modules/emoji/emoji_test.go @@ -8,6 +8,8 @@ package emoji import ( "reflect" "testing" + + "github.com/stretchr/testify/assert" ) func TestDumpInfo(t *testing.T) { @@ -65,3 +67,34 @@ func TestReplacers(t *testing.T) { } } } + +func TestFindEmojiSubmatchIndex(t *testing.T) { + type testcase struct { + teststring string + expected []int + } + + testcases := []testcase{ + { + "\U0001f44d", + []int{0, len("\U0001f44d")}, + }, + { + "\U0001f44d +1 \U0001f44d \U0001f37a", + []int{0, 4}, + }, + { + " \U0001f44d", + []int{1, 1 + len("\U0001f44d")}, + }, + { + string([]byte{'\u0001'}) + "\U0001f44d", + []int{1, 1 + len("\U0001f44d")}, + }, + } + + for _, kase := range testcases { + actual := FindEmojiSubmatchIndex(kase.teststring) + assert.Equal(t, kase.expected, actual) + } +} diff --git a/modules/eventsource/event.go b/modules/eventsource/event.go index fd418c6f0..8fc3221c1 100644 --- a/modules/eventsource/event.go +++ b/modules/eventsource/event.go @@ -6,11 +6,12 @@ package eventsource import ( "bytes" - "encoding/json" "fmt" "io" "strings" "time" + + "code.gitea.io/gitea/modules/json" ) func wrapNewlines(w io.Writer, prefix []byte, value []byte) (sum int64, err error) { @@ -89,7 +90,6 @@ func (e *Event) WriteTo(w io.Writer) (int64, error) { if err != nil { return sum, err } - } n, err = wrapNewlines(w, []byte("id: "), []byte(e.ID)) diff --git a/modules/eventsource/manager.go b/modules/eventsource/manager.go index 212fe6056..812d67399 100644 --- a/modules/eventsource/manager.go +++ b/modules/eventsource/manager.go @@ -13,6 +13,7 @@ type Manager struct { mutex sync.Mutex messengers map[int64]*Messenger + connection chan struct{} } var manager *Manager @@ -20,6 +21,7 @@ var manager *Manager func init() { manager = &Manager{ messengers: make(map[int64]*Messenger), + connection: make(chan struct{}, 1), } } @@ -36,6 +38,10 @@ func (m *Manager) Register(uid int64) <-chan *Event { messenger = NewMessenger(uid) m.messengers[uid] = messenger } + select { + case m.connection <- struct{}{}: + default: + } m.mutex.Unlock() return messenger.Register() } diff --git a/modules/eventsource/manager_run.go b/modules/eventsource/manager_run.go index ccfe2e070..60598ecb4 100644 --- a/modules/eventsource/manager_run.go +++ b/modules/eventsource/manager_run.go @@ -34,6 +34,35 @@ loop: timer.Stop() break loop case <-timer.C: + m.mutex.Lock() + connectionCount := len(m.messengers) + if connectionCount == 0 { + log.Trace("Event source has no listeners") + // empty the connection channel + select { + case <-m.connection: + default: + } + } + m.mutex.Unlock() + if connectionCount == 0 { + // No listeners so the source can be paused + log.Trace("Pausing the eventsource") + select { + case <-ctx.Done(): + break loop + case <-m.connection: + log.Trace("Connection detected - restarting the eventsource") + // OK we're back so lets reset the timer and start again + // We won't change the "then" time because there could be concurrency issues + select { + case <-timer.C: + default: + } + continue + } + } + now := timeutil.TimeStampNow().Add(-2) uidCounts, err := models.GetUIDsAndNotificationCounts(then, now) diff --git a/modules/generate/generate.go b/modules/generate/generate.go index 304ad87f2..ab05a9cb8 100644 --- a/modules/generate/generate.go +++ b/modules/generate/generate.go @@ -9,31 +9,13 @@ import ( "crypto/rand" "encoding/base64" "io" - "math/big" "time" - "github.com/dgrijalva/jwt-go" + "code.gitea.io/gitea/modules/util" + + "github.com/golang-jwt/jwt" ) -// GetRandomString generate random string by specify chars. -func GetRandomString(n int) (string, error) { - const alphanum = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" - - buffer := make([]byte, n) - max := big.NewInt(int64(len(alphanum))) - - for i := 0; i < n; i++ { - index, err := randomInt(max) - if err != nil { - return "", err - } - - buffer[i] = alphanum[index] - } - - return string(buffer), nil -} - // NewInternalToken generate a new value intended to be used by INTERNAL_TOKEN. func NewInternalToken() (string, error) { secretBytes := make([]byte, 32) @@ -57,31 +39,31 @@ func NewInternalToken() (string, error) { return internalToken, nil } -// NewJwtSecret generate a new value intended to be used by LFS_JWT_SECRET. -func NewJwtSecret() (string, error) { - JWTSecretBytes := make([]byte, 32) - _, err := io.ReadFull(rand.Reader, JWTSecretBytes) +// NewJwtSecret generates a new value intended to be used for JWT secrets. +func NewJwtSecret() ([]byte, error) { + bytes := make([]byte, 32) + _, err := io.ReadFull(rand.Reader, bytes) + if err != nil { + return nil, err + } + return bytes, nil +} + +// NewJwtSecretBase64 generates a new base64 encoded value intended to be used for JWT secrets. +func NewJwtSecretBase64() (string, error) { + bytes, err := NewJwtSecret() if err != nil { return "", err } - return base64.RawURLEncoding.EncodeToString(JWTSecretBytes), nil + return base64.RawURLEncoding.EncodeToString(bytes), nil } // NewSecretKey generate a new value intended to be used by SECRET_KEY. func NewSecretKey() (string, error) { - secretKey, err := GetRandomString(64) + secretKey, err := util.RandomString(64) if err != nil { return "", err } return secretKey, nil } - -func randomInt(max *big.Int) (int, error) { - rand, err := rand.Int(rand.Reader, max) - if err != nil { - return 0, err - } - - return int(rand.Int64()), nil -} diff --git a/modules/generate/generate_test.go b/modules/generate/generate_test.go deleted file mode 100644 index 1cacfe668..000000000 --- a/modules/generate/generate_test.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package generate - -import ( - "os" - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestMain(m *testing.M) { - retVal := m.Run() - - os.Exit(retVal) -} - -func TestGetRandomString(t *testing.T) { - randomString, err := GetRandomString(4) - assert.NoError(t, err) - assert.Len(t, randomString, 4) -} diff --git a/modules/git/batch_reader.go b/modules/git/batch_reader.go new file mode 100644 index 000000000..164e64381 --- /dev/null +++ b/modules/git/batch_reader.go @@ -0,0 +1,294 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package git + +import ( + "bufio" + "bytes" + "context" + "io" + "math" + "strconv" + "strings" + + "code.gitea.io/gitea/modules/log" + + "github.com/djherbis/buffer" + "github.com/djherbis/nio/v3" +) + +// WriteCloserError wraps an io.WriteCloser with an additional CloseWithError function +type WriteCloserError interface { + io.WriteCloser + CloseWithError(err error) error +} + +// CatFileBatchCheck opens git cat-file --batch-check in the provided repo and returns a stdin pipe, a stdout reader and cancel function +func CatFileBatchCheck(repoPath string) (WriteCloserError, *bufio.Reader, func()) { + batchStdinReader, batchStdinWriter := io.Pipe() + batchStdoutReader, batchStdoutWriter := io.Pipe() + ctx, ctxCancel := context.WithCancel(DefaultContext) + closed := make(chan struct{}) + cancel := func() { + _ = batchStdinReader.Close() + _ = batchStdinWriter.Close() + _ = batchStdoutReader.Close() + _ = batchStdoutWriter.Close() + ctxCancel() + <-closed + } + + go func() { + stderr := strings.Builder{} + err := NewCommandContext(ctx, "cat-file", "--batch-check").RunInDirFullPipeline(repoPath, batchStdoutWriter, &stderr, batchStdinReader) + if err != nil { + _ = batchStdoutWriter.CloseWithError(ConcatenateError(err, (&stderr).String())) + _ = batchStdinReader.CloseWithError(ConcatenateError(err, (&stderr).String())) + } else { + _ = batchStdoutWriter.Close() + _ = batchStdinReader.Close() + } + close(closed) + }() + + // For simplicities sake we'll use a buffered reader to read from the cat-file --batch-check + batchReader := bufio.NewReader(batchStdoutReader) + + return batchStdinWriter, batchReader, cancel +} + +// CatFileBatch opens git cat-file --batch in the provided repo and returns a stdin pipe, a stdout reader and cancel function +func CatFileBatch(repoPath string) (WriteCloserError, *bufio.Reader, func()) { + // We often want to feed the commits in order into cat-file --batch, followed by their trees and sub trees as necessary. + // so let's create a batch stdin and stdout + batchStdinReader, batchStdinWriter := io.Pipe() + batchStdoutReader, batchStdoutWriter := nio.Pipe(buffer.New(32 * 1024)) + ctx, ctxCancel := context.WithCancel(DefaultContext) + closed := make(chan struct{}) + cancel := func() { + _ = batchStdinReader.Close() + _ = batchStdinWriter.Close() + _ = batchStdoutReader.Close() + _ = batchStdoutWriter.Close() + ctxCancel() + <-closed + } + + go func() { + stderr := strings.Builder{} + err := NewCommandContext(ctx, "cat-file", "--batch").RunInDirFullPipeline(repoPath, batchStdoutWriter, &stderr, batchStdinReader) + if err != nil { + _ = batchStdoutWriter.CloseWithError(ConcatenateError(err, (&stderr).String())) + _ = batchStdinReader.CloseWithError(ConcatenateError(err, (&stderr).String())) + } else { + _ = batchStdoutWriter.Close() + _ = batchStdinReader.Close() + } + close(closed) + }() + + // For simplicities sake we'll us a buffered reader to read from the cat-file --batch + batchReader := bufio.NewReaderSize(batchStdoutReader, 32*1024) + + return batchStdinWriter, batchReader, cancel +} + +// ReadBatchLine reads the header line from cat-file --batch +// We expect: +// SP SP LF +// sha is a 40byte not 20byte here +func ReadBatchLine(rd *bufio.Reader) (sha []byte, typ string, size int64, err error) { + typ, err = rd.ReadString('\n') + if err != nil { + return + } + if len(typ) == 1 { + typ, err = rd.ReadString('\n') + if err != nil { + return + } + } + idx := strings.IndexByte(typ, ' ') + if idx < 0 { + log.Debug("missing space typ: %s", typ) + err = ErrNotExist{ID: string(sha)} + return + } + sha = []byte(typ[:idx]) + typ = typ[idx+1:] + + idx = strings.IndexByte(typ, ' ') + if idx < 0 { + err = ErrNotExist{ID: string(sha)} + return + } + + sizeStr := typ[idx+1 : len(typ)-1] + typ = typ[:idx] + + size, err = strconv.ParseInt(sizeStr, 10, 64) + return +} + +// ReadTagObjectID reads a tag object ID hash from a cat-file --batch stream, throwing away the rest of the stream. +func ReadTagObjectID(rd *bufio.Reader, size int64) (string, error) { + id := "" + var n int64 +headerLoop: + for { + line, err := rd.ReadBytes('\n') + if err != nil { + return "", err + } + n += int64(len(line)) + idx := bytes.Index(line, []byte{' '}) + if idx < 0 { + continue + } + + if string(line[:idx]) == "object" { + id = string(line[idx+1 : len(line)-1]) + break headerLoop + } + } + + // Discard the rest of the tag + discard := size - n + 1 + for discard > math.MaxInt32 { + _, err := rd.Discard(math.MaxInt32) + if err != nil { + return id, err + } + discard -= math.MaxInt32 + } + _, err := rd.Discard(int(discard)) + return id, err +} + +// ReadTreeID reads a tree ID from a cat-file --batch stream, throwing away the rest of the stream. +func ReadTreeID(rd *bufio.Reader, size int64) (string, error) { + id := "" + var n int64 +headerLoop: + for { + line, err := rd.ReadBytes('\n') + if err != nil { + return "", err + } + n += int64(len(line)) + idx := bytes.Index(line, []byte{' '}) + if idx < 0 { + continue + } + + if string(line[:idx]) == "tree" { + id = string(line[idx+1 : len(line)-1]) + break headerLoop + } + } + + // Discard the rest of the commit + discard := size - n + 1 + for discard > math.MaxInt32 { + _, err := rd.Discard(math.MaxInt32) + if err != nil { + return id, err + } + discard -= math.MaxInt32 + } + _, err := rd.Discard(int(discard)) + return id, err +} + +// git tree files are a list: +// SP NUL <20-byte SHA> +// +// Unfortunately this 20-byte notation is somewhat in conflict to all other git tools +// Therefore we need some method to convert these 20-byte SHAs to a 40-byte SHA + +// constant hextable to help quickly convert between 20byte and 40byte hashes +const hextable = "0123456789abcdef" + +// To40ByteSHA converts a 20-byte SHA into a 40-byte sha. Input and output can be the +// same 40 byte slice to support in place conversion without allocations. +// This is at least 100x quicker that hex.EncodeToString +// NB This requires that out is a 40-byte slice +func To40ByteSHA(sha, out []byte) []byte { + for i := 19; i >= 0; i-- { + v := sha[i] + vhi, vlo := v>>4, v&0x0f + shi, slo := hextable[vhi], hextable[vlo] + out[i*2], out[i*2+1] = shi, slo + } + return out +} + +// ParseTreeLine reads an entry from a tree in a cat-file --batch stream +// This carefully avoids allocations - except where fnameBuf is too small. +// It is recommended therefore to pass in an fnameBuf large enough to avoid almost all allocations +// +// Each line is composed of: +// SP NUL <20-byte SHA> +// +// We don't attempt to convert the 20-byte SHA to 40-byte SHA to save a lot of time +func ParseTreeLine(rd *bufio.Reader, modeBuf, fnameBuf, shaBuf []byte) (mode, fname, sha []byte, n int, err error) { + var readBytes []byte + + // Read the Mode & fname + readBytes, err = rd.ReadSlice('\x00') + if err != nil { + return + } + idx := bytes.IndexByte(readBytes, ' ') + if idx < 0 { + log.Debug("missing space in readBytes ParseTreeLine: %s", readBytes) + + err = &ErrNotExist{} + return + } + + n += idx + 1 + copy(modeBuf, readBytes[:idx]) + if len(modeBuf) >= idx { + modeBuf = modeBuf[:idx] + } else { + modeBuf = append(modeBuf, readBytes[len(modeBuf):idx]...) + } + mode = modeBuf + + readBytes = readBytes[idx+1:] + + // Deal with the fname + copy(fnameBuf, readBytes) + if len(fnameBuf) > len(readBytes) { + fnameBuf = fnameBuf[:len(readBytes)] + } else { + fnameBuf = append(fnameBuf, readBytes[len(fnameBuf):]...) + } + for err == bufio.ErrBufferFull { + readBytes, err = rd.ReadSlice('\x00') + fnameBuf = append(fnameBuf, readBytes...) + } + n += len(fnameBuf) + if err != nil { + return + } + fnameBuf = fnameBuf[:len(fnameBuf)-1] + fname = fnameBuf + + // Deal with the 20-byte SHA + idx = 0 + for idx < 20 { + read := 0 + read, err = rd.Read(shaBuf[idx:20]) + n += read + if err != nil { + return + } + idx += read + } + sha = shaBuf + return +} diff --git a/modules/git/batch_reader_nogogit.go b/modules/git/batch_reader_nogogit.go deleted file mode 100644 index 6a236e500..000000000 --- a/modules/git/batch_reader_nogogit.go +++ /dev/null @@ -1,243 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -// +build !gogit - -package git - -import ( - "bufio" - "bytes" - "math" - "strconv" -) - -// ReadBatchLine reads the header line from cat-file --batch -// We expect: -// SP SP LF -func ReadBatchLine(rd *bufio.Reader) (sha []byte, typ string, size int64, err error) { - sha, err = rd.ReadBytes(' ') - if err != nil { - return - } - sha = sha[:len(sha)-1] - - typ, err = rd.ReadString(' ') - if err != nil { - return - } - typ = typ[:len(typ)-1] - - var sizeStr string - sizeStr, err = rd.ReadString('\n') - if err != nil { - return - } - - size, err = strconv.ParseInt(sizeStr[:len(sizeStr)-1], 10, 64) - return -} - -// ReadTagObjectID reads a tag object ID hash from a cat-file --batch stream, throwing away the rest of the stream. -func ReadTagObjectID(rd *bufio.Reader, size int64) (string, error) { - id := "" - var n int64 -headerLoop: - for { - line, err := rd.ReadBytes('\n') - if err != nil { - return "", err - } - n += int64(len(line)) - idx := bytes.Index(line, []byte{' '}) - if idx < 0 { - continue - } - - if string(line[:idx]) == "object" { - id = string(line[idx+1 : len(line)-1]) - break headerLoop - } - } - - // Discard the rest of the tag - discard := size - n - for discard > math.MaxInt32 { - _, err := rd.Discard(math.MaxInt32) - if err != nil { - return id, err - } - discard -= math.MaxInt32 - } - _, err := rd.Discard(int(discard)) - return id, err -} - -// ReadTreeID reads a tree ID from a cat-file --batch stream, throwing away the rest of the stream. -func ReadTreeID(rd *bufio.Reader, size int64) (string, error) { - id := "" - var n int64 -headerLoop: - for { - line, err := rd.ReadBytes('\n') - if err != nil { - return "", err - } - n += int64(len(line)) - idx := bytes.Index(line, []byte{' '}) - if idx < 0 { - continue - } - - if string(line[:idx]) == "tree" { - id = string(line[idx+1 : len(line)-1]) - break headerLoop - } - } - - // Discard the rest of the commit - discard := size - n - for discard > math.MaxInt32 { - _, err := rd.Discard(math.MaxInt32) - if err != nil { - return id, err - } - discard -= math.MaxInt32 - } - _, err := rd.Discard(int(discard)) - return id, err -} - -// git tree files are a list: -// SP NUL <20-byte SHA> -// -// Unfortunately this 20-byte notation is somewhat in conflict to all other git tools -// Therefore we need some method to convert these 20-byte SHAs to a 40-byte SHA - -// constant hextable to help quickly convert between 20byte and 40byte hashes -const hextable = "0123456789abcdef" - -// to40ByteSHA converts a 20-byte SHA in a 40-byte slice into a 40-byte sha in place -// without allocations. This is at least 100x quicker that hex.EncodeToString -// NB This requires that sha is a 40-byte slice -func to40ByteSHA(sha []byte) []byte { - for i := 19; i >= 0; i-- { - v := sha[i] - vhi, vlo := v>>4, v&0x0f - shi, slo := hextable[vhi], hextable[vlo] - sha[i*2], sha[i*2+1] = shi, slo - } - return sha -} - -// ParseTreeLineSkipMode reads an entry from a tree in a cat-file --batch stream -// This simply skips the mode - saving a substantial amount of time and carefully avoids allocations - except where fnameBuf is too small. -// It is recommended therefore to pass in an fnameBuf large enough to avoid almost all allocations -// -// Each line is composed of: -// SP NUL <20-byte SHA> -// -// We don't attempt to convert the 20-byte SHA to 40-byte SHA to save a lot of time -func ParseTreeLineSkipMode(rd *bufio.Reader, fnameBuf, shaBuf []byte) (fname, sha []byte, n int, err error) { - var readBytes []byte - // Skip the Mode - readBytes, err = rd.ReadSlice(' ') // NB: DOES NOT ALLOCATE SIMPLY RETURNS SLICE WITHIN READER BUFFER - if err != nil { - return - } - n += len(readBytes) - - // Deal with the fname - readBytes, err = rd.ReadSlice('\x00') - copy(fnameBuf, readBytes) - if len(fnameBuf) > len(readBytes) { - fnameBuf = fnameBuf[:len(readBytes)] // cut the buf the correct size - } else { - fnameBuf = append(fnameBuf, readBytes[len(fnameBuf):]...) // extend the buf and copy in the missing bits - } - for err == bufio.ErrBufferFull { // Then we need to read more - readBytes, err = rd.ReadSlice('\x00') - fnameBuf = append(fnameBuf, readBytes...) // there is little point attempting to avoid allocations here so just extend - } - n += len(fnameBuf) - if err != nil { - return - } - fnameBuf = fnameBuf[:len(fnameBuf)-1] // Drop the terminal NUL - fname = fnameBuf // set the returnable fname to the slice - - // Now deal with the 20-byte SHA - idx := 0 - for idx < 20 { - read := 0 - read, err = rd.Read(shaBuf[idx:20]) - n += read - if err != nil { - return - } - idx += read - } - sha = shaBuf - return -} - -// ParseTreeLine reads an entry from a tree in a cat-file --batch stream -// This carefully avoids allocations - except where fnameBuf is too small. -// It is recommended therefore to pass in an fnameBuf large enough to avoid almost all allocations -// -// Each line is composed of: -// SP NUL <20-byte SHA> -// -// We don't attempt to convert the 20-byte SHA to 40-byte SHA to save a lot of time -func ParseTreeLine(rd *bufio.Reader, modeBuf, fnameBuf, shaBuf []byte) (mode, fname, sha []byte, n int, err error) { - var readBytes []byte - - // Read the Mode - readBytes, err = rd.ReadSlice(' ') - if err != nil { - return - } - n += len(readBytes) - copy(modeBuf, readBytes) - if len(modeBuf) > len(readBytes) { - modeBuf = modeBuf[:len(readBytes)] - } else { - modeBuf = append(modeBuf, readBytes[len(modeBuf):]...) - - } - mode = modeBuf[:len(modeBuf)-1] // Drop the SP - - // Deal with the fname - readBytes, err = rd.ReadSlice('\x00') - copy(fnameBuf, readBytes) - if len(fnameBuf) > len(readBytes) { - fnameBuf = fnameBuf[:len(readBytes)] - } else { - fnameBuf = append(fnameBuf, readBytes[len(fnameBuf):]...) - } - for err == bufio.ErrBufferFull { - readBytes, err = rd.ReadSlice('\x00') - fnameBuf = append(fnameBuf, readBytes...) - } - n += len(fnameBuf) - if err != nil { - return - } - fnameBuf = fnameBuf[:len(fnameBuf)-1] - fname = fnameBuf - - // Deal with the 20-byte SHA - idx := 0 - for idx < 20 { - read := 0 - read, err = rd.Read(shaBuf[idx:20]) - n += read - if err != nil { - return - } - idx += read - } - sha = shaBuf - return -} diff --git a/modules/git/blame.go b/modules/git/blame.go index c2129c9e1..fcbf18398 100644 --- a/modules/git/blame.go +++ b/modules/git/blame.go @@ -34,7 +34,7 @@ type BlameReader struct { var shaLineRegex = regexp.MustCompile("^([a-z0-9]{40})") -// NextPart returns next part of blame (sequencial code lines with the same commit) +// NextPart returns next part of blame (sequential code lines with the same commit) func (r *BlameReader) NextPart() (*BlamePart, error) { var blamePart *BlamePart diff --git a/modules/git/blob.go b/modules/git/blob.go index 674a6a959..5831bc373 100644 --- a/modules/git/blob.go +++ b/modules/git/blob.go @@ -10,6 +10,8 @@ import ( "encoding/base64" "io" "io/ioutil" + + "code.gitea.io/gitea/modules/typesniffer" ) // This file contains common functions between the gogit and !gogit variants for git Blobs @@ -32,7 +34,7 @@ func (b *Blob) GetBlobContent() (string, error) { return string(buf), nil } -// GetBlobLineCount gets line count of lob as raw text +// GetBlobLineCount gets line count of the blob func (b *Blob) GetBlobLineCount() (int, error) { reader, err := b.DataAsync() if err != nil { @@ -40,10 +42,14 @@ func (b *Blob) GetBlobLineCount() (int, error) { } defer reader.Close() buf := make([]byte, 32*1024) - count := 0 + count := 1 lineSep := []byte{'\n'} + + c, err := reader.Read(buf) + if c == 0 && err == io.EOF { + return 0, nil + } for { - c, err := reader.Read(buf) count += bytes.Count(buf[:c], lineSep) switch { case err == io.EOF: @@ -51,6 +57,7 @@ func (b *Blob) GetBlobLineCount() (int, error) { case err != nil: return count, err } + c, err = reader.Read(buf) } } @@ -82,3 +89,14 @@ func (b *Blob) GetBlobContentBase64() (string, error) { } return string(out), nil } + +// GuessContentType guesses the content type of the blob. +func (b *Blob) GuessContentType() (typesniffer.SniffedType, error) { + r, err := b.DataAsync() + if err != nil { + return typesniffer.SniffedType{}, err + } + defer r.Close() + + return typesniffer.DetectContentTypeFromReader(r) +} diff --git a/modules/git/blob_gogit.go b/modules/git/blob_gogit.go index 7a82eb5c3..ef7a90c3f 100644 --- a/modules/git/blob_gogit.go +++ b/modules/git/blob_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/blob_nogogit.go b/modules/git/blob_nogogit.go index 401b17286..3391bc393 100644 --- a/modules/git/blob_nogogit.go +++ b/modules/git/blob_nogogit.go @@ -2,56 +2,64 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( "bufio" + "bytes" "io" - "strconv" - "strings" + "io/ioutil" + "math" + + "code.gitea.io/gitea/modules/log" ) // Blob represents a Git object. type Blob struct { ID SHA1 - gotSize bool - size int64 - repoPath string - name string + gotSize bool + size int64 + name string + repo *Repository } // DataAsync gets a ReadCloser for the contents of a blob without reading it all. // Calling the Close function on the result will discard all unread output. func (b *Blob) DataAsync() (io.ReadCloser, error) { - stdoutReader, stdoutWriter := io.Pipe() - var err error + wr, rd, cancel := b.repo.CatFileBatch() - go func() { - stderr := &strings.Builder{} - err = NewCommand("cat-file", "--batch").RunInDirFullPipeline(b.repoPath, stdoutWriter, stderr, strings.NewReader(b.ID.String()+"\n")) - if err != nil { - err = ConcatenateError(err, stderr.String()) - _ = stdoutWriter.CloseWithError(err) - } else { - _ = stdoutWriter.Close() - } - }() - - bufReader := bufio.NewReader(stdoutReader) - _, _, size, err := ReadBatchLine(bufReader) + _, err := wr.Write([]byte(b.ID.String() + "\n")) if err != nil { - stdoutReader.Close() + cancel() return nil, err } + _, _, size, err := ReadBatchLine(rd) + if err != nil { + cancel() + return nil, err + } + b.gotSize = true + b.size = size - return &LimitedReaderCloser{ - R: bufReader, - C: stdoutReader, - N: int64(size), - }, err + if size < 4096 { + bs, err := ioutil.ReadAll(io.LimitReader(rd, size)) + defer cancel() + if err != nil { + return nil, err + } + _, err = rd.Discard(1) + return ioutil.NopCloser(bytes.NewReader(bs)), err + } + + return &blobReader{ + rd: rd, + n: size, + cancel: cancel, + }, nil } // Size returns the uncompressed size of the blob @@ -60,18 +68,64 @@ func (b *Blob) Size() int64 { return b.size } - size, err := NewCommand("cat-file", "-s", b.ID.String()).RunInDir(b.repoPath) + wr, rd, cancel := b.repo.CatFileBatchCheck() + defer cancel() + _, err := wr.Write([]byte(b.ID.String() + "\n")) if err != nil { - log("error whilst reading size for %s in %s. Error: %v", b.ID.String(), b.repoPath, err) + log.Debug("error whilst reading size for %s in %s. Error: %v", b.ID.String(), b.repo.Path, err) + return 0 + } + _, _, b.size, err = ReadBatchLine(rd) + if err != nil { + log.Debug("error whilst reading size for %s in %s. Error: %v", b.ID.String(), b.repo.Path, err) return 0 } - b.size, err = strconv.ParseInt(size[:len(size)-1], 10, 64) - if err != nil { - log("error whilst parsing size %s for %s in %s. Error: %v", size, b.ID.String(), b.repoPath, err) - return 0 - } b.gotSize = true return b.size } + +type blobReader struct { + rd *bufio.Reader + n int64 + cancel func() +} + +func (b *blobReader) Read(p []byte) (n int, err error) { + if b.n <= 0 { + return 0, io.EOF + } + if int64(len(p)) > b.n { + p = p[0:b.n] + } + n, err = b.rd.Read(p) + b.n -= int64(n) + return +} + +// Close implements io.Closer +func (b *blobReader) Close() error { + defer b.cancel() + if b.n > 0 { + for b.n > math.MaxInt32 { + n, err := b.rd.Discard(math.MaxInt32) + b.n -= int64(n) + if err != nil { + return err + } + b.n -= math.MaxInt32 + } + n, err := b.rd.Discard(int(b.n)) + b.n -= int64(n) + if err != nil { + return err + } + } + if b.n == 0 { + _, err := b.rd.Discard(1) + b.n-- + return err + } + return nil +} diff --git a/modules/git/blob_test.go b/modules/git/blob_test.go index 9043de595..2ceda6c4e 100644 --- a/modules/git/blob_test.go +++ b/modules/git/blob_test.go @@ -7,6 +7,7 @@ package git import ( "io/ioutil" + "path/filepath" "testing" "github.com/stretchr/testify/assert" @@ -14,52 +15,37 @@ import ( ) func TestBlob_Data(t *testing.T) { - output := `Copyright (c) 2016 The Gitea Authors -Copyright (c) 2015 The Gogs Authors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -` - repo, err := OpenRepository("../../.git") - assert.NoError(t, err) + output := "file2\n" + bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") + repo, err := OpenRepository(bareRepo1Path) + if !assert.NoError(t, err) { + t.Fatal() + } defer repo.Close() - testBlob, err := repo.GetBlob("a8d4b49dd073a4a38a7e58385eeff7cc52568697") + testBlob, err := repo.GetBlob("6c493ff740f9380390d5c9ddef4af18697ac9375") assert.NoError(t, err) r, err := testBlob.DataAsync() assert.NoError(t, err) require.NotNil(t, r) - defer r.Close() data, err := ioutil.ReadAll(r) + assert.NoError(t, r.Close()) + assert.NoError(t, err) assert.Equal(t, output, string(data)) } func Benchmark_Blob_Data(b *testing.B) { - repo, err := OpenRepository("../../.git") + bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") + repo, err := OpenRepository(bareRepo1Path) if err != nil { b.Fatal(err) } defer repo.Close() - testBlob, err := repo.GetBlob("a8d4b49dd073a4a38a7e58385eeff7cc52568697") + testBlob, err := repo.GetBlob("6c493ff740f9380390d5c9ddef4af18697ac9375") if err != nil { b.Fatal(err) } @@ -69,7 +55,7 @@ func Benchmark_Blob_Data(b *testing.B) { if err != nil { b.Fatal(err) } - defer r.Close() ioutil.ReadAll(r) + _ = r.Close() } } diff --git a/modules/git/command.go b/modules/git/command.go index fe2589546..e7496f072 100644 --- a/modules/git/command.go +++ b/modules/git/command.go @@ -15,6 +15,7 @@ import ( "strings" "time" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/process" ) @@ -22,8 +23,8 @@ var ( // GlobalCommandArgs global command args for external package setting GlobalCommandArgs []string - // DefaultCommandExecutionTimeout default command execution timeout duration - DefaultCommandExecutionTimeout = 360 * time.Second + // defaultCommandExecutionTimeout default command execution timeout duration + defaultCommandExecutionTimeout = 360 * time.Second ) // DefaultLocale is the default LC_ALL to run git commands in. @@ -109,48 +110,77 @@ func (c *Command) RunInDirTimeoutEnvFullPipeline(env []string, timeout time.Dura // RunInDirTimeoutEnvFullPipelineFunc executes the command in given directory with given timeout, // it pipes stdout and stderr to given io.Writer and passes in an io.Reader as stdin. Between cmd.Start and cmd.Wait the passed in function is run. func (c *Command) RunInDirTimeoutEnvFullPipelineFunc(env []string, timeout time.Duration, dir string, stdout, stderr io.Writer, stdin io.Reader, fn func(context.Context, context.CancelFunc) error) error { - if timeout == -1 { - timeout = DefaultCommandExecutionTimeout + return c.RunWithContext(&RunContext{ + Env: env, + Timeout: timeout, + Dir: dir, + Stdout: stdout, + Stderr: stderr, + Stdin: stdin, + PipelineFunc: fn, + }) +} + +// RunContext represents parameters to run the command +type RunContext struct { + Env []string + Timeout time.Duration + Dir string + Stdout, Stderr io.Writer + Stdin io.Reader + PipelineFunc func(context.Context, context.CancelFunc) error +} + +// RunWithContext run the command with context +func (c *Command) RunWithContext(rc *RunContext) error { + if rc.Timeout == -1 { + rc.Timeout = defaultCommandExecutionTimeout } - if len(dir) == 0 { - log(c.String()) + if len(rc.Dir) == 0 { + log.Debug("%s", c) } else { - log("%s: %v", dir, c) + log.Debug("%s: %v", rc.Dir, c) } - ctx, cancel := context.WithTimeout(c.parentContext, timeout) + ctx, cancel := context.WithTimeout(c.parentContext, rc.Timeout) defer cancel() cmd := exec.CommandContext(ctx, c.name, c.args...) - if env == nil { - cmd.Env = append(os.Environ(), fmt.Sprintf("LC_ALL=%s", DefaultLocale)) + if rc.Env == nil { + cmd.Env = os.Environ() } else { - cmd.Env = env - cmd.Env = append(cmd.Env, fmt.Sprintf("LC_ALL=%s", DefaultLocale)) + cmd.Env = rc.Env } + cmd.Env = append( + cmd.Env, + fmt.Sprintf("LC_ALL=%s", DefaultLocale), + // avoid prompting for credentials interactively, supported since git v2.3 + "GIT_TERMINAL_PROMPT=0", + ) + // TODO: verify if this is still needed in golang 1.15 if goVersionLessThan115 { cmd.Env = append(cmd.Env, "GODEBUG=asyncpreemptoff=1") } - cmd.Dir = dir - cmd.Stdout = stdout - cmd.Stderr = stderr - cmd.Stdin = stdin + cmd.Dir = rc.Dir + cmd.Stdout = rc.Stdout + cmd.Stderr = rc.Stderr + cmd.Stdin = rc.Stdin if err := cmd.Start(); err != nil { return err } desc := c.desc if desc == "" { - desc = fmt.Sprintf("%s %s %s [repo_path: %s]", GitExecutable, c.name, strings.Join(c.args, " "), dir) + desc = fmt.Sprintf("%s %s %s [repo_path: %s]", GitExecutable, c.name, strings.Join(c.args, " "), rc.Dir) } pid := process.GetManager().Add(desc, cancel) defer process.GetManager().Remove(pid) - if fn != nil { - err := fn(ctx, cancel) + if rc.PipelineFunc != nil { + err := rc.PipelineFunc(ctx, cancel) if err != nil { cancel() _ = cmd.Wait() @@ -191,9 +221,12 @@ func (c *Command) RunInDirTimeoutEnv(env []string, timeout time.Duration, dir st if err := c.RunInDirTimeoutEnvPipeline(env, timeout, dir, stdout, stderr); err != nil { return nil, ConcatenateError(err, stderr.String()) } - - if stdout.Len() > 0 { - log("stdout:\n%s", stdout.Bytes()[:1024]) + if stdout.Len() > 0 && log.IsTrace() { + tracelen := stdout.Len() + if tracelen > 1024 { + tracelen = 1024 + } + log.Trace("Stdout:\n %s", stdout.Bytes()[:tracelen]) } return stdout.Bytes(), nil } diff --git a/modules/git/command_test.go b/modules/git/command_test.go index 00801ae31..58d616a03 100644 --- a/modules/git/command_test.go +++ b/modules/git/command_test.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build race // +build race package git diff --git a/modules/git/commit.go b/modules/git/commit.go index ce82c2f58..fe2c2b977 100644 --- a/modules/git/commit.go +++ b/modules/git/commit.go @@ -8,17 +8,14 @@ package git import ( "bufio" "bytes" - "container/list" + "errors" "fmt" - "image" - "image/color" - _ "image/gif" // for processing gif images - _ "image/jpeg" // for processing jpeg images - _ "image/png" // for processing png images "io" - "net/http" + "os/exec" "strconv" "strings" + + "code.gitea.io/gitea/modules/log" ) // Commit represents a git commit. @@ -79,70 +76,6 @@ func (c *Commit) ParentCount() int { return len(c.Parents) } -func isImageFile(data []byte) (string, bool) { - contentType := http.DetectContentType(data) - if strings.Contains(contentType, "image/") { - return contentType, true - } - return contentType, false -} - -// IsImageFile is a file image type -func (c *Commit) IsImageFile(name string) bool { - blob, err := c.GetBlobByPath(name) - if err != nil { - return false - } - - dataRc, err := blob.DataAsync() - if err != nil { - return false - } - defer dataRc.Close() - buf := make([]byte, 1024) - n, _ := dataRc.Read(buf) - buf = buf[:n] - _, isImage := isImageFile(buf) - return isImage -} - -// ImageMetaData represents metadata of an image file -type ImageMetaData struct { - ColorModel color.Model - Width int - Height int - ByteSize int64 -} - -// ImageInfo returns information about the dimensions of an image -func (c *Commit) ImageInfo(name string) (*ImageMetaData, error) { - if !c.IsImageFile(name) { - return nil, nil - } - - blob, err := c.GetBlobByPath(name) - if err != nil { - return nil, err - } - reader, err := blob.DataAsync() - if err != nil { - return nil, err - } - defer reader.Close() - config, _, err := image.DecodeConfig(reader) - if err != nil { - return nil, err - } - - metadata := ImageMetaData{ - ColorModel: config.ColorModel, - Width: config.Width, - Height: config.Height, - ByteSize: blob.Size(), - } - return &metadata, nil -} - // GetCommitByPath return the commit of relative path object. func (c *Commit) GetCommitByPath(relpath string) (*Commit, error) { return c.repo.getCommitByPathWithID(c.ID, relpath) @@ -253,43 +186,53 @@ func (c *Commit) CommitsCount() (int64, error) { } // CommitsByRange returns the specific page commits before current revision, every page's number default by CommitsRangeSize -func (c *Commit) CommitsByRange(page, pageSize int) (*list.List, error) { +func (c *Commit) CommitsByRange(page, pageSize int) ([]*Commit, error) { return c.repo.commitsByRange(c.ID, page, pageSize) } // CommitsBefore returns all the commits before current revision -func (c *Commit) CommitsBefore() (*list.List, error) { +func (c *Commit) CommitsBefore() ([]*Commit, error) { return c.repo.getCommitsBefore(c.ID) } // HasPreviousCommit returns true if a given commitHash is contained in commit's parents func (c *Commit) HasPreviousCommit(commitHash SHA1) (bool, error) { - for i := 0; i < c.ParentCount(); i++ { - commit, err := c.Parent(i) - if err != nil { - return false, err - } - if commit.ID == commitHash { - return true, nil - } - commitInParentCommit, err := commit.HasPreviousCommit(commitHash) - if err != nil { - return false, err - } - if commitInParentCommit { - return true, nil - } + this := c.ID.String() + that := commitHash.String() + + if this == that { + return false, nil } - return false, nil + + if err := CheckGitVersionAtLeast("1.8"); err == nil { + _, err := NewCommand("merge-base", "--is-ancestor", that, this).RunInDir(c.repo.Path) + if err == nil { + return true, nil + } + var exitError *exec.ExitError + if errors.As(err, &exitError) { + if exitError.ProcessState.ExitCode() == 1 && len(exitError.Stderr) == 0 { + return false, nil + } + } + return false, err + } + + result, err := NewCommand("rev-list", "--ancestry-path", "-n1", that+".."+this, "--").RunInDir(c.repo.Path) + if err != nil { + return false, err + } + + return len(strings.TrimSpace(result)) > 0, nil } // CommitsBeforeLimit returns num commits before current revision -func (c *Commit) CommitsBeforeLimit(num int) (*list.List, error) { +func (c *Commit) CommitsBeforeLimit(num int) ([]*Commit, error) { return c.repo.getCommitsBeforeLimit(c.ID, num) } // CommitsBeforeUntil returns the commits between commitID to current revision -func (c *Commit) CommitsBeforeUntil(commitID string) (*list.List, error) { +func (c *Commit) CommitsBeforeUntil(commitID string) ([]*Commit, error) { endCommit, err := c.repo.GetCommit(commitID) if err != nil { return nil, err @@ -337,7 +280,7 @@ func NewSearchCommitsOptions(searchString string, forAllRefs bool) SearchCommits } // SearchCommits returns the commits match the keyword before current revision -func (c *Commit) SearchCommits(opts SearchCommitsOptions) (*list.List, error) { +func (c *Commit) SearchCommits(opts SearchCommitsOptions) ([]*Commit, error) { return c.repo.searchCommits(c.ID, opts) } @@ -490,33 +433,59 @@ func NewCommitFileStatus() *CommitFileStatus { } } +func parseCommitFileStatus(fileStatus *CommitFileStatus, stdout io.Reader) { + rd := bufio.NewReader(stdout) + peek, err := rd.Peek(1) + if err != nil { + if err != io.EOF { + log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err) + } + return + } + if peek[0] == '\n' || peek[0] == '\x00' { + _, _ = rd.Discard(1) + } + for { + modifier, err := rd.ReadSlice('\x00') + if err != nil { + if err != io.EOF { + log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err) + } + return + } + file, err := rd.ReadString('\x00') + if err != nil { + if err != io.EOF { + log.Error("Unexpected error whilst reading from git log --name-status. Error: %v", err) + } + return + } + file = file[:len(file)-1] + switch modifier[0] { + case 'A': + fileStatus.Added = append(fileStatus.Added, file) + case 'D': + fileStatus.Removed = append(fileStatus.Removed, file) + case 'M': + fileStatus.Modified = append(fileStatus.Modified, file) + } + } +} + // GetCommitFileStatus returns file status of commit in given repository. func GetCommitFileStatus(repoPath, commitID string) (*CommitFileStatus, error) { stdout, w := io.Pipe() done := make(chan struct{}) fileStatus := NewCommitFileStatus() go func() { - scanner := bufio.NewScanner(stdout) - for scanner.Scan() { - fields := strings.Fields(scanner.Text()) - if len(fields) < 2 { - continue - } - - switch fields[0][0] { - case 'A': - fileStatus.Added = append(fileStatus.Added, fields[1]) - case 'D': - fileStatus.Removed = append(fileStatus.Removed, fields[1]) - case 'M': - fileStatus.Modified = append(fileStatus.Modified, fields[1]) - } - } - done <- struct{}{} + parseCommitFileStatus(fileStatus, stdout) + close(done) }() stderr := new(bytes.Buffer) - err := NewCommand("show", "--name-status", "--pretty=format:''", commitID).RunInDirPipeline(repoPath, w, stderr) + args := []string{"log", "--name-status", "-c", "--pretty=format:", "--parents", "--no-renames", "-z", "-1", commitID} + + err := NewCommand(args...).RunInDirPipeline(repoPath, w, stderr) w.Close() // Close writer to exit parsing goroutine if err != nil { return nil, ConcatenateError(err, stderr.String()) diff --git a/modules/git/commit_archive.go b/modules/git/commit_archive.go deleted file mode 100644 index d075ba091..000000000 --- a/modules/git/commit_archive.go +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2015 The Gogs Authors. All rights reserved. -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package git - -import ( - "context" - "fmt" - "path/filepath" - "strings" -) - -// ArchiveType archive types -type ArchiveType int - -const ( - // ZIP zip archive type - ZIP ArchiveType = iota + 1 - // TARGZ tar gz archive type - TARGZ -) - -// String converts an ArchiveType to string -func (a ArchiveType) String() string { - switch a { - case ZIP: - return "zip" - case TARGZ: - return "tar.gz" - } - return "unknown" -} - -// CreateArchiveOpts represents options for creating an archive -type CreateArchiveOpts struct { - Format ArchiveType - Prefix bool -} - -// CreateArchive create archive content to the target path -func (c *Commit) CreateArchive(ctx context.Context, target string, opts CreateArchiveOpts) error { - if opts.Format.String() == "unknown" { - return fmt.Errorf("unknown format: %v", opts.Format) - } - - args := []string{ - "archive", - } - if opts.Prefix { - args = append(args, "--prefix="+filepath.Base(strings.TrimSuffix(c.repo.Path, ".git"))+"/") - } - - args = append(args, - "--format="+opts.Format.String(), - "-o", - target, - c.ID.String(), - ) - - _, err := NewCommandContext(ctx, args...).RunInDir(c.repo.Path) - return err -} diff --git a/modules/git/commit_convert_gogit.go b/modules/git/commit_convert_gogit.go index be2b948b3..b328b3c0e 100644 --- a/modules/git/commit_convert_gogit.go +++ b/modules/git/commit_convert_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/commit_info_gogit.go b/modules/git/commit_info_gogit.go index 6d95e22d0..8b82f3f66 100644 --- a/modules/git/commit_info_gogit.go +++ b/modules/git/commit_info_gogit.go @@ -2,11 +2,13 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git import ( + "context" "path" "github.com/emirpasic/gods/trees/binaryheap" @@ -16,7 +18,7 @@ import ( ) // GetCommitsInfo gets information of all commits that are corresponding to these entries -func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache *LastCommitCache) ([]CommitInfo, *Commit, error) { +func (tes Entries) GetCommitsInfo(ctx context.Context, commit *Commit, treePath string, cache *LastCommitCache) ([]CommitInfo, *Commit, error) { entryPaths := make([]string, len(tes)+1) // Get the commit for the treePath itself entryPaths[0] = "" @@ -42,7 +44,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache *LastCo return nil, nil, err } if len(unHitPaths) > 0 { - revs2, err := GetLastCommitForPaths(c, treePath, unHitPaths) + revs2, err := GetLastCommitForPaths(ctx, c, treePath, unHitPaths) if err != nil { return nil, nil, err } @@ -55,7 +57,7 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache *LastCo } } } else { - revs, err = GetLastCommitForPaths(c, treePath, entryPaths) + revs, err = GetLastCommitForPaths(ctx, c, treePath, entryPaths) } if err != nil { return nil, nil, err @@ -173,7 +175,7 @@ func getLastCommitForPathsByCache(commitID, treePath string, paths []string, cac } // GetLastCommitForPaths returns last commit information -func GetLastCommitForPaths(c cgobject.CommitNode, treePath string, paths []string) (map[string]*object.Commit, error) { +func GetLastCommitForPaths(ctx context.Context, c cgobject.CommitNode, treePath string, paths []string) (map[string]*object.Commit, error) { // We do a tree traversal with nodes sorted by commit time heap := binaryheap.NewWith(func(a, b interface{}) int { if a.(*commitAndPaths).commit.CommitTime().Before(b.(*commitAndPaths).commit.CommitTime()) { @@ -192,6 +194,11 @@ func GetLastCommitForPaths(c cgobject.CommitNode, treePath string, paths []strin heap.Push(&commitAndPaths{c, paths, initialHashes}) for { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } cIn, ok := heap.Pop() if !ok { break diff --git a/modules/git/commit_info_nogogit.go b/modules/git/commit_info_nogogit.go index ac0c7cff5..f57355d16 100644 --- a/modules/git/commit_info_nogogit.go +++ b/modules/git/commit_info_nogogit.go @@ -2,23 +2,23 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( - "bufio" - "bytes" + "context" "fmt" "io" - "math" "path" "sort" - "strings" + + "code.gitea.io/gitea/modules/log" ) // GetCommitsInfo gets information of all commits that are corresponding to these entries -func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache *LastCommitCache) ([]CommitInfo, *Commit, error) { +func (tes Entries) GetCommitsInfo(ctx context.Context, commit *Commit, treePath string, cache *LastCommitCache) ([]CommitInfo, *Commit, error) { entryPaths := make([]string, len(tes)+1) // Get the commit for the treePath itself entryPaths[0] = "" @@ -31,32 +31,27 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache *LastCo var revs map[string]*Commit if cache != nil { var unHitPaths []string - revs, unHitPaths, err = getLastCommitForPathsByCache(commit.ID.String(), treePath, entryPaths, cache) + revs, unHitPaths, err = getLastCommitForPathsByCache(ctx, commit.ID.String(), treePath, entryPaths, cache) if err != nil { return nil, nil, err } if len(unHitPaths) > 0 { sort.Strings(unHitPaths) - commits, err := GetLastCommitForPaths(commit, treePath, unHitPaths) + commits, err := GetLastCommitForPaths(ctx, commit, treePath, unHitPaths) if err != nil { return nil, nil, err } - for i, found := range commits { - if err := cache.Put(commit.ID.String(), path.Join(treePath, unHitPaths[i]), found.ID.String()); err != nil { + for pth, found := range commits { + if err := cache.Put(commit.ID.String(), path.Join(treePath, pth), found.ID.String()); err != nil { return nil, nil, err } - revs[unHitPaths[i]] = found + revs[pth] = found } } } else { sort.Strings(entryPaths) - revs = map[string]*Commit{} - var foundCommits []*Commit - foundCommits, err = GetLastCommitForPaths(commit, treePath, entryPaths) - for i, found := range foundCommits { - revs[entryPaths[i]] = found - } + revs, err = GetLastCommitForPaths(ctx, commit, treePath, entryPaths) } if err != nil { return nil, nil, err @@ -85,6 +80,8 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache *LastCo subModuleFile := NewSubModuleFile(entryCommit, subModuleURL, entry.ID.String()) commitsInfo[i].SubModuleFile = subModuleFile } + } else { + log.Debug("missing commit for %s", entry.Name()) } } @@ -101,11 +98,14 @@ func (tes Entries) GetCommitsInfo(commit *Commit, treePath string, cache *LastCo return commitsInfo, treeCommit, nil } -func getLastCommitForPathsByCache(commitID, treePath string, paths []string, cache *LastCommitCache) (map[string]*Commit, []string, error) { +func getLastCommitForPathsByCache(ctx context.Context, commitID, treePath string, paths []string, cache *LastCommitCache) (map[string]*Commit, []string, error) { + wr, rd, cancel := cache.repo.CatFileBatch() + defer cancel() + var unHitEntryPaths []string var results = make(map[string]*Commit) for _, p := range paths { - lastCommit, err := cache.Get(commitID, path.Join(treePath, p)) + lastCommit, err := cache.Get(commitID, path.Join(treePath, p), wr, rd) if err != nil { return nil, nil, err } @@ -121,226 +121,24 @@ func getLastCommitForPathsByCache(commitID, treePath string, paths []string, cac } // GetLastCommitForPaths returns last commit information -func GetLastCommitForPaths(commit *Commit, treePath string, paths []string) ([]*Commit, error) { +func GetLastCommitForPaths(ctx context.Context, commit *Commit, treePath string, paths []string) (map[string]*Commit, error) { // We read backwards from the commit to obtain all of the commits - - // We'll do this by using rev-list to provide us with parent commits in order - revListReader, revListWriter := io.Pipe() - defer func() { - _ = revListWriter.Close() - _ = revListReader.Close() - }() - - go func() { - stderr := strings.Builder{} - err := NewCommand("rev-list", "--format=%T", commit.ID.String()).RunInDirPipeline(commit.repo.Path, revListWriter, &stderr) - if err != nil { - _ = revListWriter.CloseWithError(ConcatenateError(err, (&stderr).String())) - } else { - _ = revListWriter.Close() - } - }() - - // We feed the commits in order into cat-file --batch, followed by their trees and sub trees as necessary. - // so let's create a batch stdin and stdout - batchStdinReader, batchStdinWriter := io.Pipe() - batchStdoutReader, batchStdoutWriter := io.Pipe() - defer func() { - _ = batchStdinReader.Close() - _ = batchStdinWriter.Close() - _ = batchStdoutReader.Close() - _ = batchStdoutWriter.Close() - }() - - go func() { - stderr := strings.Builder{} - err := NewCommand("cat-file", "--batch").RunInDirFullPipeline(commit.repo.Path, batchStdoutWriter, &stderr, batchStdinReader) - if err != nil { - _ = revListWriter.CloseWithError(ConcatenateError(err, (&stderr).String())) - } else { - _ = revListWriter.Close() - } - }() - - // For simplicities sake we'll us a buffered reader - batchReader := bufio.NewReader(batchStdoutReader) - - mapsize := 4096 - if len(paths) > mapsize { - mapsize = len(paths) + revs, err := WalkGitLog(ctx, commit.repo, commit, treePath, paths...) + if err != nil { + return nil, err } - path2idx := make(map[string]int, mapsize) - for i, path := range paths { - path2idx[path] = i - } + batchStdinWriter, batchReader, cancel := commit.repo.CatFileBatch() + defer cancel() - fnameBuf := make([]byte, 4096) - modeBuf := make([]byte, 40) - - allShaBuf := make([]byte, (len(paths)+1)*20) - shaBuf := make([]byte, 20) - tmpTreeID := make([]byte, 40) - - // commits is the returnable commits matching the paths provided - commits := make([]string, len(paths)) - // ids are the blob/tree ids for the paths - ids := make([][]byte, len(paths)) - - // We'll use a scanner for the revList because it's simpler than a bufio.Reader - scan := bufio.NewScanner(revListReader) -revListLoop: - for scan.Scan() { - // Get the next parent commit ID - commitID := scan.Text() - if !scan.Scan() { - break revListLoop - } - commitID = commitID[7:] - rootTreeID := scan.Text() - - // push the tree to the cat-file --batch process - _, err := batchStdinWriter.Write([]byte(rootTreeID + "\n")) - if err != nil { - return nil, err - } - - currentPath := "" - - // OK if the target tree path is "" and the "" is in the paths just set this now - if treePath == "" && paths[0] == "" { - // If this is the first time we see this set the id appropriate for this paths to this tree and set the last commit to curCommit - if len(ids[0]) == 0 { - ids[0] = []byte(rootTreeID) - commits[0] = string(commitID) - } else if bytes.Equal(ids[0], []byte(rootTreeID)) { - commits[0] = string(commitID) - } - } - - treeReadingLoop: - for { - _, _, size, err := ReadBatchLine(batchReader) - if err != nil { - return nil, err - } - - // Handle trees - - // n is counter for file position in the tree file - var n int64 - - // Two options: currentPath is the targetTreepath - if treePath == currentPath { - // We are in the right directory - // Parse each tree line in turn. (don't care about mode here.) - for n < size { - fname, sha, count, err := ParseTreeLineSkipMode(batchReader, fnameBuf, shaBuf) - shaBuf = sha - if err != nil { - return nil, err - } - n += int64(count) - idx, ok := path2idx[string(fname)] - if ok { - // Now if this is the first time round set the initial Blob(ish) SHA ID and the commit - if len(ids[idx]) == 0 { - copy(allShaBuf[20*(idx+1):20*(idx+2)], shaBuf) - ids[idx] = allShaBuf[20*(idx+1) : 20*(idx+2)] - commits[idx] = string(commitID) - } else if bytes.Equal(ids[idx], shaBuf) { - commits[idx] = string(commitID) - } - } - // FIXME: is there any order to the way strings are emitted from cat-file? - // if there is - then we could skip once we've passed all of our data - } - break treeReadingLoop - } - - var treeID []byte - - // We're in the wrong directory - // Find target directory in this directory - idx := len(currentPath) - if idx > 0 { - idx++ - } - target := strings.SplitN(treePath[idx:], "/", 2)[0] - - for n < size { - // Read each tree entry in turn - mode, fname, sha, count, err := ParseTreeLine(batchReader, modeBuf, fnameBuf, shaBuf) - if err != nil { - return nil, err - } - n += int64(count) - - // if we have found the target directory - if bytes.Equal(fname, []byte(target)) && bytes.Equal(mode, []byte("40000")) { - copy(tmpTreeID, sha) - treeID = tmpTreeID - break - } - } - - if n < size { - // Discard any remaining entries in the current tree - discard := size - n - for discard > math.MaxInt32 { - _, err := batchReader.Discard(math.MaxInt32) - if err != nil { - return nil, err - } - discard -= math.MaxInt32 - } - _, err := batchReader.Discard(int(discard)) - if err != nil { - return nil, err - } - } - - // if we haven't found a treeID for the target directory our search is over - if len(treeID) == 0 { - break treeReadingLoop - } - - // add the target to the current path - if idx > 0 { - currentPath += "/" - } - currentPath += target - - // if we've now found the current path check its sha id and commit status - if treePath == currentPath && paths[0] == "" { - if len(ids[0]) == 0 { - copy(allShaBuf[0:20], treeID) - ids[0] = allShaBuf[0:20] - commits[0] = string(commitID) - } else if bytes.Equal(ids[0], treeID) { - commits[0] = string(commitID) - } - } - treeID = to40ByteSHA(treeID) - _, err = batchStdinWriter.Write(treeID) - if err != nil { - return nil, err - } - _, err = batchStdinWriter.Write([]byte("\n")) - if err != nil { - return nil, err - } - } - } - - commitsMap := make(map[string]*Commit, len(commits)) + commitsMap := map[string]*Commit{} commitsMap[commit.ID.String()] = commit - commitCommits := make([]*Commit, len(commits)) - for i, commitID := range commits { + commitCommits := map[string]*Commit{} + for path, commitID := range revs { c, ok := commitsMap[commitID] if ok { - commitCommits[i] = c + commitCommits[path] = c continue } @@ -363,8 +161,11 @@ revListLoop: if err != nil { return nil, err } - commitCommits[i] = c + if _, err := batchReader.Discard(1); err != nil { + return nil, err + } + commitCommits[path] = c } - return commitCommits, scan.Err() + return commitCommits, nil } diff --git a/modules/git/commit_info_test.go b/modules/git/commit_info_test.go index 3966419bc..0608801f9 100644 --- a/modules/git/commit_info_test.go +++ b/modules/git/commit_info_test.go @@ -5,6 +5,7 @@ package git import ( + "context" "os" "path/filepath" "testing" @@ -69,7 +70,7 @@ func testGetCommitsInfo(t *testing.T, repo1 *Repository) { assert.NoError(t, err) entries, err := tree.ListEntries() assert.NoError(t, err) - commitsInfo, treeCommit, err := entries.GetCommitsInfo(commit, testCase.Path, nil) + commitsInfo, treeCommit, err := entries.GetCommitsInfo(context.Background(), commit, testCase.Path, nil) assert.NoError(t, err) if err != nil { t.FailNow() @@ -136,7 +137,7 @@ func BenchmarkEntries_GetCommitsInfo(b *testing.B) { b.ResetTimer() b.Run(benchmark.name, func(b *testing.B) { for i := 0; i < b.N; i++ { - _, _, err := entries.GetCommitsInfo(commit, "", nil) + _, _, err := entries.GetCommitsInfo(context.Background(), commit, "", nil) if err != nil { b.Fatal(err) } diff --git a/modules/git/commit_reader.go b/modules/git/commit_reader.go index a4d15b6ba..3c1f6f5ff 100644 --- a/modules/git/commit_reader.go +++ b/modules/git/commit_reader.go @@ -17,7 +17,9 @@ import ( // If used as part of a cat-file --batch stream you need to limit the reader to the correct size func CommitFromReader(gitRepo *Repository, sha SHA1, reader io.Reader) (*Commit, error) { commit := &Commit{ - ID: sha, + ID: sha, + Author: &Signature{}, + Committer: &Signature{}, } payloadSB := new(strings.Builder) diff --git a/modules/git/commit_test.go b/modules/git/commit_test.go index 9b5fc8f66..57132c00d 100644 --- a/modules/git/commit_test.go +++ b/modules/git/commit_test.go @@ -105,3 +105,134 @@ empty commit`, commitFromReader.Signature.Payload) commitFromReader.Signature.Payload += "\n\n" assert.EqualValues(t, commitFromReader, commitFromReader2) } + +func TestHasPreviousCommit(t *testing.T) { + bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") + + repo, err := OpenRepository(bareRepo1Path) + assert.NoError(t, err) + + commit, err := repo.GetCommit("8006ff9adbf0cb94da7dad9e537e53817f9fa5c0") + assert.NoError(t, err) + + parentSHA := MustIDFromString("8d92fc957a4d7cfd98bc375f0b7bb189a0d6c9f2") + notParentSHA := MustIDFromString("2839944139e0de9737a044f78b0e4b40d989a9e3") + + haz, err := commit.HasPreviousCommit(parentSHA) + assert.NoError(t, err) + assert.True(t, haz) + + hazNot, err := commit.HasPreviousCommit(notParentSHA) + assert.NoError(t, err) + assert.False(t, hazNot) + + selfNot, err := commit.HasPreviousCommit(commit.ID) + assert.NoError(t, err) + assert.False(t, selfNot) +} + +func TestParseCommitFileStatus(t *testing.T) { + type testcase struct { + output string + added []string + removed []string + modified []string + } + + kases := []testcase{ + { + // Merge commit + output: "MM\x00options/locale/locale_en-US.ini\x00", + modified: []string{ + "options/locale/locale_en-US.ini", + }, + added: []string{}, + removed: []string{}, + }, + { + // Spaces commit + output: "D\x00b\x00D\x00b b/b\x00A\x00b b/b b/b b/b\x00A\x00b b/b b/b b/b b/b\x00", + removed: []string{ + "b", + "b b/b", + }, + modified: []string{}, + added: []string{ + "b b/b b/b b/b", + "b b/b b/b b/b b/b", + }, + }, + { + // larger commit + output: "M\x00go.mod\x00M\x00go.sum\x00M\x00modules/ssh/ssh.go\x00M\x00vendor/github.com/gliderlabs/ssh/circle.yml\x00M\x00vendor/github.com/gliderlabs/ssh/context.go\x00A\x00vendor/github.com/gliderlabs/ssh/go.mod\x00A\x00vendor/github.com/gliderlabs/ssh/go.sum\x00M\x00vendor/github.com/gliderlabs/ssh/server.go\x00M\x00vendor/github.com/gliderlabs/ssh/session.go\x00M\x00vendor/github.com/gliderlabs/ssh/ssh.go\x00M\x00vendor/golang.org/x/sys/unix/mkerrors.sh\x00M\x00vendor/golang.org/x/sys/unix/syscall_darwin.go\x00M\x00vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go\x00M\x00vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go\x00M\x00vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go\x00M\x00vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go\x00M\x00vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go\x00M\x00vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go\x00M\x00vendor/golang.org/x/sys/unix/zerrors_linux.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go\x00M\x00vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go\x00M\x00vendor/modules.txt\x00", + modified: []string{ + "go.mod", + "go.sum", + "modules/ssh/ssh.go", + "vendor/github.com/gliderlabs/ssh/circle.yml", + "vendor/github.com/gliderlabs/ssh/context.go", + "vendor/github.com/gliderlabs/ssh/server.go", + "vendor/github.com/gliderlabs/ssh/session.go", + "vendor/github.com/gliderlabs/ssh/ssh.go", + "vendor/golang.org/x/sys/unix/mkerrors.sh", + "vendor/golang.org/x/sys/unix/syscall_darwin.go", + "vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go", + "vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go", + "vendor/golang.org/x/sys/unix/zerrors_freebsd_386.go", + "vendor/golang.org/x/sys/unix/zerrors_freebsd_amd64.go", + "vendor/golang.org/x/sys/unix/zerrors_freebsd_arm.go", + "vendor/golang.org/x/sys/unix/zerrors_freebsd_arm64.go", + "vendor/golang.org/x/sys/unix/zerrors_linux.go", + "vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go", + "vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go", + "vendor/golang.org/x/sys/unix/ztypes_dragonfly_amd64.go", + "vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go", + "vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go", + "vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go", + "vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go", + "vendor/golang.org/x/sys/unix/ztypes_netbsd_386.go", + "vendor/golang.org/x/sys/unix/ztypes_netbsd_amd64.go", + "vendor/golang.org/x/sys/unix/ztypes_netbsd_arm.go", + "vendor/golang.org/x/sys/unix/ztypes_netbsd_arm64.go", + "vendor/modules.txt", + }, + added: []string{ + "vendor/github.com/gliderlabs/ssh/go.mod", + "vendor/github.com/gliderlabs/ssh/go.sum", + }, + removed: []string{}, + }, + { + // git 1.7.2 adds an unnecessary \x00 on merge commit + output: "\x00MM\x00options/locale/locale_en-US.ini\x00", + modified: []string{ + "options/locale/locale_en-US.ini", + }, + added: []string{}, + removed: []string{}, + }, + { + // git 1.7.2 adds an unnecessary \n on normal commit + output: "\nD\x00b\x00D\x00b b/b\x00A\x00b b/b b/b b/b\x00A\x00b b/b b/b b/b b/b\x00", + removed: []string{ + "b", + "b b/b", + }, + modified: []string{}, + added: []string{ + "b b/b b/b b/b", + "b b/b b/b b/b b/b", + }, + }, + } + + for _, kase := range kases { + fileStatus := NewCommitFileStatus() + parseCommitFileStatus(fileStatus, strings.NewReader(kase.output)) + + assert.Equal(t, kase.added, fileStatus.Added) + assert.Equal(t, kase.removed, fileStatus.Removed) + assert.Equal(t, kase.modified, fileStatus.Modified) + } + +} diff --git a/modules/git/diff.go b/modules/git/diff.go index 6f876e496..20f25c1be 100644 --- a/modules/git/diff.go +++ b/modules/git/diff.go @@ -15,6 +15,7 @@ import ( "strconv" "strings" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/process" ) @@ -47,7 +48,7 @@ func GetRawDiffForFile(repoPath, startCommit, endCommit string, diffType RawDiff func GetRepoRawDiffForFile(repo *Repository, startCommit, endCommit string, diffType RawDiffType, file string, writer io.Writer) error { commit, err := repo.GetCommit(endCommit) if err != nil { - return fmt.Errorf("GetCommit: %v", err) + return err } fileArgs := make([]string, 0) if len(file) > 0 { @@ -113,7 +114,7 @@ func ParseDiffHunkString(diffhunk string) (leftLine, leftHunk, rightLine, righHu righHunk, _ = strconv.Atoi(rightRange[1]) } } else { - log("Parse line number failed: %v", diffhunk) + log.Debug("Parse line number failed: %v", diffhunk) rightLine = leftLine righHunk = leftHunk } @@ -125,30 +126,39 @@ var hunkRegex = regexp.MustCompile(`^@@ -(?P[0-9]+)(,(?P[0-9]+ const cmdDiffHead = "diff --git " -func isHeader(lof string) bool { - return strings.HasPrefix(lof, cmdDiffHead) || strings.HasPrefix(lof, "---") || strings.HasPrefix(lof, "+++") +func isHeader(lof string, inHunk bool) bool { + return strings.HasPrefix(lof, cmdDiffHead) || (!inHunk && (strings.HasPrefix(lof, "---") || strings.HasPrefix(lof, "+++"))) } // CutDiffAroundLine cuts a diff of a file in way that only the given line + numberOfLine above it will be shown // it also recalculates hunks and adds the appropriate headers to the new diff. // Warning: Only one-file diffs are allowed. -func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLine int) string { +func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLine int) (string, error) { if line == 0 || numbersOfLine == 0 { // no line or num of lines => no diff - return "" + return "", nil } + scanner := bufio.NewScanner(originalDiff) hunk := make([]string, 0) + // begin is the start of the hunk containing searched line // end is the end of the hunk ... // currentLine is the line number on the side of the searched line (differentiated by old) // otherLine is the line number on the opposite side of the searched line (differentiated by old) var begin, end, currentLine, otherLine int64 var headerLines int + + inHunk := false + for scanner.Scan() { lof := scanner.Text() // Add header to enable parsing - if isHeader(lof) { + + if isHeader(lof, inHunk) { + if strings.HasPrefix(lof, cmdDiffHead) { + inHunk = false + } hunk = append(hunk, lof) headerLines++ } @@ -157,6 +167,7 @@ func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLi } // Detect "hunk" with contains commented lof if strings.HasPrefix(lof, "@@") { + inHunk = true // Already got our hunk. End of hunk detected! if len(hunk) > headerLines { break @@ -213,15 +224,19 @@ func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLi } } } + err := scanner.Err() + if err != nil { + return "", err + } // No hunk found if currentLine == 0 { - return "" + return "", nil } // headerLines + hunkLine (1) = totalNonCodeLines if len(hunk)-headerLines-1 <= numbersOfLine { // No need to cut the hunk => return existing hunk - return strings.Join(hunk, "\n") + return strings.Join(hunk, "\n"), nil } var oldBegin, oldNumOfLines, newBegin, newNumOfLines int64 if old { @@ -256,5 +271,5 @@ func CutDiffAroundLine(originalDiff io.Reader, line int64, old bool, numbersOfLi // construct the new hunk header newHunk[headerLines] = fmt.Sprintf("@@ -%d,%d +%d,%d @@", oldBegin, oldNumOfLines, newBegin, newNumOfLines) - return strings.Join(newHunk, "\n") + return strings.Join(newHunk, "\n"), nil } diff --git a/modules/git/diff_test.go b/modules/git/diff_test.go index 4258abfe5..363ff0b97 100644 --- a/modules/git/diff_test.go +++ b/modules/git/diff_test.go @@ -23,8 +23,28 @@ const exampleDiff = `diff --git a/README.md b/README.md + cut off + cut off` +const breakingDiff = `diff --git a/aaa.sql b/aaa.sql +index d8e4c92..19dc8ad 100644 +--- a/aaa.sql ++++ b/aaa.sql +@@ -1,9 +1,10 @@ + --some comment +--- some comment 5 ++--some coment 2 ++-- some comment 3 + create or replace procedure test(p1 varchar2) + is + begin +---new comment + dbms_output.put_line(p1); ++--some other comment + end; + / +` + func TestCutDiffAroundLine(t *testing.T) { - result := CutDiffAroundLine(strings.NewReader(exampleDiff), 4, false, 3) + result, err := CutDiffAroundLine(strings.NewReader(exampleDiff), 4, false, 3) + assert.NoError(t, err) resultByLine := strings.Split(result, "\n") assert.Len(t, resultByLine, 7) // Check if headers got transferred @@ -37,18 +57,50 @@ func TestCutDiffAroundLine(t *testing.T) { assert.Equal(t, "+ Build Status", resultByLine[4]) // Must be same result as before since old line 3 == new line 5 - newResult := CutDiffAroundLine(strings.NewReader(exampleDiff), 3, true, 3) + newResult, err := CutDiffAroundLine(strings.NewReader(exampleDiff), 3, true, 3) + assert.NoError(t, err) assert.Equal(t, result, newResult, "Must be same result as before since old line 3 == new line 5") - newResult = CutDiffAroundLine(strings.NewReader(exampleDiff), 6, false, 300) + newResult, err = CutDiffAroundLine(strings.NewReader(exampleDiff), 6, false, 300) + assert.NoError(t, err) assert.Equal(t, exampleDiff, newResult) - emptyResult := CutDiffAroundLine(strings.NewReader(exampleDiff), 6, false, 0) + emptyResult, err := CutDiffAroundLine(strings.NewReader(exampleDiff), 6, false, 0) + assert.NoError(t, err) assert.Empty(t, emptyResult) // Line is out of scope - emptyResult = CutDiffAroundLine(strings.NewReader(exampleDiff), 434, false, 0) + emptyResult, err = CutDiffAroundLine(strings.NewReader(exampleDiff), 434, false, 0) + assert.NoError(t, err) assert.Empty(t, emptyResult) + + // Handle minus diffs properly + minusDiff, err := CutDiffAroundLine(strings.NewReader(breakingDiff), 2, false, 4) + assert.NoError(t, err) + + expected := `diff --git a/aaa.sql b/aaa.sql +--- a/aaa.sql ++++ b/aaa.sql +@@ -1,9 +1,10 @@ + --some comment +--- some comment 5 ++--some coment 2` + assert.Equal(t, expected, minusDiff) + + // Handle minus diffs properly + minusDiff, err = CutDiffAroundLine(strings.NewReader(breakingDiff), 3, false, 4) + assert.NoError(t, err) + + expected = `diff --git a/aaa.sql b/aaa.sql +--- a/aaa.sql ++++ b/aaa.sql +@@ -1,9 +1,10 @@ + --some comment +--- some comment 5 ++--some coment 2 ++-- some comment 3` + + assert.Equal(t, expected, minusDiff) } func BenchmarkCutDiffAroundLine(b *testing.B) { @@ -69,7 +121,7 @@ func ExampleCutDiffAroundLine() { Docker Pulls + cut off + cut off` - result := CutDiffAroundLine(strings.NewReader(diff), 4, false, 3) + result, _ := CutDiffAroundLine(strings.NewReader(diff), 4, false, 3) println(result) } diff --git a/modules/git/error.go b/modules/git/error.go index 85a938a7d..387dd724e 100644 --- a/modules/git/error.go +++ b/modules/git/error.go @@ -159,3 +159,20 @@ func (err *ErrPushRejected) GenerateMessage() { } err.Message = strings.TrimSpace(messageBuilder.String()) } + +// ErrMoreThanOne represents an error if pull request fails when there are more than one sources (branch, tag) with the same name +type ErrMoreThanOne struct { + StdOut string + StdErr string + Err error +} + +// IsErrMoreThanOne checks if an error is a ErrMoreThanOne +func IsErrMoreThanOne(err error) bool { + _, ok := err.(*ErrMoreThanOne) + return ok +} + +func (err *ErrMoreThanOne) Error() string { + return fmt.Sprintf("ErrMoreThanOne Error: %v: %s\n%s", err.Err, err.StdErr, err.StdOut) +} diff --git a/modules/git/git.go b/modules/git/git.go index 6b15138a5..7ab11736e 100644 --- a/modules/git/git.go +++ b/modules/git/git.go @@ -14,14 +14,12 @@ import ( "time" "code.gitea.io/gitea/modules/process" + "code.gitea.io/gitea/modules/setting" "github.com/hashicorp/go-version" ) var ( - // Debug enables verbose logging on everything. - // This should be false in case Gogs starts in SSH mode. - Debug = false // Prefix the log prefix Prefix = "[git-module] " // GitVersionRequired is the minimum Git version required @@ -39,21 +37,11 @@ var ( // will be checked on Init goVersionLessThan115 = true + + // SupportProcReceive version >= 2.29.0 + SupportProcReceive bool ) -func log(format string, args ...interface{}) { - if !Debug { - return - } - - fmt.Print(Prefix) - if len(args) == 0 { - fmt.Println(format) - } else { - fmt.Printf(format+"\n", args...) - } -} - // LocalVersion returns current Git version from shell. func LocalVersion() (*version.Version, error) { if err := LoadGitVersion(); err != nil { @@ -122,10 +110,42 @@ func SetExecutablePath(path string) error { return nil } +// VersionInfo returns git version information +func VersionInfo() string { + var format = "Git Version: %s" + var args = []interface{}{gitVersion.Original()} + // Since git wire protocol has been released from git v2.18 + if setting.Git.EnableAutoGitWireProtocol && CheckGitVersionAtLeast("2.18") == nil { + format += ", Wire Protocol %s Enabled" + args = append(args, "Version 2") // for focus color + } + + return fmt.Sprintf(format, args...) +} + // Init initializes git module func Init(ctx context.Context) error { DefaultContext = ctx + defaultCommandExecutionTimeout = time.Duration(setting.Git.Timeout.Default) * time.Second + + if err := SetExecutablePath(setting.Git.Path); err != nil { + return err + } + + // force cleanup args + GlobalCommandArgs = []string{} + + if CheckGitVersionAtLeast("2.9") == nil { + // Explicitly disable credential helper, otherwise Git credentials might leak + GlobalCommandArgs = append(GlobalCommandArgs, "-c", "credential.helper=") + } + + // Since git wire protocol has been released from git v2.18 + if setting.Git.EnableAutoGitWireProtocol && CheckGitVersionAtLeast("2.18") == nil { + GlobalCommandArgs = append(GlobalCommandArgs, "-c", "protocol.version=2") + } + // Save current git version on init to gitVersion otherwise it would require an RWMutex if err := LoadGitVersion(); err != nil { return err @@ -166,6 +186,19 @@ func Init(ctx context.Context) error { } } + if CheckGitVersionAtLeast("2.29") == nil { + // set support for AGit flow + if err := checkAndAddConfig("receive.procReceiveRefs", "refs/for"); err != nil { + return err + } + SupportProcReceive = true + } else { + if err := checkAndRemoveConfig("receive.procReceiveRefs", "refs/for"); err != nil { + return err + } + SupportProcReceive = false + } + if runtime.GOOS == "windows" { if err := checkAndSetConfig("core.longpaths", "true", true); err != nil { return err @@ -215,6 +248,51 @@ func checkAndSetConfig(key, defaultValue string, forceToDefault bool) error { return nil } +func checkAndAddConfig(key, value string) error { + _, stderr, err := process.GetManager().Exec("git.Init(get setting)", GitExecutable, "config", "--get", key, value) + if err != nil { + perr, ok := err.(*process.Error) + if !ok { + return fmt.Errorf("Failed to get git %s(%v) errType %T: %s", key, err, err, stderr) + } + eerr, ok := perr.Err.(*exec.ExitError) + if !ok || eerr.ExitCode() != 1 { + return fmt.Errorf("Failed to get git %s(%v) errType %T: %s", key, err, err, stderr) + } + if eerr.ExitCode() == 1 { + if _, stderr, err = process.GetManager().Exec(fmt.Sprintf("git.Init(set %s)", key), "git", "config", "--global", "--add", key, value); err != nil { + return fmt.Errorf("Failed to set git %s(%s): %s", key, err, stderr) + } + return nil + } + } + + return nil +} + +func checkAndRemoveConfig(key, value string) error { + _, stderr, err := process.GetManager().Exec("git.Init(get setting)", GitExecutable, "config", "--get", key, value) + if err != nil { + perr, ok := err.(*process.Error) + if !ok { + return fmt.Errorf("Failed to get git %s(%v) errType %T: %s", key, err, err, stderr) + } + eerr, ok := perr.Err.(*exec.ExitError) + if !ok || eerr.ExitCode() != 1 { + return fmt.Errorf("Failed to get git %s(%v) errType %T: %s", key, err, err, stderr) + } + if eerr.ExitCode() == 1 { + return nil + } + } + + if _, stderr, err = process.GetManager().Exec(fmt.Sprintf("git.Init(set %s)", key), "git", "config", "--global", "--unset-all", key, value); err != nil { + return fmt.Errorf("Failed to set git %s(%s): %s", key, err, stderr) + } + + return nil +} + // Fsck verifies the connectivity and validity of the objects in the database func Fsck(ctx context.Context, repoPath string, timeout time.Duration, args ...string) error { // Make sure timeout makes sense. diff --git a/modules/git/git_test.go b/modules/git/git_test.go index 27951d639..c62a55bad 100644 --- a/modules/git/git_test.go +++ b/modules/git/git_test.go @@ -9,6 +9,8 @@ import ( "fmt" "os" "testing" + + "code.gitea.io/gitea/modules/log" ) func fatalTestError(fmtStr string, args ...interface{}) { @@ -17,6 +19,8 @@ func fatalTestError(fmtStr string, args ...interface{}) { } func TestMain(m *testing.M) { + _ = log.NewLogger(1000, "console", "console", `{"level":"trace","stacktracelevel":"NONE","stderr":true}`) + if err := Init(context.Background()); err != nil { fatalTestError("Init failed: %v", err) } diff --git a/modules/git/hook.go b/modules/git/hook.go index c23fbf8aa..7007d23be 100644 --- a/modules/git/hook.go +++ b/modules/git/hook.go @@ -1,4 +1,5 @@ // Copyright 2015 The Gogs Authors. All rights reserved. +// Copyright 2021 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. @@ -12,6 +13,7 @@ import ( "path/filepath" "strings" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/util" ) @@ -126,11 +128,11 @@ const ( // SetUpdateHook writes given content to update hook of the repository. func SetUpdateHook(repoPath, content string) (err error) { - log("Setting update hook: %s", repoPath) + log.Debug("Setting update hook: %s", repoPath) hookPath := path.Join(repoPath, HookPathUpdate) isExist, err := util.IsExist(hookPath) if err != nil { - log("Unable to check if %s exists. Error: %v", hookPath, err) + log.Debug("Unable to check if %s exists. Error: %v", hookPath, err) return err } if isExist { diff --git a/modules/git/last_commit_cache.go b/modules/git/last_commit_cache.go index 7cca60122..e2d296641 100644 --- a/modules/git/last_commit_cache.go +++ b/modules/git/last_commit_cache.go @@ -7,6 +7,8 @@ package git import ( "crypto/sha256" "fmt" + + "code.gitea.io/gitea/modules/log" ) // Cache represents a caching interface @@ -24,6 +26,6 @@ func (c *LastCommitCache) getCacheKey(repoPath, ref, entryPath string) string { // Put put the last commit id with commit and entry path func (c *LastCommitCache) Put(ref, entryPath, commitID string) error { - log("LastCommitCache save: [%s:%s:%s]", ref, entryPath, commitID) - return c.cache.Put(c.getCacheKey(c.repoPath, ref, entryPath), commitID, c.ttl) + log.Debug("LastCommitCache save: [%s:%s:%s]", ref, entryPath, commitID) + return c.cache.Put(c.getCacheKey(c.repoPath, ref, entryPath), commitID, c.ttl()) } diff --git a/modules/git/last_commit_cache_gogit.go b/modules/git/last_commit_cache_gogit.go index 76c97a4cc..fb09af6f2 100644 --- a/modules/git/last_commit_cache_gogit.go +++ b/modules/git/last_commit_cache_gogit.go @@ -2,13 +2,17 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git import ( + "context" "path" + "code.gitea.io/gitea/modules/log" + "github.com/go-git/go-git/v5/plumbing/object" cgobject "github.com/go-git/go-git/v5/plumbing/object/commitgraph" ) @@ -16,14 +20,14 @@ import ( // LastCommitCache represents a cache to store last commit type LastCommitCache struct { repoPath string - ttl int64 + ttl func() int64 repo *Repository commitCache map[string]*object.Commit cache Cache } // NewLastCommitCache creates a new last commit cache for repo -func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl int64, cache Cache) *LastCommitCache { +func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl func() int64, cache Cache) *LastCommitCache { if cache == nil { return nil } @@ -40,9 +44,9 @@ func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl int64, cache C func (c *LastCommitCache) Get(ref, entryPath string) (interface{}, error) { v := c.cache.Get(c.getCacheKey(c.repoPath, ref, entryPath)) if vs, ok := v.(string); ok { - log("LastCommitCache hit level 1: [%s:%s:%s]", ref, entryPath, vs) + log.Debug("LastCommitCache hit level 1: [%s:%s:%s]", ref, entryPath, vs) if commit, ok := c.commitCache[vs]; ok { - log("LastCommitCache hit level 2: [%s:%s:%s]", ref, entryPath, vs) + log.Debug("LastCommitCache hit level 2: [%s:%s:%s]", ref, entryPath, vs) return commit, nil } id, err := c.repo.ConvertToSHA1(vs) @@ -60,7 +64,7 @@ func (c *LastCommitCache) Get(ref, entryPath string) (interface{}, error) { } // CacheCommit will cache the commit from the gitRepository -func (c *LastCommitCache) CacheCommit(commit *Commit) error { +func (c *LastCommitCache) CacheCommit(ctx context.Context, commit *Commit) error { commitNodeIndex, _ := commit.repo.CommitNodeIndex() @@ -69,10 +73,10 @@ func (c *LastCommitCache) CacheCommit(commit *Commit) error { return err } - return c.recursiveCache(index, &commit.Tree, "", 1) + return c.recursiveCache(ctx, index, &commit.Tree, "", 1) } -func (c *LastCommitCache) recursiveCache(index cgobject.CommitNode, tree *Tree, treePath string, level int) error { +func (c *LastCommitCache) recursiveCache(ctx context.Context, index cgobject.CommitNode, tree *Tree, treePath string, level int) error { if level == 0 { return nil } @@ -89,7 +93,7 @@ func (c *LastCommitCache) recursiveCache(index cgobject.CommitNode, tree *Tree, entryMap[entry.Name()] = entry } - commits, err := GetLastCommitForPaths(index, treePath, entryPaths) + commits, err := GetLastCommitForPaths(ctx, index, treePath, entryPaths) if err != nil { return err } @@ -103,7 +107,7 @@ func (c *LastCommitCache) recursiveCache(index cgobject.CommitNode, tree *Tree, if err != nil { return err } - if err := c.recursiveCache(index, subTree, entry, level-1); err != nil { + if err := c.recursiveCache(ctx, index, subTree, entry, level-1); err != nil { return err } } diff --git a/modules/git/last_commit_cache_nogogit.go b/modules/git/last_commit_cache_nogogit.go index b9c50b5cf..f71e7350a 100644 --- a/modules/git/last_commit_cache_nogogit.go +++ b/modules/git/last_commit_cache_nogogit.go @@ -2,25 +2,30 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( + "bufio" + "context" "path" + + "code.gitea.io/gitea/modules/log" ) // LastCommitCache represents a cache to store last commit type LastCommitCache struct { repoPath string - ttl int64 + ttl func() int64 repo *Repository commitCache map[string]*Commit cache Cache } // NewLastCommitCache creates a new last commit cache for repo -func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl int64, cache Cache) *LastCommitCache { +func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl func() int64, cache Cache) *LastCommitCache { if cache == nil { return nil } @@ -34,19 +39,22 @@ func NewLastCommitCache(repoPath string, gitRepo *Repository, ttl int64, cache C } // Get get the last commit information by commit id and entry path -func (c *LastCommitCache) Get(ref, entryPath string) (interface{}, error) { +func (c *LastCommitCache) Get(ref, entryPath string, wr WriteCloserError, rd *bufio.Reader) (interface{}, error) { v := c.cache.Get(c.getCacheKey(c.repoPath, ref, entryPath)) if vs, ok := v.(string); ok { - log("LastCommitCache hit level 1: [%s:%s:%s]", ref, entryPath, vs) + log.Debug("LastCommitCache hit level 1: [%s:%s:%s]", ref, entryPath, vs) if commit, ok := c.commitCache[vs]; ok { - log("LastCommitCache hit level 2: [%s:%s:%s]", ref, entryPath, vs) + log.Debug("LastCommitCache hit level 2: [%s:%s:%s]", ref, entryPath, vs) return commit, nil } id, err := c.repo.ConvertToSHA1(vs) if err != nil { return nil, err } - commit, err := c.repo.getCommit(id) + if _, err := wr.Write([]byte(vs + "\n")); err != nil { + return nil, err + } + commit, err := c.repo.getCommitFromBatchReader(rd, id) if err != nil { return nil, err } @@ -57,11 +65,11 @@ func (c *LastCommitCache) Get(ref, entryPath string) (interface{}, error) { } // CacheCommit will cache the commit from the gitRepository -func (c *LastCommitCache) CacheCommit(commit *Commit) error { - return c.recursiveCache(commit, &commit.Tree, "", 1) +func (c *LastCommitCache) CacheCommit(ctx context.Context, commit *Commit) error { + return c.recursiveCache(ctx, commit, &commit.Tree, "", 1) } -func (c *LastCommitCache) recursiveCache(commit *Commit, tree *Tree, treePath string, level int) error { +func (c *LastCommitCache) recursiveCache(ctx context.Context, commit *Commit, tree *Tree, treePath string, level int) error { if level == 0 { return nil } @@ -78,22 +86,22 @@ func (c *LastCommitCache) recursiveCache(commit *Commit, tree *Tree, treePath st entryMap[entry.Name()] = entry } - commits, err := GetLastCommitForPaths(commit, treePath, entryPaths) + commits, err := GetLastCommitForPaths(ctx, commit, treePath, entryPaths) if err != nil { return err } - for i, entryCommit := range commits { - entry := entryPaths[i] - if err := c.Put(commit.ID.String(), path.Join(treePath, entryPaths[i]), entryCommit.ID.String()); err != nil { + for entry, entryCommit := range commits { + if err := c.Put(commit.ID.String(), path.Join(treePath, entry), entryCommit.ID.String()); err != nil { return err } - if entryMap[entry].IsDir() { + // entryMap won't contain "" therefore skip this. + if treeEntry := entryMap[entry]; treeEntry != nil && treeEntry.IsDir() { subTree, err := tree.SubTree(entry) if err != nil { return err } - if err := c.recursiveCache(commit, subTree, entry, level-1); err != nil { + if err := c.recursiveCache(ctx, commit, subTree, entry, level-1); err != nil { return err } } diff --git a/modules/git/lfs.go b/modules/git/lfs.go new file mode 100644 index 000000000..79049c982 --- /dev/null +++ b/modules/git/lfs.go @@ -0,0 +1,37 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package git + +import ( + "sync" + + logger "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" +) + +var once sync.Once + +// CheckLFSVersion will check lfs version, if not satisfied, then disable it. +func CheckLFSVersion() { + if setting.LFS.StartServer { + //Disable LFS client hooks if installed for the current OS user + //Needs at least git v2.1.2 + + err := LoadGitVersion() + if err != nil { + logger.Fatal("Error retrieving git version: %v", err) + } + + if CheckGitVersionAtLeast("2.1.2") != nil { + setting.LFS.StartServer = false + logger.Error("LFS server support needs at least Git v2.1.2") + } else { + once.Do(func() { + GlobalCommandArgs = append(GlobalCommandArgs, "-c", "filter.lfs.required=", + "-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=") + }) + } + } +} diff --git a/modules/git/log_name_status.go b/modules/git/log_name_status.go new file mode 100644 index 000000000..00a1859f7 --- /dev/null +++ b/modules/git/log_name_status.go @@ -0,0 +1,401 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package git + +import ( + "bufio" + "bytes" + "context" + "io" + "path" + "sort" + "strings" + + "github.com/djherbis/buffer" + "github.com/djherbis/nio/v3" +) + +// LogNameStatusRepo opens git log --raw in the provided repo and returns a stdin pipe, a stdout reader and cancel function +func LogNameStatusRepo(repository, head, treepath string, paths ...string) (*bufio.Reader, func()) { + // We often want to feed the commits in order into cat-file --batch, followed by their trees and sub trees as necessary. + // so let's create a batch stdin and stdout + stdoutReader, stdoutWriter := nio.Pipe(buffer.New(32 * 1024)) + cancel := func() { + _ = stdoutReader.Close() + _ = stdoutWriter.Close() + } + + args := make([]string, 0, 8+len(paths)) + args = append(args, "log", "--name-status", "-c", "--format=commit%x00%H %P%x00", "--parents", "--no-renames", "-t", "-z", head, "--") + if len(paths) < 70 { + if treepath != "" { + args = append(args, treepath) + for _, pth := range paths { + if pth != "" { + args = append(args, path.Join(treepath, pth)) + } + } + } else { + for _, pth := range paths { + if pth != "" { + args = append(args, pth) + } + } + } + } else if treepath != "" { + args = append(args, treepath) + } + + go func() { + stderr := strings.Builder{} + err := NewCommand(args...).RunInDirFullPipeline(repository, stdoutWriter, &stderr, nil) + if err != nil { + _ = stdoutWriter.CloseWithError(ConcatenateError(err, (&stderr).String())) + } else { + _ = stdoutWriter.Close() + } + }() + + // For simplicities sake we'll us a buffered reader to read from the cat-file --batch + bufReader := bufio.NewReaderSize(stdoutReader, 32*1024) + + return bufReader, cancel +} + +// LogNameStatusRepoParser parses a git log raw output from LogRawRepo +type LogNameStatusRepoParser struct { + treepath string + paths []string + next []byte + buffull bool + rd *bufio.Reader + cancel func() +} + +// NewLogNameStatusRepoParser returns a new parser for a git log raw output +func NewLogNameStatusRepoParser(repository, head, treepath string, paths ...string) *LogNameStatusRepoParser { + rd, cancel := LogNameStatusRepo(repository, head, treepath, paths...) + return &LogNameStatusRepoParser{ + treepath: treepath, + paths: paths, + rd: rd, + cancel: cancel, + } +} + +// LogNameStatusCommitData represents a commit artefact from git log raw +type LogNameStatusCommitData struct { + CommitID string + ParentIDs []string + Paths []bool +} + +// Next returns the next LogStatusCommitData +func (g *LogNameStatusRepoParser) Next(treepath string, paths2ids map[string]int, changed []bool, maxpathlen int) (*LogNameStatusCommitData, error) { + var err error + if g.next == nil || len(g.next) == 0 { + g.buffull = false + g.next, err = g.rd.ReadSlice('\x00') + if err != nil { + if err == bufio.ErrBufferFull { + g.buffull = true + } else if err == io.EOF { + return nil, nil + } else { + return nil, err + } + } + } + + ret := LogNameStatusCommitData{} + if bytes.Equal(g.next, []byte("commit\000")) { + g.next, err = g.rd.ReadSlice('\x00') + if err != nil { + if err == bufio.ErrBufferFull { + g.buffull = true + } else if err == io.EOF { + return nil, nil + } else { + return nil, err + } + } + } + + // Our "line" must look like: SP ( SP) * NUL + ret.CommitID = string(g.next[0:40]) + parents := string(g.next[41:]) + if g.buffull { + more, err := g.rd.ReadString('\x00') + if err != nil { + return nil, err + } + parents += more + } + parents = parents[:len(parents)-1] + ret.ParentIDs = strings.Split(parents, " ") + + // now read the next "line" + g.buffull = false + g.next, err = g.rd.ReadSlice('\x00') + if err != nil { + if err == bufio.ErrBufferFull { + g.buffull = true + } else if err != io.EOF { + return nil, err + } + } + + if err == io.EOF || !(g.next[0] == '\n' || g.next[0] == '\000') { + return &ret, nil + } + + // Ok we have some changes. + // This line will look like: NL NUL + // + // Subsequent lines will not have the NL - so drop it here - g.bufffull must also be false at this point too. + if g.next[0] == '\n' { + g.next = g.next[1:] + } else { + g.buffull = false + g.next, err = g.rd.ReadSlice('\x00') + if err != nil { + if err == bufio.ErrBufferFull { + g.buffull = true + } else if err != io.EOF { + return nil, err + } + } + if len(g.next) == 0 { + return &ret, nil + } + if g.next[0] == '\x00' { + g.buffull = false + g.next, err = g.rd.ReadSlice('\x00') + if err != nil { + if err == bufio.ErrBufferFull { + g.buffull = true + } else if err != io.EOF { + return nil, err + } + } + } + } + + fnameBuf := make([]byte, 4096) + +diffloop: + for { + if err == io.EOF || bytes.Equal(g.next, []byte("commit\000")) { + return &ret, nil + } + g.next, err = g.rd.ReadSlice('\x00') + if err != nil { + if err == bufio.ErrBufferFull { + g.buffull = true + } else if err == io.EOF { + return &ret, nil + } else { + return nil, err + } + } + copy(fnameBuf, g.next) + if len(fnameBuf) < len(g.next) { + fnameBuf = append(fnameBuf, g.next[len(fnameBuf):]...) + } else { + fnameBuf = fnameBuf[:len(g.next)] + } + if err != nil { + if err != bufio.ErrBufferFull { + return nil, err + } + more, err := g.rd.ReadBytes('\x00') + if err != nil { + return nil, err + } + fnameBuf = append(fnameBuf, more...) + } + + // read the next line + g.buffull = false + g.next, err = g.rd.ReadSlice('\x00') + if err != nil { + if err == bufio.ErrBufferFull { + g.buffull = true + } else if err != io.EOF { + return nil, err + } + } + + if treepath != "" { + if !bytes.HasPrefix(fnameBuf, []byte(treepath)) { + fnameBuf = fnameBuf[:cap(fnameBuf)] + continue diffloop + } + } + fnameBuf = fnameBuf[len(treepath) : len(fnameBuf)-1] + if len(fnameBuf) > maxpathlen { + fnameBuf = fnameBuf[:cap(fnameBuf)] + continue diffloop + } + if len(fnameBuf) > 0 { + if len(treepath) > 0 { + if fnameBuf[0] != '/' || bytes.IndexByte(fnameBuf[1:], '/') >= 0 { + fnameBuf = fnameBuf[:cap(fnameBuf)] + continue diffloop + } + fnameBuf = fnameBuf[1:] + } else if bytes.IndexByte(fnameBuf, '/') >= 0 { + fnameBuf = fnameBuf[:cap(fnameBuf)] + continue diffloop + } + } + + idx, ok := paths2ids[string(fnameBuf)] + if !ok { + fnameBuf = fnameBuf[:cap(fnameBuf)] + continue diffloop + } + if ret.Paths == nil { + ret.Paths = changed + } + changed[idx] = true + } +} + +// Close closes the parser +func (g *LogNameStatusRepoParser) Close() { + g.cancel() +} + +// WalkGitLog walks the git log --name-status for the head commit in the provided treepath and files +func WalkGitLog(ctx context.Context, repo *Repository, head *Commit, treepath string, paths ...string) (map[string]string, error) { + tree, err := head.SubTree(treepath) + if err != nil { + return nil, err + } + + entries, err := tree.ListEntries() + if err != nil { + return nil, err + } + + if len(paths) == 0 { + paths = make([]string, 0, len(entries)+1) + paths = append(paths, "") + for _, entry := range entries { + paths = append(paths, entry.Name()) + } + } else { + sort.Strings(paths) + if paths[0] != "" { + paths = append([]string{""}, paths...) + } + // remove duplicates + for i := len(paths) - 1; i > 0; i-- { + if paths[i] == paths[i-1] { + paths = append(paths[:i-1], paths[i:]...) + } + } + } + + path2idx := map[string]int{} + maxpathlen := len(treepath) + + for i := range paths { + path2idx[paths[i]] = i + pthlen := len(paths[i]) + len(treepath) + 1 + if pthlen > maxpathlen { + maxpathlen = pthlen + } + } + + g := NewLogNameStatusRepoParser(repo.Path, head.ID.String(), treepath, paths...) + defer g.Close() + + results := make([]string, len(paths)) + remaining := len(paths) + nextRestart := (len(paths) * 3) / 4 + if nextRestart > 70 { + nextRestart = 70 + } + lastEmptyParent := head.ID.String() + commitSinceLastEmptyParent := uint64(0) + commitSinceNextRestart := uint64(0) + parentRemaining := map[string]bool{} + + changed := make([]bool, len(paths)) + +heaploop: + for { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } + current, err := g.Next(treepath, path2idx, changed, maxpathlen) + if err != nil { + g.Close() + return nil, err + } + if current == nil { + break heaploop + } + delete(parentRemaining, current.CommitID) + if current.Paths != nil { + for i, found := range current.Paths { + if !found { + continue + } + changed[i] = false + if results[i] == "" { + results[i] = current.CommitID + delete(path2idx, paths[i]) + remaining-- + if results[0] == "" { + results[0] = current.CommitID + delete(path2idx, "") + remaining-- + } + } + } + } + + if remaining <= 0 { + break heaploop + } + commitSinceLastEmptyParent++ + if len(parentRemaining) == 0 { + lastEmptyParent = current.CommitID + commitSinceLastEmptyParent = 0 + } + if remaining <= nextRestart { + commitSinceNextRestart++ + if 4*commitSinceNextRestart > 3*commitSinceLastEmptyParent { + g.Close() + remainingPaths := make([]string, 0, len(paths)) + for i, pth := range paths { + if results[i] == "" { + remainingPaths = append(remainingPaths, pth) + } + } + g = NewLogNameStatusRepoParser(repo.Path, lastEmptyParent, treepath, remainingPaths...) + parentRemaining = map[string]bool{} + nextRestart = (remaining * 3) / 4 + continue heaploop + } + } + for _, parent := range current.ParentIDs { + parentRemaining[parent] = true + } + } + g.Close() + + resultsMap := map[string]string{} + for i, pth := range paths { + resultsMap[pth] = results[i] + } + + return resultsMap, nil +} diff --git a/modules/git/notes_gogit.go b/modules/git/notes_gogit.go index 173d29cee..84f66d86b 100644 --- a/modules/git/notes_gogit.go +++ b/modules/git/notes_gogit.go @@ -2,26 +2,33 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git import ( + "context" "io/ioutil" + "code.gitea.io/gitea/modules/log" + "github.com/go-git/go-git/v5/plumbing/object" ) // GetNote retrieves the git-notes data for a given commit. -func GetNote(repo *Repository, commitID string, note *Note) error { +func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note) error { + log.Trace("Searching for git note corresponding to the commit %q in the repository %q", commitID, repo.Path) notes, err := repo.GetCommit(NotesRef) if err != nil { + log.Error("Unable to get commit from ref %q. Error: %v", NotesRef, err) return err } remainingCommitID := commitID path := "" currentTree := notes.Tree.gogitTree + log.Trace("Found tree with ID %q while searching for git note corresponding to the commit %q", currentTree.Entries[0].Name, commitID) var file *object.File for len(remainingCommitID) > 2 { file, err = currentTree.File(remainingCommitID) @@ -35,6 +42,10 @@ func GetNote(repo *Repository, commitID string, note *Note) error { remainingCommitID = remainingCommitID[2:] } if err != nil { + if err == object.ErrDirectoryNotFound { + return ErrNotExist{ID: remainingCommitID, RelPath: path} + } + log.Error("Unable to find git note corresponding to the commit %q. Error: %v", commitID, err) return err } } @@ -42,12 +53,14 @@ func GetNote(repo *Repository, commitID string, note *Note) error { blob := file.Blob dataRc, err := blob.Reader() if err != nil { + log.Error("Unable to read blob with ID %q. Error: %v", blob.ID, err) return err } defer dataRc.Close() d, err := ioutil.ReadAll(dataRc) if err != nil { + log.Error("Unable to read blob with ID %q. Error: %v", blob.ID, err) return err } note.Message = d @@ -62,8 +75,9 @@ func GetNote(repo *Repository, commitID string, note *Note) error { return err } - lastCommits, err := GetLastCommitForPaths(commitNode, "", []string{path}) + lastCommits, err := GetLastCommitForPaths(ctx, commitNode, "", []string{path}) if err != nil { + log.Error("Unable to get the commit for the path %q. Error: %v", path, err) return err } note.Commit = convertCommit(lastCommits[path]) diff --git a/modules/git/notes_nogogit.go b/modules/git/notes_nogogit.go index 613efd2e0..9a54b4810 100644 --- a/modules/git/notes_nogogit.go +++ b/modules/git/notes_nogogit.go @@ -2,26 +2,35 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( + "context" "io/ioutil" + "strings" + + "code.gitea.io/gitea/modules/log" ) // GetNote retrieves the git-notes data for a given commit. -func GetNote(repo *Repository, commitID string, note *Note) error { +func GetNote(ctx context.Context, repo *Repository, commitID string, note *Note) error { + log.Trace("Searching for git note corresponding to the commit %q in the repository %q", commitID, repo.Path) notes, err := repo.GetCommit(NotesRef) if err != nil { + log.Error("Unable to get commit from ref %q. Error: %v", NotesRef, err) return err } path := "" tree := ¬es.Tree + log.Trace("Found tree with ID %q while searching for git note corresponding to the commit %q", tree.ID, commitID) var entry *TreeEntry + originalCommitID := commitID for len(commitID) > 2 { entry, err = tree.GetTreeEntryByPath(commitID) if err == nil { @@ -34,26 +43,44 @@ func GetNote(repo *Repository, commitID string, note *Note) error { commitID = commitID[2:] } if err != nil { + log.Error("Unable to find git note corresponding to the commit %q. Error: %v", originalCommitID, err) return err } } - dataRc, err := entry.Blob().DataAsync() + blob := entry.Blob() + dataRc, err := blob.DataAsync() if err != nil { + log.Error("Unable to read blob with ID %q. Error: %v", blob.ID, err) return err } - defer dataRc.Close() + closed := false + defer func() { + if !closed { + _ = dataRc.Close() + } + }() d, err := ioutil.ReadAll(dataRc) if err != nil { + log.Error("Unable to read blob with ID %q. Error: %v", blob.ID, err) return err } + _ = dataRc.Close() + closed = true note.Message = d - lastCommits, err := GetLastCommitForPaths(notes, "", []string{path}) + treePath := "" + if idx := strings.LastIndex(path, "/"); idx > -1 { + treePath = path[:idx] + path = path[idx+1:] + } + + lastCommits, err := GetLastCommitForPaths(ctx, notes, treePath, []string{path}) if err != nil { + log.Error("Unable to get the commit for the path %q. Error: %v", treePath, err) return err } - note.Commit = lastCommits[0] + note.Commit = lastCommits[path] return nil } diff --git a/modules/git/notes_test.go b/modules/git/notes_test.go index b7939e691..fec46e596 100644 --- a/modules/git/notes_test.go +++ b/modules/git/notes_test.go @@ -5,6 +5,7 @@ package git import ( + "context" "path/filepath" "testing" @@ -18,7 +19,7 @@ func TestGetNotes(t *testing.T) { defer bareRepo1.Close() note := Note{} - err = GetNote(bareRepo1, "95bb4d39648ee7e325106df01a621c530863a653", ¬e) + err = GetNote(context.Background(), bareRepo1, "95bb4d39648ee7e325106df01a621c530863a653", ¬e) assert.NoError(t, err) assert.Equal(t, []byte("Note contents\n"), note.Message) assert.Equal(t, "Vladimir Panteleev", note.Commit.Author.Name) @@ -31,10 +32,22 @@ func TestGetNestedNotes(t *testing.T) { defer repo.Close() note := Note{} - err = GetNote(repo, "3e668dbfac39cbc80a9ff9c61eb565d944453ba4", ¬e) + err = GetNote(context.Background(), repo, "3e668dbfac39cbc80a9ff9c61eb565d944453ba4", ¬e) assert.NoError(t, err) assert.Equal(t, []byte("Note 2"), note.Message) - err = GetNote(repo, "ba0a96fa63532d6c5087ecef070b0250ed72fa47", ¬e) + err = GetNote(context.Background(), repo, "ba0a96fa63532d6c5087ecef070b0250ed72fa47", ¬e) assert.NoError(t, err) assert.Equal(t, []byte("Note 1"), note.Message) } + +func TestGetNonExistentNotes(t *testing.T) { + bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") + bareRepo1, err := OpenRepository(bareRepo1Path) + assert.NoError(t, err) + defer bareRepo1.Close() + + note := Note{} + err = GetNote(context.Background(), bareRepo1, "non_existent_sha", ¬e) + assert.Error(t, err) + assert.IsType(t, ErrNotExist{}, err) +} diff --git a/modules/git/parse_gogit.go b/modules/git/parse_gogit.go index 434fb4160..c42e32929 100644 --- a/modules/git/parse_gogit.go +++ b/modules/git/parse_gogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git @@ -10,12 +11,13 @@ import ( "bytes" "fmt" "strconv" + "strings" "github.com/go-git/go-git/v5/plumbing/filemode" "github.com/go-git/go-git/v5/plumbing/object" ) -// ParseTreeEntries parses the output of a `git ls-tree` command. +// ParseTreeEntries parses the output of a `git ls-tree -l` command. func ParseTreeEntries(data []byte) ([]*TreeEntry, error) { return parseTreeEntries(data, nil) } @@ -23,7 +25,7 @@ func ParseTreeEntries(data []byte) ([]*TreeEntry, error) { func parseTreeEntries(data []byte, ptree *Tree) ([]*TreeEntry, error) { entries := make([]*TreeEntry, 0, 10) for pos := 0; pos < len(data); { - // expect line to be of the form " \t" + // expect line to be of the form " \t" entry := new(TreeEntry) entry.gogitTreeEntry = &object.TreeEntry{} entry.ptree = ptree @@ -61,7 +63,16 @@ func parseTreeEntries(data []byte, ptree *Tree) ([]*TreeEntry, error) { entry.gogitTreeEntry.Hash = id pos += 41 // skip over sha and trailing space - end := pos + bytes.IndexByte(data[pos:], '\n') + end := pos + bytes.IndexByte(data[pos:], '\t') + if end < pos { + return nil, fmt.Errorf("Invalid ls-tree -l output: %s", string(data)) + } + entry.size, _ = strconv.ParseInt(strings.TrimSpace(string(data[pos:end])), 10, 64) + entry.sized = true + + pos = end + 1 + + end = pos + bytes.IndexByte(data[pos:], '\n') if end < pos { return nil, fmt.Errorf("Invalid ls-tree output: %s", string(data)) } diff --git a/modules/git/parse_gogit_test.go b/modules/git/parse_gogit_test.go index cf38c2993..c27f5172d 100644 --- a/modules/git/parse_gogit_test.go +++ b/modules/git/parse_gogit_test.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git @@ -24,7 +25,7 @@ func TestParseTreeEntries(t *testing.T) { Expected: []*TreeEntry{}, }, { - Input: "100644 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c\texample/file2.txt\n", + Input: "100644 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c 1022\texample/file2.txt\n", Expected: []*TreeEntry{ { ID: MustIDFromString("61ab7345a1a3bbc590068ccae37b8515cfc5843c"), @@ -33,12 +34,14 @@ func TestParseTreeEntries(t *testing.T) { Name: "example/file2.txt", Mode: filemode.Regular, }, + size: 1022, + sized: true, }, }, }, { - Input: "120000 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c\t\"example/\\n.txt\"\n" + - "040000 tree 1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8\texample\n", + Input: "120000 blob 61ab7345a1a3bbc590068ccae37b8515cfc5843c 234131\t\"example/\\n.txt\"\n" + + "040000 tree 1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8 -\texample\n", Expected: []*TreeEntry{ { ID: MustIDFromString("61ab7345a1a3bbc590068ccae37b8515cfc5843c"), @@ -47,9 +50,12 @@ func TestParseTreeEntries(t *testing.T) { Name: "example/\n.txt", Mode: filemode.Symlink, }, + size: 234131, + sized: true, }, { - ID: MustIDFromString("1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8"), + ID: MustIDFromString("1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8"), + sized: true, gogitTreeEntry: &object.TreeEntry{ Hash: MustIDFromString("1d01fb729fb0db5881daaa6030f9f2d3cd3d5ae8"), Name: "example", diff --git a/modules/git/parse_nogogit.go b/modules/git/parse_nogogit.go index 26dd700af..dd5554b5d 100644 --- a/modules/git/parse_nogogit.go +++ b/modules/git/parse_nogogit.go @@ -2,17 +2,23 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( + "bufio" "bytes" "fmt" + "io" "strconv" + "strings" + + "code.gitea.io/gitea/modules/log" ) -// ParseTreeEntries parses the output of a `git ls-tree` command. +// ParseTreeEntries parses the output of a `git ls-tree -l` command. func ParseTreeEntries(data []byte) ([]*TreeEntry, error) { return parseTreeEntries(data, nil) } @@ -20,7 +26,7 @@ func ParseTreeEntries(data []byte) ([]*TreeEntry, error) { func parseTreeEntries(data []byte, ptree *Tree) ([]*TreeEntry, error) { entries := make([]*TreeEntry, 0, 10) for pos := 0; pos < len(data); { - // expect line to be of the form " \t" + // expect line to be of the form " \t" entry := new(TreeEntry) entry.ptree = ptree if pos+6 > len(data) { @@ -56,7 +62,16 @@ func parseTreeEntries(data []byte, ptree *Tree) ([]*TreeEntry, error) { entry.ID = id pos += 41 // skip over sha and trailing space - end := pos + bytes.IndexByte(data[pos:], '\n') + end := pos + bytes.IndexByte(data[pos:], '\t') + if end < pos { + return nil, fmt.Errorf("Invalid ls-tree -l output: %s", string(data)) + } + entry.size, _ = strconv.ParseInt(strings.TrimSpace(string(data[pos:end])), 10, 64) + entry.sized = true + + pos = end + 1 + + end = pos + bytes.IndexByte(data[pos:], '\n') if end < pos { return nil, fmt.Errorf("Invalid ls-tree output: %s", string(data)) } @@ -76,3 +91,49 @@ func parseTreeEntries(data []byte, ptree *Tree) ([]*TreeEntry, error) { } return entries, nil } + +func catBatchParseTreeEntries(ptree *Tree, rd *bufio.Reader, sz int64) ([]*TreeEntry, error) { + fnameBuf := make([]byte, 4096) + modeBuf := make([]byte, 40) + shaBuf := make([]byte, 40) + entries := make([]*TreeEntry, 0, 10) + +loop: + for sz > 0 { + mode, fname, sha, count, err := ParseTreeLine(rd, modeBuf, fnameBuf, shaBuf) + if err != nil { + if err == io.EOF { + break loop + } + return nil, err + } + sz -= int64(count) + entry := new(TreeEntry) + entry.ptree = ptree + + switch string(mode) { + case "100644": + entry.entryMode = EntryModeBlob + case "100755": + entry.entryMode = EntryModeExec + case "120000": + entry.entryMode = EntryModeSymlink + case "160000": + entry.entryMode = EntryModeCommit + case "40000": + entry.entryMode = EntryModeTree + default: + log.Debug("Unknown mode: %v", string(mode)) + return nil, fmt.Errorf("unknown mode: %v", string(mode)) + } + + entry.ID = MustID(sha) + entry.name = string(fname) + entries = append(entries, entry) + } + if _, err := rd.Discard(1); err != nil { + return entries, err + } + + return entries, nil +} diff --git a/modules/git/parse_nogogit_test.go b/modules/git/parse_nogogit_test.go new file mode 100644 index 000000000..5f58237de --- /dev/null +++ b/modules/git/parse_nogogit_test.go @@ -0,0 +1,71 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +//go:build !gogit +// +build !gogit + +package git + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestParseTreeEntries(t *testing.T) { + + testCases := []struct { + Input string + Expected []*TreeEntry + }{ + { + Input: `100644 blob ea0d83c9081af9500ac9f804101b3fd0a5c293af 8218 README.md +100644 blob 037f27dc9d353ae4fd50f0474b2194c593914e35 4681 README_ZH.md +100644 blob 9846a94f7e8350a916632929d0fda38c90dd2ca8 429 SECURITY.md +040000 tree 84b90550547016f73c5dd3f50dea662389e67b6d - assets +`, + Expected: []*TreeEntry{ + { + ID: MustIDFromString("ea0d83c9081af9500ac9f804101b3fd0a5c293af"), + name: "README.md", + entryMode: EntryModeBlob, + size: 8218, + sized: true, + }, + { + ID: MustIDFromString("037f27dc9d353ae4fd50f0474b2194c593914e35"), + name: "README_ZH.md", + entryMode: EntryModeBlob, + size: 4681, + sized: true, + }, + { + ID: MustIDFromString("9846a94f7e8350a916632929d0fda38c90dd2ca8"), + name: "SECURITY.md", + entryMode: EntryModeBlob, + size: 429, + sized: true, + }, + { + ID: MustIDFromString("84b90550547016f73c5dd3f50dea662389e67b6d"), + name: "assets", + entryMode: EntryModeTree, + sized: true, + }, + }, + }, + } + for _, testCase := range testCases { + entries, err := ParseTreeEntries([]byte(testCase.Input)) + assert.NoError(t, err) + assert.Len(t, entries, len(testCase.Expected)) + for i, entry := range entries { + assert.EqualValues(t, testCase.Expected[i].ID, entry.ID) + assert.EqualValues(t, testCase.Expected[i].name, entry.name) + assert.EqualValues(t, testCase.Expected[i].entryMode, entry.entryMode) + assert.EqualValues(t, testCase.Expected[i].sized, entry.sized) + assert.EqualValues(t, testCase.Expected[i].size, entry.size) + } + } +} diff --git a/modules/git/pipeline/lfs.go b/modules/git/pipeline/lfs.go index d47b7d91e..46a48b710 100644 --- a/modules/git/pipeline/lfs.go +++ b/modules/git/pipeline/lfs.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package pipeline diff --git a/modules/git/pipeline/lfs_nogogit.go b/modules/git/pipeline/lfs_nogogit.go index 30d33e27e..a441e37b6 100644 --- a/modules/git/pipeline/lfs_nogogit.go +++ b/modules/git/pipeline/lfs_nogogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package pipeline @@ -43,8 +44,6 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) { basePath := repo.Path - hashStr := hash.String() - // Use rev-list to provide us with all commits in order revListReader, revListWriter := io.Pipe() defer func() { @@ -64,27 +63,8 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) { // Next feed the commits in order into cat-file --batch, followed by their trees and sub trees as necessary. // so let's create a batch stdin and stdout - batchStdinReader, batchStdinWriter := io.Pipe() - batchStdoutReader, batchStdoutWriter := io.Pipe() - defer func() { - _ = batchStdinReader.Close() - _ = batchStdinWriter.Close() - _ = batchStdoutReader.Close() - _ = batchStdoutWriter.Close() - }() - - go func() { - stderr := strings.Builder{} - err := git.NewCommand("cat-file", "--batch").RunInDirFullPipeline(repo.Path, batchStdoutWriter, &stderr, batchStdinReader) - if err != nil { - _ = revListWriter.CloseWithError(git.ConcatenateError(err, (&stderr).String())) - } else { - _ = revListWriter.Close() - } - }() - - // For simplicities sake we'll us a buffered reader to read from the cat-file --batch - batchReader := bufio.NewReader(batchStdoutReader) + batchStdinWriter, batchReader, cancel := repo.CatFileBatch() + defer cancel() // We'll use a scanner for the revList because it's simpler than a bufio.Reader scan := bufio.NewScanner(revListReader) @@ -93,7 +73,7 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) { fnameBuf := make([]byte, 4096) modeBuf := make([]byte, 40) - workingShaBuf := make([]byte, 40) + workingShaBuf := make([]byte, 20) for scan.Scan() { // Get the next commit ID @@ -137,6 +117,9 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) { if err != nil { return nil, err } + if _, err := batchReader.Discard(1); err != nil { + return nil, err + } _, err := batchStdinWriter.Write([]byte(curCommit.Tree.ID.String() + "\n")) if err != nil { @@ -146,12 +129,12 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) { case "tree": var n int64 for n < size { - mode, fname, sha, count, err := git.ParseTreeLine(batchReader, modeBuf, fnameBuf, workingShaBuf) + mode, fname, sha20byte, count, err := git.ParseTreeLine(batchReader, modeBuf, fnameBuf, workingShaBuf) if err != nil { return nil, err } n += int64(count) - if bytes.Equal(sha, []byte(hashStr)) { + if bytes.Equal(sha20byte, hash[:]) { result := LFSResult{ Name: curPath + string(fname), SHA: curCommit.ID.String(), @@ -161,10 +144,15 @@ func FindLFSFile(repo *git.Repository, hash git.SHA1) ([]*LFSResult, error) { } resultsMap[curCommit.ID.String()+":"+curPath+string(fname)] = &result } else if string(mode) == git.EntryModeTree.String() { - trees = append(trees, sha) + sha40Byte := make([]byte, 40) + git.To40ByteSHA(sha20byte, sha40Byte) + trees = append(trees, sha40Byte) paths = append(paths, curPath+string(fname)+"/") } } + if _, err := batchReader.Discard(1); err != nil { + return nil, err + } if len(trees) > 0 { _, err := batchStdinWriter.Write(trees[len(trees)-1]) if err != nil { diff --git a/modules/git/remote.go b/modules/git/remote.go new file mode 100644 index 000000000..7ba2b35a5 --- /dev/null +++ b/modules/git/remote.go @@ -0,0 +1,31 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package git + +import "net/url" + +// GetRemoteAddress returns the url of a specific remote of the repository. +func GetRemoteAddress(repoPath, remoteName string) (*url.URL, error) { + err := LoadGitVersion() + if err != nil { + return nil, err + } + var cmd *Command + if CheckGitVersionAtLeast("2.7") == nil { + cmd = NewCommand("remote", "get-url", remoteName) + } else { + cmd = NewCommand("config", "--get", "remote."+remoteName+".url") + } + + result, err := cmd.RunInDir(repoPath) + if err != nil { + return nil, err + } + + if len(result) > 0 { + result = result[:len(result)-1] + } + return url.Parse(result) +} diff --git a/modules/git/repo.go b/modules/git/repo.go index 515899ab0..e7d42dacb 100644 --- a/modules/git/repo.go +++ b/modules/git/repo.go @@ -7,14 +7,18 @@ package git import ( "bytes" - "container/list" "context" "fmt" + "io" + "net/url" "os" "path" + "path/filepath" "strconv" "strings" "time" + + "code.gitea.io/gitea/modules/proxy" ) // GPGSettings represents the default GPG settings for this repository @@ -33,10 +37,10 @@ func (repo *Repository) GetAllCommitsCount() (int64, error) { return AllCommitsCount(repo.Path, false) } -func (repo *Repository) parsePrettyFormatLogToList(logs []byte) (*list.List, error) { - l := list.New() +func (repo *Repository) parsePrettyFormatLogToList(logs []byte) ([]*Commit, error) { + var commits []*Commit if len(logs) == 0 { - return l, nil + return commits, nil } parts := bytes.Split(logs, []byte{'\n'}) @@ -46,10 +50,10 @@ func (repo *Repository) parsePrettyFormatLogToList(logs []byte) (*list.List, err if err != nil { return nil, err } - l.PushBack(commit) + commits = append(commits, commit) } - return l, nil + return commits, nil } // IsRepoURLAccessible checks if given repository URL is accessible. @@ -100,12 +104,12 @@ type CloneRepoOptions struct { } // Clone clones original repository to target path. -func Clone(from, to string, opts CloneRepoOptions) (err error) { +func Clone(from, to string, opts CloneRepoOptions) error { return CloneWithContext(DefaultContext, from, to, opts) } // CloneWithContext clones original repository to target path. -func CloneWithContext(ctx context.Context, from, to string, opts CloneRepoOptions) (err error) { +func CloneWithContext(ctx context.Context, from, to string, opts CloneRepoOptions) error { cargs := make([]string, len(GlobalCommandArgs)) copy(cargs, GlobalCommandArgs) return CloneWithArgs(ctx, from, to, cargs, opts) @@ -147,8 +151,24 @@ func CloneWithArgs(ctx context.Context, from, to string, args []string, opts Clo opts.Timeout = -1 } - _, err = cmd.RunTimeout(opts.Timeout) - return err + var envs = os.Environ() + u, err := url.Parse(from) + if err == nil && (strings.EqualFold(u.Scheme, "http") || strings.EqualFold(u.Scheme, "https")) { + if proxy.Match(u.Host) { + envs = append(envs, fmt.Sprintf("https_proxy=%s", proxy.GetProxyURL())) + } + } + + var stderr = new(bytes.Buffer) + if err = cmd.RunWithContext(&RunContext{ + Timeout: opts.Timeout, + Env: envs, + Stdout: io.Discard, + Stderr: stderr, + }); err != nil { + return ConcatenateError(err, stderr.String()) + } + return nil } // PullRemoteOptions options when pull from remote @@ -182,10 +202,12 @@ func Pull(repoPath string, opts PullRemoteOptions) error { // PushOptions options when push to remote type PushOptions struct { - Remote string - Branch string - Force bool - Env []string + Remote string + Branch string + Force bool + Mirror bool + Env []string + Timeout time.Duration } // Push pushs local commits to given remote branch. @@ -194,10 +216,20 @@ func Push(repoPath string, opts PushOptions) error { if opts.Force { cmd.AddArguments("-f") } - cmd.AddArguments("--", opts.Remote, opts.Branch) + if opts.Mirror { + cmd.AddArguments("--mirror") + } + cmd.AddArguments("--", opts.Remote) + if len(opts.Branch) > 0 { + cmd.AddArguments(opts.Branch) + } var outbuf, errbuf strings.Builder - err := cmd.RunInDirTimeoutEnvPipeline(opts.Env, -1, repoPath, &outbuf, &errbuf) + if opts.Timeout == 0 { + opts.Timeout = -1 + } + + err := cmd.RunInDirTimeoutEnvPipeline(opts.Env, opts.Timeout, repoPath, &outbuf, &errbuf) if err != nil { if strings.Contains(errbuf.String(), "non-fast-forward") { return &ErrPushOutOfDate{ @@ -213,6 +245,13 @@ func Push(repoPath string, opts PushOptions) error { } err.GenerateMessage() return err + } else if strings.Contains(errbuf.String(), "matches more than one") { + err := &ErrMoreThanOne{ + StdOut: outbuf.String(), + StdErr: errbuf.String(), + Err: err, + } + return err } } @@ -377,3 +416,33 @@ func GetDivergingCommits(repoPath string, baseBranch string, targetBranch string return DivergeObject{ahead, behind}, nil } + +// CreateBundle create bundle content to the target path +func (repo *Repository) CreateBundle(ctx context.Context, commit string, out io.Writer) error { + tmp, err := os.MkdirTemp(os.TempDir(), "gitea-bundle") + if err != nil { + return err + } + defer os.RemoveAll(tmp) + + tmpFile := filepath.Join(tmp, "bundle") + args := []string{ + "bundle", + "create", + tmpFile, + commit, + } + _, err = NewCommandContext(ctx, args...).RunInDir(repo.Path) + if err != nil { + return err + } + + fi, err := os.Open(tmpFile) + if err != nil { + return err + } + defer fi.Close() + + _, err = io.Copy(out, fi) + return err +} diff --git a/modules/git/repo_archive.go b/modules/git/repo_archive.go new file mode 100644 index 000000000..83df082ad --- /dev/null +++ b/modules/git/repo_archive.go @@ -0,0 +1,65 @@ +// Copyright 2015 The Gogs Authors. All rights reserved. +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package git + +import ( + "context" + "fmt" + "io" + "path/filepath" + "strings" +) + +// ArchiveType archive types +type ArchiveType int + +const ( + // ZIP zip archive type + ZIP ArchiveType = iota + 1 + // TARGZ tar gz archive type + TARGZ + // BUNDLE bundle archive type + BUNDLE +) + +// String converts an ArchiveType to string +func (a ArchiveType) String() string { + switch a { + case ZIP: + return "zip" + case TARGZ: + return "tar.gz" + case BUNDLE: + return "bundle" + } + return "unknown" +} + +// CreateArchive create archive content to the target path +func (repo *Repository) CreateArchive(ctx context.Context, format ArchiveType, target io.Writer, usePrefix bool, commitID string) error { + if format.String() == "unknown" { + return fmt.Errorf("unknown format: %v", format) + } + + args := []string{ + "archive", + } + if usePrefix { + args = append(args, "--prefix="+filepath.Base(strings.TrimSuffix(repo.Path, ".git"))+"/") + } + + args = append(args, + "--format="+format.String(), + commitID, + ) + + var stderr strings.Builder + err := NewCommandContext(ctx, args...).RunInDirPipeline(repo.Path, target, &stderr) + if err != nil { + return ConcatenateError(err, stderr.String()) + } + return nil +} diff --git a/modules/git/repo_base_gogit.go b/modules/git/repo_base_gogit.go index 19a3f8457..afa5383b1 100644 --- a/modules/git/repo_base_gogit.go +++ b/modules/git/repo_base_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git @@ -12,6 +13,8 @@ import ( "path/filepath" gitealog "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "github.com/go-git/go-billy/v5/osfs" gogit "github.com/go-git/go-git/v5" "github.com/go-git/go-git/v5/plumbing/cache" @@ -46,7 +49,7 @@ func OpenRepository(repoPath string) (*Repository, error) { return nil, err } } - storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true}) + storage := filesystem.NewStorageWithOptions(fs, cache.NewObjectLRUDefault(), filesystem.Options{KeepDescriptors: true, LargeObjectThreshold: setting.Git.LargeObjectThreshold}) gogitRepo, err := gogit.Open(storage, fs) if err != nil { return nil, err diff --git a/modules/git/repo_base_nogogit.go b/modules/git/repo_base_nogogit.go index e05219a4e..22c4dfdcb 100644 --- a/modules/git/repo_base_nogogit.go +++ b/modules/git/repo_base_nogogit.go @@ -3,13 +3,18 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( + "bufio" + "context" "errors" "path/filepath" + + "code.gitea.io/gitea/modules/log" ) // Repository represents a Git repository. @@ -19,6 +24,14 @@ type Repository struct { tagCache *ObjectCache gpgSettings *GPGSettings + + batchCancel context.CancelFunc + batchReader *bufio.Reader + batchWriter WriteCloserError + + checkCancel context.CancelFunc + checkReader *bufio.Reader + checkWriter WriteCloserError } // OpenRepository opens the repository at the given path. @@ -29,12 +42,51 @@ func OpenRepository(repoPath string) (*Repository, error) { } else if !isDir(repoPath) { return nil, errors.New("no such file or directory") } - return &Repository{ + + repo := &Repository{ Path: repoPath, tagCache: newObjectCache(), - }, nil + } + + repo.batchWriter, repo.batchReader, repo.batchCancel = CatFileBatch(repoPath) + repo.checkWriter, repo.checkReader, repo.checkCancel = CatFileBatchCheck(repo.Path) + + return repo, nil +} + +// CatFileBatch obtains a CatFileBatch for this repository +func (repo *Repository) CatFileBatch() (WriteCloserError, *bufio.Reader, func()) { + if repo.batchCancel == nil || repo.batchReader.Buffered() > 0 { + log.Debug("Opening temporary cat file batch for: %s", repo.Path) + return CatFileBatch(repo.Path) + } + return repo.batchWriter, repo.batchReader, func() {} +} + +// CatFileBatchCheck obtains a CatFileBatchCheck for this repository +func (repo *Repository) CatFileBatchCheck() (WriteCloserError, *bufio.Reader, func()) { + if repo.checkCancel == nil || repo.checkReader.Buffered() > 0 { + log.Debug("Opening temporary cat file batch-check: %s", repo.Path) + return CatFileBatchCheck(repo.Path) + } + return repo.checkWriter, repo.checkReader, func() {} } // Close this repository, in particular close the underlying gogitStorage if this is not nil func (repo *Repository) Close() { + if repo == nil { + return + } + if repo.batchCancel != nil { + repo.batchCancel() + repo.batchReader = nil + repo.batchWriter = nil + repo.batchCancel = nil + } + if repo.checkCancel != nil { + repo.checkCancel() + repo.checkCancel = nil + repo.checkReader = nil + repo.checkWriter = nil + } } diff --git a/modules/git/repo_blob_gogit.go b/modules/git/repo_blob_gogit.go index 485c233ff..b11e9f58f 100644 --- a/modules/git/repo_blob_gogit.go +++ b/modules/git/repo_blob_gogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/repo_blob_nogogit.go b/modules/git/repo_blob_nogogit.go index 9959420df..775b3835d 100644 --- a/modules/git/repo_blob_nogogit.go +++ b/modules/git/repo_blob_nogogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git @@ -11,7 +12,7 @@ func (repo *Repository) getBlob(id SHA1) (*Blob, error) { return nil, ErrNotExist{id.String(), ""} } return &Blob{ - ID: id, - repoPath: repo.Path, + ID: id, + repo: repo, }, nil } diff --git a/modules/git/repo_blob_test.go b/modules/git/repo_blob_test.go index 52a124db2..ccf418b30 100644 --- a/modules/git/repo_blob_test.go +++ b/modules/git/repo_blob_test.go @@ -33,9 +33,9 @@ func TestRepository_GetBlob_Found(t *testing.T) { dataReader, err := blob.DataAsync() assert.NoError(t, err) - defer dataReader.Close() data, err := ioutil.ReadAll(dataReader) + assert.NoError(t, dataReader.Close()) assert.NoError(t, err) assert.Equal(t, testCase.Data, data) } diff --git a/modules/git/repo_branch.go b/modules/git/repo_branch.go index 25438530f..7c30b1fb2 100644 --- a/modules/git/repo_branch.go +++ b/modules/git/repo_branch.go @@ -13,6 +13,14 @@ import ( // BranchPrefix base dir of the branch information file store on git const BranchPrefix = "refs/heads/" +// AGit Flow + +// PullRequestPrefix sepcial ref to create a pull request: refs/for// +// or refs/for/ -o topic='' +const PullRequestPrefix = "refs/for/" + +// TODO: /refs/for-review for suggest change interface + // IsReferenceExist returns true if given reference exists in the repository. func IsReferenceExist(repoPath, name string) bool { _, err := NewCommand("show-ref", "--verify", "--", name).RunInDir(repoPath) @@ -78,16 +86,17 @@ func (repo *Repository) GetBranch(branch string) (*Branch, error) { } // GetBranchesByPath returns a branch by it's path -func GetBranchesByPath(path string) ([]*Branch, error) { +// if limit = 0 it will not limit +func GetBranchesByPath(path string, skip, limit int) ([]*Branch, int, error) { gitRepo, err := OpenRepository(path) if err != nil { - return nil, err + return nil, 0, err } defer gitRepo.Close() - brs, err := gitRepo.GetBranches() + brs, countAll, err := gitRepo.GetBranches(skip, limit) if err != nil { - return nil, err + return nil, 0, err } branches := make([]*Branch, len(brs)) @@ -99,7 +108,7 @@ func GetBranchesByPath(path string) ([]*Branch, error) { } } - return branches, nil + return branches, countAll, nil } // DeleteBranchOptions Option(s) for delete branch diff --git a/modules/git/repo_branch_gogit.go b/modules/git/repo_branch_gogit.go index 65cb77a8b..6bf14b399 100644 --- a/modules/git/repo_branch_gogit.go +++ b/modules/git/repo_branch_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git @@ -13,6 +14,30 @@ import ( "github.com/go-git/go-git/v5/plumbing" ) +// IsObjectExist returns true if given reference exists in the repository. +func (repo *Repository) IsObjectExist(name string) bool { + if name == "" { + return false + } + + _, err := repo.gogitRepo.ResolveRevision(plumbing.Revision(name)) + + return err == nil +} + +// IsReferenceExist returns true if given reference exists in the repository. +func (repo *Repository) IsReferenceExist(name string) bool { + if name == "" { + return false + } + + reference, err := repo.gogitRepo.Reference(plumbing.ReferenceName(name), true) + if err != nil { + return false + } + return reference.Type() != plumbing.InvalidReference +} + // IsBranchExist returns true if given branch exists in current repository. func (repo *Repository) IsBranchExist(name string) bool { if name == "" { @@ -25,21 +50,32 @@ func (repo *Repository) IsBranchExist(name string) bool { return reference.Type() != plumbing.InvalidReference } -// GetBranches returns all branches of the repository. -func (repo *Repository) GetBranches() ([]string, error) { +// GetBranches returns branches from the repository, skipping skip initial branches and +// returning at most limit branches, or all branches if limit is 0. +func (repo *Repository) GetBranches(skip, limit int) ([]string, int, error) { var branchNames []string branches, err := repo.gogitRepo.Branches() if err != nil { - return nil, err + return nil, 0, err } + i := 0 + count := 0 _ = branches.ForEach(func(branch *plumbing.Reference) error { + count++ + if i < skip { + i++ + return nil + } else if limit != 0 && count > skip+limit { + return nil + } + branchNames = append(branchNames, strings.TrimPrefix(branch.Name().String(), BranchPrefix)) return nil }) // TODO: Sort? - return branchNames, nil + return branchNames, count, nil } diff --git a/modules/git/repo_branch_nogogit.go b/modules/git/repo_branch_nogogit.go index 5ec46d725..666ca81c1 100644 --- a/modules/git/repo_branch_nogogit.go +++ b/modules/git/repo_branch_nogogit.go @@ -3,32 +3,71 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( "bufio" + "bytes" "io" "strings" + + "code.gitea.io/gitea/modules/log" ) +// IsObjectExist returns true if given reference exists in the repository. +func (repo *Repository) IsObjectExist(name string) bool { + if name == "" { + return false + } + + wr, rd, cancel := repo.CatFileBatchCheck() + defer cancel() + _, err := wr.Write([]byte(name + "\n")) + if err != nil { + log.Debug("Error writing to CatFileBatchCheck %v", err) + return false + } + sha, _, _, err := ReadBatchLine(rd) + return err == nil && bytes.HasPrefix(sha, []byte(strings.TrimSpace(name))) +} + +// IsReferenceExist returns true if given reference exists in the repository. +func (repo *Repository) IsReferenceExist(name string) bool { + if name == "" { + return false + } + + wr, rd, cancel := repo.CatFileBatchCheck() + defer cancel() + _, err := wr.Write([]byte(name + "\n")) + if err != nil { + log.Debug("Error writing to CatFileBatchCheck %v", err) + return false + } + _, _, _, err = ReadBatchLine(rd) + return err == nil +} + // IsBranchExist returns true if given branch exists in current repository. func (repo *Repository) IsBranchExist(name string) bool { if name == "" { return false } - return IsReferenceExist(repo.Path, BranchPrefix+name) + + return repo.IsReferenceExist(BranchPrefix + name) } -// GetBranches returns all branches of the repository. -func (repo *Repository) GetBranches() ([]string, error) { - return callShowRef(repo.Path, BranchPrefix, "--heads") +// GetBranches returns branches from the repository, skipping skip initial branches and +// returning at most limit branches, or all branches if limit is 0. +func (repo *Repository) GetBranches(skip, limit int) ([]string, int, error) { + return callShowRef(repo.Path, BranchPrefix, "--heads", skip, limit) } -func callShowRef(repoPath, prefix, arg string) ([]string, error) { - var branchNames []string - +// callShowRef return refs, if limit = 0 it will not limit +func callShowRef(repoPath, prefix, arg string, skip, limit int) (branchNames []string, countAll int, err error) { stdoutReader, stdoutWriter := io.Pipe() defer func() { _ = stdoutReader.Close() @@ -49,8 +88,21 @@ func callShowRef(repoPath, prefix, arg string) ([]string, error) { } }() + i := 0 bufReader := bufio.NewReader(stdoutReader) - for { + for i < skip { + _, isPrefix, err := bufReader.ReadLine() + if err == io.EOF { + return branchNames, i, nil + } + if err != nil { + return nil, 0, err + } + if !isPrefix { + i++ + } + } + for limit == 0 || i < skip+limit { // The output of show-ref is simply a list: // SP LF _, err := bufReader.ReadSlice(' ') @@ -59,24 +111,39 @@ func callShowRef(repoPath, prefix, arg string) ([]string, error) { _, err = bufReader.ReadSlice(' ') } if err == io.EOF { - return branchNames, nil + return branchNames, i, nil } if err != nil { - return nil, err + return nil, 0, err } branchName, err := bufReader.ReadString('\n') if err == io.EOF { // This shouldn't happen... but we'll tolerate it for the sake of peace - return branchNames, nil + return branchNames, i, nil } if err != nil { - return nil, err + return nil, i, err } branchName = strings.TrimPrefix(branchName, prefix) if len(branchName) > 0 { branchName = branchName[:len(branchName)-1] } branchNames = append(branchNames, branchName) + i++ } + // count all refs + for limit != 0 { + _, isPrefix, err := bufReader.ReadLine() + if err == io.EOF { + return branchNames, i, nil + } + if err != nil { + return nil, 0, err + } + if !isPrefix { + i++ + } + } + return branchNames, i, nil } diff --git a/modules/git/repo_branch_test.go b/modules/git/repo_branch_test.go index 33d31aef6..05d5237e6 100644 --- a/modules/git/repo_branch_test.go +++ b/modules/git/repo_branch_test.go @@ -17,11 +17,26 @@ func TestRepository_GetBranches(t *testing.T) { assert.NoError(t, err) defer bareRepo1.Close() - branches, err := bareRepo1.GetBranches() + branches, countAll, err := bareRepo1.GetBranches(0, 2) + + assert.NoError(t, err) + assert.Len(t, branches, 2) + assert.EqualValues(t, 3, countAll) + assert.ElementsMatch(t, []string{"branch1", "branch2"}, branches) + + branches, countAll, err = bareRepo1.GetBranches(0, 0) assert.NoError(t, err) assert.Len(t, branches, 3) + assert.EqualValues(t, 3, countAll) assert.ElementsMatch(t, []string{"branch1", "branch2", "master"}, branches) + + branches, countAll, err = bareRepo1.GetBranches(5, 1) + + assert.NoError(t, err) + assert.Len(t, branches, 0) + assert.EqualValues(t, 3, countAll) + assert.ElementsMatch(t, []string{}, branches) } func BenchmarkRepository_GetBranches(b *testing.B) { @@ -33,7 +48,7 @@ func BenchmarkRepository_GetBranches(b *testing.B) { defer bareRepo1.Close() for i := 0; i < b.N; i++ { - _, err := bareRepo1.GetBranches() + _, _, err := bareRepo1.GetBranches(0, 0) if err != nil { b.Fatal(err) } diff --git a/modules/git/repo_commit.go b/modules/git/repo_commit.go index c31f41662..e456f04e8 100644 --- a/modules/git/repo_commit.go +++ b/modules/git/repo_commit.go @@ -7,9 +7,12 @@ package git import ( "bytes" - "container/list" + "io" + "io/ioutil" "strconv" "strings" + + "code.gitea.io/gitea/modules/setting" ) // GetBranchCommitID returns last commit ID string of given branch. @@ -19,31 +22,7 @@ func (repo *Repository) GetBranchCommitID(name string) (string, error) { // GetTagCommitID returns last commit ID string of given tag. func (repo *Repository) GetTagCommitID(name string) (string, error) { - stdout, err := NewCommand("rev-list", "-n", "1", TagPrefix+name).RunInDir(repo.Path) - if err != nil { - if strings.Contains(err.Error(), "unknown revision or path") { - return "", ErrNotExist{name, ""} - } - return "", err - } - return strings.TrimSpace(stdout), nil -} - -// ConvertToSHA1 returns a Hash object from a potential ID string -func (repo *Repository) ConvertToSHA1(commitID string) (SHA1, error) { - if len(commitID) != 40 { - var err error - actualCommitID, err := NewCommand("rev-parse", "--verify", commitID).RunInDir(repo.Path) - if err != nil { - if strings.Contains(err.Error(), "unknown revision or path") || - strings.Contains(err.Error(), "fatal: Needed a single revision") { - return SHA1{}, ErrNotExist{commitID, ""} - } - return SHA1{}, err - } - commitID = actualCommitID - } - return NewIDFromString(commitID) + return repo.GetRefCommitID(TagPrefix + name) } // GetCommit returns commit object of by ID string. @@ -104,13 +83,10 @@ func (repo *Repository) GetCommitByPath(relpath string) (*Commit, error) { if err != nil { return nil, err } - return commits.Front().Value.(*Commit), nil + return commits[0], nil } -// CommitsRangeSize the default commits range size -var CommitsRangeSize = 50 - -func (repo *Repository) commitsByRange(id SHA1, page, pageSize int) (*list.List, error) { +func (repo *Repository) commitsByRange(id SHA1, page, pageSize int) ([]*Commit, error) { stdout, err := NewCommand("log", id.String(), "--skip="+strconv.Itoa((page-1)*pageSize), "--max-count="+strconv.Itoa(pageSize), prettyLogFormat).RunInDirBytes(repo.Path) @@ -120,7 +96,7 @@ func (repo *Repository) commitsByRange(id SHA1, page, pageSize int) (*list.List, return repo.parsePrettyFormatLogToList(stdout) } -func (repo *Repository) searchCommits(id SHA1, opts SearchCommitsOptions) (*list.List, error) { +func (repo *Repository) searchCommits(id SHA1, opts SearchCommitsOptions) ([]*Commit, error) { // create new git log command with limit of 100 commis cmd := NewCommand("log", id.String(), "-100", prettyLogFormat) // ignore case @@ -133,7 +109,7 @@ func (repo *Repository) searchCommits(id SHA1, opts SearchCommitsOptions) (*list } } - // add commiters if present in search query + // add committers if present in search query if len(opts.Committers) > 0 { for _, v := range opts.Committers { args = append(args, "--committer="+v) @@ -173,7 +149,7 @@ func (repo *Repository) searchCommits(id SHA1, opts SearchCommitsOptions) (*list stdout = append(stdout, '\n') } - // if there are any keywords (ie not commiter:, author:, time:) + // if there are any keywords (ie not committer:, author:, time:) // then let's iterate over them if len(opts.Keywords) > 0 { for _, v := range opts.Keywords { @@ -218,25 +194,55 @@ func (repo *Repository) FileChangedBetweenCommits(filename, id1, id2 string) (bo return len(strings.TrimSpace(string(stdout))) > 0, nil } -// FileCommitsCount return the number of files at a revison +// FileCommitsCount return the number of files at a revision func (repo *Repository) FileCommitsCount(revision, file string) (int64, error) { return CommitsCountFiles(repo.Path, []string{revision}, []string{file}) } -// CommitsByFileAndRange return the commits according revison file and the page -func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) (*list.List, error) { - stdout, err := NewCommand("log", revision, "--follow", "--skip="+strconv.Itoa((page-1)*50), - "--max-count="+strconv.Itoa(CommitsRangeSize), prettyLogFormat, "--", file).RunInDirBytes(repo.Path) +// CommitsByFileAndRange return the commits according revision file and the page +func (repo *Repository) CommitsByFileAndRange(revision, file string, page int) ([]*Commit, error) { + skip := (page - 1) * setting.Git.CommitsRangeSize + + stdoutReader, stdoutWriter := io.Pipe() + defer func() { + _ = stdoutReader.Close() + _ = stdoutWriter.Close() + }() + go func() { + stderr := strings.Builder{} + err := NewCommand("log", revision, "--follow", + "--max-count="+strconv.Itoa(setting.Git.CommitsRangeSize*page), + prettyLogFormat, "--", file). + RunInDirPipeline(repo.Path, stdoutWriter, &stderr) + if err != nil { + _ = stdoutWriter.CloseWithError(ConcatenateError(err, (&stderr).String())) + } else { + _ = stdoutWriter.Close() + } + }() + + if skip > 0 { + _, err := io.CopyN(ioutil.Discard, stdoutReader, int64(skip*41)) + if err != nil { + if err == io.EOF { + return []*Commit{}, nil + } + _ = stdoutReader.CloseWithError(err) + return nil, err + } + } + + stdout, err := ioutil.ReadAll(stdoutReader) if err != nil { return nil, err } return repo.parsePrettyFormatLogToList(stdout) } -// CommitsByFileAndRangeNoFollow return the commits according revison file and the page -func (repo *Repository) CommitsByFileAndRangeNoFollow(revision, file string, page int) (*list.List, error) { +// CommitsByFileAndRangeNoFollow return the commits according revision file and the page +func (repo *Repository) CommitsByFileAndRangeNoFollow(revision, file string, page int) ([]*Commit, error) { stdout, err := NewCommand("log", revision, "--skip="+strconv.Itoa((page-1)*50), - "--max-count="+strconv.Itoa(CommitsRangeSize), prettyLogFormat, "--", file).RunInDirBytes(repo.Path) + "--max-count="+strconv.Itoa(setting.Git.CommitsRangeSize), prettyLogFormat, "--", file).RunInDirBytes(repo.Path) if err != nil { return nil, err } @@ -257,14 +263,15 @@ func (repo *Repository) FilesCountBetween(startCommitID, endCommitID string) (in return len(strings.Split(stdout, "\n")) - 1, nil } -// CommitsBetween returns a list that contains commits between [last, before). -func (repo *Repository) CommitsBetween(last *Commit, before *Commit) (*list.List, error) { +// CommitsBetween returns a list that contains commits between [before, last). +// If before is detached (removed by reset + push) it is not included. +func (repo *Repository) CommitsBetween(last *Commit, before *Commit) ([]*Commit, error) { var stdout []byte var err error if before == nil { stdout, err = NewCommand("rev-list", last.ID.String()).RunInDirBytes(repo.Path) } else { - stdout, err = NewCommand("rev-list", before.ID.String()+"..."+last.ID.String()).RunInDirBytes(repo.Path) + stdout, err = NewCommand("rev-list", before.ID.String()+".."+last.ID.String()).RunInDirBytes(repo.Path) if err != nil && strings.Contains(err.Error(), "no merge base") { // future versions of git >= 2.28 are likely to return an error if before and last have become unrelated. // previously it would return the results of git rev-list before last so let's try that... @@ -277,14 +284,14 @@ func (repo *Repository) CommitsBetween(last *Commit, before *Commit) (*list.List return repo.parsePrettyFormatLogToList(bytes.TrimSpace(stdout)) } -// CommitsBetweenLimit returns a list that contains at most limit commits skipping the first skip commits between [last, before) -func (repo *Repository) CommitsBetweenLimit(last *Commit, before *Commit, limit, skip int) (*list.List, error) { +// CommitsBetweenLimit returns a list that contains at most limit commits skipping the first skip commits between [before, last) +func (repo *Repository) CommitsBetweenLimit(last *Commit, before *Commit, limit, skip int) ([]*Commit, error) { var stdout []byte var err error if before == nil { stdout, err = NewCommand("rev-list", "--max-count", strconv.Itoa(limit), "--skip", strconv.Itoa(skip), last.ID.String()).RunInDirBytes(repo.Path) } else { - stdout, err = NewCommand("rev-list", "--max-count", strconv.Itoa(limit), "--skip", strconv.Itoa(skip), before.ID.String()+"..."+last.ID.String()).RunInDirBytes(repo.Path) + stdout, err = NewCommand("rev-list", "--max-count", strconv.Itoa(limit), "--skip", strconv.Itoa(skip), before.ID.String()+".."+last.ID.String()).RunInDirBytes(repo.Path) if err != nil && strings.Contains(err.Error(), "no merge base") { // future versions of git >= 2.28 are likely to return an error if before and last have become unrelated. // previously it would return the results of git rev-list --max-count n before last so let's try that... @@ -298,7 +305,7 @@ func (repo *Repository) CommitsBetweenLimit(last *Commit, before *Commit, limit, } // CommitsBetweenIDs return commits between twoe commits -func (repo *Repository) CommitsBetweenIDs(last, before string) (*list.List, error) { +func (repo *Repository) CommitsBetweenIDs(last, before string) ([]*Commit, error) { lastCommit, err := repo.GetCommit(last) if err != nil { return nil, err @@ -315,7 +322,7 @@ func (repo *Repository) CommitsBetweenIDs(last, before string) (*list.List, erro // CommitsCountBetween return numbers of commits between two commits func (repo *Repository) CommitsCountBetween(start, end string) (int64, error) { - count, err := CommitsCountFiles(repo.Path, []string{start + "..." + end}, []string{}) + count, err := CommitsCountFiles(repo.Path, []string{start + ".." + end}, []string{}) if err != nil && strings.Contains(err.Error(), "no merge base") { // future versions of git >= 2.28 are likely to return an error if before and last have become unrelated. // previously it would return the results of git rev-list before last so let's try that... @@ -326,7 +333,7 @@ func (repo *Repository) CommitsCountBetween(start, end string) (int64, error) { } // commitsBefore the limit is depth, not total number of returned commits. -func (repo *Repository) commitsBefore(id SHA1, limit int) (*list.List, error) { +func (repo *Repository) commitsBefore(id SHA1, limit int) ([]*Commit, error) { cmd := NewCommand("log") if limit > 0 { cmd.AddArguments("-"+strconv.Itoa(limit), prettyLogFormat, id.String()) @@ -344,9 +351,8 @@ func (repo *Repository) commitsBefore(id SHA1, limit int) (*list.List, error) { return nil, err } - commits := list.New() - for logEntry := formattedLog.Front(); logEntry != nil; logEntry = logEntry.Next() { - commit := logEntry.Value.(*Commit) + commits := make([]*Commit, 0, len(formattedLog)) + for _, commit := range formattedLog { branches, err := repo.getBranches(commit, 2) if err != nil { return nil, err @@ -356,17 +362,17 @@ func (repo *Repository) commitsBefore(id SHA1, limit int) (*list.List, error) { break } - commits.PushBack(commit) + commits = append(commits, commit) } return commits, nil } -func (repo *Repository) getCommitsBefore(id SHA1) (*list.List, error) { +func (repo *Repository) getCommitsBefore(id SHA1) ([]*Commit, error) { return repo.commitsBefore(id, 0) } -func (repo *Repository) getCommitsBeforeLimit(id SHA1, num int) (*list.List, error) { +func (repo *Repository) getCommitsBeforeLimit(id SHA1, num int) ([]*Commit, error) { return repo.commitsBefore(id, num) } @@ -405,15 +411,24 @@ func (repo *Repository) getBranches(commit *Commit, limit int) ([]string, error) } // GetCommitsFromIDs get commits from commit IDs -func (repo *Repository) GetCommitsFromIDs(commitIDs []string) (commits *list.List) { - commits = list.New() +func (repo *Repository) GetCommitsFromIDs(commitIDs []string) []*Commit { + commits := make([]*Commit, 0, len(commitIDs)) for _, commitID := range commitIDs { commit, err := repo.GetCommit(commitID) if err == nil && commit != nil { - commits.PushBack(commit) + commits = append(commits, commit) } } return commits } + +// IsCommitInBranch check if the commit is on the branch +func (repo *Repository) IsCommitInBranch(commitID, branch string) (r bool, err error) { + stdout, err := NewCommand("branch", "--contains", commitID, branch).RunInDir(repo.Path) + if err != nil { + return false, err + } + return len(stdout) > 0, err +} diff --git a/modules/git/repo_commit_gogit.go b/modules/git/repo_commit_gogit.go index 48b0cfe19..175b6e644 100644 --- a/modules/git/repo_commit_gogit.go +++ b/modules/git/repo_commit_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git @@ -30,6 +31,27 @@ func (repo *Repository) GetRefCommitID(name string) (string, error) { return ref.Hash().String(), nil } +// ConvertToSHA1 returns a Hash object from a potential ID string +func (repo *Repository) ConvertToSHA1(commitID string) (SHA1, error) { + if len(commitID) == 40 { + sha1, err := NewIDFromString(commitID) + if err == nil { + return sha1, nil + } + } + + actualCommitID, err := NewCommand("rev-parse", "--verify", commitID).RunInDir(repo.Path) + if err != nil { + if strings.Contains(err.Error(), "unknown revision or path") || + strings.Contains(err.Error(), "fatal: Needed a single revision") { + return SHA1{}, ErrNotExist{commitID, ""} + } + return SHA1{}, err + } + + return NewIDFromString(actualCommitID) +} + // IsCommitExist returns true if given commit exists in current repository. func (repo *Repository) IsCommitExist(name string) bool { hash := plumbing.NewHash(name) diff --git a/modules/git/repo_commit_nogogit.go b/modules/git/repo_commit_nogogit.go index a43fe4b33..b7e49a650 100644 --- a/modules/git/repo_commit_nogogit.go +++ b/modules/git/repo_commit_nogogit.go @@ -2,16 +2,19 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( "bufio" - "fmt" + "errors" "io" "io/ioutil" "strings" + + "code.gitea.io/gitea/modules/log" ) // ResolveReference resolves a name to a reference @@ -33,15 +36,15 @@ func (repo *Repository) ResolveReference(name string) (string, error) { // GetRefCommitID returns the last commit ID string of given reference (branch or tag). func (repo *Repository) GetRefCommitID(name string) (string, error) { - stdout, err := NewCommand("show-ref", "--verify", "--hash", name).RunInDir(repo.Path) - if err != nil { - if strings.Contains(err.Error(), "not a valid ref") { - return "", ErrNotExist{name, ""} - } - return "", err + wr, rd, cancel := repo.CatFileBatchCheck() + defer cancel() + _, _ = wr.Write([]byte(name + "\n")) + shaBs, _, _, err := ReadBatchLine(rd) + if IsErrNotExist(err) { + return "", ErrNotExist{name, ""} } - return strings.TrimSpace(stdout), nil + return string(shaBs), nil } // IsCommitExist returns true if given commit exists in current repository. @@ -51,33 +54,34 @@ func (repo *Repository) IsCommitExist(name string) bool { } func (repo *Repository) getCommit(id SHA1) (*Commit, error) { - stdoutReader, stdoutWriter := io.Pipe() - defer func() { - _ = stdoutReader.Close() - _ = stdoutWriter.Close() - }() + wr, rd, cancel := repo.CatFileBatch() + defer cancel() - go func() { - stderr := strings.Builder{} - err := NewCommand("cat-file", "--batch").RunInDirFullPipeline(repo.Path, stdoutWriter, &stderr, strings.NewReader(id.String()+"\n")) - if err != nil { - _ = stdoutWriter.CloseWithError(ConcatenateError(err, (&stderr).String())) - } else { - _ = stdoutWriter.Close() - } - }() + _, _ = wr.Write([]byte(id.String() + "\n")) - bufReader := bufio.NewReader(stdoutReader) - _, typ, size, err := ReadBatchLine(bufReader) + return repo.getCommitFromBatchReader(rd, id) +} + +func (repo *Repository) getCommitFromBatchReader(rd *bufio.Reader, id SHA1) (*Commit, error) { + _, typ, size, err := ReadBatchLine(rd) if err != nil { + if errors.Is(err, io.EOF) || IsErrNotExist(err) { + return nil, ErrNotExist{ID: id.String()} + } return nil, err } switch typ { + case "missing": + return nil, ErrNotExist{ID: id.String()} case "tag": // then we need to parse the tag // and load the commit - data, err := ioutil.ReadAll(io.LimitReader(bufReader, size)) + data, err := ioutil.ReadAll(io.LimitReader(rd, size)) + if err != nil { + return nil, err + } + _, err = rd.Discard(1) if err != nil { return nil, err } @@ -98,12 +102,50 @@ func (repo *Repository) getCommit(id SHA1) (*Commit, error) { return commit, nil case "commit": - return CommitFromReader(repo, id, io.LimitReader(bufReader, size)) + commit, err := CommitFromReader(repo, id, io.LimitReader(rd, size)) + if err != nil { + return nil, err + } + _, err = rd.Discard(1) + if err != nil { + return nil, err + } + + return commit, nil default: - _ = stdoutReader.CloseWithError(fmt.Errorf("unknown typ: %s", typ)) - log("Unknown typ: %s", typ) + log.Debug("Unknown typ: %s", typ) + _, err = rd.Discard(int(size) + 1) + if err != nil { + return nil, err + } return nil, ErrNotExist{ ID: id.String(), } } } + +// ConvertToSHA1 returns a Hash object from a potential ID string +func (repo *Repository) ConvertToSHA1(commitID string) (SHA1, error) { + if len(commitID) == 40 && SHAPattern.MatchString(commitID) { + sha1, err := NewIDFromString(commitID) + if err == nil { + return sha1, nil + } + } + + wr, rd, cancel := repo.CatFileBatchCheck() + defer cancel() + _, err := wr.Write([]byte(commitID + "\n")) + if err != nil { + return SHA1{}, err + } + sha, _, _, err := ReadBatchLine(rd) + if err != nil { + if IsErrNotExist(err) { + return SHA1{}, ErrNotExist{commitID, ""} + } + return SHA1{}, err + } + + return MustIDFromString(string(sha)), nil +} diff --git a/modules/git/repo_commit_test.go b/modules/git/repo_commit_test.go index 87dd6763b..594333484 100644 --- a/modules/git/repo_commit_test.go +++ b/modules/git/repo_commit_test.go @@ -63,3 +63,40 @@ func TestGetCommitWithBadCommitID(t *testing.T) { assert.Error(t, err) assert.True(t, IsErrNotExist(err)) } + +func TestIsCommitInBranch(t *testing.T) { + bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") + bareRepo1, err := OpenRepository(bareRepo1Path) + assert.NoError(t, err) + defer bareRepo1.Close() + + result, err := bareRepo1.IsCommitInBranch("2839944139e0de9737a044f78b0e4b40d989a9e3", "branch1") + assert.NoError(t, err) + assert.True(t, result) + + result, err = bareRepo1.IsCommitInBranch("2839944139e0de9737a044f78b0e4b40d989a9e3", "branch2") + assert.NoError(t, err) + assert.False(t, result) +} + +func TestRepository_CommitsBetweenIDs(t *testing.T) { + bareRepo1Path := filepath.Join(testReposDir, "repo4_commitsbetween") + bareRepo1, err := OpenRepository(bareRepo1Path) + assert.NoError(t, err) + defer bareRepo1.Close() + + cases := []struct { + OldID string + NewID string + ExpectedCommits int + }{ + {"fdc1b615bdcff0f0658b216df0c9209e5ecb7c78", "78a445db1eac62fe15e624e1137965969addf344", 1}, //com1 -> com2 + {"78a445db1eac62fe15e624e1137965969addf344", "fdc1b615bdcff0f0658b216df0c9209e5ecb7c78", 0}, //reset HEAD~, com2 -> com1 + {"78a445db1eac62fe15e624e1137965969addf344", "a78e5638b66ccfe7e1b4689d3d5684e42c97d7ca", 1}, //com2 -> com2_new + } + for i, c := range cases { + commits, err := bareRepo1.CommitsBetweenIDs(c.NewID, c.OldID) + assert.NoError(t, err) + assert.Equal(t, c.ExpectedCommits, len(commits), "case %d", i) + } +} diff --git a/modules/git/repo_commitgraph_gogit.go b/modules/git/repo_commitgraph_gogit.go index 677310945..84a2edb66 100644 --- a/modules/git/repo_commitgraph_gogit.go +++ b/modules/git/repo_commitgraph_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/repo_compare.go b/modules/git/repo_compare.go index 5f92bc771..5d1208aab 100644 --- a/modules/git/repo_compare.go +++ b/modules/git/repo_compare.go @@ -7,7 +7,6 @@ package git import ( "bytes" - "container/list" "fmt" "io" "regexp" @@ -20,9 +19,11 @@ import ( // CompareInfo represents needed information for comparing references. type CompareInfo struct { - MergeBase string - Commits *list.List - NumFiles int + MergeBase string + BaseCommitID string + HeadCommitID string + Commits []*Commit + NumFiles int } // GetMergeBase checks and returns merge base of two branches and the reference used as base. @@ -66,8 +67,18 @@ func (repo *Repository) GetCompareInfo(basePath, baseBranch, headBranch string) } compareInfo := new(CompareInfo) + + compareInfo.HeadCommitID, err = GetFullCommitID(repo.Path, headBranch) + if err != nil { + compareInfo.HeadCommitID = headBranch + } + compareInfo.MergeBase, remoteBranch, err = repo.GetMergeBase(tmpRemote, baseBranch, headBranch) if err == nil { + compareInfo.BaseCommitID, err = GetFullCommitID(repo.Path, remoteBranch) + if err != nil { + compareInfo.BaseCommitID = remoteBranch + } // We have a common base - therefore we know that ... should work logs, err := NewCommand("log", compareInfo.MergeBase+"..."+headBranch, prettyLogFormat).RunInDirBytes(repo.Path) if err != nil { @@ -78,11 +89,12 @@ func (repo *Repository) GetCompareInfo(basePath, baseBranch, headBranch string) return nil, fmt.Errorf("parsePrettyFormatLogToList: %v", err) } } else { - compareInfo.Commits = list.New() + compareInfo.Commits = []*Commit{} compareInfo.MergeBase, err = GetFullCommitID(repo.Path, remoteBranch) if err != nil { compareInfo.MergeBase = remoteBranch } + compareInfo.BaseCommitID = compareInfo.MergeBase } // Count number of changed files. diff --git a/modules/git/repo_language_stats_gogit.go b/modules/git/repo_language_stats_gogit.go index b5a235921..0a4cfbbc7 100644 --- a/modules/git/repo_language_stats_gogit.go +++ b/modules/git/repo_language_stats_gogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git @@ -43,7 +44,7 @@ func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, err sizes := make(map[string]int64) err = tree.Files().ForEach(func(f *object.File) error { - if f.Size == 0 || enry.IsVendor(f.Name) || enry.IsDotFile(f.Name) || + if f.Size == 0 || analyze.IsVendor(f.Name) || enry.IsDotFile(f.Name) || enry.IsDocumentation(f.Name) || enry.IsConfiguration(f.Name) { return nil } diff --git a/modules/git/repo_language_stats_nogogit.go b/modules/git/repo_language_stats_nogogit.go index 5607e4591..7425e2dbb 100644 --- a/modules/git/repo_language_stats_nogogit.go +++ b/modules/git/repo_language_stats_nogogit.go @@ -2,32 +2,56 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( + "bufio" "bytes" "io" - "io/ioutil" + "math" "code.gitea.io/gitea/modules/analyze" + "code.gitea.io/gitea/modules/log" "github.com/go-enry/go-enry/v2" ) // GetLanguageStats calculates language stats for git repository at specified commit func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, error) { - // FIXME: We can be more efficient here... - // - // We're expecting that we will be reading a lot of blobs and the trees - // Thus we should use a shared `cat-file --batch` to get all of this data - // And keep the buffers around with resets as necessary. - // - // It's more complicated so... - commit, err := repo.GetCommit(commitID) + // We will feed the commit IDs in order into cat-file --batch, followed by blobs as necessary. + // so let's create a batch stdin and stdout + batchStdinWriter, batchReader, cancel := repo.CatFileBatch() + defer cancel() + + writeID := func(id string) error { + _, err := batchStdinWriter.Write([]byte(id + "\n")) + return err + } + + if err := writeID(commitID); err != nil { + return nil, err + } + shaBytes, typ, size, err := ReadBatchLine(batchReader) + if typ != "commit" { + log.Debug("Unable to get commit for: %s. Err: %v", commitID, err) + return nil, ErrNotExist{commitID, ""} + } + + sha, err := NewIDFromString(string(shaBytes)) if err != nil { - log("Unable to get commit for: %s", commitID) + log.Debug("Unable to get commit for: %s. Err: %v", commitID, err) + return nil, ErrNotExist{commitID, ""} + } + + commit, err := CommitFromReader(repo, sha, io.LimitReader(batchReader, size)) + if err != nil { + log.Debug("Unable to get commit for: %s. Err: %v", commitID, err) + return nil, err + } + if _, err = batchReader.Discard(1); err != nil { return nil, err } @@ -38,17 +62,45 @@ func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, err return nil, err } + contentBuf := bytes.Buffer{} + var content []byte sizes := make(map[string]int64) for _, f := range entries { - if f.Size() == 0 || enry.IsVendor(f.Name()) || enry.IsDotFile(f.Name()) || + contentBuf.Reset() + content = contentBuf.Bytes() + if f.Size() == 0 || analyze.IsVendor(f.Name()) || enry.IsDotFile(f.Name()) || enry.IsDocumentation(f.Name()) || enry.IsConfiguration(f.Name()) { continue } // If content can not be read or file is too big just do detection by filename - var content []byte + if f.Size() <= bigFileSize { - content, _ = readFile(f, fileSizeLimit) + if err := writeID(f.ID.String()); err != nil { + return nil, err + } + _, _, size, err := ReadBatchLine(batchReader) + if err != nil { + log.Debug("Error reading blob: %s Err: %v", f.ID.String(), err) + return nil, err + } + + sizeToRead := size + discard := int64(1) + if size > fileSizeLimit { + sizeToRead = fileSizeLimit + discard = size - fileSizeLimit + 1 + } + + _, err = contentBuf.ReadFrom(io.LimitReader(batchReader, sizeToRead)) + if err != nil { + return nil, err + } + content = contentBuf.Bytes() + err = discardFull(batchReader, discard) + if err != nil { + return nil, err + } } if enry.IsGenerated(f.Name(), content) { continue @@ -86,24 +138,20 @@ func (repo *Repository) GetLanguageStats(commitID string) (map[string]int64, err return sizes, nil } -func readFile(entry *TreeEntry, limit int64) ([]byte, error) { - // FIXME: We can probably be a little more efficient here... see above - r, err := entry.Blob().DataAsync() - if err != nil { - return nil, err +func discardFull(rd *bufio.Reader, discard int64) error { + if discard > math.MaxInt32 { + n, err := rd.Discard(math.MaxInt32) + discard -= int64(n) + if err != nil { + return err + } } - defer r.Close() - - if limit <= 0 { - return ioutil.ReadAll(r) + for discard > 0 { + n, err := rd.Discard(int(discard)) + discard -= int64(n) + if err != nil { + return err + } } - - size := entry.Size() - if limit > 0 && size > limit { - size = limit - } - buf := bytes.NewBuffer(nil) - buf.Grow(int(size)) - _, err = io.Copy(buf, io.LimitReader(r, limit)) - return buf.Bytes(), err + return nil } diff --git a/modules/git/repo_ref_gogit.go b/modules/git/repo_ref_gogit.go index 2e83e6c46..9f0e11366 100644 --- a/modules/git/repo_ref_gogit.go +++ b/modules/git/repo_ref_gogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/repo_ref_nogogit.go b/modules/git/repo_ref_nogogit.go index 540961592..ec0c5ec4c 100644 --- a/modules/git/repo_ref_nogogit.go +++ b/modules/git/repo_ref_nogogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git diff --git a/modules/git/repo_stats.go b/modules/git/repo_stats.go index 59b817740..aca5ab21c 100644 --- a/modules/git/repo_stats.go +++ b/modules/git/repo_stats.go @@ -33,7 +33,7 @@ type CodeActivityAuthor struct { Commits int64 } -// GetCodeActivityStats returns code statistics for acitivity page +// GetCodeActivityStats returns code statistics for activity page func (repo *Repository) GetCodeActivityStats(fromTime time.Time, branch string) (*CodeActivityStats, error) { stats := &CodeActivityStats{} @@ -59,7 +59,7 @@ func (repo *Repository) GetCodeActivityStats(fromTime time.Time, branch string) _ = stdoutWriter.Close() }() - args := []string{"log", "--numstat", "--no-merges", "--pretty=format:---%n%h%n%an%n%ae%n", "--date=iso", fmt.Sprintf("--since='%s'", since)} + args := []string{"log", "--numstat", "--no-merges", "--pretty=format:---%n%h%n%aN%n%aE%n", "--date=iso", fmt.Sprintf("--since='%s'", since)} if len(branch) == 0 { args = append(args, "--branches=*") } else { diff --git a/modules/git/repo_tag.go b/modules/git/repo_tag.go index 59ab70209..44d7a048b 100644 --- a/modules/git/repo_tag.go +++ b/modules/git/repo_tag.go @@ -8,6 +8,9 @@ package git import ( "fmt" "strings" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/util" ) // TagPrefix tags prefix path on the repository @@ -33,7 +36,7 @@ func (repo *Repository) CreateAnnotatedTag(name, message, revision string) error func (repo *Repository) getTag(tagID SHA1, name string) (*Tag, error) { t, ok := repo.tagCache.Get(tagID.String()) if ok { - log("Hit cache: %s", tagID) + log.Debug("Hit cache: %s", tagID) tagClone := *t.(*Tag) tagClone.Name = name // This is necessary because lightweight tags may have same id return &tagClone, nil @@ -158,24 +161,18 @@ func (repo *Repository) GetTag(name string) (*Tag, error) { } // GetTagInfos returns all tag infos of the repository. -func (repo *Repository) GetTagInfos(page, pageSize int) ([]*Tag, error) { +func (repo *Repository) GetTagInfos(page, pageSize int) ([]*Tag, int, error) { // TODO this a slow implementation, makes one git command per tag stdout, err := NewCommand("tag").RunInDir(repo.Path) if err != nil { - return nil, err + return nil, 0, err } tagNames := strings.Split(strings.TrimRight(stdout, "\n"), "\n") + tagsTotal := len(tagNames) if page != 0 { - skip := (page - 1) * pageSize - if skip >= len(tagNames) { - return nil, nil - } - if (len(tagNames) - skip) < pageSize { - pageSize = len(tagNames) - skip - } - tagNames = tagNames[skip : skip+pageSize] + tagNames = util.PaginateSlice(tagNames, page, pageSize).([]string) } var tags = make([]*Tag, 0, len(tagNames)) @@ -187,13 +184,13 @@ func (repo *Repository) GetTagInfos(page, pageSize int) ([]*Tag, error) { tag, err := repo.GetTag(tagName) if err != nil { - return nil, err + return nil, tagsTotal, err } tag.Name = tagName tags = append(tags, tag) } sortTagsByTime(tags) - return tags, nil + return tags, tagsTotal, nil } // GetTagType gets the type of the tag, either commit (simple) or tag (annotated) diff --git a/modules/git/repo_tag_gogit.go b/modules/git/repo_tag_gogit.go index 3ac097c9a..3022fe96f 100644 --- a/modules/git/repo_tag_gogit.go +++ b/modules/git/repo_tag_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/repo_tag_nogogit.go b/modules/git/repo_tag_nogogit.go index 83cbc58e3..0170f0cc7 100644 --- a/modules/git/repo_tag_nogogit.go +++ b/modules/git/repo_tag_nogogit.go @@ -3,16 +3,22 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git // IsTagExist returns true if given tag exists in the repository. func (repo *Repository) IsTagExist(name string) bool { - return IsReferenceExist(repo.Path, TagPrefix+name) + if name == "" { + return false + } + + return repo.IsReferenceExist(TagPrefix + name) } // GetTags returns all tags of the repository. -func (repo *Repository) GetTags() ([]string, error) { - return callShowRef(repo.Path, TagPrefix, "--tags") +func (repo *Repository) GetTags() (tags []string, err error) { + tags, _, err = callShowRef(repo.Path, TagPrefix, "--tags", 0, 0) + return } diff --git a/modules/git/repo_tag_test.go b/modules/git/repo_tag_test.go index 1dee29ba5..cfab9edd8 100644 --- a/modules/git/repo_tag_test.go +++ b/modules/git/repo_tag_test.go @@ -18,9 +18,10 @@ func TestRepository_GetTags(t *testing.T) { assert.NoError(t, err) defer bareRepo1.Close() - tags, err := bareRepo1.GetTagInfos(0, 0) + tags, total, err := bareRepo1.GetTagInfos(0, 0) assert.NoError(t, err) assert.Len(t, tags, 1) + assert.Equal(t, len(tags), total) assert.EqualValues(t, "test", tags[0].Name) assert.EqualValues(t, "3ad28a9149a2864384548f3d17ed7f38014c9e8a", tags[0].ID.String()) assert.EqualValues(t, "tag", tags[0].Type) @@ -43,7 +44,7 @@ func TestRepository_GetTag(t *testing.T) { aTagCommitID := "8006ff9adbf0cb94da7dad9e537e53817f9fa5c0" aTagName := "annotatedTag" - aTagMessage := "my annotated message" + aTagMessage := "my annotated message \n - test two line" bareRepo1.CreateAnnotatedTag(aTagName, aTagMessage, aTagCommitID) aTagID, _ := bareRepo1.GetTagID(aTagName) diff --git a/modules/git/repo_test.go b/modules/git/repo_test.go index 0b6986764..9517783e6 100644 --- a/modules/git/repo_test.go +++ b/modules/git/repo_test.go @@ -7,23 +7,18 @@ package git import ( "path/filepath" "testing" - "time" "github.com/stretchr/testify/assert" ) func TestGetLatestCommitTime(t *testing.T) { - lct, err := GetLatestCommitTime(".") + bareRepo1Path := filepath.Join(testReposDir, "repo1_bare") + lct, err := GetLatestCommitTime(bareRepo1Path) assert.NoError(t, err) - // Time is in the past - now := time.Now() - assert.True(t, lct.Unix() < now.Unix(), "%d not smaller than %d", lct, now) - // Time is after Mon Oct 23 03:52:09 2017 +0300 + // Time is Sun Jul 21 22:43:13 2019 +0200 // which is the time of commit - // d47b98c44c9a6472e44ab80efe65235e11c6da2a - refTime, err := time.Parse("Mon Jan 02 15:04:05 2006 -0700", "Mon Oct 23 03:52:09 2017 +0300") - assert.NoError(t, err) - assert.True(t, lct.Unix() > refTime.Unix(), "%d not greater than %d", lct, refTime) + // feaf4ba6bc635fec442f46ddd4512416ec43c2c2 (refs/heads/master) + assert.EqualValues(t, 1563741793, lct.Unix()) } func TestRepoIsEmpty(t *testing.T) { diff --git a/modules/git/repo_tree_gogit.go b/modules/git/repo_tree_gogit.go index d878f5e7a..2ddffcf79 100644 --- a/modules/git/repo_tree_gogit.go +++ b/modules/git/repo_tree_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/repo_tree_nogogit.go b/modules/git/repo_tree_nogogit.go index 867c3fa5a..9d4268b13 100644 --- a/modules/git/repo_tree_nogogit.go +++ b/modules/git/repo_tree_nogogit.go @@ -2,38 +2,24 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( - "bufio" - "fmt" "io" "io/ioutil" - "strings" ) func (repo *Repository) getTree(id SHA1) (*Tree, error) { - stdoutReader, stdoutWriter := io.Pipe() - defer func() { - _ = stdoutReader.Close() - _ = stdoutWriter.Close() - }() + wr, rd, cancel := repo.CatFileBatch() + defer cancel() - go func() { - stderr := &strings.Builder{} - err := NewCommand("cat-file", "--batch").RunInDirFullPipeline(repo.Path, stdoutWriter, stderr, strings.NewReader(id.String()+"\n")) - if err != nil { - _ = stdoutWriter.CloseWithError(ConcatenateError(err, stderr.String())) - } else { - _ = stdoutWriter.Close() - } - }() + _, _ = wr.Write([]byte(id.String() + "\n")) - bufReader := bufio.NewReader(stdoutReader) // ignore the SHA - _, typ, size, err := ReadBatchLine(bufReader) + _, typ, size, err := ReadBatchLine(rd) if err != nil { return nil, err } @@ -41,7 +27,7 @@ func (repo *Repository) getTree(id SHA1) (*Tree, error) { switch typ { case "tag": resolvedID := id - data, err := ioutil.ReadAll(io.LimitReader(bufReader, size)) + data, err := ioutil.ReadAll(io.LimitReader(rd, size)) if err != nil { return nil, err } @@ -54,24 +40,27 @@ func (repo *Repository) getTree(id SHA1) (*Tree, error) { return nil, err } commit.Tree.ResolvedID = resolvedID - log("tag.commit.Tree: %s %v", commit.Tree.ID.String(), commit.Tree.repo) return &commit.Tree, nil case "commit": - commit, err := CommitFromReader(repo, id, io.LimitReader(bufReader, size)) + commit, err := CommitFromReader(repo, id, io.LimitReader(rd, size)) if err != nil { - _ = stdoutReader.CloseWithError(err) + return nil, err + } + if _, err := rd.Discard(1); err != nil { return nil, err } commit.Tree.ResolvedID = commit.ID - log("commit.Tree: %s %v", commit.Tree.ID.String(), commit.Tree.repo) return &commit.Tree, nil case "tree": - stdoutReader.Close() tree := NewTree(repo, id) tree.ResolvedID = id + tree.entries, err = catBatchParseTreeEntries(tree, rd, size) + if err != nil { + return nil, err + } + tree.entriesParsed = true return tree, nil default: - _ = stdoutReader.CloseWithError(fmt.Errorf("unknown typ: %s", typ)) return nil, ErrNotExist{ ID: id.String(), } @@ -81,12 +70,12 @@ func (repo *Repository) getTree(id SHA1) (*Tree, error) { // GetTree find the tree object in the repository. func (repo *Repository) GetTree(idStr string) (*Tree, error) { if len(idStr) != 40 { - res, err := NewCommand("rev-parse", "--verify", idStr).RunInDir(repo.Path) + res, err := repo.GetRefCommitID(idStr) if err != nil { return nil, err } if len(res) > 0 { - idStr = res[:len(res)-1] + idStr = res } } id, err := NewIDFromString(idStr) diff --git a/modules/git/sha1_gogit.go b/modules/git/sha1_gogit.go index 5953af58b..30290f14b 100644 --- a/modules/git/sha1_gogit.go +++ b/modules/git/sha1_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/sha1_nogogit.go b/modules/git/sha1_nogogit.go index 09b5baacd..53665fc92 100644 --- a/modules/git/sha1_nogogit.go +++ b/modules/git/sha1_nogogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git diff --git a/modules/git/signature_gogit.go b/modules/git/signature_gogit.go index 804c0074d..903a48133 100644 --- a/modules/git/signature_gogit.go +++ b/modules/git/signature_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/signature_nogogit.go b/modules/git/signature_nogogit.go index 753d87b60..c6fe8e6d1 100644 --- a/modules/git/signature_nogogit.go +++ b/modules/git/signature_nogogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git diff --git a/modules/git/tag.go b/modules/git/tag.go index 0323cc42e..23f09e25b 100644 --- a/modules/git/tag.go +++ b/modules/git/tag.go @@ -35,6 +35,7 @@ func (tag *Tag) Commit() (*Commit, error) { // \n\n separate headers from message func parseTagData(data []byte) (*Tag, error) { tag := new(Tag) + tag.Tagger = &Signature{} // we now have the contents of the commit object. Let's investigate... nextline := 0 l: diff --git a/modules/git/tests/repos/repo4_commitsbetween/HEAD b/modules/git/tests/repos/repo4_commitsbetween/HEAD new file mode 100644 index 000000000..b870d8262 --- /dev/null +++ b/modules/git/tests/repos/repo4_commitsbetween/HEAD @@ -0,0 +1 @@ +ref: refs/heads/main diff --git a/modules/git/tests/repos/repo4_commitsbetween/config b/modules/git/tests/repos/repo4_commitsbetween/config new file mode 100644 index 000000000..d545cdabd --- /dev/null +++ b/modules/git/tests/repos/repo4_commitsbetween/config @@ -0,0 +1,7 @@ +[core] + repositoryformatversion = 0 + filemode = false + bare = false + logallrefupdates = true + symlinks = false + ignorecase = true diff --git a/modules/git/tests/repos/repo4_commitsbetween/logs/HEAD b/modules/git/tests/repos/repo4_commitsbetween/logs/HEAD new file mode 100644 index 000000000..24cc684ba --- /dev/null +++ b/modules/git/tests/repos/repo4_commitsbetween/logs/HEAD @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 KN4CK3R 1624915979 +0200 commit (initial): com1 +fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 78a445db1eac62fe15e624e1137965969addf344 KN4CK3R 1624915993 +0200 commit: com2 +78a445db1eac62fe15e624e1137965969addf344 fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 KN4CK3R 1624916008 +0200 reset: moving to HEAD~1 +fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 a78e5638b66ccfe7e1b4689d3d5684e42c97d7ca KN4CK3R 1624916029 +0200 commit: com2_new diff --git a/modules/git/tests/repos/repo4_commitsbetween/logs/refs/heads/main b/modules/git/tests/repos/repo4_commitsbetween/logs/refs/heads/main new file mode 100644 index 000000000..24cc684ba --- /dev/null +++ b/modules/git/tests/repos/repo4_commitsbetween/logs/refs/heads/main @@ -0,0 +1,4 @@ +0000000000000000000000000000000000000000 fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 KN4CK3R 1624915979 +0200 commit (initial): com1 +fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 78a445db1eac62fe15e624e1137965969addf344 KN4CK3R 1624915993 +0200 commit: com2 +78a445db1eac62fe15e624e1137965969addf344 fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 KN4CK3R 1624916008 +0200 reset: moving to HEAD~1 +fdc1b615bdcff0f0658b216df0c9209e5ecb7c78 a78e5638b66ccfe7e1b4689d3d5684e42c97d7ca KN4CK3R 1624916029 +0200 commit: com2_new diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/27/734c860ab19650d48e71f9f12d9bd194ed82ea b/modules/git/tests/repos/repo4_commitsbetween/objects/27/734c860ab19650d48e71f9f12d9bd194ed82ea new file mode 100644 index 000000000..5b26f8b3a Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/27/734c860ab19650d48e71f9f12d9bd194ed82ea differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/56/a6051ca2b02b04ef92d5150c9ef600403cb1de b/modules/git/tests/repos/repo4_commitsbetween/objects/56/a6051ca2b02b04ef92d5150c9ef600403cb1de new file mode 100644 index 000000000..b17dfe30e Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/56/a6051ca2b02b04ef92d5150c9ef600403cb1de differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/78/a445db1eac62fe15e624e1137965969addf344 b/modules/git/tests/repos/repo4_commitsbetween/objects/78/a445db1eac62fe15e624e1137965969addf344 new file mode 100644 index 000000000..6d23de052 --- /dev/null +++ b/modules/git/tests/repos/repo4_commitsbetween/objects/78/a445db1eac62fe15e624e1137965969addf344 @@ -0,0 +1,3 @@ +xM +0@a=E̤I$Zl|G)îm̊uO"&`8GtI7#n6%09)8F(hl@MuS\1y=%?iu"O +Dmڃwź{pC_ \ No newline at end of file diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/a7/8e5638b66ccfe7e1b4689d3d5684e42c97d7ca b/modules/git/tests/repos/repo4_commitsbetween/objects/a7/8e5638b66ccfe7e1b4689d3d5684e42c97d7ca new file mode 100644 index 000000000..d5c554a54 Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/a7/8e5638b66ccfe7e1b4689d3d5684e42c97d7ca differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/ad/74ceca1b8fde10c7d933bd2e56d347dddb4ab5 b/modules/git/tests/repos/repo4_commitsbetween/objects/ad/74ceca1b8fde10c7d933bd2e56d347dddb4ab5 new file mode 100644 index 000000000..26ed78500 Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/ad/74ceca1b8fde10c7d933bd2e56d347dddb4ab5 differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/b5/d8dd0ddd9d8d752bb47b5f781f09f478316098 b/modules/git/tests/repos/repo4_commitsbetween/objects/b5/d8dd0ddd9d8d752bb47b5f781f09f478316098 new file mode 100644 index 000000000..8060b57df Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/b5/d8dd0ddd9d8d752bb47b5f781f09f478316098 differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/d8/263ee9860594d2806b0dfd1bfd17528b0ba2a4 b/modules/git/tests/repos/repo4_commitsbetween/objects/d8/263ee9860594d2806b0dfd1bfd17528b0ba2a4 new file mode 100644 index 000000000..4b1baefff Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/d8/263ee9860594d2806b0dfd1bfd17528b0ba2a4 differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/e2/3cc6a008501f1491b0480cedaef160e41cf684 b/modules/git/tests/repos/repo4_commitsbetween/objects/e2/3cc6a008501f1491b0480cedaef160e41cf684 new file mode 100644 index 000000000..0a7053084 Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/e2/3cc6a008501f1491b0480cedaef160e41cf684 differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/objects/fd/c1b615bdcff0f0658b216df0c9209e5ecb7c78 b/modules/git/tests/repos/repo4_commitsbetween/objects/fd/c1b615bdcff0f0658b216df0c9209e5ecb7c78 new file mode 100644 index 000000000..2e6d94584 Binary files /dev/null and b/modules/git/tests/repos/repo4_commitsbetween/objects/fd/c1b615bdcff0f0658b216df0c9209e5ecb7c78 differ diff --git a/modules/git/tests/repos/repo4_commitsbetween/refs/heads/main b/modules/git/tests/repos/repo4_commitsbetween/refs/heads/main new file mode 100644 index 000000000..9e1b981a6 --- /dev/null +++ b/modules/git/tests/repos/repo4_commitsbetween/refs/heads/main @@ -0,0 +1 @@ +a78e5638b66ccfe7e1b4689d3d5684e42c97d7ca diff --git a/modules/git/tree.go b/modules/git/tree.go index 059f0a828..3671f421e 100644 --- a/modules/git/tree.go +++ b/modules/git/tree.go @@ -6,6 +6,7 @@ package git import ( + "bytes" "strings" ) @@ -45,3 +46,23 @@ func (t *Tree) SubTree(rpath string) (*Tree, error) { } return g, nil } + +// LsTree checks if the given filenames are in the tree +func (repo *Repository) LsTree(ref string, filenames ...string) ([]string, error) { + cmd := NewCommand("ls-tree", "-z", "--name-only", "--", ref) + for _, arg := range filenames { + if arg != "" { + cmd.AddArguments(arg) + } + } + res, err := cmd.RunInDirBytes(repo.Path) + if err != nil { + return nil, err + } + filelist := make([]string, 0, len(filenames)) + for _, line := range bytes.Split(res, []byte{'\000'}) { + filelist = append(filelist, string(line)) + } + + return filelist, err +} diff --git a/modules/git/tree_blob_gogit.go b/modules/git/tree_blob_gogit.go index 93ebc8a36..a8d619cd1 100644 --- a/modules/git/tree_blob_gogit.go +++ b/modules/git/tree_blob_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/tree_blob_nogogit.go b/modules/git/tree_blob_nogogit.go index 6da0ccfe8..df23ff01b 100644 --- a/modules/git/tree_blob_nogogit.go +++ b/modules/git/tree_blob_nogogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git @@ -15,6 +16,7 @@ import ( func (t *Tree) GetTreeEntryByPath(relpath string) (*TreeEntry, error) { if len(relpath) == 0 { return &TreeEntry{ + ptree: t, ID: t.ID, name: "", fullName: "", diff --git a/modules/git/tree_entry.go b/modules/git/tree_entry.go index 498767a63..3644d00f3 100644 --- a/modules/git/tree_entry.go +++ b/modules/git/tree_entry.go @@ -34,12 +34,19 @@ func (te *TreeEntry) FollowLink() (*TreeEntry, error) { if err != nil { return nil, err } - defer r.Close() + closed := false + defer func() { + if !closed { + _ = r.Close() + } + }() buf := make([]byte, te.Size()) _, err = io.ReadFull(r, buf) if err != nil { return nil, err } + _ = r.Close() + closed = true lnk := string(buf) t := te.ptree diff --git a/modules/git/tree_entry_gogit.go b/modules/git/tree_entry_gogit.go index 219251a77..20e767eea 100644 --- a/modules/git/tree_entry_gogit.go +++ b/modules/git/tree_entry_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/tree_entry_nogogit.go b/modules/git/tree_entry_nogogit.go index f18daee77..288ec4db6 100644 --- a/modules/git/tree_entry_nogogit.go +++ b/modules/git/tree_entry_nogogit.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git @@ -84,8 +85,10 @@ func (te *TreeEntry) IsExecutable() bool { // Blob returns the blob object the entry func (te *TreeEntry) Blob() *Blob { return &Blob{ - ID: te.ID, - repoPath: te.ptree.repo.Path, - name: te.Name(), + ID: te.ID, + name: te.Name(), + size: te.size, + gotSize: te.sized, + repo: te.ptree.repo, } } diff --git a/modules/git/tree_entry_test.go b/modules/git/tree_entry_test.go index 16cfbc4fc..402c34588 100644 --- a/modules/git/tree_entry_test.go +++ b/modules/git/tree_entry_test.go @@ -2,6 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git @@ -71,33 +72,33 @@ func TestFollowLink(t *testing.T) { // should be able to dereference to target target, err := lnk.FollowLink() assert.NoError(t, err) - assert.Equal(t, target.Name(), "hello") + assert.Equal(t, "hello", target.Name()) assert.False(t, target.IsLink()) - assert.Equal(t, target.ID.String(), "b14df6442ea5a1b382985a6549b85d435376c351") + assert.Equal(t, "b14df6442ea5a1b382985a6549b85d435376c351", target.ID.String()) // should error when called on normal file target, err = commit.Tree.GetTreeEntryByPath("file1.txt") assert.NoError(t, err) _, err = target.FollowLink() - assert.Equal(t, err.Error(), "file1.txt: not a symlink") + assert.EqualError(t, err, "file1.txt: not a symlink") // should error for broken links target, err = commit.Tree.GetTreeEntryByPath("foo/broken_link") assert.NoError(t, err) assert.True(t, target.IsLink()) _, err = target.FollowLink() - assert.Equal(t, err.Error(), "broken_link: broken link") + assert.EqualError(t, err, "broken_link: broken link") // should error for external links target, err = commit.Tree.GetTreeEntryByPath("foo/outside_repo") assert.NoError(t, err) assert.True(t, target.IsLink()) _, err = target.FollowLink() - assert.Equal(t, err.Error(), "outside_repo: points outside of repo") + assert.EqualError(t, err, "outside_repo: points outside of repo") // testing fix for short link bug target, err = commit.Tree.GetTreeEntryByPath("foo/link_short") assert.NoError(t, err) _, err = target.FollowLink() - assert.Equal(t, err.Error(), "link_short: broken link") + assert.EqualError(t, err, "link_short: broken link") } diff --git a/modules/git/tree_gogit.go b/modules/git/tree_gogit.go index 79132c554..bc0208836 100644 --- a/modules/git/tree_gogit.go +++ b/modules/git/tree_gogit.go @@ -3,6 +3,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build gogit // +build gogit package git diff --git a/modules/git/tree_nogogit.go b/modules/git/tree_nogogit.go index e78115b77..3d3fd26ec 100644 --- a/modules/git/tree_nogogit.go +++ b/modules/git/tree_nogogit.go @@ -2,11 +2,14 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !gogit // +build !gogit package git import ( + "io" + "math" "strings" ) @@ -32,7 +35,53 @@ func (t *Tree) ListEntries() (Entries, error) { return t.entries, nil } - stdout, err := NewCommand("ls-tree", t.ID.String()).RunInDirBytes(t.repo.Path) + if t.repo != nil { + wr, rd, cancel := t.repo.CatFileBatch() + defer cancel() + + _, _ = wr.Write([]byte(t.ID.String() + "\n")) + _, typ, sz, err := ReadBatchLine(rd) + if err != nil { + return nil, err + } + if typ == "commit" { + treeID, err := ReadTreeID(rd, sz) + if err != nil && err != io.EOF { + return nil, err + } + _, _ = wr.Write([]byte(treeID + "\n")) + _, typ, sz, err = ReadBatchLine(rd) + if err != nil { + return nil, err + } + } + if typ == "tree" { + t.entries, err = catBatchParseTreeEntries(t, rd, sz) + if err != nil { + return nil, err + } + t.entriesParsed = true + return t.entries, nil + } + + // Not a tree just use ls-tree instead + for sz > math.MaxInt32 { + discarded, err := rd.Discard(math.MaxInt32) + sz -= int64(discarded) + if err != nil { + return nil, err + } + } + for sz > 0 { + discarded, err := rd.Discard(int(sz)) + sz -= int64(discarded) + if err != nil { + return nil, err + } + } + } + + stdout, err := NewCommand("ls-tree", "-l", t.ID.String()).RunInDirBytes(t.repo.Path) if err != nil { if strings.Contains(err.Error(), "fatal: Not a valid object name") || strings.Contains(err.Error(), "fatal: not a tree object") { return nil, ErrNotExist{ @@ -55,7 +104,7 @@ func (t *Tree) ListEntriesRecursive() (Entries, error) { if t.entriesRecursiveParsed { return t.entriesRecursive, nil } - stdout, err := NewCommand("ls-tree", "-t", "-r", t.ID.String()).RunInDirBytes(t.repo.Path) + stdout, err := NewCommand("ls-tree", "-t", "-l", "-r", t.ID.String()).RunInDirBytes(t.repo.Path) if err != nil { return nil, err } diff --git a/modules/git/utils.go b/modules/git/utils.go index d95218941..13926fba7 100644 --- a/modules/git/utils.go +++ b/modules/git/utils.go @@ -13,7 +13,7 @@ import ( "sync" ) -// ObjectCache provides thread-safe cache opeations. +// ObjectCache provides thread-safe cache operations. type ObjectCache struct { lock sync.RWMutex cache map[string]interface{} diff --git a/modules/gitgraph/graph_models.go b/modules/gitgraph/graph_models.go index 2ae38188a..ec47f0ad8 100644 --- a/modules/gitgraph/graph_models.go +++ b/modules/gitgraph/graph_models.go @@ -7,6 +7,7 @@ package gitgraph import ( "bytes" "fmt" + "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" @@ -216,10 +217,10 @@ func newRefsFromRefNames(refNames []byte) []git.Reference { continue } refName := string(refNameBytes) - if refName[0:5] == "tag: " { - refName = refName[5:] - } else if refName[0:8] == "HEAD -> " { - refName = refName[8:] + if strings.HasPrefix(refName, "tag: ") { + refName = strings.TrimPrefix(refName, "tag: ") + } else if strings.HasPrefix(refName, "HEAD -> ") { + refName = strings.TrimPrefix(refName, "HEAD -> ") } refs = append(refs, git.Reference{ Name: refName, diff --git a/modules/graceful/context.go b/modules/graceful/context.go index 1ad1109b4..9d955329a 100644 --- a/modules/graceful/context.go +++ b/modules/graceful/context.go @@ -6,17 +6,9 @@ package graceful import ( "context" - "fmt" "time" ) -// Errors for context.Err() -var ( - ErrShutdown = fmt.Errorf("Graceful Manager called Shutdown") - ErrHammer = fmt.Errorf("Graceful Manager called Hammer") - ErrTerminate = fmt.Errorf("Graceful Manager called Terminate") -) - // ChannelContext is a context that wraps a channel and error as a context type ChannelContext struct { done <-chan struct{} @@ -63,28 +55,19 @@ func (ctx *ChannelContext) Value(key interface{}) interface{} { // Callers using this context should ensure that they are registered as a running server // in order that they are waited for. func (g *Manager) ShutdownContext() context.Context { - return &ChannelContext{ - done: g.IsShutdown(), - err: ErrShutdown, - } + return g.shutdownCtx } // HammerContext returns a context.Context that is Done at hammer // Callers using this context should ensure that they are registered as a running server // in order that they are waited for. func (g *Manager) HammerContext() context.Context { - return &ChannelContext{ - done: g.IsHammer(), - err: ErrHammer, - } + return g.hammerCtx } // TerminateContext returns a context.Context that is Done at terminate // Callers using this context should ensure that they are registered as a terminating server // in order that they are waited for. func (g *Manager) TerminateContext() context.Context { - return &ChannelContext{ - done: g.IsTerminate(), - err: ErrTerminate, - } + return g.terminateCtx } diff --git a/modules/graceful/manager.go b/modules/graceful/manager.go index 903d05ed2..8c3b95c4a 100644 --- a/modules/graceful/manager.go +++ b/modules/graceful/manager.go @@ -54,8 +54,8 @@ func InitManager(ctx context.Context) { }) } -// CallbackWithContext is combined runnable and context to watch to see if the caller has finished -type CallbackWithContext func(ctx context.Context, callback func()) +// WithCallback is a runnable to call when the caller has finished +type WithCallback func(callback func()) // RunnableWithShutdownFns is a runnable with functions to run at shutdown and terminate // After the callback to atShutdown is called and is complete, the main function must return. @@ -63,7 +63,7 @@ type CallbackWithContext func(ctx context.Context, callback func()) // Please note that use of the atShutdown and atTerminate callbacks will create go-routines that will wait till their respective signals // - users must therefore be careful to only call these as necessary. // If run is not expected to run indefinitely RunWithShutdownChan is likely to be more appropriate. -type RunnableWithShutdownFns func(atShutdown, atTerminate func(context.Context, func())) +type RunnableWithShutdownFns func(atShutdown, atTerminate func(func())) // RunWithShutdownFns takes a function that has both atShutdown and atTerminate callbacks // After the callback to atShutdown is called and is complete, the main function must return. @@ -80,17 +80,21 @@ func (g *Manager) RunWithShutdownFns(run RunnableWithShutdownFns) { g.doShutdown() } }() - run(func(ctx context.Context, atShutdown func()) { - go func() { - select { - case <-g.IsShutdown(): + run(func(atShutdown func()) { + g.lock.Lock() + defer g.lock.Unlock() + g.toRunAtShutdown = append(g.toRunAtShutdown, + func() { + defer func() { + if err := recover(); err != nil { + log.Critical("PANIC during RunWithShutdownFns: %v\nStacktrace: %s", err, log.Stack(2)) + g.doShutdown() + } + }() atShutdown() - case <-ctx.Done(): - return - } - }() - }, func(ctx context.Context, atTerminate func()) { - g.RunAtTerminate(ctx, atTerminate) + }) + }, func(atTerminate func()) { + g.RunAtTerminate(atTerminate) }) } @@ -99,7 +103,7 @@ func (g *Manager) RunWithShutdownFns(run RunnableWithShutdownFns) { // (Optionally IsHammer may be waited for instead however, this should be avoided if possible.) // The callback function provided to atTerminate must return once termination is complete. // Please note that use of the atTerminate function will create a go-routine that will wait till terminate - users must therefore be careful to only call this as necessary. -type RunnableWithShutdownChan func(atShutdown <-chan struct{}, atTerminate CallbackWithContext) +type RunnableWithShutdownChan func(atShutdown <-chan struct{}, atTerminate WithCallback) // RunWithShutdownChan takes a function that has channel to watch for shutdown and atTerminate callbacks // After the atShutdown channel is closed, the main function must return once shutdown is complete. @@ -115,8 +119,8 @@ func (g *Manager) RunWithShutdownChan(run RunnableWithShutdownChan) { g.doShutdown() } }() - run(g.IsShutdown(), func(ctx context.Context, atTerminate func()) { - g.RunAtTerminate(ctx, atTerminate) + run(g.IsShutdown(), func(atTerminate func()) { + g.RunAtTerminate(atTerminate) }) } @@ -136,60 +140,65 @@ func (g *Manager) RunWithShutdownContext(run func(context.Context)) { } // RunAtTerminate adds to the terminate wait group and creates a go-routine to run the provided function at termination -func (g *Manager) RunAtTerminate(ctx context.Context, terminate func()) { +func (g *Manager) RunAtTerminate(terminate func()) { g.terminateWaitGroup.Add(1) - go func() { - defer g.terminateWaitGroup.Done() - defer func() { - if err := recover(); err != nil { - log.Critical("PANIC during RunAtTerminate: %v\nStacktrace: %s", err, log.Stack(2)) - } - }() - select { - case <-g.IsTerminate(): + g.lock.Lock() + defer g.lock.Unlock() + g.toRunAtTerminate = append(g.toRunAtTerminate, + func() { + defer g.terminateWaitGroup.Done() + defer func() { + if err := recover(); err != nil { + log.Critical("PANIC during RunAtTerminate: %v\nStacktrace: %s", err, log.Stack(2)) + } + }() terminate() - case <-ctx.Done(): - } - }() + }) } // RunAtShutdown creates a go-routine to run the provided function at shutdown func (g *Manager) RunAtShutdown(ctx context.Context, shutdown func()) { - go func() { - defer func() { - if err := recover(); err != nil { - log.Critical("PANIC during RunAtShutdown: %v\nStacktrace: %s", err, log.Stack(2)) + g.lock.Lock() + defer g.lock.Unlock() + g.toRunAtShutdown = append(g.toRunAtShutdown, + func() { + defer func() { + if err := recover(); err != nil { + log.Critical("PANIC during RunAtShutdown: %v\nStacktrace: %s", err, log.Stack(2)) + } + }() + select { + case <-ctx.Done(): + return + default: + shutdown() } - }() - select { - case <-g.IsShutdown(): - shutdown() - case <-ctx.Done(): - } - }() + }) } // RunAtHammer creates a go-routine to run the provided function at shutdown -func (g *Manager) RunAtHammer(ctx context.Context, hammer func()) { - go func() { - defer func() { - if err := recover(); err != nil { - log.Critical("PANIC during RunAtHammer: %v\nStacktrace: %s", err, log.Stack(2)) - } - }() - select { - case <-g.IsHammer(): +func (g *Manager) RunAtHammer(hammer func()) { + g.lock.Lock() + defer g.lock.Unlock() + g.toRunAtHammer = append(g.toRunAtHammer, + func() { + defer func() { + if err := recover(); err != nil { + log.Critical("PANIC during RunAtHammer: %v\nStacktrace: %s", err, log.Stack(2)) + } + }() hammer() - case <-ctx.Done(): - } - }() + }) } func (g *Manager) doShutdown() { if !g.setStateTransition(stateRunning, stateShuttingDown) { return } g.lock.Lock() - close(g.shutdown) + g.shutdownCtxCancel() + for _, fn := range g.toRunAtShutdown { + go fn() + } g.lock.Unlock() if setting.GracefulHammerTime >= 0 { @@ -203,7 +212,7 @@ func (g *Manager) doShutdown() { g.doTerminate() g.WaitForTerminate() g.lock.Lock() - close(g.done) + g.doneCtxCancel() g.lock.Unlock() }() } @@ -212,10 +221,13 @@ func (g *Manager) doHammerTime(d time.Duration) { time.Sleep(d) g.lock.Lock() select { - case <-g.hammer: + case <-g.hammerCtx.Done(): default: log.Warn("Setting Hammer condition") - close(g.hammer) + g.hammerCtxCancel() + for _, fn := range g.toRunAtHammer { + go fn() + } } g.lock.Unlock() } @@ -226,10 +238,13 @@ func (g *Manager) doTerminate() { } g.lock.Lock() select { - case <-g.terminate: + case <-g.terminateCtx.Done(): default: log.Warn("Terminating") - close(g.terminate) + g.terminateCtxCancel() + for _, fn := range g.toRunAtTerminate { + go fn() + } } g.lock.Unlock() } @@ -242,7 +257,7 @@ func (g *Manager) IsChild() bool { // IsShutdown returns a channel which will be closed at shutdown. // The order of closure is IsShutdown, IsHammer (potentially), IsTerminate func (g *Manager) IsShutdown() <-chan struct{} { - return g.shutdown + return g.shutdownCtx.Done() } // IsHammer returns a channel which will be closed at hammer @@ -250,14 +265,14 @@ func (g *Manager) IsShutdown() <-chan struct{} { // Servers running within the running server wait group should respond to IsHammer // if not shutdown already func (g *Manager) IsHammer() <-chan struct{} { - return g.hammer + return g.hammerCtx.Done() } // IsTerminate returns a channel which will be closed at terminate // The order of closure is IsShutdown, IsHammer (potentially), IsTerminate // IsTerminate will only close once all running servers have stopped func (g *Manager) IsTerminate() <-chan struct{} { - return g.terminate + return g.terminateCtx.Done() } // ServerDone declares a running server done and subtracts one from the @@ -314,25 +329,20 @@ func (g *Manager) InformCleanup() { // Done allows the manager to be viewed as a context.Context, it returns a channel that is closed when the server is finished terminating func (g *Manager) Done() <-chan struct{} { - return g.done + return g.doneCtx.Done() } -// Err allows the manager to be viewed as a context.Context done at Terminate, it returns ErrTerminate +// Err allows the manager to be viewed as a context.Context done at Terminate func (g *Manager) Err() error { - select { - case <-g.Done(): - return ErrTerminate - default: - return nil - } + return g.doneCtx.Err() } -// Value allows the manager to be viewed as a context.Context done at Terminate, it has no values +// Value allows the manager to be viewed as a context.Context done at Terminate func (g *Manager) Value(key interface{}) interface{} { - return nil + return g.doneCtx.Value(key) } // Deadline returns nil as there is no fixed Deadline for the manager, it allows the manager to be viewed as a context.Context func (g *Manager) Deadline() (deadline time.Time, ok bool) { - return + return g.doneCtx.Deadline() } diff --git a/modules/graceful/manager_unix.go b/modules/graceful/manager_unix.go index 540974454..fcbb16a3b 100644 --- a/modules/graceful/manager_unix.go +++ b/modules/graceful/manager_unix.go @@ -1,9 +1,10 @@ -// +build !windows - // Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !windows +// +build !windows + package graceful import ( @@ -25,13 +26,21 @@ type Manager struct { forked bool lock *sync.RWMutex state state - shutdown chan struct{} - hammer chan struct{} - terminate chan struct{} - done chan struct{} + shutdownCtx context.Context + hammerCtx context.Context + terminateCtx context.Context + doneCtx context.Context + shutdownCtxCancel context.CancelFunc + hammerCtxCancel context.CancelFunc + terminateCtxCancel context.CancelFunc + doneCtxCancel context.CancelFunc runningServerWaitGroup sync.WaitGroup createServerWaitGroup sync.WaitGroup terminateWaitGroup sync.WaitGroup + + toRunAtShutdown []func() + toRunAtHammer []func() + toRunAtTerminate []func() } func newGracefulManager(ctx context.Context) *Manager { @@ -45,11 +54,11 @@ func newGracefulManager(ctx context.Context) *Manager { } func (g *Manager) start(ctx context.Context) { - // Make channels - g.terminate = make(chan struct{}) - g.shutdown = make(chan struct{}) - g.hammer = make(chan struct{}) - g.done = make(chan struct{}) + // Make contexts + g.terminateCtx, g.terminateCtxCancel = context.WithCancel(ctx) + g.shutdownCtx, g.shutdownCtxCancel = context.WithCancel(ctx) + g.hammerCtx, g.hammerCtxCancel = context.WithCancel(ctx) + g.doneCtx, g.doneCtxCancel = context.WithCancel(ctx) // Set the running state & handle signals g.setState(stateRunning) diff --git a/modules/graceful/manager_windows.go b/modules/graceful/manager_windows.go index 1ebdaa197..e5f5541ed 100644 --- a/modules/graceful/manager_windows.go +++ b/modules/graceful/manager_windows.go @@ -1,10 +1,11 @@ -// +build windows - // Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. // This code is heavily inspired by the archived gofacebook/gracenet/net.go handler +//go:build windows +// +build windows + package graceful import ( @@ -36,14 +37,22 @@ type Manager struct { isChild bool lock *sync.RWMutex state state - shutdown chan struct{} - hammer chan struct{} - terminate chan struct{} - done chan struct{} + shutdownCtx context.Context + hammerCtx context.Context + terminateCtx context.Context + doneCtx context.Context + shutdownCtxCancel context.CancelFunc + hammerCtxCancel context.CancelFunc + terminateCtxCancel context.CancelFunc + doneCtxCancel context.CancelFunc runningServerWaitGroup sync.WaitGroup createServerWaitGroup sync.WaitGroup terminateWaitGroup sync.WaitGroup shutdownRequested chan struct{} + + toRunAtShutdown []func() + toRunAtHammer []func() + toRunAtTerminate []func() } func newGracefulManager(ctx context.Context) *Manager { @@ -58,27 +67,33 @@ func newGracefulManager(ctx context.Context) *Manager { } func (g *Manager) start() { + // Make contexts + g.terminateCtx, g.terminateCtxCancel = context.WithCancel(g.ctx) + g.shutdownCtx, g.shutdownCtxCancel = context.WithCancel(g.ctx) + g.hammerCtx, g.hammerCtxCancel = context.WithCancel(g.ctx) + g.doneCtx, g.doneCtxCancel = context.WithCancel(g.ctx) + // Make channels - g.terminate = make(chan struct{}) - g.shutdown = make(chan struct{}) - g.hammer = make(chan struct{}) - g.done = make(chan struct{}) g.shutdownRequested = make(chan struct{}) // Set the running state g.setState(stateRunning) if skip, _ := strconv.ParseBool(os.Getenv("SKIP_MINWINSVC")); skip { + log.Trace("Skipping SVC check as SKIP_MINWINSVC is set") return } // Make SVC process run := svc.Run - isInteractive, err := svc.IsWindowsService() + + //lint:ignore SA1019 We use IsAnInteractiveSession because IsWindowsService has a different permissions profile + isAnInteractiveSession, err := svc.IsAnInteractiveSession() if err != nil { - log.Error("Unable to ascertain if running as an Interactive Session: %v", err) + log.Error("Unable to ascertain if running as an Windows Service: %v", err) return } - if isInteractive { + if isAnInteractiveSession { + log.Trace("Not running a service ... using the debug SVC manager") run = debug.Run } go func() { @@ -94,38 +109,49 @@ func (g *Manager) Execute(args []string, changes <-chan svc.ChangeRequest, statu status <- svc.Status{State: svc.StartPending, WaitHint: uint32(setting.StartupTimeout / time.Millisecond)} } + log.Trace("Awaiting server start-up") // Now need to wait for everything to start... if !g.awaitServer(setting.StartupTimeout) { + log.Trace("... start-up failed ... Stopped") return false, 1 } + log.Trace("Sending Running state to SVC") + // We need to implement some way of svc.AcceptParamChange/svc.ParamChange status <- svc.Status{ State: svc.Running, Accepts: svc.AcceptStop | svc.AcceptShutdown | acceptHammerCode, } + log.Trace("Started") + waitTime := 30 * time.Second loop: for { select { case <-g.ctx.Done(): + log.Trace("Shutting down") g.DoGracefulShutdown() waitTime += setting.GracefulHammerTime break loop case <-g.shutdownRequested: + log.Trace("Shutting down") waitTime += setting.GracefulHammerTime break loop case change := <-changes: switch change.Cmd { case svc.Interrogate: + log.Trace("SVC sent interrogate") status <- change.CurrentStatus case svc.Stop, svc.Shutdown: + log.Trace("SVC requested shutdown - shutting down") g.DoGracefulShutdown() waitTime += setting.GracefulHammerTime break loop case hammerCode: + log.Trace("SVC requested hammer - shutting down and hammering immediately") g.DoGracefulShutdown() g.DoImmediateHammer() break loop @@ -134,6 +160,8 @@ loop: } } } + + log.Trace("Sending StopPending state to SVC") status <- svc.Status{ State: svc.StopPending, WaitHint: uint32(waitTime / time.Millisecond), @@ -145,17 +173,21 @@ hammerLoop: case change := <-changes: switch change.Cmd { case svc.Interrogate: + log.Trace("SVC sent interrogate") status <- change.CurrentStatus case svc.Stop, svc.Shutdown, hammerCmd: + log.Trace("SVC requested hammer - hammering immediately") g.DoImmediateHammer() break hammerLoop default: log.Debug("Unexpected control request: %v", change.Cmd) } - case <-g.hammer: + case <-g.hammerCtx.Done(): break hammerLoop } } + + log.Trace("Stopped") return false, 0 } diff --git a/modules/graceful/net_unix.go b/modules/graceful/net_unix.go index 2dc714955..6ffa8150c 100644 --- a/modules/graceful/net_unix.go +++ b/modules/graceful/net_unix.go @@ -1,10 +1,11 @@ -// +build !windows - // Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. // This code is heavily inspired by the archived gofacebook/gracenet/net.go handler +//go:build !windows +// +build !windows + package graceful import ( diff --git a/modules/graceful/net_windows.go b/modules/graceful/net_windows.go index 3fc143349..35b7a9d1f 100644 --- a/modules/graceful/net_windows.go +++ b/modules/graceful/net_windows.go @@ -1,10 +1,11 @@ -// +build windows - // Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. // This code is heavily inspired by the archived gofacebook/gracenet/net.go handler +//go:build windows +// +build windows + package graceful import "net" diff --git a/modules/graceful/restart_unix.go b/modules/graceful/restart_unix.go index 9a94e5fa6..392ed60cb 100644 --- a/modules/graceful/restart_unix.go +++ b/modules/graceful/restart_unix.go @@ -1,10 +1,11 @@ -// +build !windows - // Copyright 2019 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. // This code is heavily inspired by the archived gofacebook/gracenet/net.go handler +//go:build !windows +// +build !windows + package graceful import ( diff --git a/modules/graceful/server.go b/modules/graceful/server.go index e7394f349..6b7d4a1a9 100644 --- a/modules/graceful/server.go +++ b/modules/graceful/server.go @@ -17,6 +17,7 @@ import ( "time" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" ) var ( @@ -26,6 +27,10 @@ var ( DefaultWriteTimeOut time.Duration // DefaultMaxHeaderBytes default max header bytes DefaultMaxHeaderBytes int + // PerWriteWriteTimeout timeout for writes + PerWriteWriteTimeout = 30 * time.Second + // PerWriteWriteTimeoutKbTime is a timeout taking account of how much there is to be written + PerWriteWriteTimeoutKbTime = 10 * time.Second ) func init() { @@ -37,29 +42,33 @@ type ServeFunction = func(net.Listener) error // Server represents our graceful server type Server struct { - network string - address string - listener net.Listener - wg sync.WaitGroup - state state - lock *sync.RWMutex - BeforeBegin func(network, address string) - OnShutdown func() + network string + address string + listener net.Listener + wg sync.WaitGroup + state state + lock *sync.RWMutex + BeforeBegin func(network, address string) + OnShutdown func() + PerWriteTimeout time.Duration + PerWritePerKbTimeout time.Duration } // NewServer creates a server on network at provided address -func NewServer(network, address string) *Server { +func NewServer(network, address, name string) *Server { if GetManager().IsChild() { - log.Info("Restarting new server: %s:%s on PID: %d", network, address, os.Getpid()) + log.Info("Restarting new %s server: %s:%s on PID: %d", name, network, address, os.Getpid()) } else { - log.Info("Starting new server: %s:%s on PID: %d", network, address, os.Getpid()) + log.Info("Starting new %s server: %s:%s on PID: %d", name, network, address, os.Getpid()) } srv := &Server{ - wg: sync.WaitGroup{}, - state: stateInit, - lock: &sync.RWMutex{}, - network: network, - address: address, + wg: sync.WaitGroup{}, + state: stateInit, + lock: &sync.RWMutex{}, + network: network, + address: address, + PerWriteTimeout: setting.PerWriteTimeout, + PerWritePerKbTimeout: setting.PerWritePerKbTimeout, } srv.BeforeBegin = func(network, addr string) { @@ -97,7 +106,7 @@ func (srv *Server) ListenAndServe(serve ServeFunction) error { func (srv *Server) ListenAndServeTLS(certFile, keyFile string, serve ServeFunction) error { config := &tls.Config{} if config.NextProtos == nil { - config.NextProtos = []string{"http/1.1"} + config.NextProtos = []string{"h2", "http/1.1"} } config.Certificates = make([]tls.Certificate, 1) @@ -221,9 +230,11 @@ func (wl *wrappedListener) Accept() (net.Conn, error) { closed := int32(0) c = wrappedConn{ - Conn: c, - server: wl.server, - closed: &closed, + Conn: c, + server: wl.server, + closed: &closed, + perWriteTimeout: wl.server.PerWriteTimeout, + perWritePerKbTimeout: wl.server.PerWritePerKbTimeout, } wl.server.wg.Add(1) @@ -246,8 +257,25 @@ func (wl *wrappedListener) File() (*os.File, error) { type wrappedConn struct { net.Conn - server *Server - closed *int32 + server *Server + closed *int32 + deadline time.Time + perWriteTimeout time.Duration + perWritePerKbTimeout time.Duration +} + +func (w wrappedConn) Write(p []byte) (n int, err error) { + if w.perWriteTimeout > 0 { + minTimeout := time.Duration(len(p)/1024) * w.perWritePerKbTimeout + minDeadline := time.Now().Add(minTimeout).Add(w.perWriteTimeout) + + w.deadline = w.deadline.Add(minTimeout) + if minDeadline.After(w.deadline) { + w.deadline = minDeadline + } + _ = w.Conn.SetWriteDeadline(w.deadline) + } + return w.Conn.Write(p) } func (w wrappedConn) Close() error { diff --git a/modules/graceful/server_http.go b/modules/graceful/server_http.go index 1052637d5..4471e379e 100644 --- a/modules/graceful/server_http.go +++ b/modules/graceful/server_http.go @@ -5,17 +5,20 @@ package graceful import ( + "context" "crypto/tls" + "net" "net/http" ) -func newHTTPServer(network, address string, handler http.Handler) (*Server, ServeFunction) { - server := NewServer(network, address) +func newHTTPServer(network, address, name string, handler http.Handler) (*Server, ServeFunction) { + server := NewServer(network, address, name) httpServer := http.Server{ ReadTimeout: DefaultReadTimeOut, WriteTimeout: DefaultWriteTimeOut, MaxHeaderBytes: DefaultMaxHeaderBytes, Handler: handler, + BaseContext: func(net.Listener) context.Context { return GetManager().HammerContext() }, } server.OnShutdown = func() { httpServer.SetKeepAlivesEnabled(false) @@ -25,21 +28,21 @@ func newHTTPServer(network, address string, handler http.Handler) (*Server, Serv // HTTPListenAndServe listens on the provided network address and then calls Serve // to handle requests on incoming connections. -func HTTPListenAndServe(network, address string, handler http.Handler) error { - server, lHandler := newHTTPServer(network, address, handler) +func HTTPListenAndServe(network, address, name string, handler http.Handler) error { + server, lHandler := newHTTPServer(network, address, name, handler) return server.ListenAndServe(lHandler) } // HTTPListenAndServeTLS listens on the provided network address and then calls Serve // to handle requests on incoming connections. -func HTTPListenAndServeTLS(network, address, certFile, keyFile string, handler http.Handler) error { - server, lHandler := newHTTPServer(network, address, handler) +func HTTPListenAndServeTLS(network, address, name, certFile, keyFile string, handler http.Handler) error { + server, lHandler := newHTTPServer(network, address, name, handler) return server.ListenAndServeTLS(certFile, keyFile, lHandler) } // HTTPListenAndServeTLSConfig listens on the provided network address and then calls Serve // to handle requests on incoming connections. -func HTTPListenAndServeTLSConfig(network, address string, tlsConfig *tls.Config, handler http.Handler) error { - server, lHandler := newHTTPServer(network, address, handler) +func HTTPListenAndServeTLSConfig(network, address, name string, tlsConfig *tls.Config, handler http.Handler) error { + server, lHandler := newHTTPServer(network, address, name, handler) return server.ListenAndServeTLSConfig(tlsConfig, lHandler) } diff --git a/modules/highlight/highlight.go b/modules/highlight/highlight.go index 914ba8210..079f7a44b 100644 --- a/modules/highlight/highlight.go +++ b/modules/highlight/highlight.go @@ -8,6 +8,7 @@ package highlight import ( "bufio" "bytes" + "fmt" gohtml "html" "path/filepath" "strings" @@ -16,9 +17,11 @@ import ( "code.gitea.io/gitea/modules/analyze" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "github.com/alecthomas/chroma" "github.com/alecthomas/chroma/formatters/html" "github.com/alecthomas/chroma/lexers" "github.com/alecthomas/chroma/styles" + lru "github.com/hashicorp/golang-lru" ) // don't index files larger than this many bytes for performance purposes @@ -29,6 +32,8 @@ var ( highlightMapping = map[string]string{} once sync.Once + + cache *lru.TwoQueueCache ) // NewContext loads custom highlight map from local config @@ -38,6 +43,13 @@ func NewContext() { for i := range keys { highlightMapping[keys[i].Name()] = keys[i].Value() } + + // The size 512 is simply a conservative rule of thumb + c, err := lru.New2Q(512) + if err != nil { + panic(fmt.Sprintf("failed to initialize LRU cache for highlighter: %s", err)) + } + cache = c }) } @@ -66,14 +78,24 @@ func Code(fileName, code string) string { htmlbuf := bytes.Buffer{} htmlw := bufio.NewWriter(&htmlbuf) + var lexer chroma.Lexer if val, ok := highlightMapping[filepath.Ext(fileName)]; ok { - //change file name to one with mapped extension so we look that up instead - fileName = "mapped." + val + //use mapped value to find lexer + lexer = lexers.Get(val) } - lexer := lexers.Match(fileName) if lexer == nil { - lexer = lexers.Fallback + if l, ok := cache.Get(fileName); ok { + lexer = l.(chroma.Lexer) + } + } + + if lexer == nil { + lexer = lexers.Match(fileName) + if lexer == nil { + lexer = lexers.Fallback + } + cache.Add(fileName, lexer) } iterator, err := lexer.Tokenise(nil, string(code)) @@ -94,8 +116,8 @@ func Code(fileName, code string) string { return strings.TrimSuffix(htmlbuf.String(), "\n") } -// File returns map with line lumbers and HTML version of code with chroma syntax highlighting classes -func File(numLines int, fileName string, code []byte) map[int]string { +// File returns a slice of chroma syntax highlighted lines of code +func File(numLines int, fileName string, code []byte) []string { NewContext() if len(code) > sizeLimit { @@ -114,17 +136,20 @@ func File(numLines int, fileName string, code []byte) map[int]string { htmlbuf := bytes.Buffer{} htmlw := bufio.NewWriter(&htmlbuf) + var lexer chroma.Lexer if val, ok := highlightMapping[filepath.Ext(fileName)]; ok { - fileName = "test." + val + lexer = lexers.Get(val) } - language := analyze.GetCodeLanguage(fileName, code) - - lexer := lexers.Get(language) if lexer == nil { - lexer = lexers.Match(fileName) + language := analyze.GetCodeLanguage(fileName, code) + + lexer = lexers.Get(language) if lexer == nil { - lexer = lexers.Fallback + lexer = lexers.Match(fileName) + if lexer == nil { + lexer = lexers.Fallback + } } } @@ -141,30 +166,41 @@ func File(numLines int, fileName string, code []byte) map[int]string { } htmlw.Flush() - m := make(map[int]string, numLines) - for k, v := range strings.SplitN(htmlbuf.String(), "\n", numLines) { - line := k + 1 + finalNewLine := false + if len(code) > 0 { + finalNewLine = code[len(code)-1] == '\n' + } + + m := make([]string, 0, numLines) + for _, v := range strings.SplitN(htmlbuf.String(), "\n", numLines) { content := string(v) //need to keep lines that are only \n so copy/paste works properly in browser if content == "" { content = "\n" + } else if content == `` { + content += "\n" } - m[line] = content + content = strings.TrimSuffix(content, ``) + content = strings.TrimPrefix(content, ``) + m = append(m, content) } + if finalNewLine { + m = append(m, "\n") + } + return m } // return unhiglighted map -func plainText(code string, numLines int) map[int]string { - m := make(map[int]string, numLines) - for k, v := range strings.SplitN(string(code), "\n", numLines) { - line := k + 1 +func plainText(code string, numLines int) []string { + m := make([]string, 0, numLines) + for _, v := range strings.SplitN(string(code), "\n", numLines) { content := string(v) //need to keep lines that are only \n so copy/paste works properly in browser if content == "" { content = "\n" } - m[line] = gohtml.EscapeString(content) + m = append(m, gohtml.EscapeString(content)) } return m } diff --git a/modules/highlight/highlight_test.go b/modules/highlight/highlight_test.go new file mode 100644 index 000000000..0a67e4c60 --- /dev/null +++ b/modules/highlight/highlight_test.go @@ -0,0 +1,103 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package highlight + +import ( + "reflect" + "testing" + + "code.gitea.io/gitea/modules/setting" + "gopkg.in/ini.v1" +) + +func TestFile(t *testing.T) { + setting.Cfg = ini.Empty() + tests := []struct { + name string + numLines int + fileName string + code string + want []string + }{ + { + name: ".drone.yml", + numLines: 12, + fileName: ".drone.yml", + code: `kind: pipeline +name: default + +steps: +- name: test + image: golang:1.13 + environment: + GOPROXY: https://goproxy.cn + commands: + - go get -u + - go build -v + - go test -v -race -coverprofile=coverage.txt -covermode=atomic +`, + want: []string{ + `kind: pipeline`, + `name: default`, + ` +`, + `steps:`, + `- name: test`, + ` image: golang:1.13`, + ` environment:`, + ` GOPROXY: https://goproxy.cn`, + ` commands:`, + ` - go get -u`, + ` - go build -v`, + ` - go test -v -race -coverprofile=coverage.txt -covermode=atomic +`, + ` +`, + }, + }, + { + name: ".drone.yml - trailing space", + numLines: 13, + fileName: ".drone.yml", + code: `kind: pipeline +name: default ` + ` + +steps: +- name: test + image: golang:1.13 + environment: + GOPROXY: https://goproxy.cn + commands: + - go get -u + - go build -v + - go test -v -race -coverprofile=coverage.txt -covermode=atomic + `, + want: []string{ + `kind: pipeline`, + `name: default `, + ` +`, + `steps:`, + `- name: test`, + ` image: golang:1.13`, + ` environment:`, + ` GOPROXY: https://goproxy.cn`, + ` commands:`, + ` - go get -u`, + ` - go build -v`, + ` - go test -v -race -coverprofile=coverage.txt -covermode=atomic`, + ` `, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := File(tt.numLines, tt.fileName, []byte(tt.code)); !reflect.DeepEqual(got, tt.want) { + t.Errorf("File() = %v, want %v", got, tt.want) + } + }) + } +} diff --git a/modules/httpcache/httpcache.go b/modules/httpcache/httpcache.go index c4134f8e1..f5e3906be 100644 --- a/modules/httpcache/httpcache.go +++ b/modules/httpcache/httpcache.go @@ -10,6 +10,7 @@ import ( "net/http" "os" "strconv" + "strings" "time" "code.gitea.io/gitea/modules/setting" @@ -17,7 +18,7 @@ import ( // GetCacheControl returns a suitable "Cache-Control" header value func GetCacheControl() string { - if setting.RunMode == "dev" { + if !setting.IsProd() { return "no-store" } return "private, max-age=" + strconv.FormatInt(int64(setting.StaticCacheTime.Seconds()), 10) @@ -26,11 +27,13 @@ func GetCacheControl() string { // generateETag generates an ETag based on size, filename and file modification time func generateETag(fi os.FileInfo) string { etag := fmt.Sprint(fi.Size()) + fi.Name() + fi.ModTime().UTC().Format(http.TimeFormat) - return base64.StdEncoding.EncodeToString([]byte(etag)) + return `"` + base64.StdEncoding.EncodeToString([]byte(etag)) + `"` } // HandleTimeCache handles time-based caching for a HTTP request func HandleTimeCache(req *http.Request, w http.ResponseWriter, fi os.FileInfo) (handled bool) { + w.Header().Set("Cache-Control", GetCacheControl()) + ifModifiedSince := req.Header.Get("If-Modified-Since") if ifModifiedSince != "" { t, err := time.Parse(http.TimeFormat, ifModifiedSince) @@ -40,20 +43,40 @@ func HandleTimeCache(req *http.Request, w http.ResponseWriter, fi os.FileInfo) ( } } - w.Header().Set("Cache-Control", GetCacheControl()) w.Header().Set("Last-Modified", fi.ModTime().Format(http.TimeFormat)) return false } -// HandleEtagCache handles ETag-based caching for a HTTP request -func HandleEtagCache(req *http.Request, w http.ResponseWriter, fi os.FileInfo) (handled bool) { +// HandleFileETagCache handles ETag-based caching for a HTTP request +func HandleFileETagCache(req *http.Request, w http.ResponseWriter, fi os.FileInfo) (handled bool) { etag := generateETag(fi) - if req.Header.Get("If-None-Match") == etag { - w.WriteHeader(http.StatusNotModified) - return true - } + return HandleGenericETagCache(req, w, etag) +} +// HandleGenericETagCache handles ETag-based caching for a HTTP request. +// It returns true if the request was handled. +func HandleGenericETagCache(req *http.Request, w http.ResponseWriter, etag string) (handled bool) { + if len(etag) > 0 { + w.Header().Set("Etag", etag) + if checkIfNoneMatchIsValid(req, etag) { + w.WriteHeader(http.StatusNotModified) + return true + } + } w.Header().Set("Cache-Control", GetCacheControl()) - w.Header().Set("ETag", etag) + return false +} + +// checkIfNoneMatchIsValid tests if the header If-None-Match matches the ETag +func checkIfNoneMatchIsValid(req *http.Request, etag string) bool { + ifNoneMatch := req.Header.Get("If-None-Match") + if len(ifNoneMatch) > 0 { + for _, item := range strings.Split(ifNoneMatch, ",") { + item = strings.TrimSpace(item) + if item == etag { + return true + } + } + } return false } diff --git a/modules/httpcache/httpcache_test.go b/modules/httpcache/httpcache_test.go new file mode 100644 index 000000000..fe5ca1795 --- /dev/null +++ b/modules/httpcache/httpcache_test.go @@ -0,0 +1,144 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package httpcache + +import ( + "net/http" + "net/http/httptest" + "os" + "testing" + "time" + + "github.com/stretchr/testify/assert" +) + +type mockFileInfo struct { +} + +func (m mockFileInfo) Name() string { return "gitea.test" } +func (m mockFileInfo) Size() int64 { return int64(10) } +func (m mockFileInfo) Mode() os.FileMode { return os.ModePerm } +func (m mockFileInfo) ModTime() time.Time { return time.Time{} } +func (m mockFileInfo) IsDir() bool { return false } +func (m mockFileInfo) Sys() interface{} { return nil } + +func TestHandleFileETagCache(t *testing.T) { + fi := mockFileInfo{} + etag := `"MTBnaXRlYS50ZXN0TW9uLCAwMSBKYW4gMDAwMSAwMDowMDowMCBHTVQ="` + + t.Run("No_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + handled := HandleFileETagCache(req, w, fi) + + assert.False(t, handled) + assert.Len(t, w.Header(), 2) + assert.Contains(t, w.Header(), "Cache-Control") + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + }) + t.Run("Wrong_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + req.Header.Set("If-None-Match", `"wrong etag"`) + + handled := HandleFileETagCache(req, w, fi) + + assert.False(t, handled) + assert.Len(t, w.Header(), 2) + assert.Contains(t, w.Header(), "Cache-Control") + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + }) + t.Run("Correct_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + req.Header.Set("If-None-Match", etag) + + handled := HandleFileETagCache(req, w, fi) + + assert.True(t, handled) + assert.Len(t, w.Header(), 1) + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + assert.Equal(t, http.StatusNotModified, w.Code) + }) +} + +func TestHandleGenericETagCache(t *testing.T) { + etag := `"test"` + + t.Run("No_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + handled := HandleGenericETagCache(req, w, etag) + + assert.False(t, handled) + assert.Len(t, w.Header(), 2) + assert.Contains(t, w.Header(), "Cache-Control") + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + }) + t.Run("Wrong_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + req.Header.Set("If-None-Match", `"wrong etag"`) + + handled := HandleGenericETagCache(req, w, etag) + + assert.False(t, handled) + assert.Len(t, w.Header(), 2) + assert.Contains(t, w.Header(), "Cache-Control") + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + }) + t.Run("Correct_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + req.Header.Set("If-None-Match", etag) + + handled := HandleGenericETagCache(req, w, etag) + + assert.True(t, handled) + assert.Len(t, w.Header(), 1) + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + assert.Equal(t, http.StatusNotModified, w.Code) + }) + t.Run("Multiple_Wrong_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + req.Header.Set("If-None-Match", `"wrong etag", "wrong etag "`) + + handled := HandleGenericETagCache(req, w, etag) + + assert.False(t, handled) + assert.Len(t, w.Header(), 2) + assert.Contains(t, w.Header(), "Cache-Control") + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + }) + t.Run("Multiple_Correct_If-None-Match", func(t *testing.T) { + req := &http.Request{Header: make(http.Header)} + w := httptest.NewRecorder() + + req.Header.Set("If-None-Match", `"wrong etag", `+etag) + + handled := HandleGenericETagCache(req, w, etag) + + assert.True(t, handled) + assert.Len(t, w.Header(), 1) + assert.Contains(t, w.Header(), "Etag") + assert.Equal(t, etag, w.Header().Get("Etag")) + assert.Equal(t, http.StatusNotModified, w.Code) + }) +} diff --git a/modules/httplib/httplib.go b/modules/httplib/httplib.go index 90bbe8f12..aecdd4346 100644 --- a/modules/httplib/httplib.go +++ b/modules/httplib/httplib.go @@ -7,8 +7,8 @@ package httplib import ( "bytes" + "context" "crypto/tls" - "encoding/json" "encoding/xml" "io" "io/ioutil" @@ -23,6 +23,8 @@ import ( "strings" "sync" "time" + + "code.gitea.io/gitea/modules/json" ) var defaultSetting = Settings{false, "GiteaServer", 60 * time.Second, 60 * time.Second, nil, nil, nil, false} @@ -121,6 +123,12 @@ func (r *Request) Setting(setting Settings) *Request { return r } +// SetContext sets the request's Context +func (r *Request) SetContext(ctx context.Context) *Request { + r.req = r.req.WithContext(ctx) + return r +} + // SetBasicAuth sets the request's Authorization header to use HTTP Basic Authentication with the provided username and password. func (r *Request) SetBasicAuth(username, password string) *Request { r.req.SetBasicAuth(username, password) @@ -324,7 +332,7 @@ func (r *Request) getResponse() (*http.Response, error) { trans = &http.Transport{ TLSClientConfig: r.setting.TLSClientConfig, Proxy: proxy, - Dial: TimeoutDialer(r.setting.ConnectTimeout, r.setting.ReadWriteTimeout), + DialContext: TimeoutDialer(r.setting.ConnectTimeout), } } else if t, ok := trans.(*http.Transport); ok { if t.TLSClientConfig == nil { @@ -333,8 +341,8 @@ func (r *Request) getResponse() (*http.Response, error) { if t.Proxy == nil { t.Proxy = r.setting.Proxy } - if t.Dial == nil { - t.Dial = TimeoutDialer(r.setting.ConnectTimeout, r.setting.ReadWriteTimeout) + if t.DialContext == nil { + t.DialContext = TimeoutDialer(r.setting.ConnectTimeout) } } @@ -351,6 +359,7 @@ func (r *Request) getResponse() (*http.Response, error) { client := &http.Client{ Transport: trans, Jar: jar, + Timeout: r.setting.ReadWriteTimeout, } if len(r.setting.UserAgent) > 0 && len(r.req.Header.Get("User-Agent")) == 0 { @@ -455,12 +464,13 @@ func (r *Request) Response() (*http.Response, error) { } // TimeoutDialer returns functions of connection dialer with timeout settings for http.Transport Dial field. -func TimeoutDialer(cTimeout time.Duration, rwTimeout time.Duration) func(net, addr string) (c net.Conn, err error) { - return func(netw, addr string) (net.Conn, error) { - conn, err := net.DialTimeout(netw, addr, cTimeout) +func TimeoutDialer(cTimeout time.Duration) func(ctx context.Context, net, addr string) (c net.Conn, err error) { + return func(ctx context.Context, netw, addr string) (net.Conn, error) { + d := net.Dialer{Timeout: cTimeout} + conn, err := d.DialContext(ctx, netw, addr) if err != nil { return nil, err } - return conn, conn.SetDeadline(time.Now().Add(rwTimeout)) + return conn, nil } } diff --git a/modules/indexer/bleve/batch.go b/modules/indexer/bleve/batch.go new file mode 100644 index 000000000..79994e6e5 --- /dev/null +++ b/modules/indexer/bleve/batch.go @@ -0,0 +1,59 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package bleve + +import ( + "github.com/blevesearch/bleve/v2" +) + +// FlushingBatch is a batch of operations that automatically flushes to the +// underlying index once it reaches a certain size. +type FlushingBatch struct { + maxBatchSize int + batch *bleve.Batch + index bleve.Index +} + +// NewFlushingBatch creates a new flushing batch for the specified index. Once +// the number of operations in the batch reaches the specified limit, the batch +// automatically flushes its operations to the index. +func NewFlushingBatch(index bleve.Index, maxBatchSize int) *FlushingBatch { + return &FlushingBatch{ + maxBatchSize: maxBatchSize, + batch: index.NewBatch(), + index: index, + } +} + +// Index add a new index to batch +func (b *FlushingBatch) Index(id string, data interface{}) error { + if err := b.batch.Index(id, data); err != nil { + return err + } + return b.flushIfFull() +} + +// Delete add a delete index to batch +func (b *FlushingBatch) Delete(id string) error { + b.batch.Delete(id) + return b.flushIfFull() +} + +func (b *FlushingBatch) flushIfFull() error { + if b.batch.Size() < b.maxBatchSize { + return nil + } + return b.Flush() +} + +// Flush submit the batch and create a new one +func (b *FlushingBatch) Flush() error { + err := b.index.Batch(b.batch) + if err != nil { + return err + } + b.batch = b.index.NewBatch() + return nil +} diff --git a/modules/indexer/code/bleve.go b/modules/indexer/code/bleve.go index 9caa6528f..fc5c602db 100644 --- a/modules/indexer/code/bleve.go +++ b/modules/indexer/code/bleve.go @@ -5,7 +5,10 @@ package code import ( + "bufio" "fmt" + "io" + "io/ioutil" "os" "strconv" "strings" @@ -13,23 +16,24 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/analyze" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/git" + gitea_bleve "code.gitea.io/gitea/modules/indexer/bleve" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/typesniffer" "code.gitea.io/gitea/modules/util" - "github.com/blevesearch/bleve" - analyzer_custom "github.com/blevesearch/bleve/analysis/analyzer/custom" - analyzer_keyword "github.com/blevesearch/bleve/analysis/analyzer/keyword" - "github.com/blevesearch/bleve/analysis/token/lowercase" - "github.com/blevesearch/bleve/analysis/token/unicodenorm" - "github.com/blevesearch/bleve/analysis/tokenizer/unicode" - "github.com/blevesearch/bleve/index/upsidedown" - "github.com/blevesearch/bleve/mapping" - "github.com/blevesearch/bleve/search/query" + "github.com/blevesearch/bleve/v2" + analyzer_custom "github.com/blevesearch/bleve/v2/analysis/analyzer/custom" + analyzer_keyword "github.com/blevesearch/bleve/v2/analysis/analyzer/keyword" + "github.com/blevesearch/bleve/v2/analysis/token/lowercase" + "github.com/blevesearch/bleve/v2/analysis/token/unicodenorm" + "github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode" + "github.com/blevesearch/bleve/v2/index/upsidedown" + "github.com/blevesearch/bleve/v2/mapping" + "github.com/blevesearch/bleve/v2/search/query" "github.com/ethantkoenig/rupture" "github.com/go-enry/go-enry/v2" ) @@ -173,32 +177,50 @@ func NewBleveIndexer(indexDir string) (*BleveIndexer, bool, error) { return indexer, created, err } -func (b *BleveIndexer) addUpdate(commitSha string, update fileUpdate, repo *models.Repository, batch rupture.FlushingBatch) error { +func (b *BleveIndexer) addUpdate(batchWriter git.WriteCloserError, batchReader *bufio.Reader, commitSha string, + update fileUpdate, repo *models.Repository, batch *gitea_bleve.FlushingBatch) error { // Ignore vendored files in code search - if setting.Indexer.ExcludeVendored && enry.IsVendor(update.Filename) { + if setting.Indexer.ExcludeVendored && analyze.IsVendor(update.Filename) { return nil } - stdout, err := git.NewCommand("cat-file", "-s", update.BlobSha). - RunInDir(repo.RepoPath()) - if err != nil { - return err + size := update.Size + + if !update.Sized { + stdout, err := git.NewCommand("cat-file", "-s", update.BlobSha). + RunInDir(repo.RepoPath()) + if err != nil { + return err + } + if size, err = strconv.ParseInt(strings.TrimSpace(stdout), 10, 64); err != nil { + return fmt.Errorf("Misformatted git cat-file output: %v", err) + } } - if size, err := strconv.Atoi(strings.TrimSpace(stdout)); err != nil { - return fmt.Errorf("Misformatted git cat-file output: %v", err) - } else if int64(size) > setting.Indexer.MaxIndexerFileSize { + + if size > setting.Indexer.MaxIndexerFileSize { return b.addDelete(update.Filename, repo, batch) } - fileContents, err := git.NewCommand("cat-file", "blob", update.BlobSha). - RunInDirBytes(repo.RepoPath()) + if _, err := batchWriter.Write([]byte(update.BlobSha + "\n")); err != nil { + return err + } + + _, _, size, err := git.ReadBatchLine(batchReader) if err != nil { return err - } else if !base.IsTextFile(fileContents) { + } + + fileContents, err := ioutil.ReadAll(io.LimitReader(batchReader, size)) + if err != nil { + return err + } else if !typesniffer.DetectContentType(fileContents).IsText() { // FIXME: UTF-16 files will probably fail here return nil } + if _, err = batchReader.Discard(1); err != nil { + return err + } id := filenameIndexerID(repo.ID, update.Filename) return batch.Index(id, &RepoIndexerData{ RepoID: repo.ID, @@ -209,7 +231,7 @@ func (b *BleveIndexer) addUpdate(commitSha string, update fileUpdate, repo *mode }) } -func (b *BleveIndexer) addDelete(filename string, repo *models.Repository, batch rupture.FlushingBatch) error { +func (b *BleveIndexer) addDelete(filename string, repo *models.Repository, batch *gitea_bleve.FlushingBatch) error { id := filenameIndexerID(repo.ID, filename) return batch.Delete(id) } @@ -247,11 +269,18 @@ func (b *BleveIndexer) Close() { // Index indexes the data func (b *BleveIndexer) Index(repo *models.Repository, sha string, changes *repoChanges) error { - batch := rupture.NewFlushingBatch(b.indexer, maxBatchSize) - for _, update := range changes.Updates { - if err := b.addUpdate(sha, update, repo, batch); err != nil { - return err + batch := gitea_bleve.NewFlushingBatch(b.indexer, maxBatchSize) + if len(changes.Updates) > 0 { + + batchWriter, batchReader, cancel := git.CatFileBatch(repo.RepoPath()) + defer cancel() + + for _, update := range changes.Updates { + if err := b.addUpdate(batchWriter, batchReader, sha, update, repo, batch); err != nil { + return err + } } + cancel() } for _, filename := range changes.RemovedFilenames { if err := b.addDelete(filename, repo, batch); err != nil { @@ -269,7 +298,7 @@ func (b *BleveIndexer) Delete(repoID int64) error { if err != nil { return err } - batch := rupture.NewFlushingBatch(b.indexer, maxBatchSize) + batch := gitea_bleve.NewFlushingBatch(b.indexer, maxBatchSize) for _, hit := range result.Hits { if err = batch.Delete(hit.ID); err != nil { return err @@ -280,12 +309,23 @@ func (b *BleveIndexer) Delete(repoID int64) error { // Search searches for files in the specified repo. // Returns the matching file-paths -func (b *BleveIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int) (int64, []*SearchResult, []*SearchResultLanguages, error) { - phraseQuery := bleve.NewMatchPhraseQuery(keyword) - phraseQuery.FieldVal = "Content" - phraseQuery.Analyzer = repoIndexerAnalyzer +func (b *BleveIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int64, []*SearchResult, []*SearchResultLanguages, error) { + var ( + indexerQuery query.Query + keywordQuery query.Query + ) + + if isMatch { + prefixQuery := bleve.NewPrefixQuery(keyword) + prefixQuery.FieldVal = "Content" + keywordQuery = prefixQuery + } else { + phraseQuery := bleve.NewMatchPhraseQuery(keyword) + phraseQuery.FieldVal = "Content" + phraseQuery.Analyzer = repoIndexerAnalyzer + keywordQuery = phraseQuery + } - var indexerQuery query.Query if len(repoIDs) > 0 { var repoQueries = make([]query.Query, 0, len(repoIDs)) for _, repoID := range repoIDs { @@ -294,10 +334,10 @@ func (b *BleveIndexer) Search(repoIDs []int64, language, keyword string, page, p indexerQuery = bleve.NewConjunctionQuery( bleve.NewDisjunctionQuery(repoQueries...), - phraseQuery, + keywordQuery, ) } else { - indexerQuery = phraseQuery + indexerQuery = keywordQuery } // Save for reuse without language filter diff --git a/modules/indexer/code/elastic_search.go b/modules/indexer/code/elastic_search.go index 0f61c4e59..a7a243e24 100644 --- a/modules/indexer/code/elastic_search.go +++ b/modules/indexer/code/elastic_search.go @@ -5,21 +5,24 @@ package code import ( + "bufio" "context" - "encoding/json" "fmt" + "io" + "io/ioutil" "strconv" "strings" "time" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/analyze" - "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/typesniffer" "github.com/go-enry/go-enry/v2" "github.com/olivere/elastic/v7" @@ -27,6 +30,10 @@ import ( const ( esRepoIndexerLatestVersion = 1 + // multi-match-types, currently only 2 types are used + // Reference: https://www.elastic.co/guide/en/elasticsearch/reference/7.0/query-dsl-multi-match-query.html#multi-match-types + esMultiMatchTypeBestFields = "best_fields" + esMultiMatchTypePhrasePrefix = "phrase_prefix" ) var ( @@ -168,32 +175,49 @@ func (b *ElasticSearchIndexer) init() (bool, error) { return exists, nil } -func (b *ElasticSearchIndexer) addUpdate(sha string, update fileUpdate, repo *models.Repository) ([]elastic.BulkableRequest, error) { +func (b *ElasticSearchIndexer) addUpdate(batchWriter git.WriteCloserError, batchReader *bufio.Reader, sha string, update fileUpdate, repo *models.Repository) ([]elastic.BulkableRequest, error) { // Ignore vendored files in code search - if setting.Indexer.ExcludeVendored && enry.IsVendor(update.Filename) { + if setting.Indexer.ExcludeVendored && analyze.IsVendor(update.Filename) { return nil, nil } - stdout, err := git.NewCommand("cat-file", "-s", update.BlobSha). - RunInDir(repo.RepoPath()) - if err != nil { - return nil, err + size := update.Size + + if !update.Sized { + stdout, err := git.NewCommand("cat-file", "-s", update.BlobSha). + RunInDir(repo.RepoPath()) + if err != nil { + return nil, err + } + if size, err = strconv.ParseInt(strings.TrimSpace(stdout), 10, 64); err != nil { + return nil, fmt.Errorf("Misformatted git cat-file output: %v", err) + } } - if size, err := strconv.Atoi(strings.TrimSpace(stdout)); err != nil { - return nil, fmt.Errorf("Misformatted git cat-file output: %v", err) - } else if int64(size) > setting.Indexer.MaxIndexerFileSize { + + if size > setting.Indexer.MaxIndexerFileSize { return []elastic.BulkableRequest{b.addDelete(update.Filename, repo)}, nil } - fileContents, err := git.NewCommand("cat-file", "blob", update.BlobSha). - RunInDirBytes(repo.RepoPath()) + if _, err := batchWriter.Write([]byte(update.BlobSha + "\n")); err != nil { + return nil, err + } + + _, _, size, err := git.ReadBatchLine(batchReader) if err != nil { return nil, err - } else if !base.IsTextFile(fileContents) { + } + + fileContents, err := ioutil.ReadAll(io.LimitReader(batchReader, size)) + if err != nil { + return nil, err + } else if !typesniffer.DetectContentType(fileContents).IsText() { // FIXME: UTF-16 files will probably fail here return nil, nil } + if _, err = batchReader.Discard(1); err != nil { + return nil, err + } id := filenameIndexerID(repo.ID, update.Filename) return []elastic.BulkableRequest{ @@ -220,14 +244,21 @@ func (b *ElasticSearchIndexer) addDelete(filename string, repo *models.Repositor // Index will save the index data func (b *ElasticSearchIndexer) Index(repo *models.Repository, sha string, changes *repoChanges) error { reqs := make([]elastic.BulkableRequest, 0) - for _, update := range changes.Updates { - updateReqs, err := b.addUpdate(sha, update, repo) - if err != nil { - return err - } - if len(updateReqs) > 0 { - reqs = append(reqs, updateReqs...) + if len(changes.Updates) > 0 { + + batchWriter, batchReader, cancel := git.CatFileBatch(repo.RepoPath()) + defer cancel() + + for _, update := range changes.Updates { + updateReqs, err := b.addUpdate(batchWriter, batchReader, sha, update, repo) + if err != nil { + return err + } + if len(updateReqs) > 0 { + reqs = append(reqs, updateReqs...) + } } + cancel() } for _, filename := range changes.RemovedFilenames { @@ -253,7 +284,7 @@ func (b *ElasticSearchIndexer) Delete(repoID int64) error { } // indexPos find words positions for start and the following end on content. It will -// return the beginning position of the frist start and the ending position of the +// return the beginning position of the first start and the ending position of the // first end following the start string. // If not found any of the positions, it will return -1, -1. func indexPos(content, start, end string) (int, int) { @@ -277,8 +308,8 @@ func convertResult(searchResult *elastic.SearchResult, kw string, pageSize int) var startIndex, endIndex int = -1, -1 c, ok := hit.Highlight["content"] if ok && len(c) > 0 { - // FIXME: Since the high lighting content will include and for the keywords, - // now we should find the poisitions. But how to avoid html content which contains the + // FIXME: Since the highlighting content will include and for the keywords, + // now we should find the positions. But how to avoid html content which contains the // and tags? If elastic search has handled that? startIndex, endIndex = indexPos(c[0], "", "") if startIndex == -1 { @@ -330,8 +361,13 @@ func extractAggs(searchResult *elastic.SearchResult) []*SearchResultLanguages { } // Search searches for codes and language stats by given conditions. -func (b *ElasticSearchIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int) (int64, []*SearchResult, []*SearchResultLanguages, error) { - kwQuery := elastic.NewMultiMatchQuery(keyword, "content") +func (b *ElasticSearchIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int64, []*SearchResult, []*SearchResultLanguages, error) { + searchType := esMultiMatchTypeBestFields + if isMatch { + searchType = esMultiMatchTypePhrasePrefix + } + + kwQuery := elastic.NewMultiMatchQuery(keyword, "content").Type(searchType) query := elastic.NewBoolQuery() query = query.Must(kwQuery) if len(repoIDs) > 0 { diff --git a/modules/indexer/code/git.go b/modules/indexer/code/git.go index 37ab5ac3d..919d78540 100644 --- a/modules/indexer/code/git.go +++ b/modules/indexer/code/git.go @@ -17,6 +17,8 @@ import ( type fileUpdate struct { Filename string BlobSha string + Size int64 + Sized bool } // repoChanges changes (file additions/updates/removals) to a repo @@ -77,6 +79,8 @@ func parseGitLsTreeOutput(stdout []byte) ([]fileUpdate, error) { updates[idxCount] = fileUpdate{ Filename: entry.Name(), BlobSha: entry.ID.String(), + Size: entry.Size(), + Sized: true, } idxCount++ } @@ -87,7 +91,7 @@ func parseGitLsTreeOutput(stdout []byte) ([]fileUpdate, error) { // genesisChanges get changes to add repo to the indexer for the first time func genesisChanges(repo *models.Repository, revision string) (*repoChanges, error) { var changes repoChanges - stdout, err := git.NewCommand("ls-tree", "--full-tree", "-r", revision). + stdout, err := git.NewCommand("ls-tree", "--full-tree", "-l", "-r", revision). RunInDirBytes(repo.RepoPath()) if err != nil { return nil, err @@ -162,7 +166,7 @@ func nonGenesisChanges(repo *models.Repository, revision string) (*repoChanges, } } - cmd := git.NewCommand("ls-tree", "--full-tree", revision, "--") + cmd := git.NewCommand("ls-tree", "--full-tree", "-l", revision, "--") cmd.AddArguments(updatedFilenames...) lsTreeStdout, err := cmd.RunInDirBytes(repo.RepoPath()) if err != nil { diff --git a/modules/indexer/code/indexer.go b/modules/indexer/code/indexer.go index 35c298a54..67fa43eda 100644 --- a/modules/indexer/code/indexer.go +++ b/modules/indexer/code/indexer.go @@ -43,7 +43,7 @@ type SearchResultLanguages struct { type Indexer interface { Index(repo *models.Repository, sha string, changes *repoChanges) error Delete(repoID int64) error - Search(repoIDs []int64, language, keyword string, page, pageSize int) (int64, []*SearchResult, []*SearchResultLanguages, error) + Search(repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int64, []*SearchResult, []*SearchResultLanguages, error) Close() } @@ -115,7 +115,13 @@ func Init() { ctx, cancel := context.WithCancel(context.Background()) - graceful.GetManager().RunAtTerminate(ctx, func() { + graceful.GetManager().RunAtTerminate(func() { + select { + case <-ctx.Done(): + return + default: + } + cancel() log.Debug("Closing repository indexer") indexer.Close() log.Info("PID: %d Repository Indexer closed", os.Getpid()) diff --git a/modules/indexer/code/indexer_test.go b/modules/indexer/code/indexer_test.go index 0b4851a48..01717bd28 100644 --- a/modules/indexer/code/indexer_test.go +++ b/modules/indexer/code/indexer_test.go @@ -64,10 +64,10 @@ func testIndexer(name string, t *testing.T, indexer Indexer) { for _, kw := range keywords { t.Run(kw.Keyword, func(t *testing.T) { - total, res, langs, err := indexer.Search(kw.RepoIDs, "", kw.Keyword, 1, 10) + total, res, langs, err := indexer.Search(kw.RepoIDs, "", kw.Keyword, 1, 10, false) assert.NoError(t, err) assert.EqualValues(t, len(kw.IDs), total) - assert.EqualValues(t, kw.Langs, len(langs)) + assert.Len(t, langs, kw.Langs) var ids = make([]int64, 0, len(res)) for _, hit := range res { diff --git a/modules/indexer/code/search.go b/modules/indexer/code/search.go index 29ed41654..51b7c9427 100644 --- a/modules/indexer/code/search.go +++ b/modules/indexer/code/search.go @@ -106,12 +106,12 @@ func searchResult(result *SearchResult, startIndex, endIndex int) (*Result, erro } // PerformSearch perform a search on a repository -func PerformSearch(repoIDs []int64, language, keyword string, page, pageSize int) (int, []*Result, []*SearchResultLanguages, error) { +func PerformSearch(repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int, []*Result, []*SearchResultLanguages, error) { if len(keyword) == 0 { return 0, nil, nil, nil } - total, results, resultLanguages, err := indexer.Search(repoIDs, language, keyword, page, pageSize) + total, results, resultLanguages, err := indexer.Search(repoIDs, language, keyword, page, pageSize, isMatch) if err != nil { return 0, nil, nil, err } diff --git a/modules/indexer/code/wrapped.go b/modules/indexer/code/wrapped.go index d83954487..5b19f9c62 100644 --- a/modules/indexer/code/wrapped.go +++ b/modules/indexer/code/wrapped.go @@ -73,12 +73,12 @@ func (w *wrappedIndexer) Delete(repoID int64) error { return indexer.Delete(repoID) } -func (w *wrappedIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int) (int64, []*SearchResult, []*SearchResultLanguages, error) { +func (w *wrappedIndexer) Search(repoIDs []int64, language, keyword string, page, pageSize int, isMatch bool) (int64, []*SearchResult, []*SearchResultLanguages, error) { indexer, err := w.get() if err != nil { return 0, nil, nil, err } - return indexer.Search(repoIDs, language, keyword, page, pageSize) + return indexer.Search(repoIDs, language, keyword, page, pageSize, isMatch) } diff --git a/modules/indexer/issues/bleve.go b/modules/indexer/issues/bleve.go index a1f51dba5..db12874e8 100644 --- a/modules/indexer/issues/bleve.go +++ b/modules/indexer/issues/bleve.go @@ -9,16 +9,18 @@ import ( "os" "strconv" + gitea_bleve "code.gitea.io/gitea/modules/indexer/bleve" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/util" - "github.com/blevesearch/bleve" - "github.com/blevesearch/bleve/analysis/analyzer/custom" - "github.com/blevesearch/bleve/analysis/token/lowercase" - "github.com/blevesearch/bleve/analysis/token/unicodenorm" - "github.com/blevesearch/bleve/analysis/tokenizer/unicode" - "github.com/blevesearch/bleve/index/upsidedown" - "github.com/blevesearch/bleve/mapping" - "github.com/blevesearch/bleve/search/query" + + "github.com/blevesearch/bleve/v2" + "github.com/blevesearch/bleve/v2/analysis/analyzer/custom" + "github.com/blevesearch/bleve/v2/analysis/token/lowercase" + "github.com/blevesearch/bleve/v2/analysis/token/unicodenorm" + "github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode" + "github.com/blevesearch/bleve/v2/index/upsidedown" + "github.com/blevesearch/bleve/v2/mapping" + "github.com/blevesearch/bleve/v2/search/query" "github.com/ethantkoenig/rupture" ) @@ -197,7 +199,7 @@ func (b *BleveIndexer) Close() { // Index will save the index data func (b *BleveIndexer) Index(issues []*IndexerData) error { - batch := rupture.NewFlushingBatch(b.indexer, maxBatchSize) + batch := gitea_bleve.NewFlushingBatch(b.indexer, maxBatchSize) for _, issue := range issues { if err := batch.Index(indexerID(issue.ID), struct { RepoID int64 @@ -218,7 +220,7 @@ func (b *BleveIndexer) Index(issues []*IndexerData) error { // Delete deletes indexes by ids func (b *BleveIndexer) Delete(ids ...int64) error { - batch := rupture.NewFlushingBatch(b.indexer, maxBatchSize) + batch := gitea_bleve.NewFlushingBatch(b.indexer, maxBatchSize) for _, id := range ids { if err := batch.Delete(indexerID(id)); err != nil { return err @@ -247,6 +249,7 @@ func (b *BleveIndexer) Search(keyword string, repoIDs []int64, limit, start int) newMatchPhraseQuery(keyword, "Comments", issueIndexerAnalyzer), )) search := bleve.NewSearchRequestOptions(indexerQuery, limit, start, false) + search.SortBy([]string{"-_score"}) result, err := b.indexer.Search(search) if err != nil { diff --git a/modules/indexer/issues/bleve_test.go b/modules/indexer/issues/bleve_test.go index a8b6e8138..2a8ed15d8 100644 --- a/modules/indexer/issues/bleve_test.go +++ b/modules/indexer/issues/bleve_test.go @@ -92,6 +92,6 @@ func TestBleveIndexAndSearch(t *testing.T) { for _, hit := range res.Hits { ids = append(ids, hit.ID) } - assert.EqualValues(t, kw.IDs, ids) + assert.ElementsMatch(t, kw.IDs, ids) } } diff --git a/modules/indexer/issues/elastic_search.go b/modules/indexer/issues/elastic_search.go index 4cdeff53d..3af64ed30 100644 --- a/modules/indexer/issues/elastic_search.go +++ b/modules/indexer/issues/elastic_search.go @@ -205,7 +205,7 @@ func (b *ElasticSearchIndexer) Search(keyword string, repoIDs []int64, limit, st searchResult, err := b.client.Search(). Index(b.indexerName). Query(query). - Sort("id", true). + Sort("_score", false). From(start).Size(limit). Do(context.Background()) if err != nil { diff --git a/modules/indexer/issues/indexer.go b/modules/indexer/issues/indexer.go index 9edaef6bd..676b6686e 100644 --- a/modules/indexer/issues/indexer.go +++ b/modules/indexer/issues/indexer.go @@ -160,7 +160,7 @@ func InitIssueIndexer(syncReindex bool) { } populate = !exist holder.set(issueIndexer) - graceful.GetManager().RunAtTerminate(context.Background(), func() { + graceful.GetManager().RunAtTerminate(func() { log.Debug("Closing issue indexer") issueIndexer := holder.get() if issueIndexer != nil { @@ -170,7 +170,7 @@ func InitIssueIndexer(syncReindex bool) { }) log.Debug("Created Bleve Indexer") case "elasticsearch": - graceful.GetManager().RunWithShutdownFns(func(_, atTerminate func(context.Context, func())) { + graceful.GetManager().RunWithShutdownFns(func(_, atTerminate func(func())) { issueIndexer, err := NewElasticSearchIndexer(setting.Indexer.IssueConnStr, setting.Indexer.IssueIndexerName) if err != nil { log.Fatal("Unable to initialize Elastic Search Issue Indexer at connection: %s Error: %v", setting.Indexer.IssueConnStr, err) diff --git a/modules/indexer/issues/indexer_test.go b/modules/indexer/issues/indexer_test.go index 95007d8fa..8c163f78d 100644 --- a/modules/indexer/issues/indexer_test.go +++ b/modules/indexer/issues/indexer_test.go @@ -65,7 +65,7 @@ func TestBleveSearchIssues(t *testing.T) { ids, err = SearchIssuesByKeyword([]int64{1}, "for") assert.NoError(t, err) - assert.EqualValues(t, []int64{1, 2, 3, 5, 11}, ids) + assert.ElementsMatch(t, []int64{1, 2, 3, 5, 11}, ids) ids, err = SearchIssuesByKeyword([]int64{1}, "good") assert.NoError(t, err) @@ -89,7 +89,7 @@ func TestDBSearchIssues(t *testing.T) { ids, err = SearchIssuesByKeyword([]int64{1}, "for") assert.NoError(t, err) - assert.EqualValues(t, []int64{1, 2, 3, 5, 11}, ids) + assert.ElementsMatch(t, []int64{1, 2, 3, 5, 11}, ids) ids, err = SearchIssuesByKeyword([]int64{1}, "good") assert.NoError(t, err) diff --git a/modules/indexer/stats/db.go b/modules/indexer/stats/db.go index bc3fbc13d..976bf2d63 100644 --- a/modules/indexer/stats/db.go +++ b/modules/indexer/stats/db.go @@ -38,7 +38,11 @@ func (db *DBIndexer) Index(id int64) error { // Get latest commit for default branch commitID, err := gitRepo.GetBranchCommitID(repo.DefaultBranch) if err != nil { - log.Error("Unable to get commit ID for defaultbranch %s in %s", repo.DefaultBranch, repo.RepoPath()) + if git.IsErrBranchNotExist(err) || git.IsErrNotExist((err)) { + log.Debug("Unable to get commit ID for defaultbranch %s in %s ... skipping this repository", repo.DefaultBranch, repo.RepoPath()) + return nil + } + log.Error("Unable to get commit ID for defaultbranch %s in %s. Error: %v", repo.DefaultBranch, repo.RepoPath(), err) return err } diff --git a/modules/json/json.go b/modules/json/json.go new file mode 100644 index 000000000..be42b6ae6 --- /dev/null +++ b/modules/json/json.go @@ -0,0 +1,142 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package json + +import ( + "bytes" + "encoding/json" + "io" + + jsoniter "github.com/json-iterator/go" +) + +// Encoder represents an encoder for json +type Encoder interface { + Encode(v interface{}) error +} + +// Decoder represents a decoder for json +type Decoder interface { + Decode(v interface{}) error +} + +// Interface represents an interface to handle json data +type Interface interface { + Marshal(v interface{}) ([]byte, error) + Unmarshal(data []byte, v interface{}) error + NewEncoder(writer io.Writer) Encoder + NewDecoder(reader io.Reader) Decoder + Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error +} + +var ( + // DefaultJSONHandler default json handler + DefaultJSONHandler Interface = JSONiter{jsoniter.ConfigCompatibleWithStandardLibrary} + + _ Interface = StdJSON{} + _ Interface = JSONiter{} +) + +// StdJSON implements Interface via encoding/json +type StdJSON struct{} + +// Marshal implements Interface +func (StdJSON) Marshal(v interface{}) ([]byte, error) { + return json.Marshal(v) +} + +// Unmarshal implements Interface +func (StdJSON) Unmarshal(data []byte, v interface{}) error { + return json.Unmarshal(data, v) +} + +// NewEncoder implements Interface +func (StdJSON) NewEncoder(writer io.Writer) Encoder { + return json.NewEncoder(writer) +} + +// NewDecoder implements Interface +func (StdJSON) NewDecoder(reader io.Reader) Decoder { + return json.NewDecoder(reader) +} + +// Indent implements Interface +func (StdJSON) Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error { + return json.Indent(dst, src, prefix, indent) +} + +// JSONiter implements Interface via jsoniter +type JSONiter struct { + jsoniter.API +} + +// Marshal implements Interface +func (j JSONiter) Marshal(v interface{}) ([]byte, error) { + return j.API.Marshal(v) +} + +// Unmarshal implements Interface +func (j JSONiter) Unmarshal(data []byte, v interface{}) error { + return j.API.Unmarshal(data, v) +} + +// NewEncoder implements Interface +func (j JSONiter) NewEncoder(writer io.Writer) Encoder { + return j.API.NewEncoder(writer) +} + +// NewDecoder implements Interface +func (j JSONiter) NewDecoder(reader io.Reader) Decoder { + return j.API.NewDecoder(reader) +} + +// Indent implements Interface, since jsoniter don't support Indent, just use encoding/json's +func (j JSONiter) Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error { + return json.Indent(dst, src, prefix, indent) +} + +// Marshal converts object as bytes +func Marshal(v interface{}) ([]byte, error) { + return DefaultJSONHandler.Marshal(v) +} + +// Unmarshal decodes object from bytes +func Unmarshal(data []byte, v interface{}) error { + return DefaultJSONHandler.Unmarshal(data, v) +} + +// NewEncoder creates an encoder to write objects to writer +func NewEncoder(writer io.Writer) Encoder { + return DefaultJSONHandler.NewEncoder(writer) +} + +// NewDecoder creates a decoder to read objects from reader +func NewDecoder(reader io.Reader) Decoder { + return DefaultJSONHandler.NewDecoder(reader) +} + +// Indent appends to dst an indented form of the JSON-encoded src. +func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error { + return DefaultJSONHandler.Indent(dst, src, prefix, indent) +} + +// MarshalIndent copied from encoding/json +func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error) { + b, err := Marshal(v) + if err != nil { + return nil, err + } + var buf bytes.Buffer + err = Indent(&buf, b, prefix, indent) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} + +// Valid proxy to json.Valid +func Valid(data []byte) bool { + return json.Valid(data) +} diff --git a/modules/lfs/client.go b/modules/lfs/client.go new file mode 100644 index 000000000..81b047c5b --- /dev/null +++ b/modules/lfs/client.go @@ -0,0 +1,32 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "context" + "io" + "net/url" +) + +// DownloadCallback gets called for every requested LFS object to process its content +type DownloadCallback func(p Pointer, content io.ReadCloser, objectError error) error + +// UploadCallback gets called for every requested LFS object to provide its content +type UploadCallback func(p Pointer, objectError error) (io.ReadCloser, error) + +// Client is used to communicate with a LFS source +type Client interface { + BatchSize() int + Download(ctx context.Context, objects []Pointer, callback DownloadCallback) error + Upload(ctx context.Context, objects []Pointer, callback UploadCallback) error +} + +// NewClient creates a LFS client +func NewClient(endpoint *url.URL, skipTLSVerify bool) Client { + if endpoint.Scheme == "file" { + return newFilesystemClient(endpoint) + } + return newHTTPClient(endpoint, skipTLSVerify) +} diff --git a/modules/lfs/client_test.go b/modules/lfs/client_test.go new file mode 100644 index 000000000..ee6b7a59f --- /dev/null +++ b/modules/lfs/client_test.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "net/url" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestNewClient(t *testing.T) { + u, _ := url.Parse("file:///test") + c := NewClient(u, true) + assert.IsType(t, &FilesystemClient{}, c) + + u, _ = url.Parse("https://test.com/lfs") + c = NewClient(u, true) + assert.IsType(t, &HTTPClient{}, c) +} diff --git a/modules/lfs/content_store.go b/modules/lfs/content_store.go index 247191a1b..9fa2c7e3b 100644 --- a/modules/lfs/content_store.go +++ b/modules/lfs/content_store.go @@ -9,17 +9,19 @@ import ( "encoding/hex" "errors" "fmt" + "hash" "io" "os" - "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/storage" ) var ( - errHashMismatch = errors.New("Content hash does not match OID") - errSizeMismatch = errors.New("Content size does not match") + // ErrHashMismatch occurs if the content has does not match OID + ErrHashMismatch = errors.New("Content hash does not match OID") + // ErrSizeMismatch occurs if the content size does not match + ErrSizeMismatch = errors.New("Content size does not match") ) // ErrRangeNotSatisfiable represents an error which request range is not satisfiable. @@ -27,75 +29,67 @@ type ErrRangeNotSatisfiable struct { FromByte int64 } -func (err ErrRangeNotSatisfiable) Error() string { - return fmt.Sprintf("Requested range %d is not satisfiable", err.FromByte) -} - // IsErrRangeNotSatisfiable returns true if the error is an ErrRangeNotSatisfiable func IsErrRangeNotSatisfiable(err error) bool { _, ok := err.(ErrRangeNotSatisfiable) return ok } +func (err ErrRangeNotSatisfiable) Error() string { + return fmt.Sprintf("Requested range %d is not satisfiable", err.FromByte) +} + // ContentStore provides a simple file system based storage. type ContentStore struct { storage.ObjectStorage } +// NewContentStore creates the default ContentStore +func NewContentStore() *ContentStore { + contentStore := &ContentStore{ObjectStorage: storage.LFS} + return contentStore +} + // Get takes a Meta object and retrieves the content from the store, returning -// it as an io.Reader. If fromByte > 0, the reader starts from that byte -func (s *ContentStore) Get(meta *models.LFSMetaObject, fromByte int64) (io.ReadCloser, error) { - f, err := s.Open(meta.RelativePath()) +// it as an io.ReadSeekCloser. +func (s *ContentStore) Get(pointer Pointer) (storage.Object, error) { + f, err := s.Open(pointer.RelativePath()) if err != nil { - log.Error("Whilst trying to read LFS OID[%s]: Unable to open Error: %v", meta.Oid, err) + log.Error("Whilst trying to read LFS OID[%s]: Unable to open Error: %v", pointer.Oid, err) return nil, err } - if fromByte > 0 { - if fromByte >= meta.Size { - return nil, ErrRangeNotSatisfiable{ - FromByte: fromByte, - } - } - _, err = f.Seek(fromByte, io.SeekStart) - if err != nil { - log.Error("Whilst trying to read LFS OID[%s]: Unable to seek to %d Error: %v", meta.Oid, fromByte, err) - } - } return f, err } // Put takes a Meta object and an io.Reader and writes the content to the store. -func (s *ContentStore) Put(meta *models.LFSMetaObject, r io.Reader) error { - hash := sha256.New() - rd := io.TeeReader(r, hash) - p := meta.RelativePath() - written, err := s.Save(p, rd) +func (s *ContentStore) Put(pointer Pointer, r io.Reader) error { + p := pointer.RelativePath() + + // Wrap the provided reader with an inline hashing and size checker + wrappedRd := newHashingReader(pointer.Size, pointer.Oid, r) + + // now pass the wrapped reader to Save - if there is a size mismatch or hash mismatch then + // the errors returned by the newHashingReader should percolate up to here + written, err := s.Save(p, wrappedRd, pointer.Size) if err != nil { - log.Error("Whilst putting LFS OID[%s]: Failed to copy to tmpPath: %s Error: %v", meta.Oid, p, err) + log.Error("Whilst putting LFS OID[%s]: Failed to copy to tmpPath: %s Error: %v", pointer.Oid, p, err) return err } - if written != meta.Size { + // This shouldn't happen but it is sensible to test + if written != pointer.Size { if err := s.Delete(p); err != nil { - log.Error("Cleaning the LFS OID[%s] failed: %v", meta.Oid, err) + log.Error("Cleaning the LFS OID[%s] failed: %v", pointer.Oid, err) } - return errSizeMismatch - } - - shaStr := hex.EncodeToString(hash.Sum(nil)) - if shaStr != meta.Oid { - if err := s.Delete(p); err != nil { - log.Error("Cleaning the LFS OID[%s] failed: %v", meta.Oid, err) - } - return errHashMismatch + return ErrSizeMismatch } return nil } // Exists returns true if the object exists in the content store. -func (s *ContentStore) Exists(meta *models.LFSMetaObject) (bool, error) { - _, err := s.ObjectStorage.Stat(meta.RelativePath()) +func (s *ContentStore) Exists(pointer Pointer) (bool, error) { + _, err := s.ObjectStorage.Stat(pointer.RelativePath()) if err != nil { if os.IsNotExist(err) { return false, nil @@ -106,15 +100,63 @@ func (s *ContentStore) Exists(meta *models.LFSMetaObject) (bool, error) { } // Verify returns true if the object exists in the content store and size is correct. -func (s *ContentStore) Verify(meta *models.LFSMetaObject) (bool, error) { - p := meta.RelativePath() +func (s *ContentStore) Verify(pointer Pointer) (bool, error) { + p := pointer.RelativePath() fi, err := s.ObjectStorage.Stat(p) - if os.IsNotExist(err) || (err == nil && fi.Size() != meta.Size) { + if os.IsNotExist(err) || (err == nil && fi.Size() != pointer.Size) { return false, nil } else if err != nil { - log.Error("Unable stat file: %s for LFS OID[%s] Error: %v", p, meta.Oid, err) + log.Error("Unable stat file: %s for LFS OID[%s] Error: %v", p, pointer.Oid, err) return false, err } return true, nil } + +// ReadMetaObject will read a models.LFSMetaObject and return a reader +func ReadMetaObject(pointer Pointer) (io.ReadCloser, error) { + contentStore := NewContentStore() + return contentStore.Get(pointer) +} + +type hashingReader struct { + internal io.Reader + currentSize int64 + expectedSize int64 + hash hash.Hash + expectedHash string +} + +func (r *hashingReader) Read(b []byte) (int, error) { + n, err := r.internal.Read(b) + + if n > 0 { + r.currentSize += int64(n) + wn, werr := r.hash.Write(b[:n]) + if wn != n || werr != nil { + return n, werr + } + } + + if err != nil && err == io.EOF { + if r.currentSize != r.expectedSize { + return n, ErrSizeMismatch + } + + shaStr := hex.EncodeToString(r.hash.Sum(nil)) + if shaStr != r.expectedHash { + return n, ErrHashMismatch + } + } + + return n, err +} + +func newHashingReader(expectedSize int64, expectedHash string, reader io.Reader) *hashingReader { + return &hashingReader{ + internal: reader, + expectedSize: expectedSize, + expectedHash: expectedHash, + hash: sha256.New(), + } +} diff --git a/modules/lfs/endpoint.go b/modules/lfs/endpoint.go new file mode 100644 index 000000000..add16ce9f --- /dev/null +++ b/modules/lfs/endpoint.go @@ -0,0 +1,106 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "fmt" + "net/url" + "os" + "path" + "path/filepath" + "strings" + + "code.gitea.io/gitea/modules/log" +) + +// DetermineEndpoint determines an endpoint from the clone url or uses the specified LFS url. +func DetermineEndpoint(cloneurl, lfsurl string) *url.URL { + if len(lfsurl) > 0 { + return endpointFromURL(lfsurl) + } + return endpointFromCloneURL(cloneurl) +} + +func endpointFromCloneURL(rawurl string) *url.URL { + ep := endpointFromURL(rawurl) + if ep == nil { + return ep + } + + if strings.HasSuffix(ep.Path, "/") { + ep.Path = ep.Path[:len(ep.Path)-1] + } + + if ep.Scheme == "file" { + return ep + } + + if path.Ext(ep.Path) == ".git" { + ep.Path += "/info/lfs" + } else { + ep.Path += ".git/info/lfs" + } + + return ep +} + +func endpointFromURL(rawurl string) *url.URL { + if strings.HasPrefix(rawurl, "/") { + return endpointFromLocalPath(rawurl) + } + + u, err := url.Parse(rawurl) + if err != nil { + log.Error("lfs.endpointFromUrl: %v", err) + return nil + } + + switch u.Scheme { + case "http", "https": + return u + case "git": + u.Scheme = "https" + return u + case "file": + return u + default: + if _, err := os.Stat(rawurl); err == nil { + return endpointFromLocalPath(rawurl) + } + + log.Error("lfs.endpointFromUrl: unknown url") + return nil + } +} + +func endpointFromLocalPath(path string) *url.URL { + var slash string + if abs, err := filepath.Abs(path); err == nil { + if !strings.HasPrefix(abs, "/") { + slash = "/" + } + path = abs + } + + var gitpath string + if filepath.Base(path) == ".git" { + gitpath = path + path = filepath.Dir(path) + } else { + gitpath = filepath.Join(path, ".git") + } + + if _, err := os.Stat(gitpath); err == nil { + path = gitpath + } else if _, err := os.Stat(path); err != nil { + return nil + } + + path = fmt.Sprintf("file://%s%s", slash, filepath.ToSlash(path)) + + u, _ := url.Parse(path) + + return u +} diff --git a/modules/lfs/endpoint_test.go b/modules/lfs/endpoint_test.go new file mode 100644 index 000000000..a7e8b1bfb --- /dev/null +++ b/modules/lfs/endpoint_test.go @@ -0,0 +1,75 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "net/url" + "testing" + + "github.com/stretchr/testify/assert" +) + +func str2url(raw string) *url.URL { + u, _ := url.Parse(raw) + return u +} + +func TestDetermineEndpoint(t *testing.T) { + // Test cases + var cases = []struct { + cloneurl string + lfsurl string + expected *url.URL + }{ + // case 0 + { + cloneurl: "", + lfsurl: "", + expected: nil, + }, + // case 1 + { + cloneurl: "https://git.com/repo", + lfsurl: "", + expected: str2url("https://git.com/repo.git/info/lfs"), + }, + // case 2 + { + cloneurl: "https://git.com/repo.git", + lfsurl: "", + expected: str2url("https://git.com/repo.git/info/lfs"), + }, + // case 3 + { + cloneurl: "", + lfsurl: "https://gitlfs.com/repo", + expected: str2url("https://gitlfs.com/repo"), + }, + // case 4 + { + cloneurl: "https://git.com/repo.git", + lfsurl: "https://gitlfs.com/repo", + expected: str2url("https://gitlfs.com/repo"), + }, + // case 5 + { + cloneurl: "git://git.com/repo.git", + lfsurl: "", + expected: str2url("https://git.com/repo.git/info/lfs"), + }, + // case 6 + { + cloneurl: "", + lfsurl: "git://gitlfs.com/repo", + expected: str2url("https://gitlfs.com/repo"), + }, + } + + for n, c := range cases { + ep := DetermineEndpoint(c.cloneurl, c.lfsurl) + + assert.Equal(t, c.expected, ep, "case %d: error should match", n) + } +} diff --git a/modules/lfs/filesystem_client.go b/modules/lfs/filesystem_client.go new file mode 100644 index 000000000..dc72981a9 --- /dev/null +++ b/modules/lfs/filesystem_client.go @@ -0,0 +1,93 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "context" + "io" + "net/url" + "os" + "path/filepath" + + "code.gitea.io/gitea/modules/util" +) + +// FilesystemClient is used to read LFS data from a filesystem path +type FilesystemClient struct { + lfsdir string +} + +// BatchSize returns the preferred size of batchs to process +func (c *FilesystemClient) BatchSize() int { + return 1 +} + +func newFilesystemClient(endpoint *url.URL) *FilesystemClient { + path, _ := util.FileURLToPath(endpoint) + + lfsdir := filepath.Join(path, "lfs", "objects") + + client := &FilesystemClient{lfsdir} + + return client +} + +func (c *FilesystemClient) objectPath(oid string) string { + return filepath.Join(c.lfsdir, oid[0:2], oid[2:4], oid) +} + +// Download reads the specific LFS object from the target path +func (c *FilesystemClient) Download(ctx context.Context, objects []Pointer, callback DownloadCallback) error { + for _, object := range objects { + p := Pointer{object.Oid, object.Size} + + objectPath := c.objectPath(p.Oid) + + f, err := os.Open(objectPath) + if err != nil { + return err + } + + if err := callback(p, f, nil); err != nil { + return err + } + } + return nil +} + +// Upload writes the specific LFS object to the target path +func (c *FilesystemClient) Upload(ctx context.Context, objects []Pointer, callback UploadCallback) error { + for _, object := range objects { + p := Pointer{object.Oid, object.Size} + + objectPath := c.objectPath(p.Oid) + + if err := os.MkdirAll(filepath.Dir(objectPath), os.ModePerm); err != nil { + return err + } + + content, err := callback(p, nil) + if err != nil { + return err + } + + err = func() error { + defer content.Close() + + f, err := os.Create(objectPath) + if err != nil { + return err + } + + _, err = io.Copy(f, content) + + return err + }() + if err != nil { + return err + } + } + return nil +} diff --git a/modules/lfs/http_client.go b/modules/lfs/http_client.go new file mode 100644 index 000000000..5df5ed33a --- /dev/null +++ b/modules/lfs/http_client.go @@ -0,0 +1,220 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "bytes" + "context" + "crypto/tls" + "errors" + "fmt" + "net/http" + "net/url" + "strings" + + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/proxy" +) + +const batchSize = 20 + +// HTTPClient is used to communicate with the LFS server +// https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md +type HTTPClient struct { + client *http.Client + endpoint string + transfers map[string]TransferAdapter +} + +// BatchSize returns the preferred size of batchs to process +func (c *HTTPClient) BatchSize() int { + return batchSize +} + +func newHTTPClient(endpoint *url.URL, skipTLSVerify bool) *HTTPClient { + hc := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: skipTLSVerify}, + Proxy: proxy.Proxy(), + }, + } + + client := &HTTPClient{ + client: hc, + endpoint: strings.TrimSuffix(endpoint.String(), "/"), + transfers: make(map[string]TransferAdapter), + } + + basic := &BasicTransferAdapter{hc} + + client.transfers[basic.Name()] = basic + + return client +} + +func (c *HTTPClient) transferNames() []string { + keys := make([]string, len(c.transfers)) + + i := 0 + for k := range c.transfers { + keys[i] = k + i++ + } + + return keys +} + +func (c *HTTPClient) batch(ctx context.Context, operation string, objects []Pointer) (*BatchResponse, error) { + log.Trace("BATCH operation with objects: %v", objects) + + url := fmt.Sprintf("%s/objects/batch", c.endpoint) + + request := &BatchRequest{operation, c.transferNames(), nil, objects} + + payload := new(bytes.Buffer) + err := json.NewEncoder(payload).Encode(request) + if err != nil { + log.Error("Error encoding json: %v", err) + return nil, err + } + + log.Trace("Calling: %s", url) + + req, err := http.NewRequestWithContext(ctx, "POST", url, payload) + if err != nil { + log.Error("Error creating request: %v", err) + return nil, err + } + req.Header.Set("Content-type", MediaType) + req.Header.Set("Accept", MediaType) + + res, err := c.client.Do(req) + if err != nil { + select { + case <-ctx.Done(): + return nil, ctx.Err() + default: + } + log.Error("Error while processing request: %v", err) + return nil, err + } + defer res.Body.Close() + + if res.StatusCode != http.StatusOK { + return nil, fmt.Errorf("Unexpected server response: %s", res.Status) + } + + var response BatchResponse + err = json.NewDecoder(res.Body).Decode(&response) + if err != nil { + log.Error("Error decoding json: %v", err) + return nil, err + } + + if len(response.Transfer) == 0 { + response.Transfer = "basic" + } + + return &response, nil +} + +// Download reads the specific LFS object from the LFS server +func (c *HTTPClient) Download(ctx context.Context, objects []Pointer, callback DownloadCallback) error { + return c.performOperation(ctx, objects, callback, nil) +} + +// Upload sends the specific LFS object to the LFS server +func (c *HTTPClient) Upload(ctx context.Context, objects []Pointer, callback UploadCallback) error { + return c.performOperation(ctx, objects, nil, callback) +} + +func (c *HTTPClient) performOperation(ctx context.Context, objects []Pointer, dc DownloadCallback, uc UploadCallback) error { + if len(objects) == 0 { + return nil + } + + operation := "download" + if uc != nil { + operation = "upload" + } + + result, err := c.batch(ctx, operation, objects) + if err != nil { + return err + } + + transferAdapter, ok := c.transfers[result.Transfer] + if !ok { + return fmt.Errorf("TransferAdapter not found: %s", result.Transfer) + } + + for _, object := range result.Objects { + if object.Error != nil { + objectError := errors.New(object.Error.Message) + log.Trace("Error on object %v: %v", object.Pointer, objectError) + if uc != nil { + if _, err := uc(object.Pointer, objectError); err != nil { + return err + } + } else { + if err := dc(object.Pointer, nil, objectError); err != nil { + return err + } + } + continue + } + + if uc != nil { + if len(object.Actions) == 0 { + log.Trace("%v already present on server", object.Pointer) + continue + } + + link, ok := object.Actions["upload"] + if !ok { + log.Debug("%+v", object) + return errors.New("Missing action 'upload'") + } + + content, err := uc(object.Pointer, nil) + if err != nil { + return err + } + + err = transferAdapter.Upload(ctx, link, object.Pointer, content) + + content.Close() + + if err != nil { + return err + } + + link, ok = object.Actions["verify"] + if ok { + if err := transferAdapter.Verify(ctx, link, object.Pointer); err != nil { + return err + } + } + } else { + link, ok := object.Actions["download"] + if !ok { + log.Debug("%+v", object) + return errors.New("Missing action 'download'") + } + + content, err := transferAdapter.Download(ctx, link) + if err != nil { + return err + } + + if err := dc(object.Pointer, content, nil); err != nil { + return err + } + } + } + + return nil +} diff --git a/modules/lfs/http_client_test.go b/modules/lfs/http_client_test.go new file mode 100644 index 000000000..589773e45 --- /dev/null +++ b/modules/lfs/http_client_test.go @@ -0,0 +1,361 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "bytes" + "context" + "io" + "io/ioutil" + "net/http" + "strings" + "testing" + + "code.gitea.io/gitea/modules/json" + + "github.com/stretchr/testify/assert" +) + +type RoundTripFunc func(req *http.Request) *http.Response + +func (f RoundTripFunc) RoundTrip(req *http.Request) (*http.Response, error) { + return f(req), nil +} + +type DummyTransferAdapter struct { +} + +func (a *DummyTransferAdapter) Name() string { + return "dummy" +} + +func (a *DummyTransferAdapter) Download(ctx context.Context, l *Link) (io.ReadCloser, error) { + return ioutil.NopCloser(bytes.NewBufferString("dummy")), nil +} + +func (a *DummyTransferAdapter) Upload(ctx context.Context, l *Link, p Pointer, r io.Reader) error { + return nil +} + +func (a *DummyTransferAdapter) Verify(ctx context.Context, l *Link, p Pointer) error { + return nil +} + +func lfsTestRoundtripHandler(req *http.Request) *http.Response { + var batchResponse *BatchResponse + url := req.URL.String() + + if strings.Contains(url, "status-not-ok") { + return &http.Response{StatusCode: http.StatusBadRequest} + } else if strings.Contains(url, "invalid-json-response") { + return &http.Response{StatusCode: http.StatusOK, Body: ioutil.NopCloser(bytes.NewBufferString("invalid json"))} + } else if strings.Contains(url, "valid-batch-request-download") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Actions: map[string]*Link{ + "download": {}, + }, + }, + }, + } + } else if strings.Contains(url, "valid-batch-request-upload") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Actions: map[string]*Link{ + "upload": {}, + }, + }, + }, + } + } else if strings.Contains(url, "response-no-objects") { + batchResponse = &BatchResponse{Transfer: "dummy"} + } else if strings.Contains(url, "unknown-transfer-adapter") { + batchResponse = &BatchResponse{Transfer: "unknown_adapter"} + } else if strings.Contains(url, "error-in-response-objects") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Error: &ObjectError{ + Code: 404, + Message: "Object not found", + }, + }, + }, + } + } else if strings.Contains(url, "empty-actions-map") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Actions: map[string]*Link{}, + }, + }, + } + } else if strings.Contains(url, "download-actions-map") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Actions: map[string]*Link{ + "download": {}, + }, + }, + }, + } + } else if strings.Contains(url, "upload-actions-map") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Actions: map[string]*Link{ + "upload": {}, + }, + }, + }, + } + } else if strings.Contains(url, "verify-actions-map") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Actions: map[string]*Link{ + "verify": {}, + }, + }, + }, + } + } else if strings.Contains(url, "unknown-actions-map") { + batchResponse = &BatchResponse{ + Transfer: "dummy", + Objects: []*ObjectResponse{ + { + Actions: map[string]*Link{ + "unknown": {}, + }, + }, + }, + } + } else { + return nil + } + + payload := new(bytes.Buffer) + json.NewEncoder(payload).Encode(batchResponse) + + return &http.Response{StatusCode: http.StatusOK, Body: ioutil.NopCloser(payload)} +} + +func TestHTTPClientDownload(t *testing.T) { + p := Pointer{Oid: "fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041", Size: 6} + + hc := &http.Client{Transport: RoundTripFunc(func(req *http.Request) *http.Response { + assert.Equal(t, "POST", req.Method) + assert.Equal(t, MediaType, req.Header.Get("Content-type")) + assert.Equal(t, MediaType, req.Header.Get("Accept")) + + var batchRequest BatchRequest + err := json.NewDecoder(req.Body).Decode(&batchRequest) + assert.NoError(t, err) + + assert.Equal(t, "download", batchRequest.Operation) + assert.Equal(t, 1, len(batchRequest.Objects)) + assert.Equal(t, p.Oid, batchRequest.Objects[0].Oid) + assert.Equal(t, p.Size, batchRequest.Objects[0].Size) + + return lfsTestRoundtripHandler(req) + })} + dummy := &DummyTransferAdapter{} + + var cases = []struct { + endpoint string + expectederror string + }{ + // case 0 + { + endpoint: "https://status-not-ok.io", + expectederror: "Unexpected server response: ", + }, + // case 1 + { + endpoint: "https://invalid-json-response.io", + expectederror: "invalid json", + }, + // case 2 + { + endpoint: "https://valid-batch-request-download.io", + expectederror: "", + }, + // case 3 + { + endpoint: "https://response-no-objects.io", + expectederror: "", + }, + // case 4 + { + endpoint: "https://unknown-transfer-adapter.io", + expectederror: "TransferAdapter not found: ", + }, + // case 5 + { + endpoint: "https://error-in-response-objects.io", + expectederror: "Object not found", + }, + // case 6 + { + endpoint: "https://empty-actions-map.io", + expectederror: "Missing action 'download'", + }, + // case 7 + { + endpoint: "https://download-actions-map.io", + expectederror: "", + }, + // case 8 + { + endpoint: "https://upload-actions-map.io", + expectederror: "Missing action 'download'", + }, + // case 9 + { + endpoint: "https://verify-actions-map.io", + expectederror: "Missing action 'download'", + }, + // case 10 + { + endpoint: "https://unknown-actions-map.io", + expectederror: "Missing action 'download'", + }, + } + + for n, c := range cases { + client := &HTTPClient{ + client: hc, + endpoint: c.endpoint, + transfers: make(map[string]TransferAdapter), + } + client.transfers["dummy"] = dummy + + err := client.Download(context.Background(), []Pointer{p}, func(p Pointer, content io.ReadCloser, objectError error) error { + if objectError != nil { + return objectError + } + b, err := io.ReadAll(content) + assert.NoError(t, err) + assert.Equal(t, []byte("dummy"), b) + return nil + }) + if len(c.expectederror) > 0 { + assert.True(t, strings.Contains(err.Error(), c.expectederror), "case %d: '%s' should contain '%s'", n, err.Error(), c.expectederror) + } else { + assert.NoError(t, err, "case %d", n) + } + } +} + +func TestHTTPClientUpload(t *testing.T) { + p := Pointer{Oid: "fb8f7d8435968c4f82a726a92395be4d16f2f63116caf36c8ad35c60831ab041", Size: 6} + + hc := &http.Client{Transport: RoundTripFunc(func(req *http.Request) *http.Response { + assert.Equal(t, "POST", req.Method) + assert.Equal(t, MediaType, req.Header.Get("Content-type")) + assert.Equal(t, MediaType, req.Header.Get("Accept")) + + var batchRequest BatchRequest + err := json.NewDecoder(req.Body).Decode(&batchRequest) + assert.NoError(t, err) + + assert.Equal(t, "upload", batchRequest.Operation) + assert.Equal(t, 1, len(batchRequest.Objects)) + assert.Equal(t, p.Oid, batchRequest.Objects[0].Oid) + assert.Equal(t, p.Size, batchRequest.Objects[0].Size) + + return lfsTestRoundtripHandler(req) + })} + dummy := &DummyTransferAdapter{} + + var cases = []struct { + endpoint string + expectederror string + }{ + // case 0 + { + endpoint: "https://status-not-ok.io", + expectederror: "Unexpected server response: ", + }, + // case 1 + { + endpoint: "https://invalid-json-response.io", + expectederror: "invalid json", + }, + // case 2 + { + endpoint: "https://valid-batch-request-upload.io", + expectederror: "", + }, + // case 3 + { + endpoint: "https://response-no-objects.io", + expectederror: "", + }, + // case 4 + { + endpoint: "https://unknown-transfer-adapter.io", + expectederror: "TransferAdapter not found: ", + }, + // case 5 + { + endpoint: "https://error-in-response-objects.io", + expectederror: "Object not found", + }, + // case 6 + { + endpoint: "https://empty-actions-map.io", + expectederror: "", + }, + // case 7 + { + endpoint: "https://download-actions-map.io", + expectederror: "Missing action 'upload'", + }, + // case 8 + { + endpoint: "https://upload-actions-map.io", + expectederror: "", + }, + // case 9 + { + endpoint: "https://verify-actions-map.io", + expectederror: "Missing action 'upload'", + }, + // case 10 + { + endpoint: "https://unknown-actions-map.io", + expectederror: "Missing action 'upload'", + }, + } + + for n, c := range cases { + client := &HTTPClient{ + client: hc, + endpoint: c.endpoint, + transfers: make(map[string]TransferAdapter), + } + client.transfers["dummy"] = dummy + + err := client.Upload(context.Background(), []Pointer{p}, func(p Pointer, objectError error) (io.ReadCloser, error) { + return ioutil.NopCloser(new(bytes.Buffer)), objectError + }) + if len(c.expectederror) > 0 { + assert.True(t, strings.Contains(err.Error(), c.expectederror), "case %d: '%s' should contain '%s'", n, err.Error(), c.expectederror) + } else { + assert.NoError(t, err, "case %d", n) + } + } +} diff --git a/modules/lfs/pointer.go b/modules/lfs/pointer.go new file mode 100644 index 000000000..975b5e7dc --- /dev/null +++ b/modules/lfs/pointer.go @@ -0,0 +1,123 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "crypto/sha256" + "encoding/hex" + "errors" + "fmt" + "io" + "path" + "regexp" + "strconv" + "strings" +) + +const ( + blobSizeCutoff = 1024 + + // MetaFileIdentifier is the string appearing at the first line of LFS pointer files. + // https://github.com/git-lfs/git-lfs/blob/master/docs/spec.md + MetaFileIdentifier = "version https://git-lfs.github.com/spec/v1" + + // MetaFileOidPrefix appears in LFS pointer files on a line before the sha256 hash. + MetaFileOidPrefix = "oid sha256:" +) + +var ( + // ErrMissingPrefix occurs if the content lacks the LFS prefix + ErrMissingPrefix = errors.New("Content lacks the LFS prefix") + + // ErrInvalidStructure occurs if the content has an invalid structure + ErrInvalidStructure = errors.New("Content has an invalid structure") + + // ErrInvalidOIDFormat occurs if the oid has an invalid format + ErrInvalidOIDFormat = errors.New("OID has an invalid format") +) + +// ReadPointer tries to read LFS pointer data from the reader +func ReadPointer(reader io.Reader) (Pointer, error) { + buf := make([]byte, blobSizeCutoff) + n, err := io.ReadFull(reader, buf) + if err != nil && err != io.ErrUnexpectedEOF { + return Pointer{}, err + } + buf = buf[:n] + + return ReadPointerFromBuffer(buf) +} + +var oidPattern = regexp.MustCompile(`^[a-f\d]{64}$`) + +// ReadPointerFromBuffer will return a pointer if the provided byte slice is a pointer file or an error otherwise. +func ReadPointerFromBuffer(buf []byte) (Pointer, error) { + var p Pointer + + headString := string(buf) + if !strings.HasPrefix(headString, MetaFileIdentifier) { + return p, ErrMissingPrefix + } + + splitLines := strings.Split(headString, "\n") + if len(splitLines) < 3 { + return p, ErrInvalidStructure + } + + oid := strings.TrimPrefix(splitLines[1], MetaFileOidPrefix) + if len(oid) != 64 || !oidPattern.MatchString(oid) { + return p, ErrInvalidOIDFormat + } + size, err := strconv.ParseInt(strings.TrimPrefix(splitLines[2], "size "), 10, 64) + if err != nil { + return p, err + } + + p.Oid = oid + p.Size = size + + return p, nil +} + +// IsValid checks if the pointer has a valid structure. +// It doesn't check if the pointed-to-content exists. +func (p Pointer) IsValid() bool { + if len(p.Oid) != 64 { + return false + } + if !oidPattern.MatchString(p.Oid) { + return false + } + if p.Size < 0 { + return false + } + return true +} + +// StringContent returns the string representation of the pointer +// https://github.com/git-lfs/git-lfs/blob/main/docs/spec.md#the-pointer +func (p Pointer) StringContent() string { + return fmt.Sprintf("%s\n%s%s\nsize %d\n", MetaFileIdentifier, MetaFileOidPrefix, p.Oid, p.Size) +} + +// RelativePath returns the relative storage path of the pointer +func (p Pointer) RelativePath() string { + if len(p.Oid) < 5 { + return p.Oid + } + + return path.Join(p.Oid[0:2], p.Oid[2:4], p.Oid[4:]) +} + +// GeneratePointer generates a pointer for arbitrary content +func GeneratePointer(content io.Reader) (Pointer, error) { + h := sha256.New() + c, err := io.Copy(h, content) + if err != nil { + return Pointer{}, err + } + sum := h.Sum(nil) + return Pointer{Oid: hex.EncodeToString(sum), Size: c}, nil +} diff --git a/modules/lfs/pointer_scanner_gogit.go b/modules/lfs/pointer_scanner_gogit.go new file mode 100644 index 000000000..7e8b812f4 --- /dev/null +++ b/modules/lfs/pointer_scanner_gogit.go @@ -0,0 +1,65 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +//go:build gogit +// +build gogit + +package lfs + +import ( + "context" + "fmt" + + "code.gitea.io/gitea/modules/git" + + "github.com/go-git/go-git/v5/plumbing/object" +) + +// SearchPointerBlobs scans the whole repository for LFS pointer files +func SearchPointerBlobs(ctx context.Context, repo *git.Repository, pointerChan chan<- PointerBlob, errChan chan<- error) { + gitRepo := repo.GoGitRepo() + + err := func() error { + blobs, err := gitRepo.BlobObjects() + if err != nil { + return fmt.Errorf("lfs.SearchPointerBlobs BlobObjects: %w", err) + } + + return blobs.ForEach(func(blob *object.Blob) error { + select { + case <-ctx.Done(): + return ctx.Err() + default: + } + + if blob.Size > blobSizeCutoff { + return nil + } + + reader, err := blob.Reader() + if err != nil { + return fmt.Errorf("lfs.SearchPointerBlobs blob.Reader: %w", err) + } + defer reader.Close() + + pointer, _ := ReadPointer(reader) + if pointer.IsValid() { + pointerChan <- PointerBlob{Hash: blob.Hash.String(), Pointer: pointer} + } + + return nil + }) + }() + + if err != nil { + select { + case <-ctx.Done(): + default: + errChan <- err + } + } + + close(pointerChan) + close(errChan) +} diff --git a/modules/lfs/pointer_scanner_nogogit.go b/modules/lfs/pointer_scanner_nogogit.go new file mode 100644 index 000000000..d8076b902 --- /dev/null +++ b/modules/lfs/pointer_scanner_nogogit.go @@ -0,0 +1,113 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +//go:build !gogit +// +build !gogit + +package lfs + +import ( + "bufio" + "context" + "io" + "strconv" + "strings" + "sync" + + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/git/pipeline" +) + +// SearchPointerBlobs scans the whole repository for LFS pointer files +func SearchPointerBlobs(ctx context.Context, repo *git.Repository, pointerChan chan<- PointerBlob, errChan chan<- error) { + basePath := repo.Path + + catFileCheckReader, catFileCheckWriter := io.Pipe() + shasToBatchReader, shasToBatchWriter := io.Pipe() + catFileBatchReader, catFileBatchWriter := io.Pipe() + + wg := sync.WaitGroup{} + wg.Add(4) + + // Create the go-routines in reverse order. + + // 4. Take the output of cat-file --batch and check if each file in turn + // to see if they're pointers to files in the LFS store + go createPointerResultsFromCatFileBatch(ctx, catFileBatchReader, &wg, pointerChan) + + // 3. Take the shas of the blobs and batch read them + go pipeline.CatFileBatch(shasToBatchReader, catFileBatchWriter, &wg, basePath) + + // 2. From the provided objects restrict to blobs <=1k + go pipeline.BlobsLessThan1024FromCatFileBatchCheck(catFileCheckReader, shasToBatchWriter, &wg) + + // 1. Run batch-check on all objects in the repository + if git.CheckGitVersionAtLeast("2.6.0") != nil { + revListReader, revListWriter := io.Pipe() + shasToCheckReader, shasToCheckWriter := io.Pipe() + wg.Add(2) + go pipeline.CatFileBatchCheck(shasToCheckReader, catFileCheckWriter, &wg, basePath) + go pipeline.BlobsFromRevListObjects(revListReader, shasToCheckWriter, &wg) + go pipeline.RevListAllObjects(revListWriter, &wg, basePath, errChan) + } else { + go pipeline.CatFileBatchCheckAllObjects(catFileCheckWriter, &wg, basePath, errChan) + } + wg.Wait() + + close(pointerChan) + close(errChan) +} + +func createPointerResultsFromCatFileBatch(ctx context.Context, catFileBatchReader *io.PipeReader, wg *sync.WaitGroup, pointerChan chan<- PointerBlob) { + defer wg.Done() + defer catFileBatchReader.Close() + + bufferedReader := bufio.NewReader(catFileBatchReader) + buf := make([]byte, 1025) + +loop: + for { + select { + case <-ctx.Done(): + break loop + default: + } + + // File descriptor line: sha + sha, err := bufferedReader.ReadString(' ') + if err != nil { + _ = catFileBatchReader.CloseWithError(err) + break + } + sha = strings.TrimSpace(sha) + // Throw away the blob + if _, err := bufferedReader.ReadString(' '); err != nil { + _ = catFileBatchReader.CloseWithError(err) + break + } + sizeStr, err := bufferedReader.ReadString('\n') + if err != nil { + _ = catFileBatchReader.CloseWithError(err) + break + } + size, err := strconv.Atoi(sizeStr[:len(sizeStr)-1]) + if err != nil { + _ = catFileBatchReader.CloseWithError(err) + break + } + pointerBuf := buf[:size+1] + if _, err := io.ReadFull(bufferedReader, pointerBuf); err != nil { + _ = catFileBatchReader.CloseWithError(err) + break + } + pointerBuf = pointerBuf[:size] + // Now we need to check if the pointerBuf is an LFS pointer + pointer, _ := ReadPointerFromBuffer(pointerBuf) + if !pointer.IsValid() { + continue + } + + pointerChan <- PointerBlob{Hash: sha, Pointer: pointer} + } +} diff --git a/modules/lfs/pointer_test.go b/modules/lfs/pointer_test.go new file mode 100644 index 000000000..9cd8b15c9 --- /dev/null +++ b/modules/lfs/pointer_test.go @@ -0,0 +1,103 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "path" + "strings" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestStringContent(t *testing.T) { + p := Pointer{Oid: "4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393", Size: 1234} + expected := "version https://git-lfs.github.com/spec/v1\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize 1234\n" + assert.Equal(t, expected, p.StringContent()) +} + +func TestRelativePath(t *testing.T) { + p := Pointer{Oid: "4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393"} + expected := path.Join("4d", "7a", "214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393") + assert.Equal(t, expected, p.RelativePath()) + + p2 := Pointer{Oid: "4d7a"} + assert.Equal(t, "4d7a", p2.RelativePath()) +} + +func TestIsValid(t *testing.T) { + p := Pointer{} + assert.False(t, p.IsValid()) + + p = Pointer{Oid: "123"} + assert.False(t, p.IsValid()) + + p = Pointer{Oid: "z4cb57646c54a297c9807697e80a30946f79a4b82cb079d2606847825b1812cc"} + assert.False(t, p.IsValid()) + + p = Pointer{Oid: "94cb57646c54a297c9807697e80a30946f79a4b82cb079d2606847825b1812cc"} + assert.True(t, p.IsValid()) + + p = Pointer{Oid: "94cb57646c54a297c9807697e80a30946f79a4b82cb079d2606847825b1812cc", Size: -1} + assert.False(t, p.IsValid()) +} + +func TestGeneratePointer(t *testing.T) { + p, err := GeneratePointer(strings.NewReader("Gitea")) + assert.NoError(t, err) + assert.True(t, p.IsValid()) + assert.Equal(t, "94cb57646c54a297c9807697e80a30946f79a4b82cb079d2606847825b1812cc", p.Oid) + assert.Equal(t, int64(5), p.Size) +} + +func TestReadPointerFromBuffer(t *testing.T) { + p, err := ReadPointerFromBuffer([]byte{}) + assert.ErrorIs(t, err, ErrMissingPrefix) + assert.False(t, p.IsValid()) + + p, err = ReadPointerFromBuffer([]byte("test")) + assert.ErrorIs(t, err, ErrMissingPrefix) + assert.False(t, p.IsValid()) + + p, err = ReadPointerFromBuffer([]byte("version https://git-lfs.github.com/spec/v1\n")) + assert.ErrorIs(t, err, ErrInvalidStructure) + assert.False(t, p.IsValid()) + + p, err = ReadPointerFromBuffer([]byte("version https://git-lfs.github.com/spec/v1\noid sha256:4d7a\nsize 1234\n")) + assert.ErrorIs(t, err, ErrInvalidOIDFormat) + assert.False(t, p.IsValid()) + + p, err = ReadPointerFromBuffer([]byte("version https://git-lfs.github.com/spec/v1\noid sha256:4d7a2146z4ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize 1234\n")) + assert.ErrorIs(t, err, ErrInvalidOIDFormat) + assert.False(t, p.IsValid()) + + p, err = ReadPointerFromBuffer([]byte("version https://git-lfs.github.com/spec/v1\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\ntest 1234\n")) + assert.Error(t, err) + assert.False(t, p.IsValid()) + + p, err = ReadPointerFromBuffer([]byte("version https://git-lfs.github.com/spec/v1\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize test\n")) + assert.Error(t, err) + assert.False(t, p.IsValid()) + + p, err = ReadPointerFromBuffer([]byte("version https://git-lfs.github.com/spec/v1\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize 1234\n")) + assert.NoError(t, err) + assert.True(t, p.IsValid()) + assert.Equal(t, "4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393", p.Oid) + assert.Equal(t, int64(1234), p.Size) + + p, err = ReadPointerFromBuffer([]byte("version https://git-lfs.github.com/spec/v1\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize 1234\ntest")) + assert.NoError(t, err) + assert.True(t, p.IsValid()) + assert.Equal(t, "4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393", p.Oid) + assert.Equal(t, int64(1234), p.Size) +} + +func TestReadPointer(t *testing.T) { + p, err := ReadPointer(strings.NewReader("version https://git-lfs.github.com/spec/v1\noid sha256:4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393\nsize 1234\n")) + assert.NoError(t, err) + assert.True(t, p.IsValid()) + assert.Equal(t, "4d7a214614ab2935c943f9e0ff69d22eadbb8f32b1258daaa5e2ca24d17e2393", p.Oid) + assert.Equal(t, int64(1234), p.Size) +} diff --git a/modules/lfs/pointers.go b/modules/lfs/pointers.go deleted file mode 100644 index c6fbf090e..000000000 --- a/modules/lfs/pointers.go +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package lfs - -import ( - "io" - "strconv" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" -) - -// ReadPointerFile will return a partially filled LFSMetaObject if the provided reader is a pointer file -func ReadPointerFile(reader io.Reader) (*models.LFSMetaObject, *[]byte) { - if !setting.LFS.StartServer { - return nil, nil - } - - buf := make([]byte, 1024) - n, _ := reader.Read(buf) - buf = buf[:n] - - if isTextFile := base.IsTextFile(buf); !isTextFile { - return nil, nil - } - - return IsPointerFile(&buf), &buf -} - -// IsPointerFile will return a partially filled LFSMetaObject if the provided byte slice is a pointer file -func IsPointerFile(buf *[]byte) *models.LFSMetaObject { - if !setting.LFS.StartServer { - return nil - } - - headString := string(*buf) - if !strings.HasPrefix(headString, models.LFSMetaFileIdentifier) { - return nil - } - - splitLines := strings.Split(headString, "\n") - if len(splitLines) < 3 { - return nil - } - - oid := strings.TrimPrefix(splitLines[1], models.LFSMetaFileOidPrefix) - size, err := strconv.ParseInt(strings.TrimPrefix(splitLines[2], "size "), 10, 64) - if len(oid) != 64 || err != nil { - return nil - } - - contentStore := &ContentStore{ObjectStorage: storage.LFS} - meta := &models.LFSMetaObject{Oid: oid, Size: size} - exist, err := contentStore.Exists(meta) - if err != nil || !exist { - return nil - } - - return meta -} - -// ReadMetaObject will read a models.LFSMetaObject and return a reader -func ReadMetaObject(meta *models.LFSMetaObject) (io.ReadCloser, error) { - contentStore := &ContentStore{ObjectStorage: storage.LFS} - return contentStore.Get(meta, 0) -} diff --git a/modules/lfs/server.go b/modules/lfs/server.go deleted file mode 100644 index 226bcbf55..000000000 --- a/modules/lfs/server.go +++ /dev/null @@ -1,697 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package lfs - -import ( - "encoding/base64" - "encoding/json" - "fmt" - "io" - "net/http" - "path" - "regexp" - "strconv" - "strings" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" - - "gitea.com/macaron/macaron" - "github.com/dgrijalva/jwt-go" -) - -const ( - metaMediaType = "application/vnd.git-lfs+json" -) - -// RequestVars contain variables from the HTTP request. Variables from routing, json body decoding, and -// some headers are stored. -type RequestVars struct { - Oid string - Size int64 - User string - Password string - Repo string - Authorization string -} - -// BatchVars contains multiple RequestVars processed in one batch operation. -// https://github.com/git-lfs/git-lfs/blob/master/docs/api/batch.md -type BatchVars struct { - Transfers []string `json:"transfers,omitempty"` - Operation string `json:"operation"` - Objects []*RequestVars `json:"objects"` -} - -// BatchResponse contains multiple object metadata Representation structures -// for use with the batch API. -type BatchResponse struct { - Transfer string `json:"transfer,omitempty"` - Objects []*Representation `json:"objects"` -} - -// Representation is object metadata as seen by clients of the lfs server. -type Representation struct { - Oid string `json:"oid"` - Size int64 `json:"size"` - Actions map[string]*link `json:"actions"` - Error *ObjectError `json:"error,omitempty"` -} - -// ObjectError defines the JSON structure returned to the client in case of an error -type ObjectError struct { - Code int `json:"code"` - Message string `json:"message"` -} - -// Claims is a JWT Token Claims -type Claims struct { - RepoID int64 - Op string - UserID int64 - jwt.StandardClaims -} - -// ObjectLink builds a URL linking to the object. -func (v *RequestVars) ObjectLink() string { - return setting.AppURL + path.Join(v.User, v.Repo+".git", "info/lfs/objects", v.Oid) -} - -// VerifyLink builds a URL for verifying the object. -func (v *RequestVars) VerifyLink() string { - return setting.AppURL + path.Join(v.User, v.Repo+".git", "info/lfs/verify") -} - -// link provides a structure used to build a hypermedia representation of an HTTP link. -type link struct { - Href string `json:"href"` - Header map[string]string `json:"header,omitempty"` - ExpiresAt time.Time `json:"expires_at,omitempty"` -} - -var oidRegExp = regexp.MustCompile(`^[A-Fa-f0-9]+$`) - -func isOidValid(oid string) bool { - return oidRegExp.MatchString(oid) -} - -// ObjectOidHandler is the main request routing entry point into LFS server functions -func ObjectOidHandler(ctx *context.Context) { - if !setting.LFS.StartServer { - log.Debug("Attempt to access LFS server but LFS server is disabled") - writeStatus(ctx, 404) - return - } - - if ctx.Req.Method == "GET" || ctx.Req.Method == "HEAD" { - if MetaMatcher(ctx.Req) { - getMetaHandler(ctx) - return - } - - getContentHandler(ctx) - return - } else if ctx.Req.Method == "PUT" { - PutHandler(ctx) - return - } - - log.Warn("Unhandled LFS method: %s for %s/%s OID[%s]", ctx.Req.Method, ctx.Params("username"), ctx.Params("reponame"), ctx.Params("oid")) - writeStatus(ctx, 404) -} - -func getAuthenticatedRepoAndMeta(ctx *context.Context, rv *RequestVars, requireWrite bool) (*models.LFSMetaObject, *models.Repository) { - if !isOidValid(rv.Oid) { - log.Info("Attempt to access invalid LFS OID[%s] in %s/%s", rv.Oid, rv.User, rv.Repo) - writeStatus(ctx, 404) - return nil, nil - } - - repository, err := models.GetRepositoryByOwnerAndName(rv.User, rv.Repo) - if err != nil { - log.Error("Unable to get repository: %s/%s Error: %v", rv.User, rv.Repo, err) - writeStatus(ctx, 404) - return nil, nil - } - - if !authenticate(ctx, repository, rv.Authorization, requireWrite) { - requireAuth(ctx) - return nil, nil - } - - meta, err := repository.GetLFSMetaObjectByOid(rv.Oid) - if err != nil { - log.Error("Unable to get LFS OID[%s] Error: %v", rv.Oid, err) - writeStatus(ctx, 404) - return nil, nil - } - - return meta, repository -} - -// getContentHandler gets the content from the content store -func getContentHandler(ctx *context.Context) { - rv := unpack(ctx) - - meta, _ := getAuthenticatedRepoAndMeta(ctx, rv, false) - if meta == nil { - // Status already written in getAuthenticatedRepoAndMeta - return - } - - // Support resume download using Range header - var fromByte, toByte int64 - toByte = meta.Size - 1 - statusCode := 200 - if rangeHdr := ctx.Req.Header.Get("Range"); rangeHdr != "" { - regex := regexp.MustCompile(`bytes=(\d+)\-(\d*).*`) - match := regex.FindStringSubmatch(rangeHdr) - if len(match) > 1 { - statusCode = 206 - fromByte, _ = strconv.ParseInt(match[1], 10, 32) - - if match[2] != "" { - _toByte, _ := strconv.ParseInt(match[2], 10, 32) - if _toByte >= fromByte && _toByte < toByte { - toByte = _toByte - } - } - - ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size-fromByte)) - ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Range") - } - } - - contentStore := &ContentStore{ObjectStorage: storage.LFS} - content, err := contentStore.Get(meta, fromByte) - if err != nil { - if IsErrRangeNotSatisfiable(err) { - writeStatus(ctx, http.StatusRequestedRangeNotSatisfiable) - } else { - // Errors are logged in contentStore.Get - writeStatus(ctx, 404) - } - return - } - defer content.Close() - - contentLength := toByte + 1 - fromByte - ctx.Resp.Header().Set("Content-Length", strconv.FormatInt(contentLength, 10)) - ctx.Resp.Header().Set("Content-Type", "application/octet-stream") - - filename := ctx.Params("filename") - if len(filename) > 0 { - decodedFilename, err := base64.RawURLEncoding.DecodeString(filename) - if err == nil { - ctx.Resp.Header().Set("Content-Disposition", "attachment; filename=\""+string(decodedFilename)+"\"") - ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition") - } - } - - ctx.Resp.WriteHeader(statusCode) - if written, err := io.CopyN(ctx.Resp, content, contentLength); err != nil { - log.Error("Error whilst copying LFS OID[%s] to the response after %d bytes. Error: %v", meta.Oid, written, err) - } - logRequest(ctx.Req, statusCode) -} - -// getMetaHandler retrieves metadata about the object -func getMetaHandler(ctx *context.Context) { - rv := unpack(ctx) - - meta, _ := getAuthenticatedRepoAndMeta(ctx, rv, false) - if meta == nil { - // Status already written in getAuthenticatedRepoAndMeta - return - } - - ctx.Resp.Header().Set("Content-Type", metaMediaType) - - if ctx.Req.Method == "GET" { - enc := json.NewEncoder(ctx.Resp) - if err := enc.Encode(Represent(rv, meta, true, false)); err != nil { - log.Error("Failed to encode representation as json. Error: %v", err) - } - } - - logRequest(ctx.Req, 200) -} - -// PostHandler instructs the client how to upload data -func PostHandler(ctx *context.Context) { - if !setting.LFS.StartServer { - log.Debug("Attempt to access LFS server but LFS server is disabled") - writeStatus(ctx, 404) - return - } - - if !MetaMatcher(ctx.Req) { - log.Info("Attempt to POST without accepting the correct media type: %s", metaMediaType) - writeStatus(ctx, 400) - return - } - - rv := unpack(ctx) - - repository, err := models.GetRepositoryByOwnerAndName(rv.User, rv.Repo) - if err != nil { - log.Error("Unable to get repository: %s/%s Error: %v", rv.User, rv.Repo, err) - writeStatus(ctx, 404) - return - } - - if !authenticate(ctx, repository, rv.Authorization, true) { - requireAuth(ctx) - return - } - - if !isOidValid(rv.Oid) { - log.Info("Invalid LFS OID[%s] attempt to POST in %s/%s", rv.Oid, rv.User, rv.Repo) - writeStatus(ctx, 404) - return - } - - if setting.LFS.MaxFileSize > 0 && rv.Size > setting.LFS.MaxFileSize { - log.Info("Denied LFS OID[%s] upload of size %d to %s/%s because of LFS_MAX_FILE_SIZE=%d", rv.Oid, rv.Size, rv.User, rv.Repo, setting.LFS.MaxFileSize) - writeStatus(ctx, 413) - return - } - - meta, err := models.NewLFSMetaObject(&models.LFSMetaObject{Oid: rv.Oid, Size: rv.Size, RepositoryID: repository.ID}) - if err != nil { - log.Error("Unable to write LFS OID[%s] size %d meta object in %v/%v to database. Error: %v", rv.Oid, rv.Size, rv.User, rv.Repo, err) - writeStatus(ctx, 404) - return - } - - ctx.Resp.Header().Set("Content-Type", metaMediaType) - - sentStatus := 202 - contentStore := &ContentStore{ObjectStorage: storage.LFS} - exist, err := contentStore.Exists(meta) - if err != nil { - log.Error("Unable to check if LFS OID[%s] exist on %s / %s. Error: %v", rv.Oid, rv.User, rv.Repo, err) - writeStatus(ctx, 500) - return - } - if meta.Existing && exist { - sentStatus = 200 - } - ctx.Resp.WriteHeader(sentStatus) - - enc := json.NewEncoder(ctx.Resp) - if err := enc.Encode(Represent(rv, meta, meta.Existing, true)); err != nil { - log.Error("Failed to encode representation as json. Error: %v", err) - } - logRequest(ctx.Req, sentStatus) -} - -// BatchHandler provides the batch api -func BatchHandler(ctx *context.Context) { - if !setting.LFS.StartServer { - log.Debug("Attempt to access LFS server but LFS server is disabled") - writeStatus(ctx, 404) - return - } - - if !MetaMatcher(ctx.Req) { - log.Info("Attempt to BATCH without accepting the correct media type: %s", metaMediaType) - writeStatus(ctx, 400) - return - } - - bv := unpackbatch(ctx) - - var responseObjects []*Representation - - // Create a response object - for _, object := range bv.Objects { - if !isOidValid(object.Oid) { - log.Info("Invalid LFS OID[%s] attempt to BATCH in %s/%s", object.Oid, object.User, object.Repo) - continue - } - - repository, err := models.GetRepositoryByOwnerAndName(object.User, object.Repo) - if err != nil { - log.Error("Unable to get repository: %s/%s Error: %v", object.User, object.Repo, err) - writeStatus(ctx, 404) - return - } - - requireWrite := false - if bv.Operation == "upload" { - requireWrite = true - } - - if !authenticate(ctx, repository, object.Authorization, requireWrite) { - requireAuth(ctx) - return - } - - contentStore := &ContentStore{ObjectStorage: storage.LFS} - - meta, err := repository.GetLFSMetaObjectByOid(object.Oid) - if err == nil { // Object is found and exists - exist, err := contentStore.Exists(meta) - if err != nil { - log.Error("Unable to check if LFS OID[%s] exist on %s / %s. Error: %v", object.Oid, object.User, object.Repo, err) - writeStatus(ctx, 500) - return - } - if exist { - responseObjects = append(responseObjects, Represent(object, meta, true, false)) - continue - } - } - - if requireWrite && setting.LFS.MaxFileSize > 0 && object.Size > setting.LFS.MaxFileSize { - log.Info("Denied LFS OID[%s] upload of size %d to %s/%s because of LFS_MAX_FILE_SIZE=%d", object.Oid, object.Size, object.User, object.Repo, setting.LFS.MaxFileSize) - writeStatus(ctx, 413) - return - } - - // Object is not found - meta, err = models.NewLFSMetaObject(&models.LFSMetaObject{Oid: object.Oid, Size: object.Size, RepositoryID: repository.ID}) - if err == nil { - exist, err := contentStore.Exists(meta) - if err != nil { - log.Error("Unable to check if LFS OID[%s] exist on %s / %s. Error: %v", object.Oid, object.User, object.Repo, err) - writeStatus(ctx, 500) - return - } - responseObjects = append(responseObjects, Represent(object, meta, meta.Existing, !exist)) - } else { - log.Error("Unable to write LFS OID[%s] size %d meta object in %v/%v to database. Error: %v", object.Oid, object.Size, object.User, object.Repo, err) - } - } - - ctx.Resp.Header().Set("Content-Type", metaMediaType) - - respobj := &BatchResponse{Objects: responseObjects} - - enc := json.NewEncoder(ctx.Resp) - if err := enc.Encode(respobj); err != nil { - log.Error("Failed to encode representation as json. Error: %v", err) - } - logRequest(ctx.Req, 200) -} - -// PutHandler receives data from the client and puts it into the content store -func PutHandler(ctx *context.Context) { - rv := unpack(ctx) - - meta, repository := getAuthenticatedRepoAndMeta(ctx, rv, true) - if meta == nil { - // Status already written in getAuthenticatedRepoAndMeta - return - } - - contentStore := &ContentStore{ObjectStorage: storage.LFS} - defer ctx.Req.Request.Body.Close() - if err := contentStore.Put(meta, ctx.Req.Request.Body); err != nil { - // Put will log the error itself - ctx.Resp.WriteHeader(500) - if err == errSizeMismatch || err == errHashMismatch { - fmt.Fprintf(ctx.Resp, `{"message":"%s"}`, err) - } else { - fmt.Fprintf(ctx.Resp, `{"message":"Internal Server Error"}`) - } - if _, err = repository.RemoveLFSMetaObjectByOid(rv.Oid); err != nil { - log.Error("Whilst removing metaobject for LFS OID[%s] due to preceding error there was another Error: %v", rv.Oid, err) - } - return - } - - logRequest(ctx.Req, 200) -} - -// VerifyHandler verify oid and its size from the content store -func VerifyHandler(ctx *context.Context) { - if !setting.LFS.StartServer { - log.Debug("Attempt to access LFS server but LFS server is disabled") - writeStatus(ctx, 404) - return - } - - if !MetaMatcher(ctx.Req) { - log.Info("Attempt to VERIFY without accepting the correct media type: %s", metaMediaType) - writeStatus(ctx, 400) - return - } - - rv := unpack(ctx) - - meta, _ := getAuthenticatedRepoAndMeta(ctx, rv, true) - if meta == nil { - // Status already written in getAuthenticatedRepoAndMeta - return - } - - contentStore := &ContentStore{ObjectStorage: storage.LFS} - ok, err := contentStore.Verify(meta) - if err != nil { - // Error will be logged in Verify - ctx.Resp.WriteHeader(500) - fmt.Fprintf(ctx.Resp, `{"message":"Internal Server Error"}`) - return - } - if !ok { - writeStatus(ctx, 422) - return - } - - logRequest(ctx.Req, 200) -} - -// Represent takes a RequestVars and Meta and turns it into a Representation suitable -// for json encoding -func Represent(rv *RequestVars, meta *models.LFSMetaObject, download, upload bool) *Representation { - rep := &Representation{ - Oid: meta.Oid, - Size: meta.Size, - Actions: make(map[string]*link), - } - - header := make(map[string]string) - - if rv.Authorization == "" { - //https://github.com/github/git-lfs/issues/1088 - header["Authorization"] = "Authorization: Basic dummy" - } else { - header["Authorization"] = rv.Authorization - } - - if download { - rep.Actions["download"] = &link{Href: rv.ObjectLink(), Header: header} - } - - if upload { - rep.Actions["upload"] = &link{Href: rv.ObjectLink(), Header: header} - } - - if upload && !download { - // Force client side verify action while gitea lacks proper server side verification - verifyHeader := make(map[string]string) - for k, v := range header { - verifyHeader[k] = v - } - - // This is only needed to workaround https://github.com/git-lfs/git-lfs/issues/3662 - verifyHeader["Accept"] = metaMediaType - - rep.Actions["verify"] = &link{Href: rv.VerifyLink(), Header: verifyHeader} - } - - return rep -} - -// MetaMatcher provides a mux.MatcherFunc that only allows requests that contain -// an Accept header with the metaMediaType -func MetaMatcher(r macaron.Request) bool { - mediaParts := strings.Split(r.Header.Get("Accept"), ";") - mt := mediaParts[0] - return mt == metaMediaType -} - -func unpack(ctx *context.Context) *RequestVars { - r := ctx.Req - rv := &RequestVars{ - User: ctx.Params("username"), - Repo: strings.TrimSuffix(ctx.Params("reponame"), ".git"), - Oid: ctx.Params("oid"), - Authorization: r.Header.Get("Authorization"), - } - - if r.Method == "POST" { // Maybe also check if +json - var p RequestVars - bodyReader := r.Body().ReadCloser() - defer bodyReader.Close() - dec := json.NewDecoder(bodyReader) - err := dec.Decode(&p) - if err != nil { - // The error is logged as a WARN here because this may represent misbehaviour rather than a true error - log.Warn("Unable to decode POST request vars for LFS OID[%s] in %s/%s: Error: %v", rv.Oid, rv.User, rv.Repo, err) - return rv - } - - rv.Oid = p.Oid - rv.Size = p.Size - } - - return rv -} - -// TODO cheap hack, unify with unpack -func unpackbatch(ctx *context.Context) *BatchVars { - - r := ctx.Req - var bv BatchVars - - bodyReader := r.Body().ReadCloser() - defer bodyReader.Close() - dec := json.NewDecoder(bodyReader) - err := dec.Decode(&bv) - if err != nil { - // The error is logged as a WARN here because this may represent misbehaviour rather than a true error - log.Warn("Unable to decode BATCH request vars in %s/%s: Error: %v", ctx.Params("username"), strings.TrimSuffix(ctx.Params("reponame"), ".git"), err) - return &bv - } - - for i := 0; i < len(bv.Objects); i++ { - bv.Objects[i].User = ctx.Params("username") - bv.Objects[i].Repo = strings.TrimSuffix(ctx.Params("reponame"), ".git") - bv.Objects[i].Authorization = r.Header.Get("Authorization") - } - - return &bv -} - -func writeStatus(ctx *context.Context, status int) { - message := http.StatusText(status) - - mediaParts := strings.Split(ctx.Req.Header.Get("Accept"), ";") - mt := mediaParts[0] - if strings.HasSuffix(mt, "+json") { - message = `{"message":"` + message + `"}` - } - - ctx.Resp.WriteHeader(status) - fmt.Fprint(ctx.Resp, message) - logRequest(ctx.Req, status) -} - -func logRequest(r macaron.Request, status int) { - log.Debug("LFS request - Method: %s, URL: %s, Status %d", r.Method, r.URL, status) -} - -// authenticate uses the authorization string to determine whether -// or not to proceed. This server assumes an HTTP Basic auth format. -func authenticate(ctx *context.Context, repository *models.Repository, authorization string, requireWrite bool) bool { - accessMode := models.AccessModeRead - if requireWrite { - accessMode = models.AccessModeWrite - } - - // ctx.IsSigned is unnecessary here, this will be checked in perm.CanAccess - perm, err := models.GetUserRepoPermission(repository, ctx.User) - if err != nil { - log.Error("Unable to GetUserRepoPermission for user %-v in repo %-v Error: %v", ctx.User, repository) - return false - } - - canRead := perm.CanAccess(accessMode, models.UnitTypeCode) - if canRead { - return true - } - - user, repo, opStr, err := parseToken(authorization) - if err != nil { - // Most of these are Warn level - the true internal server errors are logged in parseToken already - log.Warn("Authentication failure for provided token with Error: %v", err) - return false - } - ctx.User = user - if opStr == "basic" { - perm, err = models.GetUserRepoPermission(repository, ctx.User) - if err != nil { - log.Error("Unable to GetUserRepoPermission for user %-v in repo %-v Error: %v", ctx.User, repository) - return false - } - return perm.CanAccess(accessMode, models.UnitTypeCode) - } - if repository.ID == repo.ID { - if requireWrite && opStr != "upload" { - return false - } - return true - } - return false -} - -func parseToken(authorization string) (*models.User, *models.Repository, string, error) { - if authorization == "" { - return nil, nil, "unknown", fmt.Errorf("No token") - } - if strings.HasPrefix(authorization, "Bearer ") { - token, err := jwt.ParseWithClaims(authorization[7:], &Claims{}, func(t *jwt.Token) (interface{}, error) { - if _, ok := t.Method.(*jwt.SigningMethodHMAC); !ok { - return nil, fmt.Errorf("unexpected signing method: %v", t.Header["alg"]) - } - return setting.LFS.JWTSecretBytes, nil - }) - if err != nil { - // The error here is WARN level because it is caused by bad authorization rather than an internal server error - return nil, nil, "unknown", err - } - claims, claimsOk := token.Claims.(*Claims) - if !token.Valid || !claimsOk { - return nil, nil, "unknown", fmt.Errorf("Token claim invalid") - } - r, err := models.GetRepositoryByID(claims.RepoID) - if err != nil { - log.Error("Unable to GetRepositoryById[%d]: Error: %v", claims.RepoID, err) - return nil, nil, claims.Op, err - } - u, err := models.GetUserByID(claims.UserID) - if err != nil { - log.Error("Unable to GetUserById[%d]: Error: %v", claims.UserID, err) - return nil, r, claims.Op, err - } - return u, r, claims.Op, nil - } - - if strings.HasPrefix(authorization, "Basic ") { - c, err := base64.StdEncoding.DecodeString(strings.TrimPrefix(authorization, "Basic ")) - if err != nil { - return nil, nil, "basic", err - } - cs := string(c) - i := strings.IndexByte(cs, ':') - if i < 0 { - return nil, nil, "basic", fmt.Errorf("Basic auth invalid") - } - user, password := cs[:i], cs[i+1:] - u, err := models.GetUserByName(user) - if err != nil { - log.Error("Unable to GetUserByName[%d]: Error: %v", user, err) - return nil, nil, "basic", err - } - if !u.IsPasswordSet() || !u.ValidatePassword(password) { - return nil, nil, "basic", fmt.Errorf("Basic auth failed") - } - return u, nil, "basic", nil - } - - return nil, nil, "unknown", fmt.Errorf("Token not found") -} - -func requireAuth(ctx *context.Context) { - ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") - writeStatus(ctx, 401) -} diff --git a/modules/lfs/shared.go b/modules/lfs/shared.go new file mode 100644 index 000000000..d010b05ee --- /dev/null +++ b/modules/lfs/shared.go @@ -0,0 +1,76 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "time" +) + +const ( + // MediaType contains the media type for LFS server requests + MediaType = "application/vnd.git-lfs+json" +) + +// BatchRequest contains multiple requests processed in one batch operation. +// https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#requests +type BatchRequest struct { + Operation string `json:"operation"` + Transfers []string `json:"transfers,omitempty"` + Ref *Reference `json:"ref,omitempty"` + Objects []Pointer `json:"objects"` +} + +// Reference contains a git reference. +// https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#ref-property +type Reference struct { + Name string `json:"name"` +} + +// Pointer contains LFS pointer data +type Pointer struct { + Oid string `json:"oid" xorm:"UNIQUE(s) INDEX NOT NULL"` + Size int64 `json:"size" xorm:"NOT NULL"` +} + +// BatchResponse contains multiple object metadata Representation structures +// for use with the batch API. +// https://github.com/git-lfs/git-lfs/blob/main/docs/api/batch.md#successful-responses +type BatchResponse struct { + Transfer string `json:"transfer,omitempty"` + Objects []*ObjectResponse `json:"objects"` +} + +// ObjectResponse is object metadata as seen by clients of the LFS server. +type ObjectResponse struct { + Pointer + Actions map[string]*Link `json:"actions,omitempty"` + Error *ObjectError `json:"error,omitempty"` +} + +// Link provides a structure with information about how to access a object. +type Link struct { + Href string `json:"href"` + Header map[string]string `json:"header,omitempty"` + ExpiresAt *time.Time `json:"expires_at,omitempty"` +} + +// ObjectError defines the JSON structure returned to the client in case of an error. +type ObjectError struct { + Code int `json:"code"` + Message string `json:"message"` +} + +// PointerBlob associates a Git blob with a Pointer. +type PointerBlob struct { + Hash string + Pointer +} + +// ErrorResponse describes the error to the client. +type ErrorResponse struct { + Message string + DocumentationURL string `json:"documentation_url,omitempty"` + RequestID string `json:"request_id,omitempty"` +} diff --git a/modules/lfs/transferadapter.go b/modules/lfs/transferadapter.go new file mode 100644 index 000000000..03f326f26 --- /dev/null +++ b/modules/lfs/transferadapter.go @@ -0,0 +1,135 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "bytes" + "context" + "errors" + "fmt" + "io" + "net/http" + + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" +) + +// TransferAdapter represents an adapter for downloading/uploading LFS objects +type TransferAdapter interface { + Name() string + Download(ctx context.Context, l *Link) (io.ReadCloser, error) + Upload(ctx context.Context, l *Link, p Pointer, r io.Reader) error + Verify(ctx context.Context, l *Link, p Pointer) error +} + +// BasicTransferAdapter implements the "basic" adapter +type BasicTransferAdapter struct { + client *http.Client +} + +// Name returns the name of the adapter +func (a *BasicTransferAdapter) Name() string { + return "basic" +} + +// Download reads the download location and downloads the data +func (a *BasicTransferAdapter) Download(ctx context.Context, l *Link) (io.ReadCloser, error) { + resp, err := a.performRequest(ctx, "GET", l, nil, nil) + if err != nil { + return nil, err + } + return resp.Body, nil +} + +// Upload sends the content to the LFS server +func (a *BasicTransferAdapter) Upload(ctx context.Context, l *Link, p Pointer, r io.Reader) error { + _, err := a.performRequest(ctx, "PUT", l, r, func(req *http.Request) { + if len(req.Header.Get("Content-Type")) == 0 { + req.Header.Set("Content-Type", "application/octet-stream") + } + + if req.Header.Get("Transfer-Encoding") == "chunked" { + req.TransferEncoding = []string{"chunked"} + } + + req.ContentLength = p.Size + }) + if err != nil { + return err + } + return nil +} + +// Verify calls the verify handler on the LFS server +func (a *BasicTransferAdapter) Verify(ctx context.Context, l *Link, p Pointer) error { + b, err := json.Marshal(p) + if err != nil { + log.Error("Error encoding json: %v", err) + return err + } + + _, err = a.performRequest(ctx, "POST", l, bytes.NewReader(b), func(req *http.Request) { + req.Header.Set("Content-Type", MediaType) + }) + if err != nil { + return err + } + return nil +} + +func (a *BasicTransferAdapter) performRequest(ctx context.Context, method string, l *Link, body io.Reader, callback func(*http.Request)) (*http.Response, error) { + log.Trace("Calling: %s %s", method, l.Href) + + req, err := http.NewRequestWithContext(ctx, method, l.Href, body) + if err != nil { + log.Error("Error creating request: %v", err) + return nil, err + } + for key, value := range l.Header { + req.Header.Set(key, value) + } + req.Header.Set("Accept", MediaType) + + if callback != nil { + callback(req) + } + + res, err := a.client.Do(req) + if err != nil { + select { + case <-ctx.Done(): + return res, ctx.Err() + default: + } + log.Error("Error while processing request: %v", err) + return res, err + } + + if res.StatusCode != http.StatusOK { + return res, handleErrorResponse(res) + } + + return res, nil +} + +func handleErrorResponse(resp *http.Response) error { + defer resp.Body.Close() + + er, err := decodeReponseError(resp.Body) + if err != nil { + return fmt.Errorf("Request failed with status %s", resp.Status) + } + log.Trace("ErrorRespone: %v", er) + return errors.New(er.Message) +} + +func decodeReponseError(r io.Reader) (ErrorResponse, error) { + var er ErrorResponse + err := json.NewDecoder(r).Decode(&er) + if err != nil { + log.Error("Error decoding json: %v", err) + } + return er, err +} diff --git a/modules/lfs/transferadapter_test.go b/modules/lfs/transferadapter_test.go new file mode 100644 index 000000000..9192b486e --- /dev/null +++ b/modules/lfs/transferadapter_test.go @@ -0,0 +1,174 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "bytes" + "context" + "io" + "io/ioutil" + "net/http" + "strings" + "testing" + + "code.gitea.io/gitea/modules/json" + + "github.com/stretchr/testify/assert" +) + +func TestBasicTransferAdapterName(t *testing.T) { + a := &BasicTransferAdapter{} + + assert.Equal(t, "basic", a.Name()) +} + +func TestBasicTransferAdapter(t *testing.T) { + p := Pointer{Oid: "b5a2c96250612366ea272ffac6d9744aaf4b45aacd96aa7cfcb931ee3b558259", Size: 5} + + roundTripHandler := func(req *http.Request) *http.Response { + assert.Equal(t, MediaType, req.Header.Get("Accept")) + assert.Equal(t, "test-value", req.Header.Get("test-header")) + + url := req.URL.String() + if strings.Contains(url, "download-request") { + assert.Equal(t, "GET", req.Method) + + return &http.Response{StatusCode: http.StatusOK, Body: ioutil.NopCloser(bytes.NewBufferString("dummy"))} + } else if strings.Contains(url, "upload-request") { + assert.Equal(t, "PUT", req.Method) + assert.Equal(t, "application/octet-stream", req.Header.Get("Content-Type")) + + b, err := io.ReadAll(req.Body) + assert.NoError(t, err) + assert.Equal(t, "dummy", string(b)) + + return &http.Response{StatusCode: http.StatusOK} + } else if strings.Contains(url, "verify-request") { + assert.Equal(t, "POST", req.Method) + assert.Equal(t, MediaType, req.Header.Get("Content-Type")) + + var vp Pointer + err := json.NewDecoder(req.Body).Decode(&vp) + assert.NoError(t, err) + assert.Equal(t, p.Oid, vp.Oid) + assert.Equal(t, p.Size, vp.Size) + + return &http.Response{StatusCode: http.StatusOK} + } else if strings.Contains(url, "error-response") { + er := &ErrorResponse{ + Message: "Object not found", + } + payload := new(bytes.Buffer) + json.NewEncoder(payload).Encode(er) + + return &http.Response{StatusCode: http.StatusNotFound, Body: ioutil.NopCloser(payload)} + } else { + t.Errorf("Unknown test case: %s", url) + return nil + } + } + + hc := &http.Client{Transport: RoundTripFunc(roundTripHandler)} + a := &BasicTransferAdapter{hc} + + t.Run("Download", func(t *testing.T) { + cases := []struct { + link *Link + expectederror string + }{ + // case 0 + { + link: &Link{ + Href: "https://download-request.io", + Header: map[string]string{"test-header": "test-value"}, + }, + expectederror: "", + }, + // case 1 + { + link: &Link{ + Href: "https://error-response.io", + Header: map[string]string{"test-header": "test-value"}, + }, + expectederror: "Object not found", + }, + } + + for n, c := range cases { + _, err := a.Download(context.Background(), c.link) + if len(c.expectederror) > 0 { + assert.True(t, strings.Contains(err.Error(), c.expectederror), "case %d: '%s' should contain '%s'", n, err.Error(), c.expectederror) + } else { + assert.NoError(t, err, "case %d", n) + } + } + }) + + t.Run("Upload", func(t *testing.T) { + cases := []struct { + link *Link + expectederror string + }{ + // case 0 + { + link: &Link{ + Href: "https://upload-request.io", + Header: map[string]string{"test-header": "test-value"}, + }, + expectederror: "", + }, + // case 1 + { + link: &Link{ + Href: "https://error-response.io", + Header: map[string]string{"test-header": "test-value"}, + }, + expectederror: "Object not found", + }, + } + + for n, c := range cases { + err := a.Upload(context.Background(), c.link, p, bytes.NewBufferString("dummy")) + if len(c.expectederror) > 0 { + assert.True(t, strings.Contains(err.Error(), c.expectederror), "case %d: '%s' should contain '%s'", n, err.Error(), c.expectederror) + } else { + assert.NoError(t, err, "case %d", n) + } + } + }) + + t.Run("Verify", func(t *testing.T) { + cases := []struct { + link *Link + expectederror string + }{ + // case 0 + { + link: &Link{ + Href: "https://verify-request.io", + Header: map[string]string{"test-header": "test-value"}, + }, + expectederror: "", + }, + // case 1 + { + link: &Link{ + Href: "https://error-response.io", + Header: map[string]string{"test-header": "test-value"}, + }, + expectederror: "Object not found", + }, + } + + for n, c := range cases { + err := a.Verify(context.Background(), c.link, p) + if len(c.expectederror) > 0 { + assert.True(t, strings.Contains(err.Error(), c.expectederror), "case %d: '%s' should contain '%s'", n, err.Error(), c.expectederror) + } else { + assert.NoError(t, err, "case %d", n) + } + } + }) +} diff --git a/modules/log/colors_router.go b/modules/log/colors_router.go index e291a0da9..3064e005c 100644 --- a/modules/log/colors_router.go +++ b/modules/log/colors_router.go @@ -19,7 +19,7 @@ var statusToColor = map[int][]byte{ 500: ColorBytes(Bold, BgRed), } -// ColoredStatus addes colors for HTTP status +// ColoredStatus adds colors for HTTP status func ColoredStatus(status int, s ...string) *ColoredValue { color, ok := statusToColor[status] if !ok { @@ -43,7 +43,7 @@ var methodToColor = map[string][]byte{ "HEAD": ColorBytes(FgBlue, Faint), } -// ColoredMethod addes colors for HtTP methos on log +// ColoredMethod adds colors for HTTP methods on log func ColoredMethod(method string) *ColoredValue { color, ok := methodToColor[method] if !ok { @@ -72,7 +72,7 @@ var ( wayTooLong = ColorBytes(BgMagenta) ) -// ColoredTime addes colors for time on log +// ColoredTime adds colors for time on log func ColoredTime(duration time.Duration) *ColoredValue { for i, k := range durations { if duration < k { diff --git a/modules/log/conn.go b/modules/log/conn.go index 1abe44c1d..3e32c81d7 100644 --- a/modules/log/conn.go +++ b/modules/log/conn.go @@ -6,9 +6,11 @@ package log import ( - "encoding/json" + "fmt" "io" "net" + + "code.gitea.io/gitea/modules/json" ) type connWriter struct { @@ -106,7 +108,7 @@ func NewConn() LoggerProvider { func (log *ConnLogger) Init(jsonconfig string) error { err := json.Unmarshal([]byte(jsonconfig), log) if err != nil { - return err + return fmt.Errorf("Unable to parse JSON: %v", err) } log.NewWriterLogger(&connWriter{ ReconnectOnMsg: log.ReconnectOnMsg, diff --git a/modules/log/conn_test.go b/modules/log/conn_test.go index 0f35f02a2..dc5de732f 100644 --- a/modules/log/conn_test.go +++ b/modules/log/conn_test.go @@ -98,7 +98,8 @@ func TestConnLoggerBadConfig(t *testing.T) { logger := NewConn() err := logger.Init("{") - assert.Equal(t, "unexpected end of JSON input", err.Error()) + assert.Error(t, err) + assert.Contains(t, err.Error(), "Unable to parse JSON") logger.Close() } diff --git a/modules/log/console.go b/modules/log/console.go index a805021f0..7ecdd5c3b 100644 --- a/modules/log/console.go +++ b/modules/log/console.go @@ -6,9 +6,11 @@ package log import ( - "encoding/json" + "fmt" "io" "os" + + "code.gitea.io/gitea/modules/json" ) // CanColorStdout reports if we can color the Stdout @@ -52,7 +54,7 @@ func NewConsoleLogger() LoggerProvider { func (log *ConsoleLogger) Init(config string) error { err := json.Unmarshal([]byte(config), log) if err != nil { - return err + return fmt.Errorf("Unable to parse JSON: %v", err) } if log.Stderr { log.NewWriterLogger(&nopWriteCloser{ diff --git a/modules/log/console_test.go b/modules/log/console_test.go index a028b5b87..4da87b48a 100644 --- a/modules/log/console_test.go +++ b/modules/log/console_test.go @@ -17,7 +17,8 @@ func TestConsoleLoggerBadConfig(t *testing.T) { logger := NewConsoleLogger() err := logger.Init("{") - assert.Equal(t, "unexpected end of JSON input", err.Error()) + assert.Error(t, err) + assert.Contains(t, err.Error(), "Unable to parse JSON") logger.Close() } @@ -47,7 +48,7 @@ func TestConsoleLoggerMinimalConfig(t *testing.T) { assert.Equal(t, prefix, realCW.Prefix) assert.Equal(t, "", string(written)) cw.Close() - assert.Equal(t, false, closed) + assert.False(t, closed) } } @@ -96,20 +97,20 @@ func TestConsoleLogger(t *testing.T) { expected := fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg) cw.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = DEBUG expected = "" cw.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) event.level = TRACE expected = "" cw.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) nonMatchEvent := Event{ level: INFO, @@ -123,15 +124,15 @@ func TestConsoleLogger(t *testing.T) { expected = "" cw.LogEvent(&nonMatchEvent) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) event.level = WARN expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg) cw.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] cw.Close() - assert.Equal(t, false, closed) + assert.False(t, closed) } diff --git a/modules/log/event.go b/modules/log/event.go index 6975bf749..00a66c306 100644 --- a/modules/log/event.go +++ b/modules/log/event.go @@ -143,7 +143,7 @@ type MultiChannelledLog struct { name string bufferLength int64 queue chan *Event - mutex sync.Mutex + rwmutex sync.RWMutex loggers map[string]EventLogger flush chan bool close chan bool @@ -173,10 +173,10 @@ func NewMultiChannelledLog(name string, bufferLength int64) *MultiChannelledLog // AddLogger adds a logger to this MultiChannelledLog func (m *MultiChannelledLog) AddLogger(logger EventLogger) error { - m.mutex.Lock() + m.rwmutex.Lock() name := logger.GetName() if _, has := m.loggers[name]; has { - m.mutex.Unlock() + m.rwmutex.Unlock() return ErrDuplicateName{name} } m.loggers[name] = logger @@ -186,7 +186,7 @@ func (m *MultiChannelledLog) AddLogger(logger EventLogger) error { if logger.GetStacktraceLevel() < m.stacktraceLevel { m.stacktraceLevel = logger.GetStacktraceLevel() } - m.mutex.Unlock() + m.rwmutex.Unlock() go m.Start() return nil } @@ -195,15 +195,15 @@ func (m *MultiChannelledLog) AddLogger(logger EventLogger) error { // NB: If you delete the last sublogger this logger will simply drop // log events func (m *MultiChannelledLog) DelLogger(name string) bool { - m.mutex.Lock() + m.rwmutex.Lock() logger, has := m.loggers[name] if !has { - m.mutex.Unlock() + m.rwmutex.Unlock() return false } delete(m.loggers, name) m.internalResetLevel() - m.mutex.Unlock() + m.rwmutex.Unlock() logger.Flush() logger.Close() return true @@ -211,15 +211,15 @@ func (m *MultiChannelledLog) DelLogger(name string) bool { // GetEventLogger returns a sub logger from this MultiChannelledLog func (m *MultiChannelledLog) GetEventLogger(name string) EventLogger { - m.mutex.Lock() - defer m.mutex.Unlock() + m.rwmutex.RLock() + defer m.rwmutex.RUnlock() return m.loggers[name] } // GetEventLoggerNames returns a list of names func (m *MultiChannelledLog) GetEventLoggerNames() []string { - m.mutex.Lock() - defer m.mutex.Unlock() + m.rwmutex.RLock() + defer m.rwmutex.RUnlock() var keys []string for k := range m.loggers { keys = append(keys, k) @@ -228,12 +228,12 @@ func (m *MultiChannelledLog) GetEventLoggerNames() []string { } func (m *MultiChannelledLog) closeLoggers() { - m.mutex.Lock() + m.rwmutex.Lock() for _, logger := range m.loggers { logger.Flush() logger.Close() } - m.mutex.Unlock() + m.rwmutex.Unlock() m.closed <- true } @@ -249,8 +249,8 @@ func (m *MultiChannelledLog) Resume() { // ReleaseReopen causes this logger to tell its subloggers to release and reopen func (m *MultiChannelledLog) ReleaseReopen() error { - m.mutex.Lock() - defer m.mutex.Unlock() + m.rwmutex.Lock() + defer m.rwmutex.Unlock() var accumulatedErr error for _, logger := range m.loggers { if err := logger.ReleaseReopen(); err != nil { @@ -266,13 +266,13 @@ func (m *MultiChannelledLog) ReleaseReopen() error { // Start processing the MultiChannelledLog func (m *MultiChannelledLog) Start() { - m.mutex.Lock() + m.rwmutex.Lock() if m.started { - m.mutex.Unlock() + m.rwmutex.Unlock() return } m.started = true - m.mutex.Unlock() + m.rwmutex.Unlock() paused := false for { if paused { @@ -286,11 +286,11 @@ func (m *MultiChannelledLog) Start() { m.closeLoggers() return } - m.mutex.Lock() + m.rwmutex.RLock() for _, logger := range m.loggers { logger.Flush() } - m.mutex.Unlock() + m.rwmutex.RUnlock() case <-m.close: m.closeLoggers() return @@ -307,24 +307,24 @@ func (m *MultiChannelledLog) Start() { m.closeLoggers() return } - m.mutex.Lock() + m.rwmutex.RLock() for _, logger := range m.loggers { err := logger.LogEvent(event) if err != nil { fmt.Println(err) } } - m.mutex.Unlock() + m.rwmutex.RUnlock() case _, ok := <-m.flush: if !ok { m.closeLoggers() return } - m.mutex.Lock() + m.rwmutex.RLock() for _, logger := range m.loggers { logger.Flush() } - m.mutex.Unlock() + m.rwmutex.RUnlock() case <-m.close: m.closeLoggers() return @@ -359,11 +359,15 @@ func (m *MultiChannelledLog) Flush() { // GetLevel gets the level of this MultiChannelledLog func (m *MultiChannelledLog) GetLevel() Level { + m.rwmutex.RLock() + defer m.rwmutex.RUnlock() return m.level } // GetStacktraceLevel gets the level of this MultiChannelledLog func (m *MultiChannelledLog) GetStacktraceLevel() Level { + m.rwmutex.RLock() + defer m.rwmutex.RUnlock() return m.stacktraceLevel } @@ -384,8 +388,8 @@ func (m *MultiChannelledLog) internalResetLevel() Level { // ResetLevel will reset the level of this MultiChannelledLog func (m *MultiChannelledLog) ResetLevel() Level { - m.mutex.Lock() - defer m.mutex.Unlock() + m.rwmutex.Lock() + defer m.rwmutex.Unlock() return m.internalResetLevel() } diff --git a/modules/log/file.go b/modules/log/file.go index c9b5d47c0..bc9d74172 100644 --- a/modules/log/file.go +++ b/modules/log/file.go @@ -7,7 +7,6 @@ package log import ( "bufio" "compress/gzip" - "encoding/json" "errors" "fmt" "os" @@ -16,6 +15,7 @@ import ( "sync" "time" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/util" ) @@ -102,7 +102,7 @@ func NewFileLogger() LoggerProvider { // } func (log *FileLogger) Init(config string) error { if err := json.Unmarshal([]byte(config), log); err != nil { - return err + return fmt.Errorf("Unable to parse JSON: %v", err) } if len(log.Filename) == 0 { return errors.New("config must have filename") @@ -176,7 +176,7 @@ func (log *FileLogger) DoRotate() error { // close fd before rename // Rename the file to its newfound home - if err = os.Rename(log.Filename, fname); err != nil { + if err = util.Rename(log.Filename, fname); err != nil { return fmt.Errorf("Rotate: %v", err) } diff --git a/modules/log/file_test.go b/modules/log/file_test.go index af6fbcb29..7bc5f9003 100644 --- a/modules/log/file_test.go +++ b/modules/log/file_test.go @@ -30,7 +30,7 @@ func TestFileLoggerFails(t *testing.T) { fileLogger := NewFileLogger() //realFileLogger, ok := fileLogger.(*FileLogger) - //assert.Equal(t, true, ok) + //assert.True(t, ok) // Fail if there is bad json err = fileLogger.Init("{") @@ -161,7 +161,7 @@ func TestCompressFileLogger(t *testing.T) { fileLogger := NewFileLogger() realFileLogger, ok := fileLogger.(*FileLogger) - assert.Equal(t, true, ok) + assert.True(t, ok) location, _ := time.LoadLocation("EST") diff --git a/modules/log/level.go b/modules/log/level.go index ab231bd1b..5964ed8f8 100644 --- a/modules/log/level.go +++ b/modules/log/level.go @@ -6,10 +6,11 @@ package log import ( "bytes" - "encoding/json" "fmt" "os" "strings" + + "code.gitea.io/gitea/modules/json" ) // Level is the level of the logger diff --git a/modules/log/level_test.go b/modules/log/level_test.go index 40f6310bf..47f77738c 100644 --- a/modules/log/level_test.go +++ b/modules/log/level_test.go @@ -5,10 +5,11 @@ package log import ( - "encoding/json" "fmt" "testing" + "code.gitea.io/gitea/modules/json" + "github.com/stretchr/testify/assert" ) diff --git a/modules/log/log.go b/modules/log/log.go index 16a6efb75..cae24f53d 100644 --- a/modules/log/log.go +++ b/modules/log/log.go @@ -267,7 +267,7 @@ func NewLoggerAsWriter(level string, ourLoggers ...*MultiChannelledLogger) *Logg return l } -// Write implements the io.Writer interface to allow spoofing of macaron +// Write implements the io.Writer interface to allow spoofing of chi func (l *LoggerAsWriter) Write(p []byte) (int, error) { for _, logger := range l.ourLoggers { // Skip = 3 because this presumes that we have been called by log.Println() diff --git a/modules/log/log_test.go b/modules/log/log_test.go index 810505dea..d14daa5a2 100644 --- a/modules/log/log_test.go +++ b/modules/log/log_test.go @@ -26,9 +26,9 @@ func baseConsoleTest(t *testing.T, logger *MultiChannelledLogger) (chan []byte, channelledLog := m.GetEventLogger("console") assert.NotEmpty(t, channelledLog) realChanLog, ok := channelledLog.(*ChannelledLog) - assert.Equal(t, true, ok) + assert.True(t, ok) realCL, ok := realChanLog.loggerProvider.(*ConsoleLogger) - assert.Equal(t, true, ok) + assert.True(t, ok) assert.Equal(t, INFO, realCL.Level) realCL.out = c @@ -38,20 +38,20 @@ func baseConsoleTest(t *testing.T, logger *MultiChannelledLogger) (chan []byte, logger.Log(0, INFO, format, args...) line := <-written assert.Contains(t, string(line), fmt.Sprintf(format, args...)) - assert.Equal(t, false, <-closed) + assert.False(t, <-closed) format = "test2: %s" logger.Warn(format, args...) line = <-written assert.Contains(t, string(line), fmt.Sprintf(format, args...)) - assert.Equal(t, false, <-closed) + assert.False(t, <-closed) format = "testerror: %s" logger.Error(format, args...) line = <-written assert.Contains(t, string(line), fmt.Sprintf(format, args...)) - assert.Equal(t, false, <-closed) + assert.False(t, <-closed) return written, closed } @@ -63,7 +63,7 @@ func TestNewLoggerUnexported(t *testing.T) { out := logger.MultiChannelledLog.GetEventLogger("console") assert.NotEmpty(t, out) chanlog, ok := out.(*ChannelledLog) - assert.Equal(t, true, ok) + assert.True(t, ok) assert.Equal(t, "console", chanlog.provider) assert.Equal(t, INFO, logger.GetLevel()) baseConsoleTest(t, logger) @@ -74,11 +74,11 @@ func TestNewLoggger(t *testing.T) { logger := NewLogger(0, "console", "console", fmt.Sprintf(`{"level":"%s"}`, level.String())) assert.Equal(t, INFO, GetLevel()) - assert.Equal(t, false, IsTrace()) - assert.Equal(t, false, IsDebug()) - assert.Equal(t, true, IsInfo()) - assert.Equal(t, true, IsWarn()) - assert.Equal(t, true, IsError()) + assert.False(t, IsTrace()) + assert.False(t, IsDebug()) + assert.True(t, IsInfo()) + assert.True(t, IsWarn()) + assert.True(t, IsError()) written, closed := baseConsoleTest(t, logger) @@ -88,17 +88,17 @@ func TestNewLoggger(t *testing.T) { Log(0, INFO, format, args...) line := <-written assert.Contains(t, string(line), fmt.Sprintf(format, args...)) - assert.Equal(t, false, <-closed) + assert.False(t, <-closed) Info(format, args...) line = <-written assert.Contains(t, string(line), fmt.Sprintf(format, args...)) - assert.Equal(t, false, <-closed) + assert.False(t, <-closed) go DelLogger("console") line = <-written assert.Equal(t, "", string(line)) - assert.Equal(t, true, <-closed) + assert.True(t, <-closed) } func TestNewLogggerRecreate(t *testing.T) { @@ -106,11 +106,11 @@ func TestNewLogggerRecreate(t *testing.T) { NewLogger(0, "console", "console", fmt.Sprintf(`{"level":"%s"}`, level.String())) assert.Equal(t, INFO, GetLevel()) - assert.Equal(t, false, IsTrace()) - assert.Equal(t, false, IsDebug()) - assert.Equal(t, true, IsInfo()) - assert.Equal(t, true, IsWarn()) - assert.Equal(t, true, IsError()) + assert.False(t, IsTrace()) + assert.False(t, IsDebug()) + assert.True(t, IsInfo()) + assert.True(t, IsWarn()) + assert.True(t, IsError()) format := "test: %s" args := []interface{}{"A"} @@ -120,11 +120,11 @@ func TestNewLogggerRecreate(t *testing.T) { NewLogger(0, "console", "console", fmt.Sprintf(`{"level":"%s"}`, level.String())) assert.Equal(t, INFO, GetLevel()) - assert.Equal(t, false, IsTrace()) - assert.Equal(t, false, IsDebug()) - assert.Equal(t, true, IsInfo()) - assert.Equal(t, true, IsWarn()) - assert.Equal(t, true, IsError()) + assert.False(t, IsTrace()) + assert.False(t, IsDebug()) + assert.True(t, IsInfo()) + assert.True(t, IsWarn()) + assert.True(t, IsError()) Log(0, INFO, format, args...) @@ -150,5 +150,5 @@ func TestNewNamedLogger(t *testing.T) { go DelNamedLogger("test") line := <-written assert.Equal(t, "", string(line)) - assert.Equal(t, true, <-closed) + assert.True(t, <-closed) } diff --git a/modules/log/smtp.go b/modules/log/smtp.go index edf494361..60dced370 100644 --- a/modules/log/smtp.go +++ b/modules/log/smtp.go @@ -6,9 +6,11 @@ package log import ( - "encoding/json" + "fmt" "net/smtp" "strings" + + "code.gitea.io/gitea/modules/json" ) type smtpWriter struct { @@ -57,7 +59,7 @@ func NewSMTPLogger() LoggerProvider { func (log *SMTPLogger) Init(jsonconfig string) error { err := json.Unmarshal([]byte(jsonconfig), log) if err != nil { - return err + return fmt.Errorf("Unable to parse JSON: %v", err) } log.NewWriterLogger(&smtpWriter{ owner: log, diff --git a/modules/log/smtp_test.go b/modules/log/smtp_test.go index 216d55521..c8758bf6b 100644 --- a/modules/log/smtp_test.go +++ b/modules/log/smtp_test.go @@ -26,7 +26,7 @@ func TestSMTPLogger(t *testing.T) { logger := NewSMTPLogger() smtpLogger, ok := logger.(*SMTPLogger) - assert.Equal(t, true, ok) + assert.True(t, ok) err := logger.Init(fmt.Sprintf("{\"prefix\":\"%s\",\"level\":\"%s\",\"flags\":%d,\"username\":\"%s\",\"password\":\"%s\",\"host\":\"%s\",\"subject\":\"%s\",\"sendTos\":[\"%s\",\"%s\"]}", prefix, level.String(), flags, username, password, host, subject, sendTos[0], sendTos[1])) assert.NoError(t, err) diff --git a/modules/log/writer_test.go b/modules/log/writer_test.go index 886dd58fb..99a5fd340 100644 --- a/modules/log/writer_test.go +++ b/modules/log/writer_test.go @@ -64,44 +64,44 @@ func TestBaseLogger(t *testing.T) { expected := fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg) b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = DEBUG expected = "" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) event.level = TRACE expected = "" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) event.level = WARN expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg) b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = ERROR expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg) b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = CRITICAL expected = fmt.Sprintf("%s%s %s:%d:%s [%c] %s\n", prefix, dateString, event.filename, event.line, event.caller, strings.ToUpper(event.level.String())[0], event.msg) b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] b.Close() - assert.Equal(t, true, closed) + assert.True(t, closed) } func TestBaseLoggerDated(t *testing.T) { @@ -142,46 +142,46 @@ func TestBaseLoggerDated(t *testing.T) { expected := fmt.Sprintf("%s%s %s:%d [%s] %s", prefix, dateString, "FILENAME", event.line, strings.ToUpper(event.level.String()), event.msg) b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = INFO expected = "" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = ERROR expected = fmt.Sprintf("%s%s %s:%d [%s] %s", prefix, dateString, "FILENAME", event.line, strings.ToUpper(event.level.String()), event.msg) b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = DEBUG expected = "" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = CRITICAL expected = fmt.Sprintf("%s%s %s:%d [%s] %s", prefix, dateString, "FILENAME", event.line, strings.ToUpper(event.level.String()), event.msg) b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.level = TRACE expected = "" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] b.Close() - assert.Equal(t, true, closed) + assert.True(t, closed) } func TestBaseLoggerMultiLineNoFlagsRegexp(t *testing.T) { @@ -222,20 +222,20 @@ func TestBaseLoggerMultiLineNoFlagsRegexp(t *testing.T) { expected := "TEST\n\tMESSAGE\n\tTEST\n" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.filename = "ELSEWHERE" b.LogEvent(&event) assert.Equal(t, "", string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event.caller = "FILENAME" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] event = Event{ @@ -249,9 +249,8 @@ func TestBaseLoggerMultiLineNoFlagsRegexp(t *testing.T) { expected = "TEST\n\tFILENAME\n\tTEST\n" b.LogEvent(&event) assert.Equal(t, expected, string(written)) - assert.Equal(t, false, closed) + assert.False(t, closed) written = written[:0] - } func TestBrokenRegexp(t *testing.T) { @@ -273,5 +272,5 @@ func TestBrokenRegexp(t *testing.T) { b.NewWriterLogger(c) assert.Empty(t, b.regexp) b.Close() - assert.Equal(t, true, closed) + assert.True(t, closed) } diff --git a/modules/markup/common/linkify.go b/modules/markup/common/linkify.go index 25621bf80..8a4b2a898 100644 --- a/modules/markup/common/linkify.go +++ b/modules/markup/common/linkify.go @@ -122,9 +122,7 @@ func (s *linkifyParser) Parse(parent ast.Node, block text.Reader, pc parser.Cont } } } - if m == nil { - return nil - } + if consumes != 0 { s := segment.WithStop(segment.Start + 1) ast.MergeOrAppendTextSegment(parent, s) diff --git a/modules/markup/csv/csv.go b/modules/markup/csv/csv.go index 1e3acc9b4..8a4df8951 100644 --- a/modules/markup/csv/csv.go +++ b/modules/markup/csv/csv.go @@ -5,44 +5,113 @@ package markup import ( + "bufio" "bytes" - "encoding/csv" "html" "io" + "io/ioutil" "regexp" - "strings" + "strconv" + "code.gitea.io/gitea/modules/csv" "code.gitea.io/gitea/modules/markup" - "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/setting" ) -var quoteRegexp = regexp.MustCompile(`["'][\s\S]+?["']`) - func init() { - markup.RegisterParser(Parser{}) - + markup.RegisterRenderer(Renderer{}) } -// Parser implements markup.Parser for orgmode -type Parser struct { +// Renderer implements markup.Renderer for csv files +type Renderer struct { } -// Name implements markup.Parser -func (Parser) Name() string { +// Name implements markup.Renderer +func (Renderer) Name() string { return "csv" } -// Extensions implements markup.Parser -func (Parser) Extensions() []string { +// NeedPostProcess implements markup.Renderer +func (Renderer) NeedPostProcess() bool { return false } + +// Extensions implements markup.Renderer +func (Renderer) Extensions() []string { return []string{".csv", ".tsv"} } -// Render implements markup.Parser -func (p Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { - rd := csv.NewReader(bytes.NewReader(rawBytes)) - rd.Comma = p.bestDelimiter(rawBytes) - var tmpBlock bytes.Buffer - tmpBlock.WriteString(``) +// SanitizerRules implements markup.Renderer +func (Renderer) SanitizerRules() []setting.MarkupSanitizerRule { + return []setting.MarkupSanitizerRule{ + {Element: "table", AllowAttr: "class", Regexp: regexp.MustCompile(`data-table`)}, + {Element: "th", AllowAttr: "class", Regexp: regexp.MustCompile(`line-num`)}, + {Element: "td", AllowAttr: "class", Regexp: regexp.MustCompile(`line-num`)}, + } +} + +func writeField(w io.Writer, element, class, field string) error { + if _, err := io.WriteString(w, "<"); err != nil { + return err + } + if _, err := io.WriteString(w, element); err != nil { + return err + } + if len(class) > 0 { + if _, err := io.WriteString(w, " class=\""); err != nil { + return err + } + if _, err := io.WriteString(w, class); err != nil { + return err + } + if _, err := io.WriteString(w, "\""); err != nil { + return err + } + } + if _, err := io.WriteString(w, ">"); err != nil { + return err + } + if _, err := io.WriteString(w, html.EscapeString(field)); err != nil { + return err + } + if _, err := io.WriteString(w, "") + return err +} + +// Render implements markup.Renderer +func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { + var tmpBlock = bufio.NewWriter(output) + + // FIXME: don't read all to memory + rawBytes, err := ioutil.ReadAll(input) + if err != nil { + return err + } + + if setting.UI.CSV.MaxFileSize != 0 && setting.UI.CSV.MaxFileSize < int64(len(rawBytes)) { + if _, err := tmpBlock.WriteString("
"); err != nil {
+			return err
+		}
+		if _, err := tmpBlock.WriteString(html.EscapeString(string(rawBytes))); err != nil {
+			return err
+		}
+		_, err = tmpBlock.WriteString("
") + return err + } + + rd, err := csv.CreateReaderAndGuessDelimiter(bytes.NewReader(rawBytes)) + if err != nil { + return err + } + + if _, err := tmpBlock.WriteString(`
`); err != nil { + return err + } + row := 1 for { fields, err := rd.Read() if err == io.EOF { @@ -51,63 +120,29 @@ func (p Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]strin if err != nil { continue } - tmpBlock.WriteString("") + if _, err := tmpBlock.WriteString(""); err != nil { + return err + } + element := "td" + if row == 1 { + element = "th" + } + if err := writeField(tmpBlock, element, "line-num", strconv.Itoa(row)); err != nil { + return err + } for _, field := range fields { - tmpBlock.WriteString("") - } - tmpBlock.WriteString("") - } - tmpBlock.WriteString("
") - tmpBlock.WriteString(html.EscapeString(field)) - tmpBlock.WriteString("
") - - return tmpBlock.Bytes() -} - -// bestDelimiter scores the input CSV data against delimiters, and returns the best match. -// Reads at most 10k bytes & 10 lines. -func (p Parser) bestDelimiter(data []byte) rune { - maxLines := 10 - maxBytes := util.Min(len(data), 1e4) - text := string(data[:maxBytes]) - text = quoteRegexp.ReplaceAllLiteralString(text, "") - lines := strings.SplitN(text, "\n", maxLines+1) - lines = lines[:util.Min(maxLines, len(lines))] - - delimiters := []rune{',', ';', '\t', '|'} - bestDelim := delimiters[0] - bestScore := 0.0 - for _, delim := range delimiters { - score := p.scoreDelimiter(lines, delim) - if score > bestScore { - bestScore = score - bestDelim = delim - } - } - - return bestDelim -} - -// scoreDelimiter uses a count & regularity metric to evaluate a delimiter against lines of CSV -func (Parser) scoreDelimiter(lines []string, delim rune) (score float64) { - countTotal := 0 - countLineMax := 0 - linesNotEqual := 0 - - for _, line := range lines { - if len(line) == 0 { - continue - } - - countLine := strings.Count(line, string(delim)) - countTotal += countLine - if countLine != countLineMax { - if countLineMax != 0 { - linesNotEqual++ + if err := writeField(tmpBlock, element, "", field); err != nil { + return err } - countLineMax = util.Max(countLine, countLineMax) } - } + if _, err := tmpBlock.WriteString(""); err != nil { + return err + } - return float64(countTotal) * (1 - float64(linesNotEqual)/float64(len(lines))) + row++ + } + if _, err = tmpBlock.WriteString(""); err != nil { + return err + } + return tmpBlock.Flush() } diff --git a/modules/markup/csv/csv_test.go b/modules/markup/csv/csv_test.go index 4d4e0871e..613762f86 100644 --- a/modules/markup/csv/csv_test.go +++ b/modules/markup/csv/csv_test.go @@ -5,26 +5,27 @@ package markup import ( + "strings" "testing" + "code.gitea.io/gitea/modules/markup" + "github.com/stretchr/testify/assert" ) func TestRenderCSV(t *testing.T) { - var parser Parser + var render Renderer var kases = map[string]string{ - "a": "
a
", - "1,2": "
12
", - "1;2": "
12
", - "1\t2": "
12
", - "1|2": "
12
", - "1,2,3;4,5,6;7,8,9\na;b;c": "
1,2,34,5,67,8,9
abc
", - "\"1,2,3,4\";\"a\nb\"\nc;d": "
1,2,3,4a\nb
cd
", - "
": "
<br/>
", + "a": "
1a
", + "1,2": "
112
", + "1;2\n3;4": "
112
234
", + "
": "
1<br/>
", } for k, v := range kases { - res := parser.Render([]byte(k), "", nil, false) - assert.EqualValues(t, v, string(res)) + var buf strings.Builder + err := render.Render(&markup.RenderContext{}, strings.NewReader(k), &buf) + assert.NoError(t, err) + assert.EqualValues(t, v, buf.String()) } } diff --git a/modules/markup/external/external.go b/modules/markup/external/external.go index 7acf93617..f7be06dbe 100644 --- a/modules/markup/external/external.go +++ b/modules/markup/external/external.go @@ -5,7 +5,8 @@ package external import ( - "bytes" + "context" + "fmt" "io" "io/ioutil" "os" @@ -13,36 +14,48 @@ import ( "runtime" "strings" + "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" ) -// RegisterParsers registers all supported third part parsers according settings -func RegisterParsers() { - for _, parser := range setting.ExternalMarkupParsers { - if parser.Enabled && parser.Command != "" && len(parser.FileExtensions) > 0 { - markup.RegisterParser(&Parser{parser}) +// RegisterRenderers registers all supported third part renderers according settings +func RegisterRenderers() { + for _, renderer := range setting.ExternalMarkupRenderers { + if renderer.Enabled && renderer.Command != "" && len(renderer.FileExtensions) > 0 { + markup.RegisterRenderer(&Renderer{renderer}) } } } -// Parser implements markup.Parser for external tools -type Parser struct { - setting.MarkupParser +// Renderer implements markup.Renderer for external tools +type Renderer struct { + *setting.MarkupRenderer } // Name returns the external tool name -func (p *Parser) Name() string { +func (p *Renderer) Name() string { return p.MarkupName } +// NeedPostProcess implements markup.Renderer +func (p *Renderer) NeedPostProcess() bool { + return p.MarkupRenderer.NeedPostProcess +} + // Extensions returns the supported extensions of the tool -func (p *Parser) Extensions() []string { +func (p *Renderer) Extensions() []string { return p.FileExtensions } +// SanitizerRules implements markup.Renderer +func (p *Renderer) SanitizerRules() []setting.MarkupSanitizerRule { + return p.MarkupSanitizerRules +} + func envMark(envName string) string { if runtime.GOOS == "windows" { return "%" + envName + "%" @@ -51,14 +64,10 @@ func envMark(envName string) string { } // Render renders the data of the document to HTML via the external tool. -func (p *Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { +func (p *Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { var ( - bs []byte - buf = bytes.NewBuffer(bs) - rd = bytes.NewReader(rawBytes) - urlRawPrefix = strings.Replace(urlPrefix, "/src/", "/raw/", 1) - - command = strings.NewReplacer(envMark("GITEA_PREFIX_SRC"), urlPrefix, + urlRawPrefix = strings.Replace(ctx.URLPrefix, "/src/", "/raw/", 1) + command = strings.NewReplacer(envMark("GITEA_PREFIX_SRC"), ctx.URLPrefix, envMark("GITEA_PREFIX_RAW"), urlRawPrefix).Replace(p.Command) commands = strings.Fields(command) args = commands[1:] @@ -68,8 +77,7 @@ func (p *Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]stri // write to temp file f, err := ioutil.TempFile("", "gitea_input") if err != nil { - log.Error("%s create temp file when rendering %s failed: %v", p.Name(), p.Command, err) - return []byte("") + return fmt.Errorf("%s create temp file when rendering %s failed: %v", p.Name(), p.Command, err) } tmpPath := f.Name() defer func() { @@ -78,34 +86,46 @@ func (p *Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]stri } }() - _, err = io.Copy(f, rd) + _, err = io.Copy(f, input) if err != nil { f.Close() - log.Error("%s write data to temp file when rendering %s failed: %v", p.Name(), p.Command, err) - return []byte("") + return fmt.Errorf("%s write data to temp file when rendering %s failed: %v", p.Name(), p.Command, err) } err = f.Close() if err != nil { - log.Error("%s close temp file when rendering %s failed: %v", p.Name(), p.Command, err) - return []byte("") + return fmt.Errorf("%s close temp file when rendering %s failed: %v", p.Name(), p.Command, err) } args = append(args, f.Name()) } - cmd := exec.Command(commands[0], args...) + if ctx == nil || ctx.Ctx == nil { + if ctx == nil { + log.Warn("RenderContext not provided defaulting to empty ctx") + ctx = &markup.RenderContext{} + } + log.Warn("RenderContext did not provide context, defaulting to Shutdown context") + ctx.Ctx = graceful.GetManager().ShutdownContext() + } + + processCtx, cancel := context.WithCancel(ctx.Ctx) + defer cancel() + + pid := process.GetManager().Add(fmt.Sprintf("Render [%s] for %s", commands[0], ctx.URLPrefix), cancel) + defer process.GetManager().Remove(pid) + + cmd := exec.CommandContext(processCtx, commands[0], args...) cmd.Env = append( os.Environ(), - "GITEA_PREFIX_SRC="+urlPrefix, + "GITEA_PREFIX_SRC="+ctx.URLPrefix, "GITEA_PREFIX_RAW="+urlRawPrefix, ) if !p.IsInputFile { - cmd.Stdin = rd + cmd.Stdin = input } - cmd.Stdout = buf + cmd.Stdout = output if err := cmd.Run(); err != nil { - log.Error("%s render run command %s %v failed: %v", p.Name(), commands[0], args, err) - return []byte("") + return fmt.Errorf("%s render run command %s %v failed: %v", p.Name(), commands[0], args, err) } - return buf.Bytes() + return nil } diff --git a/modules/markup/html.go b/modules/markup/html.go index 9e4b1a3d5..f279e23bf 100644 --- a/modules/markup/html.go +++ b/modules/markup/html.go @@ -6,12 +6,14 @@ package markup import ( "bytes" - "fmt" + "io" + "io/ioutil" "net/url" "path" "path/filepath" "regexp" "strings" + "sync" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/emoji" @@ -64,15 +66,12 @@ var ( blackfridayExtRegex = regexp.MustCompile(`[^:]*:user-content-`) // EmojiShortCodeRegex find emoji by alias like :smile: - EmojiShortCodeRegex = regexp.MustCompile(`\:[\w\+\-]+\:{1}`) + EmojiShortCodeRegex = regexp.MustCompile(`:[\w\+\-]+:`) ) // CSS class for action keywords (e.g. "closes: #1") const keywordClass = "issue-keyword" -// regexp for full links to issues/pulls -var issueFullPattern *regexp.Regexp - // IsLink reports whether link fits valid format. func IsLink(link []byte) bool { return isLink(link) @@ -87,15 +86,17 @@ func isLinkStr(link string) bool { return validLinksPattern.MatchString(link) } +// regexp for full links to issues/pulls +var issueFullPattern *regexp.Regexp + +// Once for to prevent races +var issueFullPatternOnce sync.Once + func getIssueFullPattern() *regexp.Regexp { - if issueFullPattern == nil { - appURL := setting.AppURL - if len(appURL) > 0 && appURL[len(appURL)-1] != '/' { - appURL += "/" - } - issueFullPattern = regexp.MustCompile(appURL + + issueFullPatternOnce.Do(func() { + issueFullPattern = regexp.MustCompile(regexp.QuoteMeta(setting.AppURL) + `\w+/\w+/(?:issues|pulls)/((?:\w{1,10}-)?[1-9][0-9]*)([\?|#]\S+.(\S+)?)?\b`) - } + }) return issueFullPattern } @@ -148,7 +149,7 @@ func (p *postProcessError) Error() string { return "PostProcess: " + p.context + ", " + p.err.Error() } -type processor func(ctx *postProcessCtx, node *html.Node) +type processor func(ctx *RenderContext, node *html.Node) var defaultProcessors = []processor{ fullIssuePatternProcessor, @@ -163,34 +164,17 @@ var defaultProcessors = []processor{ emojiShortCodeProcessor, } -type postProcessCtx struct { - metas map[string]string - urlPrefix string - isWikiMarkdown bool - - // processors used by this context. - procs []processor -} - // PostProcess does the final required transformations to the passed raw HTML // data, and ensures its validity. Transformations include: replacing links and // emails with HTML links, parsing shortlinks in the format of [[Link]], like // MediaWiki, linking issues in the format #ID, and mentions in the format // @user, and others. func PostProcess( - rawHTML []byte, - urlPrefix string, - metas map[string]string, - isWikiMarkdown bool, -) ([]byte, error) { - // create the context from the parameters - ctx := &postProcessCtx{ - metas: metas, - urlPrefix: urlPrefix, - isWikiMarkdown: isWikiMarkdown, - procs: defaultProcessors, - } - return ctx.postProcess(rawHTML) + ctx *RenderContext, + input io.Reader, + output io.Writer, +) error { + return postProcess(ctx, defaultProcessors, input, output) } var commitMessageProcessors = []processor{ @@ -209,23 +193,18 @@ var commitMessageProcessors = []processor{ // the shortLinkProcessor and will add a defaultLinkProcessor if defaultLink is // set, which changes every text node into a link to the passed default link. func RenderCommitMessage( - rawHTML []byte, - urlPrefix, defaultLink string, - metas map[string]string, -) ([]byte, error) { - ctx := &postProcessCtx{ - metas: metas, - urlPrefix: urlPrefix, - procs: commitMessageProcessors, - } - if defaultLink != "" { + ctx *RenderContext, + content string, +) (string, error) { + var procs = commitMessageProcessors + if ctx.DefaultLink != "" { // we don't have to fear data races, because being // commitMessageProcessors of fixed len and cap, every time we append // something to it the slice is realloc+copied, so append always // generates the slice ex-novo. - ctx.procs = append(ctx.procs, genDefaultLinkProcessor(defaultLink)) + procs = append(procs, genDefaultLinkProcessor(ctx.DefaultLink)) } - return ctx.postProcess(rawHTML) + return renderProcessString(ctx, procs, content) } var commitMessageSubjectProcessors = []processor{ @@ -249,119 +228,126 @@ var emojiProcessors = []processor{ // emailAddressProcessor, will add a defaultLinkProcessor if defaultLink is set, // which changes every text node into a link to the passed default link. func RenderCommitMessageSubject( - rawHTML []byte, - urlPrefix, defaultLink string, - metas map[string]string, -) ([]byte, error) { - ctx := &postProcessCtx{ - metas: metas, - urlPrefix: urlPrefix, - procs: commitMessageSubjectProcessors, - } - if defaultLink != "" { + ctx *RenderContext, + content string, +) (string, error) { + var procs = commitMessageSubjectProcessors + if ctx.DefaultLink != "" { // we don't have to fear data races, because being // commitMessageSubjectProcessors of fixed len and cap, every time we // append something to it the slice is realloc+copied, so append always // generates the slice ex-novo. - ctx.procs = append(ctx.procs, genDefaultLinkProcessor(defaultLink)) + procs = append(procs, genDefaultLinkProcessor(ctx.DefaultLink)) } - return ctx.postProcess(rawHTML) + return renderProcessString(ctx, procs, content) } // RenderIssueTitle to process title on individual issue/pull page func RenderIssueTitle( - rawHTML []byte, - urlPrefix string, - metas map[string]string, -) ([]byte, error) { - ctx := &postProcessCtx{ - metas: metas, - urlPrefix: urlPrefix, - procs: []processor{ - issueIndexPatternProcessor, - sha1CurrentPatternProcessor, - emojiShortCodeProcessor, - emojiProcessor, - }, + ctx *RenderContext, + title string, +) (string, error) { + return renderProcessString(ctx, []processor{ + issueIndexPatternProcessor, + sha1CurrentPatternProcessor, + emojiShortCodeProcessor, + emojiProcessor, + }, title) +} + +func renderProcessString(ctx *RenderContext, procs []processor, content string) (string, error) { + var buf strings.Builder + if err := postProcess(ctx, procs, strings.NewReader(content), &buf); err != nil { + return "", err } - return ctx.postProcess(rawHTML) + return buf.String(), nil } // RenderDescriptionHTML will use similar logic as PostProcess, but will // use a single special linkProcessor. func RenderDescriptionHTML( - rawHTML []byte, - urlPrefix string, - metas map[string]string, -) ([]byte, error) { - ctx := &postProcessCtx{ - metas: metas, - urlPrefix: urlPrefix, - procs: []processor{ - descriptionLinkProcessor, - emojiShortCodeProcessor, - emojiProcessor, - }, - } - return ctx.postProcess(rawHTML) + ctx *RenderContext, + content string, +) (string, error) { + return renderProcessString(ctx, []processor{ + descriptionLinkProcessor, + emojiShortCodeProcessor, + emojiProcessor, + }, content) } // RenderEmoji for when we want to just process emoji and shortcodes -// in various places it isn't already run through the normal markdown procesor +// in various places it isn't already run through the normal markdown processor func RenderEmoji( - rawHTML []byte, -) ([]byte, error) { - ctx := &postProcessCtx{ - procs: emojiProcessors, - } - return ctx.postProcess(rawHTML) + content string, +) (string, error) { + return renderProcessString(&RenderContext{}, emojiProcessors, content) } -var byteBodyTag = []byte("") -var byteBodyTagClosing = []byte("") +var tagCleaner = regexp.MustCompile(`<((?:/?\w+/\w+)|(?:/[\w ]+/)|(/?[hH][tT][mM][lL]\b)|(/?[hH][eE][aA][dD]\b))`) +var nulCleaner = strings.NewReplacer("\000", "") -func (ctx *postProcessCtx) postProcess(rawHTML []byte) ([]byte, error) { - if ctx.procs == nil { - ctx.procs = defaultProcessors +func postProcess(ctx *RenderContext, procs []processor, input io.Reader, output io.Writer) error { + defer ctx.Cancel() + // FIXME: don't read all content to memory + rawHTML, err := ioutil.ReadAll(input) + if err != nil { + return err } - // give a generous extra 50 bytes - res := make([]byte, 0, len(rawHTML)+50) - res = append(res, byteBodyTag...) - res = append(res, rawHTML...) - res = append(res, byteBodyTagClosing...) + res := bytes.NewBuffer(make([]byte, 0, len(rawHTML)+50)) + // prepend "" + _, _ = res.WriteString("") + + // Strip out nuls - they're always invalid + _, _ = res.Write(tagCleaner.ReplaceAll([]byte(nulCleaner.Replace(string(rawHTML))), []byte("<$1"))) + + // close the tags + _, _ = res.WriteString("") // parse the HTML - nodes, err := html.ParseFragment(bytes.NewReader(res), nil) + node, err := html.Parse(res) if err != nil { - return nil, &postProcessError{"invalid HTML", err} + return &postProcessError{"invalid HTML", err} } - for _, node := range nodes { - ctx.visitNode(node, true) + if node.Type == html.DocumentNode { + node = node.FirstChild } - // Create buffer in which the data will be placed again. We know that the - // length will be at least that of res; to spare a few alloc+copy, we - // reuse res, resetting its length to 0. - buf := bytes.NewBuffer(res[:0]) - // Render everything to buf. - for _, node := range nodes { - err = html.Render(buf, node) - if err != nil { - return nil, &postProcessError{"error rendering processed HTML", err} + visitNode(ctx, procs, node, true) + + newNodes := make([]*html.Node, 0, 5) + + if node.Data == "html" { + node = node.FirstChild + for node != nil && node.Data != "body" { + node = node.NextSibling + } + } + if node != nil { + if node.Data == "body" { + child := node.FirstChild + for child != nil { + newNodes = append(newNodes, child) + child = child.NextSibling + } + } else { + newNodes = append(newNodes, node) } } - // remove initial parts - because Render creates a whole HTML page. - res = buf.Bytes() - res = res[bytes.Index(res, byteBodyTag)+len(byteBodyTag) : bytes.LastIndex(res, byteBodyTagClosing)] - - // Everything done successfully, return parsed data. - return res, nil + // Render everything to buf. + for _, node := range newNodes { + err = html.Render(output, node) + if err != nil { + return &postProcessError{"error rendering processed HTML", err} + } + } + return nil } -func (ctx *postProcessCtx) visitNode(node *html.Node, visitText bool) { +func visitNode(ctx *RenderContext, procs []processor, node *html.Node, visitText bool) { // Add user-content- to IDs if they don't already have them for idx, attr := range node.Attr { if attr.Key == "id" && !(strings.HasPrefix(attr.Val, "user-content-") || blackfridayExtRegex.MatchString(attr.Val)) { @@ -377,28 +363,24 @@ func (ctx *postProcessCtx) visitNode(node *html.Node, visitText bool) { switch node.Type { case html.TextNode: if visitText { - ctx.textNode(node) + textNode(ctx, procs, node) } case html.ElementNode: if node.Data == "img" { - attrs := node.Attr - for idx, attr := range attrs { + for i, attr := range node.Attr { if attr.Key != "src" { continue } - link := []byte(attr.Val) - if len(link) > 0 && !IsLink(link) { - prefix := ctx.urlPrefix - if ctx.isWikiMarkdown { + if len(attr.Val) > 0 && !isLinkStr(attr.Val) && !strings.HasPrefix(attr.Val, "data:image/") { + prefix := ctx.URLPrefix + if ctx.IsWiki { prefix = util.URLJoin(prefix, "wiki", "raw") } prefix = strings.Replace(prefix, "/src/", "/media/", 1) - lnk := string(link) - lnk = util.URLJoin(prefix, lnk) - link = []byte(lnk) + attr.Val = util.URLJoin(prefix, attr.Val) } - node.Attr[idx].Val = string(link) + node.Attr[i] = attr } } else if node.Data == "a" { visitText = false @@ -427,7 +409,7 @@ func (ctx *postProcessCtx) visitNode(node *html.Node, visitText bool) { } } for n := node.FirstChild; n != nil; n = n.NextSibling { - ctx.visitNode(n, visitText) + visitNode(ctx, procs, n, visitText) } } // ignore everything else @@ -435,8 +417,8 @@ func (ctx *postProcessCtx) visitNode(node *html.Node, visitText bool) { // textNode runs the passed node through various processors, in order to handle // all kinds of special links handled by the post-processing. -func (ctx *postProcessCtx) textNode(node *html.Node) { - for _, processor := range ctx.procs { +func textNode(ctx *RenderContext, procs []processor, node *html.Node) { + for _, processor := range procs { processor(ctx, node) } } @@ -481,17 +463,14 @@ func createEmoji(content, class, name string) *html.Node { return span } -func createCustomEmoji(alias, class string) *html.Node { - +func createCustomEmoji(alias string) *html.Node { span := &html.Node{ Type: html.ElementNode, Data: atom.Span.String(), Attr: []html.Attribute{}, } - if class != "" { - span.Attr = append(span.Attr, html.Attribute{Key: "class", Val: class}) - span.Attr = append(span.Attr, html.Attribute{Key: "aria-label", Val: alias}) - } + span.Attr = append(span.Attr, html.Attribute{Key: "class", Val: "emoji"}) + span.Attr = append(span.Attr, html.Attribute{Key: "aria-label", Val: alias}) img := &html.Node{ Type: html.ElementNode, @@ -499,10 +478,8 @@ func createCustomEmoji(alias, class string) *html.Node { Data: "img", Attr: []html.Attribute{}, } - if class != "" { - img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: fmt.Sprintf(`:%s:`, alias)}) - img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: fmt.Sprintf(`%s/img/emoji/%s.png`, setting.StaticURLPrefix, alias)}) - } + img.Attr = append(img.Attr, html.Attribute{Key: "alt", Val: ":" + alias + ":"}) + img.Attr = append(img.Attr, html.Attribute{Key: "src", Val: setting.StaticURLPrefix + "/assets/img/emoji/" + alias + ".png"}) span.AppendChild(img) return span @@ -587,428 +564,521 @@ func replaceContentList(node *html.Node, i, j int, newNodes []*html.Node) { } } -func mentionProcessor(ctx *postProcessCtx, node *html.Node) { - // We replace only the first mention; other mentions will be addressed later - found, loc := references.FindFirstMentionBytes([]byte(node.Data)) - if !found { - return - } - mention := node.Data[loc.Start:loc.End] - var teams string - teams, ok := ctx.metas["teams"] - // team mention should follow @orgName/teamName style - if ok && strings.Contains(mention, "/") { - mentionOrgAndTeam := strings.Split(mention, "/") - if mentionOrgAndTeam[0][1:] == ctx.metas["org"] && strings.Contains(teams, ","+strings.ToLower(mentionOrgAndTeam[1])+",") { - replaceContent(node, loc.Start, loc.End, createLink(util.URLJoin(setting.AppURL, "org", ctx.metas["org"], "teams", mentionOrgAndTeam[1]), mention, "mention")) +func mentionProcessor(ctx *RenderContext, node *html.Node) { + start := 0 + next := node.NextSibling + for node != nil && node != next && start < len(node.Data) { + // We replace only the first mention; other mentions will be addressed later + found, loc := references.FindFirstMentionBytes([]byte(node.Data[start:])) + if !found { + return } - return + loc.Start += start + loc.End += start + mention := node.Data[loc.Start:loc.End] + var teams string + teams, ok := ctx.Metas["teams"] + // FIXME: util.URLJoin may not be necessary here: + // - setting.AppURL is defined to have a terminal '/' so unless mention[1:] + // is an AppSubURL link we can probably fallback to concatenation. + // team mention should follow @orgName/teamName style + if ok && strings.Contains(mention, "/") { + mentionOrgAndTeam := strings.Split(mention, "/") + if mentionOrgAndTeam[0][1:] == ctx.Metas["org"] && strings.Contains(teams, ","+strings.ToLower(mentionOrgAndTeam[1])+",") { + replaceContent(node, loc.Start, loc.End, createLink(util.URLJoin(setting.AppURL, "org", ctx.Metas["org"], "teams", mentionOrgAndTeam[1]), mention, "mention")) + node = node.NextSibling.NextSibling + start = 0 + continue + } + start = loc.End + continue + } + replaceContent(node, loc.Start, loc.End, createLink(util.URLJoin(setting.AppURL, mention[1:]), mention, "mention")) + node = node.NextSibling.NextSibling + start = 0 } - replaceContent(node, loc.Start, loc.End, createLink(util.URLJoin(setting.AppURL, mention[1:]), mention, "mention")) } -func shortLinkProcessor(ctx *postProcessCtx, node *html.Node) { +func shortLinkProcessor(ctx *RenderContext, node *html.Node) { shortLinkProcessorFull(ctx, node, false) } -func shortLinkProcessorFull(ctx *postProcessCtx, node *html.Node, noLink bool) { - m := shortLinkPattern.FindStringSubmatchIndex(node.Data) - if m == nil { - return - } +func shortLinkProcessorFull(ctx *RenderContext, node *html.Node, noLink bool) { + next := node.NextSibling + for node != nil && node != next { + m := shortLinkPattern.FindStringSubmatchIndex(node.Data) + if m == nil { + return + } - content := node.Data[m[2]:m[3]] - tail := node.Data[m[4]:m[5]] - props := make(map[string]string) + content := node.Data[m[2]:m[3]] + tail := node.Data[m[4]:m[5]] + props := make(map[string]string) - // MediaWiki uses [[link|text]], while GitHub uses [[text|link]] - // It makes page handling terrible, but we prefer GitHub syntax - // And fall back to MediaWiki only when it is obvious from the look - // Of text and link contents - sl := strings.Split(content, "|") - for _, v := range sl { - if equalPos := strings.IndexByte(v, '='); equalPos == -1 { - // There is no equal in this argument; this is a mandatory arg - if props["name"] == "" { - if isLinkStr(v) { - // If we clearly see it is a link, we save it so + // MediaWiki uses [[link|text]], while GitHub uses [[text|link]] + // It makes page handling terrible, but we prefer GitHub syntax + // And fall back to MediaWiki only when it is obvious from the look + // Of text and link contents + sl := strings.Split(content, "|") + for _, v := range sl { + if equalPos := strings.IndexByte(v, '='); equalPos == -1 { + // There is no equal in this argument; this is a mandatory arg + if props["name"] == "" { + if isLinkStr(v) { + // If we clearly see it is a link, we save it so - // But first we need to ensure, that if both mandatory args provided - // look like links, we stick to GitHub syntax - if props["link"] != "" { - props["name"] = props["link"] + // But first we need to ensure, that if both mandatory args provided + // look like links, we stick to GitHub syntax + if props["link"] != "" { + props["name"] = props["link"] + } + + props["link"] = strings.TrimSpace(v) + } else { + props["name"] = v } - - props["link"] = strings.TrimSpace(v) } else { - props["name"] = v + props["link"] = strings.TrimSpace(v) } } else { - props["link"] = strings.TrimSpace(v) - } - } else { - // There is an equal; optional argument. + // There is an equal; optional argument. - sep := strings.IndexByte(v, '=') - key, val := v[:sep], html.UnescapeString(v[sep+1:]) + sep := strings.IndexByte(v, '=') + key, val := v[:sep], html.UnescapeString(v[sep+1:]) - // When parsing HTML, x/net/html will change all quotes which are - // not used for syntax into UTF-8 quotes. So checking val[0] won't - // be enough, since that only checks a single byte. - if len(val) > 1 { - if (strings.HasPrefix(val, "“") && strings.HasSuffix(val, "”")) || - (strings.HasPrefix(val, "‘") && strings.HasSuffix(val, "’")) { - const lenQuote = len("‘") - val = val[lenQuote : len(val)-lenQuote] - } else if (strings.HasPrefix(val, "\"") && strings.HasSuffix(val, "\"")) || - (strings.HasPrefix(val, "'") && strings.HasSuffix(val, "'")) { - val = val[1 : len(val)-1] - } else if strings.HasPrefix(val, "'") && strings.HasSuffix(val, "’") { - const lenQuote = len("‘") - val = val[1 : len(val)-lenQuote] + // When parsing HTML, x/net/html will change all quotes which are + // not used for syntax into UTF-8 quotes. So checking val[0] won't + // be enough, since that only checks a single byte. + if len(val) > 1 { + if (strings.HasPrefix(val, "“") && strings.HasSuffix(val, "”")) || + (strings.HasPrefix(val, "‘") && strings.HasSuffix(val, "’")) { + const lenQuote = len("‘") + val = val[lenQuote : len(val)-lenQuote] + } else if (strings.HasPrefix(val, "\"") && strings.HasSuffix(val, "\"")) || + (strings.HasPrefix(val, "'") && strings.HasSuffix(val, "'")) { + val = val[1 : len(val)-1] + } else if strings.HasPrefix(val, "'") && strings.HasSuffix(val, "’") { + const lenQuote = len("‘") + val = val[1 : len(val)-lenQuote] + } } + props[key] = val } - props[key] = val } - } - var name, link string - if props["link"] != "" { - link = props["link"] - } else if props["name"] != "" { - link = props["name"] - } - if props["title"] != "" { - name = props["title"] - } else if props["name"] != "" { - name = props["name"] - } else { - name = link - } - - name += tail - image := false - switch ext := filepath.Ext(link); ext { - // fast path: empty string, ignore - case "": - break - case ".jpg", ".jpeg", ".png", ".tif", ".tiff", ".webp", ".gif", ".bmp", ".ico", ".svg": - image = true - } - - childNode := &html.Node{} - linkNode := &html.Node{ - FirstChild: childNode, - LastChild: childNode, - Type: html.ElementNode, - Data: "a", - DataAtom: atom.A, - } - childNode.Parent = linkNode - absoluteLink := isLinkStr(link) - if !absoluteLink { - if image { - link = strings.ReplaceAll(link, " ", "+") + var name, link string + if props["link"] != "" { + link = props["link"] + } else if props["name"] != "" { + link = props["name"] + } + if props["title"] != "" { + name = props["title"] + } else if props["name"] != "" { + name = props["name"] } else { - link = strings.ReplaceAll(link, " ", "-") + name = link } - if !strings.Contains(link, "/") { - link = url.PathEscape(link) + + name += tail + image := false + switch ext := filepath.Ext(link); ext { + // fast path: empty string, ignore + case "": + // leave image as false + case ".jpg", ".jpeg", ".png", ".tif", ".tiff", ".webp", ".gif", ".bmp", ".ico", ".svg": + image = true } - } - urlPrefix := ctx.urlPrefix - if image { + + childNode := &html.Node{} + linkNode := &html.Node{ + FirstChild: childNode, + LastChild: childNode, + Type: html.ElementNode, + Data: "a", + DataAtom: atom.A, + } + childNode.Parent = linkNode + absoluteLink := isLinkStr(link) if !absoluteLink { - if IsSameDomain(urlPrefix) { - urlPrefix = strings.Replace(urlPrefix, "/src/", "/raw/", 1) + if image { + link = strings.ReplaceAll(link, " ", "+") + } else { + link = strings.ReplaceAll(link, " ", "-") } - if ctx.isWikiMarkdown { - link = util.URLJoin("wiki", "raw", link) + if !strings.Contains(link, "/") { + link = url.PathEscape(link) } - link = util.URLJoin(urlPrefix, link) } - title := props["title"] - if title == "" { - title = props["alt"] - } - if title == "" { - title = path.Base(name) - } - alt := props["alt"] - if alt == "" { - alt = name - } - - // make the childNode an image - if we can, we also place the alt - childNode.Type = html.ElementNode - childNode.Data = "img" - childNode.DataAtom = atom.Img - childNode.Attr = []html.Attribute{ - {Key: "src", Val: link}, - {Key: "title", Val: title}, - {Key: "alt", Val: alt}, - } - if alt == "" { - childNode.Attr = childNode.Attr[:2] - } - } else { - if !absoluteLink { - if ctx.isWikiMarkdown { - link = util.URLJoin("wiki", link) + urlPrefix := ctx.URLPrefix + if image { + if !absoluteLink { + if IsSameDomain(urlPrefix) { + urlPrefix = strings.Replace(urlPrefix, "/src/", "/raw/", 1) + } + if ctx.IsWiki { + link = util.URLJoin("wiki", "raw", link) + } + link = util.URLJoin(urlPrefix, link) } - link = util.URLJoin(urlPrefix, link) + title := props["title"] + if title == "" { + title = props["alt"] + } + if title == "" { + title = path.Base(name) + } + alt := props["alt"] + if alt == "" { + alt = name + } + + // make the childNode an image - if we can, we also place the alt + childNode.Type = html.ElementNode + childNode.Data = "img" + childNode.DataAtom = atom.Img + childNode.Attr = []html.Attribute{ + {Key: "src", Val: link}, + {Key: "title", Val: title}, + {Key: "alt", Val: alt}, + } + if alt == "" { + childNode.Attr = childNode.Attr[:2] + } + } else { + if !absoluteLink { + if ctx.IsWiki { + link = util.URLJoin("wiki", link) + } + link = util.URLJoin(urlPrefix, link) + } + childNode.Type = html.TextNode + childNode.Data = name } - childNode.Type = html.TextNode - childNode.Data = name - } - if noLink { - linkNode = childNode - } else { - linkNode.Attr = []html.Attribute{{Key: "href", Val: link}} - } - replaceContent(node, m[0], m[1], linkNode) -} - -func fullIssuePatternProcessor(ctx *postProcessCtx, node *html.Node) { - if ctx.metas == nil { - return - } - m := getIssueFullPattern().FindStringSubmatchIndex(node.Data) - if m == nil { - return - } - link := node.Data[m[0]:m[1]] - id := "#" + node.Data[m[2]:m[3]] - - // extract repo and org name from matched link like - // http://localhost:3000/gituser/myrepo/issues/1 - linkParts := strings.Split(path.Clean(link), "/") - matchOrg := linkParts[len(linkParts)-4] - matchRepo := linkParts[len(linkParts)-3] - - if matchOrg == ctx.metas["user"] && matchRepo == ctx.metas["repo"] { - // TODO if m[4]:m[5] is not nil, then link is to a comment, - // and we should indicate that in the text somehow - replaceContent(node, m[0], m[1], createLink(link, id, "ref-issue")) - - } else { - orgRepoID := matchOrg + "/" + matchRepo + id - replaceContent(node, m[0], m[1], createLink(link, orgRepoID, "ref-issue")) + if noLink { + linkNode = childNode + } else { + linkNode.Attr = []html.Attribute{{Key: "href", Val: link}} + } + replaceContent(node, m[0], m[1], linkNode) + node = node.NextSibling.NextSibling } } -func issueIndexPatternProcessor(ctx *postProcessCtx, node *html.Node) { - if ctx.metas == nil { +func fullIssuePatternProcessor(ctx *RenderContext, node *html.Node) { + if ctx.Metas == nil { return } + next := node.NextSibling + for node != nil && node != next { + m := getIssueFullPattern().FindStringSubmatchIndex(node.Data) + if m == nil { + return + } + link := node.Data[m[0]:m[1]] + id := "#" + node.Data[m[2]:m[3]] + + // extract repo and org name from matched link like + // http://localhost:3000/gituser/myrepo/issues/1 + linkParts := strings.Split(link, "/") + matchOrg := linkParts[len(linkParts)-4] + matchRepo := linkParts[len(linkParts)-3] + + if matchOrg == ctx.Metas["user"] && matchRepo == ctx.Metas["repo"] { + // TODO if m[4]:m[5] is not nil, then link is to a comment, + // and we should indicate that in the text somehow + replaceContent(node, m[0], m[1], createLink(link, id, "ref-issue")) + } else { + orgRepoID := matchOrg + "/" + matchRepo + id + replaceContent(node, m[0], m[1], createLink(link, orgRepoID, "ref-issue")) + } + node = node.NextSibling.NextSibling + } +} + +func issueIndexPatternProcessor(ctx *RenderContext, node *html.Node) { + if ctx.Metas == nil { + return + } var ( found bool ref *references.RenderizableReference ) - _, exttrack := ctx.metas["format"] - alphanum := ctx.metas["style"] == IssueNameStyleAlphanumeric + next := node.NextSibling + for node != nil && node != next { + _, exttrack := ctx.Metas["format"] + alphanum := ctx.Metas["style"] == IssueNameStyleAlphanumeric - // Repos with external issue trackers might still need to reference local PRs - // We need to concern with the first one that shows up in the text, whichever it is - found, ref = references.FindRenderizableReferenceNumeric(node.Data, exttrack && alphanum) - if exttrack && alphanum { - if found2, ref2 := references.FindRenderizableReferenceAlphanumeric(node.Data); found2 { - if !found || ref2.RefLocation.Start < ref.RefLocation.Start { - found = true - ref = ref2 + // Repos with external issue trackers might still need to reference local PRs + // We need to concern with the first one that shows up in the text, whichever it is + found, ref = references.FindRenderizableReferenceNumeric(node.Data, exttrack && alphanum) + if exttrack && alphanum { + if found2, ref2 := references.FindRenderizableReferenceAlphanumeric(node.Data); found2 { + if !found || ref2.RefLocation.Start < ref.RefLocation.Start { + found = true + ref = ref2 + } } } - } - if !found { - return - } - - var link *html.Node - reftext := node.Data[ref.RefLocation.Start:ref.RefLocation.End] - if exttrack && !ref.IsPull { - ctx.metas["index"] = ref.Issue - link = createLink(com.Expand(ctx.metas["format"], ctx.metas), reftext, "ref-issue") - } else { - // Path determines the type of link that will be rendered. It's unknown at this point whether - // the linked item is actually a PR or an issue. Luckily it's of no real consequence because - // Gitea will redirect on click as appropriate. - path := "issues" - if ref.IsPull { - path = "pulls" + if !found { + return } - if ref.Owner == "" { - link = createLink(util.URLJoin(setting.AppURL, ctx.metas["user"], ctx.metas["repo"], path, ref.Issue), reftext, "ref-issue") + + var link *html.Node + reftext := node.Data[ref.RefLocation.Start:ref.RefLocation.End] + if exttrack && !ref.IsPull { + ctx.Metas["index"] = ref.Issue + link = createLink(com.Expand(ctx.Metas["format"], ctx.Metas), reftext, "ref-issue") } else { - link = createLink(util.URLJoin(setting.AppURL, ref.Owner, ref.Name, path, ref.Issue), reftext, "ref-issue") + // Path determines the type of link that will be rendered. It's unknown at this point whether + // the linked item is actually a PR or an issue. Luckily it's of no real consequence because + // Gitea will redirect on click as appropriate. + path := "issues" + if ref.IsPull { + path = "pulls" + } + if ref.Owner == "" { + link = createLink(util.URLJoin(setting.AppURL, ctx.Metas["user"], ctx.Metas["repo"], path, ref.Issue), reftext, "ref-issue") + } else { + link = createLink(util.URLJoin(setting.AppURL, ref.Owner, ref.Name, path, ref.Issue), reftext, "ref-issue") + } } - } - if ref.Action == references.XRefActionNone { - replaceContent(node, ref.RefLocation.Start, ref.RefLocation.End, link) - return - } + if ref.Action == references.XRefActionNone { + replaceContent(node, ref.RefLocation.Start, ref.RefLocation.End, link) + node = node.NextSibling.NextSibling + continue + } - // Decorate action keywords if actionable - var keyword *html.Node - if references.IsXrefActionable(ref, exttrack, alphanum) { - keyword = createKeyword(node.Data[ref.ActionLocation.Start:ref.ActionLocation.End]) - } else { - keyword = &html.Node{ + // Decorate action keywords if actionable + var keyword *html.Node + if references.IsXrefActionable(ref, exttrack, alphanum) { + keyword = createKeyword(node.Data[ref.ActionLocation.Start:ref.ActionLocation.End]) + } else { + keyword = &html.Node{ + Type: html.TextNode, + Data: node.Data[ref.ActionLocation.Start:ref.ActionLocation.End], + } + } + spaces := &html.Node{ Type: html.TextNode, - Data: node.Data[ref.ActionLocation.Start:ref.ActionLocation.End], + Data: node.Data[ref.ActionLocation.End:ref.RefLocation.Start], } + replaceContentList(node, ref.ActionLocation.Start, ref.RefLocation.End, []*html.Node{keyword, spaces, link}) + node = node.NextSibling.NextSibling.NextSibling.NextSibling } - spaces := &html.Node{ - Type: html.TextNode, - Data: node.Data[ref.ActionLocation.End:ref.RefLocation.Start], - } - replaceContentList(node, ref.ActionLocation.Start, ref.RefLocation.End, []*html.Node{keyword, spaces, link}) } // fullSha1PatternProcessor renders SHA containing URLs -func fullSha1PatternProcessor(ctx *postProcessCtx, node *html.Node) { - if ctx.metas == nil { - return - } - m := anySHA1Pattern.FindStringSubmatchIndex(node.Data) - if m == nil { +func fullSha1PatternProcessor(ctx *RenderContext, node *html.Node) { + if ctx.Metas == nil { return } - urlFull := node.Data[m[0]:m[1]] - text := base.ShortSha(node.Data[m[2]:m[3]]) - - // 3rd capture group matches a optional path - subpath := "" - if m[5] > 0 { - subpath = node.Data[m[4]:m[5]] - } - - // 4th capture group matches a optional url hash - hash := "" - if m[7] > 0 { - hash = node.Data[m[6]:m[7]][1:] - } - - start := m[0] - end := m[1] - - // If url ends in '.', it's very likely that it is not part of the - // actual url but used to finish a sentence. - if strings.HasSuffix(urlFull, ".") { - end-- - urlFull = urlFull[:len(urlFull)-1] - if hash != "" { - hash = hash[:len(hash)-1] - } else if subpath != "" { - subpath = subpath[:len(subpath)-1] + next := node.NextSibling + for node != nil && node != next { + m := anySHA1Pattern.FindStringSubmatchIndex(node.Data) + if m == nil { + return } - } - if subpath != "" { - text += subpath - } + urlFull := node.Data[m[0]:m[1]] + text := base.ShortSha(node.Data[m[2]:m[3]]) - if hash != "" { - text += " (" + hash + ")" - } + // 3rd capture group matches a optional path + subpath := "" + if m[5] > 0 { + subpath = node.Data[m[4]:m[5]] + } - replaceContent(node, start, end, createCodeLink(urlFull, text, "commit")) + // 4th capture group matches a optional url hash + hash := "" + if m[7] > 0 { + hash = node.Data[m[6]:m[7]][1:] + } + + start := m[0] + end := m[1] + + // If url ends in '.', it's very likely that it is not part of the + // actual url but used to finish a sentence. + if strings.HasSuffix(urlFull, ".") { + end-- + urlFull = urlFull[:len(urlFull)-1] + if hash != "" { + hash = hash[:len(hash)-1] + } else if subpath != "" { + subpath = subpath[:len(subpath)-1] + } + } + + if subpath != "" { + text += subpath + } + + if hash != "" { + text += " (" + hash + ")" + } + + replaceContent(node, start, end, createCodeLink(urlFull, text, "commit")) + node = node.NextSibling.NextSibling + } } // emojiShortCodeProcessor for rendering text like :smile: into emoji -func emojiShortCodeProcessor(ctx *postProcessCtx, node *html.Node) { - - m := EmojiShortCodeRegex.FindStringSubmatchIndex(node.Data) - if m == nil { - return - } - - alias := node.Data[m[0]:m[1]] - alias = strings.ReplaceAll(alias, ":", "") - converted := emoji.FromAlias(alias) - if converted == nil { - // check if this is a custom reaction - s := strings.Join(setting.UI.Reactions, " ") + "gitea" - if strings.Contains(s, alias) { - replaceContent(node, m[0], m[1], createCustomEmoji(alias, "emoji")) +func emojiShortCodeProcessor(ctx *RenderContext, node *html.Node) { + start := 0 + next := node.NextSibling + for node != nil && node != next && start < len(node.Data) { + m := EmojiShortCodeRegex.FindStringSubmatchIndex(node.Data[start:]) + if m == nil { return } - return - } + m[0] += start + m[1] += start - replaceContent(node, m[0], m[1], createEmoji(converted.Emoji, "emoji", converted.Description)) + start = m[1] + + alias := node.Data[m[0]:m[1]] + alias = strings.ReplaceAll(alias, ":", "") + converted := emoji.FromAlias(alias) + if converted == nil { + // check if this is a custom reaction + if _, exist := setting.UI.CustomEmojisMap[alias]; exist { + replaceContent(node, m[0], m[1], createCustomEmoji(alias)) + node = node.NextSibling.NextSibling + start = 0 + continue + } + continue + } + + replaceContent(node, m[0], m[1], createEmoji(converted.Emoji, "emoji", converted.Description)) + node = node.NextSibling.NextSibling + start = 0 + } } // emoji processor to match emoji and add emoji class -func emojiProcessor(ctx *postProcessCtx, node *html.Node) { - m := emoji.FindEmojiSubmatchIndex(node.Data) - if m == nil { - return - } +func emojiProcessor(ctx *RenderContext, node *html.Node) { + start := 0 + next := node.NextSibling + for node != nil && node != next && start < len(node.Data) { + m := emoji.FindEmojiSubmatchIndex(node.Data[start:]) + if m == nil { + return + } + m[0] += start + m[1] += start - codepoint := node.Data[m[0]:m[1]] - val := emoji.FromCode(codepoint) - if val != nil { - replaceContent(node, m[0], m[1], createEmoji(codepoint, "emoji", val.Description)) + codepoint := node.Data[m[0]:m[1]] + start = m[1] + val := emoji.FromCode(codepoint) + if val != nil { + replaceContent(node, m[0], m[1], createEmoji(codepoint, "emoji", val.Description)) + node = node.NextSibling.NextSibling + start = 0 + } } } // sha1CurrentPatternProcessor renders SHA1 strings to corresponding links that // are assumed to be in the same repository. -func sha1CurrentPatternProcessor(ctx *postProcessCtx, node *html.Node) { - if ctx.metas == nil || ctx.metas["user"] == "" || ctx.metas["repo"] == "" || ctx.metas["repoPath"] == "" { - return - } - m := sha1CurrentPattern.FindStringSubmatchIndex(node.Data) - if m == nil { - return - } - hash := node.Data[m[2]:m[3]] - // The regex does not lie, it matches the hash pattern. - // However, a regex cannot know if a hash actually exists or not. - // We could assume that a SHA1 hash should probably contain alphas AND numerics - // but that is not always the case. - // Although unlikely, deadbeef and 1234567 are valid short forms of SHA1 hash - // as used by git and github for linking and thus we have to do similar. - // Because of this, we check to make sure that a matched hash is actually - // a commit in the repository before making it a link. - if _, err := git.NewCommand("rev-parse", "--verify", hash).RunInDirBytes(ctx.metas["repoPath"]); err != nil { - if !strings.Contains(err.Error(), "fatal: Needed a single revision") { - log.Debug("sha1CurrentPatternProcessor git rev-parse: %v", err) - } +func sha1CurrentPatternProcessor(ctx *RenderContext, node *html.Node) { + if ctx.Metas == nil || ctx.Metas["user"] == "" || ctx.Metas["repo"] == "" || ctx.Metas["repoPath"] == "" { return } - replaceContent(node, m[2], m[3], - createCodeLink(util.URLJoin(setting.AppURL, ctx.metas["user"], ctx.metas["repo"], "commit", hash), base.ShortSha(hash), "commit")) + start := 0 + next := node.NextSibling + if ctx.ShaExistCache == nil { + ctx.ShaExistCache = make(map[string]bool) + } + for node != nil && node != next && start < len(node.Data) { + m := sha1CurrentPattern.FindStringSubmatchIndex(node.Data[start:]) + if m == nil { + return + } + m[2] += start + m[3] += start + + hash := node.Data[m[2]:m[3]] + // The regex does not lie, it matches the hash pattern. + // However, a regex cannot know if a hash actually exists or not. + // We could assume that a SHA1 hash should probably contain alphas AND numerics + // but that is not always the case. + // Although unlikely, deadbeef and 1234567 are valid short forms of SHA1 hash + // as used by git and github for linking and thus we have to do similar. + // Because of this, we check to make sure that a matched hash is actually + // a commit in the repository before making it a link. + + // check cache first + exist, inCache := ctx.ShaExistCache[hash] + if !inCache { + if ctx.GitRepo == nil { + var err error + ctx.GitRepo, err = git.OpenRepository(ctx.Metas["repoPath"]) + if err != nil { + log.Error("unable to open repository: %s Error: %v", ctx.Metas["repoPath"], err) + return + } + ctx.AddCancel(func() { + ctx.GitRepo.Close() + ctx.GitRepo = nil + }) + } + + exist = ctx.GitRepo.IsObjectExist(hash) + ctx.ShaExistCache[hash] = exist + } + + if !exist { + start = m[3] + continue + } + + replaceContent(node, m[2], m[3], + createCodeLink(util.URLJoin(setting.AppURL, ctx.Metas["user"], ctx.Metas["repo"], "commit", hash), base.ShortSha(hash), "commit")) + start = 0 + node = node.NextSibling.NextSibling + } } // emailAddressProcessor replaces raw email addresses with a mailto: link. -func emailAddressProcessor(ctx *postProcessCtx, node *html.Node) { - m := emailRegex.FindStringSubmatchIndex(node.Data) - if m == nil { - return +func emailAddressProcessor(ctx *RenderContext, node *html.Node) { + next := node.NextSibling + for node != nil && node != next { + m := emailRegex.FindStringSubmatchIndex(node.Data) + if m == nil { + return + } + + mail := node.Data[m[2]:m[3]] + replaceContent(node, m[2], m[3], createLink("mailto:"+mail, mail, "mailto")) + node = node.NextSibling.NextSibling } - mail := node.Data[m[2]:m[3]] - replaceContent(node, m[2], m[3], createLink("mailto:"+mail, mail, "mailto")) } // linkProcessor creates links for any HTTP or HTTPS URL not captured by // markdown. -func linkProcessor(ctx *postProcessCtx, node *html.Node) { - m := common.LinkRegex.FindStringIndex(node.Data) - if m == nil { - return +func linkProcessor(ctx *RenderContext, node *html.Node) { + next := node.NextSibling + for node != nil && node != next { + m := common.LinkRegex.FindStringIndex(node.Data) + if m == nil { + return + } + + uri := node.Data[m[0]:m[1]] + replaceContent(node, m[0], m[1], createLink(uri, uri, "link")) + node = node.NextSibling.NextSibling } - uri := node.Data[m[0]:m[1]] - replaceContent(node, m[0], m[1], createLink(uri, uri, "link")) } func genDefaultLinkProcessor(defaultLink string) processor { - return func(ctx *postProcessCtx, node *html.Node) { + return func(ctx *RenderContext, node *html.Node) { ch := &html.Node{ Parent: node, Type: html.TextNode, @@ -1027,13 +1097,18 @@ func genDefaultLinkProcessor(defaultLink string) processor { } // descriptionLinkProcessor creates links for DescriptionHTML -func descriptionLinkProcessor(ctx *postProcessCtx, node *html.Node) { - m := common.LinkRegex.FindStringIndex(node.Data) - if m == nil { - return +func descriptionLinkProcessor(ctx *RenderContext, node *html.Node) { + next := node.NextSibling + for node != nil && node != next { + m := common.LinkRegex.FindStringIndex(node.Data) + if m == nil { + return + } + + uri := node.Data[m[0]:m[1]] + replaceContent(node, m[0], m[1], createDescriptionLink(uri, uri)) + node = node.NextSibling.NextSibling } - uri := node.Data[m[0]:m[1]] - replaceContent(node, m[0], m[1], createDescriptionLink(uri, uri)) } func createDescriptionLink(href, content string) *html.Node { diff --git a/modules/markup/html_internal_test.go b/modules/markup/html_internal_test.go index 7e4bb6f22..330750a47 100644 --- a/modules/markup/html_internal_test.go +++ b/modules/markup/html_internal_test.go @@ -61,8 +61,8 @@ var localMetas = map[string]string{ func TestRender_IssueIndexPattern(t *testing.T) { // numeric: render inputs without valid mentions test := func(s string) { - testRenderIssueIndexPattern(t, s, s, nil) - testRenderIssueIndexPattern(t, s, s, &postProcessCtx{metas: numericMetas}) + testRenderIssueIndexPattern(t, s, s, &RenderContext{}) + testRenderIssueIndexPattern(t, s, s, &RenderContext{Metas: numericMetas}) } // should not render anything when there are no mentions @@ -109,13 +109,13 @@ func TestRender_IssueIndexPattern2(t *testing.T) { links[i] = numericIssueLink(util.URLJoin(setting.AppSubURL, path), "ref-issue", index, marker) } expectedNil := fmt.Sprintf(expectedFmt, links...) - testRenderIssueIndexPattern(t, s, expectedNil, &postProcessCtx{metas: localMetas}) + testRenderIssueIndexPattern(t, s, expectedNil, &RenderContext{Metas: localMetas}) for i, index := range indices { links[i] = numericIssueLink(prefix, "ref-issue", index, marker) } expectedNum := fmt.Sprintf(expectedFmt, links...) - testRenderIssueIndexPattern(t, s, expectedNum, &postProcessCtx{metas: numericMetas}) + testRenderIssueIndexPattern(t, s, expectedNum, &RenderContext{Metas: numericMetas}) } // should render freestanding mentions @@ -150,7 +150,7 @@ func TestRender_IssueIndexPattern3(t *testing.T) { // alphanumeric: render inputs without valid mentions test := func(s string) { - testRenderIssueIndexPattern(t, s, s, &postProcessCtx{metas: alphanumericMetas}) + testRenderIssueIndexPattern(t, s, s, &RenderContext{Metas: alphanumericMetas}) } test("") test("this is a test") @@ -181,25 +181,22 @@ func TestRender_IssueIndexPattern4(t *testing.T) { links[i] = alphanumIssueLink("https://someurl.com/someUser/someRepo/", "ref-issue", name) } expected := fmt.Sprintf(expectedFmt, links...) - testRenderIssueIndexPattern(t, s, expected, &postProcessCtx{metas: alphanumericMetas}) + testRenderIssueIndexPattern(t, s, expected, &RenderContext{Metas: alphanumericMetas}) } test("OTT-1234 test", "%s test", "OTT-1234") test("test T-12 issue", "test %s issue", "T-12") test("test issue ABCDEFGHIJ-1234567890", "test issue %s", "ABCDEFGHIJ-1234567890") } -func testRenderIssueIndexPattern(t *testing.T, input, expected string, ctx *postProcessCtx) { - if ctx == nil { - ctx = new(postProcessCtx) - } - ctx.procs = []processor{issueIndexPatternProcessor} - if ctx.urlPrefix == "" { - ctx.urlPrefix = AppSubURL +func testRenderIssueIndexPattern(t *testing.T, input, expected string, ctx *RenderContext) { + if ctx.URLPrefix == "" { + ctx.URLPrefix = AppSubURL } - res, err := ctx.postProcess([]byte(input)) + var buf strings.Builder + err := postProcess(ctx, []processor{issueIndexPatternProcessor}, strings.NewReader(input), &buf) assert.NoError(t, err) - assert.Equal(t, expected, string(res)) + assert.Equal(t, expected, buf.String()) } func TestRender_AutoLink(t *testing.T) { @@ -207,12 +204,22 @@ func TestRender_AutoLink(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer, err := PostProcess([]byte(input), setting.AppSubURL, localMetas, false) + var buffer strings.Builder + err := PostProcess(&RenderContext{ + URLPrefix: setting.AppSubURL, + Metas: localMetas, + }, strings.NewReader(input), &buffer) assert.Equal(t, err, nil) - assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(string(buffer))) - buffer, err = PostProcess([]byte(input), setting.AppSubURL, localMetas, true) + assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer.String())) + + buffer.Reset() + err = PostProcess(&RenderContext{ + URLPrefix: setting.AppSubURL, + Metas: localMetas, + IsWiki: true, + }, strings.NewReader(input), &buffer) assert.Equal(t, err, nil) - assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(string(buffer))) + assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer.String())) } // render valid issue URLs @@ -235,15 +242,13 @@ func TestRender_FullIssueURLs(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - ctx := new(postProcessCtx) - ctx.procs = []processor{fullIssuePatternProcessor} - if ctx.urlPrefix == "" { - ctx.urlPrefix = AppSubURL - } - ctx.metas = localMetas - result, err := ctx.postProcess([]byte(input)) + var result strings.Builder + err := postProcess(&RenderContext{ + URLPrefix: AppSubURL, + Metas: localMetas, + }, []processor{fullIssuePatternProcessor}, strings.NewReader(input), &result) assert.NoError(t, err) - assert.Equal(t, expected, string(result)) + assert.Equal(t, expected, result.String()) } test("Here is a link https://git.osgeo.org/gogs/postgis/postgis/pulls/6", "Here is a link https://git.osgeo.org/gogs/postgis/postgis/pulls/6") diff --git a/modules/markup/html_test.go b/modules/markup/html_test.go index b04781489..3eb2df00a 100644 --- a/modules/markup/html_test.go +++ b/modules/markup/html_test.go @@ -5,6 +5,7 @@ package markup_test import ( + "io" "strings" "testing" @@ -28,7 +29,12 @@ func TestRender_Commits(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer := RenderString(".md", input, setting.AppSubURL, localMetas) + buffer, err := RenderString(&RenderContext{ + Filename: ".md", + URLPrefix: setting.AppSubURL, + Metas: localMetas, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) } @@ -59,7 +65,12 @@ func TestRender_CrossReferences(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer := RenderString("a.md", input, setting.AppSubURL, localMetas) + buffer, err := RenderString(&RenderContext{ + Filename: "a.md", + URLPrefix: setting.AppSubURL, + Metas: localMetas, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) } @@ -91,14 +102,18 @@ func TestRender_links(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer := RenderString("a.md", input, setting.AppSubURL, nil) + buffer, err := RenderString(&RenderContext{ + Filename: "a.md", + URLPrefix: setting.AppSubURL, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) } // Text that should be turned into URL defaultCustom := setting.Markdown.CustomURLSchemes setting.Markdown.CustomURLSchemes = []string{"ftp", "magnet"} - ReplaceSanitizer() + InitializeSanitizer() CustomLinkURLSchemes(setting.Markdown.CustomURLSchemes) test( @@ -124,13 +139,13 @@ func TestRender_links(t *testing.T) { `

http://www.example.com/wpstyle/?p=364

`) test( "https://www.example.com/foo/?bar=baz&inga=42&quux", - `

https://www.example.com/foo/?bar=baz&inga=42&quux

`) + `

https://www.example.com/foo/?bar=baz&inga=42&quux

`) test( "http://142.42.1.1/", `

http://142.42.1.1/

`) test( "https://github.com/go-gitea/gitea/?p=aaa/bbb.html#ccc-ddd", - `

https://github.com/go-gitea/gitea/?p=aaa/bbb.html#ccc-ddd

`) + `

https://github.com/go-gitea/gitea/?p=aaa/bbb.html#ccc-ddd

`) test( "https://en.wikipedia.org/wiki/URL_(disambiguation)", `

https://en.wikipedia.org/wiki/URL_(disambiguation)

`) @@ -148,7 +163,7 @@ func TestRender_links(t *testing.T) { `

ftp://gitea.com/file.txt

`) test( "magnet:?xt=urn:btih:5dee65101db281ac9c46344cd6b175cdcadabcde&dn=download", - `

magnet:?xt=urn:btih:5dee65101db281ac9c46344cd6b175cdcadabcde&dn=download

`) + `

magnet:?xt=urn:btih:5dee65101db281ac9c46344cd6b175cdcadabcde&dn=download

`) // Test that should *not* be turned into URL test( @@ -178,7 +193,7 @@ func TestRender_links(t *testing.T) { // Restore previous settings setting.Markdown.CustomURLSchemes = defaultCustom - ReplaceSanitizer() + InitializeSanitizer() CustomLinkURLSchemes(setting.Markdown.CustomURLSchemes) } @@ -187,8 +202,12 @@ func TestRender_email(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer := RenderString("a.md", input, setting.AppSubURL, nil) - assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) + res, err := RenderString(&RenderContext{ + Filename: "a.md", + URLPrefix: setting.AppSubURL, + }, input) + assert.NoError(t, err) + assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(res)) } // Text that should be turned into email link @@ -242,7 +261,11 @@ func TestRender_emoji(t *testing.T) { test := func(input, expected string) { expected = strings.ReplaceAll(expected, "&", "&") - buffer := RenderString("a.md", input, setting.AppSubURL, nil) + buffer, err := RenderString(&RenderContext{ + Filename: "a.md", + URLPrefix: setting.AppSubURL, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) } @@ -261,8 +284,19 @@ func TestRender_emoji(t *testing.T) { //Text that should be turned into or recognized as emoji test( ":gitea:", - `

:gitea:

`) - + `

:gitea:

`) + test( + ":custom-emoji:", + `

:custom-emoji:

`) + setting.UI.CustomEmojisMap["custom-emoji"] = ":custom-emoji:" + test( + ":custom-emoji:", + `

:custom-emoji:

`) + test( + "这是字符:1::+1: some🐊 \U0001f44d:custom-emoji: :gitea:", + `

这是字符:1:👍 some🐊 `+ + `👍:custom-emoji: `+ + `:gitea:

`) test( "Some text with 😄 in the middle", `

Some text with 😄 in the middle

`) @@ -291,9 +325,17 @@ func TestRender_ShortLinks(t *testing.T) { tree := util.URLJoin(AppSubURL, "src", "master") test := func(input, expected, expectedWiki string) { - buffer := markdown.RenderString(input, tree, nil) + buffer, err := markdown.RenderString(&RenderContext{ + URLPrefix: tree, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) - buffer = markdown.RenderWiki([]byte(input), setting.AppSubURL, localMetas) + buffer, err = markdown.RenderString(&RenderContext{ + URLPrefix: setting.AppSubURL, + Metas: localMetas, + IsWiki: true, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expectedWiki), strings.TrimSpace(buffer)) } @@ -383,3 +425,120 @@ func TestRender_ShortLinks(t *testing.T) { `

[[foobar]]

`, `

[[foobar]]

`) } + +func TestRender_RelativeImages(t *testing.T) { + setting.AppURL = AppURL + setting.AppSubURL = AppSubURL + tree := util.URLJoin(AppSubURL, "src", "master") + + test := func(input, expected, expectedWiki string) { + buffer, err := markdown.RenderString(&RenderContext{ + URLPrefix: tree, + Metas: localMetas, + }, input) + assert.NoError(t, err) + assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) + buffer, err = markdown.RenderString(&RenderContext{ + URLPrefix: setting.AppSubURL, + Metas: localMetas, + IsWiki: true, + }, input) + assert.NoError(t, err) + assert.Equal(t, strings.TrimSpace(expectedWiki), strings.TrimSpace(buffer)) + } + + rawwiki := util.URLJoin(AppSubURL, "wiki", "raw") + mediatree := util.URLJoin(AppSubURL, "media", "master") + + test( + ``, + ``, + ``) + + test( + ``, + ``, + ``) +} + +func Test_ParseClusterFuzz(t *testing.T) { + setting.AppURL = AppURL + setting.AppSubURL = AppSubURL + + var localMetas = map[string]string{ + "user": "go-gitea", + "repo": "gitea", + } + + data := "
` + + var res strings.Builder + err := PostProcess(&RenderContext{ + URLPrefix: "https://example.com", + Metas: localMetas, + }, strings.NewReader(data), &res) + assert.NoError(t, err) + assert.Equal(t, data, res.String()) +} + +func BenchmarkEmojiPostprocess(b *testing.B) { + data := "🥰 " + for len(data) < 1<<16 { + data += data + } + b.ResetTimer() + for i := 0; i < b.N; i++ { + var res strings.Builder + err := PostProcess(&RenderContext{ + URLPrefix: "https://example.com", + Metas: localMetas, + }, strings.NewReader(data), &res) + assert.NoError(b, err) + } +} + +func TestFuzz(t *testing.T) { + s := "t/l/issues/8#/../../a" + renderContext := RenderContext{ + URLPrefix: "https://example.com/go-gitea/gitea", + Metas: map[string]string{ + "user": "go-gitea", + "repo": "gitea", + }, + } + + err := PostProcess(&renderContext, strings.NewReader(s), io.Discard) + + assert.NoError(t, err) +} diff --git a/modules/markup/markdown/ast.go b/modules/markup/markdown/ast.go index d735ff5eb..5191d94cd 100644 --- a/modules/markup/markdown/ast.go +++ b/modules/markup/markdown/ast.go @@ -74,7 +74,7 @@ func IsSummary(node ast.Node) bool { return ok } -// TaskCheckBoxListItem is a block that repressents a list item of a markdown block with a checkbox +// TaskCheckBoxListItem is a block that represents a list item of a markdown block with a checkbox type TaskCheckBoxListItem struct { *ast.ListItem IsChecked bool diff --git a/modules/markup/markdown/goldmark.go b/modules/markup/markdown/goldmark.go index f9fd6eb97..f1c259f82 100644 --- a/modules/markup/markdown/goldmark.go +++ b/modules/markup/markdown/goldmark.go @@ -76,6 +76,12 @@ func (g *ASTTransformer) Transform(node *ast.Document, reader text.Reader, pc pa header.ID = util.BytesToReadOnlyString(id.([]byte)) } toc = append(toc, header) + } else { + for _, attr := range v.Attributes() { + if _, ok := attr.Value.([]byte); !ok { + v.SetAttribute(attr.Name, []byte(fmt.Sprintf("%v", attr.Value))) + } + } } case *ast.Image: // Images need two things: @@ -92,7 +98,8 @@ func (g *ASTTransformer) Transform(node *ast.Document, reader text.Reader, pc pa } prefix = strings.Replace(prefix, "/src/", "/media/", 1) - lnk := string(link) + lnk := strings.TrimLeft(string(link), "/") + lnk = giteautil.URLJoin(prefix, lnk) link = []byte(lnk) } @@ -101,11 +108,37 @@ func (g *ASTTransformer) Transform(node *ast.Document, reader text.Reader, pc pa parent := n.Parent() // Create a link around image only if parent is not already a link if _, ok := parent.(*ast.Link); !ok && parent != nil { + next := n.NextSibling() + + // Create a link wrapper wrap := ast.NewLink() wrap.Destination = link wrap.Title = v.Title + + // Duplicate the current image node + image := ast.NewImage(ast.NewLink()) + image.Destination = link + image.Title = v.Title + for _, attr := range v.Attributes() { + image.SetAttribute(attr.Name, attr.Value) + } + for child := v.FirstChild(); child != nil; { + next := child.NextSibling() + image.AppendChild(image, child) + child = next + } + + // Append our duplicate image to the wrapper link + wrap.AppendChild(wrap, image) + + // Wire in the next sibling + wrap.SetNextSibling(next) + + // Replace the current node with the wrapper link parent.ReplaceChild(parent, n, wrap) - wrap.AppendChild(wrap, n) + + // But most importantly ensure the next sibling is still on the old image too + v.SetNextSibling(next) } case *ast.Link: // Links need their href to munged to be a real value @@ -351,18 +384,19 @@ func (r *HTMLRenderer) renderTaskCheckBoxListItem(w util.BufWriter, source []byt } else { _, _ = w.WriteString("
  • ") } - end := ">" - if r.XHTML { - end = " />" + _, _ = w.WriteString(` 0 { + segment := segments.At(0) + _, _ = w.WriteString(fmt.Sprintf(` data-source-position="%d"`, segment.Start)) } - var err error if n.IsChecked { - _, err = w.WriteString(``) + } else { + _ = w.WriteByte('>') } fc := n.FirstChild() if fc != nil { diff --git a/modules/markup/markdown/markdown.go b/modules/markup/markdown/markdown.go index 999ae52bb..ab026dd1b 100644 --- a/modules/markup/markdown/markdown.go +++ b/modules/markup/markdown/markdown.go @@ -6,7 +6,9 @@ package markdown import ( - "bytes" + "fmt" + "io" + "io/ioutil" "strings" "sync" @@ -18,7 +20,7 @@ import ( chromahtml "github.com/alecthomas/chroma/formatters/html" "github.com/yuin/goldmark" - "github.com/yuin/goldmark-highlighting" + highlighting "github.com/yuin/goldmark-highlighting" meta "github.com/yuin/goldmark-meta" "github.com/yuin/goldmark/extension" "github.com/yuin/goldmark/parser" @@ -34,20 +36,60 @@ var urlPrefixKey = parser.NewContextKey() var isWikiKey = parser.NewContextKey() var renderMetasKey = parser.NewContextKey() -// NewGiteaParseContext creates a parser.Context with the gitea context set -func NewGiteaParseContext(urlPrefix string, metas map[string]string, isWiki bool) parser.Context { +type closesWithError interface { + io.WriteCloser + CloseWithError(err error) error +} + +type limitWriter struct { + w closesWithError + sum int64 + limit int64 +} + +// Write implements the standard Write interface: +func (l *limitWriter) Write(data []byte) (int, error) { + leftToWrite := l.limit - l.sum + if leftToWrite < int64(len(data)) { + n, err := l.w.Write(data[:leftToWrite]) + l.sum += int64(n) + if err != nil { + return n, err + } + _ = l.w.Close() + return n, fmt.Errorf("Rendered content too large - truncating render") + } + n, err := l.w.Write(data) + l.sum += int64(n) + return n, err +} + +// Close closes the writer +func (l *limitWriter) Close() error { + return l.w.Close() +} + +// CloseWithError closes the writer +func (l *limitWriter) CloseWithError(err error) error { + return l.w.CloseWithError(err) +} + +// newParserContext creates a parser.Context with the render context set +func newParserContext(ctx *markup.RenderContext) parser.Context { pc := parser.NewContext(parser.WithIDs(newPrefixedIDs())) - pc.Set(urlPrefixKey, urlPrefix) - pc.Set(isWikiKey, isWiki) - pc.Set(renderMetasKey, metas) + pc.Set(urlPrefixKey, ctx.URLPrefix) + pc.Set(isWikiKey, ctx.IsWiki) + pc.Set(renderMetasKey, ctx.Metas) return pc } -// render renders Markdown to HTML without handling special links. -func render(body []byte, urlPrefix string, metas map[string]string, wikiMarkdown bool) []byte { +// actualRender renders Markdown to HTML without handling special links. +func actualRender(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { once.Do(func() { converter = goldmark.New( - goldmark.WithExtensions(extension.Table, + goldmark.WithExtensions( + extension.NewTable( + extension.WithTableCellAlignMethod(extension.TableCellAlignAttribute)), extension.Strikethrough, extension.TaskList, extension.DefinitionList, @@ -119,12 +161,69 @@ func render(body []byte, urlPrefix string, metas map[string]string, wikiMarkdown }) - pc := NewGiteaParseContext(urlPrefix, metas, wikiMarkdown) - var buf bytes.Buffer - if err := converter.Convert(giteautil.NormalizeEOL(body), &buf, parser.WithContext(pc)); err != nil { - log.Error("Unable to render: %v", err) + rd, wr := io.Pipe() + defer func() { + _ = rd.Close() + _ = wr.Close() + }() + + lw := &limitWriter{ + w: wr, + limit: setting.UI.MaxDisplayFileSize * 3, } - return markup.SanitizeReader(&buf).Bytes() + + // FIXME: should we include a timeout that closes the pipe to abort the renderer and sanitizer if it takes too long? + go func() { + defer func() { + err := recover() + if err == nil { + return + } + + log.Warn("Unable to render markdown due to panic in goldmark: %v", err) + if log.IsDebug() { + log.Debug("Panic in markdown: %v\n%s", err, string(log.Stack(2))) + } + _ = lw.CloseWithError(fmt.Errorf("%v", err)) + }() + + // FIXME: Don't read all to memory, but goldmark doesn't support + pc := newParserContext(ctx) + buf, err := ioutil.ReadAll(input) + if err != nil { + log.Error("Unable to ReadAll: %v", err) + return + } + if err := converter.Convert(giteautil.NormalizeEOL(buf), lw, parser.WithContext(pc)); err != nil { + log.Error("Unable to render: %v", err) + _ = lw.CloseWithError(err) + return + } + _ = lw.Close() + }() + buf := markup.SanitizeReader(rd, "") + _, err := io.Copy(output, buf) + return err +} + +func render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { + defer func() { + err := recover() + if err == nil { + return + } + + log.Warn("Unable to render markdown due to panic in goldmark - will return sanitized raw bytes") + if log.IsDebug() { + log.Debug("Panic in markdown: %v\n%s", err, string(log.Stack(2))) + } + ret := markup.SanitizeReader(input, "") + _, err = io.Copy(output, ret) + if err != nil { + log.Error("SanitizeReader failed: %v", err) + } + }() + return actualRender(ctx, input, output) } var ( @@ -133,45 +232,64 @@ var ( ) func init() { - markup.RegisterParser(Parser{}) + markup.RegisterRenderer(Renderer{}) } -// Parser implements markup.Parser -type Parser struct{} +// Renderer implements markup.Renderer +type Renderer struct{} -// Name implements markup.Parser -func (Parser) Name() string { +// Name implements markup.Renderer +func (Renderer) Name() string { return MarkupName } -// Extensions implements markup.Parser -func (Parser) Extensions() []string { +// NeedPostProcess implements markup.Renderer +func (Renderer) NeedPostProcess() bool { return true } + +// Extensions implements markup.Renderer +func (Renderer) Extensions() []string { return setting.Markdown.FileExtensions } -// Render implements markup.Parser -func (Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { - return render(rawBytes, urlPrefix, metas, isWiki) +// SanitizerRules implements markup.Renderer +func (Renderer) SanitizerRules() []setting.MarkupSanitizerRule { + return []setting.MarkupSanitizerRule{} +} + +// Render implements markup.Renderer +func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { + return render(ctx, input, output) } // Render renders Markdown to HTML with all specific handling stuff. -func Render(rawBytes []byte, urlPrefix string, metas map[string]string) []byte { - return markup.Render("a.md", rawBytes, urlPrefix, metas) +func Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { + if ctx.Filename == "" { + ctx.Filename = "a.md" + } + return markup.Render(ctx, input, output) +} + +// RenderString renders Markdown string to HTML with all specific handling stuff and return string +func RenderString(ctx *markup.RenderContext, content string) (string, error) { + var buf strings.Builder + if err := Render(ctx, strings.NewReader(content), &buf); err != nil { + return "", err + } + return buf.String(), nil } // RenderRaw renders Markdown to HTML without handling special links. -func RenderRaw(body []byte, urlPrefix string, wikiMarkdown bool) []byte { - return render(body, urlPrefix, map[string]string{}, wikiMarkdown) +func RenderRaw(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { + return render(ctx, input, output) } -// RenderString renders Markdown to HTML with special links and returns string type. -func RenderString(raw, urlPrefix string, metas map[string]string) string { - return markup.RenderString("a.md", raw, urlPrefix, metas) -} - -// RenderWiki renders markdown wiki page to HTML and return HTML string -func RenderWiki(rawBytes []byte, urlPrefix string, metas map[string]string) string { - return markup.RenderWiki("a.md", rawBytes, urlPrefix, metas) +// RenderRawString renders Markdown to HTML without handling special links and return string +func RenderRawString(ctx *markup.RenderContext, content string) (string, error) { + var buf strings.Builder + if err := RenderRaw(ctx, strings.NewReader(content), &buf); err != nil { + return "", err + } + return buf.String(), nil } // IsMarkdownFile reports whether name looks like a Markdown file diff --git a/modules/markup/markdown/markdown_test.go b/modules/markup/markdown/markdown_test.go index 89005fc25..f22c38953 100644 --- a/modules/markup/markdown/markdown_test.go +++ b/modules/markup/markdown/markdown_test.go @@ -8,6 +8,7 @@ import ( "strings" "testing" + "code.gitea.io/gitea/modules/markup" . "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" @@ -31,10 +32,18 @@ func TestRender_StandardLinks(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected, expectedWiki string) { - buffer := RenderString(input, setting.AppSubURL, nil) + buffer, err := RenderString(&markup.RenderContext{ + URLPrefix: setting.AppSubURL, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) - bufferWiki := RenderWiki([]byte(input), setting.AppSubURL, nil) - assert.Equal(t, strings.TrimSpace(expectedWiki), strings.TrimSpace(bufferWiki)) + + buffer, err = RenderString(&markup.RenderContext{ + URLPrefix: setting.AppSubURL, + IsWiki: true, + }, input) + assert.NoError(t, err) + assert.Equal(t, strings.TrimSpace(expectedWiki), strings.TrimSpace(buffer)) } googleRendered := `

    https://google.com/

    ` @@ -74,7 +83,10 @@ func TestRender_Images(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer := RenderString(input, setting.AppSubURL, nil) + buffer, err := RenderString(&markup.RenderContext{ + URLPrefix: setting.AppSubURL, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) } @@ -93,6 +105,19 @@ func TestRender_Images(t *testing.T) { test( "[!["+title+"]("+url+")]("+href+")", `

    `+title+`

    `) + + url = "/../../.images/src/02/train.jpg" + test( + "!["+title+"]("+url+")", + `

    `+title+`

    `) + + test( + "[["+title+"|"+url+"]]", + `

    `+title+`

    `) + test( + "[!["+title+"]("+url+")]("+href+")", + `

    `+title+`

    `) + } func testAnswers(baseURLContent, baseURLImages string) []string { @@ -142,9 +167,9 @@ func testAnswers(baseURLContent, baseURLImages string) []string {

    (from https://www.markdownguide.org/extended-syntax/)

    Checkboxes

      -
    • unchecked
    • -
    • checked
    • -
    • still unchecked
    • +
    • unchecked
    • +
    • checked
    • +
    • still unchecked

    Definition list

    @@ -245,10 +270,18 @@ Here is a simple footnote,[^1] and here is a longer one.[^bignote] } func TestTotal_RenderWiki(t *testing.T) { + setting.AppURL = AppURL + setting.AppSubURL = AppSubURL + answers := testAnswers(util.URLJoin(AppSubURL, "wiki/"), util.URLJoin(AppSubURL, "wiki", "raw/")) for i := 0; i < len(sameCases); i++ { - line := RenderWiki([]byte(sameCases[i]), AppSubURL, localMetas) + line, err := RenderString(&markup.RenderContext{ + URLPrefix: AppSubURL, + Metas: localMetas, + IsWiki: true, + }, sameCases[i]) + assert.NoError(t, err) assert.Equal(t, answers[i], line) } @@ -266,40 +299,56 @@ func TestTotal_RenderWiki(t *testing.T) { } for i := 0; i < len(testCases); i += 2 { - line := RenderWiki([]byte(testCases[i]), AppSubURL, nil) + line, err := RenderString(&markup.RenderContext{ + URLPrefix: AppSubURL, + IsWiki: true, + }, testCases[i]) + assert.NoError(t, err) assert.Equal(t, testCases[i+1], line) } } func TestTotal_RenderString(t *testing.T) { + setting.AppURL = AppURL + setting.AppSubURL = AppSubURL + answers := testAnswers(util.URLJoin(AppSubURL, "src", "master/"), util.URLJoin(AppSubURL, "raw", "master/")) for i := 0; i < len(sameCases); i++ { - line := RenderString(sameCases[i], util.URLJoin(AppSubURL, "src", "master/"), localMetas) + line, err := RenderString(&markup.RenderContext{ + URLPrefix: util.URLJoin(AppSubURL, "src", "master/"), + Metas: localMetas, + }, sameCases[i]) + assert.NoError(t, err) assert.Equal(t, answers[i], line) } testCases := []string{} for i := 0; i < len(testCases); i += 2 { - line := RenderString(testCases[i], AppSubURL, nil) + line, err := RenderString(&markup.RenderContext{ + URLPrefix: AppSubURL, + }, testCases[i]) + assert.NoError(t, err) assert.Equal(t, testCases[i+1], line) } } func TestRender_RenderParagraphs(t *testing.T) { test := func(t *testing.T, str string, cnt int) { - unix := []byte(str) - res := string(RenderRaw(unix, "", false)) - assert.Equal(t, strings.Count(res, "image1
    +image2

    +` + res, err := RenderRawString(&markup.RenderContext{}, testcase) + assert.NoError(t, err) + assert.Equal(t, expected, res) + +} diff --git a/modules/markup/markdown/meta_test.go b/modules/markup/markdown/meta_test.go index a585f0382..f525777a5 100644 --- a/modules/markup/markdown/meta_test.go +++ b/modules/markup/markdown/meta_test.go @@ -18,7 +18,7 @@ func TestExtractMetadata(t *testing.T) { var meta structs.IssueTemplate body, err := ExtractMetadata(fmt.Sprintf("%s\n%s\n%s\n%s", sepTest, frontTest, sepTest, bodyTest), &meta) assert.NoError(t, err) - assert.Equal(t, body, bodyTest) + assert.Equal(t, bodyTest, body) assert.Equal(t, metaTest, meta) assert.True(t, meta.Valid()) }) @@ -39,7 +39,7 @@ func TestExtractMetadata(t *testing.T) { var meta structs.IssueTemplate body, err := ExtractMetadata(fmt.Sprintf("%s\n%s\n%s", sepTest, frontTest, sepTest), &meta) assert.NoError(t, err) - assert.Equal(t, body, "") + assert.Equal(t, "", body) assert.Equal(t, metaTest, meta) assert.True(t, meta.Valid()) }) diff --git a/modules/markup/markup.go b/modules/markup/markup.go deleted file mode 100644 index f8deb2b29..000000000 --- a/modules/markup/markup.go +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package markup - -import ( - "path/filepath" - "strings" - - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" -) - -// Init initialize regexps for markdown parsing -func Init() { - getIssueFullPattern() - NewSanitizer() - if len(setting.Markdown.CustomURLSchemes) > 0 { - CustomLinkURLSchemes(setting.Markdown.CustomURLSchemes) - } - - // since setting maybe changed extensions, this will reload all parser extensions mapping - extParsers = make(map[string]Parser) - for _, parser := range parsers { - for _, ext := range parser.Extensions() { - extParsers[strings.ToLower(ext)] = parser - } - } -} - -// Parser defines an interface for parsering markup file to HTML -type Parser interface { - Name() string // markup format name - Extensions() []string - Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte -} - -var ( - extParsers = make(map[string]Parser) - parsers = make(map[string]Parser) -) - -// RegisterParser registers a new markup file parser -func RegisterParser(parser Parser) { - parsers[parser.Name()] = parser - for _, ext := range parser.Extensions() { - extParsers[strings.ToLower(ext)] = parser - } -} - -// GetParserByFileName get parser by filename -func GetParserByFileName(filename string) Parser { - extension := strings.ToLower(filepath.Ext(filename)) - return extParsers[extension] -} - -// GetParserByType returns a parser according type -func GetParserByType(tp string) Parser { - return parsers[tp] -} - -// Render renders markup file to HTML with all specific handling stuff. -func Render(filename string, rawBytes []byte, urlPrefix string, metas map[string]string) []byte { - return renderFile(filename, rawBytes, urlPrefix, metas, false) -} - -// RenderByType renders markup to HTML with special links and returns string type. -func RenderByType(tp string, rawBytes []byte, urlPrefix string, metas map[string]string) []byte { - return renderByType(tp, rawBytes, urlPrefix, metas, false) -} - -// RenderString renders Markdown to HTML with special links and returns string type. -func RenderString(filename string, raw, urlPrefix string, metas map[string]string) string { - return string(renderFile(filename, []byte(raw), urlPrefix, metas, false)) -} - -// RenderWiki renders markdown wiki page to HTML and return HTML string -func RenderWiki(filename string, rawBytes []byte, urlPrefix string, metas map[string]string) string { - return string(renderFile(filename, rawBytes, urlPrefix, metas, true)) -} - -func render(parser Parser, rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { - result := parser.Render(rawBytes, urlPrefix, metas, isWiki) - // TODO: one day the error should be returned. - result, err := PostProcess(result, urlPrefix, metas, isWiki) - if err != nil { - log.Error("PostProcess: %v", err) - } - return SanitizeBytes(result) -} - -func renderByType(tp string, rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { - if parser, ok := parsers[tp]; ok { - return render(parser, rawBytes, urlPrefix, metas, isWiki) - } - return nil -} - -func renderFile(filename string, rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { - extension := strings.ToLower(filepath.Ext(filename)) - if parser, ok := extParsers[extension]; ok { - return render(parser, rawBytes, urlPrefix, metas, isWiki) - } - return nil -} - -// Type returns if markup format via the filename -func Type(filename string) string { - if parser := GetParserByFileName(filename); parser != nil { - return parser.Name() - } - return "" -} - -// IsMarkupFile reports whether file is a markup type file -func IsMarkupFile(name, markup string) bool { - if parser := GetParserByFileName(name); parser != nil { - return parser.Name() == markup - } - return false -} - -// IsReadmeFile reports whether name looks like a README file -// based on its name. If an extension is provided, it will strictly -// match that extension. -// Note that the '.' should be provided in ext, e.g ".md" -func IsReadmeFile(name string, ext ...string) bool { - name = strings.ToLower(name) - if len(ext) > 0 { - return name == "readme"+ext[0] - } - if len(name) < 6 { - return false - } else if len(name) == 6 { - return name == "readme" - } - return name[:7] == "readme." -} diff --git a/modules/markup/mdstripper/mdstripper_test.go b/modules/markup/mdstripper/mdstripper_test.go index 9efcc3594..13cea0ff7 100644 --- a/modules/markup/mdstripper/mdstripper_test.go +++ b/modules/markup/mdstripper/mdstripper_test.go @@ -25,7 +25,7 @@ func TestMarkdownStripper(t *testing.T) { This is [one](link) to paradise. This **is emphasized**. -This: should coallesce. +This: should coalesce. ` + "```" + ` This is a code block. @@ -44,7 +44,7 @@ A HIDDEN ` + "`" + `GHOST` + "`" + ` IN THIS LINE. "This", "is emphasized", ".", - "This: should coallesce.", + "This: should coalesce.", "Bullet 1", "Bullet 2", "A HIDDEN", diff --git a/modules/markup/orgmode/orgmode.go b/modules/markup/orgmode/orgmode.go index ddd445aba..7e9f1f45c 100644 --- a/modules/markup/orgmode/orgmode.go +++ b/modules/markup/orgmode/orgmode.go @@ -8,65 +8,122 @@ import ( "bytes" "fmt" "html" + "io" "strings" - "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/highlight" "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + "github.com/alecthomas/chroma" + "github.com/alecthomas/chroma/lexers" "github.com/niklasfasching/go-org/org" ) func init() { - markup.RegisterParser(Parser{}) + markup.RegisterRenderer(Renderer{}) } -// Parser implements markup.Parser for orgmode -type Parser struct { +// Renderer implements markup.Renderer for orgmode +type Renderer struct { } -// Name implements markup.Parser -func (Parser) Name() string { +// Name implements markup.Renderer +func (Renderer) Name() string { return "orgmode" } -// Extensions implements markup.Parser -func (Parser) Extensions() []string { +// NeedPostProcess implements markup.Renderer +func (Renderer) NeedPostProcess() bool { return true } + +// Extensions implements markup.Renderer +func (Renderer) Extensions() []string { return []string{".org"} } +// SanitizerRules implements markup.Renderer +func (Renderer) SanitizerRules() []setting.MarkupSanitizerRule { + return []setting.MarkupSanitizerRule{} +} + // Render renders orgmode rawbytes to HTML -func Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { +func Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { htmlWriter := org.NewHTMLWriter() + htmlWriter.HighlightCodeBlock = func(source, lang string, inline bool) string { + var w strings.Builder + if _, err := w.WriteString(`
    `); err != nil {
    +			return ""
    +		}
     
    -	renderer := &Renderer{
    +		lexer := lexers.Get(lang)
    +		if lexer == nil && lang == "" {
    +			lexer = lexers.Analyse(source)
    +			if lexer == nil {
    +				lexer = lexers.Fallback
    +			}
    +			lang = strings.ToLower(lexer.Config().Name)
    +		}
    +
    +		if lexer == nil {
    +			// include language-x class as part of commonmark spec
    +			if _, err := w.WriteString(``); err != nil {
    +				return ""
    +			}
    +			if _, err := w.WriteString(html.EscapeString(source)); err != nil {
    +				return ""
    +			}
    +		} else {
    +			// include language-x class as part of commonmark spec
    +			if _, err := w.WriteString(``); err != nil {
    +				return ""
    +			}
    +			lexer = chroma.Coalesce(lexer)
    +
    +			if _, err := w.WriteString(highlight.Code(lexer.Config().Filenames[0], source)); err != nil {
    +				return ""
    +			}
    +		}
    +
    +		if _, err := w.WriteString("
    "); err != nil { + return "" + } + + return w.String() + } + + w := &Writer{ HTMLWriter: htmlWriter, - URLPrefix: urlPrefix, - IsWiki: isWiki, + URLPrefix: ctx.URLPrefix, + IsWiki: ctx.IsWiki, } - htmlWriter.ExtendingWriter = renderer + htmlWriter.ExtendingWriter = w - res, err := org.New().Silent().Parse(bytes.NewReader(rawBytes), "").Write(renderer) + res, err := org.New().Silent().Parse(input, "").Write(w) if err != nil { - log.Error("Panic in orgmode.Render: %v Just returning the rawBytes", err) - return rawBytes + return fmt.Errorf("orgmode.Render failed: %v", err) } - return []byte(res) + _, err = io.Copy(output, strings.NewReader(res)) + return err } -// RenderString reners orgmode string to HTML string -func RenderString(rawContent string, urlPrefix string, metas map[string]string, isWiki bool) string { - return string(Render([]byte(rawContent), urlPrefix, metas, isWiki)) +// RenderString renders orgmode string to HTML string +func RenderString(ctx *markup.RenderContext, content string) (string, error) { + var buf strings.Builder + if err := Render(ctx, strings.NewReader(content), &buf); err != nil { + return "", err + } + return buf.String(), nil } -// Render reners orgmode string to HTML string -func (Parser) Render(rawBytes []byte, urlPrefix string, metas map[string]string, isWiki bool) []byte { - return Render(rawBytes, urlPrefix, metas, isWiki) +// Render renders orgmode string to HTML string +func (Renderer) Render(ctx *markup.RenderContext, input io.Reader, output io.Writer) error { + return Render(ctx, input, output) } -// Renderer implements org.Writer -type Renderer struct { +// Writer implements org.Writer +type Writer struct { *org.HTMLWriter URLPrefix string IsWiki bool @@ -75,7 +132,7 @@ type Renderer struct { var byteMailto = []byte("mailto:") // WriteRegularLink renders images, links or videos -func (r *Renderer) WriteRegularLink(l org.RegularLink) { +func (r *Writer) WriteRegularLink(l org.RegularLink) { link := []byte(html.EscapeString(l.URL)) if l.Protocol == "file" { link = link[len("file:"):] diff --git a/modules/markup/orgmode/orgmode_test.go b/modules/markup/orgmode/orgmode_test.go index 020a3f592..da89326e9 100644 --- a/modules/markup/orgmode/orgmode_test.go +++ b/modules/markup/orgmode/orgmode_test.go @@ -8,6 +8,7 @@ import ( "strings" "testing" + "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" @@ -23,7 +24,10 @@ func TestRender_StandardLinks(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer := RenderString(input, setting.AppSubURL, nil, false) + buffer, err := RenderString(&markup.RenderContext{ + URLPrefix: setting.AppSubURL, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) } @@ -40,7 +44,10 @@ func TestRender_Images(t *testing.T) { setting.AppSubURL = AppSubURL test := func(input, expected string) { - buffer := RenderString(input, setting.AppSubURL, nil, false) + buffer, err := RenderString(&markup.RenderContext{ + URLPrefix: setting.AppSubURL, + }, input) + assert.NoError(t, err) assert.Equal(t, strings.TrimSpace(expected), strings.TrimSpace(buffer)) } diff --git a/modules/markup/renderer.go b/modules/markup/renderer.go new file mode 100644 index 000000000..3cd7cea70 --- /dev/null +++ b/modules/markup/renderer.go @@ -0,0 +1,238 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package markup + +import ( + "context" + "errors" + "fmt" + "io" + "path/filepath" + "strings" + "sync" + + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/setting" +) + +// Init initialize regexps for markdown parsing +func Init() { + NewSanitizer() + if len(setting.Markdown.CustomURLSchemes) > 0 { + CustomLinkURLSchemes(setting.Markdown.CustomURLSchemes) + } + + // since setting maybe changed extensions, this will reload all renderer extensions mapping + extRenderers = make(map[string]Renderer) + for _, renderer := range renderers { + for _, ext := range renderer.Extensions() { + extRenderers[strings.ToLower(ext)] = renderer + } + } +} + +// RenderContext represents a render context +type RenderContext struct { + Ctx context.Context + Filename string + Type string + IsWiki bool + URLPrefix string + Metas map[string]string + DefaultLink string + GitRepo *git.Repository + ShaExistCache map[string]bool + cancelFn func() +} + +// Cancel runs any cleanup functions that have been registered for this Ctx +func (ctx *RenderContext) Cancel() { + if ctx == nil { + return + } + ctx.ShaExistCache = map[string]bool{} + if ctx.cancelFn == nil { + return + } + ctx.cancelFn() +} + +// AddCancel adds the provided fn as a Cleanup for this Ctx +func (ctx *RenderContext) AddCancel(fn func()) { + if ctx == nil { + return + } + oldCancelFn := ctx.cancelFn + if oldCancelFn == nil { + ctx.cancelFn = fn + return + } + ctx.cancelFn = func() { + defer oldCancelFn() + fn() + } +} + +// Renderer defines an interface for rendering markup file to HTML +type Renderer interface { + Name() string // markup format name + Extensions() []string + NeedPostProcess() bool + SanitizerRules() []setting.MarkupSanitizerRule + Render(ctx *RenderContext, input io.Reader, output io.Writer) error +} + +var ( + extRenderers = make(map[string]Renderer) + renderers = make(map[string]Renderer) +) + +// RegisterRenderer registers a new markup file renderer +func RegisterRenderer(renderer Renderer) { + renderers[renderer.Name()] = renderer + for _, ext := range renderer.Extensions() { + extRenderers[strings.ToLower(ext)] = renderer + } +} + +// GetRendererByFileName get renderer by filename +func GetRendererByFileName(filename string) Renderer { + extension := strings.ToLower(filepath.Ext(filename)) + return extRenderers[extension] +} + +// GetRendererByType returns a renderer according type +func GetRendererByType(tp string) Renderer { + return renderers[tp] +} + +// Render renders markup file to HTML with all specific handling stuff. +func Render(ctx *RenderContext, input io.Reader, output io.Writer) error { + if ctx.Type != "" { + return renderByType(ctx, input, output) + } else if ctx.Filename != "" { + return renderFile(ctx, input, output) + } + return errors.New("Render options both filename and type missing") +} + +// RenderString renders Markup string to HTML with all specific handling stuff and return string +func RenderString(ctx *RenderContext, content string) (string, error) { + var buf strings.Builder + if err := Render(ctx, strings.NewReader(content), &buf); err != nil { + return "", err + } + return buf.String(), nil +} + +func render(ctx *RenderContext, renderer Renderer, input io.Reader, output io.Writer) error { + var wg sync.WaitGroup + var err error + pr, pw := io.Pipe() + defer func() { + _ = pr.Close() + _ = pw.Close() + }() + + pr2, pw2 := io.Pipe() + defer func() { + _ = pr2.Close() + _ = pw2.Close() + }() + + wg.Add(1) + go func() { + buf := SanitizeReader(pr2, renderer.Name()) + _, err = io.Copy(output, buf) + _ = pr2.Close() + wg.Done() + }() + + wg.Add(1) + go func() { + if renderer.NeedPostProcess() { + err = PostProcess(ctx, pr, pw2) + } else { + _, err = io.Copy(pw2, pr) + } + _ = pr.Close() + _ = pw2.Close() + wg.Done() + }() + + if err1 := renderer.Render(ctx, input, pw); err1 != nil { + return err1 + } + _ = pw.Close() + + wg.Wait() + return err +} + +// ErrUnsupportedRenderType represents +type ErrUnsupportedRenderType struct { + Type string +} + +func (err ErrUnsupportedRenderType) Error() string { + return fmt.Sprintf("Unsupported render type: %s", err.Type) +} + +func renderByType(ctx *RenderContext, input io.Reader, output io.Writer) error { + if renderer, ok := renderers[ctx.Type]; ok { + return render(ctx, renderer, input, output) + } + return ErrUnsupportedRenderType{ctx.Type} +} + +// ErrUnsupportedRenderExtension represents the error when extension doesn't supported to render +type ErrUnsupportedRenderExtension struct { + Extension string +} + +func (err ErrUnsupportedRenderExtension) Error() string { + return fmt.Sprintf("Unsupported render extension: %s", err.Extension) +} + +func renderFile(ctx *RenderContext, input io.Reader, output io.Writer) error { + extension := strings.ToLower(filepath.Ext(ctx.Filename)) + if renderer, ok := extRenderers[extension]; ok { + return render(ctx, renderer, input, output) + } + return ErrUnsupportedRenderExtension{extension} +} + +// Type returns if markup format via the filename +func Type(filename string) string { + if parser := GetRendererByFileName(filename); parser != nil { + return parser.Name() + } + return "" +} + +// IsMarkupFile reports whether file is a markup type file +func IsMarkupFile(name, markup string) bool { + if parser := GetRendererByFileName(name); parser != nil { + return parser.Name() == markup + } + return false +} + +// IsReadmeFile reports whether name looks like a README file +// based on its name. If an extension is provided, it will strictly +// match that extension. +// Note that the '.' should be provided in ext, e.g ".md" +func IsReadmeFile(name string, ext ...string) bool { + name = strings.ToLower(name) + if len(ext) > 0 { + return name == "readme"+ext[0] + } + if len(name) < 6 { + return false + } else if len(name) == 6 { + return name == "readme" + } + return name[:7] == "readme." +} diff --git a/modules/markup/markup_test.go b/modules/markup/renderer_test.go similarity index 100% rename from modules/markup/markup_test.go rename to modules/markup/renderer_test.go diff --git a/modules/markup/sanitizer.go b/modules/markup/sanitizer.go index 9214a75fb..9342d65de 100644 --- a/modules/markup/sanitizer.go +++ b/modules/markup/sanitizer.go @@ -19,8 +19,9 @@ import ( // Sanitizer is a protection wrapper of *bluemonday.Policy which does not allow // any modification to the underlying policies once it's been created. type Sanitizer struct { - policy *bluemonday.Policy - init sync.Once + defaultPolicy *bluemonday.Policy + rendererPolicies map[string]*bluemonday.Policy + init sync.Once } var sanitizer = &Sanitizer{} @@ -30,44 +31,57 @@ var sanitizer = &Sanitizer{} // entire application lifecycle. func NewSanitizer() { sanitizer.init.Do(func() { - ReplaceSanitizer() + InitializeSanitizer() }) } -// ReplaceSanitizer replaces the current sanitizer to account for changes in settings -func ReplaceSanitizer() { - sanitizer.policy = bluemonday.UGCPolicy() +// InitializeSanitizer (re)initializes the current sanitizer to account for changes in settings +func InitializeSanitizer() { + sanitizer.rendererPolicies = map[string]*bluemonday.Policy{} + sanitizer.defaultPolicy = createDefaultPolicy() + + for name, renderer := range renderers { + sanitizerRules := renderer.SanitizerRules() + if len(sanitizerRules) > 0 { + policy := createDefaultPolicy() + addSanitizerRules(policy, sanitizerRules) + sanitizer.rendererPolicies[name] = policy + } + } +} + +func createDefaultPolicy() *bluemonday.Policy { + policy := bluemonday.UGCPolicy() // For Chroma markdown plugin - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^is-loading$`)).OnElements("pre") - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^(chroma )?language-[\w-]+$`)).OnElements("code") + policy.AllowAttrs("class").Matching(regexp.MustCompile(`^is-loading$`)).OnElements("pre") + policy.AllowAttrs("class").Matching(regexp.MustCompile(`^(chroma )?language-[\w-]+$`)).OnElements("code") // Checkboxes - sanitizer.policy.AllowAttrs("type").Matching(regexp.MustCompile(`^checkbox$`)).OnElements("input") - sanitizer.policy.AllowAttrs("checked", "disabled").OnElements("input") + policy.AllowAttrs("type").Matching(regexp.MustCompile(`^checkbox$`)).OnElements("input") + policy.AllowAttrs("checked", "disabled", "data-source-position").OnElements("input") // Custom URL-Schemes - sanitizer.policy.AllowURLSchemes(setting.Markdown.CustomURLSchemes...) - - // Allow keyword markup - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^` + keywordClass + `$`)).OnElements("span") + if len(setting.Markdown.CustomURLSchemes) > 0 { + policy.AllowURLSchemes(setting.Markdown.CustomURLSchemes...) + } // Allow classes for anchors - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`ref-issue`)).OnElements("a") + policy.AllowAttrs("class").Matching(regexp.MustCompile(`ref-issue`)).OnElements("a") // Allow classes for task lists - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`task-list-item`)).OnElements("li") + policy.AllowAttrs("class").Matching(regexp.MustCompile(`task-list-item`)).OnElements("li") // Allow icons - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^icon(\s+[\p{L}\p{N}_-]+)+$`)).OnElements("i") + policy.AllowAttrs("class").Matching(regexp.MustCompile(`^icon(\s+[\p{L}\p{N}_-]+)+$`)).OnElements("i") // Allow unlabelled labels - sanitizer.policy.AllowNoAttrs().OnElements("label") + policy.AllowNoAttrs().OnElements("label") // Allow classes for emojis - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`emoji`)).OnElements("img") + policy.AllowAttrs("class").Matching(regexp.MustCompile(`emoji`)).OnElements("img") - // Allow icons, emojis, and chroma syntax on span - sanitizer.policy.AllowAttrs("class").Matching(regexp.MustCompile(`^((icon(\s+[\p{L}\p{N}_-]+)+)|(emoji))$|^([a-z][a-z0-9]{0,2})$`)).OnElements("span") + // Allow icons, emojis, chroma syntax and keyword markup on span + policy.AllowAttrs("class").Matching(regexp.MustCompile(`^((icon(\s+[\p{L}\p{N}_-]+)+)|(emoji))$|^([a-z][a-z0-9]{0,2})$|^` + keywordClass + `$`)).OnElements("span") // Allow generally safe attributes generalSafeAttrs := []string{"abbr", "accept", "accept-charset", @@ -98,18 +112,29 @@ func ReplaceSanitizer() { "abbr", "bdo", "cite", "dfn", "mark", "small", "span", "time", "wbr", } - sanitizer.policy.AllowAttrs(generalSafeAttrs...).OnElements(generalSafeElements...) + policy.AllowAttrs(generalSafeAttrs...).OnElements(generalSafeElements...) - sanitizer.policy.AllowAttrs("itemscope", "itemtype").OnElements("div") + policy.AllowAttrs("itemscope", "itemtype").OnElements("div") // FIXME: Need to handle longdesc in img but there is no easy way to do it // Custom keyword markup - for _, rule := range setting.ExternalSanitizerRules { - if rule.Regexp != nil { - sanitizer.policy.AllowAttrs(rule.AllowAttr).Matching(rule.Regexp).OnElements(rule.Element) - } else { - sanitizer.policy.AllowAttrs(rule.AllowAttr).OnElements(rule.Element) + addSanitizerRules(policy, setting.ExternalSanitizerRules) + + return policy +} + +func addSanitizerRules(policy *bluemonday.Policy, rules []setting.MarkupSanitizerRule) { + for _, rule := range rules { + if rule.AllowDataURIImages { + policy.AllowDataURIImages() + } + if rule.Element != "" { + if rule.Regexp != nil { + policy.AllowAttrs(rule.AllowAttr).Matching(rule.Regexp).OnElements(rule.Element) + } else { + policy.AllowAttrs(rule.AllowAttr).OnElements(rule.Element) + } } } } @@ -117,21 +142,15 @@ func ReplaceSanitizer() { // Sanitize takes a string that contains a HTML fragment or document and applies policy whitelist. func Sanitize(s string) string { NewSanitizer() - return sanitizer.policy.Sanitize(s) + return sanitizer.defaultPolicy.Sanitize(s) } // SanitizeReader sanitizes a Reader -func SanitizeReader(r io.Reader) *bytes.Buffer { +func SanitizeReader(r io.Reader, renderer string) *bytes.Buffer { NewSanitizer() - return sanitizer.policy.SanitizeReader(r) -} - -// SanitizeBytes takes a []byte slice that contains a HTML fragment or document and applies policy whitelist. -func SanitizeBytes(b []byte) []byte { - if len(b) == 0 { - // nothing to sanitize - return b + policy, exist := sanitizer.rendererPolicies[renderer] + if !exist { + policy = sanitizer.defaultPolicy } - NewSanitizer() - return sanitizer.policy.SanitizeBytes(b) + return policy.SanitizeReader(r) } diff --git a/modules/markup/sanitizer_test.go b/modules/markup/sanitizer_test.go index 63b70166d..64189e143 100644 --- a/modules/markup/sanitizer_test.go +++ b/modules/markup/sanitizer_test.go @@ -6,6 +6,8 @@ package markup import ( + "html/template" + "strings" "testing" "github.com/stretchr/testify/assert" @@ -47,6 +49,15 @@ func Test_Sanitizer(t *testing.T) { for i := 0; i < len(testCases); i += 2 { assert.Equal(t, testCases[i+1], Sanitize(testCases[i])) - assert.Equal(t, testCases[i+1], string(SanitizeBytes([]byte(testCases[i])))) } } + +func TestSanitizeNonEscape(t *testing.T) { + descStr := "<script>alert(document.domain)</script>" + + output := template.HTML(Sanitize(string(descStr))) + if strings.Contains(string(output), "`)).IsSvgImage()) + assert.False(t, DetectContentType([]byte(` + `)).IsSvgImage()) + assert.False(t, DetectContentType([]byte(` + + `)).IsSvgImage()) +} + +func TestIsPDF(t *testing.T) { + pdf, _ := base64.StdEncoding.DecodeString("JVBERi0xLjYKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbHRlci9GbGF0ZURlY29kZT4+CnN0cmVhbQp4nF3NPwsCMQwF8D2f4s2CNYk1baF0EHRwOwg4iJt/NsFb/PpevUE4Mjwe") + assert.True(t, DetectContentType(pdf).IsPDF()) + assert.False(t, DetectContentType([]byte("plain text")).IsPDF()) +} + +func TestIsVideo(t *testing.T) { + mp4, _ := base64.StdEncoding.DecodeString("AAAAGGZ0eXBtcDQyAAAAAGlzb21tcDQyAAEI721vb3YAAABsbXZoZAAAAADaBlwX2gZcFwAAA+gA") + assert.True(t, DetectContentType(mp4).IsVideo()) + assert.False(t, DetectContentType([]byte("plain text")).IsVideo()) +} + +func TestIsAudio(t *testing.T) { + mp3, _ := base64.StdEncoding.DecodeString("SUQzBAAAAAABAFRYWFgAAAASAAADbWFqb3JfYnJhbmQAbXA0MgBUWFhYAAAAEQAAA21pbm9yX3Zl") + assert.True(t, DetectContentType(mp3).IsAudio()) + assert.False(t, DetectContentType([]byte("plain text")).IsAudio()) +} + +func TestDetectContentTypeFromReader(t *testing.T) { + mp3, _ := base64.StdEncoding.DecodeString("SUQzBAAAAAABAFRYWFgAAAASAAADbWFqb3JfYnJhbmQAbXA0MgBUWFhYAAAAEQAAA21pbm9yX3Zl") + st, err := DetectContentTypeFromReader(bytes.NewReader(mp3)) + assert.NoError(t, err) + assert.True(t, st.IsAudio()) +} diff --git a/modules/util/paginate.go b/modules/util/paginate.go new file mode 100644 index 000000000..2baa71664 --- /dev/null +++ b/modules/util/paginate.go @@ -0,0 +1,34 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package util + +import "reflect" + +// PaginateSlice cut a slice as per pagination options +// if page = 0 it do not paginate +func PaginateSlice(list interface{}, page, pageSize int) interface{} { + if page <= 0 || pageSize <= 0 { + return list + } + if reflect.TypeOf(list).Kind() != reflect.Slice { + return list + } + + listValue := reflect.ValueOf(list) + + page-- + + if page*pageSize >= listValue.Len() { + return listValue.Slice(listValue.Len(), listValue.Len()).Interface() + } + + listValue = listValue.Slice(page*pageSize, listValue.Len()) + + if listValue.Len() > pageSize { + return listValue.Slice(0, pageSize).Interface() + } + + return listValue.Interface() +} diff --git a/modules/util/paginate_test.go b/modules/util/paginate_test.go new file mode 100644 index 000000000..d962e04c1 --- /dev/null +++ b/modules/util/paginate_test.go @@ -0,0 +1,47 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package util + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestPaginateSlice(t *testing.T) { + stringSlice := []string{"a", "b", "c", "d", "e"} + result, ok := PaginateSlice(stringSlice, 1, 2).([]string) + assert.True(t, ok) + assert.EqualValues(t, []string{"a", "b"}, result) + + result, ok = PaginateSlice(stringSlice, 100, 2).([]string) + assert.True(t, ok) + assert.EqualValues(t, []string{}, result) + + result, ok = PaginateSlice(stringSlice, 3, 2).([]string) + assert.True(t, ok) + assert.EqualValues(t, []string{"e"}, result) + + result, ok = PaginateSlice(stringSlice, 1, 0).([]string) + assert.True(t, ok) + assert.EqualValues(t, []string{"a", "b", "c", "d", "e"}, result) + + result, ok = PaginateSlice(stringSlice, 1, -1).([]string) + assert.True(t, ok) + assert.EqualValues(t, []string{"a", "b", "c", "d", "e"}, result) + + type Test struct { + Val int + } + + var testVar = []*Test{{Val: 2}, {Val: 3}, {Val: 4}} + testVar, ok = PaginateSlice(testVar, 1, 50).([]*Test) + assert.True(t, ok) + assert.EqualValues(t, []*Test{{Val: 2}, {Val: 3}, {Val: 4}}, testVar) + + testVar, ok = PaginateSlice(testVar, 2, 2).([]*Test) + assert.True(t, ok) + assert.EqualValues(t, []*Test{{Val: 4}}, testVar) +} diff --git a/modules/util/path.go b/modules/util/path.go index aa3d00989..e79747327 100644 --- a/modules/util/path.go +++ b/modules/util/path.go @@ -6,9 +6,12 @@ package util import ( "errors" + "net/url" "os" "path" "path/filepath" + "regexp" + "runtime" "strings" ) @@ -150,3 +153,23 @@ func StatDir(rootPath string, includeDir ...bool) ([]string, error) { } return statDir(rootPath, "", isIncludeDir, false, false) } + +// FileURLToPath extracts the path information from a file://... url. +func FileURLToPath(u *url.URL) (string, error) { + if u.Scheme != "file" { + return "", errors.New("URL scheme is not 'file': " + u.String()) + } + + path := u.Path + + if runtime.GOOS != "windows" { + return path, nil + } + + // If it looks like there's a Windows drive letter at the beginning, strip off the leading slash. + re := regexp.MustCompile("/[A-Za-z]:/") + if re.MatchString(path) { + return path[1:], nil + } + return path, nil +} diff --git a/modules/util/path_test.go b/modules/util/path_test.go new file mode 100644 index 000000000..41104f79f --- /dev/null +++ b/modules/util/path_test.go @@ -0,0 +1,58 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package util + +import ( + "net/url" + "runtime" + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestFileURLToPath(t *testing.T) { + var cases = []struct { + url string + expected string + haserror bool + windows bool + }{ + // case 0 + { + url: "", + haserror: true, + }, + // case 1 + { + url: "http://test.io", + haserror: true, + }, + // case 2 + { + url: "file:///path", + expected: "/path", + }, + // case 3 + { + url: "file:///C:/path", + expected: "C:/path", + windows: true, + }, + } + + for n, c := range cases { + if c.windows && runtime.GOOS != "windows" { + continue + } + u, _ := url.Parse(c.url) + p, err := FileURLToPath(u) + if c.haserror { + assert.Error(t, err, "case %d: should return error", n) + } else { + assert.NoError(t, err, "case %d: should not return error", n) + assert.Equal(t, c.expected, p, "case %d: should be equal", n) + } + } +} diff --git a/modules/util/remove.go b/modules/util/remove.go index f2bbbc30b..d05ee9fe4 100644 --- a/modules/util/remove.go +++ b/modules/util/remove.go @@ -6,10 +6,13 @@ package util import ( "os" + "runtime" "syscall" "time" ) +const windowsSharingViolationError syscall.Errno = 32 + // Remove removes the named file or (empty) directory with at most 5 attempts. func Remove(name string) error { var err error @@ -25,6 +28,12 @@ func Remove(name string) error { continue } + if unwrapped == windowsSharingViolationError && runtime.GOOS == "windows" { + // try again + <-time.After(100 * time.Millisecond) + continue + } + if unwrapped == syscall.ENOENT { // it's already gone return nil @@ -33,7 +42,7 @@ func Remove(name string) error { return err } -// RemoveAll removes the named file or (empty) directory with at most 5 attempts.Remove +// RemoveAll removes the named file or (empty) directory with at most 5 attempts. func RemoveAll(name string) error { var err error for i := 0; i < 5; i++ { @@ -48,6 +57,45 @@ func RemoveAll(name string) error { continue } + if unwrapped == windowsSharingViolationError && runtime.GOOS == "windows" { + // try again + <-time.After(100 * time.Millisecond) + continue + } + + if unwrapped == syscall.ENOENT { + // it's already gone + return nil + } + } + return err +} + +// Rename renames (moves) oldpath to newpath with at most 5 attempts. +func Rename(oldpath, newpath string) error { + var err error + for i := 0; i < 5; i++ { + err = os.Rename(oldpath, newpath) + if err == nil { + break + } + unwrapped := err.(*os.LinkError).Err + if unwrapped == syscall.EBUSY || unwrapped == syscall.ENOTEMPTY || unwrapped == syscall.EPERM || unwrapped == syscall.EMFILE || unwrapped == syscall.ENFILE { + // try again + <-time.After(100 * time.Millisecond) + continue + } + + if unwrapped == windowsSharingViolationError && runtime.GOOS == "windows" { + // try again + <-time.After(100 * time.Millisecond) + continue + } + + if i == 0 && os.IsNotExist(err) { + return err + } + if unwrapped == syscall.ENOENT { // it's already gone return nil diff --git a/modules/util/sanitize.go b/modules/util/sanitize.go index a4f5479df..de59ffaa2 100644 --- a/modules/util/sanitize.go +++ b/modules/util/sanitize.go @@ -1,4 +1,4 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. +// Copyright 2021 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. @@ -9,40 +9,53 @@ import ( "strings" ) -// urlSafeError wraps an error whose message may contain a sensitive URL -type urlSafeError struct { - err error - unsanitizedURL string +const userPlaceholder = "sanitized-credential" +const unparsableURL = "(unparsable url)" + +type sanitizedError struct { + err error + replacer *strings.Replacer } -func (err urlSafeError) Error() string { - return SanitizeMessage(err.err.Error(), err.unsanitizedURL) +func (err sanitizedError) Error() string { + return err.replacer.Replace(err.err.Error()) } -// URLSanitizedError returns the sanitized version an error whose message may -// contain a sensitive URL -func URLSanitizedError(err error, unsanitizedURL string) error { - return urlSafeError{err: err, unsanitizedURL: unsanitizedURL} +// NewSanitizedError wraps an error and replaces all old, new string pairs in the message text. +func NewSanitizedError(err error, oldnew ...string) error { + return sanitizedError{err: err, replacer: strings.NewReplacer(oldnew...)} } -// SanitizeMessage sanitizes a message which may contains a sensitive URL -func SanitizeMessage(message, unsanitizedURL string) string { - sanitizedURL := SanitizeURLCredentials(unsanitizedURL, true) - return strings.ReplaceAll(message, unsanitizedURL, sanitizedURL) +// NewURLSanitizedError wraps an error and replaces the url credential or removes them. +func NewURLSanitizedError(err error, u *url.URL, usePlaceholder bool) error { + return sanitizedError{err: err, replacer: NewURLSanitizer(u, usePlaceholder)} } -// SanitizeURLCredentials sanitizes a url, either removing user credentials -// or replacing them with a placeholder. -func SanitizeURLCredentials(unsanitizedURL string, usePlaceholder bool) string { - u, err := url.Parse(unsanitizedURL) - if err != nil { - // don't log the error, since it might contain unsanitized URL. - return "(unparsable url)" - } +// NewStringURLSanitizedError wraps an error and replaces the url credential or removes them. +// If the url can't get parsed it gets replaced with a placeholder string. +func NewStringURLSanitizedError(err error, unsanitizedURL string, usePlaceholder bool) error { + return sanitizedError{err: err, replacer: NewStringURLSanitizer(unsanitizedURL, usePlaceholder)} +} + +// NewURLSanitizer creates a replacer for the url with the credential sanitized or removed. +func NewURLSanitizer(u *url.URL, usePlaceholder bool) *strings.Replacer { + old := u.String() + if u.User != nil && usePlaceholder { - u.User = url.User("") + u.User = url.User(userPlaceholder) } else { u.User = nil } - return u.String() + return strings.NewReplacer(old, u.String()) +} + +// NewStringURLSanitizer creates a replacer for the url with the credential sanitized or removed. +// If the url can't get parsed it gets replaced with a placeholder string +func NewStringURLSanitizer(unsanitizedURL string, usePlaceholder bool) *strings.Replacer { + u, err := url.Parse(unsanitizedURL) + if err != nil { + // don't log the error, since it might contain unsanitized URL. + return strings.NewReplacer(unsanitizedURL, unparsableURL) + } + return NewURLSanitizer(u, usePlaceholder) } diff --git a/modules/util/sanitize_test.go b/modules/util/sanitize_test.go index 4f0710067..578f75f51 100644 --- a/modules/util/sanitize_test.go +++ b/modules/util/sanitize_test.go @@ -1,25 +1,164 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. +// Copyright 2021 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. package util import ( + "errors" "testing" "github.com/stretchr/testify/assert" ) -func TestSanitizeURLCredentials(t *testing.T) { - var kases = map[string]string{ - "https://github.com/go-gitea/test_repo.git": "https://github.com/go-gitea/test_repo.git", - "https://mytoken@github.com/go-gitea/test_repo.git": "https://github.com/go-gitea/test_repo.git", - "http://github.com/go-gitea/test_repo.git": "http://github.com/go-gitea/test_repo.git", - "/test/repos/repo1": "/test/repos/repo1", - "git@github.com:go-gitea/test_repo.git": "(unparsable url)", +func TestNewSanitizedError(t *testing.T) { + err := errors.New("error while secret on test") + err2 := NewSanitizedError(err) + assert.Equal(t, err.Error(), err2.Error()) + + var cases = []struct { + input error + oldnew []string + expected string + }{ + // case 0 + { + errors.New("error while secret on test"), + []string{"secret", "replaced"}, + "error while replaced on test", + }, + // case 1 + { + errors.New("error while sec-ret on test"), + []string{"secret", "replaced"}, + "error while sec-ret on test", + }, } - for source, value := range kases { - assert.EqualValues(t, value, SanitizeURLCredentials(source, false)) + for n, c := range cases { + err := NewSanitizedError(c.input, c.oldnew...) + + assert.Equal(t, c.expected, err.Error(), "case %d: error should match", n) + } +} + +func TestNewStringURLSanitizer(t *testing.T) { + var cases = []struct { + input string + placeholder bool + expected string + }{ + // case 0 + { + "https://github.com/go-gitea/test_repo.git", + true, + "https://github.com/go-gitea/test_repo.git", + }, + // case 1 + { + "https://github.com/go-gitea/test_repo.git", + false, + "https://github.com/go-gitea/test_repo.git", + }, + // case 2 + { + "https://mytoken@github.com/go-gitea/test_repo.git", + true, + "https://" + userPlaceholder + "@github.com/go-gitea/test_repo.git", + }, + // case 3 + { + "https://mytoken@github.com/go-gitea/test_repo.git", + false, + "https://github.com/go-gitea/test_repo.git", + }, + // case 4 + { + "https://user:password@github.com/go-gitea/test_repo.git", + true, + "https://" + userPlaceholder + "@github.com/go-gitea/test_repo.git", + }, + // case 5 + { + "https://user:password@github.com/go-gitea/test_repo.git", + false, + "https://github.com/go-gitea/test_repo.git", + }, + // case 6 + { + "https://gi\nthub.com/go-gitea/test_repo.git", + false, + unparsableURL, + }, + } + + for n, c := range cases { + // uses NewURLSanitizer internally + result := NewStringURLSanitizer(c.input, c.placeholder).Replace(c.input) + + assert.Equal(t, c.expected, result, "case %d: error should match", n) + } +} + +func TestNewStringURLSanitizedError(t *testing.T) { + var cases = []struct { + input string + placeholder bool + expected string + }{ + // case 0 + { + "https://github.com/go-gitea/test_repo.git", + true, + "https://github.com/go-gitea/test_repo.git", + }, + // case 1 + { + "https://github.com/go-gitea/test_repo.git", + false, + "https://github.com/go-gitea/test_repo.git", + }, + // case 2 + { + "https://mytoken@github.com/go-gitea/test_repo.git", + true, + "https://" + userPlaceholder + "@github.com/go-gitea/test_repo.git", + }, + // case 3 + { + "https://mytoken@github.com/go-gitea/test_repo.git", + false, + "https://github.com/go-gitea/test_repo.git", + }, + // case 4 + { + "https://user:password@github.com/go-gitea/test_repo.git", + true, + "https://" + userPlaceholder + "@github.com/go-gitea/test_repo.git", + }, + // case 5 + { + "https://user:password@github.com/go-gitea/test_repo.git", + false, + "https://github.com/go-gitea/test_repo.git", + }, + // case 6 + { + "https://gi\nthub.com/go-gitea/test_repo.git", + false, + unparsableURL, + }, + } + + encloseText := func(input string) string { + return "test " + input + " test" + } + + for n, c := range cases { + err := errors.New(encloseText(c.input)) + + result := NewStringURLSanitizedError(err, c.input, c.placeholder) + + assert.Equal(t, encloseText(c.expected), result.Error(), "case %d: error should match", n) } } diff --git a/modules/util/shellquote_test.go b/modules/util/shellquote_test.go index 2ddc6d763..be6ba372f 100644 --- a/modules/util/shellquote_test.go +++ b/modules/util/shellquote_test.go @@ -33,7 +33,7 @@ func TestShellEscape(t *testing.T) { "~git/Gitea v1.13/gitea", `~git/"Gitea v1.13/gitea"`, }, { - "Bangs are unforutunately not predictable so need to be singlequoted", + "Bangs are unfortunately not predictable so need to be singlequoted", "C:/Program Files/Gitea!/gitea", `'C:/Program Files/Gitea!/gitea'`, }, { @@ -41,7 +41,7 @@ func TestShellEscape(t *testing.T) { "/home/git/Gitea\n\nWHY-WOULD-YOU-DO-THIS\n\nGitea/gitea", "'/home/git/Gitea\n\nWHY-WOULD-YOU-DO-THIS\n\nGitea/gitea'", }, { - "Similarly we should nicely handle mutiple single quotes if we have to single-quote", + "Similarly we should nicely handle multiple single quotes if we have to single-quote", "'!''!'''!''!'!'", `\''!'\'\''!'\'\'\''!'\'\''!'\''!'\'`, }, { diff --git a/modules/util/truncate.go b/modules/util/truncate.go new file mode 100644 index 000000000..8d0f63097 --- /dev/null +++ b/modules/util/truncate.go @@ -0,0 +1,35 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package util + +import "unicode/utf8" + +// SplitStringAtByteN splits a string at byte n accounting for rune boundaries. (Combining characters are not accounted for.) +func SplitStringAtByteN(input string, n int) (left, right string) { + if len(input) <= n { + left = input + return + } + + if !utf8.ValidString(input) { + left = input[:n-3] + "..." + right = "..." + input[n-3:] + return + } + + // in UTF8 "…" is 3 bytes so doesn't really gain us anything... + end := 0 + for end <= n-3 { + _, size := utf8.DecodeRuneInString(input[end:]) + if end+size > n-3 { + break + } + end += size + } + + left = input[:end] + "…" + right = "…" + input[end:] + return +} diff --git a/modules/util/util.go b/modules/util/util.go index 9de1710ac..d26e6f13e 100644 --- a/modules/util/util.go +++ b/modules/util/util.go @@ -6,7 +6,9 @@ package util import ( "bytes" + "crypto/rand" "errors" + "math/big" "strings" ) @@ -124,3 +126,28 @@ func MergeInto(dict map[string]interface{}, values ...interface{}) (map[string]i return dict, nil } + +// RandomInt returns a random integer between 0 and limit, inclusive +func RandomInt(limit int64) (int64, error) { + int, err := rand.Int(rand.Reader, big.NewInt(limit)) + if err != nil { + return 0, err + } + return int.Int64(), nil +} + +const letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" + +// RandomString generates a random alphanumerical string +func RandomString(length int64) (string, error) { + bytes := make([]byte, length) + limit := int64(len(letters)) + for i := range bytes { + num, err := RandomInt(limit) + if err != nil { + return "", err + } + bytes[i] = letters[num] + } + return string(bytes), nil +} diff --git a/modules/util/util_test.go b/modules/util/util_test.go index 1d4f23de9..f82671787 100644 --- a/modules/util/util_test.go +++ b/modules/util/util_test.go @@ -5,6 +5,7 @@ package util import ( + "regexp" "strings" "testing" @@ -118,3 +119,40 @@ func Test_NormalizeEOL(t *testing.T) { assert.Equal(t, []byte("mix\nand\nmatch\n."), NormalizeEOL([]byte("mix\r\nand\rmatch\n."))) } + +func Test_RandomInt(t *testing.T) { + int, err := RandomInt(255) + assert.True(t, int >= 0) + assert.True(t, int <= 255) + assert.NoError(t, err) +} + +func Test_RandomString(t *testing.T) { + str1, err := RandomString(32) + assert.NoError(t, err) + matches, err := regexp.MatchString(`^[a-zA-Z0-9]{32}$`, str1) + assert.NoError(t, err) + assert.True(t, matches) + + str2, err := RandomString(32) + assert.NoError(t, err) + matches, err = regexp.MatchString(`^[a-zA-Z0-9]{32}$`, str1) + assert.NoError(t, err) + assert.True(t, matches) + + assert.NotEqual(t, str1, str2) + + str3, err := RandomString(256) + assert.NoError(t, err) + matches, err = regexp.MatchString(`^[a-zA-Z0-9]{256}$`, str3) + assert.NoError(t, err) + assert.True(t, matches) + + str4, err := RandomString(256) + assert.NoError(t, err) + matches, err = regexp.MatchString(`^[a-zA-Z0-9]{256}$`, str4) + assert.NoError(t, err) + assert.True(t, matches) + + assert.NotEqual(t, str3, str4) +} diff --git a/modules/validation/binding.go b/modules/validation/binding.go index 1c67878ea..5d5c64611 100644 --- a/modules/validation/binding.go +++ b/modules/validation/binding.go @@ -9,7 +9,7 @@ import ( "regexp" "strings" - "gitea.com/macaron/binding" + "gitea.com/go-chi/binding" "github.com/gobwas/glob" ) @@ -19,6 +19,9 @@ const ( // ErrGlobPattern is returned when glob pattern is invalid ErrGlobPattern = "GlobPattern" + + // ErrRegexPattern is returned when a regex pattern is invalid + ErrRegexPattern = "RegexPattern" ) var ( @@ -52,7 +55,10 @@ func CheckGitRefAdditionalRulesValid(name string) bool { func AddBindingRules() { addGitRefNameBindingRule() addValidURLBindingRule() + addValidSiteURLBindingRule() addGlobPatternRule() + addRegexPatternRule() + addGlobOrRegexPatternRule() } func addGitRefNameBindingRule() { @@ -97,22 +103,78 @@ func addValidURLBindingRule() { }) } +func addValidSiteURLBindingRule() { + // URL validation rule + binding.AddRule(&binding.Rule{ + IsMatch: func(rule string) bool { + return strings.HasPrefix(rule, "ValidSiteUrl") + }, + IsValid: func(errs binding.Errors, name string, val interface{}) (bool, binding.Errors) { + str := fmt.Sprintf("%v", val) + if len(str) != 0 && !IsValidSiteURL(str) { + errs.Add([]string{name}, binding.ERR_URL, "Url") + return false, errs + } + + return true, errs + }, + }) +} + func addGlobPatternRule() { binding.AddRule(&binding.Rule{ IsMatch: func(rule string) bool { return rule == "GlobPattern" }, + IsValid: globPatternValidator, + }) +} + +func globPatternValidator(errs binding.Errors, name string, val interface{}) (bool, binding.Errors) { + str := fmt.Sprintf("%v", val) + + if len(str) != 0 { + if _, err := glob.Compile(str); err != nil { + errs.Add([]string{name}, ErrGlobPattern, err.Error()) + return false, errs + } + } + + return true, errs +} + +func addRegexPatternRule() { + binding.AddRule(&binding.Rule{ + IsMatch: func(rule string) bool { + return rule == "RegexPattern" + }, + IsValid: regexPatternValidator, + }) +} + +func regexPatternValidator(errs binding.Errors, name string, val interface{}) (bool, binding.Errors) { + str := fmt.Sprintf("%v", val) + + if _, err := regexp.Compile(str); err != nil { + errs.Add([]string{name}, ErrRegexPattern, err.Error()) + return false, errs + } + + return true, errs +} + +func addGlobOrRegexPatternRule() { + binding.AddRule(&binding.Rule{ + IsMatch: func(rule string) bool { + return rule == "GlobOrRegexPattern" + }, IsValid: func(errs binding.Errors, name string, val interface{}) (bool, binding.Errors) { - str := fmt.Sprintf("%v", val) + str := strings.TrimSpace(fmt.Sprintf("%v", val)) - if len(str) != 0 { - if _, err := glob.Compile(str); err != nil { - errs.Add([]string{name}, ErrGlobPattern, err.Error()) - return false, errs - } + if len(str) >= 2 && strings.HasPrefix(str, "/") && strings.HasSuffix(str, "/") { + return regexPatternValidator(errs, name, str[1:len(str)-1]) } - - return true, errs + return globPatternValidator(errs, name, val) }, }) } diff --git a/modules/validation/binding_test.go b/modules/validation/binding_test.go index 9fc9a6db0..d3b4e686a 100644 --- a/modules/validation/binding_test.go +++ b/modules/validation/binding_test.go @@ -9,8 +9,8 @@ import ( "net/http/httptest" "testing" - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" + "gitea.com/go-chi/binding" + "github.com/go-chi/chi" "github.com/stretchr/testify/assert" ) @@ -26,17 +26,19 @@ type ( } TestForm struct { - BranchName string `form:"BranchName" binding:"GitRefName"` - URL string `form:"ValidUrl" binding:"ValidUrl"` - GlobPattern string `form:"GlobPattern" binding:"GlobPattern"` + BranchName string `form:"BranchName" binding:"GitRefName"` + URL string `form:"ValidUrl" binding:"ValidUrl"` + GlobPattern string `form:"GlobPattern" binding:"GlobPattern"` + RegexPattern string `form:"RegexPattern" binding:"RegexPattern"` } ) func performValidationTest(t *testing.T, testCase validationTestCase) { httpRecorder := httptest.NewRecorder() - m := macaron.Classic() + m := chi.NewRouter() - m.Post(testRoute, binding.Validate(testCase.data), func(actual binding.Errors) { + m.Post(testRoute, func(resp http.ResponseWriter, req *http.Request) { + actual := binding.Validate(req, testCase.data) // see https://github.com/stretchr/testify/issues/435 if actual == nil { actual = binding.Errors{} @@ -49,7 +51,7 @@ func performValidationTest(t *testing.T, testCase validationTestCase) { if err != nil { panic(err) } - + req.Header.Add("Content-Type", "x-www-form-urlencoded") m.ServeHTTP(httpRecorder, req) switch httpRecorder.Code { diff --git a/modules/validation/glob_pattern_test.go b/modules/validation/glob_pattern_test.go index 26775167b..cbaed7e66 100644 --- a/modules/validation/glob_pattern_test.go +++ b/modules/validation/glob_pattern_test.go @@ -7,7 +7,7 @@ package validation import ( "testing" - "gitea.com/macaron/binding" + "gitea.com/go-chi/binding" "github.com/gobwas/glob" ) diff --git a/modules/validation/helpers.go b/modules/validation/helpers.go index c22e667a2..617ec3578 100644 --- a/modules/validation/helpers.go +++ b/modules/validation/helpers.go @@ -52,6 +52,25 @@ func IsValidURL(uri string) bool { return true } +// IsValidSiteURL checks if URL is valid +func IsValidSiteURL(uri string) bool { + u, err := url.ParseRequestURI(uri) + if err != nil { + return false + } + + if !validPort(portOnly(u.Host)) { + return false + } + + for _, scheme := range setting.Service.ValidSiteURLSchemes { + if scheme == u.Scheme { + return true + } + } + return false +} + // IsAPIURL checks if URL is current Gitea instance API URL func IsAPIURL(uri string) bool { return strings.HasPrefix(strings.ToLower(uri), strings.ToLower(setting.AppURL+"api")) @@ -73,7 +92,7 @@ func IsValidExternalURL(uri string) bool { return false } - // TODO: Later it should be added to allow local network IP addreses + // TODO: Later it should be added to allow local network IP addresses // only if allowed by special setting return true diff --git a/modules/validation/helpers_test.go b/modules/validation/helpers_test.go index cc2a4b720..f6f897e82 100644 --- a/modules/validation/helpers_test.go +++ b/modules/validation/helpers_test.go @@ -24,12 +24,12 @@ func Test_IsValidURL(t *testing.T) { valid: false, }, { - description: "Loobpack IPv4 URL", + description: "Loopback IPv4 URL", url: "http://127.0.1.1:5678/", valid: true, }, { - description: "Loobpack IPv6 URL", + description: "Loopback IPv6 URL", url: "https://[::1]/", valid: true, }, @@ -61,7 +61,7 @@ func Test_IsValidExternalURL(t *testing.T) { valid: true, }, { - description: "Loobpack IPv4 URL", + description: "Loopback IPv4 URL", url: "http://127.0.1.1:5678/", valid: false, }, diff --git a/modules/validation/refname_test.go b/modules/validation/refname_test.go index 521a83fa0..2d6458b9b 100644 --- a/modules/validation/refname_test.go +++ b/modules/validation/refname_test.go @@ -7,12 +7,12 @@ package validation import ( "testing" - "gitea.com/macaron/binding" + "gitea.com/go-chi/binding" ) var gitRefNameValidationTestCases = []validationTestCase{ { - description: "Referece contains only characters", + description: "Reference name contains only characters", data: TestForm{ BranchName: "test", }, diff --git a/modules/validation/regex_pattern_test.go b/modules/validation/regex_pattern_test.go new file mode 100644 index 000000000..afe1bcf42 --- /dev/null +++ b/modules/validation/regex_pattern_test.go @@ -0,0 +1,60 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package validation + +import ( + "regexp" + "testing" + + "gitea.com/go-chi/binding" +) + +func getRegexPatternErrorString(pattern string) string { + if _, err := regexp.Compile(pattern); err != nil { + return err.Error() + } + return "" +} + +var regexValidationTestCases = []validationTestCase{ + { + description: "Empty regex pattern", + data: TestForm{ + RegexPattern: "", + }, + expectedErrors: binding.Errors{}, + }, + { + description: "Valid regex", + data: TestForm{ + RegexPattern: `(\d{1,3})+`, + }, + expectedErrors: binding.Errors{}, + }, + + { + description: "Invalid regex", + data: TestForm{ + RegexPattern: "[a-", + }, + expectedErrors: binding.Errors{ + binding.Error{ + FieldNames: []string{"RegexPattern"}, + Classification: ErrRegexPattern, + Message: getRegexPatternErrorString("[a-"), + }, + }, + }, +} + +func Test_RegexPatternValidation(t *testing.T) { + AddBindingRules() + + for _, testCase := range regexValidationTestCases { + t.Run(testCase.description, func(t *testing.T) { + performValidationTest(t, testCase) + }) + } +} diff --git a/modules/validation/validurl_test.go b/modules/validation/validurl_test.go index aed7406c0..3cb620660 100644 --- a/modules/validation/validurl_test.go +++ b/modules/validation/validurl_test.go @@ -7,7 +7,7 @@ package validation import ( "testing" - "gitea.com/macaron/binding" + "gitea.com/go-chi/binding" ) var urlValidationTestCases = []validationTestCase{ diff --git a/modules/web/middleware/binding.go b/modules/web/middleware/binding.go new file mode 100644 index 000000000..cbdb29b81 --- /dev/null +++ b/modules/web/middleware/binding.go @@ -0,0 +1,147 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package middleware + +import ( + "reflect" + "strings" + + "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/modules/validation" + + "gitea.com/go-chi/binding" + "github.com/unknwon/com" +) + +// Form form binding interface +type Form interface { + binding.Validator +} + +func init() { + binding.SetNameMapper(com.ToSnakeCase) +} + +// AssignForm assign form values back to the template data. +func AssignForm(form interface{}, data map[string]interface{}) { + typ := reflect.TypeOf(form) + val := reflect.ValueOf(form) + + for typ.Kind() == reflect.Ptr { + typ = typ.Elem() + val = val.Elem() + } + + for i := 0; i < typ.NumField(); i++ { + field := typ.Field(i) + + fieldName := field.Tag.Get("form") + // Allow ignored fields in the struct + if fieldName == "-" { + continue + } else if len(fieldName) == 0 { + fieldName = com.ToSnakeCase(field.Name) + } + + data[fieldName] = val.Field(i).Interface() + } +} + +func getRuleBody(field reflect.StructField, prefix string) string { + for _, rule := range strings.Split(field.Tag.Get("binding"), ";") { + if strings.HasPrefix(rule, prefix) { + return rule[len(prefix) : len(rule)-1] + } + } + return "" +} + +// GetSize get size int form tag +func GetSize(field reflect.StructField) string { + return getRuleBody(field, "Size(") +} + +// GetMinSize get minimal size in form tag +func GetMinSize(field reflect.StructField) string { + return getRuleBody(field, "MinSize(") +} + +// GetMaxSize get max size in form tag +func GetMaxSize(field reflect.StructField) string { + return getRuleBody(field, "MaxSize(") +} + +// GetInclude get include in form tag +func GetInclude(field reflect.StructField) string { + return getRuleBody(field, "Include(") +} + +// Validate validate TODO: +func Validate(errs binding.Errors, data map[string]interface{}, f Form, l translation.Locale) binding.Errors { + if errs.Len() == 0 { + return errs + } + + data["HasError"] = true + // If the field with name errs[0].FieldNames[0] is not found in form + // somehow, some code later on will panic on Data["ErrorMsg"].(string). + // So initialize it to some default. + data["ErrorMsg"] = l.Tr("form.unknown_error") + AssignForm(f, data) + + typ := reflect.TypeOf(f) + val := reflect.ValueOf(f) + + if typ.Kind() == reflect.Ptr { + typ = typ.Elem() + val = val.Elem() + } + + if field, ok := typ.FieldByName(errs[0].FieldNames[0]); ok { + fieldName := field.Tag.Get("form") + if fieldName != "-" { + data["Err_"+field.Name] = true + + trName := field.Tag.Get("locale") + if len(trName) == 0 { + trName = l.Tr("form." + field.Name) + } else { + trName = l.Tr(trName) + } + + switch errs[0].Classification { + case binding.ERR_REQUIRED: + data["ErrorMsg"] = trName + l.Tr("form.require_error") + case binding.ERR_ALPHA_DASH: + data["ErrorMsg"] = trName + l.Tr("form.alpha_dash_error") + case binding.ERR_ALPHA_DASH_DOT: + data["ErrorMsg"] = trName + l.Tr("form.alpha_dash_dot_error") + case validation.ErrGitRefName: + data["ErrorMsg"] = trName + l.Tr("form.git_ref_name_error") + case binding.ERR_SIZE: + data["ErrorMsg"] = trName + l.Tr("form.size_error", GetSize(field)) + case binding.ERR_MIN_SIZE: + data["ErrorMsg"] = trName + l.Tr("form.min_size_error", GetMinSize(field)) + case binding.ERR_MAX_SIZE: + data["ErrorMsg"] = trName + l.Tr("form.max_size_error", GetMaxSize(field)) + case binding.ERR_EMAIL: + data["ErrorMsg"] = trName + l.Tr("form.email_error") + case binding.ERR_URL: + data["ErrorMsg"] = trName + l.Tr("form.url_error") + case binding.ERR_INCLUDE: + data["ErrorMsg"] = trName + l.Tr("form.include_error", GetInclude(field)) + case validation.ErrGlobPattern: + data["ErrorMsg"] = trName + l.Tr("form.glob_pattern_error", errs[0].Message) + case validation.ErrRegexPattern: + data["ErrorMsg"] = trName + l.Tr("form.regex_pattern_error", errs[0].Message) + default: + data["ErrorMsg"] = l.Tr("form.unknown_error") + " " + errs[0].Classification + } + return errs + } + } + return errs +} diff --git a/modules/web/middleware/cookie.go b/modules/web/middleware/cookie.go new file mode 100644 index 000000000..f44d2c368 --- /dev/null +++ b/modules/web/middleware/cookie.go @@ -0,0 +1,206 @@ +// Copyright 2020 The Macaron Authors +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package middleware + +import ( + "net/http" + "net/url" + "time" + + "code.gitea.io/gitea/modules/setting" +) + +// MaxAge sets the maximum age for a provided cookie +func MaxAge(maxAge int) func(*http.Cookie) { + return func(c *http.Cookie) { + c.MaxAge = maxAge + } +} + +// Path sets the path for a provided cookie +func Path(path string) func(*http.Cookie) { + return func(c *http.Cookie) { + c.Path = path + } +} + +// Domain sets the domain for a provided cookie +func Domain(domain string) func(*http.Cookie) { + return func(c *http.Cookie) { + c.Domain = domain + } +} + +// Secure sets the secure setting for a provided cookie +func Secure(secure bool) func(*http.Cookie) { + return func(c *http.Cookie) { + c.Secure = secure + } +} + +// HTTPOnly sets the HttpOnly setting for a provided cookie +func HTTPOnly(httpOnly bool) func(*http.Cookie) { + return func(c *http.Cookie) { + c.HttpOnly = httpOnly + } +} + +// Expires sets the expires and rawexpires for a provided cookie +func Expires(expires time.Time) func(*http.Cookie) { + return func(c *http.Cookie) { + c.Expires = expires + c.RawExpires = expires.Format(time.UnixDate) + } +} + +// SameSite sets the SameSite for a provided cookie +func SameSite(sameSite http.SameSite) func(*http.Cookie) { + return func(c *http.Cookie) { + c.SameSite = sameSite + } +} + +// NewCookie creates a cookie +func NewCookie(name, value string, maxAge int) *http.Cookie { + return &http.Cookie{ + Name: name, + Value: value, + HttpOnly: true, + Path: setting.SessionConfig.CookiePath, + Domain: setting.SessionConfig.Domain, + MaxAge: maxAge, + Secure: setting.SessionConfig.Secure, + } +} + +// SetRedirectToCookie convenience function to set the RedirectTo cookie consistently +func SetRedirectToCookie(resp http.ResponseWriter, value string) { + SetCookie(resp, "redirect_to", value, + 0, + setting.AppSubURL, + "", + setting.SessionConfig.Secure, + true, + SameSite(setting.SessionConfig.SameSite)) +} + +// DeleteRedirectToCookie convenience function to delete most cookies consistently +func DeleteRedirectToCookie(resp http.ResponseWriter) { + SetCookie(resp, "redirect_to", "", + -1, + setting.AppSubURL, + "", + setting.SessionConfig.Secure, + true, + SameSite(setting.SessionConfig.SameSite)) +} + +// DeleteSesionConfigPathCookie convenience function to delete SessionConfigPath cookies consistently +func DeleteSesionConfigPathCookie(resp http.ResponseWriter, name string) { + SetCookie(resp, name, "", + -1, + setting.SessionConfig.CookiePath, + setting.SessionConfig.Domain, + setting.SessionConfig.Secure, + true, + SameSite(setting.SessionConfig.SameSite)) +} + +// DeleteCSRFCookie convenience function to delete SessionConfigPath cookies consistently +func DeleteCSRFCookie(resp http.ResponseWriter) { + SetCookie(resp, setting.CSRFCookieName, "", + -1, + setting.SessionConfig.CookiePath, + setting.SessionConfig.Domain) // FIXME: Do we need to set the Secure, httpOnly and SameSite values too? +} + +// SetCookie set the cookies +// TODO: Copied from gitea.com/macaron/macaron and should be improved after macaron removed. +func SetCookie(resp http.ResponseWriter, name string, value string, others ...interface{}) { + cookie := http.Cookie{} + cookie.Name = name + cookie.Value = url.QueryEscape(value) + + if len(others) > 0 { + switch v := others[0].(type) { + case int: + cookie.MaxAge = v + case int64: + cookie.MaxAge = int(v) + case int32: + cookie.MaxAge = int(v) + case func(*http.Cookie): + v(&cookie) + } + } + + cookie.Path = "/" + if len(others) > 1 { + if v, ok := others[1].(string); ok && len(v) > 0 { + cookie.Path = v + } else if v, ok := others[1].(func(*http.Cookie)); ok { + v(&cookie) + } + } + + if len(others) > 2 { + if v, ok := others[2].(string); ok && len(v) > 0 { + cookie.Domain = v + } else if v, ok := others[2].(func(*http.Cookie)); ok { + v(&cookie) + } + } + + if len(others) > 3 { + switch v := others[3].(type) { + case bool: + cookie.Secure = v + case func(*http.Cookie): + v(&cookie) + default: + if others[3] != nil { + cookie.Secure = true + } + } + } + + if len(others) > 4 { + if v, ok := others[4].(bool); ok && v { + cookie.HttpOnly = true + } else if v, ok := others[4].(func(*http.Cookie)); ok { + v(&cookie) + } + } + + if len(others) > 5 { + if v, ok := others[5].(time.Time); ok { + cookie.Expires = v + cookie.RawExpires = v.Format(time.UnixDate) + } else if v, ok := others[5].(func(*http.Cookie)); ok { + v(&cookie) + } + } + + if len(others) > 6 { + for _, other := range others[6:] { + if v, ok := other.(func(*http.Cookie)); ok { + v(&cookie) + } + } + } + + resp.Header().Add("Set-Cookie", cookie.String()) +} + +// GetCookie returns given cookie value from request header. +func GetCookie(req *http.Request, name string) string { + cookie, err := req.Cookie(name) + if err != nil { + return "" + } + val, _ := url.QueryUnescape(cookie.Value) + return val +} diff --git a/modules/web/middleware/data.go b/modules/web/middleware/data.go new file mode 100644 index 000000000..7de686498 --- /dev/null +++ b/modules/web/middleware/data.go @@ -0,0 +1,10 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package middleware + +// DataStore represents a data store +type DataStore interface { + GetData() map[string]interface{} +} diff --git a/modules/web/middleware/flash.go b/modules/web/middleware/flash.go new file mode 100644 index 000000000..cd9b089b9 --- /dev/null +++ b/modules/web/middleware/flash.go @@ -0,0 +1,68 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package middleware + +import "net/url" + +// flashes enumerates all the flash types +const ( + SuccessFlash = "SuccessMsg" + ErrorFlash = "ErrorMsg" + WarnFlash = "WarningMsg" + InfoFlash = "InfoMsg" +) + +var ( + // FlashNow FIXME: + FlashNow bool +) + +// Flash represents a one time data transfer between two requests. +type Flash struct { + DataStore + url.Values + ErrorMsg, WarningMsg, InfoMsg, SuccessMsg string +} + +func (f *Flash) set(name, msg string, current ...bool) { + if f.Values == nil { + f.Values = make(map[string][]string) + } + isShow := false + if (len(current) == 0 && FlashNow) || + (len(current) > 0 && current[0]) { + isShow = true + } + + if isShow { + f.GetData()["Flash"] = f + } else { + f.Set(name, msg) + } +} + +// Error sets error message +func (f *Flash) Error(msg string, current ...bool) { + f.ErrorMsg = msg + f.set("error", msg, current...) +} + +// Warning sets warning message +func (f *Flash) Warning(msg string, current ...bool) { + f.WarningMsg = msg + f.set("warning", msg, current...) +} + +// Info sets info message +func (f *Flash) Info(msg string, current ...bool) { + f.InfoMsg = msg + f.set("info", msg, current...) +} + +// Success sets success message +func (f *Flash) Success(msg string, current ...bool) { + f.SuccessMsg = msg + f.set("success", msg, current...) +} diff --git a/modules/web/middleware/locale.go b/modules/web/middleware/locale.go new file mode 100644 index 000000000..ede38ef93 --- /dev/null +++ b/modules/web/middleware/locale.go @@ -0,0 +1,72 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package middleware + +import ( + "net/http" + + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/translation" + + "github.com/unknwon/i18n" + "golang.org/x/text/language" +) + +// Locale handle locale +func Locale(resp http.ResponseWriter, req *http.Request) translation.Locale { + // 1. Check URL arguments. + lang := req.URL.Query().Get("lang") + var changeLang = lang != "" + + // 2. Get language information from cookies. + if len(lang) == 0 { + ck, _ := req.Cookie("lang") + if ck != nil { + lang = ck.Value + } + } + + // Check again in case someone modify by purpose. + if lang != "" && !i18n.IsExist(lang) { + lang = "" + changeLang = false + } + + // 3. Get language information from 'Accept-Language'. + // The first element in the list is chosen to be the default language automatically. + if len(lang) == 0 { + tags, _, _ := language.ParseAcceptLanguage(req.Header.Get("Accept-Language")) + tag := translation.Match(tags...) + lang = tag.String() + } + + if changeLang { + SetLocaleCookie(resp, lang, 1<<31-1) + } + + return translation.NewLocale(lang) +} + +// SetLocaleCookie convenience function to set the locale cookie consistently +func SetLocaleCookie(resp http.ResponseWriter, lang string, expiry int) { + SetCookie(resp, "lang", lang, expiry, + setting.AppSubURL, + setting.SessionConfig.Domain, + setting.SessionConfig.Secure, + true, + SameSite(setting.SessionConfig.SameSite)) +} + +// DeleteLocaleCookie convenience function to delete the locale cookie consistently +// Setting the lang cookie will trigger the middleware to reset the language ot previous state. +func DeleteLocaleCookie(resp http.ResponseWriter) { + SetCookie(resp, "lang", "", + -1, + setting.AppSubURL, + setting.SessionConfig.Domain, + setting.SessionConfig.Secure, + true, + SameSite(setting.SessionConfig.SameSite)) +} diff --git a/modules/web/middleware/request.go b/modules/web/middleware/request.go new file mode 100644 index 000000000..f620da5ee --- /dev/null +++ b/modules/web/middleware/request.go @@ -0,0 +1,20 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package middleware + +import ( + "net/http" + "strings" +) + +// IsAPIPath returns true if the specified URL is an API path +func IsAPIPath(req *http.Request) bool { + return strings.HasPrefix(req.URL.Path, "/api/") +} + +// IsInternalPath returns true if the specified URL is an internal API path +func IsInternalPath(req *http.Request) bool { + return strings.HasPrefix(req.URL.Path, "/api/internal/") +} diff --git a/modules/web/route.go b/modules/web/route.go new file mode 100644 index 000000000..3c6513da6 --- /dev/null +++ b/modules/web/route.go @@ -0,0 +1,373 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package web + +import ( + goctx "context" + "fmt" + "net/http" + "reflect" + "strings" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web/middleware" + + "gitea.com/go-chi/binding" + "github.com/go-chi/chi" +) + +// Wrap converts all kinds of routes to standard library one +func Wrap(handlers ...interface{}) http.HandlerFunc { + if len(handlers) == 0 { + panic("No handlers found") + } + + for _, handler := range handlers { + switch t := handler.(type) { + case http.HandlerFunc, func(http.ResponseWriter, *http.Request), + func(ctx *context.Context), + func(ctx *context.Context) goctx.CancelFunc, + func(*context.APIContext), + func(*context.PrivateContext), + func(http.Handler) http.Handler: + default: + panic(fmt.Sprintf("Unsupported handler type: %#v", t)) + } + } + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + for i := 0; i < len(handlers); i++ { + handler := handlers[i] + switch t := handler.(type) { + case http.HandlerFunc: + t(resp, req) + if r, ok := resp.(context.ResponseWriter); ok && r.Status() > 0 { + return + } + case func(http.ResponseWriter, *http.Request): + t(resp, req) + if r, ok := resp.(context.ResponseWriter); ok && r.Status() > 0 { + return + } + case func(ctx *context.Context) goctx.CancelFunc: + ctx := context.GetContext(req) + cancel := t(ctx) + if cancel != nil { + defer cancel() + } + if ctx.Written() { + return + } + case func(ctx *context.Context): + ctx := context.GetContext(req) + t(ctx) + if ctx.Written() { + return + } + case func(*context.APIContext): + ctx := context.GetAPIContext(req) + t(ctx) + if ctx.Written() { + return + } + case func(*context.PrivateContext): + ctx := context.GetPrivateContext(req) + t(ctx) + if ctx.Written() { + return + } + case func(http.Handler) http.Handler: + var next = http.HandlerFunc(func(http.ResponseWriter, *http.Request) {}) + if len(handlers) > i+1 { + next = Wrap(handlers[i+1:]...) + } + t(next).ServeHTTP(resp, req) + return + default: + panic(fmt.Sprintf("Unsupported handler type: %#v", t)) + } + } + }) +} + +// Middle wrap a context function as a chi middleware +func Middle(f func(ctx *context.Context)) func(netx http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + ctx := context.GetContext(req) + f(ctx) + if ctx.Written() { + return + } + next.ServeHTTP(ctx.Resp, ctx.Req) + }) + } +} + +// MiddleCancel wrap a context function as a chi middleware +func MiddleCancel(f func(ctx *context.Context) goctx.CancelFunc) func(netx http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + ctx := context.GetContext(req) + cancel := f(ctx) + if cancel != nil { + defer cancel() + } + if ctx.Written() { + return + } + next.ServeHTTP(ctx.Resp, ctx.Req) + }) + } +} + +// MiddleAPI wrap a context function as a chi middleware +func MiddleAPI(f func(ctx *context.APIContext)) func(netx http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + ctx := context.GetAPIContext(req) + f(ctx) + if ctx.Written() { + return + } + next.ServeHTTP(ctx.Resp, ctx.Req) + }) + } +} + +// Bind binding an obj to a handler +func Bind(obj interface{}) http.HandlerFunc { + var tp = reflect.TypeOf(obj) + if tp.Kind() == reflect.Ptr { + tp = tp.Elem() + } + if tp.Kind() != reflect.Struct { + panic("Only structs are allowed to bind") + } + return Wrap(func(ctx *context.Context) { + var theObj = reflect.New(tp).Interface() // create a new form obj for every request but not use obj directly + binding.Bind(ctx.Req, theObj) + SetForm(ctx, theObj) + middleware.AssignForm(theObj, ctx.Data) + }) +} + +// SetForm set the form object +func SetForm(data middleware.DataStore, obj interface{}) { + data.GetData()["__form"] = obj +} + +// GetForm returns the validate form information +func GetForm(data middleware.DataStore) interface{} { + return data.GetData()["__form"] +} + +// Route defines a route based on chi's router +type Route struct { + R chi.Router + curGroupPrefix string + curMiddlewares []interface{} +} + +// NewRoute creates a new route +func NewRoute() *Route { + r := chi.NewRouter() + return &Route{ + R: r, + curGroupPrefix: "", + curMiddlewares: []interface{}{}, + } +} + +// Use supports two middlewares +func (r *Route) Use(middlewares ...interface{}) { + if r.curGroupPrefix != "" { + r.curMiddlewares = append(r.curMiddlewares, middlewares...) + } else { + for _, middle := range middlewares { + switch t := middle.(type) { + case func(http.Handler) http.Handler: + r.R.Use(t) + case func(*context.Context): + r.R.Use(Middle(t)) + case func(*context.Context) goctx.CancelFunc: + r.R.Use(MiddleCancel(t)) + case func(*context.APIContext): + r.R.Use(MiddleAPI(t)) + default: + panic(fmt.Sprintf("Unsupported middleware type: %#v", t)) + } + } + } +} + +// Group mounts a sub-Router along a `pattern` string. +func (r *Route) Group(pattern string, fn func(), middlewares ...interface{}) { + var previousGroupPrefix = r.curGroupPrefix + var previousMiddlewares = r.curMiddlewares + r.curGroupPrefix += pattern + r.curMiddlewares = append(r.curMiddlewares, middlewares...) + + fn() + + r.curGroupPrefix = previousGroupPrefix + r.curMiddlewares = previousMiddlewares +} + +func (r *Route) getPattern(pattern string) string { + newPattern := r.curGroupPrefix + pattern + if !strings.HasPrefix(newPattern, "/") { + newPattern = "/" + newPattern + } + if newPattern == "/" { + return newPattern + } + return strings.TrimSuffix(newPattern, "/") +} + +// Mount attaches another Route along ./pattern/* +func (r *Route) Mount(pattern string, subR *Route) { + var middlewares = make([]interface{}, len(r.curMiddlewares)) + copy(middlewares, r.curMiddlewares) + subR.Use(middlewares...) + r.R.Mount(r.getPattern(pattern), subR.R) +} + +// Any delegate requests for all methods +func (r *Route) Any(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.HandleFunc(r.getPattern(pattern), Wrap(middlewares...)) +} + +// Route delegate special methods +func (r *Route) Route(pattern string, methods string, h ...interface{}) { + p := r.getPattern(pattern) + ms := strings.Split(methods, ",") + var middlewares = r.getMiddlewares(h) + for _, method := range ms { + r.R.MethodFunc(strings.TrimSpace(method), p, Wrap(middlewares...)) + } +} + +// Delete delegate delete method +func (r *Route) Delete(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Delete(r.getPattern(pattern), Wrap(middlewares...)) +} + +func (r *Route) getMiddlewares(h []interface{}) []interface{} { + var middlewares = make([]interface{}, len(r.curMiddlewares), len(r.curMiddlewares)+len(h)) + copy(middlewares, r.curMiddlewares) + middlewares = append(middlewares, h...) + return middlewares +} + +// Get delegate get method +func (r *Route) Get(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Get(r.getPattern(pattern), Wrap(middlewares...)) +} + +// Options delegate options method +func (r *Route) Options(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Options(r.getPattern(pattern), Wrap(middlewares...)) +} + +// GetOptions delegate get and options method +func (r *Route) GetOptions(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Get(r.getPattern(pattern), Wrap(middlewares...)) + r.R.Options(r.getPattern(pattern), Wrap(middlewares...)) +} + +// PostOptions delegate post and options method +func (r *Route) PostOptions(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Post(r.getPattern(pattern), Wrap(middlewares...)) + r.R.Options(r.getPattern(pattern), Wrap(middlewares...)) +} + +// Head delegate head method +func (r *Route) Head(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Head(r.getPattern(pattern), Wrap(middlewares...)) +} + +// Post delegate post method +func (r *Route) Post(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Post(r.getPattern(pattern), Wrap(middlewares...)) +} + +// Put delegate put method +func (r *Route) Put(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Put(r.getPattern(pattern), Wrap(middlewares...)) +} + +// Patch delegate patch method +func (r *Route) Patch(pattern string, h ...interface{}) { + var middlewares = r.getMiddlewares(h) + r.R.Patch(r.getPattern(pattern), Wrap(middlewares...)) +} + +// ServeHTTP implements http.Handler +func (r *Route) ServeHTTP(w http.ResponseWriter, req *http.Request) { + r.R.ServeHTTP(w, req) +} + +// NotFound defines a handler to respond whenever a route could +// not be found. +func (r *Route) NotFound(h http.HandlerFunc) { + r.R.NotFound(h) +} + +// MethodNotAllowed defines a handler to respond whenever a method is +// not allowed. +func (r *Route) MethodNotAllowed(h http.HandlerFunc) { + r.R.MethodNotAllowed(h) +} + +// Combo deletegate requests to Combo +func (r *Route) Combo(pattern string, h ...interface{}) *Combo { + return &Combo{r, pattern, h} +} + +// Combo represents a tiny group routes with same pattern +type Combo struct { + r *Route + pattern string + h []interface{} +} + +// Get deletegate Get method +func (c *Combo) Get(h ...interface{}) *Combo { + c.r.Get(c.pattern, append(c.h, h...)...) + return c +} + +// Post deletegate Post method +func (c *Combo) Post(h ...interface{}) *Combo { + c.r.Post(c.pattern, append(c.h, h...)...) + return c +} + +// Delete deletegate Delete method +func (c *Combo) Delete(h ...interface{}) *Combo { + c.r.Delete(c.pattern, append(c.h, h...)...) + return c +} + +// Put deletegate Put method +func (c *Combo) Put(h ...interface{}) *Combo { + c.r.Put(c.pattern, append(c.h, h...)...) + return c +} + +// Patch deletegate Patch method +func (c *Combo) Patch(h ...interface{}) *Combo { + c.r.Patch(c.pattern, append(c.h, h...)...) + return c +} diff --git a/modules/web/route_test.go b/modules/web/route_test.go new file mode 100644 index 000000000..03955f0f2 --- /dev/null +++ b/modules/web/route_test.go @@ -0,0 +1,169 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package web + +import ( + "bytes" + "net/http" + "net/http/httptest" + "testing" + + "github.com/go-chi/chi" + "github.com/stretchr/testify/assert" +) + +func TestRoute1(t *testing.T) { + buff := bytes.NewBufferString("") + recorder := httptest.NewRecorder() + recorder.Body = buff + + r := NewRoute() + r.Get("/{username}/{reponame}/{type:issues|pulls}", func(resp http.ResponseWriter, req *http.Request) { + username := chi.URLParam(req, "username") + assert.EqualValues(t, "gitea", username) + reponame := chi.URLParam(req, "reponame") + assert.EqualValues(t, "gitea", reponame) + tp := chi.URLParam(req, "type") + assert.EqualValues(t, "issues", tp) + }) + + req, err := http.NewRequest("GET", "http://localhost:8000/gitea/gitea/issues", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) +} + +func TestRoute2(t *testing.T) { + buff := bytes.NewBufferString("") + recorder := httptest.NewRecorder() + recorder.Body = buff + + var route int + + r := NewRoute() + r.Group("/{username}/{reponame}", func() { + r.Group("", func() { + r.Get("/{type:issues|pulls}", func(resp http.ResponseWriter, req *http.Request) { + username := chi.URLParam(req, "username") + assert.EqualValues(t, "gitea", username) + reponame := chi.URLParam(req, "reponame") + assert.EqualValues(t, "gitea", reponame) + tp := chi.URLParam(req, "type") + assert.EqualValues(t, "issues", tp) + route = 0 + }) + + r.Get("/{type:issues|pulls}/{index}", func(resp http.ResponseWriter, req *http.Request) { + username := chi.URLParam(req, "username") + assert.EqualValues(t, "gitea", username) + reponame := chi.URLParam(req, "reponame") + assert.EqualValues(t, "gitea", reponame) + tp := chi.URLParam(req, "type") + assert.EqualValues(t, "issues", tp) + index := chi.URLParam(req, "index") + assert.EqualValues(t, "1", index) + route = 1 + }) + }, func(resp http.ResponseWriter, req *http.Request) { + resp.WriteHeader(200) + }) + + r.Group("/issues/{index}", func() { + r.Get("/view", func(resp http.ResponseWriter, req *http.Request) { + username := chi.URLParam(req, "username") + assert.EqualValues(t, "gitea", username) + reponame := chi.URLParam(req, "reponame") + assert.EqualValues(t, "gitea", reponame) + index := chi.URLParam(req, "index") + assert.EqualValues(t, "1", index) + route = 2 + }) + }) + }) + + req, err := http.NewRequest("GET", "http://localhost:8000/gitea/gitea/issues", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) + assert.EqualValues(t, 0, route) + + req, err = http.NewRequest("GET", "http://localhost:8000/gitea/gitea/issues/1", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) + assert.EqualValues(t, 1, route) + + req, err = http.NewRequest("GET", "http://localhost:8000/gitea/gitea/issues/1/view", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) + assert.EqualValues(t, 2, route) +} + +func TestRoute3(t *testing.T) { + buff := bytes.NewBufferString("") + recorder := httptest.NewRecorder() + recorder.Body = buff + + var route int + + m := NewRoute() + r := NewRoute() + r.Mount("/api/v1", m) + + m.Group("/repos", func() { + m.Group("/{username}/{reponame}", func() { + m.Group("/branch_protections", func() { + m.Get("", func(resp http.ResponseWriter, req *http.Request) { + route = 0 + }) + m.Post("", func(resp http.ResponseWriter, req *http.Request) { + route = 1 + }) + m.Group("/{name}", func() { + m.Get("", func(resp http.ResponseWriter, req *http.Request) { + route = 2 + }) + m.Patch("", func(resp http.ResponseWriter, req *http.Request) { + route = 3 + }) + m.Delete("", func(resp http.ResponseWriter, req *http.Request) { + route = 4 + }) + }) + }) + }) + }) + + req, err := http.NewRequest("GET", "http://localhost:8000/api/v1/repos/gitea/gitea/branch_protections", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) + assert.EqualValues(t, 0, route) + + req, err = http.NewRequest("POST", "http://localhost:8000/api/v1/repos/gitea/gitea/branch_protections", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code, http.StatusOK) + assert.EqualValues(t, 1, route) + + req, err = http.NewRequest("GET", "http://localhost:8000/api/v1/repos/gitea/gitea/branch_protections/master", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) + assert.EqualValues(t, 2, route) + + req, err = http.NewRequest("PATCH", "http://localhost:8000/api/v1/repos/gitea/gitea/branch_protections/master", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) + assert.EqualValues(t, 3, route) + + req, err = http.NewRequest("DELETE", "http://localhost:8000/api/v1/repos/gitea/gitea/branch_protections/master", nil) + assert.NoError(t, err) + r.ServeHTTP(recorder, req) + assert.EqualValues(t, http.StatusOK, recorder.Code) + assert.EqualValues(t, 4, route) +} diff --git a/options/gitignore/AltiumDesigner b/options/gitignore/AltiumDesigner new file mode 100644 index 000000000..5e410492c --- /dev/null +++ b/options/gitignore/AltiumDesigner @@ -0,0 +1,20 @@ +# For PCBs designed using Altium Designer +# Website: https://www.altium.com/altium-designer/ + +# Directories containing cache data +History +__Previews + +# Directories containing logs and generated outputs +Project\ Logs* +Project\ Outputs* + +# Misc files generated by altium +debug.log +Status\ Report.txt +*.PcbDoc.htm +*.SchDocPreview +*.PcbDocPreview + +# Lock files sometimes left behind +.~lock.* diff --git a/options/gitignore/Android b/options/gitignore/Android index 23de6e20a..5d18272eb 100644 --- a/options/gitignore/Android +++ b/options/gitignore/Android @@ -44,6 +44,7 @@ captures/ .idea/assetWizardSettings.xml .idea/dictionaries .idea/libraries +.idea/jarRepositories.xml # Android Studio 3 in .gitignore file. .idea/caches .idea/modules.xml diff --git a/options/gitignore/Autotools b/options/gitignore/Autotools index f2c137d04..617156f81 100644 --- a/options/gitignore/Autotools +++ b/options/gitignore/Autotools @@ -16,6 +16,7 @@ autom4te.cache /autoscan-*.log /aclocal.m4 /compile +/config.cache /config.guess /config.h.in /config.log @@ -44,8 +45,8 @@ m4/ltsugar.m4 m4/ltversion.m4 m4/lt~obsolete.m4 -# Generated Makefile -# (meta build system like autotools, +# Generated Makefile +# (meta build system like autotools, # can automatically generate from config.status script # (which is called by configure script)) Makefile diff --git a/options/gitignore/Coq b/options/gitignore/Coq index 829ac44a1..66596b22e 100644 --- a/options/gitignore/Coq +++ b/options/gitignore/Coq @@ -10,6 +10,7 @@ *.glob *.ml.d *.ml4.d +*.mlg.d *.mli.d *.mllib.d *.mlpack.d @@ -20,7 +21,7 @@ *.vo *.vok *.vos -.coq-native/ +.coq-native .csdp.cache .lia.cache .nia.cache @@ -31,6 +32,7 @@ lia.cache nia.cache nlia.cache nra.cache +native_compute_profile_*.data # generated timing files *.timing.diff diff --git a/options/gitignore/Dart b/options/gitignore/Dart index 6d21af37c..3a83c2f08 100644 --- a/options/gitignore/Dart +++ b/options/gitignore/Dart @@ -11,6 +11,9 @@ pubspec.lock # If you don't generate documentation locally you can remove this line. doc/api/ +# dotenv environment variables file +.env* + # Avoid committing generated Javascript files: *.dart.js *.info.json # Produced by the --dump-info flag. diff --git a/options/gitignore/Gradle b/options/gitignore/Gradle index 8d68edc97..85888bb2e 100644 --- a/options/gitignore/Gradle +++ b/options/gitignore/Gradle @@ -10,6 +10,3 @@ gradle-app.setting # Cache of project .gradletasknamecache - -# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 -# gradle/wrapper/gradle-wrapper.properties diff --git a/options/gitignore/Gretl b/options/gitignore/Gretl new file mode 100644 index 000000000..582489e54 --- /dev/null +++ b/options/gitignore/Gretl @@ -0,0 +1,8 @@ +# gitignore template for Gretl +# website: http://gretl.sourceforge.net/ + +# Auto-generated log file is overwritten whenever you start a new session +session.inp + +# Auto-generated temporary string code table +string_table.txt diff --git a/options/gitignore/IAR_EWARM b/options/gitignore/IAR_EWARM index 13ed9a0b1..2f04d86da 100644 --- a/options/gitignore/IAR_EWARM +++ b/options/gitignore/IAR_EWARM @@ -1,5 +1,5 @@ # gitignore template for the IAR EWARM -# website: https://www.iar.com/ +# website: https://www.iar.com/knowledge/support/technical-notes/ide/which-files-should-be-version-controlled/ # Some tools will put the EWARM files # under a subdirectory with the same name @@ -11,7 +11,7 @@ EWARM/**/Obj EWARM/**/List EWARM/**/Exe -# Autogenerated project files +# Autogenerated project files *.dep *.ewt diff --git a/options/gitignore/JetBrains b/options/gitignore/JetBrains index 8da0824ba..0a16fa718 100644 --- a/options/gitignore/JetBrains +++ b/options/gitignore/JetBrains @@ -8,6 +8,9 @@ .idea/**/dictionaries .idea/**/shelf +# AWS User-specific +.idea/**/aws.xml + # Generated files .idea/**/contentModel.xml diff --git a/options/gitignore/Magento2 b/options/gitignore/Magento2 index b6b7860a8..98329d7bd 100644 --- a/options/gitignore/Magento2 +++ b/options/gitignore/Magento2 @@ -18,7 +18,7 @@ /.php_cs.cache /grunt-config.json /dev/tools/grunt/configs/local-themes.js - + /pub/media/*.* !/pub/media/.htaccess /pub/media/attribute/* @@ -45,7 +45,7 @@ !/pub/media/captcha/.htaccess /pub/static/* !/pub/static/.htaccess - + /var/* !/var/.htaccess /vendor/* diff --git a/options/gitignore/NasaSpecsIntact b/options/gitignore/NasaSpecsIntact new file mode 100644 index 000000000..be53af0e0 --- /dev/null +++ b/options/gitignore/NasaSpecsIntact @@ -0,0 +1,40 @@ +# gitignore template for Nasa SpecsIntact (SI) +# Website: https://specsintact.ksc.nasa.gov/ +# +# Recommended: +# MicrosoftOffice.gitignore +# + +# SpecsIntact (SI) Locking file; this would lock everyone out. +*.se$ + +# SI Reports; auto-generated. They do not belong in the repository +# as they will be re-created exactly when using a specific checkout point. +*.RPT +ADDRVER.* +BRKTVER.* +DUPEREF.* +REFVER.* +SECTVER.* +SUBMVER.* +TTLDIFFS.* + +# SpecsIntact files that change a lot and don't actually affect SI +# PULL.TBL is an auto-generated file to help speed SI loading. +PULL.TBL +pulltbl.bck + +# Tailoring information. +# Keep tailor.tag; it is a list of tailoring options in SI. + +# JOB.OTL informs SI where a spec section came from. +# Keeping the old one isn't useful in git. +JOB.OTL.OLD + +# OneNote TOC Files; SI Work Directories may be installed in a location co-located with OneNote +# notebooks, and if so, OneNote will litter the SI folder with these. +*.onetoc* + +# Log files, typically tagfix or other auto generated logs that aren't useful +# outside of the user that made them and clutter up the index. +*.log diff --git a/options/gitignore/Node b/options/gitignore/Node index 1f22b9c26..0125458e1 100644 --- a/options/gitignore/Node +++ b/options/gitignore/Node @@ -5,6 +5,7 @@ npm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* +.pnpm-debug.log* # Diagnostic reports (https://nodejs.org/api/report.html) report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json @@ -71,6 +72,7 @@ web_modules/ # dotenv environment variables file .env .env.test +.env.production # parcel-bundler cache (https://parceljs.org/) .cache diff --git a/options/gitignore/OpenSSL b/options/gitignore/OpenSSL index feb95a9f7..732b1f165 100644 --- a/options/gitignore/OpenSSL +++ b/options/gitignore/OpenSSL @@ -10,7 +10,7 @@ *.csr ## Certificate -*.der +*.der ## Key database file *.kdb diff --git a/options/gitignore/Qt b/options/gitignore/Qt index 101354027..7f4826b46 100644 --- a/options/gitignore/Qt +++ b/options/gitignore/Qt @@ -45,7 +45,7 @@ target_wrapper.* # QtCreator CMake CMakeLists.txt.user* -# QtCreator 4.8< compilation database +# QtCreator 4.8< compilation database compile_commands.json # QtCreator local machine specific files for imported projects diff --git a/options/gitignore/ROS2 b/options/gitignore/ROS2 new file mode 100644 index 000000000..6cc824d8e --- /dev/null +++ b/options/gitignore/ROS2 @@ -0,0 +1,29 @@ +install/ +log/ +build/ + +# Ignore generated docs +*.dox +*.wikidoc + +# eclipse stuff +.project +.cproject + +# qcreator stuff +CMakeLists.txt.user + +srv/_*.py +*.pcd +*.pyc +qtcreator-* +*.user + +*~ + +# Emacs +.#* + +# Colcon custom files +COLCON_IGNORE +AMENT_IGNORE diff --git a/options/gitignore/Rust b/options/gitignore/Rust index ff47c2d77..6985cf1bd 100644 --- a/options/gitignore/Rust +++ b/options/gitignore/Rust @@ -9,3 +9,6 @@ Cargo.lock # These are backup files generated by rustfmt **/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb diff --git a/options/gitignore/SPFx b/options/gitignore/SPFx new file mode 100644 index 000000000..5a66b3419 --- /dev/null +++ b/options/gitignore/SPFx @@ -0,0 +1,33 @@ +#SharePoint Framework (SPFx) +# Logs +logs +*.log +npm-debug.log* + +# Dependency directories +node_modules + +# Build generated files +dist +lib +solution +temp +*.sppkg + +# Coverage directory used by tools like istanbul +coverage + +# OSX +.DS_Store + +# Visual Studio files +.ntvs_analysis.dat +.vs +bin +obj + +# Resx Generated Code +*.resx.ts + +# Styles Generated Code +*.scss.ts diff --git a/options/gitignore/Scala b/options/gitignore/Scala index 9c07d4ae9..7169cab19 100644 --- a/options/gitignore/Scala +++ b/options/gitignore/Scala @@ -1,2 +1,5 @@ *.class *.log + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* diff --git a/options/gitignore/Strapi b/options/gitignore/Strapi new file mode 100644 index 000000000..70e654259 --- /dev/null +++ b/options/gitignore/Strapi @@ -0,0 +1,135 @@ +############################ +# OS X +############################ + +.DS_Store +.AppleDouble +.LSOverride +Icon +.Spotlight-V100 +.Trashes +._* + + +############################ +# Linux +############################ + +*~ + + +############################ +# Windows +############################ + +Thumbs.db +ehthumbs.db +Desktop.ini +$RECYCLE.BIN/ +*.cab +*.msi +*.msm +*.msp + + +############################ +# Packages +############################ + +*.7z +*.csv +*.dat +*.dmg +*.gz +*.iso +*.jar +*.rar +*.tar +*.zip +*.com +*.class +*.dll +*.exe +*.o +*.seed +*.so +*.swo +*.swp +*.swn +*.swm +*.out +*.pid + + +############################ +# Logs and databases +############################ + +.tmp +*.log +*.sql +*.sqlite + + +############################ +# Misc. +############################ + +*# +.idea +nbproject +.vscode/ + + +############################ +# Node.js +############################ + +lib-cov +lcov.info +pids +logs +results +build +node_modules +.node_history +package-lock.json +**/package-lock.json +!docs/package-lock.json +*.heapsnapshot + + +############################ +# Tests +############################ + +testApp +coverage +cypress/screenshots +cypress/videos + + +############################ +# Documentation +############################ + +dist + +############################ +# Builds +############################ + +packages/strapi-generate-new/files/public/ + +############################ +# Example app +############################ + +.dev +# *.cache + +############################ +# Visual Studio Code +############################ + +front-workspace.code-workspace diff --git a/options/gitignore/TeX b/options/gitignore/TeX index 8a42ebbd9..237f49eba 100644 --- a/options/gitignore/TeX +++ b/options/gitignore/TeX @@ -120,6 +120,7 @@ acs-*.bib # gregoriotex *.gaux +*.glog *.gtex # htlatex @@ -166,6 +167,9 @@ _minted* # morewrites *.mw +# newpax +*.newpax + # nomencl *.nlg *.nlo diff --git a/options/gitignore/Terraform b/options/gitignore/Terraform index beb38d84d..18221f8eb 100644 --- a/options/gitignore/Terraform +++ b/options/gitignore/Terraform @@ -9,8 +9,8 @@ crash.log # Exclude all .tfvars files, which are likely to contain sentitive data, such as -# password, private keys, and other secrets. These should not be part of version -# control as they are data points which are potentially sensitive and subject +# password, private keys, and other secrets. These should not be part of version +# control as they are data points which are potentially sensitive and subject # to change depending on the environment. # *.tfvars diff --git a/options/gitignore/TwinCAT3 b/options/gitignore/TwinCAT3 new file mode 100644 index 000000000..7bd6f8750 --- /dev/null +++ b/options/gitignore/TwinCAT3 @@ -0,0 +1,25 @@ +# gitignore template for TwinCAT3 +# website: https://www.beckhoff.com/twincat3/ +# +# Recommended: VisualStudio.gitignore + +# TwinCAT files +*.tpy +*.tclrs +*.compiled-library +*.compileinfo +# Don't include the tmc-file rule if either of the following is true: +# 1. You've got TwinCAT C++ projects, as the information in the TMC-file is created manually for the C++ projects (in that case, only (manually) ignore the tmc-files for the PLC projects) +# 2. You've created a standalone PLC-project and added events to it, as these are stored in the TMC-file. +*.tmc +*.tmcRefac +*.library +*.project.~u +*.tsproj.bak +*.xti.bak +LineIDs.dbg +LineIDs.dbg.bak +_Boot/ +_CompileInfo/ +_Libraries/ +_ModuleInstall/ \ No newline at end of file diff --git a/options/gitignore/Umbraco b/options/gitignore/Umbraco index c28684576..1f186d0ff 100644 --- a/options/gitignore/Umbraco +++ b/options/gitignore/Umbraco @@ -14,10 +14,10 @@ # Ignore Umbraco content cache file **/App_Data/umbraco.config -## this [Uu]mbraco/ folder should be created by cmd like `Install-Package UmbracoCms -Version 8.5.3` -## you can find your umbraco version at your Web.config. (i.e. ) +## this [Uu]mbraco/ folder should be created by cmd like `Install-Package UmbracoCms -Version 8.5.3` +## you can find your Umbraco version in your Web.config. (i.e. ) ## Uncomment this line if you think it fits the way you work on your project. -## **/[Uu]mbraco/ +## **/[Uu]mbraco/ # Don't ignore Umbraco packages (VisualStudio.gitignore mistakes this for a NuGet packages folder) # Make sure to include details from VisualStudio.gitignore BEFORE this @@ -29,4 +29,4 @@ **/App_Data/cache/ # Ignore the Models Builder models out of date flag -**/App_Data/Models/ood.flag +**/ood.flag diff --git a/options/gitignore/V b/options/gitignore/V new file mode 100644 index 000000000..dbbb0462f --- /dev/null +++ b/options/gitignore/V @@ -0,0 +1,11 @@ +*.exe +*.o +*.so +*.tmp.c +*.exp +*.ilk +*.pdb +*.dll +*.lib +*.bak +*.out diff --git a/options/gitignore/VisualStudio b/options/gitignore/VisualStudio index 1ee53850b..34c8dee45 100644 --- a/options/gitignore/VisualStudio +++ b/options/gitignore/VisualStudio @@ -90,6 +90,7 @@ StyleCopReport.xml *.tmp_proj *_wpftmp.csproj *.log +*.tlog *.vspscc *.vssscc .builds @@ -205,6 +206,9 @@ PublishScripts/ *.nuget.props *.nuget.targets +# Nuget personal access tokens and Credentials +nuget.config + # Microsoft Azure Build Output csx/ *.build.csdef @@ -360,3 +364,25 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +.idea/ +*.sln.iml diff --git a/options/gitignore/Xojo b/options/gitignore/Xojo index 1b036dd4f..4915783bf 100644 --- a/options/gitignore/Xojo +++ b/options/gitignore/Xojo @@ -8,4 +8,4 @@ Debug*/Debug*.exe Debug*/Debug*\ Libs *.rbuistate *.xojo_uistate -*.obsolete +*.obsolete* diff --git a/options/license/0BSD b/options/license/0BSD index e9d84aeb4..0b8ae762b 100644 --- a/options/license/0BSD +++ b/options/license/0BSD @@ -1,12 +1,5 @@ -Copyright (C) 2006 by Rob Landley +Copyright (C) YEAR by AUTHOR EMAIL -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted. +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/AAL b/options/license/AAL index 781ca0e7a..11ee9d9d8 100644 --- a/options/license/AAL +++ b/options/license/AAL @@ -1,49 +1,23 @@ -Attribution Assurance License Copyright (c) 2002 by AUTHOR PROFESSIONAL IDENTIFICATION -* URL "PROMOTIONAL SLOGAN FOR AUTHOR'S PROFESSIONAL PRACTICE" +Attribution Assurance License -All Rights Reserved ATTRIBUTION ASSURANCE LICENSE (adapted from the original -BSD license) +Copyright (c) 2002 by AUTHOR PROFESSIONAL IDENTIFICATION * URL "PROMOTIONAL SLOGAN FOR AUTHOR'S PROFESSIONAL PRACTICE" -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the conditions below are met. These conditions -require a modest attribution to (the "Author"), who hopes that its -promotional value may help justify the thousands of dollars in otherwise billable -time invested in writing this and other freely available, open-source software. +All Rights Reserved -1. Redistributions of source code, in whole or part and with or without modification -(the "Code"), must prominently display this GPG-signed text in verifiable -form. +ATTRIBUTION ASSURANCE LICENSE (adapted from the original BSD license) -2. Redistributions of the Code in binary form must be accompanied by this -GPG-signed text in any documentation and, each time the resulting executable -program or a program dependent thereon is launched, a prominent display (e.g., -splash screen or banner text) of the Author's attribution information, which -includes: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the conditions below are met. These conditions require a modest attribution to (the "Author"), who hopes that its promotional value may help justify the thousands of dollars in otherwise billable time invested in writing this and other freely available, open-source software. - (a) Name ("AUTHOR"), +1. Redistributions of source code, in whole or part and with or without modification (the "Code"), must prominently display this GPG-signed text in verifiable form. - (b) Professional identification ("PROFESSIONAL IDENTIFICATION"), and +2. Redistributions of the Code in binary form must be accompanied by this GPG-signed text in any documentation and, each time the resulting executable program or a program dependent thereon is launched, a prominent display (e.g., splash screen or banner text) of the Author's attribution information, which includes: - (c) URL ("URL"). + (a) Name ("AUTHOR"), + (b) Professional identification ("PROFESSIONAL IDENTIFICATION"), and + (c) URL ("URL"). -3. Neither the name nor any trademark of the Author may be used to endorse -or promote products derived from this software without specific prior written -permission. +3. Neither the name nor any trademark of the Author may be used to endorse or promote products derived from this software without specific prior written permission. -4. Users are entirely responsible, to the exclusion of the Author and any -other persons, for compliance with (1) regulations set by owners or administrators -of employed equipment, (2) licensing terms of any other software, and (3) -local regulations regarding use, including those regarding import, export, -and use of encryption software. +4. Users are entirely responsible, to the exclusion of the Author and any other persons, for compliance with (1) regulations set by owners or administrators of employed equipment, (2) licensing terms of any other software, and (3) local regulations regarding use, including those regarding import, export, and use of encryption software. -THIS FREE SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -AUTHOR OR ANY CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -EFFECTS OF UNAUTHORIZED OR MALICIOUS NETWORK ACCESS; PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. +THIS FREE SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR ANY CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, EFFECTS OF UNAUTHORIZED OR MALICIOUS NETWORK ACCESS; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/ADSL b/options/license/ADSL index aef03b73b..dc509208c 100644 --- a/options/license/ADSL +++ b/options/license/ADSL @@ -1,7 +1 @@ -This software code is made available "AS IS" without warranties of any kind. -You may copy, display, modify and redistribute the software code either by -itself or as incorporated into your code; provided that you do not remove -any proprietary notices. Your use of this software code is at your own risk -and you waive any claim against Amazon Digital Services, Inc. or its affiliates -with respect to your use of this software code. (c) 2006 Amazon Digital Services, -Inc. or its affiliates. +This software code is made available "AS IS" without warranties of any kind. You may copy, display, modify and redistribute the software code either by itself or as incorporated into your code; provided that you do not remove any proprietary notices. Your use of this software code is at your own risk and you waive any claim against Amazon Digital Services, Inc. or its affiliates with respect to your use of this software code. (c) 2006 Amazon Digital Services, Inc. or its affiliates. diff --git a/options/license/AFL-1.1 b/options/license/AFL-1.1 index a505d889c..446c0aca4 100644 --- a/options/license/AFL-1.1 +++ b/options/license/AFL-1.1 @@ -1,79 +1,27 @@ Academic Free License +Version 1.1 -Version 1.1 The Academic Free License applies to any original work of authorship -(the "Original Work") whose owner (the "Licensor") has placed the following -notice immediately following the copyright notice for the Original Work: +The Academic Free License applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -"Licensed under the Academic Free License version 1.1." + "Licensed under the Academic Free License version 1.1." -Grant of License. Licensor hereby grants to any person obtaining a copy of -the Original Work ("You") a world-wide, royalty-free, non-exclusive, perpetual, -non-sublicenseable license +Grant of License. Licensor hereby grants to any person obtaining a copy of the Original Work ("You") a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license -(1) to use, copy, modify, merge, publish, perform, distribute and/or sell -copies of the Original Work and derivative works thereof, and +(1) to use, copy, modify, merge, publish, perform, distribute and/or sell copies of the Original Work and derivative works thereof, and -(2) under patent claims owned or controlled by the Licensor that are embodied -in the Original Work as furnished by the Licensor, to make, use, sell and -offer for sale the Original Work and derivative works thereof, subject to -the following conditions. +(2) under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and derivative works thereof, subject to the following conditions. -Right of Attribution. Redistributions of the Original Work must reproduce -all copyright notices in the Original Work as furnished by the Licensor, both -in the Original Work itself and in any documentation and/or other materials -provided with the distribution of the Original Work in executable form. + Right of Attribution. Redistributions of the Original Work must reproduce all copyright notices in the Original Work as furnished by the Licensor, both in the Original Work itself and in any documentation and/or other materials provided with the distribution of the Original Work in executable form. -Exclusions from License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior written permission of the Licensor. + Exclusions from License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. -WARRANTY AND DISCLAIMERS. LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE -ORIGINAL WORK IS OWNED BY THE LICENSOR OR THAT THE ORIGINAL WORK IS DISTRIBUTED -BY LICENSOR UNDER A VALID CURRENT LICENSE FROM THE COPYRIGHT OWNER. EXCEPT -AS EXPRESSLY STATED IN THE IMMEDIATELY PRECEEDING SENTENCE, THE ORIGINAL WORK -IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY, EITHER -EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTY OF NON-INFRINGEMENT -AND WARRANTIES THAT THE ORIGINAL WORK IS MERCHANTABLE OR FIT FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. -NO LICENSE TO ORIGINAL WORK IS GRANTED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +WARRANTY AND DISCLAIMERS. LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE ORIGINAL WORK IS OWNED BY THE LICENSOR OR THAT THE ORIGINAL WORK IS DISTRIBUTED BY LICENSOR UNDER A VALID CURRENT LICENSE FROM THE COPYRIGHT OWNER. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY PRECEEDING SENTENCE, THE ORIGINAL WORK IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTY OF NON-INFRINGEMENT AND WARRANTIES THAT THE ORIGINAL WORK IS MERCHANTABLE OR FIT FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO LICENSE TO ORIGINAL WORK IS GRANTED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, -WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR -BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING AS A RESULT OF THIS LICENSE -OR THE USE OF THE ORIGINAL WORK INCLUDING, WITHOUT LIMITATION, DAMAGES FOR -LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND -ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PERSON SHALL HAVE BEEN -INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. +LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING AS A RESULT OF THIS LICENSE OR THE USE OF THE ORIGINAL WORK INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PERSON SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -License to Source Code. The term "Source Code" means the preferred form of -the Original Work for making modifications to it and all available documentation -describing how to access and modify the Original Work. Licensor hereby agrees -to provide a machine-readable copy of the Source Code of the Original Work -along with each copy of the Original Work that Licensor distributes. Licensor -reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work, and by publishing the address of -that information repository in a notice immediately following the copyright -notice that applies to the Original Work. +License to Source Code. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to access and modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. -Mutual Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -if You file a lawsuit in any court alleging that any OSI Certified open source -software that is licensed under any license containing this "Mutual Termination -for Patent Action" clause infringes any patent claims that are essential to -use that software. +Mutual Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License if You file a lawsuit in any court alleging that any OSI Certified open source software that is licensed under any license containing this "Mutual Termination for Patent Action" clause infringes any patent claims that are essential to use that software. This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. - -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/AFL-1.2 b/options/license/AFL-1.2 index 565cdf8ba..b8009f87c 100644 --- a/options/license/AFL-1.2 +++ b/options/license/AFL-1.2 @@ -1,81 +1,28 @@ Academic Free License +Version 1.2 -Version 1.2 This Academic Free License applies to any original work of authorship -(the "Original Work") whose owner (the "Licensor") has placed the following -notice immediately following the copyright notice for the Original Work: +This Academic Free License applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the +following notice immediately following the copyright notice for the Original Work: -Licensed under the Academic Free License version 1.2 + Licensed under the Academic Free License version 1.2 -Grant of License. Licensor hereby grants to any person obtaining a copy of -the Original Work ("You") a world-wide, royalty-free, non-exclusive, perpetual, -non-sublicenseable license (1) to use, copy, modify, merge, publish, perform, -distribute and/or sell copies of the Original Work and derivative works thereof, -and (2) under patent claims owned or controlled by the Licensor that are embodied -in the Original Work as furnished by the Licensor, to make, use, sell and -offer for sale the Original Work and derivative works thereof, subject to -the following conditions. +Grant of License. Licensor hereby grants to any person obtaining a copy of the Original Work ("You") a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license (1) to use, copy, modify, merge, publish, perform, distribute and/or sell copies of the Original Work and derivative works thereof, and (2) under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and derivative works thereof, subject to the +following conditions. -Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -Exclusions from License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior written permission of the Licensor. +Exclusions from License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. -Warranty and Disclaimer of Warranty. Licensor warrants that the copyright -in and to the Original Work is owned by the Licensor or that the Original -Work is distributed by Licensor under a valid current license from the copyright -owner. Except as expressly stated in the immediately proceeding sentence, -the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT -WARRANTY, either express or implied, including, without limitation, the warranties -of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER -OF WARRANTY constitutes an essential part of this License. No license to Original -Work is granted hereunder except under this disclaimer. +Warranty and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work is owned by the Licensor or that the Original Work is distributed by Licensor under a valid current license from the copyright owner. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. -Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for -loss of goodwill, work stoppage, computer failure or malfunction, or any and -all other commercial damages or losses. This limitation of liability shall -not apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some jurisdictions -do not allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. +Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. -License to Source Code. The term "Source Code" means the preferred form of -the Original Work for making modifications to it and all available documentation -describing how to modify the Original Work. Licensor hereby agrees to provide -a machine-readable copy of the Source Code of the Original Work along with -each copy of the Original Work that Licensor distributes. Licensor reserves -the right to satisfy this obligation by placing a machine-readable copy of -the Source Code in an information repository reasonably calculated to permit -inexpensive and convenient access by You for as long as Licensor continues -to distribute the Original Work, and by publishing the address of that information -repository in a notice immediately following the copyright notice that applies -to the Original Work. +License to Source Code. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available +documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. -Mutual Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -if You file a lawsuit in any court alleging that any OSI Certified open source -software that is licensed under any license containing this "Mutual Termination -for Patent Action" clause infringes any patent claims that are essential to -use that software. +Mutual Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License if You file a lawsuit in any court alleging that any OSI Certified open source software that is licensed under any license containing this "Mutual Termination for Patent Action" clause infringes any patent claims that are essential to use that software. -Right to Use. You may use the Original Work in all ways not otherwise restricted -or conditioned by this License or by law, and Licensor promises not to interfere -with or be responsible for such uses by You. +Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. - -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/AFL-2.0 b/options/license/AFL-2.0 index d89114e80..f3bd601b3 100644 --- a/options/license/AFL-2.0 +++ b/options/license/AFL-2.0 @@ -1,150 +1,45 @@ The Academic Free License +v. 2.0 -v. 2.0 This Academic Free License (the "License") applies to any original -work of authorship (the "Original Work") whose owner (the "Licensor") has -placed the following notice immediately following the copyright notice for -the Original Work: +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -Licensed under the Academic Free License version 2.0 + Licensed under the Academic Free License version 2.0 -1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license to do the following: +1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: - a) to reproduce the Original Work in copies; + a) to reproduce the Original Work in copies; + b) to prepare derivative works ("Derivative Works") based upon the Original Work; + c) to distribute copies of the Original Work and Derivative Works to the public; + d) to perform the Original Work publicly; and + e) to display the Original Work publicly. -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; +2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works. -c) to distribute copies of the Original Work and Derivative Works to the public; +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. - d) to perform the Original Work publicly; and +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. - e) to display the Original Work publicly. +5) This section intentionally omitted. -2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license, under patent claims owned -or controlled by the Licensor that are embodied in the Original Work as furnished -by the Licensor, to make, use, sell and offer for sale the Original Work and -Derivative Works. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work, and by publishing the address of -that information repository in a notice immediately following the copyright -notice that applies to the Original Work. +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior written permission of the Licensor. Nothing in -this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except -as expressly stated herein. No patent license is granted to make, use, sell -or offer to sell embodiments of any patent claims other than the licensed -claims defined in Section 2. No right is granted to the trademarks of Licensor -even if such marks are included in the Original Work. Nothing in this License -shall be interpreted to prohibit Licensor from licensing under different terms -from this License any Original Work that Licensor otherwise would have a right -to license. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. - 5) This section intentionally omitted. +9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, for patent infringement (i) against Licensor with respect to a patent applicable to software or (ii) against any entity with respect to a patent applicable to the Original Work (but excluding combinations of the Original Work with other software or hardware). -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the -terms of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. -No license to Original Work is granted hereunder except under this disclaimer. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. ¤ 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for -loss of goodwill, work stoppage, computer failure or malfunction, or any and -all other commercial damages or losses. This limitation of liability shall -not apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some jurisdictions -do not allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. +12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -9) Acceptance and Termination. If You distribute copies of the Original Work -or a Derivative Work, You must make a reasonable effort under the circumstances -to obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, -by exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. +13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -for patent infringement (i) against Licensor with respect to a patent applicable -to software or (ii) against any entity with respect to a patent applicable -to the Original Work (but excluding combinations of the Original Work with -other software or hardware). +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. ¤ 101 et seq., -the equivalent laws of other countries, and international treaty. This section -shall survive the termination of this License. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. - -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. - -This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. - -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. +Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/AFL-2.1 b/options/license/AFL-2.1 index 9b07df058..011d6d489 100644 --- a/options/license/AFL-2.1 +++ b/options/license/AFL-2.1 @@ -1,150 +1,45 @@ The Academic Free License +v.2.1 -v.2.1 This Academic Free License (the "License") applies to any original work -of authorship (the "Original Work") whose owner (the "Licensor") has placed -the following notice immediately following the copyright notice for the Original -Work: +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -Licensed under the Academic Free License version 2.1 + Licensed under the Academic Free License version 2.1 -1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license to do the following: +1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: - a) to reproduce the Original Work in copies; + a) to reproduce the Original Work in copies; + b) to prepare derivative works ("Derivative Works") based upon the Original Work; + c) to distribute copies of the Original Work and Derivative Works to the public; + d) to perform the Original Work publicly; and + e) to display the Original Work publicly. -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; +2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works. -c) to distribute copies of the Original Work and Derivative Works to the public; +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. - d) to perform the Original Work publicly; and +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. - e) to display the Original Work publicly. +5) This section intentionally omitted. -2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license, under patent claims owned -or controlled by the Licensor that are embodied in the Original Work as furnished -by the Licensor, to make, use, sell and offer for sale the Original Work and -Derivative Works. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work, and by publishing the address of -that information repository in a notice immediately following the copyright -notice that applies to the Original Work. +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior written permission of the Licensor. Nothing in -this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except -as expressly stated herein. No patent license is granted to make, use, sell -or offer to sell embodiments of any patent claims other than the licensed -claims defined in Section 2. No right is granted to the trademarks of Licensor -even if such marks are included in the Original Work. Nothing in this License -shall be interpreted to prohibit Licensor from licensing under different terms -from this License any Original Work that Licensor otherwise would have a right -to license. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. - 5) This section intentionally omitted. + 9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the -terms of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. -No license to Original Work is granted hereunder except under this disclaimer. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for -loss of goodwill, work stoppage, computer failure or malfunction, or any and -all other commercial damages or losses. This limitation of liability shall -not apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some jurisdictions -do not allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. +12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -9) Acceptance and Termination. If You distribute copies of the Original Work -or a Derivative Work, You must make a reasonable effort under the circumstances -to obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, -by exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. +13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes -a patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software -or hardware. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et seq., -the equivalent laws of other countries, and international treaty. This section -shall survive the termination of this License. - -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. - -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. - -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/AFL-3.0 b/options/license/AFL-3.0 index bd6fc3102..e1b7792ae 100644 --- a/options/license/AFL-3.0 +++ b/options/license/AFL-3.0 @@ -1,167 +1,43 @@ -Academic Free License ("AFL") v. 3.0 This Academic Free License (the "License") -applies to any original work of authorship (the "Original Work") whose owner -(the "Licensor") has placed the following licensing notice adjacent to the -copyright notice for the Original Work: +Academic Free License (“AFL”) v. 3.0 -Licensed under the Academic Free License version 3.0 +This Academic Free License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: -1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, for the duration of the copyright, to -do the following: + Licensed under the Academic Free License version 3.0 -a) to reproduce the Original Work in copies, either alone or as part of a -collective work; +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: -b) to translate, adapt, alter, transform, modify, or arrange the Original -Work, thereby creating derivative works ("Derivative Works") based upon the -Original Work; + a) to reproduce the Original Work in copies, either alone or as part of a collective work; + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; + c) to distribute or communicate copies of the Original Work and Derivative Works to the public, under any license of your choice that does not contradict the terms and conditions, including Licensor’s reserved rights and remedies, in this Academic Free License; + d) to perform the Original Work publicly; and + e) to display the Original Work publicly. -c) to distribute or communicate copies of the Original Work and Derivative -Works to the public, under any license of your choice that does not contradict -the terms and conditions, including Licensor's reserved rights and remedies, -in this Academic Free License; +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. - d) to perform the Original Work publicly; and +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. - e) to display the Original Work publicly. + 4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. -2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, under patent claims owned or controlled -by the Licensor that are embodied in the Original Work as furnished by the -Licensor, for the duration of the patents, to make, use, sell, offer for sale, -have made, and import the Original Work and Derivative Works. +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor agrees -to provide a machine-readable copy of the Source Code of the Original Work -along with each copy of the Original Work that Licensor distributes. Licensor -reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior permission of the Licensor. Except as expressly -stated herein, nothing in this License grants any license to Licensor's trademarks, -copyrights, patents, trade secrets or any other intellectual property. No -patent license is granted to make, use, sell, offer for sale, have made, or -import embodiments of any patent claims other than the licensed claims defined -in Section 2. No license is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall -be interpreted to prohibit Licensor from licensing under terms different from -this License any Original Work that Licensor otherwise would have a right -to license. +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. -5) External Deployment. The term "External Deployment" means the use, distribution, -or communication of the Original Work or Derivative Works in any way such -that the Original Work or Derivative Works may be used by anyone other than -You, whether those works are distributed or communicated to those persons -or made available as an application intended for use over a network. As an -express condition for the grants of license hereunder, You must treat any -External Deployment by You of the Original Work or a Derivative Work as a -distribution under section 1(c). +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent, or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the -terms of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately preceding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of non-infringement, merchantability or fitness for a particular -purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. -No license to the Original Work is granted by this License except under this -disclaimer. +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to anyone for any indirect, special, incidental, or consequential -damages of any character arising as a result of this License or the use of -the Original Work including, without limitation, damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses. This limitation of liability shall not apply to the extent -applicable law prohibits such limitation. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. -9) Acceptance and Termination. If, at any time, You expressly assented to -this License, that assent indicates your clear and irrevocable acceptance -of this License and all of its terms and conditions. If You distribute or -communicate copies of the Original Work or a Derivative Work, You must make -a reasonable effort under the circumstances to obtain the express assent of -recipients to the terms of this License. This License conditions your rights -to undertake the activities listed in Section 1, including your right to create -Derivative Works based upon the Original Work, and doing so without honoring -these terms and conditions is prohibited by copyright law and international -treaty. Nothing in this License is intended to affect copyright exceptions -and limitations (including "fair use" or "fair dealing"). This License shall -terminate immediately and You may no longer exercise any of the rights granted -to You by this License upon your failure to honor the conditions in Section -1(c). +12) Attorneys’ Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes -a patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software -or hardware. +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of copyright or patent law in the appropriate jurisdiction. -This section shall survive the termination of this License. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -12) Attorneys' Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -13) Miscellaneous. If any provision of this License is held to be unenforceable, -such provision shall be reformed only to the extent necessary to make it enforceable. - -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. - -16) Modification of This License. This License is Copyright © 2005 Lawrence -Rosen. Permission is granted to copy, distribute, or communicate this License -without modification. Nothing in this License permits You to modify this License -as applied to the Original Work or to Derivative Works. However, You may modify -the text of this License and copy, distribute or communicate your modified -version (the "Modified License") and apply it to other original works of authorship -subject to the following conditions: (i) You may not indicate in any way that -your Modified License is the "Academic Free License" or "AFL" and you may -not use those names in the name of your Modified License; (ii) You must replace -the notice specified in the first paragraph above with the notice "Licensed -under " or with a notice of your own that is -not confusingly similar to the notice in this License; and (iii) You may not -claim that your original works are open source software unless your Modified -License has been approved by Open Source Initiative (OSI) and You comply with -its license review and certification process. +16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Academic Free License" or "AFL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/options/license/AGPL-1.0-only b/options/license/AGPL-1.0-only index d0cc319ad..a00f82e60 100644 --- a/options/license/AGPL-1.0-only +++ b/options/license/AGPL-1.0-only @@ -1,277 +1,86 @@ AFFERO GENERAL PUBLIC LICENSE +Version 1, March 2002 Copyright © 2002 Affero Inc. 510 Third Street - Suite 225, San Francisco, CA 94107, USA -Version 1, March 2002 +This license is a modified version of the GNU General Public License copyright (C) 1989, 1991 Free Software Foundation, Inc. made with their permission. Section 2(d) has been added to cover use of software over a computer network. -Copyright © 2002 Affero Inc. - -510 Third Street - Suite 225, San Francisco, CA 94107, USA - -This license is a modified version of the GNU General Public License copyright -(C) 1989, 1991 Free Software Foundation, Inc. made with their permission. -Section 2(d) has been added to cover use of software over a computer network. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the Affero General Public License is intended -to guarantee your freedom to share and change free software--to make sure -the software is free for all its users. This Public License applies to most -of Affero's software and to any other program whose authors commit to using -it. (Some other Affero software is covered by the GNU Library General Public -License instead.) You can apply it to your programs, too. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the Affero General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This Public License applies to most of Affero's software and to any other program whose authors commit to using it. (Some other Affero software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not price. This -General Public License is designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. +When we speak of free software, we are referring to freedom, not price. This General Public License is designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the software, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of such a program, whether gratis or -for a fee, you must give the recipients all the rights that you have. You -must make sure that they, too, receive or can get the source code. And you -must show them these terms so they know their rights. +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If -the software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will individually -obtain patent licenses, in effect making the program proprietary. To prevent -this, we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms -of this Affero General Public License. The "Program", below, refers to any -such program or work, and a "work based on the Program" means either the Program -or any derivative work under copyright law: that is to say, a work containing -the Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included without -limitation in the term "modification".) Each licensee is addressed as "you". +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this Affero General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program -is not restricted, and the output from the Program is covered only if its -contents constitute a work based on the Program (independent of having been -made by running the Program). Whether that is true depends on what the Program -does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. -1. You may copy and distribute verbatim copies of the Program's source code -as you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this License and to the absence -of any warranty; and give any other recipients of the Program a copy of this -License along with the Program. +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: -a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + d) If the Program as you received it is intended to interact with users through a computer network and if, in the version you received, any user interacting with the Program was given the opportunity to request transmission to that user of the Program's complete source code, you must not remove that facility from your modified version of the Program or work based on the Program, and must offer an equivalent opportunity for all users interacting with your Program through a computer network to request immediate transmission by HTTP of the complete source code of your modified version or other derivative work. -b) You must cause any work that you distribute or publish, that in whole or -in part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print -such an announcement, your work based on the Program is not required to print -an announcement.) +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. -d) If the Program as you received it is intended to interact with users through -a computer network and if, in the version you received, any user interacting -with the Program was given the opportunity to request transmission to that -user of the Program's complete source code, you must not remove that facility -from your modified version of the Program or work based on the Program, and -must offer an equivalent opportunity for all users interacting with your Program -through a computer network to request immediate transmission by HTTP of the -complete source code of your modified version or other derivative work. +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Program, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Program. +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -In addition, mere aggregation of another work not based on the Program with -the Program (or with a work based on the Program) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. -3. You may copy and distribute the Program (or a work based on it, under Section -2) in object code or executable form under the terms of Sections 1 and 2 above -provided that you also do one of the following: +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -a) Accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. -b) Accompany it with a written offer, valid for at least three years, to give -any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 1 and 2 above on -a medium customarily used for software interchange; or, +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -c) Accompany it with the information you received as to the offer to distribute -corresponding source code. (This alternative is allowed only for noncommercial -distribution and only if you received the program in object code or executable -form with such an offer, in accord with Subsection b above.) +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code distributed -need not include anything that is normally distributed (in either source or -binary form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component itself -accompanies the executable. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with -the object code. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -4. You may not copy, modify, sublicense, or distribute the Program except -as expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -5. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Program -(or any work based on the Program), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor -to copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of -the rights granted herein. You are not responsible for enforcing compliance -by third parties to this License. +9. Affero Inc. may publish revised and/or new versions of the Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -7. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Program at all. For example, if a -patent license would not permit royalty-free redistribution of the Program -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Program. +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by Affero, Inc. If the Program does not specify a version number of this License, you may choose any version ever published by Affero, Inc. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. +You may also choose to redistribute modified versions of this program under any version of the Free Software Foundation's GNU General Public License version 3 or higher, so long as that version of the GNU GPL includes terms and conditions substantially equivalent to those of this license. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system, which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by Affero, Inc., write to us; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +NO WARRANTY -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Program under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -9. Affero Inc. may publish revised and/or new versions of the Affero General -Public License from time to time. Such new versions will be similar in spirit -to the present version, but may differ in detail to address new problems or -concerns. - -Each version is given a distinguishing version number. If the Program specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by Affero, Inc. If the Program does not -specify a version number of this License, you may choose any version ever -published by Affero, Inc. - -You may also choose to redistribute modified versions of this program under -any version of the Free Software Foundation's GNU General Public License version -3 or higher, so long as that version of the GNU GPL includes terms and conditions -substantially equivalent to those of this license. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by Affero, Inc., write to us; -we sometimes make exceptions for this. Our decision will be guided by the -two goals of preserving the free status of all derivatives of our free software -and of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/AGPL-1.0-or-later b/options/license/AGPL-1.0-or-later index d0cc319ad..a00f82e60 100644 --- a/options/license/AGPL-1.0-or-later +++ b/options/license/AGPL-1.0-or-later @@ -1,277 +1,86 @@ AFFERO GENERAL PUBLIC LICENSE +Version 1, March 2002 Copyright © 2002 Affero Inc. 510 Third Street - Suite 225, San Francisco, CA 94107, USA -Version 1, March 2002 +This license is a modified version of the GNU General Public License copyright (C) 1989, 1991 Free Software Foundation, Inc. made with their permission. Section 2(d) has been added to cover use of software over a computer network. -Copyright © 2002 Affero Inc. - -510 Third Street - Suite 225, San Francisco, CA 94107, USA - -This license is a modified version of the GNU General Public License copyright -(C) 1989, 1991 Free Software Foundation, Inc. made with their permission. -Section 2(d) has been added to cover use of software over a computer network. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the Affero General Public License is intended -to guarantee your freedom to share and change free software--to make sure -the software is free for all its users. This Public License applies to most -of Affero's software and to any other program whose authors commit to using -it. (Some other Affero software is covered by the GNU Library General Public -License instead.) You can apply it to your programs, too. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the Affero General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This Public License applies to most of Affero's software and to any other program whose authors commit to using it. (Some other Affero software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not price. This -General Public License is designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. +When we speak of free software, we are referring to freedom, not price. This General Public License is designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the software, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of such a program, whether gratis or -for a fee, you must give the recipients all the rights that you have. You -must make sure that they, too, receive or can get the source code. And you -must show them these terms so they know their rights. +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If -the software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will individually -obtain patent licenses, in effect making the program proprietary. To prevent -this, we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms -of this Affero General Public License. The "Program", below, refers to any -such program or work, and a "work based on the Program" means either the Program -or any derivative work under copyright law: that is to say, a work containing -the Program or a portion of it, either verbatim or with modifications and/or -translated into another language. (Hereinafter, translation is included without -limitation in the term "modification".) Each licensee is addressed as "you". +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this Affero General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program -is not restricted, and the output from the Program is covered only if its -contents constitute a work based on the Program (independent of having been -made by running the Program). Whether that is true depends on what the Program -does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. -1. You may copy and distribute verbatim copies of the Program's source code -as you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this License and to the absence -of any warranty; and give any other recipients of the Program a copy of this -License along with the Program. +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: -a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) + d) If the Program as you received it is intended to interact with users through a computer network and if, in the version you received, any user interacting with the Program was given the opportunity to request transmission to that user of the Program's complete source code, you must not remove that facility from your modified version of the Program or work based on the Program, and must offer an equivalent opportunity for all users interacting with your Program through a computer network to request immediate transmission by HTTP of the complete source code of your modified version or other derivative work. -b) You must cause any work that you distribute or publish, that in whole or -in part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print -such an announcement, your work based on the Program is not required to print -an announcement.) +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. -d) If the Program as you received it is intended to interact with users through -a computer network and if, in the version you received, any user interacting -with the Program was given the opportunity to request transmission to that -user of the Program's complete source code, you must not remove that facility -from your modified version of the Program or work based on the Program, and -must offer an equivalent opportunity for all users interacting with your Program -through a computer network to request immediate transmission by HTTP of the -complete source code of your modified version or other derivative work. +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Program, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Program. +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -In addition, mere aggregation of another work not based on the Program with -the Program (or with a work based on the Program) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. -3. You may copy and distribute the Program (or a work based on it, under Section -2) in object code or executable form under the terms of Sections 1 and 2 above -provided that you also do one of the following: +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -a) Accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. -b) Accompany it with a written offer, valid for at least three years, to give -any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 1 and 2 above on -a medium customarily used for software interchange; or, +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -c) Accompany it with the information you received as to the offer to distribute -corresponding source code. (This alternative is allowed only for noncommercial -distribution and only if you received the program in object code or executable -form with such an offer, in accord with Subsection b above.) +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code distributed -need not include anything that is normally distributed (in either source or -binary form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component itself -accompanies the executable. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with -the object code. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -4. You may not copy, modify, sublicense, or distribute the Program except -as expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -5. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Program -(or any work based on the Program), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor -to copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of -the rights granted herein. You are not responsible for enforcing compliance -by third parties to this License. +9. Affero Inc. may publish revised and/or new versions of the Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -7. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Program at all. For example, if a -patent license would not permit royalty-free redistribution of the Program -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Program. +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by Affero, Inc. If the Program does not specify a version number of this License, you may choose any version ever published by Affero, Inc. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. +You may also choose to redistribute modified versions of this program under any version of the Free Software Foundation's GNU General Public License version 3 or higher, so long as that version of the GNU GPL includes terms and conditions substantially equivalent to those of this license. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system, which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by Affero, Inc., write to us; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +NO WARRANTY -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Program under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -9. Affero Inc. may publish revised and/or new versions of the Affero General -Public License from time to time. Such new versions will be similar in spirit -to the present version, but may differ in detail to address new problems or -concerns. - -Each version is given a distinguishing version number. If the Program specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by Affero, Inc. If the Program does not -specify a version number of this License, you may choose any version ever -published by Affero, Inc. - -You may also choose to redistribute modified versions of this program under -any version of the Free Software Foundation's GNU General Public License version -3 or higher, so long as that version of the GNU GPL includes terms and conditions -substantially equivalent to those of this license. - -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by Affero, Inc., write to us; -we sometimes make exceptions for this. Our decision will be guided by the -two goals of preserving the free status of all derivatives of our free software -and of promoting the sharing and reuse of software generally. - - NO WARRANTY - -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/AGPL-3.0-only b/options/license/AGPL-3.0-only index e37e32e4e..0c97efd25 100644 --- a/options/license/AGPL-3.0-only +++ b/options/license/AGPL-3.0-only @@ -1,613 +1,235 @@ GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -Preamble - -The GNU Affero General Public License is a free, copyleft license for software -and other kinds of works, specifically designed to ensure cooperation with -the community in the case of network server software. - -The licenses for most software and other practical works are designed to take -away your freedom to share and change the works. By contrast, our General -Public Licenses are intended to guarantee your freedom to share and change -all versions of a program--to make sure it remains free software for all its -users. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for them if you wish), that -you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs, and that you know you -can do these things. - -Developers that use our General Public Licenses protect your rights with two -steps: (1) assert copyright on the software, and (2) offer you this License -which gives you legal permission to copy, distribute and/or modify the software. - -A secondary benefit of defending all users' freedom is that improvements made -in alternate versions of the program, if they receive widespread use, become -available for other developers to incorporate. Many developers of free software -are heartened and encouraged by the resulting cooperation. However, in the -case of software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and letting -the public access it on a server without ever releasing its source code to -the public. - -The GNU Affero General Public License is designed specifically to ensure that, -in such cases, the modified source code becomes available to the community. -It requires the operator of a network server to provide the source code of -the modified version running there to the users of that server. Therefore, -public use of a modified version, on a publicly accessible server, gives the -public access to the source code of the modified version. - -An older license, called the Affero General Public License and published by -Affero, was designed to accomplish similar goals. This is a different license, -not a version of the Affero GPL, but Affero has released a new version of -the Affero GPL which permits relicensing under this license. - -The precise terms and conditions for copying, distribution and modification -follow. - -TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, -such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. -Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals -or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in -a fashion requiring copyright permission, other than the making of an exact -copy. The resulting work is called a "modified version" of the earlier work -or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the -Program. - -To "propagate" a work means to do anything with it that, without permission, -would make you directly or secondarily liable for infringement under applicable -copyright law, except executing it on a computer or modifying a private copy. -Propagation includes copying, distribution (with or without modification), -making available to the public, and in some countries other activities as -well. - -To "convey" a work means any kind of propagation that enables other parties -to make or receive copies. Mere interaction with a user through a computer -network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the -extent that it includes a convenient and prominently visible feature that -(1) displays an appropriate copyright notice, and (2) tells the user that -there is no warranty for the work (except to the extent that warranties are -provided), that licensees may convey the work under this License, and how -to view a copy of this License. If the interface presents a list of user commands -or options, such as a menu, a prominent item in the list meets this criterion. - - 1. Source Code. - -The "source code" for a work means the preferred form of the work for making -modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard -defined by a recognized standards body, or, in the case of interfaces specified -for a particular programming language, one that is widely used among developers -working in that language. - -The "System Libraries" of an executable work include anything, other than -the work as a whole, that (a) is included in the normal form of packaging -a Major Component, but which is not part of that Major Component, and (b) -serves only to enable use of the work with that Major Component, or to implement -a Standard Interface for which an implementation is available to the public -in source code form. A "Major Component", in this context, means a major essential -component (kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to produce -the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source -code needed to generate, install, and (for an executable work) run the object -code and to modify the work, including scripts to control those activities. -However, it does not include the work's System Libraries, or general-purpose -tools or generally available free programs which are used unmodified in performing -those activities but which are not part of the work. For example, Corresponding -Source includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically linked -subprograms that the work is specifically designed to require, such as by -intimate data communication or control flow between those - - subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate -automatically from other parts of the Corresponding Source. - - The Corresponding Source for a work in source code form is that same work. - - 2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright -on the Program, and are irrevocable provided the stated conditions are met. -This License explicitly affirms your unlimited permission to run the unmodified -Program. The output from running a covered work is covered by this License -only if the output, given its content, constitutes a covered work. This License -acknowledges your rights of fair use or other equivalent, as provided by copyright -law. - -You may make, run and propagate covered works that you do not convey, without -conditions so long as your license otherwise remains in force. You may convey -covered works to others for the sole purpose of having them make modifications -exclusively for you, or provide you with facilities for running those works, -provided that you comply with the terms of this License in conveying all material -for which you do not control copyright. Those thus making or running the covered -works for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of your copyrighted -material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions -stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure -under any applicable law fulfilling obligations under article 11 of the WIPO -copyright treaty adopted on 20 December 1996, or similar laws prohibiting -or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention -of technological measures to the extent such circumvention is effected by -exercising rights under this License with respect to the covered work, and -you disclaim any intention to limit operation or modification of the work -as a means of enforcing, against the work's users, your or third parties' -legal rights to forbid circumvention of technological measures. - - 4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive -it, in any medium, provided that you conspicuously and appropriately publish -on each copy an appropriate copyright notice; keep intact all notices stating -that this License and any non-permissive terms added in accord with section -7 apply to the code; keep intact all notices of the absence of any warranty; -and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you -may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce -it from the Program, in the form of source code under the terms of section -4, provided that you also meet all of these conditions: - -a) The work must carry prominent notices stating that you modified it, and -giving a relevant date. - -b) The work must carry prominent notices stating that it is released under -this License and any conditions added under section 7. This requirement modifies -the requirement in section 4 to "keep intact all notices". - -c) You must license the entire work, as a whole, under this License to anyone -who comes into possession of a copy. This License will therefore apply, along -with any applicable section 7 additional terms, to the whole of the work, -and all its parts, regardless of how they are packaged. This License gives -no permission to license the work in any other way, but it does not invalidate -such permission if you have separately received it. - -d) If the work has interactive user interfaces, each must display Appropriate -Legal Notices; however, if the Program has interactive interfaces that do -not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, -which are not by their nature extensions of the covered work, and which are -not combined with it such as to form a larger program, in or on a volume of -a storage or distribution medium, is called an "aggregate" if the compilation -and its resulting copyright are not used to limit the access or legal rights -of the compilation's users beyond what the individual works permit. Inclusion -of a covered work in an aggregate does not cause this License to apply to -the other parts of the aggregate. - - 6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections -4 and 5, provided that you also convey the machine-readable Corresponding -Source under the terms of this License, in one of these ways: - -a) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by the Corresponding Source fixed -on a durable physical medium customarily used for software interchange. - -b) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by a written offer, valid for -at least three years and valid for as long as you offer spare parts or customer -support for that product model, to give anyone who possesses the object code -either (1) a copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical medium customarily -used for software interchange, for a price no more than your reasonable cost -of physically performing this conveying of source, or (2) access to copy the -Corresponding Source from a network server at no charge. - -c) Convey individual copies of the object code with a copy of the written -offer to provide the Corresponding Source. This alternative is allowed only -occasionally and noncommercially, and only if you received the object code -with such an offer, in accord with subsection 6b. - -d) Convey the object code by offering access from a designated place (gratis -or for a charge), and offer equivalent access to the Corresponding Source -in the same way through the same place at no further charge. You need not -require recipients to copy the Corresponding Source along with the object -code. If the place to copy the object code is a network server, the Corresponding -Source may be on a different server (operated by you or a third party) that -supports equivalent copying facilities, provided you maintain clear directions -next to the object code saying where to find the Corresponding Source. Regardless -of what server hosts the Corresponding Source, you remain obligated to ensure -that it is available for as long as needed to satisfy these requirements. - -e) Convey the object code using peer-to-peer transmission, provided you inform -other peers where the object code and Corresponding Source of the work are -being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from -the Corresponding Source as a System Library, need not be included in conveying -the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible -personal property which is normally used for personal, family, or household -purposes, or (2) anything designed or sold for incorporation into a dwelling. -In determining whether a product is a consumer product, doubtful cases shall -be resolved in favor of coverage. For a particular product received by a particular -user, "normally used" refers to a typical or common use of that class of product, -regardless of the status of the particular user or of the way in which the -particular user actually uses, or expects or is expected to use, the product. -A product is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent the -only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, -authorization keys, or other information required to install and execute modified -versions of a covered work in that User Product from a modified version of -its Corresponding Source. The information must suffice to ensure that the -continued functioning of the modified object code is in no case prevented -or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically -for use in, a User Product, and the conveying occurs as part of a transaction -in which the right of possession and use of the User Product is transferred -to the recipient in perpetuity or for a fixed term (regardless of how the -transaction is characterized), the Corresponding Source conveyed under this -section must be accompanied by the Installation Information. But this requirement -does not apply if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has been installed -in ROM). - -The requirement to provide Installation Information does not include a requirement -to continue to provide support service, warranty, or updates for a work that -has been modified or installed by the recipient, or for the User Product in -which it has been modified or installed. Access to a network may be denied -when the modification itself materially and adversely affects the operation -of the network or violates the rules and protocols for communication across -the network. - -Corresponding Source conveyed, and Installation Information provided, in accord -with this section must be in a format that is publicly documented (and with -an implementation available to the public in source code form), and must require -no special password or key for unpacking, reading or copying. - - 7. Additional Terms. - -"Additional permissions" are terms that supplement the terms of this License -by making exceptions from one or more of its conditions. Additional permissions -that are applicable to the entire Program shall be treated as though they -were included in this License, to the extent that they are valid under applicable -law. If additional permissions apply only to part of the Program, that part -may be used separately under those permissions, but the entire Program remains -governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any -additional permissions from that copy, or from any part of it. (Additional -permissions may be written to require their own removal in certain cases when -you modify the work.) You may place additional permissions on material, added -by you to a covered work, for which you have or can give appropriate copyright -permission. - -Notwithstanding any other provision of this License, for material you add -to a covered work, you may (if authorized by the copyright holders of that -material) supplement the terms of this License with terms: - -a) Disclaiming warranty or limiting liability differently from the terms of -sections 15 and 16 of this License; or - -b) Requiring preservation of specified reasonable legal notices or author -attributions in that material or in the Appropriate Legal Notices displayed -by works containing it; or - -c) Prohibiting misrepresentation of the origin of that material, or requiring -that modified versions of such material be marked in reasonable ways as different -from the original version; or - -d) Limiting the use for publicity purposes of names of licensors or authors -of the material; or - -e) Declining to grant rights under trademark law for use of some trade names, -trademarks, or service marks; or - -f) Requiring indemnification of licensors and authors of that material by -anyone who conveys the material (or modified versions of it) with contractual -assumptions of liability to the recipient, for any liability that these contractual -assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" -within the meaning of section 10. If the Program as you received it, or any -part of it, contains a notice stating that it is governed by this License -along with a term that is a further restriction, you may remove that term. -If a license document contains a further restriction but permits relicensing -or conveying under this License, you may add to a covered work material governed -by the terms of that license document, provided that the further restriction -does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, -in the relevant source files, a statement of the additional terms that apply -to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form -of a separately written license, or stated as exceptions; the above requirements -apply either way. - - 8. Termination. - -You may not propagate or modify a covered work except as expressly provided -under this License. Any attempt otherwise to propagate or modify it is void, -and will automatically terminate your rights under this License (including -any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, you do -not qualify to receive new licenses for the same material under section 10. - - 9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy -of the Program. Ancillary propagation of a covered work occurring solely as -a consequence of using peer-to-peer transmission to receive a copy likewise -does not require acceptance. However, nothing other than this License grants -you permission to propagate or modify any covered work. These actions infringe -copyright if you do not accept this License. Therefore, by modifying or propagating -a covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives -a license from the original licensors, to run, modify and propagate that work, -subject to this License. You are not responsible for enforcing compliance -by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, -or substantially all assets of one, or subdividing an organization, or merging -organizations. If propagation of a covered work results from an entity transaction, -each party to that transaction who receives a copy of the work also receives -whatever licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the Corresponding -Source of the work from the predecessor in interest, if the predecessor has -it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights -granted or affirmed under this License. For example, you may not impose a -license fee, royalty, or other charge for exercise of rights granted under -this License, and you may not initiate litigation (including a cross-claim -or counterclaim in a lawsuit) alleging that any patent claim is infringed -by making, using, selling, offering for sale, or importing the Program or -any portion of it. - - 11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License -of the Program or a work on which the Program is based. The work thus licensed -is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled -by the contributor, whether already acquired or hereafter acquired, that would -be infringed by some manner, permitted by this License, of making, using, -or selling its contributor version, but do not include claims that would be -infringed only as a consequence of further modification of the contributor -version. For purposes of this definition, "control" includes the right to -grant patent sublicenses in a manner consistent with the requirements of this -License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent -license under the contributor's essential patent claims, to make, use, sell, -offer for sale, import and otherwise run, modify and propagate the contents -of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement -or commitment, however denominated, not to enforce a patent (such as an express -permission to practice a patent or covenant not to s ue for patent infringement). -To "grant" such a patent license to a party means to make such an agreement -or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the -Corresponding Source of the work is not available for anyone to copy, free -of charge and under the terms of this License, through a publicly available -network server or other readily accessible means, then you must either (1) -cause the Corresponding Source to be so available, or (2) arrange to deprive -yourself of the benefit of the patent license for this particular work, or -(3) arrange, in a manner consistent with the requirements of this License, -to extend the patent - -license to downstream recipients. "Knowingly relying" means you have actual -knowledge that, but for the patent license, your conveying the covered work -in a country, or your recipient's use of the covered work in a country, would -infringe one or more identifiable patents in that country that you have reason -to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, -you convey, or propagate by procuring conveyance of, a covered work, and grant -a patent license to some of the parties receiving the covered work authorizing -them to use, propagate, modify or convey a specific copy of the covered work, -then the patent license you grant is automatically extended to all recipients -of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope -of its coverage, prohibits the exercise of, or is conditioned on the non-exercise -of one or more of the rights that are specifically granted under this License. -You may not convey a covered work if you are a party to an arrangement with -a third party that is in the business of distributing software, under which -you make payment to the third party based on the extent of your activity of -conveying the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory patent -license (a) in connection with copies of the covered work conveyed by you -(or copies made from those copies), or (b) primarily for and in connection -with specific products or compilations that contain the covered work, unless -you entered into that arrangement, or that patent license was granted, prior -to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied -license or other defenses to infringement that may otherwise be available -to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) -that contradict the conditions of this License, they do not excuse you from -the conditions of this License. If you cannot convey a covered work so as -to satisfy simultaneously your obligations under this License and any other -pertinent obligations, then as a consequence you may - -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey the -Program, the only way you could satisfy both those terms and this License -would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - -Notwithstanding any other provision of this License, if you modify the Program, -your modified version must prominently offer all users interacting with it -remotely through a computer network (if your version supports such interaction) -an opportunity to receive the Corresponding Source of your version by providing -access to the Corresponding Source from a network server at no charge, through -some standard or customary means of facilitating copying of software. This -Corresponding Source shall include the Corresponding Source for any work covered -by version 3 of the GNU General Public License that is incorporated pursuant -to the following paragraph. - -Notwithstanding any other provision of this License, you have permission to -link or combine any covered work with a work licensed under version 3 of the -GNU General Public License into a single combined work, and to convey the -resulting work. The terms of this License will continue to apply to the part -which is the covered work, but the work with which it is combined will remain -governed by version 3 of the GNU General Public License. - - 14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the -GNU Affero General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -that a certain numbered version of the GNU Affero General Public License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that numbered version or of any later version published -by the Free Software Foundation. If the Program does not specify a version -number of the GNU Affero General Public License, you may choose any version -ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of -the GNU Affero General Public License can be used, that proxy's public statement -of acceptance of a version permanently authorizes you to choose that version -for the Program. - -Later license versions may give you additional or different permissions. However, -no additional obligations are imposed on any author or copyright holder as -a result of your choosing to follow a later version. - - 15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE -LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM -PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - - 16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM -AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO -USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot -be given local legal effect according to their terms, reviewing courts shall -apply local law that most closely approximates an absolute waiver of all civil -liability in connection with the Program, unless a warranty or assumption -of liability accompanies a copy of the Program in return for a fee. END OF -TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively state the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. - - - -Copyright (C) - -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU Affero General Public License as published by the Free -Software Foundation, either version 3 of the License, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more -details. - -You should have received a copy of the GNU Affero General Public License along -with this program. If not, see . +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + + Preamble + +The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. + +A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. + +The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. + +An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. + +The precise terms and conditions for copying, distribution and modification follow. + + TERMS AND CONDITIONS + +0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based on the Program. + +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. + +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. + +A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. + +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If your software can interact with users remotely through a computer network, -you should also make sure that it provides a way for users to get its source. -For example, if your program is a web application, its interface could display -a "Source" link that leads users to an archive of the code. There are many -ways you could offer source, and different solutions will be better for different -programs; see section 13 for the specific requirements. +If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. -You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. For -more information on this, and how to apply and follow the GNU AGPL, see . +You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . diff --git a/options/license/AGPL-3.0-or-later b/options/license/AGPL-3.0-or-later index e37e32e4e..0c97efd25 100644 --- a/options/license/AGPL-3.0-or-later +++ b/options/license/AGPL-3.0-or-later @@ -1,613 +1,235 @@ GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 -Copyright (C) 2007 Free Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -Preamble - -The GNU Affero General Public License is a free, copyleft license for software -and other kinds of works, specifically designed to ensure cooperation with -the community in the case of network server software. - -The licenses for most software and other practical works are designed to take -away your freedom to share and change the works. By contrast, our General -Public Licenses are intended to guarantee your freedom to share and change -all versions of a program--to make sure it remains free software for all its -users. - -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for them if you wish), that -you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs, and that you know you -can do these things. - -Developers that use our General Public Licenses protect your rights with two -steps: (1) assert copyright on the software, and (2) offer you this License -which gives you legal permission to copy, distribute and/or modify the software. - -A secondary benefit of defending all users' freedom is that improvements made -in alternate versions of the program, if they receive widespread use, become -available for other developers to incorporate. Many developers of free software -are heartened and encouraged by the resulting cooperation. However, in the -case of software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and letting -the public access it on a server without ever releasing its source code to -the public. - -The GNU Affero General Public License is designed specifically to ensure that, -in such cases, the modified source code becomes available to the community. -It requires the operator of a network server to provide the source code of -the modified version running there to the users of that server. Therefore, -public use of a modified version, on a publicly accessible server, gives the -public access to the source code of the modified version. - -An older license, called the Affero General Public License and published by -Affero, was designed to accomplish similar goals. This is a different license, -not a version of the Affero GPL, but Affero has released a new version of -the Affero GPL which permits relicensing under this license. - -The precise terms and conditions for copying, distribution and modification -follow. - -TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to version 3 of the GNU Affero General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, -such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. -Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals -or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in -a fashion requiring copyright permission, other than the making of an exact -copy. The resulting work is called a "modified version" of the earlier work -or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the -Program. - -To "propagate" a work means to do anything with it that, without permission, -would make you directly or secondarily liable for infringement under applicable -copyright law, except executing it on a computer or modifying a private copy. -Propagation includes copying, distribution (with or without modification), -making available to the public, and in some countries other activities as -well. - -To "convey" a work means any kind of propagation that enables other parties -to make or receive copies. Mere interaction with a user through a computer -network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the -extent that it includes a convenient and prominently visible feature that -(1) displays an appropriate copyright notice, and (2) tells the user that -there is no warranty for the work (except to the extent that warranties are -provided), that licensees may convey the work under this License, and how -to view a copy of this License. If the interface presents a list of user commands -or options, such as a menu, a prominent item in the list meets this criterion. - - 1. Source Code. - -The "source code" for a work means the preferred form of the work for making -modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard -defined by a recognized standards body, or, in the case of interfaces specified -for a particular programming language, one that is widely used among developers -working in that language. - -The "System Libraries" of an executable work include anything, other than -the work as a whole, that (a) is included in the normal form of packaging -a Major Component, but which is not part of that Major Component, and (b) -serves only to enable use of the work with that Major Component, or to implement -a Standard Interface for which an implementation is available to the public -in source code form. A "Major Component", in this context, means a major essential -component (kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to produce -the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source -code needed to generate, install, and (for an executable work) run the object -code and to modify the work, including scripts to control those activities. -However, it does not include the work's System Libraries, or general-purpose -tools or generally available free programs which are used unmodified in performing -those activities but which are not part of the work. For example, Corresponding -Source includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically linked -subprograms that the work is specifically designed to require, such as by -intimate data communication or control flow between those - - subprograms and other parts of the work. - -The Corresponding Source need not include anything that users can regenerate -automatically from other parts of the Corresponding Source. - - The Corresponding Source for a work in source code form is that same work. - - 2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright -on the Program, and are irrevocable provided the stated conditions are met. -This License explicitly affirms your unlimited permission to run the unmodified -Program. The output from running a covered work is covered by this License -only if the output, given its content, constitutes a covered work. This License -acknowledges your rights of fair use or other equivalent, as provided by copyright -law. - -You may make, run and propagate covered works that you do not convey, without -conditions so long as your license otherwise remains in force. You may convey -covered works to others for the sole purpose of having them make modifications -exclusively for you, or provide you with facilities for running those works, -provided that you comply with the terms of this License in conveying all material -for which you do not control copyright. Those thus making or running the covered -works for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of your copyrighted -material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions -stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure -under any applicable law fulfilling obligations under article 11 of the WIPO -copyright treaty adopted on 20 December 1996, or similar laws prohibiting -or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention -of technological measures to the extent such circumvention is effected by -exercising rights under this License with respect to the covered work, and -you disclaim any intention to limit operation or modification of the work -as a means of enforcing, against the work's users, your or third parties' -legal rights to forbid circumvention of technological measures. - - 4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive -it, in any medium, provided that you conspicuously and appropriately publish -on each copy an appropriate copyright notice; keep intact all notices stating -that this License and any non-permissive terms added in accord with section -7 apply to the code; keep intact all notices of the absence of any warranty; -and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you -may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce -it from the Program, in the form of source code under the terms of section -4, provided that you also meet all of these conditions: - -a) The work must carry prominent notices stating that you modified it, and -giving a relevant date. - -b) The work must carry prominent notices stating that it is released under -this License and any conditions added under section 7. This requirement modifies -the requirement in section 4 to "keep intact all notices". - -c) You must license the entire work, as a whole, under this License to anyone -who comes into possession of a copy. This License will therefore apply, along -with any applicable section 7 additional terms, to the whole of the work, -and all its parts, regardless of how they are packaged. This License gives -no permission to license the work in any other way, but it does not invalidate -such permission if you have separately received it. - -d) If the work has interactive user interfaces, each must display Appropriate -Legal Notices; however, if the Program has interactive interfaces that do -not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, -which are not by their nature extensions of the covered work, and which are -not combined with it such as to form a larger program, in or on a volume of -a storage or distribution medium, is called an "aggregate" if the compilation -and its resulting copyright are not used to limit the access or legal rights -of the compilation's users beyond what the individual works permit. Inclusion -of a covered work in an aggregate does not cause this License to apply to -the other parts of the aggregate. - - 6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections -4 and 5, provided that you also convey the machine-readable Corresponding -Source under the terms of this License, in one of these ways: - -a) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by the Corresponding Source fixed -on a durable physical medium customarily used for software interchange. - -b) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by a written offer, valid for -at least three years and valid for as long as you offer spare parts or customer -support for that product model, to give anyone who possesses the object code -either (1) a copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical medium customarily -used for software interchange, for a price no more than your reasonable cost -of physically performing this conveying of source, or (2) access to copy the -Corresponding Source from a network server at no charge. - -c) Convey individual copies of the object code with a copy of the written -offer to provide the Corresponding Source. This alternative is allowed only -occasionally and noncommercially, and only if you received the object code -with such an offer, in accord with subsection 6b. - -d) Convey the object code by offering access from a designated place (gratis -or for a charge), and offer equivalent access to the Corresponding Source -in the same way through the same place at no further charge. You need not -require recipients to copy the Corresponding Source along with the object -code. If the place to copy the object code is a network server, the Corresponding -Source may be on a different server (operated by you or a third party) that -supports equivalent copying facilities, provided you maintain clear directions -next to the object code saying where to find the Corresponding Source. Regardless -of what server hosts the Corresponding Source, you remain obligated to ensure -that it is available for as long as needed to satisfy these requirements. - -e) Convey the object code using peer-to-peer transmission, provided you inform -other peers where the object code and Corresponding Source of the work are -being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from -the Corresponding Source as a System Library, need not be included in conveying -the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible -personal property which is normally used for personal, family, or household -purposes, or (2) anything designed or sold for incorporation into a dwelling. -In determining whether a product is a consumer product, doubtful cases shall -be resolved in favor of coverage. For a particular product received by a particular -user, "normally used" refers to a typical or common use of that class of product, -regardless of the status of the particular user or of the way in which the -particular user actually uses, or expects or is expected to use, the product. -A product is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent the -only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, -authorization keys, or other information required to install and execute modified -versions of a covered work in that User Product from a modified version of -its Corresponding Source. The information must suffice to ensure that the -continued functioning of the modified object code is in no case prevented -or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically -for use in, a User Product, and the conveying occurs as part of a transaction -in which the right of possession and use of the User Product is transferred -to the recipient in perpetuity or for a fixed term (regardless of how the -transaction is characterized), the Corresponding Source conveyed under this -section must be accompanied by the Installation Information. But this requirement -does not apply if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has been installed -in ROM). - -The requirement to provide Installation Information does not include a requirement -to continue to provide support service, warranty, or updates for a work that -has been modified or installed by the recipient, or for the User Product in -which it has been modified or installed. Access to a network may be denied -when the modification itself materially and adversely affects the operation -of the network or violates the rules and protocols for communication across -the network. - -Corresponding Source conveyed, and Installation Information provided, in accord -with this section must be in a format that is publicly documented (and with -an implementation available to the public in source code form), and must require -no special password or key for unpacking, reading or copying. - - 7. Additional Terms. - -"Additional permissions" are terms that supplement the terms of this License -by making exceptions from one or more of its conditions. Additional permissions -that are applicable to the entire Program shall be treated as though they -were included in this License, to the extent that they are valid under applicable -law. If additional permissions apply only to part of the Program, that part -may be used separately under those permissions, but the entire Program remains -governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any -additional permissions from that copy, or from any part of it. (Additional -permissions may be written to require their own removal in certain cases when -you modify the work.) You may place additional permissions on material, added -by you to a covered work, for which you have or can give appropriate copyright -permission. - -Notwithstanding any other provision of this License, for material you add -to a covered work, you may (if authorized by the copyright holders of that -material) supplement the terms of this License with terms: - -a) Disclaiming warranty or limiting liability differently from the terms of -sections 15 and 16 of this License; or - -b) Requiring preservation of specified reasonable legal notices or author -attributions in that material or in the Appropriate Legal Notices displayed -by works containing it; or - -c) Prohibiting misrepresentation of the origin of that material, or requiring -that modified versions of such material be marked in reasonable ways as different -from the original version; or - -d) Limiting the use for publicity purposes of names of licensors or authors -of the material; or - -e) Declining to grant rights under trademark law for use of some trade names, -trademarks, or service marks; or - -f) Requiring indemnification of licensors and authors of that material by -anyone who conveys the material (or modified versions of it) with contractual -assumptions of liability to the recipient, for any liability that these contractual -assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" -within the meaning of section 10. If the Program as you received it, or any -part of it, contains a notice stating that it is governed by this License -along with a term that is a further restriction, you may remove that term. -If a license document contains a further restriction but permits relicensing -or conveying under this License, you may add to a covered work material governed -by the terms of that license document, provided that the further restriction -does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, -in the relevant source files, a statement of the additional terms that apply -to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form -of a separately written license, or stated as exceptions; the above requirements -apply either way. - - 8. Termination. - -You may not propagate or modify a covered work except as expressly provided -under this License. Any attempt otherwise to propagate or modify it is void, -and will automatically terminate your rights under this License (including -any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, you do -not qualify to receive new licenses for the same material under section 10. - - 9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy -of the Program. Ancillary propagation of a covered work occurring solely as -a consequence of using peer-to-peer transmission to receive a copy likewise -does not require acceptance. However, nothing other than this License grants -you permission to propagate or modify any covered work. These actions infringe -copyright if you do not accept this License. Therefore, by modifying or propagating -a covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives -a license from the original licensors, to run, modify and propagate that work, -subject to this License. You are not responsible for enforcing compliance -by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, -or substantially all assets of one, or subdividing an organization, or merging -organizations. If propagation of a covered work results from an entity transaction, -each party to that transaction who receives a copy of the work also receives -whatever licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the Corresponding -Source of the work from the predecessor in interest, if the predecessor has -it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights -granted or affirmed under this License. For example, you may not impose a -license fee, royalty, or other charge for exercise of rights granted under -this License, and you may not initiate litigation (including a cross-claim -or counterclaim in a lawsuit) alleging that any patent claim is infringed -by making, using, selling, offering for sale, or importing the Program or -any portion of it. - - 11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License -of the Program or a work on which the Program is based. The work thus licensed -is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled -by the contributor, whether already acquired or hereafter acquired, that would -be infringed by some manner, permitted by this License, of making, using, -or selling its contributor version, but do not include claims that would be -infringed only as a consequence of further modification of the contributor -version. For purposes of this definition, "control" includes the right to -grant patent sublicenses in a manner consistent with the requirements of this -License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent -license under the contributor's essential patent claims, to make, use, sell, -offer for sale, import and otherwise run, modify and propagate the contents -of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement -or commitment, however denominated, not to enforce a patent (such as an express -permission to practice a patent or covenant not to s ue for patent infringement). -To "grant" such a patent license to a party means to make such an agreement -or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the -Corresponding Source of the work is not available for anyone to copy, free -of charge and under the terms of this License, through a publicly available -network server or other readily accessible means, then you must either (1) -cause the Corresponding Source to be so available, or (2) arrange to deprive -yourself of the benefit of the patent license for this particular work, or -(3) arrange, in a manner consistent with the requirements of this License, -to extend the patent - -license to downstream recipients. "Knowingly relying" means you have actual -knowledge that, but for the patent license, your conveying the covered work -in a country, or your recipient's use of the covered work in a country, would -infringe one or more identifiable patents in that country that you have reason -to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, -you convey, or propagate by procuring conveyance of, a covered work, and grant -a patent license to some of the parties receiving the covered work authorizing -them to use, propagate, modify or convey a specific copy of the covered work, -then the patent license you grant is automatically extended to all recipients -of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope -of its coverage, prohibits the exercise of, or is conditioned on the non-exercise -of one or more of the rights that are specifically granted under this License. -You may not convey a covered work if you are a party to an arrangement with -a third party that is in the business of distributing software, under which -you make payment to the third party based on the extent of your activity of -conveying the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory patent -license (a) in connection with copies of the covered work conveyed by you -(or copies made from those copies), or (b) primarily for and in connection -with specific products or compilations that contain the covered work, unless -you entered into that arrangement, or that patent license was granted, prior -to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied -license or other defenses to infringement that may otherwise be available -to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) -that contradict the conditions of this License, they do not excuse you from -the conditions of this License. If you cannot convey a covered work so as -to satisfy simultaneously your obligations under this License and any other -pertinent obligations, then as a consequence you may - -not convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey the -Program, the only way you could satisfy both those terms and this License -would be to refrain entirely from conveying the Program. - - 13. Remote Network Interaction; Use with the GNU General Public License. - -Notwithstanding any other provision of this License, if you modify the Program, -your modified version must prominently offer all users interacting with it -remotely through a computer network (if your version supports such interaction) -an opportunity to receive the Corresponding Source of your version by providing -access to the Corresponding Source from a network server at no charge, through -some standard or customary means of facilitating copying of software. This -Corresponding Source shall include the Corresponding Source for any work covered -by version 3 of the GNU General Public License that is incorporated pursuant -to the following paragraph. - -Notwithstanding any other provision of this License, you have permission to -link or combine any covered work with a work licensed under version 3 of the -GNU General Public License into a single combined work, and to convey the -resulting work. The terms of this License will continue to apply to the part -which is the covered work, but the work with which it is combined will remain -governed by version 3 of the GNU General Public License. - - 14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the -GNU Affero General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -that a certain numbered version of the GNU Affero General Public License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that numbered version or of any later version published -by the Free Software Foundation. If the Program does not specify a version -number of the GNU Affero General Public License, you may choose any version -ever published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of -the GNU Affero General Public License can be used, that proxy's public statement -of acceptance of a version permanently authorizes you to choose that version -for the Program. - -Later license versions may give you additional or different permissions. However, -no additional obligations are imposed on any author or copyright holder as -a result of your choosing to follow a later version. - - 15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE -LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM -PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - - 16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM -AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO -USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot -be given local legal effect according to their terms, reviewing courts shall -apply local law that most closely approximates an absolute waiver of all civil -liability in connection with the Program, unless a warranty or assumption -of liability accompanies a copy of the Program in return for a fee. END OF -TERMS AND CONDITIONS - -How to Apply These Terms to Your New Programs - -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. - -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively state the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. - - - -Copyright (C) - -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU Affero General Public License as published by the Free -Software Foundation, either version 3 of the License, or (at your option) -any later version. - -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more -details. - -You should have received a copy of the GNU Affero General Public License along -with this program. If not, see . +Copyright (C) 2007 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + + Preamble + +The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. + +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License which gives you legal permission to copy, distribute and/or modify the software. + +A secondary benefit of defending all users' freedom is that improvements made in alternate versions of the program, if they receive widespread use, become available for other developers to incorporate. Many developers of free software are heartened and encouraged by the resulting cooperation. However, in the case of software used on network servers, this result may fail to come about. The GNU General Public License permits making a modified version and letting the public access it on a server without ever releasing its source code to the public. + +The GNU Affero General Public License is designed specifically to ensure that, in such cases, the modified source code becomes available to the community. It requires the operator of a network server to provide the source code of the modified version running there to the users of that server. Therefore, public use of a modified version, on a publicly accessible server, gives the public access to the source code of the modified version. + +An older license, called the Affero General Public License and published by Affero, was designed to accomplish similar goals. This is a different license, not a version of the Affero GPL, but Affero has released a new version of the Affero GPL which permits relicensing under this license. + +The precise terms and conditions for copying, distribution and modification follow. + + TERMS AND CONDITIONS + +0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public License. + +"Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based on the Program. + +To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. + +A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +"Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +"Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. + +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. + +A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the Program, your modified version must prominently offer all users interacting with it remotely through a computer network (if your version supports such interaction) an opportunity to receive the Corresponding Source of your version by providing access to the Corresponding Source from a network server at no charge, through some standard or customary means of facilitating copying of software. This Corresponding Source shall include the Corresponding Source for any work covered by version 3 of the GNU General Public License that is incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the work with which it is combined will remain governed by version 3 of the GNU General Public License. + +14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions of the GNU Affero General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU Affero General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU Affero General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU Affero General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If your software can interact with users remotely through a computer network, -you should also make sure that it provides a way for users to get its source. -For example, if your program is a web application, its interface could display -a "Source" link that leads users to an archive of the code. There are many -ways you could offer source, and different solutions will be better for different -programs; see section 13 for the specific requirements. +If your software can interact with users remotely through a computer network, you should also make sure that it provides a way for users to get its source. For example, if your program is a web application, its interface could display a "Source" link that leads users to an archive of the code. There are many ways you could offer source, and different solutions will be better for different programs; see section 13 for the specific requirements. -You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. For -more information on this, and how to apply and follow the GNU AGPL, see . +You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU AGPL, see . diff --git a/options/license/AMDPLPA b/options/license/AMDPLPA index 48e58609f..a58a8525f 100644 --- a/options/license/AMDPLPA +++ b/options/license/AMDPLPA @@ -1,86 +1,20 @@ Copyright (c) 2006, 2007 Advanced Micro Devices, Inc. - All rights reserved. -Redistribution and use in any form of this material and any product thereof -including software in source or binary forms, along with any related documentation, -with or without modification ("this material"), is permitted provided that -the following conditions are met: +Redistribution and use in any form of this material and any product thereof including software in source or binary forms, along with any related documentation, with or without modification ("this material"), is permitted provided that the following conditions are met: -Redistributions of source code of any software must retain the above copyright -notice and all terms of this license as part of the code. + Redistributions of source code of any software must retain the above copyright notice and all terms of this license as part of the code. -Redistributions in binary form of any software must reproduce the above copyright -notice and all terms of this license in any related documentation and/or other -materials. + Redistributions in binary form of any software must reproduce the above copyright notice and all terms of this license in any related documentation and/or other materials. -Neither the names nor trademarks of Advanced Micro Devices, Inc. or any copyright -holders or contributors may be used to endorse or promote products derived -from this material without specific prior written permission. + Neither the names nor trademarks of Advanced Micro Devices, Inc. or any copyright holders or contributors may be used to endorse or promote products derived from this material without specific prior written permission. -Notice about U.S. Government restricted rights: This material is provided -with "RESTRICTED RIGHTS." Use, duplication or disclosure by the U.S. Government -is subject to the full extent of restrictions set forth in FAR52.227 and DFARS252.227 -et seq., or any successor or applicable regulations. Use of this material -by the U.S. Government constitutes acknowledgment of the proprietary rights -of Advanced Micro Devices, Inc. and any copyright holders and contributors. + Notice about U.S. Government restricted rights: This material is provided with "RESTRICTED RIGHTS." Use, duplication or disclosure by the U.S. Government is subject to the full extent of restrictions set forth in FAR52.227 and DFARS252.227 et seq., or any successor or applicable regulations. Use of this material by the U.S. Government constitutes acknowledgment of the proprietary rights of Advanced Micro Devices, Inc. and any copyright holders and contributors. -ANY BREACH OF ANY TERM OF THIS LICENSE SHALL RESULT IN THE IMMEDIATE REVOCATION -OF ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL. + ANY BREACH OF ANY TERM OF THIS LICENSE SHALL RESULT IN THE IMMEDIATE REVOCATION OF ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL. -THIS MATERIAL IS PROVIDED BY ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT -HOLDERS AND CONTRIBUTORS "AS IS" IN ITS CURRENT CONDITION AND WITHOUT ANY -REPRESENTATIONS, GUARANTEE, OR WARRANTY OF ANY KIND OR IN ANY WAY RELATED -TO SUPPORT, INDEMNITY, ERROR FREE OR UNINTERRUPTED OPERATION, OR THAT IT IS -FREE FROM DEFECTS OR VIRUSES. ALL OBLIGATIONS ARE HEREBY DISCLAIMED - WHETHER -EXPRESS, IMPLIED, OR STATUTORY - INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED -WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, -COMPLETENESS, OPERABILITY, QUALITY OF SERVICE, OR NON-INFRINGEMENT. IN NO -EVENT SHALL ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, REVENUE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED OR BASED ON ANY THEORY OF LIABILITY ARISING IN ANY WAY RELATED -TO THIS MATERIAL, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE ENTIRE -AND AGGREGATE LIABILITY OF ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT -HOLDERS AND CONTRIBUTORS SHALL NOT EXCEED TEN DOLLARS (US $10.00). ANYONE -REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL ACCEPTS THIS ALLOCATION -OF RISK AND AGREES TO RELEASE ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT -HOLDERS AND CONTRIBUTORS FROM ANY AND ALL LIABILITIES, OBLIGATIONS, CLAIMS, -OR DEMANDS IN EXCESS OF TEN DOLLARS (US $10.00). THE FOREGOING ARE ESSENTIAL -TERMS OF THIS LICENSE AND, IF ANY OF THESE TERMS ARE CONSTRUED AS UNENFORCEABLE, -FAIL IN ESSENTIAL PURPOSE, OR BECOME VOID OR DETRIMENTAL TO ADVANCED MICRO -DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS FOR ANY REASON, THEN -ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL SHALL TERMINATE IMMEDIATELY. -MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF THIS -LICENSE OR ANY AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. +THIS MATERIAL IS PROVIDED BY ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" IN ITS CURRENT CONDITION AND WITHOUT ANY REPRESENTATIONS, GUARANTEE, OR WARRANTY OF ANY KIND OR IN ANY WAY RELATED TO SUPPORT, INDEMNITY, ERROR FREE OR UNINTERRUPTED OPERATION, OR THAT IT IS FREE FROM DEFECTS OR VIRUSES. ALL OBLIGATIONS ARE HEREBY DISCLAIMED - WHETHER EXPRESS, IMPLIED, OR STATUTORY - INCLUDING, BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, ACCURACY, COMPLETENESS, OPERABILITY, QUALITY OF SERVICE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, PUNITIVE, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, REVENUE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED OR BASED ON ANY THEORY OF LIABILITY ARISING IN ANY WAY RELATED TO THIS MATERIAL, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE ENTIRE AND AGGREGATE LIABILITY OF ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS SHALL NOT EXCEED TEN DOLLARS (US $10.00). ANYONE REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL ACCEPTS THIS ALLOCATION OF RISK AND AGREES TO RELEASE ADVANCED MICRO DEVICES, INC. AND ANY COPYRIGHT HOLDERS AND CONTRIBUTORS FROM ANY AND ALL LIABILITIES, OBLIGATIONS, CLAIMS, OR DEMANDS IN EXCESS OF TEN DOLLARS (US $10.00). THE FOREGOING ARE ESSENTIAL TERMS OF THIS LICENSE AND, IF ANY OF THESE TERMS ARE CONSTRUED AS UNENFORCEABLE, FAIL IN ESSENTIAL PURPOSE, OR BECOME VOID OR DETRIMENTAL TO ADVANCED MICRO DEVICES, INC. OR ANY COPYRIGHT HOLDERS OR CONTRIBUTORS FOR ANY REASON, THEN ALL RIGHTS TO REDISTRIBUTE, ACCESS OR USE THIS MATERIAL SHALL TERMINATE IMMEDIATELY. MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF THIS LICENSE OR ANY AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. -NOTICE IS HEREBY PROVIDED, AND BY REDISTRIBUTING OR ACCESSING OR USING THIS -MATERIAL SUCH NOTICE IS ACKNOWLEDGED, THAT THIS MATERIAL MAY BE SUBJECT TO -RESTRICTIONS UNDER THE LAWS AND REGULATIONS OF THE UNITED STATES OR OTHER -COUNTRIES, WHICH INCLUDE BUT ARE NOT LIMITED TO, U.S. EXPORT CONTROL LAWS -SUCH AS THE EXPORT ADMINISTRATION REGULATIONS AND NATIONAL SECURITY CONTROLS -AS DEFINED THEREUNDER, AS WELL AS STATE DEPARTMENT CONTROLS UNDER THE U.S. -MUNITIONS LIST. THIS MATERIAL MAY NOT BE USED, RELEASED, TRANSFERRED, IMPORTED, -EXPORTED AND/OR RE- EXPORTED IN ANY MANNER PROHIBITED UNDER ANY APPLICABLE -LAWS, INCLUDING U.S. EXPORT CONTROL LAWS REGARDING SPECIFICALLY DESIGNATED -PERSONS, COUNTRIES AND NATIONALS OF COUNTRIES SUBJECT TO NATIONAL SECURITY -CONTROLS. MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION -OF ANY LICENSE OR AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. +NOTICE IS HEREBY PROVIDED, AND BY REDISTRIBUTING OR ACCESSING OR USING THIS MATERIAL SUCH NOTICE IS ACKNOWLEDGED, THAT THIS MATERIAL MAY BE SUBJECT TO RESTRICTIONS UNDER THE LAWS AND REGULATIONS OF THE UNITED STATES OR OTHER COUNTRIES, WHICH INCLUDE BUT ARE NOT LIMITED TO, U.S. EXPORT CONTROL LAWS SUCH AS THE EXPORT ADMINISTRATION REGULATIONS AND NATIONAL SECURITY CONTROLS AS DEFINED THEREUNDER, AS WELL AS STATE DEPARTMENT CONTROLS UNDER THE U.S. MUNITIONS LIST. THIS MATERIAL MAY NOT BE USED, RELEASED, TRANSFERRED, IMPORTED, EXPORTED AND/OR RE- EXPORTED IN ANY MANNER PROHIBITED UNDER ANY APPLICABLE LAWS, INCLUDING U.S. EXPORT CONTROL LAWS REGARDING SPECIFICALLY DESIGNATED PERSONS, COUNTRIES AND NATIONALS OF COUNTRIES SUBJECT TO NATIONAL SECURITY CONTROLS. MOREOVER, THE FOREGOING SHALL SURVIVE ANY EXPIRATION OR TERMINATION OF ANY LICENSE OR AGREEMENT OR ACCESS OR USE RELATED TO THIS MATERIAL. -This license forms the entire agreement regarding the subject matter hereof -and supersedes all proposals and prior discussions and writings between the -parties with respect thereto. This license does not affect any ownership, -rights, title, or interest in, or relating to, this material. No terms of -this license can be modified or waived, and no breach of this license can -be excused, unless done so in a writing signed by all affected parties. Each -term of this license is separately enforceable. If any term of this license -is determined to be or becomes unenforceable or illegal, such term shall be -reformed to the minimum extent necessary in order for this license to remain -in effect in accordance with its terms as modified by such reformation. This -license shall be governed by and construed in accordance with the laws of -the State of Texas without regard to rules on conflicts of law of any state -or jurisdiction or the United Nations Convention on the International Sale -of Goods. All disputes arising out of this license shall be subject to the -jurisdiction of the federal and state courts in Austin, Texas, and all defenses -are hereby waived concerning personal jurisdiction and venue of these courts. +This license forms the entire agreement regarding the subject matter hereof and supersedes all proposals and prior discussions and writings between the parties with respect thereto. This license does not affect any ownership, rights, title, or interest in, or relating to, this material. No terms of this license can be modified or waived, and no breach of this license can be excused, unless done so in a writing signed by all affected parties. Each term of this license is separately enforceable. If any term of this license is determined to be or becomes unenforceable or illegal, such term shall be reformed to the minimum extent necessary in order for this license to remain in effect in accordance with its terms as modified by such reformation. This license shall be governed by and construed in accordance with the laws of the State of Texas without regard to rules on conflicts of law of any state or jurisdiction or the United Nations Convention on the International Sale of Goods. All disputes arising out of this license shall be subject to the jurisdiction of the federal and state courts in Austin, Texas, and all defenses are hereby waived concerning personal jurisdiction and venue of these courts. diff --git a/options/license/AML b/options/license/AML index 7e5fc5218..a9d91ffc8 100644 --- a/options/license/AML +++ b/options/license/AML @@ -1,36 +1,9 @@ Copyright: Copyright (c) 2006 by Apple Computer, Inc., All Rights Reserved. -IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. -("Apple") in consideration of your agreement to the following terms, and your -use, installation, modification or redistribution of this Apple software constitutes -acceptance of these terms. If you do not agree with these terms, please do -not use, install, modify or redistribute this Apple software. +IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in consideration of your agreement to the following terms, and your use, installation, modification or redistribution of this Apple software constitutes acceptance of these terms. If you do not agree with these terms, please do not use, install, modify or redistribute this Apple software. -In consideration of your agreement to abide by the following terms, and subject -to these terms, Apple grants you a personal, non-exclusive license, under -Apple's copyrights in this original Apple software (the "Apple Software"), -to use, reproduce, modify and redistribute the Apple Software, with or without -modifications, in source and/or binary forms; provided that if you redistribute -the Apple Software in its entirety and without modifications, you must retain -this notice and the following text and disclaimers in all such redistributions -of the Apple Software. Neither the name, trademarks, service marks or logos -of Apple Computer, Inc. may be used to endorse or promote products derived -from the Apple Software without specific prior written permission from Apple. -Except as expressly stated in this notice, no other rights or licenses, express -or implied, are granted by Apple herein, including but not limited to any -patent rights that may be infringed by your derivative works or by other works -in which the Apple Software may be incorporated. +In consideration of your agreement to abide by the following terms, and subject to these terms, Apple grants you a personal, non-exclusive license, under Apple's copyrights in this original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the Apple Software, with or without modifications, in source and/or binary forms; provided that if you redistribute the Apple Software in its entirety and without modifications, you must retain this notice and the following text and disclaimers in all such redistributions of the Apple Software. Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to endorse or promote products derived from the Apple Software without specific prior written permission from Apple. Except as expressly stated in this notice, no other rights or licenses, express or implied, are granted by Apple herein, including but not limited to any patent rights that may be infringed by your derivative works or by other works in which the Apple Software may be incorporated. -The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO -WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES -OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, -REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION -WITH YOUR PRODUCTS. +The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. -IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION -OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE -HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/AMPAS b/options/license/AMPAS index 5bc509d17..0fc771d75 100644 --- a/options/license/AMPAS +++ b/options/license/AMPAS @@ -1,36 +1,13 @@ -Copyright (c) 2006 Academy of Motion Picture Arts and Sciences ("A.M.P.A.S."). -Portions contributed by others as indicated. All rights reserved. +Copyright (c) 2006 Academy of Motion Picture Arts and Sciences ("A.M.P.A.S."). Portions contributed by others as indicated. All rights reserved. -A world-wide, royalty-free, non-exclusive right to distribute, copy, modify, -create derivatives, and use, in source and binary forms, is hereby granted, -subject to acceptance of this license. Performance of any of the aforementioned -acts indicates acceptance to be bound by the following terms and conditions: +A world-wide, royalty-free, non-exclusive right to distribute, copy, modify, create derivatives, and use, in source and binary forms, is hereby granted, subject to acceptance of this license. Performance of any of the aforementioned acts indicates acceptance to be bound by the following terms and conditions: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the Disclaimer of Warranty. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the Disclaimer of Warranty. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the Disclaimer of Warranty in the documentation -and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the Disclaimer of Warranty in the documentation and/or other materials provided with the distribution. -* Nothing in this license shall be deemed to grant any rights to trademarks, -copyrights, patents, trade secrets or any other intellectual property of A.M.P.A.S. -or any contributors, except as expressly stated herein, and neither the name -of A.M.P.A.S. nor of any other contributors to this software, may be used -to endorse or promote products derived from this software without specific -prior written permission of A.M.P.A.S. or contributor, as appropriate. + * Nothing in this license shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of A.M.P.A.S. or any contributors, except as expressly stated herein, and neither the name of A.M.P.A.S. nor of any other contributors to this software, may be used to endorse or promote products derived from this software without specific prior written permission of A.M.P.A.S. or contributor, as appropriate. -This license shall be governed by the laws of the State of California, and -subject to the jurisdiction of the courts therein. +This license shall be governed by the laws of the State of California, and subject to the jurisdiction of the courts therein. -Disclaimer of Warranty: THIS SOFTWARE IS PROVIDED BY A.M.P.A.S. AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, -AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL A.M.P.A.S., ANY CONTRIBUTORS -OR DISTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. +Disclaimer of Warranty: THIS SOFTWARE IS PROVIDED BY A.M.P.A.S. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL A.M.P.A.S., ANY CONTRIBUTORS OR DISTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/ANTLR-PD b/options/license/ANTLR-PD index c0111dfff..d75060dac 100644 --- a/options/license/ANTLR-PD +++ b/options/license/ANTLR-PD @@ -1,16 +1,5 @@ ANTLR 2 License -We reserve no legal rights to the ANTLR--it is fully in the public domain. -An individual or company may do whatever they wish with source code distributed -with ANTLR or the code generated by ANTLR, including the incorporation of -ANTLR, or its output, into commerical software. +We reserve no legal rights to the ANTLR--it is fully in the public domain. An individual or company may do whatever they wish with source code distributed with ANTLR or the code generated by ANTLR, including the incorporation of ANTLR, or its output, into commerical software. -We encourage users to develop software with ANTLR. However, we do ask that -credit is given to us for developing ANTLR. By "credit", we mean that if you -use ANTLR or incorporate any source code into one of your programs (commercial -product, research project, or otherwise) that you acknowledge this fact somewhere -in the documentation, research report, etc... If you like ANTLR and have developed -a nice tool with the output, please mention that you developed it using ANTLR. -In addition, we ask that the headers remain intact in our source code. As -long as these guidelines are kept, we expect to continue enhancing this system -and expect to make other tools available as they are completed. +We encourage users to develop software with ANTLR. However, we do ask that credit is given to us for developing ANTLR. By "credit", we mean that if you use ANTLR or incorporate any source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in the documentation, research report, etc... If you like ANTLR and have developed a nice tool with the output, please mention that you developed it using ANTLR. In addition, we ask that the headers remain intact in our source code. As long as these guidelines are kept, we expect to continue enhancing this system and expect to make other tools available as they are completed. diff --git a/options/license/ANTLR-PD-fallback b/options/license/ANTLR-PD-fallback new file mode 100644 index 000000000..12bfe7373 --- /dev/null +++ b/options/license/ANTLR-PD-fallback @@ -0,0 +1,7 @@ +ANTLR 2 License + +We reserve no legal rights to the ANTLR--it is fully in the public domain. An individual or company may do whatever they wish with source code distributed with ANTLR or the code generated by ANTLR, including the incorporation of ANTLR, or its output, into commerical software. + +We encourage users to develop software with ANTLR. However, we do ask that credit is given to us for developing ANTLR. By "credit", we mean that if you use ANTLR or incorporate any source code into one of your programs (commercial product, research project, or otherwise) that you acknowledge this fact somewhere in the documentation, research report, etc... If you like ANTLR and have developed a nice tool with the output, please mention that you developed it using ANTLR. In addition, we ask that the headers remain intact in our source code. As long as these guidelines are kept, we expect to continue enhancing this system and expect to make other tools available as they are completed. + +In countries where the Public Domain status of the work may not be valid, the author grants a copyright licence to the general public to deal in the work without restriction and permission to sublicence derivates under the terms of any (OSI approved) Open Source licence. diff --git a/options/license/APAFML b/options/license/APAFML index a76627c18..a7824e26c 100644 --- a/options/license/APAFML +++ b/options/license/APAFML @@ -1,10 +1,3 @@ -Copyright (c) 1985, 1987, 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems -Incorporated. All Rights Reserved. +Copyright (c) 1985, 1987, 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. -This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, -and distributed for any purpose and without charge, with or without modification, -provided that all copyright notices are retained; that the AFM files are not -distributed without this file; that all modifications to this file or any -of the AFM files are prominently noted in the modified file(s); and that this -paragraph is not modified. Adobe Systems has no responsibility or obligation -to support the use of the AFM files. +This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any purpose and without charge, with or without modification, provided that all copyright notices are retained; that the AFM files are not distributed without this file; that all modifications to this file or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files. diff --git a/options/license/APL-1.0 b/options/license/APL-1.0 index 3b4000256..261f2d687 100644 --- a/options/license/APL-1.0 +++ b/options/license/APL-1.0 @@ -1,863 +1,295 @@ ADAPTIVE PUBLIC LICENSE - Version 1.0 -THE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THIS ADAPTIVE PUBLIC LICENSE -("LICENSE"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE LICENSED WORK CONSTITUTES -RECIPIENT'S ACCEPTANCE OF THIS LICENSE AND ITS TERMS, WHETHER OR NOT SUCH -RECIPIENT READS THE TERMS OF THIS LICENSE. "LICENSED WORK" AND "RECIPIENT" -ARE DEFINED BELOW. +THE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THIS ADAPTIVE PUBLIC LICENSE ("LICENSE"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE LICENSED WORK CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS LICENSE AND ITS TERMS, WHETHER OR NOT SUCH RECIPIENT READS THE TERMS OF THIS LICENSE. "LICENSED WORK" AND "RECIPIENT" ARE DEFINED BELOW. -IMPORTANT NOTE: This License is "adaptive", and the generic version or another -version of an Adaptive Public License should not be relied upon to determine -your rights and obligations under this License. You must read the specific -Adaptive Public License that you receive with the Licensed Work, as certain -terms are defined at the outset by the Initial Contributor. +IMPORTANT NOTE: This License is "adaptive", and the generic version or another version of an Adaptive Public License should not be relied upon to determine your rights and obligations under this License. You must read the specific Adaptive Public License that you receive with the Licensed Work, as certain terms are defined at the outset by the Initial Contributor. -See Section 2.2 below, Exhibit A attached, and any Suppfile.txt accompanying -this License to determine the specific adaptive features applicable to this -License. For example, without limiting the foregoing, (a) for selected choice -of law and jurisdiction see Part 3 of Exhibit A; (b) for the selected definition -of Third Party see Part 4 of Exhibit A; and (c) for selected patent licensing -terms (if any) see Section 2.2 below and Part 6 of Exhibit A. +See Section 2.2 below, Exhibit A attached, and any Suppfile.txt accompanying this License to determine the specific adaptive features applicable to this License. For example, without limiting the foregoing, (a) for selected choice of law and jurisdiction see Part 3 of Exhibit A; (b) for the selected definition of Third Party see Part 4 of Exhibit A; and (c) for selected patent licensing terms (if any) see Section 2.2 below and Part 6 of Exhibit A. - 1. DEFINITIONS. +1. DEFINITIONS. - 1.1. "CONTRIBUTION" means: +1.1. "CONTRIBUTION" means: -(a) In the case of the Initial Contributor, the Initial Work distributed under -this License by the Initial Contributor; and + (a) In the case of the Initial Contributor, the Initial Work distributed under this License by the Initial Contributor; and + (b) In the case of each Subsequent Contributor, the Subsequent Work originating from and distributed by such Subsequent Contributor. -(b) In the case of each Subsequent Contributor, the Subsequent Work originating -from and distributed by such Subsequent Contributor. +1.2. "DESIGNATED WEB SITE" means the web site having the URL identified in Part 1 of Exhibit A, which URL may be changed by the Initial Contributor by posting on the current Designated Web Site the new URL for at least sixty (60) days. -1.2. "DESIGNATED WEB SITE" means the web site having the URL identified in -Part 1 of Exhibit A, which URL may be changed by the Initial Contributor by -posting on the current Designated Web Site the new URL for at least sixty -(60) days. +1.3. "DISTRIBUTOR" means any Person that distributes the Licensed Work or any portion thereof to at least one Third Party. -1.3. "DISTRIBUTOR" means any Person that distributes the Licensed Work or -any portion thereof to at least one Third Party. - -1.4. "ELECTRONIC DISTRIBUTION MECHANISM" means any mechanism generally accepted -in the software development community for the electronic transfer of data. +1.4. "ELECTRONIC DISTRIBUTION MECHANISM" means any mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. "EXECUTABLE" means the Licensed Work in any form other than Source Code. -1.6. "GOVERNING JURISDICTION" means the state, province or other legal jurisdiction -identified in Part 3 of Exhibit A. +1.6. "GOVERNING JURISDICTION" means the state, province or other legal jurisdiction identified in Part 3 of Exhibit A. -1.7. "INDEPENDENT MODULE" means a separate module of software and/or data -that is not a derivative work of or copied from the Licensed Work or any portion -thereof. In addition, a module does not qualify as an Independent Module but -instead forms part of the Licensed Work if the module: (a) is embedded in -the Licensed Work; (b) is included by reference in the Licensed Work other -than by a function call or a class reference; or (c) must be included or contained, -in whole or in part, within a file directory or subdirectory actually containing -files making up the Licensed Work. +1.7. "INDEPENDENT MODULE" means a separate module of software and/or data that is not a derivative work of or copied from the Licensed Work or any portion thereof. In addition, a module does not qualify as an Independent Module but instead forms part of the Licensed Work if the module: (a) is embedded in the Licensed Work; (b) is included by reference in the Licensed Work other than by a function call or a class reference; or (c) must be included or contained, in whole or in part, within a file directory or subdirectory actually containing files making up the Licensed Work. -1.8. "INITIAL CONTRIBUTOR" means the Person or entity identified as the Initial -Contributor in the notice required by Part 1 of Exhibit A. +1.8. "INITIAL CONTRIBUTOR" means the Person or entity identified as the Initial Contributor in the notice required by Part 1 of Exhibit A. -1.9. "INITIAL WORK" means the initial Source Code, object code (if any) and -documentation for the computer program identified in Part 2 of Exhibit A, -as such Source Code, object code and documentation is distributed under this -License by the Initial Contributor. +1.9. "INITIAL WORK" means the initial Source Code, object code (if any) and documentation for the computer program identified in Part 2 of Exhibit A, as such Source Code, object code and documentation is distributed under this License by the Initial Contributor. -1.10. "LARGER WORK" means a work that combines the Licensed Work or portions -thereof with code not governed by this License. +1.10. "LARGER WORK" means a work that combines the Licensed Work or portions thereof with code not governed by this License. -1.11. "LICENSED WORK" means the Initial Work and/or any Subsequent Work, in -each case including portions thereof. +1.11. "LICENSED WORK" means the Initial Work and/or any Subsequent Work, in each case including portions thereof. - 1.12. "LICENSE NOTICE" has the meaning assigned in Part 5 of Exhibit A. +1.12. "LICENSE NOTICE" has the meaning assigned in Part 5 of Exhibit A. -1.13. "MODIFICATION" or "MODIFICATIONS" means any change to and/or addition -to the Licensed Work. +1.13. "MODIFICATION" or "MODIFICATIONS" means any change to and/or addition to the Licensed Work. -1.14. "PERSON" means an individual or other legal entity, including a corporation, -partnership or other body. +1.14. "PERSON" means an individual or other legal entity, including a corporation, partnership or other body. -1.15. "RECIPIENT" means any Person who receives or obtains the Licensed Work -under this License (by way of example, without limiting the foregoing, any -Subsequent Contributor or Distributor). - -1.16. "SOURCE CODE" means the source code for a computer program, including -the source code for all modules and components of the computer program, plus -any associated interface definition files, and scripts used to control compilation -and installation of an executable. - -1.17. "SUBSEQUENT CONTRIBUTOR" means any Person that makes or contributes -to the making of any Subsequent Work and that distributes that Subsequent -Work to at least one Third Party. - -1.18. "SUBSEQUENT WORK" means a work that has resulted or arises from changes -to and/or additions to: - - (a) the Initial Work; - - (b) any other Subsequent Work; or - -(c) to any combination of the Initial Work and any such other Subsequent Work; - -where such changes and/or additions originate from a Subsequent Contributor. -A Subsequent Work will "originate" from a Subsequent Contributor if the Subsequent -Work was a result of efforts by such Subsequent Contributor (or anyone acting -on such Subsequent Contributor's behalf, such as, a contractor or other entity -that is engaged by or under the direction of the Subsequent Contributor). -For greater certainty, a Subsequent Work expressly excludes and shall not -capture within its meaning any Independent Module. - -1.19. "SUPPLEMENT FILE" means a file distributed with the Licensed Work having -a file name "suppfile.txt". - - 1.20. "THIRD PARTY" has the meaning assigned in Part 4 of Exhibit A. - - 2. LICENSE. - - 2.1. COPYRIGHT LICENSE FROM INITIAL AND SUBSEQUENT CONTRIBUTORS. - -(a) Subject to the terms of this License, the Initial Contributor hereby grants -each Recipient a world-wide, royalty-free, non-exclusive copyright license -to: - -(i) reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Initial Work; and - -(ii) reproduce, publicly display, publicly perform, distribute, and sublicense -any derivative works (if any) prepared by Recipient; - -in Source Code and Executable form, either with other Modifications, on an -unmodified basis, or as part of a Larger Work. - -(b) Subject to the terms of this License, each Subsequent Contributor hereby -grants each Recipient a world-wide, royalty-free, non-exclusive copyright -license to: - -(i) reproduce, prepare derivative works of, publicly display, publicly perform, -distribute and sublicense the Subsequent Work of such Subsequent Contributor; -and - -(ii) reproduce, publicly display, publicly perform, distribute, and sublicense -any derivative works (if any) prepared by Recipient; - -in Source Code and Executable form, either with other Modifications, on an -unmodified basis, or as part of a Larger Work. - - 2.2. PATENT LICENSE FROM INITIAL AND SUBSEQUENT CONTRIBUTORS. - -(a) This License does not include or grant any patent license whatsoever from -the Initial Contributor, Subsequent Contributor, or any Distributor unless, -at the time the Initial Work is first distributed or made available under -this License (as the case may be), the Initial Contributor has selected pursuant -to Part 6 of Exhibit A the patent terms in paragraphs A, B, C, D and E from -Part 6 of Exhibit A. If this is not done then the Initial Work and any other -Subsequent Work is made available under the License without any patent license -(the "PATENTS-EXCLUDED LICENSE"). - -(b) However, the Initial Contributor may subsequently distribute or make available -(as the case may be) future copies of: (1) the Initial Work; or (2) any Licensed -Work distributed by the Initial Contributor which includes the Initial Work -(or any portion thereof) and/or any Modification made by the Initial Contributor; -available under a License which includes a patent license (the "PATENTS-INCLUDED -LICENSE") by selecting pursuant to Part 6 of Exhibit A the patent terms in -paragraphs A, B, C, D and E from Part 6 of Exhibit A, when the Initial Contributor -distributes or makes available (as the case may be) such future copies under -this License. - -(c) If any Recipient receives or obtains one or more copies of the Initial -Work or any other portion of the Licensed Work under the Patents-Included -License, then all licensing of such copies under this License shall include -the terms in paragraphs A, B, C, D and E from Part 6 of Exhibit A and that -Recipient shall not be able to rely upon the Patents-Excluded License for -any such copies. However, all Recipients that receive one or more copies of -the Initial Work or any other portion of the Licensed Work under a copy of -the License which includes the Patents-Excluded License shall have no patent -license with respect to such copies received under the Patents-Excluded License -and availability and distribution of such copies, including Modifications -made by such Recipient to such copies, shall be under a copy of the License -without any patent license. - -(d) Where a Recipient uses in combination or combines any copy of the Licensed -Work (or portion thereof) licensed under a copy of the License having a Patents-Excluded -License with any copy of the Licensed Work (or portion thereof) licensed under -a copy of the License having a Patents-Included License, the combination (and -any portion thereof) shall, from the first time such Recipient uses, makes -available or distributes the combination (as the case may be), be subject -to only the terms of the License having the Patents-Included License which -shall include the terms in paragraphs A, B, C, D and E from Part 6 of Exhibit -A. - - 2.3. ACKNOWLEDGEMENT AND DISCLAIMER. - -Recipient understands and agrees that although Initial Contributor and each -Subsequent Contributor grants the licenses to its Contributions set forth -herein, no representation, warranty, guarantee or assurance is provided by -any Initial Contributor, Subsequent Contributor, or Distributor that the Licensed -Work does not infringe the patent or other intellectual property rights of -any other entity. Initial Contributor, Subsequent Contributor, and each Distributor -disclaims any liability to Recipient for claims brought by any other entity -based on infringement of intellectual property rights or otherwise, in relation -to the Licensed Works. As a condition to exercising the rights and licenses -granted hereunder, each Recipient hereby assumes sole responsibility to secure -any other intellectual property rights needed, if any. For example, without -limiting the foregoing disclaimers, if a third party patent license is required -to allow Recipient to distribute the Licensed Work, it is Recipient's responsibility -to acquire that license before distributing the Licensed Work. - - 2.4. RESERVATION. - -Nothing in this License shall be deemed to grant any rights to trademarks, -copyrights, patents, trade secrets or any other intellectual property of Initial -Contributor, Subsequent Contributor, or Distributor except as expressly stated -herein. - - 3. DISTRIBUTION OBLIGATIONS. - - 3.1. DISTRIBUTION GENERALLY. - -(a) A Subsequent Contributor shall make that Subsequent Contributor's Subsequent -Work(s) available to the public via an Electronic Distribution Mechanism for -a period of at least twelve (12) months. The aforesaid twelve (12) month period -shall begin within a reasonable time after the creation of the Subsequent -Work and no later than sixty (60) days after first distribution of that Subsequent -Contributor's Subsequent Work. - -(b) All Distributors must distribute the Licensed Work in accordance with -the terms of the License, and must include a copy of this License (including -without limitation Exhibit A and the accompanying Supplement File) with each -copy of the Licensed Work distributed. In particular, this License must be -prominently distributed with the Licensed Work in a file called "license.txt." -In addition, the License Notice in Part 5 of Exhibit A must be included at -the beginning of all Source Code files, and viewable to a user in any executable -such that the License Notice is reasonably brought to the attention of any -party using the Licensed Work. - - 3.2. EXECUTABLE DISTRIBUTIONS OF THE LICENSED WORK. - -A Distributor may choose to distribute the Licensed Work, or any portion thereof, -in Executable form (an "EXECUTABLE DISTRIBUTION") to any third party, under -the terms of Section 2 of this License, provided the Executable Distribution -is made available under and accompanied by a copy of this License, AND provided -at least ONE of the following conditions is fulfilled: - -(a) The Executable Distribution must be accompanied by the Source Code for -the Licensed Work making up the Executable Distribution, and the Source Code -must be distributed on the same media as the Executable Distribution or using -an Electronic Distribution Mechanism; or - -(b) The Executable Distribution must be accompanied with a written offer, -valid for at least thirty six (36) months, to give any third party under the -terms of this License, for a charge no more than the cost of physically performing -source distribution, a complete machine-readable copy of the Source Code for -the Licensed Work making up the Executable Distribution, to be available and -distributed using an Electronic Distribution Mechanism, and such Executable -Distribution must remain available in Source Code form to any third party -via the Electronic Distribution Mechanism (or any replacement Electronic Distribution -Mechanism the particular Distributor may reasonably need to turn to as a substitute) -for said at least thirty six (36) months. - -For greater certainty, the above-noted requirements apply to any Licensed -Work or portion thereof distributed to any third party in Executable form, -whether such distribution is made alone, in combination with a Larger Work -or Independent Modules, or in some other combination. - - 3.3. SOURCE CODE DISTRIBUTIONS. - -When a Distributor makes the Licensed Work, or any portion thereof, available -to any Person in Source Code form, it must be made available under this License -and a copy of this License must be included with each copy of the Source Code, -situated so that the copy of the License is conspicuously brought to the attention -of that Person. For greater clarification, this Section 3.3 applies to all -distribution of the Licensed Work in any Source Code form. A Distributor may -charge a fee for the physical act of transferring a copy, which charge shall -be no more than the cost of physically performing source distribution. - - 3.4. REQUIRED NOTICES IN SOURCE CODE. - -Each Subsequent Contributor must ensure that the notice set out in Part 5 -of Exhibit A is included in each file of the Source Code for each Subsequent -Work originating from that particular Subsequent Contributor, if such notice -is not already included in each such file. If it is not possible to put such -notice in a particular Source Code file due to its structure, then the Subsequent -Contributor must include such notice in a location (such as a relevant directory -in which the file is stored) where a user would be likely to look for such -a notice. - - 3.5. NO DISTRIBUTION REQUIREMENTS FOR INTERNALLY USED MODIFICATIONS. - -Notwithstanding Sections 3.2, 3.3 and 3.4, Recipient may, internally within -its own corporation or organization use the Licensed Work, including the Initial -Work and Subsequent Works, and make Modifications for internal use within -Recipient's own corporation or organization (collectively, "INTERNAL USE MODIFICATIONS"). -The Recipient shall have no obligation to distribute, in either Source Code -or Executable form, any such Internal Use Modifications made by Recipient -in the course of such internal use, except where required below in this Section -3.5. All Internal Use Modifications distributed to any Person, whether or -not a Third Party, shall be distributed pursuant to and be accompanied by -the terms of this License. If the Recipient chooses to distribute any such -Internal Use Modifications to any Third Party, then the Recipient shall be -deemed a Subsequent Contributor, and any such Internal Use Modifications distributed -to any Third Party shall be deemed a Subsequent Work originating from that -Subsequent Contributor, and shall from the first such instance become part -of the Licensed Work that must thereafter be distributed and made available -to third parties in accordance with the terms of Sections 3.1 to 3.4 inclusive. - - 3.6. INDEPENDENT MODULES. - -This License shall not apply to Independent Modules of any Initial Contributor, -Subsequent Contributor, Distributor or any Recipient, and such Independent -Modules may be licensed or made available under one or more separate license -agreements. - - 3.7. LARGER WORKS. - -Any Distributor or Recipient may create or contribute to a Larger Work by -combining any of the Licensed Work with other code not governed by the terms -of this License, and may distribute the Larger Work as one or more products. -However, in any such case, Distributor or Recipient (as the case may be) must -make sure that the requirements of this License are fulfilled for the Licensed -Work portion of the Larger Work. - - 3.8. DESCRIPTION OF DISTRIBUTED MODIFICATIONS. - -(a) Each Subsequent Contributor (including the Initial Contributor where the -Initial Contributor also qualifies as a Subsequent Contributor) must cause -each Subsequent Work created or contributed to by that Subsequent Contributor -to contain a file documenting the changes, in accordance with the requirements -of Part 1 of the Supplement File, that such Subsequent Contributor made in -the creation or contribution to that Subsequent Work. If no Supplement File -exists or no requirements are set out in Part 1 of the Supplement File, then -there are no requirements for Subsequent Contributors to document changes -that they make resulting in Subsequent Works. - -(b) The Initial Contributor may at any time introduce requirements or add -to or change earlier requirements (in each case, the "EARLIER DESCRIPTION -REQUIREMENTS") for documenting changes resulting in Subsequent Works by revising -Part 1 of each copy of the Supplement File distributed by the Initial Contributor -with future copies of the Licensed Work so that Part 1 then contains new requirements -(the "NEW DESCRIPTION REQUIREMENTS") for documenting such changes. - -(c) Any Recipient receiving at any time any copy of an Initial Work or any -Subsequent Work under a copy of this License (in each case, an "Earlier LICENSED -COPY") having the Earlier Description Requirements may choose, with respect -to each such Earlier Licensed Copy, to comply with the Earlier Description -Requirements or the New Description Requirements. Where a Recipient chooses -to comply with the New Description Requirements, that Recipient will, when -thereafter distributing any copies of any such Earlier Licensed Copy, include -a Supplement File having a section entitled Part 1 that contains a copy of -the New Description Requirements. - -(d) For greater certainty, the intent of Part 1 of the Supplement File is -to provide a mechanism (if any) by which Subsequent Contributors must document -changes that they make to the Licensed Work resulting in Subsequent Works. -Part 1 of any Supplement File shall not be used to increase or reduce the -scope of the license granted in Article 2 of this License or in any other -way increase or decrease the rights and obligations of any Recipient, and -shall at no time serve as the basis for terminating the License. Further, -a Recipient can be required to correct and change its documentation procedures -to comply with Part 1 of the Supplement File, but cannot be penalised with -damages. Part 1 of any Supplement File is only binding on each Recipient of -any Licensed Work to the extent Part 1 sets out the requirements for documenting -changes to the Initial Work or any Subsequent Work. - -(e) An example of a set of requirements for documenting changes and contributions -made by Subsequent Contributor is set out in Part 7 of Exhibit A of this License. -Part 7 is a sample only and is not binding on Recipients, unless (subject -to the earlier paragraphs of this Section 3.8) those are the requirements -that the Initial Contributor includes in Part 1 of the Supplement File with -the copies of the Initial Work distributed under this License. - - 3.9. USE OF DISTRIBUTOR NAME. - -The name of a Distributor may not be used by any other Distributor to endorse -or promote the Licensed Work or products derived from the Licensed Work, without -prior written permission. - - 3.10. LIMITED RECOGNITION OF INITIAL CONTRIBUTOR. - -(a) As a modest attribution to the Initial Contributor, in the hope that its -promotional value may help justify the time, money and effort invested in -writing the Initial Work, the Initial Contributor may include in Part 2 of -the Supplement File a requirement that each time an executable program resulting -from the Initial Work or any Subsequent Work, or a program dependent thereon, -is launched or run, a prominent display of the Initial Contributor's attribution -information must occur (the "ATTRIBUTION INFORMATION"). The Attribution Information -must be included at the beginning of each Source Code file. For greater certainty, -the Initial Contributor may specify in the Supplement File that the above -attribution requirement only applies to an executable program resulting from -the Initial Work or any Subsequent Work, but not a program dependent thereon. -The intent is to provide for reasonably modest attribution, therefore the -Initial Contributor may not require Recipients to display, at any time, more -than the following Attribution Information: (a) a copyright notice including -the name of the Initial Contributor; (b) a word or one phrase (not exceeding -10 words); (c) one digital image or graphic provided with the Initial Work; -and (d) a URL (collectively, the "ATTRIBUTION LIMITS"). - -(b) If no Supplement File exists, or no Attribution Information is set out -in Part 2 of the Supplement File, then there are no requirements for Recipients -to display any Attribution Information of the Initial Contributor. - -(c) Each Recipient acknowledges that all trademarks, service marks and/or -trade names contained within Part 2 of the Supplement File distributed with -the Licensed Work are the exclusive property of the Initial Contributor and -may only be used with the permission of the Initial Contributor, or under -circumstances otherwise permitted by law, or as expressly set out in this -License. - -3.11. For greater certainty, any description or attribution provisions contained -within a Supplement File may only be used to specify the nature of the description -or attribution requirements, as the case may be. Any provision in a Supplement -File that otherwise purports to modify, vary, nullify or amend any right, -obligation or representation contained herein shall be deemed void to that -extent, and shall be of no force or effect. - - 4. COMMERCIAL USE AND INDEMNITY. - - 4.1. COMMERCIAL SERVICES. - -A Recipient ("COMMERCIAL RECIPIENT") may choose to offer, and to charge a -fee for, warranty, support, indemnity or liability obligations (collectively, -"SERVICES") to one or more other Recipients or Distributors. However, such -Commercial Recipient may do so only on that Commercial Recipient's own behalf, -and not on behalf of any other Distributor or Recipient, and Commercial Recipient -must make it clear than any such warranty, support, indemnity or liability -obligation(s) is/are offered by Commercial Recipient alone. At no time may -Commercial Recipient use any Services to deny any party the Licensed Work -in Source Code or Executable form when so required under any of the other -terms of this License. For greater certainty, this Section 4.1 does not diminish -any of the other terms of this License, including without limitation the obligation -of the Commercial Recipient as a Distributor, when distributing any of the -Licensed Work in Source Code or Executable form, to make such distribution -royalty-free (subject to the right to charge a fee of no more than the cost -of physically performing Source Code or Executable distribution (as the case -may be)). - - 4.2. INDEMNITY. - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this License is -intended to facilitate the commercial use of the Licensed Work, the Distributor -who includes any of the Licensed Work in a commercial product offering should -do so in a manner which does not create potential liability for other Distributors. -Therefore, if a Distributor includes the Licensed Work in a commercial product -offering or offers any Services, such Distributor ("COMMERCIAL DISTRIBUTOR") -hereby agrees to defend and indemnify every other Distributor or Subsequent -Contributor (in each case an "INDEMNIFIED PARTY") against any losses, damages -and costs (collectively "LOSSES") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Party to the -extent caused by the acts or omissions of such Commercial Distributor in connection -with its distribution of any of the Licensed Work in a commercial product -offering or in connection with any Services. The obligations in this section -do not apply to any claims or Losses relating to any actual or alleged intellectual -property infringement. In order to qualify, an Indemnified Party must: (a) -promptly notify the Commercial Distributor in writing of such claim; and (b) -allow the Commercial Distributor to control, and co-operate with the Commercial -Distributor in, the defense and any related settlement negotiations. The Indemnified -Party may participate in any such claim at its own expense. - - 5. VERSIONS OF THE LICENSE. - - 5.1. NEW VERSIONS. - -The Initial Contributor may publish revised and/or new versions of the License -from time to time. Each version will be given a distinguishing version number. - - 5.2. EFFECT OF NEW VERSIONS. - -Once the Licensed Work or any portion thereof has been published by Initial -Contributor under a particular version of the License, Recipient may choose -to continue to use it under the terms of that version. However, if a Recipient -chooses to use the Licensed Work under the terms of any subsequent version -of the License published by the Initial Contributor, then from the date of -making this choice, the Recipient must comply with the terms of that subsequent -version with respect to all further reproduction, preparation of derivative -works, public display of, public performance of, distribution and sublicensing -by the Recipient in connection with the Licensed Work. No one other than the -Initial Contributor has the right to modify the terms applicable to the Licensed -Work - - 6. DISCLAIMER OF WARRANTY. - - 6.1. GENERAL DISCLAIMER. - -EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, THE LICENSED WORK IS PROVIDED -UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT ANY REPRESENTATION, WARRANTY, -GUARANTEE, ASSURANCE OR CONDITION OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, -MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO -THE QUALITY AND PERFORMANCE OF THE LICENSED WORK IS WITH RECIPIENT. SHOULD -ANY LICENSED WORK PROVE DEFECTIVE IN ANY RESPECT, RECIPIENT (NOT THE INITIAL -CONTRIBUTOR OR ANY SUBSEQUENT CONTRIBUTOR) ASSUMES THE COST OF ANY NECESSARY -SERVICING, REPAIR OR CORRECTION. THIS CLAUSE CONSTITUTES AN ESSENTIAL PART -OF THIS LICENSE. NO USE OF ANY LICENSED WORK IS AUTHORIZED HEREUNDER EXCEPT -UNDER THIS LICENSE INCLUDING WITHOUT LIMITATION THIS DISCLAIMER. - - 6.2. RESPONSIBILITY OF RECIPIENTS. - -Each Recipient is solely responsible for determining the appropriateness of -using and distributing the Licensed Work and assumes all risks associated -with its exercise of rights under this License, including but not limited -to the risks and costs of program errors, compliance with applicable laws, -damage to or loss of data, programs or equipment, and unavailability or interruption -of operations. - - 7. TERMINATION. - -7.1. This License shall continue until terminated in accordance with the express -terms herein. +1.15. "RECIPIENT" means any Person who receives or obtains the Licensed Work under this License (by way of example, without limiting the foregoing, any Subsequent Contributor or Distributor). + +1.16. "SOURCE CODE" means the source code for a computer program, including the source code for all modules and components of the computer program, plus any associated interface definition files, and scripts used to control compilation and installation of an executable. + +1.17. "SUBSEQUENT CONTRIBUTOR" means any Person that makes or contributes to the making of any Subsequent Work and that distributes that Subsequent Work to at least one Third Party. + +1.18. "SUBSEQUENT WORK" means a work that has resulted or arises from changes to and/or additions to: + + (a) the Initial Work; + (b) any other Subsequent Work; or + (c) to any combination of the Initial Work and any such other Subsequent Work; +where such changes and/or additions originate from a Subsequent Contributor. A Subsequent Work will "originate" from a Subsequent Contributor if the Subsequent Work was a result of efforts by such Subsequent Contributor (or anyone acting on such Subsequent Contributor's behalf, such as, a contractor or other entity that is engaged by or under the direction of the Subsequent Contributor). For greater certainty, a Subsequent Work expressly excludes and shall not capture within its meaning any Independent Module. + +1.19. "SUPPLEMENT FILE" means a file distributed with the Licensed Work having a file name "suppfile.txt". + +1.20. "THIRD PARTY" has the meaning assigned in Part 4 of Exhibit A. + +2. LICENSE. + +2.1. COPYRIGHT LICENSE FROM INITIAL AND SUBSEQUENT CONTRIBUTORS. + + (a) Subject to the terms of this License, the Initial Contributor hereby grants each Recipient a world-wide, royalty-free, non-exclusive copyright license to: + + (i) reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Initial Work; and + (ii) reproduce, publicly display, publicly perform, distribute, and sublicense any derivative works (if any) prepared by Recipient; +in Source Code and Executable form, either with other Modifications, on an unmodified basis, or as part of a Larger Work. + + (b) Subject to the terms of this License, each Subsequent Contributor hereby grants each Recipient a world-wide, royalty-free, non-exclusive copyright license to: + + (i) reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Subsequent Work of such Subsequent Contributor; and + (ii) reproduce, publicly display, publicly perform, distribute, and sublicense any derivative works (if any) prepared by Recipient; +in Source Code and Executable form, either with other Modifications, on an unmodified basis, or as part of a Larger Work. + +2.2. PATENT LICENSE FROM INITIAL AND SUBSEQUENT CONTRIBUTORS. + + (a) This License does not include or grant any patent license whatsoever from the Initial Contributor, Subsequent Contributor, or any Distributor unless, at the time the Initial Work is first distributed or made available under this License (as the case may be), the Initial Contributor has selected pursuant to Part 6 of Exhibit A the patent terms in paragraphs A, B, C, D and E from Part 6 of Exhibit A. If this is not done then the Initial Work and any other Subsequent Work is made available under the License without any patent license (the "PATENTS-EXCLUDED LICENSE"). + (b) However, the Initial Contributor may subsequently distribute or make available (as the case may be) future copies of: (1) the Initial Work; or (2) any Licensed Work distributed by the Initial Contributor which includes the Initial Work (or any portion thereof) and/or any Modification made by the Initial Contributor; available under a License which includes a patent license (the "PATENTS-INCLUDED LICENSE") by selecting pursuant to Part 6 of Exhibit A the patent terms in paragraphs A, B, C, D and E from Part 6 of Exhibit A, when the Initial Contributor distributes or makes available (as the case may be) such future copies under this License. + (c) If any Recipient receives or obtains one or more copies of the Initial Work or any other portion of the Licensed Work under the Patents-Included License, then all licensing of such copies under this License shall include the terms in paragraphs A, B, C, D and E from Part 6 of Exhibit A and that Recipient shall not be able to rely upon the Patents-Excluded License for any such copies. However, all Recipients that receive one or more copies of the Initial Work or any other portion of the Licensed Work under a copy of the License which includes the Patents-Excluded License shall have no patent license with respect to such copies received under the Patents-Excluded License and availability and distribution of such copies, including Modifications made by such Recipient to such copies, shall be under a copy of the License without any patent license. + (d) Where a Recipient uses in combination or combines any copy of the Licensed Work (or portion thereof) licensed under a copy of the License having a Patents-Excluded License with any copy of the Licensed Work (or portion thereof) licensed under a copy of the License having a Patents-Included License, the combination (and any portion thereof) shall, from the first time such Recipient uses, makes available or distributes the combination (as the case may be), be subject to only the terms of the License having the Patents-Included License which shall include the terms in paragraphs A, B, C, D and E from Part 6 of Exhibit A. + +2.3. ACKNOWLEDGEMENT AND DISCLAIMER. +Recipient understands and agrees that although Initial Contributor and each Subsequent Contributor grants the licenses to its Contributions set forth herein, no representation, warranty, guarantee or assurance is provided by any Initial Contributor, Subsequent Contributor, or Distributor that the Licensed Work does not infringe the patent or other intellectual property rights of any other entity. Initial Contributor, Subsequent Contributor, and each Distributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise, in relation to the Licensed Works. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, without limiting the foregoing disclaimers, if a third party patent license is required to allow Recipient to distribute the Licensed Work, it is Recipient's responsibility to acquire that license before distributing the Licensed Work. + +2.4. RESERVATION. +Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Initial Contributor, Subsequent Contributor, or Distributor except as expressly stated herein. + +3. DISTRIBUTION OBLIGATIONS. + +3.1. DISTRIBUTION GENERALLY. + + (a) A Subsequent Contributor shall make that Subsequent Contributor's Subsequent Work(s) available to the public via an Electronic Distribution Mechanism for a period of at least twelve (12) months. The aforesaid twelve (12) month period shall begin within a reasonable time after the creation of the Subsequent Work and no later than sixty (60) days after first distribution of that Subsequent Contributor's Subsequent Work. + (b) All Distributors must distribute the Licensed Work in accordance with the terms of the License, and must include a copy of this License (including without limitation Exhibit A and the accompanying Supplement File) with each copy of the Licensed Work distributed. In particular, this License must be prominently distributed with the Licensed Work in a file called "license.txt." In addition, the License Notice in Part 5 of Exhibit A must be included at the beginning of all Source Code files, and viewable to a user in any executable such that the License Notice is reasonably brought to the attention of any party using the Licensed Work. + +3.2. EXECUTABLE DISTRIBUTIONS OF THE LICENSED WORK. +A Distributor may choose to distribute the Licensed Work, or any portion thereof, in Executable form (an "EXECUTABLE DISTRIBUTION") to any third party, under the terms of Section 2 of this License, provided the Executable Distribution is made available under and accompanied by a copy of this License, AND provided at least ONE of the following conditions is fulfilled: + + (a) The Executable Distribution must be accompanied by the Source Code for the Licensed Work making up the Executable Distribution, and the Source Code must be distributed on the same media as the Executable Distribution or using an Electronic Distribution Mechanism; or + (b) The Executable Distribution must be accompanied with a written offer, valid for at least thirty six (36) months, to give any third party under the terms of this License, for a charge no more than the cost of physically performing source distribution, a complete machine-readable copy of the Source Code for the Licensed Work making up the Executable Distribution, to be available and distributed using an Electronic Distribution Mechanism, and such Executable Distribution must remain available in Source Code form to any third party via the Electronic Distribution Mechanism (or any replacement Electronic Distribution Mechanism the particular Distributor may reasonably need to turn to as a substitute) for said at least thirty six (36) months. + +For greater certainty, the above-noted requirements apply to any Licensed Work or portion thereof distributed to any third party in Executable form, whether such distribution is made alone, in combination with a Larger Work or Independent Modules, or in some other combination. + +3.3. SOURCE CODE DISTRIBUTIONS. +When a Distributor makes the Licensed Work, or any portion thereof, available to any Person in Source Code form, it must be made available under this License and a copy of this License must be included with each copy of the Source Code, situated so that the copy of the License is conspicuously brought to the attention of that Person. For greater clarification, this Section 3.3 applies to all distribution of the Licensed Work in any Source Code form. A Distributor may charge a fee for the physical act of transferring a copy, which charge shall be no more than the cost of physically performing source distribution. + +3.4. REQUIRED NOTICES IN SOURCE CODE. +Each Subsequent Contributor must ensure that the notice set out in Part 5 of Exhibit A is included in each file of the Source Code for each Subsequent Work originating from that particular Subsequent Contributor, if such notice is not already included in each such file. If it is not possible to put such notice in a particular Source Code file due to its structure, then the Subsequent Contributor must include such notice in a location (such as a relevant directory in which the file is stored) where a user would be likely to look for such a notice. + +3.5. NO DISTRIBUTION REQUIREMENTS FOR INTERNALLY USED MODIFICATIONS. +Notwithstanding Sections 3.2, 3.3 and 3.4, Recipient may, internally within its own corporation or organization use the Licensed Work, including the Initial Work and Subsequent Works, and make Modifications for internal use within Recipient's own corporation or organization (collectively, "INTERNAL USE MODIFICATIONS"). The Recipient shall have no obligation to distribute, in either Source Code or Executable form, any such Internal Use Modifications made by Recipient in the course of such internal use, except where required below in this Section 3.5. All Internal Use Modifications distributed to any Person, whether or not a Third Party, shall be distributed pursuant to and be accompanied by the terms of this License. If the Recipient chooses to distribute any such Internal Use Modifications to any Third Party, then the Recipient shall be deemed a Subsequent Contributor, and any such Internal Use Modifications distributed to any Third Party shall be deemed a Subsequent Work originating from that Subsequent Contributor, and shall from the first such instance become part of the Licensed Work that must thereafter be distributed and made available to third parties in accordance with the terms of Sections 3.1 to 3.4 inclusive. + +3.6. INDEPENDENT MODULES. +This License shall not apply to Independent Modules of any Initial Contributor, Subsequent Contributor, Distributor or any Recipient, and such Independent Modules may be licensed or made available under one or more separate license agreements. + +3.7. LARGER WORKS. +Any Distributor or Recipient may create or contribute to a Larger Work by combining any of the Licensed Work with other code not governed by the terms of this License, and may distribute the Larger Work as one or more products. However, in any such case, Distributor or Recipient (as the case may be) must make sure that the requirements of this License are fulfilled for the Licensed Work portion of the Larger Work. + +3.8. DESCRIPTION OF DISTRIBUTED MODIFICATIONS. + + (a) Each Subsequent Contributor (including the Initial Contributor where the Initial Contributor also qualifies as a Subsequent Contributor) must cause each Subsequent Work created or contributed to by that Subsequent Contributor to contain a file documenting the changes, in accordance with the requirements of Part 1 of the Supplement File, that such Subsequent Contributor made in the creation or contribution to that Subsequent Work. If no Supplement File exists or no requirements are set out in Part 1 of the Supplement File, then there are no requirements for Subsequent Contributors to document changes that they make resulting in Subsequent Works. + (b) The Initial Contributor may at any time introduce requirements or add to or change earlier requirements (in each case, the "EARLIER DESCRIPTION REQUIREMENTS") for documenting changes resulting in Subsequent Works by revising Part 1 of each copy of the Supplement File distributed by the Initial Contributor with future copies of the Licensed Work so that Part 1 then contains new requirements (the "NEW DESCRIPTION REQUIREMENTS") for documenting such changes. + (c) Any Recipient receiving at any time any copy of an Initial Work or any Subsequent Work under a copy of this License (in each case, an "Earlier LICENSED COPY") having the Earlier Description Requirements may choose, with respect to each such Earlier Licensed Copy, to comply with the Earlier Description Requirements or the New Description Requirements. Where a Recipient chooses to comply with the New Description Requirements, that Recipient will, when thereafter distributing any copies of any such Earlier Licensed Copy, include a Supplement File having a section entitled Part 1 that contains a copy of the New Description Requirements. + (d) For greater certainty, the intent of Part 1 of the Supplement File is to provide a mechanism (if any) by which Subsequent Contributors must document changes that they make to the Licensed Work resulting in Subsequent Works. Part 1 of any Supplement File shall not be used to increase or reduce the scope of the license granted in Article 2 of this License or in any other way increase or decrease the rights and obligations of any Recipient, and shall at no time serve as the basis for terminating the License. Further, a Recipient can be required to correct and change its documentation procedures to comply with Part 1 of the Supplement File, but cannot be penalised with damages. Part 1 of any Supplement File is only binding on each Recipient of any Licensed Work to the extent Part 1 sets out the requirements for documenting changes to the Initial Work or any Subsequent Work. + (e) An example of a set of requirements for documenting changes and contributions made by Subsequent Contributor is set out in Part 7 of Exhibit A of this License. Part 7 is a sample only and is not binding on Recipients, unless (subject to the earlier paragraphs of this Section 3.8) those are the requirements that the Initial Contributor includes in Part 1 of the Supplement File with the copies of the Initial Work distributed under this License. + +3.9. USE OF DISTRIBUTOR NAME. +The name of a Distributor may not be used by any other Distributor to endorse or promote the Licensed Work or products derived from the Licensed Work, without prior written permission. + +3.10. LIMITED RECOGNITION OF INITIAL CONTRIBUTOR. + + (a) As a modest attribution to the Initial Contributor, in the hope that its promotional value may help justify the time, money and effort invested in writing the Initial Work, the Initial Contributor may include in Part 2 of the Supplement File a requirement that each time an executable program resulting from the Initial Work or any Subsequent Work, or a program dependent thereon, is launched or run, a prominent display of the Initial Contributor's attribution information must occur (the "ATTRIBUTION INFORMATION"). The Attribution Information must be included at the beginning of each Source Code file. For greater certainty, the Initial Contributor may specify in the Supplement File that the above attribution requirement only applies to an executable program resulting from the Initial Work or any Subsequent Work, but not a program dependent thereon. The intent is to provide for reasonably modest attribution, therefore the Initial Contributor may not require Recipients to display, at any time, more than the following Attribution Information: (a) a copyright notice including the name of the Initial Contributor; (b) a word or one phrase (not exceeding 10 words); (c) one digital image or graphic provided with the Initial Work; and (d) a URL (collectively, the "ATTRIBUTION LIMITS"). + (b) If no Supplement File exists, or no Attribution Information is set out in Part 2 of the Supplement File, then there are no requirements for Recipients to display any Attribution Information of the Initial Contributor. + (c) Each Recipient acknowledges that all trademarks, service marks and/or trade names contained within Part 2 of the Supplement File distributed with the Licensed Work are the exclusive property of the Initial Contributor and may only be used with the permission of the Initial Contributor, or under circumstances otherwise permitted by law, or as expressly set out in this License. +3.11. For greater certainty, any description or attribution provisions contained within a Supplement File may only be used to specify the nature of the description or attribution requirements, as the case may be. Any provision in a Supplement File that otherwise purports to modify, vary, nullify or amend any right, obligation or representation contained herein shall be deemed void to that extent, and shall be of no force or effect. + +4. COMMERCIAL USE AND INDEMNITY. + +4.1. COMMERCIAL SERVICES. +A Recipient ("COMMERCIAL RECIPIENT") may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations (collectively, "SERVICES") to one or more other Recipients or Distributors. However, such Commercial Recipient may do so only on that Commercial Recipient's own behalf, and not on behalf of any other Distributor or Recipient, and Commercial Recipient must make it clear than any such warranty, support, indemnity or liability obligation(s) is/are offered by Commercial Recipient alone. At no time may Commercial Recipient use any Services to deny any party the Licensed Work in Source Code or Executable form when so required under any of the other terms of this License. For greater certainty, this Section 4.1 does not diminish any of the other terms of this License, including without limitation the obligation of the Commercial Recipient as a Distributor, when distributing any of the Licensed Work in Source Code or Executable form, to make such distribution royalty-free (subject to the right to charge a fee of no more than the cost of physically performing Source Code or Executable distribution (as the case may be)). + +4.2. INDEMNITY. +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this License is intended to facilitate the commercial use of the Licensed Work, the Distributor who includes any of the Licensed Work in a commercial product offering should do so in a manner which does not create potential liability for other Distributors. Therefore, if a Distributor includes the Licensed Work in a commercial product offering or offers any Services, such Distributor ("COMMERCIAL DISTRIBUTOR") hereby agrees to defend and indemnify every other Distributor or Subsequent Contributor (in each case an "INDEMNIFIED PARTY") against any losses, damages and costs (collectively "LOSSES") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Party to the extent caused by the acts or omissions of such Commercial Distributor in connection with its distribution of any of the Licensed Work in a commercial product offering or in connection with any Services. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Party must: (a) promptly notify the Commercial Distributor in writing of such claim; and (b) allow the Commercial Distributor to control, and co-operate with the Commercial Distributor in, the defense and any related settlement negotiations. The Indemnified Party may participate in any such claim at its own expense. + +5. VERSIONS OF THE LICENSE. + +5.1. NEW VERSIONS. +The Initial Contributor may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + +5.2. EFFECT OF NEW VERSIONS. +Once the Licensed Work or any portion thereof has been published by Initial Contributor under a particular version of the License, Recipient may choose to continue to use it under the terms of that version. However, if a Recipient chooses to use the Licensed Work under the terms of any subsequent version of the License published by the Initial Contributor, then from the date of making this choice, the Recipient must comply with the terms of that subsequent version with respect to all further reproduction, preparation of derivative works, public display of, public performance of, distribution and sublicensing by the Recipient in connection with the Licensed Work. No one other than the Initial Contributor has the right to modify the terms applicable to the Licensed Work + +6. DISCLAIMER OF WARRANTY. + +6.1. GENERAL DISCLAIMER. +EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, THE LICENSED WORK IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT ANY REPRESENTATION, WARRANTY, GUARANTEE, ASSURANCE OR CONDITION OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LICENSED WORK IS WITH RECIPIENT. SHOULD ANY LICENSED WORK PROVE DEFECTIVE IN ANY RESPECT, RECIPIENT (NOT THE INITIAL CONTRIBUTOR OR ANY SUBSEQUENT CONTRIBUTOR) ASSUMES THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS CLAUSE CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY LICENSED WORK IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS LICENSE INCLUDING WITHOUT LIMITATION THIS DISCLAIMER. + +6.2. RESPONSIBILITY OF RECIPIENTS. +Each Recipient is solely responsible for determining the appropriateness of using and distributing the Licensed Work and assumes all risks associated with its exercise of rights under this License, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +7. TERMINATION. + +7.1. This License shall continue until terminated in accordance with the express terms herein. 7.2. Recipient may choose to terminate this License automatically at any time. -7.3. This License, including without limitation the rights granted hereunder -to a particular Recipient, will terminate automatically if such Recipient -is in material breach of any of the terms of this License and fails to cure -such breach within sixty (60) days of becoming aware of the breach. Without -limiting the foregoing, any material breach by such Recipient of any term -of any other License under which such Recipient is granted any rights to the -Licensed Work shall constitute a material breach of this License. +7.3. This License, including without limitation the rights granted hereunder to a particular Recipient, will terminate automatically if such Recipient is in material breach of any of the terms of this License and fails to cure such breach within sixty (60) days of becoming aware of the breach. Without limiting the foregoing, any material breach by such Recipient of any term of any other License under which such Recipient is granted any rights to the Licensed Work shall constitute a material breach of this License. -7.4. Upon termination of this License by or with respect to a particular Recipient -for any reason, all rights granted hereunder and under any other License to -that Recipient shall terminate. However, all sublicenses to the Licensed Work -which were previously properly granted by such Recipient under a copy of this -License (in each case, an "Other License" and in plural, "Other Licenses") -shall survive any such termination of this License, including without limitation -the rights and obligations under such Other Licenses as set out in their respective -Sections 2, 3, 4, 5, 6, 7 and 8, mutatis mutandis, for so long as the respective -sublicensees (i.e. other Recipients) remain in compliance with the terms of -the copy of this License under which such sublicensees received rights to -the Licensed Work. Any termination of such Other Licenses shall be pursuant -to their respective Section 7, mutatis mutandis. Provisions which, by their -nature, must remain in effect beyond the termination of this License shall -survive. +7.4. Upon termination of this License by or with respect to a particular Recipient for any reason, all rights granted hereunder and under any other License to that Recipient shall terminate. However, all sublicenses to the Licensed Work which were previously properly granted by such Recipient under a copy of this License (in each case, an "Other License" and in plural, "Other Licenses") shall survive any such termination of this License, including without limitation the rights and obligations under such Other Licenses as set out in their respective Sections 2, 3, 4, 5, 6, 7 and 8, mutatis mutandis, for so long as the respective sublicensees (i.e. other Recipients) remain in compliance with the terms of the copy of this License under which such sublicensees received rights to the Licensed Work. Any termination of such Other Licenses shall be pursuant to their respective Section 7, mutatis mutandis. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. -7.5. Upon any termination of this License by or with respect to a particular -Recipient, Sections 4.1, 4.2, 6.1, 6.2, 7.4, 7.5, 8.1, and 8.2, together with -all provisions of this License necessary for the interpretation and enforcement -of same, shall expressly survive such termination. +7.5. Upon any termination of this License by or with respect to a particular Recipient, Sections 4.1, 4.2, 6.1, 6.2, 7.4, 7.5, 8.1, and 8.2, together with all provisions of this License necessary for the interpretation and enforcement of same, shall expressly survive such termination. - 8. LIMITATION OF LIABILITY. +8. LIMITATION OF LIABILITY. -8.1. IN NO EVENT SHALL ANY OF INITIAL CONTRIBUTOR, ITS SUBSIDIARIES, OR AFFILIATES, -OR ANY OF ITS OR THEIR RESPECTIVE OFFICERS, DIRECTORS, EMPLOYEES, AND/OR AGENTS -(AS THE CASE MAY BE), HAVE ANY LIABILITY FOR ANY DIRECT DAMAGES, INDIRECT -DAMAGES, PUNITIVE DAMAGES, INCIDENTAL DAMAGES, SPECIAL DAMAGES, EXEMPLARY -DAMAGES, CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHATSOEVER (INCLUDING -WITHOUT LIMITATION LOSS OF USE, DATA OR PROFITS, OR ANY OTHER LOSS ARISING -OUT OF OR IN ANY WAY RELATED TO THE USE, INABILITY TO USE, UNAUTHORIZED USE, -PERFORMANCE, OR NON-PERFORMANCE OF THE LICENSED WORK OR ANY PART THEREOF OR -THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR THAT RESULT FROM -ERRORS, DEFECTS, OMISSIONS, DELAYS IN OPERATION OR TRANSMISSION, OR ANY OTHER -FAILURE OF PERFORMANCE), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -IN RELATION TO OR ARISING IN ANY WAY OUT OF THIS LICENSE OR THE USE OR DISTRIBUTION -OF THE LICENSED WORK OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -THIS CLAUSE CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY LICENSED -WORK IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS LICENSE INCLUDING WITHOUT LIMITATION -THE LIMITATIONS SET FORTH IN THIS SECTION 8.1. +8.1. IN NO EVENT SHALL ANY OF INITIAL CONTRIBUTOR, ITS SUBSIDIARIES, OR AFFILIATES, OR ANY OF ITS OR THEIR RESPECTIVE OFFICERS, DIRECTORS, EMPLOYEES, AND/OR AGENTS (AS THE CASE MAY BE), HAVE ANY LIABILITY FOR ANY DIRECT DAMAGES, INDIRECT DAMAGES, PUNITIVE DAMAGES, INCIDENTAL DAMAGES, SPECIAL DAMAGES, EXEMPLARY DAMAGES, CONSEQUENTIAL DAMAGES OR ANY OTHER DAMAGES WHATSOEVER (INCLUDING WITHOUT LIMITATION LOSS OF USE, DATA OR PROFITS, OR ANY OTHER LOSS ARISING OUT OF OR IN ANY WAY RELATED TO THE USE, INABILITY TO USE, UNAUTHORIZED USE, PERFORMANCE, OR NON-PERFORMANCE OF THE LICENSED WORK OR ANY PART THEREOF OR THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR THAT RESULT FROM ERRORS, DEFECTS, OMISSIONS, DELAYS IN OPERATION OR TRANSMISSION, OR ANY OTHER FAILURE OF PERFORMANCE), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) IN RELATION TO OR ARISING IN ANY WAY OUT OF THIS LICENSE OR THE USE OR DISTRIBUTION OF THE LICENSED WORK OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. THIS CLAUSE CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY LICENSED WORK IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS LICENSE INCLUDING WITHOUT LIMITATION THE LIMITATIONS SET FORTH IN THIS SECTION 8.1. -8.2. EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, EACH RECIPIENT SHALL NOT -HAVE ANY LIABILITY FOR ANY EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE LICENSED WORK OR -THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY -FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE -EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. +8.2. EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, EACH RECIPIENT SHALL NOT HAVE ANY LIABILITY FOR ANY EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE LICENSED WORK OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. - 9. GOVERNING LAW AND LEGAL ACTION. +9. GOVERNING LAW AND LEGAL ACTION. -9.1. This License shall be governed by and construed in accordance with the -laws of the Governing Jurisdiction assigned in Part 3 of Exhibit A, without -regard to its conflict of law provisions. No party may bring a legal action -under this License more than one year after the cause of the action arose. -Each party waives its rights (if any) to a jury trial in any litigation arising -under this License. Note that if the Governing Jurisdiction is not assigned -in Part 3 of Exhibit A, then the Governing Jurisdiction shall be the State -of New York. +9.1. This License shall be governed by and construed in accordance with the laws of the Governing Jurisdiction assigned in Part 3 of Exhibit A, without regard to its conflict of law provisions. No party may bring a legal action under this License more than one year after the cause of the action arose. Each party waives its rights (if any) to a jury trial in any litigation arising under this License. Note that if the Governing Jurisdiction is not assigned in Part 3 of Exhibit A, then the Governing Jurisdiction shall be the State of New York. -9.2. The courts of the Governing Jurisdiction shall have jurisdiction, but -not exclusive jurisdiction, to entertain and determine all disputes and claims, -whether for specific performance, injunction, damages or otherwise, both at -law and in equity, arising out of or in any way relating to this License, -including without limitation, the legality, validity, existence and enforceability -of this License. Each party to this License hereby irrevocably attorns to -and accepts the jurisdiction of the courts of the Governing Jurisdiction for -such purposes. +9.2. The courts of the Governing Jurisdiction shall have jurisdiction, but not exclusive jurisdiction, to entertain and determine all disputes and claims, whether for specific performance, injunction, damages or otherwise, both at law and in equity, arising out of or in any way relating to this License, including without limitation, the legality, validity, existence and enforceability of this License. Each party to this License hereby irrevocably attorns to and accepts the jurisdiction of the courts of the Governing Jurisdiction for such purposes. -9.3. Except as expressly set forth elsewhere herein, in the event of any action -or proceeding brought by any party against another under this License the -prevailing party shall be entitled to recover all costs and expenses including -the fees of its attorneys in such action or proceeding in such amount as the -court may adjudge reasonable. +9.3. Except as expressly set forth elsewhere herein, in the event of any action or proceeding brought by any party against another under this License the prevailing party shall be entitled to recover all costs and expenses including the fees of its attorneys in such action or proceeding in such amount as the court may adjudge reasonable. - 10. MISCELLANEOUS. +10. MISCELLANEOUS. -10.1. The obligations imposed by this License are for the benefit of the Initial -Contributor and any Recipient, and each Recipient acknowledges and agrees -that the Initial Contributor and/or any other Recipient may enforce the terms -and conditions of this License against any Recipient. +10.1. The obligations imposed by this License are for the benefit of the Initial Contributor and any Recipient, and each Recipient acknowledges and agrees that the Initial Contributor and/or any other Recipient may enforce the terms and conditions of this License against any Recipient. -10.2. This License represents the complete agreement concerning subject matter -hereof, and supersedes and cancels all previous oral and written communications, -representations, agreements and understandings between the parties with respect -to the subject matter hereof. +10.2. This License represents the complete agreement concerning subject matter hereof, and supersedes and cancels all previous oral and written communications, representations, agreements and understandings between the parties with respect to the subject matter hereof. -10.3. The application of the United Nations Convention on Contracts for the -International Sale of Goods is expressly excluded. +10.3. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -10.4. The language in all parts of this License shall be in all cases construed -simply according to its fair meaning, and not strictly for or against any -of the parties hereto. Any law or regulation which provides that the language -of a contract shall be construed against the drafter shall not apply to this -License. +10.4. The language in all parts of this License shall be in all cases construed simply according to its fair meaning, and not strictly for or against any of the parties hereto. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. -10.5. If any provision of this License is invalid or unenforceable under the -laws of the Governing Jurisdiction, it shall not affect the validity or enforceability -of the remainder of the terms of this License, and without further action -by the parties hereto, such provision shall be reformed to the minimum extent -necessary to make such provision valid and enforceable. +10.5. If any provision of this License is invalid or unenforceable under the laws of the Governing Jurisdiction, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -10.6. The paragraph headings of this License are for reference and convenience -only and are not a part of this License, and they shall have no effect upon -the construction or interpretation of any part hereof. +10.6. The paragraph headings of this License are for reference and convenience only and are not a part of this License, and they shall have no effect upon the construction or interpretation of any part hereof. -10.7. Each of the terms "including", "include" and "includes", when used in -this License, is not limiting whether or not non-limiting language (such as -"without limitation" or "but not limited to" or words of similar import) is -used with reference thereto. +10.7. Each of the terms "including", "include" and "includes", when used in this License, is not limiting whether or not non-limiting language (such as "without limitation" or "but not limited to" or words of similar import) is used with reference thereto. -10.8. The parties hereto acknowledge they have expressly required that this -License and notices relating thereto be drafted in the English language. //***THE -LICENSE TERMS END HERE (OTHER THAN AS SET OUT IN EXHIBIT A).***// +10.8. The parties hereto acknowledge they have expressly required that this License and notices relating thereto be drafted in the English language. + +//***THE LICENSE TERMS END HERE (OTHER THAN AS SET OUT IN EXHIBIT A).***// EXHIBIT A (to the Adaptive Public License) - PART 1: INITIAL CONTRIBUTOR AND DESIGNATED WEB SITE +PART 1: INITIAL CONTRIBUTOR AND DESIGNATED WEB SITE - The Initial Contributor is: +The Initial Contributor is: +____________________________________________________ +  +[Enter full name of Initial Contributor] - ________________________________________________ +Address of Initial Contributor: +________________________________________________ +  +________________________________________________ +  +________________________________________________ +  +[Enter address above] - [Enter full name of Initial Contributor] +The Designated Web Site is: +__________________________________________________ +  +[Enter URL for Designated Web Site of Initial Contributor] - +NOTE: The Initial Contributor is to complete this Part 1, along with Parts 2, 3, and 5, and, if applicable, Parts 4 and 6. - Address of Initial Contributor: +PART 2: INITIAL WORK - ________________________________________________ +The Initial Work comprises the computer program(s) distributed by the Initial Contributor having the following title(s): _______________________________________________. - ________________________________________________ +The date on which the Initial Work was first available under this License: _________________ - ________________________________________________ +PART 3: GOVERNING JURISDICTION - [Enter address above] +For the purposes of this License, the Governing Jurisdiction is _________________________________________________. 
[Initial Contributor to Enter Governing Jurisdiction here] - +PART 4: THIRD PARTIES - The Designated Web Site is: +For the purposes of this License, "Third Party" has the definition set forth below in the ONE paragraph selected by the Initial Contributor from paragraphs A, B, C, D and E when the Initial Work is distributed or otherwise made available by the Initial Contributor. To select one of the following paragraphs, the Initial Contributor must place an "X" or "x" in the selection box alongside the one respective paragraph selected. +SELECTION +  +BOX PARAGRAPH +[  ] A. "THIRD PARTY" means any third party. +  +  +[  ] B. "THIRD PARTY" means any third party except for any of the following: (a) a wholly owned subsidiary of the Subsequent Contributor in question; (b) a legal entity (the "PARENT") that wholly owns the Subsequent Contributor in question; or (c) a wholly owned subsidiary of the wholly owned subsidiary in (a) or of the Parent in (b). +  +  +[  ] C. "THIRD PARTY" means any third party except for any of the following: (a) any Person directly or indirectly owning a majority of the voting interest in the Subsequent Contributor or (b) any Person in which the Subsequent Contributor directly or indirectly owns a majority voting interest. +  +  +[  ] D. "THIRD PARTY" means any third party except for any Person directly or indirectly controlled by the Subsequent Contributor. For purposes of this definition, "control" shall mean the power to direct or cause the direction of, the management and policies of such Person whether through the ownership of voting interests, by contract, or otherwise. +  +  +[  ] E. "THIRD PARTY" means any third party except for any Person directly or indirectly controlling, controlled by, or under common control with the Subsequent Contributor. For purposes of this definition, "control" shall mean the power to direct or cause the direction of, the management and policies of such Person whether through the ownership of voting interests, by contract, or otherwise. +The default definition of "THIRD PARTY" is the definition set forth in paragraph A, if NONE OR MORE THAN ONE of paragraphs A, B, C, D or E in this Part 4 are selected by the Initial Contributor. - ________________________________________________ +PART 5: NOTICE - [Enter URL for Designated Web Site of Initial Contributor] +THE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THE ADAPTIVE PUBLIC LICENSE ("LICENSE") AS FIRST COMPLETED BY: ______________________ [Insert the name of the Initial Contributor here]. ANY USE, PUBLIC DISPLAY, PUBLIC PERFORMANCE, REPRODUCTION OR DISTRIBUTION OF, OR PREPARATION OF DERIVATIVE WORKS BASED ON, THE LICENSED WORK CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS LICENSE AND ITS TERMS, WHETHER OR NOT SUCH RECIPIENT READS THE TERMS OF THE LICENSE. "LICENSED WORK" AND "RECIPIENT" ARE DEFINED IN THE LICENSE. A COPY OF THE LICENSE IS LOCATED IN THE TEXT FILE ENTITLED "LICENSE.TXT" ACCOMPANYING THE CONTENTS OF THIS FILE. IF A COPY OF THE LICENSE DOES NOT ACCOMPANY THIS FILE, A COPY OF THE LICENSE MAY ALSO BE OBTAINED AT THE FOLLOWING WEB SITE: ___________________________________________________[Insert Initial Contributor's Designated Web Site here] - +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -NOTE: The Initial Contributor is to complete this Part 1, along with Parts -2, 3, and 5, and, if applicable, Parts 4 and 6. +PART 6: PATENT LICENSING TERMS - PART 2: INITIAL WORK +For the purposes of this License, paragraphs A, B, C, D and E of this Part 6 of Exhibit A are only incorporated and form part of the terms of the License if the Initial Contributor places an "X" or "x" in the selection box alongside the YES answer to the question immediately below. -The Initial Work comprises the computer program(s) distributed by the Initial -Contributor having the following title(s): _______________________________________________. +Is this a Patents-Included License pursuant to Section 2.2 of the License? +YES [      ] +NO [      ] -The date on which the Initial Work was first available under this License: -_________________ +By default, if YES is not selected by the Initial Contributor, the answer is NO. - PART 3: GOVERNING JURISDICTION +A. For the purposes of the paragraphs in this Part 6 of Exhibit A, "LICENSABLE" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights granted herein. -For the purposes of this License, the Governing Jurisdiction is _________________________________________________. -[Initial Contributor to Enter Governing Jurisdiction here] +B. The Initial Contributor hereby grants all Recipients a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, under patent claim(s) Licensable by the Initial Contributor that are or would be infringed by the making, using, selling, offering for sale, having made, importing, exporting, transfer or disposal of such Initial Work or any portion thereof. Notwithstanding the foregoing, no patent license is granted under this Paragraph B by the Initial Contributor: (1) for any code that the Initial Contributor deletes from the Initial Work (or any portion thereof) distributed by the Initial Contributor prior to such distribution; (2) for any Modifications made to the Initial Work (or any portion thereof) by any other Person; or (3) separate from the Initial Work (or portions thereof) distributed or made available by the Initial Contributor. - PART 4: THIRD PARTIES +C. Effective upon distribution by a Subsequent Contributor to a Third Party of any Modifications made by that Subsequent Contributor, such Subsequent Contributor hereby grants all Recipients a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, under patent claim(s) Licensable by such Subsequent Contributor that are or would be infringed by the making, using, selling, offering for sale, having made, importing, exporting, transfer or disposal of any such Modifications made by that Subsequent Contributor alone and/or in combination with its Subsequent Work (or portions of such combination) to make, use, sell, offer for sale, have made, import, export, transfer and otherwise dispose of: +(1) Modifications made by that Subsequent Contributor (or portions thereof); and +(2) the combination of Modifications made by that Subsequent Contributor with its Subsequent Work (or portions of such combination); +(collectively and in each case, the "SUBSEQUENT CONTRIBUTOR VERSION"). +Notwithstanding the foregoing, no patent license is granted under this Paragraph C by such Subsequent Contributor: (1) for any code that such Subsequent Contributor deletes from the Subsequent Contributor Version (or any portion thereof) distributed by the Subsequent Contributor prior to such distribution; (2) for any Modifications made to the Subsequent Contributor Version (or any portion thereof) by any other Person; or (3) separate from the Subsequent Contributor Version (or portions thereof) distributed or made available by the Subsequent Contributor. -For the purposes of this License, "Third Party" has the definition set forth -below in the ONE paragraph selected by the Initial Contributor from paragraphs -A, B, C, D and E when the Initial Work is distributed or otherwise made available -by the Initial Contributor. To select one of the following paragraphs, the -Initial Contributor must place an "X" or "x" in the selection box alongside -the one respective paragraph selected. +D. Effective upon distribution of any Licensed Work by a Distributor to a Third Party, such Distributor hereby grants all Recipients a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, under patent claim(s) Licensable by such Distributor that are or would be infringed by the making, using, selling, offering for sale, having made, importing, exporting, transfer or disposal of any such Licensed Work distributed by such Distributor, to make, use, sell, offer for sale, have made, import, export, transfer and otherwise dispose of such Licensed Work or portions thereof (collectively and in each case, the "DISTRIBUTOR VERSION"). Notwithstanding the foregoing, no patent license is granted under this Paragraph D by such Distributor: (1) for any code that such Distributor deletes from the Distributor Version (or any portion thereof) distributed by the Distributor prior to such distribution; (2) for any Modifications made to the Distributor Version (or any portion thereof) by any other Person; or (3) separate from the Distributor Version (or portions thereof) distributed or made available by the Distributor. - SELECTION +E. If Recipient institutes patent litigation against another Recipient (a "USER") with respect to a patent applicable to a computer program or software (including a cross-claim or counterclaim in a lawsuit, and whether or not any of the patent claims are directed to a system, method, process, apparatus, device, product, article of manufacture or any other form of patent claim), then any patent or copyright license granted by that User to such Recipient under this License or any other copy of this License shall terminate. The termination shall be effective ninety (90) days after notice of termination from User to Recipient, unless the Recipient withdraws the patent litigation claim before the end of the ninety (90) day period. To be effective, any such notice of license termination must include a specific list of applicable patents and/or a copy of the copyrighted work of User that User alleges will be infringed by Recipient upon License termination. License termination is only effective with respect to patents and/or copyrights for which proper notice has been given. - BOX PARAGRAPH +PART 7: SAMPLE REQUIREMENTS FOR THE DESCRIPTION OF DISTRIBUTED MODIFICATIONS - - - [ ] A. "THIRD PARTY" means any third party. - - - -[ ] B. "THIRD PARTY" means any third party except for any of the following: -(a) a wholly owned subsidiary of the Subsequent Contributor in question; (b) -a legal entity (the "PARENT") that wholly owns the Subsequent Contributor -in question; or (c) a wholly owned subsidiary of the wholly owned subsidiary -in (a) or of the Parent in (b). - - - -[ ] C. "THIRD PARTY" means any third party except for any of the following: -(a) any Person directly or indirectly owning a majority of the voting interest -in the Subsequent Contributor or (b) any Person in which the Subsequent Contributor -directly or indirectly owns a majority voting interest. - - - -[ ] D. "THIRD PARTY" means any third party except for any Person directly -or indirectly controlled by the Subsequent Contributor. For purposes of this -definition, "control" shall mean the power to direct or cause the direction -of, the management and policies of such Person whether through the ownership -of voting interests, by contract, or otherwise. - - - -[ ] E. "THIRD PARTY" means any third party except for any Person directly -or indirectly controlling, controlled by, or under common control with the -Subsequent Contributor. For purposes of this definition, "control" shall mean -the power to direct or cause the direction of, the management and policies -of such Person whether through the ownership of voting interests, by contract, -or otherwise. - -The default definition of "THIRD PARTY" is the definition set forth in paragraph -A, if NONE OR MORE THAN ONE of paragraphs A, B, C, D or E in this Part 4 are -selected by the Initial Contributor. - - PART 5: NOTICE - -THE LICENSED WORK IS PROVIDED UNDER THE TERMS OF THE ADAPTIVE PUBLIC LICENSE -("LICENSE") AS FIRST COMPLETED BY: ______________________ [Insert the name -of the Initial Contributor here]. ANY USE, PUBLIC DISPLAY, PUBLIC PERFORMANCE, -REPRODUCTION OR DISTRIBUTION OF, OR PREPARATION OF DERIVATIVE WORKS BASED -ON, THE LICENSED WORK CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS LICENSE AND -ITS TERMS, WHETHER OR NOT SUCH RECIPIENT READS THE TERMS OF THE LICENSE. "LICENSED -WORK" AND "RECIPIENT" ARE DEFINED IN THE LICENSE. A COPY OF THE LICENSE IS -LOCATED IN THE TEXT FILE ENTITLED "LICENSE.TXT" ACCOMPANYING THE CONTENTS -OF THIS FILE. IF A COPY OF THE LICENSE DOES NOT ACCOMPANY THIS FILE, A COPY -OF THE LICENSE MAY ALSO BE OBTAINED AT THE FOLLOWING WEB SITE: ___________________________________________________[Insert -Initial Contributor's Designated Web Site here] - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - - PART 6: PATENT LICENSING TERMS - -For the purposes of this License, paragraphs A, B, C, D and E of this Part -6 of Exhibit A are only incorporated and form part of the terms of the License -if the Initial Contributor places an "X" or "x" in the selection box alongside -the YES answer to the question immediately below. - - Is this a Patents-Included License pursuant to Section 2.2 of the License? - - - - YES [ ] - - - - NO [ ] - -By default, if YES is not selected by the Initial Contributor, the answer -is NO. - -A. For the purposes of the paragraphs in this Part 6 of Exhibit A, "LICENSABLE" -means having the right to grant, to the maximum extent possible, whether at -the time of the initial grant or subsequently acquired, any and all of the -rights granted herein. - -B. The Initial Contributor hereby grants all Recipients a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims, -under patent claim(s) Licensable by the Initial Contributor that are or would -be infringed by the making, using, selling, offering for sale, having made, -importing, exporting, transfer or disposal of such Initial Work or any portion -thereof. Notwithstanding the foregoing, no patent license is granted under -this Paragraph B by the Initial Contributor: (1) for any code that the Initial -Contributor deletes from the Initial Work (or any portion thereof) distributed -by the Initial Contributor prior to such distribution; (2) for any Modifications -made to the Initial Work (or any portion thereof) by any other Person; or -(3) separate from the Initial Work (or portions thereof) distributed or made -available by the Initial Contributor. - -C. Effective upon distribution by a Subsequent Contributor to a Third Party -of any Modifications made by that Subsequent Contributor, such Subsequent -Contributor hereby grants all Recipients a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims, under patent -claim(s) Licensable by such Subsequent Contributor that are or would be infringed -by the making, using, selling, offering for sale, having made, importing, -exporting, transfer or disposal of any such Modifications made by that Subsequent -Contributor alone and/or in combination with its Subsequent Work (or portions -of such combination) to make, use, sell, offer for sale, have made, import, -export, transfer and otherwise dispose of: - -(1) Modifications made by that Subsequent Contributor (or portions thereof); -and - -(2) the combination of Modifications made by that Subsequent Contributor with -its Subsequent Work (or portions of such combination); - - (collectively and in each case, the "SUBSEQUENT CONTRIBUTOR VERSION"). - -Notwithstanding the foregoing, no patent license is granted under this Paragraph -C by such Subsequent Contributor: (1) for any code that such Subsequent Contributor -deletes from the Subsequent Contributor Version (or any portion thereof) distributed -by the Subsequent Contributor prior to such distribution; (2) for any Modifications -made to the Subsequent Contributor Version (or any portion thereof) by any -other Person; or (3) separate from the Subsequent Contributor Version (or -portions thereof) distributed or made available by the Subsequent Contributor. - -D. Effective upon distribution of any Licensed Work by a Distributor to a -Third Party, such Distributor hereby grants all Recipients a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims, -under patent claim(s) Licensable by such Distributor that are or would be -infringed by the making, using, selling, offering for sale, having made, importing, -exporting, transfer or disposal of any such Licensed Work distributed by such -Distributor, to make, use, sell, offer for sale, have made, import, export, -transfer and otherwise dispose of such Licensed Work or portions thereof (collectively -and in each case, the "DISTRIBUTOR VERSION"). Notwithstanding the foregoing, -no patent license is granted under this Paragraph D by such Distributor: (1) -for any code that such Distributor deletes from the Distributor Version (or -any portion thereof) distributed by the Distributor prior to such distribution; -(2) for any Modifications made to the Distributor Version (or any portion -thereof) by any other Person; or (3) separate from the Distributor Version -(or portions thereof) distributed or made available by the Distributor. - -E. If Recipient institutes patent litigation against another Recipient (a -"USER") with respect to a patent applicable to a computer program or software -(including a cross-claim or counterclaim in a lawsuit, and whether or not -any of the patent claims are directed to a system, method, process, apparatus, -device, product, article of manufacture or any other form of patent claim), -then any patent or copyright license granted by that User to such Recipient -under this License or any other copy of this License shall terminate. The -termination shall be effective ninety (90) days after notice of termination -from User to Recipient, unless the Recipient withdraws the patent litigation -claim before the end of the ninety (90) day period. To be effective, any such -notice of license termination must include a specific list of applicable patents -and/or a copy of the copyrighted work of User that User alleges will be infringed -by Recipient upon License termination. License termination is only effective -with respect to patents and/or copyrights for which proper notice has been -given. - - PART 7: SAMPLE REQUIREMENTS FOR THE DESCRIPTION OF DISTRIBUTED MODIFICATIONS - -Each Subsequent Contributor (including the Initial Contributor where the Initial -Contributor qualifies as a Subsequent Contributor) is invited (but not required) -to cause each Subsequent Work created or contributed to by that Subsequent -Contributor to contain a file documenting the changes such Subsequent Contributor -made to create that Subsequent Work and the date of any change. - -//***EXHIBIT A ENDS HERE.***// +Each Subsequent Contributor (including the Initial Contributor where the Initial Contributor qualifies as a Subsequent Contributor) is invited (but not required) to cause each Subsequent Work created or contributed to by that Subsequent Contributor to contain a file documenting the changes such Subsequent Contributor made to create that Subsequent Work and the date of any change. //***EXHIBIT A ENDS HERE.***// diff --git a/options/license/APSL-1.0 b/options/license/APSL-1.0 index ee17bc90c..4ad8d14b7 100644 --- a/options/license/APSL-1.0 +++ b/options/license/APSL-1.0 @@ -1,327 +1,109 @@ APPLE PUBLIC SOURCE LICENSE +Version 1.0 - March 16, 1999 -Version 1.0 - March 16, 1999 Please read this License carefully before downloading -this software. By downloading and using this software, you are agreeing to -be bound by the terms of this License. If you do not or cannot agree to the -terms of this License, please do not download or use the software. +Please read this License carefully before downloading this software. By downloading and using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software. -1. General; Definitions. This License applies to any program or other work -which Apple Computer, Inc. ("Apple") publicly announces as subject to this -Apple Public Source License and which contains a notice placed by Apple identifying -such program or work as "Original Code" and stating that it is subject to -the terms of this Apple Public Source License version 1.0 (or subsequent version -thereof), as it may be revised from time to time by Apple ("License"). As -used in this License: +1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") publicly announces as subject to this Apple Public Source License and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 1.0 (or subsequent version thereof), as it may be revised from time to time by Apple ("License"). As used in this License: -1.1 "Applicable Patents" mean: (a) in the case where Apple is the grantor -of rights, (i) patents or patent applications that are now or hereafter acquired, -owned by or assigned to Apple and (ii) whose claims cover subject matter contained -in the Original Code, but only to the extent necessary to use, reproduce and/or -distribute the Original Code without infringement; and (b) in the case where -You are the grantor of rights, (i) patents and patent applications that are -now or hereafter acquired, owned by or assigned to You and (ii) whose claims -cover subject matter in Your Modifications, taken alone or in combination -with Original Code. + 1.1 "Applicable Patents" mean: (a) in the case where Apple is the grantor of rights, (i) patents or patent applications that are now or hereafter acquired, owned by or assigned to Apple and (ii) whose claims cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) patents and patent applications that are now or hereafter acquired, owned by or assigned to You and (ii) whose claims cover subject matter in Your Modifications, taken alone or in combination with Original Code. -1.2 "Covered Code" means the Original Code, Modifications, the combination -of Original Code and any Modifications, and/or any respective portions thereof. + 1.2 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. -1.3 "Deploy" means to use, sublicense or distribute Covered Code other than -for Your internal research and development (R&D), and includes without limitation, -any and all internal use or distribution of Covered Code within Your business -or organization except for R&D use, as well as direct or indirect sublicensing -or distribution of Covered Code by You to any third party in any form or manner. + 1.3 "Deploy" means to use, sublicense or distribute Covered Code other than for Your internal research and development (R&D), and includes without limitation, any and all internal use or distribution of Covered Code within Your business or organization except for R&D use, as well as direct or indirect sublicensing or distribution of Covered Code by You to any third party in any form or manner. -1.4 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.4 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.5 "Modifications" mean any addition to, deletion from, and/or change to, -the substance and/or structure of Covered Code. When code is released as a -series of files, a Modification is: (a) any addition to or deletion from the -contents of a file containing Covered Code; and/or (b) any new file or other -representation of computer program statements that contains any part of Covered -Code. + 1.5 "Modifications" mean any addition to, deletion from, and/or change to, the substance and/or structure of Covered Code. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program statements that contains any part of Covered Code. -1.6 "Original Code" means the Source Code of a program or other work as originally -made available by Apple under this License, including the Source Code of any -updates or upgrades to such programs or works made available by Apple under -this License, and that has been expressly identified by Apple as such in the -header file(s) of such work. + 1.6 "Original Code" means the Source Code of a program or other work as originally made available by Apple under this License, including the Source Code of any updates or upgrades to such programs or works made available by Apple under this License, and that has been expressly identified by Apple as such in the header file(s) of such work. -1.7 "Source Code" means the human readable form of a program or other work -that is suitable for making modifications to it, including all modules it -contains, plus any associated interface definition files, scripts used to -control compilation and installation of an executable (object code). + 1.7 "Source Code" means the human readable form of a program or other work that is suitable for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an executable (object code). -1.8 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. + 1.8 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions -of this License, Apple hereby grants You, effective on the date You accept -this License and download the Original Code, a world-wide, royalty-free, non-exclusive -license, to the extent of Apple's Applicable Patents and copyrights covering -the Original Code, to do the following: +2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions of this License, Apple hereby grants You, effective on the date You accept this License and download the Original Code, a world-wide, royalty-free, non-exclusive license, to the extent of Apple's Applicable Patents and copyrights covering the Original Code, to do the following: -2.1 You may use, copy, modify and distribute Original Code, with or without -Modifications, solely for Your internal research and development, provided -that You must in each instance: + 2.1 You may use, copy, modify and distribute Original Code, with or without Modifications, solely for Your internal research and development, provided that You must in each instance: -(a) retain and reproduce in all copies of Original Code the copyright and -other proprietary notices and disclaimers of Apple as they appear in the Original -Code, and keep intact all notices in the Original Code that refer to this -License; + (a) retain and reproduce in all copies of Original Code the copyright and other proprietary notices and disclaimers of Apple as they appear in the Original Code, and keep intact all notices in the Original Code that refer to this License; -(b) include a copy of this License with every copy of Source Code of Covered -Code and documentation You distribute, and You may not offer or impose any -terms on such Source Code that alter or restrict this License or the recipients' -rights hereunder, except as permitted under Section 6; and + (b) include a copy of this License with every copy of Source Code of Covered Code and documentation You distribute, and You may not offer or impose any terms on such Source Code that alter or restrict this License or the recipients' rights hereunder, except as permitted under Section 6; and -(c) completely and accurately document all Modifications that you have made -and the date of each such Modification, designate the version of the Original -Code you used, prominently include a file carrying such information with the -Modifications, and duplicate the notice in Exhibit A in each file of the Source -Code of all such Modifications. + (c) completely and accurately document all Modifications that you have made and the date of each such Modification, designate the version of the Original Code you used, prominently include a file carrying such information with the Modifications, and duplicate the notice in Exhibit A in each file of the Source Code of all such Modifications. - 2.2 You may Deploy Covered Code, provided that You must in each instance: + 2.2 You may Deploy Covered Code, provided that You must in each instance: -(a) satisfy all the conditions of Section 2.1 with respect to the Source Code -of the Covered Code; + (a) satisfy all the conditions of Section 2.1 with respect to the Source Code of the Covered Code; -(b) make all Your Deployed Modifications publicly available in Source Code -form via electronic distribution (e.g. download from a web site) under the -terms of this License and subject to the license grants set forth in Section -3 below, and any additional terms You may choose to offer under Section 6. -You must continue to make the Source Code of Your Deployed Modifications available -for as long as you Deploy the Covered Code or twelve (12) months from the -date of initial Deployment, whichever is longer; + (b) make all Your Deployed Modifications publicly available in Source Code form via electronic distribution (e.g. download from a web site) under the terms of this License and subject to the license grants set forth in Section 3 below, and any additional terms You may choose to offer under Section 6. You must continue to make the Source Code of Your Deployed Modifications available for as long as you Deploy the Covered Code or twelve (12) months from the date of initial Deployment, whichever is longer; -(c) must notify Apple and other third parties of how to obtain Your Deployed -Modifications by filling out and submitting the required information found -at http://www.apple.com/publicsource/modifications.html; and + (c) must notify Apple and other third parties of how to obtain Your Deployed Modifications by filling out and submitting the required information found at http://www.apple.com/publicsource/modifications.html; and -(d) if you Deploy Covered Code in object code, executable form only, include -a prominent notice, in the code itself as well as in related documentation, -stating that Source Code of the Covered Code is available under the terms -of this License with information on how and where to obtain such Source Code. + (d) if you Deploy Covered Code in object code, executable form only, include a prominent notice, in the code itself as well as in related documentation, stating that Source Code of the Covered Code is available under the terms of this License with information on how and where to obtain such Source Code. -3. Your Grants. In consideration of, and as a condition to, the licenses granted -to You under this License: +3. Your Grants. In consideration of, and as a condition to, the licenses granted to You under this License: -(a) You hereby grant to Apple and all third parties a non-exclusive, royalty-free -license, under Your Applicable Patents and other intellectual property rights -owned or controlled by You, to use, reproduce, modify, distribute and Deploy -Your Modifications of the same scope and extent as Apple's licenses under -Sections 2.1 and 2.2; and + (a) You hereby grant to Apple and all third parties a non-exclusive, royalty-free license, under Your Applicable Patents and other intellectual property rights owned or controlled by You, to use, reproduce, modify, distribute and Deploy Your Modifications of the same scope and extent as Apple's licenses under Sections 2.1 and 2.2; and -(b) You hereby grant to Apple and its subsidiaries a non-exclusive, worldwide, -royalty-free, perpetual and irrevocable license, under Your Applicable Patents -and other intellectual property rights owned or controlled by You, to use, -reproduce, execute, compile, display, perform, modify or have modified (for -Apple and/or its subsidiaries), sublicense and distribute Your Modifications, -in any form, through multiple tiers of distribution. + (b) You hereby grant to Apple and its subsidiaries a non-exclusive, worldwide, royalty-free, perpetual and irrevocable license, under Your Applicable Patents and other intellectual property rights owned or controlled by You, to use, reproduce, execute, compile, display, perform, modify or have modified (for Apple and/or its subsidiaries), sublicense and distribute Your Modifications, in any form, through multiple tiers of distribution. -4. Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In each such instance, You must make sure the requirements -of this License are fulfilled for the Covered Code or any portion thereof. +4. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In each such instance, You must make sure the requirements of this License are fulfilled for the Covered Code or any portion thereof. -5. Limitations on Patent License. Except as expressly stated in Section 2, -no other patent rights, express or implied, are granted by Apple herein. Modifications -and/or Larger Works may require additional patent licenses from Apple which -Apple may grant in its sole discretion. +5. Limitations on Patent License. Except as expressly stated in Section 2, no other patent rights, express or implied, are granted by Apple herein. Modifications and/or Larger Works may require additional patent licenses from Apple which Apple may grant in its sole discretion. -6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, -support, indemnity or liability obligations and/or other rights consistent -with the scope of the license granted herein ("Additional Terms") to one or -more recipients of Covered Code. However, You may do so only on Your own behalf -and as Your sole responsibility, and not on behalf of Apple. You must obtain -the recipient's agreement that any such Additional Terms are offered by You -alone, and You hereby agree to indemnify, defend and hold Apple harmless for -any liability incurred by or claims asserted against Apple by reason of any -such Additional Terms. +6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the scope of the license granted herein ("Additional Terms") to one or more recipients of Covered Code. However, You may do so only on Your own behalf and as Your sole responsibility, and not on behalf of Apple. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold Apple harmless for any liability incurred by or claims asserted against Apple by reason of any such Additional Terms. -7. Versions of the License. Apple may publish revised and/or new versions -of this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular version -of this License, You may continue to use it under the terms of that version. -You may also choose to use such Original Code under the terms of any subsequent -version of this License published by Apple. No one other than Apple has the -right to modify the terms applicable to Covered Code created under this License. +7. Versions of the License. Apple may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once Original Code has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of this License published by Apple. No one other than Apple has the right to modify the terms applicable to Covered Code created under this License. -8. NO WARRANTY OR SUPPORT. The Original Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Original Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Original Code, or any portion thereof, is at Your sole and entire risk. THE -ORIGINAL CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT -OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS -8 AND 9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS "APPLE") -EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY -OR SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED -IN THE ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF -THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN -THE ORIGINAL CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE -GIVEN BY APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY -OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY. You acknowledge that the -Original Code is not intended for use in the operation of nuclear facilities, -aircraft navigation, communication systems, or air traffic control machines -in which case the failure of the Original Code could lead to death, personal -injury, or severe physical or environmental damage. +8. NO WARRANTY OR SUPPORT. The Original Code may contain in whole or in part pre-release, untested, or not fully tested works. The Original Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the Original Code, or any portion thereof, is at Your sole and entire risk. THE ORIGINAL CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND 9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS "APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY. You acknowledge that the Original Code is not intended for use in the operation of nuclear facilities, aircraft navigation, communication systems, or air traffic control machines in which case the failure of the Original Code could lead to death, personal injury, or severe physical or environmental damage. - 9. Liability. +9. Liability. -9.1 Infringement. If any of the Original Code becomes the subject ofa claim -of infringement ("Affected Original Code"), Apple may, at its sole discretion -and option: (a) attempt to procure the rights necessary for You to continue -using the Affected Original Code; (b) modify the Affected Original Code so -that it is no longer infringing; or (c) terminate Your rights to use the Affected -Original Code, effective immediately upon Apple's posting of a notice to such -effect on the Apple web site that is used for implementation of this License. + 9.1 Infringement. If any of the Original Code becomes the subject ofa claim of infringement ("Affected Original Code"), Apple may, at its sole discretion and option: (a) attempt to procure the rights necessary for You to continue using the Affected Original Code; (b) modify the Affected Original Code so that it is no longer infringing; or (c) terminate Your rights to use the Affected Original Code, effective immediately upon Apple's posting of a notice to such effect on the Apple web site that is used for implementation of this License. -9.2 LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL APPLE BE LIABLE -FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT -OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE ORIGINAL -CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, -TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE -HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE -FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. In no event shall Apple's total -liability to You for all damages under this License exceed the amount of fifty -dollars ($50.00). + 9.2 LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL APPLE BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. In no event shall Apple's total liability to You for all damages under this License exceed the amount of fifty dollars ($50.00). -10. Trademarks. This License does not grant any rights to use the trademarks -or trade names "Apple", "Apple Computer", "Mac OS X", "Mac OS X Server" or -any other trademarks or trade names belonging to Apple (collectively "Apple -Marks") and no Apple Marks may be used to endorse or promote products derived -from the Original Code +10. Trademarks. This License does not grant any rights to use the trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac OS X Server" or any other trademarks or trade names belonging to Apple (collectively "Apple Marks") and no Apple Marks may be used to endorse or promote products derived from the Original Code +other than as permitted by and in strict compliance at all times with Apple's third party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. -other than as permitted by and in strict compliance at all times with Apple's -third party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. +11. Ownership. Apple retains all rights, title and interest in and to the Original Code and any Modifications made by or on behalf of Apple ("Apple Modifications"), and such Apple Modifications will not be automatically subject to this License. Apple may, at its sole discretion, choose to license such Apple Modifications under this License, or on different terms from those contained in this License or may choose not to license them at all. Apple's development, use, reproduction, modification, sublicensing and distribution of Covered Code will not be subject to this License. -11. Ownership. Apple retains all rights, title and interest in and to the -Original Code and any Modifications made by or on behalf of Apple ("Apple -Modifications"), and such Apple Modifications will not be automatically subject -to this License. Apple may, at its sole discretion, choose to license such -Apple Modifications under this License, or on different terms from those contained -in this License or may choose not to license them at all. Apple's development, -use, reproduction, modification, sublicensing and distribution of Covered -Code will not be subject to this License. +12. Termination. - 12. Termination. + 12.1 Termination. This License and the rights granted hereunder will terminate: -12.1 Termination. This License and the rights granted hereunder will terminate: + (a) automatically without notice from Apple if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach; -(a) automatically without notice from Apple if You fail to comply with any -term(s) of this License and fail to cure such breach within 30 days of becoming -aware of such breach; + (b) immediately in the event of the circumstances described in Sections 9.1 and/or 13.6(b); or -(b) immediately in the event of the circumstances described in Sections 9.1 -and/or 13.6(b); or + (c) automatically without notice from Apple if You, at any time during the term of this License, commence an action for patent infringement against Apple. -(c) automatically without notice from Apple if You, at any time during the -term of this License, commence an action for patent infringement against Apple. + 12.2 Effect of Termination. Upon termination, You agree to immediately stop any further use, reproduction, modification and distribution of the Covered Code, or Affected Original Code in the case of termination under Section 9.1, and to destroy all copies of the Covered Code or Affected Original Code (in the case of +termination under Section 9.1) that are in your possession or control. All sublicenses to the Covered Code which have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nature, should remain in effect beyond the termination of this License shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. Neither party will be liable to the other for compensation, indemnity or damages of any sort solely as a result of terminating this License in accordance with its terms, and termination of this License will be without prejudice to any other right or remedy of either party. -12.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification and distribution of the Covered -Code, or Affected Original Code in the case of termination under Section 9.1, -and to destroy all copies of the Covered Code or Affected Original Code (in -the case of +13. Miscellaneous. -termination under Section 9.1) that are in your possession or control. All -sublicenses to the Covered Code which have been properly granted prior to -termination shall survive any termination of this License. Provisions which, -by their nature, should remain in effect beyond the termination of this License -shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 -and 13. Neither party will be liable to the other for compensation, indemnity -or damages of any sort solely as a result of terminating this License in accordance -with its terms, and termination of this License will be without prejudice -to any other right or remedy of either party. + 13.1 Export Law Assurances. You may not use or otherwise export or re-export the Original Code except as authorized by United States law and the laws of the jurisdiction in which the Original Code was obtained. In particular, but without limitation, the Original Code may not be exported or re-exported (a) into (or to a national or resident of) any U.S. embargoed country or (b) to anyone on the U.S. Treasury Department's list of Specially Designated Nationals or the U.S. Department of Commerce's Table of Denial Orders. By using the Original Code, You represent and warrant that You are not located in, under control of, or a national or resident of any such country or on any such list. - 13. Miscellaneous. + 13.2 Government End Users. The Covered Code is a "commercial item" as defined in FAR 2.101. Government software and technical data rights in the Covered Code include only those rights customarily provided to the public as defined in this License. This customary commercial license in technical data and software is provided in +accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -13.1 Export Law Assurances. You may not use or otherwise export or re-export -the Original Code except as authorized by United States law and the laws of -the jurisdiction in which the Original Code was obtained. In particular, but -without limitation, the Original Code may not be exported or re-exported (a) -into (or to a national or resident of) any U.S. embargoed country or (b) to -anyone on the U.S. Treasury Department's list of Specially Designated Nationals -or the U.S. Department of Commerce's Table of Denial Orders. By using the -Original Code, You represent and warrant that You are not located in, under -control of, or a national or resident of any such country or on any such list. + 13.3 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between You and Apple, and You will not represent to the contrary, whether expressly, by implication, appearance or otherwise. -13.2 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered -Code include only those rights customarily provided to the public as defined -in this License. This customary commercial license in technical data and software -is provided in + 13.4 Independent Development. Nothing in this License will impair Apple's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Larger Works, technology or products that You may develop, produce, market or distribute. -accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) -and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data --- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End -Users acquire Covered Code with only those rights set forth herein. + 13.5 Waiver; Construction. Failure by Apple to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. Any law or regulation which provides that the language of a contract shall be construed against the drafter will not apply to this License. -13.3 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between You and Apple, and You will not represent to the contrary, whether -expressly, by implication, appearance or otherwise. + 13.6 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. -13.4 Independent Development. Nothing in this License will impair Apple's -right to acquire, license, develop, have others develop for it, market and/or -distribute technology or products that perform the same or similar functions -as, or otherwise compete with, Modifications, Larger Works, technology or -products that You may develop, produce, market or distribute. + 13.7 Dispute Resolution. Any litigation or other dispute resolution between You and Apple relating to this License shall take place in the Northern District of California, and You and Apple hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -13.5 Waiver; Construction. Failure by Apple to enforce any provision of this -License will not be deemed a waiver of future enforcement of that or any other -provision. Any law or regulation which provides that the language of a contract -shall be construed against the drafter will not apply to this License. + 13.8 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. -13.6 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the remainder -of this License will continue in full force and effect. (b) Notwithstanding -the foregoing, if applicable law prohibits or restricts You from fully and/or -specifically complying with Sections 2 and/or 3 or prevents the enforceability -of either of those Sections, this License will immediately terminate and You -must immediately discontinue any use of the Covered Code and destroy all copies -of it that are in your possession or control. + Where You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties ont exige que le present contrat et tous les documents connexes soient rediges en anglais. -13.7 Dispute Resolution. Any litigation or other dispute resolution between -You and Apple relating to this License shall take place in the Northern District -of California, and You and Apple hereby consent to the personal jurisdiction -of, and venue in, the state and federal courts within that District with respect -to this License. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. - -13.8 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -California, except that body of California law concerning conflicts of law. - -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exige que -le present contrat et tous les documents connexes soient rediges en anglais. EXHIBIT A. -"Portions Copyright (c) 1999 Apple Computer, Inc. All Rights Reserved. This -file contains Original Code and/or Modifications of Original Code as defined -in and that are subject to the Apple Public Source License Version 1.0 (the -'License'). You may not use this file except in compliance with the License. -Please obtain a copy of the License at http://www.apple.com/publicsource and -read it before using this file. +"Portions Copyright (c) 1999 Apple Computer, Inc. All Rights Reserved. This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 1.0 (the 'License'). You may not use this file except in compliance with the License. Please obtain a copy of the License at http://www.apple.com/publicsource and read it before using this file. -The Original Code and all software distributed under the License are distributed -on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, -ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. -Please see the License for the specific language governing rights and limitations -under the License." +The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License." diff --git a/options/license/APSL-1.1 b/options/license/APSL-1.1 index d065abe07..f85f9b3aa 100644 --- a/options/license/APSL-1.1 +++ b/options/license/APSL-1.1 @@ -1,333 +1,108 @@ APPLE PUBLIC SOURCE LICENSE +Version 1.1 - April 19,1999 -Version 1.1 - April 19, 1999 Please read this License carefully before downloading -this software. +Please read this License carefully before downloading this software. +By downloading and using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software. -By downloading and using this software, you are agreeing to be bound by the -terms of this License. If you do not or cannot agree to the terms of this -License, please do not download or use the software. +1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") publicly announces as subject to this Apple Public Source License and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 1.1 (or subsequent version thereof), as it may be revised from time to time by Apple ("License"). As used in this License: -1. General; Definitions. This License applies to any program or other work -which Apple Computer, Inc. ("Apple") publicly announces as subject to this -Apple Public Source License and which contains a notice placed by Apple identifying -such program or work as "Original Code" and stating that it is subject to -the terms of this Apple Public Source License version 1.1 (or subsequent version -thereof), as it may be revised from time to time by Apple ("License"). As -used in this License: + 1.1 "Affected Original Code" means only those specific portions of Original Code that allegedly infringe upon any party's intellectual property rights or are otherwise the subject of a claim of infringement. -1.1 "Affected Original Code" means only those specific portions of Original -Code that allegedly infringe upon any party's intellectual property rights -or are otherwise the subject of a claim of infringement. + 1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code. -1.2 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor -of rights, (i) claims of patents that are now or hereafter acquired, owned -by or assigned to Apple and (ii) that cover subject matter contained in the -Original Code, but only to the extent necessary to use, reproduce and/or distribute -the Original Code without infringement; and (b) in the case where You are -the grantor of rights, (i) claims of patents that are now or hereafter acquired, -owned by or assigned to You and (ii) that cover subject matter in Your Modifications, -taken alone or in combination with Original Code. + 1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. -1.3 "Covered Code" means the Original Code, Modifications, the combination -of Original Code and any Modifications, and/or any respective portions thereof. + 1.4 "Deploy" means to use, sublicense or distribute Covered Code other than for Your internal research and development (R&D), and includes without limitation, any and all internal use or distribution of Covered Code within Your business or organization except for R&D use, as well as direct or indirect sublicensing or distribution of Covered Code by You to any third party in any form or manner. -1.4 "Deploy" means to use, sublicense or distribute Covered Code other than -for Your internal research and development (R&D), and includes without limitation, -any and all internal use or distribution of Covered Code within Your business -or organization except for R&D use, as well as direct or indirect sublicensing -or distribution of Covered Code by You to any third party in any form or manner. + 1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.5 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.6 "Modifications" mean any addition to, deletion from, and/or change to, the substance and/or structure of Covered Code. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program statements that contains any part of Covered Code. -1.6 "Modifications" mean any addition to, deletion from, and/or change to, -the substance and/or structure of Covered Code. When code is released as a -series of files, a Modification is: (a) any addition to or deletion from the -contents of a file containing Covered Code; and/or (b) any new file or other -representation of computer program statements that contains any part of Covered -Code. + 1.7 "Original Code" means (a) the Source Code of a program or other work as originally made available by Apple under this License, including the Source Code of any updates or upgrades to such programs or works made available by Apple under this License, and that has been expressly identified by Apple as such in the header file(s) of such work; and (b) the object code compiled from such Source Code and originally made available by Apple under this License. -1.7 "Original Code" means (a) the Source Code of a program or other work as -originally made available by Apple under this License, including the Source -Code of any updates or upgrades to such programs or works made available by -Apple under this License, and that has been expressly identified by Apple -as such in the header file(s) of such work; and (b) the object code compiled -from such Source Code and originally made available by Apple under this License. + 1.8 "Source Code" means the human readable form of a program or other work that is suitable for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an executable (object code). -1.8 "Source Code" means the human readable form of a program or other work -that is suitable for making modifications to it, including all modules it -contains, plus any associated interface definition files, scripts used to -control compilation and installation of an executable (object code). + 1.9 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -1.9 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. +2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions of this License, Apple hereby grants You, effective on the date You accept this License and download the Original Code, a world-wide, royalty-free, non- exclusive license, to the extent of Apple's Applicable Patent Rights and copyrights covering the Original Code, to do the following: -2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions -of this License, Apple hereby grants You, effective on the date You accept -this License and download the Original Code, a world-wide, royalty-free, non- -exclusive license, to the extent of Apple's Applicable Patent Rights and copyrights -covering the Original Code, to do the following: + 2.1 You may use, copy, modify and distribute Original Code, with or without Modifications, solely for Your internal research and development, provided that You must in each instance: -2.1 You may use, copy, modify and distribute Original Code, with or without -Modifications, solely for Your internal research and development, provided -that You must in each instance: + (a) retain and reproduce in all copies of Original Code the copyright and other proprietary notices and disclaimers of Apple as they appear in the Original Code, and keep intact all notices in the Original Code that refer to this License; -(a) retain and reproduce in all copies of Original Code the copyright and -other proprietary notices and disclaimers of Apple as they appear in the Original -Code, and keep intact all notices in the Original Code that refer to this -License; + (b) include a copy of this License with every copy of Source Code of Covered Code and documentation You distribute, and You may not offer or impose any terms on such Source Code that alter or restrict this License or the recipients' rights hereunder, except as permitted under Section 6; and -(b) include a copy of this License with every copy of Source Code of Covered -Code and documentation You distribute, and You may not offer or impose any -terms on such Source Code that alter or restrict this License or the recipients' -rights hereunder, except as permitted under Section 6; and + (c) completely and accurately document all Modifications that you have made and the date of each such Modification, designate the version of the Original Code you used, prominently include a file carrying such information with the Modifications, and duplicate the notice in Exhibit A in each file of the Source Code of all such Modifications. -(c) completely and accurately document all Modifications that you have made -and the date of each such Modification, designate the version of the Original -Code you used, prominently include a file carrying such information with the -Modifications, and duplicate the notice in Exhibit A in each file of the Source -Code of all such Modifications. + 2.2 You may Deploy Covered Code, provided that You must in each instance: - 2.2 You may Deploy Covered Code, provided that You must in each instance: + (a) satisfy all the conditions of Section 2.1 with respect to the Source Code of the Covered Code; -(a) satisfy all the conditions of Section 2.1 with respect to the Source Code -of the Covered Code; + (b) make all Your Deployed Modifications publicly available in Source Code form via electronic distribution (e.g. download from a web site) under the terms of this License and subject to the license grants set forth in Section 3 below, and any additional terms You may choose to offer under Section 6. You must continue to make the Source Code of Your Deployed Modifications available for as long as you Deploy the Covered Code or twelve (12) months from the date of initial Deployment, whichever is longer; -(b) make all Your Deployed Modifications publicly available in Source Code -form via electronic distribution (e.g. download from a web site) under the -terms of this License and subject to the license grants set forth in Section -3 below, and any additional terms You may choose to offer under Section 6. -You must continue to make the Source Code of Your Deployed Modifications available -for as long as you Deploy the Covered Code or twelve (12) months from the -date of initial Deployment, whichever is longer; + (c) if You Deploy Covered Code containing Modifications made by You, inform others of how to obtain those Modifications by filling out and submitting the information found at http://www.apple.com/publicsource/modifications.html, if available; and -(c) if You Deploy Covered Code containing Modifications made by You, inform -others of how to obtain those Modifications by filling out and submitting -the information found at http://www.apple.com/publicsource/modifications.html, -if available; and + (d) if You Deploy Covered Code in object code, executable form only, include a prominent notice, in the code itself as well as in related documentation, stating that Source Code of the Covered Code is available under the terms of this License with information on how and where to obtain such Source Code. -(d) if You Deploy Covered Code in object code, executable form only, include -a prominent notice, in the code itself as well as in related documentation, -stating that Source Code of the Covered Code is available under the terms -of this License with information on how and where to obtain such Source Code. +3. Your Grants. In consideration of, and as a condition to, the licenses granted to You under this License: -3. Your Grants. In consideration of, and as a condition to, the licenses granted -to You under this License: + (a) You hereby grant to Apple and all third parties a non-exclusive, royalty-free license, under Your Applicable Patent Rights and other intellectual property rights owned or controlled by You, to use, reproduce, modify, distribute and Deploy Your Modifications of the same scope and extent as Apple's licenses under Sections 2.1 and 2.2; and -(a) You hereby grant to Apple and all third parties a non-exclusive, royalty-free -license, under Your Applicable Patent Rights and other intellectual property -rights owned or controlled by You, to use, reproduce, modify, distribute and -Deploy Your Modifications of the same scope and extent as Apple's licenses -under Sections 2.1 and 2.2; and + (b) You hereby grant to Apple and its subsidiaries a non-exclusive, worldwide, royalty-free, perpetual and irrevocable license, under Your Applicable Patent Rights and other intellectual property rights owned or controlled by You, to use, reproduce, execute, compile, display, perform, modify or have modified (for Apple and/or its subsidiaries), sublicense and distribute Your Modifications, in any form, through multiple tiers of distribution. -(b) You hereby grant to Apple and its subsidiaries a non-exclusive, worldwide, -royalty-free, perpetual and irrevocable license, under Your Applicable Patent -Rights and other intellectual property rights owned or controlled by You, -to use, reproduce, execute, compile, display, perform, modify or have modified -(for Apple and/or its subsidiaries), sublicense and distribute Your Modifications, -in any form, through multiple tiers of distribution. +4. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In each such instance, You must make sure the requirements of this License are fulfilled for the Covered Code or any portion thereof. -4. Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In each such instance, You must make sure the requirements -of this License are fulfilled for the Covered Code or any portion thereof. +5. Limitations on Patent License. Except as expressly stated in Section 2, no other patent rights, express or implied, are granted by Apple herein. Modifications and/or Larger Works may require additional patent licenses from Apple which Apple may grant in its sole discretion. -5. Limitations on Patent License. Except as expressly stated in Section 2, -no other patent rights, express or implied, are granted by Apple herein. Modifications -and/or Larger Works may require additional patent licenses from Apple which -Apple may grant in its sole discretion. +6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the scope of the license granted herein ("Additional Terms") to one or more recipients of Covered Code. However, You may do so only on Your own behalf and as Your sole responsibility, and not on behalf of Apple. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold Apple harmless for any liability incurred by or claims asserted against Apple by reason of any such Additional Terms. -6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, -support, indemnity or liability obligations and/or other rights consistent -with the scope of the license granted herein ("Additional Terms") to one or -more recipients of Covered Code. However, You may do so only on Your own behalf -and as Your sole responsibility, and not on behalf of Apple. You must obtain -the recipient's agreement that any such Additional Terms are offered by You -alone, and You hereby agree to indemnify, defend and hold Apple harmless for -any liability incurred by or claims asserted against Apple by reason of any -such Additional Terms. +7. Versions of the License. Apple may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once Original Code has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of this License published by Apple. No one other than Apple has the right to modify the terms applicable to Covered Code created under this License. -7. Versions of the License. Apple may publish revised and/or new versions -of this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular version -of this License, You may continue to use it under the terms of that version. -You may also choose to use such Original Code under the terms of any subsequent -version of this License published by Apple. No one other than Apple has the -right to modify the terms applicable to Covered Code created under this License. +8. NO WARRANTY OR SUPPORT. The Original Code may contain in whole or in part pre-release, untested, or not fully tested works. The Original Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the Original Code, or any portion thereof, is at Your sole and entire risk. THE ORIGINAL CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS 8 AND 9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS "APPLE") EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY OR SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT DEFECTS IN THE ORIGINAL CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY. You acknowledge that the Original Code is not intended for use in the operation of nuclear facilities, aircraft navigation, communication systems, or air traffic control machines in which case the failure of the Original Code could lead to death, personal injury, or severe physical or environmental damage. -8. NO WARRANTY OR SUPPORT. The Original Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Original Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Original Code, or any portion thereof, is at Your sole and entire risk. THE -ORIGINAL CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT -OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (FOR THE PURPOSES OF SECTIONS -8 AND 9, APPLE AND APPLE'S LICENSOR(S) ARE COLLECTIVELY REFERRED TO AS "APPLE") -EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY -OR SATISFACTORY QUALITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. APPLE DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED -IN THE ORIGINAL CODE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF -THE ORIGINAL CODE WILL BE UNINTERRUPTED OR ERROR- FREE, OR THAT DEFECTS IN -THE ORIGINAL CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE -GIVEN BY APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY -OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY. You acknowledge that the -Original Code is not intended for use in the operation of nuclear facilities, -aircraft navigation, communication systems, or air traffic control machines -in which case the failure of the Original Code could lead to death, personal -injury, or severe physical or environmental damage. +9. Liability. - 9. Liability. + 9.1 Infringement. If any portion of, or functionality implemented by, the Original Code becomes the subject of a claim of infringement, Apple may, at its option: (a) attempt to procure the rights necessary for Apple and You to continue using the Affected Original Code; (b) modify the Affected Original Code so that it is no longer infringing; or (c) suspend Your rights to use, reproduce, modify, sublicense and distribute the Affected Original Code until a final determination of the claim is made by a court or governmental administrative agency of competent jurisdiction and Apple lifts the suspension as set forth below. Such suspension of rights will be effective immediately upon Apple's posting of a notice to such effect on the Apple web site that is used for implementation of this License. Upon such final determination being made, if Apple is legally able, without the payment of a fee or royalty, to resume use, reproduction, modification, sublicensing and distribution of the Affected Original Code, Apple will lift the suspension of rights to the Affected Original Code by posting a notice to such effect on the Apple web site that is used for implementation of this License. If Apple suspends Your rights to Affected Original Code, nothing in this License shall be construed to restrict You, at Your option and subject to applicable law, from replacing the Affected Original Code with non-infringing code or independently negotiating for necessary rights from such third party. -9.1 Infringement. If any portion of, or functionality implemented by, the -Original Code becomes the subject of a claim of infringement, Apple may, at -its option: (a) attempt to procure the rights necessary for Apple and You -to continue using the Affected Original Code; (b) modify the Affected Original -Code so that it is no longer infringing; or (c) suspend Your rights to use, -reproduce, modify, sublicense and distribute the Affected Original Code until -a final determination of the claim is made by a court or governmental administrative -agency of competent jurisdiction and Apple lifts the suspension as set forth -below. Such suspension of rights will be effective immediately upon Apple's -posting of a notice to such effect on the Apple web site that is used for -implementation of this License. Upon such final determination being made, -if Apple is legally able, without the payment of a fee or royalty, to resume -use, reproduction, modification, sublicensing and distribution of the Affected -Original Code, Apple will lift the suspension of rights to the Affected Original -Code by posting a notice to such effect on the Apple web site that is used -for implementation of this License. If Apple suspends Your rights to Affected -Original Code, nothing in this License shall be construed to restrict You, -at Your option and subject to applicable law, from replacing the Affected -Original Code with non-infringing code or independently negotiating for necessary -rights from such third party. + 9.2 LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL APPLE BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE ORIGINAL CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. In no event shall Apple's total liability to You for all damages under this License exceed the amount of fifty dollars ($50.00). -9.2 LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL APPLE BE LIABLE -FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT -OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE ORIGINAL -CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, -TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE -HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE -FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. In no event shall Apple's total -liability to You for all damages under this License exceed the amount of fifty -dollars ($50.00). +10. Trademarks. This License does not grant any rights to use the trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac OS X Server" or any other trademarks or trade names belonging to Apple (collectively "Apple Marks") and no Apple Marks may be used to endorse or promote products derived from the Original Code other than as permitted by and in strict compliance at all times with Apple's third party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. -10. Trademarks. This License does not grant any rights to use the trademarks -or trade names "Apple", "Apple Computer", "Mac OS X", "Mac OS X Server" or -any other trademarks or trade names belonging to Apple (collectively "Apple -Marks") and no Apple Marks may be used to endorse or promote products derived -from the Original Code other than as permitted by and in strict compliance -at all times with Apple's third party trademark usage guidelines which are -posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. +11. Ownership. Apple retains all rights, title and interest in and to the Original Code and any Modifications made by or on behalf of Apple ("Apple Modifications"), and such Apple Modifications will not be automatically subject to this License. Apple may, at its sole discretion, choose to license such Apple Modifications under this License, or on different terms from those contained in this License or may choose not to license them at all. Apple's development, use, reproduction, modification, sublicensing and distribution of Covered Code will not be subject to this License. -11. Ownership. Apple retains all rights, title and interest in and to the -Original Code and any Modifications made by or on behalf of Apple ("Apple -Modifications"), and such Apple Modifications will not be automatically subject -to this License. Apple may, at its sole discretion, choose to license such -Apple Modifications under this License, or on different terms from those contained -in this License or may choose not to license them at all. Apple's development, -use, reproduction, modification, sublicensing and distribution of Covered -Code will not be subject to this License. +12. Termination. - 12. Termination. + 12.1 Termination. This License and the rights granted hereunder will terminate: -12.1 Termination. This License and the rights granted hereunder will terminate: + (a) automatically without notice from Apple if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach; -(a) automatically without notice from Apple if You fail to comply with any -term(s) of this License and fail to cure such breach within 30 days of becoming -aware of such breach; + (b) immediately in the event of the circumstances described in Section 13.5(b); or -(b) immediately in the event of the circumstances described in Section 13.5(b); -or + (c) automatically without notice from Apple if You, at any time during the term of this License, commence an action for patent infringement against Apple. -(c) automatically without notice from Apple if You, at any time during the -term of this License, commence an action for patent infringement against Apple. + 12.2 Effect of Termination. Upon termination, You agree to immediately stop any further use, reproduction, modification, sublicensing and distribution of the Covered Code and to destroy all copies of the Covered Code that are in your possession or control. All sublicenses to the Covered Code which have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nature, should remain in effect beyond the termination of this License shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. Neither party will be liable to the other for compensation, indemnity or damages of any sort solely as a result of terminating this License in accordance with its terms, and termination of this License will be without prejudice to any other right or remedy of either party. -12.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification, sublicensing and distribution -of the Covered Code and to destroy all copies of the Covered Code that are -in your possession or control. All sublicenses to the Covered Code which have -been properly granted prior to termination shall survive any termination of -this License. Provisions which, by their nature, should remain in effect beyond -the termination of this License shall survive, including but not limited to -Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. Neither party will be liable to -the other for compensation, indemnity or damages of any sort solely as a result -of terminating this License in accordance with its terms, and termination -of this License will be without prejudice to any other right or remedy of -either party. +13. Miscellaneous. - 13. Miscellaneous. + 13.1 Government End Users. The Covered Code is a "commercial item" as defined in FAR 2.101. Government software and technical data rights in the Covered Code include only those rights customarily provided to the public as defined in this License. This customary commercial license in technical data and software is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -13.1 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered -Code include only those rights customarily provided to the public as defined -in this License. This customary commercial license in technical data and software -is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer -Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical -Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End -Users acquire Covered Code with only those rights set forth herein. + 13.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between You and Apple, and You will not represent to the contrary, whether expressly, by implication, appearance or otherwise. -13.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between You and Apple, and You will not represent to the contrary, whether -expressly, by implication, appearance or otherwise. + 13.3 Independent Development. Nothing in this License will impair Apple's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Larger Works, technology or products that You may +develop, produce, market or distribute. -13.3 Independent Development. Nothing in this License will impair Apple's -right to acquire, license, develop, have others develop for it, market and/or -distribute technology or products that perform the same or similar functions -as, or otherwise compete with, Modifications, Larger Works, technology or -products that You may + 13.4 Waiver; Construction. Failure by Apple to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. Any law or regulation which provides that the language of a contract shall be construed against the drafter will not apply to this License. - develop, produce, market or distribute. + 13.5 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. -13.4 Waiver; Construction. Failure by Apple to enforce any provision of this -License will not be deemed a waiver of future enforcement of that or any other -provision. Any law or regulation which provides that the language of a contract -shall be construed against the drafter will not apply to this License. + 13.6 Dispute Resolution. Any litigation or other dispute resolution between You and Apple relating to this License shall take place in the Northern District of California, and You and Apple hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -13.5 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the remainder -of this License will continue in full force and effect. (b) Notwithstanding -the foregoing, if applicable law prohibits or restricts You from fully and/or -specifically complying with Sections 2 and/or 3 or prevents the enforceability -of either of those Sections, this License will immediately terminate and You -must immediately discontinue any use of the Covered Code and destroy all copies -of it that are in your possession or control. + 13.7 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. -13.6 Dispute Resolution. Any litigation or other dispute resolution between -You and Apple relating to this License shall take place in the Northern District -of California, and You and Apple hereby consent to the personal jurisdiction -of, and venue in, the state and federal courts within that District with respect -to this License. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. + Where You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties ont exige que le present contrat et tous les documents connexes soient rediges en anglais. -13.7 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -California, except that body of California law concerning conflicts of law. - -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exige que -le present contrat et tous les documents connexes soient rediges en anglais. EXHIBIT A. -"Portions Copyright (c) 1999-2000 Apple Computer, Inc. All Rights Reserved. -This file contains Original Code and/or Modifications of Original Code as -defined in and that are subject to the Apple Public Source License Version -1.1 (the "License"). You may not use this file except in compliance with the -License. Please obtain a copy of the License at http://www.apple.com/publicsource -and read it before using this file. +"Portions Copyright (c) 1999-2000 Apple Computer, Inc. All Rights Reserved. This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 1.1 (the "License"). You may not use this file except in compliance with the License. Please obtain a copy of the License at http://www.apple.com/publicsource and read it before using this file. -The Original Code and all software distributed under the License are distributed -on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, -ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON- -INFRINGEMENT. Please see the License for the specific language governing rights -and limitations under the License." +The Original Code and all software distributed under the License are distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License." diff --git a/options/license/APSL-1.2 b/options/license/APSL-1.2 index e99cd808b..f0c8c3ae9 100644 --- a/options/license/APSL-1.2 +++ b/options/license/APSL-1.2 @@ -1,319 +1,103 @@ Apple Public Source License Ver. 1.2 -1. General; Definitions. This License applies to any program or other work -which Apple Computer, Inc. ("Apple") makes publicly available and which contains -a notice placed by Apple identifying such program or work as "Original Code" -and stating that it is subject to the terms of this Apple Public Source License -version 1.2 (or subsequent version thereof) ("License"). As used in this License: +1. General; Definitions. This License applies to any program or other work which Apple Computer, Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 1.2 (or subsequent version thereof) ("License"). As used in this License: -1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor -of rights, (i) claims of patents that are now or hereafter acquired, owned -by or assigned to Apple and (ii) that cover subject matter contained in the -Original Code, but only to the extent necessary to use, reproduce and/or distribute -the Original Code without infringement; and (b) in the case where You are -the grantor of rights, (i) claims of patents that are now or hereafter acquired, -owned by or assigned to You and (ii) that cover subject matter in Your Modifications, -taken alone or in combination with Original Code. + 1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code. -1.2 "Contributor" means any person or entity that creates or contributes to -the creation of Modifications. + 1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications. -1.3 "Covered Code" means the Original Code, Modifications, the combination -of Original Code and any Modifications, and/or any respective portions thereof. + 1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. -1.4 "Deploy" means to use, sublicense or distribute Covered Code other than -for Your internal research and development (R&D) and/or Personal Use, and -includes without limitation, any and all internal use or distribution of Covered -Code within Your business or organization except for R&D use and/or Personal -Use, as well as direct or indirect sublicensing or distribution of Covered -Code by You to any third party in any form or manner. + 1.4 "Deploy" means to use, sublicense or distribute Covered Code other than for Your internal research and development (R&D) and/or Personal Use, and includes without limitation, any and all internal use or distribution of Covered Code within Your business or organization except for R&D use and/or Personal Use, as well as direct or indirect sublicensing or distribution of Covered Code by You to any third party in any form or manner. -1.5 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.6 "Modifications" mean any addition to, deletion from, and/or change to, -the substance and/or structure of the Original Code, any previous Modifications, -the combination of Original Code and any previous Modifications, and/or any -respective portions thereof. When code is released as a series of files, a -Modification is: (a) any addition to or deletion from the contents of a file -containing Covered Code; and/or (b) any new file or other representation of -computer program statements that contains any part of Covered Code. + 1.6 "Modifications" mean any addition to, deletion from, and/or change to, the substance and/or structure of the Original Code, any previous Modifications, the combination of Original Code and any previous Modifications, and/or any respective portions thereof. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program statements that contains any part of Covered Code. -1.7 "Original Code" means (a) the Source Code of a program or other work as -originally made available by Apple under this License, including the Source -Code of any updates or upgrades to such programs or works made available by -Apple under this License, and that has been expressly identified by Apple -as such in the header file(s) of such work; and (b) the object code compiled -from such Source Code and originally made available by Apple under this License. + 1.7 "Original Code" means (a) the Source Code of a program or other work as originally made available by Apple under this License, including the Source Code of any updates or upgrades to such programs or works made available by Apple under this License, and that has been expressly identified by Apple as such in the header file(s) of such work; and (b) the object code compiled from such Source Code and originally made available by Apple under this License. -1.8 "Personal Use" means use of Covered Code by an individual solely for his -or her personal, private and non-commercial purposes. An individual's use -of Covered Code in his or her capacity as an officer, employee, member, independent -contractor or agent of a corporation, business or organization (commercial -or non-commercial) does not qualify as Personal Use. + 1.8 "Personal Use" means use of Covered Code by an individual solely for his or her personal, private and non-commercial purposes. An individual's use of Covered Code in his or her capacity as an officer, employee, member, independent contractor or agent of a corporation, business or organization (commercial or non-commercial) does not qualify as Personal Use. -1.9 "Source Code" means the human readable form of a program or other work -that is suitable for making modifications to it, including all modules it -contains, plus any associated interface definition files, scripts used to -control compilation and installation of an executable (object code). + 1.9 "Source Code" means the human readable form of a program or other work that is suitable for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an executable (object code). -1.10 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. + 1.10 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -2. Permitted Uses; Conditions & Restrictions.Subject to the terms and conditions -of this License, Apple hereby grants You, effective on the date You accept -this License and download the Original Code, a world-wide, royalty-free, non-exclusive -license, to the extent of Apple's Applicable Patent Rights and copyrights -covering the Original Code, to do the following: +2. Permitted Uses; Conditions & Restrictions.Subject to the terms and conditions of this License, Apple hereby grants You, effective on the date You accept this License and download the Original Code, a world-wide, royalty-free, non-exclusive license, to the extent of Apple's Applicable Patent Rights and copyrights covering the Original Code, to do the following: -2.1 You may use, reproduce, display, perform, modify and distribute Original -Code, with or without Modifications, solely for Your internal research and -development and/or Personal Use, provided that in each instance: + 2.1 You may use, reproduce, display, perform, modify and distribute Original Code, with or without Modifications, solely for Your internal research and development and/or Personal Use, provided that in each instance: -(a) You must retain and reproduce in all copies of Original Code the copyright -and other proprietary notices and disclaimers of Apple as they appear in the -Original Code, and keep intact all notices in the Original Code that refer -to this License; and + (a) You must retain and reproduce in all copies of Original Code the copyright and other proprietary notices and disclaimers of Apple as they appear in the Original Code, and keep intact all notices in the Original Code that refer to this License; and -(b) You must include a copy of this License with every copy of Source Code -of Covered Code and documentation You distribute, and You may not offer or -impose any terms on such Source Code that alter or restrict this License or -the recipients' rights hereunder, except as permitted under Section 6. + (b) You must include a copy of this License with every copy of Source Code of Covered Code and documentation You distribute, and You may not offer or impose any terms on such Source Code that alter or restrict this License or the recipients' rights hereunder, except as permitted under Section 6. -2.2 You may use, reproduce, display, perform, modify and Deploy Covered Code, -provided that in each instance: + 2.2 You may use, reproduce, display, perform, modify and Deploy Covered Code, provided that in each instance: -(a) You must satisfy all the conditions of Section 2.1 with respect to the -Source Code of the Covered Code; + (a) You must satisfy all the conditions of Section 2.1 with respect to the Source Code of the Covered Code; -(b) You must duplicate, to the extent it does not already exist, the notice -in Exhibit A in each file of the Source Code of all Your Modifications, and -cause the modified files to carry prominent notices stating that You changed -the files and the date of any change; + (b) You must duplicate, to the extent it does not already exist, the notice in Exhibit A in each file of the Source Code of all Your Modifications, and cause the modified files to carry prominent notices stating that You changed the files and the date of any change; -(c) You must make Source Code of all Your Deployed Modifications publicly -available under the terms of this License, including the license grants set -forth in Section 3 below, for as long as you Deploy the Covered Code or twelve -(12) months from the date of initial Deployment, whichever is longer. You -should preferably distribute the Source Code of Your Deployed Modifications -electronically (e.g. download from a web site); and + (c) You must make Source Code of all Your Deployed Modifications publicly available under the terms of this License, including the license grants set forth in Section 3 below, for as long as you Deploy the Covered Code or twelve (12) months from the date of initial Deployment, whichever is longer. You should preferably distribute the Source Code of Your Deployed Modifications electronically (e.g. download from a web site); and -(d) if You Deploy Covered Code in object code, executable form only, You must -include a prominent notice, in the code itself as well as in related documentation, -stating that Source Code of the Covered Code is available under the terms -of this License with information on how and where to obtain such Source Code. + (d) if You Deploy Covered Code in object code, executable form only, You must include a prominent notice, in the code itself as well as in related documentation, stating that Source Code of the Covered Code is available under the terms of this License with information on how and where to obtain such Source Code. -2.3 You expressly acknowledge and agree that although Apple and each Contributor -grants the licenses to their respective portions of the Covered Code set forth -herein, no assurances are provided by Apple or any Contributor that the Covered -Code does not infringe the patent or other intellectual property rights of -any other entity. Apple and each Contributor disclaim any liability to You -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, You hereby assume sole responsibility to secure -any other intellectual property rights needed, if any. For example, if a third -party patent license is required to allow You to distribute the Covered Code, -it is Your responsibility to acquire that license before distributing the -Covered Code. + 2.3 You expressly acknowledge and agree that although Apple and each Contributor grants the licenses to their respective portions of the Covered Code set forth herein, no assurances are provided by Apple or any Contributor that the Covered Code does not infringe the patent or other intellectual property rights of any other entity. Apple and each Contributor disclaim any liability to You for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, You hereby assume sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow You to distribute the Covered Code, it is Your responsibility to acquire that license before distributing the Covered Code. -3. Your Grants. In consideration of, and as a condition to, the licenses granted -to You under this License: +3. Your Grants. In consideration of, and as a condition to, the licenses granted to You under this License: -(a) You hereby grant to Apple and all third parties a non-exclusive, royalty-free -license, under Your Applicable Patent Rights and other intellectual property -rights (other than patent) owned or controlled by You, to use, reproduce, -display, perform, modify, distribute and Deploy Your Modifications of the -same scope and extent as Apple's licenses under Sections 2.1 and 2.2; and + (a) You hereby grant to Apple and all third parties a non-exclusive, royalty-free license, under Your Applicable Patent Rights and other intellectual property rights (other than patent) owned or controlled by You, to use, reproduce, display, perform, modify, distribute and Deploy Your Modifications of the same scope and extent as Apple's licenses under Sections 2.1 and 2.2; and -(b) You hereby grant to Apple and its subsidiaries a non-exclusive, worldwide, -royalty-free, perpetual and irrevocable license, under Your Applicable Patent -Rights and other intellectual property rights (other than patent) owned or -controlled by You, to use, reproduce, display, perform, modify or have modified -(for Apple and/or its subsidiaries), sublicense and distribute Your Modifications, -in any form, through multiple tiers of distribution. + (b) You hereby grant to Apple and its subsidiaries a non-exclusive, worldwide, royalty-free, perpetual and irrevocable license, under Your Applicable Patent Rights and other intellectual property rights (other than patent) owned or controlled by You, to use, reproduce, display, perform, modify or have modified (for Apple and/or its subsidiaries), sublicense and distribute Your Modifications, in any form, through multiple tiers of distribution. -4. Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In each such instance, You must make sure the requirements -of this License are fulfilled for the Covered Code or any portion thereof. +4. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In each such instance, You must make sure the requirements of this License are fulfilled for the Covered Code or any portion thereof. -5. Limitations on Patent License. Except as expressly stated in Section 2, -no other patent rights, express or implied, are granted by Apple herein. Modifications -and/or Larger Works may require additional patent licenses from Apple which -Apple may grant in its sole discretion. +5. Limitations on Patent License. Except as expressly stated in Section 2, no other patent rights, express or implied, are granted by Apple herein. Modifications and/or Larger Works may require additional patent licenses from Apple which Apple may grant in its sole discretion. -6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, -support, indemnity or liability obligations and/or other rights consistent -with the scope of the license granted herein ("Additional Terms") to one or -more recipients of Covered Code. However, You may do so only on Your own behalf -and as Your sole responsibility, and not on behalf of Apple or any Contributor. -You must obtain the recipient's agreement that any such Additional Terms are -offered by You alone, and You hereby agree to indemnify, defend and hold Apple -and every Contributor harmless for any liability incurred by or claims asserted -against Apple or such Contributor by reason of any such Additional Terms. +6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the scope of the license granted herein ("Additional Terms") to one or more recipients of Covered Code. However, You may do so only on Your own behalf and as Your sole responsibility, and not on behalf of Apple or any Contributor. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold Apple and every Contributor harmless for any liability incurred by or claims asserted against Apple or such Contributor by reason of any such Additional Terms. -7. Versions of the License. Apple may publish revised and/or new versions -of this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular version -of this License, You may continue to use it under the terms of that version. -You may also choose to use such Original Code under the terms of any subsequent -version of this License published by Apple. No one other than Apple has the -right to modify the terms applicable to Covered Code created under this License. +7. Versions of the License. Apple may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once Original Code has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of this License published by Apple. No one other than Apple has the right to modify the terms applicable to Covered Code created under this License. -8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Covered Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Covered Code, or any portion thereof, is at Your sole and entire risk. THE -COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT -OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS -"APPLE" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY -DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, -OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, -OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH -CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE -COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR -REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED -OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL -OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE -OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered -Code is not intended for use in the operation of nuclear facilities, aircraft -navigation, communication systems, or air traffic control machines in which -case the failure of the Covered Code could lead to death, personal injury, -or severe physical or environmental damage. +8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part pre-release, untested, or not fully tested works. The Covered Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the Covered Code, or any portion thereof, is at Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended for use in the operation of nuclear facilities, aircraft navigation, communication systems, or air traffic control machines in which case the failure of the Covered Code could lead to death, personal injury, or severe physical or environmental damage. -9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT -SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT -OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR -USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER -UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS -LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED -OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL -PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY -OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO -YOU. In no event shall Apple's total liability to You for all damages (other -than as may be required by applicable law) under this License exceed the amount -of fifty dollars ($50.00). +9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In no event shall Apple's total liability to You for all damages (other than as may be required by applicable law) under this License exceed the amount of fifty dollars ($50.00). -10. Trademarks. This License does not grant any rights to use the trademarks -or trade names "Apple", "Apple Computer", "Mac OS X", "Mac OS X Server", "QuickTime", -"QuickTime Streaming Server" or any other trademarks or trade names belonging -to Apple (collectively "Apple Marks") or to any trademark or trade name belonging -to any Contributor. No Apple Marks may be used to endorse or promote products -derived from the Original Code other than as permitted by and in strict compliance -at all times with Apple's third party trademark usage guidelines which are -posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. +10. Trademarks. This License does not grant any rights to use the trademarks or trade names "Apple", "Apple Computer", "Mac OS X", "Mac OS X Server", "QuickTime", "QuickTime Streaming Server" or any other trademarks or trade names belonging to Apple (collectively "Apple Marks") or to any trademark or trade name belonging to any Contributor. No Apple Marks may be used to endorse or promote products derived from the Original Code other than as permitted by and in strict compliance at all times with Apple's third party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. -11. Ownership. Subject to the licenses granted under this License, each Contributor -retains all rights, title and interest in and to any Modifications made by -such Contributor. Apple retains all rights, title and interest in and to the -Original Code and any Modifications made by or on behalf of Apple ("Apple -Modifications"), and such Apple Modifications will not be automatically subject -to this License. Apple may, at its sole discretion, choose to license such -Apple Modifications under this License, or on different terms from those contained -in this License or may choose not to license them at all. +11. Ownership. Subject to the licenses granted under this License, each Contributor retains all rights, title and interest in and to any Modifications made by such Contributor. Apple retains all rights, title and interest in and to the Original Code and any Modifications made by or on behalf of Apple ("Apple Modifications"), and such Apple Modifications will not be automatically subject to this License. Apple may, at its sole discretion, choose to license such Apple Modifications under this License, or on different terms from those contained in this License or may choose not to license them at all. - 12. Termination. +12. Termination. -12.1 Termination. This License and the rights granted hereunder will terminate: + 12.1 Termination. This License and the rights granted hereunder will terminate: -(a) automatically without notice from Apple if You fail to comply with any -term(s) of this License and fail to cure such breach within 30 days of becoming -aware of such breach; + (a) automatically without notice from Apple if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach; -(b) immediately in the event of the circumstances described in Section 13.5(b); -or + (b) immediately in the event of the circumstances described in Section 13.5(b); or -(c) automatically without notice from Apple if You, at any time during the -term of this License, commence an action for patent infringement against Apple. + (c) automatically without notice from Apple if You, at any time during the term of this License, commence an action for patent infringement against Apple. -12.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification, sublicensing and distribution -of the Covered Code and to destroy all copies of the Covered Code that are -in your possession or control. All sublicenses to the Covered Code which have -been properly granted prior to termination shall survive any termination of -this License. Provisions which, by their nature, should remain in effect beyond -the termination of this License shall survive, including but not limited to -Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other -for compensation, indemnity or damages of any sort solely as a result of terminating -this License in accordance with its terms, and termination of this License -will be without prejudice to any other right or remedy of any party. + 12.2 Effect of Termination. Upon termination, You agree to immediately stop any further use, reproduction, modification, sublicensing and distribution of the Covered Code and to destroy all copies of the Covered Code that are in your possession or control. All sublicenses to the Covered Code which have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nature, should remain in effect beyond the termination of this License shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for compensation, indemnity or damages of any sort solely as a result of terminating this License in accordance with its terms, and termination of this License will be without prejudice to any other right or remedy of any party. - 13. Miscellaneous. +13. Miscellaneous. -13.1 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered -Code include only those rights customarily provided to the public as defined -in this License. This customary commercial license in technical data and software -is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer -Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical -Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End -Users acquire Covered Code with only those rights set forth herein. + 13.1 Government End Users. The Covered Code is a "commercial item" as defined in FAR 2.101. Government software and technical data rights in the Covered Code include only those rights customarily provided to the public as defined in this License. This customary commercial license in technical data and software is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -13.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between or amongYou, Apple or any Contributor, and You will not represent -to the contrary, whether expressly, by implication, appearance or otherwise. + 13.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between or amongYou, Apple or any Contributor, and You will not represent to the contrary, whether expressly, by implication, appearance or otherwise. -13.3 Independent Development. Nothing in this License will impair Apple's -right to acquire, license, develop, have others develop for it, market and/or -distribute technology or products that perform the same or similar functions -as, or otherwise compete with, Modifications, Larger Works, technology or -products that You may develop, produce, market or distribute. + 13.3 Independent Development. Nothing in this License will impair Apple's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Larger Works, technology or products that You may develop, produce, market or distribute. -13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce -any provision of this License will not be deemed a waiver of future enforcement -of that or any other provision. Any law or regulation which provides that -the language of a contract shall be construed against the drafter will not -apply to this License. + 13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. Any law or regulation which provides that the language of a contract shall be construed against the drafter will not apply to this License. -13.5 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the remainder -of this License will continue in full force and effect. (b) Notwithstanding -the foregoing, if applicable law prohibits or restricts You from fully and/or -specifically complying with Sections 2 and/or 3 or prevents the enforceability -of either of those Sections, this License will immediately terminate and You -must immediately discontinue any use of the Covered Code and destroy all copies -of it that are in your possession or control. + 13.5 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. -13.6 Dispute Resolution. Any litigation or other dispute resolution between -You and Apple relating to this License shall take place in the Northern District -of California, and You and Apple hereby consent to the personal jurisdiction -of, and venue in, the state and federal courts within that District with respect -to this License. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. + 13.6 Dispute Resolution. Any litigation or other dispute resolution between You and Apple relating to this License shall take place in the Northern District of California, and You and Apple hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -13.7 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -California, except that body of California law concerning conflicts of law. + 13.7 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. + + Where You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties ont exigé que le présent contrat et tous les documents connexes soient rédigés en anglais. -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exigé que -le présent contrat et tous les documents connexes soient rédigés en anglais. EXHIBIT A. "Portions Copyright (c) 1999-2001 Apple Computer, Inc. All Rights Reserved. -This file contains Original Code and/or Modifications of Original Code as -defined in and that are subject to the Apple Public Source License Version -1.2 (the 'License'). You may not use this file except in compliance with the -License. Please obtain a copy of the License at http://www.apple.com/publicsource -and read it before using this file. +This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 1.2 (the 'License'). You may not use this file except in compliance with the License. Please obtain a copy of the License at http://www.apple.com/publicsource and read it before using this file. -The Original Code and all software distributed under the License are distributed -on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, -ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET -ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language -governing rights and limitations under the License." +The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License." diff --git a/options/license/APSL-2.0 b/options/license/APSL-2.0 index 4ee005b14..2d2d2cf9b 100644 --- a/options/license/APSL-2.0 +++ b/options/license/APSL-2.0 @@ -1,325 +1,102 @@ APPLE PUBLIC SOURCE LICENSE +Version 2.0 - August 6, 2003 -Version 2.0 - August 6, 2003 Please read this License carefully before downloading -this software. By downloading or using this software, you are agreeing to -be bound by the terms of this License. If you do not or cannot agree to the -terms of this License, please do not download or use the software. +Please read this License carefully before downloading this software. By downloading or using this software, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use the software. -Apple Note: In January 2007, Apple changed its corporate name from "Apple -Computer, Inc." to "Apple Inc." This change has been reflected below and copyright -years updated, but no other changes have been made to the APSL 2.0. +Apple Note: In January 2007, Apple changed its corporate name from "Apple Computer, Inc." to "Apple Inc." This change has been reflected below and copyright years updated, but no other changes have been made to the APSL 2.0. -1. General; Definitions. This License applies to any program or other work -which Apple Inc. ("Apple") makes publicly available and which contains a notice -placed by Apple identifying such program or work as "Original Code" and stating -that it is subject to the terms of this Apple Public Source License version -2.0 ("License"). As used in this License: +1. General; Definitions. This License applies to any program or other work which Apple Inc. ("Apple") makes publicly available and which contains a notice placed by Apple identifying such program or work as "Original Code" and stating that it is subject to the terms of this Apple Public Source License version 2.0 ("License"). As used in this License: -1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor -of rights, (i) claims of patents that are now or hereafter acquired, owned -by or assigned to Apple and (ii) that cover subject matter contained in the -Original Code, but only to the extent necessary to use, reproduce and/or distribute -the Original Code without infringement; and (b) in the case where You are -the grantor of rights, (i) claims of patents that are now or hereafter acquired, -owned by or assigned to You and (ii) that cover subject matter in Your Modifications, -taken alone or in combination with Original Code. + 1.1 "Applicable Patent Rights" mean: (a) in the case where Apple is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Apple and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code. -1.2 "Contributor" means any person or entity that creates or contributes to -the creation of Modifications. + 1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications. -1.3 "Covered Code" means the Original Code, Modifications, the combination -of Original Code and any Modifications, and/or any respective portions thereof. + 1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. -1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise -make Covered Code available, directly or indirectly, to anyone other than -You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in -any way to provide a service, including but not limited to delivery of content, -through electronic communication with a client other than You. + 1.4 "Externally Deploy" means: (a) to sublicense, distribute or otherwise make Covered Code available, directly or indirectly, to anyone other than You; and/or (b) to use Covered Code, alone or as part of a Larger Work, in any way to provide a service, including but not limited to delivery of content, through electronic communication with a client other than You. -1.5 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.6 "Modifications" mean any addition to, deletion from, and/or change to, -the substance and/or structure of the Original Code, any previous Modifications, -the combination of Original Code and any previous Modifications, and/or any -respective portions thereof. When code is released as a series of files, a -Modification is: (a) any addition to or deletion from the contents of a file -containing Covered Code; and/or (b) any new file or other representation of -computer program statements that contains any part of Covered Code. + 1.6 "Modifications" mean any addition to, deletion from, and/or change to, the substance and/or structure of the Original Code, any previous Modifications, the combination of Original Code and any previous Modifications, and/or any respective portions thereof. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program statements that contains any part of Covered Code. -1.7 "Original Code" means (a) the Source Code of a program or other work as -originally made available by Apple under this License, including the Source -Code of any updates or upgrades to such programs or works made available by -Apple under this License, and that has been expressly identified by Apple -as such in the header file(s) of such work; and (b) the object code compiled -from such Source Code and originally made available by Apple under this License + 1.7 "Original Code" means (a) the Source Code of a program or other work as originally made available by Apple under this License, including the Source Code of any updates or upgrades to such programs or works made available by Apple under this License, and that has been expressly identified by Apple as such in the header file(s) of such work; and (b) the object code compiled from such Source Code and originally made available by Apple under this License -1.8 "Source Code" means the human readable form of a program or other work -that is suitable for making modifications to it, including all modules it -contains, plus any associated interface definition files, scripts used to -control compilation and installation of an executable (object code). + 1.8 "Source Code" means the human readable form of a program or other work that is suitable for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an executable (object code). -1.9 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. + 1.9 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions -of this License, Apple hereby grants You, effective on the date You accept -this License and download the Original Code, a world-wide, royalty-free, non-exclusive -license, to the extent of Apple's Applicable Patent Rights and copyrights -covering the Original Code, to do the following: +2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions of this License, Apple hereby grants You, effective on the date You accept this License and download the Original Code, a world-wide, royalty-free, non-exclusive license, to the extent of Apple's Applicable Patent Rights and copyrights covering the Original Code, to do the following: -2.1 Unmodified Code. You may use, reproduce, display, perform, internally -distribute within Your organization, and Externally Deploy verbatim, unmodified -copies of the Original Code, for commercial or non-commercial purposes, provided -that in each instance: + 2.1 Unmodified Code. You may use, reproduce, display, perform, internally distribute within Your organization, and Externally Deploy verbatim, unmodified copies of the Original Code, for commercial or non-commercial purposes, provided that in each instance: -(a) You must retain and reproduce in all copies of Original Code the copyright -and other proprietary notices and disclaimers of Apple as they appear in the -Original Code, and keep intact all notices in the Original Code that refer -to this License; and + (a) You must retain and reproduce in all copies of Original Code the copyright and other proprietary notices and disclaimers of Apple as they appear in the Original Code, and keep intact all notices in the Original Code that refer to this License; and -(b) You must include a copy of this License with every copy of Source Code -of Covered Code and documentation You distribute or Externally Deploy, and -You may not offer or impose any terms on such Source Code that alter or restrict -this License or the recipients' rights hereunder, except as permitted under -Section 6. + (b) You must include a copy of this License with every copy of Source Code of Covered Code and documentation You distribute or Externally Deploy, and You may not offer or impose any terms on such Source Code that alter or restrict this License or the recipients' rights hereunder, except as permitted under Section 6. -2.2 Modified Code. You may modify Covered Code and use, reproduce, display, -perform, internally distribute within Your organization, and Externally Deploy -Your Modifications and Covered Code, for commercial or non-commercial purposes, -provided that in each instance You also meet all of these conditions: + 2.2 Modified Code. You may modify Covered Code and use, reproduce, display, perform, internally distribute within Your organization, and Externally Deploy Your Modifications and Covered Code, for commercial or non-commercial purposes, provided that in each instance You also meet all of these conditions: -(a) You must satisfy all the conditions of Section 2.1 with respect to the -Source Code of the Covered Code; + (a) You must satisfy all the conditions of Section 2.1 with respect to the Source Code of the Covered Code; -(b) You must duplicate, to the extent it does not already exist, the notice -in Exhibit A in each file of the Source Code of all Your Modifications, and -cause the modified files to carry prominent notices stating that You changed -the files and the date of any change; and + (b) You must duplicate, to the extent it does not already exist, the notice in Exhibit A in each file of the Source Code of all Your Modifications, and cause the modified files to carry prominent notices stating that You changed the files and the date of any change; and -(c) If You Externally Deploy Your Modifications, You must make Source Code -of all Your Externally Deployed Modifications either available to those to -whom You have Externally Deployed Your Modifications, or publicly available. -Source Code of Your Externally Deployed Modifications must be released under -the terms set forth in this License, including the license grants set forth -in Section 3 below, for as long as you Externally Deploy the Covered Code -or twelve (12) months from the date of initial External Deployment, whichever -is longer. You should preferably distribute the Source Code of Your Externally -Deployed Modifications electronically (e.g. download from a web site). + (c) If You Externally Deploy Your Modifications, You must make Source Code of all Your Externally Deployed Modifications either available to those to whom You have Externally Deployed Your Modifications, or publicly available. Source Code of Your Externally Deployed Modifications must be released under the terms set forth in this License, including the license grants set forth in Section 3 below, for as long as you Externally Deploy the Covered Code or twelve (12) months from the date of initial External Deployment, whichever is longer. You should preferably distribute the Source Code of Your Externally Deployed Modifications electronically (e.g. download from a web site). -2.3 Distribution of Executable Versions. In addition, if You Externally Deploy -Covered Code (Original Code and/or Modifications) in object code, executable -form only, You must include a prominent notice, in the code itself as well -as in related documentation, stating that Source Code of the Covered Code -is available under the terms of this License with information on how and where -to obtain such Source Code. + 2.3 Distribution of Executable Versions. In addition, if You Externally Deploy Covered Code (Original Code and/or Modifications) in object code, executable form only, You must include a prominent notice, in the code itself as well as in related documentation, stating that Source Code of the Covered Code is available under the terms of this License with information on how and where to obtain such Source Code. -2.4 Third Party Rights. You expressly acknowledge and agree that although -Apple and each Contributor grants the licenses to their respective portions -of the Covered Code set forth herein, no assurances are provided by Apple -or any Contributor that the Covered Code does not infringe the patent or other -intellectual property rights of any other entity. Apple and each Contributor -disclaim any liability to You for claims brought by any other entity based -on infringement of intellectual property rights or otherwise. As a condition -to exercising the rights and licenses granted hereunder, You hereby assume -sole responsibility to secure any other intellectual property rights needed, -if any. For example, if a third party patent license is required to allow -You to distribute the Covered Code, it is Your responsibility to acquire that -license before distributing the Covered Code. + 2.4 Third Party Rights. You expressly acknowledge and agree that although Apple and each Contributor grants the licenses to their respective portions of the Covered Code set forth herein, no assurances are provided by Apple or any Contributor that the Covered Code does not infringe the patent or other intellectual property rights of any other entity. Apple and each Contributor disclaim any liability to You for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, You hereby assume sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow You to distribute the Covered Code, it is Your responsibility to acquire that license before distributing the Covered Code. -3. Your Grants. In consideration of, and as a condition to, the licenses granted -to You under this License, You hereby grant to any person or entity receiving -or distributing Covered Code under this License a non-exclusive, royalty-free, -perpetual, irrevocable license, under Your Applicable Patent Rights and other -intellectual property rights (other than patent) owned or controlled by You, -to use, reproduce, display, perform, modify, sublicense, distribute and Externally -Deploy Your Modifications of the same scope and extent as Apple's licenses -under Sections 2.1 and 2.2 above. +3. Your Grants. In consideration of, and as a condition to, the licenses granted to You under this License, You hereby grant to any person or entity receiving or distributing Covered Code under this License a non-exclusive, royalty-free, perpetual, irrevocable license, under Your Applicable Patent Rights and other intellectual property rights (other than patent) owned or controlled by You, to use, reproduce, display, perform, modify, sublicense, distribute and Externally Deploy Your Modifications of the same scope and extent as Apple's licenses under Sections 2.1 and 2.2 above. -4. Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In each such instance, You must make sure the requirements -of this License are fulfilled for the Covered Code or any portion thereof. +4. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In each such instance, You must make sure the requirements of this License are fulfilled for the Covered Code or any portion thereof. -5. Limitations on Patent License. Except as expressly stated in Section 2, -no other patent rights, express or implied, are granted by Apple herein. Modifications -and/or Larger Works may require additional patent licenses from Apple which -Apple may grant in its sole discretion. +5. Limitations on Patent License. Except as expressly stated in Section 2, no other patent rights, express or implied, are granted by Apple herein. Modifications and/or Larger Works may require additional patent licenses from Apple which Apple may grant in its sole discretion. -6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, -support, indemnity or liability obligations and/or other rights consistent -with the scope of the license granted herein ("Additional Terms") to one or -more recipients of Covered Code. However, You may do so only on Your own behalf -and as Your sole responsibility, and not on behalf of Apple or any Contributor. -You must obtain the recipient's agreement that any such Additional Terms are -offered by You alone, and You hereby agree to indemnify, defend and hold Apple -and every Contributor harmless for any liability incurred by or claims asserted -against Apple or such Contributor by reason of any such Additional Terms. +6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the scope of the license granted herein ("Additional Terms") to one or more recipients of Covered Code. However, You may do so only on Your own behalf and as Your sole responsibility, and not on behalf of Apple or any Contributor. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold Apple and every Contributor harmless for any liability incurred by or claims asserted against Apple or such Contributor by reason of any such Additional Terms. -7. Versions of the License. Apple may publish revised and/or new versions -of this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular version -of this License, You may continue to use it under the terms of that version. -You may also choose to use such Original Code under the terms of any subsequent -version of this License published by Apple. No one other than Apple has the -right to modify the terms applicable to Covered Code created under this License. +7. Versions of the License. Apple may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once Original Code has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of this License published by Apple. No one other than Apple has the right to modify the terms applicable to Covered Code created under this License. -8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Covered Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Covered Code, or any portion thereof, is at Your sole and entire risk. THE -COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT -OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS -"APPLE" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY -DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, -OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, -OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH -CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE -COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR -REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED -OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL -OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE -OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered -Code is not intended for use in the operation of nuclear facilities, aircraft -navigation, communication systems, or air traffic control machines in which -case the failure of the Covered Code could lead to death, personal injury, -or severe physical or environmental damage. +8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part pre-release, untested, or not fully tested works. The Covered Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the Covered Code, or any portion thereof, is at Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND APPLE AND APPLE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "APPLE" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. APPLE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY APPLE, AN APPLE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended for use in the operation of nuclear facilities, aircraft navigation, communication systems, or air traffic control machines in which case the failure of the Covered Code could lead to death, personal injury, or severe physical or environmental damage. -9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT -SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT -OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR -USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER -UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS -LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED -OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL -PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY -OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO -YOU. In no event shall Apple's total liability to You for all damages (other -than as may be required by applicable law) under this License exceed the amount -of fifty dollars ($50.00). +9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT SHALL APPLE OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF APPLE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In no event shall Apple's total liability to You for all damages (other than as may be required by applicable law) under this License exceed the amount of fifty dollars ($50.00). -10. Trademarks. This License does not grant any rights to use the trademarks -or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming -Server" or any other trademarks, service marks, logos or trade names belonging -to Apple (collectively "Apple Marks") or to any trademark, service mark, logo -or trade name belonging to any Contributor. You agree not to use any Apple -Marks in or as part of the name of products derived from the Original Code -or to endorse or promote products derived from the Original Code other than -as expressly permitted by and in strict compliance at all times with Apple's -third party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. +10. Trademarks. This License does not grant any rights to use the trademarks or trade names "Apple", "Mac", "Mac OS", "QuickTime", "QuickTime Streaming Server" or any other trademarks, service marks, logos or trade names belonging to Apple (collectively "Apple Marks") or to any trademark, service mark, logo or trade name belonging to any Contributor. You agree not to use any Apple Marks in or as part of the name of products derived from the Original Code or to endorse or promote products derived from the Original Code other than as expressly permitted by and in strict compliance at all times with Apple's third party trademark usage guidelines which are posted at http://www.apple.com/legal/guidelinesfor3rdparties.html. -11. Ownership. Subject to the licenses granted under this License, each Contributor -retains all rights, title and interest in and to any Modifications made by -such Contributor. Apple retains all rights, title and interest in and to the -Original Code and any Modifications made by or on behalf of Apple ("Apple -Modifications"), and such Apple Modifications will not be automatically subject -to this License. Apple may, at its sole discretion, choose to license such -Apple Modifications under this License, or on different terms from those contained -in this License or may choose not to license them at all. +11. Ownership. Subject to the licenses granted under this License, each Contributor retains all rights, title and interest in and to any Modifications made by such Contributor. Apple retains all rights, title and interest in and to the Original Code and any Modifications made by or on behalf of Apple ("Apple Modifications"), and such Apple Modifications will not be automatically subject to this License. Apple may, at its sole discretion, choose to license such Apple Modifications under this License, or on different terms from those contained in this License or may choose not to license them at all. - 12. Termination. +12. Termination. -12.1 Termination. This License and the rights granted hereunder will terminate: + 12.1 Termination. This License and the rights granted hereunder will terminate: -(a) automatically without notice from Apple if You fail to comply with any -term(s) of this License and fail to cure such breach within 30 days of becoming -aware of such breach; + (a) automatically without notice from Apple if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach; -(b) immediately in the event of the circumstances described in Section 13.5(b); -or + (b) immediately in the event of the circumstances described in Section 13.5(b); or -(c) automatically without notice from Apple if You, at any time during the -term of this License, commence an action for patent infringement against Apple; -provided that Apple did not first commence an action for patent infringement -against You in that instance. + (c) automatically without notice from Apple if You, at any time during the term of this License, commence an action for patent infringement against Apple; provided that Apple did not first commence an action for patent infringement against You in that instance. -12.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification, sublicensing and distribution -of the Covered Code. All sublicenses to the Covered Code which have been properly -granted prior to termination shall survive any termination of this License. -Provisions which, by their nature, should remain in effect beyond the termination -of this License shall survive, including but not limited to Sections 3, 5, -8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for compensation, -indemnity or damages of any sort solely as a result of terminating this License -in accordance with its terms, and termination of this License will be without -prejudice to any other right or remedy of any party. + 12.2 Effect of Termination. Upon termination, You agree to immediately stop any further use, reproduction, modification, sublicensing and distribution of the Covered Code. All sublicenses to the Covered Code which have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nature, should remain in effect beyond the termination of this License shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for compensation, indemnity or damages of any sort solely as a result of terminating this License in accordance with its terms, and termination of this License will be without prejudice to any other right or remedy of any party. - 13. Miscellaneous. +13. Miscellaneous. -13.1 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered -Code include only those rights customarily provided to the public as defined -in this License. This customary commercial license in technical data and software -is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer -Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical -Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End -Users acquire Covered Code with only those rights set forth herein. + 13.1 Government End Users. The Covered Code is a "commercial item" as defined in FAR 2.101. Government software and technical data rights in the Covered Code include only those rights customarily provided to the public as defined in this License. This customary commercial license in technical data and software is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -13.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between or among You, Apple or any Contributor, and You will not represent -to the contrary, whether expressly, by implication, appearance or otherwise. + 13.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between or among You, Apple or any Contributor, and You will not represent to the contrary, whether expressly, by implication, appearance or otherwise. -13.3 Independent Development. Nothing in this License will impair Apple's -right to acquire, license, develop, have others develop for it, market and/or -distribute technology or products that perform the same or similar functions -as, or otherwise compete with, Modifications, Larger Works, technology or -products that You may develop, produce, market or distribute. + 13.3 Independent Development. Nothing in this License will impair Apple's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Larger Works, technology or products that You may develop, produce, market or distribute. -13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce -any provision of this License will not be deemed a waiver of future enforcement -of that or any other provision. Any law or regulation which provides that -the language of a contract shall be construed against the drafter will not -apply to this License. + 13.4 Waiver; Construction. Failure by Apple or any Contributor to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. Any law or regulation which provides that the language of a contract shall be construed against the drafter will not apply to this License. -13.5 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the remainder -of this License will continue in full force and effect. (b) Notwithstanding -the foregoing, if applicable law prohibits or restricts You from fully and/or -specifically complying with Sections 2 and/or 3 or prevents the enforceability -of either of those Sections, this License will immediately terminate and You -must immediately discontinue any use of the Covered Code and destroy all copies -of it that are in your possession or control. + 13.5 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. -13.6 Dispute Resolution. Any litigation or other dispute resolution between -You and Apple relating to this License shall take place in the Northern District -of California, and You and Apple hereby consent to the personal jurisdiction -of, and venue in, the state and federal courts within that District with respect -to this License. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. + 13.6 Dispute Resolution. Any litigation or other dispute resolution between You and Apple relating to this License shall take place in the Northern District of California, and You and Apple hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -13.7 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -California, except that body of California law concerning conflicts of law. + 13.7 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. + + Where You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties ont exigé que le présent contrat et tous les documents connexes soient rédigés en anglais. -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exigé que -le présent contrat et tous les documents connexes soient rédigés en anglais. EXHIBIT A. -"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. +"Portions Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. -This file contains Original Code and/or Modifications of Original Code as -defined in and that are subject to the Apple Public Source License Version -2.0 (the 'License'). You may not use this file except in compliance with the -License. Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ -and read it before using this file. +This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Apple Public Source License Version 2.0 (the 'License'). You may not use this file except in compliance with the License. Please obtain a copy of the License at http://www.opensource.apple.com/apsl/ and read it before using this file. -The Original Code and all software distributed under the License are distributed -on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, -ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET -ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language -governing rights and limitations under the License." +The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License." diff --git a/options/license/Abstyles b/options/license/Abstyles index 4ba647914..96027770e 100644 --- a/options/license/Abstyles +++ b/options/license/Abstyles @@ -1,18 +1,11 @@ This is APREAMBL.TEX, version 1.10e, written by Hans-Hermann Bode - (HHBODE@DOSUNI1.BITNET), for the BibTeX `adaptable' family, version 1.10. - See the file APREAMBL.DOC for a detailed documentation. This program is distributed WITHOUT ANY WARRANTY, express or implied. Copyright (C) 1991, 1992 Hans-Hermann Bode -Permission is granted to make and distribute verbatim copies of this document -provided that the copyright notice and this permission notice are preserved -on all copies. +Permission is granted to make and distribute verbatim copies of this document provided that the copyright notice and this permission notice are preserved on all copies. -Permission is granted to copy and distribute modified versions of this document -under the conditions for verbatim copying, provided that the entire resulting -derived work is distributed under the terms of a permission notice identical -to this one. +Permission is granted to copy and distribute modified versions of this document under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. diff --git a/options/license/Adobe-2006 b/options/license/Adobe-2006 index 9e3828254..d6fb2634a 100644 --- a/options/license/Adobe-2006 +++ b/options/license/Adobe-2006 @@ -1,30 +1,12 @@ -Adobe Systems Incorporated(r) Source Code License Agreement Copyright(c) 2006 -Adobe Systems Incorporated. All rights reserved. +Adobe Systems Incorporated(r) Source Code License Agreement +Copyright(c) 2006 Adobe Systems Incorporated. All rights reserved. -Please read this Source Code License Agreement carefully before using the -source code. +Please read this Source Code License Agreement carefully before using the source code. -Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable copyright license, to reproduce, prepare -derivative works of, publicly display, publicly perform, and distribute this -source code and such derivative works in source or object code form without -any attribution requirements. +Adobe Systems Incorporated grants to you a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license, to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute this source code and such derivative works in source or object code form without any attribution requirements. -The name "Adobe Systems Incorporated" must not be used to endorse or promote -products derived from the source code without prior written permission. +The name "Adobe Systems Incorporated" must not be used to endorse or promote products derived from the source code without prior written permission. -You agree to indemnify, hold harmless and defend Adobe Systems Incorporated -from and against any loss, damage, claims or lawsuits, including attorney's -fees that arise or result from your use or distribution of the source code. +You agree to indemnify, hold harmless and defend Adobe Systems Incorporated from and against any loss, damage, claims or lawsuits, including attorney's fees that arise or result from your use or distribution of the source code. -THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT ANY TECHNICAL -SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF NON-INFRINGEMENT, TITLE -OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA OR ITS SUPPLIERS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOURCE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOURCE CODE IS PROVIDED "AS IS" AND "WITH ALL FAULTS", WITHOUT ANY TECHNICAL SUPPORT OR ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ALSO, THERE IS NO WARRANTY OF NON-INFRINGEMENT, TITLE OR QUIET ENJOYMENT. IN NO EVENT SHALL MACROMEDIA OR ITS SUPPLIERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOURCE CODE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/Adobe-Glyph b/options/license/Adobe-Glyph index 8e1a4a745..609651d82 100644 --- a/options/license/Adobe-Glyph +++ b/options/license/Adobe-Glyph @@ -1,29 +1,10 @@ Copyright (c) 1997,1998,2002,2007 Adobe Systems Incorporated -Permission is hereby granted, free of charge, to any person obtaining a copy -of this documentation file to use, copy, publish, distribute, sublicense, -and/or sell copies of the documentation, and to permit others to do the same, -provided that: +Permission is hereby granted, free of charge, to any person obtaining a copy of this documentation file to use, copy, publish, distribute, sublicense, and/or sell copies of the documentation, and to permit others to do the same, provided that: -- No modification, editing or other alteration of this document is allowed; -and + - No modification, editing or other alteration of this document is allowed; and + - The above copyright notice and this permission notice shall be included in all copies of the documentation. -- The above copyright notice and this permission notice shall be included -in all copies of the documentation. +Permission is hereby granted, free of charge, to any person obtaining a copy of this documentation file, to create their own derivative works from the content of this document to use, copy, publish, distribute, sublicense, and/or sell the derivative works, and to permit others to do the same, provided that the derived work is not represented as being a copy or version of this document. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this documentation file, to create their own derivative works from the -content of this document to use, copy, publish, distribute, sublicense, and/or -sell the derivative works, and to permit others to do the same, provided that -the derived work is not represented as being a copy or version of this document. - -Adobe shall not be liable to any party for any loss of revenue or profit or -for indirect, incidental, special, consequential, or other similar damages, -whether based on tort (including without limitation negligence or strict liability), -contract or other legal or equitable grounds even if Adobe has been advised -or had reason to know of the possibility of such damages. The Adobe materials -are provided on an "AS IS" basis. Adobe specifically disclaims all express, -statutory, or implied warranties relating to the Adobe materials, including -but not limited to those concerning merchantability or fitness for a particular -purpose or non-infringement of any third party rights regarding the Adobe -materials. +Adobe shall not be liable to any party for any loss of revenue or profit or for indirect, incidental, special, consequential, or other similar damages, whether based on tort (including without limitation negligence or strict liability), contract or other legal or equitable grounds even if Adobe has been advised or had reason to know of the possibility of such damages. The Adobe materials are provided on an "AS IS" basis.Ê Adobe specifically disclaims all express, statutory, or implied warranties relating to the Adobe materials, including but not limited to those concerning merchantability or fitness for a particular purpose or non-infringement of any third party rights regarding the Adobe materials. diff --git a/options/license/Afmparse b/options/license/Afmparse index 7f107554f..7c6d37ca6 100644 --- a/options/license/Afmparse +++ b/options/license/Afmparse @@ -2,18 +2,9 @@ This file may be freely copied and redistributed as long as: - 1) This entire notice continues to be included in the file, + 1) This entire notice continues to be included in the file, + 2) If the file has been modified in any way, a notice of such modification is conspicuously indicated. -2) If the file has been modified in any way, a notice of such modification -is conspicuously indicated. +PostScript, Display PostScript,and Adobe are registered trademarks of Adobe Systems Incorporated. -PostScript, Display PostScript, and Adobe are registered trademarks of Adobe -Systems Incorporated. - -THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT NOTICE, -AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED. -ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR LIABILITY FOR ANY -ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR -STATUTORY) WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY DISCLAIMS ANY AND -ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT -OF THIRD PARTY RIGHTS. +THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED. ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY) WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. diff --git a/options/license/Aladdin b/options/license/Aladdin index 204cb1f3d..5d71ff8ec 100644 --- a/options/license/Aladdin +++ b/options/license/Aladdin @@ -1,204 +1,62 @@ Aladdin Free Public License +(Version 8, November 18, 1999) -(Version 8, November 18, 1999) Copyright (C) 1994, 1995, 1997, 1998, 1999 -Aladdin Enterprises, +Copyright (C) 1994, 1995, 1997, 1998, 1999 Aladdin Enterprises, Menlo Park, California, U.S.A. All rights reserved. -Menlo Park, California, U.S.A. All rights reserved. NOTE: This License is -not the same as any of the GNU Licenses published by the Free Software Foundation. -Its terms are substantially different from those of the GNU Licenses. If you -are familiar with the GNU Licenses, please read this license with extra care. +NOTE: This License is not the same as any of the GNU Licenses published by the Free Software Foundation. Its terms are substantially different from those of the GNU Licenses. If you are familiar with the GNU Licenses, please read this license with extra care. -Aladdin Enterprises hereby grants to anyone the permission to apply this License -to their own work, as long as the entire License (including the above notices -and this paragraph) is copied with no changes, additions, or deletions except -for changing the first paragraph of Section 0 to include a suitable description -of the work to which the license is being applied and of the person or entity -that holds the copyright in the work, and, if the License is being applied -to a work created in a country other than the United States, replacing the -first paragraph of Section 6 with an appropriate reference to the laws of -the appropriate country. +Aladdin Enterprises hereby grants to anyone the permission to apply this License to their own work, as long as the entire License (including the above notices and this paragraph) is copied with no changes, additions, or deletions except for changing the first paragraph of Section 0 to include a suitable description of the work to which the license is being applied and of the person or entity that holds the copyright in the work, and, if the License is being applied to a work created in a country other than the United States, replacing the first paragraph of Section 6 with an appropriate reference to the laws of the appropriate country. - 0. Subject Matter +0. Subject Matter +This License applies to the computer program known as "Aladdin Ghostscript." The "Program", below, refers to such program. The Program is a copyrighted work whose copyright is held by Aladdin Enterprises (the "Licensor"). Please note that Aladdin Ghostscript is neither the program known as "GNU Ghostscript" nor the version of Ghostscript available for commercial licensing from Artifex Software Inc. -This License applies to the computer program known as "Aladdin Ghostscript." -The "Program", below, refers to such program. The Program is a copyrighted -work whose copyright is held by Aladdin Enterprises (the "Licensor"). Please -note that Aladdin Ghostscript is neither the program known as "GNU Ghostscript" -nor the version of Ghostscript available for commercial licensing from Artifex -Software Inc. +A "work based on the Program" means either the Program or any derivative work of the Program, as defined in the United States Copyright Act of 1976, such as a translation or a modification. -A "work based on the Program" means either the Program or any derivative work -of the Program, as defined in the United States Copyright Act of 1976, such -as a translation or a modification. +BY MODIFYING OR DISTRIBUTING THE PROGRAM (OR ANY WORK BASED ON THE PROGRAM), YOU INDICATE YOUR ACCEPTANCE OF THIS LICENSE TO DO SO, AND ALL ITS TERMS AND CONDITIONS FOR COPYING, DISTRIBUTING OR MODIFYING THE PROGRAM OR WORKS BASED ON IT. NOTHING OTHER THAN THIS LICENSE GRANTS YOU PERMISSION TO MODIFY OR DISTRIBUTE THE PROGRAM OR ITS DERIVATIVE WORKS. THESE ACTIONS ARE PROHIBITED BY LAW. IF YOU DO NOT ACCEPT THESE TERMS AND CONDITIONS, DO NOT MODIFY OR DISTRIBUTE THE PROGRAM. -BY MODIFYING OR DISTRIBUTING THE PROGRAM (OR ANY WORK BASED ON THE PROGRAM), -YOU INDICATE YOUR ACCEPTANCE OF THIS LICENSE TO DO SO, AND ALL ITS TERMS AND -CONDITIONS FOR COPYING, DISTRIBUTING OR MODIFYING THE PROGRAM OR WORKS BASED -ON IT. NOTHING OTHER THAN THIS LICENSE GRANTS YOU PERMISSION TO MODIFY OR -DISTRIBUTE THE PROGRAM OR ITS DERIVATIVE WORKS. THESE ACTIONS ARE PROHIBITED -BY LAW. IF YOU DO NOT ACCEPT THESE TERMS AND CONDITIONS, DO NOT MODIFY OR -DISTRIBUTE THE PROGRAM. +1. Licenses. +Licensor hereby grants you the following rights, provided that you comply with all of the restrictions set forth in this License and provided, further, that you distribute an unmodified copy of this License with the Program: - 1. Licenses. + (a) You may copy and distribute literal (i.e., verbatim) copies of the Program's source code as you receive it throughout the world, in any medium. + (b) You may modify the Program, create works based on the Program and distribute copies of such throughout the world, in any medium. -Licensor hereby grants you the following rights, provided that you comply -with all of the restrictions set forth in this License and provided, further, -that you distribute an unmodified copy of this License with the Program: +2. Restrictions. +This license is subject to the following restrictions: -(a) You may copy and distribute literal (i.e., verbatim) copies of the Program's -source code as you receive it throughout the world, in any medium. + (a) Distribution of the Program or any work based on the Program by a commercial organization to any third party is prohibited if any payment is made in connection with such distribution, whether directly (as in payment for a copy of the Program) or indirectly (as in payment for some service related to the Program, or payment for some product or service that includes a copy of the Program "without charge"; these are only examples, and not an exhaustive enumeration of prohibited activities). The following methods of distribution involving payment shall not in and of themselves be a violation of this restriction: -(b) You may modify the Program, create works based on the Program and distribute -copies of such throughout the world, in any medium. + (i) Posting the Program on a public access information storage and retrieval service for which a fee is received for retrieving information (such as an on-line service), provided that the fee is not content-dependent (i.e., the fee would be the same for retrieving the same volume of information consisting of random data) and that access to the service and to the Program is available independent of any other product or service. An example of a service that does not fall under this section is an on-line service that is operated by a company and that is only available to customers of that company. (This is not an exhaustive enumeration.) + (ii) Distributing the Program on removable computer-readable media, provided that the files containing the Program are reproduced entirely and verbatim on such media, that all information on such media be redistributable for non-commercial purposes without charge, and that such media are distributed by themselves (except for accompanying documentation) independent of any other product or service. Examples of such media include CD-ROM, magnetic tape, and optical storage media. (This is not intended to be an exhaustive list.) An example of a distribution that does not fall under this section is a CD-ROM included in a book or magazine. (This is not an exhaustive enumeration.) - 2. Restrictions. + (b) Activities other than copying, distribution and modification of the Program are not subject to this License and they are outside its scope. Functional use (running) of the Program is not restricted, and any output produced through the use of the Program is subject to this license only if its contents constitute a work based on the Program (independent of having been made by running the Program). - This license is subject to the following restrictions: + (c) You must meet all of the following conditions with respect to any work that you distribute or publish that in whole or in part contains or is derived from the Program or any part thereof ("the Work"): -(a) Distribution of the Program or any work based on the Program by a commercial -organization to any third party is prohibited if any payment is made in connection -with such distribution, whether directly (as in payment for a copy of the -Program) or indirectly (as in payment for some service related to the Program, -or payment for some product or service that includes a copy of the Program -"without charge"; these are only examples, and not an exhaustive enumeration -of prohibited activities). The following methods of distribution involving -payment shall not in and of themselves be a violation of this restriction: + (i) If you have modified the Program, you must cause the Work to carry prominent notices stating that you have modified the Program's files and the date of any change. In each source file that you have modified, you must include a prominent notice that you have modified the file, including your name, your e-mail address (if any), and the date and purpose of the change; + (ii) You must cause the Work to be licensed as a whole and at no charge to all third parties under the terms of this License; + (iii) If the Work normally reads commands interactively when run, you must cause it, at each time the Work commences operation, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty). Such notice must also state that users may redistribute the Work only under the conditions of this License and tell the user how to view the copy of this License included with the Work. (Exceptions: if the Program is interactive but normally prints or displays such an announcement only at the request of a user, such as in an "About box", the Work is required to print or display the notice only under the same circumstances; if the Program itself is interactive but does not normally print such an announcement, the Work is not required to print an announcement.); + (iv) You must accompany the Work with the complete corresponding machine-readable source code, delivered on a medium customarily used for software interchange. The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable code. If you distribute with the Work any component that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, you must also distribute the source code of that component if you have it and are allowed to do so; + (v) If you distribute any written or printed material at all with the Work, such material must include either a written copy of this License, or a prominent written indication that the Work is covered by this License and written instructions for printing and/or displaying the copy of the License on the distribution medium; + (vi) You may not impose any further restrictions on the recipient's exercise of the rights granted herein. -(i) Posting the Program on a public access information storage and retrieval -service for which a fee is received for retrieving information (such as an -on-line service), provided that the fee is not content-dependent (i.e., the -fee would be the same for retrieving the same volume of information consisting -of random data) and that access to the service and to the Program is available -independent of any other product or service. An example of a service that -does not fall under this section is an on-line service that is operated by -a company and that is only available to customers of that company. (This is -not an exhaustive enumeration.) +If distribution of executable or object code is made by offering the equivalent ability to copy from a designated place, then offering equivalent ability to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source code along with the object code. -(ii) Distributing the Program on removable computer-readable media, provided -that the files containing the Program are reproduced entirely and verbatim -on such media, that all information on such media be redistributable for non-commercial -purposes without charge, and that such media are distributed by themselves -(except for accompanying documentation) independent of any other product or -service. Examples of such media include CD-ROM, magnetic tape, and optical -storage media. (This is not intended to be an exhaustive list.) An example -of a distribution that does not fall under this section is a CD-ROM included -in a book or magazine. (This is not an exhaustive enumeration.) +3. Reservation of Rights. +No rights are granted to the Program except as expressly set forth herein. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -(b) Activities other than copying, distribution and modification of the Program -are not subject to this License and they are outside its scope. Functional -use (running) of the Program is not restricted, and any output produced through -the use of the Program is subject to this license only if its contents constitute -a work based on the Program (independent of having been made by running the -Program). +4. Other Restrictions. +If the distribution and/or use of the Program is restricted in certain countries for any reason, Licensor may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -(c) You must meet all of the following conditions with respect to any work -that you distribute or publish that in whole or in part contains or is derived -from the Program or any part thereof ("the Work"): +5. Limitations. +THE PROGRAM IS PROVIDED TO YOU "AS IS," WITHOUT WARRANTY. THERE IS NO WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -(i) If you have modified the Program, you must cause the Work to carry prominent -notices stating that you have modified the Program's files and the date of -any change. In each source file that you have modified, you must include a -prominent notice that you have modified the file, including your name, your -e-mail address (if any), and the date and purpose of the change; +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL LICENSOR, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -(ii) You must cause the Work to be licensed as a whole and at no charge to -all third parties under the terms of this License; +6. General. +This License is governed by the laws of the State of California, U.S.A., excluding choice of law rules. -(iii) If the Work normally reads commands interactively when run, you must -cause it, at each time the Work commences operation, to print or display an -announcement including an appropriate copyright notice and a notice that there -is no warranty (or else, saying that you provide a warranty). Such notice -must also state that users may redistribute the Work only under the conditions -of this License and tell the user how to view the copy of this License included -with the Work. (Exceptions: if the Program is interactive but normally prints -or displays such an announcement only at the request of a user, such as in -an "About box", the Work is required to print or display the notice only under -the same circumstances; if the Program itself is interactive but does not -normally print such an announcement, the Work is not required to print an -announcement.); +If any part of this License is found to be in conflict with the law, that part shall be interpreted in its broadest meaning consistent with the law, and no other parts of the License shall be affected. -(iv) You must accompany the Work with the complete corresponding machine-readable -source code, delivered on a medium customarily used for software interchange. -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable code. If you distribute with the Work any component that -is normally distributed (in either source or binary form) with the major components -(compiler, kernel, and so on) of the operating system on which the executable -runs, you must also distribute the source code of that component if you have -it and are allowed to do so; +For United States Government users, the Program is provided with RESTRICTED RIGHTS. If you are a unit or agency of the United States Government or are acquiring the Program for any such unit or agency, the following apply: -(v) If you distribute any written or printed material at all with the Work, -such material must include either a written copy of this License, or a prominent -written indication that the Work is covered by this License and written instructions -for printing and/or displaying the copy of the License on the distribution -medium; - -(vi) You may not impose any further restrictions on the recipient's exercise -of the rights granted herein. - -If distribution of executable or object code is made by offering the equivalent -ability to copy from a designated place, then offering equivalent ability -to copy the source code from the same place counts as distribution of the -source code, even though third parties are not compelled to copy the source -code along with the object code. - - 3. Reservation of Rights. - -No rights are granted to the Program except as expressly set forth herein. -You may not copy, modify, sublicense, or distribute the Program except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 4. Other Restrictions. - -If the distribution and/or use of the Program is restricted in certain countries -for any reason, Licensor may add an explicit geographical distribution limitation -excluding those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates the limitation -as if written in the body of this License. - - 5. Limitations. - -THE PROGRAM IS PROVIDED TO YOU "AS IS," WITHOUT WARRANTY. THERE IS NO WARRANTY -FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, -YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -LICENSOR, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM -AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO -USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 6. General. - -This License is governed by the laws of the State of California, U.S.A., excluding -choice of law rules. - -If any part of this License is found to be in conflict with the law, that -part shall be interpreted in its broadest meaning consistent with the law, -and no other parts of the License shall be affected. - -For United States Government users, the Program is provided with RESTRICTED -RIGHTS. If you are a unit or agency of the United States Government or are -acquiring the Program for any such unit or agency, the following apply: - -If the unit or agency is the Department of Defense ("DOD"), the Program and -its documentation are classified as "commercial computer software" and "commercial -computer software documentation" respectively and, pursuant to DFAR Section -227.7202, the Government is acquiring the Program and its documentation in -accordance with the terms of this License. If the unit or agency is other -than DOD, the Program and its documentation are classified as "commercial -computer software" and "commercial computer software documentation" respectively -and, pursuant to FAR Section 12.212, the Government is acquiring the Program -and its documentation in accordance with the terms of this License. +If the unit or agency is the Department of Defense ("DOD"), the Program and its documentation are classified as "commercial computer software" and "commercial computer software documentation" respectively and, pursuant to DFAR Section 227.7202, the Government is acquiring the Program and its documentation in accordance with the terms of this License. If the unit or agency is other than DOD, the Program and its documentation are classified as "commercial computer software" and "commercial computer software documentation" respectively and, pursuant to FAR Section 12.212, the Government is acquiring the Program and its documentation in accordance with the terms of this License. diff --git a/options/license/Apache-1.0 b/options/license/Apache-1.0 index 923c623b3..383e7b920 100644 --- a/options/license/Apache-1.0 +++ b/options/license/Apache-1.0 @@ -1,46 +1,20 @@ Copyright (c) 1995-1999 The Apache Group. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software must -display the following acknowledgment: "This product includes software developed -by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/) -." +3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)." -4. The name "Apache Server" and "Apache Group" must not be used to endorse -or promote products derived from this software without prior written permission. -For written permission, please contact apache@apache.org . +4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. -5. Products derived from this software may not be called "Apache" nor may -"Apache" appear in their name, without prior written permission of the Apache -Group . +5. Products derived from this software may not be called "Apache" nor may "Apache" appear in their name, without prior written permission of the Apache Group. 6. Redistributions of any form whatsoever must retain the following acknowledgment: +"This product includes software developed by the Apache Group for use in the Apache HTTP server project (http://www.apache.org/)." -"This product includes software developed by the Apache Group for use in the -Apache HTTP server project (http://www.apache.org/) ." +THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE APACHE GROUP OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many individuals -on behalf of the Apache Group and was originally based on public domain software -written at the National Center for Supercomputing Applications, University -of Illinois, Urbana-Champaign. For more information on the Apache Group and -the Apache HTTP server project, please see . + This software consists of voluntary contributions made by many individuals on behalf of the Apache Group and was originally based on public domain software written at the National Center for Supercomputing Applications, University of Illinois, Urbana-Champaign. For more information on the Apache Group and the Apache HTTP server project, please see . diff --git a/options/license/Apache-1.1 b/options/license/Apache-1.1 index 6736b34d5..2f0168af9 100644 --- a/options/license/Apache-1.1 +++ b/options/license/Apache-1.1 @@ -1,46 +1,21 @@ -Apache License 1.1 Copyright (c) 2000 The Apache Software Foundation. All -rights reserved. +Apache License 1.1 -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Copyright (c) 2000 The Apache Software Foundation. All rights reserved. -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -3. The end-user documentation included with the redistribution, if any, must -include the following acknowledgment: +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -"This product includes software developed by the Apache Software Foundation -(http://www.apache.org/) ." +3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: +"This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." +Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. -Alternately, this acknowledgment may appear in the software itself, if and -wherever such third-party acknowledgments normally appear. +4. The names "Apache" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. -4. The name "Apache" and "Apache Software Foundation" must not be used to -endorse or promote products derived from this software without prior written -permission. For written permission, please contact apache@apache.org . +5. Products derived from this software may not be called "Apache" [ex. "Jakarta," "Apache," or "Apache Commons,"] nor may "Apache" [ex. the names] appear in their name, without prior written permission of the Apache Software Foundation. -5. Products derived from this software may not be called "Apache" [ex. "Jakarta," -"Apache," or "Apache Commons,"] nor may "Apache" [ex. the names] appear in -their name, without prior written permission of the Apache Software Foundation. +THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE -SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many individuals -on behalf of the Apache Software Foundation. For more information on the Apache -Software Foundation, please see http://www.apache.org/. Portions of this software -are based upon public domain software originally written at the National Center -for Supercomputing Applications, University of Illinois, Urbana-Champaign. + This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see http://www.apache.org/. Portions of this software are based upon public domain software originally written at the National Center for Supercomputing Applications, University of Illinois, Urbana-Champaign. diff --git a/options/license/Apache-2.0 b/options/license/Apache-2.0 index 4ed90b952..137069b82 100644 --- a/options/license/Apache-2.0 +++ b/options/license/Apache-2.0 @@ -1,208 +1,73 @@ Apache License - Version 2.0, January 2004 +http://www.apache.org/licenses/ -http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, -AND DISTRIBUTION +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +1. Definitions. - +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"License" shall mean the terms and conditions for use, reproduction, and distribution -as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (ii) ownership of fifty percent (50%) or more -of the outstanding shares, or (iii) beneficial ownership of such entity. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions -granted by this License. +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -"Object" form shall mean any form resulting from mechanical transformation -or translation of a Source form, including but not limited to compiled object -code, generated documentation, and conversions to other media types. +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -"Work" shall mean the work of authorship, whether in Source or Object form, -made available under the License, as indicated by a copyright notice that -is included in or attached to the work (an example is provided in the Appendix -below). + (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - + (b) You must cause any modified files to carry prominent notices stating that You changed the files; and -"Derivative Works" shall mean any work, whether in Source or Object form, -that is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative -Works shall not include works that remain separable from, or merely link (or -bind by name) to the interfaces of, the Work and Derivative Works thereof. + (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - + (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative -Works thereof, that is intentionally submitted to Licensor for inclusion in -the Work by the copyright owner or by an individual or Legal Entity authorized -to submit on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication -sent to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor -for the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently incorporated -within the Work. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -2. Grant of Copyright License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable copyright license to reproduce, prepare -Derivative Works of, publicly display, publicly perform, sublicense, and distribute -the Work and such Derivative Works in Source or Object form. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -3. Grant of Patent License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) patent -license to make, have made, use, offer to sell, sell, import, and otherwise -transfer the Work, where such license applies only to those patent claims -licensable by such Contributor that are necessarily infringed by their Contribution(s) -alone or by combination of their Contribution(s) with the Work to which such -Contribution(s) was submitted. If You institute patent litigation against -any entity (including a cross-claim or counterclaim in a lawsuit) alleging -that the Work or a Contribution incorporated within the Work constitutes direct -or contributory patent infringement, then any patent licenses granted to You -under this License for that Work shall terminate as of the date such litigation -is filed. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, and -in Source or Object form, provided that You meet the following conditions: +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -(a) You must give any other recipients of the Work or Derivative Works a copy -of this License; and - -(b) You must cause any modified files to carry prominent notices stating that -You changed the files; and - -(c) You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source -form of the Work, excluding those notices that do not pertain to any part -of the Derivative Works; and - -(d) If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part -of the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works -that You distribute, alongside or as an addendum to the NOTICE text from the -Work, provided that such additional attribution notices cannot be construed -as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, -or distribution of Your modifications, or for any such Derivative Works as -a whole, provided Your use, reproduction, and distribution of the Work otherwise -complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any -Contribution intentionally submitted for inclusion in the Work by You to the -Licensor shall be under the terms and conditions of this License, without -any additional terms or conditions. Notwithstanding the above, nothing herein -shall supersede or modify the terms of any separate license agreement you -may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to -in writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR -A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness -of using or redistributing the Work and assume any risks associated with Your -exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether -in tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to -in writing, shall any Contributor be liable to You for damages, including -any direct, indirect, special, incidental, or consequential damages of any -character arising as a result of this License or out of the use or inability -to use the Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses), even if such Contributor has been advised of the possibility -of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work -or Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such obligations, -You may act only on Your own behalf and on Your sole responsibility, not on -behalf of any other Contributor, and only if You agree to indemnify, defend, -and hold each Contributor harmless for any liability incurred by, or claims -asserted against, such Contributor by reason of your accepting any such warranty -or additional liability. END OF TERMS AND CONDITIONS +END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. -To apply the Apache License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own identifying -information. (Don't include the brackets!) The text should be enclosed in -the appropriate comment syntax for the file format. We also recommend that -a file or class name and description of purpose be included on the same "printed -page" as the copyright notice for easier identification within third-party -archives. +To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/options/license/Artistic-1.0 b/options/license/Artistic-1.0 index f87fe4201..9298f435e 100644 --- a/options/license/Artistic-1.0 +++ b/options/license/Artistic-1.0 @@ -2,96 +2,48 @@ The Artistic License Preamble -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as ftp.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. + b) use the modified Package only within your corporation or organization. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. + d) make other distribution arrangements with the Copyright Holder. - b) use the modified Package only within your corporation or organization. +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. + b) accompany the distribution with the machine-readable source of the Package with your modifications. + c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. + d) make other distribution arrangements with the Copyright Holder. - d) make other distribution arrangements with the Copyright Holder. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. +7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. +8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -c) accompany any non-standard executables with their corresponding Standard -Version executables, giving the non-standard executables non-standard names, -and clearly documenting the differences in manual pages (or equivalent), together -with instructions on where to get the Standard Version. +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. - d) make other distribution arrangements with the Copyright Holder. - -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. - -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. - -7. C or perl subroutines supplied by you and linked into this Package shall -not be considered part of this Package. - -8. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. - -9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +The End diff --git a/options/license/Artistic-1.0-Perl b/options/license/Artistic-1.0-Perl index 4591ee9f2..dd45f4cd8 100644 --- a/options/license/Artistic-1.0-Perl +++ b/options/license/Artistic-1.0-Perl @@ -2,114 +2,50 @@ The "Artistic License" Preamble -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder as -specified below. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as uunet.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. + b) use the modified Package only within your corporation or organization. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. + d) make other distribution arrangements with the Copyright Holder. - b) use the modified Package only within your corporation or organization. +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. + b) accompany the distribution with the machine-readable source of the Package with your modifications. + c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. + d) make other distribution arrangements with the Copyright Holder. - d) make other distribution arrangements with the Copyright Holder. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. +7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. +8. Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. -c) give non-standard executables non-standard names, and clearly document -the differences in manual pages (or equivalent), together with instructions -on where to get the Standard Version. +9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. - d) make other distribution arrangements with the Copyright Holder. +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. You may embed this Package's interpreter -within an executable of yours (by linking); this shall be construed as a mere -form of aggregation, provided that the complete Standard Version of the interpreter -is so embedded. - -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whoever generated them, and may be sold commercially, -and may be aggregated with this Package. If such scripts or library files -are aggregated with this Package via the so-called "undump" or "unexec" methods -of producing a binary executable image, then distribution of such an image -shall neither be construed as a distribution of this Package nor shall it -fall under the restrictions of Paragraphs 3 and 4, provided that you do not -represent such an executable image as a Standard Version of this Package. - -7. C subroutines (or comparably compiled subroutines in other languages) supplied -by you and linked into this Package in order to emulate subroutines and variables -of the language defined by this Package shall not be considered part of this -Package, but are the equivalent of input as in Paragraph 6, provided these -subroutines do not change the language in any way that would cause it to fail -the regression tests for the language. - -8. Aggregation of this Package with a commercial distribution is always permitted -provided that the use of this Package is embedded; that is, when no overt -attempt is made to make this Package's interfaces visible to the end user -of the commercial distribution. Such use shall not be construed as a distribution -of this Package. - -9. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. - -10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +The End diff --git a/options/license/Artistic-1.0-cl8 b/options/license/Artistic-1.0-cl8 index 7463c897d..6f26f833d 100644 --- a/options/license/Artistic-1.0-cl8 +++ b/options/license/Artistic-1.0-cl8 @@ -2,102 +2,50 @@ The Artistic License Preamble -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as ftp.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. + b) use the modified Package only within your corporation or organization. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. + d) make other distribution arrangements with the Copyright Holder. - b) use the modified Package only within your corporation or organization. +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. + b) accompany the distribution with the machine-readable source of the Package with your modifications. + c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. + d) make other distribution arrangements with the Copyright Holder. - d) make other distribution arrangements with the Copyright Holder. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. +7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. +8.Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. -c) accompany any non-standard executables with their corresponding Standard -Version executables, giving the non-standard executables non-standard names, -and clearly documenting the differences in manual pages (or equivalent), together -with instructions on where to get the Standard Version. +9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. - d) make other distribution arrangements with the Copyright Holder. +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. - -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. - -7. C or perl subroutines supplied by you and linked into this Package shall -not be considered part of this Package. - -8.Aggregation of this Package with a commercial distribution is always permitted -provided that the use of this Package is embedded; that is, when no overt -attempt is made to make this Package's interfaces visible to the end user -of the commercial distribution. Such use shall not be construed as a distribution -of this Package. - -9. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. - -10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +The End diff --git a/options/license/Artistic-2.0 b/options/license/Artistic-2.0 index 64507d04b..eb2e968ed 100644 --- a/options/license/Artistic-2.0 +++ b/options/license/Artistic-2.0 @@ -2,197 +2,84 @@ The Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -This license establishes the terms under which a given free software Package -may be copied, modified, distributed, and/or redistributed. The intent is -that the Copyright Holder maintains some artistic control over the development -of that Package while still keeping the Package available as open source and -free software. +This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. -You are always permitted to make arrangements wholly outside of this license -directly with the Copyright Holder of a given Package. If the terms of this -license do not permit the full use that you propose to make of the Package, -you should contact the Copyright Holder and seek a different licensing arrangement. +You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions - + "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. -"Copyright Holder" means the individual(s) or organization(s) named in the -copyright notice for the entire Package. + "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. - + "You" and "your" means any person who would like to copy, distribute, or modify the Package. -"Contributor" means any party that has contributed code or other material -to the Package, in accordance with the Copyright Holder's procedures. + "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. - + "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. -"You" and "your" means any person who would like to copy, distribute, or modify -the Package. + "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. - + "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. -"Package" means the collection of files distributed by the Copyright Holder, -and derivatives of that collection and/or of those files. A given Package -may consist of either the Standard Version, or a Modified Version. + "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. - + "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. -"Distribute" means providing a copy of the Package or making it accessible -to anyone else, or in the case of a company or organization, to others outside -of your company or organization. + "Source" form means the source code, documentation source, and configuration files for the Package. - - -"Distributor Fee" means any fee that you charge for Distributing this Package -or providing support for this Package to another party. It does not mean licensing -fees. - - - -"Standard Version" refers to the Package if it has not been modified, or has -been modified only in ways explicitly requested by the Copyright Holder. - - - -"Modified Version" means the Package, if it has been changed, and such changes -were not explicitly requested by the Copyright Holder. - - - -"Original License" means this Artistic License as Distributed with the Standard -Version of the Package, in its current version or as it may be modified by -The Perl Foundation in the future. - - - -"Source" form means the source code, documentation source, and configuration -files for the Package. - - - -"Compiled" form means the compiled bytecode, object code, binary, or any other -form resulting from mechanical transformation or translation of the Source -form. + "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution -(1) You are permitted to use the Standard Version and create and use Modified -Versions for any purpose without restriction, provided that you do not Distribute -the Modified Version. +(1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version -(2) You may Distribute verbatim copies of the Source form of the Standard -Version of this Package in any medium without restriction, either gratis or -for a Distributor Fee, provided that you duplicate all of the original copyright -notices and associated disclaimers. At your discretion, such verbatim copies -may or may not include a Compiled form of the Package. +(2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. -(3) You may apply any bug fixes, portability changes, and other modifications -made available from the Copyright Holder. The resulting Package will still -be considered the Standard Version, and as such will be subject to the Original -License. +(3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source -(4) You may Distribute your Modified Version as Source (either gratis or for -a Distributor Fee, and with or without a Compiled form of the Modified Version) -provided that you clearly document how it differs from the Standard Version, -including, but not limited to, documenting any non-standard features, executables, -or modules, and provided that you do at least ONE of the following: +(4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: -(a) make the Modified Version available to the Copyright Holder of the Standard -Version, under the Original License, so that the Copyright Holder may include -your modifications in the Standard Version. + (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. + (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. + (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under -(b) ensure that installation of your Modified Version does not prevent the -user installing or running the Standard Version. In addition, the Modified -Version must bear a name that is different from the name of the Standard Version. + (i) the Original License or + (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. -(c) allow anyone who receives a copy of the Modified Version to make the Source -form of the Modified Version available to others under +Distribution of Compiled Forms of the Standard Version or Modified Versions without the Source - (i) the Original License or +(5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. -(ii) a license that permits the licensee to freely copy, modify and redistribute -the Modified Version using the same licensing terms that apply to the copy -that the licensee received, and requires that the Source form of the Modified -Version, and of any works derived from it, be made freely available in that -license fees are prohibited but Distributor Fees are allowed. - -Distribution of Compiled Forms of the Standard Version or Modified Versions -without the Source - -(5) You may Distribute Compiled forms of the Standard Version without the -Source, provided that you include complete instructions on how to get the -Source of the Standard Version. Such instructions must be valid at the time -of your distribution. If these instructions, at any time while you are carrying -out such distribution, become invalid, you must provide new instructions on -demand or cease further distribution. If you provide valid instructions or -cease distribution within thirty days after you become aware that the instructions -are invalid, then you do not forfeit any of your rights under this license. - -(6) You may Distribute a Modified Version in Compiled form without the Source, -provided that you comply with Section 4 with respect to the Source of the -Modified Version. +(6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package -(7) You may aggregate the Package (either the Standard Version or Modified -Version) with other packages and Distribute the resulting aggregation provided -that you do not charge a licensing fee for the Package. Distributor Fees are -permitted, and licensing fees for other components in the aggregation are -permitted. The terms of this license apply to the use and Distribution of -the Standard or Modified Versions as included in the aggregation. +(7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. -(8) You are permitted to link Modified and Standard Versions with other works, -to embed the Package in a larger work of your own, or to build stand-alone -binary or bytecode versions of applications that include the Package, and -Distribute the result without restriction, provided the result does not expose -a direct interface to the Package. +(8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version -(9) Works (including, but not limited to, modules and scripts) that merely -extend or make use of the Package, do not, by themselves, cause the Package -to be a Modified Version. In addition, such works are not considered parts -of the Package itself, and are not subject to the terms of this license. +(9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions -(10) Any use, modification, and distribution of the Standard or Modified Versions -is governed by this Artistic License. By using, modifying or distributing -the Package, you accept this license. Do not use, modify, or distribute the -Package, if you do not accept this license. +(10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. -(11) If your Modified Version has been derived from a Modified Version made -by someone other than you, you are nevertheless required to ensure that your -Modified Version complies with the requirements of this license. +(11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. -(12) This license does not grant you the right to use any trademark, service -mark, tradename, or logo of the Copyright Holder. +(12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. -(13) This license includes the non-exclusive, worldwide, free-of-charge patent -license to make, have made, use, offer to sell, sell, import and otherwise -transfer the Package with respect to any patent claims licensable by the Copyright -Holder that are necessarily infringed by the Package. If you institute patent -litigation (including a cross-claim or counterclaim) against any party alleging -that the Package constitutes direct or contributory patent infringement, then -this Artistic License to you shall terminate on the date that such litigation -is filed. +(13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. - (14) Disclaimer of Warranty: - -THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND -WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE -EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER -OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGE. +(14) Disclaimer of Warranty: +THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/Autoconf-exception-3.0 b/options/license/Autoconf-exception-3.0 index 346c459f8..f212f9c7b 100644 --- a/options/license/Autoconf-exception-3.0 +++ b/options/license/Autoconf-exception-3.0 @@ -1,6 +1,7 @@ AUTOCONF CONFIGURE SCRIPT EXCEPTION -Version 3.0, 18 August 2009 Copyright © 2009 Free Software Foundation, Inc. +Version 3.0, 18 August 2009 +Copyright © 2009 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -8,18 +9,18 @@ This Exception is an additional permission under section 7 of the GNU General Pu The purpose of this Exception is to allow distribution of Autoconf's typical output under terms of the recipient's choice (including proprietary). - 0. Definitions. +0. Definitions. - "Covered Code" is the source or object code of a version of Autoconf that is a covered work under this License. +"Covered Code" is the source or object code of a version of Autoconf that is a covered work under this License. - "Normally Copied Code" for a version of Autoconf means all parts of its Covered Code which that version can copy from its code (i.e., not from its input file) into its minimally verbose, non-debugging and non-tracing output. +"Normally Copied Code" for a version of Autoconf means all parts of its Covered Code which that version can copy from its code (i.e., not from its input file) into its minimally verbose, non-debugging and non-tracing output. - "Ineligible Code" is Covered Code that is not Normally Copied Code. +"Ineligible Code" is Covered Code that is not Normally Copied Code. - 1. Grant of Additional Permission. +1. Grant of Additional Permission. - You have permission to propagate output of Autoconf, even if such propagation would otherwise violate the terms of GPLv3. However, if by modifying Autoconf you cause any Ineligible Code of the version you received to become Normally Copied Code of your modified version, then you void this Exception for the resulting covered work. If you convey that resulting covered work, you must remove this Exception in accordance with the second paragraph of Section 7 of GPLv3. +You have permission to propagate output of Autoconf, even if such propagation would otherwise violate the terms of GPLv3. However, if by modifying Autoconf you cause any Ineligible Code of the version you received to become Normally Copied Code of your modified version, then you void this Exception for the resulting covered work. If you convey that resulting covered work, you must remove this Exception in accordance with the second paragraph of Section 7 of GPLv3. - 2. No Weakening of Autoconf Copyleft. +2. No Weakening of Autoconf Copyleft. - The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of Autoconf. +The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of Autoconf. diff --git a/options/license/BSD-1-Clause b/options/license/BSD-1-Clause index 54ad9dca8..3b3c4e814 100644 --- a/options/license/BSD-1-Clause +++ b/options/license/BSD-1-Clause @@ -1,18 +1,19 @@ -Copyright (c) All rights reserved. +Copyright (c) 1995, 1999 Berkeley Software Design, Inc. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. - -THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY Berkeley Software Design, Inc. ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL Berkeley Software Design, Inc. BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. diff --git a/options/license/BSD-2-Clause b/options/license/BSD-2-Clause index 2d2bab112..b0e20f538 100644 --- a/options/license/BSD-2-Clause +++ b/options/license/BSD-2-Clause @@ -1,22 +1,9 @@ -Copyright (c) . All rights reserved. +Copyright (c) All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-2-Clause-Patent b/options/license/BSD-2-Clause-Patent index 1184c0295..31de6e498 100644 --- a/options/license/BSD-2-Clause-Patent +++ b/options/license/BSD-2-Clause-Patent @@ -1,47 +1,19 @@ Copyright (c) -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Subject to the terms and conditions of this license, each copyright holder -and contributor hereby grants to those receiving rights under this license -a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable -(except for failure to satisfy the conditions of this license) patent license -to make, have made, use, offer to sell, sell, import, and otherwise transfer -this software, where such license applies only to those patent claims, already -acquired or hereafter acquired, licensable by such copyright holder or contributor -that are necessarily infringed by: +Subject to the terms and conditions of this license, each copyright holder and contributor hereby grants to those receiving rights under this license a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except for failure to satisfy the conditions of this license) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer this software, where such license applies only to those patent claims, already acquired or hereafter acquired, licensable by such copyright holder or contributor that are necessarily infringed by: -(a) their Contribution(s) (the licensed copyrights of copyright holders and -non-copyrightable additions of contributors, in source or binary form) alone; -or +(a) their Contribution(s) (the licensed copyrights of copyright holders and non-copyrightable additions of contributors, in source or binary form) alone; or -(b) combination of their Contribution(s) with the work of authorship to which -such Contribution(s) was added by such copyright holder or contributor, if, -at the time the Contribution is added, such addition causes such combination -to be necessarily infringed. The patent license shall not apply to any other -combinations which include the Contribution. +(b) combination of their Contribution(s) with the work of authorship to which such Contribution(s) was added by such copyright holder or contributor, if, at the time the Contribution is added, such addition causes such combination to be necessarily infringed. The patent license shall not apply to any other combinations which include the Contribution. -Except as expressly stated above, no rights or licenses from any copyright -holder or contributor is granted under this license, whether expressly, by -implication, estoppel or otherwise. +Except as expressly stated above, no rights or licenses from any copyright holder or contributor is granted under this license, whether expressly, by implication, estoppel or otherwise. DISCLAIMER -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-2-Clause-Views b/options/license/BSD-2-Clause-Views index 2e924ddc7..be605e314 100644 --- a/options/license/BSD-2-Clause-Views +++ b/options/license/BSD-2-Clause-Views @@ -1,26 +1,11 @@ Copyright (c) All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -The views and conclusions contained in the software and documentation are -those of the authors and should not be interpreted as representing official -policies, either expressed or implied, of the copyright holders or contributors. +The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the copyright holders or contributors. diff --git a/options/license/BSD-3-Clause b/options/license/BSD-3-Clause index 0741db789..6c9eef8d8 100644 --- a/options/license/BSD-3-Clause +++ b/options/license/BSD-3-Clause @@ -1,26 +1,11 @@ Copyright (c) . All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. +3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-3-Clause-Attribution b/options/license/BSD-3-Clause-Attribution index dda9ba1a6..6dcab5eff 100644 --- a/options/license/BSD-3-Clause-Attribution +++ b/options/license/BSD-3-Clause-Attribution @@ -1,28 +1,11 @@ -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. Neither the name of the copyright holder nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. + 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -4. Redistributions of any form whatsoever must retain the following acknowledgment: -'This product includes software developed by the "Universidad de Palermo, -Argentina" (http://www.palermo.edu/).' + 4. Redistributions of any form whatsoever must retain the following acknowledgment: 'This product includes software developed by the "Universidad de Palermo, Argentina" (http://www.palermo.edu/).' -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-3-Clause-Clear b/options/license/BSD-3-Clause-Clear index 40066db07..cad8b56c6 100644 --- a/options/license/BSD-3-Clause-Clear +++ b/options/license/BSD-3-Clause-Clear @@ -1,30 +1,14 @@ -The Clear BSD License Copyright (c) [xxxx]-[xxxx] [Owner Organization] +The Clear BSD License +Copyright (c) [xxxx]-[xxxx] [Owner Organization] All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted (subject to the limitations in the disclaimer below) provided -that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of [Owner Organization] nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. + * Neither the name of [Owner Organization] nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY -THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-3-Clause-LBNL b/options/license/BSD-3-Clause-LBNL index 8a8e3e688..ab94601ae 100644 --- a/options/license/BSD-3-Clause-LBNL +++ b/options/license/BSD-3-Clause-LBNL @@ -1,40 +1,12 @@ -Copyright (c) 2003, The Regents of the University of California, through Lawrence -Berkeley National Laboratory (subject to receipt of any required approvals -from the U.S. Dept. of Energy). All rights reserved. +Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from the U.S. Dept. of Energy). All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +(1) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -(1) Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +(2) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -(2) Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +(3) Neither the name of the University of California, Lawrence Berkeley National Laboratory, U.S. Dept. of Energy nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -(3) Neither the name of the University of California, Lawrence Berkeley National -Laboratory, U.S. Dept. of Energy nor the names of its contributors may be -used to endorse or promote products derived from this software without specific -prior written permission. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER , THE UNITED STATES -GOVERNMENT, OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - -You are under no obligation whatsoever to provide any bug fixes, patches, -or upgrades to the features, functionality or performance of the source code -("Enhancements") to anyone; however, if you choose to make your Enhancements -available either publicly, or directly to Lawrence Berkeley National Laboratory -, without imposing a separate written license agreement for such Enhancements, -then you hereby grant the following license: a non-exclusive, royalty-free -perpetual license to install, use, modify, prepare derivative works, incorporate -into other computer software, distribute, and sublicense such Enhancements -or derivative works thereof, in binary and source code form. +You are under no obligation whatsoever to provide any bug fixes, patches, or upgrades to the features, functionality or performance of the source code ("Enhancements") to anyone; however, if you choose to make your Enhancements available either publicly, or directly to Lawrence Berkeley National Laboratory, without imposing a separate written license agreement for such Enhancements, then you hereby grant the following license: a non-exclusive, royalty-free perpetual license to install, use, modify, prepare derivative works, incorporate into other computer software, distribute, and sublicense such Enhancements or derivative works thereof, in binary and source code form. diff --git a/options/license/BSD-3-Clause-Modification b/options/license/BSD-3-Clause-Modification new file mode 100644 index 000000000..4e337d7db --- /dev/null +++ b/options/license/BSD-3-Clause-Modification @@ -0,0 +1,35 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + +1. Redistributions in source code must retain the accompanying + copyright notice, this list of conditions, and the following + disclaimer. + +2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + +3. Names of the copyright holders must not be used to endorse or + promote products derived from this software without prior + written permission from the copyright holders. + +4. If any files are modified, you must cause the modified files to + carry prominent notices stating that you changed the files and + the date of any change. + +Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS" AND + ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. diff --git a/options/license/BSD-3-Clause-No-Military-License b/options/license/BSD-3-Clause-No-Military-License new file mode 100644 index 000000000..e06aa93b5 --- /dev/null +++ b/options/license/BSD-3-Clause-No-Military-License @@ -0,0 +1,16 @@ +Copyright (c) year copyright holder. All Rights Reserved. + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +1. +Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +2. +Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. +Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT DESIGNED, LICENSED OR INTENDED FOR USE IN THE DESIGN, CONSTRUCTION, OPERATION OR MAINTENANCE OF ANY MILITARY FACILITY. diff --git a/options/license/BSD-3-Clause-No-Nuclear-License b/options/license/BSD-3-Clause-No-Nuclear-License index 6a5893889..b37aa3058 100644 --- a/options/license/BSD-3-Clause-No-Nuclear-License +++ b/options/license/BSD-3-Clause-No-Nuclear-License @@ -1,30 +1,14 @@ + Copyright 1994-2009 Sun Microsystems, Inc. All Rights Reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistribution of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistribution in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + * Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of Sun Microsystems, Inc. or the names of contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. + * Neither the name of Sun Microsystems, Inc. or the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. -This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS -OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED -WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, -ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL -NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING -OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR -ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, -INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER -CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF -OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -You acknowledge that this software is not designed, licensed or intended for -use in the design, construction, operation or maintenance of any nuclear facility. +You acknowledge that this software is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility. diff --git a/options/license/BSD-3-Clause-No-Nuclear-License-2014 b/options/license/BSD-3-Clause-No-Nuclear-License-2014 index 6695c579c..315c6d64c 100644 --- a/options/license/BSD-3-Clause-No-Nuclear-License-2014 +++ b/options/license/BSD-3-Clause-No-Nuclear-License-2014 @@ -1,31 +1,16 @@ + Copyright © 2008, 2014 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of Oracle Corporation nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. + * Neither the name of Oracle Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -You acknowledge that this software is not designed, licensed or intended for -use in the design, construction, operation or maintenance of any nuclear facility. +You acknowledge that this software is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility. diff --git a/options/license/BSD-3-Clause-No-Nuclear-Warranty b/options/license/BSD-3-Clause-No-Nuclear-Warranty index 3ffe250f0..17457e676 100644 --- a/options/license/BSD-3-Clause-No-Nuclear-Warranty +++ b/options/license/BSD-3-Clause-No-Nuclear-Warranty @@ -1,30 +1,14 @@ + Copyright (c) 2003-2005 Sun Microsystems, Inc. All Rights Reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Redistribution of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + - Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistribution in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + - Redistribution in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Neither the name of Sun Microsystems, Inc. or the names of contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. + - Neither the name of Sun Microsystems, Inc. or the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. -This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS -OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED -WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, -ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL -NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING -OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR -ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, -INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER -CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF -OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -You acknowledge that this software is not designed or intended for use in -the design, construction, operation or maintenance of any nuclear facility. +You acknowledge that this software is not designed or intended for use in the design, construction, operation or maintenance of any nuclear facility. diff --git a/options/license/BSD-3-Clause-Open-MPI b/options/license/BSD-3-Clause-Open-MPI index cec800d81..166a95b13 100644 --- a/options/license/BSD-3-Clause-Open-MPI +++ b/options/license/BSD-3-Clause-Open-MPI @@ -1,30 +1,34 @@ -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: -- Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +- Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer listed in this license -in the documentation and/or other materials provided with the distribution. +- Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. -- Neither the name of the copyright holders nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. +- Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. -The copyright holders provide no reassurances that the source code provided -does not infringe any patent, copyright, or any other intellectual property -rights of third parties. The copyright holders disclaim any liability to any -recipient for claims brought against recipient by any third party for infringement -of that parties intellectual property rights. +The copyright holders provide no reassurances that the source code +provided does not infringe any patent, copyright, or any other +intellectual property rights of third parties. The copyright holders +disclaim any liability to any recipient for claims brought against +recipient by any third party for infringement of that parties +intellectual property rights. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-4-Clause b/options/license/BSD-4-Clause index 34b749806..1e67e146f 100644 --- a/options/license/BSD-4-Clause +++ b/options/license/BSD-4-Clause @@ -1,31 +1,14 @@ Copyright (c) . All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software must -display the following acknowledgement: +3. All advertising materials mentioning features or use of this software must display the following acknowledgement: +This product includes software developed by the organization. - This product includes software developed by the organization . +4. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -4. Neither the name of the copyright holder nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT -HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. +THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDER "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-4-Clause-Shortened b/options/license/BSD-4-Clause-Shortened new file mode 100644 index 000000000..6812783d5 --- /dev/null +++ b/options/license/BSD-4-Clause-Shortened @@ -0,0 +1,13 @@ +License: BSD-4-Clause-Shortened + +Redistribution and use in source and binary forms, with or without modification, are permitted provided that: + +(1) source code distributions retain the above copyright notice and this paragraph in its entirety, +(2) distributions including binary code include the above copyright notice and this paragraph in its entirety in the documentation or other materials provided with the distribution, and +(3) all advertising materials mentioning features or use of this software display the following acknowledgement: + +"This product includes software developed by the University of California, Lawrence Berkeley Laboratory and its contributors.'' + +Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/options/license/BSD-4-Clause-UC b/options/license/BSD-4-Clause-UC index 77562b7a5..69edbe324 100644 --- a/options/license/BSD-4-Clause-UC +++ b/options/license/BSD-4-Clause-UC @@ -1,33 +1,15 @@ BSD-4-Clause (University of California-Specific) -Copyright [various years] The Regents of the University of California. All -rights reserved. +Copyright [various years] The Regents of the University of California. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. All advertising materials mentioning features or use of this software must -display the following acknowledgement: This product includes software developed -by the University of California, Berkeley and its contributors. +3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. -4. Neither the name of the University nor the names of its contributors may -be used to endorse or promote products derived from this software without -specific prior written permission. +4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ''AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSD-Protection b/options/license/BSD-Protection index 0d59ce600..73820813f 100644 --- a/options/license/BSD-Protection +++ b/options/license/BSD-Protection @@ -1,127 +1,53 @@ BSD Protection License +February 2002 -February 2002 Preamble - +Preamble -------- -The Berkeley Software Distribution ("BSD") license has proven very effective -over the years at allowing for a wide spread of work throughout both commercial -and non-commercial products. For programmers whose primary intention is to -improve the general quality of available software, it is arguable that there -is no better license than the BSD license, as it permits improvements to be -used wherever they will help, without idealogical or metallic constraint. +The Berkeley Software Distribution ("BSD") license has proven very effective over the years at allowing for a wide spread of work throughout both commercial and non-commercial products. For programmers whose primary intention is to improve the general quality of available software, it is arguable that there is no better license than the BSD license, as it permits improvements to be used wherever they will help, without idealogical or metallic constraint. -This is of particular value to those who produce reference implementations -of proposed standards: The case of TCP/IP clearly illustrates that freely -and universally available implementations leads the rapid acceptance of standards --- often even being used instead of a de jure standard (eg, OSI network models). +This is of particular value to those who produce reference implementations of proposed standards: The case of TCP/IP clearly illustrates that freely and universally available implementations leads the rapid acceptance of standards -- often even being used instead of a de jure standard (eg, OSI network models). -With the rapid proliferation of software licensed under the GNU General Public -License, however, the continued success of this role is called into question. -Given that the inclusion of a few lines of "GPL-tainted" work into a larger -body of work will result in restricted distribution -- and given that further -work will likely build upon the "tainted" portions, making them difficult -to remove at a future date -- there are inevitable circumstances where authors -would, in order to protect their goal of providing for the widespread usage -of their work, wish to guard against such "GPL-taint". +With the rapid proliferation of software licensed under the GNU General Public License, however, the continued success of this role is called into question. Given that the inclusion of a few lines of "GPL-tainted" work into a larger body of work will result in restricted distribution -- and given that further work will likely build upon the "tainted" portions, making them difficult to remove at a future date -- there are inevitable circumstances where authors would, in order to protect their goal of providing for the widespread usage of their work, wish to guard against such "GPL-taint". -In addition, one can imagine that companies which operate by producing and -selling (possibly closed-source) code would wish to protect themselves against -the rise of a GPL-licensed competitor. While under existing licenses this -would mean not releasing their code under any form of open license, if a license -existed under which they could incorporate any improvements back into their -own (commercial) products then they might be far more willing to provide for -non-closed distribution. +In addition, one can imagine that companies which operate by producing and selling (possibly closed-source) code would wish to protect themselves against the rise of a GPL-licensed competitor. While under existing licenses this would mean not releasing their code under any form of open license, if a license existed under which they could incorporate any improvements back into their own (commercial) products then they might be far more willing to provide for non-closed distribution. -For the above reasons, we put forth this "BSD Protection License": A license -designed to retain the freedom granted by the BSD license to use licensed -works in a wide variety of settings, both non-commercial and commercial, while -protecting the work from having future contributors restrict that freedom. +For the above reasons, we put forth this "BSD Protection License": A license designed to retain the freedom granted by the BSD license to use licensed works in a wide variety of settings, both non-commercial and commercial, while protecting the work from having future contributors restrict that freedom. -The precise terms and conditions for copying, distribution, and modification -follow. +The precise terms and conditions for copying, distribution, and modification follow. -BSD PROTECTION LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND -MODIFICATION ---------------------------------------------------------------- +BSD PROTECTION LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION +---------------------------------------------------------------- - 0. Definitions. +0. Definitions. -a) "Program", below, refers to any program or work distributed under the terms -of this license. + a) "Program", below, refers to any program or work distributed under the terms of this license. + b) A "work based on the Program", below, refers to either the Program or any derivative work under copyright law. + c) "Modification", below, refers to the act of creating derivative works. + d) "You", below, refers to each licensee. -b) A "work based on the Program", below, refers to either the Program or any -derivative work under copyright law. +1. Scope. +This license governs the copying, distribution, and modification of the Program. Other activities are outside the scope of this license; The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program. - c) "Modification", below, refers to the act of creating derivative works. +2. Verbatim copies. +You may copy and distribute verbatim copies of the Program as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. - d) "You", below, refers to each licensee. +3. Modification and redistribution under closed license. +You may modify your copy or copies of the Program, and distribute the resulting derivative works, provided that you meet the following conditions: - 1. Scope. + a) The copyright notice and disclaimer on the Program must be reproduced and included in the source code, documentation, and/or other materials provided in a manner in which such notices are normally distributed. + b) The derivative work must be clearly identified as such, in order that it may not be confused with the original work. + c) The license under which the derivative work is distributed must expressly prohibit the distribution of further derivative works. -This license governs the copying, distribution, and modification of the Program. -Other activities are outside the scope of this license; The act of running -the Program is not restricted, and the output from the Program is covered -only if its contents constitute a work based on the Program. +4. Modification and redistribution under open license. +You may modify your copy or copies of the Program, and distribute the resulting derivative works, provided that you meet the following conditions: - 2. Verbatim copies. + a) The copyright notice and disclaimer on the Program must be reproduced and included in the source code, documentation, and/or other materials provided in a manner in which such notices are normally distributed. + b) You must clearly indicate the nature and date of any changes made to the Program. The full details need not necessarily be included in the individual modified files, provided that each modified file is clearly marked as such and instructions are included on where the full details of the modifications may be found. + c) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. -You may copy and distribute verbatim copies of the Program as you receive -it, in any medium, provided that you conspicuously and appropriately publish -on each copy an appropriate copyright notice; keep intact all the notices -that refer to this License and to the absence of any warranty; and give any -other recipients of the Program a copy of this License along with the Program. +5. Implied acceptance. +You may not copy or distribute the Program or any derivative works except as expressly provided under this license. Consequently, any such action will be taken as implied acceptance of the terms of this license. - 3. Modification and redistribution under closed license. - -You may modify your copy or copies of the Program, and distribute the resulting -derivative works, provided that you meet the following conditions: - -a) The copyright notice and disclaimer on the Program must be reproduced and -included in the source code, documentation, and/or other materials provided -in a manner in which such notices are normally distributed. - -b) The derivative work must be clearly identified as such, in order that it -may not be confused with the original work. - -c) The license under which the derivative work is distributed must expressly -prohibit the distribution of further derivative works. - - 4. Modification and redistribution under open license. - -You may modify your copy or copies of the Program, and distribute the resulting -derivative works, provided that you meet the following conditions: - -a) The copyright notice and disclaimer on the Program must be reproduced and -included in the source code, documentation, and/or other materials provided -in a manner in which such notices are normally distributed. - -b) You must clearly indicate the nature and date of any changes made to the -Program. The full details need not necessarily be included in the individual -modified files, provided that each modified file is clearly marked as such -and instructions are included on where the full details of the modifications -may be found. - -c) You must cause any work that you distribute or publish, that in whole or -in part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. - - 5. Implied acceptance. - -You may not copy or distribute the Program or any derivative works except -as expressly provided under this license. Consequently, any such action will -be taken as implied acceptance of the terms of this license. - - 6. NO WARRANTY. - -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, -OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED -ABOVE, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, -OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT, -EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGES. +6. NO WARRANTY. +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT, EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/BSD-Source-Code b/options/license/BSD-Source-Code index 616f937f3..c41fc4273 100644 --- a/options/license/BSD-Source-Code +++ b/options/license/BSD-Source-Code @@ -1,25 +1,10 @@ Copyright (c) 2011, Deusty, LLC - All rights reserved. -Redistribution and use of this software in source and binary forms, with or -without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Neither the name of Deusty nor the names of its contributors may be used -to endorse or promote products derived from this software without specific -prior written permission of Deusty, LLC. + * Neither the name of Deusty nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission of Deusty, LLC. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/BSL-1.0 b/options/license/BSL-1.0 index cff35365a..2d87ab1a9 100644 --- a/options/license/BSL-1.0 +++ b/options/license/BSL-1.0 @@ -1,23 +1,7 @@ Boost Software License - Version 1.0 - August 17th, 2003 -Permission is hereby granted, free of charge, to any person or organization -obtaining a copy of the software and accompanying documentation covered by -this license (the "Software") to use, reproduce, display, distribute, execute, -and transmit the Software, and to prepare derivative works of the Software, -and to permit third-parties to whom the Software is furnished to do so, all -subject to the following: +Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: -The copyright notices in the Software and this entire statement, including -the above license grant, this restriction and the following disclaimer, must -be included in all copies of the Software, in whole or in part, and all derivative -works of the Software, unless such copies or derivative works are solely in -the form of machine-executable object code generated by a source language -processor. +The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES -OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/BUSL-1.1 b/options/license/BUSL-1.1 new file mode 100644 index 000000000..2ef98f1be --- /dev/null +++ b/options/license/BUSL-1.1 @@ -0,0 +1,71 @@ +Business Source License 1.1 + +License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved. +"Business Source License" is a trademark of MariaDB Corporation Ab. + +Terms + +The Licensor hereby grants you the right to copy, modify, create derivative +works, redistribute, and make non-production use of the Licensed Work. The +Licensor may make an Additional Use Grant, above, permitting limited +production use. + +Effective on the Change Date, or the fourth anniversary of the first publicly +available distribution of a specific version of the Licensed Work under this +License, whichever comes first, the Licensor hereby grants you rights under +the terms of the Change License, and the rights granted in the paragraph +above terminate. + +If your use of the Licensed Work does not comply with the requirements +currently in effect as described in this License, you must purchase a +commercial license from the Licensor, its affiliated entities, or authorized +resellers, or you must refrain from using the Licensed Work. + +All copies of the original and modified Licensed Work, and derivative works +of the Licensed Work, are subject to this License. This License applies +separately for each version of the Licensed Work and the Change Date may vary +for each version of the Licensed Work released by Licensor. + +You must conspicuously display this License on each original or modified copy +of the Licensed Work. If you receive the Licensed Work in original or +modified form from a third party, the terms and conditions set forth in this +License apply to your use of that work. + +Any use of the Licensed Work in violation of this License will automatically +terminate your rights under this License for the current and all other +versions of the Licensed Work. + +This License does not grant you any right in any trademark or logo of +Licensor or its affiliates (provided that you may use a trademark or logo of +Licensor as expressly required by this License). + +TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON +AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, +EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND +TITLE. + +MariaDB hereby grants you permission to use this License’s text to license +your works, and to refer to it using the trademark “Business Source License”, +as long as you comply with the Covenants of Licensor below. + +Covenants of Licensor + +In consideration of the right to use this License’s text and the “Business +Source License” name and trademark, Licensor covenants to MariaDB, and to all +other recipients of the licensed work to be provided by Licensor: + +1. To specify as the Change License the GPL Version 2.0 or any later version, + or a license that is compatible with GPL Version 2.0 or a later version, + where “compatible” means that software provided under the Change License can + be included in a program with software provided under GPL Version 2.0 or a + later version. Licensor may specify additional Change Licenses without + limitation. + +2. To either: (a) specify an additional grant of rights to use that does not + impose any additional restriction on the right granted in this License, as + the Additional Use Grant; or (b) insert the text “None”. + +3. To specify a Change Date. + +4. Not to modify this License in any other way. diff --git a/options/license/Bahyph b/options/license/Bahyph index 1c2d294f5..a42e875ac 100644 --- a/options/license/Bahyph +++ b/options/license/Bahyph @@ -2,22 +2,10 @@ COPYRIGHT NOTICE These patterns and the generating sh script are Copyright (c) GMV 1991 -These patterns were developed for internal GMV use and are made public in -the hope that they will benefit others. Also, spreading these patterns throughout -the Spanish-language TeX community is expected to provide back-benefits to -GMV in that it can help keeping GMV in the mainstream of spanish users. +These patterns were developed for internal GMV use and are made public in the hope that they will benefit others. Also, spreading these patterns throughout the Spanish-language TeX community is expected to provide back-benefits to GMV in that it can help keeping GMV in the mainstream of spanish users. -However, this is given for free and WITHOUT ANY WARRANTY. Under no circumstances -can Julio Sanchez, GMV, Jos'e A. Ma~nas or any agents or representatives thereof -be held responsible for any errors in this software nor for any damages derived -from its use, even in case any of the above has been notified of the possibility -of such damages. If any such situation arises, you responsible for repair. -Use of this software is an explicit acceptance of these conditions. +However, this is given for free and WITHOUT ANY WARRANTY. Under no circumstances can Julio Sanchez, GMV, Jos'e A. Ma~nas or any agents or representatives thereof be held responsible for any errors in this software nor for any damages derived from its use, even in case any of the above has been notified of the possibility of such damages. If any such situation arises, you responsible for repair. Use of this software is an explicit acceptance of these conditions. -You can use this software for any purpose. You cannot delete this copyright -notice. If you change this software, you must include comments explaining -who, when and why. You are kindly requested to send any changes to tex@gmv.es. -If you change the generating script, you must include code in it such that -any output is clearly labeled as generated by a modified script. Despite the -lack of warranty, we would like to hear about any problem you find. Please -report problems to tex@gmv.es. END OF COPYRIGHT NOTICE +You can use this software for any purpose. You cannot delete this copyright notice. If you change this software, you must include comments explaining who, when and why. You are kindly requested to send any changes to tex@gmv.es. If you change the generating script, you must include code in it such that any output is clearly labeled as generated by a modified script. Despite the lack of warranty, we would like to hear about any problem you find. Please report problems to tex@gmv.es. + +END OF COPYRIGHT NOTICE diff --git a/options/license/Barr b/options/license/Barr index 46f633b8d..07f32df0e 100644 --- a/options/license/Barr +++ b/options/license/Barr @@ -1,8 +1 @@ -This is a package of commutative diagram macros built on top of Xy-pic by -Michael Barr (email: barr@barrs.org). Its use is unrestricted. It may be freely -distributed, unchanged, for non-commercial or commercial use. If changed, -it must be renamed. Inclusion in a commercial software package is also permitted, -but I would appreciate receiving a free copy for my personal examination and -use. There are no guarantees that this package is good for anything. I have -tested it with LaTeX 2e, LaTeX 2.09 and Plain TeX. Although I know of no reason -it will not work with AMSTeX, I have not tested it. +This is a package of commutative diagram macros built on top of Xy-pic by Michael Barr (email: barr@barrs.org). Its use is unrestricted. It may be freely distributed, unchanged, for non-commercial or commercial use. If changed, it must be renamed. Inclusion in a commercial software package is also permitted, but I would appreciate receiving a free copy for my personal examination and use. There are no guarantees that this package is good for anything. I have tested it with LaTeX 2e, LaTeX 2.09 and Plain TeX. Although I know of no reason it will not work with AMSTeX, I have not tested it. diff --git a/options/license/Beerware b/options/license/Beerware index 6df3cc616..c7ffc1a04 100644 --- a/options/license/Beerware +++ b/options/license/Beerware @@ -1,5 +1 @@ -"THE BEER-WARE LICENSE" (Revision 42): - - wrote this file. As long as you retain this notice you can -do whatever you want with this stuff. If we meet some day, and you think this -stuff is worth it, you can buy me a beer in return Poul-Henning Kamp +"THE BEER-WARE LICENSE" (Revision 42): wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return Poul-Henning Kamp diff --git a/options/license/BitTorrent-1.0 b/options/license/BitTorrent-1.0 index ced0c4687..16e3b9a64 100644 --- a/options/license/BitTorrent-1.0 +++ b/options/license/BitTorrent-1.0 @@ -2,407 +2,329 @@ BitTorrent Open Source License Version 1.0 -This BitTorrent Open Source License (the "License") applies to the BitTorrent -client and related software products as well as any updates or maintenance -releases of that software ("BitTorrent Products") that are distributed by -BitTorrent, Inc. ("Licensor"). Any BitTorrent Product licensed pursuant to -this License is a Licensed Product. Licensed Product, in its entirety, is -protected by U.S. copyright law. This License identifies the terms under which +This BitTorrent Open Source License (the "License") applies to the BitTorrent client and related software products as +well as any updates or maintenance releases of that software ("BitTorrent Products") that are distributed by +BitTorrent, Inc. ("Licensor"). Any BitTorrent Product licensed pursuant to this License is a Licensed Product. +Licensed Product, in its entirety, is protected by U.S. copyright law. This License identifies the terms under which you may use, copy, distribute or modify Licensed Product. Preamble -This Preamble is intended to describe, in plain English, the nature and scope -of this License. However, this Preamble is not a part of this license. The -legal effect of this License is dependent only upon the terms of the License -and not this Preamble. +This Preamble is intended to describe, in plain English, the nature and scope of this License. However, this +Preamble is not a part of this license. The legal effect of this License is dependent only upon the terms of the +License and not this Preamble. -This License complies with the Open Source Definition and is derived from -the Jabber Open Source License 1.0 (the "JOSL"), which has been approved by -Open Source Initiative. Sections 4(c) and 4(f)(iii) from the JOSL have been +This License complies with the Open Source Definition and is derived from the Jabber Open Source License 1.0 (the +"JOSL"), which has been approved by Open Source Initiative. Sections 4(c) and 4(f)(iii) from the JOSL have been dropped. This License provides that: -1. You may use, sell or give away the Licensed Product, alone or as a component -of an aggregate software distribution containing programs from several different -sources. No royalty or other fee is required. +1. You may use, sell or give away the Licensed Product, alone or as a component of an aggregate software +distribution containing programs from several different sources. No royalty or other fee is required. -2. Both Source Code and executable versions of the Licensed Product, including -Modifications made by previous Contributors, are available for your use. (The -terms "Licensed Product," "Modifications," "Contributors" and "Source Code" -are defined in the License.) +2. Both Source Code and executable versions of the Licensed Product, including Modifications made by previous +Contributors, are available for your use. (The terms "Licensed Product," "Modifications," "Contributors" and "Source +Code" are defined in the License.) -3. You are allowed to make Modifications to the Licensed Product, and you -can create Derivative Works from it. (The term "Derivative Works" is defined -in the License.) +3. You are allowed to make Modifications to the Licensed Product, and you can create Derivative Works from it. +(The term "Derivative Works" is defined in the License.) -4. By accepting the Licensed Product under the provisions of this License, -you agree that any Modifications you make to the Licensed Product and then -distribute are governed by the provisions of this License. In particular, -you must make the Source Code of your Modifications available to others. +4. By accepting the Licensed Product under the provisions of this License, you agree that any Modifications you +make to the Licensed Product and then distribute are governed by the provisions of this License. In particular, you +must make the Source Code of your Modifications available to others. -5. You may use the Licensed Product for any purpose, but the Licensor is not -providing you any warranty whatsoever, nor is the Licensor accepting any liability -in the event that the Licensed Product doesn't work properly or causes you -any injury or damages. +5. You may use the Licensed Product for any purpose, but the Licensor is not providing you any warranty +whatsoever, nor is the Licensor accepting any liability in the event that the Licensed Product doesn't work properly +or causes you any injury or damages. -6. If you sublicense the Licensed Product or Derivative Works, you may charge -fees for warranty or support, or for accepting indemnity or liability obligations -to your customers. You cannot charge for the Source Code. +6. If you sublicense the Licensed Product or Derivative Works, you may charge fees for warranty or support, or +for accepting indemnity or liability obligations to your customers. You cannot charge for the Source Code. -7. If you assert any patent claims against the Licensor relating to the Licensed -Product, or if you breach any terms of the License, your rights to the Licensed -Product under this License automatically terminate. +7. If you assert any patent claims against the Licensor relating to the Licensed Product, or if you breach any +terms of the License, your rights to the Licensed Product under this License automatically terminate. -You may use this License to distribute your own Derivative Works, in which -case the provisions of this License will apply to your Derivative Works just -as they do to the original Licensed Product. +You may use this License to distribute your own Derivative Works, in which case the provisions of this License will +apply to your Derivative Works just as they do to the original Licensed Product. -Alternatively, you may distribute your Derivative Works under any other OSI-approved -Open Source license, or under a proprietary license of your choice. If you -use any license other than this License, however, you must continue to fulfill -the requirements of this License (including the provisions relating to publishing -the Source Code) for those portions of your Derivative Works that consist -of the Licensed Product, including the files containing Modifications. +Alternatively, you may distribute your Derivative Works under any other OSI-approved Open Source license, or under a +proprietary license of your choice. If you use any license other than this License, however, you must continue to +fulfill the requirements of this License (including the provisions relating to publishing the Source Code) for those +portions of your Derivative Works that consist of the Licensed Product, including the files containing Modifications. -New versions of this License may be published from time to time. You may choose -to continue to use the license terms in this version of the License or those -from the new version. However, only the Licensor has the right to change the -License terms as they apply to the Licensed Product. +New versions of this License may be published from time to time. You may choose to continue to use the license +terms in this version of the License or those from the new version. However, only the Licensor has the right to +change the License terms as they apply to the Licensed Product. + +This License relies on precise definitions for certain terms. Those terms are defined when they are first used, and +the definitions are repeated for your convenience in a Glossary at the end of the License. -This License relies on precise definitions for certain terms. Those terms -are defined when they are first used, and the definitions are repeated for -your convenience in a Glossary at the end of the License. License Terms -1. Grant of License From Licensor. Licensor hereby grants you a world-wide, -royalty-free, non-exclusive license, subject to third party intellectual property -claims, to do the following: - -a. Use, reproduce, modify, display, perform, sublicense and distribute any -Modifications created by such Contributor or portions thereof, in both Source -Code or as an executable program, either on an unmodified basis or as part -of Derivative Works. - -b. Under claims of patents now or hereafter owned or controlled by Contributor, -to make, use, sell, offer for sale, have made, and/or otherwise dispose of -Modifications or portions thereof, but solely to the extent that any such -claim is necessary to enable you to make, use, sell, offer for sale, have -made, and/or otherwise dispose of Modifications or portions thereof or Derivative -Works thereof. - -2. Grant of License to Modifications From Contributor. "Modifications" means -any additions to or deletions from the substance or structure of (i) a file -containing Licensed Product, or (ii) any new file that contains any part of -Licensed Product. Hereinafter in this License, the term "Licensed Product" -shall include all previous Modifications that you receive from any Contributor. -By application of the provisions in Section 4(a) below, each person or entity -who created or contributed to the creation of, and distributed, a Modification -(a "Contributor") hereby grants you a world-wide, royalty-free, non-exclusive +1. Grant of License From Licensor. Licensor hereby grants you a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, to do the following: -a. Use, reproduce, modify, display, perform, sublicense and distribute any -Modifications created by such Contributor or portions thereof, in both Source -Code or as an executable program, either on an unmodified basis or as part -of Derivative Works. +a. Use, reproduce, modify, display, perform, sublicense and distribute any Modifications created by such +Contributor or portions thereof, in both Source Code or as an executable program, either on an unmodified basis or as +part of Derivative Works. -b. Under claims of patents now or hereafter owned or controlled by Contributor, -to make, use, sell, offer for sale, have made, and/or otherwise dispose of -Modifications or portions thereof, but solely to the extent that any such -claim is necessary to enable you to make, use, sell, offer for sale, have -made, and/or otherwise dispose of Modifications or portions thereof or Derivative -Works thereof. +b. Under claims of patents now or hereafter owned or controlled by Contributor, to make, use, sell, offer for +sale, have made, and/or otherwise dispose of Modifications or portions thereof, but solely to the extent that any +such claim is necessary to enable you to make, use, sell, offer for sale, have made, and/or otherwise dispose of +Modifications or portions thereof or Derivative Works thereof. -3. Exclusions From License Grant. Nothing in this License shall be deemed -to grant any rights to trademarks, copyrights, patents, trade secrets or any -other intellectual property of Licensor or any Contributor except as expressly -stated herein. No patent license is granted separate from the Licensed Product, -for code that you delete from the Licensed Product, or for combinations of -the Licensed Product with other software or hardware. No right is granted -to the trademarks of Licensor or any Contributor even if such marks are included -in the Licensed Product. Nothing in this License shall be interpreted to prohibit -Licensor from licensing under different terms from this License any code that -Licensor otherwise would have a right to license. - 4. Your Obligations Regarding Distribution. +2. Grant of License to Modifications From Contributor. "Modifications" means any additions to or deletions from the +substance or structure of (i) a file containing Licensed Product, or (ii) any new file that contains any part of +Licensed Product. Hereinafter in this License, the term "Licensed Product" shall include all previous Modifications +that you receive from any Contributor. By application of the provisions in Section 4(a) below, each person or entity +who created or contributed to the creation of, and distributed, a Modification (a "Contributor") hereby grants you a +world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, to do the +following: -a. Application of This License to Your Modifications. As an express condition -for your use of the Licensed Product, you hereby agree that any Modifications -that you create or to which you contribute, and which you distribute, are -governed by the terms of this License including, without limitation, Section -2. Any Modifications that you create or to which you contribute may be distributed -only under the terms of this License or a future version of this License released -under Section 7. You must include a copy of this License with every copy of -the Modifications you distribute. You agree not to offer or impose any terms -on any Source Code or executable version of the Licensed Product or Modifications -that alter or restrict the applicable version of this License or the recipients' -rights hereunder. However, you may include an additional document offering -the additional rights described in Section 4(d). + 1. Use, reproduce, modify, display, perform, sublicense and distribute any Modifications created by such +Contributor or portions thereof, in both Source Code or as an executable program, either on an unmodified basis or as +part of Derivative Works. -b. Availability of Source Code. You must make available, under the terms of -this License, the Source Code of the Licensed Product and any Modifications -that you distribute, either on the same media as you distribute any executable -or other form of the Licensed Product, or via a mechanism generally accepted -in the software development community for the electronic transfer of data -(an "Electronic Distribution Mechanism"). The Source Code for any version -of Licensed Product or Modifications that you distribute must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of said Licensed Product -or Modifications has been made available. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. + 2. Under claims of patents now or hereafter owned or controlled by Contributor, to make, use, sell, offer for +sale, have made, and/or otherwise dispose of Modifications or portions thereof, but solely to the extent that any +such claim is necessary to enable you to make, use, sell, offer for sale, have made, and/or otherwise dispose of +Modifications or portions thereof or Derivative Works thereof. - c. Intellectual Property Matters. -i. Third Party Claims. If you have knowledge that a license to a third party's -intellectual property right is required to exercise the rights granted by -this License, you must include a text file with the Source Code distribution -titled "LEGAL" that describes the claim and the party making the claim in -sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after you make any Modifications available as described in -Section 4(b), you shall promptly modify the LEGAL file in all copies you make -available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Licensed Product from you that new knowledge has been obtained. +3. Exclusions From License Grant. Nothing in this License shall be deemed to grant any rights to trademarks, +copyrights, patents, trade secrets or any other intellectual property of Licensor or any Contributor except as +expressly stated herein. No patent license is granted separate from the Licensed Product, for code that you delete +from the Licensed Product, or for combinations of the Licensed Product with other software or hardware. No right is +granted to the trademarks of Licensor or any Contributor even if such marks are included in the Licensed Product. +Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this +License any code that Licensor otherwise would have a right to license. -ii. Contributor APIs. If your Modifications include an application programming -interface ("API") and you have knowledge of patent licenses that are reasonably -necessary to implement that API, you must also include this information in -the LEGAL file. -iii. Representations. You represent that, except as disclosed pursuant to -4(c)(i) above, you believe that any Modifications you distribute are your -original creations and that you have sufficient rights to grant the rights -conveyed by this License. +4. Your Obligations Regarding Distribution. -d. Required Notices. You must duplicate this License in any documentation -you provide along with the Source Code of any Modifications you create or -to which you contribute, and which you distribute, wherever you describe recipients' -rights relating to Licensed Product. You must duplicate the notice contained -in Exhibit A (the "Notice") in each file of the Source Code of any copy you -distribute of the Licensed Product. If you created a Modification, you may -add your name as a Contributor to the Notice. If it is not possible to put -the Notice in a particular Source Code file due to its structure, then you -must include such Notice in a location (such as a relevant directory file) -where a user would be likely to look for such a notice. You may choose to -offer, and charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Licensed Product. However, you may do so only -on your own behalf, and not on behalf of the Licensor or any Contributor. -You must make it clear that any such warranty, support, indemnity or liability -obligation is offered by you alone, and you hereby agree to indemnify the -Licensor and every Contributor for any liability incurred by the Licensor -or such Contributor as a result of warranty, support, indemnity or liability -terms you offer. +a. Application of This License to Your Modifications. As an express condition for your use of the Licensed +Product, you hereby agree that any Modifications that you create or to which you contribute, and which you +distribute, are governed by the terms of this License including, without limitation, Section 2. Any Modifications +that you create or to which you contribute may be distributed only under the terms of this License or a future +version of this License released under Section 7. You must include a copy of this License with every copy of the +Modifications you distribute. You agree not to offer or impose any terms on any Source Code or executable version of +the Licensed Product or Modifications that alter or restrict the applicable version of this License or the +recipients' rights hereunder. However, you may include an additional document offering the additional rights +described in Section 4(d). -e. Distribution of Executable Versions. You may distribute Licensed Product -as an executable program under a license of your choice that may contain terms -different from this License provided (i) you have satisfied the requirements -of Sections 4(a) through 4(d) for that distribution, (ii) you include a conspicuous -notice in the executable version, related documentation and collateral materials -stating that the Source Code version of the Licensed Product is available -under the terms of this License, including a description of how and where -you have fulfilled the obligations of Section 4(b), and (iii) you make it -clear that any terms that differ from this License are offered by you alone, -not by Licensor or any Contributor. You hereby agree to indemnify the Licensor -and every Contributor for any liability incurred by Licensor or such Contributor -as a result of any terms you offer. +b. Availability of Source Code. You must make available, under the terms of this License, the Source Code of +the Licensed Product and any Modifications that you distribute, either on the same media as you distribute any +executable or other form of the Licensed Product, or via a mechanism generally accepted in the software development +community for the electronic transfer of data (an "Electronic Distribution Mechanism"). The Source Code for any +version of Licensed Product or Modifications that you distribute must remain available for at least twelve (12) +months after the date it initially became available, or at least six (6) months after a subsequent version of said +Licensed Product or Modifications has been made available. You are responsible for ensuring that the Source Code +version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -f. Distribution of Derivative Works. You may create Derivative Works (e.g., -combinations of some or all of the Licensed Product with other code) and distribute -the Derivative Works as products under any other license you select, with -the proviso that the requirements of this License are fulfilled for those -portions of the Derivative Works that consist of the Licensed Product or any -Modifications thereto. +c. Intellectual Property Matters. -5. Inability to Comply Due to Statute or Regulation. If it is impossible for -you to comply with any of the terms of this License with respect to some or -all of the Licensed Product due to statute, judicial order, or regulation, -then you must (i) comply with the terms of this License to the maximum extent -possible, (ii) cite the statute or regulation that prohibits you from adhering -to the License, and (iii) describe the limitations and the code they affect. -Such description must be included in the LEGAL file described in Section 4(d), -and must be included with all distributions of the Source Code. Except to -the extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill at computer programming to be able -to understand it. + i. Third Party Claims. If you have knowledge that a license to a third +party's intellectual property right is required to exercise the rights granted by this License, you must include a +text file with the Source Code distribution titled "LEGAL" that describes the claim and the party making the claim in +sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after you make any +Modifications available as described in Section 4(b), you shall promptly modify the LEGAL file in all copies you make +available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) +reasonably calculated to inform those who received the Licensed Product from you that new knowledge has been +obtained. -6. Application of This License. This License applies to code to which Licensor -or Contributor has attached the Notice in Exhibit A, which is incorporated -herein by this reference. + ii. Contributor APIs. If your Modifications include an application +programming interface ("API") and you have knowledge of patent licenses that are reasonably necessary to implement +that API, you must also include this information in the LEGAL file. - 7. Versions of This License. + iii. Representations. You represent that, except as disclosed pursuant to +4(c)(i) above, you believe that any Modifications you distribute are your original creations and that you have +sufficient rights to grant the rights conveyed by this License. -a. New Versions. Licensor may publish from time to time revised and/or new -versions of the License. +d. Required Notices. You must duplicate this License in any documentation you provide along with the Source +Code of any Modifications you create or to which you contribute, and which you distribute, wherever you describe +recipients' rights relating to Licensed Product. You must duplicate the notice contained in Exhibit A (the "Notice") +in each file of the Source Code of any copy you distribute of the Licensed Product. If you created a Modification, +you may add your name as a Contributor to the Notice. If it is not possible to put the Notice in a particular Source +Code file due to its structure, then you must include such Notice in a location (such as a relevant directory file) +where a user would be likely to look for such a notice. You may choose to offer, and charge a fee for, warranty, +support, indemnity or liability obligations to one or more recipients of Licensed Product. However, you may do so +only on your own behalf, and not on behalf of the Licensor or any Contributor. You must make it clear that any such +warranty, support, indemnity or liability obligation is offered by you alone, and you hereby agree to indemnify the +Licensor and every Contributor for any liability incurred by the Licensor or such Contributor as a result of +warranty, support, indemnity or liability terms you offer. -b. Effect of New Versions. Once Licensed Product has been published under -a particular version of the License, you may always continue to use it under -the terms of that version. You may also choose to use such Licensed Product -under the terms of any subsequent version of the License published by Licensor. -No one other than Licensor has the right to modify the terms applicable to -Licensed Product created under this License. +e. Distribution of Executable Versions. You may distribute Licensed Product as an executable program under a +license of your choice that may contain terms different from this License provided (i) you have satisfied the +requirements of Sections 4(a) through 4(d) for that distribution, (ii) you include a conspicuous notice in the +executable version, related documentation and collateral materials stating that the Source Code version of the +Licensed Product is available under the terms of this License, including a description of how and where you have +fulfilled the obligations of Section 4(b), and (iii) you make it clear that any terms that differ from this License +are offered by you alone, not by Licensor or any Contributor. You hereby agree to indemnify the Licensor and every +Contributor for any liability incurred by Licensor or such Contributor as a result of any terms you offer. -c. Derivative Works of this License. If you create or use a modified version -of this License, which you may do only in order to apply it to software that -is not already a Licensed Product under this License, you must rename your -license so that it is not confusingly similar to this License, and must make -it clear that your license contains terms that differ from this License. In -so naming your license, you may not use any trademark of Licensor or any Contributor. +f. Distribution of Derivative Works. You may create Derivative Works (e.g., combinations of some or all of the +Licensed Product with other code) and distribute the Derivative Works as products under any other license you select, +with the proviso that the requirements of this License are fulfilled for those portions of the Derivative Works that +consist of the Licensed Product or any Modifications thereto. -8. Disclaimer of Warranty. LICENSED PRODUCT IS PROVIDED UNDER THIS LICENSE -ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE LICENSED PRODUCT IS FREE -OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. -THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LICENSED PRODUCT -IS WITH YOU. SHOULD LICENSED PRODUCT PROVE DEFECTIVE IN ANY RESPECT, YOU (AND -NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN -ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED PRODUCT IS AUTHORIZED HEREUNDER -EXCEPT UNDER THIS DISCLAIMER. - 9. Termination. +5. Inability to Comply Due to Statute or Regulation. If it is impossible for you to comply with any of the +terms of this License with respect to some or all of the Licensed Product due to statute, judicial order, or +regulation, then you must (i) comply with the terms of this License to the maximum extent possible, (ii) cite the +statute or regulation that prohibits you from adhering to the License, and (iii) describe the limitations and the +code they affect. Such description must be included in the LEGAL file described in Section 4(d), and must be included +with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such +description must be sufficiently detailed for a recipient of ordinary skill at computer programming to be able to +understand it. -a. Automatic Termination Upon Breach. This license and the rights granted -hereunder will terminate automatically if you fail to comply with the terms -herein and fail to cure such breach within thirty (30) days of becoming aware -of the breach. All sublicenses to the Licensed Product that are properly granted -shall survive any termination of this license. Provisions that, by their nature, -must remain in effect beyond the termination of this License, shall survive. -b. Termination Upon Assertion of Patent Infringement. If you initiate litigation -by asserting a patent infringement claim (excluding declaratory judgment actions) -against Licensor or a Contributor (Licensor or Contributor against whom you -file such an action is referred to herein as Respondent) alleging that Licensed -Product directly or indirectly infringes any patent, then any and all rights -granted by such Respondent to you under Sections 1 or 2 of this License shall -terminate prospectively upon sixty (60) days notice from Respondent (the "Notice -Period") unless within that Notice Period you either agree in writing (i) -to pay Respondent a mutually agreeable reasonably royalty for your past or -future use of Licensed Product made by such Respondent, or (ii) withdraw your -litigation claim with respect to Licensed Product against such Respondent. -If within said Notice Period a reasonable royalty and payment arrangement -are not mutually agreed upon in writing by the parties or the litigation claim -is not withdrawn, the rights granted by Licensor to you under Sections 1 and -2 automatically terminate at the expiration of said Notice Period. +6. Application of This License. This License applies to code to which Licensor or Contributor has attached the +Notice in Exhibit A, which is incorporated herein by this reference. -c. Reasonable Value of This License. If you assert a patent infringement claim -against Respondent alleging that Licensed Product directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by said Respondent under Sections 1 and 2 shall -be taken into account in determining the amount or value of any payment or -license. -d. No Retroactive Effect of Termination. In the event of termination under -Sections 9(a) or 9(b) above, all end user license agreements (excluding licenses -to distributors and resellers) that have been validly granted by you or any -distributor hereunder prior to termination shall survive termination. +7. Versions of This License. -10. Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, -WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, -ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED PRODUCT, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY +a. New Versions. Licensor may publish from time to time revised and/or new versions of the License. -RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS -SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION -OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY +b. Effect of New Versions. Once Licensed Product has been published under a particular version of the License, +you may always continue to use it under the terms of that version. You may also choose to use such Licensed Product +under the terms of any subsequent version of the License published by Licensor. No one other than Licensor has the +right to modify the terms applicable to Licensed Product created under this License. + +c. Derivative Works of this License. If you create or use a modified version of this License, which you may do +only in order to apply it to software that is not already a Licensed Product under this License, you must rename your +license so that it is not confusingly similar to this License, and must make it clear that your license contains +terms that differ from this License. In so naming your license, you may not use any trademark of Licensor or any +Contributor. + + +8. Disclaimer of Warranty. LICENSED PRODUCT IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE LICENSED PRODUCT IS FREE +OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE LICENSED PRODUCT IS WITH YOU. SHOULD LICENSED PRODUCT PROVE DEFECTIVE IN ANY RESPECT, YOU (AND +NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS +DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED PRODUCT IS AUTHORIZED +HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + + +9. Termination. + +a. Automatic Termination Upon Breach. This license and the rights granted hereunder will terminate +automatically if you fail to comply with the terms herein and fail to cure such breach within thirty (30) days of +becoming aware of the breach. All sublicenses to the Licensed Product that are properly granted shall survive any +termination of this license. Provisions that, by their nature, must remain in effect beyond the termination of this +License, shall survive. + +b. Termination Upon Assertion of Patent Infringement. If you initiate litigation by asserting a patent +infringement claim (excluding declaratory judgment actions) against Licensor or a Contributor (Licensor or +Contributor against whom you file such an action is referred to herein as Respondent) alleging that Licensed Product +directly or indirectly infringes any patent, then any and all rights granted by such Respondent to you under Sections +1 or 2 of this License shall terminate prospectively upon sixty (60) days notice from Respondent (the "Notice +Period") unless within that Notice Period you either agree in writing (i) to pay Respondent a mutually agreeable +reasonably royalty for your past or future use of Licensed Product made by such Respondent, or (ii) withdraw your +litigation claim with respect to Licensed Product against such Respondent. If within said Notice Period a reasonable +royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not +withdrawn, the rights granted by Licensor to you under Sections 1 and 2 automatically terminate at the expiration of +said Notice Period. + +c. Reasonable Value of This License. If you assert a patent infringement claim against Respondent alleging +that Licensed Product directly or indirectly infringes any patent where such claim is resolved (such as by license or +settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses +granted by said Respondent under Sections 1 and 2 shall be taken into account in determining the amount or value of +any payment or license. + +d. No Retroactive Effect of Termination. In the event of termination under Sections 9(a) or 9(b) above, all +end user license agreements (excluding licenses to distributors and resellers) that have been validly granted by you +or any distributor hereunder prior to termination shall survive termination. + + +10. Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), +CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED PRODUCT, OR ANY SUPPLIER +OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF +ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR +MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE +POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY +RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO +NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -11. Responsibility for Claims. As between Licensor and Contributors, each -party is responsible for claims and damages arising, directly or indirectly, -out of its utilization of rights under this License. You agree to work with -Licensor and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. +11. Responsibility for Claims. As between Licensor and Contributors, each party is responsible for claims and +damages arising, directly or indirectly, out of its utilization of rights under this License. You agree to work with +Licensor and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or +shall be deemed to constitute any admission of liability. -12. U.S. Government End Users. The Licensed Product is a commercial item, -as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial -computer software and commercial computer software documentation, as such -terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. -12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government -End Users acquire Licensed Product with only those rights set forth herein. -13. Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. This License shall be governed by California law provisions -(except to the extent applicable law, if any, provides otherwise), excluding -its conflict-of-law provisions. You expressly agree that any litigation relating -to this license shall be subject to the jurisdiction of the Federal Courts -of the Northern District of California or the Superior Court of the County -of Santa Clara, California (as appropriate), with venue lying in Santa Clara -County, California, with the losing party responsible for costs including, -without limitation, court costs and reasonable attorneys fees and expenses. -The application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. You and Licensor expressly waive any -rights to a jury trial in any litigation concerning Licensed Product or this -License. Any law or regulation that provides that the language of a contract -shall be construed against the drafter shall not apply to this License. +12. U.S. Government End Users. The Licensed Product is a commercial item, as that term is defined in 48 C.F.R. +2.101 (Oct. 1995), consisting of commercial computer software and commercial computer software documentation, as such +terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through +227.7202-4 (June 1995), all U.S. Government End Users acquire Licensed Product with only those rights set forth +herein. -14. Definition of You in This License. You throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 7. For legal entities, you includes any -entity that controls, is controlled by, or is under common control with you. -For purposes of this definition, control means (i) the power, direct or indirect, -to cause the direction or management of such entity, whether by contract or -otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding -shares, or (iii) beneficial ownership of such entity. -15. Glossary. All defined terms in this License that are used in more than -one Section of this License are repeated here, in alphabetical order, for -the convenience of the reader. The Section of this License in which each defined +13. Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any +provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary +to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable +law, if any, provides otherwise), excluding its conflict-of-law provisions. You expressly agree that any litigation +relating to this license shall be subject to the jurisdiction of the Federal Courts of the Northern District of +California or the Superior Court of the County of Santa Clara, California (as appropriate), with venue lying in Santa +Clara County, California, with the losing party responsible for costs including, without limitation, court costs and +reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the +International Sale of Goods is expressly excluded. You and Licensor expressly waive any rights to a jury trial in +any litigation concerning Licensed Product or this License. Any law or regulation that provides that the language of +a contract shall be construed against the drafter shall not apply to this License. + + +14. Definition of You in This License. You throughout this License, whether in upper or lower case, means an +individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a +future version of this License issued under Section 7. For legal entities, you includes any entity that controls, is +controlled by, or is under common control with you. For purposes of this definition, control means (i) the power, +direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) +ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + + +15. Glossary. All defined terms in this License that are used in more than one Section of this License are repeated +here, in alphabetical order, for the convenience of the reader. The Section of this License in which each defined term is first used is shown in parentheses. -Contributor: Each person or entity who created or contributed to the creation -of, and distributed, a Modification. (See Section 2) +Contributor: Each person or entity who created or contributed to the creation of, and distributed, a Modification. +(See Section 2) -Derivative Works: That term as used in this License is defined under U.S. -copyright law. (See Section 1(b)) +Derivative Works: That term as used in this License is defined under U.S. copyright law. (See Section 1(b)) -License: This BitTorrent Open Source License. (See first paragraph of License) +License: This BitTorrent Open Source License. (See first paragraph of License) -Licensed Product: Any BitTorrent Product licensed pursuant to this License. -The term "Licensed Product" includes all previous Modifications from any Contributor -that you receive. (See first paragraph of License and Section 2) +Licensed Product: Any BitTorrent Product licensed pursuant to this License. The term "Licensed Product" includes +all previous Modifications from any Contributor that you receive. (See first paragraph of License and Section 2) - Licensor: BitTorrent, Inc. (See first paragraph of License) +Licensor: BitTorrent, Inc. (See first paragraph of License) -Modifications: Any additions to or deletions from the substance or structure -of (i) a file containing Licensed Product, or (ii) any new file that contains -any part of Licensed Product. (See Section 2) +Modifications: Any additions to or deletions from the substance or structure of (i) a file containing Licensed +Product, or (ii) any new file that contains any part of Licensed Product. (See Section 2) - Notice: The notice contained in Exhibit A. (See Section 4(e)) +Notice: The notice contained in Exhibit A. (See Section 4(e)) -Source Code: The preferred form for making modifications to the Licensed Product, -including all modules contained therein, plus any associated interface definition -files, scripts used to control compilation and installation of an executable -program, or a list of differential comparisons against the Source Code of -the Licensed Product. (See +Source Code: The preferred form for making modifications to the Licensed Product, including all modules contained +therein, plus any associated interface definition files, scripts used to control compilation and installation of an +executable program, or a list of differential comparisons against the Source Code of the Licensed Product. (See +Section 1(a)) - Section 1(a)) +You: This term is defined in Section 14 of this License. - You: This term is defined in Section 14 of this License. EXHIBIT A -The Notice below must appear in each file of the Source Code of any copy you -distribute of the Licensed Product or any hereto. Contributors to any Modifications -may add their own copyright notices to identify their own contributions. +EXHIBIT A + +The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product or +any hereto. Contributors to any Modifications may add their own copyright notices to identify their own +contributions. License: -The contents of this file are subject to the BitTorrent Open Source License -Version 1.0 (the License). You may not copy or use this file, in either source -code or executable form, except in compliance with the License. You may obtain -a copy of the License at http://www.bittorrent.com/license/. +The contents of this file are subject to the BitTorrent Open Source License Version 1.0 (the License). You may not +copy or use this file, in either source code or executable form, except in compliance with the License. You may +obtain a copy of the License at http://www.bittorrent.com/license/. -Software distributed under the License is distributed on an AS IS basis, WITHOUT -WARRANTY OF ANY KIND, either express or implied. See the License for the specific -language governing rights and limitations under the License. +Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express +or implied. See the License for the specific language governing rights and limitations under the License. diff --git a/options/license/BitTorrent-1.1 b/options/license/BitTorrent-1.1 index 20d3cac86..fa5bd9df2 100644 --- a/options/license/BitTorrent-1.1 +++ b/options/license/BitTorrent-1.1 @@ -1,465 +1,137 @@ BitTorrent Open Source License - Version 1.1 -This BitTorrent Open Source License (the "License") applies to the BitTorrent -client and related software products as well as any updates or maintenance -releases of that software ("BitTorrent Products") that are distributed by -BitTorrent, Inc. ("Licensor"). Any BitTorrent Product licensed pursuant to -this License is a Licensed Product. Licensed Product, in its entirety, is -protected by U.S. copyright law. This License identifies the terms under which -you may use, copy, distribute or modify Licensed Product. +This BitTorrent Open Source License (the "License") applies to the BitTorrent client and related software products as well as any updates or maintenance releases of that software ("BitTorrent Products") that are distributed by BitTorrent, Inc. ("Licensor"). Any BitTorrent Product licensed pursuant to this License is a Licensed Product. Licensed Product, in its entirety, is protected by U.S. copyright law. This License identifies the terms under which you may use, copy, distribute or modify Licensed Product. Preamble -This Preamble is intended to describe, in plain English, the nature and scope -of this License. However, this Preamble is not a part of this license. The -legal effect of this License is dependent only upon the terms of the License -and not this Preamble. +This Preamble is intended to describe, in plain English, the nature and scope of this License. However, this Preamble is not a part of this license. The legal effect of this License is dependent only upon the terms of the License and not this Preamble. -This License complies with the Open Source Definition and is derived from -the Jabber Open Source License 1.0 (the "JOSL"), which has been approved by -Open Source Initiative. Sections 4(c) and 4(f)(iii) from the JOSL have been -deleted. +This License complies with the Open Source Definition and is derived from the Jabber Open Source License 1.0 (the "JOSL"), which has been approved by Open Source Initiative. Sections 4(c) and 4(f)(iii) from the JOSL have been deleted. This License provides that: -1. You may use or give away the Licensed Product, alone or as a component -of an aggregate software distribution containing programs from several different -sources. No royalty or other fee is required. +1. You may use or give away the Licensed Product, alone or as a component of an aggregate software distribution containing programs from several different sources. No royalty or other fee is required. -2. Both Source Code and executable versions of the Licensed Product, including -Modifications made by previous Contributors, are available for your use. (The -terms "Licensed Product," "Modifications," "Contributors" and "Source Code" -are defined in the License.) +2. Both Source Code and executable versions of the Licensed Product, including Modifications made by previous Contributors, are available for your use. (The terms "Licensed Product," "Modifications," "Contributors" and "Source Code" are defined in the License.) -3. You are allowed to make Modifications to the Licensed Product, and you -can create Derivative Works from it. (The term "Derivative Works" is defined -in the License.) +3. You are allowed to make Modifications to the Licensed Product, and you can create Derivative Works from it. (The term "Derivative Works" is defined in the License.) -4. By accepting the Licensed Product under the provisions of this License, -you agree that any Modifications you make to the Licensed Product and then -distribute are governed by the provisions of this License. In particular, -you must make the Source Code of your Modifications available to others free -of charge and without a royalty. +4. By accepting the Licensed Product under the provisions of this License, you agree that any Modifications you make to the Licensed Product and then distribute are governed by the provisions of this License. In particular, you must make the Source Code of your Modifications available to others free of charge and without a royalty. -5. You may sell, accept donations or otherwise receive compensation for executable -versions of a Licensed Product, without paying a royalty or other fee to the -Licensor or any Contributor, provided that such executable versions contain -your or another Contributor's material Modifications. For the avoidance of -doubt, to the extent your executable version of a Licensed Product does not -contain your or another Contributor's material Modifications, you may not -sell, accept donations or otherwise receive compensation for such executable. +5. You may sell, accept donations or otherwise receive compensation for executable versions of a Licensed Product, without paying a royalty or other fee to the Licensor or any Contributor, provided that such executable versions contain your or another Contributor's material Modifications. For the avoidance of doubt, to the extent your executable version of a Licensed Product does not contain your or another Contributor's material Modifications, you may not sell, accept donations or otherwise receive compensation for such executable. -You may use the Licensed Product for any purpose, but the Licensor is not -providing you any warranty whatsoever, nor is the Licensor accepting any liability -in the event that the Licensed Product doesn't work properly or causes you -any injury or damages. +You may use the Licensed Product for any purpose, but the Licensor is not providing you any warranty whatsoever, nor is the Licensor accepting any liability in the event that the Licensed Product doesn't work properly or causes you any injury or damages. -6. If you sublicense the Licensed Product or Derivative Works, you may charge -fees for warranty or support, or for accepting indemnity or liability obligations -to your customers. You cannot charge for, sell, accept donations or otherwise -receive compensation for the Source Code. +6. If you sublicense the Licensed Product or Derivative Works, you may charge fees for warranty or support, or for accepting indemnity or liability obligations to your customers. You cannot charge for, sell, accept donations or otherwise receive compensation for the Source Code. -7. If you assert any patent claims against the Licensor relating to the Licensed -Product, or if you breach any terms of the License, your rights to the Licensed -Product under this License automatically terminate. - -You may use this License to distribute your own Derivative Works, in which -case the provisions of this License will apply to your Derivative Works just -as they do to the original Licensed Product. - -Alternatively, you may distribute your Derivative Works under any other OSI-approved -Open Source license, or under a proprietary license of your choice. If you -use any license other than this License, however, you must continue to fulfill -the requirements of this License (including the provisions relating to publishing -the Source Code) for those portions of your Derivative Works that consist -of the Licensed Product, including the files containing +7. If you assert any patent claims against the Licensor relating to the Licensed Product, or if you breach any terms of the License, your rights to the Licensed Product under this License automatically terminate. +You may use this License to distribute your own Derivative Works, in which case the provisions of this License will apply to your Derivative Works just as they do to the original Licensed Product. +Alternatively, you may distribute your Derivative Works under any other OSI-approved Open Source license, or under a proprietary license of your choice. If you use any license other than this License, however, you must continue to fulfill the requirements of this License (including the provisions relating to publishing the Source Code) for those portions of your Derivative Works that consist of the Licensed Product, including the files containing Modifications. -New versions of this License may be published from time to time in connection -with new versions of a Licensed Product or otherwise. You may choose to continue -to use the license terms in this version of the License for the Licensed Product -that was originally licensed hereunder, however, the new versions of this -License will at all times apply to new versions of the Licensed Product released -by Licensor after the release of the new version of this License. Only the -Licensor has the right to change the License terms as they apply to the Licensed -Product. +New versions of this License may be published from time to time in connection with new versions of a Licensed Product or otherwise. You may choose to continue to use the license terms in this version of the License for the Licensed Product that was originally licensed hereunder, however, the new versions of this License will at all times apply to new versions of the Licensed Product released by Licensor after the release of the new version of this License. Only the Licensor has the right to change the License terms as they apply to the Licensed Product. -This License relies on precise definitions for certain terms. Those terms -are defined when they are first used, and the definitions are repeated for -your convenience in a Glossary at the end of the License. +This License relies on precise definitions for certain terms. Those terms are defined when they are first used, and the definitions are repeated for your convenience in a Glossary at the end of the License. License Terms -1. Grant of License From Licensor. Subject to the terms and conditions of -this License, Licensor hereby grants you a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims, to do the following: +1. Grant of License From Licensor. Subject to the terms and conditions of this License, Licensor hereby grants you a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, to do the following: -a. Use, reproduce, modify, display, perform, sublicense and distribute any -Modifications created by a Contributor or portions thereof, in both Source -Code or as an executable program, either on an unmodified basis or as part -of Derivative Works. + a. Use, reproduce, modify, display, perform, sublicense and distribute any Modifications created by a Contributor or portions thereof, in both Source Code or as an executable program, either on an unmodified basis or as part of Derivative Works. + b. Under claims of patents now or hereafter owned or controlled by Contributor, to make, use, sell, offer for sale, have made, and/or otherwise dispose of Modifications or portions thereof, but solely to the extent that any such claim is necessary to enable you to make, use, sell, offer for sale, have made, and/or otherwise dispose of Modifications or portions thereof or Derivative Works thereof. -b. Under claims of patents now or hereafter owned or controlled by Contributor, -to make, use, sell, offer for sale, have made, and/or otherwise dispose of -Modifications or portions thereof, but solely to the extent that any such -claim is necessary to enable you to make, use, sell, offer for sale, have -made, and/or otherwise dispose of Modifications or portions thereof or Derivative -Works thereof. +2. Grant of License to Modifications From Contributor. "Modifications" means any additions to or deletions from the substance or structure of (i) a file containing a Licensed Product, or (ii) any new file that contains any part of a Licensed Product. Hereinafter in this License, the term "Licensed Product" shall include all previous Modifications that you receive from any Contributor. Subject to the terms and conditions of this License, By application of the provisions in Section 4(a) below, each person or entity who created or contributed to the creation of, and distributed, a Modification (a "Contributor") hereby grants you a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, to do the following: -2. Grant of License to Modifications From Contributor. "Modifications" means -any additions to or deletions from the substance or structure of (i) a file -containing a Licensed Product, or (ii) any new file that contains any part -of a Licensed Product. Hereinafter in this License, the term "Licensed Product" -shall include all previous Modifications that you receive from any Contributor. -Subject to the terms and conditions of this License, By application of the -provisions in Section 4(a) below, each person or entity who created or contributed -to the creation of, and distributed, a Modification (a "Contributor") hereby -grants you a world-wide, royalty-free, non-exclusive license, subject to third -party intellectual property claims, to do the following: + a. Use, reproduce, modify, display, perform, sublicense and distribute any Modifications created by such Contributor or portions thereof, in both Source Code or as an executable program, either on an unmodified basis or as part of Derivative Works. -a. Use, reproduce, modify, display, perform, sublicense and distribute any -Modifications created by such Contributor or portions thereof, in both Source -Code or as an executable program, either on an unmodified basis or as part -of Derivative Works. + b. Under claims of patents now or hereafter owned or controlled by Contributor, to make, use, sell, offer for sale, have made, and/or otherwise dispose of Modifications or portions thereof, but solely to the extent that any such claim is necessary to enable you to make, use, sell, offer for sale, have made, and/or otherwise dispose of Modifications or portions thereof or Derivative Works thereof. -b. Under claims of patents now or hereafter owned or controlled by Contributor, -to make, use, sell, offer for sale, have made, and/or otherwise dispose of -Modifications or portions thereof, but solely to the extent that any such -claim is necessary to enable you to make, use, sell, offer for sale, have -made, and/or otherwise dispose of Modifications or portions thereof or Derivative -Works thereof. +3. Exclusions From License Grant. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor or any Contributor except as expressly stated herein. No patent license is granted separate from the Licensed Product, for code that you delete from the Licensed Product, or for combinations of the Licensed Product with other software or hardware. No right is granted to the trademarks of Licensor or any Contributor even if such marks are included in the Licensed Product. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any code that Licensor otherwise would have a right to license. As an express condition for your use of the Licensed Product, you hereby agree that you will not, without the prior written consent of Licensor, use any trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor or any Contributor except as expressly stated herein. For the avoidance of doubt and without limiting the foregoing, you hereby agree that you will not use or display any trademark of Licensor or any Contributor in any domain name, directory filepath, advertisement, link or other reference to you in any manner or in any media. -3. Exclusions From License Grant. Nothing in this License shall be deemed -to grant any rights to trademarks, copyrights, patents, trade secrets or any -other intellectual property of Licensor or any Contributor except as expressly -stated herein. No patent license is granted separate from the Licensed Product, -for code that you delete from the Licensed Product, or for combinations of -the Licensed Product with other software or hardware. No right is granted -to the trademarks of Licensor or any Contributor even if such marks are included -in the Licensed Product. Nothing in this License shall be interpreted to prohibit -Licensor from licensing under different terms from this License any code that -Licensor otherwise would have a right to license. As an express condition -for your use of the Licensed Product, you hereby agree that you will not, -without the prior written consent of Licensor, use any trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor or any -Contributor except as expressly stated herein. For the avoidance of doubt -and without limiting the foregoing, you hereby agree that you will not use -or display any trademark of Licensor or any Contributor in any domain name, -directory filepath, advertisement, link or other reference to you in any manner -or in any media. +4. Your Obligations Regarding Distribution. - 4. Your Obligations Regarding Distribution. + a. Application of This License to Your Modifications. As an express condition for your use of the Licensed Product, you hereby agree that any Modifications that you create or to which you contribute, and which you distribute, are governed by the terms of this License including, without limitation, Section 2. Any Modifications that you create or to which you contribute may be distributed only under the terms of this License or a future version of this License released under Section 7. You must include a copy of this License with every copy of the Modifications you distribute. You agree not to offer or impose any terms on any Source Code or executable version of the Licensed Product or Modifications that alter or restrict the applicable version of this License or the recipients' rights hereunder. However, you may include an additional document offering the additional rights described in Section 4(d). -a. Application of This License to Your Modifications. As an express condition -for your use of the Licensed Product, you hereby agree that any Modifications -that you create or to which you contribute, and which you distribute, are -governed by the terms of this License including, without limitation, Section -2. Any Modifications that you create or to which you contribute may be distributed -only under the terms of this License or a future version of this License released -under Section 7. You must include a copy of this License with every copy of -the Modifications you distribute. You agree not to offer or impose any terms -on any Source Code or executable version of the Licensed Product or Modifications -that alter or restrict the applicable version of this License or the recipients' -rights hereunder. However, you may include an additional document offering -the additional rights described in Section 4(d). + b. Availability of Source Code. You must make available, without charge, under the terms of this License, the Source Code of the Licensed Product and any Modifications that you distribute, either on the same media as you distribute any executable or other form of the Licensed Product, or via a mechanism generally accepted in the software development community for the electronic transfer of data (an "Electronic Distribution Mechanism"). The Source Code for any version of Licensed Product or Modifications that you distribute must remain available for as long as any executable or other form of the Licensed Product is distributed by you. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -b. Availability of Source Code. You must make available, without charge, under -the terms of this License, the Source Code of the Licensed Product and any -Modifications that you distribute, either on the same media as you distribute -any executable or other form of the Licensed Product, or via a mechanism generally -accepted in the software development community for the electronic transfer -of data (an "Electronic Distribution Mechanism"). The Source Code for any -version of Licensed Product or Modifications that you distribute must remain -available for as long as any executable or other form of the Licensed Product -is distributed by you. You are responsible for ensuring that the Source Code -version remains available even if the Electronic Distribution Mechanism is -maintained by a third party. + c. Intellectual Property Matters. - c. Intellectual Property Matters. + i. Third Party Claims. If you have knowledge that a license to a third party's intellectual property right is required to exercise the rights granted by this License, you must include a text file with the Source Code distribution titled "LEGAL" that describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after you make any Modifications available as described in Section 4(b), you shall promptly modify the LEGAL file in all copies you make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Licensed Product from you that new knowledge has been obtained. + ii. Contributor APIs. If your Modifications include an application programming interface ("API") and you have knowledge of patent licenses that are reasonably necessary to implement that API, you must also include this information in the LEGAL file. + iii. Representations. You represent that, except as disclosed pursuant to 4(c)(i) above, you believe that any Modifications you distribute are your original creations and that you have sufficient rights to grant the rights conveyed by this License. -i. Third Party Claims. If you have knowledge that a license to a third party's -intellectual property right is required to exercise the rights granted by -this License, you must include a text file with the Source Code distribution -titled "LEGAL" that describes the claim and the party making the claim in -sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after you make any Modifications available as described in -Section 4(b), you shall promptly modify the LEGAL file in all copies you make -available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Licensed Product from you that new knowledge has been obtained. + d. Required Notices. You must duplicate this License in any documentation you provide along with the Source Code of any Modifications you create or to which you contribute, and which you distribute, wherever you describe recipients' rights relating to Licensed Product. You must duplicate the notice contained in Exhibit A (the "Notice") in each file of the Source Code of any copy you distribute of the Licensed Product. If you created a Modification, you may add your name as a Contributor to the Notice. If it is not possible to put the Notice in a particular Source Code file due to its structure, then you must include such Notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Licensed Product. However, you may do so only on your own behalf, and not on behalf of the Licensor or any Contributor. You must make it clear that any such warranty, support, indemnity or liability obligation is offered by you alone, and you hereby agree to indemnify the Licensor and every Contributor for any liability incurred by the Licensor or such Contributor as a result of warranty, support, indemnity or liability terms you offer. -ii. Contributor APIs. If your Modifications include an application programming -interface ("API") and you have knowledge of patent licenses that are reasonably -necessary to implement that API, you must also include this information in -the LEGAL file. + e. Distribution of Executable Versions. You may distribute Licensed Product as an executable program under a license of your choice that may contain terms different from this License provided (i) you have satisfied the requirements of Sections 4(a) through 4(d) for that distribution, (ii) you include a conspicuous notice in the executable version, related documentation and collateral materials stating that the Source Code version of the Licensed Product is available under the terms of this License, including a description of how and where you have fulfilled the obligations of Section 4(b), and (iii) you make it clear that any terms that differ from this License are offered by you alone, not by Licensor or any Contributor. You hereby agree to indemnify the Licensor and every Contributor for any liability incurred by Licensor or such Contributor as a result of any terms you offer. -iii. Representations. You represent that, except as disclosed pursuant to -4(c)(i) above, you believe that any Modifications you distribute are your -original creations and that you have sufficient rights to grant the rights -conveyed by this License. + f. Distribution of Derivative Works. You may create Derivative Works (e.g., combinations of some or all of the Licensed Product with other code) and distribute the Derivative Works as products under any other license you select, with the proviso that the requirements of this License are fulfilled for those portions of the Derivative Works that consist of the Licensed Product or any Modifications thereto. -d. Required Notices. You must duplicate this License in any documentation -you provide along with the Source Code of any Modifications you create or -to which you contribute, and which you distribute, wherever you describe recipients' -rights relating to Licensed Product. You must duplicate the notice contained -in Exhibit A (the "Notice") in each file of the Source Code of any copy you -distribute of the Licensed Product. If you created a Modification, you may -add your name as a Contributor to the Notice. If it is not possible to put -the Notice in a particular Source Code file due to its structure, then you -must include such Notice in a location (such as a relevant directory file) -where a user would be likely to look for such a notice. You may choose to -offer, and charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Licensed Product. However, you may do so only -on your own behalf, and not on behalf of the Licensor or any Contributor. -You must make it clear that any such warranty, support, indemnity or liability -obligation is offered by you alone, and you hereby agree to indemnify the -Licensor and every Contributor for any liability incurred by the Licensor -or such Contributor as a result of warranty, support, indemnity or liability -terms you offer. + g. Compensation for Distribution of Executable Versions of Licensed Products, Modifications or Derivative Works. Notwithstanding any provision of this License to the contrary, by distributing, selling, licensing, sublicensing or otherwise making available any Licensed Product, or Modification or Derivative Work thereof, you and Licensor hereby acknowledge and agree that you may sell, license or sublicense for a fee, accept donations or otherwise receive compensation for executable versions of a Licensed Product, without paying a royalty or other fee to the Licensor or any other Contributor, provided that such executable versions (i) contain your or another Contributor's material Modifications, or (ii) are otherwise material Derivative Works. For purposes of this License, an executable version of the Licensed Product will be deemed to contain a material Modification, or will otherwise be deemed a material Derivative Work, if (a) the Licensed Product is modified with your own or a third party's software programs or other code, and/or the Licensed Product is combined with a number of your own or a third party's software programs or code, respectively, and (b) such software programs or code add or contribute material value, functionality or features to the License Product. For the avoidance of doubt, to the extent your executable version of a Licensed Product does not contain your or another Contributor's material Modifications or is otherwise not a material Derivative Work, in each case as contemplated herein, you may not sell, license or sublicense for a fee, accept donations or otherwise receive compensation for such executable. Additionally, without limitation of the foregoing and notwithstanding any provision of this License to the contrary, you cannot charge for, sell, license or sublicense for a fee, accept donations or otherwise receive compensation for the Source Code. -e. Distribution of Executable Versions. You may distribute Licensed Product -as an executable program under a license of your choice that may contain terms -different from this License provided (i) you have satisfied the requirements -of Sections 4(a) through 4(d) for that distribution, (ii) you include a conspicuous -notice in the executable version, related documentation and collateral materials -stating that the Source Code version of the Licensed Product is available -under the terms of this License, including a description of how and where -you have fulfilled the obligations of Section 4(b), and (iii) you make it -clear that any terms that differ from this License are offered by you alone, -not by Licensor or any Contributor. You hereby agree to indemnify the Licensor -and every Contributor for any liability incurred by Licensor or such Contributor -as a result of any terms you offer. +5. Inability to Comply Due to Statute or Regulation. If it is impossible for you to comply with any of the terms of this License with respect to some or all of the Licensed Product due to statute, judicial order, or regulation, then you must (i) comply with the terms of this License to the maximum extent possible, (ii) cite the statute or regulation that prohibits you from adhering to the License, and (iii) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 4(d), and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill at computer programming to be able to understand it. -f. Distribution of Derivative Works. You may create Derivative Works (e.g., -combinations of some or all of the Licensed Product with other code) and distribute -the Derivative Works as products under any other license you select, with -the proviso that the requirements of this License are fulfilled for those -portions of the Derivative Works that consist of the Licensed Product or any -Modifications thereto. +6. Application of This License. This License applies to code to which Licensor or Contributor has attached the Notice in Exhibit A, which is incorporated herein by this reference. -g. Compensation for Distribution of Executable Versions of Licensed Products, -Modifications or Derivative Works. Notwithstanding any provision of this License -to the contrary, by distributing, selling, licensing, sublicensing or otherwise -making available any Licensed Product, or Modification or Derivative Work -thereof, you and Licensor hereby acknowledge and agree that you may sell, -license or sublicense for a fee, accept donations or otherwise receive compensation -for executable versions of a Licensed Product, without paying a royalty or -other fee to the Licensor or any other Contributor, provided that such executable -versions (i) contain your or another Contributor's material Modifications, -or (ii) are otherwise material Derivative Works. For purposes of this License, -an executable version of the Licensed Product will be deemed to contain a -material Modification, or will otherwise be deemed a material Derivative Work, -if (a) the Licensed Product is modified with your own or a third party's software -programs or other code, and/or the Licensed Product is combined with a number -of your own or a third party's software programs or code, respectively, and -(b) such software programs or code add or contribute material value, functionality -or features to the License Product. For the avoidance of doubt, to the extent -your executable version of a Licensed Product does not contain your or another -Contributor's material Modifications or is otherwise not a material Derivative -Work, in each case as contemplated herein, you may not sell, license or sublicense -for a fee, accept donations or otherwise receive compensation for such executable. -Additionally, without limitation of the foregoing and notwithstanding any -provision of this License to the contrary, you cannot charge for, sell, license -or sublicense for a fee, accept donations or otherwise receive compensation -for the Source Code. +7. Versions of This License. -5. Inability to Comply Due to Statute or Regulation. If it is impossible for -you to comply with any of the terms of this License with respect to some or -all of the Licensed Product due to statute, judicial order, or regulation, -then you must (i) comply with the terms of this License to the maximum extent -possible, (ii) cite the statute or regulation that prohibits you from adhering -to the License, and (iii) describe the limitations and the code they affect. -Such description must be included in the LEGAL file described in Section 4(d), -and must be included with all distributions of the Source Code. Except to -the extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill at computer programming to be able -to understand it. + a. New Versions. Licensor may publish from time to time revised and/or new versions of the License. -6. Application of This License. This License applies to code to which Licensor -or Contributor has attached the Notice in Exhibit A, which is incorporated -herein by this reference. + b. Effect of New Versions. Once Licensed Product has been published under a particular version of the License, you may always continue to use it under the terms of that version, provided that any such license be in full force and effect at the time, and has not been revoked or otherwise terminated. You may also choose to use such Licensed Product under the terms of any subsequent version (but not any prior version) of the License published by Licensor. No one other than Licensor has the right to modify the terms applicable to Licensed Product created under this License. - 7. Versions of This License. + c. Derivative Works of this License. If you create or use a modified version of this License, which you may do only in order to apply it to software that is not already a Licensed Product under this License, you must rename your license so that it is not confusingly similar to this License, and must make it clear that your license contains terms that differ from this License. In so naming your license, you may not use any trademark of Licensor or any Contributor. -a. New Versions. Licensor may publish from time to time revised and/or new -versions of the License. +8. Disclaimer of Warranty. LICENSED PRODUCT IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE LICENSED PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LICENSED PRODUCT IS WITH YOU. SHOULD LICENSED PRODUCT PROVE DEFECTIVE IN ANY RESPECT, YOU (AND NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED PRODUCT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -b. Effect of New Versions. Once Licensed Product has been published under -a particular version of the License, you may always continue to use it under -the terms of that version, provided that any such license be in full force -and effect at the time, and has not been revoked or otherwise terminated. -You may also choose to use such Licensed Product under the terms of any subsequent -version (but not any prior version) of the License published by Licensor. -No one other than Licensor has the right to modify the terms applicable to -Licensed Product created under this License. +9. Termination. -c. Derivative Works of this License. If you create or use a modified version -of this License, which you may do only in order to apply it to software that -is not already a Licensed Product under this License, you must rename your -license so that it is not confusingly similar to this License, and must make -it clear that your license contains terms that differ from this License. In -so naming your license, you may not use any trademark of Licensor or any Contributor. + a. Automatic Termination Upon Breach. This license and the rights granted hereunder will terminate automatically if you fail to comply with the terms herein and fail to cure such breach within ten (10) days of being notified of the breach by the Licensor. For purposes of this provision, proof of delivery via email to the address listed in the 'WHOIS' database of the registrar for any website through which you distribute or market any Licensed Product, or to any alternate email address which you designate in writing to the Licensor, shall constitute sufficient notification. All sublicenses to the Licensed Product that are properly granted shall survive any termination of this license so long as they continue to complye with the terms of this License. Provisions that, by their nature, must remain in effect beyond the termination of this License, shall survive. -8. Disclaimer of Warranty. LICENSED PRODUCT IS PROVIDED UNDER THIS LICENSE -ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE LICENSED PRODUCT IS FREE -OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. -THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LICENSED PRODUCT -IS WITH YOU. SHOULD LICENSED PRODUCT PROVE DEFECTIVE IN ANY RESPECT, YOU (AND -NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN -ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED PRODUCT IS AUTHORIZED HEREUNDER -EXCEPT UNDER THIS DISCLAIMER. + b. Termination Upon Assertion of Patent Infringement. If you initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Licensor or a Contributor (Licensor or Contributor against whom you file such an action is referred to herein as Respondent) alleging that Licensed Product directly or indirectly infringes any patent, then any and all rights granted by such Respondent to you under Sections 1 or 2 of this License shall terminate prospectively upon sixty (60) days notice from Respondent (the "Notice Period") unless within that Notice Period you either agree in writing (i) to pay Respondent a mutually agreeable reasonably royalty for your past or future use of Licensed Product made by such Respondent, or (ii) withdraw your litigation claim with respect to Licensed Product against such Respondent. If within said Notice Period a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Licensor to you under Sections 1 and 2 automatically terminate at the expiration of said Notice Period. - 9. Termination. + c. Reasonable Value of This License. If you assert a patent infringement claim against Respondent alleging that Licensed Product directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by said Respondent under Sections 1 and 2 shall be taken into account in determining the amount or value of any payment or license. -a. Automatic Termination Upon Breach. This license and the rights granted -hereunder will terminate automatically if you fail to comply with the terms -herein and fail to cure such breach within ten (10) days of being notified -of the breach by the Licensor. For purposes of this provision, proof of delivery -via email to the address listed in the 'WHOIS' database of the registrar for -any website through which you distribute or market any Licensed Product, or -to any alternate email address which you designate in writing to the Licensor, -shall constitute sufficient notification. All sublicenses to the Licensed -Product that are properly granted shall survive any termination of this license -so long as they continue to complye with the terms of this License. Provisions -that, by their nature, must remain in effect beyond the termination of this -License, shall survive. + d. No Retroactive Effect of Termination. In the event of termination under Sections 9(a) or 9(b) above, all end user license agreements (excluding licenses to distributors and resellers) that have been validly granted by you or any distributor hereunder prior to termination shall survive termination. -b. Termination Upon Assertion of Patent Infringement. If you initiate litigation -by asserting a patent infringement claim (excluding declaratory judgment actions) -against Licensor or a Contributor (Licensor or Contributor against whom you -file such an action is referred to herein as Respondent) alleging that Licensed -Product directly or indirectly infringes any patent, then any and all rights -granted by such Respondent to you under Sections 1 or 2 of this License shall -terminate prospectively upon sixty (60) days notice from Respondent (the "Notice -Period") unless within that Notice Period you either agree in writing (i) -to pay Respondent a mutually agreeable reasonably royalty for your past or -future use of Licensed Product made by such Respondent, or (ii) withdraw your -litigation claim with respect to Licensed Product against such Respondent. -If within said Notice Period a reasonable royalty and payment arrangement -are not mutually agreed upon in writing by the parties or the litigation claim -is not withdrawn, the rights granted by Licensor to you under Sections 1 and -2 automatically terminate at the expiration of said Notice Period. +10. Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED PRODUCT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -c. Reasonable Value of This License. If you assert a patent infringement claim -against Respondent alleging that Licensed Product directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by said Respondent under Sections 1 and 2 shall -be taken into account in determining the amount or value of any payment or -license. +11. Responsibility for Claims. As between Licensor and Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License. You agree to work with Licensor and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. -d. No Retroactive Effect of Termination. In the event of termination under -Sections 9(a) or 9(b) above, all end user license agreements (excluding licenses -to distributors and resellers) that have been validly granted by you or any -distributor hereunder prior to termination shall survive termination. +12. U.S. Government End Users. The Licensed Product is a commercial item, as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial computer software and commercial computer software documentation, as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Licensed Product with only those rights set forth herein. -10. Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, -WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, -ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED PRODUCT, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTYS NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. +13. Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. You expressly agree that in any litigation relating to this license the losing party shall be responsible for costs including, without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation that provides that the language of a contract shall be construed against the drafter shall not apply to this License. -11. Responsibility for Claims. As between Licensor and Contributors, each -party is responsible for claims and damages arising, directly or indirectly, -out of its utilization of rights under this License. You agree to work with -Licensor and Contributors to distribute such responsibility on an equitable -basis. Nothing herein is intended or shall be deemed to constitute any admission -of liability. +14. Definition of You in This License. You throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 7. For legal entities, you includes any entity that controls, is controlled by, is under common control with, or affiliated with, you. For purposes of this definition, control means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. You are responsible for advising any affiliated entity of the terms of this License, and that any rights or privileges derived from or obtained by way of this License are subject to the restrictions outlined herein. -12. U.S. Government End Users. The Licensed Product is a commercial item, -as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of commercial -computer software and commercial computer software documentation, as such -terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. -12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government -End Users acquire Licensed Product with only those rights set forth herein. +15. Glossary. All defined terms in this License that are used in more than one Section of this License are repeated here, in alphabetical order, for the convenience of the reader. The Section of this License in which each defined term is first used is shown in parentheses. -13. Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. This License shall be governed by California law provisions -(except to the extent applicable law, if any, provides otherwise), excluding -its conflict-of-law provisions. You expressly agree that in any litigation -relating to this license the losing party shall be responsible for costs including, -without limitation, court costs and reasonable attorneys fees and expenses. -The application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation that provides that -the language of a contract shall be construed against the drafter shall not -apply to this License. +Contributor: Each person or entity who created or contributed to the creation of, and distributed, a Modification. (See Section 2) -14. Definition of You in This License. You throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 7. For legal entities, you includes any -entity that controls, is controlled by, is under common control with, or affiliated -with, you. For purposes of this definition, control means (i) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (ii) ownership of fifty percent (50%) or more -of the outstanding shares, or (iii) beneficial ownership of such entity. You -are responsible for advising any affiliated entity of the terms of this License, -and that any rights or privileges derived from or obtained by way of this -License are subject to the restrictions outlined herein. - -15. Glossary. All defined terms in this License that are used in more than -one Section of this License are repeated here, in alphabetical order, for -the convenience of the reader. The Section of this License in which each defined -term is first used is shown in parentheses. - -Contributor: Each person or entity who created or contributed to the creation -of, and distributed, a Modification. (See Section 2) - -Derivative Works: That term as used in this License is defined under U.S. -copyright law. (See Section 1(b)) +Derivative Works: That term as used in this License is defined under U.S. copyright law. (See Section 1(b)) License: This BitTorrent Open Source License. (See first paragraph of License) -Licensed Product: Any BitTorrent Product licensed pursuant to this License. -The term "Licensed Product" includes all previous Modifications from any Contributor -that you receive. (See first paragraph of License and Section 2) +Licensed Product: Any BitTorrent Product licensed pursuant to this License. The term "Licensed Product" includes all previous Modifications from any Contributor that you receive. (See first paragraph of License and Section 2) - Licensor: BitTorrent, Inc. (See first paragraph of License) +Licensor: BitTorrent, Inc. (See first paragraph of License) -Modifications: Any additions to or deletions from the substance or structure -of (i) a file containing Licensed +Modifications: Any additions to or deletions from the substance or structure of (i) a file containing Licensed +Product, or (ii) any new file that contains any part of Licensed Product. (See Section 2) -Product, or (ii) any new file that contains any part of Licensed Product. -(See Section 2) +Notice: The notice contained in Exhibit A. (See Section 4(e)) - Notice: The notice contained in Exhibit A. (See Section 4(e)) +Source Code: The preferred form for making modifications to the Licensed Product, including all modules contained therein, plus any associated interface definition files, scripts used to control compilation and installation of an executable program, or a list of differential comparisons against the Source Code of the Licensed Product. (See Section 1(a)) -Source Code: The preferred form for making modifications to the Licensed Product, -including all modules contained therein, plus any associated interface definition -files, scripts used to control compilation and installation of an executable -program, or a list of differential comparisons against the Source Code of -the Licensed Product. (See Section 1(a)) +You: This term is defined in Section 14 of this License. - You: This term is defined in Section 14 of this License. EXHIBIT A +EXHIBIT A -The Notice below must appear in each file of the Source Code of any copy you -distribute of the Licensed Product or any hereto. Contributors to any Modifications -may add their own copyright notices to identify their own contributions. +The Notice below must appear in each file of the Source Code of any copy you distribute of the Licensed Product or any hereto. Contributors to any Modifications may add their own copyright notices to identify their own contributions. License: +The contents of this file are subject to the BitTorrent Open Source License Version 1.0 (the License). You may not copy or use this file, in either source code or executable form, except in compliance with the License. You may obtain a copy of the License at http://www.bittorrent.com/license/. -The contents of this file are subject to the BitTorrent Open Source License -Version 1.1 (the License). You may not copy or use this file, in either source -code or executable form, except in compliance with the License. You may obtain -a copy of the License at http://www.bittorrent.com/license/. - -Software distributed under the License is distributed on an AS IS basis, WITHOUT -WARRANTY OF ANY KIND, either express or implied. See the License for the specific -language governing rights and limitations under the License. +Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. BitTorrent, Inc. diff --git a/options/license/BlueOak-1.0.0 b/options/license/BlueOak-1.0.0 index d0a35b9da..c5402b957 100644 --- a/options/license/BlueOak-1.0.0 +++ b/options/license/BlueOak-1.0.0 @@ -4,37 +4,44 @@ Version 1.0.0 ## Purpose -This license gives everyone as much permission to work with this software -as possible, while protecting contributors from liability. +This license gives everyone as much permission to work with +this software as possible, while protecting contributors +from liability. ## Acceptance -In order to receive this license, you must agree to its rules. The rules of -this license are both obligations under that agreement and conditions to your -license. You must not do anything with this software that triggers a rule -that you cannot or will not follow. +In order to receive this license, you must agree to its +rules. The rules of this license are both obligations +under that agreement and conditions to your license. +You must not do anything with this software that triggers +a rule that you cannot or will not follow. ## Copyright -Each contributor licenses you to do everything with this software that would -otherwise infringe that contributor's copyright in it. +Each contributor licenses you to do everything with this +software that would otherwise infringe that contributor's +copyright in it. ## Notices -You must ensure that everyone who gets a copy of any part of this software -from you, with or without changes, also gets the text of this license or a -link to . +You must ensure that everyone who gets a copy of +any part of this software from you, with or without +changes, also gets the text of this license or a link to +. ## Excuse -If anyone notifies you in writing that you have not complied with [Notices](#notices) -, you can keep your license by taking all practical steps to comply within -30 days after the notice. If you do not do so, your license ends immediately. +If anyone notifies you in writing that you have not +complied with [Notices](#notices), you can keep your +license by taking all practical steps to comply within 30 +days after the notice. If you do not do so, your license +ends immediately. ## Patent -Each contributor licenses you to do everything with this software that would -otherwise infringe any patent claims they can license or become able to license. +Each contributor licenses you to do everything with this +software that would otherwise infringe any patent claims +they can license or become able to license. ## Reliability @@ -42,6 +49,7 @@ No contributor can revoke this license. ## No Liability -***As far as the law allows, this software comes as is, without any warranty -or condition, and no contributor will be liable to anyone for any damages -related to this software or this license, under any kind of legal claim.*** +***As far as the law allows, this software comes as is, +without any warranty or condition, and no contributor +will be liable to anyone for any damages related to this +software or this license, under any kind of legal claim.*** diff --git a/options/license/Bootloader-exception b/options/license/Bootloader-exception index eef7281a3..c55782670 100644 --- a/options/license/Bootloader-exception +++ b/options/license/Bootloader-exception @@ -1,3 +1,10 @@ -Bootloader Exception +Bootloader Exception +-------------------- -In addition to the permissions in the GNU General Public License, the authors give you unlimited permission to link or embed compiled bootloader and related files into combinations with other programs, and to distribute those combinations without any restriction coming from the use of those files. (The General Public License restrictions do apply in other respects; for example, they cover modification of the files, and distribution when not linked into a combined executable.) +In addition to the permissions in the GNU General Public License, the +authors give you unlimited permission to link or embed compiled bootloader +and related files into combinations with other programs, and to distribute +those combinations without any restriction coming from the use of those +files. (The General Public License restrictions do apply in other respects; +for example, they cover modification of the files, and distribution when +not linked into a combine executable.) diff --git a/options/license/Borceux b/options/license/Borceux index 6bf5464eb..4856e7885 100644 --- a/options/license/Borceux +++ b/options/license/Borceux @@ -1,35 +1,19 @@ Copyright 1993 Francis Borceux - -You may freely use, modify, and/or distribute each of the files in this package -without limitation. The package consists of the following files: +You may freely use, modify, and/or distribute each of the files in this package without limitation. The package consists of the following files: README - compatibility/OldDiagram - compatibility/OldMaxiDiagram - compatibility/OldMicroDiagram - compatibility/OldMiniDiagram - compatibility/OldMultipleArrows - diagram/Diagram - diagram/MaxiDiagram - diagram/MicroDiagram - diagram/MiniDiagram - diagram/MultipleArrows - user-guides/Diagram_Mode_d_Emploi - user-guides/Diagram_Read_Me -Of course no support is guaranteed, but the author will attempt to assist -with problems. Current email address: - +Of course no support is guaranteed, but the author will attempt to assist with problems. Current email address: francis dot borceux at uclouvain dot be. diff --git a/options/license/C-UDA-1.0 b/options/license/C-UDA-1.0 new file mode 100644 index 000000000..9f7c57df5 --- /dev/null +++ b/options/license/C-UDA-1.0 @@ -0,0 +1,47 @@ +Computational Use of Data Agreement v1.0 + +This is the Computational Use of Data Agreement, Version 1.0 (the “C-UDA”). Capitalized terms are defined in Section 5. Data Provider and you agree as follows: + +1. Provision of the Data + +1.1. You may use, modify, and distribute the Data made available to you by the Data Provider under this C-UDA for Computational Use if you follow the C-UDA's terms. + +1.2. Data Provider will not sue you or any Downstream Recipient for any claim arising out of the use, modification, or distribution of the Data provided you meet the terms of the C-UDA. + +1.3 This C-UDA does not restrict your use, modification, or distribution of any portions of the Data that are in the public domain or that may be used, modified, or distributed under any other legal exception or limitation. + +2. Restrictions + +2.1 You agree that you will use the Data solely for Computational Use. + +2.2 The C-UDA does not impose any restriction with respect to the use, modification, or distribution of Results. + +3. Redistribution of Data + +3.1. You may redistribute the Data, so long as: + +3.1.1. You include with any Data you redistribute all credit or attribution information that you received with the Data, and your terms require any Downstream Recipient to do the same; and + +3.1.2. You bind each recipient to whom you redistribute the Data to the terms of the C-UDA. + +4. No Warranty, Limitation of Liability + +4.1. Data Provider does not represent or warrant that it has any rights whatsoever in the Data. + +4.2. THE DATA IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +4.3. NEITHER DATA PROVIDER NOR ANY UPSTREAM DATA PROVIDER SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE DATA OR RESULTS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +5. Definitions + +5.1. “Computational Use” means activities necessary to enable the use of Data (alone or along with other material) for analysis by a computer. + +5.2.“Data” means the material you receive under the C-UDA in modified or unmodified form, but not including Results. + +5.3. “Data Provider” means the source from which you receive the Data and with whom you enter into the C-UDA. + +5.4. “Downstream Recipient” means any person or persons who receives the Data directly or indirectly from you in accordance with the C-UDA. + +5.5. “Result” means anything that you develop or improve from your use of Data that does not include more than a de minimis portion of the Data on which the use is based. Results may include de minimis portions of the Data necessary to report on or explain use that has been conducted with the Data, such as figures in scientific papers, but do not include more. Artificial intelligence models trained on Data (and which do not include more than a de minimis portion of Data) are Results. + +5.6. “Upstream Data Providers” means the source or sources from which the Data Provider directly or indirectly received, under the terms of the C-UDA, material that is included in the Data. diff --git a/options/license/CAL-1.0 b/options/license/CAL-1.0 index 538f9d961..4cebc6d54 100644 --- a/options/license/CAL-1.0 +++ b/options/license/CAL-1.0 @@ -1,352 +1,354 @@ # The Cryptographic Autonomy License, v. 1.0 -*This Cryptographic Autonomy License (the "License") applies to any Work whose -owner has marked it with any of the following notices, or a similar demonstration -of intent: * - - +*This Cryptographic Autonomy License (the "License") applies to any +Work whose owner has marked it with any of the following notices, or a +similar demonstration of intent:* SPDX-License-Identifier: CAL-1.0 - Licensed under the Cryptographic Autonomy License version 1.0 - - *or* - - SPDX-License-Identifier: CAL-1.0-Combined-Work-Exception - -Licensed under the Cryptographic Autonomy License version 1.0, with Combined -Work Exception +Licensed under the Cryptographic Autonomy License version 1.0, with +Combined Work Exception ______________________________________________________________________ - - - ## 1. Purpose - -This License gives You unlimited permission to use and modify the software -to which it applies (the "Work"), either as-is or in modified form, for Your -private purposes, while protecting the owners and contributors to the software -from liability. - -This License also strives to protect the freedom and autonomy of third parties -who receive the Work from you. If any non-affiliated third party receives -any part, aspect, or element of the Work from You, this License requires that -You provide that third party all the permissions and materials needed to independently -use and modify the Work without that third party having a loss of data or -capability due to your actions. - - The full permissions, conditions, and other terms are laid out below. - - ## 2. Receiving a License - -In order to receive this License, You must agree to its rules. The rules of -this License are both obligations of Your agreement with the Licensor and -conditions to your License. You must not do anything with the Work that triggers -a rule You cannot or will not follow. - - ### 2.1. Application - -The terms of this License apply to the Work as you receive it from Licensor, -as well as to any modifications, elaborations, or implementations created -by You that contain any licensable portion of the Work (a "Modified Work"). -Unless specified, any reference to the Work also applies to a Modified Work. - - ### 2.2. Offer and Acceptance - -This License is automatically offered to every person and organization. You -show that you accept this License and agree to its conditions by taking any -action with the Work that, absent this License, would infringe any intellectual -property right held by Licensor. - - ### 2.3. Compliance and Remedies - -Any failure to act according to the terms and conditions of this License places -Your use of the Work outside the scope of the License and infringes the intellectual -property rights of the Licensor. In the event of infringement, the terms and -conditions of this License may be enforced by Licensor under the intellectual -property laws of any jurisdiction to which You are subject. You also agree -that either the Licensor or a Recipient (as an intended third-party beneficiary) -may enforce the terms and conditions of this License against You via specific -performance. - - ## 3. Permissions - - - - ### 3.1. Permissions Granted - -Conditioned on compliance with section 4, and subject to the limitations of -section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive -permission to: - -+ a) Take any action with the Work that would infringe the non-patent intellectual -property laws of any jurisdiction to which You are subject; and - -+ b) claims that Licensor can license or becomes able to license, to the extent -that those claims are embodied in the Work as distributed by Licensor. - - ### 3.2. Limitations on Permissions Granted - -The following limitations apply to the permissions granted in section 3.1: - - - -+ a) Licensor does not grant any patent license for claims that are only infringed -due to modification of the Work as provided by Licensor, or the combination -of the Work as provided by Licensor, directly or indirectly, with any other -component, including other software or hardware. - - - -+ b) Licensor does not grant any license to the trademarks, service marks, -or logos of Licensor, except to the extent necessary to comply with the attribution -conditions in section 4.1 of this License. - - ## 4. Conditions - -If You exercise any permission granted by this License, such that the Work, -or any part, aspect, or element of the Work, is distributed, communicated, -made available, or made perceptible to a non-Affiliate third party (a "Recipient"), -either via physical delivery or via a network connection to the Recipient, -You must comply with the following conditions: - - ### 4.1. Provide Access to Source Code - -Subject to the exception in section 4.4, You must provide to each Recipient -a copy of, or no-charge unrestricted network access to, the Source Code corresponding -to the Work ("Access"). - -The "Source Code" of the Work means the form of the Work preferred for making -modifications, including any comments, configuration information, documentation, -help materials, installation instructions, cryptographic seeds or keys, and -any information reasonably necessary for the Recipient to independently compile -and use the Source Code and to have full access to the functionality contained -in the Work. - - #### 4.1.1. Providing Network Access to the Source Code - -Network Access to the Notices and Source Code may be provided by You or by -a third party, such as a public software repository, and must persist during -the same period in which You exercise any of the permissions granted to You -under this License and for at least one year thereafter. - - #### 4.1.2. Source Code for a Modified Work - -Subject to the exception in section 4.5, You must provide to each Recipient -of a Modified Work Access to Source Code corresponding to those portions of -the Work remaining in the Modified Work as well as the modifications used -by You to create the Modified Work. The Source Code corresponding to the modifications -in the Modified Work must be provided to the Recipient either a) under this -License, or b) under a Compatible Open Source License. - - #### 4.1.3. Coordinated Disclosure of Security Vulnerabilities - -You may delay providing the Source Code corresponding to a particular modification -of the Work for up to ninety (90) days (the "Embargo Period") if: - - - -+ a) the modification is intended to address a newly-identified vulnerability -or a security flaw in the Work, - - - -+ b) disclosure of the vulnerability or security flaw before the end of the -Embargo Period would put the data, identity, or autonomy of one or more Recipients -of the Work at significant risk, - - - -+ c) You are participating in a coordinated disclosure of the vulnerability -or security flaw with one or more additional Licensees, and - - - -+ d) Access to the Source Code pertaining to the modification is provided -to all Recipients at the end of the Embargo Period. - - ### 4.2. Maintain User Autonomy - -In addition to providing each Recipient the opportunity to have Access to -the Source Code, You cannot use the permissions given under this License to -interfere with a Recipient's ability to fully use an independent copy of the -Work generated from the Source Code You provide with the Recipient's own User -Data. - -"User Data" means any data that is an input to or an output from the Work, -where the presence of the data is necessary for substantially identical use -of the Work in an equivalent context chosen by the Recipient, and where the -Recipient has an existing ownership interest, an existing right to possess, -or where the data has been generated by, for, or has been assigned to the -Recipient. - - #### 4.2.1. No Withholding User Data - -Throughout any period in which You exercise any of the permissions granted -to You under this License, You must also provide to any Recipient to whom -you provide services via the Work, a no-charge copy, provided in a commonly -used electronic form, of the Recipient's User Data in your possession, to -the extent that such User Data is available to You for use in conjunction -with the Work. - - #### 4.2.2. No Technical Measures that Limit Access - -You may not, by means of the use cryptographic methods applied to anything -provided to the Recipient, by possession or control of cryptographic keys, -seeds, hashes, by any other technological protection measures, or by any other -method, limit a Recipient's ability to access any functionality present in -Recipient's independent copy of the Work, or to deny a Recipient full control -of the Recipient's User Data. - - #### 4.2.3. No Legal or Contractual Measures that Limit Access - -You may not contractually restrict a Recipient's ability to independently -exercise the permissions granted under this License. You waive any legal power -to forbid circumvention of technical protection measures that include use -of the Work, and You waive any claim that the capabilities of the Work were -limited or modified as a means of enforcing the legal rights of third parties -against Recipients. - - ### 4.3. Provide Notices and Attribution - -You must retain all licensing, authorship, or attribution notices contained -in the Source Code (the "Notices"), and provide all such Notices to each Recipient, -together with a statement acknowledging the use of the Work. Notices may be -provided directly to a Recipient or via an easy-to-find hyperlink to an Internet -location also providing Access to Source Code. - - ### 4.4. Scope of Conditions in this License - -You are required to uphold the conditions of this License only relative to -those who are Recipients of the Work from You. Other than providing Recipients -with the applicable Notices, Access to Source Code, and a copy of and full -control of their User Data, nothing in this License requires You to provide -processing services to or engage in network interactions with anyone. - - ### 4.5. Combined Work Exception - -As an exception to condition that You provide Recipients Access to Source -Code, any Source Code files marked by the Licensor as having the "Combined -Work Exception," or any object code exclusively resulting from Source Code -files so marked, may be combined with other Software into a "Larger Work." -So long as you comply with the requirements to provide Recipients the applicable -Notices and Access to the Source Code provided to You by Licensor, and you -provide Recipients access to their User Data and do not limit Recipient's -ability to independently work with their User Data, any other Software in -the Larger Work as well as the Larger Work as a whole may be licensed under -the terms of your choice. - - ## 5. Term and Termination - -The term of this License begins when You receive the Work, and continues until -terminated for any of the reasons described herein, or until all Licensor's -intellectual property rights in the Software expire, whichever comes first -("Term"). This License cannot be revoked, only terminated for the reasons -listed below. - - ### 5.1. Effect of Termination - -If this License is terminated for any reason, all permissions granted to You -under Section 3 by any Licensor automatically terminate. You will immediately -cease exercising any permissions granted in this License relative to the Work, -including as part of any Modified Work. - - ### 5.2. Termination for Non-Compliance; Reinstatement - -This License terminates automatically if You fail to comply with any of the -conditions in section 4. As a special exception to termination for non-compliance, -Your permissions for the Work under this License will automatically be reinstated -if You come into compliance with all the conditions in section 2 within sixty -(60) days of being notified by Licensor or an intended third-party beneficiary -of Your noncompliance. You are eligible for reinstatement of permissions for -the Work one time only, and only for the sixty days immediately after becoming -aware of noncompliance. Loss of permissions granted for the Work under this -License due to either a) sustained noncompliance lasting more than sixty days -or b) subsequent termination for noncompliance after reinstatement, is permanent, -unless rights are specifically restored by Licensor in writing. - - ### 5.3. Termination Due to Litigation - -If You initiate litigation against Licensor, or any Recipient of the Work, -either direct or indirect, asserting that the Work directly or indirectly -infringes any patent, then all permissions granted to You by this License -shall terminate. In the event of termination due to litigation, all permissions -validly granted by You under this License, directly or indirectly, shall survive -termination. Administrative review procedures, declaratory judgment actions, -counterclaims in response to patent litigation, and enforcement actions against -former Licensees terminated under this section do not cause termination due +## 1. Purpose + +This License gives You unlimited permission to use and modify the +software to which it applies (the "Work"), either as-is or in modified +form, for Your private purposes, while protecting the owners and +contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third +parties who receive the Work from you. If any non-affiliated third +party receives any part, aspect, or element of the Work from You, this +License requires that You provide that third party all the permissions +and materials needed to independently use and modify the Work without +that third party having a loss of data or capability due to your +actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The +rules of this License are both obligations of Your agreement with the +Licensor and conditions to your License. You must not do anything with +the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from +Licensor, as well as to any modifications, elaborations, or +implementations created by You that contain any licensable portion of +the Work (a "Modified Work"). Unless specified, any reference to the +Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and +organization. You show that you accept this License and agree to its +conditions by taking any action with the Work that, absent this +License, would infringe any intellectual property right held by +Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this +License places Your use of the Work outside the scope of the License +and infringes the intellectual property rights of the Licensor. In the +event of infringement, the terms and conditions of this License may be +enforced by Licensor under the intellectual property laws of any +jurisdiction to which You are subject. You also agree that either the +Licensor or a Recipient (as an intended third-party beneficiary) may +enforce the terms and conditions of this License against You via +specific performance. + +## 3. Permissions +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the +limitations of section 3.2, Licensor grants You the world-wide, +royalty-free, non-exclusive permission to: + ++ a) Take any action with the Work that would infringe the non-patent +intellectual property laws of any jurisdiction to which You are +subject; and + ++ b) claims that Licensor can license or becomes able to +license, to the extent that those claims are embodied in the Work as +distributed by Licensor. ### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section +3.1: + ++ a) Licensor does not grant any patent license for claims that are +only infringed due to modification of the Work as provided by +Licensor, or the combination of the Work as provided by Licensor, +directly or indirectly, with any other component, including other +software or hardware. + ++ b) Licensor does not grant any license to the trademarks, service +marks, or logos of Licensor, except to the extent necessary to comply +with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the +Work, or any part, aspect, or element of the Work, is distributed, +communicated, made available, or made perceptible to a non-Affiliate +third party (a "Recipient"), either via physical delivery or via a +network connection to the Recipient, You must comply with the +following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each +Recipient a copy of, or no-charge unrestricted network access to, the +Source Code corresponding to the Work ("Access"). + +The "Source Code" of the Work means the form of the Work preferred for +making modifications, including any comments, configuration +information, documentation, help materials, installation instructions, +cryptographic seeds or keys, and any information reasonably necessary +for the Recipient to independently compile and use the Source Code and +to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network Access to the Notices and Source Code may be provided by You +or by a third party, such as a public software repository, and must +persist during the same period in which You exercise any of the +permissions granted to You under this License and for at least one +year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each +Recipient of a Modified Work Access to Source Code corresponding to +those portions of the Work remaining in the Modified Work as well as +the modifications used by You to create the Modified Work. The Source +Code corresponding to the modifications in the Modified Work must be +provided to the Recipient either a) under this License, or b) under a +Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source +Initiative that allows object code created using both Source Code provided under +this License and Source Code provided under the other open source license to be +distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular +modification of the Work for up to ninety (90) days (the "Embargo +Period") if: + ++ a) the modification is intended to address a newly-identified +vulnerability or a security flaw in the Work, + ++ b) disclosure of the vulnerability or security flaw before the end +of the Embargo Period would put the data, identity, or autonomy of one +or more Recipients of the Work at significant risk, + ++ c) You are participating in a coordinated disclosure of the +vulnerability or security flaw with one or more additional Licensees, +and + ++ d) Access to the Source Code pertaining to the modification is +provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access +to the Source Code, You cannot use the permissions given under this +License to interfere with a Recipient's ability to fully use an +independent copy of the Work generated from the Source Code You +provide with the Recipient's own User Data. + +"User Data" means any data that is an input to or an output from the +Work, where the presence of the data is necessary for substantially +identical use of the Work in an equivalent context chosen by the +Recipient, and where the Recipient has an existing ownership interest, +an existing right to possess, or where the data has been generated by, +for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions +granted to You under this License, You must also provide to any +Recipient to whom you provide services via the Work, a no-charge copy, +provided in a commonly used electronic form, of the Recipient's User +Data in your possession, to the extent that such User Data is +available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by means of the use cryptographic methods applied to +anything provided to the Recipient, by possession or control of +cryptographic keys, seeds, hashes, by any other technological +protection measures, or by any other method, limit a Recipient's +ability to access any functionality present in Recipient's independent +copy of the Work, or to deny a Recipient full control of the +Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to +independently exercise the permissions granted under this License. You +waive any legal power to forbid circumvention of technical protection +measures that include use of the Work, and You waive any claim that +the capabilities of the Work were limited or modified as a means of +enforcing the legal rights of third parties against Recipients. + +### 4.3. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices +contained in the Source Code (the "Notices"), and provide all such +Notices to each Recipient, together with a statement acknowledging the +use of the Work. Notices may be provided directly to a Recipient or +via an easy-to-find hyperlink to an Internet location also providing +Access to Source Code. + +### 4.4. Scope of Conditions in this License + +You are required to uphold the conditions of this License only +relative to those who are Recipients of the Work from You. Other than +providing Recipients with the applicable Notices, Access to Source +Code, and a copy of and full control of their User Data, nothing in +this License requires You to provide processing services to or engage +in network interactions with anyone. + +### 4.5. Combined Work Exception + +As an exception to condition that You provide Recipients Access to +Source Code, any Source Code files marked by the Licensor as having +the "Combined Work Exception," or any object code exclusively +resulting from Source Code files so marked, may be combined with other +Software into a "Larger Work." So long as you comply with the +requirements to provide Recipients the applicable Notices and Access +to the Source Code provided to You by Licensor, and you provide +Recipients access to their User Data and do not limit Recipient's +ability to independently work with their User Data, any other Software +in the Larger Work as well as the Larger Work as a whole may be +licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and +continues until terminated for any of the reasons described herein, or +until all Licensor's intellectual property rights in the Software +expire, whichever comes first ("Term"). This License cannot be +revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted +to You under Section 3 by any Licensor automatically terminate. You +will immediately cease exercising any permissions granted in this +License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any +of the conditions in section 4. As a special exception to termination +for non-compliance, Your permissions for the Work under this License +will automatically be reinstated if You come into compliance with all +the conditions in section 2 within sixty (60) days of being notified +by Licensor or an intended third-party beneficiary of Your +noncompliance. You are eligible for reinstatement of permissions for +the Work one time only, and only for the sixty days immediately after +becoming aware of noncompliance. Loss of permissions granted for the +Work under this License due to either a) sustained noncompliance +lasting more than sixty days or b) subsequent termination for +noncompliance after reinstatement, is permanent, unless rights are +specifically restored by Licensor in writing. + +### 5.3. Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the +Work, either direct or indirect, asserting that the Work directly or +indirectly infringes any patent, then all permissions granted to You +by this License shall terminate. In the event of termination due to +litigation, all permissions validly granted by You under this License, +directly or indirectly, shall survive termination. Administrative +review procedures, declaratory judgment actions, counterclaims in +response to patent litigation, and enforcement actions against former +Licensees terminated under this section do not cause termination due to litigation. - ## 6. Disclaimer of Warranty and Limit on Liability +## 6. Disclaimer of Warranty and Limit on Liability -As far as the law allows, the Work comes AS-IS, without any warranty of any -kind, and no Licensor or contributor will be liable to anyone for any damages -related to this software or this license, under any kind of legal claim, or -for any type of damages, including indirect, special, incidental, or consequential -damages of any type arising as a result of this License or the use of the -Work including, without limitation, damages for loss of goodwill, work stoppage, -computer failure or malfunction, loss of profits, revenue, or any and all -other commercial damages or losses. +As far as the law allows, the Work comes AS-IS, without any warranty +of any kind, and no Licensor or contributor will be liable to anyone +for any damages related to this software or this license, under any +kind of legal claim, or for any type of damages, including indirect, +special, incidental, or consequential damages of any type arising as a +result of this License or the use of the Work including, without +limitation, damages for loss of goodwill, work stoppage, computer +failure or malfunction, loss of profits, revenue, or any and all other +commercial damages or losses. - ## 7. Other Provisions +## 7. Other Provisions +### 7.1. Affiliates - +An "Affiliate" means any other entity that, directly or indirectly +through one or more intermediaries, controls, is controlled by, or is +under common control with, the Licensee. Employees of a Licensee and +natural persons acting as contractors exclusively providing services +to Licensee are also Affiliates. - ### 7.1. Affiliates +### 7.2. Choice of Jurisdiction and Governing Law -An "Affiliate" means any other entity that, directly or indirectly through -one or more intermediaries, controls, is controlled by, or is under common -control with, the Licensee. Employees of a Licensee and natural persons acting -as contractors exclusively providing services to Licensee are also Affiliates. +A Licensor may require that any action or suit by a Licensee relating +to a Work provided by Licensor under this License may be brought only +in the courts of a particular jurisdiction and under the laws of a +particular jurisdiction (excluding its conflict-of-law provisions), if +Licensor provides conspicuous notice of the particular jurisdiction to +all Licensees. - ### 7.2. Choice of Jurisdiction and Governing Law +### 7.3. No Sublicensing -A Licensor may require that any action or suit by a Licensee relating to a -Work provided by Licensor under this License may be brought only in the courts -of a particular jurisdiction and under the laws of a particular jurisdiction -(excluding its conflict-of-law provisions), if Licensor provides conspicuous -notice of the particular jurisdiction to all Licensees. +This License is not sublicensable. Each time You provide the Work or a +Modified Work to a Recipient, the Recipient automatically receives a +license under the terms described in this License. You may not impose +any further reservations, conditions, or other provisions on any +Recipients' exercise of the permissions granted herein. - ### 7.3. No Sublicensing +### 7.4. Attorneys' Fees -This License is not sublicensable. Each time You provide the Work or a Modified -Work to a Recipient, the Recipient automatically receives a license under -the terms described in this License. You may not impose any further reservations, -conditions, or other provisions on any Recipients' exercise of the permissions -granted herein. +In any action to enforce the terms of this License, or seeking damages +relating thereto, including by an intended third-party beneficiary, +the prevailing party shall be entitled to recover its costs and +expenses, including, without limitation, reasonable attorneys' fees +and costs incurred in connection with such action, including any +appeal of such action. A "prevailing party" is the party that +achieves, or avoids, compliance with this License, including through +settlement. This section shall survive the termination of this +License. - ### 7.4. Attorneys' Fees +### 7.5. No Waiver -In any action to enforce the terms of this License, or seeking damages relating -thereto, including by an intended third-party beneficiary, the prevailing -party shall be entitled to recover its costs and expenses, including, without -limitation, reasonable attorneys' fees and costs incurred in connection with -such action, including any appeal of such action. A "prevailing party" is -the party that achieves, or avoids, compliance with this License, including -through settlement. This section shall survive the termination of this License. +Any failure by Licensor to enforce any provision of this License will +not constitute a present or future waiver of such provision nor limit +Licensor's ability to enforce such provision at a later time. - ### 7.5. No Waiver +### 7.6. Severability -Any failure by Licensor to enforce any provision of this License will not -constitute a present or future waiver of such provision nor limit Licensor's -ability to enforce such provision at a later time. +If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it +enforceable. Any invalid or unenforceable portion will be interpreted +to the effect and intent of the original portion. If such a +construction is not possible, the invalid or unenforceable portion +will be severed from this License but the rest of this License will +remain in full force and effect. - ### 7.6. Severability +### 7.7. License for the Text of this License -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. Any -invalid or unenforceable portion will be interpreted to the effect and intent -of the original portion. If such a construction is not possible, the invalid -or unenforceable portion will be severed from this License but the rest of -this License will remain in full force and effect. - - ### 7.7. License for the Text of this License - -The text of this license is released under the Creative Commons Attribution-ShareAlike -4.0 International License, with the caveat that any modifications of this -license may not use the name "Cryptographic Autonomy License" or any name -confusingly similar thereto to describe any derived work of this License. +The text of this license is released under the Creative Commons +Attribution-ShareAlike 4.0 International License, with the caveat that +any modifications of this license may not use the name "Cryptographic +Autonomy License" or any name confusingly similar thereto to describe +any derived work of this License. diff --git a/options/license/CAL-1.0-Combined-Work-Exception b/options/license/CAL-1.0-Combined-Work-Exception index 538f9d961..4cebc6d54 100644 --- a/options/license/CAL-1.0-Combined-Work-Exception +++ b/options/license/CAL-1.0-Combined-Work-Exception @@ -1,352 +1,354 @@ # The Cryptographic Autonomy License, v. 1.0 -*This Cryptographic Autonomy License (the "License") applies to any Work whose -owner has marked it with any of the following notices, or a similar demonstration -of intent: * - - +*This Cryptographic Autonomy License (the "License") applies to any +Work whose owner has marked it with any of the following notices, or a +similar demonstration of intent:* SPDX-License-Identifier: CAL-1.0 - Licensed under the Cryptographic Autonomy License version 1.0 - - *or* - - SPDX-License-Identifier: CAL-1.0-Combined-Work-Exception - -Licensed under the Cryptographic Autonomy License version 1.0, with Combined -Work Exception +Licensed under the Cryptographic Autonomy License version 1.0, with +Combined Work Exception ______________________________________________________________________ - - - ## 1. Purpose - -This License gives You unlimited permission to use and modify the software -to which it applies (the "Work"), either as-is or in modified form, for Your -private purposes, while protecting the owners and contributors to the software -from liability. - -This License also strives to protect the freedom and autonomy of third parties -who receive the Work from you. If any non-affiliated third party receives -any part, aspect, or element of the Work from You, this License requires that -You provide that third party all the permissions and materials needed to independently -use and modify the Work without that third party having a loss of data or -capability due to your actions. - - The full permissions, conditions, and other terms are laid out below. - - ## 2. Receiving a License - -In order to receive this License, You must agree to its rules. The rules of -this License are both obligations of Your agreement with the Licensor and -conditions to your License. You must not do anything with the Work that triggers -a rule You cannot or will not follow. - - ### 2.1. Application - -The terms of this License apply to the Work as you receive it from Licensor, -as well as to any modifications, elaborations, or implementations created -by You that contain any licensable portion of the Work (a "Modified Work"). -Unless specified, any reference to the Work also applies to a Modified Work. - - ### 2.2. Offer and Acceptance - -This License is automatically offered to every person and organization. You -show that you accept this License and agree to its conditions by taking any -action with the Work that, absent this License, would infringe any intellectual -property right held by Licensor. - - ### 2.3. Compliance and Remedies - -Any failure to act according to the terms and conditions of this License places -Your use of the Work outside the scope of the License and infringes the intellectual -property rights of the Licensor. In the event of infringement, the terms and -conditions of this License may be enforced by Licensor under the intellectual -property laws of any jurisdiction to which You are subject. You also agree -that either the Licensor or a Recipient (as an intended third-party beneficiary) -may enforce the terms and conditions of this License against You via specific -performance. - - ## 3. Permissions - - - - ### 3.1. Permissions Granted - -Conditioned on compliance with section 4, and subject to the limitations of -section 3.2, Licensor grants You the world-wide, royalty-free, non-exclusive -permission to: - -+ a) Take any action with the Work that would infringe the non-patent intellectual -property laws of any jurisdiction to which You are subject; and - -+ b) claims that Licensor can license or becomes able to license, to the extent -that those claims are embodied in the Work as distributed by Licensor. - - ### 3.2. Limitations on Permissions Granted - -The following limitations apply to the permissions granted in section 3.1: - - - -+ a) Licensor does not grant any patent license for claims that are only infringed -due to modification of the Work as provided by Licensor, or the combination -of the Work as provided by Licensor, directly or indirectly, with any other -component, including other software or hardware. - - - -+ b) Licensor does not grant any license to the trademarks, service marks, -or logos of Licensor, except to the extent necessary to comply with the attribution -conditions in section 4.1 of this License. - - ## 4. Conditions - -If You exercise any permission granted by this License, such that the Work, -or any part, aspect, or element of the Work, is distributed, communicated, -made available, or made perceptible to a non-Affiliate third party (a "Recipient"), -either via physical delivery or via a network connection to the Recipient, -You must comply with the following conditions: - - ### 4.1. Provide Access to Source Code - -Subject to the exception in section 4.4, You must provide to each Recipient -a copy of, or no-charge unrestricted network access to, the Source Code corresponding -to the Work ("Access"). - -The "Source Code" of the Work means the form of the Work preferred for making -modifications, including any comments, configuration information, documentation, -help materials, installation instructions, cryptographic seeds or keys, and -any information reasonably necessary for the Recipient to independently compile -and use the Source Code and to have full access to the functionality contained -in the Work. - - #### 4.1.1. Providing Network Access to the Source Code - -Network Access to the Notices and Source Code may be provided by You or by -a third party, such as a public software repository, and must persist during -the same period in which You exercise any of the permissions granted to You -under this License and for at least one year thereafter. - - #### 4.1.2. Source Code for a Modified Work - -Subject to the exception in section 4.5, You must provide to each Recipient -of a Modified Work Access to Source Code corresponding to those portions of -the Work remaining in the Modified Work as well as the modifications used -by You to create the Modified Work. The Source Code corresponding to the modifications -in the Modified Work must be provided to the Recipient either a) under this -License, or b) under a Compatible Open Source License. - - #### 4.1.3. Coordinated Disclosure of Security Vulnerabilities - -You may delay providing the Source Code corresponding to a particular modification -of the Work for up to ninety (90) days (the "Embargo Period") if: - - - -+ a) the modification is intended to address a newly-identified vulnerability -or a security flaw in the Work, - - - -+ b) disclosure of the vulnerability or security flaw before the end of the -Embargo Period would put the data, identity, or autonomy of one or more Recipients -of the Work at significant risk, - - - -+ c) You are participating in a coordinated disclosure of the vulnerability -or security flaw with one or more additional Licensees, and - - - -+ d) Access to the Source Code pertaining to the modification is provided -to all Recipients at the end of the Embargo Period. - - ### 4.2. Maintain User Autonomy - -In addition to providing each Recipient the opportunity to have Access to -the Source Code, You cannot use the permissions given under this License to -interfere with a Recipient's ability to fully use an independent copy of the -Work generated from the Source Code You provide with the Recipient's own User -Data. - -"User Data" means any data that is an input to or an output from the Work, -where the presence of the data is necessary for substantially identical use -of the Work in an equivalent context chosen by the Recipient, and where the -Recipient has an existing ownership interest, an existing right to possess, -or where the data has been generated by, for, or has been assigned to the -Recipient. - - #### 4.2.1. No Withholding User Data - -Throughout any period in which You exercise any of the permissions granted -to You under this License, You must also provide to any Recipient to whom -you provide services via the Work, a no-charge copy, provided in a commonly -used electronic form, of the Recipient's User Data in your possession, to -the extent that such User Data is available to You for use in conjunction -with the Work. - - #### 4.2.2. No Technical Measures that Limit Access - -You may not, by means of the use cryptographic methods applied to anything -provided to the Recipient, by possession or control of cryptographic keys, -seeds, hashes, by any other technological protection measures, or by any other -method, limit a Recipient's ability to access any functionality present in -Recipient's independent copy of the Work, or to deny a Recipient full control -of the Recipient's User Data. - - #### 4.2.3. No Legal or Contractual Measures that Limit Access - -You may not contractually restrict a Recipient's ability to independently -exercise the permissions granted under this License. You waive any legal power -to forbid circumvention of technical protection measures that include use -of the Work, and You waive any claim that the capabilities of the Work were -limited or modified as a means of enforcing the legal rights of third parties -against Recipients. - - ### 4.3. Provide Notices and Attribution - -You must retain all licensing, authorship, or attribution notices contained -in the Source Code (the "Notices"), and provide all such Notices to each Recipient, -together with a statement acknowledging the use of the Work. Notices may be -provided directly to a Recipient or via an easy-to-find hyperlink to an Internet -location also providing Access to Source Code. - - ### 4.4. Scope of Conditions in this License - -You are required to uphold the conditions of this License only relative to -those who are Recipients of the Work from You. Other than providing Recipients -with the applicable Notices, Access to Source Code, and a copy of and full -control of their User Data, nothing in this License requires You to provide -processing services to or engage in network interactions with anyone. - - ### 4.5. Combined Work Exception - -As an exception to condition that You provide Recipients Access to Source -Code, any Source Code files marked by the Licensor as having the "Combined -Work Exception," or any object code exclusively resulting from Source Code -files so marked, may be combined with other Software into a "Larger Work." -So long as you comply with the requirements to provide Recipients the applicable -Notices and Access to the Source Code provided to You by Licensor, and you -provide Recipients access to their User Data and do not limit Recipient's -ability to independently work with their User Data, any other Software in -the Larger Work as well as the Larger Work as a whole may be licensed under -the terms of your choice. - - ## 5. Term and Termination - -The term of this License begins when You receive the Work, and continues until -terminated for any of the reasons described herein, or until all Licensor's -intellectual property rights in the Software expire, whichever comes first -("Term"). This License cannot be revoked, only terminated for the reasons -listed below. - - ### 5.1. Effect of Termination - -If this License is terminated for any reason, all permissions granted to You -under Section 3 by any Licensor automatically terminate. You will immediately -cease exercising any permissions granted in this License relative to the Work, -including as part of any Modified Work. - - ### 5.2. Termination for Non-Compliance; Reinstatement - -This License terminates automatically if You fail to comply with any of the -conditions in section 4. As a special exception to termination for non-compliance, -Your permissions for the Work under this License will automatically be reinstated -if You come into compliance with all the conditions in section 2 within sixty -(60) days of being notified by Licensor or an intended third-party beneficiary -of Your noncompliance. You are eligible for reinstatement of permissions for -the Work one time only, and only for the sixty days immediately after becoming -aware of noncompliance. Loss of permissions granted for the Work under this -License due to either a) sustained noncompliance lasting more than sixty days -or b) subsequent termination for noncompliance after reinstatement, is permanent, -unless rights are specifically restored by Licensor in writing. - - ### 5.3. Termination Due to Litigation - -If You initiate litigation against Licensor, or any Recipient of the Work, -either direct or indirect, asserting that the Work directly or indirectly -infringes any patent, then all permissions granted to You by this License -shall terminate. In the event of termination due to litigation, all permissions -validly granted by You under this License, directly or indirectly, shall survive -termination. Administrative review procedures, declaratory judgment actions, -counterclaims in response to patent litigation, and enforcement actions against -former Licensees terminated under this section do not cause termination due +## 1. Purpose + +This License gives You unlimited permission to use and modify the +software to which it applies (the "Work"), either as-is or in modified +form, for Your private purposes, while protecting the owners and +contributors to the software from liability. + +This License also strives to protect the freedom and autonomy of third +parties who receive the Work from you. If any non-affiliated third +party receives any part, aspect, or element of the Work from You, this +License requires that You provide that third party all the permissions +and materials needed to independently use and modify the Work without +that third party having a loss of data or capability due to your +actions. + +The full permissions, conditions, and other terms are laid out below. + +## 2. Receiving a License + +In order to receive this License, You must agree to its rules. The +rules of this License are both obligations of Your agreement with the +Licensor and conditions to your License. You must not do anything with +the Work that triggers a rule You cannot or will not follow. + +### 2.1. Application + +The terms of this License apply to the Work as you receive it from +Licensor, as well as to any modifications, elaborations, or +implementations created by You that contain any licensable portion of +the Work (a "Modified Work"). Unless specified, any reference to the +Work also applies to a Modified Work. + +### 2.2. Offer and Acceptance + +This License is automatically offered to every person and +organization. You show that you accept this License and agree to its +conditions by taking any action with the Work that, absent this +License, would infringe any intellectual property right held by +Licensor. + +### 2.3. Compliance and Remedies + +Any failure to act according to the terms and conditions of this +License places Your use of the Work outside the scope of the License +and infringes the intellectual property rights of the Licensor. In the +event of infringement, the terms and conditions of this License may be +enforced by Licensor under the intellectual property laws of any +jurisdiction to which You are subject. You also agree that either the +Licensor or a Recipient (as an intended third-party beneficiary) may +enforce the terms and conditions of this License against You via +specific performance. + +## 3. Permissions +### 3.1. Permissions Granted + +Conditioned on compliance with section 4, and subject to the +limitations of section 3.2, Licensor grants You the world-wide, +royalty-free, non-exclusive permission to: + ++ a) Take any action with the Work that would infringe the non-patent +intellectual property laws of any jurisdiction to which You are +subject; and + ++ b) claims that Licensor can license or becomes able to +license, to the extent that those claims are embodied in the Work as +distributed by Licensor. ### 3.2. Limitations on Permissions Granted + +The following limitations apply to the permissions granted in section +3.1: + ++ a) Licensor does not grant any patent license for claims that are +only infringed due to modification of the Work as provided by +Licensor, or the combination of the Work as provided by Licensor, +directly or indirectly, with any other component, including other +software or hardware. + ++ b) Licensor does not grant any license to the trademarks, service +marks, or logos of Licensor, except to the extent necessary to comply +with the attribution conditions in section 4.1 of this License. + +## 4. Conditions + +If You exercise any permission granted by this License, such that the +Work, or any part, aspect, or element of the Work, is distributed, +communicated, made available, or made perceptible to a non-Affiliate +third party (a "Recipient"), either via physical delivery or via a +network connection to the Recipient, You must comply with the +following conditions: + +### 4.1. Provide Access to Source Code + +Subject to the exception in section 4.4, You must provide to each +Recipient a copy of, or no-charge unrestricted network access to, the +Source Code corresponding to the Work ("Access"). + +The "Source Code" of the Work means the form of the Work preferred for +making modifications, including any comments, configuration +information, documentation, help materials, installation instructions, +cryptographic seeds or keys, and any information reasonably necessary +for the Recipient to independently compile and use the Source Code and +to have full access to the functionality contained in the Work. + +#### 4.1.1. Providing Network Access to the Source Code + +Network Access to the Notices and Source Code may be provided by You +or by a third party, such as a public software repository, and must +persist during the same period in which You exercise any of the +permissions granted to You under this License and for at least one +year thereafter. + +#### 4.1.2. Source Code for a Modified Work + +Subject to the exception in section 4.5, You must provide to each +Recipient of a Modified Work Access to Source Code corresponding to +those portions of the Work remaining in the Modified Work as well as +the modifications used by You to create the Modified Work. The Source +Code corresponding to the modifications in the Modified Work must be +provided to the Recipient either a) under this License, or b) under a +Compatible Open Source License. + +A “Compatible Open Source License” means a license accepted by the Open Source +Initiative that allows object code created using both Source Code provided under +this License and Source Code provided under the other open source license to be +distributed together as a single work. + +#### 4.1.3. Coordinated Disclosure of Security Vulnerabilities + +You may delay providing the Source Code corresponding to a particular +modification of the Work for up to ninety (90) days (the "Embargo +Period") if: + ++ a) the modification is intended to address a newly-identified +vulnerability or a security flaw in the Work, + ++ b) disclosure of the vulnerability or security flaw before the end +of the Embargo Period would put the data, identity, or autonomy of one +or more Recipients of the Work at significant risk, + ++ c) You are participating in a coordinated disclosure of the +vulnerability or security flaw with one or more additional Licensees, +and + ++ d) Access to the Source Code pertaining to the modification is +provided to all Recipients at the end of the Embargo Period. + +### 4.2. Maintain User Autonomy + +In addition to providing each Recipient the opportunity to have Access +to the Source Code, You cannot use the permissions given under this +License to interfere with a Recipient's ability to fully use an +independent copy of the Work generated from the Source Code You +provide with the Recipient's own User Data. + +"User Data" means any data that is an input to or an output from the +Work, where the presence of the data is necessary for substantially +identical use of the Work in an equivalent context chosen by the +Recipient, and where the Recipient has an existing ownership interest, +an existing right to possess, or where the data has been generated by, +for, or has been assigned to the Recipient. + +#### 4.2.1. No Withholding User Data + +Throughout any period in which You exercise any of the permissions +granted to You under this License, You must also provide to any +Recipient to whom you provide services via the Work, a no-charge copy, +provided in a commonly used electronic form, of the Recipient's User +Data in your possession, to the extent that such User Data is +available to You for use in conjunction with the Work. + +#### 4.2.2. No Technical Measures that Limit Access + +You may not, by means of the use cryptographic methods applied to +anything provided to the Recipient, by possession or control of +cryptographic keys, seeds, hashes, by any other technological +protection measures, or by any other method, limit a Recipient's +ability to access any functionality present in Recipient's independent +copy of the Work, or to deny a Recipient full control of the +Recipient's User Data. + +#### 4.2.3. No Legal or Contractual Measures that Limit Access + +You may not contractually restrict a Recipient's ability to +independently exercise the permissions granted under this License. You +waive any legal power to forbid circumvention of technical protection +measures that include use of the Work, and You waive any claim that +the capabilities of the Work were limited or modified as a means of +enforcing the legal rights of third parties against Recipients. + +### 4.3. Provide Notices and Attribution + +You must retain all licensing, authorship, or attribution notices +contained in the Source Code (the "Notices"), and provide all such +Notices to each Recipient, together with a statement acknowledging the +use of the Work. Notices may be provided directly to a Recipient or +via an easy-to-find hyperlink to an Internet location also providing +Access to Source Code. + +### 4.4. Scope of Conditions in this License + +You are required to uphold the conditions of this License only +relative to those who are Recipients of the Work from You. Other than +providing Recipients with the applicable Notices, Access to Source +Code, and a copy of and full control of their User Data, nothing in +this License requires You to provide processing services to or engage +in network interactions with anyone. + +### 4.5. Combined Work Exception + +As an exception to condition that You provide Recipients Access to +Source Code, any Source Code files marked by the Licensor as having +the "Combined Work Exception," or any object code exclusively +resulting from Source Code files so marked, may be combined with other +Software into a "Larger Work." So long as you comply with the +requirements to provide Recipients the applicable Notices and Access +to the Source Code provided to You by Licensor, and you provide +Recipients access to their User Data and do not limit Recipient's +ability to independently work with their User Data, any other Software +in the Larger Work as well as the Larger Work as a whole may be +licensed under the terms of your choice. + +## 5. Term and Termination + +The term of this License begins when You receive the Work, and +continues until terminated for any of the reasons described herein, or +until all Licensor's intellectual property rights in the Software +expire, whichever comes first ("Term"). This License cannot be +revoked, only terminated for the reasons listed below. + +### 5.1. Effect of Termination + +If this License is terminated for any reason, all permissions granted +to You under Section 3 by any Licensor automatically terminate. You +will immediately cease exercising any permissions granted in this +License relative to the Work, including as part of any Modified Work. + +### 5.2. Termination for Non-Compliance; Reinstatement + +This License terminates automatically if You fail to comply with any +of the conditions in section 4. As a special exception to termination +for non-compliance, Your permissions for the Work under this License +will automatically be reinstated if You come into compliance with all +the conditions in section 2 within sixty (60) days of being notified +by Licensor or an intended third-party beneficiary of Your +noncompliance. You are eligible for reinstatement of permissions for +the Work one time only, and only for the sixty days immediately after +becoming aware of noncompliance. Loss of permissions granted for the +Work under this License due to either a) sustained noncompliance +lasting more than sixty days or b) subsequent termination for +noncompliance after reinstatement, is permanent, unless rights are +specifically restored by Licensor in writing. + +### 5.3. Termination Due to Litigation + +If You initiate litigation against Licensor, or any Recipient of the +Work, either direct or indirect, asserting that the Work directly or +indirectly infringes any patent, then all permissions granted to You +by this License shall terminate. In the event of termination due to +litigation, all permissions validly granted by You under this License, +directly or indirectly, shall survive termination. Administrative +review procedures, declaratory judgment actions, counterclaims in +response to patent litigation, and enforcement actions against former +Licensees terminated under this section do not cause termination due to litigation. - ## 6. Disclaimer of Warranty and Limit on Liability +## 6. Disclaimer of Warranty and Limit on Liability -As far as the law allows, the Work comes AS-IS, without any warranty of any -kind, and no Licensor or contributor will be liable to anyone for any damages -related to this software or this license, under any kind of legal claim, or -for any type of damages, including indirect, special, incidental, or consequential -damages of any type arising as a result of this License or the use of the -Work including, without limitation, damages for loss of goodwill, work stoppage, -computer failure or malfunction, loss of profits, revenue, or any and all -other commercial damages or losses. +As far as the law allows, the Work comes AS-IS, without any warranty +of any kind, and no Licensor or contributor will be liable to anyone +for any damages related to this software or this license, under any +kind of legal claim, or for any type of damages, including indirect, +special, incidental, or consequential damages of any type arising as a +result of this License or the use of the Work including, without +limitation, damages for loss of goodwill, work stoppage, computer +failure or malfunction, loss of profits, revenue, or any and all other +commercial damages or losses. - ## 7. Other Provisions +## 7. Other Provisions +### 7.1. Affiliates - +An "Affiliate" means any other entity that, directly or indirectly +through one or more intermediaries, controls, is controlled by, or is +under common control with, the Licensee. Employees of a Licensee and +natural persons acting as contractors exclusively providing services +to Licensee are also Affiliates. - ### 7.1. Affiliates +### 7.2. Choice of Jurisdiction and Governing Law -An "Affiliate" means any other entity that, directly or indirectly through -one or more intermediaries, controls, is controlled by, or is under common -control with, the Licensee. Employees of a Licensee and natural persons acting -as contractors exclusively providing services to Licensee are also Affiliates. +A Licensor may require that any action or suit by a Licensee relating +to a Work provided by Licensor under this License may be brought only +in the courts of a particular jurisdiction and under the laws of a +particular jurisdiction (excluding its conflict-of-law provisions), if +Licensor provides conspicuous notice of the particular jurisdiction to +all Licensees. - ### 7.2. Choice of Jurisdiction and Governing Law +### 7.3. No Sublicensing -A Licensor may require that any action or suit by a Licensee relating to a -Work provided by Licensor under this License may be brought only in the courts -of a particular jurisdiction and under the laws of a particular jurisdiction -(excluding its conflict-of-law provisions), if Licensor provides conspicuous -notice of the particular jurisdiction to all Licensees. +This License is not sublicensable. Each time You provide the Work or a +Modified Work to a Recipient, the Recipient automatically receives a +license under the terms described in this License. You may not impose +any further reservations, conditions, or other provisions on any +Recipients' exercise of the permissions granted herein. - ### 7.3. No Sublicensing +### 7.4. Attorneys' Fees -This License is not sublicensable. Each time You provide the Work or a Modified -Work to a Recipient, the Recipient automatically receives a license under -the terms described in this License. You may not impose any further reservations, -conditions, or other provisions on any Recipients' exercise of the permissions -granted herein. +In any action to enforce the terms of this License, or seeking damages +relating thereto, including by an intended third-party beneficiary, +the prevailing party shall be entitled to recover its costs and +expenses, including, without limitation, reasonable attorneys' fees +and costs incurred in connection with such action, including any +appeal of such action. A "prevailing party" is the party that +achieves, or avoids, compliance with this License, including through +settlement. This section shall survive the termination of this +License. - ### 7.4. Attorneys' Fees +### 7.5. No Waiver -In any action to enforce the terms of this License, or seeking damages relating -thereto, including by an intended third-party beneficiary, the prevailing -party shall be entitled to recover its costs and expenses, including, without -limitation, reasonable attorneys' fees and costs incurred in connection with -such action, including any appeal of such action. A "prevailing party" is -the party that achieves, or avoids, compliance with this License, including -through settlement. This section shall survive the termination of this License. +Any failure by Licensor to enforce any provision of this License will +not constitute a present or future waiver of such provision nor limit +Licensor's ability to enforce such provision at a later time. - ### 7.5. No Waiver +### 7.6. Severability -Any failure by Licensor to enforce any provision of this License will not -constitute a present or future waiver of such provision nor limit Licensor's -ability to enforce such provision at a later time. +If any provision of this License is held to be unenforceable, such +provision shall be reformed only to the extent necessary to make it +enforceable. Any invalid or unenforceable portion will be interpreted +to the effect and intent of the original portion. If such a +construction is not possible, the invalid or unenforceable portion +will be severed from this License but the rest of this License will +remain in full force and effect. - ### 7.6. Severability +### 7.7. License for the Text of this License -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. Any -invalid or unenforceable portion will be interpreted to the effect and intent -of the original portion. If such a construction is not possible, the invalid -or unenforceable portion will be severed from this License but the rest of -this License will remain in full force and effect. - - ### 7.7. License for the Text of this License - -The text of this license is released under the Creative Commons Attribution-ShareAlike -4.0 International License, with the caveat that any modifications of this -license may not use the name "Cryptographic Autonomy License" or any name -confusingly similar thereto to describe any derived work of this License. +The text of this license is released under the Creative Commons +Attribution-ShareAlike 4.0 International License, with the caveat that +any modifications of this license may not use the name "Cryptographic +Autonomy License" or any name confusingly similar thereto to describe +any derived work of this License. diff --git a/options/license/CATOSL-1.1 b/options/license/CATOSL-1.1 index d53787c1d..4ba00492b 100644 --- a/options/license/CATOSL-1.1 +++ b/options/license/CATOSL-1.1 @@ -1,330 +1,114 @@ Computer Associates Trusted Open Source License - Version 1.1 -PLEASE READ THIS DOCUMENT CAREFULLY AND IN ITS ENTIRETY. THE ACCOMPANYING -PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMPUTER ASSOCIATES TRUSTED OPEN -SOURCE LICENSE ("LICENSE"). ANY USE, REPRODUCTION, MODIFICATION OR DISTRIBUTION -OF THE PROGRAM CONSTITUTES THE RECIPIENT'S ACCEPTANCE OF THIS LICENSE. +PLEASE READ THIS DOCUMENT CAREFULLY AND IN ITS ENTIRETY. THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMPUTER ASSOCIATES TRUSTED OPEN SOURCE LICENSE ("LICENSE"). ANY USE, REPRODUCTION, MODIFICATION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES THE RECIPIENT'S ACCEPTANCE OF THIS LICENSE. License Background -Computer Associates International, Inc. (CA) believes in open source. We believe -that the open source development approach can take appropriate software programs -to unprecedented levels of quality, growth, and innovation. To demonstrate -our continuing commitment to open source, we are releasing the Program (as -defined below) under this License. +Computer Associates International, Inc. (CA) believes in open source. We believe that the open source development approach can take appropriate software programs to unprecedented levels of quality, growth, and innovation. To demonstrate our continuing commitment to open source, we are releasing the Program (as defined below) under this License. -This License is intended to permit contributors and recipients of the Program -to use the Program, including its source code, freely and without many of -the concerns of some other open source licenses. Although we expect the underlying -Program, and Contributions (as defined below) made to such Program, to remain -open, this License is designed to permit you to maintain your own software -programs free of this License unless you choose to do so. Thus, only your -Contributions to the Program must be distributed under the terms of this License. +This License is intended to permit contributors and recipients of the Program to use the Program, including its source code, freely and without many of the concerns of some other open source licenses. Although we expect the underlying Program, and Contributions (as defined below) made to such Program, to remain open, this License is designed to permit you to maintain your own software programs free of this License unless you choose to do so. Thus, only your Contributions to the Program must be distributed under the terms of this License. -The provisions that follow set forth the terms and conditions under which -you may use the Program. +The provisions that follow set forth the terms and conditions under which you may use the Program. - 1. DEFINITIONS +1. DEFINITIONS -1.1 Contribution means (a) in the case of CA, the Original Program; and (b) -in the case of each Contributor (including CA), changes and additions to the -Program, where such changes and/or additions to the Program originate from -and are distributed by that particular Contributor to unaffiliated third parties. -A Contribution originates from a Contributor if it was added to the Program -by such Contributor itself or anyone acting on such Contributors behalf. Contributions -do not include additions to the Program which: (x) are separate modules of -software distributed in conjunction with the Program under their own license -agreement, and (y) are not derivative works of the Program. +1.1 Contribution means (a) in the case of CA, the Original Program; and (b) in the case of each Contributor (including CA), changes and additions to the Program, where such changes and/or additions to the Program originate from and are distributed by that particular Contributor to unaffiliated third parties. A Contribution originates from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributors behalf. Contributions do not include additions to the Program which: (x) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (y) are not derivative works of the Program. -1.2 Contributor means CA and any other person or entity that distributes the -Program. +1.2 Contributor means CA and any other person or entity that distributes the Program. -1.3 Contributor Version means as to a Contributor, that version of the Program -that includes the Contributors Contribution but not any Contributions made -to the Program thereafter. +1.3 Contributor Version means as to a Contributor, that version of the Program that includes the Contributors Contribution but not any Contributions made to the Program thereafter. -1.4 Larger Work means a work that combines the Program or portions thereof -with code not governed by the terms of this License. +1.4 Larger Work means a work that combines the Program or portions thereof with code not governed by the terms of this License. -1.5 Licensed Patents mean patents licensable by a Contributor that are infringed -by the use or sale of its Contribution alone or when combined with the Program. +1.5 Licensed Patents mean patents licensable by a Contributor that are infringed by the use or sale of its Contribution alone or when combined with the Program. -1.6 Original Program means the original version of the software to which this -License is attached and as released by CA, including source code, object code -and documentation, if any. +1.6 Original Program means the original version of the software to which this License is attached and as released by CA, including source code, object code and documentation, if any. - 1.7 Program means the Original Program and Contributions. +1.7 Program means the Original Program and Contributions. 1.8 Recipient means anyone who modifies, copies, uses or distributes the Program. - 2. GRANT OF RIGHTS +2. GRANT OF RIGHTS -2.1 Subject to the terms of this License, each Contributor hereby grants Recipient -an irrevocable, non-exclusive, worldwide, royalty-free license to reproduce, -prepare derivative works of, publicly display, publicly perform, distribute -and sublicense the Contribution of such Contributor, if any, and such derivative -works, in source code and object code form. For the avoidance of doubt, the -license provided in this Section 2.1 shall not include a license to any Licensed -Patents of a Contributor. +2.1 Subject to the terms of this License, each Contributor hereby grants Recipient an irrevocable, non-exclusive, worldwide, royalty-free license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. For the avoidance of doubt, the license provided in this Section 2.1 shall not include a license to any Licensed Patents of a Contributor. -2.2 Subject to the terms of this License, each Contributor hereby grants Recipient -an irrevocable, non-exclusive, worldwide, royalty-free license to the Licensed -Patents to the extent necessary to make, use, sell, offer to sell and import -the Contribution of such Contributor, if any, in source code and object code -form. The license granted in this Section 2.2 shall apply to the combination -of the Contribution and the Program if, at the time the Contribution is added -by the Contributor, such addition of the Contribution causes the Licensed -Patents to be infringed by such combination. Notwithstanding the foregoing, -no license is granted under this Section 2.2: (a) for any code or works that -do not include the Contributor Version, as it exists and is used in accordance -with the terms hereof; (b) for infringements caused by: (i) third party modifications -of the Contributor Version; or (ii) the combination of Contributions made -by each such Contributor with other software (except as part of the Contributor -Version) or other devices; or (c) with respect to Licensed Patents infringed -by the Program in the absence of Contributions made by that Contributor. +2.2 Subject to the terms of this License, each Contributor hereby grants Recipient an irrevocable, non-exclusive, worldwide, royalty-free license to the Licensed Patents to the extent necessary to make, use, sell, offer to sell and import the Contribution of such Contributor, if any, in source code and object code form. The license granted in this Section 2.2 shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes the Licensed Patents to be infringed by such combination. Notwithstanding the foregoing, no license is granted under this Section 2.2: (a) for any code or works that do not include the Contributor Version, as it exists and is used in accordance with the terms hereof; (b) for infringements caused by: (i) third party modifications of the Contributor Version; or (ii) the combination of Contributions made by each such Contributor with other software (except as part of the Contributor Version) or other devices; or (c) with respect to Licensed Patents infringed by the Program in the absence of Contributions made by that Contributor. -2.3 Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, except as provided in Section 2.4, -no assurances are provided by any Contributor that the Program does not infringe -the patent or other intellectual property rights of any other person or entity. -Each Contributor disclaims any liability to Recipient for claims brought by -any other person or entity based on infringement of intellectual property -rights or otherwise. As a condition to exercising the rights and licenses -granted hereunder, each Recipient hereby assumes sole responsibility to secure -any other intellectual property rights needed, if any. +2.3 Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, except as provided in Section 2.4, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other person or entity. Each Contributor disclaims any liability to Recipient for claims brought by any other person or entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. -2.4 Each Contributor represents and warrants that it has all right, title -and interest in the copyrights in its Contributions, and has the right to -grant the copyright licenses set forth in this License. +2.4 Each Contributor represents and warrants that it has all right, title and interest in the copyrights in its Contributions, and has the right to grant the copyright licenses set forth in this License. - 3. DISTRIBUTION REQUIREMENTS +3. DISTRIBUTION REQUIREMENTS -3.1 If the Program is distributed in object code form, then a prominent notice -must be included in the code itself as well as in any related documentation, -stating that the source code for the Program is available from the Contributor -with information on how and where to obtain the source code. A Contributor -may choose to distribute the Program in object code form under its own license -agreement, provided that: +3.1 If the Program is distributed in object code form, then a prominent notice must be included in the code itself as well as in any related documentation, stating that the source code for the Program is available from the Contributor with information on how and where to obtain the source code. A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - * it complies with the terms and conditions of this License; and + * it complies with the terms and conditions of this License; and + * its license agreement: + * effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose, to the maximum extent permitted by applicable law; + * effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits, to the maximum extent permitted by applicable law; + * states that any provisions which are inconsistent with this License are offered by that Contributor alone and not by any other party; and + * states that source code for the Program is available from such Contributor at the cost of distribution, and informs licensees how to obtain it in a reasonable manner. - * its license agreement: +3.2 When the Program is made available in source code form: -* effectively disclaims on behalf of all Contributors all warranties and conditions, -express and implied, including warranties or conditions of title and non-infringement, -and implied warranties or conditions of merchantability and fitness for a -particular purpose, to the maximum extent permitted by applicable law; + * it must be made available under this License; and + * a copy of this License must be included with each copy of the Program. -* effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, -such as lost profits, to the maximum extent permitted by applicable law; +3.3 This License is intended to facilitate the commercial distribution of the Program by any Contributor. However, Contributors may only charge Recipients a one-time, upfront fee for the distribution of the Program. Contributors may not charge Recipients any recurring charge, license fee, or any ongoing royalty for the Recipients exercise of its rights under this License to the Program. Contributors shall make the source code for the Contributor Version they distribute available at a cost, if any, equal to the cost to the Contributor to physically copy and distribute the work. It is not the intent of this License to prohibit a Contributor from charging fees for any service or maintenance that a Contributor may charge to a Recipient, so long as such fees are not an attempt to circumvent the foregoing restrictions on charging royalties or other recurring fees for the Program itself. -* states that any provisions which are inconsistent with this License are -offered by that Contributor alone and not by any other party; and +3.4 A Contributor may create a Larger Work by combining the Program with other software code not governed by the terms of this License, and distribute the Larger Work as a single product. In such a case, the Contributor must make sure that the requirements of this License are fulfilled for the Program. Any Contributor who includes the Program in a commercial product offering, including as part of a Larger Work, may subject itself, but not any other Contributor, to additional contractual commitments, including, but not limited to, performance warranties and non-infringement representations on suchContributors behalf. No Contributor may create any additional liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (Commercial Contributor) hereby agrees to defend and indemnify every other Contributor (Indemnified Contributor) who made Contributions to the Program distributed by the Commercial Contributor against any losses, damages and costs (collectively Losses) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions, including any additional contractual commitments, of such Commercial Contributor in connection with its distribution of the Program. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. -* states that source code for the Program is available from such Contributor -at the cost of distribution, and informs licensees how to obtain it in a reasonable -manner. +3.5 If Contributor has knowledge that a license under a third partys intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must (a) include a text file with the Program source code distribution titled ../IP_ISSUES, and (b) notify CA in writing at Computer Associates International, Inc., One Computer Associates Plaza, Islandia, New York 11749, Attn: Open Source Group or by email at opensource@ca.com, both describing the claim and the party making the claim in sufficient detail that a Recipient and CA will know whom to contact with regard to such matter. If Contributor obtains such knowledge after the Contribution is made available, Contributor shall also promptly modify the IP_ISSUES file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Program that such new knowledge has been obtained. - 3.2 When the Program is made available in source code form: +3.6 Recipient shall not remove, obscure, or modify any CA or other Contributor copyright or patent proprietary notices appearing in the Program, whether in the source code, object code or in any documentation. In addition to the obligations set forth in Section 4, each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. - * it must be made available under this License; and +4. CONTRIBUTION RESTRICTIONS -* a copy of this License must be included with each copy of the Program. +4.1 Each Contributor must cause the Program to which the Contributor provides a Contribution to contain a file documenting the changes the Contributor made to create its version of the Program and the date of any change. Each Contributor must also include a prominent statement that the Contribution is derived, directly or indirectly, from the Program distributed by a prior Contributor, including the name of the prior Contributor from which such Contribution was derived, in (a) the Program source code, and (b) in any notice in an executable version or related documentation in which the Contributor describes the origin or ownership of the Program. -3.3 This License is intended to facilitate the commercial distribution of -the Program by any Contributor. However, Contributors may only charge Recipients -a one-time, upfront fee for the distribution of the Program. Contributors -may not charge Recipients any recurring charge, license fee, or any ongoing -royalty for the Recipients exercise of its rights under this License to the -Program. Contributors shall make the source code for the Contributor Version -they distribute available at a cost, if any, equal to the cost to the Contributor -to physically copy and distribute the work. It is not the intent of this License -to prohibit a Contributor from charging fees for any service or maintenance -that a Contributor may charge to a Recipient, so long as such fees are not -an attempt to circumvent the foregoing restrictions on charging royalties -or other recurring fees for the Program itself. +5. NO WARRANTY -3.4 A Contributor may create a Larger Work by combining the Program with other -software code not governed by the terms of this License, and distribute the -Larger Work as a single product. In such a case, the Contributor must make -sure that the requirements of this License are fulfilled for the Program. -Any Contributor who includes the Program in a commercial product offering, -including as part of a Larger Work, may subject itself, but not any other -Contributor, to additional contractual commitments, including, but not limited -to, performance warranties and non-infringement representations on suchContributors -behalf. No Contributor may create any additional liability for other Contributors. -Therefore, if a Contributor includes the Program in a commercial product offering, -such Contributor (Commercial Contributor) hereby agrees to defend and indemnify -every other Contributor (Indemnified Contributor) who made Contributions to -the Program distributed by the Commercial Contributor against any losses, -damages and costs (collectively Losses) arising from claims, lawsuits and -other legal actions brought by a third party against the Indemnified Contributor -to the extent caused by the acts or omissions, including any additional contractual -commitments, of such Commercial Contributor in connection with its distribution -of the Program. The obligations in this section do not apply to any claims -or Losses relating to any actual or alleged intellectual property infringement. +5.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, THE PROGRAM IS PROVIDED AS IS AND IN ITS PRESENT STATE AND CONDITION. NO WARRANTY, REPRESENTATION, CONDITION, UNDERTAKING OR TERM, EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, AS TO THE CONDITION, QUALITY, DURABILITY, PERFORMANCE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE OR USE OF THE PROGRAM IS GIVEN OR ASSUMED BY ANY CONTRIBUTOR AND ALL SUCH WARRANTIES, REPRESENTATIONS, CONDITIONS, UNDERTAKINGS AND TERMS ARE HEREBY EXCLUDED TO THE FULLEST EXTENT PERMITTED BY LAW. -3.5 If Contributor has knowledge that a license under a third partys intellectual -property rights is required to exercise the rights granted by such Contributor -under Sections 2.1 or 2.2, Contributor must (a) include a text file with the -Program source code distribution titled ../IP_ISSUES, and (b) notify CA in -writing at Computer Associates International, Inc., One Computer Associates -Plaza, Islandia, New York 11749, Attn: Open Source Group or by email at opensource@ca.com, -both describing the claim and the party making the claim in sufficient detail -that a Recipient and CA will know whom to contact with regard to such matter. -If Contributor obtains such knowledge after the Contribution is made available, -Contributor shall also promptly modify the IP_ISSUES file in all copies Contributor -makes available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Program that such new knowledge has been obtained. +5.2 Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this License, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. -3.6 Recipient shall not remove, obscure, or modify any CA or other Contributor -copyright or patent proprietary notices appearing in the Program, whether -in the source code, object code or in any documentation. In addition to the -obligations set forth in Section 4, each Contributor must identify itself -as the originator of its Contribution, if any, in a manner that reasonably -allows subsequent Recipients to identify the originator of the Contribution. +5.3 Each Recipient acknowledges that the Program is not intended for use in the operation of nuclear facilities, aircraft navigation, communication systems, or air traffic control machines in which case the failure of the Program could lead to death, personal injury, or severe physical or environmental damage. - 4. CONTRIBUTION RESTRICTIONS +6. DISCLAIMER OF LIABILITY -4.1 Each Contributor must cause the Program to which the Contributor provides -a Contribution to contain a file documenting the changes the Contributor made -to create its version of the Program and the date of any change. Each Contributor -must also include a prominent statement that the Contribution is derived, -directly or indirectly, from the Program distributed by a prior Contributor, -including the name of the prior Contributor from which such Contribution was -derived, in (a) the Program source code, and (b) in any notice in an executable -version or related documentation in which the Contributor describes the origin -or ownership of the Program. +6.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, AND TO THE EXTENT PERMITTED BY LAW, NO CONTRIBUTOR SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 5. NO WARRANTY +7. TRADEMARKS AND BRANDING -5.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, THE PROGRAM IS PROVIDED -AS IS AND IN ITS PRESENT STATE AND CONDITION. NO WARRANTY, REPRESENTATION, -CONDITION, UNDERTAKING OR TERM, EXPRESS OR IMPLIED, STATUTORY OR OTHERWISE, -AS TO THE CONDITION, QUALITY, DURABILITY, PERFORMANCE, NON-INFRINGEMENT, MERCHANTABILITY, -OR FITNESS FOR A PARTICULAR PURPOSE OR USE OF THE PROGRAM IS GIVEN OR ASSUMED -BY ANY CONTRIBUTOR AND ALL SUCH WARRANTIES, REPRESENTATIONS, CONDITIONS, UNDERTAKINGS -AND TERMS ARE HEREBY EXCLUDED TO THE FULLEST EXTENT PERMITTED BY LAW. +7.1 This License does not grant any Recipient or any third party any rights to use the trademarks or trade names now or subsequently posted at http://www.ca.com/catrdmrk.htm, or any other trademarks, service marks, logos or trade names belonging to CA (collectively CA Marks) or to any trademark, service mark, logo or trade name belonging to any Contributor. Recipient agrees not to use any CA Marks in or as part of the name of products derived from the Original Program or to endorse or promote products derived from the Original Program. -5.2 Each Recipient is solely responsible for determining the appropriateness -of using and distributing the Program and assumes all risks associated with -its exercise of rights under this License, including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage -to or loss of data, programs or equipment, and unavailability or interruption -of operations. +7.2 Subject to Section 7.1, Recipients may distribute the Program under trademarks, logos, and product names belonging to the Recipient provided that all copyright and other attribution notices remain in the Program. -5.3 Each Recipient acknowledges that the Program is not intended for use in -the operation of nuclear facilities, aircraft navigation, communication systems, -or air traffic control machines in which case the failure of the Program could -lead to death, personal injury, or severe physical or environmental damage. +8. PATENT LITIGATION - 6. DISCLAIMER OF LIABILITY +8.1 If Recipient institutes patent litigation against any person or entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipients patent(s), then such Recipients rights granted under Section 2.2 shall terminate as of the date such litigation is filed. -6.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS LICENSE, AND TO THE EXTENT PERMITTED -BY LAW, NO CONTRIBUTOR SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT -LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE -OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. +9. OWNERSHIP - 7. TRADEMARKS AND BRANDING +9.1 Subject to the licenses granted under this License in Sections 2.1 and 2.2 above, each Contributor retains all rights, title and interest in and to any Contributions made by such Contributor. CA retains all rights, title and interest in and to the Original Program and any Contributions made by or on behalf of CA (CA Contributions), and such CA Contributions will not be automatically subject to this License. CA may, at its sole discretion, choose to license such CA Contributions under this License, or on different terms from those contained in this License or may choose not to license them at all. -7.1 This License does not grant any Recipient or any third party any rights -to use the trademarks or trade names now or subsequently posted at http://www.ca.com/catrdmrk.htm, -or any other trademarks, service marks, logos or trade names belonging to -CA (collectively CA Marks) or to any trademark, service mark, logo or trade -name belonging to any Contributor. Recipient agrees not to use any CA Marks -in or as part of the name of products derived from the Original Program or -to endorse or promote products derived from the Original Program. +10. TERMINATION -7.2 Subject to Section 7.1, Recipients may distribute the Program under trademarks, -logos, and product names belonging to the Recipient provided that all copyright -and other attribution notices remain in the Program. +10.1 All of Recipients rights under this License shall terminate if it fails to comply with any of the material terms or conditions of this License and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If Recipients rights under this License terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipients obligations under this License and any licenses granted by Recipient as a Contributor relating to the Program shall continue and survive termination. - 8. PATENT LITIGATION +11. GENERAL -8.1 If Recipient institutes patent litigation against any person or entity -(including a cross-claim or counterclaim in a lawsuit) alleging that the Program -itself (excluding combinations of the Program with other software or hardware) -infringes such Recipients patent(s), then such Recipients rights granted under -Section 2.2 shall terminate as of the date such litigation is filed. +11.1 If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - 9. OWNERSHIP +11.2 CA may publish new versions (including revisions) of this License from time to time. Each new version of the License will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the License under which it was received. In addition, after a new version of the License is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. No one other than CA has the right to modify this License. -9.1 Subject to the licenses granted under this License in Sections 2.1 and -2.2 above, each Contributor retains all rights, title and interest in and -to any Contributions made by such Contributor. CA retains all rights, title -and interest in and to the Original Program and any Contributions made by -or on behalf of CA (CA Contributions), and such CA Contributions will not -be automatically subject to this License. CA may, at its sole discretion, -choose to license such CA Contributions under this License, or on different -terms from those contained in this License or may choose not to license them -at all. +11.3 If it is impossible for Recipient to comply with any of the terms of this License with respect to some or all of the Program due to statute, judicial order, or regulation, then Recipient must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the IP_ISSUES file described in Section 3.5 and must be included with all distributions of the Program source code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a Recipient of ordinary skill to be able to understand it. - 10. TERMINATION +11.4 This License is governed by the laws of the State of New York. No Recipient will bring a legal action under this License more than one year after the cause of action arose. Each Recipient waives its rights to a jury trial in any resulting litigation. Any litigation or other dispute resolution between a Recipient and CA relating to this License shall take place in the State of New York, and Recipient and CA hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that district with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -10.1 All of Recipients rights under this License shall terminate if it fails -to comply with any of the material terms or conditions of this License and -does not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If Recipients rights under this License terminate, -Recipient agrees to cease use and distribution of the Program as soon as reasonably -practicable. However, Recipients obligations under this License and any licenses -granted by Recipient as a Contributor relating to the Program shall continue -and survive termination. +11.5 Where Recipient is located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties contractantes confirment qu'elles ont exige que le present contrat et tous les documents associes soient rediges en anglais. - 11. GENERAL +11.6 The Program is subject to all export and import laws, restrictions and regulations of the country in which Recipient receives the Program. Recipient is solely responsible for complying with and ensuring that Recipient does not export, re-export, or import the Program in violation of such laws, restrictions or regulations, or without any necessary licenses and authorizations. -11.1 If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties hereto, -such provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -11.2 CA may publish new versions (including revisions) of this License from -time to time. Each new version of the License will be given a distinguishing -version number. The Program (including Contributions) may always be distributed -subject to the version of the License under which it was received. In addition, -after a new version of the License is published, Contributor may elect to -distribute the Program (including its Contributions) under the new version. -No one other than CA has the right to modify this License. - -11.3 If it is impossible for Recipient to comply with any of the terms of -this License with respect to some or all of the Program due to statute, judicial -order, or regulation, then Recipient must: (a) comply with the terms of this -License to the maximum extent possible; and (b) describe the limitations and -the code they affect. Such description must be included in the IP_ISSUES file -described in Section 3.5 and must be included with all distributions of the -Program source code. Except to the extent prohibited by statute or regulation, -such description must be sufficiently detailed for a Recipient of ordinary -skill to be able to understand it. - -11.4 This License is governed by the laws of the State of New York. No Recipient -will bring a legal action under this License more than one year after the -cause of action arose. Each Recipient waives its rights to a jury trial in -any resulting litigation. Any litigation or other dispute resolution between -a Recipient and CA relating to this License shall take place in the State -of New York, and Recipient and CA hereby consent to the personal jurisdiction -of, and venue in, the state and federal courts within that district with respect -to this License. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. - -11.5 Where Recipient is located in the province of Quebec, Canada, the following -clause applies: The parties hereby confirm that they have requested that this -License and all related documents be drafted in English. Les parties contractantes -confirment qu'elles ont exige que le present contrat et tous les documents -associes soient rediges en anglais. - -11.6 The Program is subject to all export and import laws, restrictions and -regulations of the country in which Recipient receives the Program. Recipient -is solely responsible for complying with and ensuring that Recipient does -not export, re-export, or import the Program in violation of such laws, restrictions -or regulations, or without any necessary licenses and authorizations. - -11.7 This License constitutes the entire agreement between the parties with -respect to the subject matter hereof. +11.7 This License constitutes the entire agreement between the parties with respect to the subject matter hereof. diff --git a/options/license/CC-BY-1.0 b/options/license/CC-BY-1.0 index e69a8076d..42a5f3f71 100644 --- a/options/license/CC-BY-1.0 +++ b/options/license/CC-BY-1.0 @@ -1,198 +1,80 @@ -Creative Commons Attribution 1.0 CREATIVE COMMONS CORPORATION IS NOT A LAW -FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE -DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES -THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution 1.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works; + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + b. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -a. By offering the Work for public release under this License, Licensor represents -and warrants that, to the best of Licensor's knowledge after reasonable inquiry: + a. By offering the Work for public release under this License, Licensor represents and warrants that, to the best of Licensor's knowledge after reasonable inquiry: -i. Licensor has secured all rights in the Work necessary to grant the license -rights hereunder and to permit the lawful exercise of the rights granted hereunder -without You having any obligation to pay any royalties, compulsory license -fees, residuals or any other payments; + i. Licensor has secured all rights in the Work necessary to grant the license rights hereunder and to permit the lawful exercise of the rights granted hereunder without You having any obligation to pay any royalties, compulsory license fees, residuals or any other payments; -ii. The Work does not infringe the copyright, trademark, publicity rights, -common law rights or any other right of any third party or constitute defamation, -invasion of privacy or other tortious injury to any third party. + ii. The Work does not infringe the copyright, trademark, publicity rights, common law rights or any other right of any third party or constitute defamation, invasion of privacy or other tortious injury to any third party. -b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING -OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. + b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM -BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE -TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE -OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN -IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-2.0 b/options/license/CC-BY-2.0 index bf0b9074d..86f93505c 100644 --- a/options/license/CC-BY-2.0 +++ b/options/license/CC-BY-2.0 @@ -1,216 +1,81 @@ -Creative Commons Attribution 2.0 CREATIVE COMMONS CORPORATION IS NOT A LAW -FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES -NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS -INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING -THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM -ITS USE. +Creative Commons Attribution 2.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. -For the avoidance of doubt, where the Work is a musical composition or sound -recording, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered a Derivative Work for the purpose of -this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works. + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. - e. For the avoidance of doubt, where the work is a musical composition: + e. For the avoidance of doubt, where the work is a musical composition: -i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive -right to collect, whether individually or via a performance rights society -(e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital -performance (e.g. webcast) of the Work. + i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. -ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive -right to collect, whether individually or via a music rights agency or designated -agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from -the Work ("cover version") and distribute, subject to the compulsory license -created by 17 USC Section 115 of the US Copyright Act (or the equivalent in -other jurisdictions). + ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). -f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, -where the Work is a sound recording, Licensor waives the exclusive right to -collect, whether individually or via a performance-rights society (e.g. SoundExchange), -royalties for the public digital performance (e.g. webcast) of the Work, subject -to the compulsory license created by 17 USC Section 114 of the US Copyright -Act (or the equivalent in other jurisdictions). + f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; to the extent reasonably practicable, the Uniform -Resource Identifier, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + b. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-2.5-AU b/options/license/CC-BY-2.5-AU new file mode 100644 index 000000000..23b880091 --- /dev/null +++ b/options/license/CC-BY-2.5-AU @@ -0,0 +1,112 @@ +Creative Commons Attribution 2.5 Australia + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENCE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +Licence + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENCE ("CCPL" OR "LICENCE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORISED UNDER THIS LICENCE AND/OR APPLICABLE LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENCE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + + 1. Definitions + + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopaedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this Licence. + + b. "Derivative Work" means a work that reproduces a substantial part of the Work, or of the Work and other pre-existing works protected by copyright, or that is an adaptation of a Work that is a literary, dramatic, musical or artistic work. Derivative Works include a translation, musical arrangement, dramatisation, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which a work may be adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this Licence. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this Licence. + + c. "Licensor" means the individual or entity that offers the Work under the terms of this Licence. + + d. "Moral rights law" means laws under which an individual who creates a work protected by copyright has rights of integrity of authorship of the work, rights of attribution of authorship of the work, rights not to have authorship of the work falsely attributed, or rights of a similar or analogous nature in the work anywhere in the world. + + e. "Original Author" means the individual or entity who created the Work. + + f. "Work" means the work or other subject-matter protected by copyright that is offered under the terms of this Licence, which may include (without limitation) a literary, dramatic, musical or artistic work, a sound recording or cinematograph film, a published edition of a literary, dramatic, musical or artistic work or a television or sound broadcast. + + g. "You" means an individual or entity exercising rights under this Licence who has not previously violated the terms of this Licence with respect to the Work, or who has received express permission from the Licensor to exercise rights under this Licence despite a previous violation. + + h. "Licence Elements" means the following high-level licence attributes as selected by Licensor and indicated in the title of this Licence: Attribution, NonCommercial, NoDerivatives, ShareAlike. + +2. Fair Dealing and Other Rights. Nothing in this Licence excludes or modifies, or is intended to exclude or modify, (including by reducing, limiting, or restricting) the rights of You or others to use the Work arising from fair dealings or other limitations on the rights of the copyright owner or the Original Author under copyright law, moral rights law or other applicable laws. + +3. Licence Grant. Subject to the terms and conditions of this Licence, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) licence to exercise the rights in the Work as stated below: + + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + + b. to create and reproduce Derivative Works; + + c. to publish, communicate to the public, distribute copies or records of, exhibit or display publicly, perform publicly and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + + d. to publish, communicate to the public, distribute copies or records of, exhibit or display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; + + e. For the avoidance of doubt, where the Work is a musical composition: + + i. Performance Royalties Under Blanket Licences. Licensor will not collect, whether individually or via a performance rights society, royalties for Your communication to the public, broadcast, public performance or public digital performance (e.g. webcast) of the Work. + + ii. Mechanical Rights and Statutory Royalties. Licensor will not collect, whether individually or via a music rights agency, designated agent or a music publisher, royalties for any record You create from the Work ("cover version") and distribute, subject to the compulsory licence created by 17 USC Section 115 of the US Copyright Act (or an equivalent statutory licence under the Australian Copyright Act or in other jurisdictions). + + + f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor will not collect, whether individually or via a performance-rights society, royalties for Your public digital performance (e.g. webcast) of the Work, subject to the compulsory licence created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor under this Licence are hereby reserved. + +4. Restrictions. The licence granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + a. You may publish, communicate to the public, distribute, publicly exhibit or display, publicly perform, or publicly digitally perform the Work only under the terms of this Licence, and You must include a copy of, or the Uniform Resource Identifier for, this Licence with every copy or record of the Work You publish, communicate to the public, distribute, publicly exhibit or display, publicly perform or publicly digitally perform. You may not offer or impose any terms on the Work that exclude, alter or restrict the terms of this Licence or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this Licence and to the disclaimer of representations and warranties. You may not publish, communicate to the public, distribute, publicly exhibit or display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this Licence. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this Licence. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by Section 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by Section 4(b), as requested. + + b. If you publish, communicate to the public, distribute, publicly exhibit or display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work. You must also give clear and reasonably prominent credit to (i) the Original Author (by name or pseudonym if applicable), if the name or pseudonym is supplied; and (ii) if another party or parties (eg a sponsor institute, publishing entity or journal) is designated for attribution in the copyright notice, terms of service or other reasonable means associated with the Work, such party or parties. If applicable, that credit must be given in the particular way made known by the Original Author and otherwise as reasonable to the medium or means You are utilizing, by conveying the identity of the Original Author and the other designated party or parties (if applicable); the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. + + c. False attribution prohibited. Except as otherwise agreed in writing by the Licensor, if You publish, communicate to the public, distribute, publicly exhibit or display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works in accordance with this Licence, You must not falsely attribute the Work to someone other than the Original Author. + + d. Prejudice to honour or reputation prohibited. Except as otherwise agreed in writing by the Licensor, if you publish, communicate to the public, distribute, publicly exhibit or display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must not do anything that results in a material distortion of, the mutilation of, or a material alteration to, the Work that is prejudicial to the Original Author's honour or reputation, and You must not do anything else in relation to the Work that is prejudicial to the Original Author's honour or reputation. + +5. Disclaimer. + +EXCEPT AS EXPRESSLY STATED IN THIS LICENCE OR OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, AND TO THE FULL EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK "AS-IS" AND MAKES NO REPRESENTATIONS, WARRANTIES OR CONDITIONS OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, ANY REPRESENTATIONS, WARRANTIES OR CONDITIONS REGARDING THE CONTENTS OR ACCURACY OF THE WORK, OR OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, THE ABSENCE OF LATENT OR OTHER DEFECTS, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. + +6. Limitation on Liability. + +TO THE FULL EXTENT PERMITTED BY APPLICABLE LAW, AND EXCEPT FOR ANY LIABILITY ARISING FROM CONTRARY MUTUAL AGREEMENT AS REFERRED TO IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) FOR ANY LOSS OR DAMAGE WHATSOEVER, INCLUDING (WITHOUT LIMITATION) LOSS OF PRODUCTION OR OPERATION TIME, LOSS, DAMAGE OR CORRUPTION OF DATA OR RECORDS; OR LOSS OF ANTICIPATED SAVINGS, OPPORTUNITY, REVENUE, PROFIT OR GOODWILL, OR OTHER ECONOMIC LOSS; OR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THIS LICENCE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +If applicable legislation implies warranties or conditions, or imposes obligations or liability on the Licensor in respect of this Licence that cannot be wholly or partly excluded, restricted or modified, the Licensor's liability is limited, to the full extent permitted by the applicable legislation, at its option, to: + + a. in the case of goods, any one or more of the following: + + i. the replacement of the goods or the supply of equivalent goods; + + ii. the repair of the goods; + + iii. the payment of the cost of replacing the goods or of acquiring equivalent goods; + + iv. the payment of the cost of having the goods repaired; or + + b. in the case of services: + + i. the supplying of the services again; or + + ii. the payment of the cost of having the services supplied again. + +7. Termination. + + a. This Licence and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this Licence. Individuals or entities who have received Derivative Works or Collective Works from You under this Licence, however, will not have their licences terminated provided such individuals or entities remain in full compliance with those licences. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this Licence. + + b. Subject to the above terms and conditions, the licence granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different licence terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this Licence (or any other licence that has been, or is required to be, granted under the terms of this Licence), and this Licence will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous. + + a. Each time You publish, communicate to the public, distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a licence to the Work on the same terms and conditions as the licence granted to You under this Licence. + + b. Each time You publish, communicate to the public, distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a licence to the original Work on the same terms and conditions as the licence granted to You under this Licence. + + c. If any provision of this Licence is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Licence, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + + d. No term or provision of this Licence shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + + e. This Licence constitutes the entire agreement between the parties with respect to the Work licensed here. To the full extent permitted by applicable law, there are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This Licence may not be modified without the mutual written agreement of the Licensor and You. + + f. The construction, validity and performance of this Licence shall be governed by the laws in force in New South Wales, Australia. + +Creative Commons is not a party to this Licence, and, to the full extent permitted by applicable law, makes no representation or warranty whatsoever in connection with the Work. To the full extent permitted by applicable law, Creative Commons will not be liable to You or any party on any legal theory (including, without limitation, negligence) for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this licence. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at https://creativecommons.org/. diff --git a/options/license/CC-BY-3.0 b/options/license/CC-BY-3.0 index a58210656..465aae75c 100644 --- a/options/license/CC-BY-3.0 +++ b/options/license/CC-BY-3.0 @@ -1,304 +1,93 @@ -Creative Commons Attribution 3.0 Unported CREATIVE COMMONS CORPORATION IS -NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE -DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES -THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED -TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION -OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Adaptation" means a work based upon the Work, or upon the Work and other -pre-existing works, such as a translation, adaptation, derivative work, arrangement -of music or other alterations of a literary or artistic work, or phonogram -or performance and includes cinematographic adaptations or any other form -in which the Work may be recast, transformed, or adapted including in any -form recognizably derived from the original, except that a work that constitutes -a Collection will not be considered an Adaptation for the purpose of this -License. For the avoidance of doubt, where the Work is a musical work, performance -or phonogram, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered an Adaptation for the purpose of this -License. + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -b. "Collection" means a collection of literary or artistic works, such as -encyclopedias and anthologies, or performances, phonograms or broadcasts, -or other works or subject matter other than works listed in Section 1(f) below, -which, by reason of the selection and arrangement of their contents, constitute -intellectual creations, in which the Work is included in its entirety in unmodified -form along with one or more other contributions, each constituting separate -and independent works in themselves, which together are assembled into a collective -whole. A work that constitutes a Collection will not be considered an Adaptation -(as defined above) for the purposes of this License. + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -c. "Distribute" means to make available to the public the original and copies -of the Work or Adaptation, as appropriate, through sale or other transfer -of ownership. + c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. -d. "Licensor" means the individual, individuals, entity or entities that offer(s) -the Work under the terms of this License. + d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -e. "Original Author" means, in the case of a literary or artistic work, the -individual, individuals, entity or entities who created the Work or if no -individual or entity can be identified, the publisher; and in addition (i) -in the case of a performance the actors, singers, musicians, dancers, and -other persons who act, sing, deliver, declaim, play in, interpret or otherwise -perform literary or artistic works or expressions of folklore; (ii) in the -case of a phonogram the producer being the person or legal entity who first -fixes the sounds of a performance or other sounds; and, (iii) in the case -of broadcasts, the organization that transmits the broadcast. + e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -f. "Work" means the literary and/or artistic work offered under the terms -of this License including without limitation any production in the literary, -scientific and artistic domain, whatever may be the mode or form of its expression -including digital form, such as a book, pamphlet and other writing; a lecture, -address, sermon or other work of the same nature; a dramatic or dramatico-musical -work; a choreographic work or entertainment in dumb show; a musical composition -with or without words; a cinematographic work to which are assimilated works -expressed by a process analogous to cinematography; a work of drawing, painting, -architecture, sculpture, engraving or lithography; a photographic work to -which are assimilated works expressed by a process analogous to photography; -a work of applied art; an illustration, map, plan, sketch or three-dimensional -work relative to geography, topography, architecture or science; a performance; -a broadcast; a phonogram; a compilation of data to the extent it is protected -as a copyrightable work; or a work performed by a variety or circus performer -to the extent it is not otherwise considered a literary or artistic work. + f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -g. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -h. "Publicly Perform" means to perform public recitations of the Work and -to communicate to the public those public recitations, by any means or process, -including by wire or wireless means or public digital performances; to make -available to the public Works in such a way that members of the public may -access these Works from a place and at a place individually chosen by them; -to perform the Work to the public by any means or process and the communication -to the public of the performances of the Work, including by public digital -performance; to broadcast and rebroadcast the Work by any means including -signs, sounds or images. + h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -i. "Reproduce" means to make copies of the Work by any means including without -limitation by sound or visual recordings and the right of fixation and reproducing -fixations of the Work, including storage of a protected performance or phonogram -in digital form or other electronic medium. + i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. -2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, -or restrict any uses free from copyright or rights arising from limitations -or exceptions that are provided for in connection with the copyright protection -under copyright law or other applicable laws. +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to Reproduce the Work, to incorporate the Work into one or more Collections, -and to Reproduce the Work as incorporated in the Collections; + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; -b. to create and Reproduce Adaptations provided that any such Adaptation, -including any translation in any medium, takes reasonable steps to clearly -label, demarcate or otherwise identify that changes were made to the original -Work. For example, a translation could be marked "The original work was translated -from English to Spanish," or a modification could indicate "The original work -has been modified."; + b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; -c. to Distribute and Publicly Perform the Work including as incorporated in -Collections; and, + c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, - d. to Distribute and Publicly Perform Adaptations. + d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: + e. For the avoidance of doubt: -i. Non-waivable Compulsory License Schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -ii. Waivable Compulsory License Schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor waives the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License; and, + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, -iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, -whether individually or, in the event that the Licensor is a member of a collecting -society that administers voluntary licensing schemes, via that society, from -any exercise by You of the rights granted under this License. + iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -Subject to Section 8(f), all rights not expressly granted by Licensor are -hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may Distribute or Publicly Perform the Work only under the terms of -this License. You must include a copy of, or the Uniform Resource Identifier -(URI) for, this License with every copy of the Work You Distribute or Publicly -Perform. You may not offer or impose any terms on the Work that restrict the -terms of this License or the ability of the recipient of the Work to exercise -the rights granted to that recipient under the terms of the License. You may -not sublicense the Work. You must keep intact all notices that refer to this -License and to the disclaimer of warranties with every copy of the Work You -Distribute or Publicly Perform. When You Distribute or Publicly Perform the -Work, You may not impose any effective technological measures on the Work -that restrict the ability of a recipient of the Work from You to exercise -the rights granted to that recipient under the terms of the License. This -Section 4(a) applies to the Work as incorporated in a Collection, but this -does not require the Collection apart from the Work itself to be made subject -to the terms of this License. If You create a Collection, upon notice from -any Licensor You must, to the extent practicable, remove from the Collection -any credit as required by Section 4(b), as requested. If You create an Adaptation, -upon notice from any Licensor You must, to the extent practicable, remove -from the Adaptation any credit as required by Section 4(b), as requested. + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(b), as requested. -b. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, -You must, unless a request has been made pursuant to Section 4(a), keep intact -all copyright notices for the Work and provide, reasonable to the medium or -means You are utilizing: (i) the name of the Original Author (or pseudonym, -if applicable) if supplied, and/or if the Original Author and/or Licensor -designate another party or parties (e.g., a sponsor institute, publishing -entity, journal) for attribution ("Attribution Parties") in Licensor's copyright -notice, terms of service or by other reasonable means, the name of such party -or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably -practicable, the URI, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and (iv), consistent with Section 3(b), in the case -of an Adaptation, a credit identifying the use of the Work in the Adaptation -(e.g., "French translation of the Work by Original Author," or "Screenplay -based on original Work by Original Author"). The credit required by this Section -4 (b) may be implemented in any reasonable manner; provided, however, that -in the case of a Adaptation or Collection, at a minimum such credit will appear, -if a credit for all contributing authors of the Adaptation or Collection appears, -then as part of these credits and in a manner at least as prominent as the -credits for the other contributing authors. For the avoidance of doubt, You -may only use the credit required by this Section for the purpose of attribution -in the manner set out above and, by exercising Your rights under this License, -You may not implicitly or explicitly assert or imply any connection with, -sponsorship or endorsement by the Original Author, Licensor and/or Attribution -Parties, as appropriate, of You or Your use of the Work, without the separate, -express prior written permission of the Original Author, Licensor and/or Attribution -Parties. + b. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4 (b) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. -c. Except as otherwise agreed in writing by the Licensor or as may be otherwise -permitted by applicable law, if You Reproduce, Distribute or Publicly Perform -the Work either by itself or as part of any Adaptations or Collections, You -must not distort, mutilate, modify or take other derogatory action in relation -to the Work which would be prejudicial to the Original Author's honor or reputation. -Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise -of the right granted in Section 3(b) of this License (the right to make Adaptations) -would be deemed to be a distortion, mutilation, modification or other derogatory -action prejudicial to the Original Author's honor and reputation, the Licensor -will waive or not assert, as appropriate, this Section, to the fullest extent -permitted by the applicable national law, to enable You to reasonably exercise -Your right under Section 3(b) of this License (right to make Adaptations) -but not otherwise. + c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Adaptations or Collections from You under this License, -however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You Distribute or Publicly Perform the Work or a Collection, -the Licensor offers to the recipient a license to the Work on the same terms -and conditions as the license granted to You under this License. + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers -to the recipient a license to the original Work on the same terms and conditions -as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. This License constitutes -the entire agreement between the parties with respect to the Work licensed -here. There are no understandings, agreements or representations with respect -to the Work not specified here. Licensor shall not be bound by any additional -provisions that may appear in any communication from You. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. -e. This License may not be modified without the mutual written agreement of -the Licensor and You. + e. This License may not be modified without the mutual written agreement of the Licensor and You. -f. The rights granted under, and the subject matter referenced, in this License -were drafted utilizing the terminology of the Berne Convention for the Protection -of Literary and Artistic Works (as amended on September 28, 1979), the Rome -Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances -and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised -on July 24, 1971). These rights and subject matter take effect in the relevant -jurisdiction in which the License terms are sought to be enforced according -to the corresponding provisions of the implementation of those treaty provisions -in the applicable national law. If the standard suite of rights granted under -applicable copyright law includes additional rights not granted under this -License, such additional rights are deemed to be included in the License; -this License is not intended to restrict the license of any rights under applicable -law. + f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. Creative Commons Notice -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, Creative Commons does not authorize the use by either -party of the trademark "Creative Commons" or any related trademark or logo -of Creative Commons without the prior written consent of Creative Commons. -Any permitted use will be in compliance with Creative Commons' then-current -trademark usage guidelines, as may be published on its website or otherwise -made available upon request from time to time. For the avoidance of doubt, -this trademark restriction does not form part of this License. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-3.0-AT b/options/license/CC-BY-3.0-AT index 4facf5f4e..b22fedef2 100644 --- a/options/license/CC-BY-3.0-AT +++ b/options/license/CC-BY-3.0-AT @@ -1,318 +1,111 @@ -CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. -DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE -COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS -ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT -DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. Lizenz +CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. -DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD -UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" -ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH -DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG -DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE -GESTATTET IST, IST UNZULÄSSIG. +Lizenz -DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND -ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. -SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER -DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS -SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. +DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. - 1. Definitionen +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. -a. Der Begriff "Bearbeitung" im Sinne dieser Lizenz bezeichnet das Ergebnis -jeglicher Art von Veränderung des Schutzgegenstandes, solange dieses erkennbar -vom Schutzgegenstand abgeleitet wurde. Dies kann insbesondere auch eine Umgestaltung, -Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes -zur Vertonung von Laufbildern sein. Nicht als Bearbeitung des Schutzgegenstandes -gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Nutzung -des Schutzgegenstandes. +1. Definitionen -b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung -von literarischen, künstlerischen oder wissenschaftlichen Inhalten zu einem -einheitlichen Ganzen, sofern diese Zusammenstellung aufgrund von Auswahl und -Anordnung der darin enthaltenen selbständigen Elemente eine eigentümliche -geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch -oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + a. Der Begriff "Bearbeitung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange dieses erkennbar vom Schutzgegenstand abgeleitet wurde. Dies kann insbesondere auch eine Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Bearbeitung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Nutzung des Schutzgegenstandes. -c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder -Bearbeitungen im Original oder in Form von Vervielfältigungsstücken, mithin -in körperlich fixierter Form der Öffentlichkeit zugänglich zu machen oder -in Verkehr zu bringen. + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten zu einem einheitlichen Ganzen, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine eigentümliche geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. -d. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder -juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen -dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder Bearbeitungen im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit zugänglich zu machen oder in Verkehr zu bringen. -e. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes -oder jede andere natürliche oder juristische Person, die am Schutzgegenstand -ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten -Handlungen erfasst und eine Erteilung, Übertragung oder Einräumung von Nutzungsbewilligungen -bzw Nutzungsrechten an Dritte erlaubt. + d. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. -f. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, -künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser -Lizenz angeboten wird. Das kann insbesondere eine eigentümliche geistige Schöpfung -jeglicher Art oder ein Werk der kleinen Münze, ein nachgelassenes Werk oder -auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, -unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise -jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler -Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen -Schutz eigener Art genießen, unterfallen auch sie dem Begriff „Schutzgegenstand" -im Sinne dieser Lizenz. + e. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und eine Erteilung, Übertragung oder Einräumung von Nutzungsbewilligungen bzw Nutzungsrechten an Dritte erlaubt. -g. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, -die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes -vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen -dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers -erhalten hat, die durch diese Lizenz gewährte Nutzungsbewilligung trotz eines -vorherigen Verstoßes auszuüben. + f. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine eigentümliche geistige Schöpfung jeglicher Art oder ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff „Schutzgegenstand“ im Sinne dieser Lizenz. -h. Unter "Öffentlich Wiedergeben" im Sinne dieser Lizenz sind Wahrnehmbarmachungen -des Schutzgegenstandes in unkörperlicher Form zu verstehen, die für eine Mehrzahl -von Mitgliedern der Öffentlichkeit bestimmt sind und mittels öffentlicher -Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, -Weitersendung oder zeit- und ortsunabhängiger Zurverfügungstellung erfolgen, -unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich -drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + g. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährte Nutzungsbewilligung trotz eines vorherigen Verstoßes auszuüben. -i. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, gleichviel in welchem -Verfahren, auf welchem Träger, in welcher Menge und ob vorübergehend oder -dauerhaft, Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere -durch Ton- oder Bildaufzeichnungen, und umfasst auch das erstmalige Festhalten -des Schutzgegenstandes oder dessen Wahrnehmbarmachung auf Mitteln der wiederholbaren -Wiedergabe sowie das Herstellen von Vervielfältigungsstücken dieser Festhaltung, -sowie die Speicherung einer geschützten Darbietung oder eines Bild- und/oder -Schallträgers in digitaler Form oder auf einem anderen elektronischen Medium. + h. Unter "Öffentlich Wiedergeben" im Sinne dieser Lizenz sind Wahrnehmbarmachungen des Schutzgegenstandes in unkörperlicher Form zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung oder zeit- und ortsunabhängiger Zurverfügungstellung erfolgen, unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. - 2. Beschränkungen der Verwertungsrechte + i. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, gleichviel in welchem Verfahren, auf welchem Träger, in welcher Menge und ob vorübergehend oder dauerhaft, Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch das erstmalige Festhalten des Schutzgegenstandes oder dessen Wahrnehmbarmachung auf Mitteln der wiederholbaren Wiedergabe sowie das Herstellen von Vervielfältigungsstücken dieser Festhaltung, sowie die Speicherung einer geschützten Darbietung oder eines Bild- und/oder Schallträgers in digitaler Form oder auf einem anderen elektronischen Medium. -Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung -des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die -sich aus den Beschränkungen der Verwertungsrechte, anderen Beschränkungen -der Ausschließlichkeitsrechte des Rechtsinhabers oder anderen entsprechenden -Rechtsnormen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes -ergeben. +2. Beschränkungen der Verwertungsrechte - 3. Lizenzierung +Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die sich aus den Beschränkungen der Verwertungsrechte, anderen Beschränkungen der Ausschließlichkeitsrechte des Rechtsinhabers oder anderen entsprechenden Rechtsnormen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. -Unter den Bedingungen dieser Lizenz erteilt Ihnen der Lizenzgeber - unbeschadet -unverzichtbarer Rechte und vorbehaltlich des Abschnitts 3.e) - die vergütungsfreie, -räumlich und zeitlich (für die Dauer des Urheberrechts oder verwandten Schutzrechts -am Schutzgegenstand) unbeschränkte Nutzungsbewilligung, den Schutzgegenstand -in der folgenden Art und Weise zu nutzen: +3. Lizenzierung -a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn -in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; +Unter den Bedingungen dieser Lizenz erteilt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 3.e) - die vergütungsfreie, räumlich und zeitlich (für die Dauer des Urheberrechts oder verwandten Schutzrechts am Schutzgegenstand) unbeschränkte Nutzungsbewilligung, den Schutzgegenstand in der folgenden Art und Weise zu nutzen: -b. Den Schutzgegenstand zu bearbeiten, einschließlich Übersetzungen unter -Nutzung jedweder Medien anzufertigen, sofern deutlich erkennbar gemacht wird, -dass es sich um eine Bearbeitung handelt; + a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; -c. Den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich -wiederzugeben und zu verbreiten; und + b. Den Schutzgegenstand zu bearbeiten, einschließlich Übersetzungen unter Nutzung jedweder Medien anzufertigen, sofern deutlich erkennbar gemacht wird, dass es sich um eine Bearbeitung handelt; -d. Bearbeitungen des Schutzgegenstandes zu veröffentlichen, öffentlich wiederzugeben -und zu verbreiten. + c. Den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich wiederzugeben und zu verbreiten; und -e. Bezüglich der Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + d. Bearbeitungen des Schutzgegenstandes zu veröffentlichen, öffentlich wiederzugeben und zu verbreiten. -i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche -im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme -(zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber -das ausschließliche Recht vor, die entsprechenden Vergütungsansprüche für -jede Ausübung eines Rechts aus dieser Lizenz durch Sie geltend zu machen. + e. Bezüglich der Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: -ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz -vorgesehen sind und zustande kommen, verzichtet der Lizenzgeber für alle Fälle -einer lizenzgerechten Nutzung des Schutzgegenstandes durch Sie auf jegliche -Vergütung. + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechenden Vergütungsansprüche für jede Ausübung eines Rechts aus dieser Lizenz durch Sie geltend zu machen. -iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des -Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte -(i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig -davon, ob eine Geltendmachung der Vergütungsansprüche durch ihn selbst oder -nur durch eine Verwertungsgesellschaft möglich wäre. + ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, verzichtet der Lizenzgeber für alle Fälle einer lizenzgerechten Nutzung des Schutzgegenstandes durch Sie auf jegliche Vergütung. -Die vorgenannte Nutzungsbewilligung wird für alle bekannten sowie alle noch -nicht bekannten Nutzungsarten eingeräumt. Sie beinhaltet auch das Recht, solche -Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser -Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, -die über diesen Abschnitt hinaus nicht ausdrücklich vom Lizenzgeber eingeräumt -werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen -von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen -Schutz eigener Art genießen, verzichtet der Lizenzgeber auf die Geltendmachung -sämtlicher daraus resultierender Rechte. + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Geltendmachung der Vergütungsansprüche durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. - 4. Bedingungen +Die vorgenannte Nutzungsbewilligung wird für alle bekannten sowie alle noch nicht bekannten Nutzungsarten eingeräumt. Sie beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich vom Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf die Geltendmachung sämtlicher daraus resultierender Rechte. -Die Erteilung der Nutzungsbewilligung gemäß Abschnitt 3 dieser Lizenz erfolgt -ausdrücklich nur unter den folgenden Bedingungen: +4. Bedingungen -a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser -Lizenz verbreiten oder öffentlich wiedergeben. Sie müssen dabei stets eine -Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier -(URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten -oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz -gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. -Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich -wiedergeben, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz -und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten -oder öffentlich wiedergeben, dürfen Sie (in Bezug auf den Schutzgegenstand) -keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes -in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. -Dasselbe gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil -eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk -insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk -erstellen, müssen Sie - soweit dies praktikabel ist - auf die Mitteilung eines -Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.b) aufgezählten Hinweise -entfernen. Wenn Sie eine Bearbeitung vornehmen, müssen Sie – soweit dies praktikabel -ist – auf die Mitteilung eines Lizenzgebers hin von der Bearbeitung die in -Abschnitt 4.b) aufgezählten Hinweise entfernen. +Die Erteilung der Nutzungsbewilligung gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: -b. Die Verbreitung und die öffentliche Wiedergabe des Schutzgegenstandes oder -auf ihm aufbauender Inhalte oder ihn enthaltender Sammelwerke ist Ihnen nur -unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen -im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt -lassen. Sie sind verpflichtet, die Urheberschaft oder die Rechteinhaberschaft -in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem -Sie selbst – soweit bekannt – Folgendes angeben: + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich wiedergeben. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich wiedergeben, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich wiedergeben, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dasselbe gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie - soweit dies praktikabel ist - auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.b) aufgezählten Hinweise entfernen. Wenn Sie eine Bearbeitung vornehmen, müssen Sie – soweit dies praktikabel ist – auf die Mitteilung eines Lizenzgebers hin von der Bearbeitung die in Abschnitt 4.b) aufgezählten Hinweise entfernen. -i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) Rechteinhabers, -und/oder falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen -oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen -hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) („Zuschreibungsempfänger"), -Namen bzw. Bezeichnung dieses oder dieser Dritten; + b. Die Verbreitung und die öffentliche Wiedergabe des Schutzgegenstandes oder auf ihm aufbauender Inhalte oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Urheberschaft oder die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie selbst – soweit bekannt – Folgendes angeben: - ii. den Titel des Inhaltes; + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) Rechteinhabers, und/oder falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) („Zuschreibungsempfänger“), Namen bzw. Bezeichnung dieses oder dieser Dritten; -iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. -Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, -es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen -zum Schutzgegenstand; + ii. den Titel des Inhaltes; -iv. und im Falle einer Bearbeitung des Schutzgegenstandes in Übereinstimmung -mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Bearbeitung -handelt. + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand; -Die nach diesem Abschnitt 4.b) erforderlichen Angaben können in jeder angemessenen -Form gemacht werden; im Falle einer Bearbeitung des Schutzgegenstandes oder -eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer -Nennung aller Beitragenden dergestalt erfolgen, dass sie zumindest ebenso -hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben -nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft -in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte -aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich -vorliegende Zustimmung des Urhebers, des Lizenzgebers und/oder des Zuschreibungsempfängers -weder implizit noch explizit irgendeine Verbindung mit dem oder eine Unterstützung -oder Billigung durch den Urheber, den Lizenzgeber oder den Zuschreibungsempfänger -andeuten oder erklären. + iv. und im Falle einer Bearbeitung des Schutzgegenstandes in Übereinstimmung mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Bearbeitung handelt. -c. Die oben unter 4.a) und b) genannten Einschränkungen gelten nicht für solche -Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff -fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen -Schutz eigener Art genießen. + Die nach diesem Abschnitt 4.b) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle einer Bearbeitung des Schutzgegenstandes oder eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung aller Beitragenden dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Urhebers, des Lizenzgebers und/oder des Zuschreibungsempfängers weder implizit noch explizit irgendeine Verbindung mit dem oder eine Unterstützung oder Billigung durch den Urheber, den Lizenzgeber oder den Zuschreibungsempfänger andeuten oder erklären. -d. (Urheber)Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser -Lizenz unberührt. + c. Die oben unter 4.a) und b) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. - 5. Gewährleistung + d. (Urheber)Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. -SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER -UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN -WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE ERTEILUNG DER -NUTZUNGSBEWILLIGUNG UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT -WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST -INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN -ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, -SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON -BESCHREIBUNGEN. +5. Gewährleistung - 6. Haftungsbeschränkung +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE ERTEILUNG DER NUTZUNGSBEWILLIGUNG UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. -ÜBER DIE IN ZIFFER 5 GENANNTE GEWÄHRLEISTUNG HINAUS HAFTET DER LIZENZGEBER -IHNEN GEGENÜBER FÜR SCHÄDEN JEGLICHER ART NUR BEI GROBER FAHRLÄSSIGKEIT ODER -VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG FÜR FOLGE- -ODER ANDERE SCHÄDEN, AUCH WENN ER ÜBER DIE MÖGLICHKEIT IHRES EINTRITTS UNTERRICHTET -WURDE. +6. Haftungsbeschränkung - 7. Erlöschen +ÜBER DIE IN ZIFFER 5 GENANNTE GEWÄHRLEISTUNG HINAUS HAFTET DER LIZENZGEBER IHNEN GEGENÜBER FÜR SCHÄDEN JEGLICHER ART NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG FÜR FOLGE- ODER ANDERE SCHÄDEN, AUCH WENN ER ÜBER DIE MÖGLICHKEIT IHRES EINTRITTS UNTERRICHTET WURDE. -a. Diese Lizenz und die durch sie erteilte Nutzungsbewilligung erlöschen mit -Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen -durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder -einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen -oder juristischen Personen, die Bearbeitungen des Schutzgegenstandes oder -diesen enthaltende Sammelwerke sowie entsprechende Vervielfältigungsstücke -unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich -entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen -sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten -die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. +7. Erlöschen -b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet -bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen -behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen -anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, -solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf -dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser -Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese -Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen -vollumfänglich wirksam bleibt. + a. Diese Lizenz und die durch sie erteilte Nutzungsbewilligung erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die Bearbeitungen des Schutzgegenstandes oder diesen enthaltende Sammelwerke sowie entsprechende Vervielfältigungsstücke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. - 8. Sonstige Bestimmungen + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. -a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil -eines Sammelwerkes verbreiten oder öffentlich wiedergeben, bietet der Lizenzgeber -dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang -an, wie Ihnen in Form dieser Lizenz. +8. Sonstige Bestimmungen -b. Jedes Mal wenn Sie eine Bearbeitung des Schutzgegenstandes verbreiten oder -öffentlich wiedergeben, bietet der Lizenzgeber dem Empfänger eine Lizenz am -ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen -Umfang an, wie Ihnen in Form dieser Lizenz. + a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich wiedergeben, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. -c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die -Wirksamkeit der Lizenz im Übrigen unberührt. + b. Jedes Mal wenn Sie eine Bearbeitung des Schutzgegenstandes verbreiten oder öffentlich wiedergeben, bietet der Lizenzgeber dem Empfänger eine Lizenz am ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. -d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen -sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß -betroffene Seite nicht schriftlich zugestimmt hat. + c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen unberührt. -e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, -Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt -die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug -auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder -Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht -genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem -Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. -Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte -Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung -zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen -wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht -auf die Dritten gemäß 8.a) und b) angebotenen Lizenzen aus. + d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. -f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung -getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag -das Recht der Republik Österreich Anwendung. + e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß 8.a) und b) angebotenen Lizenzen aus. + + f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Republik Österreich Anwendung. Creative Commons Notice -Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr -oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet -Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für -irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar -- im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen -beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, -wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. -Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und -die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit -gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL -steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder -einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen -Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach -der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, -die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise -auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen -der Markennutzung sind nicht Bestandteil dieser Lizenz. +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-3.0-DE b/options/license/CC-BY-3.0-DE new file mode 100644 index 000000000..239da9580 --- /dev/null +++ b/options/license/CC-BY-3.0-DE @@ -0,0 +1,108 @@ +Creative Commons Namensnennung 3.0 Deutschland + + CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. + +Lizenz + +DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. + +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. + +1. Definitionen + + a. Der Begriff "Abwandlung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange die eigenpersönlichen Züge des Schutzgegenstandes darin nicht verblassen und daran eigene Schutzrechte entstehen. Das kann insbesondere eine Bearbeitung, Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Abwandlung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Benutzung des Schutzgegenstandes. + + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder Abwandlungen im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit anzubieten oder in Verkehr zu bringen. + + d. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + + e. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person oder Gruppe von Personen, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und bei dem eine Einräumung von Nutzungsrechten oder eine Weiterübertragung an Dritte möglich ist. + + f. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine persönliche geistige Schöpfung jeglicher Art, ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff "Schutzgegenstand" im Sinne dieser Lizenz. + + g. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährten Nutzungsrechte trotz eines vorherigen Verstoßes auszuüben. + + h. Unter "Öffentlich Zeigen" im Sinne dieser Lizenz sind Veröffentlichungen und Präsentationen des Schutzgegenstandes zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und in unkörperlicher Form mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung, zeit- und ortsunabhängiger Zugänglichmachung oder in körperlicher Form mittels Ausstellung erfolgen, unabhängig von bestimmten Veranstaltungen und unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + + i. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, mittels beliebiger Verfahren Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch den Vorgang, erstmals körperliche Fixierungen des Schutzgegenstandes sowie Vervielfältigungsstücke dieser Fixierungen anzufertigen, sowie die Übertragung des Schutzgegenstandes auf einen Bild- oder Tonträger oder auf ein anderes elektronisches Medium, gleichviel ob in digitaler oder analoger Form. + +2. Schranken des Immaterialgüterrechts. Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die Ihnen aufgrund der Schranken des Urheberrechts oder anderer Rechtsnormen bereits ohne Weiteres zustehen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. + +3. Einräumung von Nutzungsrechten. Unter den Bedingungen dieser Lizenz räumt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 3.e) - das vergütungsfreie, räumlich und zeitlich (für die Dauer des Schutzrechts am Schutzgegenstand) unbeschränkte einfache Recht ein, den Schutzgegenstand auf die folgenden Arten und Weisen zu nutzen ("unentgeltlich eingeräumtes einfaches Nutzungsrecht für jedermann"): + + a. den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; + + b. Abwandlungen des Schutzgegenstandes anzufertigen, einschließlich Übersetzungen unter Nutzung jedweder Medien, sofern deutlich erkennbar gemacht wird, dass es sich um Abwandlungen handelt; + + c. den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich zu zeigen und zu verbreiten; + + d. Abwandlungen des Schutzgegenstandes zu veröffentlichen, öffentlich zu zeigen und zu verbreiten. + + e. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechende Vergütung einzuziehen für jede Ausübung eines Rechts aus dieser Lizenz durch Sie. + + ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, verzichtet der Lizenzgeber für alle Fälle einer lizenzgerechten Nutzung des Schutzgegenstandes durch Sie auf jegliche Vergütung. + + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Einziehung der Vergütung durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. + +Das vorgenannte Nutzungsrecht wird für alle bekannten sowie für alle noch nicht bekannten Nutzungsarten eingeräumt. Es beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich durch den Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf sämtliche aus diesem Schutz resultierenden Rechte. + +4. Bedingungen. Die Einräumung des Nutzungsrechts gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: + + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich zeigen. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.a) gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.b) aufgezählten Hinweise entfernen. Wenn Sie eine Abwandlung vornehmen, müssen Sie auf die Mitteilung eines Lizenzgebers hin von der Abwandlung die in Abschnitt 4.b) aufgezählten Hinweise entfernen. + + b. Die Verbreitung und das öffentliche Zeigen des Schutzgegenstandes oder auf ihm aufbauender Abwandlungen oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie - soweit bekannt - Folgendes angeben: + + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers und / oder, falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) ("Zuschreibungsempfänger"), Namen bzw. Bezeichnung dieses oder dieser Dritten; + + ii. den Titel des Inhaltes; + + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand; + + iv. und im Falle einer Abwandlung des Schutzgegenstandes in Übereinstimmung mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Abwandlung handelt. + + Die nach diesem Abschnitt 4.b) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle einer Abwandlung des Schutzgegenstandes oder eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung mehrerer Rechteinhaber dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Lizenzgebers und / oder des Zuschreibungsempfängers weder explizit noch implizit irgendeine Verbindung zum Lizenzgeber oder Zuschreibungsempfänger und ebenso wenig eine Unterstützung oder Billigung durch ihn andeuten. + + c. Die oben unter 4.a) und b) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. + + d. Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. + +5. Gewährleistung + +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE EINRÄUMUNG VON RECHTEN UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. DIESE GEWÄHRLEISTUNGSBESCHRÄNKUNG GILT NICHT, SOWEIT MÄNGEL ZU SCHÄDEN DER IN ABSCHNITT 6 BEZEICHNETEN ART FÜHREN UND AUF SEITEN DES LIZENZGEBERS DAS JEWEILS GENANNTE VERSCHULDEN BZW. VERTRETENMÜSSEN EBENFALLS VORLIEGT. + +6. Haftungsbeschränkung + +DER LIZENZGEBER HAFTET IHNEN GEGENÜBER IN BEZUG AUF SCHÄDEN AUS DER VERLETZUNG DES LEBENS, DES KÖRPERS ODER DER GESUNDHEIT NUR, SOFERN IHM WENIGSTENS FAHRLÄSSIGKEIT VORZUWERFEN IST, FÜR SONSTIGE SCHÄDEN NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG. + +7. Erlöschen + + a. Diese Lizenz und die durch sie eingeräumten Nutzungsrechte erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die Abwandlungen des Schutzgegenstandes oder diesen enthaltende Sammelwerke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. + + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. + +8. Sonstige Bestimmungen + + a. Jedes Mal, wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + b. Jedes Mal, wenn Sie eine Abwandlung des Schutzgegenstandes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz am ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen davon unberührt. + + d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. + + e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß Ziffern 8.a) und b) angebotenen Lizenzen aus. + + f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Bundesrepublik Deutschland Anwendung. + + +Creative Commons Notice + +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. + +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. + +Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-3.0-NL b/options/license/CC-BY-3.0-NL new file mode 100644 index 000000000..5789b8592 --- /dev/null +++ b/options/license/CC-BY-3.0-NL @@ -0,0 +1,97 @@ +Creative Commons Naamsvermelding 3.0 + + CREATIVE COMMONS CORPORATION IS GEEN ADVOCATENPRAKTIJK EN VERLEENT GEEN JURIDISCHE DIENSTEN. DE VERSPREIDING VAN DEZE LICENTIE ROEPT GEEN JURIDISCHE RELATIE MET CREATIVE COMMONS IN HET LEVEN. CREATIVE COMMONS VERSPREIDT DEZE INFORMATIE 'AS-IS'. CREATIVE COMMONS STAAT NIET IN VOOR DE INHOUD VAN DE VERSTREKTE INFORMATIE EN SLUIT ALLE AANSPRAKELIJKHEID UIT VOOR ENIGERLEI SCHADE VOORTVLOEIEND UIT HET GEBRUIK VAN DEZE INFORMATIE INDIEN EN VOORZOVER DE WET NIET ANDERS BEPAALT. + +Licentie + +HET WERK (ALS HIERONDER OMSCHREVEN) WORDT TER BESCHIKKING GESTELD OVEREENKOMSTIG DE VOORWAARDEN VAN DEZE CREATIVE COMMONS PUBLIEKE LICENTIE ('CCPL' OF 'LICENTIE'). HET WERK WORDT BESCHERMD OP GROND VAN HET AUTEURSRECHT, NABURIGE RECHTEN, HET DATABANKENRECHT EN/OF ENIGE ANDERE TOEPASSELIJKE RECHTEN. MET UITZONDERING VAN HET IN DEZE LICENTIE OMSCHREVEN TOEGESTANE GEBRUIK VAN HET WERK IS ENIG ANDER GEBRUIK VAN HET WERK NIET TOEGESTAAN. + +DOOR HET UITOEFENEN VAN DE IN DEZE LICENTIE VERLEENDE RECHTEN MET BETREKKING TOT HET WERK AANVAARDT EN GAAT DE GEBRUIKER AKKOORD MET DE VOORWAARDEN VAN DEZE LICENTIE, MET DIEN VERSTANDE DAT (DE INHOUD VAN) DEZE LICENTIE OP VOORHAND VOLDOENDE DUIDELIJK KENBAAR DIENT TE ZIJN VOOR DE ONTVANGER VAN HET WERK. + +DE LICENTIEGEVER VERLEENT DE GEBRUIKER DE IN DEZE LICENTIE OMSCHREVEN RECHTEN MET INACHTNEMING VAN DE DESBETREFFENDE VOORWAARDEN. + +1. Definities + + a. 'Verzamelwerk' een werk waarin het Werk, in zijn geheel en in ongewijzigde vorm, samen met een of meer andere werken, die elk een afzonderlijk en zelfstandig werk vormen, tot een geheel is samengevoegd. Voorbeelden van een verzamelwerk zijn een tijdschrift, een bloemlezing of een encyclopedie. Een Verzamelwerk zal voor de toepassing van deze Licentie niet als een Afgeleid werk (als hieronder omschreven) worden beschouwd. + + b. 'Afgeleid werk' een werk dat is gebaseerd op het Werk of op het Werk en andere reeds bestaande werken. Voorbeelden van een Afgeleid werk zijn een vertaling, een muziekschikking (arrangement), een toneelbewerking, een literaire bewerking, een verfilming, een geluidsopname, een kunstreproductie, een verkorte versie, een samenvatting of enig andere bewerking van het Werk, met dien verstande dat een Verzamelwerk voor de toepassing van deze Licentie niet als een Afgeleid werk zal worden beschouwd. + + Indien het Werk een muziekwerk betreft, zal de synchronisatie van de tijdslijnen van het Werk en een bewegend beeld ('synching') voor de toepassing van deze Licentie als een Afgeleid Werk worden beschouwd. + + c. 'Licentiegever' de natuurlijke persoon/personen of rechtspersoon/rechtspersonen die het Werk volgens de voorwaarden van deze Licentie aanbiedt/aanbieden. + + d. 'Maker' de natuurlijke persoon/personen of rechtspersoon/personen die het oorspronkelijke werk gemaakt heeft/hebben. Voor de toepassing van deze Licentie wordt onder de Maker mede verstaan de uitvoerende kunstenaar, film- en fonogramproducent en omroeporganisaties in de zin van de Wet op de naburige rechten en de producent van een databank in de zin van de Databankenwet. + + e. 'Werk' het auteursrechtelijk beschermde werk dat volgens de voorwaarden van deze Licentie wordt aangeboden. Voor de toepassing van deze Licentie wordt onder het Werk mede verstaan het fonogram, de eerste vastlegging van een film en het (omroep)programma in de zin van de Wet op de naburige rechten en de databank in de zin van de Databankenwet, voor zover dit fonogram, deze eerste vastlegging van een film, dit (omroep)programma en deze databank beschermd wordt krachtens de toepasselijke wet in de jurisdictie van de Gebruiker. + + f. 'Gebruiker' de natuurlijke persoon of rechtspersoon die rechten ingevolge deze Licentie uitoefent en die de voorwaarden van deze Licentie met betrekking tot het Werk niet eerder geschonden heeft, of die van de Licentiegever uitdrukkelijke toestemming gekregen heeft om rechten ingevolge deze Licentie uit te oefenen ondanks een eerdere schending. + +2. Beperkingen van de uitsluitende rechten. Niets in deze Licentie strekt ertoe om de rechten te beperken die voortvloeien uit de beperkingen en uitputting van de uitsluitende rechten van de rechthebbende krachtens het auteursrecht, de naburige rechten, het databankenrecht of enige andere toepasselijke rechten. + +3. Licentieverlening. Met inachtneming van de voorwaarden van deze Licentie verleent de Licentiegever hierbij aan de Gebruiker een wereldwijde, niet-exclusieve licentie om de navolgende rechten met betrekking tot het Werk vrij van royalty's uit te oefenen voor de duur van de toepasselijke intellectuele eigendomsrechten: + + a. het reproduceren van het Werk, het opnemen van het Werk in een of meerdere Verzamelwerken, en het reproduceren van het in de Verzamelwerken opgenomen Werk; + + b. het maken en reproduceren van Afgeleide werken met dien verstande dat met betrekking tot het Afgeleide werk, met inbegrip van welke vertaling in welk medium dan ook, duidelijk wordt gemaakt dat er wijzigingen in het oorspronkelijke Werk zijn aangebracht. Bijvoorbeeld, aan een vertaling kan worden toegevoegd dat 'het oorspronkelijke Werk is van het Engels in het Spaans vertaald', of in geval van een verandering kan worden aangegeven dat 'het oorspronkelijke werk is veranderd'; + + c. het verspreiden van exemplaren van het Werk, het in het openbaar tonen, op- en uitvoeren en het on-line beschikbaar stellen van het Werk, afzonderlijk en als deel van een Verzamelwerk; + + d. het verspreiden van exemplaren van Afgeleide werken, het in het openbaar te tonen, op- en uitvoeren en het on-line beschikbaar stellen van Afgeleide werken; + + e. het opvragen en hergebruiken van het Werk; + + f. Volledigheidshalve dient te worden vermeld dat: + + i. Niet voor afstand vatbare heffingsregelingen. in het geval van niet voor afstand vatbare heffingsregelingen (bijvoorbeeld met betrekking tot thuiskopieën) de Licentiegever zich het recht voorbehoudt om dergelijke heffingen te innen (al dan niet door middel van een auteursrechtenorganisatie) bij zowel commercieel als niet-commercieel gebruik van het Werk; + + ii. Voor afstand vatbare heffingsregeling. in het geval van voor afstand vatbare heffingsregelingen (bijvoorbeeld met betrekking tot leenrechten) de Licentiegever afstand doet van het recht om dergelijke heffingen te innen bij zowel commercieel als niet-commercieel gebruik van het Werk; + + iii. Collectief rechtenbeheer. de Licentiegever afstand doet van het recht om vergoedingen te innen (zelfstandig of, indien de Licentiegever lid is van een auteursrechtenorganisatie, door middel van die organisatie) bij zowel commercieel als niet-commercieel gebruik van het Werk. + +De Gebruiker mag deze rechten uitoefenen met behulp van alle thans bekende media, dragers en formats. De Gebruiker is tevens gerechtigd om technische wijzigingen aan te brengen die noodzakelijk zijn om de rechten met behulp van andere media, dragers en formats uit te oefenen. Alle niet uitdrukkelijk verleende rechten zijn hierbij voorbehouden aan de Licentiegever, met inbegrip van maar niet beperkt tot de rechten die in artikel 4(d) worden genoemd. Voor zover de Licentiegever op basis van het nationale recht ter implementatie van de Europese Databankenrichtlijn over uitsluitende rechten beschickt doet de Licentiegever afstand van deze rechten. + +4. Beperkingen. De in artikel 3 verleende Licentie is uitdrukkelijk gebonden aan de volgende beperkingen: + + a. De Gebruiker mag het Werk uitsluitend verspreiden, in het openbaar tonen, op- of uitvoeren of on-line beschikbaar stellen met inachtneming van de voorwaarden van deze Licentie, en de Gebruiker dient een exemplaar van, of de Uniform Resource Identifier voor, deze Licentie toe te voegen aan elk exemplaar van het Werk dat de Gebruiker verspreidt, in het openbaar toont, op- of uitvoert, of on-line beschikbaar stelt. Het is de Gebruiker niet toegestaan om het Werk onder enige afwijkende voorwaarden aan te bieden waardoor de voorwaarden van deze Licentie dan wel de mogelijkheid van de ontvangers van het Werk om de rechten krachtens deze Licentie uit te oefenen worden beperkt. Het is de Gebruiker niet toegestaan om het Werk in sublicentie te geven. De Gebruiker dient alle vermeldingen die verwijzen naar deze Licentie dan wel naar de uitsluiting van garantie te laten staan. Het is de Gebruiker niet toegestaan om het Werk te verspreiden, in het openbaar te tonen, op- of uit te voeren of on-line beschikbaar te stellen met toepassing van technologische voorzieningen waardoor de voorwaarden van deze Licentie dan wel de mogelijkheid van de ontvangers van het Werk om de rechten krachtens deze Licentie uit te oefenen worden beperkt. Het voorgaande is tevens van toepassing op het Werk dat deel uitmaakt van een Verzamelwerk, maar dat houdt niet in dat het Verzamelwerk, afgezien van het Werk zelf, gebonden is aan de voorwaarden van deze Licentie. Indien de Gebruiker een Verzamelwerk maakt, dient deze, op verzoek van welke Licentiegever ook, de op grond van artikel 4(b) vereiste naamsvermelding uit het Verzamelwerk te verwijderen, voor zover praktisch mogelijk, conform het verzoek. Indien de Gebruiker een Afgeleid werk maakt, dient hij, op verzoek van welke Licentiegever ook, de op grond van artikel 4(b) vereiste naamsvermelding uit het Afgeleide werk te verwijderen, voorzover praktisch mogelijk, conform het verzoek. + + b. Indien de Gebruiker het Werk, Afgeleide Werken of Verzamelwerken verspreidt, in het openbaar toont, op- of uitvoert of on-line beschikbaar stelt, dient de Gebruiker, tenzij er sprake is van een verzoek als vermeld in lid 4(a), alle auteursrechtvermeldingen met betrekking tot het Werk te laten staan. Tevens dient de Gebruiker, op een wijze die redelijk is in verhouding tot het gebruikte medium, de naam te vermelden van (i) de Maker (of zijn/haar pseudoniem indien van toepassing) indien deze wordt vermeld; en/of (ii) van (een) andere partij(en) (b.v. sponsor, uitgeverij, tijdschrift) indien de naamsvermelding van deze partij(en) ("Naamsvermeldingsgerechtigden") in de auteursrechtvermelding of algemene voorwaarden van de Licentiegever of op een andere redelijke wijze verplicht is gesteld door de Maker en/of de Licentiegever; de titel van het Werk indien deze wordt vermeld; voorzover redelijkerwijs toepasbaar de Uniform Resource Identifier, indien aanwezig, waarvan de Licentiegever heeft aangegeven dat deze bij het Werk hoort, tenzij de URI niet verwijst naar de auteursrechtvermeldingen of de licentie-informatie betreffende het Werk; in overeenstemming met artikel 3(b) in geval van een Afgeleid werk, door te verwijzen naar het gebruik van het Werk in het Afgeleide werk (bijvoorbeeld: 'De Franse vertaling van het Werk van de Maker' of 'Scenario gebaseerd op het Werk van de Maker'). De Gebruiker dient op redelijke wijze aan de in dit artikel genoemde vereisten te voldoen; echter, met dien verstande dat, in geval van een Afgeleid werk of een Verzamelwerk, de naamsvermeldingen in ieder geval geplaatst dienen te worden, indien er een naamsvermelding van alle makers van het Afgeleide werk of het Verzamelwerk geplaatst wordt dan als deel van die naamsvermeldingen, en op een wijze die in ieder geval even duidelijk is als de naamsvermeldingen van de overige makers. + + Volledigheidshalve dient te worden vermeld dat de Gebruiker uitsluitend gebruik mag maken van de naamsvermelding op de in dit artikel omschreven wijze teneinde te voldoen aan de naamsvermeldingsverplichting en, door gebruikmaking van zijn rechten krachtens deze Licentie, is het de Gebruiker niet toegestaan om op enigerlei wijze de indruk te wekken dat er sprake is van enig verband met, sponsorschap van of goedkeuring van de (toepasselijke) Maker, Licentiegever c.q. Naamsvermeldingsgerechtigden van de Gebruiker of diens gebruik van het Werk, zonder de afzonderlijke, uitdrukkelijke, voorafgaande, schriftelijke toestemming van de Maker, Licentiegever c.q. Naamsvermeldingsgerechtigden. + + c. Volledigheidshalve dient te worden vermeld, dat de hierboven vermelde beperkingen (lid 4(a) en lid 4(b)) niet van toepassing zijn op die onderdelen van het Werk die geacht worden te vallen onder de definitie van het 'Werk' zoals vermeld in deze Licentie uitsluitend omdat zij voldoen aan de criteria van het sui generis databankenrecht krachtens het nationale recht ter implementatie van de Europese Databankenrichtlijn. + + d. De in artikel 3 verleende rechten moeten worden uitgeoefend met inachtneming van het morele recht van de Maker (en/of de uitvoerende kunstenaar) om zich te verzetten tegen elke misvorming, verminking of andere aantasting van het werk, welke nadeel zou kunnen toebrengen aan de eer of de naam van de Maker (en/of de uitvoerende kunstenaar) of aan zijn waarde in deze hoedanigheid, indien en voor zover de Maker (en/of de uitvoerende kunstenaar) op grond van een op hem van toepassing zijnde wettelijke bepaling geen afstand kan doen van dat morele recht. + +5. Garantie en vrijwaring. + +TENZIJ ANDERS SCHRIFTELIJK IS OVEREENGEKOMEN DOOR DE PARTIJEN, STELT DE LICENTIEGEVER HET WERK BESCHIKBAAR OP 'AS-IS' BASIS, ZONDER ENIGE GARANTIE, HETZIJ DIRECT, INDIRECT OF ANDERSZINS, MET BETREKKING TOT HET WERK, MET INBEGRIP VAN, MAAR NIET BEPERKT TOT GARANTIES MET BETREKKING TOT DE EIGENDOMSTITEL, DE VERKOOPBAARHEID, DE GESCHIKTHEID VOOR BEPAALDE DOELEINDEN, MOGELIJKE INBREUK, DE AFWEZIGHEID VAN LATENTE OF ANDERE TEKORTKOMINGEN, DE JUISTHEID OF DE AAN- OF AFWEZIGHEID VAN FOUTEN, ONGEACHT DE OPSPOORBAARHEID DAARVAN, INDIEN EN VOORZOVER DE WET NIET ANDERS BEPAALT. + +6. Beperking van de aansprakelijkheid. + +DE LICENTIEGEVER AANVAARDT GEEN ENKELE AANSPRAKELIJKHEID JEGENS DE GEBRUIKER VOOR ENIGE BIJZONDERE OF INCIDENTELE SCHADE OF GEVOLGSCHADE VOORTVLOEIEND UIT DEZE LICENTIE OF HET GEBRUIK VAN HET WERK, ZELFS NIET INDIEN DE LICENTIEGEVER OP DE HOOGTE IS GESTELD VAN HET RISICO VAN DERGELIJKE SCHADE, INDIEN EN VOORZOVER DE WET NIET ANDERS BEPAALT. + +7. Beëindiging + + a. Deze Licentie en de daarin verleende rechten vervallen automatisch op het moment dat de Gebruiker in strijd handelt met de voorwaarden van deze Licentie. De licenties van natuurlijke personen of rechtspersonen die Verzamelwerken hebben ontvangen van de Gebruiker krachtens deze Licentie blijven echter in stand zolang dergelijke natuurlijke personen of rechtspersonen zich houden aan de voorwaarden van die licenties. Na de beëindiging van deze Licentie blijven artikelen 1, 2, 5, 6, 7 en 8 onverminderd van kracht. + + b. Met inachtneming van de hierboven vermelde voorwaarden wordt de Licentie verleend voor de duur van de toepasselijke intellectuele eigendomsrechten op het Werk. De Licentiegever behoudt zich desalniettemin te allen tijde het recht voor om het Werk volgens gewijzigde licentievoorwaarden te verspreiden of om het Werk niet langer te verspreiden; met dien verstande dat een dergelijk besluit niet de intrekking van deze Licentie (of enig andere licentie die volgens de voorwaarden van deze Licentie (verplicht) is verleend) tot gevolg heeft, en deze Licentie onverminderd van kracht blijft tenzij zij op de in lid a omschreven wijze wordt beëindigd. + +8. Diversen + + a. Elke keer dat de Gebruiker het Werk of een Verzamelwerk verspreidt of on-line beschikbaar stelt, biedt de Licentiegever de ontvanger een licentie op het Werk aan volgens de algemene voorwaarden van deze Licentie. + + b. Elke keer dat de Gebruiker een Afgeleid werk verspreidt of on-line beschikbaar stelt, biedt de Licentiegever de ontvanger een licentie op het oorspronkelijke werk aan volgens de algemene voorwaarden van deze Licentie. + + c. Indien enige bepaling van deze Licentie nietig of niet rechtens afdwingbaar is, zullen de overige voorwaarden van deze Licentie volledig van kracht blijven. De nietige of niet-afdwingbare bepaling zal, zonder tussenkomst van de partijen, worden vervangen door een geldige en afdwingbare bepaling waarbij het doel en de strekking van de oorspronkelijke bepaling zoveel mogelijk in acht worden genomen. + + d. Een verklaring van afstand van in deze Licentie verleende rechten of een wijziging van de voorwaarden van deze Licentie dient schriftelijk te geschieden en getekend te zijn door de partij die verantwoordelijk is voor de verklaring van afstand respectievelijk de partij wiens toestemming voor de wijziging is vereist. + + f. Deze Licentie bevat de volledige overeenkomst tussen de partijen met betrekking tot het in licentie gegeven Werk. Er zijn geen andere afspraken gemaakt met betrekking tot het Werk. De Licentiegever is niet gebonden aan enige aanvullende bepalingen die worden vermeld in mededelingen van de Gebruiker. Deze licentie kan uitsluitend worden gewijzigd met de wederzijdse, schriftelijke instemming van de Licentiegever en de Gebruiker. + +Aansprakelijkheid en merkrechten van Creative Commons + +Creative Commons is geen partij bij deze Licentie en stelt geen enkele garantie met betrekking tot het Werk. Creative Commons kan op geen enkele wijze aansprakelijk worden gehouden jegens de Gebruiker of derden voor enigerlei schade met inbegrip van, maar niet beperkt tot enige algemene, bijzondere, incidentele of gevolgschade voortvloeiend uit deze Licentie. Onverminderd het bepaalde in de twee (2) voorgaande volzinnen is Creative Commons gebonden aan alle rechten en verplichtingen van de Licentiegever indien Creative Commons zichzelf uitdrukkelijk kenbaar gemaakt heeft als de Licentiegever krachtens deze Licentie. + +Met uitzondering van het beperkte doel om iedereen erop te wijzen dat het Werk in licentie is gegeven krachtens de CCPL, geeft Creative Commons aan geen van de partijen toestemming om gebruik te maken van de merknaam 'Creative Commons', enige daarmee verband houdende merknamen dan wel het logo van Creative Commons gebruiken zonder de voorafgaande schriftelijke toestemming van Creative Commons. Het geoorloofde gebruik dient in overeenstemming te zijn met de alsdan geldende richtlijnen betreffende het gebruik van merknamen van Creative Commons zoals die bekend worden gemaakt op de website of anderszins van tijd tot tijd, desgevraagd, ter beschikking worden gesteld. Volledigheidshalve dient te worden vermeld dat deze merkrechtelijke beperking geen deel uitmaakt van de Licentie. + +U kunt contact opnemen met Creative Commons via de website: https://creativecommons.org/. diff --git a/options/license/CC-BY-3.0-US b/options/license/CC-BY-3.0-US new file mode 100644 index 000000000..c35a2b1a1 --- /dev/null +++ b/options/license/CC-BY-3.0-US @@ -0,0 +1,83 @@ +Creative Commons Attribution 3.0 United States + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with one or more other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. + + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. + + c. "Licensor" means the individual, individuals, entity or entities that offers the Work under the terms of this License. + + d. "Original Author" means the individual, individuals, entity or entities who created the Work. + + e. "Work" means the copyrightable work of authorship offered under the terms of this License. + + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. + +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; + + b. to create and reproduce Derivative Works provided that any such Derivative Work, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";; + + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; + + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. + + e. For the avoidance of doubt, where the Work is a musical composition: + + i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or, in the event that Licensor is a member of a performance rights society (e.g. ASCAP, BMI, SESAC), via that society, royalties for the public performance or public digital performance (e.g. webcast) of the Work. + + ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). + + f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). + +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of a recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. When You distribute, publicly display, publicly perform, or publicly digitally perform the Work, You may not impose any technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by Section 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by Section 4(b), as requested. + + b. If You distribute, publicly display, publicly perform, or publicly digitally perform the Work (as defined in Section 1 above) or any Derivative Works (as defined in Section 1 above) or Collective Works (as defined in Section 1 above), You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and, consistent with Section 3(b) in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(b) may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear, if a credit for all contributing authors of the Derivative Work or Collective Work appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. + +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND ONLY TO THE EXTENT OF ANY RIGHTS HELD IN THE LICENSED WORK BY THE LICENSOR. THE LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MARKETABILITY, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works (as defined in Section 1 above) or Collective Works (as defined in Section 1 above) from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. + + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +8. Miscellaneous + + a. Each time You distribute or publicly digitally perform the Work (as defined in Section 1 above) or a Collective Work (as defined in Section 1 above), the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. + + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + +Creative Commons Notice + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License. + +Creative Commons may be contacted at https://creativecommons.org/. diff --git a/options/license/CC-BY-4.0 b/options/license/CC-BY-4.0 index 3f92dfc5f..13ca539f3 100644 --- a/options/license/CC-BY-4.0 +++ b/options/license/CC-BY-4.0 @@ -1,324 +1,156 @@ -Creative Commons Attribution 4.0 International Creative Commons Corporation -("Creative Commons") is not a law firm and does not provide legal services -or legal advice. Distribution of Creative Commons public licenses does not -create a lawyer-client or other relationship. Creative Commons makes its licenses -and related information available on an "as-is" basis. Creative Commons gives -no warranties regarding its licenses, any material licensed under their terms -and conditions, or any related information. Creative Commons disclaims all -liability for damages resulting from their use to the fullest extent possible. +Creative Commons Attribution 4.0 International + + Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution -4.0 International Public License +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 – Definitions. -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. + a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. + b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. -c. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -d. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. + d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -e. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. + e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -f. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. + f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -g. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. + g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -h. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. + h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. -i. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. + i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -j. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. + j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -k. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. + k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 – Scope. - a. License grant. + a. License grant. -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: - A. reproduce and Share the Licensed Material, in whole or in part; and + A. reproduce and Share the Licensed Material, in whole or in part; and - B. produce, reproduce, and Share Adapted Material. + B. produce, reproduce, and Share Adapted Material. -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. + 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - 3. Term. The term of this Public License is specified in Section 6(a). + 3. Term. The term of this Public License is specified in Section 6(a). -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. + 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. - 5. Downstream recipients. + 5. Downstream recipients. -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. + A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. + B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). + 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - b. Other rights. +b. Other rights. -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. -2. Patent and trademark rights are not licensed under this Public License. + 2. Patent and trademark rights are not licensed under this Public License. -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties. + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 – License Conditions. -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. +Your exercise of the Licensed Rights is expressly made subject to the following conditions. - a. Attribution. + a. Attribution. -1. If You Share the Licensed Material (including in modified form), You must: + 1. If You Share the Licensed Material (including in modified form), You must: -A. retain the following if it is supplied by the Licensor with the Licensed -Material: + A. retain the following if it is supplied by the Licensor with the Licensed Material: -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - ii. a copyright notice; + ii. a copyright notice; - iii. a notice that refers to this Public License; + iii. a notice that refers to this Public License; - iv. a notice that refers to the disclaimer of warranties; + iv. a notice that refers to the disclaimer of warranties; -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. -4. If You Share Adapted Material You produce, the Adapter's License You apply -must not prevent recipients of the Adapted Material from complying with this -Public License. + 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 – Sui Generis Database Rights. -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database; + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and + b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. + c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 – Disclaimer of Warranties and Limitation of Liability. -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. + a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. + b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. + c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 – Term and Termination. -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. + a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: + b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - 2. upon express reinstatement by the Licensor. + 2. upon express reinstatement by the Licensor. -c. For the avoidance of doubt, this Section 6(b) does not affect any right -the Licensor may have to seek remedies for Your violations of this Public -License. + c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. -d. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. + d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. - e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 – Other Terms and Conditions. -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. + a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. + b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 – Interpretation. -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. + a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. + b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. + c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. + d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. diff --git a/options/license/CC-BY-NC-1.0 b/options/license/CC-BY-NC-1.0 index f553ccaba..1cc211eb9 100644 --- a/options/license/CC-BY-NC-1.0 +++ b/options/license/CC-BY-NC-1.0 @@ -1,203 +1,75 @@ -Creative Commons Attribution-NonCommercial 1.0 CREATIVE COMMONS CORPORATION -IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS -DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NonCommercial 1.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works; + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + b. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -c. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -By offering the Work for public release under this License, Licensor represents -and warrants that, to the best of Licensor's knowledge after reasonable inquiry: -Licensor has secured all rights in the Work necessary to grant the license -rights hereunder and to permit the lawful exercise of the rights granted hereunder -without You having any obligation to pay any royalties, compulsory license -fees, residuals or any other payments; The Work does not infringe the copyright, -trademark, publicity rights, common law rights or any other right of any third -party or constitute defamation, invasion of privacy or other tortious injury -to any third party. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE -AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN -"AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, -WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE -WORK. +By offering the Work for public release under this License, Licensor represents and warrants that, to the best of Licensor's knowledge after reasonable inquiry: Licensor has secured all rights in the Work necessary to grant the license rights hereunder and to permit the lawful exercise of the rights granted hereunder without You having any obligation to pay any royalties, compulsory license fees, residuals or any other payments; The Work does not infringe the copyright, trademark, publicity rights, common law rights or any other right of any third party or constitute defamation, invasion of privacy or other tortious injury to any third party. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM -BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE -TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE -OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN -IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-2.0 b/options/license/CC-BY-NC-2.0 index d84a86aed..3732ddfc9 100644 --- a/options/license/CC-BY-NC-2.0 +++ b/options/license/CC-BY-NC-2.0 @@ -1,228 +1,81 @@ -Creative Commons Attribution-NonCommercial 2.0 CREATIVE COMMONS CORPORATION -IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS -LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NonCommercial 2.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. -For the avoidance of doubt, where the Work is a musical composition or sound -recording, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered a Derivative Work for the purpose of -this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works; + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved, including -but not limited to the rights set forth in Sections 4(d) and 4(e). +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Sections 4(d) and 4(e). -4. Restrictions.The license granted in Section 3 above is expressly made subject -to and limited by the following restrictions: +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + b. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -c. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; to the extent reasonably practicable, the Uniform -Resource Identifier, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - d. For the avoidance of doubt, where the Work is a musical composition: + d. For the avoidance of doubt, where the Work is a musical composition: -i. Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive -right to collect, whether individually or via a performance rights society -(e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital -performance (e.g. webcast) of the Work if that performance is primarily intended -for or directed toward commercial advantage or private monetary compensation. + i. Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work if that performance is primarily intended for or directed toward commercial advantage or private monetary compensation. -ii. Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive -right to collect, whether individually or via a music rights agency or designated -agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from -the Work ("cover version") and distribute, subject to the compulsory license -created by 17 USC Section 115 of the US Copyright Act (or the equivalent in -other jurisdictions), if Your distribution of such cover version is primarily -intended for or directed toward commercial advantage or private monetary compensation. -Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where -the Work is a sound recording, Licensor reserves the exclusive right to collect, -whether individually or via a performance-rights society (e.g. SoundExchange), -royalties for the public digital performance (e.g. webcast) of the Work, subject -to the compulsory license created by 17 USC Section 114 of the US Copyright -Act (or the equivalent in other jurisdictions), if Your public digital performance -is primarily intended for or directed toward commercial advantage or private -monetary compensation. + ii. Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions), if Your distribution of such cover version is primarily intended for or directed toward commercial advantage or private monetary compensation. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor reserves the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions), if Your public digital performance is primarily intended for or directed toward commercial advantage or private monetary compensation. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-3.0 b/options/license/CC-BY-NC-3.0 index 25d8e7045..314fdb212 100644 --- a/options/license/CC-BY-NC-3.0 +++ b/options/license/CC-BY-NC-3.0 @@ -1,318 +1,95 @@ -Creative Commons Attribution-NonCommercial 3.0 Unported CREATIVE COMMONS CORPORATION -IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS -LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NonCommercial 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED -TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION -OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Adaptation" means a work based upon the Work, or upon the Work and other -pre-existing works, such as a translation, adaptation, derivative work, arrangement -of music or other alterations of a literary or artistic work, or phonogram -or performance and includes cinematographic adaptations or any other form -in which the Work may be recast, transformed, or adapted including in any -form recognizably derived from the original, except that a work that constitutes -a Collection will not be considered an Adaptation for the purpose of this -License. For the avoidance of doubt, where the Work is a musical work, performance -or phonogram, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered an Adaptation for the purpose of this -License. + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -b. "Collection" means a collection of literary or artistic works, such as -encyclopedias and anthologies, or performances, phonograms or broadcasts, -or other works or subject matter other than works listed in Section 1(f) below, -which, by reason of the selection and arrangement of their contents, constitute -intellectual creations, in which the Work is included in its entirety in unmodified -form along with one or more other contributions, each constituting separate -and independent works in themselves, which together are assembled into a collective -whole. A work that constitutes a Collection will not be considered an Adaptation -(as defined above) for the purposes of this License. + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -c. "Distribute" means to make available to the public the original and copies -of the Work or Adaptation, as appropriate, through sale or other transfer -of ownership. + c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. -d. "Licensor" means the individual, individuals, entity or entities that offer(s) -the Work under the terms of this License. + d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -e. "Original Author" means, in the case of a literary or artistic work, the -individual, individuals, entity or entities who created the Work or if no -individual or entity can be identified, the publisher; and in addition (i) -in the case of a performance the actors, singers, musicians, dancers, and -other persons who act, sing, deliver, declaim, play in, interpret or otherwise -perform literary or artistic works or expressions of folklore; (ii) in the -case of a phonogram the producer being the person or legal entity who first -fixes the sounds of a performance or other sounds; and, (iii) in the case -of broadcasts, the organization that transmits the broadcast. + e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -f. "Work" means the literary and/or artistic work offered under the terms -of this License including without limitation any production in the literary, -scientific and artistic domain, whatever may be the mode or form of its expression -including digital form, such as a book, pamphlet and other writing; a lecture, -address, sermon or other work of the same nature; a dramatic or dramatico-musical -work; a choreographic work or entertainment in dumb show; a musical composition -with or without words; a cinematographic work to which are assimilated works -expressed by a process analogous to cinematography; a work of drawing, painting, -architecture, sculpture, engraving or lithography; a photographic work to -which are assimilated works expressed by a process analogous to photography; -a work of applied art; an illustration, map, plan, sketch or three-dimensional -work relative to geography, topography, architecture or science; a performance; -a broadcast; a phonogram; a compilation of data to the extent it is protected -as a copyrightable work; or a work performed by a variety or circus performer -to the extent it is not otherwise considered a literary or artistic work. + f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -g. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -h. "Publicly Perform" means to perform public recitations of the Work and -to communicate to the public those public recitations, by any means or process, -including by wire or wireless means or public digital performances; to make -available to the public Works in such a way that members of the public may -access these Works from a place and at a place individually chosen by them; -to perform the Work to the public by any means or process and the communication -to the public of the performances of the Work, including by public digital -performance; to broadcast and rebroadcast the Work by any means including -signs, sounds or images. + h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -i. "Reproduce" means to make copies of the Work by any means including without -limitation by sound or visual recordings and the right of fixation and reproducing -fixations of the Work, including storage of a protected performance or phonogram -in digital form or other electronic medium. + i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. -2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, -or restrict any uses free from copyright or rights arising from limitations -or exceptions that are provided for in connection with the copyright protection -under copyright law or other applicable laws. +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to Reproduce the Work, to incorporate the Work into one or more Collections, -and to Reproduce the Work as incorporated in the Collections; + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; -b. to create and Reproduce Adaptations provided that any such Adaptation, -including any translation in any medium, takes reasonable steps to clearly -label, demarcate or otherwise identify that changes were made to the original -Work. For example, a translation could be marked "The original work was translated -from English to Spanish," or a modification could indicate "The original work -has been modified."; + b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; -c. to Distribute and Publicly Perform the Work including as incorporated in -Collections; and, + c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, - d. to Distribute and Publicly Perform Adaptations. + d. to Distribute and Publicly Perform Adaptations. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -Subject to Section 8(f), all rights not expressly granted by Licensor are -hereby reserved, including but not limited to the rights set forth in Section -4(d). +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may Distribute or Publicly Perform the Work only under the terms of -this License. You must include a copy of, or the Uniform Resource Identifier -(URI) for, this License with every copy of the Work You Distribute or Publicly -Perform. You may not offer or impose any terms on the Work that restrict the -terms of this License or the ability of the recipient of the Work to exercise -the rights granted to that recipient under the terms of the License. You may -not sublicense the Work. You must keep intact all notices that refer to this -License and to the disclaimer of warranties with every copy of the Work You -Distribute or Publicly Perform. When You Distribute or Publicly Perform the -Work, You may not impose any effective technological measures on the Work -that restrict the ability of a recipient of the Work from You to exercise -the rights granted to that recipient under the terms of the License. This -Section 4(a) applies to the Work as incorporated in a Collection, but this -does not require the Collection apart from the Work itself to be made subject -to the terms of this License. If You create a Collection, upon notice from -any Licensor You must, to the extent practicable, remove from the Collection -any credit as required by Section 4(c), as requested. If You create an Adaptation, -upon notice from any Licensor You must, to the extent practicable, remove -from the Adaptation any credit as required by Section 4(c), as requested. + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested. -b. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + b. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, -You must, unless a request has been made pursuant to Section 4(a), keep intact -all copyright notices for the Work and provide, reasonable to the medium or -means You are utilizing: (i) the name of the Original Author (or pseudonym, -if applicable) if supplied, and/or if the Original Author and/or Licensor -designate another party or parties (e.g., a sponsor institute, publishing -entity, journal) for attribution ("Attribution Parties") in Licensor's copyright -notice, terms of service or by other reasonable means, the name of such party -or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably -practicable, the URI, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and, (iv) consistent with Section 3(b), in the case -of an Adaptation, a credit identifying the use of the Work in the Adaptation -(e.g., "French translation of the Work by Original Author," or "Screenplay -based on original Work by Original Author"). The credit required by this Section -4(c) may be implemented in any reasonable manner; provided, however, that -in the case of a Adaptation or Collection, at a minimum such credit will appear, -if a credit for all contributing authors of the Adaptation or Collection appears, -then as part of these credits and in a manner at least as prominent as the -credits for the other contributing authors. For the avoidance of doubt, You -may only use the credit required by this Section for the purpose of attribution -in the manner set out above and, by exercising Your rights under this License, -You may not implicitly or explicitly assert or imply any connection with, -sponsorship or endorsement by the Original Author, Licensor and/or Attribution -Parties, as appropriate, of You or Your use of the Work, without the separate, -express prior written permission of the Original Author, Licensor and/or Attribution -Parties. + c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and, (iv) consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. - d. For the avoidance of doubt: + d. For the avoidance of doubt: -i. Non-waivable Compulsory License Schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -ii. Waivable Compulsory License Schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor reserves the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License if Your exercise -of such rights is for a purpose or use which is otherwise than noncommercial -as permitted under Section 4(b) and otherwise waives the right to collect -royalties through any statutory or compulsory licensing scheme; and, + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, -iii. Voluntary License Schemes. The Licensor reserves the right to collect -royalties, whether individually or, in the event that the Licensor is a member -of a collecting society that administers voluntary licensing schemes, via -that society, from any exercise by You of the rights granted under this License -that is for a purpose or use which is otherwise than noncommercial as permitted -under Section 4(c). + iii. Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(c). -e. Except as otherwise agreed in writing by the Licensor or as may be otherwise -permitted by applicable law, if You Reproduce, Distribute or Publicly Perform -the Work either by itself or as part of any Adaptations or Collections, You -must not distort, mutilate, modify or take other derogatory action in relation -to the Work which would be prejudicial to the Original Author's honor or reputation. -Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise -of the right granted in Section 3(b) of this License (the right to make Adaptations) -would be deemed to be a distortion, mutilation, modification or other derogatory -action prejudicial to the Original Author's honor and reputation, the Licensor -will waive or not assert, as appropriate, this Section, to the fullest extent -permitted by the applicable national law, to enable You to reasonably exercise -Your right under Section 3(b) of this License (right to make Adaptations) -but not otherwise. + e. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Adaptations or Collections from You under this License, -however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You Distribute or Publicly Perform the Work or a Collection, -the Licensor offers to the recipient a license to the Work on the same terms -and conditions as the license granted to You under this License. + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers -to the recipient a license to the original Work on the same terms and conditions -as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -f. The rights granted under, and the subject matter referenced, in this License -were drafted utilizing the terminology of the Berne Convention for the Protection -of Literary and Artistic Works (as amended on September 28, 1979), the Rome -Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances -and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised -on July 24, 1971). These rights and subject matter take effect in the relevant -jurisdiction in which the License terms are sought to be enforced according -to the corresponding provisions of the implementation of those treaty provisions -in the applicable national law. If the standard suite of rights granted under -applicable copyright law includes additional rights not granted under this -License, such additional rights are deemed to be included in the License; -this License is not intended to restrict the license of any rights under applicable -law. + f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. Creative Commons Notice -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, Creative Commons does not authorize the use by either -party of the trademark "Creative Commons" or any related trademark or logo -of Creative Commons without the prior written consent of Creative Commons. -Any permitted use will be in compliance with Creative Commons' then-current -trademark usage guidelines, as may be published on its website or otherwise -made available upon request from time to time. For the avoidance of doubt, -this trademark restriction does not form part of the License. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-3.0-DE b/options/license/CC-BY-NC-3.0-DE new file mode 100644 index 000000000..5d1181528 --- /dev/null +++ b/options/license/CC-BY-NC-3.0-DE @@ -0,0 +1,110 @@ +Creative Commons Namensnennung - Keine kommerzielle Nutzung 3.0 Deutschland + + CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. + +Lizenz + +DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. + +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. + +1. Definitionen + + a. Der Begriff "Abwandlung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange die eigenpersönlichen Züge des Schutzgegenstandes darin nicht verblassen und daran eigene Schutzrechte entstehen. Das kann insbesondere eine Bearbeitung, Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Abwandlung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Benutzung des Schutzgegenstandes. + + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder Abwandlungen im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit anzubieten oder in Verkehr zu bringen. + + d. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + + e. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person oder Gruppe von Personen, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und bei dem eine Einräumung von Nutzungsrechten oder eine Weiterübertragung an Dritte möglich ist. + + f. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine persönliche geistige Schöpfung jeglicher Art, ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff "Schutzgegenstand" im Sinne dieser Lizenz. + + g. Mit "Sie" bzw. "Ihne*" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährten Nutzungsrechte trotz eines vorherigen Verstoßes auszuüben. + + h. Unter "Öffentlich Zeigen" im Sinne dieser Lizenz sind Veröffentlichungen und Präsentationen des Schutzgegenstandes zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und in unkörperlicher Form mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung, zeit- und ortsunabhängiger Zugänglichmachung oder in körperlicher Form mittels Ausstellung erfolgen, unabhängig von bestimmten Veranstaltungen und unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + + i. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, mittels beliebiger Verfahren Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch den Vorgang, erstmals körperliche Fixierungen des Schutzgegenstandes sowie Vervielfältigungsstücke dieser Fixierungen anzufertigen, sowie die Übertragung des Schutzgegenstandes auf einen Bild- oder Tonträger oder auf ein anderes elektronisches Medium, gleichviel ob in digitaler oder analoger Form. + +2. Schranken des Immaterialgüterrechts. Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die Ihnen aufgrund der Schranken des Urheberrechts oder anderer Rechtsnormen bereits ohne Weiteres zustehen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. + +3. Einräumung von Nutzungsrechten. Unter den Bedingungen dieser Lizenz räumt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 4.e) - das vergütungsfreie, räumlich und zeitlich (für die Dauer des Schutzrechts am Schutzgegenstand) unbeschränkte einfache Recht ein, den Schutzgegenstand auf die folgenden Arten und Weisen zu nutzen ("unentgeltlich eingeräumtes einfaches Nutzungsrecht für jedermann"): + + a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; + + b. Abwandlungen des Schutzgegenstandes anzufertigen, einschließlich Übersetzungen unter Nutzung jedweder Medien, sofern deutlich erkennbar gemacht wird, dass es sich um Abwandlungen handelt; + + c. den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich zu zeigen und zu verbreiten; + + d. Abwandlungen des Schutzgegenstandes zu veröffentlichen, öffentlich zu zeigen und zu verbreiten. + +Das vorgenannte Nutzungsrecht wird für alle bekannten sowie für alle noch nicht bekannten Nutzungsarten eingeräumt. Es beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich durch den Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf sämtliche aus diesem Schutz resultierenden Rechte. + +4. Bedingungen. Die Einräumung des Nutzungsrechts gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: + + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich zeigen. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.a) gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.c) aufgezählten Hinweise entfernen. Wenn Sie eine Abwandlung vornehmen, müssen Sie auf die Mitteilung eines Lizenzgebers hin von der Abwandlung die in Abschnitt 4.c) aufgezählten Hinweise entfernen. + + b. Die Rechteeinräumung gemäß Abschnitt 3 gilt nur für Handlungen, die nicht vorrangig auf einen geschäftlichen Vorteil oder eine geldwerte Vergütung gerichtet sind ("nicht-kommerzielle Nutzung", "Non-commercial-Option"). Wird Ihnen in Zusammenhang mit dem Schutzgegenstand dieser Lizenz ein anderer Schutzgegenstand überlassen, ohne dass eine vertragliche Verpflichtung hierzu besteht (etwa im Wege von File-Sharing), so wird dies nicht als auf geschäftlichen Vorteil oder geldwerte Vergütung gerichtet angesehen, wenn in Verbindung mit dem Austausch der Schutzgegenstände tatsächlich keine Zahlung oder geldwerte Vergütung geleistet wird. + + c. Die Verbreitung und das öffentliche Zeigen des Schutzgegenstandes oder auf ihm aufbauender Abwandlungen oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie - soweit bekannt - Folgendes angeben: + + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers und / oder, falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) ("Zuschreibungsempfänger"), Namen bzw. Bezeichnung dieses oder dieser Dritten; + + ii. den Titel des Inhaltes; + + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand; + + iv. und im Falle einer Abwandlung des Schutzgegenstandes in Übereinstimmung mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Abwandlung handelt. + + Die nach diesem Abschnitt 4.c) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle einer Abwandlung des Schutzgegenstandes oder eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung mehrerer Rechteinhaber dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Lizenzgebers und / oder des Zuschreibungsempfängers weder explizit noch implizit irgendeine Verbindung zum Lizenzgeber oder Zuschreibungsempfänger und ebenso wenig eine Unterstützung oder Billigung durch ihn andeuten. + + d. Die oben unter 4.a) bis c) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. + + e. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechende Vergütung einzuziehen für jede Ausübung eines Rechts aus dieser Lizenz durch Sie. + + ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, behält sich der Lizenzgeber das ausschließliche Recht auf Einziehung der entsprechenden Vergütung für den Fall vor, dass Sie eine Nutzung des Schutzgegenstandes für andere als die in Abschnitt 4.b) als nicht-kommerziell definierten Zwecke vornehmen, verzichtet für alle übrigen, lizenzgerechten Fälle von Nutzung jedoch auf jegliche Vergütung. + + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Einziehung der Vergütung durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. Der Lizenzgeber behält sich jedoch das ausschließliche Recht auf Einziehung der entsprechenden Vergütung (durch ihn selbst oder eine Verwertungsgesellschaft) für den Fall vor, dass Sie eine Nutzung des Schutzgegenstandes für andere als die in Abschnitt 4.b) als nicht-kommerziell definierten Zwecke vornehmen. + + f. Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. + +5. Gewährleistung + +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE EINRÄUMUNG VON RECHTEN UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. DIESE GEWÄHRLEISTUNGSBESCHRÄNKUNG GILT NICHT, SOWEIT MÄNGEL ZU SCHÄDEN DER IN ABSCHNITT 6 BEZEICHNETEN ART FÜHREN UND AUF SEITEN DES LIZENZGEBERS DAS JEWEILS GENANNTE VERSCHULDEN BZW. VERTRETENMÜSSEN EBENFALLS VORLIEGT. + +6. Haftungsbeschränkung + +DER LIZENZGEBER HAFTET IHNEN GEGENÜBER IN BEZUG AUF SCHÄDEN AUS DER VERLETZUNG DES LEBENS, DES KÖRPERS ODER DER GESUNDHEIT NUR, SOFERN IHM WENIGSTENS FAHRLÄSSIGKEIT VORZUWERFEN IST, FÜR SONSTIGE SCHÄDEN NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG. + +7. Erlöschen + + a. Diese Lizenz und die durch sie eingeräumten Nutzungsrechte erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die Abwandlungen des Schutzgegenstandes oder diesen enthaltende Sammelwerke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. + + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. + +8. Sonstige Bestimmungen + + a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + b. Jedes Mal wenn Sie eine Abwandlung des Schutzgegenstandes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz am ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen unberührt. + + d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. + + e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß Ziffern 8.a) und b) angeboteten Lizenzen aus. + + f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Bundesrepublik Deutschland Anwendung. + + +Creative Commons Notice + +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. + +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. + +Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-NC-4.0 b/options/license/CC-BY-NC-4.0 index 1a7960976..340cf0c95 100644 --- a/options/license/CC-BY-NC-4.0 +++ b/options/license/CC-BY-NC-4.0 @@ -1,354 +1,158 @@ -Creative Commons Attribution-NonCommercial 4.0 International Creative Commons -Corporation ("Creative Commons") is not a law firm and does not provide legal -services or legal advice. Distribution of Creative Commons public licenses -does not create a lawyer-client or other relationship. Creative Commons makes -its licenses and related information available on an "as-is" basis. Creative -Commons gives no warranties regarding its licenses, any material licensed -under their terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the fullest -extent possible. +Creative Commons Attribution-NonCommercial 4.0 International + + Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. - - - -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors - - - -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution-NonCommercial -4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. - - - - Section 1 – Definitions. - -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. - -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. - -c. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - -d. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. - -e. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. - -f. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. - -g. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. - -h. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. - -i. NonCommercial means not primarily intended for or directed towards commercial -advantage or monetary compensation. For purposes of this Public License, the -exchange of the Licensed Material for other material subject to Copyright -and Similar Rights by digital file-sharing or similar means is NonCommercial -provided there is no payment of monetary compensation in connection with the -exchange. - -j. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. - -k. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. - -l. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. - - - - Section 2 – Scope. - - a. License grant. - -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. -A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial -purposes only; and +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. -B. produce, reproduce, and Share Adapted Material for NonCommercial purposes -only. +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. +Creative Commons Attribution-NonCommercial 4.0 International Public License - 3. Term. The term of this Public License is specified in Section 6(a). +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. +Section 1 – Definitions. - 5. Downstream recipients. + a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. + b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. + c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). + d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. - b. Other rights. + e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. + f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -2. Patent and trademark rights are not licensed under this Public License. + g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties, including when the Licensed Material is used other -than for NonCommercial purposes. + h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. - + i. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. - Section 3 – License Conditions. + j. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. + k. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. - a. Attribution. + l. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. -1. If You Share the Licensed Material (including in modified form), You must: +Section 2 – Scope. -A. retain the following if it is supplied by the Licensor with the Licensed -Material: + a. License grant. -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: - ii. a copyright notice; + A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and - iii. a notice that refers to this Public License; + B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only. - iv. a notice that refers to the disclaimer of warranties; + 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + 3. Term. The term of this Public License is specified in Section 6(a). -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and + 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. + 5. Downstream recipients. -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. + A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. + B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -4. If You Share Adapted Material You produce, the Adapter's License You apply -must not prevent recipients of the Adapted Material from complying with this -Public License. + 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - + b. Other rights. - Section 4 – Sui Generis Database Rights. + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: + 2. Patent and trademark rights are not licensed under this Public License. -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database for NonCommercial purposes only; + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and +Section 3 – License Conditions. -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. +Your exercise of the Licensed Rights is expressly made subject to the following conditions. -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. + a. Attribution. - + 1. If You Share the Licensed Material (including in modified form), You must: - Section 5 – Disclaimer of Warranties and Limitation of Liability. + A. retain the following if it is supplied by the Licensor with the Licensed Material: -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. + ii. a copyright notice; -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. + iii. a notice that refers to this Public License; - + iv. a notice that refers to the disclaimer of warranties; - Section 6 – Term and Termination. + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. - 2. upon express reinstatement by the Licensor. + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. -For the avoidance of doubt, this Section 6(b) does not affect any right the -Licensor may have to seek remedies for Your violations of this Public License. + 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. -c. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. +Section 4 – Sui Generis Database Rights. - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: - + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only; - Section 7 – Other Terms and Conditions. + b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. + c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. +Section 5 – Disclaimer of Warranties and Limitation of Liability. - + a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. - Section 8 – Interpretation. + b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. + c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. +Section 6 – Term and Termination. -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. + a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. + b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +Section 8 – Interpretation. + + a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + + c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + + d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. diff --git a/options/license/CC-BY-NC-ND-1.0 b/options/license/CC-BY-NC-ND-1.0 index 3e599c853..91bde04a9 100644 --- a/options/license/CC-BY-NC-ND-1.0 +++ b/options/license/CC-BY-NC-ND-1.0 @@ -1,191 +1,75 @@ -Creative Commons Attribution-NoDerivs-NonCommercial 1.0 CREATIVE COMMONS CORPORATION -IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS -DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NoDerivs-NonCommercial 1.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; -b. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + b. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. -b. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + b. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -c. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Collective Works, You must keep intact all copyright -notices for the Work and give the Original Author credit reasonable to the -medium or means You are utilizing by conveying the name (or pseudonym if applicable) -of the Original Author if supplied; the title of the Work if supplied. Such -credit may be implemented in any reasonable manner; provided, however, that -in the case of a Collective Work, at a minimum such credit will appear where -any other comparable authorship credit appears and in a manner at least as -prominent as such other comparable authorship credit. + c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied. Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -a. By offering the Work for public release under this License, Licensor represents -and warrants that, to the best of Licensor's knowledge after reasonable inquiry: + a. By offering the Work for public release under this License, Licensor represents and warrants that, to the best of Licensor's knowledge after reasonable inquiry: -i. Licensor has secured all rights in the Work necessary to grant the license -rights hereunder and to permit the lawful exercise of the rights granted hereunder -without You having any obligation to pay any royalties, compulsory license -fees, residuals or any other payments; + i. Licensor has secured all rights in the Work necessary to grant the license rights hereunder and to permit the lawful exercise of the rights granted hereunder without You having any obligation to pay any royalties, compulsory license fees, residuals or any other payments; -ii. The Work does not infringe the copyright, trademark, publicity rights, -common law rights or any other right of any third party or constitute defamation, -invasion of privacy or other tortious injury to any third party. + ii. The Work does not infringe the copyright, trademark, publicity rights, common law rights or any other right of any third party or constitute defamation, invasion of privacy or other tortious injury to any third party. -b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING -OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. + b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM -BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE -TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE -OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN -IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Collective Works from You under this License, however, will -not have their licenses terminated provided such individuals or entities remain -in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will -survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -d. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + d. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-ND-2.0 b/options/license/CC-BY-NC-ND-2.0 index a19bdb4b0..fe0df2004 100644 --- a/options/license/CC-BY-NC-ND-2.0 +++ b/options/license/CC-BY-NC-ND-2.0 @@ -1,215 +1,77 @@ -Creative Commons Attribution-NonCommercial-NoDerivs 2.0 CREATIVE COMMONS CORPORATION -IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS -LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NonCommercial-NoDerivs 2.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. -For the avoidance of doubt, where the Work is a musical composition or sound -recording, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered a Derivative Work for the purpose of -this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; -b. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + b. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats, -but otherwise you have no rights to make Derivative Works. All rights not -expressly granted by Licensor are hereby reserved, including but not limited -to the rights set forth in Sections 4(d) and 4(e). +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Derivative Works. All rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Sections 4(d) and 4(e). -4. Restrictions.The license granted in Section 3 above is expressly made subject -to and limited by the following restrictions: +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. -b. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + b. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -c. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work, You must keep intact all copyright notices for the Work -and give the Original Author credit reasonable to the medium or means You -are utilizing by conveying the name (or pseudonym if applicable) of the Original -Author if supplied; the title of the Work if supplied; and to the extent reasonably -practicable, the Uniform Resource Identifier, if any, that Licensor specifies -to be associated with the Work, unless such URI does not refer to the copyright -notice or licensing information for the Work. Such credit may be implemented -in any reasonable manner; provided, however, that in the case of a Collective -Work, at a minimum such credit will appear where any other comparable authorship -credit appears and in a manner at least as prominent as such other comparable -authorship credit. + c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; and to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - d. For the avoidance of doubt, where the Work is a musical composition: + d. For the avoidance of doubt, where the Work is a musical composition: -i. Performancf Royalties Under Blanket Licenses. Licensor reserves the exclusive -right to collect, whether individually or via a performance rights society -(e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital -performance (e.g. webcast) of the Work if that performance is primarily intended -for or directed toward commercial advantage or private monetary compensation. + i. Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work if that performance is primarily intended for or directed toward commercial advantage or private monetary compensation. -ii. Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive -right to collect, whether individually or via a music rights agency or designated -agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from -the Work ("cover version") and distribute, subject to the compulsory license -created by 17 USC Section 115 of the US Copyright Act (or the equivalent in -other jurisdictions), if Your distribution of such cover version is primarily -intended for or directed toward commercial advantage or private monetary compensation. + ii. Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions), if Your distribution of such cover version is primarily intended for or directed toward commercial advantage or private monetary compensation. -e. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, -where the Work is a sound recording, Licensor reserves the exclusive right -to collect, whether individually or via a performance-rights society (e.g. -SoundExchange), royalties for the public digital performance (e.g. webcast) -of the Work, subject to the compulsory license created by 17 USC Section 114 -of the US Copyright Act (or the equivalent in other jurisdictions), if Your -public digital performance is primarily intended for or directed toward commercial -advantage or private monetary compensation. + e. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor reserves the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions), if Your public digital performance is primarily intended for or directed toward commercial advantage or private monetary compensation. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Collective Works from You under this License, however, will -not have their licenses terminated provided such individuals or entities remain -in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will -survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -d. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + d. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-ND-3.0 b/options/license/CC-BY-NC-ND-3.0 index 15de8fee7..9c3098359 100644 --- a/options/license/CC-BY-NC-ND-3.0 +++ b/options/license/CC-BY-NC-ND-3.0 @@ -1,290 +1,89 @@ -Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported CREATIVE -COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. -DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. -CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS -MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY -FOR DAMAGES RESULTING FROM ITS USE. +Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED -TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION -OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Adaptation" means a work based upon the Work, or upon the Work and other -pre-existing works, such as a translation, adaptation, derivative work, arrangement -of music or other alterations of a literary or artistic work, or phonogram -or performance and includes cinematographic adaptations or any other form -in which the Work may be recast, transformed, or adapted including in any -form recognizably derived from the original, except that a work that constitutes -a Collection will not be considered an Adaptation for the purpose of this -License. For the avoidance of doubt, where the Work is a musical work, performance -or phonogram, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered an Adaptation for the purpose of this -License. + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -b. "Collection" means a collection of literary or artistic works, such as -encyclopedias and anthologies, or performances, phonograms or broadcasts, -or other works or subject matter other than works listed in Section 1(f) below, -which, by reason of the selection and arrangement of their contents, constitute -intellectual creations, in which the Work is included in its entirety in unmodified -form along with one or more other contributions, each constituting separate -and independent works in themselves, which together are assembled into a collective -whole. A work that constitutes a Collection will not be considered an Adaptation -(as defined above) for the purposes of this License. + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -c. "Distribute" means to make available to the public the original and copies -of the Work through sale or other transfer of ownership. + c. "Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership. -d. "Licensor" means the individual, individuals, entity or entities that offer(s) -the Work under the terms of this License. + d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -e. "Original Author" means, in the case of a literary or artistic work, the -individual, individuals, entity or entities who created the Work or if no -individual or entity can be identified, the publisher; and in addition (i) -in the case of a performance the actors, singers, musicians, dancers, and -other persons who act, sing, deliver, declaim, play in, interpret or otherwise -perform literary or artistic works or expressions of folklore; (ii) in the -case of a phonogram the producer being the person or legal entity who first -fixes the sounds of a performance or other sounds; and, (iii) in the case -of broadcasts, the organization that transmits the broadcast. + e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -f. "Work" means the literary and/or artistic work offered under the terms -of this License including without limitation any production in the literary, -scientific and artistic domain, whatever may be the mode or form of its expression -including digital form, such as a book, pamphlet and other writing; a lecture, -address, sermon or other work of the same nature; a dramatic or dramatico-musical -work; a choreographic work or entertainment in dumb show; a musical composition -with or without words; a cinematographic work to which are assimilated works -expressed by a process analogous to cinematography; a work of drawing, painting, -architecture, sculpture, engraving or lithography; a photographic work to -which are assimilated works expressed by a process analogous to photography; -a work of applied art; an illustration, map, plan, sketch or three-dimensional -work relative to geography, topography, architecture or science; a performance; -a broadcast; a phonogram; a compilation of data to the extent it is protected -as a copyrightable work; or a work performed by a variety or circus performer -to the extent it is not otherwise considered a literary or artistic work. + f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -g. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -h. "Publicly Perform" means to perform public recitations of the Work and -to communicate to the public those public recitations, by any means or process, -including by wire or wireless means or public digital performances; to make -available to the public Works in such a way that members of the public may -access these Works from a place and at a place individually chosen by them; -to perform the Work to the public by any means or process and the communication -to the public of the performances of the Work, including by public digital -performance; to broadcast and rebroadcast the Work by any means including -signs, sounds or images. + h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -i. "Reproduce" means to make copies of the Work by any means including without -limitation by sound or visual recordings and the right of fixation and reproducing -fixations of the Work, including storage of a protected performance or phonogram -in digital form or other electronic medium. + i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. -2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, -or restrict any uses free from copyright or rights arising from limitations -or exceptions that are provided for in connection with the copyright protection -under copyright law or other applicable laws. +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to Reproduce the Work, to incorporate the Work into one or more Collections, -and to Reproduce the Work as incorporated in the Collections; and, + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and, -b. to Distribute and Publicly Perform the Work including as incorporated in -Collections. + b. to Distribute and Publicly Perform the Work including as incorporated in Collections. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats, -but otherwise you have no rights to make Adaptations. Subject to 8(f), all -rights not expressly granted by Licensor are hereby reserved, including but -not limited to the rights set forth in Section 4(d). +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may Distribute or Publicly Perform the Work only under the terms of -this License. You must include a copy of, or the Uniform Resource Identifier -(URI) for, this License with every copy of the Work You Distribute or Publicly -Perform. You may not offer or impose any terms on the Work that restrict the -terms of this License or the ability of the recipient of the Work to exercise -the rights granted to that recipient under the terms of the License. You may -not sublicense the Work. You must keep intact all notices that refer to this -License and to the disclaimer of warranties with every copy of the Work You -Distribute or Publicly Perform. When You Distribute or Publicly Perform the -Work, You may not impose any effective technological measures on the Work -that restrict the ability of a recipient of the Work from You to exercise -the rights granted to that recipient under the terms of the License. This -Section 4(a) applies to the Work as incorporated in a Collection, but this -does not require the Collection apart from the Work itself to be made subject -to the terms of this License. If You create a Collection, upon notice from -any Licensor You must, to the extent practicable, remove from the Collection -any credit as required by Section 4(c), as requested. + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. -b. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + b. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -c. If You Distribute, or Publicly Perform the Work or Collections, You must, -unless a request has been made pursuant to Section 4(a), keep intact all copyright -notices for the Work and provide, reasonable to the medium or means You are -utilizing: (i) the name of the Original Author (or pseudonym, if applicable) -if supplied, and/or if the Original Author and/or Licensor designate another -party or parties (e.g., a sponsor institute, publishing entity, journal) for -attribution ("Attribution Parties") in Licensor's copyright notice, terms -of service or by other reasonable means, the name of such party or parties; -(ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, -the URI, if any, that Licensor specifies to be associated with the Work, unless -such URI does not refer to the copyright notice or licensing information for -the Work. The credit required by this Section 4(c) may be implemented in any -reasonable manner; provided, however, that in the case of a Collection, at -a minimum such credit will appear, if a credit for all contributing authors -of Collection appears, then as part of these credits and in a manner at least -as prominent as the credits for the other contributing authors. For the avoidance -of doubt, You may only use the credit required by this Section for the purpose -of attribution in the manner set out above and, by exercising Your rights -under this License, You may not implicitly or explicitly assert or imply any -connection with, sponsorship or endorsement by the Original Author, Licensor -and/or Attribution Parties, as appropriate, of You or Your use of the Work, -without the separate, express prior written permission of the Original Author, -Licensor and/or Attribution Parties. + c. If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. - d. For the avoidance of doubt: + d. For the avoidance of doubt: -i. Non-waivable Compulsory License Schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -ii. Waivable Compulsory License Schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor reserves the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License if Your exercise -of such rights is for a purpose or use which is otherwise than noncommercial -as permitted under Section 4(b) and otherwise waives the right to collect -royalties through any statutory or compulsory licensing scheme; and, + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, -iii. Voluntary License Schemes. The Licensor reserves the right to collect -royalties, whether individually or, in the event that the Licensor is a member -of a collecting society that administers voluntary licensing schemes, via -that society, from any exercise by You of the rights granted under this License -that is for a purpose or use which is otherwise than noncommercial as permitted -under Section 4(b). + iii. Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b). -e. Except as otherwise agreed in writing by the Licensor or as may be otherwise -permitted by applicable law, if You Reproduce, Distribute or Publicly Perform -the Work either by itself or as part of any Collections, You must not distort, -mutilate, modify or take other derogatory action in relation to the Work which -would be prejudicial to the Original Author's honor or reputation. + e. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Collections from You under this License, however, will not -have their licenses terminated provided such individuals or entities remain -in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will -survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You Distribute or Publicly Perform the Work or a Collection, -the Licensor offers to the recipient a license to the Work on the same terms -and conditions as the license granted to You under this License. + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -d. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + d. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -e. The rights granted under, and the subject matter referenced, in this License -were drafted utilizing the terminology of the Berne Convention for the Protection -of Literary and Artistic Works (as amended on September 28, 1979), the Rome -Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances -and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised -on July 24, 1971). These rights and subject matter take effect in the relevant -jurisdiction in which the License terms are sought to be enforced according -to the corresponding provisions of the implementation of those treaty provisions -in the applicable national law. If the standard suite of rights granted under -applicable copyright law includes additional rights not granted under this -License, such additional rights are deemed to be included in the License; -this License is not intended to restrict the license of any rights under applicable -law. + e. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. Creative Commons Notice -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, Creative Commons does not authorize the use by either -party of the trademark "Creative Commons" or any related trademark or logo -of Creative Commons without the prior written consent of Creative Commons. -Any permitted use will be in compliance with Creative Commons' then-current -trademark usage guidelines, as may be published on its website or otherwise -made available upon request from time to time. For the avoidance of doubt, -this trademark restriction does not form part of this License. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-ND-3.0-DE b/options/license/CC-BY-NC-ND-3.0-DE new file mode 100644 index 000000000..06d59d675 --- /dev/null +++ b/options/license/CC-BY-NC-ND-3.0-DE @@ -0,0 +1,101 @@ +Creative Commons Namensnennung - Keine kommerzielle Nutzung - Keine Bearbeitungen 3.0 Deutschland + + CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. + +Lizenz + +DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. + +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. + +1. Definitionen + + a. Der Begriff "Abwandlung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange die eigenpersönlichen Züge des Schutzgegenstandes darin nicht verblassen und daran eigene Schutzrechte entstehen. Das kann insbesondere eine Bearbeitung, Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Abwandlung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Benutzung des Schutzgegenstandes. + + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit anzubieten oder in Verkehr zu bringen. + + d. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + + e. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person oder Gruppe von Personen, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und bei dem eine Einräumung von Nutzungsrechten oder eine Weiterübertragung an Dritte möglich ist. + + f. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine persönliche geistige Schöpfung jeglicher Art, ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff "Schutzgegenstand" im Sinne dieser Lizenz. + + g. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährten Nutzungsrechte trotz eines vorherigen Verstoßes auszuüben. + + h. Unter "Öffentlich Zeigen" im Sinne dieser Lizenz sind Veröffentlichungen und Präsentationen des Schutzgegenstandes zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und in unkörperlicher Form mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung, zeit- und ortsunabhängiger Zugänglichmachung oder in körperlicher Form mittels Ausstellung erfolgen, unabhängig von bestimmten Veranstaltungen und unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + + i. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, mittels beliebiger Verfahren Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch den Vorgang, erstmals körperliche Fixierungen des Schutzgegenstandes sowie Vervielfältigungsstücke dieser Fixierungen anzufertigen, sowie die Übertragung des Schutzgegenstandes auf einen Bild- oder Tonträger oder auf ein anderes elektronisches Medium, gleichviel ob in digitaler oder analoger Form. + +2. Schranken des Immaterialgüterrechts. Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die Ihnen aufgrund der Schranken des Urheberrechts oder anderer Rechtsnormen bereits ohne Weiteres zustehen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. + +3. Einräumung von Nutzungsrechten. Unter den Bedingungen dieser Lizenz räumt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 4.e) - das vergütungsfreie, räumlich und zeitlich (für die Dauer des Schutzrechts am Schutzgegenstand) unbeschränkte einfache Recht ein, den Schutzgegenstand auf die folgenden Arten und Weisen zu nutzen ("unentgeltlich eingeräumtes einfaches Nutzungsrecht für jedermann"): + + a. den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; + + b. den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich zu zeigen und zu verbreiten. + +Das vorgenannte Nutzungsrecht wird für alle bekannten sowie für alle noch nicht bekannten Nutzungsarten eingeräumt. Es beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Weitergehende Änderungen oder Abwandlungen sind jedoch untersagt. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich durch den Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf sämtliche aus diesem Schutz resultierenden Rechte. + +4. Bedingungen. Die Einräumung des Nutzungsrechts gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: + + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich zeigen. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.a) gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.c) aufgezählten Hinweise entfernen. + + b. Die Rechteeinräumung gemäß Abschnitt 3 gilt nur für Handlungen, die nicht vorrangig auf einen geschäftlichen Vorteil oder eine geldwerte Vergütung gerichtet sind ("nicht-kommerzielle Nutzung", "Non-commercial-Option"). Wird Ihnen in Zusammenhang mit dem Schutzgegenstand dieser Lizenz ein anderer Schutzgegenstand überlassen, ohne dass eine vertragliche Verpflichtung hierzu besteht (etwa im Wege von File-Sharing), so wird dies nicht als auf geschäftlichen Vorteil oder geldwerte Vergütung gerichtet angesehen, wenn in Verbindung mit dem Austausch der Schutzgegenstände tatsächlich keine Zahlung oder geldwerte Vergütung geleistet wird. + + c. Die Verbreitung und das öffentliche Zeigen des Schutzgegenstandes oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie - soweit bekannt - Folgendes angeben: + + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers und / oder, falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) ("Zuschreibungsempfänger"), Namen bzw. Bezeichnung dieses oder dieser Dritten; + + ii. den Titel des Inhaltes; + + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand. + + Die nach diesem Abschnitt 4.c) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung mehrerer Rechteinhaber dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Lizenzgebers und / oder des Zuschreibungsempfängers weder explizit noch implizit irgendeine Verbindung zum Lizenzgeber oder Zuschreibungsempfänger und ebenso wenig eine Unterstützung oder Billigung durch ihn andeuten. + + d. Die oben unter 4.a) bis c) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. + + e. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechende Vergütung einzuziehen für jede Ausübung eines Rechts aus dieser Lizenz durch Sie. + + ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, behält sich der Lizenzgeber das ausschließliche Recht auf Einziehung der entsprechenden Vergütung für den Fall vor, dass Sie eine Nutzung des Schutzgegenstandes für andere als die in Abschnitt 4.b) als nicht-kommerziell definierten Zwecke vornehmen, verzichtet für alle übrigen, lizenzgerechten Fälle von Nutzung jedoch auf jegliche Vergütung. + + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Einziehung der Vergütung durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. Der Lizenzgeber behält sich jedoch das ausschließliche Recht auf Einziehung der entsprechenden Vergütung (durch ihn selbst oder eine Verwertungsgesellschaft) für den Fall vor, dass Sie eine Nutzung des Schutzgegenstandes für andere als die in Abschnitt 4.b) als nicht-kommerziell definierten Zwecke vornehmen. + + f. Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. + +5. Gewährleistung + +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE EINRÄUMUNG VON RECHTEN UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. DIESE GEWÄHRLEISTUNGSBESCHRÄNKUNG GILT NICHT, SOWEIT MÄNGEL ZU SCHÄDEN DER IN ABSCHNITT 6 BEZEICHNETEN ART FÜHREN UND AUF SEITEN DES LIZENZGEBERS DAS JEWEILS GENANNTE VERSCHULDEN BZW. VERTRETENMÜSSEN EBENFALLS VORLIEGT. + +6. Haftungsbeschränkung + +DER LIZENZGEBER HAFTET IHNEN GEGENÜBER IN BEZUG AUF SCHÄDEN AUS DER VERLETZUNG DES LEBENS, DES KÖRPERS ODER DER GESUNDHEIT NUR, SOFERN IHM WENIGSTENS FAHRLÄSSIGKEIT VORZUWERFEN IST, FÜR SONSTIGE SCHÄDEN NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG. + +7. Erlöschen + + a. Diese Lizenz und die durch sie eingeräumten Nutzungsrechte erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die den Schutzgegenstand enthaltende Sammelwerke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. + + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. + +8. Sonstige Bestimmungen + + a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + b. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen unberührt. + + c. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. + + d. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß Ziffern 8.a) angeboteten Lizenzen aus. + + e. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Bundesrepublik Deutschland Anwendung. + +Creative Commons Notice + +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. + +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. + +Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-NC-ND-3.0-IGO b/options/license/CC-BY-NC-ND-3.0-IGO index b56ae7284..c5b3226c1 100644 --- a/options/license/CC-BY-NC-ND-3.0-IGO +++ b/options/license/CC-BY-NC-ND-3.0-IGO @@ -1,295 +1,99 @@ Attribution-NonCommercial-NoDerivs 3.0 IGO -CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL -SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT -RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. -CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND -DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. THE LICENSOR IS NOT -NECESSARILY AN INTERGOVERNMENTAL ORGANIZATION (IGO), AS DEFINED IN THE LICENSE -BELOW. +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. THE LICENSOR IS NOT NECESSARILY AN INTERGOVERNMENTAL ORGANIZATION (IGO), AS DEFINED IN THE LICENSE BELOW. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("LICENSE"). THE LICENSOR (DEFINED BELOW) HOLDS COPYRIGHT AND -OTHER RIGHTS IN THE WORK. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER -THIS LICENSE IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("LICENSE"). THE LICENSOR (DEFINED BELOW) HOLDS COPYRIGHT AND OTHER RIGHTS IN THE WORK. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION FOR YOUR ACCEPTANCE AND AGREEMENT TO THE TERMS -OF THE LICENSE. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION FOR YOUR ACCEPTANCE AND AGREEMENT TO THE TERMS OF THE LICENSE. - 1. Definitions +1. Definitions -a. "IGO" means, solely and exclusively for purposes of this License, an organization -established by a treaty or other instrument governed by international law -and possessing its own international legal personality. Other organizations -established to carry out activities across national borders and that accordingly -enjoy immunity from legal process are also IGOs for the sole and exclusive -purposes of this License. IGOs may include as members, in addition to states, -other entities. + a. "IGO" means, solely and exclusively for purposes of this License, an organization established by a treaty or other instrument governed by international law and possessing its own international legal personality. Other organizations established to carry out activities across national borders and that accordingly enjoy immunity from legal process are also IGOs for the sole and exclusive purposes of this License. IGOs may include as members, in addition to states, other entities. -b. "Work" means the literary and/or artistic work eligible for copyright protection, -whatever may be the mode or form of its expression including digital form, -and offered under the terms of this License. It is understood that a database, -which by reason of the selection and arrangement of its contents constitutes -an intellectual creation, is considered a Work. + b. "Work" means the literary and/or artistic work eligible for copyright protection, whatever may be the mode or form of its expression including digital form, and offered under the terms of this License. It is understood that a database, which by reason of the selection and arrangement of its contents constitutes an intellectual creation, is considered a Work. -c. "Licensor" means the individual, individuals, entity or entities that offer(s) -the Work under the terms of this License and may be, but is not necessarily, -an IGO. + c. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License and may be, but is not necessarily, an IGO. -d. "You" means an individual or entity exercising rights under this License. + d. "You" means an individual or entity exercising rights under this License. -e. "Reproduce" means to make a copy of the Work in any manner or form, and -by any means. + e. "Reproduce" means to make a copy of the Work in any manner or form, and by any means. -f. "Distribute" means the activity of making publicly available the Work (or -copies of the Work), as applicable, by sale, rental, public lending or any -other known form of transfer of ownership or possession of the Work or copy -of the Work. + f. "Distribute" means the activity of making publicly available the Work (or copies of the Work), as applicable, by sale, rental, public lending or any other known form of transfer of ownership or possession of the Work or copy of the Work. -g. "Publicly Perform" means to perform public recitations of the Work and -to communicate to the public those public recitations, by any means or process, -including by wire or wireless means or public digital performances; to make -available to the public Works in such a way that members of the public may -access these Works from a place and at a place individually chosen by them; -to perform the Work to the public by any means or process and the communication -to the public of the performances of the Work, including by public digital -performance; to broadcast and rebroadcast the Work by any means including -signs, sounds or images. + g. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -h. "Adaptation" means a work derived from or based upon the Work, or upon -the Work and other pre-existing works. Adaptations may include works such -as translations, derivative works, or any alterations and arrangements of -any kind involving the Work. For purposes of this License, where the Work -is a musical work, performance, or phonogram, the synchronization of the Work -in timed-relation with a moving image is an Adaptation. For the avoidance -of doubt, including the Work in a Collection is not an Adaptation. + h. "Adaptation" means a work derived from or based upon the Work, or upon the Work and other pre-existing works. Adaptations may include works such as translations, derivative works, or any alterations and arrangements of any kind involving the Work. For purposes of this License, where the Work is a musical work, performance, or phonogram, the synchronization of the Work in timed-relation with a moving image is an Adaptation. For the avoidance of doubt, including the Work in a Collection is not an Adaptation. -i. "Collection" means a collection of literary or artistic works or other -works or subject matter other than works listed in Section 1(b) which by reason -of the selection and arrangement of their contents, constitute intellectual -creations, in which the Work is included in its entirety in unmodified form -along with one or more other contributions, each constituting separate and -independent works in themselves, which together are assembled into a collective -whole. For the avoidance of doubt, a Collection will not be considered as -an Adaptation. + i. "Collection" means a collection of literary or artistic works or other works or subject matter other than works listed in Section 1(b) which by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. For the avoidance of doubt, a Collection will not be considered as an Adaptation. -2. Scope of this License. Nothing in this License is intended to reduce, limit, -or restrict any uses free from copyright protection. +2. Scope of this License. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright protection. -3. License Grant. Subject to the terms and conditions of this License, the -Licensor hereby grants You a worldwide, royalty-free, non-exclusive license -to exercise the rights in the Work as follows: +3. License Grant. Subject to the terms and conditions of this License, the Licensor hereby grants You a worldwide, royalty-free, non-exclusive license to exercise the rights in the Work as follows: -a. to Reproduce, Distribute and Publicly Perform the Work, to incorporate -the Work into one or more Collections, and to Reproduce, Distribute and Publicly -Perform the Work as incorporated in the Collections. This License lasts for -the duration of the term of the copyright in the Work licensed by the Licensor. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats, -but otherwise you have no rights to make Adaptations. All rights not expressly -granted by the Licensor are hereby reserved, including but not limited to -the rights set forth in Section 4(d). + a. to Reproduce, Distribute and Publicly Perform the Work, to incorporate the Work into one or more Collections, and to Reproduce, Distribute and Publicly Perform the Work as incorporated in the Collections. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +This License lasts for the duration of the term of the copyright in the Work licensed by the Licensor. The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. All rights not expressly granted by the Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(d). -a. You may Distribute or Publicly Perform the Work only under the terms of -this License. You must include a copy of, or the Uniform Resource Identifier -(URI) for, this License with every copy of the Work You Distribute or Publicly -Perform. You may not offer or impose any terms on the Work that restrict the -terms of this License or the ability of the recipient of the Work to exercise -the rights granted to that recipient under the terms of the License. You may -not sublicense the Work (see section 8(a)). You must keep intact all notices -that refer to this License and to the disclaimer of warranties with every -copy of the Work You Distribute or Publicly Perform. When You Distribute or -Publicly Perform the Work, You may not impose any effective technological -measures on the Work that restrict the ability of a recipient of the Work -from You to exercise the rights granted to that recipient under the terms -of the License. This Section 4(a) applies to the Work as incorporated in a -Collection, but this does not require the Collection apart from the Work itself -to be made subject to the terms of this License. If You create a Collection, -upon notice from a Licensor You must, to the extent practicable, remove from -the Collection any credit (inclusive of any logo, trademark, official mark -or official emblem) as required by Section 4(c), as requested. +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -b. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be primarily intended for or directed toward commercial advantage -or private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work (see section 8(a)). You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from a Licensor You must, to the extent practicable, remove from the Collection any credit (inclusive of any logo, trademark, official mark or official emblem) as required by Section 4(c), as requested. -c. If You Distribute, or Publicly Perform the Work or any Collections, You -must, unless a request has been made pursuant to Section 4(a), keep intact -all copyright notices for the Work and provide, reasonable to the medium or -means You are utilizing: (i) any attributions that the Licensor indicates -be associated with the Work as indicated in a copyright notice, (ii) the title -of the Work if supplied; (iii) to the extent reasonably practicable, the URI, -if any, that the Licensor specifies to be associated with the Work, unless -such URI does not refer to the copyright notice or licensing information for -the Work. The credit required by this Section 4(c) may be implemented in any -reasonable manner; provided, however, that in the case of a Collection, at -a minimum such credit will appear, if a credit for all contributors to the -Collection appears, then as part of these credits and in a manner at least -as prominent as the credits for the other contributors. For the avoidance -of doubt, You may only use the credit required by this Section for the purpose -of attribution in the manner set out above and, by exercising Your rights -under this License, You may not implicitly or explicitly assert or imply any -connection with, sponsorship or endorsement by the Licensor or others designated -for attribution, of You or Your use of the Work, without the separate, express -prior written permission of the Licensor or such others. + b. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be primarily intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. - d. For the avoidance of doubt: + c. If You Distribute, or Publicly Perform the Work or any Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) any attributions that the Licensor indicates be associated with the Work as indicated in a copyright notice, (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that the Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributors to the Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Licensor or others designated for attribution, of You or Your use of the Work, without the separate, express prior written permission of the Licensor or such others. -i. Non-waivable Compulsory License Schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; + d. For the avoidance of doubt: -ii. Waivable Compulsory License Schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor reserves the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License if Your exercise -of such rights is for a purpose or use which is otherwise than noncommercial -as permitted under Section 4(b) and otherwise waives the right to collect -royalties through any statutory or compulsory licensing scheme; and, + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -iii. Voluntary License Schemes. To the extent possible, the Licensor waives -the right to collect royalties from You for the exercise of the Licensed Rights, -whether directly or through a collecting society under any voluntary licensing -scheme. In all other cases the Licensor expressly reserves the right to collect -such royalties. + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(b) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, -e. Except as otherwise agreed in writing by the Licensor, if You Reproduce, -Distribute or Publicly Perform the Work either by itself or as part of any -Collections, You must not distort, mutilate, modify or take other derogatory -action in relation to the Work which would be prejudicial to the honor or -reputation of the Licensor where moral rights apply. + iii. Voluntary License Schemes. To the extent possible, the Licensor waives the right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary licensing scheme. In all other cases the Licensor expressly reserves the right to collect such royalties. -5. Representations, Warranties and Disclaimer THE LICENSOR OFFERS THE WORK -AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE -WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ERRORS, -WHETHER OR NOT DISCOVERABLE. + e. Except as otherwise agreed in writing by the Licensor, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the honor or reputation of the Licensor where moral rights apply. -6. Limitation on Liability IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU -ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR -EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN -IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +5. Representations, Warranties and Disclaimer - 7. Termination +THE LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. -a. Subject to the terms and conditions set forth in this License, the license -granted here lasts for the duration of the term of the copyright in the Work -licensed by the Licensor as stated in Section 3. Notwithstanding the above, -the Licensor reserves the right to release the Work under different license -terms or to stop distributing the Work at any time; provided, however that -any such election will not serve to withdraw this License (or any other license -that has been, or is required to be, granted under the terms of this License), -and this License will continue in full force and effect unless terminated -as stated below. +6. Limitation on Liability -b. If You fail to comply with this License, then this License and the rights -granted hereunder will terminate automatically upon any breach by You of the -terms of this License. Individuals or entities who have received Collections -from You under this License, however, will not have their licenses terminated -provided such individuals or entities remain in full compliance with those -licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this -License. Notwithstanding the foregoing, this License reinstates automatically -as of the date the violation is cured, provided it is cured within 30 days -of You discovering the violation, or upon express reinstatement by the Licensor. -For the avoidance of doubt, this Section 7(b) does not affect any rights the -Licensor may have to seek remedies for violations of this License by You. +IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 8. Miscellaneous +7. Termination -a. Each time You Distribute or Publicly Perform the Work or a Collection, -the Licensor offers to the recipient a license to the Work on the same terms -and conditions as the license granted to You under this License. + a. Subject to the terms and conditions set forth in this License, the license granted here lasts for the duration of the term of the copyright in the Work licensed by the Licensor as stated in Section 3. Notwithstanding the above, the Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated below. -b. If any provision of this License is invalid or unenforceable, it shall -not affect the validity or enforceability of the remainder of the terms of -this License, and without further action, such provision shall be reformed -to the minimum extent necessary to make such provision valid and enforceable. + b. If You fail to comply with this License, then this License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. Notwithstanding the foregoing, this License reinstates automatically as of the date the violation is cured, provided it is cured within 30 days of You discovering the violation, or upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 7(b) does not affect any rights the Licensor may have to seek remedies for violations of this License by You. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the Licensor. +8. Miscellaneous -d. This License constitutes the entire agreement between You and the Licensor -with respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. The Licensor -shall not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -e. The rights granted under, and the subject matter referenced, in this License -were drafted utilizing the terminology of the Berne Convention for the Protection -of Literary and Artistic Works (as amended on September 28, 1979), the Rome -Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances -and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised -on July 24, 1971). Interpretation of the scope of the rights granted by the -Licensor and the conditions imposed on You under this License, this License, -and the rights and conditions set forth herein shall be made with reference -to copyright as determined in accordance with general principles of international -law, including the above mentioned conventions. + b. If any provision of this License is invalid or unenforceable, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -f. Nothing in this License constitutes or may be interpreted as a limitation -upon or waiver of any privileges and immunities that may apply to the Licensor -or You, including immunity from the legal processes of any jurisdiction, national -court or other authority. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the Licensor. -g. Where the Licensor is an IGO, any and all disputes arising under this License -that cannot be settled amicably shall be resolved in accordance with the following -procedure: + d. This License constitutes the entire agreement between You and the Licensor with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. The Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -i. Pursuant to a notice of mediation communicated by reasonable means by either -You or the Licensor to the other, the dispute shall be submitted to non-binding -mediation conducted in accordance with rules designated by the Licensor in -the copyright notice published with the Work, or if none then in accordance -with those communicated in the notice of mediation. The language used in the -mediation proceedings shall be English unless otherwise agreed. + e. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). Interpretation of the scope of the rights granted by the Licensor and the conditions imposed on You under this License, this License, and the rights and conditions set forth herein shall be made with reference to copyright as determined in accordance with general principles of international law, including the above mentioned conventions. -ii. If any such dispute has not been settled within 45 days following the -date on which the notice of mediation is provided, either You or the Licensor -may, pursuant to a notice of arbitration communicated by reasonable means -to the other, elect to have the dispute referred to and finally determined -by arbitration. The arbitration shall be conducted in accordance with the -rules designated by the Licensor in the copyright notice published with the -Work, or if none then in accordance with the UNCITRAL Arbitration Rules as -then in force. The arbitral tribunal shall consist of a sole arbitrator and -the language of the proceedings shall be English unless otherwise agreed. -The place of arbitration shall be where the Licensor has its headquarters. -The arbitral proceedings shall be conducted remotely (e.g., via telephone -conference or written submissions) whenever practicable. + f. Nothing in this License constitutes or may be interpreted as a limitation upon or waiver of any privileges and immunities that may apply to the Licensor or You, including immunity from the legal processes of any jurisdiction, national court or other authority. -iii. Interpretation of this License in any dispute submitted to mediation -or arbitration shall be as set forth in Section 8(e), above. + g. Where the Licensor is an IGO, any and all disputes arising under this License that cannot be settled amicably shall be resolved in accordance with the following procedure: + + i. Pursuant to a notice of mediation communicated by reasonable means by either You or the Licensor to the other, the dispute shall be submitted to non-binding mediation conducted in accordance with rules designated by the Licensor in the copyright notice published with the Work, or if none then in accordance with those communicated in the notice of mediation. The language used in the mediation proceedings shall be English unless otherwise agreed. + + ii. If any such dispute has not been settled within 45 days following the date on which the notice of mediation is provided, either You or the Licensor may, pursuant to a notice of arbitration communicated by reasonable means to the other, elect to have the dispute referred to and finally determined by arbitration. The arbitration shall be conducted in accordance with the rules designated by the Licensor in the copyright notice published with the Work, or if none then in accordance with the UNCITRAL Arbitration Rules as then in force. The arbitral tribunal shall consist of a sole arbitrator and the language of the proceedings shall be English unless otherwise agreed. The place of arbitration shall be where the Licensor has its headquarters. The arbitral proceedings shall be conducted remotely (e.g., via telephone conference or written submissions) whenever practicable. + + iii. Interpretation of this License in any dispute submitted to mediation or arbitration shall be as set forth in Section 8(e), above. Creative Commons Notice -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of the Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of the Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, Creative Commons does not authorize the use by either -party of the trademark "Creative Commons" or any related trademark or logo -of Creative Commons without the prior written consent of Creative Commons. -Any permitted use will be in compliance with Creative Commons' then-current -trademark usage guidelines, as may be published on its website or otherwise -made available upon request from time to time. For the avoidance of doubt, -this trademark restriction does not form part of this License. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. Creative Commons may be contacted at https://creativecommons.org/. diff --git a/options/license/CC-BY-NC-ND-4.0 b/options/license/CC-BY-NC-ND-4.0 index 22d2f6971..6f2a684c1 100644 --- a/options/license/CC-BY-NC-ND-4.0 +++ b/options/license/CC-BY-NC-ND-4.0 @@ -1,348 +1,155 @@ Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International -Creative Commons Corporation ("Creative Commons") is not a law firm and does -not provide legal services or legal advice. Distribution of Creative Commons -public licenses does not create a lawyer-client or other relationship. Creative -Commons makes its licenses and related information available on an "as-is" -basis. Creative Commons gives no warranties regarding its licenses, any material -licensed under their terms and conditions, or any related information. Creative -Commons disclaims all liability for damages resulting from their use to the -fullest extent possible. + + Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. - -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors - -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees - -Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International -Public License - -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-NoDerivatives -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. - - - - Section 1 – Definitions. - -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. - -b. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - -c. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. - -d. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. - -e. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. - -f. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. - -g. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. - -h. NonCommercial means not primarily intended for or directed towards commercial -advantage or monetary compensation. For purposes of this Public License, the -exchange of the Licensed Material for other material subject to Copyright -and Similar Rights by digital file-sharing or similar means is NonCommercial -provided there is no payment of monetary compensation in connection with the -exchange. - -i. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. - -j. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. - -k. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. - - - - Section 2 – Scope. - - a. License grant. - -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. -A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial -purposes only; and +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. -B. produce and reproduce, but not Share, Adapted Material for NonCommercial -purposes only. +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. +Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License - 3. Term. The term of this Public License is specified in Section 6(a). +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. +Section 1 – Definitions. - 5. Downstream recipients. + a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. + b. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. + c. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). + d. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. - b. Other rights. + e. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. + f. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -2. Patent and trademark rights are not licensed under this Public License. + g. Licensor means the individual(s) or entity(ies) granting rights under this Public License. -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties, including when the Licensed Material is used other -than for NonCommercial purposes. + h. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. - + i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. - Section 3 – License Conditions. + j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. + k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. - a. Attribution. +Section 2 – Scope. - 1. If You Share the Licensed Material, You must: + a. License grant. -A. retain the following if it is supplied by the Licensor with the Licensed -Material: + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); + A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and - ii. a copyright notice; + B. produce and reproduce, but not Share, Adapted Material for NonCommercial purposes only. - iii. a notice that refers to this Public License; + 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - iv. a notice that refers to the disclaimer of warranties; + 3. Term. The term of this Public License is specified in Section 6(a). -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and + 5. Downstream recipients. + A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. + B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -For the avoidance of doubt, You do not have permission under this Public License -to Share Adapted Material. + 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. + b. Other rights. -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. - + 2. Patent and trademark rights are not licensed under this Public License. - Section 4 – Sui Generis Database Rights. + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: +Section 3 – License Conditions. -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database for NonCommercial purposes only and provided You do not Share -Adapted Material; +Your exercise of the Licensed Rights is expressly made subject to the following conditions. -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and + a. Attribution. -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. + 1. If You Share the Licensed Material, You must: -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. + A. retain the following if it is supplied by the Licensor with the Licensed Material: - + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - Section 5 – Disclaimer of Warranties and Limitation of Liability. + ii. a copyright notice; -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. + iii. a notice that refers to this Public License; -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. + iv. a notice that refers to the disclaimer of warranties; -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and - Section 6 – Term and Termination. + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. + For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material. -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. - 2. upon express reinstatement by the Licensor. +Section 4 – Sui Generis Database Rights. -For the avoidance of doubt, this Section 6(b) does not affect any right the -Licensor may have to seek remedies for Your violations of this Public License. +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: -c. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only and provided You do not Share Adapted Material; - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and - + c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. - Section 7 – Other Terms and Conditions. +Section 5 – Disclaimer of Warranties and Limitation of Liability. -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. + a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. + b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. - + c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. - Section 8 – Interpretation. +Section 6 – Term and Termination. -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. + a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. + b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. + 2. upon express reinstatement by the Licensor. -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. + +Section 8 – Interpretation. + + a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. + + c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. + + d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. diff --git a/options/license/CC-BY-NC-SA-1.0 b/options/license/CC-BY-NC-SA-1.0 index 026883ed7..0722e1231 100644 --- a/options/license/CC-BY-NC-SA-1.0 +++ b/options/license/CC-BY-NC-SA-1.0 @@ -1,222 +1,83 @@ -Creative Commons Attribution-NonCommercial-ShareAlike 1.0 CREATIVE COMMONS -CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION -OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE -COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES -NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY -FOR DAMAGES RESULTING FROM ITS USE. +Creative Commons Attribution-NonCommercial-ShareAlike 1.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works; + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. You may distribute, publicly display, publicly perform, or publicly digitally -perform a Derivative Work only under the terms of this License, and You must -include a copy of, or the Uniform Resource Identifier for, this License with -every copy or phonorecord of each Derivative Work You distribute, publicly -display, publicly perform, or publicly digitally perform. You may not offer -or impose any terms on the Derivative Works that alter or restrict the terms -of this License or the recipients' exercise of the rights granted hereunder, -and You must keep intact all notices that refer to this License and to the -disclaimer of warranties. You may not distribute, publicly display, publicly -perform, or publicly digitally perform the Derivative Work with any technological -measures that control access or use of the Work in a manner inconsistent with -the terms of this License Agreement. The above applies to the Derivative Work -as incorporated in a Collective Work, but this does not require the Collective -Work apart from the Derivative Work itself to be made subject to the terms -of this License. + b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. -c. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + c. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -d. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + d. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -a. By offering the Work for public release under this License, Licensor represents -and warrants that, to the best of Licensor's knowledge after reasonable inquiry: + a. By offering the Work for public release under this License, Licensor represents and warrants that, to the best of Licensor's knowledge after reasonable inquiry: -i. Licensor has secured all rights in the Work necessary to grant the license -rights hereunder and to permit the lawful exercise of the rights granted hereunder -without You having any obligation to pay any royalties, compulsory license -fees, residuals or any other payments; + i. Licensor has secured all rights in the Work necessary to grant the license rights hereunder and to permit the lawful exercise of the rights granted hereunder without You having any obligation to pay any royalties, compulsory license fees, residuals or any other payments; -ii. The Work does not infringe the copyright, trademark, publicity rights, -common law rights or any other right of any third party or constitute defamation, -invasion of privacy or other tortious injury to any third party. + ii. The Work does not infringe the copyright, trademark, publicity rights, common law rights or any other right of any third party or constitute defamation, invasion of privacy or other tortious injury to any third party. -b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING -OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. + b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM -BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE -TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE -OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN -IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-SA-2.0 b/options/license/CC-BY-NC-SA-2.0 index c2c3406fa..bb8d9012f 100644 --- a/options/license/CC-BY-NC-SA-2.0 +++ b/options/license/CC-BY-NC-SA-2.0 @@ -1,252 +1,87 @@ -Creative Commons Attribution-NonCommercial-ShareAlike 2.0 CREATIVE COMMONS -CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION -OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE -COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES -NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY -FOR DAMAGES RESULTING FROM ITS USE. +Creative Commons Attribution-NonCommercial-ShareAlike 2.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. -For the avoidance of doubt, where the Work is a musical composition or sound -recording, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered a Derivative Work for the purpose of -this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -g. "License Elements" means the following high-level license attributes as -selected by Licensor and indicated in the title of this License: Attribution, -Noncommercial, ShareAlike. + g. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, Noncommercial, ShareAlike. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works; + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved, including -but not limited to the rights set forth in Sections 4(e) and 4(f). +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Sections 4(e) and 4(f). -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. You may distribute, publicly display, publicly perform, or publicly digitally -perform a Derivative Work only under the terms of this License, a later version -of this License with the same License Elements as this License, or a Creative -Commons iCommons license that contains the same License Elements as this License -(e.g. Attribution-NonCommercial-ShareAlike 2.0 Japan). You must include a -copy of, or the Uniform Resource Identifier for, this License or other license -specified in the previous sentence with every copy or phonorecord of each -Derivative Work You distribute, publicly display, publicly perform, or publicly -digitally perform. You may not offer or impose any terms on the Derivative -Works that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder, and You must keep intact all notices -that refer to this License and to the disclaimer of warranties. You may not -distribute, publicly display, publicly perform, or publicly digitally perform -the Derivative Work with any technological measures that control access or -use of the Work in a manner inconsistent with the terms of this License Agreement. -The above applies to the Derivative Work as incorporated in a Collective Work, -but this does not require the Collective Work apart from the Derivative Work -itself to be made subject to the terms of this License. + b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-NonCommercial-ShareAlike 2.0 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. -c. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in connection with the exchange of copyrighted works. + c. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. -d. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; to the extent reasonably practicable, the Uniform -Resource Identifier, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + d. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - e. For the avoidance of doubt, where the Work is a musical composition: + e. For the avoidance of doubt, where the Work is a musical composition: -i. Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive -right to collect, whether individually or via a performance rights society -(e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital -performance (e.g. webcast) of the Work if that performance is primarily intended -for or directed toward commercial advantage or private monetary compensation. + i. Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work if that performance is primarily intended for or directed toward commercial advantage or private monetary compensation. -ii. Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive -right to collect, whether individually or via a music rights agency or designated -agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from -the Work ("cover version") and distribute, subject to the compulsory license -created by 17 USC Section 115 of the US Copyright Act (or the equivalent in -other jurisdictions), if Your distribution of such cover version is primarily -intended for or directed toward commercial advantage or private monetary compensation. + ii. Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions), if Your distribution of such cover version is primarily intended for or directed toward commercial advantage or private monetary compensation. -f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, -where the Work is a sound recording, Licensor reserves the exclusive right -to collect, whether individually or via a performance-rights society (e.g. -SoundExchange), royalties for the public digital performance (e.g. webcast) -of the Work, subject to the compulsory license created by 17 USC Section 114 -of the US Copyright Act (or the equivalent in other jurisdictions), if Your -public digital performance is primarily intended for or directed toward commercial -advantage or private monetary compensation. + f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor reserves the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions), if Your public digital performance is primarily intended for or directed toward commercial advantage or private monetary compensation. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-SA-2.0-FR b/options/license/CC-BY-NC-SA-2.0-FR new file mode 100644 index 000000000..9f7f9103e --- /dev/null +++ b/options/license/CC-BY-NC-SA-2.0-FR @@ -0,0 +1,93 @@ +Creative Commons Paternité - Pas d'Utilisation Commerciale - Partage Des Conditions Initiales A l'Identique 2.0 + + Creative Commons n'est pas un cabinet d'avocats et ne fournit pas de services de conseil juridique. La distribution de la présente version de ce contrat ne crée aucune relation juridique entre les parties au contrat présenté ci-après et Creative Commons. Creative Commons fournit cette offre de contrat-type en l'état, à seule fin d'information. Creative Commons ne saurait être tenu responsable des éventuels préjudices résultant du contenu ou de l'utilisation de ce contrat. + +Contrat + +L'Oeuvre (telle que définie ci-dessous) est mise à disposition selon les termes du présent contrat appelé Contrat Public Creative Commons (dénommé ici « CPCC » ou « Contrat »). L'Oeuvre est protégée par le droit de la propriété littéraire et artistique (droit d'auteur, droits voisins, droits des producteurs de bases de données) ou toute autre loi applicable. Toute utilisation de l'Oeuvre autrement qu'explicitement autorisée selon ce Contrat ou le droit applicable est interdite. + +L'exercice sur l'Oeuvre de tout droit proposé par le présent contrat vaut acceptation de celui-ci. Selon les termes et les obligations du présent contrat, la partie Offrante propose à la partie Acceptante l'exercice de certains droits présentés ci-après, et l'Acceptant en approuve les termes et conditions d'utilisation. + +1. Définitions + + a. « Oeuvre » : oeuvre de l'esprit protégeable par le droit de la propriété littéraire et artistique ou toute loi applicable et qui est mise à disposition selon les termes du présent Contrat. + + b. « Oeuvre dite Collective » : une oeuvre dans laquelle l'oeuvre, dans sa forme intégrale et non modifiée, est assemblée en un ensemble collectif avec d'autres contributions qui constituent en elles-mêmes des oeuvres séparées et indépendantes. Constituent notamment des Oeuvres dites Collectives les publications périodiques, les anthologies ou les encyclopédies. Aux termes de la présente autorisation, une oeuvre qui constitue une Oeuvre dite Collective ne sera pas considérée comme une Oeuvre dite Dérivée (telle que définie ci-après). + + c. « Oeuvre dite Dérivée » : une oeuvre créée soit à partir de l'Oeuvre seule, soit à partir de l'Oeuvre et d'autres oeuvres préexistantes. Constituent notamment des Oeuvres dites Dérivées les traductions, les arrangements musicaux, les adaptations théâtrales, littéraires ou cinématographiques, les enregistrements sonores, les reproductions par un art ou un procédé quelconque, les résumés, ou toute autre forme sous laquelle l'Oeuvre puisse être remaniée, modifiée, transformée ou adaptée, à l'exception d'une oeuvre qui constitue une Oeuvre dite Collective. Une Oeuvre dite Collective ne sera pas considérée comme une Oeuvre dite Dérivée aux termes du présent Contrat. Dans le cas où l'Oeuvre serait une composition musicale ou un enregistrement sonore, la synchronisation de l'oeuvre avec une image animée sera considérée comme une Oeuvre dite Dérivée pour les propos de ce Contrat. + + d. « Auteur original » : la ou les personnes physiques qui ont créé l'Oeuvre. + + e. « Offrant » : la ou les personne(s) physique(s) ou morale(s) qui proposent la mise à disposition de l'Oeuvre selon les termes du présent Contrat. + + f. « Acceptant » : la personne physique ou morale qui accepte le présent contrat et exerce des droits sans en avoir violé les termes au préalable ou qui a reçu l'autorisation expresse de l'Offrant d'exercer des droits dans le cadre du présent contrat malgré une précédente violation de ce contrat. + + g. « Options du Contrat » : les attributs génériques du Contrat tels qu'ils ont été choisis par l'Offrant et indiqués dans le titre de ce Contrat : Paternité - Pas d'Utilisation Commerciale - Partage Des Conditions Initiales A l'Identique. + +2. Exceptions aux droits exclusifs. Aucune disposition de ce contrat n'a pour intention de réduire, limiter ou restreindre les prérogatives issues des exceptions aux droits, de l'épuisement des droits ou d'autres limitations aux droits exclusifs des ayants droit selon le droit de la propriété littéraire et artistique ou les autres lois applicables. + +3. Autorisation. Soumis aux termes et conditions définis dans cette autorisation, et ceci pendant toute la durée de protection de l'Oeuvre par le droit de la propriété littéraire et artistique ou le droit applicable, l'Offrant accorde à l'Acceptant l'autorisation mondiale d'exercer à titre gratuit et non exclusif les droits suivants : + + a. reproduire l'Oeuvre, incorporer l'Oeuvre dans une ou plusieurs Oeuvres dites Collectives et reproduire l'Oeuvre telle qu'incorporée dans lesdites Oeuvres dites Collectives; + + b. créer et reproduire des Oeuvres dites Dérivées; + + c. distribuer des exemplaires ou enregistrements, présenter, représenter ou communiquer l'Oeuvre au public par tout procédé technique, y compris incorporée dans des Oeuvres Collectives; + + d. distribuer des exemplaires ou phonogrammes, présenter, représenter ou communiquer au public des Oeuvres dites Dérivées par tout procédé technique; + + e. lorsque l'Oeuvre est une base de données, extraire et réutiliser des parties substantielles de l'Oeuvre. + +Les droits mentionnés ci-dessus peuvent être exercés sur tous les supports, médias, procédés techniques et formats. Les droits ci-dessus incluent le droit d'effectuer les modifications nécessaires techniquement à l'exercice des droits dans d'autres formats et procédés techniques. L'exercice de tous les droits qui ne sont pas expressément autorisés par l'Offrant ou dont il n'aurait pas la gestion demeure réservé, notamment les mécanismes de gestion collective obligatoire applicables décrits à l'article 4(e). + +4. Restrictions. L'autorisation accordée par l'article 3 est expressément assujettie et limitée par le respect des restrictions suivantes : + + + a. L'Acceptant peut reproduire, distribuer, représenter ou communiquer au public l'Oeuvre y compris par voie numérique uniquement selon les termes de ce Contrat. L'Acceptant doit inclure une copie ou l'adresse Internet (Identifiant Uniforme de Ressource) du présent Contrat à toute reproduction ou enregistrement de l'Oeuvre que l'Acceptant distribue, représente ou communique au public y compris par voie numérique. L'Acceptant ne peut pas offrir ou imposer de conditions d'utilisation de l'Oeuvre qui altèrent ou restreignent les termes du présent Contrat ou l'exercice des droits qui y sont accordés au bénéficiaire. L'Acceptant ne peut pas céder de droits sur l'Oeuvre. L'Acceptant doit conserver intactes toutes les informations qui renvoient à ce Contrat et à l'exonération de responsabilité. L'Acceptant ne peut pas reproduire, distribuer, représenter ou communiquer au public l'Oeuvre, y compris par voie numérique, en utilisant une mesure technique de contrôle d'accès ou de contrôle d'utilisation qui serait contradictoire avec les termes de cet Accord contractuel. Les mentions ci-dessus s'appliquent à l'Oeuvre telle qu'incorporée dans une Oeuvre dite Collective, mais, en dehors de l'Oeuvre en elle-même, ne soumettent pas l'Oeuvre dite Collective, aux termes du présent Contrat. Si l'Acceptant crée une Oeuvre dite Collective, à la demande de tout Offrant, il devra, dans la mesure du possible, retirer de l'Oeuvre dite Collective toute référence au dit Offrant, comme demandé. Si l'Acceptant crée une Oeuvre dite Collective, à la demande de tout Auteur, il devra, dans la mesure du possible, retirer de l'Oeuvre dite Collective toute référence au dit Auteur, comme demandé. Si l'Acceptant crée une Oeuvre dite Dérivée, à la demande de tout Offrant, il devra, dans la mesure du possible, retirer de l'Oeuvre dite Dérivée toute référence au dit Offrant, comme demandé. Si l'Acceptant crée une Oeuvre dite Dérivée, à la demande de tout Auteur, il devra, dans la mesure du possible, retirer de l'Oeuvre dite Dérivée toute référence au dit Auteur, comme demandé. + + b. L'Acceptant peut reproduire, distribuer, représenter ou communiquer au public une Oeuvre dite Dérivée y compris par voie numérique uniquement sous les termes de ce Contrat, ou d'une version ultérieure de ce Contrat comprenant les mêmes Options du Contrat que le présent Contrat, ou un Contrat Creative Commons iCommons comprenant les mêmes Options du Contrat que le présent Contrat (par exemple Paternité - Pas d'Utilisation Commerciale - Partage Des Conditions Initiales A l'Identique 2.0 Japon). L'Acceptant doit inclure une copie ou l'adresse Internet (Identifiant Uniforme de Ressource) du présent Contrat, ou d'un autre Contrat tel que décrit à la phrase précédente, à toute reproduction ou enregistrement de l'Oeuvre dite Dérivée que l'Acceptant distribue, représente ou communique au public y compris par voie numérique. L'Acceptant ne peut pas offrir ou imposer de conditions d'utilisation sur l'Oeuvre dite Dérivée qui altèrent ou restreignent les termes du présent Contrat ou l'exercice des droits qui y sont accordés au bénéficiaire, et doit conserver intactes toutes les informations qui renvoient à ce Contrat et à l'avertissement sur les garanties. L'Acceptant ne peut pas reproduire, distribuer, représenter ou communiquer au public y compris par voie numérique l'Oeuvre dite Dérivée en utilisant une mesure technique de contrôle d'accès ou de contrôle d'utilisation qui serait contradictoire avec les termes de cet Accord contractuel. Les mentions ci-dessus s'appliquent à l'Oeuvre dite Dérivée telle qu'incorporée dans une Oeuvre dite Collective, mais, en dehors de l'Oeuvre dite Dérivée en elle-même, ne soumettent pas l'Oeuvre Collective, aux termes du présent Contrat. + + c. L'Acceptant ne peut exercer aucun des droits conférés par l'article 3 avec l'intention ou l'objectif d'obtenir un profit commercial ou une compensation financière personnelle. L'échange de l'Oeuvre avec d'autres Oeuvres protégées par le droit de la propriété littéraire et artistique par le partage électronique de fichiers, ou par tout autre moyen, n'est pas considéré comme un échange avec l'intention ou l'objectif d'un profit commercial ou d'une compensation financière personnelle, dans la mesure où aucun paiement ou compensation financière n'intervient en relation avec l'échange d'Oeuvres protégées. + + d. Si l'Acceptant reproduit, distribue, représente ou communique au public, y compris par voie numérique, l'Oeuvre ou toute Oeuvre dite Dérivée ou toute Oeuvre dite Collective, il doit conserver intactes toutes les informations sur le régime des droits et en attribuer la paternité à l'Auteur Original, de manière raisonnable au regard au médium ou au moyen utilisé. Il doit communiquer le nom de l'Auteur Original ou son éventuel pseudonyme s'il est indiqué ; le titre de l'Oeuvre Originale s'il est indiqué ; dans la mesure du possible, l'adresse Internet ou Identifiant Uniforme de Ressource (URI), s'il existe, spécifié par l'Offrant comme associé à l'Oeuvre, à moins que cette adresse ne renvoie pas aux informations légales (paternité et conditions d'utilisation de l'Oeuvre). Dans le cas d'une Oeuvre dite Dérivée, il doit indiquer les éléments identifiant l'utilisation l'Oeuvre dans l'Oeuvre dite Dérivée par exemple « Traduction anglaise de l'Oeuvre par l'Auteur Original » ou « Scénario basé sur l'Oeuvre par l'Auteur Original ». Ces obligations d'attribution de paternité doivent être exécutées de manière raisonnable. Cependant, dans le cas d'une Oeuvre dite Dérivée ou d'une Oeuvre dite Collective, ces informations doivent, au minimum, apparaître à la place et de manière aussi visible que celles à laquelle apparaissent les informations de même nature. + + e. Dans le cas où une utilisation de l'Oeuvre serait soumise à un régime légal de gestion collective obligatoire, l'Offrant se réserve le droit exclusif de collecter ces redevances par l'intermédiaire de la société de perception et de répartition des droits compétente. Sont notamment concernés la radiodiffusion et la communication dans un lieu public de phonogrammes publiés à des fins de commerce, certains cas de retransmission par câble et satellite, la copie privée d'Oeuvres fixées sur phonogrammes ou vidéogrammes, la reproduction par reprographie. + +5. Garantie et exonération de responsabilité + + + a. En mettant l'Oeuvre à la disposition du public selon les termes de ce Contrat, l'Offrant déclare de bonne foi qu'à sa connaissance et dans les limites d'une enquête raisonnable : + + i. L'Offrant a obtenu tous les droits sur l'Oeuvre nécessaires pour pouvoir autoriser l'exercice des droits accordés par le présent Contrat, et permettre la jouissance paisible et l'exercice licite de ces droits, ceci sans que l'Acceptant n'ait aucune obligation de verser de rémunération ou tout autre paiement ou droits, dans la limite des mécanismes de gestion collective obligatoire applicables décrits à l'article 4(e); + + ii. L'Oeuvre n'est constitutive ni d'une violation des droits de tiers, notamment du droit de la propriété littéraire et artistique, du droit des marques, du droit de l'information, du droit civil ou de tout autre droit, ni de diffamation, de violation de la vie privée ou de tout autre préjudice délictuel à l'égard de toute tierce partie. + + b. A l'exception des situations expressément mentionnées dans le présent Contrat ou dans un autre accord écrit, ou exigées par la loi applicable, l'Oeuvre est mise à disposition en l'état sans garantie d'aucune sorte, qu'elle soit expresse ou tacite, y compris à l'égard du contenu ou de l'exactitude de l'Oeuvre. + +6. Limitation de responsabilité. A l'exception des garanties d'ordre public imposées par la loi applicable et des réparations imposées par le régime de la responsabilité vis-à-vis d'un tiers en raison de la violation des garanties prévues par l'article 5 du présent contrat, l'Offrant ne sera en aucun cas tenu responsable vis-à-vis de l'Acceptant, sur la base d'aucune théorie légale ni en raison d'aucun préjudice direct, indirect, matériel ou moral, résultant de l'exécution du présent Contrat ou de l'utilisation de l'Oeuvre, y compris dans l'hypothèse où l'Offrant avait connaissance de la possible existence d'un tel préjudice. + +7. Résiliation + + a. Tout manquement aux termes du contrat par l'Acceptant entraîne la résiliation automatique du Contrat et la fin des droits qui en découlent. Cependant, le contrat conserve ses effets envers les personnes physiques ou morales qui ont reçu de la part de l'Acceptant, en exécution du présent contrat, la mise à disposition d'Oeuvres dites Dérivées, ou d'Oeuvres dites Collectives, ceci tant qu'elles respectent pleinement leurs obligations. Les sections 1, 2, 5, 6 et 7 du contrat continuent à s'appliquer après la résiliation de celui-ci. + + b. Dans les limites indiquées ci-dessus, le présent Contrat s'applique pendant toute la durée de protection de l'Oeuvre selon le droit applicable. Néanmoins, l'Offrant se réserve à tout moment le droit d'exploiter l'Oeuvre sous des conditions contractuelles différentes, ou d'en cesser la diffusion; cependant, le recours à cette option ne doit pas conduire à retirer les effets du présent Contrat (ou de tout contrat qui a été ou doit être accordé selon les termes de ce Contrat), et ce Contrat continuera à s'appliquer dans tous ses effets jusqu'à ce que sa résiliation intervienne dans les conditions décrites ci-dessus. + +8. Divers + + a. A chaque reproduction ou communication au public par voie numérique de l'Oeuvre ou d'une Oeuvre dite Collective par l'Acceptant, l'Offrant propose au bénéficiaire une offre de mise à disposition de l'Oeuvre dans des termes et conditions identiques à ceux accordés à la partie Acceptante dans le présent Contrat. + + b. A chaque reproduction ou communication au public par voie numérique d'une Oeuvre dite Dérivée par l'Acceptant, l'Offrant propose au bénéficiaire une offre de mise à disposition du bénéficiaire de l'Oeuvre originale dans des termes et conditions identiques à ceux accordés à la partie Acceptante dans le présent Contrat. + + c. La nullité ou l'inapplicabilité d'une quelconque disposition de ce Contrat au regard de la loi applicable n'affecte pas celle des autres dispositions qui resteront pleinement valides et applicables. Sans action additionnelle par les parties à cet accord, lesdites dispositions devront être interprétées dans la mesure minimum nécessaire à leur validité et leur applicabilité. + + d. Aucune limite, renonciation ou modification des termes ou dispositions du présent Contrat ne pourra être acceptée sans le consentement écrit et signé de la partie compétente. + + e. Ce Contrat constitue le seul accord entre les parties à propos de l'Oeuvre mise ici à disposition. Il n'existe aucun élément annexe, accord supplémentaire ou mandat portant sur cette Oeuvre en dehors des éléments mentionnés ici. L'Offrant ne sera tenu par aucune disposition supplémentaire qui pourrait apparaître dans une quelconque communication en provenance de l'Acceptant. Ce Contrat ne peut être modifié sans l'accord mutuel écrit de l'Offrant et de l'Acceptant. + + f. Le droit applicable est le droit français. + +Creative Commons n'est pas partie à ce Contrat et n'offre aucune forme de garantie relative à l'Oeuvre. Creative Commons décline toute responsabilité à l'égard de l'Acceptant ou de toute autre partie, quel que soit le fondement légal de cette responsabilité et quel que soit le préjudice subi, direct, indirect, matériel ou moral, qui surviendrait en rapport avec le présent Contrat. Cependant, si Creative Commons s'est expressément identifié comme Offrant pour mettre une Oeuvre à disposition selon les termes de ce Contrat, Creative Commons jouira de tous les droits et obligations d'un Offrant. + +A l'exception des fins limitées à informer le public que l'Oeuvre est mise à disposition sous CPCC, aucune des parties n'utilisera la marque « Creative Commons » ou toute autre indication ou logo afférent sans le consentement préalable écrit de Creative Commons. Toute utilisation autorisée devra être effectuée en conformité avec les lignes directrices de Creative Commons à jour au moment de l'utilisation, telles qu'elles sont disponibles sur son site Internet ou sur simple demande. + +Creative Commons peut être contacté à https://creativecommons.org/. diff --git a/options/license/CC-BY-NC-SA-2.0-UK b/options/license/CC-BY-NC-SA-2.0-UK new file mode 100644 index 000000000..4025f2325 --- /dev/null +++ b/options/license/CC-BY-NC-SA-2.0-UK @@ -0,0 +1,149 @@ +Creative Commons Attribution - Non-Commercial - Share-Alike 2.0 England and Wales + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENCE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +Licence + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENCE ("CCPL" OR "LICENCE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENCE OR COPYRIGHT LAW IS PROHIBITED. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENCE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +This Creative Commons England and Wales Public Licence enables You (all capitalised terms defined below) to view, edit, modify, translate and distribute Works worldwide, under the terms of this licence, provided that You credit the Original Author. + +'The Licensor' [one or more legally recognised persons or entities offering the Work under the terms and conditions of this Licence] + +and + +'You' + +agree as follows: + +1. Definitions + + a. "Attribution" means acknowledging all the parties who have contributed to and have rights in the Work or Collective Work under this Licence. + + b. "Collective Work" means the Work in its entirety in unmodified form along with a number of other separate and independent works, assembled into a collective whole. + + c. "Derivative Work" means any work created by the editing, modification, adaptation or translation of the Work in any media (however a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this Licence). For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this Licence. + + d. "Licence" means this Creative Commons England and Wales Public Licence agreement. + + e. "Licence Elements" means the following high-level licence attributes indicated in the title of this Licence: Attribution, Non-Commercial, Share-Alike. + + f. "Non-Commercial" means "not primarily intended for or directed towards commercial advantage or private monetary compensation". The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed towards commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. + + g. "Original Author" means the individual (or entity) who created the Work. + + h. "Work" means the work protected by copyright which is offered under the terms of this Licence. + +For the purpose of this Licence, when not inconsistent with the context, words in the singular number include the plural number. + +2. Licence Terms + +2.1 The Licensor hereby grants to You a worldwide, royalty-free, non-exclusive, Licence for Non-Commercial use and for the duration of copyright in the Work. + +You may: + + • copy the Work; + + • create one or more Derivative Works; + + • incorporate the Work into one or more Collective Works; + + • copy Derivative Works or the Work as incorporated in any Collective Work; and + + • publish, distribute, archive, perform or otherwise disseminate the Work or the Work as incorporated in any Collective Work, to the public in any material form in any media whether now known or hereafter created. + +HOWEVER, + +You must not: + + • impose any terms on the use to be made of the Work, the Derivative Work or the Work as incorporated in a Collective Work that alter or restrict the terms of this Licence or any rights granted under it or has the effect or intent of restricting the ability to exercise those rights; + + • impose any digital rights management technology on the Work or the Work as incorporated in a Collective Work that alters or restricts the terms of this Licence or any rights granted under it or has the effect or intent of restricting the ability to exercise those rights; + + • sublicense the Work; + + • subject the Work to any derogatory treatment as defined in the Copyright, Designs and Patents Act 1988. + +FINALLY, + +You must: + + • make reference to this Licence (by Uniform Resource Identifier (URI), spoken word or as appropriate to the media used) on all copies of the Work and Collective Works published, distributed, performed or otherwise disseminated or made available to the public by You; + + • recognise the Licensor's / Original Author's right of attribution in any Work and Collective Work that You publish, distribute, perform or otherwise disseminate to the public and ensure that You credit the Licensor / Original Author as appropriate to the media used; and + + • to the extent reasonably practicable, keep intact all notices that refer to this Licence, in particular the URI, if any, that the Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. + +Additional Provisions for third parties making use of the Work + +2.2. Further licence from the Licensor + +Each time You publish, distribute, perform or otherwise disseminate + + • the Work; or + + • any Derivative Work; or + + • the Work as incorporated in a Collective Work + +the Licensor agrees to offer to the relevant third party making use of the Work (in any of the alternatives set out above) a licence to use the Work on the same terms and conditions as granted to You hereunder. + +2.3. Further licence from You + +Each time You publish, distribute, perform or otherwise disseminate + + • a Derivative Work; or + + • a Derivative Work as incorporated in a Collective Work + +You agree to offer to the relevant third party making use of the Work (in either of the alternatives set out above) a licence to use the Derivative Work on any of the following premises: + + • a licence on the same terms and conditions as the licence granted to You hereunder; or + + • a later version of the licence granted to You hereunder; or + + • any other Creative Commons licence with the same Licence Elements. + +2.4. This Licence does not affect any rights that the User may have under any applicable law, including fair use, fair dealing or any other legally recognised limitation or exception to copyright infringement. + +2.5. All rights not expressly granted by the Licensor are hereby reserved, including but not limited to, the exclusive right to collect, whether individually or via a licensing body, such as a collecting society, royalties for any use of the Work which results in commercial advantage or private monetary compensation. + +3. Warranties and Disclaimer + +Except as required by law, the Work is licensed by the Licensor on an "as is" and "as available" basis and without any warranty of any kind, either express or implied. + +4. Limit of Liability + +Subject to any liability which may not be excluded or limited by law the Licensor shall not be liable and hereby expressly excludes all liability for loss or damage howsoever and whenever caused to You. + +5. Termination + +The rights granted to You under this Licence shall terminate automatically upon any breach by You of the terms of this Licence. Individuals or entities who have received Collective Works from You under this Licence, however, will not have their Licences terminated provided such individuals or entities remain in full compliance with those Licences. + +6. General + +6.1. The validity or enforceability of the remaining terms of this agreement is not affected by the holding of any provision of it to be invalid or unenforceable. + +6.2. This Licence constitutes the entire Licence Agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. The Licensor shall not be bound by any additional provisions that may appear in any communication in any form. + +6.3. A person who is not a party to this Licence shall have no rights under the Contracts (Rights of Third Parties) Act 1999 to enforce any of its terms. + +6.4. This Licence shall be governed by the law of England and Wales and the parties irrevocably submit to the exclusive jurisdiction of the Courts of England and Wales. + +7. On the role of Creative Commons + +7.1. Neither the Licensor nor the User may use the Creative Commons logo except to indicate that the Work is licensed under a Creative Commons Licence. Any permitted use has to be in compliance with the Creative Commons trade mark usage guidelines at the time of use of the Creative Commons trade mark. These guidelines may be found on the Creative Commons website or be otherwise available upon request from time to time. + +7.2. Creative Commons Corporation does not profit financially from its role in providing this Licence and will not investigate the claims of any Licensor or user of the Licence. + +7.3. One of the conditions that Creative Commons Corporation requires of the Licensor and You is an acknowledgement of its limited role and agreement by all who use the Licence that the Corporation is not responsible to anyone for the statements and actions of You or the Licensor or anyone else attempting to use or using this Licence. + +7.4. Creative Commons Corporation is not a party to this Licence, and makes no warranty whatsoever in connection to the Work or in connection to the Licence, and in all events is not liable for any loss or damage resulting from the Licensor's or Your reliance on this Licence or on its enforceability. + +7.5. USE OF THIS LICENCE MEANS THAT YOU AND THE LICENSOR EACH ACCEPTS THESE CONDITIONS IN SECTION 7.1, 7.2, 7.3, 7.4 AND EACH ACKNOWLEDGES CREATIVE COMMONS CORPORATION'S VERY LIMITED ROLE AS A FACILITATOR OF THE LICENCE FROM THE LICENSOR TO YOU. + + Creative Commons is not a party to this Licence, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this licence. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + + Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + + Creative Commons may be contacted at https://creativecommons.org/. diff --git a/options/license/CC-BY-NC-SA-3.0 b/options/license/CC-BY-NC-SA-3.0 index 19606c0fb..8d1828791 100644 --- a/options/license/CC-BY-NC-SA-3.0 +++ b/options/license/CC-BY-NC-SA-3.0 @@ -1,344 +1,99 @@ -Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported CREATIVE -COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. -DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. -CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS -MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY -FOR DAMAGES RESULTING FROM ITS USE. +Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED -TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION -OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Adaptation" means a work based upon the Work, or upon the Work and other -pre-existing works, such as a translation, adaptation, derivative work, arrangement -of music or other alterations of a literary or artistic work, or phonogram -or performance and includes cinematographic adaptations or any other form -in which the Work may be recast, transformed, or adapted including in any -form recognizably derived from the original, except that a work that constitutes -a Collection will not be considered an Adaptation for the purpose of this -License. For the avoidance of doubt, where the Work is a musical work, performance -or phonogram, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered an Adaptation for the purpose of this -License. + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -b. "Collection" means a collection of literary or artistic works, such as -encyclopedias and anthologies, or performances, phonograms or broadcasts, -or other works or subject matter other than works listed in Section 1(g) below, -which, by reason of the selection and arrangement of their contents, constitute -intellectual creations, in which the Work is included in its entirety in unmodified -form along with one or more other contributions, each constituting separate -and independent works in themselves, which together are assembled into a collective -whole. A work that constitutes a Collection will not be considered an Adaptation -(as defined above) for the purposes of this License. + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(g) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -c. "Distribute" means to make available to the public the original and copies -of the Work or Adaptation, as appropriate, through sale or other transfer -of ownership. + c. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. -d. "License Elements" means the following high-level license attributes as -selected by Licensor and indicated in the title of this License: Attribution, -Noncommercial, ShareAlike. + d. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, Noncommercial, ShareAlike. -e. "Licensor" means the individual, individuals, entity or entities that offer(s) -the Work under the terms of this License. + e. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -f. "Original Author" means, in the case of a literary or artistic work, the -individual, individuals, entity or entities who created the Work or if no -individual or entity can be identified, the publisher; and in addition (i) -in the case of a performance the actors, singers, musicians, dancers, and -other persons who act, sing, deliver, declaim, play in, interpret or otherwise -perform literary or artistic works or expressions of folklore; (ii) in the -case of a phonogram the producer being the person or legal entity who first -fixes the sounds of a performance or other sounds; and, (iii) in the case -of broadcasts, the organization that transmits the broadcast. + f. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -g. "Work" means the literary and/or artistic work offered under the terms -of this License including without limitation any production in the literary, -scientific and artistic domain, whatever may be the mode or form of its expression -including digital form, such as a book, pamphlet and other writing; a lecture, -address, sermon or other work of the same nature; a dramatic or dramatico-musical -work; a choreographic work or entertainment in dumb show; a musical composition -with or without words; a cinematographic work to which are assimilated works -expressed by a process analogous to cinematography; a work of drawing, painting, -architecture, sculpture, engraving or lithography; a photographic work to -which are assimilated works expressed by a process analogous to photography; -a work of applied art; an illustration, map, plan, sketch or three-dimensional -work relative to geography, topography, architecture or science; a performance; -a broadcast; a phonogram; a compilation of data to the extent it is protected -as a copyrightable work; or a work performed by a variety or circus performer -to the extent it is not otherwise considered a literary or artistic work. + g. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -h. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + h. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -i. "Publicly Perform" means to perform public recitations of the Work and -to communicate to the public those public recitations, by any means or process, -including by wire or wireless means or public digital performances; to make -available to the public Works in such a way that members of the public may -access these Works from a place and at a place individually chosen by them; -to perform the Work to the public by any means or process and the communication -to the public of the performances of the Work, including by public digital -performance; to broadcast and rebroadcast the Work by any means including -signs, sounds or images. + i. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -j. "Reproduce" means to make copies of the Work by any means including without -limitation by sound or visual recordings and the right of fixation and reproducing -fixations of the Work, including storage of a protected performance or phonogram -in digital form or other electronic medium. + j. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. -2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, -or restrict any uses free from copyright or rights arising from limitations -or exceptions that are provided for in connection with the copyright protection -under copyright law or other applicable laws. +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to Reproduce the Work, to incorporate the Work into one or more Collections, -and to Reproduce the Work as incorporated in the Collections; + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; -b. to create and Reproduce Adaptations provided that any such Adaptation, -including any translation in any medium, takes reasonable steps to clearly -label, demarcate or otherwise identify that changes were made to the original -Work. For example, a translation could be marked "The original work was translated -from English to Spanish," or a modification could indicate "The original work -has been modified."; + b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; -c. to Distribute and Publicly Perform the Work including as incorporated in -Collections; and, + c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, - d. to Distribute and Publicly Perform Adaptations. + d. to Distribute and Publicly Perform Adaptations. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -Subject to Section 8(f), all rights not expressly granted by Licensor are -hereby reserved, including but not limited to the rights described in Section -4(e). +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights described in Section 4(e). -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may Distribute or Publicly Perform the Work only under the terms of -this License. You must include a copy of, or the Uniform Resource Identifier -(URI) for, this License with every copy of the Work You Distribute or Publicly -Perform. You may not offer or impose any terms on the Work that restrict the -terms of this License or the ability of the recipient of the Work to exercise -the rights granted to that recipient under the terms of the License. You may -not sublicense the Work. You must keep intact all notices that refer to this -License and to the disclaimer of warranties with every copy of the Work You -Distribute or Publicly Perform. When You Distribute or Publicly Perform the -Work, You may not impose any effective technological measures on the Work -that restrict the ability of a recipient of the Work from You to exercise -the rights granted to that recipient under the terms of the License. This -Section 4(a) applies to the Work as incorporated in a Collection, but this -does not require the Collection apart from the Work itself to be made subject -to the terms of this License. If You create a Collection, upon notice from -any Licensor You must, to the extent practicable, remove from the Collection -any credit as required by Section 4(d), as requested. If You create an Adaptation, -upon notice from any Licensor You must, to the extent practicable, remove -from the Adaptation any credit as required by Section 4(d), as requested. + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(d), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(d), as requested. -b. You may Distribute or Publicly Perform an Adaptation only under: (i) the -terms of this License; (ii) a later version of this License with the same -License Elements as this License; (iii) a Creative Commons jurisdiction license -(either this or a later license version) that contains the same License Elements -as this License (e.g., Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable -License"). You must include a copy of, or the URI, for Applicable License -with every copy of each Adaptation You Distribute or Publicly Perform. You -may not offer or impose any terms on the Adaptation that restrict the terms -of the Applicable License or the ability of the recipient of the Adaptation -to exercise the rights granted to that recipient under the terms of the Applicable -License. You must keep intact all notices that refer to the Applicable License -and to the disclaimer of warranties with every copy of the Work as included -in the Adaptation You Distribute or Publicly Perform. When You Distribute -or Publicly Perform the Adaptation, You may not impose any effective technological -measures on the Adaptation that restrict the ability of a recipient of the -Adaptation from You to exercise the rights granted to that recipient under -the terms of the Applicable License. This Section 4(b) applies to the Adaptation -as incorporated in a Collection, but this does not require the Collection -apart from the Adaptation itself to be made subject to the terms of the Applicable -License. + b. You may Distribute or Publicly Perform an Adaptation only under: (i) the terms of this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable License"). You must include a copy of, or the URI, for Applicable License with every copy of each Adaptation You Distribute or Publicly Perform. You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License. You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. -c. You may not exercise any of the rights granted to You in Section 3 above -in any manner that is primarily intended for or directed toward commercial -advantage or private monetary compensation. The exchange of the Work for other -copyrighted works by means of digital file-sharing or otherwise shall not -be considered to be intended for or directed toward commercial advantage or -private monetary compensation, provided there is no payment of any monetary -compensation in con-nection with the exchange of copyrighted works. + c. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in con-nection with the exchange of copyrighted works. -d. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, -You must, unless a request has been made pursuant to Section 4(a), keep intact -all copyright notices for the Work and provide, reasonable to the medium or -means You are utilizing: (i) the name of the Original Author (or pseudonym, -if applicable) if supplied, and/or if the Original Author and/or Licensor -designate another party or parties (e.g., a sponsor institute, publishing -entity, journal) for attribution ("Attribution Parties") in Licensor's copyright -notice, terms of service or by other reasonable means, the name of such party -or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably -practicable, the URI, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and, (iv) consistent with Section 3(b), in the case -of an Adaptation, a credit identifying the use of the Work in the Adaptation -(e.g., "French translation of the Work by Original Author," or "Screenplay -based on original Work by Original Author"). The credit required by this Section -4(d) may be implemented in any reasonable manner; provided, however, that -in the case of a Adaptation or Collection, at a minimum such credit will appear, -if a credit for all contributing authors of the Adaptation or Collection appears, -then as part of these credits and in a manner at least as prominent as the -credits for the other contributing authors. For the avoidance of doubt, You -may only use the credit required by this Section for the purpose of attribution -in the manner set out above and, by exercising Your rights under this License, -You may not implicitly or explicitly assert or imply any connection with, -sponsorship or endorsement by the Original Author, Licensor and/or Attribution -Parties, as appropriate, of You or Your use of the Work, without the separate, -express prior written permission of the Original Author, Licensor and/or Attribution -Parties. + d. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and, (iv) consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(d) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. - e. For the avoidance of doubt: + e. For the avoidance of doubt: -i. Non-waivable Compulsory License Schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -ii. Waivable Compulsory License Schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor reserves the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License if Your exercise -of such rights is for a purpose or use which is otherwise than noncommercial -as permitted under Section 4(c) and otherwise waives the right to collect -royalties through any statutory or compulsory licensing scheme; and, + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(c) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, -iii. Voluntary License Schemes. The Licensor reserves the right to collect -royalties, whether individually or, in the event that the Licensor is a member -of a collecting society that administers voluntary licensing schemes, via -that society, from any exercise by You of the rights granted under this License -that is for a purpose or use which is otherwise than noncommercial as permitted -under Section 4(c). + iii. Voluntary License Schemes. The Licensor reserves the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License that is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(c). -f. Except as otherwise agreed in writing by the Licensor or as may be otherwise -permitted by applicable law, if You Reproduce, Distribute or Publicly Perform -the Work either by itself or as part of any Adaptations or Collections, You -must not distort, mutilate, modify or take other derogatory action in relation -to the Work which would be prejudicial to the Original Author's honor or reputation. -Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise -of the right granted in Section 3(b) of this License (the right to make Adaptations) -would be deemed to be a distortion, mutilation, modification or other derogatory -action prejudicial to the Original Author's honor and reputation, the Licensor -will waive or not assert, as appropriate, this Section, to the fullest extent -permitted by the applicable national law, to enable You to reasonably exercise -Your right under Section 3(b) of this License (right to make Adaptations) -but not otherwise. + f. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING AND TO THE FULLEST -EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK AS-IS AND MAKES -NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, -IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES -OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO THIS EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING AND TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO THIS EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Adaptations or Collections from You under this License, -however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You Distribute or Publicly Perform the Work or a Collection, -the Licensor offers to the recipient a license to the Work on the same terms -and conditions as the license granted to You under this License. + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers -to the recipient a license to the original Work on the same terms and conditions -as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -f. The rights granted under, and the subject matter referenced, in this License -were drafted utilizing the terminology of the Berne Convention for the Protection -of Literary and Artistic Works (as amended on September 28, 1979), the Rome -Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances -and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised -on July 24, 1971). These rights and subject matter take effect in the relevant -jurisdiction in which the License terms are sought to be enforced according -to the corresponding provisions of the implementation of those treaty provisions -in the applicable national law. If the standard suite of rights granted under -applicable copyright law includes additional rights not granted under this -License, such additional rights are deemed to be included in the License; -this License is not intended to restrict the license of any rights under applicable -law. + f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. Creative Commons Notice -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, Creative Commons does not authorize the use by either -party of the trademark "Creative Commons" or any related trademark or logo -of Creative Commons without the prior written consent of Creative Commons. -Any permitted use will be in compliance with Creative Commons' then-current -trademark usage guidelines, as may be published on its website or otherwise -made available upon request from time to time. For the avoidance of doubt, -this trademark restriction does not form part of this License. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-NC-SA-3.0-DE b/options/license/CC-BY-NC-SA-3.0-DE new file mode 100644 index 000000000..ab3813ddb --- /dev/null +++ b/options/license/CC-BY-NC-SA-3.0-DE @@ -0,0 +1,125 @@ +Creative Commons Namensnennung - Keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland + + CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. + +Lizenz + +DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. + +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. + +1. Definitionen + + a. Der Begriff "Abwandlung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange die eigenpersönlichen Züge des Schutzgegenstandes darin nicht verblassen und daran eigene Schutzrechte entstehen. Das kann insbesondere eine Bearbeitung, Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Abwandlung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Benutzung des Schutzgegenstandes. + + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder Abwandlungen im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit anzubieten oder in Verkehr zu bringen. + + d. Unter "Lizenzelementen" werden im Sinne dieser Lizenz die folgenden übergeordneten Lizenzcharakteristika verstanden, die vom Lizenzgeber ausgewählt wurden und in der Bezeichnung der Lizenz zum Ausdruck kommen: "Namensnennung", "Keine kommerzielle Nutzung", "Weitergabe unter gleichen Bedingungen". + + e. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + + f. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person oder Gruppe von Personen, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und bei dem eine Einräumung von Nutzungsrechten oder eine Weiterübertragung an Dritte möglich ist. + + g. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine persönliche geistige Schöpfung jeglicher Art, ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff "Schutzgegenstand" im Sinne dieser Lizenz. + + h. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährten Nutzungsrechte trotz eines vorherigen Verstoßes auszuüben. + + i. Unter "Öffentlich Zeigen" im Sinne dieser Lizenz sind Veröffentlichungen und Präsentationen des Schutzgegenstandes zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und in unkörperlicher Form mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung, zeit- und ortsunabhängiger Zugänglichmachung oder in körperlicher Form mittels Ausstellung erfolgen, unabhängig von bestimmten Veranstaltungen und unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + + j. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, mittels beliebiger Verfahren Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch den Vorgang, erstmals körperliche Fixierungen des Schutzgegenstandes sowie Vervielfältigungsstücke dieser Fixierungen anzufertigen, sowie die Übertragung des Schutzgegenstandes auf einen Bild- oder Tonträger oder auf ein anderes elektronisches Medium, gleichviel ob in digitaler oder analoger Form. + +2. Schranken des Immaterialgüterrechts. Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die Ihnen aufgrund der Schranken des Urheberrechts oder anderer Rechtsnormen bereits ohne Weiteres zustehen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. + +3. Einräumung von Nutzungsrechten. Unter den Bedingungen dieser Lizenz räumt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 4.f) - das vergütungsfreie, räumlich und zeitlich (für die Dauer des Schutzrechts am Schutzgegenstand) unbeschränkte einfache Recht ein, den Schutzgegenstand auf die folgenden Arten und Weisen zu nutzen ("unentgeltlich eingeräumtes einfaches Nutzungsrecht für jedermann"): + + a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; + + b. Abwandlungen des Schutzgegenstandes anzufertigen, einschließlich Übersetzungen unter Nutzung jedweder Medien, sofern deutlich erkennbar gemacht wird, dass es sich um Abwandlungen handelt; + + c. den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich zu zeigen und zu verbreiten; + + d. Abwandlungen des Schutzgegenstandes zu veröffentlichen, öffentlich zu zeigen und zu verbreiten. + +Das vorgenannte Nutzungsrecht wird für alle bekannten sowie für alle noch nicht bekannten Nutzungsarten eingeräumt. Es beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich durch den Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf sämtliche aus diesem Schutz resultierenden Rechte. + +4. Bedingungen. Die Einräumung des Nutzungsrechts gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: + + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich zeigen. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.a) gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.d) aufgezählten Hinweise entfernen. Wenn Sie eine Abwandlung vornehmen, müssen Sie auf die Mitteilung eines Lizenzgebers hin von der Abwandlung die in Abschnitt 4.d) aufgezählten Hinweise entfernen. + + b. Sie dürfen eine Abwandlung ausschließlich unter den Bedingungen + + i. dieser Lizenz, + + ii. einer späteren Version dieser Lizenz mit denselben Lizenzelementen; + + iii. einer rechtsordnungsspezifischen Creative-Commons-Lizenz mit denselben Lizenzelementen ab Version 3.0 aufwärts (z.B. Namensnennung - Keine kommerzielle Nutzung - Weitergabe unter gleichen Bedingungen 3.0 US) oder + + iv. der Creative-Commons-Unported-Lizenz mit denselben Lizenzelementen ab Version 3.0 aufwärts + + verbreiten oder öffentlich zeigen ("Verwendbare Lizenz"). + + Sie müssen stets eine Kopie der verwendbaren Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen, wenn Sie die Abwandlung verbreiten oder öffentlich zeigen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen der verwendbaren Lizenz oder die durch sie gewährten Rechte beschränken. Bei jeder Abwandlung, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise auf die verwendbare Lizenz und den Haftungsausschluss unverändert lassen. Wenn Sie die Abwandlung verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf die Abwandlung) keine technischen Maßnahmen ergreifen, die den Nutzer der Abwandlung in der Ausübung der ihm durch die verwendbare Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.b) gilt auch für den Fall, dass die Abwandlung einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt der verwendbaren Lizenz unterstellt werden muss. + + c. Die Rechteeinräumung gemäß Abschnitt 3 gilt nur für Handlungen, die nicht vorrangig auf einen geschäftlichen Vorteil oder eine geldwerte Vergütung gerichtet sind ("nicht-kommerzielle Nutzung", "Non-commercial-Option"). Wird Ihnen in Zusammenhang mit dem Schutzgegenstand dieser Lizenz ein anderer Schutzgegenstand überlassen, ohne dass eine vertragliche Verpflichtung hierzu besteht (etwa im Wege von File-Sharing), so wird dies nicht als auf geschäftlichen Vorteil oder geldwerte Vergütung gerichtet angesehen, wenn in Verbindung mit dem Austausch der Schutzgegenstände tatsächlich keine Zahlung oder geldwerte Vergütung geleistet wird. + + d. Die Verbreitung und das öffentliche Zeigen des Schutzgegenstandes oder auf ihm aufbauender Abwandlungen oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie - soweit bekannt - Folgendes angeben: + + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers und / oder, falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) ("Zuschreibungsempfänger"), Namen bzw. Bezeichnung dieses oder dieser Dritten; + + ii. den Titel des Inhaltes; + + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand; + + iv. und im Falle einer Abwandlung des Schutzgegenstandes in Übereinstimmung mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Abwandlung handelt. + + Die nach diesem Abschnitt 4.d) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle einer Abwandlung des Schutzgegenstandes oder eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung mehrerer Rechteinhaber dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Lizenzgebers und / oder des Zuschreibungsempfängers weder explizit noch implizit irgendeine Verbindung zum Lizenzgeber oder Zuschreibungsempfänger und ebenso wenig eine Unterstützung oder Billigung durch ihn andeuten. + + e. Die oben unter 4.a) bis d) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. + + f. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechende Vergütung einzuziehen für jede Ausübung eines Rechts aus dieser Lizenz durch Sie. + + ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, behält sich der Lizenzgeber das ausschließliche Recht auf Einziehung der entsprechenden Vergütung für den Fall vor, dass Sie eine Nutzung des Schutzgegenstandes für andere als die in Abschnitt 4.c) als nicht-kommerziell definierten Zwecke vornehmen, verzichtet für alle übrigen, lizenzgerechten Fälle von Nutzung jedoch auf jegliche Vergütung. + + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Einziehung der Vergütung durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. Der Lizenzgeber behält sich jedoch das ausschließliche Recht auf Einziehung der entsprechenden Vergütung (durch ihn selbst oder eine Verwertungsgesellschaft) für den Fall vor, dass Sie eine Nutzung des Schutzgegenstandes für andere als die in Abschnitt 4.c) als nicht-kommerziell definierten Zwecke vornehmen. + + g. Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. + +5. Gewährleistung + +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE EINRÄUMUNG VON RECHTEN UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. DIESE GEWÄHRLEISTUNGSBESCHRÄNKUNG GILT NICHT, SOWEIT MÄNGEL ZU SCHÄDEN DER IN ABSCHNITT 6 BEZEICHNETEN ART FÜHREN UND AUF SEITEN DES LIZENZGEBERS DAS JEWEILS GENANNTE VERSCHULDEN BZW. VERTRETENMÜSSEN EBENFALLS VORLIEGT. + +6. Haftungsbeschränkung + +DER LIZENZGEBER HAFTET IHNEN GEGENÜBER IN BEZUG AUF SCHÄDEN AUS DER VERLETZUNG DES LEBENS, DES KÖRPERS ODER DER GESUNDHEIT NUR, SOFERN IHM WENIGSTENS FAHRLÄSSIGKEIT VORZUWERFEN IST, FÜR SONSTIGE SCHÄDEN NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG. + +7. Erlöschen + + a. Diese Lizenz und die durch sie eingeräumten Nutzungsrechte erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die Abwandlungen des Schutzgegenstandes oder diesen enthaltende Sammelwerke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. + + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. + +8. Sonstige Bestimmungen + + a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + b. Jedes Mal wenn Sie eine Abwandlung des Schutzgegenstandes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz am ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen unberührt. + + d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. + + e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß Ziffern 8.a) und b) angeboteten Lizenzen aus. + + f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Bundesrepublik Deutschland Anwendung. + +Creative Commons Notice + +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. + +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. + +Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-NC-SA-3.0-IGO b/options/license/CC-BY-NC-SA-3.0-IGO new file mode 100644 index 000000000..e03be0e88 --- /dev/null +++ b/options/license/CC-BY-NC-SA-3.0-IGO @@ -0,0 +1,105 @@ +Attribution-NonCommercial-ShareAlike 3.0 IGO + +CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. THE LICENSOR IS NOT NECESSARILY AN INTERGOVERNMENTAL ORGANIZATION (IGO), AS DEFINED IN THE LICENSE BELOW. + +License + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (“LICENSE”). THE LICENSOR (DEFINED BELOW) HOLDS COPYRIGHT AND OTHER RIGHTS IN THE WORK. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION FOR YOUR ACCEPTANCE AND AGREEMENT TO THE TERMS OF THE LICENSE. + +1. Definitions + + a. "IGO" means, solely and exclusively for purposes of this License, an organization established by a treaty or other instrument governed by international law and possessing its own international legal personality. Other organizations established to carry out activities across national borders and that accordingly enjoy immunity from legal process are also IGOs for the sole and exclusive purposes of this License. IGOs may include as members, in addition to states, other entities. + + b. "Work" means the literary and/or artistic work eligible for copyright protection, whatever may be the mode or form of its expression including digital form, and offered under the terms of this License. It is understood that a database, which by reason of the selection and arrangement of its contents constitutes an intellectual creation, is considered a Work. + + c. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License and may be, but is not necessarily, an IGO. + + d. "You" means an individual or entity exercising rights under this License. + + e. "License Elements" means the following high-level license attributes as selected by the Licensor and indicated in the title of this License: Attribution, Noncommercial, ShareAlike. + + f. "Reproduce" means to make a copy of the Work in any manner or form, and by any means. + + g. "Distribute" means the activity of making publicly available the Work or Adaptation (or copies of the Work or Adaptation), as applicable, by sale, rental, public lending or any other known form of transfer of ownership or possession of the Work or copy of the Work. + + h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. + + i. "Adaptation" means a work derived from or based upon the Work, or upon the Work and other pre-existing works. Adaptations may include works such as translations, derivative works, or any alterations and arrangements of any kind involving the Work. For purposes of this License, where the Work is a musical work, performance, or phonogram, the synchronization of the Work in timed-relation with a moving image is an Adaptation. For the avoidance of doubt, including the Work in a Collection is not an Adaptation. + + j. "Collection" means a collection of literary or artistic works or other works or subject matter other than works listed in Section 1(b) which by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. For the avoidance of doubt, a Collection will not be considered as an Adaptation. + +2. Scope of this License. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright protection. + +3. License Grant. Subject to the terms and conditions of this License, the Licensor hereby grants You a worldwide, royalty-free, non-exclusive license to exercise the rights in the Work as follows: + + a. to Reproduce, Distribute and Publicly Perform the Work, to incorporate the Work into one or more Collections, and to Reproduce, Distribute and Publicly Perform the Work as incorporated in the Collections; and, + + b. to create, Reproduce, Distribute and Publicly Perform Adaptations, provided that You clearly label, demarcate or otherwise identify that changes were made to the original Work. + +This License lasts for the duration of the term of the copyright in the Work licensed by the Licensor. The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by the Licensor are hereby reserved, including but not limited to the rights set forth in Section 4(e). + +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work (see section 8(a)). You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from a Licensor You must, to the extent practicable, remove from the Collection any credit (inclusive of any logo, trademark, official mark or official emblem) as required by Section 4(d), as requested. If You create an Adaptation, upon notice from a Licensor You must, to the extent practicable, remove from the Adaptation any credit (inclusive of any logo, trademark, official mark or official emblem) as required by Section 4(d), as requested. + + b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; or (iii) either the unported Creative Commons license or a ported Creative Commons license (either this or a later license version) containing the same License Elements (the “Applicable License”). (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform. (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License. (III) You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform. (IV) When You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. + + c. You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be primarily intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works. + + d. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) any attributions that the Licensor indicates be associated with the Work as indicated in a copyright notice, (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that the Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and, (iv) consistent with Section 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation. The credit required by this Section 4(d) may be implemented in any reasonable manner; provided, however, that in the case of an Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributors to the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Licensor or others designated for attribution, of You or Your use of the Work, without the separate, express prior written permission of the Licensor or such others. + + e. For the avoidance of doubt: + + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; + + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License if Your exercise of such rights is for a purpose or use which is otherwise than noncommercial as permitted under Section 4(c) and otherwise waives the right to collect royalties through any statutory or compulsory licensing scheme; and, + + iii. Voluntary License Schemes. To the extent possible, the Licensor waives the right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary licensing scheme. In all other cases the Licensor expressly reserves the right to collect such royalties. + + f. Except as otherwise agreed in writing by the Licensor, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the honor or reputation of the Licensor where moral rights apply. + +5. Representations, Warranties and Disclaimer + +THE LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. + +6. Limitation on Liability + +IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + + a. Subject to the terms and conditions set forth in this License, the license granted here lasts for the duration of the term of the copyright in the Work licensed by the Licensor as stated in Section 3. Notwithstanding the above, the Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated below. + + b. If You fail to comply with this License, then this License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. Notwithstanding the foregoing, this License reinstates automatically as of the date the violation is cured, provided it is cured within 30 days of You discovering the violation, or upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 7(b) does not affect any rights the Licensor may have to seek remedies for violations of this License by You. + +8. Miscellaneous + + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. + + b Each time You Distribute or Publicly Perform an Adaptation, the Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. + + c. If any provision of this License is invalid or unenforceable, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the Licensor. + + e. This License constitutes the entire agreement between You and the Licensor with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. The Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. + + f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). Interpretation of the scope of the rights granted by the Licensor and the conditions imposed on You under this License, this License, and the rights and conditions set forth herein shall be made with reference to copyright as determined in accordance with general principles of international law, including the above mentioned conventions. + + g. Nothing in this License constitutes or may be interpreted as a limitation upon or waiver of any privileges and immunities that may apply to the Licensor or You, including immunity from the legal processes of any jurisdiction, national court or other authority. + + h. Where the Licensor is an IGO, any and all disputes arising under this License that cannot be settled amicably shall be resolved in accordance with the following procedure: + + i. Pursuant to a notice of mediation communicated by reasonable means by either You or the Licensor to the other, the dispute shall be submitted to non-binding mediation conducted in accordance with rules designated by the Licensor in the copyright notice published with the Work, or if none then in accordance with those communicated in the notice of mediation. The language used in the mediation proceedings shall be English unless otherwise agreed. + + ii. If any such dispute has not been settled within 45 days following the date on which the notice of mediation is provided, either You or the Licensor may, pursuant to a notice of arbitration communicated by reasonable means to the other, elect to have the dispute referred to and finally determined by arbitration. The arbitration shall be conducted in accordance with the rules designated by the Licensor in the copyright notice published with the Work, or if none then in accordance with the UNCITRAL Arbitration Rules as then in force. The arbitral tribunal shall consist of a sole arbitrator and the language of the proceedings shall be English unless otherwise agreed. The place of arbitration shall be where the Licensor has its headquarters. The arbitral proceedings shall be conducted remotely (e.g., via telephone conference or written submissions) whenever practicable. + + iii. Interpretation of this License in any dispute submitted to mediation or arbitration shall be as set forth in Section 8(f), above. + +Creative Commons Notice + +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of the Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. + +Creative Commons may be contacted at https://creativecommons.org/. diff --git a/options/license/CC-BY-NC-SA-4.0 b/options/license/CC-BY-NC-SA-4.0 index 5797ceb35..baee873b6 100644 --- a/options/license/CC-BY-NC-SA-4.0 +++ b/options/license/CC-BY-NC-SA-4.0 @@ -1,362 +1,170 @@ -Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Creative -Commons Corporation ("Creative Commons") is not a law firm and does not provide -legal services or legal advice. Distribution of Creative Commons public licenses -does not create a lawyer-client or other relationship. Creative Commons makes -its licenses and related information available on an "as-is" basis. Creative -Commons gives no warranties regarding its licenses, any material licensed -under their terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the fullest -extent possible. +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International + + Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. -Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public -License +Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 – Definitions. -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. + a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. + b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. -c. BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, -approved by Creative Commons as essentially the equivalent of this Public -License. + c. BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. -d. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -e. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. + e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -f. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. + f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -g. License Elements means the license attributes listed in the name of a Creative -Commons Public License. The License Elements of this Public License are Attribution, -NonCommercial, and ShareAlike. + g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike. -h. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. + h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -i. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. + i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -j. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. + j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. -k. NonCommercial means not primarily intended for or directed towards commercial -advantage or monetary compensation. For purposes of this Public License, the -exchange of the Licensed Material for other material subject to Copyright -and Similar Rights by digital file-sharing or similar means is NonCommercial -provided there is no payment of monetary compensation in connection with the -exchange. + k. NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange. -l. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. + l. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -m. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. + m. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -n. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. + n. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 – Scope. - a. License grant. + a. License grant. -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: -A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial -purposes only; and + A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and -B. produce, reproduce, and Share Adapted Material for NonCommercial purposes -only. + B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only. -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. + 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - 3. Term. The term of this Public License is specified in Section 6(a). + 3. Term. The term of this Public License is specified in Section 6(a). -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. + 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. - 5. Downstream recipients. + 5. Downstream recipients. -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. + A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -B. Additional offer from the Licensor – Adapted Material. Every recipient -of Adapted Material from You automatically receives an offer from the Licensor -to exercise the Licensed Rights in the Adapted Material under the conditions -of the Adapter's License You apply. + B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. -C. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. + C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). + 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - b. Other rights. + b. Other rights. -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. -2. Patent and trademark rights are not licensed under this Public License. + 2. Patent and trademark rights are not licensed under this Public License. -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties, including when the Licensed Material is used other -than for NonCommercial purposes. + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. Section 3 – License Conditions. -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. +Your exercise of the Licensed Rights is expressly made subject to the following conditions. - a. Attribution. + a. Attribution. -1. If You Share the Licensed Material (including in modified form), You must: + 1. If You Share the Licensed Material (including in modified form), You must: -A. retain the following if it is supplied by the Licensor with the Licensed -Material: + A. retain the following if it is supplied by the Licensor with the Licensed Material: -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - ii. a copyright notice; + ii. a copyright notice; - iii. a notice that refers to this Public License; + iii. a notice that refers to this Public License; - iv. a notice that refers to the disclaimer of warranties; + iv. a notice that refers to the disclaimer of warranties; - + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. + b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. -b. ShareAlike.In addition to the conditions in Section 3(a), if You Share -Adapted Material You produce, the following conditions also apply. + 1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License. -1. The Adapter's License You apply must be a Creative Commons license with -the same License Elements, this version or later, or a BY-NC-SA Compatible -License. + 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. -2. You must include the text of, or the URI or hyperlink to, the Adapter's -License You apply. You may satisfy this condition in any reasonable manner -based on the medium, means, and context in which You Share Adapted Material. - -3. You may not offer or impose any additional or different terms or conditions -on, or apply any Effective Technological Measures to, Adapted Material that -restrict exercise of the rights granted under the Adapter's License You apply. + 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 – Sui Generis Database Rights. -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database for NonCommercial purposes only; + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only; -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material, including for purposes of Section 3(b); and + b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. + c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 – Disclaimer of Warranties and Limitation of Liability. -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. + a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. + b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. + c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 – Term and Termination. -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. + a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: + b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - 2. upon express reinstatement by the Licensor. + 2. upon express reinstatement by the Licensor. -For the avoidance of doubt, this Section 6(b) does not affect any right the -Licensor may have to seek remedies for Your violations of this Public License. + For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. -c. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. + c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 – Other Terms and Conditions. -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. + a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. + b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 – Interpretation. -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. + a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. + b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. + c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. + d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. diff --git a/options/license/CC-BY-ND-1.0 b/options/license/CC-BY-ND-1.0 index a18d1ab47..27972e4d9 100644 --- a/options/license/CC-BY-ND-1.0 +++ b/options/license/CC-BY-ND-1.0 @@ -1,183 +1,73 @@ -Creative Commons Attribution-NoDerivs 1.0 CREATIVE COMMONS CORPORATION IS -NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT -LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NoDerivs 1.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; -b. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + b. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. -b. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Collective Works, You must keep intact all copyright -notices for the Work and give the Original Author credit reasonable to the -medium or means You are utilizing by conveying the name (or pseudonym if applicable) -of the Original Author if supplied; the title of the Work if supplied. Such -credit may be implemented in any reasonable manner; provided, however, that -in the case of a Collective Work, at a minimum such credit will appear where -any other comparable authorship credit appears and in a manner at least as -prominent as such other comparable authorship credit. + b. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied. Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -a. By offering the Work for public release under this License, Licensor represents -and warrants that, to the best of Licensor's knowledge after reasonable inquiry: + a. By offering the Work for public release under this License, Licensor represents and warrants that, to the best of Licensor's knowledge after reasonable inquiry: -i. Licensor has secured all rights in the Work necessary to grant the license -rights hereunder and to permit the lawful exercise of the rights granted hereunder -without You having any obligation to pay any royalties, compulsory license -fees, residuals or any other payments; + i. Licensor has secured all rights in the Work necessary to grant the license rights hereunder and to permit the lawful exercise of the rights granted hereunder without You having any obligation to pay any royalties, compulsory license fees, residuals or any other payments; -ii. The Work does not infringe the copyright, trademark, publicity rights, -common law rights or any other right of any third party or constitute defamation, -invasion of privacy or other tortious injury to any third party. + ii. The Work does not infringe the copyright, trademark, publicity rights, common law rights or any other right of any third party or constitute defamation, invasion of privacy or other tortious injury to any third party. -b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING -OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. + b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM -BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE -TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE -OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN -IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Collective Works from You under this License, however, will -not have their licenses terminated provided such individuals or entities remain -in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will -survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -d. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + d. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-ND-2.0 b/options/license/CC-BY-ND-2.0 index 1a41ece83..3a0140868 100644 --- a/options/license/CC-BY-ND-2.0 +++ b/options/license/CC-BY-ND-2.0 @@ -1,205 +1,75 @@ -Creative Commons Attribution-NoDerivs 2.0 CREATIVE COMMONS CORPORATION IS -NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE -DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES -THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NoDerivs 2.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. -For the avoidance of doubt, where the Work is a musical composition or sound -recording, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered a Derivative Work for the purpose of -this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; -b. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works. + b. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works. - c. For the avoidance of doubt, where the work is a musical composition: + c. For the avoidance of doubt, where the work is a musical composition: -i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive -right to collect, whether individually or via a performance rights society -(e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital -performance (e.g. webcast) of the Work. + i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. -ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive -right to collect, whether individually or via a music rights society or designated -agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from -the Work ("cover version") and distribute, subject to the compulsory license -created by 17 USC Section 115 of the US Copyright Act (or the equivalent in -other jurisdictions). + ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). -d. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, -where the Work is a sound recording, Licensor waives the exclusive right to -collect, whether individually or via a performance-rights society (e.g. SoundExchange), -royalties for the public digital performance (e.g. webcast) of the Work, subject -to the compulsory license created by 17 USC Section 114 of the US Copyright -Act (or the equivalent in other jurisdictions). + d. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). - +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Derivative Works. All rights not expressly granted by Licensor are hereby reserved. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats, -but otherwise you have no rights to make Derivative Works. All rights not -expressly granted by Licensor are hereby reserved. +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. + b. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; and to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. -b. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or Collective Works, You must keep intact all copyright notices -for the Work and give the Original Author credit reasonable to the medium -or means You are utilizing by conveying the name (or pseudonym if applicable) -of the Original Author if supplied; the title of the Work if supplied; and -to the extent reasonably practicable, the Uniform Resource Identifier, if -any, that Licensor specifies to be associated with the Work, unless such URI -does not refer to the copyright notice or licensing information for the Work. -Such credit may be implemented in any reasonable manner; provided, however, -that in the case of a Collective Work, at a minimum such credit will appear -where any other comparable authorship credit appears and in a manner at least -as prominent as such other comparable authorship credit. +5. Representations, Warranties and Disclaimer - 5. Representations, Warranties and Disclaimer +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT -LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR -PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, -OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS -DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT -APPLY TO YOU. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +7. Termination - 7. Termination + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Collective Works from You under this License, however, will -not have their licenses terminated provided such individuals or entities remain -in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will -survive any termination of this License. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. +8. Miscellaneous - 8. Miscellaneous + a. Each time You distribute or publicly digitally perform the Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -a. Each time You distribute or publicly digitally perform the Work, the Licensor -offers to the recipient a license to the Work on the same terms and conditions -as the license granted to You under this License. + b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -b. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -d. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. - -Creative Commons may be contacted at https://creativecommons.org/. +Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-ND-3.0 b/options/license/CC-BY-ND-3.0 index 33575d188..d9265b9f1 100644 --- a/options/license/CC-BY-ND-3.0 +++ b/options/license/CC-BY-ND-3.0 @@ -1,276 +1,87 @@ -Creative Commons Attribution-NoDerivs 3.0 Unported CREATIVE COMMONS CORPORATION -IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS -LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-NoDerivs 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED -TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION -OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Adaptation" means a work based upon the Work, or upon the Work and other -pre-existing works, such as a translation, adaptation, derivative work, arrangement -of music or other alterations of a literary or artistic work, or phonogram -or performance and includes cinematographic adaptations or any other form -in which the Work may be recast, transformed, or adapted including in any -form recognizably derived from the original, except that a work that constitutes -a Collection will not be considered an Adaptation for the purpose of this -License. For the avoidance of doubt, where the Work is a musical work, performance -or phonogram, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered an Adaptation for the purpose of this -License. + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -b. "Collection" means a collection of literary or artistic works, such as -encyclopedias and anthologies, or performances, phonograms or broadcasts, -or other works or subject matter other than works listed in Section 1(f) below, -which, by reason of the selection and arrangement of their contents, constitute -intellectual creations, in which the Work is included in its entirety in unmodified -form along with one or more other contributions, each constituting separate -and independent works in themselves, which together are assembled into a collective -whole. A work that constitutes a Collection will not be considered an Adaptation -(as defined above) for the purposes of this License. + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined above) for the purposes of this License. -c. "Distribute" means to make available to the public the original and copies -of the Work through sale or other transfer of ownership. + c. "Distribute" means to make available to the public the original and copies of the Work through sale or other transfer of ownership. -d. "Licensor" means the individual, individuals, entity or entities that offer(s) -the Work under the terms of this License. + d. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -e. "Original Author" means, in the case of a literary or artistic work, the -individual, individuals, entity or entities who created the Work or if no -individual or entity can be identified, the publisher; and in addition (i) -in the case of a performance the actors, singers, musicians, dancers, and -other persons who act, sing, deliver, declaim, play in, interpret or otherwise -perform literary or artistic works or expressions of folklore; (ii) in the -case of a phonogram the producer being the person or legal entity who first -fixes the sounds of a performance or other sounds; and, (iii) in the case -of broadcasts, the organization that transmits the broadcast. + e. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -f. "Work" means the literary and/or artistic work offered under the terms -of this License including without limitation any production in the literary, -scientific and artistic domain, whatever may be the mode or form of its expression -including digital form, such as a book, pamphlet and other writing; a lecture, -address, sermon or other work of the same nature; a dramatic or dramatico-musical -work; a choreographic work or entertainment in dumb show; a musical composition -with or without words; a cinematographic work to which are assimilated works -expressed by a process analogous to cinematography; a work of drawing, painting, -architecture, sculpture, engraving or lithography; a photographic work to -which are assimilated works expressed by a process analogous to photography; -a work of applied art; an illustration, map, plan, sketch or three-dimensional -work relative to geography, topography, architecture or science; a performance; -a broadcast; a phonogram; a compilation of data to the extent it is protected -as a copyrightable work; or a work performed by a variety or circus performer -to the extent it is not otherwise considered a literary or artistic work. + f. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -g. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + g. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -h. "Publicly Perform" means to perform public recitations of the Work and -to communicate to the public those public recitations, by any means or process, -including by wire or wireless means or public digital performances; to make -available to the public Works in such a way that members of the public may -access these Works from a place and at a place individually chosen by them; -to perform the Work to the public by any means or process and the communication -to the public of the performances of the Work, including by public digital -performance; to broadcast and rebroadcast the Work by any means including -signs, sounds or images. + h. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -i. "Reproduce" means to make copies of the Work by any means including without -limitation by sound or visual recordings and the right of fixation and reproducing -fixations of the Work, including storage of a protected performance or phonogram -in digital form or other electronic medium. + i. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. -2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, -or restrict any uses free from copyright or rights arising from limitations -or exceptions that are provided for in connection with the copyright protection -under copyright law or other applicable laws. +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to Reproduce the Work, to incorporate the Work into one or more Collections, -and to Reproduce the Work as incorporated in the Collections; and, + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; and, -b. to Distribute and Publicly Perform the Work including as incorporated in -Collections. + b. to Distribute and Publicly Perform the Work including as incorporated in Collections. - c. For the avoidance of doubt: + c. For the avoidance of doubt: -i. Non-waivable Compulsory License Schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -ii. Waivable Compulsory License Schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor waives the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License; and, + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, -iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, -whether individually or, in the event that the Licensor is a member of a collecting -society that administers voluntary licensing schemes, via that society, from -any exercise by You of the rights granted under this License. + iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats, -but otherwise you have no rights to make Adaptations. Subject to Section 8(f), -all rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Adaptations. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may Distribute or Publicly Perform the Work only under the terms of -this License. You must include a copy of, or the Uniform Resource Identifier -(URI) for, this License with every copy of the Work You Distribute or Publicly -Perform. You may not offer or impose any terms on the Work that restrict the -terms of this License or the ability of the recipient of the Work to exercise -the rights granted to that recipient under the terms of the License. You may -not sublicense the Work. You must keep intact all notices that refer to this -License and to the disclaimer of warranties with every copy of the Work You -Distribute or Publicly Perform. When You Distribute or Publicly Perform the -Work, You may not impose any effective technological measures on the Work -that restrict the ability of a recipient of the Work from You to exercise -the rights granted to that recipient under the terms of the License. This -Section 4(a) applies to the Work as incorporated in a Collection, but this -does not require the Collection apart from the Work itself to be made subject -to the terms of this License. If You create a Collection, upon notice from -any Licensor You must, to the extent practicable, remove from the Collection -any credit as required by Section 4(b), as requested. + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(b), as requested. -b. If You Distribute, or Publicly Perform the Work or Collections, You must, -unless a request has been made pursuant to Section 4(a), keep intact all copyright -notices for the Work and provide, reasonable to the medium or means You are -utilizing: (i) the name of the Original Author (or pseudonym, if applicable) -if supplied, and/or if the Original Author and/or Licensor designate another -party or parties (e.g., a sponsor institute, publishing entity, journal) for -attribution ("Attribution Parties") in Licensor's copyright notice, terms -of service or by other reasonable means, the name of such party or parties; -(ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, -the URI, if any, that Licensor specifies to be associated with the Work, unless -such URI does not refer to the copyright notice or licensing information for -the Work. The credit required by this Section 4(b) may be implemented in any -reasonable manner; provided, however, that in the case of a Collection, at -a minimum such credit will appear, if a credit for all contributing authors -of the Collection appears, then as part of these credits and in a manner at -least as prominent as the credits for the other contributing authors. For -the avoidance of doubt, You may only use the credit required by this Section -for the purpose of attribution in the manner set out above and, by exercising -Your rights under this License, You may not implicitly or explicitly assert -or imply any connection with, sponsorship or endorsement by the Original Author, -Licensor and/or Attribution Parties, as appropriate, of You or Your use of -the Work, without the separate, express prior written permission of the Original -Author, Licensor and/or Attribution Parties. + b. If You Distribute, or Publicly Perform the Work or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. The credit required by this Section 4(b) may be implemented in any reasonable manner; provided, however, that in the case of a Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. -c. Except as otherwise agreed in writing by the Licensor or as may be otherwise -permitted by applicable law, if You Reproduce, Distribute or Publicly Perform -the Work either by itself or as part of any Collections, You must not distort, -mutilate, modify or take other derogatory action in relation to the Work which -would be prejudicial to the Original Author's honor or reputation. + c. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Collections from You under this License, however, will not -have their licenses terminated provided such individuals or entities remain -in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will -survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You Distribute or Publicly Perform the Work or a Collection, -the Licensor offers to the recipient a license to the Work on the same terms -and conditions as the license granted to You under this License. + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -d. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + d. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -e. The rights granted under, and the subject matter referenced, in this License -were drafted utilizing the terminology of the Berne Convention for the Protection -of Literary and Artistic Works (as amended on September 28, 1979), the Rome -Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances -and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised -on July 24, 1971). These rights and subject matter take effect in the relevant -jurisdiction in which the License terms are sought to be enforced according -to the corresponding provisions of the implementation of those treaty provisions -in the applicable national law. If the standard suite of rights granted under -applicable copyright law includes additional rights not granted under this -License, such additional rights are deemed to be included in the License; -this License is not intended to restrict the license of any rights under applicable -law. + e. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. Creative Commons Notice -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, Creative Commons does not authorize the use by either -party of the trademark "Creative Commons" or any related trademark or logo -of Creative Commons without the prior written consent of Creative Commons. -Any permitted use will be in compliance with Creative Commons' then-current -trademark usage guidelines, as may be published on its website or otherwise -made available upon request from time to time. For the avoidance of doubt, -this trademark restriction does not form part of this License. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of this License. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-ND-3.0-DE b/options/license/CC-BY-ND-3.0-DE new file mode 100644 index 000000000..724e68ed1 --- /dev/null +++ b/options/license/CC-BY-ND-3.0-DE @@ -0,0 +1,100 @@ +Creative Commons Namensnennung - Keine Bearbeitungen 3.0 Deutschland + + CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. + +Lizenz + +DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. + +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. + +1. Definitionen + + a. Der Begriff "Abwandlung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange die eigenpersönlichen Züge des Schutzgegenstandes darin nicht verblassen und daran eigene Schutzrechte entstehen. Das kann insbesondere eine Bearbeitung, Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Abwandlung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Benutzung des Schutzgegenstandes. + + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit anzubieten oder in Verkehr zu bringen. + + d. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + + e. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person oder Gruppe von Personen, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und bei dem eine Einräumung von Nutzungsrechten oder eine Weiterübertragung an Dritte möglich ist. + + f. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine persönliche geistige Schöpfung jeglicher Art, ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff "Schutzgegenstand" im Sinne dieser Lizenz. + + g. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährten Nutzungsrechte trotz eines vorherigen Verstoßes auszuüben. + + h. Unter "Öffentlich Zeigen" im Sinne dieser Lizenz sind Veröffentlichungen und Präsentationen des Schutzgegenstandes zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und in unkörperlicher Form mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung, zeit- und ortsunabhängiger Zugänglichmachung oder in körperlicher Form mittels Ausstellung erfolgen, unabhängig von bestimmten Veranstaltungen und unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + + i. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, mittels beliebiger Verfahren Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch den Vorgang, erstmals körperliche Fixierungen des Schutzgegenstandes sowie Vervielfältigungsstücke dieser Fixierungen anzufertigen, sowie die Übertragung des Schutzgegenstandes auf einen Bild- oder Tonträger oder auf ein anderes elektronisches Medium, gleichviel ob in digitaler oder analoger Form. + +2. Schranken des Immaterialgüterrechts. Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die Ihnen aufgrund der Schranken des Urheberrechts oder anderer Rechtsnormen bereits ohne Weiteres zustehen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. + +3. Einräumung von Nutzungsrechten. Unter den Bedingungen dieser Lizenz räumt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 3.c) - das vergütungsfreie, räumlich und zeitlich (für die Dauer des Schutzrechts am Schutzgegenstand) unbeschränkte einfache Recht ein, den Schutzgegenstand auf die folgenden Arten und Weisen zu nutzen ("unentgeltlich eingeräumtes einfaches Nutzungsrecht für jedermann"): + + a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; + + b. den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich zu zeigen und zu verbreiten. + + c. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechende Vergütung einzuziehen für jede Ausübung eines Rechts aus dieser Lizenz durch Sie. + + ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, verzichtet der Lizenzgeber für alle Fälle einer lizenzgerechten Nutzung des Schutzgegenstandes durch Sie auf jegliche Vergütung. + + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Einziehung der Vergütung durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. + +Das vorgenannte Nutzungsrecht wird für alle bekannten sowie für alle noch nicht bekannten Nutzungsarten eingeräumt. Es beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Weitergehende Änderungen oder Abwandlungen sind jedoch untersagt. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich durch den Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf sämtliche aus diesem Schutz resultierenden Rechte. + +4. Bedingungen. Die Einräumung des Nutzungsrechts gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: + + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich zeigen. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.a) gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.b) aufgezählten Hinweise entfernen. + + b. Die Verbreitung und das öffentliche Zeigen des Schutzgegenstandes oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie - soweit bekannt - Folgendes angeben: + + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers und / oder, falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) ("Zuschreibungsempfänger"), Namen bzw. Bezeichnung dieses oder dieser Dritten; + + ii. den Titel des Inhaltes; + + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand. + + Die nach diesem Abschnitt 4.b) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung mehrerer Rechteinhaber dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Lizenzgebers und / oder des Zuschreibungsempfängers weder explizit noch implizit irgendeine Verbindung zum Lizenzgeber oder Zuschreibungsempfänger und ebenso wenig eine Unterstützung oder Billigung durch ihn andeuten. + + c. Die oben unter 4.a) und b) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. + + d. Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. + +5. Gewährleistung + +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE EINRÄUMUNG VON RECHTEN UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. DIESE GEWÄHRLEISTUNGSBESCHRÄNKUNG GILT NICHT, SOWEIT MÄNGEL ZU SCHÄDEN DER IN ABSCHNITT 6 BEZEICHNETEN ART FÜHREN UND AUF SEITEN DES LIZENZGEBERS DAS JEWEILS GENANNTE VERSCHULDEN BZW. VERTRETENMÜSSEN EBENFALLS VORLIEGT. + +6. Haftungsbeschränkung + +DER LIZENZGEBER HAFTET IHNEN GEGENÜBER IN BEZUG AUF SCHÄDEN AUS DER VERLETZUNG DES LEBENS, DES KÖRPERS ODER DER GESUNDHEIT NUR, SOFERN IHM WENIGSTENS FAHRLÄSSIGKEIT VORZUWERFEN IST, FÜR SONSTIGE SCHÄDEN NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG. + +7. Erlöschen + + a. Diese Lizenz und die durch sie eingeräumten Nutzungsrechte erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die den Schutzgegenstand enthaltende Sammelwerke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. + + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. + +8. Sonstige Bestimmungen + + a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + b. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen unberührt. + + c. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. + + d. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß Ziffern 8.a) angeboteten Lizenzen aus. + + e. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Bundesrepublik Deutschland Anwendung. + + +Creative Commons Notice + +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. + +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. + +Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-ND-4.0 b/options/license/CC-BY-ND-4.0 index 7f7a7880c..09a21c735 100644 --- a/options/license/CC-BY-ND-4.0 +++ b/options/license/CC-BY-ND-4.0 @@ -1,321 +1,154 @@ -Creative Commons Attribution-NoDerivatives 4.0 International Creative Commons -Corporation ("Creative Commons") is not a law firm and does not provide legal -services or legal advice. Distribution of Creative Commons public licenses -does not create a lawyer-client or other relationship. Creative Commons makes -its licenses and related information available on an "as-is" basis. Creative -Commons gives no warranties regarding its licenses, any material licensed -under their terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the fullest -extent possible. +Creative Commons Attribution-NoDerivatives 4.0 International + + Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. Creative Commons Attribution-NoDerivatives 4.0 International Public License -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution-NoDerivatives -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NoDerivatives 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 – Definitions. -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. + a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -b. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + b. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -c. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. + c. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -d. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. + d. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -e. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. + e. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -f. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. + f. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -g. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. + g. Licensor means the individual(s) or entity(ies) granting rights under this Public License. -h. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. + h. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -i. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. + i. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -j. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. + j. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 – Scope. - a. License grant. + a. License grant. -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: - A. reproduce and Share the Licensed Material, in whole or in part; and + A. reproduce and Share the Licensed Material, in whole or in part; and - B. produce and reproduce, but not Share, Adapted Material. + B. produce and reproduce, but not Share, Adapted Material. -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. + 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - 3. Term. The term of this Public License is specified in Section 6(a). + 3. Term. The term of this Public License is specified in Section 6(a). -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. + 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. - 5. Downstream recipients. + 5. Downstream recipients. -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. + A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. + B. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). + 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - b. Other rights. + b. Other rights. -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. -2. Patent and trademark rights are not licensed under this Public License. + 2. Patent and trademark rights are not licensed under this Public License. -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties. + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 – License Conditions. -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. +Your exercise of the Licensed Rights is expressly made subject to the following conditions. - a. Attribution. + a. Attribution. - 1. If You Share the Licensed Material, You must: + 1. If You Share the Licensed Material, You must: -A. retain the following if it is supplied by the Licensor with the Licensed -Material: + A. retain the following if it is supplied by the Licensor with the Licensed Material: -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - ii. a copyright notice; + ii. a copyright notice; - iii. a notice that refers to this Public License; + iii. a notice that refers to this Public License; - iv. a notice that refers to the disclaimer of warranties; + iv. a notice that refers to the disclaimer of warranties; -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -2. For the avoidance of doubt, You do not have permission under this Public -License to Share Adapted Material. + 2. For the avoidance of doubt, You do not have permission under this Public License to Share Adapted Material. -3. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. + 3. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. -4. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. + 4. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. Section 4 – Sui Generis Database Rights. -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database, provided You do not Share Adapted Material; + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database, provided You do not Share Adapted Material; -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and + b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. + c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 – Disclaimer of Warranties and Limitation of Liability. -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. + a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. + b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. + c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 – Term and Termination. -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. + a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: + b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - 2. upon express reinstatement by the Licensor. + 2. upon express reinstatement by the Licensor. -c. For the avoidance of doubt, this Section 6(b) does not affect any right -the Licensor may have to seek remedies for Your violations of this Public -License. + c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. -d. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. + d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. - e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 – Other Terms and Conditions. -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. + a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. + b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 – Interpretation. -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. + a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. + b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. + c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. + d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. diff --git a/options/license/CC-BY-SA-1.0 b/options/license/CC-BY-SA-1.0 index cdbad3e06..9930ef7b7 100644 --- a/options/license/CC-BY-SA-1.0 +++ b/options/license/CC-BY-SA-1.0 @@ -1,214 +1,81 @@ -Creative Commons Attribution-ShareAlike 1.0 CREATIVE COMMONS CORPORATION IS -NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT -LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-ShareAlike 1.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DRAFT LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works; + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works; -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. You may distribute, publicly display, publicly perform, or publicly digitally -perform a Derivative Work only under the terms of this License, and You must -include a copy of, or the Uniform Resource Identifier for, this License with -every copy or phonorecord of each Derivative Work You distribute, publicly -display, publicly perform, or publicly digitally perform. You may not offer -or impose any terms on the Derivative Works that alter or restrict the terms -of this License or the recipients' exercise of the rights granted hereunder, -and You must keep intact all notices that refer to this License and to the -disclaimer of warranties. You may not distribute, publicly display, publicly -perform, or publicly digitally perform the Derivative Work with any technological -measures that control access or use of the Work in a manner inconsistent with -the terms of this License Agreement. The above applies to the Derivative Work -as incorporated in a Collective Work, but this does not require the Collective -Work apart from the Derivative Work itself to be made subject to the terms -of this License. + b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. -c. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -a. By offering the Work for public release under this License, Licensor represents -and warrants that, to the best of Licensor's knowledge after reasonable inquiry: + a. By offering the Work for public release under this License, Licensor represents and warrants that, to the best of Licensor's knowledge after reasonable inquiry: -i. Licensor has secured all rights in the Work necessary to grant the license -rights hereunder and to permit the lawful exercise of the rights granted hereunder -without You having any obligation to pay any royalties, compulsory license -fees, residuals or any other payments; + i. Licensor has secured all rights in the Work necessary to grant the license rights hereunder and to permit the lawful exercise of the rights granted hereunder without You having any obligation to pay any royalties, compulsory license fees, residuals or any other payments; -ii. The Work does not infringe the copyright, trademark, publicity rights, -common law rights or any other right of any third party or constitute defamation, -invasion of privacy or other tortious injury to any third party. + ii. The Work does not infringe the copyright, trademark, publicity rights, common law rights or any other right of any third party or constitute defamation, invasion of privacy or other tortious injury to any third party. -b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING -OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT -WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. + b. EXCEPT AS EXPRESSLY STATED IN THIS LICENSE OR OTHERWISE AGREED IN WRITING OR REQUIRED BY APPLICABLE LAW, THE WORK IS LICENSED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES REGARDING THE CONTENTS OR ACCURACY OF THE WORK. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM -BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE -TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE -OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN -IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, AND EXCEPT FOR DAMAGES ARISING FROM LIABILITY TO A THIRD PARTY RESULTING FROM BREACH OF THE WARRANTIES IN SECTION 5, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-SA-2.0 b/options/license/CC-BY-SA-2.0 index 400c7c35d..d1e03057f 100644 --- a/options/license/CC-BY-SA-2.0 +++ b/options/license/CC-BY-SA-2.0 @@ -1,240 +1,85 @@ -Creative Commons Attribution-ShareAlike 2.0 CREATIVE COMMONS CORPORATION IS -NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE -DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES -THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-ShareAlike 2.0 + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS -CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Collective Work" means a work, such as a periodical issue, anthology or -encyclopedia, in which the Work in its entirety in unmodified form, along -with a number of other contributions, constituting separate and independent -works in themselves, are assembled into a collective whole. A work that constitutes -a Collective Work will not be considered a Derivative Work (as defined below) -for the purposes of this License. + a. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. -b. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works, such as a translation, musical arrangement, dramatization, -fictionalization, motion picture version, sound recording, art reproduction, -abridgment, condensation, or any other form in which the Work may be recast, -transformed, or adapted, except that a work that constitutes a Collective -Work will not be considered a Derivative Work for the purpose of this License. -For the avoidance of doubt, where the Work is a musical composition or sound -recording, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered a Derivative Work for the purpose of -this License. + b. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. -c. "Licensor" means the individual or entity that offers the Work under the -terms of this License. + c. "Licensor" means the individual or entity that offers the Work under the terms of this License. - d. "Original Author" means the individual or entity who created the Work. + d. "Original Author" means the individual or entity who created the Work. -e. "Work" means the copyrightable work of authorship offered under the terms -of this License. + e. "Work" means the copyrightable work of authorship offered under the terms of this License. -f. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + f. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -g. "License Elements" means the following high-level license attributes as -selected by Licensor and indicated in the title of this License: Attribution, -ShareAlike. + g. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. -2. Fair Use Rights. Nothing in this license is intended to reduce, limit, -or restrict any rights arising from fair use, first sale or other limitations -on the exclusive rights of the copyright owner under copyright law or other -applicable laws. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to reproduce the Work, to incorporate the Work into one or more Collective -Works, and to reproduce the Work as incorporated in the Collective Works; + a. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; - b. to create and reproduce Derivative Works; + b. to create and reproduce Derivative Works; -c. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission the Work including -as incorporated in Collective Works; + c. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works; -d. to distribute copies or phonorecords of, display publicly, perform publicly, -and perform publicly by means of a digital audio transmission Derivative Works. + d. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works. - e. For the avoidance of doubt, where the work is a musical composition: + e. For the avoidance of doubt, where the work is a musical composition: -i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive -right to collect, whether individually or via a performance rights society -(e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital -performance (e.g. webcast) of the Work. + i. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. -ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive -right to collect, whether individually or via a music rights society or designated -agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from -the Work ("cover version") and distribute, subject to the compulsory license -created by 17 USC Section 115 of the US Copyright Act (or the equivalent in -other jurisdictions). + ii. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). -f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, -where the Work is a sound recording, Licensor waives the exclusive right to -collect, whether individually or via a performance-rights society (e.g. SoundExchange), -royalties for the public digital performance (e.g. webcast) of the Work, subject -to the compulsory license created by 17 USC Section 114 of the US Copyright -Act (or the equivalent in other jurisdictions). + f. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -All rights not expressly granted by Licensor are hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may distribute, publicly display, publicly perform, or publicly digitally -perform the Work only under the terms of this License, and You must include -a copy of, or the Uniform Resource Identifier for, this License with every -copy or phonorecord of the Work You distribute, publicly display, publicly -perform, or publicly digitally perform. You may not offer or impose any terms -on the Work that alter or restrict the terms of this License or the recipients' -exercise of the rights granted hereunder. You may not sublicense the Work. -You must keep intact all notices that refer to this License and to the disclaimer -of warranties. You may not distribute, publicly display, publicly perform, -or publicly digitally perform the Work with any technological measures that -control access or use of the Work in a manner inconsistent with the terms -of this License Agreement. The above applies to the Work as incorporated in -a Collective Work, but this does not require the Collective Work apart from -the Work itself to be made subject to the terms of this License. If You create -a Collective Work, upon notice from any Licensor You must, to the extent practicable, -remove from the Collective Work any reference to such Licensor or the Original -Author, as requested. If You create a Derivative Work, upon notice from any -Licensor You must, to the extent practicable, remove from the Derivative Work -any reference to such Licensor or the Original Author, as requested. + a. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any reference to such Licensor or the Original Author, as requested. -b. You may distribute, publicly display, publicly perform, or publicly digitally -perform a Derivative Work only under the terms of this License, a later version -of this License with the same License Elements as this License, or a Creative -Commons iCommons license that contains the same License Elements as this License -(e.g. Attribution-ShareAlike 2.0 Japan). You must include a copy of, or the -Uniform Resource Identifier for, this License or other license specified in -the previous sentence with every copy or phonorecord of each Derivative Work -You distribute, publicly display, publicly perform, or publicly digitally -perform. You may not offer or impose any terms on the Derivative Works that -alter or restrict the terms of this License or the recipients' exercise of -the rights granted hereunder, and You must keep intact all notices that refer -to this License and to the disclaimer of warranties. You may not distribute, -publicly display, publicly perform, or publicly digitally perform the Derivative -Work with any technological measures that control access or use of the Work -in a manner inconsistent with the terms of this License Agreement. The above -applies to the Derivative Work as incorporated in a Collective Work, but this -does not require the Collective Work apart from the Derivative Work itself -to be made subject to the terms of this License. + b. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.0 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License. -c. If you distribute, publicly display, publicly perform, or publicly digitally -perform the Work or any Derivative Works or Collective Works, You must keep -intact all copyright notices for the Work and give the Original Author credit -reasonable to the medium or means You are utilizing by conveying the name -(or pseudonym if applicable) of the Original Author if supplied; the title -of the Work if supplied; to the extent reasonably practicable, the Uniform -Resource Identifier, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and in the case of a Derivative Work, a credit identifying -the use of the Work in the Derivative Work (e.g., "French translation of the -Work by Original Author," or "Screenplay based on original Work by Original -Author"). Such credit may be implemented in any reasonable manner; provided, -however, that in the case of a Derivative Work or Collective Work, at a minimum -such credit will appear where any other comparable authorship credit appears -and in a manner at least as prominent as such other comparable authorship -credit. + c. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE -WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT -LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR -PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, -OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS -DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT -APPLY TO YOU. +UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Derivative Works or Collective Works from You under this -License, however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You distribute or publicly digitally perform the Work or a Collective -Work, the Licensor offers to the recipient a license to the Work on the same -terms and conditions as the license granted to You under this License. + a. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You distribute or publicly digitally perform a Derivative Work, -Licensor offers to the recipient a license to the original Work on the same -terms and conditions as the license granted to You under this License. + b. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, neither party will use the trademark "Creative Commons" -or any related trademark or logo of Creative Commons without the prior written -consent of Creative Commons. Any permitted use will be in compliance with -Creative Commons' then-current trademark usage guidelines, as may be published -on its website or otherwise made available upon request from time to time. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-SA-2.0-UK b/options/license/CC-BY-SA-2.0-UK new file mode 100644 index 000000000..ea3df2195 --- /dev/null +++ b/options/license/CC-BY-SA-2.0-UK @@ -0,0 +1,147 @@ +Creative Commons Attribution - Share-Alike 2.0 England and Wales + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENCE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. + +Licence + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENCE ("CCPL" OR "LICENCE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENCE OR COPYRIGHT LAW IS PROHIBITED. BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENCE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +This Creative Commons England and Wales Public Licence enables You (all capitalised terms defined below) to view, edit, modify, translate and distribute Works worldwide, under the terms of this licence, provided that You credit the Original Author. + +'The Licensor' [one or more legally recognised persons or entities offering the Work under the terms and conditions of this Licence] + +and + +'You' + +agree as follows: + +1. Definitions + + a. "Attribution" means acknowledging all the parties who have contributed to and have rights in the Work or Collective Work under this Licence. + + b. "Collective Work" means the Work in its entirety in unmodified form along with a number of other separate and independent works, assembled into a collective whole. + + c. "Derivative Work" means any work created by the editing, modification, adaptation or translation of the Work in any media (however a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this Licence). For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this Licence. + + d. "Licence" means this Creative Commons England and Wales Public Licence agreement. + + e. "Licence Elements" means the following high-level licence attributes indicated in the title of this Licence: Attribution, Share-Alike. + + f. "Original Author" means the individual (or entity) who created the Work. + + g. "Work" means the work protected by copyright which is offered under the terms of this Licence. + + h. For the purpose of this Licence, when not inconsistent with the context, words in the singular number include the plural number. + +2. Licence Terms + +2.1 The Licensor hereby grants to You a worldwide, royalty-free, non-exclusive, Licence for use and for the duration of copyright in the Work. + +You may: + + * copy the Work; + + * create one or more derivative Works; + + * incorporate the Work into one or more Collective Works; + + * copy Derivative Works or the Work as incorporated in any Collective Work; and + + * publish, distribute, archive, perform or otherwise disseminate the Work or the Work as incorporated in any Collective Work, to the public in any material form in any media whether now known or hereafter created. + +HOWEVER, + +You must not: + + * impose any terms on the use to be made of the Work, the Derivative Work or the Work as incorporated in a Collective Work that alter or restrict the terms of this Licence or any rights granted under it or has the effect or intent of restricting the ability to exercise those rights; + + * impose any digital rights management technology on the Work or the Work as incorporated in a Collective Work that alters or restricts the terms of this Licence or any rights granted under it or has the effect or intent of restricting the ability to exercise those rights; + + * sublicense the Work; + + * subject the Work to any derogatory treatment as defined in the Copyright, Designs and Patents Act 1988. + +FINALLY, + +You must: + + * make reference to this Licence (by Uniform Resource Identifier (URI), spoken word or as appropriate to the media used) on all copies of the Work and Collective Works published, distributed, performed or otherwise disseminated or made available to the public by You; + + * recognise the Licensor's / Original Author's right of attribution in any Work and Collective Work that You publish, distribute, perform or otherwise disseminate to the public and ensure that You credit the Licensor / Original Author as appropriate to the media used; and + + * to the extent reasonably practicable, keep intact all notices that refer to this Licence, in particular the URI, if any, that the Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. + +Additional Provisions for third parties making use of the Work + +2.2. Further licence from the Licensor + +Each time You publish, distribute, perform or otherwise disseminate + + * the Work; or + + * any Derivative Work; or + + * the Work as incorporated in a Collective Work + +the Licensor agrees to offer to the relevant third party making use of the Work (in any of the alternatives set out above) a licence to use the Work on the same terms and conditions as granted to You hereunder. + +2.3. Further licence from You + +Each time You publish, distribute, perform or otherwise disseminate + + * a Derivative Work; or + + * a Derivative Work as incorporated in a Collective Work + +You agree to offer to the relevant third party making use of the Work (in either of the alternatives set out above) a licence to use the Derivative Work on any of the following premises: + + * a licence to the Derivative Work on the same terms and conditions as the licence granted to You hereunder; or + + * a later version of the licence granted to You hereunder; or + + * any other Creative Commons licence with the same Licence Elements. + +2.4. This Licence does not affect any rights that the User may have under any applicable law, including fair use, fair dealing or any other legally recognised limitation or exception to copyright infringement. + +2.5. All rights not expressly granted by the Licensor are hereby reserved, including but not limited to, the exclusive right to collect, whether individually or via a licensing body, such as a collecting society, royalties for any use of the Work which results in commercial advantage or private monetary compensation. + +3. Warranties and Disclaimer + +Except as required by law, the Work is licensed by the Licensor on an "as is" and "as available" basis and without any warranty of any kind, either express or implied. + +4. Limit of Liability + +Subject to any liability which may not be excluded or limited by law the Licensor shall not be liable and hereby expressly excludes all liability for loss or damage howsoever and whenever caused to You. + +5. Termination + +The rights granted to You under this Licence shall terminate automatically upon any breach by You of the terms of this Licence. Individuals or entities who have received Collective Works from You under this Licence, however, will not have their Licences terminated provided such individuals or entities remain in full compliance with those Licences. + +6. General + +6.1. The validity or enforceability of the remaining terms of this agreement is not affected by the holding of any provision of it to be invalid or unenforceable. + +6.2. This Licence constitutes the entire Licence Agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. The Licensor shall not be bound by any additional provisions that may appear in any communication in any form. + +6.3. A person who is not a party to this Licence shall have no rights under the Contracts (Rights of Third Parties) Act 1999 to enforce any of its terms. + +6.4. This Licence shall be governed by the law of England and Wales and the parties irrevocably submit to the exclusive jurisdiction of the Courts of England and Wales. + +7. On the role of Creative Commons + +7.1. Neither the Licensor nor the User may use the Creative Commons logo except to indicate that the Work is licensed under a Creative Commons Licence. Any permitted use has to be in compliance with the Creative Commons trade mark usage guidelines at the time of use of the Creative Commons trade mark. These guidelines may be found on the Creative Commons website or be otherwise available upon request from time to time. + +7.2. Creative Commons Corporation does not profit financially from its role in providing this Licence and will not investigate the claims of any Licensor or user of the Licence. + +7.3. One of the conditions that Creative Commons Corporation requires of the Licensor and You is an acknowledgement of its limited role and agreement by all who use the Licence that the Corporation is not responsible to anyone for the statements and actions of You or the Licensor or anyone else attempting to use or using this Licence. + +7.4. Creative Commons Corporation is not a party to this Licence, and makes no warranty whatsoever in connection to the Work or in connection to the Licence, and in all events is not liable for any loss or damage resulting from the Licensor's or Your reliance on this Licence or on its enforceability. + +7.5. USE OF THIS LICENCE MEANS THAT YOU AND THE LICENSOR EACH ACCEPTS THESE CONDITIONS IN SECTION 7.1, 7.2, 7.3, 7.4 AND EACH ACKNOWLEDGES CREATIVE COMMONS CORPORATION'S VERY LIMITED ROLE AS A FACILITATOR OF THE LICENCE FROM THE LICENSOR TO YOU. + +Creative Commons is not a party to this Licence, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this licence. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. + +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. + +Creative Commons may be contacted at https://creativecommons.org/. diff --git a/options/license/CC-BY-SA-2.1-JP b/options/license/CC-BY-SA-2.1-JP new file mode 100644 index 000000000..7971930e3 --- /dev/null +++ b/options/license/CC-BY-SA-2.1-JP @@ -0,0 +1,83 @@ +アトリビューション—シェアアライク 2.1 +(帰属—同一条件許諾) +クリエイティブ・コモンズ及びクリエイティブ・コモンズ・ジャパンは法律事務所ではありません。この利用許諾条項の頒布は法的アドバイスその他の法律業務を行うものではありません。クリエイティブ・コモンズ及びクリエイティブ・コモンズ・ジャパンは、この利用許諾の当事者ではなく、ここに提供する情報及び本作品に関しいかなる保証も行いません。クリエイティブ・コモンズ及びクリエイティブ・コモンズ・ジャパンは、いかなる法令に基づこうとも、あなた又はいかなる第三者の損害(この利用許諾に関連する通常損害、特別損害を含みますがこれらに限られません)について責任を負いません。 + +利用許諾 + +本作品(下記に定義する)は、このクリエイティブ・コモンズ・パブリック・ライセンス日本版(以下「この利用許諾」という)の条項の下で提供される。本作品は、著作権法及び/又は他の適用法によって保護される。本作品をこの利用許諾又は著作権法の下で授権された以外の方法で使用することを禁止する。 + +許諾者は、かかる条項をあなたが承諾することとひきかえに、ここに規定される権利をあなたに付与する。本作品に関し、この利用許諾の下で認められるいずれかの利用を行うことにより、あなたは、この利用許諾(条項)に拘束されることを承諾し同意したこととなる。 + +第1条 定義 + +この利用許諾中の用語を以下のように定義する。その他の用語は、著作権法その他の法令で定める意味を持つものとする。 + + a. 「二次的著作物」とは、著作物を翻訳し、編曲し、若しくは変形し、または脚色し、映画化し、その他翻案することにより創作した著作物をいう。ただし、編集著作物又はデータベースの著作物(以下、この二つを併せて「編集著作物等」という。)を構成する著作物は、二次的著作物とみなされない。また、原著作者及び実演家の名誉又は声望を害する方法で原著作物を改作、変形もしくは翻案して生じる著作物は、この利用許諾の目的においては、二次的著作物に含まれない。 + b. 「許諾者」とは、この利用許諾の条項の下で本作品を提供する個人又は団体をいう。 + c. 「あなた」とは、この利用許諾に基づく権利を行使する個人又は団体をいう。 + d. 「原著作者」とは、本作品に含まれる著作物を創作した個人又は団体をいう。 + e. 「本作品」とは、この利用許諾の条項に基づいて利用する権利が付与される対象たる無体物をいい、著作物、実演、レコード、放送にかかる音又は影像、もしくは有線放送にかかる音又は影像をすべて含むものとする。 + f. 「ライセンス要素」とは、許諾者が選択し、この利用許諾に表示されている、以下のライセンス属性をいう:帰属・同一条件許諾 + +第2条 著作権等に対する制限 + +この利用許諾に含まれるいかなる条項によっても、許諾者は、あなたが著作権の制限(著作権法第30条〜49条)、著作者人格権に対する制限(著作権法第18条2項〜4項、第19条2項〜4項、第20条2項)、著作隣接権に対する制限(著作権法第102条)その他、著作権法又はその他の適用法に基づいて認められることとなる本作品の利用を禁止しない。 + +第3条 ライセンスの付与 + +この利用許諾の条項に従い、許諾者はあなたに、本作品に関し、すべての国で、ロイヤリティ・フリー、非排他的で、(第7条bに定める期間)継続的な以下のライセンスを付与する。ただし、あなたが以前に本作品に関するこの利用許諾の条項に違反したことがないか、あるいは、以前にこの利用許諾の条項に違反したがこの利用許諾に基づく権利を行使するために許諾者から明示的な許可を得ている場合に限る。 + + a. 本作品に含まれる著作物(以下「本著作物」という。)を複製すること(編集著作物等に組み込み複製することを含む。以下、同じ。)、 + b. 本著作物を翻案して二次的著作物を創作し、複製すること、 + c. 本著作物又はその二次的著作物の複製物を頒布すること(譲渡または貸与により公衆に提供することを含む。以下同じ。)、上演すること、演奏すること、上映すること、公衆送信を行うこと(送信可能化を含む。以下、同じ。)、公に口述すること、公に展示すること、 + d. 本作品に含まれる実演を、録音・録画すること(録音・録画物を増製することを含む)、録音・録画物により頒布すること、公衆送信を行うこと、 + e. 本作品に含まれるレコードを、複製すること、頒布すること、公衆送信を行うこと、 + f. 本作品に含まれる、放送に係る音又は影像を、複製すること、その放送を受信して再放送すること又は有線放送すること、その放送又はこれを受信して行う有線放送を受信して送信可能化すること、そのテレビジョン放送又はこれを受信して行う有線放送を受信して、影像を拡大する特別の装置を用いて公に伝達すること、 + g. 本作品に含まれる、有線放送に係る音又は影像を、複製すること、その有線放送を受信して放送し、又は再有線放送すること、その有線放送を受信して送信可能化すること、その有線テレビジョン放送を受信して、影像を拡大する特別の装置を用いて公に伝達すること、 + +上記に定められた本作品又はその二次的著作物の利用は、現在及び将来のすべての媒体・形式で行うことができる。あなたは、他の媒体及び形式で本作品又はその二次的著作物を利用するのに技術的に必要な変更を行うことができる。許諾者は本作品又はその二次的著作物に関して、この利用許諾に従った利用については自己が有する著作者人格権及び実演家人格権を行使しない。許諾者によって明示的に付与されない全ての権利は、留保される。 + +第4条 受領者へのライセンス提供 + +あなたが本作品をこの利用許諾に基づいて利用する度毎に、許諾者は本作品又は本作品の二次的著作物の受領者に対して、直接、この利用許諾の下であなたに許可された利用許諾と同じ条件の本作品のライセンスを提供する。 + +第5条 制限 + +上記第3条及び第4条により付与されたライセンスは、以下の制限に明示的に従い、制約される。 + + a. あなたは、この利用許諾の条項に基づいてのみ、本作品を利用することができる。 + b. あなたは、この利用許諾又はこの利用許諾と同一のライセンス要素を含むほかのクリエイティブ・コモンズ・ライセンス(例えば、この利用許諾の新しいバージョン、又はこの利用許諾と同一のライセンス要素の他国籍ライセンスなど)に基づいてのみ、本作品の二次的著作物を利用することができる。 + c. あなたは、本作品を利用するときは、この利用許諾の写し又はURI(Uniform Resource Identifier)を本作品の複製物に添付又は表示しなければならない。 + d. あなたは、本作品の二次的著作物を利用するときは、この利用許諾又はこの利用許諾と同一のライセンス要素を含むほかのクリエイティブ・コモンズ・ライセンスの写し又はURIを本作品の二次的著作物の複製物に添付または表示しなければならない。 + e. あなたは、この利用許諾条項及びこの利用許諾によって付与される利用許諾受領者の権利の行使を変更又は制限するような、本作品又はその二次的著作物に係る条件を提案したり課したりしてはならない。 + f. あなたは、本作品を再利用許諾することができない。 + g. あなたは、本作品又はその二次的著作物の利用にあたって、この利用許諾及びその免責条項に関する注意書きの内容を変更せず、見やすい態様でそのまま掲載しなければならない。 + h. あなたは、この利用許諾条項と矛盾する方法で本著作物へのアクセス又は使用をコントロールするような技術的保護手段を用いて、本作品又はその二次的著作物を利用してはならない。 + i. 本条の制限は、本作品又はその二次的著作物が編集著作物等に組み込まれた場合にも、その組み込まれた作品に関しては適用される。しかし、本作品又はその二次的著作物が組み込まれた編集著作物等そのものは、この利用許諾の条項に従う必要はない。 + j. あなたは、本作品、その二次的著作物又は本作品を組み込んだ編集著作物等を利用する場合には、(1)本作品に係るすべての著作権表示をそのままにしておかなければならず、(2)原著作者及び実演家のクレジットを、合理的な方式で、(もし示されていれば原著作者及び実演家の名前又は変名を伝えることにより、)表示しなければならず、(3)本作品のタイトルが示されている場合には、そのタイトルを表示しなければならず、(4)許諾者が本作品に添付するよう指定したURIがあれば、合理的に実行可能な範囲で、そのURIを表示しなければならず(ただし、そのURIが本作品の著作権表示またはライセンス情報を参照するものでないときはこの限りでない。)(5)二次的著作物の場合には、当該二次的著作物中の原著作物の利用を示すクレジットを表示しなければならない。これらのクレジットは、合理的であればどんな方法でも行うことができる。しかしながら、二次的著作物又は編集著作物等の場合には、少なくとも他の同様の著作者のクレジットが表示される箇所で当該クレジットを表示し、少なくとも他の同様の著作者のクレジットと同程度に目立つ方法であることを要する。 + k. もし、あなたが、本作品の二次的著作物、又は本作品もしくはその二次的著作物を組み込んだ編集著作物等を創作した場合、あなたは、許諾者からの通知があれば、実行可能な範囲で、要求に応じて、二次的著作物又は編集著作物等から、許諾者又は原著作者への言及をすべて除去しなければならない。 + +第6条 責任制限 + +この利用許諾の両当事者が書面にて別途合意しない限り、許諾者は本作品を現状のまま提供するものとし、明示・黙示を問わず、本作品に関していかなる保証(特定の利用目的への適合性、第三者の権利の非侵害、欠陥の不存在を含むが、これに限られない。)もしない。 + +この利用許諾又はこの利用許諾に基づく本作品の利用から発生する、いかなる損害(許諾者が、本作品にかかる著作権、著作隣接権、著作者人格権、実演家人格権、商標権、パブリシティ権、不正競争防止法その他関連法規上保護される利益を有する者からの許諾を得ることなく本作品の利用許諾を行ったことにより発生する損害、プライバシー侵害又は名誉毀損から発生する損害等の通常損害、及び特別損害を含むが、これに限らない。)についても、許諾者に故意又は重大な過失がある場合を除き、許諾者がそのような損害発生の可能性を知らされたか否かを問わず、許諾者は、あなたに対し、これを賠償する責任を負わない。 + +第7条 終了 + + a. この利用許諾は、あなたがこの利用許諾の条項に違反すると自動的に終了する。しかし、本作品、その二次的著作物又は編集著作物等をあなたからこの利用許諾に基づき受領した第三者に対しては、その受領者がこの利用許諾を遵守している限り、この利用許諾は終了しない。第1条、第2条、第4条から第9条は、この利用許諾が終了してもなお有効に存続する。 + b. 上記aに定める場合を除き、この利用許諾に基づくライセンスは、本作品に含まれる著作権法上の権利が存続するかぎり継続する。 + c. 許諾者は、上記aおよびbに関わらず、いつでも、本作品をこの利用許諾に基づいて頒布することを将来に向かって中止することができる。ただし、許諾者がこの利用許諾に基づく頒布を将来に向かって中止した場合でも、この利用許諾に基づいてすでに本作品を受領した利用者に対しては、この利用許諾に基づいて過去及び将来に与えられるいかなるライセンスも終了することはない。また、上記によって終了しない限り、この利用許諾は、全面的に有効なものとして継続する。 + +第8条 その他 + + a. この利用許諾のいずれかの規定が、適用法の下で無効及び/又は執行不能の場合であっても、この利用許諾の他の条項の有効性及び執行可能性には影響しない。 + b. この利用許諾の条項の全部又は一部の放棄又はその違反に関する承諾は、これが書面にされ、当該放棄又は承諾に責任を負う当事者による署名又は記名押印がなされない限り、行うことができない。 + c. この利用許諾は、当事者が本作品に関して行った最終かつ唯一の合意の内容である。この利用許諾は、許諾者とあなたとの相互の書面による合意なく修正されない。 + d. この利用許諾は日本語により提供される。この利用許諾の英語その他の言語への翻訳は参照のためのものに過ぎず、この利用許諾の日本語版と翻訳との間に何らかの齟齬がある場合には日本語版が優先する。 + +第9条 準拠法 + +この利用許諾は、日本法に基づき解釈される。 + +本作品がクリエイティブ・コモンズ・ライセンスに基づき利用許諾されたことを公衆に示すという限定された目的の場合を除き、許諾者も被許諾者もクリエイティブ・コモンズの事前の書面による同意なしに「クリエイティブ・コモンズ」の商標若しくは関連商標又はクリエイティブ・コモンズのロゴを使用しないものとします。使用が許可された場合はクリエイティブ・コモンズおよびクリエイティブ・コモンズ・ジャパンのウェブサイト上に公表される、又はその他随時要求に従い利用可能となる、クリエイティブ・コモンズの当該時点における商標使用指針を遵守するものとします。クリエイティブ・コモンズは https://creativecommons.org/から、クリエイティブ・コモンズ・ジャパンはhttp://www.creativecommons.jp/から連絡することができます。 diff --git a/options/license/CC-BY-SA-3.0 b/options/license/CC-BY-SA-3.0 index f7061c7ae..39a8591c4 100644 --- a/options/license/CC-BY-SA-3.0 +++ b/options/license/CC-BY-SA-3.0 @@ -1,343 +1,99 @@ -Creative Commons Attribution-ShareAlike 3.0 Unported CREATIVE COMMONS CORPORATION -IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS -LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS -PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES -REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING -FROM ITS USE. +Creative Commons Attribution-ShareAlike 3.0 Unported + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS -PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR -OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS -LICENSE OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO -BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED -TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION -OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. - 1. Definitions +1. Definitions -a. "Adaptation" means a work based upon the Work, or upon the Work and other -pre-existing works, such as a translation, adaptation, derivative work, arrangement -of music or other alterations of a literary or artistic work, or phonogram -or performance and includes cinematographic adaptations or any other form -in which the Work may be recast, transformed, or adapted including in any -form recognizably derived from the original, except that a work that constitutes -a Collection will not be considered an Adaptation for the purpose of this -License. For the avoidance of doubt, where the Work is a musical work, performance -or phonogram, the synchronization of the Work in timed-relation with a moving -image ("synching") will be considered an Adaptation for the purpose of this -License. + a. "Adaptation" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitutes a Collection will not be considered an Adaptation for the purpose of this License. For the avoidance of doubt, where the Work is a musical work, performance or phonogram, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered an Adaptation for the purpose of this License. -b. "Collection" means a collection of literary or artistic works, such as -encyclopedias and anthologies, or performances, phonograms or broadcasts, -or other works or subject matter other than works listed in Section 1(f) below, -which, by reason of the selection and arrangement of their contents, constitute -intellectual creations, in which the Work is included in its entirety in unmodified -form along with one or more other contributions, each constituting separate -and independent works in themselves, which together are assembled into a collective -whole. A work that constitutes a Collection will not be considered an Adaptation -(as defined below) for the purposes of this License. + b. "Collection" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting separate and independent works in themselves, which together are assembled into a collective whole. A work that constitutes a Collection will not be considered an Adaptation (as defined below) for the purposes of this License. -c. "Creative Commons Compatible License" means a license that is listed at -http://creativecommons.org/compatiblelicenses that has been approved by Creative -Commons as being essentially equivalent to this License, including, at a minimum, -because that license: (i) contains terms that have the same purpose, meaning -and effect as the License Elements of this License; and, (ii) explicitly permits -the relicensing of adaptations of works made available under that license -under this License or a Creative Commons jurisdiction license with the same -License Elements as this License. + c. "Creative Commons Compatible License" means a license that is listed at http://creativecommons.org/compatiblelicenses that has been approved by Creative Commons as being essentially equivalent to this License, including, at a minimum, because that license: (i) contains terms that have the same purpose, meaning and effect as the License Elements of this License; and, (ii) explicitly permits the relicensing of adaptations of works made available under that license under this License or a Creative Commons jurisdiction license with the same License Elements as this License. -d. "Distribute" means to make available to the public the original and copies -of the Work or Adaptation, as appropriate, through sale or other transfer -of ownership. + d. "Distribute" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership. -e. "License Elements" means the following high-level license attributes as -selected by Licensor and indicated in the title of this License: Attribution, -ShareAlike. + e. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike. -f. "Licensor" means the individual, individuals, entity or entities that offer(s) -the Work under the terms of this License. + f. "Licensor" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License. -g. "Original Author" means, in the case of a literary or artistic work, the -individual, individuals, entity or entities who created the Work or if no -individual or entity can be identified, the publisher; and in addition (i) -in the case of a performance the actors, singers, musicians, dancers, and -other persons who act, sing, deliver, declaim, play in, interpret or otherwise -perform literary or artistic works or expressions of folklore; (ii) in the -case of a phonogram the producer being the person or legal entity who first -fixes the sounds of a performance or other sounds; and, (iii) in the case -of broadcasts, the organization that transmits the broadcast. + g. "Original Author" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of a phonogram the producer being the person or legal entity who first fixes the sounds of a performance or other sounds; and, (iii) in the case of broadcasts, the organization that transmits the broadcast. -h. "Work" means the literary and/or artistic work offered under the terms -of this License including without limitation any production in the literary, -scientific and artistic domain, whatever may be the mode or form of its expression -including digital form, such as a book, pamphlet and other writing; a lecture, -address, sermon or other work of the same nature; a dramatic or dramatico-musical -work; a choreographic work or entertainment in dumb show; a musical composition -with or without words; a cinematographic work to which are assimilated works -expressed by a process analogous to cinematography; a work of drawing, painting, -architecture, sculpture, engraving or lithography; a photographic work to -which are assimilated works expressed by a process analogous to photography; -a work of applied art; an illustration, map, plan, sketch or three-dimensional -work relative to geography, topography, architecture or science; a performance; -a broadcast; a phonogram; a compilation of data to the extent it is protected -as a copyrightable work; or a work performed by a variety or circus performer -to the extent it is not otherwise considered a literary or artistic work. + h. "Work" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musical composition with or without words; a cinematographic work to which are assimilated works expressed by a process analogous to cinematography; a work of drawing, painting, architecture, sculpture, engraving or lithography; a photographic work to which are assimilated works expressed by a process analogous to photography; a work of applied art; an illustration, map, plan, sketch or three-dimensional work relative to geography, topography, architecture or science; a performance; a broadcast; a phonogram; a compilation of data to the extent it is protected as a copyrightable work; or a work performed by a variety or circus performer to the extent it is not otherwise considered a literary or artistic work. -i. "You" means an individual or entity exercising rights under this License -who has not previously violated the terms of this License with respect to -the Work, or who has received express permission from the Licensor to exercise -rights under this License despite a previous violation. + i. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. -j. "Publicly Perform" means to perform public recitations of the Work and -to communicate to the public those public recitations, by any means or process, -including by wire or wireless means or public digital performances; to make -available to the public Works in such a way that members of the public may -access these Works from a place and at a place individually chosen by them; -to perform the Work to the public by any means or process and the communication -to the public of the performances of the Work, including by public digital -performance; to broadcast and rebroadcast the Work by any means including -signs, sounds or images. + j. "Publicly Perform" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication to the public of the performances of the Work, including by public digital performance; to broadcast and rebroadcast the Work by any means including signs, sounds or images. -k. "Reproduce" means to make copies of the Work by any means including without -limitation by sound or visual recordings and the right of fixation and reproducing -fixations of the Work, including storage of a protected performance or phonogram -in digital form or other electronic medium. + k. "Reproduce" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium. -2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, -or restrict any uses free from copyright or rights arising from limitations -or exceptions that are provided for in connection with the copyright protection -under copyright law or other applicable laws. +2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, Licensor -hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for -the duration of the applicable copyright) license to exercise the rights in -the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. to Reproduce the Work, to incorporate the Work into one or more Collections, -and to Reproduce the Work as incorporated in the Collections; + a. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections; -b. to create and Reproduce Adaptations provided that any such Adaptation, -including any translation in any medium, takes reasonable steps to clearly -label, demarcate or otherwise identify that changes were made to the original -Work. For example, a translation could be marked "The original work was translated -from English to Spanish," or a modification could indicate "The original work -has been modified."; + b. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified."; -c. to Distribute and Publicly Perform the Work including as incorporated in -Collections; and, + c. to Distribute and Publicly Perform the Work including as incorporated in Collections; and, - d. to Distribute and Publicly Perform Adaptations. + d. to Distribute and Publicly Perform Adaptations. - e. For the avoidance of doubt: + e. For the avoidance of doubt: -i. Non-waivable Compulsory License Schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; + i. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -ii. Waivable Compulsory License Schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor waives the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License; and, + ii. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, -iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, -whether individually or, in the event that the Licensor is a member of a collecting -society that administers voluntary licensing schemes, via that society, from -any exercise by You of the rights granted under this License. + iii. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. -The above rights may be exercised in all media and formats whether now known -or hereafter devised. The above rights include the right to make such modifications -as are technically necessary to exercise the rights in other media and formats. -Subject to Section 8(f), all rights not expressly granted by Licensor are -hereby reserved. +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved. -4. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You may Distribute or Publicly Perform the Work only under the terms of -this License. You must include a copy of, or the Uniform Resource Identifier -(URI) for, this License with every copy of the Work You Distribute or Publicly -Perform. You may not offer or impose any terms on the Work that restrict the -terms of this License or the ability of the recipient of the Work to exercise -the rights granted to that recipient under the terms of the License. You may -not sublicense the Work. You must keep intact all notices that refer to this -License and to the disclaimer of warranties with every copy of the Work You -Distribute or Publicly Perform. When You Distribute or Publicly Perform the -Work, You may not impose any effective technological measures on the Work -that restrict the ability of a recipient of the Work from You to exercise -the rights granted to that recipient under the terms of the License. This -Section 4(a) applies to the Work as incorporated in a Collection, but this -does not require the Collection apart from the Work itself to be made subject -to the terms of this License. If You create a Collection, upon notice from -any Licensor You must, to the extent practicable, remove from the Collection -any credit as required by Section 4(c), as requested. If You create an Adaptation, -upon notice from any Licensor You must, to the extent practicable, remove -from the Adaptation any credit as required by Section 4(c), as requested. + a. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties with every copy of the Work You Distribute or Publicly Perform. When You Distribute or Publicly Perform the Work, You may not impose any effective technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collection, but this does not require the Collection apart from the Work itself to be made subject to the terms of this License. If You create a Collection, upon notice from any Licensor You must, to the extent practicable, remove from the Collection any credit as required by Section 4(c), as requested. If You create an Adaptation, upon notice from any Licensor You must, to the extent practicable, remove from the Adaptation any credit as required by Section 4(c), as requested. -b. You may Distribute or Publicly Perform an Adaptation only under the terms -of: (i) this License; (ii) a later version of this License with the same License -Elements as this License; (iii) a Creative Commons jurisdiction license (either -this or a later license version) that contains the same License Elements as -this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons -Compatible License. If you license the Adaptation under one of the licenses -mentioned in (iv), you must comply with the terms of that license. If you -license the Adaptation under the terms of any of the licenses mentioned in -(i), (ii) or (iii) (the "Applicable License"), you must comply with the terms -of the Applicable License generally and the following provisions: (I) You -must include a copy of, or the URI for, the Applicable License with every -copy of each Adaptation You Distribute or Publicly Perform; (II) You may not -offer or impose any terms on the Adaptation that restrict the terms of the -Applicable License or the ability of the recipient of the Adaptation to exercise -the rights granted to that recipient under the terms of the Applicable License; -(III) You must keep intact all notices that refer to the Applicable License -and to the disclaimer of warranties with every copy of the Work as included -in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute -or Publicly Perform the Adaptation, You may not impose any effective technological -measures on the Adaptation that restrict the ability of a recipient of the -Adaptation from You to exercise the rights granted to that recipient under -the terms of the Applicable License. This Section 4(b) applies to the Adaptation -as incorporated in a Collection, but this does not require the Collection -apart from the Adaptation itself to be made subject to the terms of the Applicable -License. + b. You may Distribute or Publicly Perform an Adaptation only under the terms of: (i) this License; (ii) a later version of this License with the same License Elements as this License; (iii) a Creative Commons jurisdiction license (either this or a later license version) that contains the same License Elements as this License (e.g., Attribution-ShareAlike 3.0 US)); (iv) a Creative Commons Compatible License. If you license the Adaptation under one of the licenses mentioned in (iv), you must comply with the terms of that license. If you license the Adaptation under the terms of any of the licenses mentioned in (i), (ii) or (iii) (the "Applicable License"), you must comply with the terms of the Applicable License generally and the following provisions: (I) You must include a copy of, or the URI for, the Applicable License with every copy of each Adaptation You Distribute or Publicly Perform; (II) You may not offer or impose any terms on the Adaptation that restrict the terms of the Applicable License or the ability of the recipient of the Adaptation to exercise the rights granted to that recipient under the terms of the Applicable License; (III) You must keep intact all notices that refer to the Applicable License and to the disclaimer of warranties with every copy of the Work as included in the Adaptation You Distribute or Publicly Perform; (IV) when You Distribute or Publicly Perform the Adaptation, You may not impose any effective technological measures on the Adaptation that restrict the ability of a recipient of the Adaptation from You to exercise the rights granted to that recipient under the terms of the Applicable License. This Section 4(b) applies to the Adaptation as incorporated in a Collection, but this does not require the Collection apart from the Adaptation itself to be made subject to the terms of the Applicable License. -c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, -You must, unless a request has been made pursuant to Section 4(a), keep intact -all copyright notices for the Work and provide, reasonable to the medium or -means You are utilizing: (i) the name of the Original Author (or pseudonym, -if applicable) if supplied, and/or if the Original Author and/or Licensor -designate another party or parties (e.g., a sponsor institute, publishing -entity, journal) for attribution ("Attribution Parties") in Licensor's copyright -notice, terms of service or by other reasonable means, the name of such party -or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably -practicable, the URI, if any, that Licensor specifies to be associated with -the Work, unless such URI does not refer to the copyright notice or licensing -information for the Work; and (iv), consistent with Section 3(b), in the case -of an Adaptation, a credit identifying the use of the Work in the Adaptation -(e.g., "French translation of the Work by Original Author," or "Screenplay -based on original Work by Original Author"). The credit required by this Section -4(c) may be implemented in any reasonable manner; provided, however, that -in the case of a Adaptation or Collection, at a minimum such credit will appear, -if a credit for all contributing authors of the Adaptation or Collection appears, -then as part of these credits and in a manner at least as prominent as the -credits for the other contributing authors. For the avoidance of doubt, You -may only use the credit required by this Section for the purpose of attribution -in the manner set out above and, by exercising Your rights under this License, -You may not implicitly or explicitly assert or imply any connection with, -sponsorship or endorsement by the Original Author, Licensor and/or Attribution -Parties, as appropriate, of You or Your use of the Work, without the separate, -express prior written permission of the Original Author, Licensor and/or Attribution -Parties. + c. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; (ii) the title of the Work if supplied; (iii) to the extent reasonably practicable, the URI, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and (iv) , consistent with Ssection 3(b), in the case of an Adaptation, a credit identifying the use of the Work in the Adaptation (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(c) may be implemented in any reasonable manner; provided, however, that in the case of a Adaptation or Collection, at a minimum such credit will appear, if a credit for all contributing authors of the Adaptation or Collection appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties. -d. Except as otherwise agreed in writing by the Licensor or as may be otherwise -permitted by applicable law, if You Reproduce, Distribute or Publicly Perform -the Work either by itself or as part of any Adaptations or Collections, You -must not distort, mutilate, modify or take other derogatory action in relation -to the Work which would be prejudicial to the Original Author's honor or reputation. -Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise -of the right granted in Section 3(b) of this License (the right to make Adaptations) -would be deemed to be a distortion, mutilation, modification or other derogatory -action prejudicial to the Original Author's honor and reputation, the Licensor -will waive or not assert, as appropriate, this Section, to the fullest extent -permitted by the applicable national law, to enable You to reasonably exercise -Your right under Section 3(b) of this License (right to make Adaptations) -but not otherwise. + d. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in which any exercise of the right granted in Section 3(b) of this License (the right to make Adaptations) would be deemed to be a distortion, mutilation, modification or other derogatory action prejudicial to the Original Author's honor and reputation, the Licensor will waive or not assert, as appropriate, this Section, to the fullest extent permitted by the applicable national law, to enable You to reasonably exercise Your right under Section 3(b) of this License (right to make Adaptations) but not otherwise. - 5. Representations, Warranties and Disclaimer +5. Representations, Warranties and Disclaimer -UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS -THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING -THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, -WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, -OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE -OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE -EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. -6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, -INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS -LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. Termination +7. Termination -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of the terms of this License. Individuals or entities -who have received Adaptations or Collections from You under this License, -however, will not have their licenses terminated provided such individuals -or entities remain in full compliance with those licenses. Sections 1, 2, -5, 6, 7, and 8 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. -b. Subject to the above terms and conditions, the license granted here is -perpetual (for the duration of the applicable copyright in the Work). Notwithstanding -the above, Licensor reserves the right to release the Work under different -license terms or to stop distributing the Work at any time; provided, however -that any such election will not serve to withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. + b. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. - 8. Miscellaneous +8. Miscellaneous -a. Each time You Distribute or Publicly Perform the Work or a Collection, -the Licensor offers to the recipient a license to the Work on the same terms -and conditions as the license granted to You under this License. + a. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. -b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers -to the recipient a license to the original Work on the same terms and conditions -as the license granted to You under this License. + b. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License. -c. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -agreement, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + c. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -d. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + d. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -e. This License constitutes the entire agreement between the parties with -respect to the Work licensed here. There are no understandings, agreements -or representations with respect to the Work not specified here. Licensor shall -not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Licensor and You. + e. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. -f. The rights granted under, and the subject matter referenced, in this License -were drafted utilizing the terminology of the Berne Convention for the Protection -of Literary and Artistic Works (as amended on September 28, 1979), the Rome -Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances -and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised -on July 24, 1971). These rights and subject matter take effect in the relevant -jurisdiction in which the License terms are sought to be enforced according -to the corresponding provisions of the implementation of those treaty provisions -in the applicable national law. If the standard suite of rights granted under -applicable copyright law includes additional rights not granted under this -License, such additional rights are deemed to be included in the License; -this License is not intended to restrict the license of any rights under applicable -law. + f. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in the relevant jurisdiction in which the License terms are sought to be enforced according to the corresponding provisions of the implementation of those treaty provisions in the applicable national law. If the standard suite of rights granted under applicable copyright law includes additional rights not granted under this License, such additional rights are deemed to be included in the License; this License is not intended to restrict the license of any rights under applicable law. Creative Commons Notice -Creative Commons is not a party to this License, and makes no warranty whatsoever -in connection with the Work. Creative Commons will not be liable to You or -any party on any legal theory for any damages whatsoever, including without -limitation any general, special, incidental or consequential damages arising -in connection to this license. Notwithstanding the foregoing two (2) sentences, -if Creative Commons has expressly identified itself as the Licensor hereunder, -it shall have all rights and obligations of Licensor. +Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor. -Except for the limited purpose of indicating to the public that the Work is -licensed under the CCPL, Creative Commons does not authorize the use by either -party of the trademark "Creative Commons" or any related trademark or logo -of Creative Commons without the prior written consent of Creative Commons. -Any permitted use will be in compliance with Creative Commons' then-current -trademark usage guidelines, as may be published on its website or otherwise -made available upon request from time to time. For the avoidance of doubt, -this trademark restriction does not form part of the License. +Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License. Creative Commons may be contacted at http://creativecommons.org/. diff --git a/options/license/CC-BY-SA-3.0-AT b/options/license/CC-BY-SA-3.0-AT index fb39b2e58..365b5f705 100644 --- a/options/license/CC-BY-SA-3.0-AT +++ b/options/license/CC-BY-SA-3.0-AT @@ -1,377 +1,139 @@ -CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. -DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE -COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS -ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT -DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. Lizenz +CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. -DER GEGENSTAND DIESER LIZENZ (WIE UNTER „SCHUTZGEGENSTAND" DEFINIERT) WIRD -UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", „LIZENZ" -ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH -DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG -DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE -GESTATTET IST, IST UNZULÄSSIG. +Lizenz -DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND -ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. -SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER -DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS -SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. +DER GEGENSTAND DIESER LIZENZ (WIE UNTER „SCHUTZGEGENSTAND“ DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", „LIZENZ“ ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. - 1. Definitionen +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. -a. Der Begriff "Bearbeitung" im Sinne dieser Lizenz bezeichnet das Ergebnis -jeglicher Art von Veränderung des Schutzgegenstandes, solange dieses erkennbar -vom Schutzgegenstand abgeleitet wurde. Dies kann insbesondere auch eine Umgestaltung, -Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes -zur Vertonung von Laufbildern sein. Nicht als Bearbeitung des Schutzgegenstandes -gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Nutzung -des Schutzgegenstandes. +1. Definitionen -b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung -von literarischen, künstlerischen oder wissenschaftlichen Inhalten zu einem -einheitlichen Ganzen, sofern diese Zusammenstellung aufgrund von Auswahl und -Anordnung der darin enthaltenen selbständigen Elemente eine eigentümliche -geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch -oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + a. Der Begriff "Bearbeitung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange dieses erkennbar vom Schutzgegenstand abgeleitet wurde. Dies kann insbesondere auch eine Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Bearbeitung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Nutzung des Schutzgegenstandes. -c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder -Bearbeitungen im Original oder in Form von Vervielfältigungsstücken, mithin -in körperlich fixierter Form der Öffentlichkeit zugänglich zu machen oder -in Verkehr zu bringen. + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten zu einem einheitlichen Ganzen, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine eigentümliche geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. -d. Unter "Lizenzelementen" werden im Sinne dieser Lizenz die folgenden übergeordneten -Lizenzcharakteristika verstanden, die vom Lizenzgeber ausgewählt wurden und -in der Bezeichnung der Lizenz zum Ausdruck kommen: "Namensnennung", "Weitergabe -unter gleichen Bedingungen". + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder Bearbeitungen im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit zugänglich zu machen oder in Verkehr zu bringen. -e. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder -juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen -dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + d. Unter "Lizenzelementen" werden im Sinne dieser Lizenz die folgenden übergeordneten Lizenzcharakteristika verstanden, die vom Lizenzgeber ausgewählt wurden und in der Bezeichnung der Lizenz zum Ausdruck kommen: "Namensnennung", "Weitergabe unter gleichen Bedingungen". -f. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes -oder jede andere natürliche oder juristische Person, die am Schutzgegenstand -ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten -Handlungen erfasst und eine Erteilung, Übertragung oder Einräumung von Nutzungsbewilligungen -bzw Nutzungsrechten an Dritte erlaubt. + e. Der "Lizenzgeber" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. -g. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, -künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser -Lizenz angeboten wird. Das kann insbesondere eine eigentümliche geistige Schöpfung -jeglicher Art oder ein Werk der kleinen Münze, ein nachgelassenes Werk oder -auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, -unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise -jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler -Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen -Schutz eigener Art genießen, unterfallen auch sie dem Begriff „Schutzgegenstand" -im Sinne dieser Lizenz. + f. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und eine Erteilung, Übertragung oder Einräumung von Nutzungsbewilligungen bzw Nutzungsrechten an Dritte erlaubt. -h. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, -die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes -vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen -dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers -erhalten hat, die durch diese Lizenz gewährte Nutzungsbewilligung trotz eines -vorherigen Verstoßes auszuüben. + g. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine eigentümliche geistige Schöpfung jeglicher Art oder ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff „Schutzgegenstand“ im Sinne dieser Lizenz. -i. Unter "Öffentlich Wiedergeben" im Sinne dieser Lizenz sind Wahrnehmbarmachungen -des Schutzgegenstandes in unkörperlicher Form zu verstehen, die für eine Mehrzahl -von Mitgliedern der Öffentlichkeit bestimmt sind und mittels öffentlicher -Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, -Weitersendung oder zeit- und ortsunabhängiger Zurverfügungstellung erfolgen, -unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich -drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + h. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährte Nutzungsbewilligung trotz eines vorherigen Verstoßes auszuüben. -j. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, gleichviel in welchem -Verfahren, auf welchem Träger, in welcher Menge und ob vorübergehend oder -dauerhaft, Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere -durch Ton- oder Bildaufzeichnungen, und umfasst auch das erstmalige Festhalten -des Schutzgegenstandes oder dessen Wahrnehmbarmachung auf Mitteln der wiederholbaren -Wiedergabe sowie das Herstellen von Vervielfältigungsstücken dieser Festhaltung, -sowie die Speicherung einer geschützten Darbietung oder eines Bild- und/oder -Schallträgers in digitaler Form oder auf einem anderen elektronischen Medium. + i. Unter "Öffentlich Wiedergeben" im Sinne dieser Lizenz sind Wahrnehmbarmachungen des Schutzgegenstandes in unkörperlicher Form zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung oder zeit- und ortsunabhängiger Zurverfügungstellung erfolgen, unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. -k. "Mit Creative Commons kompatible Lizenz" bezeichnet eine Lizenz, die unter -https://creativecommons.org/compatiblelicenses aufgelistet ist und die durch -Creative Commons als grundsätzlich zur vorliegenden Lizenz äquivalent akzeptiert -wurde, da zumindest folgende Voraussetzungen erfüllt sind: + j. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, gleichviel in welchem Verfahren, auf welchem Träger, in welcher Menge und ob vorübergehend oder dauerhaft, Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch das erstmalige Festhalten des Schutzgegenstandes oder dessen Wahrnehmbarmachung auf Mitteln der wiederholbaren Wiedergabe sowie das Herstellen von Vervielfältigungsstücken dieser Festhaltung, sowie die Speicherung einer geschützten Darbietung oder eines Bild- und/oder Schallträgers in digitaler Form oder auf einem anderen elektronischen Medium. - Diese mit Creative Commons kompatible Lizenz + k. "Mit Creative Commons kompatible Lizenz" bezeichnet eine Lizenz, die unter https://creativecommons.org/compatiblelicenses aufgelistet ist und die durch Creative Commons als grundsätzlich zur vorliegenden Lizenz äquivalent akzeptiert wurde, da zumindest folgende Voraussetzungen erfüllt sind: -i. enthält Bestimmungen, welche die gleichen Ziele verfolgen, die gleiche -Bedeutung haben und die gleichen Wirkungen erzeugen wie die Lizenzelemente -der vorliegenden Lizenz; und + Diese mit Creative Commons kompatible Lizenz -ii. erlaubt ausdrücklich das Lizenzieren von ihr unterstellten Abwandlungen -unter vorliegender Lizenz, unter einer anderen rechtsordnungsspezifisch angepassten -Creative-Commons-Lizenz mit denselben Lizenzelementen wie vorliegende Lizenz -aufweist oder unter der entsprechenden Creative-Commons-Unported-Lizenz. + i. enthält Bestimmungen, welche die gleichen Ziele verfolgen, die gleiche Bedeutung haben und die gleichen Wirkungen erzeugen wie die Lizenzelemente der vorliegenden Lizenz; und - 2. Beschränkungen der Verwertungsrechte + ii. erlaubt ausdrücklich das Lizenzieren von ihr unterstellten Abwandlungen unter vorliegender Lizenz, unter einer anderen rechtsordnungsspezifisch angepassten Creative-Commons-Lizenz mit denselben Lizenzelementen wie vorliegende Lizenz aufweist oder unter der entsprechenden Creative-Commons-Unported-Lizenz. -Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung -des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die -sich aus den Beschränkungen der Verwertungsrechte, anderen Beschränkungen -der Ausschließlichkeitsrechte des Rechtsinhabers oder anderen entsprechenden -Rechtsnormen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes -ergeben. +2. Beschränkungen der Verwertungsrechte - 3. Lizenzierung +Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die sich aus den Beschränkungen der Verwertungsrechte, anderen Beschränkungen der Ausschließlichkeitsrechte des Rechtsinhabers oder anderen entsprechenden Rechtsnormen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. -Unter den Bedingungen dieser Lizenz erteilt Ihnen der Lizenzgeber - unbeschadet -unverzichtbarer Rechte und vorbehaltlich des Abschnitts 3.e) - die vergütungsfreie, -räumlich und zeitlich (für die Dauer des Urheberrechts oder verwandten Schutzrechts -am Schutzgegenstand) unbeschränkte Nutzungsbewilligung, den Schutzgegenstand -in der folgenden Art und Weise zu nutzen: +3. Lizenzierung -a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn -in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; +Unter den Bedingungen dieser Lizenz erteilt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 3.e) - die vergütungsfreie, räumlich und zeitlich (für die Dauer des Urheberrechts oder verwandten Schutzrechts am Schutzgegenstand) unbeschränkte Nutzungsbewilligung, den Schutzgegenstand in der folgenden Art und Weise zu nutzen: -b. Den Schutzgegenstand zu bearbeiten, einschließlich Übersetzungen unter -Nutzung jedweder Medien anzufertigen, sofern deutlich erkennbar gemacht wird, -dass es sich um eine Bearbeitung handelt; + a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; -c. Den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich -wiederzugeben und zu verbreiten; und + b. Den Schutzgegenstand zu bearbeiten, einschließlich Übersetzungen unter Nutzung jedweder Medien anzufertigen, sofern deutlich erkennbar gemacht wird, dass es sich um eine Bearbeitung handelt; -d. Bearbeitungen des Schutzgegenstandes zu veröffentlichen, öffentlich wiederzugeben -und zu verbreiten. + c. Den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich wiederzugeben und zu verbreiten; und -e. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + d. Bearbeitungen des Schutzgegenstandes zu veröffentlichen, öffentlich wiederzugeben und zu verbreiten. -i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche -im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme -(zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber -das ausschließliche Recht vor, die entsprechenden Vergütungsansprüche für -jede Ausübung eines Rechts aus dieser Lizenz durch Sie geltend zu machen. + e. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: -ii. Vergütung bei Zwangslizenzen: Soweit Zwangslizenzen außerhalb dieser Lizenz -vorgesehen sind und zustande kommen, verzichtet der Lizenzgeber für alle Fälle -einer lizenzgerechten Nutzung des Schutzgegenstandes durch Sie auf jegliche -Vergütung. + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechenden Vergütungsansprüche für jede Ausübung eines Rechts aus dieser Lizenz durch Sie geltend zu machen. -iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des -Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte -(i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig -davon, ob eine Geltendmachung der Vergütungsansprüche durch ihn selbst oder -nur durch eine Verwertungsgesellschaft möglich wäre. + ii. Vergütung bei Zwangslizenzen: Soweit Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, verzichtet der Lizenzgeber für alle Fälle einer lizenzgerechten Nutzung des Schutzgegenstandes durch Sie auf jegliche Vergütung. -Die vorgenannte Nutzungsbewilligung wird für alle bekannten sowie alle noch -nicht bekannten Nutzungsarten eingeräumt. Sie beinhaltet auch das Recht, solche -Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser -Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, -die über diesen Abschnitt hinaus nicht ausdrücklich vom Lizenzgeber eingeräumt -werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen -von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen -Schutz eigener Art genießen, verzichtet der Lizenzgeber auf die Geltendmachung -sämtlicher daraus resultierender Rechte. + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Geltendmachung der Vergütungsansprüche durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. - 4. Bedingungen +Die vorgenannte Nutzungsbewilligung wird für alle bekannten sowie alle noch nicht bekannten Nutzungsarten eingeräumt. Sie beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich vom Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf die Geltendmachung sämtlicher daraus resultierender Rechte. -Die Erteilung der Nutzungsbewilligung gemäß Abschnitt 3 dieser Lizenz erfolgt -ausdrücklich nur unter den folgenden Bedingungen: +4. Bedingungen -a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser -Lizenz verbreiten oder öffentlich wiedergeben. Sie müssen dabei stets eine -Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier -(URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten -oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz -gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. -Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich -wiedergeben, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz -und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten -oder öffentlich wiedergeben, dürfen Sie (in Bezug auf den Schutzgegenstand) -keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes -in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. -Dasselbe gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil -eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk -insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk -erstellen, müssen Sie - soweit dies praktikabel ist - auf die Mitteilung eines -Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.c) aufgezählten Hinweise -entfernen. Wenn Sie eine Bearbeitung vornehmen, müssen Sie – soweit dies praktikabel -ist – auf die Mitteilung eines Lizenzgebers hin von der Bearbeitung die in -Abschnitt 4.c) aufgezählten Hinweise entfernen. +Die Erteilung der Nutzungsbewilligung gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: - b. Sie dürfen eine Bearbeitung ausschließlich unter den Bedingungen + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich wiedergeben. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich wiedergeben, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich wiedergeben, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dasselbe gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie - soweit dies praktikabel ist - auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.c) aufgezählten Hinweise entfernen. Wenn Sie eine Bearbeitung vornehmen, müssen Sie – soweit dies praktikabel ist – auf die Mitteilung eines Lizenzgebers hin von der Bearbeitung die in Abschnitt 4.c) aufgezählten Hinweise entfernen. - i. dieser Lizenz, + b. Sie dürfen eine Bearbeitung ausschließlich unter den Bedingungen -ii. einer späteren Version dieser Lizenz mit denselben Lizenzelementen, + i. dieser Lizenz, -iii. einer rechtsordnungsspezifischen Creative-Commons-Lizenz mit denselben -Lizenzelementen ab Version 3.0 aufwärts (z.B. Namensnennung - Weitergabe unter -gleichen Bedingungen 3.0 US), + ii. einer späteren Version dieser Lizenz mit denselben Lizenzelementen, -iv. der Creative-Commons-Unported-Lizenz mit denselben Lizenzelementen ab -Version 3.0 aufwärts, oder + iii. einer rechtsordnungsspezifischen Creative-Commons-Lizenz mit denselben Lizenzelementen ab Version 3.0 aufwärts (z.B. Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 US), - v. einer mit Creative Commons kompatiblen Lizenz + iv. der Creative-Commons-Unported-Lizenz mit denselben Lizenzelementen ab Version 3.0 aufwärts, oder - verbreiten oder öffentlich wiedergeben. + v. einer mit Creative Commons kompatiblen Lizenz -Falls Sie die Bearbeitung gemäß Abschnitt b)(v) unter einer mit Creative Commons -kompatiblen Lizenz lizenzieren, müssen Sie deren Lizenzbestimmungen Folge -leisten. + verbreiten oder öffentlich wiedergeben. -Falls Sie die Bearbeitung unter einer der unter b)(i)-(iv) genannten Lizenzen -("Verwendbare Lizenzen") lizenzieren, müssen Sie deren Lizenzbestimmungen -sowie folgenden Bestimmungen Folge leisten: Sie müssen stets eine Kopie der -verwendbaren Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier -(URI) beifügen, wenn Sie die Bearbeitung verbreiten oder öffentlich wiedergeben. -Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, -die die Bedingungen der verwendbaren Lizenz oder die durch sie gewährten Rechte -beschränken. Bei jeder Bearbeitung, die Sie verbreiten oder öffentlich wiedergeben, -müssen Sie alle Hinweise auf die verwendbare Lizenz und den Haftungsausschluss -unverändert lassen. Wenn Sie die Bearbeitung verbreiten oder öffentlich wiedergeben, -dürfen Sie (in Bezug auf die Bearbeitung) keine technischen Maßnahmen ergreifen, -die den Nutzer der Bearbeitung in der Ausübung der ihm durch die verwendbare -Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.b) gilt auch -für den Fall, dass die Bearbeitung einen Bestandteil eines Sammelwerkes bildet; -dies bedeutet jedoch nicht, dass das Sammelwerk insgesamt der verwendbaren -Lizenz unterstellt werden muss. + Falls Sie die Bearbeitung gemäß Abschnitt b)(v) unter einer mit Creative Commons kompatiblen Lizenz lizenzieren, müssen Sie deren Lizenzbestimmungen Folge leisten. -c. Die Verbreitung und die öffentliche Wiedergabe des Schutzgegenstandes oder -auf ihm aufbauender Inhalte oder ihn enthaltender Sammelwerke ist Ihnen nur -unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen -im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt -lassen. Sie sind verpflichtet, die Urheberschaft oder die Rechteinhaberschaft -in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem -Sie selbst – soweit bekannt – Folgendes angeben: + Falls Sie die Bearbeitung unter einer der unter b)(i)-(iv) genannten Lizenzen ("Verwendbare Lizenzen") lizenzieren, müssen Sie deren Lizenzbestimmungen sowie folgenden Bestimmungen Folge leisten: Sie müssen stets eine Kopie der verwendbaren Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen, wenn Sie die Bearbeitung verbreiten oder öffentlich wiedergeben. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen der verwendbaren Lizenz oder die durch sie gewährten Rechte beschränken. Bei jeder Bearbeitung, die Sie verbreiten oder öffentlich wiedergeben, müssen Sie alle Hinweise auf die verwendbare Lizenz und den Haftungsausschluss unverändert lassen. Wenn Sie die Bearbeitung verbreiten oder öffentlich wiedergeben, dürfen Sie (in Bezug auf die Bearbeitung) keine technischen Maßnahmen ergreifen, die den Nutzer der Bearbeitung in der Ausübung der ihm durch die verwendbare Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.b) gilt auch für den Fall, dass die Bearbeitung einen Bestandteil eines Sammelwerkes bildet; dies bedeutet jedoch nicht, dass das Sammelwerk insgesamt der verwendbaren Lizenz unterstellt werden muss. -i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers, -und/oder falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen -oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen -hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) („Zuschreibungsempfänger"), -Namen bzw. Bezeichnung dieses oder dieser Dritten; + c. Die Verbreitung und die öffentliche Wiedergabe des Schutzgegenstandes oder auf ihm aufbauender Inhalte oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Urheberschaft oder die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie selbst – soweit bekannt – Folgendes angeben: - ii. den Titel des Inhaltes; + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers, und/oder falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) („Zuschreibungsempfänger“), Namen bzw. Bezeichnung dieses oder dieser Dritten; -iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. -Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, -es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen -zum Schutzgegenstand; + ii. den Titel des Inhaltes; -iv. und im Falle einer Bearbeitung des Schutzgegenstandes in Übereinstimmung -mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Bearbeitung -handelt. + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand; -Die nach diesem Abschnitt 4.c) erforderlichen Angaben können in jeder angemessenen -Form gemacht werden; im Falle einer Bearbeitung des Schutzgegenstandes oder -eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer -Nennung aller Beitragenden dergestalt erfolgen, dass sie zumindest ebenso -hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben -nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft -in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte -aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich -vorliegende Zustimmung des Urhebers, des Lizenzgebers und/oder des Zuschreibungsempfängers -weder implizit noch explizit irgendeine Verbindung mit dem oder eine Unterstützung -oder Billigung durch den Lizenzgeber oder den Zuschreibungsempfänger andeuten -oder erklären. + iv. und im Falle einer Bearbeitung des Schutzgegenstandes in Übereinstimmung mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Bearbeitung handelt. -d. Die oben unter 4.a) bis c) genannten Einschränkungen gelten nicht für solche -Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff -fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen -Schutz eigener Art genießen. + Die nach diesem Abschnitt 4.c) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle einer Bearbeitung des Schutzgegenstandes oder eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung aller Beitragenden dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Urhebers, des Lizenzgebers und/oder des Zuschreibungsempfängers weder implizit noch explizit irgendeine Verbindung mit dem oder eine Unterstützung oder Billigung durch den Lizenzgeber oder den Zuschreibungsempfänger andeuten oder erklären. -e. (Urheber)Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser -Lizenz unberührt. + d. Die oben unter 4.a) bis c) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. - 5. Gewährleistung + e. (Urheber)Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. -SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER -UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN -WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE ERTEILUNG DER -NUTZUNGSBEWILLIGUNG UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT -WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST -INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN -ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, -SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON -BESCHREIBUNGEN. +5. Gewährleistung - 6. Haftungsbeschränkung +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE ERTEILUNG DER NUTZUNGSBEWILLIGUNG UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. -ÜBER DIE IN ZIFFER 5 GENANNTE GEWÄHRLEISTUNG HINAUS HAFTET DER LIZENZGEBER -IHNEN GEGENÜBER FÜR SCHÄDEN JEGLICHER ART NUR BEI GROBER FAHRLÄSSIGKEIT ODER -VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG FÜR FOLGE- -ODER ANDERE SCHÄDEN, AUCH WENN ER ÜBER DIE MÖGLICHKEIT IHRES EINTRITTS UNTERRICHTET -WURDE. +6. Haftungsbeschränkung - 7. Erlöschen +ÜBER DIE IN ZIFFER 5 GENANNTE GEWÄHRLEISTUNG HINAUS HAFTET DER LIZENZGEBER IHNEN GEGENÜBER FÜR SCHÄDEN JEGLICHER ART NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG FÜR FOLGE- ODER ANDERE SCHÄDEN, AUCH WENN ER ÜBER DIE MÖGLICHKEIT IHRES EINTRITTS UNTERRICHTET WURDE. -a. Diese Lizenz und die durch sie erteilte Nutzungsbewilligung erlöschen mit -Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen -durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder -einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen -oder juristischen Personen, die Bearbeitungen des Schutzgegenstandes oder -diesen enthaltende Sammelwerke sowie entsprechende Vervielfältigungsstücke -unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich -entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen -sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten -die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. +7. Erlöschen -b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet -bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen -behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen -anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, -solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf -dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser -Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese -Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen -vollumfänglich wirksam bleibt. + a. Diese Lizenz und die durch sie erteilte Nutzungsbewilligung erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die Bearbeitungen des Schutzgegenstandes oder diesen enthaltende Sammelwerke sowie entsprechende Vervielfältigungsstücke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. - 8. Sonstige Bestimmungen + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. -a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil -eines Sammelwerkes verbreiten oder öffentlich wiedergeben, bietet der Lizenzgeber -dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang -an, wie Ihnen in Form dieser Lizenz. +8. Sonstige Bestimmungen -b. Jedes Mal wenn Sie eine Bearbeitung des Schutzgegenstandes verbreiten oder -öffentlich wiedergeben, bietet der Lizenzgeber dem Empfänger eine Lizenz am -ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen -Umfang an, wie Ihnen in Form dieser Lizenz. + a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich wiedergeben, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. -c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die -Wirksamkeit der Lizenz im Übrigen unberührt. + b. Jedes Mal wenn Sie eine Bearbeitung des Schutzgegenstandes verbreiten oder öffentlich wiedergeben, bietet der Lizenzgeber dem Empfänger eine Lizenz am ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. -d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen -sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß -betroffene Seite nicht schriftlich zugestimmt hat. + c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen unberührt. -e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, -Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt -die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug -auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder -Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht -genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem -Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. -Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte -Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung -zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen -wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht -auf die Dritten gemäß 8.a) und b) angebotenen Lizenzen aus. + d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. -f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung -getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag -das Recht der Republik Österreich Anwendung. + e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß 8.a) und b) angebotenen Lizenzen aus. + + f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Republik Österreich Anwendung. Creative Commons Notice -Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr -oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet -Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für -irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar -- im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen -beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, -wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. -Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und -die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit -gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL -steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder -einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen -Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach -der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, -die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise -auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen -der Markennutzung sind nicht Bestandteil dieser Lizenz. +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-SA-3.0-DE b/options/license/CC-BY-SA-3.0-DE new file mode 100644 index 000000000..472c3663a --- /dev/null +++ b/options/license/CC-BY-SA-3.0-DE @@ -0,0 +1,135 @@ +Creative Commons Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 Deutschland + + CREATIVE COMMONS IST KEINE RECHTSANWALTSKANZLEI UND LEISTET KEINE RECHTSBERATUNG. DIE BEREITSTELLUNG DIESER LIZENZ FÜHRT ZU KEINEM MANDATSVERHÄLTNIS. CREATIVE COMMONS STELLT DIESE INFORMATIONEN OHNE GEWÄHR ZUR VERFÜGUNG. CREATIVE COMMONS ÜBERNIMMT KEINE GEWÄHRLEISTUNG FÜR DIE GELIEFERTEN INFORMATIONEN UND SCHLIEßT DIE HAFTUNG FÜR SCHÄDEN AUS, DIE SICH AUS DEREN GEBRAUCH ERGEBEN. + +Lizenz + +DER GEGENSTAND DIESER LIZENZ (WIE UNTER "SCHUTZGEGENSTAND" DEFINIERT) WIRD UNTER DEN BEDINGUNGEN DIESER CREATIVE COMMONS PUBLIC LICENSE ("CCPL", "LIZENZ" ODER "LIZENZVERTRAG") ZUR VERFÜGUNG GESTELLT. DER SCHUTZGEGENSTAND IST DURCH DAS URHEBERRECHT UND/ODER ANDERE GESETZE GESCHÜTZT. JEDE FORM DER NUTZUNG DES SCHUTZGEGENSTANDES, DIE NICHT AUFGRUND DIESER LIZENZ ODER DURCH GESETZE GESTATTET IST, IST UNZULÄSSIG. + +DURCH DIE AUSÜBUNG EINES DURCH DIESE LIZENZ GEWÄHRTEN RECHTS AN DEM SCHUTZGEGENSTAND ERKLÄREN SIE SICH MIT DEN LIZENZBEDINGUNGEN RECHTSVERBINDLICH EINVERSTANDEN. SOWEIT DIESE LIZENZ ALS LIZENZVERTRAG ANZUSEHEN IST, GEWÄHRT IHNEN DER LIZENZGEBER DIE IN DER LIZENZ GENANNTEN RECHTE UNENTGELTLICH UND IM AUSTAUSCH DAFÜR, DASS SIE DAS GEBUNDENSEIN AN DIE LIZENZBEDINGUNGEN AKZEPTIEREN. + +1. Definitionen + + a. Der Begriff "Abwandlung" im Sinne dieser Lizenz bezeichnet das Ergebnis jeglicher Art von Veränderung des Schutzgegenstandes, solange die eigenpersönlichen Züge des Schutzgegenstandes darin nicht verblassen und daran eigene Schutzrechte entstehen. Das kann insbesondere eine Bearbeitung, Umgestaltung, Änderung, Anpassung, Übersetzung oder Heranziehung des Schutzgegenstandes zur Vertonung von Laufbildern sein. Nicht als Abwandlung des Schutzgegenstandes gelten seine Aufnahme in eine Sammlung oder ein Sammelwerk und die freie Benutzung des Schutzgegenstandes. + + b. Der Begriff "Sammelwerk" im Sinne dieser Lizenz meint eine Zusammenstellung von literarischen, künstlerischen oder wissenschaftlichen Inhalten, sofern diese Zusammenstellung aufgrund von Auswahl und Anordnung der darin enthaltenen selbständigen Elemente eine geistige Schöpfung darstellt, unabhängig davon, ob die Elemente systematisch oder methodisch angelegt und dadurch einzeln zugänglich sind oder nicht. + + c. "Verbreiten" im Sinne dieser Lizenz bedeutet, den Schutzgegenstand oder Abwandlungen im Original oder in Form von Vervielfältigungsstücken, mithin in körperlich fixierter Form der Öffentlichkeit anzubieten oder in Verkehr zu bringen. + + d. Unter "Lizenzelementen" werden im Sinne dieser Lizenz die folgenden übergeordneten Lizenzcharakteristika verstanden, die vom Lizenzgeber ausgewählt wurden und in der Bezeichnung der Lizenz zum Ausdruck kommen: "Namensnennung", "Weitergabe unter gleichen Bedingungen". + + e. Der "*Lizenzgeber*" im Sinne dieser Lizenz ist diejenige natürliche oder juristische Person oder Gruppe, die den Schutzgegenstand unter den Bedingungen dieser Lizenz anbietet und insoweit als Rechteinhaberin auftritt. + + f. "Rechteinhaber" im Sinne dieser Lizenz ist der Urheber des Schutzgegenstandes oder jede andere natürliche oder juristische Person oder Gruppe von Personen, die am Schutzgegenstand ein Immaterialgüterrecht erlangt hat, welches die in Abschnitt 3 genannten Handlungen erfasst und bei dem eine Einräumung von Nutzungsrechten oder eine Weiterübertragung an Dritte möglich ist. + + g. Der Begriff "Schutzgegenstand" bezeichnet in dieser Lizenz den literarischen, künstlerischen oder wissenschaftlichen Inhalt, der unter den Bedingungen dieser Lizenz angeboten wird. Das kann insbesondere eine persönliche geistige Schöpfung jeglicher Art, ein Werk der kleinen Münze, ein nachgelassenes Werk oder auch ein Lichtbild oder anderes Objekt eines verwandten Schutzrechts sein, unabhängig von der Art seiner Fixierung und unabhängig davon, auf welche Weise jeweils eine Wahrnehmung erfolgen kann, gleichviel ob in analoger oder digitaler Form. Soweit Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen, unterfallen auch sie dem Begriff "Schutzgegenstand" im Sinne dieser Lizenz. + + h. Mit "Sie" bzw. "Ihnen" ist die natürliche oder juristische Person gemeint, die in dieser Lizenz im Abschnitt 3 genannte Nutzungen des Schutzgegenstandes vornimmt und zuvor in Hinblick auf den Schutzgegenstand nicht gegen Bedingungen dieser Lizenz verstoßen oder aber die ausdrückliche Erlaubnis des Lizenzgebers erhalten hat, die durch diese Lizenz gewährten Nutzungsrechte trotz eines vorherigen Verstoßes auszuüben. + + i. Unter "Öffentlich Zeigen" im Sinne dieser Lizenz sind Veröffentlichungen und Präsentationen des Schutzgegenstandes zu verstehen, die für eine Mehrzahl von Mitgliedern der Öffentlichkeit bestimmt sind und in unkörperlicher Form mittels öffentlicher Wiedergabe in Form von Vortrag, Aufführung, Vorführung, Darbietung, Sendung, Weitersendung, zeit- und ortsunabhängiger Zugänglichmachung oder in körperlicher Form mittels Ausstellung erfolgen, unabhängig von bestimmten Veranstaltungen und unabhängig von den zum Einsatz kommenden Techniken und Verfahren, einschließlich drahtgebundener oder drahtloser Mittel und Einstellen in das Internet. + + j. "Vervielfältigen" im Sinne dieser Lizenz bedeutet, mittels beliebiger Verfahren Vervielfältigungsstücke des Schutzgegenstandes herzustellen, insbesondere durch Ton- oder Bildaufzeichnungen, und umfasst auch den Vorgang, erstmals körperliche Fixierungen des Schutzgegenstandes sowie Vervielfältigungsstücke dieser Fixierungen anzufertigen, sowie die Übertragung des Schutzgegenstandes auf einen Bild- oder Tonträger oder auf ein anderes elektronisches Medium, gleichviel ob in digitaler oder analoger Form. + + k. "Mit Creative Commons kompatible Lizenz" bezeichnet eine Lizenz, die unter https://creativecommons.org/compatiblelicenses aufgelistet ist und die durch Creative Commons als grundsätzlich zur vorliegenden Lizenz äquivalent akzeptiert wurde, da zumindest folgende Voraussetzungen erfüllt sind: + + Diese mit Creative Commons kompatible Lizenz + + i. enthält Bestimmungen, welche die gleichen Ziele verfolgen, die gleiche Bedeutung haben und die gleichen Wirkungen erzeugen wie die Lizenzelemente der vorliegenden Lizenz; und + + ii. erlaubt ausdrücklich das Lizenzieren von ihr unterstellten Abwandlungen unter vorliegender Lizenz, unter einer anderen rechtsordnungsspezifisch angepassten Creative-Commons-Lizenz mit denselben Lizenzelementen, wie sie die vorliegende Lizenz aufweist, oder unter der entsprechenden Creative-Commons-Unported-Lizenz. + +2. Schranken des Immaterialgüterrechts. Diese Lizenz ist in keiner Weise darauf gerichtet, Befugnisse zur Nutzung des Schutzgegenstandes zu vermindern, zu beschränken oder zu vereiteln, die Ihnen aufgrund der Schranken des Urheberrechts oder anderer Rechtsnormen bereits ohne Weiteres zustehen oder sich aus dem Fehlen eines immaterialgüterrechtlichen Schutzes ergeben. + +3. Einräumung von Nutzungsrechten. Unter den Bedingungen dieser Lizenz räumt Ihnen der Lizenzgeber - unbeschadet unverzichtbarer Rechte und vorbehaltlich des Abschnitts 3.e) - das vergütungsfreie, räumlich und zeitlich (für die Dauer des Schutzrechts am Schutzgegenstand) unbeschränkte einfache Recht ein, den Schutzgegenstand auf die folgenden Arten und Weisen zu nutzen ("unentgeltlich eingeräumtes einfaches Nutzungsrecht für jedermann"): + + a. Den Schutzgegenstand in beliebiger Form und Menge zu vervielfältigen, ihn in Sammelwerke zu integrieren und ihn als Teil solcher Sammelwerke zu vervielfältigen; + + b. Abwandlungen des Schutzgegenstandes anzufertigen, einschließlich Übersetzungen unter Nutzung jedweder Medien, sofern deutlich erkennbar gemacht wird, dass es sich um Abwandlungen handelt; + + c. den Schutzgegenstand, allein oder in Sammelwerke aufgenommen, öffentlich zu zeigen und zu verbreiten; + + d. Abwandlungen des Schutzgegenstandes zu veröffentlichen, öffentlich zu zeigen und zu verbreiten. + + e. Bezüglich Vergütung für die Nutzung des Schutzgegenstandes gilt Folgendes: + + i. Unverzichtbare gesetzliche Vergütungsansprüche: Soweit unverzichtbare Vergütungsansprüche im Gegenzug für gesetzliche Lizenzen vorgesehen oder Pauschalabgabensysteme (zum Beispiel für Leermedien) vorhanden sind, behält sich der Lizenzgeber das ausschließliche Recht vor, die entsprechende Vergütung einzuziehen für jede Ausübung eines Rechts aus dieser Lizenz durch Sie. + + ii. Vergütung bei Zwangslizenzen: Sofern Zwangslizenzen außerhalb dieser Lizenz vorgesehen sind und zustande kommen, verzichtet der Lizenzgeber für alle Fälle einer lizenzgerechten Nutzung des Schutzgegenstandes durch Sie auf jegliche Vergütung. + + iii. Vergütung in sonstigen Fällen: Bezüglich lizenzgerechter Nutzung des Schutzgegenstandes durch Sie, die nicht unter die beiden vorherigen Abschnitte (i) und (ii) fällt, verzichtet der Lizenzgeber auf jegliche Vergütung, unabhängig davon, ob eine Einziehung der Vergütung durch ihn selbst oder nur durch eine Verwertungsgesellschaft möglich wäre. + +Das vorgenannte Nutzungsrecht wird für alle bekannten sowie für alle noch nicht bekannten Nutzungsarten eingeräumt. Es beinhaltet auch das Recht, solche Änderungen am Schutzgegenstand vorzunehmen, die für bestimmte nach dieser Lizenz zulässige Nutzungen technisch erforderlich sind. Alle sonstigen Rechte, die über diesen Abschnitt hinaus nicht ausdrücklich durch den Lizenzgeber eingeräumt werden, bleiben diesem allein vorbehalten. Soweit Datenbanken oder Zusammenstellungen von Daten Schutzgegenstand dieser Lizenz oder Teil dessen sind und einen immaterialgüterrechtlichen Schutz eigener Art genießen, verzichtet der Lizenzgeber auf sämtliche aus diesem Schutz resultierenden Rechte. + +4. Bedingungen. Die Einräumung des Nutzungsrechts gemäß Abschnitt 3 dieser Lizenz erfolgt ausdrücklich nur unter den folgenden Bedingungen: + + a. Sie dürfen den Schutzgegenstand ausschließlich unter den Bedingungen dieser Lizenz verbreiten oder öffentlich zeigen. Sie müssen dabei stets eine Kopie dieser Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen dieser Lizenz oder die durch diese Lizenz gewährten Rechte beschränken. Sie dürfen den Schutzgegenstand nicht unterlizenzieren. Bei jeder Kopie des Schutzgegenstandes, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise unverändert lassen, die auf diese Lizenz und den Haftungsausschluss hinweisen. Wenn Sie den Schutzgegenstand verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf den Schutzgegenstand) keine technischen Maßnahmen ergreifen, die den Nutzer des Schutzgegenstandes in der Ausübung der ihm durch diese Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.a) gilt auch für den Fall, dass der Schutzgegenstand einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt dieser Lizenz unterstellt werden muss. Sofern Sie ein Sammelwerk erstellen, müssen Sie auf die Mitteilung eines Lizenzgebers hin aus dem Sammelwerk die in Abschnitt 4.c) aufgezählten Hinweise entfernen. Wenn Sie eine Abwandlung vornehmen, müssen Sie auf die Mitteilung eines Lizenzgebers hin von der Abwandlung die in Abschnitt 4.c) aufgezählten Hinweise entfernen. + + b. Sie dürfen eine Abwandlung ausschließlich unter den Bedingungen + + i. dieser Lizenz, + + ii. einer späteren Version dieser Lizenz mit denselben Lizenzelementen, + + iii. einer rechtsordnungsspezifischen Creative-Commons-Lizenz mit denselben Lizenzelementen ab Version 3.0 aufwärts (z.B. Namensnennung - Weitergabe unter gleichen Bedingungen 3.0 US), + + iv. der Creative-Commons-Unported-Lizenz mit denselben Lizenzelementen ab Version 3.0 aufwärts, oder + + v. einer mit Creative Commons kompatiblen Lizenz + + verbreiten oder öffentlich zeigen. + + Falls Sie die Abwandlung gemäß Abschnitt (v) unter einer mit Creative Commons kompatiblen Lizenz lizenzieren, müssen Sie deren Lizenzbestimmungen Folge leisten. + + Falls Sie die Abwandlungen unter einer der unter (i)-(iv) genannten Lizenzen ("Verwendbare Lizenzen") lizenzieren, müssen Sie deren Lizenzbestimmungen sowie folgenden Bestimmungen Folge leisten: Sie müssen stets eine Kopie der verwendbaren Lizenz oder deren vollständige Internetadresse in Form des Uniform-Resource-Identifier (URI) beifügen, wenn Sie die Abwandlung verbreiten oder öffentlich zeigen. Sie dürfen keine Vertrags- oder Nutzungsbedingungen anbieten oder fordern, die die Bedingungen der verwendbaren Lizenz oder die durch sie gewährten Rechte beschränken. Bei jeder Abwandlung, die Sie verbreiten oder öffentlich zeigen, müssen Sie alle Hinweise auf die verwendbare Lizenz und den Haftungsausschluss unverändert lassen. Wenn Sie die Abwandlung verbreiten oder öffentlich zeigen, dürfen Sie (in Bezug auf die Abwandlung) keine technischen Maßnahmen ergreifen, die den Nutzer der Abwandlung in der Ausübung der ihm durch die verwendbare Lizenz gewährten Rechte behindern können. Dieser Abschnitt 4.b) gilt auch für den Fall, dass die Abwandlung einen Bestandteil eines Sammelwerkes bildet, was jedoch nicht bedeutet, dass das Sammelwerk insgesamt der verwendbaren Lizenz unterstellt werden muss. + + c. Die Verbreitung und das öffentliche Zeigen des Schutzgegenstandes oder auf ihm aufbauender Abwandlungen oder ihn enthaltender Sammelwerke ist Ihnen nur unter der Bedingung gestattet, dass Sie, vorbehaltlich etwaiger Mitteilungen im Sinne von Abschnitt 4.a), alle dazu gehörenden Rechtevermerke unberührt lassen. Sie sind verpflichtet, die Rechteinhaberschaft in einer der Nutzung entsprechenden, angemessenen Form anzuerkennen, indem Sie - soweit bekannt - Folgendes angeben: + + i. Den Namen (oder das Pseudonym, falls ein solches verwendet wird) des Rechteinhabers und / oder, falls der Lizenzgeber im Rechtevermerk, in den Nutzungsbedingungen oder auf andere angemessene Weise eine Zuschreibung an Dritte vorgenommen hat (z.B. an eine Stiftung, ein Verlagshaus oder eine Zeitung) ("Zuschreibungsempfänger"), Namen bzw. Bezeichnung dieses oder dieser Dritten; + + ii. den Titel des Inhaltes; + + iii. in einer praktikablen Form den Uniform-Resource-Identifier (URI, z.B. Internetadresse), den der Lizenzgeber zum Schutzgegenstand angegeben hat, es sei denn, dieser URI verweist nicht auf den Rechtevermerk oder die Lizenzinformationen zum Schutzgegenstand; + + iv. und im Falle einer Abwandlung des Schutzgegenstandes in Übereinstimmung mit Abschnitt 3.b) einen Hinweis darauf, dass es sich um eine Abwandlung handelt. + + Die nach diesem Abschnitt 4.c) erforderlichen Angaben können in jeder angemessenen Form gemacht werden; im Falle einer Abwandlung des Schutzgegenstandes oder eines Sammelwerkes müssen diese Angaben das Minimum darstellen und bei gemeinsamer Nennung mehrerer Rechteinhaber dergestalt erfolgen, dass sie zumindest ebenso hervorgehoben sind wie die Hinweise auf die übrigen Rechteinhaber. Die Angaben nach diesem Abschnitt dürfen Sie ausschließlich zur Angabe der Rechteinhaberschaft in der oben bezeichneten Weise verwenden. Durch die Ausübung Ihrer Rechte aus dieser Lizenz dürfen Sie ohne eine vorherige, separat und schriftlich vorliegende Zustimmung des Lizenzgebers und / oder des Zuschreibungsempfängers weder explizit noch implizit irgendeine Verbindung zum Lizenzgeber oder Zuschreibungsempfänger und ebenso wenig eine Unterstützung oder Billigung durch ihn andeuten. + + d. Die oben unter 4.a) bis c) genannten Einschränkungen gelten nicht für solche Teile des Schutzgegenstandes, die allein deshalb unter den Schutzgegenstandsbegriff fallen, weil sie als Datenbanken oder Zusammenstellungen von Daten einen immaterialgüterrechtlichen Schutz eigener Art genießen. + + e. Persönlichkeitsrechte bleiben - soweit sie bestehen - von dieser Lizenz unberührt. + +5. Gewährleistung + +SOFERN KEINE ANDERS LAUTENDE, SCHRIFTLICHE VEREINBARUNG ZWISCHEN DEM LIZENZGEBER UND IHNEN GESCHLOSSEN WURDE UND SOWEIT MÄNGEL NICHT ARGLISTIG VERSCHWIEGEN WURDEN, BIETET DER LIZENZGEBER DEN SCHUTZGEGENSTAND UND DIE EINRÄUMUNG VON RECHTEN UNTER AUSSCHLUSS JEGLICHER GEWÄHRLEISTUNG AN UND ÜBERNIMMT WEDER AUSDRÜCKLICH NOCH KONKLUDENT GARANTIEN IRGENDEINER ART. DIES UMFASST INSBESONDERE DAS FREISEIN VON SACH- UND RECHTSMÄNGELN, UNABHÄNGIG VON DEREN ERKENNBARKEIT FÜR DEN LIZENZGEBER, DIE VERKEHRSFÄHIGKEIT DES SCHUTZGEGENSTANDES, SEINE VERWENDBARKEIT FÜR EINEN BESTIMMTEN ZWECK SOWIE DIE KORREKTHEIT VON BESCHREIBUNGEN. DIESE GEWÄHRLEISTUNGSBESCHRÄNKUNG GILT NICHT, SOWEIT MÄNGEL ZU SCHÄDEN DER IN ABSCHNITT 6 BEZEICHNETEN ART FÜHREN UND AUF SEITEN DES LIZENZGEBERS DAS JEWEILS GENANNTE VERSCHULDEN BZW. VERTRETENMÜSSEN EBENFALLS VORLIEGT. + +6. Haftungsbeschränkung + +DER LIZENZGEBER HAFTET IHNEN GEGENÜBER IN BEZUG AUF SCHÄDEN AUS DER VERLETZUNG DES LEBENS, DES KÖRPERS ODER DER GESUNDHEIT NUR, SOFERN IHM WENIGSTENS FAHRLÄSSIGKEIT VORZUWERFEN IST, FÜR SONSTIGE SCHÄDEN NUR BEI GROBER FAHRLÄSSIGKEIT ODER VORSATZ, UND ÜBERNIMMT DARÜBER HINAUS KEINERLEI FREIWILLIGE HAFTUNG. + +7. Erlöschen + + a. Diese Lizenz und die durch sie eingeräumten Nutzungsrechte erlöschen mit Wirkung für die Zukunft im Falle eines Verstoßes gegen die Lizenzbedingungen durch Sie, ohne dass es dazu der Kenntnis des Lizenzgebers vom Verstoß oder einer weiteren Handlung einer der Vertragsparteien bedarf. Mit natürlichen oder juristischen Personen, die Abwandlungen des Schutzgegenstandes oder diesen enthaltende Sammelwerke unter den Bedingungen dieser Lizenz von Ihnen erhalten haben, bestehen nachträglich entstandene Lizenzbeziehungen jedoch solange weiter, wie die genannten Personen sich ihrerseits an sämtliche Lizenzbedingungen halten. Darüber hinaus gelten die Ziffern 1, 2, 5, 6, 7, und 8 auch nach einem Erlöschen dieser Lizenz fort. + + b. Vorbehaltlich der oben genannten Bedingungen gilt diese Lizenz unbefristet bis der rechtliche Schutz für den Schutzgegenstand ausläuft. Davon abgesehen behält der Lizenzgeber das Recht, den Schutzgegenstand unter anderen Lizenzbedingungen anzubieten oder die eigene Weitergabe des Schutzgegenstandes jederzeit einzustellen, solange die Ausübung dieses Rechts nicht einer Kündigung oder einem Widerruf dieser Lizenz (oder irgendeiner Weiterlizenzierung, die auf Grundlage dieser Lizenz bereits erfolgt ist bzw. zukünftig noch erfolgen muss) dient und diese Lizenz unter Berücksichtigung der oben zum Erlöschen genannten Bedingungen vollumfänglich wirksam bleibt. + +8. Sonstige Bestimmungen + + a. Jedes Mal wenn Sie den Schutzgegenstand für sich genommen oder als Teil eines Sammelwerkes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + b. Jedes Mal wenn Sie eine Abwandlung des Schutzgegenstandes verbreiten oder öffentlich zeigen, bietet der Lizenzgeber dem Empfänger eine Lizenz am ursprünglichen Schutzgegenstand zu den gleichen Bedingungen und im gleichen Umfang an, wie Ihnen in Form dieser Lizenz. + + c. Sollte eine Bestimmung dieser Lizenz unwirksam sein, so bleibt davon die Wirksamkeit der Lizenz im Übrigen unberührt. + + d. Keine Bestimmung dieser Lizenz soll als abbedungen und kein Verstoß gegen sie als zulässig gelten, solange die von dem Verzicht oder von dem Verstoß betroffene Seite nicht schriftlich zugestimmt hat. + + e. Diese Lizenz (zusammen mit in ihr ausdrücklich vorgesehenen Erlaubnissen, Mitteilungen und Zustimmungen, soweit diese tatsächlich vorliegen) stellt die vollständige Vereinbarung zwischen dem Lizenzgeber und Ihnen in Bezug auf den Schutzgegenstand dar. Es bestehen keine Abreden, Vereinbarungen oder Erklärungen in Bezug auf den Schutzgegenstand, die in dieser Lizenz nicht genannt sind. Rechtsgeschäftliche Änderungen des Verhältnisses zwischen dem Lizenzgeber und Ihnen sind nur über Modifikationen dieser Lizenz möglich. Der Lizenzgeber ist an etwaige zusätzliche, einseitig durch Sie übermittelte Bestimmungen nicht gebunden. Diese Lizenz kann nur durch schriftliche Vereinbarung zwischen Ihnen und dem Lizenzgeber modifiziert werden. Derlei Modifikationen wirken ausschließlich zwischen dem Lizenzgeber und Ihnen und wirken sich nicht auf die Dritten gemäß Ziffern 8.a) und b) angeboteten Lizenzen aus. + + f. Sofern zwischen Ihnen und dem Lizenzgeber keine anderweitige Vereinbarung getroffen wurde und soweit Wahlfreiheit besteht, findet auf diesen Lizenzvertrag das Recht der Bundesrepublik Deutschland Anwendung. + +Creative Commons Notice + +Creative Commons ist nicht Partei dieser Lizenz und übernimmt keinerlei Gewähr oder dergleichen in Bezug auf den Schutzgegenstand. Creative Commons haftet Ihnen oder einer anderen Partei unter keinem rechtlichen Gesichtspunkt für irgendwelche Schäden, die - abstrakt oder konkret, zufällig oder vorhersehbar - im Zusammenhang mit dieser Lizenz entstehen. Unbeschadet der vorangegangen beiden Sätze, hat Creative Commons alle Rechte und Pflichten eines Lizenzgebers, wenn es sich ausdrücklich als Lizenzgeber im Sinne dieser Lizenz bezeichnet. + +Creative Commons gewährt den Parteien nur insoweit das Recht, das Logo und die Marke "Creative Commons" zu nutzen, als dies notwendig ist, um der Öffentlichkeit gegenüber kenntlich zu machen, dass der Schutzgegenstand unter einer CCPL steht. Ein darüber hinaus gehender Gebrauch der Marke "Creative Commons" oder einer verwandten Marke oder eines verwandten Logos bedarf der vorherigen schriftlichen Zustimmung von Creative Commons. Jeder erlaubte Gebrauch richtet sich nach der Creative Commons Marken-Nutzungs-Richtlinie in der jeweils aktuellen Fassung, die von Zeit zu Zeit auf der Website veröffentlicht oder auf andere Weise auf Anfrage zugänglich gemacht wird. Zur Klarstellung: Die genannten Einschränkungen der Markennutzung sind nicht Bestandteil dieser Lizenz. + +Creative Commons kann kontaktiert werden über https://creativecommons.org/. diff --git a/options/license/CC-BY-SA-4.0 b/options/license/CC-BY-SA-4.0 index f50cdd32a..835a6836b 100644 --- a/options/license/CC-BY-SA-4.0 +++ b/options/license/CC-BY-SA-4.0 @@ -1,350 +1,170 @@ -Creative Commons Attribution-ShareAlike 4.0 International Creative Commons -Corporation ("Creative Commons") is not a law firm and does not provide legal -services or legal advice. Distribution of Creative Commons public licenses -does not create a lawyer-client or other relationship. Creative Commons makes -its licenses and related information available on an "as-is" basis. Creative -Commons gives no warranties regarding its licenses, any material licensed -under their terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the fullest -extent possible. +Creative Commons Attribution-ShareAlike 4.0 International + + Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. +Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors +Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. More considerations for licensors. -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. +Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. -Although not required by our licenses, you are encouraged to respect those -requests where reasonable. More considerations for the public : wiki.creativecommons.org/Considerations_for_licensees +Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public. Creative Commons Attribution-ShareAlike 4.0 International Public License -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. +By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 – Definitions. -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. + a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. + b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. -c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, -approved by Creative Commons as essentially the equivalent of this Public -License. + c. BY-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License. -d. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + d. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. -e. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. + e. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. -f. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. + f. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. -g. License Elements means the license attributes listed in the name of a Creative -Commons Public License. The License Elements of this Public License are Attribution -and ShareAlike. + g. License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution and ShareAlike. -h. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. + h. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. -i. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. + i. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. -j. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. + j. Licensor means the individual(s) or entity(ies) granting rights under this Public License. -k. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. + k. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. -l. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. + l. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. -m. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. + m. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 – Scope. - a. License grant. + a. License grant. -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: + 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: - A. reproduce and Share the Licensed Material, in whole or in part; and + A. reproduce and Share the Licensed Material, in whole or in part; and - B. produce, reproduce, and Share Adapted Material. + B. produce, reproduce, and Share Adapted Material. -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. + 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. - 3. Term. The term of this Public License is specified in Section 6(a). + 3. Term. The term of this Public License is specified in Section 6(a). -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. + 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. - 5. Downstream recipients. + 5. Downstream recipients. -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. + A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. -B. Additional offer from the Licensor – Adapted Material. Every recipient -of Adapted Material from You automatically receives an offer from the Licensor -to exercise the Licensed Rights in the Adapted Material under the conditions -of the Adapter's License You apply. + B. Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply. -C. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. + C. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). + 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). - b. Other rights. + b. Other rights. -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. + 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. -2. Patent and trademark rights are not licensed under this Public License. + 2. Patent and trademark rights are not licensed under this Public License. -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties. + 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 – License Conditions. -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. +Your exercise of the Licensed Rights is expressly made subject to the following conditions. - a. Attribution. + a. Attribution. -1. If You Share the Licensed Material (including in modified form), You must: + 1. If You Share the Licensed Material (including in modified form), You must: -A. retain the following if it is supplied by the Licensor with the Licensed -Material: + A. retain the following if it is supplied by the Licensor with the Licensed Material: -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); + i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); - ii. a copyright notice; + ii. a copyright notice; - iii. a notice that refers to this Public License; + iii. a notice that refers to this Public License; - iv. a notice that refers to the disclaimer of warranties; + iv. a notice that refers to the disclaimer of warranties; -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and + B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. + C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. + 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. + 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. -b. ShareAlike.In addition to the conditions in Section 3(a), if You Share -Adapted Material You produce, the following conditions also apply. + b. ShareAlike.In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply. -1. The Adapter's License You apply must be a Creative Commons license with -the same License Elements, this version or later, or a BY-SA Compatible License. + 1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-SA Compatible License. -2. You must include the text of, or the URI or hyperlink to, the Adapter's -License You apply. You may satisfy this condition in any reasonable manner -based on the medium, means, and context in which You Share Adapted Material. + 2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material. -3. You may not offer or impose any additional or different terms or conditions -on, or apply any Effective Technological Measures to, Adapted Material that -restrict exercise of the rights granted under the Adapter's License You apply. + 3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply. Section 4 – Sui Generis Database Rights. -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: +Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database; + a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material, including for purposes of Section 3(b); and + b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. + c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. +For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 – Disclaimer of Warranties and Limitation of Liability. -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. + a. Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You. -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. + b. To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You. -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. + c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 – Term and Termination. -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. + a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: + b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or + 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or - 2. upon express reinstatement by the Licensor. + 2. upon express reinstatement by the Licensor. -c. For the avoidance of doubt, this Section 6(b) does not affect any right -the Licensor may have to seek remedies for Your violations of this Public -License. + c. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. -d. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. + d. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. - e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 – Other Terms and Conditions. -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. + a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. + b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 – Interpretation. -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. + a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. + b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. + c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. + d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. +Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. diff --git a/options/license/CC-PDDC b/options/license/CC-PDDC index 9e675aeb9..b64dfd6b7 100644 --- a/options/license/CC-PDDC +++ b/options/license/CC-PDDC @@ -1,25 +1,8 @@ -The person or persons who have associated work with this document (the "Dedicator" -or "Certifier") hereby either (a) certifies that, to the best of his knowledge, -the work of authorship identified is in the public domain of the country from -which the work is published, or (b) hereby dedicates whatever copyright the -dedicators holds in the work of authorship identified below (the "Work") to -the public domain. A certifier, moreover, dedicates any copyright interest -he may have in the associated work, and for these purposes, is described as -a "dedicator" below. -A certifier has taken reasonable steps to verify the copyright status of this -work. Certifier recognizes that his good faith efforts may not shield him -from liability if in fact the work certified is not in the public domain. +The person or persons who have associated work with this document (the "Dedicator" or "Certifier") hereby either (a) certifies that, to the best of his knowledge, the work of authorship identified is in the public domain of the country from which the work is published, or (b) hereby dedicates whatever copyright the dedicators holds in the work of authorship identified below (the "Work") to the public domain. A certifier, moreover, dedicates any copyright interest he may have in the associated work, and for these purposes, is described as a "dedicator" below. -Dedicator makes this dedication for the benefit of the public at large and -to the detriment of the Dedicator's heirs and successors. Dedicator intends -this dedication to be an overt act of relinquishment in perpetuity of all -present and future rights under copyright law, whether vested or contingent, -in the Work. Dedicator understands that such relinquishment of all rights -includes the relinquishment of all rights to enforce (by lawsuit or otherwise) -those copyrights in the Work. +A certifier has taken reasonable steps to verify the copyright status of this work. Certifier recognizes that his good faith efforts may not shield him from liability if in fact the work certified is not in the public domain. -Dedicator recognizes that, once placed in the public domain, the Work may -be freely reproduced, distributed, transmitted, used, modified, built upon, -or otherwise exploited by anyone for any purpose, commercial or non-commercial, -and in any way, including by methods that have not yet been invented or conceived. +Dedicator makes this dedication for the benefit of the public at large and to the detriment of the Dedicator's heirs and successors. Dedicator intends this dedication to be an overt act of relinquishment in perpetuity of all present and future rights under copyright law, whether vested or contingent, in the Work. Dedicator understands that such relinquishment of all rights includes the relinquishment of all rights to enforce (by lawsuit or otherwise) those copyrights in the Work. + +Dedicator recognizes that, once placed in the public domain, the Work may be freely reproduced, distributed, transmitted, used, modified, built upon, or otherwise exploited by anyone for any purpose, commercial or non-commercial, and in any way, including by methods that have not yet been invented or conceived. diff --git a/options/license/CC0-1.0 b/options/license/CC0-1.0 index a343ccd43..0e259d42c 100644 --- a/options/license/CC0-1.0 +++ b/options/license/CC0-1.0 @@ -1,119 +1,121 @@ Creative Commons Legal Code -CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES -NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE -AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION -ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE -OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS -LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION -OR WORKS PROVIDED HEREUNDER. +CC0 1.0 Universal + + CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE + LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN + ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS + INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES + REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS + PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM + THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED + HEREUNDER. Statement of Purpose -The laws of most jurisdictions throughout the world automatically confer exclusive -Copyright and Related Rights (defined below) upon the creator and subsequent -owner(s) (each and all, an "owner") of an original work of authorship and/or -a database (each, a "Work"). +The laws of most jurisdictions throughout the world automatically confer +exclusive Copyright and Related Rights (defined below) upon the creator +and subsequent owner(s) (each and all, an "owner") of an original work of +authorship and/or a database (each, a "Work"). -Certain owners wish to permanently relinquish those rights to a Work for the -purpose of contributing to a commons of creative, cultural and scientific -works ("Commons") that the public can reliably and without fear of later claims -of infringement build upon, modify, incorporate in other works, reuse and -redistribute as freely as possible in any form whatsoever and for any purposes, -including without limitation commercial purposes. These owners may contribute -to the Commons to promote the ideal of a free culture and the further production -of creative, cultural and scientific works, or to gain reputation or greater -distribution for their Work in part through the use and efforts of others. +Certain owners wish to permanently relinquish those rights to a Work for +the purpose of contributing to a commons of creative, cultural and +scientific works ("Commons") that the public can reliably and without fear +of later claims of infringement build upon, modify, incorporate in other +works, reuse and redistribute as freely as possible in any form whatsoever +and for any purposes, including without limitation commercial purposes. +These owners may contribute to the Commons to promote the ideal of a free +culture and the further production of creative, cultural and scientific +works, or to gain reputation or greater distribution for their Work in +part through the use and efforts of others. -For these and/or other purposes and motivations, and without any expectation -of additional consideration or compensation, the person associating CC0 with -a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright -and Related Rights in the Work, voluntarily elects to apply CC0 to the Work -and publicly distribute the Work under its terms, with knowledge of his or -her Copyright and Related Rights in the Work and the meaning and intended -legal effect of CC0 on those rights. +For these and/or other purposes and motivations, and without any +expectation of additional consideration or compensation, the person +associating CC0 with a Work (the "Affirmer"), to the extent that he or she +is an owner of Copyright and Related Rights in the Work, voluntarily +elects to apply CC0 to the Work and publicly distribute the Work under its +terms, with knowledge of his or her Copyright and Related Rights in the +Work and the meaning and intended legal effect of CC0 on those rights. -1. Copyright and Related Rights. A Work made available under CC0 may be protected -by copyright and related or neighboring rights ("Copyright and Related Rights"). -Copyright and Related Rights include, but are not limited to, the following: +1. Copyright and Related Rights. A Work made available under CC0 may be +protected by copyright and related or neighboring rights ("Copyright and +Related Rights"). Copyright and Related Rights include, but are not +limited to, the following: -i. the right to reproduce, adapt, distribute, perform, display, communicate, -and translate a Work; + i. the right to reproduce, adapt, distribute, perform, display, + communicate, and translate a Work; + ii. moral rights retained by the original author(s) and/or performer(s); +iii. publicity and privacy rights pertaining to a person's image or + likeness depicted in a Work; + iv. rights protecting against unfair competition in regards to a Work, + subject to the limitations in paragraph 4(a), below; + v. rights protecting the extraction, dissemination, use and reuse of data + in a Work; + vi. database rights (such as those arising under Directive 96/9/EC of the + European Parliament and of the Council of 11 March 1996 on the legal + protection of databases, and under any national implementation + thereof, including any amended or successor version of such + directive); and +vii. other similar, equivalent or corresponding rights throughout the + world based on applicable law or treaty, and any national + implementations thereof. - ii. moral rights retained by the original author(s) and/or performer(s); - -iii. publicity and privacy rights pertaining to a person's image or likeness -depicted in a Work; - -iv. rights protecting against unfair competition in regards to a Work, subject -to the limitations in paragraph 4(a), below; - -v. rights protecting the extraction, dissemination, use and reuse of data -in a Work; - -vi. database rights (such as those arising under Directive 96/9/EC of the -European Parliament and of the Council of 11 March 1996 on the legal protection -of databases, and under any national implementation thereof, including any -amended or successor version of such directive); and - -vii. other similar, equivalent or corresponding rights throughout the world -based on applicable law or treaty, and any national implementations thereof. - -2. Waiver. To the greatest extent permitted by, but not in contravention of, -applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and -unconditionally waives, abandons, and surrenders all of Affirmer's Copyright -and Related Rights and associated claims and causes of action, whether now -known or unknown (including existing as well as future claims and causes of -action), in the Work (i) in all territories worldwide, (ii) for the maximum -duration provided by applicable law or treaty (including future time extensions), -(iii) in any current or future medium and for any number of copies, and (iv) -for any purpose whatsoever, including without limitation commercial, advertising -or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the -benefit of each member of the public at large and to the detriment of Affirmer's -heirs and successors, fully intending that such Waiver shall not be subject -to revocation, rescission, cancellation, termination, or any other legal or +2. Waiver. To the greatest extent permitted by, but not in contravention +of, applicable law, Affirmer hereby overtly, fully, permanently, +irrevocably and unconditionally waives, abandons, and surrenders all of +Affirmer's Copyright and Related Rights and associated claims and causes +of action, whether now known or unknown (including existing as well as +future claims and causes of action), in the Work (i) in all territories +worldwide, (ii) for the maximum duration provided by applicable law or +treaty (including future time extensions), (iii) in any current or future +medium and for any number of copies, and (iv) for any purpose whatsoever, +including without limitation commercial, advertising or promotional +purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each +member of the public at large and to the detriment of Affirmer's heirs and +successors, fully intending that such Waiver shall not be subject to +revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. -3. Public License Fallback. Should any part of the Waiver for any reason be -judged legally invalid or ineffective under applicable law, then the Waiver -shall be preserved to the maximum extent permitted taking into account Affirmer's -express Statement of Purpose. In addition, to the extent the Waiver is so -judged Affirmer hereby grants to each affected person a royalty-free, non -transferable, non sublicensable, non exclusive, irrevocable and unconditional -license to exercise Affirmer's Copyright and Related Rights in the Work (i) -in all territories worldwide, (ii) for the maximum duration provided by applicable -law or treaty (including future time extensions), (iii) in any current or -future medium and for any number of copies, and (iv) for any purpose whatsoever, -including without limitation commercial, advertising or promotional purposes -(the "License"). The License shall be deemed effective as of the date CC0 -was applied by Affirmer to the Work. Should any part of the License for any +3. Public License Fallback. Should any part of the Waiver for any reason +be judged legally invalid or ineffective under applicable law, then the +Waiver shall be preserved to the maximum extent permitted taking into +account Affirmer's express Statement of Purpose. In addition, to the +extent the Waiver is so judged Affirmer hereby grants to each affected +person a royalty-free, non transferable, non sublicensable, non exclusive, +irrevocable and unconditional license to exercise Affirmer's Copyright and +Related Rights in the Work (i) in all territories worldwide, (ii) for the +maximum duration provided by applicable law or treaty (including future +time extensions), (iii) in any current or future medium and for any number +of copies, and (iv) for any purpose whatsoever, including without +limitation commercial, advertising or promotional purposes (the +"License"). The License shall be deemed effective as of the date CC0 was +applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such -partial invalidity or ineffectiveness shall not invalidate the remainder of -the License, and in such case Affirmer hereby affirms that he or she will -not (i) exercise any of his or her remaining Copyright and Related Rights -in the Work or (ii) assert any associated claims and causes of action with -respect to the Work, in either case contrary to Affirmer's express Statement -of Purpose. +partial invalidity or ineffectiveness shall not invalidate the remainder +of the License, and in such case Affirmer hereby affirms that he or she +will not (i) exercise any of his or her remaining Copyright and Related +Rights in the Work or (ii) assert any associated claims and causes of +action with respect to the Work, in either case contrary to Affirmer's +express Statement of Purpose. - 4. Limitations and Disclaimers. +4. Limitations and Disclaimers. -a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, -licensed or otherwise affected by this document. - -b. Affirmer offers the Work as-is and makes no representations or warranties -of any kind concerning the Work, express, implied, statutory or otherwise, -including without limitation warranties of title, merchantability, fitness -for a particular purpose, non infringement, or the absence of latent or other -defects, accuracy, or the present or absence of errors, whether or not discoverable, -all to the greatest extent permissible under applicable law. - -c. Affirmer disclaims responsibility for clearing rights of other persons -that may apply to the Work or any use thereof, including without limitation -any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims -responsibility for obtaining any necessary consents, permissions or other -rights required for any use of the Work. - -d. Affirmer understands and acknowledges that Creative Commons is not a party -to this document and has no duty or obligation with respect to this CC0 or -use of the Work. + a. No trademark or patent rights held by Affirmer are waived, abandoned, + surrendered, licensed or otherwise affected by this document. + b. Affirmer offers the Work as-is and makes no representations or + warranties of any kind concerning the Work, express, implied, + statutory or otherwise, including without limitation warranties of + title, merchantability, fitness for a particular purpose, non + infringement, or the absence of latent or other defects, accuracy, or + the present or absence of errors, whether or not discoverable, all to + the greatest extent permissible under applicable law. + c. Affirmer disclaims responsibility for clearing rights of other persons + that may apply to the Work or any use thereof, including without + limitation any person's Copyright and Related Rights in the Work. + Further, Affirmer disclaims responsibility for obtaining any necessary + consents, permissions or other rights required for any use of the + Work. + d. Affirmer understands and acknowledges that Creative Commons is not a + party to this document and has no duty or obligation with respect to + this CC0 or use of the Work. diff --git a/options/license/CDDL-1.0 b/options/license/CDDL-1.0 index 4070a7867..2a5d7f18f 100644 --- a/options/license/CDDL-1.0 +++ b/options/license/CDDL-1.0 @@ -1,310 +1,119 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) - Version 1.0 - 1. Definitions. +1. Definitions. -1.1. "Contributor" means each individual or entity that creates or contributes -to the creation of Modifications. +1.1. “Contributor” means each individual or entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Software, -prior Modifications used by a Contributor (if any), and the Modifications -made by that particular Contributor. +1.2. “Contributor Version” means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. -1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, -or (c) the combination of files containing Original Software with files containing -Modifications, in each case including portions thereof. +1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. -1.4. "Executable" means the Covered Software in any form other than Source -Code. +1.4. “Executable” means the Covered Software in any form other than Source Code. -1.5. "Initial Developer" means the individual or entity that first makes Original -Software available under this License. +1.5. “Initial Developer” means the individual or entity that first makes Original Software available under this License. -1.6. "Larger Work" means a work which combines Covered Software or portions -thereof with code not governed by the terms of this License. +1.6. “Larger Work” means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. - 1.7. "License" means this document. +1.7. “License” means this document. -1.8. "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. +1.8. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9. "Modifications" means the Source Code and Executable form of any of the -following: +1.9. “Modifications” means the Source Code and Executable form of any of the following: -A. Any file that results from an addition to, deletion from or modification -of the contents of a file containing Original Software or previous Modifications; + A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; -B. Any new file that contains any part of the Original Software or previous -Modification; or + B. Any new file that contains any part of the Original Software or previous Modification; or -C. Any new file that is contributed or otherwise made available under the -terms of this License. + C. Any new file that is contributed or otherwise made available under the terms of this License. -1.10. "Original Software" means the Source Code and Executable form of computer -software code that is originally released under this License. +1.10. “Original Software” means the Source Code and Executable form of computer software code that is originally released under this License. -1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by grantor. +1.11. “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.12. "Source Code" means (a) the common form of computer software code in -which modifications are made and (b) associated documentation included in -or with such code. +1.12. “Source Code” means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. -1.13. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity which controls, is controlled by, or is under common -control with You. For purposes of this definition, "control" means (a) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (b) ownership of more than fifty percent -(50%) of the outstanding shares or beneficial ownership of such entity. +1.13. “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, “You” includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - 2. License Grants. +2. License Grants. - 2.1. The Initial Developer Grant. +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: -Conditioned upon Your compliance with Section 3.1 below and subject to third -party intellectual property claims, the Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license: + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer, to use, reproduce, modify, display, perform, sublicense -and distribute the Original Software (or portions thereof), with or without -Modifications, and/or as part of a Larger Work; and + (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). -(b) under Patent Claims infringed by the making, using or selling of Original -Software, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Software (or portions thereof). + (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. -(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date -Initial Developer first distributes or otherwise makes the Original Software -available to a third party under the terms of this License. + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) -for code that You delete from the Original Software, or (2) for infringements -caused by: (i) the modification of the Original Software, or (ii) the combination -of the Original Software with other software or devices. +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: - 2.2. Contributor Grant. + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and -Conditioned upon Your compliance with Section 3.1 below and subject to third -party intellectual property claims, each Contributor hereby grants You a world-wide, -royalty-free, non-exclusive license: + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof), -either on an unmodified basis, with other Modifications, as Covered Software -and/or as part of a Larger Work; and + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: (1) Modifications made by that Contributor -(or portions thereof); and (2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. -(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first distributes or otherwise makes the Modifications available -to a third party. +3. Distribution Obligations. -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) -for any code that Contributor has deleted from the Contributor Version; (2) -for infringements caused by: (i) third party modifications of Contributor -Version, or (ii) the combination of Modifications made by that Contributor -with other software (except as part of the Contributor Version) or other devices; -or (3) under Patent Claims infringed by Covered Software in the absence of -Modifications made by that Contributor. +3.1. Availability of Source Code. +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. - 3. Distribution Obligations. +3.2. Modifications. +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. - 3.1. Availability of Source Code. +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. -Any Covered Software that You distribute or otherwise make available in Executable -form must also be made available in Source Code form and that Source Code -form must be distributed only under the terms of this License. You must include -a copy of this License with every copy of the Source Code form of the Covered -Software You distribute or otherwise make available. You must inform recipients -of any such Covered Software in Executable form as to how they can obtain -such Covered Software in Source Code form in a reasonable manner on or through -a medium customarily used for software exchange. +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients’ rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. - 3.2. Modifications. +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient’s rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. -The Modifications that You create or to which You contribute are governed -by the terms of this License. You represent that You believe Your Modifications -are Your original creation(s) and/or You have sufficient rights to grant the -rights conveyed by this License. +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. - 3.3. Required Notices. +4. Versions of the License. -You must include a notice in each of Your Modifications that identifies You -as the Contributor of the Modification. You may not remove or alter any copyright, -patent or trademark notices contained within the Covered Software, or any -notices of licensing or any descriptive text giving attribution to any Contributor -or the Initial Developer. +4.1. New Versions. +Sun Microsystems, Inc. is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. - 3.4. Application of Additional Terms. +4.2. Effect of New Versions. +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. -You may not offer or impose any terms on any Covered Software in Source Code -form that alters or restricts the applicable version of this License or the -recipients' rights hereunder. You may choose to offer, and to charge a fee -for, warranty, support, indemnity or liability obligations to one or more -recipients of Covered Software. However, you may do so only on Your own behalf, -and not on behalf of the Initial Developer or any Contributor. You must make -it absolutely clear that any such warranty, support, indemnity or liability -obligation is offered by You alone, and You hereby agree to indemnify the -Initial Developer and every Contributor for any liability incurred by the -Initial Developer or such Contributor as a result of warranty, support, indemnity -or liability terms You offer. +4.3. Modified Versions. +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. - 3.5. Distribution of Executable Versions. +5. DISCLAIMER OF WARRANTY. -You may distribute the Executable form of the Covered Software under the terms -of this License or under the terms of a license of Your choice, which may -contain terms different from this License, provided that You are in compliance -with the terms of this License and that the license for the Executable form -does not attempt to limit or alter the recipient's rights in the Source Code -form from the rights set forth in this License. If You distribute the Covered -Software in Executable form under a different license, You must make it absolutely -clear that any terms which differ from this License are offered by You alone, -not by the Initial Developer or Contributor. You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of any such terms You -offer. +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - 3.6. Larger Works. +6. TERMINATION. -You may create a Larger Work by combining Covered Software with other code -not governed by the terms of this License and distribute the Larger Work as -a single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Software. +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - 4. Versions of the License. +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as “Participant”) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. - 4.1. New Versions. +6.3. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. -Sun Microsystems, Inc. is the initial license steward and may publish revised -and/or new versions of this License from time to time. Each version will be -given a distinguishing version number. Except as provided in Section 4.3, -no one other than the license steward has the right to modify this License. +7. LIMITATION OF LIABILITY. - 4.2. Effect of New Versions. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -You may always continue to use, distribute or otherwise make the Covered Software -available under the terms of the version of the License under which You originally -received the Covered Software. If the Initial Developer includes a notice -in the Original Software prohibiting it from being distributed or otherwise -made available under any subsequent version of the License, You must distribute -and make the Covered Software available under the terms of the version of -the License under which You originally received the Covered Software. Otherwise, -You may also choose to use, distribute or otherwise make the Covered Software -available under the terms of any subsequent version of the License published -by the license steward. +8. U.S. GOVERNMENT END USERS. - 4.3. Modified Versions. +The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. -When You are an Initial Developer and You want to create a new license for -Your Original Software, You may create and use a modified version of this -License if You: (a) rename the license and remove any references to the name -of the license steward (except to note that the license differs from this -License); and (b) otherwise make it clear that the license contains terms -which differ from this License. +9. MISCELLANEOUS. - 5. DISCLAIMER OF WARRANTY. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction’s conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys’ fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT -FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE -PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER -CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. -THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. -NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +10. RESPONSIBILITY FOR CLAIMS. - 6. TERMINATION. - -6.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. Provisions which, by their nature, -must remain in effect beyond the termination of this License shall survive. - -6.2. If You assert a patent infringement claim (excluding declaratory judgment -actions) against Initial Developer or a Contributor (the Initial Developer -or Contributor against whom You assert such claim is referred to as "Participant") -alleging that the Participant Software (meaning the Contributor Version where -the Participant is a Contributor or the Original Software where the Participant -is the Initial Developer) directly or indirectly infringes any patent, then -any and all rights granted directly or indirectly to You by such Participant, -the Initial Developer (if the Initial Developer is not the Participant) and -all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon -60 days notice from Participant terminate prospectively and automatically -at the expiration of such 60 day notice period, unless if within such 60 day -period You withdraw Your claim with respect to the Participant Software against -such Participant either unilaterally or pursuant to a written agreement with -Participant. - -6.3. In the event of termination under Sections 6.1 or 6.2 above, all end -user licenses that have been validly granted by You or any distributor hereunder -prior to termination (excluding licenses granted to You by any distributor) -shall survive termination. - - 7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER -OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE -OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF -SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS -LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL -INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION -MAY NOT APPLY TO YOU. - - 8. U.S. GOVERNMENT END USERS. - -The Covered Software is a "commercial item," as that term is defined in 48 -C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as -that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and "commercial computer -software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. -1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 -(June 1995), all U.S. Government End Users acquire Covered Software with only -those rights set forth herein. This U.S. Government Rights clause is in lieu -of, and supersedes, any other FAR, DFAR, or other clause or provision that -addresses Government rights in computer software under this License. - - 9. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by the law of the jurisdiction specified in a notice -contained within the Original Software (except to the extent applicable law, -if any, provides otherwise), excluding such jurisdiction's conflict-of-law -provisions. Any litigation relating to this License shall be subject to the -jurisdiction of the courts located in the jurisdiction and venue specified -in a notice contained within the Original Software, with the losing party -responsible for costs, including, without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. You agree that -You alone are responsible for compliance with the United States export administration -regulations (and the export control laws and regulation of any other countries) -when You use, distribute or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. diff --git a/options/license/CDDL-1.1 b/options/license/CDDL-1.1 index f55f2c89d..f5479ec40 100644 --- a/options/license/CDDL-1.1 +++ b/options/license/CDDL-1.1 @@ -1,326 +1,123 @@ COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) - Version 1.1 - 1. Definitions. +1. Definitions. -1.1. "Contributor" means each individual or entity that creates or contributes -to the creation of Modifications. +1.1. “Contributor” means each individual or entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Software, -prior Modifications used by a Contributor (if any), and the Modifications -made by that particular Contributor. +1.2. “Contributor Version” means the combination of the Original Software, prior Modifications used by a Contributor (if any), and the Modifications made by that particular Contributor. -1.3. "Covered Software" means (a) the Original Software, or (b) Modifications, -or (c) the combination of files containing Original Software with files containing -Modifications, in each case including portions thereof. +1.3. “Covered Software” means (a) the Original Software, or (b) Modifications, or (c) the combination of files containing Original Software with files containing Modifications, in each case including portions thereof. -1.4. "Executable" means the Covered Software in any form other than Source -Code. +1.4. “Executable” means the Covered Software in any form other than Source Code. -1.5. "Initial Developer" means the individual or entity that first makes Original -Software available under this License. +1.5. “Initial Developer” means the individual or entity that first makes Original Software available under this License. -1.6. "Larger Work" means a work which combines Covered Software or portions -thereof with code not governed by the terms of this License. +1.6. “Larger Work” means a work which combines Covered Software or portions thereof with code not governed by the terms of this License. - 1.7. "License" means this document. +1.7. “License” means this document. -1.8. "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. +1.8. “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9. "Modifications" means the Source Code and Executable form of any of the -following: +1.9. “Modifications” means the Source Code and Executable form of any of the following: -A. Any file that results from an addition to, deletion from or modification -of the contents of a file containing Original Software or previous Modifications; + A. Any file that results from an addition to, deletion from or modification of the contents of a file containing Original Software or previous Modifications; -B. Any new file that contains any part of the Original Software or previous -Modification; or + B. Any new file that contains any part of the Original Software or previous Modification; or -C. Any new file that is contributed or otherwise made available under the -terms of this License. + C. Any new file that is contributed or otherwise made available under the terms of this License. -1.10. "Original Software" means the Source Code and Executable form of computer -software code that is originally released under this License. +1.10. “Original Software” means the Source Code and Executable form of computer software code that is originally released under this License. -1.11. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by grantor. +1.11. “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.12. "Source Code" means (a) the common form of computer software code in -which modifications are made and (b) associated documentation included in -or with such code. +1.12. “Source Code” means (a) the common form of computer software code in which modifications are made and (b) associated documentation included in or with such code. -1.13. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity which controls, is controlled by, or is under common -control with You. For purposes of this definition, "control" means (a) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (b) ownership of more than fifty percent -(50%) of the outstanding shares or beneficial ownership of such entity. +1.13. “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, “You” includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - 2. License Grants. +2. License Grants. - 2.1. The Initial Developer Grant. +2.1. The Initial Developer Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, the Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license: -Conditioned upon Your compliance with Section 3.1 below and subject to third -party intellectual property claims, the Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer, to use, reproduce, modify, display, perform, sublicense -and distribute the Original Software (or portions thereof), with or without -Modifications, and/or as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using or selling of Original -Software, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Software (or portions thereof). - -(c) The licenses granted in Sections 2.1(a) and (b) are effective on the date -Initial Developer first distributes or otherwise makes the Original Software -available to a third party under the terms of this License. - -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) -for code that You delete from the Original Software, or (2) for infringements -caused by: (i) the modification of the Original Software, or (ii) the combination -of the Original Software with other software or devices. - - 2.2. Contributor Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to third -party intellectual property claims, each Contributor hereby grants You a world-wide, -royalty-free, non-exclusive license: + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer, to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof), with or without Modifications, and/or as part of a Larger Work; and -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof), -either on an unmodified basis, with other Modifications, as Covered Software -and/or as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: (1) Modifications made by that Contributor -(or portions thereof); and (2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). - -(c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first distributes or otherwise makes the Modifications available -to a third party. - -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) -for any code that Contributor has deleted from the Contributor Version; (2) -for infringements caused by: (i) third party modifications of Contributor -Version, or (ii) the combination of Modifications made by that Contributor -with other software (except as part of the Contributor Version) or other devices; -or (3) under Patent Claims infringed by Covered Software in the absence of -Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Availability of Source Code. - -Any Covered Software that You distribute or otherwise make available in Executable -form must also be made available in Source Code form and that Source Code -form must be distributed only under the terms of this License. You must include -a copy of this License with every copy of the Source Code form of the Covered -Software You distribute or otherwise make available. You must inform recipients -of any such Covered Software in Executable form as to how they can obtain -such Covered Software in Source Code form in a reasonable manner on or through -a medium customarily used for software exchange. - - 3.2. Modifications. - -The Modifications that You create or to which You contribute are governed -by the terms of this License. You represent that You believe Your Modifications -are Your original creation(s) and/or You have sufficient rights to grant the -rights conveyed by this License. - - 3.3. Required Notices. - -You must include a notice in each of Your Modifications that identifies You -as the Contributor of the Modification. You may not remove or alter any copyright, -patent or trademark notices contained within the Covered Software, or any -notices of licensing or any descriptive text giving attribution to any Contributor -or the Initial Developer. - - 3.4. Application of Additional Terms. - -You may not offer or impose any terms on any Covered Software in Source Code -form that alters or restricts the applicable version of this License or the -recipients' rights hereunder. You may choose to offer, and to charge a fee -for, warranty, support, indemnity or liability obligations to one or more -recipients of Covered Software. However, you may do so only on Your own behalf, -and not on behalf of the Initial Developer or any Contributor. You must make -it absolutely clear that any such warranty, support, indemnity or liability -obligation is offered by You alone, and You hereby agree to indemnify the -Initial Developer and every Contributor for any liability incurred by the -Initial Developer or such Contributor as a result of warranty, support, indemnity -or liability terms You offer. - - 3.5. Distribution of Executable Versions. - -You may distribute the Executable form of the Covered Software under the terms -of this License or under the terms of a license of Your choice, which may -contain terms different from this License, provided that You are in compliance -with the terms of this License and that the license for the Executable form -does not attempt to limit or alter the recipient's rights in the Source Code -form from the rights set forth in this License. If You distribute the Covered -Software in Executable form under a different license, You must make it absolutely -clear that any terms which differ from this License are offered by You alone, -not by the Initial Developer or Contributor. You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of any such terms You -offer. - - 3.6. Larger Works. - -You may create a Larger Work by combining Covered Software with other code -not governed by the terms of this License and distribute the Larger Work as -a single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Software. - - 4. Versions of the License. - - 4.1. New Versions. - -Oracle is the initial license steward and may publish revised and/or new versions -of this License from time to time. Each version will be given a distinguishing -version number. Except as provided in Section 4.3, no one other than the license -steward has the right to modify this License. - - 4.2. Effect of New Versions. - -You may always continue to use, distribute or otherwise make the Covered Software -available under the terms of the version of the License under which You originally -received the Covered Software. If the Initial Developer includes a notice -in the Original Software prohibiting it from being distributed or otherwise -made available under any subsequent version of the License, You must distribute -and make the Covered Software available under the terms of the version of -the License under which You originally received the Covered Software. Otherwise, -You may also choose to use, distribute or otherwise make the Covered Software -available under the terms of any subsequent version of the License published -by the license steward. - - 4.3. Modified Versions. - -When You are an Initial Developer and You want to create a new license for -Your Original Software, You may create and use a modified version of this -License if You: (a) rename the license and remove any references to the name -of the license steward (except to note that the license differs from this -License); and (b) otherwise make it clear that the license contains terms -which differ from this License. - - 5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT -FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE -PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER -CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. -THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. -NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 6. TERMINATION. - -6.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. Provisions which, by their nature, -must remain in effect beyond the termination of this License shall survive. - -6.2. If You assert a patent infringement claim (excluding declaratory judgment -actions) against Initial Developer or a Contributor (the Initial Developer -or Contributor against whom You assert such claim is referred to as "Participant") -alleging that the Participant Software (meaning the Contributor Version where -the Participant is a Contributor or the Original Software where the Participant -is the Initial Developer) directly or indirectly infringes any patent, then -any and all rights granted directly or indirectly to You by such Participant, -the Initial Developer (if the Initial Developer is not the Participant) and -all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon -60 days notice from Participant terminate prospectively and automatically -at the expiration of such 60 day notice period, unless if within such 60 day -period You withdraw Your claim with respect to the Participant Software against -such Participant either unilaterally or pursuant to a written agreement with -Participant. - -6.3. If You assert a patent infringement claim against Participant alleging -that the Participant Software directly or indirectly infringes any patent -where such claim is resolved (such as by license or settlement) prior to the -initiation of patent infringement litigation, then the reasonable value of -the licenses granted by such Participant under Sections 2.1 or 2.2 shall be -taken into account in determining the amount or value of any payment or license. - -6.4. In the event of termination under Sections 6.1 or 6.2 above, all end -user licenses that have been validly granted by You or any distributor hereunder -prior to termination (excluding licenses granted to You by any distributor) -shall survive termination. - - 7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER -OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, -OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL -HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING -FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 8. U.S. GOVERNMENT END USERS. - -The Covered Software is a "commercial item," as that term is defined in 48 -C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" (as -that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and "commercial computer -software documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. -1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 -(June 1995), all U.S. Government End Users acquire Covered Software with only -those rights set forth herein. This U.S. Government Rights clause is in lieu -of, and supersedes, any other FAR, DFAR, or other clause or provision that -addresses Government rights in computer software under this License. - - 9. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by the law of the jurisdiction specified in a notice -contained within the Original Software (except to the extent applicable law, -if any, provides otherwise), excluding such jurisdiction's conflict-of-law -provisions. Any litigation relating to this License shall be subject to the -jurisdiction of the courts located in the jurisdiction and venue specified -in a notice contained within the Original Software, with the losing party -responsible for costs, including, without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. You agree that -You alone are responsible for compliance with the United States export administration -regulations (and the export control laws and regulation of any other countries) -when You use, distribute or otherwise make available any Covered Software. - - 10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - -NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE -(CDDL) - -The code released under the CDDL shall be governed by the laws of the State -of California (excluding conflict-of-law provisions). Any litigation relating -to this License shall be subject to the jurisdiction of the Federal Courts -of the Northern District of California and the state courts of the State of -California, with venue lying in Santa Clara County, California. + (b) under Patent Claims infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). + + (c) The licenses granted in Sections 2.1(a) and (b) are effective on the date Initial Developer first distributes or otherwise makes the Original Software available to a third party under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: (1) for code that You delete from the Original Software, or (2) for infringements caused by: (i) the modification of the Original Software, or (ii) the combination of the Original Software with other software or devices. + +2.2. Contributor Grant. +Conditioned upon Your compliance with Section 3.1 below and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: + + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof), either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (1) Modifications made by that Contributor (or portions thereof); and (2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + + (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first distributes or otherwise makes the Modifications available to a third party. + + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: (1) for any code that Contributor has deleted from the Contributor Version; (2) for infringements caused by: (i) third party modifications of Contributor Version, or (ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or (3) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Availability of Source Code. +Any Covered Software that You distribute or otherwise make available in Executable form must also be made available in Source Code form and that Source Code form must be distributed only under the terms of this License. You must include a copy of this License with every copy of the Source Code form of the Covered Software You distribute or otherwise make available. You must inform recipients of any such Covered Software in Executable form as to how they can obtain such Covered Software in Source Code form in a reasonable manner on or through a medium customarily used for software exchange. + +3.2. Modifications. +The Modifications that You create or to which You contribute are governed by the terms of this License. You represent that You believe Your Modifications are Your original creation(s) and/or You have sufficient rights to grant the rights conveyed by this License. + +3.3. Required Notices. +You must include a notice in each of Your Modifications that identifies You as the Contributor of the Modification. You may not remove or alter any copyright, patent or trademark notices contained within the Covered Software, or any notices of licensing or any descriptive text giving attribution to any Contributor or the Initial Developer. + +3.4. Application of Additional Terms. +You may not offer or impose any terms on any Covered Software in Source Code form that alters or restricts the applicable version of this License or the recipients' rights hereunder. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, you may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.5. Distribution of Executable Versions. +You may distribute the Executable form of the Covered Software under the terms of this License or under the terms of a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable form does not attempt to limit or alter the recipient's rights in the Source Code form from the rights set forth in this License. If You distribute the Covered Software in Executable form under a different license, You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.6. Larger Works. +You may create a Larger Work by combining Covered Software with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. + +4. Versions of the License. + +4.1. New Versions. +Oracle is the initial license steward and may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Except as provided in Section 4.3, no one other than the license steward has the right to modify this License. + +4.2. Effect of New Versions. +You may always continue to use, distribute or otherwise make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. If the Initial Developer includes a notice in the Original Software prohibiting it from being distributed or otherwise made available under any subsequent version of the License, You must distribute and make the Covered Software available under the terms of the version of the License under which You originally received the Covered Software. Otherwise, You may also choose to use, distribute or otherwise make the Covered Software available under the terms of any subsequent version of the License published by the license steward. + +4.3. Modified Versions. +When You are an Initial Developer and You want to create a new license for Your Original Software, You may create and use a modified version of this License if You: (a) rename the license and remove any references to the name of the license steward (except to note that the license differs from this License); and (b) otherwise make it clear that the license contains terms which differ from this License. + +5. DISCLAIMER OF WARRANTY. +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +6. TERMINATION. + +6.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +6.2. If You assert a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You assert such claim is referred to as “Participant”) alleging that the Participant Software (meaning the Contributor Version where the Participant is a Contributor or the Original Software where the Participant is the Initial Developer) directly or indirectly infringes any patent, then any and all rights granted directly or indirectly to You by such Participant, the Initial Developer (if the Initial Developer is not the Participant) and all Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively and automatically at the expiration of such 60 day notice period, unless if within such 60 day period You withdraw Your claim with respect to the Participant Software against such Participant either unilaterally or pursuant to a written agreement with Participant. + +6.3. If You assert a patent infringement claim against Participant alleging that the Participant Software directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + +6.4. In the event of termination under Sections 6.1 or 6.2 above, all end user licenses that have been validly granted by You or any distributor hereunder prior to termination (excluding licenses granted to You by any distributor) shall survive termination. + +7. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +8. U.S. GOVERNMENT END USERS. + +The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” (as that term is defined at 48 C.F.R. § 252.227-7014(a)(1)) and “commercial computer software documentation” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. This U.S. Government Rights clause is in lieu of, and supersedes, any other FAR, DFAR, or other clause or provision that addresses Government rights in computer software under this License. + +9. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by the law of the jurisdiction specified in a notice contained within the Original Software (except to the extent applicable law, if any, provides otherwise), excluding such jurisdiction's conflict-of-law provisions. Any litigation relating to this License shall be subject to the jurisdiction of the courts located in the jurisdiction and venue specified in a notice contained within the Original Software, with the losing party responsible for costs, including, without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. You agree that You alone are responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries) when You use, distribute or otherwise make available any Covered Software. + +10. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) +The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California. diff --git a/options/license/CDL-1.0 b/options/license/CDL-1.0 new file mode 100644 index 000000000..e2990cde2 --- /dev/null +++ b/options/license/CDL-1.0 @@ -0,0 +1,53 @@ +Common Documentation License + +Version 1.0 - February 16, 2001 + +Copyright © 2001 Apple Computer, Inc. + +Permission is granted to copy and distribute verbatim copies of this License, but changing or adding to it in any way is not permitted. + +Please read this License carefully before downloading or using this material. By downloading or using this material, you are agreeing to be bound by the terms of this License. If you do not or cannot agree to the terms of this License, please do not download or use this material. + +0. Preamble. The Common Documentation License (CDL) provides a very simple and consistent license that allows relatively unrestricted use and redistribution of documents while still maintaining the author's credit and intent. To preserve simplicity, the License does not specify in detail how (e.g. font size) or where (e.g. title page, etc.) the author should be credited. To preserve consistency, changes to the CDL are not allowed and all derivatives of CDL documents are required to remain under the CDL. Together, these constraints enable third parties to easily and safely reuse CDL documents, making the CDL ideal for authors who desire a wide distribution of their work. However, this means the CDL does not allow authors to restrict precisely how their work is used or represented, making it inappropriate for those desiring more finely-grained control. + +1. General; Definitions. This License applies to any documentation, manual or other work that contains a notice placed by the Copyright Holder stating that it is subject to the terms of this Common Documentation License version 1.0 (or subsequent version thereof) ("License"). As used in this License: + +1.1 "Copyright Holder" means the original author(s) of the Document or other owner(s) of the copyright in the Document. + +1.2 "Document(s)" means any documentation, manual or other work that has been identified as being subject to the terms of this License. + +1.3 "Derivative Work" means a work which is based upon a pre-existing Document, such as a revision, modification, translation, abridgment, condensation, expansion, or any other form in which such pre-existing Document may be recast, transformed, or adapted. + +1.4 "You" or "Your" means an individual or a legal entity exercising rights under this License. + +2. Basic License. Subject to all the terms and conditions of this License, You may use, copy, modify, publicly display, distribute and publish the Document and your Derivative Works thereof, in any medium physical or electronic, commercially or non-commercially; provided that: (a) all copyright notices in the Document are preserved; (b) a copy of this License, or an incorporation of it by reference in proper form as indicated in Exhibit A below, is included in a conspicuous location in all copies such that it would be reasonably viewed by the recipient of the Document; and (c) You add no other terms or conditions to those of this License. + +3. Derivative Works. All Derivative Works are subject to the terms of this License. You may copy and distribute a Derivative Work of the Document under the conditions of Section 2 above, provided that You release the Derivative Work under the exact, verbatim terms of this License (i.e., the Derivative Work is licensed as a "Document" under the terms of this License). In addition, Derivative Works of Documents must meet the following requirements: + + (a) All copyright and license notices in the original Document must be preserved. + + (b) An appropriate copyright notice for your Derivative Work must be added adjacent to the other copyright notices. + + (c) A statement briefly summarizing how your Derivative Work is different from the original Document must be included in the same place as your copyright notice. + + (d) If it is not reasonably evident to a recipient of your Derivative Work that the Derivative Work is subject to the terms of this License, a statement indicating such fact must be included in the same place as your copyright notice. + +4. Compilation with Independent Works. You may compile or combine a Document or its Derivative Works with other separate and independent documents or works to create a compilation work ("Compilation"). If included in a Compilation, the Document or Derivative Work thereof must still be provided under the terms of this License, and the Compilation shall contain (a) a notice specifying the inclusion of the Document and/or Derivative Work and the fact that it is subject to the terms of this License, and (b) either a copy of the License or an incorporation by reference in proper form (as indicated in Exhibit A). Mere aggregation of a Document or Derivative Work with other documents or works on the same storage or distribution medium (e.g. a CD-ROM) will not cause this License to apply to those other works. + +5. NO WARRANTY. THE DOCUMENT IS PROVIDED 'AS IS' BASIS, WITHOUT WARRANTY OF ANY KIND, AND THE COPYRIGHT HOLDER EXPRESSLY DISCLAIMS ALL WARRANTIES AND/OR CONDITIONS WITH RESPECT TO THE DOCUMENT, EITHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND OF NONINFRINGEMENT OF THIRD PARTY RIGHTS. + +6. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE, REPRODUCTION, MODIFICATION, DISTRIBUTION AND/OR PUBLICATION OF THE DOCUMENT, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. + +7. Trademarks. This License does not grant any rights to use any names, trademarks, service marks or logos of the Copyright Holder (collectively "Marks") and no such Marks may be used to endorse or promote works or products derived from the Document without the prior written permission of the Copyright Holder. + +8. Versions of the License. Apple Computer, Inc. ("Apple") may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once a Document has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Document under the terms of any subsequent version of this License published by Apple. No one other than Apple has the right to modify the terms applicable to Documents created under this License. + +9. Termination. This License and the rights granted hereunder will terminate automatically if You fail to comply with any of its terms. Upon termination, You must immediately stop any further reproduction, modification, public display, distr ibution and publication of the Document and Derivative Works. However, all sublicenses to the Document and Derivative Works which have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nat ure, must remain in effect beyond the termination of this License shall survive, including but not limited to Sections 5, 6, 7, 9 and 10. + +10. Waiver; Severability; Governing Law. Failure by the Copyright Holder to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. + +EXHIBIT A + +The proper form for an incorporation of this License by reference is as follows: + +"Copyright (c) [year] by [Copyright Holder's name]. This material has been released under and is subject to the terms of the Common Documentation License, v.1.0, the terms of which are hereby incorporated by reference. Please obtain a copy of the License at http://www.opensource.apple.com/cdl/ and read it before using this material. Your use of this material signifies your agreement to the terms of the License." diff --git a/options/license/CDLA-Permissive-1.0 b/options/license/CDLA-Permissive-1.0 index 5715eadee..28249cf1f 100644 --- a/options/license/CDLA-Permissive-1.0 +++ b/options/license/CDLA-Permissive-1.0 @@ -1,195 +1,85 @@ -Community Data License Agreement - Permissive - Version 1.0 +Community Data License Agreement – Permissive – Version 1.0 -This is the Community Data License Agreement - Permissive, Version 1.0 ("Agreement"). -Data is provided to You under this Agreement by each of the Data Providers. -Your exercise of any of the rights and permissions granted below constitutes -Your acceptance and agreement to be bound by the terms and conditions of this -Agreement. +This is the Community Data License Agreement – Permissive, Version 1.0 (“Agreement”). Data is provided to You under this Agreement by each of the Data Providers. Your exercise of any of the rights and permissions granted below constitutes Your acceptance and agreement to be bound by the terms and conditions of this Agreement. -The benefits that each Data Provider receives from making Data available and -that You receive from Data or otherwise under these terms and conditions shall -be deemed sufficient consideration for the formation of this Agreement. Accordingly, -Data Provider(s) and You (the "Parties") agree as follows: +The benefits that each Data Provider receives from making Data available and that You receive from Data or otherwise under these terms and conditions shall be deemed sufficient consideration for the formation of this Agreement. Accordingly, Data Provider(s) and You (the “Parties”) agree as follows: - Section 1. Definitions +Section 1. Definitions -1.1 "Add" means to supplement Data with Your own or someone else's Data, resulting -in Your "Additions." Additions do not include Results. +1.1 “Add” means to supplement Data with Your own or someone else’s Data, resulting in Your “Additions.” Additions do not include Results. -1.2 "Computational Use" means Your analysis (through the use of computational -devices or otherwise) or other interpretation of Data. By way of example and -not limitation, "Computational Use" includes the application of any computational -analytical technique, the purpose of which is the analysis of any Data in -digital form to generate information about Data such as patterns, trends, -correlations, inferences, insights and attributes. +1.2 “Computational Use” means Your analysis (through the use of computational devices or otherwise) or other interpretation of Data. By way of example and not limitation, “Computational Use” includes the application of any computational analytical technique, the purpose of which is the analysis of any Data in digital form to generate information about Data such as patterns, trends, correlations, inferences, insights and attributes. -1.3 "Data" means the information (including copyrightable information, such -as images or text), collectively or individually, whether created or gathered -by a Data Provider or an Entity acting on its behalf, to which rights are -granted under this Agreement. +1.3 “Data” means the information (including copyrightable information, such as images or text), collectively or individually, whether created or gathered by a Data Provider or an Entity acting on its behalf, to which rights are granted under this Agreement. -1.4 "Data Provider" means any Entity (including any employee or contractor -of such Entity authorized to Publish Data on behalf of such Entity) that Publishes -Data under this Agreement prior to Your Receiving it. +1.4 “Data Provider” means any Entity (including any employee or contractor of such Entity authorized to Publish Data on behalf of such Entity) that Publishes Data under this Agreement prior to Your Receiving it. -1.5 "Enhanced Data" means the subset of Data that You Publish and that is -composed of (a) Your Additions and/or (b) Modifications to Data You have received -under this Agreement. +1.5 “Enhanced Data” means the subset of Data that You Publish and that is composed of (a) Your Additions and/or (b) Modifications to Data You have received under this Agreement. -1.6 "Entity" means any natural person or organization that exists under the -laws of the jurisdiction in which it is organized, together with all other -entities that control, are controlled by, or are under common control with -that entity. For the purposes of this definition, "control" means (a) the -power, directly or indirectly, to cause the direction or management of such -entity, whether by contract or otherwise, (b) the ownership of more than fifty -percent (50%) of the outstanding shares or securities, (c) the beneficial -ownership of such entity or, (d) the ability to appoint, whether by agreement -or right, the majority of directors of an Entity. +1.6 “Entity” means any natural person or organization that exists under the laws of the jurisdiction in which it is organized, together with all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means (a) the power, directly or indirectly, to cause the direction or management of such entity, whether by contract or otherwise, (b) the ownership of more than fifty percent (50%) of the outstanding shares or securities, (c) the beneficial ownership of such entity or, (d) the ability to appoint, whether by agreement or right, the majority of directors of an Entity. -1.7 "Modify" means to delete, erase, correct or re-arrange Data, resulting -in "Modifications." Modifications do not include Results. +1.7 “Modify” means to delete, erase, correct or re-arrange Data, resulting in “Modifications.” Modifications do not include Results. -1.8 "Publish" means to make all or a subset of Data (including Your Enhanced -Data) available in any manner which enables its Use, including by providing -a copy on physical media or remote access. For any form of Entity, that is -to make the Data available to any individual who is not employed by that Entity -or engaged as a contractor or agent to perform work on that Entity's behalf. -A "Publication" occurs each time You Publish Data. +1.8 “Publish” means to make all or a subset of Data (including Your Enhanced Data) available in any manner which enables its Use, including by providing a copy on physical media or remote access. For any form of Entity, that is to make the Data available to any individual who is not employed by that Entity or engaged as a contractor or agent to perform work on that Entity’s behalf. A “Publication” occurs each time You Publish Data. -1.9 "Receive" or "Receives" means to have been given access to Data, locally -or remotely. +1.9 “Receive” or “Receives” means to have been given access to Data, locally or remotely. -1.10 "Results" means the outcomes or outputs that You obtain from Your Computational -Use of Data. Results shall not include more than a de minimis portion of the -Data on which the Computational Use is based. +1.10 “Results” means the outcomes or outputs that You obtain from Your Computational Use of Data. Results shall not include more than a de minimis portion of the Data on which the Computational Use is based. -1.11 "Sui Generis Database Rights" means rights, other than copyright, resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other equivalent rights anywhere in the world. +1.11 “Sui Generis Database Rights” means rights, other than copyright, resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other equivalent rights anywhere in the world. -1.12 "Use" means using Data (including accessing, copying, studying, reviewing, -adapting, analyzing, evaluating, or making Computational Use of it), either -by machines or humans, or a combination of both. +1.12 “Use” means using Data (including accessing, copying, studying, reviewing, adapting, analyzing, evaluating, or making Computational Use of it), either by machines or humans, or a combination of both. -1.13 "You" or "Your" means any Entity that Receives Data under this Agreement. +1.13 “You” or “Your” means any Entity that Receives Data under this Agreement. - Section 2. Right and License to Use and to Publish +Section 2. Right and License to Use and to Publish -2.1 Subject to the conditions set forth in Section 3 of this Agreement, Data -Provider(s) hereby grant(s) to You a worldwide, non-exclusive, irrevocable -(except as provided in Section 5) right to: (a) Use Data; and (b) Publish -Data. +2.1 Subject to the conditions set forth in Section 3 of this Agreement, Data Provider(s) hereby grant(s) to You a worldwide, non-exclusive, irrevocable (except as provided in Section 5) right to: (a) Use Data; and (b) Publish Data. -2.2 To the extent that the Data or the coordination, selection or arrangement -of Data is protected or protectable under copyright, Sui Generis Database -Rights, or other law, Data Provider(s) further agree(s) that such Data or -coordination, selection or arrangement is hereby licensed to You and to anyone -else who Receives Data under this Agreement for Use and Publication, subject -to the conditions set forth in Section 3 of this Agreement. +2.2 To the extent that the Data or the coordination, selection or arrangement of Data is protected or protectable under copyright, Sui Generis Database Rights, or other law, Data Provider(s) further agree(s) that such Data or coordination, selection or arrangement is hereby licensed to You and to anyone else who Receives Data under this Agreement for Use and Publication, subject to the conditions set forth in Section 3 of this Agreement. -2.3 Except for these rights and licenses expressly granted, no other intellectual -property rights are granted or should be implied. +2.3 Except for these rights and licenses expressly granted, no other intellectual property rights are granted or should be implied. - Section 3. Conditions on Rights Granted +Section 3. Conditions on Rights Granted - 3.1 If You Publish Data You Receive or Enhanced Data: +3.1 If You Publish Data You Receive or Enhanced Data: -(a) You may do so under a license of Your choice provided that You give anyone -who Receives the Data from You the text of this Agreement, the name of this -Agreement and/or a hyperlink or other method reasonably likely to provide -a copy of the text of this Agreement; and +(a) You may do so under a license of Your choice provided that You give anyone who Receives the Data from You the text of this Agreement, the name of this Agreement and/or a hyperlink or other method reasonably likely to provide a copy of the text of this Agreement; and -(b) You must cause any Data files containing Enhanced Data to carry prominent -notices that You have changed those files; and +(b) You must cause any Data files containing Enhanced Data to carry prominent notices that You have changed those files; and -(c) If You Publish Data You Receive, You must preserve all credit or attribution -to the Data Provider(s). Such retained credit or attribution includes any -of the following to the extent they exist in Data as You have Received it: -legal notices or metadata; identification of the Data Provider(s); or hyperlinks -to Data to the extent it is practical to do so. +(c) If You Publish Data You Receive, You must preserve all credit or attribution to the Data Provider(s). Such retained credit or attribution includes any of the following to the extent they exist in Data as You have Received it: legal notices or metadata; identification of the Data Provider(s); or hyperlinks to Data to the extent it is practical to do so. -3.2 You may provide additional or different license terms and conditions for -use, reproduction, or distribution of that Enhanced Data, or for any combination -of Data and Enhanced Data as a whole, provided that Your Use and Publication -of that combined Data otherwise complies with the conditions stated in this -License. +3.2 You may provide additional or different license terms and conditions for use, reproduction, or distribution of that Enhanced Data, or for any combination of Data and Enhanced Data as a whole, provided that Your Use and Publication of that combined Data otherwise complies with the conditions stated in this License. -3.3 You and each Data Provider agree that Enhanced Data shall not be considered -a work of joint authorship by virtue of its relationship to Data licensed -under this Agreement and shall not require either any obligation of accounting -to or the consent of any Data Provider. +3.3 You and each Data Provider agree that Enhanced Data shall not be considered a work of joint authorship by virtue of its relationship to Data licensed under this Agreement and shall not require either any obligation of accounting to or the consent of any Data Provider. -3.4 This Agreement imposes no obligations or restrictions on Your Use or Publication -of Results. +3.4 This Agreement imposes no obligations or restrictions on Your Use or Publication of Results. - Section 4. Data Provider(s)' Representations +Section 4. Data Provider(s)’ Representations -4.1 Each Data Provider represents that the Data Provider has exercised reasonable -care, to assure that: (a) the Data it Publishes was created or generated by -it or was obtained from others with the right to Publish the Data under this -Agreement; and (b) Publication of such Data does not violate any privacy or -confidentiality obligation undertaken by the Data Provider. +4.1 Each Data Provider represents that the Data Provider has exercised reasonable care, to assure that: (a) the Data it Publishes was created or generated by it or was obtained from others with the right to Publish the Data under this Agreement; and (b) Publication of such Data does not violate any privacy or confidentiality obligation undertaken by the Data Provider. - Section 5. Termination +Section 5. Termination -5.1 All of Your rights under this Agreement will terminate, and Your right -to Receive, Use or Publish the Data will be revoked or modified if You materially -fail to comply with the terms and conditions of this Agreement and You do -not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If Your rights under this Agreement terminate, You -agree to cease Receipt, Use and Publication of Data. However, Your obligations -and any rights and permissions granted by You under this Agreement relating -to Data that You Published prior to such termination will continue and survive. +5.1 All of Your rights under this Agreement will terminate, and Your right to Receive, Use or Publish the Data will be revoked or modified if You materially fail to comply with the terms and conditions of this Agreement and You do not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If Your rights under this Agreement terminate, You agree to cease Receipt, Use and Publication of Data. However, Your obligations and any rights and permissions granted by You under this Agreement relating to Data that You Published prior to such termination will continue and survive. -5.2 If You institute litigation against a Data Provider or anyone else who -Receives the Data (including a cross-claim in a lawsuit) based on the Data, -other than a claim asserting breach of this Agreement, then any rights previously -granted to You to Receive, Use and Publish Data under this Agreement will -terminate as of the date such litigation is filed. +5.2 If You institute litigation against a Data Provider or anyone else who Receives the Data (including a cross-claim in a lawsuit) based on the Data, other than a claim asserting breach of this Agreement, then any rights previously granted to You to Receive, Use and Publish Data under this Agreement will terminate as of the date such litigation is filed. - Section 6. Disclaimer of Warranties and Limitation of Liability +Section 6. Disclaimer of Warranties and Limitation of Liability -6.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE DATA (INCLUDING ENHANCED -DATA) IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES -OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A -PARTICULAR PURPOSE. +6.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE DATA (INCLUDING ENHANCED DATA) IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -6.2 NEITHER YOU NOR ANY DATA PROVIDERS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE DATA OR THE EXERCISE -OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. +6.2 NEITHER YOU NOR ANY DATA PROVIDERS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE DATA OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - Section 7. Miscellaneous +Section 7. Miscellaneous -7.1 You agree that it is solely Your responsibility to comply with all applicable -laws with regard to Your Use or Publication of Data, including any applicable -privacy, data protection, security and export laws. You agree to take reasonable -steps to assist a Data Provider fulfilling responsibilities to comply with -applicable laws with regard to Use or Publication of Data Received hereunder. +7.1 You agree that it is solely Your responsibility to comply with all applicable laws with regard to Your Use or Publication of Data, including any applicable privacy, data protection, security and export laws. You agree to take reasonable steps to assist a Data Provider fulfilling responsibilities to comply with applicable laws with regard to Use or Publication of Data Received hereunder. -7.2 You and Data Provider(s), collectively and individually, waive and/or -agree not to assert, to the extent permitted by law, any moral rights You -or they hold in Data. +7.2 You and Data Provider(s), collectively and individually, waive and/or agree not to assert, to the extent permitted by law, any moral rights You or they hold in Data. -7.3 This Agreement confers no rights or remedies upon any person or entity -other than the Parties and their respective heirs, executors, successors and -assigns. +7.3 This Agreement confers no rights or remedies upon any person or entity other than the Parties and their respective heirs, executors, successors and assigns. -7.4 The Data Provider(s) reserve no right or expectation of privacy, data -protection or confidentiality in any Data that they Publish under this Agreement. -If You choose to Publish Data under this Agreement, You similarly do so with -no reservation or expectation of any rights of privacy or confidentiality -in that Data. +7.4 The Data Provider(s) reserve no right or expectation of privacy, data protection or confidentiality in any Data that they Publish under this Agreement. If You choose to Publish Data under this Agreement, You similarly do so with no reservation or expectation of any rights of privacy or confidentiality in that Data. -7.5 The Community Data License Agreement workgroup under The Linux Foundation -is the steward of this Agreement ("Steward"). No one other than the Steward -has the right to modify or publish new versions of this Agreement. Each version -will be given a distinguishing version number. You may Use and Publish Data -Received hereunder under the terms of the version of the Agreement under which -You originally Received the Data, or under the terms of any subsequent version -published by the Steward. +7.5 The Community Data License Agreement workgroup under The Linux Foundation is the steward of this Agreement (“Steward”). No one other than the Steward has the right to modify or publish new versions of this Agreement. Each version will be given a distinguishing version number. You may Use and Publish Data Received hereunder under the terms of the version of the Agreement under which You originally Received the Data, or under the terms of any subsequent version published by the Steward. diff --git a/options/license/CDLA-Permissive-2.0 b/options/license/CDLA-Permissive-2.0 new file mode 100644 index 000000000..cc0f954b5 --- /dev/null +++ b/options/license/CDLA-Permissive-2.0 @@ -0,0 +1,35 @@ +Community Data License Agreement - Permissive - Version 2.0 + +This is the Community Data License Agreement - Permissive, Version 2.0 (the "agreement"). Data Provider(s) and Data Recipient(s) agree as follows: + +1. Provision of the Data + +1.1. A Data Recipient may use, modify, and share the Data made available by Data Provider(s) under this agreement if that Data Recipient follows the terms of this agreement. + +1.2. This agreement does not impose any restriction on a Data Recipient's use, modification, or sharing of any portions of the Data that are in the public domain or that may be used, modified, or shared under any other legal exception or limitation. + +2. Conditions for Sharing Data + +2.1. A Data Recipient may share Data, with or without modifications, so long as the Data Recipient makes available the text of this agreement with the shared Data. + +3. No Restrictions on Results + +3.1. This agreement does not impose any restriction or obligations with respect to the use, modification, or sharing of Results. + +4. No Warranty; Limitation of Liability + +4.1. All Data Recipients receive the Data subject to the following terms: + +THE DATA IS PROVIDED ON AN "AS IS" BASIS, WITHOUT REPRESENTATIONS, WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +NO DATA PROVIDER SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE DATA OR RESULTS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +5. Definitions + +5.1. "Data" means the material received by a Data Recipient under this agreement. + +5.2. "Data Provider" means any person who is the source of Data provided under this agreement and in reliance on a Data Recipient's agreement to its terms. + +5.3. "Data Recipient" means any person who receives Data directly or indirectly from a Data Provider and agrees to the terms of this agreement. + +5.4. "Results" means any outcome obtained by computational analysis of Data, including for example machine learning models and models' insights. diff --git a/options/license/CDLA-Sharing-1.0 b/options/license/CDLA-Sharing-1.0 index cb6365728..dba8e2576 100644 --- a/options/license/CDLA-Sharing-1.0 +++ b/options/license/CDLA-Sharing-1.0 @@ -1,208 +1,89 @@ -Community Data License Agreement - Sharing - Version 1.0 +Community Data License Agreement – Sharing – Version 1.0 -This is the Community Data License Agreement - Sharing, Version 1.0 ("Agreement"). -Data is provided to You under this Agreement by each of the Data Providers. -Your exercise of any of the rights and permissions granted below constitutes -Your acceptance and agreement to be bound by the terms and conditions of this -Agreement. +This is the Community Data License Agreement – Sharing, Version 1.0 (“Agreement”). Data is provided to You under this Agreement by each of the Data Providers. Your exercise of any of the rights and permissions granted below constitutes Your acceptance and agreement to be bound by the terms and conditions of this Agreement. -The benefits that each Data Provider receives from making Data available and -that You receive from Data or otherwise under these terms and conditions shall -be deemed sufficient consideration for the formation of this Agreement. Accordingly, -Data Provider(s) and You (the "Parties") agree as follows: +The benefits that each Data Provider receives from making Data available and that You receive from Data or otherwise under these terms and conditions shall be deemed sufficient consideration for the formation of this Agreement. Accordingly, Data Provider(s) and You (the “Parties”) agree as follows: - Section 1. Definitions +Section 1. Definitions -1.1 "Add" means to supplement Data with Your own or someone else's Data, resulting -in Your "Additions." Additions do not include Results. +1.1 “Add” means to supplement Data with Your own or someone else’s Data, resulting in Your “Additions.” Additions do not include Results. -1.2 "Computational Use" means Your analysis (through the use of computational -devices or otherwise) or other interpretation of Data. By way of example and -not limitation, "Computational Use" includes the application of any computational -analytical technique, the purpose of which is the analysis of any Data in -digital form to generate information about Data such as patterns, trends, -correlations, inferences, insights and attributes. +1.2 “Computational Use” means Your analysis (through the use of computational devices or otherwise) or other interpretation of Data. By way of example and not limitation, “Computational Use” includes the application of any computational analytical technique, the purpose of which is the analysis of any Data in digital form to generate information about Data such as patterns, trends, correlations, inferences, insights and attributes. -1.3 "Data" means the information (including copyrightable information, such -as images or text), collectively or individually, whether created or gathered -by a Data Provider or an Entity acting on its behalf, to which rights are -granted under this Agreement. +1.3 “Data” means the information (including copyrightable information, such as images or text), collectively or individually, whether created or gathered by a Data Provider or an Entity acting on its behalf, to which rights are granted under this Agreement. -1.4 "Data Provider" means any Entity (including any employee or contractor -of such Entity authorized to Publish Data on behalf of such Entity) that Publishes -Data under this Agreement prior to Your Receiving it. +1.4 “Data Provider” means any Entity (including any employee or contractor of such Entity authorized to Publish Data on behalf of such Entity) that Publishes Data under this Agreement prior to Your Receiving it. -1.5 "Enhanced Data" means the subset of Data that You Publish and that is -composed of (a) Your Additions and/or (b) Modifications to Data You have received -under this Agreement. +1.5 “Enhanced Data” means the subset of Data that You Publish and that is composed of (a) Your Additions and/or (b) Modifications to Data You have received under this Agreement. -1.6 "Entity" means any natural person or organization that exists under the -laws of the jurisdiction in which it is organized, together with all other -entities that control, are controlled by, or are under common control with -that entity. For the purposes of this definition, "control" means (a) the -power, directly or indirectly, to cause the direction or management of such -entity, whether by contract or otherwise, (b) the ownership of more than fifty -percent (50%) of the outstanding shares or securities, (c) the beneficial -ownership of such entity or, (d) the ability to appoint, whether by agreement -or right, the majority of directors of an Entity. +1.6 “Entity” means any natural person or organization that exists under the laws of the jurisdiction in which it is organized, together with all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means (a) the power, directly or indirectly, to cause the direction or management of such entity, whether by contract or otherwise, (b) the ownership of more than fifty percent (50%) of the outstanding shares or securities, (c) the beneficial ownership of such entity or, (d) the ability to appoint, whether by agreement or right, the majority of directors of an Entity. -1.7 "Ledger" means a digital record of Data or grants of rights in Data governed -by this Agreement, using any technology having functionality to record and -store Data or grants, contributions, or licenses to Data governed by this -Agreement. +1.7 “Ledger” means a digital record of Data or grants of rights in Data governed by this Agreement, using any technology having functionality to record and store Data or grants, contributions, or licenses to Data governed by this Agreement. -1.8 "Modify" means to delete, erase, correct or re-arrange Data, resulting -in "Modifications." Modifications do not include Results. +1.8 “Modify” means to delete, erase, correct or re-arrange Data, resulting in “Modifications.” Modifications do not include Results. -1.9 "Publish" means to make all or a subset of Data (including Your Enhanced -Data) available in any manner which enables its Use, including by providing -a copy on physical media or remote access. For any form of Entity, that is -to make the Data available to any individual who is not employed by that Entity -or engaged as a contractor or agent to perform work on that Entity's behalf. -A "Publication" occurs each time You Publish Data. +1.9 “Publish” means to make all or a subset of Data (including Your Enhanced Data) available in any manner which enables its Use, including by providing a copy on physical media or remote access. For any form of Entity, that is to make the Data available to any individual who is not employed by that Entity or engaged as a contractor or agent to perform work on that Entity’s behalf. A “Publication” occurs each time You Publish Data. -1.10 "Receive" or "Receives" means to have been given access to Data, locally -or remotely. +1.10 “Receive” or “Receives” means to have been given access to Data, locally or remotely. -1.11 "Results" means the outcomes or outputs that You obtain from Your Computational -Use of Data. Results shall not include more than a de minimis portion of the -Data on which the Computational Use is based. +1.11 “Results” means the outcomes or outputs that You obtain from Your Computational Use of Data. Results shall not include more than a de minimis portion of the Data on which the Computational Use is based. -1.12 "Sui Generis Database Rights" means rights, other than copyright, resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other equivalent rights anywhere in the world. +1.12 “Sui Generis Database Rights” means rights, other than copyright, resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other equivalent rights anywhere in the world. -1.13 "Use" means using Data (including accessing, copying, studying, reviewing, -adapting, analyzing, evaluating, or making Computational Use of it), either -by machines or humans, or a combination of both. +1.13 “Use” means using Data (including accessing, copying, studying, reviewing, adapting, analyzing, evaluating, or making Computational Use of it), either by machines or humans, or a combination of both. -1.14 "You" or "Your" means any Entity that Receives Data under this Agreement. +1.14 “You” or “Your” means any Entity that Receives Data under this Agreement. - Section 2. Right and License to Use and to Publish +Section 2. Right and License to Use and to Publish -2.1 Subject to the conditions set forth in Section 3 of this Agreement, Data -Provider(s) hereby grant(s) to You a worldwide, non-exclusive, irrevocable -(except as provided in Section 5) right to: (a) Use Data; and (b) Publish -Data. +2.1 Subject to the conditions set forth in Section 3 of this Agreement, Data Provider(s) hereby grant(s) to You a worldwide, non-exclusive, irrevocable (except as provided in Section 5) right to: (a) Use Data; and (b) Publish Data. -2.2 To the extent that the Data or the coordination, selection or arrangement -of Data is protected or protectable under copyright, Sui Generis Database -Rights, or other law, Data Provider(s) further agree(s) that such Data or -coordination, selection or arrangement is hereby licensed to You and to anyone -else who Receives Data under this Agreement for Use and Publication, subject -to the conditions set forth in Section 3 of this Agreement. +2.2 To the extent that the Data or the coordination, selection or arrangement of Data is protected or protectable under copyright, Sui Generis Database Rights, or other law, Data Provider(s) further agree(s) that such Data or coordination, selection or arrangement is hereby licensed to You and to anyone else who Receives Data under this Agreement for Use and Publication, subject to the conditions set forth in Section 3 of this Agreement. -2.3 Except for these rights and licenses expressly granted, no other intellectual -property rights are granted or should be implied. +2.3 Except for these rights and licenses expressly granted, no other intellectual property rights are granted or should be implied. - Section 3. Conditions on Rights Granted +Section 3. Conditions on Rights Granted - 3.1 If You Publish Data You Receive or Enhanced Data: +3.1 If You Publish Data You Receive or Enhanced Data: -(a) The Data (including the Enhanced Data) must be Published under this Agreement -in accordance with this Section 3; and +(a) The Data (including the Enhanced Data) must be Published under this Agreement in accordance with this Section 3; and -(b) You must cause any Data files containing Enhanced Data to carry prominent -notices that You have changed those files; and +(b) You must cause any Data files containing Enhanced Data to carry prominent notices that You have changed those files; and -(c) If You Publish Data You Receive, You must preserve all credit or attribution -to the Data Provider(s). Such retained credit or attribution includes any -of the following to the extent they exist in Data as You have Received it: -legal notices or metadata; identification of the Data Provider(s); or hyperlinks -to Data to the extent it is practical to do so. +(c) If You Publish Data You Receive, You must preserve all credit or attribution to the Data Provider(s). Such retained credit or attribution includes any of the following to the extent they exist in Data as You have Received it: legal notices or metadata; identification of the Data Provider(s); or hyperlinks to Data to the extent it is practical to do so. -3.2 You may not restrict or deter the ability of anyone who Receives the Data -(a) to Publish the Data in a publicly-accessible manner or (b) if the project -has designated a Ledger for recording Data or grants of rights in Data for -purposes of this Agreement, to record the Data or grants of rights in Data -in the Ledger. +3.2 You may not restrict or deter the ability of anyone who Receives the Data (a) to Publish the Data in a publicly-accessible manner or (b) if the project has designated a Ledger for recording Data or grants of rights in Data for purposes of this Agreement, to record the Data or grants of rights in Data in the Ledger. -3.3 If You Publish Data You Receive, You must do so under an unmodified form -of this Agreement and include the text of this Agreement, the name of this -Agreement and/or a hyperlink or other method reasonably likely to provide -a copy of the text of this Agreement. You may not modify this Agreement or -impose any further restrictions on the exercise of the rights granted under -this Agreement, including by adding any restriction on commercial or non-commercial -Use of Data (including Your Enhanced Data) or by limiting permitted Use of -such Data to any particular platform, technology or field of endeavor. Notices -that purport to modify this Agreement shall be of no effect. +3.3 If You Publish Data You Receive, You must do so under an unmodified form of this Agreement and include the text of this Agreement, the name of this Agreement and/or a hyperlink or other method reasonably likely to provide a copy of the text of this Agreement. You may not modify this Agreement or impose any further restrictions on the exercise of the rights granted under this Agreement, including by adding any restriction on commercial or non-commercial Use of Data (including Your Enhanced Data) or by limiting permitted Use of such Data to any particular platform, technology or field of endeavor. Notices that purport to modify this Agreement shall be of no effect. -3.4 You and each Data Provider agree that Enhanced Data shall not be considered -a work of joint authorship by virtue of its relationship to Data licensed -under this Agreement and shall not require either any obligation of accounting -to or the consent of any Data Provider. +3.4 You and each Data Provider agree that Enhanced Data shall not be considered a work of joint authorship by virtue of its relationship to Data licensed under this Agreement and shall not require either any obligation of accounting to or the consent of any Data Provider. -3.5 This Agreement imposes no obligations or restrictions on Your Use or Publication -of Results. +3.5 This Agreement imposes no obligations or restrictions on Your Use or Publication of Results. - Section 4. Data Provider(s)' Representations +Section 4. Data Provider(s)’ Representations -4.1 Each Data Provider represents that the Data Provider has exercised reasonable -care, to assure that: (a) the Data it Publishes was created or generated by -it or was obtained from others with the right to Publish the Data under this -Agreement; and (b) Publication of such Data does not violate any privacy or -confidentiality obligation undertaken by the Data Provider. +4.1 Each Data Provider represents that the Data Provider has exercised reasonable care, to assure that: (a) the Data it Publishes was created or generated by it or was obtained from others with the right to Publish the Data under this Agreement; and (b) Publication of such Data does not violate any privacy or confidentiality obligation undertaken by the Data Provider. - Section 5. Termination +Section 5. Termination -5.1 All of Your rights under this Agreement will terminate, and Your right -to Receive, Use or Publish the Data will be revoked or modified if You materially -fail to comply with the terms and conditions of this Agreement and You do -not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If Your rights under this Agreement terminate, You -agree to cease Receipt, Use and Publication of Data. However, Your obligations -and any rights and permissions granted by You under this Agreement relating -to Data that You Published prior to such termination will continue and survive. +5.1 All of Your rights under this Agreement will terminate, and Your right to Receive, Use or Publish the Data will be revoked or modified if You materially fail to comply with the terms and conditions of this Agreement and You do not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If Your rights under this Agreement terminate, You agree to cease Receipt, Use and Publication of Data. However, Your obligations and any rights and permissions granted by You under this Agreement relating to Data that You Published prior to such termination will continue and survive. -5.2 If You institute litigation against a Data Provider or anyone else who -Receives the Data (including a cross-claim in a lawsuit) based on the Data, -other than a claim asserting breach of this Agreement, then any rights previously -granted to You to Receive, Use and Publish Data under this Agreement will -terminate as of the date such litigation is filed. +5.2 If You institute litigation against a Data Provider or anyone else who Receives the Data (including a cross-claim in a lawsuit) based on the Data, other than a claim asserting breach of this Agreement, then any rights previously granted to You to Receive, Use and Publish Data under this Agreement will terminate as of the date such litigation is filed. - Section 6. Disclaimer of Warranties and Limitation of Liability +Section 6. Disclaimer of Warranties and Limitation of Liability -6.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE DATA (INCLUDING ENHANCED -DATA) IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF -ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES -OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A -PARTICULAR PURPOSE. +6.1 EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE DATA (INCLUDING ENHANCED DATA) IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -6.2 NEITHER YOU NOR ANY DATA PROVIDERS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE DATA OR THE EXERCISE -OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. +6.2 NEITHER YOU NOR ANY DATA PROVIDERS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE DATA OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - Section 7. Miscellaneous +Section 7. Miscellaneous -7.1 You agree that it is solely Your responsibility to comply with all applicable -laws with regard to Your Use or Publication of Data, including any applicable -privacy, data protection, security and export laws. You agree to take reasonable -steps to assist a Data Provider fulfilling responsibilities to comply with -applicable laws with regard to Use or Publication of Data Received hereunder. +7.1 You agree that it is solely Your responsibility to comply with all applicable laws with regard to Your Use or Publication of Data, including any applicable privacy, data protection, security and export laws. You agree to take reasonable steps to assist a Data Provider fulfilling responsibilities to comply with applicable laws with regard to Use or Publication of Data Received hereunder. -7.2 You and Data Provider(s), collectively and individually, waive and/or -agree not to assert, to the extent permitted by law, any moral rights You -or they hold in Data. +7.2 You and Data Provider(s), collectively and individually, waive and/or agree not to assert, to the extent permitted by law, any moral rights You or they hold in Data. -7.3 This Agreement confers no rights or remedies upon any person or entity -other than the Parties and their respective heirs, executors, successors and -assigns. +7.3 This Agreement confers no rights or remedies upon any person or entity other than the Parties and their respective heirs, executors, successors and assigns. -7.4 The Data Provider(s) reserve no right or expectation of privacy, data -protection or confidentiality in any Data that they Publish under this Agreement. -If You choose to Publish Data under this Agreement, You similarly do so with -no reservation or expectation of any rights of privacy or confidentiality -in that Data. +7.4 The Data Provider(s) reserve no right or expectation of privacy, data protection or confidentiality in any Data that they Publish under this Agreement. If You choose to Publish Data under this Agreement, You similarly do so with no reservation or expectation of any rights of privacy or confidentiality in that Data. -7.5 The Community Data License Agreement workgroup under The Linux Foundation -is the steward of this Agreement ("Steward"). No one other than the Steward -has the right to modify or publish new versions of this Agreement. Each version -will be given a distinguishing version number. You may Use and Publish Data -Received hereunder under the terms of the version of the Agreement under which -You originally Received the Data, or under the terms of any subsequent version -published by the Steward. +7.5 The Community Data License Agreement workgroup under The Linux Foundation is the steward of this Agreement (“Steward”). No one other than the Steward has the right to modify or publish new versions of this Agreement. Each version will be given a distinguishing version number. You may Use and Publish Data Received hereunder under the terms of the version of the Agreement under which You originally Received the Data, or under the terms of any subsequent version published by the Steward. diff --git a/options/license/CECILL-1.0 b/options/license/CECILL-1.0 index 4e05e283f..f8df71773 100644 --- a/options/license/CECILL-1.0 +++ b/options/license/CECILL-1.0 @@ -1,451 +1,216 @@ -CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL Avertissement +CONTRAT DE LICENCE DE LOGICIEL LIBRE CeCILL -Ce contrat est une licence de logiciel libre issue d'une concertation entre -ses auteurs afin que le respect de deux grands principes préside à sa rédaction: +Avertissement -• d'une part, sa conformité au droit français, tant au regard du droit de -la responsabilité civile que du droit de la propriété intellectuelle et de -la protection qu'il offre aux auteurs et titulaires des droits patrimoniaux -sur un logiciel. - -• d'autre part, le respect des principes de diffusion des logiciels libres: -accès au code source, droits étendus conférés aux utilisateurs. +Ce contrat est une licence de logiciel libre issue d’une concertation entre ses auteurs afin que le respect de deux grands principes préside à sa rédaction: + • d’une part, sa conformité au droit français, tant au regard du droit de la responsabilité civile que du droit de la propriété intellectuelle et de la protection qu’il offre aux auteurs et titulaires des droits patrimoniaux sur un logiciel. + • d’autre part, le respect des principes de diffusion des logiciels libres: accès au code source, droits étendus conférés aux utilisateurs. Les auteurs de la licence CeCILL1 sont: -Commissariat à l'Energie Atomique – CEA, établissement public de caractère -scientifique technique et industriel, dont le siège est situé 31-33 rue de -la Fédération, 75752 PARIS cedex 15. +Commissariat à l’Energie Atomique – CEA, établissement public de caractère scientifique technique et industriel, dont le siège est situé 31-33 rue de la Fédération, 75752 PARIS cedex 15. -Centre National de la Recherche Scientifique – CNRS, établissement public -à caractère scientifique et technologique, dont le siège est situé 3 rue Michel-Ange -75794 Paris cedex 16. +Centre National de la Recherche Scientifique – CNRS, établissement public à caractère scientifique et technologique, dont le siège est situé 3 rue Michel-Ange 75794 Paris cedex 16. -Institut National de Recherche en Informatique et en Automatique – INRIA, -établissement public à caractère scientifique et technologique, dont le siège -est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay cedex. +Institut National de Recherche en Informatique et en Automatique – INRIA, établissement public à caractère scientifique et technologique, dont le siège est situé Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay cedex. PREAMBULE -Ce contrat est une licence de logiciel libre dont l'objectif est de conférer -aux utilisateurs la liberté de modification et de redistribution du logiciel -régi par cette licence dans le cadre d'un modèle de diffusion «open source». +Ce contrat est une licence de logiciel libre dont l'objectif est de conférer aux utilisateurs la liberté de modification et de redistribution du logiciel régi par cette licence dans le cadre d'un modèle de diffusion «open source». -L'exercice de ces libertés est assorti de certains devoirs à la charge des -utilisateurs afin de préserver ce statut au cours des redistributions ultérieures. +L'exercice de ces libertés est assorti de certains devoirs à la charge des utilisateurs afin de préserver ce statut au cours des redistributions ultérieures. -L'accessibilité au code source et les droits de copie, de modification et -de redistribution qui en découlent ont pour contrepartie de n'offrir aux utilisateurs -qu'une garantie limitée et de ne faire peser sur l'auteur du logiciel, le -titulaire des droits patrimoniaux et les concédants successifs qu'une responsabilité -restreinte. +L’accessibilité au code source et les droits de copie, de modification et de redistribution qui en découlent ont pour contrepartie de n’offrir aux utilisateurs qu’une garantie limitée et de ne faire peser sur l’auteur du logiciel, le titulaire des droits patrimoniaux et les concédants successifs qu’une responsabilité restreinte. -A cet égard l'attention de l'utilisateur est attirée sur les risques associés -au chargement, à l'utilisation, à la modification et/ou au développement et -à la reproduction du logiciel par l'utilisateur étant donné sa spécificité -de logiciel libre, qui peut le rendre complexe à manipuler et qui le réserve -donc à des développeurs et des professionnels avertis possédant des connaissances -informatiques approfondies. Les utilisateurs sont donc invités à charger et -tester l'adéquation du Logiciel à leurs besoins dans des conditions permettant -d'assurer la sécurité de leurs systèmes et ou de leurs données et, plus généralement, -à l'utiliser et l'exploiter dans les même conditions de sécurité. Ce contrat -peut être reproduit et diffusé librement, sous réserve de le conserver en -l'état, sans ajout ni suppression de clauses. +A cet égard l’attention de l’utilisateur est attirée sur les risques associés au chargement, à l’utilisation, à la modification et/ou au développement et à la reproduction du logiciel par l’utilisateur étant donné sa spécificité de logiciel libre, qui peut le rendre complexe à manipuler et qui le réserve donc à des développeurs et des professionnels avertis possédant des connaissances informatiques approfondies. Les utilisateurs sont donc invités à charger et tester l’adéquation du Logiciel à leurs besoins dans des conditions permettant d'assurer la sécurité de leurs systèmes et ou de leurs données et, plus généralement, à l'utiliser et l'exploiter dans les même conditions de sécurité. Ce contrat peut être reproduit et diffusé librement, sous réserve de le conserver en l’état, sans ajout ni suppression de clauses. -Ce contrat est susceptible de s'appliquer à tout logiciel dont le titulaire -des droits patrimoniaux décide de soumettre l'exploitation aux dispositions -qu'il contient. +Ce contrat est susceptible de s’appliquer à tout logiciel dont le titulaire des droits patrimoniaux décide de soumettre l’exploitation aux dispositions qu’il contient. Article 1er - DEFINITIONS -Dans ce contrat, les termes suivants, lorsqu'ils seront écrits avec une lettre -capitale, auront la signification suivante: +Dans ce contrat, les termes suivants, lorsqu’ils seront écrits avec une lettre capitale, auront la signification suivante: -Contrat: désigne le présent contrat de licence, ses éventuelles versions postérieures -et annexes. - -Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code Source -et le cas échéant sa documentation, dans leur état au moment de l'acceptation -du +Contrat: désigne le présent contrat de licence, ses éventuelles versions postérieures et annexes. +Logiciel: désigne le logiciel sous sa forme de Code Objet et/ou de Code Source et le cas échéant sa documentation, dans leur état au moment de l’acceptation du Contrat par le Licencié. -Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et de Code -Objet et le cas échéant sa documentation, dans leur état au moment de leur -première diffusion sous les termes du Contrat. +Logiciel Initial: désigne le Logiciel sous sa forme de Code Source et de Code Objet et le cas échéant sa documentation, dans leur état au moment de leur première diffusion sous les termes du Contrat. Logiciel Modifié: désigne le Logiciel modifié par au moins une Contribution. -Code Source: désigne l'ensemble des instructions et des lignes de programme -du Logiciel et auquel l'accès est nécessaire en vue de modifier le Logiciel. +Code Source: désigne l’ensemble des instructions et des lignes de programme du Logiciel et auquel l’accès est nécessaire en vue de modifier le Logiciel. -Code Objet: désigne les fichiers binaires issus de la compilation du Code -Source. +Code Objet: désigne les fichiers binaires issus de la compilation du Code Source. -Titulaire : désigne le détenteur des droits patrimoniaux d'auteur sur le Logiciel -Initial. +Titulaire : désigne le détenteur des droits patrimoniaux d’auteur sur le Logiciel Initial. -Licencié(s): désigne le ou les utilisateur(s) du Logiciel ayant accepté le -Contrat. +Licencié(s): désigne le ou les utilisateur(s) du Logiciel ayant accepté le Contrat. -Contributeur: désigne le Licencié auteur d'au moins une Contribution. +Contributeur: désigne le Licencié auteur d’au moins une Contribution. -Concédant: désigne le Titulaire ou toute personne physique ou morale distribuant -le Logiciel sous le Contrat. +Concédant: désigne le Titulaire ou toute personne physique ou morale distribuant le Logiciel sous le Contrat. -Contributions: désigne l'ensemble des modifications, corrections, traductions, -adaptations et/ou nouvelles fonctionnalités intégrées dans le Logiciel par -tout +Contributions: désigne l’ensemble des modifications, corrections, traductions, adaptations et/ou nouvelles fonctionnalités intégrées dans le Logiciel par tout Contributeur, ainsi que les Modules Statiques. -Module: désigne un ensemble de fichiers sources y compris leur documentation -qui, une fois compilé sous forme exécutable, permet de réaliser des fonctionnalités -ou - +Module: désigne un ensemble de fichiers sources y compris leur documentation qui, une fois compilé sous forme exécutable, permet de réaliser des fonctionnalités ou services supplémentaires à ceux fournis par le Logiciel. -Module Dynamique: désigne tout Module, créé par le Contributeur, indépendant -du Logiciel, tel que ce Module et le Logiciel sont sous forme de deux exécutables -indépendants qui s'exécutent dans un espace d'adressage indépendant, l'un -appelant l'autre au moment de leur exécution. +Module Dynamique: désigne tout Module, créé par le Contributeur, indépendant du Logiciel, tel que ce Module et le Logiciel sont sous forme de deux exécutables indépendants qui s’exécutent dans un espace d’adressage indépendant, l’un appelant l’autre au moment de leur exécution. -Module Statique: désigne tout Module créé par le Contributeur et lié au Logiciel -par un lien statique rendant leur code objet dépendant l'un de l'autre. Ce -Module et le Logiciel auquel il est lié, sont regroupés en un seul exécutable. +Module Statique: désigne tout Module créé par le Contributeur et lié au Logiciel par un lien statique rendant leur code objet dépendant l'un de l'autre. Ce Module et le Logiciel auquel il est lié, sont regroupés en un seul exécutable. Parties: désigne collectivement le Licencié et le Concédant. -Ces termes s'entendent au singulier comme au pluriel. +Ces termes s’entendent au singulier comme au pluriel. Article 2 - OBJET -Le Contrat a pour objet la concession par le Concédant au Licencié d'une Licence -non exclusive, transférable et mondiale du Logiciel telle que définie ci-après -à l'article 5 pour toute la durée de protection des droits portant sur ce -Logiciel. +Le Contrat a pour objet la concession par le Concédant au Licencié d’une Licence non exclusive, transférable et mondiale du Logiciel telle que définie ci-après à l'article 5 pour toute la durée de protection des droits portant sur ce Logiciel. Article 3 - ACCEPTATION -3.1. L'acceptation par le Licencié des termes du Contrat est réputée acquise -du fait du premier des faits suivants: +3.1. L’acceptation par le Licencié des termes du Contrat est réputée acquise du fait du premier des faits suivants: + • (i) le chargement du Logiciel par tout moyen notamment par téléchargement à partir d’un serveur distant ou par chargement à partir d’un support physique; + • (ii) le premier exercice par le Licencié de l’un quelconque des droits concédés par le Contrat. -• (i) le chargement du Logiciel par tout moyen notamment par téléchargement -à partir d'un serveur distant ou par chargement à partir d'un support physique; - -• (ii) le premier exercice par le Licencié de l'un quelconque des droits concédés -par le Contrat. - -3.2. Un exemplaire du Contrat, contenant notamment un avertissement relatif -aux spécificités du Logiciel, à la restriction de garantie et à la limitation -à un usage par des utilisateurs expérimentés a été mis à disposition du Licencié -préalablement à son acceptation telle que définie à l'article 3.1 ci dessus -et le Licencié reconnaît en avoir pris connaissances. +3.2. Un exemplaire du Contrat, contenant notamment un avertissement relatif aux spécificités du Logiciel, à la restriction de garantie et à la limitation à un usage par des utilisateurs expérimentés a été mis à disposition du Licencié préalablement à son acceptation telle que définie à l'article 3.1 ci dessus et le Licencié reconnaît en avoir pris connaissances. Article 4 - ENTREE EN VIGUEUR ET DUREE - 4.1. ENTREE EN VIGUEUR +4.1.ENTREE EN VIGUEUR -Le Contrat entre en vigueur à la date de son acceptation par le Licencié telle -que définie en 3.1. +Le Contrat entre en vigueur à la date de son acceptation par le Licencié telle que définie en 3.1. - 4.2. DUREE +4.2. DUREE -Le Contrat produira ses effets pendant toute la durée légale de protection -des droits patrimoniaux portant sur le Logiciel. +Le Contrat produira ses effets pendant toute la durée légale de protection des droits patrimoniaux portant sur le Logiciel. Article 5 - ETENDUE DES DROITS CONCEDES -Le Concédant concède au Licencié, qui accepte, les droits suivants sur le -Logiciel pour toutes destinations et pour la durée du Contrat dans les conditions -ci-après détaillées. - -Par ailleurs, le Concédant concède au Licencié à titre gracieux les droits -d'exploitation du ou des brevets qu'il détient sur tout ou partie des inventions +Le Concédant concède au Licencié, qui accepte, les droits suivants sur le Logiciel pour toutes destinations et pour la durée du Contrat dans les conditions ci-après détaillées. +Par ailleurs, le Concédant concède au Licencié à titre gracieux les droits d’exploitation du ou des brevets qu’il détient sur tout ou partie des inventions implémentées dans le Logiciel. - 5.1. DROITS D'UTILISATION +5.1. DROITS D’UTILISATION -Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant aux -domaines d'application, étant ci-après précisé que cela comporte: +Le Licencié est autorisé à utiliser le Logiciel, sans restriction quant aux domaines d’application, étant ci-après précisé que cela comporte: + 1. la reproduction permanente ou provisoire du Logiciel en tout ou partie par tout moyen et sous toute forme. + 2. le chargement, l’affichage, l’exécution, ou le stockage du Logiciel sur tout support. + 3. la possibilité d’en observer, d’en étudier, ou d’en tester le fonctionnement afin de déterminer les idées et principes qui sont à la base de n’importe quel élément de ce Logiciel; et ceci, lorsque le Licencié effectue toute opération de chargement, d’affichage, d’exécution, de transmission ou de stockage du Logiciel qu’il est en droit d’effectuer en vertu du Contrat. -1. la reproduction permanente ou provisoire du Logiciel en tout ou partie -par tout moyen et sous toute forme. +5.2. DROIT D’APPORTER DES CONTRIBUTIONS -2. le chargement, l'affichage, l'exécution, ou le stockage du Logiciel sur -tout support. +Le droit d’apporter des Contributions comporte le droit de traduire, d’adapter, d’arranger ou d’apporter toute autre modification du Logiciel et le droit de reproduire le Logiciel en résultant. -3. la possibilité d'en observer, d'en étudier, ou d'en tester le fonctionnement -afin de déterminer les idées et principes qui sont à la base de n'importe -quel élément de ce Logiciel; et ceci, lorsque le Licencié effectue toute opération -de chargement, d'affichage, d'exécution, de transmission ou de stockage du -Logiciel qu'il est en droit d'effectuer en vertu du Contrat. +Le Licencié est autorisé à apporter toute Contribution au Logiciel sous réserve de mentionner, de façon explicite, son nom en tant qu’auteur de cette Contribution et la date de création de celle-ci. - 5.2. DROIT D'APPORTER DES CONTRIBUTIONS +5.3. DROITS DE DISTRIBUTION ET DE DIFFUSION -Le droit d'apporter des Contributions comporte le droit de traduire, d'adapter, -d'arranger ou d'apporter toute autre modification du Logiciel et le droit -de reproduire le Logiciel en résultant. +Le droit de distribution et de diffusion comporte notamment le droit de transmettre et de communiquer le Logiciel au public sur tout support et par tout moyen ainsi que le droit de mettre sur le marché à titre onéreux ou gratuit, un ou des exemplaires du Logiciel par tout procédé. -Le Licencié est autorisé à apporter toute Contribution au Logiciel sous réserve -de mentionner, de façon explicite, son nom en tant qu'auteur de cette Contribution -et la date de création de celle-ci. +Le Licencié est autorisé à redistribuer des copies du Logiciel, modifié ou non, à des tiers dans les conditions ci-après détaillées. - 5.3. DROITS DE DISTRIBUTION ET DE DIFFUSION +5.3.1. REDISTRIBUTION DU LOGICIEL SANS MODIFICATION +Le Licencié est autorisé à redistribuer des copies conformes du Logiciel, sous forme de Code Source ou de Code Objet, à condition que cette redistribution respecte les dispositions du Contrat dans leur totalité et soit accompagnée: + 1. d’un exemplaire du Contrat, + 2. d’un avertissement relatif à la restriction de garantie et de responsabilité du Concédant telle que prévue aux articles 8 et 9, +et que, dans le cas où seul le Code Objet du Logiciel est redistribué, le Licencié permette aux futurs Licenciés d’accéder facilement au Code Source complet du Logiciel en indiquant les modalités d’accès, étant entendu que le coût additionnel d’acquisition du Code Source ne devra pas excéder le simple coût de transfert des données. -Le droit de distribution et de diffusion comporte notamment le droit de transmettre -et de communiquer le Logiciel au public sur tout support et par tout moyen -ainsi que le droit de mettre sur le marché à titre onéreux ou gratuit, un -ou des exemplaires du Logiciel par tout procédé. +5.3.2. REDISTRIBUTION DU LOGICIEL MODIFIE +Lorsque le Licencié apporte une Contribution au Logiciel, les conditions de redistribution du Logiciel Modifié sont alors soumises à l’intégralité des dispositions du Contrat. +Le Licencié est autorisé à redistribuer le Logiciel Modifié, sous forme de Code Source ou de Code Objet, à condition que cette redistribution respecte les dispositions du Contrat dans leur totalité et soit accompagnée: + 1. d’un exemplaire du Contrat, + 2. d’un avertissement relatif à la restriction de garantie et de responsabilité du concédant telle que prévue aux articles 8 et 9, +et que, dans le cas où seul le Code Objet du Logiciel Modifié est redistribué, le Licencié permette aux futurs Licenciés d’accéder facilement au Code Source complet du Logiciel Modifié en indiquant les modalités d’accès, étant entendu que le coût additionnel d’acquisition du Code Source ne devra pas excéder le simple coût de transfert des données. -Le Licencié est autorisé à redistribuer des copies du Logiciel, modifié ou -non, à des tiers dans les conditions ci-après détaillées. +5.3.3. REDISTRIBUTION DES MODULES DYNAMIQUES +Lorsque le Licencié a développé un Module Dynamique les conditions du Contrat ne s’appliquent pas à ce Module Dynamique, qui peut être distribué sous un contrat de licence différent. - 5.3.1. REDISTRIBUTION DU LOGICIEL SANS MODIFICATION - -Le Licencié est autorisé à redistribuer des copies conformes du Logiciel, -sous forme de Code Source ou de Code Objet, à condition que cette redistribution -respecte les dispositions du Contrat dans leur totalité et soit accompagnée: - - 1. d'un exemplaire du Contrat, - -2. d'un avertissement relatif à la restriction de garantie et de responsabilité -du Concédant telle que prévue aux articles 8 et 9, - -et que, dans le cas où seul le Code Objet du Logiciel est redistribué, le -Licencié permette aux futurs Licenciés d'accéder facilement au Code Source -complet du Logiciel en indiquant les modalités d'accès, étant entendu que -le coût additionnel d'acquisition du Code Source ne devra pas excéder le simple -coût de transfert des données. - - 5.3.2. REDISTRIBUTION DU LOGICIEL MODIFIE - -Lorsque le Licencié apporte une Contribution au Logiciel, les conditions de -redistribution du Logiciel Modifié sont alors soumises à l'intégralité des -dispositions du Contrat. - -Le Licencié est autorisé à redistribuer le Logiciel Modifié, sous forme de -Code Source ou de Code Objet, à condition que cette redistribution respecte -les dispositions du Contrat dans leur totalité et soit accompagnée: - - 1. d'un exemplaire du Contrat, - -2. d'un avertissement relatif à la restriction de garantie et de responsabilité -du concédant telle que prévue aux articles 8 et 9, - -et que, dans le cas où seul le Code Objet du Logiciel Modifié est redistribué, -le Licencié permette aux futurs Licenciés d'accéder facilement au Code Source -complet du Logiciel Modifié en indiquant les modalités d'accès, étant entendu -que le coût additionnel d'acquisition du Code Source ne devra pas excéder -le simple coût de transfert des données. - - 5.3.3. REDISTRIBUTION DES MODULES DYNAMIQUES - -Lorsque le Licencié a développé un Module Dynamique les conditions du Contrat -ne s'appliquent pas à ce Module Dynamique, qui peut être distribué sous un -contrat de licence différent. - - 5.3.4. COMPATIBILITE AVEC LA LICENCE GPL - -Dans le cas où le Logiciel, Modifié ou non, est intégré à un code soumis aux -dispositions de la licence GPL, le Licencié est autorisé à redistribuer l'ensemble -sous la licence GPL. - -Dans le cas où le Logiciel Modifié intègre un code soumis aux dispositions -de la licence GPL, le Licencié est autorisé à redistribuer le Logiciel Modifié -sous la licence GPL. +5.3.4. COMPATIBILITE AVEC LA LICENCE GPL +Dans le cas où le Logiciel, Modifié ou non, est intégré à un code soumis aux dispositions de la licence GPL, le Licencié est autorisé à redistribuer l’ensemble sous la licence GPL. +Dans le cas où le Logiciel Modifié intègre un code soumis aux dispositions de la licence GPL, le Licencié est autorisé à redistribuer le Logiciel Modifié sous la licence GPL. Article 6 - PROPRIETE INTELLECTUELLE - 6.1. SUR LE LOGICIEL INITIAL +6.1. SUR LE LOGICIEL INITIAL +Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel Initial. Toute utilisation du Logiciel Initial est soumise au respect des conditions dans lesquelles le Titulaire a choisi de diffuser son œuvre et nul autre n’a la faculté de modifier les conditions de diffusion de ce Logiciel Initial. +Le Titulaire s'engage à maintenir la diffusion du Logiciel initial sous les conditions du Contrat et ce, pour la durée visée à l'article 4.2. -Le Titulaire est détenteur des droits patrimoniaux sur le Logiciel Initial. -Toute utilisation du Logiciel Initial est soumise au respect des conditions -dans lesquelles le Titulaire a choisi de diffuser son œuvre et nul autre n'a -la faculté de modifier les conditions de diffusion de ce Logiciel Initial. +6.2. SUR LES CONTRIBUTIONS +Les droits de propriété intellectuelle sur les Contributions sont attachés au titulaire de droits patrimoniaux désigné par la législation applicable. -Le Titulaire s'engage à maintenir la diffusion du Logiciel initial sous les -conditions du Contrat et ce, pour la durée visée à l'article 4.2. +6.3. SUR LES MODULES DYNAMIQUES +Le Licencié ayant développé un Module Dynamique est titulaire des droits de propriété intellectuelle sur ce Module Dynamique et reste libre du choix du contrat régissant sa diffusion. - 6.2. SUR LES CONTRIBUTIONS +6.4. DISPOSITIONS COMMUNES -Les droits de propriété intellectuelle sur les Contributions sont attachés -au titulaire de droits patrimoniaux désigné par la législation applicable. - - 6.3. SUR LES MODULES DYNAMIQUES - -Le Licencié ayant développé un Module Dynamique est titulaire des droits de -propriété intellectuelle sur ce Module Dynamique et reste libre du choix du -contrat régissant sa diffusion. - - 6.4. DISPOSITIONS COMMUNES - - 6.4.1. Le Licencié s'engage expressément: - -1. à ne pas supprimer ou modifier de quelque manière que ce soit les mentions -de propriété intellectuelle apposées sur le Logiciel; - -2. à reproduire à l'identique lesdites mentions de propriété intellectuelle -sur les copies du Logiciel. - -6.4.2. Le Licencié s'engage à ne pas porter atteinte, directement ou indirectement, -aux droits de propriété intellectuelle du Titulaire et/ou des Contributeurs -et à prendre, le cas échéant, à l'égard de son personnel toutes les mesures -nécessaires pour assurer le respect des dits droits de propriété intellectuelle -du Titulaire et/ou des Contributeurs. +6.4.1. Le Licencié s’engage expressément: + 1. à ne pas supprimer ou modifier de quelque manière que ce soit les mentions de propriété intellectuelle apposées sur le Logiciel; + 2. à reproduire à l’identique lesdites mentions de propriété intellectuelle sur les copies du Logiciel. +6.4.2. Le Licencié s’engage à ne pas porter atteinte, directement ou indirectement, aux droits de propriété intellectuelle du Titulaire et/ou des Contributeurs et à prendre, le cas échéant, à l’égard de son personnel toutes les mesures nécessaires pour assurer le respect des dits droits de propriété intellectuelle du Titulaire et/ou des Contributeurs. Article 7 - SERVICES ASSOCIES -7.1. Le Contrat n'oblige en aucun cas le Concédant à la réalisation de prestations -d'assistance technique ou de maintenance du Logiciel. +7.1. Le Contrat n’oblige en aucun cas le Concédant à la réalisation de prestations d’assistance technique ou de maintenance du Logiciel. +Cependant le Concédant reste libre de proposer ce type de services. Les termes et conditions d’une telle assistance technique et/ou d’une telle maintenance seront alors déterminés dans un acte séparé. Ces actes de maintenance et/ou assistance technique n’engageront que la seule responsabilité du Concédant qui les propose. -Cependant le Concédant reste libre de proposer ce type de services. Les termes -et conditions d'une telle assistance technique et/ou d'une telle maintenance -seront alors déterminés dans un acte séparé. Ces actes de maintenance et/ou -assistance technique n'engageront que la seule responsabilité du Concédant -qui les propose. - -7.2. De même, tout Concédant est libre de proposer, sous sa seule responsabilité, -à ses licenciés une garantie, qui n'engagera que lui, lors de la redistribution -du Logiciel et/ou du Logiciel Modifié et ce, dans les conditions qu'il souhaite. -Cette garantie et les modalités financières de son application feront l'objet -d'un acte séparé entre le Concédant et le Licencié. +7.2. De même, tout Concédant est libre de proposer, sous sa seule responsabilité, à ses licenciés une garantie, qui n’engagera que lui, lors de la redistribution du Logiciel et/ou du Logiciel Modifié et ce, dans les conditions qu’il souhaite. Cette garantie et les modalités financières de son application feront l’objet d’un acte séparé entre le Concédant et le Licencié. Article 8 - RESPONSABILITE -8.1. Sous réserve des dispositions de l'article 8.2, si le Concédant n'exécute -pas tout ou partie des obligations mises à sa charge par le Contrat, le Licencié -a la faculté, sous réserve de prouver la faute du Concédant concerné, de solliciter -la réparation du préjudice direct qu'il subit et dont il apportera la preuve. +8.1. Sous réserve des dispositions de l’article 8.2, si le Concédant n’exécute pas tout ou partie des obligations mises à sa charge par le Contrat, le Licencié a la faculté, sous réserve de prouver la faute du Concédant concerné, de solliciter la réparation du préjudice direct qu’il subit et dont il apportera la preuve. -8.2. La responsabilité du Concédant est limitée aux engagements pris en application -du Contrat et ne saurait être engagée en raison notamment:(i) des dommages -dus à l'inexécution, totale ou partielle, de ses obligations par le Licencié, -(ii) des dommages directs ou indirects découlant de l'utilisation ou des performances -du Logiciel subis par le Licencié lorsqu'il s'agit d'un professionnel utilisant -le Logiciel à des fins professionnelles et (iii) des dommages indirects découlant -de l'utilisation ou des performances du Logiciel. Les Parties conviennent -expressément que tout préjudice financier ou commercial (par exemple perte -de données, perte de bénéfices, perte d'exploitation, perte de clientèle ou -de commandes, manque à gagner, trouble commercial quelconque) ou toute action -dirigée contre le Licencié par un tiers, constitue un dommage indirect et -n'ouvre pas droit à réparation par le Concédant. +8.2. La responsabilité du Concédant est limitée aux engagements pris en application du Contrat et ne saurait être engagée en raison notamment:(i) des dommages dus à l’inexécution, totale ou partielle, de ses obligations par le Licencié, (ii) des dommages directs ou indirects découlant de l’utilisation ou des performances du Logiciel subis par le Licencié lorsqu’il s’agit d’un professionnel utilisant le Logiciel à des fins professionnelles et (iii) des dommages indirects découlant de l’utilisation ou des performances du Logiciel. Les Parties conviennent expressément que tout préjudice financier ou commercial (par exemple perte de données, perte de bénéfices, perte d’exploitation, perte de clientèle ou de commandes, manque à gagner, trouble commercial quelconque) ou toute action dirigée contre le Licencié par un tiers, constitue un dommage indirect et n’ouvre pas droit à réparation par le Concédant. Article 9 - GARANTIE -9.1. Le Licencié reconnaît que l'état actuel des connaissances scientifiques -et techniques au moment de la mise en circulation du Logiciel ne permet pas -d'en tester et d'en vérifier toutes les utilisations ni de détecter l'existence -d'éventuels défauts. L'attention du Licencié a été attirée sur ce point sur -les risques associés au chargement, à l'utilisation, la modification et/ou -au développement et à la reproduction du Logiciel qui sont réservés à des -utilisateurs avertis. +9.1. Le Licencié reconnaît que l’état actuel des connaissances scientifiques et techniques au moment de la mise en circulation du Logiciel ne permet pas d’en tester et d’en vérifier toutes les utilisations ni de détecter l’existence d’éventuels défauts. L’attention du Licencié a été attirée sur ce point sur les risques associés au chargement, à l’utilisation, la modification et/ou au développement et à la reproduction du Logiciel qui sont réservés à des utilisateurs avertis. +Il relève de la responsabilité du Licencié de contrôler, par tous moyens, l’adéquation du produit à ses besoins, son bon fonctionnement et de s'assurer qu’il ne causera pas de dommages aux personnes et aux biens. -Il relève de la responsabilité du Licencié de contrôler, par tous moyens, -l'adéquation du produit à ses besoins, son bon fonctionnement et de s'assurer -qu'il ne causera pas de dommages aux personnes et aux biens. +9.2. Le Concédant déclare de bonne foi être en droit de concéder l'ensemble des droits attachés au Logiciel (comprenant notamment les droits visés à l'article 5). -9.2. Le Concédant déclare de bonne foi être en droit de concéder l'ensemble -des droits attachés au Logiciel (comprenant notamment les droits visés à l'article -5). +9.3. Le Licencié reconnaît que le Logiciel est fourni «en l'état» par le Concédant sans autre garantie, expresse ou tacite, que celle prévue à l’article 9.2 et notamment sans aucune garantie sur sa valeur commerciale, son caractère sécurisé, innovant ou pertinent. +En particulier, le Concédant ne garantit pas que le Logiciel est exempt d'erreur, qu’il fonctionnera sans interruption, qu’il sera compatible avec l’équipement du Licencié et sa configuration logicielle ni qu’il remplira les besoins du Licencié. -9.3. Le Licencié reconnaît que le Logiciel est fourni «en l'état» par le Concédant -sans autre garantie, expresse ou tacite, que celle prévue à l'article 9.2 -et notamment sans aucune garantie sur sa valeur commerciale, son caractère -sécurisé, innovant ou pertinent. - -En particulier, le Concédant ne garantit pas que le Logiciel est exempt d'erreur, -qu'il fonctionnera sans interruption, qu'il sera compatible avec l'équipement -du Licencié et sa configuration logicielle ni qu'il remplira les besoins du -Licencié. - -9.4. Le Concédant ne garantit pas, de manière expresse ou tacite, que le Logiciel -ne porte pas atteinte à un quelconque droit de propriété intellectuelle d'un -tiers portant sur un brevet, un logiciel ou sur tout autre droit de propriété. -Ainsi, le Concédant exclut toute garantie au profit du Licencié contre les -actions en contrefaçon qui pourraient être diligentées au titre de l'utilisation, -de la modification, et de la redistribution du Logiciel. Néanmoins, si de -telles actions sont exercées contre le Licencié, le Concédant lui apportera -son aide technique et juridique pour sa défense. Cette aide technique et juridique -est déterminée au cas par cas entre le Concédant concerné et le Licencié dans -le cadre d'un protocole d'accord. Le Concédant dégage toute responsabilité -quant à l'utilisation de la dénomination du Logiciel par le Licencié. Aucune -garantie n'est apportée quant à l'existence de droits antérieurs sur le nom -du Logiciel et sur l'existence d'une marque. +9.4. Le Concédant ne garantit pas, de manière expresse ou tacite, que le Logiciel ne porte pas atteinte à un quelconque droit de propriété intellectuelle d’un tiers portant sur un brevet, un logiciel ou sur tout autre droit de propriété. Ainsi, le Concédant exclut toute garantie au profit du Licencié contre les actions en contrefaçon qui pourraient être diligentées au titre de l’utilisation, de la modification, et de la redistribution du Logiciel. Néanmoins, si de telles actions sont exercées contre le Licencié, le Concédant lui apportera son aide technique et juridique pour sa défense. Cette aide technique et juridique est déterminée au cas par cas entre le Concédant concerné et le Licencié dans le cadre d’un protocole d’accord. Le Concédant dégage toute responsabilité quant à l’utilisation de la dénomination du Logiciel par le Licencié. Aucune garantie n’est apportée quant à l’existence de droits antérieurs sur le nom du Logiciel et sur l’existence d’une marque. Article 10 - RESILIATION -10.1. En cas de manquement par le Licencié aux obligations mises à sa charge -par le Contrat, le Concédant pourra résilier de plein droit le Contrat trente -(30) jours après notification adressée au Licencié et restée sans effet. - -10.2. Le Licencié dont le Contrat est résilié n'est plus autorisé à utiliser, -modifier ou distribuer le Logiciel. Cependant, toutes les licences qu'il aura -concédées antérieurement à la résiliation du Contrat resteront valides sous -réserve qu'elles aient été effectuées en conformité avec le Contrat. +10.1. En cas de manquement par le Licencié aux obligations mises à sa charge par le Contrat, le Concédant pourra résilier de plein droit le Contrat trente (30) jours après notification adressée au Licencié et restée sans effet. +10.2. Le Licencié dont le Contrat est résilié n’est plus autorisé à utiliser, modifier ou distribuer le Logiciel. Cependant, toutes les licences qu’il aura concédées antérieurement à la résiliation du Contrat resteront valides sous réserve qu’elles aient été effectuées en conformité avec le Contrat. Article 11 - DISPOSITIONS DIVERSES - 11.1. CAUSE EXTERIEURE +11.1. CAUSE EXTERIEURE +Aucune des Parties ne sera responsable d’un retard ou d’une défaillance d’exécution du Contrat qui serait dû à un cas de force majeure, un cas fortuit ou une cause extérieure, telle que, notamment, le mauvais fonctionnement ou les interruptions du réseau électrique ou de télécommunication, la paralysie du réseau liée à une attaque informatique, l’intervention des autorités gouvernementales, les catastrophes naturelles, les dégâts des eaux, les tremblements de terre, le feu, les explosions, les grèves et les conflits sociaux, l’état de guerre… -Aucune des Parties ne sera responsable d'un retard ou d'une défaillance d'exécution -du Contrat qui serait dû à un cas de force majeure, un cas fortuit ou une -cause extérieure, telle que, notamment, le mauvais fonctionnement ou les interruptions -du réseau électrique ou de télécommunication, la paralysie du réseau liée -à une attaque informatique, l'intervention des autorités gouvernementales, -les catastrophes naturelles, les dégâts des eaux, les tremblements de terre, -le feu, les explosions, les grèves et les conflits sociaux, l'état de guerre… +11.2. Le fait, par l’une ou l’autre des Parties, d’omettre en une ou plusieurs occasions de se prévaloir d’une ou plusieurs dispositions du Contrat, ne pourra en aucun cas impliquer renonciation par la Partie intéressée à s’en prévaloir ultérieurement. -11.2. Le fait, par l'une ou l'autre des Parties, d'omettre en une ou plusieurs -occasions de se prévaloir d'une ou plusieurs dispositions du Contrat, ne pourra -en aucun cas impliquer renonciation par la Partie intéressée à s'en prévaloir -ultérieurement. +11.3. Le Contrat annule et remplace toute convention antérieure, écrite ou orale, entre les Parties sur le même objet et constitue l’accord entier entre les Parties sur cet objet. Aucune addition ou modification aux termes du Contrat n’aura d’effet à l’égard des Parties à moins d’être faite par écrit et signée par leurs représentants dûment habilités. -11.3. Le Contrat annule et remplace toute convention antérieure, écrite ou -orale, entre les Parties sur le même objet et constitue l'accord entier entre -les Parties sur cet objet. Aucune addition ou modification aux termes du Contrat -n'aura d'effet à l'égard des Parties à moins d'être faite par écrit et signée -par leurs représentants dûment habilités. +11.4. Dans l’hypothèse où une ou plusieurs des dispositions du Contrat s’avèrerait contraire à une loi ou à un texte applicable, existants ou futurs, cette loi ou ce texte prévaudrait, et les Parties feraient les amendements nécessaires pour se conformer à cette loi ou à ce texte. Toutes les autres dispositions resteront en vigueur. De même, la nullité, pour quelque raison que ce soit, d’une des dispositions du Contrat ne saurait entraîner la nullité de l’ensemble du Contrat. -11.4. Dans l'hypothèse où une ou plusieurs des dispositions du Contrat s'avèrerait -contraire à une loi ou à un texte applicable, existants ou futurs, cette loi -ou ce texte prévaudrait, et les Parties feraient les amendements nécessaires -pour se conformer à cette loi ou à ce texte. Toutes les autres dispositions -resteront en vigueur. De même, la nullité, pour quelque raison que ce soit, -d'une des dispositions du Contrat ne saurait entraîner la nullité de l'ensemble -du Contrat. - - 11.5. LANGUE - -Le Contrat est rédigé en langue française et en langue anglaise. En cas de -divergence d'interprétation, seule la version française fait foi. +11.5. LANGUE +Le Contrat est rédigé en langue française et en langue anglaise. En cas de divergence d’interprétation, seule la version française fait foi. Article 12 - NOUVELLES VERSIONS DU CONTRAT -12.1. Toute personne est autorisée à copier et distribuer des copies de ce -Contrat. +12.1. Toute personne est autorisée à copier et distribuer des copies de ce Contrat. -12.2. Afin d'en préserver la cohérence, le texte du Contrat est protégé et -ne peut être modifié que par les auteurs de la licence, lesquels se réservent -le droit de publier périodiquement des mises à jour ou de nouvelles versions -du Contrat, qui possèderont chacune un numéro distinct. Ces versions ultérieures -seront susceptibles de prendre en compte de nouvelles problématiques rencontrées -par les logiciels libres. +12.2. Afin d’en préserver la cohérence, le texte du Contrat est protégé et ne peut être modifié que par les auteurs de la licence, lesquels se réservent le droit de publier périodiquement des mises à jour ou de nouvelles versions du Contrat, qui possèderont chacune un numéro distinct. Ces versions ultérieures seront susceptibles de prendre en compte de nouvelles problématiques rencontrées par les logiciels libres. -12.3. Tout Logiciel diffusé sous une version donnée du Contrat ne pourra faire -l'objet d'une diffusion ultérieure que sous la même version du Contrat ou -une version postérieure, sous réserve des dispositions de l'article 5.3.4. +12.3. Tout Logiciel diffusé sous une version donnée du Contrat ne pourra faire l'objet d'une diffusion ultérieure que sous la même version du Contrat ou une version postérieure, sous réserve des dispositions de l'article 5.3.4. Article 13 - LOI APPLICABLE ET COMPETENCE TERRITORIALE -13.1. Le Contrat est régi par la loi française. Les Parties conviennent de -tenter de régler à l'amiable les différends ou litiges qui viendraient à se -produire par suite ou à l'occasion du Contrat. +13.1. Le Contrat est régi par la loi française. Les Parties conviennent de tenter de régler à l’amiable les différends ou litiges qui viendraient à se produire par suite ou à l’occasion du Contrat. -13.2. A défaut d'accord amiable dans un délai de deux (2) mois à compter de -leur survenance et sauf situation relevant d'une procédure d'urgence, les -différends ou litiges seront portés par la Partie la plus diligente devant -les Tribunaux compétents de Paris. +13.2. A défaut d’accord amiable dans un délai de deux (2) mois à compter de leur survenance et sauf situation relevant d’une procédure d’urgence, les différends ou litiges seront portés par la Partie la plus diligente devant les Tribunaux compétents de Paris. -1 Ce: CEA, C: CNRS, I: INRIA, LL: Logiciel Libre Version 1 du 21/06/2004 +1 Ce: CEA, C: CNRS, I: INRIA, LL: Logiciel Libre + +Version 1 du 21/06/2004 diff --git a/options/license/CECILL-1.1 b/options/license/CECILL-1.1 index b3db070ee..95bea5c9d 100644 --- a/options/license/CECILL-1.1 +++ b/options/license/CECILL-1.1 @@ -1,487 +1,229 @@ -FREE SOFTWARE LICENSING AGREEMENT CeCILL Notice + FREE SOFTWARE LICENSING AGREEMENT CeCILL -This Agreement is a free software license that is the result of discussions -between its authors in order to ensure compliance with the two main principles -guiding its drafting: +Notice -- firstly, its conformity with French law, both as regards the law of torts -and intellectual property law, and the protection that it offers to authors -and the holders of economic rights over software. +This Agreement is a free software license that is the result of discussions between its authors in order to ensure compliance with the two main principles guiding its drafting: + - firstly, its conformity with French law, both as regards the law of torts and intellectual property law, and the protection that it offers to authors and the holders of economic rights over software. + - secondly, compliance with the principles for the distribution of free software: access to source codes, extended user-rights. -- secondly, compliance with the principles for the distribution of free software: -access to source codes, extended user-rights. +The following bodies are the authors of this license CeCILL (Ce : CEA, C : CNRS, I : INRIA, LL : Logiciel Libre): -The following bodies are the authors of this license CeCILL (Ce : CEA, C : -CNRS, I : INRIA, LL : Logiciel Libre): +Commissariat à l'Energie Atomique - CEA, a public scientific, technical and industrial establishment, having its principal place of business at 31-33 rue de la Fédération, 75752 PARIS cedex 15, France. - +Centre National de la Recherche Scientifique - CNRS, a public scientific and technological establishment, having its principal place of business at 3 rue Michel-Ange 75794 Paris cedex 16, France. -Commissariat à l'Energie Atomique - CEA, a public scientific, technical and -industrial establishment, having its principal place of business at 31-33 -rue de la Fédération, 75752 PARIS cedex 15, France. +Institut National de Recherche en Informatique et en Automatique - INRIA, a public scientific and technological establishment, having its principal place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay cedex. - +PREAMBLE -Centre National de la Recherche Scientifique - CNRS, a public scientific and -technological establishment, having its principal place of business at 3 rue -Michel-Ange 75794 Paris cedex 16, France. +The purpose of this Free Software Licensing Agreement is to grant users the right to modify and redistribute the software governed by this license within the framework of an "open source" distribution model. - +The exercising of these rights is conditional upon certain obligations for users so as to ensure that this status is retained for subsequent redistribution operations. -Institut National de Recherche en Informatique et en Automatique - INRIA, -a public scientific and technological establishment, having its principal -place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay -cedex. +As a counterpart to the access to the source code and rights to copy, modify and redistribute granted by the license, users are provided only with a limited warranty and the software's author, the holder of the economic rights, and the successive licensors only have limited liability. - +In this respect, it is brought to the user's attention that the risks associated with loading, using, modifying and/or developing or reproducing the software by the user given its nature of Free Software, that may mean that it is complicated to manipulate, and that also therefore means that it is reserved for developers and experienced professionals having in-depth computer knowledge. Users are therefore encouraged to load and test the Software's suitability as regards their requirements in conditions enabling the security of their systems and/or data to be ensured and, more generally, to use and operate it in the same conditions of security. This Agreement may be freely reproduced and published, provided it is not altered, and that no Articles are either added or removed herefrom. - PREAMBLE +This Agreement may apply to any or all software for which the holder of the economic rights decides to submit the operation thereof to its provisions. -The purpose of this Free Software Licensing Agreement is to grant users the -right to modify and redistribute the software governed by this license within -the framework of an "open source" distribution model. +Article 1 - DEFINITIONS -The exercising of these rights is conditional upon certain obligations for -users so as to ensure that this status is retained for subsequent redistribution -operations. +For the purposes of this Agreement, when the following expressions commence with a capital letter, they shall have the following meaning: -As a counterpart to the access to the source code and rights to copy, modify -and redistribute granted by the license, users are provided only with a limited -warranty and the software's author, the holder of the economic rights, and -the successive licensors only have limited liability. +Agreement: means this Licensing Agreement, and any or all of its subsequent versions. -In this respect, it is brought to the user's attention that the risks associated -with loading, using, modifying and/or developing or reproducing the software -by the user given its nature of Free Software, that may mean that it is complicated -to manipulate, and that also therefore means that it is reserved for developers -and experienced professionals having in-depth computer knowledge. Users are -therefore encouraged to load and test the Software's suitability as regards -their requirements in conditions enabling the security of their systems and/or -data to be ensured and, more generally, to use and operate it in the same -conditions of security. This Agreement may be freely reproduced and published, -provided it is not altered, and that no Articles are either added or removed -herefrom. +Software: means the software in its Object Code and/or Source Code form and, where applicable, its documentation, "as is" at the time when the Licensee accepts the Agreement. -This Agreement may apply to any or all software for which the holder of the -economic rights decides to submit the operation thereof to its provisions. - - Article 1 - DEFINITIONS - -For the purposes of this Agreement, when the following expressions commence -with a capital letter, they shall have the following meaning: - - - -Agreement: means this Licensing Agreement, and any or all of its subsequent -versions. - - - -Software: means the software in its Object Code and/or Source Code form and, -where applicable, its documentation, "as is" at the time when the Licensee -accepts the Agreement. - - - -Initial Software: means the Software in its Source Code and/or Object Code -form and, where applicable, its documentation, "as is" at the time when it -is distributed for the first time under the terms and conditions of the Agreement. - - +Initial Software: means the Software in its Source Code and/or Object Code form and, where applicable, its documentation, "as is" at the time when it is distributed for the first time under the terms and conditions of the Agreement. Modified Software: means the Software modified by at least one Contribution. - +Source Code: means all the Software's instructions and program lines to which access is required so as to modify the Software. -Source Code: means all the Software's instructions and program lines to which -access is required so as to modify the Software. - - - -Object Code: means the binary files originating from the compilation of the -Source Code. - - +Object Code: means the binary files originating from the compilation of the Source Code. Holder: means the holder of the economic rights over the Initial Software. - +Licensee(s): mean(s) the Software user(s) having accepted the Agreement. - Licensee(s): mean(s) the Software user(s) having accepted the Agreement. +Contributor: means a Licensee having made at least one Contribution. - +Licensor: means the Holder, or any or all other individual or legal entity, that distributes the Software under the Agreement. - Contributor: means a Licensee having made at least one Contribution. +Contributions: mean any or all modifications, corrections, translations, adaptations and/or new functionalities integrated into the Software by any or all Contributor, and the Static Modules. - +Module: means a set of sources files including their documentation that, once compiled in executable form, enables supplementary functionalities or services to be developed in addition to those offered by the Software. -Licensor: means the Holder, or any or all other individual or legal entity, -that distributes the Software under the Agreement. +Dynamic Module: means any or all module, created by the Contributor, that is independent of the Software, so that this module and the Software are in two different executable forms that are run in separate address spaces, with one calling the other when they are run. - +Static Module: means any or all module, created by the Contributor and connected to the Software by a static link that makes their object codes interdependent. This module and the Software to which it is connected, are combined in a single executable. -Contributions: mean any or all modifications, corrections, translations, adaptations -and/or new functionalities integrated into the Software by any or all Contributor, -and the Static Modules. +Parties: mean both the Licensee and the Licensor. - +These expressions may be used both in singular and plural form. -Module: means a set of sources files including their documentation that, once -compiled in executable form, enables supplementary functionalities or services -to be developed in addition to those offered by the Software. +Article 2 - PURPOSE - +The purpose of the Agreement is to enable the Licensor to grant the Licensee a free, non-exclusive, transferable and worldwide License for the Software as set forth in Article 5 hereinafter for the whole term of protection of the rights over said Software. -Dynamic Module: means any or all module, created by the Contributor, that -is independent of the Software, so that this module and the Software are in -two different executable forms that are run in separate address spaces, with -one calling the other when they are run. +Article 3 - ACCEPTANCE - +3.1. The Licensee shall be deemed as having accepted the terms and conditions of this Agreement by the occurrence of the first of the following events: + (i) loading the Software by any or all means, notably, by downloading from a remote server, or by loading from a physical medium; + (ii) the first time the Licensee exercises any of the rights granted hereunder. -Static Module: means any or all module, created by the Contributor and connected -to the Software by a static link that makes their object codes interdependent. -This module and the Software to which it is connected, are combined in a single -executable. +3.2. One copy of the Agreement, containing a notice relating to the specific nature of the Software, to the limited warranty, and to the limitation to use by experienced users has been provided to the Licensee prior to its acceptance as set forth in Article 3.1 hereinabove, and the Licensee hereby acknowledges that it is aware thereof. - +Article 4 - EFFECTIVE DATE AND TERM - Parties: mean both the Licensee and the Licensor. +4.1. EFFECTIVE DATE - These expressions may be used both in singular and plural form. +The Agreement shall become effective on the date when it is accepted by the Licensee as set forth in Article 3.1. - Article 2 - PURPOSE +4.2. TERM -The purpose of the Agreement is to enable the Licensor to grant the Licensee -a free, non-exclusive, transferable and worldwide License for the Software -as set forth in Article 5 hereinafter for the whole term of protection of -the rights over said Software. - - Article 3 - ACCEPTANCE - -3.1. The Licensee shall be deemed as having accepted the terms and conditions -of this Agreement by the occurrence of the first of the following events: - -(i) loading the Software by any or all means, notably, by downloading from -a remote server, or by loading from a physical medium; - -(ii) the first time the Licensee exercises any of the rights granted hereunder. - -3.2. One copy of the Agreement, containing a notice relating to the specific -nature of the Software, to the limited warranty, and to the limitation to -use by experienced users has been provided to the Licensee prior to its acceptance -as set forth in Article 3.1 hereinabove, and the Licensee hereby acknowledges -that it is aware thereof. - - Article 4 - EFFECTIVE DATE AND TERM - - 4.1. EFFECTIVE DATE - -The Agreement shall become effective on the date when it is accepted by the -Licensee as set forth in Article 3.1. - - 4.2. TERM - -The Agreement shall remain in force during the whole legal term of protection -of the economic rights over the Software. +The Agreement shall remain in force during the whole legal term of protection of the economic rights over the Software. Article 5 - SCOPE OF THE RIGHTS GRANTED --------------------------------------- -The Licensor hereby grants to the Licensee, that accepts such, the following -rights as regards the Software for any or all use, and for the term of the -Agreement, on the basis of the terms and conditions set forth hereinafter. +The Licensor hereby grants to the Licensee, that accepts such, the following rights as regards the Software for any or all use, and for the term of the Agreement, on the basis of the terms and conditions set forth hereinafter. -Otherwise, the Licensor grants to the Licensee free of charge exploitation -rights on the patents he holds on whole or part of the inventions implemented -in the Software. +Otherwise, the Licensor grants to the Licensee free of charge exploitation rights on the patents he holds on whole or part of the inventions implemented in the Software. - 5.1. RIGHTS OF USE +5.1. RIGHTS OF USE -The Licensee is authorized to use the Software, unrestrictedly, as regards -the fields of application, with it being hereinafter specified that this relates -to: +The Licensee is authorized to use the Software, unrestrictedly, as regards the fields of application, with it being hereinafter specified that this relates to: + 1. permanent or temporary reproduction of all or part of the Software by any or all means and in any or all form. + 2. loading, displaying, running, or storing the Software on any or all medium. + 3. entitlement to observe, study or test the operation thereof so as to establish the ideas and principles that form the basis for any or all constituent elements of said Software. This shall apply when the Licensee carries out any or all loading, displaying, running, transmission or storage operation as regards the Software, that it is entitled to carry out hereunder. -1. permanent or temporary reproduction of all or part of the Software by any -or all means and in any or all form. +5.2. entitlement to make CONTRIBUTIONS -2. loading, displaying, running, or storing the Software on any or all medium. +The right to make Contributions includes the right to translate, adapt, arrange, or make any or all modification to the Software, and the right to reproduce the resulting Software. -3. entitlement to observe, study or test the operation thereof so as to establish -the ideas and principles that form the basis for any or all constituent elements -of said Software. This shall apply when the Licensee carries out any or all -loading, displaying, running, transmission or storage operation as regards -the Software, that it is entitled to carry out hereunder. +The Licensee is authorized to make any or all Contribution to the Software provided that it explicitly mentions its name as the author of said Contribution and the date of the development thereof. - 5.2. ENTITLEMENT TO MAKE CONTRIBUTIONS +5.3. DISTRIBUTION AND PUBLICATION RIGHTS -The right to make Contributions includes the right to translate, adapt, arrange, -or make any or all modification to the Software, and the right to reproduce -the resulting Software. +In particular, the right of distribution and publication includes the right to transmit and communicate the Software to the general public on any or all medium, and by any or all means, and the right to market, either in consideration of a fee, or free of charge, a copy or copies of the Software by means of any or all process. The Licensee is further authorized to redistribute copies of the modified or unmodified Software to third parties according to the terms and conditions set forth hereinafter. -The Licensee is authorized to make any or all Contribution to the Software -provided that it explicitly mentions its name as the author of said Contribution -and the date of the development thereof. +5.3.1. REDISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION - 5.3. DISTRIBUTION AND PUBLICATION RIGHTS +The Licensee is authorized to redistribute true copies of the Software in Source Code or Object Code form, provided that said redistribution complies with all the provisions of the Agreement and is accompanied by: -In particular, the right of distribution and publication includes the right -to transmit and communicate the Software to the general public on any or all -medium, and by any or all means, and the right to market, either in consideration -of a fee, or free of charge, a copy or copies of the Software by means of -any or all process. The Licensee is further authorized to redistribute copies -of the modified or unmodified Software to third parties according to the terms -and conditions set forth hereinafter. + 1. a copy of the Agreement, + 2. a notice relating to the limitation of both the Licensor's warranty and liability as set forth in Articles 8 and 9, - 5.3.1. REDISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION +and that, in the event that only the Software's Object Code is redistributed, the Licensee allows future Licensees unhindered access to the Software's full Source Code by providing them with the terms and conditions for access thereto, it being understood that the additional cost of acquiring the Source Code shall not exceed the cost of transferring the data. -The Licensee is authorized to redistribute true copies of the Software in -Source Code or Object Code form, provided that said redistribution complies -with all the provisions of the Agreement and is accompanied by: +5.3.2. REDISTRIBUTION OF MODIFIED SOFTWARE - 1. a copy of the Agreement, +When the Licensee makes a Contribution to the Software, the terms and conditions for the redistribution of the Modified Software shall then be subject to all the provisions hereof. -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, +The Licensee is authorized to redistribute the Modified Software, in Source Code or Object Code form, provided that said redistribution complies with all the provisions of the Agreement and is accompanied by: -and that, in the event that only the Software's Object Code is redistributed, -the Licensee allows future Licensees unhindered access to the Software's full -Source Code by providing them with the terms and conditions for access thereto, -it being understood that the additional cost of acquiring the Source Code -shall not exceed the cost of transferring the data. + 1. a copy of the Agreement, + 2. a notice relating to the limitation of both the Licensor's warranty and liability as set forth in Articles 8 and 9, - 5.3.2. REDISTRIBUTION OF MODIFIED SOFTWARE +and that, in the event that only the Modified Software's Object Code is redistributed, the Licensee allows future Licensees unhindered access to the Modified Software's full Source Code by providing them with the terms and conditions for access thereto, it being understood that the additional cost of acquiring the Source Code shall not exceed the cost of transferring the data. -When the Licensee makes a Contribution to the Software, the terms and conditions -for the redistribution of the Modified Software shall then be subject to all -the provisions hereof. +5.3.3. redistribution OF DYNAMIC MODULES -The Licensee is authorized to redistribute the Modified Software, in Source -Code or Object Code form, provided that said redistribution complies with -all the provisions of the Agreement and is accompanied by: +When the Licensee has developed a Dynamic Module, the terms and conditions hereof do not apply to said Dynamic Module, that may be distributed under a separate Licensing Agreement. - 1. a copy of the Agreement, +5.3.4. COMPATIBILITY WITH THE GPL LICENSE -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, +In the event that the Modified or unmodified Software is included in a code that is subject to the provisions of the GPL License, the Licensee is authorized to redistribute the whole under the GPL License. -and that, in the event that only the Modified Software's Object Code is redistributed, -the Licensee allows future Licensees unhindered access to the Modified Software's -full Source Code by providing them with the terms and conditions for access -thereto, it being understood that the additional cost of acquiring the Source -Code shall not exceed the cost of transferring the data. +In the event that the Modified Software includes a code that is subject to the provisions of the GPL License, the Licensee is authorized to redistribute the Modified Software under the GPL License. - 5.3.3. REDISTRIBUTION OF DYNAMIC MODULES +Article 6 - INTELLECTUAL PROPERTY -When the Licensee has developed a Dynamic Module, the terms and conditions -hereof do not apply to said Dynamic Module, that may be distributed under -a separate Licensing Agreement. +6.1. OVER THE INITIAL SOFTWARE - 5.3.4. COMPATIBILITY WITH THE GPL LICENSE +The Holder owns the economic rights over the Initial Software. Any or all use of the Initial Software is subject to compliance with the terms and conditions under which the Holder has elected to distribute its work and no one shall be entitled to and it shall have sole entitlement to modify the terms and conditions for the distribution of said Initial Software. -In the event that the Modified or unmodified Software is included in a code -that is subject to the provisions of the GPL License, the Licensee is authorized -to redistribute the whole under the GPL License. +The Holder undertakes to maintain the distribution of the Initial Software under the conditions of the Agreement, for the duration set forth in article 4.2.. -In the event that the Modified Software includes a code that is subject to -the provisions of the GPL License, the Licensee is authorized to redistribute -the Modified Software under the GPL License. +6.2. OVER THE CONTRIBUTIONS - Article 6 - INTELLECTUAL PROPERTY +The intellectual property rights over the Contributions belong to the holder of the economic rights as designated by effective legislation. - 6.1. OVER THE INITIAL SOFTWARE +6.3. OVER THE DYNAMIC MODULES -The Holder owns the economic rights over the Initial Software. Any or all -use of the Initial Software is subject to compliance with the terms and conditions -under which the Holder has elected to distribute its work and no one shall -be entitled to and it shall have sole entitlement to modify the terms and -conditions for the distribution of said Initial Software. +The Licensee having developed a Dynamic Module is the holder of the intellectual property rights over said Dynamic Module and is free to choose the agreement that shall govern its distribution. -The Holder undertakes to maintain the distribution of the Initial Software -under the conditions of the Agreement, for the duration set forth in article -4.2.. +6.4. JOINT PROVISIONS - 6.2. OVER THE CONTRIBUTIONS +6.4.1. The Licensee expressly undertakes: -The intellectual property rights over the Contributions belong to the holder -of the economic rights as designated by effective legislation. + 1. not to remove, or modify, in any or all manner, the intellectual property notices affixed to the Software; + 2. to reproduce said notices, in an identical manner, in the copies of the Software. - 6.3. OVER THE DYNAMIC MODULES +6.4.2. The Licensee undertakes not to directly or indirectly infringe the intellectual property rights of the Holder and/or Contributors and to take, where applicable, vis-à-vis its staff, any or all measures required to ensure respect for said intellectual property rights of the Holder and/or Contributors. -The Licensee having developed a Dynamic Module is the holder of the intellectual -property rights over said Dynamic Module and is free to choose the agreement -that shall govern its distribution. +Article 7 - RELATED SERVICES - 6.4. JOINT PROVISIONS +7.1. Under no circumstances shall the Agreement oblige the Licensor to provide technical assistance or maintenance services for the Software. - +However, the Licensor is entitled to offer this type of service. The terms and conditions of such technical assistance, and/or such maintenance, shall then be set forth in a separate instrument. Only the Licensor offering said maintenance and/or technical assistance services shall incur liability therefor. - 6.4.1. The Licensee expressly undertakes: +7.2. Similarly, any or all Licensor shall be entitled to offer to its Licensees, under its own responsibility, a warranty, that shall only be binding upon itself, for the redistribution of the Software and/or the Modified Software, under terms and conditions that it shall decide upon itself. Said warranty, and the financial terms and conditions of its application, shall be subject to a separate instrument executed between the Licensor and the Licensee. -1. not to remove, or modify, in any or all manner, the intellectual property -notices affixed to the Software; +Article 8 - LIABILITY -2. to reproduce said notices, in an identical manner, in the copies of the -Software. +8.1. Subject to the provisions of Article 8.2, should the Licensor fail to fulfill all or part of its obligations hereunder, the Licensee shall be entitled to claim compensation for the direct loss suffered as a result of a fault on the part of the Licensor, subject to providing evidence of it. - +8.2. The Licensor's liability is limited to the commitments made under this Licensing Agreement and shall not be incurred as a result , in particular: (i) of loss due the Licensee's total or partial failure to fulfill its obligations, (ii) direct or consequential loss due to the Software's use or performance that is suffered by the Licensee, when the latter is a professional using said Software for professional purposes and (iii) consequential loss due to the Software's use or performance. The Parties expressly agree that any or all pecuniary or business loss (i.e. loss of data, loss of profits, operating loss, loss of customers or orders, opportunity cost, any disturbance to business activities) or any or all legal proceedings instituted against the Licensee by a third party, shall constitute consequential loss and shall not provide entitlement to any or all compensation from the Licensor. -6.4.2. The Licensee undertakes not to directly or indirectly infringe the -intellectual property rights of the Holder and/or Contributors and to take, -where applicable, vis-à-vis its staff, any or all measures required to ensure -respect for said intellectual property rights of the Holder and/or Contributors. +Article 9 - WARRANTY - Article 7 - RELATED SERVICES +9.1. The Licensee acknowledges that the current situation as regards scientific and technical know-how at the time when the Software was distributed did not enable all possible uses to be tested and verified, nor for the presence of any or all faults to be detected. In this respect, the Licensee's attention has been drawn to the risks associated with loading, using, modifying and/or developing and reproducing the Software that are reserved for experienced users. -7.1. Under no circumstances shall the Agreement oblige the Licensor to provide -technical assistance or maintenance services for the Software. +The Licensee shall be responsible for verifying, by any or all means, the product's suitability for its requirements, its due and proper functioning, and for ensuring that it shall not cause damage to either persons or property. -However, the Licensor is entitled to offer this type of service. The terms -and conditions of such technical assistance, and/or such maintenance, shall -then be set forth in a separate instrument. Only the Licensor offering said -maintenance and/or technical assistance services shall incur liability therefor. +9.2. The Licensor hereby represents, in good faith, that it is entitled to grant all the rights on the Software (including in particular the rights set forth in Article 5 hereof over the Software). -7.2. Similarly, any or all Licensor shall be entitled to offer to its Licensees, -under its own responsibility, a warranty, that shall only be binding upon -itself, for the redistribution of the Software and/or the Modified Software, -under terms and conditions that it shall decide upon itself. Said warranty, -and the financial terms and conditions of its application, shall be subject -to a separate instrument executed between the Licensor and the Licensee. - - Article 8 - LIABILITY - -8.1. Subject to the provisions of Article 8.2, should the Licensor fail to -fulfill all or part of its obligations hereunder, the Licensee shall be entitled -to claim compensation for the direct loss suffered as a result of a fault -on the part of the Licensor, subject to providing evidence of it. - -8.2. The Licensor's liability is limited to the commitments made under this -Licensing Agreement and shall not be incurred as a result , in particular: -(i) of loss due the Licensee's total or partial failure to fulfill its obligations, -(ii) direct or consequential loss due to the Software's use or performance -that is suffered by the Licensee, when the latter is a professional using -said Software for professional purposes and (iii) consequential loss due to -the Software's use or performance. The Parties expressly agree that any or -all pecuniary or business loss (i.e. loss of data, loss of profits, operating -loss, loss of customers or orders, opportunity cost, any disturbance to business -activities) or any or all legal proceedings instituted against the Licensee -by a third party, shall constitute consequential loss and shall not provide -entitlement to any or all compensation from the Licensor. - - Article 9 - WARRANTY - -9.1. The Licensee acknowledges that the current situation as regards scientific -and technical know-how at the time when the Software was distributed did not -enable all possible uses to be tested and verified, nor for the presence of -any or all faults to be detected. In this respect, the Licensee's attention -has been drawn to the risks associated with loading, using, modifying and/or -developing and reproducing the Software that are reserved for experienced -users. - -The Licensee shall be responsible for verifying, by any or all means, the -product's suitability for its requirements, its due and proper functioning, -and for ensuring that it shall not cause damage to either persons or property. - -9.2. The Licensor hereby represents, in good faith, that it is entitled to -grant all the rights on the Software (including in particular the rights set -forth in Article 5 hereof over the Software). - -9.3. The Licensee acknowledges that the Software is supplied "as is" by the -Licensor without any or all other express or tacit warranty, other than that -provided for in Article 9.2 and, in particular, without any or all warranty -as to its market value, its secured, innovative or relevant nature. - -Specifically, the Licensor does not warrant that the Software is free from -any or all error, that it shall operate continuously, that it shall be compatible -with the Licensee's own equipment and its software configuration, nor that -it shall meet the Licensee's requirements. - -9.4. The Licensor does not either expressly or tacitly warrant that the Software -does not infringe any or all third party intellectual right relating to a -patent, software or to any or all other property right. Moreover, the Licensor -shall not hold the Licensee harmless against any or all proceedings for infringement -that may be instituted in respect of the use, modification and redistribution -of the Software. Nevertheless, should such proceedings be instituted against -the Licensee, the Licensor shall provide it with technical and legal assistance -for its defense. Such technical and legal assistance shall be decided upon -on a case-by-case basis between the relevant Licensor and the Licensee pursuant -to a memorandum of understanding. The Licensor disclaims any or all liability -as regards the Licensee's use of the Software's name. No warranty shall be -provided as regards the existence of prior rights over the name of the Software -and as regards the existence of a trademark. - - Article 10 - TERMINATION - -10.1. In the event of a breach by the Licensee of its obligations hereunder, -the Licensor may automatically terminate this Agreement thirty (30) days after -notice has been sent to the Licensee and has remained ineffective. - -10.2. The Licensee whose Agreement is terminated shall no longer be authorized -to use, modify or distribute the Software. However, any or all licenses that -it may have granted prior to termination of the Agreement shall remain valid -subject to their having been granted in compliance with the terms and conditions -hereof. - - Article 11 - MISCELLANEOUS PROVISIONS - - 11.1. EXCUSABLE EVENTS - -Neither Party shall be liable for any or all delay, or failure to perform -the Agreement, that may be attributable to an event of force majeure, an act -of God or an outside cause, such as, notably, defective functioning, or interruptions -affecting the electricity or telecommunications networks, blocking of the -network following a virus attack, the intervention of the government authorities, -natural disasters, water damage, earthquakes, fire, explosions, strikes and -labor unrest, war, etc. - -11.2. The fact that either Party may fail, on one or several occasions, to -invoke one or several of the provisions hereof, shall under no circumstances -be interpreted as being a waiver by the interested Party of its entitlement -to invoke said provision(s) subsequently. - -11.3. The Agreement cancels and replaces any or all previous agreement, whether -written or oral, between the Parties and having the same purpose, and constitutes -the entirety of the agreement between said Parties concerning said purpose. -No supplement or modification to the terms and conditions hereof shall be -effective as regards the Parties unless it is made in writing and signed by -their duly authorized representatives. - -11.4. In the event that one or several of the provisions hereof were to conflict -with a current or future applicable act or legislative text, said act or legislative -text shall take precedence, and the Parties shall make the necessary amendments -so as to be in compliance with said act or legislative text. All the other -provisions shall remain effective. Similarly, the fact that a provision of -the Agreement may be null and void, for any reason whatsoever, shall not cause -the Agreement as a whole to be null and void. - - 11.5. LANGUAGE - -The Agreement is drafted in both French and English. In the event of a conflict -as regards construction, the French version shall be deemed authentic. - - Article 12 - NEW VERSIONS OF THE AGREEMENT - -12.1. Any or all person is authorized to duplicate and distribute copies of -this Agreement. - -12.2. So as to ensure coherence, the wording of this Agreement is protected -and may only be modified by the authors of the License, that reserve the right -to periodically publish updates or new versions of the Agreement, each with -a separate number. These subsequent versions may address new issues encountered -by Free Software. - -12.3. Any or all Software distributed under a given version of the Agreement -may only be subsequently distributed under the same version of the Agreement, -or a subsequent version, subject to the provisions of article 5.3.4. - - Article 13 - GOVERNING LAW AND JURISDICTION - -13.1. The Agreement is governed by French law. The Parties agree to endeavor -to settle the disagreements or disputes that may arise during the performance -of the Agreement out-of-court. - -13.2. In the absence of an out-of-court settlement within two (2) months as -from their occurrence, and unless emergency proceedings are necessary, the -disagreements or disputes shall be referred to the Paris Courts having jurisdiction, -by the first Party to take action. - -Version 1.1 of 10/26/2004 +9.3. The Licensee acknowledges that the Software is supplied "as is" by the Licensor without any or all other express or tacit warranty, other than that provided for in Article 9.2 and, in particular, without any or all warranty as to its market value, its secured, innovative or relevant nature. + +Specifically, the Licensor does not warrant that the Software is free from any or all error, that it shall operate continuously, that it shall be compatible with the Licensee's own equipment and its software configuration, nor that it shall meet the Licensee's requirements. + +9.4. The Licensor does not either expressly or tacitly warrant that the Software does not infringe any or all third party intellectual right relating to a patent, software or to any or all other property right. Moreover, the Licensor shall not hold the Licensee harmless against any or all proceedings for infringement that may be instituted in respect of the use, modification and redistribution of the Software. Nevertheless, should such proceedings be instituted against the Licensee, the Licensor shall provide it with technical and legal assistance for its defense. Such technical and legal assistance shall be decided upon on a case-by-case basis between the relevant Licensor and the Licensee pursuant to a memorandum of understanding. The Licensor disclaims any or all liability as regards the Licensee's use of the Software's name. No warranty shall be provided as regards the existence of prior rights over the name of the Software and as regards the existence of a trademark. + +Article 10 - TERMINATION + +10.1. In the event of a breach by the Licensee of its obligations hereunder, the Licensor may automatically terminate this Agreement thirty (30) days after notice has been sent to the Licensee and has remained ineffective. + +10.2. The Licensee whose Agreement is terminated shall no longer be authorized to use, modify or distribute the Software. However, any or all licenses that it may have granted prior to termination of the Agreement shall remain valid subject to their having been granted in compliance with the terms and conditions hereof. + +Article 11 - MISCELLANEOUS PROVISIONS + +11.1. EXCUSABLE EVENTS + +Neither Party shall be liable for any or all delay, or failure to perform the Agreement, that may be attributable to an event of force majeure, an act of God or an outside cause, such as, notably, defective functioning, or interruptions affecting the electricity or telecommunications networks, blocking of the network following a virus attack, the intervention of the government authorities, natural disasters, water damage, earthquakes, fire, explosions, strikes and labor unrest, war, etc. + +11.2. The fact that either Party may fail, on one or several occasions, to invoke one or several of the provisions hereof, shall under no circumstances be interpreted as being a waiver by the interested Party of its entitlement to invoke said provision(s) subsequently. + +11.3. The Agreement cancels and replaces any or all previous agreement, whether written or oral, between the Parties and having the same purpose, and constitutes the entirety of the agreement between said Parties concerning said purpose. No supplement or modification to the terms and conditions hereof shall be effective as regards the Parties unless it is made in writing and signed by their duly authorized representatives. + +11.4. In the event that one or several of the provisions hereof were to conflict with a current or future applicable act or legislative text, said act or legislative text shall take precedence, and the Parties shall make the necessary amendments so as to be in compliance with said act or legislative text. All the other provisions shall remain effective. Similarly, the fact that a provision of the Agreement may be null and void, for any reason whatsoever, shall not cause the Agreement as a whole to be null and void. + +11.5. LANGUAGE + +The Agreement is drafted in both French and English. In the event of a conflict as regards construction, the French version shall be deemed authentic. + +Article 12 - NEW VERSIONS OF THE AGREEMENT + +12.1. Any or all person is authorized to duplicate and distribute copies of this Agreement. + +12.2. So as to ensure coherence, the wording of this Agreement is protected and may only be modified by the authors of the License, that reserve the right to periodically publish updates or new versions of the Agreement, each with a separate number. These subsequent versions may address new issues encountered by Free Software. + +12.3. Any or all Software distributed under a given version of the Agreement may only be subsequently distributed under the same version of the Agreement, or a subsequent version, subject to the provisions of article 5.3.4. + +Article 13 - GOVERNING LAW AND JURISDICTION + +13.1. The Agreement is governed by French law. The Parties agree to endeavor to settle the disagreements or disputes that may arise during the performance of the Agreement out-of-court. + +13.2. In the absence of an out-of-court settlement within two (2) months as from their occurrence, and unless emergency proceedings are necessary, the disagreements or disputes shall be referred to the Paris Courts having jurisdiction, by the first Party to take action. + + Version 1.1 of 10/26/2004 diff --git a/options/license/CECILL-2.0 b/options/license/CECILL-2.0 index 243b7dc79..f5985c07d 100644 --- a/options/license/CECILL-2.0 +++ b/options/license/CECILL-2.0 @@ -1,477 +1,506 @@ -CeCILL FREE SOFTWARE LICENSE AGREEMENT Notice -This Agreement is a Free Software license agreement that is the result of -discussions between its authors in order to ensure compliance with the two -main principles guiding its drafting: +CeCILL FREE SOFTWARE LICENSE AGREEMENT -* firstly, compliance with the principles governing the distribution of Free -Software: access to source code, broad rights granted to users, -* secondly, the election of a governing law, French law, with which it is -conformant, both as regards the law of torts and intellectual property law, -and the protection that it offers to both authors and holders of the economic -rights over software. + Notice -The authors of the CeCILL¹ license are: +This Agreement is a Free Software license agreement that is the result +of discussions between its authors in order to ensure compliance with +the two main principles guiding its drafting: - + * firstly, compliance with the principles governing the distribution + of Free Software: access to source code, broad rights granted to + users, + * secondly, the election of a governing law, French law, with which + it is conformant, both as regards the law of torts and + intellectual property law, and the protection that it offers to + both authors and holders of the economic rights over software. -Commissariat à l'Energie Atomique - CEA, a public scientific, technical and -industrial research establishment, having its principal place of business -at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. +The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) +license are: - +Commissariat à l'Energie Atomique - CEA, a public scientific, technical +and industrial research establishment, having its principal place of +business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. -Centre National de la Recherche Scientifique - CNRS, a public scientific and -technological establishment, having its principal place of business at 3 rue -Michel-Ange, 75794 Paris cedex 16, France. +Centre National de la Recherche Scientifique - CNRS, a public scientific +and technological establishment, having its principal place of business +at 3 rue Michel-Ange, 75794 Paris cedex 16, France. - +Institut National de Recherche en Informatique et en Automatique - +INRIA, a public scientific and technological establishment, having its +principal place of business at Domaine de Voluceau, Rocquencourt, BP +105, 78153 Le Chesnay cedex, France. -Institut National de Recherche en Informatique et en Automatique - INRIA, -a public scientific and technological establishment, having its principal -place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay -cedex, France. -Preamble The purpose of this Free Software license agreement is to grant users -the right to modify and redistribute the software governed by this license -within the framework of an open source distribution model. + Preamble -The exercising of these rights is conditional upon certain obligations for -users so as to preserve this status for all subsequent redistributions. +The purpose of this Free Software license agreement is to grant users +the right to modify and redistribute the software governed by this +license within the framework of an open source distribution model. -In consideration of access to the source code and the rights to copy, modify -and redistribute granted by the license, users are provided only with a limited -warranty and the software's author, the holder of the economic rights, and -the successive licensors only have limited liability. +The exercising of these rights is conditional upon certain obligations +for users so as to preserve this status for all subsequent redistributions. -In this respect, the risks associated with loading, using, modifying and/or -developing or reproducing the software by the user are brought to the user's -attention, given its Free Software status, which may make it complicated to -use, with the result that its use is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore encouraged -to load and test the suitability of the software as regards their requirements -in conditions enabling the security of their systems and/or data to be ensured -and, more generally, to use and operate it in the same conditions of security. -This Agreement may be freely reproduced and published, provided it is not -altered, and that no provisions are either added or removed herefrom. +In consideration of access to the source code and the rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors only have limited liability. -This Agreement may apply to any or all software for which the holder of the -economic rights decides to submit the use thereof to its provisions. +In this respect, the risks associated with loading, using, modifying +and/or developing or reproducing the software by the user are brought to +the user's attention, given its Free Software status, which may make it +complicated to use, with the result that its use is reserved for +developers and experienced professionals having in-depth computer +knowledge. Users are therefore encouraged to load and test the +suitability of the software as regards their requirements in conditions +enabling the security of their systems and/or data to be ensured and, +more generally, to use and operate it in the same conditions of +security. This Agreement may be freely reproduced and published, +provided it is not altered, and that no provisions are either added or +removed herefrom. - Article 1 - DEFINITIONS +This Agreement may apply to any or all software for which the holder of +the economic rights decides to submit the use thereof to its provisions. -For the purpose of this Agreement, when the following expressions commence -with a capital letter, they shall have the following meaning: - + Article 1 - DEFINITIONS -Agreement: means this license agreement, and its possible subsequent versions -and annexes. +For the purpose of this Agreement, when the following expressions +commence with a capital letter, they shall have the following meaning: - +Agreement: means this license agreement, and its possible subsequent +versions and annexes. -Software: means the software in its Object Code and/or Source Code form and, -where applicable, its documentation, "as is" when the Licensee accepts the -Agreement. +Software: means the software in its Object Code and/or Source Code form +and, where applicable, its documentation, "as is" when the Licensee +accepts the Agreement. - +Initial Software: means the Software in its Source Code and possibly its +Object Code form and, where applicable, its documentation, "as is" when +it is first distributed under the terms and conditions of the Agreement. -Initial Software: means the Software in its Source Code and possibly its Object -Code form and, where applicable, its documentation, "as is" when it is first -distributed under the terms and conditions of the Agreement. +Modified Software: means the Software modified by at least one +Contribution. - +Source Code: means all the Software's instructions and program lines to +which access is required so as to modify the Software. -Modified Software: means the Software modified by at least one Contribution. +Object Code: means the binary files originating from the compilation of +the Source Code. - +Holder: means the holder(s) of the economic rights over the Initial +Software. -Source Code: means all the Software's instructions and program lines to which -access is required so as to modify the Software. +Licensee: means the Software user(s) having accepted the Agreement. - +Contributor: means a Licensee having made at least one Contribution. -Object Code: means the binary files originating from the compilation of the -Source Code. +Licensor: means the Holder, or any other individual or legal entity, who +distributes the Software under the Agreement. - +Contribution: means any or all modifications, corrections, translations, +adaptations and/or new functions integrated into the Software by any or +all Contributors, as well as any or all Internal Modules. -Holder: means the holder(s) of the economic rights over the Initial Software. +Module: means a set of sources files including their documentation that +enables supplementary functions or services in addition to those offered +by the Software. - +External Module: means any or all Modules, not derived from the +Software, so that this Module and the Software run in separate address +spaces, with one calling the other when they are run. - Licensee: means the Software user(s) having accepted the Agreement. +Internal Module: means any or all Module, connected to the Software so +that they both execute in the same address space. - +GNU GPL: means the GNU General Public License version 2 or any +subsequent version, as published by the Free Software Foundation Inc. - Contributor: means a Licensee having made at least one Contribution. +Parties: mean both the Licensee and the Licensor. - +These expressions may be used both in singular and plural form. -Licensor: means the Holder, or any other individual or legal entity, who distributes -the Software under the Agreement. - + Article 2 - PURPOSE -Contribution: means any or all modifications, corrections, translations, adaptations -and/or new functions integrated into the Software by any or all Contributors, -as well as any or all Internal Modules. +The purpose of the Agreement is the grant by the Licensor to the +Licensee of a non-exclusive, transferable and worldwide license for the +Software as set forth in Article 5 hereinafter for the whole term of the +protection granted by the rights over said Software. - -Module: means a set of sources files including their documentation that enables -supplementary functions or services in addition to those offered by the Software. + Article 3 - ACCEPTANCE - +3.1 The Licensee shall be deemed as having accepted the terms and +conditions of this Agreement upon the occurrence of the first of the +following events: -External Module: means any or all Modules, not derived from the Software, -so that this Module and the Software run in separate address spaces, with -one calling the other when they are run. + * (i) loading the Software by any or all means, notably, by + downloading from a remote server, or by loading from a physical + medium; + * (ii) the first time the Licensee exercises any of the rights + granted hereunder. - +3.2 One copy of the Agreement, containing a notice relating to the +characteristics of the Software, to the limited warranty, and to the +fact that its use is restricted to experienced users has been provided +to the Licensee prior to its acceptance as set forth in Article 3.1 +hereinabove, and the Licensee hereby acknowledges that it has read and +understood it. -Internal Module: means any or all Module, connected to the Software so that -they both execute in the same address space. - + Article 4 - EFFECTIVE DATE AND TERM -GNU GPL: means the GNU General Public License version 2 or any subsequent -version, as published by the Free Software Foundation Inc. - - - - Parties: mean both the Licensee and the Licensor. - - These expressions may be used both in singular and plural form. - - Article 2 - PURPOSE - -The purpose of the Agreement is the grant by the Licensor to the Licensee -of a non-exclusive, transferable and worldwide license for the Software as -set forth in Article 5 hereinafter for the whole term of the protection granted -by the rights over said Software. - - Article 3 - ACCEPTANCE - -3.1 The Licensee shall be deemed as having accepted the terms and conditions -of this Agreement upon the occurrence of the first of the following events: - -(i) loading the Software by any or all means, notably, by downloading from -a remote server, or by loading from a physical medium; - -(ii) the first time the Licensee exercises any of the rights granted hereunder. - -3.2 One copy of the Agreement, containing a notice relating to the characteristics -of the Software, to the limited warranty, and to the fact that its use is -restricted to experienced users has been provided to the Licensee prior to -its acceptance as set forth in Article 3.1 hereinabove, and the Licensee hereby -acknowledges that it has read and understood it. - - Article 4 - EFFECTIVE DATE AND TERM 4.1 EFFECTIVE DATE -The Agreement shall become effective on the date when it is accepted by the -Licensee as set forth in Article 3.1. +The Agreement shall become effective on the date when it is accepted by +the Licensee as set forth in Article 3.1. + 4.2 TERM -The Agreement shall remain in force for the entire legal term of protection -of the economic rights over the Software. +The Agreement shall remain in force for the entire legal term of +protection of the economic rights over the Software. - Article 5 - SCOPE OF RIGHTS GRANTED -The Licensor hereby grants to the Licensee, who accepts, the following rights -over the Software for any or all use, and for the term of the Agreement, on -the basis of the terms and conditions set forth hereinafter. + Article 5 - SCOPE OF RIGHTS GRANTED + +The Licensor hereby grants to the Licensee, who accepts, the following +rights over the Software for any or all use, and for the term of the +Agreement, on the basis of the terms and conditions set forth hereinafter. + +Besides, if the Licensor owns or comes to own one or more patents +protecting all or part of the functions of the Software or of its +components, the Licensor undertakes not to enforce the rights granted by +these patents against successive Licensees using, exploiting or +modifying the Software. If these patents are transferred, the Licensor +undertakes to have the transferees subscribe to the obligations set +forth in this paragraph. -Besides, if the Licensor owns or comes to own one or more patents protecting -all or part of the functions of the Software or of its components, the Licensor -undertakes not to enforce the rights granted by these patents against successive -Licensees using, exploiting or modifying the Software. If these patents are -transferred, the Licensor undertakes to have the transferees subscribe to -the obligations set forth in this paragraph. 5.1 RIGHT OF USE -The Licensee is authorized to use the Software, without any limitation as -to its fields of application, with it being hereinafter specified that this -comprises: +The Licensee is authorized to use the Software, without any limitation +as to its fields of application, with it being hereinafter specified +that this comprises: -1. permanent or temporary reproduction of all or part of the Software by any -or all means and in any or all form. + 1. permanent or temporary reproduction of all or part of the Software + by any or all means and in any or all form. -2. loading, displaying, running, or storing the Software on any or all medium. + 2. loading, displaying, running, or storing the Software on any or + all medium. + + 3. entitlement to observe, study or test its operation so as to + determine the ideas and principles behind any or all constituent + elements of said Software. This shall apply when the Licensee + carries out any or all loading, displaying, running, transmission + or storage operation as regards the Software, that it is entitled + to carry out hereunder. -3. entitlement to observe, study or test its operation so as to determine -the ideas and principles behind any or all constituent elements of said Software. -This shall apply when the Licensee carries out any or all loading, displaying, -running, transmission or storage operation as regards the Software, that it -is entitled to carry out hereunder. 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS -The right to make Contributions includes the right to translate, adapt, arrange, -or make any or all modifications to the Software, and the right to reproduce -the resulting software. +The right to make Contributions includes the right to translate, adapt, +arrange, or make any or all modifications to the Software, and the right +to reproduce the resulting software. + +The Licensee is authorized to make any or all Contributions to the +Software provided that it includes an explicit notice that it is the +author of said Contribution and indicates the date of the creation thereof. -The Licensee is authorized to make any or all Contributions to the Software -provided that it includes an explicit notice that it is the author of said -Contribution and indicates the date of the creation thereof. 5.3 RIGHT OF DISTRIBUTION -In particular, the right of distribution includes the right to publish, transmit -and communicate the Software to the general public on any or all medium, and -by any or all means, and the right to market, either in consideration of a -fee, or free of charge, one or more copies of the Software by any means. +In particular, the right of distribution includes the right to publish, +transmit and communicate the Software to the general public on any or +all medium, and by any or all means, and the right to market, either in +consideration of a fee, or free of charge, one or more copies of the +Software by any means. -The Licensee is further authorized to distribute copies of the modified or -unmodified Software to third parties according to the terms and conditions -set forth hereinafter. +The Licensee is further authorized to distribute copies of the modified +or unmodified Software to third parties according to the terms and +conditions set forth hereinafter. - 5.3.1. DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION -The Licensee is authorized to distribute true copies of the Software in Source -Code or Object Code form, provided that said distribution complies with all -the provisions of the Agreement and is accompanied by: + 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION - 1. a copy of the Agreement, +The Licensee is authorized to distribute true copies of the Software in +Source Code or Object Code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, + 1. a copy of the Agreement, -and that, in the event that only the Object Code of the Software is redistributed, -the Licensee allows future Licensees unhindered access to the full Source -Code of the Software by indicating how to access it, it being understood that -the additional cost of acquiring the Source Code shall not exceed the cost -of transferring the data. + 2. a notice relating to the limitation of both the Licensor's + warranty and liability as set forth in Articles 8 and 9, - 5.3.2. DISTRIBUTION OF MODIFIED SOFTWARE - -When the Licensee makes a Contribution to the Software, the terms and conditions -for the distribution of the resulting Modified Software become subject to -all the provisions of this Agreement. - -The Licensee is authorized to distribute the Modified Software, in source -code or object code form, provided that said distribution complies with all -the provisions of the Agreement and is accompanied by: - - 1. a copy of the Agreement, - -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, - -and that, in the event that only the object code of the Modified Software -is redistributed, the Licensee allows future Licensees unhindered access to -the full source code of the Modified Software by indicating how to access -it, it being understood that the additional cost of acquiring the source code +and that, in the event that only the Object Code of the Software is +redistributed, the Licensee allows future Licensees unhindered access to +the full Source Code of the Software by indicating how to access it, it +being understood that the additional cost of acquiring the Source Code shall not exceed the cost of transferring the data. - 5.3.3. DISTRIBUTION OF EXTERNAL MODULES -When the Licensee has developed an External Module, the terms and conditions -of this Agreement do not apply to said External Module, that may be distributed -under a separate license agreement. + 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE - 5.3.4. COMPATIBILITY WITH THE GNU GPL +When the Licensee makes a Contribution to the Software, the terms and +conditions for the distribution of the resulting Modified Software +become subject to all the provisions of this Agreement. -The Licensee can include a code that is subject to the provisions of one of -the versions of the GNU GPL in the Modified or unmodified Software, and distribute -that entire code under the terms of the same version of the GNU GPL. +The Licensee is authorized to distribute the Modified Software, in +source code or object code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: -The Licensee can include the Modified or unmodified Software in a code that -is subject to the provisions of one of the versions of the GNU GPL, and distribute -that entire code under the terms of the same version of the GNU GPL. + 1. a copy of the Agreement, + + 2. a notice relating to the limitation of both the Licensor's + warranty and liability as set forth in Articles 8 and 9, + +and that, in the event that only the object code of the Modified +Software is redistributed, the Licensee allows future Licensees +unhindered access to the full source code of the Modified Software by +indicating how to access it, it being understood that the additional +cost of acquiring the source code shall not exceed the cost of +transferring the data. + + + 5.3.3 DISTRIBUTION OF EXTERNAL MODULES + +When the Licensee has developed an External Module, the terms and +conditions of this Agreement do not apply to said External Module, that +may be distributed under a separate license agreement. + + + 5.3.4 COMPATIBILITY WITH THE GNU GPL + +The Licensee can include a code that is subject to the provisions of one +of the versions of the GNU GPL in the Modified or unmodified Software, +and distribute that entire code under the terms of the same version of +the GNU GPL. + +The Licensee can include the Modified or unmodified Software in a code +that is subject to the provisions of one of the versions of the GNU GPL, +and distribute that entire code under the terms of the same version of +the GNU GPL. + + + Article 6 - INTELLECTUAL PROPERTY - Article 6 - INTELLECTUAL PROPERTY 6.1 OVER THE INITIAL SOFTWARE -The Holder owns the economic rights over the Initial Software. Any or all -use of the Initial Software is subject to compliance with the terms and conditions -under which the Holder has elected to distribute its work and no one shall -be entitled to modify the terms and conditions for the distribution of said -Initial Software. +The Holder owns the economic rights over the Initial Software. Any or +all use of the Initial Software is subject to compliance with the terms +and conditions under which the Holder has elected to distribute its work +and no one shall be entitled to modify the terms and conditions for the +distribution of said Initial Software. + +The Holder undertakes that the Initial Software will remain ruled at +least by this Agreement, for the duration set forth in Article 4.2. -The Holder undertakes that the Initial Software will remain ruled at least -by this Agreement, for the duration set forth in Article 4.2. 6.2 OVER THE CONTRIBUTIONS -The Licensee who develops a Contribution is the owner of the intellectual -property rights over this Contribution as defined by applicable law. +The Licensee who develops a Contribution is the owner of the +intellectual property rights over this Contribution as defined by +applicable law. + 6.3 OVER THE EXTERNAL MODULES -The Licensee who develops an External Module is the owner of the intellectual -property rights over this External Module as defined by applicable law and -is free to choose the type of agreement that shall govern its distribution. +The Licensee who develops an External Module is the owner of the +intellectual property rights over this External Module as defined by +applicable law and is free to choose the type of agreement that shall +govern its distribution. + 6.4 JOINT PROVISIONS - The Licensee expressly undertakes: +The Licensee expressly undertakes: -1. not to remove, or modify, in any manner, the intellectual property notices -attached to the Software; + 1. not to remove, or modify, in any manner, the intellectual property + notices attached to the Software; -2. to reproduce said notices, in an identical manner, in the copies of the -Software modified or not. + 2. to reproduce said notices, in an identical manner, in the copies + of the Software modified or not. -The Licensee undertakes not to directly or indirectly infringe the intellectual -property rights of the Holder and/or Contributors on the Software and to take, -where applicable, vis-à-vis its staff, any and all measures required to ensure -respect of said intellectual property rights of the Holder and/or Contributors. +The Licensee undertakes not to directly or indirectly infringe the +intellectual property rights of the Holder and/or Contributors on the +Software and to take, where applicable, vis-à-vis its staff, any and all +measures required to ensure respect of said intellectual property rights +of the Holder and/or Contributors. - Article 7 - RELATED SERVICES -7.1 Under no circumstances shall the Agreement oblige the Licensor to provide -technical assistance or maintenance services for the Software. + Article 7 - RELATED SERVICES -However, the Licensor is entitled to offer this type of services. The terms -and conditions of such technical assistance, and/or such maintenance, shall -be set forth in a separate instrument. Only the Licensor offering said maintenance -and/or technical assistance services shall incur liability therefor. +7.1 Under no circumstances shall the Agreement oblige the Licensor to +provide technical assistance or maintenance services for the Software. -7.2 Similarly, any Licensor is entitled to offer to its licensees, under its -sole responsibility, a warranty, that shall only be binding upon itself, for -the redistribution of the Software and/or the Modified Software, under terms -and conditions that it is free to decide. Said warranty, and the financial -terms and conditions of its application, shall be subject of a separate instrument -executed between the Licensor and the Licensee. +However, the Licensor is entitled to offer this type of services. The +terms and conditions of such technical assistance, and/or such +maintenance, shall be set forth in a separate instrument. Only the +Licensor offering said maintenance and/or technical assistance services +shall incur liability therefor. - Article 8 - LIABILITY +7.2 Similarly, any Licensor is entitled to offer to its licensees, under +its sole responsibility, a warranty, that shall only be binding upon +itself, for the redistribution of the Software and/or the Modified +Software, under terms and conditions that it is free to decide. Said +warranty, and the financial terms and conditions of its application, +shall be subject of a separate instrument executed between the Licensor +and the Licensee. -8.1 Subject to the provisions of Article 8.2, the Licensee shall be entitled -to claim compensation for any direct loss it may have suffered from the Software -as a result of a fault on the part of the relevant Licensor, subject to providing -evidence thereof. -8.2 The Licensor's liability is limited to the commitments made under this -Agreement and shall not be incurred as a result of in particular: (i) loss -due the Licensee's total or partial failure to fulfill its obligations, (ii) -direct or consequential loss that is suffered by the Licensee due to the use -or performance of the Software, and (iii) more generally, any consequential -loss. In particular the Parties expressly agree that any or all pecuniary -or business loss (i.e. loss of data, loss of profits, operating loss, loss -of customers or orders, opportunity cost, any disturbance to business activities) -or any or all legal proceedings instituted against the Licensee by a third -party, shall constitute consequential loss and shall not provide entitlement -to any or all compensation from the Licensor. + Article 8 - LIABILITY - Article 9 - WARRANTY +8.1 Subject to the provisions of Article 8.2, the Licensee shall be +entitled to claim compensation for any direct loss it may have suffered +from the Software as a result of a fault on the part of the relevant +Licensor, subject to providing evidence thereof. -9.1 The Licensee acknowledges that the scientific and technical state-of-the-art -when the Software was distributed did not enable all possible uses to be tested -and verified, nor for the presence of possible defects to be detected. In -this respect, the Licensee's attention has been drawn to the risks associated -with loading, using, modifying and/or developing and reproducing the Software -which are reserved for experienced users. +8.2 The Licensor's liability is limited to the commitments made under +this Agreement and shall not be incurred as a result of in particular: +(i) loss due the Licensee's total or partial failure to fulfill its +obligations, (ii) direct or consequential loss that is suffered by the +Licensee due to the use or performance of the Software, and (iii) more +generally, any consequential loss. In particular the Parties expressly +agree that any or all pecuniary or business loss (i.e. loss of data, +loss of profits, operating loss, loss of customers or orders, +opportunity cost, any disturbance to business activities) or any or all +legal proceedings instituted against the Licensee by a third party, +shall constitute consequential loss and shall not provide entitlement to +any or all compensation from the Licensor. -The Licensee shall be responsible for verifying, by any or all means, the -suitability of the product for its requirements, its good working order, and -for ensuring that it shall not cause damage to either persons or properties. -9.2 The Licensor hereby represents, in good faith, that it is entitled to -grant all the rights over the Software (including in particular the rights -set forth in Article 5). + Article 9 - WARRANTY -9.3 The Licensee acknowledges that the Software is supplied "as is" by the -Licensor without any other express or tacit warranty, other than that provided -for in Article 9.2 and, in particular, without any warranty as to its commercial -value, its secured, safe, innovative or relevant nature. +9.1 The Licensee acknowledges that the scientific and technical +state-of-the-art when the Software was distributed did not enable all +possible uses to be tested and verified, nor for the presence of +possible defects to be detected. In this respect, the Licensee's +attention has been drawn to the risks associated with loading, using, +modifying and/or developing and reproducing the Software which are +reserved for experienced users. -Specifically, the Licensor does not warrant that the Software is free from -any error, that it will operate without interruption, that it will be compatible -with the Licensee's own equipment and software configuration, nor that it -will meet the Licensee's requirements. +The Licensee shall be responsible for verifying, by any or all means, +the suitability of the product for its requirements, its good working +order, and for ensuring that it shall not cause damage to either persons +or properties. -9.4 The Licensor does not either expressly or tacitly warrant that the Software -does not infringe any third party intellectual property right relating to -a patent, software or any other property right. Therefore, the Licensor disclaims -any and all liability towards the Licensee arising out of any or all proceedings -for infringement that may be instituted in respect of the use, modification -and redistribution of the Software. Nevertheless, should such proceedings -be instituted against the Licensee, the Licensor shall provide it with technical -and legal assistance for its defense. Such technical and legal assistance -shall be decided on a case-by-case basis between the relevant Licensor and -the Licensee pursuant to a memorandum of understanding. The Licensor disclaims -any and all liability as regards the Licensee's use of the name of the Software. -No warranty is given as regards the existence of prior rights over the name -of the Software or as regards the existence of a trademark. +9.2 The Licensor hereby represents, in good faith, that it is entitled +to grant all the rights over the Software (including in particular the +rights set forth in Article 5). - Article 10 - TERMINATION +9.3 The Licensee acknowledges that the Software is supplied "as is" by +the Licensor without any other express or tacit warranty, other than +that provided for in Article 9.2 and, in particular, without any warranty +as to its commercial value, its secured, safe, innovative or relevant +nature. -10.1 In the event of a breach by the Licensee of its obligations hereunder, -the Licensor may automatically terminate this Agreement thirty (30) days after -notice has been sent to the Licensee and has remained ineffective. +Specifically, the Licensor does not warrant that the Software is free +from any error, that it will operate without interruption, that it will +be compatible with the Licensee's own equipment and software +configuration, nor that it will meet the Licensee's requirements. -10.2 A Licensee whose Agreement is terminated shall no longer be authorized -to use, modify or distribute the Software. However, any licenses that it may -have granted prior to termination of the Agreement shall remain valid subject -to their having been granted in compliance with the terms and conditions hereof. +9.4 The Licensor does not either expressly or tacitly warrant that the +Software does not infringe any third party intellectual property right +relating to a patent, software or any other property right. Therefore, +the Licensor disclaims any and all liability towards the Licensee +arising out of any or all proceedings for infringement that may be +instituted in respect of the use, modification and redistribution of the +Software. Nevertheless, should such proceedings be instituted against +the Licensee, the Licensor shall provide it with technical and legal +assistance for its defense. Such technical and legal assistance shall be +decided on a case-by-case basis between the relevant Licensor and the +Licensee pursuant to a memorandum of understanding. The Licensor +disclaims any and all liability as regards the Licensee's use of the +name of the Software. No warranty is given as regards the existence of +prior rights over the name of the Software or as regards the existence +of a trademark. + + + Article 10 - TERMINATION + +10.1 In the event of a breach by the Licensee of its obligations +hereunder, the Licensor may automatically terminate this Agreement +thirty (30) days after notice has been sent to the Licensee and has +remained ineffective. + +10.2 A Licensee whose Agreement is terminated shall no longer be +authorized to use, modify or distribute the Software. However, any +licenses that it may have granted prior to termination of the Agreement +shall remain valid subject to their having been granted in compliance +with the terms and conditions hereof. + + + Article 11 - MISCELLANEOUS - Article 11 - MISCELLANEOUS 11.1 EXCUSABLE EVENTS -Neither Party shall be liable for any or all delay, or failure to perform -the Agreement, that may be attributable to an event of force majeure, an act -of God or an outside cause, such as defective functioning or interruptions -of the electricity or telecommunications networks, network paralysis following -a virus attack, intervention by government authorities, natural disasters, -water damage, earthquakes, fire, explosions, strikes and labor unrest, war, -etc. +Neither Party shall be liable for any or all delay, or failure to +perform the Agreement, that may be attributable to an event of force +majeure, an act of God or an outside cause, such as defective +functioning or interruptions of the electricity or telecommunications +networks, network paralysis following a virus attack, intervention by +government authorities, natural disasters, water damage, earthquakes, +fire, explosions, strikes and labor unrest, war, etc. -11.2 Any failure by either Party, on one or more occasions, to invoke one -or more of the provisions hereof, shall under no circumstances be interpreted -as being a waiver by the interested Party of its right to invoke said provision(s) -subsequently. +11.2 Any failure by either Party, on one or more occasions, to invoke +one or more of the provisions hereof, shall under no circumstances be +interpreted as being a waiver by the interested Party of its right to +invoke said provision(s) subsequently. -11.3 The Agreement cancels and replaces any or all previous agreements, whether -written or oral, between the Parties and having the same purpose, and constitutes -the entirety of the agreement between said Parties concerning said purpose. -No supplement or modification to the terms and conditions hereof shall be -effective as between the Parties unless it is made in writing and signed by -their duly authorized representatives. +11.3 The Agreement cancels and replaces any or all previous agreements, +whether written or oral, between the Parties and having the same +purpose, and constitutes the entirety of the agreement between said +Parties concerning said purpose. No supplement or modification to the +terms and conditions hereof shall be effective as between the Parties +unless it is made in writing and signed by their duly authorized +representatives. + +11.4 In the event that one or more of the provisions hereof were to +conflict with a current or future applicable act or legislative text, +said act or legislative text shall prevail, and the Parties shall make +the necessary amendments so as to comply with said act or legislative +text. All other provisions shall remain effective. Similarly, invalidity +of a provision of the Agreement, for any reason whatsoever, shall not +cause the Agreement as a whole to be invalid. -11.4 In the event that one or more of the provisions hereof were to conflict -with a current or future applicable act or legislative text, said act or legislative -text shall prevail, and the Parties shall make the necessary amendments so -as to comply with said act or legislative text. All other provisions shall -remain effective. Similarly, invalidity of a provision of the Agreement, for -any reason whatsoever, shall not cause the Agreement as a whole to be invalid. 11.5 LANGUAGE -The Agreement is drafted in both French and English and both versions are -deemed authentic. +The Agreement is drafted in both French and English and both versions +are deemed authentic. - Article 12 - NEW VERSIONS OF THE AGREEMENT -12.1 Any person is authorized to duplicate and distribute copies of this Agreement. + Article 12 - NEW VERSIONS OF THE AGREEMENT -12.2 So as to ensure coherence, the wording of this Agreement is protected -and may only be modified by the authors of the License, who reserve the right -to periodically publish updates or new versions of the Agreement, each with -a separate number. These subsequent versions may address new issues encountered -by Free Software. +12.1 Any person is authorized to duplicate and distribute copies of this +Agreement. -12.3 Any Software distributed under a given version of the Agreement may only -be subsequently distributed under the same version of the Agreement or a subsequent -version, subject to the provisions of Article 5.3.4. +12.2 So as to ensure coherence, the wording of this Agreement is +protected and may only be modified by the authors of the License, who +reserve the right to periodically publish updates or new versions of the +Agreement, each with a separate number. These subsequent versions may +address new issues encountered by Free Software. - Article 13 - GOVERNING LAW AND JURISDICTION +12.3 Any Software distributed under a given version of the Agreement may +only be subsequently distributed under the same version of the Agreement +or a subsequent version, subject to the provisions of Article 5.3.4. -13.1 The Agreement is governed by French law. The Parties agree to endeavor -to seek an amicable solution to any disagreements or disputes that may arise -during the performance of the Agreement. -13.2 Failing an amicable solution within two (2) months as from their occurrence, -and unless emergency proceedings are necessary, the disagreements or disputes -shall be referred to the Paris Courts having jurisdiction, by the more diligent -Party. + Article 13 - GOVERNING LAW AND JURISDICTION -Version 2.0 dated 2006-09-05. 1 CeCILL stands for Ce(a) C(nrs) I(nria) L(ogiciel) -L(ibre) +13.1 The Agreement is governed by French law. The Parties agree to +endeavor to seek an amicable solution to any disagreements or disputes +that may arise during the performance of the Agreement. + +13.2 Failing an amicable solution within two (2) months as from their +occurrence, and unless emergency proceedings are necessary, the +disagreements or disputes shall be referred to the Paris Courts having +jurisdiction, by the more diligent Party. + + +Version 2.0 dated 2006-09-05. diff --git a/options/license/CECILL-2.1 b/options/license/CECILL-2.1 index 44d7b7663..d290c0694 100644 --- a/options/license/CECILL-2.1 +++ b/options/license/CECILL-2.1 @@ -1,493 +1,518 @@ -CeCILL FREE SOFTWARE LICENSE AGREEMENT -Version 2.1 dated 2013-06-21 Notice + CeCILL FREE SOFTWARE LICENSE AGREEMENT -This Agreement is a Free Software license agreement that is the result of -discussions between its authors in order to ensure compliance with the two -main principles guiding its drafting: +Version 2.1 dated 2013-06-21 -* firstly, compliance with the principles governing the distribution of Free -Software: access to source code, broad rights granted to users, -* secondly, the election of a governing law, French law, with which it is -conformant, both as regards the law of torts and intellectual property law, -and the protection that it offers to both authors and holders of the economic -rights over software. + Notice -The authors of the CeCILL¹ license are: +This Agreement is a Free Software license agreement that is the result +of discussions between its authors in order to ensure compliance with +the two main principles guiding its drafting: - + * firstly, compliance with the principles governing the distribution + of Free Software: access to source code, broad rights granted to users, + * secondly, the election of a governing law, French law, with which it + is conformant, both as regards the law of torts and intellectual + property law, and the protection that it offers to both authors and + holders of the economic rights over software. -Commissariat à l'énergie atomique et aux énergies alternatives - CEA, a public -scientific, technical and industrial research establishment, having its principal -place of business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. +The authors of the CeCILL (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) +license are: - +Commissariat à l'énergie atomique et aux énergies alternatives - CEA, a +public scientific, technical and industrial research establishment, +having its principal place of business at 25 rue Leblanc, immeuble Le +Ponant D, 75015 Paris, France. -Centre National de la Recherche Scientifique - CNRS, a public scientific and -technological establishment, having its principal place of business at 3 rue -Michel-Ange, 75794 Paris cedex 16, France. +Centre National de la Recherche Scientifique - CNRS, a public scientific +and technological establishment, having its principal place of business +at 3 rue Michel-Ange, 75794 Paris cedex 16, France. - +Institut National de Recherche en Informatique et en Automatique - +Inria, a public scientific and technological establishment, having its +principal place of business at Domaine de Voluceau, Rocquencourt, BP +105, 78153 Le Chesnay cedex, France. -Institut National de Recherche en Informatique et en Automatique - Inria, -a public scientific and technological establishment, having its principal -place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay -cedex, France. -Preamble The purpose of this Free Software license agreement is to grant users -the right to modify and redistribute the software governed by this license -within the framework of an open source distribution model. + Preamble -The exercising of this right is conditional upon certain obligations for users -so as to preserve this status for all subsequent redistributions. +The purpose of this Free Software license agreement is to grant users +the right to modify and redistribute the software governed by this +license within the framework of an open source distribution model. -In consideration of access to the source code and the rights to copy, modify -and redistribute granted by the license, users are provided only with a limited -warranty and the software's author, the holder of the economic rights, and -the successive licensors only have limited liability. +The exercising of this right is conditional upon certain obligations for +users so as to preserve this status for all subsequent redistributions. -In this respect, the risks associated with loading, using, modifying and/or -developing or reproducing the software by the user are brought to the user's -attention, given its Free Software status, which may make it complicated to -use, with the result that its use is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore encouraged -to load and test the suitability of the software as regards their requirements -in conditions enabling the security of their systems and/or data to be ensured -and, more generally, to use and operate it in the same conditions of security. -This Agreement may be freely reproduced and published, provided it is not -altered, and that no provisions are either added or removed herefrom. +In consideration of access to the source code and the rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors only have limited liability. -This Agreement may apply to any or all software for which the holder of the -economic rights decides to submit the use thereof to its provisions. +In this respect, the risks associated with loading, using, modifying +and/or developing or reproducing the software by the user are brought to +the user's attention, given its Free Software status, which may make it +complicated to use, with the result that its use is reserved for +developers and experienced professionals having in-depth computer +knowledge. Users are therefore encouraged to load and test the +suitability of the software as regards their requirements in conditions +enabling the security of their systems and/or data to be ensured and, +more generally, to use and operate it in the same conditions of +security. This Agreement may be freely reproduced and published, +provided it is not altered, and that no provisions are either added or +removed herefrom. -Frequently asked questions can be found on the official website of the CeCILL -licenses family (http://www.cecill.info/index.en.html) for any necessary clarification. +This Agreement may apply to any or all software for which the holder of +the economic rights decides to submit the use thereof to its provisions. - Article 1 - DEFINITIONS +Frequently asked questions can be found on the official website of the +CeCILL licenses family (http://www.cecill.info/index.en.html) for any +necessary clarification. -For the purpose of this Agreement, when the following expressions commence -with a capital letter, they shall have the following meaning: - + Article 1 - DEFINITIONS -Agreement: means this license agreement, and its possible subsequent versions -and annexes. +For the purpose of this Agreement, when the following expressions +commence with a capital letter, they shall have the following meaning: - +Agreement: means this license agreement, and its possible subsequent +versions and annexes. -Software: means the software in its Object Code and/or Source Code form and, -where applicable, its documentation, "as is" when the Licensee accepts the -Agreement. +Software: means the software in its Object Code and/or Source Code form +and, where applicable, its documentation, "as is" when the Licensee +accepts the Agreement. - +Initial Software: means the Software in its Source Code and possibly its +Object Code form and, where applicable, its documentation, "as is" when +it is first distributed under the terms and conditions of the Agreement. -Initial Software: means the Software in its Source Code and possibly its Object -Code form and, where applicable, its documentation, "as is" when it is first -distributed under the terms and conditions of the Agreement. +Modified Software: means the Software modified by at least one +Contribution. - +Source Code: means all the Software's instructions and program lines to +which access is required so as to modify the Software. -Modified Software: means the Software modified by at least one Contribution. +Object Code: means the binary files originating from the compilation of +the Source Code. - +Holder: means the holder(s) of the economic rights over the Initial +Software. -Source Code: means all the Software's instructions and program lines to which -access is required so as to modify the Software. +Licensee: means the Software user(s) having accepted the Agreement. - +Contributor: means a Licensee having made at least one Contribution. -Object Code: means the binary files originating from the compilation of the -Source Code. +Licensor: means the Holder, or any other individual or legal entity, who +distributes the Software under the Agreement. - +Contribution: means any or all modifications, corrections, translations, +adaptations and/or new functions integrated into the Software by any or +all Contributors, as well as any or all Internal Modules. -Holder: means the holder(s) of the economic rights over the Initial Software. +Module: means a set of sources files including their documentation that +enables supplementary functions or services in addition to those offered +by the Software. - +External Module: means any or all Modules, not derived from the +Software, so that this Module and the Software run in separate address +spaces, with one calling the other when they are run. - Licensee: means the Software user(s) having accepted the Agreement. +Internal Module: means any or all Module, connected to the Software so +that they both execute in the same address space. - - - Contributor: means a Licensee having made at least one Contribution. - - - -Licensor: means the Holder, or any other individual or legal entity, who distributes -the Software under the Agreement. - - - -Contribution: means any or all modifications, corrections, translations, adaptations -and/or new functions integrated into the Software by any or all Contributors, -as well as any or all Internal Modules. - - - -Module: means a set of sources files including their documentation that enables -supplementary functions or services in addition to those offered by the Software. - - - -External Module: means any or all Modules, not derived from the Software, -so that this Module and the Software run in separate address spaces, with -one calling the other when they are run. - - - -Internal Module: means any or all Module, connected to the Software so that -they both execute in the same address space. - - - -GNU GPL: means the GNU General Public License version 2 or any subsequent -version, as published by the Free Software Foundation Inc. - - - -GNU Affero GPL: means the GNU Affero General Public License version 3 or any +GNU GPL: means the GNU General Public License version 2 or any subsequent version, as published by the Free Software Foundation Inc. - +GNU Affero GPL: means the GNU Affero General Public License version 3 or +any subsequent version, as published by the Free Software Foundation Inc. -EUPL: means the European Union Public License version 1.1 or any subsequent -version, as published by the European Commission. +EUPL: means the European Union Public License version 1.1 or any +subsequent version, as published by the European Commission. - +Parties: mean both the Licensee and the Licensor. - Parties: mean both the Licensee and the Licensor. +These expressions may be used both in singular and plural form. - These expressions may be used both in singular and plural form. - Article 2 - PURPOSE + Article 2 - PURPOSE -The purpose of the Agreement is the grant by the Licensor to the Licensee -of a non-exclusive, transferable and worldwide license for the Software as -set forth in Article 5 <#scope> hereinafter for the whole term of the protection -granted by the rights over said Software. +The purpose of the Agreement is the grant by the Licensor to the +Licensee of a non-exclusive, transferable and worldwide license for the +Software as set forth in Article 5 <#scope> hereinafter for the whole +term of the protection granted by the rights over said Software. - Article 3 - ACCEPTANCE -3.1 The Licensee shall be deemed as having accepted the terms and conditions -of this Agreement upon the occurrence of the first of the following events: + Article 3 - ACCEPTANCE -(i) loading the Software by any or all means, notably, by downloading from -a remote server, or by loading from a physical medium; +3.1 The Licensee shall be deemed as having accepted the terms and +conditions of this Agreement upon the occurrence of the first of the +following events: -(ii) the first time the Licensee exercises any of the rights granted hereunder. + * (i) loading the Software by any or all means, notably, by + downloading from a remote server, or by loading from a physical medium; + * (ii) the first time the Licensee exercises any of the rights granted + hereunder. -3.2 One copy of the Agreement, containing a notice relating to the characteristics -of the Software, to the limited warranty, and to the fact that its use is -restricted to experienced users has been provided to the Licensee prior to -its acceptance as set forth in Article 3.1 <#accepting> hereinabove, and the -Licensee hereby acknowledges that it has read and understood it. +3.2 One copy of the Agreement, containing a notice relating to the +characteristics of the Software, to the limited warranty, and to the +fact that its use is restricted to experienced users has been provided +to the Licensee prior to its acceptance as set forth in Article 3.1 +<#accepting> hereinabove, and the Licensee hereby acknowledges that it +has read and understood it. + + + Article 4 - EFFECTIVE DATE AND TERM - Article 4 - EFFECTIVE DATE AND TERM 4.1 EFFECTIVE DATE -The Agreement shall become effective on the date when it is accepted by the -Licensee as set forth in Article 3.1 <#accepting> . +The Agreement shall become effective on the date when it is accepted by +the Licensee as set forth in Article 3.1 <#accepting>. + 4.2 TERM -The Agreement shall remain in force for the entire legal term of protection -of the economic rights over the Software. +The Agreement shall remain in force for the entire legal term of +protection of the economic rights over the Software. - Article 5 - SCOPE OF RIGHTS GRANTED -The Licensor hereby grants to the Licensee, who accepts, the following rights -over the Software for any or all use, and for the term of the Agreement, on -the basis of the terms and conditions set forth hereinafter. + Article 5 - SCOPE OF RIGHTS GRANTED + +The Licensor hereby grants to the Licensee, who accepts, the following +rights over the Software for any or all use, and for the term of the +Agreement, on the basis of the terms and conditions set forth hereinafter. + +Besides, if the Licensor owns or comes to own one or more patents +protecting all or part of the functions of the Software or of its +components, the Licensor undertakes not to enforce the rights granted by +these patents against successive Licensees using, exploiting or +modifying the Software. If these patents are transferred, the Licensor +undertakes to have the transferees subscribe to the obligations set +forth in this paragraph. -Besides, if the Licensor owns or comes to own one or more patents protecting -all or part of the functions of the Software or of its components, the Licensor -undertakes not to enforce the rights granted by these patents against successive -Licensees using, exploiting or modifying the Software. If these patents are -transferred, the Licensor undertakes to have the transferees subscribe to -the obligations set forth in this paragraph. 5.1 RIGHT OF USE -The Licensee is authorized to use the Software, without any limitation as -to its fields of application, with it being hereinafter specified that this -comprises: +The Licensee is authorized to use the Software, without any limitation +as to its fields of application, with it being hereinafter specified +that this comprises: -1. permanent or temporary reproduction of all or part of the Software by any -or all means and in any or all form. + 1. permanent or temporary reproduction of all or part of the Software + by any or all means and in any or all form. -2. loading, displaying, running, or storing the Software on any or all medium. + 2. loading, displaying, running, or storing the Software on any or all + medium. + + 3. entitlement to observe, study or test its operation so as to + determine the ideas and principles behind any or all constituent + elements of said Software. This shall apply when the Licensee + carries out any or all loading, displaying, running, transmission or + storage operation as regards the Software, that it is entitled to + carry out hereunder. -3. entitlement to observe, study or test its operation so as to determine -the ideas and principles behind any or all constituent elements of said Software. -This shall apply when the Licensee carries out any or all loading, displaying, -running, transmission or storage operation as regards the Software, that it -is entitled to carry out hereunder. 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS -The right to make Contributions includes the right to translate, adapt, arrange, -or make any or all modifications to the Software, and the right to reproduce -the resulting software. +The right to make Contributions includes the right to translate, adapt, +arrange, or make any or all modifications to the Software, and the right +to reproduce the resulting software. + +The Licensee is authorized to make any or all Contributions to the +Software provided that it includes an explicit notice that it is the +author of said Contribution and indicates the date of the creation thereof. -The Licensee is authorized to make any or all Contributions to the Software -provided that it includes an explicit notice that it is the author of said -Contribution and indicates the date of the creation thereof. 5.3 RIGHT OF DISTRIBUTION -In particular, the right of distribution includes the right to publish, transmit -and communicate the Software to the general public on any or all medium, and -by any or all means, and the right to market, either in consideration of a -fee, or free of charge, one or more copies of the Software by any means. +In particular, the right of distribution includes the right to publish, +transmit and communicate the Software to the general public on any or +all medium, and by any or all means, and the right to market, either in +consideration of a fee, or free of charge, one or more copies of the +Software by any means. -The Licensee is further authorized to distribute copies of the modified or -unmodified Software to third parties according to the terms and conditions -set forth hereinafter. +The Licensee is further authorized to distribute copies of the modified +or unmodified Software to third parties according to the terms and +conditions set forth hereinafter. - 5.3.1. DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION -The Licensee is authorized to distribute true copies of the Software in Source -Code or Object Code form, provided that said distribution complies with all -the provisions of the Agreement and is accompanied by: + 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION - 1. a copy of the Agreement, +The Licensee is authorized to distribute true copies of the Software in +Source Code or Object Code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, + 1. a copy of the Agreement, -and that, in the event that only the Object Code of the Software is redistributed, -the Licensee allows effective access to the full Source Code of the Software -for a period of at least three years from the distribution of the Software, -it being understood that the additional acquisition cost of the Source Code -shall not exceed the cost of the data transfer. + 2. a notice relating to the limitation of both the Licensor's warranty + and liability as set forth in Articles 8 and 9, - 5.3.2. DISTRIBUTION OF MODIFIED SOFTWARE +and that, in the event that only the Object Code of the Software is +redistributed, the Licensee allows effective access to the full Source +Code of the Software for a period of at least three years from the +distribution of the Software, it being understood that the additional +acquisition cost of the Source Code shall not exceed the cost of the +data transfer. -When the Licensee makes a Contribution to the Software, the terms and conditions -for the distribution of the resulting Modified Software become subject to -all the provisions of this Agreement. -The Licensee is authorized to distribute the Modified Software, in source -code or object code form, provided that said distribution complies with all -the provisions of the Agreement and is accompanied by: + 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE - 1. a copy of the Agreement, +When the Licensee makes a Contribution to the Software, the terms and +conditions for the distribution of the resulting Modified Software +become subject to all the provisions of this Agreement. -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, +The Licensee is authorized to distribute the Modified Software, in +source code or object code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: -and, in the event that only the object code of the Modified Software is redistributed, + 1. a copy of the Agreement, -3. a note stating the conditions of effective access to the full source code -of the Modified Software for a period of at least three years from the distribution -of the Modified Software, it being understood that the additional acquisition -cost of the source code shall not exceed the cost of the data transfer. + 2. a notice relating to the limitation of both the Licensor's warranty + and liability as set forth in Articles 8 and 9, - 5.3.3. DISTRIBUTION OF EXTERNAL MODULES +and, in the event that only the object code of the Modified Software is +redistributed, -When the Licensee has developed an External Module, the terms and conditions -of this Agreement do not apply to said External Module, that may be distributed -under a separate license agreement. + 3. a note stating the conditions of effective access to the full source + code of the Modified Software for a period of at least three years + from the distribution of the Modified Software, it being understood + that the additional acquisition cost of the source code shall not + exceed the cost of the data transfer. - 5.3.4. COMPATIBILITY WITH OTHER LICENSES -The Licensee can include a code that is subject to the provisions of one of -the versions of the GNU GPL, GNU Affero GPL and/or EUPL in the Modified or -unmodified Software, and distribute that entire code under the terms of the -same version of the GNU GPL, GNU Affero GPL and/or EUPL. + 5.3.3 DISTRIBUTION OF EXTERNAL MODULES -The Licensee can include the Modified or unmodified Software in a code that -is subject to the provisions of one of the versions of the GNU GPL, GNU Affero -GPL and/or EUPL and distribute that entire code under the terms of the same -version of the GNU GPL, GNU Affero GPL and/or EUPL. +When the Licensee has developed an External Module, the terms and +conditions of this Agreement do not apply to said External Module, that +may be distributed under a separate license agreement. + + + 5.3.4 COMPATIBILITY WITH OTHER LICENSES + +The Licensee can include a code that is subject to the provisions of one +of the versions of the GNU GPL, GNU Affero GPL and/or EUPL in the +Modified or unmodified Software, and distribute that entire code under +the terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL. + +The Licensee can include the Modified or unmodified Software in a code +that is subject to the provisions of one of the versions of the GNU GPL, +GNU Affero GPL and/or EUPL and distribute that entire code under the +terms of the same version of the GNU GPL, GNU Affero GPL and/or EUPL. + + + Article 6 - INTELLECTUAL PROPERTY - Article 6 - INTELLECTUAL PROPERTY 6.1 OVER THE INITIAL SOFTWARE -The Holder owns the economic rights over the Initial Software. Any or all -use of the Initial Software is subject to compliance with the terms and conditions -under which the Holder has elected to distribute its work and no one shall -be entitled to modify the terms and conditions for the distribution of said -Initial Software. +The Holder owns the economic rights over the Initial Software. Any or +all use of the Initial Software is subject to compliance with the terms +and conditions under which the Holder has elected to distribute its work +and no one shall be entitled to modify the terms and conditions for the +distribution of said Initial Software. + +The Holder undertakes that the Initial Software will remain ruled at +least by this Agreement, for the duration set forth in Article 4.2 <#term>. -The Holder undertakes that the Initial Software will remain ruled at least -by this Agreement, for the duration set forth in Article 4.2 <#term> . 6.2 OVER THE CONTRIBUTIONS -The Licensee who develops a Contribution is the owner of the intellectual -property rights over this Contribution as defined by applicable law. +The Licensee who develops a Contribution is the owner of the +intellectual property rights over this Contribution as defined by +applicable law. + 6.3 OVER THE EXTERNAL MODULES -The Licensee who develops an External Module is the owner of the intellectual -property rights over this External Module as defined by applicable law and -is free to choose the type of agreement that shall govern its distribution. +The Licensee who develops an External Module is the owner of the +intellectual property rights over this External Module as defined by +applicable law and is free to choose the type of agreement that shall +govern its distribution. + 6.4 JOINT PROVISIONS - The Licensee expressly undertakes: +The Licensee expressly undertakes: -1. not to remove, or modify, in any manner, the intellectual property notices -attached to the Software; + 1. not to remove, or modify, in any manner, the intellectual property + notices attached to the Software; -2. to reproduce said notices, in an identical manner, in the copies of the -Software modified or not. + 2. to reproduce said notices, in an identical manner, in the copies of + the Software modified or not. -The Licensee undertakes not to directly or indirectly infringe the intellectual -property rights on the Software of the Holder and/or Contributors, and to -take, where applicable, vis-à-vis its staff, any and all measures required -to ensure respect of said intellectual property rights of the Holder and/or -Contributors. +The Licensee undertakes not to directly or indirectly infringe the +intellectual property rights on the Software of the Holder and/or +Contributors, and to take, where applicable, vis-à-vis its staff, any +and all measures required to ensure respect of said intellectual +property rights of the Holder and/or Contributors. - Article 7 - RELATED SERVICES -7.1 Under no circumstances shall the Agreement oblige the Licensor to provide -technical assistance or maintenance services for the Software. + Article 7 - RELATED SERVICES -However, the Licensor is entitled to offer this type of services. The terms -and conditions of such technical assistance, and/or such maintenance, shall -be set forth in a separate instrument. Only the Licensor offering said maintenance -and/or technical assistance services shall incur liability therefor. +7.1 Under no circumstances shall the Agreement oblige the Licensor to +provide technical assistance or maintenance services for the Software. -7.2 Similarly, any Licensor is entitled to offer to its licensees, under its -sole responsibility, a warranty, that shall only be binding upon itself, for -the redistribution of the Software and/or the Modified Software, under terms -and conditions that it is free to decide. Said warranty, and the financial -terms and conditions of its application, shall be subject of a separate instrument -executed between the Licensor and the Licensee. +However, the Licensor is entitled to offer this type of services. The +terms and conditions of such technical assistance, and/or such +maintenance, shall be set forth in a separate instrument. Only the +Licensor offering said maintenance and/or technical assistance services +shall incur liability therefor. - Article 8 - LIABILITY +7.2 Similarly, any Licensor is entitled to offer to its licensees, under +its sole responsibility, a warranty, that shall only be binding upon +itself, for the redistribution of the Software and/or the Modified +Software, under terms and conditions that it is free to decide. Said +warranty, and the financial terms and conditions of its application, +shall be subject of a separate instrument executed between the Licensor +and the Licensee. -8.1 Subject to the provisions of Article 8.2, the Licensee shall be entitled -to claim compensation for any direct loss it may have suffered from the Software -as a result of a fault on the part of the relevant Licensor, subject to providing -evidence thereof. -8.2 The Licensor's liability is limited to the commitments made under this -Agreement and shall not be incurred as a result of in particular: (i) loss -due the Licensee's total or partial failure to fulfill its obligations, (ii) -direct or consequential loss that is suffered by the Licensee due to the use -or performance of the Software, and (iii) more generally, any consequential -loss. In particular the Parties expressly agree that any or all pecuniary -or business loss (i.e. loss of data, loss of profits, operating loss, loss -of customers or orders, opportunity cost, any disturbance to business activities) -or any or all legal proceedings instituted against the Licensee by a third -party, shall constitute consequential loss and shall not provide entitlement -to any or all compensation from the Licensor. + Article 8 - LIABILITY - Article 9 - WARRANTY +8.1 Subject to the provisions of Article 8.2, the Licensee shall be +entitled to claim compensation for any direct loss it may have suffered +from the Software as a result of a fault on the part of the relevant +Licensor, subject to providing evidence thereof. -9.1 The Licensee acknowledges that the scientific and technical state-of-the-art -when the Software was distributed did not enable all possible uses to be tested -and verified, nor for the presence of possible defects to be detected. In -this respect, the Licensee's attention has been drawn to the risks associated -with loading, using, modifying and/or developing and reproducing the Software -which are reserved for experienced users. +8.2 The Licensor's liability is limited to the commitments made under +this Agreement and shall not be incurred as a result of in particular: +(i) loss due the Licensee's total or partial failure to fulfill its +obligations, (ii) direct or consequential loss that is suffered by the +Licensee due to the use or performance of the Software, and (iii) more +generally, any consequential loss. In particular the Parties expressly +agree that any or all pecuniary or business loss (i.e. loss of data, +loss of profits, operating loss, loss of customers or orders, +opportunity cost, any disturbance to business activities) or any or all +legal proceedings instituted against the Licensee by a third party, +shall constitute consequential loss and shall not provide entitlement to +any or all compensation from the Licensor. -The Licensee shall be responsible for verifying, by any or all means, the -suitability of the product for its requirements, its good working order, and -for ensuring that it shall not cause damage to either persons or properties. -9.2 The Licensor hereby represents, in good faith, that it is entitled to -grant all the rights over the Software (including in particular the rights -set forth in Article 5 <#scope> ). + Article 9 - WARRANTY -9.3 The Licensee acknowledges that the Software is supplied "as is" by the -Licensor without any other express or tacit warranty, other than that provided -for in Article 9.2 <#good-faith> and, in particular, without any warranty -as to its commercial value, its secured, safe, innovative or relevant nature. +9.1 The Licensee acknowledges that the scientific and technical +state-of-the-art when the Software was distributed did not enable all +possible uses to be tested and verified, nor for the presence of +possible defects to be detected. In this respect, the Licensee's +attention has been drawn to the risks associated with loading, using, +modifying and/or developing and reproducing the Software which are +reserved for experienced users. -Specifically, the Licensor does not warrant that the Software is free from -any error, that it will operate without interruption, that it will be compatible -with the Licensee's own equipment and software configuration, nor that it -will meet the Licensee's requirements. +The Licensee shall be responsible for verifying, by any or all means, +the suitability of the product for its requirements, its good working +order, and for ensuring that it shall not cause damage to either persons +or properties. -9.4 The Licensor does not either expressly or tacitly warrant that the Software -does not infringe any third party intellectual property right relating to -a patent, software or any other property right. Therefore, the Licensor disclaims -any and all liability towards the Licensee arising out of any or all proceedings -for infringement that may be instituted in respect of the use, modification -and redistribution of the Software. Nevertheless, should such proceedings -be instituted against the Licensee, the Licensor shall provide it with technical -and legal expertise for its defense. Such technical and legal expertise shall -be decided on a case-by-case basis between the relevant Licensor and the Licensee -pursuant to a memorandum of understanding. The Licensor disclaims any and -all liability as regards the Licensee's use of the name of the Software. No -warranty is given as regards the existence of prior rights over the name of -the Software or as regards the existence of a trademark. +9.2 The Licensor hereby represents, in good faith, that it is entitled +to grant all the rights over the Software (including in particular the +rights set forth in Article 5 <#scope>). - Article 10 - TERMINATION +9.3 The Licensee acknowledges that the Software is supplied "as is" by +the Licensor without any other express or tacit warranty, other than +that provided for in Article 9.2 <#good-faith> and, in particular, +without any warranty as to its commercial value, its secured, safe, +innovative or relevant nature. -10.1 In the event of a breach by the Licensee of its obligations hereunder, -the Licensor may automatically terminate this Agreement thirty (30) days after -notice has been sent to the Licensee and has remained ineffective. +Specifically, the Licensor does not warrant that the Software is free +from any error, that it will operate without interruption, that it will +be compatible with the Licensee's own equipment and software +configuration, nor that it will meet the Licensee's requirements. -10.2 A Licensee whose Agreement is terminated shall no longer be authorized -to use, modify or distribute the Software. However, any licenses that it may -have granted prior to termination of the Agreement shall remain valid subject -to their having been granted in compliance with the terms and conditions hereof. +9.4 The Licensor does not either expressly or tacitly warrant that the +Software does not infringe any third party intellectual property right +relating to a patent, software or any other property right. Therefore, +the Licensor disclaims any and all liability towards the Licensee +arising out of any or all proceedings for infringement that may be +instituted in respect of the use, modification and redistribution of the +Software. Nevertheless, should such proceedings be instituted against +the Licensee, the Licensor shall provide it with technical and legal +expertise for its defense. Such technical and legal expertise shall be +decided on a case-by-case basis between the relevant Licensor and the +Licensee pursuant to a memorandum of understanding. The Licensor +disclaims any and all liability as regards the Licensee's use of the +name of the Software. No warranty is given as regards the existence of +prior rights over the name of the Software or as regards the existence +of a trademark. + + + Article 10 - TERMINATION + +10.1 In the event of a breach by the Licensee of its obligations +hereunder, the Licensor may automatically terminate this Agreement +thirty (30) days after notice has been sent to the Licensee and has +remained ineffective. + +10.2 A Licensee whose Agreement is terminated shall no longer be +authorized to use, modify or distribute the Software. However, any +licenses that it may have granted prior to termination of the Agreement +shall remain valid subject to their having been granted in compliance +with the terms and conditions hereof. + + + Article 11 - MISCELLANEOUS - Article 11 - MISCELLANEOUS 11.1 EXCUSABLE EVENTS -Neither Party shall be liable for any or all delay, or failure to perform -the Agreement, that may be attributable to an event of force majeure, an act -of God or an outside cause, such as defective functioning or interruptions -of the electricity or telecommunications networks, network paralysis following -a virus attack, intervention by government authorities, natural disasters, -water damage, earthquakes, fire, explosions, strikes and labor unrest, war, -etc. +Neither Party shall be liable for any or all delay, or failure to +perform the Agreement, that may be attributable to an event of force +majeure, an act of God or an outside cause, such as defective +functioning or interruptions of the electricity or telecommunications +networks, network paralysis following a virus attack, intervention by +government authorities, natural disasters, water damage, earthquakes, +fire, explosions, strikes and labor unrest, war, etc. -11.2 Any failure by either Party, on one or more occasions, to invoke one -or more of the provisions hereof, shall under no circumstances be interpreted -as being a waiver by the interested Party of its right to invoke said provision(s) -subsequently. +11.2 Any failure by either Party, on one or more occasions, to invoke +one or more of the provisions hereof, shall under no circumstances be +interpreted as being a waiver by the interested Party of its right to +invoke said provision(s) subsequently. -11.3 The Agreement cancels and replaces any or all previous agreements, whether -written or oral, between the Parties and having the same purpose, and constitutes -the entirety of the agreement between said Parties concerning said purpose. -No supplement or modification to the terms and conditions hereof shall be -effective as between the Parties unless it is made in writing and signed by -their duly authorized representatives. +11.3 The Agreement cancels and replaces any or all previous agreements, +whether written or oral, between the Parties and having the same +purpose, and constitutes the entirety of the agreement between said +Parties concerning said purpose. No supplement or modification to the +terms and conditions hereof shall be effective as between the Parties +unless it is made in writing and signed by their duly authorized +representatives. + +11.4 In the event that one or more of the provisions hereof were to +conflict with a current or future applicable act or legislative text, +said act or legislative text shall prevail, and the Parties shall make +the necessary amendments so as to comply with said act or legislative +text. All other provisions shall remain effective. Similarly, invalidity +of a provision of the Agreement, for any reason whatsoever, shall not +cause the Agreement as a whole to be invalid. -11.4 In the event that one or more of the provisions hereof were to conflict -with a current or future applicable act or legislative text, said act or legislative -text shall prevail, and the Parties shall make the necessary amendments so -as to comply with said act or legislative text. All other provisions shall -remain effective. Similarly, invalidity of a provision of the Agreement, for -any reason whatsoever, shall not cause the Agreement as a whole to be invalid. 11.5 LANGUAGE -The Agreement is drafted in both French and English and both versions are -deemed authentic. +The Agreement is drafted in both French and English and both versions +are deemed authentic. - Article 12 - NEW VERSIONS OF THE AGREEMENT -12.1 Any person is authorized to duplicate and distribute copies of this Agreement. + Article 12 - NEW VERSIONS OF THE AGREEMENT -12.2 So as to ensure coherence, the wording of this Agreement is protected -and may only be modified by the authors of the License, who reserve the right -to periodically publish updates or new versions of the Agreement, each with -a separate number. These subsequent versions may address new issues encountered -by Free Software. +12.1 Any person is authorized to duplicate and distribute copies of this +Agreement. -12.3 Any Software distributed under a given version of the Agreement may only -be subsequently distributed under the same version of the Agreement or a subsequent -version, subject to the provisions of Article 5.3.4 <#compatibility> . +12.2 So as to ensure coherence, the wording of this Agreement is +protected and may only be modified by the authors of the License, who +reserve the right to periodically publish updates or new versions of the +Agreement, each with a separate number. These subsequent versions may +address new issues encountered by Free Software. - Article 13 - GOVERNING LAW AND JURISDICTION +12.3 Any Software distributed under a given version of the Agreement may +only be subsequently distributed under the same version of the Agreement +or a subsequent version, subject to the provisions of Article 5.3.4 +<#compatibility>. -13.1 The Agreement is governed by French law. The Parties agree to endeavor -to seek an amicable solution to any disagreements or disputes that may arise -during the performance of the Agreement. -13.2 Failing an amicable solution within two (2) months as from their occurrence, -and unless emergency proceedings are necessary, the disagreements or disputes -shall be referred to the Paris Courts having jurisdiction, by the more diligent -Party. 1 CeCILL stands for Ce(a) C(nrs) I(nria) L(ogiciel) L(ibre) + Article 13 - GOVERNING LAW AND JURISDICTION + +13.1 The Agreement is governed by French law. The Parties agree to +endeavor to seek an amicable solution to any disagreements or disputes +that may arise during the performance of the Agreement. + +13.2 Failing an amicable solution within two (2) months as from their +occurrence, and unless emergency proceedings are necessary, the +disagreements or disputes shall be referred to the Paris Courts having +jurisdiction, by the more diligent Party. diff --git a/options/license/CECILL-B b/options/license/CECILL-B index 18887a5ca..c02c70e62 100644 --- a/options/license/CECILL-B +++ b/options/license/CECILL-B @@ -1,484 +1,515 @@ -CeCILL-B FREE SOFTWARE LICENSE AGREEMENT Notice -This Agreement is a Free Software license agreement that is the result of -discussions between its authors in order to ensure compliance with the two -main principles guiding its drafting: +CeCILL-B FREE SOFTWARE LICENSE AGREEMENT -* firstly, compliance with the principles governing the distribution of Free -Software: access to source code, broad rights granted to users, -* secondly, the election of a governing law, French law, with which it is -conformant, both as regards the law of torts and intellectual property law, -and the protection that it offers to both authors and holders of the economic -rights over software. + Notice -The authors of the CeCILL¹ license are: +This Agreement is a Free Software license agreement that is the result +of discussions between its authors in order to ensure compliance with +the two main principles guiding its drafting: - + * firstly, compliance with the principles governing the distribution + of Free Software: access to source code, broad rights granted to + users, + * secondly, the election of a governing law, French law, with which + it is conformant, both as regards the law of torts and + intellectual property law, and the protection that it offers to + both authors and holders of the economic rights over software. -Commissariat à l'Energie Atomique - CEA, a public scientific, technical and -industrial research establishment, having its principal place of business -at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. +The authors of the CeCILL-B (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) +license are: - +Commissariat à l'Energie Atomique - CEA, a public scientific, technical +and industrial research establishment, having its principal place of +business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. -Centre National de la Recherche Scientifique - CNRS, a public scientific and -technological establishment, having its principal place of business at 3 rue -Michel-Ange, 75794 Paris cedex 16, France. +Centre National de la Recherche Scientifique - CNRS, a public scientific +and technological establishment, having its principal place of business +at 3 rue Michel-Ange, 75794 Paris cedex 16, France. - +Institut National de Recherche en Informatique et en Automatique - +INRIA, a public scientific and technological establishment, having its +principal place of business at Domaine de Voluceau, Rocquencourt, BP +105, 78153 Le Chesnay cedex, France. -Institut National de Recherche en Informatique et en Automatique - INRIA, -a public scientific and technological establishment, having its principal -place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay -cedex, France. -Preamble This Agreement is an open source software license intended to give -users significant freedom to modify and redistribute the software licensed + Preamble + +This Agreement is an open source software license intended to give users +significant freedom to modify and redistribute the software licensed hereunder. -The exercising of this freedom is conditional upon a strong obligation of -giving credits for everybody that distributes a software incorporating a software -ruled by the current license so as all contributions to be properly identified -and acknowledged. +The exercising of this freedom is conditional upon a strong obligation +of giving credits for everybody that distributes a software +incorporating a software ruled by the current license so as all +contributions to be properly identified and acknowledged. -In consideration of access to the source code and the rights to copy, modify -and redistribute granted by the license, users are provided only with a limited -warranty and the software's author, the holder of the economic rights, and -the successive licensors only have limited liability. +In consideration of access to the source code and the rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors only have limited liability. -In this respect, the risks associated with loading, using, modifying and/or -developing or reproducing the software by the user are brought to the user's -attention, given its Free Software status, which may make it complicated to -use, with the result that its use is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore encouraged -to load and test the suitability of the software as regards their requirements -in conditions enabling the security of their systems and/or data to be ensured -and, more generally, to use and operate it in the same conditions of security. -This Agreement may be freely reproduced and published, provided it is not -altered, and that no provisions are either added or removed herefrom. +In this respect, the risks associated with loading, using, modifying +and/or developing or reproducing the software by the user are brought to +the user's attention, given its Free Software status, which may make it +complicated to use, with the result that its use is reserved for +developers and experienced professionals having in-depth computer +knowledge. Users are therefore encouraged to load and test the +suitability of the software as regards their requirements in conditions +enabling the security of their systems and/or data to be ensured and, +more generally, to use and operate it in the same conditions of +security. This Agreement may be freely reproduced and published, +provided it is not altered, and that no provisions are either added or +removed herefrom. -This Agreement may apply to any or all software for which the holder of the -economic rights decides to submit the use thereof to its provisions. +This Agreement may apply to any or all software for which the holder of +the economic rights decides to submit the use thereof to its provisions. - Article 1 - DEFINITIONS -For the purpose of this Agreement, when the following expressions commence -with a capital letter, they shall have the following meaning: + Article 1 - DEFINITIONS - +For the purpose of this Agreement, when the following expressions +commence with a capital letter, they shall have the following meaning: -Agreement: means this license agreement, and its possible subsequent versions -and annexes. +Agreement: means this license agreement, and its possible subsequent +versions and annexes. - +Software: means the software in its Object Code and/or Source Code form +and, where applicable, its documentation, "as is" when the Licensee +accepts the Agreement. -Software: means the software in its Object Code and/or Source Code form and, -where applicable, its documentation, "as is" when the Licensee accepts the -Agreement. +Initial Software: means the Software in its Source Code and possibly its +Object Code form and, where applicable, its documentation, "as is" when +it is first distributed under the terms and conditions of the Agreement. - +Modified Software: means the Software modified by at least one +Contribution. -Initial Software: means the Software in its Source Code and possibly its Object -Code form and, where applicable, its documentation, "as is" when it is first -distributed under the terms and conditions of the Agreement. +Source Code: means all the Software's instructions and program lines to +which access is required so as to modify the Software. - +Object Code: means the binary files originating from the compilation of +the Source Code. -Modified Software: means the Software modified by at least one Contribution. +Holder: means the holder(s) of the economic rights over the Initial +Software. - +Licensee: means the Software user(s) having accepted the Agreement. -Source Code: means all the Software's instructions and program lines to which -access is required so as to modify the Software. +Contributor: means a Licensee having made at least one Contribution. - +Licensor: means the Holder, or any other individual or legal entity, who +distributes the Software under the Agreement. -Object Code: means the binary files originating from the compilation of the -Source Code. +Contribution: means any or all modifications, corrections, translations, +adaptations and/or new functions integrated into the Software by any or +all Contributors, as well as any or all Internal Modules. - +Module: means a set of sources files including their documentation that +enables supplementary functions or services in addition to those offered +by the Software. -Holder: means the holder(s) of the economic rights over the Initial Software. +External Module: means any or all Modules, not derived from the +Software, so that this Module and the Software run in separate address +spaces, with one calling the other when they are run. - +Internal Module: means any or all Module, connected to the Software so +that they both execute in the same address space. - Licensee: means the Software user(s) having accepted the Agreement. +Parties: mean both the Licensee and the Licensor. - +These expressions may be used both in singular and plural form. - Contributor: means a Licensee having made at least one Contribution. - + Article 2 - PURPOSE -Licensor: means the Holder, or any other individual or legal entity, who distributes -the Software under the Agreement. +The purpose of the Agreement is the grant by the Licensor to the +Licensee of a non-exclusive, transferable and worldwide license for the +Software as set forth in Article 5 hereinafter for the whole term of the +protection granted by the rights over said Software. - -Contribution: means any or all modifications, corrections, translations, adaptations -and/or new functions integrated into the Software by any or all Contributors, -as well as any or all Internal Modules. + Article 3 - ACCEPTANCE - +3.1 The Licensee shall be deemed as having accepted the terms and +conditions of this Agreement upon the occurrence of the first of the +following events: -Module: means a set of sources files including their documentation that enables -supplementary functions or services in addition to those offered by the Software. + * (i) loading the Software by any or all means, notably, by + downloading from a remote server, or by loading from a physical + medium; + * (ii) the first time the Licensee exercises any of the rights + granted hereunder. - +3.2 One copy of the Agreement, containing a notice relating to the +characteristics of the Software, to the limited warranty, and to the +fact that its use is restricted to experienced users has been provided +to the Licensee prior to its acceptance as set forth in Article 3.1 +hereinabove, and the Licensee hereby acknowledges that it has read and +understood it. -External Module: means any or all Modules, not derived from the Software, -so that this Module and the Software run in separate address spaces, with -one calling the other when they are run. - + Article 4 - EFFECTIVE DATE AND TERM -Internal Module: means any or all Module, connected to the Software so that -they both execute in the same address space. - - - - Parties: mean both the Licensee and the Licensor. - - These expressions may be used both in singular and plural form. - - Article 2 - PURPOSE - -The purpose of the Agreement is the grant by the Licensor to the Licensee -of a non-exclusive, transferable and worldwide license for the Software as -set forth in Article 5 hereinafter for the whole term of the protection granted -by the rights over said Software. - - Article 3 - ACCEPTANCE - -3.1 The Licensee shall be deemed as having accepted the terms and conditions -of this Agreement upon the occurrence of the first of the following events: - -(i) loading the Software by any or all means, notably, by downloading from -a remote server, or by loading from a physical medium; - -(ii) the first time the Licensee exercises any of the rights granted hereunder. - -3.2 One copy of the Agreement, containing a notice relating to the characteristics -of the Software, to the limited warranty, and to the fact that its use is -restricted to experienced users has been provided to the Licensee prior to -its acceptance as set forth in Article 3.1 hereinabove, and the Licensee hereby -acknowledges that it has read and understood it. - - Article 4 - EFFECTIVE DATE AND TERM 4.1 EFFECTIVE DATE -The Agreement shall become effective on the date when it is accepted by the -Licensee as set forth in Article 3.1. +The Agreement shall become effective on the date when it is accepted by +the Licensee as set forth in Article 3.1. + 4.2 TERM -The Agreement shall remain in force for the entire legal term of protection -of the economic rights over the Software. +The Agreement shall remain in force for the entire legal term of +protection of the economic rights over the Software. - Article 5 - SCOPE OF RIGHTS GRANTED -The Licensor hereby grants to the Licensee, who accepts, the following rights -over the Software for any or all use, and for the term of the Agreement, on -the basis of the terms and conditions set forth hereinafter. + Article 5 - SCOPE OF RIGHTS GRANTED + +The Licensor hereby grants to the Licensee, who accepts, the following +rights over the Software for any or all use, and for the term of the +Agreement, on the basis of the terms and conditions set forth hereinafter. + +Besides, if the Licensor owns or comes to own one or more patents +protecting all or part of the functions of the Software or of its +components, the Licensor undertakes not to enforce the rights granted by +these patents against successive Licensees using, exploiting or +modifying the Software. If these patents are transferred, the Licensor +undertakes to have the transferees subscribe to the obligations set +forth in this paragraph. -Besides, if the Licensor owns or comes to own one or more patents protecting -all or part of the functions of the Software or of its components, the Licensor -undertakes not to enforce the rights granted by these patents against successive -Licensees using, exploiting or modifying the Software. If these patents are -transferred, the Licensor undertakes to have the transferees subscribe to -the obligations set forth in this paragraph. 5.1 RIGHT OF USE -The Licensee is authorized to use the Software, without any limitation as -to its fields of application, with it being hereinafter specified that this -comprises: +The Licensee is authorized to use the Software, without any limitation +as to its fields of application, with it being hereinafter specified +that this comprises: -1. permanent or temporary reproduction of all or part of the Software by any -or all means and in any or all form. + 1. permanent or temporary reproduction of all or part of the Software + by any or all means and in any or all form. -2. loading, displaying, running, or storing the Software on any or all medium. + 2. loading, displaying, running, or storing the Software on any or + all medium. + + 3. entitlement to observe, study or test its operation so as to + determine the ideas and principles behind any or all constituent + elements of said Software. This shall apply when the Licensee + carries out any or all loading, displaying, running, transmission + or storage operation as regards the Software, that it is entitled + to carry out hereunder. -3. entitlement to observe, study or test its operation so as to determine -the ideas and principles behind any or all constituent elements of said Software. -This shall apply when the Licensee carries out any or all loading, displaying, -running, transmission or storage operation as regards the Software, that it -is entitled to carry out hereunder. 5.2 ENTITLEMENT TO MAKE CONTRIBUTIONS -The right to make Contributions includes the right to translate, adapt, arrange, -or make any or all modifications to the Software, and the right to reproduce -the resulting software. +The right to make Contributions includes the right to translate, adapt, +arrange, or make any or all modifications to the Software, and the right +to reproduce the resulting software. + +The Licensee is authorized to make any or all Contributions to the +Software provided that it includes an explicit notice that it is the +author of said Contribution and indicates the date of the creation thereof. -The Licensee is authorized to make any or all Contributions to the Software -provided that it includes an explicit notice that it is the author of said -Contribution and indicates the date of the creation thereof. 5.3 RIGHT OF DISTRIBUTION -In particular, the right of distribution includes the right to publish, transmit -and communicate the Software to the general public on any or all medium, and -by any or all means, and the right to market, either in consideration of a -fee, or free of charge, one or more copies of the Software by any means. +In particular, the right of distribution includes the right to publish, +transmit and communicate the Software to the general public on any or +all medium, and by any or all means, and the right to market, either in +consideration of a fee, or free of charge, one or more copies of the +Software by any means. -The Licensee is further authorized to distribute copies of the modified or -unmodified Software to third parties according to the terms and conditions -set forth hereinafter. +The Licensee is further authorized to distribute copies of the modified +or unmodified Software to third parties according to the terms and +conditions set forth hereinafter. - 5.3.1. DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION -The Licensee is authorized to distribute true copies of the Software in Source -Code or Object Code form, provided that said distribution complies with all -the provisions of the Agreement and is accompanied by: + 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION - 1. a copy of the Agreement, +The Licensee is authorized to distribute true copies of the Software in +Source Code or Object Code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, + 1. a copy of the Agreement, -and that, in the event that only the Object Code of the Software is redistributed, -the Licensee allows effective access to the full Source Code of the Software -at a minimum during the entire period of its distribution of the Software, -it being understood that the additional cost of acquiring the Source Code -shall not exceed the cost of transferring the data. + 2. a notice relating to the limitation of both the Licensor's + warranty and liability as set forth in Articles 8 and 9, - 5.3.2. DISTRIBUTION OF MODIFIED SOFTWARE +and that, in the event that only the Object Code of the Software is +redistributed, the Licensee allows effective access to the full Source +Code of the Software at a minimum during the entire period of its +distribution of the Software, it being understood that the additional +cost of acquiring the Source Code shall not exceed the cost of +transferring the data. -If the Licensee makes any Contribution to the Software, the resulting Modified -Software may be distributed under a license agreement other than this Agreement -subject to compliance with the provisions of Article 5.3.4. - 5.3.3. DISTRIBUTION OF EXTERNAL MODULES + 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE -When the Licensee has developed an External Module, the terms and conditions -of this Agreement do not apply to said External Module, that may be distributed -under a separate license agreement. +If the Licensee makes any Contribution to the Software, the resulting +Modified Software may be distributed under a license agreement other +than this Agreement subject to compliance with the provisions of Article +5.3.4. - 5.3.4. CREDITS -Any Licensee who may distribute a Modified Software hereby expressly agrees -to: + 5.3.3 DISTRIBUTION OF EXTERNAL MODULES -1. indicate in the related documentation that it is based on the Software -licensed hereunder, and reproduce the intellectual property notice for the -Software, +When the Licensee has developed an External Module, the terms and +conditions of this Agreement do not apply to said External Module, that +may be distributed under a separate license agreement. -2. ensure that written indications of the Software intended use, intellectual -property notice and license hereunder are included in easily accessible format -from the Modified Software interface, -3. mention, on a freely accessible website describing the Modified Software, -at least throughout the distribution term thereof, that it is based on the -Software licensed hereunder, and reproduce the Software intellectual property -notice, + 5.3.4 CREDITS -4. where it is distributed to a third party that may distribute a Modified -Software without having to make its source code available, make its best efforts -to ensure that said third party agrees to comply with the obligations set -forth in this Article . +Any Licensee who may distribute a Modified Software hereby expressly +agrees to: -If the Software, whether or not modified, is distributed with an External -Module designed for use in connection with the Software, the Licensee shall -submit said External Module to the foregoing obligations. + 1. indicate in the related documentation that it is based on the + Software licensed hereunder, and reproduce the intellectual + property notice for the Software, - 5.3.5. COMPATIBILITY WITH THE CeCILL AND CeCILL-C LICENSES + 2. ensure that written indications of the Software intended use, + intellectual property notice and license hereunder are included in + easily accessible format from the Modified Software interface, -Where a Modified Software contains a Contribution subject to the CeCILL license, -the provisions set forth in Article 5.3.4 shall be optional. + 3. mention, on a freely accessible website describing the Modified + Software, at least throughout the distribution term thereof, that + it is based on the Software licensed hereunder, and reproduce the + Software intellectual property notice, -A Modified Software may be distributed under the CeCILL-C license. In such -a case the provisions set forth in Article 5.3.4 shall be optional. + 4. where it is distributed to a third party that may distribute a + Modified Software without having to make its source code + available, make its best efforts to ensure that said third party + agrees to comply with the obligations set forth in this Article . + +If the Software, whether or not modified, is distributed with an +External Module designed for use in connection with the Software, the +Licensee shall submit said External Module to the foregoing obligations. + + + 5.3.5 COMPATIBILITY WITH THE CeCILL AND CeCILL-C LICENSES + +Where a Modified Software contains a Contribution subject to the CeCILL +license, the provisions set forth in Article 5.3.4 shall be optional. + +A Modified Software may be distributed under the CeCILL-C license. In +such a case the provisions set forth in Article 5.3.4 shall be optional. + + + Article 6 - INTELLECTUAL PROPERTY - Article 6 - INTELLECTUAL PROPERTY 6.1 OVER THE INITIAL SOFTWARE -The Holder owns the economic rights over the Initial Software. Any or all -use of the Initial Software is subject to compliance with the terms and conditions -under which the Holder has elected to distribute its work and no one shall -be entitled to modify the terms and conditions for the distribution of said -Initial Software. +The Holder owns the economic rights over the Initial Software. Any or +all use of the Initial Software is subject to compliance with the terms +and conditions under which the Holder has elected to distribute its work +and no one shall be entitled to modify the terms and conditions for the +distribution of said Initial Software. + +The Holder undertakes that the Initial Software will remain ruled at +least by this Agreement, for the duration set forth in Article 4.2. -The Holder undertakes that the Initial Software will remain ruled at least -by this Agreement, for the duration set forth in Article 4.2. 6.2 OVER THE CONTRIBUTIONS -The Licensee who develops a Contribution is the owner of the intellectual -property rights over this Contribution as defined by applicable law. +The Licensee who develops a Contribution is the owner of the +intellectual property rights over this Contribution as defined by +applicable law. + 6.3 OVER THE EXTERNAL MODULES -The Licensee who develops an External Module is the owner of the intellectual -property rights over this External Module as defined by applicable law and -is free to choose the type of agreement that shall govern its distribution. +The Licensee who develops an External Module is the owner of the +intellectual property rights over this External Module as defined by +applicable law and is free to choose the type of agreement that shall +govern its distribution. + 6.4 JOINT PROVISIONS - The Licensee expressly undertakes: +The Licensee expressly undertakes: -1. not to remove, or modify, in any manner, the intellectual property notices -attached to the Software; + 1. not to remove, or modify, in any manner, the intellectual property + notices attached to the Software; -2. to reproduce said notices, in an identical manner, in the copies of the -Software modified or not. + 2. to reproduce said notices, in an identical manner, in the copies + of the Software modified or not. -The Licensee undertakes not to directly or indirectly infringe the intellectual -property rights of the Holder and/or Contributors on the Software and to take, -where applicable, vis-à-vis its staff, any and all measures required to ensure -respect of said intellectual property rights of the Holder and/or Contributors. +The Licensee undertakes not to directly or indirectly infringe the +intellectual property rights of the Holder and/or Contributors on the +Software and to take, where applicable, vis-à-vis its staff, any and all +measures required to ensure respect of said intellectual property rights +of the Holder and/or Contributors. - Article 7 - RELATED SERVICES -7.1 Under no circumstances shall the Agreement oblige the Licensor to provide -technical assistance or maintenance services for the Software. + Article 7 - RELATED SERVICES -However, the Licensor is entitled to offer this type of services. The terms -and conditions of such technical assistance, and/or such maintenance, shall -be set forth in a separate instrument. Only the Licensor offering said maintenance -and/or technical assistance services shall incur liability therefor. +7.1 Under no circumstances shall the Agreement oblige the Licensor to +provide technical assistance or maintenance services for the Software. -7.2 Similarly, any Licensor is entitled to offer to its licensees, under its -sole responsibility, a warranty, that shall only be binding upon itself, for -the redistribution of the Software and/or the Modified Software, under terms -and conditions that it is free to decide. Said warranty, and the financial -terms and conditions of its application, shall be subject of a separate instrument -executed between the Licensor and the Licensee. +However, the Licensor is entitled to offer this type of services. The +terms and conditions of such technical assistance, and/or such +maintenance, shall be set forth in a separate instrument. Only the +Licensor offering said maintenance and/or technical assistance services +shall incur liability therefor. - Article 8 - LIABILITY +7.2 Similarly, any Licensor is entitled to offer to its licensees, under +its sole responsibility, a warranty, that shall only be binding upon +itself, for the redistribution of the Software and/or the Modified +Software, under terms and conditions that it is free to decide. Said +warranty, and the financial terms and conditions of its application, +shall be subject of a separate instrument executed between the Licensor +and the Licensee. -8.1 Subject to the provisions of Article 8.2, the Licensee shall be entitled -to claim compensation for any direct loss it may have suffered from the Software -as a result of a fault on the part of the relevant Licensor, subject to providing -evidence thereof. -8.2 The Licensor's liability is limited to the commitments made under this -Agreement and shall not be incurred as a result of in particular: (i) loss -due the Licensee's total or partial failure to fulfill its obligations, (ii) -direct or consequential loss that is suffered by the Licensee due to the use -or performance of the Software, and (iii) more generally, any consequential -loss. In particular the Parties expressly agree that any or all pecuniary -or business loss (i.e. loss of data, loss of profits, operating loss, loss -of customers or orders, opportunity cost, any disturbance to business activities) -or any or all legal proceedings instituted against the Licensee by a third -party, shall constitute consequential loss and shall not provide entitlement -to any or all compensation from the Licensor. + Article 8 - LIABILITY - Article 9 - WARRANTY +8.1 Subject to the provisions of Article 8.2, the Licensee shall be +entitled to claim compensation for any direct loss it may have suffered +from the Software as a result of a fault on the part of the relevant +Licensor, subject to providing evidence thereof. -9.1 The Licensee acknowledges that the scientific and technical state-of-the-art -when the Software was distributed did not enable all possible uses to be tested -and verified, nor for the presence of possible defects to be detected. In -this respect, the Licensee's attention has been drawn to the risks associated -with loading, using, modifying and/or developing and reproducing the Software -which are reserved for experienced users. +8.2 The Licensor's liability is limited to the commitments made under +this Agreement and shall not be incurred as a result of in particular: +(i) loss due the Licensee's total or partial failure to fulfill its +obligations, (ii) direct or consequential loss that is suffered by the +Licensee due to the use or performance of the Software, and (iii) more +generally, any consequential loss. In particular the Parties expressly +agree that any or all pecuniary or business loss (i.e. loss of data, +loss of profits, operating loss, loss of customers or orders, +opportunity cost, any disturbance to business activities) or any or all +legal proceedings instituted against the Licensee by a third party, +shall constitute consequential loss and shall not provide entitlement to +any or all compensation from the Licensor. -The Licensee shall be responsible for verifying, by any or all means, the -suitability of the product for its requirements, its good working order, and -for ensuring that it shall not cause damage to either persons or properties. -9.2 The Licensor hereby represents, in good faith, that it is entitled to -grant all the rights over the Software (including in particular the rights -set forth in Article 5). + Article 9 - WARRANTY -9.3 The Licensee acknowledges that the Software is supplied "as is" by the -Licensor without any other express or tacit warranty, other than that provided -for in Article 9.2 and, in particular, without any warranty as to its commercial -value, its secured, safe, innovative or relevant nature. +9.1 The Licensee acknowledges that the scientific and technical +state-of-the-art when the Software was distributed did not enable all +possible uses to be tested and verified, nor for the presence of +possible defects to be detected. In this respect, the Licensee's +attention has been drawn to the risks associated with loading, using, +modifying and/or developing and reproducing the Software which are +reserved for experienced users. -Specifically, the Licensor does not warrant that the Software is free from -any error, that it will operate without interruption, that it will be compatible -with the Licensee's own equipment and software configuration, nor that it -will meet the Licensee's requirements. +The Licensee shall be responsible for verifying, by any or all means, +the suitability of the product for its requirements, its good working +order, and for ensuring that it shall not cause damage to either persons +or properties. -9.4 The Licensor does not either expressly or tacitly warrant that the Software -does not infringe any third party intellectual property right relating to -a patent, software or any other property right. Therefore, the Licensor disclaims -any and all liability towards the Licensee arising out of any or all proceedings -for infringement that may be instituted in respect of the use, modification -and redistribution of the Software. Nevertheless, should such proceedings -be instituted against the Licensee, the Licensor shall provide it with technical -and legal assistance for its defense. Such technical and legal assistance -shall be decided on a case-by-case basis between the relevant Licensor and -the Licensee pursuant to a memorandum of understanding. The Licensor disclaims -any and all liability as regards the Licensee's use of the name of the Software. -No warranty is given as regards the existence of prior rights over the name -of the Software or as regards the existence of a trademark. +9.2 The Licensor hereby represents, in good faith, that it is entitled +to grant all the rights over the Software (including in particular the +rights set forth in Article 5). - Article 10 - TERMINATION +9.3 The Licensee acknowledges that the Software is supplied "as is" by +the Licensor without any other express or tacit warranty, other than +that provided for in Article 9.2 and, in particular, without any warranty +as to its commercial value, its secured, safe, innovative or relevant +nature. -10.1 In the event of a breach by the Licensee of its obligations hereunder, -the Licensor may automatically terminate this Agreement thirty (30) days after -notice has been sent to the Licensee and has remained ineffective. +Specifically, the Licensor does not warrant that the Software is free +from any error, that it will operate without interruption, that it will +be compatible with the Licensee's own equipment and software +configuration, nor that it will meet the Licensee's requirements. -10.2 A Licensee whose Agreement is terminated shall no longer be authorized -to use, modify or distribute the Software. However, any licenses that it may -have granted prior to termination of the Agreement shall remain valid subject -to their having been granted in compliance with the terms and conditions hereof. +9.4 The Licensor does not either expressly or tacitly warrant that the +Software does not infringe any third party intellectual property right +relating to a patent, software or any other property right. Therefore, +the Licensor disclaims any and all liability towards the Licensee +arising out of any or all proceedings for infringement that may be +instituted in respect of the use, modification and redistribution of the +Software. Nevertheless, should such proceedings be instituted against +the Licensee, the Licensor shall provide it with technical and legal +assistance for its defense. Such technical and legal assistance shall be +decided on a case-by-case basis between the relevant Licensor and the +Licensee pursuant to a memorandum of understanding. The Licensor +disclaims any and all liability as regards the Licensee's use of the +name of the Software. No warranty is given as regards the existence of +prior rights over the name of the Software or as regards the existence +of a trademark. + + + Article 10 - TERMINATION + +10.1 In the event of a breach by the Licensee of its obligations +hereunder, the Licensor may automatically terminate this Agreement +thirty (30) days after notice has been sent to the Licensee and has +remained ineffective. + +10.2 A Licensee whose Agreement is terminated shall no longer be +authorized to use, modify or distribute the Software. However, any +licenses that it may have granted prior to termination of the Agreement +shall remain valid subject to their having been granted in compliance +with the terms and conditions hereof. + + + Article 11 - MISCELLANEOUS - Article 11 - MISCELLANEOUS 11.1 EXCUSABLE EVENTS -Neither Party shall be liable for any or all delay, or failure to perform -the Agreement, that may be attributable to an event of force majeure, an act -of God or an outside cause, such as defective functioning or interruptions -of the electricity or telecommunications networks, network paralysis following -a virus attack, intervention by government authorities, natural disasters, -water damage, earthquakes, fire, explosions, strikes and labor unrest, war, -etc. +Neither Party shall be liable for any or all delay, or failure to +perform the Agreement, that may be attributable to an event of force +majeure, an act of God or an outside cause, such as defective +functioning or interruptions of the electricity or telecommunications +networks, network paralysis following a virus attack, intervention by +government authorities, natural disasters, water damage, earthquakes, +fire, explosions, strikes and labor unrest, war, etc. -11.2 Any failure by either Party, on one or more occasions, to invoke one -or more of the provisions hereof, shall under no circumstances be interpreted -as being a waiver by the interested Party of its right to invoke said provision(s) -subsequently. +11.2 Any failure by either Party, on one or more occasions, to invoke +one or more of the provisions hereof, shall under no circumstances be +interpreted as being a waiver by the interested Party of its right to +invoke said provision(s) subsequently. -11.3 The Agreement cancels and replaces any or all previous agreements, whether -written or oral, between the Parties and having the same purpose, and constitutes -the entirety of the agreement between said Parties concerning said purpose. -No supplement or modification to the terms and conditions hereof shall be -effective as between the Parties unless it is made in writing and signed by -their duly authorized representatives. +11.3 The Agreement cancels and replaces any or all previous agreements, +whether written or oral, between the Parties and having the same +purpose, and constitutes the entirety of the agreement between said +Parties concerning said purpose. No supplement or modification to the +terms and conditions hereof shall be effective as between the Parties +unless it is made in writing and signed by their duly authorized +representatives. + +11.4 In the event that one or more of the provisions hereof were to +conflict with a current or future applicable act or legislative text, +said act or legislative text shall prevail, and the Parties shall make +the necessary amendments so as to comply with said act or legislative +text. All other provisions shall remain effective. Similarly, invalidity +of a provision of the Agreement, for any reason whatsoever, shall not +cause the Agreement as a whole to be invalid. -11.4 In the event that one or more of the provisions hereof were to conflict -with a current or future applicable act or legislative text, said act or legislative -text shall prevail, and the Parties shall make the necessary amendments so -as to comply with said act or legislative text. All other provisions shall -remain effective. Similarly, invalidity of a provision of the Agreement, for -any reason whatsoever, shall not cause the Agreement as a whole to be invalid. 11.5 LANGUAGE -The Agreement is drafted in both French and English and both versions are -deemed authentic. +The Agreement is drafted in both French and English and both versions +are deemed authentic. - Article 12 - NEW VERSIONS OF THE AGREEMENT -12.1 Any person is authorized to duplicate and distribute copies of this Agreement. + Article 12 - NEW VERSIONS OF THE AGREEMENT -12.2 So as to ensure coherence, the wording of this Agreement is protected -and may only be modified by the authors of the License, who reserve the right -to periodically publish updates or new versions of the Agreement, each with -a separate number. These subsequent versions may address new issues encountered -by Free Software. +12.1 Any person is authorized to duplicate and distribute copies of this +Agreement. -12.3 Any Software distributed under a given version of the Agreement may only -be subsequently distributed under the same version of the Agreement or a subsequent -version. +12.2 So as to ensure coherence, the wording of this Agreement is +protected and may only be modified by the authors of the License, who +reserve the right to periodically publish updates or new versions of the +Agreement, each with a separate number. These subsequent versions may +address new issues encountered by Free Software. - Article 13 - GOVERNING LAW AND JURISDICTION +12.3 Any Software distributed under a given version of the Agreement may +only be subsequently distributed under the same version of the Agreement +or a subsequent version. -13.1 The Agreement is governed by French law. The Parties agree to endeavor -to seek an amicable solution to any disagreements or disputes that may arise -during the performance of the Agreement. -13.2 Failing an amicable solution within two (2) months as from their occurrence, -and unless emergency proceedings are necessary, the disagreements or disputes -shall be referred to the Paris Courts having jurisdiction, by the more diligent -Party. + Article 13 - GOVERNING LAW AND JURISDICTION -Version 1.0 dated 2006-09-05. 1 CeCILL stands for Ce(a) C(nrs) I(nria) L(ogiciel) -L(ibre) +13.1 The Agreement is governed by French law. The Parties agree to +endeavor to seek an amicable solution to any disagreements or disputes +that may arise during the performance of the Agreement. + +13.2 Failing an amicable solution within two (2) months as from their +occurrence, and unless emergency proceedings are necessary, the +disagreements or disputes shall be referred to the Paris Courts having +jurisdiction, by the more diligent Party. + + +Version 1.0 dated 2006-09-05. diff --git a/options/license/CECILL-C b/options/license/CECILL-C index 11f1b3081..2bb09b4b0 100644 --- a/options/license/CECILL-C +++ b/options/license/CECILL-C @@ -1,487 +1,517 @@ -CeCILL-C FREE SOFTWARE LICENSE AGREEMENT Notice -This Agreement is a Free Software license agreement that is the result of -discussions between its authors in order to ensure compliance with the two -main principles guiding its drafting: +CeCILL-C FREE SOFTWARE LICENSE AGREEMENT -* firstly, compliance with the principles governing the distribution of Free -Software: access to source code, broad rights granted to users, -* secondly, the election of a governing law, French law, with which it is -conformant, both as regards the law of torts and intellectual property law, -and the protection that it offers to both authors and holders of the economic -rights over software. + Notice -The authors of the CeCILL¹ license are: +This Agreement is a Free Software license agreement that is the result +of discussions between its authors in order to ensure compliance with +the two main principles guiding its drafting: - + * firstly, compliance with the principles governing the distribution + of Free Software: access to source code, broad rights granted to + users, + * secondly, the election of a governing law, French law, with which + it is conformant, both as regards the law of torts and + intellectual property law, and the protection that it offers to + both authors and holders of the economic rights over software. -Commissariat à l'Energie Atomique - CEA, a public scientific, technical and -industrial research establishment, having its principal place of business -at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. +The authors of the CeCILL-C (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre]) +license are: - +Commissariat à l'Energie Atomique - CEA, a public scientific, technical +and industrial research establishment, having its principal place of +business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France. -Centre National de la Recherche Scientifique - CNRS, a public scientific and -technological establishment, having its principal place of business at 3 rue -Michel-Ange, 75794 Paris cedex 16, France. +Centre National de la Recherche Scientifique - CNRS, a public scientific +and technological establishment, having its principal place of business +at 3 rue Michel-Ange, 75794 Paris cedex 16, France. - +Institut National de Recherche en Informatique et en Automatique - +INRIA, a public scientific and technological establishment, having its +principal place of business at Domaine de Voluceau, Rocquencourt, BP +105, 78153 Le Chesnay cedex, France. -Institut National de Recherche en Informatique et en Automatique - INRIA, -a public scientific and technological establishment, having its principal -place of business at Domaine de Voluceau, Rocquencourt, BP 105, 78153 Le Chesnay -cedex, France. -Preamble The purpose of this Free Software license agreement is to grant users + Preamble + +The purpose of this Free Software license agreement is to grant users the right to modify and re-use the software governed by this license. -The exercising of this right is conditional upon the obligation to make available -to the community the modifications made to the source code of the software -so as to contribute to its evolution. +The exercising of this right is conditional upon the obligation to make +available to the community the modifications made to the source code of +the software so as to contribute to its evolution. -In consideration of access to the source code and the rights to copy, modify -and redistribute granted by the license, users are provided only with a limited -warranty and the software's author, the holder of the economic rights, and -the successive licensors only have limited liability. +In consideration of access to the source code and the rights to copy, +modify and redistribute granted by the license, users are provided only +with a limited warranty and the software's author, the holder of the +economic rights, and the successive licensors only have limited liability. -In this respect, the risks associated with loading, using, modifying and/or -developing or reproducing the software by the user are brought to the user's -attention, given its Free Software status, which may make it complicated to -use, with the result that its use is reserved for developers and experienced -professionals having in-depth computer knowledge. Users are therefore encouraged -to load and test the suitability of the software as regards their requirements -in conditions enabling the security of their systems and/or data to be ensured -and, more generally, to use and operate it in the same conditions of security. -This Agreement may be freely reproduced and published, provided it is not -altered, and that no provisions are either added or removed herefrom. +In this respect, the risks associated with loading, using, modifying +and/or developing or reproducing the software by the user are brought to +the user's attention, given its Free Software status, which may make it +complicated to use, with the result that its use is reserved for +developers and experienced professionals having in-depth computer +knowledge. Users are therefore encouraged to load and test the +suitability of the software as regards their requirements in conditions +enabling the security of their systems and/or data to be ensured and, +more generally, to use and operate it in the same conditions of +security. This Agreement may be freely reproduced and published, +provided it is not altered, and that no provisions are either added or +removed herefrom. -This Agreement may apply to any or all software for which the holder of the -economic rights decides to submit the use thereof to its provisions. +This Agreement may apply to any or all software for which the holder of +the economic rights decides to submit the use thereof to its provisions. - Article 1 - DEFINITIONS -For the purpose of this Agreement, when the following expressions commence -with a capital letter, they shall have the following meaning: + Article 1 - DEFINITIONS - +For the purpose of this Agreement, when the following expressions +commence with a capital letter, they shall have the following meaning: -Agreement: means this license agreement, and its possible subsequent versions -and annexes. +Agreement: means this license agreement, and its possible subsequent +versions and annexes. - +Software: means the software in its Object Code and/or Source Code form +and, where applicable, its documentation, "as is" when the Licensee +accepts the Agreement. -Software: means the software in its Object Code and/or Source Code form and, -where applicable, its documentation, "as is" when the Licensee accepts the -Agreement. +Initial Software: means the Software in its Source Code and possibly its +Object Code form and, where applicable, its documentation, "as is" when +it is first distributed under the terms and conditions of the Agreement. - +Modified Software: means the Software modified by at least one +Integrated Contribution. -Initial Software: means the Software in its Source Code and possibly its Object -Code form and, where applicable, its documentation, "as is" when it is first -distributed under the terms and conditions of the Agreement. +Source Code: means all the Software's instructions and program lines to +which access is required so as to modify the Software. - +Object Code: means the binary files originating from the compilation of +the Source Code. -Modified Software: means the Software modified by at least one Integrated +Holder: means the holder(s) of the economic rights over the Initial +Software. + +Licensee: means the Software user(s) having accepted the Agreement. + +Contributor: means a Licensee having made at least one Integrated Contribution. - +Licensor: means the Holder, or any other individual or legal entity, who +distributes the Software under the Agreement. -Source Code: means all the Software's instructions and program lines to which -access is required so as to modify the Software. +Integrated Contribution: means any or all modifications, corrections, +translations, adaptations and/or new functions integrated into the +Source Code by any or all Contributors. - +Related Module: means a set of sources files including their +documentation that, without modification to the Source Code, enables +supplementary functions or services in addition to those offered by the +Software. -Object Code: means the binary files originating from the compilation of the -Source Code. +Derivative Software: means any combination of the Software, modified or +not, and of a Related Module. - +Parties: mean both the Licensee and the Licensor. -Holder: means the holder(s) of the economic rights over the Initial Software. +These expressions may be used both in singular and plural form. - - Licensee: means the Software user(s) having accepted the Agreement. + Article 2 - PURPOSE - +The purpose of the Agreement is the grant by the Licensor to the +Licensee of a non-exclusive, transferable and worldwide license for the +Software as set forth in Article 5 hereinafter for the whole term of the +protection granted by the rights over said Software. -Contributor: means a Licensee having made at least one Integrated Contribution. - + Article 3 - ACCEPTANCE -Licensor: means the Holder, or any other individual or legal entity, who distributes -the Software under the Agreement. +3.1 The Licensee shall be deemed as having accepted the terms and +conditions of this Agreement upon the occurrence of the first of the +following events: - + * (i) loading the Software by any or all means, notably, by + downloading from a remote server, or by loading from a physical + medium; + * (ii) the first time the Licensee exercises any of the rights + granted hereunder. -Integrated Contribution: means any or all modifications, corrections, translations, -adaptations and/or new functions integrated into the Source Code by any or -all Contributors. +3.2 One copy of the Agreement, containing a notice relating to the +characteristics of the Software, to the limited warranty, and to the +fact that its use is restricted to experienced users has been provided +to the Licensee prior to its acceptance as set forth in Article 3.1 +hereinabove, and the Licensee hereby acknowledges that it has read and +understood it. - -Related Module: means a set of sources files including their documentation -that, without modification to the Source Code, enables supplementary functions -or services in addition to those offered by the Software. + Article 4 - EFFECTIVE DATE AND TERM - - -Derivative Software: means any combination of the Software, modified or not, -and of a Related Module. - - - - Parties: mean both the Licensee and the Licensor. - - These expressions may be used both in singular and plural form. - - Article 2 - PURPOSE - -The purpose of the Agreement is the grant by the Licensor to the Licensee -of a non-exclusive, transferable and worldwide license for the Software as -set forth in Article 5 hereinafter for the whole term of the protection granted -by the rights over said Software. - - Article 3 - ACCEPTANCE - -3.1 The Licensee shall be deemed as having accepted the terms and conditions -of this Agreement upon the occurrence of the first of the following events: - -(i) loading the Software by any or all means, notably, by downloading from -a remote server, or by loading from a physical medium; - -(ii) the first time the Licensee exercises any of the rights granted hereunder. - -3.2 One copy of the Agreement, containing a notice relating to the characteristics -of the Software, to the limited warranty, and to the fact that its use is -restricted to experienced users has been provided to the Licensee prior to -its acceptance as set forth in Article 3.1 hereinabove, and the Licensee hereby -acknowledges that it has read and understood it. - - Article 4 - EFFECTIVE DATE AND TERM 4.1 EFFECTIVE DATE -The Agreement shall become effective on the date when it is accepted by the -Licensee as set forth in Article 3.1. +The Agreement shall become effective on the date when it is accepted by +the Licensee as set forth in Article 3.1. + 4.2 TERM -The Agreement shall remain in force for the entire legal term of protection -of the economic rights over the Software. +The Agreement shall remain in force for the entire legal term of +protection of the economic rights over the Software. - Article 5 - SCOPE OF RIGHTS GRANTED -The Licensor hereby grants to the Licensee, who accepts, the following rights -over the Software for any or all use, and for the term of the Agreement, on -the basis of the terms and conditions set forth hereinafter. + Article 5 - SCOPE OF RIGHTS GRANTED + +The Licensor hereby grants to the Licensee, who accepts, the following +rights over the Software for any or all use, and for the term of the +Agreement, on the basis of the terms and conditions set forth hereinafter. + +Besides, if the Licensor owns or comes to own one or more patents +protecting all or part of the functions of the Software or of its +components, the Licensor undertakes not to enforce the rights granted by +these patents against successive Licensees using, exploiting or +modifying the Software. If these patents are transferred, the Licensor +undertakes to have the transferees subscribe to the obligations set +forth in this paragraph. -Besides, if the Licensor owns or comes to own one or more patents protecting -all or part of the functions of the Software or of its components, the Licensor -undertakes not to enforce the rights granted by these patents against successive -Licensees using, exploiting or modifying the Software. If these patents are -transferred, the Licensor undertakes to have the transferees subscribe to -the obligations set forth in this paragraph. 5.1 RIGHT OF USE -The Licensee is authorized to use the Software, without any limitation as -to its fields of application, with it being hereinafter specified that this -comprises: +The Licensee is authorized to use the Software, without any limitation +as to its fields of application, with it being hereinafter specified +that this comprises: -1. permanent or temporary reproduction of all or part of the Software by any -or all means and in any or all form. + 1. permanent or temporary reproduction of all or part of the Software + by any or all means and in any or all form. -2. loading, displaying, running, or storing the Software on any or all medium. + 2. loading, displaying, running, or storing the Software on any or + all medium. + + 3. entitlement to observe, study or test its operation so as to + determine the ideas and principles behind any or all constituent + elements of said Software. This shall apply when the Licensee + carries out any or all loading, displaying, running, transmission + or storage operation as regards the Software, that it is entitled + to carry out hereunder. -3. entitlement to observe, study or test its operation so as to determine -the ideas and principles behind any or all constituent elements of said Software. -This shall apply when the Licensee carries out any or all loading, displaying, -running, transmission or storage operation as regards the Software, that it -is entitled to carry out hereunder. 5.2 RIGHT OF MODIFICATION -The right of modification includes the right to translate, adapt, arrange, -or make any or all modifications to the Software, and the right to reproduce -the resulting software. It includes, in particular, the right to create a -Derivative Software. +The right of modification includes the right to translate, adapt, +arrange, or make any or all modifications to the Software, and the right +to reproduce the resulting software. It includes, in particular, the +right to create a Derivative Software. + +The Licensee is authorized to make any or all modification to the +Software provided that it includes an explicit notice that it is the +author of said modification and indicates the date of the creation thereof. -The Licensee is authorized to make any or all modification to the Software -provided that it includes an explicit notice that it is the author of said -modification and indicates the date of the creation thereof. 5.3 RIGHT OF DISTRIBUTION -In particular, the right of distribution includes the right to publish, transmit -and communicate the Software to the general public on any or all medium, and -by any or all means, and the right to market, either in consideration of a -fee, or free of charge, one or more copies of the Software by any means. +In particular, the right of distribution includes the right to publish, +transmit and communicate the Software to the general public on any or +all medium, and by any or all means, and the right to market, either in +consideration of a fee, or free of charge, one or more copies of the +Software by any means. -The Licensee is further authorized to distribute copies of the modified or -unmodified Software to third parties according to the terms and conditions -set forth hereinafter. +The Licensee is further authorized to distribute copies of the modified +or unmodified Software to third parties according to the terms and +conditions set forth hereinafter. - 5.3.1. DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION -The Licensee is authorized to distribute true copies of the Software in Source -Code or Object Code form, provided that said distribution complies with all -the provisions of the Agreement and is accompanied by: + 5.3.1 DISTRIBUTION OF SOFTWARE WITHOUT MODIFICATION - 1. a copy of the Agreement, +The Licensee is authorized to distribute true copies of the Software in +Source Code or Object Code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, + 1. a copy of the Agreement, -and that, in the event that only the Object Code of the Software is redistributed, -the Licensee allows effective access to the full Source Code of the Software -at a minimum during the entire period of its distribution of the Software, -it being understood that the additional cost of acquiring the Source Code -shall not exceed the cost of transferring the data. + 2. a notice relating to the limitation of both the Licensor's + warranty and liability as set forth in Articles 8 and 9, - 5.3.2. DISTRIBUTION OF MODIFIED SOFTWARE +and that, in the event that only the Object Code of the Software is +redistributed, the Licensee allows effective access to the full Source +Code of the Software at a minimum during the entire period of its +distribution of the Software, it being understood that the additional +cost of acquiring the Source Code shall not exceed the cost of +transferring the data. -When the Licensee makes an Integrated Contribution to the Software, the terms -and conditions for the distribution of the resulting Modified Software become -subject to all the provisions of this Agreement. -The Licensee is authorized to distribute the Modified Software, in source -code or object code form, provided that said distribution complies with all -the provisions of the Agreement and is accompanied by: + 5.3.2 DISTRIBUTION OF MODIFIED SOFTWARE - 1. a copy of the Agreement, +When the Licensee makes an Integrated Contribution to the Software, the +terms and conditions for the distribution of the resulting Modified +Software become subject to all the provisions of this Agreement. -2. a notice relating to the limitation of both the Licensor's warranty and -liability as set forth in Articles 8 and 9, +The Licensee is authorized to distribute the Modified Software, in +source code or object code form, provided that said distribution +complies with all the provisions of the Agreement and is accompanied by: -and that, in the event that only the object code of the Modified Software -is redistributed, the Licensee allows effective access to the full source -code of the Modified Software at a minimum during the entire period of its -distribution of the Modified Software, it being understood that the additional -cost of acquiring the source code shall not exceed the cost of transferring -the data. + 1. a copy of the Agreement, - 5.3.3. DISTRIBUTION OF DERIVATIVE SOFTWARE + 2. a notice relating to the limitation of both the Licensor's + warranty and liability as set forth in Articles 8 and 9, -When the Licensee creates Derivative Software, this Derivative Software may -be distributed under a license agreement other than this Agreement, subject -to compliance with the requirement to include a notice concerning the rights -over the Software as defined in Article 6.4. In the event the creation of -the Derivative Software required modification of the Source Code, the Licensee -undertakes that: +and that, in the event that only the object code of the Modified +Software is redistributed, the Licensee allows effective access to the +full source code of the Modified Software at a minimum during the entire +period of its distribution of the Modified Software, it being understood +that the additional cost of acquiring the source code shall not exceed +the cost of transferring the data. -1. the resulting Modified Software will be governed by this Agreement, -2. the Integrated Contributions in the resulting Modified Software will be -clearly identified and documented, + 5.3.3 DISTRIBUTION OF DERIVATIVE SOFTWARE -3. the Licensee will allow effective access to the source code of the Modified -Software, at a minimum during the entire period of distribution of the Derivative -Software, such that such modifications may be carried over in a subsequent -version of the Software; it being understood that the additional cost of purchasing -the source code of the Modified Software shall not exceed the cost of transferring -the data. +When the Licensee creates Derivative Software, this Derivative Software +may be distributed under a license agreement other than this Agreement, +subject to compliance with the requirement to include a notice +concerning the rights over the Software as defined in Article 6.4. +In the event the creation of the Derivative Software required modification +of the Source Code, the Licensee undertakes that: - 5.3.4. COMPATIBILITY WITH THE CeCILL LICENSE + 1. the resulting Modified Software will be governed by this Agreement, + 2. the Integrated Contributions in the resulting Modified Software + will be clearly identified and documented, + 3. the Licensee will allow effective access to the source code of the + Modified Software, at a minimum during the entire period of + distribution of the Derivative Software, such that such + modifications may be carried over in a subsequent version of the + Software; it being understood that the additional cost of + purchasing the source code of the Modified Software shall not + exceed the cost of transferring the data. -When a Modified Software contains an Integrated Contribution subject to the -CeCILL license agreement, or when a Derivative Software contains a Related -Module subject to the CeCILL license agreement, the provisions set forth in -the third item of Article 6.4 are optional. - Article 6 - INTELLECTUAL PROPERTY + 5.3.4 COMPATIBILITY WITH THE CeCILL LICENSE + +When a Modified Software contains an Integrated Contribution subject to +the CeCILL license agreement, or when a Derivative Software contains a +Related Module subject to the CeCILL license agreement, the provisions +set forth in the third item of Article 6.4 are optional. + + + Article 6 - INTELLECTUAL PROPERTY + 6.1 OVER THE INITIAL SOFTWARE -The Holder owns the economic rights over the Initial Software. Any or all -use of the Initial Software is subject to compliance with the terms and conditions -under which the Holder has elected to distribute its work and no one shall -be entitled to modify the terms and conditions for the distribution of said -Initial Software. +The Holder owns the economic rights over the Initial Software. Any or +all use of the Initial Software is subject to compliance with the terms +and conditions under which the Holder has elected to distribute its work +and no one shall be entitled to modify the terms and conditions for the +distribution of said Initial Software. + +The Holder undertakes that the Initial Software will remain ruled at +least by this Agreement, for the duration set forth in Article 4.2. -The Holder undertakes that the Initial Software will remain ruled at least -by this Agreement, for the duration set forth in Article 4.2. 6.2 OVER THE INTEGRATED CONTRIBUTIONS -The Licensee who develops an Integrated Contribution is the owner of the intellectual -property rights over this Contribution as defined by applicable law. +The Licensee who develops an Integrated Contribution is the owner of the +intellectual property rights over this Contribution as defined by +applicable law. + 6.3 OVER THE RELATED MODULES -The Licensee who develops a Related Module is the owner of the intellectual -property rights over this Related Module as defined by applicable law and -is free to choose the type of agreement that shall govern its distribution -under the conditions defined in Article 5.3.3. +The Licensee who develops a Related Module is the owner of the +intellectual property rights over this Related Module as defined by +applicable law and is free to choose the type of agreement that shall +govern its distribution under the conditions defined in Article 5.3.3. + 6.4 NOTICE OF RIGHTS - The Licensee expressly undertakes: +The Licensee expressly undertakes: -1. not to remove, or modify, in any manner, the intellectual property notices -attached to the Software; + 1. not to remove, or modify, in any manner, the intellectual property + notices attached to the Software; -2. to reproduce said notices, in an identical manner, in the copies of the -Software modified or not; + 2. to reproduce said notices, in an identical manner, in the copies + of the Software modified or not; -3. to ensure that use of the Software, its intellectual property notices and -the fact that it is governed by the Agreement is indicated in a text that -is easily accessible, specifically from the interface of any Derivative Software. + 3. to ensure that use of the Software, its intellectual property + notices and the fact that it is governed by the Agreement is + indicated in a text that is easily accessible, specifically from + the interface of any Derivative Software. -The Licensee undertakes not to directly or indirectly infringe the intellectual -property rights of the Holder and/or Contributors on the Software and to take, -where applicable, vis-à-vis its staff, any and all measures required to ensure -respect of said intellectual property rights of the Holder and/or Contributors. +The Licensee undertakes not to directly or indirectly infringe the +intellectual property rights of the Holder and/or Contributors on the +Software and to take, where applicable, vis-à-vis its staff, any and all +measures required to ensure respect of said intellectual property rights +of the Holder and/or Contributors. - Article 7 - RELATED SERVICES -7.1 Under no circumstances shall the Agreement oblige the Licensor to provide -technical assistance or maintenance services for the Software. + Article 7 - RELATED SERVICES -However, the Licensor is entitled to offer this type of services. The terms -and conditions of such technical assistance, and/or such maintenance, shall -be set forth in a separate instrument. Only the Licensor offering said maintenance -and/or technical assistance services shall incur liability therefor. +7.1 Under no circumstances shall the Agreement oblige the Licensor to +provide technical assistance or maintenance services for the Software. -7.2 Similarly, any Licensor is entitled to offer to its licensees, under its -sole responsibility, a warranty, that shall only be binding upon itself, for -the redistribution of the Software and/or the Modified Software, under terms -and conditions that it is free to decide. Said warranty, and the financial -terms and conditions of its application, shall be subject of a separate instrument -executed between the Licensor and the Licensee. +However, the Licensor is entitled to offer this type of services. The +terms and conditions of such technical assistance, and/or such +maintenance, shall be set forth in a separate instrument. Only the +Licensor offering said maintenance and/or technical assistance services +shall incur liability therefor. - Article 8 - LIABILITY +7.2 Similarly, any Licensor is entitled to offer to its licensees, under +its sole responsibility, a warranty, that shall only be binding upon +itself, for the redistribution of the Software and/or the Modified +Software, under terms and conditions that it is free to decide. Said +warranty, and the financial terms and conditions of its application, +shall be subject of a separate instrument executed between the Licensor +and the Licensee. -8.1 Subject to the provisions of Article 8.2, the Licensee shall be entitled -to claim compensation for any direct loss it may have suffered from the Software -as a result of a fault on the part of the relevant Licensor, subject to providing -evidence thereof. -8.2 The Licensor's liability is limited to the commitments made under this -Agreement and shall not be incurred as a result of in particular: (i) loss -due the Licensee's total or partial failure to fulfill its obligations, (ii) -direct or consequential loss that is suffered by the Licensee due to the use -or performance of the Software, and (iii) more generally, any consequential -loss. In particular the Parties expressly agree that any or all pecuniary -or business loss (i.e. loss of data, loss of profits, operating loss, loss -of customers or orders, opportunity cost, any disturbance to business activities) -or any or all legal proceedings instituted against the Licensee by a third -party, shall constitute consequential loss and shall not provide entitlement -to any or all compensation from the Licensor. + Article 8 - LIABILITY - Article 9 - WARRANTY +8.1 Subject to the provisions of Article 8.2, the Licensee shall be +entitled to claim compensation for any direct loss it may have suffered +from the Software as a result of a fault on the part of the relevant +Licensor, subject to providing evidence thereof. -9.1 The Licensee acknowledges that the scientific and technical state-of-the-art -when the Software was distributed did not enable all possible uses to be tested -and verified, nor for the presence of possible defects to be detected. In -this respect, the Licensee's attention has been drawn to the risks associated -with loading, using, modifying and/or developing and reproducing the Software -which are reserved for experienced users. +8.2 The Licensor's liability is limited to the commitments made under +this Agreement and shall not be incurred as a result of in particular: +(i) loss due the Licensee's total or partial failure to fulfill its +obligations, (ii) direct or consequential loss that is suffered by the +Licensee due to the use or performance of the Software, and (iii) more +generally, any consequential loss. In particular the Parties expressly +agree that any or all pecuniary or business loss (i.e. loss of data, +loss of profits, operating loss, loss of customers or orders, +opportunity cost, any disturbance to business activities) or any or all +legal proceedings instituted against the Licensee by a third party, +shall constitute consequential loss and shall not provide entitlement to +any or all compensation from the Licensor. -The Licensee shall be responsible for verifying, by any or all means, the -suitability of the product for its requirements, its good working order, and -for ensuring that it shall not cause damage to either persons or properties. -9.2 The Licensor hereby represents, in good faith, that it is entitled to -grant all the rights over the Software (including in particular the rights -set forth in Article 5). + Article 9 - WARRANTY -9.3 The Licensee acknowledges that the Software is supplied "as is" by the -Licensor without any other express or tacit warranty, other than that provided -for in Article 9.2 and, in particular, without any warranty as to its commercial -value, its secured, safe, innovative or relevant nature. +9.1 The Licensee acknowledges that the scientific and technical +state-of-the-art when the Software was distributed did not enable all +possible uses to be tested and verified, nor for the presence of +possible defects to be detected. In this respect, the Licensee's +attention has been drawn to the risks associated with loading, using, +modifying and/or developing and reproducing the Software which are +reserved for experienced users. -Specifically, the Licensor does not warrant that the Software is free from -any error, that it will operate without interruption, that it will be compatible -with the Licensee's own equipment and software configuration, nor that it -will meet the Licensee's requirements. +The Licensee shall be responsible for verifying, by any or all means, +the suitability of the product for its requirements, its good working +order, and for ensuring that it shall not cause damage to either persons +or properties. -9.4 The Licensor does not either expressly or tacitly warrant that the Software -does not infringe any third party intellectual property right relating to -a patent, software or any other property right. Therefore, the Licensor disclaims -any and all liability towards the Licensee arising out of any or all proceedings -for infringement that may be instituted in respect of the use, modification -and redistribution of the Software. Nevertheless, should such proceedings -be instituted against the Licensee, the Licensor shall provide it with technical -and legal assistance for its defense. Such technical and legal assistance -shall be decided on a case-by-case basis between the relevant Licensor and -the Licensee pursuant to a memorandum of understanding. The Licensor disclaims -any and all liability as regards the Licensee's use of the name of the Software. -No warranty is given as regards the existence of prior rights over the name -of the Software or as regards the existence of a trademark. +9.2 The Licensor hereby represents, in good faith, that it is entitled +to grant all the rights over the Software (including in particular the +rights set forth in Article 5). - Article 10 - TERMINATION +9.3 The Licensee acknowledges that the Software is supplied "as is" by +the Licensor without any other express or tacit warranty, other than +that provided for in Article 9.2 and, in particular, without any warranty +as to its commercial value, its secured, safe, innovative or relevant +nature. -10.1 In the event of a breach by the Licensee of its obligations hereunder, -the Licensor may automatically terminate this Agreement thirty (30) days after -notice has been sent to the Licensee and has remained ineffective. +Specifically, the Licensor does not warrant that the Software is free +from any error, that it will operate without interruption, that it will +be compatible with the Licensee's own equipment and software +configuration, nor that it will meet the Licensee's requirements. -10.2 A Licensee whose Agreement is terminated shall no longer be authorized -to use, modify or distribute the Software. However, any licenses that it may -have granted prior to termination of the Agreement shall remain valid subject -to their having been granted in compliance with the terms and conditions hereof. +9.4 The Licensor does not either expressly or tacitly warrant that the +Software does not infringe any third party intellectual property right +relating to a patent, software or any other property right. Therefore, +the Licensor disclaims any and all liability towards the Licensee +arising out of any or all proceedings for infringement that may be +instituted in respect of the use, modification and redistribution of the +Software. Nevertheless, should such proceedings be instituted against +the Licensee, the Licensor shall provide it with technical and legal +assistance for its defense. Such technical and legal assistance shall be +decided on a case-by-case basis between the relevant Licensor and the +Licensee pursuant to a memorandum of understanding. The Licensor +disclaims any and all liability as regards the Licensee's use of the +name of the Software. No warranty is given as regards the existence of +prior rights over the name of the Software or as regards the existence +of a trademark. + + + Article 10 - TERMINATION + +10.1 In the event of a breach by the Licensee of its obligations +hereunder, the Licensor may automatically terminate this Agreement +thirty (30) days after notice has been sent to the Licensee and has +remained ineffective. + +10.2 A Licensee whose Agreement is terminated shall no longer be +authorized to use, modify or distribute the Software. However, any +licenses that it may have granted prior to termination of the Agreement +shall remain valid subject to their having been granted in compliance +with the terms and conditions hereof. + + + Article 11 - MISCELLANEOUS - Article 11 - MISCELLANEOUS 11.1 EXCUSABLE EVENTS -Neither Party shall be liable for any or all delay, or failure to perform -the Agreement, that may be attributable to an event of force majeure, an act -of God or an outside cause, such as defective functioning or interruptions -of the electricity or telecommunications networks, network paralysis following -a virus attack, intervention by government authorities, natural disasters, -water damage, earthquakes, fire, explosions, strikes and labor unrest, war, -etc. +Neither Party shall be liable for any or all delay, or failure to +perform the Agreement, that may be attributable to an event of force +majeure, an act of God or an outside cause, such as defective +functioning or interruptions of the electricity or telecommunications +networks, network paralysis following a virus attack, intervention by +government authorities, natural disasters, water damage, earthquakes, +fire, explosions, strikes and labor unrest, war, etc. -11.2 Any failure by either Party, on one or more occasions, to invoke one -or more of the provisions hereof, shall under no circumstances be interpreted -as being a waiver by the interested Party of its right to invoke said provision(s) -subsequently. +11.2 Any failure by either Party, on one or more occasions, to invoke +one or more of the provisions hereof, shall under no circumstances be +interpreted as being a waiver by the interested Party of its right to +invoke said provision(s) subsequently. -11.3 The Agreement cancels and replaces any or all previous agreements, whether -written or oral, between the Parties and having the same purpose, and constitutes -the entirety of the agreement between said Parties concerning said purpose. -No supplement or modification to the terms and conditions hereof shall be -effective as between the Parties unless it is made in writing and signed by -their duly authorized representatives. +11.3 The Agreement cancels and replaces any or all previous agreements, +whether written or oral, between the Parties and having the same +purpose, and constitutes the entirety of the agreement between said +Parties concerning said purpose. No supplement or modification to the +terms and conditions hereof shall be effective as between the Parties +unless it is made in writing and signed by their duly authorized +representatives. + +11.4 In the event that one or more of the provisions hereof were to +conflict with a current or future applicable act or legislative text, +said act or legislative text shall prevail, and the Parties shall make +the necessary amendments so as to comply with said act or legislative +text. All other provisions shall remain effective. Similarly, invalidity +of a provision of the Agreement, for any reason whatsoever, shall not +cause the Agreement as a whole to be invalid. -11.4 In the event that one or more of the provisions hereof were to conflict -with a current or future applicable act or legislative text, said act or legislative -text shall prevail, and the Parties shall make the necessary amendments so -as to comply with said act or legislative text. All other provisions shall -remain effective. Similarly, invalidity of a provision of the Agreement, for -any reason whatsoever, shall not cause the Agreement as a whole to be invalid. 11.5 LANGUAGE -The Agreement is drafted in both French and English and both versions are -deemed authentic. +The Agreement is drafted in both French and English and both versions +are deemed authentic. - Article 12 - NEW VERSIONS OF THE AGREEMENT -12.1 Any person is authorized to duplicate and distribute copies of this Agreement. + Article 12 - NEW VERSIONS OF THE AGREEMENT -12.2 So as to ensure coherence, the wording of this Agreement is protected -and may only be modified by the authors of the License, who reserve the right -to periodically publish updates or new versions of the Agreement, each with -a separate number. These subsequent versions may address new issues encountered -by Free Software. +12.1 Any person is authorized to duplicate and distribute copies of this +Agreement. -12.3 Any Software distributed under a given version of the Agreement may only -be subsequently distributed under the same version of the Agreement or a subsequent -version. +12.2 So as to ensure coherence, the wording of this Agreement is +protected and may only be modified by the authors of the License, who +reserve the right to periodically publish updates or new versions of the +Agreement, each with a separate number. These subsequent versions may +address new issues encountered by Free Software. - Article 13 - GOVERNING LAW AND JURISDICTION +12.3 Any Software distributed under a given version of the Agreement may +only be subsequently distributed under the same version of the Agreement +or a subsequent version. -13.1 The Agreement is governed by French law. The Parties agree to endeavor -to seek an amicable solution to any disagreements or disputes that may arise -during the performance of the Agreement. -13.2 Failing an amicable solution within two (2) months as from their occurrence, -and unless emergency proceedings are necessary, the disagreements or disputes -shall be referred to the Paris Courts having jurisdiction, by the more diligent -Party. + Article 13 - GOVERNING LAW AND JURISDICTION -Version 1.0 dated 2006-09-05. 1 CeCILL stands for Ce(a) C(nrs) I(nria) L(ogiciel) -L(ibre) +13.1 The Agreement is governed by French law. The Parties agree to +endeavor to seek an amicable solution to any disagreements or disputes +that may arise during the performance of the Agreement. + +13.2 Failing an amicable solution within two (2) months as from their +occurrence, and unless emergency proceedings are necessary, the +disagreements or disputes shall be referred to the Paris Courts having +jurisdiction, by the more diligent Party. + + +Version 1.0 dated 2006-09-05. diff --git a/options/license/CERN-OHL-1.1 b/options/license/CERN-OHL-1.1 index f100df475..9fcefc956 100644 --- a/options/license/CERN-OHL-1.1 +++ b/options/license/CERN-OHL-1.1 @@ -1,164 +1,47 @@ CERN OHL v1.1 - 2011-07-08 - CERN, Geneva, Switzerland - CERN Open Hardware Licence v1.1 Preamble - -Through this CERN Open Hardware Licence ("CERN OHL") version 1.1, the Organization -wishes to disseminate its hardware designs (as published on http://www.ohwr.org/) -as widely as possible, and generally to foster collaboration among public -research hardware designers. The CERN OHL is copyright of CERN. Anyone is -welcome to use the CERN OHL, in unmodified form only, for the distribution -of his own Open Hardware designs. Any other right is reserved. +Through this CERN Open Hardware Licence ("CERN OHL") version 1.1, the Organization wishes to disseminate its hardware designs (as published on http://www.ohwr.org/) as widely as possible, and generally to foster collaboration among public research hardware designers. The CERN OHL is copyright of CERN. Anyone is welcome to use the CERN OHL, in unmodified form only, for the distribution of his own Open Hardware designs. Any other right is reserved. 1. Definitions - In this Licence, the following terms have the following meanings: - -"Licence" means this CERN OHL. - -"Documentation" means schematic diagrams, designs, circuit or circuit board -layouts, mechanical drawings, flow charts and descriptive text, and other -explanatory material that is explicitly stated as being made available under -the conditions of this Licence. The Documentation may be in any medium, including -but not limited to computer files and representations on paper, film, or any -other media. - -"Product" means either an entire, or any part of a, device built using the -Documentation or the modified Documentation. - -"Licensee" means any natural or legal person exercising rights under this -Licence. - -"Licensor" means any natural or legal person that creates or modifies Documentation -and subsequently communicates to the public and/ or distributes the resulting -Documentation under the terms and conditions of this Licence. - +“Licence” means this CERN OHL. +“Documentation” means schematic diagrams, designs, circuit or circuit board layouts, mechanical drawings, flow charts and descriptive text, and other explanatory material that is explicitly stated as being made available under the conditions of this Licence. The Documentation may be in any medium, including but not limited to computer files and representations on paper, film, or any other media. +“Product” means either an entire, or any part of a, device built using the Documentation or the modified Documentation. +“Licensee” means any natural or legal person exercising rights under this Licence. +“Licensor” means any natural or legal person that creates or modifies Documentation and subsequently communicates to the public and/ or distributes the resulting Documentation under the terms and conditions of this Licence. A Licensee may at the same time be a Licensor, and vice versa. - - 2. Applicability +2.1 This Licence governs the use, copying, modification, communication to the public and distribution of the Documentation, and the manufacture and distribution of Products. By exercising any right granted under this Licence, the Licensee irrevocably accepts these terms and conditions. +2.2 This Licence is granted by the Licensor directly to the Licensee, and shall apply worldwide and without limitation in time. The Licensee may assign his licence rights or grant sub-licences. +2.3 This Licence does not apply to software, firmware, or code loaded into programmable devices which may be used in conjunction with the Documentation, the modified Documentation or with Products. The use of such software, firmware, or code is subject to the applicable licence terms and conditions. -2.1 This Licence governs the use, copying, modification, communication to -the public and distribution of the Documentation, and the manufacture and -distribution of Products. By exercising any right granted under this Licence, -the Licensee irrevocably accepts these terms and conditions. - -2.2 This Licence is granted by the Licensor directly to the Licensee, and -shall apply worldwide and without limitation in time. The Licensee may assign -his licence rights or grant sub-licences. - -2.3 This Licence does not apply to software, firmware, or code loaded into -programmable devices which may be used in conjunction with the Documentation, -the modified Documentation or with Products. The use of such software, firmware, -or code is subject to the applicable licence terms and conditions. - -3. Copying, modification, communication to the public and distribution of -the Documentation - -3.1 The Licensee shall keep intact all copyright and trademarks notices and -all notices that refer to this Licence and to the disclaimer of warranties -that is included in the Documentation. He shall include a copy thereof in -every copy of the documentation or, as the case may be, modified Documentation, -that he communicates to the public or distributes. - -3.2 The Licensee may use, copy, communicate to the public and distribute verbatim -copies of the Documentation, in any medium, subject to the requirements specified -in section 3.1. - -3.3 The Licensee may modify the Documentation or any portion thereof. The -Licensee may communicate to the public and distribute the modified Documentation -(thereby in addition to being a Licensee also becoming a Licensor), always -provided that he shall: - - a. comply with section 3.1; - -b. cause the modified Documentation to carry prominent notices stating that -the Licensee has modified the Documentation, with the date and details of -the modifications; - -c. license the modified Documentation under the terms and conditions of this -Licence or, where applicable, a later version of this Licence as may be issued -by CERN; and - -d. send a copy of the modified Documentation to all Licensors that contributed -to the parts of the Documentation that were modified, as well as to any other -Licensor who has requested to receive a copy of the modified Documentation -and has provided a means of contact with the Documentation. - -3.4 The Licence includes a licence to those patents or registered designs -that are held by the Licensor, to the extent necessary to make use of the -rights granted under this Licence. The scope of this section 3.4 shall be -strictly limited to the parts of the Documentation or modified Documentation -created by the Licensor. +3. Copying, modification, communication to the public and distribution of the Documentation +3.1 The Licensee shall keep intact all copyright and trademarks notices and all notices that refer to this Licence and to the disclaimer of warranties that is included in the Documentation. He shall include a copy thereof in every copy of the documentation or, as the case may be, modified Documentation, that he communicates to the public or distributes. +3.2 The Licensee may use, copy, communicate to the public and distribute verbatim copies of the Documentation, in any medium, subject to the requirements specified in section 3.1. +3.3 The Licensee may modify the Documentation or any portion thereof. The Licensee may communicate to the public and distribute the modified Documentation (thereby in addition to being a Licensee also becoming a Licensor), always provided that he shall: +a. comply with section 3.1; +b. cause the modified Documentation to carry prominent notices stating that the Licensee has modified the Documentation, with the date and details of the modifications; +c. license the modified Documentation under the terms and conditions of this Licence or, where applicable, a later version of this Licence as may be issued by CERN; and +d. send a copy of the modified Documentation to all Licensors that contributed to the parts of the Documentation that were modified, as well as to any other Licensor who has requested to receive a copy of the modified Documentation and has provided a means of contact with the Documentation. +3.4 The Licence includes a licence to those patents or registered designs that are held by the Licensor, to the extent necessary to make use of the rights granted under this Licence. The scope of this section 3.4 shall be strictly limited to the parts of the Documentation or modified Documentation created by the Licensor. 4. Manufacture and distribution of Products - -4.1 The Licensee may manufacture or distribute Products always provided that -the Licensee distributes to each recipient of such Products a copy of the -Documentation or modified Documentation, as applicable, and complies with -section 3. - -4.2 The Licensee is invited to inform in writing any Licensor who has indicated -its wish to receive this information about the type, quantity and dates of -production of Products the Licensee has (had) manufactured. +4.1 The Licensee may manufacture or distribute Products always provided that the Licensee distributes to each recipient of such Products a copy of the Documentation or modified Documentation, as applicable, and complies with section 3. +4.2 The Licensee is invited to inform in writing any Licensor who has indicated its wish to receive this information about the type, quantity and dates of production of Products the Licensee has (had) manufactured. 5. Warranty and liability - -5.1 DISCLAIMER – The Documentation and any modified Documentation are provided -"as is" and any express or implied warranties, including, but not limited -to, implied warranties of merchantability, of satisfactory quality, and fitness -for a particular purpose or use are disclaimed in respect of the Documentation, -the modified Documentation or any Product. The Licensor makes no representation -that the Documentation, modified Documentation, or any Product, does or will -not infringe any patent, copyright, trade secret or other proprietary right. -The entire risk as to the use, quality, and performance of a Product shall -be with the Licensee and not the Licensor. This disclaimer of warranty is -an essential part of this Licence and a condition for the grant of any rights -granted under this Licence. The Licensee warrants that it does not act in -a consumer capacity. - -5.2 LIMITATION OF LIABILITY – The Licensor shall have no liability for direct, -indirect, special, incidental, consequential, exemplary, punitive or other -damages of any character including, without limitation, procurement of substitute -goods or services, loss of use, data or profits, or business interruption, -however caused and on any theory of contract, warranty, tort (including negligence), -product liability or otherwise, arising in any way in relation to the Documentation, -modified Documentation and/or the use, manufacture or distribution of a Product, -even if advised of the possibility of such damages, and the Licensee shall -hold the Licensor(s) free and harmless from any liability, costs, damages, -fees and expenses, including claims by third parties, in relation to such -use. +5.1 DISCLAIMER – The Documentation and any modified Documentation are provided "as is" and any express or implied warranties, including, but not limited to, implied warranties of merchantability, of satisfactory quality, and fitness for a particular purpose or use are disclaimed in respect of the Documentation, the modified Documentation or any Product. The Licensor makes no representation that the Documentation, modified Documentation, or any Product, does or will not infringe any patent, copyright, trade secret or other proprietary right. The entire risk as to the use, quality, and performance of a Product shall be with the Licensee and not the Licensor. This disclaimer of warranty is an essential part of this Licence and a condition for the grant of any rights granted under this Licence. The Licensee warrants that it does not act in a consumer capacity. +5.2 LIMITATION OF LIABILITY – The Licensor shall have no liability for direct, indirect, special, incidental, consequential, exemplary, punitive or other damages of any character including, without limitation, procurement of substitute goods or services, loss of use, data or profits, or business interruption, however caused and on any +theory of contract, warranty, tort (including negligence), product liability or otherwise, arising in any way in relation to the Documentation, modified Documentation and/or the use, manufacture or distribution of a Product, even if advised of the possibility of such damages, and the Licensee shall hold the Licensor(s) free and harmless +from any liability, costs, damages, fees and expenses, including claims by third parties, in relation to such use. 6. General - -6.1 The rights granted under this Licence do not imply or represent any transfer -or assignment of intellectual property rights to the Licensee. - -6.2 The Licensee shall not use or make reference to any of the names, acronyms, -images or logos under which the Licensor is known, save in so far as required -to comply with section 3. Any such permitted use or reference shall be factual -and shall in no event suggest any kind of endorsement by the Licensor or its -personnel of the modified Documentation or any Product, or any kind of implication -by the Licensor or its personnel in the preparation of the modified Documentation -or Product. - -6.3 CERN may publish updated versions of this Licence which retain the same -general provisions as this version, but differ in detail so far this is required -and reasonable. New versions will be published with a unique version number. - -6.4 This Licence shall terminate with immediate effect, upon written notice -and without involvement of a court if the Licensee fails to comply with any -of its terms and conditions, or if the Licensee initiates legal action against -Licensor in relation to this Licence. Section 5 shall continue to apply. - -6.5 Except as may be otherwise agreed with the Intergovernmental Organization, -any dispute with respect to this Licence involving an Intergovernmental Organization -shall, by virtue of the latter's Intergovernmental status, be settled by international -arbitration. The arbitration proceedings shall be held at the place where -the Intergovernmental Organization has its seat. The arbitral award shall -be final and binding upon the parties, who hereby expressly agree to renounce -any form of appeal or revision. +6.1 The rights granted under this Licence do not imply or represent any transfer or assignment of intellectual property rights to the Licensee. +6.2 The Licensee shall not use or make reference to any of the names, acronyms, images or logos under which the Licensor is known, save in so far as required to comply with section 3. Any such permitted use or reference shall be factual and shall in no event suggest any kind of endorsement by the Licensor or its personnel of the modified Documentation or any Product, or any kind of implication by the Licensor or its personnel in the preparation of the modified Documentation or Product. +6.3 CERN may publish updated versions of this Licence which retain the same general provisions as this version, but differ in detail so far this is required and reasonable. New versions will be published with a unique version number. +6.4 This Licence shall terminate with immediate effect, upon written notice and without involvement of a court if the Licensee fails to comply with any of its terms and conditions, or if the Licensee initiates legal action against Licensor in relation to this Licence. Section 5 shall continue to apply. +6.5 Except as may be otherwise agreed with the Intergovernmental Organization, any dispute with respect to this Licence involving an Intergovernmental Organization shall, by virtue of the latter's Intergovernmental status, be settled by international arbitration. The arbitration proceedings shall be held at the place where the Intergovernmental Organization has its seat. The arbitral award shall be final and binding upon the parties, who hereby expressly agree to renounce any form of appeal or revision. diff --git a/options/license/CERN-OHL-1.2 b/options/license/CERN-OHL-1.2 index c9cab3cb3..def694c19 100644 --- a/options/license/CERN-OHL-1.2 +++ b/options/license/CERN-OHL-1.2 @@ -1,181 +1,48 @@ CERN OHL v1.2 - 2013-09-06 - CERN, Geneva, Switzerland - CERN Open Hardware Licence v1.2 Preamble - -Through this CERN Open Hardware Licence ("CERN OHL") version 1.2, CERN wishes -to provide a tool to foster collaboration and sharing among hardware designers. -The CERN OHL is copyright CERN. Anyone is welcome to use the CERN OHL, in -unmodified form only, for the distribution of their own Open Hardware designs. -Any other right is reserved. Release of hardware designs under the CERN OHL -does not constitute an endorsement of the licensor or its designs nor does -it imply any involvement by CERN in the development of such designs. +Through this CERN Open Hardware Licence ("CERN OHL") version 1.2, CERN wishes to provide a tool to foster collaboration and sharing among hardware designers. The CERN OHL is copyright CERN. Anyone is welcome to use the CERN OHL, in unmodified form only, for the distribution of their own Open Hardware designs. Any other right is reserved. Release of hardware designs under the CERN OHL does not constitute an endorsement of the licensor or its designs nor does it imply any involvement by CERN in the development of such designs. 1. Definitions - In this Licence, the following terms have the following meanings: - -"Licence" means this CERN OHL. - -"Documentation" means schematic diagrams, designs, circuit or circuit board -layouts, mechanical drawings, flow charts and descriptive text, and other -explanatory material that is explicitly stated as being made available under -the conditions of this Licence. The Documentation may be in any medium, including -but not limited to computer files and representations on paper, film, or any -other media. - -"Documentation Location" means a location where the Licensor has placed Documentation, -and which he believes will be publicly accessible for at least three years -from the first communication to the public or distribution of Documentation. - -"Product" means either an entire, or any part of a, device built using the -Documentation or the modified Documentation. - -"Licensee" means any natural or legal person exercising rights under this -Licence. - -"Licensor" means any natural or legal person that creates or modifies Documentation -and subsequently communicates to the public and/ or distributes the resulting -Documentation under the terms and conditions of this Licence. - +“Licence” means this CERN OHL. +“Documentation” means schematic diagrams, designs, circuit or circuit board layouts, mechanical drawings, flow charts and descriptive text, and other explanatory material that is explicitly stated as being made available under the conditions of this Licence. The Documentation may be in any medium, including but not limited to computer files and representations on paper, film, or any other media. +“Documentation Location” means a location where the Licensor has placed Documentation, and which he believes will be publicly accessible for at least three years from the first communication to the public or distribution of Documentation. +“Product” means either an entire, or any part of a, device built using the Documentation or the modified Documentation. +“Licensee” means any natural or legal person exercising rights under this Licence. +“Licensor” means any natural or legal person that creates or modifies Documentation and subsequently communicates to the public and/ or distributes the resulting Documentation under the terms and conditions of this Licence. A Licensee may at the same time be a Licensor, and vice versa. - -Use of the masculine gender includes the feminine and neuter genders and is -employed solely to facilitate reading. - - +Use of the masculine gender includes the feminine and neuter genders and is employed solely to facilitate reading. 2. Applicability +2.1. This Licence governs the use, copying, modification, communication to the public and distribution of the Documentation, and the manufacture and distribution of Products. By exercising any right granted under this Licence, the Licensee irrevocably accepts these terms and conditions. +2.2. This Licence is granted by the Licensor directly to the Licensee, and shall apply worldwide and without limitation in time. The Licensee may assign his licence rights or grant sub-licences. +2.3. This Licence does not extend to software, firmware, or code loaded into programmable devices which may be used in conjunction with the Documentation, the modified Documentation or with Products, unless such software, firmware, or code is explicitly expressed to be subject to this Licence. The use of such software, firmware, or code is otherwise subject to the applicable licence terms and conditions. -2.1. This Licence governs the use, copying, modification, communication to -the public and distribution of the Documentation, and the manufacture and -distribution of Products. By exercising any right granted under this Licence, -the Licensee irrevocably accepts these terms and conditions. - -2.2. This Licence is granted by the Licensor directly to the Licensee, and -shall apply worldwide and without limitation in time. The Licensee may assign -his licence rights or grant sub-licences. - -2.3. This Licence does not extend to software, firmware, or code loaded into -programmable devices which may be used in conjunction with the Documentation, -the modified Documentation or with Products, unless such software, firmware, -or code is explicitly expressed to be subject to this Licence. The use of -such software, firmware, or code is otherwise subject to the applicable licence -terms and conditions. - -3. Copying, modification, communication to the public and distribution of -the Documentation - -3.1. The Licensee shall keep intact all copyright and trademarks notices, -all notices referring to Documentation Location, and all notices that refer -to this Licence and to the disclaimer of warranties that are included in the -Documentation. He shall include a copy thereof in every copy of the Documentation -or, as the case may be, modified Documentation, that he communicates to the -public or distributes. - -3.2. The Licensee may copy, communicate to the public and distribute verbatim -copies of the Documentation, in any medium, subject to the requirements specified -in section 3.1. - -3.3. The Licensee may modify the Documentation or any portion thereof provided -that upon modification of the Documentation, the Licensee shall make the modified -Documentation available from a Documentation Location such that it can be -easily located by an original Licensor once the Licensee communicates to the -public or distributes the modified Documentation under section 3.4, and, where -required by section 4.1, by a recipient of a Product. However, the Licensor -shall not assert his rights under the foregoing proviso unless or until a -Product is distributed. - -3.4. The Licensee may communicate to the public and distribute the modified -Documentation (thereby in addition to being a Licensee also becoming a Licensor), -always provided that he shall: - - a) comply with section 3.1; - -b) cause the modified Documentation to carry prominent notices stating that -the Licensee has modified the Documentation, with the date and description -of the modifications; - -c) cause the modified Documentation to carry a new Documentation Location -notice if the original Documentation provided for one; - -d) make available the modified Documentation at the same level of abstraction -as that of the Documentation, in the preferred format for making modifications -to it (e.g. the native format of the CAD tool as applicable), and in the event -that format is proprietary, in a format viewable with a tool licensed under -an OSI-approved license if the proprietary tool can create it; and - -e) license the modified Documentation under the terms and conditions of this -Licence or, where applicable, a later version of this Licence as may be issued -by CERN. - -3.5. The Licence includes a non-exclusive licence to those patents or registered -designs that are held by, under the control of, or sub-licensable by the Licensor, -to the extent necessary to make use of the rights granted under this Licence. -The scope of this section 3.5 shall be strictly limited to the parts of the -Documentation or modified Documentation created by the Licensor. +3. Copying, modification, communication to the public and distribution of the Documentation +3.1. The Licensee shall keep intact all copyright and trademarks notices, all notices referring to Documentation Location, and all notices that refer to this Licence and to the disclaimer of warranties that are included in the Documentation. He shall include a copy thereof in every copy of the Documentation or, as the case may be, modified Documentation, that he communicates to the public or distributes. +3.2. The Licensee may copy, communicate to the public and distribute verbatim copies of the Documentation, in any medium, subject to the requirements specified in section 3.1. +3.3. The Licensee may modify the Documentation or any portion thereof provided that upon modification of the Documentation, the Licensee shall make the modified Documentation available from a Documentation Location such that it can be easily located by an original Licensor once the Licensee communicates to the public or distributes the modified Documentation under section 3.4, and, where required by section 4.1, by a recipient of a Product. However, the Licensor shall not assert his rights under the foregoing proviso unless or until a Product is distributed. +3.4. The Licensee may communicate to the public and distribute the modified Documentation (thereby in addition to being a Licensee also becoming a Licensor), always provided that he shall: +a) comply with section 3.1; +b) cause the modified Documentation to carry prominent notices stating that the Licensee has modified the Documentation, with the date and description of the modifications; +c) cause the modified Documentation to carry a new Documentation Location notice if the original Documentation provided for one; +d) make available the modified Documentation at the same level of abstraction as that of the Documentation, in the preferred format for making modifications to it (e.g. the native format of the CAD tool as applicable), and in the event that format is proprietary, in a format viewable with a tool licensed under an OSI-approved license if the proprietary tool can create it; and +e) license the modified Documentation under the terms and conditions of this Licence or, where applicable, a later version of this Licence as may be issued by CERN. +3.5. The Licence includes a non-exclusive licence to those patents or registered designs that are held by, under the control of, or sub-licensable by the Licensor, to the extent necessary to make use of the rights granted under this Licence. The scope of this section 3.5 shall be strictly limited to the parts of the Documentation or modified Documentation created by the Licensor. 4. Manufacture and distribution of Products - -4.1. The Licensee may manufacture or distribute Products always provided that, -where such manufacture or distribution requires a licence under this Licence -the Licensee provides to each recipient of such Products an easy means of -accessing a copy of the Documentation or modified Documentation, as applicable, -as set out in section 3. - -4.2. The Licensee is invited to inform any Licensor who has indicated his -wish to receive this information about the type, quantity and dates of production -of Products the Licensee has (had) manufactured +4.1. The Licensee may manufacture or distribute Products always provided that, where such manufacture or distribution requires a licence under this Licence the Licensee provides to each recipient of such Products an easy means of accessing a copy of the Documentation or modified Documentation, as applicable, as set out in section 3. +4.2. The Licensee is invited to inform any Licensor who has indicated his wish to receive this information about the type, quantity and dates of production of Products the Licensee has (had) manufactured 5. Warranty and liability - -5.1. DISCLAIMER – The Documentation and any modified Documentation are provided -"as is" and any express or implied warranties, including, but not limited -to, implied warranties of merchantability, of satisfactory quality, non-infringement -of third party rights, and fitness for a particular purpose or use are disclaimed -in respect of the Documentation, the modified Documentation or any Product. -The Licensor makes no representation that the Documentation, modified Documentation, -or any Product, does or will not infringe any patent, copyright, trade secret -or other proprietary right. The entire risk as to the use, quality, and performance -of a Product shall be with the Licensee and not the Licensor. This disclaimer -of warranty is an essential part of this Licence and a condition for the grant -of any rights granted under this Licence. The Licensee warrants that it does -not act in a consumer capacity. - -5.2. LIMITATION OF LIABILITY – The Licensor shall have no liability for direct, -indirect, special, incidental, consequential, exemplary, punitive or other -damages of any character including, without limitation, procurement of substitute -goods or services, loss of use, data or profits, or business interruption, -however caused and on any theory of contract, warranty, tort (including negligence), -product liability or otherwise, arising in any way in relation to the Documentation, -modified Documentation and/or the use, manufacture or distribution of a Product, -even if advised of the possibility of such damages, and the Licensee shall -hold the Licensor(s) free and harmless from any liability, costs, damages, -fees and expenses, including claims by third parties, in relation to such -use. +5.1. DISCLAIMER – The Documentation and any modified Documentation are provided "as is" and any express or implied warranties, including, but not limited to, implied warranties of merchantability, of satisfactory quality, non-infringement of third party rights, and fitness for a particular purpose or use are disclaimed in respect of the Documentation, the modified Documentation or any Product. The Licensor makes no representation that the Documentation, modified Documentation, or any Product, does or will not infringe any patent, copyright, trade secret or other proprietary right. The entire risk as to the use, quality, and performance of a Product shall be with the Licensee and not the Licensor. This disclaimer of warranty is an essential part of this Licence and a condition for the grant of any rights granted under this Licence. The Licensee warrants that it does not act in a consumer capacity. +5.2. LIMITATION OF LIABILITY – The Licensor shall have no liability for direct, indirect, special, incidental, consequential, exemplary, punitive or other damages of any character including, without limitation, procurement of substitute goods or services, loss of use, data or profits, or business interruption, however caused and on any theory of contract, warranty, tort (including negligence), product liability or otherwise, arising in any way in relation to the Documentation, modified Documentation and/or the use, manufacture or distribution of a Product, even if advised of the possibility of such damages, and the Licensee shall hold the Licensor(s) free and harmless from any liability, costs, damages, fees and expenses, including claims by third parties, in relation to such use. 6. General - -6.1. Except for the rights explicitly granted hereunder, this Licence does -not imply or represent any transfer or assignment of intellectual property -rights to the Licensee. - -6.2. The Licensee shall not use or make reference to any of the names (including -acronyms and abbreviations), images, or logos under which the Licensor is -known, save in so far as required to comply with section 3. Any such permitted -use or reference shall be factual and shall in no event suggest any kind of -endorsement by the Licensor or its personnel of the modified Documentation -or any Product, or any kind of implication by the Licensor or its personnel -in the preparation of the modified Documentation or Product. - -6.3. CERN may publish updated versions of this Licence which retain the same -general provisions as this version, but differ in detail so far this is required -and reasonable. New versions will be published with a unique version number. - -6.4. This Licence shall terminate with immediate effect, upon written notice -and without involvement of a court if the Licensee fails to comply with any -of its terms and conditions, or if the Licensee initiates legal action against -Licensor in relation to this Licence. Section 5 shall continue to apply. +6.1. Except for the rights explicitly granted hereunder, this Licence does not imply or represent any transfer or assignment of intellectual property rights to the Licensee. +6.2. The Licensee shall not use or make reference to any of the names (including acronyms and abbreviations), images, or logos under which the Licensor is known, save in so far as required to comply with section 3. Any such permitted use or reference shall be factual and shall in no event suggest any kind of endorsement by the Licensor or its personnel of the modified Documentation or any Product, or any kind of implication by the Licensor or its personnel in the preparation of the modified Documentation or Product. +6.3. CERN may publish updated versions of this Licence which retain the same general provisions as this version, but differ in detail so far this is required and reasonable. New versions will be published with a unique version number. +6.4. This Licence shall terminate with immediate effect, upon written notice and without involvement of a court if the Licensee fails to comply with any of its terms and conditions, or if the Licensee initiates legal action against Licensor in relation to this Licence. Section 5 shall continue to apply. diff --git a/options/license/CERN-OHL-P-2.0 b/options/license/CERN-OHL-P-2.0 index 941456de5..f19d2b7ad 100644 --- a/options/license/CERN-OHL-P-2.0 +++ b/options/license/CERN-OHL-P-2.0 @@ -1,168 +1,199 @@ CERN Open Hardware Licence Version 2 - Permissive + Preamble -CERN has developed this licence to promote collaboration among hardware designers -and to provide a legal tool which supports the freedom to use, study, modify, -share and distribute hardware designs and products based on those designs. -Version 2 of the CERN Open Hardware Licence comes in three variants: this -licence, CERN-OHL-P (permissive); and two reciprocal licences: CERN- OHL-W -(weakly reciprocal) and CERN-OHL-S (strongly reciprocal). +CERN has developed this licence to promote collaboration among +hardware designers and to provide a legal tool which supports the +freedom to use, study, modify, share and distribute hardware designs +and products based on those designs. Version 2 of the CERN Open +Hardware Licence comes in three variants: this licence, CERN-OHL-P +(permissive); and two reciprocal licences: CERN- OHL-W (weakly +reciprocal) and CERN-OHL-S (strongly reciprocal). -The CERN-OHL-P is copyright CERN 2020. Anyone is welcome to use it, in unmodified -form only. +The CERN-OHL-P is copyright CERN 2020. Anyone is welcome to use it, in +unmodified form only. -Use of this Licence does not imply any endorsement by CERN of any Licensor -or their designs nor does it imply any involvement by CERN in their development. +Use of this Licence does not imply any endorsement by CERN of any +Licensor or their designs nor does it imply any involvement by CERN in +their development. - 1 Definitions - 1.1 'Licence' means this CERN-OHL-P. +1 Definitions -1.2 'Source' means information such as design materials or digital code which -can be applied to Make or test a Product or to prepare a Product for use, -Conveyance or sale, regardless of its medium or how it is expressed. It may -include Notices. + 1.1 'Licence' means this CERN-OHL-P. -1.3 'Covered Source' means Source that is explicitly made available under -this Licence. + 1.2 'Source' means information such as design materials or digital + code which can be applied to Make or test a Product or to + prepare a Product for use, Conveyance or sale, regardless of its + medium or how it is expressed. It may include Notices. -1.4 'Product' means any device, component, work or physical object, whether -in finished or intermediate form, arising from the use, application or processing -of Covered Source. + 1.3 'Covered Source' means Source that is explicitly made available + under this Licence. -1.5 'Make' means to create or configure something, whether by manufacture, -assembly, compiling, loading or applying Covered Source or another Product -or otherwise. + 1.4 'Product' means any device, component, work or physical object, + whether in finished or intermediate form, arising from the use, + application or processing of Covered Source. -1.6 'Notice' means copyright, acknowledgement and trademark notices, references -to the location of any Notices, modification notices (subsection 3.3(b)) and -all notices that refer to this Licence and to the disclaimer of warranties -that are included in the Covered Source. + 1.5 'Make' means to create or configure something, whether by + manufacture, assembly, compiling, loading or applying Covered + Source or another Product or otherwise. -1.7 'Licensee' or 'You' means any person exercising rights under this Licence. + 1.6 'Notice' means copyright, acknowledgement and trademark notices, + references to the location of any Notices, modification notices + (subsection 3.3(b)) and all notices that refer to this Licence + and to the disclaimer of warranties that are included in the + Covered Source. -1.8 'Licensor' means a person who creates Source or modifies Covered Source -and subsequently Conveys the resulting Covered Source under the terms and -conditions of this Licence. A person may be a Licensee and a Licensor at the -same time. + 1.7 'Licensee' or 'You' means any person exercising rights under + this Licence. - 1.9 'Convey' means to communicate to the public or distribute. + 1.8 'Licensor' means a person who creates Source or modifies Covered + Source and subsequently Conveys the resulting Covered Source + under the terms and conditions of this Licence. A person may be + a Licensee and a Licensor at the same time. - 2 Applicability + 1.9 'Convey' means to communicate to the public or distribute. -2.1 This Licence governs the use, copying, modification, Conveying of Covered -Source and Products, and the Making of Products. By exercising any right granted -under this Licence, You irrevocably accept these terms and conditions. -2.2 This Licence is granted by the Licensor directly to You, and shall apply -worldwide and without limitation in time. +2 Applicability -2.3 You shall not attempt to restrict by contract or otherwise the rights -granted under this Licence to other Licensees. + 2.1 This Licence governs the use, copying, modification, Conveying + of Covered Source and Products, and the Making of Products. By + exercising any right granted under this Licence, You irrevocably + accept these terms and conditions. -2.4 This Licence is not intended to restrict fair use, fair dealing, or any -other similar right. + 2.2 This Licence is granted by the Licensor directly to You, and + shall apply worldwide and without limitation in time. - 3 Copying, modifying and Conveying Covered Source + 2.3 You shall not attempt to restrict by contract or otherwise the + rights granted under this Licence to other Licensees. -3.1 You may copy and Convey verbatim copies of Covered Source, in any medium, -provided You retain all Notices. + 2.4 This Licence is not intended to restrict fair use, fair dealing, + or any other similar right. - 3.2 You may modify Covered Source, other than Notices. -You may only delete Notices if they are no longer applicable to the corresponding -Covered Source as modified by You and You may add additional Notices applicable -to Your modifications. +3 Copying, modifying and Conveying Covered Source -3.3 You may Convey modified Covered Source (with the effect that You shall -also become a Licensor) provided that You: + 3.1 You may copy and Convey verbatim copies of Covered Source, in + any medium, provided You retain all Notices. - a) retain Notices as required in subsection 3.2; and + 3.2 You may modify Covered Source, other than Notices. -b) add a Notice to the modified Covered Source stating that You have modified -it, with the date and brief description of how You have modified it. + You may only delete Notices if they are no longer applicable to + the corresponding Covered Source as modified by You and You may + add additional Notices applicable to Your modifications. -3.4 You may Convey Covered Source or modified Covered Source under licence -terms which differ from the terms of this Licence provided that: + 3.3 You may Convey modified Covered Source (with the effect that You + shall also become a Licensor) provided that You: - a) You comply at all times with subsection 3.3; and + a) retain Notices as required in subsection 3.2; and -b) You provide a copy of this Licence to anyone to whom You Convey Covered -Source or modified Covered Source. + b) add a Notice to the modified Covered Source stating that You + have modified it, with the date and brief description of how + You have modified it. - 4 Making and Conveying Products + 3.4 You may Convey Covered Source or modified Covered Source under + licence terms which differ from the terms of this Licence + provided that: -You may Make Products, and/or Convey them, provided that You ensure that the -recipient of the Product has access to any Notices applicable to the Product. + a) You comply at all times with subsection 3.3; and - 5 DISCLAIMER AND LIABILITY + b) You provide a copy of this Licence to anyone to whom You + Convey Covered Source or modified Covered Source. -5.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products are provided -'as is' and any express or implied warranties, including, but not limited -to, implied warranties of merchantability, of satisfactory quality, non-infringement -of third party rights, and fitness for a particular purpose or use are disclaimed -in respect of any Source or Product to the maximum extent permitted by law. -The Licensor makes no representation that any Source or Product does not or -will not infringe any patent, copyright, trade secret or other proprietary -right. The entire risk as to the use, quality, and performance of any Source -or Product shall be with You and not the Licensor. This disclaimer of warranty -is an essential part of this Licence and a condition for the grant of any -rights granted under this Licence. -5.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to the maximum -extent permitted by law, have no liability for direct, indirect, special, -incidental, consequential, exemplary, punitive or other damages of any character -including, without limitation, procurement of substitute goods or services, -loss of use, data or profits, or business interruption, however caused and -on any theory of contract, warranty, tort (including negligence), product -liability or otherwise, arising in any way in relation to the Covered Source, -modified Covered Source and/or the Making or Conveyance of a Product, even -if advised of the possibility of such damages, and You shall hold the Licensor(s) -free and harmless from any liability, costs, damages, fees and expenses, including -claims by third parties, in relation to such use. +4 Making and Conveying Products - 6 Patents +You may Make Products, and/or Convey them, provided that You ensure +that the recipient of the Product has access to any Notices applicable +to the Product. -6.1 Subject to the terms and conditions of this Licence, each Licensor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section 6, or where terminated by the -Licensor for cause) patent license to Make, have Made, use, offer to sell, -sell, import, and otherwise transfer the Covered Source and Products, where -such licence applies only to those patent claims licensable by such Licensor -that are necessarily infringed by exercising rights under the Covered Source -as Conveyed by that Licensor. -6.2 If You institute patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Covered Source or a Product -constitutes direct or contributory patent infringement, or You seek any declaration -that a patent licensed to You under this Licence is invalid or unenforceable -then any rights granted to You under this Licence shall terminate as of the -date such process is initiated. +5 DISCLAIMER AND LIABILITY - 7 General + 5.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products + are provided 'as is' and any express or implied warranties, + including, but not limited to, implied warranties of + merchantability, of satisfactory quality, non-infringement of + third party rights, and fitness for a particular purpose or use + are disclaimed in respect of any Source or Product to the + maximum extent permitted by law. The Licensor makes no + representation that any Source or Product does not or will not + infringe any patent, copyright, trade secret or other + proprietary right. The entire risk as to the use, quality, and + performance of any Source or Product shall be with You and not + the Licensor. This disclaimer of warranty is an essential part + of this Licence and a condition for the grant of any rights + granted under this Licence. -7.1 If any provisions of this Licence are or subsequently become invalid or -unenforceable for any reason, the remaining provisions shall remain effective. + 5.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to + the maximum extent permitted by law, have no liability for + direct, indirect, special, incidental, consequential, exemplary, + punitive or other damages of any character including, without + limitation, procurement of substitute goods or services, loss of + use, data or profits, or business interruption, however caused + and on any theory of contract, warranty, tort (including + negligence), product liability or otherwise, arising in any way + in relation to the Covered Source, modified Covered Source + and/or the Making or Conveyance of a Product, even if advised of + the possibility of such damages, and You shall hold the + Licensor(s) free and harmless from any liability, costs, + damages, fees and expenses, including claims by third parties, + in relation to such use. -7.2 You shall not use any of the name (including acronyms and abbreviations), -image, or logo by which the Licensor or CERN is known, except where needed -to comply with section 3, or where the use is otherwise allowed by law. Any -such permitted use shall be factual and shall not be made so as to suggest -any kind of endorsement or implication of involvement by the Licensor or its -personnel. -7.3 CERN may publish updated versions and variants of this Licence which it -considers to be in the spirit of this version, but may differ in detail to -address new problems or concerns. New versions will be published with a unique -version number and a variant identifier specifying the variant. If the Licensor -has specified that a given variant applies to the Covered Source without specifying -a version, You may treat that Covered Source as being released under any version -of the CERN-OHL with that variant. If no variant is specified, the Covered -Source shall be treated as being released under CERN-OHL-S. The Licensor may -also specify that the Covered Source is subject to a specific version of the -CERN-OHL or any later version in which case You may apply this or any later -version of CERN-OHL with the same variant identifier published by CERN. +6 Patents -7.4 This Licence shall not be enforceable except by a Licensor acting as such, -and third party beneficiary rights are specifically excluded. + 6.1 Subject to the terms and conditions of this Licence, each + Licensor hereby grants to You a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable (except as + stated in this section 6, or where terminated by the Licensor + for cause) patent license to Make, have Made, use, offer to + sell, sell, import, and otherwise transfer the Covered Source + and Products, where such licence applies only to those patent + claims licensable by such Licensor that are necessarily + infringed by exercising rights under the Covered Source as + Conveyed by that Licensor. + + 6.2 If You institute patent litigation against any entity (including + a cross-claim or counterclaim in a lawsuit) alleging that the + Covered Source or a Product constitutes direct or contributory + patent infringement, or You seek any declaration that a patent + licensed to You under this Licence is invalid or unenforceable + then any rights granted to You under this Licence shall + terminate as of the date such process is initiated. + + +7 General + + 7.1 If any provisions of this Licence are or subsequently become + invalid or unenforceable for any reason, the remaining + provisions shall remain effective. + + 7.2 You shall not use any of the name (including acronyms and + abbreviations), image, or logo by which the Licensor or CERN is + known, except where needed to comply with section 3, or where + the use is otherwise allowed by law. Any such permitted use + shall be factual and shall not be made so as to suggest any kind + of endorsement or implication of involvement by the Licensor or + its personnel. + + 7.3 CERN may publish updated versions and variants of this Licence + which it considers to be in the spirit of this version, but may + differ in detail to address new problems or concerns. New + versions will be published with a unique version number and a + variant identifier specifying the variant. If the Licensor has + specified that a given variant applies to the Covered Source + without specifying a version, You may treat that Covered Source + as being released under any version of the CERN-OHL with that + variant. If no variant is specified, the Covered Source shall be + treated as being released under CERN-OHL-S. The Licensor may + also specify that the Covered Source is subject to a specific + version of the CERN-OHL or any later version in which case You + may apply this or any later version of CERN-OHL with the same + variant identifier published by CERN. + + 7.4 This Licence shall not be enforceable except by a Licensor + acting as such, and third party beneficiary rights are + specifically excluded. diff --git a/options/license/CERN-OHL-S-2.0 b/options/license/CERN-OHL-S-2.0 index 4d2149069..114486fd9 100644 --- a/options/license/CERN-OHL-S-2.0 +++ b/options/license/CERN-OHL-S-2.0 @@ -1,240 +1,289 @@ CERN Open Hardware Licence Version 2 - Strongly Reciprocal + Preamble -CERN has developed this licence to promote collaboration among hardware designers -and to provide a legal tool which supports the freedom to use, study, modify, -share and distribute hardware designs and products based on those designs. -Version 2 of the CERN Open Hardware Licence comes in three variants: CERN-OHL-P -(permissive); and two reciprocal licences: CERN-OHL-W (weakly reciprocal) -and this licence, CERN-OHL-S (strongly reciprocal). +CERN has developed this licence to promote collaboration among +hardware designers and to provide a legal tool which supports the +freedom to use, study, modify, share and distribute hardware designs +and products based on those designs. Version 2 of the CERN Open +Hardware Licence comes in three variants: CERN-OHL-P (permissive); and +two reciprocal licences: CERN-OHL-W (weakly reciprocal) and this +licence, CERN-OHL-S (strongly reciprocal). -The CERN-OHL-S is copyright CERN 2020. Anyone is welcome to use it, in unmodified -form only. +The CERN-OHL-S is copyright CERN 2020. Anyone is welcome to use it, in +unmodified form only. -Use of this Licence does not imply any endorsement by CERN of any Licensor -or their designs nor does it imply any involvement by CERN in their development. +Use of this Licence does not imply any endorsement by CERN of any +Licensor or their designs nor does it imply any involvement by CERN in +their development. - 1 Definitions - 1.1 'Licence' means this CERN-OHL-S. +1 Definitions - 1.2 'Compatible Licence' means + 1.1 'Licence' means this CERN-OHL-S. - a) any earlier version of the CERN Open Hardware licence, or + 1.2 'Compatible Licence' means - b) any version of the CERN-OHL-S, or + a) any earlier version of the CERN Open Hardware licence, or -c) any licence which permits You to treat the Source to which it applies as -licensed under CERN-OHL-S provided that on Conveyance of any such Source, -or any associated Product You treat the Source in question as being licensed -under CERN-OHL-S. + b) any version of the CERN-OHL-S, or -1.3 'Source' means information such as design materials or digital code which -can be applied to Make or test a Product or to prepare a Product for use, -Conveyance or sale, regardless of its medium or how it is expressed. It may -include Notices. + c) any licence which permits You to treat the Source to which + it applies as licensed under CERN-OHL-S provided that on + Conveyance of any such Source, or any associated Product You + treat the Source in question as being licensed under + CERN-OHL-S. -1.4 'Covered Source' means Source that is explicitly made available under -this Licence. + 1.3 'Source' means information such as design materials or digital + code which can be applied to Make or test a Product or to + prepare a Product for use, Conveyance or sale, regardless of its + medium or how it is expressed. It may include Notices. -1.5 'Product' means any device, component, work or physical object, whether -in finished or intermediate form, arising from the use, application or processing -of Covered Source. + 1.4 'Covered Source' means Source that is explicitly made available + under this Licence. -1.6 'Make' means to create or configure something, whether by manufacture, -assembly, compiling, loading or applying Covered Source or another Product -or otherwise. + 1.5 'Product' means any device, component, work or physical object, + whether in finished or intermediate form, arising from the use, + application or processing of Covered Source. -1.7 'Available Component' means any part, sub-assembly, library or code which: + 1.6 'Make' means to create or configure something, whether by + manufacture, assembly, compiling, loading or applying Covered + Source or another Product or otherwise. -a) is licensed to You as Complete Source under a Compatible Licence; or + 1.7 'Available Component' means any part, sub-assembly, library or + code which: -b) is available, at the time a Product or the Source containing it is first -Conveyed, to You and any other prospective licensees + a) is licensed to You as Complete Source under a Compatible + Licence; or -i) as a physical part with sufficient rights and information (including any -configuration and programming files and information about its characteristics -and interfaces) to enable it either to be Made itself, or to be sourced and -used to Make the Product; or + b) is available, at the time a Product or the Source containing + it is first Conveyed, to You and any other prospective + licensees -ii) as part of the normal distribution of a tool used to design or Make the -Product. + i) as a physical part with sufficient rights and + information (including any configuration and + programming files and information about its + characteristics and interfaces) to enable it either to + be Made itself, or to be sourced and used to Make the + Product; or + ii) as part of the normal distribution of a tool used to + design or Make the Product. -1.8 'Complete Source' means the set of all Source necessary to Make a Product, -in the preferred form for making modifications, including necessary installation -and interfacing information both for the Product, and for any included Available -Components. If the format is proprietary, it must also be made available in -a format (if the proprietary tool can create it) which is viewable with a -tool available to potential licensees and licensed under a licence approved -by the Free Software Foundation or the Open Source Initiative. Complete Source -need not include the Source of any Available Component, provided that You -include in the Complete Source sufficient information to enable a recipient -to Make or source and use the Available Component to Make the Product. + 1.8 'Complete Source' means the set of all Source necessary to Make + a Product, in the preferred form for making modifications, + including necessary installation and interfacing information + both for the Product, and for any included Available Components. + If the format is proprietary, it must also be made available in + a format (if the proprietary tool can create it) which is + viewable with a tool available to potential licensees and + licensed under a licence approved by the Free Software + Foundation or the Open Source Initiative. Complete Source need + not include the Source of any Available Component, provided that + You include in the Complete Source sufficient information to + enable a recipient to Make or source and use the Available + Component to Make the Product. -1.9 'Source Location' means a location where a Licensor has placed Covered -Source, and which that Licensor reasonably believes will remain easily accessible -for at least three years for anyone to obtain a digital copy. + 1.9 'Source Location' means a location where a Licensor has placed + Covered Source, and which that Licensor reasonably believes will + remain easily accessible for at least three years for anyone to + obtain a digital copy. -1.10 'Notice' means copyright, acknowledgement and trademark notices, Source -Location references, modification notices (subsection 3.3(b)) and all notices -that refer to this Licence and to the disclaimer of warranties that are included -in the Covered Source. + 1.10 'Notice' means copyright, acknowledgement and trademark notices, + Source Location references, modification notices (subsection + 3.3(b)) and all notices that refer to this Licence and to the + disclaimer of warranties that are included in the Covered + Source. -1.11 'Licensee' or 'You' means any person exercising rights under this Licence. + 1.11 'Licensee' or 'You' means any person exercising rights under + this Licence. -1.12 'Licensor' means a natural or legal person who creates or modifies Covered -Source. A person may be a Licensee and a Licensor at the same time. + 1.12 'Licensor' means a natural or legal person who creates or + modifies Covered Source. A person may be a Licensee and a + Licensor at the same time. - 1.13 'Convey' means to communicate to the public or distribute. + 1.13 'Convey' means to communicate to the public or distribute. - 2 Applicability -2.1 This Licence governs the use, copying, modification, Conveying of Covered -Source and Products, and the Making of Products. By exercising any right granted -under this Licence, You irrevocably accept these terms and conditions. +2 Applicability -2.2 This Licence is granted by the Licensor directly to You, and shall apply -worldwide and without limitation in time. + 2.1 This Licence governs the use, copying, modification, Conveying + of Covered Source and Products, and the Making of Products. By + exercising any right granted under this Licence, You irrevocably + accept these terms and conditions. -2.3 You shall not attempt to restrict by contract or otherwise the rights -granted under this Licence to other Licensees. + 2.2 This Licence is granted by the Licensor directly to You, and + shall apply worldwide and without limitation in time. -2.4 This Licence is not intended to restrict fair use, fair dealing, or any -other similar right. + 2.3 You shall not attempt to restrict by contract or otherwise the + rights granted under this Licence to other Licensees. - 3 Copying, modifying and Conveying Covered Source + 2.4 This Licence is not intended to restrict fair use, fair dealing, + or any other similar right. -3.1 You may copy and Convey verbatim copies of Covered Source, in any medium, -provided You retain all Notices. -3.2 You may modify Covered Source, other than Notices, provided that You irrevocably -undertake to make that modified Covered Source available from a Source Location -should You Convey a Product in circumstances where the recipient does not -otherwise receive a copy of the modified Covered Source. In each case subsection -3.3 shall apply. +3 Copying, modifying and Conveying Covered Source -You may only delete Notices if they are no longer applicable to the corresponding -Covered Source as modified by You and You may add additional Notices applicable -to Your modifications. Including Covered Source in a larger work is modifying -the Covered Source, and the larger work becomes modified Covered Source. + 3.1 You may copy and Convey verbatim copies of Covered Source, in + any medium, provided You retain all Notices. -3.3 You may Convey modified Covered Source (with the effect that You shall -also become a Licensor) provided that You: + 3.2 You may modify Covered Source, other than Notices, provided that + You irrevocably undertake to make that modified Covered Source + available from a Source Location should You Convey a Product in + circumstances where the recipient does not otherwise receive a + copy of the modified Covered Source. In each case subsection 3.3 + shall apply. - a) retain Notices as required in subsection 3.2; + You may only delete Notices if they are no longer applicable to + the corresponding Covered Source as modified by You and You may + add additional Notices applicable to Your modifications. + Including Covered Source in a larger work is modifying the + Covered Source, and the larger work becomes modified Covered + Source. -b) add a Notice to the modified Covered Source stating that You have modified -it, with the date and brief description of how You have modified it; + 3.3 You may Convey modified Covered Source (with the effect that You + shall also become a Licensor) provided that You: -c) add a Source Location Notice for the modified Covered Source if You Convey -in circumstances where the recipient does not otherwise receive a copy of -the modified Covered Source; and + a) retain Notices as required in subsection 3.2; -d) license the modified Covered Source under the terms and conditions of this -Licence (or, as set out in subsection 8.3, a later version, if permitted by -the licence of the original Covered Source). Such modified Covered Source -must be licensed as a whole, but excluding Available Components contained -in it, which remain licensed under their own applicable licences. + b) add a Notice to the modified Covered Source stating that You + have modified it, with the date and brief description of how + You have modified it; - 4 Making and Conveying Products + c) add a Source Location Notice for the modified Covered Source + if You Convey in circumstances where the recipient does not + otherwise receive a copy of the modified Covered Source; and -You may Make Products, and/or Convey them, provided that You either provide -each recipient with a copy of the Complete Source or ensure that each recipient -is notified of the Source Location of the Complete Source. That Complete Source -is Covered Source, and You must accordingly satisfy Your obligations set out -in subsection 3.3. If specified in a Notice, the Product must visibly and -securely display the Source Location on it or its packaging or documentation -in the manner specified in that Notice. + d) license the modified Covered Source under the terms and + conditions of this Licence (or, as set out in subsection + 8.3, a later version, if permitted by the licence of the + original Covered Source). Such modified Covered Source must + be licensed as a whole, but excluding Available Components + contained in it, which remain licensed under their own + applicable licences. - 5 Research and Development -You may Convey Covered Source, modified Covered Source or Products to a legal -entity carrying out development, testing or quality assurance work on Your -behalf provided that the work is performed on terms which prevent the entity -from both using the Source or Products for its own internal purposes and Conveying -the Source or Products or any modifications to them to any person other than -You. Any modifications made by the entity shall be deemed to be made by You -pursuant to subsection 3.2. +4 Making and Conveying Products - 6 DISCLAIMER AND LIABILITY +You may Make Products, and/or Convey them, provided that You either +provide each recipient with a copy of the Complete Source or ensure +that each recipient is notified of the Source Location of the Complete +Source. That Complete Source is Covered Source, and You must +accordingly satisfy Your obligations set out in subsection 3.3. If +specified in a Notice, the Product must visibly and securely display +the Source Location on it or its packaging or documentation in the +manner specified in that Notice. -6.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products are provided -'as is' and any express or implied warranties, including, but not limited -to, implied warranties of merchantability, of satisfactory quality, non-infringement -of third party rights, and fitness for a particular purpose or use are disclaimed -in respect of any Source or Product to the maximum extent permitted by law. -The Licensor makes no representation that any Source or Product does not or -will not infringe any patent, copyright, trade secret or other proprietary -right. The entire risk as to the use, quality, and performance of any Source -or Product shall be with You and not the Licensor. This disclaimer of warranty -is an essential part of this Licence and a condition for the grant of any -rights granted under this Licence. -6.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to the maximum -extent permitted by law, have no liability for direct, indirect, special, -incidental, consequential, exemplary, punitive or other damages of any character -including, without limitation, procurement of substitute goods or services, -loss of use, data or profits, or business interruption, however caused and -on any theory of contract, warranty, tort (including negligence), product -liability or otherwise, arising in any way in relation to the Covered Source, -modified Covered Source and/or the Making or Conveyance of a Product, even -if advised of the possibility of such damages, and You shall hold the Licensor(s) -free and harmless from any liability, costs, damages, fees and expenses, including -claims by third parties, in relation to such use. +5 Research and Development - 7 Patents +You may Convey Covered Source, modified Covered Source or Products to +a legal entity carrying out development, testing or quality assurance +work on Your behalf provided that the work is performed on terms which +prevent the entity from both using the Source or Products for its own +internal purposes and Conveying the Source or Products or any +modifications to them to any person other than You. Any modifications +made by the entity shall be deemed to be made by You pursuant to +subsection 3.2. -7.1 Subject to the terms and conditions of this Licence, each Licensor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in subsections 7.2 and 8.4) patent license to -Make, have Made, use, offer to sell, sell, import, and otherwise transfer -the Covered Source and Products, where such licence applies only to those -patent claims licensable by such Licensor that are necessarily infringed by -exercising rights under the Covered Source as Conveyed by that Licensor. -7.2 If You institute patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Covered Source or a Product -constitutes direct or contributory patent infringement, or You seek any declaration -that a patent licensed to You under this Licence is invalid or unenforceable -then any rights granted to You under this Licence shall terminate as of the -date such process is initiated. +6 DISCLAIMER AND LIABILITY - 8 General + 6.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products + are provided 'as is' and any express or implied warranties, + including, but not limited to, implied warranties of + merchantability, of satisfactory quality, non-infringement of + third party rights, and fitness for a particular purpose or use + are disclaimed in respect of any Source or Product to the + maximum extent permitted by law. The Licensor makes no + representation that any Source or Product does not or will not + infringe any patent, copyright, trade secret or other + proprietary right. The entire risk as to the use, quality, and + performance of any Source or Product shall be with You and not + the Licensor. This disclaimer of warranty is an essential part + of this Licence and a condition for the grant of any rights + granted under this Licence. -8.1 If any provisions of this Licence are or subsequently become invalid or -unenforceable for any reason, the remaining provisions shall remain effective. + 6.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to + the maximum extent permitted by law, have no liability for + direct, indirect, special, incidental, consequential, exemplary, + punitive or other damages of any character including, without + limitation, procurement of substitute goods or services, loss of + use, data or profits, or business interruption, however caused + and on any theory of contract, warranty, tort (including + negligence), product liability or otherwise, arising in any way + in relation to the Covered Source, modified Covered Source + and/or the Making or Conveyance of a Product, even if advised of + the possibility of such damages, and You shall hold the + Licensor(s) free and harmless from any liability, costs, + damages, fees and expenses, including claims by third parties, + in relation to such use. -8.2 You shall not use any of the name (including acronyms and abbreviations), -image, or logo by which the Licensor or CERN is known, except where needed -to comply with section 3, or where the use is otherwise allowed by law. Any -such permitted use shall be factual and shall not be made so as to suggest -any kind of endorsement or implication of involvement by the Licensor or its -personnel. -8.3 CERN may publish updated versions and variants of this Licence which it -considers to be in the spirit of this version, but may differ in detail to -address new problems or concerns. New versions will be published with a unique -version number and a variant identifier specifying the variant. If the Licensor -has specified that a given variant applies to the Covered Source without specifying -a version, You may treat that Covered Source as being released under any version -of the CERN-OHL with that variant. If no variant is specified, the Covered -Source shall be treated as being released under CERN-OHL-S. The Licensor may -also specify that the Covered Source is subject to a specific version of the -CERN-OHL or any later version in which case You may apply this or any later -version of CERN-OHL with the same variant identifier published by CERN. +7 Patents -8.4 This Licence shall terminate with immediate effect if You fail to comply -with any of its terms and conditions. + 7.1 Subject to the terms and conditions of this Licence, each + Licensor hereby grants to You a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable (except as + stated in subsections 7.2 and 8.4) patent license to Make, have + Made, use, offer to sell, sell, import, and otherwise transfer + the Covered Source and Products, where such licence applies only + to those patent claims licensable by such Licensor that are + necessarily infringed by exercising rights under the Covered + Source as Conveyed by that Licensor. -8.5 However, if You cease all breaches of this Licence, then Your Licence -from any Licensor is reinstated unless such Licensor has terminated this Licence -by giving You, while You remain in breach, a notice specifying the breach -and requiring You to cure it within 30 days, and You have failed to come into -compliance in all material respects by the end of the 30 day period. Should -You repeat the breach after receipt of a cure notice and subsequent reinstatement, -this Licence will terminate immediately and permanently. Section 6 shall continue -to apply after any termination. + 7.2 If You institute patent litigation against any entity (including + a cross-claim or counterclaim in a lawsuit) alleging that the + Covered Source or a Product constitutes direct or contributory + patent infringement, or You seek any declaration that a patent + licensed to You under this Licence is invalid or unenforceable + then any rights granted to You under this Licence shall + terminate as of the date such process is initiated. -8.6 This Licence shall not be enforceable except by a Licensor acting as such, -and third party beneficiary rights are specifically excluded. + +8 General + + 8.1 If any provisions of this Licence are or subsequently become + invalid or unenforceable for any reason, the remaining + provisions shall remain effective. + + 8.2 You shall not use any of the name (including acronyms and + abbreviations), image, or logo by which the Licensor or CERN is + known, except where needed to comply with section 3, or where + the use is otherwise allowed by law. Any such permitted use + shall be factual and shall not be made so as to suggest any kind + of endorsement or implication of involvement by the Licensor or + its personnel. + + 8.3 CERN may publish updated versions and variants of this Licence + which it considers to be in the spirit of this version, but may + differ in detail to address new problems or concerns. New + versions will be published with a unique version number and a + variant identifier specifying the variant. If the Licensor has + specified that a given variant applies to the Covered Source + without specifying a version, You may treat that Covered Source + as being released under any version of the CERN-OHL with that + variant. If no variant is specified, the Covered Source shall be + treated as being released under CERN-OHL-S. The Licensor may + also specify that the Covered Source is subject to a specific + version of the CERN-OHL or any later version in which case You + may apply this or any later version of CERN-OHL with the same + variant identifier published by CERN. + + 8.4 This Licence shall terminate with immediate effect if You fail + to comply with any of its terms and conditions. + + 8.5 However, if You cease all breaches of this Licence, then Your + Licence from any Licensor is reinstated unless such Licensor has + terminated this Licence by giving You, while You remain in + breach, a notice specifying the breach and requiring You to cure + it within 30 days, and You have failed to come into compliance + in all material respects by the end of the 30 day period. Should + You repeat the breach after receipt of a cure notice and + subsequent reinstatement, this Licence will terminate + immediately and permanently. Section 6 shall continue to apply + after any termination. + + 8.6 This Licence shall not be enforceable except by a Licensor + acting as such, and third party beneficiary rights are + specifically excluded. diff --git a/options/license/CERN-OHL-W-2.0 b/options/license/CERN-OHL-W-2.0 index 8563cd280..0f882860a 100644 --- a/options/license/CERN-OHL-W-2.0 +++ b/options/license/CERN-OHL-W-2.0 @@ -2,260 +2,309 @@ CERN Open Hardware Licence Version 2 - Weakly Reciprocal Preamble -CERN has developed this licence to promote collaboration among hardware designers -and to provide a legal tool which supports the freedom to use, study, modify, -share and distribute hardware designs and products based on those designs. -Version 2 of the CERN Open Hardware Licence comes in three variants: CERN-OHL-P -(permissive); and two reciprocal licences: this licence, CERN- OHL-W (weakly -reciprocal) and CERN-OHL-S (strongly reciprocal). +CERN has developed this licence to promote collaboration among +hardware designers and to provide a legal tool which supports the +freedom to use, study, modify, share and distribute hardware designs +and products based on those designs. Version 2 of the CERN Open +Hardware Licence comes in three variants: CERN-OHL-P (permissive); and +two reciprocal licences: this licence, CERN- OHL-W (weakly reciprocal) +and CERN-OHL-S (strongly reciprocal). -The CERN-OHL-W is copyright CERN 2020. Anyone is welcome to use it, in unmodified -form only. +The CERN-OHL-W is copyright CERN 2020. Anyone is welcome to use it, in +unmodified form only. -Use of this Licence does not imply any endorsement by CERN of any Licensor -or their designs nor does it imply any involvement by CERN in their development. +Use of this Licence does not imply any endorsement by CERN of any +Licensor or their designs nor does it imply any involvement by CERN in +their development. - 1 Definitions - 1.1 'Licence' means this CERN-OHL-W. +1 Definitions - 1.2 'Compatible Licence' means + 1.1 'Licence' means this CERN-OHL-W. - a) any earlier version of the CERN Open Hardware licence, or + 1.2 'Compatible Licence' means - b) any version of the CERN-OHL-S or the CERN-OHL-W, or + a) any earlier version of the CERN Open Hardware licence, or -c) any licence which permits You to treat the Source to which it applies as -licensed under CERN-OHL-S or CERN-OHL-W provided that on Conveyance of any -such Source, or any associated Product You treat the Source in question as -being licensed under CERN-OHL-S or CERN-OHL-W as appropriate. + b) any version of the CERN-OHL-S or the CERN-OHL-W, or -1.3 'Source' means information such as design materials or digital code which -can be applied to Make or test a Product or to prepare a Product for use, -Conveyance or sale, regardless of its medium or how it is expressed. It may -include Notices. + c) any licence which permits You to treat the Source to which + it applies as licensed under CERN-OHL-S or CERN-OHL-W + provided that on Conveyance of any such Source, or any + associated Product You treat the Source in question as being + licensed under CERN-OHL-S or CERN-OHL-W as appropriate. -1.4 'Covered Source' means Source that is explicitly made available under -this Licence. + 1.3 'Source' means information such as design materials or digital + code which can be applied to Make or test a Product or to + prepare a Product for use, Conveyance or sale, regardless of its + medium or how it is expressed. It may include Notices. -1.5 'Product' means any device, component, work or physical object, whether -in finished or intermediate form, arising from the use, application or processing -of Covered Source. + 1.4 'Covered Source' means Source that is explicitly made available + under this Licence. -1.6 'Make' means to create or configure something, whether by manufacture, -assembly, compiling, loading or applying Covered Source or another Product -or otherwise. + 1.5 'Product' means any device, component, work or physical object, + whether in finished or intermediate form, arising from the use, + application or processing of Covered Source. -1.7 'Available Component' means any part, sub-assembly, library or code which: + 1.6 'Make' means to create or configure something, whether by + manufacture, assembly, compiling, loading or applying Covered + Source or another Product or otherwise. -a) is licensed to You as Complete Source under a Compatible Licence; or + 1.7 'Available Component' means any part, sub-assembly, library or + code which: -b) is available, at the time a Product or the Source containing it is first -Conveyed, to You and any other prospective licensees + a) is licensed to You as Complete Source under a Compatible + Licence; or -i) with sufficient rights and information (including any configuration and -programming files and information about its characteristics and interfaces) -to enable it either to be Made itself, or to be sourced and used to Make the -Product; or + b) is available, at the time a Product or the Source containing + it is first Conveyed, to You and any other prospective + licensees -ii) as part of the normal distribution of a tool used to design or Make the -Product. + i) with sufficient rights and information (including any + configuration and programming files and information + about its characteristics and interfaces) to enable it + either to be Made itself, or to be sourced and used to + Make the Product; or + ii) as part of the normal distribution of a tool used to + design or Make the Product. - 1.8 'External Material' means anything (including Source) which: + 1.8 'External Material' means anything (including Source) which: -a) is only combined with Covered Source in such a way that it interfaces with -the Covered Source using a documented interface which is described in the -Covered Source; and + a) is only combined with Covered Source in such a way that it + interfaces with the Covered Source using a documented + interface which is described in the Covered Source; and -b) is not a derivative of or contains Covered Source, or, if it is, it is -solely to the extent necessary to facilitate such interfacing. + b) is not a derivative of or contains Covered Source, or, if it + is, it is solely to the extent necessary to facilitate such + interfacing. -1.9 'Complete Source' means the set of all Source necessary to Make a Product, -in the preferred form for making modifications, including necessary installation -and interfacing information both for the Product, and for any included Available -Components. If the format is proprietary, it must also be made available in -a format (if the proprietary tool can create it) which is viewable with a -tool available to potential licensees and licensed under a licence approved -by the Free Software Foundation or the Open Source Initiative. Complete Source -need not include the Source of any Available Component, provided that You -include in the Complete Source sufficient information to enable a recipient -to Make or source and use the Available Component to Make the Product. + 1.9 'Complete Source' means the set of all Source necessary to Make + a Product, in the preferred form for making modifications, + including necessary installation and interfacing information + both for the Product, and for any included Available Components. + If the format is proprietary, it must also be made available in + a format (if the proprietary tool can create it) which is + viewable with a tool available to potential licensees and + licensed under a licence approved by the Free Software + Foundation or the Open Source Initiative. Complete Source need + not include the Source of any Available Component, provided that + You include in the Complete Source sufficient information to + enable a recipient to Make or source and use the Available + Component to Make the Product. -1.10 'Source Location' means a location where a Licensor has placed Covered -Source, and which that Licensor reasonably believes will remain easily accessible -for at least three years for anyone to obtain a digital copy. + 1.10 'Source Location' means a location where a Licensor has placed + Covered Source, and which that Licensor reasonably believes will + remain easily accessible for at least three years for anyone to + obtain a digital copy. -1.11 'Notice' means copyright, acknowledgement and trademark notices, Source -Location references, modification notices (subsection 3.3(b)) and all notices -that refer to this Licence and to the disclaimer of warranties that are included -in the Covered Source. + 1.11 'Notice' means copyright, acknowledgement and trademark notices, + Source Location references, modification notices (subsection + 3.3(b)) and all notices that refer to this Licence and to the + disclaimer of warranties that are included in the Covered + Source. -1.12 'Licensee' or 'You' means any person exercising rights under this Licence. + 1.12 'Licensee' or 'You' means any person exercising rights under + this Licence. -1.13 'Licensor' means a natural or legal person who creates or modifies Covered -Source. A person may be a Licensee and a Licensor at the same time. + 1.13 'Licensor' means a natural or legal person who creates or + modifies Covered Source. A person may be a Licensee and a + Licensor at the same time. - 1.14 'Convey' means to communicate to the public or distribute. + 1.14 'Convey' means to communicate to the public or distribute. - 2 Applicability -2.1 This Licence governs the use, copying, modification, Conveying of Covered -Source and Products, and the Making of Products. By exercising any right granted -under this Licence, You irrevocably accept these terms and conditions. +2 Applicability -2.2 This Licence is granted by the Licensor directly to You, and shall apply -worldwide and without limitation in time. + 2.1 This Licence governs the use, copying, modification, Conveying + of Covered Source and Products, and the Making of Products. By + exercising any right granted under this Licence, You irrevocably + accept these terms and conditions. -2.3 You shall not attempt to restrict by contract or otherwise the rights -granted under this Licence to other Licensees. + 2.2 This Licence is granted by the Licensor directly to You, and + shall apply worldwide and without limitation in time. -2.4 This Licence is not intended to restrict fair use, fair dealing, or any -other similar right. + 2.3 You shall not attempt to restrict by contract or otherwise the + rights granted under this Licence to other Licensees. - 3 Copying, modifying and Conveying Covered Source + 2.4 This Licence is not intended to restrict fair use, fair dealing, + or any other similar right. -3.1 You may copy and Convey verbatim copies of Covered Source, in any medium, -provided You retain all Notices. -3.2 You may modify Covered Source, other than Notices, provided that You irrevocably -undertake to make that modified Covered Source available from a Source Location -should You Convey a Product in circumstances where the recipient does not -otherwise receive a copy of the modified Covered Source. In each case subsection -3.3 shall apply. +3 Copying, modifying and Conveying Covered Source -You may only delete Notices if they are no longer applicable to the corresponding -Covered Source as modified by You and You may add additional Notices applicable -to Your modifications. + 3.1 You may copy and Convey verbatim copies of Covered Source, in + any medium, provided You retain all Notices. -3.3 You may Convey modified Covered Source (with the effect that You shall -also become a Licensor) provided that You: + 3.2 You may modify Covered Source, other than Notices, provided that + You irrevocably undertake to make that modified Covered Source + available from a Source Location should You Convey a Product in + circumstances where the recipient does not otherwise receive a + copy of the modified Covered Source. In each case subsection 3.3 + shall apply. - a) retain Notices as required in subsection 3.2; + You may only delete Notices if they are no longer applicable to + the corresponding Covered Source as modified by You and You may + add additional Notices applicable to Your modifications. -b) add a Notice to the modified Covered Source stating that You have modified -it, with the date and brief description of how You have modified it; + 3.3 You may Convey modified Covered Source (with the effect that You + shall also become a Licensor) provided that You: -c) add a Source Location Notice for the modified Covered Source if You Convey -in circumstances where the recipient does not otherwise receive a copy of -the modified Covered Source; and + a) retain Notices as required in subsection 3.2; -d) license the modified Covered Source under the terms and conditions of this -Licence (or, as set out in subsection 8.3, a later version, if permitted by -the licence of the original Covered Source). Such modified Covered Source -must be licensed as a whole, but excluding Available Components contained -in it or External Material to which it is interfaced, which remain licensed -under their own applicable licences. + b) add a Notice to the modified Covered Source stating that You + have modified it, with the date and brief description of how + You have modified it; - 4 Making and Conveying Products + c) add a Source Location Notice for the modified Covered Source + if You Convey in circumstances where the recipient does not + otherwise receive a copy of the modified Covered Source; and -4.1 You may Make Products, and/or Convey them, provided that You either provide -each recipient with a copy of the Complete Source or ensure that each recipient -is notified of the Source Location of the Complete Source. That Complete Source -includes Covered Source and You must accordingly satisfy Your obligations -set out in subsection 3.3. If specified in a Notice, the Product must visibly -and securely display the Source Location on it or its packaging or documentation -in the manner specified in that Notice. + d) license the modified Covered Source under the terms and + conditions of this Licence (or, as set out in subsection + 8.3, a later version, if permitted by the licence of the + original Covered Source). Such modified Covered Source must + be licensed as a whole, but excluding Available Components + contained in it or External Material to which it is + interfaced, which remain licensed under their own applicable + licences. -4.2 Where You Convey a Product which incorporates External Material, the Complete -Source for that Product which You are required to provide under subsection -4.1 need not include any Source for the External Material. -4.3 You may license Products under terms of Your choice, provided that such -terms do not restrict or attempt to restrict any recipients' rights under -this Licence to the Covered Source. +4 Making and Conveying Products - 5 Research and Development + 4.1 You may Make Products, and/or Convey them, provided that You + either provide each recipient with a copy of the Complete Source + or ensure that each recipient is notified of the Source Location + of the Complete Source. That Complete Source includes Covered + Source and You must accordingly satisfy Your obligations set out + in subsection 3.3. If specified in a Notice, the Product must + visibly and securely display the Source Location on it or its + packaging or documentation in the manner specified in that + Notice. -You may Convey Covered Source, modified Covered Source or Products to a legal -entity carrying out development, testing or quality assurance work on Your -behalf provided that the work is performed on terms which prevent the entity -from both using the Source or Products for its own internal purposes and Conveying -the Source or Products or any modifications to them to any person other than -You. Any modifications made by the entity shall be deemed to be made by You -pursuant to subsection 3.2. + 4.2 Where You Convey a Product which incorporates External Material, + the Complete Source for that Product which You are required to + provide under subsection 4.1 need not include any Source for the + External Material. - 6 DISCLAIMER AND LIABILITY + 4.3 You may license Products under terms of Your choice, provided + that such terms do not restrict or attempt to restrict any + recipients' rights under this Licence to the Covered Source. -6.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products are provided -'as is' and any express or implied warranties, including, but not limited -to, implied warranties of merchantability, of satisfactory quality, non-infringement -of third party rights, and fitness for a particular purpose or use are disclaimed -in respect of any Source or Product to the maximum extent permitted by law. -The Licensor makes no representation that any Source or Product does not or -will not infringe any patent, copyright, trade secret or other proprietary -right. The entire risk as to the use, quality, and performance of any Source -or Product shall be with You and not the Licensor. This disclaimer of warranty -is an essential part of this Licence and a condition for the grant of any -rights granted under this Licence. -6.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to the maximum -extent permitted by law, have no liability for direct, indirect, special, -incidental, consequential, exemplary, punitive or other damages of any character -including, without limitation, procurement of substitute goods or services, -loss of use, data or profits, or business interruption, however caused and -on any theory of contract, warranty, tort (including negligence), product -liability or otherwise, arising in any way in relation to the Covered Source, -modified Covered Source and/or the Making or Conveyance of a Product, even -if advised of the possibility of such damages, and You shall hold the Licensor(s) -free and harmless from any liability, costs, damages, fees and expenses, including -claims by third parties, in relation to such use. +5 Research and Development - 7 Patents +You may Convey Covered Source, modified Covered Source or Products to +a legal entity carrying out development, testing or quality assurance +work on Your behalf provided that the work is performed on terms which +prevent the entity from both using the Source or Products for its own +internal purposes and Conveying the Source or Products or any +modifications to them to any person other than You. Any modifications +made by the entity shall be deemed to be made by You pursuant to +subsection 3.2. -7.1 Subject to the terms and conditions of this Licence, each Licensor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in subsections 7.2 and 8.4) patent license to -Make, have Made, use, offer to sell, sell, import, and otherwise transfer -the Covered Source and Products, where such licence applies only to those -patent claims licensable by such Licensor that are necessarily infringed by -exercising rights under the Covered Source as Conveyed by that Licensor. -7.2 If You institute patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Covered Source or a Product -constitutes direct or contributory patent infringement, or You seek any declaration -that a patent licensed to You under this Licence is invalid or unenforceable -then any rights granted to You under this Licence shall terminate as of the -date such process is initiated. +6 DISCLAIMER AND LIABILITY - 8 General + 6.1 DISCLAIMER OF WARRANTY -- The Covered Source and any Products + are provided 'as is' and any express or implied warranties, + including, but not limited to, implied warranties of + merchantability, of satisfactory quality, non-infringement of + third party rights, and fitness for a particular purpose or use + are disclaimed in respect of any Source or Product to the + maximum extent permitted by law. The Licensor makes no + representation that any Source or Product does not or will not + infringe any patent, copyright, trade secret or other + proprietary right. The entire risk as to the use, quality, and + performance of any Source or Product shall be with You and not + the Licensor. This disclaimer of warranty is an essential part + of this Licence and a condition for the grant of any rights + granted under this Licence. -8.1 If any provisions of this Licence are or subsequently become invalid or -unenforceable for any reason, the remaining provisions shall remain effective. + 6.2 EXCLUSION AND LIMITATION OF LIABILITY -- The Licensor shall, to + the maximum extent permitted by law, have no liability for + direct, indirect, special, incidental, consequential, exemplary, + punitive or other damages of any character including, without + limitation, procurement of substitute goods or services, loss of + use, data or profits, or business interruption, however caused + and on any theory of contract, warranty, tort (including + negligence), product liability or otherwise, arising in any way + in relation to the Covered Source, modified Covered Source + and/or the Making or Conveyance of a Product, even if advised of + the possibility of such damages, and You shall hold the + Licensor(s) free and harmless from any liability, costs, + damages, fees and expenses, including claims by third parties, + in relation to such use. -8.2 You shall not use any of the name (including acronyms and abbreviations), -image, or logo by which the Licensor or CERN is known, except where needed -to comply with section 3, or where the use is otherwise allowed by law. Any -such permitted use shall be factual and shall not be made so as to suggest -any kind of endorsement or implication of involvement by the Licensor or its -personnel. -8.3 CERN may publish updated versions and variants of this Licence which it -considers to be in the spirit of this version, but may differ in detail to -address new problems or concerns. New versions will be published with a unique -version number and a variant identifier specifying the variant. If the Licensor -has specified that a given variant applies to the Covered Source without specifying -a version, You may treat that Covered Source as being released under any version -of the CERN-OHL with that variant. If no variant is specified, the Covered -Source shall be treated as being released under CERN-OHL-S. The Licensor may -also specify that the Covered Source is subject to a specific version of the -CERN-OHL or any later version in which case You may apply this or any later -version of CERN-OHL with the same variant identifier published by CERN. +7 Patents -You may treat Covered Source licensed under CERN-OHL-W as licensed under CERN-OHL-S -if and only if all Available Components referenced in the Covered Source comply -with the corresponding definition of Available Component for CERN-OHL-S. + 7.1 Subject to the terms and conditions of this Licence, each + Licensor hereby grants to You a perpetual, worldwide, + non-exclusive, no-charge, royalty-free, irrevocable (except as + stated in subsections 7.2 and 8.4) patent license to Make, have + Made, use, offer to sell, sell, import, and otherwise transfer + the Covered Source and Products, where such licence applies only + to those patent claims licensable by such Licensor that are + necessarily infringed by exercising rights under the Covered + Source as Conveyed by that Licensor. -8.4 This Licence shall terminate with immediate effect if You fail to comply -with any of its terms and conditions. + 7.2 If You institute patent litigation against any entity (including + a cross-claim or counterclaim in a lawsuit) alleging that the + Covered Source or a Product constitutes direct or contributory + patent infringement, or You seek any declaration that a patent + licensed to You under this Licence is invalid or unenforceable + then any rights granted to You under this Licence shall + terminate as of the date such process is initiated. -8.5 However, if You cease all breaches of this Licence, then Your Licence -from any Licensor is reinstated unless such Licensor has terminated this Licence -by giving You, while You remain in breach, a notice specifying the breach -and requiring You to cure it within 30 days, and You have failed to come into -compliance in all material respects by the end of the 30 day period. Should -You repeat the breach after receipt of a cure notice and subsequent reinstatement, -this Licence will terminate immediately and permanently. Section 6 shall continue -to apply after any termination. -8.6 This Licence shall not be enforceable except by a Licensor acting as such, -and third party beneficiary rights are specifically excluded. +8 General + + 8.1 If any provisions of this Licence are or subsequently become + invalid or unenforceable for any reason, the remaining + provisions shall remain effective. + + 8.2 You shall not use any of the name (including acronyms and + abbreviations), image, or logo by which the Licensor or CERN is + known, except where needed to comply with section 3, or where + the use is otherwise allowed by law. Any such permitted use + shall be factual and shall not be made so as to suggest any kind + of endorsement or implication of involvement by the Licensor or + its personnel. + + 8.3 CERN may publish updated versions and variants of this Licence + which it considers to be in the spirit of this version, but may + differ in detail to address new problems or concerns. New + versions will be published with a unique version number and a + variant identifier specifying the variant. If the Licensor has + specified that a given variant applies to the Covered Source + without specifying a version, You may treat that Covered Source + as being released under any version of the CERN-OHL with that + variant. If no variant is specified, the Covered Source shall be + treated as being released under CERN-OHL-S. The Licensor may + also specify that the Covered Source is subject to a specific + version of the CERN-OHL or any later version in which case You + may apply this or any later version of CERN-OHL with the same + variant identifier published by CERN. + + You may treat Covered Source licensed under CERN-OHL-W as + licensed under CERN-OHL-S if and only if all Available + Components referenced in the Covered Source comply with the + corresponding definition of Available Component for CERN-OHL-S. + + 8.4 This Licence shall terminate with immediate effect if You fail + to comply with any of its terms and conditions. + + 8.5 However, if You cease all breaches of this Licence, then Your + Licence from any Licensor is reinstated unless such Licensor has + terminated this Licence by giving You, while You remain in + breach, a notice specifying the breach and requiring You to cure + it within 30 days, and You have failed to come into compliance + in all material respects by the end of the 30 day period. Should + You repeat the breach after receipt of a cure notice and + subsequent reinstatement, this Licence will terminate + immediately and permanently. Section 6 shall continue to apply + after any termination. + + 8.6 This Licence shall not be enforceable except by a Licensor + acting as such, and third party beneficiary rights are + specifically excluded. diff --git a/options/license/CNRI-Jython b/options/license/CNRI-Jython index d1c661720..0bfec82d0 100644 --- a/options/license/CNRI-Jython +++ b/options/license/CNRI-Jython @@ -1,66 +1,12 @@ +1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and using JPython version 1.1.x in source or binary form and its associated documentation as provided herein ("Software"). -1. This LICENSE AGREEMENT is between the Corporation for National Research -Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 -("CNRI"), and the Individual or Organization ("Licensee") accessing and using -JPython version 1.1.x in source or binary form and its associated documentation -as provided herein ("Software"). - - - -2. Subject to the terms and conditions of this License Agreement, CNRI hereby -grants Licensee a non-exclusive, non-transferable, royalty-free, world-wide -license to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use the Software alone or in any -derivative version, provided, however, that CNRI's License Agreement and CNRI's -notice of copyright, i.e., "Copyright (c) 1996-1999 Corporation for National -Research Initiatives; All Rights Reserved" are both retained in the Software, -alone or in any derivative version prepared by Licensee. - -Alternatively, in lieu of CNRI's License Agreement, Licensee may substitute -the following text (omitting the quotes), provided, however, that such text -is displayed prominently in the Software alone or in any derivative version -prepared by Licensee: "JPython (Version 1.1.x) is made available subject to -the terms and conditions in CNRI's License Agreement. This Agreement may be -located on the Internet using the following unique, persistent identifier -(known as a handle): 1895.22/1006. The License may also be obtained from a -proxy server on the Web using the following URL: http://hdl.handle.net/1895.22/1006." - -3. In the event Licensee prepares a derivative work that is based on or incorporates -the Software or any part thereof, and wants to make the derivative work available -to the public as provided herein, then Licensee hereby agrees to indicate -in any such work, in a prominently visible way, the nature of the modifications -made to CNRI's Software. - -4. Licensee may not use CNRI trademarks or trade name, including JPython or -CNRI, in a trademark sense to endorse or promote products or services of Licensee, -or any third party. Licensee may use the mark JPython in connection with Licensee's -derivative versions that are based on or incorporate the Software, but only -in the form "JPython-based ___________________," or equivalent. - -5. CNRI is making the Software available to Licensee on an "AS IS" basis. -CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF -EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION -OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. - -6. CNRI SHALL NOT BE LIABLE TO LICENSEE OR OTHER USERS OF THE SOFTWARE FOR -ANY INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, -MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF -ADVISED OF THE POSSIBILITY THEREOF. SOME STATES DO NOT ALLOW THE LIMITATION -OR EXCLUSION OF LIABILITY SO THE ABOVE DISCLAIMER MAY NOT APPLY TO LICENSEE. - -7. This License Agreement may be terminated by CNRI (i) immediately upon written -notice from CNRI of any material breach by the Licensee, if the nature of -the breach is such that it cannot be promptly remedied; or (ii) sixty (60) -days following notice from CNRI to Licensee of a material remediable breach, -if Licensee has not remedied such breach within that sixty-day period. - -8. This License Agreement shall be governed by and interpreted in all respects -by the law of the State of Virginia, excluding conflict of law provisions. -Nothing in this Agreement shall be deemed to create any relationship of agency, -partnership, or joint venture between CNRI and Licensee. - -9. By clicking on the "ACCEPT" button where indicated, or by installing, copying -or otherwise using the Software, Licensee agrees to be bound by the terms -and conditions of this License Agreement. +2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a non-exclusive, non-transferable, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., “Copyright (c) 1996-1999 Corporation for National Research Initiatives; All Rights Reserved” are both retained in the Software, alone or in any derivative version prepared by Licensee. +Alternatively, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes), provided, however, that such text is displayed prominently in the Software alone or in any derivative version prepared by Licensee: “JPython (Version 1.1.x) is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1006. The License may also be obtained from a proxy server on the Web using the following URL: http://hdl.handle.net/1895.22/1006.” +3. In the event Licensee prepares a derivative work that is based on or incorporates the Software or any part thereof, and wants to make the derivative work available to the public as provided herein, then Licensee hereby agrees to indicate in any such work, in a prominently visible way, the nature of the modifications made to CNRI's Software. +4. Licensee may not use CNRI trademarks or trade name, including JPython or CNRI, in a trademark sense to endorse or promote products or services of Licensee, or any third party. Licensee may use the mark JPython in connection with Licensee's derivative versions that are based on or incorporate the Software, but only in the form “JPython-based ___________________,” or equivalent. +5. CNRI is making the Software available to Licensee on an “AS IS” basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. +6. CNRI SHALL NOT BE LIABLE TO LICENSEE OR OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. SOME STATES DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY SO THE ABOVE DISCLAIMER MAY NOT APPLY TO LICENSEE. +7. This License Agreement may be terminated by CNRI (i) immediately upon written notice from CNRI of any material breach by the Licensee, if the nature of the breach is such that it cannot be promptly remedied; or (ii) sixty (60) days following notice from CNRI to Licensee of a material remediable breach, if Licensee has not remedied such breach within that sixty-day period. +8. This License Agreement shall be governed by and interpreted in all respects by the law of the State of Virginia, excluding conflict of law provisions. Nothing in this Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. +9. By clicking on the "ACCEPT" button where indicated, or by installing, copying or otherwise using the Software, Licensee agrees to be bound by the terms and conditions of this License Agreement. diff --git a/options/license/CNRI-Python b/options/license/CNRI-Python index a275becfc..64f1298e9 100644 --- a/options/license/CNRI-Python +++ b/options/license/CNRI-Python @@ -2,60 +2,24 @@ CNRI OPEN SOURCE LICENSE AGREEMENT IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. -BY CLICKING ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR -OTHERWISE USING PYTHON 1.6, beta 1 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED -TO THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. +BY CLICKING ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR OTHERWISE USING PYTHON 1.6, beta 1 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. -1. This LICENSE AGREEMENT is between the Corporation for National Research -Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 -("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise -using Python 1.6, beta 1 software in source or binary form and its associated -documentation, as released at the www.python.org Internet site on August 4, -2000 ("Python 1.6b1"). +1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6, beta 1 software in source or binary form and its associated documentation, as released at the www.python.org Internet site on August 4, 2000 ("Python 1.6b1"). -2. Subject to the terms and conditions of this License Agreement, CNRI hereby -grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, -analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python 1.6b1 alone or in any derivative version, -provided, however, that CNRIs License Agreement is retained in Python 1.6b1, -alone or in any derivative version prepared by Licensee. +2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6b1 alone or in any derivative version, provided, however, that CNRIs License Agreement is retained in Python 1.6b1, alone or in any derivative version prepared by Licensee. -Alternately, in lieu of CNRIs License Agreement, Licensee may substitute the -following text (omitting the quotes): "Python 1.6, beta 1, is made available -subject to the terms and conditions in CNRIs License Agreement. This Agreement -may be located on the Internet using the following unique, persistent identifier -(known as a handle): 1895.22/1011. This Agreement may also be obtained from -a proxy server on the Internet using the URL:http://hdl.handle.net/1895.22/1011". +Alternately, in lieu of CNRIs License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6, beta 1, is made available subject to the terms and conditions in CNRIs License Agreement. This Agreement may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1011. This Agreement may also be obtained from a proxy server on the Internet using the URL:http://hdl.handle.net/1895.22/1011". -3. In the event Licensee prepares a derivative work that is based on or incorporates -Python 1.6b1 or any part thereof, and wants to make the derivative work available -to the public as provided herein, then Licensee hereby agrees to indicate -in any such work the nature of the modifications made to Python 1.6b1. +3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6b1 or any part thereof, and wants to make the derivative work available to the public as provided herein, then Licensee hereby agrees to indicate in any such work the nature of the modifications made to Python 1.6b1. -4. CNRI is making Python 1.6b1 available to Licensee on an "AS IS" basis. -CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF -EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION -OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF PYTHON 1.6b1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. +4. CNRI is making Python 1.6b1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6b1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. -5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT -OF USING, MODIFYING OR DISTRIBUTING PYTHON 1.6b1, OR ANY DERIVATIVE THEREOF, -EVEN IF ADVISED OF THE POSSIBILITY THEREOF. +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING PYTHON 1.6b1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -6. This License Agreement will automatically terminate upon a material breach -of its terms and conditions. +6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. -7. This License Agreement shall be governed by and interpreted in all respects -by the law of the State of Virginia, excluding conflict of law provisions. -Nothing in this License Agreement shall be deemed to create any relationship -of agency, partnership, or joint venture between CNRI and Licensee. This License -Agreement does not grant permission to use CNRI trademarks or trade name in -a trademark sense to endorse or promote products or services of Licensee, -or any third party. +7. This License Agreement shall be governed by and interpreted in all respects by the law of the State of Virginia, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. -8. By clicking on the "ACCEPT" button where indicated, or by copying, installing -or otherwise using Python 1.6b1, Licensee agrees to be bound by the terms -and conditions of this License Agreement. +8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6b1, Licensee agrees to be bound by the terms and conditions of this License Agreement. ACCEPT diff --git a/options/license/CNRI-Python-GPL-Compatible b/options/license/CNRI-Python-GPL-Compatible index 3594e0553..2754c70e8 100644 --- a/options/license/CNRI-Python-GPL-Compatible +++ b/options/license/CNRI-Python-GPL-Compatible @@ -2,64 +2,22 @@ CNRI OPEN SOURCE GPL-COMPATIBLE LICENSE AGREEMENT IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. -BY CLICKING ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR -OTHERWISE USING PYTHON 1.6.1 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO THE -TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. +BY CLICKING ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR OTHERWISE USING PYTHON 1.6.1 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. -1. This LICENSE AGREEMENT is between the Corporation for National Research -Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 -("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise -using Python 1.6.1 software in source or binary form and its associated documentation. +1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6.1 software in source or binary form and its associated documentation. -2. Subject to the terms and conditions of this License Agreement, CNRI hereby -grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, -analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python 1.6.1 alone or in any derivative version, -provided, however, that CNRI's License Agreement and CNRI's notice of copyright, -i.e., "Copyright © 1995-2001 Corporation for National Research Initiatives; -All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative -version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, -Licensee may substitute the following text (omitting the quotes): "Python -1.6.1 is made available subject to the terms and conditions in CNRI's License -Agreement. This Agreement together with Python 1.6.1 may be located on the -Internet using the following unique, persistent identifier (known as a handle): -1895.22/1013. This Agreement may also be obtained from a proxy server on the -Internet using the following URL: http://hdl.handle.net/1895.22/1013". +2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6.1 alone or in any derivative version, provided, however, that CNRI's License Agreement and CNRI's notice of copyright, i.e., "Copyright © 1995-2001 Corporation for National Research Initiatives; All Rights Reserved" are retained in Python 1.6.1 alone or in any derivative version prepared by Licensee. Alternately, in lieu of CNRI's License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6.1 is made available subject to the terms and conditions in CNRI's License Agreement. This Agreement together with Python 1.6.1 may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1013. This Agreement may also be obtained from a proxy server on the Internet using the following URL: http://hdl.handle.net/1895.22/1013". -3. In the event Licensee prepares a derivative work that is based on or incorporates -Python 1.6.1 or any part thereof, and wants to make the derivative work available -to others as provided herein, then Licensee hereby agrees to include in any -such work a brief summary of the changes made to Python 1.6.1. +3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6.1 or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python 1.6.1. -4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. -CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF -EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION -OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. +4. CNRI is making Python 1.6.1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6.1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. -5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT -OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE -THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. +5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON 1.6.1 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON 1.6.1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -6. This License Agreement will automatically terminate upon a material breach -of its terms and conditions. +6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. -7. This License Agreement shall be governed by the federal intellectual property -law of the United States, including without limitation the federal copyright -law, and, to the extent such U.S. federal law does not apply, by the law of -the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. -Notwithstanding the foregoing, with regard to derivative works based on Python -1.6.1 that incorporate non-separable material that was previously distributed -under the GNU General Public License (GPL), the law of the Commonwealth of -Virginia shall govern this License Agreement only as to issues arising under -or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing -in this License Agreement shall be deemed to create any relationship of agency, -partnership, or joint venture between CNRI and Licensee. This License Agreement -does not grant permission to use CNRI trademarks or trade name in a trademark -sense to endorse or promote products or services of Licensee, or any third -party. +7. This License Agreement shall be governed by the federal intellectual property law of the United States, including without limitation the federal copyright law, and, to the extent such U.S. federal law does not apply, by the law of the Commonwealth of Virginia, excluding Virginia's conflict of law provisions. Notwithstanding the foregoing, with regard to derivative works based on Python 1.6.1 that incorporate non-separable material that was previously distributed under the GNU General Public License (GPL), the law of the Commonwealth of Virginia shall govern this License Agreement only as to issues arising under or with respect to Paragraphs 4, 5, and 7 of this License Agreement. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. -8. By clicking on the "ACCEPT" button where indicated, or by copying, installing -or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms -and conditions of this License Agreement. ACCEPT +8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6.1, Licensee agrees to be bound by the terms and conditions of this License Agreement. + +ACCEPT diff --git a/options/license/CPAL-1.0 b/options/license/CPAL-1.0 index 0205b7bb5..0ed5b6901 100644 --- a/options/license/CPAL-1.0 +++ b/options/license/CPAL-1.0 @@ -1,508 +1,172 @@ Common Public Attribution License Version 1.0 (CPAL) - 1. "Definitions" +1. “Definitions” -1.0.1 "Commercial Use" means distribution or otherwise making the Covered -Code available to a third party. +1.0.1 “Commercial Use” means distribution or otherwise making the Covered Code available to a third party. -1.1 "Contributor" means each entity that creates or contributes to the creation -of Modifications. +1.1 “Contributor” means each entity that creates or contributes to the creation of Modifications. -1.2 "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. +1.2 “Contributor Version” means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3 "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. +1.3 “Covered Code” means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4 "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. +1.4 “Electronic Distribution Mechanism” means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5 "Executable" means Covered Code in any form other than Source Code. +1.5 “Executable” means Covered Code in any form other than Source Code. -1.6 "Initial Developer" means the individual or entity identified as the Initial -Developer in the Source Code notice required by Exhibit A. +1.6 “Initial Developer” means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. +1.7 “Larger Work” means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8 "License" means this document. +1.8 “License” means this document. -1.8.1 "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. +1.8.1 “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9 "Modifications" means any addition to or deletion from the substance or -structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: +1.9 “Modifications” means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. +A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. -1.10 "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.10.1 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by grantor. - -1.11 "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. - -1.12 "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - - 2.1 The Initial Developer Grant. - -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and - -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). - -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. - -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices. - - 2.2 Contributor Grant. - -Subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). - -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. - -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1 Application of License. - -The Modifications which You create or to which You contribute are governed -by the terms of this License, including without limitation Section 2.2. The -Source Code version of Covered Code may be distributed only under the terms -of this License or a future version of this License released under Section -6.1, and You must include a copy of this License with every copy of the Source -Code You distribute. You may not offer or impose any terms on any Source Code -version that alters or restricts the applicable version of this License or -the recipients' rights hereunder. However, You may include an additional document -offering the additional rights described in Section 3.5. - - 3.2 Availability of Source Code. - -Any Modification which You create or to which You contribute must be made -available in Source Code form under the terms of this License either on the -same media as an Executable version or via an accepted Electronic Distribution -Mechanism to anyone to whom you made an Executable version available; and -if made available via Electronic Distribution Mechanism, must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of that particular Modification -has been made available to such recipients. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. - - 3.3 Description of Modifications. - -You must cause all Covered Code to which You contribute to contain a file -documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification -is derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4 Intellectual Property Matters - -(a) Third Party Claims. If Contributor has knowledge that a license under -a third party's intellectual property rights is required to exercise the rights -granted by such Contributor under Sections 2.1 or 2.2, Contributor must include -a text file with the Source Code distribution titled "LEGAL" which describes -the claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Code that new knowledge has been obtained. - -(b) Contributor APIs. If Contributor's Modifications include an application -programming interface and Contributor has knowledge of patent licenses which -are reasonably necessary to implement that API, Contributor must also include -this information in the LEGAL file. - -(c) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. - - 3.5 Required Notices. - -You must duplicate the notice in Exhibit A in each file of the Source Code. -If it is not possible to put such notice in a particular Source Code file -due to its structure, then You must include such notice in a location (such -as a relevant directory) where a user would be likely to look for such a notice. -If You created one or more Modification(s) You may add your name as a Contributor -to the notice described in Exhibit A. You must also duplicate this License -in any documentation for the Source Code where You describe recipients' rights -or ownership rights relating to Covered Code. You may choose to offer, and -to charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Covered Code. However, You may do so only on -Your own behalf, and not on behalf of the Initial Developer or any Contributor. -You must make it absolutely clear than any such warranty, support, indemnity -or liability obligation is offered by You alone, and You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of warranty, support, -indemnity or liability terms You offer. - - 3.6 Distribution of Executable Versions. - -You may distribute Covered Code in Executable form only if the requirements -of Section 3.1-3.5 have been met for that Covered Code, and if You include -a notice stating that the Source Code version of the Covered Code is available -under the terms of this License, including a description of how and where -You have fulfilled the obligations of Section 3.2. The notice must be conspicuously -included in any notice in an Executable version, related documentation or -collateral in which You describe recipients' rights relating to the Covered -Code. You may distribute the Executable version of Covered Code or ownership -rights under a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable version does not attempt to limit -or alter the recipient's rights in the Source Code version from the rights -set forth in this License. If You distribute the Executable version under -a different license You must make it absolutely clear that any terms which -differ from this License are offered by You alone, not by the Initial Developer, -Original Developer or any Contributor. You hereby agree to indemnify the Initial -Developer, Original Developer and every Contributor for any liability incurred -by the Initial Developer, Original Developer or such Contributor as a result -of any such terms You offer. - - 3.7 Larger Works. - -You may create a Larger Work by combining Covered Code with other code not -governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - - 6. Versions of the License. - - 6.1 New Versions. - -Socialtext, Inc. ("Socialtext") may publish revised and/or new versions of -the License from time to time. Each version will be given a distinguishing -version number. - - 6.2 Effect of New Versions. - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License published by Socialtext. No one other than Socialtext has the -right to modify the terms applicable to Covered Code created under this License. - - 6.3 Derivative Works. - -If You create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), You must (a) rename Your license so that the phrases "Socialtext", -"CPAL" or any confusingly similar phrase do not appear in your license (except -to note that your license differs from this License) and (b) otherwise make -it clear that Your version of the license contains terms which differ from -the CPAL. (Filling in the name of the Initial Developer, Original Developer, -Original Code or Contributor in the notice described in Exhibit A shall not -of themselves be deemed to be modifications of this License.) - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL DEVELOPER OR ANY OTHER -CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. -THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. -NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -8.1 This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - -8.2 If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Initial Developer, Original Developer -or a Contributor (the Initial Developer, Original Developer or Contributor -against whom You file such action is referred to as "Participant") alleging -that: - -(a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. - -(b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. - -8.3 If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user -license agreements (excluding distributors and resellers) which have been -validly granted by You or any distributor hereunder prior to termination shall -survive termination. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL -DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY -SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, -EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. -THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL -INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION -MAY NOT APPLY TO YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer, Original Developer and the Contributors, each -party is responsible for claims and damages arising, directly or indirectly, -out of its utilization of rights under this License and You agree to work -with Initial Developer, Original Developer and Contributors to distribute -such responsibility on an equitable basis. Nothing herein is intended or shall -be deemed to constitute any admission of liability. - - 13. MULTIPLE-LICENSED CODE. - -Initial Developer may designate portions of the Covered Code as Multiple-Licensed. -Multiple-Licensed means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the CPAL or the alternative -licenses, if any, specified by the Initial Developer in the file described -in Exhibit A. - - 14. ADDITIONAL TERM: ATTRIBUTION - -(a) As a modest attribution to the organizer of the development of the Original -Code ("Original Developer"), in the hope that its promotional value may help -justify the time, money and effort invested in writing the Original Code, -the Original Developer may include in Exhibit B ("Attribution Information") -a requirement that each time an Executable and Source Code or a Larger Work -is launched or initially run (which includes initiating a session), a prominent -display of the Original Developer's Attribution Information (as defined below) -must occur on the graphic user interface employed by the end user to access -such Covered Code (which may include display on a splash screen), if any. -The size of the graphic image should be consistent with the size of the other -elements of the Attribution Information. If the access by the end user to -the Executable and Source Code does not create a graphic user interface for -access to the Covered Code, this obligation shall not apply. If the Original -Code displays such Attribution Information in a particular form (such as in -the form of a splash screen, notice at login, an "about" display, or dedicated -attribution area on user interface screens), continued use of such form for -that Attribution Information is one way of meeting this requirement for notice. - -(b) Attribution information may only include a copyright notice, a brief phrase, -graphic image and a URL ("Attribution Information") and is subject to the -Attribution Limits as defined below. For these purposes, prominent shall mean -display for sufficient duration to give reasonable notice to the user of the -identity of the Original Developer and that if You include Attribution Information -or similar information for other parties, You must ensure that the Attribution -Information for the Original Developer shall be no less prominent than such -Attribution Information or similar information for the other party. For greater -certainty, the Original Developer may choose to specify in Exhibit B below -that the above attribution requirement only applies to an Executable and Source -Code resulting from the Original Code or any Modification, but not a Larger -Work. The intent is to provide for reasonably modest attribution, therefore -the Original Developer cannot require that You display, at any time, more -than the following information as Attribution Information: (a) a copyright -notice including the name of the Original Developer; (b) a word or one phrase -(not exceeding 10 words); (c) one graphic image provided by the Original Developer; -and (d) a URL (collectively, the "Attribution Limits"). - -(c) If Exhibit B does not include any Attribution Information, then there -are no requirements for You to display any Attribution Information of the -Original Developer. - -(d) You acknowledge that all trademarks, service marks and/or trade names -contained within the Attribution Information distributed with the Covered -Code are the exclusive property of their owners and may only be used with -the permission of their owners, or under circumstances otherwise permitted -by law or as expressly set out in this License. - - 15. ADDITIONAL TERM: NETWORK USE. - -The term "External Deployment" means the use, distribution, or communication -of the Original Code or Modifications in any way such that the Original Code -or Modifications may be used by anyone other than You, whether those works -are distributed or communicated to those persons or made available as an application -intended for use over a network. As an express condition for the grants of -license hereunder, You must treat any External Deployment by You of the Original -Code or Modifications as a distribution under section 3.1 and make Source -Code available under Section 3.2. EXHIBIT A. Common Public Attribution License -Version 1.0. - -"The contents of this file are subject to the Common Public Attribution License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at _____________ . -The License is based on the Mozilla Public License Version 1.1 but Sections -14 and 15 have been added to cover use of software over a computer network -and provide for limited attribution for the Original Developer. In addition, -Exhibit A has been modified to be consistent with Exhibit B. - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - -The Original Code is ______________________ . - -The Original Developer is not the Initial Developer and is __________ . If -left blank, the Original Developer is the Initial Developer. - -The Initial Developer of the Original Code is ____________ . All portions -of the code written by ___________ are Copyright (c) _____ . All Rights Reserved. - -Contributor ______________________ . - -Alternatively, the contents of this file may be used under the terms of the -_____ license (the [___] License), in which case the provisions of [______] -License are applicable instead of those above. - -If you wish to allow use of your version of this file only under the terms -of the [____] License and not to allow others to use your version of this -file under the CPAL, indicate your decision by deleting the provisions above -and replace them with the notice and other provisions required by the [___] -License. If you do not delete the provisions above, a recipient may use your -version of this file under either the CPAL or the [___] License." - -[NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] +1.10 “Original Code” means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + +1.10.1 “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.11 “Source Code” means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor’s choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + +1.12 “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, “You” includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + +2.1 The Initial Developer Grant. +The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. + +2.2 Contributor Grant. +Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1 Application of License. +The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients’ rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + +3.2 Availability of Source Code. +Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + +3.3 Description of Modifications. +You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + +3.4 Intellectual Property Matters + + (a) Third Party Claims. If Contributor has knowledge that a license under a third party’s intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled “LEGAL” which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. If Contributor’s Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + + (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor’s Modifications are Contributor’s original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + +3.5 Required Notices. +You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients’ rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.6 Distribution of Executable Versions. +You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients’ rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient’s rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer, Original Developer or any Contributor. You hereby agree to indemnify the Initial Developer, Original Developer and every Contributor for any liability incurred by the Initial Developer, Original Developer or such Contributor as a result of any such terms You offer. + +3.7 Larger Works. +You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + +6.1 New Versions. +Socialtext, Inc. (“Socialtext”) may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + +6.2 Effect of New Versions. +Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Socialtext. No one other than Socialtext has the right to modify the terms applicable to Covered Code created under this License. + +6.3 Derivative Works. +If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases “Socialtext”, “CPAL” or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the CPAL. (Filling in the name of the Initial Developer, Original Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + +8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +8.2 If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer, Original Developer or a Contributor (the Initial Developer, Original Developer or Contributor against whom You file such action is referred to as “Participant”) alleging that: + + (a) such Participant’s Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant’s Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. + +8.3 If You assert a patent infringement claim against Participant alleging that such Participant’s Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + +8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. +The Covered Code is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys’ fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. +As between Initial Developer, Original Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer, Original Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. +Initial Developer may designate portions of the Covered Code as Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the CPAL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. + +14. ADDITIONAL TERM: ATTRIBUTION + + (a) As a modest attribution to the organizer of the development of the Original Code (“Original Developer”), in the hope that its promotional value may help justify the time, money and effort invested in writing the Original Code, the Original Developer may include in Exhibit B (“Attribution Information”) a requirement that each time an Executable and Source Code or a Larger Work is launched or initially run (which includes initiating a session), a prominent display of the Original Developer’s Attribution Information (as defined below) must occur on the graphic user interface employed by the end user to access such Covered Code (which may include display on a splash screen), if any. The size of the graphic image should be consistent with the size of the other elements of the Attribution Information. If the access by the end user to the Executable and Source Code does not create a graphic user interface for access to the Covered Code, this obligation shall not apply. If the Original Code displays such Attribution Information in a particular form (such as in the form of a splash screen, notice at login, an “about” display, or dedicated attribution area on user interface screens), continued use of such form for that Attribution Information is one way of meeting this requirement for notice. + + (b) Attribution information may only include a copyright notice, a brief phrase, graphic image and a URL (“Attribution Information”) and is subject to the Attribution Limits as defined below. For these purposes, prominent shall mean display for sufficient duration to give reasonable notice to the user of the identity of the Original Developer and that if You include Attribution Information or similar information for other parties, You must ensure that the Attribution Information for the Original Developer shall be no less prominent than such Attribution Information or similar information for the other party. For greater certainty, the Original Developer may choose to specify in Exhibit B below that the above attribution requirement only applies to an Executable and Source Code resulting from the Original Code or any Modification, but not a Larger Work. The intent is to provide for reasonably modest attribution, therefore the Original Developer cannot require that You display, at any time, more than the following information as Attribution Information: (a) a copyright notice including the name of the Original Developer; (b) a word or one phrase (not exceeding 10 words); (c) one graphic image provided by the Original Developer; and (d) a URL (collectively, the “Attribution Limits”). + + (c) If Exhibit B does not include any Attribution Information, then there are no requirements for You to display any Attribution Information of the Original Developer. + + (d) You acknowledge that all trademarks, service marks and/or trade names contained within the Attribution Information distributed with the Covered Code are the exclusive property of their owners and may only be used with the permission of their owners, or under circumstances otherwise permitted by law or as expressly set out in this License. + +15. ADDITIONAL TERM: NETWORK USE. +The term “External Deployment” means the use, distribution, or communication of the Original Code or Modifications in any way such that the Original Code or Modifications may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Code or Modifications as a distribution under section 3.1 and make Source Code available under Section 3.2. + +EXHIBIT A. Common Public Attribution License Version 1.0. + +“The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at _____________. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B. +Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. +The Original Code is______________________. +The Original Developer is not the Initial Developer and is __________. If left blank, the Original Developer is the Initial Developer. +The Initial Developer of the Original Code is ____________. All portions of the code written by ___________ are Copyright (c) _____. All Rights Reserved. +Contributor ______________________. +Alternatively, the contents of this file may be used under the terms of the _____ license (the [___] License), in which case the provisions of [______] License are applicable instead of those above. +If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the CPAL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the CPAL or the [___] License.” + +[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] EXHIBIT B. Attribution Information Attribution Copyright Notice: _______________________ - Attribution Phrase (not exceeding 10 words): _______________________ - Attribution URL: _______________________ - Graphic Image as provided in the Covered Code, if any. - -Display of Attribution Information is [required/not required] in Larger Works -which are defined in the CPAL as a work which combines Covered Code or portions -thereof with code not governed by the terms of the CPAL. +Display of Attribution Information is [required/not required] in Larger Works which are defined in the CPAL as a work which combines Covered Code or portions thereof with code not governed by the terms of the CPAL. diff --git a/options/license/CPL-1.0 b/options/license/CPL-1.0 index e0cbd94c7..e1d8293bf 100644 --- a/options/license/CPL-1.0 +++ b/options/license/CPL-1.0 @@ -1,214 +1,87 @@ Common Public License Version 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. 1. +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. -DEFINITIONS +1. DEFINITIONS "Contribution" means: -a) in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and + a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and - b) in the case of each subsequent Contributor: + b) in the case of each subsequent Contributor: - i) changes to the Program, and + i) changes to the Program, and - ii) additions to the Program; + ii) additions to the Program; -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from -a Contributor if it was added to the Program by such Contributor itself or -anyone acting on such Contributor's behalf. Contributions do not include additions -to the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are -not derivative works of the Program. +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. "Contributor" means any person or entity that distributes the Program. -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. +"Licensed Patents " mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. -"Recipient" means anyone who receives the Program under this Agreement, including -all Contributors. 2. +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. -GRANT OF RIGHTS +2. GRANT OF RIGHTS -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, -prepare derivative works of, publicly display, publicly perform, distribute -and sublicense the Contribution of such Contributor, if any, and such derivative -works, in source code and object code form. + a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and -the Program if, at the time the Contribution is added by the Contributor, -such addition of the Contribution causes such combination to be covered by -the Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. + b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program. + c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth -in this Agreement. 3. + d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. -REQUIREMENTS +3. REQUIREMENTS -A Contributor may choose to distribute the Program in object code form under -its own license agreement, provided that: +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: - a) it complies with the terms and conditions of this Agreement; and + a) it complies with the terms and conditions of this Agreement; and - b) its license agreement: + b) its license agreement: -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; + i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; -ii) effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, -such as lost profits; + ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; -iii) states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party; and + iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and -iv) states that source code for the Program is available from such Contributor, -and informs licensees how to obtain it in a reasonable manner on or through -a medium customarily used for software exchange. + iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. When the Program is made available in source code form: - a) it must be made available under this Agreement; and + a) it must be made available under this Agreement; and - b) a copy of this Agreement must be included with each copy of the Program. + b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained within -the Program. +Contributors may not remove or alter any copyright notices contained within the Program. -Each Contributor must identify itself as the originator of its Contribution, -if any, in a manner that reasonably allows subsequent Recipients to identify -the originator of the Contribution. 4. +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. -COMMERCIAL DISTRIBUTION +4. COMMERCIAL DISTRIBUTION -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor -who includes the Program in a commercial product offering should do so in -a manner which does not create potential liability for other Contributors. -Therefore, if a Contributor includes the Program in a commercial product offering, -such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor -to the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense -and any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense. +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If -that Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such Commercial -Contributor's responsibility alone. Under this section, the Commercial Contributor -would have to defend claims against the other Contributors related to those -performance claims and warranties, and if a court requires any other Contributor -to pay any damages as a result, the Commercial Contributor must pay those -damages. 5. +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. -NO WARRANTY +5. NO WARRANTY -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON -AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS -OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -Each Recipient is solely responsible for determining the appropriateness of -using and distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement, including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage -to or loss of data, programs or equipment, and unavailability or interruption -of operations. 6. +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. -DISCLAIMER OF LIABILITY +6. DISCLAIMER OF LIABILITY -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 7. +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -GENERAL +7. GENERAL -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this Agreement, and without further action by the parties hereto, -such provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -If Recipient institutes patent litigation against a Contributor with respect -to a patent applicable to software (including a cross-claim or counterclaim -in a lawsuit), then any patent licenses granted by that Contributor to such -Recipient under this Agreement shall terminate as of the date such litigation -is filed. In addition, if Recipient institutes patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging that -the Program itself (excluding combinations of the Program with other software -or hardware) infringes such Recipient's patent(s), then such Recipient's rights -granted under Section 2(b) shall terminate as of the date such litigation -is filed. +If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and -does not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as reasonably -practicable. However, Recipient's obligations under this Agreement and any -licenses granted by Recipient relating to the Program shall continue and survive. +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. -Everyone is permitted to copy and distribute copies of this Agreement, but -in order to avoid inconsistency the Agreement is copyrighted and may only -be modified in the following manner. The Agreement Steward reserves the right -to publish new versions (including revisions) of this Agreement from time -to time. No one other than the Agreement Steward has the right to modify this -Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility -to serve as the Agreement Steward to a suitable separate entity. Each new -version of the Agreement will be given a distinguishing version number. The -Program (including Contributions) may always be distributed subject to the -version of the Agreement under which it was received. In addition, after a -new version of the Agreement is published, Contributor may elect to distribute -the Program (including its Contributions) under the new version. Except as -expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights -or licenses to the intellectual property of any Contributor under this Agreement, -whether expressly, by implication, estoppel or otherwise. All rights in the -Program not expressly granted under this Agreement are reserved. +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. IBM is the initial Agreement Steward. IBM may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. -This Agreement is governed by the laws of the State of New York and the intellectual -property laws of the United States of America. No party to this Agreement -will bring a legal action under this Agreement more than one year after the -cause of action arose. Each party waives its rights to a jury trial in any -resulting litigation. +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/options/license/CPOL-1.02 b/options/license/CPOL-1.02 index 1dd2554ac..9857e0003 100644 --- a/options/license/CPOL-1.02 +++ b/options/license/CPOL-1.02 @@ -2,222 +2,97 @@ The Code Project Open License (CPOL) 1.02 Preamble -This License governs Your use of the Work. This License is intended to allow -developers to use the Source Code and Executable Files provided as part of -the Work in any application in any form. +This License governs Your use of the Work. This License is intended to allow developers to use the Source Code and Executable Files provided as part of the Work in any application in any form. The main points subject to the terms of the License are: +- Source Code and Executable Files can be used in commercial applications; +- Source Code and Executable Files can be redistributed; and +- Source Code can be modified to create derivative works. +- No claim of suitability, guarantee, or any warranty whatsoever is provided. The software is provided "as-is". +- The Article accompanying the Work may not be distributed or republished without the Author's consent - - Source Code and Executable Files can be used in commercial applications; - - - Source Code and Executable Files can be redistributed; and - - - Source Code can be modified to create derivative works. - -- No claim of suitability, guarantee, or any warranty whatsoever is provided. -The software is provided "as-is". - -- The Article accompanying the Work may not be distributed or republished -without the Author's consent - -This License is entered between You, the individual or other entity reading -or otherwise making use of the Work licensed pursuant to this License and -the individual or other entity which offers the Work under the terms of this -License ("Author"). +This License is entered between You, the individual or other entity reading or otherwise making use of the Work licensed pursuant to this License and the individual or other entity which offers the Work under the terms of this License ("Author"). License -THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CODE PROJECT -OPEN LICENSE ("LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER -APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE -OR COPYRIGHT LAW IS PROHIBITED. +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CODE PROJECT OPEN LICENSE ("LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. -BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HEREIN, YOU ACCEPT AND AGREE -TO BE BOUND BY THE TERMS OF THIS LICENSE. THE AUTHOR GRANTS YOU THE RIGHTS -CONTAINED HEREIN IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. -IF YOU DO NOT AGREE TO ACCEPT AND BE BOUND BY THE TERMS OF THIS LICENSE, YOU -CANNOT MAKE ANY USE OF THE WORK. +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HEREIN, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE AUTHOR GRANTS YOU THE RIGHTS CONTAINED HEREIN IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. IF YOU DO NOT AGREE TO ACCEPT AND BE BOUND BY THE TERMS OF THIS LICENSE, YOU CANNOT MAKE ANY USE OF THE WORK. - 1. Definitions. +1. Definitions. -a. "Articles" means, collectively, all articles written by Author which describes -how the Source Code and Executable Files for the Work may be used by a user. + a. "Articles" means, collectively, all articles written by Author which describes how the Source Code and Executable Files for the Work may be used by a user. -b. "Author" means the individual or entity that offers the Work under the -terms of this License. + b. "Author" means the individual or entity that offers the Work under the terms of this License. -c. "Derivative Work" means a work based upon the Work or upon the Work and -other pre-existing works. + c. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works. -d. "Executable Files" refer to the executables, binary files, configuration -and any required data files included in the Work. + d. "Executable Files" refer to the executables, binary files, configuration and any required data files included in the Work. -e. "Publisher" means the provider of the website, magazine, CD-ROM, DVD or -other medium from or by which the Work is obtained by You. + e. "Publisher" means the provider of the website, magazine, CD-ROM, DVD or other medium from or by which the Work is obtained by You. -f. "Source Code" refers to the collection of source code and configuration -files used to create the Executable Files. + f. "Source Code" refers to the collection of source code and configuration files used to create the Executable Files. -g. "Standard Version" refers to such a Work if it has not been modified, or -has been modified in accordance with the consent of the Author, such consent -being in the full discretion of the Author. + g. "Standard Version" refers to such a Work if it has not been modified, or has been modified in accordance with the consent of the Author, such consent being in the full discretion of the Author. -h. "Work" refers to the collection of files distributed by the Publisher, -including the Source Code, Executable Files, binaries, data files, documentation, -whitepapers and the Articles. + h. "Work" refers to the collection of files distributed by the Publisher, including the Source Code, Executable Files, binaries, data files, documentation, whitepapers and the Articles. -i. "You" is you, an individual or entity wishing to use the Work and exercise -your rights under this License. + i. "You" is you, an individual or entity wishing to use the Work and exercise your rights under this License. -2. Fair Use/Fair Use Rights. Nothing in this License is intended to reduce, -limit, or restrict any rights arising from fair use, fair dealing, first sale -or other limitations on the exclusive rights of the copyright owner under -copyright law or other applicable laws. +2. Fair Use/Fair Use Rights. Nothing in this License is intended to reduce, limit, or restrict any rights arising from fair use, fair dealing, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. -3. License Grant. Subject to the terms and conditions of this License, the -Author hereby grants You a worldwide, royalty-free, non-exclusive, perpetual -(for the duration of the applicable copyright) license to exercise the rights -in the Work as stated below: +3. License Grant. Subject to the terms and conditions of this License, the Author hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: -a. You may use the standard version of the Source Code or Executable Files -in Your own applications. + a. You may use the standard version of the Source Code or Executable Files in Your own applications. -b. You may apply bug fixes, portability fixes and other modifications obtained -from the Public Domain or from the Author. A Work modified in such a way shall -still be considered the standard version and will be subject to this License. + b. You may apply bug fixes, portability fixes and other modifications obtained from the Public Domain or from the Author. A Work modified in such a way shall still be considered the standard version and will be subject to this License. -c. You may otherwise modify Your copy of this Work (excluding the Articles) -in any way to create a Derivative Work, provided that You insert a prominent -notice in each changed file stating how, when and where You changed that file. + c. You may otherwise modify Your copy of this Work (excluding the Articles) in any way to create a Derivative Work, provided that You insert a prominent notice in each changed file stating how, when and where You changed that file. -d. You may distribute the standard version of the Executable Files and Source -Code or Derivative Work in aggregate with other (possibly commercial) programs -as part of a larger (possibly commercial) software distribution. + d. You may distribute the standard version of the Executable Files and Source Code or Derivative Work in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution. -e. The Articles discussing the Work published in any form by the author may -not be distributed or republished without the Author's consent. The author -retains copyright to any such Articles. You may use the Executable Files and -Source Code pursuant to this License but you may not repost or republish or -otherwise distribute or make available the Articles, without the prior written -consent of the Author. + e. The Articles discussing the Work published in any form by the author may not be distributed or republished without the Author's consent. The author retains copyright to any such Articles. You may use the Executable Files and Source Code pursuant to this License but you may not repost or republish or otherwise distribute or make available the Articles, without the prior written consent of the Author. -Any subroutines or modules supplied by You and linked into the Source Code -or Executable Files of this Work shall not be considered part of this Work -and will not be subject to the terms of this License. +Any subroutines or modules supplied by You and linked into the Source Code or Executable Files of this Work shall not be considered part of this Work and will not be subject to the terms of this License. -4. Patent License. Subject to the terms and conditions of this License, each -Author hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, -royalty-free, irrevocable (except as stated in this section) patent license -to make, have made, use, import, and otherwise transfer the Work. +4. Patent License. Subject to the terms and conditions of this License, each Author hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, import, and otherwise transfer the Work. -5. Restrictions. The license granted in Section 3 above is expressly made -subject to and limited by the following restrictions: +5. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: -a. You agree not to remove any of the original copyright, patent, trademark, -and attribution notices and associated disclaimers that may appear in the -Source Code or Executable Files. + a. You agree not to remove any of the original copyright, patent, trademark, and attribution notices and associated disclaimers that may appear in the Source Code or Executable Files. -b. You agree not to advertise or in any way imply that this Work is a product -of Your own. + b. You agree not to advertise or in any way imply that this Work is a product of Your own. -c. The name of the Author may not be used to endorse or promote products derived -from the Work without the prior written consent of the Author. + c. The name of the Author may not be used to endorse or promote products derived from the Work without the prior written consent of the Author. -d. You agree not to sell, lease, or rent any part of the Work. This does not -restrict you from including the Work or any part of the Work inside a larger -software distribution that itself is being sold. The Work by itself, though, -cannot be sold, leased or rented. + d. You agree not to sell, lease, or rent any part of the Work. This does not restrict you from including the Work or any part of the Work inside a larger software distribution that itself is being sold. The Work by itself, though, cannot be sold, leased or rented. -e. You may distribute the Executable Files and Source Code only under the -terms of this License, and You must include a copy of, or the Uniform Resource -Identifier for, this License with every copy of the Executable Files or Source -Code You distribute and ensure that anyone receiving such Executable Files -and Source Code agrees that the terms of this License apply to such Executable -Files and/or Source Code. You may not offer or impose any terms on the Work -that alter or restrict the terms of this License or the recipients' exercise -of the rights granted hereunder. You may not sublicense the Work. You must -keep intact all notices that refer to this License and to the disclaimer of -warranties. You may not distribute the Executable Files or Source Code with -any technological measures that control access or use of the Work in a manner -inconsistent with the terms of this License. + e. You may distribute the Executable Files and Source Code only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy of the Executable Files or Source Code You distribute and ensure that anyone receiving such Executable Files and Source Code agrees that the terms of this License apply to such Executable Files and/or Source Code. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute the Executable Files or Source Code with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License. -f. You agree not to use the Work for illegal, immoral or improper purposes, -or on pages containing illegal, immoral or improper material. The Work is -subject to applicable export laws. You agree to comply with all such laws -and regulations that may apply to the Work after Your receipt of the Work. + f. You agree not to use the Work for illegal, immoral or improper purposes, or on pages containing illegal, immoral or improper material. The Work is subject to applicable export laws. You agree to comply with all such laws and regulations that may apply to the Work after Your receipt of the Work. -6. Representations, Warranties and Disclaimer. THIS WORK IS PROVIDED "AS IS", -"WHERE IS" AND "AS AVAILABLE", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OR -CONDITIONS OR GUARANTEES. YOU, THE USER, ASSUME ALL RISK IN ITS USE, INCLUDING -COPYRIGHT INFRINGEMENT, PATENT INFRINGEMENT, SUITABILITY, ETC. AUTHOR EXPRESSLY -DISCLAIMS ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES OR CONDITIONS, INCLUDING -WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF MERCHANTABILITY, MERCHANTABLE -QUALITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY WARRANTY OF TITLE OR NON-INFRINGEMENT, -OR THAT THE WORK (OR ANY PORTION THEREOF) IS CORRECT, USEFUL, BUG-FREE OR -FREE OF VIRUSES. YOU MUST PASS THIS DISCLAIMER ON WHENEVER YOU DISTRIBUTE -THE WORK OR DERIVATIVE WORKS. +6. Representations, Warranties and Disclaimer. THIS WORK IS PROVIDED "AS IS", "WHERE IS" AND "AS AVAILABLE", WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES OR CONDITIONS OR GUARANTEES. YOU, THE USER, ASSUME ALL RISK IN ITS USE, INCLUDING COPYRIGHT INFRINGEMENT, PATENT INFRINGEMENT, SUITABILITY, ETC. AUTHOR EXPRESSLY DISCLAIMS ALL EXPRESS, IMPLIED OR STATUTORY WARRANTIES OR CONDITIONS, INCLUDING WITHOUT LIMITATION, WARRANTIES OR CONDITIONS OF MERCHANTABILITY, MERCHANTABLE QUALITY OR FITNESS FOR A PARTICULAR PURPOSE, OR ANY WARRANTY OF TITLE OR NON-INFRINGEMENT, OR THAT THE WORK (OR ANY PORTION THEREOF) IS CORRECT, USEFUL, BUG-FREE OR FREE OF VIRUSES. YOU MUST PASS THIS DISCLAIMER ON WHENEVER YOU DISTRIBUTE THE WORK OR DERIVATIVE WORKS. -7. Indemnity. You agree to defend, indemnify and hold harmless the Author -and the Publisher from and against any claims, suits, losses, damages, liabilities, -costs, and expenses (including reasonable legal or attorneys' fees) resulting -from or relating to any use of the Work by You. +7. Indemnity. You agree to defend, indemnify and hold harmless the Author and the Publisher from and against any claims, suits, losses, damages, liabilities, costs, and expenses (including reasonable legal or attorneys' fees) resulting from or relating to any use of the Work by You. -8. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, -IN NO EVENT WILL THE AUTHOR OR THE PUBLISHER BE LIABLE TO YOU ON ANY LEGAL -THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES -ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK OR OTHERWISE, EVEN IF THE -AUTHOR OR THE PUBLISHER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +8. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL THE AUTHOR OR THE PUBLISHER BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK OR OTHERWISE, EVEN IF THE AUTHOR OR THE PUBLISHER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 9. Termination. +9. Termination. -a. This License and the rights granted hereunder will terminate automatically -upon any breach by You of any term of this License. Individuals or entities -who have received Derivative Works from You under this License, however, will -not have their licenses terminated provided such individuals or entities remain -in full compliance with those licenses. Sections 1, 2, 6, 7, 8, 9, 10 and -11 will survive any termination of this License. + a. This License and the rights granted hereunder will terminate automatically upon any breach by You of any term of this License. Individuals or entities who have received Derivative Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 6, 7, 8, 9, 10 and 11 will survive any termination of this License. -b. If You bring a copyright, trademark, patent or any other infringement claim -against any contributor over infringements You claim are made by the Work, -your License from such contributor to the Work ends automatically. + b. If You bring a copyright, trademark, patent or any other infringement claim against any contributor over infringements You claim are made by the Work, your License from such contributor to the Work ends automatically. -c. Subject to the above terms and conditions, this License is perpetual (for -the duration of the applicable copyright in the Work). Notwithstanding the -above, the Author reserves the right to release the Work under different license -terms or to stop distributing the Work at any time; provided, however that -any such election will not serve to withdraw this License (or any other license -that has been, or is required to be, granted under the terms of this License), -and this License will continue in full force and effect unless terminated -as stated above. + c. Subject to the above terms and conditions, this License is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, the Author reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. -10. Publisher. The parties hereby confirm that the Publisher shall not, under -any circumstances, be responsible for and shall not have any liability in -respect of the subject matter of this License. The Publisher makes no warranty -whatsoever in connection with the Work and shall not be liable to You or any -party on any legal theory for any damages whatsoever, including without limitation -any general, special, incidental or consequential damages arising in connection -to this license. The Publisher reserves the right to cease making the Work -available to You at any time without notice +10. Publisher. The parties hereby confirm that the Publisher shall not, under any circumstances, be responsible for and shall not have any liability in respect of the subject matter of this License. The Publisher makes no warranty whatsoever in connection with the Work and shall not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. The Publisher reserves the right to cease making the Work available to You at any time without notice - 11. Miscellaneous +11. Miscellaneous -a. This License shall be governed by the laws of the location of the head -office of the Author or if the Author is an individual, the laws of location -of the principal place of residence of the Author. + a. This License shall be governed by the laws of the location of the head office of the Author or if the Author is an individual, the laws of location of the principal place of residence of the Author. -b. If any provision of this License is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this License, and without further action by the parties to this -License, such provision shall be reformed to the minimum extent necessary -to make such provision valid and enforceable. + b. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this License, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -c. No term or provision of this License shall be deemed waived and no breach -consented to unless such waiver or consent shall be in writing and signed -by the party to be charged with such waiver or consent. + c. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. -d. This License constitutes the entire agreement between the parties with -respect to the Work licensed herein. There are no understandings, agreements -or representations with respect to the Work not specified herein. The Author -shall not be bound by any additional provisions that may appear in any communication -from You. This License may not be modified without the mutual written agreement -of the Author and You. + d. This License constitutes the entire agreement between the parties with respect to the Work licensed herein. There are no understandings, agreements or representations with respect to the Work not specified herein. The Author shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Author and You. diff --git a/options/license/CUA-OPL-1.0 b/options/license/CUA-OPL-1.0 index 3c46119b1..15e60b24c 100644 --- a/options/license/CUA-OPL-1.0 +++ b/options/license/CUA-OPL-1.0 @@ -1,410 +1,143 @@ CUA Office Public License Version 1.0 - 1. Definitions. +1. Definitions. -1.0.1. "Commercial Use" means distribution or otherwise making the Covered -Code available to a third party. +1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. - -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. +1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. +1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source Code. - -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. +1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. - - 1.8. "License" means this document. - -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. - -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: - -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. - -B. Any new file that contains any part of the Original Code or previous Modifications. - -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. - -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. - -1.12. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license, subject to third party -intellectual property claims: - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and - -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). - -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. - -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices. - -2.2. Contributor Grant. Subject to third party intellectual property claims, -each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). - -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. - -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. - -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable version or -via an accepted Electronic Distribution Mechanism to anyone to whom you made -an Executable version available; and if made available via Electronic Distribution -Mechanism, must remain available for at least twelve (12) months after the -date it initially became available, or at least six (6) months after a subsequent -version of that particular Modification has been made available to such recipients. -You are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - -3.3. Description of Modifications. You must cause all Covered Code to which -You contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. - - 3.4. Intellectual Property Matters - -(a) Third Party Claims. If Contributor has knowledge that a license under -a third party's intellectual property rights is required to exercise the rights -granted by such Contributor under Sections 2.1 or 2.2, Contributor must include -a text file with the Source Code distribution titled "LEGAL" which describes -the claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Code that new knowledge has been obtained. - -(b) Contributor APIs. If Contributor's Modifications include an application -programming interface and Contributor has knowledge of patent licenses which -are reasonably necessary to implement that API, Contributor must also include -this information in the LEGAL file. - -(c) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. - -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be likely to -look for such a notice. If You created one or more Modification(s) You may -add your name as a Contributor to the notice described in Exhibit A. You must -also duplicate this License in any documentation for the Source Code where -You describe recipients' rights or ownership rights relating to Covered Code. -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Covered Code. However, -You may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for -any liability incurred by the Initial Developer or such Contributor as a result -of warranty, support, indemnity or liability terms You offer. - -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligations -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code or ownership rights under a license of Your choice, -which may contain terms different from this License, provided that You are -in compliance with the terms of this License and that the license for the -Executable version does not attempt to limit or alter the recipient's rights -in the Source Code version from the rights set forth in this License. If You -distribute the Executable version under a different license You must make -it absolutely clear that any terms which differ from this License are offered -by You alone, not by the Initial Developer or any Contributor. You hereby -agree to indemnify the Initial Developer and every Contributor for any liability -incurred by the Initial Developer or such Contributor as a result of any such -terms You offer. - -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - - 6. Versions of the License. - -6.1. New Versions. CUA Office Project may publish revised and/or new versions -of the License from time to time. Each version will be given a distinguishing -version number. - -6.2. Effect of New Versions. Once Covered Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Covered Code under -the terms of any subsequent version of the License published by CUA Office -Project. No one other than CUA Office Project has the right to modify the -terms applicable to Covered Code created under this License. - -6.3. Derivative Works. If You create or use a modified version of this License -(which you may only do in order to apply it to code which is not already Covered -Code governed by this License), You must (a) rename Your license so that the -phrases "CUA Office", "CUA", "CUAPL", or any confusingly similar phrase do -not appear in your license (except to note that your license differs from -this License) and (b) otherwise make it clear that Your version of the license -contains terms which differ from the CUA Office Public License. (Filling in -the name of the Initial Developer, Original Code or Contributor in the notice -described in Exhibit A shall not of themselves be deemed to be modifications -of this License.) - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - -8.2. If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: - -(a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. - -(b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. - -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - - 13. MULTIPLE-LICENSED CODE. - -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". -"Multiple-Licensed" means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the NPL or the alternative -licenses, if any, specified by the Initial Developer in the file described -in Exhibit A. EXHIBIT A - CUA Office Public License. - -"The contents of this file are subject to the CUA Office Public License Version -1.0 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://cuaoffice.sourceforge.net/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - -The Original Code is ______________________________________ . - -The Initial Developer of the Original Code is ________________________ . Portions -created by ______________________ are Copyright (C) ______ _______________________ -. All Rights Reserved. - -Contributor(s): ______________________________________ . - -Alternatively, the contents of this file may be used under the terms of the -_____ license (the " [___] License"), in which case the provisions of [______] -License are applicable instead of those above. If you wish to allow use of -your version of this file only under the terms of the [____] License and not -to allow others to use your version of this file under the CUAPL, indicate -your decision by deleting the provisions above and replace them with the notice -and other provisions required by the [___] License. If you do not delete the -provisions above, a recipient may use your version of this file under either -the CUAPL or the [___] License." - -[NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] +1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. + +1.5. "Executable" means Covered Code in any form other than Source Code. + +1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. + +1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. + +1.8. "License" means this document. + +1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + +1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: + + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or previous Modifications. + +1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + +1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + +1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + +2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. + +2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + +3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + +3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + +3.4. Intellectual Property Matters + + (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + + (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + +3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + +6.1. New Versions. CUA Office Project may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + +6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by CUA Office Project. No one other than CUA Office Project has the right to modify the terms applicable to Covered Code created under this License. + +6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "CUA Office", "CUA", "CUAPL", or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the CUA Office Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + +8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. + +8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + +8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. +Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A - CUA Office Public License. + +"The contents of this file are subject to the CUA Office Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://cuaoffice.sourceforge.net/ + +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. + +The Original Code is ______________________________________. + +The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. + +Contributor(s): ______________________________________. + +Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the CUAPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the CUAPL or the [___] License." + +[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] diff --git a/options/license/Caldera b/options/license/Caldera index 6ef053c6c..752ccc111 100644 --- a/options/license/Caldera +++ b/options/license/Caldera @@ -1,53 +1,25 @@ -Caldera International, Inc. hereby grants a fee free license that includes -the rights use, modify and distribute this named source code, including creating -derived binary products created from the source code. The source code for -which Caldera International, Inc. grants rights are limited to the following -UNIX Operating Systems that operate on the 16-Bit PDP-11 CPU and early versions -of the 32-Bit UNIX Operating System, with specific exclusion of UNIX System -III and UNIX System V and successor operating systems: +Caldera International, Inc. hereby grants a fee free license that includes the rights use, modify and distribute this named source code, including creating derived binary products created from the source code. The source code for which Caldera International, Inc. grants rights are limited to the following UNIX Operating Systems that operate on the 16-Bit PDP-11 CPU and early versions of the 32-Bit UNIX Operating System, with specific exclusion of UNIX System III and UNIX System V and successor operating systems: -32-bit 32V UNIX + 32-bit 32V UNIX + 16 bit UNIX Versions 1, 2, 3, 4, 5, 6, 7 -16 bit UNIX Versions 1, 2, 3, 4, 5, 6, 7 +Caldera International, Inc. makes no guarantees or commitments that any source code is available from Caldera +International, Inc. -Caldera International, Inc. makes no guarantees or commitments that any source -code is available from Caldera International, Inc. - -The following copyright notice applies to the source code files for which -this license is granted. +The following copyright notice applies to the source code files for which this license is granted. Copyright(C) Caldera International Inc. 2001-2002. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -Redistributions of source code and documentation must retain the above copyright -notice, this list of conditions and the following disclaimer. + Redistributions of source code and documentation must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -All advertising materials mentioning features or use of this software must -display the following acknowledgement: + All advertising materials mentioning features or use of this software must display the following acknowledgement: +This product includes software developed or owned by Caldera International, Inc. - + Neither the name of Caldera International, Inc. nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. -This product includes software developed or owned by Caldera International, -Inc. - -Neither the name of Caldera International, Inc. nor the names of other contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA INTERNATIONAL, -INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, -INC. BE LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. +USE OF THE SOFTWARE PROVIDED FOR UNDER THIS LICENSE BY CALDERA INTERNATIONAL, INC. AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL CALDERA INTERNATIONAL, INC. BE LIABLE FOR ANY DIRECT, INDIRECT INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/ClArtistic b/options/license/ClArtistic index 925403f10..1d7a2c288 100644 --- a/options/license/ClArtistic +++ b/options/license/ClArtistic @@ -2,122 +2,60 @@ The Clarified Artistic License Preamble -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder as -specified below. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder as specified below. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Distribution fee" is a fee you charge for providing a copy of this Package -to another party. + "Distribution fee" is a fee you charge for providing a copy of this Package to another party. -"Freely Available" means that no fee is charged for the right to use the item, -though there may be fees involved in handling the item. It also means that -recipients of the item may redistribute it under the same conditions they -received it. + "Freely Available" means that no fee is charged for the right to use the item, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain, or those made Freely Available, or from the Copyright -Holder. A Package modified in such a way shall still be considered the Standard -Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain, or those made Freely Available, or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major network archive site allowing -unrestricted access to them, or by allowing the Copyright Holder to include -your modifications in the Standard Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major network archive site allowing unrestricted access to them, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. - b) use the modified Package only within your corporation or organization. + b) use the modified Package only within your corporation or organization. -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -e) permit and encourge anyone who receives a copy of the modified Package -permission to make your modifications Freely Available in some specific way. + e) permit and encourge anyone who receives a copy of the modified Package permission to make your modifications Freely Available in some specific way. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. + b) accompany the distribution with the machine-readable source of the Package with your modifications. -c) give non-standard executables non-standard names, and clearly document -the differences in manual pages (or equivalent), together with instructions -on where to get the Standard Version. + c) give non-standard executables non-standard names, and clearly document the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -e) offer the machine-readable source of the Package, with your modifications, -by mail order. + e) offer the machine-readable source of the Package, with your modifications, by mail order. -5. You may charge a distribution fee for any distribution of this Package. -If you offer support for this Package, you may charge any fee you choose for -that support. You may not charge a license fee for the right to use this Package -itself. You may distribute this Package in aggregate with other (possibly -commercial and possibly nonfree) programs as part of a larger (possibly commercial -and possibly nonfree) software distribution, and charge license fees for other -parts of that software distribution, provided that you do not advertise this -Package as a product of your own. If the Package includes an interpreter, -You may embed this Package's interpreter within an executable of yours (by -linking); this shall be construed as a mere form of aggregation, provided -that the complete Standard Version of the interpreter is so embedded. +5. You may charge a distribution fee for any distribution of this Package. If you offer support for this Package, you may charge any fee you choose for that support. You may not charge a license fee for the right to use this Package itself. You may distribute this Package in aggregate with other (possibly commercial and possibly nonfree) programs as part of a larger (possibly commercial and possibly nonfree) software distribution, and charge license fees for other parts of that software distribution, provided that you do not advertise this Package as a product of your own. If the Package includes an interpreter, You may embed this Package's interpreter within an executable of yours (by linking); this shall be construed as a mere form of aggregation, provided that the complete Standard Version of the interpreter is so embedded. -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whoever generated them, and may be sold commercially, -and may be aggregated with this Package. If such scripts or library files -are aggregated with this Package via the so-called "undump" or "unexec" methods -of producing a binary executable image, then distribution of such an image -shall neither be construed as a distribution of this Package nor shall it -fall under the restrictions of Paragraphs 3 and 4, provided that you do not -represent such an executable image as a Standard Version of this Package. +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whoever generated them, and may be sold commercially, and may be aggregated with this Package. If such scripts or library files are aggregated with this Package via the so-called "undump" or "unexec" methods of producing a binary executable image, then distribution of such an image shall neither be construed as a distribution of this Package nor shall it fall under the restrictions of Paragraphs 3 and 4, provided that you do not represent such an executable image as a Standard Version of this Package. -7. C subroutines (or comparably compiled subroutines in other languages) supplied -by you and linked into this Package in order to emulate subroutines and variables -of the language defined by this Package shall not be considered part of this -Package, but are the equivalent of input as in Paragraph 6, provided these -subroutines do not change the language in any way that would cause it to fail -the regression tests for the language. +7. C subroutines (or comparably compiled subroutines in other languages) supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. -8. Aggregation of the Standard Version of the Package with a commercial distribution -is always permitted provided that the use of this Package is embedded; that -is, when no overt attempt is made to make this Package's interfaces visible -to the end user of the commercial distribution. Such use shall not be construed -as a distribution of this Package. +8. Aggregation of the Standard Version of the Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package. -9. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. +9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/options/license/Condor-1.1 b/options/license/Condor-1.1 index e857135f6..b6af3571f 100644 --- a/options/license/Condor-1.1 +++ b/options/license/Condor-1.1 @@ -1,116 +1,38 @@ Condor Public License -Version 1.1, October 30, 2003 Copyright © 1990-2006 Condor Team, Computer -Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights -Reserved. For more information contact: Condor Team, Attention: Professor -Miron Livny, Dept of Computer Sciences, 1210 W. Dayton St., Madison, WI 53706-1685, -(608) 262-0856 or miron@cs.wisc.edu. +Version 1.1, October 30, 2003 -This software referred to as the Condor® Version 6.x software ("Software") -was developed by the Condor Project, Condor Team, Computer Sciences Department, -University of Wisconsin-Madison, under the authority of the Board of Regents -of the University of Wisconsin System and includes voluntary contributions -made to the Condor Project ("Copyright Holders and Contributors and the University"). -For more information on the Condor Project, please see http://www.condorproject.org/. +Copyright © 1990-2006 Condor Team, Computer Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved. For more information contact: Condor Team, Attention: Professor Miron Livny, Dept of Computer Sciences, 1210 W. Dayton St., Madison, WI 53706-1685, (608) 262-0856 or miron@cs.wisc.edu. -Installation, use, reproduction, display, modification and redistribution -of this Software, with or without modification, in source and binary forms, -are permitted. Any exercise of rights under this license including sublicenses -by you is subject to the following conditions: +This software referred to as the Condor® Version 6.x software ("Software") was developed by the Condor Project, Condor Team, Computer Sciences Department, University of Wisconsin-Madison, under the authority of the Board of Regents of the University of Wisconsin System and includes voluntary contributions made to the Condor Project ("Copyright Holders and Contributors and the University"). For more information on the Condor Project, please see http://www.condorproject.org/. -1. Redistributions of this Software, with or without modification, must reproduce -this Condor Public License in: (1) the Software, and (2) any user documentation -or other similar material which is provided with the Software. +Installation, use, reproduction, display, modification and redistribution of this Software, with or without modification, in source and binary forms, are permitted. Any exercise of rights under this license including sublicenses by you is subject to the following conditions: - +1. Redistributions of this Software, with or without modification, must reproduce this Condor Public License in: (1) the Software, and (2) any user documentation or other similar material which is provided with the Software. -2. Any user documentation included with a redistribution must include the -following notice: +2. Any user documentation included with a redistribution must include the following notice: +``This product includes software from the Condor® Project (http://www.condorproject.org/)" +Alternatively, if that is where third-party acknowledgments normally appear, this acknowledgment must be reproduced in the Software itself. +3. Any academic report, publication, or other academic disclosure of results obtained with this Software will acknowledge this Software's use by an appropriate citation. -"This product includes software from the Condor® Project (http://www.condorproject.org/)" +4. The name Condor® is a registered trademark of the University of Wisconsin-Madison. The trademark may not be used to endorse or promote software, or products derived therefrom, and, other than as required by section 2 and 3 above, it may not be affixed to modified redistributions of this Software without the prior written approval, obtainable via email to condor-admin@cs.wisc.edu. -Alternatively, if that is where third-party acknowledgments normally appear, -this acknowledgment must be reproduced in the Software itself. +5. To the extent that patent claims licensable by the University of Wisconsin-Madison are necessarily infringed by the use or sale of the Software, you are granted a non-exclusive, worldwide, royalty- free perpetual license under such patent claims, with the rights for you to make, use, sell, offer to sell, import and otherwise transfer the Software in source code and object code form and derivative works. This patent license shall apply to the combination of the Software with other software if, at the time the Software is added by you, such addition of the Software causes such combination to be covered by such patent claims. This patent license shall not apply to any other combinations which include the Software. No hardware per se is licensed hereunder.If you or any subsequent sub-licensee (a ``Recipient") institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Software infringes such Recipient's patent(s), then such Recipient's rights granted (directly or indirectly) under the patent license above shall terminate as of the date such litigation is filed. All sublicenses to the Software which have been properly granted prior to termination shall survive any termination of said patent license, if not otherwise terminated pursuant to this section. -3. Any academic report, publication, or other academic disclosure of results -obtained with this Software will acknowledge this Software's use by an appropriate -citation. +6. DISCLAIMER +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AND THE UNIVERSITY "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, AND FITNESS FOR A PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE COPYRIGHT HOLDERS AND CONTRIBUTORS AND THE UNIVERSITY MAKE NO REPRESENTATION THAT THE SOFTWARE, MODIFICATIONS, ENHANCEMENTS OR DERIVATIVE WORKS THEREOF, WILL NOT INFRINGE ANY PATENT, COPYRIGHT, TRADEMARK, TRADE SECRET OR OTHER PROPRIETARY RIGHT. +7. LIMITATION OF LIABILITY +THE COPYRIGHT HOLDERS AND CONTRIBUTORS AND ANY OTHER OFFICER, AGENT, OR EMPLOYEE OF THE UNIVERSITY SHALL HAVE NO LIABILITY TO LICENSEE OR OTHER PERSONS FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA OR PROFITS, OR BUSINESS INTERRUPTION, HOWEVER CAUSED AND ON ANY THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR OTHERWISE, ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +8. Certain uses and transfers of the Software or documentation, and/or items or software incorporating the Condor Software or documentation, may require a license under U.S. Export Control laws. Licensee represents and warrants that all uses and transfers of the Condor Software or documentation and/or any items or software incorporating Condor shall be in compliance with U.S. Export Control laws, and Licensee further understands that failure to comply with such export control laws may result in criminal liability to Licensee under U.S. laws. -4. The name Condor® is a registered trademark of the University of Wisconsin-Madison. -The trademark may not be used to endorse or promote software, or products -derived therefrom, and, other than as required by section 2 and 3 above, it -may not be affixed to modified redistributions of this Software without the -prior written approval, obtainable via email to condor-admin@cs.wisc.edu. +9. The Condor Team may publish revised and/or new versions of this Condor Public License (``this License") from time to time. Each version will be given a distinguishing version number. Once Software has been published under a particular version of this License, you may always continue to use it under the terms of that version. You may also choose to use such Software under the terms of any subsequent version of this License published by the Condor Team. No one other than the Condor Team has the right to modify the terms of this License. -5. To the extent that patent claims licensable by the University of Wisconsin-Madison -are necessarily infringed by the use or sale of the Software, you are granted -a non-exclusive, worldwide, royalty- free perpetual license under such patent -claims, with the rights for you to make, use, sell, offer to sell, import -and otherwise transfer the Software in source code and object code form and -derivative works. This patent license shall apply to the combination of the -Software with other software if, at the time the Software is added by you, -such addition of the Software causes such combination to be covered by such -patent claims. This patent license shall not apply to any other combinations -which include the Software. No hardware per se is licensed hereunder.If you -or any subsequent sub-licensee (a ``Recipient") institutes patent litigation -against any entity (including a cross-claim or counterclaim in a lawsuit) -alleging that the Software infringes such Recipient's patent(s), then such -Recipient's rights granted (directly or indirectly) under the patent license -above shall terminate as of the date such litigation is filed. All sublicenses -to the Software which have been properly granted prior to termination shall -survive any termination of said patent license, if not otherwise terminated -pursuant to this section. - - 6. DISCLAIMER - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AND THE -UNIVERSITY "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, -AND FITNESS FOR A PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE COPYRIGHT -HOLDERS AND CONTRIBUTORS AND THE UNIVERSITY MAKE NO REPRESENTATION THAT THE -SOFTWARE, MODIFICATIONS, ENHANCEMENTS OR DERIVATIVE WORKS THEREOF, WILL NOT -INFRINGE ANY PATENT, COPYRIGHT, TRADEMARK, TRADE SECRET OR OTHER PROPRIETARY -RIGHT. - - 7. LIMITATION OF LIABILITY - -THE COPYRIGHT HOLDERS AND CONTRIBUTORS AND ANY OTHER OFFICER, AGENT, OR EMPLOYEE -OF THE UNIVERSITY SHALL HAVE NO LIABILITY TO LICENSEE OR OTHER PERSONS FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE -DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, PROCUREMENT OF SUBSTITUTE -GOODS OR SERVICES, LOSS OF USE, DATA OR PROFITS, OR BUSINESS INTERRUPTION, -HOWEVER CAUSED AND ON ANY THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), -PRODUCT LIABILITY OR OTHERWISE, ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -8. Certain uses and transfers of the Software or documentation, and/or items -or software incorporating the Condor Software or documentation, may require -a license under U.S. Export Control laws. Licensee represents and warrants -that all uses and transfers of the Condor Software or documentation and/or -any items or software incorporating Condor shall be in compliance with U.S. -Export Control laws, and Licensee further understands that failure to comply -with such export control laws may result in criminal liability to Licensee -under U.S. laws. - -9. The Condor Team may publish revised and/or new versions of this Condor -Public License (``this License") from time to time. Each version will be given -a distinguishing version number. Once Software has been published under a -particular version of this License, you may always continue to use it under -the terms of that version. You may also choose to use such Software under -the terms of any subsequent version of this License published by the Condor -Team. No one other than the Condor Team has the right to modify the terms -of this License. For more information: +For more information: Condor Team - Attention: Professor Miron Livny - 7367 Computer Sciences - 1210 W. Dayton St. - Madison, WI 53706-1685 - miron@cs.wisc.edu - http://pages.cs.wisc.edu/~miron/miron.html diff --git a/options/license/Crossword b/options/license/Crossword index 45850f4a5..6be940c33 100644 --- a/options/license/Crossword +++ b/options/license/Crossword @@ -1,11 +1,5 @@ Copyright (C) 1995-2009 Gerd Neugebauer -cwpuzzle.dtx is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY. No author or distributor accepts responsibility to anyone for -the consequences of using it or for whether it serves any particular purpose -or works at all, unless he says so in writing. - +cwpuzzle.dtx is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY. No author or distributor accepts responsibility to anyone for the consequences of using it or for whether it serves any particular purpose or works at all, unless he says so in writing. . - -Everyone is granted permission to copy, modify and redistribute cwpuzzle.dtx, -provided this copyright notice is preserved and any modifications are indicated. +Everyone is granted permission to copy, modify and redistribute cwpuzzle.dtx, provided this copyright notice is preserved and any modifications are indicated. diff --git a/options/license/CrystalStacker b/options/license/CrystalStacker index 82c6a28c4..506361a95 100644 --- a/options/license/CrystalStacker +++ b/options/license/CrystalStacker @@ -1,18 +1,7 @@ -Crystal Stacker is freeware. This means you can pass copies around freely -provided you include this document in it's original form in your distribution. -Please see the "Contacting Us" section of this document if you need to contact -us for any reason. +Crystal Stacker is freeware. This means you can pass copies around freely provided you include this document in it's original form in your distribution. Please see the "Contacting Us" section of this document if you need to contact us for any reason. Disclaimer -NewCreature Design makes no guarantees regarding the Crystal Stacker software. -We are not responsible for damages caused by it, though the software is not -known to cause any problems. If you have trouble with the software, see the -"Contacting Us" section of this document. +NewCreature Design makes no guarantees regarding the Crystal Stacker software. We are not responsible for damages caused by it, though the software is not known to cause any problems. If you have trouble with the software, see the "Contacting Us" section of this document. -The source code is provided as-is and you may do with it whatsoever you please -provided that you include this file in its unmodified form with any new distribution. -NewCreature Design makes no gaurantees regarding the usability of the source -but are willing to help with any problems you might run into. Please see the -"Contacting Us" section of this document if you need to get in touch with -us about any issues you have regarding the source. +The source code is provided as-is and you may do with it whatsoever you please provided that you include this file in its unmodified form with any new distribution. NewCreature Design makes no gaurantees regarding the usability of the source but are willing to help with any problems you might run into. Please see the "Contacting Us" section of this document if you need to get in touch with us about any issues you have regarding the source. diff --git a/options/license/Cube b/options/license/Cube index 707afcc04..0a9ea66eb 100644 --- a/options/license/Cube +++ b/options/license/Cube @@ -1,25 +1,17 @@ -Cube game engine source code, 20 dec 2003 release. Copyright (C) 2001-2003 -Wouter van Oortmerssen. +Cube game engine source code, 20 dec 2003 release. -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. +Copyright (C) 2001-2003 Wouter van Oortmerssen. -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject -to the following restrictions: +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -1. The origin of this software must not be misrepresented; you must not claim -that you wrote the original software. If you use this software in a product, -an acknowledgment in the product documentation would be appreciated but is -not required. +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. - 3. This notice may not be removed or altered from any source distribution. + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. + + 3. This notice may not be removed or altered from any source distribution. additional clause specific to Cube: -4. Source versions may not be "relicensed" under a different license without -my explicitly written permission. + 4. Source versions may not be "relicensed" under a different license without my explicitly written permission. diff --git a/options/license/D-FSL-1.0 b/options/license/D-FSL-1.0 index eb0337e90..b64a259c4 100644 --- a/options/license/D-FSL-1.0 +++ b/options/license/D-FSL-1.0 @@ -1,354 +1,147 @@ Deutsche Freie Software Lizenz -(c) Ministerium für Wissenschaft und Forschung Nordrhein-Westfalen 2004 Erstellt -von Axel Metzger und Till Jaeger, Institut für Rechtsfragen der Freien und -Open Source Software - ( http://www.ifross.de ) . +(c) Ministerium für Wissenschaft und Forschung Nordrhein-Westfalen 2004 + +Erstellt von Axel Metzger und Till Jaeger, Institut für Rechtsfragen der Freien und Open Source Software - (http://www.ifross.de). Präambel -Software ist mehr als ein Wirtschaftsgut. Sie ist die technische Grundlage -der Informationsgesellschaft. Die Frage der Teilhabe der Allgemeinheit ist -deswegen von besonderer Bedeutung. Herkömmlich lizenzierte Programme werden -nur im Object Code vertrieben, der Nutzer darf das Programm weder verändern -noch weitergeben. Das Lizenzmodell der Freien Software (synonym "Open Source -Software") gewährt Ihnen dagegen umfassende Freiheiten im Umgang mit dem Programm. -Die Deutsche Freie Software Lizenz folgt diesem Lizenzmodell. Sie gewährt -Ihnen das Recht, das Programm in umfassender Weise zu nutzen. Es ist Ihnen -gestattet, das Programm nach Ihren Vorstellungen zu verändern, in veränderter -oder unveränderter Form zu vervielfältigen, zu verbreiten und öffentlich zugänglich -zu machen. Diese Rechte werden unentgeltlich eingeräumt. +Software ist mehr als ein Wirtschaftsgut. Sie ist die technische Grundlage der Informationsgesellschaft. Die Frage der Teilhabe der Allgemeinheit ist deswegen von besonderer Bedeutung. Herkömmlich lizenzierte Programme werden nur im Object Code vertrieben, der Nutzer darf das Programm weder verändern noch weitergeben. Das Lizenzmodell der Freien Software (synonym "Open Source Software") gewährt Ihnen dagegen umfassende Freiheiten im Umgang mit dem Programm. Die Deutsche Freie Software Lizenz folgt diesem Lizenzmodell. Sie gewährt Ihnen das Recht, das Programm in umfassender Weise zu nutzen. Es ist Ihnen gestattet, das Programm nach Ihren Vorstellungen zu verändern, in veränderter oder unveränderter Form zu vervielfältigen, zu verbreiten und öffentlich zugänglich zu machen. Diese Rechte werden unentgeltlich eingeräumt. -Die Deutsche Freie Software Lizenz verbindet die Rechtseinräumung allerdings -mit Pflichten, die dem Zweck dienen, das freie Zirkulieren des Programms und -aller veröffentlichten Fortentwicklungen zu sichern. Wenn Sie das Programm -verbreiten oder öffentlich zugänglich machen, dann müssen Sie jedem, der das -Programm von Ihnen erhält, eine Kopie dieser Lizenz mitliefern und den Zugriff -auf den Source Code ermöglichen. Eine weitere Pflicht betrifft Fortentwicklungen -des Programms. Änderungen am Programm, die Sie öffentlich verbreiten oder -zugänglich machen, müssen nach den Bestimmungen dieser Lizenz frei gegeben -werden. +Die Deutsche Freie Software Lizenz verbindet die Rechtseinräumung allerdings mit Pflichten, die dem Zweck dienen, das freie Zirkulieren des Programms und aller veröffentlichten Fortentwicklungen zu sichern. Wenn Sie das Programm verbreiten oder öffentlich zugänglich machen, dann müssen Sie jedem, der das Programm von Ihnen erhält, eine Kopie dieser Lizenz mitliefern und den Zugriff auf den Source Code ermöglichen. Eine weitere Pflicht betrifft Fortentwicklungen des Programms. Änderungen am Programm, die Sie öffentlich verbreiten oder zugänglich machen, müssen nach den Bestimmungen dieser Lizenz frei gegeben werden. -Die Deutsche Freie Software Lizenz nimmt auf die besonderen Anforderungen -des deutschen und europäischen Rechts Rücksicht. Sie ist zweisprachig gestaltet -und damit auch auf den internationalen Vertrieb ausgerichtet. +Die Deutsche Freie Software Lizenz nimmt auf die besonderen Anforderungen des deutschen und europäischen Rechts Rücksicht. Sie ist zweisprachig gestaltet und damit auch auf den internationalen Vertrieb ausgerichtet. - +§ 0 Definitionen - § 0 Definitionen +Dokumentation: Die Beschreibung des Aufbaus und/oder der Struktur der Programmierung und/oder der Funktionalitäten des Programms, unabhängig davon, ob sie im Source Code oder gesondert vorgenommen wird. - +Lizenz: Die zwischen dem Lizenzgeber und Ihnen geschlossene Vereinbarung mit dem Inhalt der "Deutschen Freien Software Lizenz" bzw. das Angebot hierzu. -Dokumentation: Die Beschreibung des Aufbaus und/oder der Struktur der Programmierung -und/oder der Funktionalitäten des Programms, unabhängig davon, ob sie im Source -Code oder gesondert vorgenommen wird. +Lizenznehmer: Jede natürliche oder juristische Person, die die Lizenz angenommen hat. - +Programm: Jedes Computerprogramm, das von den Rechtsinhabern nach den Bestimmungen dieser Lizenz verbreitet oder öffentlich zugänglich gemacht worden ist. -Lizenz: Die zwischen dem Lizenzgeber und Ihnen geschlossene Vereinbarung mit -dem Inhalt der "Deutschen Freien Software Lizenz" bzw. das Angebot hierzu. +Object Code: Die maschinenlesbare, übersetzte Form des Programms. - +Öffentlich: Nicht nur an einen bestimmten Personenkreis gerichtet, der persönlich oder durch die Zugehörigkeit zu einer juristischen Person oder einem öffentlichen Träger miteinander verbunden ist. -Lizenznehmer: Jede natürliche oder juristische Person, die die Lizenz angenommen -hat. +Öffentlich zugänglich machen: Die öffentliche Weitergabe des Programms in unkörperlicher Form, insbesondere das Bereithalten zum Download in Datennetzen. - +Rechtsinhaber: Der bzw. die Urheber oder sonstigen Inhaber der ausschließlichen Nutzungsrechte an dem Programm. -Programm: Jedes Computerprogramm, das von den Rechtsinhabern nach den Bestimmungen -dieser Lizenz verbreitet oder öffentlich zugänglich gemacht worden ist. +Source Code: Die für Menschen lesbare, in Programmiersprache dargestellte Form des Programms. - +Verändern: Jede Erweiterung, Kürzung und Bearbeitung des Programms, insbesondere Weiterentwicklungen. - Object Code: Die maschinenlesbare, übersetzte Form des Programms. +Verbreiten: Die öffentliche Weitergabe körperlicher Vervielfältigungsstücke, insbesondere auf Datenträgern oder in Verbindung mit Hardware. - +Vollständiger Source Code: Der Source Code in der für die Erstellung bzw. die Bearbeitung benutzten Form zusammen mit den zur Übersetzung und Installation erforderlichen Konfigurationsdateien und Software-Werkzeugen, sofern diese in der benötigten Form nicht allgemein gebräuchlich (z.B. Standard-Kompiler) oder für jedermann lizenzgebührenfrei im Internet abrufbar sind. -Öffentlich: Nicht nur an einen bestimmten Personenkreis gerichtet, der persönlich -oder durch die Zugehörigkeit zu einer juristischen Person oder einem öffentlichen -Träger miteinander verbunden ist. +§ 1 Rechte - +(1) Sie dürfen das Programm in unveränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen. -Öffentlich zugänglich machen: Die öffentliche Weitergabe des Programms in -unkörperlicher Form, insbesondere das Bereithalten zum Download in Datennetzen. +(2) Sie dürfen das Programm verändern und entsprechend veränderte Versionen vervielfältigen, verbreiten und öffentlich zugänglich machen. Gestattet ist auch die Kombination des Programms oder Teilen hiervon mit anderen Programmen. - +(3) Sie erhalten die Rechte unentgeltlich. -Rechtsinhaber: Der bzw. die Urheber oder sonstigen Inhaber der ausschließlichen -Nutzungsrechte an dem Programm. +§ 2 Pflichten beim Vertrieb - +(1) Wenn Sie das Programm verbreiten oder öffentlich zugänglich machen, sei es in unveränderter oder veränderter Form, sei es in einer Kombination mit anderen Programmen oder in Verbindung mit Hardware, dann müssen sie mitliefern: +1. alle Vermerke im Source Code und/oder Object Code, die auf diese Lizenz hinweisen; +2. alle Vermerke im Source Code und/oder Object Code, die über die Urheber des Programms Auskunft geben; +3. einen für den Empfänger deutlich wahrnehmbaren Hinweis auf diese Lizenz und die Internetadresse http://www.d-fsl.de; +4. den vollständigen Text dieser Lizenz in deutlich wahrnehmbarer Weise. -Source Code: Die für Menschen lesbare, in Programmiersprache dargestellte -Form des Programms. +(2) Wenn bei der Installation des Programms und/oder beim Programmstart Lizenz- und/oder Vertragsbedingungen angezeigt werden, dann müssen +1. diese Lizenz, +2. ein Hinweis auf diese Lizenz und +3. ein Hinweis auf den oder die Rechtsinhaber an den ersten unter dieser Lizenz nutzbaren Programmbestandteilen +ebenfalls angezeigt werden. - +(3) Sie dürfen die Nutzung des Programms nicht von Pflichten oder Bedingungen abhängig machen, die nicht in dieser Lizenz vorgesehen sind. -Verändern: Jede Erweiterung, Kürzung und Bearbeitung des Programms, insbesondere -Weiterentwicklungen. +(4) Sofern Sie mit dem Programm eine Dokumentation erhalten haben, muss diese Dokumentation entsprechend mitgeliefert werden, es sei denn, die freie Mitlieferung der Dokumentation ist Ihnen aufgrund der Lizenz für die Dokumentation nicht gestattet. - +§ 3 Weitere Pflichten beim Vertrieb veränderter Versionen -Verbreiten: Die öffentliche Weitergabe körperlicher Vervielfältigungsstücke, -insbesondere auf Datenträgern oder in Verbindung mit Hardware. +(1) Veränderte Versionen des Programms dürfen Sie nur unter den Bedingungen dieser Lizenz verbreiten oder öffentlich zugänglich machen, so dass Dritte das veränderte Programm insgesamt unter dieser Lizenz nutzen können. - +(2) Wird das Programm oder ein Teil hiervon mit einem anderen Programm kombiniert, gilt auch die Kombination insgesamt als eine veränderte Version des Programms, es sei denn, das andere Programm ist formal und inhaltlich eigenständig. Ein anderes Programm ist dann als eigenständig anzusehen, wenn es die folgenden Voraussetzungen alle erfüllt: +1. Der Source Code der kombinierten Programme muss jeweils in eigenen Dateien vorhanden sein, die keine Bestandteile des anderen Teils enthalten, die über die zur Programmkombination üblichen und erforderlichen Informationen über den anderen Teil hinausgehen, wobei der Source Code des anderen Programms nicht mitgeliefert werden muss. +2. Der mit dem Programm kombinierte Teil muss auch dann sinnvoll nutzbar sein, wenn er nicht mit dem Programm kombiniert wird, und zwar entweder alleine oder mit sonstigen Programmen. Was als "sinnvoll nutzbar" anzusehen ist, richtet sich nach der Auffassung der betroffenen Fachkreise. Zu den betroffenen Fachkreisen gehören alle Personen, die das Programm oder Programme mit vergleichbarer Funktionalität entwickeln, benutzen, verbreiten oder öffentlich zugänglich machen. -Vollständiger Source Code: Der Source Code in der für die Erstellung bzw. -die Bearbeitung benutzten Form zusammen mit den zur Übersetzung und Installation -erforderlichen Konfigurationsdateien und Software-Werkzeugen, sofern diese -in der benötigten Form nicht allgemein gebräuchlich (z.B. Standard-Kompiler) -oder für jedermann lizenzgebührenfrei im Internet abrufbar sind. +(3) Wenn Sie das Programm oder einen Teil hiervon - verändert oder unverändert - zusammen mit einem anderen Programm verbreiten oder öffentlich zugänglich machen, das unter der GNU General Public License (GPL) lizenziert wird, darf das Programm auch unter den Bedingungen der GPL genutzt werden, sofern es mit dem anderen Programm ein "derivative work" im Sinne der GPL bildet. Dabei sollen die Hinweise auf diese Lizenz entfernt und durch einen Hinweis auf die GPL ersetzt werden. Ob bei der Zusammenstellung ein "derivate work" im Sinne der GPL entsteht, beurteilt sich nach Ziffer 2 b) der GPL. Diese Bestimmung lautet: "You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License." Die GPL kann abgerufen werden unter http://www.fsf.org/licenses/gpl. - +(4) Wenn Sie das Programm in einer veränderten Form verbreiten oder öffentlich zugänglich machen, müssen Sie im Source Code einen Hinweis mit den Änderungen aufnehmen und mit dem Datum der Änderung versehen. Der Hinweis muss erkennen lassen, welche Änderungen vorgenommen wurden und bestehende Vermerke, die über die Urheber des Programms Auskunft geben, übernehmen. Dies gilt unabhängig davon, ob Sie einen eigenen Urhebervermerk hinzufügen. Anstelle eines Hinweises im Source Code können Sie auch ein Versionskontrollsystem verwenden oder weiterführen, sofern dieses mitverbreitet wird oder öffentlich zugänglich ist. - § 1 Rechte +(5) Sie dürfen von Dritten für die Einräumung eines einfachen Nutzungsrechts an veränderten Versionen des Programms kein Entgelt verlangen. -(1) Sie dürfen das Programm in unveränderter Form vervielfältigen, verbreiten -und öffentlich zugänglich machen. +(6) Wenn Sie an der veränderten Version des Programms ein anderes Schutzrecht als ein Urheberrecht erwerben, insbesondere ein Patent oder Gebrauchsmuster, lizenzieren Sie dieses Schutzrecht für veränderte und unveränderte Versionen des Programms in dem Umfang, der erforderlich ist, um die Rechte aus dieser Lizenz wahrnehmen zu können. -(2) Sie dürfen das Programm verändern und entsprechend veränderte Versionen -vervielfältigen, verbreiten und öffentlich zugänglich machen. Gestattet ist -auch die Kombination des Programms oder Teilen hiervon mit anderen Programmen. +§ 4 Weitere Pflichten beim Vertrieb im Object Code - (3) Sie erhalten die Rechte unentgeltlich. +(1) Wenn Sie das Programm nur im Object Code verbreiten, dann müssen Sie zusätzlich zu den in § 2 und § 3 geregelten Pflichten entweder +1. den vollständigen Source Code im Internet öffentlich zugänglich machen und bei der Verbreitung des Object Codes deutlich auf die vollständige Internetadresse hinweisen, unter der der Source Code abgerufen werden kann oder +2. den vollständigen Source Code auf einem hierfür üblichen Datenträger unter Beachtung der §§ 2 und 3 mitverbreiten. - +(2) Wenn Sie das Programm im Object Code öffentlich zugänglich machen, dann müssen Sie zusätzlich zu den in § 2 und § 3 geregelten Pflichten den vollständigen Source Code im Internet öffentlich zugänglich machen und dabei deutlich auf die vollständige Internetadresse hinweisen. - § 2 Pflichten beim Vertrieb +(3) Sofern Sie mit dem Programm eine Dokumentation erhalten haben, muss diese Dokumentation entsprechend der Absätze 1 und 2 mitgeliefert werden, es sei denn, die freie Mitlieferung der Dokumentation ist Ihnen aufgrund der Lizenz für die Dokumentation nicht gestattet. -(1) Wenn Sie das Programm verbreiten oder öffentlich zugänglich machen, sei -es in unveränderter oder veränderter Form, sei es in einer Kombination mit -anderen Programmen oder in Verbindung mit Hardware, dann müssen sie mitliefern: +§ 5 Vertragsschluss -1. alle Vermerke im Source Code und/oder Object Code, die auf diese Lizenz -hinweisen; - -2. alle Vermerke im Source Code und/oder Object Code, die über die Urheber -des Programms Auskunft geben; - -3. einen für den Empfänger deutlich wahrnehmbaren Hinweis auf diese Lizenz -und die Internetadresse < http://www.d-fsl.de > ; - - 4. den vollständigen Text dieser Lizenz in deutlich wahrnehmbarer Weise. - -(2) Wenn bei der Installation des Programms und/oder beim Programmstart Lizenz- -und/oder Vertragsbedingungen angezeigt werden, dann müssen - - 1. diese Lizenz, - - 2. ein Hinweis auf diese Lizenz und - -3. ein Hinweis auf den oder die Rechtsinhaber an den ersten unter dieser Lizenz -nutzbaren Programmbestandteilen - - ebenfalls angezeigt werden. - -(3) Sie dürfen die Nutzung des Programms nicht von Pflichten oder Bedingungen -abhängig machen, die nicht in dieser Lizenz vorgesehen sind. - -(4) Sofern Sie mit dem Programm eine Dokumentation erhalten haben, muss diese -Dokumentation entsprechend mitgeliefert werden, es sei denn, die freie Mitlieferung -der Dokumentation ist Ihnen aufgrund der Lizenz für die Dokumentation nicht -gestattet. - - - - § 3 Weitere Pflichten beim Vertrieb veränderter Versionen - -(1) Veränderte Versionen des Programms dürfen Sie nur unter den Bedingungen -dieser Lizenz verbreiten oder öffentlich zugänglich machen, so dass Dritte -das veränderte Programm insgesamt unter dieser Lizenz nutzen können. - -(2) Wird das Programm oder ein Teil hiervon mit einem anderen Programm kombiniert, -gilt auch die Kombination insgesamt als eine veränderte Version des Programms, -es sei denn, das andere Programm ist formal und inhaltlich eigenständig. Ein -anderes Programm ist dann als eigenständig anzusehen, wenn es die folgenden -Voraussetzungen alle erfüllt: - -1. Der Source Code der kombinierten Programme muss jeweils in eigenen Dateien -vorhanden sein, die keine Bestandteile des anderen Teils enthalten, die über -die zur Programmkombination üblichen und erforderlichen Informationen über -den anderen Teil hinausgehen, wobei der Source Code des anderen Programms -nicht mitgeliefert werden muss. - -2. Der mit dem Programm kombinierte Teil muss auch dann sinnvoll nutzbar sein, -wenn er nicht mit dem Programm kombiniert wird, und zwar entweder alleine -oder mit sonstigen Programmen. Was als "sinnvoll nutzbar" anzusehen ist, richtet -sich nach der Auffassung der betroffenen Fachkreise. Zu den betroffenen Fachkreisen -gehören alle Personen, die das Programm oder Programme mit vergleichbarer -Funktionalität entwickeln, benutzen, verbreiten oder öffentlich zugänglich -machen. - -(3) Wenn Sie das Programm oder einen Teil hiervon - verändert oder unverändert -- zusammen mit einem anderen Programm verbreiten oder öffentlich zugänglich -machen, das unter der GNU General Public License (GPL) lizenziert wird, darf -das Programm auch unter den Bedingungen der GPL genutzt werden, sofern es -mit dem anderen Programm ein "derivative work" im Sinne der GPL bildet. Dabei -sollen die Hinweise auf diese Lizenz entfernt und durch einen Hinweis auf -die GPL ersetzt werden. Ob bei der Zusammenstellung ein "derivate work" im -Sinne der GPL entsteht, beurteilt sich nach Ziffer 2 b) der GPL. Diese Bestimmung -lautet: "You must cause any work that you distribute or publish, that in whole -or in part contains or is derived from the Program or any part thereof, to -be licensed as a whole at no charge to all third parties under the terms of -this License." Die GPL kann abgerufen werden unter http://www.fsf.org/licenses/gpl. - -(4) Wenn Sie das Programm in einer veränderten Form verbreiten oder öffentlich -zugänglich machen, müssen Sie im Source Code einen Hinweis mit den Änderungen -aufnehmen und mit dem Datum der Änderung versehen. Der Hinweis muss erkennen -lassen, welche Änderungen vorgenommen wurden und bestehende Vermerke, die -über die Urheber des Programms Auskunft geben, übernehmen. Dies gilt unabhängig -davon, ob Sie einen eigenen Urhebervermerk hinzufügen. Anstelle eines Hinweises -im Source Code können Sie auch ein Versionskontrollsystem verwenden oder weiterführen, -sofern dieses mitverbreitet wird oder öffentlich zugänglich ist. - -(5) Sie dürfen von Dritten für die Einräumung eines einfachen Nutzungsrechts -an veränderten Versionen des Programms kein Entgelt verlangen. - -(6) Wenn Sie an der veränderten Version des Programms ein anderes Schutzrecht -als ein Urheberrecht erwerben, insbesondere ein Patent oder Gebrauchsmuster, -lizenzieren Sie dieses Schutzrecht für veränderte und unveränderte Versionen -des Programms in dem Umfang, der erforderlich ist, um die Rechte aus dieser -Lizenz wahrnehmen zu können. - - - - § 4 Weitere Pflichten beim Vertrieb im Object Code - -(1) Wenn Sie das Programm nur im Object Code verbreiten, dann müssen Sie zusätzlich -zu den in § 2 und § 3 geregelten Pflichten entweder - -1. den vollständigen Source Code im Internet öffentlich zugänglich machen -und bei der Verbreitung des Object Codes deutlich auf die vollständige Internetadresse -hinweisen, unter der der Source Code abgerufen werden kann oder - -2. den vollständigen Source Code auf einem hierfür üblichen Datenträger unter -Beachtung der §§ 2 und 3 mitverbreiten. - -(2) Wenn Sie das Programm im Object Code öffentlich zugänglich machen, dann -müssen Sie zusätzlich zu den in § 2 und § 3 geregelten Pflichten den vollständigen -Source Code im Internet öffentlich zugänglich machen und dabei deutlich auf -die vollständige Internetadresse hinweisen. - -(3) Sofern Sie mit dem Programm eine Dokumentation erhalten haben, muss diese -Dokumentation entsprechend der Absätze 1 und 2 mitgeliefert werden, es sei -denn, die freie Mitlieferung der Dokumentation ist Ihnen aufgrund der Lizenz -für die Dokumentation nicht gestattet. - - - - § 5 Vertragsschluss - -(1) Mit dieser Lizenz wird Ihnen und jeder anderen Person ein Angebot auf -Abschluss eines Vertrages über die Nutzung des Programms unter den Bedingungen -der Deutschen Freien Softwarelizenz unterbreitet. - -(2) Sie dürfen das Programm nach den jeweils anwendbaren gesetzlichen Vorschriften -bestimmungsgemäß benutzen, ohne dass es der Annahme dieser Lizenz bedarf. -Dieses Recht umfasst in der Europäischen Union und in den meisten anderen -Rechtsordnungen insbesondere die folgenden Befugnisse: - -1. das Programm ablaufen zu lassen sowie die Erstellung von hierfür erforderlichen -Vervielfältigungen im Haupt- und Arbeitsspeicher; - - 2. das Erstellen einer Sicherungskopie; - - 3. die Fehlerberichtigung; +(1) Mit dieser Lizenz wird Ihnen und jeder anderen Person ein Angebot auf Abschluss eines Vertrages über die Nutzung des Programms unter den Bedingungen der Deutschen Freien Softwarelizenz unterbreitet. +(2) Sie dürfen das Programm nach den jeweils anwendbaren gesetzlichen Vorschriften bestimmungsgemäß benutzen, ohne dass es der Annahme dieser Lizenz bedarf. Dieses Recht umfasst in der Europäischen Union und in den meisten anderen Rechtsordnungen insbesondere die folgenden Befugnisse: +1. das Programm ablaufen zu lassen sowie die Erstellung von hierfür erforderlichen Vervielfältigungen im Haupt- und Arbeitsspeicher; +2. das Erstellen einer Sicherungskopie; +3. die Fehlerberichtigung; 4. die Weitergabe einer rechtmäßig erworbenen körperlichen Kopie des Programms. -(3) Sie erklären Ihre Zustimmung zum Abschluss dieser Lizenz, indem Sie das -Programm verbreiten, öffentlich zugänglich machen, verändern oder in einer -Weise vervielfältigen, die über die bestimmungsgemäße Nutzung im Sinne von -Absatz 2 hinausgeht. Ab diesem Zeitpunkt ist diese Lizenz als rechtlich verbindlicher -Vertrag zwischen den Rechtsinhabern und Ihnen geschlossen, ohne dass es eines -Zugangs der Annahmeerklärung bei den Rechtsinhabern bedarf. +(3) Sie erklären Ihre Zustimmung zum Abschluss dieser Lizenz, indem Sie das Programm verbreiten, öffentlich zugänglich machen, verändern oder in einer Weise vervielfältigen, die über die bestimmungsgemäße Nutzung im Sinne von Absatz 2 hinausgeht. Ab diesem Zeitpunkt ist diese Lizenz als rechtlich verbindlicher Vertrag zwischen den Rechtsinhabern und Ihnen geschlossen, ohne dass es eines Zugangs der Annahmeerklärung bei den Rechtsinhabern bedarf. -(4) Sie und jeder andere Lizenznehmer erhalten die Rechte aus dieser Lizenz -direkt von den Rechtsinhabern. Eine Unterlizenzierung oder Übertragung der -Rechte ist nicht gestattet. +(4) Sie und jeder andere Lizenznehmer erhalten die Rechte aus dieser Lizenz direkt von den Rechtsinhabern. Eine Unterlizenzierung oder Übertragung der Rechte ist nicht gestattet. - +§ 6 Beendigung der Rechte bei Zuwiderhandlung - § 6 Beendigung der Rechte bei Zuwiderhandlung +(1) Jede Verletzung Ihrer Verpflichtungen aus dieser Lizenz führt zu einer automatischen Beendigung Ihrer Rechte aus dieser Lizenz. -(1) Jede Verletzung Ihrer Verpflichtungen aus dieser Lizenz führt zu einer -automatischen Beendigung Ihrer Rechte aus dieser Lizenz. +(2) Die Rechte Dritter, die das Programm oder Rechte an dem Programm von Ihnen erhalten haben, bleiben hiervon unberührt. -(2) Die Rechte Dritter, die das Programm oder Rechte an dem Programm von Ihnen -erhalten haben, bleiben hiervon unberührt. +§ 7 Haftung und Gewährleistung - +(1) Für entgegenstehende Rechte Dritter haften die Rechtsinhaber nur, sofern sie Kenntnis von diesen Rechten hatten, ohne Sie zu informieren. - § 7 Haftung und Gewährleistung +(2) Die Haftung für Fehler und sonstige Mängel des Programms richtet sich nach den außerhalb dieser Lizenz getroffenen Vereinbarungen zwischen Ihnen und den Rechtsinhabern oder, wenn eine solche Vereinbarung nicht existiert, nach den gesetzlichen Regelungen. -(1) Für entgegenstehende Rechte Dritter haften die Rechtsinhaber nur, sofern -sie Kenntnis von diesen Rechten hatten, ohne Sie zu informieren. +§ 8 Verträge mit Dritten -(2) Die Haftung für Fehler und sonstige Mängel des Programms richtet sich -nach den außerhalb dieser Lizenz getroffenen Vereinbarungen zwischen Ihnen -und den Rechtsinhabern oder, wenn eine solche Vereinbarung nicht existiert, -nach den gesetzlichen Regelungen. +(1) Diese Lizenz regelt nur die Beziehung zwischen Ihnen und den Rechtsinhabern. Sie ist nicht Bestandteil der Verträge zwischen Ihnen und Dritten. - +(2) Die Lizenz beschränkt Sie nicht in der Freiheit, mit Dritten, die von Ihnen Kopien des Programms erhalten oder Leistungen in Anspruch nehmen, die im Zusammenhang mit dem Programm stehen, Verträge beliebigen Inhalts zu schließen, sofern Sie dabei Ihren Verpflichtungen aus dieser Lizenz nachkommen und die Rechte der Dritten aus dieser Lizenz nicht beeinträchtigt werden. Insbesondere dürfen Sie für die Überlassung des Programms oder sonstige Leistungen ein Entgelt verlangen. - § 8 Verträge mit Dritten +(3) Diese Lizenz verpflichtet Sie nicht, das Programm an Dritte weiterzugeben. Es steht Ihnen frei zu entscheiden, wem Sie das Programm zugänglich machen. Sie dürfen aber die weitere Nutzung durch Dritte nicht durch den Einsatz technischer Schutzmaßnahmen, insbesondere durch den Einsatz von Kopierschutzvorrichtungen jeglicher Art, verhindern oder erschweren. Eine passwortgeschützte Zugangsbeschränkung oder die Nutzung in einem Intranet wird nicht als technische Schutzmaßnahme angesehen. -(1) Diese Lizenz regelt nur die Beziehung zwischen Ihnen und den Rechtsinhabern. -Sie ist nicht Bestandteil der Verträge zwischen Ihnen und Dritten. +§ 9 Text der Lizenz -(2) Die Lizenz beschränkt Sie nicht in der Freiheit, mit Dritten, die von -Ihnen Kopien des Programms erhalten oder Leistungen in Anspruch nehmen, die -im Zusammenhang mit dem Programm stehen, Verträge beliebigen Inhalts zu schließen, -sofern Sie dabei Ihren Verpflichtungen aus dieser Lizenz nachkommen und die -Rechte der Dritten aus dieser Lizenz nicht beeinträchtigt werden. Insbesondere -dürfen Sie für die Überlassung des Programms oder sonstige Leistungen ein -Entgelt verlangen. +(1) Diese Lizenz ist in deutscher und englischer Sprache abgefasst. Beide Fassungen sind gleich verbindlich. Es wird unterstellt, dass die in der Lizenz verwandten Begriffe in beiden Fassungen dieselbe Bedeutung haben. Ergeben sich dennoch Unterschiede, so ist die Bedeutung maßgeblich, welche die Fassungen unter Berücksichtigung des Ziels und Zwecks der Lizenz am besten miteinander in Einklang bringt. -(3) Diese Lizenz verpflichtet Sie nicht, das Programm an Dritte weiterzugeben. -Es steht Ihnen frei zu entscheiden, wem Sie das Programm zugänglich machen. -Sie dürfen aber die weitere Nutzung durch Dritte nicht durch den Einsatz technischer -Schutzmaßnahmen, insbesondere durch den Einsatz von Kopierschutzvorrichtungen -jeglicher Art, verhindern oder erschweren. Eine passwortgeschützte Zugangsbeschränkung -oder die Nutzung in einem Intranet wird nicht als technische Schutzmaßnahme -angesehen. +(2) Der Lizenzrat der Deutschen Freien Software Lizenz kann mit verbindlicher Wirkung neue Versionen der Lizenz in Kraft setzen, soweit dies erforderlich und zumutbar ist. Neue Versionen der Lizenz werden auf der Internetseite http://www.d-fsl.de mit einer eindeutigen Versionsnummer veröffentlicht. Die neue Version der Lizenz erlangt für Sie verbindliche Wirkung, wenn Sie von deren Veröffentlichung Kenntnis genommen haben. Gesetzliche Rechtsbehelfe gegen die Änderung der Lizenz werden durch die vorstehenden Bestimmungen nicht beschränkt. - +(3) Sie dürfen diese Lizenz in unveränderter Form vervielfältigen, verbreiten und öffentlich zugänglich machen. - § 9 Text der Lizenz +§ 10 Anwendbares Recht -(1) Diese Lizenz ist in deutscher und englischer Sprache abgefasst. Beide -Fassungen sind gleich verbindlich. Es wird unterstellt, dass die in der Lizenz -verwandten Begriffe in beiden Fassungen dieselbe Bedeutung haben. Ergeben -sich dennoch Unterschiede, so ist die Bedeutung maßgeblich, welche die Fassungen -unter Berücksichtigung des Ziels und Zwecks der Lizenz am besten miteinander -in Einklang bringt. +Auf diese Lizenz findet deutsches Recht Anwendung. -(2) Der Lizenzrat der Deutschen Freien Software Lizenz kann mit verbindlicher -Wirkung neue Versionen der Lizenz in Kraft setzen, soweit dies erforderlich -und zumutbar ist. Neue Versionen der Lizenz werden auf der Internetseite http://www.d-fsl.de -mit einer eindeutigen Versionsnummer veröffentlicht. Die neue Version der -Lizenz erlangt für Sie verbindliche Wirkung, wenn Sie von deren Veröffentlichung -Kenntnis genommen haben. Gesetzliche Rechtsbehelfe gegen die Änderung der -Lizenz werden durch die vorstehenden Bestimmungen nicht beschränkt. - -(3) Sie dürfen diese Lizenz in unveränderter Form vervielfältigen, verbreiten -und öffentlich zugänglich machen. - - - - § 10 Anwendbares Recht - - Auf diese Lizenz findet deutsches Recht Anwendung. Anhang: Wie unterstellen Sie ein Programm der Deutschen Freien Software Lizenz? +Um jedermann den Abschluss dieser Lizenz zu ermöglichen, wird empfohlen, das Programm mit folgendem Hinweis auf die Lizenz zu versehen: -Um jedermann den Abschluss dieser Lizenz zu ermöglichen, wird empfohlen, das -Programm mit folgendem Hinweis auf die Lizenz zu versehen: +"Copyright (C) 20[jj] [Name des Rechtsinhabers]. - "Copyright (C) 20[jj] [Name des Rechtsinhabers]. +Dieses Programm kann durch jedermann gemäß den Bestimmungen der Deutschen Freien Software Lizenz genutzt werden. -Dieses Programm kann durch jedermann gemäß den Bestimmungen der Deutschen -Freien Software Lizenz genutzt werden. - - Die Lizenz kann unter http://www.d-fsl.de abgerufen werden." +Die Lizenz kann unter http://www.d-fsl.de abgerufen werden." diff --git a/options/license/DOC b/options/license/DOC index 410609e4c..07a684f0d 100644 --- a/options/license/DOC +++ b/options/license/DOC @@ -1,71 +1,15 @@ -Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), -and CoSMIC(TM) +Copyright and Licensing Information for ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), and CoSMIC(TM) -ACE(TM), TAO(TM), CIAO(TM), DAnCE>(TM), and CoSMIC(TM) (henceforth referred -to as "DOC software") are copyrighted by Douglas C. Schmidt and his research -group at Washington University, University of California, Irvine, and Vanderbilt -University, Copyright (c) 1993-2009, all rights reserved. Since DOC software -is open-source, freely available software, you are free to use, modify, copy, -and distribute--perpetually and irrevocably--the DOC software source code -and object code produced from the source, as well as copy and distribute modified -versions of this software. You must, however, include this copyright statement -along with any code built using DOC software that you release. No copyright -statement needs to be provided if you just ship binary executables of your -software products. +ACE(TM), TAO(TM), CIAO(TM), DAnCE>(TM), and CoSMIC(TM) (henceforth referred to as "DOC software") are copyrighted by Douglas C. Schmidt and his research group at Washington University, University of California, Irvine, and Vanderbilt University, Copyright (c) 1993-2009, all rights reserved. Since DOC software is open-source, freely available software, you are free to use, modify, copy, and distribute--perpetually and irrevocably--the DOC software source code and object code produced from the source, as well as copy and distribute modified versions of this software. You must, however, include this copyright statement along with any code built using DOC software that you release. No copyright statement needs to be provided if you just ship binary executables of your software products. -You can use DOC software in commercial and/or binary software releases and -are under no obligation to redistribute any of your source code that is built -using DOC software. Note, however, that you may not misappropriate the DOC -software code, such as copyrighting it yourself or claiming authorship of -the DOC software code, in a way that will prevent DOC software from being -distributed freely using an open-source development model. You needn't inform -anyone that you're using DOC software in your software, though we encourage -you to let us know so we can promote your project in the DOC software success -stories. +You can use DOC software in commercial and/or binary software releases and are under no obligation to redistribute any of your source code that is built using DOC software. Note, however, that you may not misappropriate the DOC software code, such as copyrighting it yourself or claiming authorship of the DOC software code, in a way that will prevent DOC software from being distributed freely using an open-source development model. You needn't inform anyone that you're using DOC software in your software, though we encourage you to let us know so we can promote your project in the DOC software success stories. -The ACE, TAO, CIAO, DAnCE, and CoSMIC web sites are maintained by the DOC -Group at the Institute for Software Integrated Systems (ISIS) and the Center -for Distributed Object Computing of Washington University, St. Louis for the -development of open-source software as part of the open-source software community. -Submissions are provided by the submitter ``as is'' with no warranties whatsoever, -including any warranty of merchantability, noninfringement of third party -intellectual property, or fitness for any particular purpose. In no event -shall the submitter be liable for any direct, indirect, special, exemplary, -punitive, or consequential damages, including without limitation, lost profits, -even if advised of the possibility of such damages. Likewise, DOC software -is provided as is with no warranties of any kind, including the warranties -of design, merchantability, and fitness for a particular purpose, noninfringement, -or arising from a course of dealing, usage or trade practice. Washington University, -UC Irvine, Vanderbilt University, their employees, and students shall have -no liability with respect to the infringement of copyrights, trade secrets -or any patents by DOC software or any part thereof. Moreover, in no event -will Washington University, UC Irvine, or Vanderbilt University, their employees, -or students be liable for any lost revenue or profits or other special, indirect -and consequential damages. +The ACE, TAO, CIAO, DAnCE, and CoSMIC web sites are maintained by the DOC Group at the Institute for Software Integrated Systems (ISIS) and the Center for Distributed Object Computing of Washington University, St. Louis for the development of open-source software as part of the open-source software community. Submissions are provided by the submitter ``as is'' with no warranties whatsoever, including any warranty of merchantability, noninfringement of third party intellectual property, or fitness for any particular purpose. In no event shall the submitter be liable for any direct, indirect, special, exemplary, punitive, or consequential damages, including without limitation, lost profits, even if advised of the possibility of such damages. Likewise, DOC software is provided as is with no warranties of any kind, including the warranties of design, merchantability, and fitness for a particular purpose, noninfringement, or arising from a course of dealing, usage or trade practice. Washington University, UC Irvine, Vanderbilt University, their employees, and students shall have no liability with respect to the infringement of copyrights, trade secrets or any patents by DOC software or any part thereof. Moreover, in no event will Washington University, UC Irvine, or Vanderbilt University, their employees, or students be liable for any lost revenue or profits or other special, indirect and consequential damages. -DOC software is provided with no support and without any obligation on the -part of Washington University, UC Irvine, Vanderbilt University, their employees, -or students to assist in its use, correction, modification, or enhancement. -A number of companies around the world provide commercial support for DOC -software, however. DOC software is Y2K-compliant, as long as the underlying -OS platform is Y2K-compliant. Likewise, DOC software is compliant with the -new US daylight savings rule passed by Congress as "The Energy Policy Act -of 2005," which established new daylight savings times (DST) rules for the -United States that expand DST as of March 2007. Since DOC software obtains -time/date and calendaring information from operating systems users will not -be affected by the new DST rules as long as they upgrade their operating systems -accordingly. +DOC software is provided with no support and without any obligation on the part of Washington University, UC Irvine, Vanderbilt University, their employees, or students to assist in its use, correction, modification, or enhancement. A number of companies around the world provide commercial support for DOC software, however. DOC software is Y2K-compliant, as long as the underlying OS platform is Y2K-compliant. Likewise, DOC software is compliant with the new US daylight savings rule passed by Congress as "The Energy Policy Act of 2005," which established new daylight savings times (DST) rules for the United States that expand DST as of March 2007. Since DOC software obtains time/date and calendaring information from operating systems users will not be affected by the new DST rules as long as they upgrade their operating systems accordingly. -The names ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), CoSMIC(TM), Washington University, -UC Irvine, and Vanderbilt University, may not be used to endorse or promote -products or services derived from this source without express written permission -from Washington University, UC Irvine, or Vanderbilt University. This license -grants no permission to call products or services derived from this source -ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), or CoSMIC(TM), nor does it grant permission -for the name Washington University, UC Irvine, or Vanderbilt University to -appear in their names. +The names ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), CoSMIC(TM), Washington University, UC Irvine, and Vanderbilt University, may not be used to endorse or promote products or services derived from this source without express written permission from Washington University, UC Irvine, or Vanderbilt University. This license grants no permission to call products or services derived from this source ACE(TM), TAO(TM), CIAO(TM), DAnCE(TM), or CoSMIC(TM), nor does it grant permission for the name Washington University, UC Irvine, or Vanderbilt University to appear in their names. -If you have any suggestions, additions, comments, or questions, please let -me know. +If you have any suggestions, additions, comments, or questions, please let me know. Douglas C. Schmidt diff --git a/options/license/DRL-1.0 b/options/license/DRL-1.0 new file mode 100644 index 000000000..8bcb7148c --- /dev/null +++ b/options/license/DRL-1.0 @@ -0,0 +1,12 @@ +Detection Rule License (DRL) 1.0 +Permission is hereby granted, free of charge, to any person obtaining a copy of this rule set and associated documentation files (the "Rules"), to deal in the Rules without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Rules, and to permit persons to whom the Rules are furnished to do so, subject to the following conditions: + +If you share the Rules (including in modified form), you must retain the following if it is supplied within the Rules: + +identification of the authors(s) ("author" field) of the Rule and any others designated to receive attribution, in any reasonable manner requested by the Rule author (including by pseudonym if designated). + +a URI or hyperlink to the Rule set or explicit Rule to the extent reasonably practicable + +indicate the Rules are licensed under this Detection Rule License, and include the text of, or the URI or hyperlink to, this Detection Rule License to the extent reasonably practicable + +THE RULES ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE RULES OR THE USE OR OTHER DEALINGS IN THE RULES. diff --git a/options/license/DSDP b/options/license/DSDP index e79066682..1c4d42f4b 100644 --- a/options/license/DSDP +++ b/options/license/DSDP @@ -1,41 +1,18 @@ -COPYRIGHT NOTIFICATION (C) COPYRIGHT 2004 UNIVERSITY OF CHICAGO +COPYRIGHT NOTIFICATION -This program discloses material protectable under copyright laws of the United -States. Permission to copy and modify this software and its documentation -is hereby granted, provided that this notice is retained thereon and on all -copies or modifications. The University of Chicago makes no representations -as to the suitability and operability of this software for any purpose. It -is provided "as is"; without express or implied warranty. Permission is hereby -granted to use, reproduce, prepare derivative works, and to redistribute to -others, so long as this original copyright notice is retained. Any publication -resulting from research that made use of this software should cite this document. +(C) COPYRIGHT 2004 UNIVERSITY OF CHICAGO -This software was authored by: +This program discloses material protectable under copyright laws of the United States. Permission to copy and modify this software and its documentation is hereby granted, provided that this notice is retained thereon and on all copies or modifications. The University of Chicago makes no representations as to the suitability and operability of this software for any purpose. It is provided "as is"; without express or implied warranty. Permission is hereby granted to use, reproduce, prepare derivative works, and to redistribute to others, so long as this original copyright notice is retained. Any publication resulting from research that made use of this software should cite this document. -Steven J. Benson Mathematics and Computer Science Division Argonne National -Laboratory Argonne IL 60439 + This software was authored by: -Yinyu Ye Department of Management Science and Engineering Stanford University -Stanford, CA U.S.A + Steven J. Benson Mathematics and Computer Science Division Argonne National Laboratory Argonne IL 60439 -Any questions or comments on the software may be directed to benson@mcs.anl.gov -or yinyu-ye@stanford.edu + Yinyu Ye Department of Management Science and Engineering Stanford University Stanford, CA U.S.A -Argonne National Laboratory with facilities in the states of Illinois and -Idaho, is owned by The United States Government, and operated by the University -of Chicago under provision of a contract with the Department of Energy. + Any questions or comments on the software may be directed to benson@mcs.anl.gov or yinyu-ye@stanford.edu + +Argonne National Laboratory with facilities in the states of Illinois and Idaho, is owned by The United States Government, and operated by the University of Chicago under provision of a contract with the Department of Energy. DISCLAIMER - -THIS PROGRAM WAS PREPARED AS AN ACCOUNT OF WORK SPONSORED BY AN AGENCY OF -THE UNITED STATES GOVERNMENT. NEITHER THE UNITED STATES GOVERNMENT NOR ANY -AGENCY THEREOF, NOR THE UNIVERSITY OF CHICAGO, NOR ANY OF THEIR EMPLOYEES -OR OFFICERS, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL -LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS -OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS -THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. REFERENCE HEREIN TO -ANY SPECIFIC COMMERCIAL PRODUCT, PROCESS, OR SERVICE BY TRADE NAME, TRADEMARK, -MANUFACTURER, OR OTHERWISE, DOES NOT NECESSARILY CONSTITUTE OR IMPLY ITS ENDORSEMENT, -RECOMMENDATION, OR FAVORING BY THE UNITED STATES GOVERNMENT OR ANY AGENCY -THEREOF. THE VIEW AND OPINIONS OF AUTHORS EXPRESSED HEREIN DO NOT NECESSARILY -STATE OR REFLECT THOSE OF THE UNITED STATES GOVERNMENT OR ANY AGENCY THEREOF. +THIS PROGRAM WAS PREPARED AS AN ACCOUNT OF WORK SPONSORED BY AN AGENCY OF THE UNITED STATES GOVERNMENT. NEITHER THE UNITED STATES GOVERNMENT NOR ANY AGENCY THEREOF, NOR THE UNIVERSITY OF CHICAGO, NOR ANY OF THEIR EMPLOYEES OR OFFICERS, MAKES ANY WARRANTY, EXPRESS OR IMPLIED, OR ASSUMES ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF ANY INFORMATION, APPARATUS, PRODUCT, OR PROCESS DISCLOSED, OR REPRESENTS THAT ITS USE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS. REFERENCE HEREIN TO ANY SPECIFIC COMMERCIAL PRODUCT, PROCESS, OR SERVICE BY TRADE NAME, TRADEMARK, MANUFACTURER, OR OTHERWISE, DOES NOT NECESSARILY CONSTITUTE OR IMPLY ITS ENDORSEMENT, RECOMMENDATION, OR FAVORING BY THE UNITED STATES GOVERNMENT OR ANY AGENCY THEREOF. THE VIEW AND OPINIONS OF AUTHORS EXPRESSED HEREIN DO NOT NECESSARILY STATE OR REFLECT THOSE OF THE UNITED STATES GOVERNMENT OR ANY AGENCY THEREOF. diff --git a/options/license/DigiRule-FOSS-exception b/options/license/DigiRule-FOSS-exception index 892c23715..2fa106b38 100644 --- a/options/license/DigiRule-FOSS-exception +++ b/options/license/DigiRule-FOSS-exception @@ -1,79 +1,54 @@ -DigiRule Solutions's FOSS License Exception Terms and Conditions +DigiRule Solutions’s FOSS License Exception Terms and Conditions - 1. Definitions. +1. Definitions. - "Derivative Work" means a derivative work, as defined under applicable copyright law, formed entirely from the Program and one or more FOSS Applications. +“Derivative Work” means a derivative work, as defined under applicable copyright law, formed entirely from the Program and one or more FOSS Applications. - "FOSS Application" means a free and open source software application distributed subject to a license listed in the section below titled "FOSS License List." +“FOSS Application” means a free and open source software application distributed subject to a license listed in the section below titled “FOSS License List.” - "FOSS Notice" means a notice placed by DigiRule Solutions in a copy of the Client Libraries stating that such copy of the Client Libraries may be distributed under DigiRule Solutions's or FOSS License Exception. +“FOSS Notice” means a notice placed by DigiRule Solutions in a copy of the Client Libraries stating that such copy of the Client Libraries may be distributed under DigiRule Solutions's or FOSS License Exception. - "Independent Work" means portions of the Derivative Work that are not derived from the Program and can reasonably be considered independent and separate works. +“Independent Work” means portions of the Derivative Work that are not derived from the Program and can reasonably be considered independent and separate works. - "Program" means a copy of DigiRule Solutions's Client Libraries that contain a FOSS Notice. +“Program” means a copy of DigiRule Solutions’s Client Libraries that contain a FOSS Notice. - 2. A FOSS application developer ("you" or "your") may distribute a Derivative Work provided that you and the Derivative Work meet all of the following conditions: +2. A FOSS application developer (“you” or “your”) may distribute a Derivative Work provided that you and the Derivative Work meet all of the following conditions: - 1. You obey the GPL in all respects for the Program and all portions (including modifications) of the Program included in the Derivative Work (provided that this condition does not apply to Independent Works); + 1. You obey the GPL in all respects for the Program and all portions (including modifications) of the Program included in the Derivative Work (provided that this condition does not apply to Independent Works); - 2. The Derivative Work does not include any work licensed under the GPL other than the Program; + 2. The Derivative Work does not include any work licensed under the GPL other than the Program; - 3. You distribute Independent Works subject to a license listed in the section below titled "FOSS License List"; + 3. You distribute Independent Works subject to a license listed in the section below titled “FOSS License List”; - 4. You distribute Independent Works in object code or executable form with the complete corresponding machine-readable source code on the same medium and under the same FOSS license applying to the object code or executable forms; + 4. You distribute Independent Works in object code or executable form with the complete corresponding machine-readable source code on the same medium and under the same FOSS license applying to the object code or executable forms; - 5. All works that are aggregated with the Program or the Derivative Work on a medium or volume of storage are not derivative works of the Program, Derivative Work or FOSS Application, and must reasonably be considered independent and separate works. + 5. All works that are aggregated with the Program or the Derivative Work on a medium or volume of storage are not derivative works of the Program, Derivative Work or FOSS Application, and must reasonably be considered independent and separate works. - 3. DigiRule Solutions reserves all rights not expressly granted in these terms and conditions. If all of the above conditions are not met, then this FOSS License Exception does not apply to you or your Derivative Work. +3. DigiRule Solutions reserves all rights not expressly granted in these terms and conditions. If all of the above conditions are not met, then this FOSS License Exception does not apply to you or your Derivative Work. FOSS License List - License Name Version(s)/Copyright Date - Release Early Certified Software - Academic Free License 2.0 - Apache Software License 1.0/1.1/2.0 - Apple Public Source License 2.0 - Artistic license From Perl 5.8.0 - -BSD license "July 22 1999" - +BSD license “July 22 1999” Common Development and Distribution License (CDDL) 1.0 - Common Public License 1.0 - Eclipse Public License 1.0 - -GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1/3.0 - +GNU Library or “Lesser” General Public License (LGPL) 2.0/2.1/3.0 Jabber Open Source License 1.0 - MIT License (As listed in file MIT-License.txt) - - Mozilla Public License (MPL) 1.0/1.1 - Open Software License 2.0 - -OpenSSL license (with original SSLeay license) "2003" ("1998") - +OpenSSL license (with original SSLeay license) “2003” (“1998”) PHP License 3.0/3.01 - Python license (CNRI Python License) - - Python Software Foundation License 2.1.1 - -Sleepycat License "1999" - +Sleepycat License “1999” University of Illinois/NCSA Open Source License - - -W3C License "2001" - -X11 License "2001" - +W3C License “2001” +X11 License “2001” Zlib/libpng License - - Zope Public License 2.0 diff --git a/options/license/Dotseqn b/options/license/Dotseqn index 0a258b932..9833407c0 100644 --- a/options/license/Dotseqn +++ b/options/license/Dotseqn @@ -1,7 +1,5 @@ Copyright (C) 1995 by Donald Arseneau -This file may be freely transmitted and reproduced, but it may not be changed -unless the name is changed also (except that you may freely change the paper-size -option for \documentclass). +This file may be freely transmitted and reproduced, but it may not be changed unless the name is changed also (except that you may freely change the paper-size option for \documentclass). This notice must be left intact. diff --git a/options/license/ECL-1.0 b/options/license/ECL-1.0 index ed19a9bfb..08f1b6bd9 100644 --- a/options/license/ECL-1.0 +++ b/options/license/ECL-1.0 @@ -1,47 +1,23 @@ The Educational Community License -This Educational Community License (the "License") applies to any original -work of authorship (the "Original Work") whose owner (the "Licensor") has -placed the following notice immediately following the copyright notice for -the Original Work: +This Educational Community License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -Copyright (c) + Copyright (c) -Licensed under the Educational Community License version 1.0 + Licensed under the Educational Community License version 1.0 -This Original Work, including software, source code, documents, or other related -items, is being provided by the copyright holder(s) subject to the terms of -the Educational Community License. By obtaining, using and/or copying this -Original Work, you agree that you have read, understand, and will comply with -the following terms and conditions of the Educational Community License: +This Original Work, including software, source code, documents, or other related items, is being provided by the copyright holder(s) subject to the terms of the Educational Community License. By obtaining, using and/or copying this Original Work, you agree that you have read, understand, and will comply with the following terms and conditions of the Educational Community License: -Permission to use, copy, modify, merge, publish, distribute, and sublicense -this Original Work and its documentation, with or without modification, for -any purpose, and without fee or royalty to the copyright holder(s) is hereby -granted, provided that you include the following on ALL copies of the Original -Work or portions thereof, including modifications or derivatives, that you -make: +Permission to use, copy, modify, merge, publish, distribute, and sublicense this Original Work and its documentation, with or without modification, for any purpose, and without fee or royalty to the copyright holder(s) is hereby granted, provided that you include the following on ALL copies of the Original Work or portions thereof, including modifications or derivatives, that you make: -The full text of the Educational Community License in a location viewable -to users of the redistributed or derivative work. + The full text of the Educational Community License in a location viewable to users of the redistributed or derivative work. -Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. + Any pre-existing intellectual property disclaimers, notices, or terms and conditions. -Notice of any changes or modifications to the Original Work, including the -date the changes were made. + Notice of any changes or modifications to the Original Work, including the date the changes were made. -Any modifications of the Original Work must be distributed in such a manner -as to avoid any confusion with the Original Work of the copyright holders. + Any modifications of the Original Work must be distributed in such a manner as to avoid any confusion with the Original Work of the copyright holders. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -The name and trademarks of copyright holder(s) may NOT be used in advertising -or publicity pertaining to the Original or Derivative Works without specific, -written prior permission. Title to copyright in the Original Work and any -associated documentation will at all times remain with the copyright holders. +The name and trademarks of copyright holder(s) may NOT be used in advertising or publicity pertaining to the Original or Derivative Works without specific, written prior permission. Title to copyright in the Original Work and any associated documentation will at all times remain with the copyright holders. diff --git a/options/license/ECL-2.0 b/options/license/ECL-2.0 index c001fdad3..eb04ec414 100644 --- a/options/license/ECL-2.0 +++ b/options/license/ECL-2.0 @@ -1,239 +1,98 @@ Educational Community License +Version 2.0, April 2007 -Version 2.0, April 2007 http://www.osedu.org/licenses/ +http://www.osedu.org/licenses/ -The Educational Community License version 2.0 ("ECL") consists of the Apache -2.0 license, modified to change the scope of the patent grant in section 3 -to be specific to the needs of the education communities using this license. -The original Apache 2.0 license can be found at: http://www.apache.org/licenses/LICENSE-2.0 +The Educational Community License version 2.0 ("ECL") consists of the Apache 2.0 license, modified to change the scope of the patent grant in section 3 to be specific to the needs of the education communities using this license. The original Apache 2.0 license can be found at: http://www.apache.org/licenses/LICENSE-2.0 TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +1. Definitions. - +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"License" shall mean the terms and conditions for use, reproduction, and distribution -as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (ii) ownership of fifty percent (50%) or more -of the outstanding shares, or (iii) beneficial ownership of such entity. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions -granted by this License. +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - +2. Grant of Copyright License. -"Object" form shall mean any form resulting from mechanical transformation -or translation of a Source form, including but not limited to compiled object -code, generated documentation, and conversions to other media types. +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - +3. Grant of Patent License. -"Work" shall mean the work of authorship, whether in Source or Object form, -made available under the License, as indicated by a copyright notice that -is included in or attached to the work (an example is provided in the Appendix -below). +Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. Any patent license granted hereby with respect to contributions by an individual employed by an institution or organization is limited to patent claims where the individual that is the author of the Work is also the inventor of the patent claims licensed, and where the organization or institution has the right to grant such license under applicable grant and research funding agreements. No other express or implied licenses are granted. - +4. Redistribution. -"Derivative Works" shall mean any work, whether in Source or Object form, -that is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative -Works shall not include works that remain separable from, or merely link (or -bind by name) to the interfaces of, the Work and Derivative Works thereof. +You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - + a. You must give any other recipients of the Work or Derivative Works a copy of this License; and -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative -Works thereof, that is intentionally submitted to Licensor for inclusion in -the Work by the copyright owner or by an individual or Legal Entity authorized -to submit on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication -sent to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor -for the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." + b. You must cause any modified files to carry prominent notices stating that You changed the files; and - + c. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently incorporated -within the Work. + d. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - 2. Grant of Copyright License. +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable copyright license to reproduce, prepare Derivative Works of, publicly -display, publicly perform, sublicense, and distribute the Work and such Derivative -Works in Source or Object form. +5. Submission of Contributions. - 3. Grant of Patent License. +Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -Subject to the terms and conditions of this License, each Contributor hereby -grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, -irrevocable (except as stated in this section) patent license to make, have -made, use, offer to sell, sell, import, and otherwise transfer the Work, where -such license applies only to those patent claims licensable by such Contributor -that are necessarily infringed by their Contribution(s) alone or by combination -of their Contribution(s) with the Work to which such Contribution(s) was submitted. -If You institute patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated -within the Work constitutes direct or contributory patent infringement, then -any patent licenses granted to You under this License for that Work shall -terminate as of the date such litigation is filed. Any patent license granted -hereby with respect to contributions by an individual employed by an institution -or organization is limited to patent claims where the individual that is the -author of the Work is also the inventor of the patent claims licensed, and -where the organization or institution has the right to grant such license -under applicable grant and research funding agreements. No other express or -implied licenses are granted. +6. Trademarks. - 4. Redistribution. +This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -You may reproduce and distribute copies of the Work or Derivative Works thereof -in any medium, with or without modifications, and in Source or Object form, -provided that You meet the following conditions: +7. Disclaimer of Warranty. -a. You must give any other recipients of the Work or Derivative Works a copy -of this License; and +Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -b. You must cause any modified files to carry prominent notices stating that -You changed the files; and +8. Limitation of Liability. -c. You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source -form of the Work, excluding those notices that do not pertain to any part -of the Derivative Works; and +In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -d. If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part -of the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works -that You distribute, alongside or as an addendum to the NOTICE text from the -Work, provided that such additional attribution notices cannot be construed -as modifying the License. +9. Accepting Warranty or Additional Liability. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, -or distribution of Your modifications, or for any such Derivative Works as -a whole, provided Your use, reproduction, and distribution of the Work otherwise -complies with the conditions stated in this License. +While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - 5. Submission of Contributions. - -Unless You explicitly state otherwise, any Contribution intentionally submitted -for inclusion in the Work by You to the Licensor shall be under the terms -and conditions of this License, without any additional terms or conditions. -Notwithstanding the above, nothing herein shall supersede or modify the terms -of any separate license agreement you may have executed with Licensor regarding -such Contributions. - - 6. Trademarks. - -This License does not grant permission to use the trade names, trademarks, -service marks, or product names of the Licensor, except as required for reasonable -and customary use in describing the origin of the Work and reproducing the -content of the NOTICE file. - - 7. Disclaimer of Warranty. - -Unless required by applicable law or agreed to in writing, Licensor provides -the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, -without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, -MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible -for determining the appropriateness of using or redistributing the Work and -assume any risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. - -In no event and under no legal theory, whether in tort (including negligence), -contract, or otherwise, unless required by applicable law (such as deliberate -and grossly negligent acts) or agreed to in writing, shall any Contributor -be liable to You for damages, including any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or out of the use or inability to use the Work (including but not limited -to damages for loss of goodwill, work stoppage, computer failure or malfunction, -or any and all other commercial damages or losses), even if such Contributor -has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. - -While redistributing the Work or Derivative Works thereof, You may choose -to offer, and charge a fee for, acceptance of support, warranty, indemnity, -or other liability obligations and/or rights consistent with this License. -However, in accepting such obligations, You may act only on Your own behalf -and on Your sole responsibility, not on behalf of any other Contributor, and -only if You agree to indemnify, defend, and hold each Contributor harmless -for any liability incurred by, or claims asserted against, such Contributor -by reason of your accepting any such warranty or additional liability. END -OF TERMS AND CONDITIONS +END OF TERMS AND CONDITIONS APPENDIX: How to apply the Educational Community License to your work To apply the Educational Community License to your work, attach - the following boilerplate notice, with the fields enclosed by - brackets "[]" replaced with your own identifying information. - (Don't include the brackets!) The text should be enclosed in the - appropriate comment syntax for the file format. We also recommend - that a file or class name and description of purpose be included on - the same "printed page" as the copyright notice for easier - identification within third-party archives. -Copyright [yyyy] [name of copyright owner] Licensed under the + Copyright [yyyy] [name of copyright owner] Licensed under the + Educational Community License, Version 2.0 (the "License"); you may + not use this file except in compliance with the License. You may + obtain a copy of the License at -Educational Community License, Version 2.0 (the "License"); you may + http://www.osedu.org/licenses/ECL-2.0 -not use this file except in compliance with the License. You may - -obtain a copy of the License at - -http://www.osedu.org/licenses/ECL-2.0 - -Unless required by applicable law or agreed to in writing, - -software distributed under the License is distributed on an "AS IS" - -BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - -or implied. See the License for the specific language governing - -permissions and limitations under the License. + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an "AS IS" + BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + or implied. See the License for the specific language governing + permissions and limitations under the License. diff --git a/options/license/EFL-1.0 b/options/license/EFL-1.0 index 60da9c02f..278ab002d 100644 --- a/options/license/EFL-1.0 +++ b/options/license/EFL-1.0 @@ -1,22 +1,13 @@ Eiffel Forum License, version 1 -Permission is hereby granted to use, copy, modify and/or distribute this package, -provided that: +Permission is hereby granted to use, copy, modify and/or distribute this package, provided that: - - copyright notices are retained unchanged + - copyright notices are retained unchanged -- any distribution of this package, whether modified or not, includes this -file + - any distribution of this package, whether modified or not, includes this file -Permission is hereby also granted to distribute binary programs which depend -on this package, provided that: +Permission is hereby also granted to distribute binary programs which depend on this package, provided that: -- if the binary program depends on a modified version of this package, you -must publicly release the modified version of this package + - if the binary program depends on a modified version of this package, you must publicly release the modified version of this package -THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS -PACKAGE. +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS PACKAGE. diff --git a/options/license/EFL-2.0 b/options/license/EFL-2.0 index 71ba62622..c24132501 100644 --- a/options/license/EFL-2.0 +++ b/options/license/EFL-2.0 @@ -1,21 +1,9 @@ Eiffel Forum License, version 2 -1. Permission is hereby granted to use, copy, modify and/or distribute this -package, provided that: +1. Permission is hereby granted to use, copy, modify and/or distribute this package, provided that: + - copyright notices are retained unchanged, + - any distribution of this package, whether modified or not, includes this license text. - - copyright notices are retained unchanged, +2. Permission is hereby also granted to distribute binary programs which depend on this package. If the binary program depends on a modified version of this package, you are encouraged to publicly release the modified version of this package. -- any distribution of this package, whether modified or not, includes this -license text. - -2. Permission is hereby also granted to distribute binary programs which depend -on this package. If the binary program depends on a modified version of this -package, you are encouraged to publicly release the modified version of this -package. - -THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS -PACKAGE. +THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS PACKAGE. diff --git a/options/license/EPICS b/options/license/EPICS index 4a12fba43..f2f6b0e7a 100644 --- a/options/license/EPICS +++ b/options/license/EPICS @@ -1,8 +1,8 @@ EPICS Open License Terms -The following is the text of the EPICS Open software license agreement which -now applies to EPICS Base and many of the unbundled EPICS extensions and support -modules. Copyright © . All rights reserved. +The following is the text of the EPICS Open software license agreement which now applies to EPICS Base and many of the unbundled EPICS extensions and support modules. + +Copyright © . All rights reserved. is distributed subject to the following license conditions: @@ -10,60 +10,23 @@ SOFTWARE LICENSE AGREEMENT Software: -1. The "Software", below, refers to (in either source code, or binary -form and accompanying documentation). Each licensee is addressed as "you" -or "Licensee." +1. The "Software", below, refers to (in either source code, or binary form and accompanying documentation). Each licensee is addressed as "you" or "Licensee." -2. The copyright holders shown above and their third-party licensors hereby -grant Licensee a royalty-free nonexclusive license, subject to the limitations -stated herein and U.S. Government license rights. +2. The copyright holders shown above and their third-party licensors hereby grant Licensee a royalty-free nonexclusive license, subject to the limitations stated herein and U.S. Government license rights. -3. You may modify and make a copy or copies of the Software for use within -your organization, if you meet the following conditions: +3. You may modify and make a copy or copies of the Software for use within your organization, if you meet the following conditions: -a. Copies in source code must include the copyright notice and this Software -License Agreement. +a. Copies in source code must include the copyright notice and this Software License Agreement. +b. Copies in binary form must include the copyright notice and this Software License Agreement in the documentation and/or other materials provided with the copy. -b. Copies in binary form must include the copyright notice and this Software -License Agreement in the documentation and/or other materials provided with -the copy. +4. You may modify a copy or copies of the Software or any portion of it, thus forming a work based on the Software, and distribute copies of such work outside your organization, if you meet all of the following conditions: -4. You may modify a copy or copies of the Software or any portion of it, thus -forming a work based on the Software, and distribute copies of such work outside -your organization, if you meet all of the following conditions: +a. Copies in source code must include the copyright notice and this Software License Agreement; +b. Copies in binary form must include the copyright notice and this Software License Agreement in the documentation and/or other materials provided with the copy; +c. Modified copies and works based on the Software must carry prominent notices stating that you changed specified portions of the Software. -a. Copies in source code must include the copyright notice and this Software -License Agreement; +5. Portions of the Software resulted from work developed under a U.S. Government contract and are subject to the following license: the Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this computer software to reproduce, prepare derivative works, and perform publicly and display publicly. -b. Copies in binary form must include the copyright notice and this Software -License Agreement in the documentation and/or other materials provided with -the copy; +6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) DISCLAIM ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY OR RESPONSIBILITY FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE SOFTWARE, (3) DO NOT REPTHAT USE OF THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE OR THAT ANY ERRORS WILL BE CORRECTED. -c. Modified copies and works based on the Software must carry prominent notices -stating that you changed specified portions of the Software. - -5. Portions of the Software resulted from work developed under a U.S. Government -contract and are subject to the following license: the Government is granted -for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable -worldwide license in this computer software to reproduce, prepare derivative -works, and perform publicly and display publicly. - -6. WARRANTY DISCLAIMER. THE SOFTWARE IS SUPPLIED "AS IS" WITHOUT WARRANTY -OF ANY KIND. THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE UNITED -STATES, THE UNITED STATES DEPARTMENT OF ENERGY, AND THEIR EMPLOYEES: (1) DISCLAIM -ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY IMPLIED -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR -NON-INFRINGEMENT, (2) DO NOT ASSUME ANY LEGAL LIABILITY OR RESPONSIBILITY -FOR THE ACCURACY, COMPLETENESS, OR USEFULNESS OF THE SOFTWARE, (3) DO NOT -REPTHAT USE OF THE SOFTWARE WOULD NOT INFRINGE PRIVATELY OWNED RIGHTS, (4) -DO NOT WARRANT THAT THE SOFTWARE WILL FUNCTION UNINTERRUPTED, THAT IT IS ERROR-FREE -OR THAT ANY ERRORS WILL BE CORRECTED. - -7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR -THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF -ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, -SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED -TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER SUCH -LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE -OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED -OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES. +7. LIMITATION OF LIABILITY. IN NO EVENT WILL THE COPYRIGHT HOLDERS, THEIR THIRD PARTY LICENSORS, THE UNITED STATES, THE UNITED STATES DEPARTMENT OF ENERGY, OR THEIR EMPLOYEES: BE LIABLE FOR ANY INDIRECT, INCIDENTAL, CONSEQUENTIAL, SPECIAL OR PUNITIVE DAMAGES OF ANY KIND OR NATURE, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS OR LOSS OF DATA, FOR ANY REASON WHATSOEVER, WHETHER SUCH LIABILITY IS ASSERTED ON THE BASIS OF CONTRACT, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), OR OTHERWISE, EVEN IF ANY OF SAID PARTIES HAS BEEN WARNED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGES. diff --git a/options/license/EPL-1.0 b/options/license/EPL-1.0 index 6a200a1a1..70ed0f383 100644 --- a/options/license/EPL-1.0 +++ b/options/license/EPL-1.0 @@ -1,210 +1,73 @@ Eclipse Public License - v 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - 1. DEFINITIONS +1. DEFINITIONS - "Contribution" means: +"Contribution" means: + a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and + b) in the case of each subsequent Contributor: + i) changes to the Program, and + ii) additions to the Program; -a) in the case of the initial Contributor, the initial code and documentation -distributed under this Agreement, and +where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. +"Contributor" means any person or entity that distributes the Program. - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - -where such changes and/or additions to the Program originate from and are -distributed by that particular Contributor. A Contribution 'originates' from -a Contributor if it was added to the Program by such Contributor itself or -anyone acting on such Contributor's behalf. Contributions do not include additions -to the Program which: (i) are separate modules of software distributed in -conjunction with the Program under their own license agreement, and (ii) are -not derivative works of the Program. - - "Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. +"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. "Program" means the Contributions distributed in accordance with this Agreement. -"Recipient" means anyone who receives the Program under this Agreement, including -all Contributors. +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - 2. GRANT OF RIGHTS +2. GRANT OF RIGHTS -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, -prepare derivative works of, publicly display, publicly perform, distribute -and sublicense the Contribution of such Contributor, if any, and such derivative -works, in source code and object code form. + a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and -the Program if, at the time the Contribution is added by the Contributor, -such addition of the Contribution causes such combination to be covered by -the Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. + b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. -c) Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program. + c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth -in this Agreement. + d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - 3. REQUIREMENTS +3. REQUIREMENTS +A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that: -A Contributor may choose to distribute the Program in object code form under -its own license agreement, provided that: + a) it complies with the terms and conditions of this Agreement; and - a) it complies with the terms and conditions of this Agreement; and + b) its license agreement: + i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; + iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and + iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange. - b) its license agreement: +When the Program is made available in source code form: -i) effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; + a) it must be made available under this Agreement; and -ii) effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, -such as lost profits; + b) a copy of this Agreement must be included with each copy of the Program. +Contributors may not remove or alter any copyright notices contained within the Program. -iii) states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party; and +Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. -iv) states that source code for the Program is available from such Contributor, -and informs licensees how to obtain it in a reasonable manner on or through -a medium customarily used for software exchange. +4. COMMERCIAL DISTRIBUTION +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - When the Program is made available in source code form: +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. - a) it must be made available under this Agreement; and +5. NO WARRANTY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. -b) a copy of this Agreement must be included with each copy of the Program. +6. DISCLAIMER OF LIABILITY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -Contributors may not remove or alter any copyright notices contained within -the Program. +7. GENERAL -Each Contributor must identify itself as the originator of its Contribution, -if any, in a manner that reasonably allows subsequent Recipients to identify -the originator of the Contribution. +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - 4. COMMERCIAL DISTRIBUTION +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor -who includes the Program in a commercial product offering should do so in -a manner which does not create potential liability for other Contributors. -Therefore, if a Contributor includes the Program in a commercial product offering, -such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor -to the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense -and any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense. +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If -that Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such Commercial -Contributor's responsibility alone. Under this section, the Commercial Contributor -would have to defend claims against the other Contributors related to those -performance claims and warranties, and if a court requires any other Contributor -to pay any damages as a result, the Commercial Contributor must pay those -damages. +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. - 5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON -AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS -OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -Each Recipient is solely responsible for determining the appropriateness of -using and distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement, including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage -to or loss of data, programs or equipment, and unavailability or interruption -of operations. - - 6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this Agreement, and without further action by the parties hereto, -such provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) infringes -such Recipient's patent(s), then such Recipient's rights granted under Section -2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and -does not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as reasonably -practicable. However, Recipient's obligations under this Agreement and any -licenses granted by Recipient relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, but -in order to avoid inconsistency the Agreement is copyrighted and may only -be modified in the following manner. The Agreement Steward reserves the right -to publish new versions (including revisions) of this Agreement from time -to time. No one other than the Agreement Steward has the right to modify this -Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse -Foundation may assign the responsibility to serve as the Agreement Steward -to a suitable separate entity. Each new version of the Agreement will be given -a distinguishing version number. The Program (including Contributions) may -always be distributed subject to the version of the Agreement under which -it was received. In addition, after a new version of the Agreement is published, -Contributor may elect to distribute the Program (including its Contributions) -under the new version. Except as expressly stated in Sections 2(a) and 2(b) -above, Recipient receives no rights or licenses to the intellectual property -of any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted under -this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual -property laws of the United States of America. No party to this Agreement -will bring a legal action under this Agreement more than one year after the -cause of action arose. Each party waives its rights to a jury trial in any -resulting litigation. +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/options/license/EPL-2.0 b/options/license/EPL-2.0 index 795092b07..78756b5e9 100644 --- a/options/license/EPL-2.0 +++ b/options/license/EPL-2.0 @@ -1,258 +1,80 @@ Eclipse Public License - v 2.0 +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +1. DEFINITIONS +“Contribution” means: - 1. DEFINITIONS +a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and +b) in the case of each subsequent Contributor: +i) changes to the Program, and +ii) additions to the Program; +where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. +“Contributor” means any person or entity that Distributes the Program. - "Contribution" means: +“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. -a) in the case of the initial Contributor, the initial content Distributed -under this Agreement, and +“Program” means the Contributions Distributed in accordance with this Agreement. - b) in the case of each subsequent Contributor: +“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors. - i) changes to the Program, and +“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. - ii) additions to the Program; +“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. -where such changes and/or additions to the Program originate from and are -Distributed by that particular Contributor. A Contribution "originates" from -a Contributor if it was added to the Program by such Contributor itself or -anyone acting on such Contributor's behalf. Contributions do not include changes -or additions to the Program that are not Modified Works. +“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. - "Contributor" means any person or entity that Distributes the Program. +“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. +“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. -"Program" means the Contributions Distributed in accordance with this Agreement. +2. GRANT OF RIGHTS +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works. +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. +e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). +3. REQUIREMENTS +3.1 If a Contributor Distributes the Program in any form, then: -"Recipient" means anyone who receives the Program under this Agreement or -any Secondary License (as applicable), including Contributors. - -"Derivative Works" shall mean any work, whether in Source Code or other form, -that is based on (or derived from) the Program and for which the editorial -revisions, annotations, elaborations, or other modifications represent, as -a whole, an original work of authorship. - -"Modified Works" shall mean any work in Source Code or other form that results -from an addition to, deletion from, or modification of the contents of the -Program, including, for purposes of clarity any new file in Source Code form -that contains any contents of the Program. Modified Works shall not include -works that contain only declarations, interfaces, types, classes, structures, -or files of the Program solely in each case in order to link to, bind by name, -or subclass the Program or Modified Works thereof. - -"Distribute" means the acts of a) distributing or b) making available in any -manner that enables the transfer of a copy. - -"Source Code" means the form of a Program preferred for making modifications, -including but not limited to software source code, documentation source, and -configuration files. - -"Secondary License" means either the GNU General Public License, Version 2.0, -or any later versions of that license, including any exceptions or additional -permissions as identified by the initial Contributor. - - 2. GRANT OF RIGHTS - -a) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, -prepare Derivative Works of, publicly display, publicly perform, Distribute -and sublicense the Contribution of such Contributor, if any, and such Derivative -Works. - -b) Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in Source Code or other form. This -patent license shall apply to the combination of the Contribution and the -Program if, at the time the Contribution is added by the Contributor, such -addition of the Contribution causes such combination to be covered by the -Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. - -c) Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to Distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program. - -d) Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth -in this Agreement. - -e) Notwithstanding the terms of any Secondary License, no Contributor makes -additional grants to any Recipient (other than those set forth in this Agreement) -as a result of such Recipient's receipt of the Program under the terms of -a Secondary License (if permitted under the terms of Section 3). - - 3. REQUIREMENTS - - 3.1 If a Contributor Distributes the Program in any form, then: - -a) the Program must also be made available as Source Code, in accordance with -section 3.2, and the Contributor must accompany the Program with a statement -that the Source Code for the Program is available under this Agreement, and -informs Recipients how to obtain it in a reasonable manner on or through a -medium customarily used for software exchange; and - -b) the Contributor may Distribute the Program under a license different than -this Agreement, provided that such license: - -i) effectively disclaims on behalf of all other Contributors all warranties -and conditions, express and implied, including warranties or conditions of -title and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - -ii) effectively excludes on behalf of all other Contributors all liability -for damages, including direct, indirect, special, incidental and consequential -damages, such as lost profits; - -iii) does not attempt to limit or alter the recipients' rights in the Source -Code under section 3.2; and - -iv) requires any subsequent distribution of the Program by any party to be -under a license that satisfies the requirements of this section 3. - - 3.2 When the Program is Distributed as Source Code: - -a) it must be made available under this Agreement, or if the Program (i) is -combined with other material in a separate file or files made available under -a Secondary License, and (ii) the initial Contributor attached to the Source -Code the notice described in Exhibit A of this Agreement, then the Program -may be made available under the terms of such Secondary Licenses, and +a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and +b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license: +i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; +ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and +iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. +3.2 When the Program is Distributed as Source Code: +a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and b) a copy of this Agreement must be included with each copy of the Program. +3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (‘notices’) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices. -3.3 Contributors may not remove or alter any copyright, patent, trademark, -attribution notices, disclaimers of warranty, or limitations of liability -("notices") contained within the Program from any copy of the Program which -they Distribute, provided that Contributors may add their own appropriate -notices. +4. COMMERCIAL DISTRIBUTION +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - 4. COMMERCIAL DISTRIBUTION +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor -who includes the Program in a commercial product offering should do so in -a manner which does not create potential liability for other Contributors. -Therefore, if a Contributor includes the Program in a commercial product offering, -such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor -to the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense -and any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense. +5. NO WARRANTY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If -that Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such Commercial -Contributor's responsibility alone. Under this section, the Commercial Contributor -would have to defend claims against the other Contributors related to those -performance claims and warranties, and if a court requires any other Contributor -to pay any damages as a result, the Commercial Contributor must pay those -damages. +6. DISCLAIMER OF LIABILITY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 5. NO WARRANTY +7. GENERAL +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED -BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES -OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR -FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for -determining the appropriateness of using and distributing the Program and -assumes all risks associated with its exercise of rights under this Agreement, -including but not limited to the risks and costs of program errors, compliance -with applicable laws, damage to or loss of data, programs or equipment, and -unavailability or interruption of operations. +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. - 6. DISCLAIMER OF LIABILITY +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED -BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION -OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGES. +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. - 7. GENERAL +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this Agreement, and without further action by the parties hereto, -such provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. +Exhibit A – Form of Secondary Licenses Notice +“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.” -If Recipient institutes patent litigation against any entity (including a -cross-claim or counterclaim in a lawsuit) alleging that the Program itself -(excluding combinations of the Program with other software or hardware) infringes -such Recipient's patent(s), then such Recipient's rights granted under Section -2(b) shall terminate as of the date such litigation is filed. +Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and -does not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as reasonably -practicable. However, Recipient's obligations under this Agreement and any -licenses granted by Recipient relating to the Program shall continue and survive. +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. -Everyone is permitted to copy and distribute copies of this Agreement, but -in order to avoid inconsistency the Agreement is copyrighted and may only -be modified in the following manner. The Agreement Steward reserves the right -to publish new versions (including revisions) of this Agreement from time -to time. No one other than the Agreement Steward has the right to modify this -Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse -Foundation may assign the responsibility to serve as the Agreement Steward -to a suitable separate entity. Each new version of the Agreement will be given -a distinguishing version number. The Program (including Contributions) may -always be Distributed subject to the version of the Agreement under which -it was received. In addition, after a new version of the Agreement is published, -Contributor may elect to Distribute the Program (including its Contributions) -under the new version. - -Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives -no rights or licenses to the intellectual property of any Contributor under -this Agreement, whether expressly, by implication, estoppel or otherwise. -All rights in the Program not expressly granted under this Agreement are reserved. -Nothing in this Agreement is intended to be enforceable by any entity that -is not a Contributor or Recipient. No third-party beneficiary rights are created -under this Agreement. - - Exhibit A - Form of Secondary Licenses Notice - -"This Source Code may also be made available under the following Secondary -Licenses when the conditions for such availability set forth in the Eclipse -Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions -or additional permissions here}." - -Simply including a copy of this Agreement, including this Exhibit A is not -sufficient to license the Source Code under Secondary Licenses. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a notice. - - You may add additional accurate notices of copyright ownership. +You may add additional accurate notices of copyright ownership. diff --git a/options/license/EUDatagrid b/options/license/EUDatagrid index f9edeac75..ca0ee0dcb 100644 --- a/options/license/EUDatagrid +++ b/options/license/EUDatagrid @@ -1,58 +1,24 @@ -EU DataGrid Software License Copyright (c) 2001 EU DataGrid. All rights reserved. +EU DataGrid Software License -This software includes voluntary contributions made to the EU DataGrid. For -more information on the EU DataGrid, please see http://www.eu-datagrid.org/. +Copyright (c) 2001 EU DataGrid. All rights reserved. -Installation, use, reproduction, display, modification and redistribution -of this software, with or without modification, in source and binary forms, -are permitted. Any exercise of rights under this license by you or your sub-licensees -is subject to the following conditions: +This software includes voluntary contributions made to the EU DataGrid. For more information on the EU DataGrid, please see http://www.eu-datagrid.org/. -1. Redistributions of this software, with or without modification, must reproduce -the above copyright notice and the above license statement as well as this -list of conditions, in the software, the user documentation and any other -materials provided with the software. +Installation, use, reproduction, display, modification and redistribution of this software, with or without modification, in source and binary forms, are permitted. Any exercise of rights under this license by you or your sub-licensees is subject to the following conditions: -2. The user documentation, if any, included with a redistribution, must include -the following notice: +1. Redistributions of this software, with or without modification, must reproduce the above copyright notice and the above license statement as well as this list of conditions, in the software, the user documentation and any other materials provided with the software. -"This product includes software developed by the EU DataGrid (http://www.eu-datagrid.org/)." +2. The user documentation, if any, included with a redistribution, must include the following notice: + "This product includes software developed by the EU DataGrid (http://www.eu-datagrid.org/)." -Alternatively, if that is where third-party acknowledgments normally appear, -this acknowledgment must be reproduced in the software itself. +Alternatively, if that is where third-party acknowledgments normally appear, this acknowledgment must be reproduced in the software itself. -3. The names "EDG", "EDG Toolkit", "EU DataGrid" and "EU DataGrid Project" -may not be used to endorse or promote software, or products derived therefrom, -except with prior written permission by hep-project-grid-edg-license@cern.ch. +3. The names "EDG", "EDG Toolkit", “EU DataGrid” and "EU DataGrid Project" may not be used to endorse or promote software, or products derived therefrom, except with prior written permission by hep-project-grid-edg-license@cern.ch. -4. You are under no obligation to provide anyone with any bug fixes, patches, -upgrades or other modifications, enhancements or derivatives of the features, -functionality or performance of this software that you may develop. However, -if you publish or distribute your modifications, enhancements or derivative -works without contemporaneously requiring users to enter into a separate written -license agreement, then you are deemed to have granted participants in the -EU DataGrid a worldwide, non-exclusive, royalty-free, perpetual license to -install, use, reproduce, display, modify, redistribute and sub-license your -modifications, enhancements or derivative works, whether in binary or source -code form, under the license conditions stated in this list of conditions. +4. You are under no obligation to provide anyone with any bug fixes, patches, upgrades or other modifications, enhancements or derivatives of the features,functionality or performance of this software that you may develop. However, if you publish or distribute your modifications, enhancements or derivative works without contemporaneously requiring users to enter into a separate written license agreement, then you are deemed to have granted participants in the EU DataGrid a worldwide, non-exclusive, royalty-free, perpetual license to install, use, reproduce, display, modify, redistribute and sub-license your modifications, enhancements or derivative works, whether in binary or source code form, under the license conditions stated in this list of conditions. - 5. DISCLAIMER +5. DISCLAIMER +THIS SOFTWARE IS PROVIDED BY THE EU DATAGRID AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, AND FITNESS FOR A PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE EU DATAGRID AND CONTRIBUTORS MAKE NO REPRESENTATION THAT THE SOFTWARE, MODIFICATIONS, ENHANCEMENTS OR DERIVATIVE WORKS THEREOF, WILL NOT INFRINGE ANY PATENT, COPYRIGHT, TRADE SECRET OR OTHER PROPRIETARY RIGHT. -THIS SOFTWARE IS PROVIDED BY THE EU DATAGRID AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY, OF SATISFACTORY QUALITY, AND FITNESS FOR A -PARTICULAR PURPOSE OR USE ARE DISCLAIMED. THE EU DATAGRID AND CONTRIBUTORS -MAKE NO REPRESENTATION THAT THE SOFTWARE, MODIFICATIONS, ENHANCEMENTS OR DERIVATIVE -WORKS THEREOF, WILL NOT INFRINGE ANY PATENT, COPYRIGHT, TRADE SECRET OR OTHER -PROPRIETARY RIGHT. - - 6. LIMITATION OF LIABILITY - -THE EU DATAGRID AND CONTRIBUTORS SHALL HAVE NO LIABILITY TO LICENSEE OR OTHER -PERSONS FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, -OR PUNITIVE DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA OR PROFITS, OR BUSINESS -INTERRUPTION, HOWEVER CAUSED AND ON ANY THEORY OF CONTRACT, WARRANTY, TORT -(INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR OTHERWISE, ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. +6. LIMITATION OF LIABILITY +THE EU DATAGRID AND CONTRIBUTORS SHALL HAVE NO LIABILITY TO LICENSEE OR OTHER PERSONS FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, OR PUNITIVE DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF USE, DATA OR PROFITS, OR BUSINESS INTERRUPTION, HOWEVER CAUSED AND ON ANY THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCT LIABILITY OR OTHERWISE, ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/EUPL-1.0 b/options/license/EUPL-1.0 index 3fdb93ab4..cd4366884 100644 --- a/options/license/EUPL-1.0 +++ b/options/license/EUPL-1.0 @@ -1,280 +1,154 @@ -European Union Public Licence V.1.0 EUPL (c) the European Community 2007 This -European Union Public Licence (the "EUPL") applies to the Work or Software -(as defined below) which is provided under the terms of this Licence. Any -use of the Work, other than as authorised under this Licence is prohibited -(to the extent such use is covered by a right of the copyright holder of the -Work). +European Union Public Licence V.1.0 -The Original Work is provided under the terms of this Licence when the Licensor -(as defined below) has placed the following notice immediately following the -copyright notice for the Original Work: +EUPL (c) the European Community 2007 -Licensed under the EUPL V.1.0 +This European Union Public Licence (the “EUPL”) applies to the Work or Software (as defined below) which is provided under the terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such use is covered by a right of the copyright holder of the Work). + +The Original Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following notice immediately following the copyright notice for the Original Work: + + Licensed under the EUPL V.1.0 or has expressed by any other mean his willingness to license under the EUPL. - 1. Definitions +1. Definitions - In this Licence, the following terms have the following meaning: +In this Licence, the following terms have the following meaning: - − The Licence: this Licence. + − The Licence: this Licence. -− The Original Work or the Software: the software distributed and/or communicated -by the Licensor under this Licence, available as Source Code and also as Executable -Code as the case may be. + − The Original Work or the Software: the software distributed and/or communicated by the Licensor under this Licence, available as Source Code and also as Executable Code as the case may be. -− Derivative Works: the works or software that could be created by the Licensee, -based upon the Original Work or modifications thereof. This Licence does not -define the extent of modification or dependence on the Original Work required -in order to classify a work as a Derivative Work; this extent is determined -by copyright law applicable in the country mentioned in Article 15. + − Derivative Works: the works or software that could be created by the Licensee, based upon the Original Work or modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in the country mentioned in Article 15. - − The Work: the Original Work and/or its Derivative Works. + − The Work: the Original Work and/or its Derivative Works. -− The Source Code: the human-readable form of the Work which is the most convenient -for people to study and modify. + − The Source Code: the human-readable form of the Work which is the most convenient for people to study and modify. -− The Executable Code: any code which has generally been compiled and which -is meant to be interpreted by a computer as a program. + − The Executable Code: any code which has generally been compiled and which is meant to be interpreted by a computer as a program. -− The Licensor: the natural or legal person that distributes and/or communicates -the Work under the Licence. + − The Licensor: the natural or legal person that distributes and/or communicates the Work under the Licence. -− Contributor(s): any natural or legal person who modifies the Work under -the Licence, or otherwise contributes to the creation of a Derivative Work. + − Contributor(s): any natural or legal person who modifies the Work under the Licence, or otherwise contributes to the creation of a Derivative Work. -− The Licensee or "You": any natural or legal person who makes any usage of -the Software under the terms of the Licence. + − The Licensee or “You”: any natural or legal person who makes any usage of the Software under the terms of the Licence. − Distribution and/or Communication: any act of selling, giving, lending, renting, distributing, communicating, transmitting, or otherwise making available, on-line or off-line, copies of the Work at the disposal of any other natural or legal person. -− Distribution and/or Communication: any act of selling, giving, lending, -renting, distributing, communicating, transmitting, or otherwise making available, -on-line or off-line, copies of the Work at the disposal of any other natural -or legal person. +2. Scope of the rights granted by the Licence - 2. Scope of the rights granted by the Licence +The Licensor hereby grants You a world-wide, royalty-free, non-exclusive, sub-licensable licence to do the following, for the duration of copyright vested in the Original Work: -The Licensor hereby grants You a world-wide, royalty-free, non-exclusive, -sub-licensable licence to do the following, for the duration of copyright -vested in the Original Work: + − use the Work in any circumstance and for all usage, - − use the Work in any circumstance and for all usage, + − reproduce the Work, - − reproduce the Work, + − modify the Original Work, and make Derivative Works based upon the Work, -− modify the Original Work, and make Derivative Works based upon the Work, + − communicate to the public, including the right to make available or display the Work or copies thereof to the public and perform publicly, as the case may be, the Work, -− communicate to the public, including the right to make available or display -the Work or copies thereof to the public and perform publicly, as the case -may be, the Work, + − distribute the Work or copies thereof, - − distribute the Work or copies thereof, + − lend and rent the Work or copies thereof, - − lend and rent the Work or copies thereof, + − sub-license rights in the Work or copies thereof. - − sub-license rights in the Work or copies thereof. +Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the applicable law permits so. -Those rights can be exercised on any media, supports and formats, whether -now known or later invented, as far as the applicable law permits so. +In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed by law in order to make effective the licence of the economic rights here above listed. -In the countries where moral rights apply, the Licensor waives his right to -exercise his moral right to the extent allowed by law in order to make effective -the licence of the economic rights here above listed. +The Licensor grants to the Licensee royalty-free, non exclusive usage rights to any patents held by the Licensor, to the extent necessary to make use of the rights granted on the Work under this Licence. -The Licensor grants to the Licensee royalty-free, non exclusive usage rights -to any patents held by the Licensor, to the extent necessary to make use of -the rights granted on the Work under this Licence. +3. Communication of the Source Code - 3. Communication of the Source Code +The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as Executable Code, the Licensor provides in addition a machinereadable copy of the Source Code of the Work along with each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to distribute and/or communicate the Work. -The Licensor may provide the Work either in its Source Code form, or as Executable -Code. If the Work is provided as Executable Code, the Licensor provides in -addition a machinereadable copy of the Source Code of the Work along with -each copy of the Work that the Licensor distributes or indicates, in a notice -following the copyright notice attached to the Work, a repository where the -Source Code is easily and freely accessible for as long as the Licensor continues -to distribute and/or communicate the Work. +4. Limitations on copyright - 4. Limitations on copyright +Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the exclusive rights of the rights owners in the Original Work or Software, of the exhaustion of those rights or of other applicable limitations thereto. -Nothing in this Licence is intended to deprive the Licensee of the benefits -from any exception or limitation to the exclusive rights of the rights owners -in the Original Work or Software, of the exhaustion of those rights or of -other applicable limitations thereto. +5. Obligations of the Licensee - 5. Obligations of the Licensee +The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those obligations are the following: -The grant of the rights mentioned above is subject to some restrictions and -obligations imposed on the Licensee. Those obligations are the following: +Attribution right: the Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the Licence with every copy of the Work he/she distributes and/or communicates. The Licensee must cause any Derivative Work to carry prominent notices stating that the Work has been modified and the date of modification. -Attribution right: the Licensee shall keep intact all copyright, patent or -trademarks notices and all notices that refer to the Licence and to the disclaimer -of warranties. The Licensee must include a copy of such notices and a copy -of the Licence with every copy of the Work he/she distributes and/or communicates. -The Licensee must cause any Derivative Work to carry prominent notices stating -that the Work has been modified and the date of modification. +Copyleft clause: If the Licensee distributes and/or communicates copies of the Original Works or Derivative Works based upon the Original Work, this Distribution and/or Communication will be done under the terms of this Licence. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the Work or Derivative Work that alter or restrict the terms of the Licence. -Copyleft clause: If the Licensee distributes and/or communicates copies of -the Original Works or Derivative Works based upon the Original Work, this -Distribution and/or Communication will be done under the terms of this Licence. -The Licensee (becoming Licensor) cannot offer or impose any additional terms -or conditions on the Work or Derivative Work that alter or restrict the terms -of the Licence. +Compatibility clause: If the Licensee Distributes and/or Communicates Derivative Works or copies thereof based upon both the Original Work and another work licensed under a Compatible Licence, this Distribution and/or Communication can be done under the terms of this Compatible Licence. For the sake of this clause, “Compatible Licence” refers to the licences listed in the appendix attached to this Licence. Should the Licensee’s obligations under the Compatible Licence conflict with his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail. -Compatibility clause: If the Licensee Distributes and/or Communicates Derivative -Works or copies thereof based upon both the Original Work and another work -licensed under a Compatible Licence, this Distribution and/or Communication -can be done under the terms of this Compatible Licence. For the sake of this -clause, "Compatible Licence" refers to the licences listed in the appendix -attached to this Licence. Should the Licensee's obligations under the Compatible -Licence conflict with his/her obligations under this Licence, the obligations -of the Compatible Licence shall prevail. +Provision of Source Code: When distributing and/or communicating copies of the Work, the Licensee will provide a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available for as long as the Licensee continues to distribute and/or communicate the Work. -Provision of Source Code: When distributing and/or communicating copies of -the Work, the Licensee will provide a machine-readable copy of the Source -Code or indicate a repository where this Source will be easily and freely -available for as long as the Licensee continues to distribute and/or communicate -the Work. +Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the copyright notice. -Legal Protection: This Licence does not grant permission to use the trade -names, trademarks, service marks, or names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the copyright notice. +6. Chain of Authorship - 6. Chain of Authorship +The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or licensed to him/her and that he/she has the power and authority to grant the Licence. -The original Licensor warrants that the copyright in the Original Work granted -hereunder is owned by him/her or licensed to him/her and that he/she has the -power and authority to grant the Licence. +Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or licensed to him/her and that he/she has the power and authority to grant the Licence. -Each Contributor warrants that the copyright in the modifications he/she brings -to the Work are owned by him/her or licensed to him/her and that he/she has -the power and authority to grant the Licence. +Each time You, as a Licensee, receive the Work, the original Licensor and subsequent Contributors grant You a licence to their contributions to the Work, under the terms of this Licence. -Each time You, as a Licensee, receive the Work, the original Licensor and -subsequent Contributors grant You a licence to their contributions to the -Work, under the terms of this Licence. +7. Disclaimer of Warranty - 7. Disclaimer of Warranty +The Work is a work in progress, which is continuously improved by numerous contributors. It is not a finished work and may therefore contain defects or “bugs” inherent to this type of software development. -The Work is a work in progress, which is continuously improved by numerous -contributors. It is not a finished work and may therefore contain defects -or "bugs" inherent to this type of software development. +For the above reason, the Work is provided under the Licence on an “as is” basis and without warranties of any kind concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this Licence. -For the above reason, the Work is provided under the Licence on an "as is" -basis and without warranties of any kind concerning the Work, including without -limitation merchantability, fitness for a particular purpose, absence of defects -or errors, accuracy, non-infringement of intellectual property rights other -than copyright as stated in Article 6 of this Licence. +This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work. -This disclaimer of warranty is an essential part of the Licence and a condition -for the grant of any rights to the Work. - - 8. Disclaimer of Liability - -Except in the cases of wilful misconduct or damages directly caused to natural -persons, the Licensor will in no event be liable for any direct or indirect, -material or moral, damages of any kind, arising out of the Licence or of the -use of the Work, including without limitation, damages for loss of goodwill, -work stoppage, computer failure or malfunction, loss of data or any commercial -damage, even if the Licensor has been advised of the possibility of such damage. -However, the Licensor will be liable under statutory product liability laws -as far such laws apply to the Work. - - 9. Additional agreements - -While distributing the Original Work or Derivative Works, You may choose to -conclude an additional agreement to offer, and charge a fee for, acceptance -of support, warranty, indemnity, or other liability obligations and/or services -consistent with this Licence. However, in accepting such obligations, You -may act only on your own behalf and on your sole responsibility, not on behalf -of the original Licensor or any other Contributor, and only if You agree to -indemnify, defend, and hold each Contributor harmless for any liability incurred -by, or claims asserted against such Contributor by the fact You have accepted -any such warranty or additional liability. - - 10. Acceptance of the Licence - -The provisions of this Licence can be accepted by clicking on an icon "I agree" -placed under the bottom of a window displaying the text of this Licence or -by affirming consent in any other similar way, in accordance with the rules -of applicable law. Clicking on that icon indicates your clear and irrevocable -acceptance of this Licence and all of its terms and conditions. - -Similarly, you irrevocably accept this Licence and all of its terms and conditions -by exercising any rights granted to You by Article 2 of this Licence, such -as the use of the Work, the creation by You of a Derivative Work or the Distribution -and/or Communication by You of the Work or copies thereof. - - 11. Information to the public - -In case of any Distribution and/or Communication of the Work by means of electronic -communication by You (for example, by offering to download the Work from a -remote location) the distribution channel or media (for example, a website) -must at least provide to the public the information requested by the applicable -law regarding the identification and address of the Licensor, the Licence -and the way it may be accessible, concluded, stored and reproduced by the -Licensee. - - 12. Termination of the Licence - -The Licence and the rights granted hereunder will terminate automatically -upon any breach by the Licensee of the terms of the Licence. - -Such a termination will not terminate the licences of any person who has received -the Work from the Licensee under the Licence, provided such persons remain -in full compliance with the Licence. - - 13. Miscellaneous +8. Disclaimer of Liability -Without prejudice of Article 9 above, the Licence represents the complete -agreement between the Parties as to the Work licensed hereunder. +Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However, the Licensor will be liable under statutory product liability laws as far such laws apply to the Work. -If any provision of the Licence is invalid or unenforceable under applicable -law, this will not affect the validity or enforceability of the Licence as -a whole. Such provision will be construed and/or reformed so as necessary -to make it valid and enforceable. +9. Additional agreements -The European Commission may put into force translations and/or binding new -versions of this Licence, so far this is required and reasonable. New versions -of the Licence will be published with a unique version number. The new version -of the Licence becomes binding for You as soon as You become aware of its -publication. +While distributing the Original Work or Derivative Works, You may choose to conclude an additional agreement to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or services consistent with this Licence. However, in accepting such obligations, You may act only on your own behalf and on your sole responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by the fact You have accepted any such warranty or additional liability. - 14. Jurisdiction +10. Acceptance of the Licence -Any litigation resulting from the interpretation of this License, arising -between the European Commission, as a Licensor, and any Licensee, will be -subject to the jurisdiction of the Court of Justice of the European Communities, -as laid down in article 238 of the Treaty establishing the European Community. +The provisions of this Licence can be accepted by clicking on an icon “I agree” placed under the bottom of a window displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms and conditions. -Any litigation arising between Parties, other than the European Commission, -and resulting from the interpretation of this License, will be subject to -the exclusive jurisdiction of the competent court where the Licensor resides -or conducts its primary business. +Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution and/or Communication by You of the Work or copies thereof. - 15. Applicable Law +11. Information to the public -This Licence shall be governed by the law of the European Union country where -the Licensor resides or has his registered office. - - This licence shall be governed by the Belgian law if: +In case of any Distribution and/or Communication of the Work by means of electronic communication by You (for example, by offering to download the Work from a remote location) the distribution channel or media (for example, a website) must at least provide to the public the information requested by the applicable law regarding the identification and address of the Licensor, the Licence and the way it may be accessible, concluded, stored and reproduced by the Licensee. -− a litigation arises between the European Commission, as a Licensor, and -any Licensee; +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms of the Licence. + +Such a termination will not terminate the licences of any person who has received the Work from the Licensee under the Licence, provided such persons remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the Work licensed hereunder. + +If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or enforceability of the Licence as a whole. Such provision will be construed and/or reformed so as necessary to make it valid and enforceable. + +The European Commission may put into force translations and/or binding new versions of this Licence, so far this is required and reasonable. New versions of the Licence will be published with a unique version number. The new version of the Licence becomes binding for You as soon as You become aware of its publication. + +14. Jurisdiction + +Any litigation resulting from the interpretation of this License, arising between the European Commission, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice of the European Communities, as laid down in article 238 of the Treaty establishing the European Community. + +Any litigation arising between Parties, other than the European Commission, and resulting from the interpretation of this License, will be subject to the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business. + +15. Applicable Law + +This Licence shall be governed by the law of the European Union country where the Licensor resides or has his registered office. + +This licence shall be governed by the Belgian law if: + + − a litigation arises between the European Commission, as a Licensor, and any Licensee; + + − the Licensor, other than the European Commission, has no residence or registered office inside a European Union country. -− the Licensor, other than the European Commission, has no residence or registered -office inside a European Union country. Appendix -"Compatible Licences" according to article 5 EUPL are: +“Compatible Licences” according to article 5 EUPL are: - − General Public License (GPL) v. 2 - - − Open Software License (OSL) v. 2.1, v. 3.0 - - − Common Public License v. 1.0 - - − Eclipse Public License v. 1.0 - - − Cecill v. 2.0 +− General Public License (GPL) v. 2 +− Open Software License (OSL) v. 2.1, v. 3.0 +− Common Public License v. 1.0 +− Eclipse Public License v. 1.0 +− Cecill v. 2.0 diff --git a/options/license/EUPL-1.1 b/options/license/EUPL-1.1 index 86c834ae5..3e0d612be 100644 --- a/options/license/EUPL-1.1 +++ b/options/license/EUPL-1.1 @@ -1,287 +1,157 @@ -European Union Public Licence V. 1.1 EUPL (c) the European Community 2007 +European Union Public Licence V. 1.1 -This European Union Public Licence (the "EUPL") applies to the Work or Software -(as defined below) which is provided under the terms of this Licence. Any -use of the Work, other than as authorised under this Licence is prohibited -(to the extent such use is covered by a right of the copyright holder of the -Work). +EUPL (c) the European Community 2007 -The Original Work is provided under the terms of this Licence when the Licensor -(as defined below) has placed the following notice immediately following the -copyright notice for the Original Work: +This European Union Public Licence (the "EUPL") applies to the Work or Software (as defined below) which is provided under the terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such use is covered by a right of the copyright holder of the Work). - +The Original Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following notice immediately following the copyright notice for the Original Work: - Licensed under the EUPL V.1.1 - - + Licensed under the EUPL V.1.1 or has expressed by any other mean his willingness to license under the EUPL. - 1. Definitions +1. Definitions - In this Licence, the following terms have the following meaning: +In this Licence, the following terms have the following meaning: - - The Licence: this Licence. + - The Licence: this Licence. -- The Original Work or the Software: the software distributed and/or communicated -by the Licensor under this Licence, available as Source Code and also as Executable -Code as the case may be. + - The Original Work or the Software: the software distributed and/or communicated by the Licensor under this Licence, available as Source Code and also as Executable Code as the case may be. -- Derivative Works: the works or software that could be created by the Licensee, -based upon the Original Work or modifications thereof. This Licence does not -define the extent of modification or dependence on the Original Work required -in order to classify a work as a Derivative Work; this extent is determined -by copyright law applicable in the country mentioned in Article 15. + - Derivative Works: the works or software that could be created by the Licensee, based upon the Original Work or modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in the country mentioned in Article 15. - - The Work: the Original Work and/or its Derivative Works. + - The Work: the Original Work and/or its Derivative Works. -- The Source Code: the human-readable form of the Work which is the most convenient -for people to study and modify. + - The Source Code: the human-readable form of the Work which is the most convenient for people to study and modify. -- The Executable Code: any code which has generally been compiled and which -is meant to be interpreted by a computer as a program. + - The Executable Code: any code which has generally been compiled and which is meant to be interpreted by a computer as a program. -- The Licensor: the natural or legal person that distributes and/or communicates -the Work under the Licence. + - The Licensor: the natural or legal person that distributes and/or communicates the Work under the Licence. -- Contributor(s): any natural or legal person who modifies the Work under -the Licence, or otherwise contributes to the creation of a Derivative Work. + - Contributor(s): any natural or legal person who modifies the Work under the Licence, or otherwise contributes to the creation of a Derivative Work. -- The Licensee or "You": any natural or legal person who makes any usage of -the Software under the terms of the Licence. + - The Licensee or "You": any natural or legal person who makes any usage of the Software under the terms of the Licence. -- Distribution and/or Communication: any act of selling, giving, lending, -renting, distributing, communicating, transmitting, or otherwise making available, -on-line or off-line, copies of the Work or providing access to its essential -functionalities at the disposal of any other natural or legal person. + - Distribution and/or Communication: any act of selling, giving, lending, renting, distributing, communicating, transmitting, or otherwise making available, on-line or off-line, copies of the Work or providing access to its essential functionalities at the disposal of any other natural or legal person. - 2. Scope of the rights granted by the Licence +2. Scope of the rights granted by the Licence -The Licensor hereby grants You a world-wide, royalty-free, non-exclusive, -sublicensable licence to do the following, for the duration of copyright vested -in the Original Work: +The Licensor hereby grants You a world-wide, royalty-free, non-exclusive, sublicensable licence to do the following, for the duration of copyright vested in the Original Work: - - use the Work in any circumstance and for all usage, + - use the Work in any circumstance and for all usage, - - reproduce the Work, + - reproduce the Work, -- modify the Original Work, and make Derivative Works based upon the Work, + - modify the Original Work, and make Derivative Works based upon the Work, -- communicate to the public, including the right to make available or display -the Work or copies thereof to the public and perform publicly, as the case -may be, the Work, + - communicate to the public, including the right to make available or display the Work or copies thereof to the public and perform publicly, as the case may be, the Work, - - distribute the Work or copies thereof, + - distribute the Work or copies thereof, - - lend and rent the Work or copies thereof, + - lend and rent the Work or copies thereof, - - sub-license rights in the Work or copies thereof. + - sub-license rights in the Work or copies thereof. -Those rights can be exercised on any media, supports and formats, whether -now known or later invented, as far as the applicable law permits so. +Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the applicable law permits so. -In the countries where moral rights apply, the Licensor waives his right to -exercise his moral right to the extent allowed by law in order to make effective -the licence of the economic rights here above listed. +In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed by law in order to make effective the licence of the economic rights here above listed. -The Licensor grants to the Licensee royalty-free, non exclusive usage rights -to any patents held by the Licensor, to the extent necessary to make use of -the rights granted on the Work under this Licence. +The Licensor grants to the Licensee royalty-free, non exclusive usage rights to any patents held by the Licensor, to the extent necessary to make use of the rights granted on the Work under this Licence. - 3. Communication of the Source Code +3. Communication of the Source Code -The Licensor may provide the Work either in its Source Code form, or as Executable -Code. If the Work is provided as Executable Code, the Licensor provides in -addition a machine-readable copy of the Source Code of the Work along with -each copy of the Work that the Licensor distributes or indicates, in a notice -following the copyright notice attached to the Work, a repository where the -Source Code is easily and freely accessible for as long as the Licensor continues -to distribute and/or communicate the Work. +The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to distribute and/or communicate the Work. - 4. Limitations on copyright +4. Limitations on copyright -Nothing in this Licence is intended to deprive the Licensee of the benefits -from any exception or limitation to the exclusive rights of the rights owners -in the Original Work or Software, of the exhaustion of those rights or of -other applicable limitations thereto. +Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the exclusive rights of the rights owners in the Original Work or Software, of the exhaustion of those rights or of other applicable limitations thereto. - 5. Obligations of the Licensee +5. Obligations of the Licensee -The grant of the rights mentioned above is subject to some restrictions and -obligations imposed on the Licensee. Those obligations are the following: +The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those obligations are the following: -Attribution right: the Licensee shall keep intact all copyright, patent or -trademarks notices and all notices that refer to the Licence and to the disclaimer -of warranties. The Licensee must include a copy of such notices and a copy -of the Licence with every copy of the Work he/she distributes and/or communicates. -The Licensee must cause any Derivative Work to carry prominent notices stating -that the Work has been modified and the date of modification. +Attribution right: the Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the Licence with every copy of the Work he/she distributes and/or communicates. The Licensee must cause any Derivative Work to carry prominent notices stating that the Work has been modified and the date of modification. -Copyleft clause: If the Licensee distributes and/or communicates copies of -the Original Works or Derivative Works based upon the Original Work, this -Distribution and/or Communication will be done under the terms of this Licence -or of a later version of this Licence unless the Original Work is expressly -distributed only under this version of the Licence. The Licensee (becoming -Licensor) cannot offer or impose any additional terms or conditions on the -Work or Derivative Work that alter or restrict the terms of the Licence. +Copyleft clause: If the Licensee distributes and/or communicates copies of the Original Works or Derivative Works based upon the Original Work, this Distribution and/or Communication will be done under the terms of this Licence or of a later version of this Licence unless the Original Work is expressly distributed only under this version of the Licence. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the Work or Derivative Work that alter or restrict the terms of the Licence. -Compatibility clause: If the Licensee Distributes and/or Communicates Derivative -Works or copies thereof based upon both the Original Work and another work -licensed under a Compatible Licence, this Distribution and/or Communication -can be done under the terms of this Compatible Licence. For the sake of this -clause, "Compatible Licence," refers to the licences listed in the appendix -attached to this Licence. Should the Licensee's obligations under the Compatible -Licence conflict with his/her obligations under this Licence, the obligations -of the Compatible Licence shall prevail. +Compatibility clause: If the Licensee Distributes and/or Communicates Derivative Works or copies thereof based upon both the Original Work and another work licensed under a Compatible Licence, this Distribution and/or Communication can be done under the terms of this Compatible Licence. For the sake of this clause, "Compatible Licence," refers to the licences listed in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail. -Provision of Source Code: When distributing and/or communicating copies of -the Work, the Licensee will provide a machine-readable copy of the Source -Code or indicate a repository where this Source will be easily and freely -available for as long as the Licensee continues to distribute and/or communicate -the Work. +Provision of Source Code: When distributing and/or communicating copies of the Work, the Licensee will provide a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available for as long as the Licensee continues to distribute and/or communicate the Work. -Legal Protection: This Licence does not grant permission to use the trade -names, trademarks, service marks, or names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the copyright notice. - - 6. Chain of Authorship +Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the copyright notice. -The original Licensor warrants that the copyright in the Original Work granted -hereunder is owned by him/her or licensed to him/her and that he/she has the -power and authority to grant the Licence. - -Each Contributor warrants that the copyright in the modifications he/she brings -to the Work are owned by him/her or licensed to him/her and that he/she has -the power and authority to grant the Licence. +6. Chain of Authorship -Each time You accept the Licence, the original Licensor and subsequent Contributors -grant You a licence to their contributions to the Work, under the terms of -this Licence. - - 7. Disclaimer of Warranty +The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or licensed to him/her and that he/she has the power and authority to grant the Licence. -The Work is a work in progress, which is continuously improved by numerous -contributors. It is not a finished work and may therefore contain defects -or "bugs" inherent to this type of software development. +Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or licensed to him/her and that he/she has the power and authority to grant the Licence. -For the above reason, the Work is provided under the Licence on an "as is" -basis and without warranties of any kind concerning the Work, including without -limitation merchantability, fitness for a particular purpose, absence of defects -or errors, accuracy, non-infringement of intellectual property rights other -than copyright as stated in Article 6 of this Licence. - -This disclaimer of warranty is an essential part of the Licence and a condition -for the grant of any rights to the Work. - - 8. Disclaimer of Liability - -Except in the cases of wilful misconduct or damages directly caused to natural -persons, the Licensor will in no event be liable for any direct or indirect, -material or moral, damages of any kind, arising out of the Licence or of the -use of the Work, including without limitation, damages for loss of goodwill, -work stoppage, computer failure or malfunction, loss of data or any commercial -damage, even if the Licensor has been advised of the possibility of such damage. -However, the Licensor will be liable under statutory product liability laws -as far such laws apply to the Work. - - 9. Additional agreements - -While distributing the Original Work or Derivative Works, You may choose to -conclude an additional agreement to offer, and charge a fee for, acceptance -of support, warranty, indemnity, or other liability obligations and/or services -consistent with this Licence. However, in accepting such obligations, You -may act only on your own behalf and on your sole responsibility, not on behalf -of the original Licensor or any other Contributor, and only if You agree to -indemnify, defend, and hold each Contributor harmless for any liability incurred -by, or claims asserted against such Contributor by the fact You have accepted -any such warranty or additional liability. - - 10. Acceptance of the Licence - -The provisions of this Licence can be accepted by clicking on an icon "I agree" -placed under the bottom of a window displaying the text of this Licence or -by affirming consent in any other similar way, in accordance with the rules -of applicable law. Clicking on that icon indicates your clear and irrevocable -acceptance of this Licence and all of its terms and conditions. - -Similarly, you irrevocably accept this Licence and all of its terms and conditions -by exercising any rights granted to You by Article 2 of this Licence, such -as the use of the Work, the creation by You of a Derivative Work or the Distribution -and/or Communication by You of the Work or copies thereof. - - 11. Information to the public - -In case of any Distribution and/or Communication of the Work by means of electronic -communication by You (for example, by offering to download the Work from a -remote location) the distribution channel or media (for example, a website) -must at least provide to the public the information requested by the applicable -law regarding the Licensor, the Licence and the way it may be accessible, -concluded, stored and reproduced by the Licensee. - - 12. Termination of the Licence - -The Licence and the rights granted hereunder will terminate automatically -upon any breach by the Licensee of the terms of the Licence. Such a termination -will not terminate the licences of any person who has received the Work from -the Licensee under the Licence, provided such persons remain in full compliance -with the Licence. - - 13. Miscellaneous - -Without prejudice of Article 9 above, the Licence represents the complete -agreement between the Parties as to the Work licensed hereunder. +Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions to the Work, under the terms of this Licence. -If any provision of the Licence is invalid or unenforceable under applicable -law, this will not affect the validity or enforceability of the Licence as -a whole. Such provision will be construed and/or reformed so as necessary -to make it valid and enforceable. +7. Disclaimer of Warranty -The European Commission may publish other linguistic versions and/or new versions -of this Licence, so far this is required and reasonable, without reducing -the scope of the rights granted by the Licence. New versions of the Licence -will be published with a unique version number. +The Work is a work in progress, which is continuously improved by numerous contributors. It is not a finished work and may therefore contain defects or "bugs" inherent to this type of software development. -All linguistic versions of this Licence, approved by the European Commission, -have identical value. Parties can take advantage of the linguistic version -of their choice. +For the above reason, the Work is provided under the Licence on an "as is" basis and without warranties of any kind concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this Licence. - 14. Jurisdiction +This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work. -Any litigation resulting from the interpretation of this License, arising -between the European Commission, as a Licensor, and any Licensee, will be -subject to the jurisdiction of the Court of Justice of the European Communities, -as laid down in article 238 of the Treaty establishing the European Community. +8. Disclaimer of Liability -Any litigation arising between Parties, other than the European Commission, -and resulting from the interpretation of this License, will be subject to -the exclusive jurisdiction of the competent court where the Licensor resides -or conducts its primary business. +Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However, the Licensor will be liable under statutory product liability laws as far such laws apply to the Work. - 15. Applicable Law +9. Additional agreements -This Licence shall be governed by the law of the European Union country where -the Licensor resides or has his registered office. - - This licence shall be governed by the Belgian law if: +While distributing the Original Work or Derivative Works, You may choose to conclude an additional agreement to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or services consistent with this Licence. However, in accepting such obligations, You may act only on your own behalf and on your sole responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by the fact You have accepted any such warranty or additional liability. + +10. Acceptance of the Licence + +The provisions of this Licence can be accepted by clicking on an icon "I agree" placed under the bottom of a window displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms and conditions. + +Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution and/or Communication by You of the Work or copies thereof. + +11. Information to the public + +In case of any Distribution and/or Communication of the Work by means of electronic communication by You (for example, by offering to download the Work from a remote location) the distribution channel or media (for example, a website) must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence and the way it may be accessible, concluded, stored and reproduced by the Licensee. + +12. Termination of the Licence + +The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms of the Licence. Such a termination will not terminate the licences of any person who has received the Work from the Licensee under the Licence, provided such persons remain in full compliance with the Licence. + +13. Miscellaneous + +Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the Work licensed hereunder. + +If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or enforceability of the Licence as a whole. Such provision will be construed and/or reformed so as necessary to make it valid and enforceable. + +The European Commission may publish other linguistic versions and/or new versions of this Licence, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence. New versions of the Licence will be published with a unique version number. + +All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take advantage of the linguistic version of their choice. + +14. Jurisdiction + +Any litigation resulting from the interpretation of this License, arising between the European Commission, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice of the European Communities, as laid down in article 238 of the Treaty establishing the European Community. + +Any litigation arising between Parties, other than the European Commission, and resulting from the interpretation of this License, will be subject to the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business. + +15. Applicable Law + +This Licence shall be governed by the law of the European Union country where the Licensor resides or has his registered office. + +This licence shall be governed by the Belgian law if: + + - a litigation arises between the European Commission, as a Licensor, and any Licensee; + + - the Licensor, other than the European Commission, has no residence or registered office inside a European Union country. -- a litigation arises between the European Commission, as a Licensor, and -any Licensee; -- the Licensor, other than the European Commission, has no residence or registered -office inside a European Union country. Appendix "Compatible Licences" according to article 5 EUPL are: - - GNU General Public License (GNU GPL) v. 2 - - - Open Software License (OSL) v. 2.1, v. 3.0 - - - Common Public License v. 1.0 - - - Eclipse Public License v. 1.0 - - - Cecill v. 2.0 + - GNU General Public License (GNU GPL) v. 2 + - Open Software License (OSL) v. 2.1, v. 3.0 + - Common Public License v. 1.0 + - Eclipse Public License v. 1.0 + - Cecill v. 2.0 diff --git a/options/license/EUPL-1.2 b/options/license/EUPL-1.2 index c108cad9b..6d8cea430 100644 --- a/options/license/EUPL-1.2 +++ b/options/license/EUPL-1.2 @@ -1,305 +1,190 @@ -European Union Public Licence v. 1.2 - +EUROPEAN UNION PUBLIC LICENCE v. 1.2 EUPL © the European Union 2007, 2016 -This European Union Public Licence (the 'EUPL') applies to the Work (as defined -below) which is provided under the terms of this Licence. Any use of the Work, -other than as authorised under this Licence is prohibited (to the extent such +This European Union Public Licence (the ‘EUPL’) applies to the Work (as defined below) which is provided under the +terms of this Licence. Any use of the Work, other than as authorised under this Licence is prohibited (to the extent such use is covered by a right of the copyright holder of the Work). - -The Work is provided under the terms of this Licence when the Licensor (as -defined below) has placed the following notice immediately following the copyright -notice for the Work: - - - - Licensed under the EUPL - - - +The Work is provided under the terms of this Licence when the Licensor (as defined below) has placed the following +notice immediately following the copyright notice for the Work: + Licensed under the EUPL or has expressed by any other means his willingness to license under the EUPL. - 1. Definitions - - In this Licence, the following terms have the following meaning: - - — 'The Licence': this Licence. - -— 'The Original Work': the work or software distributed or communicated by -the Licensor under this Licence, available as Source Code and also as Executable -Code as the case may be. - -— 'Derivative Works': the works or software that could be created by the Licensee, -based upon the Original Work or modifications thereof. This Licence does not -define the extent of modification or dependence on the Original Work required -in order to classify a work as a Derivative Work; this extent is determined -by copyright law applicable in the country mentioned in Article 15. - - — 'The Work': the Original Work or its Derivative Works. - -— 'The Source Code': the human-readable form of the Work which is the most -convenient for people to study and modify. - -— 'The Executable Code': any code which has generally been compiled and which -is meant to be interpreted by a computer as a program. - -— 'The Licensor': the natural or legal person that distributes or communicates -the Work under the Licence. - -— 'Contributor(s)': any natural or legal person who modifies the Work under -the Licence, or otherwise contributes to the creation of a Derivative Work. - -— 'The Licensee' or 'You': any natural or legal person who makes any usage -of the Work under the terms of the Licence. - -— 'Distribution' or 'Communication': any act of selling, giving, lending, -renting, distributing, communicating, transmitting, or otherwise making available, -online or offline, copies of the Work or providing access to its essential +1.Definitions +In this Licence, the following terms have the following meaning: +— ‘The Licence’:this Licence. +— ‘The Original Work’:the work or software distributed or communicated by the Licensor under this Licence, available +as Source Code and also as Executable Code as the case may be. +— ‘Derivative Works’:the works or software that could be created by the Licensee, based upon the Original Work or +modifications thereof. This Licence does not define the extent of modification or dependence on the Original Work +required in order to classify a work as a Derivative Work; this extent is determined by copyright law applicable in +the country mentioned in Article 15. +— ‘The Work’:the Original Work or its Derivative Works. +— ‘The Source Code’:the human-readable form of the Work which is the most convenient for people to study and +modify. +— ‘The Executable Code’:any code which has generally been compiled and which is meant to be interpreted by +a computer as a program. +— ‘The Licensor’:the natural or legal person that distributes or communicates the Work under the Licence. +— ‘Contributor(s)’:any natural or legal person who modifies the Work under the Licence, or otherwise contributes to +the creation of a Derivative Work. +— ‘The Licensee’ or ‘You’:any natural or legal person who makes any usage of the Work under the terms of the +Licence. +— ‘Distribution’ or ‘Communication’:any act of selling, giving, lending, renting, distributing, communicating, +transmitting, or otherwise making available, online or offline, copies of the Work or providing access to its essential functionalities at the disposal of any other natural or legal person. - 2. Scope of the rights granted by the Licence +2.Scope of the rights granted by the Licence +The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable licence to do the following, for +the duration of copyright vested in the Original Work: +— use the Work in any circumstance and for all usage, +— reproduce the Work, +— modify the Work, and make Derivative Works based upon the Work, +— communicate to the public, including the right to make available or display the Work or copies thereof to the public +and perform publicly, as the case may be, the Work, +— distribute the Work or copies thereof, +— lend and rent the Work or copies thereof, +— sublicense rights in the Work or copies thereof. +Those rights can be exercised on any media, supports and formats, whether now known or later invented, as far as the +applicable law permits so. +In the countries where moral rights apply, the Licensor waives his right to exercise his moral right to the extent allowed +by law in order to make effective the licence of the economic rights here above listed. +The Licensor grants to the Licensee royalty-free, non-exclusive usage rights to any patents held by the Licensor, to the +extent necessary to make use of the rights granted on the Work under this Licence. -The Licensor hereby grants You a worldwide, royalty-free, non-exclusive, sublicensable -licence to do the following, for the duration of copyright vested in the Original -Work: +3.Communication of the Source Code +The Licensor may provide the Work either in its Source Code form, or as Executable Code. If the Work is provided as +Executable Code, the Licensor provides in addition a machine-readable copy of the Source Code of the Work along with +each copy of the Work that the Licensor distributes or indicates, in a notice following the copyright notice attached to +the Work, a repository where the Source Code is easily and freely accessible for as long as the Licensor continues to +distribute or communicate the Work. - — use the Work in any circumstance and for all usage, - - — reproduce the Work, - - — modify the Work, and make Derivative Works based upon the Work, - -— communicate to the public, including the right to make available or display -the Work or copies thereof to the public and perform publicly, as the case -may be, the Work, - - — distribute the Work or copies thereof, - - — lend and rent the Work or copies thereof, - - — sublicense rights in the Work or copies thereof. - -Those rights can be exercised on any media, supports and formats, whether -now known or later invented, as far as the applicable law permits so. - -In the countries where moral rights apply, the Licensor waives his right to -exercise his moral right to the extent allowed by law in order to make effective -the licence of the economic rights here above listed. - -The Licensor grants to the Licensee royalty-free, non-exclusive usage rights -to any patents held by the Licensor, to the extent necessary to make use of -the rights granted on the Work under this Licence. - - 3. Communication of the Source Code - -The Licensor may provide the Work either in its Source Code form, or as Executable -Code. If the Work is provided as Executable Code, the Licensor provides in -addition a machine-readable copy of the Source Code of the Work along with -each copy of the Work that the Licensor distributes or indicates, in a notice -following the copyright notice attached to the Work, a repository where the -Source Code is easily and freely accessible for as long as the Licensor continues -to distribute or communicate the Work. - - 4. Limitations on copyright - -Nothing in this Licence is intended to deprive the Licensee of the benefits -from any exception or limitation to the exclusive rights of the rights owners -in the Work, of the exhaustion of those rights or of other applicable limitations +4.Limitations on copyright +Nothing in this Licence is intended to deprive the Licensee of the benefits from any exception or limitation to the +exclusive rights of the rights owners in the Work, of the exhaustion of those rights or of other applicable limitations thereto. - 5. Obligations of the Licensee +5.Obligations of the Licensee +The grant of the rights mentioned above is subject to some restrictions and obligations imposed on the Licensee. Those +obligations are the following: -The grant of the rights mentioned above is subject to some restrictions and -obligations imposed on the Licensee. Those obligations are the following: +Attribution right: The Licensee shall keep intact all copyright, patent or trademarks notices and all notices that refer to +the Licence and to the disclaimer of warranties. The Licensee must include a copy of such notices and a copy of the +Licence with every copy of the Work he/she distributes or communicates. The Licensee must cause any Derivative Work +to carry prominent notices stating that the Work has been modified and the date of modification. -Attribution right: The Licensee shall keep intact all copyright, patent or -trademarks notices and all notices that refer to the Licence and to the disclaimer -of warranties. The Licensee must include a copy of such notices and a copy -of the Licence with every copy of the Work he/she distributes or communicates. -The Licensee must cause any Derivative Work to carry prominent notices stating -that the Work has been modified and the date of modification. +Copyleft clause: If the Licensee distributes or communicates copies of the Original Works or Derivative Works, this +Distribution or Communication will be done under the terms of this Licence or of a later version of this Licence unless +the Original Work is expressly distributed only under this version of the Licence — for example by communicating +‘EUPL v. 1.2 only’. The Licensee (becoming Licensor) cannot offer or impose any additional terms or conditions on the +Work or Derivative Work that alter or restrict the terms of the Licence. -Copyleft clause: If the Licensee distributes or communicates copies of the -Original Works or Derivative Works, this Distribution or Communication will -be done under the terms of this Licence or of a later version of this Licence -unless the Original Work is expressly distributed only under this version -of the Licence — for example by communicating 'EUPL v. 1.2 only'. The Licensee -(becoming Licensor) cannot offer or impose any additional terms or conditions -on the Work or Derivative Work that alter or restrict the terms of the Licence. +Compatibility clause: If the Licensee Distributes or Communicates Derivative Works or copies thereof based upon both +the Work and another work licensed under a Compatible Licence, this Distribution or Communication can be done +under the terms of this Compatible Licence. For the sake of this clause, ‘Compatible Licence’ refers to the licences listed +in the appendix attached to this Licence. Should the Licensee's obligations under the Compatible Licence conflict with +his/her obligations under this Licence, the obligations of the Compatible Licence shall prevail. -Compatibility clause: If the Licensee Distributes or Communicates Derivative -Works or copies thereof based upon both the Work and another work licensed -under a Compatible Licence, this Distribution or Communication can be done -under the terms of this Compatible Licence. For the sake of this clause, 'Compatible -Licence' refers to the licences listed in the appendix attached to this Licence. -Should the Licensee's obligations under the Compatible Licence conflict with -his/her obligations under this Licence, the obligations of the Compatible -Licence shall prevail. - -Provision of Source Code: When distributing or communicating copies of the -Work, the Licensee will provide a machine-readable copy of the Source Code -or indicate a repository where this Source will be easily and freely available +Provision of Source Code: When distributing or communicating copies of the Work, the Licensee will provide +a machine-readable copy of the Source Code or indicate a repository where this Source will be easily and freely available for as long as the Licensee continues to distribute or communicate the Work. - -Legal Protection: This Licence does not grant permission to use the trade -names, trademarks, service marks, or names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and +Legal Protection: This Licence does not grant permission to use the trade names, trademarks, service marks, or names +of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the copyright notice. - 6. Chain of Authorship +6.Chain of Authorship +The original Licensor warrants that the copyright in the Original Work granted hereunder is owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each Contributor warrants that the copyright in the modifications he/she brings to the Work are owned by him/her or +licensed to him/her and that he/she has the power and authority to grant the Licence. +Each time You accept the Licence, the original Licensor and subsequent Contributors grant You a licence to their contributions +to the Work, under the terms of this Licence. -The original Licensor warrants that the copyright in the Original Work granted -hereunder is owned by him/her or licensed to him/her and that he/she has the -power and authority to grant the Licence. +7.Disclaimer of Warranty +The Work is a work in progress, which is continuously improved by numerous Contributors. It is not a finished work +and may therefore contain defects or ‘bugs’ inherent to this type of development. +For the above reason, the Work is provided under the Licence on an ‘as is’ basis and without warranties of any kind +concerning the Work, including without limitation merchantability, fitness for a particular purpose, absence of defects or +errors, accuracy, non-infringement of intellectual property rights other than copyright as stated in Article 6 of this +Licence. +This disclaimer of warranty is an essential part of the Licence and a condition for the grant of any rights to the Work. -Each Contributor warrants that the copyright in the modifications he/she brings -to the Work are owned by him/her or licensed to him/her and that he/she has -the power and authority to grant the Licence. +8.Disclaimer of Liability +Except in the cases of wilful misconduct or damages directly caused to natural persons, the Licensor will in no event be +liable for any direct or indirect, material or moral, damages of any kind, arising out of the Licence or of the use of the +Work, including without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, loss +of data or any commercial damage, even if the Licensor has been advised of the possibility of such damage. However, +the Licensor will be liable under statutory product liability laws as far such laws apply to the Work. -Each time You accept the Licence, the original Licensor and subsequent Contributors -grant You a licence to their contributions to the Work, under the terms of -this Licence. +9.Additional agreements +While distributing the Work, You may choose to conclude an additional agreement, defining obligations or services +consistent with this Licence. However, if accepting obligations, You may act only on your own behalf and on your sole +responsibility, not on behalf of the original Licensor or any other Contributor, and only if You agree to indemnify, +defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against such Contributor by +the fact You have accepted any warranty or additional liability. - 7. Disclaimer of Warranty - -The Work is a work in progress, which is continuously improved by numerous -Contributors. It is not a finished work and may therefore contain defects -or 'bugs' inherent to this type of development. - -For the above reason, the Work is provided under the Licence on an 'as is' -basis and without warranties of any kind concerning the Work, including without -limitation merchantability, fitness for a particular purpose, absence of defects -or errors, accuracy, non-infringement of intellectual property rights other -than copyright as stated in Article 6 of this Licence. - -This disclaimer of warranty is an essential part of the Licence and a condition -for the grant of any rights to the Work. - - 8. Disclaimer of Liability - -Except in the cases of wilful misconduct or damages directly caused to natural -persons, the Licensor will in no event be liable for any direct or indirect, -material or moral, damages of any kind, arising out of the Licence or of the -use of the Work, including without limitation, damages for loss of goodwill, -work stoppage, computer failure or malfunction, loss of data or any commercial -damage, even if the Licensor has been advised of the possibility of such damage. -However, the Licensor will be liable under statutory product liability laws -as far such laws apply to the Work. - - 9. Additional agreements - -While distributing the Work, You may choose to conclude an additional agreement, -defining obligations or services consistent with this Licence. However, if -accepting obligations, You may act only on your own behalf and on your sole -responsibility, not on behalf of the original Licensor or any other Contributor, -and only if You agree to indemnify, defend, and hold each Contributor harmless -for any liability incurred by, or claims asserted against such Contributor -by the fact You have accepted any warranty or additional liability. - - 10. Acceptance of the Licence - -The provisions of this Licence can be accepted by clicking on an icon 'I agree' -placed under the bottom of a window displaying the text of this Licence or -by affirming consent in any other similar way, in accordance with the rules -of applicable law. Clicking on that icon indicates your clear and irrevocable -acceptance of this Licence and all of its terms and conditions. - -Similarly, you irrevocably accept this Licence and all of its terms and conditions -by exercising any rights granted to You by Article 2 of this Licence, such -as the use of the Work, the creation by You of a Derivative Work or the Distribution +10.Acceptance of the Licence +The provisions of this Licence can be accepted by clicking on an icon ‘I agree’ placed under the bottom of a window +displaying the text of this Licence or by affirming consent in any other similar way, in accordance with the rules of +applicable law. Clicking on that icon indicates your clear and irrevocable acceptance of this Licence and all of its terms +and conditions. +Similarly, you irrevocably accept this Licence and all of its terms and conditions by exercising any rights granted to You +by Article 2 of this Licence, such as the use of the Work, the creation by You of a Derivative Work or the Distribution or Communication by You of the Work or copies thereof. - 11. Information to the public +11.Information to the public +In case of any Distribution or Communication of the Work by means of electronic communication by You (for example, +by offering to download the Work from a remote location) the distribution channel or media (for example, a website) +must at least provide to the public the information requested by the applicable law regarding the Licensor, the Licence +and the way it may be accessible, concluded, stored and reproduced by the Licensee. -In case of any Distribution or Communication of the Work by means of electronic -communication by You (for example, by offering to download the Work from a -remote location) the distribution channel or media (for example, a website) -must at least provide to the public the information requested by the applicable -law regarding the Licensor, the Licence and the way it may be accessible, -concluded, stored and reproduced by the Licensee. +12.Termination of the Licence +The Licence and the rights granted hereunder will terminate automatically upon any breach by the Licensee of the terms +of the Licence. +Such a termination will not terminate the licences of any person who has received the Work from the Licensee under +the Licence, provided such persons remain in full compliance with the Licence. - 12. Termination of the Licence - -The Licence and the rights granted hereunder will terminate automatically -upon any breach by the Licensee of the terms of the Licence. - -Such a termination will not terminate the licences of any person who has received -the Work from the Licensee under the Licence, provided such persons remain -in full compliance with the Licence. - - 13. Miscellaneous - -Without prejudice of Article 9 above, the Licence represents the complete -agreement between the Parties as to the Work. - -If any provision of the Licence is invalid or unenforceable under applicable -law, this will not affect the validity or enforceability of the Licence as -a whole. Such provision will be construed or reformed so as necessary to make -it valid and enforceable. - -The European Commission may publish other linguistic versions or new versions -of this Licence or updated versions of the Appendix, so far this is required -and reasonable, without reducing the scope of the rights granted by the Licence. +13.Miscellaneous +Without prejudice of Article 9 above, the Licence represents the complete agreement between the Parties as to the +Work. +If any provision of the Licence is invalid or unenforceable under applicable law, this will not affect the validity or +enforceability of the Licence as a whole. Such provision will be construed or reformed so as necessary to make it valid +and enforceable. +The European Commission may publish other linguistic versions or new versions of this Licence or updated versions of +the Appendix, so far this is required and reasonable, without reducing the scope of the rights granted by the Licence. New versions of the Licence will be published with a unique version number. +All linguistic versions of this Licence, approved by the European Commission, have identical value. Parties can take +advantage of the linguistic version of their choice. -All linguistic versions of this Licence, approved by the European Commission, -have identical value. Parties can take advantage of the linguistic version -of their choice. +14.Jurisdiction +Without prejudice to specific agreement between parties, +— any litigation resulting from the interpretation of this License, arising between the European Union institutions, +bodies, offices or agencies, as a Licensor, and any Licensee, will be subject to the jurisdiction of the Court of Justice +of the European Union, as laid down in article 272 of the Treaty on the Functioning of the European Union, +— any litigation arising between other parties and resulting from the interpretation of this License, will be subject to +the exclusive jurisdiction of the competent court where the Licensor resides or conducts its primary business. - 14. Jurisdiction +15.Applicable Law +Without prejudice to specific agreement between parties, +— this Licence shall be governed by the law of the European Union Member State where the Licensor has his seat, +resides or has his registered office, +— this licence shall be governed by Belgian law if the Licensor has no seat, residence or registered office inside +a European Union Member State. - Without prejudice to specific agreement between parties, -— any litigation resulting from the interpretation of this License, arising -between the European Union institutions, bodies, offices or agencies, as a -Licensor, and any Licensee, will be subject to the jurisdiction of the Court -of Justice of the European Union, as laid down in article 272 of the Treaty -on the Functioning of the European Union, + Appendix -— any litigation arising between other parties and resulting from the interpretation -of this License, will be subject to the exclusive jurisdiction of the competent -court where the Licensor resides or conducts its primary business. +‘Compatible Licences’ according to Article 5 EUPL are: +— GNU General Public License (GPL) v. 2, v. 3 +— GNU Affero General Public License (AGPL) v. 3 +— Open Software License (OSL) v. 2.1, v. 3.0 +— Eclipse Public License (EPL) v. 1.0 +— CeCILL v. 2.0, v. 2.1 +— Mozilla Public Licence (MPL) v. 2 +— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 +— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for works other than software +— European Union Public Licence (EUPL) v. 1.1, v. 1.2 +— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity (LiLiQ-R+). - 15. Applicable Law - - Without prejudice to specific agreement between parties, - -— this Licence shall be governed by the law of the European Union Member State -where the Licensor has his seat, resides or has his registered office, - -— this licence shall be governed by Belgian law if the Licensor has no seat, -residence or registered office inside a European Union Member State. - -Appendix - -'Compatible Licences' according to Article 5 EUPL are: - - — GNU General Public License (GPL) v. 2, v. 3 - - — GNU Affero General Public License (AGPL) v. 3 - - — Open Software License (OSL) v. 2.1, v. 3.0 - - — Eclipse Public License (EPL) v. 1.0 - - — CeCILL v. 2.0, v. 2.1 - - — Mozilla Public Licence (MPL) v. 2 - - — GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3 - -— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for -works other than software - - — European Union Public Licence (EUPL) v. 1.1, v. 1.2 - -— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or Strong Reciprocity -(LiLiQ-R+). - -The European Commission may update this Appendix to later versions of the -above licences without producing a new version of the EUPL, as long as they -provide the rights granted in Article 2 of this Licence and protect the covered -Source Code from exclusive appropriation. - -All other changes or additions to this Appendix require the production of -a new EUPL version. +The European Commission may update this Appendix to later versions of the above licences without producing +a new version of the EUPL, as long as they provide the rights granted in Article 2 of this Licence and protect the +covered Source Code from exclusive appropriation. +All other changes or additions to this Appendix require the production of a new EUPL version. diff --git a/options/license/Entessa b/options/license/Entessa index a41b7a39c..d434afe5b 100644 --- a/options/license/Entessa +++ b/options/license/Entessa @@ -1,43 +1,22 @@ -Entessa Public License Version. 1.0 Copyright (c) 2003 Entessa, LLC. All rights -reserved. +Entessa Public License Version. 1.0 +Copyright (c) 2003 Entessa, LLC. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The end-user documentation included with the redistribution, if any, must -include the following acknowledgment: +3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: -"This product includes open source software developed by openSEAL (http://www.openseal.org/)." + "This product includes open source software developed by openSEAL (http://www.openseal.org/)." -Alternately, this acknowledgment may appear in the software itself, if and -wherever such third-party acknowledgments normally appear. +Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. -4. The names "openSEAL" and "Entessa" must not be used to endorse or promote -products derived from this software without prior written permission. For -written permission, please contact epl@entessa.com. +4. The names "openSEAL" and "Entessa" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact epl@entessa.com. -5. Products derived from this software may not be called "openSEAL", nor may -"openSEAL" appear in their name, without prior written permission of Entessa. +5. Products derived from this software may not be called "openSEAL", nor may "openSEAL" appear in their name, without prior written permission of Entessa. -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ENTESSA, -LLC, OPENSEAL OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ENTESSA, LLC, OPENSEAL OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This software consists of voluntary contributions made by many individuals -on behalf of openSEAL and was originally based on software contributed by -Entessa, LLC, http://www.entessa.com. For more information on the openSEAL, -please see . +This software consists of voluntary contributions made by many individuals on behalf of openSEAL and was originally based on software contributed by Entessa, LLC, http://www.entessa.com. For more information on the openSEAL, please see . diff --git a/options/license/ErlPL-1.1 b/options/license/ErlPL-1.1 index 6cdb9bc97..88cd9569f 100644 --- a/options/license/ErlPL-1.1 +++ b/options/license/ErlPL-1.1 @@ -1,252 +1,93 @@ ERLANG PUBLIC LICENSE Version 1.1 - 1. Definitions. +1. Definitions. -1.1. ``Contributor'' means each entity that creates or contributes to the -creation of Modifications. +1.1. ``Contributor'' means each entity that creates or contributes to the creation of Modifications. -1.2. ``Contributor Version'' means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. +1.2. ``Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. ``Covered Code'' means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. +1.3. ``Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. ``Electronic Distribution Mechanism'' means a mechanism generally accepted -in the software development community for the electronic transfer of data. +1.4. ``Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. ``Executable'' means Covered Code in any form other than Source Code. -1.6. ``Initial Developer'' means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. +1.6. ``Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. ``Larger Work'' means a work which combines Covered Code or portions -thereof with code not governed by the terms of this License. +1.7. ``Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. ``License'' means this document. +1.8. ``License'' means this document. -1.9. ``Modifications'' means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: +1.9. ``Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -1.10. ``Original Code'' means Source Code of computer software code which -is described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. +1.10. ``Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.11. ``Source Code'' means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or a list of source code differential comparisons against -either the Original Code or another well known, available Covered Code of -the Contributor's choice. The Source Code can be in a compressed or archival -form, provided the appropriate decompression or de-archiving software is widely -available for no charge. +1.11. ``Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.12. ``You'' means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License. For legal entities, -``You'' includes any entity which controls, is controlled by, or is under -common control with You. For purposes of this definition, ``control'' means -(a) the power, direct or indirect, to cause the direction or management of -such entity, whether by contract or otherwise, or (b) ownership of fifty percent -(50%) or more of the outstanding shares or beneficial ownership of such entity. +1.12. ``You'' means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities,``You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, ``control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. - 2. Source Code License. +2. Source Code License. -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license, subject to third party -intellectual property claims: +2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Original Code (or portions thereof) with or without Modifications, or -as part of a Larger Work; and + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and -(b) under patents now or hereafter owned or controlled by Initial Developer, -to make, have made, use and sell (``Utilize'') the Original Code (or portions -thereof), but solely to the extent that any such patent is reasonably necessary -to enable You to Utilize the Original Code (or portions thereof) and not to -any greater extent that may be necessary to Utilize further Modifications -or combinations. + (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell (``Utilize'') the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations. -2.2. Contributor Grant. Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: +2.2. Contributor Grant. Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Modifications created by such Contributor (or portions thereof) either -on an unmodified basis, with other Modifications, as Covered Code or as part -of a Larger Work; and + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and -(b) under patents now or hereafter owned or controlled by Contributor, to -Utilize the Contributor Version (or portions thereof), but solely to the extent -that any such patent is reasonably necessary to enable You to Utilize the -Contributor Version (or portions thereof), and not to any greater extent that -may be necessary to Utilize further Modifications or combinations. + (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations. - 3. Distribution Obligations. +3. Distribution Obligations. -3.1. Application of License. The Modifications which You contribute are governed -by the terms of this License, including without limitation Section 2.2. The -Source Code version of Covered Code may be distributed only under the terms -of this License, and You must include a copy of this License with every copy -of the Source Code You distribute. You may not offer or impose any terms on -any Source Code version that alters or restricts the applicable version of -this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. +3.1. Application of License. The Modifications which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -3.2. Availability of Source Code. Any Modification which You contribute must -be made available in Source Code form under the terms of this License either -on the same media as an Executable version or via an accepted Electronic Distribution -Mechanism to anyone to whom you made an Executable version available; and -if made available via Electronic Distribution Mechanism, must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of that particular Modification -has been made available to such recipients. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. +3.2. Availability of Source Code. Any Modification which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -3.3. Description of Modifications. You must cause all Covered Code to which -you contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. +3.3. Description of Modifications. You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. - 3.4. Intellectual Property Matters +3.4. Intellectual Property Matters -(a) Third Party Claims. If You have knowledge that a party claims an intellectual -property right in particular functionality or code (or its utilization under -this License), you must include a text file with the source code distribution -titled ``LEGAL'' which describes the claim and the party making the claim -in sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after You make Your Modification available as described in -Section 3.2, You shall promptly modify the LEGAL file in all copies You make -available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Covered Code that new knowledge has been obtained. + (a) Third Party Claims. If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled ``LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. -(b) Contributor APIs. If Your Modification is an application programming interface -and You own or control patents which are reasonably necessary to implement -that API, you must also include this information in the LEGAL file. + (b) Contributor APIs. If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code, and this License in any documentation for the Source -Code, where You describe recipients' rights relating to Covered Code. If You -created one or more Modification(s), You may add your name as a Contributor -to the notice described in Exhibit A. If it is not possible to put such notice -in a particular Source Code file due to its structure, then you must include -such notice in a location (such as a relevant directory file) where a user -would be likely to look for such a notice. You may choose to offer, and to -charge a fee for, warranty, support, indemnity or liability obligations to -one or more recipients of Covered Code. However, You may do so only on Your -own behalf, and not on behalf of the Initial Developer or any Contributor. -You must make it absolutely clear than any such warranty, support, indemnity -or liability obligation is offered by You alone, and You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of warranty, support, -indemnity or liability terms You offer. +3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligations -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code under a license of Your choice, which may contain -terms different from this License, provided that You are in compliance with -the terms of this License and that the license for the Executable version -does not attempt to limit or alter the recipient's rights in the Source Code -version from the rights set forth in this License. If You distribute the Executable -version under a different license You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by the -Initial Developer or any Contributor. You hereby agree to indemnify the Initial -Developer and every Contributor for any liability incurred by the Initial -Developer or such Contributor as a result of any such terms You offer. +3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. +3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. -4. Inability to Comply Due to Statute or Regulation. If it is impossible for -You to comply with any of the terms of this License with respect to some or -all of the Covered Code due to statute or regulation then You must: (a) comply -with the terms of this License to the maximum extent possible; and (b) describe -the limitations and the code they affect. Such description must be included -in the LEGAL file described in Section 3.4 and must be included with all distributions -of the Source Code. Except to the extent prohibited by statute or regulation, -such description must be sufficiently detailed for a recipient of ordinary -skill to be able to understand it. +4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - 5. Application of this License. +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A, and to related Covered Code. +6. CONNECTION TO MOZILLA PUBLIC LICENSE +This Erlang License is a derivative work of the Mozilla Public License, Version 1.0. It contains terms which differ from the Mozilla Public License, Version 1.0. - 6. CONNECTION TO MOZILLA PUBLIC LICENSE +7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -This Erlang License is a derivative work of the Mozilla Public License, Version -1.0. It contains terms which differ from the Mozilla Public License, Version -1.0. +8. TERMINATION. +This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - 7. DISCLAIMER OF WARRANTY. +9. DISCLAIMER OF LIABILITY +Any utilization of Covered Code shall not cause the Initial Developer or any Contributor to be liable for any damages (neither direct nor indirect). -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR -A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE -DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) -ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - - 9. DISCLAIMER OF LIABILITY - -Any utilization of Covered Code shall not cause the Initial Developer or any -Contributor to be liable for any damages (neither direct nor indirect). - - 10. MISCELLANEOUS - -This License represents the complete agreement concerning the subject matter -hereof. If any provision is held to be unenforceable, such provision shall -be reformed only to the extent necessary to make it enforceable. This License -shall be construed by and in accordance with the substantive laws of Sweden. -Any dispute, controversy or claim arising out of or relating to this License, -or the breach, termination or invalidity thereof, shall be subject to the -exclusive jurisdiction of Swedish courts, with the Stockholm City Court as -the first instance. +10. MISCELLANEOUS +This License represents the complete agreement concerning the subject matter hereof. If any provision is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be construed by and in accordance with the substantive laws of Sweden. Any dispute, controversy or claim arising out of or relating to this License, or the breach, termination or invalidity thereof, shall be subject to the exclusive jurisdiction of Swedish courts, with the Stockholm City Court as the first instance. EXHIBIT A. -``The contents of this file are subject to the Erlang Public License, Version -1.1, (the "License"); you may not use this file except in compliance with -the License. You should have received a copy of the Erlang Public License -along with this software. If not, it can be retrieved via the world wide web -at http://www.erlang.org/. +``The contents of this file are subject to the Erlang Public License, Version 1.1, (the "License"); you may not use this file except in compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved via the world wide web at http://www.erlang.org/. -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -The Initial Developer of the Original Code is Ericsson Utvecklings AB. Portions -created by Ericsson are Copyright 1999, Ericsson Utvecklings AB. All Rights -Reserved.'' +The Initial Developer of the Original Code is Ericsson Utvecklings AB. Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings AB. All Rights Reserved.'' diff --git a/options/license/Eurosym b/options/license/Eurosym index 23b2b6a79..f6c255327 100644 --- a/options/license/Eurosym +++ b/options/license/Eurosym @@ -1,33 +1,18 @@ -Copyright (c) 1999-2002 Henrik Theiling - +Copyright (c) 1999-2002 Henrik Theiling Licence Version 2 +This software is provided 'as-is', without warranty of any kind, express or implied. In no event will the authors or copyright holders be held liable for any damages arising from the use of this software. +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -This software is provided 'as-is', without warranty of any kind, express or -implied. In no event will the authors or copyright holders be held liable -for any damages arising from the use of this software. + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated. -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject -to the following restrictions: + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. -1. The origin of this software must not be misrepresented; you must not claim -that you wrote the original software. If you use this software in a product, -an acknowledgment in the product documentation would be appreciated. + 3. You must not use any of the names of the authors or copyright holders of the original software for advertising or publicity pertaining to distribution without specific, written prior permission. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. + 4. If you change this software and redistribute parts or all of it in any form, you must make the source code of the altered version of this software available. -3. You must not use any of the names of the authors or copyright holders of -the original software for advertising or publicity pertaining to distribution -without specific, written prior permission. + 5. This notice may not be removed or altered from any source distribution. -4. If you change this software and redistribute parts or all of it in any -form, you must make the source code of the altered version of this software -available. - - 5. This notice may not be removed or altered from any source distribution. - -This licence is governed by the Laws of Germany. Disputes shall be settled -by Saarbruecken City Court. +This licence is governed by the Laws of Germany. Disputes shall be settled by Saarbruecken City Court. diff --git a/options/license/FSFAP b/options/license/FSFAP index 622a27684..32bc8a889 100644 --- a/options/license/FSFAP +++ b/options/license/FSFAP @@ -1,3 +1 @@ -Copying and distribution of this file, with or without modification, are permitted -in any medium without royalty provided the copyright notice and this notice -are preserved. This file is offered as-is, without any warranty. +Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. diff --git a/options/license/FSFUL b/options/license/FSFUL index 156f61adf..f976e3c9a 100644 --- a/options/license/FSFUL +++ b/options/license/FSFUL @@ -1,4 +1,3 @@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. +This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. diff --git a/options/license/FSFULLR b/options/license/FSFULLR index 073033122..2acb219e0 100644 --- a/options/license/FSFULLR +++ b/options/license/FSFULLR @@ -1,5 +1,3 @@ Copyright 1996-2006 Free Software Foundation, Inc. -This file is free software; the Free Software Foundation gives unlimited permission -to copy and/or distribute it, with or without modifications, as long as this -notice is preserved. +This file is free software; the Free Software Foundation gives unlimited permission to copy and/or distribute it, with or without modifications, as long as this notice is preserved. diff --git a/options/license/FTL b/options/license/FTL index fa5f98d6a..a47d94d10 100644 --- a/options/license/FTL +++ b/options/license/FTL @@ -1,135 +1,79 @@ The FreeType Project LICENSE -2006-Jan-27 Copyright 1996-2002, 2006 by David Turner, Robert Wilhelm, and -Werner Lemberg +2006-Jan-27 + +Copyright 1996-2002, 2006 by David Turner, Robert Wilhelm, and Werner Lemberg Introduction -The FreeType Project is distributed in several archive packages; some of them -may contain, in addition to the FreeType font engine, various tools and contributions -which rely on, or relate to, the FreeType Project. +The FreeType Project is distributed in several archive packages; some of them may contain, in addition to the FreeType font engine, various tools and contributions which rely on, or relate to, the FreeType Project. -This license applies to all files found in such packages, and which do not -fall under their own explicit license. The license affects thus the FreeType -font engine, the test programs, documentation and makefiles, at the very least. +This license applies to all files found in such packages, and which do not fall under their own explicit license. The license affects thus the FreeType font engine, the test programs, documentation and makefiles, at the very least. -This license was inspired by the BSD, Artistic, and IJG (Independent JPEG -Group) licenses, which all encourage inclusion and use of free software in -commercial and freeware products alike. As a consequence, its main points -are that: +This license was inspired by the BSD, Artistic, and IJG (Independent JPEG Group) licenses, which all encourage inclusion and use of free software in commercial and freeware products alike. As a consequence, its main points are that: -o We don't promise that this software works. However, we will be interested -in any kind of bug reports. (`as is' distribution) + o We don't promise that this software works. However, we will be interested in any kind of bug reports. (`as is' distribution) -o You can use this software for whatever you want, in parts or full form, -without having to pay us. (`royalty-free' usage) + o You can use this software for whatever you want, in parts or full form, without having to pay us. (`royalty-free' usage) -o You may not pretend that you wrote this software. If you use it, or only -parts of it, in a program, you must acknowledge somewhere in your documentation -that you have used the FreeType code. (`credits') + o You may not pretend that you wrote this software. If you use it, or only parts of it, in a program, you must acknowledge somewhere in your documentation that you have used the FreeType code. (`credits') -We specifically permit and encourage the inclusion of this software, with -or without modifications, in commercial products. We disclaim all warranties -covering The FreeType Project and assume no liability related to The FreeType -Project. +We specifically permit and encourage the inclusion of this software, with or without modifications, in commercial products. We disclaim all warranties covering The FreeType Project and assume no liability related to The FreeType Project. -Finally, many people asked us for a preferred form for a credit/disclaimer -to use in compliance with this license. We thus encourage you to use the following -text: +Finally, many people asked us for a preferred form for a credit/disclaimer to use in compliance with this license. We thus encourage you to use the following text: -""" Portions of this software are copyright © The FreeType Project -(www.freetype.org). All rights reserved. """ + """ Portions of this software are copyright © The FreeType Project (www.freetype.org). All rights reserved. """ -Please replace with the value from the FreeType version you actually -use. +Please replace with the value from the FreeType version you actually use. Legal Terms - 0. Definitions +0. Definitions -Throughout this license, the terms `package', `FreeType Project', and `FreeType -archive' refer to the set of files originally distributed by the authors (David -Turner, Robert Wilhelm, and Werner Lemberg) as the `FreeType Project', be -they named as alpha, beta or final release. +Throughout this license, the terms `package', `FreeType Project', and `FreeType archive' refer to the set of files originally distributed by the authors (David Turner, Robert Wilhelm, and Werner Lemberg) as the `FreeType Project', be they named as alpha, beta or final release. -`You' refers to the licensee, or person using the project, where `using' is -a generic term including compiling the project's source code as well as linking -it to form a `program' or `executable'. This program is referred to as `a -program using the FreeType engine'. +`You' refers to the licensee, or person using the project, where `using' is a generic term including compiling the project's source code as well as linking it to form a `program' or `executable'. This program is referred to as `a program using the FreeType engine'. -This license applies to all files distributed in the original FreeType Project, -including all source code, binaries and documentation, unless otherwise stated -in the file in its original, unmodified form as distributed in the original -archive. If you are unsure whether or not a particular file is covered by -this license, you must contact us to verify this. +This license applies to all files distributed in the original FreeType Project, including all source code, binaries and documentation, unless otherwise stated in the file in its original, unmodified form as distributed in the original archive. If you are unsure whether or not a particular file is covered by this license, you must contact us to verify this. -The FreeType Project is copyright (C) 1996-2000 by David Turner, Robert Wilhelm, -and Werner Lemberg. All rights reserved except as specified below. +The FreeType Project is copyright (C) 1996-2000 by David Turner, Robert Wilhelm, and Werner Lemberg. All rights reserved except as specified below. - 1. No Warranty +1. No Warranty -THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY -TO USE, OF THE FREETYPE PROJECT. +THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO USE, OF THE FREETYPE PROJECT. - 2. Redistribution +2. Redistribution -This license grants a worldwide, royalty-free, perpetual and irrevocable right -and license to use, execute, perform, compile, display, copy, create derivative -works of, distribute and sublicense the FreeType Project (in both source and -object code forms) and derivative works thereof for any purpose; and to authorize -others to exercise some or all of the rights granted herein, subject to the -following conditions: +This license grants a worldwide, royalty-free, perpetual and irrevocable right and license to use, execute, perform, compile, display, copy, create derivative works of, distribute and sublicense the FreeType Project (in both source and object code forms) and derivative works thereof for any purpose; and to authorize others to exercise some or all of the rights granted herein, subject to the following conditions: -o Redistribution of source code must retain this license file (`FTL.TXT') -unaltered; any additions, deletions or changes to the original files must -be clearly indicated in accompanying documentation. The copyright notices -of the unaltered, original files must be preserved in all copies of source -files. + o Redistribution of source code must retain this license file (`FTL.TXT') unaltered; any additions, deletions or changes to the original files must be clearly indicated in accompanying documentation. The copyright notices of the unaltered, original files must be preserved in all copies of source files. -o Redistribution in binary form must provide a disclaimer that states that -the software is based in part of the work of the FreeType Team, in the distribution -documentation. We also encourage you to put an URL to the FreeType web page -in your documentation, though this isn't mandatory. + o Redistribution in binary form must provide a disclaimer that states that the software is based in part of the work of the FreeType Team, in the distribution documentation. We also encourage you to put an URL to the FreeType web page in your documentation, though this isn't mandatory. -These conditions apply to any software derived from or based on the FreeType -Project, not just the unmodified files. If you use our work, you must acknowledge -us. However, no fee need be paid to us. +These conditions apply to any software derived from or based on the FreeType Project, not just the unmodified files. If you use our work, you must acknowledge us. However, no fee need be paid to us. - 3. Advertising +3. Advertising -Neither the FreeType authors and contributors nor you shall use the name of -the other for commercial, advertising, or promotional purposes without specific -prior written permission. +Neither the FreeType authors and contributors nor you shall use the name of the other for commercial, advertising, or promotional purposes without specific prior written permission. -We suggest, but do not require, that you use one or more of the following -phrases to refer to this software in your documentation or advertising materials: -`FreeType Project', `FreeType Engine', `FreeType library', or `FreeType Distribution'. +We suggest, but do not require, that you use one or more of the following phrases to refer to this software in your documentation or advertising materials: `FreeType Project', `FreeType Engine', `FreeType library', or `FreeType Distribution'. -As you have not signed this license, you are not required to accept it. However, -as the FreeType Project is copyrighted material, only this license, or another -one contracted with the authors, grants you the right to use, distribute, -and modify it. Therefore, by using, distributing, or modifying the FreeType -Project, you indicate that you understand and accept all the terms of this -license. +As you have not signed this license, you are not required to accept it. However, as the FreeType Project is copyrighted material, only this license, or another one contracted with the authors, grants you the right to use, distribute, and modify it. Therefore, by using, distributing, or modifying the FreeType Project, you indicate that you understand and accept all the terms of this license. - 4. Contacts +4. Contacts - There are two mailing lists related to FreeType: +There are two mailing lists related to FreeType: - o freetype@nongnu.org + o freetype@nongnu.org -Discusses general use and applications of FreeType, as well as future and -wanted additions to the library and distribution. If you are looking for support, -start in this list if you haven't found anything to help you in the documentation. + Discusses general use and applications of FreeType, as well as future and wanted additions to the library and distribution. If you are looking for support, start in this list if you haven't found anything to help you in the documentation. - o freetype-devel@nongnu.org + o freetype-devel@nongnu.org -Discusses bugs, as well as engine internals, design issues, specific licenses, -porting, etc. + Discusses bugs, as well as engine internals, design issues, specific licenses, porting, etc. - Our home page can be found at +Our home page can be found at - http://www.freetype.org --- end of FTL.TXT --- + http://www.freetype.org + +--- end of FTL.TXT --- diff --git a/options/license/Fair b/options/license/Fair index 964293112..32b6d6aff 100644 --- a/options/license/Fair +++ b/options/license/Fair @@ -1,7 +1,9 @@ -Fair License +Fair License -Usage of the works is permitted provided that this instrument is retained -with the works, so that any entity that uses the works is notified of this -instrument. + + +Usage of the works is permitted provided that this instrument is retained with the works, so that any entity that uses the works is notified of this instrument. DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. + +[2004, Fair License: rhid.com/fair (this URL no longer works)] diff --git a/options/license/Frameworx-1.0 b/options/license/Frameworx-1.0 index de123890a..da94f3870 100644 --- a/options/license/Frameworx-1.0 +++ b/options/license/Frameworx-1.0 @@ -1,173 +1,69 @@ THE FRAMEWORX OPEN LICENSE 1.0 -This License Agreement, The Frameworx Open License 1.0, has been entered into -between The Frameworx Company and you, the licensee hereunder, effective as -of Your acceptance of the Frameworx Code Base or an Downstream Distribution -(each as defined below). +This License Agreement, The Frameworx Open License 1.0, has been entered into between The Frameworx Company and you, the licensee hereunder, effective as of Your acceptance of the Frameworx Code Base or an Downstream Distribution (each as defined below). AGREEMENT BACKGROUND - -The Frameworx Company is committed to the belief that open source software -results in better quality, greater technical and product innovation in the -market place and a more empowered and productive developer and end-user community. -Our objective is to ensure that the Frameworx Code Base, and the source code -for improvements and innovations to it, remain free and open to the community.To -further these beliefs and objectives, we are distributing the Frameworx Code -Base, without royalties and in source code form, to the community pursuant -to this License Agreement. +The Frameworx Company is committed to the belief that open source software results in better quality, greater technical and product innovation in the market place and a more empowered and productive developer and end-user community. Our objective is to ensure that the Frameworx Code Base, and the source code for improvements and innovations to it, remain free and open to the community.To further these beliefs and objectives, we are distributing the Frameworx Code Base, without royalties and in source code form, to the community pursuant to this License Agreement. AGREEMENT TERMS - The Frameworx Company and You have agreed as follows: - 1. Definitions.The following terms have the following respective meanings: +1.Definitions.The following terms have the following respective meanings: -(a) Frameworx Code Base means the software developed by The Frameworx Company -and made available under this License Agreement + (a) Frameworx Code Base means the software developed by The Frameworx Company and made available under this License Agreement -(b) Downstream Distribution means any direct or indirect release, distribution -or remote availability of software (i) that directly or indirectly contains, -or depends for its intended functioning on, the Frameworx Code Base or any -portion or element thereof and (ii) in which rights to use and distribute -such Frameworx Code Base software depend, directly or indirectly, on the License -provided in Section 2 below. + (b) Downstream Distribution means any direct or indirect release, distribution or remote availability of software (i) that directly or indirectly contains, or depends for its intended functioning on, the Frameworx Code Base or any portion or element thereof and (ii) in which rights to use and distribute such Frameworx Code Base software depend, directly or indirectly, on the License provided in Section 2 below. -(c) "Source Code" to any software means the preferred form for making modifications -to that software, including any associated documentation, interface definition -files and compilation or installation scripts, or any version thereof that -has been compressed or archived, and can be reconstituted, using an appropriate -and generally available archival or compression technology. + (c) "Source Code" to any software means the preferred form for making modifications to that software, including any associated documentation, interface definition files and compilation or installation scripts, or any version thereof that has been compressed or archived, and can be reconstituted, using an appropriate and generally available archival or compression technology. -(d) Value-Added Services means any commercial or fee-based software-related -service, including without limitation: system or application development or -consulting; technical or end-user support or training; distribution maintenance, -configuration or versioning; or outsourced, hosted or network-based application -services. + (d) Value-Added Services means any commercial or fee-based software-related service, including without limitation: system or application development or consulting; technical or end-user support or training; distribution maintenance, configuration or versioning; or outsourced, hosted or network-based application services. -2. License Grant. Subject to the terms and conditions hereof, The Frameworx -Company hereby grants You a non-exclusive license (the License), subject to -third party intellectual property claims, and for no fee other than a nominal -charge reflecting the costs of physical distribution, to: +2. License Grant. Subject to the terms and conditions hereof, The Frameworx Company hereby grants You a non-exclusive license (the License), subject to third party intellectual property claims, and for no fee other than a nominal charge reflecting the costs of physical distribution, to: -(a) use the Frameworx Code Base, in either Source Code or machine-readable -form; + (a) use the Frameworx Code Base, in either Source Code or machine-readable form; -(b) make modifications, additions and deletions to the content or structure -of the Frameworx Code Base; or + (b) make modifications, additions and deletions to the content or structure of the Frameworx Code Base; or -(c) create larger works or derivative works including the Frameworx Code Base -or any portion or element thereof; and + (c) create larger works or derivative works including the Frameworx Code Base or any portion or element thereof; and -(d) release, distribute or make available, either generally or to any specific -third-party, any of the foregoing in Source Code or binary form. + (d) release, distribute or make available, either generally or to any specific third-party, any of the foregoing in Source Code or binary form. -3. License Conditions. The grant of the License under Section 1 hereof, and -your exercise of all rights in connection with this License Agreement, will -remain subject to the following terms and conditions, as well as to the other -provisions hereof: +3. License Conditions. The grant of the License under Section 1 hereof, and your exercise of all rights in connection with this License Agreement, will remain subject to the following terms and conditions, as well as to the other provisions hereof: -(a) Complete Source Code for any Downstream Distribution directly or indirectly -made by You that contains, or depends for its intended functionality on, the -Frameworx Code Base, or any portion or element thereof, shall be made freely -available to all users thereof on terms and conditions no more restrictive, -and no less favorable for any user (including, without limitation, with regard -to Source Code availability and royalty-free use) than those terms and conditions -provided in this License Agreement. + (a) Complete Source Code for any Downstream Distribution directly or indirectly made by You that contains, or depends for its intended functionality on, the Frameworx Code Base, or any portion or element thereof, shall be made freely available to all users thereof on terms and conditions no more restrictive, and no less favorable for any user (including, without limitation, with regard to Source Code availability and royalty-free use) than those terms and conditions provided in this License Agreement. -(b) Any Value-Added Services that you offer or provide, directly or indirectly, -in relation to any Downstream Distribution shall be offered and provided on -commercial terms that are reasonably commensurate to the fair market value -of such Value-Added Services. In addition, the terms and conditions on which -any such Value Added Services are so offered or provided shall be consistent -with, and shall fully support, the intent and purpose of this License Agreement. + (b) Any Value-Added Services that you offer or provide, directly or indirectly, in relation to any Downstream Distribution shall be offered and provided on commercial terms that are reasonably commensurate to the fair market value of such Value-Added Services. In addition, the terms and conditions on which any such Value Added Services are so offered or provided shall be consistent with, and shall fully support, the intent and purpose of this License Agreement. - (c) All Downstream Distributions shall: + (c) All Downstream Distributions shall: -(i) include all portions and elements of the Frameworx Code Base required -to build the Source Code of such Downstream Distribution into a fully functional -machine-executable system, or additional build scripts or comparable software -necessary and sufficient for such purposes; + (i) include all portions and elements of the Frameworx Code Base required to build the Source Code of such Downstream Distribution into a fully functional machine-executable system, or additional build scripts or comparable software necessary and sufficient for such purposes; -(ii) include, in each file containing any portion or element of the Frameworx -Code Base, the following identifying legend: This file contains software that -has been made available under The Frameworx Open License 1.0. Use and distribution -hereof are subject to the restrictions set forth therein. + (ii) include, in each file containing any portion or element of the Frameworx Code Base, the following identifying legend: This file contains software that has been made available under The Frameworx Open License 1.0. Use and distribution hereof are subject to the restrictions set forth therein. -(iii) include all other copyright notices, authorship credits, warranty disclaimers -(including that provided in Section 6 below), legends, documentation, annotations -and comments contained in the Frameworx Code Base as provided to You hereunder; + (iii) include all other copyright notices, authorship credits, warranty disclaimers (including that provided in Section 6 below), legends, documentation, annotations and comments contained in the Frameworx Code Base as provided to You hereunder; -(iv) contain an unaltered copy of the html file named frameworx_community_invitation.html -included within the Frameworx Code Base that acknowledges new users and provides -them with information on the Frameworx Code Base community; + (iv) contain an unaltered copy of the html file named frameworx_community_invitation.html included within the Frameworx Code Base that acknowledges new users and provides them with information on the Frameworx Code Base community; -(v) contain an unaltered copy of the text file named the_frameworx_license.txt -included within the Frameworx Code Base that includes a text copy of the form -of this License Agreement; and + (v) contain an unaltered copy of the text file named the_frameworx_license.txt included within the Frameworx Code Base that includes a text copy of the form of this License Agreement; and -(vi) prominently display to any viewer or user of the Source Code of such -Open Downstream Distribution, in the place and manner normally used for such -displays, the following legend: + (vi) prominently display to any viewer or user of the Source Code of such Open Downstream Distribution, in the place and manner normally used for such displays, the following legend: -Source code licensed under from The Frameworx Company is contained herein, -and such source code has been obtained either under The Frameworx Open License, -or another license granted by The Frameworx Company. Use and distribution -hereof is subject to the restrictions provided in the relevant such license -and to the copyrights of the licensor thereunder. A copy of The Frameworx -Open License is provided in a file named the_frameworx_license.txt and included -herein, and may also be available for inspection at http://www.frameworx.com. +Source code licensed under from The Frameworx Company is contained herein, and such source code has been obtained either under The Frameworx Open License, or another license granted by The Frameworx Company. Use and distribution hereof is subject to the restrictions provided in the relevant such license and to the copyrights of the licensor thereunder. A copy of The Frameworx Open License is provided in a file named the_frameworx_license.txt and included herein, and may also be available for inspection at http://www.frameworx.com. -4. Restrictions on Open Downstream Distributions. Each Downstream Distribution -made by You, and by any party directly or indirectly obtaining rights to the -Frameworx Code Base through You, shall be made subject to a license grant -or agreement to the extent necessary so that each distributee under that Downstream -Distribution will be subject to the same restrictions on re-distribution and -use as are binding on You hereunder. You may satisfy this licensing requirement -either by: +4. Restrictions on Open Downstream Distributions. Each Downstream Distribution made by You, and by any party directly or indirectly obtaining rights to the Frameworx Code Base through You, shall be made subject to a license grant or agreement to the extent necessary so that each distributee under that Downstream Distribution will be subject to the same restrictions on re-distribution and use as are binding on You hereunder. You may satisfy this licensing requirement either by: -(a) requiring as a condition to any Downstream Distribution made by you, or -by any direct or indirect distributee of Your Downstream Distribution (or -any portion or element thereof), that each distributee under the relevant -Downstream Distribution obtain a direct license (on the same terms and conditions -as those in this License Agreement) from The Frameworx Company; or + (a) requiring as a condition to any Downstream Distribution made by you, or by any direct or indirect distributee of Your Downstream Distribution (or any portion or element thereof), that each distributee under the relevant Downstream Distribution obtain a direct license (on the same terms and conditions as those in this License Agreement) from The Frameworx Company; or -(b) sub-licensing all (and not less than all) of Your rights and obligations -hereunder to that distributee, including (without limitation) Your obligation -to require distributees to be bound by license restrictions as contemplated -by this Section 4 above. + (b) sub-licensing all (and not less than all) of Your rights and obligations hereunder to that distributee, including (without limitation) Your obligation to require distributees to be bound by license restrictions as contemplated by this Section 4 above. -The Frameworx Company hereby grants to you all rights to sub-license your -rights hereunder as necessary to fully effect the intent and purpose of this -Section 4 above, provided, however, that your rights and obligations hereunder -shall be unaffected by any such sublicensing. In addition, The Frameworx Company -expressly retains all rights to take all appropriate action (including legal -action) against any such direct or indirect sub-licensee to ensure its full -compliance with the intent and purposes of this License Agreement. +The Frameworx Company hereby grants to you all rights to sub-license your rights hereunder as necessary to fully effect the intent and purpose of this Section 4 above, provided, however, that your rights and obligations hereunder shall be unaffected by any such sublicensing. In addition, The Frameworx Company expressly retains all rights to take all appropriate action (including legal action) against any such direct or indirect sub-licensee to ensure its full compliance with the intent and purposes of this License Agreement. -5. Intellectual Property. Except as expressly provided herein, this License -Agreement preserves and respects Your and The Frameworx Companys respective -intellectual property rights, including, in the case of The Frameworx Company, -its copyrights and patent rights relating to the Frameworx Code Base. +5. Intellectual Property. Except as expressly provided herein, this License Agreement preserves and respects Your and The Frameworx Companys respective intellectual property rights, including, in the case of The Frameworx Company, its copyrights and patent rights relating to the Frameworx Code Base. -6. Warranty Disclaimer. THE SOFTWARE LICENSED HEREUNDER IS PROVIDED ``AS IS.'' -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT, -ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE LICENSOR OF THIS SOFTWARE, BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES INCLUDING (BUT NOT LIMITED TO) PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +6. Warranty Disclaimer. THE SOFTWARE LICENSED HEREUNDER IS PROVIDED ``AS IS.'' ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT, ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE LICENSOR OF THIS SOFTWARE, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES INCLUDING (BUT NOT LIMITED TO) PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -7. License Violation. The License, and all of your rights thereunder, shall -be deemed automatically terminated and void as of any Downstream Distribution -directly or indirectly made or facilitated by You that violates the provisions -of this License Agreement, provided, however, that this License Agreement -shall survive any such termination in order to remedy the effects of such -violation. This License Agreement shall be binding on the legal successors -and assigns of the parties hereto. +7. License Violation. The License, and all of your rights thereunder, shall be deemed automatically terminated and void as of any Downstream Distribution directly or indirectly made or facilitated by You that violates the provisions of this License Agreement, provided, however, that this License Agreement shall survive any such termination in order to remedy the effects of such violation. This License Agreement shall be binding on the legal successors and assigns of the parties hereto. -Your agreement to the foregoing as of the date hereof has been evidenced by -your acceptance of the relevant software distribution hereunder. (C) THE FRAMEWORX -COMPANY 2003 +Your agreement to the foregoing as of the date hereof has been evidenced by your acceptance of the relevant software distribution hereunder. + +(C) THE FRAMEWORX COMPANY 2003 diff --git a/options/license/FreeBSD-DOC b/options/license/FreeBSD-DOC new file mode 100644 index 000000000..3023a2e94 --- /dev/null +++ b/options/license/FreeBSD-DOC @@ -0,0 +1,23 @@ +The FreeBSD Documentation License + +Copyright 1994-2021 The FreeBSD Project. All rights reserved. + +Redistribution and use in source (SGML DocBook) and 'compiled' forms (SGML, HTML, PDF, PostScript, RTF and so forth) with or without modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code (SGML DocBook) must retain the above copyright notice, this list of conditions and the following disclaimer as the first lines of this file unmodified. + + 2. Redistributions in compiled form (transformed to other DTDs, converted to PDF, PostScript, RTF and other formats) must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +THIS DOCUMENTATION IS PROVIDED BY THE FREEBSD DOCUMENTATION PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD DOCUMENTATION PROJECT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Manual Pages + +Some FreeBSD manual pages contain text from the IEEE Std 1003.1, 2004 Edition, Standard for Information Technology — Portable Operating System Interface (POSIX®) specification. These manual pages are subject to the following terms: + + The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. + + In the following statement, the phrase "this text" refers to portions of the system documentation. + + Portions of this text are reprinted and reproduced in electronic form in the FreeBSD manual pages, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology — Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright© 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at https://www.opengroup.org/membership/forums/platform/unix. + + This notice shall appear on any product containing this material. diff --git a/options/license/FreeImage b/options/license/FreeImage index 4f7a4b472..1b800d062 100644 --- a/options/license/FreeImage +++ b/options/license/FreeImage @@ -1,326 +1,117 @@ FreeImage Public License - Version 1.0 - 1. Definitions. +1. Definitions. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a - - Modification is: + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a +Modification is: -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or a list of source code differential comparisons against -either the Original Code or another well known, available Covered Code of -the Contributor's choice. The Source Code can be in a compressed or archival -form, provided the appropriate decompression or de-archiving software is widely -available for no charge. - -1.12. "You" means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of fifty percent (50%) or more -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - - 2.1. The Initial Developer Grant. - -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: - -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Original Code (or portions thereof) with or without Modifications, or -as part of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Initial Developer, -to make, have made, use and sell ("Utilize") the Original Code (or portions -thereof), but solely to the extent that any such patent is reasonably necessary -to enable You to Utilize the Original Code (or portions thereof) and not to -any greater extent that may be necessary to Utilize further Modifications -or combinations. - - 2.2. Contributor Grant. - -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: - -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Modifications created by such Contributor (or portions thereof) either -on an unmodified basis, with other Modifications, as Covered Code or as part -of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Contributor, to -Utilize the Contributor Version (or portions thereof), but solely to the extent -that any such patent is reasonably necessary to enable You to Utilize the -Contributor Version (or portions thereof), and not to any greater extent that -may be necessary to Utilize further Modifications or combinations. - - 3. Distribution Obligations. - - 3.1. Application of License. - -The Modifications which You create or to which You contribute are governed -by the terms of this License, including without limitation Section 2.2. The -Source Code version of Covered Code may be distributed only under the terms -of this License or a future version of this License released under Section -6.1, and You must include a copy of this License with every copy of the Source -Code You distribute. You may not offer or impose any terms on any Source Code -version that alters or restricts the applicable version of this License or -the recipients' rights hereunder. However, You may include an additional document -offering the additional rights described in Section 3.5. - - 3.2. Availability of Source Code. - -Any Modification which You create or to which You contribute must be made -available in Source Code form under the terms of this License either on the -same media as an Executable version or via an accepted Electronic Distribution -Mechanism to anyone to whom you made an Executable version available; and -if made available via Electronic Distribution Mechanism, must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of that particular Modification -has been made available to such recipients. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - -You must cause all Covered Code to which you contribute to contain a file -documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification -is derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - - (a) Third Party Claims. - -If You have knowledge that a party claims an intellectual property right in -particular functionality or code (or its utilization under this License), -you must include a text file with the source code distribution titled "LEGAL" -which describes the claim and the party making the claim in sufficient detail -that a recipient will know whom to contact. If you obtain such knowledge after -You make Your Modification available as described in Section 3.2, You shall -promptly modify the LEGAL file in all copies You make available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Code that new knowledge has been obtained. - - (b) Contributor APIs. - -If Your Modification is an application programming interface and You own or -control patents which are reasonably necessary to implement that API, you -must also include this information in the LEGAL file. - - 3.5. Required Notices. - -You must duplicate the notice in Exhibit A in each file of the Source Code, -and this License in any documentation for the Source Code, where You describe -recipients' rights relating to Covered Code. If You created one or more Modification(s), -You may add your name as a Contributor to the notice described in Exhibit -A. If it is not possible to put such notice in a particular Source Code file -due to its structure, then you must include such notice in a location (such -as a relevant directory file) where a user would be likely to look for such -a notice. You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered Code. -However, You may do so only on Your own behalf, and not on behalf of the Initial -Developer or any Contributor. You must make it absolutely clear than any such -warranty, support, indemnity or liability obligation is offered by You alone, -and You hereby agree to indemnify the Initial Developer and every Contributor -for any liability incurred by the Initial Developer or such Contributor as -a result of warranty, support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - -You may distribute Covered Code in Executable form only if the requirements -of Section 3.1-3.5 have been met for that Covered Code, and if You include -a notice stating that the Source Code version of the Covered Code is available -under the terms of this License, including a description of how and where -You have fulfilled the obligations of Section 3.2. The notice must be conspicuously -included in any notice in an Executable version, related documentation or -collateral in which You descr ibe recipients' rights relating to the Covered -Code. You may distribute the Executable version of Covered Code under a license -of Your choice, which may contain terms different from this License, provided -that You are in compliance with the terms of this License and that the license -for the Executable version does not attempt to limit or alter the recipient's -rights in the Source Code version from the rights set forth in this License. -If You distribute the Executable version under a different license You must -make it absolutely clear that any terms which differ from this License are -offered by You alone, not by the Initial Developer or any Contributor. You -hereby agree to indemnify the Initial Developer and every Contributor for -any liability incurred by the Initial Developer or such Contributor as a result -of any such terms You offer. - - 3.7. Larger Works. - -You may create a Larger Work by combining Covered Code with other code not -governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute or regulation -then You must: (a) comply with the terms of this License to the maximum extent -possible; and (b) describe the limitations and the code they affect. Such -description must be included in the LEGAL file described in Section 3.4 and -must be included with all distributions of the Source Code. Except to the -extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A, and to related Covered Code. - - 6. Versions of the License. - - 6.1. New Versions. - -Floris van den Berg may publish revised and/or new versions of the License -from time to time. Each version will be given a distinguishing version number. - - 6.2. Effect of New Versions. - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License published by Floris van den Berg - -No one other than Floris van den Berg has the right to modify the terms applicable -to Covered Code created under this License. - - 6.3. Derivative Works. - -If you create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), you must (a) rename Your license so that the phrases "FreeImage", -`FreeImage Public License", "FIPL", or any confusingly similar phrase do not -appear anywhere in your license and (b) otherwise make it clear that your -version of the license contains terms which differ from the FreeImage Public -License. (Filling in the name of the Initial Developer, Original Code or Contributor -in the notice described in Exhibit A shall not of themselves be deemed to -be modifications of this License.) - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER -CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF -SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, -OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL -HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING -FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by Dutch law provisions (except to the extent applicable -law, if any, provides otherwise), excluding its conflict-of-law provisions. -With respect to disputes in which at least one party is a citizen of, or an -entity chartered or registered to do business in, the The Netherlands: (a) -unless otherwise agreed in writing, all disputes relating to this License -(excepting any dispute relating to intellectual property rights) shall be -subject to final and binding arbitration, with the losing party paying all -costs of arbitration; (b) any arbitration relating to this Agreement shall -be held in Almelo, The Netherlands; and (c) any litigation relating to this -Agreement shall be subject to the jurisdiction of the court of Almelo, The -Netherlands with the losing party responsible for costs, including without -limitation, court costs and reasonable attorneys fees and expenses. Any law -or regulation which provides that the language of a contract shall be construed -against the drafter shall not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -Except in cases where another Contributor has failed to comply with Section -3.4, You are responsible for damages arising, directly or indirectly, out -of Your utilization of rights under this License, based on the number of copies -of Covered Code you made available, the revenues you received from utilizing -such rights, and other relevant factors. You agree to work with affected parties -to distribute responsibility on an equitable basis. EXHIBIT A. - -"The contents of this file are subject to the FreeImage Public License Version -1.0 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://home.wxs.nl/~flvdberg/freeimage-license.txt - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + + 1.12. "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. + The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and + + (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("Utilize") the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations. + + 2.2. Contributor Grant. + Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and + + (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + + (a) Third Party Claims. + If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You descr ibe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License,provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Floris van den Berg may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Floris van den Berg +No one other than Floris van den Berg has the right to modify the terms applicable to Covered Code created under this License. + + 6.3. Derivative Works. + If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases "FreeImage", `FreeImage Public License", "FIPL", or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the FreeImage Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. +This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by Dutch law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the The Netherlands: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Almelo, The Netherlands; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the court of Almelo, The Netherlands with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. +Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis. + +EXHIBIT A. + +"The contents of this file are subject to the FreeImage Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://home.wxs.nl/~flvdberg/freeimage-license.txt + +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. diff --git a/options/license/GCC-exception-2.0 b/options/license/GCC-exception-2.0 index 1a8c3bddf..642ecdd73 100644 --- a/options/license/GCC-exception-2.0 +++ b/options/license/GCC-exception-2.0 @@ -1 +1 @@ -In addition to the permissions in the GNU Library General Public License, the Free Software Foundation gives you unlimited permission to link the compiled version of this file into combinations with other programs, and to distribute those programs without any restriction coming from the use of this file. (The General Public License restrictions do apply in other respects; for example, they cover modification of the file, and distribution when not linked into another program .) +In addition to the permissions in the GNU General Public License, the Free Software Foundation gives you unlimited permission to link the compiled version of this file into combinations with other programs, and to distribute those combinations without any restriction coming from the use of this file. (The General Public License restrictions do apply in other respects; for example, they cover modification of the file, and distribution when not linked into a combine executable.) diff --git a/options/license/GCC-exception-3.1 b/options/license/GCC-exception-3.1 index 2172f86fb..3d8345bec 100644 --- a/options/license/GCC-exception-3.1 +++ b/options/license/GCC-exception-3.1 @@ -3,33 +3,31 @@ GCC RUNTIME LIBRARY EXCEPTION Version 3.1, 31 March 2009 General information: http://www.gnu.org/licenses/gcc-exception.html - Copyright (C) 2009 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - This GCC Runtime Library Exception ("Exception") is an additional permission under section 7 of the GNU General Public License, version 3 ("GPLv3"). It applies to a given file (the "Runtime Library") that bears a notice placed by the copyright holder of the file stating that the file is governed by GPLv3 along with this Exception. When you use GCC to compile a program, GCC may combine portions of certain GCC header files and runtime libraries with the compiled program. The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception. - 0. Definitions. +0. Definitions. - A file is an "Independent Module" if it either requires the Runtime Library for execution after a Compilation Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library. +A file is an "Independent Module" if it either requires the Runtime Library for execution after a Compilation Process, or makes use of an interface provided by the Runtime Library, but is not otherwise based on the Runtime Library. - "GCC" means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF. +"GCC" means a version of the GNU Compiler Collection, with or without modifications, governed by version 3 (or a specified later version) of the GNU General Public License (GPL) with the option of using any subsequent versions published by the FSF. - "GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC. +"GPL-compatible Software" is software whose conditions of propagation, modification and use would permit combination with GCC in accord with the license of GCC. - "Target Code" refers to output from any compiler for a real or virtual target processor architecture, in executable form or suitable for input to an assembler, loader, linker and/or execution phase. Notwithstanding that, Target Code does not include data in any format that is used as a compiler intermediate representation, or used for producing a compiler intermediate representation. +"Target Code" refers to output from any compiler for a real or virtual target processor architecture, in executable form or suitable for input to an assembler, loader, linker and/or execution phase. Notwithstanding that, Target Code does not include data in any format that is used as a compiler intermediate representation, or used for producing a compiler intermediate representation. - The "Compilation Process" transforms code entirely represented in non-intermediate languages designed for human-written code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as starting with the output of the generators or preprocessors. +The "Compilation Process" transforms code entirely represented in non-intermediate languages designed for human-written code, and/or in Java Virtual Machine byte code, into Target Code. Thus, for example, use of source code generators and preprocessors need not be considered part of the Compilation Process, since the Compilation Process can be understood as starting with the output of the generators or preprocessors. - A Compilation Process is "Eligible" if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process. +A Compilation Process is "Eligible" if it is done using GCC, alone or with other GPL-compatible software, or if it is done without using any work based on GCC. For example, using non-GPL-compatible Software to optimize any GCC intermediate representations would not qualify as an Eligible Compilation Process. - 1. Grant of Additional Permission. +1. Grant of Additional Permission. - You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPLv3, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules. +You have permission to propagate a work of Target Code formed by combining the Runtime Library with Independent Modules, even if such propagation would otherwise violate the terms of GPLv3, provided that all Target Code was generated by Eligible Compilation Processes. You may then convey such a combination under terms of your choice, consistent with the licensing of the Independent Modules. - 2. No Weakening of GCC Copyleft. +2. No Weakening of GCC Copyleft. The availability of this Exception does not imply any general presumption that third-party software is unaffected by the copyleft requirements of the license of GCC. diff --git a/options/license/GD b/options/license/GD new file mode 100644 index 000000000..534b5978c --- /dev/null +++ b/options/license/GD @@ -0,0 +1,24 @@ +Credits and license terms + +In order to resolve any possible confusion regarding the authorship of gd, the following copyright statement covers all of the authors who have required such a statement.  If you are aware of any oversights in this copyright notice, please contact Pierre-A.  Joye who will be pleased to correct them. + + • Portions copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by Cold Spring Harbor Laboratory.  Funded under Grant P41-RR02188 by the National Institutes of Health. + • Portions copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 by Boutell.Com, Inc. + • Portions relating to GD2 format copyright 1999, 2000, 2001, 2002, 2003, 2004 Philip Warner. + • Portions relating to PNG copyright 1999, 2000, 2001, 2002, 2003, 2004 Greg Roelofs. + • Portions relating to gdttf.c copyright 1999, 2000, 2001, 2002, 2003, 2004 John Ellson (ellson@graphviz.org). + • Portions relating to gdft.c copyright 2001, 2002, 2003, 2004 John Ellson (ellson@graphviz.org). + • Portions copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Pierre-Alain Joye (pierre@libgd.org). + • Portions relating to JPEG and to color quantization copyright 2000, 2001, 2002, 2003, 2004, Doug Becker and copyright © 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 Thomas G.  Lane.  This software is based in part on the work of the Independent JPEG Group.  See the file README-JPEG.TXT for more information. + • Portions relating to GIF compression copyright 1989 by Jef Poskanzer and David Rowley, with modifications for thread safety by Thomas Boutell. + • Portions relating to GIF decompression copyright 1990, 1991, 1993 by David Koblas, with modifications for thread safety by Thomas Boutell. + • Portions relating to WBMP copyright 2000, 2001, 2002, 2003, 2004 Maurice Szmurlo and Johan Van den Brande. + • Portions relating to GIF animations copyright 2004 Jaakko Hyvätti (jaakko.hyvatti@iki.fi) + +Permission has been granted to copy, distribute and modify gd in any context without fee, including a commercial application, provided that this notice is present in user-accessible supporting documentation. + +This does not affect your ownership of the derived work itself, and the intent is to assure proper credit for the authors of gd, not to interfere with your productive use of gd.  If you have questions, ask.  “Derived works” includes all programs that utilize the library.  Credit must be given in user-accessible documentation. + +This software is provided “AS IS.”  The copyright holders disclaim all warranties, either express or implied, including but not limited to implied warranties of merchantability and fitness for a particular purpose, with respect to this code and accompanying documentation. + +Although their code does not appear in the current release, the authors wish to thank David Koblas, David Rowley, and Hutchison Avenue Software Corporation for their prior contributions. diff --git a/options/license/GFDL-1.1-invariants-only b/options/license/GFDL-1.1-invariants-only index d63c80021..e60192009 100644 --- a/options/license/GFDL-1.1-invariants-only +++ b/options/license/GFDL-1.1-invariants-only @@ -1,330 +1,119 @@ GNU Free Documentation License - Version 1.1, March 2000 -Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other written -document "free" in the sense of freedom: to assure everyone the effective -freedom to copy and redistribute it, with or without modifying it, either -commercially or noncommercially. Secondarily, this License preserves for the -author and publisher a way to get credit for their work, while not being considered -responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a notice placed -by the copyright holder saying it can be distributed under the terms of this -License. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". +This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(For example, if the Document is in part a textbook of mathematics, a Secondary -Section may not explain any mathematics.) The relationship could be a matter -of historical connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, whose -contents can be viewed and edited directly and straightforwardly with generic -text editors or (for images composed of pixels) generic paint programs or -(for drawings) some widely available drawing editor, and that is suitable -for input to text formatters or for automatic translation to a variety of -formats suitable for input to text formatters. A copy made in an otherwise -Transparent file format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is not -"Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML designed for human modification. -Opaque formats include PostScript, PDF, proprietary formats that can be read -and edited only by proprietary word processors, SGML or XML for which the -DTD and/or processing tools are not generally available, and the machine-generated -HTML produced by some word processors for output purposes only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, and -the Document's license notice requires Cover Texts, you must enclose the copies -in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover -Texts on the front cover, and Back-Cover Texts on the back cover. Both covers -must also clearly and legibly identify you as the publisher of these copies. -The front cover must present the full title with all words of the title equally -prominent and visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve the title -of the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a publicly-accessible -computer-network location containing a complete Transparent copy of the Document, -free of added material, which the general network-using public has access -to download anonymously at no charge using public-standard network protocols. -If you use the latter option, you must take reasonably prudent steps, when -you begin distribution of Opaque copies in quantity, to ensure that this Transparent -copy will remain thus accessible at the stated location until at least one -year after the last time you distribute an Opaque copy (directly or through -your agents or retailers) of that edition to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has less than five). +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section entitled "History", and its title, and add to it an -item stating at least the title, year, new authors, and publisher of the Modified -Version as given on the Title Page. If there is no section entitled "History" -in the Document, create one stating the title, year, authors, and publisher -of the Document as given on its Title Page, then add an item describing the -Modified Version as stated in the previous sentence. +In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. In any section entitled "Acknowledgements" or "Dedications", preserve the -section's title, and preserve in the section all the substance and tone of -each of the contributor acknowledgements and/or dedications given therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section as "Endorsements" or to conflict in -title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. -You may add a section entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +8. TRANSLATION -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections entitled "History" in the -various original documents, forming one section entitled "History"; likewise -combine any sections entitled "Acknowledgements", and any sections entitled -"Dedications". You must delete all sections entitled "Endorsements." +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -does not as a whole count as a Modified Version of the Document, provided -no compilation copyright is claimed for the compilation. Such a compilation -is called an "aggregate", and this License does not apply to the other self-contained -works thus compiled with the Document, on account of their being thus compiled, -if they are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one quarter of the entire -aggregate, the Document's Cover Texts may be placed on covers that surround -only the Document within the aggregate. Otherwise they must appear on covers -around the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License provided that you also include the original English version -of this License. In case of a disagreement between the translation and the -original English version of this License, the original English version will -prevail. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.1 or any later version published by the Free Software Foundation; -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the -license is included in the section entitled "GNU Free Documentation License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have no Invariant Sections, write "with no Invariant Sections" instead -of saying which ones are invariant. If you have no Front-Cover Texts, write -"no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise -for Back-Cover Texts. +If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.1-invariants-or-later b/options/license/GFDL-1.1-invariants-or-later index 3a6519b4c..e60192009 100644 --- a/options/license/GFDL-1.1-invariants-or-later +++ b/options/license/GFDL-1.1-invariants-or-later @@ -1,330 +1,119 @@ GNU Free Documentation License - Version 1.1, March 2000 -Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other written -document "free" in the sense of freedom: to assure everyone the effective -freedom to copy and redistribute it, with or without modifying it, either -commercially or noncommercially. Secondarily, this License preserves for the -author and publisher a way to get credit for their work, while not being considered -responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a notice placed -by the copyright holder saying it can be distributed under the terms of this -License. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". +This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(For example, if the Document is in part a textbook of mathematics, a Secondary -Section may not explain any mathematics.) The relationship could be a matter -of historical connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, whose -contents can be viewed and edited directly and straightforwardly with generic -text editors or (for images composed of pixels) generic paint programs or -(for drawings) some widely available drawing editor, and that is suitable -for input to text formatters or for automatic translation to a variety of -formats suitable for input to text formatters. A copy made in an otherwise -Transparent file format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is not -"Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML designed for human modification. -Opaque formats include PostScript, PDF, proprietary formats that can be read -and edited only by proprietary word processors, SGML or XML for which the -DTD and/or processing tools are not generally available, and the machine-generated -HTML produced by some word processors for output purposes only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, and -the Document's license notice requires Cover Texts, you must enclose the copies -in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover -Texts on the front cover, and Back-Cover Texts on the back cover. Both covers -must also clearly and legibly identify you as the publisher of these copies. -The front cover must present the full title with all words of the title equally -prominent and visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve the title -of the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a publicly-accessible -computer-network location containing a complete Transparent copy of the Document, -free of added material, which the general network-using public has access -to download anonymously at no charge using public-standard network protocols. -If you use the latter option, you must take reasonably prudent steps, when -you begin distribution of Opaque copies in quantity, to ensure that this Transparent -copy will remain thus accessible at the stated location until at least one -year after the last time you distribute an Opaque copy (directly or through -your agents or retailers) of that edition to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has less than five). +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section entitled "History", and its title, and add to it an -item stating at least the title, year, new authors, and publisher of the Modified -Version as given on the Title Page. If there is no section entitled "History" -in the Document, create one stating the title, year, authors, and publisher -of the Document as given on its Title Page, then add an item describing the -Modified Version as stated in the previous sentence. +In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. In any section entitled "Acknowledgements" or "Dedications", preserve the -section's title, and preserve in the section all the substance and tone of -each of the contributor acknowledgements and/or dedications given therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section as "Endorsements" or to conflict in -title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. -You may add a section entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +8. TRANSLATION -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections entitled "History" in the -various original documents, forming one section entitled "History"; likewise -combine any sections entitled "Acknowledgements", and any sections entitled -"Dedications". You must delete all sections entitled "Endorsements." +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -does not as a whole count as a Modified Version of the Document, provided -no compilation copyright is claimed for the compilation. Such a compilation -is called an "aggregate", and this License does not apply to the other self-contained -works thus compiled with the Document, on account of their being thus compiled, -if they are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one quarter of the entire -aggregate, the Document's Cover Texts may be placed on covers that surround -only the Document within the aggregate. Otherwise they must appear on covers -around the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License provided that you also include the original English version -of this License. In case of a disagreement between the translation and the -original English version of this License, the original English version will -prevail. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.1 or any later version published by the Free Software Foundation; -with the Invariant Sections being LIST THEIR TITLES , with the Front-Cover -Texts being LIST , and with the Back-Cover Texts being LIST . A copy of the -license is included in the section entitled "GNU Free Documentation License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have no Invariant Sections, write "with no Invariant Sections" instead -of saying which ones are invariant. If you have no Front-Cover Texts, write -"no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise -for Back-Cover Texts. +If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.1-no-invariants-only b/options/license/GFDL-1.1-no-invariants-only index d63c80021..e60192009 100644 --- a/options/license/GFDL-1.1-no-invariants-only +++ b/options/license/GFDL-1.1-no-invariants-only @@ -1,330 +1,119 @@ GNU Free Documentation License - Version 1.1, March 2000 -Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other written -document "free" in the sense of freedom: to assure everyone the effective -freedom to copy and redistribute it, with or without modifying it, either -commercially or noncommercially. Secondarily, this License preserves for the -author and publisher a way to get credit for their work, while not being considered -responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a notice placed -by the copyright holder saying it can be distributed under the terms of this -License. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". +This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(For example, if the Document is in part a textbook of mathematics, a Secondary -Section may not explain any mathematics.) The relationship could be a matter -of historical connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, whose -contents can be viewed and edited directly and straightforwardly with generic -text editors or (for images composed of pixels) generic paint programs or -(for drawings) some widely available drawing editor, and that is suitable -for input to text formatters or for automatic translation to a variety of -formats suitable for input to text formatters. A copy made in an otherwise -Transparent file format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is not -"Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML designed for human modification. -Opaque formats include PostScript, PDF, proprietary formats that can be read -and edited only by proprietary word processors, SGML or XML for which the -DTD and/or processing tools are not generally available, and the machine-generated -HTML produced by some word processors for output purposes only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, and -the Document's license notice requires Cover Texts, you must enclose the copies -in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover -Texts on the front cover, and Back-Cover Texts on the back cover. Both covers -must also clearly and legibly identify you as the publisher of these copies. -The front cover must present the full title with all words of the title equally -prominent and visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve the title -of the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a publicly-accessible -computer-network location containing a complete Transparent copy of the Document, -free of added material, which the general network-using public has access -to download anonymously at no charge using public-standard network protocols. -If you use the latter option, you must take reasonably prudent steps, when -you begin distribution of Opaque copies in quantity, to ensure that this Transparent -copy will remain thus accessible at the stated location until at least one -year after the last time you distribute an Opaque copy (directly or through -your agents or retailers) of that edition to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has less than five). +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section entitled "History", and its title, and add to it an -item stating at least the title, year, new authors, and publisher of the Modified -Version as given on the Title Page. If there is no section entitled "History" -in the Document, create one stating the title, year, authors, and publisher -of the Document as given on its Title Page, then add an item describing the -Modified Version as stated in the previous sentence. +In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. In any section entitled "Acknowledgements" or "Dedications", preserve the -section's title, and preserve in the section all the substance and tone of -each of the contributor acknowledgements and/or dedications given therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section as "Endorsements" or to conflict in -title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. -You may add a section entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +8. TRANSLATION -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections entitled "History" in the -various original documents, forming one section entitled "History"; likewise -combine any sections entitled "Acknowledgements", and any sections entitled -"Dedications". You must delete all sections entitled "Endorsements." +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -does not as a whole count as a Modified Version of the Document, provided -no compilation copyright is claimed for the compilation. Such a compilation -is called an "aggregate", and this License does not apply to the other self-contained -works thus compiled with the Document, on account of their being thus compiled, -if they are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one quarter of the entire -aggregate, the Document's Cover Texts may be placed on covers that surround -only the Document within the aggregate. Otherwise they must appear on covers -around the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License provided that you also include the original English version -of this License. In case of a disagreement between the translation and the -original English version of this License, the original English version will -prevail. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.1 or any later version published by the Free Software Foundation; -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the -license is included in the section entitled "GNU Free Documentation License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have no Invariant Sections, write "with no Invariant Sections" instead -of saying which ones are invariant. If you have no Front-Cover Texts, write -"no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise -for Back-Cover Texts. +If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.1-no-invariants-or-later b/options/license/GFDL-1.1-no-invariants-or-later index d63c80021..e60192009 100644 --- a/options/license/GFDL-1.1-no-invariants-or-later +++ b/options/license/GFDL-1.1-no-invariants-or-later @@ -1,330 +1,119 @@ GNU Free Documentation License - Version 1.1, March 2000 -Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other written -document "free" in the sense of freedom: to assure everyone the effective -freedom to copy and redistribute it, with or without modifying it, either -commercially or noncommercially. Secondarily, this License preserves for the -author and publisher a way to get credit for their work, while not being considered -responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a notice placed -by the copyright holder saying it can be distributed under the terms of this -License. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". +This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(For example, if the Document is in part a textbook of mathematics, a Secondary -Section may not explain any mathematics.) The relationship could be a matter -of historical connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, whose -contents can be viewed and edited directly and straightforwardly with generic -text editors or (for images composed of pixels) generic paint programs or -(for drawings) some widely available drawing editor, and that is suitable -for input to text formatters or for automatic translation to a variety of -formats suitable for input to text formatters. A copy made in an otherwise -Transparent file format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is not -"Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML designed for human modification. -Opaque formats include PostScript, PDF, proprietary formats that can be read -and edited only by proprietary word processors, SGML or XML for which the -DTD and/or processing tools are not generally available, and the machine-generated -HTML produced by some word processors for output purposes only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, and -the Document's license notice requires Cover Texts, you must enclose the copies -in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover -Texts on the front cover, and Back-Cover Texts on the back cover. Both covers -must also clearly and legibly identify you as the publisher of these copies. -The front cover must present the full title with all words of the title equally -prominent and visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve the title -of the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a publicly-accessible -computer-network location containing a complete Transparent copy of the Document, -free of added material, which the general network-using public has access -to download anonymously at no charge using public-standard network protocols. -If you use the latter option, you must take reasonably prudent steps, when -you begin distribution of Opaque copies in quantity, to ensure that this Transparent -copy will remain thus accessible at the stated location until at least one -year after the last time you distribute an Opaque copy (directly or through -your agents or retailers) of that edition to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has less than five). +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section entitled "History", and its title, and add to it an -item stating at least the title, year, new authors, and publisher of the Modified -Version as given on the Title Page. If there is no section entitled "History" -in the Document, create one stating the title, year, authors, and publisher -of the Document as given on its Title Page, then add an item describing the -Modified Version as stated in the previous sentence. +In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. In any section entitled "Acknowledgements" or "Dedications", preserve the -section's title, and preserve in the section all the substance and tone of -each of the contributor acknowledgements and/or dedications given therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section as "Endorsements" or to conflict in -title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. -You may add a section entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +8. TRANSLATION -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections entitled "History" in the -various original documents, forming one section entitled "History"; likewise -combine any sections entitled "Acknowledgements", and any sections entitled -"Dedications". You must delete all sections entitled "Endorsements." +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -does not as a whole count as a Modified Version of the Document, provided -no compilation copyright is claimed for the compilation. Such a compilation -is called an "aggregate", and this License does not apply to the other self-contained -works thus compiled with the Document, on account of their being thus compiled, -if they are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one quarter of the entire -aggregate, the Document's Cover Texts may be placed on covers that surround -only the Document within the aggregate. Otherwise they must appear on covers -around the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License provided that you also include the original English version -of this License. In case of a disagreement between the translation and the -original English version of this License, the original English version will -prevail. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.1 or any later version published by the Free Software Foundation; -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the -license is included in the section entitled "GNU Free Documentation License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have no Invariant Sections, write "with no Invariant Sections" instead -of saying which ones are invariant. If you have no Front-Cover Texts, write -"no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise -for Back-Cover Texts. +If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.1-only b/options/license/GFDL-1.1-only index d63c80021..e60192009 100644 --- a/options/license/GFDL-1.1-only +++ b/options/license/GFDL-1.1-only @@ -1,330 +1,119 @@ GNU Free Documentation License - Version 1.1, March 2000 -Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other written -document "free" in the sense of freedom: to assure everyone the effective -freedom to copy and redistribute it, with or without modifying it, either -commercially or noncommercially. Secondarily, this License preserves for the -author and publisher a way to get credit for their work, while not being considered -responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a notice placed -by the copyright holder saying it can be distributed under the terms of this -License. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". +This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(For example, if the Document is in part a textbook of mathematics, a Secondary -Section may not explain any mathematics.) The relationship could be a matter -of historical connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, whose -contents can be viewed and edited directly and straightforwardly with generic -text editors or (for images composed of pixels) generic paint programs or -(for drawings) some widely available drawing editor, and that is suitable -for input to text formatters or for automatic translation to a variety of -formats suitable for input to text formatters. A copy made in an otherwise -Transparent file format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is not -"Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML designed for human modification. -Opaque formats include PostScript, PDF, proprietary formats that can be read -and edited only by proprietary word processors, SGML or XML for which the -DTD and/or processing tools are not generally available, and the machine-generated -HTML produced by some word processors for output purposes only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, and -the Document's license notice requires Cover Texts, you must enclose the copies -in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover -Texts on the front cover, and Back-Cover Texts on the back cover. Both covers -must also clearly and legibly identify you as the publisher of these copies. -The front cover must present the full title with all words of the title equally -prominent and visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve the title -of the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a publicly-accessible -computer-network location containing a complete Transparent copy of the Document, -free of added material, which the general network-using public has access -to download anonymously at no charge using public-standard network protocols. -If you use the latter option, you must take reasonably prudent steps, when -you begin distribution of Opaque copies in quantity, to ensure that this Transparent -copy will remain thus accessible at the stated location until at least one -year after the last time you distribute an Opaque copy (directly or through -your agents or retailers) of that edition to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has less than five). +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section entitled "History", and its title, and add to it an -item stating at least the title, year, new authors, and publisher of the Modified -Version as given on the Title Page. If there is no section entitled "History" -in the Document, create one stating the title, year, authors, and publisher -of the Document as given on its Title Page, then add an item describing the -Modified Version as stated in the previous sentence. +In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. In any section entitled "Acknowledgements" or "Dedications", preserve the -section's title, and preserve in the section all the substance and tone of -each of the contributor acknowledgements and/or dedications given therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section as "Endorsements" or to conflict in -title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. -You may add a section entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +8. TRANSLATION -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections entitled "History" in the -various original documents, forming one section entitled "History"; likewise -combine any sections entitled "Acknowledgements", and any sections entitled -"Dedications". You must delete all sections entitled "Endorsements." +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -does not as a whole count as a Modified Version of the Document, provided -no compilation copyright is claimed for the compilation. Such a compilation -is called an "aggregate", and this License does not apply to the other self-contained -works thus compiled with the Document, on account of their being thus compiled, -if they are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one quarter of the entire -aggregate, the Document's Cover Texts may be placed on covers that surround -only the Document within the aggregate. Otherwise they must appear on covers -around the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License provided that you also include the original English version -of this License. In case of a disagreement between the translation and the -original English version of this License, the original English version will -prevail. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.1 or any later version published by the Free Software Foundation; -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the -license is included in the section entitled "GNU Free Documentation License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have no Invariant Sections, write "with no Invariant Sections" instead -of saying which ones are invariant. If you have no Front-Cover Texts, write -"no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise -for Back-Cover Texts. +If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.1-or-later b/options/license/GFDL-1.1-or-later index d63c80021..e60192009 100644 --- a/options/license/GFDL-1.1-or-later +++ b/options/license/GFDL-1.1-or-later @@ -1,330 +1,119 @@ GNU Free Documentation License - Version 1.1, March 2000 -Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 2000 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other written -document "free" in the sense of freedom: to assure everyone the effective -freedom to copy and redistribute it, with or without modifying it, either -commercially or noncommercially. Secondarily, this License preserves for the -author and publisher a way to get credit for their work, while not being considered -responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other written document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work that contains a notice placed -by the copyright holder saying it can be distributed under the terms of this -License. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". +This License applies to any manual or other work that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(For example, if the Document is in part a textbook of mathematics, a Secondary -Section may not explain any mathematics.) The relationship could be a matter -of historical connection with the subject or with related matters, or of legal, -commercial, philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (For example, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, whose -contents can be viewed and edited directly and straightforwardly with generic -text editors or (for images composed of pixels) generic paint programs or -(for drawings) some widely available drawing editor, and that is suitable -for input to text formatters or for automatic translation to a variety of -formats suitable for input to text formatters. A copy made in an otherwise -Transparent file format whose markup has been designed to thwart or discourage -subsequent modification by readers is not Transparent. A copy that is not -"Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, whose contents can be viewed and edited directly and straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup has been designed to thwart or discourage subsequent modification by readers is not Transparent. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML designed for human modification. -Opaque formats include PostScript, PDF, proprietary formats that can be read -and edited only by proprietary word processors, SGML or XML for which the -DTD and/or processing tools are not generally available, and the machine-generated -HTML produced by some word processors for output purposes only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML designed for human modification. Opaque formats include PostScript, PDF, proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies of the Document numbering more than 100, and -the Document's license notice requires Cover Texts, you must enclose the copies -in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover -Texts on the front cover, and Back-Cover Texts on the back cover. Both covers -must also clearly and legibly identify you as the publisher of these copies. -The front cover must present the full title with all words of the title equally -prominent and visible. You may add other material on the covers in addition. -Copying with changes limited to the covers, as long as they preserve the title -of the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies of the Document numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a publicly-accessible -computer-network location containing a complete Transparent copy of the Document, -free of added material, which the general network-using public has access -to download anonymously at no charge using public-standard network protocols. -If you use the latter option, you must take reasonably prudent steps, when -you begin distribution of Opaque copies in quantity, to ensure that this Transparent -copy will remain thus accessible at the stated location until at least one -year after the last time you distribute an Opaque copy (directly or through -your agents or retailers) of that edition to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a publicly-accessible computer-network location containing a complete Transparent copy of the Document, free of added material, which the general network-using public has access to download anonymously at no charge using public-standard network protocols. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has less than five). + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section entitled "History", and its title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. In any section entitled "Acknowledgements" or "Dedications", preserve the section's title, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section as "Endorsements" or to conflict in title with any Invariant Section. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has less than five). +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section entitled "History", and its title, and add to it an -item stating at least the title, year, new authors, and publisher of the Modified -Version as given on the Title Page. If there is no section entitled "History" -in the Document, create one stating the title, year, authors, and publisher -of the Document as given on its Title Page, then add an item describing the -Modified Version as stated in the previous sentence. +In the combination, you must combine any sections entitled "History" in the various original documents, forming one section entitled "History"; likewise combine any sections entitled "Acknowledgements", and any sections entitled "Dedications". You must delete all sections entitled "Endorsements." -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. In any section entitled "Acknowledgements" or "Dedications", preserve the -section's title, and preserve in the section all the substance and tone of -each of the contributor acknowledgements and/or dedications given therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section as "Endorsements" or to conflict in -title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, does not as a whole count as a Modified Version of the Document, provided no compilation copyright is claimed for the compilation. Such a compilation is called an "aggregate", and this License does not apply to the other self-contained works thus compiled with the Document, on account of their being thus compiled, if they are not themselves derivative works of the Document. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one quarter of the entire aggregate, the Document's Cover Texts may be placed on covers that surround only the Document within the aggregate. Otherwise they must appear on covers around the whole aggregate. -You may add a section entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +8. TRANSLATION -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License provided that you also include the original English version of this License. In case of a disagreement between the translation and the original English version of this License, the original English version will prevail. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections entitled "History" in the -various original documents, forming one section entitled "History"; likewise -combine any sections entitled "Acknowledgements", and any sections entitled -"Dedications". You must delete all sections entitled "Endorsements." +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -does not as a whole count as a Modified Version of the Document, provided -no compilation copyright is claimed for the compilation. Such a compilation -is called an "aggregate", and this License does not apply to the other self-contained -works thus compiled with the Document, on account of their being thus compiled, -if they are not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one quarter of the entire -aggregate, the Document's Cover Texts may be placed on covers that surround -only the Document within the aggregate. Otherwise they must appear on covers -around the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License provided that you also include the original English version -of this License. In case of a disagreement between the translation and the -original English version of this License, the original English version will -prevail. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.1 or any later version published by the Free Software Foundation; -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the -license is included in the section entitled "GNU Free Documentation License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation; with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have no Invariant Sections, write "with no Invariant Sections" instead -of saying which ones are invariant. If you have no Front-Cover Texts, write -"no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise -for Back-Cover Texts. +If you have no Invariant Sections, write "with no Invariant Sections" instead of saying which ones are invariant. If you have no Front-Cover Texts, write "no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise for Back-Cover Texts. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.2-invariants-only b/options/license/GFDL-1.2-invariants-only index 6bfe9f559..83c375aba 100644 --- a/options/license/GFDL-1.2-invariants-only +++ b/options/license/GFDL-1.2-invariants-only @@ -1,370 +1,130 @@ GNU Free Documentation License - Version 1.2, November 2002 -Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301 USA +Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. - O. Preserve any Warranty Disclaimers. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +8. TRANSLATION -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.2 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.2-invariants-or-later b/options/license/GFDL-1.2-invariants-or-later index 99499f921..83c375aba 100644 --- a/options/license/GFDL-1.2-invariants-or-later +++ b/options/license/GFDL-1.2-invariants-or-later @@ -1,370 +1,130 @@ GNU Free Documentation License - Version 1.2, November 2002 -Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301 USA +Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. - O. Preserve any Warranty Disclaimers. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +8. TRANSLATION -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.2 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts,and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.2-no-invariants-only b/options/license/GFDL-1.2-no-invariants-only index 6bfe9f559..83c375aba 100644 --- a/options/license/GFDL-1.2-no-invariants-only +++ b/options/license/GFDL-1.2-no-invariants-only @@ -1,370 +1,130 @@ GNU Free Documentation License - Version 1.2, November 2002 -Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301 USA +Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. - O. Preserve any Warranty Disclaimers. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +8. TRANSLATION -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.2 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.2-no-invariants-or-later b/options/license/GFDL-1.2-no-invariants-or-later index 6bfe9f559..83c375aba 100644 --- a/options/license/GFDL-1.2-no-invariants-or-later +++ b/options/license/GFDL-1.2-no-invariants-or-later @@ -1,370 +1,130 @@ GNU Free Documentation License - Version 1.2, November 2002 -Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301 USA +Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. - O. Preserve any Warranty Disclaimers. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +8. TRANSLATION -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.2 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.2-only b/options/license/GFDL-1.2-only index 6bfe9f559..83c375aba 100644 --- a/options/license/GFDL-1.2-only +++ b/options/license/GFDL-1.2-only @@ -1,370 +1,130 @@ GNU Free Documentation License - Version 1.2, November 2002 -Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301 USA +Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. - O. Preserve any Warranty Disclaimers. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +8. TRANSLATION -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.2 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.2-or-later b/options/license/GFDL-1.2-or-later index 6bfe9f559..83c375aba 100644 --- a/options/license/GFDL-1.2-or-later +++ b/options/license/GFDL-1.2-or-later @@ -1,370 +1,130 @@ GNU Free Documentation License - Version 1.2, November 2002 -Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, -Fifth Floor, Boston, MA 02110-1301 USA +Copyright (C) 2000,2001,2002 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - 0. PREAMBLE +0. PREAMBLE -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. - 1. APPLICABILITY AND DEFINITIONS +1. APPLICABILITY AND DEFINITIONS -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. - 2. VERBATIM COPYING +2. VERBATIM COPYING -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. +You may also lend copies, under the same conditions stated above, and you may publicly display copies. - 3. COPYING IN QUANTITY +3. COPYING IN QUANTITY -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. - 4. MODIFICATIONS +4. MODIFICATIONS -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. + H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. - D. Preserve all the copyright notices of the Document. +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. +5. COMBINING DOCUMENTS -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. - H. Include an unaltered copy of this License. +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. +6. COLLECTIONS OF DOCUMENTS -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. +7. AGGREGATION WITH INDEPENDENT WORKS -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. - O. Preserve any Warranty Disclaimers. +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. +8. TRANSLATION -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. +9. TERMINATION - 5. COMBINING DOCUMENTS +You may not copy, modify, sublicense, or distribute the Document except as expressly provided for under this License. Any other attempt to copy, modify, sublicense or distribute the Document is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. +10. FUTURE REVISIONS OF THIS LICENSE -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided for under this License. Any other attempt to copy, modify, -sublicense or distribute the Document is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. ADDENDUM: How to use this License for your documents -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.2 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.3-invariants-only b/options/license/GFDL-1.3-invariants-only index 90f814dea..b51dc2ab1 100644 --- a/options/license/GFDL-1.3-invariants-only +++ b/options/license/GFDL-1.3-invariants-only @@ -1,416 +1,149 @@ GNU Free Documentation License +Version 1.3, 3 November 2008 -Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free -Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - - 0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. - -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. - -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. - - 1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. - -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. - -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. - -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. - -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. - -The "publisher" means any person or entity that distributes copies of the -Document to the public. - -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. - -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. - - 2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. - - 3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. - -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. - -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. - -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. - - 4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. - -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. - -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. - - D. Preserve all the copyright notices of the Document. - -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. - -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. - -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. H. Include an -unaltered copy of this License. - -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. - -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. - -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. - -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. - -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. - -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. - - O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. - -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. - -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. - - 5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. - -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. - -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". - - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense, or distribute it is void, and will automatically terminate your -rights under this License. - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, receipt -of a copy of some or all of the same material does not give you any rights -to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. -If the Document specifies that a proxy can decide which future versions of -this License can be used, that proxy's public statement of acceptance of a -version permanently authorizes you to choose that version for the Document. - - 11. RELICENSING - -"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide -Web server that publishes copyrightable works and also provides prominent -facilities for anybody to edit those works. A public wiki that anybody can -edit is an example of such a server. A "Massive Multiauthor Collaboration" -(or "MMC") contained in the site means any set of copyrightable works thus -published on the MMC site. - -"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license -published by Creative Commons Corporation, a not-for-profit corporation with -a principal place of business in San Francisco, California, as well as future -copyleft versions of that license published by that same organization. - -"Incorporate" means to publish or republish a Document, in whole or in part, -as part of another Document. - -An MMC is "eligible for relicensing" if it is licensed under this License, -and if all works that were first published under this License somewhere other -than this MMC, and subsequently incorporated in whole or in part into the -MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated -prior to November 1, 2008. - -The operator of an MMC Site may republish an MMC contained in the site under -CC-BY-SA on the same site at any time before August 1, 2009, provided the -MMC is eligible for relicensing. ADDENDUM: How to use this License for your -documents - -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: - -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.3 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: - -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. - -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. + +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. + +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. + +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. + +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and you may publicly display copies. + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. + +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. + +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. + +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. + +8. TRANSLATION + +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. + +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.3-invariants-or-later b/options/license/GFDL-1.3-invariants-or-later index 90f814dea..b51dc2ab1 100644 --- a/options/license/GFDL-1.3-invariants-or-later +++ b/options/license/GFDL-1.3-invariants-or-later @@ -1,416 +1,149 @@ GNU Free Documentation License +Version 1.3, 3 November 2008 -Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free -Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - - 0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. - -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. - -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. - - 1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. - -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. - -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. - -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. - -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. - -The "publisher" means any person or entity that distributes copies of the -Document to the public. - -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. - -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. - - 2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. - - 3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. - -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. - -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. - -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. - - 4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. - -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. - -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. - - D. Preserve all the copyright notices of the Document. - -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. - -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. - -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. H. Include an -unaltered copy of this License. - -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. - -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. - -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. - -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. - -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. - -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. - - O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. - -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. - -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. - - 5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. - -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. - -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". - - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense, or distribute it is void, and will automatically terminate your -rights under this License. - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, receipt -of a copy of some or all of the same material does not give you any rights -to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. -If the Document specifies that a proxy can decide which future versions of -this License can be used, that proxy's public statement of acceptance of a -version permanently authorizes you to choose that version for the Document. - - 11. RELICENSING - -"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide -Web server that publishes copyrightable works and also provides prominent -facilities for anybody to edit those works. A public wiki that anybody can -edit is an example of such a server. A "Massive Multiauthor Collaboration" -(or "MMC") contained in the site means any set of copyrightable works thus -published on the MMC site. - -"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license -published by Creative Commons Corporation, a not-for-profit corporation with -a principal place of business in San Francisco, California, as well as future -copyleft versions of that license published by that same organization. - -"Incorporate" means to publish or republish a Document, in whole or in part, -as part of another Document. - -An MMC is "eligible for relicensing" if it is licensed under this License, -and if all works that were first published under this License somewhere other -than this MMC, and subsequently incorporated in whole or in part into the -MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated -prior to November 1, 2008. - -The operator of an MMC Site may republish an MMC contained in the site under -CC-BY-SA on the same site at any time before August 1, 2009, provided the -MMC is eligible for relicensing. ADDENDUM: How to use this License for your -documents - -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: - -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.3 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: - -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. - -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. + +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. + +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. + +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. + +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and you may publicly display copies. + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. + +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. + +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. + +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. + +8. TRANSLATION + +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. + +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.3-no-invariants-only b/options/license/GFDL-1.3-no-invariants-only index 90f814dea..b51dc2ab1 100644 --- a/options/license/GFDL-1.3-no-invariants-only +++ b/options/license/GFDL-1.3-no-invariants-only @@ -1,416 +1,149 @@ GNU Free Documentation License +Version 1.3, 3 November 2008 -Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free -Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - - 0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. - -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. - -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. - - 1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. - -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. - -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. - -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. - -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. - -The "publisher" means any person or entity that distributes copies of the -Document to the public. - -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. - -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. - - 2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. - - 3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. - -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. - -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. - -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. - - 4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. - -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. - -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. - - D. Preserve all the copyright notices of the Document. - -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. - -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. - -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. H. Include an -unaltered copy of this License. - -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. - -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. - -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. - -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. - -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. - -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. - - O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. - -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. - -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. - - 5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. - -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. - -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". - - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense, or distribute it is void, and will automatically terminate your -rights under this License. - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, receipt -of a copy of some or all of the same material does not give you any rights -to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. -If the Document specifies that a proxy can decide which future versions of -this License can be used, that proxy's public statement of acceptance of a -version permanently authorizes you to choose that version for the Document. - - 11. RELICENSING - -"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide -Web server that publishes copyrightable works and also provides prominent -facilities for anybody to edit those works. A public wiki that anybody can -edit is an example of such a server. A "Massive Multiauthor Collaboration" -(or "MMC") contained in the site means any set of copyrightable works thus -published on the MMC site. - -"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license -published by Creative Commons Corporation, a not-for-profit corporation with -a principal place of business in San Francisco, California, as well as future -copyleft versions of that license published by that same organization. - -"Incorporate" means to publish or republish a Document, in whole or in part, -as part of another Document. - -An MMC is "eligible for relicensing" if it is licensed under this License, -and if all works that were first published under this License somewhere other -than this MMC, and subsequently incorporated in whole or in part into the -MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated -prior to November 1, 2008. - -The operator of an MMC Site may republish an MMC contained in the site under -CC-BY-SA on the same site at any time before August 1, 2009, provided the -MMC is eligible for relicensing. ADDENDUM: How to use this License for your -documents - -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: - -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.3 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: - -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. - -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. + +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. + +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. + +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. + +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and you may publicly display copies. + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. + +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. + +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. + +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. + +8. TRANSLATION + +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. + +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.3-no-invariants-or-later b/options/license/GFDL-1.3-no-invariants-or-later index 90f814dea..b51dc2ab1 100644 --- a/options/license/GFDL-1.3-no-invariants-or-later +++ b/options/license/GFDL-1.3-no-invariants-or-later @@ -1,416 +1,149 @@ GNU Free Documentation License +Version 1.3, 3 November 2008 -Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free -Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - - 0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. - -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. - -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. - - 1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. - -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. - -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. - -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. - -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. - -The "publisher" means any person or entity that distributes copies of the -Document to the public. - -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. - -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. - - 2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. - - 3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. - -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. - -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. - -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. - - 4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. - -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. - -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. - - D. Preserve all the copyright notices of the Document. - -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. - -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. - -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. H. Include an -unaltered copy of this License. - -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. - -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. - -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. - -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. - -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. - -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. - - O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. - -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. - -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. - - 5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. - -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. - -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". - - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense, or distribute it is void, and will automatically terminate your -rights under this License. - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, receipt -of a copy of some or all of the same material does not give you any rights -to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. -If the Document specifies that a proxy can decide which future versions of -this License can be used, that proxy's public statement of acceptance of a -version permanently authorizes you to choose that version for the Document. - - 11. RELICENSING - -"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide -Web server that publishes copyrightable works and also provides prominent -facilities for anybody to edit those works. A public wiki that anybody can -edit is an example of such a server. A "Massive Multiauthor Collaboration" -(or "MMC") contained in the site means any set of copyrightable works thus -published on the MMC site. - -"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license -published by Creative Commons Corporation, a not-for-profit corporation with -a principal place of business in San Francisco, California, as well as future -copyleft versions of that license published by that same organization. - -"Incorporate" means to publish or republish a Document, in whole or in part, -as part of another Document. - -An MMC is "eligible for relicensing" if it is licensed under this License, -and if all works that were first published under this License somewhere other -than this MMC, and subsequently incorporated in whole or in part into the -MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated -prior to November 1, 2008. - -The operator of an MMC Site may republish an MMC contained in the site under -CC-BY-SA on the same site at any time before August 1, 2009, provided the -MMC is eligible for relicensing. ADDENDUM: How to use this License for your -documents - -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: - -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.3 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: - -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. - -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. + +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. + +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. + +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. + +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and you may publicly display copies. + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. + +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. + +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. + +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. + +8. TRANSLATION + +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. + +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.3-only b/options/license/GFDL-1.3-only index 90f814dea..b51dc2ab1 100644 --- a/options/license/GFDL-1.3-only +++ b/options/license/GFDL-1.3-only @@ -1,416 +1,149 @@ GNU Free Documentation License +Version 1.3, 3 November 2008 -Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free -Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - - 0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. - -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. - -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. - - 1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. - -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. - -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. - -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. - -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. - -The "publisher" means any person or entity that distributes copies of the -Document to the public. - -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. - -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. - - 2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. - - 3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. - -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. - -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. - -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. - - 4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. - -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. - -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. - - D. Preserve all the copyright notices of the Document. - -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. - -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. - -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. H. Include an -unaltered copy of this License. - -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. - -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. - -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. - -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. - -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. - -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. - - O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. - -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. - -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. - - 5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. - -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. - -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". - - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense, or distribute it is void, and will automatically terminate your -rights under this License. - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, receipt -of a copy of some or all of the same material does not give you any rights -to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. -If the Document specifies that a proxy can decide which future versions of -this License can be used, that proxy's public statement of acceptance of a -version permanently authorizes you to choose that version for the Document. - - 11. RELICENSING - -"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide -Web server that publishes copyrightable works and also provides prominent -facilities for anybody to edit those works. A public wiki that anybody can -edit is an example of such a server. A "Massive Multiauthor Collaboration" -(or "MMC") contained in the site means any set of copyrightable works thus -published on the MMC site. - -"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license -published by Creative Commons Corporation, a not-for-profit corporation with -a principal place of business in San Francisco, California, as well as future -copyleft versions of that license published by that same organization. - -"Incorporate" means to publish or republish a Document, in whole or in part, -as part of another Document. - -An MMC is "eligible for relicensing" if it is licensed under this License, -and if all works that were first published under this License somewhere other -than this MMC, and subsequently incorporated in whole or in part into the -MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated -prior to November 1, 2008. - -The operator of an MMC Site may republish an MMC contained in the site under -CC-BY-SA on the same site at any time before August 1, 2009, provided the -MMC is eligible for relicensing. ADDENDUM: How to use this License for your -documents - -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: - -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.3 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: - -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. - -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. + +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. + +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. + +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. + +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and you may publicly display copies. + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. + +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. + +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. + +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. + +8. TRANSLATION + +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. + +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GFDL-1.3-or-later b/options/license/GFDL-1.3-or-later index 90f814dea..b51dc2ab1 100644 --- a/options/license/GFDL-1.3-or-later +++ b/options/license/GFDL-1.3-or-later @@ -1,416 +1,149 @@ GNU Free Documentation License +Version 1.3, 3 November 2008 -Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free -Software Foundation, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - - 0. PREAMBLE - -The purpose of this License is to make a manual, textbook, or other functional -and useful document "free" in the sense of freedom: to assure everyone the -effective freedom to copy and redistribute it, with or without modifying it, -either commercially or noncommercially. Secondarily, this License preserves -for the author and publisher a way to get credit for their work, while not -being considered responsible for modifications made by others. - -This License is a kind of "copyleft", which means that derivative works of -the document must themselves be free in the same sense. It complements the -GNU General Public License, which is a copyleft license designed for free -software. - -We have designed this License in order to use it for manuals for free software, -because free software needs free documentation: a free program should come -with manuals providing the same freedoms that the software does. But this -License is not limited to software manuals; it can be used for any textual -work, regardless of subject matter or whether it is published as a printed -book. We recommend this License principally for works whose purpose is instruction -or reference. - - 1. APPLICABILITY AND DEFINITIONS - -This License applies to any manual or other work, in any medium, that contains -a notice placed by the copyright holder saying it can be distributed under -the terms of this License. Such a notice grants a world-wide, royalty-free -license, unlimited in duration, to use that work under the conditions stated -herein. The "Document", below, refers to any such manual or work. Any member -of the public is a licensee, and is addressed as "you". You accept the license -if you copy, modify or distribute the work in a way requiring permission under -copyright law. - -A "Modified Version" of the Document means any work containing the Document -or a portion of it, either copied verbatim, or with modifications and/or translated -into another language. - -A "Secondary Section" is a named appendix or a front-matter section of the -Document that deals exclusively with the relationship of the publishers or -authors of the Document to the Document's overall subject (or to related matters) -and contains nothing that could fall directly within that overall subject. -(Thus, if the Document is in part a textbook of mathematics, a Secondary Section -may not explain any mathematics.) The relationship could be a matter of historical -connection with the subject or with related matters, or of legal, commercial, -philosophical, ethical or political position regarding them. - -The "Invariant Sections" are certain Secondary Sections whose titles are designated, -as being those of Invariant Sections, in the notice that says that the Document -is released under this License. If a section does not fit the above definition -of Secondary then it is not allowed to be designated as Invariant. The Document -may contain zero Invariant Sections. If the Document does not identify any -Invariant Sections then there are none. - -The "Cover Texts" are certain short passages of text that are listed, as Front-Cover -Texts or Back-Cover Texts, in the notice that says that the Document is released -under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover -Text may be at most 25 words. - -A "Transparent" copy of the Document means a machine-readable copy, represented -in a format whose specification is available to the general public, that is -suitable for revising the document straightforwardly with generic text editors -or (for images composed of pixels) generic paint programs or (for drawings) -some widely available drawing editor, and that is suitable for input to text -formatters or for automatic translation to a variety of formats suitable for -input to text formatters. A copy made in an otherwise Transparent file format -whose markup, or absence of markup, has been arranged to thwart or discourage -subsequent modification by readers is not Transparent. An image format is -not Transparent if used for any substantial amount of text. A copy that is -not "Transparent" is called "Opaque". - -Examples of suitable formats for Transparent copies include plain ASCII without -markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly -available DTD, and standard-conforming simple HTML, PostScript or PDF designed -for human modification. Examples of transparent image formats include PNG, -XCF and JPG. Opaque formats include proprietary formats that can be read and -edited only by proprietary word processors, SGML or XML for which the DTD -and/or processing tools are not generally available, and the machine-generated -HTML, PostScript or PDF produced by some word processors for output purposes -only. - -The "Title Page" means, for a printed book, the title page itself, plus such -following pages as are needed to hold, legibly, the material this License -requires to appear in the title page. For works in formats which do not have -any title page as such, "Title Page" means the text near the most prominent -appearance of the work's title, preceding the beginning of the body of the -text. - -The "publisher" means any person or entity that distributes copies of the -Document to the public. - -A section "Entitled XYZ" means a named subunit of the Document whose title -either is precisely XYZ or contains XYZ in parentheses following text that -translates XYZ in another language. (Here XYZ stands for a specific section -name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", -or "History".) To "Preserve the Title" of such a section when you modify the -Document means that it remains a section "Entitled XYZ" according to this -definition. - -The Document may include Warranty Disclaimers next to the notice which states -that this License applies to the Document. These Warranty Disclaimers are -considered to be included by reference in this License, but only as regards -disclaiming warranties: any other implication that these Warranty Disclaimers -may have is void and has no effect on the meaning of this License. - - 2. VERBATIM COPYING - -You may copy and distribute the Document in any medium, either commercially -or noncommercially, provided that this License, the copyright notices, and -the license notice saying this License applies to the Document are reproduced -in all copies, and that you add no other conditions whatsoever to those of -this License. You may not use technical measures to obstruct or control the -reading or further copying of the copies you make or distribute. However, -you may accept compensation in exchange for copies. If you distribute a large -enough number of copies you must also follow the conditions in section 3. - -You may also lend copies, under the same conditions stated above, and you -may publicly display copies. - - 3. COPYING IN QUANTITY - -If you publish printed copies (or copies in media that commonly have printed -covers) of the Document, numbering more than 100, and the Document's license -notice requires Cover Texts, you must enclose the copies in covers that carry, -clearly and legibly, all these Cover Texts: Front-Cover Texts on the front -cover, and Back-Cover Texts on the back cover. Both covers must also clearly -and legibly identify you as the publisher of these copies. The front cover -must present the full title with all words of the title equally prominent -and visible. You may add other material on the covers in addition. Copying -with changes limited to the covers, as long as they preserve the title of -the Document and satisfy these conditions, can be treated as verbatim copying -in other respects. - -If the required texts for either cover are too voluminous to fit legibly, -you should put the first ones listed (as many as fit reasonably) on the actual -cover, and continue the rest onto adjacent pages. - -If you publish or distribute Opaque copies of the Document numbering more -than 100, you must either include a machine-readable Transparent copy along -with each Opaque copy, or state in or with each Opaque copy a computer-network -location from which the general network-using public has access to download -using public-standard network protocols a complete Transparent copy of the -Document, free of added material. If you use the latter option, you must take -reasonably prudent steps, when you begin distribution of Opaque copies in -quantity, to ensure that this Transparent copy will remain thus accessible -at the stated location until at least one year after the last time you distribute -an Opaque copy (directly or through your agents or retailers) of that edition -to the public. - -It is requested, but not required, that you contact the authors of the Document -well before redistributing any large number of copies, to give them a chance -to provide you with an updated version of the Document. - - 4. MODIFICATIONS - -You may copy and distribute a Modified Version of the Document under the conditions -of sections 2 and 3 above, provided that you release the Modified Version -under precisely this License, with the Modified Version filling the role of -the Document, thus licensing distribution and modification of the Modified -Version to whoever possesses a copy of it. In addition, you must do these -things in the Modified Version: - -A. Use in the Title Page (and on the covers, if any) a title distinct from -that of the Document, and from those of previous versions (which should, if -there were any, be listed in the History section of the Document). You may -use the same title as a previous version if the original publisher of that -version gives permission. - -B. List on the Title Page, as authors, one or more persons or entities responsible -for authorship of the modifications in the Modified Version, together with -at least five of the principal authors of the Document (all of its principal -authors, if it has fewer than five), unless they release you from this requirement. - -C. State on the Title page the name of the publisher of the Modified Version, -as the publisher. - - D. Preserve all the copyright notices of the Document. - -E. Add an appropriate copyright notice for your modifications adjacent to -the other copyright notices. - -F. Include, immediately after the copyright notices, a license notice giving -the public permission to use the Modified Version under the terms of this -License, in the form shown in the Addendum below. - -G. Preserve in that license notice the full lists of Invariant Sections and -required Cover Texts given in the Document's license notice. H. Include an -unaltered copy of this License. - -I. Preserve the section Entitled "History", Preserve its Title, and add to -it an item stating at least the title, year, new authors, and publisher of -the Modified Version as given on the Title Page. If there is no section Entitled -"History" in the Document, create one stating the title, year, authors, and -publisher of the Document as given on its Title Page, then add an item describing -the Modified Version as stated in the previous sentence. - -J. Preserve the network location, if any, given in the Document for public -access to a Transparent copy of the Document, and likewise the network locations -given in the Document for previous versions it was based on. These may be -placed in the "History" section. You may omit a network location for a work -that was published at least four years before the Document itself, or if the -original publisher of the version it refers to gives permission. - -K. For any section Entitled "Acknowledgements" or "Dedications", Preserve -the Title of the section, and preserve in the section all the substance and -tone of each of the contributor acknowledgements and/or dedications given -therein. - -L. Preserve all the Invariant Sections of the Document, unaltered in their -text and in their titles. Section numbers or the equivalent are not considered -part of the section titles. - -M. Delete any section Entitled "Endorsements". Such a section may not be included -in the Modified Version. - -N. Do not retitle any existing section to be Entitled "Endorsements" or to -conflict in title with any Invariant Section. - - O. Preserve any Warranty Disclaimers. - -If the Modified Version includes new front-matter sections or appendices that -qualify as Secondary Sections and contain no material copied from the Document, -you may at your option designate some or all of these sections as invariant. -To do this, add their titles to the list of Invariant Sections in the Modified -Version's license notice. These titles must be distinct from any other section -titles. - -You may add a section Entitled "Endorsements", provided it contains nothing -but endorsements of your Modified Version by various parties--for example, -statements of peer review or that the text has been approved by an organization -as the authoritative definition of a standard. - -You may add a passage of up to five words as a Front-Cover Text, and a passage -of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts -in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover -Text may be added by (or through arrangements made by) any one entity. If -the Document already includes a cover text for the same cover, previously -added by you or by arrangement made by the same entity you are acting on behalf -of, you may not add another; but you may replace the old one, on explicit -permission from the previous publisher that added the old one. - -The author(s) and publisher(s) of the Document do not by this License give -permission to use their names for publicity for or to assert or imply endorsement -of any Modified Version. - - 5. COMBINING DOCUMENTS - -You may combine the Document with other documents released under this License, -under the terms defined in section 4 above for modified versions, provided -that you include in the combination all of the Invariant Sections of all of -the original documents, unmodified, and list them all as Invariant Sections -of your combined work in its license notice, and that you preserve all their -Warranty Disclaimers. - -The combined work need only contain one copy of this License, and multiple -identical Invariant Sections may be replaced with a single copy. If there -are multiple Invariant Sections with the same name but different contents, -make the title of each such section unique by adding at the end of it, in -parentheses, the name of the original author or publisher of that section -if known, or else a unique number. Make the same adjustment to the section -titles in the list of Invariant Sections in the license notice of the combined -work. - -In the combination, you must combine any sections Entitled "History" in the -various original documents, forming one section Entitled "History"; likewise -combine any sections Entitled "Acknowledgements", and any sections Entitled -"Dedications". You must delete all sections Entitled "Endorsements". - - 6. COLLECTIONS OF DOCUMENTS - -You may make a collection consisting of the Document and other documents released -under this License, and replace the individual copies of this License in the -various documents with a single copy that is included in the collection, provided -that you follow the rules of this License for verbatim copying of each of -the documents in all other respects. - -You may extract a single document from such a collection, and distribute it -individually under this License, provided you insert a copy of this License -into the extracted document, and follow this License in all other respects -regarding verbatim copying of that document. - - 7. AGGREGATION WITH INDEPENDENT WORKS - -A compilation of the Document or its derivatives with other separate and independent -documents or works, in or on a volume of a storage or distribution medium, -is called an "aggregate" if the copyright resulting from the compilation is -not used to limit the legal rights of the compilation's users beyond what -the individual works permit. When the Document is included in an aggregate, -this License does not apply to the other works in the aggregate which are -not themselves derivative works of the Document. - -If the Cover Text requirement of section 3 is applicable to these copies of -the Document, then if the Document is less than one half of the entire aggregate, -the Document's Cover Texts may be placed on covers that bracket the Document -within the aggregate, or the electronic equivalent of covers if the Document -is in electronic form. Otherwise they must appear on printed covers that bracket -the whole aggregate. - - 8. TRANSLATION - -Translation is considered a kind of modification, so you may distribute translations -of the Document under the terms of section 4. Replacing Invariant Sections -with translations requires special permission from their copyright holders, -but you may include translations of some or all Invariant Sections in addition -to the original versions of these Invariant Sections. You may include a translation -of this License, and all the license notices in the Document, and any Warranty -Disclaimers, provided that you also include the original English version of -this License and the original versions of those notices and disclaimers. In -case of a disagreement between the translation and the original version of -this License or a notice or disclaimer, the original version will prevail. - -If a section in the Document is Entitled "Acknowledgements", "Dedications", -or "History", the requirement (section 4) to Preserve its Title (section 1) -will typically require changing the actual title. - - 9. TERMINATION - -You may not copy, modify, sublicense, or distribute the Document except as -expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense, or distribute it is void, and will automatically terminate your -rights under this License. - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, receipt -of a copy of some or all of the same material does not give you any rights -to use it. - - 10. FUTURE REVISIONS OF THIS LICENSE - -The Free Software Foundation may publish new, revised versions of the GNU -Free Documentation License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. See http://www.gnu.org/copyleft/. - -Each version of the License is given a distinguishing version number. If the -Document specifies that a particular numbered version of this License "or -any later version" applies to it, you have the option of following the terms -and conditions either of that specified version or of any later version that -has been published (not as a draft) by the Free Software Foundation. If the -Document does not specify a version number of this License, you may choose -any version ever published (not as a draft) by the Free Software Foundation. -If the Document specifies that a proxy can decide which future versions of -this License can be used, that proxy's public statement of acceptance of a -version permanently authorizes you to choose that version for the Document. - - 11. RELICENSING - -"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide -Web server that publishes copyrightable works and also provides prominent -facilities for anybody to edit those works. A public wiki that anybody can -edit is an example of such a server. A "Massive Multiauthor Collaboration" -(or "MMC") contained in the site means any set of copyrightable works thus -published on the MMC site. - -"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license -published by Creative Commons Corporation, a not-for-profit corporation with -a principal place of business in San Francisco, California, as well as future -copyleft versions of that license published by that same organization. - -"Incorporate" means to publish or republish a Document, in whole or in part, -as part of another Document. - -An MMC is "eligible for relicensing" if it is licensed under this License, -and if all works that were first published under this License somewhere other -than this MMC, and subsequently incorporated in whole or in part into the -MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated -prior to November 1, 2008. - -The operator of an MMC Site may republish an MMC contained in the site under -CC-BY-SA on the same site at any time before August 1, 2009, provided the -MMC is eligible for relicensing. ADDENDUM: How to use this License for your -documents - -To use this License in a document you have written, include a copy of the -License in the document and put the following copyright and license notices -just after the title page: - -Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or -modify this document under the terms of the GNU Free Documentation License, -Version 1.3 or any later version published by the Free Software Foundation; -with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. -A copy of the license is included in the section entitled "GNU Free Documentation -License". - -If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace -the "with...Texts." line with this: - -with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover -Texts being LIST, and with the Back-Cover Texts being LIST. - -If you have Invariant Sections without Cover Texts, or some other combination -of the three, merge those two alternatives to suit the situation. - -If your document contains nontrivial examples of program code, we recommend -releasing these examples in parallel under your choice of free software license, -such as the GNU General Public License, to permit their use in free software. +Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. + +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. + +This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. + +We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. + +A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. + +The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. + +The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. + +A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. + +The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. + +The "publisher" means any person or entity that distributes copies of the Document to the public. + +A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. + +The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and you may publicly display copies. + +3. COPYING IN QUANTITY + +If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. + +If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. + +It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: + + A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. + B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. + C. State on the Title page the name of the publisher of the Modified Version, as the publisher. + D. Preserve all the copyright notices of the Document. + E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. + F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. + G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. + I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. + J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. + K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. + L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. + M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. + N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. + O. Preserve any Warranty Disclaimers. + +If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. + +You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. + +You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. + +The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. + +8. TRANSLATION + +Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. + +If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. + +11. RELICENSING + +"Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. + +"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. + +"Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. + +An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. + +The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. + +ADDENDUM: How to use this License for your documents + +To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: + + Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". + +If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: + + with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. + +If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. + +If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. diff --git a/options/license/GL2PS b/options/license/GL2PS index 2da34219c..ee2af779d 100644 --- a/options/license/GL2PS +++ b/options/license/GL2PS @@ -1,18 +1,13 @@ -GL2PS LICENSE Version 2, November 2003 Copyright (C) 2003, Christophe Geuzaine +GL2PS LICENSE Version 2, November 2003 -Permission to use, copy, and distribute this software and its documentation -for any purpose with or without fee is hereby granted, provided that the copyright -notice appear in all copies and that both that copyright notice and this permission -notice appear in supporting documentation. +Copyright (C) 2003, Christophe Geuzaine -Permission to modify and distribute modified versions of this software is -granted, provided that: +Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. - 1) the modifications are licensed under the same terms as this software; +Permission to modify and distribute modified versions of this software is granted, provided that: -2) you make available the source code of any modifications that you distribute, -either on the same media as you distribute any executable or other form of -this software, or via a mechanism generally accepted in the software development -community for the electronic transfer of data. +1) the modifications are licensed under the same terms as this software; + +2) you make available the source code of any modifications that you distribute, either on the same media as you distribute any executable or other form of this software, or via a mechanism generally accepted in the software development community for the electronic transfer of data. This software is provided "as is" without express or implied warranty. diff --git a/options/license/GLWTPL b/options/license/GLWTPL index e919dca7b..a0f7ec488 100644 --- a/options/license/GLWTPL +++ b/options/license/GLWTPL @@ -1,22 +1,25 @@ -GLWT(Good Luck With That) Public License Copyright (c) Everyone, except Author + GLWT(Good Luck With That) Public License + Copyright (c) Everyone, except Author -Everyone is permitted to copy, distribute, modify, merge, sell, publish, sublicense -or whatever they want with this software but at their OWN RISK. +Everyone is permitted to copy, distribute, modify, merge, sell, publish, +sublicense or whatever they want with this software but at their OWN RISK. -Preamble + Preamble -The author has absolutely no clue what the code in this project does. It might -just work or not, there is no third option. +The author has absolutely no clue what the code in this project does. +It might just work or not, there is no third option. -GOOD LUCK WITH THAT PUBLIC LICENSE -TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION + GOOD LUCK WITH THAT PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION, AND MODIFICATION -0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A TRACE TO -TRACK THE AUTHOR of the original product to blame for or hold responsible. + 0. You just DO WHATEVER YOU WANT TO as long as you NEVER LEAVE A +TRACE TO TRACK THE AUTHOR of the original product to blame for or hold +responsible. -IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. Good luck and Godspeed. diff --git a/options/license/GPL-1.0-only b/options/license/GPL-1.0-only index fb9886cf8..b3a222308 100644 --- a/options/license/GPL-1.0-only +++ b/options/license/GPL-1.0-only @@ -1,251 +1,100 @@ GNU GENERAL PUBLIC LICENSE - Version 1, February 1989 -Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The license agreements of most software companies try to keep users at the -mercy of those companies. By contrast, our General Public License is intended -to guarantee your freedom to share and change free software--to make sure -the software is free for all its users. The General Public License applies -to the Free Software Foundation's software and to any other program whose -authors commit to using it. You can use it for your programs, too. +The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. -When we speak of free software, we are referring to freedom, not price. Specifically, -the General Public License is designed to make sure that you have the freedom -to give away or sell copies of free software, that you receive source code -or can get it if you want it, that you can change the software or use pieces -of it in new free programs; and that you know you can do these things. +When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the software, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of a such a program, whether gratis -or for a fee, you must give the recipients all the rights that you have. You -must make sure that they, too, receive or can get the source code. And you -must tell them their rights. +For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If -the software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. -GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION -AND MODIFICATION +GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - +0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". -0. This License Agreement applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed under -the terms of this General Public License. The "Program", below, refers to -any such program or work, and a "work based on the Program" means either the -Program or any work containing the Program or a portion of it, either verbatim -or with modifications. Each licensee is addressed as "you". +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. - +2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: -1. You may copy and distribute verbatim copies of the Program's source code -as you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this General Public License and -to the absence of any warranty; and give any other recipients of the Program -a copy of this General Public License along with the Program. You may charge -a fee for the physical act of transferring a copy. + a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and - + b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). -2. You may modify your copy or copies of the Program or any portion of it, -and copy and distribute such modifications under the terms of Paragraph 1 -above, provided that you also do the following: + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. -a) cause the modified files to carry prominent notices stating that you changed -the files and the date of any change; and + d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -b) cause the whole of any work that you distribute or publish, that in whole -or in part contains the Program or any part thereof, either with or without -modifications, to be licensed at no charge to all third parties under the -terms of this General Public License (except that you may choose to grant -warranty protection to some or all third parties, at your option). +Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the simplest -and most usual way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this General -Public License. +3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: -d) You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. + a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, -Mere aggregation of another independent work with the Program (or its derivative) -on a volume of a storage or distribution medium does not bring the other work -under the scope of these terms. + b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, - + c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) -3. You may copy and distribute the Program (or a portion or derivative of -it, under Paragraph 2) in object code or executable form under the terms of -Paragraphs 1 and 2 above provided that you also do one of the following: +Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. -a) accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Paragraphs 1 and 2 above; or, +4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. -b) accompany it with a written offer, valid for at least three years, to give -any third party free (except for a nominal charge for the cost of distribution) -a complete machine-readable copy of the corresponding source code, to be distributed -under the terms of Paragraphs 1 and 2 above; or, +5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. -c) accompany it with the information you received as to where the corresponding -source code may be obtained. (This alternative is allowed only for noncommercial -distribution and only if you received the program in object code or executable -form alone.) +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. -Source code for a work means the preferred form of the work for making modifications -to it. For an executable file, complete source code means all the source code -for all modules it contains; but, as a special exception, it need not include -source code for modules which are standard libraries that accompany the operating -system on which the executable file runs, or for standard header files or -definitions files that accompany that operating system. +7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. - +Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. -4. You may not copy, modify, sublicense, distribute or transfer the Program -except as expressly provided under this General Public License. Any attempt -otherwise to copy, modify, sublicense, distribute or transfer the Program -is void, and will automatically terminate your rights to use the Program under -this License. However, parties who have received copies, or rights to use -copies, from you under this General Public License will not have their licenses -terminated so long as such parties remain in full compliance. +8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - +NO WARRANTY -5. By copying, distributing or modifying the Program (or any work based on -the Program) you indicate your acceptance of this license to do so, and all -its terms and conditions. +9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - +10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor -to copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of -the rights granted herein. - - - -7. The Free Software Foundation may publish revised and/or new versions of -the General Public License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -a version number of the license which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Program does not specify a version number of the license, you may choose any -version ever published by the Free Software Foundation. - - - -8. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing and reuse -of software generally. - - - - NO WARRANTY - -9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - - -10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest possible -use to humanity, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. +If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright -(C) 19yy + Copyright (C) 19yy -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 1, or (at your option) any later version. + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this when -it starts in an interactive mode: +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: -Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes -with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, -and you are welcome to redistribute it under certain conditions; type `show -c' for details. + Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than `show w' and `show c'; they could even be mouse-clicks -or menu items--whatever suits your program. +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here -a sample; alter the names: +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: -Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' -(a program to direct compilers to make passes at assemblers) written by James -Hacker. + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. -, 1 April 1989 Ty Coon, President of Vice + , 1 April 1989 Ty Coon, President of Vice That's all there is to it! diff --git a/options/license/GPL-1.0-or-later b/options/license/GPL-1.0-or-later index b616110c7..b3a222308 100644 --- a/options/license/GPL-1.0-or-later +++ b/options/license/GPL-1.0-or-later @@ -1,232 +1,100 @@ GNU GENERAL PUBLIC LICENSE - Version 1, February 1989 -Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, -Boston, MA 02110-1301 USA +Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The license agreements of most software companies try to keep users at the -mercy of those companies. By contrast, our General Public License is intended -to guarantee your freedom to share and change free software--to make sure -the software is free for all its users. The General Public License applies -to the Free Software Foundation's software and to any other program whose -authors commit to using it. You can use it for your programs, too. +The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. -When we speak of free software, we are referring to freedom, not price. Specifically, -the General Public License is designed to make sure that you have the freedom -to give away or sell copies of free software, that you receive source code -or can get it if you want it, that you can change the software or use pieces -of it in new free programs; and that you know you can do these things. +When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the software, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of a such a program, whether gratis -or for a fee, you must give the recipients all the rights that you have. You -must make sure that they, too, receive or can get the source code. And you -must tell them their rights. +For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If -the software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. -GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION -AND MODIFICATION +GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed under -the terms of this General Public License. The "Program", below, refers to -any such program or work, and a "work based on the Program" means either the -Program or any work containing the Program or a portion of it, either verbatim -or with modifications. Each licensee is addressed as "you". +0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". -1. You may copy and distribute verbatim copies of the Program's source code -as you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this General Public License and -to the absence of any warranty; and give any other recipients of the Program -a copy of this General Public License along with the Program. You may charge -a fee for the physical act of transferring a copy. +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. -2. You may modify your copy or copies of the Program or any portion of it, -and copy and distribute such modifications under the terms of Paragraph 1 -above, provided that you also do the following: +2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: -a) cause the modified files to carry prominent notices stating that you changed -the files and the date of any change; and + a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and -b) cause the whole of any work that you distribute or publish, that in whole -or in part contains the Program or any part thereof, either with or without -modifications, to be licensed at no charge to all third parties under the -terms of this General Public License (except that you may choose to grant -warranty protection to some or all third parties, at your option). + b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the simplest -and most usual way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this General -Public License. + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. -d) You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. + d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -Mere aggregation of another independent work with the Program (or its derivative) -on a volume of a storage or distribution medium does not bring the other work -under the scope of these terms. +Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. -3. You may copy and distribute the Program (or a portion or derivative of -it, under Paragraph 2) in object code or executable form under the terms of -Paragraphs 1 and 2 above provided that you also do one of the following: +3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: -a) accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Paragraphs 1 and 2 above; or, + a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, -b) accompany it with a written offer, valid for at least three years, to give -any third party free (except for a nominal charge for the cost of distribution) -a complete machine-readable copy of the corresponding source code, to be distributed -under the terms of Paragraphs 1 and 2 above; or, + b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, -c) accompany it with the information you received as to where the corresponding -source code may be obtained. (This alternative is allowed only for noncommercial -distribution and only if you received the program in object code or executable -form alone.) + c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) -Source code for a work means the preferred form of the work for making modifications -to it. For an executable file, complete source code means all the source code -for all modules it contains; but, as a special exception, it need not include -source code for modules which are standard libraries that accompany the operating -system on which the executable file runs, or for standard header files or -definitions files that accompany that operating system. +Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. -4. You may not copy, modify, sublicense, distribute or transfer the Program -except as expressly provided under this General Public License. Any attempt -otherwise to copy, modify, sublicense, distribute or transfer the Program -is void, and will automatically terminate your rights to use the Program under -this License. However, parties who have received copies, or rights to use -copies, from you under this General Public License will not have their licenses -terminated so long as such parties remain in full compliance. +4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. -5. By copying, distributing or modifying the Program (or any work based on -the Program) you indicate your acceptance of this license to do so, and all -its terms and conditions. +5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor -to copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of -the rights granted herein. +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. -7. The Free Software Foundation may publish revised and/or new versions of -the General Public License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. +7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program specifies -a version number of the license which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Program does not specify a version number of the license, you may choose any -version ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. -8. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing and reuse -of software generally. +8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - +NO WARRANTY - NO WARRANTY 9. +9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE -PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest possible -use to humanity, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. +If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - + Copyright (C) 19yy -Copyright (C) 19yy + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 1, or (at your option) any later version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 675 Mass -Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. -If the program is interactive, make it output a short notice like this when -it starts in an interactive mode: +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: -Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes -with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, -and you are welcome to redistribute it under certain conditions; type `show -c' for details. + Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than `show w' and `show c'; they could even be mouse-clicks -or menu items--whatever suits your program. +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here -a sample; alter the names: +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: -Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' -(a program to direct compilers to make passes at assemblers) written by James -Hacker. + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. -, 1 April 1989 Ty Coon, President of Vice + , 1 April 1989 Ty Coon, President of Vice That's all there is to it! diff --git a/options/license/GPL-2.0-only b/options/license/GPL-2.0-only index 0f3d6411d..17cb28643 100644 --- a/options/license/GPL-2.0-only +++ b/options/license/GPL-2.0-only @@ -1,319 +1,117 @@ GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 -Copyright (C) 1989, 1991 Free Software Foundation, Inc. +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public License is intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to -most of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software -is covered by the GNU Lesser General Public License instead.) You can apply -it to your programs, too. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the software, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of such a program, whether gratis or -for a fee, you must give the recipients all the rights that you have. You -must make sure that they, too, receive or can get the source code. And you -must show them these terms so they know their rights. +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If -the software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will individually -obtain patent licenses, in effect making the program proprietary. To prevent -this, we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms -of this General Public License. The "Program", below, refers to any such program -or work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or translated -into another language. (Hereinafter, translation is included without limitation -in the term "modification".) Each licensee is addressed as "you". +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program -is not restricted, and the output from the Program is covered only if its -contents constitute a work based on the Program (independent of having been -made by running the Program). Whether that is true depends on what the Program -does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. -1. You may copy and distribute verbatim copies of the Program's source code -as you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this License and to the absence -of any warranty; and give any other recipients of the Program a copy of this -License along with the Program. +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: -a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. -b) You must cause any work that you distribute or publish, that in whole or -in part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print -such an announcement, your work based on the Program is not required to print -an announcement.) + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Program, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Program. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. -In addition, mere aggregation of another work not based on the Program with -the Program (or with a work based on the Program) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. You may copy and distribute the Program (or a work based on it, under Section -2) in object code or executable form under the terms of Sections 1 and 2 above -provided that you also do one of the following: +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: -a) Accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, -b) Accompany it with a written offer, valid for at least three years, to give -any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 1 and 2 above on -a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, -c) Accompany it with the information you received as to the offer to distribute -corresponding source code. (This alternative is allowed only for noncommercial -distribution and only if you received the program in object code or executable -form with such an offer, in accord with Subsection b above.) + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code distributed -need not include anything that is normally distributed (in either source or -binary form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component itself -accompanies the executable. +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with -the object code. +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. -4. You may not copy, modify, sublicense, or distribute the Program except -as expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -5. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Program -(or any work based on the Program), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor -to copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of -the rights granted herein. You are not responsible for enforcing compliance -by third parties to this License. +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -7. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Program at all. For example, if a -patent license would not permit royalty-free redistribution of the Program -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Program. +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system, which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Program under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -9. The Free Software Foundation may publish revised and/or new versions of -the General Public License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Program does not specify a version number of this License, you may choose -any version ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing and reuse -of software generally. +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY +NO WARRANTY -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - + one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author -Copyright (C)< yyyy> + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 51 Franklin -Street, Fifth Floor, Boston, MA 02110-1301, USA. +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: -Also add information on how to contact you by electronic and paper mail. + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. -If the program is interactive, make it output a short notice like this when -it starts in an interactive mode: +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. -Gnomovision version 69, Copyright (C) year name of author Gnomovision comes -with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, -and you are welcome to redistribute it under certain conditions; type `show -c' for details. +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than `show w' and `show c'; they could even be mouse-clicks -or menu items--whatever suits your program. + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here -is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' -(which makes passes at compilers) written by James Hacker. - -, 1 April 1989 Ty Coon, President of Vice This General -Public License does not permit incorporating your program into proprietary -programs. If your program is a subroutine library, you may consider it more -useful to permit linking proprietary applications with the library. If this -is what you want to do, use the GNU Lesser General Public License instead -of this License. +signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice diff --git a/options/license/GPL-2.0-or-later b/options/license/GPL-2.0-or-later index 1d80ac365..17cb28643 100644 --- a/options/license/GPL-2.0-or-later +++ b/options/license/GPL-2.0-or-later @@ -1,319 +1,117 @@ GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 -Copyright (C) 1989, 1991 Free Software Foundation, Inc. +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public License is intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. This General Public License applies to -most of the Free Software Foundation's software and to any other program whose -authors commit to using it. (Some other Free Software Foundation software -is covered by the GNU Lesser General Public License instead.) You can apply -it to your programs, too. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the software, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. -For example, if you distribute copies of such a program, whether gratis or -for a fee, you must give the recipients all the rights that you have. You -must make sure that they, too, receive or can get the source code. And you -must show them these terms so they know their rights. +For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -We protect your rights with two steps: (1) copyright the software, and (2) -offer you this license which gives you legal permission to copy, distribute -and/or modify the software. +We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. -Also, for each author's protection and ours, we want to make certain that -everyone understands that there is no warranty for this free software. If -the software is modified by someone else and passed on, we want its recipients -to know that what they have is not the original, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that redistributors of a free program will individually -obtain patent licenses, in effect making the program proprietary. To prevent -this, we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License applies to any program or other work which contains a notice -placed by the copyright holder saying it may be distributed under the terms -of this General Public License. The "Program", below, refers to any such program -or work, and a "work based on the Program" means either the Program or any -derivative work under copyright law: that is to say, a work containing the -Program or a portion of it, either verbatim or with modifications and/or translated -into another language. (Hereinafter, translation is included without limitation -in the term "modification".) Each licensee is addressed as "you". +0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running the Program -is not restricted, and the output from the Program is covered only if its -contents constitute a work based on the Program (independent of having been -made by running the Program). Whether that is true depends on what the Program -does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. -1. You may copy and distribute verbatim copies of the Program's source code -as you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this License and to the absence -of any warranty; and give any other recipients of the Program a copy of this -License along with the Program. +1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Program or any portion of it, -thus forming a work based on the Program, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: -a) You must cause the modified files to carry prominent notices stating that -you changed the files and the date of any change. + a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. -b) You must cause any work that you distribute or publish, that in whole or -in part contains or is derived from the Program or any part thereof, to be -licensed as a whole at no charge to all third parties under the terms of this -License. + b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. -c) If the modified program normally reads commands interactively when run, -you must cause it, when started running for such interactive use in the most -ordinary way, to print or display an announcement including an appropriate -copyright notice and a notice that there is no warranty (or else, saying that -you provide a warranty) and that users may redistribute the program under -these conditions, and telling the user how to view a copy of this License. -(Exception: if the Program itself is interactive but does not normally print -such an announcement, your work based on the Program is not required to print -an announcement.) + c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Program, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Program, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Program. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. -In addition, mere aggregation of another work not based on the Program with -the Program (or with a work based on the Program) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. You may copy and distribute the Program (or a work based on it, under Section -2) in object code or executable form under the terms of Sections 1 and 2 above -provided that you also do one of the following: +3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: -a) Accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Sections 1 and 2 above on a medium -customarily used for software interchange; or, + a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, -b) Accompany it with a written offer, valid for at least three years, to give -any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 1 and 2 above on -a medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, -c) Accompany it with the information you received as to the offer to distribute -corresponding source code. (This alternative is allowed only for noncommercial -distribution and only if you received the program in object code or executable -form with such an offer, in accord with Subsection b above.) + c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) -The source code for a work means the preferred form of the work for making -modifications to it. For an executable work, complete source code means all -the source code for all modules it contains, plus any associated interface -definition files, plus the scripts used to control compilation and installation -of the executable. However, as a special exception, the source code distributed -need not include anything that is normally distributed (in either source or -binary form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component itself -accompanies the executable. +The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -If distribution of executable or object code is made by offering access to -copy from a designated place, then offering equivalent access to copy the -source code from the same place counts as distribution of the source code, -even though third parties are not compelled to copy the source along with -the object code. +If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. -4. You may not copy, modify, sublicense, or distribute the Program except -as expressly provided under this License. Any attempt otherwise to copy, modify, -sublicense or distribute the Program is void, and will automatically terminate -your rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses terminated -so long as such parties remain in full compliance. +4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -5. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Program or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Program -(or any work based on the Program), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. +5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. -6. Each time you redistribute the Program (or any work based on the Program), -the recipient automatically receives a license from the original licensor -to copy, distribute or modify the Program subject to these terms and conditions. -You may not impose any further restrictions on the recipients' exercise of -the rights granted herein. You are not responsible for enforcing compliance -by third parties to this License. +6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -7. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Program at all. For example, if a -patent license would not permit royalty-free redistribution of the Program -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Program. +7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply and -the section as a whole is intended to apply in other circumstances. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system, which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -8. If the distribution and/or use of the Program is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Program under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -9. The Free Software Foundation may publish revised and/or new versions of -the General Public License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. +9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Program specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Program does not specify a version number of this License, you may choose -any version ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. -10. If you wish to incorporate parts of the Program into other free programs -whose distribution conditions are different, write to the author to ask for -permission. For software which is copyrighted by the Free Software Foundation, -write to the Free Software Foundation; we sometimes make exceptions for this. -Our decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing and reuse -of software generally. +10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY +NO WARRANTY -11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively convey the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - + one line to give the program's name and an idea of what it does. Copyright (C) yyyy name of author -Copyright (C) + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This program is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation; either version 2 of the License, or (at your option) any later -version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. -You should have received a copy of the GNU General Public License along with -this program; if not, write to the Free Software Foundation, Inc., 51 Franklin -Street, Fifth Floor, Boston, MA 02110-1301, USA. +If the program is interactive, make it output a short notice like this when it starts in an interactive mode: -Also add information on how to contact you by electronic and paper mail. + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. -If the program is interactive, make it output a short notice like this when -it starts in an interactive mode: +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. -Gnomovision version 69, Copyright (C) year name of author Gnomovision comes -with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, -and you are welcome to redistribute it under certain conditions; type `show -c' for details. +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may be -called something other than `show w' and `show c'; they could even be mouse-clicks -or menu items--whatever suits your program. + Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the program, if necessary. Here -is a sample; alter the names: - -Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' -(which makes passes at compilers) written by James Hacker. - -, 1 April 1989 Ty Coon, President of Vice This General -Public License does not permit incorporating your program into proprietary -programs. If your program is a subroutine library, you may consider it more -useful to permit linking proprietary applications with the library. If this -is what you want to do, use the GNU Lesser General Public License instead -of this License. +signature of Ty Coon, 1 April 1989 Ty Coon, President of Vice diff --git a/options/license/GPL-3.0-linking-exception b/options/license/GPL-3.0-linking-exception index 76e4173d5..56096c070 100644 --- a/options/license/GPL-3.0-linking-exception +++ b/options/license/GPL-3.0-linking-exception @@ -1,3 +1,3 @@ Additional permission under GNU GPL version 3 section 7 -If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license] , the licensors of this Program grant you additional permission to convey the resulting work. +If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. diff --git a/options/license/GPL-3.0-linking-source-exception b/options/license/GPL-3.0-linking-source-exception index 83d5c0453..58a1d1b3a 100644 --- a/options/license/GPL-3.0-linking-source-exception +++ b/options/license/GPL-3.0-linking-source-exception @@ -1,3 +1,3 @@ Additional permission under GNU GPL version 3 section 7 -If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license] , the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work. +If you modify this Program, or any covered work, by linking or combining it with [name of library] (or a modified version of that library), containing parts covered by the terms of [name of library's license], the licensors of this Program grant you additional permission to convey the resulting work. Corresponding Source for a non-source form of such a combination shall include the source code for the parts of [name of library] used as well as that of the covered work. diff --git a/options/license/GPL-3.0-only b/options/license/GPL-3.0-only index e142a525b..d41c0bd98 100644 --- a/options/license/GPL-3.0-only +++ b/options/license/GPL-3.0-only @@ -1,625 +1,232 @@ GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 -Copyright © 2007 Free Software Foundation, Inc. +Copyright © 2007 Free Software Foundation, Inc. -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The GNU General Public License is a free, copyleft license for software and -other kinds of works. +The GNU General Public License is a free, copyleft license for software and other kinds of works. -The licenses for most software and other practical works are designed to take -away your freedom to share and change the works. By contrast, the GNU General -Public License is intended to guarantee your freedom to share and change all -versions of a program--to make sure it remains free software for all its users. -We, the Free Software Foundation, use the GNU General Public License for most -of our software; it applies also to any other work released this way by its -authors. You can apply it to your programs, too. +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for them if you wish), that -you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs, and that you know you -can do these things. +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. -To protect your rights, we need to prevent others from denying you these rights -or asking you to surrender the rights. Therefore, you have certain responsibilities -if you distribute copies of the software, or if you modify it: responsibilities -to respect the freedom of others. +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. -For example, if you distribute copies of such a program, whether gratis or -for a fee, you must pass on to the recipients the same freedoms that you received. -You must make sure that they, too, receive or can get the source code. And -you must show them these terms so they know their rights. +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -Developers that use the GNU GPL protect your rights with two steps: (1) assert -copyright on the software, and (2) offer you this License giving you legal -permission to copy, distribute and/or modify it. +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. -For the developers' and authors' protection, the GPL clearly explains that -there is no warranty for this free software. For both users' and authors' -sake, the GPL requires that modified versions be marked as changed, so that -their problems will not be attributed erroneously to authors of previous versions. +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. -Some devices are designed to deny users access to install or run modified -versions of the software inside them, although the manufacturer can do so. -This is fundamentally incompatible with the aim of protecting users' freedom -to change the software. The systematic pattern of such abuse occurs in the -area of products for individuals to use, which is precisely where it is most -unacceptable. Therefore, we have designed this version of the GPL to prohibit -the practice for those products. If such problems arise substantially in other -domains, we stand ready to extend this provision to those domains in future -versions of the GPL, as needed to protect the freedom of users. +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. -Finally, every program is threatened constantly by software patents. States -should not allow patents to restrict development and use of software on general-purpose -computers, but in those that do, we wish to avoid the special danger that -patents applied to a free program could make it effectively proprietary. To -prevent this, the GPL assures that patents cannot be used to render the program -non-free. +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, -such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. -Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals -or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in -a fashion requiring copyright permission, other than the making of an exact -copy. The resulting work is called a "modified version" of the earlier work -or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the -Program. - -To "propagate" a work means to do anything with it that, without permission, -would make you directly or secondarily liable for infringement under applicable -copyright law, except executing it on a computer or modifying a private copy. -Propagation includes copying, distribution (with or without modification), -making available to the public, and in some countries other activities as -well. - -To "convey" a work means any kind of propagation that enables other parties -to make or receive copies. Mere interaction with a user through a computer -network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the -extent that it includes a convenient and prominently visible feature that -(1) displays an appropriate copyright notice, and (2) tells the user that -there is no warranty for the work (except to the extent that warranties are -provided), that licensees may convey the work under this License, and how -to view a copy of this License. If the interface presents a list of user commands -or options, such as a menu, a prominent item in the list meets this criterion. - - 1. Source Code. - -The "source code" for a work means the preferred form of the work for making -modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard -defined by a recognized standards body, or, in the case of interfaces specified -for a particular programming language, one that is widely used among developers -working in that language. - -The "System Libraries" of an executable work include anything, other than -the work as a whole, that (a) is included in the normal form of packaging -a Major Component, but which is not part of that Major Component, and (b) -serves only to enable use of the work with that Major Component, or to implement -a Standard Interface for which an implementation is available to the public -in source code form. A "Major Component", in this context, means a major essential -component (kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to produce -the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source -code needed to generate, install, and (for an executable work) run the object -code and to modify the work, including scripts to control those activities. -However, it does not include the work's System Libraries, or general-purpose -tools or generally available free programs which are used unmodified in performing -those activities but which are not part of the work. For example, Corresponding -Source includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically linked -subprograms that the work is specifically designed to require, such as by -intimate data communication or control flow between those subprograms and -other parts of the work. - -The Corresponding Source need not include anything that users can regenerate -automatically from other parts of the Corresponding Source. - - The Corresponding Source for a work in source code form is that same work. - - 2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright -on the Program, and are irrevocable provided the stated conditions are met. -This License explicitly affirms your unlimited permission to run the unmodified -Program. The output from running a covered work is covered by this License -only if the output, given its content, constitutes a covered work. This License -acknowledges your rights of fair use or other equivalent, as provided by copyright -law. - -You may make, run and propagate covered works that you do not convey, without -conditions so long as your license otherwise remains in force. You may convey -covered works to others for the sole purpose of having them make modifications -exclusively for you, or provide you with facilities for running those works, -provided that you comply with the terms of this License in conveying all material -for which you do not control copyright. Those thus making or running the covered -works for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of your copyrighted -material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions -stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure -under any applicable law fulfilling obligations under article 11 of the WIPO -copyright treaty adopted on 20 December 1996, or similar laws prohibiting -or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention -of technological measures to the extent such circumvention is effected by -exercising rights under this License with respect to the covered work, and -you disclaim any intention to limit operation or modification of the work -as a means of enforcing, against the work's users, your or third parties' -legal rights to forbid circumvention of technological measures. - - 4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive -it, in any medium, provided that you conspicuously and appropriately publish -on each copy an appropriate copyright notice; keep intact all notices stating -that this License and any non-permissive terms added in accord with section -7 apply to the code; keep intact all notices of the absence of any warranty; -and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you -may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce -it from the Program, in the form of source code under the terms of section -4, provided that you also meet all of these conditions: - -a) The work must carry prominent notices stating that you modified it, and -giving a relevant date. - -b) The work must carry prominent notices stating that it is released under -this License and any conditions added under section 7. This requirement modifies -the requirement in section 4 to "keep intact all notices". - -c) You must license the entire work, as a whole, under this License to anyone -who comes into possession of a copy. This License will therefore apply, along -with any applicable section 7 additional terms, to the whole of the work, -and all its parts, regardless of how they are packaged. This License gives -no permission to license the work in any other way, but it does not invalidate -such permission if you have separately received it. - -d) If the work has interactive user interfaces, each must display Appropriate -Legal Notices; however, if the Program has interactive interfaces that do -not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, -which are not by their nature extensions of the covered work, and which are -not combined with it such as to form a larger program, in or on a volume of -a storage or distribution medium, is called an "aggregate" if the compilation -and its resulting copyright are not used to limit the access or legal rights -of the compilation's users beyond what the individual works permit. Inclusion -of a covered work in an aggregate does not cause this License to apply to -the other parts of the aggregate. - - 6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections -4 and 5, provided that you also convey the machine-readable Corresponding -Source under the terms of this License, in one of these ways: - -a) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by the Corresponding Source fixed -on a durable physical medium customarily used for software interchange. - -b) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by a written offer, valid for -at least three years and valid for as long as you offer spare parts or customer -support for that product model, to give anyone who possesses the object code -either (1) a copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical medium customarily -used for software interchange, for a price no more than your reasonable cost -of physically performing this conveying of source, or (2) access to copy the -Corresponding Source from a network server at no charge. - -c) Convey individual copies of the object code with a copy of the written -offer to provide the Corresponding Source. This alternative is allowed only -occasionally and noncommercially, and only if you received the object code -with such an offer, in accord with subsection 6b. - -d) Convey the object code by offering access from a designated place (gratis -or for a charge), and offer equivalent access to the Corresponding Source -in the same way through the same place at no further charge. You need not -require recipients to copy the Corresponding Source along with the object -code. If the place to copy the object code is a network server, the Corresponding -Source may be on a different server (operated by you or a third party) that -supports equivalent copying facilities, provided you maintain clear directions -next to the object code saying where to find the Corresponding Source. Regardless -of what server hosts the Corresponding Source, you remain obligated to ensure -that it is available for as long as needed to satisfy these requirements. - -e) Convey the object code using peer-to-peer transmission, provided you inform -other peers where the object code and Corresponding Source of the work are -being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from -the Corresponding Source as a System Library, need not be included in conveying -the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible -personal property which is normally used for personal, family, or household -purposes, or (2) anything designed or sold for incorporation into a dwelling. -In determining whether a product is a consumer product, doubtful cases shall -be resolved in favor of coverage. For a particular product received by a particular -user, "normally used" refers to a typical or common use of that class of product, -regardless of the status of the particular user or of the way in which the -particular user actually uses, or expects or is expected to use, the product. -A product is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent the -only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, -authorization keys, or other information required to install and execute modified -versions of a covered work in that User Product from a modified version of -its Corresponding Source. The information must suffice to ensure that the -continued functioning of the modified object code is in no case prevented -or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically -for use in, a User Product, and the conveying occurs as part of a transaction -in which the right of possession and use of the User Product is transferred -to the recipient in perpetuity or for a fixed term (regardless of how the -transaction is characterized), the Corresponding Source conveyed under this -section must be accompanied by the Installation Information. But this requirement -does not apply if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has been installed -in ROM). - -The requirement to provide Installation Information does not include a requirement -to continue to provide support service, warranty, or updates for a work that -has been modified or installed by the recipient, or for the User Product in -which it has been modified or installed. Access to a network may be denied -when the modification itself materially and adversely affects the operation -of the network or violates the rules and protocols for communication across -the network. - -Corresponding Source conveyed, and Installation Information provided, in accord -with this section must be in a format that is publicly documented (and with -an implementation available to the public in source code form), and must require -no special password or key for unpacking, reading or copying. - - 7. Additional Terms. - -"Additional permissions" are terms that supplement the terms of this License -by making exceptions from one or more of its conditions. Additional permissions -that are applicable to the entire Program shall be treated as though they -were included in this License, to the extent that they are valid under applicable -law. If additional permissions apply only to part of the Program, that part -may be used separately under those permissions, but the entire Program remains -governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any -additional permissions from that copy, or from any part of it. (Additional -permissions may be written to require their own removal in certain cases when -you modify the work.) You may place additional permissions on material, added -by you to a covered work, for which you have or can give appropriate copyright -permission. - -Notwithstanding any other provision of this License, for material you add -to a covered work, you may (if authorized by the copyright holders of that -material) supplement the terms of this License with terms: - -a) Disclaiming warranty or limiting liability differently from the terms of -sections 15 and 16 of this License; or - -b) Requiring preservation of specified reasonable legal notices or author -attributions in that material or in the Appropriate Legal Notices displayed -by works containing it; or - -c) Prohibiting misrepresentation of the origin of that material, or requiring -that modified versions of such material be marked in reasonable ways as different -from the original version; or - -d) Limiting the use for publicity purposes of names of licensors or authors -of the material; or - -e) Declining to grant rights under trademark law for use of some trade names, -trademarks, or service marks; or - -f) Requiring indemnification of licensors and authors of that material by -anyone who conveys the material (or modified versions of it) with contractual -assumptions of liability to the recipient, for any liability that these contractual -assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" -within the meaning of section 10. If the Program as you received it, or any -part of it, contains a notice stating that it is governed by this License -along with a term that is a further restriction, you may remove that term. -If a license document contains a further restriction but permits relicensing -or conveying under this License, you may add to a covered work material governed -by the terms of that license document, provided that the further restriction -does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, -in the relevant source files, a statement of the additional terms that apply -to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form -of a separately written license, or stated as exceptions; the above requirements -apply either way. - - 8. Termination. - -You may not propagate or modify a covered work except as expressly provided -under this License. Any attempt otherwise to propagate or modify it is void, -and will automatically terminate your rights under this License (including -any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, you do -not qualify to receive new licenses for the same material under section 10. - - 9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy -of the Program. Ancillary propagation of a covered work occurring solely as -a consequence of using peer-to-peer transmission to receive a copy likewise -does not require acceptance. However, nothing other than this License grants -you permission to propagate or modify any covered work. These actions infringe -copyright if you do not accept this License. Therefore, by modifying or propagating -a covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives -a license from the original licensors, to run, modify and propagate that work, -subject to this License. You are not responsible for enforcing compliance -by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, -or substantially all assets of one, or subdividing an organization, or merging -organizations. If propagation of a covered work results from an entity transaction, -each party to that transaction who receives a copy of the work also receives -whatever licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the Corresponding -Source of the work from the predecessor in interest, if the predecessor has -it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights -granted or affirmed under this License. For example, you may not impose a -license fee, royalty, or other charge for exercise of rights granted under -this License, and you may not initiate litigation (including a cross-claim -or counterclaim in a lawsuit) alleging that any patent claim is infringed -by making, using, selling, offering for sale, or importing the Program or -any portion of it. - - 11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License -of the Program or a work on which the Program is based. The work thus licensed -is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled -by the contributor, whether already acquired or hereafter acquired, that would -be infringed by some manner, permitted by this License, of making, using, -or selling its contributor version, but do not include claims that would be -infringed only as a consequence of further modification of the contributor -version. For purposes of this definition, "control" includes the right to -grant patent sublicenses in a manner consistent with the requirements of this -License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent -license under the contributor's essential patent claims, to make, use, sell, -offer for sale, import and otherwise run, modify and propagate the contents -of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement -or commitment, however denominated, not to enforce a patent (such as an express -permission to practice a patent or covenant not to sue for patent infringement). -To "grant" such a patent license to a party means to make such an agreement -or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the -Corresponding Source of the work is not available for anyone to copy, free -of charge and under the terms of this License, through a publicly available -network server or other readily accessible means, then you must either (1) -cause the Corresponding Source to be so available, or (2) arrange to deprive -yourself of the benefit of the patent license for this particular work, or -(3) arrange, in a manner consistent with the requirements of this License, -to extend the patent license to downstream recipients. "Knowingly relying" -means you have actual knowledge that, but for the patent license, your conveying -the covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that country -that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, -you convey, or propagate by procuring conveyance of, a covered work, and grant -a patent license to some of the parties receiving the covered work authorizing -them to use, propagate, modify or convey a specific copy of the covered work, -then the patent license you grant is automatically extended to all recipients -of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope -of its coverage, prohibits the exercise of, or is conditioned on the non-exercise -of one or more of the rights that are specifically granted under this License. -You may not convey a covered work if you are a party to an arrangement with -a third party that is in the business of distributing software, under which -you make payment to the third party based on the extent of your activity of -conveying the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory patent -license (a) in connection with copies of the covered work conveyed by you -(or copies made from those copies), or (b) primarily for and in connection -with specific products or compilations that contain the covered work, unless -you entered into that arrangement, or that patent license was granted, prior -to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied -license or other defenses to infringement that may otherwise be available -to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) -that contradict the conditions of this License, they do not excuse you from -the conditions of this License. If you cannot convey a covered work so as -to satisfy simultaneously your obligations under this License and any other -pertinent obligations, then as a consequence you may not convey it at all. -For example, if you agree to terms that obligate you to collect a royalty -for further conveying from those to whom you convey the Program, the only -way you could satisfy both those terms and this License would be to refrain -entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - -Notwithstanding any other provision of this License, you have permission to -link or combine any covered work with a work licensed under version 3 of the -GNU Affero General Public License into a single combined work, and to convey -the resulting work. The terms of this License will continue to apply to the -part which is the covered work, but the special requirements of the GNU Affero -General Public License, section 13, concerning interaction through a network -will apply to the combination as such. - - 14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the -GNU General Public License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -that a certain numbered version of the GNU General Public License "or any -later version" applies to it, you have the option of following the terms and -conditions either of that numbered version or of any later version published -by the Free Software Foundation. If the Program does not specify a version -number of the GNU General Public License, you may choose any version ever -published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of -the GNU General Public License can be used, that proxy's public statement -of acceptance of a version permanently authorizes you to choose that version -for the Program. - -Later license versions may give you additional or different permissions. However, -no additional obligations are imposed on any author or copyright holder as -a result of your choosing to follow a later version. - - 15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE -LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM -PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - - 16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM -AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO -USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot -be given local legal effect according to their terms, reviewing courts shall -apply local law that most closely approximates an absolute waiver of all civil -liability in connection with the Program, unless a warranty or assumption -of liability accompanies a copy of the Program in return for a fee. END OF -TERMS AND CONDITIONS +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively state the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. - + + Copyright (C) -Copyright (C) + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see . + You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If the program does terminal interaction, make it output a short notice like -this when it starts in an interactive mode: +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. -This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. -This is free software, and you are welcome to redistribute it under certain -conditions; type `show c' for details. +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands might -be different; for a GUI interface, you would use an "about box". - -You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. For -more information on this, and how to apply and follow the GNU GPL, see . - -The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General Public -License instead of this License. But first, please read . +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/options/license/GPL-3.0-or-later b/options/license/GPL-3.0-or-later index e142a525b..d41c0bd98 100644 --- a/options/license/GPL-3.0-or-later +++ b/options/license/GPL-3.0-or-later @@ -1,625 +1,232 @@ GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 -Copyright © 2007 Free Software Foundation, Inc. +Copyright © 2007 Free Software Foundation, Inc. -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble -The GNU General Public License is a free, copyleft license for software and -other kinds of works. +The GNU General Public License is a free, copyleft license for software and other kinds of works. -The licenses for most software and other practical works are designed to take -away your freedom to share and change the works. By contrast, the GNU General -Public License is intended to guarantee your freedom to share and change all -versions of a program--to make sure it remains free software for all its users. -We, the Free Software Foundation, use the GNU General Public License for most -of our software; it applies also to any other work released this way by its -authors. You can apply it to your programs, too. +The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for them if you wish), that -you receive source code or can get it if you want it, that you can change -the software or use pieces of it in new free programs, and that you know you -can do these things. +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. -To protect your rights, we need to prevent others from denying you these rights -or asking you to surrender the rights. Therefore, you have certain responsibilities -if you distribute copies of the software, or if you modify it: responsibilities -to respect the freedom of others. +To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. -For example, if you distribute copies of such a program, whether gratis or -for a fee, you must pass on to the recipients the same freedoms that you received. -You must make sure that they, too, receive or can get the source code. And -you must show them these terms so they know their rights. +For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. -Developers that use the GNU GPL protect your rights with two steps: (1) assert -copyright on the software, and (2) offer you this License giving you legal -permission to copy, distribute and/or modify it. +Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. -For the developers' and authors' protection, the GPL clearly explains that -there is no warranty for this free software. For both users' and authors' -sake, the GPL requires that modified versions be marked as changed, so that -their problems will not be attributed erroneously to authors of previous versions. +For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. -Some devices are designed to deny users access to install or run modified -versions of the software inside them, although the manufacturer can do so. -This is fundamentally incompatible with the aim of protecting users' freedom -to change the software. The systematic pattern of such abuse occurs in the -area of products for individuals to use, which is precisely where it is most -unacceptable. Therefore, we have designed this version of the GPL to prohibit -the practice for those products. If such problems arise substantially in other -domains, we stand ready to extend this provision to those domains in future -versions of the GPL, as needed to protect the freedom of users. +Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. -Finally, every program is threatened constantly by software patents. States -should not allow patents to restrict development and use of software on general-purpose -computers, but in those that do, we wish to avoid the special danger that -patents applied to a free program could make it effectively proprietary. To -prevent this, the GPL assures that patents cannot be used to render the program -non-free. +Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. -The precise terms and conditions for copying, distribution and modification -follow. +The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS - 0. Definitions. - - "This License" refers to version 3 of the GNU General Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, -such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. -Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals -or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in -a fashion requiring copyright permission, other than the making of an exact -copy. The resulting work is called a "modified version" of the earlier work -or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the -Program. - -To "propagate" a work means to do anything with it that, without permission, -would make you directly or secondarily liable for infringement under applicable -copyright law, except executing it on a computer or modifying a private copy. -Propagation includes copying, distribution (with or without modification), -making available to the public, and in some countries other activities as -well. - -To "convey" a work means any kind of propagation that enables other parties -to make or receive copies. Mere interaction with a user through a computer -network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the -extent that it includes a convenient and prominently visible feature that -(1) displays an appropriate copyright notice, and (2) tells the user that -there is no warranty for the work (except to the extent that warranties are -provided), that licensees may convey the work under this License, and how -to view a copy of this License. If the interface presents a list of user commands -or options, such as a menu, a prominent item in the list meets this criterion. - - 1. Source Code. - -The "source code" for a work means the preferred form of the work for making -modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard -defined by a recognized standards body, or, in the case of interfaces specified -for a particular programming language, one that is widely used among developers -working in that language. - -The "System Libraries" of an executable work include anything, other than -the work as a whole, that (a) is included in the normal form of packaging -a Major Component, but which is not part of that Major Component, and (b) -serves only to enable use of the work with that Major Component, or to implement -a Standard Interface for which an implementation is available to the public -in source code form. A "Major Component", in this context, means a major essential -component (kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to produce -the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source -code needed to generate, install, and (for an executable work) run the object -code and to modify the work, including scripts to control those activities. -However, it does not include the work's System Libraries, or general-purpose -tools or generally available free programs which are used unmodified in performing -those activities but which are not part of the work. For example, Corresponding -Source includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically linked -subprograms that the work is specifically designed to require, such as by -intimate data communication or control flow between those subprograms and -other parts of the work. - -The Corresponding Source need not include anything that users can regenerate -automatically from other parts of the Corresponding Source. - - The Corresponding Source for a work in source code form is that same work. - - 2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright -on the Program, and are irrevocable provided the stated conditions are met. -This License explicitly affirms your unlimited permission to run the unmodified -Program. The output from running a covered work is covered by this License -only if the output, given its content, constitutes a covered work. This License -acknowledges your rights of fair use or other equivalent, as provided by copyright -law. - -You may make, run and propagate covered works that you do not convey, without -conditions so long as your license otherwise remains in force. You may convey -covered works to others for the sole purpose of having them make modifications -exclusively for you, or provide you with facilities for running those works, -provided that you comply with the terms of this License in conveying all material -for which you do not control copyright. Those thus making or running the covered -works for you must do so exclusively on your behalf, under your direction -and control, on terms that prohibit them from making any copies of your copyrighted -material outside their relationship with you. - -Conveying under any other circumstances is permitted solely under the conditions -stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure -under any applicable law fulfilling obligations under article 11 of the WIPO -copyright treaty adopted on 20 December 1996, or similar laws prohibiting -or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention -of technological measures to the extent such circumvention is effected by -exercising rights under this License with respect to the covered work, and -you disclaim any intention to limit operation or modification of the work -as a means of enforcing, against the work's users, your or third parties' -legal rights to forbid circumvention of technological measures. - - 4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive -it, in any medium, provided that you conspicuously and appropriately publish -on each copy an appropriate copyright notice; keep intact all notices stating -that this License and any non-permissive terms added in accord with section -7 apply to the code; keep intact all notices of the absence of any warranty; -and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you -may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce -it from the Program, in the form of source code under the terms of section -4, provided that you also meet all of these conditions: - -a) The work must carry prominent notices stating that you modified it, and -giving a relevant date. - -b) The work must carry prominent notices stating that it is released under -this License and any conditions added under section 7. This requirement modifies -the requirement in section 4 to "keep intact all notices". - -c) You must license the entire work, as a whole, under this License to anyone -who comes into possession of a copy. This License will therefore apply, along -with any applicable section 7 additional terms, to the whole of the work, -and all its parts, regardless of how they are packaged. This License gives -no permission to license the work in any other way, but it does not invalidate -such permission if you have separately received it. - -d) If the work has interactive user interfaces, each must display Appropriate -Legal Notices; however, if the Program has interactive interfaces that do -not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, -which are not by their nature extensions of the covered work, and which are -not combined with it such as to form a larger program, in or on a volume of -a storage or distribution medium, is called an "aggregate" if the compilation -and its resulting copyright are not used to limit the access or legal rights -of the compilation's users beyond what the individual works permit. Inclusion -of a covered work in an aggregate does not cause this License to apply to -the other parts of the aggregate. - - 6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections -4 and 5, provided that you also convey the machine-readable Corresponding -Source under the terms of this License, in one of these ways: - -a) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by the Corresponding Source fixed -on a durable physical medium customarily used for software interchange. - -b) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by a written offer, valid for -at least three years and valid for as long as you offer spare parts or customer -support for that product model, to give anyone who possesses the object code -either (1) a copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical medium customarily -used for software interchange, for a price no more than your reasonable cost -of physically performing this conveying of source, or (2) access to copy the -Corresponding Source from a network server at no charge. - -c) Convey individual copies of the object code with a copy of the written -offer to provide the Corresponding Source. This alternative is allowed only -occasionally and noncommercially, and only if you received the object code -with such an offer, in accord with subsection 6b. - -d) Convey the object code by offering access from a designated place (gratis -or for a charge), and offer equivalent access to the Corresponding Source -in the same way through the same place at no further charge. You need not -require recipients to copy the Corresponding Source along with the object -code. If the place to copy the object code is a network server, the Corresponding -Source may be on a different server (operated by you or a third party) that -supports equivalent copying facilities, provided you maintain clear directions -next to the object code saying where to find the Corresponding Source. Regardless -of what server hosts the Corresponding Source, you remain obligated to ensure -that it is available for as long as needed to satisfy these requirements. - -e) Convey the object code using peer-to-peer transmission, provided you inform -other peers where the object code and Corresponding Source of the work are -being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from -the Corresponding Source as a System Library, need not be included in conveying -the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible -personal property which is normally used for personal, family, or household -purposes, or (2) anything designed or sold for incorporation into a dwelling. -In determining whether a product is a consumer product, doubtful cases shall -be resolved in favor of coverage. For a particular product received by a particular -user, "normally used" refers to a typical or common use of that class of product, -regardless of the status of the particular user or of the way in which the -particular user actually uses, or expects or is expected to use, the product. -A product is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent the -only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, -authorization keys, or other information required to install and execute modified -versions of a covered work in that User Product from a modified version of -its Corresponding Source. The information must suffice to ensure that the -continued functioning of the modified object code is in no case prevented -or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically -for use in, a User Product, and the conveying occurs as part of a transaction -in which the right of possession and use of the User Product is transferred -to the recipient in perpetuity or for a fixed term (regardless of how the -transaction is characterized), the Corresponding Source conveyed under this -section must be accompanied by the Installation Information. But this requirement -does not apply if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has been installed -in ROM). - -The requirement to provide Installation Information does not include a requirement -to continue to provide support service, warranty, or updates for a work that -has been modified or installed by the recipient, or for the User Product in -which it has been modified or installed. Access to a network may be denied -when the modification itself materially and adversely affects the operation -of the network or violates the rules and protocols for communication across -the network. - -Corresponding Source conveyed, and Installation Information provided, in accord -with this section must be in a format that is publicly documented (and with -an implementation available to the public in source code form), and must require -no special password or key for unpacking, reading or copying. - - 7. Additional Terms. - -"Additional permissions" are terms that supplement the terms of this License -by making exceptions from one or more of its conditions. Additional permissions -that are applicable to the entire Program shall be treated as though they -were included in this License, to the extent that they are valid under applicable -law. If additional permissions apply only to part of the Program, that part -may be used separately under those permissions, but the entire Program remains -governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any -additional permissions from that copy, or from any part of it. (Additional -permissions may be written to require their own removal in certain cases when -you modify the work.) You may place additional permissions on material, added -by you to a covered work, for which you have or can give appropriate copyright -permission. - -Notwithstanding any other provision of this License, for material you add -to a covered work, you may (if authorized by the copyright holders of that -material) supplement the terms of this License with terms: - -a) Disclaiming warranty or limiting liability differently from the terms of -sections 15 and 16 of this License; or - -b) Requiring preservation of specified reasonable legal notices or author -attributions in that material or in the Appropriate Legal Notices displayed -by works containing it; or - -c) Prohibiting misrepresentation of the origin of that material, or requiring -that modified versions of such material be marked in reasonable ways as different -from the original version; or - -d) Limiting the use for publicity purposes of names of licensors or authors -of the material; or - -e) Declining to grant rights under trademark law for use of some trade names, -trademarks, or service marks; or - -f) Requiring indemnification of licensors and authors of that material by -anyone who conveys the material (or modified versions of it) with contractual -assumptions of liability to the recipient, for any liability that these contractual -assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" -within the meaning of section 10. If the Program as you received it, or any -part of it, contains a notice stating that it is governed by this License -along with a term that is a further restriction, you may remove that term. -If a license document contains a further restriction but permits relicensing -or conveying under this License, you may add to a covered work material governed -by the terms of that license document, provided that the further restriction -does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, -in the relevant source files, a statement of the additional terms that apply -to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form -of a separately written license, or stated as exceptions; the above requirements -apply either way. - - 8. Termination. - -You may not propagate or modify a covered work except as expressly provided -under this License. Any attempt otherwise to propagate or modify it is void, -and will automatically terminate your rights under this License (including -any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, you do -not qualify to receive new licenses for the same material under section 10. - - 9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy -of the Program. Ancillary propagation of a covered work occurring solely as -a consequence of using peer-to-peer transmission to receive a copy likewise -does not require acceptance. However, nothing other than this License grants -you permission to propagate or modify any covered work. These actions infringe -copyright if you do not accept this License. Therefore, by modifying or propagating -a covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives -a license from the original licensors, to run, modify and propagate that work, -subject to this License. You are not responsible for enforcing compliance -by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, -or substantially all assets of one, or subdividing an organization, or merging -organizations. If propagation of a covered work results from an entity transaction, -each party to that transaction who receives a copy of the work also receives -whatever licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the Corresponding -Source of the work from the predecessor in interest, if the predecessor has -it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights -granted or affirmed under this License. For example, you may not impose a -license fee, royalty, or other charge for exercise of rights granted under -this License, and you may not initiate litigation (including a cross-claim -or counterclaim in a lawsuit) alleging that any patent claim is infringed -by making, using, selling, offering for sale, or importing the Program or -any portion of it. - - 11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License -of the Program or a work on which the Program is based. The work thus licensed -is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled -by the contributor, whether already acquired or hereafter acquired, that would -be infringed by some manner, permitted by this License, of making, using, -or selling its contributor version, but do not include claims that would be -infringed only as a consequence of further modification of the contributor -version. For purposes of this definition, "control" includes the right to -grant patent sublicenses in a manner consistent with the requirements of this -License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent -license under the contributor's essential patent claims, to make, use, sell, -offer for sale, import and otherwise run, modify and propagate the contents -of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement -or commitment, however denominated, not to enforce a patent (such as an express -permission to practice a patent or covenant not to sue for patent infringement). -To "grant" such a patent license to a party means to make such an agreement -or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the -Corresponding Source of the work is not available for anyone to copy, free -of charge and under the terms of this License, through a publicly available -network server or other readily accessible means, then you must either (1) -cause the Corresponding Source to be so available, or (2) arrange to deprive -yourself of the benefit of the patent license for this particular work, or -(3) arrange, in a manner consistent with the requirements of this License, -to extend the patent license to downstream recipients. "Knowingly relying" -means you have actual knowledge that, but for the patent license, your conveying -the covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that country -that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, -you convey, or propagate by procuring conveyance of, a covered work, and grant -a patent license to some of the parties receiving the covered work authorizing -them to use, propagate, modify or convey a specific copy of the covered work, -then the patent license you grant is automatically extended to all recipients -of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope -of its coverage, prohibits the exercise of, or is conditioned on the non-exercise -of one or more of the rights that are specifically granted under this License. -You may not convey a covered work if you are a party to an arrangement with -a third party that is in the business of distributing software, under which -you make payment to the third party based on the extent of your activity of -conveying the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory patent -license (a) in connection with copies of the covered work conveyed by you -(or copies made from those copies), or (b) primarily for and in connection -with specific products or compilations that contain the covered work, unless -you entered into that arrangement, or that patent license was granted, prior -to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied -license or other defenses to infringement that may otherwise be available -to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) -that contradict the conditions of this License, they do not excuse you from -the conditions of this License. If you cannot convey a covered work so as -to satisfy simultaneously your obligations under this License and any other -pertinent obligations, then as a consequence you may not convey it at all. -For example, if you agree to terms that obligate you to collect a royalty -for further conveying from those to whom you convey the Program, the only -way you could satisfy both those terms and this License would be to refrain -entirely from conveying the Program. - - 13. Use with the GNU Affero General Public License. - -Notwithstanding any other provision of this License, you have permission to -link or combine any covered work with a work licensed under version 3 of the -GNU Affero General Public License into a single combined work, and to convey -the resulting work. The terms of this License will continue to apply to the -part which is the covered work, but the special requirements of the GNU Affero -General Public License, section 13, concerning interaction through a network -will apply to the combination as such. - - 14. Revised Versions of this License. - -The Free Software Foundation may publish revised and/or new versions of the -GNU General Public License from time to time. Such new versions will be similar -in spirit to the present version, but may differ in detail to address new -problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -that a certain numbered version of the GNU General Public License "or any -later version" applies to it, you have the option of following the terms and -conditions either of that numbered version or of any later version published -by the Free Software Foundation. If the Program does not specify a version -number of the GNU General Public License, you may choose any version ever -published by the Free Software Foundation. - -If the Program specifies that a proxy can decide which future versions of -the GNU General Public License can be used, that proxy's public statement -of acceptance of a version permanently authorizes you to choose that version -for the Program. - -Later license versions may give you additional or different permissions. However, -no additional obligations are imposed on any author or copyright holder as -a result of your choosing to follow a later version. - - 15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE -LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM -PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - - 16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM -AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO -USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot -be given local legal effect according to their terms, reviewing courts shall -apply local law that most closely approximates an absolute waiver of all civil -liability in connection with the Program, unless a warranty or assumption -of liability accompanies a copy of the Program in return for a fee. END OF -TERMS AND CONDITIONS +0. Definitions. + +“This License” refers to version 3 of the GNU General Public License. + +“Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. + +“The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. + +To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. + +A “covered work” means either the unmodified Program or a work based on the Program. + +To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. + +To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. + +An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. + +1. Source Code. +The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. + +A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. + +The “System Libraries” of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. + +The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same work. + +2. Basic Permissions. +All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. + +3. Protecting Users' Legal Rights From Anti-Circumvention Law. +No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. + +When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. + +4. Conveying Verbatim Copies. +You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. + +5. Conveying Modified Source Versions. +You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. + + c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. + +A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. + +6. Conveying Non-Source Forms. +You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: + + a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. + +A “User Product” is either (1) a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. + +“Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. + +If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). + +The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. + +Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. + +7. Additional Terms. +“Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. + +All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. + +8. Termination. +You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). + +However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + +Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + +Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. + +9. Acceptance Not Required for Having Copies. +You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. + +10. Automatic Licensing of Downstream Recipients. +Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. + +An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. + +11. Patents. +A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. + +A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. + +In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. + +If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. + +A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. + +12. No Surrender of Others' Freedom. +If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. + +13. Use with the GNU Affero General Public License. +Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. + +14. Revised Versions of this License. +The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. + +Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. + +15. Disclaimer of Warranty. +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. Limitation of Liability. +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +17. Interpretation of Sections 15 and 16. +If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs -If you develop a new program, and you want it to be of the greatest possible -use to the public, the best way to achieve this is to make it free software -which everyone can redistribute and change under these terms. +If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. -To do so, attach the following notices to the program. It is safest to attach -them to the start of each source file to most effectively state the exclusion -of warranty; and each file should have at least the "copyright" line and a -pointer to where the full notice is found. +To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. - + + Copyright (C) -Copyright (C) + This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. -This program is free software: you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free Software -Foundation, either version 3 of the License, or (at your option) any later -version. + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -This program is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - -You should have received a copy of the GNU General Public License along with -this program. If not, see . + You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. -If the program does terminal interaction, make it output a short notice like -this when it starts in an interactive mode: +If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - Copyright (C) + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. -This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. -This is free software, and you are welcome to redistribute it under certain -conditions; type `show c' for details. +You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, your program's commands might -be different; for a GUI interface, you would use an "about box". - -You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. For -more information on this, and how to apply and follow the GNU GPL, see . - -The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General Public -License instead of this License. But first, please read . +The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . diff --git a/options/license/GPL-CC-1.0 b/options/license/GPL-CC-1.0 index a1266b2de..a687e0ddb 100644 --- a/options/license/GPL-CC-1.0 +++ b/options/license/GPL-CC-1.0 @@ -1,17 +1,46 @@ -GPL Cooperation Commitment Version 1.0 +GPL Cooperation Commitment +Version 1.0 -Before filing or continuing to prosecute any legal proceeding or claim (other than a Defensive Action) arising from termination of a Covered License, we commit to extend to the person or entity ('you') accused of violating the Covered License the following provisions regarding cure and reinstatement, taken from GPL version 3. As used here, the term 'this License' refers to the specific Covered License being enforced. +Before filing or continuing to prosecute any legal proceeding or claim +(other than a Defensive Action) arising from termination of a Covered +License, we commit to extend to the person or entity ('you') accused +of violating the Covered License the following provisions regarding +cure and reinstatement, taken from GPL version 3. As used here, the +term 'this License' refers to the specific Covered License being +enforced. -However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. + However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly + and finally terminates your license, and (b) permanently, if the + copyright holder fails to notify you of the violation by some + reasonable means prior to 60 days after the cessation. -Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. + Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you + have received notice of violation of this License (for any work) + from that copyright holder, and you cure the violation prior to 30 + days after your receipt of the notice. -We intend this Commitment to be irrevocable, and binding and enforceable against us and assignees of or successors to our copyrights. +We intend this Commitment to be irrevocable, and binding and +enforceable against us and assignees of or successors to our +copyrights. -Definitions: +Definitions -"Covered License" means the GNU General Public License, version 2 (GPLv2), the GNU Lesser General Public License, version 2.1 (LGPLv2.1), or the GNU Library General Public License, version 2 (LGPLv2), all as published by the Free Software Foundation. +'Covered License' means the GNU General Public License, version 2 +(GPLv2), the GNU Lesser General Public License, version 2.1 +(LGPLv2.1), or the GNU Library General Public License, version 2 +(LGPLv2), all as published by the Free Software Foundation. -"Defensive Action" means a legal proceeding or claim that We bring against you in response to a prior proceeding or claim initiated by you or your affiliate. +'Defensive Action' means a legal proceeding or claim that We bring +against you in response to a prior proceeding or claim initiated by +you or your affiliate. -"We" means each contributor to this repository as of the date of inclusion of this file, including subsidiaries of a corporate contributor. This work is available under a Creative Commons Attribution-ShareAlike 4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/). +'We' means each contributor to this repository as of the date of +inclusion of this file, including subsidiaries of a corporate +contributor. + +This work is available under a Creative Commons Attribution-ShareAlike +4.0 International license (https://creativecommons.org/licenses/by-sa/4.0/). diff --git a/options/license/Giftware b/options/license/Giftware index 0e623ec37..c22c5a6fb 100644 --- a/options/license/Giftware +++ b/options/license/Giftware @@ -1,24 +1,9 @@ Allegro 4 (the giftware license) -Allegro is gift-ware. It was created by a number of people working in cooperation, -and is given to you freely as a gift. You may use, modify, redistribute, and -generally hack it about in any way you like, and you do not have to give us -anything in return. +Allegro is gift-ware. It was created by a number of people working in cooperation, and is given to you freely as a gift. You may use, modify, redistribute, and generally hack it about in any way you like, and you do not have to give us anything in return. -However, if you like this product you are encouraged to thank us by making -a return gift to the Allegro community. This could be by writing an add-on -package, providing a useful bug report, making an improvement to the library, -or perhaps just releasing the sources of your program so that other people -can learn from them. If you redistribute parts of this code or make a game -using it, it would be nice if you mentioned Allegro somewhere in the credits, -but you are not required to do this. We trust you not to abuse our generosity. +However, if you like this product you are encouraged to thank us by making a return gift to the Allegro community. This could be by writing an add-on package, providing a useful bug report, making an improvement to the library, or perhaps just releasing the sources of your program so that other people can learn from them. If you redistribute parts of this code or make a game using it, it would be nice if you mentioned Allegro somewhere in the credits, but you are not required to do this. We trust you not to abuse our generosity. By Shawn Hargreaves, 18 October 1998. -DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT -SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE -FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. +DISCLAIMER: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/Glide b/options/license/Glide index 33a0201f7..23eae7c41 100644 --- a/options/license/Glide +++ b/options/license/Glide @@ -1,220 +1,95 @@ 3DFX GLIDE Source Code General Public License - 1. PREAMBLE +1. PREAMBLE -This license is for software that provides a 3D graphics application program -interface (API).The license is intended to offer terms similar to some standard -General Public Licenses designed to foster open standards and unrestricted -accessibility to source code. Some of these licenses require that, as a condition -of the license of the software, any derivative works (that is, new software -which is a work containing the original program or a portion of it) must be -available for general use, without restriction other than for a minor transfer -fee, and that the source code for such derivative works must likewise be made -available. The only restriction is that such derivative works must be subject -to the same General Public License terms as the original work. +This license is for software that provides a 3D graphics application program interface (API).The license is intended to offer terms similar to some standard General Public Licenses designed to foster open standards and unrestricted accessibility to source code. Some of these licenses require that, as a condition of the license of the software, any derivative works (that is, new software which is a work containing the original program or a portion of it) must be available for general use, without restriction other than for a minor transfer fee, and that the source code for such derivative works must likewise be made available. The only restriction is that such derivative works must be subject to the same General Public License terms as the original work. -This 3dfx GLIDE Source Code General Public License differs from the standard -licenses of this type in that it does not require the entire derivative work -to be made available under the terms of this license nor is the recipient -required to make available the source code for the entire derivative work. -Rather, the license is limited to only the identifiable portion of the derivative -work that is derived from the licensed software. The precise terms and conditions -for copying, distribution and modification follow. +This 3dfx GLIDE Source Code General Public License differs from the standard licenses of this type in that it does not require the entire derivative work to be made available under the terms of this license nor is the recipient required to make available the source code for the entire derivative work. Rather, the license is limited to only the identifiable portion of the derivative work that is derived from the licensed software. The precise terms and conditions for copying, distribution and modification follow. - 2. DEFINITIONS +2. DEFINITIONS -2.1 This License applies to any program (or other "work") which contains a -notice placed by the copyright holder saying it may be distributed under the -terms of this 3dfx GLIDE Source Code General Public License. + 2.1 This License applies to any program (or other "work") which contains a notice placed by the copyright holder saying it may be distributed under the terms of this 3dfx GLIDE Source Code General Public License. -2.2 The term "Program" as used in this Agreement refers to 3DFX's GLIDE source -code and object code and any Derivative Work. + 2.2 The term "Program" as used in this Agreement refers to 3DFX's GLIDE source code and object code and any Derivative Work. -2.3 "Derivative Work" means, for the purpose of the License, that portion -of any work that contains the Program or the identifiable portion of a work -that is derived from the Program, either verbatim or with modifications and/or -translated into another language, and that performs 3D graphics API operations. -It does not include any other portions of a work. + 2.3 "Derivative Work" means, for the purpose of the License, that portion of any work that contains the Program or the identifiable portion of a work that is derived from the Program, either verbatim or with modifications and/or translated into another language, and that performs 3D graphics API operations. It does not include any other portions of a work. -2.4 "Modifications of the Program" means any work, which includes a Derivative -Work, and includes the whole of such work. + 2.4 "Modifications of the Program" means any work, which includes a Derivative Work, and includes the whole of such work. - 2.5 "License" means this 3dfx GLIDE Source Code General Public License. + 2.5 "License" means this 3dfx GLIDE Source Code General Public License. -2.6 The "Source Code" for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source code means -all the source code for all modules it contains, any associated interface -definition files, and the scripts used to control compilation and installation -of the executable work. + 2.6 The "Source Code" for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, any associated interface definition files, and the scripts used to control compilation and installation of the executable work. - 2.7 "3dfx" means 3dfx Interactive, Inc. + 2.7 "3dfx" means 3dfx Interactive, Inc. - 3. LICENSED ACTIVITIES +3. LICENSED ACTIVITIES -3.1 COPYING - You may copy and distribute verbatim copies of the Program's -Source Code as you receive it, in any medium, subject to the provision of -section 3.3 and provided also that: + 3.1 COPYING - You may copy and distribute verbatim copies of the Program's Source Code as you receive it, in any medium, subject to the provision of section 3.3 and provided also that: -(a) you conspicuously and appropriately publish on each copy an appropriate -copyright notice (3dfx Interactive, Inc. 1999), a notice that recipients who -wish to copy, distribute or modify the Program can only do so subject to this -License, and a disclaimer of warranty as set forth in section 5; + (a) you conspicuously and appropriately publish on each copy an appropriate copyright notice (3dfx Interactive, Inc. 1999), a notice that recipients who wish to copy, distribute or modify the Program can only do so subject to this License, and a disclaimer of warranty as set forth in section 5; -(b) keep intact all the notices that refer to this License and to the absence -of any warranty; and + (b) keep intact all the notices that refer to this License and to the absence of any warranty; and -(c) do not make any use of the GLIDE trademark without the prior written permission -of 3dfx, and + (c) do not make any use of the GLIDE trademark without the prior written permission of 3dfx, and -(d) give all recipients of the Program a copy of this License along with the -Program or instructions on how to easily receive a copy of this License. + (d) give all recipients of the Program a copy of this License along with the Program or instructions on how to easily receive a copy of this License. -3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your copy -or copies of the Program or any portion of it, and copy and distribute such -modifications subject to the provisions of section 3.3 and provided that you -also meet all of the following conditions: + 3.2 MODIFICATION OF THE PROGRAM/DERIVATIVE WORKS - You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications subject to the provisions of section 3.3 and provided that you also meet all of the following conditions: -(a) you conspicuously and appropriately publish on each copy of a Derivative -Work an appropriate copyright notice, a notice that recipients who wish to -copy, distribute or modify the Derivative Work can only do so subject to this -License, and a disclaimer of warranty as set forth in section 5; + (a) you conspicuously and appropriately publish on each copy of a Derivative Work an appropriate copyright notice, a notice that recipients who wish to copy, distribute or modify the Derivative Work can only do so subject to this License, and a disclaimer of warranty as set forth in section 5; -(b) keep intact all the notices that refer to this License and to the absence -of any warranty; and (c) give all recipients of the Derivative Work a copy -of this License along with the Derivative Work or instructions on how to easily -receive a copy of this License. + (b) keep intact all the notices that refer to this License and to the absence of any warranty; and (c) give all recipients of the Derivative Work a copy of this License along with the Derivative Work or instructions on how to easily receive a copy of this License. -(d) You must cause the modified files of the Derivative Work to carry prominent -notices stating that you changed the files and the date of any change. + (d) You must cause the modified files of the Derivative Work to carry prominent notices stating that you changed the files and the date of any change. -(e) You must cause any Derivative Work that you distribute or publish to be -licensed at no charge to all third parties under the terms of this License. + (e) You must cause any Derivative Work that you distribute or publish to be licensed at no charge to all third parties under the terms of this License. -(f) You do not make any use of the GLIDE trademark without the prior written -permission of 3dfx. + (f) You do not make any use of the GLIDE trademark without the prior written permission of 3dfx. -(g) If the Derivative Work normally reads commands interactively when run, -you must cause it, when started running for such interactive use, to print -or display an announcement as follows: + (g) If the Derivative Work normally reads commands interactively when run, you must cause it, when started running for such interactive use, to print or display an announcement as follows: -"COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS SOFTWARE -IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN -PERMISSION OF 3DFX INTERACTIVE, INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE -FOR A FULL TEXT OF THE DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY -FROM INFO@3DFX.COM)." + "COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED THIS SOFTWARE IS FREE AND PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. THERE IS NO RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, INC. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE DISTRIBUTION AND NON-WARRANTY PROVISIONS (REQUEST COPY FROM INFO@3DFX.COM)." -(h) The requirements of this section 3.2 do not apply to the modified work -as a whole but only to the Derivative Work. It is not the intent of this License -to claim rights or contest your rights to work written entirely by you; rather, -the intent is to exercise the right to control the distribution of Derivative -Works. + (h) The requirements of this section 3.2 do not apply to the modified work as a whole but only to the Derivative Work. It is not the intent of this License to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of Derivative Works. - 3.3 DISTRIBUTION + 3.3 DISTRIBUTION -(a) All copies of the Program or Derivative Works which are distributed must -include in the file headers the following language verbatim: + (a) All copies of the Program or Derivative Works which are distributed must include in the file headers the following language verbatim: -"THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY PURSUANT -TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT TO USE THE GLIDE -TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, INC. A COPY -OF THIS LICENSE MAY BE OBTAINED FROM THE DISTRIBUTOR OR BY CONTACTING 3DFX -INTERACTIVE INC (info@3dfx.com). THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL -PUBLIC LICENSE FOR A FULL TEXT OF THE NON-WARRANTY PROVISIONS. + "THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC (info@3dfx.com). THIS PROGRAM. IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A FULL TEXT OF THE NON-WARRANTY PROVISIONS. -USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO RESTRICTIONS -AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN TECHNICAL DATA AND -COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, AND/OR IN SIMILAR OR SUCCESSOR -CLAUSES IN THE FAR, DOD OR NASA FAR SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED -UNDER THE COPYRIGHT LAWS OF THE UNITED STATES. + USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF THE UNITED STATES. - COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" + COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED" -(b) You may distribute the Program or a Derivative Work in object code or -executable form under the terms of Sections 3.1 and 3.2 provided that you -also do one of the following: + (b) You may distribute the Program or a Derivative Work in object code or executable form under the terms of Sections 3.1 and 3.2 provided that you also do one of the following: -(1) Accompany it with the complete corresponding machine-readable source code, -which must be distributed under the terms of Sections 3.1 and 3.2; or, + (1) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 3.1 and 3.2; or, -(2) Accompany it with a written offer, valid for at least three years, to -give any third party, for a charge no more than your cost of physically performing -source distribution, a complete machine-readable copy of the corresponding -source code, to be distributed under the terms of Sections 3.1 and 3.2 on -a medium customarily used for software interchange; or, + (2) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 3.1 and 3.2 on a medium customarily used for software interchange; or, -(3) Accompany it with the information you received as to the offer to distribute -corresponding source code. (This alternative is allowed only for noncommercial -distribution and only if you received the program in object code or executable -form with such an offer, in accord with Subsection 3.3(b)(2) above.) + (3) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection 3.3(b)(2) above.) -(c) The source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major components (compiler, -kernel, and so on) of the operating system on which the executable runs, unless -that component itself accompanies the executable code. + (c) The source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable code. -(d) If distribution of executable code or object code is made by offering -access to copy from a designated place, then offering equivalent access to -copy the source code from the same place counts as distribution of the source -code, even though third parties are not compelled to copy the source along -with the object code. + (d) If distribution of executable code or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. -(e) Each time you redistribute the Program or any Derivative Work, the recipient -automatically receives a license from 3dfx and successor licensors to copy, -distribute or modify the Program and Derivative Works subject to the terms -and conditions of the License. You may not impose any further restrictions -on the recipients' exercise of the rights granted herein. You are not responsible -for enforcing compliance by third parties to this License. + (e) Each time you redistribute the Program or any Derivative Work, the recipient automatically receives a license from 3dfx and successor licensors to copy, distribute or modify the Program and Derivative Works subject to the terms and conditions of the License. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -(f) You may not make any use of the GLIDE trademark without the prior written -permission of 3dfx. + (f) You may not make any use of the GLIDE trademark without the prior written permission of 3dfx. -(g) You may not copy, modify, sublicense, or distribute the Program or any -Derivative Works except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program or any Derivative -Works is void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such parties remain -in full compliance. + (g) You may not copy, modify, sublicense, or distribute the Program or any Derivative Works except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program or any Derivative Works is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. - 4. MISCELLANEOUS +4. MISCELLANEOUS -4.1 Acceptance of this License is voluntary. By using, modifying or distributing -the Program or any Derivative Work, you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Program or works based on it. Nothing else grants you permission to modify -or distribute the Program or Derivative Works and doing so without acceptance -of this License is in violation of the U.S. and international copyright laws. + 4.1 Acceptance of this License is voluntary. By using, modifying or distributing the Program or any Derivative Work, you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. Nothing else grants you permission to modify or distribute the Program or Derivative Works and doing so without acceptance of this License is in violation of the U.S. and international copyright laws. -4.2 If the distribution and/or use of the Program or Derivative Works is restricted -in certain countries either by patents or by copyrighted interfaces, the original -copyright holder who places the Program under this License may add an explicit -geographical distribution limitation excluding those countries, so that distribution -is permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. + 4.2 If the distribution and/or use of the Program or Derivative Works is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -4.3 This License is to be construed according to the laws of the State of -California and you consent to personal jurisdiction in the State of California -in the event it is necessary to enforce the provisions of this License. + 4.3 This License is to be construed according to the laws of the State of California and you consent to personal jurisdiction in the State of California in the event it is necessary to enforce the provisions of this License. - 5. NO WARRANTIES +5. NO WARRANTIES -5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY FOR THE -PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE -THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" WITHOUT WARRANTY OF ANY KIND, -EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH -YOU. SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + 5.1 TO THE EXTENT PERMITTED BY APPLICABLE LAW, THERE IS NO WARRANTY FOR THE PROGRAM. OR DERIVATIVE WORKS THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM AND ANY DERIVATIVE WORKS"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM AND ANY DERIVATIVE WORK IS WITH YOU. SHOULD THE PROGRAM OR ANY DERIVATIVE WORK PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX INTERACTIVE, INC., -OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM OR DERIVATIVE WORKS AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING -BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES -SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR DERIVATIVE -WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY -HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + 5.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL 3DFX INTERACTIVE, INC., OR ANY OTHER COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM OR DERIVATIVE WORKS AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM OR DERIVATIVE WORKS (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM OR DERIVATIVE WORKS TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/Glulxe b/options/license/Glulxe index f5d154240..8bbb720e6 100644 --- a/options/license/Glulxe +++ b/options/license/Glulxe @@ -1,7 +1,3 @@ The source code in this package is copyright 1999-2010 by Andrew Plotkin. -You may copy and distribute it freely, by any means and under any conditions, -as long as the code and documentation is not changed. You may also incorporate -this code into your own program and distribute that, or modify this code and -use and distribute the modified version, as long as you retain a notice in -your program or documentation which mentions my name and the URL shown above. +You may copy and distribute it freely, by any means and under any conditions, as long as the code and documentation is not changed. You may also incorporate this code into your own program and distribute that, or modify this code and use and distribute the modified version, as long as you retain a notice in your program or documentation which mentions my name and the URL shown above. diff --git a/options/license/HPND b/options/license/HPND index 4662ba23b..74abede5f 100644 --- a/options/license/HPND +++ b/options/license/HPND @@ -1,17 +1,7 @@ -Historical Permission Notice and Disclaimer +Historical Permission Notice and Disclaimer -Permission to use, copy, modify and distribute this software and its documentation -for any purpose and without fee is hereby granted, provided that the above -copyright notice appear in all copies, and that both that the copyright notice -and this permission notice appear in supporting documentation , and that the -name of not be used in advertising -or publicity pertaining to distribution of the software without specific, -written prior permission . makes no representations about -the suitability of this software for any purpose. It is provided "as is" without -express or implied warranty. DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS . IN NO EVENT SHALL BE LIABLE FOR ANY SPECIAL, -INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. + + +Permission to use, copy, modify and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies, and that both that the copyright notice and this permission notice appear in supporting documentation, and that the name of or not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. + + DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,. IN NO EVENT SHALL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/HPND-sell-variant b/options/license/HPND-sell-variant index f4a470f1f..cac53b237 100644 --- a/options/license/HPND-sell-variant +++ b/options/license/HPND-sell-variant @@ -1,17 +1,19 @@ - +Copyright 1993 by OpenVision Technologies, Inc. -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appears in all copies, and that both that the copyright -notice and this permission notice appear in supporting documentation, and -that the name of not be used in advertising -or publicity pertaining to distribution of the software without specific, -written prior permission . makes no representations about -the suitability of this software for any purpose. It is provided "as is" without -express or implied warranty. DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS . IN NO EVENT SHALL BE LIABLE FOR ANY SPECIAL, -INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appears in all copies and +that both that copyright notice and this permission notice appear in +supporting documentation, and that the name of OpenVision not be used +in advertising or publicity pertaining to distribution of the software +without specific, written prior permission. OpenVision makes no +representations about the suitability of this software for any +purpose. It is provided "as is" without express or implied warranty. + +OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF +USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/HTMLTIDY b/options/license/HTMLTIDY new file mode 100644 index 000000000..098dee8c0 --- /dev/null +++ b/options/license/HTMLTIDY @@ -0,0 +1,13 @@ +HTML Tidy License + +This software and documentation is provided "as is," and the copyright holders and contributing author(s) make no representations or warranties, express or implied, including but not limited to, warranties of merchantability or fitness for any particular purpose or that the use of the software or documentation will not infringe any third party patents, copyrights, trademarks or other rights. + +The copyright holders and contributing author(s) will not be held liable for any direct, indirect, special or consequential damages arising out of any use of the software or documentation, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, documentation and executables, for any purpose, without fee, subject to the following restrictions: + + 1. The origin of this source code must not be misrepresented. + 2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. + 3. This Copyright notice may not be removed or altered from any source or altered source distribution. + +The copyright holders and contributing author(s) specifically permit, without fee, and encourage the use of this source code as a component for supporting the Hypertext Markup Language in commercial products. If you use this source code in a product, acknowledgement is not required but would be appreciated. diff --git a/options/license/HaskellReport b/options/license/HaskellReport index 39f7c0975..563b7056c 100644 --- a/options/license/HaskellReport +++ b/options/license/HaskellReport @@ -1,12 +1,6 @@ Code derived from the document "Report on the Programming Language - Haskell 2010", is distributed under the following license: Copyright (c) 2010 Simon Marlow -The authors intend this Report to belong to the entire Haskell community, -and so we grant permission to copy and distribute it for any purpose, provided -that it is reproduced in its entirety, including this Notice. Modified versions -of this Report may also be copied and distributed for any purpose, provided -that the modified version is clearly presented as such, and that it does not -claim to be a definition of the Haskell 2010 Language. +The authors intend this Report to belong to the entire Haskell community, and so we grant permission to copy and distribute it for any purpose, provided that it is reproduced in its entirety, including this Notice. Modified versions of this Report may also be copied and distributed for any purpose, provided that the modified version is clearly presented as such, and that it does not claim to be a definition of the Haskell 2010 Language. diff --git a/options/license/Hippocratic-2.1 b/options/license/Hippocratic-2.1 index 302178eb7..0395b52dd 100644 --- a/options/license/Hippocratic-2.1 +++ b/options/license/Hippocratic-2.1 @@ -1,129 +1,33 @@ -[SOFTWARE NAME] Copyright (C) (YEAR) (COPYRIGHT HOLDER(S)/AUTHOR(S) ("Licensor") +[SOFTWARE NAME] Copyright (YEAR) (COPYRIGHT HOLDER(S)/AUTHOR(S))(“Licensor”) + Hippocratic License Version Number: 2.1. -Purpose. The purpose of this License is for the Licensor named above to permit -the Licensee (as defined below) broad permission, if consistent with Human -Rights Laws and Human Rights Principles (as each is defined below), to use -and work with the Software (as defined below) within the full scope of Licensor's -copyright and patent rights, if any, in the Software, while ensuring attribution -and protecting the Licensor from liability. +Purpose. The purpose of this License is for the Licensor named above to permit the Licensee (as defined below) broad permission, if consistent with Human Rights Laws and Human Rights Principles (as each is defined below), to use and work with the Software (as defined below) within the full scope of Licensor’s copyright and patent rights, if any, in the Software, while ensuring attribution and protecting the Licensor from liability. -Permission and Conditions. The Licensor grants permission by this license -("License"), free of charge, to the extent of Licensor's rights under applicable -copyright and patent law, to any person or entity (the "Licensee") obtaining -a copy of this software and associated documentation files (the "Software"), -to do everything with the Software that would otherwise infringe (i) the Licensor's -copyright in the Software or (ii) any patent claims to the Software that the -Licensor can license or becomes able to license, subject to all of the following -terms and conditions: +Permission and Conditions. The Licensor grants permission by this license (“License”), free of charge, to the extent of Licensor’s rights under applicable copyright and patent law, to any person or entity (the “Licensee”) obtaining a copy of this software and associated documentation files (the “Software”), to do everything with the Software that would otherwise infringe (i) the Licensor’s copyright in the Software or (ii) any patent claims to the Software that the Licensor can license or becomes able to license, subject to all of the following terms and conditions: -* Acceptance. This License is automatically offered to every person and entity -subject to its terms and conditions. Licensee accepts this License and agrees -to its terms and conditions by taking any action with the Software that, absent -this License, would infringe any intellectual property right held by Licensor. +* Acceptance. This License is automatically offered to every person and entity subject to its terms and conditions. Licensee accepts this License and agrees to its terms and conditions by taking any action with the Software that, absent this License, would infringe any intellectual property right held by Licensor. -* Notice. Licensee must ensure that everyone who gets a copy of any part of -this Software from Licensee, with or without changes, also receives the License -and the above copyright notice (and if included by the Licensor, patent, trademark -and attribution notice). Licensee must cause any modified versions of the -Software to carry prominent notices stating that Licensee changed the Software. -For clarity, although Licensee is free to create modifications of the Software -and distribute only the modified portion created by Licensee with additional -or different terms, the portion of the Software not modified must be distributed -pursuant to this License. If anyone notifies Licensee in writing that Licensee -has not complied with this Notice section, Licensee can keep this License -by taking all practical steps to comply within 30 days after the notice. If -Licensee does not do so, Licensee's License (and all rights licensed hereunder) -shall end immediately. +* Notice. Licensee must ensure that everyone who gets a copy of any part of this Software from Licensee, with or without changes, also receives the License and the above copyright notice (and if included by the Licensor, patent, trademark and attribution notice). Licensee must cause any modified versions of the Software to carry prominent notices stating that Licensee changed the Software. For clarity, although Licensee is free to create modifications of the Software and distribute only the modified portion created by Licensee with additional or different terms, the portion of the Software not modified must be distributed pursuant to this License. If anyone notifies Licensee in writing that Licensee has not complied with this Notice section, Licensee can keep this License by taking all practical steps to comply within 30 days after the notice. If Licensee does not do so, Licensee’s License (and all rights licensed hereunder) shall end immediately. - * Compliance with Human Rights Principles and Human Rights Laws. +* Compliance with Human Rights Principles and Human Rights Laws. - 1. Human Rights Principles. + 1. Human Rights Principles. -(a) Licensee is advised to consult the articles of the United Nations Universal -Declaration of Human Rights and the United Nations Global Compact that define -recognized principles of international human rights (the "Human Rights Principles"). -Licensee shall use the Software in a manner consistent with Human Rights Principles. + (a) Licensee is advised to consult the articles of the United Nations Universal Declaration of Human Rights and the United Nations Global Compact that define recognized principles of international human rights (the “Human Rights Principles”). Licensee shall use the Software in a manner consistent with Human Rights Principles. -(b) Unless the Licensor and Licensee agree otherwise, any dispute, controversy, -or claim arising out of or relating to (i) Section 1(a) regarding Human Rights -Principles, including the breach of Section 1(a), termination of this License -for breach of the Human Rights Principles, or invalidity of Section 1(a) or -(ii) a determination of whether any Law is consistent or in conflict with -Human Rights Principles pursuant to Section 2, below, shall be settled by -arbitration in accordance with the Hague Rules on Business and Human Rights -Arbitration (the "Rules"); provided, however, that Licensee may elect not -to participate in such arbitration, in which event this License (and all rights -licensed hereunder) shall end immediately. The number of arbitrators shall -be one unless the Rules require otherwise. + (b) Unless the Licensor and Licensee agree otherwise, any dispute, controversy, or claim arising out of or relating to (i) Section 1(a) regarding Human Rights Principles, including the breach of Section 1(a), termination of this License for breach of the Human Rights Principles, or invalidity of Section 1(a) or (ii) a determination of whether any Law is consistent or in conflict with Human Rights Principles pursuant to Section 2, below, shall be settled by arbitration in accordance with the Hague Rules on Business and Human Rights Arbitration (the “Rules”); provided, however, that Licensee may elect not to participate in such arbitration, in which event this License (and all rights licensed hereunder) shall end immediately. The number of arbitrators shall be one unless the Rules require otherwise. -Unless both the Licensor and Licensee agree to the contrary: (1) All documents -and information concerning the arbitration shall be public and may be disclosed -by any party; (2) The repository referred to under Article 43 of the Rules -shall make available to the public in a timely manner all documents concerning -the arbitration which are communicated to it, including all submissions of -the parties, all evidence admitted into the record of the proceedings, all -transcripts or other recordings of hearings and all orders, decisions and -awards of the arbitral tribunal, subject only to the arbitral tribunal's powers -to take such measures as may be necessary to safeguard the integrity of the -arbitral process pursuant to Articles 18, 33, 41 and 42 of the Rules; and -(3) Article 26(6) of the Rules shall not apply. + Unless both the Licensor and Licensee agree to the contrary: (1) All documents and information concerning the arbitration shall be public and may be disclosed by any party; (2) The repository referred to under Article 43 of the Rules shall make available to the public in a timely manner all documents concerning the arbitration which are communicated to it, including all submissions of the parties, all evidence admitted into the record of the proceedings, all transcripts or other recordings of hearings and all orders, decisions and awards of the arbitral tribunal, subject only to the arbitral tribunal's powers to take such measures as may be necessary to safeguard the integrity of the arbitral process pursuant to Articles 18, 33, 41 and 42 of the Rules; and (3) Article 26(6) of the Rules shall not apply. -2. Human Rights Laws. The Software shall not be used by any person or entity -for any systems, activities, or other uses that violate any Human Rights Laws. -"Human Rights Laws" means any applicable laws, regulations, or rules (collectively, -"Laws") that protect human, civil, labor, privacy, political, environmental, -security, economic, due process, or similar rights; provided, however, that -such Laws are consistent and not in conflict with Human Rights Principles -(a dispute over the consistency or a conflict between Laws and Human Rights -Principles shall be determined by arbitration as stated above). Where the -Human Rights Laws of more than one jurisdiction are applicable or in conflict -with respect to the use of the Software, the Human Rights Laws that are most -protective of the individuals or groups harmed shall apply. + 2. Human Rights Laws. The Software shall not be used by any person or entity for any systems, activities, or other uses that violate any Human Rights Laws. “Human Rights Laws” means any applicable laws, regulations, or rules (collectively, “Laws”) that protect human, civil, labor, privacy, political, environmental, security, economic, due process, or similar rights; provided, however, that such Laws are consistent and not in conflict with Human Rights Principles (a dispute over the consistency or a conflict between Laws and Human Rights Principles shall be determined by arbitration as stated above). Where the Human Rights Laws of more than one jurisdiction are applicable or in conflict with respect to the use of the Software, the Human Rights Laws that are most protective of the individuals or groups harmed shall apply. -3. Indemnity. Licensee shall hold harmless and indemnify Licensor (and any -other contributor) against all losses, damages, liabilities, deficiencies, -claims, actions, judgments, settlements, interest, awards, penalties, fines, -costs, or expenses of whatever kind, including Licensor's reasonable attorneys' -fees, arising out of or relating to Licensee's use of the Software in violation -of Human Rights Laws or Human Rights Principles. + 3. Indemnity. Licensee shall hold harmless and indemnify Licensor (and any other contributor) against all losses, damages, liabilities, deficiencies, claims, actions, judgments, settlements, interest, awards, penalties, fines, costs, or expenses of whatever kind, including Licensor’s reasonable attorneys’ fees, arising out of or relating to Licensee’s use of the Software in violation of Human Rights Laws or Human Rights Principles. -* Failure to Comply. Any failure of Licensee to act according to the terms -and conditions of this License is both a breach of the License and an infringement -of the intellectual property rights of the Licensor (subject to exceptions -under Laws, e.g., fair use). In the event of a breach or infringement, the -terms and conditions of this License may be enforced by Licensor under the -Laws of any jurisdiction to which Licensee is subject. Licensee also agrees -that the Licensor may enforce the terms and conditions of this License against -Licensee through specific performance (or similar remedy under Laws) to the -extent permitted by Laws. For clarity, except in the event of a breach of -this License, infringement, or as otherwise stated in this License, Licensor -may not terminate this License with Licensee. +* Failure to Comply. Any failure of Licensee to act according to the terms and conditions of this License is both a breach of the License and an infringement of the intellectual property rights of the Licensor (subject to exceptions under Laws, e.g., fair use). In the event of a breach or infringement, the terms and conditions of this License may be enforced by Licensor under the Laws of any jurisdiction to which Licensee is subject. Licensee also agrees that the Licensor may enforce the terms and conditions of this License against Licensee through specific performance (or similar remedy under Laws) to the extent permitted by Laws. For clarity, except in the event of a breach of this License, infringement, or as otherwise stated in this License, Licensor may not terminate this License with Licensee. -* Enforceability and Interpretation. If any term or provision of this License -is determined to be invalid, illegal, or unenforceable by a court of competent -jurisdiction, then such invalidity, illegality, or unenforceability shall -not affect any other term or provision of this License or invalidate or render -unenforceable such term or provision in any other jurisdiction; provided, -however, subject to a court modification pursuant to the immediately following -sentence, if any term or provision of this License pertaining to Human Rights -Laws or Human Rights Principles is deemed invalid, illegal, or unenforceable -against Licensee by a court of competent jurisdiction, all rights in the Software -granted to Licensee shall be deemed null and void as between Licensor and -Licensee. Upon a determination that any term or provision is invalid, illegal, -or unenforceable, to the extent permitted by Laws, the court may modify this -License to affect the original purpose that the Software be used in compliance -with Human Rights Principles and Human Rights Laws as closely as possible. -The language in this License shall be interpreted as to its fair meaning and -not strictly for or against any party. +* Enforceability and Interpretation. If any term or provision of this License is determined to be invalid, illegal, or unenforceable by a court of competent jurisdiction, then such invalidity, illegality, or unenforceability shall not affect any other term or provision of this License or invalidate or render unenforceable such term or provision in any other jurisdiction; provided, however, subject to a court modification pursuant to the immediately following sentence, if any term or provision of this License pertaining to Human Rights Laws or Human Rights Principles is deemed invalid, illegal, or unenforceable against Licensee by a court of competent jurisdiction, all rights in the Software granted to Licensee shall be deemed null and void as between Licensor and Licensee. Upon a determination that any term or provision is invalid, illegal, or unenforceable, to the extent permitted by Laws, the court may modify this License to affect the original purpose that the Software be used in compliance with Human Rights Principles and Human Rights Laws as closely as possible. The language in this License shall be interpreted as to its fair meaning and not strictly for or against any party. -* Disclaimer. TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES "AS IS," -WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR AND ANY OTHER CONTRIBUTOR -SHALL NOT BE LIABLE TO ANYONE FOR ANY DAMAGES OR OTHER LIABILITY ARISING FROM, -OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE, UNDER ANY KIND -OF LEGAL CLAIM. +* Disclaimer. TO THE FULL EXTENT ALLOWED BY LAW, THIS SOFTWARE COMES “AS IS,” WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED, AND LICENSOR AND ANY OTHER CONTRIBUTOR SHALL NOT BE LIABLE TO ANYONE FOR ANY DAMAGES OR OTHER LIABILITY ARISING FROM, OUT OF, OR IN CONNECTION WITH THE SOFTWARE OR THIS LICENSE, UNDER ANY KIND OF LEGAL CLAIM. -This Hippocratic License is an Ethical Source license (https://ethicalsource.dev) -and is offered for use by licensors and licensees at their own risk, on an -"AS IS" basis, and with no warranties express or implied, to the maximum extent -permitted by Laws. +This Hippocratic License is an Ethical Source license (https://ethicalsource.dev) and is offered for use by licensors and licensees at their own risk, on an “AS IS” basis, and with no warranties express or implied, to the maximum extent permitted by Laws. diff --git a/options/license/IBM-pibs b/options/license/IBM-pibs index 775c837a5..49454b8b1 100644 --- a/options/license/IBM-pibs +++ b/options/license/IBM-pibs @@ -1,18 +1,8 @@ -This source code has been made available to you by IBM on an AS-IS basis. -Anyone receiving this source is licensed under IBM copyrights to use it in -any way he or she deems fit, including copying it, modifying it, compiling -it, and redistributing it either with or without modifications. No license -under IBM patents or patent applications is to be implied by the copyright -license. +This source code has been made available to you by IBM on an AS-IS basis. Anyone receiving this source is licensed under IBM copyrights to use it in any way he or she deems fit, including copying it, modifying it, compiling it, and redistributing it either with or without modifications. No license under IBM patents or patent applications is to be implied by the copyright license. -Any user of this software should understand that IBM cannot provide technical -support for this software and will not be responsible for any consequences -resulting from the use of this software. +Any user of this software should understand that IBM cannot provide technical support for this software and will not be responsible for any consequences resulting from the use of this software. -Any person who transfers this source code or any derivative work must include -the IBM copyright notice, this paragraph, and the preceding two paragraphs -in the transferred software. +Any person who transfers this source code or any derivative work must include the IBM copyright notice, this paragraph, and the preceding two paragraphs in the transferred software. -COPYRIGHT I B M CORPORATION 2002 - -LICENSED MATERIAL - PROGRAM PROPERTY OF I B M +COPYRIGHT   I B M   CORPORATION 2002 +LICENSED MATERIAL  -  PROGRAM PROPERTY OF I B M diff --git a/options/license/ICU b/options/license/ICU index 33bac3422..883ab200f 100644 --- a/options/license/ICU +++ b/options/license/ICU @@ -1,28 +1,12 @@ ICU License - ICU 1.8.1 and later -COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1995-2014 International Business -Machines Corporation and others +COPYRIGHT AND PERMISSION NOTICE +Copyright (c) 1995-2014 International Business Machines Corporation and others All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, and/or sell copies of the -Software, and to permit persons to whom the Software is furnished to do so, -provided that the above copyright notice(s) and this permission notice appear -in all copies of the Software and that both the above copyright notice(s) -and this permission notice appear in supporting documentation. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO -EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE -FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. +Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. diff --git a/options/license/IJG b/options/license/IJG index a5ab4296a..761071caa 100644 --- a/options/license/IJG +++ b/options/license/IJG @@ -1,86 +1,38 @@ -Independent JPEG Group License LEGAL ISSUES +Independent JPEG Group License + +LEGAL ISSUES In plain English: -1. We don't promise that this software works. (But if you find any bugs, please -let us know!) - -2. You can use this software for whatever you want. You don't have to pay -us. - -3. You may not pretend that you wrote this software. If you use it in a program, -you must acknowledge somewhere in your documentation that you've used the -IJG code. +1. We don't promise that this software works. (But if you find any bugs, please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a program, you must acknowledge somewhere in your documentation that you've used the IJG code. In legalese: -The authors make NO WARRANTY or representation, either express or implied, -with respect to this software, its quality, accuracy, merchantability, or -fitness for a particular purpose. This software is provided "AS IS", and you, -its user, assume the entire risk as to its quality and accuracy. +The authors make NO WARRANTY or representation, either express or implied, with respect to this software, its quality, accuracy, merchantability, or fitness for a particular purpose. This software is provided "AS IS", and you, its user, assume the entire risk as to its quality and accuracy. -This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved -except as specified below. +This software is copyright (C) 1991-1998, Thomas G. Lane. All Rights Reserved except as specified below. -Permission is hereby granted to use, copy, modify, and distribute this software -(or portions thereof) for any purpose, without fee, subject to these conditions: +Permission is hereby granted to use, copy, modify, and distribute this software (or portions thereof) for any purpose, without fee, subject to these conditions: -(1) If any part of the source code for this software is distributed, then -this README file must be included, with this copyright and no-warranty notice -unaltered; and any additions, deletions, or changes to the original files -must be clearly indicated in accompanying documentation. + (1) If any part of the source code for this software is distributed, then this README file must be included, with this copyright and no-warranty notice unaltered; and any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. + (2) If only executable code is distributed, then the accompanying documentation must state that "this software is based in part on the work of the Independent JPEG Group". + (3) Permission for use of this software is granted only if the user accepts full responsibility for any undesirable consequences; the authors accept NO LIABILITY for damages of any kind. -(2) If only executable code is distributed, then the accompanying documentation -must state that "this software is based in part on the work of the Independent -JPEG Group". +These conditions apply to any software derived from or based on the IJG code, not just to the unmodified library. If you use our work, you ought to acknowledge us. -(3) Permission for use of this software is granted only if the user accepts -full responsibility for any undesirable consequences; the authors accept NO -LIABILITY for damages of any kind. +Permission is NOT granted for the use of any IJG author's name or company name in advertising or publicity relating to this software or products derived from it. This software may be referred to only as "the Independent JPEG Group's software". -These conditions apply to any software derived from or based on the IJG code, -not just to the unmodified library. If you use our work, you ought to acknowledge -us. +We specifically permit and encourage the use of this software as the basis of commercial products, provided that all warranty or liability claims are assumed by the product vendor. -Permission is NOT granted for the use of any IJG author's name or company -name in advertising or publicity relating to this software or products derived -from it. This software may be referred to only as "the Independent JPEG Group's -software". +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead by the usual distribution terms of the Free Software Foundation; principally, that you must include source code if you redistribute it. (See the file ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part of any program generated from the IJG code, this does not limit you more than the foregoing paragraphs do. -We specifically permit and encourage the use of this software as the basis -of commercial products, provided that all warranty or liability claims are -assumed by the product vendor. +The Unix configuration script "configure" was produced with GNU Autoconf. It is copyright by the Free Software Foundation but is freely distributable. The same holds for its supporting scripts (config.guess, config.sub, ltconfig, ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but is also freely distributable. -ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, -sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, -CA. ansi2knr.c is NOT covered by the above copyright and conditions, but instead -by the usual distribution terms of the Free Software Foundation; principally, -that you must include source code if you redistribute it. (See the file ansi2knr.c -for full details.) However, since ansi2knr.c is not needed as part of any -program generated from the IJG code, this does not limit you more than the -foregoing paragraphs do. +It appears that the arithmetic coding option of the JPEG spec is covered by patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot legally be used without obtaining one or more licenses. For this reason, support for arithmetic coding has been removed from the free JPEG software. (Since arithmetic coding provides only a marginal gain over the unpatented Huffman mode, it is unlikely that very many implementations will support it.) So far as we are aware, there are no patent restrictions on the remaining code. -The Unix configuration script "configure" was produced with GNU Autoconf. -It is copyright by the Free Software Foundation but is freely distributable. -The same holds for its supporting scripts (config.guess, config.sub, ltconfig, -ltmain.sh). Another support script, install-sh, is copyright by M.I.T. but -is also freely distributable. - -It appears that the arithmetic coding option of the JPEG spec is covered by -patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot -legally be used without obtaining one or more licenses. For this reason, support -for arithmetic coding has been removed from the free JPEG software. (Since -arithmetic coding provides only a marginal gain over the unpatented Huffman -mode, it is unlikely that very many implementations will support it.) So far -as we are aware, there are no patent restrictions on the remaining code. - -The IJG distribution formerly included code to read and write GIF files. To -avoid entanglement with the Unisys LZW patent, GIF reading support has been -removed altogether, and the GIF writer has been simplified to produce "uncompressed -GIFs". This technique does not use the LZW algorithm; the resulting GIF files -are larger than usual, but are readable by all standard GIF decoders. +The IJG distribution formerly included code to read and write GIF files. To avoid entanglement with the Unisys LZW patent, GIF reading support has been removed altogether, and the GIF writer has been simplified to produce "uncompressed GIFs". This technique does not use the LZW algorithm; the resulting GIF files are larger than usual, but are readable by all standard GIF decoders. We are required to state that - -"The Graphics Interchange Format(c) is the Copyright property of CompuServe -Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated." + "The Graphics Interchange Format(c) is the Copyright property of CompuServe Incorporated. GIF(sm) is a Service Mark property of CompuServe Incorporated." diff --git a/options/license/IPA b/options/license/IPA index c52cbbab2..cb77cc0f3 100644 --- a/options/license/IPA +++ b/options/license/IPA @@ -1,177 +1,83 @@ IPA Font License Agreement v1.0 -The Licensor provides the Licensed Program (as defined in Article 1 below) -under the terms of this license agreement ("Agreement"). Any use, reproduction -or distribution of the Licensed Program, or any exercise of rights under this -Agreement by a Recipient (as defined in Article 1 below) constitutes the Recipient's -acceptance of this Agreement. +The Licensor provides the Licensed Program (as defined in Article 1 below) under the terms of this license agreement ("Agreement"). Any use, reproduction or distribution of the Licensed Program, or any exercise of rights under this Agreement by a Recipient (as defined in Article 1 below) constitutes the Recipient's acceptance of this Agreement. Article 1 (Definitions) -1. "Digital Font Program" shall mean a computer program containing, or used -to render or display fonts. +1. "Digital Font Program" shall mean a computer program containing, or used to render or display fonts. -2. "Licensed Program" shall mean a Digital Font Program licensed by the Licensor -under this Agreement. +2. "Licensed Program" shall mean a Digital Font Program licensed by the Licensor under this Agreement. -3. "Derived Program" shall mean a Digital Font Program created as a result -of a modification, addition, deletion, replacement or any other adaptation -to or of a part or all of the Licensed Program, and includes a case where -a Digital Font Program newly created by retrieving font information from a -part or all of the Licensed Program or Embedded Fonts from a Digital Document -File with or without modification of the retrieved font information. +3. "Derived Program" shall mean a Digital Font Program created as a result of a modification, addition, deletion, replacement or any other adaptation to or of a part or all of the Licensed Program, and includes a case where a Digital Font Program newly created by retrieving font information from a part or all of the Licensed Program or Embedded Fonts from a Digital Document File with or without modification of the retrieved font information. -4. "Digital Content" shall mean products provided to end users in the form -of digital data, including video content, motion and/or still pictures, TV -programs or other broadcasting content and products consisting of character -text, pictures, photographic images, graphic symbols and/or the like. +4. "Digital Content" shall mean products provided to end users in the form of digital data, including video content, motion and/or still pictures, TV programs or other broadcasting content and products consisting of character text, pictures, photographic images, graphic symbols and/or the like. -5. "Digital Document File" shall mean a PDF file or other Digital Content -created by various software programs in which a part or all of the Licensed -Program becomes embedded or contained in the file for the display of the font -("Embedded Fonts"). Embedded Fonts are used only in the display of characters -in the particular Digital Document File within which they are embedded, and -shall be distinguished from those in any Digital Font Program, which may be -used for display of characters outside that particular Digital Document File. +5. "Digital Document File" shall mean a PDF file or other Digital Content created by various software programs in which a part or all of the Licensed Program becomes embedded or contained in the file for the display of the font ("Embedded Fonts"). Embedded Fonts are used only in the display of characters in the particular Digital Document File within which they are embedded, and shall be distinguished from those in any Digital Font Program, which may be used for display of characters outside that particular Digital Document File. - 6. "Computer" shall include a server in this Agreement. +6. "Computer" shall include a server in this Agreement. -7. "Reproduction and Other Exploitation" shall mean reproduction, transfer, -distribution, lease, public transmission, presentation, exhibition, adaptation -and any other exploitation. +7. "Reproduction and Other Exploitation" shall mean reproduction, transfer, distribution, lease, public transmission, presentation, exhibition, adaptation and any other exploitation. -8. "Recipient" shall mean anyone who receives the Licensed Program under this -Agreement, including one that receives the Licensed Program from a Recipient. +8. "Recipient" shall mean anyone who receives the Licensed Program under this Agreement, including one that receives the Licensed Program from a Recipient. Article 2 (Grant of License) -The Licensor grants to the Recipient a license to use the Licensed Program -in any and all countries in accordance with each of the provisions set forth -in this Agreement. However, any and all rights underlying in the Licensed -Program shall be held by the Licensor. In no sense is this Agreement intended -to transfer any right relating to the Licensed Program held by the Licensor -except as specifically set forth herein or any right relating to any trademark, -trade name, or service mark to the Recipient. +The Licensor grants to the Recipient a license to use the Licensed Program in any and all countries in accordance with each of the provisions set forth in this Agreement. However, any and all rights underlying in the Licensed Program shall be held by the Licensor. In no sense is this Agreement intended to transfer any right relating to the Licensed Program held by the Licensor except as specifically set forth herein or any right relating to any trademark, trade name, or service mark to the Recipient. -1. The Recipient may install the Licensed Program on any number of Computers -and use the same in accordance with the provisions set forth in this Agreement. +1. The Recipient may install the Licensed Program on any number of Computers and use the same in accordance with the provisions set forth in this Agreement. -2. The Recipient may use the Licensed Program, with or without modification -in printed materials or in Digital Content as an expression of character texts -or the like. +2. The Recipient may use the Licensed Program, with or without modification in printed materials or in Digital Content as an expression of character texts or the like. -3. The Recipient may conduct Reproduction and Other Exploitation of the printed -materials and Digital Content created in accordance with the preceding Paragraph, -for commercial or non-commercial purposes and in any form of media including -but not limited to broadcasting, communication and various recording media. +3. The Recipient may conduct Reproduction and Other Exploitation of the printed materials and Digital Content created in accordance with the preceding Paragraph, for commercial or non-commercial purposes and in any form of media including but not limited to broadcasting, communication and various recording media. -4. If any Recipient extracts Embedded Fonts from a Digital Document File to -create a Derived Program, such Derived Program shall be subject to the terms -of this agreement. +4. If any Recipient extracts Embedded Fonts from a Digital Document File to create a Derived Program, such Derived Program shall be subject to the terms of this agreement. -5. If any Recipient performs Reproduction or Other Exploitation of a Digital -Document File in which Embedded Fonts of the Licensed Program are used only -for rendering the Digital Content within such Digital Document File then such -Recipient shall have no further obligations under this Agreement in relation -to such actions. +5. If any Recipient performs Reproduction or Other Exploitation of a Digital Document File in which Embedded Fonts of the Licensed Program are used only for rendering the Digital Content within such Digital Document File then such Recipient shall have no further obligations under this Agreement in relation to such actions. -6. The Recipient may reproduce the Licensed Program as is without modification -and transfer such copies, publicly transmit or otherwise redistribute the -Licensed Program to a third party for commercial or non-commercial purposes -("Redistribute"), in accordance with the provisions set forth in Article 3 -Paragraph 2. +6. The Recipient may reproduce the Licensed Program as is without modification and transfer such copies, publicly transmit or otherwise redistribute the Licensed Program to a third party for commercial or non-commercial purposes ("Redistribute"), in accordance with the provisions set forth in Article 3 Paragraph 2. -7. The Recipient may create, use, reproduce and/or Redistribute a Derived -Program under the terms stated above for the Licensed Program: provided, that -the Recipient shall follow the provisions set forth in Article 3 Paragraph -1 when Redistributing the Derived Program. +7. The Recipient may create, use, reproduce and/or Redistribute a Derived Program under the terms stated above for the Licensed Program: provided, that the Recipient shall follow the provisions set forth in Article 3 Paragraph 1 when Redistributing the Derived Program. Article 3 (Restriction) -The license granted in the preceding Article shall be subject to the following -restrictions: +The license granted in the preceding Article shall be subject to the following restrictions: -1. If a Derived Program is Redistributed pursuant to Paragraph 4 and 7 of -the preceding Article, the following conditions must be met : +1. If a Derived Program is Redistributed pursuant to Paragraph 4 and 7 of the preceding Article, the following conditions must be met : -(1) The following must be also Redistributed together with the Derived Program, -or be made available online or by means of mailing mechanisms in exchange -for a cost which does not exceed the total costs of postage, storage medium -and handling fees: + (1) The following must be also Redistributed together with the Derived Program, or be made available online or by means of mailing mechanisms in exchange for a cost which does not exceed the total costs of postage, storage medium and handling fees: - (a) a copy of the Derived Program; and + (a) a copy of the Derived Program; and -(b) any additional file created by the font developing program in the course -of creating the Derived Program that can be used for further modification -of the Derived Program, if any. + (b) any additional file created by the font developing program in the course of creating the Derived Program that can be used for further modification of the Derived Program, if any. -(2) It is required to also Redistribute means to enable recipients of the -Derived Program to replace the Derived Program with the Licensed Program first -released under this License (the "Original Program"). Such means may be to -provide a difference file from the Original Program, or instructions setting -out a method to replace the Derived Program with the Original Program. + (2) It is required to also Redistribute means to enable recipients of the Derived Program to replace the Derived Program with the Licensed Program first released under this License (the "Original Program"). Such means may be to provide a difference file from the Original Program, or instructions setting out a method to replace the Derived Program with the Original Program. -(3) The Recipient must license the Derived Program under the terms and conditions -of this Agreement. + (3) The Recipient must license the Derived Program under the terms and conditions of this Agreement. -(4) No one may use or include the name of the Licensed Program as a program -name, font name or file name of the Derived Program. + (4) No one may use or include the name of the Licensed Program as a program name, font name or file name of the Derived Program. -(5) Any material to be made available online or by means of mailing a medium -to satisfy the requirements of this paragraph may be provided, verbatim, by -any party wishing to do so. + (5) Any material to be made available online or by means of mailing a medium to satisfy the requirements of this paragraph may be provided, verbatim, by any party wishing to do so. -2. If the Recipient Redistributes the Licensed Program pursuant to Paragraph -6 of the preceding Article, the Recipient shall meet all of the following -conditions: +2. If the Recipient Redistributes the Licensed Program pursuant to Paragraph 6 of the preceding Article, the Recipient shall meet all of the following conditions: - (1) The Recipient may not change the name of the Licensed Program. + (1) The Recipient may not change the name of the Licensed Program. - (2) The Recipient may not alter or otherwise modify the Licensed Program. + (2) The Recipient may not alter or otherwise modify the Licensed Program. -(3) The Recipient must attach a copy of this Agreement to the Licensed Program. + (3) The Recipient must attach a copy of this Agreement to the Licensed Program. -3. THIS LICENSED PROGRAM IS PROVIDED BY THE LICENSOR "AS IS" AND ANY EXPRESSED -OR IMPLIED WARRANTY AS TO THE LICENSED PROGRAM OR ANY DERIVED PROGRAM, INCLUDING, -BUT NOT LIMITED TO, WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, -OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO EVENT SHALL THE -LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXTENDED, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO; PROCUREMENT -OF SUBSTITUTED GOODS OR SERVICE; DAMAGES ARISING FROM SYSTEM FAILURE; LOSS -OR CORRUPTION OF EXISTING DATA OR PROGRAM; LOST PROFITS), HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE INSTALLATION, -USE, THE REPRODUCTION OR OTHER EXPLOITATION OF THE LICENSED PROGRAM OR ANY -DERIVED PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGES. +3. THIS LICENSED PROGRAM IS PROVIDED BY THE LICENSOR "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTY AS TO THE LICENSED PROGRAM OR ANY DERIVED PROGRAM, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE, ARE DISCLAIMED. IN NO EVENT SHALL THE LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXTENDED, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO; PROCUREMENT OF SUBSTITUTED GOODS OR SERVICE; DAMAGES ARISING FROM SYSTEM FAILURE; LOSS OR CORRUPTION OF EXISTING DATA OR PROGRAM; LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE INSTALLATION, USE, THE REPRODUCTION OR OTHER EXPLOITATION OF THE LICENSED PROGRAM OR ANY DERIVED PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -4. The Licensor is under no obligation to respond to any technical questions -or inquiries, or provide any other user support in connection with the installation, -use or the Reproduction and Other Exploitation of the Licensed Program or -Derived Programs thereof. +4. The Licensor is under no obligation to respond to any technical questions or inquiries, or provide any other user support in connection with the installation, use or the Reproduction and Other Exploitation of the Licensed Program or Derived Programs thereof. Article 4 (Termination of Agreement) -1. The term of this Agreement shall begin from the time of receipt of the -Licensed Program by the Recipient and shall continue as long as the Recipient -retains any such Licensed Program in any way. +1. The term of this Agreement shall begin from the time of receipt of the Licensed Program by the Recipient and shall continue as long as the Recipient retains any such Licensed Program in any way. -2. Notwithstanding the provision set forth in the preceding Paragraph, in -the event of the breach of any of the provisions set forth in this Agreement -by the Recipient, this Agreement shall automatically terminate without any -notice. In the case of such termination, the Recipient may not use or conduct -Reproduction and Other Exploitation of the Licensed Program or a Derived Program: -provided that such termination shall not affect any rights of any other Recipient -receiving the Licensed Program or the Derived Program from such Recipient -who breached this Agreement. +2. Notwithstanding the provision set forth in the preceding Paragraph, in the event of the breach of any of the provisions set forth in this Agreement by the Recipient, this Agreement shall automatically terminate without any notice. In the case of such termination, the Recipient may not use or conduct Reproduction and Other Exploitation of the Licensed Program or a Derived Program: provided that such termination shall not affect any rights of any other Recipient receiving the Licensed Program or the Derived Program from such Recipient who breached this Agreement. Article 5 (Governing Law) -1. IPA may publish revised and/or new versions of this License. In such an -event, the Recipient may select either this Agreement or any subsequent version -of the Agreement in using, conducting the Reproduction and Other Exploitation -of, or Redistributing the Licensed Program or a Derived Program. Other matters -not specified above shall be subject to the Copyright Law of Japan and other -related laws and regulations of Japan. +1. IPA may publish revised and/or new versions of this License. In such an event, the Recipient may select either this Agreement or any subsequent version of the Agreement in using, conducting the Reproduction and Other Exploitation of, or Redistributing the Licensed Program or a Derived Program. Other matters not specified above shall be subject to the Copyright Law of Japan and other related laws and regulations of Japan. - 2. This Agreement shall be construed under the laws of Japan. +2. This Agreement shall be construed under the laws of Japan. diff --git a/options/license/IPL-1.0 b/options/license/IPL-1.0 index 6f9963262..6a65f6052 100644 --- a/options/license/IPL-1.0 +++ b/options/license/IPL-1.0 @@ -1,236 +1,215 @@ IBM Public License Version 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS IBM - PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION - OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - 1. DEFINITIONS +1. DEFINITIONS +"Contribution" means: - "Contribution" means: - -a. in the case of International Business Machines Corporation ("IBM"), the -Original Program, and - - b. in the case of each Contributor, - - i. changes to the Program, and - -ii. additions to the Program; where such changes and/or additions to the Program -originate from and are distributed by that particular Contributor. A Contribution -'originates' from a Contributor if it was added to the Program by such Contributor -itself or anyone acting on such Contributor's behalf. Contributions do not -include additions to the Program which: +a. in the case of International Business Machines Corporation ("IBM"), the Original Program, and +b. in the case of each Contributor, + i. changes to the Program, and + ii. additions to the Program; +where such changes and/or additions to the Program originate from and +are distributed by that particular Contributor. A Contribution +'originates' from a Contributor if it was added to the Program by +such Contributor itself or anyone acting on such Contributor's +behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with +the Program under their own license agreement, and (ii) are not +derivative works of the Program. - the Program under their own license agreement, and (ii) are not +"Contributor" means IBM and any other entity that distributes the Program. - derivative works of the Program. +"Licensed Patents " mean patent claims licensable by a +Contributor which are necessarily infringed by the use or sale of its +Contribution alone or when combined with the Program. - "Contributor" means IBM and any other entity that distributes the Program. +"Original Program" means the original version of the software +accompanying this Agreement as released by IBM, including source +code, object code and documentation, if any. -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. +"Program" means the Original Program and Contributions. -"Original Program" means the original version of the software accompanying -this Agreement as released by IBM, including source code, object code and -documentation, if any. +"Recipient" means anyone who receives the Program under this +Agreement, including all Contributors. - "Program" means the Original Program and Contributions. +2. GRANT OF RIGHTS +a. Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free copyright +license to reproduce, prepare derivative works of, publicly display, +publicly perform, distribute and sublicense the Contribution of such +Contributor, if any, and such derivative works, in source code and +object code form. -"Recipient" means anyone who receives the Program under this Agreement, including -all Contributors. +b. Subject to the terms of this Agreement, each Contributor hereby +grants Recipient a non-exclusive, worldwide, royalty-free patent +license under Licensed Patents to make, use, sell, offer to sell, +import and otherwise transfer the Contribution of such Contributor, +if any, in source code and object code form. This patent license +shall apply to the combination of the Contribution and the Program +if, at the time the Contribution is added by the Contributor, such +addition of the Contribution causes such combination to be covered by +the Licensed Patents. The patent license shall not apply to any +other combinations which include the Contribution. No hardware per +se is licensed hereunder. - 2. GRANT OF RIGHTS +c. Recipient understands that although each Contributor grants the +licenses to its Contributions set forth herein, no assurances are +provided by any Contributor that the Program does not infringe the +patent or other intellectual property rights of any other entity. +Each Contributor disclaims any liability to Recipient for claims +brought by any other entity based on infringement of intellectual +property rights or otherwise. As a condition to exercising the +rights and licenses granted hereunder, each Recipient hereby assumes +sole responsibility to secure any other intellectual property rights +needed, if any. For example, if a third party patent license is +required to allow Recipient to distribute the Program, it is +Recipient's responsibility to acquire that license before +distributing the Program. -a. Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, -prepare derivative works of, publicly display, publicly perform, distribute -and sublicense the Contribution of such Contributor, if any, and such derivative -works, in source code and object code form. +d. Each Contributor represents that to its knowledge it has +sufficient copyright rights in its Contribution, if any, to grant the +copyright license set forth in this Agreement. -b. Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -This patent license shall apply to the combination of the Contribution and -the Program if, at the time the Contribution is added by the Contributor, -such addition of the Contribution causes such combination to be covered by -the Licensed Patents. The patent license shall not apply to any other combinations -which include the Contribution. No hardware per se is licensed hereunder. +3. REQUIREMENTS +A Contributor may choose to distribute +the Program in object code form under its own license agreement, +provided that: - c. Recipient understands that although each Contributor grants the +a. it complies with the terms and conditions of this Agreement; and +b. its license agreement: + i. effectively disclaims on behalf of all Contributors all warranties + and conditions, express and implied, including warranties or + conditions of title and non-infringement, and implied warranties or + conditions of merchantability and fitness for a particular purpose; + ii. effectively excludes on behalf of all Contributors all liability + for damages, including direct, indirect, special, incidental and + consequential damages, such as lost profits; + iii. states that any provisions which differ from this Agreement are + offered by that Contributor alone and not by any other party; and + iv. states that source code for the Program is available from such + Contributor, and informs licensees how to obtain it in a reasonable + manner on or through a medium customarily used for software exchange. - licenses to its Contributions set forth herein, no assurances are +When the Program is made available in source code form: +a. it must be made available under this Agreement; and +b. a copy of this Agreement must be included with each copy of the +Program. - provided by any Contributor that the Program does not infringe the +Each Contributor must include the following in a conspicuous location in the Program: - patent or other intellectual property rights of any other entity. + Copyright (C) 1996, 1999 International Business Machines Corporation and others. All Rights Reserved. - Each Contributor disclaims any liability to Recipient for claims +In addition, each Contributor must identify itself as the originator +of its Contribution, if any, in a manner that reasonably allows +subsequent Recipients to identify the originator of the Contribution. - brought by any other entity based on infringement of intellectual +4. COMMERCIAL DISTRIBUTION +Commercial distributors of software may accept certain +responsibilities with respect to end users, business partners and the +like. While this license is intended to facilitate the commercial +use of the Program, the Contributor who includes the Program in a +commercial product offering should do so in a manner which does not +create potential liability for other Contributors. Therefore, if a +Contributor includes the Program in a commercial product offering, +such Contributor ("Commercial Contributor") hereby agrees to defend +and indemnify every other Contributor ("Indemnified Contributor") +against any losses, damages and costs (collectively "Losses") arising +from claims, lawsuits and other legal actions brought by a third +party against the Indemnified Contributor to the extent caused by the +acts or omissions of such Commercial Contributor in connection with +its distribution of the Program in a commercial product offering. +The obligations in this section do not apply to any claims or Losses +relating to any actual or alleged intellectual property infringement. +In order to qualify, an Indemnified Contributor must: a) promptly +notify the Commercial Contributor in writing of such claim, and b) +allow the Commercial Contributor to control, and cooperate with the +Commercial Contributor in, the defense and any related settlement +negotiations. The Indemnified Contributor may participate in any +such claim at its own expense. - property rights or otherwise. As a condition to exercising the +For example, a Contributor might include the Program in a commercial +product offering, Product X. That Contributor is then a Commercial +Contributor. If that Commercial Contributor then makes performance +claims, or offers warranties related to Product X, those performance +claims and warranties are such Commercial Contributor's +responsibility alone. Under this section, the Commercial Contributor +would have to defend claims against the other Contributors related to +those performance claims and warranties, and if a court requires any +other Contributor to pay any damages as a result, the Commercial +Contributor must pay those damages. - rights and licenses granted hereunder, each Recipient hereby assumes +5. NO WARRANTY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS +PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY +WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY +OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely +responsible for determining the appropriateness of using and +distributing the Program and assumes all risks associated with its +exercise of rights under this Agreement, including but not limited to +the risks and costs of program errors, compliance with applicable +laws, damage to or loss of data, programs or equipment, and +unavailability or interruption of operations. - sole responsibility to secure any other intellectual property rights - - needed, if any. For example, if a third party patent license is - - required to allow Recipient to distribute the Program, it is - - Recipient's responsibility to acquire that license before - - distributing the Program. - - d. Each Contributor represents that to its knowledge it has - - sufficient copyright rights in its Contribution, if any, to grant the - - copyright license set forth in this Agreement. - - 3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under -its own license agreement, provided that: - - a. it complies with the terms and conditions of this Agreement; and - - b. its license agreement: - -i. effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; - -ii. effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, -such as lost profits; - -iii. states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party; and - -iv. states that source code for the Program is available from such Contributor, -and informs licensees how to obtain it in a reasonable manner on or through -a medium customarily used for software exchange. - - When the Program is made available in source code form: - - a. it must be made available under this Agreement; and - -b. a copy of this Agreement must be included with each copy of the Program. - -Each Contributor must include the following in a conspicuous location in the -Program: - -Copyright (C) 1996, 1999 International Business Machines Corporation and others. -All Rights Reserved. - -In addition, each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent Recipients -to identify the originator of the Contribution. - - 4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Contributor -who includes the Program in a commercial product offering should do so in -a manner which does not create potential liability for other Contributors. -Therefore, if a Contributor includes the Program in a commercial product offering, -such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify -every other Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor -to the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Contributor in writing of such claim, and b) allow the Commercial Contributor -to control, and cooperate with the Commercial Contributor in, the defense -and any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense. - -For example, a Contributor might include the Program in a commercial product -offering, Product X. That Contributor is then a Commercial Contributor. If -that Commercial Contributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such Commercial -Contributor's responsibility alone. Under this section, the Commercial Contributor -would have to defend claims against the other Contributors related to those -performance claims and warranties, and if a court requires any other Contributor -to pay any damages as a result, the Commercial Contributor must pay those -damages. - - 5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON -AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS -OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -Each Recipient is solely responsible for determining the appropriateness of -using and distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement, including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage -to or loss of data, programs or equipment, and unavailability or interruption -of operations. - - 6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS +6. DISCLAIMER OF LIABILITY +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT +NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR +TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 7. GENERAL +7. GENERAL +If any provision of this Agreement is invalid or unenforceable under +applicable law, it shall not affect the validity or enforceability of +the remainder of the terms of this Agreement, and without further +action by the parties hereto, such provision shall be reformed to the +minimum extent necessary to make such provision valid and enforceable. -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this Agreement, and without further action by the parties hereto, -such provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. +If Recipient institutes patent litigation against a Contributor with +respect to a patent applicable to software (including a cross-claim +or counterclaim in a lawsuit), then any patent licenses granted by +that Contributor to such Recipient under this Agreement shall +terminate as of the date such litigation is filed. In addition, if +Recipient institutes patent litigation against any entity (including +a cross-claim or counterclaim in a lawsuit) alleging that the Program +itself (excluding combinations of the Program with other software or +hardware) infringes such Recipient's patent(s), then such Recipient's +rights granted under Section 2(b) shall terminate as of the date such +litigation is filed. -If Recipient institutes patent litigation against a Contributor with respect -to a patent applicable to software (including a cross-claim or counterclaim -in a lawsuit), then any patent licenses granted by that Contributor to such -Recipient under this Agreement shall terminate as of the date such litigation -is filed. In addition, if Recipient institutes patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging that -the Program itself (excluding combinations of the Program with other software -or hardware) infringes such Recipient's patent(s), then such Recipient's rights -granted under Section 2(b) shall terminate as of the date such litigation -is filed. +All Recipient's rights under this Agreement shall terminate if it +fails to comply with any of the material terms or conditions of this +Agreement and does not cure such failure in a reasonable period of +time after becoming aware of such noncompliance. If all Recipient's +rights under this Agreement terminate, Recipient agrees to cease use +and distribution of the Program as soon as reasonably practicable. +However, Recipient's obligations under this Agreement and any +licenses granted by Recipient relating to the Program shall continue +and survive. -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and -does not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as reasonably -practicable. However, Recipient's obligations under this Agreement and any -licenses granted by Recipient relating to the Program shall continue and survive. +IBM may publish new versions (including revisions) of this Agreement +from time to time. Each new version of the Agreement will be given a +distinguishing version number. The Program (including Contributions) +may always be distributed subject to the version of the Agreement +under which it was received. In addition, after a new version of the +Agreement is published, Contributor may elect to distribute the +Program (including its Contributions) under the new version. No one +other than IBM has the right to modify this Agreement. Except as +expressly stated in Sections 2(a) and 2(b) above, Recipient receives +no rights or licenses to the intellectual property of any Contributor +under this Agreement, whether expressly, by implication, estoppel or +otherwise. All rights in the Program not expressly granted under +this Agreement are reserved. -IBM may publish new versions (including revisions) of this Agreement from -time to time. Each new version of the Agreement will be given a distinguishing -version number. The Program (including Contributions) may always be distributed -subject to the version of the Agreement under which it was received. In addition, -after a new version of the Agreement is published, Contributor may elect to -distribute the Program (including its Contributions) under the new version. -No one other than IBM has the right to modify this Agreement. Except as expressly -stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses -to the intellectual property of any Contributor under this Agreement, whether -expressly, by implication, estoppel or otherwise. All rights in the Program -not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual -property laws of the United States of America. No party to this Agreement -will bring a legal action under this Agreement more than one year after the -cause of action arose. Each party waives its rights to a jury trial in any -resulting litigation. +This Agreement is governed by the laws of the State of New York and +the intellectual property laws of the United States of America. No +party to this Agreement will bring a legal action under this +Agreement more than one year after the cause of action arose. Each +party waives its rights to a jury trial in any resulting litigation. diff --git a/options/license/ISC b/options/license/ISC index 412d4e203..b9c199c98 100644 --- a/options/license/ISC +++ b/options/license/ISC @@ -1,14 +1,8 @@ -ISC License Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") +ISC License: +Copyright (c) 2004-2010 by Internet Systems Consortium, Inc. ("ISC") Copyright (c) 1995-2003 by Internet Software Consortium -Permission to use, copy, modify, and /or distribute this software for any -purpose with or without fee is hereby granted, provided that the above copyright -notice and this permission notice appear in all copies. +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD -TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. -IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING -OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/ImageMagick b/options/license/ImageMagick index ea2246611..e627fd7b4 100644 --- a/options/license/ImageMagick +++ b/options/license/ImageMagick @@ -1,241 +1,98 @@ -Before we get to the text of the license, lets just review what the license -says in simple terms: +Before we get to the text of the license, lets just review what the license says in simple terms: It allows you to: -* freely download and use ImageMagick software, in whole or in part, for personal, -company internal, or commercial purposes; - - * use ImageMagick software in packages or distributions that you create; - - * link against a library under a different license; - - * link code under a different license against a library under this license; - - * merge code into a work under a different license; - - * extend patent grants to any code using code under this license; - - * and extend patent protection. + * freely download and use ImageMagick software, in whole or in part, for personal, company internal, or commercial purposes; + * use ImageMagick software in packages or distributions that you create; + * link against a library under a different license; + * link code under a different license against a library under this license; + * merge code into a work under a different license; + * extend patent grants to any code using code under this license; + * and extend patent protection. It forbids you to: -* redistribute any piece of ImageMagick-originated software without proper -attribution; - -* use any marks owned by ImageMagick Studio LLC in any way that might state -or imply that ImageMagick Studio LLC endorses your distribution; - -* use any marks owned by ImageMagick Studio LLC in any way that might state -or imply that you created the ImageMagick software in question. + * redistribute any piece of ImageMagick-originated software without proper attribution; + * use any marks owned by ImageMagick Studio LLC in any way that might state or imply that ImageMagick Studio LLC endorses your distribution; + * use any marks owned by ImageMagick Studio LLC in any way that might state or imply that you created the ImageMagick software in question. It requires you to: -* include a copy of the license in any redistribution you may make that includes -ImageMagick software; - -* provide clear attribution to ImageMagick Studio LLC for any distributions -that include ImageMagick software. + * include a copy of the license in any redistribution you may make that includes ImageMagick software; + * provide clear attribution to ImageMagick Studio LLC for any distributions that include ImageMagick software. It does not require you to: -* include the source of the ImageMagick software itself, or of any modifications -you may have made to it, in any redistribution you may assemble that includes -it; - -* submit changes that you make to the software back to the ImageMagick Studio -LLC (though such feedback is encouraged). + * include the source of the ImageMagick software itself, or of any modifications you may have made to it, in any redistribution you may assemble that includes it; + * submit changes that you make to the software back to the ImageMagick Studio LLC (though such feedback is encouraged). A few other clarifications include: - * ImageMagick is freely available without charge; - -* you may include ImageMagick on a DVD as long as you comply with the terms -of the license; - -* you can give modified code away for free or sell it under the terms of the -ImageMagick license or distribute the result under a different license, but -you need to acknowledge the use of the ImageMagick software; - - * the license is compatible with the GPL V3. - - * when exporting the ImageMagick software, review its export classification. + * ImageMagick is freely available without charge; + * you may include ImageMagick on a DVD as long as you comply with the terms of the license; + * you can give modified code away for free or sell it under the terms of the ImageMagick license or distribute the result under a different license, but you need to acknowledge the use of the ImageMagick software; + * the license is compatible with the GPL V3. + * when exporting the ImageMagick software, review its export classification. Terms and Conditions for Use, Reproduction, and Distribution -The legally binding and authoritative terms and conditions for use, reproduction, -and distribution of ImageMagick follow: Copyright 1999-2013 ImageMagick Studio -LLC, a non-profit organization dedicated to making software imaging solutions -freely available. +The legally binding and authoritative terms and conditions for use, reproduction, and distribution of ImageMagick follow: - 1. Definitions. +Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization dedicated to making software imaging solutions freely available. -License shall mean the terms and conditions for use, reproduction, and distribution -as defined by Sections 1 through 9 of this document. +1. Definitions. -Licensor shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. +License shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -Legal Entity shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, control means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of -the outstanding shares, or (iii) beneficial ownership of such entity. +Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. -You (or Your) shall mean an individual or Legal Entity exercising permissions -granted by this License. +Legal Entity shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, control means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -Source form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. +You (or Your) shall mean an individual or Legal Entity exercising permissions granted by this License. -Object form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object -code, generated documentation, and conversions to other media types. +Source form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. -Work shall mean the work of authorship, whether in Source or Object form, -made available under the License, as indicated by a copyright notice that -is included in or attached to the work (an example is provided in the Appendix -below). +Object form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. -Derivative Works shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative -Works shall not include works that remain separable from, or merely link (or -bind by name) to the interfaces of, the Work and Derivative Works thereof. +Work shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). -Contribution shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative -Works thereof, that is intentionally submitted to Licensor for inclusion in -the Work by the copyright owner or by an individual or Legal Entity authorized -to submit on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication -sent to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor -for the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as Not a Contribution. +Derivative Works shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. -Contributor shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently incorporated -within the Work. +Contribution shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as Not a Contribution. -2. Grant of Copyright License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable copyright license to reproduce, prepare -Derivative Works of, publicly display, publicly perform, sublicense, and distribute -the Work and such Derivative Works in Source or Object form. +Contributor shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -3. Grant of Patent License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable patent license to make, have made, use, -offer to sell, sell, import, and otherwise transfer the Work, where such license -applies only to those patent claims licensable by such Contributor that are -necessarily infringed by their Contribution(s) alone or by combination of -their Contribution(s) with the Work to which such Contribution(s) was submitted. -If You institute patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated -within the Work constitutes direct or contributory patent infringement, then -any patent licenses granted to You under this License for that Work shall -terminate as of the date such litigation is filed. +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, and -in Source or Object form, provided that You meet the following conditions: +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -a. You must give any other recipients of the Work or Derivative Works a copy -of this License; and +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: -b. You must cause any modified files to carry prominent notices stating that -You changed the files; and + a. You must give any other recipients of the Work or Derivative Works a copy of this License; and + b. You must cause any modified files to carry prominent notices stating that You changed the files; and + c. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + d. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. -c. You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source -form of the Work, excluding those notices that do not pertain to any part -of the Derivative Works; and +You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. -d. If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part -of the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works -that You distribute, alongside or as an addendum to the NOTICE text from the -Work, provided that such additional attribution notices cannot be construed -as modifying the License. +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, -or distribution of Your modifications, or for any such Derivative Works as -a whole, provided Your use, reproduction, and distribution of the Work otherwise -complies with the conditions stated in this License. +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. -5. Submission of Contributions. Unless You explicitly state otherwise, any -Contribution intentionally submitted for inclusion in the Work by You to the -Licensor shall be under the terms and conditions of this License, without -any additional terms or conditions. Notwithstanding the above, nothing herein -shall supersede or modify the terms of any separate license agreement you -may have executed with Licensor regarding such Contributions. +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -7. Disclaimer of Warranty. Unless required by applicable law or agreed to -in writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR -A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness -of using or redistributing the Work and assume any risks associated with Your -exercise of permissions under this License. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -8. Limitation of Liability. In no event and under no legal theory, whether -in tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to -in writing, shall any Contributor be liable to You for damages, including -any direct, indirect, special, incidental, or consequential damages of any -character arising as a result of this License or out of the use or inability -to use the Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses), even if such Contributor has been advised of the possibility -of such damages. +How to Apply the License to your Work -9. Accepting Warranty or Additional Liability. While redistributing the Work -or Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such obligations, -You may act only on Your own behalf and on Your sole responsibility, not on -behalf of any other Contributor, and only if You agree to indemnify, defend, -and hold each Contributor harmless for any liability incurred by, or claims -asserted against, such Contributor by reason of your accepting any such warranty -or additional liability. How to Apply the License to your Work +To apply the ImageMagick License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information (don't include the brackets). The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. -To apply the ImageMagick License to your work, attach the following boilerplate -notice, with the fields enclosed by brackets "[]" replaced with your own identifying -information (don't include the brackets). The text should be enclosed in the -appropriate comment syntax for the file format. We also recommend that a file -or class name and description of purpose be included on the same "printed -page" as the copyright notice for easier identification within third-party -archives. + Copyright [yyyy] [name of copyright owner] -Copyright [yyyy] [name of copyright owner] + Licensed under the ImageMagick License (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -Licensed under the ImageMagick License (the "License"); you may not use this -file except in compliance with the License. You may obtain a copy of the License -at + http://www.imagemagick.org/script/license.php -http://www.imagemagick.org/script/license.php - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/options/license/Imlib2 b/options/license/Imlib2 index d4a80dcfb..9f9dfd212 100644 --- a/options/license/Imlib2 +++ b/options/license/Imlib2 @@ -1,32 +1,9 @@ Imlib2 License -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies of the Software and its Copyright notices. In addition publicly -documented acknowledgment must be given that this software has been used if -no source code of this software is made available publicly. Making the source -available publicly means including the source for this software with the distribution, -or a method to get this software via some reasonable mechanism (electronic -transfer via a network or media) as well as making an offer to supply the -source on request. This Copyright notice serves as an offer to supply the -source on on request as well. Instead of this, supplying acknowledgments of -use of this software in either Copyright notices, Manuals, Publicity and Marketing -documents or any documentation provided with any product containing this software. -This License does not apply to any software that links to the libraries provided -by this software (statically or dynamically), but only to the software provided. +The above copyright notice and this permission notice shall be included in all copies of the Software and its Copyright notices. In addition publicly documented acknowledgment must be given that this software has been used if no source code of this software is made available publicly. Making the source available publicly means including the source for this software with the distribution, or a method to get this software via some reasonable mechanism (electronic transfer via a network or media) as well as making an offer to supply the source on request. This Copyright notice serves as an offer to supply the source on on request as well. Instead of this, supplying acknowledgments of use of this software in either Copyright notices, Manuals, Publicity and Marketing documents or any documentation provided with any product containing this software. This License does not apply to any software that links to the libraries provided by this software (statically or dynamically), but only to the software provided. -Please see the COPYING-PLAIN for a plain-english explanation of this notice -and its intent. +Please see the COPYING-PLAIN for a plain-english explanation of this notice and its intent. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/Info-ZIP b/options/license/Info-ZIP index 066343e62..9067701bb 100644 --- a/options/license/Info-ZIP +++ b/options/license/Info-ZIP @@ -1,51 +1,16 @@ -Info-ZIP License Copyright (c) 1990-2009 Info-ZIP. All rights reserved. +Info-ZIP License -For the purposes of this copyright and license, "Info-ZIP" is defined as the -following set of individuals: +Copyright (c) 1990-2009 Info-ZIP. All rights reserved. -Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, Jean-loup -Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, Dirk Haase, -Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, -Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio -Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve Salisbury, -Dave Smith, Steven M. Schweda, Christian Spieler, Cosmin Truta, Antoine Verheijen, -Paul von Behren, Rich Wales, Mike White. +For the purposes of this copyright and license, "Info-ZIP" is defined as the following set of individuals: -This software is provided "as is," without warranty of any kind, express or -implied. In no event shall Info-ZIP or its contributors be held liable for -any direct, indirect, incidental, special or consequential damages arising -out of the use of or inability to use this software. + Mark Adler, John Bush, Karl Davis, Harald Denker, Jean-Michel Dubois, Jean-loup Gailly, Hunter Goatley, Ed Gordon, Ian Gorman, Chris Herborth, Dirk Haase, Greg Hartwig, Robert Heath, Jonathan Hudson, Paul Kienitz, David Kirschbaum, Johnny Lee, Onno van der Linden, Igor Mandrichenko, Steve P. Miller, Sergio Monesi, Keith Owens, George Petrov, Greg Roelofs, Kai Uwe Rommel, Steve Salisbury, Dave Smith, Steven M. Schweda, Christian Spieler, Cosmin Truta, Antoine Verheijen, Paul von Behren, Rich Wales, Mike White. -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject -to the above disclaimer and the following restrictions: +This software is provided "as is," without warranty of any kind, express or implied. In no event shall Info-ZIP or its contributors be held liable for any direct, indirect, incidental, special or consequential damages arising out of the use of or inability to use this software. -* Redistributions of source code (in whole or in part) must retain the above -copyright notice, definition, disclaimer, and this list of conditions. +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the above disclaimer and the following restrictions: -* Redistributions in binary form (compiled executables and libraries) must -reproduce the above copyright notice, definition, disclaimer, and this list -of conditions in documentation and/or other materials provided with the distribution. -Additional documentation is not needed for executables where a command line -license option provides these and a note regarding this option is in the executable's -startup banner. The sole exception to this condition is redistribution of -a standard UnZipSFX binary (including SFXWiz) as part of a self-extracting -archive; that is permitted without inclusion of this license, as long as the -normal SFX banner has not been removed from the binary or disabled. - -* Altered versions--including, but not limited to, ports to new operating -systems, existing ports with new graphical interfaces, versions with modified -or added functionality, and dynamic, shared, or static library versions not -from Info-ZIP--must be plainly marked as such and must not be misrepresented -as being the original source or, if binaries, compiled from the original source. -Such altered versions also must not be misrepresented as being Info-ZIP releases--including, -but not limited to, labeling of the altered versions with the names "Info-ZIP" -(or any variation thereof, including, but not limited to, different capitalizations), -"Pocket UnZip," "WiZ" or "MacZip" without the explicit permission of Info-ZIP. -Such altered versions are further prohibited from misrepresentative use of -the Zip-Bugs or Info-ZIP e-mail addresses or the Info-ZIP URL(s), such as -to imply Info-ZIP will provide support for the altered versions. - -* Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," -"UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own -source and binary releases. + * Redistributions of source code (in whole or in part) must retain the above copyright notice, definition, disclaimer, and this list of conditions. + * Redistributions in binary form (compiled executables and libraries) must reproduce the above copyright notice, definition, disclaimer, and this list of conditions in documentation and/or other materials provided with the distribution. Additional documentation is not needed for executables where a command line license option provides these and a note regarding this option is in the executable's startup banner. The sole exception to this condition is redistribution of a standard UnZipSFX binary (including SFXWiz) as part of a self-extracting archive; that is permitted without inclusion of this license, as long as the normal SFX banner has not been removed from the binary or disabled. + * Altered versions--including, but not limited to, ports to new operating systems, existing ports with new graphical interfaces, versions with modified or added functionality, and dynamic, shared, or static library versions not from Info-ZIP--must be plainly marked as such and must not be misrepresented as being the original source or, if binaries, compiled from the original source. Such altered versions also must not be misrepresented as being Info-ZIP releases--including, but not limited to, labeling of the altered versions with the names "Info-ZIP" (or any variation thereof, including, but not limited to, different capitalizations), "Pocket UnZip," "WiZ" or "MacZip" without the explicit permission of Info-ZIP. Such altered versions are further prohibited from misrepresentative use of the Zip-Bugs or Info-ZIP e-mail addresses or the Info-ZIP URL(s), such as to imply Info-ZIP will provide support for the altered versions. + * Info-ZIP retains the right to use the names "Info-ZIP," "Zip," "UnZip," "UnZipSFX," "WiZ," "Pocket UnZip," "Pocket Zip," and "MacZip" for its own source and binary releases. diff --git a/options/license/Intel b/options/license/Intel index c719c9bce..5b949805f 100644 --- a/options/license/Intel +++ b/options/license/Intel @@ -1,37 +1,13 @@ -Intel Open Source License Copyright (c) 1996-2000 Intel Corporation +Intel Open Source License -All rights reserved. +Copyright (c) 1996-2000 Intel Corporation All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -• Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + • Neither the name of the Intel Corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -• Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -• Neither the name of the Intel Corporation nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF YOUR -JURISDICTION. It is licensee's responsibility to comply with any export regulations -applicable in licensee's jurisdiction. Under CURRENT (May 2000) U.S. export -regulations this software is eligible for export from the U.S. and can be -downloaded by or otherwise exported or reexported worldwide EXCEPT to U.S. -embargoed destinations which include Cuba, Iraq, Libya, North Korea, Iran, -Syria, Sudan, Afghanistan and any other country to which the U.S. has embargoed -goods and services. +EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF YOUR JURISDICTION. It is licensee's responsibility to comply with any export regulations applicable in licensee's jurisdiction. Under CURRENT (May 2000) U.S. export regulations this software is eligible for export from the U.S. and can be downloaded by or otherwise exported or reexported worldwide EXCEPT to U.S. embargoed destinations which include Cuba, Iraq, Libya, North Korea, Iran, Syria, Sudan, Afghanistan and any other country to which the U.S. has embargoed goods and services. diff --git a/options/license/Intel-ACPI b/options/license/Intel-ACPI index 3f4331f13..e5cc5fd19 100644 --- a/options/license/Intel-ACPI +++ b/options/license/Intel-ACPI @@ -1,105 +1,34 @@ ACPI - Software License Agreement +Software License Agreement IMPORTANT - READ BEFORE COPYING, INSTALLING OR USING. -Software License Agreement IMPORTANT - READ BEFORE COPYING, INSTALLING OR -USING. +Do not use or load this software and any associated materials (collectively, the "Software") until you have carefully read the following terms and conditions. By loading or using the Software, you agree to the terms of this Agreement. If you do not wish to so agree, do not install or use the Software. -Do not use or load this software and any associated materials (collectively, -the "Software") until you have carefully read the following terms and conditions. -By loading or using the Software, you agree to the terms of this Agreement. -If you do not wish to so agree, do not install or use the Software. +1. COPYRIGHT NOTICE Some or all of this work - Copyright © 1999-2005, Intel Corp. All rights reserved. -1. COPYRIGHT NOTICE Some or all of this work - Copyright © 1999-2005, Intel -Corp. All rights reserved. +2. LICENSE - 2. LICENSE + 2.1. This is your license from Intel Corp. under its intellectual property rights. You may have additional license terms from the party that provided you this software, covering your right to use that party's intellectual property rights. -2.1. This is your license from Intel Corp. under its intellectual property -rights. You may have additional license terms from the party that provided -you this software, covering your right to use that party's intellectual property -rights. + 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a copy of the source code appearing in this file ("Covered Code") an irrevocable, perpetual, worldwide license under Intel's copyrights in the base code distributed originally by Intel ("Original Intel Code") to copy, make derivatives, distribute, use and display any portion of the Covered Code in any form, with the right to sublicense such rights; and -2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a -copy of the source code appearing in this file ("Covered Code") an irrevocable, -perpetual, worldwide license under Intel's copyrights in the base code distributed -originally by Intel ("Original Intel Code") to copy, make derivatives, distribute, -use and display any portion of the Covered Code in any form, with the right -to sublicense such rights; and + 2.3. Intel grants Licensee a non-exclusive and non-transferable patent license (with the right to sublicense), under only those claims of Intel patents that are infringed by the Original Intel Code, to make, use, sell, offer to sell, and import the Covered Code and derivative works thereof solely to the minimum extent necessary to exercise the above copyright license, and in no event shall the patent license extend to any additions to or modifications of the Original Intel Code. No other license or right is granted directly or by implication, estoppel or otherwise; The above copyright and patent license is granted only if the following conditions are met: -2.3. Intel grants Licensee a non-exclusive and non-transferable patent license -(with the right to sublicense), under only those claims of Intel patents that -are infringed by the Original Intel Code, to make, use, sell, offer to sell, -and import the Covered Code and derivative works thereof solely to the minimum -extent necessary to exercise the above copyright license, and in no event -shall the patent license extend to any additions to or modifications of the -Original Intel Code. No other license or right is granted directly or by implication, -estoppel or otherwise; The above copyright and patent license is granted only -if the following conditions are met: +3. CONDITIONS - 3. CONDITIONS + 3.1. Redistribution of Source with Rights to Further Distribute Source. Redistribution of source code of any substantial portion of the Covered Code or modification with rights to further distribute source must include the above Copyright Notice, the above License, this list of Conditions, and the following Disclaimer and Export Compliance provision. In addition, Licensee must cause all Covered Code to which Licensee contributes to contain a file documenting the changes Licensee made to create that Covered Code and the date of any change. Licensee must include in that file the documentation of any changes made by any predecessor Licensee. Licensee must include a prominent statement that the modification is derived, directly or indirectly, from Original Intel Code. -3.1. Redistribution of Source with Rights to Further Distribute Source. Redistribution -of source code of any substantial portion of the Covered Code or modification -with rights to further distribute source must include the above Copyright -Notice, the above License, this list of Conditions, and the following Disclaimer -and Export Compliance provision. In addition, Licensee must cause all Covered -Code to which Licensee contributes to contain a file documenting the changes -Licensee made to create that Covered Code and the date of any change. Licensee -must include in that file the documentation of any changes made by any predecessor -Licensee. Licensee must include a prominent statement that the modification -is derived, directly or indirectly, from Original Intel Code. + 3.2. Redistribution of Source with no Rights to Further Distribute Source. Redistribution of source code of any substantial portion of the Covered Code or modification without rights to further distribute source must include the following Disclaimer and Export Compliance provision in the documentation and/or other materials provided with distribution. In addition, Licensee may not authorize further sublicense of source of any portion of the Covered Code, and must include terms to the effect that the license from Licensee to its licensee is limited to the intellectual property embodied in the software Licensee provides to its licensee, and not to intellectual property embodied in modifications its licensee may make. -3.2. Redistribution of Source with no Rights to Further Distribute Source. -Redistribution of source code of any substantial portion of the Covered Code -or modification without rights to further distribute source must include the -following Disclaimer and Export Compliance provision in the documentation -and/or other materials provided with distribution. In addition, Licensee may -not authorize further sublicense of source of any portion of the Covered Code, -and must include terms to the effect that the license from Licensee to its -licensee is limited to the intellectual property embodied in the software -Licensee provides to its licensee, and not to intellectual property embodied -in modifications its licensee may make. + 3.3. Redistribution of Executable. Redistribution in executable form of any substantial portion of the Covered Code or modification must reproduce the above Copyright Notice, and the following Disclaimer and Export Compliance provision in the documentation and/or other materials provided with the distribution. -3.3. Redistribution of Executable. Redistribution in executable form of any -substantial portion of the Covered Code or modification must reproduce the -above Copyright Notice, and the following Disclaimer and Export Compliance -provision in the documentation and/or other materials provided with the distribution. + 3.4. Intel retains all right, title, and interest in and to the Original Intel Code. -3.4. Intel retains all right, title, and interest in and to the Original Intel -Code. + 3.5. Neither the name Intel nor any other trademark owned or controlled by Intel shall be used in advertising or otherwise to promote the sale, use or other dealings in products derived from or relating to the Covered Code without prior written authorization from Intel. -3.5. Neither the name Intel nor any other trademark owned or controlled by -Intel shall be used in advertising or otherwise to promote the sale, use or -other dealings in products derived from or relating to the Covered Code without -prior written authorization from Intel. +4. DISCLAIMER AND EXPORT COMPLIANCE - 4. DISCLAIMER AND EXPORT COMPLIANCE + 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. -4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED HERE. -ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE IS PROVIDED -"AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, INSTALLATION, -TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY UPDATES, ENHANCEMENTS -OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, -NONINFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. + 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. -4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES -OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR -COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, -SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY -CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL -HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS SHALL -APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY LIMITED -REMEDY. - -4.3. Licensee shall not export, either directly or indirectly, any of this -software or system incorporating such software without first obtaining any -required license or other approval from the U. S. Department of Commerce or -any other agency or department of the United States Government. In the event -Licensee exports any such software from the United States or re-exports any -such software from a foreign destination, Licensee shall ensure that the distribution -and export/re-export of the software is in compliance with all laws, regulations, -orders, or other restrictions of the U.S. Export Administration Regulations. -Licensee agrees that neither it nor any of its subsidiaries will export/re-export -any technical data, process, software, or service, directly or indirectly, -to any country for which the United States government or any agency thereof -requires an export license, other governmental approval, or letter of assurance, -without first obtaining such license, approval or letter. + 4.3. Licensee shall not export, either directly or indirectly, any of this software or system incorporating such software without first obtaining any required license or other approval from the U. S. Department of Commerce or any other agency or department of the United States Government. In the event Licensee exports any such software from the United States or re-exports any such software from a foreign destination, Licensee shall ensure that the distribution and export/re-export of the software is in compliance with all laws, regulations, orders, or other restrictions of the U.S. Export Administration Regulations. Licensee agrees that neither it nor any of its subsidiaries will export/re-export any technical data, process, software, or service, directly or indirectly, to any country for which the United States government or any agency thereof requires an export license, other governmental approval, or letter of assurance, without first obtaining such license, approval or letter. diff --git a/options/license/Interbase-1.0 b/options/license/Interbase-1.0 index 03bdf2ffd..5a73f24c3 100644 --- a/options/license/Interbase-1.0 +++ b/options/license/Interbase-1.0 @@ -1,465 +1,199 @@ INTERBASE PUBLIC LICENSE - Version 1.0 - 1. Definitions. +1. Definitions. -1.0.1. "Commercial Use" means distribution or otherwise making the Covered -Code available to a third party. +1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. ''Contributor'' means each entity that creates or contributes to the -creation of Modifications. +1.1. ''Contributor'' means each entity that creates or contributes to the creation of Modifications. -1.2. ''Contributor Version'' means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. +1.2. ''Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. ''Covered Code'' means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. +1.3. ''Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. ''Electronic Distribution Mechanism'' means a mechanism generally accepted -in the software development community for the electronic transfer of data. +1.4. ''Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data. 1.5. ''Executable'' means Covered Code in any form other than Source Code. -1.6. ''Initial Developer'' means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. +1.6. ''Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. ''Larger Work'' means a work which combines Covered Code or portions -thereof with code not governed by the terms of this License. +1.7. ''Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. ''License'' means this document. +1.8. ''License'' means this document. -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. +1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9. ''Modifications'' means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: +1.9. ''Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. +A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. -1.10. ''Original Code'' means Source Code of computer software code which -is described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. - -1.11. ''Source Code'' means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. - -1.12. "You'' (or "Your") means an individual or a legal entity exercising -rights under, and complying with all of the terms of, this License or a future -version of this License issued under Section 6.1. For legal entities, "You'' -includes any entity which controls, is controlled by, or is under common control -with You. For purposes of this definition, "control'' means (a) the power, -direct or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - - 2.1. The Initial Developer Grant. - -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and - -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). - -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. - -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - -Subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). - -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. - -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - - 3.1. Application of License. - -The Modifications which You create or to which You contribute are governed -by the terms of this License, including without limitation Section 2.2. The -Source Code version of Covered Code may be distributed only under the terms -of this License or a future version of this License released under Section -6.1, and You must include a copy of this License with every copy of the Source -Code You distribute. You may not offer or impose any terms on any Source Code -version that alters or restricts the applicable version of this License or -the recipients' rights hereunder. However, You may include an additional document -offering the additional rights described in Section 3.5. - - 3.2. Availability of Source Code. - -Any Modification which You create or to which You contribute must be made -available in Source Code form under the terms of this License either on the -same media as an Executable version or via an accepted Electronic Distribution -Mechanism to anyone to whom you made an Executable version available; and -if made available via Electronic Distribution Mechanism, must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of that particular Modification -has been made available to such recipients. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - -You must cause all Covered Code to which You contribute to contain a file -documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification -is derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - - (a) Third Party Claims. - -If Contributor has knowledge that a license under a third party's intellectual -property rights is required to exercise the rights granted by such Contributor -under Sections 2.1 or 2.2, Contributor must include a text file with the Source -Code distribution titled "LEGAL'' which describes the claim and the party -making the claim in sufficient detail that a recipient will know whom to contact. -If Contributor obtains such knowledge after the Modification is made available -as described in Section 3.2, Contributor shall promptly modify the LEGAL file -in all copies Contributor makes available thereafter and shall take other -steps (such as notifying appropriate mailing lists or newsgroups) reasonably -calculated to inform those who received the Covered Code that new knowledge -has been obtained. - - (b) Contributor APIs. - -If Contributor's Modifications include an application programming interface -and Contributor has knowledge of patent licenses which are reasonably necessary -to implement that API, Contributor must also include this information in the -LEGAL file. - - (c) Representations. - -Contributor represents that, except as disclosed pursuant to Section 3.4(a) -above, Contributor believes that Contributor's Modifications are Contributor's -original creation(s) and/or Contributor has sufficient rights to grant the -rights conveyed by this License. - - 3.5. Required Notices. - -You must duplicate the notice in Exhibit A in each file of the Source Code. -If it is not possible to put such notice in a particular Source Code file -due to its structure, then You must include such notice in a location (such -as a relevant directory) where a user would be likely to look for such a notice. -If You created one or more Modification(s) You may add your name as a Contributor -to the notice described in Exhibit A. You must also duplicate this License -in any documentation for the Source Code where You describe recipients' rights -or ownership rights relating to Covered Code. You may choose to offer, and -to charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Covered Code. However, You may do so only on -Your own behalf, and not on behalf of the Initial Developer or any Contributor. -You must make it absolutely clear than any such warranty, support, indemnity -or liability obligation is offered by You alone, and You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of warranty, support, -indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - -You may distribute Covered Code in Executable form only if the requirements -of Section 3.1-3.5 have been met for that Covered Code, and if You include -a notice stating that the Source Code version of the Covered Code is available -under the terms of this License, including a description of how and where -You have fulfilled the obligations of Section 3.2. The notice must be conspicuously -included in any notice in an Executable version, related documentation or -collateral in which You describe recipients' rights relating to the Covered -Code. You may distribute the Executable version of Covered Code or ownership -rights under a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable version does not attempt to limit -or alter the recipient's rights in the Source Code version from the rights -set forth in this License. If You distribute the Executable version under -a different license You must make it absolutely clear that any terms which -differ from this License are offered by You alone, not by the Initial Developer -or any Contributor. You hereby agree to indemnify the Initial Developer and -every Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer. - - 3.7. Larger Works. - -You may create a Larger Work by combining Covered Code with other code not -governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - - 6. Versions of the License. - - 6.1. New Versions. - -Borland Software Corporation (''Interbase'') may publish revised and/or new -versions of the License from time to time. Each version will be given a distinguishing -version number. - - 6.2. Effect of New Versions. - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License published by Interbase. No one other than Interbase has the -right to modify the terms applicable to Covered Code created under this License. - - 6.3. Derivative Works. - -If You create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), You must (a) rename Your license so that the phrases ''Mozilla'', -''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL", "Interbase", "ISC", -"IB'' or any confusingly similar phrase do not appear in your license (except -to note that your license differs from this License) and (b) otherwise make -it clear that Your version of the license contains terms which differ from -the Mozilla Public License and Netscape Public License. (Filling in the name -of the Initial Developer, Original Code or Contributor in the notice described -in Exhibit A shall not of themselves be deemed to be modifications of this -License.) - - 6.4 Origin of the Interbase Public License. - -The Interbase public license is based on the Mozilla Public License V 1.1 -with the following changes: - -The license is published by Borland Software Corporation. Only Borland Software -Corporation can modify the terms applicable to Covered Code. - -The license can be modified used for code which is not already governed by -this license. Modified versions of the license must be renamed to avoid confusion -with Netscape?s or Interbase Software?s license and must include a description -of changes from the Interbase Public License. - - The name of the license in Exhibit A is the "Interbase Public License". - - The reference to an alternative license in Exhibit A has been removed. - - Amendments I, II, III, V, and VI have been deleted. - - Exhibit A, Netscape Public License has been deleted - -A new amendment (II) has been added, describing the required and restricted -rights to use the trademarks of Borland Software Corporation - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR -A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE -DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) -ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - -8.2. If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: - -(a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. - -(b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. - -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial -computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - - 13. MULTIPLE-LICENSED CODE. - -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". -"Multiple-Licensed" means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the NPL or the alternative -licenses, if any, specified by the Initial Developer in the file described -in Exhibit A. - - EXHIBIT A - InterBase Public License. - -"The contents of this file are subject to the Interbase Public License Version -1.0 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://www.Interbase.com/IPL.html - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - - The Original Code was created by InterBase Software Corp and its successors. - -Portions created by Borland/Inprise are Copyright (C) Borland/Inprise. All -Rights Reserved. - - Contributor(s): ______________________________________ . +1.10. ''Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + +1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + +1.11. ''Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + +1.12. "You'' (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + +2.1. The Initial Developer Grant. + +The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + + (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. + +2.2. Contributor Grant. + +Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + +3.1. Application of License. + +The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + +3.2. Availability of Source Code. + +Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + +3.3. Description of Modifications. + +You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + +3.4. Intellectual Property Matters + + (a) Third Party Claims. + + If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. + + If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + + (c) Representations. + + Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + +3.5. Required Notices. + +You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + +3.6. Distribution of Executable Versions. + +You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + +3.7. Larger Works. + +You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. + +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + +6.1. New Versions. + +Borland Software Corporation (''Interbase'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + +6.2. Effect of New Versions. + +Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Interbase. No one other than Interbase has the right to modify the terms applicable to Covered Code created under this License. + +6.3. Derivative Works. + +If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases ''Mozilla'', ''MOZILLAPL'', ''MOZPL'', ''Netscape'', "MPL", ''NPL", "Interbase", "ISC", "IB'' or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +6.4 Origin of the Interbase Public License. + +The Interbase public license is based on the Mozilla Public License V 1.1 with the following changes: + +The license is published by Borland Software Corporation. Only Borland Software Corporation can modify the terms applicable to Covered Code. +The license can be modified used for code which is not already governed by this license. Modified versions of the license must be renamed to avoid confusion with Netscape?s or Interbase Software?s license and must include a description of changes from the Interbase Public License. +The name of the license in Exhibit A is the "Interbase Public License". +The reference to an alternative license in Exhibit A has been removed. +Amendments I, II, III, V, and VI have been deleted. +Exhibit A, Netscape Public License has been deleted +A new amendment (II) has been added, describing the required and restricted rights to use the trademarks of Borland Software Corporation +7. DISCLAIMER OF WARRANTY. + +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + +8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. + +8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + +8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + +The Covered Code is a ''commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer software'' and ''commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + +Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A - InterBase Public License. + +``The contents of this file are subject to the Interbase Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.Interbase.com/IPL.html + +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. + +The Original Code was created by InterBase Software Corp and its successors. + +Portions created by Borland/Inprise are Copyright (C) Borland/Inprise. All Rights Reserved. + +Contributor(s): ______________________________________. AMENDMENTS -I. InterBase and logo. This License does not grant any rights to use the trademarks -"Interbase'', "Java" or "JavaScript" even if such marks are included in the -Original Code or Modifications. +I. InterBase and logo. This License does not grant any rights to use the trademarks "Interbase'', "Java" or "JavaScript" even if such marks are included in the Original Code or Modifications. - II. Trademark Usage. +II. Trademark Usage. -II.1. Advertising Materials. All advertising materials mentioning features -or use of the covered Code must display the following acknowledgement: "This -product includes software developed by Borland Software Corp. " +II.1. Advertising Materials. All advertising materials mentioning features or use of the covered Code must display the following acknowledgement: "This product includes software developed by Borland Software Corp. " -II.2. Endorsements. The names "InterBase," "ISC," and "IB" must not be used -to endorse or promote Contributor Versions or Larger Works without the prior -written permission of Interbase. +II.2. Endorsements. The names "InterBase," "ISC," and "IB" must not be used to endorse or promote Contributor Versions or Larger Works without the prior written permission of Interbase. -II.3. Product Names. Contributor Versions and Larger Works may not be called -"InterBase" or "Interbase" nor may the word "InterBase" appear in their names -without the prior written permission of Interbase. +II.3. Product Names. Contributor Versions and Larger Works may not be called "InterBase" or "Interbase" nor may the word "InterBase" appear in their names without the prior written permission of Interbase. diff --git a/options/license/JPNIC b/options/license/JPNIC index 91b28f240..6cc1d094c 100644 --- a/options/license/JPNIC +++ b/options/license/JPNIC @@ -1,38 +1,40 @@ -Japan Network Information Center License Copyright (c) 2000-2002 Japan Network -Information Center. All rights reserved. +Copyright (c) 2000-2002 Japan Network Information Center. All rights reserved. -By using this file, you agree to the terms and conditions set forth bellow . +By using this file, you agree to the terms and conditions set forth bellow. -LICENSE TERMS AND CONDITIONS + LICENSE TERMS AND CONDITIONS -The following License Terms and Conditions apply, unless a different license -is obtained from Japan Network Information Center (" JPNIC "), a Japanese -association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, Chiyoda-ku, -Tokyo 101-0047, Japan . +The following License Terms and Conditions apply, unless a different +license is obtained from Japan Network Information Center ("JPNIC"), +a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda, +Chiyoda-ku, Tokyo 101-0047, Japan. -1. Use, Modification and Redistribution (including distribution of any modified -or derived work) in source and/or binary forms is permitted under this License -Terms and Conditions. +1. Use, Modification and Redistribution (including distribution of any + modified or derived work) in source and/or binary forms is permitted + under this License Terms and Conditions. 2. Redistribution of source code must retain the copyright notices as they -appear in each source code file, this License Terms and Conditions. + appear in each source code file, this License Terms and Conditions. -3. Redistribution in binary form must reproduce the Copyright Notice, this -License Terms and Conditions, in the documentation and/or other materials -provided with the distribution. For the purposes of binary distribution the -"Copyright Notice" refers to the following language: "Copyright (c) 2000-2002 -Japan Network Information Center . All rights reserved." +3. Redistribution in binary form must reproduce the Copyright Notice, + this License Terms and Conditions, in the documentation and/or other + materials provided with the distribution. For the purposes of binary + distribution the "Copyright Notice" refers to the following language: + "Copyright (c) 2000-2002 Japan Network Information Center. All rights + reserved." -4. The name of JPNIC may not be used to endorse or promote products derived -from this Software without specific prior written approval of JPNIC . +4. The name of JPNIC may not be used to endorse or promote products + derived from this Software without specific prior written approval of + JPNIC. 5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A + PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JPNIC BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/JSON b/options/license/JSON index 05a38f55c..e29500b0e 100644 --- a/options/license/JSON +++ b/options/license/JSON @@ -1,20 +1,11 @@ -JSON License Copyright (c) 2002 JSON.org +JSON License -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Copyright (c) 2002 JSON.org -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. The Software shall be used for Good, not Evil. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/JasPer-2.0 b/options/license/JasPer-2.0 index f66b35340..93d11287d 100644 --- a/options/license/JasPer-2.0 +++ b/options/license/JasPer-2.0 @@ -1,45 +1,17 @@ -JasPer License Version 2.0 Copyright (c) 2001-2006 Michael David Adams +JasPer License Version 2.0 +Copyright (c) 2001-2006 Michael David Adams Copyright (c) 1999-2000 Image Power, Inc. - Copyright (c) 1999-2000 The University of British Columbia All rights reserved. -Permission is hereby granted, free of charge, to any person (the "User") obtaining -a copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to -do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person (the "User") obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -1. The above copyright notices and this permission notice (which includes -the disclaimer below) shall be included in all copies or substantial portions -of the Software. +1. The above copyright notices and this permission notice (which includes the disclaimer below) shall be included in all copies or substantial portions of the Software. -2. The name of a copyright holder shall not be used to endorse or promote -products derived from the Software without specific prior written permission. +2. The name of a copyright holder shall not be used to endorse or promote products derived from the Software without specific prior written permission. -THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. -NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS "AS IS", WITHOUT WARRANTY -OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF -THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE PROVIDED BY -THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER -INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT HOLDER DISCLAIMS -ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY OTHER ENTITY BASED ON -INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION -TO EXERCISING THE RIGHTS GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE -RESPONSIBILITY TO SECURE ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF -ANY. THE SOFTWARE IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL -SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT -NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE -SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE -OR SYSTEM COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL -OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY -DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. +THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS +"AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO +EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. diff --git a/options/license/LAL-1.2 b/options/license/LAL-1.2 index a5d377227..b8907ab6f 100644 --- a/options/license/LAL-1.2 +++ b/options/license/LAL-1.2 @@ -1,168 +1,67 @@ Licence Art Libre - [ Copyleft Attitude ] Version 1.2 Préambule : -Avec cette Licence Art Libre, l'autorisation est donnée de copier, de diffuser -et de transformer librement les oeuvres dans le respect des droits de l'auteur. +Avec cette Licence Art Libre, l’autorisation est donnée de copier, de diffuser et de transformer librement les oeuvres dans le respect des droits de l’auteur. -Loin d'ignorer les droits de l'auteur, cette licence les reconnaît et les -protège. Elle en reformule le principe en permettant au public de faire un -usage créatif des oeuvres d'art. +Loin d’ignorer les droits de l’auteur, cette licence les reconnaît et les protège. Elle en reformule le principe en permettant au public de faire un usage créatif des oeuvres d’art. +Alors que l’usage fait du droit de la propriété littéraire et artistique conduit à restreindre l’accès du public à l’oeuvre, la Licence Art Libre a pour but de le favoriser. +L’intention est d’ouvrir l’accès et d’autoriser l’utilisation des ressources d’une oeuvre par le plus grand nombre. En avoir jouissance pour en multiplier les réjouissances, créer de nouvelles conditions de création pour amplifier les possibilités de création. Dans le respect des auteurs avec la reconnaissance et la défense de leur droit moral. -Alors que l'usage fait du droit de la propriété littéraire et artistique conduit -à restreindre l'accès du public à l'oeuvre, la Licence Art Libre a pour but -de le favoriser. - -L'intention est d'ouvrir l'accès et d'autoriser l'utilisation des ressources -d'une oeuvre par le plus grand nombre. En avoir jouissance pour en multiplier -les réjouissances, créer de nouvelles conditions de création pour amplifier -les possibilités de création. Dans le respect des auteurs avec la reconnaissance -et la défense de leur droit moral. - -En effet, avec la venue du numérique, l'invention de l'internet et des logiciels -libres, un nouveau mode de création et de production est apparu. Il est aussi -l'amplification de ce qui a été expérimenté par nombre d'artistes contemporains. - -Le savoir et la création sont des ressources qui doivent demeurer libres pour -être encore véritablement du savoir et de la création. C'est à dire rester -une recherche fondamentale qui ne soit pas directement liée à une application -concrète. Créer c'est découvrir l'inconnu, c'est inventer le réel avant tout -souci de réalisme. - -Ainsi, l'objet de l'art n'est pas confondu avec l'objet d'art fini et défini -comme tel. - -C'est la raison essentielle de cette Licence Art Libre : promouvoir et protéger -des pratiques artistiques libérées des seules règles de l'économie de marché. +En effet, avec la venue du numérique, l’invention de l’internet et des logiciels libres, un nouveau mode de création et de production est apparu. Il est aussi l’amplification de ce qui a été expérimenté par nombre d’artistes contemporains. +Le savoir et la création sont des ressources qui doivent demeurer libres pour être encore véritablement du savoir et de la création. C’est à dire rester une recherche fondamentale qui ne soit pas directement liée à une application concrète. Créer c’est découvrir l’inconnu, c’est inventer le réel avant tout souci de réalisme. +Ainsi, l’objet de l’art n’est pas confondu avec l’objet d’art fini et défini comme tel. C’est la raison essentielle de cette Licence Art Libre : promouvoir et protéger des pratiques artistiques libérées des seules règles de l’économie de marché. DÉFINITIONS -– L'oeuvre : +– L’oeuvre :il s’agit d’une oeuvre commune qui comprend l’oeuvre originelle ainsi que toutes les contributions postérieures (les originaux conséquents et les copies). Elle est créée à l’initiative de l’auteur originel qui par cette licence définit les conditions selon lesquelles les contributions sont faites. -il s'agit d'une oeuvre commune qui comprend l'oeuvre originelle ainsi que -toutes les contributions postérieures (les originaux conséquents et les copies). -Elle est créée à l'initiative de l'auteur originel qui par cette licence définit -les conditions selon lesquelles les contributions sont faites. +– L’oeuvre originelle :c’est-à-dire l’oeuvre créée par l’initiateur de l’oeuvre commune dont les copies vont être modifiées par qui le souhaite. -– L'oeuvre originelle : +– Les oeuvres conséquentes :c’est-à-dire les propositions des auteurs qui contribuent à la formation de l’oeuvre en faisant usage des droits de reproduction, de diffusion et de modification que leur confère la licence. -c'est-à-dire l'oeuvre créée par l'initiateur de l'oeuvre commune dont les -copies vont être modifiées par qui le souhaite. +– Original (source ou ressource de l’oeuvre) :exemplaire daté de l’oeuvre, de sa définition, de sa partition ou de son programme que l’auteur présente comme référence pour toutes actualisations, interprétations, copies ou reproductions ultérieures. -– Les oeuvres conséquentes : +– Copie :toute reproduction d’un original au sens de cette licence. -c'est-à-dire les propositions des auteurs qui contribuent à la formation de -l'oeuvre en faisant usage des droits de reproduction, de diffusion et de modification -que leur confère la licence. +– Auteur de l’oeuvre originelle :c’est la personne qui a créé l’oeuvre à l’origine d’une arborescence de cette oeuvre modifiée. Par cette licence, l’auteur détermine les conditions dans lesquelles ce travail se fait. -– Original (source ou ressource de l'oeuvre) : +– Contributeur :toute personne qui contribue à la création de l’oeuvre. Il est l’auteur d’une oeuvre originale résultant de la modification d’une copie de l’oeuvre originelle ou de la modification d’une copie d’une oeuvre conséquente. -exemplaire daté de l'oeuvre, de sa définition, de sa partition ou de son programme -que l'auteur présente comme référence pour toutes actualisations, interprétations, -copies ou reproductions ultérieures. +1. OBJET +Cette licence a pour objet de définir les conditions selon lesquelles vous pouvez jouir librement de cette oeuvre. -– Copie : +2. L’ÉTENDUE DE LA JOUISSANCE +Cette oeuvre est soumise au droit d’auteur, et l’auteur par cette licence vous indique quelles sont vos libertés pour la copier, la diffuser et la modifier: -toute reproduction d'un original au sens de cette licence. +2.1 LA LIBERTÉ DE COPIER (OU DE REPRODUCTION) +Vous avez la liberté de copier cette oeuvre pour un usage personnel, pour vos amis, ou toute autre personne et quelque soit la technique employée. -– Auteur de l'oeuvre originelle : +2.2 LA LIBERTÉ DE DIFFUSER, D’INTERPRÉTER (OU DE REPRÉSENTATION) +Vous pouvez diffuser librement les copies de ces oeuvres, modifiées ou non, quel que soit le support, quel que soit le lieu, à titre onéreux ou gratuit si vous respectez toutes les conditions suivantes: + – joindre aux copies, cette licence à l’identique, ou indiquer précisément où se trouve la licence, – indiquer au destinataire le nom de l’auteur des originaux, – indiquer au destinataire où il pourra avoir accès aux originaux (originels et/ou conséquents). L’auteur de l’original pourra, s’il le souhaite, vous autoriser à diffuser l’original dans les mêmes conditions que les copies. -c'est la personne qui a créé l'oeuvre à l'origine d'une arborescence de cette -oeuvre modifiée. Par cette licence, l'auteur détermine les conditions dans -lesquelles ce travail se fait. +2.3 LA LIBERTÉ DE MODIFIER +Vous avez la liberté de modifier les copies des originaux (originels et conséquents), qui peuvent être partielles ou non, dans le respect des conditions prévues à l’article 2.2 en cas de diffusion (ou représentation) de la copie modifiée. L’auteur de l’original pourra, s’il le souhaite, vous autoriser à modifier l’original dans les mêmes conditions que les copies. -– Contributeur : +3. L’INCORPORATION DE L’OEUVRE +Tous les éléments de cette oeuvre doivent demeurer libres, c’est pourquoi il ne vous est pas permis d’intégrer les originaux (originels et conséquents) dans une autre oeuvre qui ne serait pas soumise à cette licence. -toute personne qui contribue à la création de l'oeuvre. Il est l'auteur d'une -oeuvre originale résultant de la modification d'une copie de l'oeuvre originelle -ou de la modification d'une copie d'une oeuvre conséquente. +4. VOS DROITS D’AUTEUR +Cette licence n’a pas pour objet de nier vos droits d’auteur sur votre contribution. En choisissant de contribuer à l’évolution de cette oeuvre, vous acceptez seulement d’offrir aux autres les mêmes droits sur votre contribution que ceux qui vous ont été accordés par cette licence. - 1. OBJET +5. LA DURÉE DE LA LICENCE +Cette licence prend effet dès votre acceptation de ses dispositions. Le fait de copier, de diffuser, ou de modifier l’oeuvre constitue une acception tacite. Cette licence a pour durée la durée des droits d’auteur attachés à l’oeuvre. Si vous ne respectez pas les termes de cette licence, vous perdez automatiquement les droits qu’elle vous confère. Si le régime juridique auquel vous êtes soumis ne vous permet pas de respecter les termes de cette licence, vous ne pouvez pas vous prévaloir des libertés qu’elle confère. -Cette licence a pour objet de définir les conditions selon lesquelles vous -pouvez jouir librement de cette oeuvre. +6. LES DIFFÉRENTES VERSIONS DE LA LICENCE +Cette licence pourra être modifiée régulièrement, en vue de son amélioration, par ses auteurs (les acteurs du mouvement « copyleft attitude ») sous la forme de nouvelles versions numérotées. +Vous avez toujours le choix entre vous contenter des dispositions contenues dans la version sous laquelle la copie vous a été communiquée ou alors, vous prévaloir des dispositions d’une des versions ultérieures. - 2. L'ÉTENDUE DE LA JOUISSANCE - -Cette oeuvre est soumise au droit d'auteur, et l'auteur par cette licence -vous indique quelles sont vos libertés pour la copier, la diffuser et la modifier: - - 2.1 LA LIBERTÉ DE COPIER (OU DE REPRODUCTION) - -Vous avez la liberté de copier cette oeuvre pour un usage personnel, pour -vos amis, ou toute autre personne et quelque soit la technique employée. - - 2.2 LA LIBERTÉ DE DIFFUSER, D'INTERPRÉTER (OU DE REPRÉSENTATION) - -Vous pouvez diffuser librement les copies de ces oeuvres, modifiées ou non, -quel que soit le support, quel que soit le lieu, à titre onéreux ou gratuit -si vous respectez toutes les conditions suivantes: - -– joindre aux copies, cette licence à l'identique, ou indiquer précisément -où se trouve la licence, - - – indiquer au destinataire le nom de l'auteur des originaux, - - – indiquer au destinataire où il pourra avoir accès aux originaux - -(originels et/ou conséquents). L'auteur de l'original pourra, s'il le souhaite, -vous autoriser à diffuser l'original dans les mêmes conditions que les copies. - - 2.3 LA LIBERTÉ DE MODIFIER - -Vous avez la liberté de modifier les copies des originaux (originels et conséquents), -qui peuvent être partielles ou non, dans le respect des conditions prévues -à l'article 2.2 en cas de diffusion (ou représentation) de la copie modifiée. -L'auteur de l'original pourra, s'il le souhaite, vous autoriser à modifier -l'original dans les mêmes conditions que les copies. - - 3. L'INCORPORATION DE L'OEUVRE - -Tous les éléments de cette oeuvre doivent demeurer libres, c'est pourquoi -il ne vous est pas permis d'intégrer les originaux (originels et conséquents) -dans une autre oeuvre qui ne serait pas soumise à cette licence. - - 4. VOS DROITS D'AUTEUR - -Cette licence n'a pas pour objet de nier vos droits d'auteur sur votre contribution. -En choisissant de contribuer à l'évolution de cette oeuvre, vous acceptez -seulement d'offrir aux autres les mêmes droits sur votre contribution que -ceux qui vous ont été accordés par cette licence. - - 5. LA DURÉE DE LA LICENCE - -Cette licence prend effet dès votre acceptation de ses dispositions. Le fait -de copier, de diffuser, ou de modifier l'oeuvre constitue une acception tacite. - - Cette licence a pour durée la durée des droits d'auteur attachés à l'oeuvre. - -Si vous ne respectez pas les termes de cette licence, vous perdez automatiquement -les droits qu'elle vous confère. - -Si le régime juridique auquel vous êtes soumis ne vous permet pas de respecter -les termes de cette licence, vous ne pouvez pas vous prévaloir des libertés -qu'elle confère. - - 6. LES DIFFÉRENTES VERSIONS DE LA LICENCE - -Cette licence pourra être modifiée régulièrement, en vue de son amélioration, -par ses auteurs (les acteurs du mouvement « copyleft attitude ») sous la forme -de nouvelles versions numérotées. - -Vous avez toujours le choix entre vous contenter des dispositions contenues -dans la version sous laquelle la copie vous a été communiquée ou alors, vous -prévaloir des dispositions d'une des versions ultérieures. - - 7. LES SOUS-LICENCES - -Les sous licences ne sont pas autorisées par la présente. Toute personne qui -souhaite bénéficier des libertés qu'elle confère sera liée directement à l'auteur -de l'oeuvre originelle. - - 8. LA LOI APPLICABLE AU CONTRAT +7. LES SOUS-LICENCES +Les sous licences ne sont pas autorisées par la présente. Toute personne qui souhaite bénéficier des libertés qu’elle confère sera liée directement à l’auteur de l’oeuvre originelle. +8. LA LOI APPLICABLE AU CONTRAT Cette licence est soumise au droit français. diff --git a/options/license/LAL-1.3 b/options/license/LAL-1.3 index 4dcefed47..ca1a44734 100644 --- a/options/license/LAL-1.3 +++ b/options/license/LAL-1.3 @@ -1,183 +1,88 @@ Licence Art Libre 1.3 (LAL 1.3) -Préambule : +Préambule : -Avec la Licence Art Libre, l'autorisation est donnée de copier, de diffuser -et de transformer librement les œuvres dans le respect des droits de l'auteur. +Avec la Licence Art Libre, l’autorisation est donnée de copier, de diffuser et de transformer librement les œuvres dans le respect des droits de l’auteur. -Loin d'ignorer ces droits, la Licence Art Libre les reconnaît et les protège. -Elle en reformule l'exercice en permettant à tout un chacun de faire un usage -créatif des productions de l'esprit quels que soient leur genre et leur forme -d'expression. +Loin d’ignorer ces droits, la Licence Art Libre les reconnaît et les protège. Elle en reformule l’exercice en permettant à tout un chacun de faire un usage créatif des productions de l’esprit quels que soient leur genre et leur forme d’expression. -Si, en règle générale, l'application du droit d'auteur conduit à restreindre -l'accès aux œuvres de l'esprit, la Licence Art Libre, au contraire, le favorise. -L'intention est d'autoriser l'utilisation des ressources d'une œuvre ; créer -de nouvelles conditions de création pour amplifier les possibilités de création. -La Licence Art Libre permet d'avoir jouissance des œuvres tout en reconnaissant -les droits et les responsabilités de chacun. +Si, en règle générale, l’application du droit d’auteur conduit à restreindre l’accès aux œuvres de l’esprit, la Licence Art Libre, au contraire, le favorise. L’intention est d’autoriser l’utilisation des ressources d’une œuvre ; créer de nouvelles conditions de création pour amplifier les possibilités de création. La Licence Art Libre permet d’avoir jouissance des œuvres tout en reconnaissant les droits et les responsabilités de chacun. -Avec le développement du numérique, l'invention d'internet et des logiciels -libres, les modalités de création ont évolué : les productions de l'esprit -s'offrent naturellement à la circulation, à l'échange et aux transformations. -Elles se prêtent favorablement à la réalisation d'œuvres communes que chacun -peut augmenter pour l'avantage de tous. +Avec le développement du numérique, l’invention d’internet et des logiciels libres, les modalités de création ont évolué : les productions de l’esprit s’offrent naturellement à la circulation, à l’échange et aux transformations. Elles se prêtent favorablement à la réalisation d’œuvres communes que chacun peut augmenter pour l’avantage de tous. -C'est la raison essentielle de la Licence Art Libre : promouvoir et protéger -ces productions de l'esprit selon les principes du copyleft : liberté d'usage, -de copie, de diffusion, de transformation et interdiction d'appropriation -exclusive. +C’est la raison essentielle de la Licence Art Libre : promouvoir et protéger ces productions de l’esprit selon les principes du copyleft : liberté d’usage, de copie, de diffusion, de transformation et interdiction d’appropriation exclusive. -Définitions : +Définitions : -Nous désignons par « œuvre », autant l'œuvre initiale, les œuvres conséquentes, -que l'œuvre commune telles que définies ci-après : +Nous désignons par « œuvre », autant l’œuvre initiale, les œuvres conséquentes, que l’œuvre commune telles que définies ci-après : -L'œuvre commune : Il s'agit d'une œuvre qui comprend l'œuvre initiale ainsi -que toutes les contributions postérieures (les originaux conséquents et les -copies). Elle est créée à l'initiative de l'auteur initial qui par cette licence -définit les conditions selon lesquelles les contributions sont faites. +L’œuvre commune :Il s’agit d’une œuvre qui comprend l’œuvre initiale ainsi que toutes les contributions postérieures (les originaux conséquents et les copies). Elle est créée à l’initiative de l’auteur initial qui par cette licence définit les conditions selon lesquelles les contributions sont faites. -L'œuvre initiale : C'est-à-dire l'œuvre créée par l'initiateur de l'œuvre -commune dont les copies vont être modifiées par qui le souhaite. +L’œuvre initiale :C’est-à-dire l’œuvre créée par l’initiateur de l’œuvre commune dont les copies vont être modifiées par qui le souhaite. -Les œuvres conséquentes : C'est-à-dire les contributions des auteurs qui participent -à la formation de l'œuvre commune en faisant usage des droits de reproduction, -de diffusion et de modification que leur confère la licence. +Les œuvres conséquentes :C’est-à-dire les contributions des auteurs qui participent à la formation de l’œuvre commune en faisant usage des droits de reproduction, de diffusion et de modification que leur confère la licence. -Originaux (sources ou ressources de l'œuvre) : Chaque exemplaire daté de l'œuvre -initiale ou conséquente que leurs auteurs présentent comme référence pour -toutes actualisations, interprétations, copies ou reproductions ultérieures. +Originaux (sources ou ressources de l’œuvre) :Chaque exemplaire daté de l’œuvre initiale ou conséquente que leurs auteurs présentent comme référence pour toutes actualisations, interprétations, copies ou reproductions ultérieures. -Copie : Toute reproduction d'un original au sens de cette licence. +Copie :Toute reproduction d’un original au sens de cette licence. - 1- OBJET. +1- OBJET. +Cette licence a pour objet de définir les conditions selon lesquelles vous pouvez jouir librement de l’œuvre. -Cette licence a pour objet de définir les conditions selon lesquelles vous -pouvez jouir librement de l'œuvre. +2. L’ÉTENDUE DE LA JOUISSANCE. +Cette œuvre est soumise au droit d’auteur, et l’auteur par cette licence vous indique quelles sont vos libertés pour la copier, la diffuser et la modifier. - 2. L'ÉTENDUE DE LA JOUISSANCE. +2.1 LA LIBERTÉ DE COPIER (OU DE REPRODUCTION). +Vous avez la liberté de copier cette œuvre pour vous, vos amis ou toute autre personne, quelle que soit la technique employée. -Cette œuvre est soumise au droit d'auteur, et l'auteur par cette licence vous -indique quelles sont vos libertés pour la copier, la diffuser et la modifier. +2.2 LA LIBERTÉ DE DIFFUSER (INTERPRÉTER, REPRÉSENTER, DISTRIBUER). +Vous pouvez diffuser librement les copies de ces œuvres, modifiées ou non, quel que soit le support, quel que soit le lieu, à titre onéreux ou gratuit, si vous respectez toutes les conditions suivantes : - 2.1 LA LIBERTÉ DE COPIER (OU DE REPRODUCTION). + 1. joindre aux copies cette licence à l’identique ou indiquer précisément où se trouve la licence ; + 2. indiquer au destinataire le nom de chaque auteur des originaux, y compris le vôtre si vous avez modifié l’œuvre ; + 3. indiquer au destinataire où il pourrait avoir accès aux originaux (initiaux et/ou conséquents). -Vous avez la liberté de copier cette œuvre pour vous, vos amis ou toute autre -personne, quelle que soit la technique employée. +Les auteurs des originaux pourront, s’ils le souhaitent, vous autoriser à diffuser l’original dans les mêmes conditions que les copies. - 2.2 LA LIBERTÉ DE DIFFUSER (INTERPRÉTER, REPRÉSENTER, DISTRIBUER). +2.3 LA LIBERTÉ DE MODIFIER. +Vous avez la liberté de modifier les copies des originaux (initiaux et conséquents) dans le respect des conditions suivantes : -Vous pouvez diffuser librement les copies de ces œuvres, modifiées ou non, -quel que soit le support, quel que soit le lieu, à titre onéreux ou gratuit, -si vous respectez toutes les conditions suivantes : + 1. celles prévues à l’article 2.2 en cas de diffusion de la copie modifiée ; + 2. indiquer qu’il s’agit d’une œuvre modifiée et, si possible, la nature de la modification ; + 3. diffuser cette œuvre conséquente avec la même licence ou avec toute licence compatible ; + 4. Les auteurs des originaux pourront, s’ils le souhaitent, vous autoriser à modifier l’original dans les mêmes conditions que les copies. -1. joindre aux copies cette licence à l'identique ou indiquer précisément -où se trouve la licence ; +3. DROITS CONNEXES. +Les actes donnant lieu à des droits d’auteur ou des droits voisins ne doivent pas constituer un obstacle aux libertés conférées par cette licence. C’est pourquoi, par exemple, les interprétations doivent être soumises à la même licence ou une licence compatible. De même, l’intégration de l’œuvre à une base de données, une compilation ou une anthologie ne doit pas faire obstacle à la jouissance de l’œuvre telle que définie par cette licence. -2. indiquer au destinataire le nom de chaque auteur des originaux, y compris -le vôtre si vous avez modifié l'œuvre ; +4. L’ INTÉGRATION DE L’ŒUVRE. +Toute intégration de cette œuvre à un ensemble non soumis à la LAL doit assurer l’exercice des libertés conférées par cette licence. +Si l’œuvre n’est plus accessible indépendamment de l’ensemble, alors l’intégration n’est possible qu’à condition que l’ensemble soit soumis à la LAL ou une licence compatible. -3. indiquer au destinataire où il pourrait avoir accès aux originaux (initiaux -et/ou conséquents). Les auteurs des originaux pourront, s'ils le souhaitent, -vous autoriser à diffuser l'original dans les mêmes conditions que les copies. +5. CRITÈRES DE COMPATIBILITÉ. +Une licence est compatible avec la LAL si et seulement si : - 2.3 LA LIBERTÉ DE MODIFIER. + 1. elle accorde l’autorisation de copier, diffuser et modifier des copies de l’œuvre, y compris à des fins lucratives, et sans autres restrictions que celles qu’impose le respect des autres critères de compatibilité ; + 2. elle garantit la paternité de l’œuvre et l’accès aux versions antérieures de l’œuvre quand cet accès est possible ; + 3. elle reconnaît la LAL également compatible (réciprocité) ; + 4. elle impose que les modifications faites sur l’œuvre soient soumises à la même licence ou encore à une licence répondant aux critères de compatibilité posés par la LAL. -Vous avez la liberté de modifier les copies des originaux (initiaux et conséquents) -dans le respect des conditions suivantes : +6. VOS DROITS INTELLECTUELS. +La LAL n’a pas pour objet de nier vos droits d’auteur sur votre contribution ni vos droits connexes. En choisissant de contribuer à l’évolution de cette œuvre commune, vous acceptez seulement d’offrir aux autres les mêmes autorisations sur votre contribution que celles qui vous ont été accordées par cette licence. Ces autorisations n’entraînent pas un dessaisissement de vos droits intellectuels. -1. celles prévues à l'article 2.2 en cas de diffusion de la copie modifiée ; +7. VOS RESPONSABILITÉS. +La liberté de jouir de l’œuvre tel que permis par la LAL (liberté de copier, diffuser, modifier) implique pour chacun la responsabilité de ses propres faits. -2. indiquer qu'il s'agit d'une œuvre modifiée et, si possible, la nature de -la modification ; +8. LA DURÉE DE LA LICENCE. +Cette licence prend effet dès votre acceptation de ses dispositions. Le fait de copier, de diffuser, ou de modifier l’œuvre constitue une acceptation tacite. +Cette licence a pour durée la durée des droits d’auteur attachés à l’œuvre. Si vous ne respectez pas les termes de cette licence, vous perdez automatiquement les droits qu’elle vous confère. Si le régime juridique auquel vous êtes soumis ne vous permet pas de respecter les termes de cette licence, vous ne pouvez pas vous prévaloir des libertés qu’elle confère. -3. diffuser cette œuvre conséquente avec la même licence ou avec toute licence -compatible ; +9. LES DIFFÉRENTES VERSIONS DE LA LICENCE. +Cette licence pourra être modifiée régulièrement, en vue de son amélioration, par ses auteurs (les acteurs du mouvement Copyleft Attitude) sous la forme de nouvelles versions numérotées. +Vous avez toujours le choix entre vous contenter des dispositions contenues dans la version de la LAL sous laquelle la copie vous a été communiquée ou alors, vous prévaloir des dispositions d’une des versions ultérieures. -4. Les auteurs des originaux pourront, s'ils le souhaitent, vous autoriser -à modifier l'original dans les mêmes conditions que les copies. +10. LES SOUS-LICENCES. +Les sous-licences ne sont pas autorisées par la présente. Toute personne qui souhaite bénéficier des libertés qu’elle confère sera liée directement aux auteurs de l’œuvre commune. - 3. DROITS CONNEXES. - -Les actes donnant lieu à des droits d'auteur ou des droits voisins ne doivent -pas constituer un obstacle aux libertés conférées par cette licence. - -C'est pourquoi, par exemple, les interprétations doivent être soumises à la -même licence ou une licence compatible. De même, l'intégration de l'œuvre -à une base de données, une compilation ou une anthologie ne doit pas faire -obstacle à la jouissance de l'œuvre telle que définie par cette licence. - - 4. L' INTÉGRATION DE L'ŒUVRE. - -Toute intégration de cette œuvre à un ensemble non soumis à la LAL doit assurer -l'exercice des libertés conférées par cette licence. - -Si l'œuvre n'est plus accessible indépendamment de l'ensemble, alors l'intégration -n'est possible qu'à condition que l'ensemble soit soumis à la LAL ou une licence -compatible. - - 5. CRITÈRES DE COMPATIBILITÉ. - - Une licence est compatible avec la LAL si et seulement si : - -1. elle accorde l'autorisation de copier, diffuser et modifier des copies -de l'œuvre, y compris à des fins lucratives, et sans autres restrictions que -celles qu'impose le respect des autres critères de compatibilité ; - -2. elle garantit la paternité de l'œuvre et l'accès aux versions antérieures -de l'œuvre quand cet accès est possible ; - - 3. elle reconnaît la LAL également compatible (réciprocité) ; - -4. elle impose que les modifications faites sur l'œuvre soient soumises à -la même licence ou encore à une licence répondant aux critères de compatibilité -posés par la LAL. - - 6. VOS DROITS INTELLECTUELS. - -La LAL n'a pas pour objet de nier vos droits d'auteur sur votre contribution -ni vos droits connexes. En choisissant de contribuer à l'évolution de cette -œuvre commune, vous acceptez seulement d'offrir aux autres les mêmes autorisations -sur votre contribution que celles qui vous ont été accordées par cette licence. -Ces autorisations n'entraînent pas un dessaisissement de vos droits intellectuels. - - 7. VOS RESPONSABILITÉS. - -La liberté de jouir de l'œuvre tel que permis par la LAL (liberté de copier, -diffuser, modifier) implique pour chacun la responsabilité de ses propres -faits. - - 8. LA DURÉE DE LA LICENCE. - -Cette licence prend effet dès votre acceptation de ses dispositions. Le fait -de copier, de diffuser, ou de modifier l'œuvre constitue une acceptation tacite. - -Cette licence a pour durée la durée des droits d'auteur attachés à l'œuvre. -Si vous ne respectez pas les termes de cette licence, vous perdez automatiquement -les droits qu'elle vous confère. - -Si le régime juridique auquel vous êtes soumis ne vous permet pas de respecter -les termes de cette licence, vous ne pouvez pas vous prévaloir des libertés -qu'elle confère. - - 9. LES DIFFÉRENTES VERSIONS DE LA LICENCE. - -Cette licence pourra être modifiée régulièrement, en vue de son amélioration, -par ses auteurs (les acteurs du mouvement Copyleft Attitude) sous la forme -de nouvelles versions numérotées. - -Vous avez toujours le choix entre vous contenter des dispositions contenues -dans la version de la LAL sous laquelle la copie vous a été communiquée ou -alors, vous prévaloir des dispositions d'une des versions ultérieures. - - 10. LES SOUS-LICENCES. - -Les sous-licences ne sont pas autorisées par la présente. Toute personne qui -souhaite bénéficier des libertés qu'elle confère sera liée directement aux -auteurs de l'œuvre commune. - - 11. LE CONTEXTE JURIDIQUE. - -Cette licence est rédigée en référence au droit français et à la Convention -de Berne relative au droit d'auteur. +11. LE CONTEXTE JURIDIQUE. +Cette licence est rédigée en référence au droit français et à la Convention de Berne relative au droit d’auteur. diff --git a/options/license/LGPL-2.0-only b/options/license/LGPL-2.0-only index 5c96471aa..eb3a4cd1d 100644 --- a/options/license/LGPL-2.0-only +++ b/options/license/LGPL-2.0-only @@ -1,446 +1,174 @@ GNU LIBRARY GENERAL PUBLIC LICENSE -Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. +Version 2, June 1991 -51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +Copyright (C) 1991 Free Software Foundation, Inc. +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the library GPL. It is numbered 2 because -it goes with version 2 of the ordinary GPL.] +[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public Licenses are intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. -This license, the Library General Public License, applies to some specially -designated Free Software Foundation software, and to any other libraries whose -authors decide to use it. You can use it for your libraries, too. +This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the library, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. -For example, if you distribute copies of the library, whether gratis or for -a fee, you must give the recipients all the rights that we gave you. You must -make sure that they, too, receive or can get the source code. If you link -a program with the library, you must provide complete object files to the -recipients so that they can relink them with the library, after making changes -to the library and recompiling it. And you must show them these terms so they -know their rights. +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. -Our method of protecting your rights has two steps: (1) copyright the library, -and (2) offer you this license which gives you legal permission to copy, distribute -and/or modify the library. +Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. -Also, for each distributor's protection, we want to make certain that everyone -understands that there is no warranty for this free library. If the library -is modified by someone else and passed on, we want its recipients to know -that what they have is not the original version, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that companies distributing free software will individually -obtain patent licenses, thus in effect transforming the program into proprietary -software. To prevent this, we have made it clear that any patent must be licensed -for everyone's free use or not licensed at all. +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -Most GNU software, including some libraries, is covered by the ordinary GNU -General Public License, which was designed for utility programs. This license, -the GNU Library General Public License, applies to certain designated libraries. -This license is quite different from the ordinary one; be sure to read it -in full, and don't assume that anything in it is the same as in the ordinary -license. +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. -The reason we have a separate public license for some libraries is that they -blur the distinction we usually make between modifying or adding to a program -and simply using it. Linking a program with a library, without changing the -library, is in some sense simply using the library, and is analogous to running -a utility program or application program. However, in a textual and legal -sense, the linked executable is a combined work, a derivative of the original -library, and the ordinary General Public License treats it as such. +The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. -Because of this blurred distinction, using the ordinary General Public License -for libraries did not effectively promote software sharing, because most developers -did not use the libraries. We concluded that weaker conditions might promote -sharing better. +Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. -However, unrestricted linking of non-free programs would deprive the users -of those programs of all benefit from the free status of the libraries themselves. -This Library General Public License is intended to permit developers of non-free -programs to use free libraries, while preserving your freedom as a user of -such programs to change the free libraries that are incorporated in them. -(We have not seen how to achieve this as regards changes in header files, -but we have achieved it as regards changes in the actual functions of the -Library.) The hope is that this will lead to faster development of free libraries. +However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. -The precise terms and conditions for copying, distribution and modification -follow. Pay close attention to the difference between a "work based on the -library" and a "work that uses the library". The former contains code derived -from the library, while the latter only works together with the library. +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. -Note that it is possible for a library to be covered by the ordinary General -Public License rather than by this special one. +Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any software library which contains a -notice placed by the copyright holder or other authorized party saying it -may be distributed under the terms of this Library General Public License -(also called "this License"). Each licensee is addressed as "you". +0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". -A "library" means a collection of software functions and/or data prepared -so as to be conveniently linked with application programs (which use some -of those functions and data) to form executables. +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. -The "Library", below, refers to any such software library or work which has -been distributed under these terms. A "work based on the Library" means either -the Library or any derivative work under copyright law: that is to say, a -work containing the Library or a portion of it, either verbatim or with modifications -and/or translated straightforwardly into another language. (Hereinafter, translation -is included without limitation in the term "modification".) +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) -"Source code" for a work means the preferred form of the work for making modifications -to it. For a library, complete source code means all the source code for all -modules it contains, plus any associated interface definition files, plus -the scripts used to control compilation and installation of the library. +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running a program -using the Library is not restricted, and output from such a program is covered -only if its contents constitute a work based on the Library (independent of -the use of the Library in a tool for writing it). Whether that is true depends -on what the Library does and what the program that uses the Library does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. -1. You may copy and distribute verbatim copies of the Library's complete source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and disclaimer -of warranty; keep intact all the notices that refer to this License and to -the absence of any warranty; and distribute a copy of this License along with -the Library. +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Library or any portion of it, -thus forming a work based on the Library, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) The modified work must itself be a software library. + a) The modified work must itself be a software library. -b) You must cause the files modified to carry prominent notices stating that -you changed the files and the date of any change. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all -third parties under the terms of this License. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -d) If a facility in the modified Library refers to a function or a table of -data to be supplied by an application program that uses the facility, other -than as an argument passed when the facility is invoked, then you must make -a good faith effort to ensure that, in the event an application does not supply -such function or table, the facility still operates, and performs whatever -part of its purpose remains meaningful. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. -(For example, a function in a library to compute square roots has a purpose -that is entirely well-defined independent of the application. Therefore, Subsection -2d requires that any application-supplied function or table used by this function -must be optional: if the application does not supply it, the square root function -must still compute square roots.) +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Library, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Library, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Library. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. -In addition, mere aggregation of another work not based on the Library with -the Library (or with a work based on the Library) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. You may opt to apply the terms of the ordinary GNU General Public License -instead of this License to a given copy of the Library. To do this, you must -alter all the notices that refer to this License, so that they refer to the -ordinary GNU General Public License, version 2, instead of to this License. -(If a newer version than version 2 of the ordinary GNU General Public License -has appeared, then you can specify that version instead if you wish.) Do not -make any other change in these notices. +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. -Once this change is made in a given copy, it is irreversible for that copy, -so the ordinary GNU General Public License applies to all subsequent copies -and derivative works made from that copy. +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. -This option is useful when you wish to copy part of the code of the Library -into a program that is not a library. +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. -4. You may copy and distribute the Library (or a portion or derivative of -it, under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you accompany it with the complete corresponding -machine-readable source code, which must be distributed under the terms of -Sections 1 and 2 above on a medium customarily used for software interchange. +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. -If distribution of object code is made by offering access to copy from a designated -place, then offering equivalent access to copy the source code from the same -place satisfies the requirement to distribute the source code, even though -third parties are not compelled to copy the source along with the object code. +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. -5. A program that contains no derivative of any portion of the Library, but -is designed to work with the Library by being compiled or linked with it, -is called a "work that uses the Library". Such a work, in isolation, is not -a derivative work of the Library, and therefore falls outside the scope of -this License. +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. -However, linking a "work that uses the Library" with the Library creates an -executable that is a derivative of the Library (because it contains portions -of the Library), rather than a "work that uses the library". The executable -is therefore covered by this License. Section 6 states terms for distribution -of such executables. +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. -When a "work that uses the Library" uses material from a header file that -is part of the Library, the object code for the work may be a derivative work -of the Library even though the source code is not. Whether this is true is -especially significant if the work can be linked without the Library, or if -the work is itself a library. The threshold for this to be true is not precisely -defined by law. +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. -If such an object file uses only numerical parameters, data structure layouts -and accessors, and small macros and small inline functions (ten lines or less -in length), then the use of the object file is unrestricted, regardless of -whether it is legally a derivative work. (Executables containing this object -code plus portions of the Library will still fall under Section 6.) +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) -Otherwise, if the work is a derivative of the Library, you may distribute -the object code for the work under the terms of Section 6. Any executables -containing that work also fall under Section 6, whether or not they are linked -directly with the Library itself. +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. -6. As an exception to the Sections above, you may also compile or link a "work -that uses the Library" with the Library to produce a work containing portions -of the Library, and distribute that work under terms of your choice, provided -that the terms permit modification of the work for the customer's own use -and reverse engineering for debugging such modifications. +6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. -You must give prominent notice with each copy of the work that the Library -is used in it and that the Library and its use are covered by this License. -You must supply a copy of this License. If the work during execution displays -copyright notices, you must include the copyright notice for the Library among -them, as well as a reference directing the user to the copy of this License. -Also, you must do one of these things: +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: -a) Accompany the work with the complete corresponding machine-readable source -code for the Library including whatever changes were used in the work (which -must be distributed under Sections 1 and 2 above); and, if the work is an -executable linked with the Library, with the complete machine-readable "work -that uses the Library", as object code and/or source code, so that the user -can modify the Library and then relink to produce a modified executable containing -the modified Library. (It is understood that the user who changes the contents -of definitions files in the Library will not necessarily be able to recompile -the application to use the modified definitions.) + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) -b) Accompany the work with a written offer, valid for at least three years, -to give the same user the materials specified in Subsection 6a, above, for -a charge no more than the cost of performing this distribution. + b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. -c) If distribution of the work is made by offering access to copy from a designated -place, offer equivalent access to copy the above specified materials from -the same place. + c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -d) Verify that the user has already received a copy of these materials or -that you have already sent this user a copy. + d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -For an executable, the required form of the "work that uses the Library" must -include any data and utility programs needed for reproducing the executable -from it. However, as a special exception, the source code distributed need -not include anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the operating -system on which the executable runs, unless that component itself accompanies -the executable. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -It may happen that this requirement contradicts the license restrictions of -other proprietary libraries that do not normally accompany the operating system. -Such a contradiction means you cannot use both them and the Library together -in an executable that you distribute. +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. -7. You may place library facilities that are a work based on the Library side-by-side -in a single library together with other library facilities not covered by -this License, and distribute such a combined library, provided that the separate -distribution of the work based on the Library and of the other library facilities -is otherwise permitted, and provided that you do these two things: +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: -a) Accompany the combined library with a copy of the same work based on the -Library, uncombined with any other library facilities. This must be distributed -under the terms of the Sections above. + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. -b) Give prominent notice with the combined library of the fact that part of -it is a work based on the Library, and explaining where to find the accompanying -uncombined form of the same work. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -8. You may not copy, modify, sublicense, link with, or distribute the Library -except as expressly provided under this License. Any attempt otherwise to -copy, modify, sublicense, link with, or distribute the Library is void, and -will automatically terminate your rights under this License. However, parties -who have received copies, or rights, from you under this License will not -have their licenses terminated so long as such parties remain in full compliance. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -9. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Library or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Library -(or any work based on the Library), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Library or works based on it. +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. -10. Each time you redistribute the Library (or any work based on the Library), -the recipient automatically receives a license from the original licensor -to copy, distribute, link with or modify the Library subject to these terms -and conditions. You may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible for enforcing -compliance by third parties to this License. +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -11. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Library at all. For example, if a -patent license would not permit royalty-free redistribution of the Library -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Library. +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -12. If the distribution and/or use of the Library is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Library under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -13. The Free Software Foundation may publish revised and/or new versions of -the Library General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. +13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Library specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Library does not specify a license version number, you may choose any version -ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. -14. If you wish to incorporate parts of the Library into other free programs -whose distribution conditions are incompatible with these, write to the author -to ask for permission. For software which is copyrighted by the Free Software -Foundation, write to the Free Software Foundation; we sometimes make exceptions -for this. Our decision will be guided by the two goals of preserving the free -status of all derivatives of our free software and of promoting the sharing -and reuse of software generally. +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY +NO WARRANTY -15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries -If you develop a new library, and you want it to be of the greatest possible -use to the public, we recommend making it free software that everyone can -redistribute and change. You can do so by permitting redistribution under -these terms (or, alternatively, under the terms of the ordinary General Public -License). +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). -To apply these terms, attach the following notices to the library. It is safest -to attach them to the start of each source file to most effectively convey -the exclusion of warranty; and each file should have at least the "copyright" -line and a pointer to where the full notice is found. +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. -one line to give the library's name and an idea of what it does. + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author -Copyright (C) year name of author + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Library General Public License as published by the Free -Software Foundation; either version 2 of the License, or (at your option) -any later version. + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -details. - -You should have received a copy of the GNU Library General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the library, if necessary. Here -is a sample; alter the names: +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in - the library `Frob' (a library for tweaking knobs) written - by James Random Hacker. signature of Ty Coon, 1 April 1990 - Ty Coon, President of Vice That's all there is to it! diff --git a/options/license/LGPL-2.0-or-later b/options/license/LGPL-2.0-or-later index 5c96471aa..eb3a4cd1d 100644 --- a/options/license/LGPL-2.0-or-later +++ b/options/license/LGPL-2.0-or-later @@ -1,446 +1,174 @@ GNU LIBRARY GENERAL PUBLIC LICENSE -Version 2, June 1991 Copyright (C) 1991 Free Software Foundation, Inc. +Version 2, June 1991 -51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +Copyright (C) 1991 Free Software Foundation, Inc. +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -[This is the first released version of the library GPL. It is numbered 2 because -it goes with version 2 of the ordinary GPL.] +[This is the first released version of the library GPL. It is numbered 2 because it goes with version 2 of the ordinary GPL.] Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public Licenses are intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. -This license, the Library General Public License, applies to some specially -designated Free Software Foundation software, and to any other libraries whose -authors decide to use it. You can use it for your libraries, too. +This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. -When we speak of free software, we are referring to freedom, not price. Our -General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish), that you receive source code or can get it if you want it, that you -can change the software or use pieces of it in new free programs; and that -you know you can do these things. +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. -To protect your rights, we need to make restrictions that forbid anyone to -deny you these rights or to ask you to surrender the rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the library, or if you modify it. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. -For example, if you distribute copies of the library, whether gratis or for -a fee, you must give the recipients all the rights that we gave you. You must -make sure that they, too, receive or can get the source code. If you link -a program with the library, you must provide complete object files to the -recipients so that they can relink them with the library, after making changes -to the library and recompiling it. And you must show them these terms so they -know their rights. +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. -Our method of protecting your rights has two steps: (1) copyright the library, -and (2) offer you this license which gives you legal permission to copy, distribute -and/or modify the library. +Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. -Also, for each distributor's protection, we want to make certain that everyone -understands that there is no warranty for this free library. If the library -is modified by someone else and passed on, we want its recipients to know -that what they have is not the original version, so that any problems introduced -by others will not reflect on the original authors' reputations. +Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. -Finally, any free program is threatened constantly by software patents. We -wish to avoid the danger that companies distributing free software will individually -obtain patent licenses, thus in effect transforming the program into proprietary -software. To prevent this, we have made it clear that any patent must be licensed -for everyone's free use or not licensed at all. +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. -Most GNU software, including some libraries, is covered by the ordinary GNU -General Public License, which was designed for utility programs. This license, -the GNU Library General Public License, applies to certain designated libraries. -This license is quite different from the ordinary one; be sure to read it -in full, and don't assume that anything in it is the same as in the ordinary -license. +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. -The reason we have a separate public license for some libraries is that they -blur the distinction we usually make between modifying or adding to a program -and simply using it. Linking a program with a library, without changing the -library, is in some sense simply using the library, and is analogous to running -a utility program or application program. However, in a textual and legal -sense, the linked executable is a combined work, a derivative of the original -library, and the ordinary General Public License treats it as such. +The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. -Because of this blurred distinction, using the ordinary General Public License -for libraries did not effectively promote software sharing, because most developers -did not use the libraries. We concluded that weaker conditions might promote -sharing better. +Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. -However, unrestricted linking of non-free programs would deprive the users -of those programs of all benefit from the free status of the libraries themselves. -This Library General Public License is intended to permit developers of non-free -programs to use free libraries, while preserving your freedom as a user of -such programs to change the free libraries that are incorporated in them. -(We have not seen how to achieve this as regards changes in header files, -but we have achieved it as regards changes in the actual functions of the -Library.) The hope is that this will lead to faster development of free libraries. +However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. -The precise terms and conditions for copying, distribution and modification -follow. Pay close attention to the difference between a "work based on the -library" and a "work that uses the library". The former contains code derived -from the library, while the latter only works together with the library. +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. -Note that it is possible for a library to be covered by the ordinary General -Public License rather than by this special one. +Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any software library which contains a -notice placed by the copyright holder or other authorized party saying it -may be distributed under the terms of this Library General Public License -(also called "this License"). Each licensee is addressed as "you". +0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". -A "library" means a collection of software functions and/or data prepared -so as to be conveniently linked with application programs (which use some -of those functions and data) to form executables. +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. -The "Library", below, refers to any such software library or work which has -been distributed under these terms. A "work based on the Library" means either -the Library or any derivative work under copyright law: that is to say, a -work containing the Library or a portion of it, either verbatim or with modifications -and/or translated straightforwardly into another language. (Hereinafter, translation -is included without limitation in the term "modification".) +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) -"Source code" for a work means the preferred form of the work for making modifications -to it. For a library, complete source code means all the source code for all -modules it contains, plus any associated interface definition files, plus -the scripts used to control compilation and installation of the library. +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running a program -using the Library is not restricted, and output from such a program is covered -only if its contents constitute a work based on the Library (independent of -the use of the Library in a tool for writing it). Whether that is true depends -on what the Library does and what the program that uses the Library does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. -1. You may copy and distribute verbatim copies of the Library's complete source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and disclaimer -of warranty; keep intact all the notices that refer to this License and to -the absence of any warranty; and distribute a copy of this License along with -the Library. +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Library or any portion of it, -thus forming a work based on the Library, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) The modified work must itself be a software library. + a) The modified work must itself be a software library. -b) You must cause the files modified to carry prominent notices stating that -you changed the files and the date of any change. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all -third parties under the terms of this License. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -d) If a facility in the modified Library refers to a function or a table of -data to be supplied by an application program that uses the facility, other -than as an argument passed when the facility is invoked, then you must make -a good faith effort to ensure that, in the event an application does not supply -such function or table, the facility still operates, and performs whatever -part of its purpose remains meaningful. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. -(For example, a function in a library to compute square roots has a purpose -that is entirely well-defined independent of the application. Therefore, Subsection -2d requires that any application-supplied function or table used by this function -must be optional: if the application does not supply it, the square root function -must still compute square roots.) +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Library, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Library, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Library. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. -In addition, mere aggregation of another work not based on the Library with -the Library (or with a work based on the Library) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. You may opt to apply the terms of the ordinary GNU General Public License -instead of this License to a given copy of the Library. To do this, you must -alter all the notices that refer to this License, so that they refer to the -ordinary GNU General Public License, version 2, instead of to this License. -(If a newer version than version 2 of the ordinary GNU General Public License -has appeared, then you can specify that version instead if you wish.) Do not -make any other change in these notices. +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. -Once this change is made in a given copy, it is irreversible for that copy, -so the ordinary GNU General Public License applies to all subsequent copies -and derivative works made from that copy. +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. -This option is useful when you wish to copy part of the code of the Library -into a program that is not a library. +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. -4. You may copy and distribute the Library (or a portion or derivative of -it, under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you accompany it with the complete corresponding -machine-readable source code, which must be distributed under the terms of -Sections 1 and 2 above on a medium customarily used for software interchange. +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. -If distribution of object code is made by offering access to copy from a designated -place, then offering equivalent access to copy the source code from the same -place satisfies the requirement to distribute the source code, even though -third parties are not compelled to copy the source along with the object code. +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. -5. A program that contains no derivative of any portion of the Library, but -is designed to work with the Library by being compiled or linked with it, -is called a "work that uses the Library". Such a work, in isolation, is not -a derivative work of the Library, and therefore falls outside the scope of -this License. +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. -However, linking a "work that uses the Library" with the Library creates an -executable that is a derivative of the Library (because it contains portions -of the Library), rather than a "work that uses the library". The executable -is therefore covered by this License. Section 6 states terms for distribution -of such executables. +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. -When a "work that uses the Library" uses material from a header file that -is part of the Library, the object code for the work may be a derivative work -of the Library even though the source code is not. Whether this is true is -especially significant if the work can be linked without the Library, or if -the work is itself a library. The threshold for this to be true is not precisely -defined by law. +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. -If such an object file uses only numerical parameters, data structure layouts -and accessors, and small macros and small inline functions (ten lines or less -in length), then the use of the object file is unrestricted, regardless of -whether it is legally a derivative work. (Executables containing this object -code plus portions of the Library will still fall under Section 6.) +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) -Otherwise, if the work is a derivative of the Library, you may distribute -the object code for the work under the terms of Section 6. Any executables -containing that work also fall under Section 6, whether or not they are linked -directly with the Library itself. +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. -6. As an exception to the Sections above, you may also compile or link a "work -that uses the Library" with the Library to produce a work containing portions -of the Library, and distribute that work under terms of your choice, provided -that the terms permit modification of the work for the customer's own use -and reverse engineering for debugging such modifications. +6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. -You must give prominent notice with each copy of the work that the Library -is used in it and that the Library and its use are covered by this License. -You must supply a copy of this License. If the work during execution displays -copyright notices, you must include the copyright notice for the Library among -them, as well as a reference directing the user to the copy of this License. -Also, you must do one of these things: +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: -a) Accompany the work with the complete corresponding machine-readable source -code for the Library including whatever changes were used in the work (which -must be distributed under Sections 1 and 2 above); and, if the work is an -executable linked with the Library, with the complete machine-readable "work -that uses the Library", as object code and/or source code, so that the user -can modify the Library and then relink to produce a modified executable containing -the modified Library. (It is understood that the user who changes the contents -of definitions files in the Library will not necessarily be able to recompile -the application to use the modified definitions.) + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) -b) Accompany the work with a written offer, valid for at least three years, -to give the same user the materials specified in Subsection 6a, above, for -a charge no more than the cost of performing this distribution. + b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. -c) If distribution of the work is made by offering access to copy from a designated -place, offer equivalent access to copy the above specified materials from -the same place. + c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -d) Verify that the user has already received a copy of these materials or -that you have already sent this user a copy. + d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -For an executable, the required form of the "work that uses the Library" must -include any data and utility programs needed for reproducing the executable -from it. However, as a special exception, the source code distributed need -not include anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the operating -system on which the executable runs, unless that component itself accompanies -the executable. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -It may happen that this requirement contradicts the license restrictions of -other proprietary libraries that do not normally accompany the operating system. -Such a contradiction means you cannot use both them and the Library together -in an executable that you distribute. +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. -7. You may place library facilities that are a work based on the Library side-by-side -in a single library together with other library facilities not covered by -this License, and distribute such a combined library, provided that the separate -distribution of the work based on the Library and of the other library facilities -is otherwise permitted, and provided that you do these two things: +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: -a) Accompany the combined library with a copy of the same work based on the -Library, uncombined with any other library facilities. This must be distributed -under the terms of the Sections above. + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. -b) Give prominent notice with the combined library of the fact that part of -it is a work based on the Library, and explaining where to find the accompanying -uncombined form of the same work. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -8. You may not copy, modify, sublicense, link with, or distribute the Library -except as expressly provided under this License. Any attempt otherwise to -copy, modify, sublicense, link with, or distribute the Library is void, and -will automatically terminate your rights under this License. However, parties -who have received copies, or rights, from you under this License will not -have their licenses terminated so long as such parties remain in full compliance. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -9. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Library or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Library -(or any work based on the Library), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Library or works based on it. +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. -10. Each time you redistribute the Library (or any work based on the Library), -the recipient automatically receives a license from the original licensor -to copy, distribute, link with or modify the Library subject to these terms -and conditions. You may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible for enforcing -compliance by third parties to this License. +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. -11. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Library at all. For example, if a -patent license would not permit royalty-free redistribution of the Library -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Library. +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -12. If the distribution and/or use of the Library is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Library under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -13. The Free Software Foundation may publish revised and/or new versions of -the Library General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. +13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Library specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Library does not specify a license version number, you may choose any version -ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. -14. If you wish to incorporate parts of the Library into other free programs -whose distribution conditions are incompatible with these, write to the author -to ask for permission. For software which is copyrighted by the Free Software -Foundation, write to the Free Software Foundation; we sometimes make exceptions -for this. Our decision will be guided by the two goals of preserving the free -status of all derivatives of our free software and of promoting the sharing -and reuse of software generally. +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY +NO WARRANTY -15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries -If you develop a new library, and you want it to be of the greatest possible -use to the public, we recommend making it free software that everyone can -redistribute and change. You can do so by permitting redistribution under -these terms (or, alternatively, under the terms of the ordinary General Public -License). +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). -To apply these terms, attach the following notices to the library. It is safest -to attach them to the start of each source file to most effectively convey -the exclusion of warranty; and each file should have at least the "copyright" -line and a pointer to where the full notice is found. +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. -one line to give the library's name and an idea of what it does. + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author -Copyright (C) year name of author + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Library General Public License as published by the Free -Software Foundation; either version 2 of the License, or (at your option) -any later version. + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more -details. - -You should have received a copy of the GNU Library General Public License -along with this library; if not, write to the Free Software Foundation, Inc., -51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. + You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. Also add information on how to contact you by electronic and paper mail. -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the library, if necessary. Here -is a sample; alter the names: +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in - the library `Frob' (a library for tweaking knobs) written - by James Random Hacker. signature of Ty Coon, 1 April 1990 - Ty Coon, President of Vice That's all there is to it! diff --git a/options/license/LGPL-2.1-only b/options/license/LGPL-2.1-only index 130dffb31..c9aa53018 100644 --- a/options/license/LGPL-2.1-only +++ b/options/license/LGPL-2.1-only @@ -3,465 +3,173 @@ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts as the -successor of the GNU Library Public License, version 2, hence the version -number 2.1.] +[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public Licenses are intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. -This license, the Lesser General Public License, applies to some specially -designated software packages--typically libraries--of the Free Software Foundation -and other authors who decide to use it. You can use it too, but we suggest -you first think carefully about whether this license or the ordinary General -Public License is the better strategy to use in any particular case, based -on the explanations below. +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. -When we speak of free software, we are referring to freedom of use, not price. -Our General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish); that you receive source code or can get it if you want it; that you -can change the software and use pieces of it in new free programs; and that -you are informed that you can do these things. +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. -To protect your rights, we need to make restrictions that forbid distributors -to deny you these rights or to ask you to surrender these rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the library or if you modify it. +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. -For example, if you distribute copies of the library, whether gratis or for -a fee, you must give the recipients all the rights that we gave you. You must -make sure that they, too, receive or can get the source code. If you link -other code with the library, you must provide complete object files to the -recipients, so that they can relink them with the library after making changes -to the library and recompiling it. And you must show them these terms so they -know their rights. +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. -We protect your rights with a two-step method: (1) we copyright the library, -and (2) we offer you this license, which gives you legal permission to copy, -distribute and/or modify the library. +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. -To protect each distributor, we want to make it very clear that there is no -warranty for the free library. Also, if the library is modified by someone -else and passed on, the recipients should know that what they have is not -the original version, so that the original author's reputation will not be -affected by problems that might be introduced by others. +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. -Finally, software patents pose a constant threat to the existence of any free -program. We wish to make sure that a company cannot effectively restrict the -users of a free program by obtaining a restrictive license from a patent holder. -Therefore, we insist that any patent license obtained for a version of the -library must be consistent with the full freedom of use specified in this -license. +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. -Most GNU software, including some libraries, is covered by the ordinary GNU -General Public License. This license, the GNU Lesser General Public License, -applies to certain designated libraries, and is quite different from the ordinary -General Public License. We use this license for certain libraries in order -to permit linking those libraries into non-free programs. +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. -When a program is linked with a library, whether statically or using a shared -library, the combination of the two is legally speaking a combined work, a -derivative of the original library. The ordinary General Public License therefore -permits such linking only if the entire combination fits its criteria of freedom. -The Lesser General Public License permits more lax criteria for linking other -code with the library. +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. -We call this license the "Lesser" General Public License because it does Less -to protect the user's freedom than the ordinary General Public License. It -also provides other free software developers Less of an advantage over competing -non-free programs. These disadvantages are the reason we use the ordinary -General Public License for many libraries. However, the Lesser license provides -advantages in certain special circumstances. +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. -For example, on rare occasions, there may be a special need to encourage the -widest possible use of a certain library, so that it becomes a de-facto standard. -To achieve this, non-free programs must be allowed to use the library. A more -frequent case is that a free library does the same job as widely used non-free -libraries. In this case, there is little to gain by limiting the free library -to free software only, so we use the Lesser General Public License. +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. -In other cases, permission to use a particular library in non-free programs -enables a greater number of people to use a large body of free software. For -example, permission to use the GNU C Library in non-free programs enables -many more people to use the whole GNU operating system, as well as its variant, -the GNU/Linux operating system. +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. -Although the Lesser General Public License is Less protective of the users' -freedom, it does ensure that the user of a program that is linked with the -Library has the freedom and the wherewithal to run that program using a modified -version of the Library. +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. -The precise terms and conditions for copying, distribution and modification -follow. Pay close attention to the difference between a "work based on the -library" and a "work that uses the library". The former contains code derived -from the library, whereas the latter must be combined with the library in -order to run. +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any software library or other program -which contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Lesser General -Public License (also called "this License"). Each licensee is addressed as -"you". +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". -A "library" means a collection of software functions and/or data prepared -so as to be conveniently linked with application programs (which use some -of those functions and data) to form executables. +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. -The "Library", below, refers to any such software library or work which has -been distributed under these terms. A "work based on the Library" means either -the Library or any derivative work under copyright law: that is to say, a -work containing the Library or a portion of it, either verbatim or with modifications -and/or translated straightforwardly into another language. (Hereinafter, translation -is included without limitation in the term "modification".) +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) -"Source code" for a work means the preferred form of the work for making modifications -to it. For a library, complete source code means all the source code for all -modules it contains, plus any associated interface definition files, plus -the scripts used to control compilation and installation of the library. +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running a program -using the Library is not restricted, and output from such a program is covered -only if its contents constitute a work based on the Library (independent of -the use of the Library in a tool for writing it). Whether that is true depends -on what the Library does and what the program that uses the Library does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. -1. You may copy and distribute verbatim copies of the Library's complete source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and disclaimer -of warranty; keep intact all the notices that refer to this License and to -the absence of any warranty; and distribute a copy of this License along with -the Library. +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Library or any portion of it, -thus forming a work based on the Library, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) The modified work must itself be a software library. + a) The modified work must itself be a software library. -b) You must cause the files modified to carry prominent notices stating that -you changed the files and the date of any change. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all -third parties under the terms of this License. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -d) If a facility in the modified Library refers to a function or a table of -data to be supplied by an application program that uses the facility, other -than as an argument passed when the facility is invoked, then you must make -a good faith effort to ensure that, in the event an application does not supply -such function or table, the facility still operates, and performs whatever -part of its purpose remains meaningful. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. -(For example, a function in a library to compute square roots has a purpose -that is entirely well-defined independent of the application. Therefore, Subsection -2d requires that any application-supplied function or table used by this function -must be optional: if the application does not supply it, the square root function -must still compute square roots.) +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Library, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Library, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Library. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. -In addition, mere aggregation of another work not based on the Library with -the Library (or with a work based on the Library) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. You may opt to apply the terms of the ordinary GNU General Public License -instead of this License to a given copy of the Library. To do this, you must -alter all the notices that refer to this License, so that they refer to the -ordinary GNU General Public License, version 2, instead of to this License. -(If a newer version than version 2 of the ordinary GNU General Public License -has appeared, then you can specify that version instead if you wish.) Do not -make any other change in these notices. +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. -Once this change is made in a given copy, it is irreversible for that copy, -so the ordinary GNU General Public License applies to all subsequent copies -and derivative works made from that copy. +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. -This option is useful when you wish to copy part of the code of the Library -into a program that is not a library. +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. -4. You may copy and distribute the Library (or a portion or derivative of -it, under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you accompany it with the complete corresponding -machine-readable source code, which must be distributed under the terms of -Sections 1 and 2 above on a medium customarily used for software interchange. +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. -If distribution of object code is made by offering access to copy from a designated -place, then offering equivalent access to copy the source code from the same -place satisfies the requirement to distribute the source code, even though -third parties are not compelled to copy the source along with the object code. +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. -5. A program that contains no derivative of any portion of the Library, but -is designed to work with the Library by being compiled or linked with it, -is called a "work that uses the Library". Such a work, in isolation, is not -a derivative work of the Library, and therefore falls outside the scope of -this License. +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. -However, linking a "work that uses the Library" with the Library creates an -executable that is a derivative of the Library (because it contains portions -of the Library), rather than a "work that uses the library". The executable -is therefore covered by this License. Section 6 states terms for distribution -of such executables. +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. -When a "work that uses the Library" uses material from a header file that -is part of the Library, the object code for the work may be a derivative work -of the Library even though the source code is not. Whether this is true is -especially significant if the work can be linked without the Library, or if -the work is itself a library. The threshold for this to be true is not precisely -defined by law. +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. -If such an object file uses only numerical parameters, data structure layouts -and accessors, and small macros and small inline functions (ten lines or less -in length), then the use of the object file is unrestricted, regardless of -whether it is legally a derivative work. (Executables containing this object -code plus portions of the Library will still fall under Section 6.) +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) -Otherwise, if the work is a derivative of the Library, you may distribute -the object code for the work under the terms of Section 6. Any executables -containing that work also fall under Section 6, whether or not they are linked -directly with the Library itself. +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. -6. As an exception to the Sections above, you may also combine or link a "work -that uses the Library" with the Library to produce a work containing portions -of the Library, and distribute that work under terms of your choice, provided -that the terms permit modification of the work for the customer's own use -and reverse engineering for debugging such modifications. +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. -You must give prominent notice with each copy of the work that the Library -is used in it and that the Library and its use are covered by this License. -You must supply a copy of this License. If the work during execution displays -copyright notices, you must include the copyright notice for the Library among -them, as well as a reference directing the user to the copy of this License. -Also, you must do one of these things: +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: -a) Accompany the work with the complete corresponding machine-readable source -code for the Library including whatever changes were used in the work (which -must be distributed under Sections 1 and 2 above); and, if the work is an -executable linked with the Library, with the complete machine-readable "work -that uses the Library", as object code and/or source code, so that the user -can modify the Library and then relink to produce a modified executable containing -the modified Library. (It is understood that the user who changes the contents -of definitions files in the Library will not necessarily be able to recompile -the application to use the modified definitions.) + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) -b) Use a suitable shared library mechanism for linking with the Library. A -suitable mechanism is one that (1) uses at run time a copy of the library -already present on the user's computer system, rather than copying library -functions into the executable, and (2) will operate properly with a modified -version of the library, if the user installs one, as long as the modified -version is interface-compatible with the version that the work was made with. + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. -c) Accompany the work with a written offer, valid for at least three years, -to give the same user the materials specified in Subsection 6a, above, for -a charge no more than the cost of performing this distribution. + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. -d) If distribution of the work is made by offering access to copy from a designated -place, offer equivalent access to copy the above specified materials from -the same place. + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -e) Verify that the user has already received a copy of these materials or -that you have already sent this user a copy. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -For an executable, the required form of the "work that uses the Library" must -include any data and utility programs needed for reproducing the executable -from it. However, as a special exception, the materials to be distributed -need not include anything that is normally distributed (in either source or -binary form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component itself -accompanies the executable. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -It may happen that this requirement contradicts the license restrictions of -other proprietary libraries that do not normally accompany the operating system. -Such a contradiction means you cannot use both them and the Library together -in an executable that you distribute. +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. -7. You may place library facilities that are a work based on the Library side-by-side -in a single library together with other library facilities not covered by -this License, and distribute such a combined library, provided that the separate -distribution of the work based on the Library and of the other library facilities -is otherwise permitted, and provided that you do these two things: +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: -a) Accompany the combined library with a copy of the same work based on the -Library, uncombined with any other library facilities. This must be distributed -under the terms of the Sections above. + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. -b) Give prominent notice with the combined library of the fact that part of -it is a work based on the Library, and explaining where to find the accompanying -uncombined form of the same work. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -8. You may not copy, modify, sublicense, link with, or distribute the Library -except as expressly provided under this License. Any attempt otherwise to -copy, modify, sublicense, link with, or distribute the Library is void, and -will automatically terminate your rights under this License. However, parties -who have received copies, or rights, from you under this License will not -have their licenses terminated so long as such parties remain in full compliance. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -9. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Library or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Library -(or any work based on the Library), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Library or works based on it. +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. -10. Each time you redistribute the Library (or any work based on the Library), -the recipient automatically receives a license from the original licensor -to copy, distribute, link with or modify the Library subject to these terms -and conditions. You may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible for enforcing -compliance by third parties with this License. +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. -11. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Library at all. For example, if a -patent license would not permit royalty-free redistribution of the Library -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Library. +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -12. If the distribution and/or use of the Library is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Library under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -13. The Free Software Foundation may publish revised and/or new versions of -the Lesser General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Library specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Library does not specify a license version number, you may choose any version -ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. -14. If you wish to incorporate parts of the Library into other free programs -whose distribution conditions are incompatible with these, write to the author -to ask for permission. For software which is copyrighted by the Free Software -Foundation, write to the Free Software Foundation; we sometimes make exceptions -for this. Our decision will be guided by the two goals of preserving the free -status of all derivatives of our free software and of promoting the sharing -and reuse of software generally. +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY +NO WARRANTY -15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries -If you develop a new library, and you want it to be of the greatest possible -use to the public, we recommend making it free software that everyone can -redistribute and change. You can do so by permitting redistribution under -these terms (or, alternatively, under the terms of the ordinary General Public -License). +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). -To apply these terms, attach the following notices to the library. It is safest -to attach them to the start of each source file to most effectively convey -the exclusion of warranty; and each file should have at least the "copyright" -line and a pointer to where the full notice is found. +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. -< one line to give the library's name and an idea of what it does. > + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author -Copyright (C) < year > < name of author > + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 2.1 of the License, or (at your option) -any later version. + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -details. + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. -You should have received a copy of the GNU Lesser General Public License along -with this library; if not, write to the Free Software Foundation, Inc., 51 -Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information -on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the library, if necessary. Here -is a sample; alter the names: +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in - the library `Frob' (a library for tweaking knobs) written - by James Random Hacker. -< signature of Ty Coon > , 1 April 1990 - +signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice - That's all there is to it! diff --git a/options/license/LGPL-2.1-or-later b/options/license/LGPL-2.1-or-later index 04bb156e7..c9aa53018 100644 --- a/options/license/LGPL-2.1-or-later +++ b/options/license/LGPL-2.1-or-later @@ -3,466 +3,173 @@ GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA -51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts as the -successor of the GNU Library Public License, version 2, hence the version -number 2.1.] +[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble -The licenses for most software are designed to take away your freedom to share -and change it. By contrast, the GNU General Public Licenses are intended to -guarantee your freedom to share and change free software--to make sure the -software is free for all its users. +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. -This license, the Lesser General Public License, applies to some specially -designated software packages--typically libraries--of the Free Software Foundation -and other authors who decide to use it. You can use it too, but we suggest -you first think carefully about whether this license or the ordinary General -Public License is the better strategy to use in any particular case, based -on the explanations below. +This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. -When we speak of free software, we are referring to freedom of use, not price. -Our General Public Licenses are designed to make sure that you have the freedom -to distribute copies of free software (and charge for this service if you -wish); that you receive source code or can get it if you want it; that you -can change the software and use pieces of it in new free programs; and that -you are informed that you can do these things. +When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. -To protect your rights, we need to make restrictions that forbid distributors -to deny you these rights or to ask you to surrender these rights. These restrictions -translate to certain responsibilities for you if you distribute copies of -the library or if you modify it. +To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. -For example, if you distribute copies of the library, whether gratis or for -a fee, you must give the recipients all the rights that we gave you. You must -make sure that they, too, receive or can get the source code. If you link -other code with the library, you must provide complete object files to the -recipients, so that they can relink them with the library after making changes -to the library and recompiling it. And you must show them these terms so they -know their rights. +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. -We protect your rights with a two-step method: (1) we copyright the library, -and (2) we offer you this license, which gives you legal permission to copy, -distribute and/or modify the library. +We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. -To protect each distributor, we want to make it very clear that there is no -warranty for the free library. Also, if the library is modified by someone -else and passed on, the recipients should know that what they have is not -the original version, so that the original author's reputation will not be -affected by problems that might be introduced by others. +To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. -Finally, software patents pose a constant threat to the existence of any free -program. We wish to make sure that a company cannot effectively restrict the -users of a free program by obtaining a restrictive license from a patent holder. -Therefore, we insist that any patent license obtained for a version of the -library must be consistent with the full freedom of use specified in this -license. +Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. -Most GNU software, including some libraries, is covered by the ordinary GNU -General Public License. This license, the GNU Lesser General Public License, -applies to certain designated libraries, and is quite different from the ordinary -General Public License. We use this license for certain libraries in order -to permit linking those libraries into non-free programs. +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. -When a program is linked with a library, whether statically or using a shared -library, the combination of the two is legally speaking a combined work, a -derivative of the original library. The ordinary General Public License therefore -permits such linking only if the entire combination fits its criteria of freedom. -The Lesser General Public License permits more lax criteria for linking other -code with the library. +When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. -We call this license the "Lesser" General Public License because it does Less -to protect the user's freedom than the ordinary General Public License. It -also provides other free software developers Less of an advantage over competing -non-free programs. These disadvantages are the reason we use the ordinary -General Public License for many libraries. However, the Lesser license provides -advantages in certain special circumstances. +We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. -For example, on rare occasions, there may be a special need to encourage the -widest possible use of a certain library, so that it becomes a de-facto standard. -To achieve this, non-free programs must be allowed to use the library. A more -frequent case is that a free library does the same job as widely used non-free -libraries. In this case, there is little to gain by limiting the free library -to free software only, so we use the Lesser General Public License. +For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. -In other cases, permission to use a particular library in non-free programs -enables a greater number of people to use a large body of free software. For -example, permission to use the GNU C Library in non-free programs enables -many more people to use the whole GNU operating system, as well as its variant, -the GNU/Linux operating system. +In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. -Although the Lesser General Public License is Less protective of the users' -freedom, it does ensure that the user of a program that is linked with the -Library has the freedom and the wherewithal to run that program using a modified -version of the Library. +Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. -The precise terms and conditions for copying, distribution and modification -follow. Pay close attention to the difference between a "work based on the -library" and a "work that uses the library". The former contains code derived -from the library, whereas the latter must be combined with the library in -order to run. +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any software library or other program -which contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Lesser General -Public License (also called "this License"). Each licensee is addressed as -"you". +0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". -A "library" means a collection of software functions and/or data prepared -so as to be conveniently linked with application programs (which use some -of those functions and data) to form executables. +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. -The "Library", below, refers to any such software library or work which has -been distributed under these terms. A "work based on the Library" means either -the Library or any derivative work under copyright law: that is to say, a -work containing the Library or a portion of it, either verbatim or with modifications -and/or translated straightforwardly into another language. (Hereinafter, translation -is included without limitation in the term "modification".) +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) -"Source code" for a work means the preferred form of the work for making modifications -to it. For a library, complete source code means all the source code for all -modules it contains, plus any associated interface definition files, plus -the scripts used to control compilation and installation of the library. +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running a program -using the Library is not restricted, and output from such a program is covered -only if its contents constitute a work based on the Library (independent of -the use of the Library in a tool for writing it). Whether that is true depends -on what the Library does and what the program that uses the Library does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. -1. You may copy and distribute verbatim copies of the Library's complete source -code as you receive it, in any medium, provided that you conspicuously and -appropriately publish on each copy an appropriate copyright notice and disclaimer -of warranty; keep intact all the notices that refer to this License and to -the absence of any warranty; and distribute a copy of this License along with -the Library. +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Library or any portion of it, -thus forming a work based on the Library, and copy and distribute such modifications -or work under the terms of Section 1 above, provided that you also meet all -of these conditions: +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) The modified work must itself be a software library. + a) The modified work must itself be a software library. -b) You must cause the files modified to carry prominent notices stating that -you changed the files and the date of any change. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all -third parties under the terms of this License. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -d) If a facility in the modified Library refers to a function or a table of -data to be supplied by an application program that uses the facility, other -than as an argument passed when the facility is invoked, then you must make -a good faith effort to ensure that, in the event an application does not supply -such function or table, the facility still operates, and performs whatever -part of its purpose remains meaningful. + d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. -(For example, a function in a library to compute square roots has a purpose -that is entirely well-defined independent of the application. Therefore, Subsection -2d requires that any application-supplied function or table used by this function -must be optional: if the application does not supply it, the square root function -must still compute square roots.) +(For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Library, and can be reasonably -considered independent and separate works in themselves, then this License, -and its terms, do not apply to those sections when you distribute them as -separate works. But when you distribute the same sections as part of a whole -which is a work based on the Library, the distribution of the whole must be -on the terms of this License, whose permissions for other licensees extend -to the entire whole, and thus to each and every part regardless of who wrote -it. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Library. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. -In addition, mere aggregation of another work not based on the Library with -the Library (or with a work based on the Library) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. You may opt to apply the terms of the ordinary GNU General Public License -instead of this License to a given copy of the Library. To do this, you must -alter all the notices that refer to this License, so that they refer to the -ordinary GNU General Public License, version 2, instead of to this License. -(If a newer version than version 2 of the ordinary GNU General Public License -has appeared, then you can specify that version instead if you wish.) Do not -make any other change in these notices. +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. -Once this change is made in a given copy, it is irreversible for that copy, -so the ordinary GNU General Public License applies to all subsequent copies -and derivative works made from that copy. +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. -This option is useful when you wish to copy part of the code of the Library -into a program that is not a library. +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. -4. You may copy and distribute the Library (or a portion or derivative of -it, under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you accompany it with the complete corresponding -machine-readable source code, which must be distributed under the terms of -Sections 1 and 2 above on a medium customarily used for software interchange. +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. -If distribution of object code is made by offering access to copy from a designated -place, then offering equivalent access to copy the source code from the same -place satisfies the requirement to distribute the source code, even though -third parties are not compelled to copy the source along with the object code. +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. -5. A program that contains no derivative of any portion of the Library, but -is designed to work with the Library by being compiled or linked with it, -is called a "work that uses the Library". Such a work, in isolation, is not -a derivative work of the Library, and therefore falls outside the scope of -this License. +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. -However, linking a "work that uses the Library" with the Library creates an -executable that is a derivative of the Library (because it contains portions -of the Library), rather than a "work that uses the library". The executable -is therefore covered by this License. Section 6 states terms for distribution -of such executables. +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. -When a "work that uses the Library" uses material from a header file that -is part of the Library, the object code for the work may be a derivative work -of the Library even though the source code is not. Whether this is true is -especially significant if the work can be linked without the Library, or if -the work is itself a library. The threshold for this to be true is not precisely -defined by law. +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. -If such an object file uses only numerical parameters, data structure layouts -and accessors, and small macros and small inline functions (ten lines or less -in length), then the use of the object file is unrestricted, regardless of -whether it is legally a derivative work. (Executables containing this object -code plus portions of the Library will still fall under Section 6.) +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) -Otherwise, if the work is a derivative of the Library, you may distribute -the object code for the work under the terms of Section 6. Any executables -containing that work also fall under Section 6, whether or not they are linked -directly with the Library itself. +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. -6. As an exception to the Sections above, you may also combine or link a "work -that uses the Library" with the Library to produce a work containing portions -of the Library, and distribute that work under terms of your choice, provided -that the terms permit modification of the work for the customer's own use -and reverse engineering for debugging such modifications. +6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. -You must give prominent notice with each copy of the work that the Library -is used in it and that the Library and its use are covered by this License. -You must supply a copy of this License. If the work during execution displays -copyright notices, you must include the copyright notice for the Library among -them, as well as a reference directing the user to the copy of this License. -Also, you must do one of these things: +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: -a) Accompany the work with the complete corresponding machine-readable source -code for the Library including whatever changes were used in the work (which -must be distributed under Sections 1 and 2 above); and, if the work is an -executable linked with the Library, with the complete machine-readable "work -that uses the Library", as object code and/or source code, so that the user -can modify the Library and then relink to produce a modified executable containing -the modified Library. (It is understood that the user who changes the contents -of definitions files in the Library will not necessarily be able to recompile -the application to use the modified definitions.) + a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) -b) Use a suitable shared library mechanism for linking with the Library. A -suitable mechanism is one that (1) uses at run time a copy of the library -already present on the user's computer system, rather than copying library -functions into the executable, and (2) will operate properly with a modified -version of the library, if the user installs one, as long as the modified -version is interface-compatible with the version that the work was made with. + b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. -c) Accompany the work with a written offer, valid for at least three years, -to give the same user the materials specified in Subsection 6a, above, for -a charge no more than the cost of performing this distribution. + c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. -d) If distribution of the work is made by offering access to copy from a designated -place, offer equivalent access to copy the above specified materials from -the same place. + d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -e) Verify that the user has already received a copy of these materials or -that you have already sent this user a copy. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -For an executable, the required form of the "work that uses the Library" must -include any data and utility programs needed for reproducing the executable -from it. However, as a special exception, the materials to be distributed -need not include anything that is normally distributed (in either source or -binary form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component itself -accompanies the executable. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -It may happen that this requirement contradicts the license restrictions of -other proprietary libraries that do not normally accompany the operating system. -Such a contradiction means you cannot use both them and the Library together -in an executable that you distribute. +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. -7. You may place library facilities that are a work based on the Library side-by-side -in a single library together with other library facilities not covered by -this License, and distribute such a combined library, provided that the separate -distribution of the work based on the Library and of the other library facilities -is otherwise permitted, and provided that you do these two things: +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: -a) Accompany the combined library with a copy of the same work based on the -Library, uncombined with any other library facilities. This must be distributed -under the terms of the Sections above. + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. -b) Give prominent notice with the combined library of the fact that part of -it is a work based on the Library, and explaining where to find the accompanying -uncombined form of the same work. + b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -8. You may not copy, modify, sublicense, link with, or distribute the Library -except as expressly provided under this License. Any attempt otherwise to -copy, modify, sublicense, link with, or distribute the Library is void, and -will automatically terminate your rights under this License. However, parties -who have received copies, or rights, from you under this License will not -have their licenses terminated so long as such parties remain in full compliance. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -9. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Library or its derivative works. These actions are prohibited by law if you -do not accept this License. Therefore, by modifying or distributing the Library -(or any work based on the Library), you indicate your acceptance of this License -to do so, and all its terms and conditions for copying, distributing or modifying -the Library or works based on it. +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. -10. Each time you redistribute the Library (or any work based on the Library), -the recipient automatically receives a license from the original licensor -to copy, distribute, link with or modify the Library subject to these terms -and conditions. You may not impose any further restrictions on the recipients' -exercise of the rights granted herein. You are not responsible for enforcing -compliance by third parties with this License. +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. -11. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Library at all. For example, if a -patent license would not permit royalty-free redistribution of the Library -by all those who receive copies directly or indirectly through you, then the -only way you could satisfy both it and this License would be to refrain entirely -from distribution of the Library. +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -software distribution system which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -12. If the distribution and/or use of the Library is restricted in certain -countries either by patents or by copyrighted interfaces, the original copyright -holder who places the Library under this License may add an explicit geographical -distribution limitation excluding those countries, so that distribution is -permitted only in or among countries not thus excluded. In such case, this -License incorporates the limitation as if written in the body of this License. +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -13. The Free Software Foundation may publish revised and/or new versions of -the Lesser General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Library specifies -a version number of this License which applies to it and "any later version", -you have the option of following the terms and conditions either of that version -or of any later version published by the Free Software Foundation. If the -Library does not specify a license version number, you may choose any version -ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. -14. If you wish to incorporate parts of the Library into other free programs -whose distribution conditions are incompatible with these, write to the author -to ask for permission. For software which is copyrighted by the Free Software -Foundation, write to the Free Software Foundation; we sometimes make exceptions -for this. Our decision will be guided by the two goals of preserving the free -status of all derivatives of our free software and of promoting the sharing -and reuse of software generally. +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY +NO WARRANTY -15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR -THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries -If you develop a new library, and you want it to be of the greatest possible -use to the public, we recommend making it free software that everyone can -redistribute and change. You can do so by permitting redistribution under -these terms (or, alternatively, under the terms of the ordinary General Public -License). +If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). -To apply these terms, attach the following notices to the library. It is safest -to attach them to the start of each source file to most effectively convey -the exclusion of warranty; and each file should have at least the "copyright" -line and a pointer to where the full notice is found. +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - + one line to give the library's name and an idea of what it does. + Copyright (C) year name of author -Copyright (C) + This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. -This library is free software; you can redistribute it and/or modify it under -the terms of the GNU Lesser General Public License as published by the Free -Software Foundation; either version 2.1 of the License, or (at your option) -any later version. + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. -This library is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more -details. + You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. -You should have received a copy of the GNU Lesser General Public License along -with this library; if not, write to the Free Software Foundation, Inc., 51 -Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your school, -if any, to sign a "copyright disclaimer" for the library, if necessary. Here -is a sample; alter the names: +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in - the library `Frob' (a library for tweaking knobs) written - by James Random Hacker. -< signature of Ty Coon > , 1 April 1990 - +signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice - That's all there is to it! diff --git a/options/license/LGPL-3.0-linking-exception b/options/license/LGPL-3.0-linking-exception index 28149b0b5..186456fb0 100644 --- a/options/license/LGPL-3.0-linking-exception +++ b/options/license/LGPL-3.0-linking-exception @@ -1,3 +1,16 @@ -As a special exception to the GNU Lesser General Public License version 3 ("LGPL3"), the copyright holders of this Library give you permission to convey to a third party a Combined Work that links statically or dynamically to this Library without providing any Minimal Corresponding Source or Minimal Application Code as set out in 4d or providing the installation information set out in section 4e, provided that you comply with the other provisions of LGPL3 and provided that you meet, for the Application the terms and conditions of the license(s) which apply to the Application. +As a special exception to the GNU Lesser General Public License version 3 +("LGPL3"), the copyright holders of this Library give you permission to +convey to a third party a Combined Work that links statically or dynamically +to this Library without providing any Minimal Corresponding Source or +Minimal Application Code as set out in 4d or providing the installation +information set out in section 4e, provided that you comply with the other +provisions of LGPL3 and provided that you meet, for the Application the +terms and conditions of the license(s) which apply to the Application. -Except as stated in this special exception, the provisions of LGPL3 will continue to comply in full to this Library. If you modify this Library, you may apply this exception to your version of this Library, but you are not obliged to do so. If you do not wish to do so, delete this exception statement from your version. This exception does not (and cannot) modify any license terms which apply to the Application, with which you must still comply. +Except as stated in this special exception, the provisions of LGPL3 will +continue to comply in full to this Library. If you modify this Library, you +may apply this exception to your version of this Library, but you are not +obliged to do so. If you do not wish to do so, delete this exception +statement from your version. This exception does not (and cannot) modify any +license terms which apply to the Application, with which you must still +comply. diff --git a/options/license/LGPL-3.0-only b/options/license/LGPL-3.0-only index bd405afbe..c9287dd36 100644 --- a/options/license/LGPL-3.0-only +++ b/options/license/LGPL-3.0-only @@ -1,163 +1,71 @@ GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 -Copyright (C) 2007 Free Software Foundation, Inc. +Copyright (C) 2007 Free Software Foundation, Inc. -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -This version of the GNU Lesser General Public License incorporates the terms -and conditions of version 3 of the GNU General Public License, supplemented -by the additional permissions listed below. +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. - 0. Additional Definitions. +0. Additional Definitions. - +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. -As used herein, "this License" refers to version 3 of the GNU Lesser General -Public License, and the "GNU GPL" refers to version 3 of the GNU General Public -License. +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. - +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. -"The Library" refers to a covered work governed by this License, other than -an Application or a Combined Work as defined below. +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". - +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. -An "Application" is any work that makes use of an interface provided by the -Library, but which is not otherwise based on the Library. Defining a subclass -of a class defined by the Library is deemed a mode of using an interface provided -by the Library. +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. - +1. Exception to Section 3 of the GNU GPL. +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. -A "Combined Work" is a work produced by combining or linking an Application -with the Library. The particular version of the Library with which the Combined -Work was made is also called the "Linked Version". +2. Conveying Modified Versions. +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - + a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or -The "Minimal Corresponding Source" for a Combined Work means the Corresponding -Source for the Combined Work, excluding any source code for portions of the -Combined Work that, considered in isolation, are based on the Application, -and not on the Linked Version. + b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. - +3. Object Code Incorporating Material from Library Header Files. +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: -The "Corresponding Application Code" for a Combined Work means the object -code and/or source code for the Application, including any data and utility -programs needed for reproducing the Combined Work from the Application, but -excluding the System Libraries of the Combined Work. + a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. - 1. Exception to Section 3 of the GNU GPL. + b) Accompany the object code with a copy of the GNU GPL and this license document. -You may convey a covered work under sections 3 and 4 of this License without -being bound by section 3 of the GNU GPL. +4. Combined Works. +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - 2. Conveying Modified Versions. + a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. -If you modify a copy of the Library, and, in your modifications, a facility -refers to a function or data to be supplied by an Application that uses the -facility (other than as an argument passed when the facility is invoked), -then you may convey a copy of the modified version: + b) Accompany the Combined Work with a copy of the GNU GPL and this license document. -a) under this License, provided that you make a good faith effort to ensure -that, in the event an Application does not supply the function or data, the -facility still operates, and performs whatever part of its purpose remains -meaningful, or + c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. -b) under the GNU GPL, with none of the additional permissions of this License -applicable to that copy. + d) Do one of the following: - 3. Object Code Incorporating Material from Library Header Files. + 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. -The object code form of an Application may incorporate material from a header -file that is part of the Library. You may convey such object code under terms -of your choice, provided that, if the incorporated material is not limited -to numerical parameters, data structure layouts and accessors, or small macros, -inline functions and templates (ten or fewer lines in length), you do both -of the following: + 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. -a) Give prominent notice with each copy of the object code that the Library -is used in it and that the Library and its use are covered by this License. + e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) -b) Accompany the object code with a copy of the GNU GPL and this license document. +5. Combined Libraries. +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - 4. Combined Works. + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. -You may convey a Combined Work under terms of your choice that, taken together, -effectively do not restrict modification of the portions of the Library contained -in the Combined Work and reverse engineering for debugging such modifications, -if you also do each of the following: + b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -a) Give prominent notice with each copy of the Combined Work that the Library -is used in it and that the Library and its use are covered by this License. +6. Revised Versions of the GNU Lesser General Public License. +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -b) Accompany the Combined Work with a copy of the GNU GPL and this license -document. +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. -c) For a Combined Work that displays copyright notices during execution, include -the copyright notice for the Library among these notices, as well as a reference -directing the user to the copies of the GNU GPL and this license document. - - d) Do one of the following: - -0) Convey the Minimal Corresponding Source under the terms of this License, -and the Corresponding Application Code in a form suitable for, and under terms -that permit, the user to recombine or relink the Application with a modified -version of the Linked Version to produce a modified Combined Work, in the -manner specified by section 6 of the GNU GPL for conveying Corresponding Source. - -1) Use a suitable shared library mechanism for linking with the Library. A -suitable mechanism is one that (a) uses at run time a copy of the Library -already present on the user's computer system, and (b) will operate properly -with a modified version of the Library that is interface-compatible with the -Linked Version. - -e) Provide Installation Information, but only if you would otherwise be required -to provide such information under section 6 of the GNU GPL, and only to the -extent that such information is necessary to install and execute a modified -version of the Combined Work produced by recombining or relinking the Application -with a modified version of the Linked Version. (If you use option 4d0, the -Installation Information must accompany the Minimal Corresponding Source and -Corresponding Application Code. If you use option 4d1, you must provide the -Installation Information in the manner specified by section 6 of the GNU GPL -for conveying Corresponding Source.) - - 5. Combined Libraries. - -You may place library facilities that are a work based on the Library side -by side in a single library together with other library facilities that are -not Applications and are not covered by this License, and convey such a combined -library under terms of your choice, if you do both of the following: - -a) Accompany the combined library with a copy of the same work based on the -Library, uncombined with any other library facilities, conveyed under the -terms of this License. - -b) Give prominent notice with the combined library that part of it is a work -based on the Library, and explaining where to find the accompanying uncombined -form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - -The Free Software Foundation may publish revised and/or new versions of the -GNU Lesser General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. - -Each version is given a distinguishing version number. If the Library as you -received it specifies that a certain numbered version of the GNU Lesser General -Public License "or any later version" applies to it, you have the option of -following the terms and conditions either of that published version or of -any later version published by the Free Software Foundation. If the Library -as you received it does not specify a version number of the GNU Lesser General -Public License, you may choose any version of the GNU Lesser General Public -License ever published by the Free Software Foundation. - -If the Library as you received it specifies that a proxy can decide whether -future versions of the GNU Lesser General Public License shall apply, that -proxy's public statement of acceptance of any version is permanent authorization -for you to choose that version for the Library. +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. diff --git a/options/license/LGPL-3.0-or-later b/options/license/LGPL-3.0-or-later index bd405afbe..c9287dd36 100644 --- a/options/license/LGPL-3.0-or-later +++ b/options/license/LGPL-3.0-or-later @@ -1,163 +1,71 @@ GNU LESSER GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 -Copyright (C) 2007 Free Software Foundation, Inc. +Copyright (C) 2007 Free Software Foundation, Inc. -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. +Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. -This version of the GNU Lesser General Public License incorporates the terms -and conditions of version 3 of the GNU General Public License, supplemented -by the additional permissions listed below. +This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. - 0. Additional Definitions. +0. Additional Definitions. - +As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. -As used herein, "this License" refers to version 3 of the GNU Lesser General -Public License, and the "GNU GPL" refers to version 3 of the GNU General Public -License. +"The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. - +An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. -"The Library" refers to a covered work governed by this License, other than -an Application or a Combined Work as defined below. +A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". - +The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. -An "Application" is any work that makes use of an interface provided by the -Library, but which is not otherwise based on the Library. Defining a subclass -of a class defined by the Library is deemed a mode of using an interface provided -by the Library. +The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. - +1. Exception to Section 3 of the GNU GPL. +You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. -A "Combined Work" is a work produced by combining or linking an Application -with the Library. The particular version of the Library with which the Combined -Work was made is also called the "Linked Version". +2. Conveying Modified Versions. +If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: - + a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or -The "Minimal Corresponding Source" for a Combined Work means the Corresponding -Source for the Combined Work, excluding any source code for portions of the -Combined Work that, considered in isolation, are based on the Application, -and not on the Linked Version. + b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. - +3. Object Code Incorporating Material from Library Header Files. +The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: -The "Corresponding Application Code" for a Combined Work means the object -code and/or source code for the Application, including any data and utility -programs needed for reproducing the Combined Work from the Application, but -excluding the System Libraries of the Combined Work. + a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. - 1. Exception to Section 3 of the GNU GPL. + b) Accompany the object code with a copy of the GNU GPL and this license document. -You may convey a covered work under sections 3 and 4 of this License without -being bound by section 3 of the GNU GPL. +4. Combined Works. +You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: - 2. Conveying Modified Versions. + a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. -If you modify a copy of the Library, and, in your modifications, a facility -refers to a function or data to be supplied by an Application that uses the -facility (other than as an argument passed when the facility is invoked), -then you may convey a copy of the modified version: + b) Accompany the Combined Work with a copy of the GNU GPL and this license document. -a) under this License, provided that you make a good faith effort to ensure -that, in the event an Application does not supply the function or data, the -facility still operates, and performs whatever part of its purpose remains -meaningful, or + c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. -b) under the GNU GPL, with none of the additional permissions of this License -applicable to that copy. + d) Do one of the following: - 3. Object Code Incorporating Material from Library Header Files. + 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. -The object code form of an Application may incorporate material from a header -file that is part of the Library. You may convey such object code under terms -of your choice, provided that, if the incorporated material is not limited -to numerical parameters, data structure layouts and accessors, or small macros, -inline functions and templates (ten or fewer lines in length), you do both -of the following: + 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. -a) Give prominent notice with each copy of the object code that the Library -is used in it and that the Library and its use are covered by this License. + e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) -b) Accompany the object code with a copy of the GNU GPL and this license document. +5. Combined Libraries. +You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: - 4. Combined Works. + a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. -You may convey a Combined Work under terms of your choice that, taken together, -effectively do not restrict modification of the portions of the Library contained -in the Combined Work and reverse engineering for debugging such modifications, -if you also do each of the following: + b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. -a) Give prominent notice with each copy of the Combined Work that the Library -is used in it and that the Library and its use are covered by this License. +6. Revised Versions of the GNU Lesser General Public License. +The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -b) Accompany the Combined Work with a copy of the GNU GPL and this license -document. +Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. -c) For a Combined Work that displays copyright notices during execution, include -the copyright notice for the Library among these notices, as well as a reference -directing the user to the copies of the GNU GPL and this license document. - - d) Do one of the following: - -0) Convey the Minimal Corresponding Source under the terms of this License, -and the Corresponding Application Code in a form suitable for, and under terms -that permit, the user to recombine or relink the Application with a modified -version of the Linked Version to produce a modified Combined Work, in the -manner specified by section 6 of the GNU GPL for conveying Corresponding Source. - -1) Use a suitable shared library mechanism for linking with the Library. A -suitable mechanism is one that (a) uses at run time a copy of the Library -already present on the user's computer system, and (b) will operate properly -with a modified version of the Library that is interface-compatible with the -Linked Version. - -e) Provide Installation Information, but only if you would otherwise be required -to provide such information under section 6 of the GNU GPL, and only to the -extent that such information is necessary to install and execute a modified -version of the Combined Work produced by recombining or relinking the Application -with a modified version of the Linked Version. (If you use option 4d0, the -Installation Information must accompany the Minimal Corresponding Source and -Corresponding Application Code. If you use option 4d1, you must provide the -Installation Information in the manner specified by section 6 of the GNU GPL -for conveying Corresponding Source.) - - 5. Combined Libraries. - -You may place library facilities that are a work based on the Library side -by side in a single library together with other library facilities that are -not Applications and are not covered by this License, and convey such a combined -library under terms of your choice, if you do both of the following: - -a) Accompany the combined library with a copy of the same work based on the -Library, uncombined with any other library facilities, conveyed under the -terms of this License. - -b) Give prominent notice with the combined library that part of it is a work -based on the Library, and explaining where to find the accompanying uncombined -form of the same work. - - 6. Revised Versions of the GNU Lesser General Public License. - -The Free Software Foundation may publish revised and/or new versions of the -GNU Lesser General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to address -new problems or concerns. - -Each version is given a distinguishing version number. If the Library as you -received it specifies that a certain numbered version of the GNU Lesser General -Public License "or any later version" applies to it, you have the option of -following the terms and conditions either of that published version or of -any later version published by the Free Software Foundation. If the Library -as you received it does not specify a version number of the GNU Lesser General -Public License, you may choose any version of the GNU Lesser General Public -License ever published by the Free Software Foundation. - -If the Library as you received it specifies that a proxy can decide whether -future versions of the GNU Lesser General Public License shall apply, that -proxy's public statement of acceptance of any version is permanent authorization -for you to choose that version for the Library. +If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library. diff --git a/options/license/LGPLLR b/options/license/LGPLLR index fbfbc3e6d..73d8040e9 100644 --- a/options/license/LGPLLR +++ b/options/license/LGPLLR @@ -2,253 +2,88 @@ Lesser General Public License For Linguistic Resources Preamble -The licenses for most data are designed to take away your freedom to share -and change it. By contrast, this License is intended to guarantee your freedom -to share and change free data--to make sure the data are free for all their -users. +The licenses for most data are designed to take away your freedom to share and change it. By contrast, this License is intended to guarantee your freedom to share and change free data--to make sure the data are free for all their users. -This License, the Lesser General Public License for Linguistic Resources, -applies to some specially designated linguistic resources -- typically lexicons -and grammars. +This License, the Lesser General Public License for Linguistic Resources, applies to some specially designated linguistic resources -- typically lexicons and grammars. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION -0. This License Agreement applies to any Linguistic Resource which contains -a notice placed by the copyright holder or other authorized party saying it -may be distributed under the terms of this Lesser General Public License for -Linguistic Resources (also called "this License"). Each licensee is addressed -as "you". +0. This License Agreement applies to any Linguistic Resource which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License for Linguistic Resources (also called "this License"). Each licensee is addressed as "you". -A "linguistic resource" means a collection of data about language prepared -so as to be used with application programs. +A "linguistic resource" means a collection of data about language prepared so as to be used with application programs. -The "Linguistic Resource", below, refers to any such work which has been distributed -under these terms. A "work based on the Linguistic Resource" means either -the Linguistic Resource or any derivative work under copyright law: that is -to say, a work containing the Linguistic Resource or a portion of it, either -verbatim or with modifications and/or translated straightforwardly into another -language. (Hereinafter, translation is included without limitation in the -term "modification".) +The "Linguistic Resource", below, refers to any such work which has been distributed under these terms. A "work based on the Linguistic Resource" means either the Linguistic Resource or any derivative work under copyright law: that is to say, a work containing the Linguistic Resource or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) -"Legible form" for a linguistic resource means the preferred form of the resource -for making modifications to it. +"Legible form" for a linguistic resource means the preferred form of the resource for making modifications to it. -Activities other than copying, distribution and modification are not covered -by this License; they are outside its scope. The act of running a program -using the Linguistic Resource is not restricted, and output from such a program -is covered only if its contents constitute a work based on the Linguistic -Resource (independent of the use of the Linguistic Resource in a tool for -writing it). Whether that is true depends on what the program that uses the -Linguistic Resource does. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Linguistic Resource is not restricted, and output from such a program is covered only if its contents constitute a work based on the Linguistic Resource (independent of the use of the Linguistic Resource in a tool for writing it). Whether that is true depends on what the program that uses the Linguistic Resource does. -1. You may copy and distribute verbatim copies of the Linguistic Resource -as you receive it, in any medium, provided that you conspicuously and appropriately -publish on each copy an appropriate copyright notice and disclaimer of warranty; -keep intact all the notices that refer to this License and to the absence -of any warranty; and distribute a copy of this License along with the Linguistic -Resource. +1. You may copy and distribute verbatim copies of the Linguistic Resource as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Linguistic Resource. -You may charge a fee for the physical act of transferring a copy, and you -may at your option offer warranty protection in exchange for a fee. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. -2. You may modify your copy or copies of the Linguistic Resource or any portion -of it, thus forming a work based on the Linguistic Resource, and copy and -distribute such modifications or work under the terms of Section 1 above, -provided that you also meet all of these conditions: +2. You may modify your copy or copies of the Linguistic Resource or any portion of it, thus forming a work based on the Linguistic Resource, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - a) The modified work must itself be a linguistic resource. + a) The modified work must itself be a linguistic resource. -b) You must cause the files modified to carry prominent notices stating that -you changed the files and the date of any change. + b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. -c) You must cause the whole of the work to be licensed at no charge to all -third parties under the terms of this License. + c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. -These requirements apply to the modified work as a whole. If identifiable -sections of that work are not derived from the Linguistic Resource, and can -be reasonably considered independent and separate works in themselves, then -this License, and its terms, do not apply to those sections when you distribute -them as separate works. But when you distribute the same sections as part -of a whole which is a work based on the Linguistic Resource, the distribution -of the whole must be on the terms of this License, whose permissions for other -licensees extend to the entire whole, and thus to each and every part regardless -of who wrote it. +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Linguistic Resource, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Linguistic Resource, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. -Thus, it is not the intent of this section to claim rights or contest your -rights to work written entirely by you; rather, the intent is to exercise -the right to control the distribution of derivative or collective works based -on the Linguistic Resource. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Linguistic Resource. -In addition, mere aggregation of another work not based on the Linguistic -Resource with the Linguistic Resource (or with a work based on the Linguistic -Resource) on a volume of a storage or distribution medium does not bring the -other work under the scope of this License. +In addition, mere aggregation of another work not based on the Linguistic Resource with the Linguistic Resource (or with a work based on the Linguistic Resource) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. -3. A program that contains no derivative of any portion of the Linguistic -Resource, but is designed to work with the Linguistic Resource (or an encrypted -form of the Linguistic Resource) by reading it or being compiled or linked -with it, is called a "work that uses the Linguistic Resource". Such a work, -in isolation, is not a derivative work of the Linguistic Resource, and therefore -falls outside the scope of this License. +3. A program that contains no derivative of any portion of the Linguistic Resource, but is designed to work with the Linguistic Resource (or an encrypted form of the Linguistic Resource) by reading it or being compiled or linked with it, is called a "work that uses the Linguistic Resource". Such a work, in isolation, is not a derivative work of the Linguistic Resource, and therefore falls outside the scope of this License. -However, combining a "work that uses the Linguistic Resource" with the Linguistic -Resource (or an encrypted form of the Linguistic Resource) creates a package -that is a derivative of the Linguistic Resource (because it contains portions -of the Linguistic Resource), rather than a "work that uses the Linguistic -Resource". If the package is a derivative of the Linguistic Resource, you -may distribute the package under the terms of Section 4. Any works containing -that package also fall under Section 4. +However, combining a "work that uses the Linguistic Resource" with the Linguistic Resource (or an encrypted form of the Linguistic Resource) creates a package that is a derivative of the Linguistic Resource (because it contains portions of the Linguistic Resource), rather than a "work that uses the Linguistic Resource". If the package is a derivative of the Linguistic Resource, you may distribute the package under the terms of Section 4. Any works containing that package also fall under Section 4. -4. As an exception to the Sections above, you may also combine a "work that -uses the Linguistic Resource" with the Linguistic Resource (or an encrypted -form of the Linguistic Resource) to produce a package containing portions -of the Linguistic Resource, and distribute that package under terms of your -choice, provided that the terms permit modification of the package for the -customer's own use and reverse engineering for debugging such modifications. +4. As an exception to the Sections above, you may also combine a "work that uses the Linguistic Resource" with the Linguistic Resource (or an encrypted form of the Linguistic Resource) to produce a package containing portions of the Linguistic Resource, and distribute that package under terms of your choice, provided that the terms permit modification of the package for the customer's own use and reverse engineering for debugging such modifications. -You must give prominent notice with each copy of the package that the Linguistic -Resource is used in it and that the Linguistic Resource and its use are covered -by this License. You must supply a copy of this License. If the package during -execution displays copyright notices, you must include the copyright notice -for the Linguistic Resource among them, as well as a reference directing the -user to the copy of this License. Also, you must do one of these things: +You must give prominent notice with each copy of the package that the Linguistic Resource is used in it and that the Linguistic Resource and its use are covered by this License. You must supply a copy of this License. If the package during execution displays copyright notices, you must include the copyright notice for the Linguistic Resource among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: -a) Accompany the package with the complete corresponding machine-readable -legible form of the Linguistic Resource including whatever changes were used -in the package (which must be distributed under Sections 1 and 2 above); and, -if the package contains an encrypted form of the Linguistic Resource, with -the complete machine-readable "work that uses the Linguistic Resource", as -object code and/or source code, so that the user can modify the Linguistic -Resource and then encrypt it to produce a modified package containing the -modified Linguistic Resource. + a) Accompany the package with the complete corresponding machine-readable legible form of the Linguistic Resource including whatever changes were used in the package (which must be distributed under Sections 1 and 2 above); and, if the package contains an encrypted form of the Linguistic Resource, with the complete machine-readable "work that uses the Linguistic Resource", as object code and/or source code, so that the user can modify the Linguistic Resource and then encrypt it to produce a modified package containing the modified Linguistic Resource. -b) Use a suitable mechanism for combining with the Linguistic Resource. A -suitable mechanism is one that will operate properly with a modified version -of the Linguistic Resource, if the user installs one, as long as the modified -version is interface-compatible with the version that the package was made -with. + b) Use a suitable mechanism for combining with the Linguistic Resource. A suitable mechanism is one that will operate properly with a modified version of the Linguistic Resource, if the user installs one, as long as the modified version is interface-compatible with the version that the package was made with. -c) Accompany the package with a written offer, valid for at least three years, -to give the same user the materials specified in Subsection 4a, above, for -a charge no more than the cost of performing this distribution. + c) Accompany the package with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 4a, above, for a charge no more than the cost of performing this distribution. -d) If distribution of the package is made by offering access to copy from -a designated place, offer equivalent access to copy the above specified materials -from the same place. + d) If distribution of the package is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. -e) Verify that the user has already received a copy of these materials or -that you have already sent this user a copy. + e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. -If the package includes an encrypted form of the Linguistic Resource, the -required form of the "work that uses the Linguistic Resource" must include -any data and utility programs needed for reproducing the package from it. -However, as a special exception, the materials to be distributed need not -include anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the operating -system on which the executable runs, unless that component itself accompanies -the executable. +If the package includes an encrypted form of the Linguistic Resource, the required form of the "work that uses the Linguistic Resource" must include any data and utility programs needed for reproducing the package from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. -It may happen that this requirement contradicts the license restrictions of -proprietary libraries that do not normally accompany the operating system. -Such a contradiction means you cannot use both them and the Linguistic Resource -together in a package that you distribute. +It may happen that this requirement contradicts the license restrictions of proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Linguistic Resource together in a package that you distribute. -5. You may not copy, modify, sublicense, link with, or distribute the Linguistic -Resource except as expressly provided under this License. Any attempt otherwise -to copy, modify, sublicense, link with, or distribute the Linguistic Resource -is void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under this -License will not have their licenses terminated so long as such parties remain -in full compliance. +5. You may not copy, modify, sublicense, link with, or distribute the Linguistic Resource except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Linguistic Resource is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. -6. You are not required to accept this License, since you have not signed -it. However, nothing else grants you permission to modify or distribute the -Linguistic Resource or its derivative works. These actions are prohibited -by law if you do not accept this License. Therefore, by modifying or distributing -the Linguistic Resource (or any work based on the Linguistic Resource), you -indicate your acceptance of this License to do so, and all its terms and conditions -for copying, distributing or modifying the Linguistic Resource or works based -on it. +6. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Linguistic Resource or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Linguistic Resource (or any work based on the Linguistic Resource), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Linguistic Resource or works based on it. -7. Each time you redistribute the Linguistic Resource (or any work based on -the Linguistic Resource), the recipient automatically receives a license from -the original licensor to copy, distribute, link with or modify the Linguistic -Resource subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. You -are not responsible for enforcing compliance by third parties with this License. +7. Each time you redistribute the Linguistic Resource (or any work based on the Linguistic Resource), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Linguistic Resource subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. -8. If, as a consequence of a court judgment or allegation of patent infringement -or for any other reason (not limited to patent issues), conditions are imposed -on you (whether by court order, agreement or otherwise) that contradict the -conditions of this License, they do not excuse you from the conditions of -this License. If you cannot distribute so as to satisfy simultaneously your -obligations under this License and any other pertinent obligations, then as -a consequence you may not distribute the Linguistic Resource at all. For example, -if a patent license would not permit royalty-free redistribution of the Linguistic -Resource by all those who receive copies directly or indirectly through you, -then the only way you could satisfy both it and this License would be to refrain -entirely from distribution of the Linguistic Resource. +8. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Linguistic Resource at all. For example, if a patent license would not permit royalty-free redistribution of the Linguistic Resource by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Linguistic Resource. -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. -It is not the purpose of this section to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this section has the sole purpose of protecting the integrity of the free -resource distribution system which is implemented by public license practices. -Many people have made generous contributions to the wide range of data distributed -through that system in reliance on consistent application of that system; -it is up to the author/donor to decide if he or she is willing to distribute -resources through any other system and a licensee cannot impose that choice. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free resource distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of data distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute resources through any other system and a licensee cannot impose that choice. -This section is intended to make thoroughly clear what is believed to be a -consequence of the rest of this License. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. -9. If the distribution and/or use of the Linguistic Resource is restricted -in certain countries either by patents or by copyrighted interfaces, the original -copyright holder who places the Linguistic Resource under this License may -add an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus excluded. -In such case, this License incorporates the limitation as if written in the -body of this License. +9. If the distribution and/or use of the Linguistic Resource is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Linguistic Resource under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. -10. The Free Software Foundation may publish revised and/or new versions of -the Lesser General Public License for Linguistic Resources from time to time. -Such new versions will be similar in spirit to the present version, but may -differ in detail to address new problems or concerns. +10. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License for Linguistic Resources from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. -Each version is given a distinguishing version number. If the Linguistic Resource -specifies a version number of this License which applies to it and "any later -version", you have the option of following the terms and conditions either -of that version or of any later version published by the Free Software Foundation. -If the Linguistic Resource does not specify a license version number, you -may choose any version ever published by the Free Software Foundation. +Each version is given a distinguishing version number. If the Linguistic Resource specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Linguistic Resource does not specify a license version number, you may choose any version ever published by the Free Software Foundation. -11. If you wish to incorporate parts of the Linguistic Resource into other -free programs whose distribution conditions are incompatible with these, write -to the author to ask for permission. +11. If you wish to incorporate parts of the Linguistic Resource into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. - NO WARRANTY + NO WARRANTY -12. BECAUSE THE LINGUISTIC RESOURCE IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LINGUISTIC RESOURCE, TO THE EXTENT PERMITTED BY APPLICABLE -LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LINGUISTIC RESOURCE "AS IS" WITHOUT WARRANTY OF -ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LINGUISTIC RESOURCE -IS WITH YOU. SHOULD THE LINGUISTIC RESOURCE PROVE DEFECTIVE, YOU ASSUME THE -COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +12. BECAUSE THE LINGUISTIC RESOURCE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LINGUISTIC RESOURCE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LINGUISTIC RESOURCE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LINGUISTIC RESOURCE IS WITH YOU. SHOULD THE LINGUISTIC RESOURCE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. -13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE LINGUISTIC RESOURCE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE LINGUISTIC RESOURCE (INCLUDING BUT -NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED -BY YOU OR THIRD PARTIES OR A FAILURE OF THE LINGUISTIC RESOURCE TO OPERATE -WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED -OF THE POSSIBILITY OF SUCH DAMAGES. +13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LINGUISTIC RESOURCE AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LINGUISTIC RESOURCE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LINGUISTIC RESOURCE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS diff --git a/options/license/LLVM-exception b/options/license/LLVM-exception index 24357eed7..fa4b725a0 100644 --- a/options/license/LLVM-exception +++ b/options/license/LLVM-exception @@ -1,5 +1,15 @@ -LLVM Exceptions to the Apache 2.0 License +---- LLVM Exceptions to the Apache 2.0 License ---- -As an exception, if, as a result of your compiling your source code, portions of this Software are embedded into an Object form of such source code, you may redistribute such embedded portions in such Object form without complying with the conditions of Sections 4(a), 4(b) and 4(d) of the License. + As an exception, if, as a result of your compiling your source code, portions + of this Software are embedded into an Object form of such source code, you + may redistribute such embedded portions in such Object form without complying + with the conditions of Sections 4(a), 4(b) and 4(d) of the License. -In addition, if you combine or link compiled forms of this Software with software that is licensed under the GPLv2 ("Combined Software") and if a court of competent jurisdiction determines that the patent provision (Section 3), the indemnity provision (Section 9) or other Section of the License conflicts with the conditions of the GPLv2, you may retroactively and prospectively choose to deem waived or otherwise exclude such Section(s) of the License, but only in their entirety and only with respect to the Combined Software. + In addition, if you combine or link compiled forms of this Software with + software that is licensed under the GPLv2 ("Combined Software") and if a + court of competent jurisdiction determines that the patent provision (Section + 3), the indemnity provision (Section 9) or other Section of the License + conflicts with the conditions of the GPLv2, you may retroactively and + prospectively choose to deem waived or otherwise exclude such Section(s) of + the License, but only in their entirety and only with respect to the Combined + Software. diff --git a/options/license/LPL-1.0 b/options/license/LPL-1.0 index 75aed27e7..8546bc2a2 100644 --- a/options/license/LPL-1.0 +++ b/options/license/LPL-1.0 @@ -1,217 +1,81 @@ Lucent Public License Version 1.0 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS PUBLIC LICENSE -("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES -RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - 1. DEFINITIONS +1. DEFINITIONS - "Contribution" means: +"Contribution" means: - a. in the case of (" "), the Original Program, and + a. in the case of (""), the Original Program, and + b. in the case of each Contributor, - b. in the case of each Contributor, + i. changes to the Program, and + ii. additions to the Program; where such changes and/or additions to the Program originate from and are "Contributed" by that particular Contributor. - i. changes to the Program, and + A Contribution is "Contributed" by a Contributor only (i) if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf, and (ii) the Contributor explicitly consents, in accordance with Section 3C, to characterization of the changes and/or additions as Contributions. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program. -ii. additions to the Program; where such changes and/or additions to the Program -originate from and are "Contributed" by that particular Contributor. +"Contributor" means and any other entity that has Contributed a Contribution to the Program. -A Contribution is "Contributed" by a Contributor only (i) if it was added -to the Program by such Contributor itself or anyone acting on such Contributor's -behalf, and (ii) the Contributor explicitly consents, in accordance with Section -3C, to characterization of the changes and/or additions as Contributions. -Contributions do not include additions to the Program which: (i) are separate -modules of software distributed in conjunction with the Program under their -own license agreement, and (ii) are not derivative works of the Program. +"Distributor" means a Recipient that distributes the Program, modifications to the Program, or any part thereof. -"Contributor" means and any other entity that has Contributed a Contribution -to the Program. +"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. -"Distributor" means a Recipient that distributes the Program, modifications -to the Program, or any part thereof. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Original Program" means the original version of the software accompanying -this Agreement as released by , including source code, object code -and documentation, if any. +"Original Program" means the original version of the software accompanying this Agreement as released by , including source code, object code and documentation, if any. "Program" means the Original Program and Contributions or any part thereof -"Recipient" means anyone who receives the Program under this Agreement, including -all Contributors. +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - 2. GRANT OF RIGHTS +2. GRANT OF RIGHTS -a. Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, -prepare derivative works of, publicly display, publicly perform, distribute -and sublicense the Contribution of such Contributor, if any, and such derivative -works, in source code and object code form. + a. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b. Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -The patent license granted by a Contributor shall also apply to the combination -of the Contribution of that Contributor and the Program if, at the time the -Contribution is added by the Contributor, such addition of the Contribution -causes such combination to be covered by the Licensed Patents. The patent -license granted by a Contributor shall not apply to (i) any other combinations -which include the Contribution, nor to (ii) Contributions of other Contributors. -No hardware per se is licensed hereunder. + b. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. The patent license granted by a Contributor shall also apply to the combination of the Contribution of that Contributor and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license granted by a Contributor shall not apply to (i) any other combinations which include the Contribution, nor to (ii) Contributions of other Contributors. No hardware per se is licensed hereunder. -c. Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program. + c. Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d. Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth -in this Agreement. + d. Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - 3. REQUIREMENTS +3. REQUIREMENTS -A. Distributor may choose to distribute the Program in any form under this -Agreement or under its own license agreement, provided that: + A. Distributor may choose to distribute the Program in any form under this Agreement or under its own license agreement, provided that: - 1. it complies with the terms and conditions of this Agreement; + 1. it complies with the terms and conditions of this Agreement; + 2. if the Program is distributed in source code or other tangible form, a copy of this Agreement or Distributor's own license agreement is included with each copy of the Program; and + 3. if distributed under Distributor's own license agreement, such license agreement: -2. if the Program is distributed in source code or other tangible form, a -copy of this Agreement or Distributor's own license agreement is included -with each copy of the Program; and + a. effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + b. effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; and + c. states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party. -3. if distributed under Distributor's own license agreement, such license -agreement: + B. Each Distributor must include the following in a conspicuous location in the Program: -a. effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; + Copyright (C) , and others. All Rights Reserved. -b. effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, -such as lost profits; and + C. In addition, each Contributor must identify itself as the originator of its Contribution, if any, and indicate its consent to characterization of its additions and/or changes as a Contribution, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. Once consent is granted, it may not thereafter be revoked. -c. states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party. +4. COMMERCIAL DISTRIBUTION -B. Each Distributor must include the following in a conspicuous location in -the Program: +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Distributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for Contributors. Therefore, if a Distributor includes the Program in a commercial product offering, such Distributor ("Commercial Distributor") hereby agrees to defend and indemnify every Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Distributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Distributor in writing of such claim, and b) allow the Commercial Distributor to control, and cooperate with the Commercial Distributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. - Copyright (C) , and others. All Rights Reserved. +For example, a Distributor might include the Program in a commercial product offering, Product X. That Distributor is then a Commercial Distributor. If that Commercial Distributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Distributor's responsibility alone. Under this section, the Commercial Distributor would have to defend claims against the Contributors related to those performance claims and warranties, and if a court requires any Contributor to pay any damages as a result, the Commercial Distributor must pay those damages. -C. In addition, each Contributor must identify itself as the originator of -its Contribution, if any, and indicate its consent to characterization of -its additions and/or changes as a Contribution, in a manner that reasonably -allows subsequent Recipients to identify the originator of the Contribution. -Once consent is granted, it may not thereafter be revoked. +5. NO WARRANTY - 4. COMMERCIAL DISTRIBUTION +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Distributor -who includes the Program in a commercial product offering should do so in -a manner which does not create potential liability for Contributors. Therefore, -if a Distributor includes the Program in a commercial product offering, such -Distributor ("Commercial Distributor") hereby agrees to defend and indemnify -every Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor -to the extent caused by the acts or omissions of such Commercial Distributor -in connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Distributor in writing of such claim, and b) allow the Commercial Distributor -to control, and cooperate with the Commercial Distributor in, the defense -and any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense. +6. DISCLAIMER OF LIABILITY -For example, a Distributor might include the Program in a commercial product -offering, Product X. That Distributor is then a Commercial Distributor. If -that Commercial Distributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such Commercial -Distributor's responsibility alone. Under this section, the Commercial Distributor -would have to defend claims against the Contributors related to those performance -claims and warranties, and if a court requires any Contributor to pay any -damages as a result, the Commercial Distributor must pay those damages. +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 5. NO WARRANTY +7. GENERAL -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON -AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS -OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -Each Recipient is solely responsible for determining the appropriateness of -using and distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement, including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage -to or loss of data, programs or equipment, and unavailability or interruption -of operations. +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - 6. DISCLAIMER OF LIABILITY +If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - 7. GENERAL + may publish new versions (including revisions) of this Agreement from time to time. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. No one other than has the right to modify this Agreement. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this Agreement, and without further action by the parties hereto, -such provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect -to a patent applicable to software (including a cross-claim or counterclaim -in a lawsuit), then any patent licenses granted by that Contributor to such -Recipient under this Agreement shall terminate as of the date such litigation -is filed. In addition, if Recipient institutes patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging that -the Program itself (excluding combinations of the Program with other software -or hardware) infringes such Recipient's patent(s), then such Recipient's rights -granted under Section 2(b) shall terminate as of the date such litigation -is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and -does not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as reasonably -practicable. However, Recipient's obligations under this Agreement and any -licenses granted by Recipient relating to the Program shall continue and survive. - - may publish new versions (including revisions) of this Agreement from -time to time. Each new version of the Agreement will be given a distinguishing -version number. The Program (including Contributions) may always be distributed -subject to the version of the Agreement under which it was received. In addition, -after a new version of the Agreement is published, Contributor may elect to -distribute the Program (including its Contributions) under the new version. -No one other than has the right to modify this Agreement. Except as -expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights -or licenses to the intellectual property of any Contributor under this Agreement, -whether expressly, by implication, estoppel or otherwise. All rights in the -Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of and the intellectual -property laws of the United States of America. No party to this Agreement -will bring a legal action under this Agreement more than one year after the -cause of action arose. Each party waives its rights to a jury trial in any -resulting litigation. +This Agreement is governed by the laws of the State of and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/options/license/LPL-1.02 b/options/license/LPL-1.02 index 7ba3bc969..4b3bbf7f1 100644 --- a/options/license/LPL-1.02 +++ b/options/license/LPL-1.02 @@ -1,220 +1,85 @@ Lucent Public License Version 1.02 -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS PUBLIC LICENSE -("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES -RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - 1. DEFINITIONS +1. DEFINITIONS - "Contribution" means: +"Contribution" means: -a. in the case of Lucent Technologies Inc. ("LUCENT"), the Original Program, -and + a. in the case of Lucent Technologies Inc. ("LUCENT"), the Original Program, and + b. in the case of each Contributor, - b. in the case of each Contributor, + i. changes to the Program, and + ii. additions to the Program; - i. changes to the Program, and + where such changes and/or additions to the Program were added to the Program by such Contributor itself or anyone acting on such Contributor's behalf, and the Contributor explicitly consents, in accordance with Section 3C, to characterization of the changes and/or additions as Contributions. - ii. additions to the Program; +"Contributor" means LUCENT and any other entity that has Contributed a Contribution to the Program. -where such changes and/or additions to the Program were added to the Program -by such Contributor itself or anyone acting on such Contributor's behalf, -and the Contributor explicitly consents, in accordance with Section 3C, to -characterization of the changes and/or additions as Contributions. +"Distributor" means a Recipient that distributes the Program, modifications to the Program, or any part thereof. -"Contributor" means LUCENT and any other entity that has Contributed a Contribution -to the Program. +"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. -"Distributor" means a Recipient that distributes the Program, modifications -to the Program, or any part thereof. - -"Licensed Patents" mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Original Program" means the original version of the software accompanying -this Agreement as released by LUCENT, including source code, object code and -documentation, if any. +"Original Program" means the original version of the software accompanying this Agreement as released by LUCENT, including source code, object code and documentation, if any. "Program" means the Original Program and Contributions or any part thereof -"Recipient" means anyone who receives the Program under this Agreement, including -all Contributors. +"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. - 2. GRANT OF RIGHTS +2. GRANT OF RIGHTS -a. Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, -prepare derivative works of, publicly display, publicly perform, distribute -and sublicense the Contribution of such Contributor, if any, and such derivative -works, in source code and object code form. + a. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form. -b. Subject to the terms of this Agreement, each Contributor hereby grants -Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed -Patents to make, use, sell, offer to sell, import and otherwise transfer the -Contribution of such Contributor, if any, in source code and object code form. -The patent license granted by a Contributor shall also apply to the combination -of the Contribution of that Contributor and the Program if, at the time the -Contribution is added by the Contributor, such addition of the Contribution -causes such combination to be covered by the Licensed Patents. The patent -license granted by a Contributor shall not apply to (i) any other combinations -which include the Contribution, nor to (ii) Contributions of other Contributors. -No hardware per se is licensed hereunder. + b. Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. The patent license granted by a Contributor shall also apply to the combination of the Contribution of that Contributor and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license granted by a Contributor shall not apply to (i) any other combinations which include the Contribution, nor to (ii) Contributions of other Contributors. No hardware per se is licensed hereunder. -c. Recipient understands that although each Contributor grants the licenses -to its Contributions set forth herein, no assurances are provided by any Contributor -that the Program does not infringe the patent or other intellectual property -rights of any other entity. Each Contributor disclaims any liability to Recipient -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, each Recipient hereby assumes sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow Recipient to distribute -the Program, it is Recipient's responsibility to acquire that license before -distributing the Program. + c. Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. -d. Each Contributor represents that to its knowledge it has sufficient copyright -rights in its Contribution, if any, to grant the copyright license set forth -in this Agreement. + d. Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. - 3. REQUIREMENTS +3. REQUIREMENTS -A. Distributor may choose to distribute the Program in any form under this -Agreement or under its own license agreement, provided that: + A. Distributor may choose to distribute the Program in any form under this Agreement or under its own license agreement, provided that: - 1. it complies with the terms and conditions of this Agreement; + 1. it complies with the terms and conditions of this Agreement; + 2. if the Program is distributed in source code or other tangible form, a copy of this Agreement or Distributor's own license agreement is included with each copy of the Program; and + 3. if distributed under Distributor's own license agreement, such license agreement: -2. if the Program is distributed in source code or other tangible form, a -copy of this Agreement or Distributor's own license agreement is included -with each copy of the Program; and + a. effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; + b. effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; and + c. states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party. -3. if distributed under Distributor's own license agreement, such license -agreement: + B. Each Distributor must include the following in a conspicuous location in the Program: -a. effectively disclaims on behalf of all Contributors all warranties and -conditions, express and implied, including warranties or conditions of title -and non-infringement, and implied warranties or conditions of merchantability -and fitness for a particular purpose; + Copyright (C) 2003, Lucent Technologies Inc. and others. All Rights Reserved. -b. effectively excludes on behalf of all Contributors all liability for damages, -including direct, indirect, special, incidental and consequential damages, -such as lost profits; and + C. In addition, each Contributor must identify itself as the originator of its Contribution in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution. Also, each Contributor must agree that the additions and/or changes are intended to be a Contribution. Once a Contribution is contributed, it may not thereafter be revoked. -c. states that any provisions which differ from this Agreement are offered -by that Contributor alone and not by any other party. +4. COMMERCIAL DISTRIBUTION -B. Each Distributor must include the following in a conspicuous location in -the Program: +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Distributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for Contributors. Therefore, if a Distributor includes the Program in a commercial product offering, such Distributor ("Commercial Distributor") hereby agrees to defend and indemnify every Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Distributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Distributor in writing of such claim, and b) allow the Commercial Distributor to control, and cooperate with the Commercial Distributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. -Copyright (C) 2003, Lucent Technologies Inc. and others. All Rights Reserved. +For example, a Distributor might include the Program in a commercial product offering, Product X. That Distributor is then a Commercial Distributor. If that Commercial Distributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Distributor's responsibility alone. Under this section, the Commercial Distributor would have to defend claims against the Contributors related to those performance claims and warranties, and if a court requires any Contributor to pay any damages as a result, the Commercial Distributor must pay those damages. -C. In addition, each Contributor must identify itself as the originator of -its Contribution in a manner that reasonably allows subsequent Recipients -to identify the originator of the Contribution. Also, each Contributor must -agree that the additions and/or changes are intended to be a Contribution. -Once a Contribution is contributed, it may not thereafter be revoked. +5. NO WARRANTY - 4. COMMERCIAL DISTRIBUTION +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. -Commercial distributors of software may accept certain responsibilities with -respect to end users, business partners and the like. While this license is -intended to facilitate the commercial use of the Program, the Distributor -who includes the Program in a commercial product offering should do so in -a manner which does not create potential liability for Contributors. Therefore, -if a Distributor includes the Program in a commercial product offering, such -Distributor ("Commercial Distributor") hereby agrees to defend and indemnify -every Contributor ("Indemnified Contributor") against any losses, damages -and costs (collectively "Losses") arising from claims, lawsuits and other -legal actions brought by a third party against the Indemnified Contributor -to the extent caused by the acts or omissions of such Commercial Distributor -in connection with its distribution of the Program in a commercial product -offering. The obligations in this section do not apply to any claims or Losses -relating to any actual or alleged intellectual property infringement. In order -to qualify, an Indemnified Contributor must: a) promptly notify the Commercial -Distributor in writing of such claim, and b) allow the Commercial Distributor -to control, and cooperate with the Commercial Distributor in, the defense -and any related settlement negotiations. The Indemnified Contributor may participate -in any such claim at its own expense. +6. DISCLAIMER OF LIABILITY -For example, a Distributor might include the Program in a commercial product -offering, Product X. That Distributor is then a Commercial Distributor. If -that Commercial Distributor then makes performance claims, or offers warranties -related to Product X, those performance claims and warranties are such Commercial -Distributor's responsibility alone. Under this section, the Commercial Distributor -would have to defend claims against the Contributors related to those performance -claims and warranties, and if a court requires any Contributor to pay any -damages as a result, the Commercial Distributor must pay those damages. +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 5. NO WARRANTY +7. EXPORT CONTROL -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON -AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS -OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF -TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -Each Recipient is solely responsible for determining the appropriateness of -using and distributing the Program and assumes all risks associated with its -exercise of rights under this Agreement, including but not limited to the -risks and costs of program errors, compliance with applicable laws, damage -to or loss of data, programs or equipment, and unavailability or interruption -of operations. +Recipient agrees that Recipient alone is responsible for compliance with the United States export administration regulations (and the export control laws and regulation of any other countries). - 6. DISCLAIMER OF LIABILITY +8. GENERAL -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY -CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION -LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS -GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. - 7. EXPORT CONTROL +If Recipient institutes patent litigation against a Contributor with respect to a patent applicable to software (including a cross-claim or counterclaim in a lawsuit), then any patent licenses granted by that Contributor to such Recipient under this Agreement shall terminate as of the date such litigation is filed. In addition, if Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. -Recipient agrees that Recipient alone is responsible for compliance with the -United States export administration regulations (and the export control laws -and regulation of any other countries). +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. - 8. GENERAL +LUCENT may publish new versions (including revisions) of this Agreement from time to time. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. No one other than LUCENT has the right to modify this Agreement. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. -If any provision of this Agreement is invalid or unenforceable under applicable -law, it shall not affect the validity or enforceability of the remainder of -the terms of this Agreement, and without further action by the parties hereto, -such provision shall be reformed to the minimum extent necessary to make such -provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with respect -to a patent applicable to software (including a cross-claim or counterclaim -in a lawsuit), then any patent licenses granted by that Contributor to such -Recipient under this Agreement shall terminate as of the date such litigation -is filed. In addition, if Recipient institutes patent litigation against any -entity (including a cross-claim or counterclaim in a lawsuit) alleging that -the Program itself (excluding combinations of the Program with other software -or hardware) infringes such Recipient's patent(s), then such Recipient's rights -granted under Section 2(b) shall terminate as of the date such litigation -is filed. - -All Recipient's rights under this Agreement shall terminate if it fails to -comply with any of the material terms or conditions of this Agreement and -does not cure such failure in a reasonable period of time after becoming aware -of such noncompliance. If all Recipient's rights under this Agreement terminate, -Recipient agrees to cease use and distribution of the Program as soon as reasonably -practicable. However, Recipient's obligations under this Agreement and any -licenses granted by Recipient relating to the Program shall continue and survive. - -LUCENT may publish new versions (including revisions) of this Agreement from -time to time. Each new version of the Agreement will be given a distinguishing -version number. The Program (including Contributions) may always be distributed -subject to the version of the Agreement under which it was received. In addition, -after a new version of the Agreement is published, Contributor may elect to -distribute the Program (including its Contributions) under the new version. -No one other than LUCENT has the right to modify this Agreement. Except as -expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights -or licenses to the intellectual property of any Contributor under this Agreement, -whether expressly, by implication, estoppel or otherwise. All rights in the -Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the intellectual -property laws of the United States of America. No party to this Agreement -will bring a legal action under this Agreement more than one year after the -cause of action arose. Each party waives its rights to a jury trial in any -resulting litigation. +This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. diff --git a/options/license/LPPL-1.0 b/options/license/LPPL-1.0 index 458f89e86..1472b174e 100644 --- a/options/license/LPPL-1.0 +++ b/options/license/LPPL-1.0 @@ -1,197 +1,103 @@ LaTeX Project Public License -LPPL Version 1.0 1999-03-01 Copyright 1999 LaTeX3 Project +LPPL Version 1.0 1999-03-01 -Everyone is permitted to copy and distribute verbatim copies of this license -document, but modification is not allowed. +Copyright 1999 LaTeX3 Project + +Everyone is permitted to copy and distribute verbatim copies of this license document, but modification is not allowed. Preamble -The LaTeX Project Public License (LPPL) is the license under which the base -LaTeX distribution is distributed. As described below you may use this licence -for any software that you wish to distribute. +The LaTeX Project Public License (LPPL) is the license under which the base LaTeX distribution is distributed. As described below you may use this licence for any software that you wish to distribute. -It may be particularly suitable if your software is TeX related (such as a -LaTeX package file) but it may be used for any software, even if it is unrelated -to TeX. +It may be particularly suitable if your software is TeX related (such as a LaTeX package file) but it may be used for any software, even if it is unrelated to TeX. -To use this license, the files of your distribution should have an explicit -copyright notice giving your name and the year, together with a reference -to this license. +To use this license, the files of your distribution should have an explicit copyright notice giving your name and the year, together with a reference to this license. A typical example would be -%% pig.sty + %% pig.sty %% Copyright 2001 M. Y. Name -%% Copyright 2001 M. Y. Name + % This program can redistributed and/or modified under the terms + % of the LaTeX Project Public License Distributed from CTAN + % archives in directory macros/latex/base/lppl.txt; either + % version 1 of the License, or (at your option) any later version. -% This program can redistributed and/or modified under the terms +Given such a notice in the file, the conditions of this document would apply, with: -% of the LaTeX Project Public License Distributed from CTAN +`The Program' referring to the software `pig.sty' and `The Copyright Holder' referring to the person `M. Y. Name'. -% archives in directory macros/latex/base/lppl.txt; either +To see a real example, see the file legal.txt which carries the copyright notice for the base latex distribution. -% version 1 of the License, or (at your option) any later version. +This license gives terms under which files of The Program may be distributed and modified. Individual files may have specific further constraints on modification, but no file should have restrictions on distribution other than those specified below. -Given such a notice in the file, the conditions of this document would apply, -with: - -`The Program' referring to the software `pig.sty' and `The Copyright Holder' -referring to the person `M. Y. Name'. - -To see a real example, see the file legal.txt which carries the copyright -notice for the base latex distribution. - -This license gives terms under which files of The Program may be distributed -and modified. Individual files may have specific further constraints on modification, -but no file should have restrictions on distribution other than those specified -below. - -This is to ensure that a distributor wishing to distribute a complete unmodified -copy of The Program need only check the conditions in this file, and does -not need to check every file in The Program for extra restrictions. If you -do need to modify the distribution terms of some files, do not refer to this -license, instead distribute The Program under a different license. You may -use the parts of the text of LPPL as a model for your own license, but your -license should not directly refer to the LPPL or otherwise give the impression -that The Program is distributed under the LPPL. - -The LaTeX Project Public License +This is to ensure that a distributor wishing to distribute a complete unmodified copy of The Program need only check the conditions in this file, and does not need to check every file in The Program for extra restrictions. If you do need to modify the distribution terms of some files, do not refer to this license, instead distribute The Program under a different license. You may use the parts of the text of LPPL as a model for your own license, but your license should not directly refer to the LPPL or otherwise give the impression that The Program is distributed under the LPPL. + The LaTeX Project Public License ================================ - Terms And Conditions For Copying, Distribution And Modification - =============================================================== -WARRANTY +WARRANTY ======== -There is no warranty for The Program, to the extent permitted by applicable -law. Except when otherwise stated in writing, The Copyright Holder provides -The Program `as is' without warranty of any kind, either expressed or implied, -including, but not limited to, the implied warranties of merchantability and -fitness for a particular purpose. The entire risk as to the quality and performance -of the program is with you. Should The Program prove defective, you assume -the cost of all necessary servicing, repair or correction. +There is no warranty for The Program, to the extent permitted by applicable law. Except when otherwise stated in writing, The Copyright Holder provides The Program `as is' without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the program is with you. Should The Program prove defective, you assume the cost of all necessary servicing, repair or correction. + +In no event unless required by applicable law or agreed to in writing will The Copyright Holder, or any of the individual authors named in the source for The Program, be liable to you for damages, including any general, special, incidental or consequential damages arising out of any use of The Program or out of inability to use The Program (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or by third parties as a result of a failure of The Program to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages. -In no event unless required by applicable law or agreed to in writing will -The Copyright Holder, or any of the individual authors named in the source -for The Program, be liable to you for damages, including any general, special, -incidental or consequential damages arising out of any use of The Program -or out of inability to use The Program (including but not limited to loss -of data or data being rendered inaccurate or losses sustained by you or by -third parties as a result of a failure of The Program to operate with any -other programs), even if such holder or other party has been advised of the -possibility of such damages. DISTRIBUTION - ============ -Redistribution of unchanged files is allowed provided that all files that -make up the distribution of The Program are distributed. In particular this -means that The Program has to be distributed including its documentation if -documentation was part of the original distribution. +Redistribution of unchanged files is allowed provided that all files that make up the distribution of The Program are distributed. In particular this means that The Program has to be distributed including its documentation if documentation was part of the original distribution. -The distribution of The Program will contain a prominent file listing all -the files covered by this license. +The distribution of The Program will contain a prominent file listing all the files covered by this license. If you receive only some of these files from someone, complain! -The distribution of changed versions of certain files included in the The -Program, and the reuse of code from The Program, are allowed under the following -restrictions: +The distribution of changed versions of certain files included in the The Program, and the reuse of code from The Program, are allowed under the following restrictions: -* It is allowed only if the legal notice in the file does not expressly forbid -it. See note below, under "Conditions on individual files". + * It is allowed only if the legal notice in the file does not expressly forbid it. See note below, under "Conditions on individual files". -* You rename the file before you make any changes to it, unless the file explicitly -says that renaming is not required. Any such changed files must be distributed -under a license that forbids distribution of those files, and any files derived -from them, under the names used by the original files in the distribution -of The Program. + * You rename the file before you make any changes to it, unless the file explicitly says that renaming is not required. Any such changed files must be distributed under a license that forbids distribution of those files, and any files derived from them, under the names used by the original files in the distribution of The Program. -* You change any `identification string' in The Program to clearly indicate -that the file is not part of the standard system. + * You change any `identification string' in The Program to clearly indicate that the file is not part of the standard system. -* If The Program includes an `error report address' so that errors may be -reported to The Copyright Holder, or other specified addresses, this address -must be changed in any modified versions of The Program, so that reports for -files not maintained by the original program maintainers are directed to the -maintainers of the changed files. + * If The Program includes an `error report address' so that errors may be reported to The Copyright Holder, or other specified addresses, this address must be changed in any modified versions of The Program, so that reports for files not maintained by the original program maintainers are directed to the maintainers of the changed files. -* You acknowledge the source and authorship of the original version in the -modified file. + * You acknowledge the source and authorship of the original version in the modified file. -* You also distribute the unmodified version of the file or alternatively -provide sufficient information so that the user of your modified file can -be reasonably expected to be able to obtain an original, unmodified copy of -The Program. For example, you may specify a URL to a site that you expect -will freely provide the user with a copy of The Program (either the version -on which your modification is based, or perhaps a later version). + * You also distribute the unmodified version of the file or alternatively provide sufficient information so that the user of your modified file can be reasonably expected to be able to obtain an original, unmodified copy of The Program. For example, you may specify a URL to a site that you expect will freely provide the user with a copy of The Program (either the version on which your modification is based, or perhaps a later version). -* If The Program is intended to be used with, or is based on, LaTeX, then -files with the following file extensions which have special meaning in LaTeX -Software, have special modification rules under the license: + * If The Program is intended to be used with, or is based on, LaTeX, then files with the following file extensions which have special meaning in LaTeX Software, have special modification rules under the license: -- Files with extension `.ins' (installation files): these files may not be -modified at all because they contain the legal notices that are placed in -the generated files. + - Files with extension `.ins' (installation files): these files may not be modified at all because they contain the legal notices that are placed in the generated files. -- Files with extension `.fd' (LaTeX font definitions files): these files are -allowed to be modified without changing the name, but only to enable use of -all available fonts and to prevent attempts to access unavailable fonts. However, -modified files are not allowed to be distributed in place of original files. + - Files with extension `.fd' (LaTeX font definitions files): these files are allowed to be modified without changing the name, but only to enable use of all available fonts and to prevent attempts to access unavailable fonts. However, modified files are not allowed to be distributed in place of original files. -- Files with extension `.cfg' (configuration files): these files can be created -or modified to enable easy configuration of the system. The documentation -in cfgguide.tex in the base LaTeX distribution describes when it makes sense -to modify or generate such files. + - Files with extension `.cfg' (configuration files): these files can be created or modified to enable easy configuration of the system. The documentation in cfgguide.tex in the base LaTeX distribution describes when it makes sense to modify or generate such files. -The above restrictions are not intended to prohibit, and hence do not apply -to, the updating, by any method, of a file so that it becomes identical to -the latest version of that file in The Program. +The above restrictions are not intended to prohibit, and hence do not apply to, the updating, by any method, of a file so that it becomes identical to the latest version of that file in The Program. ======================================================================== NOTES - ===== -We believe that these requirements give you the freedom you to make modifications -that conform with whatever technical specifications you wish, whilst maintaining -the availability, integrity and reliability of The Program. If you do not -see how to achieve your goal whilst adhering to these requirements then read -the document cfgguide.tex in the base LaTeX distribution for suggestions. +We believe that these requirements give you the freedom you to make modifications that conform with whatever technical specifications you wish, whilst maintaining the availability, integrity and reliability of The Program. If you do not see how to achieve your goal whilst adhering to these requirements then read the document cfgguide.tex in the base LaTeX distribution for suggestions. -Because of the portability and exchangeability aspects of systems like LaTeX, -The LaTeX3 Project deprecates the distribution of non-standard versions of -components of LaTeX or of generally available contributed code for them but -such distributions are permitted under the above restrictions. +Because of the portability and exchangeability aspects of systems like LaTeX, The LaTeX3 Project deprecates the distribution of non-standard versions of components of LaTeX or of generally available contributed code for them but such distributions are permitted under the above restrictions. -The document modguide.tex in the base LaTeX distribution details the reasons -for the legal requirements detailed above. Even if The Program is unrelated -to LaTeX, the argument in modguide.tex may still apply, and should be read -before a modified version of The Program is distributed. +The document modguide.tex in the base LaTeX distribution details the reasons for the legal requirements detailed above. Even if The Program is unrelated to LaTeX, the argument in modguide.tex may still apply, and should be read before a modified version of The Program is distributed. Conditions on individual files - ============================== -The individual files may bear additional conditions which supersede the general -conditions on distribution and modification contained in this file. If there -are any such files, the distribution of The Program will contain a prominent -file that lists all the exceptional files. +The individual files may bear additional conditions which supersede the general conditions on distribution and modification contained in this file. If there are any such files, the distribution of The Program will contain a prominent file that lists all the exceptional files. -Typical examples of files with more restrictive modification conditions would -be files that contain the text of copyright notices. +Typical examples of files with more restrictive modification conditions would be files that contain the text of copyright notices. -* The conditions on individual files differ only in the extent of *modification* -that is allowed. + * The conditions on individual files differ only in the extent of *modification* that is allowed. -* The conditions on *distribution* are the same for all the files. Thus a -(re)distributor of a complete, unchanged copy of The Program need meet only -the conditions in this file; it is not necessary to check the header of every -file in the distribution to check that a distribution meets these requirements. + * The conditions on *distribution* are the same for all the files. Thus a (re)distributor of a complete, unchanged copy of The Program need meet only the conditions in this file; it is not necessary to check the header of every file in the distribution to check that a distribution meets these requirements. diff --git a/options/license/LPPL-1.1 b/options/license/LPPL-1.1 index 0f408cb95..010fdd531 100644 --- a/options/license/LPPL-1.1 +++ b/options/license/LPPL-1.1 @@ -1,302 +1,141 @@ The LaTeX Project Public License - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -LPPL Version 1.1 1999-07-10 Copyright 1999 LaTeX3 Project +LPPL Version 1.1 1999-07-10 -Everyone is allowed to distribute verbatim copies of this license document, -but modification of it is not allowed. +Copyright 1999 LaTeX3 Project + +Everyone is allowed to distribute verbatim copies of this license document, but modification of it is not allowed. PREAMBLE - ======== -The LaTeX Project Public License (LPPL) is the license under which the base -LaTeX distribution is distributed. +The LaTeX Project Public License (LPPL) is the license under which the base LaTeX distribution is distributed. -You may use this license for any program that you have written and wish to -distribute. This license may be particularly suitable if your program is TeX-related -(such as a LaTeX package), but you may use it even if your program is unrelated -to TeX. The section `WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE', -below, gives instructions, examples, and recommendations for authors who are -considering distributing their programs under this license. +You may use this license for any program that you have written and wish to distribute. This license may be particularly suitable if your program is TeX-related (such as a LaTeX package), but you may use it even if your program is unrelated to TeX. The section `WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE', below, gives instructions, examples, and recommendations for authors who are considering distributing their programs under this license. -In this license document, `The Program' refers to any program distributed -under this license. +In this license document, `The Program' refers to any program distributed under this license. -This license gives conditions under which The Program may be distributed and -conditions under which modified versions of The Program may be distributed. -Individual files of The Program may bear supplementary and/or superseding -conditions on modification of themselves and on the distribution of modified -versions of themselves, but *no* file of The Program may bear supplementary -or superseding conditions on the distribution of an unmodified copy of the -file. A distributor wishing to distribute a complete, unmodified copy of The -Program therefore needs to check the conditions only in this license and nowhere -else. +This license gives conditions under which The Program may be distributed and conditions under which modified versions of The Program may be distributed. Individual files of The Program may bear supplementary and/or superseding conditions on modification of themselves and on the distribution of modified versions of themselves, but *no* file of The Program may bear supplementary or superseding conditions on the distribution of an unmodified copy of the file. A distributor wishing to distribute a complete, unmodified copy of The Program therefore needs to check the conditions only in this license and nowhere else. -Activities other than distribution and/or modification of The Program are -not covered by this license; they are outside its scope. In particular, the -act of running The Program is not restricted. +Activities other than distribution and/or modification of The Program are not covered by this license; they are outside its scope. In particular, the act of running The Program is not restricted. -We, the LaTeX3 Project, believe that the conditions below give you the freedom -to make and distribute modified versions of The Program that conform with -whatever technical specifications you wish while maintaining the availability, -integrity, and reliability of The Program. If you do not see how to achieve -your goal while meeting these conditions, then read the document `cfgguide.tex' -in the base LaTeX distribution for suggestions. +We, the LaTeX3 Project, believe that the conditions below give you the freedom to make and distribute modified versions of The Program that conform with whatever technical specifications you wish while maintaining the availability, integrity, and reliability of The Program. If you do not see how to achieve your goal while meeting these conditions, then read the document `cfgguide.tex' in the base LaTeX distribution for suggestions. CONDITIONS ON DISTRIBUTION AND MODIFICATION - =========================================== -You may distribute a complete, unmodified copy of The Program. Distribution -of only part of The Program is not allowed. +You may distribute a complete, unmodified copy of The Program. Distribution of only part of The Program is not allowed. -You may not modify in any way a file of The Program that bears a legal notice -forbidding modification of that file. +You may not modify in any way a file of The Program that bears a legal notice forbidding modification of that file. -You may distribute a modified file of The Program if, and only if, the following -eight conditions are met: +You may distribute a modified file of The Program if, and only if, the following eight conditions are met: -1. You must meet any additional conditions borne by the file on the distribution -of a modified version of the file as described below in the subsection `Additional -Conditions on Individual Files of The Program'. + 1. You must meet any additional conditions borne by the file on the distribution of a modified version of the file as described below in the subsection `Additional Conditions on Individual Files of The Program'. -2. If the file is a LaTeX software file, then you must meet any applicable -additional conditions on the distribution of a modified version of the file -that are described below in the subsection `Additional Conditions on LaTeX -Software Files'. + 2. If the file is a LaTeX software file, then you must meet any applicable additional conditions on the distribution of a modified version of the file that are described below in the subsection `Additional Conditions on LaTeX Software Files'. -3. You must not distribute the modified file with the filename of the original -file. + 3. You must not distribute the modified file with the filename of the original file. -4. In the modified file, you must acknowledge the authorship and name of the -original file, and the name (if any) of the program which contains it. + 4. In the modified file, you must acknowledge the authorship and name of the original file, and the name (if any) of the program which contains it. -5. You must change any identification string in the file to indicate clearly -that the modified file is not part of The Program. + 5. You must change any identification string in the file to indicate clearly that the modified file is not part of The Program. -6. You must change any addresses in the modified file for the reporting of -errors in the file or in The Program generally to ensure that reports for -files no longer maintained by the original maintainers will be directed to -the maintainers of the modified files. + 6. You must change any addresses in the modified file for the reporting of errors in the file or in The Program generally to ensure that reports for files no longer maintained by the original maintainers will be directed to the maintainers of the modified files. -7. You must distribute the modified file under a license that forbids distribution -both of the modified file and of any files derived from the modified file -with the filename of the original file. + 7. You must distribute the modified file under a license that forbids distribution both of the modified file and of any files derived from the modified file with the filename of the original file. - 8. You must do either (A) or (B): + 8. You must do either (A) or (B): -(A) distribute a copy of The Program (that is, a complete, unmodified copy -of The Program) together with the modified file; if your distribution of the -modified file is made by offering access to copy the modified file from a -designated place, then offering equivalent access to copy The Program from -the same place meets this condition, even though third parties are not compelled -to copy The Program along with the modified file; + (A) distribute a copy of The Program (that is, a complete, unmodified copy of The Program) together with the modified file; if your distribution of the modified file is made by offering access to copy the modified file from a designated place, then offering equivalent access to copy The Program from the same place meets this condition, even though third parties are not compelled to copy The Program along with the modified file; -(B) provide to those who receive the modified file information that is sufficient -for them to obtain a copy of The Program; for example, you may provide a Uniform -Resource Locator (URL) for a site that you expect will provide them with a -copy of The Program free of charge (either the version from which your modification -is derived, or perhaps a later version). + (B) provide to those who receive the modified file information that is sufficient for them to obtain a copy of The Program; for example, you may provide a Uniform Resource Locator (URL) for a site that you expect will provide them with a copy of The Program free of charge (either the version from which your modification is derived, or perhaps a later version). -Note that in the above, `distribution' of a file means making the file available -to others by any means. This includes, for instance, installing the file on -any machine in such a way that the file is accessible by users other than -yourself. `Modification' of a file means any procedure that produces a derivative -file under any applicable law -- that is, a file containing the original file -or a significant portion of it, either verbatim or with modifications and/or -translated into another language. +Note that in the above, `distribution' of a file means making the file available to others by any means. This includes, for instance, installing the file on any machine in such a way that the file is accessible by users other than yourself. `Modification' of a file means any procedure that produces a derivative file under any applicable law -- that is, a file containing the original file or a significant portion of it, either verbatim or with modifications and/or translated into another language. Changing the name of a file is considered to be a modification of the file. -The distribution conditions in this license do not have to be applied to files -that have been modified in accordance with the above conditions. Note, however, -that Condition 7. does apply to any such modified file. +The distribution conditions in this license do not have to be applied to files that have been modified in accordance with the above conditions. Note, however, that Condition 7. does apply to any such modified file. -The conditions above are not intended to prohibit, and hence do not apply -to, the updating, by any method, of a file so that it becomes identical to -the latest version of that file of The Program. +The conditions above are not intended to prohibit, and hence do not apply to, the updating, by any method, of a file so that it becomes identical to the latest version of that file of The Program. A Recommendation on Modification Without Distribution - ----------------------------------------------------- -It is wise never to modify a file of The Program, even for your own personal -use, without also meeting the above eight conditions for distributing the -modified file. While you might intend that such modified files will never -be distributed, often this will happen by accident -- you may forget that -you have modified the file; or it may not occur to you when allowing others -to access the modified file that you are thus distributing it and violating -the conditions of this license. It is usually in your best interest to keep -your copy of The Program identical with the public one. Many programs provide -ways to control the behavior of that program without altering its licensed -files. +It is wise never to modify a file of The Program, even for your own personal use, without also meeting the above eight conditions for distributing the modified file. While you might intend that such modified files will never be distributed, often this will happen by accident -- you may forget that you have modified the file; or it may not occur to you when allowing others to access the modified file that you are thus distributing it and violating the conditions of this license. It is usually in your best interest to keep your copy of The Program identical with the public one. Many programs provide ways to control the behavior of that program without altering its licensed files. Additional Conditions on Individual Files of The Program - -------------------------------------------------------- -An individual file of The Program may bear additional conditions that supplement -and/or supersede the conditions in this license if, and only if, such additional -conditions exclusively concern modification of the file or distribution of -a modified version of the file. The conditions on individual files of The -Program therefore may differ only with respect to the kind and extent of modification -of those files that is allowed, and with respect to the distribution of modified -versions of those files. +An individual file of The Program may bear additional conditions that supplement and/or supersede the conditions in this license if, and only if, such additional conditions exclusively concern modification of the file or distribution of a modified version of the file. The conditions on individual files of The Program therefore may differ only with respect to the kind and extent of modification of those files that is allowed, and with respect to the distribution of modified versions of those files. Additional Conditions on LaTeX Software Files - --------------------------------------------- -If a file of The Program is intended to be used with LaTeX (that is, if it -is a LaTeX software file), then the following additional conditions, which -supplement and/or supersede the conditions above, apply to the file according -to its filename extension: +If a file of The Program is intended to be used with LaTeX (that is, if it is a LaTeX software file), then the following additional conditions, which supplement and/or supersede the conditions above, apply to the file according to its filename extension: -- You may not modify any file with filename extension `.ins' since these are -installation files containing the legal notices that are placed in the files -they generate. + - You may not modify any file with filename extension `.ins' since these are installation files containing the legal notices that are placed in the files they generate. -- You may distribute modified versions of files with filename extension `.fd' -(LaTeX font definition files) under the standard conditions of the LPPL as -described above. You may also distribute such modified LaTeX font definition -files with their original names provided that: + - You may distribute modified versions of files with filename extension `.fd' (LaTeX font definition files) under the standard conditions of the LPPL as described above. You may also distribute such modified LaTeX font definition files with their original names provided that: + (1) the only changes to the original files either enable use of available fonts or prevent attempts to access unavailable fonts; + (2) you also distribute the original, unmodified files (TeX input paths can be used to control which set of LaTeX font definition files is actually used by TeX). -(1) the only changes to the original files either enable use of available -fonts or prevent attempts to access unavailable fonts; + - You may distribute modified versions of files with filename extension `.cfg' (configuration files) with their original names. The Program may (and usually will) specify the range of commands that are allowed in a particular configuration file. -(2) you also distribute the original, unmodified files (TeX input paths can -be used to control which set of LaTeX font definition files is actually used -by TeX). - -- You may distribute modified versions of files with filename extension `.cfg' -(configuration files) with their original names. The Program may (and usually -will) specify the range of commands that are allowed in a particular configuration -file. - -Because of portability and exchangeability issues in LaTeX software, The LaTeX3 -Project deprecates the distribution of modified versions of components of -LaTeX or of generally available contributed code for them, but such distribution -can meet the conditions of this license. +Because of portability and exchangeability issues in LaTeX software, The LaTeX3 Project deprecates the distribution of modified versions of components of LaTeX or of generally available contributed code for them, but such distribution can meet the conditions of this license. NO WARRANTY - =========== -There is no warranty for The Program. Except when otherwise stated in writing, -The Copyright Holder provides The Program `as is', without warranty of any -kind, either expressed or implied, including, but not limited to, the implied -warranties of merchantability and fitness for a particular purpose. The entire -risk as to the quality and performance of The Program is with you. Should -The Program prove defective, you assume the cost of all necessary servicing, -repair, or correction. +There is no warranty for The Program. Except when otherwise stated in writing, The Copyright Holder provides The Program `as is', without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of The Program is with you. Should The Program prove defective, you assume the cost of all necessary servicing, repair, or correction. -In no event unless agreed to in writing will The Copyright Holder, or any -author named in the files of The Program, or any other party who may distribute -and/or modify The Program as permitted below, be liable to you for damages, -including any general, special, incidental or consequential damages arising -out of any use of The Program or out of inability to use The Program (including, -but not limited to, loss of data, data being rendered inaccurate, or losses -sustained by anyone as a result of any failure of The Program to operate with -any other programs), even if The Copyright Holder or said author or said other -party has been advised of the possibility of such damages. +In no event unless agreed to in writing will The Copyright Holder, or any author named in the files of The Program, or any other party who may distribute and/or modify The Program as permitted below, be liable to you for damages, including any general, special, incidental or consequential damages arising out of any use of The Program or out of inability to use The Program (including, but not limited to, loss of data, data being rendered inaccurate, or losses sustained by anyone as a result of any failure of The Program to operate with any other programs), even if The Copyright Holder or said author or said other party has been advised of the possibility of such damages. WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE - ========================================================= -This section contains important instructions, examples, and recommendations -for authors who are considering distributing their programs under this license. -These authors are addressed as `you' in this section. +This section contains important instructions, examples, and recommendations for authors who are considering distributing their programs under this license. These authors are addressed as `you' in this section. Choosing This License or Another License - ---------------------------------------- -If for any part of your program you want or need to use *distribution* conditions -that differ from those in this license, then do not refer to this license -anywhere in your program but instead distribute your program under a different -license. You may use the text of this license as a model for your own license, -but your license should not refer to the LPPL or otherwise give the impression -that your program is distributed under the LPPL. +If for any part of your program you want or need to use *distribution* conditions that differ from those in this license, then do not refer to this license anywhere in your program but instead distribute your program under a different license. You may use the text of this license as a model for your own license, but your license should not refer to the LPPL or otherwise give the impression that your program is distributed under the LPPL. -The document `modguide.tex' in the base LaTeX distribution explains the motivation -behind the conditions of this license. It explains, for example, why distributing -LaTeX under the GNU General Public License (GPL) was considered inappropriate. -Even if your program is unrelated to LaTeX, the discussion in `modguide.tex' -may still be relevant, and authors intending to distribute their programs -under any license are encouraged to read it. +The document `modguide.tex' in the base LaTeX distribution explains the motivation behind the conditions of this license. It explains, for example, why distributing LaTeX under the GNU General Public License (GPL) was considered inappropriate. Even if your program is unrelated to LaTeX, the discussion in `modguide.tex' may still be relevant, and authors intending to distribute their programs under any license are encouraged to read it. How to Use This License - ----------------------- -To use this license, place in each of the files of your program both an explicit -copyright notice including your name and the year and also a statement that -the distribution and/or modification of the file is constrained by the conditions -in this license. +To use this license, place in each of the files of your program both an explicit copyright notice including your name and the year and also a statement that the distribution and/or modification of the file is constrained by the conditions in this license. Here is an example of such a notice and statement: -%% pig.dtx + %% pig.dtx + %% Copyright 2001 M. Y. Name + % + % This program may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.1 + % of this license or (at your option) any later version. + % The latest version of this license is in % http://www.latex-project.org/lppl.txt + % and version 1.1 or later is part of all distributions of LaTeX % version 1999/06/01 or later. + % + % This program consists of the files pig.dtx and pig.ins -%% Copyright 2001 M. Y. Name - -% - -% This program may be distributed and/or modified under the - -% conditions of the LaTeX Project Public License, either version 1.1 - -% of this license or (at your option) any later version. - -% The latest version of this license is in - -% http://www.latex-project.org/lppl.txt - -% and version 1.1 or later is part of all distributions of LaTeX - -% version 1999/06/01 or later. - -% - -% This program consists of the files pig.dtx and pig.ins - -Given such a notice and statement in a file, the conditions given in this -license document would apply, with `The Program' referring to the two files -`pig.dtx' and `pig.ins', and `The Copyright Holder' referring to the person -`M. Y. Name'. +Given such a notice and statement in a file, the conditions given in this license document would apply, with `The Program' referring to the two files `pig.dtx' and `pig.ins', and `The Copyright Holder' referring to the person `M. Y. Name'. Important Recommendations - ------------------------- Defining What Constitutes The Program -The LPPL requires that distributions of The Program contain all the files -of The Program. It is therefore important that you provide a way for the licensee -to determine which files constitute The Program. This could, for example, -be achieved by explicitly listing all the files of The Program near the copyright -notice of each file or by using a line like +The LPPL requires that distributions of The Program contain all the files of The Program. It is therefore important that you provide a way for the licensee to determine which files constitute The Program. This could, for example, be achieved by explicitly listing all the files of The Program near the copyright notice of each file or by using a line like -% This program consists of all files listed in manifest.txt. + % This program consists of all files listed in manifest.txt. -in that place. In the absence of an unequivocal list it might be impossible -for the licensee to determine what is considered by you to comprise The Program. +in that place. In the absence of an unequivocal list it might be impossible for the licensee to determine what is considered by you to comprise The Program. Noting Exceptional Files -If The Program contains any files bearing additional conditions on modification, -or on distribution of modified versions, of those files (other than those -listed in `Additional Conditions on LaTeX Software Files'), then it is recommended -that The Program contain a prominent file that defines the exceptional conditions, -and either lists the exceptional files or defines one or more categories of -exceptional files. +If The Program contains any files bearing additional conditions on modification, or on distribution of modified versions, of those files (other than those listed in `Additional Conditions on LaTeX Software Files'), then it is recommended that The Program contain a prominent file that defines the exceptional conditions, and either lists the exceptional files or defines one or more categories of exceptional files. -Files containing the text of a license (such as this file) are often examples -of files bearing more restrictive conditions on modification. LaTeX configuration -files (with filename extension `.cfg') are examples of files bearing less -restrictive conditions on the distribution of a modified version of the file. -The additional conditions on LaTeX software given above are examples of declaring -a category of files bearing exceptional additional conditions. +Files containing the text of a license (such as this file) are often examples of files bearing more restrictive conditions on modification. LaTeX configuration files (with filename extension `.cfg') are examples of files bearing less restrictive conditions on the distribution of a modified version of the file. The additional conditions on LaTeX software given above are examples of declaring a category of files bearing exceptional additional conditions. diff --git a/options/license/LPPL-1.2 b/options/license/LPPL-1.2 index 1bb8d0db4..cdaf551ae 100644 --- a/options/license/LPPL-1.2 +++ b/options/license/LPPL-1.2 @@ -1,295 +1,139 @@ The LaTeX Project Public License - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -LPPL Version 1.2 1999-09-03 Copyright 1999 LaTeX3 Project +LPPL Version 1.2 1999-09-03 -Everyone is allowed to distribute verbatim copies of this license document, -but modification of it is not allowed. +Copyright 1999 LaTeX3 Project + +Everyone is allowed to distribute verbatim copies of this license document, but modification of it is not allowed. PREAMBLE - ======== -The LaTeX Project Public License (LPPL) is the license under which the base -LaTeX distribution is distributed. +The LaTeX Project Public License (LPPL) is the license under which the base LaTeX distribution is distributed. -You may use this license for any program that you have written and wish to -distribute. This license may be particularly suitable if your program is TeX-related -(such as a LaTeX package), but you may use it even if your program is unrelated -to TeX. The section `WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE', -below, gives instructions, examples, and recommendations for authors who are -considering distributing their programs under this license. +You may use this license for any program that you have written and wish to distribute. This license may be particularly suitable if your program is TeX-related (such as a LaTeX package), but you may use it even if your program is unrelated to TeX. The section `WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE', below, gives instructions, examples, and recommendations for authors who are considering distributing their programs under this license. -In this license document, `The Program' refers to any program distributed -under this license. +In this license document, `The Program' refers to any program distributed under this license. -This license gives conditions under which The Program may be distributed and -conditions under which modified versions of The Program may be distributed. -Individual files of The Program may bear supplementary and/or superseding -conditions on modification of themselves and on the distribution of modified -versions of themselves, but *no* file of The Program may bear supplementary -or superseding conditions on the distribution of an unmodified copy of the -file. A distributor wishing to distribute a complete, unmodified copy of The -Program therefore needs to check the conditions only in this license and nowhere -else. +This license gives conditions under which The Program may be distributed and conditions under which modified versions of The Program may be distributed. Individual files of The Program may bear supplementary and/or superseding conditions on modification of themselves and on the distribution of modified versions of themselves, but *no* file of The Program may bear supplementary or superseding conditions on the distribution of an unmodified copy of the file. A distributor wishing to distribute a complete, unmodified copy of The Program therefore needs to check the conditions only in this license and nowhere else. -Activities other than distribution and/or modification of The Program are -not covered by this license; they are outside its scope. In particular, the -act of running The Program is not restricted. +Activities other than distribution and/or modification of The Program are not covered by this license; they are outside its scope. In particular, the act of running The Program is not restricted. -We, the LaTeX3 Project, believe that the conditions below give you the freedom -to make and distribute modified versions of The Program that conform with -whatever technical specifications you wish while maintaining the availability, -integrity, and reliability of The Program. If you do not see how to achieve -your goal while meeting these conditions, then read the document `cfgguide.tex' -in the base LaTeX distribution for suggestions. +We, the LaTeX3 Project, believe that the conditions below give you the freedom to make and distribute modified versions of The Program that conform with whatever technical specifications you wish while maintaining the availability, integrity, and reliability of The Program. If you do not see how to achieve your goal while meeting these conditions, then read the document `cfgguide.tex' in the base LaTeX distribution for suggestions. CONDITIONS ON DISTRIBUTION AND MODIFICATION - =========================================== -You may distribute a complete, unmodified copy of The Program. Distribution -of only part of The Program is not allowed. +You may distribute a complete, unmodified copy of The Program. Distribution of only part of The Program is not allowed. -You may not modify in any way a file of The Program that bears a legal notice -forbidding modification of that file. +You may not modify in any way a file of The Program that bears a legal notice forbidding modification of that file. -You may distribute a modified file of The Program if, and only if, the following -eight conditions are met: +You may distribute a modified file of The Program if, and only if, the following eight conditions are met: -1. You must meet any additional conditions borne by the file on the distribution -of a modified version of the file as described below in the subsection `Additional -Conditions on Individual Files of The Program'. + 1. You must meet any additional conditions borne by the file on the distribution of a modified version of the file as described below in the subsection `Additional Conditions on Individual Files of The Program'. -2. If the file is a LaTeX software file, then you must meet any applicable -additional conditions on the distribution of a modified version of the file -that are described below in the subsection `Additional Conditions on LaTeX -Software Files'. + 2. If the file is a LaTeX software file, then you must meet any applicable additional conditions on the distribution of a modified version of the file that are described below in the subsection `Additional Conditions on LaTeX Software Files'. -3. You must not distribute the modified file with the filename of the original -file. + 3. You must not distribute the modified file with the filename of the original file. -4. In the modified file, you must acknowledge the authorship and name of the -original file, and the name (if any) of the program which contains it. + 4. In the modified file, you must acknowledge the authorship and name of the original file, and the name (if any) of the program which contains it. -5. You must change any identification string in the file to indicate clearly -that the modified file is not part of The Program. + 5. You must change any identification string in the file to indicate clearly that the modified file is not part of The Program. -6. You must change any addresses in the modified file for the reporting of -errors in the file or in The Program generally to ensure that reports for -files no longer maintained by the original maintainers will be directed to -the maintainers of the modified files. + 6. You must change any addresses in the modified file for the reporting of errors in the file or in The Program generally to ensure that reports for files no longer maintained by the original maintainers will be directed to the maintainers of the modified files. -7. You must distribute the modified file under a license that forbids distribution -both of the modified file and of any files derived from the modified file -with the filename of the original file. + 7. You must distribute the modified file under a license that forbids distribution both of the modified file and of any files derived from the modified file with the filename of the original file. - 8. You must do either (A) or (B): + 8. You must do either (A) or (B): -(A) distribute a copy of The Program (that is, a complete, unmodified copy -of The Program) together with the modified file; if your distribution of the -modified file is made by offering access to copy the modified file from a -designated place, then offering equivalent access to copy The Program from -the same place meets this condition, even though third parties are not compelled -to copy The Program along with the modified file; + (A) distribute a copy of The Program (that is, a complete, unmodified copy of The Program) together with the modified file; if your distribution of the modified file is made by offering access to copy the modified file from a designated place, then offering equivalent access to copy The Program from the same place meets this condition, even though third parties are not compelled to copy The Program along with the modified file; -(B) provide to those who receive the modified file information that is sufficient -for them to obtain a copy of The Program; for example, you may provide a Uniform -Resource Locator (URL) for a site that you expect will provide them with a -copy of The Program free of charge (either the version from which your modification -is derived, or perhaps a later version). + (B) provide to those who receive the modified file information that is sufficient for them to obtain a copy of The Program; for example, you may provide a Uniform Resource Locator (URL) for a site that you expect will provide them with a copy of The Program free of charge (either the version from which your modification is derived, or perhaps a later version). -Note that in the above, `distribution' of a file means making the file available -to others by any means. This includes, for instance, installing the file on -any machine in such a way that the file is accessible by users other than -yourself. `Modification' of a file means any procedure that produces a derivative -file under any applicable law -- that is, a file containing the original file -or a significant portion of it, either verbatim or with modifications and/or -translated into another language. +Note that in the above, `distribution' of a file means making the file available to others by any means. This includes, for instance, installing the file on any machine in such a way that the file is accessible by users other than yourself. `Modification' of a file means any procedure that produces a derivative file under any applicable law -- that is, a file containing the original file or a significant portion of it, either verbatim or with modifications and/or translated into another language. -Changing the name of a file (other than as necessitated by the file conventions -of the target file systems) is considered to be a modification of the file. +Changing the name of a file (other than as necessitated by the file conventions of the target file systems) is considered to be a modification of the file. -The distribution conditions in this license do not have to be applied to files -that have been modified in accordance with the above conditions. Note, however, -that Condition 7. does apply to any such modified file. +The distribution conditions in this license do not have to be applied to files that have been modified in accordance with the above conditions. Note, however, that Condition 7. does apply to any such modified file. + +The conditions above are not intended to prohibit, and hence do not apply to, the updating, by any method, of a file so that it becomes identical to the latest version of that file of The Program. -The conditions above are not intended to prohibit, and hence do not apply -to, the updating, by any method, of a file so that it becomes identical to -the latest version of that file of The Program. A Recommendation on Modification Without Distribution ----------------------------------------------------- -It is wise never to modify a file of The Program, even for your own personal -use, without also meeting the above eight conditions for distributing the -modified file. While you might intend that such modified files will never -be distributed, often this will happen by accident -- you may forget that -you have modified the file; or it may not occur to you when allowing others -to access the modified file that you are thus distributing it and violating -the conditions of this license. It is usually in your best interest to keep -your copy of The Program identical with the public one. Many programs provide -ways to control the behavior of that program without altering its licensed -files. +It is wise never to modify a file of The Program, even for your own personal use, without also meeting the above eight conditions for distributing the modified file. While you might intend that such modified files will never be distributed, often this will happen by accident -- you may forget that you have modified the file; or it may not occur to you when allowing others to access the modified file that you are thus distributing it and violating the conditions of this license. It is usually in your best interest to keep your copy of The Program identical with the public one. Many programs provide ways to control the behavior of that program without altering its licensed files. Additional Conditions on Individual Files of The Program -------------------------------------------------------- -An individual file of The Program may bear additional conditions that supplement -and/or supersede the conditions in this license if, and only if, such additional -conditions exclusively concern modification of the file or distribution of -a modified version of the file. The conditions on individual files of The -Program therefore may differ only with respect to the kind and extent of modification -of those files that is allowed, and with respect to the distribution of modified -versions of those files. +An individual file of The Program may bear additional conditions that supplement and/or supersede the conditions in this license if, and only if, such additional conditions exclusively concern modification of the file or distribution of a modified version of the file. The conditions on individual files of The Program therefore may differ only with respect to the kind and extent of modification of those files that is allowed, and with respect to the distribution of modified versions of those files. Additional Conditions on LaTeX Software Files - --------------------------------------------- -If a file of The Program is intended to be used with LaTeX (that is, if it -is a LaTeX software file), then the following additional conditions, which -supplement and/or supersede the conditions above, apply to the file according -to its filename extension: +If a file of The Program is intended to be used with LaTeX (that is, if it is a LaTeX software file), then the following additional conditions, which supplement and/or supersede the conditions above, apply to the file according to its filename extension: -- You may not modify any file with filename extension `.ins' since these are -installation files containing the legal notices that are placed in the files -they generate. + - You may not modify any file with filename extension `.ins' since these are installation files containing the legal notices that are placed in the files they generate. -- You may distribute modified versions of files with filename extension `.fd' -(LaTeX font definition files) under the standard conditions of the LPPL as -described above. You may also distribute such modified LaTeX font definition -files with their original names provided that: + - You may distribute modified versions of files with filename extension `.fd' (LaTeX font definition files) under the standard conditions of the LPPL as described above. You may also distribute such modified LaTeX font definition files with their original names provided that: + (1) the only changes to the original files either enable use of available fonts or prevent attempts to access unavailable fonts; + (2) you also distribute the original, unmodified files (TeX input paths can be used to control which set of LaTeX font definition files is actually used by TeX). -(1) the only changes to the original files either enable use of available -fonts or prevent attempts to access unavailable fonts; + - You may distribute modified versions of files with filename extension `.cfg' (configuration files) with their original names. The Program may (and usually will) specify the range of commands that are allowed in a particular configuration file. -(2) you also distribute the original, unmodified files (TeX input paths can -be used to control which set of LaTeX font definition files is actually used -by TeX). - -- You may distribute modified versions of files with filename extension `.cfg' -(configuration files) with their original names. The Program may (and usually -will) specify the range of commands that are allowed in a particular configuration -file. - -Because of portability and exchangeability issues in LaTeX software, The LaTeX3 -Project deprecates the distribution of modified versions of components of -LaTeX or of generally available contributed code for them, but such distribution -can meet the conditions of this license. +Because of portability and exchangeability issues in LaTeX software, The LaTeX3 Project deprecates the distribution of modified versions of components of LaTeX or of generally available contributed code for them, but such distribution can meet the conditions of this license. NO WARRANTY - =========== -There is no warranty for The Program. Except when otherwise stated in writing, -The Copyright Holder provides The Program `as is', without warranty of any -kind, either expressed or implied, including, but not limited to, the implied -warranties of merchantability and fitness for a particular purpose. The entire -risk as to the quality and performance of The Program is with you. Should -The Program prove defective, you assume the cost of all necessary servicing, -repair, or correction. +There is no warranty for The Program. Except when otherwise stated in writing, The Copyright Holder provides The Program `as is', without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of The Program is with you. Should The Program prove defective, you assume the cost of all necessary servicing, repair, or correction. -In no event unless agreed to in writing will The Copyright Holder, or any -author named in the files of The Program, or any other party who may distribute -and/or modify The Program as permitted above, be liable to you for damages, -including any general, special, incidental or consequential damages arising -out of any use of The Program or out of inability to use The Program (including, -but not limited to, loss of data, data being rendered inaccurate, or losses -sustained by anyone as a result of any failure of The Program to operate with -any other programs), even if The Copyright Holder or said author or said other -party has been advised of the possibility of such damages. +In no event unless agreed to in writing will The Copyright Holder, or any author named in the files of The Program, or any other party who may distribute and/or modify The Program as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of any use of The Program or out of inability to use The Program (including, but not limited to, loss of data, data being rendered inaccurate, or losses sustained by anyone as a result of any failure of The Program to operate with any other programs), even if The Copyright Holder or said author or said other party has been advised of the possibility of such damages. WHETHER AND HOW TO DISTRIBUTE PROGRAMS UNDER THIS LICENSE ========================================================= -This section contains important instructions, examples, and recommendations -for authors who are considering distributing their programs under this license. -These authors are addressed as `you' in this section. +This section contains important instructions, examples, and recommendations for authors who are considering distributing their programs under this license. These authors are addressed as `you' in this section. Choosing This License or Another License - ---------------------------------------- -If for any part of your program you want or need to use *distribution* conditions -that differ from those in this license, then do not refer to this license -anywhere in your program but instead distribute your program under a different -license. You may use the text of this license as a model for your own license, -but your license should not refer to the LPPL or otherwise give the impression -that your program is distributed under the LPPL. +If for any part of your program you want or need to use *distribution* conditions that differ from those in this license, then do not refer to this license anywhere in your program but instead distribute your program under a different license. You may use the text of this license as a model for your own license, but your license should not refer to the LPPL or otherwise give the impression that your program is distributed under the LPPL. -The document `modguide.tex' in the base LaTeX distribution explains the motivation -behind the conditions of this license. It explains, for example, why distributing -LaTeX under the GNU General Public License (GPL) was considered inappropriate. -Even if your program is unrelated to LaTeX, the discussion in `modguide.tex' -may still be relevant, and authors intending to distribute their programs -under any license are encouraged to read it. +The document `modguide.tex' in the base LaTeX distribution explains the motivation behind the conditions of this license. It explains, for example, why distributing LaTeX under the GNU General Public License (GPL) was considered inappropriate. Even if your program is unrelated to LaTeX, the discussion in `modguide.tex' may still be relevant, and authors intending to distribute their programs under any license are encouraged to read it. How to Use This License - ----------------------- -To use this license, place in each of the files of your program both an explicit -copyright notice including your name and the year and also a statement that -the distribution and/or modification of the file is constrained by the conditions -in this license. +To use this license, place in each of the files of your program both an explicit copyright notice including your name and the year and also a statement that the distribution and/or modification of the file is constrained by the conditions in this license. Here is an example of such a notice and statement: -%% pig.dtx + %% pig.dtx + %% Copyright 2001 M. Y. Name + % + % This program may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.2 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.2 or later is part of all distributions of LaTeX + % version 1999/12/01 or later. + % + % This program consists of the files pig.dtx and pig.ins -%% Copyright 2001 M. Y. Name - -% - -% This program may be distributed and/or modified under the - -% conditions of the LaTeX Project Public License, either version 1.2 - -% of this license or (at your option) any later version. - -% The latest version of this license is in - -% http://www.latex-project.org/lppl.txt - -% and version 1.2 or later is part of all distributions of LaTeX - -% version 1999/12/01 or later. - -% - -% This program consists of the files pig.dtx and pig.ins - -Given such a notice and statement in a file, the conditions given in this -license document would apply, with `The Program' referring to the two files -`pig.dtx' and `pig.ins', and `The Copyright Holder' referring to the person -`M. Y. Name'. +Given such a notice and statement in a file, the conditions given in this license document would apply, with `The Program' referring to the two files `pig.dtx' and `pig.ins', and `The Copyright Holder' referring to the person `M. Y. Name'. Important Recommendations - ------------------------- Defining What Constitutes The Program -The LPPL requires that distributions of The Program contain all the files -of The Program. It is therefore important that you provide a way for the licensee -to determine which files constitute The Program. This could, for example, -be achieved by explicitly listing all the files of The Program near the copyright -notice of each file or by using a line like +The LPPL requires that distributions of The Program contain all the files of The Program. It is therefore important that you provide a way for the licensee to determine which files constitute The Program. This could, for example, be achieved by explicitly listing all the files of The Program near the copyright notice of each file or by using a line like -% This program consists of all files listed in manifest.txt. + % This program consists of all files listed in manifest.txt. -in that place. In the absence of an unequivocal list it might be impossible -for the licensee to determine what is considered by you to comprise The Program. +in that place. In the absence of an unequivocal list it might be impossible for the licensee to determine what is considered by you to comprise The Program. -Noting Exceptional Files If The Program contains any files bearing additional -conditions on modification, or on distribution of modified versions, of those -files (other than those listed in `Additional Conditions on LaTeX Software -Files'), then it is recommended that The Program contain a prominent file -that defines the exceptional conditions, and either lists the exceptional -files or defines one or more categories of exceptional files. +Noting Exceptional Files If The Program contains any files bearing additional conditions on modification, or on distribution of modified versions, of those files (other than those listed in `Additional Conditions on LaTeX Software Files'), then it is recommended that The Program contain a prominent file that defines the exceptional conditions, and either lists the exceptional files or defines one or more categories of exceptional files. -Files containing the text of a license (such as this file) are often examples -of files bearing more restrictive conditions on modification. LaTeX configuration -files (with filename extension `.cfg') are examples of files bearing less -restrictive conditions on the distribution of a modified version of the file. -The additional conditions on LaTeX software given above are examples of declaring -a category of files bearing exceptional additional conditions. +Files containing the text of a license (such as this file) are often examples of files bearing more restrictive conditions on modification. LaTeX configuration files (with filename extension `.cfg') are examples of files bearing less restrictive conditions on the distribution of a modified version of the file. The additional conditions on LaTeX software given above are examples of declaring a category of files bearing exceptional additional conditions. diff --git a/options/license/LPPL-1.3a b/options/license/LPPL-1.3a index 2e4e567fc..b159f90fd 100644 --- a/options/license/LPPL-1.3a +++ b/options/license/LPPL-1.3a @@ -1,378 +1,175 @@ The LaTeX Project Public License - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -LPPL Version 1.3a 2004-10-01 Copyright 1999 2002-04 LaTeX3 Project +LPPL Version 1.3a 2004-10-01 -Everyone is allowed to distribute verbatim copies of this license document, -but modification of it is not allowed. +Copyright 1999 2002-04 LaTeX3 +Project Everyone is allowed to distribute verbatim copies of this license document, but modification of it is not allowed. PREAMBLE - ======== -The LaTeX Project Public License (LPPL) is the primary license under which -the the LaTeX kernel and the base LaTeX packages are distributed. +The LaTeX Project Public License (LPPL) is the primary license under which the the LaTeX kernel and the base LaTeX packages are distributed. -You may use this license for any work of which you hold the copyright and -which you wish to distribute. This license may be particularly suitable if -your work is TeX-related (such as a LaTeX package), but you may use it with -small modifications even if your work is unrelated to TeX. +You may use this license for any work of which you hold the copyright and which you wish to distribute. This license may be particularly suitable if your work is TeX-related (such as a LaTeX package), but you may use it with small modifications even if your work is unrelated to TeX. -The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', below, -gives instructions, examples, and recommendations for authors who are considering -distributing their works under this license. +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', below, gives instructions, examples, and recommendations for authors who are considering distributing their works under this license. -This license gives conditions under which a work may be distributed and modified, -as well as conditions under which modified versions of that work may be distributed. +This license gives conditions under which a work may be distributed and modified, as well as conditions under which modified versions of that work may be distributed. -We, the LaTeX3 Project, believe that the conditions below give you the freedom -to make and distribute modified versions of your work that conform with whatever -technical specifications you wish while maintaining the availability, integrity, -and reliability of that work. If you do not see how to achieve your goal while -meeting these conditions, then read the document `cfgguide.tex' and `modguide.tex' -in the base LaTeX distribution for suggestions. +We, the LaTeX3 Project, believe that the conditions below give you the freedom to make and distribute modified versions of your work that conform with whatever technical specifications you wish while maintaining the availability, integrity, and reliability of that work. If you do not see how to achieve your goal while meeting these conditions, then read the document `cfgguide.tex' and `modguide.tex' in the base LaTeX distribution for suggestions. DEFINITIONS - =========== In this license document the following terms are used: -`Work' Any work being distributed under this License. `Derived Work' Any work -that under any applicable law is derived from the Work. +`Work' Any work being distributed under this License. `Derived Work' Any work that under any applicable law is derived from the Work. -`Modification' Any procedure that produces a Derived Work under any applicable -law -- for example, the production of a file containing an original file associated -with the Work or a significant portion of such a file, either verbatim or -with modifications and/or translated into another language. +`Modification' Any procedure that produces a Derived Work under any applicable law -- for example, the production of a file containing an original file associated with the Work or a significant portion of such a file, either verbatim or with modifications and/or translated into another language. -`Modify' To apply any procedure that produces a Derived Work under any applicable -law. `Distribution' Making copies of the Work available from one person to -another, in whole or in part. Distribution includes (but is not limited to) -making any electronic components of the Work accessible by file transfer protocols -such as FTP or HTTP or by shared file systems such as Sun's Network File System -(NFS). +`Modify' To apply any procedure that produces a Derived Work under any applicable law. `Distribution' Making copies of the Work available from one person to another, in whole or in part. Distribution includes (but is not limited to) making any electronic components of the Work accessible by file transfer protocols such as FTP or HTTP or by shared file systems such as Sun's Network File System (NFS). -`Compiled Work' A version of the Work that has been processed into a form -where it is directly usable on a computer system. This processing may include -using installation facilities provided by the Work, transformations of the -Work, copying of components of the Work, or other activities. Note that modification -of any installation facilities provided by the Work constitutes modification -of the Work. +`Compiled Work' A version of the Work that has been processed into a form where it is directly usable on a computer system. This processing may include using installation facilities provided by the Work, transformations of the Work, copying of components of the Work, or other activities. Note that modification of any installation facilities provided by the Work constitutes modification of the Work. -`Current Maintainer' A person or persons nominated as such within the Work. -If there is no such explicit nomination then it is the `Copyright Holder' -under any applicable law. +`Current Maintainer' A person or persons nominated as such within the Work. If there is no such explicit nomination then it is the `Copyright Holder' under any applicable law. -`Base Interpreter' A program or process that is normally needed for running -or interpreting a part or the whole of the Work. A Base Interpreter may depend -on external components but these are not considered part of the Base Interpreter -provided that each external component clearly identifies itself whenever it -is used interactively. Unless explicitly specified when applying the license -to the Work, the only applicable Base Interpreter is a "LaTeX-Format". +`Base Interpreter' A program or process that is normally needed for running or interpreting a part or the whole of the Work. A Base Interpreter may depend on external components but these are not considered part of the Base Interpreter provided that each external component clearly identifies itself whenever it is used interactively. Unless explicitly specified when applying the license to the Work, the only applicable Base Interpreter is a "LaTeX-Format". CONDITIONS ON DISTRIBUTION AND MODIFICATION - =========================================== -1. Activities other than distribution and/or modification of the Work are -not covered by this license; they are outside its scope. In particular, the -act of running the Work is not restricted and no requirements are made concerning -any offers of support for the Work. +1. Activities other than distribution and/or modification of the Work are not covered by this license; they are outside its scope. In particular, the act of running the Work is not restricted and no requirements are made concerning any offers of support for the Work. -2. You may distribute a complete, unmodified copy of the Work as you received -it. Distribution of only part of the Work is considered modification of the -Work, and no right to distribute such a Derived Work may be assumed under -the terms of this clause. +2. You may distribute a complete, unmodified copy of the Work as you received it. Distribution of only part of the Work is considered modification of the Work, and no right to distribute such a Derived Work may be assumed under the terms of this clause. -3. You may distribute a Compiled Work that has been generated from a complete, -unmodified copy of the Work as distributed under Clause 2 above, as long as -that Compiled Work is distributed in such a way that the recipients may install -the Compiled Work on their system exactly as it would have been installed -if they generated a Compiled Work directly from the Work. +3. You may distribute a Compiled Work that has been generated from a complete, unmodified copy of the Work as distributed under Clause 2 above, as long as that Compiled Work is distributed in such a way that the recipients may install the Compiled Work on their system exactly as it would have been installed if they generated a Compiled Work directly from the Work. -4. If you are the Current Maintainer of the Work, you may, without restriction, -modify the Work, thus creating a Derived Work. You may also distribute the -Derived Work without restriction, including Compiled Works generated from -the Derived Work. Derived Works distributed in this manner by the Current -Maintainer are considered to be updated versions of the Work. +4. If you are the Current Maintainer of the Work, you may, without restriction, modify the Work, thus creating a Derived Work. You may also distribute the Derived Work without restriction, including Compiled Works generated from the Derived Work. Derived Works distributed in this manner by the Current Maintainer are considered to be updated versions of the Work. -5. If you are not the Current Maintainer of the Work, you may modify your -copy of the Work, thus creating a Derived Work based on the Work, and compile -this Derived Work, thus creating a Compiled Work based on the Derived Work. +5. If you are not the Current Maintainer of the Work, you may modify your copy of the Work, thus creating a Derived Work based on the Work, and compile this Derived Work, thus creating a Compiled Work based on the Derived Work. -6. If you are not the Current Maintainer of the Work, you may distribute a -Derived Work provided the following conditions are met for every component -of the Work unless that component clearly states in the copyright notice that -it is exempt from that condition. Only the Current Maintainer is allowed to -add such statements of exemption to a component of the Work. +6. If you are not the Current Maintainer of the Work, you may distribute a Derived Work provided the following conditions are met for every component of the Work unless that component clearly states in the copyright notice that it is exempt from that condition. Only the Current Maintainer is allowed to add such statements of exemption to a component of the Work. -a. If a component of this Derived Work can be a direct replacement for a component -of the Work when that component is used with the Base Interpreter, then, wherever -this component of the Work identifies itself to the user when used interactively -with that Base Interpreter, the replacement component of this Derived Work -clearly and unambiguously identifies itself as a modified version of this -component to the user when used interactively with that Base Interpreter. + a. If a component of this Derived Work can be a direct replacement for a component of the Work when that component is used with the Base Interpreter, then, wherever this component of the Work identifies itself to the user when used interactively with that Base Interpreter, the replacement component of this Derived Work clearly and unambiguously identifies itself as a modified version of this component to the user when used interactively with that Base Interpreter. -b. Every component of the Derived Work contains prominent notices detailing -the nature of the changes to that component, or a prominent reference to another -file that is distributed as part of the Derived Work and that contains a complete -and accurate log of the changes. + b. Every component of the Derived Work contains prominent notices detailing the nature of the changes to that component, or a prominent reference to another file that is distributed as part of the Derived Work and that contains a complete and accurate log of the changes. -c. No information in the Derived Work implies that any persons, including -(but not limited to) the authors of the original version of the Work, provide -any support, including (but not limited to) the reporting and handling of -errors, to recipients of the Derived Work unless those persons have stated -explicitly that they do provide such support for the Derived Work. + c. No information in the Derived Work implies that any persons, including (but not limited to) the authors of the original version of the Work, provide any support, including (but not limited to) the reporting and handling of errors, to recipients of the Derived Work unless those persons have stated explicitly that they do provide such support for the Derived Work. - d. You distribute at least one of the following with the Derived Work: + d. You distribute at least one of the following with the Derived Work: -1. A complete, unmodified copy of the Work; if your distribution of a modified -component is made by offering access to copy the modified component from a -designated place, then offering equivalent access to copy the Work from the -same or some similar place meets this condition, even though third parties -are not compelled to copy the Work along with the modified component; + 1. A complete, unmodified copy of the Work; if your distribution of a modified component is made by offering access to copy the modified component from a designated place, then offering equivalent access to copy the Work from the same or some similar place meets this condition, even though third parties are not compelled to copy the Work along with the modified component; -2. Information that is sufficient to obtain a complete, unmodified copy of -the Work. + 2. Information that is sufficient to obtain a complete, unmodified copy of the Work. -7. If you are not the Current Maintainer of the Work, you may distribute a -Compiled Work generated from a Derived Work, as long as the Derived Work is -distributed to all recipients of the Compiled Work, and as long as the conditions -of Clause 6, above, are met with regard to the Derived Work. +7. If you are not the Current Maintainer of the Work, you may distribute a Compiled Work generated from a Derived Work, as long as the Derived Work is distributed to all recipients of the Compiled Work, and as long as the conditions of Clause 6, above, are met with regard to the Derived Work. -8. The conditions above are not intended to prohibit, and hence do not apply -to, the modification, by any method, of any component so that it becomes identical -to an updated version of that component of the Work as it is distributed by -the Current Maintainer under Clause 4, above. +8. The conditions above are not intended to prohibit, and hence do not apply to, the modification, by any method, of any component so that it becomes identical to an updated version of that component of the Work as it is distributed by the Current Maintainer under Clause 4, above. -9. Distribution of the Work or any Derived Work in an alternative format, -where the Work or that Derived Work (in whole or in part) is then produced -by applying some process to that format, does not relax or nullify any sections -of this license as they pertain to the results of applying that process. +9. Distribution of the Work or any Derived Work in an alternative format, where the Work or that Derived Work (in whole or in part) is then produced by applying some process to that format, does not relax or nullify any sections of this license as they pertain to the results of applying that process. - 10. +10. + a. A Derived Work may be distributed under a different license provided that license itself honors the conditions listed in Clause 6 above, in regard to the Work, though it does not have to honor the rest of the conditions in this license. -a. A Derived Work may be distributed under a different license provided that -license itself honors the conditions listed in Clause 6 above, in regard to -the Work, though it does not have to honor the rest of the conditions in this -license. + b. If a Derived Work is distributed under this license, that Derived Work must provide sufficient documentation as part of itself to allow each recipient of that Derived Work to honor the restrictions in Clause 6 above, concerning changes from the Work. -b. If a Derived Work is distributed under this license, that Derived Work -must provide sufficient documentation as part of itself to allow each recipient -of that Derived Work to honor the restrictions in Clause 6 above, concerning -changes from the Work. +11. This license places no restrictions on works that are unrelated to the Work, nor does this license place any restrictions on aggregating such works with the Work by any means. -11. This license places no restrictions on works that are unrelated to the -Work, nor does this license place any restrictions on aggregating such works -with the Work by any means. - -12. Nothing in this license is intended to, or may be used to, prevent complete -compliance by all parties with all applicable laws. +12. Nothing in this license is intended to, or may be used to, prevent complete compliance by all parties with all applicable laws. NO WARRANTY - =========== -There is no warranty for the Work. Except when otherwise stated in writing, -the Copyright Holder provides the Work `as is', without warranty of any kind, -either expressed or implied, including, but not limited to, the implied warranties -of merchantability and fitness for a particular purpose. The entire risk as -to the quality and performance of the Work is with you. Should the Work prove -defective, you assume the cost of all necessary servicing, repair, or correction. +There is no warranty for the Work. Except when otherwise stated in writing, the Copyright Holder provides the Work `as is', without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Work is with you. Should the Work prove defective, you assume the cost of all necessary servicing, repair, or correction. -In no event unless required by applicable law or agreed to in writing will -The Copyright Holder, or any author named in the components of the Work, or -any other party who may distribute and/or modify the Work as permitted above, -be liable to you for damages, including any general, special, incidental or -consequential damages arising out of any use of the Work or out of inability -to use the Work (including, but not limited to, loss of data, data being rendered -inaccurate, or losses sustained by anyone as a result of any failure of the -Work to operate with any other programs), even if the Copyright Holder or -said author or said other party has been advised of the possibility of such -damages. +In no event unless required by applicable law or agreed to in writing will The Copyright Holder, or any author named in the components of the Work, or any other party who may distribute and/or modify the Work as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of any use of the Work or out of inability to use the Work (including, but not limited to, loss of data, data being rendered inaccurate, or losses sustained by anyone as a result of any failure of the Work to operate with any other programs), even if the Copyright Holder or said author or said other party has been advised of the possibility of such damages. MAINTENANCE OF THE WORK - ======================= -The Work has the status `author-maintained' if the Copyright Holder explicitly -and prominently states near the primary copyright notice in the Work that -the Work can only be maintained by the Copyright Holder or simply that is -`author-maintained'. +The Work has the status `author-maintained' if the Copyright Holder explicitly and prominently states near the primary copyright notice in the Work that the Work can only be maintained by the Copyright Holder or simply that is `author-maintained'. -The Work has the status `maintained' if there is a Current Maintainer who -has indicated in the Work that they are willing to receive error reports for -the Work (for example, by supplying a valid e-mail address). It is not required -for the Current Maintainer to acknowledge or act upon these error reports. +The Work has the status `maintained' if there is a Current Maintainer who has indicated in the Work that they are willing to receive error reports for the Work (for example, by supplying a valid e-mail address). It is not required for the Current Maintainer to acknowledge or act upon these error reports. -The Work changes from status `maintained' to `unmaintained' if there is no -Current Maintainer, or the person stated to be Current Maintainer of the work -cannot be reached through the indicated means of communication for a period -of six months, and there are no other significant signs of active maintenance. +The Work changes from status `maintained' to `unmaintained' if there is no Current Maintainer, or the person stated to be Current Maintainer of the work cannot be reached through the indicated means of communication for a period of six months, and there are no other significant signs of active maintenance. -You can become the Current Maintainer of the Work by agreement with any existing -Current Maintainer to take over this role. +You can become the Current Maintainer of the Work by agreement with any existing Current Maintainer to take over this role. -If the Work is unmaintained, you can become the Current Maintainer of the -Work through the following steps: +If the Work is unmaintained, you can become the Current Maintainer of the Work through the following steps: -1. Make a reasonable attempt to trace the Current Maintainer (and the Copyright -Holder, if the two differ) through the means of an Internet or similar search. + 1. Make a reasonable attempt to trace the Current Maintainer (and the Copyright Holder, if the two differ) through the means of an Internet or similar search. -2. If this search is successful, then enquire whether the Work is still maintained. + 2. If this search is successful, then enquire whether the Work is still maintained. -a. If it is being maintained, then ask the Current Maintainer to update their -communication data within one month. + a. If it is being maintained, then ask the Current Maintainer to update their communication data within one month. -b. If the search is unsuccessful or no action to resume active maintenance -is taken by the Current Maintainer, then announce within the pertinent community -your intention to take over maintenance. (If the Work is a LaTeX work, this -could be done, for example, by posting to comp.text.tex.) + b. If the search is unsuccessful or no action to resume active maintenance is taken by the Current Maintainer, then announce within the pertinent community your intention to take over maintenance. (If the Work is a LaTeX work, this could be done, for example, by posting to comp.text.tex.) -3a. If the Current Maintainer is reachable and agrees to pass maintenance -of the Work to you, then this takes effect immediately upon announcement. + 3a. If the Current Maintainer is reachable and agrees to pass maintenance of the Work to you, then this takes effect immediately upon announcement. -b. If the Current Maintainer is not reachable and the Copyright Holder agrees -that maintenance of the Work be passed to you, then this takes effect immediately -upon announcement. + b. If the Current Maintainer is not reachable and the Copyright Holder agrees that maintenance of the Work be passed to you, then this takes effect immediately upon announcement. -4. If you make an `intention announcement' as described in 2b. above and after -three months your intention is challenged neither by the Current Maintainer -nor by the Copyright Holder nor by other people, then you may arrange for -the Work to be changed so as to name you as the (new) Current Maintainer. + 4. If you make an `intention announcement' as described in 2b. above and after three months your intention is challenged neither by the Current Maintainer nor by the Copyright Holder nor by other people, then you may arrange for the Work to be changed so as to name you as the (new) Current Maintainer. -5. If the previously unreachable Current Maintainer becomes reachable once -more within three months of a change completed under the terms of 3b) or 4), -then that Current Maintainer must become or remain the Current Maintainer -upon request provided they then update their communication data within one -month. + 5. If the previously unreachable Current Maintainer becomes reachable once more within three months of a change completed under the terms of 3b) or 4), then that Current Maintainer must become or remain the Current Maintainer upon request provided they then update their communication data within one month. -A change in the Current Maintainer does not, of itself, alter the fact that -the Work is distributed under the LPPL license. +A change in the Current Maintainer does not, of itself, alter the fact that the Work is distributed under the LPPL license. -If you become the Current Maintainer of the Work, you should immediately provide, -within the Work, a prominent and unambiguous statement of your status as Current -Maintainer. You should also announce your new status to the same pertinent -community as in 2b) above. +If you become the Current Maintainer of the Work, you should immediately provide, within the Work, a prominent and unambiguous statement of your status as Current Maintainer. You should also announce your new status to the same pertinent community as in 2b) above. WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE - ====================================================== -This section contains important instructions, examples, and recommendations -for authors who are considering distributing their works under this license. -These authors are addressed as `you' in this section. +This section contains important instructions, examples, and recommendations for authors who are considering distributing their works under this license. These authors are addressed as `you' in this section. Choosing This License or Another License - ---------------------------------------- -If for any part of your work you want or need to use *distribution* conditions -that differ significantly from those in this license, then do not refer to -this license anywhere in your work but, instead, distribute your work under -a different license. You may use the text of this license as a model for your -own license, but your license should not refer to the LPPL or otherwise give -the impression that your work is distributed under the LPPL. +If for any part of your work you want or need to use *distribution* conditions that differ significantly from those in this license, then do not refer to this license anywhere in your work but, instead, distribute your work under a different license. You may use the text of this license as a model for your own license, but your license should not refer to the LPPL or otherwise give the impression that your work is distributed under the LPPL. -The document `modguide.tex' in the base LaTeX distribution explains the motivation -behind the conditions of this license. It explains, for example, why distributing -LaTeX under the GNU General Public License (GPL) was considered inappropriate. -Even if your work is unrelated to LaTeX, the discussion in `modguide.tex' -may still be relevant, and authors intending to distribute their works under -any license are encouraged to read it. +The document `modguide.tex' in the base LaTeX distribution explains the motivation behind the conditions of this license. It explains, for example, why distributing LaTeX under the GNU General Public License (GPL) was considered inappropriate. Even if your work is unrelated to LaTeX, the discussion in `modguide.tex' may still be relevant, and authors intending to distribute their works under any license are encouraged to read it. A Recommendation on Modification Without Distribution - ----------------------------------------------------- -It is wise never to modify a component of the Work, even for your own personal -use, without also meeting the above conditions for distributing the modified -component. While you might intend that such modifications will never be distributed, -often this will happen by accident -- you may forget that you have modified -that component; or it may not occur to you when allowing others to access -the modified version that you are thus distributing it and violating the conditions -of this license in ways that could have legal implications and, worse, cause -problems for the community. It is therefore usually in your best interest -to keep your copy of the Work identical with the public one. Many works provide -ways to control the behavior of that work without altering any of its licensed -components. +It is wise never to modify a component of the Work, even for your own personal use, without also meeting the above conditions for distributing the modified component. While you might intend that such modifications will never be distributed, often this will happen by accident -- you may forget that you have modified that component; or it may not occur to you when allowing others to access the modified version that you are thus distributing it and violating the conditions of this license in ways that could have legal implications and, worse, cause problems for the community. It is therefore usually in your best interest to keep your copy of the Work identical with the public one. Many works provide ways to control the behavior of that work without altering any of its licensed components. How to Use This License - ----------------------- -To use this license, place in each of the components of your work both an -explicit copyright notice including your name and the year the work was authored -and/or last substantially modified. Include also a statement that the distribution -and/or modification of that component is constrained by the conditions in -this license. +To use this license, place in each of the components of your work both an explicit copyright notice including your name and the year the work was authored and/or last substantially modified. Include also a statement that the distribution and/or modification of that component is constrained by the conditions in this license. Here is an example of such a notice and statement: -%% pig.dtx + %% pig.dtx + %% Copyright 2003 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2003/12/01 or later. + % + % This work has the LPPL maintenance status "maintained". + % + % This Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins % and the derived file pig.sty. -%% Copyright 2003 M. Y. Name +Given such a notice and statement in a file, the conditions given in this license document would apply, with the `Work' referring to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' referring to any "LaTeX-Format", and both `Copyright Holder' and `Current Maintainer' referring to the person `M. Y. Name'. -% - -% This work may be distributed and/or modified under the - -% conditions of the LaTeX Project Public License, either version 1.3 - -% of this license or (at your option) any later version. - -% The latest version of this license is in - -% http://www.latex-project.org/lppl.txt - -% and version 1.3 or later is part of all distributions of LaTeX - -% version 2003/12/01 or later. - -% - -% This work has the LPPL maintenance status " maintained ". - -% - -% This Current Maintainer of this work is M. Y. Name . - -% - -% This work consists of the files pig.dtx and pig.ins - -% and the derived file pig.sty . - -Given such a notice and statement in a file, the conditions given in this -license document would apply, with the `Work' referring to the three files -`pig.dtx', `pig.ins', and `pig.sty' (the last being generated from `pig.dtx' -using `pig.ins'), the `Base Interpreter' referring to any "LaTeX-Format", -and both `Copyright Holder' and `Current Maintainer' referring to the person -`M. Y. Name'. - -If you do not want the Maintenance section of LPPL to apply to your Work, -change "maintained" above into "author-maintained". However, we recommend -that you use "maintained" as the Maintenance section was added in order to -ensure that your Work remains useful to the community even when you can no -longer maintain and support it yourself. +If you do not want the Maintenance section of LPPL to apply to your Work, change "maintained" above into "author-maintained". However, we recommend that you use "maintained" as the Maintenance section was added in order to ensure that your Work remains useful to the community even when you can no longer maintain and support it yourself. Important Recommendations - ------------------------- Defining What Constitutes the Work -The LPPL requires that distributions of the Work contain all the files of -the Work. It is therefore important that you provide a way for the licensee -to determine which files constitute the Work. This could, for example, be -achieved by explicitly listing all the files of the Work near the copyright -notice of each file or by using a line such as: +The LPPL requires that distributions of the Work contain all the files of the Work. It is therefore important that you provide a way for the licensee to determine which files constitute the Work. This could, for example, be achieved by explicitly listing all the files of the Work near the copyright notice of each file or by using a line such as: -% This work consists of all files listed in manifest.txt. + % This work consists of all files listed in manifest.txt. -in that place. In the absence of an unequivocal list it might be impossible -for the licensee to determine what is considered by you to comprise the Work -and, in such a case, the licensee would be entitled to make reasonable conjectures -as to which files comprise the Work. +in that place. In the absence of an unequivocal list it might be impossible for the licensee to determine what is considered by you to comprise the Work and, in such a case, the licensee would be entitled to make reasonable conjectures as to which files comprise the Work. diff --git a/options/license/LPPL-1.3c b/options/license/LPPL-1.3c index b62e36895..4e3b06e3a 100644 --- a/options/license/LPPL-1.3c +++ b/options/license/LPPL-1.3c @@ -1,392 +1,184 @@ The LaTeX Project Public License - =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -LPPL Version 1.3c 2008-05-04 Copyright 1999 2002-2008 LaTeX3 Project +LPPL Version 1.3c 2008-05-04 -Everyone is allowed to distribute verbatim copies of this license document, -but modification of it is not allowed. +Copyright 1999 2002-2008 LaTeX3 Project + +Everyone is allowed to distribute verbatim copies of this license document, but modification of it is not allowed. PREAMBLE - ======== -The LaTeX Project Public License (LPPL) is the primary license under which -the LaTeX kernel and the base LaTeX packages are distributed. +The LaTeX Project Public License (LPPL) is the primary license under which the LaTeX kernel and the base LaTeX packages are distributed. -You may use this license for any work of which you hold the copyright and -which you wish to distribute. This license may be particularly suitable if -your work is TeX-related (such as a LaTeX package), but it is written in such -a way that you can use it even if your work is unrelated to TeX. +You may use this license for any work of which you hold the copyright and which you wish to distribute. This license may be particularly suitable if your work is TeX-related (such as a LaTeX package), but it is written in such a way that you can use it even if your work is unrelated to TeX. -The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', below, -gives instructions, examples, and recommendations for authors who are considering -distributing their works under this license. +The section `WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE', below, gives instructions, examples, and recommendations for authors who are considering distributing their works under this license. -This license gives conditions under which a work may be distributed and modified, -as well as conditions under which modified versions of that work may be distributed. +This license gives conditions under which a work may be distributed and modified, as well as conditions under which modified versions of that work may be distributed. -We, the LaTeX3 Project, believe that the conditions below give you the freedom -to make and distribute modified versions of your work that conform with whatever -technical specifications you wish while maintaining the availability, integrity, -and reliability of that work. If you do not see how to achieve your goal while -meeting these conditions, then read the document `cfgguide.tex' and `modguide.tex' -in the base LaTeX distribution for suggestions. +We, the LaTeX3 Project, believe that the conditions below give you the freedom to make and distribute modified versions of your work that conform with whatever technical specifications you wish while maintaining the availability, integrity, and reliability of that work. If you do not see how to achieve your goal while meeting these conditions, then read the document `cfgguide.tex' and `modguide.tex' in the base LaTeX distribution for suggestions. DEFINITIONS - =========== In this license document the following terms are used: -`Work' Any work being distributed under this License. `Derived Work' Any work -that under any applicable law is derived from the Work. +`Work' Any work being distributed under this License. `Derived Work' Any work that under any applicable law is derived from the Work. -`Modification' Any procedure that produces a Derived Work under any applicable -law -- for example, the production of a file containing an original file associated -with the Work or a significant portion of such a file, either verbatim or -with modifications and/or translated into another language. +`Modification' Any procedure that produces a Derived Work under any applicable law -- for example, the production of a file containing an original file associated with the Work or a significant portion of such a file, either verbatim or with modifications and/or translated into another language. -`Modify' To apply any procedure that produces a Derived Work under any applicable -law. `Distribution' Making copies of the Work available from one person to -another, in whole or in part. Distribution includes (but is not limited to) -making any electronic components of the Work accessible by file transfer protocols -such as FTP or HTTP or by shared file systems such as Sun's Network File System -(NFS). +`Modify' To apply any procedure that produces a Derived Work under any applicable law. `Distribution' Making copies of the Work available from one person to another, in whole or in part. Distribution includes (but is not limited to) making any electronic components of the Work accessible by file transfer protocols such as FTP or HTTP or by shared file systems such as Sun's Network File System (NFS). -`Compiled Work' A version of the Work that has been processed into a form -where it is directly usable on a computer system. This processing may include -using installation facilities provided by the Work, transformations of the -Work, copying of components of the Work, or other activities. Note that modification -of any installation facilities provided by the Work constitutes modification -of the Work. +`Compiled Work' A version of the Work that has been processed into a form where it is directly usable on a computer system. This processing may include using installation facilities provided by the Work, transformations of the Work, copying of components of the Work, or other activities. Note that modification of any installation facilities provided by the Work constitutes modification of the Work. -`Current Maintainer' A person or persons nominated as such within the Work. -If there is no such explicit nomination then it is the `Copyright Holder' -under any applicable law. +`Current Maintainer' A person or persons nominated as such within the Work. If there is no such explicit nomination then it is the `Copyright Holder' under any applicable law. -`Base Interpreter' A program or process that is normally needed for running -or interpreting a part or the whole of the Work. +`Base Interpreter' A program or process that is normally needed for running or interpreting a part or the whole of the Work. -A Base Interpreter may depend on external components but these are not considered -part of the Base Interpreter provided that each external component clearly -identifies itself whenever it is used interactively. Unless explicitly specified -when applying the license to the Work, the only applicable Base Interpreter -is a `LaTeX-Format' or in the case of files belonging to the `LaTeX-format' -a program implementing the `TeX language'. +A Base Interpreter may depend on external components but these are not considered part of the Base Interpreter provided that each external component clearly identifies itself whenever it is used interactively. Unless explicitly specified when applying the license to the Work, the only applicable Base Interpreter is a `LaTeX-Format' or in the case of files belonging to the `LaTeX-format' a program implementing the `TeX language'. CONDITIONS ON DISTRIBUTION AND MODIFICATION - =========================================== -1. Activities other than distribution and/or modification of the Work are -not covered by this license; they are outside its scope. In particular, the -act of running the Work is not restricted and no requirements are made concerning -any offers of support for the Work. +1. Activities other than distribution and/or modification of the Work are not covered by this license; they are outside its scope. In particular, the act of running the Work is not restricted and no requirements are made concerning any offers of support for the Work. -2. You may distribute a complete, unmodified copy of the Work as you received -it. Distribution of only part of the Work is considered modification of the -Work, and no right to distribute such a Derived Work may be assumed under -the terms of this clause. +2. You may distribute a complete, unmodified copy of the Work as you received it. Distribution of only part of the Work is considered modification of the Work, and no right to distribute such a Derived Work may be assumed under the terms of this clause. -3. You may distribute a Compiled Work that has been generated from a complete, -unmodified copy of the Work as distributed under Clause 2 above, as long as -that Compiled Work is distributed in such a way that the recipients may install -the Compiled Work on their system exactly as it would have been installed -if they generated a Compiled Work directly from the Work. +3. You may distribute a Compiled Work that has been generated from a complete, unmodified copy of the Work as distributed under Clause 2 above, as long as that Compiled Work is distributed in such a way that the recipients may install the Compiled Work on their system exactly as it would have been installed if they generated a Compiled Work directly from the Work. -4. If you are the Current Maintainer of the Work, you may, without restriction, -modify the Work, thus creating a Derived Work. You may also distribute the -Derived Work without restriction, including Compiled Works generated from -the Derived Work. Derived Works distributed in this manner by the Current -Maintainer are considered to be updated versions of the Work. +4. If you are the Current Maintainer of the Work, you may, without restriction, modify the Work, thus creating a Derived Work. You may also distribute the Derived Work without restriction, including Compiled Works generated from the Derived Work. Derived Works distributed in this manner by the Current Maintainer are considered to be updated versions of the Work. -5. If you are not the Current Maintainer of the Work, you may modify your -copy of the Work, thus creating a Derived Work based on the Work, and compile -this Derived Work, thus creating a Compiled Work based on the Derived Work. +5. If you are not the Current Maintainer of the Work, you may modify your copy of the Work, thus creating a Derived Work based on the Work, and compile this Derived Work, thus creating a Compiled Work based on the Derived Work. -6. If you are not the Current Maintainer of the Work, you may distribute a -Derived Work provided the following conditions are met for every component -of the Work unless that component clearly states in the copyright notice that -it is exempt from that condition. Only the Current Maintainer is allowed to -add such statements of exemption to a component of the Work. +6. If you are not the Current Maintainer of the Work, you may distribute a Derived Work provided the following conditions are met for every component of the Work unless that component clearly states in the copyright notice that it is exempt from that condition. Only the Current Maintainer is allowed to add such statements of exemption to a component of the Work. -a. If a component of this Derived Work can be a direct replacement for a component -of the Work when that component is used with the Base Interpreter, then, wherever -this component of the Work identifies itself to the user when used interactively -with that Base Interpreter, the replacement component of this Derived Work -clearly and unambiguously identifies itself as a modified version of this -component to the user when used interactively with that Base Interpreter. + a. If a component of this Derived Work can be a direct replacement for a component of the Work when that component is used with the Base Interpreter, then, wherever this component of the Work identifies itself to the user when used interactively with that Base Interpreter, the replacement component of this Derived Work clearly and unambiguously identifies itself as a modified version of this component to the user when used interactively with that Base Interpreter. -b. Every component of the Derived Work contains prominent notices detailing -the nature of the changes to that component, or a prominent reference to another -file that is distributed as part of the Derived Work and that contains a complete -and accurate log of the changes. + b. Every component of the Derived Work contains prominent notices detailing the nature of the changes to that component, or a prominent reference to another file that is distributed as part of the Derived Work and that contains a complete and accurate log of the changes. -c. No information in the Derived Work implies that any persons, including -(but not limited to) the authors of the original version of the Work, provide -any support, including (but not limited to) the reporting and handling of -errors, to recipients of the Derived Work unless those persons have stated -explicitly that they do provide such support for the Derived Work. + c. No information in the Derived Work implies that any persons, including (but not limited to) the authors of the original version of the Work, provide any support, including (but not limited to) the reporting and handling of errors, to recipients of the Derived Work unless those persons have stated explicitly that they do provide such support for the Derived Work. - d. You distribute at least one of the following with the Derived Work: + d. You distribute at least one of the following with the Derived Work: -1. A complete, unmodified copy of the Work; if your distribution of a modified -component is made by offering access to copy the modified component from a -designated place, then offering equivalent access to copy the Work from the -same or some similar place meets this condition, even though third parties -are not compelled to copy the Work along with the modified component; + 1. A complete, unmodified copy of the Work; if your distribution of a modified component is made by offering access to copy the modified component from a designated place, then offering equivalent access to copy the Work from the same or some similar place meets this condition, even though third parties are not compelled to copy the Work along with the modified component; -2. Information that is sufficient to obtain a complete, unmodified copy of -the Work. + 2. Information that is sufficient to obtain a complete, unmodified copy of the Work. -7. If you are not the Current Maintainer of the Work, you may distribute a -Compiled Work generated from a Derived Work, as long as the Derived Work is -distributed to all recipients of the Compiled Work, and as long as the conditions -of Clause 6, above, are met with regard to the Derived Work. +7. If you are not the Current Maintainer of the Work, you may distribute a Compiled Work generated from a Derived Work, as long as the Derived Work is distributed to all recipients of the Compiled Work, and as long as the conditions of Clause 6, above, are met with regard to the Derived Work. -8. The conditions above are not intended to prohibit, and hence do not apply -to, the modification, by any method, of any component so that it becomes identical -to an updated version of that component of the Work as it is distributed by -the Current Maintainer under Clause 4, above. +8. The conditions above are not intended to prohibit, and hence do not apply to, the modification, by any method, of any component so that it becomes identical to an updated version of that component of the Work as it is distributed by the Current Maintainer under Clause 4, above. -9. Distribution of the Work or any Derived Work in an alternative format, -where the Work or that Derived Work (in whole or in part) is then produced -by applying some process to that format, does not relax or nullify any sections -of this license as they pertain to the results of applying that process. +9. Distribution of the Work or any Derived Work in an alternative format, where the Work or that Derived Work (in whole or in part) is then produced by applying some process to that format, does not relax or nullify any sections of this license as they pertain to the results of applying that process. - 10. +10. + a. A Derived Work may be distributed under a different license provided that license itself honors the conditions listed in Clause 6 above, in regard to the Work, though it does not have to honor the rest of the conditions in this license. -a. A Derived Work may be distributed under a different license provided that -license itself honors the conditions listed in Clause 6 above, in regard to -the Work, though it does not have to honor the rest of the conditions in this -license. + b. If a Derived Work is distributed under a different license, that Derived Work must provide sufficient documentation as part of itself to allow each recipient of that Derived Work to honor the restrictions in Clause 6 above, concerning changes from the Work. -b. If a Derived Work is distributed under a different license, that Derived -Work must provide sufficient documentation as part of itself to allow each -recipient of that Derived Work to honor the restrictions in Clause 6 above, -concerning changes from the Work. +11. This license places no restrictions on works that are unrelated to the Work, nor does this license place any restrictions on aggregating such works with the Work by any means. -11. This license places no restrictions on works that are unrelated to the -Work, nor does this license place any restrictions on aggregating such works -with the Work by any means. - -12. Nothing in this license is intended to, or may be used to, prevent complete -compliance by all parties with all applicable laws. +12. Nothing in this license is intended to, or may be used to, prevent complete compliance by all parties with all applicable laws. NO WARRANTY - =========== -There is no warranty for the Work. Except when otherwise stated in writing, -the Copyright Holder provides the Work `as is', without warranty of any kind, -either expressed or implied, including, but not limited to, the implied warranties -of merchantability and fitness for a particular purpose. The entire risk as -to the quality and performance of the Work is with you. Should the Work prove -defective, you assume the cost of all necessary servicing, repair, or correction. +There is no warranty for the Work. Except when otherwise stated in writing, the Copyright Holder provides the Work `as is', without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Work is with you. Should the Work prove defective, you assume the cost of all necessary servicing, repair, or correction. -In no event unless required by applicable law or agreed to in writing will -The Copyright Holder, or any author named in the components of the Work, or -any other party who may distribute and/or modify the Work as permitted above, -be liable to you for damages, including any general, special, incidental or -consequential damages arising out of any use of the Work or out of inability -to use the Work (including, but not limited to, loss of data, data being rendered -inaccurate, or losses sustained by anyone as a result of any failure of the -Work to operate with any other programs), even if the Copyright Holder or -said author or said other party has been advised of the possibility of such -damages. +In no event unless required by applicable law or agreed to in writing will The Copyright Holder, or any author named in the components of the Work, or any other party who may distribute and/or modify the Work as permitted above, be liable to you for damages, including any general, special, incidental or consequential damages arising out of any use of the Work or out of inability to use the Work (including, but not limited to, loss of data, data being rendered inaccurate, or losses sustained by anyone as a result of any failure of the Work to operate with any other programs), even if the Copyright Holder or said author or said other party has been advised of the possibility of such damages. MAINTENANCE OF THE WORK - ======================= -The Work has the status `author-maintained' if the Copyright Holder explicitly -and prominently states near the primary copyright notice in the Work that -the Work can only be maintained by the Copyright Holder or simply that it -is `author-maintained'. +The Work has the status `author-maintained' if the Copyright Holder explicitly and prominently states near the primary copyright notice in the Work that the Work can only be maintained by the Copyright Holder or simply that it is `author-maintained'. -The Work has the status `maintained' if there is a Current Maintainer who -has indicated in the Work that they are willing to receive error reports for -the Work (for example, by supplying a valid e-mail address). It is not required -for the Current Maintainer to acknowledge or act upon these error reports. +The Work has the status `maintained' if there is a Current Maintainer who has indicated in the Work that they are willing to receive error reports for the Work (for example, by supplying a valid e-mail address). It is not required for the Current Maintainer to acknowledge or act upon these error reports. -The Work changes from status `maintained' to `unmaintained' if there is no -Current Maintainer, or the person stated to be Current Maintainer of the work -cannot be reached through the indicated means of communication for a period -of six months, and there are no other significant signs of active maintenance. +The Work changes from status `maintained' to `unmaintained' if there is no Current Maintainer, or the person stated to be Current Maintainer of the work cannot be reached through the indicated means of communication for a period of six months, and there are no other significant signs of active maintenance. -You can become the Current Maintainer of the Work by agreement with any existing -Current Maintainer to take over this role. +You can become the Current Maintainer of the Work by agreement with any existing Current Maintainer to take over this role. -If the Work is unmaintained, you can become the Current Maintainer of the -Work through the following steps: +If the Work is unmaintained, you can become the Current Maintainer of the Work through the following steps: -1. Make a reasonable attempt to trace the Current Maintainer (and the Copyright -Holder, if the two differ) through the means of an Internet or similar search. +1. Make a reasonable attempt to trace the Current Maintainer (and the Copyright Holder, if the two differ) through the means of an Internet or similar search. 2. If this search is successful, then enquire whether the Work is still maintained. -a. If it is being maintained, then ask the Current Maintainer to update their -communication data within one month. + a. If it is being maintained, then ask the Current Maintainer to update their communication data within one month. -b. If the search is unsuccessful or no action to resume active maintenance -is taken by the Current Maintainer, then announce within the pertinent community -your intention to take over maintenance. (If the Work is a LaTeX work, this -could be done, for example, by posting to comp.text.tex.) + b. If the search is unsuccessful or no action to resume active maintenance is taken by the Current Maintainer, then announce within the pertinent community your intention to take over maintenance. (If the Work is a LaTeX work, this could be done, for example, by posting to comp.text.tex.) -3a. If the Current Maintainer is reachable and agrees to pass maintenance -of the Work to you, then this takes effect immediately upon announcement. +3a. If the Current Maintainer is reachable and agrees to pass maintenance of the Work to you, then this takes effect immediately upon announcement. -b. If the Current Maintainer is not reachable and the Copyright Holder agrees -that maintenance of the Work be passed to you, then this takes effect immediately -upon announcement. +b. If the Current Maintainer is not reachable and the Copyright Holder agrees that maintenance of the Work be passed to you, then this takes effect immediately upon announcement. -4. If you make an `intention announcement' as described in 2b. above and after -three months your intention is challenged neither by the Current Maintainer -nor by the Copyright Holder nor by other people, then you may arrange for -the Work to be changed so as to name you as the (new) Current Maintainer. +4. If you make an `intention announcement' as described in 2b. above and after three months your intention is challenged neither by the Current Maintainer nor by the Copyright Holder nor by other people, then you may arrange for the Work to be changed so as to name you as the (new) Current Maintainer. -5. If the previously unreachable Current Maintainer becomes reachable once -more within three months of a change completed under the terms of 3b) or 4), -then that Current Maintainer must become or remain the Current Maintainer -upon request provided they then update their communication data within one -month. +5. If the previously unreachable Current Maintainer becomes reachable once more within three months of a change completed under the terms of 3b) or 4), then that Current Maintainer must become or remain the Current Maintainer upon request provided they then update their communication data within one month. -A change in the Current Maintainer does not, of itself, alter the fact that -the Work is distributed under the LPPL license. +A change in the Current Maintainer does not, of itself, alter the fact that the Work is distributed under the LPPL license. -If you become the Current Maintainer of the Work, you should immediately provide, -within the Work, a prominent and unambiguous statement of your status as Current -Maintainer. You should also announce your new status to the same pertinent -community as in 2b) above. +If you become the Current Maintainer of the Work, you should immediately provide, within the Work, a prominent and unambiguous statement of your status as Current Maintainer. You should also announce your new status to the same pertinent community as in 2b) above. WHETHER AND HOW TO DISTRIBUTE WORKS UNDER THIS LICENSE - ====================================================== -This section contains important instructions, examples, and recommendations -for authors who are considering distributing their works under this license. -These authors are addressed as `you' in this section. +This section contains important instructions, examples, and recommendations for authors who are considering distributing their works under this license. These authors are addressed as `you' in this section. Choosing This License or Another License - ---------------------------------------- -If for any part of your work you want or need to use *distribution* conditions -that differ significantly from those in this license, then do not refer to -this license anywhere in your work but, instead, distribute your work under -a different license. You may use the text of this license as a model for your -own license, but your license should not refer to the LPPL or otherwise give -the impression that your work is distributed under the LPPL. +If for any part of your work you want or need to use *distribution* conditions that differ significantly from those in this license, then do not refer to this license anywhere in your work but, instead, distribute your work under a different license. You may use the text of this license as a model for your own license, but your license should not refer to the LPPL or otherwise give the impression that your work is distributed under the LPPL. -The document `modguide.tex' in the base LaTeX distribution explains the motivation -behind the conditions of this license. It explains, for example, why distributing -LaTeX under the GNU General Public License (GPL) was considered inappropriate. -Even if your work is unrelated to LaTeX, the discussion in `modguide.tex' -may still be relevant, and authors intending to distribute their works under -any license are encouraged to read it. +The document `modguide.tex' in the base LaTeX distribution explains the motivation behind the conditions of this license. It explains, for example, why distributing LaTeX under the GNU General Public License (GPL) was considered inappropriate. Even if your work is unrelated to LaTeX, the discussion in `modguide.tex' may still be relevant, and authors intending to distribute their works under any license are encouraged to read it. A Recommendation on Modification Without Distribution - ----------------------------------------------------- -It is wise never to modify a component of the Work, even for your own personal -use, without also meeting the above conditions for distributing the modified -component. While you might intend that such modifications will never be distributed, -often this will happen by accident -- you may forget that you have modified -that component; or it may not occur to you when allowing others to access -the modified version that you are thus distributing it and violating the conditions -of this license in ways that could have legal implications and, worse, cause -problems for the community. It is therefore usually in your best interest -to keep your copy of the Work identical with the public one. Many works provide -ways to control the behavior of that work without altering any of its licensed -components. +It is wise never to modify a component of the Work, even for your own personal use, without also meeting the above conditions for distributing the modified component. While you might intend that such modifications will never be distributed, often this will happen by accident -- you may forget that you have modified that component; or it may not occur to you when allowing others to access the modified version that you are thus distributing it and violating the conditions of this license in ways that could have legal implications and, worse, cause problems for the community. It is therefore usually in your best interest to keep your copy of the Work identical with the public one. Many works provide ways to control the behavior of that work without altering any of its licensed components. How to Use This License - ----------------------- -To use this license, place in each of the components of your work both an -explicit copyright notice including your name and the year the work was authored -and/or last substantially modified. Include also a statement that the distribution -and/or modification of that component is constrained by the conditions in -this license. +To use this license, place in each of the components of your work both an explicit copyright notice including your name and the year the work was authored and/or last substantially modified. Include also a statement that the distribution and/or modification of that component is constrained by the conditions in this license. Here is an example of such a notice and statement: -%% pig.dtx + %% pig.dtx + %% Copyright 2005 M. Y. Name + % + % This work may be distributed and/or modified under the + % conditions of the LaTeX Project Public License, either version 1.3 + % of this license or (at your option) any later version. + % The latest version of this license is in + % http://www.latex-project.org/lppl.txt + % and version 1.3 or later is part of all distributions of LaTeX + % version 2005/12/01 or later. + % + % This work has the LPPL maintenance status `maintained'. + % + % The Current Maintainer of this work is M. Y. Name. + % + % This work consists of the files pig.dtx and pig.ins + % and the derived file pig.sty. -%% Copyright 2005 M. Y. Name +Given such a notice and statement in a file, the conditions given in this license document would apply, with the `Work' referring to the three files `pig.dtx', `pig.ins', and `pig.sty' (the last being generated from `pig.dtx' using `pig.ins'), the `Base Interpreter' referring to any `LaTeX-Format', and both `Copyright Holder' and `Current Maintainer' referring to the person `M. Y. Name'. -% - -% This work may be distributed and/or modified under the - -% conditions of the LaTeX Project Public License, either version 1.3 - -% of this license or (at your option) any later version. - -% The latest version of this license is in - -% http://www.latex-project.org/lppl.txt - -% and version 1.3 or later is part of all distributions of LaTeX - -% version 2005/12/01 or later. - -% - -% This work has the LPPL maintenance status " maintained ". - -% - -% The Current Maintainer of this work is M. Y. Name . - -% - -% This work consists of the files pig.dtx and pig.ins - -% and the derived file pig.sty . - -Given such a notice and statement in a file, the conditions given in this -license document would apply, with the `Work' referring to the three files -`pig.dtx', `pig.ins', and `pig.sty' (the last being generated from `pig.dtx' -using `pig.ins'), the `Base Interpreter' referring to any `LaTeX-Format', -and both `Copyright Holder' and `Current Maintainer' referring to the person -`M. Y. Name'. - -If you do not want the Maintenance section of LPPL to apply to your Work, -change `maintained' above into `author-maintained'. However, we recommend -that you use `maintained', as the Maintenance section was added in order to -ensure that your Work remains useful to the community even when you can no -longer maintain and support it yourself. +If you do not want the Maintenance section of LPPL to apply to your Work, change `maintained' above into `author-maintained'. However, we recommend that you use `maintained', as the Maintenance section was added in order to ensure that your Work remains useful to the community even when you can no longer maintain and support it yourself. Derived Works That Are Not Replacements - --------------------------------------- -Several clauses of the LPPL specify means to provide reliability and stability -for the user community. They therefore concern themselves with the case that -a Derived Work is intended to be used as a (compatible or incompatible) replacement -of the original Work. If this is not the case (e.g., if a few lines of code -are reused for a completely different task), then clauses 6b and 6d shall -not apply. +Several clauses of the LPPL specify means to provide reliability and stability for the user community. They therefore concern themselves with the case that a Derived Work is intended to be used as a (compatible or incompatible) replacement of the original Work. If this is not the case (e.g., if a few lines of code are reused for a completely different task), then clauses 6b and 6d shall not apply. Important Recommendations - ------------------------- Defining What Constitutes the Work -The LPPL requires that distributions of the Work contain all the files of -the Work. It is therefore important that you provide a way for the licensee -to determine which files constitute the Work. This could, for example, be -achieved by explicitly listing all the files of the Work near the copyright -notice of each file or by using a line such as: +The LPPL requires that distributions of the Work contain all the files of the Work. It is therefore important that you provide a way for the licensee to determine which files constitute the Work. This could, for example, be achieved by explicitly listing all the files of the Work near the copyright notice of each file or by using a line such as: -% This work consists of all files listed in manifest.txt. + % This work consists of all files listed in manifest.txt. -in that place. In the absence of an unequivocal list it might be impossible -for the licensee to determine what is considered by you to comprise the Work -and, in such a case, the licensee would be entitled to make reasonable conjectures -as to which files comprise the Work. +in that place. In the absence of an unequivocal list it might be impossible for the licensee to determine what is considered by you to comprise the Work and, in such a case, the licensee would be entitled to make reasonable conjectures as to which files comprise the Work. diff --git a/options/license/LZMA-exception b/options/license/LZMA-exception index f92451e59..6fc9c1352 100644 --- a/options/license/LZMA-exception +++ b/options/license/LZMA-exception @@ -1,3 +1,3 @@ -I.6 Special exception for LZMA compression module LZMA exception +I.6 Special exception for LZMA compression module Igor Pavlov and Amir Szekely, the authors of the LZMA compression module for NSIS, expressly permit you to statically or dynamically link your code (or bind by name) to the files from the LZMA compression module for NSIS without subjecting your linked code to the terms of the Common Public license version 1.0. Any modifications or additions to files from the LZMA compression module for NSIS, however, are subject to the terms of the Common Public License version 1.0. diff --git a/options/license/Latex2e b/options/license/Latex2e index 462bf6f3a..2ce86bed0 100644 --- a/options/license/Latex2e +++ b/options/license/Latex2e @@ -1,17 +1,9 @@ Copyright (C) 2007, 2008, 2009, 2010 Karl Berry. - Copyright (C) 1988, 1994, 2007 Stephen Gilmore. - Copyright (C) 1994, 1995, 1996 Torsten Martinsen. -Permission is granted to make and distribute verbatim copies of this manual -provided the copyright notice and this permission notice are preserved on -all copies. +Permission is granted to make and distribute verbatim copies of this manual provided the copyright notice and this permission notice are preserved on all copies. -Permission is granted to copy and distribute modified versions of this manual -under the conditions for verbatim copying, provided that the entire resulting -derived work is distributed under the terms of a permission notice identical -to this one. +Permission is granted to copy and distribute modified versions of this manual under the conditions for verbatim copying, provided that the entire resulting derived work is distributed under the terms of a permission notice identical to this one. -Permission is granted to copy and distribute translations of this manual into -another language, under the above conditions for modified versions. +Permission is granted to copy and distribute translations of this manual into another language, under the above conditions for modified versions. diff --git a/options/license/Leptonica b/options/license/Leptonica index ccf9fe740..9bc67e6ca 100644 --- a/options/license/Leptonica +++ b/options/license/Leptonica @@ -1,17 +1,9 @@ -Copyright (C) 2001 Leptonica. All rights reserved. +Copyright (C) 2001 Leptonica. All rights reserved. -This software is distributed in the hope that it will be useful, but with -NO WARRANTY OF ANY KIND. +This software is distributed in the hope that it will be useful, but with NO WARRANTY OF ANY KIND. -No author or distributor accepts responsibility to anyone for the consequences -of using this software, or for whether it serves any particular purpose or -works at all, unless he or she says so in writing. Everyone is granted permission -to copy, modify and redistribute this source code, for commercial or non-commercial -purposes, with the following restrictions: +No author or distributor accepts responsibility to anyone for the consequences of using this software, or for whether it serves any particular purpose or works at all, unless he or she says so in writing. Everyone is granted permission to copy, modify and redistribute this source code, for commercial or non-commercial purposes, with the following restrictions: - (1) the origin of this source code must not be misrepresented; - - (2) modified versions must be plainly marked as such; and - -(3) this notice may not be removed or altered from any source or modified -source distribution. +(1) the origin of this source code must not be misrepresented; +(2) modified versions must be plainly marked as such; and +(3) this notice may not be removed or altered from any source or modified source distribution. diff --git a/options/license/LiLiQ-P-1.1 b/options/license/LiLiQ-P-1.1 index fb2966971..594cc742e 100644 --- a/options/license/LiLiQ-P-1.1 +++ b/options/license/LiLiQ-P-1.1 @@ -2,157 +2,69 @@ Licence Libre du Québec – Permissive (LiLiQ-P) Version 1.1 - 1. Préambule +1. Préambule +Cette licence s'applique à tout logiciel distribué dont le titulaire du droit d'auteur précise qu'il est sujet aux termes de la Licence Libre du Québec – Permissive (LiLiQ-P) (ci-après appelée la « licence »). -Cette licence s'applique à tout logiciel distribué dont le titulaire du droit -d'auteur précise qu'il est sujet aux termes de la Licence Libre du Québec -– Permissive (LiLiQ-P) (ci-après appelée la « licence »). +2. Définitions +Dans la présente licence, à moins que le contexte n'indique un sens différent, on entend par: - 2. Définitions + « concédant » : le titulaire du droit d'auteur sur le logiciel, ou toute personne dûment autorisée par ce dernier à accorder la présente licence; + « contributeur » : le titulaire du droit d'auteur ou toute personne autorisée par ce dernier à soumettre au concédant une contribution. Un contributeur dont sa contribution est incorporée au logiciel est considéré comme un concédant en regard de sa contribution; + « contribution » : tout logiciel original, ou partie de logiciel original soumis et destiné à être incorporé dans le logiciel; + « distribution » : le fait de délivrer une copie du logiciel; + « licencié » : toute personne qui possède une copie du logiciel et qui exerce les droits concédés par la licence; + « logiciel » : une œuvre protégée par le droit d'auteur, telle qu'un programme d'ordinateur et sa documentation, pour laquelle le titulaire du droit d'auteur a précisé qu'elle est sujette aux termes de la présente licence; + « logiciel dérivé » : tout logiciel original réalisé par un licencié, autre que le logiciel ou un logiciel modifié, qui produit ou reproduit la totalité ou une partie importante du logiciel; + « logiciel modifié » : toute modification par un licencié de l'un des fichiers source du logiciel ou encore tout nouveau fichier source qui incorpore le logiciel ou une partie importante de ce dernier. -Dans la présente licence, à moins que le contexte n'indique un sens différent, -on entend par: +3. Licence de droit d'auteur +Sous réserve des termes de la licence, le concédant accorde au licencié une licence non exclusive et libre de redevances lui permettant d’exercer les droits suivants sur le logiciel : -« concédant » : le titulaire du droit d'auteur sur le logiciel, ou toute personne -dûment autorisée par ce dernier à accorder la présente licence; + 1 Produire ou reproduire la totalité ou une partie importante; + 2 Exécuter ou représenter la totalité ou une partie importante en public; + 3 Publier la totalité ou une partie importante; + 4 Sous-licencier sous une autre licence libre, approuvée ou certifiée par la Free Software Foundation ou l'Open Source Initiative. -« contributeur » : le titulaire du droit d'auteur ou toute personne autorisée -par ce dernier à soumettre au concédant une contribution. Un contributeur -dont sa contribution est incorporée au logiciel est considéré comme un concédant -en regard de sa contribution; +Cette licence est accordée sans limite territoriale et sans limite de temps. -« contribution » : tout logiciel original, ou partie de logiciel original -soumis et destiné à être incorporé dans le logiciel; +L'exercice complet de ces droits est sujet à la distribution par le concédant du code source du logiciel, lequel doit être sous une forme permettant d'y apporter des modifications. Le concédant peut aussi distribuer le logiciel accompagné d'une offre de distribuer le code source du logiciel, sans frais supplémentaires, autres que ceux raisonnables afin de permettre la livraison du code source. Cette offre doit être valide pendant une durée raisonnable. - « distribution » : le fait de délivrer une copie du logiciel; +4. Distribution +Le licencié peut distribuer des copies du logiciel, d'un logiciel modifié ou dérivé, sous réserve de respecter les conditions suivantes : -« licencié » : toute personne qui possède une copie du logiciel et qui exerce -les droits concédés par la licence; + 1 Le logiciel doit être accompagné d'un exemplaire de cette licence; + 2 Si le logiciel a été modifié, le licencié doit en faire la mention, de préférence dans chacun des fichiers modifiés dont la nature permet une telle mention; + 3 Les étiquettes ou mentions faisant état des droits d'auteur, des marques de commerce, des garanties ou de la paternité concernant le logiciel ne doivent pas être modifiées ou supprimées, à moins que ces étiquettes ou mentions ne soient inapplicables à un logiciel modifié ou dérivé donné. -« logiciel » : une œuvre protégée par le droit d'auteur, telle qu'un programme -d'ordinateur et sa documentation, pour laquelle le titulaire du droit d'auteur -a précisé qu'elle est sujette aux termes de la présente licence; +5. Contributions +Sous réserve d'une entente distincte, toute contribution soumise par un contributeur au concédant pour inclusion dans le logiciel sera soumise aux termes de cette licence. -« logiciel dérivé » : tout logiciel original réalisé par un licencié, autre -que le logiciel ou un logiciel modifié, qui produit ou reproduit la totalité -ou une partie importante du logiciel; +6. Marques de commerce +La licence n'accorde aucune permission particulière qui permettrait d'utiliser les marques de commerce du concédant, autre que celle requise permettant d'identifier la provenance du logiciel. -« logiciel modifié » : toute modification par un licencié de l'un des fichiers -source du logiciel ou encore tout nouveau fichier source qui incorpore le -logiciel ou une partie importante de ce dernier. +7. Garanties +Sauf mention contraire, le concédant distribue le logiciel sans aucune garantie, aux risques et périls de l'acquéreur de la copie du logiciel, et ce, sans assurer que le logiciel puisse répondre à un besoin particulier ou puisse donner un résultat quelconque. - 3. Licence de droit d'auteur +Sans lier le concédant d'une quelconque manière, rien n'empêche un licencié d'offrir ou d'exclure des garanties ou du support. -Sous réserve des termes de la licence, le concédant accorde au licencié une -licence non exclusive et libre de redevances lui permettant d'exercer les -droits suivants sur le logiciel : +8. Responsabilité +Le licencié est responsable de tout préjudice résultant de l'exercice des droits accordés par la licence. - 1  Produire ou reproduire la totalité ou une partie importante; +Le concédant ne saurait être tenu responsable de dommages subis par le licencié ou par des tiers, pour quelque cause que ce soit en lien avec la licence et les droits qui y sont accordés. -2  Exécuter ou représenter la totalité ou une partie importante en public; +9. Résiliation +La présente licence est automatiquement résiliée dès que les droits qui y sont accordés ne sont pas exercés conformément aux termes qui y sont stipulés. - 3  Publier la totalité ou une partie importante; +Toutefois, si le défaut est corrigé dans un délai de 30 jours de sa prise de connaissance par la personne en défaut, et qu'il s'agit du premier défaut, la licence est accordée de nouveau. -4  Sous-licencier sous une autre licence libre, approuvée ou certifiée par -la Free Software Foundation ou l'Open Source Initiative. +Pour tout défaut subséquent, le consentement exprès du concédant est nécessaire afin que la licence soit accordée de nouveau. - +10. Version de la licence +Le Centre de services partagés du Québec, ses ayants cause ou toute personne qu'il désigne, peuvent diffuser des versions révisées ou modifiées de cette licence. Chaque version recevra un numéro unique. Si un logiciel est déjà soumis aux termes d'une version spécifique, c'est seulement cette version qui liera les parties à la licence. - Cette licence est accordée sans limite territoriale et sans limite de temps. +Le concédant peut aussi choisir de concéder la licence sous la version actuelle ou toute version ultérieure, auquel cas le licencié peut choisir sous quelle version la licence lui est accordée. -L'exercice complet de ces droits est sujet à la distribution par le concédant -du code source du logiciel, lequel doit être sous une forme permettant d'y -apporter des modifications. Le concédant peut aussi distribuer le logiciel -accompagné d'une offre de distribuer le code source du logiciel, sans frais -supplémentaires, autres que ceux raisonnables afin de permettre la livraison -du code source. Cette offre doit être valide pendant une durée raisonnable. +11. Divers +Dans la mesure où le concédant est un ministère, un organisme public ou une personne morale de droit public, créés en vertu d'une loi de l'Assemblée nationale du Québec, la licence est régie par le droit applicable au Québec et en cas de contestation, les tribunaux du Québec seront seuls compétents. - 4. Distribution - -Le licencié peut distribuer des copies du logiciel, d'un logiciel modifié -ou dérivé, sous réserve de respecter les conditions suivantes : - - - - 1  Le logiciel doit être accompagné d'un exemplaire de cette licence; - -2  Si le logiciel a été modifié, le licencié doit en faire la mention, de -préférence dans chacun des fichiers modifiés dont la nature permet une telle -mention; - -3  Les étiquettes ou mentions faisant état des droits d'auteur, des marques -de commerce, des garanties ou de la paternité concernant le logiciel ne doivent -pas être modifiées ou supprimées, à moins que ces étiquettes ou mentions ne -soient inapplicables à un logiciel modifié ou dérivé donné. - - - - 5. - - Contributions - -Sous réserve d'une entente distincte, toute contribution soumise par un contributeur -au concédant pour inclusion dans le logiciel sera soumise aux termes de cette -licence. - - 6. Marques de commerce - -La licence n'accorde aucune permission particulière qui permettrait d'utiliser -les marques de commerce du concédant, autre que celle requise permettant d'identifier -la provenance du logiciel. - - 7. Garanties - -Sauf mention contraire, le concédant distribue le logiciel sans aucune garantie, -aux risques et périls de l'acquéreur de la copie du logiciel, et ce, sans -assurer que le logiciel puisse répondre à un besoin particulier ou puisse -donner un résultat quelconque. - -Sans lier le concédant d'une quelconque manière, rien n'empêche un licencié -d'offrir ou d'exclure des garanties ou du support. - - 8. Responsabilité - -Le licencié est responsable de tout préjudice résultant de l'exercice des -droits accordés par la licence. - -Le concédant ne saurait être tenu responsable de dommages subis par le licencié -ou par des tiers, pour quelque cause que ce soit en lien avec la licence et -les droits qui y sont accordés. - - 9. Résiliation - -La présente licence est automatiquement résiliée dès que les droits qui y -sont accordés ne sont pas exercés conformément aux termes qui y sont stipulés. - -Toutefois, si le défaut est corrigé dans un délai de 30 jours de sa prise -de connaissance par la personne en défaut, et qu'il s'agit du premier défaut, -la licence est accordée de nouveau. - -Pour tout défaut subséquent, le consentement exprès du concédant est nécessaire -afin que la licence soit accordée de nouveau. - - 10. Version de la licence - -Le Centre de services partagés du Québec, ses ayants cause ou toute personne -qu'il désigne, peuvent diffuser des versions révisées ou modifiées de cette -licence. Chaque version recevra un numéro unique. Si un logiciel est déjà -soumis aux termes d'une version spécifique, c'est seulement cette version -qui liera les parties à la licence. - -Le concédant peut aussi choisir de concéder la licence sous la version actuelle -ou toute version ultérieure, auquel cas le licencié peut choisir sous quelle -version la licence lui est accordée. - - 11. Divers - -Dans la mesure où le concédant est un ministère, un organisme public ou une -personne morale de droit public, créés en vertu d'une loi de l'Assemblée nationale -du Québec, la licence est régie par le droit applicable au Québec et en cas -de contestation, les tribunaux du Québec seront seuls compétents. - -La présente licence peut être distribuée sans conditions particulières. Toutefois, -une version modifiée doit être distribuée sous un nom différent. Toute référence -au Centre de services partagés du Québec, et, le cas échéant, ses ayant cause, -doit être retirée, autre que celle permettant d'identifier la provenance de -la licence. +La présente licence peut être distribuée sans conditions particulières. Toutefois, une version modifiée doit être distribuée sous un nom différent. Toute référence au Centre de services partagés du Québec, et, le cas échéant, ses ayant cause, doit être retirée, autre que celle permettant d'identifier la provenance de la licence. diff --git a/options/license/LiLiQ-R-1.1 b/options/license/LiLiQ-R-1.1 index 8be42577e..449febd59 100644 --- a/options/license/LiLiQ-R-1.1 +++ b/options/license/LiLiQ-R-1.1 @@ -2,201 +2,93 @@ Licence Libre du Québec – Réciprocité (LiLiQ-R) Version 1.1 - 1. Préambule +1. Préambule +Cette licence s'applique à tout logiciel distribué dont le titulaire du droit d'auteur précise qu'il est sujet aux termes de la Licence Libre du Québec – Réciprocité (LiLiQ-R) (ci-après appelée la « licence »). -Cette licence s'applique à tout logiciel distribué dont le titulaire du droit -d'auteur précise qu'il est sujet aux termes de la Licence Libre du Québec -– Réciprocité (LiLiQ-R) (ci-après appelée la « licence »). +2. Définitions +Dans la présente licence, à moins que le contexte n'indique un sens différent, on entend par: - 2. Définitions + « concédant » : le titulaire du droit d'auteur sur le logiciel, ou toute personne dûment autorisée par ce dernier à accorder la présente licence; + « contributeur » : le titulaire du droit d'auteur ou toute personne autorisée par ce dernier à soumettre au concédant une contribution. Un contributeur dont sa contribution est incorporée au logiciel est considéré comme un concédant en regard de sa contribution; + « contribution » : tout logiciel original, ou partie de logiciel original soumis et destiné à être incorporé dans le logiciel; + « distribution » : le fait de délivrer une copie du logiciel; + « licencié » : toute personne qui possède une copie du logiciel et qui exerce les droits concédés par la licence; + « logiciel » : une œuvre protégée par le droit d'auteur, telle qu'un programme d'ordinateur et sa documentation, pour laquelle le titulaire du droit d'auteur a précisé qu'elle est sujette aux termes de la présente licence; + « logiciel dérivé » : tout logiciel original réalisé par un licencié, autre que le logiciel ou un logiciel modifié, qui produit ou reproduit la totalité ou une partie importante du logiciel; + « logiciel modifié » : toute modification par un licencié de l'un des fichiers source du logiciel ou encore tout nouveau fichier source qui incorpore le logiciel ou une partie importante de ce dernier. -Dans la présente licence, à moins que le contexte n'indique un sens différent, -on entend par: +3. Licence de droit d'auteur +Sous réserve des termes de la licence, le concédant accorde au licencié une licence non exclusive et libre de redevances lui permettant d’exercer les droits suivants sur le logiciel : -« concédant » : le titulaire du droit d'auteur sur le logiciel, ou toute personne -dûment autorisée par ce dernier à accorder la présente licence; + 1 Produire ou reproduire la totalité ou une partie importante; + 2 Exécuter ou représenter la totalité ou une partie importante en public; + 3 Publier la totalité ou une partie importante. -« contributeur » : le titulaire du droit d'auteur ou toute personne autorisée -par ce dernier à soumettre au concédant une contribution. Un contributeur -dont sa contribution est incorporée au logiciel est considéré comme un concédant -en regard de sa contribution; +Cette licence est accordée sans limite territoriale et sans limite de temps. -« contribution » : tout logiciel original, ou partie de logiciel original -soumis et destiné à être incorporé dans le logiciel; +L'exercice complet de ces droits est sujet à la distribution par le concédant du code source du logiciel, lequel doit être sous une forme permettant d'y apporter des modifications. Le concédant peut aussi distribuer le logiciel accompagné d'une offre de distribuer le code source du logiciel, sans frais supplémentaires, autres que ceux raisonnables afin de permettre la livraison du code source. Cette offre doit être valide pendant une durée raisonnable. - « distribution » : le fait de délivrer une copie du logiciel; +4. Distribution +Le licencié peut distribuer des copies du logiciel, d'un logiciel modifié ou dérivé, sous réserve de respecter les conditions suivantes : -« licencié » : toute personne qui possède une copie du logiciel et qui exerce -les droits concédés par la licence; + 1 Le logiciel doit être accompagné d'un exemplaire de cette licence; + 2 Si le logiciel a été modifié, le licencié doit en faire la mention, de préférence dans chacun des fichiers modifiés dont la nature permet une telle mention; + 3 Les étiquettes ou mentions faisant état des droits d'auteur, des marques de commerce, des garanties ou de la paternité concernant le logiciel ne doivent pas être modifiées ou supprimées, à moins que ces étiquettes ou mentions ne soient inapplicables à un logiciel modifié ou dérivé donné. -« logiciel » : une œuvre protégée par le droit d'auteur, telle qu'un programme -d'ordinateur et sa documentation, pour laquelle le titulaire du droit d'auteur -a précisé qu'elle est sujette aux termes de la présente licence; +4.1. Réciprocité +Chaque fois que le licencié distribue le logiciel, le concédant offre au récipiendaire une concession sur le logiciel selon les termes de la présente licence. Le licencié doit offrir une concession selon les termes de la présente licence pour tout logiciel modifié qu'il distribue. -« logiciel dérivé » : tout logiciel original réalisé par un licencié, autre -que le logiciel ou un logiciel modifié, qui produit ou reproduit la totalité -ou une partie importante du logiciel; +Chaque fois que le licencié distribue le logiciel ou un logiciel modifié, ce dernier doit assumer l'obligation d'en distribuer le code source, de la manière prévue au troisième alinéa de l'article 3. -« logiciel modifié » : toute modification par un licencié de l'un des fichiers -source du logiciel ou encore tout nouveau fichier source qui incorpore le -logiciel ou une partie importante de ce dernier. +4.2. Compatibilité +Dans la mesure où le licencié souhaite distribuer un logiciel modifié combiné à un logiciel assujetti à une licence compatible, mais dont il ne serait pas possible d'en respecter les termes, le concédant offre, en plus de la présente concession, une concession selon les termes de cette licence compatible. - 3. Licence de droit d'auteur +Un licencié qui est titulaire exclusif du droit d'auteur sur le logiciel assujetti à une licence compatible ne peut pas se prévaloir de cette offre. Il en est de même pour toute autre personne dûment autorisée à sous-licencier par le titulaire exclusif du droit d'auteur sur le logiciel assujetti à une licence compatible. -Sous réserve des termes de la licence, le concédant accorde au licencié une -licence non exclusive et libre de redevances lui permettant d'exercer les -droits suivants sur le logiciel : +Est considérée comme une licence compatible toute licence libre approuvée ou certifiée par la Free Software Foundation ou l'Open Source Initiative, dont le niveau de réciprocité est comparable ou supérieur à celui de la présente licence, sans toutefois être moindre, notamment : - 1  Produire ou reproduire la totalité ou une partie importante; + 1 Common Development and Distribution License (CDDL-1.0) + 2 Common Public License Version 1.0 (CPL-1.0) + 3 Contrat de licence de logiciel libre CeCILL, version 2.1 (CECILL-2.1) + 4 Contrat de licence de logiciel libre CeCILL-C (CECILL-C) + 5 Eclipse Public License - v 1.0 (EPL-1.0) + 6 European Union Public License, version 1.1 (EUPL v. 1.1) + 7 Licence Libre du Québec – Réciprocité forte version 1.1 (LiLiQ-R+ 1.1) + 8 GNU General Public License Version 2 (GNU GPLv2) + 9 GNU General Public License Version 3 (GNU GPLv3) + 10 GNU Lesser General Public License Version 2.1 (GNU LGPLv2.1) + 11 GNU Lesser General Public License Version 3 (GNU LGPLv3) + 12 Mozilla Public License Version 2.0 (MPL-2.0) -2  Exécuter ou représenter la totalité ou une partie importante en public; +5. Contributions +Sous réserve d'une entente distincte, toute contribution soumise par un contributeur au concédant pour inclusion dans le logiciel sera soumise aux termes de cette licence. - 3  Publier la totalité ou une partie importante. +6. Marques de commerce +La licence n'accorde aucune permission particulière qui permettrait d'utiliser les marques de commerce du concédant, autre que celle requise permettant d'identifier la provenance du logiciel. - +7. Garanties +Sauf mention contraire, le concédant distribue le logiciel sans aucune garantie, aux risques et périls de l'acquéreur de la copie du logiciel, et ce, sans assurer que le logiciel puisse répondre à un besoin particulier ou puisse donner un résultat quelconque. - Cette licence est accordée sans limite territoriale et sans limite de temps. +Sans lier le concédant d'une quelconque manière, rien n'empêche un licencié d'offrir ou d'exclure des garanties ou du support. -L'exercice complet de ces droits est sujet à la distribution par le concédant -du code source du logiciel, lequel doit être sous une forme permettant d'y -apporter des modifications. Le concédant peut aussi distribuer le logiciel -accompagné d'une offre de distribuer le code source du logiciel, sans frais -supplémentaires, autres que ceux raisonnables afin de permettre la livraison -du code source. Cette offre doit être valide pendant une durée raisonnable. +8. Responsabilité +Le licencié est responsable de tout préjudice résultant de l'exercice des droits accordés par la licence. - 4. Distribution +Le concédant ne saurait être tenu responsable du préjudice subi par le licencié ou par des tiers, pour quelque cause que ce soit en lien avec la licence et les droits qui y sont accordés. -Le licencié peut distribuer des copies du logiciel, d'un logiciel modifié -ou dérivé, sous réserve de respecter les conditions suivantes : +9. Résiliation +La présente licence est résiliée de plein droit dès que les droits qui y sont accordés ne sont pas exercés conformément aux termes qui y sont stipulés. - 1  Le logiciel doit être accompagné d'un exemplaire de cette licence; +Toutefois, si le défaut est corrigé dans un délai de 30 jours de sa prise de connaissance par la personne en défaut, et qu'il s'agit du premier défaut, la licence est accordée de nouveau. -2  Si le logiciel a été modifié, le licencié doit en faire la mention, de -préférence dans chacun des fichiers modifiés dont la nature permet une telle -mention; +Pour tout défaut subséquent, le consentement exprès du concédant est nécessaire afin que la licence soit accordée de nouveau. -3  Les étiquettes ou mentions faisant état des droits d'auteur, des marques -de commerce, des garanties ou de la paternité concernant le logiciel ne doivent -pas être modifiées ou supprimées, à moins que ces étiquettes ou mentions ne -soient inapplicables à un logiciel modifié ou dérivé donné. +10. Version de la licence +Le Centre de services partagés du Québec, ses ayants cause ou toute personne qu'il désigne, peuvent diffuser des versions révisées ou modifiées de cette licence. Chaque version recevra un numéro unique. Si un logiciel est déjà soumis aux termes d'une version spécifique, c'est seulement cette version qui liera les parties à la licence. - 4.1. Réciprocité +Le concédant peut aussi choisir de concéder la licence sous la version actuelle ou toute version ultérieure, auquel cas le licencié peut choisir sous quelle version la licence lui est accordée. -Chaque fois que le licencié distribue le logiciel, le concédant offre au récipiendaire -une concession sur le logiciel selon les termes de la présente licence. Le -licencié doit offrir une concession selon les termes de la présente licence -pour tout logiciel modifié qu'il distribue. +11. Divers +Dans la mesure où le concédant est un ministère, un organisme public ou une personne morale de droit public, créés en vertu d'une loi de l'Assemblée nationale du Québec, la licence est régie par le droit applicable au Québec et en cas de contestation, les tribunaux du Québec seront seuls compétents. -Chaque fois que le licencié distribue le logiciel ou un logiciel modifié, -ce dernier doit assumer l'obligation d'en distribuer le code source, de la -manière prévue au troisième alinéa de l'article 3. - - 4.2. Compatibilité - -Dans la mesure où le licencié souhaite distribuer un logiciel modifié combiné -à un logiciel assujetti à une licence compatible, mais dont il ne serait pas -possible d'en respecter les termes, le concédant offre, en plus de la présente -concession, une concession selon les termes de cette licence compatible. - -Un licencié qui est titulaire exclusif du droit d'auteur sur le logiciel assujetti -à une licence compatible ne peut pas se prévaloir de cette offre. Il en est -de même pour toute autre personne dûment autorisée à sous-licencier par le -titulaire exclusif du droit d'auteur sur le logiciel assujetti à une licence -compatible. - -Est considérée comme une licence compatible toute licence libre approuvée -ou certifiée par la Free Software Foundation ou l'Open Source Initiative, -dont le niveau de réciprocité est comparable ou supérieur à celui de la présente -licence, sans toutefois être moindre, notamment : - - 1  Common Development and Distribution License (CDDL-1.0) - - 2  Common Public License Version 1.0 (CPL-1.0) - - 3  Contrat de licence de logiciel libre CeCILL, version 2.1 (CECILL-2.1) - - 4  Contrat de licence de logiciel libre CeCILL-C (CECILL-C) - - 5  Eclipse Public License - v 1.0 (EPL-1.0) - - 6  European Union Public License, version 1.1 (EUPL v. 1.1) - - 7  Licence Libre du Québec – Réciprocité forte version 1.1 (LiLiQ-R+ 1.1) - - 8  GNU General Public License Version 2 (GNU GPLv2) - - 9  GNU General Public License Version 3 (GNU GPLv3) - - 10  GNU Lesser General Public License Version 2.1 (GNU LGPLv2.1) - - 11  GNU Lesser General Public License Version 3 (GNU LGPLv3) - - 12  Mozilla Public License Version 2.0 (MPL-2.0) - - 5. Contributions - -Sous réserve d'une entente distincte, toute contribution soumise par un contributeur -au concédant pour inclusion dans le logiciel sera soumise aux termes de cette -licence. - - 6. Marques de commerce - -La licence n'accorde aucune permission particulière qui permettrait d'utiliser -les marques de commerce du concédant, autre que celle requise permettant d'identifier -la provenance du logiciel. - - 7. Garanties - -Sauf mention contraire, le concédant distribue le logiciel sans aucune garantie, -aux risques et périls de l'acquéreur de la copie du logiciel, et ce, sans -assurer que le logiciel puisse répondre à un besoin particulier ou puisse -donner un résultat quelconque. - -Sans lier le concédant d'une quelconque manière, rien n'empêche un licencié -d'offrir ou d'exclure des garanties ou du support. - - 8. Responsabilité - -Le licencié est responsable de tout préjudice résultant de l'exercice des -droits accordés par la licence. - -Le concédant ne saurait être tenu responsable du préjudice subi par le licencié -ou par des tiers, pour quelque cause que ce soit en lien avec la licence et -les droits qui y sont accordés. - - 9. Résiliation - -La présente licence est résiliée de plein droit dès que les droits qui y sont -accordés ne sont pas exercés conformément aux termes qui y sont stipulés. - -Toutefois, si le défaut est corrigé dans un délai de 30 jours de sa prise -de connaissance par la personne en défaut, et qu'il s'agit du premier défaut, -la licence est accordée de nouveau. - -Pour tout défaut subséquent, le consentement exprès du concédant est nécessaire -afin que la licence soit accordée de nouveau. - - 10. Version de la licence - -Le Centre de services partagés du Québec, ses ayants cause ou toute personne -qu'il désigne, peuvent diffuser des versions révisées ou modifiées de cette -licence. Chaque version recevra un numéro unique. Si un logiciel est déjà -soumis aux termes d'une version spécifique, c'est seulement cette version -qui liera les parties à la licence. - -Le concédant peut aussi choisir de concéder la licence sous la version actuelle -ou toute version ultérieure, auquel cas le licencié peut choisir sous quelle -version la licence lui est accordée. - - 11. Divers - -Dans la mesure où le concédant est un ministère, un organisme public ou une -personne morale de droit public, créés en vertu d'une loi de l'Assemblée nationale -du Québec, la licence est régie par le droit applicable au Québec et en cas -de contestation, les tribunaux du Québec seront seuls compétents. - -La présente licence peut être distribuée sans conditions particulières. Toutefois, -une version modifiée doit être distribuée sous un nom différent. Toute référence -au Centre de services partagés du Québec, et, le cas échéant, ses ayant droit, -doit être retirée, autre que celle permettant d'identifier la provenance de -la licence. +La présente licence peut être distribuée sans conditions particulières. Toutefois, une version modifiée doit être distribuée sous un nom différent. Toute référence au Centre de services partagés du Québec, et, le cas échéant, ses ayant droit, doit être retirée, autre que celle permettant d'identifier la provenance de la licence. diff --git a/options/license/LiLiQ-Rplus-1.1 b/options/license/LiLiQ-Rplus-1.1 index bf5c04c2a..58566cb1b 100644 --- a/options/license/LiLiQ-Rplus-1.1 +++ b/options/license/LiLiQ-Rplus-1.1 @@ -2,187 +2,87 @@ Licence Libre du Québec – Réciprocité forte (LiLiQ-R+) Version 1.1 - 1. Préambule +1. Préambule +Cette licence s'applique à tout logiciel distribué dont le titulaire du droit d'auteur précise qu'il est sujet aux termes de la Licence Libre du Québec – Réciprocité forte (LiLiQ-R+) (ci-après appelée la « licence »). -Cette licence s'applique à tout logiciel distribué dont le titulaire du droit -d'auteur précise qu'il est sujet aux termes de la Licence Libre du Québec -– Réciprocité forte (LiLiQ-R+) (ci-après appelée la « licence »). +2. Définitions +Dans la présente licence, à moins que le contexte n'indique un sens différent, on entend par: - 2. Définitions + « concédant » : le titulaire du droit d'auteur sur le logiciel, ou toute personne dûment autorisée par ce dernier à accorder la présente licence; + « contributeur » : le titulaire du droit d'auteur ou toute personne autorisée par ce dernier à soumettre au concédant une contribution. Un contributeur dont sa contribution est incorporée au logiciel est considéré comme un concédant en regard de sa contribution; + « contribution » : tout logiciel original, ou partie de logiciel original soumis et destiné à être incorporé dans le logiciel; + « distribution » : le fait de délivrer une copie du logiciel; + « licencié » : toute personne qui possède une copie du logiciel et qui exerce les droits concédés par la licence; + « logiciel » : une œuvre protégée par le droit d'auteur, telle qu'un programme d'ordinateur et sa documentation, pour laquelle le titulaire du droit d'auteur a précisé qu'elle est sujette aux termes de la présente licence; + « logiciel dérivé » : tout logiciel original réalisé par un licencié, autre que le logiciel ou un logiciel modifié, qui produit ou reproduit la totalité ou une partie importante du logiciel; + « logiciel modifié » : toute modification par un licencié de l'un des fichiers source du logiciel ou encore tout nouveau fichier source qui incorpore le logiciel ou une partie importante de ce dernier. -Dans la présente licence, à moins que le contexte n'indique un sens différent, -on entend par: +3. Licence de droit d'auteur +Sous réserve des termes de la licence, le concédant accorde au licencié une licence non exclusive et libre de redevances lui permettant d’exercer les droits suivants sur le logiciel : -« concédant » : le titulaire du droit d'auteur sur le logiciel, ou toute personne -dûment autorisée par ce dernier à accorder la présente licence; + 1 Produire ou reproduire la totalité ou une partie importante; + 2 Exécuter ou représenter la totalité ou une partie importante en public; + 3 Publier la totalité ou une partie importante. -« contributeur » : le titulaire du droit d'auteur ou toute personne autorisée -par ce dernier à soumettre au concédant une contribution. Un contributeur -dont sa contribution est incorporée au logiciel est considéré comme un concédant -en regard de sa contribution; +Cette licence est accordée sans limite territoriale et sans limite de temps. -« contribution » : tout logiciel original, ou partie de logiciel original -soumis et destiné à être incorporé dans le logiciel; +L'exercice complet de ces droits est sujet à la distribution par le concédant du code source du logiciel, lequel doit être sous une forme permettant d'y apporter des modifications. Le concédant peut aussi distribuer le logiciel accompagné d'une offre de distribuer le code source du logiciel, sans frais supplémentaires, autres que ceux raisonnables afin de permettre la livraison du code source. Cette offre doit être valide pendant une durée raisonnable. - « distribution » : le fait de délivrer une copie du logiciel; +4. Distribution +Le licencié peut distribuer des copies du logiciel, d'un logiciel modifié ou dérivé, sous réserve de respecter les conditions suivantes : -« licencié » : toute personne qui possède une copie du logiciel et qui exerce -les droits concédés par la licence; + 1 Le logiciel doit être accompagné d'un exemplaire de cette licence; + 2 Si le logiciel a été modifié, le licencié doit en faire la mention, de préférence dans chacun des fichiers modifiés dont la nature permet une telle mention; + 3 Les étiquettes ou mentions faisant état des droits d'auteur, des marques de commerce, des garanties ou de la paternité concernant le logiciel ne doivent pas être modifiées ou supprimées, à moins que ces étiquettes ou mentions ne soient inapplicables à un logiciel modifié ou dérivé donné. -« logiciel » : une œuvre protégée par le droit d'auteur, telle qu'un programme -d'ordinateur et sa documentation, pour laquelle le titulaire du droit d'auteur -a précisé qu'elle est sujette aux termes de la présente licence; +4.1. Réciprocité +Chaque fois que le licencié distribue le logiciel, le concédant offre au récipiendaire une concession sur le logiciel selon les termes de la présente licence. Le licencié doit offrir une concession selon les termes de la présente licence pour tout logiciel modifié ou dérivé qu'il distribue. -« logiciel dérivé » : tout logiciel original réalisé par un licencié, autre -que le logiciel ou un logiciel modifié, qui produit ou reproduit la totalité -ou une partie importante du logiciel; +Chaque fois que le licencié distribue le logiciel, un logiciel modifié, ou un logiciel dérivé, ce dernier doit assumer l'obligation d'en distribuer le code source, de la manière prévue au troisième alinéa de l'article 3. -« logiciel modifié » : toute modification par un licencié de l'un des fichiers -source du logiciel ou encore tout nouveau fichier source qui incorpore le -logiciel ou une partie importante de ce dernier. +4.2. Compatibilité +Dans la mesure où le licencié souhaite distribuer un logiciel modifié ou dérivé combiné à un logiciel assujetti à une licence compatible, mais dont il ne serait pas possible d'en respecter les termes, le concédant offre, en plus de la présente concession, une concession selon les termes de cette licence compatible. - 3. Licence de droit d'auteur +Un licencié qui est titulaire exclusif du droit d'auteur sur le logiciel assujetti à une licence compatible ne peut pas se prévaloir de cette offre. Il en est de même pour toute autre personne dûment autorisée à sous-licencier par le titulaire exclusif du droit d'auteur sur le logiciel assujetti à une licence compatible. -Sous réserve des termes de la licence, le concédant accorde au licencié une -licence non exclusive et libre de redevances lui permettant d'exercer les -droits suivants sur le logiciel: +Est considérée comme une licence compatible toute licence libre approuvée ou certifiée par la Free Software Foundation ou l'Open Source Initiative, dont le niveau de réciprocité est comparable à celui de la présente licence, sans toutefois être moindre, notamment : - 1 Produire ou reproduire la totalité ou une partie importante; + 1 Common Public License Version 1.0 (CPL-1.0) + 2 Contrat de licence de logiciel libre CeCILL, version 2.1 (CECILL-2.1) + 3 Eclipse Public License - v 1.0 (EPL-1.0) + 4 European Union Public License, version 1.1 (EUPL v. 1.1) + 5 GNU General Public License Version 2 (GNU GPLv2) + 6 GNU General Public License Version 3 (GNU GPLv3) - 2 Exécuter ou représenter la totalité ou une partie importante en public; +5. Contributions +Sous réserve d'une entente distincte, toute contribution soumise par un contributeur au concédant pour inclusion dans le logiciel sera soumise aux termes de cette licence. - 3 Publier la totalité ou une partie importante. +6. Marques de commerce +La licence n'accorde aucune permission particulière qui permettrait d'utiliser les marques de commerce du concédant, autre que celle requise permettant d'identifier la provenance du logiciel. - Cette licence est accordée sans limite territoriale et sans limite de temps. +7. Garanties +Sauf mention contraire, le concédant distribue le logiciel sans aucune garantie, aux risques et périls de l'acquéreur de la copie du logiciel, et ce, sans assurer que le logiciel puisse répondre à un besoin particulier ou puisse donner un résultat quelconque. -L'exercice complet de ces droits est sujet à la distribution par le concédant -du code source du logiciel, lequel doit être sous une forme permettant d'y -apporter des modifications. Le concédant peut aussi distribuer le logiciel -accompagné d'une offre de distribuer le code source du logiciel, sans frais -supplémentaires, autres que ceux raisonnables afin de permettre la livraison -du code source. Cette offre doit être valide pendant une durée raisonnable. +Sans lier le concédant d'une quelconque manière, rien n'empêche un licencié d'offrir ou d'exclure des garanties ou du support. - 4. Distribution +8. Responsabilité +Le licencié est responsable de tout préjudice résultant de l'exercice des droits accordés par la licence. -Le licencié peut distribuer des copies du logiciel, d'un logiciel modifié -ou dérivé, sous réserve de respecter les conditions suivantes : +Le concédant ne saurait être tenu responsable du préjudice subi par le licencié ou par des tiers, pour quelque cause que ce soit en lien avec la licence et les droits qui y sont accordés. - 1 Le logiciel doit être accompagné d'un exemplaire de cette licence; +9. Résiliation +La présente licence est résiliée de plein droit dès que les droits qui y sont accordés ne sont pas exercés conformément aux termes qui y sont stipulés. -2 Si le logiciel a été modifié, le licencié doit en faire la mention, de préférence -dans chacun des fichiers modifiés dont la nature permet une telle mention; +Toutefois, si le défaut est corrigé dans un délai de 30 jours de sa prise de connaissance par la personne en défaut, et qu'il s'agit du premier défaut, la licence est accordée de nouveau. -3 Les étiquettes ou mentions faisant état des droits d'auteur, des marques -de commerce, des garanties ou de la paternité concernant le logiciel ne doivent -pas être modifiées ou supprimées, à moins que ces étiquettes ou mentions ne -soient inapplicables à un logiciel modifié ou dérivé donné. +Pour tout défaut subséquent, le consentement exprès du concédant est nécessaire afin que la licence soit accordée de nouveau. - 4.1. Réciprocité +10. Version de la licence +Le Centre de services partagés du Québec, ses ayants cause ou toute personne qu'il désigne, peuvent diffuser des versions révisées ou modifiées de cette licence. Chaque version recevra un numéro unique. Si un logiciel est déjà soumis aux termes d'une version spécifique, c'est seulement cette version qui liera les parties à la licence. -Chaque fois que le licencié distribue le logiciel, le concédant offre au récipiendaire -une concession sur le logiciel selon les termes de la présente licence. Le -licencié doit offrir une concession selon les termes de la présente licence -pour tout logiciel modifié ou dérivé qu'il distribue. +Le concédant peut aussi choisir de concéder la licence sous la version actuelle ou toute version ultérieure, auquel cas le licencié peut choisir sous quelle version la licence lui est accordée. -Chaque fois que le licencié distribue le logiciel, un logiciel modifié, ou -un logiciel dérivé, ce dernier doit assumer l'obligation d'en distribuer le -code source, de la manière prévue au troisième alinéa de l'article 3. +11. Divers +Dans la mesure où le concédant est un ministère, un organisme public ou une personne morale de droit public, créés en vertu d'une loi de l'Assemblée nationale du Québec, la licence est régie par le droit applicable au Québec et en cas de contestation, les tribunaux du Québec seront seuls compétents. - 4.2. Compatibilité - -Dans la mesure où le licencié souhaite distribuer un logiciel modifié ou dérivé -combiné à un logiciel assujetti à une licence compatible, mais dont il ne -serait pas possible d'en respecter les termes, le concédant offre, en plus -de la présente concession, une concession selon les termes de cette licence -compatible. - -Un licencié qui est titulaire exclusif du droit d'auteur sur le logiciel assujetti -à une licence compatible ne peut pas se prévaloir de cette offre. Il en est -de même pour toute autre personne dûment autorisée à sous-licencier par le -titulaire exclusif du droit d'auteur sur le logiciel assujetti à une licence -compatible. - -Est considérée comme une licence compatible toute licence libre approuvée -ou certifiée par la Free Software Foundation ou l'Open Source Initiative, -dont le niveau de réciprocité est comparable à celui de la présente licence, -sans toutefois être moindre, notamment: - - 1 Common Public License Version 1.0 (CPL-1.0) - - 2 Contrat de licence de logiciel libre CeCILL, version 2.1 (CECILL-2.1) - - 3 Eclipse Public License - v 1.0 (EPL-1.0) - - 4 European Union Public License, version 1.1 (EUPL v. 1.1) - - 5 GNU General Public License Version 2 (GNU GPLv2) - - 6 GNU General Public License Version 3 (GNU GPLv3) - - 5. Contributions - -Sous réserve d'une entente distincte, toute contribution soumise par un contributeur -au concédant pour inclusion dans le logiciel sera soumise aux termes de cette -licence. - - 6. Marques de commerce - -La licence n'accorde aucune permission particulière qui permettrait d'utiliser -les marques de commerce du concédant, autre que celle requise permettant d'identifier -la provenance du logiciel. - - 7. Garanties - -Sauf mention contraire, le concédant distribue le logiciel sans aucune garantie, -aux risques et périls de l'acquéreur de la copie du logiciel, et ce, sans -assurer que le logiciel puisse répondre à un besoin particulier ou puisse -donner un résultat quelconque. - -Sans lier le concédant d'une quelconque manière, rien n'empêche un licencié -d'offrir ou d'exclure des garanties ou du support. - - 8. Responsabilité - -Le licencié est responsable de tout préjudice résultant de l'exercice des -droits accordés par la licence. - -Le concédant ne saurait être tenu responsable du préjudice subi par le licencié -ou par des tiers, pour quelque cause que ce soit en lien avec la licence et -les droits qui y sont accordés. - - 9. Résiliation - -La présente licence est résiliée de plein droit dès que les droits qui y sont -accordés ne sont pas exercés conformément aux termes qui y sont stipulés. - -Toutefois, si le défaut est corrigé dans un délai de 30 jours de sa prise -de connaissance par la personne en défaut, et qu'il s'agit du premier défaut, -la licence est accordée de nouveau. - -Pour tout défaut subséquent, le consentement exprès du concédant est nécessaire -afin que la licence soit accordée de nouveau. - - 10. Version de la licence - -Le Centre de services partagés du Québec, ses ayants cause ou toute personne -qu'il désigne, peuvent diffuser des versions révisées ou modifiées de cette -licence. Chaque version recevra un numéro unique. Si un logiciel est déjà -soumis aux termes d'une version spécifique, c'est seulement cette version -qui liera les parties à la licence. - -Le concédant peut aussi choisir de concéder la licence sous la version actuelle -ou toute version ultérieure, auquel cas le licencié peut choisir sous quelle -version la licence lui est accordée. - - 11. Divers - -Dans la mesure où le concédant est un ministère, un organisme public ou une -personne morale de droit public, créés en vertu d'une loi de l'Assemblée nationale -du Québec, la licence est régie par le droit applicable au Québec et en cas -de contestation, les tribunaux du Québec seront seuls compétents. - -La présente licence peut être distribuée sans conditions particulières. Toutefois, -une version modifiée doit être distribuée sous un nom différent. Toute référence -au Centre de services partagés du Québec, et, le cas échéant, ses ayant cause, -doit être retirée, autre que celle permettant d'identifier la provenance de -la licence. +La présente licence peut être distribuée sans conditions particulières. Toutefois, une version modifiée doit être distribuée sous un nom différent. Toute référence au Centre de services partagés du Québec, et, le cas échéant, ses ayant cause, doit être retirée, autre que celle permettant d'identifier la provenance de la licence. diff --git a/options/license/Libpng b/options/license/Libpng index 4b8f0725a..528785544 100644 --- a/options/license/Libpng +++ b/options/license/Libpng @@ -1,127 +1,76 @@ -This copy of the libpng notices is provided for your convenience. In case -of any discrepancy between this copy and the notices in the file png.h that -is included in the libpng distribution, the latter shall prevail. +This copy of the libpng notices is provided for your convenience. In case of any discrepancy between this copy and the notices in the file png.h that is included in the libpng distribution, the latter shall prevail. COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: -If you modify libpng you may insert additional notices immediately following -this sentence. +If you modify libpng you may insert additional notices immediately following this sentence. This code is released under the libpng license. -libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are -Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are distributed according -to the same disclaimer and license as libpng-1.2.5 with the following individual -added to the list of Contributing Authors +libpng versions 1.2.6, August 15, 2004, through 1.4.5, December 9, 2010, are Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.2.5 with the following individual added to the list of Contributing Authors -Cosmin Truta + Cosmin Truta libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors -Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are distributed according -to the same disclaimer and license as libpng-1.0.6 with the following individuals -added to the list of Contributing Authors - -Simon-Pierre Cadieux - -Eric S. Raymond - -Gilles Vollant + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant and with the following additions to the disclaimer: -There is no warranty against interference with your enjoyment of the library -or against infringement. There is no warranty that our efforts or the library -will fulfill any of your particular purposes or needs. This library is provided -with all faults, and the entire risk of satisfactory quality, performance, -accuracy, and effort is with the user. + There is no warranty against interference with your enjoyment of the library or against infringement. There is no warranty that our efforts or the library will fulfill any of your particular purposes or needs. This library is provided with all faults, and the entire risk of satisfactory quality, performance, accuracy, and effort is with the user. libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are distributed according to the same disclaimer and license as libpng-0.96, with the following individuals added to the list of Contributing Authors: -Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are distributed according -to the same disclaimer and license as libpng-0.96, with the following individuals -added to the list of Contributing Authors: - -Tom Lane - -Glenn Randers-Pehrson - -Willem van Schaik + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik libpng versions 0.89, June 1996, through 0.96, May 1997, are - Copyright (c) 1996, 1997 Andreas Digger +Distributed according to the same disclaimer and license as libpng-0.88, with the following individuals added to the list of Contributing Authors: -Distributed according to the same disclaimer and license as libpng-0.88, with -the following individuals added to the list of Contributing Authors: - -John Bowler - -Kevin Bracey - -Sam Bushell - -Magnus Holmgren - -Greg Roelofs - -Tom Tanner + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner libpng versions 0.5, May 1995, through 0.88, January 1996, are - Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. -For the purposes of this copyright and license, "Contributing Authors" is -defined as the following set of individuals: +For the purposes of this copyright and license, "Contributing Authors" is defined as the following set of individuals: -Andreas Dilger + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner -Dave Martindale +The PNG Reference Library is supplied "AS IS". The Contributing Authors and Group 42, Inc. disclaim all warranties, expressed or implied, including, without limitation, the warranties of merchantability and of fitness for any purpose. The Contributing Authors and Group 42, Inc. assume no liability for direct, indirect, incidental, special, exemplary, or consequential damages, which may result from the use of the PNG Reference Library, even if advised of the possibility of such damage. -Guy Eric Schalnat +Permission is hereby granted to use, copy, modify, and distribute this source code, or portions hereof, for any purpose, without fee, subject to the following restrictions: -Paul Schmidt +1. The origin of this source code must not be misrepresented. -Tim Wegner +2. Altered versions must be plainly marked as such and must not be misrepresented as being the original source. -The PNG Reference Library is supplied "AS IS". The Contributing Authors and -Group 42, Inc. disclaim all warranties, expressed or implied, including, without -limitation, the warranties of merchantability and of fitness for any purpose. -The Contributing Authors and Group 42, Inc. assume no liability for direct, -indirect, incidental, special, exemplary, or consequential damages, which -may result from the use of the PNG Reference Library, even if advised of the -possibility of such damage. +3. This Copyright notice may not be removed or altered from any source or altered source distribution. -Permission is hereby granted to use, copy, modify, and distribute this source -code, or portions hereof, for any purpose, without fee, subject to the following -restrictions: +The Contributing Authors and Group 42, Inc. specifically permit, without fee, and encourage the use of this source code as a component to supporting the PNG file format in commercial products. If you use this source code in a product, acknowledgment is not required but would be appreciated. - 1. The origin of this source code must not be misrepresented. -2. Altered versions must be plainly marked as such and must not be misrepresented -as being the original source. +A "png_get_copyright" function is available, for convenient use in "about" boxes and the like: -3. This Copyright notice may not be removed or altered from any source or -altered source distribution. + printf("%s",png_get_copyright(NULL)); -The Contributing Authors and Group 42, Inc. specifically permit, without fee, -and encourage the use of this source code as a component to supporting the -PNG file format in commercial products. If you use this source code in a product, -acknowledgment is not required but would be appreciated. +Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). -A "png_get_copyright" function is available, for convenient use in "about" -boxes and the like: - -printf("%s",png_get_copyright(NULL)); - -Also, the PNG logo (in PNG format, of course) is supplied in the files "pngbar.png" -and "pngbar.jpg (88x31) and "pngnow.png" (98x31). - -Libpng is OSI Certified Open Source Software. OSI Certified Open Source is -a certification mark of the Open Source Initiative. +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a certification mark of the Open Source Initiative. Glenn Randers-Pehrson - glennrp at users.sourceforge.net - December 9, 2010 diff --git a/options/license/Linux-OpenIB b/options/license/Linux-OpenIB index 6e731f9e0..03ccf61cc 100644 --- a/options/license/Linux-OpenIB +++ b/options/license/Linux-OpenIB @@ -1,5 +1,6 @@ -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the following +conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. @@ -9,8 +10,9 @@ this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/options/license/Linux-syscall-note b/options/license/Linux-syscall-note index 82054e669..fcd056364 100644 --- a/options/license/Linux-syscall-note +++ b/options/license/Linux-syscall-note @@ -1,5 +1,12 @@ -NOTE! This copyright does *not* cover user programs that use kernel services by normal system calls - this is merely considered normal use of the kernel, and does *not* fall under the heading of "derived work". Also note that the GPL below is copyrighted by the Free Software Foundation, but the instance of code that it refers to (the Linux kernel) is copyrighted by me and others who actually wrote it. + NOTE! This copyright does *not* cover user programs that use kernel + services by normal system calls - this is merely considered normal use + of the kernel, and does *not* fall under the heading of "derived work". + Also note that the GPL below is copyrighted by the Free Software + Foundation, but the instance of code that it refers to (the Linux + kernel) is copyrighted by me and others who actually wrote it. -Also note that the only valid version of the GPL as far as the kernel is concerned is _this_ particular version of the license (ie v2, not v2.2 or v3.x or whatever), unless explicitly otherwise stated. + Also note that the only valid version of the GPL as far as the kernel + is concerned is _this_ particular version of the license (ie v2, not + v2.2 or v3.x or whatever), unless explicitly otherwise stated. -Linus Torvalds + Linus Torvalds diff --git a/options/license/MIT b/options/license/MIT index 204b93da4..2071b23b0 100644 --- a/options/license/MIT +++ b/options/license/MIT @@ -1,19 +1,9 @@ -MIT License Copyright (c) +MIT License -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Copyright (c) -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/MIT-0 b/options/license/MIT-0 index 973413d0f..a4e9dc906 100644 --- a/options/license/MIT-0 +++ b/options/license/MIT-0 @@ -1,15 +1,16 @@ -MIT No Attribution Copyright +MIT No Attribution -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so. +Copyright -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/MIT-CMU b/options/license/MIT-CMU index 81c351b2e..2b11a7b08 100644 --- a/options/license/MIT-CMU +++ b/options/license/MIT-CMU @@ -1,17 +1,7 @@ - By obtaining, using, and/or copying this software and/or -its associated documentation, you agree that you have read, understood, and -will comply with the following terms and conditions: + -Permission to use, copy, modify, and distribute this software and its associated -documentation for any purpose and without fee is hereby granted, provided -that the above copyright notice appears in all copies, and that both that -copyright notice and this permission notice appear in supporting documentation, -and that the name of the copyright holder not be used in advertising or publicity -pertaining to distribution of the software without specific, written permission. +By obtaining, using, and/or copying this software and/or its associated documentation, you agree that you have read, understood, and will comply with the following terms and conditions: -THE COPYRIGHT HOLDER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, -INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT -SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM THE LOSS OF USE, DATA OR -PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Permission to use, copy, modify, and distribute this software and its associated documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies, and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of the copyright holder not be used in advertising or publicity pertaining to distribution of the software without specific, written permission. + +THE COPYRIGHT HOLDER DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/MIT-Modern-Variant b/options/license/MIT-Modern-Variant new file mode 100644 index 000000000..d5075a3c9 --- /dev/null +++ b/options/license/MIT-Modern-Variant @@ -0,0 +1,17 @@ +Permission is hereby granted, without written agreement and without +license or royalty fees, to use, copy, modify, and distribute this +software and its documentation for any purpose, provided that the +above copyright notice and the following two paragraphs appear in +all copies of this software. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN +IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGE. + +THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS +ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO +PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. diff --git a/options/license/MIT-advertising b/options/license/MIT-advertising index cce62367a..4a991a734 100644 --- a/options/license/MIT-advertising +++ b/options/license/MIT-advertising @@ -1,21 +1,7 @@ -Copyright (C) 2000-2008 Carsten Haitzler, Geoff Harrison and various contributors -Copyright (C) 2004-2008 Kim Woelders +Copyright (C) 2000-2008 Carsten Haitzler, Geoff Harrison and various contributors Copyright (C) 2004-2008 Kim Woelders -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies of the Software, its documentation and marketing & publicity materials, -and acknowledgment shall be given in the documentation, materials and software -packages that this Software was used. +The above copyright notice and this permission notice shall be included in all copies of the Software, its documentation and marketing & publicity materials, and acknowledgment shall be given in the documentation, materials and software packages that this Software was used. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/MIT-enna b/options/license/MIT-enna index c58209728..6d6dd6032 100644 --- a/options/license/MIT-enna +++ b/options/license/MIT-enna @@ -1,27 +1,9 @@ Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS) -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies of the Software and its Copyright notices. In addition publicly -documented acknowledgment must be given that this software has been used if -no source code of this software is made available publicly. This includes -acknowledgments in either Copyright notices, Manuals, Publicity and Marketing -documents or any documentation provided with any product containing this software. -This License does not apply to any software that links to the libraries provided -by this software (statically or dynamically), but only to the software provided. +The above copyright notice and this permission notice shall be included in all copies of the Software and its Copyright notices. In addition publicly documented acknowledgment must be given that this software has been used if no source code of this software is made available publicly. This includes acknowledgments in either Copyright notices, Manuals, Publicity and Marketing documents or any documentation provided with any product containing this software. This License does not apply to any software that links to the libraries provided by this software (statically or dynamically), but only to the software provided. -Please see the COPYING.PLAIN for a plain-english explanation of this notice -and it's intent. +Please see the COPYING.PLAIN for a plain-english explanation of this notice and it's intent. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/MIT-feh b/options/license/MIT-feh index e5b41c175..33412bad7 100644 --- a/options/license/MIT-feh +++ b/options/license/MIT-feh @@ -1,18 +1,5 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies of the Software and its documentation and acknowledgment shall -be given in the documentation and software packages that this Software was -used. +The above copyright notice and this permission notice shall be included in all copies of the Software and its documentation and acknowledgment shall be given in the documentation and software packages that this Software was used. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/MIT-open-group b/options/license/MIT-open-group new file mode 100644 index 000000000..ff185d30e --- /dev/null +++ b/options/license/MIT-open-group @@ -0,0 +1,23 @@ +Copyright The Open Group + +Permission to use, copy, modify, distribute, and sell this software and +its documentation for any purpose is hereby granted without fee, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation. + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL BE LIABLE FOR ANY CLAIM, DAMAGES +OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +from The Open Group. diff --git a/options/license/MITNFA b/options/license/MITNFA index 8fc18675d..6d44edb3d 100644 --- a/options/license/MITNFA +++ b/options/license/MITNFA @@ -1,24 +1,7 @@ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -Distributions of all or part of the Software intended to be used by the recipients -as they would use the unmodified Software, containing modifications that substantially -alter, remove, or disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be modified such -that the Original Author's bug reporting email addresses and urls are either -replaced with the contact information of the parties responsible for the changes, -or removed entirely. +Distributions of all or part of the Software intended to be used by the recipients as they would use the unmodified Software, containing modifications that substantially alter, remove, or disable functionality of the Software, outside of the documented configuration mechanisms provided by the Software, shall be modified such that the Original Author's bug reporting email addresses and urls are either replaced with the contact information of the parties responsible for the changes, or removed entirely. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/MPL-1.0 b/options/license/MPL-1.0 index 965a50b51..5ffd54be9 100644 --- a/options/license/MPL-1.0 +++ b/options/license/MPL-1.0 @@ -1,332 +1,123 @@ MOZILLA PUBLIC LICENSE - Version 1.0 - 1. Definitions. +1. Definitions. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. ``Contributor'' means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. ``Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. ``Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. ``Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. - -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.5. ``Executable'' means Covered Code in any form other than Source Code. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.6. ``Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. - 1.8. "License" means this document. - -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: - -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + 1.7. ``Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -B. Any new file that contains any part of the Original Code or previous Modifications. + 1.8. ``License'' means this document. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or a list of source code differential comparisons against -either the Original Code or another well known, available Covered Code of -the Contributor's choice. The Source Code can be in a compressed or archival -form, provided the appropriate decompression or de-archiving software is widely -available for no charge. - -1.12. "You" means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of fifty percent (50%) or more -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - - 2.1. The Initial Developer Grant. - -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: - -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Original Code (or portions thereof) with or without Modifications, or -as part of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Initial Developer, -to make, have made, use and sell ("Utilize") the Original Code (or portions -thereof), but solely to the extent that any such patent is reasonably necessary -to enable You to Utilize the Original Code (or portions thereof) and not to -any greater extent that may be necessary to Utilize further Modifications -or combinations. - - 2.2. Contributor Grant. - -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: - -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Modifications created by such Contributor (or portions thereof) either -on an unmodified basis, with other Modifications, as Covered Code or as part -of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Contributor, to -Utilize the Contributor Version (or portions thereof), but solely to the extent -that any such patent is reasonably necessary to enable You to Utilize the -Contributor Version (or portions thereof), and not to any greater extent that -may be necessary to Utilize further Modifications or combinations. - - 3. Distribution Obligations. - - 3.1. Application of License. - -The Modifications which You create or to which You contribute are governed -by the terms of this License, including without limitation Section 2.2. The -Source Code version of Covered Code may be distributed only under the terms -of this License or a future version of this License released under Section -6.1, and You must include a copy of this License with every copy of the Source -Code You distribute. You may not offer or impose any terms on any Source Code -version that alters or restricts the applicable version of this License or -the recipients' rights hereunder. However, You may include an additional document -offering the additional rights described in Section 3.5. - - 3.2. Availability of Source Code. - -Any Modification which You create or to which You contribute must be made -available in Source Code form under the terms of this License either on the -same media as an Executable version or via an accepted Electronic Distribution -Mechanism to anyone to whom you made an Executable version available; and -if made available via Electronic Distribution Mechanism, must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of that particular Modification -has been made available to such recipients. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - -You must cause all Covered Code to which you contribute to contain a file -documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification -is derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - - (a) Third Party Claims. - -If You have knowledge that a party claims an intellectual property right in -particular functionality or code (or its utilization under this License), -you must include a text file with the source code distribution titled "LEGAL" -which describes the claim and the party making the claim in sufficient detail -that a recipient will know whom to contact. If you obtain such knowledge after -You make Your Modification available as described in Section 3.2, You shall -promptly modify the LEGAL file in all copies You make available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Code that new knowledge has been obtained. - - (b) Contributor APIs. - -If Your Modification is an application programming interface and You own or -control patents which are reasonably necessary to implement that API, you -must also include this information in the LEGAL file. - - 3.5. Required Notices. - -You must duplicate the notice in Exhibit A in each file of the Source Code, -and this License in any documentation for the Source Code, where You describe -recipients' rights relating to Covered Code. If You created one or more Modification(s), -You may add your name as a Contributor to the notice described in Exhibit -A. If it is not possible to put such notice in a particular Source Code file -due to its structure, then you must include such notice in a location (such -as a relevant directory file) where a user would be likely to look for such -a notice. You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered Code. -However, You may do so only on Your own behalf, and not on behalf of the Initial -Developer or any Contributor. You must make it absolutely clear than any such -warranty, support, indemnity or liability obligation is offered by You alone, -and You hereby agree to indemnify the Initial Developer and every Contributor -for any liability incurred by the Initial Developer or such Contributor as -a result of warranty, support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - -You may distribute Covered Code in Executable form only if the requirements -of Section 3.1-3.5 have been met for that Covered Code, and if You include -a notice stating that the Source Code version of the Covered Code is available -under the terms of this License, including a description of how and where -You have fulfilled the obligations of Section 3.2. The notice must be conspicuously -included in any notice in an Executable version, related documentation or -collateral in which You describe recipients' rights relating to the Covered -Code. You may distribute the Executable version of Covered Code under a license -of Your choice, which may contain terms different from this License, provided -that You are in compliance with the terms of this License and that the license -for the Executable version does not attempt to limit or alter the recipient's -rights in the Source Code version from the rights set forth in this License. -If You distribute the Executable version under a different license You must -make it absolutely clear that any terms which differ from this License are -offered by You alone, not by the Initial Developer or any Contributor. You -hereby agree to indemnify the Initial Developer and every Contributor for -any liability incurred by the Initial Developer or such Contributor as a result -of any such terms You offer. - - 3.7. Larger Works. - -You may create a Larger Work by combining Covered Code with other code not -governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute or regulation -then You must: (a) comply with the terms of this License to the maximum extent -possible; and (b) describe the limitations and the code they affect. Such -description must be included in the LEGAL file described in Section 3.4 and -must be included with all distributions of the Source Code. Except to the -extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A, and to related Covered Code. - - 6. Versions of the License. - - 6.1. New Versions. - -Netscape Communications Corporation ("Netscape") may publish revised and/or -new versions of the License from time to time. Each version will be given -a distinguishing version number. - - 6.2. Effect of New Versions. - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License published by Netscape. No one other than Netscape has the right -to modify the terms applicable to Covered Code created under this License. - - 6.3. Derivative Works. - -If you create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), you must (a) rename Your license so that the phrases "Mozilla", -"MOZILLAPL", "MOZPL", "Netscape", "NPL" or any confusingly similar phrase -do not appear anywhere in your license and (b) otherwise make it clear that -your version of the license contains terms which differ from the Mozilla Public -License and Netscape Public License. (Filling in the name of the Initial Developer, -Original Code or Contributor in the notice described in Exhibit A shall not -of themselves be deemed to be modifications of this License.) - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER -CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF -SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, -OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL -HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING -FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in, the United States -of America: (a) unless otherwise agreed in writing, all disputes relating -to this License (excepting any dispute relating to intellectual property rights) -shall be subject to final and binding arbitration, with the losing party paying -all costs of arbitration; (b) any arbitration relating to this Agreement shall -be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; -and (c) any litigation relating to this Agreement shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -Except in cases where another Contributor has failed to comply with Section -3.4, You are responsible for damages arising, directly or indirectly, out -of Your utilization of rights under this License, based on the number of copies -of Covered Code you made available, the revenues you received from utilizing -such rights, and other relevant factors. You agree to work with affected parties -to distribute responsibility on an equitable basis. EXHIBIT A. - -"The contents of this file are subject to the Mozilla Public License Version -1.0 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - -The Original Code is _____ . The Initial Developer of the Original Code is -_____ . Portions created by _____ are Copyright (C) _____ . All Rights Reserved. -Contributor(s): _____ ." + 1.9. ``Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: + + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or previous Modifications. + + 1.10. ``Original Code'' means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + + 1.11. ``Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + + 1.12. ``You'' means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, ``You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, ``control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. +The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and + + (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell (``Utilize'') the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations. + + 2.2. Contributor Grant. +Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and + + (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations. + +3. Distribution Obligations. + + 3.1. Application of License. + The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. + Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. + You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + + (a) Third Party Claims. + If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled ``LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. + If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netscape Communications Corporation (``Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. + + 6.3. Derivative Works. + If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. +This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. +The Covered Code is a ``commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer software'' and ``commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the United States of America: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. +Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis. + +EXHIBIT A. + +``The contents of this file are subject to the Mozilla Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. + +The Original Code is ______________________________________. + +The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. + +Contributor(s): ______________________________________.'' diff --git a/options/license/MPL-1.1 b/options/license/MPL-1.1 index b45d0e15f..e1c842828 100644 --- a/options/license/MPL-1.1 +++ b/options/license/MPL-1.1 @@ -1,422 +1,143 @@ Mozilla Public License Version 1.1 - 1. Definitions. +1. Definitions. -1.0.1. "Commercial Use" means distribution or otherwise making the Covered -Code available to a third party. + 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. - -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: - -Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: +Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. Any new file that contains any part of the Original Code or previous Modifications. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. - -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. - -1.12. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license, subject to third party -intellectual property claims: - -a. under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and - -b. under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). - -c. the licenses granted in this Section 2.1 (a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. - -d. Notwithstanding Section 2.1 (b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices. - -2.2. Contributor Grant. Subject to third party intellectual property claims, -each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license - -a. under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and - -b. under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). - -c. the licenses granted in Sections 2.2 (a) and 2.2 (b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. - -d. Notwithstanding Section 2.2 (b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. - -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable version or -via an accepted Electronic Distribution Mechanism to anyone to whom you made -an Executable version available; and if made available via Electronic Distribution -Mechanism, must remain available for at least twelve (12) months after the -date it initially became available, or at least six (6) months after a subsequent -version of that particular Modification has been made available to such recipients. -You are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - -3.3. Description of Modifications. You must cause all Covered Code to which -You contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. - - 3.4. Intellectual Property Matters - - (a) Third Party Claims - -If Contributor has knowledge that a license under a third party's intellectual -property rights is required to exercise the rights granted by such Contributor -under Sections 2.1 or 2.2, Contributor must include a text file with the Source -Code distribution titled "LEGAL" which describes the claim and the party making -the claim in sufficient detail that a recipient will know whom to contact. -If Contributor obtains such knowledge after the Modification is made available -as described in Section 3.2, Contributor shall promptly modify the LEGAL file -in all copies Contributor makes available thereafter and shall take other -steps (such as notifying appropriate mailing lists or newsgroups) reasonably -calculated to inform those who received the Covered Code that new knowledge -has been obtained. - - (b) Contributor APIs - -If Contributor's Modifications include an application programming interface -and Contributor has knowledge of patent licenses which are reasonably necessary -to implement that API, Contributor must also include this information in the -LEGAL file. - - (c) Representations. - -Contributor represents that, except as disclosed pursuant to Section 3.4 (a) -above, Contributor believes that Contributor's Modifications are Contributor's -original creation(s) and/or Contributor has sufficient rights to grant the -rights conveyed by this License. - -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be likely to -look for such a notice. If You created one or more Modification(s) You may -add your name as a Contributor to the notice described in Exhibit A. You must -also duplicate this License in any documentation for the Source Code where -You describe recipients' rights or ownership rights relating to Covered Code. -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Covered Code. However, -You may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for -any liability incurred by the Initial Developer or such Contributor as a result -of warranty, support, indemnity or liability terms You offer. - -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Sections 3.1, 3.2, 3.3, 3.4 -and 3.5 have been met for that Covered Code, and if You include a notice stating -that the Source Code version of the Covered Code is available under the terms -of this License, including a description of how and where You have fulfilled -the obligations of Section 3.2. The notice must be conspicuously included -in any notice in an Executable version, related documentation or collateral -in which You describe recipients' rights relating to the Covered Code. You -may distribute the Executable version of Covered Code or ownership rights -under a license of Your choice, which may contain terms different from this -License, provided that You are in compliance with the terms of this License -and that the license for the Executable version does not attempt to limit -or alter the recipient's rights in the Source Code version from the rights -set forth in this License. If You distribute the Executable version under -a different license You must make it absolutely clear that any terms which -differ from this License are offered by You alone, not by the Initial Developer -or any Contributor. You hereby agree to indemnify the Initial Developer and -every Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer. - -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - - 6. Versions of the License. - - 6.1. New Versions - -Netscape Communications Corporation ("Netscape") may publish revised and/or -new versions of the License from time to time. Each version will be given -a distinguishing version number. - - 6.2. Effect of New Versions - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License published by Netscape. No one other than Netscape has the right -to modify the terms applicable to Covered Code created under this License. - - 6.3. Derivative Works - -If You create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), You must (a) rename Your license so that the phrases "Mozilla", -"MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar -phrase do not appear in your license (except to note that your license differs -from this License) and (b) otherwise make it clear that Your version of the -license contains terms which differ from the Mozilla Public License and Netscape -Public License. (Filling in the name of the Initial Developer, Original Code -or Contributor in the notice described in Exhibit A shall not of themselves -be deemed to be modifications of this License.) - - 7. DISCLAIMER OF WARRANTY - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. Termination - -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - -8.2. If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: - -a. such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. - -b. any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. - -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - - 9. LIMITATION OF LIABILITY - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. government end users - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. Miscellaneous - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. Responsibility for claims - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - - 13. Multiple-licensed code - -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". -"Multiple-Licensed" means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the MPL or the alternative -licenses, if any, specified by the Initial Developer in the file described -in Exhibit A. Exhibit A - Mozilla Public License. - -"The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - -The Original Code is ______________________________________ . - -The Initial Developer of the Original Code is ________________________ . - -Portions created by ______________________ are Copyright (C) ______ . All -Rights Reserved. - -Contributor(s): ______________________________________ . - -Alternatively, the contents of this file may be used under the terms of the -_____ license (the " [___] License"), in which case the provisions of [______] -License are applicable instead of those above. If you wish to allow use of -your version of this file only under the terms of the [____] License and not -to allow others to use your version of this file under the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the [___] License. If you do not delete the -provisions above, a recipient may use your version of this file under either -the MPL or the [___] License." - -NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications. + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + a. under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + b. under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + c. the licenses granted in this Section 2.1 (a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + d. Notwithstanding Section 2.1 (b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + + a. under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + b. under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + c. the licenses granted in Sections 2.2 (a) and 2.2 (b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + d. Notwithstanding Section 2.2 (b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + + (a) Third Party Claims + If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs + If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + + (c) Representations. + Contributor represents that, except as disclosed pursuant to Section 3.4 (a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Sections 3.1, 3.2, 3.3, 3.4 and 3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + + 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions + Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + + 6.2. Effect of New Versions + Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. + + 6.3. Derivative Works + If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. Termination + + 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: + + a. such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. + b. any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. + + 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. government end users +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. Miscellaneous +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. Responsibility for claims +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +13. Multiple-licensed code +Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the MPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. + +Exhibit A - Mozilla Public License. + +"The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ + +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. + +The Original Code is ______________________________________. + +The Initial Developer of the Original Code is ________________________. +Portions created by ______________________ are Copyright (C) ______ +_______________________. All Rights Reserved. + +Contributor(s): ______________________________________. + +Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." + +NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications. diff --git a/options/license/MPL-2.0 b/options/license/MPL-2.0 index 09f2798a5..950a3e583 100644 --- a/options/license/MPL-2.0 +++ b/options/license/MPL-2.0 @@ -1,312 +1,144 @@ Mozilla Public License Version 2.0 - 1. Definitions +1. Definitions -1.1. "Contributor" means each individual or legal entity that creates, contributes -to the creation of, or owns Covered Software. + 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. -1.2. "Contributor Version" means the combination of the Contributions of others -(if any) used by a Contributor and that particular Contributor's Contribution. + 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. - 1.3. "Contribution" means Covered Software of a particular Contributor. + 1.3. "Contribution" means Covered Software of a particular Contributor. -1.4. "Covered Software" means Source Code Form to which the initial Contributor -has attached the notice in Exhibit A, the Executable Form of such Source Code -Form, and Modifications of such Source Code Form, in each case including portions -thereof. + 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. - 1.5. "Incompatible With Secondary Licenses" means + 1.5. "Incompatible With Secondary Licenses" means -(a) that the initial Contributor has attached the notice described in Exhibit -B to the Covered Software; or + (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or -(b) that the Covered Software was made available under the terms of version -1.1 or earlier of the License, but not also under the terms of a Secondary -License. + (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. -1.6. "Executable Form" means any form of the work other than Source Code Form. + 1.6. "Executable Form" means any form of the work other than Source Code Form. -1.7. "Larger Work" means a work that combines Covered Software with other -material, in a separate file or files, that is not Covered Software. + 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.9. "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently, any and all of the -rights conveyed by this License. + 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. - 1.10. "Modifications" means any of the following: + 1.10. "Modifications" means any of the following: -(a) any file in Source Code Form that results from an addition to, deletion -from, or modification of the contents of Covered Software; or + (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or -(b) any new file in Source Code Form that contains any Covered Software. + (b) any new file in Source Code Form that contains any Covered Software. -1.11. "Patent Claims" of a Contributor means any patent claim(s), including -without limitation, method, process, and apparatus claims, in any patent Licensable -by such Contributor that would be infringed, but for the grant of the License, -by the making, using, selling, offering for sale, having made, import, or -transfer of either its Contributions or its Contributor Version. + 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. -1.12. "Secondary License" means either the GNU General Public License, Version -2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General -Public License, Version 3.0, or any later versions of those licenses. + 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. -1.13. "Source Code Form" means the form of the work preferred for making modifications. + 1.13. "Source Code Form" means the form of the work preferred for making modifications. -1.14. "You" (or "Your") means an individual or a legal entity exercising rights -under this License. For legal entities, "You" includes any entity that controls, -is controlled by, or is under common control with You. For purposes of this -definition, "control" means (a) the power, direct or indirect, to cause the -direction or management of such entity, whether by contract or otherwise, -or (b) ownership of more than fifty percent (50%) of the outstanding shares -or beneficial ownership of such entity. + 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - 2. License Grants and Conditions +2. License Grants and Conditions - 2.1. Grants + 2.1. Grants + Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license: + (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and -(a) under intellectual property rights (other than patent or trademark) Licensable -by such Contributor to use, reproduce, make available, modify, display, perform, -distribute, and otherwise exploit its Contributions, either on an unmodified -basis, with Modifications, or as part of a Larger Work; and + (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. -(b) under Patent Claims of such Contributor to make, use, sell, offer for -sale, have made, import, and otherwise transfer either its Contributions or -its Contributor Version. + 2.2. Effective Date + The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. - 2.2. Effective Date + 2.3. Limitations on Grant Scope + The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: -The licenses granted in Section 2.1 with respect to any Contribution become -effective for each Contribution on the date the Contributor first distributes -such Contribution. + (a) for any code that a Contributor has removed from Covered Software; or - 2.3. Limitations on Grant Scope + (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or -The licenses granted in this Section 2 are the only rights granted under this -License. No additional rights or licenses will be implied from the distribution -or licensing of Covered Software under this License. Notwithstanding Section -2.1(b) above, no patent license is granted by a Contributor: + (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. -(a) for any code that a Contributor has removed from Covered Software; or + This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). -(b) for infringements caused by: (i) Your and any other third party's modifications -of Covered Software, or (ii) the combination of its Contributions with other -software (except as part of its Contributor Version); or + 2.4. Subsequent Licenses + No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). -(c) under Patent Claims infringed by Covered Software in the absence of its -Contributions. + 2.5. Representation + Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. -This License does not grant any rights in the trademarks, service marks, or -logos of any Contributor (except as may be necessary to comply with the notice -requirements in Section 3.4). + 2.6. Fair Use + This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. - 2.4. Subsequent Licenses + 2.7. Conditions + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. -No Contributor makes additional grants as a result of Your choice to distribute -the Covered Software under a subsequent version of this License (see Section -10.2) or under the terms of a Secondary License (if permitted under the terms -of Section 3.3). +3. Responsibilities - 2.5. Representation + 3.1. Distribution of Source Form + All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. -Each Contributor represents that the Contributor believes its Contributions -are its original creation(s) or it has sufficient rights to grant the rights -to its Contributions conveyed by this License. + 3.2. Distribution of Executable Form + If You distribute Covered Software in Executable Form then: - 2.6. Fair Use + (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and -This License is not intended to limit any rights You have under applicable -copyright doctrines of fair use, fair dealing, or other equivalents. + (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. - 2.7. Conditions + 3.3. Distribution of a Larger Work + You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in -Section 2.1. + 3.4. Notices + You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. - 3. Responsibilities + 3.5. Application of Additional Terms + You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. - 3.1. Distribution of Source Form +4. Inability to Comply Due to Statute or Regulation +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -All distribution of Covered Software in Source Code Form, including any Modifications -that You create or to which You contribute, must be under the terms of this -License. You must inform recipients that the Source Code Form of the Covered -Software is governed by the terms of this License, and how they can obtain -a copy of this License. You may not attempt to alter or restrict the recipients' -rights in the Source Code Form. - - 3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code Form, -as described in Section 3.1, and You must inform recipients of the Executable -Form how they can obtain a copy of such Source Code Form by reasonable means -in a timely manner, at a charge no more than the cost of distribution to the -recipient; and - -(b) You may distribute such Executable Form under the terms of this License, -or sublicense it under different terms, provided that the license for the -Executable Form does not attempt to limit or alter the recipients' rights -in the Source Code Form under this License. - - 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, provided -that You also comply with the requirements of this License for the Covered -Software. If the Larger Work is a combination of Covered Software with a work -governed by one or more Secondary Licenses, and the Covered Software is not -Incompatible With Secondary Licenses, this License permits You to additionally -distribute such Covered Software under the terms of such Secondary License(s), -so that the recipient of the Larger Work may, at their option, further distribute -the Covered Software under the terms of either this License or such Secondary -License(s). - - 3.4. Notices - -You may not remove or alter the substance of any license notices (including -copyright notices, patent notices, disclaimers of warranty, or limitations -of liability) contained within the Source Code Form of the Covered Software, -except that You may alter any license notices to the extent required to remedy -known factual inaccuracies. - - 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Covered Software. However, -You may do so only on Your own behalf, and not on behalf of any Contributor. -You must make it absolutely clear that any such warranty, support, indemnity, -or liability obligation is offered by You alone, and You hereby agree to indemnify -every Contributor for any liability incurred by such Contributor as a result -of warranty, support, indemnity or liability terms You offer. You may include -additional disclaimers of warranty and limitations of liability specific to -any jurisdiction. - - 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Software due to statute, judicial -order, or regulation then You must: (a) comply with the terms of this License -to the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be placed in a text file included with -all distributions of the Covered Software under this License. Except to the -extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. - - 5. Termination - -5.1. The rights granted under this License will terminate automatically if -You fail to comply with any of its terms. However, if You become compliant, -then the rights granted under this License from a particular Contributor are -reinstated (a) provisionally, unless and until such Contributor explicitly -and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor -fails to notify You of the non-compliance by some reasonable means prior to -60 days after You have come back into compliance. Moreover, Your grants from -a particular Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the first -time You have received notice of non-compliance with this License from such -Contributor, and You become compliant prior to 30 days after Your receipt -of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent infringement -claim (excluding declaratory judgment actions, counter-claims, and cross-claims) -alleging that a Contributor Version directly or indirectly infringes any patent, -then the rights granted to You by any and all Contributors for the Covered -Software under Section 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or Your distributors under this License prior -to termination shall survive termination. - - 6. Disclaimer of Warranty - -Covered Software is provided under this License on an "as is" basis, without -warranty of any kind, either expressed, implied, or statutory, including, -without limitation, warranties that the Covered Software is free of defects, -merchantable, fit for a particular purpose or non-infringing. The entire risk -as to the quality and performance of the Covered Software is with You. Should -any Covered Software prove defective in any respect, You (not any Contributor) -assume the cost of any necessary servicing, repair, or correction. This disclaimer -of warranty constitutes an essential part of this License. No use of any Covered -Software is authorized under this License except under this disclaimer. - - 7. Limitation of Liability - -Under no circumstances and under no legal theory, whether tort (including -negligence), contract, or otherwise, shall any Contributor, or anyone who -distributes Covered Software as permitted above, be liable to You for any -direct, indirect, special, incidental, or consequential damages of any character -including, without limitation, damages for lost profits, loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses, even if such party shall have been informed of the possibility -of such damages. This limitation of liability shall not apply to liability -for death or personal injury resulting from such party's negligence to the -extent applicable law prohibits such limitation. Some jurisdictions do not -allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. - - 8. Litigation - -Any litigation relating to this License may be brought only in the courts -of a jurisdiction where the defendant maintains its principal place of business -and such litigation shall be governed by laws of that jurisdiction, without -reference to its conflict-of-law provisions. Nothing in this Section shall -prevent a party's ability to bring cross-claims or counter-claims. - - 9. Miscellaneous - -This License represents the complete agreement concerning the subject matter -hereof. If any provision of this License is held to be unenforceable, such -provision shall be reformed only to the extent necessary to make it enforceable. -Any law or regulation which provides that the language of a contract shall -be construed against the drafter shall not be used to construe this License -against a Contributor. - - 10. Versions of the License - - 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section 10.3, -no one other than the license steward has the right to modify or publish new -versions of this License. Each version will be given a distinguishing version -number. - - 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version of -the License under which You originally received the Covered Software, or under -the terms of any subsequent version published by the license steward. - - 10.3. Modified Versions - -If you create software not governed by this License, and you want to create -a new license for such software, you may create and use a modified version -of this License if you rename the license and remove any references to the -name of the license steward (except to note that such modified license differs -from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With Secondary -Licenses under the terms of this version of the License, the notice described -in Exhibit B of this License must be attached. Exhibit A - Source Code Form -License Notice - -This Source Code Form is subject to the terms of the Mozilla Public License, -v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain -one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a notice. +5. Termination + + 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. + + 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. + + 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. + +6. Disclaimer of Warranty +Covered Software is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer. + +7. Limitation of Liability +Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation +Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. + +9. Miscellaneous +This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. + +10. Versions of the License + + 10.1. New Versions + Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. + + 10.2. Effect of New Versions + You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. + + 10.3. Modified Versions + If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). + + 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice -This Source Code Form is "Incompatible With Secondary Licenses", as defined -by the Mozilla Public License, v. 2.0. + This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. diff --git a/options/license/MPL-2.0-no-copyleft-exception b/options/license/MPL-2.0-no-copyleft-exception index 09f2798a5..950a3e583 100644 --- a/options/license/MPL-2.0-no-copyleft-exception +++ b/options/license/MPL-2.0-no-copyleft-exception @@ -1,312 +1,144 @@ Mozilla Public License Version 2.0 - 1. Definitions +1. Definitions -1.1. "Contributor" means each individual or legal entity that creates, contributes -to the creation of, or owns Covered Software. + 1.1. "Contributor" means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. -1.2. "Contributor Version" means the combination of the Contributions of others -(if any) used by a Contributor and that particular Contributor's Contribution. + 1.2. "Contributor Version" means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution. - 1.3. "Contribution" means Covered Software of a particular Contributor. + 1.3. "Contribution" means Covered Software of a particular Contributor. -1.4. "Covered Software" means Source Code Form to which the initial Contributor -has attached the notice in Exhibit A, the Executable Form of such Source Code -Form, and Modifications of such Source Code Form, in each case including portions -thereof. + 1.4. "Covered Software" means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. - 1.5. "Incompatible With Secondary Licenses" means + 1.5. "Incompatible With Secondary Licenses" means -(a) that the initial Contributor has attached the notice described in Exhibit -B to the Covered Software; or + (a) that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or -(b) that the Covered Software was made available under the terms of version -1.1 or earlier of the License, but not also under the terms of a Secondary -License. + (b) that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License. -1.6. "Executable Form" means any form of the work other than Source Code Form. + 1.6. "Executable Form" means any form of the work other than Source Code Form. -1.7. "Larger Work" means a work that combines Covered Software with other -material, in a separate file or files, that is not Covered Software. + 1.7. "Larger Work" means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.9. "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently, any and all of the -rights conveyed by this License. + 1.9. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. - 1.10. "Modifications" means any of the following: + 1.10. "Modifications" means any of the following: -(a) any file in Source Code Form that results from an addition to, deletion -from, or modification of the contents of Covered Software; or + (a) any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or -(b) any new file in Source Code Form that contains any Covered Software. + (b) any new file in Source Code Form that contains any Covered Software. -1.11. "Patent Claims" of a Contributor means any patent claim(s), including -without limitation, method, process, and apparatus claims, in any patent Licensable -by such Contributor that would be infringed, but for the grant of the License, -by the making, using, selling, offering for sale, having made, import, or -transfer of either its Contributions or its Contributor Version. + 1.11. "Patent Claims" of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. -1.12. "Secondary License" means either the GNU General Public License, Version -2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General -Public License, Version 3.0, or any later versions of those licenses. + 1.12. "Secondary License" means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. -1.13. "Source Code Form" means the form of the work preferred for making modifications. + 1.13. "Source Code Form" means the form of the work preferred for making modifications. -1.14. "You" (or "Your") means an individual or a legal entity exercising rights -under this License. For legal entities, "You" includes any entity that controls, -is controlled by, or is under common control with You. For purposes of this -definition, "control" means (a) the power, direct or indirect, to cause the -direction or management of such entity, whether by contract or otherwise, -or (b) ownership of more than fifty percent (50%) of the outstanding shares -or beneficial ownership of such entity. + 1.14. "You" (or "Your") means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - 2. License Grants and Conditions +2. License Grants and Conditions - 2.1. Grants + 2.1. Grants + Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license: + (a) under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and -(a) under intellectual property rights (other than patent or trademark) Licensable -by such Contributor to use, reproduce, make available, modify, display, perform, -distribute, and otherwise exploit its Contributions, either on an unmodified -basis, with Modifications, or as part of a Larger Work; and + (b) under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. -(b) under Patent Claims of such Contributor to make, use, sell, offer for -sale, have made, import, and otherwise transfer either its Contributions or -its Contributor Version. + 2.2. Effective Date + The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. - 2.2. Effective Date + 2.3. Limitations on Grant Scope + The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: -The licenses granted in Section 2.1 with respect to any Contribution become -effective for each Contribution on the date the Contributor first distributes -such Contribution. + (a) for any code that a Contributor has removed from Covered Software; or - 2.3. Limitations on Grant Scope + (b) for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or -The licenses granted in this Section 2 are the only rights granted under this -License. No additional rights or licenses will be implied from the distribution -or licensing of Covered Software under this License. Notwithstanding Section -2.1(b) above, no patent license is granted by a Contributor: + (c) under Patent Claims infringed by Covered Software in the absence of its Contributions. -(a) for any code that a Contributor has removed from Covered Software; or + This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). -(b) for infringements caused by: (i) Your and any other third party's modifications -of Covered Software, or (ii) the combination of its Contributions with other -software (except as part of its Contributor Version); or + 2.4. Subsequent Licenses + No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). -(c) under Patent Claims infringed by Covered Software in the absence of its -Contributions. + 2.5. Representation + Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. -This License does not grant any rights in the trademarks, service marks, or -logos of any Contributor (except as may be necessary to comply with the notice -requirements in Section 3.4). + 2.6. Fair Use + This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. - 2.4. Subsequent Licenses + 2.7. Conditions + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. -No Contributor makes additional grants as a result of Your choice to distribute -the Covered Software under a subsequent version of this License (see Section -10.2) or under the terms of a Secondary License (if permitted under the terms -of Section 3.3). +3. Responsibilities - 2.5. Representation + 3.1. Distribution of Source Form + All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form. -Each Contributor represents that the Contributor believes its Contributions -are its original creation(s) or it has sufficient rights to grant the rights -to its Contributions conveyed by this License. + 3.2. Distribution of Executable Form + If You distribute Covered Software in Executable Form then: - 2.6. Fair Use + (a) such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and -This License is not intended to limit any rights You have under applicable -copyright doctrines of fair use, fair dealing, or other equivalents. + (b) You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License. - 2.7. Conditions + 3.3. Distribution of a Larger Work + You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in -Section 2.1. + 3.4. Notices + You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. - 3. Responsibilities + 3.5. Application of Additional Terms + You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. - 3.1. Distribution of Source Form +4. Inability to Comply Due to Statute or Regulation +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -All distribution of Covered Software in Source Code Form, including any Modifications -that You create or to which You contribute, must be under the terms of this -License. You must inform recipients that the Source Code Form of the Covered -Software is governed by the terms of this License, and how they can obtain -a copy of this License. You may not attempt to alter or restrict the recipients' -rights in the Source Code Form. - - 3.2. Distribution of Executable Form - - If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code Form, -as described in Section 3.1, and You must inform recipients of the Executable -Form how they can obtain a copy of such Source Code Form by reasonable means -in a timely manner, at a charge no more than the cost of distribution to the -recipient; and - -(b) You may distribute such Executable Form under the terms of this License, -or sublicense it under different terms, provided that the license for the -Executable Form does not attempt to limit or alter the recipients' rights -in the Source Code Form under this License. - - 3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, provided -that You also comply with the requirements of this License for the Covered -Software. If the Larger Work is a combination of Covered Software with a work -governed by one or more Secondary Licenses, and the Covered Software is not -Incompatible With Secondary Licenses, this License permits You to additionally -distribute such Covered Software under the terms of such Secondary License(s), -so that the recipient of the Larger Work may, at their option, further distribute -the Covered Software under the terms of either this License or such Secondary -License(s). - - 3.4. Notices - -You may not remove or alter the substance of any license notices (including -copyright notices, patent notices, disclaimers of warranty, or limitations -of liability) contained within the Source Code Form of the Covered Software, -except that You may alter any license notices to the extent required to remedy -known factual inaccuracies. - - 3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Covered Software. However, -You may do so only on Your own behalf, and not on behalf of any Contributor. -You must make it absolutely clear that any such warranty, support, indemnity, -or liability obligation is offered by You alone, and You hereby agree to indemnify -every Contributor for any liability incurred by such Contributor as a result -of warranty, support, indemnity or liability terms You offer. You may include -additional disclaimers of warranty and limitations of liability specific to -any jurisdiction. - - 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Software due to statute, judicial -order, or regulation then You must: (a) comply with the terms of this License -to the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be placed in a text file included with -all distributions of the Covered Software under this License. Except to the -extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. - - 5. Termination - -5.1. The rights granted under this License will terminate automatically if -You fail to comply with any of its terms. However, if You become compliant, -then the rights granted under this License from a particular Contributor are -reinstated (a) provisionally, unless and until such Contributor explicitly -and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor -fails to notify You of the non-compliance by some reasonable means prior to -60 days after You have come back into compliance. Moreover, Your grants from -a particular Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the first -time You have received notice of non-compliance with this License from such -Contributor, and You become compliant prior to 30 days after Your receipt -of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent infringement -claim (excluding declaratory judgment actions, counter-claims, and cross-claims) -alleging that a Contributor Version directly or indirectly infringes any patent, -then the rights granted to You by any and all Contributors for the Covered -Software under Section 2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or Your distributors under this License prior -to termination shall survive termination. - - 6. Disclaimer of Warranty - -Covered Software is provided under this License on an "as is" basis, without -warranty of any kind, either expressed, implied, or statutory, including, -without limitation, warranties that the Covered Software is free of defects, -merchantable, fit for a particular purpose or non-infringing. The entire risk -as to the quality and performance of the Covered Software is with You. Should -any Covered Software prove defective in any respect, You (not any Contributor) -assume the cost of any necessary servicing, repair, or correction. This disclaimer -of warranty constitutes an essential part of this License. No use of any Covered -Software is authorized under this License except under this disclaimer. - - 7. Limitation of Liability - -Under no circumstances and under no legal theory, whether tort (including -negligence), contract, or otherwise, shall any Contributor, or anyone who -distributes Covered Software as permitted above, be liable to You for any -direct, indirect, special, incidental, or consequential damages of any character -including, without limitation, damages for lost profits, loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses, even if such party shall have been informed of the possibility -of such damages. This limitation of liability shall not apply to liability -for death or personal injury resulting from such party's negligence to the -extent applicable law prohibits such limitation. Some jurisdictions do not -allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. - - 8. Litigation - -Any litigation relating to this License may be brought only in the courts -of a jurisdiction where the defendant maintains its principal place of business -and such litigation shall be governed by laws of that jurisdiction, without -reference to its conflict-of-law provisions. Nothing in this Section shall -prevent a party's ability to bring cross-claims or counter-claims. - - 9. Miscellaneous - -This License represents the complete agreement concerning the subject matter -hereof. If any provision of this License is held to be unenforceable, such -provision shall be reformed only to the extent necessary to make it enforceable. -Any law or regulation which provides that the language of a contract shall -be construed against the drafter shall not be used to construe this License -against a Contributor. - - 10. Versions of the License - - 10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section 10.3, -no one other than the license steward has the right to modify or publish new -versions of this License. Each version will be given a distinguishing version -number. - - 10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version of -the License under which You originally received the Covered Software, or under -the terms of any subsequent version published by the license steward. - - 10.3. Modified Versions - -If you create software not governed by this License, and you want to create -a new license for such software, you may create and use a modified version -of this License if you rename the license and remove any references to the -name of the license steward (except to note that such modified license differs -from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses - -If You choose to distribute Source Code Form that is Incompatible With Secondary -Licenses under the terms of this version of the License, the notice described -in Exhibit B of this License must be attached. Exhibit A - Source Code Form -License Notice - -This Source Code Form is subject to the terms of the Mozilla Public License, -v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain -one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular file, -then You may include the notice in a location (such as a LICENSE file in a -relevant directory) where a recipient would be likely to look for such a notice. +5. Termination + + 5.1. The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice. + + 5.2. If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. + + 5.3. In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. + +6. Disclaimer of Warranty +Covered Software is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer. + +7. Limitation of Liability +Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. + +8. Litigation +Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims. + +9. Miscellaneous +This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor. + +10. Versions of the License + + 10.1. New Versions + Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. + + 10.2. Effect of New Versions + You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. + + 10.3. Modified Versions + If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). + + 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses + If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice + + This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. Exhibit B - "Incompatible With Secondary Licenses" Notice -This Source Code Form is "Incompatible With Secondary Licenses", as defined -by the Mozilla Public License, v. 2.0. + This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0. diff --git a/options/license/MS-PL b/options/license/MS-PL index 5784d4683..c61790bc8 100644 --- a/options/license/MS-PL +++ b/options/license/MS-PL @@ -1,51 +1,22 @@ Microsoft Public License (Ms-PL) -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. - 1. Definitions +1. Definitions +The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license. "Licensed patents" are a contributor's patent claims that read directly on its contribution. -The terms "reproduce," "reproduction," "derivative works," and "distribution" -have the same meaning here as under U.S. copyright law. A "contribution" is -the original software, or any additions or changes to the software. A "contributor" -is any person that distributes its contribution under this license. "Licensed -patents" are a contributor's patent claims that read directly on its contribution. +2. Grant of Rights + (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. - 2. Grant of Rights + (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. -(A) Copyright Grant- Subject to the terms of this license, including the license -conditions and limitations in section 3, each contributor grants you a non-exclusive, -worldwide, royalty-free copyright license to reproduce its contribution, prepare -derivative works of its contribution, and distribute its contribution or any -derivative works that you create. +3. Conditions and Limitations + (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. -(B) Patent Grant- Subject to the terms of this license, including the license -conditions and limitations in section 3, each contributor grants you a non-exclusive, -worldwide, royalty-free license under its licensed patents to make, have made, -use, sell, offer for sale, import, and/or otherwise dispose of its contribution -in the software or derivative works of the contribution in the software. + (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. - 3. Conditions and Limitations + (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. -(A) No Trademark License- This license does not grant you rights to use any -contributors' name, logo, or trademarks. + (D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. -(B) If you bring a patent claim against any contributor over patents that -you claim are infringed by the software, your patent license from such contributor -to the software ends automatically. - -(C) If you distribute any portion of the software, you must retain all copyright, -patent, trademark, and attribution notices that are present in the software. - -(D) If you distribute any portion of the software in source code form, you -may do so only under this license by including a complete copy of this license -with your distribution. If you distribute any portion of the software in compiled -or object code form, you may only do so under a license that complies with -this license. - -(E) The software is licensed "as-is." You bear the risk of using it. The contributors -give no express warranties, guarantees, or conditions. You may have additional -consumer rights under your local laws which this license cannot change. To -the extent permitted under your local laws, the contributors exclude the implied -warranties of merchantability, fitness for a particular purpose and non-infringement. + (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. diff --git a/options/license/MS-RL b/options/license/MS-RL index 1f5d355d9..768d5e311 100644 --- a/options/license/MS-RL +++ b/options/license/MS-RL @@ -1,63 +1,30 @@ Microsoft Reciprocal License (Ms-RL) -This license governs use of the accompanying software. If you use the software, -you accept this license. If you do not accept the license, do not use the -software. +This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software. - 1. Definitions +1. Definitions +The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law. -The terms "reproduce," "reproduction," "derivative works," and "distribution" -have the same meaning here as under U.S. copyright law. +A "contribution" is the original software, or any additions or changes to the software. -A "contribution" is the original software, or any additions or changes to -the software. +A "contributor" is any person that distributes its contribution under this license. -A "contributor" is any person that distributes its contribution under this -license. +"Licensed patents" are a contributor's patent claims that read directly on its contribution. -"Licensed patents" are a contributor's patent claims that read directly on -its contribution. +2. Grant of Rights + (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create. - 2. Grant of Rights + (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software. -(A) Copyright Grant- Subject to the terms of this license, including the license -conditions and limitations in section 3, each contributor grants you a non-exclusive, -worldwide, royalty-free copyright license to reproduce its contribution, prepare -derivative works of its contribution, and distribute its contribution or any -derivative works that you create. +3. Conditions and Limitations + (A) Reciprocal Grants- For any file you distribute that contains code from the software (in source code or binary format), you must provide recipients the source code to that file along with a copy of this license, which license will govern that file. You may license other files that are entirely your own work and do not contain code from the software under any terms you choose. -(B) Patent Grant- Subject to the terms of this license, including the license -conditions and limitations in section 3, each contributor grants you a non-exclusive, -worldwide, royalty-free license under its licensed patents to make, have made, -use, sell, offer for sale, import, and/or otherwise dispose of its contribution -in the software or derivative works of the contribution in the software. + (B) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks. - 3. Conditions and Limitations + (C) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically. -(A) Reciprocal Grants- For any file you distribute that contains code from -the software (in source code or binary format), you must provide recipients -the source code to that file along with a copy of this license, which license -will govern that file. You may license other files that are entirely your -own work and do not contain code from the software under any terms you choose. + (D) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software. -(B) No Trademark License- This license does not grant you rights to use any -contributors' name, logo, or trademarks. + (E) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license. -(C) If you bring a patent claim against any contributor over patents that -you claim are infringed by the software, your patent license from such contributor -to the software ends automatically. - -(D) If you distribute any portion of the software, you must retain all copyright, -patent, trademark, and attribution notices that are present in the software. - -(E) If you distribute any portion of the software in source code form, you -may do so only under this license by including a complete copy of this license -with your distribution. If you distribute any portion of the software in compiled -or object code form, you may only do so under a license that complies with -this license. - -(F) The software is licensed "as-is." You bear the risk of using it. The contributors -give no express warranties, guarantees, or conditions. You may have additional -consumer rights under your local laws which this license cannot change. To -the extent permitted under your local laws, the contributors exclude the implied -warranties of merchantability, fitness for a particular purpose and non-infringement. + (F) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees, or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement. diff --git a/options/license/MTLL b/options/license/MTLL index a80e51728..0af2b318f 100644 --- a/options/license/MTLL +++ b/options/license/MTLL @@ -1,64 +1,24 @@ -Software License for MTL Copyright (c) 2007 The Trustees of Indiana University. - -2008 Dresden University of Technology and the Trustees of Indiana University. - -2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. +Software License for MTL +Copyright (c) 2007 The Trustees of Indiana University. + 2008 Dresden University of Technology and the Trustees of Indiana University. + 2010 SimuNova UG (haftungsbeschränkt), www.simunova.com. All rights reserved. - Authors: Peter Gottschling and Andrew Lumsdaine This file is part of the Matrix Template Library -Dresden University of Technology -- short TUD -- and Indiana University -- -short IU -- have the exclusive rights to license this product under the following -license. +Dresden University of Technology -- short TUD -- and Indiana University -- short IU -- have the exclusive rights to license this product under the following license. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + 1. All redistributions of source code must retain the above copyright notice, the list of authors in the original source code, this list of conditions and the disclaimer listed in this license; + 2. All redistributions in binary form must reproduce the above copyright notice, this list of conditions and the disclaimer listed in this license in the documentation and/or other materials provided with the distribution; + 3. Any documentation included with all redistributions must include the following acknowledgement: + "This product includes software developed at the University of Notre Dame, the Pervasive Technology Labs at Indiana University, and Dresden University of Technology. For technical information contact Andrew Lumsdaine at the Pervasive Technology Labs at Indiana University. For administrative and license questions contact the Advanced Research and Technology Institute at 1100 Waterway Blvd. Indianapolis, Indiana 46202, phone 317-274-5905, fax 317-274-5902." + Alternatively, this acknowledgement may appear in the software itself, and wherever such third-party acknowledgments normally appear. + 4. The name "MTL" shall not be used to endorse or promote products derived from this software without prior written permission from IU or TUD. For written permission, please contact Indiana University Advanced Research & Technology Institute. + 5. Products derived from this software may not be called "MTL", nor may "MTL" appear in their name, without prior written permission of Indiana University Advanced Research & Technology Institute. -1. All redistributions of source code must retain the above copyright notice, -the list of authors in the original source code, this list of conditions and -the disclaimer listed in this license; +TUD and IU provide no reassurances that the source code provided does not infringe the patent or any other intellectual property rights of any other entity. TUD and IU disclaim any liability to any recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. -2. All redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the disclaimer listed in this license in the documentation -and/or other materials provided with the distribution; - -3. Any documentation included with all redistributions must include the following -acknowledgement: - -"This product includes software developed at the University of Notre Dame, -the Pervasive Technology Labs at Indiana University, and Dresden University -of Technology. For technical information contact Andrew Lumsdaine at the Pervasive -Technology Labs at Indiana University. For administrative and license questions -contact the Advanced Research and Technology Institute at 1100 Waterway Blvd. -Indianapolis, Indiana 46202, phone 317-274-5905, fax 317-274-5902." - -Alternatively, this acknowledgement may appear in the software itself, and -wherever such third-party acknowledgments normally appear. - -4. The name "MTL" shall not be used to endorse or promote products derived -from this software without prior written permission from IU or TUD. For written -permission, please contact Indiana University Advanced Research & Technology -Institute. - -5. Products derived from this software may not be called "MTL", nor may "MTL" -appear in their name, without prior written permission of Indiana University -Advanced Research & Technology Institute. - -TUD and IU provide no reassurances that the source code provided does not -infringe the patent or any other intellectual property rights of any other -entity. TUD and IU disclaim any liability to any recipient for claims brought -by any other entity based on infringement of intellectual property rights -or otherwise. - -LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO WARRANTIES -AS TO CAPABILITIES OR ACCURACY ARE MADE. DRESDEN UNIVERSITY OF TECHNOLOGY -AND INDIANA UNIVERSITY GIVE NO WARRANTIES AND MAKE NO REPRESENTATION THAT -SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER -PROPRIETARY RIGHTS. DRESDEN UNIVERSITY OF TECHNOLOGY AND INDIANA UNIVERSITY -MAKE NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", -"TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE -RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, AND TO -THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. +LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. DRESDEN UNIVERSITY OF TECHNOLOGY AND INDIANA UNIVERSITY GIVE NO WARRANTIES AND MAKE NO REPRESENTATION THAT SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. DRESDEN UNIVERSITY OF TECHNOLOGY AND INDIANA UNIVERSITY MAKE NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. diff --git a/options/license/MakeIndex b/options/license/MakeIndex index e92f97685..c34538429 100644 --- a/options/license/MakeIndex +++ b/options/license/MakeIndex @@ -1,42 +1,19 @@ MakeIndex Distribution Notice -11/11/1989 Copyright (C) 1989 by Chen & Harrison International Systems, Inc. +11/11/1989 +Copyright (C) 1989 by Chen & Harrison International Systems, Inc. Copyright (C) 1988 by Olivetti Research Center - Copyright (C) 1987 by Regents of the University of California Author: + Pehong Chen (phc@renoir.berkeley.edu) + Chen & Harrison International Systems, Inc. + Palo Alto, California + USA -Pehong Chen (phc@renoir.berkeley.edu) +Permission is hereby granted to make and distribute original copies of this program provided that the copyright notice and this permission notice are preserved and provided that the recipient is not asked to waive or limit his right to redistribute copies as allowed by this permission notice and provided that anyone who receives an executable form of this program is granted access to a machine-readable form of the source code for this program at a cost not greater than reasonable reproduction, shipping, and handling costs. Executable forms of this program distributed without the source code must be accompanied by a conspicuous copy of this permission notice and a statement that tells the recipient how to obtain the source code. -Chen & Harrison International Systems, Inc. +Permission is granted to distribute modified versions of all or part of this program under the conditions above with the additional requirement that the entire modified work must be covered by a permission notice identical to this permission notice. Anything distributed with and usable only in conjunction with something derived from this program, whose useful purpose is to extend or adapt or add capabilities to this program, is to be considered a modified version of this program under the requirement above. Ports of this program to other systems not supported in the distribution are also considered modified versions. All modified versions should be reported back to the author. -Palo Alto, California - -USA - -Permission is hereby granted to make and distribute original copies of this -program provided that the copyright notice and this permission notice are -preserved and provided that the recipient is not asked to waive or limit his -right to redistribute copies as allowed by this permission notice and provided -that anyone who receives an executable form of this program is granted access -to a machine-readable form of the source code for this program at a cost not -greater than reasonable reproduction, shipping, and handling costs. Executable -forms of this program distributed without the source code must be accompanied -by a conspicuous copy of this permission notice and a statement that tells -the recipient how to obtain the source code. - -Permission is granted to distribute modified versions of all or part of this -program under the conditions above with the additional requirement that the -entire modified work must be covered by a permission notice identical to this -permission notice. Anything distributed with and usable only in conjunction -with something derived from this program, whose useful purpose is to extend -or adapt or add capabilities to this program, is to be considered a modified -version of this program under the requirement above. Ports of this program -to other systems not supported in the distribution are also considered modified -versions. All modified versions should be reported back to the author. - -This program is distributed with no warranty of any sort. No contributor accepts -responsibility for the consequences of using this program or for whether it -serves any particular purpose. +This program is distributed with no warranty of any sort. No contributor accepts responsibility for the consequences of using this program or for whether it serves any particular purpose. diff --git a/options/license/MirOS b/options/license/MirOS index 3fbbab0f1..ee21265cd 100644 --- a/options/license/MirOS +++ b/options/license/MirOS @@ -1,14 +1,7 @@ -The MirOS Licence Copyright [YEAR] [NAME] [EMAIL] +The MirOS Licence -Provided that these terms and disclaimer and all copyright notices are retained -or reproduced in an accompanying document, permission is granted to deal in -this work without restriction, including unlimited rights to use, publicly -perform, distribute, sell, modify, merge, give away, or sublicence. +Copyright [YEAR] [NAME] [EMAIL] -This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to the utmost -extent permitted by applicable law, neither express nor implied; without malicious -intent or gross negligence. In no event may a licensor, author or contributor -be held liable for indirect, direct, other damage, loss, or other issues arising -in any way out of dealing in the work, even if advised of the possibility -of such damage or existence of a defect, except proven that it results out -of said person's immediate fault when using the work as intended. +Provided that these terms and disclaimer and all copyright notices are retained or reproduced in an accompanying document, permission is granted to deal in this work without restriction, including unlimited rights to use, publicly perform, distribute, sell, modify, merge, give away, or sublicence. + +This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to the utmost extent permitted by applicable law, neither express nor implied; without malicious intent or gross negligence. In no event may a licensor, author or contributor be held liable for indirect, direct, other damage, loss, or other issues arising in any way out of dealing in the work, even if advised of the possibility of such damage or existence of a defect, except proven that it results out of said person's immediate fault when using the work as intended. diff --git a/options/license/Motosoto b/options/license/Motosoto index cb4e3f014..4add8c6a3 100644 --- a/options/license/Motosoto +++ b/options/license/Motosoto @@ -1,339 +1,110 @@ MOTOSOTO OPEN SOURCE LICENSE - Version 0.9.1 -This Motosoto Open Source License (the "License") applies to "Community Portal -Server" and related software products as well as any updatesor maintenance -releases of that software ("Motosoto Products") that are distributed by Motosoto.Com -B.V. ("Licensor"). Any Motosoto Product licensed pursuant to this License -is a "Licensed Product." Licensed Product, in its entirety, is protected by -Dutch copyright law. This License identifies the terms under which you may -use, copy, distribute or modify Licensed Product and has been submitted to -the Open Software Initiative (OSI) for approval. Preamble +This Motosoto Open Source License (the "License") applies to "Community Portal Server" and related software products as well as any updatesor maintenance releases of that software ("Motosoto Products") that are distributed by Motosoto.Com B.V. ("Licensor"). Any Motosoto Product licensed pursuant to this License is a "Licensed Product." Licensed Product, in its entirety, is protected by Dutch copyright law. This License identifies the terms under which you may use, copy, distribute or modify Licensed Product and has been submitted to the Open Software Initiative (OSI) for approval. -This Preamble is intended to describe, in plain English, the nature and scope -of this License. However, this Preamble is not a part of this license. The -legal effect of this License is dependent only upon the terms of the License -and not this Preamble. This License complies with the Open Source Definition -and has been approved by Open Source Initiative. Software distributed under -this License may be marked as "OSI Certified Open Source Software." +Preamble + +This Preamble is intended to describe, in plain English, the nature and scope of this License. However, this Preamble is not a part of this license. The legal effect of this License is dependent only upon the terms of the License and not this Preamble. This License complies with the Open Source Definition and has been approved by Open Source Initiative. Software distributed under this License may be marked as "OSI Certified Open Source Software." This License provides that: -1. You may use, sell or give away the Licensed Product, alone or as a component -of an aggregate software distribution containing programs from several different -sources. No royalty or other fee is required. +1. You may use, sell or give away the Licensed Product, alone or as a component of an aggregate software distribution containing programs from several different sources. No royalty or other fee is required. -2. Both Source Code and executable versions of the Licensed Product, including -Modifications made by previous Contributors, are available for your use. (The -terms "Licensed Product," "Modifications," "Contributors" and "Source Code" -are defined in the License.) +2. Both Source Code and executable versions of the Licensed Product, including Modifications made by previous Contributors, are available for your use. (The terms "Licensed Product," "Modifications," "Contributors" and "Source Code" are defined in the License.) -3. You are allowed to make Modifications to the Licensed Product, and you -can create Derivative Works from it. (The term "Derivative Works" is defined -in the License.) +3. You are allowed to make Modifications to the Licensed Product, and you can create Derivative Works from it. (The term "Derivative Works" is defined in the License.) -4. By accepting the Licensed Product under the provisions of this License, -you agree that any Modifications you make to the Licensed Product and then -distribute are governed by the provisions of this License. In particular, -you must make the Source Code of your Modifications available to others. +4. By accepting the Licensed Product under the provisions of this License, you agree that any Modifications you make to the Licensed Product and then distribute are governed by the provisions of this License. In particular, you must make the Source Code of your Modifications available to others. -5. You may use the Licensed Product for any purpose, but the Licensor is not -providing you any warranty whatsoever, nor is the Licensor accepting any liability -in the event that the Licensed Product doesn't work properly or causes you -any injury or damages. +5. You may use the Licensed Product for any purpose, but the Licensor is not providing you any warranty whatsoever, nor is the Licensor accepting any liability in the event that the Licensed Product doesn't work properly or causes you any injury or damages. -6. If you sublicense the Licensed Product or Derivative Works, you may charge -fees for warranty or support, or for accepting indemnity or liability obligations -to your customers. You cannot charge for the Source Code. +6. If you sublicense the Licensed Product or Derivative Works, you may charge fees for warranty or support, or for accepting indemnity or liability obligations to your customers. You cannot charge for the Source Code. -7. If you assert any patent claims against the Licensor relating to the Licensed -Product, or if you breach any terms of the License, your rights to the Licensed -Product under this License automatically terminate. +7. If you assert any patent claims against the Licensor relating to the Licensed Product, or if you breach any terms of the License, your rights to the Licensed Product under this License automatically terminate. -You may use this License to distribute your own Derivative Works, in which -case the provisions of this License will apply to your Derivative Works just -as they do to the original Licensed Product. +You may use this License to distribute your own Derivative Works, in which case the provisions of this License will apply to your Derivative Works just as they do to the original Licensed Product. -Alternatively, you may distribute your Derivative Works under any other OSI-approved -Open Source license, or under a proprietary license of your choice. If you -use any license other than this License, however, you must continue to fulfill -the requirements of this License (including the provisions relating to publishing -the Source Code) for those portions of your Derivative Works that consist -of the Licensed Product, including the files containing Modifications. +Alternatively, you may distribute your Derivative Works under any other OSI-approved Open Source license, or under a proprietary license of your choice. If you use any license other than this License, however, you must continue to fulfill the requirements of this License (including the provisions relating to publishing the Source Code) for those portions of your Derivative Works that consist of the Licensed Product, including the files containing Modifications. -New versions of this License may be published from time to time. You may choose -to continue to use the license terms in this version of the License or those -from the new version. However, only the Licensor has the right to change the -License terms as they apply to the Licensed Product. This License relies on -precise definitions for certain terms. Those terms are defined when they are -first used, and the definitions are repeated for your convenience in a Glossary -at the end of the License. +New versions of this License may be published from time to time. You may choose to continue to use the license terms in this version of the License or those from the new version. However, only the Licensor has the right to change the License terms as they apply to the Licensed Product. This License relies on precise definitions for certain terms. Those terms are defined when they are first used, and the definitions are repeated for your convenience in a Glossary at the end of the License. License Terms - 1. Grant of License From Licensor. +1. Grant of License From Licensor. -Licensor hereby grants you a world-wide, royalty-free, non-exclusive license, -subject to third party intellectual property claims, to do the following: +Licensor hereby grants you a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, to do the following: -a. Use, reproduce, modify, display, perform, sublicense and distribute Licensed -Product or portions thereof (including Modifications as hereinafter defined), -in both Source Code or as an executable program. "Source Code" means the preferred -form for making modifications to the Licensed Product, including all modules -contained therein, plus any associated interface definition files, scripts -used to control compilation and installation of an executable program, or -a list of differential comparisons against the Source Code of the Licensed -Product. + a. Use, reproduce, modify, display, perform, sublicense and distribute Licensed Product or portions thereof (including Modifications as hereinafter defined), in both Source Code or as an executable program. "Source Code" means the preferred form for making modifications to the Licensed Product, including all modules contained therein, plus any associated interface definition files, scripts used to control compilation and installation of an executable program, or a list of differential comparisons against the Source Code of the Licensed Product. -b. Create Derivative Works (as that term is defined under Dutch copyright -law) of Licensed Product by adding to or deleting from the substance or structure -of said Licensed Product. + b. Create Derivative Works (as that term is defined under Dutch copyright law) of Licensed Product by adding to or deleting from the substance or structure of said Licensed Product. -c. Under claims of patents now or hereafter owned or controlled by Licensor, -to make, use, sell, offer for sale, have made, and/or otherwise dispose of -Licensed Product or portions thereof, but solely to the extent that any such -claim is necessary to enable you to make, use, sell, offer for sale, have -made, and/or otherwise dispose of Licensed Product or portions thereof or -Derivative Works thereof. + c. Under claims of patents now or hereafter owned or controlled by Licensor, to make, use, sell, offer for sale, have made, and/or otherwise dispose of Licensed Product or portions thereof, but solely to the extent that any such claim is necessary to enable you to make, use, sell, offer for sale, have made, and/or otherwise dispose of Licensed Product or portions thereof or Derivative Works thereof. - 2. Grant of License to Modifications From Contributor. +2. Grant of License to Modifications From Contributor. -"Modifications" means any additions to or deletions from the substance or -structure of (i) a file containing Licensed Product, or (ii) any new file -that contains any part of Licensed Product. Hereinafter in this License, the -term "Licensed Product" shall include all previous Modifications that you -receive from any Contributor. By application of the provisions in Section -4(a) below, each person or entity who created or contributed to the creation -of, and distributed, a Modification (a "Contributor") hereby grants you a -world-wide, royalty-free, non-exclusive license, subject to third party intellectual -property claims, to do the following: +"Modifications" means any additions to or deletions from the substance or structure of (i) a file containing Licensed Product, or (ii) any new file that contains any part of Licensed Product. Hereinafter in this License, the term "Licensed Product" shall include all previous Modifications that you receive from any Contributor. By application of the provisions in Section 4(a) below, each person or entity who created or contributed to the creation of, and distributed, a Modification (a "Contributor") hereby grants you a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims, to do the following: -a. Use, reproduce, modify, display, perform, sublicense and distribute any -Modifications created by such Contributor or portions thereof, in both Source -Code or as an executable program, either on an unmodified basis or as part -of Derivative Works. + a. Use, reproduce, modify, display, perform, sublicense and distribute any Modifications created by such Contributor or portions thereof, in both Source Code or as an executable program, either on an unmodified basis or as part of Derivative Works. -b. Under claims of patents now or hereafter owned or controlled by Contributor, -to make, use, sell, offer for sale, have made, and/or otherwise dispose of -Modifications or portions thereof, but solely to the extent that any such -claim is necessary to enable you to make, use, sell, offer for sale, have -made, and/or otherwise dispose of Modifications or portions thereof or Derivative -Works thereof. + b. Under claims of patents now or hereafter owned or controlled by Contributor, to make, use, sell, offer for sale, have made, and/or otherwise dispose of Modifications or portions thereof, but solely to the extent that any such claim is necessary to enable you to make, use, sell, offer for sale, have made, and/or otherwise dispose of Modifications or portions thereof or Derivative Works thereof. - 3. Exclusions From License Grant. +3. Exclusions From License Grant. -Nothing in this License shall be deemed to grant any rights to trademarks, -copyrights, patents, trade secrets or any other intellectual property of Licensor -or any Contributor except as expressly stated herein. No patent license is -granted separate from the Licensed Product, for code that you delete from -the Licensed Product, or for combinations of the Licensed Product with other -software or hardware. No right is granted to the trademarks of Licensor or -any Contributor even if such marks are included in the Licensed Product. Nothing -in this License shall be interpreted to prohibit Licensor from licensing under -different terms from this License any code that Licensor otherwise would have -a right to license. +Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor or any Contributor except as expressly stated herein. No patent license is granted separate from the Licensed Product, for code that you delete from the Licensed Product, or for combinations of the Licensed Product with other software or hardware. No right is granted to the trademarks of Licensor or any Contributor even if such marks are included in the Licensed Product. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any code that Licensor otherwise would have a right to license. - 4. Your Obligations Regarding Distribution. +4. Your Obligations Regarding Distribution. -a. Application of This License to Your Modifications. As an express condition -for your use of the Licensed Product, you hereby agree that any Modifications -that you create or to which you contribute, and which you distribute, are -governed by the terms of this License including, without limitation, Section -2. Any Modifications that you create or to which you contribute may be distributed -only under the terms of this License or a future version of this License released -under Section 7. You must include a copy of this License with every copy of -the Modifications you distribute. You agree not to offer or impose any terms -on any Source Code or executable version of the Licensed Product or Modifications -that alter or restrict the applicable version of this License or the recipients' -rights hereunder. However, you may include an additional document offering -the additional rights described in Section 4(e). + a. Application of This License to Your Modifications. As an express condition for your use of the Licensed Product, you hereby agree that any Modifications that you create or to which you contribute, and which you distribute, are governed by the terms of this License including, without limitation, Section 2. Any Modifications that you create or to which you contribute may be distributed only under the terms of this License or a future version of this License released under Section 7. You must include a copy of this License with every copy of the Modifications you distribute. You agree not to offer or impose any terms on any Source Code or executable version of the Licensed Product or Modifications that alter or restrict the applicable version of this License or the recipients' rights hereunder. However, you may include an additional document offering the additional rights described in Section 4(e). -b. Availability of Source Code. You must make available, under the terms of -this License, the Source Code of the Licensed Product and any Modifications -that you distribute, either on the same media as you distribute any executable -or other form of the Licensed Product, or via a mechanism generally accepted -in the software development community for the electronic transfer of data -(an "Electronic Distribution Mechanism"). The Source Code for any version -of Licensed Product or Modifications that you distribute must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of said Licensed Product -or Modifications has been made available. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. + b. Availability of Source Code. You must make available, under the terms of this License, the Source Code of the Licensed Product and any Modifications that you distribute, either on the same media as you distribute any executable or other form of the Licensed Product, or via a mechanism generally accepted in the software development community for the electronic transfer of data (an "Electronic Distribution Mechanism"). The Source Code for any version of Licensed Product or Modifications that you distribute must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of said Licensed Product or Modifications has been made available. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -c. Description of Modifications. You must cause any Modifications that you -create or to which you contribute, and which you distribute, to contain a -file documenting the additions, changes or deletions you made to create or -contribute to those Modifications, and the dates of any such additions, changes -or deletions. You must include a prominent statement that the Modifications -are derived, directly or indirectly, from the Licensed Product and include -the names of the Licensor and any Contributor to the Licensed Product in (i) -the Source Code and (ii) in any notice displayed by a version of the Licensed -Product you distribute or in related documentation in which you describe the -origin or ownership of the Licensed Product. You may not modify or delete -any preexisting copyright notices in the Licensed Product. + c. Description of Modifications. You must cause any Modifications that you create or to which you contribute, and which you distribute, to contain a file documenting the additions, changes or deletions you made to create or contribute to those Modifications, and the dates of any such additions, changes or deletions. You must include a prominent statement that the Modifications are derived, directly or indirectly, from the Licensed Product and include the names of the Licensor and any Contributor to the Licensed Product in (i) the Source Code and (ii) in any notice displayed by a version of the Licensed Product you distribute or in related documentation in which you describe the origin or ownership of the Licensed Product. You may not modify or delete any preexisting copyright notices in the Licensed Product. - d. Intellectual Property Matters. + d. Intellectual Property Matters. + i. Third Party Claims. If you have knowledge that a license to a third party's intellectual property right is required to exercise the rights granted by this License, you must include a text file with the Source Code distribution titled "LEGAL" that describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after you make any Modifications available as described in Section 4(b), you shall promptly modify the LEGAL file in all copies you make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Licensed Product from you that new knowledge has been obtained. -i. Third Party Claims. If you have knowledge that a license to a third party's -intellectual property right is required to exercise the rights granted by -this License, you must include a text file with the Source Code distribution -titled "LEGAL" that describes the claim and the party making the claim in -sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after you make any Modifications available as described in -Section 4(b), you shall promptly modify the LEGAL file in all copies you make -available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Licensed Product from you that new knowledge has been obtained. + ii. Contributor APIs. If your Modifications include an application programming interface ("API") and you have knowledge of patent licenses that are reasonably necessary to implement that API, you must also include this information in the LEGAL file. -ii. Contributor APIs. If your Modifications include an application programming -interface ("API") and you have knowledge of patent licenses that are reasonably -necessary to implement that API, you must also include this information in -the LEGAL file. + iii. Representations. You represent that, except as disclosed pursuant to 4(d)(i) above, you believe that any Modifications you distribute are your original creations and that you have sufficient rights to grant the rights conveyed by this License. -iii. Representations. You represent that, except as disclosed pursuant to -4(d)(i) above, you believe that any Modifications you distribute are your -original creations and that you have sufficient rights to grant the rights -conveyed by this License. + e. Required Notices. You must duplicate this License in any documentation you provide along with the Source Code of any Modifications you create or to which you contribute, and which you distribute, wherever you describe recipients' rights relating to Licensed Product. You must duplicate the notice contained in Exhibit A (the "Notice") in each file of the Source Code of any copy you distribute of the Licensed Product. If you created a Modification, you may add your name as a Contributor to the Notice. If it is not possible to put the Notice in a particular Source Code file due to its structure, then you must include such Notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Licensed Product. However, you may do so only on your own behalf, and not on behalf of the Licensor or any Contributor. You must make it clear that any such warranty, support, indemnity or liability obligation is offered by you alone, and you hereby agree to indemnify the Licensor and every Contributor for any liability incurred by the Licensor or such Contributor as a result of warranty, support, indemnity or liability terms you offer. -e. Required Notices. You must duplicate this License in any documentation -you provide along with the Source Code of any Modifications you create or -to which you contribute, and which you distribute, wherever you describe recipients' -rights relating to Licensed Product. You must duplicate the notice contained -in Exhibit A (the "Notice") in each file of the Source Code of any copy you -distribute of the Licensed Product. If you created a Modification, you may -add your name as a Contributor to the Notice. If it is not possible to put -the Notice in a particular Source Code file due to its structure, then you -must include such Notice in a location (such as a relevant directory file) -where a user would be likely to look for such a notice. You may choose to -offer, and charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Licensed Product. However, you may do so only -on your own behalf, and not on behalf of the Licensor or any Contributor. -You must make it clear that any such warranty, support, indemnity or liability -obligation is offered by you alone, and you hereby agree to indemnify the -Licensor and every Contributor for any liability incurred by the Licensor -or such Contributor as a result of warranty, support, indemnity or liability -terms you offer. + f. Distribution of Executable Versions. You may distribute Licensed Product as an executable program under a license of your choice that may contain terms different from this License provided (i) you have satisfied the requirements of Sections 4(a) through 4(e) for that distribution, (ii) you include a conspicuous notice in the executable version, related documentation and collateral materials stating that the Source Code version of the Licensed Product is available under the terms of this License, including a description of how and where you have fulfilled the obligations of Section 4(b), (iii) you retain all existing copyright notices in the Licensed Product, and (iv) you make it clear that any terms that differ from this License are offered by you alone, not by Licensor or any Contributor. You hereby agree to indemnify the Licensor and every Contributor for any liability incurred by Licensor or such Contributor as a result of any terms you offer. -f. Distribution of Executable Versions. You may distribute Licensed Product -as an executable program under a license of your choice that may contain terms -different from this License provided (i) you have satisfied the requirements -of Sections 4(a) through 4(e) for that distribution, (ii) you include a conspicuous -notice in the executable version, related documentation and collateral materials -stating that the Source Code version of the Licensed Product is available -under the terms of this License, including a description of how and where -you have fulfilled the obligations of Section 4(b), (iii) you retain all existing -copyright notices in the Licensed Product, and (iv) you make it clear that -any terms that differ from this License are offered by you alone, not by Licensor -or any Contributor. You hereby agree to indemnify the Licensor and every Contributor -for any liability incurred by Licensor or such Contributor as a result of -any terms you offer. + g. Distribution of Derivative Works. You may create Derivative Works (e.g., combinations of some or all of the Licensed Product with other code) and distribute the Derivative Works as products under any other license you select, with the proviso that the requirements of this License are fulfilled for those portions of the Derivative Works that consist of the Licensed Product or any Modifications thereto. -g. Distribution of Derivative Works. You may create Derivative Works (e.g., -combinations of some or all of the Licensed Product with other code) and distribute -the Derivative Works as products under any other license you select, with -the proviso that the requirements of this License are fulfilled for those -portions of the Derivative Works that consist of the Licensed Product or any -Modifications thereto. +5. Inability to Comply Due to Statute or Regulation. - 5. Inability to Comply Due to Statute or Regulation. +If it is impossible for you to comply with any of the terms of this License with respect to some or all of the Licensed Product due to statute, judicial order, or regulation, then you must (i) comply with the terms of this License to the maximum extent possible, (ii) cite the statute or regulation that prohibits you from adhering to the License, and (iii) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 4(d), and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill at computer programming to be able to understand it. -If it is impossible for you to comply with any of the terms of this License -with respect to some or all of the Licensed Product due to statute, judicial -order, or regulation, then you must (i) comply with the terms of this License -to the maximum extent possible, (ii) cite the statute or regulation that prohibits -you from adhering to the License, and (iii) describe the limitations and the -code they affect. Such description must be included in the LEGAL file described -in Section 4(d), and must be included with all distributions of the Source -Code. Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill at computer -programming to be able to understand it. +6. Application of This License. - 6. Application of This License. +This License applies to code to which Licensor or Contributor has attached the Notice in Exhibit A, which is incorporated herein by this reference. -This License applies to code to which Licensor or Contributor has attached -the Notice in Exhibit A, which is incorporated herein by this reference. +7. Versions of This License. - 7. Versions of This License. + a. Version. The Motosoto Open Source License is derived from the Jabber Open Source License. All changes are related to applicable law and the location of court. -a. Version. The Motosoto Open Source License is derived from the Jabber Open -Source License. All changes are related to applicable law and the location -of court. + b. New Versions. Licensor may publish from time to time revised and/or new versions of the License. -b. New Versions. Licensor may publish from time to time revised and/or new -versions of the License. + c. Effect of New Versions. Once Licensed Product has been published under a particular version of the License, you may always continue to use it under the terms of that version. You may also choose to use such Licensed Product under the terms of any subsequent version of the License published by Licensor. No one other than Lic ensor has the right to modify the terms applicable to Licensed Product created under this License. -c. Effect of New Versions. Once Licensed Product has been published under -a particular version of the License, you may always continue to use it under -the terms of that version. You may also choose to use such Licensed Product -under the terms of any subsequent version of the License published by Licensor. -No one other than Lic ensor has the right to modify the terms applicable to -Licensed Product created under this License. + d. Derivative Works of this License. If you create or use a modified version of this License, which you may do only in order to apply it to software that is not already a Licensed Product under this License, you must rename your license so that it is not confusingly similar to this License, and must make it clear that your license contains terms that differ from this License. In so naming your license, you may not use any trademark of Licensor or any Contributor. -d. Derivative Works of this License. If you create or use a modified version -of this License, which you may do only in order to apply it to software that -is not already a Licensed Product under this License, you must rename your -license so that it is not confusingly similar to this License, and must make -it clear that your license contains terms that differ from this License. In -so naming your license, you may not use any trademark of Licensor or any Contributor. +8. Disclaimer of Warranty. - 8. Disclaimer of Warranty. +LICENSED PRODUCT IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE LICENSED PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LICENSED PRODUCT IS WITH YOU. SHOULD LICENSED PRODUCT PROVE DEFECTIVE IN ANY RESPECT, YOU (AND NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED PRODUCT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -LICENSED PRODUCT IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE LICENSED PRODUCT IS FREE OF DEFECTS, MERCHANTABLE, FIT -FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE LICENSED PRODUCT IS WITH YOU. SHOULD LICENSED PRODUCT -PROVE DEFECTIVE IN ANY RESPECT, YOU (AND NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) -ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED -PRODUCT IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +9. Termination. - 9. Termination. + a. Automatic Termination Upon Breach. This license and the rights granted hereunder will terminate automatically if you fail to comply with the terms herein and fail to cure such breach within thirty (30) days of becoming aware of the breach. All sublicenses to the Licensed Product that are properly granted shall survive any termination of this license. Provisions that, by their nature, must remain in effect beyond the termination of this License, shall survive. -a. Automatic Termination Upon Breach. This license and the rights granted -hereunder will terminate automatically if you fail to comply with the terms -herein and fail to cure such breach within thirty (30) days of becoming aware -of the breach. All sublicenses to the Licensed Product that are properly granted -shall survive any termination of this license. Provisions that, by their nature, -must remain in effect beyond the termination of this License, shall survive. + b. Termination Upon Assertion of Patent Infringement. If you initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Licensor or a Contributor (Licensor or Contributor against whom you file such an action is referred to herein as "Respondent") alleging that Licensed Product directly or indirectly infringes any patent, then any and all rights granted by such Respondent to you under Sections 1 or 2 of this License shall terminate prospectively upon sixty (60) days notice from Respondent (the "Notice Period") unless within that Notice Period you either agree in writing (i) to pay Respondent a mutually agreeable reasonably royalty for your past or future use of Licensed Product made by such Respondent, or (ii) withdraw your litigation claim with respect to Licensed Product against such Respondent. If within said Notice Period a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Licensor to you under Sections 1 and 2 automatically terminate at the expiration of said Notice Period. -b. Termination Upon Assertion of Patent Infringement. If you initiate litigation -by asserting a patent infringement claim (excluding declaratory judgment actions) -against Licensor or a Contributor (Licensor or Contributor against whom you -file such an action is referred to herein as "Respondent") alleging that Licensed -Product directly or indirectly infringes any patent, then any and all rights -granted by such Respondent to you under Sections 1 or 2 of this License shall -terminate prospectively upon sixty (60) days notice from Respondent (the "Notice -Period") unless within that Notice Period you either agree in writing (i) -to pay Respondent a mutually agreeable reasonably royalty for your past or -future use of Licensed Product made by such Respondent, or (ii) withdraw your -litigation claim with respect to Licensed Product against such Respondent. -If within said Notice Period a reasonable royalty and payment arrangement -are not mutually agreed upon in writing by the parties or the litigation claim -is not withdrawn, the rights granted by Licensor to you under Sections 1 and -2 automatically terminate at the expiration of said Notice Period. + c. Reasonable Value of This License. If you assert a patent infringement claim against Respondent alleging that Licensed Product directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by said Respondent under Sections 1 and 2 shall be taken into account in determining the amount or value of any payment or license. -c. Reasonable Value of This License. If you assert a patent infringement claim -against Respondent alleging that Licensed Product directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by said Respondent under Sections 1 and 2 shall -be taken into account in determining the amount or value of any payment or -license. + d. No Retroactive Effect of Termination. In the event of termination under Sections 9(a) or 9(b) above, all end user license agreements (excluding licenses to distributors and reselle rs) that have been validly granted by you or any distributor hereunder prior to termination shall survive termination. -d. No Retroactive Effect of Termination. In the event of termination under -Sections 9(a) or 9(b) above, all end user license agreements (excluding licenses -to distributors and reselle rs) that have been validly granted by you or any -distributor hereunder prior to termination shall survive termination. +10. Limitation of Liability. - 10. Limitation of Liability. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, ANY CONTRIBUTOR, -OR ANY DISTRIBUTOR OF LICENSED PRODUCT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, -BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF -GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER -COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED -OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT -APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED PRODUCT, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY diff --git a/options/license/MulanPSL-1.0 b/options/license/MulanPSL-1.0 index b72489c67..8d8fae951 100644 --- a/options/license/MulanPSL-1.0 +++ b/options/license/MulanPSL-1.0 @@ -1,40 +1,42 @@ -木兰宽松许可证, 第1版 木兰宽松许可证, 第1版 +木兰宽松许可证, 第1版 + +木兰宽松许可证, 第1版 2019年8月 http://license.coscl.org.cn/MulanPSL -您对"软件"的复制、使用、修改及分发受木兰宽松许可证,第1版("本许可证")的如下条款的约束: +您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第1版(“本许可证”)的如下条款的约束: - 0. 定义 +0. 定义 - "软件"是指由"贡献"构成的许可在"本许可证"下的程序和相关文档的集合。 +“软件”是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 - "贡献者"是指将受版权法保护的作品许可在"本许可证"下的自然人或"法人实体"。 +“贡献者”是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 - "法人实体"是指提交贡献的机构及其"关联实体"。 +“法人实体”是指提交贡献的机构及其“关联实体”。 -"关联实体"是指,对"本许可证"下的一方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 +“关联实体”是指,对“本许可证”下的一方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 - "贡献"是指由任一"贡献者"许可在"本许可证"下的受版权法保护的作品。 +“贡献”是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 - 1. 授予版权许可 +1. 授予版权许可 - 每个"贡献者"根据"本许可证"授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其"贡献",不论修改与否。 +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 - 2. 授予专利许可 +2. 授予专利许可 -每个"贡献者"根据"本许可证"授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其"贡献"或以其他方式转移其"贡献"。前述专利许可仅限于"贡献者"现在或将来拥有或控制的其"贡献"本身或其"贡献"与许可"贡献"时的"软件"结合而将必然会侵犯的专利权利要求,不包括仅因您或他人修改"贡献"或其他结合而将必然会侵犯到的专利权利要求。如您或您的"关联实体"直接或间接地(包括通过代理、专利被许可人或受让人),就"软件"或其中的"贡献"对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则"本许可证"授予您对"软件"的专利许可自您提起诉讼或发起维权行动之日终止。 +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括仅因您或他人修改“贡献”或其他结合而将必然会侵犯到的专利权利要求。如您或您的“关联实体”直接或间接地(包括通过代理、专利被许可人或受让人),就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 - 3. 无商标许可 +3. 无商标许可 - "本许可证"不提供对"贡献者"的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 +“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 - 4. 分发限制 +4. 分发限制 -您可以在任何媒介中将"软件"以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供"本许可证"的副本,并保留"软件"中的版权、商标、专利及免责声明。 +您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 - 5. 免责声明与责任限制 +5. 免责声明与责任限制 -"软件"及其中的"贡献"在提供时不带任何明示或默示的担保。在任何情况下,"贡献者"或版权所有者不对任何人因使用"软件"或其中的"贡献"而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 +“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 条款结束 @@ -42,133 +44,73 @@ 如果您希望将木兰宽松许可证,第1版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: - 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; +1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; - 2, 请您在软件包的一级目录下创建以"LICENSE"为名的文件,将整个许可证文本放入该文件中; +2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; - 3, 请将如下声明文本放入每个源文件的头部注释中。 +3, 请将如下声明文本放入每个源文件的头部注释中。 Copyright (c) [2019] [name of copyright holder] - [Software Name] is licensed under the Mulan PSL v1. - -You can use this software according to the terms and conditions of the Mulan -PSL v1. - +You can use this software according to the terms and conditions of the Mulan PSL v1. You may obtain a copy of Mulan PSL v1 at: + http://license.coscl.org.cn/MulanPSL +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v1 for more details. +Mulan Permissive Software License,Version 1 -http://license.coscl.org.cn/MulanPSL - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. - -See the Mulan PSL v1 for more details. Mulan Permissive Software License,Version -1 Mulan Permissive Software License,Version 1 (Mulan PSL v1) +Mulan Permissive Software License,Version 1 (Mulan PSL v1) August 2019 http://license.coscl.org.cn/MulanPSL -Your reproduction, use, modification and distribution of the Software shall -be subject to Mulan PSL v1 (this License) with following terms and conditions: +Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v1 (this License) with following terms and conditions: - 0. Definition +0. Definition -Software means the program and related documents which are comprised of those -Contribution and licensed under this License. +Software means the program and related documents which are comprised of those Contribution and licensed under this License. -Contributor means the Individual or Legal Entity who licenses its copyrightable -work under this License. +Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. - Legal Entity means the entity making a Contribution and all its Affiliates. +Legal Entity means the entity making a Contribution and all its Affiliates. -Affiliates means entities that control, or are controlled by, or are under -common control with a party to this License, 'control' means direct or indirect -ownership of at least fifty percent (50%) of the voting power, capital or -other securities of controlled or commonly controlled entity. +Affiliates means entities that control, or are controlled by, or are under common control with a party to this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. -Contribution means the copyrightable work licensed by a particular Contributor -under this License. +Contribution means the copyrightable work licensed by a particular Contributor under this License. - 1. Grant of Copyright License +1. Grant of Copyright License -Subject to the terms and conditions of this License, each Contributor hereby -grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable -copyright license to reproduce, use, modify, or distribute its Contribution, -with modification or not. +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. - 2. Grant of Patent License +2. Grant of Patent License -Subject to the terms and conditions of this License, each Contributor hereby -grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable -(except for revocation under this Section) patent license to make, have made, -use, offer for sale, sell, import or otherwise transfer its Contribution where -such patent license is only limited to the patent claims owned or controlled -by such Contributor now or in future which will be necessarily infringed by -its Contribution alone, or by combination of the Contribution with the Software -to which the Contribution was contributed, excluding of any patent claims -solely be infringed by your or others' modification or other combinations. -If you or your Affiliates directly or indirectly (including through an agent, -patent licensee or assignee), institute patent litigation (including a cross -claim or counterclaim in a litigation) or other patent enforcement activities -against any individual or entity by alleging that the Software or any Contribution -in it infringes patents, then any patent license granted to you under this -License for the Software shall terminate as of the date such litigation or -activity is filed or taken. +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed, excluding of any patent claims solely be infringed by your or others’ modification or other combinations. If you or your Affiliates directly or indirectly (including through an agent, patent licensee or assignee), institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. - 3. No Trademark License +3. No Trademark License -No trademark license is granted to use the trade names, trademarks, service -marks, or product names of Contributor, except as required to fulfill notice -requirements in section 4. +No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. - 4. Distribution Restriction +4. Distribution Restriction -You may distribute the Software in any medium with or without modification, -whether in source or executable forms, provided that you provide recipients -with a copy of this License and retain copyright, patent, trademark and disclaimer -statements in the Software. +You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. - 5. Disclaimer of Warranty and Limitation of Liability +5. Disclaimer of Warranty and Limitation of Liability -The Software and Contribution in it are provided without warranties of any -kind, either express or implied. In no event shall any Contributor or copyright -holder be liable to you for any damages,including, but not limited to any -direct, or indirect, special or consequential damages arising from your use -or inability to use the Software or the Contribution in it, no matter how -it's caused or based on which legal theory, even if advised of the possibility -of such damages. +The Software and Contribution in it are provided without warranties of any kind, either express or implied. In no event shall any Contributor or copyright holder be liable to you for any damages, including, but not limited to any direct, or indirect, special or consequential damages arising from your use or inability to use the Software or the Contribution in it, no matter how it’s caused or based on which legal theory, even if advised of the possibility of such damages. End of the Terms and Conditions -How to apply the Mulan Permissive Software License,Version 1 (Mulan PSL v1) -to your software +How to apply the Mulan Permissive Software License,Version 1 (Mulan PSL v1) to your software -To apply the Mulan PSL v1 to your work, for easy identification by recipients, -you are suggested to complete following three steps: +To apply the Mulan PSL v1 to your work, for easy identification by recipients, you are suggested to complete following three steps: -i. Fill in the blanks in following statement, including insert your software -name, the year of the first publication of your software, and your name identified -as the copyright owner; - -ii. Create a file named "LICENSE" which contains the whole context of this -License in the first directory of your software package; - -iii. Attach the statement to the appropriate annotated syntax at the beginning -of each source file. +i. Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; +ii. Create a file named “LICENSE” which contains the whole context of this License in the first directory of your software package; +iii. Attach the statement to the appropriate annotated syntax at the beginning of each source file. Copyright (c) [2019] [name of copyright holder] - [Software Name] is licensed under the Mulan PSL v1. - -You can use this software according to the terms and conditions of the Mulan -PSL v1. - +You can use this software according to the terms and conditions of the Mulan PSL v1. You may obtain a copy of Mulan PSL v1 at: - -http://license.coscl.org.cn/MulanPSL - -THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, -EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, -MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. - + http://license.coscl.org.cn/MulanPSL +THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. See the Mulan PSL v1 for more details. diff --git a/options/license/MulanPSL-2.0 b/options/license/MulanPSL-2.0 index df0d9ac15..cbafa434b 100644 --- a/options/license/MulanPSL-2.0 +++ b/options/license/MulanPSL-2.0 @@ -1,44 +1,47 @@ -木兰宽松许可证, 第2版 木兰宽松许可证, 第2版 + +木兰宽松许可证, 第2版 + +木兰宽松许可证, 第2版 2020年1月 http://license.coscl.org.cn/MulanPSL2 -您对"软件"的复制、使用、修改及分发受木兰宽松许可证,第2版("本许可证")的如下条款的约束: +您对“软件”的复制、使用、修改及分发受木兰宽松许可证,第2版(“本许可证”)的如下条款的约束: - 0. 定义 +0. 定义 - "软件" 是指由"贡献"构成的许可在"本许可证"下的程序和相关文档的集合。 +“软件” 是指由“贡献”构成的许可在“本许可证”下的程序和相关文档的集合。 - "贡献" 是指由任一"贡献者"许可在"本许可证"下的受版权法保护的作品。 +“贡献” 是指由任一“贡献者”许可在“本许可证”下的受版权法保护的作品。 - "贡献者" 是指将受版权法保护的作品许可在"本许可证"下的自然人或"法人实体"。 +“贡献者” 是指将受版权法保护的作品许可在“本许可证”下的自然人或“法人实体”。 - "法人实体" 是指提交贡献的机构及其"关联实体"。 +“法人实体” 是指提交贡献的机构及其“关联实体”。 -"关联实体" 是指,对"本许可证"下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 +“关联实体” 是指,对“本许可证”下的行为方而言,控制、受控制或与其共同受控制的机构,此处的控制是指有受控方或共同受控方至少50%直接或间接的投票权、资金或其他有价证券。 - 1. 授予版权许可 +1. 授予版权许可 - 每个"贡献者"根据"本许可证"授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其"贡献",不论修改与否。 +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的版权许可,您可以复制、使用、修改、分发其“贡献”,不论修改与否。 - 2. 授予专利许可 +2. 授予专利许可 -每个"贡献者"根据"本许可证"授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其"贡献"或以其他方式转移其"贡献"。前述专利许可仅限于"贡献者"现在或将来拥有或控制的其"贡献"本身或其"贡献"与许可"贡献"时的"软件"结合而将必然会侵犯的专利权利要求,不包括对"贡献"的修改或包含"贡献"的其他结合。如果您或您的"关联实体"直接或间接地,就"软件"或其中的"贡献"对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则"本许可证"授予您对"软件"的专利许可自您提起诉讼或发起维权行动之日终止。 +每个“贡献者”根据“本许可证”授予您永久性的、全球性的、免费的、非独占的、不可撤销的(根据本条规定撤销除外)专利许可,供您制造、委托制造、使用、许诺销售、销售、进口其“贡献”或以其他方式转移其“贡献”。前述专利许可仅限于“贡献者”现在或将来拥有或控制的其“贡献”本身或其“贡献”与许可“贡献”时的“软件”结合而将必然会侵犯的专利权利要求,不包括对“贡献”的修改或包含“贡献”的其他结合。如果您或您的“关联实体”直接或间接地,就“软件”或其中的“贡献”对任何人发起专利侵权诉讼(包括反诉或交叉诉讼)或其他专利维权行动,指控其侵犯专利权,则“本许可证”授予您对“软件”的专利许可自您提起诉讼或发起维权行动之日终止。 - 3. 无商标许可 +3. 无商标许可 - "本许可证"不提供对"贡献者"的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 +“本许可证”不提供对“贡献者”的商品名称、商标、服务标志或产品名称的商标许可,但您为满足第4条规定的声明义务而必须使用除外。 - 4. 分发限制 +4. 分发限制 -您可以在任何媒介中将"软件"以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供"本许可证"的副本,并保留"软件"中的版权、商标、专利及免责声明。 +您可以在任何媒介中将“软件”以源程序形式或可执行形式重新分发,不论修改与否,但您必须向接收者提供“本许可证”的副本,并保留“软件”中的版权、商标、专利及免责声明。 - 5. 免责声明与责任限制 +5. 免责声明与责任限制 -"软件"及其中的"贡献"在提供时不带任何明示或默示的担保。在任何情况下,"贡献者"或版权所有者不对任何人因使用"软件"或其中的"贡献"而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 +“软件”及其中的“贡献”在提供时不带任何明示或默示的担保。在任何情况下,“贡献者”或版权所有者不对任何人因使用“软件”或其中的“贡献”而引发的任何直接或间接损失承担责任,不论因何种原因导致或者基于何种法律理论,即使其曾被建议有此种损失的可能性。 - 6. 语言 +6. 语言 - "本许可证"以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 +“本许可证”以中英文双语表述,中英文版本具有同等法律效力。如果中英文版本存在任何冲突不一致,以中文版为准。 条款结束 @@ -46,142 +49,82 @@ 如果您希望将木兰宽松许可证,第2版,应用到您的新软件,为了方便接收者查阅,建议您完成如下三步: - 1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; +1, 请您补充如下声明中的空白,包括软件名、软件的首次发表年份以及您作为版权人的名字; - 2, 请您在软件包的一级目录下创建以"LICENSE"为名的文件,将整个许可证文本放入该文件中; +2, 请您在软件包的一级目录下创建以“LICENSE”为名的文件,将整个许可证文本放入该文件中; - 3, 请将如下声明文本放入每个源文件的头部注释中。 +3, 请将如下声明文本放入每个源文件的头部注释中。 Copyright (c) [Year] [name of copyright holder] - [Software Name] is licensed under Mulan PSL v2. - -You can use this software according to the terms and conditions of the Mulan -PSL v2. - +You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: - -http://license.coscl.org.cn/MulanPSL2 - + http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, - EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, - MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. +See the Mulan PSL v2 for more details. -See the Mulan PSL v2 for more details. Mulan Permissive Software License,Version -2 Mulan Permissive Software License,Version 2 (Mulan PSL v2) +Mulan Permissive Software License,Version 2 + +Mulan Permissive Software License,Version 2 (Mulan PSL v2) January 2020 http://license.coscl.org.cn/MulanPSL2 -Your reproduction, use, modification and distribution of the Software shall -be subject to Mulan PSL v2 (this License) with the following terms and conditions: +Your reproduction, use, modification and distribution of the Software shall be subject to Mulan PSL v2 (this License) with the following terms and conditions: - 0. Definition +0. Definition -Software means the program and related documents which are licensed under -this License and comprise all Contribution(s). +Software means the program and related documents which are licensed under this License and comprise all Contribution(s). -Contribution means the copyrightable work licensed by a particular Contributor -under this License. +Contribution means the copyrightable work licensed by a particular Contributor under this License. -Contributor means the Individual or Legal Entity who licenses its copyrightable -work under this License. +Contributor means the Individual or Legal Entity who licenses its copyrightable work under this License. - Legal Entity means the entity making a Contribution and all its Affiliates. +Legal Entity means the entity making a Contribution and all its Affiliates. -Affiliates means entities that control, are controlled by, or are under common -control with the acting entity under this License, 'control' means direct -or indirect ownership of at least fifty percent (50%) of the voting power, -capital or other securities of controlled or commonly controlled entity. +Affiliates means entities that control, are controlled by, or are under common control with the acting entity under this License, ‘control’ means direct or indirect ownership of at least fifty percent (50%) of the voting power, capital or other securities of controlled or commonly controlled entity. - 1. Grant of Copyright License +1. Grant of Copyright License -Subject to the terms and conditions of this License, each Contributor hereby -grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable -copyright license to reproduce, use, modify, or distribute its Contribution, -with modification or not. +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable copyright license to reproduce, use, modify, or distribute its Contribution, with modification or not. - 2. Grant of Patent License +2. Grant of Patent License -Subject to the terms and conditions of this License, each Contributor hereby -grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable -(except for revocation under this Section) patent license to make, have made, -use, offer for sale, sell, import or otherwise transfer its Contribution, -where such patent license is only limited to the patent claims owned or controlled -by such Contributor now or in future which will be necessarily infringed by -its Contribution alone, or by combination of the Contribution with the Software -to which the Contribution was contributed. The patent license shall not apply -to any modification of the Contribution, and any other combination which includes -the Contribution. If you or your Affiliates directly or indirectly institute -patent litigation (including a cross claim or counterclaim in a litigation) -or other patent enforcement activities against any individual or entity by -alleging that the Software or any Contribution in it infringes patents, then -any patent license granted to you under this License for the Software shall -terminate as of the date such litigation or activity is filed or taken. +Subject to the terms and conditions of this License, each Contributor hereby grants to you a perpetual, worldwide, royalty-free, non-exclusive, irrevocable (except for revocation under this Section) patent license to make, have made, use, offer for sale, sell, import or otherwise transfer its Contribution, where such patent license is only limited to the patent claims owned or controlled by such Contributor now or in future which will be necessarily infringed by its Contribution alone, or by combination of the Contribution with the Software to which the Contribution was contributed. The patent license shall not apply to any modification of the Contribution, and any other combination which includes the Contribution. If you or your Affiliates directly or indirectly institute patent litigation (including a cross claim or counterclaim in a litigation) or other patent enforcement activities against any individual or entity by alleging that the Software or any Contribution in it infringes patents, then any patent license granted to you under this License for the Software shall terminate as of the date such litigation or activity is filed or taken. - 3. No Trademark License +3. No Trademark License -No trademark license is granted to use the trade names, trademarks, service -marks, or product names of Contributor, except as required to fulfill notice -requirements in section 4. +No trademark license is granted to use the trade names, trademarks, service marks, or product names of Contributor, except as required to fulfill notice requirements in section 4. - 4. Distribution Restriction +4. Distribution Restriction -You may distribute the Software in any medium with or without modification, -whether in source or executable forms, provided that you provide recipients -with a copy of this License and retain copyright, patent, trademark and disclaimer -statements in the Software. +You may distribute the Software in any medium with or without modification, whether in source or executable forms, provided that you provide recipients with a copy of this License and retain copyright, patent, trademark and disclaimer statements in the Software. - 5. Disclaimer of Warranty and Limitation of Liability +5. Disclaimer of Warranty and Limitation of Liability -THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY -KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT -HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY -DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE -OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW -IT'S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY -OF SUCH DAMAGES. +THE SOFTWARE AND CONTRIBUTION IN IT ARE PROVIDED WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL ANY CONTRIBUTOR OR COPYRIGHT HOLDER BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE SOFTWARE OR THE CONTRIBUTION IN IT, NO MATTER HOW IT’S CAUSED OR BASED ON WHICH LEGAL THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 6. Language +6. Language -THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION -AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE -BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. +THIS LICENSE IS WRITTEN IN BOTH CHINESE AND ENGLISH, AND THE CHINESE VERSION AND ENGLISH VERSION SHALL HAVE THE SAME LEGAL EFFECT. IN THE CASE OF DIVERGENCE BETWEEN THE CHINESE AND ENGLISH VERSIONS, THE CHINESE VERSION SHALL PREVAIL. END OF THE TERMS AND CONDITIONS -How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) -to Your Software +How to Apply the Mulan Permissive Software License,Version 2 (Mulan PSL v2) to Your Software -To apply the Mulan PSL v2 to your work, for easy identification by recipients, -you are suggested to complete following three steps: +To apply the Mulan PSL v2 to your work, for easy identification by recipients, you are suggested to complete following three steps: -i. Fill in the blanks in following statement, including insert your software -name, the year of the first publication of your software, and your name identified -as the copyright owner; - -ii. Create a file named "LICENSE" which contains the whole context of this -License in the first directory of your software package; - -iii. Attach the statement to the appropriate annotated syntax at the beginning -of each source file. +i. Fill in the blanks in following statement, including insert your software name, the year of the first publication of your software, and your name identified as the copyright owner; +ii. Create a file named "LICENSE" which contains the whole context of this License in the first directory of your software package; +iii. Attach the statement to the appropriate annotated syntax at the beginning of each source file. Copyright (c) [Year] [name of copyright holder] - [Software Name] is licensed under Mulan PSL v2. - -You can use this software according to the terms and conditions of the Mulan -PSL v2. - +You can use this software according to the terms and conditions of the Mulan PSL v2. You may obtain a copy of Mulan PSL v2 at: - -http://license.coscl.org.cn/MulanPSL2 - + http://license.coscl.org.cn/MulanPSL2 THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, - EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, - MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. - See the Mulan PSL v2 for more details. diff --git a/options/license/Multics b/options/license/Multics index 3c99e7781..913781912 100644 --- a/options/license/Multics +++ b/options/license/Multics @@ -1,32 +1,13 @@ -Multics License Historical Background +Multics License -This edition of the Multics software materials and documentation is provided -and donated to Massachusetts Institute of Technology by Group BULL including -BULL HN Information Systems Inc. as a contribution to computer science knowledge. -This donation is made also to give evidence of the common contributions of -Massachusetts Institute of Technology, Bell Laboratories, General Electric, -Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL -HN Information Systems Inc. to the development of this operating system. Multics -development was initiated by Massachusetts Institute of Technology Project -MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial -Intelligence in the mid 1970s, under the leadership of Professor Fernando -Jose Corbato. Users consider that Multics provided the best software architecture -for managing computer hardware properly and for executing programs. Many subsequent -operating systems incorporated Multics principles. Multics was distributed -in 1975 to 2000 by Group Bull in Europe, and in the U.S. by Bull HN Information -Systems Inc., as successor in interest by change in name only to Honeywell -Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- +Historical Background -Permission to use, copy, modify, and distribute these programs and their documentation -for any purpose and without fee is hereby granted, provided that the below -copyright notice and historical background appear in all copies and that both -the copyright notice and historical background and this permission notice -appear in supporting documentation, and that the names of MIT, HIS, BULL or -BULL HN not be used in advertising or publicity pertaining to distribution -of the programs without specific prior written permission. Copyright 1972 -by Massachusetts Institute of Technology and Honeywell Information Systems -Inc. +This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. +----------------------------------------------------------- + +Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. + +Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. - Copyright 2006 by Bull SAS All Rights Reserved diff --git a/options/license/Mup b/options/license/Mup index 29e9e0663..57c163a40 100644 --- a/options/license/Mup +++ b/options/license/Mup @@ -1,27 +1,13 @@ Copyright (c) 1995-2012 by Arkkra Enterprises. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following DISCLAIMER. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following DISCLAIMER. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following DISCLAIMER in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following DISCLAIMER in the documentation and/or other materials provided with the distribution. -3. Any additions, deletions, or changes to the original files must be clearly -indicated in accompanying documentation. including the reasons for the changes, -and the names of those who made the modifications. +3. Any additions, deletions, or changes to the original files must be clearly indicated in accompanying documentation. including the reasons for the changes, and the names of those who made the modifications. DISCLAIMER -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/NAIST-2003 b/options/license/NAIST-2003 new file mode 100644 index 000000000..40d27d328 --- /dev/null +++ b/options/license/NAIST-2003 @@ -0,0 +1,70 @@ +Copyright 2000, 2001, 2002, 2003 Nara Institute of Science +and Technology. All Rights Reserved. + +Use, reproduction, and distribution of this software is permitted. +Any copy of this software, whether in its original form or modified, +must include both the above copyright notice and the following +paragraphs. + +Nara Institute of Science and Technology (NAIST), +the copyright holders, disclaims all warranties with regard to this +software, including all implied warranties of merchantability and +fitness, in no event shall NAIST be liable for +any special, indirect or consequential damages or any damages +whatsoever resulting from loss of use, data or profits, whether in an +action of contract, negligence or other tortuous action, arising out +of or in connection with the use or performance of this software. + +A large portion of the dictionary entries +originate from ICOT Free Software. The following conditions for ICOT +Free Software applies to the current dictionary as well. + +Each User may also freely distribute the Program, whether in its +original form or modified, to any third party or parties, PROVIDED +that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear +on, or be attached to, the Program, which is distributed substantially +in the same form as set out herein and that such intended +distribution, if actually made, will neither violate or otherwise +contravene any of the laws and regulations of the countries having +jurisdiction over the User or the intended distribution itself. + +NO WARRANTY + +The program was produced on an experimental basis in the course of the +research and development conducted during the project and is provided +to users as so produced on an experimental basis. Accordingly, the +program is provided without any warranty whatsoever, whether express, +implied, statutory or otherwise. The term "warranty" used herein +includes, but is not limited to, any warranty of the quality, +performance, merchantability and fitness for a particular purpose of +the program and the nonexistence of any infringement or violation of +any right of any third party. + +Each user of the program will agree and understand, and be deemed to +have agreed and understood, that there is no warranty whatsoever for +the program and, accordingly, the entire risk arising from or +otherwise connected with the program is assumed by the user. + +Therefore, neither ICOT, the copyright holder, or any other +organization that participated in or was otherwise related to the +development of the program and their respective officials, directors, +officers and other employees shall be held liable for any and all +damages, including, without limitation, general, special, incidental +and consequential damages, arising out of or otherwise in connection +with the use or inability to use the program or any product, material +or result produced or otherwise obtained by using the program, +regardless of whether they have been advised of, or otherwise had +knowledge of, the possibility of such damages at any time during the +project or thereafter. Each user will be deemed to have agreed to the +foregoing by his or her commencement of use of the program. The term +"use" as used herein includes, but is not limited to, the use, +modification, copying and distribution of the program and the +production of secondary products from the program. + +In the case where the program, whether in its original form or +modified, was distributed or delivered to or received by a user from +any person, organization or entity other than ICOT, unless it makes or +grants independently of ICOT any specific warranty to the user in +writing, such person, organization or entity, will also be exempted +from and not be held liable to the user for any such damages as noted +above as far as the program is concerned. diff --git a/options/license/NASA-1.3 b/options/license/NASA-1.3 index eed377a61..c67c97c1b 100644 --- a/options/license/NASA-1.3 +++ b/options/license/NASA-1.3 @@ -1,286 +1,85 @@ NASA OPEN SOURCE AGREEMENT VERSION 1.3 -THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, REPRODUCTION, -DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN COMPUTER SOFTWARE -ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS REPRESENTED BY THE -GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). THE UNITED STATES GOVERNMENT, -AS REPRESENTED BY GOVERNMENT AGENCY, IS AN INTENDED THIRD-PARTY BENEFICIARY -OF ALL SUBSEQUENT DISTRIBUTIONS OR REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. -ANYONE WHO USES, REPRODUCES, DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT -SOFTWARE, AS DEFINED HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING -IN FULL THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. +THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. -Government Agency: _______________ +Government Agency: _____ Government Agency Original Software Designation: __ Government Agency Original Software Title: _____ User Registration Requested. Please Visit http://___ Government Agency Point of Contact for Original Software: _____ -Government Agency Original Software Designation: _______________ +DEFINITIONS -Government Agency Original Software Title: _______________ +A. "Contributor" means Government Agency, as the developer of the Original Software, and any entity that makes a Modification. B. "Covered Patents" mean patent claims licensable by a Contributor that are necessarily infringed by the use or sale of its Modification alone or when combined with the Subject Software. C. "Display" means the showing of a copy of the Subject Software, either directly or by means of an image, or any other device. D. "Distribution" means conveyance or transfer of the Subject Software, regardless of means, to another. E. "Larger Work" means computer software that combines Subject Software, or portions thereof, with software separate from the Subject Software that is not governed by the terms of this Agreement. F. "Modification" means any alteration of, including addition to or deletion from, the substance or structure of either the Original Software or Subject Software, and includes derivative works, as that term is defined in the Copyright Statute, 17 USC 101. However, the act of including Subject Software as part of a Larger Work does not in and of itself constitute a Modification. G. "Original Software" means the computer software first released under this Agreement by Government Agency with Government Agency designation __ and entitled _________, including source code, object code and accompanying documentation, if any. H. "Recipient" means anyone who acquires the Subject Software under this Agreement, including all Contributors. I. "Redistribution" means Distribution of the Subject Software after a Modification has been made. J. "Reproduction" means the making of a counterpart, image or copy of the Subject Software. K. "Sale" means the exchange of the Subject Software for money or equivalent value. L. "Subject Software" means the Original Software, Modifications, or any respective parts thereof. M. "Use" means the application or employment of the Subject Software for any purpose. -User Registration Requested. Please Visit http://_______________ +GRANT OF RIGHTS -Government Agency Point of Contact for Original Software: _______________ +A. Under Non-Patent Rights: Subject to the terms and conditions of this Agreement, each Contributor, with respect to its own contribution to the Subject Software, hereby grants to each Recipient a non-exclusive, world-wide, royalty-free license to engage in the following activities pertaining to the Subject Software: - + 1. Use + 2. Distribution + 3. Reproduction + 4. Modification + 5. Redistribution + 6. Display - DEFINITIONS +B. Under Patent Rights: Subject to the terms and conditions of this Agreement, each Contributor, with respect to its own contribution to the Subject Software, hereby grants to each Recipient under Covered Patents a non-exclusive, world-wide, royalty-free license to engage in the following activities pertaining to the Subject Software: -A. "Contributor" means Government Agency, as the developer of the Original -Software, and any entity that makes a Modification. + 1. Use + 2. Distribution + 3. Reproduction + 4. Sale + 5. Offer for Sale -B. "Covered Patents" mean patent claims licensable by a Contributor that are -necessarily infringed by the use or sale of its Modification alone or when -combined with the Subject Software. +C. The rights granted under Paragraph B. also apply to the combination of a Contributor's Modification and the Subject Software if, at the time the Modification is added by the Contributor, the addition of such Modification causes the combination to be covered by the Covered Patents. It does not apply to any other combinations that include a Modification. -C. "Display" means the showing of a copy of the Subject Software, either directly -or by means of an image, or any other device. +D. The rights granted in Paragraphs A. and B. allow the Recipient to sublicense those same rights. Such sublicense must be under the same terms and conditions of this Agreement. -D. "Distribution" means conveyance or transfer of the Subject Software, regardless -of means, to another. +OBLIGATIONS OF RECIPIENT -E. "Larger Work" means computer software that combines Subject Software, or -portions thereof, with software separate from the Subject Software that is -not governed by the terms of this Agreement. +A. Distribution or Redistribution of the Subject Software must be made under this Agreement except for additions covered under paragraph 3H. -F. "Modification" means any alteration of, including addition to or deletion -from, the substance or structure of either the Original Software or Subject -Software, and includes derivative works, as that term is defined in the Copyright -Statute, 17 USC 101. However, the act of including Subject Software as part -of a Larger Work does not in and of itself constitute a Modification. + 1. Whenever a Recipient distributes or redistributes the Subject Software, a copy of this Agreement must be included with each copy of the Subject Software; and + 2. If Recipient distributes or redistributes the Subject Software in any form other than source code, Recipient must also make the source code freely available, and must provide with each copy of the Subject Software information on how to obtain the source code in a reasonable manner on or through a medium customarily used for software exchange. -G. "Original Software" means the computer software first released under this -Agreement by Government Agency with Government Agency designation _______________ -and entitled _______________ , including source code, object code and accompanying -documentation, if any. +B. Each Recipient must ensure that the following copyright notice appears prominently in the Subject Software: -H. "Recipient" means anyone who acquires the Subject Software under this Agreement, -including all Contributors. +[Government Agency will insert the applicable copyright notice in each agreement accompanying the initial distribution of original software and remove this bracketed language.] -I. "Redistribution" means Distribution of the Subject Software after a Modification -has been made. +[The following copyright notice will be used if created by a contractor pursuant to Government Agency contract and rights obtained from creator by assignment. Government Agency will insert the year and its Agency designation and remove the bracketed language.] Copyright (c) {YEAR} United States Government as represented by ___ ____. All Rights Reserved. -J. "Reproduction" means the making of a counterpart, image or copy of the -Subject Software. +[The following copyright notice will be used if created by civil servants only. Government Agency will insert the year and its Agency designation and remove the bracketed language.] Copyright (c) {YEAR} United States Government as represented by ____ ____. No copyright is claimed in the United States under Title 17, U.S.Code. All Other Rights Reserved. -K. "Sale" means the exchange of the Subject Software for money or equivalent -value. +C. Each Contributor must characterize its alteration of the Subject Software as a Modification and must identify itself as the originator of its Modification in a manner that reasonably allows subsequent Recipients to identify the originator of the Modification. In fulfillment of these requirements, Contributor must include a file (e.g., a change log file) that describes the alterations made and the date of the alterations, identifies Contributor as originator of the alterations, and consents to characterization of the alterations as a Modification, for example, by including a statement that the Modification is derived, directly or indirectly, from Original Software provided by Government Agency. Once consent is granted, it may not thereafter be revoked. -L. "Subject Software" means the Original Software, Modifications, or any respective -parts thereof. +D. A Contributor may add its own copyright notice to the Subject Software. Once a copyright notice has been added to the Subject Software, a Recipient may not remove it without the express permission of the Contributor who added the notice. -M. "Use" means the application or employment of the Subject Software for any -purpose. +E. A Recipient may not make any representation in the Subject Software or in any promotional, advertising or other material that may be construed as an endorsement by Government Agency or by any prior Recipient of any product or service provided by Recipient, or that may seek to obtain commercial advantage by the fact of Government Agency's or a prior Recipient's participation in this Agreement. - +F. In an effort to track usage and maintain accurate records of the Subject Software, each Recipient, upon receipt of the Subject Software, is requested to register with Government Agency by visiting the following website: ______. Recipient's name and personal information shall be used for statistical purposes only. Once a Recipient makes a Modification available, it is requested that the Recipient inform Government Agency at the web site provided above how to access the Modification. - GRANT OF RIGHTS +[Alternative paragraph for use when a web site for release and monitoring of subject software will not be supported by releasing Government Agency] In an effort to track usage and maintain accurate records of the Subject Software, each Recipient, upon receipt of the Subject Software, is requested to provide Government Agency, by e-mail to the Government Agency Point of Contact listed in clause 5.F., the following information: ______. Recipient's name and personal information shall be used for statistical purposes only. Once a Recipient makes a Modification available, it is requested that the Recipient inform Government Agency, by e-mail to the Government Agency Point of Contact listed in clause 5.F., how to access the Modification. -A. Under Non-Patent Rights: Subject to the terms and conditions of this Agreement, -each Contributor, with respect to its own contribution to the Subject Software, -hereby grants to each Recipient a non-exclusive, world-wide, royalty-free -license to engage in the following activities pertaining to the Subject Software: +G. Each Contributor represents that that its Modification is believed to be Contributor's original creation and does not violate any existing agreements, regulations, statutes or rules, and further that Contributor has sufficient rights to grant the rights conveyed by this Agreement. - 1. Use +H. A Recipient may choose to offer, and to charge a fee for, warranty, support, indemnity and/or liability obligations to one or more other Recipients of the Subject Software. A Recipient may do so, however, only on its own behalf and not on behalf of Government Agency or any other Recipient. Such a Recipient must make it absolutely clear that any such warranty, support, indemnity and/or liability obligation is offered by that Recipient alone. Further, such Recipient agrees to indemnify Government Agency and every other Recipient for any liability incurred by them as a result of warranty, support, indemnity and/or liability offered by such Recipient. - 2. Distribution +I. A Recipient may create a Larger Work by combining Subject Software with separate software not governed by the terms of this agreement and distribute the Larger Work as a single product. In such case, the Recipient must make sure Subject Software, or portions thereof, included in the Larger Work is subject to this Agreement. - 3. Reproduction +J. Notwithstanding any provisions contained herein, Recipient is hereby put on notice that export of any goods or technical data from the United States may require some form of export license from the U.S. Government. Failure to obtain necessary export licenses may result in criminal liability under U.S. laws. Government Agency neither represents that a license shall not be required nor that, if required, it shall be issued. Nothing granted herein provides any such export license. - 4. Modification +DISCLAIMER OF WARRANTIES AND LIABILITIES; WAIVER AND INDEMNIFICATION - 5. Redistribution +A. No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS RESULTING FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL WARRANTIES AND LIABILITIES REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, AND DISTRIBUTES IT "AS IS." - 6. Display +B. Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS IN ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM SUCH USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT. -B. Under Patent Rights: Subject to the terms and conditions of this Agreement, -each Contributor, with respect to its own contribution to the Subject Software, -hereby grants to each Recipient under Covered Patents a non-exclusive, world-wide, -royalty-free license to engage in the following activities pertaining to the -Subject Software: +GENERAL TERMS - 1. Use +A. Termination: This Agreement and the rights granted hereunder will terminate automatically if a Recipient fails to comply with these terms and conditions, and fails to cure such noncompliance within thirty (30) days of becoming aware of such noncompliance. Upon termination, a Recipient agrees to immediately cease use and distribution of the Subject Software. All sublicenses to the Subject Software properly granted by the breaching Recipient shall survive any such termination of this Agreement. - 2. Distribution +B. Severability: If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement. - 3. Reproduction +C. Applicable Law: This Agreement shall be subject to United States federal law only for all purposes, including, but not limited to, determining the validity of this Agreement, the meaning of its provisions and the rights, obligations and remedies of the parties. - 4. Sale +D. Entire Understanding: This Agreement constitutes the entire understanding and agreement of the parties relating to release of the Subject Software and may not be superseded, modified or amended except by further written agreement duly executed by the parties. - 5. Offer for Sale +E. Binding Authority: By accepting and using the Subject Software under this Agreement, a Recipient affirms its authority to bind the Recipient to all terms and conditions of this Agreement and that that Recipient hereby agrees to all terms and conditions herein. -C. The rights granted under Paragraph B. also apply to the combination of -a Contributor's Modification and the Subject Software if, at the time the -Modification is added by the Contributor, the addition of such Modification -causes the combination to be covered by the Covered Patents. It does not apply -to any other combinations that include a Modification. - -D. The rights granted in Paragraphs A. and B. allow the Recipient to sublicense -those same rights. Such sublicense must be under the same terms and conditions -of this Agreement. - - - - OBLIGATIONS OF RECIPIENT - -A. Distribution or Redistribution of the Subject Software must be made under -this Agreement except for additions covered under paragraph 3H. - -1. Whenever a Recipient distributes or redistributes the Subject Software, -a copy of this Agreement must be included with each copy of the Subject Software; -and - -2. If Recipient distributes or redistributes the Subject Software in any form -other than source code, Recipient must also make the source code freely available, -and must provide with each copy of the Subject Software information on how -to obtain the source code in a reasonable manner on or through a medium customarily -used for software exchange. - -B. Each Recipient must ensure that the following copyright notice appears -prominently in the Subject Software: - -[Government Agency will insert the applicable copyright notice in each agreement -accompanying the initial distribution of original software and remove this -bracketed language.] - -[The following copyright notice will be used if created by a contractor pursuant -to Government Agency contract and rights obtained from creator by assignment. -Government Agency will insert the year and its Agency designation and remove -the bracketed language.] Copyright (c) {YEAR} United States Government as -represented by _______________ . All Rights Reserved. - -[The following copyright notice will be used if created by civil servants -only. Government Agency will insert the year and its Agency designation and -remove the bracketed language.] Copyright (c) {YEAR} United States Government -as represented by _______________ . No copyright is claimed in the United -States under Title 17, U.S.Code. All Other Rights Reserved. - -C. Each Contributor must characterize its alteration of the Subject Software -as a Modification and must identify itself as the originator of its Modification -in a manner that reasonably allows subsequent Recipients to identify the originator -of the Modification. In fulfillment of these requirements, Contributor must -include a file (e.g., a change log file) that describes the alterations made -and the date of the alterations, identifies Contributor as originator of the -alterations, and consents to characterization of the alterations as a Modification, -for example, by including a statement that the Modification is derived, directly -or indirectly, from Original Software provided by Government Agency. Once -consent is granted, it may not thereafter be revoked. - -D. A Contributor may add its own copyright notice to the Subject Software. -Once a copyright notice has been added to the Subject Software, a Recipient -may not remove it without the express permission of the Contributor who added -the notice. - -E. A Recipient may not make any representation in the Subject Software or -in any promotional, advertising or other material that may be construed as -an endorsement by Government Agency or by any prior Recipient of any product -or service provided by Recipient, or that may seek to obtain commercial advantage -by the fact of Government Agency's or a prior Recipient's participation in -this Agreement. - -F. In an effort to track usage and maintain accurate records of the Subject -Software, each Recipient, upon receipt of the Subject Software, is requested -to register with Government Agency by visiting the following website: _______________ -. Recipient's name and personal information shall be used for statistical -purposes only. Once a Recipient makes a Modification available, it is requested -that the Recipient inform Government Agency at the web site provided above -how to access the Modification. - -[Alternative paragraph for use when a web site for release and monitoring -of subject software will not be supported by releasing Government Agency] -In an effort to track usage and maintain accurate records of the Subject Software, -each Recipient, upon receipt of the Subject Software, is requested to provide -Government Agency, by e-mail to the Government Agency Point of Contact listed -in clause 5.F., the following information: _______________ . Recipient's name -and personal information shall be used for statistical purposes only. Once -a Recipient makes a Modification available, it is requested that the Recipient -inform Government Agency, by e-mail to the Government Agency Point of Contact -listed in clause 5.F., how to access the Modification. - -G. Each Contributor represents that that its Modification is believed to be -Contributor's original creation and does not violate any existing agreements, -regulations, statutes or rules, and further that Contributor has sufficient -rights to grant the rights conveyed by this Agreement. - -H. A Recipient may choose to offer, and to charge a fee for, warranty, support, -indemnity and/or liability obligations to one or more other Recipients of -the Subject Software. A Recipient may do so, however, only on its own behalf -and not on behalf of Government Agency or any other Recipient. Such a Recipient -must make it absolutely clear that any such warranty, support, indemnity and/or -liability obligation is offered by that Recipient alone. Further, such Recipient -agrees to indemnify Government Agency and every other Recipient for any liability -incurred by them as a result of warranty, support, indemnity and/or liability -offered by such Recipient. - -I. A Recipient may create a Larger Work by combining Subject Software with -separate software not governed by the terms of this agreement and distribute -the Larger Work as a single product. In such case, the Recipient must make -sure Subject Software, or portions thereof, included in the Larger Work is -subject to this Agreement. - -J. Notwithstanding any provisions contained herein, Recipient is hereby put -on notice that export of any goods or technical data from the United States -may require some form of export license from the U.S. Government. Failure -to obtain necessary export licenses may result in criminal liability under -U.S. laws. Government Agency neither represents that a license shall not be -required nor that, if required, it shall be issued. Nothing granted herein -provides any such export license. - - - - DISCLAIMER OF WARRANTIES AND LIABILITIES; WAIVER AND INDEMNIFICATION - -A. No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY -OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED -TO, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, -ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, -OR FREEDOM FROM INFRINGEMENT, ANY WARRANTY THAT THE SUBJECT SOFTWARE WILL -BE ERROR FREE, OR ANY WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM -TO THE SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, CONSTITUTE -AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR RECIPIENT OF ANY RESULTS, -RESULTING DESIGNS, HARDWARE, SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS RESULTING -FROM USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY DISCLAIMS ALL -WARRANTIES AND LIABILITIES REGARDING THIRD-PARTY SOFTWARE, IF PRESENT IN THE -ORIGINAL SOFTWARE, AND DISTRIBUTES IT "AS IS." - -B. Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL CLAIMS AGAINST -THE UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL -AS ANY PRIOR RECIPIENT. IF RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS -IN ANY LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING FROM SUCH -USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, OR RESULTING FROM, RECIPIENT'S -USE OF THE SUBJECT SOFTWARE, RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE -UNITED STATES GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS ANY -PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. RECIPIENT'S SOLE REMEDY FOR -ANY SUCH MATTER SHALL BE THE IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT. - - - - GENERAL TERMS - -A. Termination: This Agreement and the rights granted hereunder will terminate -automatically if a Recipient fails to comply with these terms and conditions, -and fails to cure such noncompliance within thirty (30) days of becoming aware -of such noncompliance. Upon termination, a Recipient agrees to immediately -cease use and distribution of the Subject Software. All sublicenses to the -Subject Software properly granted by the breaching Recipient shall survive -any such termination of this Agreement. - -B. Severability: If any provision of this Agreement is invalid or unenforceable -under applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement. - -C. Applicable Law: This Agreement shall be subject to United States federal -law only for all purposes, including, but not limited to, determining the -validity of this Agreement, the meaning of its provisions and the rights, -obligations and remedies of the parties. - -D. Entire Understanding: This Agreement constitutes the entire understanding -and agreement of the parties relating to release of the Subject Software and -may not be superseded, modified or amended except by further written agreement -duly executed by the parties. - -E. Binding Authority: By accepting and using the Subject Software under this -Agreement, a Recipient affirms its authority to bind the Recipient to all -terms and conditions of this Agreement and that that Recipient hereby agrees -to all terms and conditions herein. - -F. Point of Contact: Any Recipient contact with Government Agency is to be -directed to the designated representative as follows: _______________ . +F. Point of Contact: Any Recipient contact with Government Agency is to be directed to the designated representative as follows: ___________. diff --git a/options/license/NBPL-1.0 b/options/license/NBPL-1.0 index 0f59ea20d..f6bf87992 100644 --- a/options/license/NBPL-1.0 +++ b/options/license/NBPL-1.0 @@ -1,104 +1,59 @@ -The Net Boolean Public License Version 1, 22 August 1998 Copyright 1998, Net -Boolean Incorporated, Redwood City, California, USA All Rights Reserved. Note: -This license is derived from the "Artistic License" as distributed with the -Perl Programming Language. Its terms are different from those of the "Artistic -License." +The Net Boolean Public License + +Version 1, 22 August 1998 Copyright 1998, Net Boolean Incorporated, Redwood City, California, USA All Rights Reserved. + +Note: This license is derived from the "Artistic License" as distributed with the Perl Programming Language. Its terms are different from those of the "Artistic License." PREAMBLE -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as uunet.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. - b) use the modified Package only within your corporation or organization. + b) use the modified Package only within your corporation or organization. -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. + b) accompany the distribution with the machine-readable source of the Package with your modifications. -c) accompany any non-standard executables with their corresponding Standard -Version executables, giving the non-standard executables non-standard names, -and clearly documenting the differences in manual pages (or equivalent), together -with instructions on where to get the Standard Version. + c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -7. C subroutines supplied by you and linked into this Package in order to -emulate subroutines and variables of the language defined by this Package -shall not be considered part of this Package, but are the equivalent of input -as in Paragraph 6, provided these subroutines do not change the language in -any way that would cause it to fail the regression tests for the language. +7. C subroutines supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. -8. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. +8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/options/license/NCGL-UK-2.0 b/options/license/NCGL-UK-2.0 index 44b8c79e3..31fbad6f8 100644 --- a/options/license/NCGL-UK-2.0 +++ b/options/license/NCGL-UK-2.0 @@ -1,138 +1,67 @@ Non-Commercial Government Licence - for public sector information -You are encouraged to use and re-use the Information that is available under -this licence freely and flexibly, with only a few conditions. +You are encouraged to use and re-use the Information that is available under this licence freely and flexibly, with only a few conditions. Using information under this licence -Use of copyright and database right material expressly made available under -this licence (the 'Information') indicates your acceptance of the terms and -conditions below. +Use of copyright and database right material expressly made available under this licence (the ‘Information’) indicates your acceptance of the terms and conditions below. -The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive -licence to use the Information for Non-Commercial purposes only subject to -the conditions below. +The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive licence to use the Information for Non-Commercial purposes only subject to the conditions below. -This licence does not affect your freedom under fair dealing or fair use or -any other copyright or database right exceptions and limitations. +This licence does not affect your freedom under fair dealing or fair use or any other copyright or database right exceptions and limitations. You are free to: - - copy, publish, distribute and transmit the Information; - - adapt the Information; - -exploit the Information for Non-Commercial purposes for example, by combining -it with other information in your own product or application. + copy, publish, distribute and transmit the Information; + adapt the Information; + exploit the Information for Non-Commercial purposes for example, by combining it with other information in your own product or application. You are not permitted to: - -exercise any of the rights granted to you by this licence in any manner that -is primarily intended for or directed toward commercial advantage or private -monetary compensation. + exercise any of the rights granted to you by this licence in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. You must, where you do any of the above: + acknowledge the source of the Information by including any attribution statement specified by the Information Provider(s) and, where possible, provide a link to this licence; -acknowledge the source of the Information by including any attribution statement -specified by the Information Provider(s) and, where possible, provide a link -to this licence; +If the Information Provider does not provide a specific attribution statement, you must use the following: + Contains information licensed under the Non-Commercial Government Licence v2.0. -If the Information Provider does not provide a specific attribution statement, -you must use the following: +If you are using Information from several Information Providers and listing multiple attributions is not practical in your product or application, you may include a URI or hyperlink to a resource that contains the required attribution statements. + ensure that any onward licensing of the Information – for example when combined with other information – is for Non-Commercial purposes only. -Contains information licensed under the Non-Commercial Government Licence -v2.0. - -If you are using Information from several Information Providers and listing -multiple attributions is not practical in your product or application, you -may include a URI or hyperlink to a resource that contains the required attribution -statements. - -ensure that any onward licensing of the Information – for example when combined -with other information – is for Non-Commercial purposes only. - -These are important conditions of this licence and if you fail to comply with -them or use the Information other than for Non-Commercial purposes the rights -granted to you under this licence, or any similar licence granted by the Licensor, -will end automatically. +These are important conditions of this licence and if you fail to comply with them or use the Information other than for Non-Commercial purposes the rights granted to you under this licence, or any similar licence granted by the Licensor, will end automatically. Exemptions This licence does not cover the use of: - - • personal data in the Information; - -• Information that has not been accessed by way of publication or disclosure -under information access legislation (including the Freedom of Information -Acts for the UK and Scotland) by or with the consent of the Information Provider; - -• departmental or public sector organisation logos, crests, military insignia -and the Royal Arms except where they form an integral part of a document or -dataset; - - • military insignia - - • third party rights the Information Provider is not authorised to license; - -• other intellectual property rights, including patents, trade marks, and -design rights; and - - • identity documents such as the British Passport. + • personal data in the Information; + • Information that has not been accessed by way of publication or disclosure under information access legislation (including the Freedom of Information Acts for the UK and Scotland) by or with the consent of the Information Provider; + • departmental or public sector organisation logos, crests, military insignia and the Royal Arms except where they form an integral part of a document or dataset; + • military insignia + • third party rights the Information Provider is not authorised to license; + • other intellectual property rights, including patents, trade marks, and design rights; and + • identity documents such as the British Passport. Non-endorsement - -This licence does not grant you any right to use the Information in a way -that suggests any official status or that the Information Provider and/or -Licensor endorse you or your use of the Information. +This licence does not grant you any right to use the Information in a way that suggests any official status or that the Information Provider and/or Licensor endorse you or your use of the Information. No warranty - -The Information is licensed 'as is' and the Information Provider excludes -all representations, warranties, obligations and liabilities in relation to -the Information to the maximum extent permitted by law. - -The Information Provider is not liable for any errors or omissions in the -Information and shall not be liable for any loss, injury or damage of any -kind caused by its use. The Information Provider does not guarantee the continued -supply of the Information. +The Information is licensed ‘as is’ and the Information Provider excludes all representations, warranties, obligations and liabilities in relation to the Information to the maximum extent permitted by law. +The Information Provider is not liable for any errors or omissions in the Information and shall not be liable for any loss, injury or damage of any kind caused by its use. The Information Provider does not guarantee the continued supply of the Information. Governing Law - -This licence is governed by the laws of the jurisdiction in which the Information -Provider has its principal place of business, unless otherwise specified by -the Information Provider. +This licence is governed by the laws of the jurisdiction in which the Information Provider has its principal place of business, unless otherwise specified by the Information Provider. Definitions - In this licence the terms below have the following meanings: -'Information' means information protected by copyright or by database right -(for example, literary and artistic works, content, data and source code) -offered for use under the terms of this licence. +‘Information’ means information protected by copyright or by database right (for example, literary and artistic works, content, data and source code) offered for use under the terms of this licence. -'Information Provider' means the person or organisation providing the Information -under this licence. +‘Information Provider’ means the person or organisation providing the Information under this licence. -'Licensor' means any Information Provider which has the authority to offer -Information under the terms of this licence or the Keeper of the Public Records, -who has the authority to offer Information subject to Crown copyright and -Crown database rights and Information subject to copyright and database right -that has been assigned to or acquired by the Crown, under the terms of this -licence. +‘Licensor’ means any Information Provider which has the authority to offer Information under the terms of this licence or the Keeper of the Public Records, who has the authority to offer Information subject to Crown copyright and Crown database rights and Information subject to copyright and database right that has been assigned to or acquired by the Crown, under the terms of this licence. -'Non-Commercial purposes' means not intended for or directed toward commercial -advantage or private monetary compensation. For the purposes of this licence, -'private monetary compensation' does not include the exchange of the Information -for other copyrighted works by means of digital file-sharing or otherwise -provided there is no payment of any monetary compensation in connection with -the exchange of the Information. +‘Non-Commercial purposes’ means not intended for or directed toward commercial advantage or private monetary compensation. For the purposes of this licence, ‘private monetary compensation’ does not include the exchange of the Information for other copyrighted works by means of digital file-sharing or otherwise provided there is no payment of any monetary compensation in connection with the exchange of the Information. -'Use' as a verb, means doing any act which is restricted by copyright or database -right, whether in the original medium or in any other medium, and includes -without limitation distributing, copying, adapting, modifying as may be technically -necessary to use it in a different mode or format. +‘Use’ as a verb, means doing any act which is restricted by copyright or database right, whether in the original medium or in any other medium, and includes without limitation distributing, copying, adapting, modifying as may be technically necessary to use it in a different mode or format. -'You' means the natural or legal person, or body of persons corporate or incorporate, -acquiring rights under this licence. +‘You’ means the natural or legal person, or body of persons corporate or incorporate, acquiring rights under this licence. diff --git a/options/license/NCSA b/options/license/NCSA index 3ed0f0e28..cf5413eff 100644 --- a/options/license/NCSA +++ b/options/license/NCSA @@ -1,35 +1,15 @@ -University of Illinois/NCSA Open Source License Copyright (c) . All rights reserved. +University of Illinois/NCSA Open Source License -Developed by: +Copyright (c) . All rights reserved. - +Developed by: - +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -with the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution. -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimers. + * Neither the names of , nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimers in the documentation -and/or other materials provided with the distribution. - -* Neither the names of , -nor the names of its contributors may be used to endorse or promote products -derived from this Software without specific prior written permission. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE. diff --git a/options/license/NGPL b/options/license/NGPL index 7ff93a0a8..acd7c47a2 100644 --- a/options/license/NGPL +++ b/options/license/NGPL @@ -1,90 +1,21 @@ -NETHACK GENERAL PUBLIC LICENSE (Copyright 1989 M. Stephenson) - +NETHACK GENERAL PUBLIC LICENSE +(Copyright 1989 M. Stephenson) (Based on the BISON general public license, copyright 1988 Richard M. Stallman) - -Everyone is permitted to copy and distribute verbatim copies of this license, -but changing it is not allowed. You can also use this wording to make the -terms for other programs. - -The license agreements of most software companies keep you at the mercy of -those companies. By contrast, our general public license is intended to give -everyone the right to share NetHack. To make sure that you get the rights -we want you to have, we need to make restrictions that forbid anyone to deny -you these rights or to ask you to surrender the rights. Hence this license -agreement. - -Specifically, we want to make sure that you have the right to give away copies -of NetHack, that you receive source code or else can get it if you want it, -that you can change NetHack or use pieces of it in new free programs, and -that you know you can do these things. - -To make sure that everyone has such rights, we have to forbid you to deprive -anyone else of these rights. For example, if you distribute copies of NetHack, -you must give the recipients all the rights that you have. You must make sure -that they, too, receive or can get the source code. And you must tell them -their rights. - -Also, for our own protection, we must make certain that everyone finds out -that there is no warranty for NetHack. If NetHack is modified by someone else -and passed on, we want its recipients to know that what they have is not what -we distributed. - -Therefore we (Mike Stephenson and other holders of NetHack copyrights) make -the following terms which say what you must do to be allowed to distribute -or change NetHack. - +Everyone is permitted to copy and distribute verbatim copies of this license, but changing it is not allowed. You can also use this wording to make the terms for other programs. +The license agreements of most software companies keep you at the mercy of those companies. By contrast, our general public license is intended to give everyone the right to share NetHack. To make sure that you get the rights we want you to have, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. Hence this license agreement. +Specifically, we want to make sure that you have the right to give away copies of NetHack, that you receive source code or else can get it if you want it, that you can change NetHack or use pieces of it in new free programs, and that you know you can do these things. +To make sure that everyone has such rights, we have to forbid you to deprive anyone else of these rights. For example, if you distribute copies of NetHack, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. +Also, for our own protection, we must make certain that everyone finds out that there is no warranty for NetHack. If NetHack is modified by someone else and passed on, we want its recipients to know that what they have is not what we distributed. +Therefore we (Mike Stephenson and other holders of NetHack copyrights) make the following terms which say what you must do to be allowed to distribute or change NetHack. COPYING POLICIES - -1. You may copy and distribute verbatim copies of NetHack source code as you -receive it, in any medium, provided that you keep intact the notices on all -files that refer to copyrights, to this License Agreement, and to the absence -of any warranty; and give any other recipients of the NetHack program a copy -of this License Agreement along with the program. - -2. You may modify your copy or copies of NetHack or any portion of it, and -copy and distribute such modifications under the terms of Paragraph 1 above -(including distributing this License Agreement), provided that you also do -the following: - -a) cause the modified files to carry prominent notices stating that you changed -the files and the date of any change; and - -b) cause the whole of any work that you distribute or publish, that in whole -or in part contains or is a derivative of NetHack or any part thereof, to -be licensed at no charge to all third parties on terms identical to those -contained in this License Agreement (except that you may choose to grant more -extensive warranty protection to some or all third parties, at your option) - -c) You may charge a distribution fee for the physical act of transferring -a copy, and you may at your option offer warranty protection in exchange for -a fee. - -3. You may copy and distribute NetHack (or a portion or derivative of it, -under Paragraph 2) in object code or executable form under the terms of Paragraphs -1 and 2 above provided that you also do one of the following: - -a) accompany it with the complete machine-readable source code, which must -be distributed under the terms of Paragraphs 1 and 2 above; or, - -b) accompany it with full information as to how to obtain the complete machine-readable -source code from an appropriate archive site. (This alternative is allowed -only for noncommercial distribution.) - -For these purposes, complete source code means either the full source distribution -as originally released over Usenet or updated copies of the files in this -distribution used to create the object code or executable. - -4. You may not copy, sublicense, distribute or transfer NetHack except as -expressly provided under this License Agreement. Any attempt otherwise to -copy, sublicense, distribute or transfer NetHack is void and your rights to -use the program under this License agreement shall be automatically terminated. -However, parties who have received computer software programs from you with -this License Agreement will not have their licenses terminated so long as -such parties remain in full compliance. - -Stated plainly: You are permitted to modify NetHack, or otherwise use parts -of NetHack, provided that you comply with the conditions specified above; -in particular, your modified NetHack or program containing parts of NetHack -must remain freely available as provided in this License Agreement. In other -words, go ahead and share NetHack, but don't try to stop anyone else from -sharing it farther. + 1. You may copy and distribute verbatim copies of NetHack source code as you receive it, in any medium, provided that you keep intact the notices on all files that refer to copyrights, to this License Agreement, and to the absence of any warranty; and give any other recipients of the NetHack program a copy of this License Agreement along with the program. + 2. You may modify your copy or copies of NetHack or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above (including distributing this License Agreement), provided that you also do the following: + a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and + b) cause the whole of any work that you distribute or publish, that in whole or in part contains or is a derivative of NetHack or any part thereof, to be licensed at no charge to all third parties on terms identical to those contained in this License Agreement (except that you may choose to grant more extensive warranty protection to some or all third parties, at your option) + c) You may charge a distribution fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. + 3. You may copy and distribute NetHack (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: + a) accompany it with the complete machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, + b) accompany it with full information as to how to obtain the complete machine-readable source code from an appropriate archive site. (This alternative is allowed only for noncommercial distribution.) + For these purposes, complete source code means either the full source distribution as originally released over Usenet or updated copies of the files in this distribution used to create the object code or executable. + 4. You may not copy, sublicense, distribute or transfer NetHack except as expressly provided under this License Agreement. Any attempt otherwise to copy, sublicense, distribute or transfer NetHack is void and your rights to use the program under this License agreement shall be automatically terminated. However, parties who have received computer software programs from you with this License Agreement will not have their licenses terminated so long as such parties remain in full compliance. +Stated plainly: You are permitted to modify NetHack, or otherwise use parts of NetHack, provided that you comply with the conditions specified above; in particular, your modified NetHack or program containing parts of NetHack must remain freely available as provided in this License Agreement. In other words, go ahead and share NetHack, but don't try to stop anyone else from sharing it farther. diff --git a/options/license/NIST-PD b/options/license/NIST-PD index 76938cde5..e1a4e65ba 100644 --- a/options/license/NIST-PD +++ b/options/license/NIST-PD @@ -2,14 +2,14 @@ Terms Of Use This software was developed by employees of the National Institute of Standards and Technology (NIST), and others. This software has been contributed to the -public domain. Pursuant to title 15 Untied States Code Section 105, works -of NIST employees are not subject to copyright protection in the United States -and are considered to be in the public domain. As a result, a formal license -is not needed to use this software. +public domain. Pursuant to title 15 Untied States Code Section 105, works of +NIST employees are not subject to copyright protection in the United States and +are considered to be in the public domain. As a result, a formal license is +not needed to use this software. This software is provided "AS IS." NIST MAKES NO WARRANTY OF ANY KIND, EXPRESS, -IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT AND -DATA ACCURACY. NIST does not warrant or make any representations regarding -the use of the software or the results thereof, including but not limited -to the correctness, accuracy, reliability or usefulness of this software. +IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT AND DATA +ACCURACY. NIST does not warrant or make any representations regarding the use +of the software or the results thereof, including but not limited to the +correctness, accuracy, reliability or usefulness of this software. diff --git a/options/license/NIST-PD-fallback b/options/license/NIST-PD-fallback index 9eacb5fd7..49f91bce1 100644 --- a/options/license/NIST-PD-fallback +++ b/options/license/NIST-PD-fallback @@ -1,25 +1,5 @@ Conditions of Use -This software was developed by employees of the National Institute of Standards -and Technology (NIST), an agency of the Federal Government and is being made -available as a public service. Pursuant to title 17 United States Code Section -105, works of NIST employees are not subject to copyright protection in the -United States. This software may be subject to foreign copyright. Permission -in the United States and in foreign countries, to the extent that NIST may -hold copyright, to use, copy, modify, create derivative works, and distribute -this software and its documentation without fee is hereby granted on a non-exclusive -basis, provided that this notice and disclaimer of warranty appears in all -copies. +This software was developed by employees of the National Institute of Standards and Technology (NIST), an agency of the Federal Government and is being made available as a public service. Pursuant to title 17 United States Code Section 105, works of NIST employees are not subject to copyright protection in the United States. This software may be subject to foreign copyright. Permission in the United States and in foreign countries, to the extent that NIST may hold copyright, to use, copy, modify, create derivative works, and distribute this software and its documentation without fee is hereby granted on a non-exclusive basis, provided that this notice and disclaimer of warranty appears in all copies. -THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER -EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY -THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, -AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY -WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NIST BE LIABLE -FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL -OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY CONNECTED -WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, CONTRACT, TORT, OR -OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR PROPERTY OR OTHERWISE, -AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF THE RESULTS OF, -OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER. +THE SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT THE SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND FREEDOM FROM INFRINGEMENT, AND ANY WARRANTY THAT THE DOCUMENTATION WILL CONFORM TO THE SOFTWARE, OR ANY WARRANTY THAT THE SOFTWARE WILL BE ERROR FREE. IN NO EVENT SHALL NIST BE LIABLE FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES, ARISING OUT OF, RESULTING FROM, OR IN ANY WAY CONNECTED WITH THIS SOFTWARE, WHETHER OR NOT BASED UPON WARRANTY, CONTRACT, TORT, OR OTHERWISE, WHETHER OR NOT INJURY WAS SUSTAINED BY PERSONS OR PROPERTY OR OTHERWISE, AND WHETHER OR NOT LOSS WAS SUSTAINED FROM, OR AROSE OUT OF THE RESULTS OF, OR USE OF, THE SOFTWARE OR SERVICES PROVIDED HEREUNDER. diff --git a/options/license/NLOD-1.0 b/options/license/NLOD-1.0 index 9daee7f9a..b0b0767e3 100644 --- a/options/license/NLOD-1.0 +++ b/options/license/NLOD-1.0 @@ -1,188 +1,79 @@ -Norwegian Licence for Open Government Data (NLOD) +Norwegian Licence for Open Government Data (NLOD) 1.0 Preface of licence -This licence grants you the right to copy, use and distribute information, -provided you acknowledge the contributors and comply with the terms and conditions -stipulated in this licence. By using information made available under this -licence, you accept the terms and conditions set forth in this licence. As -set out in Section 7, the licensor disclaims any and all liability for the -quality of the information and what the information is used for. +This licence grants you the right to copy, use and distribute information, provided you acknowledge the contributors and comply with the terms and conditions stipulated in this licence. By using information made available under this licence, you accept the terms and conditions set forth in this licence. As set out in Section 7, the licensor disclaims any and all liability for the quality of the information and what the information is used for. -This licence shall not impose any limitations on the rights or freedoms of -the licensee under the Norwegian Freedom of Information Act or any other legislation -granting the general public a right of access to public sector information, -or that follow from exemptions or limitations stipulated in the Norwegian -Copyright Act. Further, the licence shall not impose any limitations on the -licensee's freedom of expression recognized by law. +This licence shall not impose any limitations on the rights or freedoms of the licensee under the Norwegian Freedom of Information Act or any other legislation granting the general public a right of access to public sector information, or that follow from exemptions or limitations stipulated in the Norwegian Copyright Act. Further, the licence shall not impose any limitations on the licensee's freedom of expression recognized by law. - 1. Definitions +1. Definitions -«Database» shall mean a database or similar protected under Section 43 of -the Norwegian Copyright Act. + «Database» shall mean a database or similar protected under Section 43 of the Norwegian Copyright Act. + «Information» shall mean texts, images, recordings, data sets or other works protected under Section 1 of the Norwegian Copyright Act, or which are protected under provisions addressing what is referred to as «neighbouring rights» in Chapter 5 of the Norwegian Copyright Act (including databases and photographs), and which are distributed under this licence. + «Copy» shall mean reproduction in any form. + «Licensee» and «you» shall mean natural or legal persons using information under this licence. + «Licensor» shall mean the natural or legal person that makes information available under this licence. + «Distribute» shall mean any actions whereby information is made available, including to distribute, transfer, communicate, disperse, show, perform, sell, lend and rent. + «Use» shall mean one or more actions relevant to copyright law requiring permission from the owner of the copyright. -«Information» shall mean texts, images, recordings, data sets or other works -protected under Section 1 of the Norwegian Copyright Act, or which are protected -under provisions addressing what is referred to as «neighbouring rights» in -Chapter 5 of the Norwegian Copyright Act (including databases and photographs), -and which are distributed under this licence. +2. Licence +The licensee, subject to the limitations that follow from this licence, may use the information for any purpose and in all contexts, by: - «Copy» shall mean reproduction in any form. + * copying the information and distributing the information to others, + * modifying the information and/or combining the information with other information, and + * copying and distributing such changed or combined information. + * This is a non-exclusive, free, perpetual and worldwide licence. The information may be used in any medium and format known today and/or which will become known in the future. The Licensee shall not sub-license or transfer this licence. -«Licensee» and «you» shall mean natural or legal persons using information -under this licence. +3. Exemptions +The licence does not apply to and therefore does not grant a right to use: -«Licensor» shall mean the natural or legal person that makes information available -under this licence. + * information which contains personal data covered by the Norwegian Personal Data Act unless there is a legitimate basis for the disclosure and further processing of the personal data + * information distributed in violation of a statutory obligation to observe confidentiality + * information excluded from public disclosure pursuant to law, including information deemed sensitive under the Norwegian National Security Act + * information subject to third party rights which the licensor is not authorised to license to the licensee + * information protected by intellectual property rights other than copyright and neighbouring rights in accordance with Chapter 5 of the Norwegian Copyright Act, such as trademarks, patents and design rights, but this does not entail an impediment to use information where the licensor's logo has been permanently integrated into the information or to attribute the origin of the information in accordance with the article below relating to attribution. -«Distribute» shall mean any actions whereby information is made available, -including to distribute, transfer, communicate, disperse, show, perform, sell, -lend and rent. +If the licensor has made available information not covered by the licence according to the above list, the licensee must cease all use of the information under the licence, and erase the information as soon as he or she becomes aware of or should have understood that the information is not covered by the licence. -«Use» shall mean one or more actions relevant to copyright law requiring permission -from the owner of the copyright. +4. Effects of breach of the licence +The licence is subject to the licensee's compliance with the terms and conditions of this licence. In the event that the licensee commits a breach of this licence, this will entail that the licensee's right to use the information will be revoked immediately without further notice. In case of such a breach, the licensee must immediately and without further notice take measures to cause the infringement to end. Because the right to use the information has been terminated, the licensee must cease all use of the information by virtue of the licence. - 2. Licence +5. Attribution +The licensee shall attribute the licensor as specified by the licensor and include a reference to this licence. To the extent practically possible, the licensee shall provide a link to both this licence and the source of the information. -The licensee, subject to the limitations that follow from this licence, may -use the information for any purpose and in all contexts, by: +If the licensor has not specified how attributions shall be made, the licensee shall normally state the following: «Contains data under the Norwegian licence for Open Government data (NLOD) distributed by [name of licensor]». - * copying the information and distributing the information to others, +If the licensor has specified that the information shall only be available under a specific version of this licence, cf. Section 10, the licensee shall also state this. -* modifying the information and/or combining the information with other information, -and +If the information has been changed, the licensee must clearly indicate that changes have been made by the licensee. - * copying and distributing such changed or combined information. +6. Proper use +The licensee shall not use the information in a manner that appears misleading nor present the information in a distorted or incorrect manner. +Neither the licensor's nor other contributors' names or trademarks must be used to support, recommend or market the licensee or any products or services using the information. -* This is a non-exclusive, free, perpetual and worldwide licence. The information -may be used in any medium and format known today and/or which will become -known in the future. The Licensee shall not sub-license or transfer this licence. +7. Disclaimer of liability +The information is licensed «as is». The information may contain errors and omissions. The licensor provides no warranties, including relating to the content and relevance of the information. - 3. Exemptions +The licensor disclaims any liability for errors and defects associated with the information to the maximum extent permitted by law. - The licence does not apply to and therefore does not grant a right to use: +The licensor shall not be liable for direct or indirect losses as a result of use of the information or in connection with copying or further distribution of the information. -* information which contains personal data covered by the Norwegian Personal -Data Act unless there is a legitimate basis for the disclosure and further -processing of the personal data +8. Guarantees regarding data quality and accessibility +This licence does not prevent the licensor from issuing supplementary statements regarding expected or intended data quality and accessibility. Such statements shall be regarded as indicative in nature and not binding on the part of the licensor. The disclaimers in Section 7 also apply in full for such indicative statements. Based on separate agreement, the licensor may provide guarantees and distribute the information on terms and conditions different from those set forth in this licence. -* information distributed in violation of a statutory obligation to observe -confidentiality +9. Licence compatibility +If the licensee is to distribute an adapted or combined work based on information covered by this licence and some other work licensed under a licence compatible by contract, such distribution may be based on an appropriate licence compatible by contract, cf. the list below. -* information excluded from public disclosure pursuant to law, including information -deemed sensitive under the Norwegian National Security Act +A licence compatible by contract shall mean the following licences: -* information subject to third party rights which the licensor is not authorised -to license to the licensee + * for all information: Open Government Licence (version 1.0), + * for those parts of the information which do not constitute databases: Creative Commons Attribution Licence (generic version 1.0, 2.0, 2.5 and unported version 3.0) and Creative Commons Navngivelse 3.0 Norge, + * for those parts of the information which constitute databases: Open Data Commons Attribution License (version 1.0). -* information protected by intellectual property rights other than copyright -and neighbouring rights in accordance with Chapter 5 of the Norwegian Copyright -Act, such as trademarks, patents and design rights, but this does not entail -an impediment to use information where the licensor's logo has been permanently -integrated into the information or to attribute the origin of the information -in accordance with the article below relating to attribution. +This provision does not prevent other licences from being compatible with this licence based on their content. -If the licensor has made available information not covered by the licence -according to the above list, the licensee must cease all use of the information -under the licence, and erase the information as soon as he or she becomes -aware of or should have understood that the information is not covered by -the licence. +10. New versions of the licence +The licensee may choose to use the information covered by this licence under any new versions of the Norwegian licence for Open Government data (NLOD) issued by the responsible ministry (currently the Ministry of Government Administration, Reform and Church Affairs) when these versions are final and official, unless the licensor when making the information available under this licence specifically has stated that solely version 1.0 of this licence may be used. - 4. Effects of breach of the licence - -The licence is subject to the licensee's compliance with the terms and conditions -of this licence. In the event that the licensee commits a breach of this licence, -this will entail that the licensee's right to use the information will be -revoked immediately without further notice. In case of such a breach, the -licensee must immediately and without further notice take measures to cause -the infringement to end. Because the right to use the information has been -terminated, the licensee must cease all use of the information by virtue of -the licence. - - 5. Attribution - -The licensee shall attribute the licensor as specified by the licensor and -include a reference to this licence. To the extent practically possible, the -licensee shall provide a link to both this licence and the source of the information. - -If the licensor has not specified how attributions shall be made, the licensee -shall normally state the following: «Contains data under the Norwegian licence -for Open Government data (NLOD) distributed by [name of licensor]». - -If the licensor has specified that the information shall only be available -under a specific version of this licence, cf. Section 10, the licensee shall -also state this. - -If the information has been changed, the licensee must clearly indicate that -changes have been made by the licensee. - - 6. Proper use - -The licensee shall not use the information in a manner that appears misleading -nor present the information in a distorted or incorrect manner. - -Neither the licensor's nor other contributors' names or trademarks must be -used to support, recommend or market the licensee or any products or services -using the information. - - 7. Disclaimer of liability - -The information is licensed «as is». The information may contain errors and -omissions. The licensor provides no warranties, including relating to the -content and relevance of the information. - -The licensor disclaims any liability for errors and defects associated with -the information to the maximum extent permitted by law. - -The licensor shall not be liable for direct or indirect losses as a result -of use of the information or in connection with copying or further distribution -of the information. - - 8. Guarantees regarding data quality and accessibility - -This licence does not prevent the licensor from issuing supplementary statements -regarding expected or intended data quality and accessibility. Such statements -shall be regarded as indicative in nature and not binding on the part of the -licensor. The disclaimers in Section 7 also apply in full for such indicative -statements. Based on separate agreement, the licensor may provide guarantees -and distribute the information on terms and conditions different from those -set forth in this licence. - - 9. Licence compatibility - -If the licensee is to distribute an adapted or combined work based on information -covered by this licence and some other work licensed under a licence compatible -by contract, such distribution may be based on an appropriate licence compatible -by contract, cf. the list below. - - A licence compatible by contract shall mean the following licences: - - * for all information: Open Government Licence (version 1.0), - -* for those parts of the information which do not constitute databases: Creative -Commons Attribution Licence (generic version 1.0, 2.0, 2.5 and unported version -3.0) and Creative Commons Navngivelse 3.0 Norge, - -* for those parts of the information which constitute databases: Open Data -Commons Attribution License (version 1.0). - -This provision does not prevent other licences from being compatible with -this licence based on their content. - - 10. New versions of the licence - -The licensee may choose to use the information covered by this licence under -any new versions of the Norwegian licence for Open Government data (NLOD) -issued by the responsible ministry (currently the Ministry of Government Administration, -Reform and Church Affairs) when these versions are final and official, unless -the licensor when making the information available under this licence specifically -has stated that solely version 1.0 of this licence may be used. - - 11. Governing law and legal venue - -This licence, including its formation, and any disputes and claims arising -in connection with or relating to this licence, shall be regulated by Norwegian -law. The legal venue shall be the licensor's ordinary legal venue. The licensor -may, with regard to intellectual proprietary rights, choose to pursue a claim -at other competent legal venues and/or based on the laws of the country where -the intellectual property rights are sought enforced. +11. Governing law and legal venue +This licence, including its formation, and any disputes and claims arising in connection with or relating to this licence, shall be regulated by Norwegian law. The legal venue shall be the licensor's ordinary legal venue. The licensor may, with regard to intellectual proprietary rights, choose to pursue a claim at other competent legal venues and/or based on the laws of the country where the intellectual property rights are sought enforced. diff --git a/options/license/NLOD-2.0 b/options/license/NLOD-2.0 new file mode 100644 index 000000000..6233940c1 --- /dev/null +++ b/options/license/NLOD-2.0 @@ -0,0 +1,80 @@ +Norwegian Licence for Open Government Data (NLOD) 2.0 + +Preface of licence + +This licence grants you the right to copy, use and distribute information, provided you acknowledge the contributors and comply with the terms and conditions stipulated in this licence. By using information made available under this licence, you accept the terms and conditions set forth in this licence. As set out in Section 7, the licensor disclaims any and all liability for the quality of the information and what the information is used for. + +This licence shall not impose any limitations on the rights or freedoms of the licensee under the Norwegian Freedom of Information Act or any other legislation granting the general public a right of access to public sector information, or that follow from exemptions or limitations stipulated in the Norwegian Copyright Act. Further, the licence shall not impose any limitations on the licensee’s freedom of expression recognized by law. + +1. Definitions + + «Database» shall mean a database or similar protected under Section 43 of the Norwegian Copyright Act. + «Information» shall mean texts, images, recordings, data sets or other works protected under Section 1 of the Norwegian Copyright Act, or which are protected under provisions addressing what is referred to as «neighbouring rights» in Chapter 5 of the Norwegian Copyright Act (including databases and photographs), and which are distributed under this licence. + «Copy» shall mean reproduction in any form. + «Licensee» and «you» shall mean natural or legal persons using information under this licence. + «Licensor» shall mean the natural or legal person that makes information available under this licence. + «Distribute» shall mean any actions whereby information is made available, including to distribute, transfer, communicate, disperse, show, perform, sell, lend and rent. + «Use» shall mean one or more actions relevant to copyright law requiring permission from the owner of the copyright. + +2. Licence +The licensee, subject to the limitations that follow from this licence, may use the information for any purpose and in all contexts, by: + + * copying the information and distributing the information to others, + * modifying the information and/or combining the information with other information, and + * copying and distributing such changed or combined information. + +This is a non-exclusive, free, perpetual and worldwide licence. The information may be used in any medium and format known today and/or which will become known in the future. The Licensee shall not sub-license or transfer this licence. + +3. Exemptions +The licence does not apply to and therefore does not grant a right to use: + + * information which contains personal data covered by the Norwegian Personal Data Act unless there is a legitimate basis for the disclosure and further processing of the personal data + * information distributed in violation of a statutory obligation to observe confidentiality + * information excluded from public disclosure pursuant to law, including information deemed sensitive under the Norwegian National Security Act + * information subject to third party rights which the licensor is not authorised to license to the licensee + * information protected by intellectual property rights other than copyright and neighbouring rights in accordance with Chapter 5 of the Norwegian Copyright Act, such as trademarks, patents and design rights, but this does not entail an impediment to use information where the licensor’s logo has been permanently integrated into the information or to attribute the origin of the information in accordance with the article below relating to attribution. + +If the licensor has made available information not covered by the licence according to the above list, the licensee must cease all use of the information under the licence, and erase the information as soon as he or she becomes aware of or should have understood that the information is not covered by the licence. + +4. Effects of breach of the licence +The licence is subject to the licensee’s compliance with the terms and conditions of this licence. In the event that the licensee commits a breach of this licence, this will entail that the licensee’s right to use the information will be revoked immediately without further notice. In case of such a breach, the licensee must immediately and without further notice take measures to cause the infringement to end. Because the right to use the information has been terminated, the licensee must cease all use of the information by virtue of the licence. + +5. Attribution +The licensee shall attribute the licensor as specified by the licensor and include a reference to this licence. To the extent practically possible, the licensee shall provide a link to both this licence and the source of the information. + +If the licensor has not specified how attributions shall be made, the licensee shall normally state the following: «Contains data under the Norwegian licence for Open Government data (NLOD) distributed by [name of licensor]». + +If the licensor has specified that the information shall only be available under a specific version of this licence, cf. Section 10, the licensee shall also state this. + +If the information has been changed, the licensee must clearly indicate that changes have been made by the licensee. + +6. Proper use +The licensee shall not use the information in a manner that appears misleading nor present the information in a distorted or incorrect manner. +Neither the licensor’s nor other contributors' names or trademarks must be used to support, recommend or market the licensee or any products or services using the information. + +7. Disclaimer of liability +The information is licensed «as is». The information may contain errors and omissions. The licensor provides no warranties, including relating to the content and relevance of the information. + +The licensor disclaims any liability for errors and defects associated with the information to the maximum extent permitted by law. + +The licensor shall not be liable for direct or indirect losses as a result of use of the information or in connection with copying or further distribution of the information. + +8. Guarantees regarding data quality and accessibility +This licence does not prevent the licensor from issuing supplementary statements regarding expected or intended data quality and accessibility. Such statements shall be regarded as indicative in nature and not binding on the part of the licensor. The disclaimers in Section 7 also apply in full for such indicative statements. Based on separate agreement, the licensor may provide guarantees and distribute the information on terms and conditions different from those set forth in this licence. + +9. Licence compatibility +If the licensee is to distribute an adapted or combined work based on information covered by this licence and some other work licensed under a licence compatible by contract, such distribution may be based on an appropriate licence compatible by contract, cf. the list below. + +A licence compatible by contract shall mean the following licences: + + * for all information: Open Government Licence (version 1.0, 2.0 and 3.0), Creative Commons Attribution Licence (international version 4.0 and norwegian version 4.0), + * for those parts of the information which do not constitute databases: Creative Commons Attribution Licence (generic version 1.0, 2.0, 2.5 and unported version 3.0) and Creative Commons Navngivelse 3.0 Norge, + * for those parts of the information which constitute databases: Open Data Commons Attribution License (version 1.0). + +This provision does not prevent other licences from being compatible with this licence based on their content. + +10. New versions of the licence +The licensee may choose to use the information covered by this licence under any new versions of the Norwegian licence for Open Government data (NLOD) issued by the responsible ministry (currently the Ministry of Local Government and Modernisation) when these versions are final and official, unless the licensor when making the information available under this licence specifically has stated that solely version 2.0 of this licence may be used. + +11. Governing law and legal venue +This licence, including its formation, and any disputes and claims arising in connection with or relating to this licence, shall be regulated by Norwegian law. The legal venue shall be the licensor’s ordinary legal venue. The licensor may, with regard to intellectual proprietary rights, choose to pursue a claim at other competent legal venues and/or based on the laws of the country where the intellectual property rights are sought enforced. diff --git a/options/license/NLPL b/options/license/NLPL index 3bbbb2f6e..79f83af89 100644 --- a/options/license/NLPL +++ b/options/license/NLPL @@ -1,13 +1,14 @@ +NO LIMIT PUBLIC LICENSE + Version 0, June 2012 + +Gilles LAMIRAL +La Billais +35580 Baulon +France + NO LIMIT PUBLIC LICENSE -Version 0, June 2012 Gilles LAMIRAL +Terms and conditions for copying, distribution, modification +or anything else. -La Billais - -35580 Baulon - -France NO LIMIT PUBLIC LICENSE - -Terms and conditions for copying, distribution, modification or anything else. - - 0. No limit to do anything with this work and this license. + 0. No limit to do anything with this work and this license. diff --git a/options/license/NOSL b/options/license/NOSL index 6c3355a8d..ff16a148c 100644 --- a/options/license/NOSL +++ b/options/license/NOSL @@ -1,443 +1,150 @@ NETIZEN OPEN SOURCE LICENSE - Version 1.0 - 1. Definitions. +1. Definitions. -1.0.1. "Commercial Use" means distribution or otherwise making the Covered -Code available to a third party. + 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. - -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. - 1.8. "License" means this document. - -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. - -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: - -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. - -B. Any new file that contains any part of the Original Code or previous Modifications. - -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. - -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. - -1.12. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license, subject to third party -intellectual property claims: - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and - -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). - -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. - -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - -Subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). - -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. - -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. - -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable version or -via an accepted Electronic Distribution Mechanism to anyone to whom you made -an Executable version available; and if made available via Electronic Distribution -Mechanism, must remain available for at least twelve (12) months after the -date it initially became available, or at least six (6) months after a subsequent -version of that particular Modification has been made available to such recipients. -You are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - -3.3. Description of Modifications. You must cause all Covered Code to which -You contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. - - 3.4. Intellectual Property Matters - - (a) Third Party Claims. - -If Contributor has knowledge that a license under a third party's intellectual -property rights is required to exercise the rights granted by such Contributor -under Sections 2.1 or 2.2, Contributor must include a text file with the Source -Code distribution titled "LEGAL" which describes the claim and the party making -the claim in sufficient detail that a recipient will know whom to contact. -If Contributor obtains such knowledge after the Modification is made available -as described in Section 3.2, Contributor shall promptly modify the LEGAL file -in all copies Contributor makes available thereafter and shall take other -steps (such as notifying appropriate mailing lists or newsgroups) reasonably -calculated to inform those who received the Covered Code that new knowledge -has been obtained. - - (b) Contributor APIs. - -If Contributor's Modifications include an application programming interface -and Contributor has knowledge of patent licenses which are reasonably necessary -to implement that API, Contributor must also include this information in the -LEGAL file. - - (c) Representations. - -Contributor represents that, except as disclosed pursuant to Section 3.4(a) -above, Contributor believes that Contributor's Modifications are Contributor's -original creation(s) and/or Contributor has sufficient rights to grant the -rights conveyed by this License. - - 3.5. Required Notices. - -You must duplicate the notice in Exhibit A in each file of the Source Code. -If it is not possible to put such notice in a particular Source Code file -due to its structure, then You must include such notice in a location (such -as a relevant directory) where a user would be likely to look for such a notice. -If You created one or more Modification(s) You may add your name as a Contributor -to the notice described in Exhibit A. You must also duplicate this License -in any documentation for the Source Code where You describe recipients' rights -or ownership rights relating to Covered Code. You may choose to offer, and -to charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Covered Code. However, You may do so only on -Your own behalf, and not on behalf of the Initial Developer or any Contributor. -You must make it absolutely clear than any such warranty, support, indemnity -or liability obligation is offered by You alone, and You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of warranty, support, -indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - -You may distribute Covered Code in Executable form only if the requirements -of Section 3.1-3.5 have been met for that Covered Code, and if You include -a notice stating that the Source Code version of the Covered Code is available -under the terms of this License, including a description of how and where -You have fulfilled the obligations of Section 3.2. The notice must be conspicuously -included in any notice in an Executable version, related documentation or -collateral in which You describe recipients' rights relating to the Covered -Code. You may distribute the Executable version of Covered Code or ownership -rights under a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License -and that the license for the Executable version does not attempt to limit -or alter the recipient's rights in the Source Code version from the rights -set forth in this License. If You distribute the Executable version under -a different license You must make it absolutely clear that any terms which -differ from this License are offered by You alone, not by the Initial Developer -or any Contributor. You hereby agree to indemnify the Initial Developer and -every Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer. - - 3.7. Larger Works. - -You may create a Larger Work by combining Covered Code with other code not -governed by the terms of this License and distribute the Larger Work as a -single LEDs product. In such a case, You must make sure the requirements of -this License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - - 6. Versions of the License. - - 6.1. New Versions. - -Netizen Pty Ltd ("Netizen ") may publish revised and/or new versions of the -License from time to time. Each version will be given a distinguishing version -number. - - 6.2. Effect of New Versions. - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License published by Netizen. No one other than Netizen has the right -to modify the terms applicable to Covered Code created under this License. - - 6.3. Derivative Works. - -If You create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), You must (a) rename Your license so that the phrases "Netizen", -"NOSL" or any confusingly similar phrase do not appear in your license (except -to note that your license differs from this License) and (b) otherwise make -it clear that Your version of the license contains terms which differ from -the Netizen Open Source License and Xen Open Source License. (Filling in the -name of the Initial Developer, Original Code or Contributor in the notice -described in Exhibit A shall not of themselves be deemed to be modifications -of this License.) - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -7.1 To the extent permitted by law and except as expressly provided to the -contrary in this Agreement, all warranties whether express, implied, statutory -or otherwise, relating in any way to the subject matter of this Agreement -or to this Agreement generally, are excluded. Where legislation implies in -this Agreement any condition or warranty and that legislation avoids or prohibits -provisions in a contract excluding or modifying the application of or the -exercise of or liability under such term, such term shall be deemed to be -included in this Agreement. However, the liability of Supplier for any breach -of such term shall be limited, at the option of Supplier, to any one or more -of the following: if the breach related to goods: the replacement of the goods -or the supply of equivalent goods; the repair of such goods; the payment of -the cost of replacing the goods or of acquiring equivalent goods; or the payment -of the cost of having the goods repaired; and if the breach relates to services -the supplying of the services again; or the payment of the cost of having -the services supplied again. - - 8. TERMINATION. - -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - -8.2. If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: - -(a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. - -(b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. - -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. - -This Agreement shall be governed by and construed according to the law of -the State of Victoria. The parties irrevocably submit to the exclusive jurisdiction -of the Courts of Victoria and Australia and any Courts hearing appeals from -such Courts. This Agreement is deemed to have been made in Victoria. - -The application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any law or regulation which provides -that the language of a contract shall be construed against the drafter shall -not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - - 13. MULTIPLE-LICENSED CODE. - -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". -"Multiple-Licensed" means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the NPL or the alternative -licenses, if any, specified by the Initial Developer in the file described -in Exhibit A. EXHIBIT A - Netizen Open Source License - -``The contents of this file are subject to the Netizen Open Source License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at http://netizen.com.au/licenses/NOPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - -The Original Code is ______________________________________. - -The Initial Developer of the Original Code is ________________________. Portions -created by ______________________ are Copyright (C) ______ _______________________. -All Rights Reserved. - -Contributor(s): ______________________________________. - -Alternatively, the contents of this file may be used under the terms of the -_____ license (the "[___] License"), in which case the provisions of [______] -License are applicable instead of those above. If you wish to allow use of -your version of this file only under the terms of the [____] License and not -to allow others to use your version of this file under the NOSL, indicate -your decision by deleting the provisions above and replace them with the notice -and other provisions required by the [___] License. If you do not delete the -provisions above, a recipient may use your version of this file under either -the NOSL or the [___] License." - -[NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. + + 1.8. "License" means this document. + + 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. + + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + + 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. + Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters + (a) Third Party Claims. + If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + (b) Contributor APIs. + If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + (c) Representations. + Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + + 3.5. Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. + You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + + 3.7. Larger Works. + You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single LEDs product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. + +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. + Netizen Pty Ltd ("Netizen ") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + + 6.2. Effect of New Versions. + Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netizen. No one other than Netizen has the right to modify the terms applicable to Covered Code created under this License. + + 6.3. Derivative Works. + If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Netizen", "NOSL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Netizen Open Source License and Xen Open Source License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY. + +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + + 7.1 To the extent permitted by law and except as expressly provided to the contrary in this Agreement, all warranties whether express, implied, statutory or otherwise, relating in any way to the subject matter of this Agreement or to this Agreement generally, are excluded. Where legislation implies in this Agreement any condition or warranty and that legislation avoids or prohibits provisions in a contract excluding or modifying the application of or the exercise of or liability under such term, such term shall be deemed to be included in this Agreement. However, the liability of Supplier for any breach of such term shall be limited, at the option of Supplier, to any one or more of the following: if the breach related to goods: the replacement of the goods or the supply of equivalent goods; the repair of such goods; the payment of the cost of replacing the goods or of acquiring equivalent goods; or the payment of the cost of having the goods repaired; and if the breach relates to services the supplying of the services again; or the payment of the cost of having the services supplied again. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: + (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. + (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. + + 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. +This Agreement shall be governed by and construed according to the law of the State of Victoria. The parties irrevocably submit to the exclusive jurisdiction of the Courts of Victoria and Australia and any Courts hearing appeals from such Courts. This Agreement is deemed to have been made in Victoria. +The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + +Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the NPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. + +EXHIBIT A - Netizen Open Source License + + ``The contents of this file are subject to the Netizen Open Source License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://netizen.com.au/licenses/NOPL/ + + Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. + + The Original Code is ______________________________________. + + The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) ______ _______________________. All Rights Reserved. + + Contributor(s): ______________________________________. + + Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the NOSL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the NOSL or the [___] License." + + [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] diff --git a/options/license/NPL-1.0 b/options/license/NPL-1.0 index 7dbff9977..7a5030e9f 100644 --- a/options/license/NPL-1.0 +++ b/options/license/NPL-1.0 @@ -1,376 +1,102 @@ -NETSCAPE PUBLIC LICENSE +NETSCAPE PUBLIC LICENSE Version 1.0 -Version 1.0 +1. Definitions. - 1. Definitions. + 1.1. ``Contributor'' means each entity that creates or contributes to the creation of Modifications. -1.1. ``Contributor'' means each entity that creates or contributes to the -creation of Modifications. + 1.2. ``Contributor Version'' means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. + 1.3. ``Covered Code'' means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. + 1.4. ``Electronic Distribution Mechanism'' means a mechanism generally accepted in the software development community for the electronic transfer of data. + 1.5. ``Executable'' means Covered Code in any form other than Source Code. + 1.6. ``Initial Developer'' means the individual or entity identified as the Initial Developer in the Source Code notice required byExhibit A. + 1.7. ``Larger Work'' means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. + 1.8. ``License'' means this document. + 1.9. ``Modifications'' means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. B. Any new file that contains any part of the Original Code or previous Modifications. -1.2. ``Contributor Version'' means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.10. ``Original Code'' means Source Code of computer software code which is described in the Source Code notice required byExhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + 1.11. ``Source Code'' means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + 1.12. ``You'' means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, ``You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, ``control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -1.3. ``Covered Code'' means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. +2. Source Code License. -1.4. ``Electronic Distribution Mechanism'' means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and + (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell (``Utilize'') the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations. -1.5. ``Executable'' means Covered Code in any form other than Source Code. + 2.2. Contributor Grant. Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and + (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations. -1.6. ``Initial Developer'' means the individual or entity identified as the -Initial Developer in the Source Code notice required byExhibit A. +3. Distribution Obligations. -1.7. ``Larger Work'' means a work which combines Covered Code or portions -thereof with code not governed by the terms of this License. + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. - 1.8. ``License'' means this document. + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + 3.3. Description of Modifications. You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + 3.4. Intellectual Property Matters + (a) Third Party Claims. If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled ``LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + (b) Contributor APIs. If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. -1.9. ``Modifications'' means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. +4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -B. Any new file that contains any part of the Original Code or previous Modifications. +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. -1.10. ``Original Code'' means Source Code of computer software code which -is described in the Source Code notice required byExhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. +6. Versions of the License. + 6.1. New Versions. Netscape Communications Corporation (``Netscape'') may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -1.11. ``Source Code'' means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or a list of source code differential comparisons against -either the Original Code or another well known, available Covered Code of -the Contributor's choice. The Source Code can be in a compressed or archival -form, provided the appropriate decompression or de-archiving software is widely -available for no charge. + 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. + 6.3. Derivative Works. If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) -1.12. ``You'' means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 6.1. For legal entities, ``You'' includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, ``control'' means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of fifty percent (50%) or more -of the outstanding shares or beneficial ownership of such entity. +7. DISCLAIMER OF WARRANTY. - 2. Source Code License. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license, subject to third party -intellectual property claims: +8. TERMINATION. -a) to use, reproduce, modify, display, perform, sublicense and distribute -the Original Code (or portions thereof) with or without Modifications, or -as part of a Larger Work; and +This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. -(b) under patents now or hereafter owned or controlled by Initial Developer, -to make, have made, use and sell (``Utilize'') the Original Code (or portions -thereof), but solely to the extent that any such patent is reasonably necessary -to enable You to Utilize the Original Code (or portions thereof) and not to -any greater extent that may be necessary to Utilize further Modifications -or combinations. +9. LIMITATION OF LIABILITY. - +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - 2.2. Contributor Grant. +10. U.S. GOVERNMENT END USERS. -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: +The Covered Code is a ``commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer software'' and ``commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Modifications created by such Contributor (or portions thereof) either -on an unmodified basis, with other Modifications, as Covered Code or as part -of a Larger Work; and +11. MISCELLANEOUS. -(b) under patents now or hereafter owned or controlled by Contributor, to -Utilize the Contributor Version (or portions thereof), but solely to the extent -that any such patent is reasonably necessary to enable You to Utilize the -Contributor Version (or portions thereof), and not to any greater extent that -may be necessary to Utilize further Modifications or combinations. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the United States of America: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. - 3. Distribution Obligations. +12. RESPONSIBILITY FOR CLAIMS. -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. - -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable version or -via an accepted Electronic Distribution Mechanism to anyone to whom you made -an Executable version available; and if made available via Electronic Distribution -Mechanism, must remain available for at least twelve (12) months after the -date it initially became available, or at least six (6) months after a subsequent -version of that particular Modification has been made available to such recipients. -You are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - -3.3. Description of Modifications. You must cause all Covered Code to which -you contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. - - 3.4. Intellectual Property Matters - -(a) Third Party Claims. If You have knowledge that a party claims an intellectual -property right in particular functionality or code (or its utilization under -this License), you must include a text file with the source code distribution -titled ``LEGAL'' which describes the claim and the party making the claim -in sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after You make Your Modification available as described in -Section 3.2, You shall promptly modify the LEGAL file in all copies You make -available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Covered Code that new knowledge has been obtained. - -(b) Contributor APIs. If Your Modification is an application programming interface -and You own or control patents which are reasonably necessary to implement -that API, you must also include this information in the LEGAL file. - -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code, and this License in any documentation for the Source -Code, where You describe recipients' rights relating to Covered Code. If You -created one or more Modification(s), You may add your name as a Contributor -to the notice described in Exhibit A. If it is not possible to put such notice -in a particular Source Code file due to its structure, then you must include -such notice in a location (such as a relevant directory file) where a user -would be likely to look for such a notice. You may choose to offer, and to -charge a fee for, warranty, support, indemnity or liability obligations to -one or more recipients of Covered Code. However, You may do so only on Your -own behalf, and not on behalf of the Initial Developer or any Contributor. -You must make it absolutely clear than any such warranty, support, indemnity -or liability obligation is offered by You alone, and You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of warranty, support, -indemnity or liability terms You offer. - -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligations -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code under a license of Your choice, which may contain -terms different from this License, provided that You are in compliance with -the terms of this License and that the license for the Executable version -does not attempt to limit or alter the recipient's rights in the Source Code -version from the rights set forth in this License. If You distribute the Executable -version under a different license You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by the -Initial Developer or any Contributor. You hereby agree to indemnify the Initial -Developer and every Contributor for any liability incurred by the Initial -Developer or such Contributor as a result of any such terms You offer. - -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute or regulation -then You must: (a) comply with the terms of this License to the maximum extent -possible; and (b) describe the limitations and the code they affect. Such -description must be included in the LEGAL file described in Section 3.4 and -must be included with all distributions of the Source Code. Except to the -extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A, and to related Covered Code. - - 6. Versions of the License. - -6.1. New Versions. Netscape Communications Corporation (``Netscape'') may -publish revised and/or new versions of the License from time to time. Each -version will be given a distinguishing version number. - -6.2. Effect of New Versions. Once Covered Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Covered Code under -the terms of any subsequent version of the License published by Netscape. -No one other than Netscape has the right to modify the terms applicable to -Covered Code created under this License. - -6.3. Derivative Works. If you create or use a modified version of this License -(which you may only do in order to apply it to code which is not already Covered -Code governed by this License), you must (a) rename Your license so that the -phrases ``Mozilla'', ``MOZILLAPL'', ``MOZPL'', ``Netscape'', ``NPL'' or any -confusingly similar phrase do not appear anywhere in your license and (b) -otherwise make it clear that your version of the license contains terms which -differ from the Mozilla Public License and Netscape Public License. (Filling -in the name of the Initial Developer, Original Code or Contributor in the -notice described in Exhibit A shall not of themselves be deemed to be modifications -of this License.) - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR -A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE -DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) -ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER -CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF -SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, -OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL -HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING -FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a ``commercial item,'' as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of ``commercial computer software'' and ``commercial -computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in, the United States -of America: (a) unless otherwise agreed in writing, all disputes relating -to this License (excepting any dispute relating to intellectual property rights) -shall be subject to final and binding arbitration, with the losing party paying -all costs of arbitration; (b) any arbitration relating to this Agreement shall -be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; -and (c) any litigation relating to this Agreement shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -Except in cases where another Contributor has failed to comply with Section -3.4, You are responsible for damages arising, directly or indirectly, out -of Your utilization of rights under this License, based on the number of copies -of Covered Code you made available, the revenues you received from utilizing -such rights, and other relevant factors. You agree to work with affected parties -to distribute responsibility on an equitable basis. +Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis. AMENDMENTS - Additional Terms applicable to the Netscape Public License. - I. Effect. + I. Effect. These additional terms described in this Netscape Public License -- Amendments shall apply to the Mozilla Communicator client code and to all Covered Code under this License. + II. ``Netscape's Branded Code'' means Covered Code that Netscape distributes and/or permits others to distribute under one or more trademark(s) which are controlled by Netscape but which are not licensed for use under this License. + III. Netscape and logo. This License does not grant any rights to use the trademark ``Netscape'', the ``Netscape N and horizon'' logo or the Netscape lighthouse logo, even if such marks are included in the Original Code. + IV. Inability to Comply Due to Contractual Obligation. Prior to licensing the Original Code under this License, Netscape has licensed third party code for use in Netscape's Branded Code. To the extent that Netscape is limited contractually from making such third party code available under this License, Netscape may choose to reintegrate such code into Covered Code without being required to distribute such code in +Source Code form, even if such code would otherwise be considered ``Modifications'' under this License. + V. Use of Modifications and Covered Code by Initial Developer. + V.1. In General. The obligations of Section 3 apply to Netscape, except to the extent specified in this Amendment, Section V.2 and V.3. V.2. Other Products. Netscape may include Covered Code in products other than the Netscape's Branded Code which are released by Netscape during the two (2) years following the release date of the Original Code, without such additional products becoming subject to the terms of this License, and may license such additional products on different terms from those contained in this License. V.3. Alternative Licensing. Netscape may license the Source Code of Netscape's Branded Code, including Modifications incorporated therein, without such additional products becoming subject to the terms of this License, and may license such additional products on different terms from those contained in this License. -These additional terms described in this Netscape Public License -- Amendments -shall apply to the Mozilla Communicator client code and to all Covered Code -under this License. + VI. Arbitration and Litigation. Notwithstanding the limitations of Section 11 above, the provisions regarding arbitration and litigation in Section 11(a), (b) and (c) of the License shall apply to all disputes relating to this License. -II. ``Netscape's Branded Code'' means Covered Code that Netscape distributes -and/or permits others to distribute under one or more trademark(s) which are -controlled by Netscape but which are not licensed for use under this License. +EXHIBIT A. - III. Netscape and logo. - -This License does not grant any rights to use the trademark ``Netscape'', -the ``Netscape N and horizon'' logo or the Netscape lighthouse logo, even -if such marks are included in the Original Code. - - IV. Inability to Comply Due to Contractual Obligation. - -Prior to licensing the Original Code under this License, Netscape has licensed -third party code for use in Netscape's Branded Code. To the extent that Netscape -is limited contractually from making such third party code available under -this License, Netscape may choose to reintegrate such code into Covered Code -without being required to distribute such code in Source Code form, even if -such code would otherwise be considered ``Modifications'' under this License. - - V. Use of Modifications and Covered Code by Initial Developer. - -V.1. In General. The obligations of Section 3 apply to Netscape, except to -the extent specified in this Amendment, Section V.2 and V.3. - -V.2. Other Products. Netscape may include Covered Code in products other than -the Netscape's Branded Code which are released by Netscape during the two -(2) years following the release date of the Original Code, without such additional -products becoming subject to the terms of this License, and may license such -additional products on different terms from those contained in this License. -V.3. Alternative Licensing. Netscape may license the Source Code of Netscape's -Branded Code, including Modifications incorporated therein, without such additional -products becoming subject to the terms of this License, and may license such -additional products on different terms from those contained in this License. - - VI. Arbitration and Litigation. - -Notwithstanding the limitations of Section 11 above, the provisions regarding -arbitration and litigation in Section 11(a), (b) and (c) of the License shall -apply to all disputes relating to this License. EXHIBIT A. - -"The contents of this file are subject to the Netscape Public License Version -1.0 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://www.mozilla.org/NPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +“The contents of this file are subject to the Netscape Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/NPL/ +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is Mozilla Communicator client code, released March 31, 1998. - -The Initial Developer of the Original Code is Netscape Communications Corporation. -Portions created by Netscape are Copyright (C) 1998 Netscape Communications -Corporation. All Rights Reserved. - -Contributor(s): ______________________________________." - -[NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. This is due to time -constraints encountered in simultaneously finalizing the License and in preparing -the Original Code for release. You should use the text of this Exhibit A rather -than the text found in the Original Code Source Code for Your Modifications.] +The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are Copyright (C) 1998 Netscape Communications Corporation. All Rights Reserved. +Contributor(s): ______________________________________.” +[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. This is due to time constraints encountered in simultaneously finalizing the License and in preparing the Original Code for release. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] diff --git a/options/license/NPL-1.1 b/options/license/NPL-1.1 index 0cbb07e32..62c529640 100644 --- a/options/license/NPL-1.1 +++ b/options/license/NPL-1.1 @@ -2,515 +2,185 @@ Netscape Public LIcense version 1.1 AMENDMENTS -The Netscape Public License Version 1.1 ("NPL") consists of the Mozilla Public -License Version 1.1 with the following Amendments, including Exhibit A-Netscape -Public License. Files identified with "Exhibit A-Netscape Public License" -are governed by the Netscape Public License Version 1.1. +The Netscape Public License Version 1.1 ("NPL") consists of the Mozilla Public License Version 1.1 with the following Amendments, including Exhibit A-Netscape Public License.  Files identified with "Exhibit A-Netscape Public License" are governed by the Netscape Public License Version 1.1. Additional Terms applicable to the Netscape Public License. - I. Effect. + I. Effect. + These additional terms described in this Netscape Public License -- Amendments shall apply to the Mozilla Communicator client code and to all Covered Code under this License. -These additional terms described in this Netscape Public License -- Amendments -shall apply to the Mozilla Communicator client code and to all Covered Code -under this License. + II. "Netscape's Branded Code" means Covered Code that Netscape distributes and/or permits others to distribute under one or more trademark(s) which are controlled by Netscape but which are not licensed for use under this License. + III. Netscape and logo. + This License does not grant any rights to use the trademarks "Netscape", the "Netscape N and horizon" logo or the "Netscape lighthouse" logo, "Netcenter", "Gecko", "Java" or "JavaScript", "Smart Browsing" even if such marks are included in the Original Code or Modifications. + IV. Inability to Comply Due to Contractual Obligation. + Prior to licensing the Original Code under this License, Netscape has licensed third party code for use in Netscape's Branded Code. To the extent that Netscape is limited contractually from making such third party code available under this License, Netscape may choose to reintegrate such code into Covered Code without being required to distribute such code in Source Code form, even if such code would otherwise be considered "Modifications" under this License. + V. Use of Modifications and Covered Code by Initial Developer. + V.1. In General. + The obligations of Section 3 apply to Netscape, except to the extent specified in this Amendment, Section V.2 and V.3. -II. "Netscape's Branded Code" means Covered Code that Netscape distributes -and/or permits others to distribute under one or more trademark(s) which are -controlled by Netscape but which are not licensed for use under this License. + V.2. Other Products. + Netscape may include Covered Code in products other than the Netscape's Branded Code which are released by Netscape during the two (2) years following the release date of the Original Code, without such additional products becoming subject to the terms of this License, and may license such additional products on different terms from those contained in this License. - III. Netscape and logo. + V.3. Alternative Licensing. + Netscape may license the Source Code of Netscape's Branded Code, including Modifications incorporated therein, without such Netscape Branded Code becoming subject to the terms of this License, and may license such Netscape Branded Code on different terms from those contained in this License. -This License does not grant any rights to use the trademarks "Netscape", the -"Netscape N and horizon" logo or the "Netscape lighthouse" logo, "Netcenter", -"Gecko", "Java" or "JavaScript", "Smart Browsing" even if such marks are included -in the Original Code or Modifications. + VI. Litigation. + Notwithstanding the limitations of Section 11 above, the provisions regarding litigation in Section 11(a), (b) and (c) of the License shall apply to all disputes relating to this License. - IV. Inability to Comply Due to Contractual Obligation. + EXHIBIT A-Netscape Public License. +   +"The contents of this file are subject to the Netscape Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/NPL/ -Prior to licensing the Original Code under this License, Netscape has licensed -third party code for use in Netscape's Branded Code. To the extent that Netscape -is limited contractually from making such third party code available under -this License, Netscape may choose to reintegrate such code into Covered Code -without being required to distribute such code in Source Code form, even if -such code would otherwise be considered "Modifications" under this License. - - V. Use of Modifications and Covered Code by Initial Developer. - - V.1. In General. - -The obligations of Section 3 apply to Netscape, except to the extent specified -in this Amendment, Section V.2 and V.3. - - V.2. Other Products. - -Netscape may include Covered Code in products other than the Netscape's Branded -Code which are released by Netscape during the two (2) years following the -release date of the Original Code, without such additional products becoming -subject to the terms of this License, and may license such additional products -on different terms from those contained in this License. - - V.3. Alternative Licensing. - -Netscape may license the Source Code of Netscape's Branded Code, including -Modifications incorporated therein, without such Netscape Branded Code becoming -subject to the terms of this License, and may license such Netscape Branded -Code on different terms from those contained in this License. - - VI. Litigation. - -Notwithstanding the limitations of Section 11 above, the provisions regarding -litigation in Section 11(a), (b) and (c) of the License shall apply to all -disputes relating to this License. - - EXHIBIT A-Netscape Public License. - -"The contents of this file are subject to the Netscape Public License Version -1.1 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://www.mozilla.org/NPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is Mozilla Communicator client code, released March 31, 1998. -The Initial Developer of the Original Code is Netscape Communications Corporation. -Portions created by Netscape are Copyright (C) 1998-1999 Netscape Communications -Corporation. All Rights Reserved. - +The Initial Developer of the Original Code is Netscape Communications Corporation. Portions created by Netscape are Copyright (C) 1998-1999 Netscape Communications Corporation. All Rights Reserved. Contributor(s): ______________________________________. +   +Alternatively, the contents of this file may be used under the terms of the _____ license (the  "[___] License"), in which case the provisions of [______] License are applicable  instead of those above.  If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the NPL, indicate your decision by deleting  the provisions above and replace  them with the notice and other provisions required by the [___] License.  If you do not delete the provisions above, a recipient may use your version of this file under either the NPL or the [___] License." -Alternatively, the contents of this file may be used under the terms of the -_____ license (the "[___] License"), in which case the provisions of [______] -License are applicable instead of those above. If you wish to allow use of -your version of this file only under the terms of the [____] License and not -to allow others to use your version of this file under the NPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the [___] License. If you do not delete the -provisions above, a recipient may use your version of this file under either -the NPL or the [___] License." Mozilla Public License Version 1.1 - 1. Definitions. +1. Definitions. -1.0.1. "Commercial Use" means distribution or otherwise making the Covered -Code available to a third party. + 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. - -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: - -Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: +Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. Any new file that contains any part of the Original Code or previous Modifications. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. + 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.12. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. + 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - 2. Source Code License. +2. Source Code License. -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license, subject to third party -intellectual property claims: + 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -a. under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and + a. under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + b. under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + c. the licenses granted in this Section 2.1 (a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + d. Notwithstanding Section 2.1 (b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. -b. under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). + 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license -c. the licenses granted in this Section 2.1 (a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. + a. under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + b. under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + c. the licenses granted in Sections 2.2 (a) and 2.2 (b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + d. Notwithstanding Section 2.2 (b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. -d. Notwithstanding Section 2.1 (b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices. +3. Distribution Obligations. -2.2. Contributor Grant. Subject to third party intellectual property claims, -each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -a. under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -b. under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). + 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. -c. the licenses granted in Sections 2.2 (a) and 2.2 (b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. + 3.4. Intellectual Property Matters -d. Notwithstanding Section 2.2 (b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. + (a) Third Party Claims + If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. - 3. Distribution Obligations. + (b) Contributor APIs + If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. + (c) Representations. + Contributor represents that, except as disclosed pursuant to Section 3.4 (a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable version or -via an accepted Electronic Distribution Mechanism to anyone to whom you made -an Executable version available; and if made available via Electronic Distribution -Mechanism, must remain available for at least twelve (12) months after the -date it initially became available, or at least six (6) months after a subsequent -version of that particular Modification has been made available to such recipients. -You are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -3.3. Description of Modifications. You must cause all Covered Code to which -You contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. + 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Sections 3.1, 3.2, 3.3, 3.4 and 3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. - 3.4. Intellectual Property Matters + 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. - (a) Third Party Claims +4. Inability to Comply Due to Statute or Regulation. -If Contributor has knowledge that a license under a third party's intellectual -property rights is required to exercise the rights granted by such Contributor -under Sections 2.1 or 2.2, Contributor must include a text file with the Source -Code distribution titled "LEGAL" which describes the claim and the party making -the claim in sufficient detail that a recipient will know whom to contact. -If Contributor obtains such knowledge after the Modification is made available -as described in Section 3.2, Contributor shall promptly modify the LEGAL file -in all copies Contributor makes available thereafter and shall take other -steps (such as notifying appropriate mailing lists or newsgroups) reasonably -calculated to inform those who received the Covered Code that new knowledge -has been obtained. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - (b) Contributor APIs +5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. -If Contributor's Modifications include an application programming interface -and Contributor has knowledge of patent licenses which are reasonably necessary -to implement that API, Contributor must also include this information in the -LEGAL file. +6. Versions of the License. - (c) Representations. + 6.1. New Versions + Netscape Communications Corporation ("Netscape") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -Contributor represents that, except as disclosed pursuant to Section 3.4 (a) -above, Contributor believes that Contributor's Modifications are Contributor's -original creation(s) and/or Contributor has sufficient rights to grant the -rights conveyed by this License. + 6.2. Effect of New Versions + Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License. -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be likely to -look for such a notice. If You created one or more Modification(s) You may -add your name as a Contributor to the notice described in Exhibit A. You must -also duplicate this License in any documentation for the Source Code where -You describe recipients' rights or ownership rights relating to Covered Code. -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Covered Code. However, -You may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for -any liability incurred by the Initial Developer or such Contributor as a result -of warranty, support, indemnity or liability terms You offer. + 6.3. Derivative Works + If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Mozilla Public License and Netscape Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Sections 3.1, 3.2, 3.3, 3.4 -and 3.5 have been met for that Covered Code, and if You include a notice stating -that the Source Code version of the Covered Code is available under the terms -of this License, including a description of how and where You have fulfilled -the obligations of Section 3.2. The notice must be conspicuously included -in any notice in an Executable version, related documentation or collateral -in which You describe recipients' rights relating to the Covered Code. You -may distribute the Executable version of Covered Code or ownership rights -under a license of Your choice, which may contain terms different from this -License, provided that You are in compliance with the terms of this License -and that the license for the Executable version does not attempt to limit -or alter the recipient's rights in the Source Code version from the rights -set forth in this License. If You distribute the Executable version under -a different license You must make it absolutely clear that any terms which -differ from this License are offered by You alone, not by the Initial Developer -or any Contributor. You hereby agree to indemnify the Initial Developer and -every Contributor for any liability incurred by the Initial Developer or such -Contributor as a result of any such terms You offer. +7. DISCLAIMER OF WARRANTY +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. +8. Termination - 4. Inability to Comply Due to Statute or Regulation. + 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. + 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: - 5. Application of this License. + a. such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. + b. any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. + 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. - 6. Versions of the License. + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. - 6.1. New Versions +9. LIMITATION OF LIABILITY +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -Netscape Communications Corporation ("Netscape") may publish revised and/or -new versions of the License from time to time. Each version will be given -a distinguishing version number. +10. U.S. government end users +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. - 6.2. Effect of New Versions +11. Miscellaneous +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License published by Netscape. No one other than Netscape has the right -to modify the terms applicable to Covered Code created under this License. +12. Responsibility for claims +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. - 6.3. Derivative Works +13. Multiple-licensed code +Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the MPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. -If You create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), You must (a) rename Your license so that the phrases "Mozilla", -"MOZILLAPL", "MOZPL", "Netscape", "MPL", "NPL" or any confusingly similar -phrase do not appear in your license (except to note that your license differs -from this License) and (b) otherwise make it clear that Your version of the -license contains terms which differ from the Mozilla Public License and Netscape -Public License. (Filling in the name of the Initial Developer, Original Code -or Contributor in the notice described in Exhibit A shall not of themselves -be deemed to be modifications of this License.) +Exhibit A - Mozilla Public License. - 7. DISCLAIMER OF WARRANTY +"The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. Termination - -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - -8.2. If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: - -a. such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. - -b. any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. - -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - - 9. LIMITATION OF LIABILITY - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. government end users - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. Miscellaneous - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. Responsibility for claims - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - - 13. Multiple-licensed code - -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". -"Multiple-Licensed" means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the MPL or the alternative -licenses, if any, specified by the Initial Developer in the file described -in Exhibit A. Exhibit A - Mozilla Public License. - -"The contents of this file are subject to the Mozilla Public License Version -1.1 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at http://www.mozilla.org/MPL/ - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is ______________________________________. The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. Contributor(s): ______________________________________. -Alternatively, the contents of this file may be used under the terms of the -_____ license (the "[___] License"), in which case the provisions of [______] -License are applicable instead of those above. If you wish to allow use of -your version of this file only under the terms of the [____] License and not -to allow others to use your version of this file under the MPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the [___] License. If you do not delete the -provisions above, a recipient may use your version of this file under either -the MPL or the [___] License." +Alternatively, the contents of this file may be used under the terms of the _____ license (the "[___] License"), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the MPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the MPL or the [___] License." -NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications. +NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications. diff --git a/options/license/NPOSL-3.0 b/options/license/NPOSL-3.0 index 55dd11fe2..e065bae72 100644 --- a/options/license/NPOSL-3.0 +++ b/options/license/NPOSL-3.0 @@ -1,194 +1,59 @@ Non-Profit Open Software License 3.0 -This Non-Profit Open Software License ("Non-Profit OSL") version 3.0 (the -"License") applies to any original work of authorship (the "Original Work") -whose owner (the "Licensor") has placed the following licensing notice adjacent -to the copyright notice for the Original Work: +This Non-Profit Open Software License ("Non-Profit OSL") version 3.0 (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: -Licensed under the Non-Profit Open Software License version 3.0 + Licensed under the Non-Profit Open Software License version 3.0 -1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, for the duration of the copyright, to -do the following: +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: -a) to reproduce the Original Work in copies, either alone or as part of a -collective work; + a) to reproduce the Original Work in copies, either alone or as part of a collective work; -b) to translate, adapt, alter, transform, modify, or arrange the Original -Work, thereby creating derivative works ("Derivative Works") based upon the -Original Work; + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; -c) to distribute or communicate copies of the Original Work and Derivative -Works to the public, with the proviso that copies of Original Work or Derivative -Works that You distribute or communicate shall be licensed under this Non-Profit -Open Software License or as provided in section 17(d); + c) to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Non-Profit Open Software License or as provided in section 17(d); - d) to perform the Original Work publicly; and + d) to perform the Original Work publicly; and - e) to display the Original Work publicly. + e) to display the Original Work publicly. -2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, under patent claims owned or controlled -by the Licensor that are embodied in the Original Work as furnished by the -Licensor, for the duration of the patents, to make, use, sell, offer for sale, -have made, and import the Original Work and Derivative Works. +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor agrees -to provide a machine-readable copy of the Source Code of the Original Work -along with each copy of the Original Work that Licensor distributes. Licensor -reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work. +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior permission of the Licensor. Except as expressly -stated herein, nothing in this License grants any license to Licensor's trademarks, -copyrights, patents, trade secrets or any other intellectual property. No -patent license is granted to make, use, sell, offer for sale, have made, or -import embodiments of any patent claims other than the licensed claims defined -in Section 2. No license is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall -be interpreted to prohibit Licensor from licensing under terms different from -this License any Original Work that Licensor otherwise would have a right -to license. +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor's trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. -5) External Deployment. The term "External Deployment" means the use, distribution, -or communication of the Original Work or Derivative Works in any way such -that the Original Work or Derivative Works may be used by anyone other than -You, whether those works are distributed or communicated to those persons -or made available as an application intended for use over a network. As an -express condition for the grants of license hereunder, You must treat any -External Deployment by You of the Original Work or a Derivative Work as a -distribution under section 1(c). +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent, or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -7) Warranty of Provenance and Disclaimer of Warranty. The Original Work is -provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either -express or implied, including, without limitation, the warranties of non-infringement, -merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO -THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY -constitutes an essential part of this License. No license to the Original -Work is granted by this License except under this disclaimer. +7) Warranty of Provenance and Disclaimer of Warranty. The Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to anyone for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for -loss of goodwill, work stoppage, computer failure or malfunction, or any and -all other commercial damages or losses. This limitation of liability shall -not apply to the extent applicable law prohibits such limitation. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. -9) Acceptance and Termination. If, at any time, You expressly assented to -this License, that assent indicates your clear and irrevocable acceptance -of this License and all of its terms and conditions. If You distribute or -communicate copies of the Original Work or a Derivative Work, You must make -a reasonable effort under the circumstances to obtain the express assent of -recipients to the terms of this License. This License conditions your rights -to undertake the activities listed in Section 1, including your right to create -Derivative Works based upon the Original Work, and doing so without honoring -these terms and conditions is prohibited by copyright law and international -treaty. Nothing in this License is intended to affect copyright exceptions -and limitations (including "fair use" or "fair dealing"). This License shall -terminate immediately and You may no longer exercise any of the rights granted -to You by this License upon your failure to honor the conditions in Section -1(c). +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including "fair use" or "fair dealing"). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes -a patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software -or hardware. +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of copyright or patent law in the appropriate jurisdiction. -This section shall survive the termination of this License. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. -12) Attorneys' Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -13) Miscellaneous. If any provision of this License is held to be unenforceable, -such provision shall be reformed only to the extent necessary to make it enforceable. +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -16) Modification of This License. This License is Copyright © 2005 Lawrence -Rosen. Permission is granted to copy, distribute, or communicate this License -without modification. Nothing in this License permits You to modify this License -as applied to the Original Work or to Derivative Works. However, You may modify -the text of this License and copy, distribute or communicate your modified -version (the "Modified License") and apply it to other original works of authorship -subject to the following conditions: (i) You may not indicate in any way that -your Modified License is the "Open Software License" or "OSL" and you may -not use those names in the name of your Modified License; (ii) You must replace -the notice specified in the first paragraph above with the notice "Licensed -under " or with a notice of your own that is -not confusingly similar to the notice in this License; and (iii) You may not -claim that your original works are open source software unless your Modified -License has been approved by Open Source Initiative (OSI) and You comply with -its license review and certification process. +16) Modification of This License. This License is Copyright © 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. -17) Non-Profit Amendment. The name of this amended version of the Open Software -License ("OSL 3.0") is "Non-Profit Open Software License 3.0". The original -OSL 3.0 license has been amended as follows: +17) Non-Profit Amendment. The name of this amended version of the Open Software License ("OSL 3.0") is "Non-Profit Open Software License 3.0". The original OSL 3.0 license has been amended as follows: -(a) Licensor represents and declares that it is a not-for-profit organization -that derives no revenue whatsoever from the distribution of the Original Work -or Derivative Works thereof, or from support or services relating thereto. + (a) Licensor represents and declares that it is a not-for-profit organization that derives no revenue whatsoever from the distribution of the Original Work or Derivative Works thereof, or from support or services relating thereto. -(b) The first sentence of Section 7 ["Warranty of Provenance"] of OSL 3.0 -has been stricken. For Original Works licensed under this Non-Profit OSL 3.0, -LICENSOR OFFERS NO WARRANTIES WHATSOEVER. + (b) The first sentence of Section 7 ["Warranty of Provenance"] of OSL 3.0 has been stricken. For Original Works licensed under this Non-Profit OSL 3.0, LICENSOR OFFERS NO WARRANTIES WHATSOEVER. -(c) In the first sentence of Section 8 ["Limitation of Liability"] of this -Non-Profit OSL 3.0, the list of damages for which LIABILITY IS LIMITED now -includes "direct" damages. + (c) In the first sentence of Section 8 ["Limitation of Liability"] of this Non-Profit OSL 3.0, the list of damages for which LIABILITY IS LIMITED now includes "direct" damages. -(d) The proviso in Section 1(c) of this License now refers to this "Non-Profit -Open Software License" rather than the "Open Software License". You may distribute -or communicate the Original Work or Derivative Works thereof under this Non-Profit -OSL 3.0 license only if You make the representation and declaration in paragraph -(a) of this Section 17. Otherwise, You shall distribute or communicate the -Original Work or Derivative Works thereof only under the OSL 3.0 license and -You shall publish clear licensing notices so stating. Also by way of clarification, -this License does not authorize You to distribute or communicate works under -this Non-Profit OSL 3.0 if You received them under the original OSL 3.0 license. + (d) The proviso in Section 1(c) of this License now refers to this "Non-Profit Open Software License" rather than the "Open Software License". You may distribute or communicate the Original Work or Derivative Works thereof under this Non-Profit OSL 3.0 license only if You make the representation and declaration in paragraph (a) of this Section 17. Otherwise, You shall distribute or communicate the Original Work or Derivative Works thereof only under the OSL 3.0 license and You shall publish clear licensing notices so stating. Also by way of clarification, this License does not authorize You to distribute or communicate works under this Non-Profit OSL 3.0 if You received them under the original OSL 3.0 license. -(e) Original Works licensed under this license shall reference "Non-Profit -OSL 3.0" in licensing notices to distinguish them from works licensed under -the original OSL 3.0 license. + (e) Original Works licensed under this license shall reference "Non-Profit OSL 3.0" in licensing notices to distinguish them from works licensed under the original OSL 3.0 license. diff --git a/options/license/NRL b/options/license/NRL index bdb267870..5e104730c 100644 --- a/options/license/NRL +++ b/options/license/NRL @@ -1,66 +1,28 @@ -NRL License COPYRIGHT NOTICE +NRL License -All of the documentation and software included in this software distribution -from the US Naval Research Laboratory (NRL) are copyrighted by their respective -developers. +COPYRIGHT NOTICE -Portions of the software are derived from the Net/2 and 4.4-Lite Berkeley -Software Distributions (BSD) of the University of California at Berkeley and -those portions are copyright by The Regents of the University of California. -All Rights Reserved. The UC Berkeley Copyright and License agreement is binding -on those portions of the software. In all cases, the NRL developers have retained -the original UC Berkeley copyright and license notices in the respective files -in accordance with the UC Berkeley copyrights and license. +All of the documentation and software included in this software distribution from the US Naval Research Laboratory (NRL) are copyrighted by their respective developers. -Portions of this software and documentation were developed at NRL by various -people. Those developers have each copyrighted the portions that they developed -at NRL and have assigned All Rights for those portions to NRL. Outside the -USA, NRL has copyright on some of the software developed at NRL. The affected -files all contain specific copyright notices and those notices must be retained -in any derived work. NRL LICENSE +Portions of the software are derived from the Net/2 and 4.4-Lite Berkeley Software Distributions (BSD) of the University of California at Berkeley and those portions are copyright by The Regents of the University of California. All Rights Reserved. The UC Berkeley Copyright and License agreement is binding on those portions of the software. In all cases, the NRL developers have retained the original UC Berkeley copyright and license notices in the respective files in accordance with the UC Berkeley copyrights and license. -NRL grants permission for redistribution and use in source and binary forms, -with or without modification, of the software and documentation created at -NRL provided that the following conditions are met: +Portions of this software and documentation were developed at NRL by various people. Those developers have each copyrighted the portions that they developed at NRL and have assigned All Rights for those portions to NRL. Outside the USA, NRL has copyright on some of the software developed at NRL. The affected files all contain specific copyright notices and those notices must be retained in any derived work. - 1. All terms of the UC Berkeley copyright and license must be followed. +NRL LICENSE -2. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +NRL grants permission for redistribution and use in source and binary forms, with or without modification, of the software and documentation created at NRL provided that the following conditions are met: -3. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + 1. All terms of the UC Berkeley copyright and license must be followed. + 2. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 3. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 4. All advertising materials mentioning features or use of this software must display the following acknowledgements: -4. All advertising materials mentioning features or use of this software must -display the following acknowledgements: + This product includes software developed by the University of California, Berkeley and its contributors. - + This product includes software developed at the Information Technology Division, US Naval Research Laboratory. -This product includes software developed by the University of California, -Berkeley and its contributors. + 5. Neither the name of the NRL nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - +THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NRL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This product includes software developed at the Information Technology Division, -US Naval Research Laboratory. - -5. Neither the name of the NRL nor the names of its contributors may be used -to endorse or promote products derived from this software without specific -prior written permission. - -THE SOFTWARE PROVIDED BY NRL IS PROVIDED BY NRL AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL NRL OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -The views and conclusions contained in the software and documentation are -those of the authors and should not be interpreted as representing official -policies, either expressed or implied, of the US Naval Research Laboratory -(NRL). +The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the US Naval Research Laboratory (NRL). diff --git a/options/license/NTP b/options/license/NTP index 8a3879bb9..929a49509 100644 --- a/options/license/NTP +++ b/options/license/NTP @@ -1,11 +1,5 @@ -NTP License (NTP) Copyright (c) (CopyrightHoldersName) (From 4-digit-year)-(To -4-digit-year) +NTP License (NTP) -Permission to use, copy, modify, and distribute this software and its documentation -for any purpose with or without fee is hereby granted, provided that the above -copyright notice appears in all copies and that both the copyright notice -and this permission notice appear in supporting documentation, and that the -name (TrademarkedName) not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior permission. -(TrademarkedName) makes no representations about the suitability this software -for any purpose. It is provided "as is" without express or implied warranty. +Copyright (c) (CopyrightHoldersName) (From 4-digit-year)-(To 4-digit-year) + +Permission to use, copy, modify, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appears in all copies and that both the copyright notice and this permission notice appear in supporting documentation, and that the name (TrademarkedName) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. (TrademarkedName) makes no representations about the suitability this software for any purpose. It is provided "as is" without express or implied warranty. diff --git a/options/license/NTP-0 b/options/license/NTP-0 index 248aa1a1d..84a2bdf6e 100644 --- a/options/license/NTP-0 +++ b/options/license/NTP-0 @@ -1,8 +1,5 @@ -NTP No Attribution (NTP-0) Copyright (4-digit-year) by (CopyrightHoldersName) +NTP No Attribution (NTP-0) -Permission to use, copy, modify, and distribute this software and its documentation -for any purpose is hereby granted, provided that the namesof (TrademarkedName) -not be used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. (TrademarkedName) makesno -representations about the suitability of this software for any purpose. It -is provided "as is" without express or implied warranty. +Copyright (4-digit-year) by (CopyrightHoldersName) + +Permission to use, copy, modify, and distribute this software and its documentation for any purpose is hereby granted, provided that the name of (TrademarkedName) not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. (TrademarkedName) make no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty. diff --git a/options/license/Naumen b/options/license/Naumen index af967ef83..95411eece 100644 --- a/options/license/Naumen +++ b/options/license/Naumen @@ -1,38 +1,21 @@ -NAUMEN Public License This software is Copyright (c) NAUMEN (tm) and Contributors. -All rights reserved. +NAUMEN Public License -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +This software is Copyright (c) NAUMEN (tm) and Contributors. All rights reserved. -1. Redistributions in source code must retain the above copyright notice, -this list of conditions, and the following disclaimer. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions, and the following disclaimer in the documentation -and/or other materials provided with the distribution. +1. Redistributions in source code must retain the above copyright notice, this list of conditions, and the following disclaimer. -3. The name NAUMEN (tm) must not be used to endorse or promote products derived -from this software without prior written permission from NAUMEN. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. -4. The right to distribute this software or to use it for any purpose does -not give you the right to use Servicemarks (sm) or Trademarks (tm) of NAUMEN. +3. The name NAUMEN (tm) must not be used to endorse or promote products derived from this software without prior written permission from NAUMEN. -5. If any files originating from NAUMEN or Contributors are modified, you -must cause the modified files to carry prominent notices stating that you -changed the files and the date of any change. +4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of NAUMEN. + +5. If any files originating from NAUMEN or Contributors are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer: -THIS SOFTWARE IS PROVIDED BY NAUMEN "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NAUMEN -OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY NAUMEN "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NAUMEN OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -This software consists of contributions made by NAUMEN and Contributors. Specific -attributions are listed in the accompanying credits file. +This software consists of contributions made by NAUMEN and Contributors. Specific attributions are listed in the accompanying credits file. diff --git a/options/license/Net-SNMP b/options/license/Net-SNMP index f68b3cdf2..9ec271072 100644 --- a/options/license/Net-SNMP +++ b/options/license/Net-SNMP @@ -1,257 +1,107 @@ ----- Part 1: CMU/UCD copyright notice: (BSD like) ----- Copyright 1989, 1991, -1992 by Carnegie Mellon University + ---- Part 1: CMU/UCD copyright notice: (BSD like) ----- -Derivative Work - 1996, 1998-2000 Copyright 1996, 1998-2000 The Regents of -the University of California + Copyright 1989, 1991, 1992 by Carnegie Mellon University -All Rights Reserved + Derivative Work - 1996, 1998-2000 Copyright 1996, 1998-2000 The Regents of the University of California -Permission to use, copy, modify and distribute this software and its documentation -for any purpose and without fee is hereby granted, provided that the above -copyright notice appears in all copies and that both that copyright notice -and this permission notice appear in supporting documentation, and that the -name of CMU and The Regents of the University of California not be used in -advertising or publicity pertaining to distribution of the software without -specific written permission. + All Rights Reserved -CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL CMU OR THE REGENTS OF THE UNIVERSITY OF CALIFORNIA -BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +Permission to use, copy, modify and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appears in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of CMU and The Regents of the University of California not be used in advertising or publicity pertaining to distribution of the software without specific written permission. + +CMU AND THE REGENTS OF THE UNIVERSITY OF CALIFORNIA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL CMU OR THE REGENTS OF THE UNIVERSITY OF CALIFORNIA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM THE LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ---- Part 2: Networks Associates Technology, Inc copyright notice (BSD) ----- -Copyright (c) 2001-2003, Networks Associates Technology, Inc All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Copyright (c) 2001-2003, Networks Associates Technology, Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of the Networks Associates Technology, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* Neither the name of the Networks Associates Technology, Inc nor the names -of its contributors may be used to endorse or promote products derived from -this software without specific prior written permission. +---- Part 3: Cambridge Broadband Ltd. copyright notice (BSD) ----- -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Portions of this code are copyright (c) 2001-2003, Cambridge Broadband Ltd. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - ---- Part 3: Cambridge Broadband Ltd. copyright notice (BSD) ----- + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * The name of Cambridge Broadband Ltd. may not be used to endorse or promote products derived from this software without specific prior written permission. -Portions of this code are copyright (c) 2001-2003, Cambridge Broadband Ltd. -All rights reserved. Redistribution and use in source and binary forms, with -or without modification, are permitted provided that the following conditions -are met: +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +---- Part 4: Sun Microsystems, Inc. copyright notice (BSD) ----- -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -* The name of Cambridge Broadband Ltd. may not be used to endorse or promote -products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - ----- Part 4: Sun Microsystems, Inc. copyright notice (BSD) ----- Copyright -© 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California -95054, U.S.A. All rights reserved. +Copyright © 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, U.S.A. All rights reserved. Use is subject to license terms below. This distribution may include materials developed by third parties. -Sun, Sun Microsystems, the Sun logo and Solaris are trademarks or registered -trademarks of Sun Microsystems, Inc. in the U.S. and other countries. +Sun, Sun Microsystems, the Sun logo and Solaris are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -* Neither the name of the Sun Microsystems, Inc. nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. + * Neither the name of the Sun Microsystems, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ---- Part 5: Sparta, Inc copyright notice (BSD) ----- +---- Part 5: Sparta, Inc copyright notice (BSD) ----- -Copyright (c) 2003-2009, Sparta, Inc All rights reserved. Redistribution and -use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: +Copyright (c) 2003-2009, Sparta, Inc All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of Sparta, Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* Neither the name of Sparta, Inc nor the names of its contributors may be -used to endorse or promote products derived from this software without specific -prior written permission. +---- Part 6: Cisco/BUPTNIC copyright notice (BSD) ----- -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Copyright (c) 2004, Cisco, Inc and Information Network Center of Beijing University of Posts and Telecommunications. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - ---- Part 6: Cisco/BUPTNIC copyright notice (BSD) ----- + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of Cisco, Inc, Beijing University of Posts and Telecommunications, nor the names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. -Copyright (c) 2004, Cisco, Inc and Information Network Center of Beijing University -of Posts and Telecommunications. All rights reserved. Redistribution and use -in source and binary forms, with or without modification, are permitted provided -that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -* Neither the name of Cisco, Inc, Beijing University of Posts and Telecommunications, -nor the names of their contributors may be used to endorse or promote products -derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ---- Part 7: Fabasoft R&D Software GmbH & Co KG copyright notice (BSD) ----- -Copyright (c) Fabasoft R&D Software GmbH & Co KG, 2003 oss@fabasoft.com Author: -Bernhard Penz -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Copyright (c) Fabasoft R&D Software GmbH & Co KG, 2003 oss@fabasoft.com Author: Bernhard Penz -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* The name of Fabasoft R&D Software GmbH & Co KG or any of its subsidiaries, -brand or product names may not be used to endorse or promote products derived -from this software without specific prior written permission. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. + * The name of Fabasoft R&D Software GmbH & Co KG or any of its subsidiaries, brand or product names may not be used to endorse or promote products derived from this software without specific prior written permission. ----- Part 8: Apple Inc. copyright notice (BSD) ----- Copyright (c) 2007 Apple -Inc. All rights reserved. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +---- Part 8: Apple Inc. copyright notice (BSD) ----- -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +Copyright (c) 2007 Apple Inc. All rights reserved. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -3. Neither the name of Apple Inc. ("Apple") nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + 3. Neither the name of Apple Inc. ("Apple") nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ---- Part 9: ScienceLogic, LLC copyright notice (BSD) ----- +---- Part 9: ScienceLogic, LLC copyright notice (BSD) ----- -Copyright (c) 2009, ScienceLogic, LLC All rights reserved. Redistribution -and use in source and binary forms, with or without modification, are permitted -provided that the following conditions are met: +Copyright (c) 2009, ScienceLogic, LLC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Neither the name of ScienceLogic, LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -* Neither the name of ScienceLogic, LLC nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/NetCDF b/options/license/NetCDF index 8fbacd6a2..1a5496528 100644 --- a/options/license/NetCDF +++ b/options/license/NetCDF @@ -1,29 +1,7 @@ Copyright 1993-2014 University Corporation for Atmospheric Research/Unidata -Portions of this software were developed by the Unidata Program at the University -Corporation for Atmospheric Research. +Portions of this software were developed by the Unidata Program at the University Corporation for Atmospheric Research. -Access and use of this software shall impose the following obligations and -understandings on the user. The user is granted the right, without any fee -or cost, to use, copy, modify, alter, enhance and distribute this software, -and any derivative works thereof, and its supporting documentation for any -purpose whatsoever, provided that this entire notice appears in all copies -of the software, derivative works and supporting documentation. Further, UCAR -requests that the user credit UCAR/Unidata in any publications that result -from the use of this software or in any product that includes this software, -although this is not an obligation. The names UCAR and/or Unidata, however, -may not be used in any advertising or publicity to endorse or promote any -products or commercial entity unless specific written permission is obtained -from UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated -to provide the user with any support, consulting, training or assistance of -any kind with regard to the use, operation and performance of this software -nor to provide the user with any updates, revisions, new versions or "bug -fixes." +Access and use of this software shall impose the following obligations and understandings on the user. The user is granted the right, without any fee or cost, to use, copy, modify, alter, enhance and distribute this software, and any derivative works thereof, and its supporting documentation for any purpose whatsoever, provided that this entire notice appears in all copies of the software, derivative works and supporting documentation. Further, UCAR requests that the user credit UCAR/Unidata in any publications that result from the use of this software or in any product that includes this software, although this is not an obligation. The names UCAR and/or Unidata, however, may not be used in any advertising or publicity to endorse or promote any products or commercial entity unless specific written permission is obtained from UCAR/Unidata. The user also understands that UCAR/Unidata is not obligated to provide the user with any support, consulting, training or assistance of any kind with regard to the use, operation and performance of this software nor to provide the user with any updates, revisions, new versions or "bug fixes." -THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA -BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION -OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. +THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL UCAR/UNIDATA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE ACCESS, USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/Newsletr b/options/license/Newsletr index 78836f035..e91de7bd0 100644 --- a/options/license/Newsletr +++ b/options/license/Newsletr @@ -1,11 +1,7 @@ Copyright 1989--2004 by Hunter Goatley. -Permission is granted to anyone to use this software for any purpose on any -computer system, and to redistribute it freely, subject to the following restrictions: +Permission is granted to anyone to use this software for any purpose on any computer system, and to redistribute it freely, subject to the following restrictions: -1. This software is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. +1. This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -2. Altered versions must be plainly marked as such, and must not be misrepresented -as being the original software. +2. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. diff --git a/options/license/Nokia b/options/license/Nokia index 29883d879..ac0b78cd6 100644 --- a/options/license/Nokia +++ b/options/license/Nokia @@ -1,372 +1,154 @@ Nokia Open Source License (NOKOS License) -Version 1.0a 1. DEFINITIONS. +Version 1.0a + +1. DEFINITIONS. "Affiliates" of a party shall mean an entity - a) which is directly or indirectly controlling such party; + a) which is directly or indirectly controlling such party; -b) which is under the same direct or indirect ownership or control as such -party; or + b) which is under the same direct or indirect ownership or control as such party; or - c) which is directly or indirectly owned or controlled by such party. + c) which is directly or indirectly owned or controlled by such party. -For these purposes, an entity shall be treated as being controlled by another -if that other entity has fifty percent (50%) or more of the votes in such -entity, is able to direct its affairs and/or to control the composition of -its board of directors or equivalent body. + For these purposes, an entity shall be treated as being controlled by another if that other entity has fifty percent (50%) or more of the votes in such entity, is able to direct its affairs and/or to control the composition of its board of directors or equivalent body. -"Commercial Use" shall mean distribution or otherwise making the Covered Software -available to a third party. +"Commercial Use" shall mean distribution or otherwise making the Covered Software available to a third party. -"Contributor" shall mean each entity that creates or contributes to the creation -of Modifications. +"Contributor" shall mean each entity that creates or contributes to the creation of Modifications. -"Contributor Version" shall mean in case of any Contributor the combination -of the Original Software, prior Modifications used by a Contributor, and the -Modifications made by that particular Contributor and in case of Nokia in -addition the Original Software in any form, including the form as Exceutable. +"Contributor Version" shall mean in case of any Contributor the combination of the Original Software, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor and in case of Nokia in addition the Original Software in any form, including the form as Exceutable. -"Covered Software" shall mean the Original Software or Modifications or the -combination of the Original Software and Modifications, in each case including -portions thereof. +"Covered Software" shall mean the Original Software or Modifications or the combination of the Original Software and Modifications, in each case including portions thereof. -"Electronic Distribution Mechanism" shall mean a mechanism generally accepted -in the software development community for the electronic transfer of data. +"Electronic Distribution Mechanism" shall mean a mechanism generally accepted in the software development community for the electronic transfer of data. "Executable" shall mean Covered Software in any form other than Source Code. "Nokia" shall mean Nokia Corporation and its Affiliates. -"Larger Work" shall mean a work, which combines Covered Software or portions -thereof with code not governed by the terms of this License. +"Larger Work" shall mean a work, which combines Covered Software or portions thereof with code not governed by the terms of this License. "License" shall mean this document. -"Licensable" shall mean having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. +"Licensable" shall mean having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -"Modifications" shall mean any addition to or deletion from the substance -or structure of either the Original Software or any previous Modifications. -When Covered Software is released as a series of files, a Modification is: +"Modifications" shall mean any addition to or deletion from the substance or structure of either the Original Software or any previous Modifications. When Covered Software is released as a series of files, a Modification is: -a) Any addition to or deletion from the contents of a file containing Original -Software or previous Modifications. + a) Any addition to or deletion from the contents of a file containing Original Software or previous Modifications. -b) Any new file that contains any part of the Original Software or previous -Modifications. + b) Any new file that contains any part of the Original Software or previous Modifications. -"Original Software" shall mean the Source Code of computer software code which -is described in the Source Code notice required by Exhibit A as Original Software, -and which, at the time of its release under this License is not already Covered -Software governed by this License. +"Original Software" shall mean the Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Software, and which, at the time of its release under this License is not already Covered Software governed by this License. -"Patent Claims" shall mean any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by grantor. +"Patent Claims" shall mean any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -"Source Code" shall mean the preferred form of the Covered Software for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Software or another well known, available Covered Software of the -Contributor's choice. The Source Code can be in a compressed or archival form, -provided the appropriate decompression or de-archiving software is widely -available for no charge. +"Source Code" shall mean the preferred form of the Covered Software for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Software or another well known, available Covered Software of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -"You" (or "Your") shall mean an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -Affiliates of such entity. 2. SOURCE CODE LICENSE. +"You" (or "Your") shall mean an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes Affiliates of such entity. - 2.1 Nokia Grant. +2. SOURCE CODE LICENSE. -Subject to the terms of this License, Nokia hereby grants You a world-wide, -royalty-free, non-exclusive license, subject to third party intellectual property -claims: + 2.1 Nokia Grant. + Subject to the terms of this License, Nokia hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -a) under copyrights Licensable by Nokia to use, reproduce, modify, display, -perform, sublicense and distribute the Original Software (or portions thereof) -with or without Modifications, and/or as part of a Larger Work; + a) under copyrights Licensable by Nokia to use, reproduce, modify, display, perform, sublicense and distribute the Original Software (or portions thereof) with or without Modifications, and/or as part of a Larger Work; -b) and under Patents Claims necessarily infringed by the making, using or -selling of Original Software, to make, have made, use, practice, sell, and -offer for sale, and/or otherwise dispose of the Original Software (or portions -thereof). + b) and under Patents Claims necessarily infringed by the making, using or selling of Original Software, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Software (or portions thereof). -c) The licenses granted in this Section 2.1(a) and (b) are effective on the -date Nokia first distributes Original Software under the terms of this License. + c) The licenses granted in this Section 2.1(a) and (b) are effective on the date Nokia first distributes Original Software under the terms of this License. -d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Software; 2) separate from the -Original Software; or 3) for infringements caused by: i) the modification -of the Original Software or ii) the combination of the Original Software with -other software or devices. + d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Software; 2) separate from the Original Software; or 3) for infringements caused by: i) the modification of the Original Software or ii) the combination of the Original Software with other software or devices. - 2.2 Contributor Grant. + 2.2 Contributor Grant. + Subject to the terms of this License and subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license -Subject to the terms of this License and subject to third party intellectual -property claims, each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license + a) under copyrights Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Software and/or as part of a Larger Work; and -a) under copyrights Licensable by Contributor, to use, reproduce, modify, -display, perform, sublicense and distribute the Modifications created by such -Contributor (or portions thereof) either on an unmodified basis, with other -Modifications, as Covered Software and/or as part of a Larger Work; and + b) under Patent Claims necessarily infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). -b) under Patent Claims necessarily infringed by the making, using, or selling -of Modifications made by that Contributor either alone and/or in combination -with its Contributor Version (or portions of such combination), to make, use, -sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications -made by that Contributor (or portions thereof); and 2) the combination of -Modifications made by that Contributor with its Contributor Version (or portions -of such combination). + c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Software. -c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Software. + d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Software in the absence of Modifications made by that Contributor. -d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Software in the absence of Modifications made by that Contributor. 3. DISTRIBUTION OBLIGATIONS. - 3.1 Application of License. + 3.1 Application of License. + The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Software may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -The Modifications which You create or to which You contribute are governed -by the terms of this License, including without limitation Section 2.2. The -Source Code version of Covered Software may be distributed only under the -terms of this License or a future version of this License released under Section -6.1, and You must include a copy of this License with every copy of the Source -Code You distribute. You may not offer or impose any terms on any Source Code -version that alters or restricts the applicable version of this License or -the recipients' rights hereunder. However, You may include an additional document -offering the additional rights described in Section 3.5. + 3.2 Availability of Source Code. + Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. - 3.2 Availability of Source Code. + 3.3 Description of Modifications. + You must cause all Covered Software to which You contribute to contain a file documenting the changes You made to create that Covered Software and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Software provided by Nokia and including the name of Nokia in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Software. -Any Modification which You create or to which You contribute must be made -available in Source Code form under the terms of this License either on the -same media as an Executable version or via an accepted Electronic Distribution -Mechanism to anyone to whom you made an Executable version available; and -if made available via Electronic Distribution Mechanism, must remain available -for at least twelve (12) months after the date it initially became available, -or at least six (6) months after a subsequent version of that particular Modification -has been made available to such recipients. You are responsible for ensuring -that the Source Code version remains available even if the Electronic Distribution -Mechanism is maintained by a third party. + 3.4 Intellectual Property Matters - 3.3 Description of Modifications. + (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Software that new knowledge has been obtained. -You must cause all Covered Software to which You contribute to contain a file -documenting the changes You made to create that Covered Software and the date -of any change. You must include a prominent statement that the Modification -is derived, directly or indirectly, from Original Software provided by Nokia -and including the name of Nokia in (a) the Source Code, and (b) in any notice -in an Executable version or related documentation in which You describe the -origin or ownership of the Covered Software. + (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. - 3.4 Intellectual Property Matters + (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. -(a) Third Party Claims. If Contributor has knowledge that a license under -a third party's intellectual property rights is required to exercise the rights -granted by such Contributor under Sections 2.1 or 2.2, Contributor must include -a text file with the Source Code distribution titled "LEGAL" which describes -the claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Software that new knowledge has been obtained. + 3.5 Required Notices. + You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Software. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of Nokia or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify Nokia and every Contributor for any liability incurred by Nokia or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -(b) Contributor APIs. If Contributor's Modifications include an application -programming interface and Contributor has knowledge of patent licenses which -are reasonably necessary to implement that API, Contributor must also include -this information in the LEGAL file. + 3.6 Distribution of Executable Versions. + You may distribute Covered Software in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Software, and if You include a notice stating that the Source Code version of the Covered Software is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Software. You may distribute the Executable version of Covered Software or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by Nokia or any Contributor. You hereby agree to indemnify Nokia and every Contributor for any liability incurred by Nokia or such Contributor as a result of any such terms You offer. -(c) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. + 3.7 Larger Works. + You may create a Larger Work by combining Covered Software with other software not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Software. - 3.5 Required Notices. +4. INABILITY TO COMPLY DUE TO STATUTE OR REGULATION. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. -You must duplicate the notice in Exhibit A in each file of the Source Code. -If it is not possible to put such notice in a particular Source Code file -due to its structure, then You must include such notice in a location (such -as a relevant directory) where a user would be likely to look for such a notice. -If You created one or more Modification(s) You may add your name as a Contributor -to the notice described in Exhibit A. You must also duplicate this License -in any documentation for the Source Code where You describe recipients' rights -or ownership rights relating to Covered Software. You may choose to offer, -and to charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Covered Software. However, You may do so only -on Your own behalf, and not on behalf of Nokia or any Contributor. You must -make it absolutely clear that any such warranty, support, indemnity or liability -obligation is offered by You alone, and You hereby agree to indemnify Nokia -and every Contributor for any liability incurred by Nokia or such Contributor -as a result of warranty, support, indemnity or liability terms You offer. +Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - 3.6 Distribution of Executable Versions. +5. APPLICATION OF THIS LICENSE. +This License applies to code to which Nokia has attached the notice in Exhibit A and to related Covered Software. -You may distribute Covered Software in Executable form only if the requirements -of Section 3.1-3.5 have been met for that Covered Software, and if You include -a notice stating that the Source Code version of the Covered Software is available -under the terms of this License, including a description of how and where -You have fulfilled the obligations of Section 3.2. The notice must be conspicuously -included in any notice in an Executable version, related documentation or -collateral in which You describe recipients' rights relating to the Covered -Software. You may distribute the Executable version of Covered Software or -ownership rights under a license of Your choice, which may contain terms different -from this License, provided that You are in compliance with the terms of this -License and that the license for the Executable version does not attempt to -limit or alter the recipient's rights in the Source Code version from the -rights set forth in this License. If You distribute the Executable version -under a different license You must make it absolutely clear that any terms -which differ from this License are offered by You alone, not by Nokia or any -Contributor. You hereby agree to indemnify Nokia and every Contributor for -any liability incurred by Nokia or such Contributor as a result of any such -terms You offer. +6. VERSIONS OF THE LICENSE. - 3.7 Larger Works. + 6.1 New Versions. + Nokia may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -You may create a Larger Work by combining Covered Software with other software -not governed by the terms of this License and distribute the Larger Work as -a single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Software. 4. INABILITY TO COMPLY DUE -TO STATUTE OR REGULATION. + 6.2 Effect of New Versions. + Once Covered Software has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Software under the terms of any subsequent version of the License published by Nokia. No one other than Nokia has the right to modify the terms applicable to Covered Software created under this License. -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Software due to statute, judicial -order, or regulation then You must: (a) comply with the terms of this License -to the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. +7. DISCLAIMER OF WARRANTY. +COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT NOKIA, ITS LICENSORS OR AFFILIATES OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. 5. APPLICATION OF THIS LICENSE. +8. TERMINATION. -This License applies to code to which Nokia has attached the notice in Exhibit -A and to related Covered Software. 6. VERSIONS OF THE LICENSE. + 8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Software which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - 6.1 New Versions. + 8.2 If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Nokia or a Contributor (Nokia or Contributor against whom You file such action is referred to as "Participant") alleging that: -Nokia may publish revised and/or new versions of the License from time to -time. Each version will be given a distinguishing version number. + a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. - 6.2 Effect of New Versions. + b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. -Once Covered Software has been published under a particular version of the -License, You may always continue to use it under the terms of that version. -You may also choose to use such Covered Software under the terms of any subsequent -version of the License published by Nokia. No one other than Nokia has the -right to modify the terms applicable to Covered Software created under this -License. 7. DISCLAIMER OF WARRANTY. + 8.3 If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT -FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY COVERED SOFTWARE -PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT NOKIA, ITS LICENSORS OR AFFILIATES -OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR -OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF -THIS LICENSE. NO USE OF ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT -UNDER THIS DISCLAIMER. 8. TERMINATION. + 8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. -8.1 This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Software -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. +9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, NOKIA, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, BUT MAY ALLOW LIABILITY TO BE LIMITED; IN SUCH CASES, A PARTY's, ITS EMPLOYEES, LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. Nothing contained in this License shall prejudice the statutory rights of any party dealing as a consumer. -8.2 If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Nokia or a Contributor (Nokia or Contributor -against whom You file such action is referred to as "Participant") alleging -that: +10. MISCELLANEOUS. +This License represents the complete agreement concerning subject matter hereof. All rights in the Covered Software not expressly granted under this License are reserved. Nothing in this License shall grant You any rights to use any of the trademarks of Nokia or any of its Affiliates, even if any of such trademarks are included in any part of Covered Software and/or documentation to it. -a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. +This License is governed by the laws of Finland excluding its conflict-of-law provisions. All disputes arising from or relating to this Agreement shall be settled by a single arbitrator appointed by the Central Chamber of Commerce of Finland. The arbitration procedure shall take place in Helsinki, Finland in the English language. If any part of this Agreement is found void and unenforceable, it will not affect the validity of the balance of the Agreement, which shall remain valid and enforceable according to its terms. -b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. +11. RESPONSIBILITY FOR CLAIMS. +As between Nokia and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Nokia and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. -8.3 If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. +EXHIBIT A -8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user -license agreements (excluding distributors and resellers) which have been -validly granted by You or any distributor hereunder prior to termination shall -survive termination. 9. LIMITATION OF LIABILITY. +The contents of this file are subject to the NOKOS License Version 1.0 (the "License"); you may not use this file except in compliance with the License. -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, NOKIA, ANY OTHER CONTRIBUTOR, -OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, -BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF -GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER -COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED -OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT -APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S -NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS -DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, -BUT MAY ALLOW LIABILITY TO BE LIMITED; IN SUCH CASES, A PARTY's, ITS EMPLOYEES, -LICENSORS OR AFFILIATES' LIABILITY SHALL BE LIMITED TO U.S. $50. Nothing contained -in this License shall prejudice the statutory rights of any party dealing -as a consumer. 10. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -All rights in the Covered Software not expressly granted under this License -are reserved. Nothing in this License shall grant You any rights to use any -of the trademarks of Nokia or any of its Affiliates, even if any of such trademarks -are included in any part of Covered Software and/or documentation to it. - -This License is governed by the laws of Finland excluding its conflict-of-law -provisions. All disputes arising from or relating to this Agreement shall -be settled by a single arbitrator appointed by the Central Chamber of Commerce -of Finland. The arbitration procedure shall take place in Helsinki, Finland -in the English language. If any part of this Agreement is found void and unenforceable, -it will not affect the validity of the balance of the Agreement, which shall -remain valid and enforceable according to its terms. 11. RESPONSIBILITY FOR -CLAIMS. - -As between Nokia and the Contributors, each party is responsible for claims -and damages arising, directly or indirectly, out of its utilization of rights -under this License and You agree to work with Nokia and Contributors to distribute -such responsibility on an equitable basis. Nothing herein is intended or shall -be deemed to constitute any admission of liability. EXHIBIT A - -The contents of this file are subject to the NOKOS License Version 1.0 (the -"License"); you may not use this file except in compliance with the License. - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Software is diff --git a/options/license/Nokia-Qt-exception-1.1 b/options/license/Nokia-Qt-exception-1.1 index ddaed7b85..b4ec52b7a 100644 --- a/options/license/Nokia-Qt-exception-1.1 +++ b/options/license/Nokia-Qt-exception-1.1 @@ -2,20 +2,15 @@ Nokia Qt LGPL Exception version 1.1 As an additional permission to the GNU Lesser General Public License version 2.1, the object code form of a "work that uses the Library" may incorporate material from a header file that is part of the Library. You may distribute such object code under terms of your choice, provided that: - (i) the header files of the Library have not been modified; and - - (ii) the incorporated material is limited to numerical parameters, data structure layouts, accessors, macros, inline functions and templates; and - - (iii) you comply with the terms of Section 6 of the GNU Lesser General Public License version 2.1. + (i) the header files of the Library have not been modified; and + (ii) the incorporated material is limited to numerical parameters, data structure layouts, accessors, macros, inline functions and templates; and + (iii) you comply with the terms of Section 6 of the GNU Lesser General Public License version 2.1. Moreover, you may apply this exception to a modified version of the Library, provided that such modification does not involve copying material from the Library into the modified Library's header files unless such material is limited to - (i) numerical parameters; - - (ii) data structure layouts; - - (iii) accessors; and - - (iv) small macros, templates and inline functions of five lines or less in length. + (i) numerical parameters; + (ii) data structure layouts; + (iii) accessors; and + (iv) small macros, templates and inline functions of five lines or less in length. Furthermore, you are not required to apply this additional permission to a modified version of the Library. diff --git a/options/license/Noweb b/options/license/Noweb index d7ffc3d9b..8271989fb 100644 --- a/options/license/Noweb +++ b/options/license/Noweb @@ -1,21 +1,9 @@ Noweb is copyright 1989-2000 by Norman Ramsey. All rights reserved. -Noweb is protected by copyright. It is not public-domain software or shareware, -and it is not protected by a ``copyleft'' agreement like the one used by the -Free Software Foundation. +Noweb is protected by copyright. It is not public-domain software or shareware, and it is not protected by a ``copyleft'' agreement like the one used by the Free Software Foundation. -Noweb is available free for any use in any field of endeavor. You may redistribute -noweb in whole or in part provided you acknowledge its source and include -this COPYRIGHT file. You may modify noweb and create derived works, provided -you retain this copyright notice, but the result may not be called noweb without -my written consent. +Noweb is available free for any use in any field of endeavor. You may redistribute noweb in whole or in part provided you acknowledge its source and include this COPYRIGHT file. You may modify noweb and create derived works, provided you retain this copyright notice, but the result may not be called noweb without my written consent. -You may sell noweb if you wish. For example, you may sell a CD-ROM including -noweb. +You may sell noweb if you wish. For example, you may sell a CD-ROM including noweb. -You may sell a derived work, provided that all source code for your derived -work is available, at no additional charge, to anyone who buys your derived -work in any form. You must give permisson for said source code to be used -and modified under the terms of this license. You must state clearly that -your work uses or is based on noweb and that noweb is available free of change. -You must also request that bug reports on your work be reported to you. +You may sell a derived work, provided that all source code for your derived work is available, at no additional charge, to anyone who buys your derived work in any form. You must give permisson for said source code to be used and modified under the terms of this license. You must state clearly that your work uses or is based on noweb and that noweb is available free of change. You must also request that bug reports on your work be reported to you. diff --git a/options/license/O-UDA-1.0 b/options/license/O-UDA-1.0 index 5ce017119..cf4b2bc9a 100644 --- a/options/license/O-UDA-1.0 +++ b/options/license/O-UDA-1.0 @@ -1,77 +1,47 @@ Open Use of Data Agreement v1.0 -This is the Open Use of Data Agreement, Version 1.0 (the "O-UDA"). Capitalized -terms are defined in Section 5. Data Provider and you agree as follows: +This is the Open Use of Data Agreement, Version 1.0 (the "O-UDA"). Capitalized terms are defined in Section 5. Data Provider and you agree as follows: - 1. Provision of the Data +1. Provision of the Data -1.1. You may use, modify, and distribute the Data made available to you by -the Data Provider under this O-UDA if you follow the O-UDA's terms. + 1.1. You may use, modify, and distribute the Data made available to you by the Data Provider under this O-UDA if you follow the O-UDA's terms. -1.2. Data Provider will not sue you or any Downstream Recipient for any claim -arising out of the use, modification, or distribution of the Data provided -you meet the terms of the O-UDA. + 1.2. Data Provider will not sue you or any Downstream Recipient for any claim arising out of the use, modification, or distribution of the Data provided you meet the terms of the O-UDA. -1.3. This O-UDA does not restrict your use, modification, or distribution -of any portions of the Data that are in the public domain or that may be used, -modified, or distributed under any other legal exception or limitation. + 1.3 This O-UDA does not restrict your use, modification, or distribution of any portions of the Data that are in the public domain or that may be used, modified, or distributed under any other legal exception or limitation. - 2. No Restrictions on Use or Results +2. No Restrictions on Use or Results - 2.1. The O-UDA does not impose any restriction with respect to: + 2.1. The O-UDA does not impose any restriction with respect to: - 2.1.1. the use or modification of Data; or + 2.1.1. the use or modification of Data; or - 2.1.2. the use, modification, or distribution of Results. + 2.1.2. the use, modification, or distribution of Results. - 3. Redistribution of Data +3. Redistribution of Data -3.1. You may redistribute the Data under terms of your choice, so long as: + 3.1. You may redistribute the Data under terms of your choice, so long as: -3.1.1. You include with any Data you redistribute all credit or attribution -information that you received with the Data, and your terms require any Downstream -Recipient to do the same; and + 3.1.1. You include with any Data you redistribute all credit or attribution information that you received with the Data, and your terms require any Downstream Recipient to do the same; and -3.1.2. Your terms include a warranty disclaimer and limitation of liability -for Upstream Data Providers at least as broad as those contained in Section -4.2 and 4.3 of the O-UDA. + 3.1.2. Your terms include a warranty disclaimer and limitation of liability for Upstream Data Providers at least as broad as those contained in Section 4.2 and 4.3 of the O-UDA. - 4. No Warranty, Limitation of Liability +4. No Warranty, Limitation of Liability -4.1. Data Provider does not represent or warrant that it has any rights whatsoever -in the Data. + 4.1. Data Provider does not represent or warrant that it has any rights whatsoever in the Data. -4.2. THE DATA IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS -OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY -WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS -FOR A PARTICULAR PURPOSE. + 4.2. THE DATA IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -4.3. NEITHER DATA PROVIDER NOR ANY UPSTREAM DATA PROVIDER SHALL HAVE ANY LIABILITY -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE DATA OR RESULTS, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + 4.3. NEITHER DATA PROVIDER NOR ANY UPSTREAM DATA PROVIDER SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE DATA OR RESULTS, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - 5. Definitions +5. Definitions -5.1. "Data" means the material you receive under the O-UDA in modified or -unmodified form, but not including Results. + 5.1. "Data" means the material you receive under the O-UDA in modified or unmodified form, but not including Results. -5.2. "Data Provider" means the source from which you receive the Data and -with whom you enter into the O-UDA. + 5.2. "Data Provider" means the source from which you receive the Data and with whom you enter into the O-UDA. -5.3. "Downstream Recipient" means any person or persons who receives the Data -directly or indirectly from you in accordance with the O-UDA. + 5.3. "Downstream Recipient" means any person or persons who receives the Data directly or indirectly from you in accordance with the O-UDA. -5.4. "Result" means anything that you develop or improve from your use of -Data that does not include more than a de minimis portion of the Data on which -the use is based. Results may include de minimis portions of the Data necessary -to report on or explain use that has been conducted with the Data, such as -figures in scientific papers, but do not include more. Artificial intelligence -models trained on Data (and which do not include more than a de minimis portion -of Data) are Results. + 5.4. "Result" means anything that you develop or improve from your use of Data that does not include more than a de minimis portion of the Data on which the use is based. Results may include de minimis portions of the Data necessary to report on or explain use that has been conducted with the Data, such as figures in scientific papers, but do not include more. Artificial intelligence models trained on Data (and which do not include more than a de minimis portion of Data) are Results. -5.5. "Upstream Data Providers" means the source or sources from which the -Data Provider directly or indirectly received, under the terms of the O-UDA, -material that is included in the Data. + 5.5. "Upstream Data Providers" means the source or sources from which the Data Provider directly or indirectly received, under the terms of the O-UDA, material that is included in the Data. diff --git a/options/license/OCCT-PL b/options/license/OCCT-PL index 0217ba589..85df3c73c 100644 --- a/options/license/OCCT-PL +++ b/options/license/OCCT-PL @@ -1,279 +1,112 @@ Open CASCADE Technology Public License - Version 6.6, April 2013 -OPEN CASCADE releases and makes publicly available the source code of the -software Open CASCADE Technology to the free software development community -under the terms and conditions of this license. +OPEN CASCADE releases and makes publicly available the source code of the software Open CASCADE Technology to the free software development community under the terms and conditions of this license. -It is not the purpose of this license to induce you to infringe any patents -or other property right claims or to contest validity of any such claims; -this license has the sole purpose of protecting the integrity of the free -software distribution system, which is implemented by public license practices. -Many people have made generous contributions to the wide range of software -distributed through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing to -distribute software through any other system and a licensee cannot impose -that choice. +It is not the purpose of this license to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this license has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. -Please read this license carefully and completely before downloading this -software. By downloading, using, modifying, distributing and sublicensing -this software, you indicate your acceptance to be bound by the terms and conditions -of this license. If you do not want to accept or cannot accept for any reasons -the terms and conditions of this license, please do not download or use in -any manner this software. +Please read this license carefully and completely before downloading this software. By downloading, using, modifying, distributing and sublicensing this software, you indicate your acceptance to be bound by the terms and conditions of this license. If you do not want to accept or cannot accept for any reasons the terms and conditions of this license, please do not download or use in any manner this software. +  +1. Definitions - 1. Definitions +Unless there is something in the subject matter or in the context inconsistent therewith, the capitalized terms used in this License shall have the following meaning. -Unless there is something in the subject matter or in the context inconsistent -therewith, the capitalized terms used in this License shall have the following -meaning. +"Applicable Intellectual Property Rights" means (a) with respect to the Initial Developer, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to the Initial Developer and that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce, modify, distribute or sublicense the Original Code without infringement; and (b) with respect to You or any Contributor, any rights under patents or patents applications or other intellectual property rights that are now or hereafter acquired, owned by or assigned to You or to such Contributor and that cover subject matter contained in Your Modifications or in such Contributor's Modifications, taken alone or in combination with Original Code. -"Applicable Intellectual Property Rights" means (a) with respect to the Initial -Developer, any rights under patents or patents applications or other intellectual -property rights that are now or hereafter acquired, owned by or assigned to -the Initial Developer and that cover subject matter contained in the Original -Code, but only to the extent necessary to use, reproduce, modify, distribute -or sublicense the Original Code without infringement; and (b) with respect -to You or any Contributor, any rights under patents or patents applications -or other intellectual property rights that are now or hereafter acquired, -owned by or assigned to You or to such Contributor and that cover subject -matter contained in Your Modifications or in such Contributor's Modifications, -taken alone or in combination with Original Code. +"Contributor" means each individual or legal entity that creates or contributes to the creation of any Modification, including the Initial Developer. -"Contributor" means each individual or legal entity that creates or contributes -to the creation of any Modification, including the Initial Developer. +"Derivative Program": means a new program combining the Software or portions thereof with other source code not governed by the terms of this License. -"Derivative Program": means a new program combining the Software or portions -thereof with other source code not governed by the terms of this License. +"Initial Developer": means OPEN CASCADE, with main offices at 1, place des Frères Montgolfier, 78280, Guyancourt, France. -"Initial Developer": means OPEN CASCADE, with main offices at 1, place des -Frères Montgolfier, 78280, Guyancourt, France. +"Modifications": mean any addition to, deletion from or change to the substance or the structure of the Software. When source code of the Software is released as a series of files, a Modification is: (a) any addition to, deletion from or change to the contents of a file containing the Software or (b) any new file or other representation of computer program statements that contains any part of the Software. By way of example, Modifications include any debug of, or improvement to, the Original Code or any of its components or portions as well as its next versions or releases thereof. -"Modifications": mean any addition to, deletion from or change to the substance -or the structure of the Software. When source code of the Software is released -as a series of files, a Modification is: (a) any addition to, deletion from -or change to the contents of a file containing the Software or (b) any new -file or other representation of computer program statements that contains -any part of the Software. By way of example, Modifications include any debug -of, or improvement to, the Original Code or any of its components or portions -as well as its next versions or releases thereof. +"Original Code": means (a) the source code of the software Open CASCADE Technology originally made available by the Initial Developer under this License, including the source code of any updates or upgrades of the Original Code and (b) the object code compiled from such source code and originally made available by Initial Developer under this License. -"Original Code": means (a) the source code of the software Open CASCADE Technology -originally made available by the Initial Developer under this License, including -the source code of any updates or upgrades of the Original Code and (b) the -object code compiled from such source code and originally made available by -Initial Developer under this License. +"Software": means the Original Code, the Modifications, the combination of Original Code and any Modifications or any respective portions thereof. -"Software": means the Original Code, the Modifications, the combination of -Original Code and any Modifications or any respective portions thereof. +"You" or "Your": means an individual or a legal entity exercising rights under this License +  +2. Acceptance of license +By using, reproducing, modifying, distributing or sublicensing the Software or any portion thereof, You expressly indicate Your acceptance of the terms and conditions of this License and undertake to act in accordance with all the provisions of this License applicable to You. +  +3. Scope and purpose +This License applies to the Software and You may not use, reproduce, modify, distribute, sublicense or circulate the Software, or any portion thereof, except as expressly provided under this License. Any attempt to otherwise use, reproduce, modify, distribute or sublicense the Software is void and will automatically terminate Your rights under this License. +  +4. Contributor license +Subject to the terms and conditions of this License, the Initial Developer and each of the Contributors hereby grant You a world-wide, royalty-free, irrevocable and non-exclusive license under the Applicable Intellectual Property Rights they own or control, to use, reproduce, modify, distribute and sublicense the Software provided that: -"You" or "Your": means an individual or a legal entity exercising rights under -this License + You reproduce in all copies of the Software the copyright and other proprietary notices and disclaimers of the Initial Developer as they appear in the Original Code and attached hereto as Schedule "A" and any other notices or disclaimers attached to the Software and keep intact all notices in the Original Code that refer to this License and to the absence of any warranty; - 2. Acceptance of license + You include a copy of this License with every copy of the Software You distribute; -By using, reproducing, modifying, distributing or sublicensing the Software -or any portion thereof, You expressly indicate Your acceptance of the terms -and conditions of this License and undertake to act in accordance with all -the provisions of this License applicable to You. + If you distribute or sublicense the Software (as modified by You or on Your behalf as the case may be), You cause such Software to be licensed as a whole, at no charge, to all third parties, under the terms and conditions of the License, making in particular available to all third parties the source code of the Software; - 3. Scope and purpose + You document all Your Modifications, indicate the date of each such Modification, designate the version of the Software You used, prominently include a file carrying such information with respect to the Modifications and duplicate the copyright and other proprietary notices and disclaimers attached hereto as Schedule "B" or any other notices or disclaimers attached to the Software with your Modifications. -This License applies to the Software and You may not use, reproduce, modify, -distribute, sublicense or circulate the Software, or any portion thereof, -except as expressly provided under this License. Any attempt to otherwise -use, reproduce, modify, distribute or sublicense the Software is void and -will automatically terminate Your rights under this License. +For greater certainty, it is expressly understood that You may freely create Derivative Programs (without any obligation to publish such Derivative Program) and distribute same as a single product. In such case, You must ensure that all the requirements of this License are fulfilled for the Software or any portion thereof. - 4. Contributor license +5. Your license +You hereby grant all Contributors and anyone who becomes a party under this License a world-wide, non-exclusive, royalty-free and irrevocable license under the Applicable Intellectual Property Rights owned or controlled by You, to use, reproduce, modify, distribute and sublicense all Your Modifications under the terms and conditions of this License. -Subject to the terms and conditions of this License, the Initial Developer -and each of the Contributors hereby grant You a world-wide, royalty-free, -irrevocable and non-exclusive license under the Applicable Intellectual Property -Rights they own or control, to use, reproduce, modify, distribute and sublicense -the Software provided that: +6. Software subject to license +Your Modifications shall be governed by the terms and conditions of this License. You are not authorized to impose any other terms or conditions than those prevailing under this License when You distribute and/or sublicense the Software, save and except as permitted under Section 7 hereof. -You reproduce in all copies of the Software the copyright and other proprietary -notices and disclaimers of the Initial Developer as they appear in the Original -Code and attached hereto as Schedule "A" and any other notices or disclaimers -attached to the Software and keep intact all notices in the Original Code -that refer to this License and to the absence of any warranty; +7. Additional terms +You may choose to offer, on a non-exclusive basis, and to charge a fee for any warranty, support, maintenance, liability obligations or other rights consistent with the scope of this License with respect to the Software (the "Additional Terms") to the recipients of the Software. However, You may do so only on Your own behalf and on Your sole and exclusive responsibility. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold the Initial Developer and any Contributor harmless for any liability incurred by or claims asserted against the Initial Developer or any Contributors with respect to any such Additional Terms. -You include a copy of this License with every copy of the Software You distribute; +8. Disclaimer of warranty +The Software is provided under this License on an "as is" basis, without warranty of any kind, including without limitation, warranties that the Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Software is with You. -If you distribute or sublicense the Software (as modified by You or on Your -behalf as the case may be), You cause such Software to be licensed as a whole, -at no charge, to all third parties, under the terms and conditions of the -License, making in particular available to all third parties the source code -of the Software; +9. Liability +Under no circumstances shall You, the Initial Developer or any Contributor be liable to any person for any direct or indirect damages of any kind including, without limitation, damages for loss of goodwill, loss of data, work stoppage, computer failure or malfunction or any and all other commercial damages or losses resulting from or relating to this License or indirectly to the use of the Software. -You document all Your Modifications, indicate the date of each such Modification, -designate the version of the Software You used, prominently include a file -carrying such information with respect to the Modifications and duplicate -the copyright and other proprietary notices and disclaimers attached hereto -as Schedule "B" or any other notices or disclaimers attached to the Software -with your Modifications. +10. Trademark +This License does not grant any rights to use the trademarks, trade names and domain names "MATRA", "EADS Matra Datavision", "CAS.CADE", "Open CASCADE", "opencascade.com" and "opencascade.org" or any other trademarks, trade names or domain names used or owned by the Initial Developer. -For greater certainty, it is expressly understood that You may freely create -Derivative Programs (without any obligation to publish such Derivative Program) -and distribute same as a single product. In such case, You must ensure that -all the requirements of this License are fulfilled for the Software or any -portion thereof. +11. Copyright +The Initial Developer retains all rights, title and interest in and to the Original Code. You may not remove the copyright © notice which appears when You download the Software. - 5. Your license +12. Term +This License is granted to You for a term equal to the remaining period of protection covered by the intellectual property rights applicable to the Original Code. -You hereby grant all Contributors and anyone who becomes a party under this -License a world-wide, non-exclusive, royalty-free and irrevocable license -under the Applicable Intellectual Property Rights owned or controlled by You, -to use, reproduce, modify, distribute and sublicense all Your Modifications -under the terms and conditions of this License. +13. Termination +In case of termination, as provided in Section 3 above, You agree to immediately stop any further use, reproduction, modification, distribution and sublicensing of the Software and to destroy all copies of the Software that are in Your possession or control. All sublicenses of the Software which have been properly granted prior to termination shall survive any termination of this License. In addition, Sections 5, 8 to 11, 13.2 and 15.2 of this License, in reason of their nature, shall survive the termination of this License for a period of fifteen (15) years. - 6. Software subject to license +14. Versions of the license +The Initial Developer may publish new versions of this License from time to time. Once Original Code has been published under a particular version of this License, You may choose to continue to use it under the terms and conditions of that version or use the Original Code under the terms of any subsequent version of this License published by the Initial Developer. -Your Modifications shall be governed by the terms and conditions of this License. -You are not authorized to impose any other terms or conditions than those -prevailing under this License when You distribute and/or sublicense the Software, -save and except as permitted under Section 7 hereof. +15. Miscellaneous + 15.1 Relationship of the Parties This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between You and the Initial Developer, and You will not represent to the contrary, whether expressly, by implication or otherwise. - 7. Additional terms + 15.2 Independent Development Nothing in this License will impair the Initial Developer's right to acquire, license, develop, have others develop for it, market or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Derivative Programs, technology or products that You may develop, produce, market or distribute. -You may choose to offer, on a non-exclusive basis, and to charge a fee for -any warranty, support, maintenance, liability obligations or other rights -consistent with the scope of this License with respect to the Software (the -"Additional Terms") to the recipients of the Software. However, You may do -so only on Your own behalf and on Your sole and exclusive responsibility. -You must obtain the recipient's agreement that any such Additional Terms are -offered by You alone, and You hereby agree to indemnify, defend and hold the -Initial Developer and any Contributor harmless for any liability incurred -by or claims asserted against the Initial Developer or any Contributors with -respect to any such Additional Terms. + 15.3 Severability If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and extent. - 8. Disclaimer of warranty +END OF THE TERMS AND CONDITIONS OF THIS LICENSE -The Software is provided under this License on an "as is" basis, without warranty -of any kind, including without limitation, warranties that the Software is -free of defects, merchantable, fit for a particular purpose or non-infringing. -The entire risk as to the quality and performance of the Software is with -You. - - 9. Liability - -Under no circumstances shall You, the Initial Developer or any Contributor -be liable to any person for any direct or indirect damages of any kind including, -without limitation, damages for loss of goodwill, loss of data, work stoppage, -computer failure or malfunction or any and all other commercial damages or -losses resulting from or relating to this License or indirectly to the use -of the Software. - - 10. Trademark - -This License does not grant any rights to use the trademarks, trade names -and domain names "MATRA", "EADS Matra Datavision", "CAS.CADE", "Open CASCADE", -"opencascade.com" and "opencascade.org" or any other trademarks, trade names -or domain names used or owned by the Initial Developer. - - 11. Copyright - -The Initial Developer retains all rights, title and interest in and to the -Original Code. You may not remove the copyright © notice which appears when -You download the Software. - - 12. Term - -This License is granted to You for a term equal to the remaining period of -protection covered by the intellectual property rights applicable to the Original -Code. - - 13. Termination - -In case of termination, as provided in Section 3 above, You agree to immediately -stop any further use, reproduction, modification, distribution and sublicensing -of the Software and to destroy all copies of the Software that are in Your -possession or control. All sublicenses of the Software which have been properly -granted prior to termination shall survive any termination of this License. -In addition, Sections 5, 8 to 11, 13.2 and 15.2 of this License, in reason -of their nature, shall survive the termination of this License for a period -of fifteen (15) years. - - 14. Versions of the license - -The Initial Developer may publish new versions of this License from time to -time. Once Original Code has been published under a particular version of -this License, You may choose to continue to use it under the terms and conditions -of that version or use the Original Code under the terms of any subsequent -version of this License published by the Initial Developer. - - 15. Miscellaneous - -15.1 Relationship of the Parties This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between You and the Initial Developer, and You will not represent to the contrary, -whether expressly, by implication or otherwise. - -15.2 Independent Development Nothing in this License will impair the Initial -Developer's right to acquire, license, develop, have others develop for it, -market or distribute technology or products that perform the same or similar -functions as, or otherwise compete with, Modifications, Derivative Programs, -technology or products that You may develop, produce, market or distribute. - -15.3 Severability If for any reason a court of competent jurisdiction finds -any provision of this License, or portion thereof, to be unenforceable, that -provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the remainder -of this License will continue in full force and extent. END OF THE TERMS AND -CONDITIONS OF THIS LICENSE - -OPEN CASCADE is a French société par actions simplifiée having its registered -head office at 1, place des Frères Montgolfier, 78280, Guyancourt, France -and main offices at 1, place des Frères Montgolfier, 78280, Guyancourt, France. -Its web site is located at the following address opencascade.com +OPEN CASCADE is a French société par actions simplifiée having its registered head office at 1, place des Frères Montgolfier, 78280, Guyancourt, France and main offices at 1, place des Frères Montgolfier, 78280, Guyancourt, France. Its web site is located at the following address opencascade.com Open CASCADE Technology Public License - Schedule "A" -The content of this file is subject to the Open CASCADE Technology Public -License (the "License"). You may not use the content of this file except in -compliance with the License. Please obtain a copy of the License at opencascade.com -and read it completely before using this file. + The content of this file is subject to the Open CASCADE Technology Public License (the "License"). You may not use the content of this file except in compliance with the License. Please obtain a copy of the License at opencascade.com and read it completely before using this file. -The Initial Developer of the Original Code is OPEN CASCADE, with main offices -at 1, place des Frères Montgolfier, 78280, Guyancourt, France. The Original -Code is copyright © OPEN CASCADE SAS, 2001. All rights reserved. "The Original -Code and all software distributed under the License are distributed on an -"AS IS" basis, without warranty of any kind, and the Initial Developer hereby -disclaims all such warranties, including without limitation, any warranties -of merchantability, fitness for a particular purpose or non-infringement. + The Initial Developer of the Original Code is OPEN CASCADE, with main offices at 1, place des Frères Montgolfier, 78280, Guyancourt, France. The Original Code is copyright © OPEN CASCADE SAS, 2001. All rights reserved. "The Original Code and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. -Please see the License for the specific terms and conditions governing rights -and limitations under the License". - -End of Schedule "A" + Please see the License for the specific terms and conditions governing rights and limitations under the License". + End of Schedule "A" Open CASCADE Technology Public License - Schedule "B" -"The content of this file is subject to the Open CASCADE Technology Public -License (the "License"). You may not use the content of this file except in -compliance with the License. Please obtain a copy of the License at opencascade.com -and read it completely before using this file. + "The content of this file is subject to the Open CASCADE Technology Public License (the "License"). You may not use the content of this file except in compliance with the License. Please obtain a copy of the License at opencascade.com and read it completely before using this file. -The Initial Developer of the Original Code is OPEN CASCADE, with main offices -at 1, place des Frères Montgolfier, 78280, Guyancourt, France. The Original -Code is copyright © Open CASCADE SAS, 2001. All rights reserved. + The Initial Developer of the Original Code is OPEN CASCADE, with main offices at 1, place des Frères Montgolfier, 78280, Guyancourt, France. The Original Code is copyright © Open CASCADE SAS, 2001. All rights reserved. -Modifications to the Original Code have been made by ________________________. -Modifications are copyright © [Year to be included]. All rights reserved. + Modifications to the Original Code have been made by ________________________. Modifications are copyright © [Year to be included]. All rights reserved. -The software Open CASCADE Technology and all software distributed under the -License are distributed on an "AS IS" basis, without warranty of any kind, -and the Initial Developer hereby disclaims all such warranties, including -without limitation, any warranties of merchantability, fitness for a particular -purpose or non-infringement. + The software Open CASCADE Technology and all software distributed under the License are distributed on an "AS IS" basis, without warranty of any kind, and the Initial Developer hereby disclaims all such warranties, including without limitation, any warranties of merchantability, fitness for a particular purpose or non-infringement. -Please see the License for the specific terms and conditions governing rights -and limitations under the License" - -End of Schedule "B" + Please see the License for the specific terms and conditions governing rights and limitations under the License" + End of Schedule "B" diff --git a/options/license/OCLC-2.0 b/options/license/OCLC-2.0 index 09cc2867b..ffb2f7f0b 100644 --- a/options/license/OCLC-2.0 +++ b/options/license/OCLC-2.0 @@ -1,202 +1,76 @@ OCLC Research Public License 2.0 - Terms & Conditions Of Use +May, 2002 +Copyright © 2002. OCLC Online Computer Library Center, Inc. All Rights Reserved -May, 2002 Copyright © 2002. OCLC Online Computer Library Center, Inc. All -Rights Reserved - -PLEASE READ THIS DOCUMENT CAREFULLY. BY DOWNLOADING OR USING THE CODE BASE -AND/OR DOCUMENTATION ACCOMPANYING THIS LICENSE (THE "License"), YOU AGREE -TO THE FOLLOWING TERMS AND CONDITIONS OF THIS LICENSE. +PLEASE READ THIS DOCUMENT CAREFULLY. BY DOWNLOADING OR USING THE CODE BASE AND/OR DOCUMENTATION ACCOMPANYING THIS LICENSE (THE "License"), YOU AGREE TO THE FOLLOWING TERMS AND CONDITIONS OF THIS LICENSE. Section 1. Your Rights -Subject to these terms and conditions of this License, the OCLC Office of -Research (the "Original Contributor") and each subsequent contributor (collectively -with the Original Contributor, the "Contributors") hereby grant you a non-exclusive, -worldwide, no-charge, transferable license to execute, prepare derivative -works of, and distribute (internally and externally), for commercial and noncommercial -purposes, the original code contributed by Original Contributor and all Modifications -(collectively called the "Program"). +Subject to these terms and conditions of this License, the OCLC Office of Research (the "Original Contributor") and each subsequent contributor (collectively with the Original Contributor, the "Contributors") hereby grant you a non-exclusive, worldwide, no-charge, transferable license to execute, prepare derivative works of, and distribute (internally and externally), for commercial and noncommercial purposes, the original code contributed by Original Contributor and all Modifications (collectively called the "Program"). Section 2. Definitions -A "Modification" to the Program is any addition to or deletion from the contents -of any file of the Program and any new file that contains any part of the -Program. If you make a Modification and distribute the Program externally -you are a "Contributor." The distribution of the Program must be under the -terms of this license including those in Section 3 below. +A "Modification" to the Program is any addition to or deletion from the contents of any file of the Program and any new file that contains any part of the Program. If you make a Modification and distribute the Program externally you are a "Contributor." The distribution of the Program must be under the terms of this license including those in Section 3 below. -A "Combined Work" results from combining and integrating all or parts of the -Program with other code. A Combined Work may be thought of as having multiple -parents or being result of multiple lines of code development. +A "Combined Work" results from combining and integrating all or parts of the Program with other code. A Combined Work may be thought of as having multiple parents or being result of multiple lines of code development. Section 3. Distribution Licensing Terms - A. General Requirements +A. General Requirements +Except as necessary to recognize third-party rights or third-party restriction (see below), a distribution of the Program in any of the forms listed below must not put any further restrictions on the recipient’s exercise of the rights granted herein. -Except as necessary to recognize third-party rights or third-party restriction -(see below), a distribution of the Program in any of the forms listed below -must not put any further restrictions on the recipient's exercise of the rights -granted herein. +As a Contributor, you represent that your Modification(s) are your original creation(s) and, to the best of your knowledge, no third party has any claim (including but not limited to intellectual property claims) relating to your Modification(s). You represent that each of your Modifications includes complete details of any third-party right or other third-party restriction associated with any part of your Modification (including a copy of any applicable license agreement). -As a Contributor, you represent that your Modification(s) are your original -creation(s) and, to the best of your knowledge, no third party has any claim -(including but not limited to intellectual property claims) relating to your -Modification(s). You represent that each of your Modifications includes complete -details of any third-party right or other third-party restriction associated -with any part of your Modification (including a copy of any applicable license -agreement). +The Program must be distributed without charge beyond the costs of physically transferring the files to the recipient. -The Program must be distributed without charge beyond the costs of physically -transferring the files to the recipient. +This Warranty Disclaimer/Limitation of Liability must be prominently displayed with every distribution of the Program in any form: -This Warranty Disclaimer/Limitation of Liability must be prominently displayed -with every distribution of the Program in any form: +YOU AGREE THAT THE PROGRAM IS PROVIDED AS-IS, WITHOUT WARRANTY OF ANY KIND (EITHER EXPRESS OR IMPLIED). ACCORDINGLY, OCLC MAKES NO WARRANTIES, REPRESENTATIONS OR GUARANTEES, EITHER EXPRESS OR IMPLIED, AND DISCLAIMS ALL SUCH WARRANTIES, REPRESENTATIONS OR GUARANTEES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE, AS TO: (A) THE FUNCTIONALITY OR NONINFRINGEMENT OF PROGRAM, ANY MODIFICATION, A COMBINED WORK OR AN AGGREGATE WORK; OR (B) THE RESULTS OF ANY PROJECT UNDERTAKEN USING THE PROGRAM, ANY MODIFICATION, A COMBINED WORK OR AN AGGREGATE WORK. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, CONSEQUENTIAL OR ANY OTHER DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE PROGRAM, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. YOU HEREBY WAIVE ANY CLAIMS FOR DAMAGES OF ANY KIND AGAINST CONTRIBUTORS WHICH MAY RESULT FROM YOUR USE OF THE PROGRAM. -YOU AGREE THAT THE PROGRAM IS PROVIDED AS-IS, WITHOUT WARRANTY OF ANY KIND -(EITHER EXPRESS OR IMPLIED). ACCORDINGLY, OCLC MAKES NO WARRANTIES, REPRESENTATIONS -OR GUARANTEES, EITHER EXPRESS OR IMPLIED, AND DISCLAIMS ALL SUCH WARRANTIES, -REPRESENTATIONS OR GUARANTEES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE, AS TO: -(A) THE FUNCTIONALITY OR NONINFRINGEMENT OF PROGRAM, ANY MODIFICATION, A COMBINED -WORK OR AN AGGREGATE WORK; OR (B) THE RESULTS OF ANY PROJECT UNDERTAKEN USING -THE PROGRAM, ANY MODIFICATION, A COMBINED WORK OR AN AGGREGATE WORK. IN NO -EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, CONSEQUENTIAL OR ANY OTHER DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THE PROGRAM, EVEN IF ADVISED -OF THE POSSIBILITY OF SUCH DAMAGES. YOU HEREBY WAIVE ANY CLAIMS FOR DAMAGES -OF ANY KIND AGAINST CONTRIBUTORS WHICH MAY RESULT FROM YOUR USE OF THE PROGRAM. +B. Requirements for a Distribution of Modifiable Code +If you distribute the Program in a form to which the recipient can make Modifications (e.g. source code), the terms of this license apply to use by recipient. In addition, each source and data file of the Program and any Modification you distribute must contain the following notice: - B. Requirements for a Distribution of Modifiable Code + "Copyright (c) 2000- (insert then current year) OCLC Online Computer Library Center, Inc. and other contributors. All rights reserved. The contents of this file, as updated from time to time by the OCLC Office of Research, are subject to OCLC Research Public License Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a current copy of the License at http://purl.oclc.org/oclc/research/ORPL/. Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. This software consists of voluntary contributions made by many individuals on behalf of OCLC Research. For more information on OCLC Research, please see http://www.oclc.org/research/. The Original Code is ______________________________. The Initial Developer of the Original Code is ________________________. Portions created by ______________________ are Copyright (C) _____ _______________________. All Rights Reserved. Contributor(s): ______________________________________." -If you distribute the Program in a form to which the recipient can make Modifications -(e.g. source code), the terms of this license apply to use by recipient. In -addition, each source and data file of the Program and any Modification you -distribute must contain the following notice: +C. Requirements for a Distribution of Non-modifiable Code +If you distribute the Program in a form to which the recipient cannot make Modifications (e.g. object code), the terms of this license apply to use by recipient and you must include the following statement in appropriate and conspicuous locations: -"Copyright (c) 2000- (insert then current year) OCLC Online Computer Library -Center, Inc. and other contributors . All rights reserved. The contents of -this file, as updated from time to time by the OCLC Office of Research, are -subject to OCLC Research Public License Version 2.0 (the "License"); you may -not use this file except in compliance with the License. You may obtain a -current copy of the License at http://purl.oclc.org/oclc/research/ORPL/. Software -distributed under the License is distributed on an "AS IS" basis, WITHOUT -WARRANTY OF ANY KIND, either express or implied. See the License for the specific -language governing rights and limitations under the License. This software -consists of voluntary contributions made by many individuals on behalf of -OCLC Research. For more information on OCLC Research, please see http://www.oclc.org/research/. -The Original Code is ______________________________ . The Initial Developer -of the Original Code is ________________________ . Portions created by ______________________ -are Copyright (C) ____________________________ . All Rights Reserved. Contributor(s): -______________________________________ ." +"Copyright (c) 2000- (insert then current year) OCLC Online Computer Library Center, Inc. and other contributors. All rights reserved." - C. Requirements for a Distribution of Non-modifiable Code +In addition, the source code must be included with the object code distribution or the distributor must provide the source code to the recipient upon request. -If you distribute the Program in a form to which the recipient cannot make -Modifications (e.g. object code), the terms of this license apply to use by -recipient and you must include the following statement in appropriate and -conspicuous locations: +D. Requirements for a Combined Work Distribution +Distributions of Combined Works are subject to the terms of this license and must be made at no charge to the recipient beyond the costs of physically transferring the files to recipient. -"Copyright (c) 2000- (insert then current year) OCLC Online Computer Library -Center, Inc. and other contributors. All rights reserved." +A Combined Work may be distributed as either modifiable or non-modifiable code. The requirements of Section 3.B or 3.C above (as appropriate) apply to such distributions. -In addition, the source code must be included with the object code distribution -or the distributor must provide the source code to the recipient upon request. +An "Aggregate Work" is when the Program exists, without integration, with other programs on a storage medium. This License does not apply to portions of an Aggregate Work which are not covered by the definition of "Program" provided in this License. You are not forbidden from selling an Aggregate Work. However, the Program contained in an Aggregate Work is subject to this License. Also, should the Program be extracted from an Aggregate Work, this License applies to any use of the Program apart from the Aggregate Work. - D. Requirements for a Combined Work Distribution +Section 4. License Grant -Distributions of Combined Works are subject to the terms of this license and -must be made at no charge to the recipient beyond the costs of physically -transferring the files to recipient. - -A Combined Work may be distributed as either modifiable or non-modifiable -code. The requirements of Section 3.B or 3.C above (as appropriate) apply -to such distributions. - -An "Aggregate Work" is when the Program exists, without integration, with -other programs on a storage medium. This License does not apply to portions -of an Aggregate Work which are not covered by the definition of "Program" -provided in this License. You are not forbidden from selling an Aggregate -Work. However, the Program contained in an Aggregate Work is subject to this -License. Also, should the Program be extracted from an Aggregate Work, this -License applies to any use of the Program apart from the Aggregate Work. - - Section 4. License Grant - -For purposes of permitting use of your Modifications by OCLC and other licensees -hereunder, you hereby grant to OCLC and such other licensees the non-exclusive, -worldwide, royalty-free, transferable, sublicenseable license to execute, -copy, alter, delete, modify, adapt, change, revise, enhance, develop, publicly -display, distribute (internally and externally) and/or create derivative works -based on your Modifications (and derivative works thereof) in accordance with -these Terms. This Section 4 shall survive termination of this License for -any reason. +For purposes of permitting use of your Modifications by OCLC and other licensees hereunder, you hereby grant to OCLC and such other licensees the non-exclusive, worldwide, royalty-free, transferable, sublicenseable license to execute, copy, alter, delete, modify, adapt, change, revise, enhance, develop, publicly display, distribute (internally and externally) and/or create derivative works based on your Modifications (and derivative works thereof) in accordance with these Terms. This Section 4 shall survive termination of this License for any reason. Section 5. Termination of Rights -This non-exclusive license (with respect to the grant from a particular Contributor) -automatically terminates for any entity that initiates legal action for intellectual -property infringement (with respect to the Program) against such Contributor -as of the initiation of such action. +This non-exclusive license (with respect to the grant from a particular Contributor) automatically terminates for any entity that initiates legal action for intellectual property infringement (with respect to the Program) against such Contributor as of the initiation of such action. -If you fail to comply with this License, your rights (but not your obligations) -under this License shall terminate automatically unless you cure such breach -within thirty (30) days of becoming aware of the noncompliance. All sublicenses -granted by you which preexist such termination and are properly granted shall -survive such termination. +If you fail to comply with this License, your rights (but not your obligations) under this License shall terminate automatically unless you cure such breach within thirty (30) days of becoming aware of the noncompliance. All sublicenses granted by you which preexist such termination and are properly granted shall survive such termination. Section 6. Other Terms -Except for the copyright notices required above, you may not use any trademark -of any of the Contributors without the prior written consent of the relevant -Contributor. You agree not to remove, alter or obscure any copyright or other -proprietary rights notice contained in the Program. +Except for the copyright notices required above, you may not use any trademark of any of the Contributors without the prior written consent of the relevant Contributor. You agree not to remove, alter or obscure any copyright or other proprietary rights notice contained in the Program. -All transfers of the Program or any part thereof shall be made in compliance -with U.S. import/export regulations or other restrictions of the U.S. Department -of Commerce, as well as other similar trade or commerce restrictions which -might apply. +All transfers of the Program or any part thereof shall be made in compliance with U.S. import/export regulations or other restrictions of the U.S. Department of Commerce, as well as other similar trade or commerce restrictions which might apply. -Any patent obtained by any party covering the Program or any part thereof -must include a provision providing for the free, perpetual and unrestricted -commercial and noncommercial use by any third party. +Any patent obtained by any party covering the Program or any part thereof must include a provision providing for the free, perpetual and unrestricted commercial and noncommercial use by any third party. -If, as a consequence of a court judgment or settlement relating to intellectual -property infringement or any other cause of action, conditions are imposed -on you that contradict the conditions of this License, such conditions do -not excuse you from compliance with this License. If you cannot distribute -the Program so as to simultaneously satisfy your obligations under this License -and such other conditions, you may not distribute the Program at all. For -example, if a patent license would not permit royalty-free redistribution -of the Program by all those who receive copies directly or indirectly through -you, you could not satisfy both the patent license and this License, and you -would be required to refrain entirely from distribution of the Program. +If, as a consequence of a court judgment or settlement relating to intellectual property infringement or any other cause of action, conditions are imposed on you that contradict the conditions of this License, such conditions do not excuse you from compliance with this License. If you cannot distribute the Program so as to simultaneously satisfy your obligations under this License and such other conditions, you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, you could not satisfy both the patent license and this License, and you would be required to refrain entirely from distribution of the Program. -If you learn of a third party claim or other restriction relating to a Program -you have already distributed you shall promptly redo your Program to address -the issue and take all reasonable steps to inform those who may have received -the Program at issue. An example of an appropriate reasonable step to inform -would be posting an announcement on an appropriate web bulletin board. +If you learn of a third party claim or other restriction relating to a Program you have already distributed you shall promptly redo your Program to address the issue and take all reasonable steps to inform those who may have received the Program at issue. An example of an appropriate reasonable step to inform would be posting an announcement on an appropriate web bulletin board. -The provisions of this License are deemed to be severable, and the invalidity -or unenforceability of any provision shall not affect or impair the remaining -provisions which shall continue in full force and effect. In substitution -for any provision held unlawful, there shall be substituted a provision of -similar import reflecting the original intent of the parties hereto to the -extent permissible under law. +The provisions of this License are deemed to be severable, and the invalidity or unenforceability of any provision shall not affect or impair the remaining provisions which shall continue in full force and effect. In substitution for any provision held unlawful, there shall be substituted a provision of similar import reflecting the original intent of the parties hereto to the extent permissible under law. -The Original Contributor from time to time may change this License, and the -amended license will apply to all copies of the Program downloaded after the -new license is posted. This License grants only the rights expressly stated -herein and provides you with no implied rights or licenses to the intellectual -property of any Contributor. +The Original Contributor from time to time may change this License, and the amended license will apply to all copies of the Program downloaded after the new license is posted. This License grants only the rights expressly stated herein and provides you with no implied rights or licenses to the intellectual property of any Contributor. -This License is the complete and exclusive statement of the agreement between -the parties concerning the subject matter hereof and may not be amended except -by the written agreement of the parties. This License shall be governed by -and construed in accordance with the laws of the State of Ohio and the United -States of America, without regard to principles of conflicts of law. +This License is the complete and exclusive statement of the agreement between the parties concerning the subject matter hereof and may not be amended except by the written agreement of the parties. This License shall be governed by and construed in accordance with the laws of the State of Ohio and the United States of America, without regard to principles of conflicts of law. diff --git a/options/license/OCaml-LGPL-linking-exception b/options/license/OCaml-LGPL-linking-exception index cee7a4df4..7fc88d730 100644 --- a/options/license/OCaml-LGPL-linking-exception +++ b/options/license/OCaml-LGPL-linking-exception @@ -1,3 +1 @@ -OCaml LGPL Linking Exception - -As a special exception to the GNU Lesser General Public License, you may link, statically or dynamically, a "work that uses the OCaml Core System " with a publicly distributed version of the OCaml Core System to produce an executable file containing portions of the OCaml Core System , and distribute that executable file under terms of your choice, without any of the additional requirements listed in clause 6 of the GNU Lesser General Public License. By "a publicly distributed version of the OCaml Core System ", we mean either the unmodified OCaml Core System as distributed by INRIA , or a modified version of the OCaml Core System that is distributed under the conditions defined in clause 2 of the GNU Lesser General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License. +As a special exception to the GNU Lesser General Public License, you may link, statically or dynamically, a "work that uses the OCaml Core System" with a publicly distributed version of the OCaml Core System to produce an executable file containing portions of the OCaml Core System, and distribute that executable file under terms of your choice, without any of the additional requirements listed in clause 6 of the GNU Lesser General Public License. By "a publicly distributed version of the OCaml Core System", we mean either the unmodified OCaml Core System as distributed by INRIA, or a modified version of the OCaml Core System that is distributed under the conditions defined in clause 2 of the GNU Lesser General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU Lesser General Public License. diff --git a/options/license/ODC-By-1.0 b/options/license/ODC-By-1.0 index 733e5d7ed..15115ca9c 100644 --- a/options/license/ODC-By-1.0 +++ b/options/license/ODC-By-1.0 @@ -1,24 +1,12 @@ -## +# ODC Attribution License (ODC-By) -ODC Attribution License (ODC-By) ### +### Preamble -Preamble +The Open Data Commons Attribution License is a license agreement intended to allow users to freely share, modify, and use this Database subject only to the attribution requirements set out in Section 4. -The Open Data Commons Attribution License is a license agreement intended -to allow users to freely share, modify, and use this Database subject only -to the attribution requirements set out in Section 4. +Databases can contain a wide variety of types of content (images, audiovisual material, and sounds all in the same database, for example), and so this license only governs the rights over the Database, and not the contents of the Database individually. Licensors may therefore wish to use this license together with another license for the contents. -Databases can contain a wide variety of types of content (images, audiovisual -material, and sounds all in the same database, for example), and so this license -only governs the rights over the Database, and not the contents of the Database -individually. Licensors may therefore wish to use this license together with -another license for the contents. - -Sometimes the contents of a database, or the database itself, can be covered -by other rights not addressed here (such as private contracts, trademark over -the name, or privacy rights / data protection rights over information in the -contents), and so you are advised that you may have to consult other documents -or clear other rights before doing activities not covered by this License. +Sometimes the contents of a database, or the database itself, can be covered by other rights not addressed here (such as private contracts, trademark over the name, or privacy rights / data protection rights over information in the contents), and so you are advised that you may have to consult other documents or clear other rights before doing activities not covered by this License. ------ @@ -30,369 +18,178 @@ You (as defined below) agree as follows: - 1.0 Definitions of Capitalised Words +### 1.0 Definitions of Capitalised Words -"Collective Database" - Means this Database in unmodified form as part of -a collection of independent databases in themselves that together are assembled -into a collective whole. A work that constitutes a Collective Database will -not be considered a Derivative Database. +"Collective Database" – Means this Database in unmodified form as part of a collection of independent databases in themselves that together are assembled into a collective whole. A work that constitutes a Collective Database will not be considered a Derivative Database. -"Convey" - As a verb, means Using the Database, a Derivative Database, or -the Database as part of a Collective Database in any way that enables a Person -to make or receive copies of the Database or a Derivative Database. Conveying -does not include interaction with a user through a computer network, or creating -and Using a Produced Work, where no transfer of a copy of the Database or -a Derivative Database occurs. +"Convey" – As a verb, means Using the Database, a Derivative Database, or the Database as part of a Collective Database in any way that enables a Person to make or receive copies of the Database or a Derivative Database. Conveying does not include interaction with a user through a computer network, or creating and Using a Produced Work, where no transfer of a copy of the Database or a Derivative Database occurs. -"Contents" - The contents of this Database, which includes the information, -independent works, or other material collected into the Database. For example, -the contents of the Database could be factual data or works such as images, -audiovisual material, text, or sounds. +"Contents" – The contents of this Database, which includes the information, independent works, or other material collected into the Database. For example, the contents of the Database could be factual data or works such as images, audiovisual material, text, or sounds. -"Database" - A collection of material (the Contents) arranged in a systematic -or methodical way and individually accessible by electronic or other means -offered under the terms of this License. +"Database" – A collection of material (the Contents) arranged in a systematic or methodical way and individually accessible by electronic or other means offered under the terms of this License. -"Database Directive" - Means Directive 96/9/EC of the European Parliament -and of the Council of 11 March 1996 on the legal protection of databases, -as amended or succeeded. +"Database Directive" – Means Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended or succeeded. -"Database Right" - Means rights resulting from the Chapter III ("sui generis") -rights in the Database Directive (as amended and as transposed by member states), -which includes the Extraction and Re-utilisation of the whole or a Substantial -part of the Contents, as well as any similar rights available in the relevant -jurisdiction under Section 10.4. +"Database Right" – Means rights resulting from the Chapter III ("sui generis") rights in the Database Directive (as amended and as transposed by member states), which includes the Extraction and Re-utilisation of the whole or a Substantial part of the Contents, as well as any similar rights available in the relevant jurisdiction under Section 10.4. -"Derivative Database" - Means a database based upon the Database, and includes -any translation, adaptation, arrangement, modification, or any other alteration -of the Database or of a Substantial part of the Contents. This includes, but -is not limited to, Extracting or Re-utilising the whole or a Substantial part -of the Contents in a new Database. +"Derivative Database" – Means a database based upon the Database, and includes any translation, adaptation, arrangement, modification, or any other alteration of the Database or of a Substantial part of the Contents. This includes, but is not limited to, Extracting or Re-utilising the whole or a Substantial part of the Contents in a new Database. -"Extraction" - Means the permanent or temporary transfer of all or a Substantial -part of the Contents to another medium by any means or in any form. - -"License" - Means this license agreement and is both a license of rights such -as copyright and Database Rights and an agreement in contract. +"Extraction" – Means the permanent or temporary transfer of all or a Substantial part of the Contents to another medium by any means or in any form. -"Licensor" - Means the Person that offers the Database under the terms of -this License. +"License" – Means this license agreement and is both a license of rights such as copyright and Database Rights and an agreement in contract. -"Person" - Means a natural or legal person or a body of persons corporate -or incorporate. +"Licensor" – Means the Person that offers the Database under the terms of this License. -"Produced Work" - a work (such as an image, audiovisual material, text, or -sounds) resulting from using the whole or a Substantial part of the Contents -(via a search or other query) from this Database, a Derivative Database, or -this Database as part of a Collective Database. +"Person" – Means a natural or legal person or a body of persons corporate or incorporate. -"Publicly" - means to Persons other than You or under Your control by either -more than 50% ownership or by the power to direct their activities (such as -contracting with an independent consultant). +"Produced Work" – a work (such as an image, audiovisual material, text, or sounds) resulting from using the whole or a Substantial part of the Contents (via a search or other query) from this Database, a Derivative Database, or this Database as part of a Collective Database. -"Re-utilisation" - means any form of making available to the public all or -a Substantial part of the Contents by the distribution of copies, by renting, -by online or other forms of transmission. +"Publicly" – means to Persons other than You or under Your control by either more than 50% ownership or by the power to direct their activities (such as contracting with an independent consultant). -"Substantial" - Means substantial in terms of quantity or quality or a combination -of both. The repeated and systematic Extraction or Re-utilisation of insubstantial -parts of the Contents may amount to the Extraction or Re-utilisation of a -Substantial part of the Contents. +"Re-utilisation" – means any form of making available to the public all or a Substantial part of the Contents by the distribution of copies, by renting, by online or other forms of transmission. -"Use" - As a verb, means doing any act that is restricted by copyright or -Database Rights whether in the original medium or any other; and includes -without limitation distributing, copying, publicly performing, publicly displaying, -and preparing derivative works of the Database, as well as modifying the Database -as may be technically necessary to use it in a different mode or format. +"Substantial" – Means substantial in terms of quantity or quality or a combination of both. The repeated and systematic Extraction or Re-utilisation of insubstantial parts of the Contents may amount to the Extraction or Re-utilisation of a Substantial part of the Contents. -"You" - Means a Person exercising rights under this License who has not previously -violated the terms of this License with respect to the Database, or who has -received express permission from the Licensor to exercise rights under this -License despite a previous violation. +"Use" – As a verb, means doing any act that is restricted by copyright or Database Rights whether in the original medium or any other; and includes without limitation distributing, copying, publicly performing, publicly displaying, and preparing derivative works of the Database, as well as modifying the Database as may be technically necessary to use it in a different mode or format. - Words in the singular include the plural and vice versa. +"You" – Means a Person exercising rights under this License who has not previously violated the terms of this License with respect to the Database, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. - 2.0 What this License covers +Words in the singular include the plural and vice versa. - 2.1. Legal effect of this document. This License is: +### 2.0 What this License covers - a. A license of applicable copyright and neighbouring rights; +2.1. Legal effect of this document. This License is: - b. A license of the Database Right; and + a. A license of applicable copyright and neighbouring rights; - c. An agreement in contract between You and the Licensor. + b. A license of the Database Right; and -2.2 Legal rights covered. This License covers the legal rights in the Database, -including: + c. An agreement in contract between You and the Licensor. -a. Copyright. Any copyright or neighbouring rights in the Database. The copyright -licensed includes any individual elements of the Database, but does not cover -the copyright over the Contents independent of this Database. See Section -2.4 for details. Copyright law varies between jurisdictions, but is likely -to cover: the Database model or schema, which is the structure, arrangement, -and organisation of the Database, and can also include the Database tables -and table indexes; the data entry and output sheets; and the Field names of -Contents stored in the Database; +2.2 Legal rights covered. This License covers the legal rights in the Database, including: -b. Database Rights. Database Rights only extend to the Extraction and Re-utilisation -of the whole or a Substantial part of the Contents. Database Rights can apply -even when there is no copyright over the Database. Database Rights can also -apply when the Contents are removed from the Database and are selected and -arranged in a way that would not infringe any applicable copyright; and + a. Copyright. Any copyright or neighbouring rights in the Database. The copyright licensed includes any individual elements of the Database, but does not cover the copyright over the Contents independent of this Database. See Section 2.4 for details. Copyright law varies between jurisdictions, but is likely to cover: the Database model or schema, which is the structure, arrangement, and organisation of the Database, and can also include the Database tables and table indexes; the data entry and output sheets; and the Field names of Contents stored in the Database; -c. Contract. This is an agreement between You and the Licensor for access -to the Database. In return you agree to certain conditions of use on this -access as outlined in this License. + b. Database Rights. Database Rights only extend to the Extraction and Re-utilisation of the whole or a Substantial part of the Contents. Database Rights can apply even when there is no copyright over the Database. Database Rights can also apply when the Contents are removed from the Database and are selected and arranged in a way that would not infringe any applicable copyright; and - 2.3 Rights not covered. + c. Contract. This is an agreement between You and the Licensor for access to the Database. In return you agree to certain conditions of use on this access as outlined in this License. -a. This License does not apply to computer programs used in the making or -operation of the Database; +2.3 Rights not covered. -b. This License does not cover any patents over the Contents or the Database; -and + a. This License does not apply to computer programs used in the making or operation of the Database; -c. This License does not cover any trademarks associated with the Database. + b. This License does not cover any patents over the Contents or the Database; and -2.4 Relationship to Contents in the Database. The individual items of the -Contents contained in this Database may be covered by other rights, including -copyright, patent, data protection, privacy, or personality rights, and this -License does not cover any rights (other than Database Rights or in contract) -in individual Contents contained in the Database. For example, if used on -a Database of images (the Contents), this License would not apply to copyright -over individual images, which could have their own separate licenses, or one -single license covering all of the rights over the images. + c. This License does not cover any trademarks associated with the Database. - 3.0 Rights granted +2.4 Relationship to Contents in the Database. The individual items of the Contents contained in this Database may be covered by other rights, including copyright, patent, data protection, privacy, or personality rights, and this License does not cover any rights (other than Database Rights or in contract) in individual Contents contained in the Database. For example, if used on a Database of images (the Contents), this License would not apply to copyright over individual images, which could have their own separate licenses, or one single license covering all of the rights over the images. -3.1 Subject to the terms and conditions of this License, the Licensor grants -to You a worldwide, royalty-free, non-exclusive, terminable (but only under -Section 9) license to Use the Database for the duration of any applicable -copyright and Database Rights. These rights explicitly include commercial -use, and do not exclude any field of endeavour. To the extent possible in -the relevant jurisdiction, these rights may be exercised in all media and -formats whether now known or created in the future. +### 3.0 Rights granted - The rights granted cover, for example: +3.1 Subject to the terms and conditions of this License, the Licensor grants to You a worldwide, royalty-free, non-exclusive, terminable (but only under Section 9) license to Use the Database for the duration of any applicable copyright and Database Rights. These rights explicitly include commercial use, and do not exclude any field of endeavour. To the extent possible in the relevant jurisdiction, these rights may be exercised in all media and formats whether now known or created in the future. -a. Extraction and Re-utilisation of the whole or a Substantial part of the -Contents; +The rights granted cover, for example: - b. Creation of Derivative Databases; + a. Extraction and Re-utilisation of the whole or a Substantial part of the Contents; - c. Creation of Collective Databases; + b. Creation of Derivative Databases; -d. Creation of temporary or permanent reproductions by any means and in any -form, in whole or in part, including of any Derivative Databases or as a part -of Collective Databases; and + c. Creation of Collective Databases; -e. Distribution, communication, display, lending, making available, or performance -to the public by any means and in any form, in whole or in part, including -of any Derivative Database or as a part of Collective Databases. + d. Creation of temporary or permanent reproductions by any means and in any form, in whole or in part, including of any Derivative Databases or as a part of Collective Databases; and - 3.2 Compulsory license schemes. For the avoidance of doubt: + e. Distribution, communication, display, lending, making available, or performance to the public by any means and in any form, in whole or in part, including of any Derivative Database or as a part of Collective Databases. -a. Non-waivable compulsory license schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; +3.2 Compulsory license schemes. For the avoidance of doubt: -b. Waivable compulsory license schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor waives the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License; and, + a. Non-waivable compulsory license schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; -c. Voluntary license schemes. The Licensor waives the right to collect royalties, -whether individually or, in the event that the Licensor is a member of a collecting -society that administers voluntary licensing schemes, via that society, from -any exercise by You of the rights granted under this License. + b. Waivable compulsory license schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and, -3.3 The right to release the Database under different terms, or to stop distributing -or making available the Database, is reserved. Note that this Database may -be multiple-licensed, and so You may have the choice of using alternative -licenses for this Database. Subject to Section 10.4, all other rights not -expressly granted by Licensor are reserved. + c. Voluntary license schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License. - 4.0 Conditions of Use +3.3 The right to release the Database under different terms, or to stop distributing or making available the Database, is reserved. Note that this Database may be multiple-licensed, and so You may have the choice of using alternative licenses for this Database. Subject to Section 10.4, all other rights not expressly granted by Licensor are reserved. -4.1 The rights granted in Section 3 above are expressly made subject to Your -complying with the following conditions of use. These are important conditions -of this License, and if You fail to follow them, You will be in material breach -of its terms. - -4.2 Notices. If You Publicly Convey this Database, any Derivative Database, -or the Database as part of a Collective Database, then You must: - - a. Do so only under the terms of this License; - -b. Include a copy of this License or its Uniform Resource Identifier (URI) -with the Database or Derivative Database, including both in the Database or -Derivative Database and in any relevant documentation; - -c. Keep intact any copyright or Database Right notices and notices that refer -to this License; and - -d. If it is not possible to put the required notices in a particular file -due to its structure, then You must include the notices in a location (such -as a relevant directory) where users would be likely to look for it. - -4.3 Notice for using output (Contents). Creating and Using a Produced Work -does not require the notice in Section 4.2. However, if you Publicly Use a -Produced Work, You must include a notice associated with the Produced Work -reasonably calculated to make any Person that uses, views, accesses, interacts -with, or is otherwise exposed to the Produced Work aware that Content was -obtained from the Database, Derivative Database, or the Database as part of -a Collective Database, and that it is available under this License. - -a. Example notice. The following text will satisfy notice under Section 4.3: - -Contains information from DATABASE NAME which is made available under the -ODC Attribution License. - -DATABASE NAME should be replaced with the name of the Database and a hyperlink -to the location of the Database. "ODC Attribution License" should contain -a hyperlink to the URI of the text of this License. If hyperlinks are not -possible, You should include the plain text of the required URI's with the -above notice. - -4.4 Licensing of others. You may not sublicense the Database. Each time You -communicate the Database, the whole or Substantial part of the Contents, or -any Derivative Database to anyone else in any way, the Licensor offers to -the recipient a license to the Database on the same terms and conditions as -this License. You are not responsible for enforcing compliance by third parties -with this License, but You may enforce any rights that You have over a Derivative -Database. You are solely responsible for any modifications of a Derivative -Database made by You or another Person at Your direction. You may not impose -any further restrictions on the exercise of the rights granted or affirmed -under this License. - - 5.0 Moral rights - -5.1 Moral rights. This section covers moral rights, including any rights to -be identified as the author of the Database or to object to treatment that -would otherwise prejudice the author's honour and reputation, or any other -derogatory treatment: - -a. For jurisdictions allowing waiver of moral rights, Licensor waives all -moral rights that Licensor may have in the Database to the fullest extent -possible by the law of the relevant jurisdiction under Section 10.4; - -b. If waiver of moral rights under Section 5.1 a in the relevant jurisdiction -is not possible, Licensor agrees not to assert any moral rights over the Database -and waives all claims in moral rights to the fullest extent possible by the -law of the relevant jurisdiction under Section 10.4; and - -c. For jurisdictions not allowing waiver or an agreement not to assert moral -rights under Section 5.1 a and b, the author may retain their moral rights -over certain aspects of the Database. - -Please note that some jurisdictions do not allow for the waiver of moral rights, -and so moral rights may still subsist over the Database in some jurisdictions. - - 6.0 Fair dealing, Database exceptions, and other rights not affected - -6.1 This License does not affect any rights that You or anyone else may independently -have under any applicable law to make any use of this Database, including -without limitation: - -a. Exceptions to the Database Right including: Extraction of Contents from -non-electronic Databases for private purposes, Extraction for purposes of -illustration for teaching or scientific research, and Extraction or Re-utilisation -for public security or an administrative or judicial procedure. - -b. Fair dealing, fair use, or any other legally recognised limitation or exception -to infringement of copyright or other applicable laws. - -6.2 This License does not affect any rights of lawful users to Extract and -Re-utilise insubstantial parts of the Contents, evaluated quantitatively or -qualitatively, for any purposes whatsoever, including creating a Derivative -Database (subject to other rights over the Contents, see Section 2.4). The -repeated and systematic Extraction or Re-utilisation of insubstantial parts -of the Contents may however amount to the Extraction or Re-utilisation of -a Substantial part of the Contents. - - 7.0 Warranties and Disclaimer - -7.1 The Database is licensed by the Licensor "as is" and without any warranty -of any kind, either express, implied, or arising by statute, custom, course -of dealing, or trade usage. Licensor specifically disclaims any and all implied -warranties or conditions of title, non-infringement, accuracy or completeness, -the presence or absence of errors, fitness for a particular purpose, merchantability, -or otherwise. Some jurisdictions do not allow the exclusion of implied warranties, -so this exclusion may not apply to You. - - 8.0 Limitation of liability - -8.1 Subject to any liability that may not be excluded or limited by law, the -Licensor is not liable for, and expressly excludes, all liability for loss -or damage however and whenever caused to anyone by any use under this License, -whether by You or by anyone else, and whether caused by any fault on the part -of the Licensor or not. This exclusion of liability includes, but is not limited -to, any special, incidental, consequential, punitive, or exemplary damages -such as loss of revenue, data, anticipated profits, and lost business. This -exclusion applies even if the Licensor has been advised of the possibility -of such damages. - -8.2 If liability may not be excluded by law, it is limited to actual and direct -financial loss to the extent it is caused by proved negligence on the part -of the Licensor. - - 9.0 Termination of Your rights under this License - -9.1 Any breach by You of the terms and conditions of this License automatically -terminates this License with immediate effect and without notice to You. For -the avoidance of doubt, Persons who have received the Database, the whole -or a Substantial part of the Contents, Derivative Databases, or the Database -as part of a Collective Database from You under this License will not have -their licenses terminated provided their use is in full compliance with this -License or a license granted under Section 4.8 of this License. Sections 1, -2, 7, 8, 9 and 10 will survive any termination of this License. - -9.2 If You are not in breach of the terms of this License, the Licensor will -not terminate Your rights under it. - -9.3 Unless terminated under Section 9.1, this License is granted to You for -the duration of applicable rights in the Database. - -9.4 Reinstatement of rights. If you cease any breach of the terms and conditions -of this License, then your full rights under this License will be reinstated: - -a. Provisionally and subject to permanent termination until the 60th day after -cessation of breach; - -b. Permanently on the 60th day after cessation of breach unless otherwise -reasonably notified by the Licensor; or - -c. Permanently if reasonably notified by the Licensor of the violation, this -is the first time You have received notice of violation of this License from -the Licensor, and You cure the violation prior to 30 days after your receipt -of the notice. - -9.5 Notwithstanding the above, Licensor reserves the right to release the -Database under different license terms or to stop distributing or making available -the Database. Releasing the Database under different license terms or stopping -the distribution of the Database will not withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. - - 10.0 General - -10.1 If any provision of this License is held to be invalid or unenforceable, -that must not affect the validity or enforceability of the remainder of the -terms and conditions of this License and each remaining provision of this -License shall be valid and enforced to the fullest extent permitted by law. - -10.2 This License is the entire agreement between the parties with respect -to the rights granted here over the Database. It replaces any earlier understandings, -agreements or representations with respect to the Database. - -10.3 If You are in breach of the terms of this License, You will not be entitled -to rely on the terms of this License or to complain of any breach by the Licensor. - -10.4 Choice of law. This License takes effect in and will be governed by the -laws of the relevant jurisdiction in which the License terms are sought to -be enforced. If the standard suite of rights granted under applicable copyright -law and Database Rights in the relevant jurisdiction includes additional rights -not granted under this License, these additional rights are granted in this -License in order to meet the terms of this License. +### 4.0 Conditions of Use + +4.1 The rights granted in Section 3 above are expressly made subject to Your complying with the following conditions of use. These are important conditions of this License, and if You fail to follow them, You will be in material breach of its terms. + +4.2 Notices. If You Publicly Convey this Database, any Derivative Database, or the Database as part of a Collective Database, then You must: + + a. Do so only under the terms of this License; + + b. Include a copy of this License or its Uniform Resource Identifier (URI) with the Database or Derivative Database, including both in the Database or Derivative Database and in any relevant documentation; + + c. Keep intact any copyright or Database Right notices and notices that refer to this License; and + + d. If it is not possible to put the required notices in a particular file due to its structure, then You must include the notices in a location (such as a relevant directory) where users would be likely to look for it. + +4.3 Notice for using output (Contents). Creating and Using a Produced Work does not require the notice in Section 4.2. However, if you Publicly Use a Produced Work, You must include a notice associated with the Produced Work reasonably calculated to make any Person that uses, views, accesses, interacts with, or is otherwise exposed to the Produced Work aware that Content was obtained from the Database, Derivative Database, or the Database as part of a Collective Database, and that it is available under this License. + + a. Example notice. The following text will satisfy notice under Section 4.3: + + Contains information from DATABASE NAME which is made available under the ODC Attribution License. + +DATABASE NAME should be replaced with the name of the Database and a hyperlink to the location of the Database. "ODC Attribution License" should contain a hyperlink to the URI of the text of this License. If hyperlinks are not possible, You should include the plain text of the required URI's with the above notice. + +4.4 Licensing of others. You may not sublicense the Database. Each time You communicate the Database, the whole or Substantial part of the Contents, or any Derivative Database to anyone else in any way, the Licensor offers to the recipient a license to the Database on the same terms and conditions as this License. You are not responsible for enforcing compliance by third parties with this License, but You may enforce any rights that You have over a Derivative Database. You are solely responsible for any modifications of a Derivative Database made by You or another Person at Your direction. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. + +### 5.0 Moral rights + +5.1 Moral rights. This section covers moral rights, including any rights to be identified as the author of the Database or to object to treatment that would otherwise prejudice the author's honour and reputation, or any other derogatory treatment: + + a. For jurisdictions allowing waiver of moral rights, Licensor waives all moral rights that Licensor may have in the Database to the fullest extent possible by the law of the relevant jurisdiction under Section 10.4; + + b. If waiver of moral rights under Section 5.1 a in the relevant jurisdiction is not possible, Licensor agrees not to assert any moral rights over the Database and waives all claims in moral rights to the fullest extent possible by the law of the relevant jurisdiction under Section 10.4; and + + c. For jurisdictions not allowing waiver or an agreement not to assert moral rights under Section 5.1 a and b, the author may retain their moral rights over certain aspects of the Database. + +Please note that some jurisdictions do not allow for the waiver of moral rights, and so moral rights may still subsist over the Database in some jurisdictions. + +### 6.0 Fair dealing, Database exceptions, and other rights not affected + +6.1 This License does not affect any rights that You or anyone else may independently have under any applicable law to make any use of this Database, including without limitation: + + a. Exceptions to the Database Right including: Extraction of Contents from non-electronic Databases for private purposes, Extraction for purposes of illustration for teaching or scientific research, and Extraction or Re-utilisation for public security or an administrative or judicial procedure. + + b. Fair dealing, fair use, or any other legally recognised limitation or exception to infringement of copyright or other applicable laws. + +6.2 This License does not affect any rights of lawful users to Extract and Re-utilise insubstantial parts of the Contents, evaluated quantitatively or qualitatively, for any purposes whatsoever, including creating a Derivative Database (subject to other rights over the Contents, see Section 2.4). The repeated and systematic Extraction or Re-utilisation of insubstantial parts of the Contents may however amount to the Extraction or Re-utilisation of a Substantial part of the Contents. + +### 7.0 Warranties and Disclaimer + +7.1 The Database is licensed by the Licensor "as is" and without any warranty of any kind, either express, implied, or arising by statute, custom, course of dealing, or trade usage. Licensor specifically disclaims any and all implied warranties or conditions of title, non-infringement, accuracy or completeness, the presence or absence of errors, fitness for a particular purpose, merchantability, or otherwise. Some jurisdictions do not allow the exclusion of implied warranties, so this exclusion may not apply to You. + +### 8.0 Limitation of liability + +8.1 Subject to any liability that may not be excluded or limited by law, the Licensor is not liable for, and expressly excludes, all liability for loss or damage however and whenever caused to anyone by any use under this License, whether by You or by anyone else, and whether caused by any fault on the part of the Licensor or not. This exclusion of liability includes, but is not limited to, any special, incidental, consequential, punitive, or exemplary damages such as loss of revenue, data, anticipated profits, and lost business. This exclusion applies even if the Licensor has been advised of the possibility of such damages. + +8.2 If liability may not be excluded by law, it is limited to actual and direct financial loss to the extent it is caused by proved negligence on the part of the Licensor. + +### 9.0 Termination of Your rights under this License + +9.1 Any breach by You of the terms and conditions of this License automatically terminates this License with immediate effect and without notice to You. For the avoidance of doubt, Persons who have received the Database, the whole or a Substantial part of the Contents, Derivative Databases, or the Database as part of a Collective Database from You under this License will not have their licenses terminated provided their use is in full compliance with this License or a license granted under Section 4.8 of this License. Sections 1, 2, 7, 8, 9 and 10 will survive any termination of this License. + +9.2 If You are not in breach of the terms of this License, the Licensor will not terminate Your rights under it. + +9.3 Unless terminated under Section 9.1, this License is granted to You for the duration of applicable rights in the Database. + +9.4 Reinstatement of rights. If you cease any breach of the terms and conditions of this License, then your full rights under this License will be reinstated: + + a. Provisionally and subject to permanent termination until the 60th day after cessation of breach; + + b. Permanently on the 60th day after cessation of breach unless otherwise reasonably notified by the Licensor; or + + c. Permanently if reasonably notified by the Licensor of the violation, this is the first time You have received notice of violation of this License from the Licensor, and You cure the violation prior to 30 days after your receipt of the notice. + +9.5 Notwithstanding the above, Licensor reserves the right to release the Database under different license terms or to stop distributing or making available the Database. Releasing the Database under different license terms or stopping the distribution of the Database will not withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. + +### 10.0 General + +10.1 If any provision of this License is held to be invalid or unenforceable, that must not affect the validity or enforceability of the remainder of the terms and conditions of this License and each remaining provision of this License shall be valid and enforced to the fullest extent permitted by law. + +10.2 This License is the entire agreement between the parties with respect to the rights granted here over the Database. It replaces any earlier understandings, agreements or representations with respect to the Database. + +10.3 If You are in breach of the terms of this License, You will not be entitled to rely on the terms of this License or to complain of any breach by the Licensor. + +10.4 Choice of law. This License takes effect in and will be governed by the laws of the relevant jurisdiction in which the License terms are sought to be enforced. If the standard suite of rights granted under applicable copyright law and Database Rights in the relevant jurisdiction includes additional rights not granted under this License, these additional rights are granted in this License in order to meet the terms of this License. diff --git a/options/license/ODbL-1.0 b/options/license/ODbL-1.0 index 560147751..8ca51c358 100644 --- a/options/license/ODbL-1.0 +++ b/options/license/ODbL-1.0 @@ -1,29 +1,32 @@ -ODC Open Database License (ODbL) Preamble +## Open Data Commons Open Database License (ODbL) -The Open Database License (ODbL) is a license agreement intended to allow -users to freely share, modify, and use this Database while maintaining this -same freedom for others. Many databases are covered by copyright, and therefore -this document licenses these rights. Some jurisdictions, mainly in the European -Union, have specific rights that cover databases, and so the ODbL addresses -these rights, too. Finally, the ODbL is also an agreement in contract for -users of this Database to act in certain ways in return for accessing this -Database. +### Preamble -Databases can contain a wide variety of types of content (images, audiovisual -material, and sounds all in the same database, for example), and so the ODbL -only governs the rights over the Database, and not the contents of the Database -individually. Licensors should use the ODbL together with another license -for the contents, if the contents have a single set of rights that uniformly -covers all of the contents. If the contents have multiple sets of different -rights, Licensors should describe what rights govern what contents together -in the individual record or in some other way that clarifies what rights apply. +The Open Database License (ODbL) is a license agreement intended to +allow users to freely share, modify, and use this Database while +maintaining this same freedom for others. Many databases are covered by +copyright, and therefore this document licenses these rights. Some +jurisdictions, mainly in the European Union, have specific rights that +cover databases, and so the ODbL addresses these rights, too. Finally, +the ODbL is also an agreement in contract for users of this Database to +act in certain ways in return for accessing this Database. -Sometimes the contents of a database, or the database itself, can be covered -by other rights not addressed here (such as private contracts, trade mark -over the name, or privacy rights / data protection rights over information -in the contents), and so you are advised that you may have to consult other -documents or clear other rights before doing activities not covered by this -License. +Databases can contain a wide variety of types of content (images, +audiovisual material, and sounds all in the same database, for example), +and so the ODbL only governs the rights over the Database, and not the +contents of the Database individually. Licensors should use the ODbL +together with another license for the contents, if the contents have a +single set of rights that uniformly covers all of the contents. If the +contents have multiple sets of different rights, Licensors should +describe what rights govern what contents together in the individual +record or in some other way that clarifies what rights apply. + +Sometimes the contents of a database, or the database itself, can be +covered by other rights not addressed here (such as private contracts, +trade mark over the name, or privacy rights / data protection rights +over information in the contents), and so you are advised that you may +have to consult other documents or clear other rights before doing +activities not covered by this License. ------ @@ -35,466 +38,503 @@ You (as defined below) agree as follows: - 1.0 Definitions of Capitalised Words +### 1.0 Definitions of Capitalised Words + +"Collective Database" – Means this Database in unmodified form as part +of a collection of independent databases in themselves that together are +assembled into a collective whole. A work that constitutes a Collective +Database will not be considered a Derivative Database. + +"Convey" – As a verb, means Using the Database, a Derivative Database, +or the Database as part of a Collective Database in any way that enables +a Person to make or receive copies of the Database or a Derivative +Database. Conveying does not include interaction with a user through a +computer network, or creating and Using a Produced Work, where no +transfer of a copy of the Database or a Derivative Database occurs. +"Contents" – The contents of this Database, which includes the +information, independent works, or other material collected into the +Database. For example, the contents of the Database could be factual +data or works such as images, audiovisual material, text, or sounds. + +"Database" – A collection of material (the Contents) arranged in a +systematic or methodical way and individually accessible by electronic +or other means offered under the terms of this License. + +"Database Directive" – Means Directive 96/9/EC of the European +Parliament and of the Council of 11 March 1996 on the legal protection +of databases, as amended or succeeded. + +"Database Right" – Means rights resulting from the Chapter III ("sui +generis") rights in the Database Directive (as amended and as transposed +by member states), which includes the Extraction and Re-utilisation of +the whole or a Substantial part of the Contents, as well as any similar +rights available in the relevant jurisdiction under Section 10.4. + +"Derivative Database" – Means a database based upon the Database, and +includes any translation, adaptation, arrangement, modification, or any +other alteration of the Database or of a Substantial part of the +Contents. This includes, but is not limited to, Extracting or +Re-utilising the whole or a Substantial part of the Contents in a new +Database. + +"Extraction" – Means the permanent or temporary transfer of all or a +Substantial part of the Contents to another medium by any means or in +any form. + +"License" – Means this license agreement and is both a license of rights +such as copyright and Database Rights and an agreement in contract. + +"Licensor" – Means the Person that offers the Database under the terms +of this License. + +"Person" – Means a natural or legal person or a body of persons +corporate or incorporate. + +"Produced Work" – a work (such as an image, audiovisual material, text, +or sounds) resulting from using the whole or a Substantial part of the +Contents (via a search or other query) from this Database, a Derivative +Database, or this Database as part of a Collective Database. + +"Publicly" – means to Persons other than You or under Your control by +either more than 50% ownership or by the power to direct their +activities (such as contracting with an independent consultant). + +"Re-utilisation" – means any form of making available to the public all +or a Substantial part of the Contents by the distribution of copies, by +renting, by online or other forms of transmission. + +"Substantial" – Means substantial in terms of quantity or quality or a +combination of both. The repeated and systematic Extraction or +Re-utilisation of insubstantial parts of the Contents may amount to the +Extraction or Re-utilisation of a Substantial part of the Contents. + +"Use" – As a verb, means doing any act that is restricted by copyright +or Database Rights whether in the original medium or any other; and +includes without limitation distributing, copying, publicly performing, +publicly displaying, and preparing derivative works of the Database, as +well as modifying the Database as may be technically necessary to use it +in a different mode or format. + +"You" – Means a Person exercising rights under this License who has not +previously violated the terms of this License with respect to the +Database, or who has received express permission from the Licensor to +exercise rights under this License despite a previous violation. + +Words in the singular include the plural and vice versa. + +### 2.0 What this License covers + +2.1. Legal effect of this document. This License is: + + a. A license of applicable copyright and neighbouring rights; + + b. A license of the Database Right; and + + c. An agreement in contract between You and the Licensor. + +2.2 Legal rights covered. This License covers the legal rights in the +Database, including: + + a. Copyright. Any copyright or neighbouring rights in the Database. + The copyright licensed includes any individual elements of the + Database, but does not cover the copyright over the Contents + independent of this Database. See Section 2.4 for details. Copyright + law varies between jurisdictions, but is likely to cover: the Database + model or schema, which is the structure, arrangement, and organisation + of the Database, and can also include the Database tables and table + indexes; the data entry and output sheets; and the Field names of + Contents stored in the Database; + + b. Database Rights. Database Rights only extend to the Extraction and + Re-utilisation of the whole or a Substantial part of the Contents. + Database Rights can apply even when there is no copyright over the + Database. Database Rights can also apply when the Contents are removed + from the Database and are selected and arranged in a way that would + not infringe any applicable copyright; and + + c. Contract. This is an agreement between You and the Licensor for + access to the Database. In return you agree to certain conditions of + use on this access as outlined in this License. + +2.3 Rights not covered. + + a. This License does not apply to computer programs used in the making + or operation of the Database; + + b. This License does not cover any patents over the Contents or the + Database; and + + c. This License does not cover any trademarks associated with the + Database. + +2.4 Relationship to Contents in the Database. The individual items of +the Contents contained in this Database may be covered by other rights, +including copyright, patent, data protection, privacy, or personality +rights, and this License does not cover any rights (other than Database +Rights or in contract) in individual Contents contained in the Database. +For example, if used on a Database of images (the Contents), this +License would not apply to copyright over individual images, which could +have their own separate licenses, or one single license covering all of +the rights over the images. + +### 3.0 Rights granted + +3.1 Subject to the terms and conditions of this License, the Licensor +grants to You a worldwide, royalty-free, non-exclusive, terminable (but +only under Section 9) license to Use the Database for the duration of +any applicable copyright and Database Rights. These rights explicitly +include commercial use, and do not exclude any field of endeavour. To +the extent possible in the relevant jurisdiction, these rights may be +exercised in all media and formats whether now known or created in the +future. + +The rights granted cover, for example: -"Collective Database" - Means this Database in unmodified form as part of -a collection of independent databases in themselves that together are assembled -into a collective whole. A work that constitutes a Collective Database will -not be considered a Derivative Database. + a. Extraction and Re-utilisation of the whole or a Substantial part of + the Contents; -"Convey" - As a verb, means Using the Database, a Derivative Database, or -the Database as part of a Collective Database in any way that enables a Person -to make or receive copies of the Database or a Derivative Database. Conveying -does not include interaction with a user through a computer network, or creating -and Using a Produced Work, where no transfer of a copy of the Database or -a Derivative Database occurs. + b. Creation of Derivative Databases; -"Contents" - The contents of this Database, which includes the information, -independent works, or other material collected into the Database. For example, -the contents of the Database could be factual data or works such as images, -audiovisual material, text, or sounds. + c. Creation of Collective Databases; -"Database" - A collection of material (the Contents) arranged in a systematic -or methodical way and individually accessible by electronic or other means -offered under the terms of this License. + d. Creation of temporary or permanent reproductions by any means and + in any form, in whole or in part, including of any Derivative + Databases or as a part of Collective Databases; and -"Database Directive" - Means Directive 96/9/EC of the European Parliament -and of the Council of 11 March 1996 on the legal protection of databases, -as amended or succeeded. + e. Distribution, communication, display, lending, making available, or + performance to the public by any means and in any form, in whole or in + part, including of any Derivative Database or as a part of Collective + Databases. -"Database Right" - Means rights resulting from the Chapter III ("sui generis") -rights in the Database Directive (as amended and as transposed by member states), -which includes the Extraction and Re-utilisation of the whole or a Substantial -part of the Contents, as well as any similar rights available in the relevant -jurisdiction under Section 10.4. +3.2 Compulsory license schemes. For the avoidance of doubt: -"Derivative Database" - Means a database based upon the Database, and includes -any translation, adaptation, arrangement, modification, or any other alteration -of the Database or of a Substantial part of the Contents. This includes, but -is not limited to, Extracting or Re-utilising the whole or a Substantial part -of the Contents in a new Database. + a. Non-waivable compulsory license schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor reserves + the exclusive right to collect such royalties for any exercise by You + of the rights granted under this License; -"Extraction" - Means the permanent or temporary transfer of all or a Substantial -part of the Contents to another medium by any means or in any form. - -"License" - Means this license agreement and is both a license of rights such -as copyright and Database Rights and an agreement in contract. + b. Waivable compulsory license schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor waives the + exclusive right to collect such royalties for any exercise by You of + the rights granted under this License; and, -"Licensor" - Means the Person that offers the Database under the terms of -this License. + c. Voluntary license schemes. The Licensor waives the right to collect + royalties, whether individually or, in the event that the Licensor is + a member of a collecting society that administers voluntary licensing + schemes, via that society, from any exercise by You of the rights + granted under this License. -"Person" - Means a natural or legal person or a body of persons corporate -or incorporate. +3.3 The right to release the Database under different terms, or to stop +distributing or making available the Database, is reserved. Note that +this Database may be multiple-licensed, and so You may have the choice +of using alternative licenses for this Database. Subject to Section +10.4, all other rights not expressly granted by Licensor are reserved. + +### 4.0 Conditions of Use + +4.1 The rights granted in Section 3 above are expressly made subject to +Your complying with the following conditions of use. These are important +conditions of this License, and if You fail to follow them, You will be +in material breach of its terms. + +4.2 Notices. If You Publicly Convey this Database, any Derivative +Database, or the Database as part of a Collective Database, then You +must: -"Produced Work" - a work (such as an image, audiovisual material, text, or -sounds) resulting from using the whole or a Substantial part of the Contents -(via a search or other query) from this Database, a Derivative Database, or -this Database as part of a Collective Database. + a. Do so only under the terms of this License or another license + permitted under Section 4.4; -"Publicly" - means to Persons other than You or under Your control by either -more than 50% ownership or by the power to direct their activities (such as -contracting with an independent consultant). + b. Include a copy of this License (or, as applicable, a license + permitted under Section 4.4) or its Uniform Resource Identifier (URI) + with the Database or Derivative Database, including both in the + Database or Derivative Database and in any relevant documentation; and -"Re-utilisation" - means any form of making available to the public all or -a Substantial part of the Contents by the distribution of copies, by renting, -by online or other forms of transmission. + c. Keep intact any copyright or Database Right notices and notices + that refer to this License. -"Substantial" - Means substantial in terms of quantity or quality or a combination -of both. The repeated and systematic Extraction or Re-utilisation of insubstantial -parts of the Contents may amount to the Extraction or Re-utilisation of a -Substantial part of the Contents. + d. If it is not possible to put the required notices in a particular + file due to its structure, then You must include the notices in a + location (such as a relevant directory) where users would be likely to + look for it. + +4.3 Notice for using output (Contents). Creating and Using a Produced +Work does not require the notice in Section 4.2. However, if you +Publicly Use a Produced Work, You must include a notice associated with +the Produced Work reasonably calculated to make any Person that uses, +views, accesses, interacts with, or is otherwise exposed to the Produced +Work aware that Content was obtained from the Database, Derivative +Database, or the Database as part of a Collective Database, and that it +is available under this License. + + a. Example notice. The following text will satisfy notice under + Section 4.3: + + Contains information from DATABASE NAME, which is made available + here under the Open Database License (ODbL). -"Use" - As a verb, means doing any act that is restricted by copyright or -Database Rights whether in the original medium or any other; and includes -without limitation distributing, copying, publicly performing, publicly displaying, -and preparing derivative works of the Database, as well as modifying the Database -as may be technically necessary to use it in a different mode or format. +DATABASE NAME should be replaced with the name of the Database and a +hyperlink to the URI of the Database. "Open Database License" should +contain a hyperlink to the URI of the text of this License. If +hyperlinks are not possible, You should include the plain text of the +required URI's with the above notice. + +4.4 Share alike. + + a. Any Derivative Database that You Publicly Use must be only under + the terms of: + + i. This License; + + ii. A later version of this License similar in spirit to this + License; or + + iii. A compatible license. + + If You license the Derivative Database under one of the licenses + mentioned in (iii), You must comply with the terms of that license. + + b. For the avoidance of doubt, Extraction or Re-utilisation of the + whole or a Substantial part of the Contents into a new database is a + Derivative Database and must comply with Section 4.4. + + c. Derivative Databases and Produced Works. A Derivative Database is + Publicly Used and so must comply with Section 4.4. if a Produced Work + created from the Derivative Database is Publicly Used. + + d. Share Alike and additional Contents. For the avoidance of doubt, + You must not add Contents to Derivative Databases under Section 4.4 a + that are incompatible with the rights granted under this License. + + e. Compatible licenses. Licensors may authorise a proxy to determine + compatible licenses under Section 4.4 a iii. If they do so, the + authorised proxy's public statement of acceptance of a compatible + license grants You permission to use the compatible license. + + +4.5 Limits of Share Alike. The requirements of Section 4.4 do not apply +in the following: + + a. For the avoidance of doubt, You are not required to license + Collective Databases under this License if You incorporate this + Database or a Derivative Database in the collection, but this License + still applies to this Database or a Derivative Database as a part of + the Collective Database; + + b. Using this Database, a Derivative Database, or this Database as + part of a Collective Database to create a Produced Work does not + create a Derivative Database for purposes of Section 4.4; and + + c. Use of a Derivative Database internally within an organisation is + not to the public and therefore does not fall under the requirements + of Section 4.4. + +4.6 Access to Derivative Databases. If You Publicly Use a Derivative +Database or a Produced Work from a Derivative Database, You must also +offer to recipients of the Derivative Database or Produced Work a copy +in a machine readable form of: + + a. The entire Derivative Database; or + + b. A file containing all of the alterations made to the Database or + the method of making the alterations to the Database (such as an + algorithm), including any additional Contents, that make up all the + differences between the Database and the Derivative Database. + +The Derivative Database (under a.) or alteration file (under b.) must be +available at no more than a reasonable production cost for physical +distributions and free of charge if distributed over the internet. + +4.7 Technological measures and additional terms + + a. This License does not allow You to impose (except subject to + Section 4.7 b.) any terms or any technological measures on the + Database, a Derivative Database, or the whole or a Substantial part of + the Contents that alter or restrict the terms of this License, or any + rights granted under it, or have the effect or intent of restricting + the ability of any person to exercise those rights. + + b. Parallel distribution. You may impose terms or technological + measures on the Database, a Derivative Database, or the whole or a + Substantial part of the Contents (a "Restricted Database") in + contravention of Section 4.74 a. only if You also make a copy of the + Database or a Derivative Database available to the recipient of the + Restricted Database: + + i. That is available without additional fee; + + ii. That is available in a medium that does not alter or restrict + the terms of this License, or any rights granted under it, or have + the effect or intent of restricting the ability of any person to + exercise those rights (an "Unrestricted Database"); and + + iii. The Unrestricted Database is at least as accessible to the + recipient as a practical matter as the Restricted Database. + + c. For the avoidance of doubt, You may place this Database or a + Derivative Database in an authenticated environment, behind a + password, or within a similar access control scheme provided that You + do not alter or restrict the terms of this License or any rights + granted under it or have the effect or intent of restricting the + ability of any person to exercise those rights. -"You" - Means a Person exercising rights under this License who has not previously -violated the terms of this License with respect to the Database, or who has -received express permission from the Licensor to exercise rights under this -License despite a previous violation. - - Words in the singular include the plural and vice versa. - - 2.0 What this License covers - - 2.1. Legal effect of this document. This License is: - - a. A license of applicable copyright and neighbouring rights; - - b. A license of the Database Right; and - - c. An agreement in contract between You and the Licensor. - -2.2 Legal rights covered. This License covers the legal rights in the Database, -including: - -a. Copyright. Any copyright or neighbouring rights in the Database. The copyright -licensed includes any individual elements of the Database, but does not cover -the copyright over the Contents independent of this Database. See Section -2.4 for details. Copyright law varies between jurisdictions, but is likely -to cover: the Database model or schema, which is the structure, arrangement, -and organisation of the Database, and can also include the Database tables -and table indexes; the data entry and output sheets; and the Field names of -Contents stored in the Database; - -b. Database Rights. Database Rights only extend to the Extraction and Re-utilisation -of the whole or a Substantial part of the Contents. Database Rights can apply -even when there is no copyright over the Database. Database Rights can also -apply when the Contents are removed from the Database and are selected and -arranged in a way that would not infringe any applicable copyright; and - -c. Contract. This is an agreement between You and the Licensor for access -to the Database. In return you agree to certain conditions of use on this -access as outlined in this License. - - 2.3 Rights not covered. - -a. This License does not apply to computer programs used in the making or -operation of the Database; - -b. This License does not cover any patents over the Contents or the Database; -and - -c. This License does not cover any trademarks associated with the Database. - -2.4 Relationship to Contents in the Database. The individual items of the -Contents contained in this Database may be covered by other rights, including -copyright, patent, data protection, privacy, or personality rights, and this -License does not cover any rights (other than Database Rights or in contract) -in individual Contents contained in the Database. For example, if used on -a Database of images (the Contents), this License would not apply to copyright -over individual images, which could have their own separate licenses, or one -single license covering all of the rights over the images. - - 3.0 Rights granted - -3.1 Subject to the terms and conditions of this License, the Licensor grants -to You a worldwide, royalty-free, non-exclusive, terminable (but only under -Section 9) license to Use the Database for the duration of any applicable -copyright and Database Rights. These rights explicitly include commercial -use, and do not exclude any field of endeavour. To the extent possible in -the relevant jurisdiction, these rights may be exercised in all media and -formats whether now known or created in the future. - - The rights granted cover, for example: - -a. Extraction and Re-utilisation of the whole or a Substantial part of the -Contents; - - b. Creation of Derivative Databases; - - c. Creation of Collective Databases; - -d. Creation of temporary or permanent reproductions by any means and in any -form, in whole or in part, including of any Derivative Databases or as a part -of Collective Databases; and - -e. Distribution, communication, display, lending, making available, or performance -to the public by any means and in any form, in whole or in part, including -of any Derivative Database or as a part of Collective Databases. - - 3.2 Compulsory license schemes. For the avoidance of doubt: - -a. Non-waivable compulsory license schemes. In those jurisdictions in which -the right to collect royalties through any statutory or compulsory licensing -scheme cannot be waived, the Licensor reserves the exclusive right to collect -such royalties for any exercise by You of the rights granted under this License; - -b. Waivable compulsory license schemes. In those jurisdictions in which the -right to collect royalties through any statutory or compulsory licensing scheme -can be waived, the Licensor waives the exclusive right to collect such royalties -for any exercise by You of the rights granted under this License; and, - -c. Voluntary license schemes. The Licensor waives the right to collect royalties, -whether individually or, in the event that the Licensor is a member of a collecting -society that administers voluntary licensing schemes, via that society, from -any exercise by You of the rights granted under this License. - -3.3 The right to release the Database under different terms, or to stop distributing -or making available the Database, is reserved. Note that this Database may -be multiple-licensed, and so You may have the choice of using alternative -licenses for this Database. Subject to Section 10.4, all other rights not -expressly granted by Licensor are reserved. - - 4.0 Conditions of Use - -4.1 The rights granted in Section 3 above are expressly made subject to Your -complying with the following conditions of use. These are important conditions -of this License, and if You fail to follow them, You will be in material breach -of its terms. - -4.2 Notices. If You Publicly Convey this Database, any Derivative Database, -or the Database as part of a Collective Database, then You must: - -a. Do so only under the terms of this License or another license permitted -under Section 4.4; - -b. Include a copy of this License (or, as applicable, a license permitted -under Section 4.4) or its Uniform Resource Identifier (URI) with the Database -or Derivative Database, including both in the Database or Derivative Database -and in any relevant documentation; and - -c. Keep intact any copyright or Database Right notices and notices that refer -to this License. - -d. If it is not possible to put the required notices in a particular file -due to its structure, then You must include the notices in a location (such -as a relevant directory) where users would be likely to look for it. - -4.3 Notice for using output (Contents). Creating and Using a Produced Work -does not require the notice in Section 4.2. However, if you Publicly Use a -Produced Work, You must include a notice associated with the Produced Work -reasonably calculated to make any Person that uses, views, accesses, interacts -with, or is otherwise exposed to the Produced Work aware that Content was -obtained from the Database, Derivative Database, or the Database as part of -a Collective Database, and that it is available under this License. - -a. Example notice. The following text will satisfy notice under Section 4.3: - -Contains information from DATABASE NAME, which is made available here under -the Open Database License (ODbL). - -DATABASE NAME should be replaced with the name of the Database and a hyperlink -to the URI of the Database. "Open Database License" should contain a hyperlink -to the URI of the text of this License. If hyperlinks are not possible, You -should include the plain text of the required URI's with the above notice. - - 4.4 Share alike. - -a. Any Derivative Database that You Publicly Use must be only under the terms -of: - - i. This License; - -ii. A later version of this License similar in spirit to this License; or - - iii. A compatible license. - -If You license the Derivative Database under one of the licenses mentioned -in (iii), You must comply with the terms of that license. - -b. For the avoidance of doubt, Extraction or Re-utilisation of the whole or -a Substantial part of the Contents into a new database is a Derivative Database -and must comply with Section 4.4. - -c. Derivative Databases and Produced Works. A Derivative Database is Publicly -Used and so must comply with Section 4.4. if a Produced Work created from -the Derivative Database is Publicly Used. - -d. Share Alike and additional Contents. For the avoidance of doubt, You must -not add Contents to Derivative Databases under Section 4.4 a that are incompatible -with the rights granted under this License. - -e. Compatible licenses. Licensors may authorise a proxy to determine compatible -licenses under Section 4.4 a iii. If they do so, the authorised proxy's public -statement of acceptance of a compatible license grants You permission to use -the compatible license. - -4.5 Limits of Share Alike. The requirements of Section 4.4 do not apply in -the following: - -a. For the avoidance of doubt, You are not required to license Collective -Databases under this License if You incorporate this Database or a Derivative -Database in the collection, but this License still applies to this Database -or a Derivative Database as a part of the Collective Database; - -b. Using this Database, a Derivative Database, or this Database as part of -a Collective Database to create a Produced Work does not create a Derivative -Database for purposes of Section 4.4; and - -c. Use of a Derivative Database internally within an organisation is not to -the public and therefore does not fall under the requirements of Section 4.4. - -4.6 Access to Derivative Databases. If You Publicly Use a Derivative Database -or a Produced Work from a Derivative Database, You must also offer to recipients -of the Derivative Database or Produced Work a copy in a machine readable form -of: - - a. The entire Derivative Database; or - -b. A file containing all of the alterations made to the Database or the method -of making the alterations to the Database (such as an algorithm), including -any additional Contents, that make up all the differences between the Database -and the Derivative Database. - -The Derivative Database (under a.) or alteration file (under b.) must be available -at no more than a reasonable production cost for physical distributions and -free of charge if distributed over the internet. - - 4.7 Technological measures and additional terms - -a. This License does not allow You to impose (except subject to Section 4.7 -b.) any terms or any technological measures on the Database, a Derivative -Database, or the whole or a Substantial part of the Contents that alter or -restrict the terms of this License, or any rights granted under it, or have -the effect or intent of restricting the ability of any person to exercise -those rights. - -b. Parallel distribution. You may impose terms or technological measures on -the Database, a Derivative Database, or the whole or a Substantial part of -the Contents (a "Restricted Database") in contravention of Section 4.74 a. -only if You also make a copy of the Database or a Derivative Database available -to the recipient of the Restricted Database: - - i. That is available without additional fee; - -ii. That is available in a medium that does not alter or restrict the terms -of this License, or any rights granted under it, or have the effect or intent -of restricting the ability of any person to exercise those rights (an "Unrestricted -Database"); and - -iii. The Unrestricted Database is at least as accessible to the recipient -as a practical matter as the Restricted Database. - -c. For the avoidance of doubt, You may place this Database or a Derivative -Database in an authenticated environment, behind a password, or within a similar -access control scheme provided that You do not alter or restrict the terms -of this License or any rights granted under it or have the effect or intent -of restricting the ability of any person to exercise those rights. - -4.8 Licensing of others. You may not sublicense the Database. Each time You -communicate the Database, the whole or Substantial part of the Contents, or -any Derivative Database to anyone else in any way, the Licensor offers to -the recipient a license to the Database on the same terms and conditions as -this License. You are not responsible for enforcing compliance by third parties -with this License, but You may enforce any rights that You have over a Derivative -Database. You are solely responsible for any modifications of a Derivative -Database made by You or another Person at Your direction. You may not impose -any further restrictions on the exercise of the rights granted or affirmed +4.8 Licensing of others. You may not sublicense the Database. Each time +You communicate the Database, the whole or Substantial part of the +Contents, or any Derivative Database to anyone else in any way, the +Licensor offers to the recipient a license to the Database on the same +terms and conditions as this License. You are not responsible for +enforcing compliance by third parties with this License, but You may +enforce any rights that You have over a Derivative Database. You are +solely responsible for any modifications of a Derivative Database made +by You or another Person at Your direction. You may not impose any +further restrictions on the exercise of the rights granted or affirmed under this License. - 5.0 Moral rights +### 5.0 Moral rights -5.1 Moral rights. This section covers moral rights, including any rights to -be identified as the author of the Database or to object to treatment that -would otherwise prejudice the author's honour and reputation, or any other -derogatory treatment: +5.1 Moral rights. This section covers moral rights, including any rights +to be identified as the author of the Database or to object to treatment +that would otherwise prejudice the author's honour and reputation, or +any other derogatory treatment: -a. For jurisdictions allowing waiver of moral rights, Licensor waives all -moral rights that Licensor may have in the Database to the fullest extent -possible by the law of the relevant jurisdiction under Section 10.4; + a. For jurisdictions allowing waiver of moral rights, Licensor waives + all moral rights that Licensor may have in the Database to the fullest + extent possible by the law of the relevant jurisdiction under Section + 10.4; -b. If waiver of moral rights under Section 5.1 a in the relevant jurisdiction -is not possible, Licensor agrees not to assert any moral rights over the Database -and waives all claims in moral rights to the fullest extent possible by the -law of the relevant jurisdiction under Section 10.4; and + b. If waiver of moral rights under Section 5.1 a in the relevant + jurisdiction is not possible, Licensor agrees not to assert any moral + rights over the Database and waives all claims in moral rights to the + fullest extent possible by the law of the relevant jurisdiction under + Section 10.4; and -c. For jurisdictions not allowing waiver or an agreement not to assert moral -rights under Section 5.1 a and b, the author may retain their moral rights -over certain aspects of the Database. + c. For jurisdictions not allowing waiver or an agreement not to assert + moral rights under Section 5.1 a and b, the author may retain their + moral rights over certain aspects of the Database. -Please note that some jurisdictions do not allow for the waiver of moral rights, -and so moral rights may still subsist over the Database in some jurisdictions. +Please note that some jurisdictions do not allow for the waiver of moral +rights, and so moral rights may still subsist over the Database in some +jurisdictions. - 6.0 Fair dealing, Database exceptions, and other rights not affected +### 6.0 Fair dealing, Database exceptions, and other rights not affected -6.1 This License does not affect any rights that You or anyone else may independently -have under any applicable law to make any use of this Database, including -without limitation: +6.1 This License does not affect any rights that You or anyone else may +independently have under any applicable law to make any use of this +Database, including without limitation: -a. Exceptions to the Database Right including: Extraction of Contents from -non-electronic Databases for private purposes, Extraction for purposes of -illustration for teaching or scientific research, and Extraction or Re-utilisation -for public security or an administrative or judicial procedure. + a. Exceptions to the Database Right including: Extraction of Contents + from non-electronic Databases for private purposes, Extraction for + purposes of illustration for teaching or scientific research, and + Extraction or Re-utilisation for public security or an administrative + or judicial procedure. -b. Fair dealing, fair use, or any other legally recognised limitation or exception -to infringement of copyright or other applicable laws. + b. Fair dealing, fair use, or any other legally recognised limitation + or exception to infringement of copyright or other applicable laws. -6.2 This License does not affect any rights of lawful users to Extract and -Re-utilise insubstantial parts of the Contents, evaluated quantitatively or -qualitatively, for any purposes whatsoever, including creating a Derivative -Database (subject to other rights over the Contents, see Section 2.4). The -repeated and systematic Extraction or Re-utilisation of insubstantial parts -of the Contents may however amount to the Extraction or Re-utilisation of -a Substantial part of the Contents. +6.2 This License does not affect any rights of lawful users to Extract +and Re-utilise insubstantial parts of the Contents, evaluated +quantitatively or qualitatively, for any purposes whatsoever, including +creating a Derivative Database (subject to other rights over the +Contents, see Section 2.4). The repeated and systematic Extraction or +Re-utilisation of insubstantial parts of the Contents may however amount +to the Extraction or Re-utilisation of a Substantial part of the +Contents. - 7.0 Warranties and Disclaimer +### 7.0 Warranties and Disclaimer -7.1 The Database is licensed by the Licensor "as is" and without any warranty -of any kind, either express, implied, or arising by statute, custom, course -of dealing, or trade usage. Licensor specifically disclaims any and all implied -warranties or conditions of title, non-infringement, accuracy or completeness, -the presence or absence of errors, fitness for a particular purpose, merchantability, -or otherwise. Some jurisdictions do not allow the exclusion of implied warranties, -so this exclusion may not apply to You. +7.1 The Database is licensed by the Licensor "as is" and without any +warranty of any kind, either express, implied, or arising by statute, +custom, course of dealing, or trade usage. Licensor specifically +disclaims any and all implied warranties or conditions of title, +non-infringement, accuracy or completeness, the presence or absence of +errors, fitness for a particular purpose, merchantability, or otherwise. +Some jurisdictions do not allow the exclusion of implied warranties, so +this exclusion may not apply to You. - 8.0 Limitation of liability +### 8.0 Limitation of liability -8.1 Subject to any liability that may not be excluded or limited by law, the -Licensor is not liable for, and expressly excludes, all liability for loss -or damage however and whenever caused to anyone by any use under this License, -whether by You or by anyone else, and whether caused by any fault on the part -of the Licensor or not. This exclusion of liability includes, but is not limited -to, any special, incidental, consequential, punitive, or exemplary damages -such as loss of revenue, data, anticipated profits, and lost business. This -exclusion applies even if the Licensor has been advised of the possibility -of such damages. +8.1 Subject to any liability that may not be excluded or limited by law, +the Licensor is not liable for, and expressly excludes, all liability +for loss or damage however and whenever caused to anyone by any use +under this License, whether by You or by anyone else, and whether caused +by any fault on the part of the Licensor or not. This exclusion of +liability includes, but is not limited to, any special, incidental, +consequential, punitive, or exemplary damages such as loss of revenue, +data, anticipated profits, and lost business. This exclusion applies +even if the Licensor has been advised of the possibility of such +damages. -8.2 If liability may not be excluded by law, it is limited to actual and direct -financial loss to the extent it is caused by proved negligence on the part -of the Licensor. +8.2 If liability may not be excluded by law, it is limited to actual and +direct financial loss to the extent it is caused by proved negligence on +the part of the Licensor. - 9.0 Termination of Your rights under this License +### 9.0 Termination of Your rights under this License -9.1 Any breach by You of the terms and conditions of this License automatically -terminates this License with immediate effect and without notice to You. For -the avoidance of doubt, Persons who have received the Database, the whole -or a Substantial part of the Contents, Derivative Databases, or the Database -as part of a Collective Database from You under this License will not have -their licenses terminated provided their use is in full compliance with this -License or a license granted under Section 4.8 of this License. Sections 1, -2, 7, 8, 9 and 10 will survive any termination of this License. +9.1 Any breach by You of the terms and conditions of this License +automatically terminates this License with immediate effect and without +notice to You. For the avoidance of doubt, Persons who have received the +Database, the whole or a Substantial part of the Contents, Derivative +Databases, or the Database as part of a Collective Database from You +under this License will not have their licenses terminated provided +their use is in full compliance with this License or a license granted +under Section 4.8 of this License. Sections 1, 2, 7, 8, 9 and 10 will +survive any termination of this License. -9.2 If You are not in breach of the terms of this License, the Licensor will -not terminate Your rights under it. +9.2 If You are not in breach of the terms of this License, the Licensor +will not terminate Your rights under it. -9.3 Unless terminated under Section 9.1, this License is granted to You for -the duration of applicable rights in the Database. +9.3 Unless terminated under Section 9.1, this License is granted to You +for the duration of applicable rights in the Database. -9.4 Reinstatement of rights. If you cease any breach of the terms and conditions -of this License, then your full rights under this License will be reinstated: +9.4 Reinstatement of rights. If you cease any breach of the terms and +conditions of this License, then your full rights under this License +will be reinstated: -a. Provisionally and subject to permanent termination until the 60th day after -cessation of breach; + a. Provisionally and subject to permanent termination until the 60th + day after cessation of breach; -b. Permanently on the 60th day after cessation of breach unless otherwise -reasonably notified by the Licensor; or + b. Permanently on the 60th day after cessation of breach unless + otherwise reasonably notified by the Licensor; or -c. Permanently if reasonably notified by the Licensor of the violation, this -is the first time You have received notice of violation of this License from -the Licensor, and You cure the violation prior to 30 days after your receipt -of the notice. + c. Permanently if reasonably notified by the Licensor of the + violation, this is the first time You have received notice of + violation of this License from the Licensor, and You cure the + violation prior to 30 days after your receipt of the notice. -Persons subject to permanent termination of rights are not eligible to be -a recipient and receive a license under Section 4.8. +Persons subject to permanent termination of rights are not eligible to +be a recipient and receive a license under Section 4.8. -9.5 Notwithstanding the above, Licensor reserves the right to release the -Database under different license terms or to stop distributing or making available -the Database. Releasing the Database under different license terms or stopping -the distribution of the Database will not withdraw this License (or any other -license that has been, or is required to be, granted under the terms of this -License), and this License will continue in full force and effect unless terminated -as stated above. +9.5 Notwithstanding the above, Licensor reserves the right to release +the Database under different license terms or to stop distributing or +making available the Database. Releasing the Database under different +license terms or stopping the distribution of the Database will not +withdraw this License (or any other license that has been, or is +required to be, granted under the terms of this License), and this +License will continue in full force and effect unless terminated as +stated above. - 10.0 General +### 10.0 General -10.1 If any provision of this License is held to be invalid or unenforceable, -that must not affect the validity or enforceability of the remainder of the -terms and conditions of this License and each remaining provision of this -License shall be valid and enforced to the fullest extent permitted by law. +10.1 If any provision of this License is held to be invalid or +unenforceable, that must not affect the validity or enforceability of +the remainder of the terms and conditions of this License and each +remaining provision of this License shall be valid and enforced to the +fullest extent permitted by law. -10.2 This License is the entire agreement between the parties with respect -to the rights granted here over the Database. It replaces any earlier understandings, -agreements or representations with respect to the Database. +10.2 This License is the entire agreement between the parties with +respect to the rights granted here over the Database. It replaces any +earlier understandings, agreements or representations with respect to +the Database. -10.3 If You are in breach of the terms of this License, You will not be entitled -to rely on the terms of this License or to complain of any breach by the Licensor. +10.3 If You are in breach of the terms of this License, You will not be +entitled to rely on the terms of this License or to complain of any +breach by the Licensor. -10.4 Choice of law. This License takes effect in and will be governed by the -laws of the relevant jurisdiction in which the License terms are sought to -be enforced. If the standard suite of rights granted under applicable copyright -law and Database Rights in the relevant jurisdiction includes additional rights -not granted under this License, these additional rights are granted in this -License in order to meet the terms of this License. +10.4 Choice of law. This License takes effect in and will be governed by +the laws of the relevant jurisdiction in which the License terms are +sought to be enforced. If the standard suite of rights granted under +applicable copyright law and Database Rights in the relevant +jurisdiction includes additional rights not granted under this License, +these additional rights are granted in this License in order to meet the +terms of this License. diff --git a/options/license/OFL-1.0 b/options/license/OFL-1.0 index ad436fd2c..9673cd20f 100644 --- a/options/license/OFL-1.0 +++ b/options/license/OFL-1.0 @@ -4,77 +4,41 @@ Version 1.0 - 22 November 2005 PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide development -of cooperative font projects, to support the font creation efforts of academic -and linguistic communities, and to provide an open framework in which fonts -may be shared and improved in partnership with others. +The goals of the Open Font License (OFL) are to stimulate worldwide development of cooperative font projects, to support the font creation efforts of academic and linguistic communities, and to provide an open framework in which fonts may be shared and improved in partnership with others. -The OFL allows the licensed fonts to be used, studied, modified and redistributed -freely as long as they are not sold by themselves. The fonts, including any -derivative works, can be bundled, embedded, redistributed and sold with any -software provided that the font names of derivative works are changed. The -fonts and derivatives, however, cannot be released under any other type of -license. +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and sold with any software provided that the font names of derivative works are changed. The fonts and derivatives, however, cannot be released under any other type of license. DEFINITIONS "Font Software" refers to any and all of the following: - - font files + - font files + - data files + - source code + - build scripts + - documentation - - data files +"Reserved Font Name" refers to the Font Software name as seen by users and any other names as specified after the copyright statement. - - source code +"Standard Version" refers to the collection of Font Software components as distributed by the Copyright Holder. - - build scripts +"Modified Version" refers to any derivative font software made by adding to, deleting, or substituting — in part or in whole -- any of the components of the Standard Version, by changing formats or by porting the Font Software to a new environment. - - documentation - -"Reserved Font Name" refers to the Font Software name as seen by users and -any other names as specified after the copyright statement. - -"Standard Version" refers to the collection of Font Software components as -distributed by the Copyright Holder. - -"Modified Version" refers to any derivative font software made by adding to, -deleting, or substituting — in part or in whole -- any of the components of -the Standard Version, by changing formats or by porting the Font Software -to a new environment. - -"Author" refers to any designer, engineer, programmer, technical writer or -other person who contributed to the Font Software. +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Font Software, to use, study, copy, merge, embed, modify, redistribute, -and sell modified and unmodified copies of the Font Software, subject to the -following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: -1) Neither the Font Software nor any of its individual components, in Standard -or Modified Versions, may be sold by itself. +1) Neither the Font Software nor any of its individual components, in Standard or Modified Versions, may be sold by itself. -2) Standard or Modified Versions of the Font Software may be bundled, redistributed -and sold with any software, provided that each copy contains the above copyright -notice and this license. These can be included either as stand-alone text -files, human-readable headers or in the appropriate machine-readable metadata -fields within text or binary files as long as those fields can be easily viewed -by the user. +2) Standard or Modified Versions of the Font Software may be bundled, redistributed and sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. -3) No Modified Version of the Font Software may use the Reserved Font Name(s), -in part or in whole, unless explicit written permission is granted by the -Copyright Holder. This restriction applies to all references stored in the -Font Software, such as the font menu name and other font description fields, -which are used to differentiate the font from others. +3) No Modified Version of the Font Software may use the Reserved Font Name(s), in part or in whole, unless explicit written permission is granted by the Copyright Holder. This restriction applies to all references stored in the Font Software, such as the font menu name and other font description fields, which are used to differentiate the font from others. -4) The name(s) of the Copyright Holder or the Author(s) of the Font Software -shall not be used to promote, endorse or advertise any Modified Version, except -to acknowledge the contribution(s) of the Copyright Holder and the Author(s) -or with their explicit written permission. +4) The name(s) of the Copyright Holder or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder and the Author(s) or with their explicit written permission. -5) The Font Software, modified or unmodified, in part or in whole, must be -distributed using this license, and may not be distributed under any other -license. +5) The Font Software, modified or unmodified, in part or in whole, must be distributed using this license, and may not be distributed under any other license. TERMINATION @@ -82,11 +46,4 @@ This license becomes null and void if any of the above conditions are not met. DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, -INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT -SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/options/license/OFL-1.0-RFN b/options/license/OFL-1.0-RFN index ad436fd2c..9673cd20f 100644 --- a/options/license/OFL-1.0-RFN +++ b/options/license/OFL-1.0-RFN @@ -4,77 +4,41 @@ Version 1.0 - 22 November 2005 PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide development -of cooperative font projects, to support the font creation efforts of academic -and linguistic communities, and to provide an open framework in which fonts -may be shared and improved in partnership with others. +The goals of the Open Font License (OFL) are to stimulate worldwide development of cooperative font projects, to support the font creation efforts of academic and linguistic communities, and to provide an open framework in which fonts may be shared and improved in partnership with others. -The OFL allows the licensed fonts to be used, studied, modified and redistributed -freely as long as they are not sold by themselves. The fonts, including any -derivative works, can be bundled, embedded, redistributed and sold with any -software provided that the font names of derivative works are changed. The -fonts and derivatives, however, cannot be released under any other type of -license. +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and sold with any software provided that the font names of derivative works are changed. The fonts and derivatives, however, cannot be released under any other type of license. DEFINITIONS "Font Software" refers to any and all of the following: - - font files + - font files + - data files + - source code + - build scripts + - documentation - - data files +"Reserved Font Name" refers to the Font Software name as seen by users and any other names as specified after the copyright statement. - - source code +"Standard Version" refers to the collection of Font Software components as distributed by the Copyright Holder. - - build scripts +"Modified Version" refers to any derivative font software made by adding to, deleting, or substituting — in part or in whole -- any of the components of the Standard Version, by changing formats or by porting the Font Software to a new environment. - - documentation - -"Reserved Font Name" refers to the Font Software name as seen by users and -any other names as specified after the copyright statement. - -"Standard Version" refers to the collection of Font Software components as -distributed by the Copyright Holder. - -"Modified Version" refers to any derivative font software made by adding to, -deleting, or substituting — in part or in whole -- any of the components of -the Standard Version, by changing formats or by porting the Font Software -to a new environment. - -"Author" refers to any designer, engineer, programmer, technical writer or -other person who contributed to the Font Software. +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Font Software, to use, study, copy, merge, embed, modify, redistribute, -and sell modified and unmodified copies of the Font Software, subject to the -following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: -1) Neither the Font Software nor any of its individual components, in Standard -or Modified Versions, may be sold by itself. +1) Neither the Font Software nor any of its individual components, in Standard or Modified Versions, may be sold by itself. -2) Standard or Modified Versions of the Font Software may be bundled, redistributed -and sold with any software, provided that each copy contains the above copyright -notice and this license. These can be included either as stand-alone text -files, human-readable headers or in the appropriate machine-readable metadata -fields within text or binary files as long as those fields can be easily viewed -by the user. +2) Standard or Modified Versions of the Font Software may be bundled, redistributed and sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. -3) No Modified Version of the Font Software may use the Reserved Font Name(s), -in part or in whole, unless explicit written permission is granted by the -Copyright Holder. This restriction applies to all references stored in the -Font Software, such as the font menu name and other font description fields, -which are used to differentiate the font from others. +3) No Modified Version of the Font Software may use the Reserved Font Name(s), in part or in whole, unless explicit written permission is granted by the Copyright Holder. This restriction applies to all references stored in the Font Software, such as the font menu name and other font description fields, which are used to differentiate the font from others. -4) The name(s) of the Copyright Holder or the Author(s) of the Font Software -shall not be used to promote, endorse or advertise any Modified Version, except -to acknowledge the contribution(s) of the Copyright Holder and the Author(s) -or with their explicit written permission. +4) The name(s) of the Copyright Holder or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder and the Author(s) or with their explicit written permission. -5) The Font Software, modified or unmodified, in part or in whole, must be -distributed using this license, and may not be distributed under any other -license. +5) The Font Software, modified or unmodified, in part or in whole, must be distributed using this license, and may not be distributed under any other license. TERMINATION @@ -82,11 +46,4 @@ This license becomes null and void if any of the above conditions are not met. DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, -INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT -SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/options/license/OFL-1.0-no-RFN b/options/license/OFL-1.0-no-RFN index ad436fd2c..9673cd20f 100644 --- a/options/license/OFL-1.0-no-RFN +++ b/options/license/OFL-1.0-no-RFN @@ -4,77 +4,41 @@ Version 1.0 - 22 November 2005 PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide development -of cooperative font projects, to support the font creation efforts of academic -and linguistic communities, and to provide an open framework in which fonts -may be shared and improved in partnership with others. +The goals of the Open Font License (OFL) are to stimulate worldwide development of cooperative font projects, to support the font creation efforts of academic and linguistic communities, and to provide an open framework in which fonts may be shared and improved in partnership with others. -The OFL allows the licensed fonts to be used, studied, modified and redistributed -freely as long as they are not sold by themselves. The fonts, including any -derivative works, can be bundled, embedded, redistributed and sold with any -software provided that the font names of derivative works are changed. The -fonts and derivatives, however, cannot be released under any other type of -license. +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and sold with any software provided that the font names of derivative works are changed. The fonts and derivatives, however, cannot be released under any other type of license. DEFINITIONS "Font Software" refers to any and all of the following: - - font files + - font files + - data files + - source code + - build scripts + - documentation - - data files +"Reserved Font Name" refers to the Font Software name as seen by users and any other names as specified after the copyright statement. - - source code +"Standard Version" refers to the collection of Font Software components as distributed by the Copyright Holder. - - build scripts +"Modified Version" refers to any derivative font software made by adding to, deleting, or substituting — in part or in whole -- any of the components of the Standard Version, by changing formats or by porting the Font Software to a new environment. - - documentation - -"Reserved Font Name" refers to the Font Software name as seen by users and -any other names as specified after the copyright statement. - -"Standard Version" refers to the collection of Font Software components as -distributed by the Copyright Holder. - -"Modified Version" refers to any derivative font software made by adding to, -deleting, or substituting — in part or in whole -- any of the components of -the Standard Version, by changing formats or by porting the Font Software -to a new environment. - -"Author" refers to any designer, engineer, programmer, technical writer or -other person who contributed to the Font Software. +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Font Software, to use, study, copy, merge, embed, modify, redistribute, -and sell modified and unmodified copies of the Font Software, subject to the -following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: -1) Neither the Font Software nor any of its individual components, in Standard -or Modified Versions, may be sold by itself. +1) Neither the Font Software nor any of its individual components, in Standard or Modified Versions, may be sold by itself. -2) Standard or Modified Versions of the Font Software may be bundled, redistributed -and sold with any software, provided that each copy contains the above copyright -notice and this license. These can be included either as stand-alone text -files, human-readable headers or in the appropriate machine-readable metadata -fields within text or binary files as long as those fields can be easily viewed -by the user. +2) Standard or Modified Versions of the Font Software may be bundled, redistributed and sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. -3) No Modified Version of the Font Software may use the Reserved Font Name(s), -in part or in whole, unless explicit written permission is granted by the -Copyright Holder. This restriction applies to all references stored in the -Font Software, such as the font menu name and other font description fields, -which are used to differentiate the font from others. +3) No Modified Version of the Font Software may use the Reserved Font Name(s), in part or in whole, unless explicit written permission is granted by the Copyright Holder. This restriction applies to all references stored in the Font Software, such as the font menu name and other font description fields, which are used to differentiate the font from others. -4) The name(s) of the Copyright Holder or the Author(s) of the Font Software -shall not be used to promote, endorse or advertise any Modified Version, except -to acknowledge the contribution(s) of the Copyright Holder and the Author(s) -or with their explicit written permission. +4) The name(s) of the Copyright Holder or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder and the Author(s) or with their explicit written permission. -5) The Font Software, modified or unmodified, in part or in whole, must be -distributed using this license, and may not be distributed under any other -license. +5) The Font Software, modified or unmodified, in part or in whole, must be distributed using this license, and may not be distributed under any other license. TERMINATION @@ -82,11 +46,4 @@ This license becomes null and void if any of the above conditions are not met. DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, -INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT -SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/options/license/OFL-1.1 b/options/license/OFL-1.1 index 084c9628a..6fe84ee21 100644 --- a/options/license/OFL-1.1 +++ b/options/license/OFL-1.1 @@ -1,78 +1,38 @@ -Copyright (c) , (), - -with Reserved Font Name . This Font Software is licensed -under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide development -of collaborative font projects, to support the font creation efforts of academic -and linguistic communities, and to provide a free and open framework in which -fonts may be shared and improved in partnership with others. +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. -The OFL allows the licensed fonts to be used, studied, modified and redistributed -freely as long as they are not sold by themselves. The fonts, including any -derivative works, can be bundled, embedded, redistributed and/or sold with -any software provided that any reserved names are not used by derivative works. -The fonts and derivatives, however, cannot be released under any other type -of license. The requirement for fonts to remain under this license does not -apply to any document created using the fonts or their derivatives. +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS -"Font Software" refers to the set of files released by the Copyright Holder(s) -under this license and clearly marked as such. This may include source files, -build scripts and documentation. +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. -"Reserved Font Name" refers to any names specified as such after the copyright -statement(s). +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). -"Modified Version" refers to any derivative made by adding to, deleting, or -substituting — in part or in whole — any of the components of the Original -Version, by changing formats or by porting the Font Software to a new environment. +"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. -"Author" refers to any designer, engineer, programmer, technical writer or -other person who contributed to the Font Software. +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Font Software, to use, study, copy, merge, embed, modify, redistribute, -and sell modified and unmodified copies of the Font Software, subject to the -following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: -1) Neither the Font Software nor any of its individual components, in Original -or Modified Versions, may be sold by itself. +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. -2) Original or Modified Versions of the Font Software may be bundled, redistributed -and/or sold with any software, provided that each copy contains the above -copyright notice and this license. These can be included either as stand-alone -text files, human-readable headers or in the appropriate machine-readable -metadata fields within text or binary files as long as those fields can be -easily viewed by the user. +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. -3) No Modified Version of the Font Software may use the Reserved Font Name(s) -unless explicit written permission is granted by the corresponding Copyright -Holder. This restriction only applies to the primary font name as presented -to the users. +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software -shall not be used to promote, endorse or advertise any Modified Version, except -to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) -or with their explicit written permission. +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. -5) The Font Software, modified or unmodified, in part or in whole, must be -distributed entirely under this license, and must not be distributed under -any other license. The requirement for fonts to remain under this license -does not apply to any document created using the Font Software. +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION @@ -80,11 +40,4 @@ This license becomes null and void if any of the above conditions are not met. DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, -INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT -SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/options/license/OFL-1.1-RFN b/options/license/OFL-1.1-RFN index 084c9628a..6fe84ee21 100644 --- a/options/license/OFL-1.1-RFN +++ b/options/license/OFL-1.1-RFN @@ -1,78 +1,38 @@ -Copyright (c) , (), - -with Reserved Font Name . This Font Software is licensed -under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide development -of collaborative font projects, to support the font creation efforts of academic -and linguistic communities, and to provide a free and open framework in which -fonts may be shared and improved in partnership with others. +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. -The OFL allows the licensed fonts to be used, studied, modified and redistributed -freely as long as they are not sold by themselves. The fonts, including any -derivative works, can be bundled, embedded, redistributed and/or sold with -any software provided that any reserved names are not used by derivative works. -The fonts and derivatives, however, cannot be released under any other type -of license. The requirement for fonts to remain under this license does not -apply to any document created using the fonts or their derivatives. +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS -"Font Software" refers to the set of files released by the Copyright Holder(s) -under this license and clearly marked as such. This may include source files, -build scripts and documentation. +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. -"Reserved Font Name" refers to any names specified as such after the copyright -statement(s). +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). -"Modified Version" refers to any derivative made by adding to, deleting, or -substituting — in part or in whole — any of the components of the Original -Version, by changing formats or by porting the Font Software to a new environment. +"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. -"Author" refers to any designer, engineer, programmer, technical writer or -other person who contributed to the Font Software. +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Font Software, to use, study, copy, merge, embed, modify, redistribute, -and sell modified and unmodified copies of the Font Software, subject to the -following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: -1) Neither the Font Software nor any of its individual components, in Original -or Modified Versions, may be sold by itself. +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. -2) Original or Modified Versions of the Font Software may be bundled, redistributed -and/or sold with any software, provided that each copy contains the above -copyright notice and this license. These can be included either as stand-alone -text files, human-readable headers or in the appropriate machine-readable -metadata fields within text or binary files as long as those fields can be -easily viewed by the user. +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. -3) No Modified Version of the Font Software may use the Reserved Font Name(s) -unless explicit written permission is granted by the corresponding Copyright -Holder. This restriction only applies to the primary font name as presented -to the users. +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software -shall not be used to promote, endorse or advertise any Modified Version, except -to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) -or with their explicit written permission. +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. -5) The Font Software, modified or unmodified, in part or in whole, must be -distributed entirely under this license, and must not be distributed under -any other license. The requirement for fonts to remain under this license -does not apply to any document created using the Font Software. +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION @@ -80,11 +40,4 @@ This license becomes null and void if any of the above conditions are not met. DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, -INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT -SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/options/license/OFL-1.1-no-RFN b/options/license/OFL-1.1-no-RFN index 521f99da2..6fe84ee21 100644 --- a/options/license/OFL-1.1-no-RFN +++ b/options/license/OFL-1.1-no-RFN @@ -1,76 +1,38 @@ -Copyright (c) , (). This Font Software -is licensed under the SIL Open Font License, Version 1.1. - -This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 PREAMBLE -The goals of the Open Font License (OFL) are to stimulate worldwide development -of collaborative font projects, to support the font creation efforts of academic -and linguistic communities, and to provide a free and open framework in which -fonts may be shared and improved in partnership with others. +The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. -The OFL allows the licensed fonts to be used, studied, modified and redistributed -freely as long as they are not sold by themselves. The fonts, including any -derivative works, can be bundled, embedded, redistributed and/or sold with -any software provided that any reserved names are not used by derivative works. -The fonts and derivatives, however, cannot be released under any other type -of license. The requirement for fonts to remain under this license does not -apply to any document created using the fonts or their derivatives. +The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. DEFINITIONS -"Font Software" refers to the set of files released by the Copyright Holder(s) -under this license and clearly marked as such. This may include source files, -build scripts and documentation. +"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. -"Reserved Font Name" refers to any names specified as such after the copyright -statement(s). +"Reserved Font Name" refers to any names specified as such after the copyright statement(s). -"Original Version" refers to the collection of Font Software components as -distributed by the Copyright Holder(s). +"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). -"Modified Version" refers to any derivative made by adding to, deleting, or -substituting — in part or in whole — any of the components of the Original -Version, by changing formats or by porting the Font Software to a new environment. +"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. -"Author" refers to any designer, engineer, programmer, technical writer or -other person who contributed to the Font Software. +"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. PERMISSION & CONDITIONS -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Font Software, to use, study, copy, merge, embed, modify, redistribute, -and sell modified and unmodified copies of the Font Software, subject to the -following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: -1) Neither the Font Software nor any of its individual components, in Original -or Modified Versions, may be sold by itself. +1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. -2) Original or Modified Versions of the Font Software may be bundled, redistributed -and/or sold with any software, provided that each copy contains the above -copyright notice and this license. These can be included either as stand-alone -text files, human-readable headers or in the appropriate machine-readable -metadata fields within text or binary files as long as those fields can be -easily viewed by the user. +2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. -3) No Modified Version of the Font Software may use the Reserved Font Name(s) -unless explicit written permission is granted by the corresponding Copyright -Holder. This restriction only applies to the primary font name as presented -to the users. +3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. -4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software -shall not be used to promote, endorse or advertise any Modified Version, except -to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) -or with their explicit written permission. +4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. -5) The Font Software, modified or unmodified, in part or in whole, must be -distributed entirely under this license, and must not be distributed under -any other license. The requirement for fonts to remain under this license -does not apply to any document created using the Font Software. +5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. TERMINATION @@ -78,11 +40,4 @@ This license becomes null and void if any of the above conditions are not met. DISCLAIMER -THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, -TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE -FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, -INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT -SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. diff --git a/options/license/OGC-1.0 b/options/license/OGC-1.0 index e7227d0b2..1b60c1fc7 100644 --- a/options/license/OGC-1.0 +++ b/options/license/OGC-1.0 @@ -1,39 +1,17 @@ OGC Software License, Version 1.0 -This OGC work (including software, documents, or other related items) is being -provided by the copyright holders under the following license. By obtaining, -using and/or copying this work, you (the licensee) agree that you have read, -understood, and will comply with the following terms and conditions: +This OGC work (including software, documents, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions: -Permission to use, copy, and modify this software and its documentation, with -or without modification, for any purpose and without fee or royalty is hereby -granted, provided that you include the following on ALL copies of the software -and documentation or portions thereof, including modifications, that you make: +Permission to use, copy, and modify this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make: -1. The full text of this NOTICE in a location viewable to users of the redistributed -or derivative work. +1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. -2. Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. If none exist, a short notice of the following form (hypertext -is preferred, text is permitted) should be used within the body of any redistributed -or derivative code: "Copyright © [$date-of-document] Open Geospatial Consortium, -Inc. All Rights Reserved. http://www. ogc .org/ogc/legal (Hypertext is preferred, -but a textual representation is permitted.) +2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © [$date-of-document] Open Geospatial Consortium, Inc. All Rights Reserved. http://www.ogc.org/ogc/legal (Hypertext is preferred, but a textual representation is permitted.) -3. Notice of any changes or modifications to the OGC files, including the -date changes were made. (We recommend you provide URIs to the location from -which the code is derived.) +3. Notice of any changes or modifications to the OGC files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.) -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS -MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE -OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD -PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. -The name and trademarks of copyright holders may NOT be used in advertising -or publicity pertaining to the software without specific, written prior permission. -Title to copyright in this software and any associated documentation will -at all times remain with copyright holders. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders. diff --git a/options/license/OGDL-Taiwan-1.0 b/options/license/OGDL-Taiwan-1.0 new file mode 100644 index 000000000..7f9e64b5c --- /dev/null +++ b/options/license/OGDL-Taiwan-1.0 @@ -0,0 +1,141 @@ +政府資料開放授權條款-第1版 + +中華民國104年7月27日訂定 + +為便利民眾共享及應用政府資料、促進及活化政府資料應用、結合民間創意提升政府資料品質及價值、優化政府服務品質,訂定本條款。 + +一、定義 + +(一)資料提供機關:指將職權範圍內取得或作成之各類電子資料,透過本條款釋出予公眾之政府機關(構)、公營事業機構、公立學校及行政法人。 + +(二)使用者:指依本條款規定取得開放資料,並對其利用之自然人、法人或團體,包括依本條款授權使用者再轉授權利用之人或團體。 + +(三)開放資料:指資料提供機關擁有完整著作財產權,或經授權得再轉授權第三人利用之資料,並以公開、可修改,且無不必要技術限制之格式提供者,包括但不限於下列著作: + + 1. 編輯著作:選擇、編排具有創作性,而可受著作權法保護之資料庫或其他結構化資料組合。 + + 2. 素材:指開放資料集合物中,其他可受著作權法保護之獨立著作。 + +(四)衍生物:指依本條款所提供之開放資料,進行後續重製、改作、編輯或為其他方式利用之修改物。 + +(五)資訊:指不受著作權法保護之純粹紀錄,並隨同開放資料一併提供者。前揭資訊除本條款授與權利之規定外,比照有關開放資料之規定辦理。 + +二、授與權利 + +(一)各機關所提供之開放資料,授權使用者不限目的、時間及地域、非專屬、不可撤回、免授權金進行利用,利用之方式包括重製、散布、公開傳輸、公開播送、公開口述、公開上映、公開演出、編輯、改作,包括但不限於開發各種產品或服務型態之衍生物。 + +(二)使用者得再轉授權他人為前項之利用。 + +(三)使用者依本條款規定利用開放資料,無須另行取得各資料提供機關之書面或其他方式授權。 + +(四)本條款之授權範圍不包括專利權及商標權。 + +三、課予義務 + +(一)使用者利用依本條款提供之開放資料,視為同意遵守本條款之各項規定,並應以尊重第三人著作人格權之方式利用之。 + +(二)使用者利用依本條款提供之開放資料,及後續之衍生物,應以符合附件所示「顯名聲明」要求之方式,明確標示原資料提供機關之相關聲明;未盡顯名標示義務者,視為自始未取得開放資料之授權。 + +四、版本更新及授權轉換 + +(一)本條款如有修正,依舊條款提供之開放資料,於新條款公告時,使用者得選擇採用新條款利用。但原資料提供機關,於提供開放資料時,已訂明其使用之特定版本條款者,不在此限。 + +(二)本條款與「創用CC授權 姓名標示 4.0 國際版本」相容,使用者依本條款利用開放資料,如後續以「創用CC授權 姓名標示 4.0 國際版本」規定之方式利用,視為符合本條款之規定。 + +五、停止提供 + +有下列情形之一者,各資料提供機關得停止全部或一部開放資料之提供,使用者不得向資料提供機關請求任何賠償或補償: + + 1. 因情事變更或其他正當事由,致各資料提供機關評估繼續提供該開放資料供公眾使用,已不符合公共利益之要求。 + + 2. 所提供之開放資料,有侵害第三人智慧財產權、隱私權或其他法律上利益之虞。 + +六、免責聲明 + +(一)依本條款提供之開放資料,不構成任何資料提供機關申述、保證或暗示其推薦、同意、許可或核准之意思表示;各資料提供機關僅於知悉其所提供之開放資料有錯誤或遺漏時,負修正及補充之責。 + +(二)使用者利用依本條款提供之開放資料,受有損害或損失,或致第三人受有損害或損失,而遭求償者,除法令另有規定外,各資料提供機關不負任何賠償或補償之責。 + +(三)使用者利用依本條款提供之開放資料,因故意或過失,致資料提供機關遭受損害,或第三人因此向資料提供機關請求賠償損害,使用者應對各機關負賠償責任。 + +七、準據法 + +本條款之解釋、效力、履行及其他未盡事宜,以中華民國法律為準據法。 + +附件:顯名聲明 + + 1. 提供機關/單位 [年份] [開放資料釋出名稱與版本號] + + 2. 此開放資料依政府資料開放授權條款 (Open Government Data License) 進行公眾釋出,使用者於遵守本條款各項規定之前提下,得利用之。 + + 3. 政府資料開放授權條款:https://data.gov.tw/license + +Open Government Data License, version 1.0 + +The Open Government Data License (the License) is intended to facilitate government data sharing and application among the public in outreaching and promotion method, and to advance government service efficacy and government data value and quality in collaboration with the creative private sector. + +1. Definition + +1.1. "Data Providing Organization" refers to government agency, government-owned business, public school and administrative legal entity that has various types of electronic data released to the public under the License when it is obtained or made in the scope of performance for public duties. + +1.2. "User" refers to individual, legal entity or group that receives and uses Open Data under the License, including individual, legal entity or group who is receiving and using Open Data as the recipient of the former Users under the sublicensing scenario. + +1.3. "Open Data" means data that the Data Providing Organization owns its copyright in whole or has full authority to provide it to third parties in sublicensing way, and provides it in an open and modifiable form such that there are no unnecessary technological obstacles to the performance of the licensed rights, including but not limited to the following creation protected by copyright: + + a. "Compilation Work" means a work formed by the creative selection and arrangement of data, and can be protected by copyright law, such as database or other qualified structured data combination. + + b. "Material" means a separate work, that is collected into the Open Data aggregation and can be protected by copyright law independently. + +1.4. "Derivative Work" means any adaptation based upon the Open Data provided under the License and in which the original data is reproduced, adapted, compiled, or otherwise modified. + +1.5. "Information" means the pure record that is not subject to copyright law and providing along with the Open Data. Accordingly, the granting of copyright license hereunder does not apply to such Information, however, other provisions of the License shall be applied to it as well as to the Open Data. + +2. Grant of Copyright License + +2.1. The Data Providing Organization grants User a perpetual, worldwide, non-exclusive, irrevocable, royalty-free copyright license to reproduce, distribute, publicly transmit, publicly broadcast, publicly recite, publicly present, publicly perform, compile, adapt to the Open Data provided for any purpose, including but not limited to making all kinds of Derivative Works either as products or services. + +2.2. User can sublicense the copyrights which he/she is granted through 2.1. to others. + +2.3. Any additional written offer or other formality for copyright license from the Data Providing Organization is not required, if User makes use of Open Data in compliance with the License. + +2.4. The License does not grant any rights in the patents and trademarks. + +3. Condition and Obligation + +3.1. By utilizing the Open Data provided under the License, User indicates his/her acceptance of this License and all its terms and conditions overall to do so, and shall make the reasonable efforts with respect to moral right protection of the third parties involved. + +3.2. When User makes use of the Open Data and its Derivative Work, he/she must make an explicit notice of statement as attribution requested in the Exhibit below by the Data Providing Organization. If User fails to comply with the attribution requirement, the rights granted under this License shall be deemed to have been void ab initio. + +4. License Version and Compatibility + +4.1. When a new version of the License has been updated and declared, if not the Data Providing Organization has already appointed a specific version of the License for the Open Data it provided, User may make use of the Open Data under the terms of the version of the License under which he/she originally received, or under the terms of any subsequent version published thereafter. + +4.2. The License is compatible with the Creative Commons Attribution License 4.0 International. This means that when the Open Data is provided under the License, User automatically satisfies the conditions of this License when he/she makes use of the Open Data in compliance with the Creative Commons Attribution License 4.0 International thereafter. + +5. Cessation of Data Providing + +5.1. Under the circumstances described hereunder, the Data Providing Organization may cease to provide all or part of a specific Open Data, and User shall not claim any damages or compensations on account of that to the provider: + + a. It has been evaluated by the Data Providing Organization that continuously providing of a specific Open Data as not being met the requirement of public interest due to the change of circumstances unpredictable or for a legitimate cause. + + b. A provided Open Data might jeopardize third parties' intellectual property rights, privacy rights, or other interests protected at law. + +6. Disclaimer + +6.1. The providing of Open Data under the License shall not be construed as any statement, warranty, or implication to the recommendation, permission, approval, or sanction of all kinds of authoritative declaration of intention made by the Data Providing Organization. And the Data Providing Organization shall only be liable to make the correcting and updating when the errors or omissions of Open Data provided by it has been acknowledged. + +6.2. The Data Providing Organization shall not be liable for damage or loss User encounters when he/she makes use of the Open Data provided under the License. This disclaimer applies as well when User has third parties encountered damage or loss and thus has been claimed for remedies. Unless otherwise specified according to law, the Data Providing Organization shall not be held responsible for any damages or compensations herein. + +6.3. User shall be liable for the damages to the Data Providing Organization, if he/she has used the Open Data provided wrongfully due to an intentional or negligent misconduct and caused damages to the Data Providing Organization. The same reimbursement rule for wrongful misconducting shall be applied to the User when the damaged one is a third party and the compensations have already been disbursed by the Data Providing Organization to the third party due to a legal claim. + +7. Governing Law + +7.1. The interpretation, validity, enforcement and matters not mentioned herein for the License is governed by the Laws of Republic of China (Taiwan). + +Exhibit - Attribution + + a. Data Providing Organization/Agency [year] [distinguishing full name of the released Open Data and its version number] + + b. The Open Data is made available to the public under the Open Government Data License, User can make use of it when complying to the condition and obligation of its terms. + + c. Open Government Data License:https://data.gov.tw/license diff --git a/options/license/OGL-Canada-2.0 b/options/license/OGL-Canada-2.0 index 67df0d528..d638334a1 100644 --- a/options/license/OGL-Canada-2.0 +++ b/options/license/OGL-Canada-2.0 @@ -1,105 +1,51 @@ Open Government Licence - Canada -You are encouraged to use the Information that is available under this licence -with only a few conditions. +You are encouraged to use the Information that is available under this licence with only a few conditions. Using Information under this licence - - * Use of any Information indicates your acceptance of the terms below. - -* The Information Provider grants you a worldwide, royalty-free, perpetual, -non-exclusive licence to use the Information, including for commercial purposes, -subject to the terms below. +* Use of any Information indicates your acceptance of the terms below. +* The Information Provider grants you a worldwide, royalty-free, perpetual, non-exclusive licence to use the Information, including for commercial purposes, subject to the terms below. You are free to: - -* Copy, modify, publish, translate, adapt, distribute or otherwise use the -Information in any medium, mode or format for any lawful purpose. +* Copy, modify, publish, translate, adapt, distribute or otherwise use the Information in any medium, mode or format for any lawful purpose. You must, where you do any of the above: +* Acknowledge the source of the Information by including any attribution statement specified by the Information Provider(s) and, where possible, provide a link to this licence. +* If the Information Provider does not provide a specific attribution statement, or if you are using Information from several information providers and multiple attributions are not practical for your product or application, you must use the following attribution statement: + Contains information licensed under the Open Government Licence – Canada. -* Acknowledge the source of the Information by including any attribution statement -specified by the Information Provider(s) and, where possible, provide a link -to this licence. - -* If the Information Provider does not provide a specific attribution statement, -or if you are using Information from several information providers and multiple -attributions are not practical for your product or application, you must use -the following attribution statement: - - Contains information licensed under the Open Government Licence – Canada. - -The terms of this licence are important, and if you fail to comply with any -of them, the rights granted to you under this licence, or any similar licence -granted by the Information Provider, will end automatically. +The terms of this licence are important, and if you fail to comply with any of them, the rights granted to you under this licence, or any similar licence granted by the Information Provider, will end automatically. Exemptions - This licence does not grant you any right to use: - - * Personal Information; - - * third party rights the Information Provider is not authorized to license; - -* the names, crests, logos, or other official symbols of the Information Provider; -and - -* Information subject to other intellectual property rights, including patents, -trade-marks and official marks. +* Personal Information; +* third party rights the Information Provider is not authorized to license; +* the names, crests, logos, or other official symbols of the Information Provider; and +* Information subject to other intellectual property rights, including patents, trade-marks and official marks. Non-endorsement - -This licence does not grant you any right to use the Information in a way -that suggests any official status or that the Information Provider endorses -you or your use of the Information. +This licence does not grant you any right to use the Information in a way that suggests any official status or that the Information Provider endorses you or your use of the Information. No Warranty +The Information is licensed “as is”, and the Information Provider excludes all representations, warranties, obligations, and liabilities, whether express or implied, to the maximum extent permitted by law. -The Information is licensed "as is", and the Information Provider excludes -all representations, warranties, obligations, and liabilities, whether express -or implied, to the maximum extent permitted by law. - -The Information Provider is not liable for any errors or omissions in the -Information, and will not under any circumstances be liable for any direct, -indirect, special, incidental, consequential, or other loss, injury or damage -caused by its use or otherwise arising in connection with this licence or -the Information, even if specifically advised of the possibility of such loss, -injury or damage. +The Information Provider is not liable for any errors or omissions in the Information, and will not under any circumstances be liable for any direct, indirect, special, incidental, consequential, or other loss, injury or damage caused by its use or otherwise arising in connection with this licence or the Information, even if specifically advised of the possibility of such loss, injury or damage. Governing Law +This licence is governed by the laws of the province of Ontario and the applicable laws of Canada. -This licence is governed by the laws of the province of Ontario and the applicable -laws of Canada. - -Legal proceedings related to this licence may only be brought in the courts -of Ontario or the Federal Court of Canada. +Legal proceedings related to this licence may only be brought in the courts of Ontario or the Federal Court of Canada. Definitions - In this licence, the terms below have the following meanings: -"Information" +"Information" means information resources protected by copyright or other information that is offered for use under the terms of this licence. -means information resources protected by copyright or other information that -is offered for use under the terms of this licence. +"Information Provider" means Her Majesty the Queen in right of Canada. -"Information Provider" +“Personal Information” means “personal information” as defined in section 3 of the Privacy Act, R.S.C. 1985, c. P-21. -means Her Majesty the Queen in right of Canada. - -"Personal Information" - -means "personal information" as defined in section 3 of the Privacy Act, R.S.C. -1985, c. P-21. - -"You" - -means the natural or legal person, or body of persons corporate or incorporate, -acquiring rights under this licence. +"You" means the natural or legal person, or body of persons corporate or incorporate, acquiring rights under this licence. Versioning - -This is version 2.0 of the Open Government Licence – Canada. The Information -Provider may make changes to the terms of this licence from time to time and -issue a new version of the licence. Your use of the Information will be governed -by the terms of the licence in force as of the date you accessed the information. +This is version 2.0 of the Open Government Licence – Canada. The Information Provider may make changes to the terms of this licence from time to time and issue a new version of the licence. Your use of the Information will be governed by the terms of the licence in force as of the date you accessed the information. diff --git a/options/license/OGL-UK-1.0 b/options/license/OGL-UK-1.0 index 2faa50c96..a761c9916 100644 --- a/options/license/OGL-UK-1.0 +++ b/options/license/OGL-UK-1.0 @@ -1,144 +1,69 @@ Open Government Licence v1.0 -You are encouraged to use and re-use the Information that is available under -this licence, the Open Government Licence, freely and flexibly, with only -a few conditions. +You are encouraged to use and re-use the Information that is available under this licence, the Open Government Licence, freely and flexibly, with only a few conditions. +Using information under this licence -Using Information under this licence +Use of copyright and database right material expressly made available under this licence (the ‘Information’) indicates your acceptance of the terms and conditions below. -Use of copyright and database right material expressly made available under -this licence (the 'Information') indicates your acceptance of the terms and -conditions below. +The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive licence to use the Information subject to the conditions below. -The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive -licence to use the Information subject to the conditions below. - -This licence does not affect your freedom under fair dealing or fair use or -any other copyright or database right exceptions and limitations. +This licence does not affect your freedom under fair dealing or fair use or any other copyright or database right exceptions and limitations. You are free to: - - copy, publish, distribute and transmit the Information; - - adapt the Information; - -exploit the Information commercially for example, by combining it with other -Information, or by including it in your own product or application. + copy, publish, distribute and transmit the Information; + adapt the Information; + exploit the Information commercially for example, by combining it with other Information, or by including it in your own product or application. You must, where you do any of the above: + acknowledge the source of the Information by including any attribution statement specified by the Information Provider(s) and, where possible, provide a link to this licence; +  If the Information Provider does not provide a specific attribution statement, or if you are using Information from several Information Providers and multiple attributions are not practical in your product or application, you may consider using the following:
 Contains public sector information licensed under the Open Government Licence v1.0. + ensure that you do not use the Information in a way that suggests any official status or that the Information Provider endorses you or your use of the Information; + ensure that you do not mislead others or misrepresent the Information or its source; + ensure that your use of the Information does not breach the Data Protection Act 1998 or the Privacy and Electronic Communications (EC Directive) Regulations 2003. -acknowledge the source of the Information by including any attribution statement -specified by the Information Provider(s) and, where possible, provide a link -to this licence; +These are important conditions of this licence and if you fail to comply with them the rights granted to you under this licence, or any similar licence granted by the Licensor, will end automatically. -If the Information Provider does not provide a specific attribution statement, -or if you are using Information from several Information Providers and multiple -attributions are not practical in your product or application, you may consider -using the following: - -Contains public sector information licensed under the Open Government Licence -v1.0. - -ensure that you do not use the Information in a way that suggests any official -status or that the Information Provider endorses you or your use of the Information; - -ensure that you do not mislead others or misrepresent the Information or its -source; - -ensure that your use of the Information does not breach the Data Protection -Act 1998 or the Privacy and Electronic Communications (EC Directive) Regulations -2003. - -These are important conditions of this licence and if you fail to comply with -them the rights granted to you under this licence, or any similar licence -granted by the Licensor, will end automatically. - -Exemptions + Exemptions This licence does not cover the use of: - - - personal data in the Information; - -- Information that has neither been published nor disclosed under information -access legislation (including the Freedom of Information Acts for the UK and -Scotland) by or with the consent of the Information Provider; - -- departmental or public sector organisation logos, crests and the Royal Arms -except where they form an integral part of a document or dataset; - - - military insignia; - - - third party rights the Information Provider is not authorised to license; - -- Information subject to other intellectual property rights, including patents, -trademarks, and design rights; and - - - identity documents such as the British Passport. + - personal data in the Information; + - Information that has neither been published nor disclosed under information access legislation (including the Freedom of Information Acts for the UK and Scotland) by or with the consent of the Information Provider; + - departmental or public sector organisation logos, crests and the Royal Arms except where they form an integral part of a document or dataset; + - military insignia; + - third party rights the Information Provider is not authorised to license; + - Information subject to other intellectual property rights, including patents, trademarks, and design rights; and + - identity documents such as the British Passport. No warranty -The Information is licensed 'as is' and the Information Provider excludes -all representations, warranties, obligations and liabilities in relation to -the Information to the maximum extent permitted by law. +The Information is licensed ‘as is’ and the Information Provider excludes all representations, warranties, obligations and liabilities in relation to the Information to the maximum extent permitted by law. -The Information Provider is not liable for any errors or omissions in the -Information and shall not be liable for any loss, injury or damage of any -kind caused by its use. The Information Provider does not guarantee the continued -supply of the Information. +The Information Provider is not liable for any errors or omissions in the Information and shall not be liable for any loss, injury or damage of any kind caused by its use. The Information Provider does not guarantee the continued supply of the Information. Governing Law -This licence is governed by the laws of the jurisdiction in which the Information -Provider has its principal place of business, unless otherwise specified by -the Information Provider. +This licence is governed by the laws of the jurisdiction in which the Information Provider has its principal place of business, unless otherwise specified by the Information Provider. Definitions In this licence, the terms below have the following meanings: -'Information' means information protected by copyright or by database right -(for example, literary and artistic works, content, data and source code) -offered for use under the terms of this licence. +‘Information’
means information protected by copyright or by database right (for example, literary and artistic works, content, data and source code) offered for use under the terms of this licence. -'Information Provider' means the person or organisation providing the Information -under this licence. +‘Information Provider’
means the person or organisation providing the Information under this licence. -'Licensor' means any Information Provider which has the authority to offer -Information under the terms of this licence or the Controller of Her Majesty's -Stationery Office, who has the authority to offer Information subject to Crown -copyright and Crown database rights and Information subject to copyright and -database right that has been assigned to or acquired by the Crown, under the -terms of this licence. +‘Licensor’
means any Information Provider which has the authority to offer Information under the terms of this licence or the Controller of Her Majesty’s Stationery Office, who has the authority to offer Information subject to Crown copyright and Crown database rights and Information subject to copyright and database right that has been assigned to or acquired by the Crown, under the terms of this licence. -'Use' as a verb, means doing any act which is restricted by copyright or database -right, whether in the original medium or in any other medium, and includes -without limitation distributing, copying, adapting, modifying as may be technically -necessary to use it in a different mode or format. +‘Use’
as a verb, means doing any act which is restricted by copyright or database right, whether in the original medium or in any other medium, and includes without limitation distributing, copying, adapting, modifying as may be technically necessary to use it in a different mode or format. -'You' means the natural or legal person, or body of persons corporate or incorporate, -acquiring rights under this licence. +‘You’
means the natural or legal person, or body of persons corporate or incorporate, acquiring rights under this licence. About the Open Government Licence +The Controller of Her Majesty’s Stationery Office (HMSO) has developed this licence as a tool to enable Information Providers in the public sector to license the use and re-use of their Information under a common open licence. The Controller invites public sector bodies owning their own copyright and database rights to permit the use of their Information under this licence. -The Controller of Her Majesty's Stationery Office (HMSO) has developed this -licence as a tool to enable Information Providers in the public sector to -license the use and re-use of their Information under a common open licence. -The Controller invites public sector bodies owning their own copyright and -database rights to permit the use of their Information under this licence. +The Controller of HMSO has authority to license Information subject to copyright and database right owned by the Crown. The extent of the Controller’s offer to license this Information under the terms of this licence is set out in the UK Government Licensing Framework. -The Controller of HMSO has authority to license Information subject to copyright -and database right owned by the Crown. The extent of the Controller's offer -to license this Information under the terms of this licence is set out in -the UK Government Licensing Framework. +This is version 1.0 of the Open Government Licence. The Controller of HMSO may, from time to time, issue new versions of the Open Government Licence. However, you may continue to use Information licensed under this version should you wish to do so. +These terms have been aligned to be interoperable with any Creative Commons Attribution Licence, which covers copyright, and Open Data Commons Attribution License, which covers database rights and applicable copyrights. -This is version 1.0 of the Open Government Licence. The Controller of HMSO -may, from time to time, issue new versions of the Open Government Licence. -However, you may continue to use Information licensed under this version should -you wish to do so. - -These terms have been aligned to be interoperable with any Creative Commons -Attribution Licence, which covers copyright, and Open Data Commons Attribution -License, which covers database rights and applicable copyrights. - -Further context, best practice and guidance can be found in the UK Government -Licensing Framework section on The National Archives website. +Further context, best practice and guidance can be found in the UK Government Licensing Framework section on The National Archives website. diff --git a/options/license/OGL-UK-2.0 b/options/license/OGL-UK-2.0 index 5d71a909f..319c1b53a 100644 --- a/options/license/OGL-UK-2.0 +++ b/options/license/OGL-UK-2.0 @@ -1,143 +1,72 @@ Open Government Licence v2.0 -You are encouraged to use and re-use the Information that is available under -this licence freely and flexibly, with only a few conditions. +You are encouraged to use and re-use the Information that is available under this licence freely and flexibly, with only a few conditions. Using Information under this licence +Use of copyright and database right material expressly made available under this licence (the ‘Information’) indicates your acceptance of the terms and conditions below. -Use of copyright and database right material expressly made available under -this licence (the 'Information') indicates your acceptance of the terms and -conditions below. +The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive licence to use the Information subject to the conditions below. -The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive -licence to use the Information subject to the conditions below. - -This licence does not affect your freedom under fair dealing or fair use or -any other copyright or database right exceptions and limitations. +This licence does not affect your freedom under fair dealing or fair use or any other copyright or database right exceptions and limitations. You are free to: - - copy, publish, distribute and transmit the Information; - - adapt the Information; - -exploit the Information commercially and non-commercially for example, by -combining it with other Information, or by including it in your own product -or application. - +copy, publish, distribute and transmit the Information; +adapt the Information; +exploit the Information commercially and non-commercially for example, by combining it with other Information, or by including it in your own product or application. You must, where you do any of the above: +acknowledge the source of the Information by including any attribution statement specified by the Information Provider(s) and, where possible, provide a link to this licence; + If the Information Provider does not provide a specific attribution statement, or if you are using Information from several Information Providers and multiple attributions are not practical in your product or application, you may use the following: -acknowledge the source of the Information by including any attribution statement -specified by the Information Provider(s) and, where possible, provide a link -to this licence; + Contains public sector information licensed under the Open Government Licence v2.0. -If the Information Provider does not provide a specific attribution statement, -or if you are using Information from several Information Providers and multiple -attributions are not practical in your product or application, you may use -the following: - -Contains public sector information licensed under the Open Government Licence -v2.0. - -These are important conditions of this licence and if you fail to comply with -them the rights granted to you under this licence, or any similar licence -granted by the Licensor, will end automatically. - -Exemptions +These are important conditions of this licence and if you fail to comply with them the rights granted to you under this licence, or any similar licence granted by the Licensor, will end automatically. + Exemptions This licence does not cover: - personal data in the Information; - -information that has neither been published nor disclosed under information -access legislation (including the Freedom of Information Acts for the UK and -Scotland) by or with the consent of the Information Provider; - -departmental or public sector organisation logos, crests and the Royal Arms -except where they form an integral part of a document or dataset; - - military insignia; - - third party rights the Information Provider is not authorised to license; - -other intellectual property rights, including patents, trade marks, and design -rights; and - - identity documents such as the British Passport - +personal data in the Information; +information that has neither been published nor disclosed under information access legislation (including the Freedom of Information Acts for the UK and Scotland) by or with the consent of the Information Provider; +departmental or public sector organisation logos, crests and the Royal Arms except where they form an integral part of a document or dataset; +military insignia; +third party rights the Information Provider is not authorised to license; +other intellectual property rights, including patents, trade marks, and design rights; and +identity documents such as the British Passport Non-endorsement - -This licence does not grant you any right to use the Information in a way -that suggests any official status or that the Information Provider endorses -you or your use of the Information. +This licence does not grant you any right to use the Information in a way that suggests any official status or that the Information Provider endorses you or your use of the Information. Non warranty +The Information is licensed ‘as is’ and the Information Provider excludes all representations, warranties, obligations and liabilities in relation to the Information to the maximum extent permitted by law. -The Information is licensed 'as is' and the Information Provider excludes -all representations, warranties, obligations and liabilities in relation to -the Information to the maximum extent permitted by law. - -The Information Provider is not liable for any errors or omissions in the -Information and shall not be liable for any loss, injury or damage of any -kind caused by its use. The Information Provider does not guarantee the continued -supply of the Information. +The Information Provider is not liable for any errors or omissions in the Information and shall not be liable for any loss, injury or damage of any kind caused by its use. The Information Provider does not guarantee the continued supply of the Information. Governing Law - -This licence is governed by the laws of the jurisdiction in which the Information -Provider has its principal place of business, unless otherwise specified by -the Information Provider. +This licence is governed by the laws of the jurisdiction in which the Information Provider has its principal place of business, unless otherwise specified by the Information Provider. Definitions - In this licence, the terms below have the following meanings: -'Information' means information protected by copyright or by database right -(for example, literary and artistic works, content, data and source code) -offered for use under the terms of this licence. +‘Information’ +means information protected by copyright or by database right (for example, literary and artistic works, content, data and source code) offered for use under the terms of this licence. -'Information Provider' means the person or organisation providing the Information -under this licence. +‘Information Provider’ +means the person or organisation providing the Information under this licence. -'Licensor' means any Information Provider who has the authority to offer Information -under the terms of this licence. It includes the Controller of Her Majesty's -Stationery Office, who has the authority to offer Information subject to Crown -copyright and Crown database rights, and Information subject to copyright -and database rights which have been assigned to or acquired by the Crown, -under the terms of this licence. +‘Licensor’ +means any Information Provider who has the authority to offer Information under the terms of this licence. It includes the Controller of Her Majesty’s Stationery Office, who has the authority to offer Information subject to Crown copyright and Crown database rights, and Information subject to copyright and database rights which have been assigned to or acquired by the Crown, under the terms of this licence. -'Use' means doing any act which is restricted by copyright or database right, -whether in the original medium or in any other medium, and includes without -limitation distributing, copying, adapting, modifying as may be technically -necessary to use it in a different mode or format. +‘Use’ +means doing any act which is restricted by copyright or database right, whether in the original medium or in any other medium, and includes without limitation distributing, copying, adapting, modifying as may be technically necessary to use it in a different mode or format. -'You' means the natural or legal person, or body of persons corporate or incorporate, -acquiring rights under this licence. +‘You’ +means the natural or legal person, or body of persons corporate or incorporate, acquiring rights under this licence. About the Open Government Licence +The Controller of Her Majesty’s Stationery Office (HMSO) has developed this licence as a tool to enable Information Providers in the public sector to license the use and re-use of their Information under a common open licence. The Controller invites public sector bodies owning their own copyright and database rights to permit the use of their Information under this licence. -The Controller of Her Majesty's Stationery Office (HMSO) has developed this -licence as a tool to enable Information Providers in the public sector to -license the use and re-use of their Information under a common open licence. -The Controller invites public sector bodies owning their own copyright and -database rights to permit the use of their Information under this licence. +The Controller of HMSO has authority to license Information subject to copyright and database right owned by the Crown. The extent of the Controller’s offer to license this Information under the terms of this licence is set out on The National Archives website. -The Controller of HMSO has authority to license Information subject to copyright -and database right owned by the Crown. The extent of the Controller's offer -to license this Information under the terms of this licence is set out on -The National Archives website. +This is version 2.0 of the Open Government Licence. The Controller of HMSO may, from time to time, issue new versions of the Open Government Licence. If you are already using Information under a previous version of the Open Government Licence, the terms of that licence will continue to apply. -This is version 2.0 of the Open Government Licence. The Controller of HMSO -may, from time to time, issue new versions of the Open Government Licence. -If you are already using Information under a previous version of the Open -Government Licence, the terms of that licence will continue to apply. +These terms are compatible with the Creative Commons Attribution License 4.0 and the Open Data Commons Attribution License, both of which license copyright and database rights. This means that when the Information is adapted and licensed under either of those licences, you automatically satisfy the conditions of the OGL when you comply with the other licence. The OGLv2.0 is Open Definition compliant. -These terms are compatible with the Creative Commons Attribution License 4.0 -and the Open Data Commons Attribution License, both of which license copyright -and database rights. This means that when the Information is adapted and licensed -under either of those licences, you automatically satisfy the conditions of -the OGL when you comply with the other licence. The OGLv2.0 is Open Definition -compliant. - -Further context, best practice and guidance can be found in the UK Government -Licensing Framework section on The National Archives website. +Further context, best practice and guidance can be found in the UK Government Licensing Framework section on The National Archives website. diff --git a/options/license/OGL-UK-3.0 b/options/license/OGL-UK-3.0 index 86f3c87e2..febac4164 100644 --- a/options/license/OGL-UK-3.0 +++ b/options/license/OGL-UK-3.0 @@ -1,148 +1,69 @@ Open Government Licence v3.0 -You are encouraged to use and re-use the Information that is available under -this licence freely and flexibly, with only a few conditions. +You are encouraged to use and re-use the Information that is available under this licence freely and flexibly, with only a few conditions. Using Information under this licence +Use of copyright and database right material expressly made available under this licence (the 'Information') indicates your acceptance of the terms and conditions below. -Use of copyright and database right material expressly made available under -this licence (the 'Information') indicates your acceptance of the terms and -conditions below. +The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive licence to use the Information subject to the conditions below. -The Licensor grants you a worldwide, royalty-free, perpetual, non-exclusive -licence to use the Information subject to the conditions below. - -This licence does not affect your freedom under fair dealing or fair use or -any other copyright or database right exceptions and limitations. +This licence does not affect your freedom under fair dealing or fair use or any other copyright or database right exceptions and limitations. You are free to: - - copy, publish, distribute and transmit the Information; - - adapt the Information; - -exploit the Information commercially and non-commercially for example, by -combining it with other Information, or by including it in your own product -or application. - +copy, publish, distribute and transmit the Information; +adapt the Information; +exploit the Information commercially and non-commercially for example, by combining it with other Information, or by including it in your own product or application. You must (where you do any of the above): +acknowledge the source of the Information in your product or application by including or linking to any attribution statement specified by the Information Provider(s) and, where possible, provide a link to this licence; + If the Information Provider does not provide a specific attribution statement, you must use the following: -acknowledge the source of the Information in your product or application by -including or linking to any attribution statement specified by the Information -Provider(s) and, where possible, provide a link to this licence; + Contains public sector information licensed under the Open Government Licence v3.0. -If the Information Provider does not provide a specific attribution statement, -you must use the following: +If you are using Information from several Information Providers and listing multiple attributions is not practical in your product or application, you may include a URI or hyperlink to a resource that contains the required attribution statements. -Contains public sector information licensed under the Open Government Licence -v3.0. - -If you are using Information from several Information Providers and listing -multiple attributions is not practical in your product or application, you -may include a URI or hyperlink to a resource that contains the required attribution -statements. - -These are important conditions of this licence and if you fail to comply with -them the rights granted to you under this licence, or any similar licence -granted by the Licensor, will end automatically. - -Exemptions +These are important conditions of this licence and if you fail to comply with them the rights granted to you under this licence, or any similar licence granted by the Licensor, will end automatically. + Exemptions This licence does not cover: - personal data in the Information; - -Information that has not been accessed by way of publication or disclosure -under information access legislation (including the Freedom of Information -Acts for the UK and Scotland) by or with the consent of the Information Provider; - -departmental or public sector organisation logos, crests and the Royal Arms -except where they form an integral part of a document or dataset; - - military insignia; - - third party rights the Information Provider is not authorised to license; - -other intellectual property rights, including patents, trade marks, and design -rights; and - - identity documents such as the British Passport - +personal data in the Information; +Information that has not been accessed by way of publication or disclosure under information access legislation (including the Freedom of Information Acts for the UK and Scotland) by or with the consent of the Information Provider; +departmental or public sector organisation logos, crests and the Royal Arms except where they form an integral part of a document or dataset; +military insignia; +third party rights the Information Provider is not authorised to license; +other intellectual property rights, including patents, trade marks, and design rights; and +identity documents such as the British Passport Non-endorsement - -This licence does not grant you any right to use the Information in a way -that suggests any official status or that the Information Provider and/or -Licensor endorse you or your use of the Information. +This licence does not grant you any right to use the Information in a way that suggests any official status or that the Information Provider and/or Licensor endorse you or your use of the Information. No warranty +The Information is licensed 'as is' and the Information Provider and/or Licensor excludes all representations, warranties, obligations and liabilities in relation to the Information to the maximum extent permitted by law. -The Information is licensed 'as is' and the Information Provider and/or Licensor -excludes all representations, warranties, obligations and liabilities in relation -to the Information to the maximum extent permitted by law. - -The Information Provider and/or Licensor are not liable for any errors or -omissions in the Information and shall not be liable for any loss, injury -or damage of any kind caused by its use. The Information Provider does not -guarantee the continued supply of the Information. +The Information Provider and/or Licensor are not liable for any errors or omissions in the Information and shall not be liable for any loss, injury or damage of any kind caused by its use. The Information Provider does not guarantee the continued supply of the Information. Governing Law - -This licence is governed by the laws of the jurisdiction in which the Information -Provider has its principal place of business, unless otherwise specified by -the Information Provider. +This licence is governed by the laws of the jurisdiction in which the Information Provider has its principal place of business, unless otherwise specified by the Information Provider. Definitions - In this licence, the terms below have the following meanings: -'Information' means information protected by copyright or by database right -(for example, literary and artistic works, content, data and source code) -offered for use under the terms of this licence. +'Information' means information protected by copyright or by database right (for example, literary and artistic works, content, data and source code) offered for use under the terms of this licence. -'Information Provider' means the person or organisation providing the Information -under this licence. +'Information Provider' means the person or organisation providing the Information under this licence. -'Licensor' means any Information Provider which has the authority to offer -Information under the terms of this licence or the Keeper of Public Records, -who has the authority to offer Information subject to Crown copyright and -Crown database rights and Information subject to copyright and database right -that has been assigned to or acquired by the Crown, under the terms of this -licence. +'Licensor' means any Information Provider which has the authority to offer Information under the terms of this licence or the Keeper of Public Records, who has the authority to offer Information subject to Crown copyright and Crown database rights and Information subject to copyright and database right that has been assigned to or acquired by the Crown, under the terms of this licence. -'Use' means doing any act which is restricted by copyright or database right, -whether in the original medium or in any other medium, and includes without -limitation distributing, copying, adapting, modifying as may be technically -necessary to use it in a different mode or format. +'Use' means doing any act which is restricted by copyright or database right, whether in the original medium or in any other medium, and includes without limitation distributing, copying, adapting, modifying as may be technically necessary to use it in a different mode or format. -'You', 'you' and 'your' means the natural or legal person, or body of persons -corporate or incorporate, acquiring rights in the Information (whether the -Information is obtained directly from the Licensor or otherwise) under this -licence. +'You', 'you' and 'your' means the natural or legal person, or body of persons corporate or incorporate, acquiring rights in the Information (whether the Information is obtained directly from the Licensor or otherwise) under this licence. About the Open Government Licence +The National Archives has developed this licence as a tool to enable Information Providers in the public sector to license the use and re-use of their Information under a common open licence. The National Archives invites public sector bodies owning their own copyright and database rights to permit the use of their Information under this licence. -The National Archives has developed this licence as a tool to enable Information -Providers in the public sector to license the use and re-use of their Information -under a common open licence. The National Archives invites public sector bodies -owning their own copyright and database rights to permit the use of their -Information under this licence. +The Keeper of the Public Records has authority to license Information subject to copyright and database right owned by the Crown. The extent of the offer to license this Information under the terms of this licence is set out in the UK Government Licensing Framework. -The Keeper of the Public Records has authority to license Information subject -to copyright and database right owned by the Crown. The extent of the offer -to license this Information under the terms of this licence is set out in -the UK Government Licensing Framework. +This is version 3.0 of the Open Government Licence. The National Archives may, from time to time, issue new versions of the Open Government Licence. If you are already using Information under a previous version of the Open Government Licence, the terms of that licence will continue to apply. -This is version 3.0 of the Open Government Licence. The National Archives -may, from time to time, issue new versions of the Open Government Licence. -If you are already using Information under a previous version of the Open -Government Licence, the terms of that licence will continue to apply. +These terms are compatible with the Creative Commons Attribution License 4.0 and the Open Data Commons Attribution License, both of which license copyright and database rights. This means that when the Information is adapted and licensed under either of those licences, you automatically satisfy the conditions of the OGL when you comply with the other licence. The OGLv3.0 is Open Definition compliant. -These terms are compatible with the Creative Commons Attribution License 4.0 -and the Open Data Commons Attribution License, both of which license copyright -and database rights. This means that when the Information is adapted and licensed -under either of those licences, you automatically satisfy the conditions of -the OGL when you comply with the other licence. The OGLv3.0 is Open Definition -compliant. - -Further context, best practice and guidance can be found in the UK Government -Licensing Framework section on The National Archives website. +Further context, best practice and guidance can be found in the UK Government Licensing Framework section on The National Archives website. diff --git a/options/license/OGTSL b/options/license/OGTSL index 3160dc4fb..08617b0ef 100644 --- a/options/license/OGTSL +++ b/options/license/OGTSL @@ -1,101 +1,55 @@ -The Open Group Test Suite License Preamble +The Open Group Test Suite License -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +Preamble -Testing is essential for proper development and maintenance of standards-based -products. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. -For buyers: adequate conformance testing leads to reduced integration costs -and protection of investments in applications, software and people. +Testing is essential for proper development and maintenance of standards-based products. -For software developers: conformance testing of platforms and middleware greatly -reduces the cost of developing and maintaining multi-platform application -software. +For buyers: adequate conformance testing leads to reduced integration costs and protection of investments in applications, software and people. -For suppliers: In-depth testing increases customer satisfaction and keeps -development and support costs in check. API conformance is highly measurable -and suppliers who claim it must be able to substantiate that claim. +For software developers: conformance testing of platforms and middleware greatly reduces the cost of developing and maintaining multi-platform application software. -As such, since these are benchmark measures of conformance, we feel the integrity -of test tools is of importance. In order to preserve the integrity of the -existing conformance modes of this test package and to permit recipients of -modified versions of this package to run the original test modes, this license -requires that the original test modes be preserved. +For suppliers: In-depth testing increases customer satisfaction and keeps development and support costs in check. API conformance is highly measurable and suppliers who claim it must be able to substantiate that claim. -If you find a bug in one of the standards mode test cases, please let us know -so we can feed this back into the original, and also raise any specification -issues with the appropriate bodies (for example the POSIX committees). +As such, since these are benchmark measures of conformance, we feel the integrity of test tools is of importance. In order to preserve the integrity of the existing conformance modes of this test package and to permit recipients of modified versions of this package to run the original test modes, this license requires that the original test modes be preserved. + +If you find a bug in one of the standards mode test cases, please let us know so we can feed this back into the original, and also raise any specification issues with the appropriate bodies (for example the POSIX committees). Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least the following: -rename any non-standard executables and testcases so the names do not conflict -with standard executables and testcases, which must also be provided, and -provide a separate manual page for each non-standard executable and testcase -that clearly documents how it differs from the Standard Version. + rename any non-standard executables and testcases so the names do not conflict with standard executables and testcases, which must also be provided, and provide a separate manual page for each non-standard executable and testcase that clearly documents how it differs from the Standard Version. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least the following: +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least the following: -accompany any non-standard executables and testcases with their corresponding -Standard Version executables and testcases, giving the non-standard executables -and testcases non-standard names, and clearly documenting the differences -in manual pages (or equivalent), together with instructions on where to get -the Standard Version. + accompany any non-standard executables and testcases with their corresponding Standard Version executables and testcases, giving the non-standard executables and testcases non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -7.Subroutines supplied by you and linked into this Package shall not be considered -part of this Package. +7.Subroutines supplied by you and linked into this Package shall not be considered part of this Package. -8. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. +8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/options/license/OLDAP-1.1 b/options/license/OLDAP-1.1 index 522a67d77..f78dd0462 100644 --- a/options/license/OLDAP-1.1 +++ b/options/license/OLDAP-1.1 @@ -1,105 +1,60 @@ The OpenLDAP Public License +Version 1.1, 25 August 1998 -Version 1.1, 25 August 1998 Copyright 1998, The OpenLDAP Foundation. All Rights -Reserved. Note: This license is derived from the "Artistic License" as distributed -with the Perl Programming Language. Its terms are different from those of -the "Artistic License." +Copyright 1998, The OpenLDAP Foundation. All Rights Reserved. + +Note: This license is derived from the "Artistic License" as distributed with the Perl Programming Language. Its terms are different from those of the "Artistic License." PREAMBLE -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as uunet.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. - b) use the modified Package only within your corporation or organization. + b) use the modified Package only within your corporation or organization. -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. + b) accompany the distribution with the machine-readable source of the Package with your modifications. -c) accompany any non-standard executables with their corresponding Standard -Version executables, giving the non-standard executables non-standard names, -and clearly documenting the differences in manual pages (or equivalent), together -with instructions on where to get the Standard Version. + c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -7. C subroutines supplied by you and linked into this Package in order to -emulate subroutines and variables of the language defined by this Package -shall not be considered part of this Package, but are the equivalent of input -as in Paragraph 6, provided these subroutines do not change the language in -any way that would cause it to fail the regression tests for the language. +7. C subroutines supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. -8. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. +8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/options/license/OLDAP-1.2 b/options/license/OLDAP-1.2 index a91e91017..c61d6026e 100644 --- a/options/license/OLDAP-1.2 +++ b/options/license/OLDAP-1.2 @@ -1,105 +1,60 @@ The OpenLDAP Public License +Version 1.2, 1 September 1998 -Version 1.2, 1 September 1998 Copyright 1998, The OpenLDAP Foundation. All -Rights Reserved. Note: This license is derived from the "Artistic License" -as distributed with the Perl Programming Language. As differences may exist, -the complete license should be read. +Copyright 1998, The OpenLDAP Foundation. All Rights Reserved. + +Note: This license is derived from the "Artistic License" as distributed with the Perl Programming Language. As differences may exist, the complete license should be read. PREAMBLE -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as uunet.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. - b) use the modified Package only within your corporation or organization. + b) use the modified Package only within your corporation or organization. -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. + b) accompany the distribution with the machine-readable source of the Package with your modifications. -c) accompany any non-standard executables with their corresponding Standard -Version executables, giving the non-standard executables non-standard names, -and clearly documenting the differences in manual pages (or equivalent), together -with instructions on where to get the Standard Version. + c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -7. C subroutines supplied by you and linked into this Package in order to -emulate subroutines and variables of the language defined by this Package -shall not be considered part of this Package, but are the equivalent of input -as in Paragraph 6, provided these subroutines do not change the language in -any way that would cause it to fail the regression tests for the language. +7. C subroutines supplied by you and linked into this Package in order to emulate subroutines and variables of the language defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the language in any way that would cause it to fail the regression tests for the language. -8. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. +8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/options/license/OLDAP-1.3 b/options/license/OLDAP-1.3 index cf489a9d6..f19e722f3 100644 --- a/options/license/OLDAP-1.3 +++ b/options/license/OLDAP-1.3 @@ -1,111 +1,62 @@ The OpenLDAP Public License +Version 1.3, 17 January 1999 -Version 1.3, 17 January 1999 Copyright 1998-1999, The OpenLDAP Foundation. -All Rights Reserved. Note: This license is derived from the "Artistic License" -as distributed with the Perl Programming Language. As significant differences -exist, the complete license should be read. +Copyright 1998-1999, The OpenLDAP Foundation. All Rights Reserved. + +Note: This license is derived from the "Artistic License" as distributed with the Perl Programming Language. As significant differences exist, the complete license should be read. PREAMBLE -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as uunet.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. - b) use the modified Package only within your corporation or organization. + b) use the modified Package only within your corporation or organization. -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. + b) accompany the distribution with the machine-readable source of the Package with your modifications. -c) accompany any non-standard executables with their corresponding Standard -Version executables, giving the non-standard executables non-standard names, -and clearly documenting the differences in manual pages (or equivalent), together -with instructions on where to get the Standard Version. + c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -7. C subroutines supplied by you and linked into this Package in order to -emulate subroutines and variables defined by this Package shall not be considered -part of this Package, but are the equivalent of input as in Paragraph 6, provided -these subroutines do not change the behavior of the Package in any way that -would cause it to fail the regression tests for the Package. +7. C subroutines supplied by you and linked into this Package in order to emulate subroutines and variables defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the behavior of the Package in any way that would cause it to fail the regression tests for the Package. -8. Software supplied by you and linked with this Package in order to use subroutines -and variables defined by this Package shall not be considered part of this -Package and do not automatically fall under the copyright of this Package, -and the executables produced by linking your software with this Package may -be used and redistributed without restriction and may be sold commercially. +8. Software supplied by you and linked with this Package in order to use subroutines and variables defined by this Package shall not be considered part of this Package and do not automatically fall under the copyright of this Package, and the executables produced by linking your software with this Package may be used and redistributed without restriction and may be sold commercially. -9. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. +9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/options/license/OLDAP-1.4 b/options/license/OLDAP-1.4 index 74d8ebd90..4267f1421 100644 --- a/options/license/OLDAP-1.4 +++ b/options/license/OLDAP-1.4 @@ -1,112 +1,62 @@ The OpenLDAP Public License +Version 1.4, 18 January 1999 -Version 1.4, 18 January 1999 Copyright 1998-1999, The OpenLDAP Foundation. -All Rights Reserved. Note: This license is derived from the "Artistic License" -as distributed with the Perl Programming Language. As significant differences -exist, the complete license should be read. +Copyright 1998-1999, The OpenLDAP Foundation. All Rights Reserved. + +Note: This license is derived from the "Artistic License" as distributed with the Perl Programming Language. As significant differences exist, the complete license should be read. PREAMBLE -The intent of this document is to state the conditions under which a Package -may be copied, such that the Copyright Holder maintains some semblance of -artistic control over the development of the package, while giving the users -of the package the right to use and distribute the Package in a more-or-less -customary fashion, plus the right to make reasonable modifications. +The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: -"Package" refers to the collection of files distributed by the Copyright Holder, -and derivatives of that collection of files created through textual modification. + "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. -"Standard Version" refers to such a Package if it has not been modified, or -has been modified in accordance with the wishes of the Copyright Holder. + "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. -"Copyright Holder" is whoever is named in the copyright or copyrights for -the package. + "Copyright Holder" is whoever is named in the copyright or copyrights for the package. -"You" is you, if you're thinking about copying or distributing this Package. + "You" is you, if you're thinking about copying or distributing this Package. -"Reasonable copying fee" is whatever you can justify on the basis of media -cost, duplication charges, time of people involved, and so on. (You will not -be required to justify it to the Copyright Holder, but only to the computing -community at large as a market that must bear the fee.) + "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) -"Freely Available" means that no fee is charged for the item itself, though -there may be fees involved in handling the item. It also means that recipients -of the item may redistribute it under the same conditions they received it. + "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. -1. You may make and give away verbatim copies of the source form of the Standard -Version of this Package without restriction, provided that you duplicate all -of the original copyright notices and associated disclaimers. +1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. -2. You may apply bug fixes, portability fixes and other modifications derived -from the Public Domain or from the Copyright Holder. A Package modified in -such a way shall still be considered the Standard Version. +2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. -3. You may otherwise modify your copy of this Package in any way, provided -that you insert a prominent notice in each changed file stating how and when -you changed that file, and provided that you do at least ONE of the following: +3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or placing the modifications on a major archive site such as uunet.uu.net, -or by allowing the Copyright Holder to include your modifications in the Standard -Version of the Package. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as uunet.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. - b) use the modified Package only within your corporation or organization. + b) use the modified Package only within your corporation or organization. -c) rename any non-standard executables so the names do not conflict with standard -executables, which must also be provided, and provide a separate manual page -for each non-standard executable that clearly documents how it differs from -the Standard Version. + c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -4. You may distribute the programs of this Package in object code or executable -form, provided that you do at least ONE of the following: +4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: -a) distribute a Standard Version of the executables and library files, together -with instructions (in the manual page or equivalent) on where to get the Standard -Version. + a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. -b) accompany the distribution with the machine-readable source of the Package -with your modifications. + b) accompany the distribution with the machine-readable source of the Package with your modifications. -c) accompany any non-standard executables with their corresponding Standard -Version executables, giving the non-standard executables non-standard names, -and clearly documenting the differences in manual pages (or equivalent), together -with instructions on where to get the Standard Version. + c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. - d) make other distribution arrangements with the Copyright Holder. + d) make other distribution arrangements with the Copyright Holder. -5. You may charge a reasonable copying fee for any distribution of this Package. -You may charge any fee you choose for support of this Package. You may not -charge a fee for this Package itself. However, you may distribute this Package -in aggregate with other (possibly commercial) programs as part of a larger -(possibly commercial) software distribution provided that you do not advertise -this Package as a product of your own. +5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. -6. The scripts and library files supplied as input to or produced as output -from the programs of this Package do not automatically fall under the copyright -of this Package, but belong to whomever generated them, and may be sold commercially, -and may be aggregated with this Package. +6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. -7. C subroutines supplied by you and linked into this Package in order to -emulate subroutines and variables defined by this Package shall not be considered -part of this Package, but are the equivalent of input as in Paragraph 6, provided -these subroutines do not change the behavior of the Package in any way that -would cause it to fail the regression tests for the Package. +7. C subroutines supplied by you and linked into this Package in order to emulate subroutines and variables defined by this Package shall not be considered part of this Package, but are the equivalent of input as in Paragraph 6, provided these subroutines do not change the behavior of the Package in any way that would cause it to fail the regression tests for the Package. -8. Software supplied by you and linked with this Package in order to use subroutines -and variables defined by this Package shall not be considered part of this -Package and do not automatically fall under the copyright of this Package. -Executables produced by linking your software with this Package may be used -and redistributed without restriction and may be sold commercially so long -as the primary function of your software is different than the package itself. +8. Software supplied by you and linked with this Package in order to use subroutines and variables defined by this Package shall not be considered part of this Package and do not automatically fall under the copyright of this Package. Executables produced by linking your software with this Package may be used and redistributed without restriction and may be sold commercially so long as the primary function of your software is different than the package itself. -9. The name of the Copyright Holder may not be used to endorse or promote -products derived from this software without specific prior written permission. +9. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. -10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND -FITNESS FOR A PARTICULAR PURPOSE. The End +10. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + +The End diff --git a/options/license/OLDAP-2.0 b/options/license/OLDAP-2.0 index 7dd47ef9c..8c460cb78 100644 --- a/options/license/OLDAP-2.0 +++ b/options/license/OLDAP-2.0 @@ -1,36 +1,18 @@ The OpenLDAP Public License +Version 2.0, 7 June 1999 -Version 2.0, 7 June 1999 Copyright 1999, The OpenLDAP Foundation, Redwood -City, California, USA. All Rights Reserved. +Copyright 1999, The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain copyright statements and notices. -Redistributions must also contain a copy of this document. +1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name "OpenLDAP" must not be used to endorse or promote products derived -from this Software without prior written permission of the OpenLDAP Foundation. -For written permission, please contact foundation@openldap.org. +3. The name "OpenLDAP" must not be used to endorse or promote products derived from this Software without prior written permission of the OpenLDAP Foundation. For written permission, please contact foundation@openldap.org. -4. Products derived from this Software may not be called "OpenLDAP" nor may -"OpenLDAP" appear in their names without prior written permission of the OpenLDAP -Foundation. OpenLDAP is a registered trademark of the OpenLDAP Foundation. +4. Products derived from this Software may not be called "OpenLDAP" nor may "OpenLDAP" appear in their names without prior written permission of the OpenLDAP Foundation. OpenLDAP is a registered trademark of the OpenLDAP Foundation. 5. Due credit should be given to the OpenLDAP Project (http://www.openldap.org/). -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/OLDAP-2.0.1 b/options/license/OLDAP-2.0.1 index 5547eb18a..c04920e94 100644 --- a/options/license/OLDAP-2.0.1 +++ b/options/license/OLDAP-2.0.1 @@ -1,36 +1,18 @@ The OpenLDAP Public License +Version 2.0.1, 21 December 1999 -Version 2.0.1, 21 December 1999 Copyright 1999, The OpenLDAP Foundation, Redwood -City, California, USA. All Rights Reserved. +Copyright 1999, The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain copyright statements and notices. -Redistributions must also contain a copy of this document. +1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name "OpenLDAP" must not be used to endorse or promote products derived -from this Software without prior written permission of the OpenLDAP Foundation. -For written permission, please contact foundation@openldap.org. +3. The name "OpenLDAP" must not be used to endorse or promote products derived from this Software without prior written permission of the OpenLDAP Foundation. For written permission, please contact foundation@openldap.org. -4. Products derived from this Software may not be called "OpenLDAP" nor may -"OpenLDAP" appear in their names without prior written permission of the OpenLDAP -Foundation. OpenLDAP is a trademark of the OpenLDAP Foundation. +4. Products derived from this Software may not be called "OpenLDAP" nor may "OpenLDAP" appear in their names without prior written permission of the OpenLDAP Foundation. OpenLDAP is a trademark of the OpenLDAP Foundation. 5. Due credit should be given to the OpenLDAP Project (http://www.openldap.org/). -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/OLDAP-2.1 b/options/license/OLDAP-2.1 index 8c832b669..4f461fe86 100644 --- a/options/license/OLDAP-2.1 +++ b/options/license/OLDAP-2.1 @@ -1,41 +1,20 @@ The OpenLDAP Public License +Version 2.1, 29 February 2000 -Version 2.1, 29 February 2000 Copyright 1999-2000, The OpenLDAP Foundation, -Redwood City, California, USA. All Rights Reserved. +Copyright 1999-2000, The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain copyright statements and notices. -Redistributions must also contain a copy of this document. +1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name "OpenLDAP" must not be used to endorse or promote products derived -from this Software without prior written permission of the OpenLDAP Foundation. -For written permission, please contact foundation@openldap.org. +3. The name "OpenLDAP" must not be used to endorse or promote products derived from this Software without prior written permission of the OpenLDAP Foundation. For written permission, please contact foundation@openldap.org. -4. Products derived from this Software may not be called "OpenLDAP" nor may -"OpenLDAP" appear in their names without prior written permission of the OpenLDAP -Foundation. OpenLDAP is a trademark of the OpenLDAP Foundation. +4. Products derived from this Software may not be called "OpenLDAP" nor may "OpenLDAP" appear in their names without prior written permission of the OpenLDAP Foundation. OpenLDAP is a trademark of the OpenLDAP Foundation. 5. Due credit should be given to the OpenLDAP Project (http://www.openldap.org/). -6. The OpenLDAP Foundation may revise this license from time to time. Each -revision is distinguished by a version number. You may use the Software under -terms of this license revision or under the terms of any subsequent license -revision. +6. The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use the Software under terms of this license revision or under the terms of any subsequent license revision. -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/OLDAP-2.2 b/options/license/OLDAP-2.2 index c184df120..24446fd52 100644 --- a/options/license/OLDAP-2.2 +++ b/options/license/OLDAP-2.2 @@ -1,44 +1,22 @@ The OpenLDAP Public License - Version 2.2, 1 March 2000 -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain copyright statements and notices. -Redistributions must also contain a copy of this document. +1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name "OpenLDAP" must not be used to endorse or promote products derived -from this Software without prior written permission of the OpenLDAP Foundation. +3. The name "OpenLDAP" must not be used to endorse or promote products derived from this Software without prior written permission of the OpenLDAP Foundation. -4. Products derived from this Software may not be called "OpenLDAP" nor may -"OpenLDAP" appear in their names without prior written permission of the OpenLDAP -Foundation. +4. Products derived from this Software may not be called "OpenLDAP" nor may "OpenLDAP" appear in their names without prior written permission of the OpenLDAP Foundation. 5. Due credit should be given to the OpenLDAP Project (http://www.openldap.org/). -6. The OpenLDAP Foundation may revise this license from time to time. Each -revision is distinguished by a version number. You may use the Software under -terms of this license revision or under the terms of any subsequent the license. +6. The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use the Software under terms of this license revision or under the terms of any subsequent the license. -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OpenLDAP is a trademark of the OpenLDAP Foundation. -Copyright 1999-2000, The OpenLDAP Foundation, Redwood City, California, USA. -All Rights Reserved. Permission to copy and distributed verbatim copies of -this document is granted. +Copyright 1999-2000, The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distributed verbatim copies of this document is granted. diff --git a/options/license/OLDAP-2.2.1 b/options/license/OLDAP-2.2.1 index fd3b8a017..3fd04859b 100644 --- a/options/license/OLDAP-2.2.1 +++ b/options/license/OLDAP-2.2.1 @@ -1,45 +1,22 @@ The OpenLDAP Public License - Version 2.2.1, 1 March 2000 -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain copyright statements and notices. -Redistributions must also contain a copy of this document. +1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name "OpenLDAP" must not be used to endorse or promote products derived -from this Software without prior written permission of the OpenLDAP Foundation. +3. The name "OpenLDAP" must not be used to endorse or promote products derived from this Software without prior written permission of the OpenLDAP Foundation. -4. Products derived from this Software may not be called "OpenLDAP" nor may -"OpenLDAP" appear in their names without prior written permission of the OpenLDAP -Foundation. +4. Products derived from this Software may not be called "OpenLDAP" nor may "OpenLDAP" appear in their names without prior written permission of the OpenLDAP Foundation. 5. Due credit should be given to the OpenLDAP Project (http://www.openldap.org/). -6. The OpenLDAP Foundation may revise this license from time to time. Each -revision is distinguished by a version number. You may use the Software under -terms of this license revision or under the terms of any subsequent revision -of the license. +6. The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use the Software under terms of this license revision or under the terms of any subsequent revision of the license. -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OpenLDAP is a trademark of the OpenLDAP Foundation. -Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. -All Rights Reserved. Permission to copy and distributed verbatim copies of -this document is granted. +Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distributed verbatim copies of this document is granted. diff --git a/options/license/OLDAP-2.2.2 b/options/license/OLDAP-2.2.2 index 6358ba638..f466cdcc5 100644 --- a/options/license/OLDAP-2.2.2 +++ b/options/license/OLDAP-2.2.2 @@ -1,46 +1,24 @@ The OpenLDAP Public License - Version 2.2.2, 28 July 2000 -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain copyright statements and notices. -2. Redistributions in binary form must reproduce applicable copyright statements -and notices, this list of conditions, and the following disclaimer in the -documentation and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce applicable copyright statements and notices, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. Redistributions must contain a verbatim copy of this document. +3. Redistributions must contain a verbatim copy of this document. -4. The name "OpenLDAP" must not be used to endorse or promote products derived -from this Software without prior written permission of the OpenLDAP Foundation. +4. The name "OpenLDAP" must not be used to endorse or promote products derived from this Software without prior written permission of the OpenLDAP Foundation. -5. Products derived from this Software may not be called "OpenLDAP" nor may -"OpenLDAP" appear in their names without prior written permission of the OpenLDAP -Foundation. +5. Products derived from this Software may not be called "OpenLDAP" nor may "OpenLDAP" appear in their names without prior written permission of the OpenLDAP Foundation. 6. Due credit should be given to the OpenLDAP Project (http://www.openldap.org/). -7. The OpenLDAP Foundation may revise this license from time to time. Each -revision is distinguished by a version number. You may use the Software under -terms of this license revision or under the terms of any subsequent revision -of the license. +7. The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use the Software under terms of this license revision or under the terms of any subsequent revision of the license. -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OpenLDAP is a trademark of the OpenLDAP Foundation. -Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. -All Rights Reserved. Permission to copy and distributed verbatim copies of -this document is granted. +Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distributed verbatim copies of this document is granted. diff --git a/options/license/OLDAP-2.3 b/options/license/OLDAP-2.3 index e7f4cb981..ebfc7f8ef 100644 --- a/options/license/OLDAP-2.3 +++ b/options/license/OLDAP-2.3 @@ -1,46 +1,24 @@ The OpenLDAP Public License - Version 2.3, 28 July 2000 -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain copyright statements and notices. -2. Redistributions in binary form must reproduce applicable copyright statements -and notices, this list of conditions, and the following disclaimer in the -documentation and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce applicable copyright statements and notices, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. Redistributions must contain a verbatim copy of this document. +3. Redistributions must contain a verbatim copy of this document. -4. The name "OpenLDAP" must not be used to endorse or promote products derived -from this Software without prior written permission of the OpenLDAP Foundation. +4. The name "OpenLDAP" must not be used to endorse or promote products derived from this Software without prior written permission of the OpenLDAP Foundation. -5. Products derived from this Software may not be called "OpenLDAP" nor may -"OpenLDAP" appear in their names without prior written permission of the OpenLDAP -Foundation. +5. Products derived from this Software may not be called "OpenLDAP" nor may "OpenLDAP" appear in their names without prior written permission of the OpenLDAP Foundation. 6. Due credit should be given to the OpenLDAP Project (http://www.openldap.org/). -7. The OpenLDAP Foundation may revise this license from time to time. Each -revision is distinguished by a version number. You may use the Software under -terms of this license revision or under the terms of any subsequent revision -of the license. +7. The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use the Software under terms of this license revision or under the terms of any subsequent revision of the license. -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OpenLDAP is a trademark of the OpenLDAP Foundation. -Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. -All Rights Reserved. Permission to copy and distributed verbatim copies of -this document is granted. +Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distributed verbatim copies of this document is granted. diff --git a/options/license/OLDAP-2.4 b/options/license/OLDAP-2.4 index a19aebe90..353a553f2 100644 --- a/options/license/OLDAP-2.4 +++ b/options/license/OLDAP-2.4 @@ -1,43 +1,22 @@ The OpenLDAP Public License - Version 2.4, 8 December 2000 -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain copyright statements and notices. -2. Redistributions in binary form must reproduce applicable copyright statements -and notices, this list of conditions, and the following disclaimer in the -documentation and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce applicable copyright statements and notices, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. - 3. Redistributions must contain a verbatim copy of this document. +3. Redistributions must contain a verbatim copy of this document. -4. The names and trademarks of the authors and copyright holders must not -be used in advertising or otherwise to promote the sale, use or other dealing -in this Software without specific, written prior permission. +4. The names and trademarks of the authors and copyright holders must not be used in advertising or otherwise to promote the sale, use or other dealing in this Software without specific, written prior permission. - 5. Due credit should be given to the OpenLDAP Project. +5. Due credit should be given to the OpenLDAP Project. -6. The OpenLDAP Foundation may revise this license from time to time. Each -revision is distinguished by a version number. You may use the Software under -terms of this license revision or under the terms of any subsequent revision -of the license. +6. The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use the Software under terms of this license revision or under the terms of any subsequent revision of the license. -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS -IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, -THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. OpenLDAP is a trademark of the OpenLDAP Foundation. -Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. -All Rights Reserved. Permission to copy and distributed verbatim copies of -this document is granted. +Copyright 1999-2000 The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distributed verbatim copies of this document is granted. diff --git a/options/license/OLDAP-2.7 b/options/license/OLDAP-2.7 index bf856025a..9ecc91292 100644 --- a/options/license/OLDAP-2.7 +++ b/options/license/OLDAP-2.7 @@ -1,43 +1,20 @@ The OpenLDAP Public License - Version 2.7, 7 September 2001 -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain copyright statements and notices, -2. Redistributions in binary form must reproduce applicable copyright statements -and notices, this list of conditions, and the following disclaimer in the -documentation and/or other materials provided with the distribution, and +2. Redistributions in binary form must reproduce applicable copyright statements and notices, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution, and - 3. Redistributions must contain a verbatim copy of this document. +3. Redistributions must contain a verbatim copy of this document. -The OpenLDAP Foundation may revise this license from time to time. Each revision -is distinguished by a version number. You may use this Software under terms -of this license revision or under the terms of any subsequent revision of -the license. +The OpenLDAP Foundation may revise this license from time to time. Each revision is distinguished by a version number. You may use this Software under terms of this license revision or under the terms of any subsequent revision of the license. -THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS CONTRIBUTORS -``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, -OR THE AUTHOR(S) OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE OPENLDAP FOUNDATION AND ITS CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENLDAP FOUNDATION, ITS CONTRIBUTORS, OR THE AUTHOR(S) OR OWNER(S) OF THE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -The names of the authors and copyright holders must not be used in advertising -or otherwise to promote the sale, use or other dealing in this Software without -specific, written prior permission. Title to copyright in this Software shall -at all times remain with copyright holders. +The names of the authors and copyright holders must not be used in advertising or otherwise to promote the sale, use or other dealing in this Software without specific, written prior permission. Title to copyright in this Software shall at all times remain with copyright holders. OpenLDAP is a registered trademark of the OpenLDAP Foundation. -Copyright 1999-2001 The OpenLDAP Foundation, Redwood City, California, USA. -All Rights Reserved. Permission to copy and distribute verbatim copies of -this document is granted. +Copyright 1999-2001 The OpenLDAP Foundation, Redwood City, California, USA. All Rights Reserved. Permission to copy and distribute verbatim copies of this document is granted. diff --git a/options/license/OML b/options/license/OML index 5112866ca..62b658971 100644 --- a/options/license/OML +++ b/options/license/OML @@ -1,25 +1,5 @@ -This FastCGI application library source and object code (the "Software") and -its documentation (the "Documentation") are copyrighted by Open Market, Inc -("Open Market"). The following terms apply to all files associated with the -Software and Documentation unless explicitly disclaimed in individual files. +This FastCGI application library source and object code (the "Software") and its documentation (the "Documentation") are copyrighted by Open Market, Inc ("Open Market"). The following terms apply to all files associated with the Software and Documentation unless explicitly disclaimed in individual files. -Open Market permits you to use, copy, modify, distribute, and license this -Software and the Documentation for any purpose, provided that existing copyright -notices are retained in all copies and that this notice is included verbatim -in any distributions. No written agreement, license, or royalty fee is required -for any of the authorized uses. Modifications to this Software and Documentation -may be copyrighted by their authors and need not follow the licensing terms -described here. If modifications to this Software and Documentation have new -licensing terms, the new terms must be clearly indicated on the first page -of each file where they apply. +Open Market permits you to use, copy, modify, distribute, and license this Software and the Documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this Software and Documentation may be copyrighted by their authors and need not follow the licensing terms described here. If modifications to this Software and Documentation have new licensing terms, the new terms must be clearly indicated on the first page of each file where they apply. -OPEN MARKET MAKES NO EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE SOFTWARE -OR THE DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY WARRANTY OF MERCHANTABILITY -OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL OPEN MARKET BE LIABLE -TO YOU OR ANY THIRD PARTY FOR ANY DAMAGES ARISING FROM OR RELATING TO THIS -SOFTWARE OR THE DOCUMENTATION, INCLUDING, WITHOUT LIMITATION, ANY INDIRECT, -SPECIAL OR CONSEQUENTIAL DAMAGES OR SIMILAR DAMAGES, INCLUDING LOST PROFITS -OR LOST DATA, EVEN IF OPEN MARKET HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS". OPEN MARKET -HAS NO LIABILITY IN CONTRACT, TORT, NEGLIGENCE OR OTHERWISE ARISING OUT OF -THIS SOFTWARE OR THE DOCUMENTATION. +OPEN MARKET MAKES NO EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE SOFTWARE OR THE DOCUMENTATION, INCLUDING WITHOUT LIMITATION ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL OPEN MARKET BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DAMAGES ARISING FROM OR RELATING TO THIS SOFTWARE OR THE DOCUMENTATION, INCLUDING, WITHOUT LIMITATION, ANY INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES OR SIMILAR DAMAGES, INCLUDING LOST PROFITS OR LOST DATA, EVEN IF OPEN MARKET HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. THE SOFTWARE AND DOCUMENTATION ARE PROVIDED "AS IS". OPEN MARKET HAS NO LIABILITY IN CONTRACT, TORT, NEGLIGENCE OR OTHERWISE ARISING OUT OF THIS SOFTWARE OR THE DOCUMENTATION. diff --git a/options/license/OPL-1.0 b/options/license/OPL-1.0 index 6b8924cd3..4d4fa3a6e 100644 --- a/options/license/OPL-1.0 +++ b/options/license/OPL-1.0 @@ -1,362 +1,136 @@ OPEN PUBLIC LICENSE - Version 1.0 - 1. Definitions. +1. Definitions. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work, which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work, which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.8. "License" means this document and the corresponding addendum described -in section 6.4 below. + 1.8. "License" means this document and the corresponding addendum described in section 6.4 below. -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or a list of source code differential comparisons against -either the Original Code or another well known, available Covered Code of -the Contributor's choice. The Source Code can be in a compressed or archival -form, provided the appropriate decompression or de-archiving software is widely -available for no charge. + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.12. "You" means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 6.1. For legal entities, "You'' includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control'' means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of fifty percent (50%) or more -of the outstanding shares or beneficial ownership of such entity. + 1.12. "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. - 1.13 "License Author" means Lutris Technologies, Inc. + 1.13 "License Author" means Lutris Technologies, Inc. - 2. Source Code License. +2. Source Code License. -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a worldwide, royalty-free, non-exclusive license, subject to third party intellectual -property claims: + 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a worldwide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) under intellectual property rights (other than patent or trademark) to -use, reproduce, modify, display, perform, sublicense and distribute the Original -Code (or portions thereof) with or without Modifications, or as part of a -Larger Work; and + (a) under intellectual property rights (other than patent or trademark) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and -(b) under patents now or hereafter owned or controlled by Initial Developer, -to make, have made, use and sell (``offer to sell and import'') the Original -Code (or portions thereof), but solely to the extent that any such patent -is reasonably necessary to enable You to Utilize the Original Code (or portions -thereof) and not to any greater extent that may be necessary to Utilize further -Modifications or combinations. + (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell (``offer to sell and import'') the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations. -2.2. Contributor Grant. Each Contributor hereby grants You a worldwide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: + 2.2. Contributor Grant. Each Contributor hereby grants You a worldwide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) under intellectual property rights (other than patent or trademark) to -use, reproduce, modify, display, perform, sublicense and distribute the Modifications -created by such Contributor (or portions thereof) either on an unmodified -basis, with other Modifications, as Covered Code or as part of a Larger Work; -and + (a) under intellectual property rights (other than patent or trademark) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and -(b) under patents now or hereafter owned or controlled by Contributor, to -to make, have made, use and sell (``offer to sell and import'') the Contributor -Version (or portions thereof), but solely to the extent that any such patent -is reasonably necessary to enable You to Utilize the Contributor Version (or -portions thereof), and not to any greater extent that may be necessary to -Utilize further Modifications or combinations + (b) under patents now or hereafter owned or controlled by Contributor, to to make, have made, use and sell (``offer to sell and import'') the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations - 3. Distribution Obligations. +3. Distribution Obligations. -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available, prior to any use, except for -internal development and practice, in Source Code form under the terms of -this License either on the same media as an Executable version or via an accepted -Electronic Distribution Mechanism to anyone to whom you made an Executable -version available; and if made available via Electronic Distribution Mechanism, -must remain available for at least twelve (12) months after the date it initially -became available, or at least six (6) months after a subsequent version of -that particular Modification has been made available to such recipients. You -shall notify the Initial Developer of the Modification and the location of -the Source Code via the contact means provided for in the Developer Specific -license. Initial Developer will be acting as maintainer of the Source Code -and may provide an Electronic Distribution mechanism for the Modification -to be made available. + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available, prior to any use, except for internal development and practice, in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You shall notify the Initial Developer of the Modification and the location of the Source Code via the contact means provided for in the Developer Specific license. Initial Developer will be acting as maintainer of the Source Code and may provide an Electronic Distribution mechanism for the Modification to be made available. -3.3. Description of Modifications. You must cause all Covered Code to which -you contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. + 3.3. Description of Modifications. You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. - 3.4. Intellectual Property Matters + 3.4. Intellectual Property Matters -(a) Third Party Claims. If You have knowledge that a party claims an intellectual -property right in particular functionality or code (or its utilization under -this License), you must include a text file with the source code distribution -titled "LEGAL" which describes the claim and the party making the claim in -sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after You make Your Modification available as described in -Section 3.2, You shall promptly modify the LEGAL file in all copies You make -available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Covered Code that new knowledge has been obtained. + (a) Third Party Claims. If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. -(b) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. + (b) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code, and this License in any documentation for the Source -Code, where You describe recipients' rights relating to Covered Code. If You -created one or more Modification(s), You may add your name as a Contributor -to the notice described in Exhibit A. If it is not possible to put such notice -in a particular Source Code file due to its structure, then you must include -such notice in a location (such as a relevant directory file) where a user -would be likely to look for such a notice. You may choose to offer, and to -charge a fee for, warranty, support, indemnity or liability obligations to -one or more recipients of Covered Code. However, You may do so only on Your -own behalf, and not on behalf of the Initial Developer or any Contributor. -You must make it absolutely clear that any such warranty, support, indemnity -or liability obligation is offered by You alone, and You hereby agree to indemnify -the Initial Developer and every Contributor for any liability incurred by -the Initial Developer or such Contributor as a result of warranty, support, -indemnity or liability terms You offer. + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligations -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code under a license of Your choice, which may contain -terms different from this License, provided that You are in compliance with -the terms of this License and that the license for the Executable version -does not attempt to limit or alter the recipient's rights in the Source Code -version from the rights set forth in this License. If You distribute the Executable -version under a different license You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by the -Initial Developer or any Contributor. You hereby agree to indemnify the Initial -Developer and every Contributor for any liability incurred by the Initial -Developer or such Contributor as a result of any such terms You offer. If -you distribute executable versions containing Covered Code, you must reproduce -the notice in Exhibit B in the documentation and/or other materials provided -with the product. + 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. If you distribute executable versions containing Covered Code, you must reproduce the notice in Exhibit B in the documentation and/or other materials provided with the product. -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. + 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. - 4. Inability to Comply Due to Statute or Regulation. +4. Inability to Comply Due to Statute or Regulation. -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute or regulation -then You must: (a) comply with the terms of this License to the maximum extent -possible; and (b) Cite all of the statutes or regulations that prohibit you -from complying fully with this license. (c) describe the limitations and the -code they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) Cite all of the statutes or regulations that prohibit you from complying fully with this license. (c) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - 5. Application of this License. +5. Application of this License. -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A, and to related Covered Code. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. - 6. Versions of the License. +6. Versions of the License. -6.1. New Versions. License Author may publish revised and/or new versions -of the License from time to time. Each version will be given a distinguishing -version number and shall be submitted to opensource.org for certification. + 6.1. New Versions. License Author may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number and shall be submitted to opensource.org for certification. -6.2. Effect of New Versions. Once Covered Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Covered Code under -the terms of any subsequent version of the License published by Initial Developer. -No one other than Initial Developer has the right to modify the terms applicable -to Covered Code created under this License. + 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Initial Developer. No one other than Initial Developer has the right to modify the terms applicable to Covered Code created under this License. -6.3. Derivative Works. If you create or use a modified version of this License, -except in association with the required Developer Specific License described -in section 6.4, (which you may only do in order to apply it to code which -is not already Covered Code governed by this License), you must (a) rename -Your license so that the phrases ``Open'', ``OpenPL'', ``OPL'' or any confusingly -similar phrase do not appear anywhere in your license and (b) otherwise make -it clear that your version of the license contains terms which differ from -the Open Public License. (Filling in the name of the Initial Developer, Original -Code or Contributor in the notice described in Exhibit A shall not of themselves -be deemed to be modifications of this License.) + 6.3. Derivative Works. If you create or use a modified version of this License, except in association with the required Developer Specific License described in section 6.4, (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases ``Open'', ``OpenPL'', ``OPL'' or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Open Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) - 6.4. Required Additional Developer Specific License + 6.4. Required Additional Developer Specific License +This license is a union of the following two parts that should be found as text files in the same place (directory), in the order of preeminence: -This license is a union of the following two parts that should be found as -text files in the same place (directory), in the order of preeminence: + [1] A Developer specific license. - [1] A Developer specific license. + [2] The contents of this file OPL_1_0.TXT, stating the general licensing policy of the software. -[2] The contents of this file OPL_1_0.TXT, stating the general licensing policy -of the software. +In case of conflicting dispositions in the parts of this license, the terms of the lower-numbered part will always be superseded by the terms of the higher numbered part. -In case of conflicting dispositions in the parts of this license, the terms -of the lower-numbered part will always be superseded by the terms of the higher -numbered part. +7. DISCLAIMER OF WARRANTY. - 7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +8. TERMINATION. - 8. TERMINATION. + 8.1 Termination upon Breach +This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code, which are properly granted, shall survive any termination of this License. Provisions that, by their nature, must remain in effect beyond the termination of this License shall survive. - 8.1 Termination upon Breach + 8.2. Termination Upon Litigation. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: -This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code, -which are properly granted, shall survive any termination of this License. -Provisions that, by their nature, must remain in effect beyond the termination -of this License shall survive. + (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. -8.2. Termination Upon Litigation. If You initiate litigation by asserting -a patent infringement claim (excluding declatory judgment actions) against -Initial Developer or a Contributor (the Initial Developer or Contributor against -whom You file such action is referred to as "Participant") alleging that: + (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. -(a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. + 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. -(b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. +9. LIMITATION OF LIABILITY. -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - 9. LIMITATION OF LIABILITY. +10. U.S. GOVERNMENT END USERS. -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER -CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF -SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, -OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL -HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING -FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. +The Covered Code is a ``commercial item,'' as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of ``commercial computer software'' and ``commercial computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. - 10. U.S. GOVERNMENT END USERS. +11. MISCELLANEOUS. -The Covered Code is a ``commercial item,'' as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of ``commercial computer software'' and ``commercial -computer software documentation,'' as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. + his section was intentionally left blank. The contents of this section are found in the corresponding addendum described above. - 11. MISCELLANEOUS. +12. RESPONSIBILITY FOR CLAIMS. -his section was intentionally left blank. The contents of this section are -found in the corresponding addendum described above. +Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute with Initial Developer responsibility on an equitable basis. - 12. RESPONSIBILITY FOR CLAIMS. - -Except in cases where another Contributor has failed to comply with Section -3.4, You are responsible for damages arising, directly or indirectly, out -of Your utilization of rights under this License, based on the number of copies -of Covered Code you made available, the revenues you received from utilizing -such rights, and other relevant factors. You agree to work with affected parties -to distribute with Initial Developer responsibility on an equitable basis. EXHIBIT A. -Text for this Exhibit A is found in the corresponding addendum, described -in section 6.4 above, text file provided by the Initial Developer. This license -is not valid or complete with out that file. +Text for this Exhibit A is found in the corresponding addendum, described in section 6.4 above, text file provided by the Initial Developer. This license is not valid or complete with out that file. EXHIBIT B. -Text for this Exhibit B is found in the corresponding addendum, described -in section 6.4 above, text file provided by the Initial Developer. This license -is not valid or complete with out that file. +Text for this Exhibit B is found in the corresponding addendum, described in section 6.4 above, text file provided by the Initial Developer. This license is not valid or complete with out that file. diff --git a/options/license/OPUBL-1.0 b/options/license/OPUBL-1.0 new file mode 100644 index 000000000..1386621e0 --- /dev/null +++ b/options/license/OPUBL-1.0 @@ -0,0 +1,78 @@ +Open Publication License + +v1.0, 8 June 1999 + +I. REQUIREMENTS ON BOTH UNMODIFIED AND MODIFIED VERSIONS + +The Open Publication works may be reproduced and distributed in whole or in part, in any medium physical or electronic, provided that the terms of this license are adhered to, and that this license or an incorporation of it by reference (with any options elected by the author(s) and/or publisher) is displayed in the reproduction. + +Proper form for an incorporation by reference is as follows: + + Copyright (c) by . This material may be distributed only subject to the terms and conditions set forth in the Open Publication License, vX.Y or later (the latest version is presently available at http://www.opencontent.org/openpub/). + +The reference must be immediately followed with any options elected by the author(s) and/or publisher of the document (see section VI). + +Commercial redistribution of Open Publication-licensed material is permitted. + +Any publication in standard (paper) book form shall require the citation of the original publisher and author. The publisher and author's names shall appear on all outer surfaces of the book. On all outer surfaces of the book the original publisher's name shall be as large as the title of the work and cited as possessive with respect to the title. + +II. COPYRIGHT + +The copyright to each Open Publication is owned by its author(s) or designee. + +III. SCOPE OF LICENSE + +The following license terms apply to all Open Publication works, unless otherwise explicitly stated in the document. + +Mere aggregation of Open Publication works or a portion of an Open Publication work with other works or programs on the same media shall not cause this license to apply to those other works. The aggregate work shall contain a notice specifying the inclusion of the Open Publication material and appropriate copyright notice. + +SEVERABILITY. If any part of this license is found to be unenforceable in any jurisdiction, the remaining portions of the license remain in force. + +NO WARRANTY. Open Publication works are licensed and provided "as is" without warranty of any kind, express or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose or a warranty of non-infringement. + +IV. REQUIREMENTS ON MODIFIED WORKS + +All modified versions of documents covered by this license, including translations, anthologies, compilations and partial documents, must meet the following requirements: + 1. The modified version must be labeled as such. + 2. The person making the modifications must be identified and the modifications dated. + 3. Acknowledgement of the original author and publisher if applicable must be retained according to normal academic citation practices. + 4. The location of the original unmodified document must be identified. + 5. The original author's (or authors') name(s) may not be used to assert or imply endorsement of the resulting document without the original author's (or authors') permission. + +V. GOOD-PRACTICE RECOMMENDATIONS + +In addition to the requirements of this license, it is requested from and strongly recommended of redistributors that: + 1. If you are distributing Open Publication works on hardcopy or CD-ROM, you provide email notification to the authors of your intent to redistribute at least thirty days before your manuscript or media freeze, to give the authors time to provide updated documents. This notification should describe modifications, if any, made to the document. + 2. All substantive modifications (including deletions) be either clearly marked up in the document or else described in an attachment to the document. + 3. Finally, while it is not mandatory under this license, it is considered good form to offer a free copy of any hardcopy and CD-ROM expression of an Open Publication-licensed work to its author(s). + +VI. LICENSE OPTIONS + +The author(s) and/or publisher of an Open Publication-licensed document may elect certain options by appending language to the reference to or copy of the license. These options are considered part of the license instance and must be included with the license (or its incorporation by reference) in derived works. + +A. To prohibit distribution of substantively modified versions without the explicit permission of the author(s). "Substantive modification" is defined as a change to the semantic content of the document, and excludes mere changes in format or typographical corrections. + +To accomplish this, add the phrase `Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder.' to the license reference or copy. + +B. To prohibit any publication of this work or derivative works in whole or in part in standard (paper) book form for commercial purposes is prohibited unless prior permission is obtained from the copyright holder. + +To accomplish this, add the phrase 'Distribution of the work or derivative of the work in any standard (paper) book form is prohibited unless prior permission is obtained from the copyright holder.' to the license reference or copy. + +OPEN PUBLICATION POLICY APPENDIX: + +(This is not considered part of the license.) + +Open Publication works are available in source format via the Open Publication home page at http://works.opencontent.org/. + +Open Publication authors who want to include their own license on Open Publication works may do so, as long as their terms are not more restrictive than the Open Publication license. + +If you have questions about the Open Publication License, please contact David Wiley, and/or the Open Publication Authors' List at opal@opencontent.org, via email. + +To subscribe to the Open Publication Authors' List: +Send E-mail to opal-request@opencontent.org with the word "subscribe" in the body. + +To post to the Open Publication Authors' List: +Send E-mail to opal@opencontent.org or simply reply to a previous post. + +To unsubscribe from the Open Publication Authors' List: +Send E-mail to opal-request@opencontent.org with the word "unsubscribe" in the body. diff --git a/options/license/OSET-PL-2.1 b/options/license/OSET-PL-2.1 index fe7dd9437..15f0c7758 100644 --- a/options/license/OSET-PL-2.1 +++ b/options/license/OSET-PL-2.1 @@ -1,406 +1,161 @@ -OSET Public License (c) 2015 ALL RIGHTS RESERVED VERSION 2.1 THIS LICENSE -DEFINES THE RIGHTS OF USE, REPRODUCTION, DISTRIBUTION, MODIFICATION, AND REDISTRIBUTION -OF CERTAIN COVERED SOFTWARE (AS DEFINED BELOW) ORIGINALLY RELEASED BY THE -OPEN SOURCE ELECTION TECHNOLOGY FOUNDATION (FORMERLY "THE OSDV FOUNDATION"). +OSET Public License +(c) 2015 ALL RIGHTS RESERVED VERSION 2.1 -ANYONE WHO USES, REPRODUCES, DISTRIBUTES, MODIFIES, OR REDISTRIBUTES THE COVERED -SOFTWARE, OR ANY PART THEREOF, IS BY THAT ACTION, ACCEPTING IN FULL THE TERMS -CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE TO SUCH TERMS, YOU ARE NOT -PERMITTED TO USE THE COVERED SOFTWARE. This license was prepared based on -the Mozilla Public License ("MPL"), version 2.0. For annotation of the differences -between this license and MPL 2.0, please see the OSET Foundation web site -at www.OSETFoundation.org/public-license. +THIS LICENSE DEFINES THE RIGHTS OF USE, REPRODUCTION, DISTRIBUTION, MODIFICATION, AND REDISTRIBUTION OF CERTAIN COVERED SOFTWARE (AS DEFINED BELOW) ORIGINALLY RELEASED BY THE OPEN SOURCE ELECTION TECHNOLOGY FOUNDATION (FORMERLY “THE OSDV FOUNDATION”). ANYONE WHO USES, REPRODUCES, DISTRIBUTES, MODIFIES, OR REDISTRIBUTES THE COVERED SOFTWARE, OR ANY PART THEREOF, IS BY THAT ACTION, ACCEPTING IN FULL THE TERMS CONTAINED IN THIS AGREEMENT. IF YOU DO NOT AGREE TO SUCH TERMS, YOU ARE NOT PERMITTED TO USE THE COVERED SOFTWARE. + +This license was prepared based on the Mozilla Public License (“MPL”), version 2.0. For annotation of the differences between this license and MPL 2.0, please see the OSET Foundation web site at www.OSETFoundation.org/public-license. The text of the license begins here: - 1. Definitions +1. Definitions -1.1 "Contributor" means each individual or legal entity that creates, contributes -to the creation of, or owns Covered Software. + 1.1 “Contributor” means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software. -1.2 "Contributor Version" means the combination of the Contributions of others -(if any) used by a Contributor and that particular Contributor's Contribution. + 1.2 “Contributor Version” means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor’s Contribution. - 1.3 "Contribution" means Covered Software of a particular Contributor. + 1.3 “Contribution” means Covered Software of a particular Contributor. -1.4 "Covered Software" means Source Code Form to which the initial Contributor -has attached the notice in Exhibit A, the Executable Form of such Source Code -Form, and Modifications of such Source Code Form, in each case including portions -thereof. + 1.4 “Covered Software” means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof. - 1.5 "Incompatible With Secondary Licenses" means: + 1.5 “Incompatible With Secondary Licenses” means: + a. That the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or + b. that the Covered Software was made available under the terms of version 1.x or earlier of the License, but not also under the terms of a Secondary License. -a. That the initial Contributor has attached the notice described in Exhibit -B to the Covered Software; or + 1.6 “Executable Form” means any form of the work other than Source Code Form. -b. that the Covered Software was made available under the terms of version -1.x or earlier of the License, but not also under the terms of a Secondary -License. + 1.7 “Larger Work” means a work that combines Covered Software with other material, in a separate file (or files) that is not Covered Software. -1.6 "Executable Form" means any form of the work other than Source Code Form. + 1.8 “License” means this document. -1.7 "Larger Work" means a work that combines Covered Software with other material, -in a separate file (or files) that is not Covered Software. + 1.9 “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License. - 1.8 "License" means this document. + 1.10 “Modifications” means any of the following: + a. any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or + b. any new file in Source Code Form that contains any Covered Software. -1.9 "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently, any and all of the -rights conveyed by this License. + 1.11 “Patent Claims” of a Contributor means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version. - 1.10 "Modifications" means any of the following: + 1.12 “Secondary License” means one of: the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses. -a. any file in Source Code Form that results from an addition to, deletion -from, or modification of the contents of Covered Software; or + 1.13 “Source Code Form” means the form of the work preferred for making modifications. -b. any new file in Source Code Form that contains any Covered Software. + 1.14 “You” (or “Your”) means an individual or a legal entity exercising rights under this License. For legal entities, “You” includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means: (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. -1.11 "Patent Claims" of a Contributor means any patent claim(s), including -without limitation, method, process, and apparatus claims, in any patent Licensable -by such Contributor that would be infringed, but for the grant of the License, -by the making, using, selling, offering for sale, having made, import, or -transfer of either its Contributions or its Contributor Version. +2. License Grants and Conditions -1.12 "Secondary License" means one of: the GNU General Public License, Version -2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General -Public License, Version 3.0, or any later versions of those licenses. + 2.1 Grants Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license: + a. under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and + b. under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version. -1.13 "Source Code Form" means the form of the work preferred for making modifications. + 2.2 Effective Date + The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution. -1.14 "You" (or "Your") means an individual or a legal entity exercising rights -under this License. For legal entities, "You" includes any entity that controls, -is controlled by, or is under common control with You. For purposes of this -definition, "control" means: + 2.3 Limitations on Grant Scope + The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor: + a. for any code that a Contributor has removed from Covered Software; or + b. for infringements caused by: (i) Your and any other third party’s modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or + c. under Patent Claims infringed by Covered Software in the absence of its Contributions. + This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4). -(a) the power, direct or indirect, to cause the direction or management of -such entity, whether by contract or otherwise, or + 2.4 Subsequent Licenses + No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3). -(b) ownership of more than fifty percent (50%) of the outstanding shares or -beneficial ownership of such entity. + 2.5 Representation + Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License. - 2. License Grants and Conditions + 2.6 Fair Use + This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents. - 2.1 Grants + 2.7 Conditions + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1. -Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license: +3. Responsibilities -a. under intellectual property rights (other than patent or trademark) Licensable -by such Contributor to use, reproduce, make available, modify, display, perform, -distribute, and otherwise exploit its Contributions, either on an unmodified -basis, with Modifications, or as part of a Larger Work; and + 3.1 Distribution of Source Form + All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You must cause any of Your Modifications to carry prominent notices stating that You changed the files. You may not attempt to alter or restrict the recipients’ rights in the Source Code Form. -b. under Patent Claims of such Contributor to make, use, sell, offer for sale, -have made, import, and otherwise transfer either its Contributions or its -Contributor Version. + 3.2 Distribution of Executable Form + If You distribute Covered Software in Executable Form then: - 2.2 Effective Date + a. such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and + b. You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients’ rights in the Source Code Form under this License. -The licenses granted in Section 2.1 with respect to any Contribution become -effective for each Contribution on the date the Contributor first distributes -such Contribution. + 3.3 Distribution of a Larger Work + You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s). - 2.3 Limitations on Grant Scope + 3.4 Notices + You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies. -The licenses granted in this Section 2 are the only rights granted under this -License. No additional rights or licenses will be implied from the distribution -or licensing of Covered Software under this License. Notwithstanding Section -2.1(b) above, no patent license is granted by a Contributor: + 3.5 Application of Additional Terms -a. for any code that a Contributor has removed from Covered Software; or + 3.5.1 You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction. -b. for infringements caused by: (i) Your and any other third party's modifications -of Covered Software, or (ii) the combination of its Contributions with other -software (except as part of its Contributor Version); or + 3.5.2 You may place additional conditions upon the rights granted in this License to the extent necessary due to statute, judicial order, regulation (including without limitation state and federal procurement regulation), national security, or public interest. Any such additional conditions must be clearly described in the notice provisions required under Section 3.4. Any alteration of the terms of this License will apply to all copies of the Covered Software distributed by You or by any downstream recipients that receive the Covered Software from You. -c. under Patent Claims infringed by Covered Software in the absence of its -Contributions. +4. Inability to Comply Due to Statute or Regulation +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation, then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the notices required under Section 3.4. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -This License does not grant any rights in the trademarks, service marks, or -logos of any Contributor (except as may be necessary to comply with the notice -requirements in Section 3.4). +5. Termination - 2.4 Subsequent Licenses + 5.1 Failure to Comply + The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60-days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30-days after Your receipt of the notice. -No Contributor makes additional grants as a result of Your choice to distribute -the Covered Software under a subsequent version of this License (see Section -10.2) or under the terms of a Secondary License (if permitted under the terms -of Section 3.3). + 5.2 Patent Infringement Claims
 If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate. - 2.5 Representation + 5.3 Additional Compliance Terms + Notwithstanding the foregoing in this Section 5, for purposes of this Section, if You breach Section 3.1 (Distribution of Source Form), Section 3.2 (Distribution of Executable Form), Section 3.3 (Distribution of a Larger Work), or Section 3.4 (Notices), then becoming compliant as described in Section 5.1 must also include, no later than 30 days after receipt by You of notice of such violation by a Contributor, making the Covered Software available in Source Code Form as required by this License on a publicly available computer network for a period of no less than three (3) years. -Each Contributor represents that the Contributor believes its Contributions -are its original creation(s) or it has sufficient rights to grant the rights -to its Contributions conveyed by this License. + 5.4 Contributor Remedies + If You fail to comply with the terms of this License and do not thereafter become compliant in accordance with Section 5.1 and, if applicable, Section 5.3, then each Contributor reserves its right, in addition to any other rights it may have in law or in equity, to bring an action seeking injunctive relief, or damages for willful copyright or patent infringement (including without limitation damages for unjust enrichment, where available under law), for all actions in violation of rights that would otherwise have been granted under the terms of this License. - 2.6 Fair Use + 5.5 End User License Agreements + In the event of termination under this Section 5, all end user license agreements (excluding distributors and resellers), which have been validly granted by You or Your distributors under this License prior to termination shall survive termination. -This License is not intended to limit any rights You have under applicable -copyright doctrines of fair use, fair dealing, or other equivalents. +6. Disclaimer of Warranty +Covered Software is provided under this License on an “as is” basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer. - 2.7 Conditions +7. Limitation of Liability +Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party’s negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in -Section 2.1. +8. Litigation +Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party’s ability to bring cross-claims or counter-claims. - 3. Responsibilities +9. Government Terms - 3.1 Distribution of Source Form + 9.1 Commercial Item + The Covered Software is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Software with only those rights set forth herein. -All distribution of Covered Software in Source Code Form, including any Modifications -that You create or to which You contribute, must be under the terms of this -License. You must inform recipients that the Source Code Form of the Covered -Software is governed by the terms of this License, and how they can obtain -a copy of this License. You must cause any of Your Modifications to carry -prominent notices stating that You changed the files. You may not attempt -to alter or restrict the recipients' rights in the Source Code Form. + 9.2 No Sovereign Immunity + The U.S. federal government and states that use or distribute Covered Software hereby waive their sovereign immunity with respect to enforcement of the provisions of this License. - 3.2 Distribution of Executable Form + 9.3 Choice of Law and Venue - If You distribute Covered Software in Executable Form then: + 9.3.1 If You are a government of a state of the United States, or Your use of the Covered Software is pursuant to a procurement contract with such a state government, this License shall be governed by the law of such state, excluding its conflict-of-law provisions, and the adjudication of disputes relating to this License will be subject to the exclusive jurisdiction of the state and federal courts located in such state. + 9.3.2 If You are an agency of the United States federal government, or Your use of the Covered Software is pursuant to a procurement contract with such an agency, this License shall be governed by federal law for all purposes, and the adjudication of disputes relating to this License will be subject to the exclusive jurisdiction of the federal courts located in Washington, D.C. + 9.3.3 You may alter the terms of this Section 9.3 for this License as described in Section 3.5.2. -a. such Covered Software must also be made available in Source Code Form, -as described in Section 3.1, and You must inform recipients of the Executable -Form how they can obtain a copy of such Source Code Form by reasonable means -in a timely manner, at a charge no more than the cost of distribution to the -recipient; and + 9.4 Supremacy + This Section 9 is in lieu of, and supersedes, any other Federal Acquisition Regulation, Defense Federal Acquisition Regulation, or other clause or provision that addresses government rights in computer software under this License. -b. You may distribute such Executable Form under the terms of this License, -or sublicense it under different terms, provided that the license for the -Executable Form does not attempt to limit or alter the recipients' rights -in the Source Code Form under this License. +10. Miscellaneous +This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation, which provides that the language of a contract shall be construed against the drafter, shall not be used to construe this License against a Contributor. - 3.3 Distribution of a Larger Work +11. Versions of the License -You may create and distribute a Larger Work under terms of Your choice, provided -that You also comply with the requirements of this License for the Covered -Software. If the Larger Work is a combination of Covered Software with a work -governed by one or more Secondary Licenses, and the Covered Software is not -Incompatible With Secondary Licenses, this License permits You to additionally -distribute such Covered Software under the terms of such Secondary License(s), -so that the recipient of the Larger Work may, at their option, further distribute -the Covered Software under the terms of either this License or such Secondary -License(s). - - 3.4 Notices - -You may not remove or alter the substance of any license notices (including -copyright notices, patent notices, disclaimers of warranty, or limitations -of liability) contained within the Source Code Form of the Covered Software, -except that You may alter any license notices to the extent required to remedy -known factual inaccuracies. - - 3.5 Application of Additional Terms - -3.5.1 You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered Software. -However, You may do so only on Your own behalf, and not on behalf of any Contributor. -You must make it absolutely clear that any such warranty, support, indemnity, -or liability obligation is offered by You alone, and You hereby agree to indemnify -every Contributor for any liability incurred by such Contributor as a result -of warranty, support, indemnity or liability terms You offer. You may include -additional disclaimers of warranty and limitations of liability specific to -any jurisdiction. - -3.5.2 You may place additional conditions upon the rights granted in this -License to the extent necessary due to statute, judicial order, regulation -(including without limitation state and federal procurement regulation), national -security, or public interest. Any such additional conditions must be clearly -described in the notice provisions required under Section 3.4. Any alteration -of the terms of this License will apply to all copies of the Covered Software -distributed by You or by any downstream recipients that receive the Covered -Software from You. - - 4. Inability to Comply Due to Statute or Regulation - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Software due to statute, judicial -order, or regulation, then You must: (a) comply with the terms of this License -to the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the notices required under -Section 3.4. Except to the extent prohibited by statute or regulation, such -description must be sufficiently detailed for a recipient of ordinary skill -to be able to understand it. - - 5. Termination - - 5.1 Failure to Comply - -The rights granted under this License will terminate automatically if You -fail to comply with any of its terms. However, if You become compliant, then -the rights granted under this License from a particular Contributor are reinstated -(a) provisionally, unless and until such Contributor explicitly and finally -terminates Your grants, and (b) on an ongoing basis, if such Contributor fails -to notify You of the non-compliance by some reasonable means prior to 60-days -after You have come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor notifies -You of the non-compliance by some reasonable means, this is the first time -You have received notice of non-compliance with this License from such Contributor, -and You become compliant prior to 30-days after Your receipt of the notice. - - 5.2 Patent Infringement Claims - -If You initiate litigation against any entity by asserting a patent infringement -claim (excluding declaratory judgment actions, counter-claims, and cross-claims -) alleging that a Contributor Version directly or indirectly infringes any -patent, then the rights granted to You by any and all Contributors for the -Covered Software under Section 2.1 of this License shall terminate. - - 5.3 Additional Compliance Terms - -Notwithstanding the foregoing in this Section 5, for purposes of this Section, -if You breach Section 3.1 (Distribution of Source Form), Section 3.2 (Distribution -of Executable Form), Section 3.3 (Distribution of a Larger Work), or Section -3.4 (Notices), then becoming compliant as described in Section 5.1 must also -include, no later than 30 days after receipt by You of notice of such violation -by a Contributor, making the Covered Software available in Source Code Form -as required by this License on a publicly available computer network for a -period of no less than three (3) years. - - 5.4 Contributor Remedies - -If You fail to comply with the terms of this License and do not thereafter -become compliant in accordance with Section 5.1 and, if applicable, Section -5.3, then each Contributor reserves its right, in addition to any other rights -it may have in law or in equity, to bring an action seeking injunctive relief, -or damages for willful copyright or patent infringement (including without -limitation damages for unjust enrichment, where available under law), for -all actions in violation of rights that would otherwise have been granted -under the terms of this License. - - 5.5 End User License Agreements - -In the event of termination under this Section 5, all end user license agreements -(excluding distributors and resellers), which have been validly granted by -You or Your distributors under this License prior to termination shall survive -termination. - - 6. Disclaimer of Warranty - -Covered Software is provided under this License on an "as is" basis, without -warranty of any kind, either expressed, implied, or statutory, including, -without limitation, warranties that the Covered Software is free of defects, -merchantable, fit for a particular purpose or non-infringing. The entire risk -as to the quality and performance of the Covered Software is with You. Should -any Covered Software prove defective in any respect, You (not any Contributor) -assume the cost of any necessary servicing, repair, or correction. This disclaimer -of warranty constitutes an essential part of this License. No use of any Covered -Software is authorized under this License except under this disclaimer. - - 7. Limitation of Liability - -Under no circumstances and under no legal theory, whether tort (including -negligence), contract, or otherwise, shall any Contributor, or anyone who -distributes Covered Software as permitted above, be liable to You for any -direct, indirect, special, incidental, or consequential damages of any character -including, without limitation, damages for lost profits, loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses, even if such party shall have been informed of the possibility -of such damages. This limitation of liability shall not apply to liability -for death or personal injury resulting from such party's negligence to the -extent applicable law prohibits such limitation. Some jurisdictions do not -allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. - - 8. Litigation - -Any litigation relating to this License may be brought only in the courts -of a jurisdiction where the defendant maintains its principal place of business -and such litigation shall be governed by laws of that jurisdiction, without -reference to its conflict-of-law provisions. Nothing in this Section shall -prevent a party's ability to bring cross-claims or counter-claims. - - 9. Government Terms - - 9.1 Commercial Item - -The Covered Software is a "commercial item," as that term is defined in 48 -C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and -"commercial computer software documentation," as such terms are used in 48 -C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. -227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire -Covered Software with only those rights set forth herein. - - 9.2 No Sovereign Immunity - -The U.S. federal government and states that use or distribute Covered Software -hereby waive their sovereign immunity with respect to enforcement of the provisions -of this License. - - 9.3 Choice of Law and Venue - -9.3.1 If You are a government of a state of the United States, or Your use -of the Covered Software is pursuant to a procurement contract with such a -state government, this License shall be governed by the law of such state, -excluding its conflict-of-law provisions, and the adjudication of disputes -relating to this License will be subject to the exclusive jurisdiction of -the state and federal courts located in such state. - -9.3.2 If You are an agency of the United States federal government, or Your -use of the Covered Software is pursuant to a procurement contract with such -an agency, this License shall be governed by federal law for all purposes, -and the adjudication of disputes relating to this License will be subject -to the exclusive jurisdiction of the federal courts located in Washington, -D.C. - -9.3.3 You may alter the terms of this Section 9.3 for this License as described -in Section 3.5.2. - - 9.4 Supremacy - -This Section 9 is in lieu of, and supersedes, any other Federal Acquisition -Regulation, Defense Federal Acquisition Regulation, or other clause or provision -that addresses government rights in computer software under this License. - - 10. Miscellaneous - -This License represents the complete agreement concerning the subject matter -hereof. If any provision of this License is held to be unenforceable, such -provision shall be reformed only to the extent necessary to make it enforceable. -Any law or regulation, which provides that the language of a contract shall -be construed against the drafter, shall not be used to construe this License -against a Contributor. - - 11. Versions of the License - - 11.1 New Versions - -The Open Source Election Technology Foundation ("OSET") (formerly known as -the Open Source Digital Voting Foundation) is the steward of this License. -Except as provided in Section 11.3, no one other than the license steward -has the right to modify or publish new versions of this License. Each version -will be given a distinguishing version number. - - 11.2 Effects of New Versions - -You may distribute the Covered Software under the terms of the version of -the License under which You originally received the Covered Software, or under -the terms of any subsequent version published by the license steward. - - 11.3 Modified Versions - -If You create software not governed by this License, and You want to create -a new license for such software, You may create and use a modified version -of this License if You rename the license and remove any references to the -name of the license steward (except to note that such modified license differs -from this License). - -11.4 Distributing Source Code Form That is Incompatible With Secondary Licenses + 11.1 New Versions The Open Source Election Technology Foundation (“OSET”) (formerly known as the Open Source Digital Voting Foundation) is the steward of this License. Except as provided in Section 11.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number. -If You choose to distribute Source Code Form that is Incompatible With Secondary -Licenses under the terms of this version of the License, the notice described -in Exhibit B of this License must be attached. EXHIBIT A - Source Code Form -License Notice - -This Source Code Form is subject to the terms of the OSET Public License, -v.2.1 ("OPL"). If a copy of the OPL was not distributed with this file, You -can obtain one at: www.OSETFoundation.org/public-license. + 11.2 Effects of New Versions You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward. -If it is not possible or desirable to put the Notice in a particular file, -then You may include the Notice in a location (e.g., such as a LICENSE file -in a relevant directory) where a recipient would be likely to look for such -a notice. You may add additional accurate notices of copyright ownership. -EXHIBIT B - "Incompatible With Secondary License" Notice + 11.3 Modified Versions If You create software not governed by this License, and You want to create a new license for such software, You may create and use a modified version of this License if You rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License). -This Source Code Form is "Incompatible With Secondary Licenses", as defined -by the OSET Public License, v.2.1. + 11.4 Distributing Source Code Form That is Incompatible With Secondary Licenses If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached. + +EXHIBIT A – Source Code Form License Notice + +This Source Code Form is subject to the terms of the OSET Public License, v.2.1 (“OSET-PL-2.1”). If a copy of the OPL was not distributed with this file, You can obtain one at: www.OSETFoundation.org/public-license. + +If it is not possible or desirable to put the Notice in a particular file, then You may include the Notice in a location (e.g., such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. You may add additional accurate notices of copyright ownership. + +EXHIBIT B - “Incompatible With Secondary License” Notice + +This Source Code Form is “Incompatible With Secondary Licenses”, as defined by the OSET Public License, v.2.1. diff --git a/options/license/OSL-1.0 b/options/license/OSL-1.0 index 0f250090b..57ef0d058 100644 --- a/options/license/OSL-1.0 +++ b/options/license/OSL-1.0 @@ -1,149 +1,45 @@ The Open Software License v. 1.0 -This Open Software License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -"Licensed under the Open Software License version 1.0" + "Licensed under the Open Software License version 1.0" License Terms -1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, non-sublicenseable license to do the following: +1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license to do the following: - a) to reproduce the Original Work in copies; + a) to reproduce the Original Work in copies; -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; + b) to prepare derivative works ("Derivative Works") based upon the Original Work; -c) to distribute copies of the Original Work and Derivative Works to the public, -with the proviso that copies of Original Work or Derivative Works that You -distribute shall be licensed under the Open Software License; + c) to distribute copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute shall be licensed under the Open Software License; - d) to perform the Original Work publicly; and + d) to perform the Original Work publicly; and - e) to display the Original Work publicly. + e) to display the Original Work publicly. -2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, non-sublicenseable license, under patent claims -owned or controlled by the Licensor that are embodied in the Original Work -as furnished by the Licensor ("Licensed Claims") to make, use, sell and offer -for sale the Original Work. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, non-sublicenseable license under the Licensed Claims -to make, use, sell and offer for sale Derivative Works. +2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor ("Licensed Claims") to make, use, sell and offer for sale the Original Work. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license under the Licensed Claims to make, use, sell and offer for sale Derivative Works. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to access and modify the Original Work. Licensor -hereby agrees to provide a machine-readable copy of the Source Code of the -Original Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work, and by publishing the address of -that information repository in a notice immediately following the copyright -notice that applies to the Original Work. +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to access and modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. -4) Exclusions From License Grant. Nothing in this License shall be deemed -to grant any rights to trademarks, copyrights, patents, trade secrets or any -other intellectual property of Licensor except as expressly stated herein. -No patent license is granted to make, use, sell or offer to sell embodiments -of any patent claims other than the Licensed Claims defined in Section 2. -No right is granted to the trademarks of Licensor even if such marks are included -in the Original Work. Nothing in this License shall be interpreted to prohibit -Licensor from licensing under different terms from this License any Original -Work that Licensor otherwise would have a right to license. +4) Exclusions From License Grant. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the Licensed Claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. -5) External Deployment. The term "External Deployment" means the use or distribution -of the Original Work or Derivative Works in any way such that the Original -Work or Derivative Works may be accessed or used by anyone other than You, -whether the Original Work or Derivative Works are distributed to those persons, -made available as an application intended for use over a computer network, -or used to provide services or otherwise deliver content to anyone other than -You. As an express condition for the grants of license hereunder, You agree -that any External Deployment by You shall be deemed a distribution and shall -be licensed to all under the terms of this License, as prescribed in section -1(c) herein. +5) External Deployment. The term "External Deployment" means the use or distribution of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be accessed or used by anyone other than You, whether the Original Work or Derivative Works are distributed to those persons, made available as an application intended for use over a computer network, or used to provide services or otherwise deliver content to anyone other than You. As an express condition for the grants of license hereunder, You agree that any External Deployment by You shall be deemed a distribution and shall be licensed to all under the terms of this License, as prescribed in section 1(c) herein. -6) Warranty and Disclaimer of Warranty. LICENSOR WARRANTS THAT THE COPYRIGHT -IN AND TO THE ORIGINAL WORK IS OWNED BY THE LICENSOR OR THAT THE ORIGINAL -WORK IS DISTRIBUTED BY LICENSOR UNDER A VALID CURRENT LICENSE FROM THE COPYRIGHT -OWNER. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY PRECEEDING SENTENCE, -THE ORIGINAL WORK IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT -WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTY -OF NON-INFRINGEMENT AND WARRANTIES THAT THE ORIGINAL WORK IS MERCHANTABLE -OR FIT FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE -ORIGINAL WORK IS WITH YOU. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL -PART OF THIS LICENSE. NO LICENSE TO ORIGINAL WORK IS GRANTED HEREUNDER EXCEPT -UNDER THIS DISCLAIMER. +6) Warranty and Disclaimer of Warranty. LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE ORIGINAL WORK IS OWNED BY THE LICENSOR OR THAT THE ORIGINAL WORK IS DISTRIBUTED BY LICENSOR UNDER A VALID CURRENT LICENSE FROM THE COPYRIGHT OWNER. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY PRECEEDING SENTENCE, THE ORIGINAL WORK IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE WARRANTY OF NON-INFRINGEMENT AND WARRANTIES THAT THE ORIGINAL WORK IS MERCHANTABLE OR FIT FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO LICENSE TO ORIGINAL WORK IS GRANTED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -7) Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, -WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR -BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR -CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING AS A RESULT OF THIS LICENSE -OR THE USE OF THE ORIGINAL WORK INCLUDING, WITHOUT LIMITATION, DAMAGES FOR -LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND -ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PERSON SHALL HAVE BEEN -INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. +7) Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR BE LIABLE TO ANY PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING AS A RESULT OF THIS LICENSE OR THE USE OF THE ORIGINAL WORK INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PERSON SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -8) Acceptance and Termination. Nothing else but this License (or another written -agreement between Licensor and You) grants You permission to create Derivative -Works based upon the Original Work, and any attempt to do so except under -the terms of this License (or another written agreement between Licensor and -You) is expressly prohibited by U.S. copyright law, the equivalent laws of -other countries, and by international treaty. Therefore, by exercising any -of the rights granted to You in Sections 1 and 2 herein, You indicate Your -acceptance of this License and all of its terms and conditions. This license -shall terminate immediately and you may no longer exercise any of the rights -granted to You by this License upon Your failure to honor the proviso in Section -1(c) herein. +8) Acceptance and Termination. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Sections 1 and 2 herein, You indicate Your acceptance of this License and all of its terms and conditions. This license shall terminate immediately and you may no longer exercise any of the rights granted to You by this License upon Your failure to honor the proviso in Section 1(c) herein. -9) Mutual Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -if You file a lawsuit in any court alleging that any OSI Certified open source -software that is licensed under any license containing this "Mutual Termination -for Patent Action" clause infringes any patent claims that are essential to -use that software. +9) Mutual Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License if You file a lawsuit in any court alleging that any OSI Certified open source software that is licensed under any license containing this "Mutual Termination for Patent Action" clause infringes any patent claims that are essential to use that software. -10) Jurisdiction, Venue and Governing Law. You agree that any lawsuit arising -under or relating to this License shall be maintained in the courts of the -jurisdiction wherein the Licensor resides or in which Licensor conducts its -primary business, and under the laws of that jurisdiction excluding its conflict-of-law -provisions. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. Any use of the -Original Work outside the scope of this License or after its termination shall -be subject to the requirements and penalties of the U.S. Copyright Act, 17 -U.S.C. § 101 et seq., the equivalent laws of other countries, and international -treaty. This section shall survive the termination of this License. +10) Jurisdiction, Venue and Governing Law. You agree that any lawsuit arising under or relating to this License shall be maintained in the courts of the jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. -11) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +11) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -12) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. +12) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -13) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. +13) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/OSL-1.1 b/options/license/OSL-1.1 index c0718b24c..050f131fc 100644 --- a/options/license/OSL-1.1 +++ b/options/license/OSL-1.1 @@ -1,158 +1,47 @@ The Open Software License v. 1.1 -This Open Software License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -Licensed under the Open Software License version 1.1 + Licensed under the Open Software License version 1.1 -1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, non-sublicenseable license to do the following: +1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license to do the following: - a) to reproduce the Original Work in copies; + a) to reproduce the Original Work in copies; -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; + b) to prepare derivative works ("Derivative Works") based upon the Original Work; -c) to distribute copies of the Original Work and Derivative Works to the public, -with the proviso that copies of Original Work or Derivative Works that You -distribute shall be licensed under the Open Software License; + c) to distribute copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute shall be licensed under the Open Software License; - d) to perform the Original Work publicly; and + d) to perform the Original Work publicly; and - e) to display the Original Work publicly. + e) to display the Original Work publicly. -2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, non-sublicenseable license, under patent claims -owned or controlled by the Licensor that are embodied in the Original Work -as furnished by the Licensor ("Licensed Claims") to make, use, sell and offer -for sale the Original Work. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, non-sublicenseable license under the Licensed Claims -to make, use, sell and offer for sale Derivative Works. +2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor ("Licensed Claims") to make, use, sell and offer for sale the Original Work. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, non-sublicenseable license under the Licensed Claims to make, use, sell and offer for sale Derivative Works. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work, and by publishing the address of -that information repository in a notice immediately following the copyright -notice that applies to the Original Work. +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. -4) Exclusions From License Grant. Nothing in this License shall be deemed -to grant any rights to trademarks, copyrights, patents, trade secrets or any -other intellectual property of Licensor except as expressly stated herein. -No patent license is granted to make, use, sell or offer to sell embodiments -of any patent claims other than the Licensed Claims defined in Section 2. -No right is granted to the trademarks of Licensor even if such marks are included -in the Original Work. Nothing in this License shall be interpreted to prohibit -Licensor from licensing under different terms from this License any Original -Work that Licensor otherwise would have a right to license. +4) Exclusions From License Grant. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the Licensed Claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. -5) External Deployment. The term "External Deployment" means the use or distribution -of the Original Work or Derivative Works in any way such that the Original -Work or Derivative Works may be used by anyone other than You, whether the -Original Work or Derivative Works are distributed to those persons or made -available as an application intended for use over a computer network. As an -express condition for the grants of license hereunder, You agree that any -External Deployment by You of a Derivative Work shall be deemed a distribution -and shall be licensed to all under the terms of this License, as prescribed -in section 1(c) herein. +5) External Deployment. The term "External Deployment" means the use or distribution of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether the Original Work or Derivative Works are distributed to those persons or made available as an application intended for use over a computer network. As an express condition for the grants of license hereunder, You agree that any External Deployment by You of a Derivative Work shall be deemed a distribution and shall be licensed to all under the terms of this License, as prescribed in section 1(c) herein. -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -7) Warranty and Disclaimer of Warranty. Licensor warrants that the copyright -in and to the Original Work is owned by the Licensor or that the Original -Work is distributed by Licensor under a valid current license from the copyright -owner. Except as expressly stated in the immediately proceeding sentence, -the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT -WARRANTY, either express or implied, including, without limitation, the warranties -of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER -OF WARRANTY constitutes an essential part of this License. No license to Original -Work is granted hereunder except under this disclaimer. +7) Warranty and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work is owned by the Licensor or that the Original Work is distributed by Licensor under a valid current license from the copyright owner. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for -loss of goodwill, work stoppage, computer failure or malfunction, or any and -all other commercial damages or losses. This limitation of liability shall -not apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some jurisdictions -do not allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. -9) Acceptance and Termination. If You distribute copies of the Original Work -or a Derivative Work, You must make a reasonable effort under the circumstances -to obtain the express and volitional assent of recipients to the terms of -this License. Nothing else but this License (or another written agreement -between Licensor and You) grants You permission to create Derivative Works -based upon the Original Work or to exercise any of the rights granted in Sections -1 herein, and any attempt to do so except under the terms of this License -(or another written agreement between Licensor and You) is expressly prohibited -by U.S. copyright law, the equivalent laws of other countries, and by international -treaty. Therefore, by exercising any of the rights granted to You in Sections -1 herein, You indicate Your acceptance of this License and all of its terms -and conditions. This License shall terminate immediately and you may no longer -exercise any of the rights granted to You by this License upon Your failure -to honor the proviso in Section 1(c) herein. +9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express and volitional assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Sections 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Sections 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. This License shall terminate immediately and you may no longer exercise any of the rights granted to You by this License upon Your failure to honor the proviso in Section 1(c) herein. -10) Mutual Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -if You file a lawsuit in any court alleging that any OSI Certified open source -software that is licensed under any license containing this "Mutual Termination -for Patent Action" clause infringes any patent claims that are essential to -use that software. +10) Mutual Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License if You file a lawsuit in any court alleging that any OSI Certified open source software that is licensed under any license containing this "Mutual Termination for Patent Action" clause infringes any patent claims that are essential to use that software. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. å¤ 101 et -seq., the equivalent laws of other countries, and international treaty. This -section shall survive the termination of this License. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. å¤ 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. +13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/OSL-2.0 b/options/license/OSL-2.0 index e648c1642..78626fa53 100644 --- a/options/license/OSL-2.0 +++ b/options/license/OSL-2.0 @@ -1,162 +1,47 @@ -The Open Software License v. 2.0 +Open Software License v. 2.0 -This Open Software License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -Licensed under the Open Software License version 2.0 + Licensed under the Open Software License version 2.0 -1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license to do the following: +1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: - a) to reproduce the Original Work in copies; + a) to reproduce the Original Work in copies; -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; + b) to prepare derivative works ("Derivative Works") based upon the Original Work; -c) to distribute copies of the Original Work and Derivative Works to the public, -with the proviso that copies of Original Work or Derivative Works that You -distribute shall be licensed under the Open Software License; + c) to distribute copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute shall be licensed under the Open Software License; - d) to perform the Original Work publicly; and + d) to perform the Original Work publicly; and - e) to display the Original Work publicly. + e) to display the Original Work publicly. -2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license, under patent claims owned -or controlled by the Licensor that are embodied in the Original Work as furnished -by the Licensor, to make, use, sell and offer for sale the Original Work and -Derivative Works. +2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work, and by publishing the address of -that information repository in a notice immediately following the copyright -notice that applies to the Original Work. +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior written permission of the Licensor. Nothing in -this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except -as expressly stated herein. No patent license is granted to make, use, sell -or offer to sell embodiments of any patent claims other than the licensed -claims defined in Section 2. No right is granted to the trademarks of Licensor -even if such marks are included in the Original Work. Nothing in this License -shall be interpreted to prohibit Licensor from licensing under different terms -from this License any Original Work that Licensor otherwise would have a right -to license. +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. -5) External Deployment. The term "External Deployment" means the use or distribution -of the Original Work or Derivative Works in any way such that the Original -Work or Derivative Works may be used by anyone other than You, whether the -Original Work or Derivative Works are distributed to those persons or made -available as an application intended for use over a computer network. As an -express condition for the grants of license hereunder, You agree that any -External Deployment by You of a Derivative Work shall be deemed a distribution -and shall be licensed to all under the terms of this License, as prescribed -in section 1(c) herein. +5) External Deployment. The term "External Deployment" means the use or distribution of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether the Original Work or Derivative Works are distributed to those persons or made available as an application intended for use over a computer network. As an express condition for the grants of license hereunder, You agree that any External Deployment by You of a Derivative Work shall be deemed a distribution and shall be licensed to all under the terms of this License, as prescribed in section 1(c) herein. -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the -terms of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. -No license to Original Work is granted hereunder except under this disclaimer. +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for -loss of goodwill, work stoppage, computer failure or malfunction, or any and -all other commercial damages or losses. This limitation of liability shall -not apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some jurisdictions -do not allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. -9) Acceptance and Termination. If You distribute copies of the Original Work -or a Derivative Work, You must make a reasonable effort under the circumstances -to obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, -by exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. This -License shall terminate immediately and you may no longer exercise any of -the rights granted to You by this License upon Your failure to honor the proviso -in Section 1(c) herein. +9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. This License shall terminate immediately and you may no longer exercise any of the rights granted to You by this License upon Your failure to honor the proviso in Section 1(c) herein. -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -for patent infringement (i) against Licensor with respect to a patent applicable -to software or (ii) against any entity with respect to a patent applicable -to the Original Work (but excluding combinations of the Original Work with -other software or hardware). +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, for patent infringement (i) against Licensor with respect to a patent applicable to software or (ii) against any entity with respect to a patent applicable to the Original Work (but excluding combinations of the Original Work with other software or hardware). -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq., -the equivalent laws of other countries, and international treaty. This section -shall survive the termination of this License. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. +13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +This license is Copyright (C) 2003 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/OSL-2.1 b/options/license/OSL-2.1 index e7ab471ba..a2f08d176 100644 --- a/options/license/OSL-2.1 +++ b/options/license/OSL-2.1 @@ -1,162 +1,47 @@ The Open Software Licensev. 2.1 -This Open Software License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following notice immediately following the copyright notice for the Original -Work: +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following notice immediately following the copyright notice for the Original Work: -Licensed under the Open Software License version 2.1 + Licensed under the Open Software License version 2.1 -1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license to do the following: +1) Grant of Copyright License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license to do the following: - a) to reproduce the Original Work in copies; + a) to reproduce the Original Work in copies; -b) to prepare derivative works ("Derivative Works") based upon the Original -Work; + b) to prepare derivative works ("Derivative Works") based upon the Original Work; -c) to distribute copies of the Original Work and Derivative Works to the public, -with the proviso that copies of Original Work or Derivative Works that You -distribute shall be licensed under the Open Software License; + c) to distribute copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute shall be licensed under the Open Software License; - d) to perform the Original Work publicly; and + d) to perform the Original Work publicly; and - e) to display the Original Work publicly. + e) to display the Original Work publicly. -2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, -non-exclusive, perpetual, sublicenseable license, under patent claims owned -or controlled by the Licensor that are embodied in the Original Work as furnished -by the Licensor, to make, use, sell and offer for sale the Original Work and -Derivative Works. +2) Grant of Patent License. Licensor hereby grants You a world-wide, royalty-free, non-exclusive, perpetual, sublicenseable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, to make, use, sell and offer for sale the Original Work and Derivative Works. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor hereby -agrees to provide a machine-readable copy of the Source Code of the Original -Work along with each copy of the Original Work that Licensor distributes. -Licensor reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work, and by publishing the address of -that information repository in a notice immediately following the copyright -notice that applies to the Original Work. +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor hereby agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work, and by publishing the address of that information repository in a notice immediately following the copyright notice that applies to the Original Work. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior written permission of the Licensor. Nothing in -this License shall be deemed to grant any rights to trademarks, copyrights, -patents, trade secrets or any other intellectual property of Licensor except -as expressly stated herein. No patent license is granted to make, use, sell -or offer to sell embodiments of any patent claims other than the licensed -claims defined in Section 2. No right is granted to the trademarks of Licensor -even if such marks are included in the Original Work. Nothing in this License -shall be interpreted to prohibit Licensor from licensing under different terms -from this License any Original Work that Licensor otherwise would have a right -to license. +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior written permission of the Licensor. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor except as expressly stated herein. No patent license is granted to make, use, sell or offer to sell embodiments of any patent claims other than the licensed claims defined in Section 2. No right is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any Original Work that Licensor otherwise would have a right to license. -5) External Deployment. The term "External Deployment" means the use or distribution -of the Original Work or Derivative Works in any way such that the Original -Work or Derivative Works may be used by anyone other than You, whether the -Original Work or Derivative Works are distributed to those persons or made -available as an application intended for use over a computer network. As an -express condition for the grants of license hereunder, You agree that any -External Deployment by You of a Derivative Work shall be deemed a distribution -and shall be licensed to all under the terms of this License, as prescribed -in section 1(c) herein. +5) External Deployment. The term "External Deployment" means the use or distribution of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether the Original Work or Derivative Works are distributed to those persons or made available as an application intended for use over a computer network. As an express condition for the grants of license hereunder, You agree that any External Deployment by You of a Derivative Work shall be deemed a distribution and shall be licensed to all under the terms of this License, as prescribed in section 1(c) herein. -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the -terms of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately proceeding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. -No license to Original Work is granted hereunder except under this disclaimer. +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately proceeding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to Original Work is granted hereunder except under this disclaimer. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to any person for any direct, indirect, special, incidental, -or consequential damages of any character arising as a result of this License -or the use of the Original Work including, without limitation, damages for -loss of goodwill, work stoppage, computer failure or malfunction, or any and -all other commercial damages or losses. This limitation of liability shall -not apply to liability for death or personal injury resulting from Licensor's -negligence to the extent applicable law prohibits such limitation. Some jurisdictions -do not allow the exclusion or limitation of incidental or consequential damages, -so this exclusion and limitation may not apply to You. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to any person for any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to liability for death or personal injury resulting from Licensor's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You. -9) Acceptance and Termination. If You distribute copies of the Original Work -or a Derivative Work, You must make a reasonable effort under the circumstances -to obtain the express assent of recipients to the terms of this License. Nothing -else but this License (or another written agreement between Licensor and You) -grants You permission to create Derivative Works based upon the Original Work -or to exercise any of the rights granted in Section 1 herein, and any attempt -to do so except under the terms of this License (or another written agreement -between Licensor and You) is expressly prohibited by U.S. copyright law, the -equivalent laws of other countries, and by international treaty. Therefore, -by exercising any of the rights granted to You in Section 1 herein, You indicate -Your acceptance of this License and all of its terms and conditions. This -License shall terminate immediately and you may no longer exercise any of -the rights granted to You by this License upon Your failure to honor the proviso -in Section 1(c) herein. +9) Acceptance and Termination. If You distribute copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. Nothing else but this License (or another written agreement between Licensor and You) grants You permission to create Derivative Works based upon the Original Work or to exercise any of the rights granted in Section 1 herein, and any attempt to do so except under the terms of this License (or another written agreement between Licensor and You) is expressly prohibited by U.S. copyright law, the equivalent laws of other countries, and by international treaty. Therefore, by exercising any of the rights granted to You in Section 1 herein, You indicate Your acceptance of this License and all of its terms and conditions. This License shall terminate immediately and you may no longer exercise any of the rights granted to You by this License upon Your failure to honor the proviso in Section 1(c) herein. -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes -a patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software -or hardware. +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et seq., -the equivalent laws of other countries, and international treaty. This section -shall survive the termination of this License. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of the U.S. Copyright Act, 17 U.S.C. § 101 et seq., the equivalent laws of other countries, and international treaty. This section shall survive the termination of this License. -12) Attorneys Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +12) Attorneys Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -13) Miscellaneous. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. +13) Miscellaneous. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. -Permission is hereby granted to copy and distribute this license without modification. -This license may not be modified without the express written permission of -its copyright owner. +This license is Copyright (C) 2003-2004 Lawrence E. Rosen. All rights reserved. Permission is hereby granted to copy and distribute this license without modification. This license may not be modified without the express written permission of its copyright owner. diff --git a/options/license/OSL-3.0 b/options/license/OSL-3.0 index d69845ca0..2e8fa2795 100644 --- a/options/license/OSL-3.0 +++ b/options/license/OSL-3.0 @@ -1,169 +1,47 @@ Open Software License v. 3.0 (OSL-3.0) -This Open Software License (the "License") applies to any original work of -authorship (the "Original Work") whose owner (the "Licensor") has placed the -following licensing notice adjacent to the copyright notice for the Original -Work: +This Open Software License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: -Licensed under the Open Software License version 3.0 + Licensed under the Open Software License version 3.0 -1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, for the duration of the copyright, to -do the following: +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: -a) to reproduce the Original Work in copies, either alone or as part of a -collective work; + a) to reproduce the Original Work in copies, either alone or as part of a collective work; -b) to translate, adapt, alter, transform, modify, or arrange the Original -Work, thereby creating derivative works ("Derivative Works") based upon the -Original Work; + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; -c) to distribute or communicate copies of the Original Work and Derivative -Works to the public, with the proviso that copies of Original Work or Derivative -Works that You distribute or communicate shall be licensed under this Open -Software License; + c) to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work or Derivative Works that You distribute or communicate shall be licensed under this Open Software License; - d) to perform the Original Work publicly; and + d) to perform the Original Work publicly; and - e) to display the Original Work publicly. + e) to display the Original Work publicly. -2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, under patent claims owned or controlled -by the Licensor that are embodied in the Original Work as furnished by the -Licensor, for the duration of the patents, to make, use, sell, offer for sale, -have made, and import the Original Work and Derivative Works. +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor agrees -to provide a machine-readable copy of the Source Code of the Original Work -along with each copy of the Original Work that Licensor distributes. Licensor -reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work. +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior permission of the Licensor. Except as expressly -stated herein, nothing in this License grants any license to Licensor's trademarks, -copyrights, patents, trade secrets or any other intellectual property. No -patent license is granted to make, use, sell, offer for sale, have made, or -import embodiments of any patent claims other than the licensed claims defined -in Section 2. No license is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall -be interpreted to prohibit Licensor from licensing under terms different from -this License any Original Work that Licensor otherwise would have a right -to license. +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. -5) External Deployment. The term "External Deployment" means the use, distribution, -or communication of the Original Work or Derivative Works in any way such -that the Original Work or Derivative Works may be used by anyone other than -You, whether those works are distributed or communicated to those persons -or made available as an application intended for use over a network. As an -express condition for the grants of license hereunder, You must treat any -External Deployment by You of the Original Work or a Derivative Work as a -distribution under section 1(c). +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent, or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the -terms of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately preceding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of non-infringement, merchantability or fitness for a particular -purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. -No license to the Original Work is granted by this License except under this -disclaimer. +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to anyone for any indirect, special, incidental, or consequential -damages of any character arising as a result of this License or the use of -the Original Work including, without limitation, damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses. This limitation of liability shall not apply to the extent -applicable law prohibits such limitation. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. -9) Acceptance and Termination. If, at any time, You expressly assented to -this License, that assent indicates your clear and irrevocable acceptance -of this License and all of its terms and conditions. If You distribute or -communicate copies of the Original Work or a Derivative Work, You must make -a reasonable effort under the circumstances to obtain the express assent of -recipients to the terms of this License. This License conditions your rights -to undertake the activities listed in Section 1, including your right to create -Derivative Works based upon the Original Work, and doing so without honoring -these terms and conditions is prohibited by copyright law and international -treaty. Nothing in this License is intended to affect copyright exceptions -and limitations (including "fair use" or "fair dealing"). This License shall -terminate immediately and You may no longer exercise any of the rights granted -to You by this License upon your failure to honor the conditions in Section -1(c). +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes -a patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software -or hardware. +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of copyright or patent law in the appropriate jurisdiction. -This section shall survive the termination of this License. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. -12) Attorneys' Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -13) Miscellaneous. If any provision of this License is held to be unenforceable, -such provision shall be reformed only to the extent necessary to make it enforceable. +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -16) Modification of This License. This License is Copyright (c) 2005 Lawrence -Rosen. Permission is granted to copy, distribute, or communicate this License -without modification. Nothing in this License permits You to modify this License -as applied to the Original Work or to Derivative Works. However, You may modify -the text of this License and copy, distribute or communicate your modified -version (the "Modified License") and apply it to other original works of authorship -subject to the following conditions: (i) You may not indicate in any way that -your Modified License is the "Open Software License" or "OSL" and you may -not use those names in the name of your Modified License; (ii) You must replace -the notice specified in the first paragraph above with the notice "Licensed -under " or with a notice of your own that is -not confusingly similar to the notice in this License; and (iii) You may not -claim that your original works are open source software unless your Modified -License has been approved by Open Source Initiative (OSI) and You comply with -its license review and certification process. +16) Modification of This License. This License is Copyright (c) 2005 Lawrence Rosen. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/options/license/OpenJDK-assembly-exception-1.0 b/options/license/OpenJDK-assembly-exception-1.0 index 205b81174..3a35f11ed 100644 --- a/options/license/OpenJDK-assembly-exception-1.0 +++ b/options/license/OpenJDK-assembly-exception-1.0 @@ -1,7 +1,31 @@ -OpenJDK Assembly Exception The OpenJDK source code made available by Oracle America, Inc. (Oracle) at openjdk.java.net ("OpenJDK Code") is distributed under the terms of the GNU General Public License version 2 only ("GPL2"), with the following clarification and special exception. +The OpenJDK source code made available by Oracle America, Inc. +(Oracle) at openjdk.java.net ("OpenJDK Code") is distributed +under the terms of the GNU General Public License + version 2 only +("GPL2"), with the following clarification and special +exception. - +Linking this OpenJDK Code statically or dynamically with +other code is making a combined work based on this +library. Thus, the terms and conditions of GPL2 cover the +whole combination. - Linking this OpenJDK Code statically or dynamically with other code is making a combined work based on this library. Thus, the terms and conditions of GPL2 cover the whole combination. +As a special exception, Oracle gives you permission to +link this OpenJDK Code with certain code licensed by +Oracle as indicated at +http://openjdk.java.net/legal/exception-modules-2007-05-08.html +("Designated Exception Modules") to produce an +executable, regardless of the license terms of the +Designated Exception Modules, and to copy and distribute +the resulting executable under GPL2, provided that the +Designated Exception Modules continue to be governed by +the licenses under which they were offered by Oracle. - As a special exception, Oracle gives you permission to link this OpenJDK Code with certain code licensed by Oracle as indicated at http://openjdk.java.net/legal/exception-modules-2007-05-08.html ("Designated Exception Modules") to produce an executable, regardless of the license terms of the Designated Exception Modules, and to copy and distribute the resulting executable under GPL2, provided that the Designated Exception Modules continue to be governed by the licenses under which they were offered by Oracle. As such, it allows licensees and sublicensees of Oracle's GPL2 OpenJDK Code to build an executable that includes those portions of necessary code that Oracle could not provide under GPL2 (or that Oracle has provided under GPL2 with the Classpath exception). If you modify or add to the OpenJDK code, that new GPL2 code may still be combined with Designated Exception Modules if the new code is made subject to this exception by its copyright holder. +As such, it allows licensees and sublicensees of Oracle's GPL2 +OpenJDK Code to build an executable that includes those +portions of necessary code that Oracle could not provide under +GPL2 (or that Oracle has provided under GPL2 with the Classpath +exception). If you modify or add to the OpenJDK code, that new +GPL2 code may still be combined with Designated Exception +Modules if the new code is made subject to this exception by +its copyright holder. diff --git a/options/license/OpenSSL b/options/license/OpenSSL index 75dee7cc2..3b5d23268 100644 --- a/options/license/OpenSSL +++ b/options/license/OpenSSL @@ -1,98 +1,48 @@ -OpenSSL License Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. +OpenSSL License -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -3. All advertising materials mentioning features or use of this software must -display the following acknowledgment: "This product includes software developed -by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)" +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse -or promote products derived from this software without prior written permission. -For written permission, please contact openssl-core@openssl.org. +3. All advertising materials mentioning features or use of this software must display the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit. (http://www.openssl.org/)" -5. Products derived from this software may not be called "OpenSSL" nor may -"OpenSSL" appear in their names without prior written permission of the OpenSSL -Project. +4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact openssl-core@openssl.org. -6. Redistributions of any form whatsoever must retain the following acknowledgment: -"This product includes software developed by the OpenSSL Project for use in -the OpenSSL Toolkit (http://www.openssl.org/)" +5. Products derived from this software may not be called "OpenSSL" nor may "OpenSSL" appear in their names without prior written permission of the OpenSSL Project. -THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/)" -This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). -This product includes software written by Tim Hudson (tjh@cryptsoft.com). -Original SSLeay License Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) +THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -All rights reserved. +This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). This product includes software written by Tim Hudson (tjh@cryptsoft.com). -This package is an SSL implementation written by Eric Young (eay@cryptsoft.com). -The implementation was written so as to conform with Netscapes SSL. -This library is free for commercial and non-commercial use as long as the -following conditions are aheared to. The following conditions apply to all -code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; -not just the SSL code. The SSL documentation included with this distribution -is covered by the same copyright terms except that the holder is Tim Hudson -(tjh@cryptsoft.com). +Original SSLeay License -Copyright remains Eric Young's, and as such any Copyright notices in the code -are not to be removed. If this package is used in a product, Eric Young should -be given attribution as the author of the parts of the library used. This -can be in the form of a textual message at program startup or in documentation -(online or textual) provided with the package. +Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +This package is an SSL implementation written by Eric Young (eay@cryptsoft.com). The implementation was written so as to conform with Netscapes SSL. -1. Redistributions of source code must retain the copyright notice, this list -of conditions and the following disclaimer. +This library is free for commercial and non-commercial use as long as the following conditions are aheared to. The following conditions apply to all code found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; not just the SSL code. The SSL documentation included with this distribution is covered by the same copyright terms except that the holder is Tim Hudson (tjh@cryptsoft.com). -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +Copyright remains Eric Young's, and as such any Copyright notices in the code are not to be removed. If this package is used in a product, Eric Young should be given attribution as the author of the parts of the library used. This can be in the form of a textual message at program startup or in documentation (online or textual) provided with the package. -3. All advertising materials mentioning features or use of this software must -display the following acknowledgement: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +3. All advertising materials mentioning features or use of this software must display the following acknowledgement: "This product includes cryptographic software written by Eric Young (eay@cryptsoft.com)" +The word 'cryptographic' can be left out if the rouines from the library being used are not cryptographic related :-). -The word 'cryptographic' can be left out if the rouines from the library being -used are not cryptographic related :-). +4. If you include any Windows specific code (or a derivative thereof) from the apps directory (application code) you must include an acknowledgement: "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" -4. If you include any Windows specific code (or a derivative thereof) from -the apps directory (application code) you must include an acknowledgement: -"This product includes software written by Tim Hudson (tjh@cryptsoft.com)" +THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - -The licence and distribution terms for any publically available version or -derivative of this code cannot be changed. i.e. this code cannot simply be -copied and put under another distribution licence [including the GNU Public -Licence.] +The licence and distribution terms for any publically available version or derivative of this code cannot be changed. i.e. this code cannot simply be copied and put under another distribution licence [including the GNU Public Licence.] diff --git a/options/license/PDDL-1.0 b/options/license/PDDL-1.0 index 9b6fc3c74..6a830d7df 100644 --- a/options/license/PDDL-1.0 +++ b/options/license/PDDL-1.0 @@ -1,301 +1,136 @@ -Open Data Commons - Public Domain Dedication & License (PDDL) +Open Data Commons Public Domain Dedication & License (PDDL) Preamble +The Open Data Commons - Public Domain Dedication & Licence is a document intended to allow you to freely share, modify, and use this work for any purpose and without any restrictions. This licence is intended for use on databases or their contents ("data"), either together or individually. -The Open Data Commons - Public Domain Dedication & Licence is a document intended -to allow you to freely share, modify, and use this work for any purpose and -without any restrictions. This licence is intended for use on databases or -their contents ("data"), either together or individually. - -Many databases are covered by copyright. Some jurisdictions, mainly in Europe, -have specific special rights that cover databases called the "sui generis" -database right. Both of these sets of rights, as well as other legal rights -used to protect databases and data, can create uncertainty or practical difficulty -for those wishing to share databases and their underlying data but retain -a limited amount of rights under a "some rights reserved" approach to licensing -as outlined in the Science Commons Protocol for Implementing Open Access Data. -As a result, this waiver and licence tries to the fullest extent possible -to eliminate or fully license any rights that cover this database and data. -Any Community Norms or similar statements of use of the database or data do -not form a part of this document, and do not act as a contract for access -or other terms of use for the database or data. +Many databases are covered by copyright. Some jurisdictions, mainly in Europe, have specific special rights that cover databases called the "sui generis" database right. Both of these sets of rights, as well as other legal rights used to protect databases and data, can create uncertainty or practical difficulty for those wishing to share databases and their underlying data but retain a limited amount of rights under a "some rights reserved" approach to licensing as outlined in the Science Commons Protocol for Implementing Open Access Data. As a result, this waiver and licence tries to the fullest extent possible to eliminate or fully license any rights that cover this database and data. Any Community Norms or similar statements of use of the database or data do not form a part of this document, and do not act as a contract for access or other terms of use for the database or data. The position of the recipient of the work -Because this document places the database and its contents in or as close -as possible within the public domain, there are no restrictions or requirements -placed on the recipient by this document. Recipients may use this work commercially, -use technical protection measures, combine this data or database with other -databases or data, and share their changes and additions or keep them secret. -It is not a requirement that recipients provide further users with a copy -of this licence or attribute the original creator of the data or database -as a source. The goal is to eliminate restrictions held by the original creator -of the data and database on the use of it by others. +Because this document places the database and its contents in or as close as possible within the public domain, there are no restrictions or requirements placed on the recipient by this document. Recipients may use this work commercially, use technical protection measures, combine this data or database with other databases or data, and share their changes and additions or keep them secret. It is not a requirement that recipients provide further users with a copy of this licence or attribute the original creator of the data or database as a source. The goal is to eliminate restrictions held by the original creator of the data and database on the use of it by others. The position of the dedicator of the work -Copyright law, as with most other law under the banner of "intellectual property", -is inherently national law. This means that there exists several differences -in how copyright and other IP rights can be relinquished, waived or licensed -in the many legal jurisdictions of the world. This is despite much harmonisation -of minimum levels of protection. The internet and other communication technologies -span these many disparate legal jurisdictions and thus pose special difficulties -for a document relinquishing and waiving intellectual property rights, including -copyright and database rights, for use by the global community. Because of -this feature of intellectual property law, this document first relinquishes -the rights and waives the relevant rights and claims. It then goes on to license -these same rights for jurisdictions or areas of law that may make it difficult -to relinquish or waive rights or claims. +Copyright law, as with most other law under the banner of "intellectual property", is inherently national law. This means that there exists several differences in how copyright and other IP rights can be relinquished, waived or licensed in the many legal jurisdictions of the world. This is despite much harmonisation of minimum levels of protection. The internet and other communication technologies span these many disparate legal jurisdictions and thus pose special difficulties for a document relinquishing and waiving intellectual property rights, including copyright and database rights, for use by the global community. Because of this feature of intellectual property law, this document first relinquishes the rights and waives the relevant rights and claims. It then goes on to license these same rights for jurisdictions or areas of law that may make it difficult to relinquish or waive rights or claims. -The purpose of this document is to enable rightsholders to place their work -into the public domain. Unlike licences for free and open source software, -free cultural works, or open content licences, rightsholders will not be able -to "dual license" their work by releasing the same work under different licences. -This is because they have allowed anyone to use the work in whatever way they -choose. Rightsholders therefore can't re-license it under copyright or database -rights on different terms because they have nothing left to license. Doing -so creates truly accessible data to build rich applications and advance the -progress of science and the arts. +The purpose of this document is to enable rightsholders to place their work into the public domain. Unlike licences for free and open source software, free cultural works, or open content licences, rightsholders will not be able to "dual license" their work by releasing the same work under different licences. This is because they have allowed anyone to use the work in whatever way they choose. Rightsholders therefore can’t re-license it under copyright or database rights on different terms because they have nothing left to license. Doing so creates truly accessible data to build rich applications and advance the progress of science and the arts. -This document can cover either or both of the database and its contents (the -data). Because databases can have a wide variety of content - not just factual -data - rightsholders should use the Open Data Commons - Public Domain Dedication -& Licence for an entire database and its contents only if everything can be -placed under the terms of this document. Because even factual data can sometimes -have intellectual property rights, rightsholders should use this licence to -cover both the database and its factual data when making material available -under this document; even if it is likely that the data would not be covered -by copyright or database rights. +This document can cover either or both of the database and its contents (the data). Because databases can have a wide variety of content - not just factual data - rightsholders should use the Open Data Commons - Public Domain Dedication & Licence for an entire database and its contents only if everything can be placed under the terms of this document. Because even factual data can sometimes have intellectual property rights, rightsholders should use this licence to cover both the database and its factual data when making material available under this document; even if it is likely that the data would not be covered by copyright or database rights. -Rightsholders can also use this document to cover any copyright or database -rights claims over only a database, and leave the contents to be covered by -other licences or documents. They can do this because this document refers -to the "Work", which can be either - or both - the database and its contents. -As a result, rightsholders need to clearly state what they are dedicating -under this document when they dedicate it. +Rightsholders can also use this document to cover any copyright or database rights claims over only a database, and leave the contents to be covered by other licences or documents. They can do this because this document refers to the "Work", which can be either - or both - the database and its contents. As a result, rightsholders need to clearly state what they are dedicating under this document when they dedicate it. -Just like any licence or other document dealing with intellectual property, -rightsholders should be aware that one can only license what one owns. Please -ensure that the rights have been cleared to make this material available under -this document. +Just like any licence or other document dealing with intellectual property, rightsholders should be aware that one can only license what one owns. Please ensure that the rights have been cleared to make this material available under this document. -This document permanently and irrevocably makes the Work available to the -public for any use of any kind, and it should not be used unless the rightsholder -is prepared for this to happen. +This document permanently and irrevocably makes the Work available to the public for any use of any kind, and it should not be used unless the rightsholder is prepared for this to happen. Part I: Introduction -The Rightsholder (the Person holding rights or claims over the Work) agrees -as follows: +The Rightsholder (the Person holding rights or claims over the Work) agrees as follows: - 1.0 Definitions of Capitalised Words +1.0 Definitions of Capitalised Words -"Copyright" - Includes rights under copyright and under neighbouring rights -and similarly related sets of rights under the law of the relevant jurisdiction -under Section 6.4. +"Copyright" - Includes rights under copyright and under neighbouring rights and similarly related sets of rights under the law of the relevant jurisdiction under Section 6.4. -"Data" - The contents of the Database, which includes the information, independent -works, or other material collected into the Database offered under the terms -of this Document. +"Data" - The contents of the Database, which includes the information, independent works, or other material collected into the Database offered under the terms of this Document. -"Database" - A collection of Data arranged in a systematic or methodical way -and individually accessible by electronic or other means offered under the -terms of this Document. +"Database" - A collection of Data arranged in a systematic or methodical way and individually accessible by electronic or other means offered under the terms of this Document. -"Database Right" - Means rights over Data resulting from the Chapter III ("sui -generis") rights in the Database Directive (Directive 96/9/EC of the European -Parliament and of the Council of 11 March 1996 on the legal protection of -databases) and any future updates as well as any similar rights available -in the relevant jurisdiction under Section 6.4. +"Database Right" - Means rights over Data resulting from the Chapter III ("sui generis") rights in the Database Directive (Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases) and any future updates as well as any similar rights available in the relevant jurisdiction under Section 6.4. -"Document" - means this relinquishment and waiver of rights and claims and -back up licence agreement. +"Document" - means this relinquishment and waiver of rights and claims and back up licence agreement. -"Person" - Means a natural or legal person or a body of persons corporate -or incorporate. +"Person" - Means a natural or legal person or a body of persons corporate or incorporate. -"Use" - As a verb, means doing any act that is restricted by Copyright or -Database Rights whether in the original medium or any other; and includes -modifying the Work as may be technically necessary to use it in a different -mode or format. This includes the right to sublicense the Work. +"Use" - As a verb, means doing any act that is restricted by Copyright or Database Rights whether in the original medium or any other; and includes modifying the Work as may be technically necessary to use it in a different mode or format. This includes the right to sublicense the Work. -"Work" - Means either or both of the Database and Data offered under the terms -of this Document. +"Work" - Means either or both of the Database and Data offered under the terms of this Document. "You" - the Person acquiring rights under the licence elements of this Document. - Words in the singular include the plural and vice versa. +Words in the singular include the plural and vice versa. - 2.0 What this document covers +2.0 What this document covers - 2.1. Legal effect of this Document. This Document is: +2.1. Legal effect of this Document. This Document is: -a. A dedication to the public domain and waiver of Copyright and Database -Rights over the Work; and + a. A dedication to the public domain and waiver of Copyright and Database Rights over the Work; and -b. A licence of Copyright and Database Rights over the Work in jurisdictions -that do not allow for relinquishment or waiver. + b. A licence of Copyright and Database Rights over the Work in jurisdictions that do not allow for relinquishment or waiver. - 2.2. Legal rights covered. +2.2. Legal rights covered. -a. Copyright. Any copyright or neighbouring rights in the Work. Copyright -law varies between jurisdictions, but is likely to cover: the Database model -or schema, which is the structure, arrangement, and organisation of the Database, -and can also include the Database tables and table indexes; the data entry -and output sheets; and the Field names of Data stored in the Database. Copyright -may also cover the Data depending on the jurisdiction and type of Data; and + a. Copyright. Any copyright or neighbouring rights in the Work. Copyright law varies between jurisdictions, but is likely to cover: the Database model or schema, which is the structure, arrangement, and organisation of the Database, and can also include the Database tables and table indexes; the data entry and output sheets; and the Field names of Data stored in the Database. Copyright may also cover the Data depending on the jurisdiction and type of Data; and -b. Database Rights. Database Rights only extend to the extraction and re-utilisation -of the whole or a substantial part of the Data. Database Rights can apply -even when there is no copyright over the Database. Database Rights can also -apply when the Data is removed from the Database and is selected and arranged -in a way that would not infringe any applicable copyright. + b. Database Rights. Database Rights only extend to the extraction and re-utilisation of the whole or a substantial part of the Data. Database Rights can apply even when there is no copyright over the Database. Database Rights can also apply when the Data is removed from the Database and is selected and arranged in a way that would not infringe any applicable copyright. - 2.2 Rights not covered. +2.2 Rights not covered. -a. This Document does not apply to computer programs used in the making or -operation of the Database; + a. This Document does not apply to computer programs used in the making or operation of the Database; -b. This Document does not cover any patents over the Data or the Database. -Please see Section 4.2 later in this Document for further details; and + b. This Document does not cover any patents over the Data or the Database. Please see Section 4.2 later in this Document for further details; and -c. This Document does not cover any trade marks associated with the Database. -Please see Section 4.3 later in this Document for further details. + c. This Document does not cover any trade marks associated with the Database. Please see Section 4.3 later in this Document for further details. -Users of this Database are cautioned that they may have to clear other rights -or consult other licences. +Users of this Database are cautioned that they may have to clear other rights or consult other licences. -2.3 Facts are free. The Rightsholder takes the position that factual information -is not covered by Copyright. This Document however covers the Work in jurisdictions -that may protect the factual information in the Work by Copyright, and to -cover any information protected by Copyright that is contained in the Work. +2.3 Facts are free. The Rightsholder takes the position that factual information is not covered by Copyright. This Document however covers the Work in jurisdictions that may protect the factual information in the Work by Copyright, and to cover any information protected by Copyright that is contained in the Work. Part II: Dedication to the public domain - 3.0 Dedication, waiver, and licence of Copyright and Database Rights +3.0 Dedication, waiver, and licence of Copyright and Database Rights -3.1 Dedication of Copyright and Database Rights to the public domain. The -Rightsholder by using this Document, dedicates the Work to the public domain -for the benefit of the public and relinquishes all rights in Copyright and -Database Rights over the Work. +3.1 Dedication of Copyright and Database Rights to the public domain. The Rightsholder by using this Document, dedicates the Work to the public domain for the benefit of the public and relinquishes all rights in Copyright and Database Rights over the Work. -a. The Rightsholder realises that once these rights are relinquished, that -the Rightsholder has no further rights in Copyright and Database Rights over -the Work, and that the Work is free and open for others to Use. + a. The Rightsholder realises that once these rights are relinquished, that the Rightsholder has no further rights in Copyright and Database Rights over the Work, and that the Work is free and open for others to Use. -b. The Rightsholder intends for their relinquishment to cover all present -and future rights in the Work under Copyright and Database Rights, whether -they are vested or contingent rights, and that this relinquishment of rights -covers all their heirs and successors. + b. The Rightsholder intends for their relinquishment to cover all present and future rights in the Work under Copyright and Database Rights, whether they are vested or contingent rights, and that this relinquishment of rights covers all their heirs and successors. -The above relinquishment of rights applies worldwide and includes media and -formats now known or created in the future. +The above relinquishment of rights applies worldwide and includes media and formats now known or created in the future. -3.2 Waiver of rights and claims in Copyright and Database Rights when Section -3.1 dedication inapplicable. If the dedication in Section 3.1 does not apply -in the relevant jurisdiction under Section 6.4, the Rightsholder waives any -rights and claims that the Rightsholder may have or acquire in the future -over the Work in: +3.2 Waiver of rights and claims in Copyright and Database Rights when Section 3.1 dedication inapplicable. If the dedication in Section 3.1 does not apply in the relevant jurisdiction under Section 6.4, the Rightsholder waives any rights and claims that the Rightsholder may have or acquire in the future over the Work in: - a. Copyright; and + a. Copyright; and - b. Database Rights. + b. Database Rights. -To the extent possible in the relevant jurisdiction, the above waiver of rights -and claims applies worldwide and includes media and formats now known or created -in the future. The Rightsholder agrees not to assert the above rights and -waives the right to enforce them over the Work. +To the extent possible in the relevant jurisdiction, the above waiver of rights and claims applies worldwide and includes media and formats now known or created in the future. The Rightsholder agrees not to assert the above rights and waives the right to enforce them over the Work. -3.3 Licence of Copyright and Database Rights when Sections 3.1 and 3.2 inapplicable. -If the dedication and waiver in Sections 3.1 and 3.2 does not apply in the -relevant jurisdiction under Section 6.4, the Rightsholder and You agree as -follows: +3.3 Licence of Copyright and Database Rights when Sections 3.1 and 3.2 inapplicable. If the dedication and waiver in Sections 3.1 and 3.2 does not apply in the relevant jurisdiction under Section 6.4, the Rightsholder and You agree as follows: -a. The Licensor grants to You a worldwide, royalty-free, non-exclusive, licence -to Use the Work for the duration of any applicable Copyright and Database -Rights. These rights explicitly include commercial use, and do not exclude -any field of endeavour. To the extent possible in the relevant jurisdiction, -these rights may be exercised in all media and formats whether now known or -created in the future. + a. The Licensor grants to You a worldwide, royalty-free, non-exclusive, licence to Use the Work for the duration of any applicable Copyright and Database Rights. These rights explicitly include commercial use, and do not exclude any field of endeavour. To the extent possible in the relevant jurisdiction, these rights may be exercised in all media and formats whether now known or created in the future. -3.4 Moral rights. This section covers moral rights, including the right to -be identified as the author of the Work or to object to treatment that would -otherwise prejudice the author's honour and reputation, or any other derogatory -treatment: +3.4 Moral rights. This section covers moral rights, including the right to be identified as the author of the Work or to object to treatment that would otherwise prejudice the author’s honour and reputation, or any other derogatory treatment: -a. For jurisdictions allowing waiver of moral rights, Licensor waives all -moral rights that Licensor may have in the Work to the fullest extent possible -by the law of the relevant jurisdiction under Section 6.4; + a. For jurisdictions allowing waiver of moral rights, Licensor waives all moral rights that Licensor may have in the Work to the fullest extent possible by the law of the relevant jurisdiction under Section 6.4; -b. If waiver of moral rights under Section 3.4 a in the relevant jurisdiction -is not possible, Licensor agrees not to assert any moral rights over the Work -and waives all claims in moral rights to the fullest extent possible by the -law of the relevant jurisdiction under Section 6.4; and + b. If waiver of moral rights under Section 3.4 a in the relevant jurisdiction is not possible, Licensor agrees not to assert any moral rights over the Work and waives all claims in moral rights to the fullest extent possible by the law of the relevant jurisdiction under Section 6.4; and -c. For jurisdictions not allowing waiver or an agreement not to assert moral -rights under Section 3.4 a and b, the author may retain their moral rights -over the copyrighted aspects of the Work. + c. For jurisdictions not allowing waiver or an agreement not to assert moral rights under Section 3.4 a and b, the author may retain their moral rights over the copyrighted aspects of the Work. -Please note that some jurisdictions do not allow for the waiver of moral rights, -and so moral rights may still subsist over the work in some jurisdictions. +Please note that some jurisdictions do not allow for the waiver of moral rights, and so moral rights may still subsist over the work in some jurisdictions. - 4.0 Relationship to other rights +4.0 Relationship to other rights -4.1 No other contractual conditions. The Rightsholder makes this Work available -to You without any other contractual obligations, either express or implied. -Any Community Norms statement associated with the Work is not a contract and -does not form part of this Document. +4.1 No other contractual conditions. The Rightsholder makes this Work available to You without any other contractual obligations, either express or implied. Any Community Norms statement associated with the Work is not a contract and does not form part of this Document. -4.2 Relationship to patents. This Document does not grant You a licence for -any patents that the Rightsholder may own. Users of this Database are cautioned -that they may have to clear other rights or consult other licences. +4.2 Relationship to patents. This Document does not grant You a licence for any patents that the Rightsholder may own. Users of this Database are cautioned that they may have to clear other rights or consult other licences. -4.3 Relationship to trade marks. This Document does not grant You a licence -for any trade marks that the Rightsholder may own or that the Rightsholder -may use to cover the Work. Users of this Database are cautioned that they -may have to clear other rights or consult other licences. +4.3 Relationship to trade marks. This Document does not grant You a licence for any trade marks that the Rightsholder may own or that the Rightsholder may use to cover the Work. Users of this Database are cautioned that they may have to clear other rights or consult other licences. Part III: General provisions -Part III: General provisions +5.0 Warranties, disclaimer, and limitation of liability - 5.0 Warranties, disclaimer, and limitation of liability +5.1 The Work is provided by the Rightsholder "as is" and without any warranty of any kind, either express or implied, whether of title, of accuracy or completeness, of the presence of absence of errors, of fitness for purpose, or otherwise. Some jurisdictions do not allow the exclusion of implied warranties, so this exclusion may not apply to You. -5.1 The Work is provided by the Rightsholder "as is" and without any warranty -of any kind, either express or implied, whether of title, of accuracy or completeness, -of the presence of absence of errors, of fitness for purpose, or otherwise. -Some jurisdictions do not allow the exclusion of implied warranties, so this -exclusion may not apply to You. +5.2 Subject to any liability that may not be excluded or limited by law, the Rightsholder is not liable for, and expressly excludes, all liability for loss or damage however and whenever caused to anyone by any use under this Document, whether by You or by anyone else, and whether caused by any fault on the part of the Rightsholder or not. This exclusion of liability includes, but is not limited to, any special, incidental, consequential, punitive, or exemplary damages. This exclusion applies even if the Rightsholder has been advised of the possibility of such damages. -5.2 Subject to any liability that may not be excluded or limited by law, the -Rightsholder is not liable for, and expressly excludes, all liability for -loss or damage however and whenever caused to anyone by any use under this -Document, whether by You or by anyone else, and whether caused by any fault -on the part of the Rightsholder or not. This exclusion of liability includes, -but is not limited to, any special, incidental, consequential, punitive, or -exemplary damages. This exclusion applies even if the Rightsholder has been -advised of the possibility of such damages. +5.3 If liability may not be excluded by law, it is limited to actual and direct financial loss to the extent it is caused by proved negligence on the part of the Rightsholder. -5.3 If liability may not be excluded by law, it is limited to actual and direct -financial loss to the extent it is caused by proved negligence on the part -of the Rightsholder. +6.0 General - 6.0 General +6.1 If any provision of this Document is held to be invalid or unenforceable, that must not affect the cvalidity or enforceability of the remainder of the terms of this Document. -6.1 If any provision of this Document is held to be invalid or unenforceable, -that must not affect the cvalidity or enforceability of the remainder of the -terms of this Document. +6.2 This Document is the entire agreement between the parties with respect to the Work covered here. It replaces any earlier understandings, agreements or representations with respect to the Work not specified here. -6.2 This Document is the entire agreement between the parties with respect -to the Work covered here. It replaces any earlier understandings, agreements -or representations with respect to the Work not specified here. +6.3 This Document does not affect any rights that You or anyone else may independently have under any applicable law to make any use of this Work, including (for jurisdictions where this Document is a licence) fair dealing, fair use, database exceptions, or any other legally recognised limitation or exception to infringement of copyright or other applicable laws. -6.3 This Document does not affect any rights that You or anyone else may independently -have under any applicable law to make any use of this Work, including (for -jurisdictions where this Document is a licence) fair dealing, fair use, database -exceptions, or any other legally recognised limitation or exception to infringement -of copyright or other applicable laws. - -6.4 This Document takes effect in the relevant jurisdiction in which the Document -terms are sought to be enforced. If the rights waived or granted under applicable -law in the relevant jurisdiction includes additional rights not waived or -granted under this Document, these additional rights are included in this -Document in order to meet the intent of this Document. +6.4 This Document takes effect in the relevant jurisdiction in which the Document terms are sought to be enforced. If the rights waived or granted under applicable law in the relevant jurisdiction includes additional rights not waived or granted under this Document, these additional rights are included in this Document in order to meet the intent of this Document. diff --git a/options/license/PHP-3.0 b/options/license/PHP-3.0 index a5d9221ea..d6e8ae61a 100644 --- a/options/license/PHP-3.0 +++ b/options/license/PHP-3.0 @@ -1,50 +1,25 @@ -The PHP License, version 3.0 Copyright (c) 1999 - 2006 The PHP Group. All -rights reserved. +The PHP License, version 3.0 -Redistribution and use in source and binary forms, with or without modification, -is permitted provided that the following conditions are met: +Copyright (c) 1999 - 2006 The PHP Group. All rights reserved. -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +Redistribution and use in source and binary forms, with or without modification, is permitted provided that the following conditions are met: -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -3. The name "PHP" must not be used to endorse or promote products derived -from this software without prior written permission. For written permission, -please contact group@php.net. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -4. Products derived from this software may not be called "PHP", nor may "PHP" -appear in their name, without prior written permission from group@php.net. -You may indicate that your software works in conjunction with PHP by saying -"Foo for PHP" instead of calling it "PHP Foo" or "phpfoo" +3. The name "PHP" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact group@php.net. -5. The PHP Group may publish revised and/or new versions of the license from -time to time. Each version will be given a distinguishing version number. -Once covered code has been published under a particular version of the license, -you may always continue to use it under the terms of that version. You may -also choose to use such covered code under the terms of any subsequent version -of the license published by the PHP Group. No one other than the PHP Group -has the right to modify the terms applicable to covered code created under -this License. +4. Products derived from this software may not be called "PHP", nor may "PHP" appear in their name, without prior written permission from group@php.net. You may indicate that your software works in conjunction with PHP by saying "Foo for PHP" instead of calling it "PHP Foo" or "phpfoo" -6. Redistributions of any form whatsoever must retain the following acknowledgment: -"This product includes PHP, freely available from ". +5. The PHP Group may publish revised and/or new versions of the license from time to time. Each version will be given a distinguishing version number. Once covered code has been published under a particular version of the license, you may always continue to use it under the terms of that version. You may also choose to use such covered code under the terms of any subsequent version of the license published by the PHP Group. No one other than the PHP Group has the right to modify the terms applicable to covered code created under this License. -THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE PHP DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes PHP, freely available from ". -This software consists of voluntary contributions made by many individuals -on behalf of the PHP Group. +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +This software consists of voluntary contributions made by many individuals on behalf of the PHP Group. The PHP Group can be contacted via Email at group@php.net. diff --git a/options/license/PHP-3.01 b/options/license/PHP-3.01 index a7147cf45..6ffc95218 100644 --- a/options/license/PHP-3.01 +++ b/options/license/PHP-3.01 @@ -1,50 +1,24 @@ -The PHP License, version 3.01 Copyright (c) 1999 - 2012 The PHP Group. All -rights reserved. +The PHP License, version 3.01 -Redistribution and use in source and binary forms, with or without modification, -is permitted provided that the following conditions are met: +Copyright (c) 1999 - 2012 The PHP Group. All rights reserved. -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +Redistribution and use in source and binary forms, with or without modification, is permitted provided that the following conditions are met: -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -3. The name "PHP" must not be used to endorse or promote products derived -from this software without prior written permission. For written permission, -please contact group@php.net. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -4. Products derived from this software may not be called "PHP", nor may "PHP" -appear in their name, without prior written permission from group@php.net. -You may indicate that your software works in conjunction with PHP by saying -"Foo for PHP" instead of calling it "PHP Foo" or "phpfoo" +3. The name "PHP" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact group@php.net. -5. The PHP Group may publish revised and/or new versions of the license from -time to time. Each version will be given a distinguishing version number. -Once covered code has been published under a particular version of the license, -you may always continue to use it under the terms of that version. You may -also choose to use such covered code under the terms of any subsequent version -of the license published by the PHP Group. No one other than the PHP Group -has the right to modify the terms applicable to covered code created under -this License. +4. Products derived from this software may not be called "PHP", nor may "PHP" appear in their name, without prior written permission from group@php.net. You may indicate that your software works in conjunction with PHP by saying "Foo for PHP" instead of calling it "PHP Foo" or "phpfoo" -6. Redistributions of any form whatsoever must retain the following acknowledgment: -"This product includes PHP software, freely available from ". +5. The PHP Group may publish revised and/or new versions of the license from time to time. Each version will be given a distinguishing version number. Once covered code has been published under a particular version of the license, you may always continue to use it under the terms of that version. You may also choose to use such covered code under the terms of any subsequent version of the license published by the PHP Group. No one other than the PHP Group has the right to modify the terms applicable to covered code created under this License. -THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE PHP DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +6. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes PHP software, freely available from ". -This software consists of voluntary contributions made by many individuals -on behalf of the PHP Group. +THIS SOFTWARE IS PROVIDED BY THE PHP DEVELOPMENT TEAM ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PHP DEVELOPMENT TEAM OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This software consists of voluntary contributions made by many individuals on behalf of the PHP Group. The PHP Group can be contacted via Email at group@php.net. diff --git a/options/license/PS-or-PDF-font-exception-20170817 b/options/license/PS-or-PDF-font-exception-20170817 index 89446f916..cf22439ff 100644 --- a/options/license/PS-or-PDF-font-exception-20170817 +++ b/options/license/PS-or-PDF-font-exception-20170817 @@ -1,3 +1,8 @@ -The font and related files in this directory are distributed under the GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (see the file COPYING), with the following exemption: +The font and related files in this directory are distributed under the +GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (see the file COPYING), with +the following exemption: -As a special exception, permission is granted to include these font programs in a Postscript or PDF file that consists of a document that contains text to be displayed or printed using this font, regardless of the conditions or license applying to the document itself. +As a special exception, permission is granted to include these font +programs in a Postscript or PDF file that consists of a document that +contains text to be displayed or printed using this font, regardless +of the conditions or license applying to the document itself. diff --git a/options/license/PSF-2.0 b/options/license/PSF-2.0 index ff67bea89..8a38e525c 100644 --- a/options/license/PSF-2.0 +++ b/options/license/PSF-2.0 @@ -1,42 +1,47 @@ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), -and the Individual or Organization ("Licensee") accessing and otherwise using -this software ("Python") in source or binary form and its associated documentation. +1. This LICENSE AGREEMENT is between the Python Software Foundation +("PSF"), and the Individual or Organization ("Licensee") accessing and +otherwise using this software ("Python") in source or binary form and +its associated documentation. 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python alone or in any derivative version, provided, -however, that PSF's License Agreement and PSF's notice of copyright, i.e., -"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; +distribute, and otherwise use Python alone or in any derivative version, +provided, however, that PSF's License Agreement and PSF's notice of copyright, +i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. -3. In the event Licensee prepares a derivative work that is based on or incorporates -Python or any part thereof, and wants to make the derivative work available -to others as provided herein, then Licensee hereby agrees to include in any -such work a brief summary of the changes made to Python. +3. In the event Licensee prepares a derivative work that is based on +or incorporates Python or any part thereof, and wants to make +the derivative work available to others as provided herein, then +Licensee hereby agrees to include in any such work a brief summary of +the changes made to Python. -4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES -NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT -NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY -OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF -PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. +4. PSF is making Python available to Licensee on an "AS IS" +basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR +IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND +DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS +FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT +INFRINGE ANY THIRD PARTY RIGHTS. -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY -INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, -DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF -ADVISED OF THE POSSIBILITY THEREOF. +5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON +FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS +A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, +OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -6. This License Agreement will automatically terminate upon a material breach -of its terms and conditions. +6. This License Agreement will automatically terminate upon a material +breach of its terms and conditions. -7. Nothing in this License Agreement shall be deemed to create any relationship -of agency, partnership, or joint venture between PSF and Licensee. This License -Agreement does not grant permission to use PSF trademarks or trade name in -a trademark sense to endorse or promote products or services of Licensee, -or any third party. +7. Nothing in this License Agreement shall be deemed to create any +relationship of agency, partnership, or joint venture between PSF and +Licensee. This License Agreement does not grant permission to use PSF +trademarks or trade name in a trademark sense to endorse or promote +products or services of Licensee, or any third party. -8. By copying, installing or otherwise using Python, Licensee agrees to be -bound by the terms and conditions of this License Agreement. +8. By copying, installing or otherwise using Python, Licensee +agrees to be bound by the terms and conditions of this License +Agreement. diff --git a/options/license/Parity-6.0.0 b/options/license/Parity-6.0.0 index 59bac8b74..a3bb2a623 100644 --- a/options/license/Parity-6.0.0 +++ b/options/license/Parity-6.0.0 @@ -1,40 +1,44 @@ The Parity Public License 6.0.0 -Contributor: contributor name +Contributor: Example, Inc. -Source Code: source +Source Code: https://example.com/sourcecode -This license lets you use and share this software for free, as long as you -contribute software you make with it. Specifically: +This license lets you use and share this software for free, as +long as you contribute software you make with it. Specifically: -If you follow the rules below, you may do everything with this software that -would otherwise infringe either the contributor's copyright in it, any patent -claim the contributor can license, or both. +If you follow the rules below, you may do everything with this +software that would otherwise infringe either the contributor's +copyright in it, any patent claim the contributor can license, +or both. - 1. Contribute changes and additions you make to this software. +1. Contribute changes and additions you make to this software. -2. If you combine this software with other software, contribute that other -software. +2. If you combine this software with other software, contribute + that other software. -3. Contribute software you develop, deploy, monitor, or run with this software. +3. Contribute software you develop, deploy, monitor, or run with + this software. -4. Ensure everyone who gets a copy of this software from you, in source code -or any other form, gets the text of this license and the contributor and source -code lines above. +4. Ensure everyone who gets a copy of this software from you, in + source code or any other form, gets the text of this license + and the contributor and source code lines above. -5. Do not make any legal claim against anyone accusing this software, with -or without changes, alone or with other software, of infringing any patent -claim. +5. Do not make any legal claim against anyone accusing this + software, with or without changes, alone or with other + software, of infringing any patent claim. -To contribute software, publish all its source code, in the preferred form -for making changes, through a freely accessible distribution system widely -used for similar source code, and license contributions not already licensed -to the public on terms as permissive as this license accordingly. +To contribute software, publish all its source code, in the +preferred form for making changes, through a freely accessible +distribution system widely used for similar source code, and +license contributions not already licensed to the public on terms +as permissive as this license accordingly. -You are excused for unknowingly breaking 1, 2, or 3 if you contribute as required, -or stop doing anything requiring this license, within 30 days of learning -you broke the rule. +You are excused for unknowingly breaking 1, 2, or 3 if you +contribute as required, or stop doing anything requiring this +license, within 30 days of learning you broke the rule. -**As far as the law allows, this software comes as is, without any warranty, -and the contributor will not be liable to anyone for any damages related to -this software or this license, for any kind of legal claim.** +**As far as the law allows, this software comes as is, without +any warranty, and the contributor will not be liable to anyone +for any damages related to this software or this license, for any +kind of legal claim.** diff --git a/options/license/Parity-7.0.0 b/options/license/Parity-7.0.0 index 96529f933..e5e022061 100644 --- a/options/license/Parity-7.0.0 +++ b/options/license/Parity-7.0.0 @@ -1,93 +1,66 @@ # The Parity Public License 7.0.0 -Contributor: name +Contributor: Artless Devices, LLC [US-CA] -Source Code: address +Source Code: https://github.com/licensezero/licensezero.com ## Purpose -This license allows you to use and share this software for free, but you have -to share software that builds on it alike. +This license allows you to use and share this software for free, but you have to share software that builds on it alike. ## Agreement -In order to receive this license, you have to agree to its rules. Those rules -are both obligations under that agreement and conditions to your license. -Don't do anything with this software that triggers a rule you can't or won't -follow. +In order to receive this license, you have to agree to its rules. Those rules are both obligations under that agreement and conditions to your license. Don't do anything with this software that triggers a rule you can't or won't follow. ## Notices -Make sure everyone who gets a copy of any part of this software from you, -with or without changes, also gets the text of this license and the contributor -and source code lines above. +Make sure everyone who gets a copy of any part of this software from you, with or without changes, also gets the text of this license and the contributor and source code lines above. ## Copyleft -[Contribute](#contribute) software you develop, operate, or analyze with this -software, including changes or additions to this software. When in doubt, -[contribute](#contribute) . +[Contribute](#contribute) software you develop, operate, or analyze with this software, including changes or additions to this software. When in doubt, [contribute](#contribute). ## Prototypes -You don't have to [contribute](#contribute) any change, addition, or other -software that meets all these criteria: +You don't have to [contribute](#contribute) any change, addition, or other software that meets all these criteria: - 1. You don't use it for more than thirty days. +1. You don't use it for more than thirty days. -2. You don't share it outside the team developing it, other than for non-production -user testing. +2. You don't share it outside the team developing it, other than for non-production user testing. -3. You don't develop, operate, or analyze other software with it for anyone -outside the team developing it. +3. You don't develop, operate, or analyze other software with it for anyone outside the team developing it. ## Reverse Engineering -You may use this software to operate and analyze software you can't [contribute](#contribute) -in order to develop alternatives you can and do [contribute](#contribute) -. +You may use this software to operate and analyze software you can't [contribute](#contribute) in order to develop alternatives you can and do [contribute](#contribute). ## Contribute To [contribute](#contribute) software: -1. Publish all source code for the software in the preferred form for making -changes through a freely accessible distribution system widely used for similar -source code so the contributor and others can find and copy it. +1. Publish all source code for the software in the preferred form for making changes through a freely accessible distribution system widely used for similar source code so the contributor and others can find and copy it. -2. Make sure every part of the source code is available under this license -or another license that allows everything this license does, such as [the -Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the -Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the -MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html). +2. Make sure every part of the source code is available under this license or another license that allows everything this license does, such as [the Blue Oak Model License 1.0.0](https://blueoakcouncil.org/license/1.0.0), [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html), [the MIT license](https://spdx.org/licenses/MIT.html), or [the two-clause BSD license](https://spdx.org/licenses/BSD-2-Clause.html). - 3. Take these steps within thirty days. +3. Take these steps within thirty days. -4. Note that this license does _not_ allow you to change the license terms -for this software. You must follow [Notices](#notices) . +4. Note that this license does _not_ allow you to change the license terms for this software. You must follow [Notices](#notices). ## Excuse -You're excused for unknowingly breaking [Copyleft](#copyleft) if you [contribute](#contribute) -as required, or stop doing anything requiring this license, within thirty -days of learning you broke the rule. You're excused for unknowingly breaking -[Notices](#notices) if you take all practical steps to comply within thirty -days of learning you broke the rule. +You're excused for unknowingly breaking [Copyleft](#copyleft) if you [contribute](#contribute) as required, or stop doing anything requiring this license, within thirty days of learning you broke the rule. You're excused for unknowingly breaking [Notices](#notices) if you take all practical steps to comply within thirty days of learning you broke the rule. ## Defense -Don't make any legal claim against anyone accusing this software, with or -without changes, alone or with other technology, of infringing any patent. +Don't make any legal claim against anyone accusing this software, with or without changes, alone or with other technology, of infringing any patent. ## Copyright -The contributor licenses you to do everything with this software that would -otherwise infringe their copyright in it. +The contributor licenses you to do everything with this software that would otherwise infringe their copyright in it. ## Patent -The contributor licenses you to do everything with this software that would -otherwise infringe any patents they can license or become able to license. +The contributor licenses you to do everything with this software that would otherwise infringe any patents they can license or become able to license. ## Reliability @@ -95,6 +68,4 @@ The contributor can't revoke this license. ## No Liability -***As far as the law allows, this software comes as is, without any warranty -or condition, and the contributor won't be liable to anyone for any damages -related to this software or this license, under any kind of legal claim.*** +***As far as the law allows, this software comes as is, without any warranty or condition, and the contributor won't be liable to anyone for any damages related to this software or this license, under any kind of legal claim.*** diff --git a/options/license/Plexus b/options/license/Plexus index 51c41233e..c92bc7245 100644 --- a/options/license/Plexus +++ b/options/license/Plexus @@ -1,34 +1,15 @@ Copyright 2002 (C) The Codehaus. All Rights Reserved. -Redistribution and use of this software and associated documentation ("Software"), -with or without modification, are permitted provided that the following conditions -are met: +Redistribution and use of this software and associated documentation ("Software"), with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain copyright statements and notices. -Redistributions must also contain a copy of this document. +1. Redistributions of source code must retain copyright statements and notices. Redistributions must also contain a copy of this document. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -3. The name "classworlds" must not be used to endorse or promote products -derived from this Software without prior written permission of The Codehaus -. For written permission, please contact bob@codehaus.org . +3. The name "classworlds” must not be used to endorse or promote products derived from this Software without prior written permission of The Codehaus. For written permission, please contact bob@codehaus.org. -4. Products derived from this Software may not be called "classworlds" nor -may "classworlds" appear in their names without prior written permission of -The Codehaus . "classworlds" is a registered trademark of The Codehaus . +4. Products derived from this Software may not be called "classworlds” nor may "classworlds” appear in their names without prior written permission of The Codehaus. "classworlds” is a registered trademark of The Codehaus. -5. Due credit should be given to The Codehaus. (http://classworlds.codehaus.org/) -. +5. Due credit should be given to The Codehaus. (http://classworlds.codehaus.org/). -THIS SOFTWARE IS PROVIDED BY THE CODEHAUS AND CONTRIBUTORS ``AS IS'' AND ANY -EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE CODEHAUS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE CODEHAUS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE CODEHAUS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/PolyForm-Noncommercial-1.0.0 b/options/license/PolyForm-Noncommercial-1.0.0 index f8837ce05..1a71cb643 100644 --- a/options/license/PolyForm-Noncommercial-1.0.0 +++ b/options/license/PolyForm-Noncommercial-1.0.0 @@ -4,43 +4,50 @@ ## Acceptance -In order to get any license under these terms, you must agree to them as both -strict obligations and conditions to all your licenses. +In order to get any license under these terms, you must agree +to them as both strict obligations and conditions to all +your licenses. ## Copyright License -The licensor grants you a copyright license for the software to do everything -you might do with the software that would otherwise infringe the licensor's -copyright in it for any permitted purpose. However, you may only distribute -the software according to [Distribution License](#distribution-license) and -make changes or new works based on the software according to [Changes and -New Works License](#changes-and-new-works-license). +The licensor grants you a copyright license for the +software to do everything you might do with the software +that would otherwise infringe the licensor's copyright +in it for any permitted purpose. However, you may +only distribute the software according to [Distribution +License](#distribution-license) and make changes or new works +based on the software according to [Changes and New Works +License](#changes-and-new-works-license). ## Distribution License -The licensor grants you an additional copyright license to distribute copies -of the software. Your license to distribute covers distributing the software -with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license). +The licensor grants you an additional copyright license +to distribute copies of the software. Your license +to distribute covers distributing the software with +changes and new works permitted by [Changes and New Works +License](#changes-and-new-works-license). ## Notices -You must ensure that anyone who gets a copy of any part of the software from -you also gets a copy of these terms or the URL for them above, as well as -copies of any plain-text lines beginning with `Required Notice:` that the -licensor provided with the software. For example: +You must ensure that anyone who gets a copy of any part of +the software from you also gets a copy of these terms or the +URL for them above, as well as copies of any plain-text lines +beginning with `Required Notice:` that the licensor provided +with the software. For example: > Required Notice: Copyright Yoyodyne, Inc. (http://example.com) ## Changes and New Works License -The licensor grants you an additional copyright license to make changes and -new works based on the software for any permitted purpose. +The licensor grants you an additional copyright license to +make changes and new works based on the software for any +permitted purpose. ## Patent License -The licensor grants you a patent license for the software that covers patent -claims the licensor can license, or becomes able to license, that you would -infringe by using the software. +The licensor grants you a patent license for the software that +covers patent claims the licensor can license, or becomes able +to license, that you would infringe by using the software. ## Noncommercial Purposes @@ -48,66 +55,77 @@ Any noncommercial purpose is a permitted purpose. ## Personal Uses -Personal use for research, experiment, and testing for the benefit of public -knowledge, personal study, private entertainment, hobby projects, amateur -pursuits, or religious observance, without any anticipated commercial application, +Personal use for research, experiment, and testing for +the benefit of public knowledge, personal study, private +entertainment, hobby projects, amateur pursuits, or religious +observance, without any anticipated commercial application, is use for a permitted purpose. ## Noncommercial Organizations -Use by any charitable organization, educational institution, public research -organization, public safety or health organization, environmental protection -organization, or government institution is use for a permitted purpose regardless -of the source of funding or obligations resulting from the funding. +Use by any charitable organization, educational institution, +public research organization, public safety or health +organization, environmental protection organization, +or government institution is use for a permitted purpose +regardless of the source of funding or obligations resulting +from the funding. ## Fair Use -You may have "fair use" rights for the software under the law. These terms -do not limit them. +You may have "fair use" rights for the software under the +law. These terms do not limit them. ## No Other Rights -These terms do not allow you to sublicense or transfer any of your licenses -to anyone else, or prevent the licensor from granting licenses to anyone else. -These terms do not imply any other licenses. +These terms do not allow you to sublicense or transfer any of +your licenses to anyone else, or prevent the licensor from +granting licenses to anyone else. These terms do not imply +any other licenses. ## Patent Defense -If you make any written claim that the software infringes or contributes to -infringement of any patent, your patent license for the software granted under -these terms ends immediately. If your company makes such a claim, your patent -license ends immediately for work on behalf of your company. +If you make any written claim that the software infringes or +contributes to infringement of any patent, your patent license +for the software granted under these terms ends immediately. If +your company makes such a claim, your patent license ends +immediately for work on behalf of your company. ## Violations -The first time you are notified in writing that you have violated any of these -terms, or done anything with the software not covered by your licenses, your -licenses can nonetheless continue if you come into full compliance with these -terms, and take practical steps to correct past violations, within 32 days -of receiving notice. Otherwise, all your licenses end immediately. +The first time you are notified in writing that you have +violated any of these terms, or done anything with the software +not covered by your licenses, your licenses can nonetheless +continue if you come into full compliance with these terms, +and take practical steps to correct past violations, within +32 days of receiving notice. Otherwise, all your licenses +end immediately. ## No Liability -***As far as the law allows, the software comes as is, without any warranty -or condition, and the licensor will not be liable to you for any damages arising -out of these terms or the use or nature of the software, under any kind of -legal claim.*** +***As far as the law allows, the software comes as is, without +any warranty or condition, and the licensor will not be liable +to you for any damages arising out of these terms or the use +or nature of the software, under any kind of legal claim.*** ## Definitions -The **licensor** is the individual or entity offering these terms, and the -**software** is the software the licensor makes available under these terms. +The **licensor** is the individual or entity offering these +terms, and the **software** is the software the licensor makes +available under these terms. -**You** refers to the individual or entity agreeing to these terms. +**You** refers to the individual or entity agreeing to these +terms. -**Your company** is any legal entity, sole proprietorship, or other kind of -organization that you work for, plus all organizations that have control over, -are under the control of, or are under common control with that organization. -**Control** means ownership of substantially all the assets of an entity, -or the power to direct its management and policies by vote, contract, or otherwise. -Control can be direct or indirect. +**Your company** is any legal entity, sole proprietorship, +or other kind of organization that you work for, plus all +organizations that have control over, are under the control of, +or are under common control with that organization. **Control** +means ownership of substantially all the assets of an entity, +or the power to direct its management and policies by vote, +contract, or otherwise. Control can be direct or indirect. -**Your licenses** are all the licenses granted to you for the software under -these terms. +**Your licenses** are all the licenses granted to you for the +software under these terms. -**Use** means anything you do with the software requiring one of your licenses. +**Use** means anything you do with the software requiring one +of your licenses. diff --git a/options/license/PolyForm-Small-Business-1.0.0 b/options/license/PolyForm-Small-Business-1.0.0 index 514d1d0ce..5b5790e04 100644 --- a/options/license/PolyForm-Small-Business-1.0.0 +++ b/options/license/PolyForm-Small-Business-1.0.0 @@ -4,102 +4,118 @@ ## Acceptance -In order to get any license under these terms, you must agree to them as both -strict obligations and conditions to all your licenses. +In order to get any license under these terms, you must agree +to them as both strict obligations and conditions to all +your licenses. ## Copyright License -The licensor grants you a copyright license for the software to do everything -you might do with the software that would otherwise infringe the licensor's -copyright in it for any permitted purpose. However, you may only distribute -the software according to [Distribution License](#distribution-license) and -make changes or new works based on the software according to [Changes and -New Works License](#changes-and-new-works-license). +The licensor grants you a copyright license for the +software to do everything you might do with the software +that would otherwise infringe the licensor's copyright +in it for any permitted purpose. However, you may +only distribute the software according to [Distribution +License](#distribution-license) and make changes or new works +based on the software according to [Changes and New Works +License](#changes-and-new-works-license). ## Distribution License -The licensor grants you an additional copyright license to distribute copies -of the software. Your license to distribute covers distributing the software -with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license). +The licensor grants you an additional copyright license +to distribute copies of the software. Your license +to distribute covers distributing the software with +changes and new works permitted by [Changes and New Works +License](#changes-and-new-works-license). ## Notices -You must ensure that anyone who gets a copy of any part of the software from -you also gets a copy of these terms or the URL for them above, as well as -copies of any plain-text lines beginning with `Required Notice:` that the -licensor provided with the software. For example: +You must ensure that anyone who gets a copy of any part of +the software from you also gets a copy of these terms or the +URL for them above, as well as copies of any plain-text lines +beginning with `Required Notice:` that the licensor provided +with the software. For example: > Required Notice: Copyright Yoyodyne, Inc. (http://example.com) ## Changes and New Works License -The licensor grants you an additional copyright license to make changes and -new works based on the software for any permitted purpose. +The licensor grants you an additional copyright license to +make changes and new works based on the software for any +permitted purpose. ## Patent License -The licensor grants you a patent license for the software that covers patent -claims the licensor can license, or becomes able to license, that you would -infringe by using the software. +The licensor grants you a patent license for the software that +covers patent claims the licensor can license, or becomes able +to license, that you would infringe by using the software. ## Fair Use -You may have "fair use" rights for the software under the law. These terms -do not limit them. +You may have "fair use" rights for the software under the +law. These terms do not limit them. ## Small Business -Use of the software for the benefit of your company is use for a permitted -purpose if your company has fewer than 100 total individuals working as employees -and independent contractors, and less than 1,000,000 USD (2019) total revenue -in the prior tax year. Adjust this revenue threshold for inflation according -to the United States Bureau of Labor Statistics' consumer price index for -all urban consumers, U.S. city average, for all items, not seasonally adjusted, -with 1982–1984=100 reference base. +Use of the software for the benefit of your company is use for +a permitted purpose if your company has fewer than 100 total +individuals working as employees and independent contractors, +and less than 1,000,000 USD (2019) total revenue in the prior +tax year. Adjust this revenue threshold for inflation according +to the United States Bureau of Labor Statistics' consumer price +index for all urban consumers, U.S. city average, for all items, +not seasonally adjusted, with 1982–1984=100 reference base. ## No Other Rights -These terms do not allow you to sublicense or transfer any of your licenses -to anyone else, or prevent the licensor from granting licenses to anyone else. -These terms do not imply any other licenses. +These terms do not allow you to sublicense or transfer any of +your licenses to anyone else, or prevent the licensor from +granting licenses to anyone else. These terms do not imply +any other licenses. ## Patent Defense -If you make any written claim that the software infringes or contributes to -infringement of any patent, your patent license for the software granted under -these terms ends immediately. If your company makes such a claim, your patent -license ends immediately for work on behalf of your company. +If you make any written claim that the software infringes or +contributes to infringement of any patent, your patent license +for the software granted under these terms ends immediately. If +your company makes such a claim, your patent license ends +immediately for work on behalf of your company. ## Violations -The first time you are notified in writing that you have violated any of these -terms, or done anything with the software not covered by your licenses, your -licenses can nonetheless continue if you come into full compliance with these -terms, and take practical steps to correct past violations, within 32 days -of receiving notice. Otherwise, all your licenses end immediately. +The first time you are notified in writing that you have +violated any of these terms, or done anything with the software +not covered by your licenses, your licenses can nonetheless +continue if you come into full compliance with these terms, +and take practical steps to correct past violations, within +32 days of receiving notice. Otherwise, all your licenses +end immediately. ## No Liability -***As far as the law allows, the software comes as is, without any warranty -or condition, and the licensor will not be liable to you for any damages arising -out of these terms or the use or nature of the software, under any kind of -legal claim.*** +***As far as the law allows, the software comes as is, without +any warranty or condition, and the licensor will not be liable +to you for any damages arising out of these terms or the use +or nature of the software, under any kind of legal claim.*** ## Definitions -The **licensor** is the individual or entity offering these terms, and the -**software** is the software the licensor makes available under these terms. +The **licensor** is the individual or entity offering these +terms, and the **software** is the software the licensor makes +available under these terms. -**You** refers to the individual or entity agreeing to these terms. +**You** refers to the individual or entity agreeing to these +terms. -**Your company** is any legal entity, sole proprietorship, or other kind of -organization that you work for, plus all organizations that have control over, -are under the control of, or are under common control with that organization. -**Control** means ownership of substantially all the assets of an entity, -or the power to direct its management and policies by vote, contract, or otherwise. -Control can be direct or indirect. +**Your company** is any legal entity, sole proprietorship, +or other kind of organization that you work for, plus all +organizations that have control over, are under the control of, +or are under common control with that organization. **Control** +means ownership of substantially all the assets of an entity, +or the power to direct its management and policies by vote, +contract, or otherwise. Control can be direct or indirect. -**Your licenses** are all the licenses granted to you for the software under -these terms. +**Your licenses** are all the licenses granted to you for the +software under these terms. -**Use** means anything you do with the software requiring one of your licenses. +**Use** means anything you do with the software requiring one +of your licenses. diff --git a/options/license/PostgreSQL b/options/license/PostgreSQL index 06ef3c5d2..f5775a4c5 100644 --- a/options/license/PostgreSQL +++ b/options/license/PostgreSQL @@ -1,23 +1,12 @@ PostgreSQL Database Management System +(formerly known as Postgres, then as Postgres95) -(formerly known as Postgres, then as Postgres95) Portions Copyright (c) 1996-2010, -The PostgreSQL Global Development Group +Portions Copyright (c) 1996-2010, The PostgreSQL Global Development Group Portions Copyright (c) 1994, The Regents of the University of California -Permission to use, copy, modify, and distribute this software and its documentation -for any purpose, without fee, and without a written agreement is hereby granted, -provided that the above copyright notice and this paragraph and the following -two paragraphs appear in all copies. +Permission to use, copy, modify, and distribute this software and its documentation for any purpose, without fee, and without a written agreement is hereby granted, provided that the above copyright notice and this paragraph and the following two paragraphs appear in all copies. -IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR -DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING -LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, -EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" -BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, -SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. diff --git a/options/license/Python-2.0 b/options/license/Python-2.0 index 04962c064..b212cb2cb 100644 --- a/options/license/Python-2.0 +++ b/options/license/Python-2.0 @@ -1,160 +1,72 @@ PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 -1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), -and the Individual or Organization ("Licensee") accessing and otherwise using -this software ("Python") in source or binary form and its associated documentation. + 1. This LICENSE AGREEMENT is between the Python Software Foundation ("PSF"), and the Individual or Organization ("Licensee") accessing and otherwise using this software ("Python") in source or binary form and its associated documentation. -2. Subject to the terms and conditions of this License Agreement, PSF hereby -grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, -analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python alone or in any derivative version, provided, -however, that PSF's License Agreement and PSF's notice of copyright, i.e., -"Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; -All Rights Reserved" are retained in Python alone or in any derivative version -prepared by Licensee. + 2. Subject to the terms and conditions of this License Agreement, PSF hereby grants Licensee a nonexclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python alone or in any derivative version, provided, however, that PSF's License Agreement and PSF's notice of copyright, i.e., "Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Python Software Foundation; All Rights Reserved" are retained in Python alone or in any derivative version prepared by Licensee. -3. In the event Licensee prepares a derivative work that is based on or incorporates -Python or any part thereof, and wants to make the derivative work available -to others as provided herein, then Licensee hereby agrees to include in any -such work a brief summary of the changes made to Python. + 3. In the event Licensee prepares a derivative work that is based on or incorporates Python or any part thereof, and wants to make the derivative work available to others as provided herein, then Licensee hereby agrees to include in any such work a brief summary of the changes made to Python. -4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES -NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT -NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY -OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF -PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. + 4. PSF is making Python available to Licensee on an "AS IS" basis. PSF MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, PSF MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. -5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY -INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, -DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF -ADVISED OF THE POSSIBILITY THEREOF. + 5. PSF SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF PYTHON FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF MODIFYING, DISTRIBUTING, OR OTHERWISE USING PYTHON, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -6. This License Agreement will automatically terminate upon a material breach -of its terms and conditions. + 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. -7. Nothing in this License Agreement shall be deemed to create any relationship -of agency, partnership, or joint venture between PSF and Licensee. This License -Agreement does not grant permission to use PSF trademarks or trade name in -a trademark sense to endorse or promote products or services of Licensee, -or any third party. + 7. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between PSF and Licensee. This License Agreement does not grant permission to use PSF trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. -8. By copying, installing or otherwise using Python, Licensee agrees to be -bound by the terms and conditions of this License Agreement. BEOPEN.COM LICENSE -AGREEMENT FOR PYTHON 2.0 + 8. By copying, installing or otherwise using Python, Licensee agrees to be bound by the terms and conditions of this License Agreement. + + +BEOPEN.COM LICENSE AGREEMENT FOR PYTHON 2.0 BEOPEN PYTHON OPEN SOURCE LICENSE AGREEMENT VERSION 1 -1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office -at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization -("Licensee") accessing and otherwise using this software in source or binary -form and its associated documentation ("the Software"). + 1. This LICENSE AGREEMENT is between BeOpen.com ("BeOpen"), having an office at 160 Saratoga Avenue, Santa Clara, CA 95051, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software"). -2. Subject to the terms and conditions of this BeOpen Python License Agreement, -BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license -to reproduce, analyze, test, perform and/or display publicly, prepare derivative -works, distribute, and otherwise use the Software alone or in any derivative -version, provided, however, that the BeOpen Python License is retained in -the Software, alone or in any derivative version prepared by Licensee. + 2. Subject to the terms and conditions of this BeOpen Python License Agreement, BeOpen hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the BeOpen Python License is retained in the Software, alone or in any derivative version prepared by Licensee. -3. BeOpen is making the Software available to Licensee on an "AS IS" basis. -BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY -OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION -OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. + 3. BeOpen is making the Software available to Licensee on an "AS IS" basis. BEOPEN MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, BEOPEN MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. -4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT -OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, -EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + 4. BEOPEN SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -5. This License Agreement will automatically terminate upon a material breach -of its terms and conditions. + 5. This License Agreement will automatically terminate upon a material breach of its terms and conditions. -6. This License Agreement shall be governed by and interpreted in all respects -by the law of the State of California, excluding conflict of law provisions. -Nothing in this License Agreement shall be deemed to create any relationship -of agency, partnership, or joint venture between BeOpen and Licensee. This -License Agreement does not grant permission to use BeOpen trademarks or trade -names in a trademark sense to endorse or promote products or services of Licensee, -or any third party. As an exception, the "BeOpen Python" logos available at -http://www.pythonlabs.com/logos.html may be used according to the permissions -granted on that web page. + 6. This License Agreement shall be governed by and interpreted in all respects by the law of the State of California, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between BeOpen and Licensee. This License Agreement does not grant permission to use BeOpen trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. As an exception, the "BeOpen Python" logos available at http://www.pythonlabs.com/logos.html may be used according to the permissions granted on that web page. -7. By copying, installing or otherwise using the software, Licensee agrees -to be bound by the terms and conditions of this License Agreement. CNRI OPEN -SOURCE LICENSE AGREEMENT (for Python 1.6b1) IMPORTANT: PLEASE READ THE FOLLOWING -AGREEMENT CAREFULLY. + 7. By copying, installing or otherwise using the software, Licensee agrees to be bound by the terms and conditions of this License Agreement. -BY CLICKING ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR -OTHERWISE USING PYTHON 1.6, beta 1 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED -TO THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. -1. This LICENSE AGREEMENT is between the Corporation for National Research -Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 -("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise -using Python 1.6, beta 1 software in source or binary form and its associated -documentation, as released at the www.python.org Internet site on August 4, -2000 ("Python 1.6b1"). +CNRI OPEN SOURCE LICENSE AGREEMENT (for Python 1.6b1) -2. Subject to the terms and conditions of this License Agreement, CNRI hereby -grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, -analyze, test, perform and/or display publicly, prepare derivative works, -distribute, and otherwise use Python 1.6b1 alone or in any derivative version, -provided, however, that CNRIs License Agreement is retained in Python 1.6b1, -alone or in any derivative version prepared by Licensee. +IMPORTANT: PLEASE READ THE FOLLOWING AGREEMENT CAREFULLY. -Alternately, in lieu of CNRIs License Agreement, Licensee may substitute the -following text (omitting the quotes): "Python 1.6, beta 1, is made available -subject to the terms and conditions in CNRIs License Agreement. This Agreement -may be located on the Internet using the following unique, persistent identifier -(known as a handle): 1895.22/1011. This Agreement may also be obtained from -a proxy server on the Internet using the URL:http://hdl.handle.net/1895.22/1011". +BY CLICKING ON "ACCEPT" WHERE INDICATED BELOW, OR BY COPYING, INSTALLING OR OTHERWISE USING PYTHON 1.6, beta 1 SOFTWARE, YOU ARE DEEMED TO HAVE AGREED TO THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT. -3. In the event Licensee prepares a derivative work that is based on or incorporates -Python 1.6b1 or any part thereof, and wants to make the derivative work available -to the public as provided herein, then Licensee hereby agrees to indicate -in any such work the nature of the modifications made to Python 1.6b1. + 1. This LICENSE AGREEMENT is between the Corporation for National Research Initiatives, having an office at 1895 Preston White Drive, Reston, VA 20191 ("CNRI"), and the Individual or Organization ("Licensee") accessing and otherwise using Python 1.6, beta 1 software in source or binary form and its associated documentation, as released at the www.python.org Internet site on August 4, 2000 ("Python 1.6b1"). -4. CNRI is making Python 1.6b1 available to Licensee on an "AS IS" basis. -CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF -EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION -OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF PYTHON 1.6b1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. + 2. Subject to the terms and conditions of this License Agreement, CNRI hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use Python 1.6b1 alone or in any derivative version, provided, however, that CNRIs License Agreement is retained in Python 1.6b1, alone or in any derivative version prepared by Licensee. -5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT -OF USING, MODIFYING OR DISTRIBUTING PYTHON 1.6b1, OR ANY DERIVATIVE THEREOF, -EVEN IF ADVISED OF THE POSSIBILITY THEREOF. + Alternately, in lieu of CNRIs License Agreement, Licensee may substitute the following text (omitting the quotes): "Python 1.6, beta 1, is made available subject to the terms and conditions in CNRIs License Agreement. This Agreement may be located on the Internet using the following unique, persistent identifier (known as a handle): 1895.22/1011. This Agreement may also be obtained from a proxy server on the Internet using the URL:http://hdl.handle.net/1895.22/1011". -6. This License Agreement will automatically terminate upon a material breach -of its terms and conditions. + 3. In the event Licensee prepares a derivative work that is based on or incorporates Python 1.6b1 or any part thereof, and wants to make the derivative work available to the public as provided herein, then Licensee hereby agrees to indicate in any such work the nature of the modifications made to Python 1.6b1. -7. This License Agreement shall be governed by and interpreted in all respects -by the law of the State of Virginia, excluding conflict of law provisions. -Nothing in this License Agreement shall be deemed to create any relationship -of agency, partnership, or joint venture between CNRI and Licensee. This License -Agreement does not grant permission to use CNRI trademarks or trade name in -a trademark sense to endorse or promote products or services of Licensee, -or any third party. + 4. CNRI is making Python 1.6b1 available to Licensee on an "AS IS" basis. CNRI MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, CNRI MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF PYTHON 1.6b1 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. -8. By clicking on the "ACCEPT" button where indicated, or by copying, installing -or otherwise using Python 1.6b1, Licensee agrees to be bound by the terms -and conditions of this License Agreement. ACCEPT CWI LICENSE AGREEMENT FOR -PYTHON 0.9.0 THROUGH 1.2 Copyright (c) 1991 - 1995, Stichting Mathematisch -Centrum Amsterdam, The Netherlands. All rights reserved. + 5. CNRI SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS AS A RESULT OF USING, MODIFYING OR DISTRIBUTING PYTHON 1.6b1, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. -Permission to use, copy, modify, and distribute this software and its documentation -for any purpose and without fee is hereby granted, provided that the above -copyright notice appear in all copies and that both that copyright notice -and this permission notice appear in supporting documentation, and that the -name of Stichting Mathematisch Centrum or CWI not be used in advertising or -publicity pertaining to distribution of the software without specific, written -prior permission. + 6. This License Agreement will automatically terminate upon a material breach of its terms and conditions. -STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, -IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, -INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. + 7. This License Agreement shall be governed by and interpreted in all respects by the law of the State of Virginia, excluding conflict of law provisions. Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between CNRI and Licensee. This License Agreement does not grant permission to use CNRI trademarks or trade name in a trademark sense to endorse or promote products or services of Licensee, or any third party. + + 8. By clicking on the "ACCEPT" button where indicated, or by copying, installing or otherwise using Python 1.6b1, Licensee agrees to be bound by the terms and conditions of this License Agreement. + +ACCEPT + + +CWI LICENSE AGREEMENT FOR PYTHON 0.9.0 THROUGH 1.2 + +Copyright (c) 1991 - 1995, Stichting Mathematisch Centrum Amsterdam, The Netherlands. All rights reserved. + + Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the name of Stichting Mathematisch Centrum or CWI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. + + STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/QPL-1.0 b/options/license/QPL-1.0 index 83e9ca42c..64c35da10 100644 --- a/options/license/QPL-1.0 +++ b/options/license/QPL-1.0 @@ -1,89 +1,50 @@ -THE Q PUBLIC LICENSE version 1.0 Copyright (C) 1999-2005 Trolltech AS, Norway. +THE Q PUBLIC LICENSE version 1.0 + +Copyright (C) 1999-2005 Trolltech AS, Norway. Everyone is permitted to copy and distribute this license document. -The intent of this license is to establish freedom to share and change the -software regulated by this license under the open source model. +The intent of this license is to establish freedom to share and change the software regulated by this license under the open source model. -This license applies to any software containing a notice placed by the copyright -holder saying that it may be distributed under the terms of the Q Public License -version 1.0. Such software is herein referred to as the Software. This license -covers modification and distribution of the Software, use of third-party application -programs based on the Software, and development of free software which uses -the Software. +This license applies to any software containing a notice placed by the copyright holder saying that it may be distributed under the terms of the Q Public License version 1.0. Such software is herein referred to as the Software. This license covers modification and distribution of the Software, use of third-party application programs based on the Software, and development of free software which uses the Software. Granted Rights -1. You are granted the non-exclusive rights set forth in this license provided -you agree to and comply with any and all conditions in this license. Whole -or partial distribution of the Software, or software items that link with -the Software, in any form signifies acceptance of this license. +1. You are granted the non-exclusive rights set forth in this license provided you agree to and comply with any and all conditions in this license. Whole or partial distribution of the Software, or software items that link with the Software, in any form signifies acceptance of this license. -2. You may copy and distribute the Software in unmodified form provided that -the entire package, including - but not restricted to - copyright, trademark -notices and disclaimers, as released by the initial developer of the Software, -is distributed. +2. You may copy and distribute the Software in unmodified form provided that the entire package, including - but not restricted to - copyright, trademark notices and disclaimers, as released by the initial developer of the Software, is distributed. -3. You may make modifications to the Software and distribute your modifications, -in a form that is separate from the Software, such as patches. The following -restrictions apply to modifications: +3. You may make modifications to the Software and distribute your modifications, in a form that is separate from the Software, such as patches. The following restrictions apply to modifications: a. Modifications must not alter or remove any copyright notices in the Software. +b. When modifications to the Software are released under this license, a non-exclusive royalty-free right is granted to the initial developer of the Software to distribute your modification in future versions of the Software provided such versions remain available under these terms in addition to any other license(s) of the initial developer. -b. When modifications to the Software are released under this license, a non-exclusive -royalty-free right is granted to the initial developer of the Software to -distribute your modification in future versions of the Software provided such -versions remain available under these terms in addition to any other license(s) -of the initial developer. +4. You may distribute machine-executable forms of the Software or machine-executable forms of modified versions of the Software, provided that you meet these restrictions: -4. You may distribute machine-executable forms of the Software or machine-executable -forms of modified versions of the Software, provided that you meet these restrictions: + a. You must include this license document in the distribution. - a. You must include this license document in the distribution. + b. You must ensure that all recipients of the machine-executable forms are also able to receive the complete machine-readable source code to the distributed Software, including all modifications, without any charge beyond the costs of data transfer, and place prominent notices in the distribution explaining this. -b. You must ensure that all recipients of the machine-executable forms are -also able to receive the complete machine-readable source code to the distributed -Software, including all modifications, without any charge beyond the costs -of data transfer, and place prominent notices in the distribution explaining -this. + c. You must ensure that all modifications included in the machine-executable forms are available under the terms of this license. -c. You must ensure that all modifications included in the machine-executable -forms are available under the terms of this license. +5. You may use the original or modified versions of the Software to compile, link and run application programs legally developed by you or by others. -5. You may use the original or modified versions of the Software to compile, -link and run application programs legally developed by you or by others. +6. You may develop application programs, reusable components and other software items that link with the original or modified versions of the Software. These items, when distributed, are subject to the following requirements: -6. You may develop application programs, reusable components and other software -items that link with the original or modified versions of the Software. These -items, when distributed, are subject to the following requirements: + a. You must ensure that all recipients of machine-executable forms of these items are also able to receive and use the complete machine-readable source code to the items without any charge beyond the costs of data transfer. -a. You must ensure that all recipients of machine-executable forms of these -items are also able to receive and use the complete machine-readable source -code to the items without any charge beyond the costs of data transfer. + b. You must explicitly license all recipients of your items to use and re-distribute original and modified versions of the items in both machine-executable and source code forms. The recipients must be able to do so without any charges whatsoever, and they must be able to re-distribute to anyone they choose. -b. You must explicitly license all recipients of your items to use and re-distribute -original and modified versions of the items in both machine-executable and -source code forms. The recipients must be able to do so without any charges -whatsoever, and they must be able to re-distribute to anyone they choose. - -c. If the items are not available to the general public, and the initial developer -of the Software requests a copy of the items, then you must supply one. + c. If the items are not available to the general public, and the initial developer of the Software requests a copy of the items, then you must supply one. Limitations of Liability -In no event shall the initial developers or copyright holders be liable for -any damages whatsoever, including - but not restricted to - lost revenue or -profits or other direct, indirect, special, incidental or consequential damages, -even if they have been advised of the possibility of such damages, except -to the extent invariable law, if any, provides otherwise. +In no event shall the initial developers or copyright holders be liable for any damages whatsoever, including - but not restricted to - lost revenue or profits or other direct, indirect, special, incidental or consequential damages, even if they have been advised of the possibility of such damages, except to the extent invariable law, if any, provides otherwise. No Warranty -The Software and this license document are provided AS IS with NO WARRANTY -OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. +The Software and this license document are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Choice of Law -This license is governed by the Laws of Norway. Disputes shall be settled -by Oslo City Court. +This license is governed by the Laws of Norway. Disputes shall be settled by Oslo City Court. diff --git a/options/license/Qhull b/options/license/Qhull index 2362fd960..0c795af16 100644 --- a/options/license/Qhull +++ b/options/license/Qhull @@ -1,28 +1,17 @@ Qhull, Copyright (c) 1993-2003 -The National Science and Technology Research Center for Computation and Visualization -of Geometric Structures (The Geometry Center) University of Minnesota +The National Science and Technology Research Center for Computation and Visualization of Geometric Structures (The Geometry Center) University of Minnesota email: qhull@qhull.org -This software includes Qhull from The Geometry Center. Qhull is copyrighted -as noted above. Qhull is free software and may be obtained via http from www.qhull.org. -It may be freely copied, modified, and redistributed under the following conditions: +This software includes Qhull from The Geometry Center. Qhull is copyrighted as noted above. Qhull is free software and may be obtained via http from www.qhull.org. It may be freely copied, modified, and redistributed under the following conditions: - 1. All copyright notices must remain intact in all files. +1. All copyright notices must remain intact in all files. -2. A copy of this text file must be distributed along with any copies of Qhull -that you redistribute; this includes copies that you have modified, or copies -of programs or other software products that include Qhull. +2. A copy of this text file must be distributed along with any copies of Qhull that you redistribute; this includes copies that you have modified, or copies of programs or other software products that include Qhull. -3. If you modify Qhull, you must include a notice giving the name of the person -performing the modification, the date of modification, and the reason for -such modification. +3. If you modify Qhull, you must include a notice giving the name of the person performing the modification, the date of modification, and the reason for such modification. -4. When distributing modified versions of Qhull, or other software products -that include Qhull, you must provide notice that the original source code -may be obtained as noted above. +4. When distributing modified versions of Qhull, or other software products that include Qhull, you must provide notice that the original source code may be obtained as noted above. -5. There is no warranty or other guarantee of fitness for Qhull, it is provided -solely "as is". Bug reports or fixes may be sent to qhull_bug@qhull.org; the -authors may or may not act on them as they desire. +5. There is no warranty or other guarantee of fitness for Qhull, it is provided solely "as is". Bug reports or fixes may be sent to qhull_bug@qhull.org; the authors may or may not act on them as they desire. diff --git a/options/license/Qt-GPL-exception-1.0 b/options/license/Qt-GPL-exception-1.0 index bbc1d40ef..761d0327a 100644 --- a/options/license/Qt-GPL-exception-1.0 +++ b/options/license/Qt-GPL-exception-1.0 @@ -2,8 +2,20 @@ The Qt Company GPL Exception 1.0 Exception 1: -As a special exception, you may create a larger work which contains the output of this application and distribute that work under terms of your choice, so long as the work is not otherwise derived from or based on this application and so long as the work does not in itself generate output that contains the output from this application in its original or modified form. +As a special exception you may create a larger work which contains the +output of this application and distribute that work under terms of your +choice, so long as the work is not otherwise derived from or based on +this application and so long as the work does not in itself generate +output that contains the output from this application in its original +or modified form. Exception 2: -As a special exception, you have permission to combine this application with Plugins licensed under the terms of your choice, to produce an executable, and to copy and distribute the resulting executable under the terms of your choice. However, the executable must be accompanied by a prominent notice offering all users of the executable the entire source code to this application, excluding the source code of the independent modules, but including any changes you have made to this application, under the terms of this license. +As a special exception, you have permission to combine this application +with Plugins licensed under the terms of your choice, to produce an +executable, and to copy and distribute the resulting executable under +the terms of your choice. However, the executable must be accompanied +by a prominent notice offering all users of the executable the entire +source code to this application, excluding the source code of the +independent modules, but including any changes you have made to this +application, under the terms of this license. diff --git a/options/license/Qt-LGPL-exception-1.1 b/options/license/Qt-LGPL-exception-1.1 index d0f532e9e..bd94b5538 100644 --- a/options/license/Qt-LGPL-exception-1.1 +++ b/options/license/Qt-LGPL-exception-1.1 @@ -1,21 +1,22 @@ The Qt Company Qt LGPL Exception version 1.1 -As an additional permission to the GNU Lesser General Public License version 2.1, the object code form of a "work that uses the Library" may incorporate material from a header file that is part of the Library. You may distribute such object code under terms of your choice, provided that: +As an additional permission to the GNU Lesser General Public License version +2.1, the object code form of a "work that uses the Library" may incorporate +material from a header file that is part of the Library. You may distribute +such object code under terms of your choice, provided that: + (i) the header files of the Library have not been modified; and + (ii) the incorporated material is limited to numerical parameters, data + structure layouts, accessors, macros, inline functions and + templates; and + (iii) you comply with the terms of Section 6 of the GNU Lesser General + Public License version 2.1. - (i) the header files of the Library have not been modified; and +Moreover, you may apply this exception to a modified version of the Library, +provided that such modification does not involve copying material from the +Library into the modified Library's header files unless such material is +limited to (i) numerical parameters; (ii) data structure layouts; +(iii) accessors; and (iv) small macros, templates and inline functions of +five lines or less in length. - (ii) the incorporated material is limited to numerical parameters, data structure layouts, accessors, macros, inline functions and templates; and - - (iii) you comply with the terms of Section 6 of the GNU Lesser General Public License version 2.1. - -Moreover, you may apply this exception to a modified version of the Library, provided that such modification does not involve copying material from the Library into the modified Library's header files unless such material is limited to - - (i) numerical parameters; - - (ii) data structure layouts; - - (iii) accessors; and - - (iv) small macros, templates and inline functions of five lines or less in length. - -Furthermore, you are not required to apply this additional permission to a modified version of the Library. +Furthermore, you are not required to apply this additional permission to a +modified version of the Library. diff --git a/options/license/Qwt-exception-1.0 b/options/license/Qwt-exception-1.0 index 79fb15134..b45cdd0b5 100644 --- a/options/license/Qwt-exception-1.0 +++ b/options/license/Qwt-exception-1.0 @@ -1,13 +1,12 @@ Qwt License Version 1.0, - January 1, 2003 The Qwt library and included programs are provided under the terms of the GNU LESSER GENERAL PUBLIC LICENSE (LGPL) with the following exceptions: - 1. Widgets that are subclassed from Qwt widgets do not constitute a derivative work. +1. Widgets that are subclassed from Qwt widgets do not constitute a derivative work. - 2. Static linking of applications and widgets to the Qwt library does not constitute a derivative work and does not require the author to provide source code for the application or widget, use the shared Qwt libraries, or link their applications or widgets against a user-supplied version of Qwt. If you link the application or widget to a modified version of Qwt, then the changes to Qwt must be provided under the terms of the LGPL in sections 1, 2, and 4. +2. Static linking of applications and widgets to the Qwt library does not constitute a derivative work and does not require the author to provide source code for the application or widget, use the shared Qwt libraries, or link their applications or widgets against a user-supplied version of Qwt. If you link the application or widget to a modified version of Qwt, then the changes to Qwt must be provided under the terms of the LGPL in sections 1, 2, and 4. - 3. You do not have to provide a copy of the Qwt license with programs that are linked to the Qwt library, nor do you have to identify the Qwt license in your program or documentation as required by section 6 of the LGPL. +3. You do not have to provide a copy of the Qwt license with programs that are linked to the Qwt library, nor do you have to identify the Qwt license in your program or documentation as required by section 6 of the LGPL. However, programs must still identify their use of Qwt. The following example statement can be included in user documentation to satisfy this requirement: [program/widget] is based in part on the work of the Qwt project (http://qwt.sf.net)." diff --git a/options/license/RHeCos-1.1 b/options/license/RHeCos-1.1 index 16d33e320..db5350bae 100644 --- a/options/license/RHeCos-1.1 +++ b/options/license/RHeCos-1.1 @@ -1,374 +1,137 @@ Red Hat eCos Public License v1.1 - 1. DEFINITIONS +1. DEFINITIONS -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or a list of source code differential comparisons against -either the Original Code or another well known, available Covered Code of -the Contributor's choice. The Source Code can be in a compressed or archival -form, provided the appropriate decompression or de-archiving software is widely -available for no charge. + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or a list of source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.12. "You" means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of fifty percent (50%) or more -of the outstanding shares or beneficial ownership of such entity. + 1.12. "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -1.13. "Red Hat Branded Code" is code that Red Hat distributes and/or permits -others to distribute under different terms than the Red Hat eCos Public License. -Red Hat's Branded Code may contain part or all of the Covered Code. + 1.13. "Red Hat Branded Code" is code that Red Hat distributes and/or permits others to distribute under different terms than the Red Hat eCos Public License. Red Hat's Branded Code may contain part or all of the Covered Code. - 2. SOURCE CODE LICENSE +2. SOURCE CODE LICENSE -2.1. The Initial Developer Grant. The Initial Developer hereby grants You -a world-wide, royalty-free, non-exclusive license, subject to third party -intellectual property claims: + 2.1. The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Original Code (or portions thereof) with or without Modifications, or -as part of a Larger Work; and + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and -(b) under patents now or hereafter owned or controlled by Initial Developer, -to make, have made, use and sell ("Utilize") the Original Code (or portions -thereof), but solely to the extent that any such patent is reasonably necessary -to enable You to Utilize the Original Code (or portions thereof) and not to -any greater extent that may be necessary to Utilize further Modifications -or combinations. + (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("Utilize") the Original Code (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Original Code (or portions thereof) and not to any greater extent that may be necessary to Utilize further Modifications or combinations. -2.2. Contributor Grant. Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: + 2.2. Contributor Grant. Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) to use, reproduce, modify, display, perform, sublicense and distribute -the Modifications created by such Contributor (or portions thereof) either -on an unmodified basis, with other Modifications, as Covered Code or as part -of a Larger Work; and + (a) to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code or as part of a Larger Work; and -(b) under patents now or hereafter owned or controlled by Contributor, to -Utilize the Contributor Version (or portions thereof), but solely to the extent -that any such patent is reasonably necessary to enable You to Utilize the -Contributor Version (or portions thereof), and not to any greater extent that -may be necessary to Utilize further Modifications or combinations. + (b) under patents now or hereafter owned or controlled by Contributor, to Utilize the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to Utilize the Contributor Version (or portions thereof), and not to any greater extent that may be necessary to Utilize further Modifications or combinations. - 3. DISTRIBUTION OBLIGATIONS +3. DISTRIBUTION OBLIGATIONS -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License via an accepted Electronic Distribution Mechanism to -anyone to whom you made an Executable version available and to the Initial -Developer; and if made available via Electronic Distribution Mechanism, must -remain available for at least twelve (12) months after the date it initially -became available, or at least six (6) months after a subsequent version of -that particular Modification has been made available to such recipients. You -are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. -You are responsible for notifying the Initial Developer of the Modification -and the location of the Source if a contact means is provided. Red Hat will -be acting as maintainer of the Source and may provide an Electronic Distribution -mechanism for the Modification to be made available. You can contact Red Hat -to make the Modification available and to notify the Initial Developer. (http://sourceware.cygnus.com/ecos/) + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available and to the Initial Developer; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. You are responsible for notifying the Initial Developer of the Modification and the location of the Source if a contact means is provided. Red Hat will be acting as maintainer of the Source and may provide an Electronic Distribution mechanism for the Modification to be made available. You can contact Red Hat to make the Modification available and to notify the Initial Developer. (http://sourceware.cygnus.com/ecos/) -3.3. Description of Modifications. You must cause all Covered Code to which -you contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. + 3.3. Description of Modifications. You must cause all Covered Code to which you contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. - 3.4. Intellectual Property Matters + 3.4. Intellectual Property Matters -(a) Third Party Claims. If You have knowledge that a party claims an intellectual -property right in particular functionality or code (or its utilization under -this License), you must include a text file with the source code distribution -titled "LEGAL" which describes the claim and the party making the claim in -sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after You make Your Modification available as described in -Section 3.2, You shall promptly modify the LEGAL file in all copies You make -available thereafter and shall take other steps (such as notifying appropriate -mailing lists or newsgroups) reasonably calculated to inform those who received -the Covered Code that new knowledge has been obtained. + (a) Third Party Claims. If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. -(b) Contributor APIs. If Your Modification is an application programming interface -and You own or control patents which are reasonably necessary to implement -that API, you must also include this information in the LEGAL file. + (b) Contributor APIs. If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code, and this License in any documentation for the Source -Code, where You describe recipients' rights relating to Covered Code. If You -created one or more Modification(s), You may add your name as a Contributor -to the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then you must include such notice in -a location (such as a relevant directory file) where a user would be likely -to look for such a notice. You may choose to offer, and to charge a fee for, -warranty, support, indemnity or liability obligations to one or more recipients -of Covered Code. + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Covered Code. If You created one or more Modification(s), You may add your name as a Contributor to the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. -However, You may do so only on Your own behalf, and not on behalf of the Initial -Developer or any Contributor. You must make it absolutely clear that any such -warranty, support, indemnity or liability obligation is offered by You alone, -and You hereby agree to indemnify the Initial Developer and every Contributor -for any liability incurred by the Initial Developer or such Contributor as -a result of warranty, support, indemnity or liability terms You offer. + However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligations -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code under a license of Your choice, which may contain -terms different from this License, provided that You are in compliance with -the terms of this License and that the license for the Executable version -does not attempt to limit or alter the recipient's rights in the Source Code -version from the rights set forth in this License. If You distribute the Executable -version under a different license You must make it absolutely clear that any -terms which differ from this License are offered by You alone, not by the -Initial Developer or any Contributor. You hereby agree to indemnify the Initial -Developer and every Contributor for any liability incurred by the Initial -Developer or such Contributor as a result of any such terms You offer. + 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. -If you distribute executable versions containing Covered Code, you must reproduce -the notice in Exhibit B in the documentation and/or other materials provided -with the product. + If you distribute executable versions containing Covered Code, you must reproduce the notice in Exhibit B in the documentation and/or other materials provided with the product. -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. + 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. - 4. INABILITY TO COMPLY DUE TO STATUTE OR REGULATION +4. INABILITY TO COMPLY DUE TO STATUTE OR REGULATION -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute or regulation -then You must: (a) comply with the terms of this License to the maximum extent -possible; (b) cite the statute or regulation that prohibits you from adhering -to the license; and (c) describe the limitations and the code they affect. -Such description must be included in the LEGAL file described in Section 3.4 -and must be included with all distributions of the Source Code. Except to -the extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. You -must submit this LEGAL file to Red Hat for review, and You will not be able -use the covered code in any means until permission is granted from Red Hat -to allow for the inability to comply due to statute or regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; (b) cite the statute or regulation that prohibits you from adhering to the license; and (c) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. You must submit this LEGAL file to Red Hat for review, and You will not be able use the covered code in any means until permission is granted from Red Hat to allow for the inability to comply due to statute or regulation. - 5. APPLICATION OF THIS LICENSE +5. APPLICATION OF THIS LICENSE -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A, and to related Covered Code. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A, and to related Covered Code. -Red Hat may include Covered Code in products without such additional products -becoming subject to the terms of this License, and may license such additional -products on different terms from those contained in this License. +Red Hat may include Covered Code in products without such additional products becoming subject to the terms of this License, and may license such additional products on different terms from those contained in this License. -Red Hat may license the Source Code of Red Hat Branded Code without Red Hat -Branded Code becoming subject to the terms of this License, and may license -Red Hat Branded Code on different terms from those contained in this License. -Contact Red Hat for details of alternate licensing terms available. +Red Hat may license the Source Code of Red Hat Branded Code without Red Hat Branded Code becoming subject to the terms of this License, and may license Red Hat Branded Code on different terms from those contained in this License. Contact Red Hat for details of alternate licensing terms available. - 6. VERSIONS OF THE LICENSE +6. VERSIONS OF THE LICENSE -6.1. New Versions. Red Hat may publish revised and/or new versions of the -License from time to time. Each version will be given a distinguishing version -number. + 6.1. New Versions. Red Hat may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -6.2. Effect of New Versions. Once Covered Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Covered Code under -the terms of any subsequent version of the License published by Red Hat. No -one other than Red Hat has the right to modify the terms applicable to Covered -Code beyond what is granted under this and subsequent Licenses. + 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Red Hat. No one other than Red Hat has the right to modify the terms applicable to Covered Code beyond what is granted under this and subsequent Licenses. -6.3. Derivative Works. If you create or use a modified version of this License -(which you may only do in order to apply it to code which is not already Covered -Code governed by this License), you must (a) rename Your license so that the -phrases "ECOS", "eCos", "Red Hat", "RHEPL" or any confusingly similar phrase -do not appear anywhere in your license and (b) otherwise make it clear that -your version of the license contains terms which differ from the Red Hat eCos -Public License. (Filling in the name of the Initial Developer, Original Code -or Contributor in the notice described in Exhibit A shall not of themselves -be deemed to be modifications of this License.) + 6.3. Derivative Works. If you create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), you must (a) rename Your license so that the phrases "ECOS", "eCos", "Red Hat", "RHEPL" or any confusingly similar phrase do not appear anywhere in your license and (b) otherwise make it clear that your version of the license contains terms which differ from the Red Hat eCos Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) - 7. DISCLAIMER OF WARRANTY +7. DISCLAIMER OF WARRANTY -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - 8. TERMINATION +8. TERMINATION -This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. +This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - 9. LIMITATION OF LIABILITY +9. LIMITATION OF LIABILITY -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER -CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF -SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, -OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL -HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING -FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - 10. U.S. GOVERNMENT END USERS +10. U.S. GOVERNMENT END USERS -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. - 11. MISCELLANEOUS +11. MISCELLANEOUS -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in, the United States -of America: (a) unless otherwise agreed in writing, all disputes relating -to this License (excepting any dispute relating to intellectual property rights) -shall be subject to final and binding arbitration, with the losing party paying -all costs of arbitration; (b) any arbitration relating to this Agreement shall -be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; -and (c) any litigation relating to this Agreement shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in, the United States of America: (a) unless otherwise agreed in writing, all disputes relating to this License (excepting any dispute relating to intellectual property rights) shall be subject to final and binding arbitration, with the losing party paying all costs of arbitration; (b) any arbitration relating to this Agreement shall be held in Santa Clara County, California, under the auspices of JAMS/EndDispute; and (c) any litigation relating to this Agreement shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. - 12. RESPONSIBILITY FOR CLAIMS +12. RESPONSIBILITY FOR CLAIMS -Except in cases where another Contributor has failed to comply with Section -3.4, You are responsible for damages arising, directly or indirectly, out -of Your utilization of rights under this License, based on the number of copies -of Covered Code you made available, the revenues you received from utilizing -such rights, and other relevant factors. You agree to work with affected parties -to distribute responsibility on an equitable basis. +Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Covered Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis. - 13. ADDITIONAL TERMS APPLICABLE TO THE RED HAT ECOS PUBLIC LICENSE +13. ADDITIONAL TERMS APPLICABLE TO THE RED HAT ECOS PUBLIC LICENSE -Nothing in this License shall be interpreted to prohibit Red Hat from licensing -under different terms than this License any code which Red Hat otherwise would -have a right to license. +Nothing in this License shall be interpreted to prohibit Red Hat from licensing under different terms than this License any code which Red Hat otherwise would have a right to license. -Red Hat and logo - This License does not grant any rights to use the trademark -Red Hat, the Red Hat logo, eCos logo, even if such marks are included in the -Original Code. You may contact Red Hat for permission to display the Red Hat -and eCos marks in either the documentation or the Executable version beyond -that required in Exhibit B. +Red Hat and logo - This License does not grant any rights to use the trademark Red Hat, the Red Hat logo, eCos logo, even if such marks are included in the Original Code. You may contact Red Hat for permission to display the Red Hat and eCos marks in either the documentation or the Executable version beyond that required in Exhibit B. -Inability to Comply Due to Contractual Obligation - To the extent that Red -Hat is limited contractually from making third party code available under -this License, Red Hat may choose to integrate such third party code into Covered -Code without being required to distribute such third party code in Source -Code form, even if such third party code would otherwise be considered "Modifications" -under this License. EXHIBIT A +Inability to Comply Due to Contractual Obligation - To the extent that Red Hat is limited contractually from making third party code available under this License, Red Hat may choose to integrate such third party code into Covered Code without being required to distribute such third party code in Source Code form, even if such third party code would otherwise be considered "Modifications" under this License. -"The contents of this file are subject to the Red Hat eCos Public License -Version 1.1 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at http://www.redhat.com/ +EXHIBIT A -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +"The contents of this file are subject to the Red Hat eCos Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.redhat.com/ -The Original Code is eCos - Embedded Configurable Operating System, released -September 30, 1998. The Initial Developer of the Original Code is Red Hat. -Portions created by Red Hat are Copyright (C) 1998, 1999, 2000 Red Hat, Inc. -All Rights Reserved." +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. + +The Original Code is eCos - Embedded Configurable Operating System, released September 30, 1998. The Initial Developer of the Original Code is Red Hat. Portions created by Red Hat are Copyright (C) 1998, 1999, 2000 Red Hat, Inc. All Rights Reserved." EXHIBIT B -Part of the software embedded in this product is eCos - Embedded Configurable -Operating System, a trademark of Red Hat. Portions created by Red Hat are -Copyright (C) 1998, 1999, 2000 Red Hat, Inc. (http://www.redhat.com/). All -Rights Reserved. +Part of the software embedded in this product is eCos - Embedded Configurable Operating System, a trademark of Red Hat. Portions created by Red Hat are Copyright (C) 1998, 1999, 2000 Red Hat, Inc. (http://www.redhat.com/). All Rights Reserved. -THE SOFTWARE IN THIS PRODUCT WAS IN PART PROVIDED BY RED HAT AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IN THIS PRODUCT WAS IN PART PROVIDED BY RED HAT AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/RPL-1.1 b/options/license/RPL-1.1 index c50ff79d9..8db27a884 100644 --- a/options/license/RPL-1.1 +++ b/options/license/RPL-1.1 @@ -1,561 +1,177 @@ -Reciprocal Public License, version 1.1 Copyright (C) 2001-2002 Technical Pursuit -Inc., All Rights Reserved. PREAMBLE +Reciprocal Public License, version 1.1 -This Preamble is intended to describe, in plain English, the nature, intent, -and scope of this License. However, this Preamble is not a part of this License. -The legal effect of this License is dependent only upon the terms of the License -and not this Preamble. +Copyright (C) 2001-2002 Technical Pursuit Inc., All Rights Reserved. -This License is based on the concept of reciprocity. In exchange for being -granted certain rights under the terms of this License to Licensor's Software, -whose Source Code You have access to, You are required to reciprocate by providing -equal access and rights to all third parties to the Source Code of any Modifications, -Derivative Works, and Required Components for execution of same (collectively -defined as Extensions) that You Deploy by Deploying Your Extensions under -the terms of this License. In this fashion the available Source Code related -to the original Licensed Software is enlarged for the benefit of everyone. +PREAMBLE + +This Preamble is intended to describe, in plain English, the nature, intent, and scope of this License. However, this Preamble is not a part of this License. The legal effect of this License is dependent only upon the terms of the License and not this Preamble. + +This License is based on the concept of reciprocity. In exchange for being granted certain rights under the terms of this License to Licensor's Software, whose Source Code You have access to, You are required to reciprocate by providing equal access and rights to all third parties to the Source Code of any Modifications, Derivative Works, and Required Components for execution of same (collectively defined as Extensions) that You Deploy by Deploying Your Extensions under the terms of this License. In this fashion the available Source Code related to the original Licensed Software is enlarged for the benefit of everyone. Under the terms of this License You may: -a. Distribute the Licensed Software exactly as You received it under the terms -of this License either alone or as a component of an aggregate software distribution -containing programs from several different sources without payment of a royalty -or other fee. +a. Distribute the Licensed Software exactly as You received it under the terms of this License either alone or as a component of an aggregate software distribution containing programs from several different sources without payment of a royalty or other fee. -b. Use the Licensed Software for any purpose consistent with the rights granted -by this License, but the Licensor is not providing You any warranty whatsoever, -nor is the Licensor accepting any liability in the event that the Licensed -Software doesn't work properly or causes You any injury or damages. +b. Use the Licensed Software for any purpose consistent with the rights granted by this License, but the Licensor is not providing You any warranty whatsoever, nor is the Licensor accepting any liability in the event that the Licensed Software doesn't work properly or causes You any injury or damages. -c. Create Extensions to the Licensed Software consistent with the rights granted -by this License, provided that You make the Source Code to any Extensions -You Deploy available to all third parties under the terms of this License, -document Your Modifications clearly, and title all Extensions distinctly from -the Licensed Software. +c. Create Extensions to the Licensed Software consistent with the rights granted by this License, provided that You make the Source Code to any Extensions You Deploy available to all third parties under the terms of this License, document Your Modifications clearly, and title all Extensions distinctly from the Licensed Software. -d. Charge a fee for warranty or support, or for accepting indemnity or liability -obligations for Your customers. +d. Charge a fee for warranty or support, or for accepting indemnity or liability obligations for Your customers. Under the terms of this License You may not: -a. Charge for the Source Code to the Licensed Software, or Your Extensions, -other than a nominal fee not to exceed Your cost for reproduction and distribution -where such reproduction and distribution involve physical media. +a. Charge for the Source Code to the Licensed Software, or Your Extensions, other than a nominal fee not to exceed Your cost for reproduction and distribution where such reproduction and distribution involve physical media. -b. Modify or delete any pre-existing copyright notices, change notices, or -License text in the Licensed Software. +b. Modify or delete any pre-existing copyright notices, change notices, or License text in the Licensed Software. -c. Assert any patent claims against the Licensor or Contributors, or which -would in any way restrict the ability of any third party to use the Licensed -Software or portions thereof in any form under the terms of this License, -or Your rights to the Licensed Software under this License automatically terminate. +c. Assert any patent claims against the Licensor or Contributors, or which would in any way restrict the ability of any third party to use the Licensed Software or portions thereof in any form under the terms of this License, or Your rights to the Licensed Software under this License automatically terminate. -d. Represent either expressly or by implication, appearance, or otherwise -that You represent Licensor or +d. Represent either expressly or by implication, appearance, or otherwise that You represent Licensor or -Contributors in any capacity or that You have any form of legal association -by virtue of this License. +Contributors in any capacity or that You have any form of legal association by virtue of this License. Under the terms of this License You must: -a. Document any Modifications You make to the Licensed Software including -the nature of the change, the authors of the change, and the date of the change. -This documentation must appear both in the Source Code and in a text file -titled "CHANGES" distributed with the Licensed Software and Your Extensions. +a. Document any Modifications You make to the Licensed Software including the nature of the change, the authors of the change, and the date of the change. This documentation must appear both in the Source Code and in a text file titled "CHANGES" distributed with the Licensed Software and Your Extensions. -b. Make the Source Code for any Extensions You Deploy available in a timely -fashion via an Electronic Distribution Mechanism such as FTP or HTTP download. +b. Make the Source Code for any Extensions You Deploy available in a timely fashion via an Electronic Distribution Mechanism such as FTP or HTTP download. -c. Notify the Licensor of the availability of Source Code to Your Extensions -in a timely fashion and include in such notice a brief description of the -Extensions, the distinctive title used, and instructions on how to acquire -the Source Code and future updates. +c. Notify the Licensor of the availability of Source Code to Your Extensions in a timely fashion and include in such notice a brief description of the Extensions, the distinctive title used, and instructions on how to acquire the Source Code and future updates. -d. Grant Licensor and all third parties a world-wide, non-exclusive, royalty-free -license under any intellectual property rights owned or controlled by You -to use, reproduce, display, perform, modify, sublicense, and distribute Your -Extensions, in any form, under the terms of this License. +d. Grant Licensor and all third parties a world-wide, non-exclusive, royalty-free license under any intellectual property rights owned or controlled by You to use, reproduce, display, perform, modify, sublicense, and distribute Your Extensions, in any form, under the terms of this License. LICENSE TERMS -1.0 General; Applicability & Definitions. This Reciprocal Public License Version -1.1 ("License") applies to any programs or other works as well as any and -all updates or maintenance releases of said programs or works ("Software") -not already covered by this License which the Software copyright holder ("Licensor") -makes publicly available containing a Notice (hereinafter defined) from the -Licensor specifying or allowing use or distribution under the terms of this -License. As used in this License and Preamble: - -1.1 "Contributor" means any person or entity who created or contributed to -the creation of an Extension. - -1.2 "Deploy" means to use, Serve, sublicense or distribute Licensed Software -other than for Your internal Research and/or Personal Use, and includes without -limitation, any and all internal use or distribution of Licensed Software -within Your business or organization other than for Research and/or Personal -Use, as well as direct or indirect sublicensing or distribution of Licensed -Software by You to any third party in any form or manner. - -1.3 "Derivative Works" as used in this License is defined under U.S. copyright -law. - -1.4 "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data -such as download from an FTP or web site, where such mechanism is publicly -accessible. - -1.5 "Extensions" means any Modifications, Derivative Works, or Required Components -as those terms are defined in this License. - - 1.6 "License" means this Reciprocal Public License. - -1.7 "Licensed Software" means any Software licensed pursuant to this License. -Licensed Software also includes all previous Extensions from any Contributor -that You receive. - -1.8 "Licensor" means the copyright holder of any Software previously uncovered -by this License who releases the Software under the terms of this License. - -1.9 "Modifications" means any additions to or deletions from the substance -or structure of (i) a file or other storage containing Licensed Software, -or (ii) any new file or storage that contains any part of Licensed Software, -or (iii) any file or storage which replaces or otherwise alters the original -functionality of Licensed Software at runtime. - - 1.10 "Notice" means the notice contained in EXHIBIT A. - -1.11 "Personal Use" means use of Licensed Software by an individual solely -for his or her personal, private and non-commercial purposes. An individual's -use of Licensed Software in his or her capacity as an officer, employee, member, -independent contractor or agent of a corporation, business or organization -(commercial or non-commercial) does not qualify as Personal Use. - -1.12 "Required Components" means any text, programs, scripts, schema, interface -definitions, control files, or other works created by You which are required -by a third party of average skill to successfully install and run Licensed -Software containing Your Modifications, or to install and run Your Derivative -Works. - -1.13 "Research" means investigation or experimentation for the purpose of -understanding the nature and limits of the Licensed Software and its potential -uses. - -1.14 "Serve" means to deliver Licensed Software and/or Your Extensions by -means of a computer network to one or more computers for purposes of execution -of Licensed Software and/or Your Extensions. - -1.15 "Software" means any computer programs or other works as well as any -updates or maintenance releases of those programs or works which are distributed -publicly by Licensor. - -1.16 "Source Code" means the preferred form for making modifications to the -Licensed Software and/or Your Extensions, including all modules contained -therein, plus any associated text, interface definition files, scripts used -to control compilation and installation of an executable program or other -components required by a third party of average skill to build a running version -of the Licensed Software or Your Extensions. - -1.17 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. - -2.0 Acceptance Of License. You are not required to accept this License since -you have not signed it, however nothing else grants you permission to use, -copy, distribute, modify, or create derivatives of either the Software or -any Extensions created by a Contributor. These actions are prohibited by law -if you do not accept this License. Therefore, by performing any of these actions -You indicate Your acceptance of this License and Your agreement to be bound -by all its terms and conditions. IF YOU DO NOT AGREE WITH ALL THE TERMS AND -CONDITIONS OF THIS LICENSE DO NOT USE, MODIFY, CREATE DERIVATIVES, OR DISTRIBUTE -THE SOFTWARE. IF IT IS IMPOSSIBLE FOR YOU TO COMPLY WITH ALL THE TERMS AND -CONDITIONS OF THIS LICENSE THEN YOU CAN NOT USE, MODIFY, CREATE DERIVATIVES, -OR DISTRIBUTE THE SOFTWARE. - -3.0 Grant of License From Licensor. Subject to the terms and conditions of -this License, Licensor hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to Licensor's intellectual property rights, and any third -party intellectual property claims derived from the Licensed Software under -this License, to do the following: - -3.1 Use, reproduce, modify, display, perform, sublicense and distribute Licensed -Software and Your Extensions in both Source Code form or as an executable -program. - -3.2 Create Derivative Works (as that term is defined under U.S. copyright -law) of Licensed Software by adding to or deleting from the substance or structure -of said Licensed Software. - -3.3 Under claims of patents now or hereafter owned or controlled by Licensor, -to make, use, have made, and/or otherwise dispose of Licensed Software or -portions thereof, but solely to the extent that any such claim is necessary -to enable You to make, use, have made, and/or otherwise dispose of Licensed -Software or portions thereof. - -3.4 Licensor reserves the right to release new versions of the Software with -different features, specifications, capabilities, functions, licensing terms, -general availability or other characteristics. Title, ownership rights, and -intellectual property rights in and to the Licensed Software shall remain -in Licensor and/or its Contributors. - -4.0 Grant of License From Contributor. By application of the provisions in -Section 6 below, each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license, subject to said Contributor's intellectual property -rights, and any third party intellectual property claims derived from the -Licensed Software under this License, to do the following: - -4.1 Use, reproduce, modify, display, perform, sublicense and distribute any -Extensions Deployed by such Contributor or portions thereof, in both Source -Code form or as an executable program, either on an unmodified basis or as -part of Derivative Works. - -4.2 Under claims of patents now or hereafter owned or controlled by Contributor, -to make, use, have made, and/or otherwise dispose of Extensions or portions -thereof, but solely to the extent that any such claim is necessary to enable -You to make, use, have made, and/or otherwise dispose of Contributor's Extensions -or portions thereof. - -5.0 Exclusions From License Grant. Nothing in this License shall be deemed -to grant any rights to trademarks, copyrights, patents, trade secrets or any -other intellectual property of Licensor or any Contributor except as expressly -stated herein. Except as expressly stated in Sections 3 and 4, no other patent -rights, express or implied, are granted herein. Your Extensions may require -additional patent licenses from Licensor or Contributors which each may grant -in its sole discretion. No right is granted to the trademarks of Licensor -or any Contributor even if such marks are included in the Licensed Software. -Nothing in this License shall be interpreted to prohibit Licensor from licensing -under different terms from this License any code that Licensor otherwise would -have a right to license. - -5.1 You expressly acknowledge and agree that although Licensor and each Contributor -grants the licenses to their respective portions of the Licensed Software -set forth herein, no assurances are provided by Licensor or any Contributor -that the Licensed Software does not infringe the patent or other intellectual -property rights of any other entity. Licensor and each Contributor disclaim -any liability to You for claims brought by any other entity based on infringement -of intellectual property rights or otherwise. As a condition to exercising -the rights and licenses granted hereunder, You hereby assume sole responsibility -to secure any other intellectual property rights needed, if any. For example, -if a third party patent license is required to allow You to distribute the -Licensed Software, it is Your responsibility to acquire that license before -distributing the Licensed Software. - -6.0 Your Obligations And Grants. In consideration of, and as an express condition -to, the licenses granted to You under this License You hereby agree that any -Modifications, Derivative Works, or Required Components (collectively Extensions) -that You create or to which You contribute are governed by the terms of this -License including, without limitation, Section 4. Any Extensions that You -create or to which You contribute must be Deployed under the terms of this -License or a future version of this License released under Section 7. You -hereby grant to Licensor and all third parties a world-wide, non-exclusive, -royalty-free license under those intellectual property rights You own or control -to use, reproduce, display, perform, modify, create derivatives, sublicense, -and distribute Your Extensions, in any form. Any Extensions You make and Deploy -must have a distinct title so as to readily tell any subsequent user or Contributor -that the Extensions are by You. You must include a copy of this License with -every copy of the Extensions You distribute. You agree not to offer or impose -any terms on any Source Code or executable version of the Licensed Software, -or its Extensions that alter or restrict the applicable version of this License -or the recipients' rights hereunder. - -6.1 Availability of Source Code. You must make available, under the terms -of this License, the Source Code of the Licensed Software and any Extensions -that You Deploy, either on the same media as You distribute any executable -or other form of the Licensed Software, or via an Electronic Distribution -Mechanism. The Source Code for any version of Licensed Software, or its Extensions -that You Deploy must be made available at the time of Deployment and must -remain available for as long as You Deploy the Extensions or at least twelve -(12) months after the date You Deploy, whichever is longer. You are responsible -for ensuring that the Source Code version remains available even if the Electronic -Distribution Mechanism is maintained by a third party. You may not charge -a fee for the Source Code distributed under this Section in excess of Your -actual cost of duplication and distribution where such duplication and distribution -involve physical media. - -6.2 Description of Modifications. You must cause any Modifications that You -create or to which You contribute, to update the file titled "CHANGES" distributed -with Licensed Software documenting the additions, changes or deletions You -made, the authors of such Modifications, and the dates of any such additions, -changes or deletions. You must also cause a cross-reference to appear in the -Source Code at the location of each change. You must include a prominent statement -that the Modifications are derived, directly or indirectly, from the Licensed -Software and include the names of the Licensor and any Contributor to the -Licensed Software in (i) the Source Code and (ii) in any notice displayed -by the Licensed Software You distribute or in related documentation in which -You describe the origin or ownership of the Licensed Software. You may not -modify or delete any pre-existing copyright notices, change notices or License -text in the Licensed Software. - - 6.3 Intellectual Property Matters. - -a. Third Party Claims. If You have knowledge that a license to a third party's -intellectual property right is required to exercise the rights granted by -this License, You must include a text file with the Source Code distribution -titled "LEGAL" that describes the claim and the party making the claim in -sufficient detail that a recipient will know whom to contact. If You obtain -such knowledge after You make any Extensions available as described in Section -6.1, You shall promptly modify the LEGAL file in all copies You make available -thereafter and shall take other steps (such as notifying appropriate mailing -lists or newsgroups) reasonably calculated to inform those who received the -Licensed Software from You that new knowledge has been obtained. - -b. Contributor APIs. If Your Extensions include an application programming -interface ("API") and You have knowledge of patent licenses that are reasonably -necessary to implement that API, You must also include this information in -the LEGAL file. - -c. Representations. You represent that, except as disclosed pursuant to 6.3(a) -above, You believe that any Extensions You distribute are Your original creations -and that You have sufficient rights to grant the rights conveyed by this License. - - 6.4 Required Notices. - -a. License Text. You must duplicate this License in any documentation You -provide along with the Source Code of any Extensions You create or to which -You contribute, wherever You describe recipients' rights relating to Licensed -Software. You must duplicate the notice contained in EXHIBIT A (the "Notice") -in each file of the Source Code of any copy You distribute of the Licensed -Software and Your Extensions. If You create an Extension, You may add Your -name as a Contributor to the text file titled "CONTRIB" distributed with the -Licensed Software along with a description of the contribution. If it is not -possible to put the Notice in a particular Source Code file due to its structure, -then You must include such Notice in a location (such as a relevant directory -file) where a user would be likely to look for such a notice. - -b. Source Code Availability. You must notify Licensor within one (1) month -of the date You initially Deploy of the availability of Source Code to Your -Extensions and include in such notification the name under which you Deployed -Your Extensions, a description of the Extensions, and instructions on how -to acquire the Source Code, including instructions on how to acquire updates -over time. Should such instructions change you must provide Licensor with -revised instructions within one (1) month of the date of change. Should you -be unable to notify Licensor directly, you must provide notification by posting -to appropriate news groups, mailing lists, or web sites where a search engine -would reasonably be expected to index them. - -6.5 Additional Terms. You may choose to offer, and charge a fee for, warranty, -support, indemnity or liability obligations to one or more recipients of Licensed -Software. However, You may do so only on Your own behalf, and not on behalf -of the Licensor or any Contributor. You must make it clear that any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Licensor and every Contributor for any liability -plus attorney fees, costs, and related expenses due to any such action or -claim incurred by the Licensor or such Contributor as a result of warranty, -support, indemnity or liability terms You offer. - -6.6 Conflicts With Other Licenses. Where any portion of Your Extensions, by -virtue of being Derivative Works of another product or similar circumstance, -fall under the terms of another license, the terms of that license should -be honored however You must also make Your Extensions available under this -License. If the terms of this License continue to conflict with the terms -of the other license you may write the Licensor for permission to resolve -the conflict in a fashion that remains consistent with the intent of this -License. Such permission will be granted at the sole discretion of the Licensor. - -7.0 Versions of This License. Licensor may publish from time to time revised -and/or new versions of the License. Once Licensed Software has been published -under a particular version of the License, You may always continue to use -it under the terms of that version. You may also choose to use such Licensed -Software under the terms of any subsequent version of the License published -by Licensor. No one other than Licensor has the right to modify the terms -applicable to Licensed Software created under this License. - -7.1 If You create or use a modified version of this License, which You may -do only in order to apply it to software that is not already Licensed Software -under this License, You must rename Your license so that it is not confusingly -similar to this License, and must make it clear that Your license contains -terms that differ from this License. In so naming Your license, You may not -use any trademark of Licensor or of any Contributor. Should Your modifications -to this License be limited to alteration of EXHIBIT A purely for purposes -of adjusting the Notice You require of licensees, You may continue to refer -to Your License as the Reciprocal Public License or simply the RPL. - -8.0 Disclaimer of Warranty. LICENSED SOFTWARE IS PROVIDED UNDER THIS LICENSE -ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE LICENSED SOFTWARE IS FREE -OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. -FURTHER THERE IS NO WARRANTY MADE AND ALL IMPLIED WARRANTIES ARE DISCLAIMED -THAT THE LICENSED SOFTWARE MEETS OR COMPLIES WITH ANY DESCRIPTION OF PERFORMANCE -OR OPERATION, SAID COMPATIBILITY AND SUITABILITY BEING YOUR RESPONSIBILITY. -LICENSOR DISCLAIMS ANY WARRANTY, IMPLIED OR EXPRESSED, THAT ANY CONTRIBUTOR'S -EXTENSIONS MEET ANY STANDARD OF COMPATIBILITY OR DESCRIPTION OF PERFORMANCE. -THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LICENSED SOFTWARE -IS WITH YOU. SHOULD LICENSED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU -(AND NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -SERVICING, REPAIR OR CORRECTION. UNDER THE TERMS OF THIS LICENSOR WILL NOT -SUPPORT THIS SOFTWARE AND IS UNDER NO OBLIGATION TO ISSUE UPDATES TO THIS -SOFTWARE. LICENSOR HAS NO KNOWLEDGE OF ERRANT CODE OR VIRUS IN THIS SOFTWARE, -BUT DOES NOT WARRANT THAT THE SOFTWARE IS FREE FROM SUCH ERRORS OR VIRUSES. -THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. -NO USE OF LICENSED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -9.0 Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, -WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, -ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED SOFTWARE, OR ANY SUPPLIER -OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, -DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, -OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL -HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF -LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING -FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - -10.0 High Risk Activities. THE LICENSED SOFTWARE IS NOT FAULT-TOLERANT AND -IS NOT DESIGNED, MANUFACTURED, OR INTENDED FOR USE OR DISTRIBUTION AS ON-LINE -CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE PERFORMANCE, -SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATIONS -SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, -IN WHICH THE FAILURE OF THE LICENSED SOFTWARE COULD LEAD DIRECTLY TO DEATH, -PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). -LICENSOR AND CONTRIBUTORS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY -OF FITNESS FOR HIGH RISK ACTIVITIES. - -11.0 Responsibility for Claims. As between Licensor and Contributors, each -party is responsible for claims and damages arising, directly or indirectly, -out of its utilization of rights under this License which specifically disclaims -warranties and limits any liability of the Licensor. This paragraph is to -be used in conjunction with and controlled by the Disclaimer Of Warranties -of Section 8, the Limitation Of Damages in Section 9, and the disclaimer against -use for High Risk Activities in Section 10. The Licensor has thereby disclaimed -all warranties and limited any damages that it is or may be liable for. You -agree to work with Licensor and Contributors to distribute such responsibility -on an equitable basis consistent with the terms of this License including -Sections 8, 9, and 10. Nothing herein is intended or shall be deemed to constitute -any admission of liability. - -12.0 Termination. This License and all rights granted hereunder will terminate -immediately in the event of the circumstances described in Section 13.6 or -if applicable law prohibits or restricts You from fully and or specifically -complying with Sections 3, 4 and/or 6, or prevents the enforceability of any -of those Sections, and You must immediately discontinue any use of Licensed -Software. - -12.1 Automatic Termination Upon Breach. This License and the rights granted -hereunder will terminate automatically if You fail to comply with the terms -herein and fail to cure such breach within thirty (30) days of becoming aware -of the breach. All sublicenses to the Licensed Software that are properly -granted shall survive any termination of this License. Provisions that, by -their nature, must remain in effect beyond the termination of this License, -shall survive. - -12.2 Termination Upon Assertion of Patent Infringement. If You initiate litigation -by asserting a patent infringement claim (excluding declaratory judgment actions) -against Licensor or a Contributor (Licensor or Contributor against whom You -file such an action is referred to herein as "Respondent") alleging that Licensed -Software directly or indirectly infringes any patent, then any and all rights -granted by such Respondent to You under Sections 3 or 4 of this License shall -terminate prospectively upon sixty (60) days notice from Respondent (the "Notice -Period") unless within that Notice Period You either agree in writing (i) -to pay Respondent a mutually agreeable reasonably royalty for Your past or -future use of Licensed Software made by such Respondent, or (ii) withdraw -Your litigation claim with respect to Licensed Software against such Respondent. -If within said Notice Period a reasonable royalty and payment arrangement -are not mutually agreed upon in writing by the parties or the litigation claim -is not withdrawn, the rights granted by Licensor to You under Sections 3 and -4 automatically terminate at the expiration of said Notice Period. - -12.3 Reasonable Value of This License. If You assert a patent infringement -claim against Respondent alleging that Licensed Software directly or indirectly -infringes any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by said Respondent under Sections 3 and 4 shall -be taken into account in determining the amount or value of any payment or -license. - -12.4 No Retroactive Effect of Termination. In the event of termination under -this Section all end user license agreements (excluding licenses to distributors -and resellers) that have been validly granted by You or any distributor hereunder -prior to termination shall survive termination. - - 13.0 Miscellaneous. - -13.1 U.S. Government End Users. The Licensed Software is a "commercial item," -as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial -computer software" and "commercial computer software documentation," as such -terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. -12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government -End Users acquire Licensed Software with only those rights set forth herein. - -13.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture, or any other form of legal association -between or among You, Licensor, or any Contributor, and You will not represent -to the contrary, whether expressly, by implication, appearance, or otherwise. - -13.3 Independent Development. Nothing in this License will impair Licensor's -right to acquire, license, develop, subcontract, market, or distribute technology -or products that perform the same or similar functions as, or otherwise compete -with, Extensions that You may develop, produce, market, or distribute. - -13.4 Consent To Breach Not Waiver. Failure by Licensor or Contributor to enforce -any provision of this License will not be deemed a waiver of future enforcement -of that or any other provision. - -13.5 Severability. This License represents the complete agreement concerning -the subject matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent necessary -to make it enforceable. - -13.6 Inability to Comply Due to Statute or Regulation. If it is impossible -for You to comply with any of the terms of this License with respect to some -or all of the Licensed Software due to statute, judicial order, or regulation, -then You cannot use, modify, or distribute the software. - -13.7 Export Restrictions. You may be restricted with respect to downloading -or otherwise acquiring, exporting, or reexporting the Licensed Software or -any underlying information or technology by United States and other applicable -laws and regulations. By downloading or by otherwise obtaining the Licensed -Software, You are agreeing to be responsible for compliance with all applicable -laws and regulations. - -13.8 Arbitration, Jurisdiction & Venue. This License shall be governed by -Colorado law provisions (except to the extent applicable law, if any, provides -otherwise), excluding its conflict-of-law provisions. You expressly agree -that any dispute relating to this License shall be submitted to binding arbitration -under the rules then prevailing of the American Arbitration Association. You -further agree that Adams County, Colorado USA is proper venue and grant such -arbitration proceeding jurisdiction as may be appropriate for purposes of -resolving any dispute under this License. Judgement upon any award made in -arbitration may be entered and enforced in any court of competent jurisdiction. -The arbitrator shall award attorney's fees and costs of arbitration to the -prevailing party. Should either party find it necessary to enforce its arbitration -award or seek specific performance of such award in a civil court of competent -jurisdiction, the prevailing party shall be entitled to reasonable attorney's -fees and costs. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. You and Licensor -expressly waive any rights to a jury trial in any litigation concerning Licensed -Software or this License. Any law or regulation that provides that the language -of a contract shall be construed against the drafter shall not apply to this -License. - -13.9 Entire Agreement. This License constitutes the entire agreement between -the parties with respect to the subject matter hereof. EXHIBIT A - -The Notice below must appear in each file of the Source Code of any copy You -distribute of the Licensed Software or any Extensions thereto, except as may -be modified as allowed under the terms of Section 7.1 - -Copyright (C) 1999-2002 Technical Pursuit Inc., All Rights Reserved. Patent -Pending, Technical Pursuit Inc. - -Unless explicitly acquired and licensed from Licensor under the Technical -Pursuit License ("TPL") Version 1.0 or greater, the contents of this file -are subject to the Reciprocal Public License ("RPL") Version 1.1, or subsequent -versions as allowed by the RPL, and You may not copy or use this file in either -source code or executable form, except in compliance with the terms and conditions -of the RPL. - -You may obtain a copy of both the TPL and the RPL (the "Licenses") from Technical -Pursuit Inc. at http://www.technicalpursuit.com. - -All software distributed under the Licenses is provided strictly on an "AS -IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND TECHNICAL -PURSUIT INC. HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, -ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET -ENJOYMENT, OR NON-INFRINGEMENT. See the Licenses for specific language governing -rights and limitations under the Licenses. +1.0 General; Applicability & Definitions. This Reciprocal Public License Version 1.1 ("License") applies to any programs or other works as well as any and all updates or maintenance releases of said programs or works ("Software") not already covered by this License which the Software copyright holder ("Licensor") makes publicly available containing a Notice (hereinafter defined) from the Licensor specifying or allowing use or distribution under the terms of this License. As used in this License and Preamble: + + 1.1 "Contributor" means any person or entity who created or contributed to the creation of an Extension. + + 1.2 "Deploy" means to use, Serve, sublicense or distribute Licensed Software other than for Your internal Research and/or Personal Use, and includes without limitation, any and all internal use or distribution of Licensed Software within Your business or organization other than for Research and/or Personal Use, as well as direct or indirect sublicensing or distribution of Licensed Software by You to any third party in any form or manner. + + 1.3 "Derivative Works" as used in this License is defined under U.S. copyright law. + + 1.4 "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data such as download from an FTP or web site, where such mechanism is publicly accessible. + + 1.5 "Extensions" means any Modifications, Derivative Works, or Required Components as those terms are defined in this License. + + 1.6 "License" means this Reciprocal Public License. + + 1.7 "Licensed Software" means any Software licensed pursuant to this License. Licensed Software also includes all previous Extensions from any Contributor that You receive. + + 1.8 "Licensor" means the copyright holder of any Software previously uncovered by this License who releases the Software under the terms of this License. + + 1.9 "Modifications" means any additions to or deletions from the substance or structure of (i) a file or other storage containing Licensed Software, or (ii) any new file or storage that contains any part of Licensed Software, or (iii) any file or storage which replaces or otherwise alters the original functionality of Licensed Software at runtime. + + 1.10 "Notice" means the notice contained in EXHIBIT A. + + 1.11 "Personal Use" means use of Licensed Software by an individual solely for his or her personal, private and non-commercial purposes. An individual's use of Licensed Software in his or her capacity as an officer, employee, member, independent contractor or agent of a corporation, business or organization (commercial or non-commercial) does not qualify as Personal Use. + + 1.12 "Required Components" means any text, programs, scripts, schema, interface definitions, control files, or other works created by You which are required by a third party of average skill to successfully install and run Licensed Software containing Your Modifications, or to install and run Your Derivative Works. + + 1.13 "Research" means investigation or experimentation for the purpose of understanding the nature and limits of the Licensed Software and its potential uses. + + 1.14 "Serve" means to deliver Licensed Software and/or Your Extensions by means of a computer network to one or more computers for purposes of execution of Licensed Software and/or Your Extensions. + + 1.15 "Software" means any computer programs or other works as well as any updates or maintenance releases of those programs or works which are distributed publicly by Licensor. + + 1.16 "Source Code" means the preferred form for making modifications to the Licensed Software and/or Your Extensions, including all modules contained therein, plus any associated text, interface definition files, scripts used to control compilation and installation of an executable program or other components required by a third party of average skill to build a running version of the Licensed Software or Your Extensions. + + 1.17 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. + +2.0 Acceptance Of License. You are not required to accept this License since you have not signed it, however nothing else grants you permission to use, copy, distribute, modify, or create derivatives of either the Software or any Extensions created by a Contributor. These actions are prohibited by law if you do not accept this License. Therefore, by performing any of these actions You indicate Your acceptance of this License and Your agreement to be bound by all its terms and conditions. IF YOU DO NOT AGREE WITH ALL THE TERMS AND CONDITIONS OF THIS LICENSE DO NOT USE, MODIFY, CREATE DERIVATIVES, OR DISTRIBUTE THE SOFTWARE. IF IT IS IMPOSSIBLE FOR YOU TO COMPLY WITH ALL THE TERMS AND CONDITIONS OF THIS LICENSE THEN YOU CAN NOT USE, MODIFY, CREATE DERIVATIVES, OR DISTRIBUTE THE SOFTWARE. + +3.0 Grant of License From Licensor. Subject to the terms and conditions of this License, Licensor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to Licensor's intellectual property rights, and any third party intellectual property claims derived from the Licensed Software under this License, to do the following: + + 3.1 Use, reproduce, modify, display, perform, sublicense and distribute Licensed Software and Your Extensions in both Source Code form or as an executable program. + + 3.2 Create Derivative Works (as that term is defined under U.S. copyright law) of Licensed Software by adding to or deleting from the substance or structure of said Licensed Software. + + 3.3 Under claims of patents now or hereafter owned or controlled by Licensor, to make, use, have made, and/or otherwise dispose of Licensed Software or portions thereof, but solely to the extent that any such claim is necessary to enable You to make, use, have made, and/or otherwise dispose of Licensed Software or portions thereof. + + 3.4 Licensor reserves the right to release new versions of the Software with different features, specifications, capabilities, functions, licensing terms, general availability or other characteristics. Title, ownership rights, and intellectual property rights in and to the Licensed Software shall remain in Licensor and/or its Contributors. + +4.0 Grant of License From Contributor. By application of the provisions in Section 6 below, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license, subject to said Contributor's intellectual property rights, and any third party intellectual property claims derived from the Licensed Software under this License, to do the following: + + 4.1 Use, reproduce, modify, display, perform, sublicense and distribute any Extensions Deployed by such Contributor or portions thereof, in both Source Code form or as an executable program, either on an unmodified basis or as part of Derivative Works. + + 4.2 Under claims of patents now or hereafter owned or controlled by Contributor, to make, use, have made, and/or otherwise dispose of Extensions or portions thereof, but solely to the extent that any such claim is necessary to enable You to make, use, have made, and/or otherwise dispose of Contributor's Extensions or portions thereof. + +5.0 Exclusions From License Grant. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor or any Contributor except as expressly stated herein. Except as expressly stated in Sections 3 and 4, no other patent rights, express or implied, are granted herein. Your Extensions may require additional patent licenses from Licensor or Contributors which each may grant in its sole discretion. No right is granted to the trademarks of Licensor or any Contributor even if such marks are included in the Licensed Software. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any code that Licensor otherwise would have a right to license. + + 5.1 You expressly acknowledge and agree that although Licensor and each Contributor grants the licenses to their respective portions of the Licensed Software set forth herein, no assurances are provided by Licensor or any Contributor that the Licensed Software does not infringe the patent or other intellectual property rights of any other entity. Licensor and each Contributor disclaim any liability to You for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, You hereby assume sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow You to distribute the Licensed Software, it is Your responsibility to acquire that license before distributing the Licensed Software. + +6.0 Your Obligations And Grants. In consideration of, and as an express condition to, the licenses granted to You under this License You hereby agree that any Modifications, Derivative Works, or Required Components (collectively Extensions) that You create or to which You contribute are governed by the terms of this License including, without limitation, Section 4. Any Extensions that You create or to which You contribute must be Deployed under the terms of this License or a future version of this License released under Section 7. You hereby grant to Licensor and all third parties a world-wide, non-exclusive, royalty-free license under those intellectual property rights You own or control to use, reproduce, display, perform, modify, create derivatives, sublicense, and distribute Your Extensions, in any form. Any Extensions You make and Deploy must have a distinct title so as to readily tell any subsequent user or Contributor that the Extensions are by You. You must include a copy of this License with every copy of the Extensions You distribute. You agree not to offer or impose any terms on any Source Code or executable version of the Licensed Software, or its Extensions that alter or restrict the applicable version of this License or the recipients' rights hereunder. + + 6.1 Availability of Source Code. You must make available, under the terms of this License, the Source Code of the Licensed Software and any Extensions that You Deploy, either on the same media as You distribute any executable or other form of the Licensed Software, or via an Electronic Distribution Mechanism. The Source Code for any version of Licensed Software, or its Extensions that You Deploy must be made available at the time of Deployment and must remain available for as long as You Deploy the Extensions or at least twelve (12) months after the date You Deploy, whichever is longer. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. You may not charge a fee for the Source Code distributed under this Section in excess of Your actual cost of duplication and distribution where such duplication and distribution involve physical media. + + 6.2 Description of Modifications. You must cause any Modifications that You create or to which You contribute, to update the file titled "CHANGES" distributed with Licensed Software documenting the additions, changes or deletions You made, the authors of such Modifications, and the dates of any such additions, changes or deletions. You must also cause a cross-reference to appear in the Source Code at the location of each change. You must include a prominent statement that the Modifications are derived, directly or indirectly, from the Licensed Software and include the names of the Licensor and any Contributor to the Licensed Software in (i) the Source Code and (ii) in any notice displayed by the Licensed Software You distribute or in related documentation in which You describe the origin or ownership of the Licensed Software. You may not modify or delete any pre-existing copyright notices, change notices or License text in the Licensed Software. + + 6.3 Intellectual Property Matters. + + a. Third Party Claims. If You have knowledge that a license to a third party's intellectual property right is required to exercise the rights granted by this License, You must include a text file with the Source Code distribution titled "LEGAL" that describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If You obtain such knowledge after You make any Extensions available as described in Section 6.1, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Licensed Software from You that new knowledge has been obtained. + + b. Contributor APIs. If Your Extensions include an application programming interface ("API") and You have knowledge of patent licenses that are reasonably necessary to implement that API, You must also include this information in the LEGAL file. + + c. Representations. You represent that, except as disclosed pursuant to 6.3(a) above, You believe that any Extensions You distribute are Your original creations and that You have sufficient rights to grant the rights conveyed by this License. + + 6.4 Required Notices. + + a. License Text. You must duplicate this License in any documentation You provide along with the Source Code of any Extensions You create or to which You contribute, wherever You describe recipients' rights relating to Licensed Software. You must duplicate the notice contained in EXHIBIT A (the "Notice") in each file of the Source Code of any copy You distribute of the Licensed Software and Your Extensions. If You create an Extension, You may add Your name as a Contributor to the text file titled "CONTRIB" distributed with the Licensed Software along with a description of the contribution. If it is not possible to put the Notice in a particular Source Code file due to its structure, then You must include such Notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. + + b. Source Code Availability. You must notify Licensor within one (1) month of the date You initially Deploy of the availability of Source Code to Your Extensions and include in such notification the name under which you Deployed Your Extensions, a description of the Extensions, and instructions on how to acquire the Source Code, including instructions on how to acquire updates over time. Should such instructions change you must provide Licensor with revised instructions within one (1) month of the date of change. Should you be unable to notify Licensor directly, you must provide notification by posting to appropriate news groups, mailing lists, or web sites where a search engine would reasonably be expected to index them. + + 6.5 Additional Terms. You may choose to offer, and charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Licensed Software. However, You may do so only on Your own behalf, and not on behalf of the Licensor or any Contributor. You must make it clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Licensor and every Contributor for any liability plus attorney fees, costs, and related expenses due to any such action or claim incurred by the Licensor or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + + 6.6 Conflicts With Other Licenses. Where any portion of Your Extensions, by virtue of being Derivative Works of another product or similar circumstance, fall under the terms of another license, the terms of that license should be honored however You must also make Your Extensions available under this License. If the terms of this License continue to conflict with the terms of the other license you may write the Licensor for permission to resolve the conflict in a fashion that remains consistent with the intent of this License. Such permission will be granted at the sole discretion of the Licensor. + +7.0 Versions of This License. Licensor may publish from time to time revised and/or new versions of the License. Once Licensed Software has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Licensed Software under the terms of any subsequent version of the License published by Licensor. No one other than Licensor has the right to modify the terms applicable to Licensed Software created under this License. + + 7.1 If You create or use a modified version of this License, which You may do only in order to apply it to software that is not already Licensed Software under this License, You must rename Your license so that it is not confusingly similar to this License, and must make it clear that Your license contains terms that differ from this License. In so naming Your license, You may not use any trademark of Licensor or of any Contributor. Should Your modifications to this License be limited to alteration of EXHIBIT A purely for purposes of adjusting the Notice You require of licensees, You may continue to refer to Your License as the Reciprocal Public License or simply the RPL. + +8.0 Disclaimer of Warranty. LICENSED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE LICENSED SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. FURTHER THERE IS NO WARRANTY MADE AND ALL IMPLIED WARRANTIES ARE DISCLAIMED THAT THE LICENSED SOFTWARE MEETS OR COMPLIES WITH ANY DESCRIPTION OF PERFORMANCE OR OPERATION, SAID COMPATIBILITY AND SUITABILITY BEING YOUR RESPONSIBILITY. LICENSOR DISCLAIMS ANY WARRANTY, IMPLIED OR EXPRESSED, THAT ANY CONTRIBUTOR'S EXTENSIONS MEET ANY STANDARD OF COMPATIBILITY OR DESCRIPTION OF PERFORMANCE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LICENSED SOFTWARE IS WITH YOU. SHOULD LICENSED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (AND NOT THE LICENSOR OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. UNDER THE TERMS OF THIS LICENSOR WILL NOT SUPPORT THIS SOFTWARE AND IS UNDER NO OBLIGATION TO ISSUE UPDATES TO THIS SOFTWARE. LICENSOR HAS NO KNOWLEDGE OF ERRANT CODE OR VIRUS IN THIS SOFTWARE, BUT DOES NOT WARRANT THAT THE SOFTWARE IS FREE FROM SUCH ERRORS OR VIRUSES. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF LICENSED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +9.0 Limitation of Liability. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL THE LICENSOR, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF LICENSED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10.0 High Risk Activities. THE LICENSED SOFTWARE IS NOT FAULT-TOLERANT AND IS NOT DESIGNED, MANUFACTURED, OR INTENDED FOR USE OR DISTRIBUTION AS ON-LINE CONTROL EQUIPMENT IN HAZARDOUS ENVIRONMENTS REQUIRING FAIL-SAFE PERFORMANCE, SUCH AS IN THE OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR COMMUNICATIONS SYSTEMS, AIR TRAFFIC CONTROL, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH THE FAILURE OF THE LICENSED SOFTWARE COULD LEAD DIRECTLY TO DEATH, PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH RISK ACTIVITIES"). LICENSOR AND CONTRIBUTORS SPECIFICALLY DISCLAIM ANY EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. + +11.0 Responsibility for Claims. As between Licensor and Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License which specifically disclaims warranties and limits any liability of the Licensor. This paragraph is to be used in conjunction with and controlled by the Disclaimer Of Warranties of Section 8, the Limitation Of Damages in Section 9, and the disclaimer against use for High Risk Activities in Section 10. The Licensor has thereby disclaimed all warranties and limited any damages that it is or may be liable for. You agree to work with Licensor and Contributors to distribute such responsibility on an equitable basis consistent with the terms of this License including Sections 8, 9, and 10. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +12.0 Termination. This License and all rights granted hereunder will terminate immediately in the event of the circumstances described in Section 13.6 or if applicable law prohibits or restricts You from fully and or specifically complying with Sections 3, 4 and/or 6, or prevents the enforceability of any of those Sections, and You must immediately discontinue any use of Licensed Software. + + 12.1 Automatic Termination Upon Breach. This License and the rights granted hereunder will terminate automatically if You fail to comply with the terms herein and fail to cure such breach within thirty (30) days of becoming aware of the breach. All sublicenses to the Licensed Software that are properly granted shall survive any termination of this License. Provisions that, by their nature, must remain in effect beyond the termination of this License, shall survive. + + 12.2 Termination Upon Assertion of Patent Infringement. If You initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Licensor or a Contributor (Licensor or Contributor against whom You file such an action is referred to herein as "Respondent") alleging that Licensed Software directly or indirectly infringes any patent, then any and all rights granted by such Respondent to You under Sections 3 or 4 of this License shall terminate prospectively upon sixty (60) days notice from Respondent (the "Notice Period") unless within that Notice Period You either agree in writing (i) to pay Respondent a mutually agreeable reasonably royalty for Your past or future use of Licensed Software made by such Respondent, or (ii) withdraw Your litigation claim with respect to Licensed Software against such Respondent. If within said Notice Period a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Licensor to You under Sections 3 and 4 automatically terminate at the expiration of said Notice Period. + + 12.3 Reasonable Value of This License. If You assert a patent infringement claim against Respondent alleging that Licensed Software directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by said Respondent under Sections 3 and 4 shall be taken into account in determining the amount or value of any payment or license. + + 12.4 No Retroactive Effect of Termination. In the event of termination under this Section all end user license agreements (excluding licenses to distributors and resellers) that have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +13.0 Miscellaneous. + + 13.1 U.S. Government End Users. The Licensed Software is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Licensed Software with only those rights set forth herein. + + 13.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture, or any other form of legal association between or among You, Licensor, or any Contributor, and You will not represent to the contrary, whether expressly, by implication, appearance, or otherwise. + + 13.3 Independent Development. Nothing in this License will impair Licensor's right to acquire, license, develop, subcontract, market, or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Extensions that You may develop, produce, market, or distribute. + + 13.4 Consent To Breach Not Waiver. Failure by Licensor or Contributor to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. + + 13.5 Severability. This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. + + 13.6 Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Licensed Software due to statute, judicial order, or regulation, then You cannot use, modify, or distribute the software. + + 13.7 Export Restrictions. You may be restricted with respect to downloading or otherwise acquiring, exporting, or reexporting the Licensed Software or any underlying information or technology by United States and other applicable laws and regulations. By downloading or by otherwise obtaining the Licensed Software, You are agreeing to be responsible for compliance with all applicable laws and regulations. + + 13.8 Arbitration, Jurisdiction & Venue. This License shall be governed by Colorado law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. You expressly agree that any dispute relating to this License shall be submitted to binding arbitration under the rules then prevailing of the American Arbitration Association. You further agree that Adams County, Colorado USA is proper venue and grant such arbitration proceeding jurisdiction as may be appropriate for purposes of resolving any dispute under this License. Judgement upon any award made in arbitration may be entered and enforced in any court of competent jurisdiction. The arbitrator shall award attorney's fees and costs of arbitration to the prevailing party. Should either party find it necessary to enforce its arbitration award or seek specific performance of such award in a civil court of competent jurisdiction, the prevailing party shall be entitled to reasonable attorney's fees and costs. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. You and Licensor expressly waive any rights to a jury trial in any litigation concerning Licensed Software or this License. Any law or regulation that provides that the language of a contract shall be construed against the drafter shall not apply to this License. + + 13.9 Entire Agreement. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. + +EXHIBIT A + +The Notice below must appear in each file of the Source Code of any copy You distribute of the Licensed Software or any Extensions thereto, except as may be modified as allowed under the terms of Section 7.1 +Copyright (C) 1999-2002 Technical Pursuit Inc., All Rights Reserved. Patent Pending, Technical Pursuit Inc. + +Unless explicitly acquired and licensed from Licensor under the Technical Pursuit License ("TPL") Version 1.0 or greater, the contents of this file are subject to the Reciprocal Public License ("RPL") Version 1.1, or subsequent versions as allowed by the RPL, and You may not copy or use this file in either source code or executable form, except in compliance with the terms and conditions of the RPL. +You may obtain a copy of both the TPL and the RPL (the "Licenses") from Technical Pursuit Inc. at http://www.technicalpursuit.com. + +All software distributed under the Licenses is provided strictly on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND TECHNICAL PURSUIT INC. HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT, OR NON-INFRINGEMENT. See the Licenses for specific language governing rights and limitations under the Licenses. diff --git a/options/license/RPSL-1.0 b/options/license/RPSL-1.0 index 5318b638a..b4ea616ce 100644 --- a/options/license/RPSL-1.0 +++ b/options/license/RPSL-1.0 @@ -2,525 +2,171 @@ RealNetworks Public Source License Version 1.0 (Rev. Date October 28, 2002) -1. General Definitions. This License applies to any program or other work -which RealNetworks, Inc., or any other entity that elects to use this license, -("Licensor") makes publicly available and which contains a notice placed by -Licensor identifying such program or work as "Original Code" and stating that -it is subject to the terms of this RealNetworks Public Source License version -1.0 (or subsequent version thereof) ("License"). You are not required to accept -this License. However, nothing else grants You permission to use, copy, modify -or distribute the software or its derivative works. These actions are prohibited -by law if You do not accept this License. Therefore, by modifying, copying -or distributing the software (or any work based on the software), You indicate -your acceptance of this License to do so, and all its terms and conditions. -In addition, you agree to the terms of this License by clicking the Accept -button or downloading the software. As used in this License: +1. General Definitions. This License applies to any program or other work which RealNetworks, Inc., or any other entity that elects to use this license, ("Licensor") makes publicly available and which contains a notice placed by Licensor identifying such program or work as "Original Code" and stating that it is subject to the terms of this RealNetworks Public Source License version 1.0 (or subsequent version thereof) ("License"). You are not required to accept this License. However, nothing else grants You permission to use, copy, modify or distribute the software or its derivative works. These actions are prohibited by law if You do not accept this License. Therefore, by modifying, copying or distributing the software (or any work based on the software), You indicate your acceptance of this License to do so, and all its terms and conditions. In addition, you agree to the terms of this License by clicking the Accept button or downloading the software. As used in this License: -1.1 "Applicable Patent Rights" mean: (a) in the case where Licensor is the -grantor of rights, claims of patents that (i) are now or hereafter acquired, -owned by or assigned to Licensor and (ii) are necessarily infringed by using -or making the Original Code alone and not in combination with other software -or hardware; and (b) in the case where You are the grantor of rights, claims -of patents that (i) are now or hereafter acquired, owned by or assigned to -You and (ii) are infringed (directly or indirectly) by using or making Your -Modifications, taken alone or in combination with Original Code. + 1.1 "Applicable Patent Rights" mean: (a) in the case where Licensor is the grantor of rights, claims of patents that (i) are now or hereafter acquired, owned by or assigned to Licensor and (ii) are necessarily infringed by using or making the Original Code alone and not in combination with other software or hardware; and (b) in the case where You are the grantor of rights, claims of patents that (i) are now or hereafter acquired, owned by or assigned to You and (ii) are infringed (directly or indirectly) by using or making Your Modifications, taken alone or in combination with Original Code. -1.2 "Compatible Source License" means any one of the licenses listed on Exhibit -B or at https://www.helixcommunity.org/content/complicense or other licenses -specifically identified by Licensor in writing. Notwithstanding any term to -the contrary in any Compatible Source License, any code covered by any Compatible -Source License that is used with Covered Code must be made readily available -in Source Code format for royalty-free use under the terms of the Compatible -Source License or this License. + 1.2 "Compatible Source License" means any one of the licenses listed on Exhibit B or at https://www.helixcommunity.org/content/complicense or other licenses specifically identified by Licensor in writing. Notwithstanding any term to the contrary in any Compatible Source License, any code covered by any Compatible Source License that is used with Covered Code must be made readily available in Source Code format for royalty-free use under the terms of the Compatible Source License or this License. -1.3 "Contributor" means any person or entity that creates or contributes to -the creation of Modifications. + 1.3 "Contributor" means any person or entity that creates or contributes to the creation of Modifications. -1.4 "Covered Code" means the Original Code, Modifications, the combination -of Original Code and any Modifications, and/or any respective portions thereof. + 1.4 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. -1.5 "Deploy" means to use, sublicense or distribute Covered Code other than -for Your internal research and development (R&D) and/or Personal Use, and -includes without limitation, any and all internal use or distribution of Covered -Code within Your business or organization except for R&D use and/or Personal -Use, as well as direct or indirect sublicensing or distribution of Covered -Code by You to any third party in any form or manner. + 1.5 "Deploy" means to use, sublicense or distribute Covered Code other than for Your internal research and development (R&D) and/or Personal Use, and includes without limitation, any and all internal use or distribution of Covered Code within Your business or organization except for R&D use and/or Personal Use, as well as direct or indirect sublicensing or distribution of Covered Code by You to any third party in any form or manner. -1.6 "Derivative Work" means either the Covered Code or any derivative work -under United States copyright law, and including any work containing or including -any portion of the Covered Code or Modifications, either verbatim or with -modifications and/or translated into another language. Derivative Work also -includes any work which combines any portion of Covered Code or Modifications -with code not otherwise governed by the terms of this License. + 1.6 "Derivative Work" means either the Covered Code or any derivative work under United States copyright law, and including any work containing or including any portion of the Covered Code or Modifications, either verbatim or with modifications and/or translated into another language. Derivative Work also includes any work which combines any portion of Covered Code or Modifications with code not otherwise governed by the terms of this License. -1.7 "Externally Deploy" means to Deploy the Covered Code in any way that may -be accessed or used by anyone other than You, used to provide any services -to anyone other than You, or used in any way to deliver any content to anyone -other than You, whether the Covered Code is distributed to those parties, -made available as an application intended for use over a computer network, -or used to provide services or otherwise deliver content to anyone other than -You. + 1.7 "Externally Deploy" means to Deploy the Covered Code in any way that may be accessed or used by anyone other than You, used to provide any services to anyone other than You, or used in any way to deliver any content to anyone other than You, whether the Covered Code is distributed to those parties, made available as an application intended for use over a computer network, or used to provide services or otherwise deliver content to anyone other than You. -1.8. "Interface" means interfaces, functions, properties, class definitions, -APIs, header files, GUIDs, V-Tables, and/or protocols allowing one piece of -software, firmware or hardware to communicate or interoperate with another -piece of software, firmware or hardware. + 1.8. "Interface" means interfaces, functions, properties, class definitions, APIs, header files, GUIDs, V-Tables, and/or protocols allowing one piece of software, firmware or hardware to communicate or interoperate with another piece of software, firmware or hardware. -1.9 "Modifications" mean any addition to, deletion from, and/or change to, -the substance and/or structure of the Original Code, any previous Modifications, -the combination of Original Code and any previous Modifications, and/or any -respective portions thereof. When code is released as a series of files, a -Modification is: (a) any addition to or deletion from the contents of a file -containing Covered Code; and/or (b) any new file or other representation of -computer program statements that contains any part of Covered Code. + 1.9 "Modifications" mean any addition to, deletion from, and/or change to, the substance and/or structure of the Original Code, any previous Modifications, the combination of Original Code and any previous Modifications, and/or any respective portions thereof. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program statements that contains any part of Covered Code. -1.10 "Original Code" means (a) the Source Code of a program or other work -as originally made available by Licensor under this License, including the -Source Code of any updates or upgrades to such programs or works made available -by Licensor under this License, and that has been expressly identified by -Licensor as such in the header file(s) of such work; and (b) the object code -compiled from such Source Code and originally made available by Licensor under -this License. + 1.10 "Original Code" means (a) the Source Code of a program or other work as originally made available by Licensor under this License, including the Source Code of any updates or upgrades to such programs or works made available by Licensor under this License, and that has been expressly identified by Licensor as such in the header file(s) of such work; and (b) the object code compiled from such Source Code and originally made available by Licensor under this License. -1.11 "Personal Use" means use of Covered Code by an individual solely for -his or her personal, private and non-commercial purposes. An individual's -use of Covered Code in his or her capacity as an officer, employee, member, -independent contractor or agent of a corporation, business or organization -(commercial or non-commercial) does not qualify as Personal Use. + 1.11 "Personal Use" means use of Covered Code by an individual solely for his or her personal, private and non-commercial purposes. An individual's use of Covered Code in his or her capacity as an officer, employee, member, independent contractor or agent of a corporation, business or organization (commercial or non-commercial) does not qualify as Personal Use. -1.12 "Source Code" means the human readable form of a program or other work -that is suitable for making modifications to it, including all modules it -contains, plus any associated interface definition files, scripts used to -control compilation and installation of an executable (object code). + 1.12 "Source Code" means the human readable form of a program or other work that is suitable for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an executable (object code). -1.13 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. + 1.13 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions -of this License, Licensor hereby grants You, effective on the date You accept -this License (via downloading or using Covered Code or otherwise indicating -your acceptance of this License), a worldwide, royalty-free, non-exclusive -copyright license, to the extent of Licensor's copyrights cover the Original -Code, to do the following: +2. Permitted Uses; Conditions & Restrictions. Subject to the terms and conditions of this License, Licensor hereby grants You, effective on the date You accept this License (via downloading or using Covered Code or otherwise indicating your acceptance of this License), a worldwide, royalty-free, non-exclusive copyright license, to the extent of Licensor's copyrights cover the Original Code, to do the following: -2.1 You may reproduce, display, perform, modify and Deploy Covered Code, provided -that in each instance: + 2.1 You may reproduce, display, perform, modify and Deploy Covered Code, provided that in each instance: -(a) You must retain and reproduce in all copies of Original Code the copyright -and other proprietary notices and disclaimers of Licensor as they appear in -the Original Code, and keep intact all notices in the Original Code that refer -to this License; + (a) You must retain and reproduce in all copies of Original Code the copyright and other proprietary notices and disclaimers of Licensor as they appear in the Original Code, and keep intact all notices in the Original Code that refer to this License; -(b) You must include a copy of this License with every copy of Source Code -of Covered Code and documentation You distribute, and You may not offer or -impose any terms on such Source Code that alter or restrict this License or -the recipients' rights hereunder, except as permitted under Section 6; + (b) You must include a copy of this License with every copy of Source Code of Covered Code and documentation You distribute, and You may not offer or impose any terms on such Source Code that alter or restrict this License or the recipients' rights hereunder, except as permitted under Section 6; -(c) You must duplicate, to the extent it does not already exist, the notice -in Exhibit A in each file of the Source Code of all Your Modifications, and -cause the modified files to carry prominent notices stating that You changed -the files and the date of any change; + (c) You must duplicate, to the extent it does not already exist, the notice in Exhibit A in each file of the Source Code of all Your Modifications, and cause the modified files to carry prominent notices stating that You changed the files and the date of any change; -(d) You must make Source Code of all Your Externally Deployed Modifications -publicly available under the terms of this License, including the license -grants set forth in Section 3 below, for as long as you Deploy the Covered -Code or twelve (12) months from the date of initial Deployment, whichever -is longer. You should preferably distribute the Source Code of Your Deployed -Modifications electronically (e.g. download from a web site); and + (d) You must make Source Code of all Your Externally Deployed Modifications publicly available under the terms of this License, including the license grants set forth in Section 3 below, for as long as you Deploy the Covered Code or twelve (12) months from the date of initial Deployment, whichever is longer. You should preferably distribute the Source Code of Your Deployed Modifications electronically (e.g. download from a web site); and -(e) if You Deploy Covered Code in object code, executable form only, You must -include a prominent notice, in the code itself as well as in related documentation, -stating that Source Code of the Covered Code is available under the terms -of this License with information on how and where to obtain such Source Code. -You must also include the Object Code Notice set forth in Exhibit A in the -"about" box or other appropriate place where other copyright notices are placed, -including any packaging materials. + (e) if You Deploy Covered Code in object code, executable form only, You must include a prominent notice, in the code itself as well as in related documentation, stating that Source Code of the Covered Code is available under the terms of this License with information on how and where to obtain such Source Code. You must also include the Object Code Notice set forth in Exhibit A in the "about" box or other appropriate place where other copyright notices are placed, including any packaging materials. -2.2 You expressly acknowledge and agree that although Licensor and each Contributor -grants the licenses to their respective portions of the Covered Code set forth -herein, no assurances are provided by Licensor or any Contributor that the -Covered Code does not infringe the patent or other intellectual property rights -of any other entity. Licensor and each Contributor disclaim any liability -to You for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, You hereby assume sole responsibility to secure -any other intellectual property rights needed, if any. For example, if a third -party patent license is required to allow You to make, use, sell, import or -offer for sale the Covered Code, it is Your responsibility to acquire such -license(s). + 2.2 You expressly acknowledge and agree that although Licensor and each Contributor grants the licenses to their respective portions of the Covered Code set forth herein, no assurances are provided by Licensor or any Contributor that the Covered Code does not infringe the patent or other intellectual property rights of any other entity. Licensor and each Contributor disclaim any liability to You for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, You hereby assume sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow You to make, use, sell, import or offer for sale the Covered Code, it is Your responsibility to acquire such license(s). -2.3 Subject to the terms and conditions of this License, Licensor hereby grants -You, effective on the date You accept this License (via downloading or using -Covered Code or otherwise indicating your acceptance of this License), a worldwide, -royalty-free, perpetual, non-exclusive patent license under Licensor's Applicable -Patent Rights to make, use, sell, offer for sale and import the Covered Code, -provided that in each instance you comply with the terms of this License. + 2.3 Subject to the terms and conditions of this License, Licensor hereby grants You, effective on the date You accept this License (via downloading or using Covered Code or otherwise indicating your acceptance of this License), a worldwide, royalty-free, perpetual, non-exclusive patent license under Licensor's Applicable Patent Rights to make, use, sell, offer for sale and import the Covered Code, provided that in each instance you comply with the terms of this License. -3. Your Grants. In consideration of, and as a condition to, the licenses granted -to You under this License: +3. Your Grants. In consideration of, and as a condition to, the licenses granted to You under this License: -(a) You grant to Licensor and all third parties a non-exclusive, perpetual, -irrevocable, royalty free license under Your Applicable Patent Rights and -other intellectual property rights owned or controlled by You, to make, sell, -offer for sale, use, import, reproduce, display, perform, modify, distribute -and Deploy Your Modifications of the same scope and extent as Licensor's licenses -under Sections 2.1 and 2.2; and + (a) You grant to Licensor and all third parties a non-exclusive, perpetual, irrevocable, royalty free license under Your Applicable Patent Rights and other intellectual property rights owned or controlled by You, to make, sell, offer for sale, use, import, reproduce, display, perform, modify, distribute and Deploy Your Modifications of the same scope and extent as Licensor's licenses under Sections 2.1 and 2.2; and -(b) You grant to Licensor and its subsidiaries a non-exclusive, worldwide, -royalty-free, perpetual and irrevocable license, under Your Applicable Patent -Rights and other intellectual property rights owned or controlled by You, -to make, use, sell, offer for sale, import, reproduce, display, perform, distribute, -modify or have modified (for Licensor and/or its subsidiaries), sublicense -and distribute Your Modifications, in any form and for any purpose, through -multiple tiers of distribution. + (b) You grant to Licensor and its subsidiaries a non-exclusive, worldwide, royalty-free, perpetual and irrevocable license, under Your Applicable Patent Rights and other intellectual property rights owned or controlled by You, to make, use, sell, offer for sale, import, reproduce, display, perform, distribute, modify or have modified (for Licensor and/or its subsidiaries), sublicense and distribute Your Modifications, in any form and for any purpose, through multiple tiers of distribution. -(c) You agree not use any information derived from Your use and review of -the Covered Code, including but not limited to any algorithms or inventions -that may be contained in the Covered Code, for the purpose of asserting any -of Your patent rights, or assisting a third party to assert any of its patent -rights, against Licensor or any Contributor. + (c) You agree not use any information derived from Your use and review of the Covered Code, including but not limited to any algorithms or inventions that may be contained in the Covered Code, for the purpose of asserting any of Your patent rights, or assisting a third party to assert any of its patent rights, against Licensor or any Contributor. -4. Derivative Works. You may create a Derivative Work by combining Covered -Code with other code not otherwise governed by the terms of this License and -distribute the Derivative Work as an integrated product. In each such instance, -You must make sure the requirements of this License are fulfilled for the -Covered Code or any portion thereof, including all Modifications. +4. Derivative Works. You may create a Derivative Work by combining Covered Code with other code not otherwise governed by the terms of this License and distribute the Derivative Work as an integrated product. In each such instance, You must make sure the requirements of this License are fulfilled for the Covered Code or any portion thereof, including all Modifications. -4.1 You must cause any Derivative Work that you distribute, publish or Externally -Deploy, that in whole or in part contains or is derived from the Covered Code -or any part thereof, to be licensed as a whole at no charge to all third parties -under the terms of this License and no other license except as provided in -Section 4.2. You also must make Source Code available for the Derivative Work -under the same terms as Modifications, described in Sections 2 and 3, above. + 4.1 You must cause any Derivative Work that you distribute, publish or Externally Deploy, that in whole or in part contains or is derived from the Covered Code or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License and no other license except as provided in Section 4.2. You also must make Source Code available for the Derivative Work under the same terms as Modifications, described in Sections 2 and 3, above. -4.2 Compatible Source Licenses. Software modules that have been independently -developed without any use of Covered Code and which contain no portion of -the Covered Code, Modifications or other Derivative Works, but are used or -combined in any way with the Covered Code or any Derivative Work to form a -larger Derivative Work, are exempt from the conditions described in Section -4.1 but only to the extent that: the software module, including any software -that is linked to, integrated with, or part of the same applications as, the -software module by any method must be wholly subject to one of the Compatible -Source Licenses. Notwithstanding the foregoing, all Covered Code must be subject -to the terms of this License. Thus, the entire Derivative Work must be licensed -under a combination of the RPSL (for Covered Code) and a Compatible Source -License for any independently developed software modules within the Derivative -Work. The foregoing requirement applies even if the Compatible Source License -would ordinarily allow the software module to link with, or form larger works -with, other software that is not subject to the Compatible Source License. -For example, although the Mozilla Public License v1.1 allows Mozilla code -to be combined with proprietary software that is not subject to the MPL, if -MPL-licensed code is used with Covered Code the MPL-licensed code could not -be combined or linked with any code not governed by the MPL. The general intent -of this section 4.2 is to enable use of Covered Code with applications that -are wholly subject to an acceptable open source license. You are responsible -for determining whether your use of software with Covered Code is allowed -under Your license to such software. + 4.2 Compatible Source Licenses. Software modules that have been independently developed without any use of Covered Code and which contain no portion of the Covered Code, Modifications or other Derivative Works, but are used or combined in any way with the Covered Code or any Derivative Work to form a larger Derivative Work, are exempt from the conditions described in Section 4.1 but only to the extent that: the software module, including any software that is linked to, integrated with, or part of the same applications as, the software module by any method must be wholly subject to one of the Compatible Source Licenses. Notwithstanding the foregoing, all Covered Code must be subject to the terms of this License. Thus, the entire Derivative Work must be licensed under a combination of the RPSL (for Covered Code) and a Compatible Source License for any independently developed software modules within the Derivative Work. The foregoing requirement applies even if the Compatible Source License would ordinarily allow the software module to link with, or form larger works with, other software that is not subject to the Compatible Source License. For example, although the Mozilla Public License v1.1 allows Mozilla code to be combined with proprietary software that is not subject to the MPL, if MPL-licensed code is used with Covered Code the MPL-licensed code could not be combined or linked with any code not governed by the MPL. The general intent of this section 4.2 is to enable use of Covered Code with applications that are wholly subject to an acceptable open source license. You are responsible for determining whether your use of software with Covered Code is allowed under Your license to such software. -4.3 Mere aggregation of another work not based on the Covered Code with the -Covered Code (or with a work based on the Covered Code) on a volume of a storage -or distribution medium does not bring the other work under the scope of this -License. If You deliver the Covered Code for combination and/or integration -with an application previously provided by You (for example, via automatic -updating technology), such combination and/or integration constitutes a Derivative -Work subject to the terms of this License. + 4.3 Mere aggregation of another work not based on the Covered Code with the Covered Code (or with a work based on the Covered Code) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. If You deliver the Covered Code for combination and/or integration with an application previously provided by You (for example, via automatic updating technology), such combination and/or integration constitutes a Derivative Work subject to the terms of this License. -5. Exclusions From License Grant. Nothing in this License shall be deemed -to grant any rights to trademarks, copyrights, patents, trade secrets or any -other intellectual property of Licensor or any Contributor except as expressly -stated herein. No right is granted to the trademarks of Licensor or any Contributor -even if such marks are included in the Covered Code. Nothing in this License -shall be interpreted to prohibit Licensor from licensing under different terms -from this License any code that Licensor otherwise would have a right to license. -Modifications, Derivative Works and/or any use or combination of Covered Code -with other technology provided by Licensor or third parties may require additional -patent licenses from Licensor which Licensor may grant in its sole discretion. -No patent license is granted separate from the Original Code or combinations -of the Original Code with other software or hardware. +5. Exclusions From License Grant. Nothing in this License shall be deemed to grant any rights to trademarks, copyrights, patents, trade secrets or any other intellectual property of Licensor or any Contributor except as expressly stated herein. No right is granted to the trademarks of Licensor or any Contributor even if such marks are included in the Covered Code. Nothing in this License shall be interpreted to prohibit Licensor from licensing under different terms from this License any code that Licensor otherwise would have a right to license. Modifications, Derivative Works and/or any use or combination of Covered Code with other technology provided by Licensor or third parties may require additional patent licenses from Licensor which Licensor may grant in its sole discretion. No patent license is granted separate from the Original Code or combinations of the Original Code with other software or hardware. -5.1. Trademarks. This License does not grant any rights to use the trademarks -or trade names owned by Licensor ("Licensor Marks" defined in Exhibit C) or -to any trademark or trade name belonging to any Contributor. No Licensor Marks -may be used to endorse or promote products derived from the Original Code -other than as permitted by the Licensor Trademark Policy defined in Exhibit -C. + 5.1. Trademarks. This License does not grant any rights to use the trademarks or trade names owned by Licensor ("Licensor Marks" defined in Exhibit C) or to any trademark or trade name belonging to any Contributor. No Licensor Marks may be used to endorse or promote products derived from the Original Code other than as permitted by the Licensor Trademark Policy defined in Exhibit C. -6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, -support, indemnity or liability obligations and/or other rights consistent -with the scope of the license granted herein ("Additional Terms") to one or -more recipients of Covered Code. However, You may do so only on Your own behalf -and as Your sole responsibility, and not on behalf of Licensor or any Contributor. -You must obtain the recipient's agreement that any such Additional Terms are -offered by You alone, and You hereby agree to indemnify, defend and hold Licensor -and every Contributor harmless for any liability incurred by or claims asserted -against Licensor or such Contributor by reason of any such Additional Terms. +6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with the scope of the license granted herein ("Additional Terms") to one or more recipients of Covered Code. However, You may do so only on Your own behalf and as Your sole responsibility, and not on behalf of Licensor or any Contributor. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold Licensor and every Contributor harmless for any liability incurred by or claims asserted against Licensor or such Contributor by reason of any such Additional Terms. -7. Versions of the License. Licensor may publish revised and/or new versions -of this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular version -of this License, You may continue to use it under the terms of that version. -You may also choose to use such Original Code under the terms of any subsequent -version of this License published by Licensor. No one other than Licensor -has the right to modify the terms applicable to Covered Code created under -this License. +7. Versions of the License. Licensor may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once Original Code has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of this License published by Licensor. No one other than Licensor has the right to modify the terms applicable to Covered Code created under this License. -8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Covered Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Covered Code, or any portion thereof, is at Your sole and entire risk. THE -COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT -OF ANY KIND AND LICENSOR AND LICENSOR'S LICENSOR(S) (COLLECTIVELY REFERRED -TO AS "LICENSOR" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS -EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, -OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, -OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. LICENSOR AND -EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT -OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL -MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED -OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL -OR WRITTEN DOCUMENTATION, INFORMATION OR ADVICE GIVEN BY LICENSOR, A LICENSOR -AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You -acknowledge that the Covered Code is not intended for use in high risk activities, -including, but not limited to, the design, construction, operation or maintenance -of nuclear facilities, aircraft navigation, aircraft communication systems, -or air traffic control machines in which case the failure of the Covered Code -could lead to death, personal injury, or severe physical or environmental -damage. Licensor disclaims any express or implied warranty of fitness for -such uses. +8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part pre-release, untested, or not fully tested works. The Covered Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the Covered Code, or any portion thereof, is at Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND LICENSOR AND LICENSOR'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "LICENSOR" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. LICENSOR AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN DOCUMENTATION, INFORMATION OR ADVICE GIVEN BY LICENSOR, A LICENSOR AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended for use in high risk activities, including, but not limited to, the design, construction, operation or maintenance of nuclear facilities, aircraft navigation, aircraft communication systems, or air traffic control machines in which case the failure of the Covered Code could lead to death, personal injury, or severe physical or environmental damage. Licensor disclaims any express or implied warranty of fitness for such uses. -9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT -SHALL LICENSOR OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT -OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR -USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER -UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE OR STRICT -LIABILITY), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF LICENSOR OR SUCH CONTRIBUTOR -HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE -FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW -THE LIMITATION OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS -LIMITATION MAY NOT APPLY TO YOU. In no event shall Licensor's total liability -to You for all damages (other than as may be required by applicable law) under -this License exceed the amount of ten dollars ($10.00). +9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT SHALL LICENSOR OR ANY CONTRIBUTOR BE LIABLE FOR ANY INCIDENTAL, SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE OR STRICT LIABILITY), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF LICENSOR OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION MAY NOT APPLY TO YOU. In no event shall Licensor's total liability to You for all damages (other than as may be required by applicable law) under this License exceed the amount of ten dollars ($10.00). -10. Ownership. Subject to the licenses granted under this License, each Contributor -retains all rights, title and interest in and to any Modifications made by -such Contributor. Licensor retains all rights, title and interest in and to -the Original Code and any Modifications made by or on behalf of Licensor ("Licensor -Modifications"), and such Licensor Modifications will not be automatically -subject to this License. Licensor may, at its sole discretion, choose to license -such Licensor Modifications under this License, or on different terms from -those contained in this License or may choose not to license them at all. +10. Ownership. Subject to the licenses granted under this License, each Contributor retains all rights, title and interest in and to any Modifications made by such Contributor. Licensor retains all rights, title and interest in and to the Original Code and any Modifications made by or on behalf of Licensor ("Licensor Modifications"), and such Licensor Modifications will not be automatically subject to this License. Licensor may, at its sole discretion, choose to license such Licensor Modifications under this License, or on different terms from those contained in this License or may choose not to license them at all. - 11. Termination. +11. Termination. -11.1 Term and Termination. The term of this License is perpetual unless terminated -as provided below. This License and the rights granted hereunder will terminate: + 11.1 Term and Termination. The term of this License is perpetual unless terminated as provided below. This License and the rights granted hereunder will terminate: -(a) automatically without notice from Licensor if You fail to comply with -any term(s) of this License and fail to cure such breach within 30 days of -becoming aware of such breach; + (a) automatically without notice from Licensor if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach; -(b) immediately in the event of the circumstances described in Section 12.5(b); -or + (b) immediately in the event of the circumstances described in Section 12.5(b); or -(c) automatically without notice from Licensor if You, at any time during -the term of this License, commence an action for patent infringement against -Licensor (including by cross-claim or counter claim in a lawsuit); + (c) automatically without notice from Licensor if You, at any time during the term of this License, commence an action for patent infringement against Licensor (including by cross-claim or counter claim in a lawsuit); -(d) upon written notice from Licensor if You, at any time during the term -of this License, commence an action for patent infringement against any third -party alleging that the Covered Code itself (excluding combinations with other -software or hardware) infringes any patent (including by cross-claim or counter -claim in a lawsuit). + (d) upon written notice from Licensor if You, at any time during the term of this License, commence an action for patent infringement against any third party alleging that the Covered Code itself (excluding combinations with other software or hardware) infringes any patent (including by cross-claim or counter claim in a lawsuit). -11.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification, sublicensing and distribution -of the Covered Code and to destroy all copies of the Covered Code that are -in your possession or control. All sublicenses to the Covered Code which have -been properly granted prior to termination shall survive any termination of -this License. Provisions which, by their nature, should remain in effect beyond -the termination of this License shall survive, including but not limited to -Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other -for compensation, indemnity or damages of any sort solely as a result of terminating -this License in accordance with its terms, and termination of this License -will be without prejudice to any other right or remedy of any party. + 11.2 Effect of Termination. Upon termination, You agree to immediately stop any further use, reproduction, modification, sublicensing and distribution of the Covered Code and to destroy all copies of the Covered Code that are in your possession or control. All sublicenses to the Covered Code which have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nature, should remain in effect beyond the termination of this License shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for compensation, indemnity or damages of any sort solely as a result of terminating this License in accordance with its terms, and termination of this License will be without prejudice to any other right or remedy of any party. - 12. Miscellaneous. +12. Miscellaneous. -12.1 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered -Code include only those rights customarily provided to the public as defined -in this License. This customary commercial license in technical data and software -is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer -Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical -Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End -Users acquire Covered Code with only those rights set forth herein. + 12.1 Government End Users. The Covered Code is a "commercial item" as defined in FAR 2.101. Government software and technical data rights in the Covered Code include only those rights customarily provided to the public as defined in this License. This customary commercial license in technical data and software is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -12.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between or among You, Licensor or any Contributor, and You will not represent -to the contrary, whether expressly, by implication, appearance or otherwise. + 12.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between or among You, Licensor or any Contributor, and You will not represent to the contrary, whether expressly, by implication, appearance or otherwise. -12.3 Independent Development. Nothing in this License will impair Licensor's -right to acquire, license, develop, have others develop for it, market and/or -distribute technology or products that perform the same or similar functions -as, or otherwise compete with, Modifications, Derivative Works, technology -or products that You may develop, produce, market or distribute. + 12.3 Independent Development. Nothing in this License will impair Licensor's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Derivative Works, technology or products that You may develop, produce, market or distribute. -12.4 Waiver; Construction. Failure by Licensor or any Contributor to enforce -any provision of this License will not be deemed a waiver of future enforcement -of that or any other provision. Any law or regulation which provides that -the language of a contract shall be construed against the drafter will not -apply to this License. + 12.4 Waiver; Construction. Failure by Licensor or any Contributor to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. Any law or regulation which provides that the language of a contract shall be construed against the drafter will not apply to this License. -12.5 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the remainder -of this License will continue in full force and effect. (b) Notwithstanding -the foregoing, if applicable law prohibits or restricts You from fully and/or -specifically complying with Sections 2 and/or 3 or prevents the enforceability -of either of those Sections, this License will immediately terminate and You -must immediately discontinue any use of the Covered Code and destroy all copies -of it that are in your possession or control. + 12.5 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. -12.6 Dispute Resolution. Any litigation or other dispute resolution between -You and Licensor relating to this License shall take place in the Seattle, -Washington, and You and Licensor hereby consent to the personal jurisdiction -of, and venue in, the state and federal courts within that District with respect -to this License. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. + 12.6 Dispute Resolution. Any litigation or other dispute resolution between You and Licensor relating to this License shall take place in the Seattle, Washington, and You and Licensor hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. -12.7 Export/Import Laws. This software is subject to all export and import -laws and restrictions and regulations of the country in which you receive -the Covered Code and You are solely responsible for ensuring that You do not -export, re-export or import the Covered Code or any direct product thereof -in violation of any such restrictions, laws or regulations, or without all -necessary authorizations. + 12.7 Export/Import Laws. This software is subject to all export and import laws and restrictions and regulations of the country in which you receive the Covered Code and You are solely responsible for ensuring that You do not export, re-export or import the Covered Code or any direct product thereof in violation of any such restrictions, laws or regulations, or without all necessary authorizations. + + 12.8 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. This License shall be governed by the laws of the United States and the State of Washington. + + Where You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties ont exigé que le présent contrat et tous les documents connexes soient rédigés en anglais. -12.8 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -Washington. -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exigé que -le présent contrat et tous les documents connexes soient rédigés en anglais. EXHIBIT A. -"Copyright (c) 1995-2002 RealNetworks, Inc. and/or its licensors. All Rights -Reserved. +"Copyright (c) 1995-2002 RealNetworks, Inc. and/or its licensors. All Rights Reserved. -The contents of this file, and the files included with this file, are subject -to the current version of the RealNetworks Public Source License Version 1.0 -(the "RPSL") available at https://www.helixcommunity.org/content/rpsl unless -you have licensed the file under the RealNetworks Community Source License -Version 1.0 (the "RCSL") available at https://www.helixcommunity.org/content/rcsl, -in which case the RCSL will apply. You may also obtain the license terms directly -from RealNetworks. You may not use this file except in compliance with the -RPSL or, if you have a valid RCSL with RealNetworks applicable to this file, -the RCSL. Please see the applicable RPSL or RCSL for the rights, obligations -and limitations governing use of the contents of the file. +The contents of this file, and the files included with this file, are subject to the current version of the RealNetworks Public Source License Version 1.0 (the "RPSL") available at https://www.helixcommunity.org/content/rpsl unless you have licensed the file under the RealNetworks Community Source License Version 1.0 (the "RCSL") available at https://www.helixcommunity.org/content/rcsl, in which case the RCSL will apply. You may also obtain the license terms directly from RealNetworks. You may not use this file except in compliance with the RPSL or, if you have a valid RCSL with RealNetworks applicable to this file, the RCSL. Please see the applicable RPSL or RCSL for the rights, obligations and limitations governing use of the contents of the file. -This file is part of the Helix DNA Technology. RealNetworks is the developer -of the Original code and owns the copyrights in the portions it created. +This file is part of the Helix DNA Technology. RealNetworks is the developer of the Original code and owns the copyrights in the portions it created. -This file, and the files included with this file, is distributed and made -available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS -OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING -WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. +This file, and the files included with this file, is distributed and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Contributor(s): ____________________________________ -Technology Compatibility Kit Test Suite(s) Location (if licensed under the -RCSL): _____" +Technology Compatibility Kit Test Suite(s) Location (if licensed under the RCSL): -Object Code Notice: Helix DNA Client technology included. Copyright (c) RealNetworks, -Inc., 1995-2002. All rights reserved. +________________________________" + +Object Code Notice: Helix DNA Client technology included. Copyright (c) RealNetworks, Inc., 1995-2002. All rights reserved. EXHIBIT B -Compatible Source Licenses for the RealNetworks Public Source License. The -following list applies to the most recent version of the license as of October -25, 2002, unless otherwise indicated. +Compatible Source Licenses for the RealNetworks Public Source License. The following list applies to the most recent version of the license as of October 25, 2002, unless otherwise indicated. Academic Free License - Apache Software License - Apple Public Source License - Artistic license - Attribution Assurance Licenses - BSD license - Common Public License1 - Eiffel Forum License - GNU General Public License (GPL)1 - GNU Library or "Lesser" General Public License (LGPL)1 - IBM Public License - Intel Open Source License - Jabber Open Source License - MIT license - MITRE Collaborative Virtual Workspace License (CVW License) - Motosoto License - Mozilla Public License 1.0 (MPL) - Mozilla Public License 1.1 (MPL) - Nokia Open Source License - Open Group Test Suite License - Python Software Foundation License - Ricoh Source Code Public License - Sun Industry Standards Source License (SISSL) - Sun Public License - University of Illinois/NCSA Open Source License - Vovida Software License v. 1.0 - W3C License - X.Net License - Zope Public License - zlib/libpng license -1Note: because this license contains certain reciprocal licensing terms that -purport to extend to independently developed code, You may be prohibited under -the terms of this otherwise compatible license from using code licensed under -its terms with Covered Code because Covered Code may only be licensed under -the RealNetworks Public Source License. Any attempt to apply non RPSL license -terms, including without limitation the GPL, to Covered Code is expressly -forbidden. You are responsible for ensuring that Your use of Compatible Source -Licensed code does not violate either the RPSL or the Compatible Source License. +1Note: because this license contains certain reciprocal licensing terms that purport to extend to independently developed code, You may be prohibited under the terms of this otherwise compatible license from using code licensed under its terms with Covered Code because Covered Code may only be licensed under the RealNetworks Public Source License. Any attempt to apply non RPSL license terms, including without limitation the GPL, to Covered Code is expressly forbidden. You are responsible for ensuring that Your use of Compatible Source Licensed code does not violate either the RPSL or the Compatible Source License. The latest version of this list can be found at: https://www.helixcommunity.org/content/complicense @@ -528,11 +174,6 @@ EXHIBIT C RealNetworks' Trademark policy. -RealNetworks defines the following trademarks collectively as "Licensor Trademarks": -"RealNetworks", "RealPlayer", "RealJukebox", "RealSystem", "RealAudio", "RealVideo", -"RealOne Player", "RealMedia", "Helix" or any other trademarks or trade names -belonging to RealNetworks. +RealNetworks defines the following trademarks collectively as "Licensor Trademarks": "RealNetworks", "RealPlayer", "RealJukebox", "RealSystem", "RealAudio", "RealVideo", "RealOne Player", "RealMedia", "Helix" or any other trademarks or trade names belonging to RealNetworks. -RealNetworks "Licensor Trademark Policy" forbids any use of Licensor Trademarks -except as permitted by and in strict compliance at all times with RealNetworks' -third party trademark usage guidelines which are posted at www.realnetworks.com/info/helixlogo.html. +RealNetworks "Licensor Trademark Policy" forbids any use of Licensor Trademarks except as permitted by and in strict compliance at all times with RealNetworks' third party trademark usage guidelines which are posted at www.realnetworks.com/info/helixlogo.html. diff --git a/options/license/RSA-MD b/options/license/RSA-MD index 0c1cff45c..a8be92883 100644 --- a/options/license/RSA-MD +++ b/options/license/RSA-MD @@ -1,16 +1,9 @@ Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. -License to copy and use this software is granted provided that it is identified -as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material -mentioning or referencing this software or this function. +License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. -License is also granted to make and use derivative works provided that such -works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest -Algorithm" in all material mentioning or referencing the derived work. +License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. -RSA Data Security, Inc. makes no representations concerning either the merchantability -of this software or the suitability of this software for any particular purpose. -It is provided "as is" without express or implied warranty of any kind. +RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. -These notices must be retained in any copies of any part of this documentation -and/or software. +These notices must be retained in any copies of any part of this documentation and/or software. diff --git a/options/license/RSCPL b/options/license/RSCPL index dd9d1f070..832920e95 100644 --- a/options/license/RSCPL +++ b/options/license/RSCPL @@ -1,360 +1,128 @@ Ricoh Source Code Public License - Version 1.0 - 1. Definitions. +1. Definitions. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Electronic Distribution Mechanism" means a website or any other mechanism -generally accepted in the software development community for the electronic -transfer of data. + 1.3. "Electronic Distribution Mechanism" means a website or any other mechanism generally accepted in the software development community for the electronic transfer of data. -1.4. "Executable Code" means Governed Code in any form other than Source Code. + 1.4. "Executable Code" means Governed Code in any form other than Source Code. -1.5. "Governed Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.5. "Governed Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.6. "Larger Work" means a work which combines Governed Code or portions thereof -with code not governed by the terms of this License. + 1.6. "Larger Work" means a work which combines Governed Code or portions thereof with code not governed by the terms of this License. -1.7. "Licensable" means the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. + 1.7. "Licensable" means the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Governed Code is released as a series of files, a Modification is: + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Governed Code is released as a series of files, a Modification is: -(a) Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + (a) Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -(b) Any new file that contains any part of the Original Code or previous Modifications. + (b) Any new file that contains any part of the Original Code or previous Modifications. -1.10. "Original Code" means the "Platform for Information Applications" Source -Code as released under this License by RSV. + 1.10. "Original Code" means the "Platform for Information Applications" Source Code as released under this License by RSV. -1.11 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by the grantor of a license thereto. + 1.11 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by the grantor of a license thereto. -1.12. "RSV" means Ricoh Silicon Valley, Inc., a California corporation with -offices at 2882 Sand Hill Road, Suite 115, Menlo Park, CA 94025-7022. + 1.12. "RSV" means Ricoh Silicon Valley, Inc., a California corporation with offices at 2882 Sand Hill Road, Suite 115, Menlo Park, CA 94025-7022. -1.13. "Source Code" means the preferred form of the Governed Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of Executable Code, or a list of source code differential comparisons against -either the Original Code or another well known, available Governed Code of -the Contributor's choice. The Source Code can be in a compressed or archival -form, provided the appropriate decompression or de-archiving software is widely -available for no charge. + 1.13. "Source Code" means the preferred form of the Governed Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of Executable Code, or a list of source code differential comparisons against either the Original Code or another well known, available Governed Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.14. "You" means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of fifty percent (50%) or more -of the outstanding shares or beneficial ownership of such entity. + 1.14. "You" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. - 2. Source Code License. +2. Source Code License. -2.1. Grant from RSV. RSV hereby grants You a worldwide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: + 2.1. Grant from RSV. RSV hereby grants You a worldwide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) to use, reproduce, modify, create derivative works of, display, perform, -sublicense and distribute the Original Code (or portions thereof) with or -without Modifications, or as part of a Larger Work; and + (a) to use, reproduce, modify, create derivative works of, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, or as part of a Larger Work; and -(b) under Patent Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). + (b) under Patent Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). -2.2. Contributor Grant. Each Contributor hereby grants You a worldwide, royalty-free, -non-exclusive license, subject to third party intellectual property claims: + 2.2. Contributor Grant. Each Contributor hereby grants You a worldwide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -(a) to use, reproduce, modify, create derivative works of, display, perform, -sublicense and distribute the Modifications created by such Contributor (or -portions thereof) either on an unmodified basis, with other Modifications, -as Governed Code or as part of a Larger Work; and + (a) to use, reproduce, modify, create derivative works of, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Governed Code or as part of a Larger Work; and -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: (i) Modifications made by that Contributor -(or portions thereof); and (ii) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: (i) Modifications made by that Contributor (or portions thereof); and (ii) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). - 3. Distribution Obligations. +3. Distribution Obligations. -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Governed Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Governed Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable Code version -or via an Electronic Distribution Mechanism to anyone to whom you made an -Executable Code version available; and if made available via an Electronic -Distribution Mechanism, must remain available for at least twelve (12) months -after the date it initially became available, or at least six (6) months after -a subsequent version of that particular Modification has been made available -to such recipients. You are responsible for ensuring that the Source Code -version remains available even if the Electronic Distribution Mechanism is -maintained by a third party. + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable Code version or via an Electronic Distribution Mechanism to anyone to whom you made an Executable Code version available; and if made available via an Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -3.3. Description of Modifications. You must cause all Governed Code to which -you contribute to contain a file documenting the changes You made to create -that Governed Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by RSV and including the name of RSV in (a) the Source Code, -and (b) in any notice in an Executable Code version or related documentation -in which You describe the origin or ownership of the Governed Code. + 3.3. Description of Modifications. You must cause all Governed Code to which you contribute to contain a file documenting the changes You made to create that Governed Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by RSV and including the name of RSV in (a) the Source Code, and (b) in any notice in an Executable Code version or related documentation in which You describe the origin or ownership of the Governed Code. - 3.4. Intellectual Property Matters. + 3.4. Intellectual Property Matters. -3.4.1. Third Party Claims. If You have knowledge that a party claims an intellectual -property right in particular functionality or code (or its utilization under -this License), you must include a text file with the source code distribution -titled "LEGAL" which describes the claim and the party making the claim in -sufficient detail that a recipient will know whom to contact. If you obtain -such knowledge after You make Your Modification available as described in -Section 3.2, You shall promptly modify the LEGAL file in all copies You make -available thereafter and shall take other steps (such as notifying RSV and -appropriate mailing lists or newsgroups) reasonably calculated to inform those -who received the Governed Code that new knowledge has been obtained. In the -event that You are a Contributor, You represent that, except as disclosed -in the LEGAL file, your Modifications are your original creations and, to -the best of your knowledge, no third party has any claim (including but not -limited to intellectual property claims) relating to your Modifications. You -represent that the LEGAL file includes complete details of any license or -other restriction associated with any part of your Modifications. + 3.4.1. Third Party Claims. If You have knowledge that a party claims an intellectual property right in particular functionality or code (or its utilization under this License), you must include a text file with the source code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If you obtain such knowledge after You make Your Modification available as described in Section 3.2, You shall promptly modify the LEGAL file in all copies You make available thereafter and shall take other steps (such as notifying RSV and appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Governed Code that new knowledge has been obtained. In the event that You are a Contributor, You represent that, except as disclosed in the LEGAL file, your Modifications are your original creations and, to the best of your knowledge, no third party has any claim (including but not limited to intellectual property claims) relating to your Modifications. You represent that the LEGAL file includes complete details of any license or other restriction associated with any part of your Modifications. -3.4.2. Contributor APIs. If Your Modification is an application programming -interface and You own or control patents which are reasonably necessary to -implement that API, you must also include this information in the LEGAL file. + 3.4.2. Contributor APIs. If Your Modification is an application programming interface and You own or control patents which are reasonably necessary to implement that API, you must also include this information in the LEGAL file. -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code, and this License in any documentation for the Source -Code, where You describe recipients' rights relating to Governed Code. If -You created one or more Modification(s), You may add your name as a Contributor -to the notice described in Exhibit A. If it is not possible to put such notice -in a particular Source Code file due to its structure, then you must include -such notice in a location (such as a relevant directory file) where a user -would be likely to look for such a notice. You may choose to offer, and to -charge a fee for, warranty, support, indemnity or liability obligations to -one or more recipients of Governed Code. However, You may do so only on Your -own behalf, and not on behalf of RSV or any Contributor. You must make it -absolutely clear than any such warranty, support, indemnity or liability obligation -is offered by You alone, and You hereby agree to indemnify RSV and every Contributor -for any liability incurred by RSV or such Contributor as a result of warranty, -support, indemnity or liability terms You offer. + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code, and this License in any documentation for the Source Code, where You describe recipients' rights relating to Governed Code. If You created one or more Modification(s), You may add your name as a Contributor to the notice described in Exhibit A. If it is not possible to put such notice in a particular Source Code file due to its structure, then you must include such notice in a location (such as a relevant directory file) where a user would be likely to look for such a notice. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Governed Code. However, You may do so only on Your own behalf, and not on behalf of RSV or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify RSV and every Contributor for any liability incurred by RSV or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -3.6. Distribution of Executable Code Versions. You may distribute Governed -Code in Executable Code form only if the requirements of Section 3.1-3.5 have -been met for that Governed Code, and if You include a prominent notice stating -that the Source Code version of the Governed Code is available under the terms -of this License, including a description of how and where You have fulfilled -the obligations of Section 3.2. The notice must be conspicuously included -in any notice in an Executable Code version, related documentation or collateral -in which You describe recipients' rights relating to the Governed Code. You -may distribute the Executable Code version of Governed Code under a license -of Your choice, which may contain terms different from this License, provided -that You are in compliance with the terms of this License and that the license -for the Executable Code version does not attempt to limit or alter the recipient's -rights in the Source Code version from the rights set forth in this License. -If You distribute the Executable Code version under a different license You -must make it absolutely clear that any terms which differ from this License -are offered by You alone, not by RSV or any Contributor. You hereby agree -to indemnify RSV and every Contributor for any liability incurred by RSV or -such Contributor as a result of any such terms You offer. + 3.6. Distribution of Executable Code Versions. You may distribute Governed Code in Executable Code form only if the requirements of Section 3.1-3.5 have been met for that Governed Code, and if You include a prominent notice stating that the Source Code version of the Governed Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable Code version, related documentation or collateral in which You describe recipients' rights relating to the Governed Code. You may distribute the Executable Code version of Governed Code under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable Code version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable Code version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by RSV or any Contributor. You hereby agree to indemnify RSV and every Contributor for any liability incurred by RSV or such Contributor as a result of any such terms You offer. -3.7. Larger Works. You may create a Larger Work by combining Governed Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Governed Code. + 3.7. Larger Works. You may create a Larger Work by combining Governed Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Governed Code. - 4. Inability to Comply Due to Statute or Regulation. +4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of theterms of this License with respect to some or all of the Governed Code due to statute or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -If it is impossible for You to comply with any of theterms of this License -with respect to some or all of the Governed Code due to statute or regulation -then You must: (a) comply with the terms of this License to the maximum extent -possible; and (b) describe the limitations and the code they affect. Such -description must be included in the LEGAL file described in Section 3.4 and -must be included with all distributions of the Source Code. Except to the -extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. +5. Trademark Usage. - 5. Trademark Usage. + 5.1. Advertising Materials. All advertising materials mentioning features or use of the Governed Code must display the following acknowledgement: "This product includes software developed by Ricoh Silicon Valley, Inc." -5.1. Advertising Materials. All advertising materials mentioning features -or use of the Governed Code must display the following acknowledgement: "This -product includes software developed by Ricoh Silicon Valley, Inc." + 5.2. Endorsements. The names "Ricoh," "Ricoh Silicon Valley," and "RSV" must not be used to endorse or promote Contributor Versions or Larger Works without the prior written permission of RSV. -5.2. Endorsements. The names "Ricoh," "Ricoh Silicon Valley," and "RSV" must -not be used to endorse or promote Contributor Versions or Larger Works without -the prior written permission of RSV. + 5.3. Product Names. Contributor Versions and Larger Works may not be called "Ricoh" nor may the word "Ricoh" appear in their names without the prior written permission of RSV. -5.3. Product Names. Contributor Versions and Larger Works may not be called -"Ricoh" nor may the word "Ricoh" appear in their names without the prior written -permission of RSV. +6. Versions of the License. - 6. Versions of the License. + 6.1. New Versions. RSV may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -6.1. New Versions. RSV may publish revised and/or new versions of the License -from time to time. Each version will be given a distinguishing version number. + 6.2. Effect of New Versions. Once Governed Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Governed Code under the terms of any subsequent version of the License published by RSV. No one other than RSV has the right to modify the terms applicable to Governed Code created under this License. -6.2. Effect of New Versions. Once Governed Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Governed Code under -the terms of any subsequent version of the License published by RSV. No one -other than RSV has the right to modify the terms applicable to Governed Code -created under this License. +7. Disclaimer of Warranty. +GOVERNED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE GOVERNED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE GOVERNED CODE IS WITH YOU. SHOULD ANY GOVERNED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT RSV OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY GOVERNED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - 7. Disclaimer of Warranty. +8. Termination. -GOVERNED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE GOVERNED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR -A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE GOVERNED CODE IS WITH YOU. SHOULD ANY GOVERNED CODE -PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT RSV OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY GOVERNED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Governed Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - 8. Termination. + 8.2. If You initiate patent infringement litigation against RSV or a Contributor (RSV or the Contributor against whom You file such action is referred to as "Participant") alleging that: -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Governed Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. + (a) such Participant's Original Code or Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of the Original Code or the Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Original Code or the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. -8.2. If You initiate patent infringement litigation against RSV or a Contributor -(RSV or the Contributor against whom You file such action is referred to as -"Participant") alleging that: + (b) any software, hardware, or device provided to You by the Participant, other than such Participant's Original Code or Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Original Code or the Modifications made by that Participant. -(a) such Participant's Original Code or Contributor Version directly or indirectly -infringes any patent, then any and all rights granted by such Participant -to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice -from Participant terminate prospectively, unless if within 60 days after receipt -of notice You either: (i) agree in writing to pay Participant a mutually agreeable -reasonable royalty for Your past and future use of the Original Code or the -Modifications made by such Participant, or (ii) withdraw Your litigation claim -with respect to the Original Code or the Contributor Version against such -Participant. If within 60 days of notice, a reasonable royalty and payment -arrangement are not mutually agreed upon in writing by the parties or the -litigation claim is not withdrawn, the rights granted by Participant to You -under Sections 2.1 and/or 2.2 automatically terminate at the expiration of -the 60 day notice period specified above. + 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Original Code or Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. -(b) any software, hardware, or device provided to You by the Participant, -other than such Participant's Original Code or Contributor Version, directly -or indirectly infringes any patent, then any rights granted to You by such -Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the -date You first made, used, sold, distributed, or had made, Original Code or -the Modifications made by that Participant. + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Original Code or Contributor Version directly or indirectly -infringes any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. +9. Limitation of Liability. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL RSV, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR OF GOVERNED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU OR ANY OTHER PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. TO THE EXTENT THAT ANY EXCLUSION OF DAMAGES ABOVE IS NOT VALID, YOU AGREE THAT IN NO EVENT WILL RSVS LIABILITY UNDER OR RELATED TO THIS AGREEMENT EXCEED FIVE THOUSAND DOLLARS ($5,000). THE GOVERNED CODE IS NOT INTENDED FOR USE IN CONNECTION WITH ANY NUCLER, AVIATION, MASS TRANSIT OR MEDICAL APPLICATION OR ANY OTHER INHERENTLY DANGEROUS APPLICATION THAT COULD RESULT IN DEATH, PERSONAL INJURY, CATASTROPHIC DAMAGE OR MASS DESTRUCTION, AND YOU AGREE THAT NEITHER RSV NOR ANY CONTRIBUTOR SHALL HAVE ANY LIABILITY OF ANY NATURE AS A RESULT OF ANY SUCH USE OF THE GOVERNED CODE. -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - 9. Limitation of Liability. +10. U.S. Government End Users. +The Governed Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Governed Code with only those rights set forth herein. -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL RSV, ANY CONTRIBUTOR, OR ANY DISTRIBUTOR -OF GOVERNED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO YOU -OR ANY OTHER PERSON FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL -DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF -GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER -COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED -OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT -APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S -NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS -DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, -SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. TO THE EXTENT THAT -ANY EXCLUSION OF DAMAGES ABOVE IS NOT VALID, YOU AGREE THAT IN NO EVENT WILL -RSV'S LIABILITY UNDER OR RELATED TO THIS AGREEMENT EXCEED FIVE THOUSAND DOLLARS -($5,000). THE GOVERNED CODE IS NOT INTENDED FOR USE IN CONNECTION WITH ANY -NUCLER, AVIATION, MASS TRANSIT OR MEDICAL APPLICATION OR ANY OTHER INHERENTLY -DANGEROUS APPLICATION THAT COULD RESULT IN DEATH, PERSONAL INJURY, CATASTROPHIC -DAMAGE OR MASS DESTRUCTION, AND YOU AGREE THAT NEITHER RSV NOR ANY CONTRIBUTOR -SHALL HAVE ANY LIABILITY OF ANY NATURE AS A RESULT OF ANY SUCH USE OF THE -GOVERNED CODE. +11. Miscellaneous. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. The parties submit to personal jurisdiction in California and further agree that any cause of action arising under or related to this Agreement shall be brought in the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California. The losing party shall be responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. Notwithstanding anything to the contrary herein, RSV may seek injunctive relief related to a breach of this Agreement in any court of competent jurisdiction. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. - 10. U.S. Government End Users. +12. Responsibility for Claims. +Except in cases where another Contributor has failed to comply with Section 3.4, You are responsible for damages arising, directly or indirectly, out of Your utilization of rights under this License, based on the number of copies of Governed Code you made available, the revenues you received from utilizing such rights, and other relevant factors. You agree to work with affected parties to distribute responsibility on an equitable basis. -The Governed Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Governed Code -with only those rights set forth herein. - 11. Miscellaneous. +EXHIBIT A -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. The parties submit to personal jurisdiction in California and -further agree that any cause of action arising under or related to this Agreement -shall be brought in the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California. The losing party shall -be responsible for costs, including without limitation, court costs and reasonable -attorney's fees and expenses. Notwithstanding anything to the contrary herein, -RSV may seek injunctive relief related to a breach of this Agreement in any -court of competent jurisdiction. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. +"The contents of this file are subject to the Ricoh Source Code Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.risource.org/RPL - 12. Responsibility for Claims. +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. -Except in cases where another Contributor has failed to comply with Section -3.4, You are responsible for damages arising, directly or indirectly, out -of Your utilization of rights under this License, based on the number of copies -of Governed Code you made available, the revenues you received from utilizing -such rights, and other relevant factors. You agree to work with affected parties -to distribute responsibility on an equitable basis. EXHIBIT A - -"The contents of this file are subject to the Ricoh Source Code Public License -Version 1.0 (the "License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at http://www.risource.org/RPL - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - -This code was initially developed by Ricoh Silicon Valley, Inc. Portions created -by Ricoh Silicon Valley, Inc. are Copyright (C) 1995-1999. All Rights Reserved. +This code was initially developed by Ricoh Silicon Valley, Inc. Portions created by Ricoh Silicon Valley, Inc. are Copyright (C) 1995-1999. All Rights Reserved. Contributor(s): ______________________________________." diff --git a/options/license/Rdisc b/options/license/Rdisc index ea9be71c6..04104beca 100644 --- a/options/license/Rdisc +++ b/options/license/Rdisc @@ -1,24 +1,13 @@ -Rdisc (this program) was developed by Sun Microsystems, Inc. and is provided -for unrestricted use provided that this legend is included on all tape media -and as a part of the software program in whole or part. Users may copy or -modify Rdisc without charge, and they may freely distribute it. +Rdisc (this program) was developed by Sun Microsystems, Inc. and is provided for unrestricted use provided that this legend is included on all tape media and as a part of the software program in whole or part. Users may copy or modify Rdisc without charge, and they may freely distribute it. -RDISC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE WARRANTIES -OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE, OR ARISING -FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. +RDISC IS PROVIDED AS IS WITH NO WARRANTIES OF ANY KIND INCLUDING THE WARRANTIES OF DESIGN, MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE OR TRADE PRACTICE. -Rdisc is provided with no support and without any obligation on the part of -Sun Microsystems, Inc. to assist in its use, correction, modification or enhancement. +Rdisc is provided with no support and without any obligation on the part of Sun Microsystems, Inc. to assist in its use, correction, modification or enhancement. -SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE INFRINGEMENT -OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY RDISC OR ANY PART THEREOF. +SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY RDISC OR ANY PART THEREOF. -In no event will Sun Microsystems, Inc. be liable for any lost revenue or -profits or other special, indirect and consequential damages, even if Sun -has been advised of the possibility of such damages. +In no event will Sun Microsystems, Inc. be liable for any lost revenue or profits or other special, indirect and consequential damages, even if Sun has been advised of the possibility of such damages. Sun Microsystems, Inc. - 2550 Garcia Avenue - Mountain View, California 94043 diff --git a/options/license/Ruby b/options/license/Ruby index 26762c610..0c38b22ea 100644 --- a/options/license/Ruby +++ b/options/license/Ruby @@ -1,48 +1,29 @@ +1. You may make and give away verbatim copies of the source form of the software without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. +2. You may modify your copy of the software in any way, provided that you do at least ONE of the following: -1. You may make and give away verbatim copies of the source form of the software -without restriction, provided that you duplicate all of the original copyright -notices and associated disclaimers. + a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or by allowing the author to include your modifications in the software. -2. You may modify your copy of the software in any way, provided that you -do at least ONE of the following: + b) use the modified software only within your corporation or organization. -a) place your modifications in the Public Domain or otherwise make them Freely -Available, such as by posting said modifications to Usenet or an equivalent -medium, or by allowing the author to include your modifications in the software. + c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. - b) use the modified software only within your corporation or organization. + d) make other distribution arrangements with the author. -c) give non-standard binaries non-standard names, with instructions on where -to get the original software distribution. +3. You may distribute the software in object code or binary form, provided that you do at least ONE of the following: - d) make other distribution arrangements with the author. + a) distribute the binaries and library files of the software, together with instructions (in the manual page or equivalent) on where to get the original distribution. -3. You may distribute the software in object code or binary form, provided -that you do at least ONE of the following: + b) accompany the distribution with the machine-readable source of the software. -a) distribute the binaries and library files of the software, together with -instructions (in the manual page or equivalent) on where to get the original -distribution. + c) give non-standard binaries non-standard names, with instructions on where to get the original software distribution. -b) accompany the distribution with the machine-readable source of the software. + d) make other distribution arrangements with the author. -c) give non-standard binaries non-standard names, with instructions on where -to get the original software distribution. - - d) make other distribution arrangements with the author. - -4. You may modify and include the part of the software into any other software -(possibly commercial). But some files in the distribution are not written -by the author, so that they are not under these terms. +4. You may modify and include the part of the software into any other software (possibly commercial). But some files in the distribution are not written by the author, so that they are not under these terms. For the list of those files and their copying conditions, see the file LEGAL. -5. The scripts and library files supplied as input to or produced as output -from the software do not automatically fall under the copyright of the software, -but belong to whomever generated them, and may be sold commercially, and may -be aggregated with this software. +5. The scripts and library files supplied as input to or produced as output from the software do not automatically fall under the copyright of the software, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this software. -6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE. +6. THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/options/license/SAX-PD b/options/license/SAX-PD index dbdae27ba..f8e6def62 100644 --- a/options/license/SAX-PD +++ b/options/license/SAX-PD @@ -2,55 +2,30 @@ Copyright Status SAX is free! -In fact, it's not possible to own a license to SAX, since it's been placed -in the public domain. +In fact, it's not possible to own a license to SAX, since it's been placed in the public domain. No Warranty -Because SAX is released to the public domain, there is no warranty for the -design or for the software implementation, to the extent permitted by applicable -law. Except when otherwise stated in writing the copyright holders and/or -other parties provide SAX "as is" without warranty of any kind, either expressed -or implied, including, but not limited to, the implied warranties of merchantability -and fitness for a particular purpose. The entire risk as to the quality and -performance of SAX is with you. Should SAX prove defective, you assume the -cost of all necessary servicing, repair or correction. +Because SAX is released to the public domain, there is no warranty for the design or for the software implementation, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide SAX "as is" without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of SAX is with you. Should SAX prove defective, you assume the cost of all necessary servicing, repair or correction. -In no event unless required by applicable law or agreed to in writing will -any copyright holder, or any other party who may modify and/or redistribute -SAX, be liable to you for damages, including any general, special, incidental -or consequential damages arising out of the use or inability to use SAX (including -but not limited to loss of data or data being rendered inaccurate or losses -sustained by you or third parties or a failure of the SAX to operate with -any other programs), even if such holder or other party has been advised of -the possibility of such damages. +In no event unless required by applicable law or agreed to in writing will any copyright holder, or any other party who may modify and/or redistribute SAX, be liable to you for damages, including any general, special, incidental or consequential damages arising out of the use or inability to use SAX (including but not limited to loss of data or data being rendered inaccurate or losses sustained by you or third parties or a failure of the SAX to operate with any other programs), even if such holder or other party has been advised of the possibility of such damages. Copyright Disclaimers -This page includes statements to that effect by David Megginson, who would -have been able to claim copyright for the original work. +This page includes statements to that effect by David Megginson, who would have been able to claim copyright for the original work. SAX 1.0 -Version 1.0 of the Simple API for XML (SAX), created collectively by the membership -of the XML-DEV mailing list, is hereby released into the public domain. +Version 1.0 of the Simple API for XML (SAX), created collectively by the membership of the XML-DEV mailing list, is hereby released into the public domain. -No one owns SAX: you may use it freely in both commercial and non-commercial -applications, bundle it with your software distribution, include it on a CD-ROM, -list the source code in a book, mirror the documentation at your own web site, -or use it in any other way you see fit. +No one owns SAX: you may use it freely in both commercial and non-commercial applications, bundle it with your software distribution, include it on a CD-ROM, list the source code in a book, mirror the documentation at your own web site, or use it in any other way you see fit. David Megginson, Megginson Technologies Ltd. - 1998-05-11 SAX 2.0 -I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), -and release all of the SAX 2.0 source code, compiled code, and documentation -contained in this distribution into the Public Domain. SAX comes with NO WARRANTY -or guarantee of fitness for any purpose. +I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and release all of the SAX 2.0 source code, compiled code, and documentation contained in this distribution into the Public Domain. SAX comes with NO WARRANTY or guarantee of fitness for any purpose. David Megginson, Megginson Technologies Ltd. - 2000-05-05 diff --git a/options/license/SCEA b/options/license/SCEA index c676ed5e9..48892757e 100644 --- a/options/license/SCEA +++ b/options/license/SCEA @@ -2,129 +2,59 @@ SCEA Shared Source License 1.0 Terms and Conditions: - 1. Definitions: +1. Definitions: -"Software" shall mean the software and related documentation, whether in Source -or Object Form, made available under this SCEA Shared Source license ("License"), -that is indicated by a copyright notice file included in the source files -or attached or accompanying the source files. +"Software" shall mean the software and related documentation, whether in Source or Object Form, made available under this SCEA Shared Source license ("License"), that is indicated by a copyright notice file included in the source files or attached or accompanying the source files. "Licensor" shall mean Sony Computer Entertainment America, Inc. (herein "SCEA") -"Object Code" or "Object Form" shall mean any form that results from translation -or transformation of Source Code, including but not limited to compiled object -code or conversions to other forms intended for machine execution. +"Object Code" or "Object Form" shall mean any form that results from translation or transformation of Source Code, including but not limited to compiled object code or conversions to other forms intended for machine execution. +"Source Code" or "Source Form" shall have the plain meaning generally accepted in the software industry, including but not limited to software source code, documentation source, header and configuration files. -"Source Code" or "Source Form" shall have the plain meaning generally accepted -in the software industry, including but not limited to software source code, -documentation source, header and configuration files. +"You" or "Your" shall mean you as an individual or as a company, or whichever form under which you are exercising rights under this License. -"You" or "Your" shall mean you as an individual or as a company, or whichever -form under which you are exercising rights under this License. +2. License Grant. - 2. License Grant. +Licensor hereby grants to You, free of charge subject to the terms and conditions of this License, an irrevocable, non-exclusive, worldwide, perpetual, and royalty-free license to use, modify, reproduce, distribute, publicly perform or display the Software in Object or Source Form . -Licensor hereby grants to You, free of charge subject to the terms and conditions -of this License, an irrevocable, non-exclusive, worldwide, perpetual, and -royalty-free license to use, modify, reproduce, distribute, publicly perform -or display the Software in Object or Source Form . +3. No Right to File for Patent. +In exchange for the rights that are granted to You free of charge under this License, You agree that You will not file for any patent application, seek copyright protection or take any other action that might otherwise impair the ownership rights in and to the Software that may belong to SCEA or any of the other contributors/authors of the Software. - 3. No Right to File for Patent. +4. Contributions. -In exchange for the rights that are granted to You free of charge under this -License, You agree that You will not file for any patent application, seek -copyright protection or take any other action that might otherwise impair -the ownership rights in and to the Software that may belong to SCEA or any -of the other contributors/authors of the Software. +SCEA welcomes contributions in form of modifications, optimizations, tools or documentation designed to improve or expand the performance and scope of the Software (collectively "Contributions"). Per the terms of this License You are free to modify the Software and those modifications would belong to You. You may however wish to donate Your Contributions to SCEA for consideration for inclusion into the Software. For the avoidance of doubt, if You elect to send Your Contributions to SCEA, You are doing so voluntarily and are giving the Contributions to SCEA and its parent company Sony Computer Entertainment, Inc., free of charge, to use, modify or distribute in any form or in any manner. SCEA acknowledges that if You make a donation of Your Contributions to SCEA, such Contributions shall not exclusively belong to SCEA or its parent company and such donation shall not be to Your exclusion. SCEA, in its sole discretion, shall determine whether or not to include Your donated Contributions into the Software, in whole, in part, or as modified by SCEA. Should SCEA elect to include any such Contributions into the Software, it shall do so at its own risk and may elect to give credit or special thanks to any such contributors in the attached copyright notice. However, if any of Your contributions are included into the Software, they will become part of the Software and will be distributed under the terms and conditions of this License. Further, if Your donated Contributions are integrated into the Software then Sony Computer Entertainment, Inc. shall become the copyright owner of the Software now containing Your contributions and SCEA would be the Licensor. - 4. Contributions. +5. Redistribution in Source Form -SCEA welcomes contributions in form of modifications, optimizations, tools -or documentation designed to improve or expand the performance and scope of -the Software (collectively "Contributions"). Per the terms of this License -You are free to modify the Software and those modifications would belong to -You. You may however wish to donate Your Contributions to SCEA for consideration -for inclusion into the Software. For the avoidance of doubt, if You elect -to send Your Contributions to SCEA, You are doing so voluntarily and are giving -the Contributions to SCEA and its parent company Sony Computer Entertainment, -Inc., free of charge, to use, modify or distribute in any form or in any manner. -SCEA acknowledges that if You make a donation of Your Contributions to SCEA, -such Contributions shall not exclusively belong to SCEA or its parent company -and such donation shall not be to Your exclusion. SCEA, in its sole discretion, -shall determine whether or not to include Your donated Contributions into -the Software, in whole, in part, or as modified by SCEA. Should SCEA elect -to include any such Contributions into the Software, it shall do so at its -own risk and may elect to give credit or special thanks to any such contributors -in the attached copyright notice. However, if any of Your contributions are -included into the Software, they will become part of the Software and will -be distributed under the terms and conditions of this License. Further, if -Your donated Contributions are integrated into the Software then Sony Computer -Entertainment, Inc. shall become the copyright owner of the Software now containing -Your contributions and SCEA would be the Licensor. +You may redistribute copies of the Software, modifications or derivatives thereof in Source Code Form, provided that You: - 5. Redistribution in Source Form + a. Include a copy of this License and any copyright notices with source -You may redistribute copies of the Software, modifications or derivatives -thereof in Source Code Form, provided that You: + b. Identify modifications if any were made to the Software - a. Include a copy of this License and any copyright notices with source + c. Include a copy of all documentation accompanying the Software and modifications made by You - b. Identify modifications if any were made to the Software +6. Redistribution in Object Form -c. Include a copy of all documentation accompanying the Software and modifications -made by You +If You redistribute copies of the Software, modifications or derivatives thereof in Object Form only (as incorporated into finished goods, i.e. end user applications) then You will not have a duty to include any copies of the code, this License, copyright notices, other attributions or documentation. - 6. Redistribution in Object Form +7. No Warranty -If You redistribute copies of the Software, modifications or derivatives thereof -in Object Form only (as incorporated into finished goods, i.e. end user applications) -then You will not have a duty to include any copies of the code, this License, -copyright notices, other attributions or documentation. +THE SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT ANY REPRESENTATIONS OR WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS OF USING, MODIFYING OR REDISTRIBUTING THE SOFTWARE AND ASSUME ANY RISKS ASSOCIATED WITH YOUR EXERCISE OF PERMISSIONS UNDER THIS LICENSE. - 7. No Warranty +8. Limitation of Liability -THE SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT ANY REPRESENTATIONS -OR WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -ANY WARRANTIES OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR -A PARTICULAR PURPOSE. YOU ARE SOLELY RESPONSIBLE FOR DETERMINING THE APPROPRIATENESS -OF USING, MODIFYING OR REDISTRIBUTING THE SOFTWARE AND ASSUME ANY RISKS ASSOCIATED -WITH YOUR EXERCISE OF PERMISSIONS UNDER THIS LICENSE. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY WILL EITHER PARTY BE LIABLE TO THE OTHER PARTY OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, SPECIAL, INCIDENTAL, OR EXEMPLARY DAMAGES WITH RESPECT TO ANY INJURY, LOSS, OR DAMAGE, ARISING UNDER OR IN CONNECTION WITH THIS LETTER AGREEMENT, WHETHER FORESEEABLE OR UNFORESEEABLE, EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH INJURY, LOSS, OR DAMAGE. THE LIMITATIONS OF LIABILITY SET FORTH IN THIS SECTION SHALL APPLY TO THE FULLEST EXTENT PERMISSIBLE AT LAW OR ANY GOVERMENTAL REGULATIONS. - 8. Limitation of Liability +9. Governing Law and Consent to Jurisdiction -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY WILL EITHER PARTY BE LIABLE -TO THE OTHER PARTY OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, -SPECIAL, INCIDENTAL, OR EXEMPLARY DAMAGES WITH RESPECT TO ANY INJURY, LOSS, -OR DAMAGE, ARISING UNDER OR IN CONNECTION WITH THIS LETTER AGREEMENT, WHETHER -FORESEEABLE OR UNFORESEEABLE, EVEN IF SUCH PARTY HAS BEEN ADVISED OF THE POSSIBILITY -OF SUCH INJURY, LOSS, OR DAMAGE. THE LIMITATIONS OF LIABILITY SET FORTH IN -THIS SECTION SHALL APPLY TO THE FULLEST EXTENT PERMISSIBLE AT LAW OR ANY GOVERMENTAL -REGULATIONS. +This Agreement shall be governed by and interpreted in accordance with the laws of the State of California, excluding that body of law related to choice of laws, and of the United States of America. Any action or proceeding brought to enforce the terms of this Agreement or to adjudicate any dispute arising hereunder shall be brought in the Superior Court of the County of San Mateo, State of California or the United States District Court for the Northern District of California. Each of the parties hereby submits itself to the exclusive jurisdiction and venue of such courts for purposes of any such action. In addition, each party hereby waives the right to a jury trial in any action or proceeding related to this Agreement. - 9. Governing Law and Consent to Jurisdiction - -This Agreement shall be governed by and interpreted in accordance with the -laws of the State of California, excluding that body of law related to choice -of laws, and of the United States of America. Any action or proceeding brought -to enforce the terms of this Agreement or to adjudicate any dispute arising -hereunder shall be brought in the Superior Court of the County of San Mateo, -State of California or the United States District Court for the Northern District -of California. Each of the parties hereby submits itself to the exclusive -jurisdiction and venue of such courts for purposes of any such action. In -addition, each party hereby waives the right to a jury trial in any action -or proceeding related to this Agreement. - - 10. Copyright Notice for Redistribution of Source Code +10. Copyright Notice for Redistribution of Source Code Copyright 2005 Sony Computer Entertainment Inc. -Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); -you may not use this file except in compliance with the License. You may obtain -a copy of the License at: - +Licensed under the SCEA Shared Source License, Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at: http://research.scea.com/scea_shared_source_license.html -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. +Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/options/license/SGI-B-1.0 b/options/license/SGI-B-1.0 index 2500c0ce9..0c0fcce29 100644 --- a/options/license/SGI-B-1.0 +++ b/options/license/SGI-B-1.0 @@ -1,231 +1,82 @@ SGI FREE SOFTWARE LICENSE B - (Version 1.0 1/25/2000) - 1. Definitions. +1. Definitions. -1.1 "Additional Notice Provisions" means such additional provisions as appear -in the Notice in Original Code under the heading "Additional Notice Provisions." + 1.1 "Additional Notice Provisions" means such additional provisions as appear in the Notice in Original Code under the heading "Additional Notice Provisions." -1.2 "API" means an application programming interface established by SGI in -conjunction with the Original Code. + 1.2 "API" means an application programming interface established by SGI in conjunction with the Original Code. -1.3 "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3 "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4 "Hardware" means any physical device that accepts input, processes input, -stores the results of processing, and/or provides output. + 1.4 "Hardware" means any physical device that accepts input, processes input, stores the results of processing, and/or provides output. -1.5 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.6 "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. + 1.6 "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - 1.7 "License" means this document. + 1.7 "License" means this document. -1.8 "Modifications" means any addition to the substance or structure of the -Original Code and/or any addition to or deletion from previous Modifications. -When Covered Code is released as a series of files, a Modification is: + 1.8 "Modifications" means any addition to the substance or structure of the Original Code and/or any addition to or deletion from previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to the contents of a file containing Original Code and/or -any addition to or deletion from previous Modifications. + A. Any addition to the contents of a file containing Original Code and/or any addition to or deletion from previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -1.9 "Notice" means any notice in Original Code or Covered Code, as required -by and in compliance with this License. + 1.9 "Notice" means any notice in Original Code or Covered Code, as required by and in compliance with this License. -1.10 "Original Code" means source code of computer software code which is -described in the source code Notice required by Exhibit A as Original Code, -and updates and error corrections specifically thereto. + 1.10 "Original Code" means source code of computer software code which is described in the source code Notice required by Exhibit A as Original Code, and updates and error corrections specifically thereto. -1.11 "Recipient" means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 8. For legal entities, "Recipient" includes -any entity which controls, is controlled by, or is under common control with -Recipient. For purposes of this definition, "control" of an entity means (a) -the power, direct or indirect, to direct or manage such entity, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. + 1.11 "Recipient" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 8. For legal entities, "Recipient" includes any entity which controls, is controlled by, or is under common control with Recipient. For purposes of this definition, "control" of an entity means (a) the power, direct or indirect, to direct or manage such entity, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. - 1.12 SGI" means Silicon Graphics, Inc. + 1.12 SGI" means Silicon Graphics, Inc. - 2. License Grant and Restrictions. +2. License Grant and Restrictions. -2.1 License Grant. Subject to the provisions of this License and any third -party intellectual property claims, for the duration of intellectual property -protections inherent in the Original Code, SGI hereby grants Recipient a worldwide, -royalty-free, non-exclusive license, to do the following: (i) under copyrights -Licensable by SGI, to reproduce, distribute, create derivative works from, -and, to the extent applicable, display and perform the Original Code alone -and/or as part of a Larger Work; and (ii) under any patent claims Licensable -by SGI and embodied in the Original Code, to make, have made, use, practice, -sell, and offer for sale, and/or otherwise dispose of the Original Code. Recipient -accepts the terms and conditions of this License by undertaking any of the -aforementioned actions. + 2.1v License Grant. Subject to the provisions of this License and any third party intellectual property claims, for the duration of intellectual property protections inherent in the Original Code, SGI hereby grants Recipient a worldwide, royalty-free, non-exclusive license, to do the following: (i) under copyrights Licensable by SGI, to reproduce, distribute, create derivative works from, and, to the extent applicable, display and perform the Original Code alone and/or as part of a Larger Work; and (ii) under any patent claims Licensable by SGI and embodied in the Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code. Recipient accepts the terms and conditions of this License by undertaking any of the aforementioned actions. -2.2 Restriction on Patent License. Notwithstanding the provisions of Section -2.1(ii), no patent license is granted: 1) separate from the Original Code; -nor 2) for infringements caused by (i) modification of the Original Code, -or (ii) the combination of the Original Code with other software or Hardware. + 2.2 Restriction on Patent License. Notwithstanding the provisions of Section 2.1(ii), no patent license is granted: 1) separate from the Original Code; nor 2) for infringements caused by (i) modification of the Original Code, or (ii) the combination of the Original Code with other software or Hardware. -2.3 No License For Hardware Implementations. The licenses granted in Section -2.1 are not applicable to implementation in Hardware of the algorithms embodied -in the Original Code. + 2.3 No License For Hardware Implementations. The licenses granted in Section 2.1 are not applicable to implementation in Hardware of the algorithms embodied in the Original Code. -2.4 Modifications License and API Compliance. Modifications are only licensed -under Section 2.1(i) to the extent such Modifications are fully compliant -with any API as may be identified in Additional Notice Provisions as appear -in the Original Code. + 2.4 Modifications License and API Compliance. Modifications are only licensed under Section 2.1(i) to the extent such Modifications are fully compliant with any API as may be identified in Additional Notice Provisions as appear in the Original Code. - 3. Redistributions. +3. Redistributions. -A. Retention of Notice/Copy of License. The Notice set forth in Exhibit A, -below, must be conspicuously retained or included in any and all redistributions -of Covered Code. For distributions of the Covered Code in source code form, -the Notice must appear in every file that can include a text comments field; -in executable form, the Notice and a copy of this License must appear in related -documentation or collateral where the Recipient's rights relating to Covered -Code are described. Any Additional Notice Provisions which actually appears -in the Original Code must also be retained or included in any and all redistributions -of Covered Code. + A. Retention of Notice/Copy of License. The Notice set forth in Exhibit A, below, must be conspicuously retained or included in any and all redistributions of Covered Code. For distributions of the Covered Code in source code form, the Notice must appear in every file that can include a text comments field; in executable form, the Notice and a copy of this License must appear in related documentation or collateral where the Recipient’s rights relating to Covered Code are described. Any Additional Notice Provisions which actually appears in the Original Code must also be retained or included in any and all redistributions of Covered Code. -B. Alternative License. Provided that Recipient is in compliance with the -terms of this License, Recipient may distribute the source code and/or executable -version(s) of Covered Code under (1) this License; (2) a license identical -to this License but for only such changes as are necessary in order to clarify -Recipient's role as licensor of Modifications, without derogation of any of -SGI's rights; and/or (3) a license of Recipient's choosing, containing terms -different from this License, provided that the license terms include this -Section 3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be modified -or superseded by any other terms of such license. If Recipient elects to use -any license other than this License, Recipient must make it absolutely clear -that any of its terms which differ from this License are offered by Recipient -alone, and not by SGI. + B. Alternative License. Provided that Recipient is in compliance with the terms of this License, Recipient may distribute the source code and/or executable version(s) of Covered Code under (1) this License; (2) a license identical to this License but for only such changes as are necessary in order to clarify Recipient’s role as licensor of Modifications, without derogation of any of SGI’s rights; and/or (3) a license of Recipient’s choosing, containing terms different from this License, provided that the license terms include this Section 3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be modified or superseded by any other terms of such license. If Recipient elects to use any license other than this License, Recipient must make it absolutely clear that any of its terms which differ from this License are offered by Recipient alone, and not by SGI. -C. Indemnity. Recipient hereby agrees to indemnify SGI for any liability incurred -by SGI as a result of any such alternative license terms Recipient offers. + C. Indemnity. Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as a result of any such alternative license terms Recipient offers. -4. Termination. This License and the rights granted hereunder will terminate -automatically if Recipient breaches any term herein and fails to cure such -breach within 30 days thereof. Any sublicense to the Covered Code that is -properly granted shall survive any termination of this License, absent termination -by the terms of such sublicense. Provisions that, by their nature, must remain -in effect beyond the termination of this License, shall survive. +4. Termination. This License and the rights granted hereunder will terminate automatically if Recipient breaches any term herein and fails to cure such breach within 30 days thereof. Any sublicense to the Covered Code that is properly granted shall survive any termination of this License, absent termination by the terms of such sublicense. Provisions that, by their nature, must remain in effect beyond the termination of this License, shall survive. -5. No Trademark Or Other Rights. This License does not grant any rights to: -(i) any software apart from the Covered Code, nor shall any other rights or -licenses not expressly granted hereunder arise by implication, estoppel or -otherwise with respect to the Covered Code; (ii) any trade name, trademark -or service mark whatsoever, including without limitation any related right -for purposes of endorsement or promotion of products derived from the Covered -Code, without prior written permission of SGI; or (iii) any title to or ownership -of the Original Code, which shall at all times remains with SGI. All rights -in the Original Code not expressly granted under this License are reserved. +5. No Trademark Or Other Rights. This License does not grant any rights to: (i) any software apart from the Covered Code, nor shall any other rights or licenses not expressly granted hereunder arise by implication, estoppel or otherwise with respect to the Covered Code; (ii) any trade name, trademark or service mark whatsoever, including without limitation any related right for purposes of endorsement or promotion of products derived from the Covered Code, without prior written permission of SGI; or (iii) any title to or ownership of the Original Code, which shall at all times remains with SGI. All rights in the Original Code not expressly granted under this License are reserved. -6. Compliance with Laws; Non-Infringement. Recipient hereby assures that it -shall comply with all applicable laws, regulations, and executive orders, -in connection with any and all dispositions of Covered Code, including but -not limited to, all export, re-export, and import control laws, regulations, -and executive orders, of the U.S. government and other countries. Recipient -may not distribute Covered Code that (i) in any way infringes (directly or -contributorily) the rights (including patent, copyright, trade secret, trademark -or other intellectual property rights of any kind) of any other person or -entity or (ii) breaches any representation or warranty, express, implied or -statutory, to which, under any applicable law, it might be deemed to have -been subject. +6. Compliance with Laws; Non-Infringement. Recipient hereby assures that it shall comply with all applicable laws, regulations, and executive orders, in connection with any and all dispositions of Covered Code, including but not limited to, all export, re-export, and import control laws, regulations, and executive orders, of the U.S. government and other countries. Recipient may not distribute Covered Code that (i) in any way infringes (directly or contributorily) the rights (including patent, copyright, trade secret, trademark or other intellectual property rights of any kind) of any other person or entity or (ii) breaches any representation or warranty, express, implied or statutory, to which, under any applicable law, it might be deemed to have been subject. -7. Claims of Infringement. If Recipient learns of any third party claim that -any disposition of Covered Code and/or functionality wholly or partially infringes -the third party's intellectual property rights, Recipient will promptly notify -SGI of such claim. +7. Claims of Infringement. If Recipient learns of any third party claim that any disposition of Covered Code and/or functionality wholly or partially infringes the third party's intellectual property rights, Recipient will promptly notify SGI of such claim. -8. Versions of the License. SGI may publish revised and/or new versions of -the License from time to time, each with a distinguishing version number. -Once Covered Code has been published under a particular version of the License, -Recipient may, for the duration of the license, continue to use it under the -terms of that version, or choose to use such Covered Code under the terms -of any subsequent version published by SGI. Subject to the provisions of Sections -3 and 4 of this License, only SGI may modify the terms applicable to Covered -Code created under this License. +8. Versions of the License. SGI may publish revised and/or new versions of the License from time to time, each with a distinguishing version number. Once Covered Code has been published under a particular version of the License, Recipient may, for the duration of the license, continue to use it under the terms of that version, or choose to use such Covered Code under the terms of any subsequent version published by SGI. Subject to the provisions of Sections 3 and 4 of this License, only SGI may modify the terms applicable to Covered Code created under this License. -9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL EXPRESS AND -IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, -ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, -FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK -AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE -DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING, -REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL PART OF -THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT SUBJECT -TO THIS DISCLAIMER. +9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER. -10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY, WHETHER -TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), CONTRACT, -OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF DATA, -COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR -LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF -SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR -DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE -LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND -LIMITATION MAY NOT APPLY TO RECIPIENT. +10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY, WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT. -11. Indemnity. Recipient shall be solely responsible for damages arising, -directly or indirectly, out of its utilization of rights under this License. -Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. -from and against any loss, liability, damages, costs or expenses (including -the payment of reasonable attorneys fees) arising out of Recipient's use, -modification, reproduction and distribution of the Covered Code or out of -any representation or warranty made by Recipient. +11. Indemnity. Recipient shall be solely responsible for damages arising, directly or indirectly, out of its utilization of rights under this License. Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. from and against any loss, liability, damages, costs or expenses (including the payment of reasonable attorneys fees) arising out of Recipient's use, modification, reproduction and distribution of the Covered Code or out of any representation or warranty made by Recipient. -12. U.S. Government End Users. The Covered Code is a "commercial item" consisting -of "commercial computer software" as such terms are defined in title 48 of -the Code of Federal Regulations and all U.S. Government End Users acquire -only the rights set forth in this License and are subject to the terms of -this License. +12. U.S. Government End Users. The Covered Code is a "commercial item" consisting of "commercial computer software" as such terms are defined in title 48 of the Code of Federal Regulations and all U.S. Government End Users acquire only the rights set forth in this License and are subject to the terms of this License. -13. Miscellaneous. This License represents the complete agreement concerning -the its subject matter. If any provision of this License is held to be unenforceable, -such provision shall be reformed so as to achieve as nearly as possible the -same legal and economic effect as the original provision and the remainder -of this License will remain in effect. This License shall be governed by and -construed in accordance with the laws of the United States and the State of -California as applied to agreements entered into and to be performed entirely -within California between California residents. Any litigation relating to -this License shall be subject to the exclusive jurisdiction of the Federal -Courts of the Northern District of California (or, absent subject matter jurisdiction -in such courts, the courts of the State of California), with venue lying exclusively -in Santa Clara County, California, with the losing party responsible for costs, -including without limitation, court costs and reasonable attorneys fees and -expenses. The application of the United Nations Convention on Contracts for -the International Sale of Goods is expressly excluded. Any law or regulation -which provides that the language of a contract shall be construed against -the drafter shall not apply to this License. Exhibit A +13. Miscellaneous. This License represents the complete agreement concerning the its subject matter. If any provision of this License is held to be unenforceable, such provision shall be reformed so as to achieve as nearly as possible the same legal and economic effect as the original provision and the remainder of this License will remain in effect. This License shall be governed by and construed in accordance with the laws of the United States and the State of California as applied to agreements entered into and to be performed entirely within California between California residents. Any litigation relating to this License shall be subject to the exclusive jurisdiction of the Federal Courts of the Northern District of California (or, absent subject matter jurisdiction in such courts, the courts of the State of California), with venue lying exclusively in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. -License Applicability. Except to the extent portions of this file are made -subject to an alternative license as permitted in the SGI Free Software License -B, Version 1.0 (the "License"), the contents of this file are subject only -to the provisions of the License. You may not use this file except in compliance -with the License. You may obtain a copy of the License at Silicon Graphics, -Inc., attn: Legal Services, 1600 Ampitheatre Parkway, Mountain View, CA 94043-1351, -or at: +Exhibit A + +License Applicability. Except to the extent portions of this file are made subject to an alternative license as permitted in the SGI Free Software License B, Version 1.0 (the "License"), the contents of this file are subject only to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Ampitheatre Parkway, Mountain View, CA 94043-1351, or at: http://oss.sgi.com/projects/FreeB -Note that, as provided in the License, the Software is distributed on an "AS -IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, -INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, -SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +Note that, as provided in the License, the Software is distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -Original Code. The Original Code is: [ name of software , version number , -and release date], developed by Silicon Graphics, Inc. The Original Code is -Copyright (c) [ dates of first publication, as appearing in the Notice in -the Original Code] Silicon Graphics, Inc. Copyright in any portions created -by third parties is as indicated elsewhere herein. All Rights Reserved. +Original Code. The Original Code is: [name of software, version number, and release date], developed by Silicon Graphics, Inc. The Original Code is Copyright (c) [dates of first publication, as appearing in the Notice in the Original Code] Silicon Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights Reserved. -Additional Notice Provisions: [ such additional provisions, if any, as appear -in the Notice in the Original Code under the heading "Additional Notice Provisions"] +Additional Notice Provisions: [such additional provisions, if any, as appear in the Notice in the Original Code under the heading "Additional Notice Provisions"] diff --git a/options/license/SGI-B-1.1 b/options/license/SGI-B-1.1 index 8fc157b57..3f688177e 100644 --- a/options/license/SGI-B-1.1 +++ b/options/license/SGI-B-1.1 @@ -1,246 +1,84 @@ SGI FREE SOFTWARE LICENSE B - (Version 1.1 02/22/2000) - 1. Definitions. +1. Definitions. -1.1 "Additional Notice Provisions" means such additional provisions as appear -in the Notice in Original Code under the heading "Additional Notice Provisions." + 1.1 "Additional Notice Provisions" means such additional provisions as appear in the Notice in Original Code under the heading "Additional Notice Provisions." -1.2 "Covered Code" means the Original Code or Modifications, or any combination -thereof. + 1.2 "Covered Code" means the Original Code or Modifications, or any combination thereof. -1.3 "Hardware" means any physical device that accepts input, processes input, -stores the results of processing, and/or provides output. + 1.3 "Hardware" means any physical device that accepts input, processes input, stores the results of processing, and/or provides output. -1.4 "Larger Work" means a work that combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.4 "Larger Work" means a work that combines Covered Code or portions thereof with code not governed by the terms of this License. -1.5 "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. + 1.5 "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. - 1.6 "License" means this document. + 1.6 "License" means this document. -1.7 "Licensed Patents" means patent claims Licensable by SGI that are infringed -by the use or sale of Original Code or any Modifications provided by SGI, -or any combination thereof. + 1.7 "Licensed Patents" means patent claims Licensable by SGI that are infringed by the use or sale of Original Code or any Modifications provided by SGI, or any combination thereof. -1.8 "Modifications" means any addition to or deletion from the substance or -structure of the Original Code or any previous Modifications. When Covered -Code is released as a series of files, a Modification is: + 1.8 "Modifications" means any addition to or deletion from the substance or structure of the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -A. Any addition to the contents of a file containing Original Code and/or -addition to or deletion from the contents of a file containing previous Modifications. + A. Any addition to the contents of a file containing Original Code and/or addition to or deletion from the contents of a file containing previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -1.9 "Notice" means any notice in Original Code or Covered Code, as required -by and in compliance with this License. + 1.9 "Notice" means any notice in Original Code or Covered Code, as required by and in compliance with this License. -1.10 "Original Code" means source code of computer software code that is described -in the source code Notice required by Exhibit A as Original Code, and updates -and error corrections specifically thereto. + 1.10 "Original Code" means source code of computer software code that is described in the source code Notice required by Exhibit A as Original Code, and updates and error corrections specifically thereto. -1.11 "Recipient" means an individual or a legal entity exercising rights under, -and complying with all of the terms of, this License or a future version of -this License issued under Section 8. For legal entities, "Recipient" includes -any entity that controls, is controlled by, or is under common control with -Recipient. For purposes of this definition, "control" of an entity means (a) -the power, direct or indirect, to direct or manage such entity, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. + 1.11 "Recipient" means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 8. For legal entities, "Recipient" includes any entity that controls, is controlled by, or is under common control with Recipient. For purposes of this definition, "control" of an entity means (a) the power, direct or indirect, to direct or manage such entity, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -1.12 "Recipient Patents" means patent claims Licensable by a Recipient that -are infringed by the use or sale of Original Code or any Modifications provided -by SGI, or any combination thereof. + 1.12 "Recipient Patents" means patent claims Licensable by a Recipient that are infringed by the use or sale of Original Code or any Modifications provided by SGI, or any combination thereof. - 1.13 "SGI" means Silicon Graphics, Inc. + 1.13 "SGI" means Silicon Graphics, Inc. -1.14 "SGI Patents" means patent claims Licensable by SGI other than the Licensed -Patents. + 1.14 "SGI Patents" means patent claims Licensable by SGI other than the Licensed Patents. - 2. License Grant and Restrictions. +2. License Grant and Restrictions. -2.1 SGI License Grant. Subject to the terms of this License and any third -party intellectual property claims, for the duration of intellectual property -protections inherent in the Original Code, SGI hereby grants Recipient a worldwide, -royalty-free, non-exclusive license, to do the following: (i) under copyrights -Licensable by SGI, to reproduce, distribute, create derivative works from, -and, to the extent applicable, display and perform the Original Code and/or -any Modifications provided by SGI alone and/or as part of a Larger Work; and -(ii) under any Licensable Patents, to make, have made, use, sell, offer for -sale, import and/or otherwise transfer the Original Code and/or any Modifications -provided by SGI. Recipient accepts the terms and conditions of this License -by undertaking any of the aforementioned actions. The patent license shall -apply to the Covered Code if, at the time any related Modification is added, -such addition of the Modification causes such combination to be covered by -the Licensed Patents. The patent license in Section 2.1(ii) shall not apply -to any other combinations that include the Modification. No patent license -is provided under SGI Patents for infringements of SGI Patents by Modifications -not provided by SGI or combinations of Original Code and Modifications not -provided by SGI. + 2.1 SGI License Grant. Subject to the terms of this License and any third party intellectual property claims, for the duration of intellectual property protections inherent in the Original Code, SGI hereby grants Recipient a worldwide, royalty-free, non-exclusive license, to do the following: (i) under copyrights Licensable by SGI, to reproduce, distribute, create derivative works from, and, to the extent applicable, display and perform the Original Code and/or any Modifications provided by SGI alone and/or as part of a Larger Work; and (ii) under any Licensable Patents, to make, have made, use, sell, offer for sale, import and/or otherwise transfer the Original Code and/or any Modifications provided by SGI. Recipient accepts the terms and conditions of this License by undertaking any of the aforementioned actions. The patent license shall apply to the Covered Code if, at the time any related Modification is added, such addition of the Modification causes such combination to be covered by the Licensed Patents. The patent license in Section 2.1(ii) shall not apply to any other combinations that include the Modification. No patent license is provided under SGI Patents for infringements of SGI Patents by Modifications not provided by SGI or combinations of Original Code and Modifications not provided by SGI. -2.2 Recipient License Grant. Subject to the terms of this License and any -third party intellectual property claims, Recipient hereby grants SGI and -any other Recipients a worldwide, royalty-free, non-exclusive license, under -any Recipient Patents, to make, have made, use, sell, offer for sale, import -and/or otherwise transfer the Original Code and/or any Modifications provided -by SGI. + 2.2 Recipient License Grant. Subject to the terms of this License and any third party intellectual property claims, Recipient hereby grants SGI and any other Recipients a worldwide, royalty-free, non-exclusive license, under any Recipient Patents, to make, have made, use, sell, offer for sale, import and/or otherwise transfer the Original Code and/or any Modifications provided by SGI. -2.3 No License For Hardware Implementations. The licenses granted in Section -2.1 and 2.2 are not applicable to implementation in Hardware of the algorithms -embodied in the Original Code or any Modifications provided by SGI . + 2.3 No License For Hardware Implementations. The licenses granted in Section 2.1 and 2.2 are not applicable to implementation in Hardware of the algorithms embodied in the Original Code or any Modifications provided by SGI . - 3. Redistributions. +3. Redistributions. -3.1 Retention of Notice/Copy of License. The Notice set forth in Exhibit A, -below, must be conspicuously retained or included in any and all redistributions -of Covered Code. For distributions of the Covered Code in source code form, -the Notice must appear in every file that can include a text comments field; -in executable form, the Notice and a copy of this License must appear in related -documentation or collateral where the Recipient's rights relating to Covered -Code are described. Any Additional Notice Provisions which actually appears -in the Original Code must also be retained or included in any and all redistributions -of Covered Code. + 3.1 Retention of Notice/Copy of License. The Notice set forth in Exhibit A, below, must be conspicuously retained or included in any and all redistributions of Covered Code. For distributions of the Covered Code in source code form, the Notice must appear in every file that can include a text comments field; in executable form, the Notice and a copy of this License must appear in related documentation or collateral where the Recipient’s rights relating to Covered Code are described. Any Additional Notice Provisions which actually appears in the Original Code must also be retained or included in any and all redistributions of Covered Code. -3.2 Alternative License. Provided that Recipient is in compliance with the -terms of this License, Recipient may, so long as without derogation of any -of SGI's rights in and to the Original Code, distribute the source code and/or -executable version(s) of Covered Code under (1) this License; (2) a license -identical to this License but for only such changes as are necessary in order -to clarify Recipient's role as licensor of Modifications; and/or (3) a license -of Recipient's choosing, containing terms different from this License, provided -that the license terms include this Section 3 and Sections 4, 6, 7, 10, 12, -and 13, which terms may not be modified or superseded by any other terms of -such license. If Recipient elects to use any license other than this License, -Recipient must make it absolutely clear that any of its terms which differ -from this License are offered by Recipient alone, and not by SGI. It is emphasized -that this License is a limited license, and, regardless of the license form -employed by Recipient in accordance with this Section 3.2, Recipient may relicense -only such rights, in Original Code and Modifications by SGI, as it has actually -been granted by SGI in this License. + 3.2 Alternative License. Provided that Recipient is in compliance with the terms of this License, Recipient may, so long as without derogation of any of SGI’s rights in and to the Original Code, distribute the source code and/or executable version(s) of Covered Code under (1) this License; (2) a license identical to this License but for only such changes as are necessary in order to clarify Recipient’s role as licensor of Modifications; and/or (3) a license of Recipient’s choosing, containing terms different from this License, provided that the license terms include this Section 3 and Sections 4, 6, 7, 10, 12, and 13, which terms may not be modified or superseded by any other terms of such license. If Recipient elects to use any license other than this License, Recipient must make it absolutely clear that any of its terms which differ from this License are offered by Recipient alone, and not by SGI. It is emphasized that this License is a limited license, and, regardless of the license form employed by Recipient in accordance with this Section 3.2, Recipient may relicense only such rights, in Original Code and Modifications by SGI, as it has actually been granted by SGI in this License. -3.3 Indemnity. Recipient hereby agrees to indemnify SGI for any liability -incurred by SGI as a result of any such alternative license terms Recipient -offers. + 3.3 Indemnity. Recipient hereby agrees to indemnify SGI for any liability incurred by SGI as a result of any such alternative license terms Recipient offers. -4. Termination. This License and the rights granted hereunder will terminate -automatically if Recipient breaches any term herein and fails to cure such -breach within 30 days thereof. Any sublicense to the Covered Code that is -properly granted shall survive any termination of this License, absent termination -by the terms of such sublicense. Provisions that, by their nature, must remain -in effect beyond the termination of this License, shall survive. +4. Termination. This License and the rights granted hereunder will terminate automatically if Recipient breaches any term herein and fails to cure such breach within 30 days thereof. Any sublicense to the Covered Code that is properly granted shall survive any termination of this License, absent termination by the terms of such sublicense. Provisions that, by their nature, must remain in effect beyond the termination of this License, shall survive. -5. No Trademark Or Other Rights. This License does not grant any rights to: -(i) any software apart from the Covered Code, nor shall any other rights or -licenses not expressly granted hereunder arise by implication, estoppel or -otherwise with respect to the Covered Code; (ii) any trade name, trademark -or service mark whatsoever, including without limitation any related right -for purposes of endorsement or promotion of products derived from the Covered -Code, without prior written permission of SGI; or (iii) any title to or ownership -of the Original Code, which shall at all times remains with SGI. All rights -in the Original Code not expressly granted under this License are reserved. +5. No Trademark Or Other Rights. This License does not grant any rights to: (i) any software apart from the Covered Code, nor shall any other rights or licenses not expressly granted hereunder arise by implication, estoppel or otherwise with respect to the Covered Code; (ii) any trade name, trademark or service mark whatsoever, including without limitation any related right for purposes of endorsement or promotion of products derived from the Covered Code, without prior written permission of SGI; or (iii) any title to or ownership of the Original Code, which shall at all times remains with SGI. All rights in the Original Code not expressly granted under this License are reserved. -6. Compliance with Laws; Non-Infringement. There are various worldwide laws, -regulations, and executive orders applicable to dispositions of Covered Code, -including without limitation export, re-export, and import control laws, regulations, -and executive orders, of the U.S. government and other countries, and Recipient -is reminded it is obliged to obey such laws, regulations, and executive orders. -Recipient may not distribute Covered Code that (i) in any way infringes (directly -or contributorily) any intellectual property rights of any kind of any other -person or entity or (ii) breaches any representation or warranty, express, -implied or statutory, to which, under any applicable law, it might be deemed -to have been subject. +6. Compliance with Laws; Non-Infringement. There are various worldwide laws, regulations, and executive orders applicable to dispositions of Covered Code, including without limitation export, re-export, and import control laws, regulations, and executive orders, of the U.S. government and other countries, and Recipient is reminded it is obliged to obey such laws, regulations, and executive orders. Recipient may not distribute Covered Code that (i) in any way infringes (directly or contributorily) any intellectual property rights of any kind of any other person or entity or (ii) breaches any representation or warranty, express, implied or statutory, to which, under any applicable law, it might be deemed to have been subject. -7. Claims of Infringement. If Recipient learns of any third party claim that -any disposition of Covered Code and/or functionality wholly or partially infringes -the third party's intellectual property rights, Recipient will promptly notify -SGI of such claim. +7. Claims of Infringement. If Recipient learns of any third party claim that any disposition of Covered Code and/or functionality wholly or partially infringes the third party's intellectual property rights, Recipient will promptly notify SGI of such claim. -8. Versions of the License. SGI may publish revised and/or new versions of -the License from time to time, each with a distinguishing version number. -Once Covered Code has been published under a particular version of the License, -Recipient may, for the duration of the license, continue to use it under the -terms of that version, or choose to use such Covered Code under the terms -of any subsequent version published by SGI. Subject to the provisions of Sections -3 and 4 of this License, only SGI may modify the terms applicable to Covered -Code created under this License. +8. Versions of the License. SGI may publish revised and/or new versions of the License from time to time, each with a distinguishing version number. Once Covered Code has been published under a particular version of the License, Recipient may, for the duration of the license, continue to use it under the terms of that version, or choose to use such Covered Code under the terms of any subsequent version published by SGI. Subject to the provisions of Sections 3 and 4 of this License, only SGI may modify the terms applicable to Covered Code created under this License. -9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL EXPRESS AND -IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, -ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, -FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK -AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE -DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING, -REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL PART OF -THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT SUBJECT -TO THIS DISCLAIMER. +9. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED "AS IS." ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. SGI ASSUMES NO RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD THE SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY IS AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT SUBJECT TO THIS DISCLAIMER. -10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY, WHETHER -TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), CONTRACT, -OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF DATA, -COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR -LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF -SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR -DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE -LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND -LIMITATION MAY NOT APPLY TO RECIPIENT. +10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES NOR LEGAL THEORY, WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT. -11. Indemnity. Recipient shall be solely responsible for damages arising, -directly or indirectly, out of its utilization of rights under this License. -Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. -from and against any loss, liability, damages, costs or expenses (including -the payment of reasonable attorneys fees) arising out of Recipient's use, -modification, reproduction and distribution of the Covered Code or out of -any representation or warranty made by Recipient. +11. Indemnity. Recipient shall be solely responsible for damages arising, directly or indirectly, out of its utilization of rights under this License. Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. from and against any loss, liability, damages, costs or expenses (including the payment of reasonable attorneys fees) arising out of Recipient's use, modification, reproduction and distribution of the Covered Code or out of any representation or warranty made by Recipient. -12. U.S. Government End Users. The Covered Code is a "commercial item" consisting -of "commercial computer software" as such terms are defined in title 48 of -the Code of Federal Regulations and all U.S. Government End Users acquire -only the rights set forth in this License and are subject to the terms of -this License. +12. U.S. Government End Users. The Covered Code is a "commercial item" consisting of "commercial computer software" as such terms are defined in title 48 of the Code of Federal Regulations and all U.S. Government End Users acquire only the rights set forth in this License and are subject to the terms of this License. -13. Miscellaneous. This License represents the complete agreement concerning -the its subject matter. If any provision of this License is held to be unenforceable, -such provision shall be reformed so as to achieve as nearly as possible the -same legal and economic effect as the original provision and the remainder -of this License will remain in effect. This License shall be governed by and -construed in accordance with the laws of the United States and the State of -California as applied to agreements entered into and to be performed entirely -within California between California residents. Any litigation relating to -this License shall be subject to the exclusive jurisdiction of the Federal -Courts of the Northern District of California (or, absent subject matter jurisdiction -in such courts, the courts of the State of California), with venue lying exclusively -in Santa Clara County, California, with the losing party responsible for costs, -including without limitation, court costs and reasonable attorneys fees and -expenses. The application of the United Nations Convention on Contracts for -the International Sale of Goods is expressly excluded. Any law or regulation -that provides that the language of a contract shall be construed against the -drafter shall not apply to this License. Exhibit A +13. Miscellaneous. This License represents the complete agreement concerning the its subject matter. If any provision of this License is held to be unenforceable, such provision shall be reformed so as to achieve as nearly as possible the same legal and economic effect as the original provision and the remainder of this License will remain in effect. This License shall be governed by and construed in accordance with the laws of the United States and the State of California as applied to agreements entered into and to be performed entirely within California between California residents. Any litigation relating to this License shall be subject to the exclusive jurisdiction of the Federal Courts of the Northern District of California (or, absent subject matter jurisdiction in such courts, the courts of the State of California), with venue lying exclusively in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation that provides that the language of a contract shall be construed against the drafter shall not apply to this License. -License Applicability. Except to the extent portions of this file are made -subject to an alternative license as permitted in the SGI Free Software License -B, Version 1.1 (the "License"), the contents of this file are subject only -to the provisions of the License. You may not use this file except in compliance -with the License. You may obtain a copy of the License at Silicon Graphics, -Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA 94043-1351, -or at: +Exhibit A + +License Applicability. Except to the extent portions of this file are made subject to an alternative license as permitted in the SGI Free Software License B, Version 1.1 (the "License"), the contents of this file are subject only to the provisions of the License. You may not use this file except in compliance with the License. You may obtain a copy of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: http://oss.sgi.com/projects/FreeB -Note that, as provided in the License, the Software is distributed on an "AS -IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, -INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, -SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +Note that, as provided in the License, the Software is distributed on an "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. -Original Code. The Original Code is: [ name of software , version number , -and release date] , developed by Silicon Graphics, Inc. The Original Code -is Copyright (c) [ dates of first publication, as appearing in the Notice -in the Original Code] Silicon Graphics, Inc. Copyright in any portions created -by third parties is as indicated elsewhere herein. All Rights Reserved. Additional -Notice Provisions: [ such additional provisions, if any, as appear in the -Notice in the Original Code under the heading "Additional Notice Provisions"] +Original Code. The Original Code is: [name of software, version number, and release date], developed by Silicon Graphics, Inc. The Original Code is Copyright (c) [dates of first publication, as appearing in the Notice in the Original Code] Silicon Graphics, Inc. Copyright in any portions created by third parties is as indicated elsewhere herein. All Rights Reserved. + +Additional Notice Provisions: [such additional provisions, if any, as appear in the Notice in the Original Code under the heading "Additional Notice Provisions"] diff --git a/options/license/SGI-B-2.0 b/options/license/SGI-B-2.0 index e53cfa543..19a4a9e98 100644 --- a/options/license/SGI-B-2.0 +++ b/options/license/SGI-B-2.0 @@ -1,27 +1,12 @@ SGI FREE SOFTWARE LICENSE B +(Version 2.0, Sept. 18, 2008) -(Version 2.0, Sept. 18, 2008) Copyright (C) [dates of first publication] Silicon -Graphics, Inc. All Rights Reserved. +Copyright (C) [dates of first publication] Silicon Graphics, Inc. All Rights Reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice including the dates of first publication and either -this permission notice or a reference to http://oss.sgi.com/projects/FreeB/ -shall be included in all copies or substantial portions of the Software. +The above copyright notice including the dates of first publication and either this permission notice or a reference to http://oss.sgi.com/projects/FreeB/ shall be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, -INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL SILICON GRAPHICS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Except as contained in this notice, the name of Silicon Graphics, Inc. shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from Silicon -Graphics, Inc. +Except as contained in this notice, the name of Silicon Graphics, Inc. shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from Silicon Graphics, Inc. diff --git a/options/license/SHL-0.51 b/options/license/SHL-0.51 index 1f8e3e4ee..548639d16 100644 --- a/options/license/SHL-0.51 +++ b/options/license/SHL-0.51 @@ -1,213 +1,65 @@ SOLDERPAD HARDWARE LICENSE version 0.51 -This license is based closely on the Apache License Version 2.0, but is not -approved or endorsed by the Apache Foundation. A copy of the non-modified -Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0. +This license is based closely on the Apache License Version 2.0, but is not approved or endorsed by the Apache Foundation. A copy of the non-modified Apache License 2.0 can be found at http://www.apache.org/licenses/LICENSE-2.0. -As this license is not currently OSI or FSF approved, the Licensor permits -any Work licensed under this License, at the option of the Licensee, to be -treated as licensed under the Apache License Version 2.0 (which is so approved). +As this license is not currently OSI or FSF approved, the Licensor permits any Work licensed under this License, at the option of the Licensee, to be treated as licensed under the Apache License Version 2.0 (which is so approved). + +This License is licensed under the terms of this License and in particular clause 7 below (Disclaimer of Warranties) applies in relation to its use. -This License is licensed under the terms of this License and in particular -clause 7 below (Disclaimer of Warranties) applies in relation to its use. TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +1. Definitions. - +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. -"License" shall mean the terms and conditions for use, reproduction, and distribution -as defined by Sections 1 through 9 of this document. +"Licensor" shall mean the Rights owner or entity authorized by the Rights owner that is granting the License. - +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -"Licensor" shall mean the Rights owner or entity authorized by the Rights -owner that is granting the License. +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - +"Rights" means copyright and any similar right including design right (whether registered or unregistered), semiconductor topography (mask) rights and database rights (but excluding Patents and Trademarks). -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (ii) ownership of fifty percent (50%) or more -of the outstanding shares, or (iii) beneficial ownership of such entity. +"Source" form shall mean the preferred form for making modifications, including but not limited to source code, net lists, board layouts, CAD files, documentation source, and configuration files. - +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, the instantiation of a hardware design and conversions to other media types, including intermediate forms such as bytecodes, FPGA bitstreams, artwork and semiconductor topographies (mask works). -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions -granted by this License. +"Work" shall mean the work of authorship, whether in Source form or other Object form, made available under the License, as indicated by a Rights notice that is included in or attached to the work (an example is provided in the Appendix below). - +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) or physically connect to or interoperate with the interfaces of, the Work and Derivative Works thereof. -"Rights" means copyright and any similar right including design right (whether -registered or unregistered), semiconductor topography (mask) rights and database -rights (but excluding Patents and Trademarks). +"Contribution" shall mean any design or work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the Rights owner or by an individual or Legal Entity authorized to submit on behalf of the Rights owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the Rights owner as "Not a Contribution." - +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. -"Source" form shall mean the preferred form for making modifications, including -but not limited to source code, net lists, board layouts, CAD files, documentation -source, and configuration files. +2. Grant of License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license under the Rights to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form and do anything in relation to the Work as if the Rights did not exist. - +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. -"Object" form shall mean any form resulting from mechanical transformation -or translation of a Source form, including but not limited to compiled object -code, generated documentation, the instantiation of a hardware design and -conversions to other media types, including intermediate forms such as bytecodes, -FPGA bitstreams, artwork and semiconductor topographies (mask works). +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and -"Work" shall mean the work of authorship, whether in Source form or other -Object form, made available under the License, as indicated by a Rights notice -that is included in or attached to the work (an example is provided in the -Appendix below). + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and - + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and -"Derivative Works" shall mean any work, whether in Source or Object form, -that is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative -Works shall not include works that remain separable from, or merely link (or -bind by name) or physically connect to or interoperate with the interfaces -of, the Work and Derivative Works thereof. + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. -"Contribution" shall mean any design or work of authorship, including the -original version of the Work and any modifications or additions to that Work -or Derivative Works thereof, that is intentionally submitted to Licensor for -inclusion in the Work by the Rights owner or by an individual or Legal Entity -authorized to submit on behalf of the Rights owner. For the purposes of this -definition, "submitted" means any form of electronic, verbal, or written communication -sent to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor -for the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the Rights -owner as "Not a Contribution." +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently incorporated -within the Work. +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. -2. Grant of License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable license under the Rights to reproduce, -prepare Derivative Works of, publicly display, publicly perform, sublicense, -and distribute the Work and such Derivative Works in Source or Object form -and do anything in relation to the Work as if the Rights did not exist. +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. -3. Grant of Patent License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) patent -license to make, have made, use, offer to sell, sell, import, and otherwise -transfer the Work, where such license applies only to those patent claims -licensable by such Contributor that are necessarily infringed by their Contribution(s) -alone or by combination of their Contribution(s) with the Work to which such -Contribution(s) was submitted. If You institute patent litigation against -any entity (including a cross-claim or counterclaim in a lawsuit) alleging -that the Work or a Contribution incorporated within the Work constitutes direct -or contributory patent infringement, then any patent licenses granted to You -under this License for that Work shall terminate as of the date such litigation -is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, and -in Source or Object form, provided that You meet the following conditions: - -1. You must give any other recipients of the Work or Derivative Works a copy -of this License; and - -2. You must cause any modified files to carry prominent notices stating that -You changed the files; and - -3. You must retain, in the Source form of any Derivative Works that You distribute, -all copyright, patent, trademark, and attribution notices from the Source -form of the Work, excluding those notices that do not pertain to any part -of the Derivative Works; and - -4. If the Work includes a "NOTICE" text file as part of its distribution, -then any Derivative Works that You distribute must include a readable copy -of the attribution notices contained within such NOTICE file, excluding those -notices that do not pertain to any part of the Derivative Works, in at least -one of the following places: within a NOTICE text file distributed as part -of the Derivative Works; within the Source form or documentation, if provided -along with the Derivative Works; or, within a display generated by the Derivative -Works, if and wherever such third-party notices normally appear. The contents -of the NOTICE file are for informational purposes only and do not modify the -License. You may add Your own attribution notices within Derivative Works -that You distribute, alongside or as an addendum to the NOTICE text from the -Work, provided that such additional attribution notices cannot be construed -as modifying the License. You may add Your own copyright statement to Your -modifications and may provide additional or different license terms and conditions -for use, reproduction, or distribution of Your modifications, or for any such -Derivative Works as a whole, provided Your use, reproduction, and distribution -of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any -Contribution intentionally submitted for inclusion in the Work by You to the -Licensor shall be under the terms and conditions of this License, without -any additional terms or conditions. Notwithstanding the above, nothing herein -shall supersede or modify the terms of any separate license agreement you -may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to -in writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR -A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness -of using or redistributing the Work and assume any risks associated with Your -exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether -in tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to -in writing, shall any Contributor be liable to You for damages, including -any direct, indirect, special, incidental, or consequential damages of any -character arising as a result of this License or out of the use or inability -to use the Work (including but not limited to damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses), even if such Contributor has been advised of the possibility -of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work -or Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such obligations, -You may act only on Your own behalf and on Your sole responsibility, not on -behalf of any other Contributor, and only if You agree to indemnify, defend, -and hold each Contributor harmless for any liability incurred by, or claims -asserted against, such Contributor by reason of your accepting any such warranty -or additional liability. END OF TERMS AND CONDITIONS +END OF TERMS AND CONDITIONS APPENDIX: How to apply this license to your work -To apply this license to your work, attach the following boilerplate notice, -with the fields enclosed by brackets "[]" replaced with your own identifying -information. (Don't include the brackets!) The text should be enclosed in -the appropriate comment syntax for the file format. We also recommend that -a file or class name and description of purpose be included on the same "printed -page" as the copyright notice for easier identification within third-party -archives. +To apply this license to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] Copyright and related rights are -licensed under the Solderpad Hardware License, Version 0.51 (the "License"); -you may not use this file except in compliance with the License. You may obtain -a copy of the License at http://solderpad.org/licenses/SHL-0.51. Unless required -by applicable law or agreed to in writing, software, hardware and materials -distributed under this License is distributed on an "AS IS" BASIS, WITHOUT -WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License -for the specific language governing permissions and limitations under the -License. +Copyright [yyyy] [name of copyright owner] Copyright and related rights are licensed under the Solderpad Hardware License, Version 0.51 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://solderpad.org/licenses/SHL-0.51. Unless required by applicable law or agreed to in writing, software, hardware and materials distributed under this License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. diff --git a/options/license/SHL-2.0 b/options/license/SHL-2.0 index 663b636f6..e522a396f 100644 --- a/options/license/SHL-2.0 +++ b/options/license/SHL-2.0 @@ -1,23 +1,22 @@ # Solderpad Hardware Licence Version 2.0 -This licence (the "Licence") operates as a wraparound licence to the Apache License Version 2.0 (the "Apache License") and grants to You the rights, and imposes the obligations, set out in the Apache License (which can be found here: http://apache.org/licenses/LICENSE-2.0), with the following extensions. It must be read in conjunction with the Apache License. Section 1 below modifies definitions in the Apache License, and section 2 below replaces sections 2 of the Apache License. You may, at your option, choose to treat any Work released under this License as released under the Apache License (thus ignoring all sections written below entirely). Words in italics indicate changes rom the Apache License, but are indicative and not to be taken into account in interpretation. +This licence (the “Licence”) operates as a wraparound licence to the Apache License Version 2.0 (the “Apache License”) and grants to You the rights, and imposes the obligations, set out in the Apache License (which can be found here: http://apache.org/licenses/LICENSE-2.0), with the following extensions. It must be read in conjunction with the Apache License. Section 1 below modifies definitions in the Apache License, and section 2 below replaces sections 2 of the Apache License. You may, at your option, choose to treat any Work released under this License as released under the Apache License (thus ignoring all sections written below entirely). Words in italics indicate changes rom the Apache License, but are indicative and not to be taken into account in interpretation. - 1. The definitions set out in the Apache License are modified as follows: +1. The definitions set out in the Apache License are modified as follows: - Copyright any reference to 'copyright' (whether capitalised or not) includes 'Rights' (as defined below). +Copyright any reference to ‘copyright’ (whether capitalised or not) includes ‘Rights’ (as defined below). - Contribution also includes any design, as well as any work of authorship. +Contribution also includes any design, as well as any work of authorship. - Derivative Works shall not include works that remain reversibly separable from, or merely link (or bind by name) or physically connect to or interoperate with the interfaces of the Work and Derivative Works thereof. +Derivative Works shall not include works that remain reversibly separable from, or merely link (or bind by name) or physically connect to or interoperate with the interfaces of the Work and Derivative Works thereof. - Object form shall mean any form resulting from mechanical transformation or translation of a Source form or the application of a Source form to physical material, including but not limited to compiled object code, generated documentation, the instantiation of a hardware design or physical object and conversions to other media types, including intermediate forms such as bytecodes, FPGA bitstreams, moulds, artwork and semiconductor topographies (mask works). +Object form shall mean any form resulting from mechanical transformation or translation of a Source form or the application of a Source form to physical material, including but not limited to compiled object code, generated documentation, the instantiation of a hardware design or physical object and conversions to other media types, including intermediate forms such as bytecodes, FPGA bitstreams, moulds, artwork and semiconductor topographies (mask works). - Rights means copyright and any similar right including design right (whether registered or unregistered), semiconductor topography (mask) rights and database rights (but excluding Patents and Trademarks). +Rights means copyright and any similar right including design right (whether registered or unregistered), semiconductor topography (mask) rights and database rights (but excluding Patents and Trademarks). - Source form shall mean the preferred form for making modifications, including but not limited to source code, net lists, board layouts, CAD files, documentation source, and configuration files. +Source form shall mean the preferred form for making modifications, including but not limited to source code, net lists, board layouts, CAD files, documentation source, and configuration files. +Work also includes a design or work of authorship, whether in Source form or other Object form. - Work also includes a design or work of authorship, whether in Source form or other Object form. +2. Grant of Licence - 2. Grant of Licence - - 2.1 Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license under the Rights to reproduce, prepare Derivative Works of, make, adapt, repair, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form and do anything in relation to the Work as if the Rights did not exist. +2.1 Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license under the Rights to reproduce, prepare Derivative Works of, make, adapt, repair, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form and do anything in relation to the Work as if the Rights did not exist. diff --git a/options/license/SHL-2.1 b/options/license/SHL-2.1 index 9de03f617..4815a9e5e 100644 --- a/options/license/SHL-2.1 +++ b/options/license/SHL-2.1 @@ -2,44 +2,44 @@ SOLDERPAD HARDWARE LICENSE VERSION 2.1 This license operates as a wraparound license to the Apache License Version 2.0 (the "Apache License") and incorporates the terms and conditions of the Apache License (which can be found here: http://apache.org/licenses/LICENSE-2.0), with the following additions and modifications. It must be read in conjunction with the Apache License. Section 1 below modifies definitions and terminology in the Apache License and Section 2 below replaces Section 2 of the Apache License. The Appendix replaces the Appendix in the Apache License. You may, at your option, choose to treat any Work released under this license as released under the Apache License (thus ignoring all sections written below entirely). - 1. Terminology in the Apache License is supplemented or modified as follows: +1. Terminology in the Apache License is supplemented or modified as follows: - "Authorship": any reference to 'authorship' shall be taken to read "authorship or design". +"Authorship": any reference to 'authorship' shall be taken to read "authorship or design". - "Copyright owner": any reference to 'copyright owner' shall be taken to read "Rights owner". +"Copyright owner": any reference to 'copyright owner' shall be taken to read "Rights owner". - "Copyright statement": the reference to 'copyright statement' shall be taken to read 'copyright or other statement pertaining to Rights' +"Copyright statement": the reference to 'copyright statement' shall be taken to read 'copyright or other statement pertaining to Rights' - The following new definition shall be added to the Definitions section of the Apache License: +The following new definition shall be added to the Definitions section of the Apache License: - "Rights" means copyright and any similar right including design right (whether registered or unregistered), rights in semiconductor topographies (mask works) and database rights (but excluding Patents and Trademarks). +"Rights" means copyright and any similar right including design right (whether registered or unregistered), rights in semiconductor topographies (mask works) and database rights (but excluding Patents and Trademarks). - The following definitions shall replace the corresponding definitions in the Apache License: +The following definitions shall replace the corresponding definitions in the Apache License: - "License" shall mean this Solderpad Hardware License version 2.1, being the terms and conditions for use, manufacture, instantiation, adaptation, reproduction, and distribution as defined by Sections 1 through 9 of this document. +"License" shall mean this Solderpad Hardware License version 2.1, being the terms and conditions for use, manufacture, instantiation, adaptation, reproduction, and distribution as defined by Sections 1 through 9 of this document. - "Licensor" shall mean the Rights owner or entity authorized by the Rights owner that is granting the License. +"Licensor" shall mean the Rights owner or entity authorized by the Rights owner that is granting the License. +  +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship or design. For the purposes of this License, Derivative Works shall not include works that remain reversibly separable from, or merely link (or bind by name) or physically connect to or interoperate with the Work and Derivative Works thereof. - "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship or design. For the purposes of this License, Derivative Works shall not include works that remain reversibly separable from, or merely link (or bind by name) or physically connect to or interoperate with the Work and Derivative Works thereof. +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form or the application of a Source form to physical material, including but not limited to compiled object code, generated documentation, the instantiation of a hardware design or physical object or material and conversions to other media types, including intermediate forms such as bytecodes, FPGA bitstreams, moulds, artwork and semiconductor topographies (mask works). - "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form or the application of a Source form to physical material, including but not limited to compiled object code, generated documentation, the instantiation of a hardware design or physical object or material and conversions to other media types, including intermediate forms such as bytecodes, FPGA bitstreams, moulds, artwork and semiconductor topographies (mask works). +"Source" form shall mean the preferred form for making modifications, including but not limited to source code, net lists, board layouts, CAD files, documentation source, and configuration files. - "Source" form shall mean the preferred form for making modifications, including but not limited to source code, net lists, board layouts, CAD files, documentation source, and configuration files. +"Work" shall mean the work of authorship or design, whether in Source or Object form, made available under the License, as indicated by a notice relating to Rights that is included in or attached to the work (an example is provided in the Appendix below). - "Work" shall mean the work of authorship or design, whether in Source or Object form, made available under the License, as indicated by a notice relating to Rights that is included in or attached to the work (an example is provided in the Appendix below). +2. Grant of License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license under the Rights to reproduce, prepare Derivative Works of, make, adapt, repair, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form and do anything in relation to the Work as if the Rights did not exist. - 2. Grant of License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable license under the Rights to reproduce, prepare Derivative Works of, make, adapt, repair, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form and do anything in relation to the Work as if the Rights did not exist. APPENDIX + +APPENDIX Copyright [yyyy] [name of copyright owner] - SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1 Licensed under the Solderpad Hardware License v 2.1 (the "License"); you may not use this file except in compliance with the License, or, at your option, the Apache License version 2.0. - You may obtain a copy of the License at https://solderpad.org/licenses/SHL-2.1/ - + Unless required by applicable law or agreed to in writing, any work distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and limitations under the License. diff --git a/options/license/SISSL b/options/license/SISSL index 90acef9ad..7d6ad9d66 100644 --- a/options/license/SISSL +++ b/options/license/SISSL @@ -1,257 +1,106 @@ Sun Industry Standards Source License - Version 1.1 - 1.0 DEFINITIONS +1.0 DEFINITIONS -1.1 "Commercial Use" means distribution or otherwise making the Original Code -available to a third party. + 1.1 "Commercial Use" means distribution or otherwise making the Original Code available to a third party. -1.2 "Contributor Version" means the combination of the Original Code, and -the Modifications made by that particular Contributor. + 1.2 "Contributor Version" means the combination of the Original Code, and the Modifications made by that particular Contributor. -1.3 "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.3 "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.4 "Executable" means Original Code in any form other than Source Code. + 1.4 "Executable" means Original Code in any form other than Source Code. -1.5 "Initial Developer" means the individual or entity identified as the Initial -Developer in the Source Code notice required by Exhibit A. + 1.5 "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.6 "Larger Work" means a work which combines Original Code or portions thereof -with code not governed by the terms of this License. + 1.6 "Larger Work" means a work which combines Original Code or portions thereof with code not governed by the terms of this License. - 1.7 "License" means this document. + 1.7 "License" means this document. -1.8 "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. + 1.8 "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9 "Modifications" means any addition to or deletion from the substance or -structure of either the Original Code or any previous Modifications. A Modification -is: + 1.9 "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. A Modification is: -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -1.10 "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code. + 1.10 "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code. -1.11 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by grantor. + 1.11 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.12 "Source Code" means the preferred form of the Original Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, or scripts used to control compilation and installation -of an Executable. + 1.12 "Source Code" means the preferred form of the Original Code for making modifications to it, including all modules it contains, plus any associated interface definition files, or scripts used to control compilation and installation of an Executable. - 1.13 "Standards" means the standards identified in Exhibit B. + 1.13 "Standards" means the standards identified in Exhibit B. -1.14 "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You'' includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control'' means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. + 1.14 "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You'' includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control'' means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - 2.0 SOURCE CODE LICENSE +2.0 SOURCE CODE LICENSE -2.1 The Initial Developer Grant The Initial Developer hereby grants You a -world-wide, royalty-free, non-exclusive license, subject to third party intellectual -property claims: + 2.1 The Initial Developer Grant The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:  -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). + (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices, including but not limited to Modifications.  -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. +3.0 DISTRIBUTION OBLIGATIONS -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices, -including but not limited to Modifications. + 3.1 Application of License. The Source Code version of Original Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. Your license for shipment of the Contributor Version is conditioned upon Your full compliance with this Section. The Modifications which You create must comply with all requirements set out by the Standards body in effect one hundred twenty (120) days before You ship the Contributor Version. In the event that the Modifications do not meet such requirements, You agree to publish either (i) any deviation from the Standards protocol resulting from implementation of Your Modifications and a reference implementation of Your Modifications or (ii) Your Modifications in Source Code form, and to make any such deviation and reference implementation or Modifications available to all third parties under the same terms as this license on a royalty free basis within thirty (30) days of Your first customer shipment of Your Modifications. - 3.0 DISTRIBUTION OBLIGATIONS + 3.2 Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add Your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Initial Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Your version of the Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer for any liability incurred by the Initial Developer as a result of warranty, support, indemnity or liability terms You offer. -3.1 Application of License. The Source Code version of Original Code may be -distributed only under the terms of this License or a future version of this -License released under Section 6.1, and You must include a copy of this License -with every copy of the Source Code You distribute. You may not offer or impose -any terms on any Source Code version that alters or restricts the applicable -version of this License or the recipients' rights hereunder. Your license -for shipment of the Contributor Version is conditioned upon Your full compliance -with this Section. The Modifications which You create must comply with all -requirements set out by the Standards body in effect one hundred twenty (120) -days before You ship the Contributor Version. In the event that the Modifications -do not meet such requirements, You agree to publish either (i) any deviation -from the Standards protocol resulting from implementation of Your Modifications -and a reference implementation of Your Modifications or (ii) Your Modifications -in Source Code form, and to make any such deviation and reference implementation -or Modifications available to all third parties under the same terms as this -license on a royalty free basis within thirty (30) days of Your first customer -shipment of Your Modifications. + 3.3 Distribution of Executable Versions. You may distribute Original Code in Executable and Source form only if the requirements of Sections 3.1 and 3.2 have been met for that Original Code, and if You include a notice stating that the Source Code version of the Original Code is available under the terms of this License. The notice must be conspicuously included in any notice in an Executable or Source versions, related documentation or collateral in which You describe recipients' rights relating to the Original Code. You may distribute the Executable and Source versions of Your version of the Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License. If You distribute the Executable and Source versions under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer. You hereby agree to indemnify the Initial Developer for any liability incurred by the Initial Developer as a result of any such terms You offer. -3.2 Required Notices. You must duplicate the notice in Exhibit A in each file -of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be likely to -look for such a notice. If You created one or more Modification(s) You may -add Your name as a Contributor to the notice described in Exhibit A. You must -also duplicate this License in any documentation for the Source Code where -You describe recipients' rights or ownership rights relating to Initial Code. -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Your version of the -Code. However, You may do so only on Your own behalf, and not on behalf of -the Initial Developer. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer for any liability incurred -by the Initial Developer as a result of warranty, support, indemnity or liability -terms You offer. + 3.4 Larger Works. You may create a Larger Work by combining Original Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Original Code. -3.3 Distribution of Executable Versions. You may distribute Original Code -in Executable and Source form only if the requirements of Sections 3.1 and -3.2 have been met for that Original Code, and if You include a notice stating -that the Source Code version of the Original Code is available under the terms -of this License. The notice must be conspicuously included in any notice in -an Executable or Source versions, related documentation or collateral in which -You describe recipients' rights relating to the Original Code. You may distribute -the Executable and Source versions of Your version of the Code or ownership -rights under a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License. -If You distribute the Executable and Source versions under a different license -You must make it absolutely clear that any terms which differ from this License -are offered by You alone, not by the Initial Developer. You hereby agree to -indemnify the Initial Developer for any liability incurred by the Initial -Developer as a result of any such terms You offer. +4.0 INABILITY TO COMPLY DUE TO STATUTE OR REGULATION -3.4 Larger Works. You may create a Larger Work by combining Original Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Original Code. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Original Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.2 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - 4.0 INABILITY TO COMPLY DUE TO STATUTE OR REGULATION +5.0 APPLICATION OF THIS LICENSE -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Original Code due to statute, judicial -order, or regulation then You must: (a) comply with the terms of this License -to the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.2 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Modifications as set out in Section 3.1. - 5.0 APPLICATION OF THIS LICENSE +6.0 VERSIONS OF THE LICENSE -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Modifications as set out in Section 3.1. + 6.1 New Versions. Sun may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. - 6.0 VERSIONS OF THE LICENSE + 6.2 Effect of New Versions. Once Original Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of the License published by Sun. No one other than Sun has the right to modify the terms applicable to Original Code. -6.1 New Versions. Sun may publish revised and/or new versions of the License -from time to time. Each version will be given a distinguishing version number. +7.0 DISCLAIMER OF WARRANTY -6.2 Effect of New Versions. Once Original Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Original Code under -the terms of any subsequent version of the License published by Sun. No one -other than Sun has the right to modify the terms applicable to Original Code. +ORIGINAL CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE ORIGINAL CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ORIGINAL CODE IS WITH YOU. SHOULD ANY ORIGINAL CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY ORIGINAL CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - 7.0 DISCLAIMER OF WARRANTY +8.0 TERMINATION -ORIGINAL CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE ORIGINAL CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR -A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE ORIGINAL CODE IS WITH YOU. SHOULD ANY ORIGINAL CODE -PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER) ASSUME THE -COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF -WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY ORIGINAL -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + 8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Original Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. - 8.0 TERMINATION + 8.2 In the event of termination under Section 8.1 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. -8.1 This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Original Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. +9.0 LIMIT OF LIABILITY -8.2 In the event of termination under Section 8.1 above, all end user license -agreements (excluding distributors and resellers) which have been validly -granted by You or any distributor hereunder prior to termination shall survive -termination. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF ORIGINAL CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - 9.0 LIMIT OF LIABILITY +10.0 U.S. GOVERNMENT END USERS -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF ORIGINAL CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. +U.S. Government: If this Software is being acquired by or on behalf of the U.S. Government or by a U.S. Government prime contractor or subcontractor (at any tier), then the Government's rights in the Software and accompanying documentation shall be only as set forth in this license; this is in accordance with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions). - 10.0 U.S. GOVERNMENT END USERS +11.0 MISCELLANEOUS -U.S. Government: If this Software is being acquired by or on behalf of the -U.S. Government or by a U.S. Government prime contractor or subcontractor -(at any tier), then the Government's rights in the Software and accompanying -documentation shall be only as set forth in this license; this is in accordance -with 48 C.F.R. 227.7201 through 227.7202-4 (for Department of Defense (DoD) -acquisitions) and with 48 C.F.R. 2.101 and 12.212 (for non-DoD acquisitions). +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. - 11.0 MISCELLANEOUS +EXHIBIT A - Sun Standards License -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. EXHIBIT A - -Sun Standards License +"The contents of this file are subject to the Sun Standards License Version 1.1 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at _______________________________. -"The contents of this file are subject to the Sun Standards License Version -1.1 (the "License"); You may not use this file except in compliance with the -License. You may obtain a copy of the License at _______________________________ -. +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either  +express or implied. See the License for the specific language governing rights and limitations under the License. -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either +The Original Code is ______________________________________. -express or implied. See the License for the specific language governing rights -and limitations under the License. - -The Original Code is ______________________________________ . - -The Initial Developer of the Original Code is: Sun Microsystems, Inc. . +The Initial Developer of the Original Code is:  +Sun Microsystems, Inc.. Portions created by: _______________________________________ @@ -260,13 +109,8 @@ are Copyright (C): _______________________________________ All Rights Reserved. Contributor(s): _______________________________________ - EXHIBIT B - Standards The Standard is defined as the following: - OpenOffice.org XML File Format Specification, located at http://xml.openoffice.org - -OpenOffice.org Application Programming Interface Specification, located at - -http://api.openoffice.org +OpenOffice.org Application Programming Interface Specification, located at http://api.openoffice.org diff --git a/options/license/SISSL-1.2 b/options/license/SISSL-1.2 index f08ce325d..0809ea147 100644 --- a/options/license/SISSL-1.2 +++ b/options/license/SISSL-1.2 @@ -1,245 +1,113 @@ - - SUN INDUSTRY STANDARDS SOURCE LICENSE - Version 1.2 +1.0 DEFINITIONS - 1.0 DEFINITIONS + 1.1 Commercial Use means distribution or otherwise making the Original Code available to a third party. -1.1 Commercial Use means distribution or otherwise making the Original Code -available to a third party. + 1.2 Contributor Version means the combination of the Original Code, and the Modifications made by that particular Contributor. -1.2 Contributor Version means the combination of the Original Code, and the -Modifications made by that particular Contributor. + 1.3 Electronic Distribution Mechanism means a mechanism generally accepted in the software development community for the electronic transfer of data. -1.3 Electronic Distribution Mechanism means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4 Executable means Original Code in any form other than Source Code. - 1.4 Executable means Original Code in any form other than Source Code. + 1.5 Initial Developer means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.5 Initial Developer means the individual or entity identified as the Initial -Developer in the Source Code notice required by Exhibit A. + 1.6 Larger Work means a work which combines Original Code or portions thereof with code not governed by the terms of this License. -1.6 Larger Work means a work which combines Original Code or portions thereof -with code not governed by the terms of this License. + 1.7 License means this document. - 1.7 License means this document. + 1.8 Licensable means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.8 Licensable means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. + 1.9 Modifications means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. A Modification is: -1.9 Modifications means any addition to or deletion from the substance or -structure of either the Original Code or any previous Modifications. A Modification -is: + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -B. Any new file that contains any part of the Original Code or previous Modifications. + 1.10 Original Code means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code. -1.10 Original Code means Source Code of computer software code which is described -in the Source Code notice required by Exhibit A as Original Code. + 1.11 Patent Claims means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.11 Patent Claims means any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by grantor. + 1.12 Source Code means the preferred form of the Original Code for making modifications to it, including all modules it contains, plus any associated interface definition files, or scripts used to control compilation and installation of an Executable. -1.12 Source Code means the preferred form of the Original Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, or scripts used to control compilation and installation -of an Executable. + 1.13 Standards means the standards identified in Exhibit B. - 1.13 Standards means the standards identified in Exhibit B. + 1.14 You (or Your) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, You includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, control means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. -1.14 You (or Your) means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, You includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, control means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. +2.0 SOURCE CODE LICENSE - 2.0 SOURCE CODE LICENSE + 2.1 The Initial Developer Grant The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: -2.1 The Initial Developer Grant The Initial Developer hereby grants You a -world-wide, royalty-free, non-exclusive license, subject to third party intellectual -property claims: + (a)under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and - + (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). -(a)under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices, including but not limited to Modifications. -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. +3.0 DISTRIBUTION OBLIGATIONS -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices, -including but not limited to Modifications. + 3.1 Application of License. The Source Code version of Original Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients rights hereunder. Your license for shipment of the Contributor Version is conditioned upon Your full compliance with this Section. The Modifications which You create must comply with all requirements set out by the Standards body in effect one hundred twenty (120) days before You ship the Contributor Version. In the event that the Modifications do not meet such requirements, You agree to publish either (i) any deviation from the Standards protocol resulting from implementation of Your Modifications and a reference implementation of Your Modifications or (ii) Your Modifications in Source Code form, and to make any such deviation and reference implementation or Modifications available to all third parties under the same terms a this license on a royalty free basis within thirty (30) days of Your first customer shipment of Your Modifications. Additionally, in the event that the Modifications you create do not meet the requirements set out in this Section, You agree to comply with the Standards requirements set out in Exhibit B. - 3.0 DISTRIBUTION OBLIGATIONS + 3.2 Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add Your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients rights or ownership rights relating to Initial Code. -3.1 Application of License. The Source Code version of Original Code may be -distributed only under the terms of this License or a future version of this -License released under Section 6.1, and You must include a copy of this License -with every copy of the Source Code You distribute. You may not offer or impose -any terms on any Source Code version that alters or restricts the applicable -version of this License or the recipients rights hereunder. Your license for -shipment of the Contributor Version is conditioned upon Your full compliance -with this Section. The Modifications which You create must comply with all -requirements set out by the Standards body in effect one hundred twenty (120) -days before You ship the Contributor Version. In the event that the Modifications -do not meet such requirements, You agree to publish either (i) any deviation -from the Standards protocol resulting from implementation of Your Modifications -and a reference implementation of Your Modifications or (ii) Your Modifications -in Source Code form, and to make any such deviation and reference implementation -or Modifications available to all third parties under the same terms a this -license on a royalty free basis within thirty (30) days of Your first customer -shipment of Your Modifications. Additionally, in the event that the Modifications -you create do not meet the requirements set out in this Section, You agree -to comply with the Standards requirements set out in Exhibit B. + You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Your version of the Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer for any liability incurred by the Initial Developer as a result of warranty, support, indemnity or liability terms You offer. -3.2 Required Notices. You must duplicate the notice in Exhibit A in each file -of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be likely to -look for such a notice. If You created one or more Modification(s) You may -add Your name as a Contributor to the notice described in Exhibit A. You must -also duplicate this License in any documentation for the Source Code where -You describe recipients rights or ownership rights relating to Initial Code. + 3.3 Distribution of Executable Versions. You may distribute Original Code in Executable and Source form only if the requirements of Sections 3.1 and 3.2 have been met for that Original Code, and if You include a notice stating that the Source Code version of the Original Code is available under the terms of this License. The notice must be conspicuously included in any notice in an Executable or Source versions, related documentation or collateral in which You describe recipients rights relating to the Original Code. You may distribute the Executable and Source versions of Your version of the Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License. If You distribute the Executable and Source versions under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer. You hereby agree to indemnify the Initial Developer for any liability incurred by the Initial Developer as a result of any such terms You offer. -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Your version of the -Code. However, You may do so only on Your own behalf, and not on behalf of -the Initial Developer. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer for any liability incurred -by the Initial Developer as a result of warranty, support, indemnity or liability -terms You offer. + 3.4 Larger Works. You may create a Larger Work by combining Original Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Original Code. -3.3 Distribution of Executable Versions. You may distribute Original Code -in Executable and Source form only if the requirements of Sections 3.1 and -3.2 have been met for that Original Code, and if You include a notice stating -that the Source Code version of the Original Code is available under the terms -of this License. The notice must be conspicuously included in any notice in -an Executable or Source versions, related documentation or collateral in which -You describe recipients rights relating to the Original Code. You may distribute -the Executable and Source versions of Your version of the Code or ownership -rights under a license of Your choice, which may contain terms different from -this License, provided that You are in compliance with the terms of this License. -If You distribute the Executable and Source versions under a different license -You must make it absolutely clear that any terms which differ from this License -are offered by You alone, not by the Initial Developer. You hereby agree to -indemnify the Initial Developer for any liability incurred by the Initial -Developer as a result of any such terms You offer. +4.0 INABILITY TO COMPLY DUE TO STATUTE OR REGULATION -3.4 Larger Works. You may create a Larger Work by combining Original Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Original Code. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Original Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.2 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. - 4.0 INABILITY TO COMPLY DUE TO STATUTE OR REGULATION +5.0 APPLICATION OF THIS LICENSE -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Original Code due to statute, judicial -order, or regulation then You must: (a) comply with the terms of this License -to the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.2 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Modifications as set out in Section 3.1. - 5.0 APPLICATION OF THIS LICENSE +6.0 VERSIONS OF THE LICENSE -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Modifications as set out in Section 3.1. + 6.1 New Versions. Sun may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. - 6.0 VERSIONS OF THE LICENSE + 6.2 Effect of New Versions. Once Original Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of the License published by Sun. No one other than Sun has the right to modify the terms applicable to Original Code. -6.1 New Versions. Sun may publish revised and/or new versions of the License -from time to time. Each version will be given a distinguishing version number. +7.0 DISCLAIMER OF WARRANTY -6.2 Effect of New Versions. Once Original Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Original Code under -the terms of any subsequent version of the License published by Sun. No one -other than Sun has the right to modify the terms applicable to Original Code. +ORIGINAL CODE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE ORIGINAL CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE ORIGINAL CODE IS WITH YOU. SHOULD ANY ORIGINAL CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY ORIGINAL CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - 7.0 DISCLAIMER OF WARRANTY +8.0 TERMINATION -ORIGINAL CODE IS PROVIDED UNDER THIS LICENSE ON AN AS IS BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE ORIGINAL CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE ORIGINAL CODE IS WITH YOU. SHOULD ANY ORIGINAL CODE PROVE DEFECTIVE -IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER) ASSUME THE COST OF ANY NECESSARY -SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN -ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY ORIGINAL CODE IS AUTHORIZED -HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + 8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Original Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. 8.2 In the event of termination under Section 8.1 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. - 8.0 TERMINATION -8.1 This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Original Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. 8.2 In the event of termination under Section -8.1 above, all end user license agreements (excluding distributors and resellers) -which have been validly granted by You or any distributor hereunder prior -to termination shall survive termination. EXHIBIT A - Sun Industry Standards -Source License - -"The contents of this file are subject to the Sun Industry Standards Source -License Version 1.2 (the License); You +EXHIBIT A - Sun Industry Standards Source License +"The contents of this file are subject to the Sun Industry Standards Source License Version 1.2 (the License); You may not use this file except in compliance with the License." "You may obtain a copy of the License at gridengine.sunsource.net/license.html" -"Software distributed under the License is distributed on an AS IS basis, -WITHOUT WARRANTY OF ANY KIND, either express or - -implied. See the License for the specific language governing rights and limitations -under the License." +"Software distributed under the License is distributed on an AS IS basis, WITHOUT WARRANTY OF ANY KIND, either express or +implied. See the License for the specific language governing rights and limitations under the License." "The Original Code is Grid Engine." "The Initial Developer of the Original Code is: - Sun Microsystems, Inc." -"Portions created by: Sun Microsystems, Inc. are Copyright (C) 2001 Sun Microsystems, -Inc." +"Portions created by: Sun Microsystems, Inc. are Copyright (C) 2001 Sun Microsystems, Inc." "All Rights Reserved." -"Contributor(s): __________________________________" +"Contributor(s):__________________________________" EXHIBIT B - Standards -1.0 Requirements for project Standards. The requirements for project Standards -are version-dependent and are defined at: Grid Engine standards. +1.0 Requirements for project Standards. The requirements for project Standards are version-dependent and are defined at: Grid Engine standards. -2.0 Additional requirements. The additional requirements pursuant to Section -3.1 are defined as: +2.0 Additional requirements. The additional requirements pursuant to Section 3.1 are defined as: -2.1 Naming Conventions. If any of your Modifications do not meet the requirements -of the Standard, then you must change the product name so that Grid Engine, -gridengine, gridengine.sunsource, and similar naming conventions are not used. + 2.1 Naming Conventions. If any of your Modifications do not meet the requirements of the Standard, then you must change the product name so that Grid Engine, gridengine, gridengine.sunsource, and similar naming conventions are not used. -2.2 Compliance Claims. If any of your Modifications do not meet the requirements -of the Standards you may not claim, directly or indirectly, that your implementation -of the Standards is compliant. + 2.2 Compliance Claims. If any of your Modifications do not meet the requirements of the Standards you may not claim, directly or indirectly, that your implementation of the Standards is compliant. diff --git a/options/license/SMLNJ b/options/license/SMLNJ index 307e2cc36..8b49442a6 100644 --- a/options/license/SMLNJ +++ b/options/license/SMLNJ @@ -1,19 +1,7 @@ -STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER. Copyright -(c) 2001-2011 by The Fellowship of SML/NJ +STANDARD ML OF NEW JERSEY COPYRIGHT NOTICE, LICENSE AND DISCLAIMER. -Copyright (c) 1989-2001 by Lucent Technologies +Copyright (c) 2001-2011 by The Fellowship of SML/NJ Copyright (c) 1989-2001 by Lucent Technologies -Permission to use, copy, modify, and distribute this software and its documentation -for any purpose and without fee is hereby granted, provided that the above -copyright notice appear in all copies and that both the copyright notice and -this permission notice and warranty disclaimer appear in supporting documentation, -and that the name of Lucent Technologies, Bell Labs or any Lucent entity not -be used in advertising or publicity pertaining to distribution of the software -without specific, written prior permission. +Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both the copyright notice and this permission notice and warranty disclaimer appear in supporting documentation, and that the name of Lucent Technologies, Bell Labs or any Lucent entity not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. -Lucent disclaims all warranties with regard to this software, including all -implied warranties of merchantability and fitness. In no event shall Lucent -be liable for any special, indirect or consequential damages or any damages -whatsoever resulting from loss of use, data or profits, whether in an action -of contract, negligence or other tortious action, arising out of or in connection -with the use or performance of this software. +Lucent disclaims all warranties with regard to this software, including all implied warranties of merchantability and fitness. In no event shall Lucent be liable for any special, indirect or consequential damages or any damages whatsoever resulting from loss of use, data or profits, whether in an action of contract, negligence or other tortious action, arising out of or in connection with the use or performance of this software. diff --git a/options/license/SMPPL b/options/license/SMPPL index 071d45641..1780a306d 100644 --- a/options/license/SMPPL +++ b/options/license/SMPPL @@ -2,61 +2,28 @@ Secure Messaging Protocol (SMP) Libraries [ACL, CML, SFL] Distribution Rights -All source code for the SMP is being provided at no cost and with no financial -limitations regarding its use and distribution. Organizations can use the -SMP without paying any royalties or licensing fees. The SMP was originally -developed by the U.S. Government. BAE Systems is enhancing and supporting -the SMP under contract to the U.S. Government. The U.S. Government is furnishing -the SMP software at no cost to the vendor subject to the conditions of the -SMP Public License provided with the SMP software. +All source code for the SMP is being provided at no cost and with no financial limitations regarding its use and distribution. Organizations can use the SMP without paying any royalties or licensing fees. The SMP was originally developed by the U.S. Government. BAE Systems is enhancing and supporting the SMP under contract to the U.S. Government. The U.S. Government is furnishing the SMP software at no cost to the vendor subject to the conditions of the SMP Public License provided with the SMP software. 29 May 2002 Secure Messaging Protocol (SMP) Public License -The United States Government/Department of Defense/National Security Agency/Office -of Network Security (collectively "the U.S. Government") hereby grants permission -to any person obtaining a copy of the SMP source and object files (the "SMP -Software") and associated documentation files (the "SMP Documentation"), or -any portions thereof, to do the following, subject to the following license -conditions: +The United States Government/Department of Defense/National Security Agency/Office of Network Security (collectively "the U.S. Government") hereby grants permission to any person obtaining a copy of the SMP source and object files (the "SMP Software") and associated documentation files (the "SMP Documentation"), or any portions thereof, to do the following, subject to the following license conditions: -You may, free of charge and without additional permission from the U.S. Government, -use, copy, modify, sublicense and otherwise distribute the SMP Software or -components of the SMP Software, with or without modifications developed by -you and/or by others. +You may, free of charge and without additional permission from the U.S. Government, use, copy, modify, sublicense and otherwise distribute the SMP Software or components of the SMP Software, with or without modifications developed by you and/or by others. -You may, free of charge and without additional permission from the U.S. Government, -distribute copies of the SMP Documentation, with or without modifications -developed by you and/or by others, at no charge or at a charge that covers -the cost of reproducing such copies, provided that this SMP Public License -is retained. +You may, free of charge and without additional permission from the U.S. Government, distribute copies of the SMP Documentation, with or without modifications developed by you and/or by others, at no charge or at a charge that covers the cost of reproducing such copies, provided that this SMP Public License is retained. -Furthermore, if you distribute the SMP Software or parts of the SMP Software, -with or without modifications developed by you and/or others, then you must -either make available the source code to all portions of the SMP Software -(exclusive of any modifications made by you and/or by others) upon request, -or instead you may notify anyone requesting the SMP Software source code that -it is freely available from the U.S. Government. +Furthermore, if you distribute the SMP Software or parts of the SMP Software, with or without modifications developed by you and/or others, then you must either make available the source code to all portions of the SMP Software (exclusive of any modifications made by you and/or by others) upon request, or instead you may notify anyone requesting the SMP Software source code that it is freely available from the U.S. Government. -Transmission of this SMP Public License must accompany whatever portions of -the SMP Software you redistribute. +Transmission of this SMP Public License must accompany whatever portions of the SMP Software you redistribute. -The SMP Software is provided without warranty or guarantee of any nature, -express or implied, including without limitation the warranties of merchantability -and fitness for a particular purpose. +The SMP Software is provided without warranty or guarantee of any nature, express or implied, including without limitation the warranties of merchantability and fitness for a particular purpose. -The U.S. Government cannot be held liable for any damages either directly -or indirectly caused by the use of the SMP Software. +The U.S. Government cannot be held liable for any damages either directly or indirectly caused by the use of the SMP Software. -It is not permitted to copy, sublicense, distribute or transfer any of the -SMP Software except as expressly indicated herein. Any attempts to do otherwise -will be considered a violation of this License and your rights to the SMP -Software will be voided. +It is not permitted to copy, sublicense, distribute or transfer any of the SMP Software except as expressly indicated herein. Any attempts to do otherwise will be considered a violation of this License and your rights to the SMP Software will be voided. -The SMP uses the Enhanced SNACC (eSNACC) Abstract Syntax Notation One (ASN.1) -C++ Library to ASN.1 encode and decode security-related data objects. The -eSNACC ASN.1 C++ Library is covered by the ENHANCED SNACC SOFTWARE PUBLIC -LICENSE. None of the GNU public licenses apply to the eSNACC ASN.1 C++ Library. -The eSNACC Compiler is not distributed as part of the SMP. Copyright © 1997-2002 -National Security Agency +The SMP uses the Enhanced SNACC (eSNACC) Abstract Syntax Notation One (ASN.1) C++ Library to ASN.1 encode and decode security-related data objects. The eSNACC ASN.1 C++ Library is covered by the ENHANCED SNACC SOFTWARE PUBLIC LICENSE. None of the GNU public licenses apply to the eSNACC ASN.1 C++ Library. The eSNACC Compiler is not distributed as part of the SMP. + +Copyright © 1997-2002 National Security Agency diff --git a/options/license/SNIA b/options/license/SNIA index 227182eee..285798e82 100644 --- a/options/license/SNIA +++ b/options/license/SNIA @@ -1,372 +1,117 @@ STORAGE NETWORKING INDUSTRY ASSOCIATION - PUBLIC LICENSE - Version 1.1 - 1. Definitions. +1. Definitions. -1.1 "Commercial Use" means distribution or otherwise making the Covered Code -available to a third party. +1.1 "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.2 "Contributor" means each entity that creates or contributes to the creation -of Modifications. +1.2 "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.3 "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. +1.3 "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.4 "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. +1.4 "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.5 "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. +1.5 "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.6 "Executable" means Covered Code in any form other than Source Code. +1.6 "Executable" means Covered Code in any form other than Source Code. -1.7 "Initial Developer" means the individual or entity identified as the Initial -Developer in the Source Code notice required by Exhibit A. +1.7 "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.8 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. +1.8 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.9 "License" means this document. +1.9 "License" means this document. -1.10 "Licensable" means having the right to grant, to the maximum extent possible, -whether at the time of the initial grant or subsequently acquired, any and -all of the rights conveyed herein. +1.10 "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.11 "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: +1.11 "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. +1.12 "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -B. Any new file that contains any part of the Original Code or previous Modifications. +1.13 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.12 "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. +1.14 "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.13 "Patent Claims" means any patent claim(s), now owned or hereafter acquired, -including without limitation, method, process, and apparatus claims, in any -patent Licensable by grantor. +1.15 "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity -1.14 "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. +2. Source Code License. -1.15 "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity +2.1 The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + (b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices. - 2. Source Code License. +2.2 Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. -2.1 The Initial Developer Grant. The Initial Developer hereby grants You a -world-wide, royalty-free, non-exclusive license, subject to third party intellectual -property claims: +3. Distribution Obligations. -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and +3.1 Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. -(b) under Patents Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). +3.2 Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. +3.3 Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: i) the modification of the Original -Code or ii) the combination of the Original Code with other software or devices. +3.4 Intellectual Property Matters. + (a) Third Party Claims. If Contributor has actual knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter. + (b) Contributor API's. If Contributor's Modifications include an application programming interface and Contributor has actual knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. -2.2 Contributor Grant. Subject to third party intellectual property claims, -each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license +3.5 Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be most likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear that any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability (excluding any liability arising from intellectual property claims relating to the Covered Code) incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and +3.6 Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligation of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability (excluding any liability arising from intellectual property claims relating to the Covered Code) incurred by the Initial Developer or such Contributor as a result of any such terms You offer. -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). +3.7 Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. +4. Inability to Comply Due to Statute or Regulation. If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. +5. Application of this License. This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. - 3. Distribution Obligations. +6. Versions of the License. -3.1 Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. +6.1 New Versions. The Storage Networking Industry Association (the "SNIA") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. -3.2 Availability of Source Code. Any Modification which You create or to which -You contribute must be made available in Source Code form under the terms -of this License either on the same media as an Executable version or via an -accepted Electronic Distribution Mechanism to anyone to whom you made an Executable -version available; and if made available via Electronic Distribution Mechanism, -must remain available for at least twelve (12) months after the date it initially -became available, or at least six (6) months after a subsequent version of -that particular Modification has been made available to such recipients. You -are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. +6.2 Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by the SNIA. No one other than the SNIA has the right to modify the terms applicable to Covered Code created under this License. -3.3 Description of Modifications. You must cause all Covered Code to which -You contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. +6.3 Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "Storage Networking Industry Association," "SNIA," or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the SNIA Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) - 3.4 Intellectual Property Matters. +7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -(a) Third Party Claims. If Contributor has actual knowledge that a license -under a third party's intellectual property rights is required to exercise -the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor -must include a text file with the Source Code distribution titled "LEGAL" -which describes the claim and the party making the claim in sufficient detail -that a recipient will know whom to contact. If Contributor obtains such knowledge -after the Modification is made available as described in Section 3.2, Contributor -shall promptly modify the LEGAL file in all copies Contributor makes available -thereafter. +8. TERMINATION. -(b) Contributor API's. If Contributor's Modifications include an application -programming interface and Contributor has actual knowledge of patent licenses -which are reasonably necessary to implement that API, Contributor must also -include this information in the LEGAL file. +8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within a reasonable time after becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. -(c) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. +8.2 If You initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: o (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. -3.5 Required Notices. You must duplicate the notice in Exhibit A in each file -of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be most likely -to look for such a notice. If You created one or more Modification(s) You -may add your name as a Contributor to the notice described in Exhibit A. You -must also duplicate this License in any documentation for the Source Code -where You describe recipients' rights or ownership rights relating to Covered -Code. You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered Code. -However, You may do so only on Your own behalf, and not on behalf of the Initial -Developer or any Contributor. You must make it absolutely clear that any such -warranty, support, indemnity or liability obligation is offered by You alone, -and You hereby agree to indemnify the Initial Developer and every Contributor -for any liability (excluding any liability arising from intellectual property -claims relating to the Covered Code) incurred by the Initial Developer or -such Contributor as a result of warranty, support, indemnity or liability -terms You offer. +8.3 If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. -3.6 Distribution of Executable Versions. You may distribute Covered Code in -Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligation -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code or ownership rights under a license of Your choice, -which may contain terms different from this License, provided that You are -in compliance with the terms of this License and that the license for the -Executable version does not attempt to limit or alter the recipient's rights -in the Source Code version from the rights set forth in this License. If You -distribute the Executable version under a different license You must make -it absolutely clear that any terms which differ from this License are offered -by You alone, not by the Initial Developer or any Contributor. You hereby -agree to indemnify the Initial Developer and every Contributor for any liability -(excluding any liability arising from intellectual property claims relating -to the Covered Code) incurred by the Initial Developer or such Contributor -as a result of any such terms You offer. +8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. -3.7 Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. +9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -4. Inability to Comply Due to Statute or Regulation. If it is impossible for -You to comply with any of the terms of this License with respect to some or -all of the Covered Code due to statute, judicial order, or regulation then -You must: (a) comply with the terms of this License to the maximum extent -possible; and (b) describe the limitations and the code they affect. Such -description must be included in the LEGAL file described in Section 3.4 and -must be included with all distributions of the Source Code. Except to the -extent prohibited by statute or regulation, such description must be sufficiently -detailed for a recipient of ordinary skill to be able to understand it. +10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -5. Application of this License. This License applies to code to which the -Initial Developer has attached the notice in Exhibit A and to related Covered -Code. +11. MISCELLANEOUS This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. - 6. Versions of the License. +12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. -6.1 New Versions. The Storage Networking Industry Association (the "SNIA") -may publish revised and/or new versions of the License from time to time. -Each version will be given a distinguishing version number. +13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of this License or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. -6.2 Effect of New Versions. Once Covered Code has been published under a particular -version of the License, You may always continue to use it under the terms -of that version. You may also choose to use such Covered Code under the terms -of any subsequent version of the License published by the SNIA. No one other -than the SNIA has the right to modify the terms applicable to Covered Code -created under this License. +14. ACCEPTANCE. This License is accepted by You if You retain, use, or distribute the Covered Code for any purpose. -6.3 Derivative Works. If You create or use a modified version of this License -(which you may only do in order to apply it to code which is not already Covered -Code governed by this License), You must (a) rename Your license so that the -phrases "Storage Networking Industry Association," "SNIA," or any confusingly -similar phrase do not appear in your license (except to note that your license -differs from this License) and (b) otherwise make it clear that Your version -of the license contains terms which differ from the SNIA Public License. (Filling -in the name of the Initial Developer, Original Code or Contributor in the -notice described in Exhibit A shall not of themselves be deemed to be modifications -of this License.) +EXHIBIT A The SNIA Public License. -7. DISCLAIMER OF WARRANTY. COVERED CODE IS PROVIDED UNDER THIS LICENSE ON -AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, -INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF -DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE -ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH -YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE -INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY -SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN -ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER -EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -8.1 This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -a reasonable time after becoming aware of the breach. All sublicenses to the -Covered Code which are properly granted shall survive any termination of this -License. Provisions which, by their nature, must remain in effect beyond the -termination of this License shall survive. - -8.2 If You initiate litigation by asserting a patent infringement claim (excluding -declaratory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: o (a) such Participant's Contributor Version -directly or indirectly infringes any patent, then any and all rights granted -by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, -upon 60 days notice from Participant terminate prospectively, unless if within -60 days after receipt of notice You either: (i) agree in writing to pay Participant -a mutually agreeable reasonable royalty for Your past and future use of Modifications -made by such Participant, or (ii) withdraw Your litigation claim with respect -to the Contributor Version against such Participant. If within 60 days of -notice, a reasonable royalty and payment arrangement are not mutually agreed -upon in writing by the parties or the litigation claim is not withdrawn, the -rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically -terminate at the expiration of the 60 day notice period specified above. - -8.3 If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user -license agreements (excluding distributors and resellers) which have been -validly granted by You or any distributor hereunder prior to termination shall -survive termination. - -9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, -WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE -INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, -OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, -SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER -FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, -EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. -THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL -INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW -PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR -LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION -MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. The Covered Code is a "commercial item," as -that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial -computer software" and "commercial computer software documentation," as such -terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. -12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government -End Users acquire Covered Code with only those rights set forth herein. - -11. MISCELLANEOUS This License represents the complete agreement concerning -subject matter hereof. If any provision of this License is held to be unenforceable, -such provision shall be reformed only to the extent necessary to make it enforceable. -This License shall be governed by California law provisions (except to the -extent applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. Any law or regulation -which provides that the language of a contract shall be construed against -the drafter shall not apply to this License. - -12. RESPONSIBILITY FOR CLAIMS. As between Initial Developer and the Contributors, -each party is responsible for claims and damages arising, directly or indirectly, -out of its utilization of rights under this License and You agree to work -with Initial Developer and Contributors to distribute such responsibility -on an equitable basis. Nothing herein is intended or shall be deemed to constitute -any admission of liability. - -13. MULTIPLE-LICENSED CODE. Initial Developer may designate portions of the -Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial -Developer permits you to utilize portions of the Covered Code under Your choice -of this License or the alternative licenses, if any, specified by the Initial -Developer in the file described in Exhibit A. - -14. ACCEPTANCE. This License is accepted by You if You retain, use, or distribute -the Covered Code for any purpose. EXHIBIT A The SNIA Public License. - -The contents of this file are subject to the SNIA Public License Version 1.0 -(the "License"); you may not use this file except in compliance with the License. -You may obtain a copy of the License at +The contents of this file are subject to the SNIA Public License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at www.snia.org/smi/developers/cim/ -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is . diff --git a/options/license/SPL-1.0 b/options/license/SPL-1.0 index e5f988dc1..2ee64f3ef 100644 --- a/options/license/SPL-1.0 +++ b/options/license/SPL-1.0 @@ -1,408 +1,149 @@ SUN PUBLIC LICENSE Version 1.0 - 1. Definitions. +1. Definitions. -1.0.1. "Commercial Use" means distribution or otherwise making the Covered -Code available to a third party. + 1.0.1. "Commercial Use" means distribution or otherwise making the Covered Code available to a third party. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof -and corresponding documentation released with the source code. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof and corresponding documentation released with the source code. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. - -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: - -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. - -B. Any new file that contains any part of the Original Code or previous Modifications. - -1.10. "Original Code"../ means Source Code of computer software code which -is described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. - -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. - -1.11. "Source Code"../ means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -documentation, interface definition files, scripts used to control compilation -and installation of an Executable, or source code differential comparisons -against either the Original Code or another well known, available Covered -Code of the Contributor's choice. The Source Code can be in a compressed or -archival form, provided the appropriate decompression or de-archiving software -is widely available for no charge. - -1.12. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control"../ means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. - - 2. Source Code License. - -2.1 The Initial Developer Grant. The Initial Developer hereby grants You a -world-wide, royalty-free, non-exclusive license, subject to third party intellectual -property claims: - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and - -(b) under Patent Claims infringed by the making, using or selling of Original -Code, to make, have made, use, practice, sell, and offer for sale, and/or -otherwise dispose of the Original Code (or portions thereof). - -(c) the licenses granted in this Section 2.1(a) and (b) are effective on the -date Initial Developer first distributes Original Code under the terms of -this License. - -(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) -for code that You delete from the Original Code; 2) separate from the Original -Code; or 3) for infringements caused by: - - i) the modification of the Original Code or - -ii) the combination of the Original Code with other software or devices. - -2.2. Contributor Grant. Subject to third party intellectual property claims, -each Contributor hereby grants You a world-wide, royalty-free, non-exclusive -license - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and - -b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). - -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. - -(d) notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. - - 3. Distribution Obligations. - -3.1. Application of License. The Modifications which You create or to which -You contribute are governed by the terms of this License, including without -limitation Section 2.2. The Source Code version of Covered Code may be distributed -only under the terms of this License or a future version of this License released -under Section 6.1, and You must include a copy of this License with every -copy of the Source Code You distribute. You may not offer or impose any terms -on any Source Code version that alters or restricts the applicable version -of this License or the recipients' rights hereunder. However, You may include -an additional document offering the additional rights described in Section -3.5. - -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable version or -via an accepted Electronic Distribution Mechanism to anyone to whom you made -an Executable version available; and if made available via Electronic Distribution -Mechanism, must remain available for at least twelve (12) months after the -date it initially became available, or at least six (6) months after a subsequent -version of that particular Modification has been made available to such recipients. -You are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. - -3.3. Description of Modifications. You must cause all Covered Code to which -You contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. - - 3.4. Intellectual Property Matters. - -(a) Third Party Claims. If Contributor has knowledge that a license under -a third party's intellectual property rights is required to exercise the rights -granted by such Contributor under Sections 2.1 or 2.2, Contributor must include -a text file with the Source Code distribution titled "../LEGAL'' which describes -the claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Code that new knowledge has been obtained. - -(b) Contributor APIs. If Contributor's Modifications include an application -programming interface ("API"../) and Contributor has knowledge of patent licenses -which are reasonably necessary to implement that API, Contributor must also -include this information in the LEGAL file. - -(c) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. - -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be likely to -look for such a notice. If You created one or more Modification(s) You may -add your name as a Contributor to the notice described in Exhibit A. You must -also duplicate this License in any documentation for the Source Code where -You describe recipients' rights or ownership rights relating to Covered Code. -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Covered Code. However, -You may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for -any liability incurred by the Initial Developer or such Contributor as a result -of warranty, support, indemnity or liability terms You offer. - -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligations -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code or ownership rights under a license of Your choice, -which may contain terms different from this License, provided that You are -in compliance with the terms of this License and that the license for the -Executable version does not attempt to limit or alter the recipient's rights -in the Source Code version from the rights set forth in this License. If You -distribute the Executable version under a different license You must make -it absolutely clear that any terms which differ from this License are offered -by You alone, not by the Initial Developer or any Contributor. You hereby -agree to indemnify the Initial Developer and every Contributor for any liability -incurred by the Initial Developer or such Contributor as a result of any such -terms You offer. - -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. - - 4. Inability to Comply Due to Statute or Regulation. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. - - 5. Application of this License. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - - 6. Versions of the License. - -6.1. New Versions. Sun Microsystems, Inc. ("Sun") may publish revised and/or -new versions of the License from time to time. Each version will be given -a distinguishing version number. - -6.2. Effect of New Versions. Once Covered Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Covered Code under -the terms of any subsequent version of the License published by Sun. No one -other than Sun has the right to modify the terms applicable to Covered Code -created under this License. - -6.3. Derivative Works. If You create or use a modified version of this License -(which you may only do in order to apply it to code which is not already Covered -Code governed by this License), You must: (a) rename Your license so that -the phrases "Sun," "Sun Public License," or "SPL"../ or any confusingly similar -phrase do not appear in your license (except to note that your license differs -from this License) and (b) otherwise make it clear that Your version of the -license contains terms which differ from the Sun Public License. (Filling -in the name of the Initial Developer, Original Code or Contributor in the -notice described in Exhibit A shall not of themselves be deemed to be modifications -of this License.) - - 7. DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "../AS IS'' BASIS, WITHOUT -WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, -WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR -A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY -AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE -DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) -ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8. TERMINATION. - -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - -8.2. If You initiate litigation by asserting a patent infringement claim (excluding -declaratory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: - -(a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. - -(b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. - -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - - 9. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10. U.S. GOVERNMENT END USERS. - -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation,"../ as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. - - 11. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. - - 12. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - - 13. MULTIPLE-LICENSED CODE. - -Initial Developer may designate portions of the Covered Code as ?Multiple-Licensed?. -?Multiple-Licensed? means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the alternative licenses, -if any, specified by the Initial Developer in the file described in Exhibit -A. Exhibit A -Sun Public License Notice. - -The contents of this file are subject to the Sun Public License Version 1.0 -(the License); you may not use this file except in compliance with the License. -A copy of the License is available at http://www.sun.com/ - -The Original Code is _________________ . The Initial Developer of the Original -Code is ___________ . Portions created by ______ are Copyright (C) _________ -. All Rights Reserved. - -Contributor(s): ______________________________________ . - -Alternatively, the contents of this file may be used under the terms of the -_____ license (the ?[___] License? ), in which case the provisions of [______] -License are applicable instead of those above. If you wish to allow use of -your version of this file only under the terms of the [____] License and not -to allow others to use your version of this file under the SPL, indicate your -decision by deleting the provisions above and replace them with the notice -and other provisions required by the [___] License. If you do not delete the -provisions above, a recipient may use your version of this file under either -the SPL or the [___] License. - -[NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] + 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. + + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: + + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. + + B. Any new file that contains any part of the Original Code or previous Modifications. + + 1.10. "Original Code"../ means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. + + 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. + + 1.11. "Source Code"../ means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated documentation, interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. + + 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control"../ means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. + +2. Source Code License. + + 2.1 The Initial Developer Grant. The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + + (b) under Patent Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof). + + (c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License. + + (d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: + + i) the modification of the Original Code or + + ii) the combination of the Original Code with other software or devices. + + 2.2. Contributor Grant. Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + + b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). + + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. + + (d) notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. + +3. Distribution Obligations. + + 3.1. Application of License. The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. + + 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + + 3.4. Intellectual Property Matters. + + (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "../LEGAL'' which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. If Contributor's Modifications include an application programming interface ("API"../) and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + + (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. + + 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. + + 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +4. Inability to Comply Due to Statute or Regulation. + +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5. Application of this License. + +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. + +6. Versions of the License. + + 6.1. New Versions. Sun Microsystems, Inc. ("Sun") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + + 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Sun. No one other than Sun has the right to modify the terms applicable to Covered Code created under this License. + + 6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must: (a) rename Your license so that the phrases "Sun," "Sun Public License," or "SPL"../ or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the Sun Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7. DISCLAIMER OF WARRANTY. + +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "../AS IS'' BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8. TERMINATION. + + 8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + + 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declaratory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: + + (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. + + (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. + + 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +9. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10. U.S. GOVERNMENT END USERS. + +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation,"../ as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. + +11. MISCELLANEOUS. + +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. + +12. RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +13. MULTIPLE-LICENSED CODE. + +Initial Developer may designate portions of the Covered Code as ?Multiple-Licensed?. ?Multiple-Licensed? means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. + +Exhibit A -Sun Public License Notice. + +The contents of this file are subject to the Sun Public License Version 1.0 (the License); you may not use this file except in compliance with the License. A copy of the License is available at http://www.sun.com/ + +The Original Code is _________________. The Initial Developer of the Original Code is ___________. Portions created by ______ are Copyright (C)_________. All Rights Reserved. + +Contributor(s): ______________________________________. + +Alternatively, the contents of this file may be used under the terms of the _____ license (the ?[___] License?), in which case the provisions of [______] License are applicable instead of those above. If you wish to allow use of your version of this file only under the terms of the [____] License and not to allow others to use your version of this file under the SPL, indicate your decision by deleting the provisions above and replace them with the notice and other provisions required by the [___] License. If you do not delete the provisions above, a recipient may use your version of this file under either the SPL or the [___] License. [NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] diff --git a/options/license/SSH-OpenSSH b/options/license/SSH-OpenSSH index 2d67608ee..35a5c8c82 100644 --- a/options/license/SSH-OpenSSH +++ b/options/license/SSH-OpenSSH @@ -1,73 +1,67 @@ -Copyright (c) 1995 Tatu Ylonen , Espoo, Finland All rights -reserved - -As far as I am concerned, the code I have written for this software can be -used freely for any purpose. Any derived versions of this software must be -clearly marked as such, and if the derived work is incompatible with the protocol -description in the RFC file, it must be called by a name other than "ssh" -or "Secure Shell". +* Copyright (c) 1995 Tatu Ylonen , Espoo, Finland +* All rights reserved +* +* As far as I am concerned, the code I have written for this software +* can be used freely for any purpose. Any derived versions of this +* software must be clearly marked as such, and if the derived work is +* incompatible with the protocol description in the RFC file, it must be +* called by a name other than "ssh" or "Secure Shell". [Tatu continues] +* However, I am not implying to give any licenses to any patents or +* copyrights held by third parties, and the software includes parts that +* are not under my direct control. As far as I know, all included +* source code is used in accordance with the relevant license agreements +* and can be used freely for any purpose (the GNU license being the most +* restrictive); see below for details. -However, I am not implying to give any licenses to any patents or copyrights -held by third parties, and the software includes parts that are not under -my direct control. As far as I know, all included source code is used in accordance -with the relevant license agreements and can be used freely for any purpose -(the GNU license being the most restrictive); see below for details. +[However, none of that term is relevant at this point in time. All of +these restrictively licenced software components which he talks about +have been removed from OpenSSH, i.e., -[However, none of that term is relevant at this point in time. All of these -restrictively licenced software components which he talks about have been -removed from OpenSSH, i.e., - - - RSA is no longer included, found in the OpenSSL library - - - IDEA is no longer included, its use is deprecated - - - DES is now external, in the OpenSSL library - - - GMP is no longer used, and instead we call BN code from OpenSSL - - - Zlib is now external, in a library - - - The make-ssh-known-hosts script is no longer included - - - TSS has been removed - - - MD5 is now external, in the OpenSSL library - - - RC4 support has been replaced with ARC4 support from OpenSSL - - - Blowfish is now external, in the OpenSSL library +- RSA is no longer included, found in the OpenSSL library +- IDEA is no longer included, its use is deprecated +- DES is now external, in the OpenSSL library +- GMP is no longer used, and instead we call BN code from OpenSSL +- Zlib is now external, in a library +- The make-ssh-known-hosts script is no longer included +- TSS has been removed +- MD5 is now external, in the OpenSSL library +- RC4 support has been replaced with ARC4 support from OpenSSL +- Blowfish is now external, in the OpenSSL library [The licence continues] -Note that any information and cryptographic algorithms used in this software -are publicly available on the Internet and at any major bookstore, scientific -library, and patent office worldwide. More information can be found e.g. at -"http://www.cs.hut.fi/crypto". +Note that any information and cryptographic algorithms used in this +software are publicly available on the Internet and at any major +bookstore, scientific library, and patent office worldwide. More +information can be found e.g. at "http://www.cs.hut.fi/crypto". -The legal status of this program is some combination of all these permissions -and restrictions. Use only at your own responsibility. You will be responsible -for any legal consequences yourself; I am not making any claims whether possessing -or using this is legal or not in your country, and I am not taking any responsibility -on your behalf. +The legal status of this program is some combination of all these +permissions and restrictions. Use only at your own responsibility. +You will be responsible for any legal consequences yourself; I am not +making any claims whether possessing or using this is legal or not in +your country, and I am not taking any responsibility on your behalf. -NO WARRANTY -BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE -PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE -STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM -"AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + NO WARRANTY -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE -THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY -GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE -OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA -OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES -OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH -HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/SSH-short b/options/license/SSH-short index 611dc07fc..bf6f8a0e6 100644 --- a/options/license/SSH-short +++ b/options/license/SSH-short @@ -1,5 +1,5 @@ -As far as I am concerned, the code I have written for this software can be -used freely for any purpose. Any derived versions of this software must be -clearly marked as such, and if the derived work is incompatible with the protocol -description in the RFC file, it must be called by a name other than "ssh" -or "Secure Shell". +As far as I am concerned, the code I have written for this software +can be used freely for any purpose. Any derived versions of this +software must be clearly marked as such, and if the derived work is +incompatible with the protocol description in the RFC file, it must be +called by a name other than "ssh" or "Secure Shell". diff --git a/options/license/SSPL-1.0 b/options/license/SSPL-1.0 index 18f817a89..ed242d9a0 100644 --- a/options/license/SSPL-1.0 +++ b/options/license/SSPL-1.0 @@ -1,522 +1,557 @@ -Server Side Public License - -VERSION 1, OCTOBER 16, 2018 - -Copyright © 2018 MongoDB, Inc. - -Everyone is permitted to copy and distribute verbatim copies of this license -document, but changing it is not allowed. - -TERMS AND CONDITIONS - - 0. Definitions. - - "This License" refers to Server Side Public License. - -"Copyright" also means copyright-like laws that apply to other kinds of works, -such as semiconductor masks. - -"The Program" refers to any copyrightable work licensed under this License. -Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals -or organizations. - -To "modify" a work means to copy from or adapt all or part of the work in -a fashion requiring copyright permission, other than the making of an exact -copy. The resulting work is called a "modified version" of the earlier work -or a work "based on" the earlier work. - -A "covered work" means either the unmodified Program or a work based on the -Program. - -To "propagate" a work means to do anything with it that, without permission, -would make you directly or secondarily liable for infringement under applicable -copyright law, except executing it on a computer or modifying a private copy. -Propagation includes copying, distribution (with or without modification), -making available to the public, and in some countries other activities as -well. - -To "convey" a work means any kind of propagation that enables other parties -to make or receive copies. Mere interaction with a user through a computer -network, with no transfer of a copy, is not conveying. - -An interactive user interface displays "Appropriate Legal Notices" to the -extent that it includes a convenient and prominently visible feature that -(1) displays an appropriate copyright notice, and (2) tells the user that -there is no warranty for the work (except to the extent that warranties are -provided), that licensees may convey the work under this License, and how -to view a copy of this License. If the interface presents a list of user commands -or options, such as a menu, a prominent item in the list meets this criterion. - - 1. Source Code. - -The "source code" for a work means the preferred form of the work for making -modifications to it. "Object code" means any non-source form of a work. - -A "Standard Interface" means an interface that either is an official standard -defined by a recognized standards body, or, in the case of interfaces specified -for a particular programming language, one that is widely used among developers -working in that language. - -The "System Libraries" of an executable work include anything, other than -the work as a whole, that (a) is included in the normal form of packaging -a Major Component, but which is not part of that Major Component, and (b) -serves only to enable use of the work with that Major Component, or to implement -a Standard Interface for which an implementation is available to the public -in source code form. A "Major Component", in this context, means a major essential -component (kernel, window system, and so on) of the specific operating system -(if any) on which the executable work runs, or a compiler used to produce -the work, or an object code interpreter used to run it. - -The "Corresponding Source" for a work in object code form means all the source -code needed to generate, install, and (for an executable work) run the object -code and to modify the work, including scripts to control those activities. -However, it does not include the work's System Libraries, or general-purpose -tools or generally available free programs which are used unmodified in performing -those activities but which are not part of the work. For example, Corresponding -Source includes interface definition files associated with source files for -the work, and the source code for shared libraries and dynamically linked -subprograms that the work is specifically designed to require, such as by -intimate data communication or control flow between those subprograms and -other parts of the work. - -The Corresponding Source need not include anything that users can regenerate -automatically from other parts of the Corresponding Source. - - The Corresponding Source for a work in source code form is that same work. - - 2. Basic Permissions. - -All rights granted under this License are granted for the term of copyright -on the Program, and are irrevocable provided the stated conditions are met. -This License explicitly affirms your unlimited permission to run the unmodified -Program, subject to section 13. The output from running a covered work is -covered by this License only if the output, given its content, constitutes -a covered work. This License acknowledges your rights of fair use or other -equivalent, as provided by copyright law. - -Subject to section 13, you may make, run and propagate covered works that -you do not convey, without conditions so long as your license otherwise remains -in force. You may convey covered works to others for the sole purpose of having -them make modifications exclusively for you, or provide you with facilities -for running those works, provided that you comply with the terms of this License -in conveying all material for which you do not control copyright. Those thus -making or running the covered works for you must do so exclusively on your -behalf, under your direction and control, on terms that prohibit them from -making any copies of your copyrighted material outside their relationship -with you. - -Conveying under any other circumstances is permitted solely under the conditions -stated below. Sublicensing is not allowed; section 10 makes it unnecessary. - - 3. Protecting Users' Legal Rights From Anti-Circumvention Law. - -No covered work shall be deemed part of an effective technological measure -under any applicable law fulfilling obligations under article 11 of the WIPO -copyright treaty adopted on 20 December 1996, or similar laws prohibiting -or restricting circumvention of such measures. - -When you convey a covered work, you waive any legal power to forbid circumvention -of technological measures to the extent such circumvention is effected by -exercising rights under this License with respect to the covered work, and -you disclaim any intention to limit operation or modification of the work -as a means of enforcing, against the work's users, your or third parties' -legal rights to forbid circumvention of technological measures. - - 4. Conveying Verbatim Copies. - -You may convey verbatim copies of the Program's source code as you receive -it, in any medium, provided that you conspicuously and appropriately publish -on each copy an appropriate copyright notice; keep intact all notices stating -that this License and any non-permissive terms added in accord with section -7 apply to the code; keep intact all notices of the absence of any warranty; -and give all recipients a copy of this License along with the Program. - -You may charge any price or no price for each copy that you convey, and you -may offer support or warranty protection for a fee. - - 5. Conveying Modified Source Versions. - -You may convey a work based on the Program, or the modifications to produce -it from the Program, in the form of source code under the terms of section -4, provided that you also meet all of these conditions: - -a) The work must carry prominent notices stating that you modified it, and -giving a relevant date. - -b) The work must carry prominent notices stating that it is released under -this License and any conditions added under section 7. This requirement modifies -the requirement in section 4 to "keep intact all notices". - -c) You must license the entire work, as a whole, under this License to anyone -who comes into possession of a copy. This License will therefore apply, along -with any applicable section 7 additional terms, to the whole of the work, -and all its parts, regardless of how they are packaged. This License gives -no permission to license the work in any other way, but it does not invalidate -such permission if you have separately received it. - -d) If the work has interactive user interfaces, each must display Appropriate -Legal Notices; however, if the Program has interactive interfaces that do -not display Appropriate Legal Notices, your work need not make them do so. - -A compilation of a covered work with other separate and independent works, -which are not by their nature extensions of the covered work, and which are -not combined with it such as to form a larger program, in or on a volume of -a storage or distribution medium, is called an "aggregate" if the compilation -and its resulting copyright are not used to limit the access or legal rights -of the compilation's users beyond what the individual works permit. Inclusion -of a covered work in an aggregate does not cause this License to apply to -the other parts of the aggregate. - - 6. Conveying Non-Source Forms. - -You may convey a covered work in object code form under the terms of sections -4 and 5, provided that you also convey the machine-readable Corresponding -Source under the terms of this License, in one of these ways: - -a) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by the Corresponding Source fixed -on a durable physical medium customarily used for software interchange. - -b) Convey the object code in, or embodied in, a physical product (including -a physical distribution medium), accompanied by a written offer, valid for -at least three years and valid for as long as you offer spare parts or customer -support for that product model, to give anyone who possesses the object code -either (1) a copy of the Corresponding Source for all the software in the -product that is covered by this License, on a durable physical medium customarily -used for software interchange, for a price no more than your reasonable cost -of physically performing this conveying of source, or (2) access to copy the -Corresponding Source from a network server at no charge. - -c) Convey individual copies of the object code with a copy of the written -offer to provide the Corresponding Source. This alternative is allowed only -occasionally and noncommercially, and only if you received the object code -with such an offer, in accord with subsection 6b. - -d) Convey the object code by offering access from a designated place (gratis -or for a charge), and offer equivalent access to the Corresponding Source -in the same way through the same place at no further charge. You need not -require recipients to copy the Corresponding Source along with the object -code. If the place to copy the object code is a network server, the Corresponding -Source may be on a different server (operated by you or a third party) that -supports equivalent copying facilities, provided you maintain clear directions -next to the object code saying where to find the Corresponding Source. Regardless -of what server hosts the Corresponding Source, you remain obligated to ensure -that it is available for as long as needed to satisfy these requirements. - -e) Convey the object code using peer-to-peer transmission, provided you inform -other peers where the object code and Corresponding Source of the work are -being offered to the general public at no charge under subsection 6d. - -A separable portion of the object code, whose source code is excluded from -the Corresponding Source as a System Library, need not be included in conveying -the object code work. - -A "User Product" is either (1) a "consumer product", which means any tangible -personal property which is normally used for personal, family, or household -purposes, or (2) anything designed or sold for incorporation into a dwelling. -In determining whether a product is a consumer product, doubtful cases shall -be resolved in favor of coverage. For a particular product received by a particular -user, "normally used" refers to a typical or common use of that class of product, -regardless of the status of the particular user or of the way in which the -particular user actually uses, or expects or is expected to use, the product. -A product is a consumer product regardless of whether the product has substantial -commercial, industrial or non-consumer uses, unless such uses represent the -only significant mode of use of the product. - -"Installation Information" for a User Product means any methods, procedures, -authorization keys, or other information required to install and execute modified -versions of a covered work in that User Product from a modified version of -its Corresponding Source. The information must suffice to ensure that the -continued functioning of the modified object code is in no case prevented -or interfered with solely because modification has been made. - -If you convey an object code work under this section in, or with, or specifically -for use in, a User Product, and the conveying occurs as part of a transaction -in which the right of possession and use of the User Product is transferred -to the recipient in perpetuity or for a fixed term (regardless of how the -transaction is characterized), the Corresponding Source conveyed under this -section must be accompanied by the Installation Information. But this requirement -does not apply if neither you nor any third party retains the ability to install -modified object code on the User Product (for example, the work has been installed -in ROM). - -The requirement to provide Installation Information does not include a requirement -to continue to provide support service, warranty, or updates for a work that -has been modified or installed by the recipient, or for the User Product in -which it has been modified or installed. Access to a network may be denied -when the modification itself materially and adversely affects the operation -of the network or violates the rules and protocols for communication across -the network. - -Corresponding Source conveyed, and Installation Information provided, in accord -with this section must be in a format that is publicly documented (and with -an implementation available to the public in source code form), and must require -no special password or key for unpacking, reading or copying. - - 7. Additional Terms. - -"Additional permissions" are terms that supplement the terms of this License -by making exceptions from one or more of its conditions. Additional permissions -that are applicable to the entire Program shall be treated as though they -were included in this License, to the extent that they are valid under applicable -law. If additional permissions apply only to part of the Program, that part -may be used separately under those permissions, but the entire Program remains -governed by this License without regard to the additional permissions. - -When you convey a copy of a covered work, you may at your option remove any -additional permissions from that copy, or from any part of it. (Additional -permissions may be written to require their own removal in certain cases when -you modify the work.) You may place additional permissions on material, added -by you to a covered work, for which you have or can give appropriate copyright -permission. - -Notwithstanding any other provision of this License, for material you add -to a covered work, you may (if authorized by the copyright holders of that -material) supplement the terms of this License with terms: - -a) Disclaiming warranty or limiting liability differently from the terms of -sections 15 and 16 of this License; or - -b) Requiring preservation of specified reasonable legal notices or author -attributions in that material or in the Appropriate Legal Notices displayed -by works containing it; or - -c) Prohibiting misrepresentation of the origin of that material, or requiring -that modified versions of such material be marked in reasonable ways as different -from the original version; or - -d) Limiting the use for publicity purposes of names of licensors or authors -of the material; or - -e) Declining to grant rights under trademark law for use of some trade names, -trademarks, or service marks; or - -f) Requiring indemnification of licensors and authors of that material by -anyone who conveys the material (or modified versions of it) with contractual -assumptions of liability to the recipient, for any liability that these contractual -assumptions directly impose on those licensors and authors. - -All other non-permissive additional terms are considered "further restrictions" -within the meaning of section 10. If the Program as you received it, or any -part of it, contains a notice stating that it is governed by this License -along with a term that is a further restriction, you may remove that term. -If a license document contains a further restriction but permits relicensing -or conveying under this License, you may add to a covered work material governed -by the terms of that license document, provided that the further restriction -does not survive such relicensing or conveying. - -If you add terms to a covered work in accord with this section, you must place, -in the relevant source files, a statement of the additional terms that apply -to those files, or a notice indicating where to find the applicable terms. - -Additional terms, permissive or non-permissive, may be stated in the form -of a separately written license, or stated as exceptions; the above requirements -apply either way. - - 8. Termination. - -You may not propagate or modify a covered work except as expressly provided -under this License. Any attempt otherwise to propagate or modify it is void, -and will automatically terminate your rights under this License (including -any patent licenses granted under the third paragraph of section 11). - -However, if you cease all violation of this License, then your license from -a particular copyright holder is reinstated (a) provisionally, unless and -until the copyright holder explicitly and finally terminates your license, -and (b) permanently, if the copyright holder fails to notify you of the violation -by some reasonable means prior to 60 days after the cessation. - -Moreover, your license from a particular copyright holder is reinstated permanently -if the copyright holder notifies you of the violation by some reasonable means, -this is the first time you have received notice of violation of this License -(for any work) from that copyright holder, and you cure the violation prior -to 30 days after your receipt of the notice. - -Termination of your rights under this section does not terminate the licenses -of parties who have received copies or rights from you under this License. -If your rights have been terminated and not permanently reinstated, you do -not qualify to receive new licenses for the same material under section 10. - - 9. Acceptance Not Required for Having Copies. - -You are not required to accept this License in order to receive or run a copy -of the Program. Ancillary propagation of a covered work occurring solely as -a consequence of using peer-to-peer transmission to receive a copy likewise -does not require acceptance. However, nothing other than this License grants -you permission to propagate or modify any covered work. These actions infringe -copyright if you do not accept this License. Therefore, by modifying or propagating -a covered work, you indicate your acceptance of this License to do so. - - 10. Automatic Licensing of Downstream Recipients. - -Each time you convey a covered work, the recipient automatically receives -a license from the original licensors, to run, modify and propagate that work, -subject to this License. You are not responsible for enforcing compliance -by third parties with this License. - -An "entity transaction" is a transaction transferring control of an organization, -or substantially all assets of one, or subdividing an organization, or merging -organizations. If propagation of a covered work results from an entity transaction, -each party to that transaction who receives a copy of the work also receives -whatever licenses to the work the party's predecessor in interest had or could -give under the previous paragraph, plus a right to possession of the Corresponding -Source of the work from the predecessor in interest, if the predecessor has -it or can get it with reasonable efforts. - -You may not impose any further restrictions on the exercise of the rights -granted or affirmed under this License. For example, you may not impose a -license fee, royalty, or other charge for exercise of rights granted under -this License, and you may not initiate litigation (including a cross-claim -or counterclaim in a lawsuit) alleging that any patent claim is infringed -by making, using, selling, offering for sale, or importing the Program or -any portion of it. - - 11. Patents. - -A "contributor" is a copyright holder who authorizes use under this License -of the Program or a work on which the Program is based. The work thus licensed -is called the contributor's "contributor version". - -A contributor's "essential patent claims" are all patent claims owned or controlled -by the contributor, whether already acquired or hereafter acquired, that would -be infringed by some manner, permitted by this License, of making, using, -or selling its contributor version, but do not include claims that would be -infringed only as a consequence of further modification of the contributor -version. For purposes of this definition, "control" includes the right to -grant patent sublicenses in a manner consistent with the requirements of this -License. - -Each contributor grants you a non-exclusive, worldwide, royalty-free patent -license under the contributor's essential patent claims, to make, use, sell, -offer for sale, import and otherwise run, modify and propagate the contents -of its contributor version. - -In the following three paragraphs, a "patent license" is any express agreement -or commitment, however denominated, not to enforce a patent (such as an express -permission to practice a patent or covenant not to sue for patent infringement). -To "grant" such a patent license to a party means to make such an agreement -or commitment not to enforce a patent against the party. - -If you convey a covered work, knowingly relying on a patent license, and the -Corresponding Source of the work is not available for anyone to copy, free -of charge and under the terms of this License, through a publicly available -network server or other readily accessible means, then you must either (1) -cause the Corresponding Source to be so available, or (2) arrange to deprive -yourself of the benefit of the patent license for this particular work, or -(3) arrange, in a manner consistent with the requirements of this License, -to extend the patent license to downstream recipients. "Knowingly relying" -means you have actual knowledge that, but for the patent license, your conveying -the covered work in a country, or your recipient's use of the covered work -in a country, would infringe one or more identifiable patents in that country -that you have reason to believe are valid. - -If, pursuant to or in connection with a single transaction or arrangement, -you convey, or propagate by procuring conveyance of, a covered work, and grant -a patent license to some of the parties receiving the covered work authorizing -them to use, propagate, modify or convey a specific copy of the covered work, -then the patent license you grant is automatically extended to all recipients -of the covered work and works based on it. - -A patent license is "discriminatory" if it does not include within the scope -of its coverage, prohibits the exercise of, or is conditioned on the non-exercise -of one or more of the rights that are specifically granted under this License. -You may not convey a covered work if you are a party to an arrangement with -a third party that is in the business of distributing software, under which -you make payment to the third party based on the extent of your activity of -conveying the work, and under which the third party grants, to any of the -parties who would receive the covered work from you, a discriminatory patent -license (a) in connection with copies of the covered work conveyed by you -(or copies made from those copies), or (b) primarily for and in connection -with specific products or compilations that contain the covered work, unless -you entered into that arrangement, or that patent license was granted, prior -to 28 March 2007. - -Nothing in this License shall be construed as excluding or limiting any implied -license or other defenses to infringement that may otherwise be available -to you under applicable patent law. - - 12. No Surrender of Others' Freedom. - -If conditions are imposed on you (whether by court order, agreement or otherwise) -that contradict the conditions of this License, they do not excuse you from -the conditions of this License. If you cannot use, propagate or convey a covered -work so as to satisfy simultaneously your obligations under this License and -any other pertinent obligations, then as a consequence you may not use, propagate -or convey it at all. For example, if you agree to terms that obligate you -to collect a royalty for further conveying from those to whom you convey the -Program, the only way you could satisfy both those terms and this License -would be to refrain entirely from conveying the Program. - - 13. Offering the Program as a Service. - -If you make the functionality of the Program or a modified version available -to third parties as a service, you must make the Service Source Code available -via network download to everyone at no charge, under the terms of this License. -Making the functionality of the Program or modified version available to third -parties as a service includes, without limitation, enabling third parties -to interact with the functionality of the Program or modified version remotely -through a computer network, offering a service the value of which entirely -or primarily derives from the value of the Program or modified version, or -offering a service that accomplishes for users the primary purpose of the -Program or modified version. - -"Service Source Code" means the Corresponding Source for the Program or the -modified version, and the Corresponding Source for all programs that you use -to make the Program or modified version available as a service, including, -without limitation, management software, user interfaces, application program -interfaces, automation software, monitoring software, backup software, storage -software and hosting software, all such that a user could run an instance -of the service using the Service Source Code you make available. - - 14. Revised Versions of this License. - -MongoDB, Inc. may publish revised and/or new versions of the Server Side Public -License from time to time. Such new versions will be similar in spirit to -the present version, but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Program specifies -that a certain numbered version of the Server Side Public License "or any -later version" applies to it, you have the option of following the terms and -conditions either of that numbered version or of any later version published -by MongoDB, Inc. If the Program does not specify a version number of the Server -Side Public License, you may choose any version ever published by MongoDB, -Inc. - -If the Program specifies that a proxy can decide which future versions of -the Server Side Public License can be used, that proxy's public statement -of acceptance of a version permanently authorizes you to choose that version -for the Program. - -Later license versions may give you additional or different permissions. However, -no additional obligations are imposed on any author or copyright holder as -a result of your choosing to follow a later version. - - 15. Disclaimer of Warranty. - -THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE -LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM -PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR -CORRECTION. - - 16. Limitation of Liability. - -IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL -ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM -AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, -INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO -USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED -INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE -PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER -PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - - 17. Interpretation of Sections 15 and 16. - -If the disclaimer of warranty and limitation of liability provided above cannot -be given local legal effect according to their terms, reviewing courts shall -apply local law that most closely approximates an absolute waiver of all civil -liability in connection with the Program, unless a warranty or assumption -of liability accompanies a copy of the Program in return for a fee. + Server Side Public License + VERSION 1, OCTOBER 16, 2018 + + Copyright © 2018 MongoDB, Inc. + + Everyone is permitted to copy and distribute verbatim copies of this + license document, but changing it is not allowed. + + TERMS AND CONDITIONS + + 0. Definitions. + + “This License” refers to Server Side Public License. + + “Copyright” also means copyright-like laws that apply to other kinds of + works, such as semiconductor masks. + + “The Program” refers to any copyrightable work licensed under this + License. Each licensee is addressed as “you”. “Licensees” and + “recipients” may be individuals or organizations. + + To “modify” a work means to copy from or adapt all or part of the work in + a fashion requiring copyright permission, other than the making of an + exact copy. The resulting work is called a “modified version” of the + earlier work or a work “based on” the earlier work. + + A “covered work” means either the unmodified Program or a work based on + the Program. + + To “propagate” a work means to do anything with it that, without + permission, would make you directly or secondarily liable for + infringement under applicable copyright law, except executing it on a + computer or modifying a private copy. Propagation includes copying, + distribution (with or without modification), making available to the + public, and in some countries other activities as well. + + To “convey” a work means any kind of propagation that enables other + parties to make or receive copies. Mere interaction with a user through a + computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays “Appropriate Legal Notices” to the + extent that it includes a convenient and prominently visible feature that + (1) displays an appropriate copyright notice, and (2) tells the user that + there is no warranty for the work (except to the extent that warranties + are provided), that licensees may convey the work under this License, and + how to view a copy of this License. If the interface presents a list of + user commands or options, such as a menu, a prominent item in the list + meets this criterion. + + 1. Source Code. + + The “source code” for a work means the preferred form of the work for + making modifications to it. “Object code” means any non-source form of a + work. + + A “Standard Interface” means an interface that either is an official + standard defined by a recognized standards body, or, in the case of + interfaces specified for a particular programming language, one that is + widely used among developers working in that language. The “System + Libraries” of an executable work include anything, other than the work as + a whole, that (a) is included in the normal form of packaging a Major + Component, but which is not part of that Major Component, and (b) serves + only to enable use of the work with that Major Component, or to implement + a Standard Interface for which an implementation is available to the + public in source code form. A “Major Component”, in this context, means a + major essential component (kernel, window system, and so on) of the + specific operating system (if any) on which the executable work runs, or + a compiler used to produce the work, or an object code interpreter used + to run it. + + The “Corresponding Source” for a work in object code form means all the + source code needed to generate, install, and (for an executable work) run + the object code and to modify the work, including scripts to control + those activities. However, it does not include the work's System + Libraries, or general-purpose tools or generally available free programs + which are used unmodified in performing those activities but which are + not part of the work. For example, Corresponding Source includes + interface definition files associated with source files for the work, and + the source code for shared libraries and dynamically linked subprograms + that the work is specifically designed to require, such as by intimate + data communication or control flow between those subprograms and other + parts of the work. + + The Corresponding Source need not include anything that users can + regenerate automatically from other parts of the Corresponding Source. + + The Corresponding Source for a work in source code form is that same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of + copyright on the Program, and are irrevocable provided the stated + conditions are met. This License explicitly affirms your unlimited + permission to run the unmodified Program, subject to section 13. The + output from running a covered work is covered by this License only if the + output, given its content, constitutes a covered work. This License + acknowledges your rights of fair use or other equivalent, as provided by + copyright law. Subject to section 13, you may make, run and propagate + covered works that you do not convey, without conditions so long as your + license otherwise remains in force. You may convey covered works to + others for the sole purpose of having them make modifications exclusively + for you, or provide you with facilities for running those works, provided + that you comply with the terms of this License in conveying all + material for which you do not control copyright. Those thus making or + running the covered works for you must do so exclusively on your + behalf, under your direction and control, on terms that prohibit them + from making any copies of your copyrighted material outside their + relationship with you. + + Conveying under any other circumstances is permitted solely under the + conditions stated below. Sublicensing is not allowed; section 10 makes it + unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological + measure under any applicable law fulfilling obligations under article 11 + of the WIPO copyright treaty adopted on 20 December 1996, or similar laws + prohibiting or restricting circumvention of such measures. + + When you convey a covered work, you waive any legal power to forbid + circumvention of technological measures to the extent such circumvention is + effected by exercising rights under this License with respect to the + covered work, and you disclaim any intention to limit operation or + modification of the work as a means of enforcing, against the work's users, + your or third parties' legal rights to forbid circumvention of + technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you + receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice; keep + intact all notices stating that this License and any non-permissive terms + added in accord with section 7 apply to the code; keep intact all notices + of the absence of any warranty; and give all recipients a copy of this + License along with the Program. You may charge any price or no price for + each copy that you convey, and you may offer support or warranty + protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to + produce it from the Program, in the form of source code under the terms + of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified it, + and giving a relevant date. + + b) The work must carry prominent notices stating that it is released + under this License and any conditions added under section 7. This + requirement modifies the requirement in section 4 to “keep intact all + notices”. + + c) You must license the entire work, as a whole, under this License to + anyone who comes into possession of a copy. This License will therefore + apply, along with any applicable section 7 additional terms, to the + whole of the work, and all its parts, regardless of how they are + packaged. This License gives no permission to license the work in any + other way, but it does not invalidate such permission if you have + separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your work + need not make them do so. + + A compilation of a covered work with other separate and independent + works, which are not by their nature extensions of the covered work, and + which are not combined with it such as to form a larger program, in or on + a volume of a storage or distribution medium, is called an “aggregate” if + the compilation and its resulting copyright are not used to limit the + access or legal rights of the compilation's users beyond what the + individual works permit. Inclusion of a covered work in an aggregate does + not cause this License to apply to the other parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms of + sections 4 and 5, provided that you also convey the machine-readable + Corresponding Source under the terms of this License, in one of these + ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium customarily + used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a written + offer, valid for at least three years and valid for as long as you + offer spare parts or customer support for that product model, to give + anyone who possesses the object code either (1) a copy of the + Corresponding Source for all the software in the product that is + covered by this License, on a durable physical medium customarily used + for software interchange, for a price no more than your reasonable cost + of physically performing this conveying of source, or (2) access to + copy the Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This alternative is + allowed only occasionally and noncommercially, and only if you received + the object code with such an offer, in accord with subsection 6b. + + d) Convey the object code by offering access from a designated place + (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to copy + the object code is a network server, the Corresponding Source may be on + a different server (operated by you or a third party) that supports + equivalent copying facilities, provided you maintain clear directions + next to the object code saying where to find the Corresponding Source. + Regardless of what server hosts the Corresponding Source, you remain + obligated to ensure that it is available for as long as needed to + satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided you + inform other peers where the object code and Corresponding Source of + the work are being offered to the general public at no charge under + subsection 6d. + + A separable portion of the object code, whose source code is excluded + from the Corresponding Source as a System Library, need not be included + in conveying the object code work. + + A “User Product” is either (1) a “consumer product”, which means any + tangible personal property which is normally used for personal, family, + or household purposes, or (2) anything designed or sold for incorporation + into a dwelling. In determining whether a product is a consumer product, + doubtful cases shall be resolved in favor of coverage. For a particular + product received by a particular user, “normally used” refers to a + typical or common use of that class of product, regardless of the status + of the particular user or of the way in which the particular user + actually uses, or expects or is expected to use, the product. A product + is a consumer product regardless of whether the product has substantial + commercial, industrial or non-consumer uses, unless such uses represent + the only significant mode of use of the product. + + “Installation Information” for a User Product means any methods, + procedures, authorization keys, or other information required to install + and execute modified versions of a covered work in that User Product from + a modified version of its Corresponding Source. The information must + suffice to ensure that the continued functioning of the modified object + code is in no case prevented or interfered with solely because + modification has been made. + + If you convey an object code work under this section in, or with, or + specifically for use in, a User Product, and the conveying occurs as part + of a transaction in which the right of possession and use of the User + Product is transferred to the recipient in perpetuity or for a fixed term + (regardless of how the transaction is characterized), the Corresponding + Source conveyed under this section must be accompanied by the + Installation Information. But this requirement does not apply if neither + you nor any third party retains the ability to install modified object + code on the User Product (for example, the work has been installed in + ROM). + + The requirement to provide Installation Information does not include a + requirement to continue to provide support service, warranty, or updates + for a work that has been modified or installed by the recipient, or for + the User Product in which it has been modified or installed. Access + to a network may be denied when the modification itself materially + and adversely affects the operation of the network or violates the + rules and protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, in + accord with this section must be in a format that is publicly documented + (and with an implementation available to the public in source code form), + and must require no special password or key for unpacking, reading or + copying. + + 7. Additional Terms. + + “Additional permissions” are terms that supplement the terms of this + License by making exceptions from one or more of its conditions. + Additional permissions that are applicable to the entire Program shall be + treated as though they were included in this License, to the extent that + they are valid under applicable law. If additional permissions apply only + to part of the Program, that part may be used separately under those + permissions, but the entire Program remains governed by this License + without regard to the additional permissions. When you convey a copy of + a covered work, you may at your option remove any additional permissions + from that copy, or from any part of it. (Additional permissions may be + written to require their own removal in certain cases when you modify the + work.) You may place additional permissions on material, added by you to + a covered work, for which you have or can give appropriate copyright + permission. + + Notwithstanding any other provision of this License, for material you add + to a covered work, you may (if authorized by the copyright holders of + that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some trade + names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that material + by anyone who conveys the material (or modified versions of it) with + contractual assumptions of liability to the recipient, for any + liability that these contractual assumptions directly impose on those + licensors and authors. + + All other non-permissive additional terms are considered “further + restrictions” within the meaning of section 10. If the Program as you + received it, or any part of it, contains a notice stating that it is + governed by this License along with a term that is a further restriction, + you may remove that term. If a license document contains a further + restriction but permits relicensing or conveying under this License, you + may add to a covered work material governed by the terms of that license + document, provided that the further restriction does not survive such + relicensing or conveying. + + If you add terms to a covered work in accord with this section, you must + place, in the relevant source files, a statement of the additional terms + that apply to those files, or a notice indicating where to find the + applicable terms. Additional terms, permissive or non-permissive, may be + stated in the form of a separately written license, or stated as + exceptions; the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly + provided under this License. Any attempt otherwise to propagate or modify + it is void, and will automatically terminate your rights under this + License (including any patent licenses granted under the third paragraph + of section 11). + + However, if you cease all violation of this License, then your license + from a particular copyright holder is reinstated (a) provisionally, + unless and until the copyright holder explicitly and finally terminates + your license, and (b) permanently, if the copyright holder fails to + notify you of the violation by some reasonable means prior to 60 days + after the cessation. + + Moreover, your license from a particular copyright holder is reinstated + permanently if the copyright holder notifies you of the violation by some + reasonable means, this is the first time you have received notice of + violation of this License (for any work) from that copyright holder, and + you cure the violation prior to 30 days after your receipt of the notice. + + Termination of your rights under this section does not terminate the + licenses of parties who have received copies or rights from you under + this License. If your rights have been terminated and not permanently + reinstated, you do not qualify to receive new licenses for the same + material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or run a + copy of the Program. Ancillary propagation of a covered work occurring + solely as a consequence of using peer-to-peer transmission to receive a + copy likewise does not require acceptance. However, nothing other than + this License grants you permission to propagate or modify any covered + work. These actions infringe copyright if you do not accept this License. + Therefore, by modifying or propagating a covered work, you indicate your + acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically receives + a license from the original licensors, to run, modify and propagate that + work, subject to this License. You are not responsible for enforcing + compliance by third parties with this License. + + An “entity transaction” is a transaction transferring control of an + organization, or substantially all assets of one, or subdividing an + organization, or merging organizations. If propagation of a covered work + results from an entity transaction, each party to that transaction who + receives a copy of the work also receives whatever licenses to the work + the party's predecessor in interest had or could give under the previous + paragraph, plus a right to possession of the Corresponding Source of the + work from the predecessor in interest, if the predecessor has it or can + get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the rights + granted or affirmed under this License. For example, you may not impose a + license fee, royalty, or other charge for exercise of rights granted + under this License, and you may not initiate litigation (including a + cross-claim or counterclaim in a lawsuit) alleging that any patent claim + is infringed by making, using, selling, offering for sale, or importing + the Program or any portion of it. + + 11. Patents. + + A “contributor” is a copyright holder who authorizes use under this + License of the Program or a work on which the Program is based. The work + thus licensed is called the contributor's “contributor version”. + + A contributor's “essential patent claims” are all patent claims owned or + controlled by the contributor, whether already acquired or hereafter + acquired, that would be infringed by some manner, permitted by this + License, of making, using, or selling its contributor version, but do not + include claims that would be infringed only as a consequence of further + modification of the contributor version. For purposes of this definition, + “control” includes the right to grant patent sublicenses in a manner + consistent with the requirements of this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free + patent license under the contributor's essential patent claims, to make, + use, sell, offer for sale, import and otherwise run, modify and propagate + the contents of its contributor version. + + In the following three paragraphs, a “patent license” is any express + agreement or commitment, however denominated, not to enforce a patent + (such as an express permission to practice a patent or covenant not to + sue for patent infringement). To “grant” such a patent license to a party + means to make such an agreement or commitment not to enforce a patent + against the party. + + If you convey a covered work, knowingly relying on a patent license, and + the Corresponding Source of the work is not available for anyone to copy, + free of charge and under the terms of this License, through a publicly + available network server or other readily accessible means, then you must + either (1) cause the Corresponding Source to be so available, or (2) + arrange to deprive yourself of the benefit of the patent license for this + particular work, or (3) arrange, in a manner consistent with the + requirements of this License, to extend the patent license to downstream + recipients. “Knowingly relying” means you have actual knowledge that, but + for the patent license, your conveying the covered work in a country, or + your recipient's use of the covered work in a country, would infringe + one or more identifiable patents in that country that you have reason + to believe are valid. + + If, pursuant to or in connection with a single transaction or + arrangement, you convey, or propagate by procuring conveyance of, a + covered work, and grant a patent license to some of the parties receiving + the covered work authorizing them to use, propagate, modify or convey a + specific copy of the covered work, then the patent license you grant is + automatically extended to all recipients of the covered work and works + based on it. + + A patent license is “discriminatory” if it does not include within the + scope of its coverage, prohibits the exercise of, or is conditioned on + the non-exercise of one or more of the rights that are specifically + granted under this License. You may not convey a covered work if you are + a party to an arrangement with a third party that is in the business of + distributing software, under which you make payment to the third party + based on the extent of your activity of conveying the work, and under + which the third party grants, to any of the parties who would receive the + covered work from you, a discriminatory patent license (a) in connection + with copies of the covered work conveyed by you (or copies made from + those copies), or (b) primarily for and in connection with specific + products or compilations that contain the covered work, unless you + entered into that arrangement, or that patent license was granted, prior + to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting any + implied license or other defenses to infringement that may otherwise be + available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot use, + propagate or convey a covered work so as to satisfy simultaneously your + obligations under this License and any other pertinent obligations, then + as a consequence you may not use, propagate or convey it at all. For + example, if you agree to terms that obligate you to collect a royalty for + further conveying from those to whom you convey the Program, the only way + you could satisfy both those terms and this License would be to refrain + entirely from conveying the Program. + + 13. Offering the Program as a Service. + + If you make the functionality of the Program or a modified version + available to third parties as a service, you must make the Service Source + Code available via network download to everyone at no charge, under the + terms of this License. Making the functionality of the Program or + modified version available to third parties as a service includes, + without limitation, enabling third parties to interact with the + functionality of the Program or modified version remotely through a + computer network, offering a service the value of which entirely or + primarily derives from the value of the Program or modified version, or + offering a service that accomplishes for users the primary purpose of the + Program or modified version. + + “Service Source Code” means the Corresponding Source for the Program or + the modified version, and the Corresponding Source for all programs that + you use to make the Program or modified version available as a service, + including, without limitation, management software, user interfaces, + application program interfaces, automation software, monitoring software, + backup software, storage software and hosting software, all such that a + user could run an instance of the service using the Service Source Code + you make available. + + 14. Revised Versions of this License. + + MongoDB, Inc. may publish revised and/or new versions of the Server Side + Public License from time to time. Such new versions will be similar in + spirit to the present version, but may differ in detail to address new + problems or concerns. + + Each version is given a distinguishing version number. If the Program + specifies that a certain numbered version of the Server Side Public + License “or any later version” applies to it, you have the option of + following the terms and conditions either of that numbered version or of + any later version published by MongoDB, Inc. If the Program does not + specify a version number of the Server Side Public License, you may + choose any version ever published by MongoDB, Inc. + + If the Program specifies that a proxy can decide which future versions of + the Server Side Public License can be used, that proxy's public statement + of acceptance of a version permanently authorizes you to choose that + version for the Program. + + Later license versions may give you additional or different permissions. + However, no additional obligations are imposed on any author or copyright holder + as a result of your choosing to follow a later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS + AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM + IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF + ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS + THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING + ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF + THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO + LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU + OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER + PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE + POSSIBILITY OF SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided above + cannot be given local legal effect according to their terms, reviewing + courts shall apply local law that most closely approximates an absolute + waiver of all civil liability in connection with the Program, unless a + warranty or assumption of liability accompanies a copy of the Program in + return for a fee. + + END OF TERMS AND CONDITIONS diff --git a/options/license/SWL b/options/license/SWL index 5ceff6449..84c9c418a 100644 --- a/options/license/SWL +++ b/options/license/SWL @@ -1,32 +1,7 @@ -The authors hereby grant permission to use, copy, modify, distribute, and -license this software and its documentation for any purpose, provided that -existing copyright notices are retained in all copies and that this notice -is included verbatim in any distributions. No written agreement, license, -or royalty fee is required for any of the authorized uses. Modifications to -this software may be copyrighted by their authors and need not follow the -licensing terms described here, provided that the new terms are clearly indicated -on the first page of each file where they apply. +The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. -IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN -IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS -AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, -AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, -SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, -the Government shall have only "Restricted Rights" in the software and related -documentation as defined in the Federal Acquisition Regulations (FARs) in -Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the -Department of Defense, the software shall be classified as "Commercial Computer -Software" and the Government shall have only "Restricted Rights" as defined -in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the -authors grant the U.S. Government and others acting in its behalf permission -to use and distribute the software in accordance with the terms specified -in this license. +GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. -BY INSTALLING THIS SOFTWARE, YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, -THAT YOU UNDERSTAND IT, AND THAT YOU AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. +BY INSTALLING THIS SOFTWARE, YOU ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, THAT YOU UNDERSTAND IT, AND THAT YOU AGREE TO BE BOUND BY ITS TERMS AND CONDITIONS. diff --git a/options/license/Saxpath b/options/license/Saxpath index b6d7fc521..f985c2953 100644 --- a/options/license/Saxpath +++ b/options/license/Saxpath @@ -1,41 +1,19 @@ Copyright (C) 2000-2002 werken digital. - All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions, and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions, and the disclaimer that follows these conditions -in the documentation and/or other materials provided with the distribution. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the disclaimer that follows these conditions in the documentation and/or other materials provided with the distribution. -3. The name "SAXPath" must not be used to endorse or promote products derived -from this software without prior written permission. For written permission, -please contact license@saxpath.org. + 3. The name "SAXPath" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact license@saxpath.org. -4. Products derived from this software may not be called "SAXPath", nor may -"SAXPath" appear in their name, without prior written permission from the -SAXPath Project Management (pm@saxpath.org). + 4. Products derived from this software may not be called "SAXPath", nor may "SAXPath" appear in their name, without prior written permission from the SAXPath Project Management (pm@saxpath.org). -In addition, we request (but do not require) that you include in the end-user -documentation provided with the redistribution and/or in the software itself -an acknowledgement equivalent to the following: +In addition, we request (but do not require) that you include in the end-user documentation provided with the redistribution and/or in the software itself an acknowledgement equivalent to the following: + "This product includes software developed by the SAXPath Project (http://www.saxpath.org/)." -"This product includes software developed by the SAXPath Project (http://www.saxpath.org/)." +Alternatively, the acknowledgment may be graphical using the logos available at http://www.saxpath.org/ -Alternatively, the acknowledgment may be graphical using the logos available -at http://www.saxpath.org/ - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SAXPath -AUTHORS OR THE PROJECT CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE SAXPath AUTHORS OR THE PROJECT CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/Sendmail b/options/license/Sendmail index 8be73d9c6..86eecd39c 100644 --- a/options/license/Sendmail +++ b/options/license/Sendmail @@ -1,75 +1,36 @@ -SENDMAIL LICENSE The following license terms and conditions apply, unless -a redistribution agreement or other license is obtained from Sendmail, Inc., -6475 Christie Ave, Third Floor, Emeryville, CA 94608, USA, or by electronic -mail at license@sendmail.com. +SENDMAIL LICENSE + +The following license terms and conditions apply, unless a redistribution agreement or other license is obtained from Sendmail, Inc., 6475 Christie Ave, Third Floor, Emeryville, CA 94608, USA, or by electronic mail at license@sendmail.com. License Terms: -Use, Modification and Redistribution (including distribution of any modified -or derived work) in source and binary forms is permitted only if each of the -following conditions is met: +Use, Modification and Redistribution (including distribution of any modified or derived work) in source and binary forms is permitted only if each of the following conditions is met: -1. Redistributions qualify as "freeware" or "Open Source Software" under one -of the following terms: +1. Redistributions qualify as "freeware" or "Open Source Software" under one of the following terms: -(a) Redistributions are made at no charge beyond the reasonable cost of materials -and delivery. + (a) Redistributions are made at no charge beyond the reasonable cost of materials and delivery. -(b) Redistributions are accompanied by a copy of the Source Code or by an -irrevocable offer to provide a copy of the Source Code for up to three years -at the cost of materials and delivery. Such redistributions must allow further -use, modification, and redistribution of the Source Code under substantially -the same terms as this license. For the purposes of redistribution "Source -Code" means the complete compilable and linkable source code of sendmail including -all modifications. + (b) Redistributions are accompanied by a copy of the Source Code or by an irrevocable offer to provide a copy of the Source Code for up to three years at the cost of materials and delivery. Such redistributions must allow further use, modification, and redistribution of the Source Code under substantially the same terms as this license. For the purposes of redistribution "Source Code" means the complete compilable and linkable source code of sendmail including all modifications. -2. Redistributions of Source Code must retain the copyright notices as they -appear in each Source Code file, these license terms, and the disclaimer/limitation -of liability set forth as paragraph 6 below. +2. Redistributions of Source Code must retain the copyright notices as they appear in each Source Code file, these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below. -3. Redistributions in binary form must reproduce the Copyright Notice, these -license terms, and the disclaimer/limitation of liability set forth as paragraph -6 below, in the documentation and/or other materials provided with the distribution. -For the purposes of binary distribution the "Copyright Notice" refers to the -following language: +3. Redistributions in binary form must reproduce the Copyright Notice, these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: +"Copyright (c) 1998-2010 Sendmail, Inc. All rights reserved." - "Copyright (c) 1998-2010 Sendmail, Inc. All rights reserved." +4. Neither the name of Sendmail, Inc. nor the University of California nor names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. The name "sendmail" is a trademark of Sendmail, Inc. -4. Neither the name of Sendmail, Inc. nor the University of California nor -names of their contributors may be used to endorse or promote products derived -from this software without specific prior written permission. The name "sendmail" -is a trademark of Sendmail, Inc. +5. All redistributions must comply with the conditions imposed by the University of California on certain embedded code, which copyright Notice and conditions for redistribution are as follows: -5. All redistributions must comply with the conditions imposed by the University -of California on certain embedded code, which copyright Notice and conditions -for redistribution are as follows: + (a) Copyright (c) 1988, 1993 The Regents of the University of California. All rights reserved. -(a) Copyright (c) 1988, 1993 The Regents of the University of California. -All rights reserved. + (b) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -(b) Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: + (i) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -(i) Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. + (ii) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -(ii) Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + (iii) Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -(iii) Neither the name of the University nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. +6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY SENDMAIL, INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF CALIFORNIA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY SENDMAIL, -INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENDMAIL, INC., -THE REGENTS OF THE UNIVERSITY OF CALIFORNIA OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. $Revision: 8.16 -$, Last updated $Date: 2010/10/25 23:11:19 $, Document 139848.1 +$Revision: 8.16 $, Last updated $Date: 2010/10/25 23:11:19 $, Document 139848.1 diff --git a/options/license/Sendmail-8.23 b/options/license/Sendmail-8.23 index 03dfde989..e076ca3d7 100644 --- a/options/license/Sendmail-8.23 +++ b/options/license/Sendmail-8.23 @@ -1,75 +1,36 @@ -SENDMAIL LICENSE The following license terms and conditions apply, unless -a redistribution agreement or other license is obtained from Proofpoint, Inc., -892 Ross Street, Sunnyvale, CA, 94089, USA, or by electronic mail at sendmail-license@proofpoint.com. +SENDMAIL LICENSE + +The following license terms and conditions apply, unless a redistribution agreement or other license is obtained from Proofpoint, Inc., 892 Ross Street, Sunnyvale, CA, 94089, USA, or by electronic mail at sendmail-license@proofpoint.com. License Terms: -Use, Modification and Redistribution (including distribution of any modified -or derived work) in source and binary forms is permitted only if each of the -following conditions is met: +Use, Modification and Redistribution (including distribution of any modified or derived work) in source and binary forms is permitted only if each of the following conditions is met: -1. Redistributions qualify as "freeware" or "Open Source Software" under one -of the following terms: +1. Redistributions qualify as "freeware" or "Open Source Software" under one of the following terms: -(a) Redistributions are made at no charge beyond the reasonable cost of materials -and delivery. + (a) Redistributions are made at no charge beyond the reasonable cost of materials and delivery. -(b) Redistributions are accompanied by a copy of the Source Code or by an -irrevocable offer to provide a copy of the Source Code for up to three years -at the cost of materials and delivery. Such redistributions must allow further -use, modification, and redistribution of the Source Code under substantially -the same terms as this license. For the purposes of redistribution "Source -Code" means the complete compilable and linkable source code of sendmail and -associated libraries and utilities in the sendmail distribution including -all modifications. + (b) Redistributions are accompanied by a copy of the Source Code or by an irrevocable offer to provide a copy of the Source Code for up to three years at the cost of materials and delivery. Such redistributions must allow further use, modification, and redistribution of the Source Code under substantially the same terms as this license. For the purposes of redistribution "Source Code" means the complete compilable and linkable source code of sendmail and associated libraries and utilities in the sendmail distribution including all modifications. -2. Redistributions of Source Code must retain the copyright notices as they -appear in each Source Code file, these license terms, and the disclaimer/limitation -of liability set forth as paragraph 6 below. +2. Redistributions of Source Code must retain the copyright notices as they appear in each Source Code file, these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below. -3. Redistributions in binary form must reproduce the Copyright Notice, these -license terms, and the disclaimer/limitation of liability set forth as paragraph -6 below, in the documentation and/or other materials provided with the distribution. -For the purposes of binary distribution the "Copyright Notice" refers to the -following language: +3. Redistributions in binary form must reproduce the Copyright Notice, these license terms, and the disclaimer/limitation of liability set forth as paragraph 6 below, in the documentation and/or other materials provided with the distribution. For the purposes of binary distribution the "Copyright Notice" refers to the following language: +"Copyright (c) 1998-2014 Proofpoint, Inc. All rights reserved." - "Copyright (c) 1998-2014 Proofpoint, Inc. All rights reserved." +4. Neither the name of Proofpoint, Inc. nor the University of California nor names of their contributors may be used to endorse or promote products derived from this software without specific prior written permission. The name "sendmail" is a trademark of Proofpoint, Inc. -4. Neither the name of Proofpoint, Inc. nor the University of California nor -names of their contributors may be used to endorse or promote products derived -from this software without specific prior written permission. The name "sendmail" -is a trademark of Proofpoint, Inc. +5. All redistributions must comply with the conditions imposed by the University of California on certain embedded code, which copyright Notice and conditions for redistribution are as follows: -5. All redistributions must comply with the conditions imposed by the University -of California on certain embedded code, which copyright Notice and conditions -for redistribution are as follows: + (a) Copyright (c) 1988, 1993 The Regents of the University of California. All rights reserved. -(a) Copyright (c) 1988, 1993 The Regents of the University of California. -All rights reserved. + (b) Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -(b) Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: + (i) Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -(i) Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. + (ii) Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -(ii) Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + (iii) Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -(iii) Neither the name of the University nor the names of its contributors -may be used to endorse or promote products derived from this software without -specific prior written permission. +6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY SENDMAIL, INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENDMAIL, INC., THE REGENTS OF THE UNIVERSITY OF CALIFORNIA OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -6. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY SENDMAIL, -INC. AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENDMAIL, INC., -THE REGENTS OF THE UNIVERSITY OF CALIFORNIA OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. $Revision: 8.23 -$, Last updated $Date: 2014-01-26 20:10:01 $, Document 139848.1 +$Revision: 8.23 $, Last updated $Date: 2014-01-26 20:10:01 $, Document 139848.1 diff --git a/options/license/SimPL-2.0 b/options/license/SimPL-2.0 index 3f5d0a8ae..0fde0fa08 100644 --- a/options/license/SimPL-2.0 +++ b/options/license/SimPL-2.0 @@ -1,62 +1,37 @@ -Simple Public License (SimPL) Preamble +Simple Public License (SimPL) -This Simple Public License 2.0 (SimPL 2.0 for short) is a plain language implementation -of GPL 2.0. The words are different, but the goal is the same - to guarantee -for all users the freedom to share and change software. If anyone wonders -about the meaning of the SimPL, they should interpret it as consistent with -GPL 2.0. Simple Public License (SimPL) 2.0 +Preamble -The SimPL applies to the software's source and object code and comes with -any rights that I have in it (other than trademarks). You agree to the SimPL -by copying, distributing, or making a derivative work of the software. +This Simple Public License 2.0 (SimPL 2.0 for short) is a plain language implementation of GPL 2.0. The words are different, but the goal is the same - to guarantee for all users the freedom to share and change software. If anyone wonders about the meaning of the SimPL, they should interpret it as consistent with GPL 2.0. + +Simple Public License (SimPL) 2.0 + +The SimPL applies to the software's source and object code and comes with any rights that I have in it (other than trademarks). You agree to the SimPL by copying, distributing, or making a derivative work of the software. You get the royalty free right to: - - Use the software for any purpose; +- Use the software for any purpose; +- Make derivative works of it (this is called a "Derived Work"); +- Copy and distribute it and any Derived Work. - - Make derivative works of it (this is called a "Derived Work"); +If you distribute the software or a Derived Work, you must give back to the community by: - - Copy and distribute it and any Derived Work. - -If you distribute the software or a Derived Work, you must give back to the -community by: - - - Prominently noting the date of any changes you make; - -- Leaving other people's copyright notices, warranty disclaimers, and license -terms in place; - -- Providing the source code, build scripts, installation scripts, and interface -definitions in a form that is easy to get and best to modify; - -- Licensing it to everyone under SimPL, or substantially similar terms (such -as GPL 2.0), without adding further restrictions to the rights provided; - - - Conspicuously announcing that it is available under that license. +- Prominently noting the date of any changes you make; +- Leaving other people's copyright notices, warranty disclaimers, and license terms in place; +- Providing the source code, build scripts, installation scripts, and interface definitions in a form that is easy to get and best to modify; +- Licensing it to everyone under SimPL, or substantially similar terms (such as GPL 2.0), without adding further restrictions to the rights provided; +- Conspicuously announcing that it is available under that license. There are some things that you must shoulder: - - You get NO WARRANTIES. None of any kind; +- You get NO WARRANTIES. None of any kind; +- If the software damages you in any way, you may only recover direct damages up to the amount you paid for it (that is zero if you did not pay anything). You may not recover any other damages, including those called "consequential damages." (The state or country where you live may not allow you to limit your liability in this way, so this may not apply to you); -- If the software damages you in any way, you may only recover direct damages -up to the amount you paid for it (that is zero if you did not pay anything). -You may not recover any other damages, including those called "consequential -damages." (The state or country where you live may not allow you to limit -your liability in this way, so this may not apply to you); +The SimPL continues perpetually, except that your license rights end automatically if: -The SimPL continues perpetually, except that your license rights end automatically -if: - -- You do not abide by the "give back to the community" terms (your licensees -get to keep their rights if they abide); - -- Anyone prevents you from distributing the software under the terms of the -SimPL. +- You do not abide by the "give back to the community" terms (your licensees get to keep their rights if they abide); +- Anyone prevents you from distributing the software under the terms of the SimPL. License for the License -You may do anything that you want with the SimPL text; it's a license form -to use in any way that you find helpful. To avoid confusion, however, if you -change the terms in any way then you may not call your license the Simple -Public License or the SimPL (but feel free to acknowledge that your license -is "based on the Simple Public License"). +You may do anything that you want with the SimPL text; it's a license form to use in any way that you find helpful. To avoid confusion, however, if you change the terms in any way then you may not call your license the Simple Public License or the SimPL (but feel free to acknowledge that your license is "based on the Simple Public License"). diff --git a/options/license/Sleepycat b/options/license/Sleepycat index bc10a6b60..19d7e1ea1 100644 --- a/options/license/Sleepycat +++ b/options/license/Sleepycat @@ -1,85 +1,37 @@ -The Sleepycat License Copyright (c) 1990-1999 Sleepycat Software. All rights -reserved. +The Sleepycat License Copyright (c) 1990-1999 Sleepycat Software. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -- Redistributions in any form must be accompanied by information on how to -obtain complete source code for the DB software and any accompanying software -that uses the DB software. The source code must either be included in the -distribution or be available for no more than the cost of distribution plus -a nominal fee, and must be freely redistributable under reasonable conditions. -For an executable file, complete source code means the source code for all -modules it contains. It does not include source code for modules or files -that typically accompany the major components of the operating system on which -the executable file runs. + - Redistributions in any form must be accompanied by information on how to obtain complete source code for the DB software and any accompanying software that uses the DB software. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs. -THIS SOFTWARE IS PROVIDED BY SLEEPYCAT SOFTWARE ``AS IS'' AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, -ARE DISCLAIMED. IN NO EVENT SHALL SLEEPYCAT SOFTWARE BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (c) 1990, 1993, 1994, -1995 The Regents of the University of California. All rights reserved. +THIS SOFTWARE IS PROVIDED BY SLEEPYCAT SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL SLEEPYCAT SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: -- Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +Copyright (c) 1990, 1993, 1994, 1995 The Regents of the University of California. All rights reserved. -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -- Neither the name of the University nor the names of its contributors may -be used to endorse or promote products derived from this software without -specific prior written permission. + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Copyright (c) 1995, 1996 The President -and Fellows of Harvard University. All rights reserved. + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: + - Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. -- Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. -- Neither the name of the University nor the names of its contributors may -be used to endorse or promote products derived from this software without -specific prior written permission. +Copyright (c) 1995, 1996 The President and Fellows of Harvard University. All rights reserved. -THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + + - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + + - Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/Spencer-86 b/options/license/Spencer-86 index 779571a68..8577e881c 100644 --- a/options/license/Spencer-86 +++ b/options/license/Spencer-86 @@ -1,14 +1,11 @@ -Copyright (c) 1986 by University of Toronto. Written by Henry Spencer. Not -derived from licensed software. +Copyright (c) 1986 by University of Toronto. Written by Henry Spencer. Not derived from licensed software. -Permission is granted to anyone to use this software for any purpose on any -computer system, and to redistribute it freely, subject to the following restrictions: +Permission is granted to anyone to use this software for any purpose on any computer system, and to redistribute it freely, subject to the following restrictions: -1. The author is not responsible for the consequences of use of this software, -no matter how awful, even if they arise from defects in it. +1. The author is not responsible for the consequences of use of this software, no matter how awful, even if they arise from defects in it. -2. The origin of this software must not be misrepresented, either by explicit -claim or by omission. +2. The origin of this software must not be misrepresented, either by explicit claim or by omission. -3. Altered versions must be plainly marked as such, and must not be misrepresented -as being the original software. +3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. + +Beware that some of this code is subtly aware of the way operator precedence is structured in regular expressions. Serious changes in regular-expression syntax might require a total rethink. diff --git a/options/license/Spencer-94 b/options/license/Spencer-94 index 40733d2e9..75ba7f7d2 100644 --- a/options/license/Spencer-94 +++ b/options/license/Spencer-94 @@ -1,21 +1,12 @@ -Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. +Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. +This software is not subject to any license of the American Telephone and Telegraph Company or of the Regents of the University of California. -This software is not subject to any license of the American Telephone and -Telegraph Company or of the Regents of the University of California. +Permission is granted to anyone to use this software for any purpose on any computer system, and to alter it and redistribute it, subject to the following restrictions: -Permission is granted to anyone to use this software for any purpose on any -computer system, and to alter it and redistribute it, subject to the following -restrictions: +1. The author is not responsible for the consequences of use of this software, no matter how awful, even if they arise from flaws in it. -1. The author is not responsible for the consequences of use of this software, -no matter how awful, even if they arise from flaws in it. +2. The origin of this software must not be misrepresented, either by explicit claim or by omission. Since few users ever read sources, credits must appear in the documentation. -2. The origin of this software must not be misrepresented, either by explicit -claim or by omission. Since few users ever read sources, credits must appear -in the documentation. +3. Altered versions must be plainly marked as such, and must not be misrepresented as being the original software. Since few users ever read sources, credits must appear in the documentation. -3. Altered versions must be plainly marked as such, and must not be misrepresented -as being the original software. Since few users ever read sources, credits -must appear in the documentation. - - 4. This notice may not be removed or altered. +4. This notice may not be removed or altered. diff --git a/options/license/Spencer-99 b/options/license/Spencer-99 index 0bd97346b..ca7099033 100644 --- a/options/license/Spencer-99 +++ b/options/license/Spencer-99 @@ -1,23 +1,9 @@ Copyright (c) 1998, 1999 Henry Spencer. All rights reserved. -Development of this software was funded, in part, by Cray Research Inc., UUNET -Communications Services Inc., Sun Microsystems Inc., and Scriptics Corporation, -none of whom are responsible for the results. The author thanks all of them. +Development of this software was funded, in part, by Cray Research Inc., UUNET Communications Services Inc., Sun Microsystems Inc., and Scriptics Corporation, none of whom are responsible for the results. The author thanks all of them. -Redistribution and use in source and binary forms - with or without modification -- are permitted for any purpose, provided that redistributions in source form -retain this entire copyright notice and indicate the origin and nature of -any modifications. +Redistribution and use in source and binary forms - with or without modification - are permitted for any purpose, provided that redistributions in source form retain this entire copyright notice and indicate the origin and nature of any modifications. -I'd appreciate being given credit for this package in the documentation of -software which uses it, but that is not a requirement. +I'd appreciate being given credit for this package in the documentation of software which uses it, but that is not a requirement. -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL HENRY SPENCER -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL HENRY SPENCER BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/SugarCRM-1.1.3 b/options/license/SugarCRM-1.1.3 index 713c95074..e00b5b3f3 100644 --- a/options/license/SugarCRM-1.1.3 +++ b/options/license/SugarCRM-1.1.3 @@ -1,392 +1,149 @@ -SUGARCRM PUBLIC LICENSE Applies to Sugar Open Source Edition v1 through v4. -Please note that these releases are no longer supported or distributed. +SUGARCRM PUBLIC LICENSE + +Applies to Sugar Open Source Edition v1 through v4. Please note that these releases are no longer supported or distributed. Version 1.1.3 -The SugarCRM Public License Version ("SPL") consists of the Mozilla Public -License Version 1.1, modified to be specific to SugarCRM, with the Additional -Terms in Exhibit B. The original Mozilla Public License 1.1 can be found at: -http://www.mozilla.org/MPL/MPL-1.1.html +The SugarCRM Public License Version ("SPL") consists of the Mozilla Public License Version 1.1, modified to be specific to SugarCRM, with the Additional Terms in Exhibit B. The original Mozilla Public License 1.1 can be found at: http://www.mozilla.org/MPL/MPL-1.1.html - 1. Definitions. +1. Definitions. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code or Modifications or the combination -of the Original Code and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. + 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: -B. Any new file that contains any part of the Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code or previous Modifications. -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. + 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.12. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. + 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. - 2. Source Code License. +2. Source Code License. - 2.2. Contributor Grant. + 2.2. Contributor Grant. +Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license -Subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license + (b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination). -(b) under Patent Claims infringed by the making, using, or selling of Modifications -made by that Contributor either alone and/or in combination with its Contributor -Version (or portions of such combination), to make, use, sell, offer for sale, -have made, and/or otherwise dispose of: 1) Modifications made by that Contributor -(or portions thereof); and 2) the combination of Modifications made by that -Contributor with its Contributor Version (or portions of such combination). + (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code. -(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the -date Contributor first makes Commercial Use of the Covered Code. + (d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor. -(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) -for any code that Contributor has deleted from the Contributor Version; 2) -separate from the Contributor Version; 3) for infringements caused by: i) -third party modifications of Contributor Version or ii) the combination of -Modifications made by that Contributor with other software (except as part -of the Contributor Version) or other devices; or 4) under Patent Claims infringed -by Covered Code in the absence of Modifications made by that Contributor. + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and +3. Distribution Obligations. - 3. Distribution Obligations. + 3.2. Availability of Source Code. Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party. -3.2. Availability of Source Code. Any Modification which You create or to -which You contribute must be made available in Source Code form under the -terms of this License either on the same media as an Executable version or -via an accepted Electronic Distribution Mechanism to anyone to whom you made -an Executable version available; and if made available via Electronic Distribution -Mechanism, must remain available for at least twelve (12) months after the -date it initially became available, or at least six (6) months after a subsequent -version of that particular Modification has been made available to such recipients. -You are responsible for ensuring that the Source Code version remains available -even if the Electronic Distribution Mechanism is maintained by a third party. + 3.3. Description of Modifications. You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. -3.3. Description of Modifications. You must cause all Covered Code to which -You contribute to contain a file documenting the changes You made to create -that Covered Code and the date of any change. You must include a prominent -statement that the Modification is derived, directly or indirectly, from Original -Code provided by the Initial Developer and including the name of the Initial -Developer in (a) the Source Code, and (b) in any notice in an Executable version -or related documentation in which You describe the origin or ownership of -the Covered Code. + 3.4. Intellectual Property Matters - 3.4. Intellectual Property Matters + (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. -(b) Contributor APIs. If Contributor's Modifications include an application -programming interface and Contributor has knowledge of patent licenses which -are reasonably necessary to implement that API, Contributor must also include -this information in the LEGAL file. + (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. -(a) Third Party Claims. If Contributor has knowledge that a license under -a third party's intellectual property rights is required to exercise the rights -granted by such Contributor under Sections 2.1 or 2.2, Contributor must include -a text file with the Source Code distribution titled "LEGAL" which describes -the claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Code that new knowledge has been obtained. + (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. -(c) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. + 3.5. Required Notices. You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer. -3.5. Required Notices. You must duplicate the notice in Exhibit A in each -file of the Source Code. If it is not possible to put such notice in a particular -Source Code file due to its structure, then You must include such notice in -a location (such as a relevant directory) where a user would be likely to -look for such a notice. If You created one or more Modification(s) You may -add your name as a Contributor to the notice described in Exhibit A. You must -also duplicate this License in any documentation for the Source Code where -You describe recipients' rights or ownership rights relating to Covered Code. -You may choose to offer, and to charge a fee for, warranty, support, indemnity -or liability obligations to one or more recipients of Covered Code. However, -You may do so only on Your own behalf, and not on behalf of the Initial Developer -or any Contributor. You must make it absolutely clear than any such warranty, -support, indemnity or liability obligation is offered by You alone, and You -hereby agree to indemnify the Initial Developer and every Contributor for -any liability incurred by the Initial Developer or such Contributor as a result -of warranty, support, indemnity or liability terms You offer. + 3.6. Distribution of Executable Versions. You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients' rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of any such terms You offer. -3.6. Distribution of Executable Versions. You may distribute Covered Code -in Executable form only if the requirements of Section 3.1-3.5 have been met -for that Covered Code, and if You include a notice stating that the Source -Code version of the Covered Code is available under the terms of this License, -including a description of how and where You have fulfilled the obligations -of Section 3.2. The notice must be conspicuously included in any notice in -an Executable version, related documentation or collateral in which You describe -recipients' rights relating to the Covered Code. You may distribute the Executable -version of Covered Code or ownership rights under a license of Your choice, -which may contain terms different from this License, provided that You are -in compliance with the terms of this License and that the license for the -Executable version does not attempt to limit or alter the recipient's rights -in the Source Code version from the rights set forth in this License. If You -distribute the Executable version under a different license You must make -it absolutely clear that any terms which differ from this License are offered -by You alone, not by the Initial Developer or any Contributor. You hereby -agree to indemnify the Initial Developer and every Contributor for any liability -incurred by the Initial Developer or such Contributor as a result of any such -terms You offer. + 3.7. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. -3.7. Larger Works. You may create a Larger Work by combining Covered Code -with other code not governed by the terms of this License and distribute the -Larger Work as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Code. +4. Inability to Comply Due to Statute or Regulation. - 4. Inability to Comply Due to Statute or Regulation. +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. +5. Application of this License. - 5. Application of this License. +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. +6. Versions of the License. - 6. Versions of the License. + 6.2. Effect of New Versions. Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by SugarCRM. No one other than SugarCRM has the right to modify the terms applicable to Covered Code created under this License. -6.2. Effect of New Versions. Once Covered Code has been published under a -particular version of the License, You may always continue to use it under -the terms of that version. You may also choose to use such Covered Code under -the terms of any subsequent version of the License published by SugarCRM. -No one other than SugarCRM has the right to modify the terms applicable to -Covered Code created under this License. + 6.3. Derivative Works. If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases "SugarCRM", "SPL" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the SugarCRM Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) -6.3. Derivative Works. If You create or use a modified version of this License -(which you may only do in order to apply it to code which is not already Covered -Code governed by this License), You must (a) rename Your license so that the -phrases "SugarCRM", "SPL" or any confusingly similar phrase do not appear -in your license (except to note that your license differs from this License) -and (b) otherwise make it clear that Your version of the license contains -terms which differ from the SugarCRM Public License. (Filling in the name -of the Initial Developer, Original Code or Contributor in the notice described -in Exhibit A shall not of themselves be deemed to be modifications of this -License.) +7. DISCLAIMER OF WARRANTY. - 7. DISCLAIMER OF WARRANTY. +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES -THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR -PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE -OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN -ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME -THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER -OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED -CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. +8. TERMINATION. - 8. TERMINATION. + 8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as "Participant") alleging that: -8.2. If You initiate litigation by asserting a patent infringement claim (excluding -declatory judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You file such action is referred -to as "Participant") alleging that: + (a) such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above. -(a) such Participant's Contributor Version directly or indirectly infringes -any patent, then any and all rights granted by such Participant to You under -Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant -terminate prospectively, unless if within 60 days after receipt of notice -You either: (i) agree in writing to pay Participant a mutually agreeable reasonable -royalty for Your past and future use of Modifications made by such Participant, -or (ii) withdraw Your litigation claim with respect to the Contributor Version -against such Participant. If within 60 days of notice, a reasonable royalty -and payment arrangement are not mutually agreed upon in writing by the parties -or the litigation claim is not withdrawn, the rights granted by Participant -to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration -of the 60 day notice period specified above. + (b) any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant. -(b) any software, hardware, or device, other than such Participant's Contributor -Version, directly or indirectly infringes any patent, then any rights granted -to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective -as of the date You first made, used, sold, distributed, or had made, Modifications -made by that Participant. + 8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. + 8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. +9. LIMITATION OF LIABILITY. - 9. LIMITATION OF LIABILITY. +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. +10. U.S. GOVERNMENT END USERS. - 10. U.S. GOVERNMENT END USERS. +The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial computer software documentation," as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -The Covered Code is a "commercial item," as that term is defined in 48 C.F.R. -2.101 (Oct. 1995), consisting of "commercial computer software" and "commercial -computer software documentation," as such terms are used in 48 C.F.R. 12.212 -(Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through -227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code -with only those rights set forth herein. +11. MISCELLANEOUS. - 11. MISCELLANEOUS. +This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys' fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License. -This License represents the complete agreement concerning subject matter hereof. -If any provision of this License is held to be unenforceable, such provision -shall be reformed only to the extent necessary to make it enforceable. This -License shall be governed by California law provisions (except to the extent -applicable law, if any, provides otherwise), excluding its conflict-of-law -provisions. With respect to disputes in which at least one party is a citizen -of, or an entity chartered or registered to do business in the United States -of America, any litigation relating to this License shall be subject to the -jurisdiction of the Federal Courts of the Northern District of California, -with venue lying in Santa Clara County, California, with the losing party -responsible for costs, including without limitation, court costs and reasonable -attorneys' fees and expenses. The application of the United Nations Convention -on Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall be -construed against the drafter shall not apply to this License. +12. RESPONSIBILITY FOR CLAIMS. - 12. RESPONSIBILITY FOR CLAIMS. +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. +13. MULTIPLE-LICENSED CODE. - 13. MULTIPLE-LICENSED CODE. +Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". "Multiple-Licensed" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the SPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A. -Initial Developer may designate portions of the Covered Code as "Multiple-Licensed". -"Multiple-Licensed" means that the Initial Developer permits you to utilize -portions of the Covered Code under Your choice of the SPL or the alternative -licenses, if any, specified by the Initial Developer in the file described -in Exhibit A. SugarCRM Public License 1.1.3 - Exhibit A +SugarCRM Public License 1.1.3 - Exhibit A -The contents of this file are subject to the SugarCRM Public License Version -1.1.3 ("License"); You may not use this file except in compliance with the -License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. +The contents of this file are subject to the SugarCRM Public License Version 1.1.3 ("License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.sugarcrm.com/SPL Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: SugarCRM Open Source The Initial Developer of the Original Code is SugarCRM, Inc. - Portions created by SugarCRM are Copyright (C) 2004 SugarCRM, Inc.; - All Rights Reserved. - Contributor(s): ______________________________________. -[NOTE: The text of this Exhibit A may differ slightly from the text of the -notices in the Source Code files of the Original Code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] +[NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] SugarCRM Public License 1.1.3 - Exhibit B Additional Terms applicable to the SugarCRM Public License. - I. Effect., +I. Effect. +These additional terms described in this SugarCRM Public License - Additional Terms shall apply to the Covered Code under this License. -These additional terms described in this SugarCRM Public License - Additional -Terms shall apply to the Covered Code under this License. +II. SugarCRM and logo. +This License does not grant any rights to use the trademarks "SugarCRM" and the "SugarCRM" logos even if such marks are included in the Original Code or Modifications. - II. SugarCRM and logo. - -This License does not grant any rights to use the trademarks "SugarCRM" and -the "SugarCRM" logos even if such marks are included in the Original Code -or Modifications. - -However, in addition to the other notice obligations, all copies of the Covered -Code in Executable and Source Code form distributed must, as a form of attribution -of the original author, include on each user interface screen (i) the "Powered -by SugarCRM" logo and (ii) the copyright notice in the same form as the latest -version of the Covered Code distributed by SugarCRM, Inc. at the time of distribution -of such copy. In addition, the "Powered by SugarCRM" logo must be visible -to all users and be located at the very bottom center of each user interface -screen. Notwithstanding the above, the dimensions of the "Powered By SugarCRM" -logo must be at least 106 x 23 pixels. When users click on the "Powered by -SugarCRM" logo it must direct them back to http://www.sugarforge.org. In addition, -the copyright notice must remain visible to all users at all times at the -bottom of the user interface screen. When users click on the copyright notice, -it must direct them back to http://www.sugarcrm.com +However, in addition to the other notice obligations, all copies of the Covered Code in Executable and Source Code form distributed must, as a form of attribution of the original author, include on each user interface screen (i) the "Powered by SugarCRM" logo and (ii) the copyright notice in the same form as the latest version of the Covered Code distributed by SugarCRM, Inc. at the time of distribution of such copy. In addition, the "Powered by SugarCRM" logo must be visible to all users and be located at the very bottom center of each user interface screen. Notwithstanding the above, the dimensions of the "Powered By SugarCRM" logo must be at least 106 x 23 pixels. When users click on the "Powered by SugarCRM" logo it must direct them back to http://www.sugarforge.org. In addition, the copyright notice must remain visible to all users at all times at the bottom of the user interface screen. When users click on the copyright notice, it must direct them back to http://www.sugarcrm.com diff --git a/options/license/Swift-exception b/options/license/Swift-exception index ed1f1256d..32b573cea 100644 --- a/options/license/Swift-exception +++ b/options/license/Swift-exception @@ -1,3 +1,6 @@ -Runtime Library Exception to the Apache 2.0 License: +### Runtime Library Exception to the Apache 2.0 License: ### -As an exception, if you use this Software to compile your source code and portions of this Software are embedded into the binary product as a result, you may redistribute such product without providing attribution as would otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. +As an exception, if you use this Software to compile your source code and +portions of this Software are embedded into the binary product as a result, +you may redistribute such product without providing attribution as would +otherwise be required by Sections 4(a), 4(b) and 4(d) of the License. diff --git a/options/license/TAPR-OHL-1.0 b/options/license/TAPR-OHL-1.0 index 236edaa64..e20c23663 100644 --- a/options/license/TAPR-OHL-1.0 +++ b/options/license/TAPR-OHL-1.0 @@ -1,270 +1,266 @@ -The TAPR Open Hardware License Version 1.0 (May 25, 2007) Copyright 2007 TAPR -- http://www.tapr.org/OHL +The TAPR Open Hardware License +Version 1.0 (May 25, 2007) +Copyright 2007 TAPR - http://www.tapr.org/OHL PREAMBLE -Open Hardware is a thing - a physical artifact, either electrical or mechanical -- whose design information is available to, and usable by, the public in a -way that allows anyone to make, modify, distribute, and use that thing. In -this preface, design information is called "documentation" and things created -from it are called "products." +Open Hardware is a thing - a physical artifact, either electrical or +mechanical - whose design information is available to, and usable by, +the public in a way that allows anyone to make, modify, distribute, and +use that thing. In this preface, design information is called +"documentation" and things created from it are called "products." -The TAPR Open Hardware License ("OHL") agreement provides a legal framework -for Open Hardware projects. It may be used for any kind of product, be it -a hammer or a computer motherboard, and is TAPR's contribution to the community; -anyone may use the OHL for their Open Hardware project. +The TAPR Open Hardware License ("OHL") agreement provides a legal +framework for Open Hardware projects. It may be used for any kind of +product, be it a hammer or a computer motherboard, and is TAPR's +contribution to the community; anyone may use the OHL for their Open +Hardware project. -Like the GNU General Public License, the OHL is designed to guarantee your -freedom to share and to create. It forbids anyone who receives rights under -the OHL to deny any other licensee those same rights to copy, modify, and -distribute documentation, and to make, use and distribute products based on -that documentation. +Like the GNU General Public License, the OHL is designed to guarantee +your freedom to share and to create. It forbids anyone who receives +rights under the OHL to deny any other licensee those same rights to +copy, modify, and distribute documentation, and to make, use and +distribute products based on that documentation. -Unlike the GPL, the OHL is not primarily a copyright license. While copyright -protects documentation from unauthorized copying, modification, and distribution, -it has little to do with your right to make, distribute, or use a product -based on that documentation. For better or worse, patents play a significant -role in those activities. Although it does not prohibit anyone from patenting -inventions embodied in an Open Hardware design, and of course cannot prevent -a third party from enforcing their patent rights, those who benefit from an -OHL design may not bring lawsuits claiming that design infringes their patents -or other intellectual property. +Unlike the GPL, the OHL is not primarily a copyright license. While +copyright protects documentation from unauthorized copying, modification, +and distribution, it has little to do with your right to make, distribute, +or use a product based on that documentation. For better or worse, patents +play a significant role in those activities. Although it does not prohibit +anyone from patenting inventions embodied in an Open Hardware design, and +of course cannot prevent a third party from enforcing their patent rights, +those who benefit from an OHL design may not bring lawsuits claiming that +design infringes their patents or other intellectual property. -The OHL addresses unique issues involved in the creation of tangible, physical -things, but does not cover software, firmware, or code loaded into programmable -devices. A copyright-oriented license such as the GPL better suits these creations. +The OHL addresses unique issues involved in the creation of tangible, +physical things, but does not cover software, firmware, or code loaded +into programmable devices. A copyright-oriented license such as the GPL +better suits these creations. -How can you use the OHL, or a design based upon it? While the terms and conditions -below take precedence over this preamble, here is a summary: +How can you use the OHL, or a design based upon it? While the terms and +conditions below take precedence over this preamble, here is a summary: - * You may modify the documentation and make products based upon it. +* You may modify the documentation and make products based upon it. - * You may use products for any legal purpose without limitation. +* You may use products for any legal purpose without limitation. -* You may distribute unmodified documentation, but you must include the complete -package as you received it. +* You may distribute unmodified documentation, but you must include the +complete package as you received it. -* You may distribute products you make to third parties, if you either include -the documentation on which the product is based, or make it available without -charge for at least three years to anyone who requests it. +* You may distribute products you make to third parties, if you either +include the documentation on which the product is based, or make it +available without charge for at least three years to anyone who requests +it. - * You may distribute modified documentation or products based on it, if you: +* You may distribute modified documentation or products based on it, if +you: + * License your modifications under the OHL. + * Include those modifications, following the requirements stated + below. + * Attempt to send the modified documentation by email to any of the + developers who have provided their email address. This is a good + faith obligation - if the email fails, you need do nothing more + and may go on with your distribution. - * License your modifications under the OHL. +* If you create a design that you want to license under the OHL, you +should: + * Include this document in a file named LICENSE (with the appropriate + extension) that is included in the documentation package. + * If the file format allows, include a notice like "Licensed under + the TAPR Open Hardware License (www.tapr.org/OHL)" in each + documentation file. While not required, you should also include + this notice on printed circuit board artwork and the product + itself; if space is limited the notice can be shortened or + abbreviated. + * Include a copyright notice in each file and on printed circuit + board artwork. + * If you wish to be notified of modifications that others may make, + include your email address in a file named "CONTRIB.TXT" or + something similar. - * Include those modifications, following the requirements stated below. - -* Attempt to send the modified documentation by email to any of the developers -who have provided their email address. This is a good faith obligation - if -the email fails, you need do nothing more and may go on with your distribution. - - * If you create a design that you want to license under the OHL, you should: - -* Include this document in a file named LICENSE (with the appropriate extension) -that is included in the documentation package. - -* If the file format allows, include a notice like "Licensed under the TAPR -Open Hardware License (www.tapr.org/OHL)" in each documentation file. While -not required, you should also include this notice on printed circuit board -artwork and the product itself; if space is limited the notice can be shortened -or abbreviated. - -* Include a copyright notice in each file and on printed circuit board artwork. - -* If you wish to be notified of modifications that others may make, include -your email address in a file named "CONTRIB.TXT" or something similar. - -* Any time the OHL requires you to make documentation available to others, -you must include all the materials you received from the upstream licensors. -In addition, if you have modified the documentation: - -* You must identify the modifications in a text file (preferably named "CHANGES.TXT") -that you include with the documentation. That file must also include a statement -like "These modifications are licensed under the TAPR Open Hardware License." - -* You must include any new files you created, including any manufacturing -files (such as Gerber files) you create in the course of making products. - -* You must include both "before" and "after" versions of all files you modified. - -* You may include files in proprietary formats, but you must also include -open format versions (such as Gerber, ASCII, Postscript, or PDF) if your tools -can create them. +* Any time the OHL requires you to make documentation available to +others, you must include all the materials you received from the +upstream licensors. In addition, if you have modified the +documentation: + * You must identify the modifications in a text file (preferably + named "CHANGES.TXT") that you include with the documentation. + That file must also include a statement like "These modifications + are licensed under the TAPR Open Hardware License." + * You must include any new files you created, including any + manufacturing files (such as Gerber files) you create in the + course of making products. + * You must include both "before" and "after" versions of all files + you modified. + * You may include files in proprietary formats, but you must also + include open format versions (such as Gerber, ASCII, Postscript, + or PDF) if your tools can create them. TERMS AND CONDITIONS -1. Introduction - -1.1 This Agreement governs how you may use, copy, modify, and distribute Documentation, -and how you may make, have made, and distribute Products based on that Documentation. -As used in this Agreement, to "distribute" Documentation means to directly -or indirectly make copies available to a third party, and to "distribute" -Products means to directly or indirectly give, loan, sell or otherwise transfer +1. Introduction +1.1 This Agreement governs how you may use, copy, modify, and +distribute Documentation, and how you may make, have made, and +distribute Products based on that Documentation. As used in this +Agreement, to "distribute" Documentation means to directly or indirectly +make copies available to a third party, and to "distribute" Products +means to directly or indirectly give, loan, sell or otherwise transfer them to a third party. - 1.2 "Documentation" includes: +1.2 "Documentation" includes: + (a) schematic diagrams; + (b) circuit or circuit board layouts, including Gerber and other + data files used for manufacture; + (c) mechanical drawings, including CAD, CAM, and other data files + used for manufacture; + (d) flow charts and descriptive text; and + (e) other explanatory material. +Documentation may be in any tangible or intangible form of expression, +including but not limited to computer files in open or proprietary +formats and representations on paper, film, or other media. - (a) schematic diagrams; - -(b) circuit or circuit board layouts, including Gerber and other data files -used for manufacture; - -(c) mechanical drawings, including CAD, CAM, and other data files used for -manufacture; - - (d) flow charts and descriptive text; and - - (e) other explanatory material. - -Documentation may be in any tangible or intangible form of expression, including -but not limited to computer files in open or proprietary formats and representations -on paper, film, or other media. - - 1.3 "Products" include: - -(a) circuit boards, mechanical assemblies, and other physical parts and components; - -(b) assembled or partially assembled units (including components and subassemblies); -and - -(c) parts and components combined into kits intended for assembly by others; +1.3 "Products" include: + (a) circuit boards, mechanical assemblies, and other physical parts + and components; + (b) assembled or partially assembled units (including components + and subassemblies); and + (c) parts and components combined into kits intended for assembly + by others; which are based in whole or in part on the Documentation. -1.4 This Agreement applies to any Documentation which contains a notice stating -it is subject to the TAPR Open Hardware License, and to all Products based -in whole or in part on that Documentation. If Documentation is distributed -in an archive (such as a "zip" file) which includes this document, all files -in that archive are subject to this Agreement unless they are specifically -excluded. Each person who contributes content to the Documentation is referred -to in this Agreement as a "Licensor." +1.4 This Agreement applies to any Documentation which contains a +notice stating it is subject to the TAPR Open Hardware License, and to +all Products based in whole or in part on that Documentation. If +Documentation is distributed in an archive (such as a "zip" file) which +includes this document, all files in that archive are subject to this +Agreement unless they are specifically excluded. Each person who +contributes content to the Documentation is referred to in this +Agreement as a "Licensor." -1.5 By (a) using, copying, modifying, or distributing the Documentation, or -(b) making or having Products made or distributing them, you accept this Agreement, -agree to comply with its terms, and become a "Licensee." Any activity inconsistent -with this Agreement will automatically terminate your rights under it (including -the immunities from suit granted in Section 2), but the rights of others who -have received Documentation, or have obtained Products, directly or indirectly -from you will not be affected so long as they fully comply with it themselves. +1.5 By (a) using, copying, modifying, or distributing the +Documentation, or (b) making or having Products made or distributing +them, you accept this Agreement, agree to comply with its terms, and +become a "Licensee." Any activity inconsistent with this Agreement will +automatically terminate your rights under it (including the immunities +from suit granted in Section 2), but the rights of others who have +received Documentation, or have obtained Products, directly or +indirectly from you will not be affected so long as they fully comply +with it themselves. -1.6 This Agreement does not apply to software, firmware, or code loaded into -programmable devices which may be used in conjunction with Documentation or -Products. Such software is subject to the license terms established by its -copyright holder(s). +1.6 This Agreement does not apply to software, firmware, or code +loaded into programmable devices which may be used in conjunction with +Documentation or Products. Such software is subject to the license +terms established by its copyright holder(s). -2. Patents +2. Patents +2.1 Each Licensor grants you, every other Licensee, and every +possessor or user of Products a perpetual, worldwide, and royalty-free +immunity from suit under any patent, patent application, or other +intellectual property right which he or she controls, to the extent +necessary to make, have made, possess, use, and distribute Products. +This immunity does not extend to infringement arising from modifications +subsequently made by others. -2.1 Each Licensor grants you, every other Licensee, and every possessor or -user of Products a perpetual, worldwide, and royalty-free immunity from suit -under any patent, patent application, or other intellectual property right -which he or she controls, to the extent necessary to make, have made, possess, -use, and distribute Products. This immunity does not extend to infringement -arising from modifications subsequently made by others. +2.2 If you make or have Products made, or distribute Documentation +that you have modified, you grant every Licensor, every other Licensee, +and every possessor or user of Products a perpetual, worldwide, and +royalty-free immunity from suit under any patent, patent application, or +other intellectual property right which you control, to the extent +necessary to make, have made, possess, use, and distribute Products. +This immunity does not extend to infringement arising from modifications +subsequently made by others. -2.2 If you make or have Products made, or distribute Documentation that you -have modified, you grant every Licensor, every other Licensee, and every possessor -or user of Products a perpetual, worldwide, and royalty-free immunity from -suit under any patent, patent application, or other intellectual property -right which you control, to the extent necessary to make, have made, possess, -use, and distribute Products. This immunity does not extend to infringement -arising from modifications subsequently made by others. +2.3 To avoid doubt, providing Documentation to a third party for the +sole purpose of having that party make Products on your behalf is not +considered "distribution,"\" and a third party's act of making Products +solely on your behalf does not cause that party to grant the immunity +described in the preceding paragraph. -2.3 To avoid doubt, providing Documentation to a third party for the sole -purpose of having that party make Products on your behalf is not considered -"distribution,"\" and a third party's act of making Products solely on your -behalf does not cause that party to grant the immunity described in the preceding -paragraph. +2.4 These grants of immunity are a material part of this Agreement, +and form a portion of the consideration given by each party to the +other. If any court judgment or legal agreement prevents you from +granting the immunity required by this Section, your rights under this +Agreement will terminate and you may no longer use, copy, modify or +distribute the Documentation, or make, have made, or distribute +Products. -2.4 These grants of immunity are a material part of this Agreement, and form -a portion of the consideration given by each party to the other. If any court -judgment or legal agreement prevents you from granting the immunity required -by this Section, your rights under this Agreement will terminate and you may -no longer use, copy, modify or distribute the Documentation, or make, have -made, or distribute Products. +3. Modifications +You may modify the Documentation, and those modifications will become +part of the Documentation. They are subject to this Agreement, as are +Products based in whole or in part on them. If you distribute the +modified Documentation, or Products based in whole or in part upon it, +you must email the modified Documentation in a form compliant with +Section 4 to each Licensor who has provided an email address with the +Documentation. Attempting to send the email completes your obligations +under this Section and you need take no further action if any address +fails. -3. Modifications +4. Distributing Documentation +4.1 You may distribute unmodified copies of the Documentation in its +entirety in any medium, provided that you retain all copyright and other +notices (including references to this Agreement) included by each +Licensor, and include an unaltered copy of this Agreement. +4.2 You may distribute modified copies of the Documentation if you +comply with all the requirements of the preceding paragraph and: + (a) include a prominent notice in an ASCII or other open format + file identifying those elements of the Documentation that you + changed, and stating that the modifications are licensed under + the terms of this Agreement; + (b) include all new documentation files that you create, as well as + both the original and modified versions of each file you change + (files may be in your development tool's native file format, + but if reasonably possible, you must also include open format, + such as Gerber, ASCII, Postscript, or PDF, versions); + (c) do not change the terms of this Agreement with respect to + subsequent licensees; and + (d) if you make or have Products made, include in the Documentation + all elements reasonably required to permit others to make + Products, including Gerber, CAD/CAM and other files used for + manufacture. -You may modify the Documentation, and those modifications will become part -of the Documentation. They are subject to this Agreement, as are Products -based in whole or in part on them. If you distribute the modified Documentation, -or Products based in whole or in part upon it, you must email the modified -Documentation in a form compliant with Section 4 to each Licensor who has -provided an email address with the Documentation. Attempting to send the email -completes your obligations under this Section and you need take no further -action if any address fails. +5. Making Products +5.1 You may use the Documentation to make or have Products made, +provided that each Product retains any notices included by the Licensor +(including, but not limited to, copyright notices on circuit boards). +5.2 You may distribute Products you make or have made, provided that +you include with each unit a copy of the Documentation in a form +consistent with Section 4. Alternatively, you may include either (i) an +offer valid for at least three years to provide that Documentation, at +no charge other than the reasonable cost of media and postage, to any +person who requests it; or (ii) a URL where that Documentation may be +downloaded, available for at least three years after you last distribute +the Product. -4. Distributing Documentation +6. NEW LICENSE VERSIONS +TAPR may publish updated versions of the OHL which retain the same +general provisions as the present version, but differ in detail to +address new problems or concerns, and carry a distinguishing version +number. If the Documentation specifies a version number which applies +to it and "any later version", you may choose either that version or any +later version published by TAPR. If the Documentation does not specify +a version number, you may choose any version ever published by TAPR. +TAPR owns the copyright to the OHL, but grants permission to any person +to copy, distribute, and use it in unmodified form. -4.1 You may distribute unmodified copies of the Documentation in its entirety -in any medium, provided that you retain all copyright and other notices (including -references to this Agreement) included by each Licensor, and include an unaltered -copy of this Agreement. - -4.2 You may distribute modified copies of the Documentation if you comply -with all the requirements of the preceding paragraph and: - -(a) include a prominent notice in an ASCII or other open format file identifying -those elements of the Documentation that you changed, and stating that the -modifications are licensed under the terms of this Agreement; - -(b) include all new documentation files that you create, as well as both the -original and modified versions of each file you change (files may be in your -development tool's native file format, but if reasonably possible, you must -also include open format, such as Gerber, ASCII, Postscript, or PDF, versions); - -(c) do not change the terms of this Agreement with respect to subsequent licensees; -and - -(d) if you make or have Products made, include in the Documentation all elements -reasonably required to permit others to make Products, including Gerber, CAD/CAM -and other files used for manufacture. - -5. Making Products - -5.1 You may use the Documentation to make or have Products made, provided -that each Product retains any notices included by the Licensor (including, -but not limited to, copyright notices on circuit boards). - -5.2 You may distribute Products you make or have made, provided that you include -with each unit a copy of the Documentation in a form consistent with Section -4. Alternatively, you may include either (i) an offer valid for at least three -years to provide that Documentation, at no charge other than the reasonable -cost of media and postage, to any person who requests it; or (ii) a URL where -that Documentation may be downloaded, available for at least three years after -you last distribute the Product. - -6. NEW LICENSE VERSIONS - -TAPR may publish updated versions of the OHL which retain the same general -provisions as the present version, but differ in detail to address new problems -or concerns, and carry a distinguishing version number. If the Documentation -specifies a version number which applies to it and "any later version", you -may choose either that version or any later version published by TAPR. If -the Documentation does not specify a version number, you may choose any version -ever published by TAPR. TAPR owns the copyright to the OHL, but grants permission -to any person to copy, distribute, and use it in unmodified form. - -7. WARRANTY AND LIABILITY LIMITATIONS - -7.1 THE DOCUMENTATION IS PROVIDED ON AN"AS-IS" BASIS WITHOUT WARRANTY OF ANY -KIND, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ALL WARRANTIES, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE, AND TITLE, ARE HEREBY EXPRESSLY DISCLAIMED. - -7.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ANY LICENSOR BE LIABLE -TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, -PUNITIVE, OR EXEMPLARY DAMAGES ARISING OUT OF THE USE OF, OR INABILITY TO -USE, THE DOCUMENTATION OR PRODUCTS, INCLUDING BUT NOT LIMITED TO CLAIMS OF -INTELLECTUAL PROPERTY INFRINGEMENT OR LOSS OF DATA, EVEN IF THAT PARTY HAS -BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7.3 You agree that the foregoing limitations are reasonable due to the non-financial -nature of the transaction represented by this Agreement, and acknowledge that -were it not for these limitations, the Licensor(s) would not be willing to -make the Documentation available to you. - -7.4 You agree to defend, indemnify, and hold each Licensor harmless from any -claim brought by a third party alleging any defect in the design, manufacture, -or operation of any Product which you make, have made, or distribute pursuant -to this Agreement. - -#### +7. WARRANTY AND LIABILITY LIMITATIONS +7.1 THE DOCUMENTATION IS PROVIDED ON AN"AS-IS" BASIS WITHOUT +WARRANTY OF ANY KIND, TO THE EXTENT PERMITTED BY APPLICABLE LAW. ALL +WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND +TITLE, ARE HEREBY EXPRESSLY DISCLAIMED. +7.2 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL ANY LICENSOR +BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, +INCIDENTAL, CONSEQUENTIAL, PUNITIVE, OR EXEMPLARY DAMAGES ARISING OUT OF +THE USE OF, OR INABILITY TO USE, THE DOCUMENTATION OR PRODUCTS, +INCLUDING BUT NOT LIMITED TO CLAIMS OF INTELLECTUAL PROPERTY +INFRINGEMENT OR LOSS OF DATA, EVEN IF THAT PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. +7.3 You agree that the foregoing limitations are reasonable due to +the non-financial nature of the transaction represented by this +Agreement, and acknowledge that were it not for these limitations, the +Licensor(s) would not be willing to make the Documentation available to +you. +7.4 You agree to defend, indemnify, and hold each Licensor harmless +from any claim brought by a third party alleging any defect in the +design, manufacture, or operation of any Product which you make, have +made, or distribute pursuant to this Agreement. + #### diff --git a/options/license/TCL b/options/license/TCL index b7c6ca391..4b9cdb48a 100644 --- a/options/license/TCL +++ b/options/license/TCL @@ -1,35 +1,9 @@ -This software is copyrighted by the Regents of the University of California, -Sun Microsystems, Inc., Scriptics Corporation, ActiveState Corporation and -other parties. The following terms apply to all files associated with the -software unless explicitly disclaimed in individual files. +This software is copyrighted by the Regents of the University of California, Sun Microsystems, Inc., Scriptics Corporation, ActiveState Corporation and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files. -The authors hereby grant permission to use, copy, modify, distribute, and -license this software and its documentation for any purpose, provided that -existing copyright notices are retained in all copies and that this notice -is included verbatim in any distributions. No written agreement, license, -or royalty fee is required for any of the authorized uses. Modifications to -this software may be copyrighted by their authors and need not follow the -licensing terms described here, provided that the new terms are clearly indicated -on the first page of each file where they apply. +The authors hereby grant permission to use, copy, modify, distribute, and license this software and its documentation for any purpose, provided that existing copyright notices are retained in all copies and that this notice is included verbatim in any distributions. No written agreement, license, or royalty fee is required for any of the authorized uses. Modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated on the first page of each file where they apply. -IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, -INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE -USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN -IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR -A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN -"AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE -MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. +THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, -the Government shall have only "Restricted Rights" in the software and related -documentation as defined in the Federal Acquisition Regulations (FARs) in -Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the -Department of Defense, the software shall be classified as "Commercial Computer -Software" and the Government shall have only "Restricted Rights" as defined -in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the -authors grant the U.S. Government and others acting in its behalf permission -to use and distribute the software in accordance with the terms specified -in this license. +GOVERNMENT USE: If you are acquiring this software on behalf of the U.S. government, the Government shall have only "Restricted Rights" in the software and related documentation as defined in the Federal Acquisition Regulations (FARs) in Clause 52.227.19 (c) (2). If you are acquiring the software on behalf of the Department of Defense, the software shall be classified as "Commercial Computer Software" and the Government shall have only "Restricted Rights" as defined in Clause 252.227-7013 (c) (1) of DFARs. Notwithstanding the foregoing, the authors grant the U.S. Government and others acting in its behalf permission to use and distribute the software in accordance with the terms specified in this license. diff --git a/options/license/TCP-wrappers b/options/license/TCP-wrappers index 2570eaeaa..e13d4f532 100644 --- a/options/license/TCP-wrappers +++ b/options/license/TCP-wrappers @@ -1,14 +1,7 @@ -Copyright 1995 by Wietse Venema. All rights reserved. Some individual files -may be covered by other copyrights. +Copyright 1995 by Wietse Venema. All rights reserved. Some individual files may be covered by other copyrights. -This material was originally written and compiled by Wietse Venema at Eindhoven -University of Technology, The Netherlands, in 1990, 1991, 1992, 1993, 1994 -and 1995. +This material was originally written and compiled by Wietse Venema at Eindhoven University of Technology, The Netherlands, in 1990, 1991, 1992, 1993, 1994 and 1995. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that this entire copyright notice is duplicated in -all such copies. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that this entire copyright notice is duplicated in all such copies. -This software is provided "as is" and without any expressed or implied warranties, -including, without limitation, the implied warranties of merchantibility and -fitness for any particular purpose. +This software is provided "as is" and without any expressed or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for any particular purpose. diff --git a/options/license/TMate b/options/license/TMate index 69b0d8267..75fe4b42f 100644 --- a/options/license/TMate +++ b/options/license/TMate @@ -1,44 +1,21 @@ -The TMate Open Source License. This license applies to all portions of TMate -SVNKit library, which are not externally-maintained libraries (e.g. Ganymed -SSH library). +The TMate Open Source License. -All the source code and compiled classes in package org.tigris.subversion.javahl -except SvnClient class are covered by the license in JAVAHL-LICENSE file Copyright -(c) 2004-2012 TMate Software. All rights reserved. +This license applies to all portions of TMate SVNKit library, which are not externally-maintained libraries (e.g. Ganymed SSH library). -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +All the source code and compiled classes in package org.tigris.subversion.javahl except SvnClient class are covered by the license in JAVAHL-LICENSE file -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. +Copyright (c) 2004-2012 TMate Software. All rights reserved. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions in any form must be accompanied by information on how to -obtain complete source code for the software that uses SVNKit and any accompanying -software that uses the software that uses SVNKit. The source code must either -be included in the distribution or be available for no more than the cost -of distribution plus a nominal fee, and must be freely redistributable under -reasonable conditions. For an executable file, complete source code means -the source code for all modules it contains. It does not include source code -for modules or files that typically accompany the major components of the -operating system on which the executable file runs. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -* Redistribution in any form without redistributing source code for software -that uses SVNKit is possible only when such redistribution is explictly permitted -by TMate Software. Please, contact TMate Software at support@svnkit.com to -get such permission. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED BY TMATE SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. + * Redistributions in any form must be accompanied by information on how to obtain complete source code for the software that uses SVNKit and any accompanying software that uses the software that uses SVNKit. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs. -IN NO EVENT SHALL TMATE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. + * Redistribution in any form without redistributing source code for software that uses SVNKit is possible only when such redistribution is explictly permitted by TMate Software. Please, contact TMate Software at support@svnkit.com to get such permission. + +THIS SOFTWARE IS PROVIDED BY TMATE SOFTWARE ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. + +IN NO EVENT SHALL TMATE SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/TORQUE-1.1 b/options/license/TORQUE-1.1 index f8084aa60..52c884e8d 100644 --- a/options/license/TORQUE-1.1 +++ b/options/license/TORQUE-1.1 @@ -1,69 +1,25 @@ -TORQUE v2.5+ Software License v1.1 Copyright (c) 2010-2011 Adaptive Computing -Enterprises, Inc. All rights reserved. Use this license to use or redistribute -the TORQUE software v2.5+ and later versions. For free support for TORQUE -users, questions should be emailed to the community of TORQUE users at torqueusers@supercluster.org. -Users can also subscribe to the user mailing list at http://www.supercluster.org/mailman/listinfo/torqueusers. -Customers using TORQUE that also are licensed users of Moab branded software -from Adaptive Computing Inc. can get TORQUE support from Adaptive Computing -via: +TORQUE v2.5+ Software License v1.1 +Copyright (c) 2010-2011 Adaptive Computing Enterprises, Inc. All rights reserved. +Use this license to use or redistribute the TORQUE software v2.5+ and later versions. For free support for TORQUE users, questions should be emailed to the community of TORQUE users at torqueusers@supercluster.org. Users can also subscribe to the user mailing list at http://www.supercluster.org/mailman/listinfo/torqueusers. Customers using TORQUE that also are licensed users of Moab branded software from Adaptive Computing Inc. can get TORQUE support from Adaptive Computing via: Email: torque-support@adaptivecomputing.com. - Phone: (801) 717-3700 - Web: www.adaptivecomputing.com www.clusterresources.com -This license covers use of the TORQUE v2.5 software (the "Software") at your -site or location, and, for certain users, redistribution of the Software to -other sites and locations1. Later versions of TORQUE are also covered by this -license. Use and redistribution of TORQUE v2.5 in source and binary forms, -with or without modification, are permitted provided that all of the following -conditions are met. +This license covers use of the TORQUE v2.5 software (the "Software") at your site or location, and, for certain users, redistribution of the Software to other sites and locations1. Later versions of TORQUE are also covered by this license. Use and redistribution of TORQUE v2.5 in source and binary forms, with or without modification, are permitted provided that all of the following conditions are met. -1. Any Redistribution of source code must retain the above copyright notice -and the acknowledgment contained in paragraph 5, this list of conditions and -the disclaimer contained in paragraph 5. +1. Any Redistribution of source code must retain the above copyright notice and the acknowledgment contained in paragraph 5, this list of conditions and the disclaimer contained in paragraph 5. -2. Any Redistribution in binary form must reproduce the above copyright notice -and the acknowledgment contained in paragraph 4, this list of conditions and -the disclaimer contained in paragraph 5 in the documentation and/or other -materials provided with the distribution. +2. Any Redistribution in binary form must reproduce the above copyright notice and the acknowledgment contained in paragraph 4, this list of conditions and the disclaimer contained in paragraph 5 in the documentation and/or other materials provided with the distribution. -3. Redistributions in any form must be accompanied by information on how to -obtain complete source code for TORQUE and any modifications and/or additions -to TORQUE. The source code must either be included in the distribution or -be available for no more than the cost of distribution plus a nominal fee, -and all modifications and additions to the Software must be freely redistributable -by any party (including Licensor) without restriction. +3. Redistributions in any form must be accompanied by information on how to obtain complete source code for TORQUE and any modifications and/or additions to TORQUE. The source code must either be included in the distribution or be available for no more than the cost of distribution plus a nominal fee, and all modifications and additions to the Software must be freely redistributable by any party (including Licensor) without restriction. -4. All advertising materials mentioning features or use of the Software must -display the following acknowledgment: +4. All advertising materials mentioning features or use of the Software must display the following acknowledgment: +"TORQUE is a modification of OpenPBS which was developed by NASA Ames Research Center, Lawrence Livermore National Laboratory, and Veridian TORQUE Open Source License v1.1. 1 Information Solutions, Inc. Visit www.clusterresources.com/products/ for more information about TORQUE and to download TORQUE. For information about Moab branded products and so receive support from Adaptive Computing for TORQUE, see www.adaptivecomputing.com.” -"TORQUE is a modification of OpenPBS which was developed by NASA Ames Research -Center, Lawrence Livermore National Laboratory, and Veridian TORQUE Open Source -License v1.1. 1 Information Solutions, Inc. Visit www.clusterresources.com/products/ -for more information about TORQUE and to download TORQUE. For information -about Moab branded products and so receive support from Adaptive Computing -for TORQUE, see www.adaptivecomputing.com." +5. DISCLAIMER OF WARRANTY THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED. IN NO EVENT SHALL ADAPTIVE COMPUTING ENTERPRISES, INC. CORPORATION, ITS AFFILIATED COMPANIES, OR THE U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -5. DISCLAIMER OF WARRANTY THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY -OF ANY KIND. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, -AND NON-INFRINGEMENT ARE EXPRESSLY DISCLAIMED. IN NO EVENT SHALL ADAPTIVE -COMPUTING ENTERPRISES, INC. CORPORATION, ITS AFFILIATED COMPANIES, OR THE -U.S. GOVERNMENT OR ANY OF ITS AGENCIES BE LIABLE FOR ANY DIRECT OR INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +This license will be governed by the laws of Utah, without reference to its choice of law rules. -This license will be governed by the laws of Utah, without reference to its -choice of law rules. Note 1: TORQUE is developed from an earlier version v2.3 -of OpenPBS. TORQUE has been developed beyond OpenPBS v2.3. The OpenPBS v2.3 -license and OpenPBS software can be obtained at: - -http://www.pbsworks.com/ResLibSearchResult.aspx?keywords=openpbs&industry=All&pro -duct_service=All&category=Free%20Software%20Downloads&order_by=title. Users -of TORQUE should comply with the TORQUE license as well as the OpenPBS license. +Note 1: TORQUE is developed from an earlier version v2.3 of OpenPBS. TORQUE has been developed beyond OpenPBS v2.3. The OpenPBS v2.3 license and OpenPBS software can be obtained at: +http://www.pbsworks.com/ResLibSearchResult.aspx?keywords=openpbs&industry=All&pro duct_service=All&category=Free%20Software%20Downloads&order_by=title. Users of TORQUE should comply with the TORQUE license as well as the OpenPBS license. diff --git a/options/license/TOSL b/options/license/TOSL index c3bfbeacd..efee67e57 100644 --- a/options/license/TOSL +++ b/options/license/TOSL @@ -1,33 +1,9 @@ -Trusster Open Source License version 1.0a (TRUST) copyright (c) 2006 Mike -Mintz and Robert Ekendahl. All rights reserved. +Trusster Open Source License version 1.0a (TRUST) copyright (c) 2006 Mike Mintz and Robert Ekendahl. All rights reserved. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + * Redistributions in any form must be accompanied by information on how to obtain complete source code for this software and any accompanying software that uses this software. The source code must either be included in the distribution or be available in a timely fashion for no more than the cost of distribution plus a nominal fee, and must be freely redistributable under reasonable and no more restrictive conditions. For an executable file, complete source code means the source code for all modules it contains. It does not include source code for modules or files that typically accompany the major components of the operating system on which the executable file runs. -* Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -* Redistributions in any form must be accompanied by information on how to -obtain complete source code for this software and any accompanying software -that uses this software. The source code must either be included in the distribution -or be available in a timely fashion for no more than the cost of distribution -plus a nominal fee, and must be freely redistributable under reasonable and -no more restrictive conditions. For an executable file, complete source code -means the source code for all modules it contains. It does not include source -code for modules or files that typically accompany the major components of -the operating system on which the executable file runs. - -THIS SOFTWARE IS PROVIDED BY MIKE MINTZ AND ROBERT EKENDAHL ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, -ARE DISCLAIMED. IN NO EVENT SHALL MIKE MINTZ AND ROBERT EKENDAHL OR ITS CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE -USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY MIKE MINTZ AND ROBERT EKENDAHL ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL MIKE MINTZ AND ROBERT EKENDAHL OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/TU-Berlin-1.0 b/options/license/TU-Berlin-1.0 index d366e0675..08f954e88 100644 --- a/options/license/TU-Berlin-1.0 +++ b/options/license/TU-Berlin-1.0 @@ -1,17 +1,10 @@ -Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, - +Copyright 1992 by Jutta Degener and Carsten Bormann, Technische Universitaet Berlin -Any use of this software is permitted provided that this notice is not removed -and that neither the authors nor the Technische Universitaet Berlin are deemed -to have made any representations as to the suitability of this software for -any purpose nor are held responsible for any defects of this software. THERE -IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. +Any use of this software is permitted provided that this notice is not removed and that neither the authors nor the Technische Universitaet Berlin are deemed to have made any representations as to the suitability of this software for any purpose nor are held responsible for any defects of this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. -As a matter of courtesy, the authors request to be informed about uses this -software has found, about bugs in this software, and about any improvements -that may be of general interest. Berlin, 28.11.1994 +As a matter of courtesy, the authors request to be informed about uses this software has found, about bugs in this software, and about any improvements that may be of general interest. +Berlin, 15.09.1992 Jutta Degener - Carsten Bormann diff --git a/options/license/TU-Berlin-2.0 b/options/license/TU-Berlin-2.0 index 040154d12..82897c187 100644 --- a/options/license/TU-Berlin-2.0 +++ b/options/license/TU-Berlin-2.0 @@ -1,32 +1,20 @@ Copyright 1992, 1993, 1994 by Jutta Degener and Carsten Bormann, - Technische Universitaet Berlin -Any use of this software is permitted provided that this notice is not removed -and that neither the authors nor the Technische Universitaet Berlin are deemed -to have made any representations as to the suitability of this software for -any purpose nor are held responsible for any defects of this software. THERE -IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. +Any use of this software is permitted provided that this notice is not removed and that neither the authors nor the Technische Universitaet Berlin are deemed to have made any representations as to the suitability of this software for any purpose nor are held responsible for any defects of this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. -As a matter of courtesy, the authors request to be informed about uses this -software has found, about bugs in this software, and about any improvements -that may be of general interest. Berlin, 28.11.1994 +As a matter of courtesy, the authors request to be informed about uses this software has found, about bugs in this software, and about any improvements that may be of general interest. +Berlin, 28.11.1994 +Jutta Degener +Carsten Bormann + +oOo + +Since the original terms of 15 years ago maybe do not make our intentions completely clear given today's refined usage of the legal terms, we append this additional permission: + +Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that this notice is not removed and that neither the authors nor the Technische Universitaet Berlin are deemed to have made any representations as to the suitability of this software for any purpose nor are held responsible for any defects of this software. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. + +Berkeley/Bremen, 05.04.2009 Jutta Degener - -Carsten Bormann oOo - -Since the original terms of 15 years ago maybe do not make our intentions -completely clear given today's refined usage of the legal terms, we append -this additional permission: - -Permission to use, copy, modify, and distribute this software for any purpose -with or without fee is hereby granted, provided that this notice is not removed -and that neither the authors nor the Technische Universitaet Berlin are deemed -to have made any representations as to the suitability of this software for -any purpose nor are held responsible for any defects of this software. THERE -IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE. Berkeley/Bremen, 05.04.2009 - -Jutta Degener - Carsten Bormann diff --git a/options/license/UCL-1.0 b/options/license/UCL-1.0 index 7c5823aae..8915f82b4 100644 --- a/options/license/UCL-1.0 +++ b/options/license/UCL-1.0 @@ -1,171 +1,48 @@ Upstream Compatibility License v. 1.0 (UCL-1.0) -This Upstream Compatibility License (the "License") applies to any original -work of authorship (the "Original Work") whose owner (the "Licensor") has -placed the following licensing notice adjacent to the copyright notice for -the Original Work: +This Upstream Compatibility License (the "License") applies to any original work of authorship (the "Original Work") whose owner (the "Licensor") has placed the following licensing notice adjacent to the copyright notice for the Original Work: -Licensed under the Upstream Compatibility License 1.0 + Licensed under the Upstream Compatibility License 1.0 -1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, for the duration of the copyright, to -do the following: +1) Grant of Copyright License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, for the duration of the copyright, to do the following: -a) to reproduce the Original Work in copies, either alone or as part of a -collective work; + a) to reproduce the Original Work in copies, either alone or as part of a collective work; -b) to translate, adapt, alter, transform, modify, or arrange the Original -Work, thereby creating derivative works ("Derivative Works") based upon the -Original Work; + b) to translate, adapt, alter, transform, modify, or arrange the Original Work, thereby creating derivative works ("Derivative Works") based upon the Original Work; -c) to distribute or communicate copies of the Original Work and Derivative -Works to the public, with the proviso that copies of Original Work You distribute -or communicate shall be licensed under this Upstream Compatibility License -and all Derivative Work You distribute or communicate shall be licensed under -both this Upstream Compatibility License and the Apache License 2.0 or later; + c) to distribute or communicate copies of the Original Work and Derivative Works to the public, with the proviso that copies of Original Work You distribute or communicate shall be licensed under this Upstream Compatibility License and all Derivative Work You distribute or communicate + shall be licensed under both this Upstream Compatibility License and the Apache License 2.0 or later; - d) to perform the Original Work publicly; and + d) to perform the Original Work publicly; and - e) to display the Original Work publicly. + e) to display the Original Work publicly. -2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, -non-exclusive, sublicensable license, under patent claims owned or controlled -by the Licensor that are embodied in the Original Work as furnished by the -Licensor, for the duration of the patents, to make, use, sell, offer for sale, -have made, and import the Original Work and Derivative Works. +2) Grant of Patent License. Licensor grants You a worldwide, royalty-free, non-exclusive, sublicensable license, under patent claims owned or controlled by the Licensor that are embodied in the Original Work as furnished by the Licensor, for the duration of the patents, to make, use, sell, offer for sale, have made, and import the Original Work and Derivative Works. -3) Grant of Source Code License. The term "Source Code" means the preferred -form of the Original Work for making modifications to it and all available -documentation describing how to modify the Original Work. Licensor agrees -to provide a machine-readable copy of the Source Code of the Original Work -along with each copy of the Original Work that Licensor distributes. Licensor -reserves the right to satisfy this obligation by placing a machine-readable -copy of the Source Code in an information repository reasonably calculated -to permit inexpensive and convenient access by You for as long as Licensor -continues to distribute the Original Work. +3) Grant of Source Code License. The term "Source Code" means the preferred form of the Original Work for making modifications to it and all available documentation describing how to modify the Original Work. Licensor agrees to provide a machine-readable copy of the Source Code of the Original Work along with each copy of the Original Work that Licensor distributes. Licensor reserves the right to satisfy this obligation by placing a machine-readable copy of the Source Code in an information repository reasonably calculated to permit inexpensive and convenient access by You for as long as Licensor continues to distribute the Original Work. -4) Exclusions From License Grant. Neither the names of Licensor, nor the names -of any contributors to the Original Work, nor any of their trademarks or service -marks, may be used to endorse or promote products derived from this Original -Work without express prior permission of the Licensor. Except as expressly -stated herein, nothing in this License grants any license to Licensor's trademarks, -copyrights, patents, trade secrets or any other intellectual property. No -patent license is granted to make, use, sell, offer for sale, have made, or -import embodiments of any patent claims other than the licensed claims defined -in Section 2. No license is granted to the trademarks of Licensor even if -such marks are included in the Original Work. Nothing in this License shall -be interpreted to prohibit Licensor from licensing under terms different from -this License any Original Work that Licensor otherwise would have a right -to license. +4) Exclusions From License Grant. Neither the names of Licensor, nor the names of any contributors to the Original Work, nor any of their trademarks or service marks, may be used to endorse or promote products derived from this Original Work without express prior permission of the Licensor. Except as expressly stated herein, nothing in this License grants any license to Licensor’s trademarks, copyrights, patents, trade secrets or any other intellectual property. No patent license is granted to make, use, sell, offer for sale, have made, or import embodiments of any patent claims other than the licensed claims defined in Section 2. No license is granted to the trademarks of Licensor even if such marks are included in the Original Work. Nothing in this License shall be interpreted to prohibit Licensor from licensing under terms different from this License any Original Work that Licensor otherwise would have a right to license. -5) External Deployment. The term "External Deployment" means the use, distribution, -or communication of the Original Work or Derivative Works in any way such -that the Original Work or Derivative Works may be used by anyone other than -You, whether those works are distributed or communicated to those persons -or made available as an application intended for use over a network. As an -express condition for the grants of license hereunder, You must treat any -External Deployment by You of the Original Work or a Derivative Work as a -distribution under section 1(c). +5) External Deployment. The term "External Deployment" means the use, distribution, or communication of the Original Work or Derivative Works in any way such that the Original Work or Derivative Works may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Work or a Derivative Work as a distribution under section 1(c). -6) Attribution Rights. You must retain, in the Source Code of any Derivative -Works that You create, all copyright, patent, or trademark notices from the -Source Code of the Original Work, as well as any notices of licensing and -any descriptive text identified therein as an "Attribution Notice." You must -cause the Source Code for any Derivative Works that You create to carry a -prominent Attribution Notice reasonably calculated to inform recipients that -You have modified the Original Work. +6) Attribution Rights. You must retain, in the Source Code of any Derivative Works that You create, all copyright, patent, or trademark notices from the Source Code of the Original Work, as well as any notices of licensing and any descriptive text identified therein as an "Attribution Notice." You must cause the Source Code for any Derivative Works that You create to carry a prominent Attribution Notice reasonably calculated to inform recipients that You have modified the Original Work. -7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that -the copyright in and to the Original Work and the patent rights granted herein -by Licensor are owned by the Licensor or are sublicensed to You under the -terms of this License with the permission of the contributor(s) of those copyrights -and patent rights. Except as expressly stated in the immediately preceding -sentence, the Original Work is provided under this License on an "AS IS" BASIS -and WITHOUT WARRANTY, either express or implied, including, without limitation, -the warranties of non-infringement, merchantability or fitness for a particular -purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. -This DISCLAIMER OF WARRANTY constitutes an essential part of this License. -No license to the Original Work is granted by this License except under this -disclaimer. +7) Warranty of Provenance and Disclaimer of Warranty. Licensor warrants that the copyright in and to the Original Work and the patent rights granted herein by Licensor are owned by the Licensor or are sublicensed to You under the terms of this License with the permission of the contributor(s) of those copyrights and patent rights. Except as expressly stated in the immediately preceding sentence, the Original Work is provided under this License on an "AS IS" BASIS and WITHOUT WARRANTY, either express or implied, including, without limitation, the warranties of non-infringement, merchantability or fitness for a particular purpose. THE ENTIRE RISK AS TO THE QUALITY OF THE ORIGINAL WORK IS WITH YOU. This DISCLAIMER OF WARRANTY constitutes an essential part of this License. No license to the Original Work is granted by this License except under this disclaimer. -8) Limitation of Liability. Under no circumstances and under no legal theory, -whether in tort (including negligence), contract, or otherwise, shall the -Licensor be liable to anyone for any indirect, special, incidental, or consequential -damages of any character arising as a result of this License or the use of -the Original Work including, without limitation, damages for loss of goodwill, -work stoppage, computer failure or malfunction, or any and all other commercial -damages or losses. This limitation of liability shall not apply to the extent -applicable law prohibits such limitation. +8) Limitation of Liability. Under no circumstances and under no legal theory, whether in tort (including negligence), contract, or otherwise, shall the Licensor be liable to anyone for any indirect, special, incidental, or consequential damages of any character arising as a result of this License or the use of the Original Work including, without limitation, damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses. This limitation of liability shall not apply to the extent applicable law prohibits such limitation. -9) Acceptance and Termination. If, at any time, You expressly assented to -this License, that assent indicates your clear and irrevocable acceptance -of this License and all of its terms and conditions. If You distribute or -communicate copies of the Original Work or a Derivative Work, You must make -a reasonable effort under the circumstances to obtain the express assent of -recipients to the terms of this License. This License conditions your rights -to undertake the activities listed in Section 1, including your right to create -Derivative Works based upon the Original Work, and doing so without honoring -these terms and conditions is prohibited by copyright law and international -treaty. Nothing in this License is intended to affect copyright exceptions -and limitations (including "fair use" or "fair dealing"). This License shall -terminate immediately and You may no longer exercise any of the rights granted -to You by this License upon your failure to honor the conditions in Section -1(c). +9) Acceptance and Termination. If, at any time, You expressly assented to this License, that assent indicates your clear and irrevocable acceptance of this License and all of its terms and conditions. If You distribute or communicate copies of the Original Work or a Derivative Work, You must make a reasonable effort under the circumstances to obtain the express assent of recipients to the terms of this License. This License conditions your rights to undertake the activities listed in Section 1, including your right to create Derivative Works based upon the Original Work, and doing so without honoring these terms and conditions is prohibited by copyright law and international treaty. Nothing in this License is intended to affect copyright exceptions and limitations (including “fair use” or “fair dealing”). This License shall terminate immediately and You may no longer exercise any of the rights granted to You by this License upon your failure to honor the conditions in Section 1(c). -10) Termination for Patent Action. This License shall terminate automatically -and You may no longer exercise any of the rights granted to You by this License -as of the date You commence an action, including a cross-claim or counterclaim, -against Licensor or any licensee alleging that the Original Work infringes -a patent. This termination provision shall not apply for an action alleging -patent infringement by combinations of the Original Work with other software -or hardware. +10) Termination for Patent Action. This License shall terminate automatically and You may no longer exercise any of the rights granted to You by this License as of the date You commence an action, including a cross-claim or counterclaim, against Licensor or any licensee alleging that the Original Work infringes a patent. This termination provision shall not apply for an action alleging patent infringement by combinations of the Original Work with other software or hardware. -11) Jurisdiction, Venue and Governing Law. Any action or suit relating to -this License may be brought only in the courts of a jurisdiction wherein the -Licensor resides or in which Licensor conducts its primary business, and under -the laws of that jurisdiction excluding its conflict-of-law provisions. The -application of the United Nations Convention on Contracts for the International -Sale of Goods is expressly excluded. Any use of the Original Work outside -the scope of this License or after its termination shall be subject to the -requirements and penalties of copyright or patent law in the appropriate jurisdiction. -This section shall survive the termination of this License. +11) Jurisdiction, Venue and Governing Law. Any action or suit relating to this License may be brought only in the courts of a jurisdiction wherein the Licensor resides or in which Licensor conducts its primary business, and under the laws of that jurisdiction excluding its conflict-of-law provisions. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any use of the Original Work outside the scope of this License or after its termination shall be subject to the requirements and penalties of copyright or patent law in the appropriate jurisdiction. This section shall survive the termination of this License. -12) Attorneys' Fees. In any action to enforce the terms of this License or -seeking damages relating thereto, the prevailing party shall be entitled to -recover its costs and expenses, including, without limitation, reasonable -attorneys' fees and costs incurred in connection with such action, including -any appeal of such action. This section shall survive the termination of this -License. +12) Attorneys' Fees. In any action to enforce the terms of this License or seeking damages relating thereto, the prevailing party shall be entitled to recover its costs and expenses, including, without limitation, reasonable attorneys' fees and costs incurred in connection with such action, including any appeal of such action. This section shall survive the termination of this License. -13) Miscellaneous. If any provision of this License is held to be unenforceable, -such provision shall be reformed only to the extent necessary to make it enforceable. +13) Miscellaneous. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. -14) Definition of "You" in This License. "You" throughout this License, whether -in upper or lower case, means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License. For legal entities, -"You" includes any entity that controls, is controlled by, or is under common -control with you. For purposes of this definition, "control" means (i) the -power, direct or indirect, to cause the direction or management of such entity, -whether by contract or otherwise, or (ii) ownership of fifty percent (50%) -or more of the outstanding shares, or (iii) beneficial ownership of such entity. +14) Definition of "You" in This License. "You" throughout this License, whether in upper or lower case, means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with you. For purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. -15) Right to Use. You may use the Original Work in all ways not otherwise -restricted or conditioned by this License or by law, and Licensor promises -not to interfere with or be responsible for such uses by You. +15) Right to Use. You may use the Original Work in all ways not otherwise restricted or conditioned by this License or by law, and Licensor promises not to interfere with or be responsible for such uses by You. -16) Modification of This License. This License is Copyright (c) 2005 Lawrence -Rosen and Copyright (c) 2017 Nigel Tzeng. Permission is granted to copy, distribute, -or communicate this License without modification. Nothing in this License -permits You to modify this License as applied to the Original Work or to Derivative -Works. However, You may modify the text of this License and copy, distribute -or communicate your modified version (the "Modified License") and apply it -to other original works of authorship subject to the following conditions: -(i) You may not indicate in any way that your Modified License is the "Open -Software License" or "OSL" or the "Upstream Compatibility License" or "UCL" -and you may not use those names in the name of your Modified License; (ii) -You must replace the notice specified in the first paragraph above with the -notice "Licensed under " or with a notice -of your own that is not confusingly similar to the notice in this License; -and (iii) You may not claim that your original works are open source software -unless your Modified License has been approved by Open Source Initiative (OSI) -and You comply with its license review and certification process. +16) Modification of This License. This License is Copyright (c) 2005 Lawrence Rosen and Copyright (c) 2017 Nigel Tzeng. Permission is granted to copy, distribute, or communicate this License without modification. Nothing in this License permits You to modify this License as applied to the Original Work or to Derivative Works. However, You may modify the text of this License and copy, distribute or communicate your modified version (the "Modified License") and apply it to other original works of authorship subject to the following conditions: (i) You may not indicate in any way that your Modified License is the "Open Software License" or "OSL" or the "Upstream Compatibility License" or "UCL" and you may not use those names in the name of your Modified License; (ii) You must replace the notice specified in the first paragraph above with the notice "Licensed under " or with a notice of your own that is not confusingly similar to the notice in this License; and (iii) You may not claim that your original works are open source software unless your Modified License has been approved by Open Source Initiative (OSI) and You comply with its license review and certification process. diff --git a/options/license/UPL-1.0 b/options/license/UPL-1.0 index e68fc2fc0..491a5deb4 100644 --- a/options/license/UPL-1.0 +++ b/options/license/UPL-1.0 @@ -1,35 +1,17 @@ -Copyright (c) [year] [copyright holders] The Universal Permissive License -(UPL), Version 1.0 +Copyright (c) [year] [copyright holders] -Subject to the condition set forth below, permission is hereby granted to -any person obtaining a copy of this software, associated documentation and/or -data (collectively the "Software"), free of charge and under any and all copyright -rights in the Software, and any and all patent rights owned or freely licensable -by each licensor hereunder covering either (i) the unmodified Software as -contributed to or provided by such licensor, or (ii) the Larger Works (as -defined below), to deal in both +The Universal Permissive License (UPL), Version 1.0 - (a) the Software, and +Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this software, associated documentation and/or data (collectively the "Software"), free of charge and under any and all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or (ii) the Larger Works (as defined below), to deal in both -(b) any piece of software and/or hardware listed in the lrgrwrks.txt file -if one is included with the Software (each a "Larger Work" to which the Software -is contributed by such licensors), +(a) the Software, and -without restriction, including without limitation the rights to copy, create -derivative works of, display, perform, and distribute the Software and make, -use, sell, offer for sale, import, export, have made, and have sold the Software -and the Larger Work(s), and to sublicense the foregoing rights on either these -or other terms. +(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software (each a “Larger Work” to which the Software is contributed by such licensors), + +without restriction, including without limitation the rights to copy, create derivative works of, display, perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. This license is subject to the following condition: -The above copyright notice and either this complete permission notice or at -a minimum a reference to the UPL must be included in all copies or substantial -portions of the Software. +The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must be included in all copies or substantial portions of the Software. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/options/license/Unicode-DFS-2015 b/options/license/Unicode-DFS-2015 index 142f850bf..278eee1e5 100644 --- a/options/license/Unicode-DFS-2015 +++ b/options/license/Unicode-DFS-2015 @@ -1,51 +1,19 @@ UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE -Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, -http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/. Unicode -Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/. -Software includes any source code published in the Unicode Standard or under -the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, -and http://www.unicode.org/cldr/data/. +Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/. Unicode Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/. Software includes any source code published in the Unicode Standard or under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/. -NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, -INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), -AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND -BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, -DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. +NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2015 Unicode, Inc. All rights reserved. Distributed under -the Terms of Use in http://www.unicode.org/copyright.html. +Copyright © 1991-2015 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Unicode data files and any associated documentation (the "Data Files") -or Unicode software and any associated documentation (the "Software") to deal -in the Data Files or Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, and/or sell copies -of the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that +Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that -(a) this copyright and permission notice appear with all copies of the Data -Files or Software, + (a) this copyright and permission notice appear with all copies of the Data Files or Software, + (b) this copyright and permission notice appear in associated documentation, and + (c) there is clear notice in each modified Data File or in the Software as well as in the documentation associated with the Data File(s) or Software that the data or software has been modified. -(b) this copyright and permission notice appear in associated documentation, -and +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. -(c) there is clear notice in each modified Data File or in the Software as -well as in the documentation associated with the Data File(s) or Software -that the data or software has been modified. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE -BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in these Data Files or Software without prior written authorization of the -copyright holder. +Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. diff --git a/options/license/Unicode-DFS-2016 b/options/license/Unicode-DFS-2016 index 80bd8b3d8..71fd6ac5e 100644 --- a/options/license/Unicode-DFS-2016 +++ b/options/license/Unicode-DFS-2016 @@ -1,49 +1,22 @@ UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE -Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, -http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, -http://www.unicode.org/ivd/data/, and http://www.unicode.org/utility/trac/browser/. +Unicode Data Files include all data files under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/. -Unicode Data Files do not include PDF online code charts under the directory -http://www.unicode.org/Public/. +Unicode Data Files do not include PDF online code charts under the directory http://www.unicode.org/Public/. -Software includes any source code published in the Unicode Standard or under -the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, -http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, -and http://www.unicode.org/utility/trac/browser/. +Software includes any source code published in the Unicode Standard or under the directories http://www.unicode.org/Public/, http://www.unicode.org/reports/, http://www.unicode.org/cldr/data/, http://source.icu-project.org/repos/icu/, and http://www.unicode.org/utility/trac/browser/. -NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, -INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), -AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND -BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, -DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. +NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. -COPYRIGHT AND PERMISSION NOTICE Copyright © 1991-2016 Unicode, Inc. All rights -reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. +COPYRIGHT AND PERMISSION NOTICE -Permission is hereby granted, free of charge, to any person obtaining a copy -of the Unicode data files and any associated documentation (the "Data Files") -or Unicode software and any associated documentation (the "Software") to deal -in the Data Files or Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, and/or sell copies -of the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either +Copyright © 1991-2016 Unicode, Inc. All rights reserved. Distributed under the Terms of Use in http://www.unicode.org/copyright.html. -(a) this copyright and permission notice appear with all copies of the Data -Files or Software, or +Permission is hereby granted, free of charge, to any person obtaining a copy of the Unicode data files and any associated documentation (the "Data Files") or Unicode software and any associated documentation (the "Software") to deal in the Data Files or Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Data Files or Software, and to permit persons to whom the Data Files or Software are furnished to do so, provided that either - (b) this copyright and permission notice appear in associated Documentation. + (a) this copyright and permission notice appear with all copies of the Data Files or Software, or + (b) this copyright and permission notice appear in associated Documentation. -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY -KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE -BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, -OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER -IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in these Data Files or Software without prior written authorization of the -copyright holder. +Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in these Data Files or Software without prior written authorization of the copyright holder. diff --git a/options/license/Unicode-TOU b/options/license/Unicode-TOU index 0e28dd9a5..49e3eee7e 100644 --- a/options/license/Unicode-TOU +++ b/options/license/Unicode-TOU @@ -1,119 +1,51 @@ Unicode Terms of Use -For the general privacy policy governing access to this site, see the Unicode -Privacy Policy. For trademark usage, see the Unicode® Consortium Name and -Trademark Usage Policy. +For the general privacy policy governing access to this site, see the Unicode Privacy Policy. For trademark usage, see the Unicode® Consortium Name and Trademark Usage Policy. - A. Unicode Copyright. +A. Unicode Copyright. - 1. Copyright © 1991-2014 Unicode, Inc. All rights reserved. + 1. Copyright © 1991-2014 Unicode, Inc. All rights reserved. -2. Certain documents and files on this website contain a legend indicating -that "Modification is permitted." Any person is hereby authorized, without -fee, to modify such documents and files to create derivative works conforming -to the Unicode® Standard, subject to Terms and Conditions herein. + 2. Certain documents and files on this website contain a legend indicating that "Modification is permitted." Any person is hereby authorized, without fee, to modify such documents and files to create derivative works conforming to the Unicode® Standard, subject to Terms and Conditions herein. -3. Any person is hereby authorized, without fee, to view, use, reproduce, -and distribute all documents and files solely for informational purposes in -the creation of products supporting the Unicode Standard, subject to the Terms -and Conditions herein. + 3. Any person is hereby authorized, without fee, to view, use, reproduce, and distribute all documents and files solely for informational purposes in the creation of products supporting the Unicode Standard, subject to the Terms and Conditions herein. -4. Further specifications of rights and restrictions pertaining to the use -of the particular set of data files known as the "Unicode Character Database" -can be found in Exhibit 1. + 4. Further specifications of rights and restrictions pertaining to the use of the particular set of data files known as the "Unicode Character Database" can be found in Exhibit 1. -5. Each version of the Unicode Standard has further specifications of rights -and restrictions of use. For the book editions (Unicode 5.0 and earlier), -these are found on the back of the title page. The online code charts carry -specific restrictions. All other files, including online documentation of -the core specification for Unicode 6.0 and later, are covered under these -general Terms of Use. + 5. Each version of the Unicode Standard has further specifications of rights and restrictions of use. For the book editions (Unicode 5.0 and earlier), these are found on the back of the title page. The online code charts carry specific restrictions. All other files, including online documentation of the core specification for Unicode 6.0 and later, are covered under these general Terms of Use. -6. No license is granted to "mirror" the Unicode website where a fee is charged -for access to the "mirror" site. + 6. No license is granted to "mirror" the Unicode website where a fee is charged for access to the "mirror" site. -7. Modification is not permitted with respect to this document. All copies -of this document must be verbatim. + 7. Modification is not permitted with respect to this document. All copies of this document must be verbatim. -B. Restricted Rights Legend. Any technical data or software which is licensed -to the United States of America, its agencies and/or instrumentalities under -this Agreement is commercial technical data or commercial computer software -developed exclusively at private expense as defined in FAR 2.101, or DFARS -252.227-7014 (June 1995), as applicable. For technical data, use, duplication, -or disclosure by the Government is subject to restrictions as set forth in -DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this -Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, -as applicable, use, duplication or disclosure by the Government is subject -to the restrictions set forth in this Agreement. +B. Restricted Rights Legend. Any technical data or software which is licensed to the United States of America, its agencies and/or instrumentalities under this Agreement is commercial technical data or commercial computer software developed exclusively at private expense as defined in FAR 2.101, or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, duplication, or disclosure by the Government is subject to restrictions as set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, as applicable, use, duplication or disclosure by the Government is subject to the restrictions set forth in this Agreement. - C. Warranties and Disclaimers. +C. Warranties and Disclaimers. -1. This publication and/or website may include technical or typographical -errors or other inaccuracies . Changes are periodically added to the information -herein; these changes will be incorporated in new editions of the publication -and/or website. Unicode may make improvements and/or changes in the product(s) -and/or program(s) described in this publication and/or website at any time. + 1. This publication and/or website may include technical or typographical errors or other inaccuracies . Changes are periodically added to the information herein; these changes will be incorporated in new editions of the publication and/or website. Unicode may make improvements and/or changes in the product(s) and/or program(s) described in this publication and/or website at any time. -2. If this file has been purchased on magnetic or optical media from Unicode, -Inc. the sole and exclusive remedy for any claim will be exchange of the defective -media within ninety (90) days of original purchase. + 2. If this file has been purchased on magnetic or optical media from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange of the defective media within ninety (90) days of original purchase. -3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR SOFTWARE IS -PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR -STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE AND ITS LICENSORS -ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR -SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION -OR THE UNICODE WEBSITE. + 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. -D. Waiver of Damages. In no event shall Unicode or its licensors be liable -for any special, incidental, indirect or consequential damages of any kind, -or any damages whatsoever, whether or not Unicode was advised of the possibility -of the damage, including, without limitation, those resulting from the following: -loss of use, data or profits, in connection with the use, modification or -distribution of this information or its derivatives. +D. Waiver of Damages. In no event shall Unicode or its licensors be liable for any special, incidental, indirect or consequential damages of any kind, or any damages whatsoever, whether or not Unicode was advised of the possibility of the damage, including, without limitation, those resulting from the following: loss of use, data or profits, in connection with the use, modification or distribution of this information or its derivatives. - E. Trademarks & Logos. +E. Trademarks & Logos. -1. The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. -"The Unicode Consortium" and "Unicode, Inc." are trade names of Unicode, Inc. -Use of the information and materials found on this website indicates your -acknowledgement of Unicode, Inc.'s exclusive worldwide rights in the Unicode -Word Mark, the Unicode Logo, and the Unicode trade names. + 1. The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, Inc. “The Unicode Consortium” and “Unicode, Inc.” are trade names of Unicode, Inc. Use of the information and materials found on this website indicates your acknowledgement of Unicode, Inc.’s exclusive worldwide rights in the Unicode Word Mark, the Unicode Logo, and the Unicode trade names. -2. The Unicode Consortium Name and Trademark Usage Policy ("Trademark Policy") -are incorporated herein by reference and you agree to abide by the provisions -of the Trademark Policy, which may be changed from time to time in the sole -discretion of Unicode, Inc. + 2. The Unicode Consortium Name and Trademark Usage Policy (“Trademark Policy”) are incorporated herein by reference and you agree to abide by the provisions of the Trademark Policy, which may be changed from time to time in the sole discretion of Unicode, Inc. -3. All third party trademarks referenced herein are the property of their -respective owners. + 3. All third party trademarks referenced herein are the property of their respective owners. - F. Miscellaneous. +F. Miscellaneous. -1. Jurisdiction and Venue. This server is operated from a location in the -State of California, United States of America. Unicode makes no representation -that the materials are appropriate for use in other locations. If you access -this server from other locations, you are responsible for compliance with -local laws. This Agreement, all use of this site and any claims and damages -resulting from use of this site are governed solely by the laws of the State -of California without regard to any principles which would apply the laws -of a different jurisdiction. The user agrees that any disputes regarding this -site shall be resolved solely in the courts located in Santa Clara County, -California. The user agrees said courts have personal jurisdiction and agree -to waive any right to transfer the dispute to any other forum. + 1. Jurisdiction and Venue. This server is operated from a location in the State of California, United States of America. Unicode makes no representation that the materials are appropriate for use in other locations. If you access this server from other locations, you are responsible for compliance with local laws. This Agreement, all use of this site and any claims and damages resulting from use of this site are governed solely by the laws of the State of California without regard to any principles which would apply the laws of a different jurisdiction. The user agrees that any disputes regarding this site shall be resolved solely in the courts located in Santa Clara County, California. The user agrees said courts have personal jurisdiction and agree to waive any right to transfer the dispute to any other forum. -2. Modification by Unicode Unicode shall have the right to modify this Agreement -at any time by posting it to this site. The user may not assign any part of -this Agreement without Unicode's prior written consent. + 2. Modification by Unicode Unicode shall have the right to modify this Agreement at any time by posting it to this site. The user may not assign any part of this Agreement without Unicode’s prior written consent. -3. Taxes. The user agrees to pay any taxes arising from access to this website -or use of the information herein, except for those based on Unicode's net -income. + 3. Taxes. The user agrees to pay any taxes arising from access to this website or use of the information herein, except for those based on Unicode’s net income. -4. Severability. If any provision of this Agreement is declared invalid or -unenforceable, the remaining provisions of this Agreement shall remain in -effect. + 4. Severability. If any provision of this Agreement is declared invalid or unenforceable, the remaining provisions of this Agreement shall remain in effect. -5. Entire Agreement. This Agreement constitutes the entire agreement between -the parties. + 5. Entire Agreement. This Agreement constitutes the entire agreement between the parties. diff --git a/options/license/Universal-FOSS-exception-1.0 b/options/license/Universal-FOSS-exception-1.0 index 3d3f030a5..4a79cbdcf 100644 --- a/options/license/Universal-FOSS-exception-1.0 +++ b/options/license/Universal-FOSS-exception-1.0 @@ -1,11 +1,11 @@ The Universal FOSS Exception, Version 1.0 - -In addition to the rights set forth in the other license(s) included in the distribution for this software, data, and/or documentation (collectively the "Software," and such licenses collectively with this additional permission the "Software License"), the copyright holders wish to facilitate interoperability with other software, data, and/or documentation distributed with complete corresponding source under a license that is OSI-approved and/or categorized by the FSF as free (collectively "Other FOSS"). We therefore hereby grant the following additional permission with respect to the use and distribution of the Software with Other FOSS, and the constants, function signatures, data structures and other invocation methods used to run or interact with each of them (as to each, such software's "Interfaces"): - - (i) The Software's Interfaces may, to the extent permitted by the license of the Other FOSS, be copied into, used and distributed in the Other FOSS in order to enable interoperability, without requiring a change to the license of the Other FOSS other than as to any Interfaces of the Software embedded therein. The Software's Interfaces remain at all times under the Software License, including without limitation as used in the Other FOSS (which upon any such use also then contains a portion of the Software under the Software License). - - (ii) The Other FOSS's Interfaces may, to the extent permitted by the license of the Other FOSS, be copied into, used and distributed in the Software in order to enable interoperability, without requiring that such Interfaces be licensed under the terms of the Software License or otherwise altering their original terms, if this does not require any portion of the Software other than such Interfaces to be licensed under the terms other than the Software License. - - (iii) If only Interfaces and no other code is copied between the Software and the Other FOSS in either direction, the use and/or distribution of the Software with the Other FOSS shall not be deemed to require that the Other FOSS be licensed under the license of the Software, other than as to any Interfaces of the Software copied into the Other FOSS. This includes, by way of example and without limitation, statically or dynamically linking the Software together with Other FOSS after enabling interoperability using the Interfaces of one or both, and distributing the resulting combination under different licenses for the respective portions thereof. - -For avoidance of doubt, a license which is OSI-approved or categorized by the FSF as free, includes, for the purpose of this permission, such licenses with additional permissions, and any license that has previously been so-approved or categorized as free, even if now deprecated or otherwise no longer recognized as approved or free. Nothing in this additional permission grants any right to distribute any portion of the Software on terms other than those of the Software License or grants any additional permission of any kind for use or distribution of the Software in conjunction with software other than Other FOSS. + +In addition to the rights set forth in the other license(s) included in the distribution for this software, data, and/or documentation (collectively the "Software," and such licenses collectively with this additional permission the "Software License"), the copyright holders wish to facilitate interoperability with other software, data, and/or documentation distributed with complete corresponding source under a license that is OSI-approved and/or categorized by the FSF as free (collectively "Other FOSS"). We therefore hereby grant the following additional permission with respect to the use and distribution of the Software with Other FOSS, and the constants, function signatures, data structures and other invocation methods used to run or interact with each of them (as to each, such software's "Interfaces"): + +(i) The Software's Interfaces may, to the extent permitted by the license of the Other FOSS, be copied into, used and distributed in the Other FOSS in order to enable interoperability, without requiring a change to the license of the Other FOSS other than as to any Interfaces of the Software embedded therein. The Software's Interfaces remain at all times under the Software License, including without limitation as used in the Other FOSS (which upon any such use also then contains a portion of the Software under the Software License). + +(ii) The Other FOSS's Interfaces may, to the extent permitted by the license of the Other FOSS, be copied into, used and distributed in the Software in order to enable interoperability, without requiring that such Interfaces be licensed under the terms of the Software License or otherwise altering their original terms, if this does not require any portion of the Software other than such Interfaces to be licensed under the terms other than the Software License. + +(iii) If only Interfaces and no other code is copied between the Software and the Other FOSS in either direction, the use and/or distribution of the Software with the Other FOSS shall not be deemed to require that the Other FOSS be licensed under the license of the Software, other than as to any Interfaces of the Software copied into the Other FOSS. This includes, by way of example and without limitation, statically or dynamically linking the Software together with Other FOSS after enabling interoperability using the Interfaces of one or both, and distributing the resulting combination under different licenses for the respective portions thereof. + +For avoidance of doubt, a license which is OSI-approved or categorized by the FSF as free, includes, for the purpose of this permission, such licenses with additional permissions, and any license that has previously been so-approved or categorized as free, even if now deprecated or otherwise no longer recognized as approved or free. Nothing in this additional permission grants any right to distribute any portion of the Software on terms other than those of the Software License or grants any additional permission of any kind for use or distribution of the Software in conjunction with software other than Other FOSS. diff --git a/options/license/Unlicense b/options/license/Unlicense index 24a8f9019..cde4ac698 100644 --- a/options/license/Unlicense +++ b/options/license/Unlicense @@ -1,20 +1,10 @@ This is free and unencumbered software released into the public domain. -Anyone is free to copy, modify, publish, use, compile, sell, or distribute -this software, either in source code form or as a compiled binary, for any -purpose, commercial or non-commercial, and by any means. +Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and -to the detriment of our heirs and successors. We intend this dedication to -be an overt act of relinquishment in perpetuity of all present and future -rights to this software under copyright law. +In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and +successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, -please refer to +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +For more information, please refer to diff --git a/options/license/VOSTROM b/options/license/VOSTROM index 43c1c87d6..efd0a6313 100644 --- a/options/license/VOSTROM +++ b/options/license/VOSTROM @@ -1,57 +1,27 @@ -VOSTROM Public License for Open Source Copyright (c) 2007 VOSTROM Holdings, -Inc. +VOSTROM Public License for Open Source -This VOSTROM Holdings, Inc. (VOSTROM) Distribution (code and documentation) -is made available to the open source community as a public service by VOSTROM. -Contact VOSTROM at license@vostrom.com for information on other licensing -arrangements (e.g. for use in proprietary applications). +Copyright (c) 2007 VOSTROM Holdings, Inc. -Under this license, this Distribution may be modified and the original version -and modified versions may be copied, distributed, publicly displayed and performed -provided that the following conditions are met: +This VOSTROM Holdings, Inc. (VOSTROM) Distribution (code and documentation) is made available to the open source community as a public service by VOSTROM. Contact VOSTROM at license@vostrom.com for information on other licensing arrangements (e.g. for use in proprietary applications). -1. Modified versions are distributed with source code and documentation and -with permission for others to use any code and documentation (whether in original -or modified versions) as granted under this license; +Under this license, this Distribution may be modified and the original version and modified versions may be copied, distributed, publicly displayed and performed provided that the following conditions are met: -2. if modified, the source code, documentation, and user run-time elements -should be clearly labeled by placing an identifier of origin (such as a name, -initial, or other tag) after the version number; +1. Modified versions are distributed with source code and documentation and with permission for others to use any code and documentation (whether in original or modified versions) as granted under this license; -3. users, modifiers, distributors, and others coming into possession or using -the Distribution in original or modified form accept the entire risk as to -the possession, use, and performance of the Distribution; +2. if modified, the source code, documentation, and user run-time elements should be clearly labeled by placing an identifier of origin (such as a name, initial, or other tag) after the version number; -4. this copyright management information (software identifier and version -number, copyright notice and license) shall be retained in all versions of -the Distribution; +3. users, modifiers, distributors, and others coming into possession or using the Distribution in original or modified form accept the entire risk as to the possession, use, and performance of the Distribution; -5. VOSTROM may make modifications to the Distribution that are substantially -similar to modified versions of the Distribution, and may make, use, sell, -copy, distribute, publicly display, and perform such modifications, including -making such modifications available under this or other licenses, without -obligation or restriction; +4. this copyright management information (software identifier and version number, copyright notice and license) shall be retained in all versions of the Distribution; -6. modifications incorporating code, libraries, and/or documentation subject -to any other open source license may be made, and the resulting work may be -distributed under the terms of such open source license if required by that -open source license, but doing so will not affect this Distribution, other -modifications made under this license or modifications made under other VOSTROM -licensing arrangements; +5. VOSTROM may make modifications to the Distribution that are substantially similar to modified versions of the Distribution, and may make, use, sell, copy, distribute, publicly display, and perform such modifications, including making such modifications available under this or other licenses, without obligation or restriction; -7. no permission is granted to distribute, publicly display, or publicly perform -modifications to the Distribution made using proprietary materials that cannot -be released in source format under conditions of this license; +6. modifications incorporating code, libraries, and/or documentation subject to any other open source license may be made, and the resulting work may be distributed under the terms of such open source license if required by that open source license, but doing so will not affect this Distribution, other modifications made under this license or modifications made under other VOSTROM licensing arrangements; -8. the name of VOSTROM may not be used in advertising or publicity pertaining -to Distribution of the software without specific, prior written permission. +7. no permission is granted to distribute, publicly display, or publicly perform modifications to the Distribution made using proprietary materials that cannot be released in source format under conditions of this license; + +8. the name of VOSTROM may not be used in advertising or publicity pertaining to Distribution of the software without specific, prior written permission. This software is made available "as is", and -VOSTROM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS -SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL VOSTROM BE LIABLE -FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER -RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION -WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +VOSTROM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN NO EVENT SHALL VOSTROM BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/VSL-1.0 b/options/license/VSL-1.0 index dd7bb7406..f924e0bec 100644 --- a/options/license/VSL-1.0 +++ b/options/license/VSL-1.0 @@ -1,35 +1,18 @@ -Vovida Software License v. 1.0 This license applies to all software incorporated -in the "Vovida Open Communication Application Library" except for those portions -incorporating third party software specifically identified as being licensed -under separate license. The Vovida Software License, Version 1.0 Copyright -(c) 2000 Vovida Networks, Inc. All rights reserved. +Vovida Software License v. 1.0 -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +This license applies to all software incorporated in the "Vovida Open Communication Application Library" except for those portions incorporating third party software specifically identified as being licensed under separate license. -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. +The Vovida Software License, Version 1.0 +Copyright (c) 2000 Vovida Networks, Inc. All rights reserved. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -3. The names "VOCAL", "Vovida Open Communication Application Library", and -"Vovida Open Communication Application Library (VOCAL)" must not be used to -endorse or promote products derived from this software without prior written -permission. For written permission, please contact vocal@vovida.org. +1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -4. Products derived from this software may not be called "VOCAL", nor may -"VOCAL" appear in their name, without prior written permission. +2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT ARE DISCLAIMED. -IN NO EVENT SHALL VOVIDA NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR -ANY DAMAGES IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT -OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, -STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. +3. The names "VOCAL", "Vovida Open Communication Application Library", and "Vovida Open Communication Application Library (VOCAL)" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact vocal@vovida.org. + +4. Products derived from this software may not be called "VOCAL", nor may "VOCAL" appear in their name, without prior written permission. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL VOVIDA NETWORKS, INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY DAMAGES IN EXCESS OF $1,000, NOR FOR ANY INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/Vim b/options/license/Vim index 80349f7f1..84aaf416b 100644 --- a/options/license/Vim +++ b/options/license/Vim @@ -1,80 +1,30 @@ VIM LICENSE -I) There are no restrictions on distributing unmodified copies of Vim except -that they must include this license text. You can also distribute unmodified -parts of Vim , likewise unrestricted except that they must include this license -text. You are also allowed to include executables that you made from the unmodified -Vim sources, plus your own usage examples and Vim scripts. +I) There are no restrictions on distributing unmodified copies of Vim except that they must include this license text. You can also distribute unmodified parts of Vim, likewise unrestricted except that they must include this license text. You are also allowed to include executables that you made from the unmodified Vim sources, plus your own usage examples and Vim scripts. -II) It is allowed to distribute a modified (or extended) version of Vim , -including executables and/or source code, when the following four conditions -are met: +II) It is allowed to distribute a modified (or extended) version of Vim, including executables and/or source code, when the following four conditions are met: - 1) This license text must be included unmodified. + 1) This license text must be included unmodified. -2) The modified Vim must be distributed in one of the following five ways: + 2) The modified Vim must be distributed in one of the following five ways: -a) If you make changes to Vim yourself, you must clearly describe in the distribution -how to contact you. When the maintainer asks you (in any way) for a copy of -the modified Vim you distributed, you must make your changes, including source -code, available to the maintainer without fee. The maintainer reserves the -right to include your changes in the official version of Vim . What the maintainer -will do with your changes and under what license they will be distributed -is negotiable. If there has been no negotiation then this license, or a later -version, also applies to your changes. The current maintainer is Bram Moolenaar -. If this changes it will be announced in appropriate places -(most likely vim.sf.net, www.vim.org and/or comp.editors). When it is completely -impossible to contact the maintainer, the obligation to send him your changes -ceases. Once the maintainer has confirmed that he has received your changes -they will not have to be sent again. + a) If you make changes to Vim yourself, you must clearly describe in the distribution how to contact you. When the maintainer asks you (in any way) for a copy of the modified Vim you distributed, you must make your changes, including source code, available to the maintainer without fee. The maintainer reserves the right to include your changes in the official version of Vim. What the maintainer will do with your changes and under what license they will be distributed is negotiable. If there has been no negotiation then this license, or a later version, also applies to your changes. The current maintainer is Bram Moolenaar . If this changes it will be announced in appropriate places (most likely vim.sf.net, www.vim.org and/or comp.editors). When it is completely impossible to contact the maintainer, the obligation to send him your changes ceases. Once the maintainer has confirmed that he has received your changes they will not have to be sent again. -b) If you have received a modified Vim that was distributed as mentioned under -a) you are allowed to further distribute it unmodified, as mentioned at I). -If you make additional changes the text under a) applies to those changes. + b) If you have received a modified Vim that was distributed as mentioned under a) you are allowed to further distribute it unmodified, as mentioned at I). If you make additional changes the text under a) applies to those changes. -c) Provide all the changes, including source code, with every copy of the -modified Vim you distribute. This may be done in the form of a context diff. -You can choose what license to use for new code you add. The changes and their -license must not restrict others from making their own changes to the official -version of Vim . + c) Provide all the changes, including source code, with every copy of the modified Vim you distribute. This may be done in the form of a context diff. You can choose what license to use for new code you add. The changes and their license must not restrict others from making their own changes to the official version of Vim. -d) When you have a modified Vim which includes changes as mentioned under -c), you can distribute it without the source code for the changes if the following -three conditions are met: + d) When you have a modified Vim which includes changes as mentioned under c), you can distribute it without the source code for the changes if the following three conditions are met: + - The license that applies to the changes permits you to distribute the changes to the Vim maintainer without fee or restriction, and permits the Vim maintainer to include the changes in the official version of Vim without fee or restriction. + - You keep the changes for at least three years after last distributing the corresponding modified Vim. When the maintainer or someone who you distributed the modified Vim to asks you (in any way) for the changes within this period, you must make them available to him. + - You clearly describe in the distribution how to contact you. This contact information must remain valid for at least three years after last distributing the corresponding modified Vim, or as long as possible. -- The license that applies to the changes permits you to distribute the changes -to the Vim maintainer without fee or restriction, and permits the Vim maintainer -to include the changes in the official version of Vim without fee or restriction. + e) When the GNU General Public License (GPL) applies to the changes, you can distribute the modified Vim under the GNU GPL version 2 or any later version. -- You keep the changes for at least three years after last distributing the -corresponding modified Vim . When the maintainer or someone who you distributed -the modified Vim to asks you (in any way) for the changes within this period, -you must make them available to him. + 3) A message must be added, at least in the output of the ":version" command and in the intro screen, such that the user of the modified Vim is able to see that it was modified. When distributing as mentioned under 2)e) adding the message is only required for as far as this does not conflict with the license used for the changes. -- You clearly describe in the distribution how to contact you. This contact -information must remain valid for at least three years after last distributing -the corresponding modified Vim , or as long as possible. + 4) The contact information as required under 2)a) and 2)d) must not be removed or changed, except that the person himself can make corrections. -e) When the GNU General Public License (GPL) applies to the changes, you can -distribute the modified Vim under the GNU GPL version 2 or any later version. +III) If you distribute a modified version of Vim, you are encouraged to use the Vim license for your changes and make them available to the maintainer, including the source code. The preferred way to do this is by e-mail or by uploading the files to a server and e-mailing the URL. If the number of changes is small (e.g., a modified Makefile) e-mailing a context diff will do. The e-mail address to be used is -3) A message must be added, at least in the output of the ":version" command -and in the intro screen, such that the user of the modified Vim is able to -see that it was modified. When distributing as mentioned under 2)e) adding -the message is only required for as far as this does not conflict with the -license used for the changes. - -4) The contact information as required under 2)a) and 2)d) must not be removed -or changed, except that the person himself can make corrections. - -III) If you distribute a modified version of Vim , you are encouraged to use -the Vim license for your changes and make them available to the maintainer, -including the source code. The preferred way to do this is by e-mail or by -uploading the files to a server and e-mailing the URL. If the number of changes -is small (e.g., a modified Makefile) e-mailing a context diff will do. The -e-mail address to be used is - -IV) It is not allowed to remove this license from the distribution of the -Vim sources, parts of it or from a modified version. You may use this license -for previous Vim releases instead of the license that they came with, at your -option. +IV) It is not allowed to remove this license from the distribution of the Vim sources, parts of it or from a modified version. You may use this license for previous Vim releases instead of the license that they came with, at your option. diff --git a/options/license/W3C b/options/license/W3C index 0c2f0943f..a485d1021 100644 --- a/options/license/W3C +++ b/options/license/W3C @@ -1,54 +1,29 @@ W3C SOFTWARE NOTICE AND LICENSE -This work (and included software, documentation such as READMEs, or other -related items) is being provided by the copyright holders under the following -license. +This work (and included software, documentation such as READMEs, or other related items) is being provided by the copyright holders under the following license. License -By obtaining, using and/or copying this work, you (the licensee) agree that -you have read, understood, and will comply with the following terms and conditions. +By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. -Permission to copy, modify, and distribute this software and its documentation, -with or without modification, for any purpose and without fee or royalty is -hereby granted, provided that you include the following on ALL copies of the -software and documentation or portions thereof, including modifications: +Permission to copy, modify, and distribute this software and its documentation, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications: -The full text of this NOTICE in a location viewable to users of the redistributed -or derivative work. + The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. -Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. If none exist, the W3C Software Short Notice should be included -(hypertext is preferred, text is permitted) within the body of any redistributed -or derivative code. + Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software Short Notice should be included (hypertext is preferred, text is permitted) within the body of any redistributed or derivative code. -Notice of any changes or modifications to the files, including the date changes -were made. (We recommend you provide URIs to the location from which the code -is derived.) + Notice of any changes or modifications to the files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.) Disclaimers -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS -MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE -OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD -PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. -The name and trademarks of copyright holders may NOT be used in advertising -or publicity pertaining to the software without specific, written prior permission. -Title to copyright in this software and any associated documentation will -at all times remain with copyright holders. Notes +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders. + +Notes This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 -This formulation of W3C's notice and license became active on December 31 -2002. This version removes the copyright ownership notice such that this license -can be used with materials other than those owned by the W3C, reflects that -ERCIM is now a host of the W3C, includes references to this specific dated -version of the license, and removes the ambiguous grant of "use". Otherwise, -this version is the same as the previous version and is written so as to preserve -the Free Software Foundation's assessment of GPL compatibility and OSI's certification -under the Open Source Definition. +This formulation of W3C's notice and license became active on December 31 2002. This version removes the copyright ownership notice such that this license can be used with materials other than those owned by the W3C, reflects that ERCIM is now a host of the W3C, includes references to this specific dated version of the license, and removes the ambiguous grant of "use". Otherwise, this version is the same as the previous version and is written so as to preserve the Free Software Foundation's assessment of GPL compatibility and OSI's certification under the Open Source Definition. diff --git a/options/license/W3C-19980720 b/options/license/W3C-19980720 index 3adf89b95..a8554039e 100644 --- a/options/license/W3C-19980720 +++ b/options/license/W3C-19980720 @@ -1,51 +1,23 @@ -W3C® SOFTWARE NOTICE AND LICENSE Copyright (c) 1994-2002 World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de Recherche en -Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ +W3C® SOFTWARE NOTICE AND LICENSE -This W3C work (including software, documents, or other related items) is being -provided by the copyright holders under the following license. By obtaining, -using and/or copying this work, you (the licensee) agree that you have read, -understood, and will comply with the following terms and conditions: +Copyright (c) 1994-2002 World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/ -Permission to use, copy, modify, and distribute this software and its documentation, -with or without modification, for any purpose and without fee or royalty is -hereby granted, provided that you include the following on ALL copies of the -software and documentation or portions thereof, including modifications, that -you make: +This W3C work (including software, documents, or other related items) is being provided by the copyright holders under the following license. By obtaining, using and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions: -1. The full text of this NOTICE in a location viewable to users of the redistributed -or derivative work. +Permission to use, copy, modify, and distribute this software and its documentation, with or without modification,  for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the software and documentation or portions thereof, including modifications, that you make: -2. Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. If none exist, a short notice of the following form (hypertext -is preferred, text is permitted) should be used within the body of any redistributed -or derivative code: "Copyright © [$date-of-software] World Wide Web Consortium, -(Massachusetts Institute of Technology, Institut National de Recherche en -Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" + 1. The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. -3. Notice of any changes or modifications to the W3C files, including the -date changes were made. (We recommend you provide URIs to the location from -which the code is derived.) + 2. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, a short notice of the following form (hypertext is preferred, text is permitted) should be used within the body of any redistributed or derivative code: "Copyright © [$date-of-software] World Wide Web Consortium, (Massachusetts Institute of Technology, Institut National de Recherche en Informatique et en Automatique, Keio University). All Rights Reserved. http://www.w3.org/Consortium/Legal/" -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS -MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE -OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD -PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + 3. Notice of any changes or modifications to the W3C files, including the date changes were made. (We recommend you provide URIs to the location from which the code is derived.) -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. -The name and trademarks of copyright holders may NOT be used in advertising -or publicity pertaining to the software without specific, written prior permission. -Title to copyright in this software and any associated documentation will -at all times remain with copyright holders. ____________________________________ +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. -This formulation of W3C's notice and license became active on August 14 1998 -so as to improve compatibility with GPL. This version ensures that W3C software -licensing terms are no more restrictive than GPL and consequently W3C software -may be distributed in GPL packages. See the older formulation for the policy -prior to this date. Please see our Copyright FAQ for common questions about -using materials from our site, including specific terms and conditions for -packages like libwww, Amaya, and Jigsaw. Other questions about this notice -can be directed to site-policy@w3.org. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the software without specific, written prior permission. Title to copyright in this software and any associated documentation will at all times remain with copyright holders. + +____________________________________ + +This formulation of W3C's notice and license became active on August 14 1998 so as to improve compatibility with GPL. This version ensures that W3C software licensing terms are no more restrictive than GPL and consequently W3C software may be distributed in GPL packages. See the older formulation for the policy prior to this date. Please see our Copyright FAQ for common questions about using materials from our site, including specific terms and conditions for packages like libwww, Amaya, and Jigsaw. Other questions about this notice can be directed to site-policy@w3.org. diff --git a/options/license/W3C-20150513 b/options/license/W3C-20150513 index 0cd5d718d..abe1af9ae 100644 --- a/options/license/W3C-20150513 +++ b/options/license/W3C-20150513 @@ -1,38 +1,17 @@ This work is being provided by the copyright holders under the following license. License +By obtaining and/or copying this work, you (the licensee) agree that you have read, understood, and will comply with the following terms and conditions. -By obtaining and/or copying this work, you (the licensee) agree that you have -read, understood, and will comply with the following terms and conditions. +Permission to copy, modify, and distribute this work, with or without modification, for any purpose and without fee or royalty is hereby granted, provided that you include the following on ALL copies of the work or portions thereof, including modifications: -Permission to copy, modify, and distribute this work, with or without modification, -for any purpose and without fee or royalty is hereby granted, provided that -you include the following on ALL copies of the work or portions thereof, including -modifications: - -• The full text of this NOTICE in a location viewable to users of the redistributed -or derivative work. - -• Any pre-existing intellectual property disclaimers, notices, or terms and -conditions. If none exist, the W3C Software and Document Short Notice should -be included. - -• Notice of any changes or modifications, through a copyright statement on -the new code or document such as "This software or document includes material -copied from or derived from [title and URI of the W3C document]. Copyright -(c) [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." + • The full text of this NOTICE in a location viewable to users of the redistributed or derivative work. + • Any pre-existing intellectual property disclaimers, notices, or terms and conditions. If none exist, the W3C Software and Document Short Notice should be included. + • Notice of any changes or modifications, through a copyright statement on the new code or document such as "This software or document includes material copied from or derived from [title and URI of the W3C document]. Copyright (c) [YEAR] W3C® (MIT, ERCIM, Keio, Beihang)." Disclaimers +THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. -THIS WORK IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS -OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO, WARRANTIES -OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF -THE SOFTWARE OR DOCUMENT WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, -TRADEMARKS OR OTHER RIGHTS. +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENT. - -The name and trademarks of copyright holders may NOT be used in advertising -or publicity pertaining to the work without specific, written prior permission. -Title to copyright in this work will at all times remain with copyright holders. +The name and trademarks of copyright holders may NOT be used in advertising or publicity pertaining to the work without specific, written prior permission. Title to copyright in this work will at all times remain with copyright holders. diff --git a/options/license/WTFPL b/options/license/WTFPL index 9c31ddad0..7a3094a82 100644 --- a/options/license/WTFPL +++ b/options/license/WTFPL @@ -1,14 +1,11 @@ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 Copyright (C) 2004 Sam Hocevar -Everyone is permitted to copy and distribute verbatim or modified copies of -this license document, and changing it is allowed as long as the name is changed. +Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. You just DO WHAT THE FUCK YOU WANT TO. + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/options/license/Watcom-1.0 b/options/license/Watcom-1.0 index 79964c408..b39fe622d 100644 --- a/options/license/Watcom-1.0 +++ b/options/license/Watcom-1.0 @@ -1,341 +1,106 @@ Sybase Open Watcom Public License version 1.0 -USE OF THE SYBASE OPEN WATCOM SOFTWARE DESCRIBED BELOW ("SOFTWARE") IS SUBJECT -TO THE TERMS AND CONDITIONS SET FORTH IN THE SYBASE OPEN WATCOM PUBLIC LICENSE -SET FORTH BELOW ("LICENSE"). YOU MAY NOT USE THE SOFTWARE IN ANY MANNER UNLESS -YOU ACCEPT THE TERMS AND CONDITIONS OF THE LICENSE. YOU INDICATE YOUR ACCEPTANCE -BY IN ANY MANNER USING (INCLUDING WITHOUT LIMITATION BY REPRODUCING, MODIFYING -OR DISTRIBUTING) THE SOFTWARE. IF YOU DO NOT ACCEPT ALL OF THE TERMS AND CONDITIONS -OF THE LICENSE, DO NOT USE THE SOFTWARE IN ANY MANNER. +USE OF THE SYBASE OPEN WATCOM SOFTWARE DESCRIBED BELOW ("SOFTWARE") IS SUBJECT TO THE TERMS AND CONDITIONS SET FORTH IN THE SYBASE OPEN WATCOM PUBLIC LICENSE SET FORTH BELOW ("LICENSE"). YOU MAY NOT USE THE SOFTWARE IN ANY MANNER UNLESS YOU ACCEPT THE TERMS AND CONDITIONS OF THE LICENSE. YOU INDICATE YOUR ACCEPTANCE BY IN ANY MANNER USING (INCLUDING WITHOUT LIMITATION BY REPRODUCING, MODIFYING OR DISTRIBUTING) THE SOFTWARE. IF YOU DO NOT ACCEPT ALL OF THE TERMS AND CONDITIONS OF THE LICENSE, DO NOT USE THE SOFTWARE IN ANY MANNER. Sybase Open Watcom Public License version 1.0 -1. General; Definitions. This License applies only to the following software -programs: the open source versions of Sybase's Watcom C/C++ and Fortran compiler -products ("Software"), which are modified versions of, with significant changes -from, the last versions made commercially available by Sybase. As used in -this License: +1. General; Definitions. This License applies only to the following software programs: the open source versions of Sybase's Watcom C/C++ and Fortran compiler products ("Software"), which are modified versions of, with significant changes from, the last versions made commercially available by Sybase. As used in this License: -1.1 "Applicable Patent Rights" mean: (a) in the case where Sybase is the grantor -of rights, (i) claims of patents that are now or hereafter acquired, owned -by or assigned to Sybase and (ii) that cover subject matter contained in the -Original Code, but only to the extent necessary to use, reproduce and/or distribute -the Original Code without infringement; and (b) in the case where You are -the grantor of rights, (i) claims of patents that are now or hereafter acquired, -owned by or assigned to You and (ii) that cover subject matter in Your Modifications, -taken alone or in combination with Original Code. + 1.1 "Applicable Patent Rights" mean: (a) in the case where Sybase is the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to Sybase and (ii) that cover subject matter contained in the Original Code, but only to the extent necessary to use, reproduce and/or distribute the Original Code without infringement; and (b) in the case where You are the grantor of rights, (i) claims of patents that are now or hereafter acquired, owned by or assigned to You and (ii) that cover subject matter in Your Modifications, taken alone or in combination with Original Code. -1.2 "Contributor" means any person or entity that creates or contributes to -the creation of Modifications. + 1.2 "Contributor" means any person or entity that creates or contributes to the creation of Modifications. -1.3 "Covered Code" means the Original Code, Modifications, the combination -of Original Code and any Modifications, and/or any respective portions thereof. + 1.3 "Covered Code" means the Original Code, Modifications, the combination of Original Code and any Modifications, and/or any respective portions thereof. -1.4 "Deploy" means to use, sublicense or distribute Covered Code other than -for Your internal research and development (R&D) and/or Personal Use, and -includes without limitation, any and all internal use or distribution of Covered -Code within Your business or organization except for R&D use and/or Personal -Use, as well as direct or indirect sublicensing or distribution of Covered -Code by You to any third party in any form or manner. + 1.4 "Deploy" means to use, sublicense or distribute Covered Code other than for Your internal research and development (R&D) and/or Personal Use, and includes without limitation, any and all internal use or distribution of Covered Code within Your business or organization except for R&D use and/or Personal Use, as well as direct or indirect sublicensing or distribution of Covered Code by You to any third party in any form or manner. -1.5 "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.5 "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. -1.6 "Modifications" mean any addition to, deletion from, and/or change to, -the substance and/or structure of the Original Code, any previous Modifications, -the combination of Original Code and any previous Modifications, and/or any -respective portions thereof. When code is released as a series of files, a -Modification is: (a) any addition to or deletion from the contents of a file -containing Covered Code; and/or (b) any new file or other representation of -computer program statements that contains any part of Covered Code. + 1.6 "Modifications" mean any addition to, deletion from, and/or change to, the substance and/or structure of the Original Code, any previous Modifications, the combination of Original Code and any previous Modifications, and/or any respective portions thereof. When code is released as a series of files, a Modification is: (a) any addition to or deletion from the contents of a file containing Covered Code; and/or (b) any new file or other representation of computer program statements that contains any part of Covered Code. -1.7 "Original Code" means (a) the Source Code of a program or other work as -originally made available by Sybase under this License, including the Source -Code of any updates or upgrades to such programs or works made available by -Sybase under this License, and that has been expressly identified by Sybase -as such in the header file(s) of such work; and (b) the object code compiled -from such Source Code and originally made available by Sybase under this License. + 1.7 "Original Code" means (a) the Source Code of a program or other work as originally made available by Sybase under this License, including the Source Code of any updates or upgrades to such programs or works made available by Sybase under this License, and that has been expressly identified by Sybase as such in the header file(s) of such work; and (b) the object code compiled from such Source Code and originally made available by Sybase under this License. -1.8 "Personal Use" means use of Covered Code by an individual solely for his -or her personal, private and non-commercial purposes. An individual's use -of Covered Code in his or her capacity as an officer, employee, member, independent -contractor or agent of a corporation, business or organization (commercial -or non-commercial) does not qualify as Personal Use. + 1.8 "Personal Use" means use of Covered Code by an individual solely for his or her personal, private and non-commercial purposes. An individual's use of Covered Code in his or her capacity as an officer, employee, member, independent contractor or agent of a corporation, business or organization (commercial or non-commercial) does not qualify as Personal Use. -1.9 "Source Code" means the human readable form of a program or other work -that is suitable for making modifications to it, including all modules it -contains, plus any associated interface definition files, scripts used to -control compilation and installation of an executable (object code). + 1.9 "Source Code" means the human readable form of a program or other work that is suitable for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an executable (object code). -1.10 "You" or "Your" means an individual or a legal entity exercising rights -under this License. For legal entities, "You" or "Your" includes any entity -which controls, is controlled by, or is under common control with, You, where -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) ownership -of fifty percent (50%) or more of the outstanding shares or beneficial ownership -of such entity. + 1.10 "You" or "Your" means an individual or a legal entity exercising rights under this License. For legal entities, "You" or "Your" includes any entity which controls, is controlled by, or is under common control with, You, where "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of fifty percent (50%) or more of the outstanding shares or beneficial ownership of such entity. -2. Permitted Uses; Conditions & Restrictions.Subject to the terms and conditions -of this License, Sybase hereby grants You, effective on the date You accept -this License and download the Original Code, a world-wide, royalty-free, non-exclusive -license, to the extent of Sybase's Applicable Patent Rights and copyrights -covering the Original Code, to do the following: +2. Permitted Uses; Conditions & Restrictions.Subject to the terms and conditions of this License, Sybase hereby grants You, effective on the date You accept this License and download the Original Code, a world-wide, royalty-free, non-exclusive license, to the extent of Sybase's Applicable Patent Rights and copyrights covering the Original Code, to do the following: -2.1 You may use, reproduce, display, perform, modify and distribute Original -Code, with or without Modifications, solely for Your internal research and -development and/or Personal Use, provided that in each instance: + 2.1 You may use, reproduce, display, perform, modify and distribute Original Code, with or without Modifications, solely for Your internal research and development and/or Personal Use, provided that in each instance: -(a) You must retain and reproduce in all copies of Original Code the copyright -and other proprietary notices and disclaimers of Sybase as they appear in -the Original Code, and keep intact all notices in the Original Code that refer -to this License; and + (a) You must retain and reproduce in all copies of Original Code the copyright and other proprietary notices and disclaimers of Sybase as they appear in the Original Code, and keep intact all notices in the Original Code that refer to this License; and -(b) You must retain and reproduce a copy of this License with every copy of -Source Code of Covered Code and documentation You distribute, and You may -not offer or impose any terms on such Source Code that alter or restrict this -License or the recipients' rights hereunder, except as permitted under Section -6. + (b) You must retain and reproduce a copy of this License with every copy of Source Code of Covered Code and documentation You distribute, and You may not offer or impose any terms on such Source Code that alter or restrict this License or the recipients' rights hereunder, except as permitted under Section 6. -(c) Whenever reasonably feasible you should include the copy of this License -in a click-wrap format, which requires affirmative acceptance by clicking -on an "I accept" button or similar mechanism. If a click-wrap format is not -included, you must include a statement that any use (including without limitation -reproduction, modification or distribution) of the Software, and any other -affirmative act that you define, constitutes acceptance of the License, and -instructing the user not to use the Covered Code in any manner if the user -does not accept all of the terms and conditions of the License. + (c) Whenever reasonably feasible you should include the copy of this License in a click-wrap format, which requires affirmative acceptance by clicking on an "I accept" button or similar mechanism. If a click-wrap format is not included, you must include a statement that any use (including without limitation reproduction, modification or distribution) of the Software, and any other affirmative act that you define, constitutes acceptance of the License, and instructing the user not to use the Covered Code in any manner if the user does not accept all of the terms and conditions of the License. -2.2 You may use, reproduce, display, perform, modify and Deploy Covered Code, -provided that in each instance: + 2.2 You may use, reproduce, display, perform, modify and Deploy Covered Code, provided that in each instance: -(a) You must satisfy all the conditions of Section 2.1 with respect to the -Source Code of the Covered Code; + (a) You must satisfy all the conditions of Section 2.1 with respect to the Source Code of the Covered Code; -(b) You must duplicate, to the extent it does not already exist, the notice -in Exhibit A in each file of the Source Code of all Your Modifications, and -cause the modified files to carry prominent notices stating that You changed -the files and the date of any change; + (b) You must duplicate, to the extent it does not already exist, the notice in Exhibit A in each file of the Source Code of all Your Modifications, and cause the modified files to carry prominent notices stating that You changed the files and the date of any change; -(c) You must make Source Code of all Your Deployed Modifications publicly -available under the terms of this License, including the license grants set -forth in Section 3 below, for as long as you Deploy the Covered Code or twelve -(12) months from the date of initial Deployment, whichever is longer. You -should preferably distribute the Source Code of Your Deployed Modifications -electronically (e.g. download from a web site); + (c) You must make Source Code of all Your Deployed Modifications publicly available under the terms of this License, including the license grants set forth in Section 3 below, for as long as you Deploy the Covered Code or twelve (12) months from the date of initial Deployment, whichever is longer. You should preferably distribute the Source Code of Your Deployed Modifications electronically (e.g. download from a web site); -(d) if You Deploy Covered Code in object code, executable form only, You must -include a prominent notice, in the code itself as well as in related documentation, -stating that Source Code of the Covered Code is available under the terms -of this License with information on how and where to obtain such Source Code; -and + (d) if You Deploy Covered Code in object code, executable form only, You must include a prominent notice, in the code itself as well as in related documentation, stating that Source Code of the Covered Code is available under the terms of this License with information on how and where to obtain such Source Code; and -(e) the object code form of the Covered Code may be distributed under Your -own license agreement, provided that such license agreement contains terms -no less protective of Sybase and each Contributor than the terms of this License, -and stating that any provisions which differ from this License are offered -by You alone and not by any other party. + (e) the object code form of the Covered Code may be distributed under Your own license agreement, provided that such license agreement contains terms no less protective of Sybase and each Contributor than the terms of this License, and stating that any provisions which differ from this License are offered by You alone and not by any other party. -2.3 You expressly acknowledge and agree that although Sybase and each Contributor -grants the licenses to their respective portions of the Covered Code set forth -herein, no assurances are provided by Sybase or any Contributor that the Covered -Code does not infringe the patent or other intellectual property rights of -any other entity. Sybase and each Contributor disclaim any liability to You -for claims brought by any other entity based on infringement of intellectual -property rights or otherwise. As a condition to exercising the rights and -licenses granted hereunder, You hereby assume sole responsibility to secure -any other intellectual property rights needed, if any. For example, if a third -party patent license is required to allow You to distribute the Covered Code, -it is Your responsibility to acquire that license before distributing the -Covered Code. + 2.3 You expressly acknowledge and agree that although Sybase and each Contributor grants the licenses to their respective portions of the Covered Code set forth herein, no assurances are provided by Sybase or any Contributor that the Covered Code does not infringe the patent or other intellectual property rights of any other entity. Sybase and each Contributor disclaim any liability to You for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, You hereby assume sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow You to distribute the Covered Code, it is Your responsibility to acquire that license before distributing the Covered Code. -3. Your Grants. In consideration of, and as a condition to, the licenses granted -to You under this License, You hereby grant to Sybase and all third parties -a non-exclusive, royalty-free license, under Your Applicable Patent Rights -and other intellectual property rights (other than patent) owned or controlled -by You, to use, reproduce, display, perform, modify, distribute and Deploy -Your Modifications of the same scope and extent as Sybase's licenses under -Sections 2.1 and 2.2. +3. Your Grants. In consideration of, and as a condition to, the licenses granted to You under this License, You hereby grant to Sybase and all third parties a non-exclusive, royalty-free license, under Your Applicable Patent Rights and other intellectual property rights (other than patent) owned or controlled by You, to use, reproduce, display, perform, modify, distribute and Deploy Your Modifications of the same scope and extent as Sybase's licenses under Sections 2.1 and 2.2. -4. Larger Works. You may create a Larger Work by combining Covered Code with -other code not governed by the terms of this License and distribute the Larger -Work as a single product. In each such instance, You must make sure the requirements -of this License are fulfilled for the Covered Code or any portion thereof. +4. Larger Works. You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In each such instance, You must make sure the requirements of this License are fulfilled for the Covered Code or any portion thereof. -5. Limitations on Patent License. Except as expressly stated in Section 2, -no other patent rights, express or implied, are granted by Sybase herein. -Modifications and/or Larger Works may require additional patent licenses from -Sybase which Sybase may grant in its sole discretion. +5. Limitations on Patent License. Except as expressly stated in Section 2, no other patent rights, express or implied, are granted by Sybase herein. Modifications and/or Larger Works may require additional patent licenses from Sybase which Sybase may grant in its sole discretion. -6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, -support, indemnity or liability obligations and/or other rights consistent -with this License ("Additional Terms") to one or more recipients of Covered -Code. However, You may do so only on Your own behalf and as Your sole responsibility, -and not on behalf of Sybase or any Contributor. You must obtain the recipient's -agreement that any such Additional Terms are offered by You alone, and You -hereby agree to indemnify, defend and hold Sybase and every Contributor harmless -for any liability incurred by or claims asserted against Sybase or such Contributor -by reason of any such Additional Terms. +6. Additional Terms. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations and/or other rights consistent with this License ("Additional Terms") to one or more recipients of Covered Code. However, You may do so only on Your own behalf and as Your sole responsibility, and not on behalf of Sybase or any Contributor. You must obtain the recipient's agreement that any such Additional Terms are offered by You alone, and You hereby agree to indemnify, defend and hold Sybase and every Contributor harmless for any liability incurred by or claims asserted against Sybase or such Contributor by reason of any such Additional Terms. -7. Versions of the License. Sybase may publish revised and/or new versions -of this License from time to time. Each version will be given a distinguishing -version number. Once Original Code has been published under a particular version -of this License, You may continue to use it under the terms of that version. -You may also choose to use such Original Code under the terms of any subsequent -version of this License published by Sybase. No one other than Sybase has -the right to modify the terms applicable to Covered Code created under this -License. +7. Versions of the License. Sybase may publish revised and/or new versions of this License from time to time. Each version will be given a distinguishing version number. Once Original Code has been published under a particular version of this License, You may continue to use it under the terms of that version. You may also choose to use such Original Code under the terms of any subsequent version of this License published by Sybase. No one other than Sybase has the right to modify the terms applicable to Covered Code created under this License. -8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part -pre-release, untested, or not fully tested works. The Covered Code may contain -errors that could cause failures or loss of data, and may be incomplete or -contain inaccuracies. You expressly acknowledge and agree that use of the -Covered Code, or any portion thereof, is at Your sole and entire risk. THE -COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT -OF ANY KIND AND SYBASE AND SYBASE'S LICENSOR(S) (COLLECTIVELY REFERRED TO -AS "SYBASE" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY -DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, -BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, -OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, -OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. SYBASE AND -EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT -OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL -MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED -OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL -OR WRITTEN INFORMATION OR ADVICE GIVEN BY SYBASE, A SYBASE AUTHORIZED REPRESENTATIVE -OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered -Code is not intended for use in the operation of nuclear facilities, aircraft -navigation, communication systems, or air traffic control machines in which -case the failure of the Covered Code could lead to death, personal injury, -or severe physical or environmental damage. +8. NO WARRANTY OR SUPPORT. The Covered Code may contain in whole or in part pre-release, untested, or not fully tested works. The Covered Code may contain errors that could cause failures or loss of data, and may be incomplete or contain inaccuracies. You expressly acknowledge and agree that use of the Covered Code, or any portion thereof, is at Your sole and entire risk. THE COVERED CODE IS PROVIDED "AS IS" AND WITHOUT WARRANTY, UPGRADES OR SUPPORT OF ANY KIND AND SYBASE AND SYBASE'S LICENSOR(S) (COLLECTIVELY REFERRED TO AS "SYBASE" FOR THE PURPOSES OF SECTIONS 8 AND 9) AND ALL CONTRIBUTORS EXPRESSLY DISCLAIM ALL WARRANTIES AND/OR CONDITIONS, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES AND/OR CONDITIONS OF MERCHANTABILITY, OF SATISFACTORY QUALITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF ACCURACY, OF QUIET ENJOYMENT, AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. SYBASE AND EACH CONTRIBUTOR DOES NOT WARRANT AGAINST INTERFERENCE WITH YOUR ENJOYMENT OF THE COVERED CODE, THAT THE FUNCTIONS CONTAINED IN THE COVERED CODE WILL MEET YOUR REQUIREMENTS, THAT THE OPERATION OF THE COVERED CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE COVERED CODE WILL BE CORRECTED. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY SYBASE, A SYBASE AUTHORIZED REPRESENTATIVE OR ANY CONTRIBUTOR SHALL CREATE A WARRANTY. You acknowledge that the Covered Code is not intended for use in the operation of nuclear facilities, aircraft navigation, communication systems, or air traffic control machines in which case the failure of the Covered Code could lead to death, personal injury, or severe physical or environmental damage. -9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT -SHALL SYBASE OR ANY CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, -INDIRECT, CONSEQUENTIAL OR OTHER DAMAGES OF ANY KIND ARISING OUT OF OR RELATING -TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION -THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), -PRODUCTS LIABILITY OR OTHERWISE, EVEN IF SYBASE OR SUCH CONTRIBUTOR HAS BEEN -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND NOTWITHSTANDING THE FAILURE -OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION -OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL OR OTHER DAMAGES OF ANY KIND, -SO THIS LIMITATION MAY NOT APPLY TO YOU. In no event shall Sybase's or any -Contributor's total liability to You for all damages (other than as may be -required by applicable law) under this License exceed the amount of five hundred -dollars ($500.00). +9. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT SHALL SYBASE OR ANY CONTRIBUTOR BE LIABLE FOR ANY DIRECT, INCIDENTAL, SPECIAL, INDIRECT, CONSEQUENTIAL OR OTHER DAMAGES OF ANY KIND ARISING OUT OF OR RELATING TO THIS LICENSE OR YOUR USE OR INABILITY TO USE THE COVERED CODE, OR ANY PORTION THEREOF, WHETHER UNDER A THEORY OF CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), PRODUCTS LIABILITY OR OTHERWISE, EVEN IF SYBASE OR SUCH CONTRIBUTOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, AND NOTWITHSTANDING THE FAILURE OF ESSENTIAL PURPOSE OF ANY REMEDY. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY OF INCIDENTAL OR CONSEQUENTIAL OR OTHER DAMAGES OF ANY KIND, SO THIS LIMITATION MAY NOT APPLY TO YOU. In no event shall Sybase's or any Contributor's total liability to You for all damages (other than as may be required by applicable law) under this License exceed the amount of five hundred dollars ($500.00). -10. Trademarks. This License does not grant any rights to use the trademarks -or trade names "Sybase" or any other trademarks or trade names belonging to -Sybase (collectively "Sybase Marks") or to any trademark or trade name belonging -to any Contributor("Contributor Marks"). No Sybase Marks or Contributor Marks -may be used to endorse or promote products derived from the Original Code -or Covered Code other than with the prior written consent of Sybase or the -Contributor, as applicable. +10. Trademarks. This License does not grant any rights to use the trademarks or trade names "Sybase" or any other trademarks or trade names belonging to Sybase (collectively "Sybase Marks") or to any trademark or trade name belonging to any Contributor("Contributor Marks"). No Sybase Marks or Contributor Marks may be used to endorse or promote products derived from the Original Code or Covered Code other than with the prior written consent of Sybase or the Contributor, as applicable. -11. Ownership. Subject to the licenses granted under this License, each Contributor -retains all rights, title and interest in and to any Modifications made by -such Contributor. Sybase retains all rights, title and interest in and to -the Original Code and any Modifications made by or on behalf of Sybase ("Sybase -Modifications"), and such Sybase Modifications will not be automatically subject -to this License. Sybase may, at its sole discretion, choose to license such -Sybase Modifications under this License, or on different terms from those -contained in this License or may choose not to license them at all. +11. Ownership. Subject to the licenses granted under this License, each Contributor retains all rights, title and interest in and to any Modifications made by such Contributor. Sybase retains all rights, title and interest in and to the Original Code and any Modifications made by or on behalf of Sybase ("Sybase Modifications"), and such Sybase Modifications will not be automatically subject to this License. Sybase may, at its sole discretion, choose to license such Sybase Modifications under this License, or on different terms from those contained in this License or may choose not to license them at all. - 12. Termination. +12. Termination. -12.1 Termination. This License and the rights granted hereunder will terminate: + 12.1 Termination. This License and the rights granted hereunder will terminate: -(a) automatically without notice if You fail to comply with any term(s) of -this License and fail to cure such breach within 30 days of becoming aware -of such breach; + (a) automatically without notice if You fail to comply with any term(s) of this License and fail to cure such breach within 30 days of becoming aware of such breach; -(b) immediately in the event of the circumstances described in Section 13.5(b); -or + (b) immediately in the event of the circumstances described in Section 13.5(b); or -(c) automatically without notice if You, at any time during the term of this -License, commence an action for patent infringement (including as a cross -claim or counterclaim) against Sybase or any Contributor. + (c) automatically without notice if You, at any time during the term of this License, commence an action for patent infringement (including as a cross claim or counterclaim) against Sybase or any Contributor. -12.2 Effect of Termination. Upon termination, You agree to immediately stop -any further use, reproduction, modification, sublicensing and distribution -of the Covered Code and to destroy all copies of the Covered Code that are -in your possession or control. All sublicenses to the Covered Code that have -been properly granted prior to termination shall survive any termination of -this License. Provisions which, by their nature, should remain in effect beyond -the termination of this License shall survive, including but not limited to -Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other -for compensation, indemnity or damages of any sort solely as a result of terminating -this License in accordance with its terms, and termination of this License -will be without prejudice to any other right or remedy of any party. + 12.2 Effect of Termination. Upon termination, You agree to immediately stop any further use, reproduction, modification, sublicensing and distribution of the Covered Code and to destroy all copies of the Covered Code that are in your possession or control. All sublicenses to the Covered Code that have been properly granted prior to termination shall survive any termination of this License. Provisions which, by their nature, should remain in effect beyond the termination of this License shall survive, including but not limited to Sections 3, 5, 8, 9, 10, 11, 12.2 and 13. No party will be liable to any other for compensation, indemnity or damages of any sort solely as a result of terminating this License in accordance with its terms, and termination of this License will be without prejudice to any other right or remedy of any party. - 13. Miscellaneous. +13. Miscellaneous. -13.1 Government End Users. The Covered Code is a "commercial item" as defined -in FAR 2.101. Government software and technical data rights in the Covered -Code include only those rights customarily provided to the public as defined -in this License. This customary commercial license in technical data and software -is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer -Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical -Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software -or Computer Software Documentation). Accordingly, all U.S. Government End -Users acquire Covered Code with only those rights set forth herein. + 13.1 Government End Users. The Covered Code is a "commercial item" as defined in FAR 2.101. Government software and technical data rights in the Covered Code include only those rights customarily provided to the public as defined in this License. This customary commercial license in technical data and software is provided in accordance with FAR 12.211 (Technical Data) and 12.212 (Computer Software) and, for Department of Defense purchases, DFAR 252.227-7015 (Technical Data -- Commercial Items) and 227.7202-3 (Rights in Commercial Computer Software or Computer Software Documentation). Accordingly, all U.S. Government End Users acquire Covered Code with only those rights set forth herein. -13.2 Relationship of Parties. This License will not be construed as creating -an agency, partnership, joint venture or any other form of legal association -between or among you, Sybase or any Contributor, and You will not represent -to the contrary, whether expressly, by implication, appearance or otherwise. + 13.2 Relationship of Parties. This License will not be construed as creating an agency, partnership, joint venture or any other form of legal association between or among you, Sybase or any Contributor, and You will not represent to the contrary, whether expressly, by implication, appearance or otherwise. -13.3 Independent Development. Nothing in this License will impair Sybase's -or any Contributor's right to acquire, license, develop, have others develop -for it, market and/or distribute technology or products that perform the same -or similar functions as, or otherwise compete with, Modifications, Larger -Works, technology or products that You may develop, produce, market or distribute. + 13.3 Independent Development. Nothing in this License will impair Sybase's or any Contributor's right to acquire, license, develop, have others develop for it, market and/or distribute technology or products that perform the same or similar functions as, or otherwise compete with, Modifications, Larger Works, technology or products that You may develop, produce, market or distribute. -13.4 Waiver; Construction. Failure by Sybase or any Contributor to enforce -any provision of this License will not be deemed a waiver of future enforcement -of that or any other provision. Any law or regulation which provides that -the language of a contract shall be construed against the drafter will not -apply to this License. + 13.4 Waiver; Construction. Failure by Sybase or any Contributor to enforce any provision of this License will not be deemed a waiver of future enforcement of that or any other provision. Any law or regulation which provides that the language of a contract shall be construed against the drafter will not apply to this License. -13.5 Severability. (a) If for any reason a court of competent jurisdiction -finds any provision of this License, or portion thereof, to be unenforceable, -that provision of the License will be enforced to the maximum extent permissible -so as to effect the economic benefits and intent of the parties, and the remainder -of this License will continue in full force and effect. (b) Notwithstanding -the foregoing, if applicable law prohibits or restricts You from fully and/or -specifically complying with Sections 2 and/or 3 or prevents the enforceability -of either of those Sections, this License will immediately terminate and You -must immediately discontinue any use of the Covered Code and destroy all copies -of it that are in your possession or control. + 13.5 Severability. (a) If for any reason a court of competent jurisdiction finds any provision of this License, or portion thereof, to be unenforceable, that provision of the License will be enforced to the maximum extent permissible so as to effect the economic benefits and intent of the parties, and the remainder of this License will continue in full force and effect. (b) Notwithstanding the foregoing, if applicable law prohibits or restricts You from fully and/or specifically complying with Sections 2 and/or 3 or prevents the enforceability of either of those Sections, this License will immediately terminate and You must immediately discontinue any use of the Covered Code and destroy all copies of it that are in your possession or control. -13.6 Dispute Resolution. Any litigation or other dispute resolution between -You and Sybase relating to this License shall take place in the Northern District -of California, and You and Sybase hereby consent to the personal jurisdiction -of, and venue in, the state and federal courts within that District with respect -to this License. The application of the United Nations Convention on Contracts -for the International Sale of Goods is expressly excluded. + 13.6 Dispute Resolution. Any litigation or other dispute resolution between You and Sybase relating to this License shall take place in the Northern District of California, and You and Sybase hereby consent to the personal jurisdiction of, and venue in, the state and federal courts within that District with respect to this License. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. + + 13.7 Entire Agreement; Governing Law. This License constitutes the entire agreement between the parties with respect to the subject matter hereof. This License shall be governed by the laws of the United States and the State of California, except that body of California law concerning conflicts of law. +Where You are located in the province of Quebec, Canada, the following clause applies: The parties hereby confirm that they have requested that this License and all related documents be drafted in English. Les parties ont exigè que le prèsent contrat et tous les documents connexes soient rèdiès en anglais. -13.7 Entire Agreement; Governing Law. This License constitutes the entire -agreement between the parties with respect to the subject matter hereof. This -License shall be governed by the laws of the United States and the State of -California, except that body of California law concerning conflicts of law. -Where You are located in the province of Quebec, Canada, the following clause -applies: The parties hereby confirm that they have requested that this License -and all related documents be drafted in English. Les parties ont exigè que -le prèsent contrat et tous les documents connexes soient rèdiès en anglais. EXHIBIT A. "Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved. +This file contains Original Code and/or Modifications of Original Code as defined in and that are subject to the Sybase Open Watcom Public License version 1.0 (the 'License'). You may not use this file except in compliance with the License. BY USING THIS FILE YOU AGREE TO ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is provided with the Original Code and Modifications, and is also available at www.sybase.com/developer/opensource. -This file contains Original Code and/or Modifications of Original Code as -defined in and that are subject to the Sybase Open Watcom Public License version -1.0 (the 'License'). You may not use this file except in compliance with the -License. BY USING THIS FILE YOU AGREE TO ALL TERMS AND CONDITIONS OF THE LICENSE. -A copy of the License is provided with the Original Code and Modifications, -and is also available at www.sybase.com/developer/opensource. - -The Original Code and all software distributed under the License are distributed -on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, -AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM ALL SUCH WARRANTIES, INCLUDING -WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR -PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the -specific language governing rights and limitations under the License." +The Original Code and all software distributed under the License are distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see the License for the specific language governing rights and limitations under the License." diff --git a/options/license/Wsuipa b/options/license/Wsuipa index cfbd46f90..8a37a28d6 100644 --- a/options/license/Wsuipa +++ b/options/license/Wsuipa @@ -1,8 +1,5 @@ -This file was added by Clea F. Rees on 2008/11/30 with the permission of Dean -Guenther and pointers to this file were added to all source files. +This file was added by Clea F. Rees on 2008/11/30 with the permission of Dean Guenther and pointers to this file were added to all source files. -Unlimited copying and redistribution of each of the files is permitted as -long as the file is not modified. Modifications, and redistribution of modified -versions, are also permitted, but only if the resulting file is renamed. The -copyright holder is Washington State University. The original author of the -fonts is Janene Winter. The primary contact (as of 2008) is Dean Guenther. +Unlimited copying and redistribution of each of the files is permitted as long as the file is not modified. Modifications, and redistribution of modified versions, are also permitted, but only if the resulting file is renamed. + +The copyright holder is Washington State University. The original author of the fonts is Janene Winter. The primary contact (as of 2008) is Dean Guenther. diff --git a/options/license/WxWindows-exception-3.1 b/options/license/WxWindows-exception-3.1 index abcbb5a1d..9e71b0ae3 100644 --- a/options/license/WxWindows-exception-3.1 +++ b/options/license/WxWindows-exception-3.1 @@ -1,9 +1,9 @@ EXCEPTION NOTICE - 1. As a special exception, the copyright holders of this library give permission for additional uses of the text contained in this release of the library as licenced under the wxWindows Library Licence, applying either version 3.1 of the Licence, or (at your option) any later version of the Licence as published by the copyright holders of version 3.1 of the Licence document. +1. As a special exception, the copyright holders of this library give permission for additional uses of the text contained in this release of the library as licenced under the wxWindows Library Licence, applying either version 3.1 of the Licence, or (at your option) any later version of the Licence as published by the copyright holders of version 3.1 of the Licence document. - 2. The exception is that you may use, copy, link, modify and distribute under your own terms, binary object code versions of works based on the Library. +2. The exception is that you may use, copy, link, modify and distribute under your own terms, binary object code versions of works based on the Library. - 3. If you copy code from files distributed under the terms of the GNU General Public Licence or the GNU Library General Public Licence into a copy of this library, as this licence permits, the exception does not apply to the code that you add in this way. To avoid misleading anyone as to the status of such modified files, you must delete this exception notice from such code and/or adjust the licensing conditions notice accordingly. +3. If you copy code from files distributed under the terms of the GNU General Public Licence or the GNU Library General Public Licence into a copy of this library, as this licence permits, the exception does not apply to the code that you add in this way. To avoid misleading anyone as to the status of such modified files, you must delete this exception notice from such code and/or adjust the licensing conditions notice accordingly. - 4. If you write modifications of your own for this library, it is your choice whether to permit this exception to apply to your modifications. If you do not wish that, you must delete the exception notice from such code and/or adjust the licensing conditions notice accordingly. +4. If you write modifications of your own for this library, it is your choice whether to permit this exception to apply to your modifications. If you do not wish that, you must delete the exception notice from such code and/or adjust the licensing conditions notice accordingly. diff --git a/options/license/X11 b/options/license/X11 index da478eb05..6b41092f2 100644 --- a/options/license/X11 +++ b/options/license/X11 @@ -1,24 +1,13 @@ -X11 License Copyright (C) 1996 X Consortium +X11 License -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Copyright (C) 1996 X Consortium -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -Except as contained in this notice, the name of the X Consortium shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the X Consortium. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from the X Consortium. X Window System is a trademark of X Consortium, Inc. diff --git a/options/license/XFree86-1.1 b/options/license/XFree86-1.1 index 5ba31cc2f..b40e8e171 100644 --- a/options/license/XFree86-1.1 +++ b/options/license/XFree86-1.1 @@ -1,41 +1,16 @@ -XFree86 License (version 1.1) Copyright (C) 1994-2006 The XFree86 Project, Inc. +XFree86 License (version 1.1) +Copyright (C) 1994-2006 The XFree86 Project, Inc. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -1. Redistributions of source code must retain the above copyright notice, -this list of conditions, and the following disclaimer. + 1. Redistributions of source code must retain the above copyright notice, this list of conditions, and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution, and in the same place -and form as other copyright, license and disclaimer information. + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution, and in the same place and form as other copyright, license and disclaimer information. -3. The end-user documentation included with the redistribution, if any, must -include the following acknowledgment: "This product includes software developed -by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors", -in the same place and form as other third-party acknowledgments. Alternately, -this acknowledgment may appear in the software itself, in the same form and -location as other such third-party acknowledgments. + 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and its contributors", in the same place and form as other third-party acknowledgments. Alternately, this acknowledgment may appear in the software itself, in the same form and location as other such third-party acknowledgments. -4. Except as contained in this notice, the name of The XFree86 Project, Inc -shall not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization from The -XFree86 Project, Inc. + 4. Except as contained in this notice, the name of The XFree86 Project, Inc shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The XFree86 Project, Inc. -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, -INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE XFREE86 -PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/XSkat b/options/license/XSkat index 29586220c..0b77a0787 100644 --- a/options/license/XSkat +++ b/options/license/XSkat @@ -1,16 +1,10 @@ This program is free software; you can redistribute it freely. - Use it at your own risk; there is NO WARRANTY. -Redistribution of modified versions is permitted provided that the following -conditions are met: +Redistribution of modified versions is permitted provided that the following conditions are met: - 1. All copyright & permission notices are preserved. +1. All copyright & permission notices are preserved. - 2.a) Only changes required for packaging or porting are made. - - or - -2.b) It is clearly stated who last changed the program. The program is renamed -or the version number is of the form x.y.z, where x.y is the version of the -original program and z is an arbitrary suffix. +2.a) Only changes required for packaging or porting are made. + or +2.b) It is clearly stated who last changed the program. The program is renamed or the version number is of the form x.y.z, where x.y is the version of the original program and z is an arbitrary suffix. diff --git a/options/license/Xerox b/options/license/Xerox index 9680d9ddc..0667d0d21 100644 --- a/options/license/Xerox +++ b/options/license/Xerox @@ -1,15 +1,5 @@ Copyright (c) 1995, 1996 Xerox Corporation. All Rights Reserved. -Use and copying of this software and preparation of derivative works based -upon this software are permitted. Any copy of this software or of any derivative -work must include the above copyright notice of Xerox Corporation, this paragraph -and the one after it. Any distribution of this software or derivative works -must comply with all applicable United States export control laws. +Use and copying of this software and preparation of derivative works based upon this software are permitted. Any copy of this software or of any derivative work must include the above copyright notice of Xerox Corporation, this paragraph and the one after it. Any distribution of this software or derivative works must comply with all applicable United States export control laws. -This software is made available AS IS, and XEROX CORPORATION DISCLAIMS ALL -WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND NOTWITHSTANDING -ANY OTHER PROVISION CONTAINED HEREIN, ANY LIABILITY FOR DAMAGES RESULTING -FROM THE SOFTWARE OR ITS USE IS EXPRESSLY DISCLAIMED, WHETHER ARISING IN CONTRACT, -TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, EVEN IF XEROX CORPORATION -IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +This software is made available AS IS, and XEROX CORPORATION DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND NOTWITHSTANDING ANY OTHER PROVISION CONTAINED HEREIN, ANY LIABILITY FOR DAMAGES RESULTING FROM THE SOFTWARE OR ITS USE IS EXPRESSLY DISCLAIMED, WHETHER ARISING IN CONTRACT, TORT (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, EVEN IF XEROX CORPORATION IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/options/license/Xnet b/options/license/Xnet index dba87b3f8..334e73a96 100644 --- a/options/license/Xnet +++ b/options/license/Xnet @@ -1,22 +1,11 @@ -The X.Net, Inc. License Copyright (c) 2000-2001 X.Net, Inc. Lafayette, California, -USA +The X.Net, Inc. License -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: +Copyright (c) 2000-2001 X.Net, Inc. Lafayette, California, USA -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -This agreement shall be governed in all respects by the laws of the State -of California and by the laws of the United States of America. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +This agreement shall be governed in all respects by the laws of the State of California and by the laws of the United States of America. diff --git a/options/license/YPL-1.0 b/options/license/YPL-1.0 index cd2b51126..cfbec9e2f 100644 --- a/options/license/YPL-1.0 +++ b/options/license/YPL-1.0 @@ -1,152 +1,47 @@ Yahoo! Public License, Version 1.0 (YPL) -This Yahoo! Public License (this "Agreement") is a legal agreement that describes -the terms under which Yahoo! Inc., a Delaware corporation having its principal -place of business at 701 First Avenue, Sunnyvale, California 94089 ("Yahoo!") -will provide software to you via download or otherwise ("Software"). By using -the Software, you, an individual or an entity ("You") agree to the terms of -this Agreement. +This Yahoo! Public License (this "Agreement") is a legal agreement that describes the terms under which Yahoo! Inc., a Delaware corporation having its principal place of business at 701 First Avenue, Sunnyvale, California 94089 ("Yahoo!") will provide software to you via download or otherwise ("Software"). By using the Software, you, an individual or an entity ("You") agree to the terms of this Agreement. -In consideration of the mutual promises and upon the terms and conditions -set forth below, the parties agree as follows: +In consideration of the mutual promises and upon the terms and conditions set forth below, the parties agree as follows: - 1. Grant of Copyright License +1. Grant of Copyright License -1.1 - Subject to the terms and conditions of this Agreement, Yahoo! hereby -grants to You, under any and all of its copyright interest in and to the Software, -a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, -execute, and distribute the Software and Modifications. For the purposes of -this Agreement, any change to, addition to, or abridgement of the Software -made by You is a "Modification;" however, any file You add to the Software -that does not contain any part of the Software is not a "Modification." + 1.1 - Subject to the terms and conditions of this Agreement, Yahoo! hereby grants to You, under any and all of its copyright interest in and to the Software, a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, execute, and distribute the Software and Modifications. For the purposes of this Agreement, any change to, addition to, or abridgement of the Software made by You is a "Modification;" however, any file You add to the Software that does not contain any part of the Software is not a "Modification." -1.2 - If You are an individual acting on behalf of a corporation or other -entity, Your use of the Software or any Modification is subject to Your having -the authority to bind such corporation or entity to this Agreement. Providing -copies to persons within such corporation or entity is not considered distribution -for purposes of this Agreement. + 1.2 - If You are an individual acting on behalf of a corporation or other entity, Your use of the Software or any Modification is subject to Your having the authority to bind such corporation or entity to this Agreement. Providing copies to persons within such corporation or entity is not considered distribution for purposes of this Agreement. -1.3 - For the Software or any Modification You distribute in source code format, -You must do so only under the terms of this Agreement, and You must include -a complete copy of this Agreement with Your distribution. With respect to -any Modification You distribute in source code format, the terms of this Agreement -will apply to You in the same way those terms apply to Yahoo! with respect -to the Software. In other words, when You are distributing Modifications under -this Agreement, You "stand in the shoes" of Yahoo! in terms of the rights -You grant and how the terms and conditions apply to You and the licensees -of Your Modifications. Notwithstanding the foregoing, when You "stand in the -shoes" of Yahoo!, You are not subject to the jurisdiction provision under -Section 7, which requires all disputes under this Agreement to be subject -to the jurisdiction of federal or state courts of northern California. + 1.3 - For the Software or any Modification You distribute in source code format, You must do so only under the terms of this Agreement, and You must include a complete copy of this Agreement with Your distribution. With respect to any Modification You distribute in source code format, the terms of this Agreement will apply to You in the same way those terms apply to Yahoo! with respect to the Software. In other words, when You are distributing Modifications under this Agreement, You "stand in the shoes" of Yahoo! in terms of the rights You grant and how the terms and conditions apply to You and the licensees of Your Modifications. Notwithstanding the foregoing, when You "stand in the shoes" of Yahoo!, You are not subject to the jurisdiction provision under Section 7, which requires all disputes under this Agreement to be subject to the jurisdiction of federal or state courts of northern California. -1.4 - For the Software or any Modification You distribute in compiled or object -code format, You must also provide recipients with access to the Software -or Modification in source code format along with a complete copy of this Agreement. -The distribution of the Software or Modifications in compiled or object code -format may be under a license of Your choice, provided that You are in compliance -with the terms of this Agreement. In addition, You must make absolutely clear -that any license terms applying to such Software or Modification that differ -from this Agreement are offered by You alone and not by Yahoo!, and that such -license does not restrict recipients from exercising rights in the source -code to the Software granted by Yahoo! under this Agreement or rights in the -source code to any Modification granted by You as described in Section 1.3. + 1.4 - For the Software or any Modification You distribute in compiled or object code format, You must also provide recipients with access to the Software or Modification in source code format along with a complete copy of this Agreement. The distribution of the Software or Modifications in compiled or object code format may be under a license of Your choice, provided that You are in compliance with the terms of this Agreement. In addition, You must make absolutely clear that any license terms applying to such Software or Modification that differ from this Agreement are offered by You alone and not by Yahoo!, and that such license does not restrict recipients from exercising rights in the source code to the Software granted by Yahoo! under this Agreement or rights in the source code to any Modification granted by You as described in Section 1.3. -1.5 - This Agreement does not limit Your right to distribute files that are -entirely Your own work (i.e., which do not incorporate any portion of the -Software and are not Modifications) under any terms You choose. + 1.5 - This Agreement does not limit Your right to distribute files that are entirely Your own work (i.e., which do not incorporate any portion of the Software and are not Modifications) under any terms You choose. - 2. Support +2. Support +Yahoo! has no obligation to provide technical support or updates to You. Nothing in this Agreement requires Yahoo! to enter into any license with You for any other edition of the Software. -Yahoo! has no obligation to provide technical support or updates to You. Nothing -in this Agreement requires Yahoo! to enter into any license with You for any -other edition of the Software. +3. Intellectual Property Rights - 3. Intellectual Property Rights + 3.1 - Except for the license expressly granted under copyright in Section 1.1, no rights, licenses or forbearances are granted or may arise in relation to this Agreement whether expressly, by implication, exhaustion, estoppel or otherwise. All rights, including all intellectual property rights, that are not expressly granted under this Agreement are hereby reserved. -3.1 - Except for the license expressly granted under copyright in Section -1.1, no rights, licenses or forbearances are granted or may arise in relation -to this Agreement whether expressly, by implication, exhaustion, estoppel -or otherwise. All rights, including all intellectual property rights, that -are not expressly granted under this Agreement are hereby reserved. + 3.2 - In any copy of the Software or in any Modification you create, You must retain and reproduce, any and all copyright, patent, trademark, and attribution notices that are included in the Software in the same form as they appear in the Software. This includes the preservation of attribution notices in the form of trademarks or logos that exist within a user interface of the Software. -3.2 - In any copy of the Software or in any Modification you create, You must -retain and reproduce, any and all copyright, patent, trademark, and attribution -notices that are included in the Software in the same form as they appear -in the Software. This includes the preservation of attribution notices in -the form of trademarks or logos that exist within a user interface of the -Software. + 3.3 - This license does not grant You rights to use any party's name, logo, or trademarks, except solely as necessary to comply with Section 3.2. -3.3 - This license does not grant You rights to use any party's name, logo, -or trademarks, except solely as necessary to comply with Section 3.2. +4. Disclaimer of Warranties +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND. YAHOO! MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY REGARDING OR RELATING TO THE SOFTWARE. SPECIFICALLY, YAHOO! DOES NOT WARRANT THAT THE SOFTWARE WILL BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST EXTENT ALLOWED BY LAW, YAHOO! SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF YAHOO! HAD BEEN INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, ANY MODIFICATIONS THERETO AND WITH RESPECT TO THE USE OF THE FOREGOING. - 4. Disclaimer of Warranties +5. Limitation of Liability +IN NO EVENT WILL YAHOO! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, PERFORMANCE OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, AND EVEN IF YAHOO! HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND. YAHOO! -MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY REGARDING OR RELATING -TO THE SOFTWARE. SPECIFICALLY, YAHOO! DOES NOT WARRANT THAT THE SOFTWARE WILL -BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST -EXTENT ALLOWED BY LAW, YAHOO! SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF YAHOO! HAD BEEN -INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, -ANY MODIFICATIONS THERETO AND WITH RESPECT TO THE USE OF THE FOREGOING. +6. Term and Termination - 5. Limitation of Liability + 6.1 - This Agreement will continue in effect unless and until terminated earlier pursuant to this Section 6. -IN NO EVENT WILL YAHOO! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION -LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF -COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, -PERFORMANCE OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, -WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, -AND EVEN IF YAHOO! HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + 6.2 - In the event Yahoo! determines that You have breached this Agreement, Yahoo! may terminate this Agreement. - 6. Term and Termination + 6.3 - All licenses granted hereunder shall terminate upon the termination of this Agreement. Termination will be in addition to any rights and remedies available to Yahoo! at law or equity or under this Agreement. -6.1 - This Agreement will continue in effect unless and until terminated earlier -pursuant to this Section 6. + 6.4 - Termination of this Agreement will not affect the provisions regarding reservation of rights (Section 3.1), provisions disclaiming or limiting Yahoo!'s liability (Sections 4 and 5), Termination (Section 6) or Miscellaneous (Section 7), which provisions will survive termination of this Agreement. -6.2 - In the event Yahoo! determines that You have breached this Agreement, -Yahoo! may terminate this Agreement. - -6.3 - All licenses granted hereunder shall terminate upon the termination -of this Agreement. Termination will be in addition to any rights and remedies -available to Yahoo! at law or equity or under this Agreement. - -6.4 - Termination of this Agreement will not affect the provisions regarding -reservation of rights (Section 3.1), provisions disclaiming or limiting Yahoo!'s -liability (Sections 4 and 5), Termination (Section 6) or Miscellaneous (Section -7), which provisions will survive termination of this Agreement. - - 7. Miscellaneous - -This Agreement contains the entire agreement of the parties with respect to -the subject matter of this Agreement and supersedes all previous communications, -representations, understandings and agreements, either oral or written, between -the parties with respect to said subject matter. The relationship of the parties -hereunder is that of independent contractors, and this Agreement will not -be construed as creating an agency, partnership, joint venture or any other -form of legal association between the parties. If any term, condition, or -provision in this Agreement is found to be invalid, unlawful or unenforceable -to any extent, this Agreement will be construed in a manner that most closely -effectuates the intent of this Agreement. Such invalid term, condition or -provision will be severed from the remaining terms, conditions and provisions, -which will continue to be valid and enforceable to the fullest extent permitted -by law. This Agreement will be interpreted and construed in accordance with -the laws of the State of California and the United States of America, without -regard to conflict of law principles. The U.N. Convention on Contracts for -the International Sale of Goods shall not apply to this Agreement. All disputes -arising out of this Agreement involving Yahoo! or any of its subsidiaries -shall be subject to the jurisdiction of the federal or state courts of northern -California, with venue lying in Santa Clara County, California. No rights -may be assigned, no obligations may be delegated, and this Agreement may not -be transferred by You, in whole or in part, whether voluntary or by operation -of law, including by way of sale of assets, merger or consolidation, without -the prior written consent of Yahoo!, and any purported assignment, delegation -or transfer without such consent shall be void ab initio. Any waiver of the -provisions of this Agreement or of a party's rights or remedies under this -Agreement must be in writing to be effective. Failure, neglect or delay by -a party to enforce the provisions of this Agreement or its rights or remedies -at any time, will not be construed or be deemed to be a waiver of such party's -rights under this Agreement and will not in any way affect the validity of -the whole or any part of this Agreement or prejudice such party's right to -take subsequent action. +7. Miscellaneous +This Agreement contains the entire agreement of the parties with respect to the subject matter of this Agreement and supersedes all previous communications, representations, understandings and agreements, either oral or written, between the parties with respect to said subject matter. The relationship of the parties hereunder is that of independent contractors, and this Agreement will not be construed as creating an agency, partnership, joint venture or any other form of legal association between the parties. If any term, condition, or provision in this Agreement is found to be invalid, unlawful or unenforceable to any extent, this Agreement will be construed in a manner that most closely effectuates the intent of this Agreement. Such invalid term, condition or provision will be severed from the remaining terms, conditions and provisions, which will continue to be valid and enforceable to the fullest extent permitted by law. This Agreement will be interpreted and construed in accordance with the laws of the State of California and the United States of America, without regard to conflict of law principles. The U.N. Convention on Contracts for the International Sale of Goods shall not apply to this Agreement. All disputes arising out of this Agreement involving Yahoo! or any of its subsidiaries shall be subject to the jurisdiction of the federal or state courts of northern California, with venue lying in Santa Clara County, California. No rights may be assigned, no obligations may be delegated, and this Agreement may not be transferred by You, in whole or in part, whether voluntary or by operation of law, including by way of sale of assets, merger or consolidation, without the prior written consent of Yahoo!, and any purported assignment, delegation or transfer without such consent shall be void ab initio. Any waiver of the provisions of this Agreement or of a party's rights or remedies under this Agreement must be in writing to be effective. Failure, neglect or delay by a party to enforce the provisions of this Agreement or its rights or remedies at any time, will not be construed or be deemed to be a waiver of such party's rights under this Agreement and will not in any way affect the validity of the whole or any part of this Agreement or prejudice such party's right to take subsequent action. diff --git a/options/license/YPL-1.1 b/options/license/YPL-1.1 index 881dd3b92..d88d77ac0 100644 --- a/options/license/YPL-1.1 +++ b/options/license/YPL-1.1 @@ -1,152 +1,47 @@ Yahoo! Public License, Version 1.1 (YPL) -This Yahoo! Public License (this "Agreement") is a legal agreement that describes -the terms under which Yahoo! Inc., a Delaware corporation having its principal -place of business at 701 First Avenue, Sunnyvale, California 94089 ("Yahoo!") -will provide software to you via download or otherwise ("Software"). By using -the Software, you, an individual or an entity ("You") agree to the terms of -this Agreement. +This Yahoo! Public License (this "Agreement") is a legal agreement that describes the terms under which Yahoo! Inc., a Delaware corporation having its principal place of business at 701 First Avenue, Sunnyvale, California 94089 ("Yahoo!") will provide software to you via download or otherwise ("Software"). By using the Software, you, an individual or an entity ("You") agree to the terms of this Agreement. -In consideration of the mutual promises and upon the terms and conditions -set forth below, the parties agree as follows: +In consideration of the mutual promises and upon the terms and conditions set forth below, the parties agree as follows: - 1. Grant of Copyright License +1. Grant of Copyright License -1.1 - Subject to the terms and conditions of this Agreement, Yahoo! hereby -grants to You, under any and all of its copyright interest in and to the Software, -a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, -execute, and distribute the Software and Modifications. For the purposes of -this Agreement, any change to, addition to, or abridgement of the Software -made by You is a "Modification;" however, any file You add to the Software -that does not contain any part of the Software is not a "Modification." + 1.1 - Subject to the terms and conditions of this Agreement, Yahoo! hereby grants to You, under any and all of its copyright interest in and to the Software, a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, execute, and distribute the Software and Modifications. For the purposes of this Agreement, any change to, addition to, or abridgement of the Software made by You is a "Modification;" however, any file You add to the Software that does not contain any part of the Software is not a "Modification." -1.2 - If You are an individual acting on behalf of a corporation or other -entity, Your use of the Software or any Modification is subject to Your having -the authority to bind such corporation or entity to this Agreement. Providing -copies to persons within such corporation or entity is not considered distribution -for purposes of this Agreement. + 1.2 - If You are an individual acting on behalf of a corporation or other entity, Your use of the Software or any Modification is subject to Your having the authority to bind such corporation or entity to this Agreement. Providing copies to persons within such corporation or entity is not considered distribution for purposes of this Agreement. -1.3 - For the Software or any Modification You distribute in source code format, -You must do so only under the terms of this Agreement, and You must include -a complete copy of this Agreement with Your distribution. With respect to -any Modification You distribute in source code format, the terms of this Agreement -will apply to You in the same way those terms apply to Yahoo! with respect -to the Software. In other words, when You are distributing Modifications under -this Agreement, You "stand in the shoes" of Yahoo! in terms of the rights -You grant and how the terms and conditions apply to You and the licensees -of Your Modifications. Notwithstanding the foregoing, when You "stand in the -shoes" of Yahoo!, You are not subject to the jurisdiction provision under -Section 7, which requires all disputes under this Agreement to be subject -to the jurisdiction of federal or state courts of northern California. + 1.3 - For the Software or any Modification You distribute in source code format, You must do so only under the terms of this Agreement, and You must include a complete copy of this Agreement with Your distribution. With respect to any Modification You distribute in source code format, the terms of this Agreement will apply to You in the same way those terms apply to Yahoo! with respect to the Software. In other words, when You are distributing Modifications under this Agreement, You "stand in the shoes" of Yahoo! in terms of the rights You grant and how the terms and conditions apply to You and the licensees of Your Modifications. Notwithstanding the foregoing, when You "stand in the shoes" of Yahoo!, You are not subject to the jurisdiction provision under Section 7, which requires all disputes under this Agreement to be subject to the jurisdiction of federal or state courts of northern California. -1.4 - For the Software or any Modification You distribute in compiled or object -code format, You must also provide recipients with access to the Software -or Modification in source code format along with a complete copy of this Agreement. -The distribution of the Software or Modifications in compiled or object code -format may be under a license of Your choice, provided that You are in compliance -with the terms of this Agreement. In addition, You must make absolutely clear -that any license terms applying to such Software or Modification that differ -from this Agreement are offered by You alone and not by Yahoo!, and that such -license does not restrict recipients from exercising rights in the source -code to the Software granted by Yahoo! under this Agreement or rights in the -source code to any Modification granted by You as described in Section 1.3. + 1.4 - For the Software or any Modification You distribute in compiled or object code format, You must also provide recipients with access to the Software or Modification in source code format along with a complete copy of this Agreement. The distribution of the Software or Modifications in compiled or object code format may be under a license of Your choice, provided that You are in compliance with the terms of this Agreement. In addition, You must make absolutely clear that any license terms applying to such Software or Modification that differ from this Agreement are offered by You alone and not by Yahoo!, and that such license does not restrict recipients from exercising rights in the source code to the Software granted by Yahoo! under this Agreement or rights in the source code to any Modification granted by You as described in Section 1.3. -1.5 - This Agreement does not limit Your right to distribute files that are -entirely Your own work (i.e., which do not incorporate any portion of the -Software and are not Modifications) under any terms You choose. + 1.5 - This Agreement does not limit Your right to distribute files that are entirely Your own work (i.e., which do not incorporate any portion of the Software and are not Modifications) under any terms You choose. - 2. Support +2. Support +Yahoo! has no obligation to provide technical support or updates to You. Nothing in this Agreement requires Yahoo! to enter into any license with You for any other edition of the Software. -Yahoo! has no obligation to provide technical support or updates to You. Nothing -in this Agreement requires Yahoo! to enter into any license with You for any -other edition of the Software. +3. Intellectual Property Rights - 3. Intellectual Property Rights + 3.1 - Except for the license expressly granted under copyright in Section 1.1, no rights, licenses or forbearances are granted or may arise in relation to this Agreement whether expressly, by implication, exhaustion, estoppel or otherwise. All rights, including all intellectual property rights, that are not expressly granted under this Agreement are hereby reserved. -3.1 - Except for the license expressly granted under copyright in Section -1.1, no rights, licenses or forbearances are granted or may arise in relation -to this Agreement whether expressly, by implication, exhaustion, estoppel -or otherwise. All rights, including all intellectual property rights, that -are not expressly granted under this Agreement are hereby reserved. + 3.2 - In any copy of the Software or in any Modification you create, You must retain and reproduce, any and all copyright, patent, trademark, and attribution notices that are included in the Software in the same form as they appear in the Software. This includes the preservation of attribution notices in the form of trademarks or logos that exist within a user interface of the Software. -3.2 - In any copy of the Software or in any Modification you create, You must -retain and reproduce, any and all copyright, patent, trademark, and attribution -notices that are included in the Software in the same form as they appear -in the Software. This includes the preservation of attribution notices in -the form of trademarks or logos that exist within a user interface of the -Software. + 3.3 - This license does not grant You rights to use any party's name, logo, or trademarks, except solely as necessary to comply with Section 3.2. -3.3 - This license does not grant You rights to use any party's name, logo, -or trademarks, except solely as necessary to comply with Section 3.2. +4. Disclaimer of Warranties +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND. YAHOO! MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY REGARDING OR RELATING TO THE SOFTWARE. SPECIFICALLY, YAHOO! DOES NOT WARRANT THAT THE SOFTWARE WILL BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST EXTENT ALLOWED BY LAW, YAHOO! SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF YAHOO! HAD BEEN INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, ANY MODIFICATIONS THERETO AND WITH RESPECT TO THE USE OF THE FOREGOING. - 4. Disclaimer of Warranties +5. Limitation of Liability +IN NO EVENT WILL YAHOO! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, PERFORMANCE OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, AND EVEN IF YAHOO! HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND. YAHOO! -MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY REGARDING OR RELATING -TO THE SOFTWARE. SPECIFICALLY, YAHOO! DOES NOT WARRANT THAT THE SOFTWARE WILL -BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST -EXTENT ALLOWED BY LAW, YAHOO! SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF YAHOO! HAD BEEN -INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, -ANY MODIFICATIONS THERETO AND WITH RESPECT TO THE USE OF THE FOREGOING. +6. Term and Termination - 5. Limitation of Liability + 6.1 - This Agreement will continue in effect unless and until terminated earlier pursuant to this Section 6. -IN NO EVENT WILL YAHOO! BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION -LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF -COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, -PERFORMANCE OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, -WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, -AND EVEN IF YAHOO! HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + 6.2 - In the event You violate the terms of this Agreement, Yahoo! may terminate this Agreement. - 6. Term and Termination + 6.3 - All licenses granted hereunder shall terminate upon the termination of this Agreement. Termination will be in addition to any rights and remedies available to Yahoo! at law or equity or under this Agreement. -6.1 - This Agreement will continue in effect unless and until terminated earlier -pursuant to this Section 6. + 6.4 - Termination of this Agreement will not affect the provisions regarding reservation of rights (Section 3.1), provisions disclaiming or limiting Yahoo!'s liability (Sections 4 and 5), Termination (Section 6) or Miscellaneous (Section 7), which provisions will survive termination of this Agreement. -6.2 - In the event You violate the terms of this Agreement, Yahoo! may terminate -this Agreement. - -6.3 - All licenses granted hereunder shall terminate upon the termination -of this Agreement. Termination will be in addition to any rights and remedies -available to Yahoo! at law or equity or under this Agreement. - -6.4 - Termination of this Agreement will not affect the provisions regarding -reservation of rights (Section 3.1), provisions disclaiming or limiting Yahoo!'s -liability (Sections 4 and 5), Termination (Section 6) or Miscellaneous (Section -7), which provisions will survive termination of this Agreement. - - 7. Miscellaneous - -This Agreement contains the entire agreement of the parties with respect to -the subject matter of this Agreement and supersedes all previous communications, -representations, understandings and agreements, either oral or written, between -the parties with respect to said subject matter. The relationship of the parties -hereunder is that of independent contractors, and this Agreement will not -be construed as creating an agency, partnership, joint venture or any other -form of legal association between the parties. If any term, condition, or -provision in this Agreement is found to be invalid, unlawful or unenforceable -to any extent, this Agreement will be construed in a manner that most closely -effectuates the intent of this Agreement. Such invalid term, condition or -provision will be severed from the remaining terms, conditions and provisions, -which will continue to be valid and enforceable to the fullest extent permitted -by law. This Agreement will be interpreted and construed in accordance with -the laws of the State of California and the United States of America, without -regard to conflict of law principles. The U.N. Convention on Contracts for -the International Sale of Goods shall not apply to this Agreement. All disputes -arising out of this Agreement involving Yahoo! or any of its subsidiaries -shall be subject to the jurisdiction of the federal or state courts of northern -California, with venue lying in Santa Clara County, California. No rights -may be assigned, no obligations may be delegated, and this Agreement may not -be transferred by You, in whole or in part, whether voluntary or by operation -of law, including by way of sale of assets, merger or consolidation, without -the prior written consent of Yahoo!, and any purported assignment, delegation -or transfer without such consent shall be void ab initio. Any waiver of the -provisions of this Agreement or of a party's rights or remedies under this -Agreement must be in writing to be effective. Failure, neglect or delay by -a party to enforce the provisions of this Agreement or its rights or remedies -at any time, will not be construed or be deemed to be a waiver of such party's -rights under this Agreement and will not in any way affect the validity of -the whole or any part of this Agreement or prejudice such party's right to -take subsequent action. +7.Miscellaneous +This Agreement contains the entire agreement of the parties with respect to the subject matter of this Agreement and supersedes all previous communications, representations, understandings and agreements, either oral or written, between the parties with respect to said subject matter. The relationship of the parties hereunder is that of independent contractors, and this Agreement will not be construed as creating an agency, partnership, joint venture or any other form of legal association between the parties. If any term, condition, or provision in this Agreement is found to be invalid, unlawful or unenforceable to any extent, this Agreement will be construed in a manner that most closely effectuates the intent of this Agreement. Such invalid term, condition or provision will be severed from the remaining terms, conditions and provisions, which will continue to be valid and enforceable to the fullest extent permitted by law. This Agreement will be interpreted and construed in accordance with the laws of the State of California and the United States of America, without regard to conflict of law principles. The U.N. Convention on Contracts for the International Sale of Goods shall not apply to this Agreement. All disputes arising out of this Agreement involving Yahoo! or any of its subsidiaries shall be subject to the jurisdiction of the federal or state courts of northern California, with venue lying in Santa Clara County, California. No rights may be assigned, no obligations may be delegated, and this Agreement may not be transferred by You, in whole or in part, whether voluntary or by operation of law, including by way of sale of assets, merger or consolidation, without the prior written consent of Yahoo!, and any purported assignment, delegation or transfer without such consent shall be void ab initio. Any waiver of the provisions of this Agreement or of a party's rights or remedies under this Agreement must be in writing to be effective. Failure, neglect or delay by a party to enforce the provisions of this Agreement or its rights or remedies at any time, will not be construed or be deemed to be a waiver of such party's rights under this Agreement and will not in any way affect the validity of the whole or any part of this Agreement or prejudice such party's right to take subsequent action. diff --git a/options/license/ZPL-1.1 b/options/license/ZPL-1.1 index 43ae9e010..1d70905f5 100644 --- a/options/license/ZPL-1.1 +++ b/options/license/ZPL-1.1 @@ -1,55 +1,33 @@ -Zope Public License (ZPL) Version 1.1 Copyright (c) Zope Corporation. All -rights reserved. This license has been certified as open source. +Zope Public License (ZPL) Version 1.1 -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Copyright (c) Zope Corporation. All rights reserved. -1. Redistributions in source code must retain the above copyright notice, -this list of conditions, and the following disclaimer. +This license has been certified as open source. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions, and the following disclaimer in the documentation -and/or other materials provided with the distribution. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -3. All advertising materials and documentation mentioning features derived -from or use of this software must display the following acknowledgement: + 1. Redistributions in source code must retain the above copyright notice, this list of conditions, and the following disclaimer. -"This product includes software developed by Zope Corporation for use in the -Z Object Publishing Environment (http://www.zope.com/)." + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. -In the event that the product being advertised includes an intact Zope distribution -(with copyright and license included) then this clause is waived. + 3. All advertising materials and documentation mentioning features derived from or use of this software must display the following acknowledgement: -4. Names associated with Zope or Zope Corporation must not be used to endorse -or promote products derived from this software without prior written permission -from Zope Corporation. + "This product includes software developed by Zope Corporation for use in the Z Object Publishing Environment (http://www.zope.com/)." -5. Modified redistributions of any form whatsoever must retain the following -acknowledgment: + In the event that the product being advertised includes an intact Zope distribution (with copyright and license included) then this clause is waived. -"This product includes software developed by Zope Corporation for use in the -Z Object Publishing Environment (http://www.zope.com/)." + 4. Names associated with Zope or Zope Corporation must not be used to endorse or promote products derived from this software without prior written permission from Zope Corporation. -Intact (re-)distributions of any official Zope release do not require an external -acknowledgement. + 5. Modified redistributions of any form whatsoever must retain the following acknowledgment: -6. Modifications are encouraged but must be packaged separately as patches -to official Zope releases. Distributions that do not clearly separate the -patches from the original work must be clearly labeled as unofficial distributions. -Modifications which do not carry the name Zope may be packaged in any form, -as long as they conform to all of the clauses above. + "This product includes software developed by Zope Corporation for use in the Z Object Publishing Environment (http://www.zope.com/)." + + Intact (re-)distributions of any official Zope release do not require an external acknowledgement. + + 6. Modifications are encouraged but must be packaged separately as patches to official Zope releases. Distributions that do not clearly separate the patches from the original work must be clearly labeled as unofficial distributions. Modifications which do not carry the name Zope may be packaged in any form, as long as they conform to all of the clauses above. Disclaimer -THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of contributions -made by Zope Corporation and many individuals on behalf of Zope Corporation. -Specific attributions are listed in the accompanying credits file. +THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This software consists of contributions made by Zope Corporation and many individuals on behalf of Zope Corporation. Specific attributions are listed in the accompanying credits file. diff --git a/options/license/ZPL-2.0 b/options/license/ZPL-2.0 index 516081c18..5bb847f77 100644 --- a/options/license/ZPL-2.0 +++ b/options/license/ZPL-2.0 @@ -1,39 +1,23 @@ -Zope Public License (ZPL) Version 2.0 This software is Copyright (c) Zope -Corporation (tm) and Contributors. All rights reserved. This license has been -certified as open source. It has also been designated as GPL compatible by -the Free Software Foundation (FSF). +Zope Public License (ZPL) Version 2.0 -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +This software is Copyright (c) Zope Corporation (tm) and Contributors. All rights reserved. -1. Redistributions in source code must retain the above copyright notice, -this list of conditions, and the following disclaimer. +This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions, and the following disclaimer in the documentation -and/or other materials provided with the distribution. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -3. The name Zope Corporation (tm) must not be used to endorse or promote products -derived from this software without prior written permission from Zope Corporation. + 1. Redistributions in source code must retain the above copyright notice, this list of conditions, and the following disclaimer. -4. The right to distribute this software or to use it for any purpose does -not give you the right to use Servicemarks (sm) or Trademarks (tm) of Zope -Corporation. Use of them is covered in a separate agreement (see http://www.zope.com/Marks). + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. -5. If any files are modified, you must cause the modified files to carry prominent -notices stating that you changed the files and the date of any change. + 3. The name Zope Corporation (tm) must not be used to endorse or promote products derived from this software without prior written permission from Zope Corporation. + + 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of Zope Corporation. Use of them is covered in a separate agreement (see http://www.zope.com/Marks). + + 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer -THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. This software consists of contributions -made by Zope Corporation and many individuals on behalf of Zope Corporation. -Specific attributions are listed in the accompanying credits file. +THIS SOFTWARE IS PROVIDED BY ZOPE CORPORATION ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZOPE CORPORATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +This software consists of contributions made by Zope Corporation and many individuals on behalf of Zope Corporation. Specific attributions are listed in the accompanying credits file. diff --git a/options/license/ZPL-2.1 b/options/license/ZPL-2.1 index 4260feb31..7c3cd5aed 100644 --- a/options/license/ZPL-2.1 +++ b/options/license/ZPL-2.1 @@ -1,40 +1,21 @@ -Zope Public License (ZPL) Version 2.1 A copyright notice accompanies this -license document that identifies the copyright holders. +Zope Public License (ZPL) Version 2.1 -This license has been certified as open source. It has also been designated -as GPL compatible by the Free Software Foundation (FSF). +A copyright notice accompanies this license document that identifies the copyright holders. -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). -1. Redistributions in source code must retain the accompanying copyright notice, -this list of conditions, and the following disclaimer. +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -2. Redistributions in binary form must reproduce the accompanying copyright -notice, this list of conditions, and the following disclaimer in the documentation -and/or other materials provided with the distribution. + 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. -3. Names of the copyright holders must not be used to endorse or promote products -derived from this software without prior written permission from the copyright -holders. + 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. -4. The right to distribute this software or to use it for any purpose does -not give you the right to use Servicemarks (sm) or Trademarks (tm) of the -copyright holders. Use of them is covered by separate agreement with the copyright -holders. + 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. -5. If any files are modified, you must cause the modified files to carry prominent -notices stating that you changed the files and the date of any change. + 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. + + 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/Zed b/options/license/Zed index 97ecbbb11..5f7cd2cc0 100644 --- a/options/license/Zed +++ b/options/license/Zed @@ -1,7 +1,3 @@ (c) Jim Davies, January 1995 - -You may copy and distribute this file freely. Any queries and complaints should -be forwarded to Jim.Davies@comlab.ox.ac.uk. - -If you make any changes to this file, please do not distribute the results -under the name `zed-csp.sty'. +You may copy and distribute this file freely. Any queries and complaints should be forwarded to Jim.Davies@comlab.ox.ac.uk. +If you make any changes to this file, please do not distribute the results under the name `zed-csp.sty'. diff --git a/options/license/Zend-2.0 b/options/license/Zend-2.0 index c6025d22e..c9b5144e1 100644 --- a/options/license/Zend-2.0 +++ b/options/license/Zend-2.0 @@ -1,45 +1,18 @@ -The Zend Engine License, version 2.00 Copyright (c) 1999-2002 Zend Technologies -Ltd. All rights reserved. +The Zend Engine License, version 2.00 +Copyright (c) 1999-2002 Zend Technologies Ltd. All rights reserved. +Redistribution and use in source and binary forms, with or without modification, is permitted provided that the following conditions are met: + 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. -Redistribution and use in source and binary forms, with or without modification, -is permitted provided that the following conditions are met: + 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. -1. Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. + 3. The names "Zend" and "Zend Engine" must not be used to endorse or promote products derived from this software without prior permission from Zend Technologies Ltd. For written permission, please contact license@zend.com. -2. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. + 4. Zend Technologies Ltd. may publish revised and/or new versions of the license from time to time. Each version will be given a distinguishing version number. Once covered code has been published under a particular version of the license, you may always continue to use it under the terms of that version. You may also choose to use such covered code under the terms of any subsequent version of the license published by Zend Technologies Ltd. No one other than Zend Technologies Ltd. has the right to modify the terms applicable to covered code created under this License. -3. The names "Zend" and "Zend Engine" must not be used to endorse or promote -products derived from this software without prior permission from Zend Technologies -Ltd. For written permission, please contact license@zend.com. + 5. Redistributions of any form whatsoever must retain the following acknowledgment: "This product includes the Zend Engine, freely available at http://www.zend.com" -4. Zend Technologies Ltd. may publish revised and/or new versions of the license -from time to time. Each version will be given a distinguishing version number. -Once covered code has been published under a particular version of the license, -you may always continue to use it under the terms of that version. You may -also choose to use such covered code under the terms of any subsequent version -of the license published by Zend Technologies Ltd. No one other than Zend -Technologies Ltd. has the right to modify the terms applicable to covered -code created under this License. + 6. All advertising materials mentioning features or use of this software must display the following acknowledgment: "The Zend Engine is freely available at http://www.zend.com" -5. Redistributions of any form whatsoever must retain the following acknowledgment: -"This product includes the Zend Engine, freely available at http://www.zend.com" - -6. All advertising materials mentioning features or use of this software must -display the following acknowledgment: "The Zend Engine is freely available -at http://www.zend.com" - -THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND ANY EXPRESSED -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL ZEND TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, -OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THIS SOFTWARE IS PROVIDED BY ZEND TECHNOLOGIES LTD. ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ZEND TECHNOLOGIES LTD. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/options/license/Zimbra-1.3 b/options/license/Zimbra-1.3 index 5247dcdf1..78be65302 100644 --- a/options/license/Zimbra-1.3 +++ b/options/license/Zimbra-1.3 @@ -1,152 +1,47 @@ Zimbra Public License, Version 1.3 (ZPL) -This Zimbra Public License (this "Agreement") is a legal agreement that describes -the terms under which VMware, Inc., a Delaware corporation having its principal -place of business at 3401 Hillview Avenue, Palo Alto, California 94304 ("VMware") -will provide software to you via download or otherwise ("Software"). By using -the Software, you, an individual or an entity ("You") agree to the terms of -this Agreement. +This Zimbra Public License (this "Agreement") is a legal agreement that describes the terms under which VMware, Inc., a Delaware corporation having its principal place of business at 3401 Hillview Avenue, Palo Alto, California 94304 ("VMware") will provide software to you via download or otherwise ("Software"). By using the Software, you, an individual or an entity ("You") agree to the terms of this Agreement. -In consideration of the mutual promises and upon the terms and conditions -set forth below, the parties agree as follows: +In consideration of the mutual promises and upon the terms and conditions set forth below, the parties agree as follows: - 1. Grant of Copyright License +1. Grant of Copyright License -1.1 - Subject to the terms and conditions of this Agreement, VMware hereby -grants to You, under any and all of its copyright interest in and to the Software, -a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, -execute, and distribute the Software and Modifications. For the purposes of -this Agreement, any change to, addition to, or abridgement of the Software -made by You is a "Modification;" however, any file You add to the Software -that does not contain any part of the Software is not a "Modification." + 1.1 - Subject to the terms and conditions of this Agreement, VMware hereby grants to You, under any and all of its copyright interest in and to the Software, a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, execute, and distribute the Software and Modifications. For the purposes of this Agreement, any change to, addition to, or abridgement of the Software made by You is a "Modification;" however, any file You add to the Software that does not contain any part of the Software is not a "Modification." -1.2 - If You are an individual acting on behalf of a corporation or other -entity, Your use of the Software or any Modification is subject to Your having -the authority to bind such corporation or entity to this Agreement. Providing -copies to persons within such corporation or entity is not considered distribution -for purposes of this Agreement. + 1.2 - If You are an individual acting on behalf of a corporation or other entity, Your use of the Software or any Modification is subject to Your having the authority to bind such corporation or entity to this Agreement. Providing copies to persons within such corporation or entity is not considered distribution for purposes of this Agreement. -1.3 - For the Software or any Modification You distribute in source code format, -You must do so only under the terms of this Agreement, and You must include -a complete copy of this Agreement with Your distribution. With respect to -any Modification You distribute in source code format, the terms of this Agreement -will apply to You in the same way those terms apply to VMware with respect -to the Software. In other words, when You are distributing Modifications under -this Agreement, You "stand in the shoes" of VMware in terms of the rights -You grant and how the terms and conditions apply to You and the licensees -of Your Modifications. Notwithstanding the foregoing, when You "stand in the -shoes" of VMware, You are not subject to the jurisdiction provision under -Section 7, which requires all disputes under this Agreement to be subject -to the jurisdiction of federal or state courts of northern California. + 1.3 - For the Software or any Modification You distribute in source code format, You must do so only under the terms of this Agreement, and You must include a complete copy of this Agreement with Your distribution. With respect to any Modification You distribute in source code format, the terms of this Agreement will apply to You in the same way those terms apply to VMware with respect to the Software. In other words, when You are distributing Modifications under this Agreement, You "stand in the shoes" of VMware in terms of the rights You grant and how the terms and conditions apply to You and the licensees of Your Modifications. Notwithstanding the foregoing, when You "stand in the shoes" of VMware, You are not subject to the jurisdiction provision under Section 7, which requires all disputes under this Agreement to be subject to the jurisdiction of federal or state courts of northern California. -1.4 - For the Software or any Modification You distribute in compiled or object -code format, You must also provide recipients with access to the Software -or Modification in source code format along with a complete copy of this Agreement. -The distribution of the Software or Modifications in compiled or object code -format may be under a license of Your choice, provided that You are in compliance -with the terms of this Agreement. In addition, You must make absolutely clear -that any license terms applying to such Software or Modification that differ -from this Agreement are offered by You alone and not by VMware, and that such -license does not restrict recipients from exercising rights in the source -code to the Software granted by VMware under this Agreement or rights in the -source code to any Modification granted by You as described in Section 1.3. + 1.4 - For the Software or any Modification You distribute in compiled or object code format, You must also provide recipients with access to the Software or Modification in source code format along with a complete copy of this Agreement. The distribution of the Software or Modifications in compiled or object code format may be under a license of Your choice, provided that You are in compliance with the terms of this Agreement. In addition, You must make absolutely clear that any license terms applying to such Software or Modification that differ from this Agreement are offered by You alone and not by VMware, and that such license does not restrict recipients from exercising rights in the source code to the Software granted by VMware under this Agreement or rights in the source code to any Modification granted by You as described in Section 1.3. -1.5 - This Agreement does not limit Your right to distribute files that are -entirely Your own work (i.e., which do not incorporate any portion of the -Software and are not Modifications) under any terms You choose. + 1.5 - This Agreement does not limit Your right to distribute files that are entirely Your own work (i.e., which do not incorporate any portion of the Software and are not Modifications) under any terms You choose. - 2. Support +2. Support +VMware has no obligation to provide technical support or updates to You. Nothing in this Agreement requires VMware to enter into any license with You for any other edition of the Software. -VMware has no obligation to provide technical support or updates to You. Nothing -in this Agreement requires VMware to enter into any license with You for any -other edition of the Software. +3. Intellectual Property Rights - 3. Intellectual Property Rights + 3.1 - Except for the license expressly granted under copyright in Section 1.1, no rights, licenses or forbearances are granted or may arise in relation to this Agreement whether expressly, by implication, exhaustion, estoppel or otherwise. All rights, including all intellectual property rights, that are not expressly granted under this Agreement are hereby reserved. -3.1 - Except for the license expressly granted under copyright in Section -1.1, no rights, licenses or forbearances are granted or may arise in relation -to this Agreement whether expressly, by implication, exhaustion, estoppel -or otherwise. All rights, including all intellectual property rights, that -are not expressly granted under this Agreement are hereby reserved. + 3.2 - In any copy of the Software or in any Modification you create, You must retain and reproduce, any and all copyright, patent, trademark, and attribution notices that are included in the Software in the same form as they appear in the Software. This includes the preservation of attribution notices in the form of trademarks or logos that exist within a user interface of the Software. -3.2 - In any copy of the Software or in any Modification you create, You must -retain and reproduce, any and all copyright, patent, trademark, and attribution -notices that are included in the Software in the same form as they appear -in the Software. This includes the preservation of attribution notices in -the form of trademarks or logos that exist within a user interface of the -Software. + 3.3 - This license does not grant You rights to use any party's name, logo, or trademarks, except solely as necessary to comply with Section 3.2. -3.3 - This license does not grant You rights to use any party's name, logo, -or trademarks, except solely as necessary to comply with Section 3.2. +4. Disclaimer of Warranties +THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND. VMWARE MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY REGARDING OR RELATING TO THE SOFTWARE. SPECIFICALLY, VMWARE DOES NOT WARRANT THAT THE SOFTWARE WILL BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST EXTENT ALLOWED BY LAW, VMWARE SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF VMWARE HAD BEEN INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, ANY MODIFICATIONS THERETO AND WITH RESPECT TO THE USE OF THE FOREGOING. - 4. Disclaimer of Warranties +5. Limitation of Liability +IN NO EVENT WILL VMWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, PERFORMANCE OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, AND EVEN IF VMWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND. VMWARE -MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY REGARDING OR RELATING -TO THE SOFTWARE. SPECIFICALLY, VMWARE DOES NOT WARRANT THAT THE SOFTWARE WILL -BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST -EXTENT ALLOWED BY LAW, VMWARE SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF VMWARE HAD BEEN -INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, -ANY MODIFICATIONS THERETO AND WITH RESPECT TO THE USE OF THE FOREGOING. +6. Term and Termination - 5. Limitation of Liability + 6.1 - This Agreement will continue in effect unless and until terminated earlier pursuant to this Section 6. -IN NO EVENT WILL VMWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION -LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, COST OF -COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, -PERFORMANCE OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, -WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, -AND EVEN IF VMWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + 6.2 - In the event You violate the terms of this Agreement, VMware may terminate this Agreement. - 6. Term and Termination + 6.3 - All licenses granted hereunder shall terminate upon the termination of this Agreement. Termination will be in addition to any rights and remedies available to VMware at law or equity or under this Agreement. -6.1 - This Agreement will continue in effect unless and until terminated earlier -pursuant to this Section 6. + 6.4 - Termination of this Agreement will not affect the provisions regarding reservation of rights (Section 3.1), provisions disclaiming or limiting VMware's liability (Sections 4 and 5), Termination (Section 6) or Miscellaneous (Section 7), which provisions will survive termination of this Agreement. -6.2 - In the event You violate the terms of this Agreement, VMware may terminate -this Agreement. - -6.3 - All licenses granted hereunder shall terminate upon the termination -of this Agreement. Termination will be in addition to any rights and remedies -available to VMware at law or equity or under this Agreement. - -6.4 - Termination of this Agreement will not affect the provisions regarding -reservation of rights (Section 3.1), provisions disclaiming or limiting VMware's -liability (Sections 4 and 5), Termination (Section 6) or Miscellaneous (Section -7), which provisions will survive termination of this Agreement. - - 7. Miscellaneous - -This Agreement contains the entire agreement of the parties with respect to -the subject matter of this Agreement and supersedes all previous communications, -representations, understandings and agreements, either oral or written, between -the parties with respect to said subject matter. The relationship of the parties -hereunder is that of independent contractors, and this Agreement will not -be construed as creating an agency, partnership, joint venture or any other -form of legal association between the parties. If any term, condition, or -provision in this Agreement is found to be invalid, unlawful or unenforceable -to any extent, this Agreement will be construed in a manner that most closely -effectuates the intent of this Agreement. Such invalid term, condition or -provision will be severed from the remaining terms, conditions and provisions, -which will continue to be valid and enforceable to the fullest extent permitted -by law. This Agreement will be interpreted and construed in accordance with -the laws of the State of California and the United States of America, without -regard to conflict of law principles. The U.N. Convention on Contracts for -the International Sale of Goods shall not apply to this Agreement. All disputes -arising out of this Agreement involving VMware or any of its subsidiaries -shall be subject to the jurisdiction of the federal or state courts of northern -California, with venue lying in Santa Clara County, California. No rights -may be assigned, no obligations may be delegated, and this Agreement may not -be transferred by You, in whole or in part, whether voluntary or by operation -of law, including by way of sale of assets, merger or consolidation, without -the prior written consent of VMware, and any purported assignment, delegation -or transfer without such consent shall be void ab initio. Any waiver of the -provisions of this Agreement or of a party's rights or remedies under this -Agreement must be in writing to be effective. Failure, neglect or delay by -a party to enforce the provisions of this Agreement or its rights or remedies -at any time, will not be construed or be deemed to be a waiver of such party's -rights under this Agreement and will not in any way affect the validity of -the whole or any part of this Agreement or prejudice such party's right to -take subsequent action. +7. Miscellaneous +This Agreement contains the entire agreement of the parties with respect to the subject matter of this Agreement and supersedes all previous communications, representations, understandings and agreements, either oral or written, between the parties with respect to said subject matter. The relationship of the parties hereunder is that of independent contractors, and this Agreement will not be construed as creating an agency, partnership, joint venture or any other form of legal association between the parties. If any term, condition, or provision in this Agreement is found to be invalid, unlawful or unenforceable to any extent, this Agreement will be construed in a manner that most closely effectuates the intent of this Agreement. Such invalid term, condition or provision will be severed from the remaining terms, conditions and provisions, which will continue to be valid and enforceable to the fullest extent permitted by law. This Agreement will be interpreted and construed in accordance with the laws of the State of California and the United States of America, without regard to conflict of law principles. The U.N. Convention on Contracts for the International Sale of Goods shall not apply to this Agreement. All disputes arising out of this Agreement involving VMware or any of its subsidiaries shall be subject to the jurisdiction of the federal or state courts of northern California, with venue lying in Santa Clara County, California. No rights may be assigned, no obligations may be delegated, and this Agreement may not be transferred by You, in whole or in part, whether voluntary or by operation of law, including by way of sale of assets, merger or consolidation, without the prior written consent of VMware, and any purported assignment, delegation or transfer without such consent shall be void ab initio. Any waiver of the provisions of this Agreement or of a party's rights or remedies under this Agreement must be in writing to be effective. Failure, neglect or delay by a party to enforce the provisions of this Agreement or its rights or remedies at any time, will not be construed or be deemed to be a waiver of such party's rights under this Agreement and will not in any way affect the validity of the whole or any part of this Agreement or prejudice such party's right to take subsequent action. diff --git a/options/license/Zimbra-1.4 b/options/license/Zimbra-1.4 index f6d45292f..868e4d878 100644 --- a/options/license/Zimbra-1.4 +++ b/options/license/Zimbra-1.4 @@ -1,150 +1,47 @@ Zimbra Public License, Version 1.4 (ZPL) -This Zimbra Public License (this "Agreement") is a legal agreement that describes -the terms under which Zimbra, Inc., a Texas corporation ("Zimbra") will provide -software to you via download or otherwise ("Software"). By using the Software, -you, an individual or an entity ("You") agree to the terms of this Agreement. +This Zimbra Public License (this “Agreement”) is a legal agreement that describes the terms under which Zimbra, Inc., a Texas corporation (“Zimbra”) will provide software to you via download or otherwise (“Software”). By using the Software, you, an individual or an entity (“You”) agree to the terms of this Agreement. -In consideration of the mutual promises and upon the terms and conditions -set forth below, the parties agree as follows: +In consideration of the mutual promises and upon the terms and conditions set forth below, the parties agree as follows: - 1. Grant of Copyright License +1. Grant of Copyright License -1.1 - Subject to the terms and conditions of this Agreement, Zimbra hereby -grants to You, under any and all of its copyright interest in and to the Software, -a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, -execute, and distribute the Software and Modifications. For the purposes of -this Agreement, any change to, addition to, or abridgement of the Software -made by You is a "Modification;" however, any file You add to the Software -that does not contain any part of the Software is not a "Modification." + 1.1 - Subject to the terms and conditions of this Agreement, Zimbra hereby grants to You, under any and all of its copyright interest in and to the Software, a royalty-free, non-exclusive, non-transferable license to copy, modify, compile, execute, and distribute the Software and Modifications. For the purposes of this Agreement, any change to, addition to, or abridgement of the Software made by You is a “Modification;” however, any file You add to the Software that does not contain any part of the Software is not a “Modification.” -1.2 - If You are an individual acting on behalf of a corporation or other -entity, Your use of the Software or any Modification is subject to Your having -the authority to bind such corporation or entity to this Agreement. Providing -copies to persons within such corporation or entity is not considered distribution -for purposes of this Agreement. + 1.2 - If You are an individual acting on behalf of a corporation or other entity, Your use of the Software or any Modification is subject to Your having the authority to bind such corporation or entity to this Agreement. Providing copies to persons within such corporation or entity is not considered distribution for purposes of this Agreement. -1.3 - For the Software or any Modification You distribute in source code format, -You must do so only under the terms of this Agreement, and You must include -a complete copy of this Agreement with Your distribution. With respect to -any Modification You distribute in source code format, the terms of this Agreement -will apply to You in the same way those terms apply to Zimbra with respect -to the Software. In other words, when You are distributing Modifications under -this Agreement, You "stand in the shoes" of Zimbra in terms of the rights -You grant and how the terms and conditions apply to You and the licensees -of Your Modifications. Notwithstanding the foregoing, when You "stand in the -shoes" of Zimbra, You are not subject to the jurisdiction provision under -Section 7, which requires all disputes under this Agreement to be subject -to the jurisdiction of federal or state courts of Northern Texas. + 1.3 - For the Software or any Modification You distribute in source code format, You must do so only under the terms of this Agreement, and You must include a complete copy of this Agreement with Your distribution. With respect to any Modification You distribute in source code format, the terms of this Agreement will apply to You in the same way those terms apply to Zimbra with respect to the Software. In other words, when You are distributing Modifications under this Agreement, You “stand in the shoes” of Zimbra in terms of the rights You grant and how the terms and conditions apply to You and the licensees of Your Modifications. Notwithstanding the foregoing, when You “stand in the shoes” of Zimbra, You are not subject to the jurisdiction provision under Section 7, which requires all disputes under this Agreement to be subject to the jurisdiction of federal or state courts of Northern Texas. -1.4 - For the Software or any Modification You distribute in compiled or object -code format, You must also provide recipients with access to the Software -or Modification in source code format along with a complete copy of this Agreement. -The distribution of the Software or Modifications in compiled or object code -format may be under a license of Your choice, provided that You are in compliance -with the terms of this Agreement. In addition, You must make absolutely clear -that any license terms applying to such Software or Modification that differ -from this Agreement are offered by You alone and not by Zimbra, and that such -license does not restrict recipients from exercising rights in the source -code to the Software granted by Zimbra under this Agreement or rights in the -source code to any Modification granted by You as described in Section 1.3. + 1.4 - For the Software or any Modification You distribute in compiled or object code format, You must also provide recipients with access to the Software or Modification in source code format along with a complete copy of this Agreement. The distribution of the Software or Modifications in compiled or object code format may be under a license of Your choice, provided that You are in compliance with the terms of this Agreement. In addition, You must make absolutely clear that any license terms applying to such Software or Modification that differ from this Agreement are offered by You alone and not by Zimbra, and that such license does not restrict recipients from exercising rights in the source code to the Software granted by Zimbra under this Agreement or rights in the source code to any Modification granted by You as described in Section 1.3. -1.5 - This Agreement does not limit Your right to distribute files that are -entirely Your own work (i.e., which do not incorporate any portion of the -Software and are not Modifications) under any terms You choose. + 1.5 - This Agreement does not limit Your right to distribute files that are entirely Your own work (i.e., which do not incorporate any portion of the Software and are not Modifications) under any terms You choose. - 2. Support +2. Support +Zimbra has no obligation to provide technical support or updates to You. Nothing in this Agreement requires Zimbra to enter into any license with You for any other edition of the Software. -Zimbra has no obligation to provide technical support or updates to You. Nothing -in this Agreement requires Zimbra to enter into any license with You for any -other edition of the Software. +3. Intellectual Property Rights - 3. Intellectual Property Rights + 3.1 - Except for the license expressly granted under copyright in Section 1.1, no rights, licenses or forbearances are granted or may arise in relation to this Agreement whether expressly, by implication, exhaustion, estoppel or otherwise. All rights, including all intellectual property rights, that are not expressly granted under this Agreement are hereby reserved. -3.1 - Except for the license expressly granted under copyright in Section -1.1, no rights, licenses or forbearances are granted or may arise in relation -to this Agreement whether expressly, by implication, exhaustion, estoppel -or otherwise. All rights, including all intellectual property rights, that -are not expressly granted under this Agreement are hereby reserved. + 3.2 - In any copy of the Software or in any Modification you create, You must retain and reproduce any and all copyright, patent, trademark, and attribution notices that are included in the Software in the same form as they appear in the Software. This includes the preservation of attribution notices in the form of trademarks or logos that exist within a user interface of the Software. -3.2 - In any copy of the Software or in any Modification you create, You must -retain and reproduce any and all copyright, patent, trademark, and attribution -notices that are included in the Software in the same form as they appear -in the Software. This includes the preservation of attribution notices in -the form of trademarks or logos that exist within a user interface of the -Software. + 3.3 - This license does not grant You rights to use any party’s name, logo, or trademarks, except solely as necessary to comply with Section 3.2. -3.3 - This license does not grant You rights to use any party's name, logo, -or trademarks, except solely as necessary to comply with Section 3.2. +4. Disclaimer of Warranties +THE SOFTWARE IS PROVIDED “AS IS” AND WITHOUT WARRANTY OF ANY KIND. ZIMBRA MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, REGARDING OR RELATING TO THE SOFTWARE. SPECIFICALLY, ZIMBRA DOES NOT WARRANT THAT THE SOFTWARE WILL BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST EXTENT ALLOWED BY LAW, ZIMBRA SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF ZIMBRA HAD BEEN INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, ANY MODIFICATIONS THERETO, AND WITH RESPECT TO THE USE OF THE FOREGOING. - 4. Disclaimer of Warranties +5. Limitation of Liability +IN NO EVENT WILL ZIMBRA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, AND COST OF COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, PERFORMANCE, OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, AND EVEN IF ZIMBRA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND. ZIMBRA -MAKES NO WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, REGARDING OR -RELATING TO THE SOFTWARE. SPECIFICALLY, ZIMBRA DOES NOT WARRANT THAT THE SOFTWARE -WILL BE ERROR FREE OR WILL PERFORM IN AN UNINTERRUPTED MANNER. TO THE GREATEST -EXTENT ALLOWED BY LAW, ZIMBRA SPECIFICALLY DISCLAIMS ALL IMPLIED WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (EVEN IF ZIMBRA HAD BEEN -INFORMED OF SUCH PURPOSE), AND NONINFRINGEMENT WITH RESPECT TO THE SOFTWARE, -ANY MODIFICATIONS THERETO, AND WITH RESPECT TO THE USE OF THE FOREGOING. +6. Term and Termination - 5. Limitation of Liability + 6.1 - This Agreement will continue in effect unless and until terminated earlier pursuant to this Section 6. -IN NO EVENT WILL ZIMBRA BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES OF ANY KIND (INCLUDING WITHOUT LIMITATION -LOSS OF PROFITS, LOSS OF USE, BUSINESS INTERRUPTION, LOSS OF DATA, AND COST -OF COVER) IN CONNECTION WITH OR ARISING OUT OF OR RELATING TO THE FURNISHING, -PERFORMANCE, OR USE OF THE SOFTWARE OR ANY OTHER RIGHTS GRANTED HEREUNDER, -WHETHER ALLEGED AS A BREACH OF CONTRACT OR TORTIOUS CONDUCT, INCLUDING NEGLIGENCE, -AND EVEN IF ZIMBRA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + 6.2 - In the event You violate the terms of this Agreement, Zimbra may terminate this Agreement. - 6. Term and Termination + 6.3 - All licenses granted hereunder shall terminate upon the termination of this Agreement. Termination will be in addition to any rights and remedies available to Zimbra at law or equity or under this Agreement. -6.1 - This Agreement will continue in effect unless and until terminated earlier -pursuant to this Section 6. + 6.4 - Termination of this Agreement will not affect the provisions regarding reservation of rights (Section 3.1), provisions disclaiming or limiting Zimbra’s liability (Sections 4 and 5), Termination (Section 6), or Miscellaneous (Section 7), which provisions will survive termination of this Agreement. -6.2 - In the event You violate the terms of this Agreement, Zimbra may terminate -this Agreement. - -6.3 - All licenses granted hereunder shall terminate upon the termination -of this Agreement. Termination will be in addition to any rights and remedies -available to Zimbra at law or equity or under this Agreement. - -6.4 - Termination of this Agreement will not affect the provisions regarding -reservation of rights (Section 3.1), provisions disclaiming or limiting Zimbra's -liability (Sections 4 and 5), Termination (Section 6), or Miscellaneous (Section -7), which provisions will survive termination of this Agreement. - - 7. Miscellaneous - -This Agreement contains the entire agreement of the parties with respect to -the subject matter of this Agreement and supersedes all previous communications, -representations, understandings, and agreements, either oral or written, between -the parties with respect to said subject matter. The relationship of the parties -hereunder is that of independent contractors, and this Agreement will not -be construed as creating an agency, partnership, joint venture, or any other -form of legal association between the parties. If any term, condition, or -provision in this Agreement is found to be invalid, unlawful, or unenforceable -to any extent, this Agreement will be construed in a manner that most closely -effectuates the intent of this Agreement. Such invalid term, condition or -provision will be severed from the remaining terms, conditions, and provisions, -which will continue to be valid and enforceable to the fullest extent permitted -by law. This Agreement will be interpreted and construed in accordance with -the laws of the State of Delaware and the United States of America, without -regard to conflict of law principles. The U.N. Convention on Contracts for -the International Sale of Goods shall not apply to this Agreement. All disputes -arising out of this Agreement involving Zimbra or any of its parents or subsidiaries -shall be subject to the jurisdiction of the federal or state courts of Northern -Texas, with venue lying in Dallas County, Texas. No rights may be assigned, -no obligations may be delegated, and this Agreement may not be transferred -by You, in whole or in part, whether voluntary or by operation of law, including -by way of sale of assets, merger, or consolidation, without the prior written -consent of Zimbra, and any purported assignment, delegation, or transfer without -such consent shall be void ab initio. Any waiver of the provisions of this -Agreement or of a party's rights or remedies under this Agreement must be -in writing to be effective. Failure, neglect, or delay by a party to enforce -the provisions of this Agreement or its rights or remedies at any time will -not be construed or be deemed to be a waiver of such party's rights under -this Agreement and will not in any way affect the validity of the whole or -any part of this Agreement or prejudice such party's right to take subsequent -action. +7. Miscellaneous +This Agreement contains the entire agreement of the parties with respect to the subject matter of this Agreement and supersedes all previous communications, representations, understandings, and agreements, either oral or written, between the parties with respect to said subject matter. The relationship of the parties hereunder is that of independent contractors, and this Agreement will not be construed as creating an agency, partnership, joint venture, or any other form of legal association between the parties. If any term, condition, or provision in this Agreement is found to be invalid, unlawful, or unenforceable to any extent, this Agreement will be construed in a manner that most closely effectuates the intent of this Agreement. Such invalid term, condition or provision will be severed from the remaining terms, conditions, and provisions, which will continue to be valid and enforceable to the fullest extent permitted by law. This Agreement will be interpreted and construed in accordance with the laws of the State of Delaware and the United States of America, without regard to conflict of law principles. The U.N. Convention on Contracts for the International Sale of Goods shall not apply to this Agreement. All disputes arising out of this Agreement involving Zimbra or any of its parents or subsidiaries shall be subject to the jurisdiction of the federal or state courts of Northern Texas, with venue lying in Dallas County, Texas. No rights may be assigned, no obligations may be delegated, and this Agreement may not be transferred by You, in whole or in part, whether voluntary or by operation of law, including by way of sale of assets, merger, or consolidation, without the prior written consent of Zimbra, and any purported assignment, delegation, or transfer without such consent shall be void ab initio. Any waiver of the provisions of this Agreement or of a party’s rights or remedies under this Agreement must be in writing to be effective. Failure, neglect, or delay by a party to enforce the provisions of this Agreement or its rights or remedies at any time will not be construed or be deemed to be a waiver of such party’s rights under this Agreement and will not in any way affect the validity of the whole or any part of this Agreement or prejudice such party’s right to take subsequent action. diff --git a/options/license/Zlib b/options/license/Zlib index e197a5262..e0e3605ba 100644 --- a/options/license/Zlib +++ b/options/license/Zlib @@ -1,19 +1,11 @@ -zlib License Copyright (c) +zlib License -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject -to the following restrictions: +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must not claim -that you wrote the original software. If you use this software in a product, -an acknowledgment in the product documentation would be appreciated but is -not required. + 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. + 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. + 3. This notice may not be removed or altered from any source distribution. diff --git a/options/license/blessing b/options/license/blessing index fb5f18286..7a1b711a6 100644 --- a/options/license/blessing +++ b/options/license/blessing @@ -1,14 +1,5 @@ -The author disclaims copyright to this source code. In place of a legal notice, -here is a blessing: +The author disclaims copyright to this source code. In place of a legal notice, here is a blessing: - - - May you do good and not evil. - - - - May you find forgiveness for yourself and forgive others. - - - - May you share freely, never taking more than you give. +May you do good and not evil. +May you find forgiveness for yourself and forgive others. +May you share freely, never taking more than you give. diff --git a/options/license/copyleft-next-0.3.0 b/options/license/copyleft-next-0.3.0 index 0cbd53387..a66d5bf5e 100644 --- a/options/license/copyleft-next-0.3.0 +++ b/options/license/copyleft-next-0.3.0 @@ -1,206 +1,219 @@ -copyleft-next 0.3.0 ("this License") + copyleft-next 0.3.0 ("this License") + Release date: 2013-05-16 -Release date: 2013-05-16 - - 1. License Grants; No Trademark License +1. License Grants; No Trademark License Subject to the terms of this License, I grant You: -a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable copyright -license, to reproduce, Distribute, prepare derivative works of, publicly perform -and publicly display My Work. + a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable + copyright license, to reproduce, Distribute, prepare derivative works + of, publicly perform and publicly display My Work. -b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable patent -license under Licensed Patents to make, have made, use, sell, offer for sale, -and import Covered Works. + b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable + patent license under Licensed Patents to make, have made, use, sell, + offer for sale, and import Covered Works. -This License does not grant any rights in My name, trademarks, service marks, -or logos. + This License does not grant any rights in My name, trademarks, service + marks, or logos. - 2. Distribution: General Conditions +2. Distribution: General Conditions -You may Distribute Covered Works, provided that You (i) inform recipients -how they can obtain a copy of this License; (ii) satisfy the applicable conditions -of sections 3 through 6; and (iii) preserve all Legal Notices contained in -My Work (to the extent they remain pertinent). "Legal Notices" means copyright -notices, license notices, license texts, and author attributions, but does -not include logos, other graphical images, trademarks or trademark legends. + You may Distribute Covered Works, provided that You (i) inform + recipients how they can obtain a copy of this License; (ii) satisfy the + applicable conditions of sections 3 through 6; and (iii) preserve all + Legal Notices contained in My Work (to the extent they remain + pertinent). "Legal Notices" means copyright notices, license notices, + license texts, and author attributions, but does not include logos, + other graphical images, trademarks or trademark legends. - 3. Conditions for Distributing Derived Works; Outbound GPL Compatibility +3. Conditions for Distributing Derived Works; Outbound GPL Compatibility -If You Distribute a Derived Work, You must license the entire Derived Work -as a whole under this License, with prominent notice of such licensing. This -condition may not be avoided through such means as separate Distribution of -portions of the Derived Work. You may additionally license the Derived Work -under the GPL, so that the recipient may further Distribute the Derived Work -under either this License or the GPL. + If You Distribute a Derived Work, You must license the entire Derived + Work as a whole under this License, with prominent notice of such + licensing. This condition may not be avoided through such means as + separate Distribution of portions of the Derived Work. You may + additionally license the Derived Work under the GPL, so that the + recipient may further Distribute the Derived Work under either this + License or the GPL. - 4. Condition Against Further Restrictions; Inbound License Compatibility +4. Condition Against Further Restrictions; Inbound License Compatibility -When Distributing a Covered Work, You may not impose further restrictions -on the exercise of rights in the Covered Work granted under this License. -This condition is not excused merely because such restrictions result from -Your compliance with conditions or obligations extrinsic to this License (such -as a court order or an agreement with a third party). + When Distributing a Covered Work, You may not impose further + restrictions on the exercise of rights in the Covered Work granted under + this License. This condition is not excused merely because such + restrictions result from Your compliance with conditions or obligations + extrinsic to this License (such as a court order or an agreement with a + third party). -However, You may Distribute a Covered Work incorporating material governed -by a license that is both OSI-Approved and FSF-Free as of the release date -of this License, provided that Your Distribution complies with such other -license. + However, You may Distribute a Covered Work incorporating material + governed by a license that is both OSI-Approved and FSF-Free as of the + release date of this License, provided that Your Distribution complies + with such other license. - 5. Conditions for Distributing Object Code +5. Conditions for Distributing Object Code -You may Distribute an Object Code form of a Covered Work, provided that you -accompany the Object Code with a URL through which the Corresponding Source -is made available, at no charge, by some standard or customary means of providing -network access to source code. + You may Distribute an Object Code form of a Covered Work, provided that + you accompany the Object Code with a URL through which the Corresponding + Source is made available, at no charge, by some standard or customary + means of providing network access to source code. -If you Distribute the Object Code in a physical product or tangible storage -medium ("Product"), the Corresponding Source must be available through such -URL for two years from the date of Your most recent Distribution of the Object -Code in the Product. However, if the Product itself contains or is accompanied -by the Corresponding Source (made available in a customarily accessible manner), -You need not also comply with the first paragraph of this section. + If you Distribute the Object Code in a physical product or tangible + storage medium ("Product"), the Corresponding Source must be available + through such URL for two years from the date of Your most recent + Distribution of the Object Code in the Product. However, if the Product + itself contains or is accompanied by the Corresponding Source (made + available in a customarily accessible manner), You need not also comply + with the first paragraph of this section. -Each recipient of the Covered Work from You is an intended third-party beneficiary -of this License solely as to this section 5, with the right to enforce its -terms. + Each recipient of the Covered Work from You is an intended third-party + beneficiary of this License solely as to this section 5, with the right + to enforce its terms. - 6. Symmetrical Licensing Condition for Upstream Contributions +6. Symmetrical Licensing Condition for Upstream Contributions -If You Distribute a work to Me specifically for inclusion in or modification -of a Covered Work (a "Patch"), and no explicit licensing terms apply to the -Patch, You license the Patch under this License, to the extent of Your copyright -in the Patch. This condition does not negate the other conditions of this -License, if applicable to the Patch. + If You Distribute a work to Me specifically for inclusion in or + modification of a Covered Work (a "Patch"), and no explicit licensing + terms apply to the Patch, You license the Patch under this License, to + the extent of Your copyright in the Patch. This condition does not + negate the other conditions of this License, if applicable to the Patch. - 7. Nullification of Copyleft/Proprietary Dual Licensing +7. Nullification of Copyleft/Proprietary Dual Licensing -If I offer to license, for a fee, a Covered Work under terms other than a -license that is OSI-Approved or FSF-Free as of the release date of this License -or a numbered version of copyleft-next released by the Copyleft-Next Project, -then the license I grant You under section 1 is no longer subject to the conditions -in sections 2 through 5. + If I offer to license, for a fee, a Covered Work under terms other than + a license that is OSI-Approved or FSF-Free as of the release date of this + License or a numbered version of copyleft-next released by the + Copyleft-Next Project, then the license I grant You under section 1 is no + longer subject to the conditions in sections 2 through 5. - 8. Copyleft Sunset +8. Copyleft Sunset -The conditions in sections 2 through 5 no longer apply once fifteen years -have elapsed from the date of My first Distribution of My Work under this -License. + The conditions in sections 2 through 5 no longer apply once fifteen + years have elapsed from the date of My first Distribution of My Work + under this License. - 9. Pass-Through +9. Pass-Through -When You Distribute a Covered Work, the recipient automatically receives a -license to My Work from Me, subject to the terms of this License. + When You Distribute a Covered Work, the recipient automatically receives + a license to My Work from Me, subject to the terms of this License. - 10. Termination +10. Termination - Your license grants under section 1 are automatically terminated if You + Your license grants under section 1 are automatically terminated if You -a) fail to comply with the conditions of this License, unless You cure such -noncompliance within thirty days after becoming aware of it, or + a) fail to comply with the conditions of this License, unless You cure + such noncompliance within thirty days after becoming aware of it, or -b) initiate a patent infringement litigation claim (excluding declaratory -judgment actions, counterclaims, and cross-claims) alleging that any part -of My Work directly or indirectly infringes any patent. + b) initiate a patent infringement litigation claim (excluding + declaratory judgment actions, counterclaims, and cross-claims) + alleging that any part of My Work directly or indirectly infringes + any patent. -Termination of Your license grants extends to all copies of Covered Works -You subsequently obtain. Termination does not terminate the rights of those -who have received copies or rights from You subject to this License. + Termination of Your license grants extends to all copies of Covered + Works You subsequently obtain. Termination does not terminate the + rights of those who have received copies or rights from You subject to + this License. -To the extent permission to make copies of a Covered Work is necessary merely -for running it, such permission is not terminable. + To the extent permission to make copies of a Covered Work is necessary + merely for running it, such permission is not terminable. - 11. Later License Versions +11. Later License Versions -The Copyleft-Next Project may release new versions of copyleft-next, designated -by a distinguishing version number ("Later Versions"). Unless I explicitly -remove the option of Distributing Covered Works under Later Versions, You -may Distribute Covered Works under any Later Version. + The Copyleft-Next Project may release new versions of copyleft-next, + designated by a distinguishing version number ("Later Versions"). + Unless I explicitly remove the option of Distributing Covered Works + under Later Versions, You may Distribute Covered Works under any Later + Version. - 12. No Warranty +** 12. No Warranty ** +** ** +** My Work is provided "as-is", without warranty. You bear the risk ** +** of using it. To the extent permitted by applicable law, each ** +** Distributor of My Work excludes the implied warranties of title, ** +** merchantability, fitness for a particular purpose and ** +** non-infringement. ** -My Work is provided "as-is", without warranty. You bear the risk of using -it. To the extent permitted by applicable law, each Distributor of My Work -excludes the implied warranties of title, merchantability, fitness for a particular -purpose and non-infringement. +** 13. Limitation of Liability ** +** ** +** To the extent permitted by applicable law, in no event will any ** +** Distributor of My Work be liable to You for any damages ** +** whatsoever, whether direct, indirect, special, incidental, or ** +** consequential damages, whether arising under contract, tort ** +** (including negligence), or otherwise, even where the Distributor ** +** knew or should have known about the possibility of such damages. ** - 13. Limitation of Liability +14. Severability -To the extent permitted by applicable law, in no event will any Distributor -of My Work be liable to You for any damages whatsoever, whether direct, indirect, -special, incidental, or consequential damages, whether arising under contract, -tort (including negligence), or otherwise, even where the Distributor knew -or should have known about the possibility of such damages. + The invalidity or unenforceability of any provision of this License + does not affect the validity or enforceability of the remainder of + this License. Such provision is to be reformed to the minimum extent + necessary to make it valid and enforceable. - 14. Severability +15. Definitions -The invalidity or unenforceability of any provision of this License does not -affect the validity or enforceability of the remainder of this License. Such -provision is to be reformed to the minimum extent necessary to make it valid -and enforceable. + "Copyleft-Next Project" means the project that maintains the source + code repository at as of the + release date of this License. - 15. Definitions + "Corresponding Source" of a Covered Work in Object Code form means (i) + the Source Code form of the Covered Work; (ii) all scripts, + instructions and similar information that are reasonably necessary for + a skilled developer to generate such Object Code from the Source Code + provided under (i); and (iii) a list clearly identifying all Separate + Works (other than those provided in compliance with (ii)) that were + specifically used in building and (if applicable) installing the + Covered Work (for example, a specified proprietary compiler including + its version number). Corresponding Source must be machine-readable. -"Copyleft-Next Project" means the project that maintains the source code repository -at as of the release date of this License. + "Covered Work" means My Work or a Derived Work. -"Corresponding Source" of a Covered Work in Object Code form means (i) the -Source Code form of the Covered Work; (ii) all scripts, instructions and similar -information that are reasonably necessary for a skilled developer to generate -such Object Code from the Source Code provided under (i); and (iii) a list -clearly identifying all Separate Works (other than those provided in compliance -with (ii)) that were specifically used in building and (if applicable) installing -the Covered Work (for example, a specified proprietary compiler including -its version number). Corresponding Source must be machine-readable. + "Derived Work" means a work of authorship that copies from, modifies, + adapts, is based on, is a derivative work of, transforms, translates or + contains all or part of My Work, such that copyright permission is + required. The following are not Derived Works: (i) Mere Aggregation; + (ii) a mere reproduction of My Work; and (iii) if My Work fails to + explicitly state an expectation otherwise, a work that merely makes + reference to My Work. - "Covered Work" means My Work or a Derived Work. + "Distribute" means to distribute, transfer or make a copy available to + someone else, such that copyright permission is required. -"Derived Work" means a work of authorship that copies from, modifies, adapts, -is based on, is a derivative work of, transforms, translates or contains all -or part of My Work, such that copyright permission is required. The following -are not Derived Works: (i) Mere Aggregation; (ii) a mere reproduction of My -Work; and (iii) if My Work fails to explicitly state an expectation otherwise, -a work that merely makes reference to My Work. + "Distributor" means Me and anyone else who Distributes a Covered Work. -"Distribute" means to distribute, transfer or make a copy available to someone -else, such that copyright permission is required. + "FSF-Free" means classified as 'free' by the Free Software Foundation. - "Distributor" means Me and anyone else who Distributes a Covered Work. + "GPL" means a version of the GNU General Public License or the GNU + Affero General Public License. - "FSF-Free" means classified as 'free' by the Free Software Foundation. + "I"/"Me"/"My" refers to the individual or legal entity that places My + Work under this License. "You"/"Your" refers to the individual or legal + entity exercising rights in My Work under this License. A legal entity + includes each entity that controls, is controlled by, or is under + common control with such legal entity. "Control" means (a) the power to + direct the actions of such legal entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent of the + outstanding shares or beneficial ownership of such legal entity. -"GPL" means a version of the GNU General Public License or the GNU Affero -General Public License. + "Licensed Patents" means all patent claims licensable royalty-free by + Me, now or in the future, that are necessarily infringed by making, + using, or selling My Work, and excludes claims that would be infringed + only as a consequence of further modification of My Work. -"I"/"Me"/"My" refers to the individual or legal entity that places My Work -under this License. "You"/"Your" refers to the individual or legal entity -exercising rights in My Work under this License. A legal entity includes each -entity that controls, is controlled by, or is under common control with such -legal entity. "Control" means (a) the power to direct the actions of such -legal entity, whether by contract or otherwise, or (b) ownership of more than -fifty percent of the outstanding shares or beneficial ownership of such legal -entity. + "Mere Aggregation" means an aggregation of a Covered Work with a + Separate Work. -"Licensed Patents" means all patent claims licensable royalty-free by Me, -now or in the future, that are necessarily infringed by making, using, or -selling My Work, and excludes claims that would be infringed only as a consequence -of further modification of My Work. + "My Work" means the particular work of authorship I license to You + under this License. -"Mere Aggregation" means an aggregation of a Covered Work with a Separate -Work. + "Object Code" means any form of a work that is not Source Code. -"My Work" means the particular work of authorship I license to You under this -License. + "OSI-Approved" means approved as 'Open Source' by the Open Source + Initiative. - "Object Code" means any form of a work that is not Source Code. + "Separate Work" means a work that is separate from and independent of a + particular Covered Work and is not by its nature an extension or + enhancement of the Covered Work, and/or a runtime library, standard + library or similar component that is used to generate an Object Code + form of a Covered Work. -"OSI-Approved" means approved as 'Open Source' by the Open Source Initiative. - -"Separate Work" means a work that is separate from and independent of a particular -Covered Work and is not by its nature an extension or enhancement of the Covered -Work, and/or a runtime library, standard library or similar component that -is used to generate an Object Code form of a Covered Work. - -"Source Code" means the preferred form of a work for making modifications -to it. + "Source Code" means the preferred form of a work for making + modifications to it. diff --git a/options/license/copyleft-next-0.3.1 b/options/license/copyleft-next-0.3.1 index 78502791c..21c87270f 100644 --- a/options/license/copyleft-next-0.3.1 +++ b/options/license/copyleft-next-0.3.1 @@ -1,208 +1,220 @@ -copyleft-next 0.3.1 ("this License") + copyleft-next 0.3.1 ("this License") + Release date: 2016-04-29 -Release date: 2016-04-29 - - 1. License Grants; No Trademark License +1. License Grants; No Trademark License Subject to the terms of this License, I grant You: -a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable copyright -license, to reproduce, Distribute, prepare derivative works of, publicly perform -and publicly display My Work. + a) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable + copyright license, to reproduce, Distribute, prepare derivative works + of, publicly perform and publicly display My Work. -b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable patent -license under Licensed Patents to make, have made, use, sell, offer for sale, -and import Covered Works. + b) A non-exclusive, worldwide, perpetual, royalty-free, irrevocable + patent license under Licensed Patents to make, have made, use, sell, + offer for sale, and import Covered Works. -This License does not grant any rights in My name, trademarks, service marks, -or logos. + This License does not grant any rights in My name, trademarks, service + marks, or logos. - 2. Distribution: General Conditions +2. Distribution: General Conditions -You may Distribute Covered Works, provided that You (i) inform recipients -how they can obtain a copy of this License; (ii) satisfy the applicable conditions -of sections 3 through 6; and (iii) preserve all Legal Notices contained in -My Work (to the extent they remain pertinent). "Legal Notices" means copyright -notices, license notices, license texts, and author attributions, but does -not include logos, other graphical images, trademarks or trademark legends. + You may Distribute Covered Works, provided that You (i) inform + recipients how they can obtain a copy of this License; (ii) satisfy the + applicable conditions of sections 3 through 6; and (iii) preserve all + Legal Notices contained in My Work (to the extent they remain + pertinent). "Legal Notices" means copyright notices, license notices, + license texts, and author attributions, but does not include logos, + other graphical images, trademarks or trademark legends. - 3. Conditions for Distributing Derived Works; Outbound GPL Compatibility +3. Conditions for Distributing Derived Works; Outbound GPL Compatibility -If You Distribute a Derived Work, You must license the entire Derived Work -as a whole under this License, with prominent notice of such licensing. This -condition may not be avoided through such means as separate Distribution of -portions of the Derived Work. + If You Distribute a Derived Work, You must license the entire Derived + Work as a whole under this License, with prominent notice of such + licensing. This condition may not be avoided through such means as + separate Distribution of portions of the Derived Work. -If the Derived Work includes material licensed under the GPL, You may instead -license the Derived Work under the GPL. + If the Derived Work includes material licensed under the GPL, You may + instead license the Derived Work under the GPL. - 4. Condition Against Further Restrictions; Inbound License Compatibility +4. Condition Against Further Restrictions; Inbound License Compatibility -When Distributing a Covered Work, You may not impose further restrictions -on the exercise of rights in the Covered Work granted under this License. -This condition is not excused merely because such restrictions result from -Your compliance with conditions or obligations extrinsic to this License (such -as a court order or an agreement with a third party). + When Distributing a Covered Work, You may not impose further + restrictions on the exercise of rights in the Covered Work granted under + this License. This condition is not excused merely because such + restrictions result from Your compliance with conditions or obligations + extrinsic to this License (such as a court order or an agreement with a + third party). -However, You may Distribute a Covered Work incorporating material governed -by a license that is both OSI-Approved and FSF-Free as of the release date -of this License, provided that compliance with such other license would not -conflict with any conditions stated in other sections of this License. + However, You may Distribute a Covered Work incorporating material + governed by a license that is both OSI-Approved and FSF-Free as of the + release date of this License, provided that compliance with such + other license would not conflict with any conditions stated in other + sections of this License. - 5. Conditions for Distributing Object Code +5. Conditions for Distributing Object Code -You may Distribute an Object Code form of a Covered Work, provided that you -accompany the Object Code with a URL through which the Corresponding Source -is made available, at no charge, by some standard or customary means of providing -network access to source code. + You may Distribute an Object Code form of a Covered Work, provided that + you accompany the Object Code with a URL through which the Corresponding + Source is made available, at no charge, by some standard or customary + means of providing network access to source code. -If you Distribute the Object Code in a physical product or tangible storage -medium ("Product"), the Corresponding Source must be available through such -URL for two years from the date of Your most recent Distribution of the Object -Code in the Product. However, if the Product itself contains or is accompanied -by the Corresponding Source (made available in a customarily accessible manner), -You need not also comply with the first paragraph of this section. + If you Distribute the Object Code in a physical product or tangible + storage medium ("Product"), the Corresponding Source must be available + through such URL for two years from the date of Your most recent + Distribution of the Object Code in the Product. However, if the Product + itself contains or is accompanied by the Corresponding Source (made + available in a customarily accessible manner), You need not also comply + with the first paragraph of this section. -Each direct and indirect recipient of the Covered Work from You is an intended -third-party beneficiary of this License solely as to this section 5, with -the right to enforce its terms. + Each direct and indirect recipient of the Covered Work from You is an + intended third-party beneficiary of this License solely as to this + section 5, with the right to enforce its terms. - 6. Symmetrical Licensing Condition for Upstream Contributions +6. Symmetrical Licensing Condition for Upstream Contributions -If You Distribute a work to Me specifically for inclusion in or modification -of a Covered Work (a "Patch"), and no explicit licensing terms apply to the -Patch, You license the Patch under this License, to the extent of Your copyright -in the Patch. This condition does not negate the other conditions of this -License, if applicable to the Patch. + If You Distribute a work to Me specifically for inclusion in or + modification of a Covered Work (a "Patch"), and no explicit licensing + terms apply to the Patch, You license the Patch under this License, to + the extent of Your copyright in the Patch. This condition does not + negate the other conditions of this License, if applicable to the Patch. - 7. Nullification of Copyleft/Proprietary Dual Licensing +7. Nullification of Copyleft/Proprietary Dual Licensing -If I offer to license, for a fee, a Covered Work under terms other than a -license that is OSI-Approved or FSF-Free as of the release date of this License -or a numbered version of copyleft-next released by the Copyleft-Next Project, -then the license I grant You under section 1 is no longer subject to the conditions -in sections 3 through 5. + If I offer to license, for a fee, a Covered Work under terms other than + a license that is OSI-Approved or FSF-Free as of the release date of this + License or a numbered version of copyleft-next released by the + Copyleft-Next Project, then the license I grant You under section 1 is no + longer subject to the conditions in sections 3 through 5. - 8. Copyleft Sunset +8. Copyleft Sunset -The conditions in sections 3 through 5 no longer apply once fifteen years -have elapsed from the date of My first Distribution of My Work under this -License. + The conditions in sections 3 through 5 no longer apply once fifteen + years have elapsed from the date of My first Distribution of My Work + under this License. - 9. Pass-Through +9. Pass-Through -When You Distribute a Covered Work, the recipient automatically receives a -license to My Work from Me, subject to the terms of this License. + When You Distribute a Covered Work, the recipient automatically receives + a license to My Work from Me, subject to the terms of this License. - 10. Termination +10. Termination - Your license grants under section 1 are automatically terminated if You + Your license grants under section 1 are automatically terminated if You -a) fail to comply with the conditions of this License, unless You cure such -noncompliance within thirty days after becoming aware of it, or + a) fail to comply with the conditions of this License, unless You cure + such noncompliance within thirty days after becoming aware of it, or -b) initiate a patent infringement litigation claim (excluding declaratory -judgment actions, counterclaims, and cross-claims) alleging that any part -of My Work directly or indirectly infringes any patent. + b) initiate a patent infringement litigation claim (excluding + declaratory judgment actions, counterclaims, and cross-claims) + alleging that any part of My Work directly or indirectly infringes + any patent. -Termination of Your license grants extends to all copies of Covered Works -You subsequently obtain. Termination does not terminate the rights of those -who have received copies or rights from You subject to this License. + Termination of Your license grants extends to all copies of Covered + Works You subsequently obtain. Termination does not terminate the + rights of those who have received copies or rights from You subject to + this License. -To the extent permission to make copies of a Covered Work is necessary merely -for running it, such permission is not terminable. + To the extent permission to make copies of a Covered Work is necessary + merely for running it, such permission is not terminable. - 11. Later License Versions +11. Later License Versions -The Copyleft-Next Project may release new versions of copyleft-next, designated -by a distinguishing version number ("Later Versions"). Unless I explicitly -remove the option of Distributing Covered Works under Later Versions, You -may Distribute Covered Works under any Later Version. + The Copyleft-Next Project may release new versions of copyleft-next, + designated by a distinguishing version number ("Later Versions"). + Unless I explicitly remove the option of Distributing Covered Works + under Later Versions, You may Distribute Covered Works under any Later + Version. - 12. No Warranty +** 12. No Warranty ** +** ** +** My Work is provided "as-is", without warranty. You bear the risk ** +** of using it. To the extent permitted by applicable law, each ** +** Distributor of My Work excludes the implied warranties of title, ** +** merchantability, fitness for a particular purpose and ** +** non-infringement. ** -My Work is provided "as-is", without warranty. You bear the risk of using -it. To the extent permitted by applicable law, each Distributor of My Work -excludes the implied warranties of title, merchantability, fitness for a particular -purpose and non-infringement. +** 13. Limitation of Liability ** +** ** +** To the extent permitted by applicable law, in no event will any ** +** Distributor of My Work be liable to You for any damages ** +** whatsoever, whether direct, indirect, special, incidental, or ** +** consequential damages, whether arising under contract, tort ** +** (including negligence), or otherwise, even where the Distributor ** +** knew or should have known about the possibility of such damages. ** - 13. Limitation of Liability +14. Severability -To the extent permitted by applicable law, in no event will any Distributor -of My Work be liable to You for any damages whatsoever, whether direct, indirect, -special, incidental, or consequential damages, whether arising under contract, -tort (including negligence), or otherwise, even where the Distributor knew -or should have known about the possibility of such damages. + The invalidity or unenforceability of any provision of this License + does not affect the validity or enforceability of the remainder of + this License. Such provision is to be reformed to the minimum extent + necessary to make it valid and enforceable. - 14. Severability +15. Definitions -The invalidity or unenforceability of any provision of this License does not -affect the validity or enforceability of the remainder of this License. Such -provision is to be reformed to the minimum extent necessary to make it valid -and enforceable. + "Copyleft-Next Project" means the project that maintains the source + code repository at + as of the release date of this License. - 15. Definitions + "Corresponding Source" of a Covered Work in Object Code form means (i) + the Source Code form of the Covered Work; (ii) all scripts, + instructions and similar information that are reasonably necessary for + a skilled developer to generate such Object Code from the Source Code + provided under (i); and (iii) a list clearly identifying all Separate + Works (other than those provided in compliance with (ii)) that were + specifically used in building and (if applicable) installing the + Covered Work (for example, a specified proprietary compiler including + its version number). Corresponding Source must be machine-readable. -"Copyleft-Next Project" means the project that maintains the source code repository -at as of the release -date of this License. + "Covered Work" means My Work or a Derived Work. -"Corresponding Source" of a Covered Work in Object Code form means (i) the -Source Code form of the Covered Work; (ii) all scripts, instructions and similar -information that are reasonably necessary for a skilled developer to generate -such Object Code from the Source Code provided under (i); and (iii) a list -clearly identifying all Separate Works (other than those provided in compliance -with (ii)) that were specifically used in building and (if applicable) installing -the Covered Work (for example, a specified proprietary compiler including -its version number). Corresponding Source must be machine-readable. + "Derived Work" means a work of authorship that copies from, modifies, + adapts, is based on, is a derivative work of, transforms, translates or + contains all or part of My Work, such that copyright permission is + required. The following are not Derived Works: (i) Mere Aggregation; + (ii) a mere reproduction of My Work; and (iii) if My Work fails to + explicitly state an expectation otherwise, a work that merely makes + reference to My Work. - "Covered Work" means My Work or a Derived Work. + "Distribute" means to distribute, transfer or make a copy available to + someone else, such that copyright permission is required. -"Derived Work" means a work of authorship that copies from, modifies, adapts, -is based on, is a derivative work of, transforms, translates or contains all -or part of My Work, such that copyright permission is required. The following -are not Derived Works: (i) Mere Aggregation; (ii) a mere reproduction of My -Work; and (iii) if My Work fails to explicitly state an expectation otherwise, -a work that merely makes reference to My Work. + "Distributor" means Me and anyone else who Distributes a Covered Work. -"Distribute" means to distribute, transfer or make a copy available to someone -else, such that copyright permission is required. + "FSF-Free" means classified as 'free' by the Free Software Foundation. - "Distributor" means Me and anyone else who Distributes a Covered Work. + "GPL" means a version of the GNU General Public License or the GNU + Affero General Public License. - "FSF-Free" means classified as 'free' by the Free Software Foundation. + "I"/"Me"/"My" refers to the individual or legal entity that places My + Work under this License. "You"/"Your" refers to the individual or legal + entity exercising rights in My Work under this License. A legal entity + includes each entity that controls, is controlled by, or is under + common control with such legal entity. "Control" means (a) the power to + direct the actions of such legal entity, whether by contract or + otherwise, or (b) ownership of more than fifty percent of the + outstanding shares or beneficial ownership of such legal entity. -"GPL" means a version of the GNU General Public License or the GNU Affero -General Public License. + "Licensed Patents" means all patent claims licensable royalty-free by + Me, now or in the future, that are necessarily infringed by making, + using, or selling My Work, and excludes claims that would be infringed + only as a consequence of further modification of My Work. -"I"/"Me"/"My" refers to the individual or legal entity that places My Work -under this License. "You"/"Your" refers to the individual or legal entity -exercising rights in My Work under this License. A legal entity includes each -entity that controls, is controlled by, or is under common control with such -legal entity. "Control" means (a) the power to direct the actions of such -legal entity, whether by contract or otherwise, or (b) ownership of more than -fifty percent of the outstanding shares or beneficial ownership of such legal -entity. + "Mere Aggregation" means an aggregation of a Covered Work with a + Separate Work. -"Licensed Patents" means all patent claims licensable royalty-free by Me, -now or in the future, that are necessarily infringed by making, using, or -selling My Work, and excludes claims that would be infringed only as a consequence -of further modification of My Work. + "My Work" means the particular work of authorship I license to You + under this License. -"Mere Aggregation" means an aggregation of a Covered Work with a Separate -Work. + "Object Code" means any form of a work that is not Source Code. -"My Work" means the particular work of authorship I license to You under this -License. + "OSI-Approved" means approved as 'Open Source' by the Open Source + Initiative. - "Object Code" means any form of a work that is not Source Code. + "Separate Work" means a work that is separate from and independent of a + particular Covered Work and is not by its nature an extension or + enhancement of the Covered Work, and/or a runtime library, standard + library or similar component that is used to generate an Object Code + form of a Covered Work. -"OSI-Approved" means approved as 'Open Source' by the Open Source Initiative. - -"Separate Work" means a work that is separate from and independent of a particular -Covered Work and is not by its nature an extension or enhancement of the Covered -Work, and/or a runtime library, standard library or similar component that -is used to generate an Object Code form of a Covered Work. - -"Source Code" means the preferred form of a work for making modifications -to it. + "Source Code" means the preferred form of a work for making + modifications to it. diff --git a/options/license/curl b/options/license/curl index c891714b1..dd333ab2e 100644 --- a/options/license/curl +++ b/options/license/curl @@ -1,20 +1,10 @@ -COPYRIGHT AND PERMISSION NOTICE Copyright (c) 1996 - 2015, Daniel Stenberg, -. +COPYRIGHT AND PERMISSION NOTICE +Copyright (c) 1996 - 2015, Daniel Stenberg, . All rights reserved. -Permission to use, copy, modify, and distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. +Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO -EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES -OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -Except as contained in this notice, the name of a copyright holder shall not -be used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization of the copyright holder. +Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. diff --git a/options/license/diffmark b/options/license/diffmark index b3fc7fd0a..02d3b5013 100644 --- a/options/license/diffmark +++ b/options/license/diffmark @@ -1,5 +1,2 @@ - - - 1. you can do what you want with it - - 2. I refuse any responsibility for the consequences +1. you can do what you want with it +2. I refuse any responsibility for the consequences diff --git a/options/license/dvipdfm b/options/license/dvipdfm index be84ff406..b73cb48e4 100644 --- a/options/license/dvipdfm +++ b/options/license/dvipdfm @@ -1,3 +1 @@ -A modified version of this file may be distributed, but it should be distributed -with a *different* name. Changed files must be distributed *together with -a complete and unchanged* distribution of these files. +A modified version of this file may be distributed, but it should be distributed with a *different* name. Changed files must be distributed *together with a complete and unchanged* distribution of these files. diff --git a/options/license/eGenix b/options/license/eGenix index 1b90ef5fe..9b4d30128 100644 --- a/options/license/eGenix +++ b/options/license/eGenix @@ -1,94 +1,40 @@ EGENIX.COM PUBLIC LICENSE AGREEMENT +Version 1.1.0 -Version 1.1.0 This license agreement is based on the Python CNRI License Agreement, -a widely accepted open- source license. +This license agreement is based on the Python CNRI License Agreement, a widely accepted open- source license. - 1. Introduction +1. Introduction +This "License Agreement" is between eGenix.com Software, Skills and Services GmbH ("eGenix.com"), having an office at Pastor-Loeh-Str. 48, D-40764 Langenfeld, Germany, and the Individual or Organization ("Licensee") accessing and otherwise using this software in source or binary form and its associated documentation ("the Software"). -This "License Agreement" is between eGenix.com Software, Skills and Services -GmbH ("eGenix.com"), having an office at Pastor-Loeh-Str. 48, D-40764 Langenfeld, -Germany, and the Individual or Organization ("Licensee") accessing and otherwise -using this software in source or binary form and its associated documentation -("the Software"). +2. License +Subject to the terms and conditions of this eGenix.com Public License Agreement, eGenix.com hereby grants Licensee a non-exclusive, royalty-free, world-wide license to reproduce, analyze, test, perform and/or display publicly, prepare derivative works, distribute, and otherwise use the Software alone or in any derivative version, provided, however, that the eGenix.com Public License Agreement is retained in the Software, or in any derivative version of the Software prepared by Licensee. - 2. License +3. NO WARRANTY +eGenix.com is making the Software available to Licensee on an "AS IS" basis. SUBJECT TO ANY STATUTORY WARRANTIES WHICH CAN NOT BE EXCLUDED, EGENIX.COM MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, BUT NOT LIMITATION, EGENIX.COM MAKES NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. -Subject to the terms and conditions of this eGenix.com Public License Agreement, -eGenix.com hereby grants Licensee a non-exclusive, royalty-free, world-wide -license to reproduce, analyze, test, perform and/or display publicly, prepare -derivative works, distribute, and otherwise use the Software alone or in any -derivative version, provided, however, that the eGenix.com Public License -Agreement is retained in the Software, or in any derivative version of the -Software prepared by Licensee. +4. LIMITATION OF LIABILITY +EGENIX.COM SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF ADVISED OF THE POSSIBILITY THEREOF. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE EXCLUSION OR LIMITATION MAY NOT APPLY TO LICENSEE. - 3. NO WARRANTY +5. Termination +This License Agreement will automatically terminate upon a material breach of its terms and conditions. -eGenix.com is making the Software available to Licensee on an "AS IS" basis. -SUBJECT TO ANY STATUTORY WARRANTIES WHICH CAN NOT BE EXCLUDED, EGENIX.COM -MAKES NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED. BY WAY OF EXAMPLE, -BUT NOT LIMITATION, EGENIX.COM MAKES NO AND DISCLAIMS ANY REPRESENTATION OR -WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT -THE USE OF THE SOFTWARE WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. +6. Third Party Rights +Any software or documentation in source or binary form provided along with the Software that is associated with a separate license agreement is licensed to Licensee under the terms of that license agreement. This License Agreement does not apply to those portions of the Software. Copies of the third party licenses are included in the Software Distribution. - 4. LIMITATION OF LIABILITY +7. General +Nothing in this License Agreement affects any statutory rights of consumers that cannot be waived or limited by contract. -EGENIX.COM SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF THE SOFTWARE -FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR LOSS (INCLUDING, -WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, -LOSS OF BUSINESS INFORMATION, OR OTHER PECUNIARY LOSS) AS A RESULT OF USING, -MODIFYING OR DISTRIBUTING THE SOFTWARE, OR ANY DERIVATIVE THEREOF, EVEN IF -ADVISED OF THE POSSIBILITY THEREOF. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION -OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE EXCLUSION -OR LIMITATION MAY NOT APPLY TO LICENSEE. +Nothing in this License Agreement shall be deemed to create any relationship of agency, partnership, or joint venture between eGenix.com and Licensee. - 5. Termination +If any provision of this License Agreement shall be unlawful, void, or for any reason unenforceable, such provision shall be modified to the extent necessary to render it enforceable without losing its intent, or, if no such modification is possible, be severed from this License Agreement and shall not affect the validity and enforceability of the remaining provisions of this License Agreement. -This License Agreement will automatically terminate upon a material breach -of its terms and conditions. +This License Agreement shall be governed by and interpreted in all respects by the law of Germany, excluding conflict of law provisions. It shall not be governed by the United Nations Convention on Contracts for International Sale of Goods. This License Agreement does not grant permission to use eGenix.com trademarks or trade names in a trademark sense to endorse or promote products or services of Licensee, or any third party. - 6. Third Party Rights +The controlling language of this License Agreement is English. If Licensee has received a translation into another language, it has been provided for Licensee's convenience only. -Any software or documentation in source or binary form provided along with -the Software that is associated with a separate license agreement is licensed -to Licensee under the terms of that license agreement. This License Agreement -does not apply to those portions of the Software. Copies of the third party -licenses are included in the Software Distribution. - - 7. General - -Nothing in this License Agreement affects any statutory rights of consumers -that cannot be waived or limited by contract. - -Nothing in this License Agreement shall be deemed to create any relationship -of agency, partnership, or joint venture between eGenix.com and Licensee. - -If any provision of this License Agreement shall be unlawful, void, or for -any reason unenforceable, such provision shall be modified to the extent necessary -to render it enforceable without losing its intent, or, if no such modification -is possible, be severed from this License Agreement and shall not affect the -validity and enforceability of the remaining provisions of this License Agreement. - -This License Agreement shall be governed by and interpreted in all respects -by the law of Germany, excluding conflict of law provisions. It shall not -be governed by the United Nations Convention on Contracts for International -Sale of Goods. This License Agreement does not grant permission to use eGenix.com -trademarks or trade names in a trademark sense to endorse or promote products -or services of Licensee, or any third party. - -The controlling language of this License Agreement is English. If Licensee -has received a translation into another language, it has been provided for -Licensee's convenience only. - - 8. Agreement - -By downloading, copying, installing or otherwise using the Software, Licensee -agrees to be bound by the terms and conditions of this License Agreement. -For question regarding this License Agreement, please write to: - -eGenix.com Software, Skills and Services GmbH - -Pastor-Loeh-Str. 48 - -D-40764 Langenfeld - -Germany +8. Agreement +By downloading, copying, installing or otherwise using the Software, Licensee agrees to be bound by the terms and conditions of this License Agreement. For question regarding this License Agreement, please write to: + eGenix.com Software, Skills and Services GmbH + Pastor-Loeh-Str. 48 + D-40764 Langenfeld + Germany diff --git a/options/license/etalab-2.0 b/options/license/etalab-2.0 index fcbeec262..2ba197835 100644 --- a/options/license/etalab-2.0 +++ b/options/license/etalab-2.0 @@ -1,167 +1,179 @@ -LICENCE OUVERTE / OPEN LICENCE =================================================================== +LICENCE OUVERTE / OPEN LICENCE +=================================================================== - Version 2.0 - - Avril 2017 -« RÉUTILISATION » DE L'« INFORMATION » SOUS CETTE LICENCE ------------------------------------------------------------------- + +« RÉUTILISATION » DE L’« INFORMATION » SOUS CETTE LICENCE +------------------------------------------------------------------- Le « Concédant » concède au « Réutilisateur » un droit non exclusif et gratuit -de libre « Réutilisation » de l'« Information » objet de la présente licence, -à des fins commerciales ou non, dans le monde entier et pour une durée illimitée, -dans les conditions exprimées ci-dessous. +de libre « Réutilisation » de l’« Information » objet de la présente licence, +à des fins commerciales ou non, dans le monde entier et pour une durée +illimitée, dans les conditions exprimées ci-dessous. -Le « Réutilisateur » est libre de réutiliser l'« Information » : +Le « Réutilisateur » est libre de réutiliser l’« Information » : - - de la reproduire, la copier, - -- de l'adapter, la modifier, l'extraire et la transformer, pour créer des +- de la reproduire, la copier, +- de l’adapter, la modifier, l’extraire et la transformer, pour créer des « Informations dérivées », des produits ou des services, - - de la communiquer, la diffuser, la redistribuer, la publier et la transmettre, - -- de l'exploiter à titre commercial, par exemple en la combinant avec d'autres -informations, ou en l'incluant dans son propre produit ou application. +- de l’exploiter à titre commercial, par exemple en la combinant avec d’autres +informations, ou en l’incluant dans son propre produit ou application. Sous réserve de : -- mentionner la paternité de l'« Information » : sa source (au moins le nom -du « Concédant ») et la date de dernière mise à jour de l'« Information » +- mentionner la paternité de l’« Information » : sa source (au moins le nom du +« Concédant ») et la date de dernière mise à jour de l’« Information » réutilisée. -Le « Réutilisateur » peut notamment s'acquitter de cette condition en renvoyant, -par un lien hypertexte, vers la source de « l'Information » et assurant une +Le « Réutilisateur » peut notamment s’acquitter de cette condition en renvoyant, +par un lien hypertexte, vers la source de « l’Information » et assurant une mention effective de sa paternité. Par exemple : -« Ministère de xxx - Données originales téléchargées sur http://www.data.gouv.fr/fr/datasets/xxx/, -mise à jour du 14 février 2017 ». +« Ministère de xxx - Données originales téléchargées sur +http://www.data.gouv.fr/fr/datasets/xxx/, mise à jour du 14 février 2017 ». -Cette mention de paternité ne confère aucun caractère officiel à la « Réutilisation -» de l'« Information », et ne doit pas suggérer une quelconque reconnaissance -ou caution par le « Concédant », ou par toute autre entité publique, du « -Réutilisateur » ou de sa « Réutilisation ». +Cette mention de paternité ne confère aucun caractère officiel à la +« Réutilisation » de l’« Information », et ne doit pas suggérer une quelconque +reconnaissance ou caution par le « Concédant », ou par toute autre entité +publique, du « Réutilisateur » ou de sa « Réutilisation ». -« DONNÉES À CARACTÈRE PERSONNEL » ------------------------------------------------------------------- -L'« Information » mise à disposition peut contenir des « Données à caractère -personnel » pouvant faire l'objet d'une « Réutilisation ». Si tel est le cas, +« DONNÉES À CARACTÈRE PERSONNEL » +------------------------------------------------------------------- + +L’« Information » mise à disposition peut contenir des « Données à caractère +personnel » pouvant faire l’objet d’une « Réutilisation ». Si tel est le cas, le « Concédant » informe le « Réutilisateur » de leur présence. -L'« Information » peut être librement réutilisée, dans le cadre des droits +L’« Information » peut être librement réutilisée, dans le cadre des droits accordés par la présente licence, à condition de respecter le cadre légal relatif à la protection des données à caractère personnel. -« DROITS DE PROPRIÉTÉ INTELLECTUELLE » ------------------------------------------------------------------- + +« DROITS DE PROPRIÉTÉ INTELLECTUELLE » +------------------------------------------------------------------- Il est garanti au « Réutilisateur » que les éventuels « Droits de propriété -intellectuelle » détenus par des tiers ou par le « Concédant » sur l'« Information -» ne font pas obstacle aux droits accordés par la présente licence. +intellectuelle » détenus par des tiers ou par le « Concédant » sur +l’« Information » ne font pas obstacle aux droits accordés par la présente +licence. -Lorsque le « Concédant » détient des « Droits de propriété intellectuelle -» cessibles sur l'« Information », il les cède au « Réutilisateur » de façon -non exclusive, à titre gracieux, pour le monde entier, pour toute la durée -des « Droits de propriété intellectuelle », et le « Réutilisateur » peut faire -tout usage de l'« Information » conformément aux libertés et aux conditions -définies par la présente licence. +Lorsque le « Concédant » détient des « Droits de propriété intellectuelle » +cessibles sur l’« Information », il les cède au « Réutilisateur » de façon non +exclusive, à titre gracieux, pour le monde entier, pour toute la durée des +« Droits de propriété intellectuelle », et le « Réutilisateur » peut faire tout +usage de l’« Information » conformément aux libertés et aux conditions définies +par la présente licence. -RESPONSABILITÉ ------------------------------------------------------------------- -L'« Information » est mise à disposition telle que produite ou reçue par le -« Concédant », sans autre garantie expresse ou tacite que celles prévues par -la présente licence. L'absence de défauts ou d'erreurs éventuellement contenues -dans l'« Information », comme la fourniture continue de l'« Information » -n'est pas garantie par le « Concédant ». Il ne peut être tenu pour responsable -de toute perte, préjudice ou dommage de quelque sorte causé à des tiers du -fait de la « Réutilisation ». +RESPONSABILITÉ +------------------------------------------------------------------- -Le « Réutilisateur » est seul responsable de la « Réutilisation » de l'« Information -». +L’« Information » est mise à disposition telle que produite ou reçue par le +« Concédant », sans autre garantie expresse ou tacite que celles prévues par la +présente licence. L’absence de défauts ou d’erreurs éventuellement contenues +dans l’« Information », comme la fourniture continue de l’« Information » n’est +pas garantie par le « Concédant ». Il ne peut être tenu pour responsable de +toute perte, préjudice ou dommage de quelque sorte causé à des tiers du fait de +la « Réutilisation ». + +Le « Réutilisateur » est seul responsable de la « Réutilisation » de +l’« Information ». La « Réutilisation » ne doit pas induire en erreur des tiers quant au contenu -de l'« Information », sa source et sa date de mise à jour. +de l’« Information », sa source et sa date de mise à jour. -DROIT APPLICABLE ------------------------------------------------------------------- + +DROIT APPLICABLE +------------------------------------------------------------------- La présente licence est régie par le droit français. -COMPATIBILITÉ DE LA PRÉSENTE LICENCE ------------------------------------------------------------------- + +COMPATIBILITÉ DE LA PRÉSENTE LICENCE +------------------------------------------------------------------- La présente licence a été conçue pour être compatible avec toute licence libre -qui exige au moins la mention de paternité et notamment avec la version antérieure -de la présente licence ainsi qu'avec les licences : +qui exige au moins la mention de paternité et notamment avec la version +antérieure de la présente licence ainsi qu’avec les licences : - - « Open Government Licence » (OGL) du Royaume-Uni, +- « Open Government Licence » (OGL) du Royaume-Uni, +- « Creative Commons Attribution » (CC-BY) de Creative Commons et +- « Open Data Commons Attribution » (ODC-BY) de l’Open Knowledge Foundation. - - « Creative Commons Attribution » (CC-BY) de Creative Commons et - - « Open Data Commons Attribution » (ODC-BY) de l'Open Knowledge Foundation. - -DÉFINITIONS ------------------------------------------------------------------- +DÉFINITIONS +------------------------------------------------------------------- Sont considérés, au sens de la présente licence comme : -Le « Concédant » : toute personne concédant un droit de « Réutilisation » -sur l'« Information » dans les libertés et les conditions prévues par la présente +Le « Concédant » : toute personne concédant un droit de « Réutilisation » sur +l’« Information » dans les libertés et les conditions prévues par la présente licence -L'« Information » : +L’« Information » : - toute information publique figurant dans des documents communiqués ou publiés -par une administration mentionnée au premier alinéa de l'article L.300-2 du +par une administration mentionnée au premier alinéa de l’article L.300-2 du CRPA; +- toute information mise à disposition par toute personne selon les termes et +conditions de la présente licence. -- toute information mise à disposition par toute personne selon les termes -et conditions de la présente licence. +La « Réutilisation » : l’utilisation de l’« Information » à d’autres fins que +celles pour lesquelles elle a été produite ou reçue. -La « Réutilisation » : l'utilisation de l'« Information » à d'autres fins -que celles pour lesquelles elle a été produite ou reçue. +Le « Réutilisateur »: toute personne qui réutilise les « Informations » +conformément aux conditions de la présente licence. -Le « Réutilisateur »: toute personne qui réutilise les « Informations » conformément -aux conditions de la présente licence. - -Des « Données à caractère personnel » : toute information se rapportant à -une personne physique identifiée ou identifiable, pouvant être identifiée +Des « Données à caractère personnel » : toute information se rapportant à une +personne physique identifiée ou identifiable, pouvant être identifiée directement ou indirectement. Leur « Réutilisation » est subordonnée au respect du cadre juridique en vigueur. Une « Information dérivée » : toute nouvelle donnée ou information créées -directement à partir de l'« Information » ou à partir d'une combinaison de -l'« Information » et d'autres données ou informations non soumises à cette +directement à partir de l’« Information » ou à partir d’une combinaison de +l’« Information » et d’autres données ou informations non soumises à cette licence. -Les « Droits de propriété intellectuelle » : tous droits identifiés comme -tels par le Code de la propriété intellectuelle (notamment le droit d'auteur, -droits voisins au droit d'auteur, droit sui generis des producteurs de bases -de données…). +Les « Droits de propriété intellectuelle » : tous droits identifiés comme tels +par le Code de la propriété intellectuelle (notamment le droit d’auteur, droits +voisins au droit d’auteur, droit sui generis des producteurs de bases de +données…). -À PROPOS DE CETTE LICENCE ------------------------------------------------------------------- -La présente licence a vocation à être utilisée par les administrations pour -la réutilisation de leurs informations publiques. Elle peut également être -utilisée par toute personne souhaitant mettre à disposition de l'« Information -» dans les conditions définies par la présente licence. +À PROPOS DE CETTE LICENCE +------------------------------------------------------------------- -La France est dotée d'un cadre juridique global visant à une diffusion spontanée -par les administrations de leurs informations publiques afin d'en permettre -la plus large réutilisation. +La présente licence a vocation à être utilisée par les administrations pour la +réutilisation de leurs informations publiques. Elle peut également être +utilisée par toute personne souhaitant mettre à disposition de +l’« Information » dans les conditions définies par la présente licence. -Le droit de la « Réutilisation » de l'« Information » des administrations -est régi par le code des relations entre le public et l'administration (CRPA). +La France est dotée d’un cadre juridique global visant à une diffusion +spontanée par les administrations de leurs informations publiques afin d’en +permettre la plus large réutilisation. + +Le droit de la « Réutilisation » de l’« Information » des administrations est +régi par le code des relations entre le public et l’administration (CRPA). Cette licence facilite la réutilisation libre et gratuite des informations -publiques et figure parmi les licences qui peuvent être utilisées par l'administration -en vertu du décret pris en application de l'article L.323-2 du CRPA. +publiques et figure parmi les licences qui peuvent être utilisées par +l’administration en vertu du décret pris en application de l’article L.323-2 +du CRPA. -Etalab est la mission chargée, sous l'autorité du Premier ministre, d'ouvrir -le plus grand nombre de données publiques des administrations de l'Etat et -de ses établissements publics. Elle a réalisé la Licence Ouverte pour faciliter -la réutilisation libre et gratuite de ces informations publiques, telles que -définies par l'article L321-1 du CRPA. +Etalab est la mission chargée, sous l’autorité du Premier ministre, d’ouvrir le +plus grand nombre de données publiques des administrations de l’Etat et de ses +établissements publics. Elle a réalisé la Licence Ouverte pour faciliter la +réutilisation libre et gratuite de ces informations publiques, telles que +définies par l’article L321-1 du CRPA. Cette licence est la version 2.0 de la Licence Ouverte. Etalab se réserve la faculté de proposer de nouvelles versions de la Licence -Ouverte. Cependant, les « Réutilisateurs » pourront continuer à réutiliser -les informations qu'ils ont obtenues sous cette licence s'ils le souhaitent. +Ouverte. Cependant, les « Réutilisateurs » pourront continuer à réutiliser les +informations qu’ils ont obtenues sous cette licence s’ils le souhaitent. diff --git a/options/license/freertos-exception-2.0 b/options/license/freertos-exception-2.0 index d4988d1a6..0105e9597 100644 --- a/options/license/freertos-exception-2.0 +++ b/options/license/freertos-exception-2.0 @@ -2,22 +2,18 @@ Any FreeRTOS source code, whether modified or in its original release form, or w EXCEPTION TEXT: - +Clause 1 - Clause 1 +Linking FreeRTOS statically or dynamically with other modules is making a combined work based on FreeRTOS. Thus, the terms and conditions of the GNU General Public License cover the whole combination. - Linking FreeRTOS statically or dynamically with other modules is making a combined work based on FreeRTOS. Thus, the terms and conditions of the GNU General Public License cover the whole combination. +As a special exception, the copyright holder of FreeRTOS gives you permission to link FreeRTOS with independent modules that communicate with FreeRTOS solely through the FreeRTOS API interface, regardless of the license terms of these independent modules, and to copy and distribute the resulting combined work under terms of your choice, provided that - As a special exception, the copyright holder of FreeRTOS gives you permission to link FreeRTOS with independent modules that communicate with FreeRTOS solely through the FreeRTOS API interface, regardless of the license terms of these independent modules, and to copy and distribute the resulting combined work under terms of your choice, provided that +Every copy of the combined work is accompanied by a written statement that details to the recipient the version of FreeRTOS used and an offer by yourself to provide the FreeRTOS source code (including any modifications you may have made) should the recipient request it. - + Every copy of the combined work is accompanied by a written statement that details to the recipient the version of FreeRTOS used and an offer by yourself to provide the FreeRTOS source code (including any modifications you may have made) should the recipient request it. +The combined work is not itself an RTOS, scheduler, kernel or related product. - + The combined work is not itself an RTOS, scheduler, kernel or related product. +The independent modules add significant and primary functionality to FreeRTOS and do not merely extend the existing functionality already present in FreeRTOS. - + The independent modules add significant and primary functionality to FreeRTOS and do not merely extend the existing functionality already present in FreeRTOS. +Clause 2 - - - Clause 2 - - FreeRTOS may not be used for any competitive or comparative purpose, including the publication of any form of run time or compile time metric, without the express permission of Real Time Engineers Ltd. (this is the norm within the industry and is intended to ensure information accuracy). +FreeRTOS may not be used for any competitive or comparative purpose, including the publication of any form of run time or compile time metric, without the express permission of Real Time Engineers Ltd. (this is the norm within the industry and is intended to ensure information accuracy). diff --git a/options/license/gSOAP-1.3b b/options/license/gSOAP-1.3b index 63bfadabb..d7f2704a3 100644 --- a/options/license/gSOAP-1.3b +++ b/options/license/gSOAP-1.3b @@ -1,403 +1,148 @@ gSOAP Public License -Version 1.3b The gSOAP public license is derived from the Mozilla Public License -(MPL1.1). The sections that were deleted from the original MPL1.1 text are -1.0.1, 2.1.(c),(d), 2.2.(c),(d), 8.2.(b), 10, and 11. Section 3.8 was added. -The modified sections are 2.1.(b), 2.2.(b), 3.2 (simplified), 3.5 (deleted -the last sentence), and 3.6 (simplified). +Version 1.3b -This license applies to the gSOAP software package, with the exception of -the soapcpp2 and wsdl2h source code located in gsoap/src and gsoap/wsdl, all -code generated by soapcpp2 and wsdl2h, the UDDI source code gsoap/uddi2, and -the Web server sample source code samples/webserver. To use any of these software -tools and components commercially, a commercial license is required and can -be obtained from www.genivia.com. +The gSOAP public license is derived from the Mozilla Public License (MPL1.1). The sections that were deleted from the original MPL1.1 text are 1.0.1, 2.1.(c),(d), 2.2.(c),(d), 8.2.(b), 10, and 11. Section 3.8 was added. The modified sections are 2.1.(b), 2.2.(b), 3.2 (simplified), 3.5 (deleted the last sentence), and 3.6 (simplified). - 1 DEFINITIONS. +This license applies to the gSOAP software package, with the exception of the soapcpp2 and wsdl2h source code located in gsoap/src and gsoap/wsdl, all code generated by soapcpp2 and wsdl2h, the UDDI source code gsoap/uddi2, and the Web server sample source code samples/webserver. To use any of these software tools and components commercially, a commercial license is required and can be obtained from www.genivia.com. - 1.0.1. +1 DEFINITIONS. -1.1. "Contributor" means each entity that creates or contributes to the creation -of Modifications. +1.0.1. + 1.1. "Contributor" means each entity that creates or contributes to the creation of Modifications. -1.2. "Contributor Version" means the combination of the Original Code, prior -Modifications used by a Contributor, and the Modifications made by that particular -Contributor. + 1.2. "Contributor Version" means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor. -1.3. "Covered Code" means the Original Code, or Modifications or the combination -of the Original Code, and Modifications, in each case including portions thereof. + 1.3. "Covered Code" means the Original Code, or Modifications or the combination of the Original Code, and Modifications, in each case including portions thereof. -1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted -in the software development community for the electronic transfer of data. + 1.4. "Electronic Distribution Mechanism" means a mechanism generally accepted in the software development community for the electronic transfer of data. - 1.5. "Executable" means Covered Code in any form other than Source Code. + 1.5. "Executable" means Covered Code in any form other than Source Code. -1.6. "Initial Developer" means the individual or entity identified as the -Initial Developer in the Source Code notice required by Exhibit A. + 1.6. "Initial Developer" means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A. -1.7. "Larger Work" means a work which combines Covered Code or portions thereof -with code not governed by the terms of this License. + 1.7. "Larger Work" means a work which combines Covered Code or portions thereof with code not governed by the terms of this License. - 1.8. "License" means this document. + 1.8. "License" means this document. -1.8.1. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently acquired, -any and all of the rights conveyed herein. + 1.8.1. "Licensable" means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein. -1.9. "Modifications" means any addition to or deletion from the substance -or structure of either the Original Code or any previous Modifications. When -Covered Code is released as a series of files, a Modification is: + 1.9. "Modifications" means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is: + A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications. + B. Any new file that contains any part of the Original Code, or previous Modifications. -A. Any addition to or deletion from the contents of a file containing Original -Code or previous Modifications. + 1.10. "Original Code" means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License. -B. Any new file that contains any part of the Original Code, or previous Modifications. + 1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor. -1.10. "Original Code" means Source Code of computer software code which is -described in the Source Code notice required by Exhibit A as Original Code, -and which, at the time of its release under this License is not already Covered -Code governed by this License. + 1.11. "Source Code" means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge. -1.10.1. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus claims, -in any patent Licensable by grantor. + 1.12. "You" (or "Your") means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, "You" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity. -1.11. "Source Code" means the preferred form of the Covered Code for making -modifications to it, including all modules it contains, plus any associated -interface definition files, scripts used to control compilation and installation -of an Executable, or source code differential comparisons against either the -Original Code or another well known, available Covered Code of the Contributor's -choice. The Source Code can be in a compressed or archival form, provided -the appropriate decompression or de-archiving software is widely available -for no charge. +2 SOURCE CODE LICENSE. -1.12. "You" (or "Your") means an individual or a legal entity exercising rights -under, and complying with all of the terms of, this License or a future version -of this License issued under Section 6.1. For legal entities, "You" includes -any entity which controls, is controlled by, or is under common control with -You. For purposes of this definition, "control" means (a) the power, direct -or indirect, to cause the direction or management of such entity, whether -by contract or otherwise, or (b) ownership of more than fifty percent (50%) -of the outstanding shares or beneficial ownership of such entity. +2.1. The Initial Developer Grant. +The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims: + (a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and + (b) under patents now or hereafter owned or controlled by Initial Developer, to make, have made, use and sell ("offer to sell and import") the Original Code, Modifications, or portions thereof, but solely to the extent that any such patent is reasonably necessary to enable You to utilize, alone or in combination with other software, the Original Code, Modifications, or any combination or portions thereof. + (c) + (d) - 2 SOURCE CODE LICENSE. +2.2. Contributor Grant. +Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license + (a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and + (b) under patents now or hereafter owned or controlled by Contributor, to make, have made, use and sell ("offer to sell and import") the Contributor Version (or portions thereof), but solely to the extent that any such patent is reasonably necessary to enable You to utilize, alone or in combination with other software, the Contributor Version (or portions thereof). + (c) + (d) - 2.1. The Initial Developer Grant. - -The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive -license, subject to third party intellectual property claims: - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Initial Developer to use, reproduce, modify, display, perform, sublicense -and distribute the Original Code (or portions thereof) with or without Modifications, -and/or as part of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Initial Developer, -to make, have made, use and sell ("offer to sell and import") the Original -Code, Modifications, or portions thereof, but solely to the extent that any -such patent is reasonably necessary to enable You to utilize, alone or in -combination with other software, the Original Code, Modifications, or any -combination or portions thereof. - - (c) - - (d) - - 2.2. Contributor Grant. - -Subject to third party intellectual property claims, each Contributor hereby -grants You a world-wide, royalty-free, non-exclusive license - -(a) under intellectual property rights (other than patent or trademark) Licensable -by Contributor, to use, reproduce, modify, display, perform, sublicense and -distribute the Modifications created by such Contributor (or portions thereof) -either on an unmodified basis, with other Modifications, as Covered Code and/or -as part of a Larger Work; and - -(b) under patents now or hereafter owned or controlled by Contributor, to -make, have made, use and sell ("offer to sell and import") the Contributor -Version (or portions thereof), but solely to the extent that any such patent -is reasonably necessary to enable You to utilize, alone or in combination -with other software, the Contributor Version (or portions thereof). - - (c) - - (d) - - 3 DISTRIBUTION OBLIGATIONS. - - 3.1. Application of License. - -The Modifications which You create or to which You contribute are governed -by the terms of this License, including without limitation Section 2.2. The -Source Code version of Covered Code may be distributed only under the terms -of this License or a future version of this License released under Section -6.1, and You must include a copy of this License with every copy of the Source -Code You distribute. You may not offer or impose any terms on any Source Code -version that alters or restricts the applicable version of this License or -the recipients' rights hereunder. However, You may include an additional document -offering the additional rights described in Section 3.5. - - 3.2. Availability of Source Code. - -Any Modification created by You shall be provided to the Initial Developer -in Source Code form and are subject to the terms of the License. - - 3.3. Description of Modifications. - -You must cause all Covered Code to which You contribute to contain a file -documenting the changes You made to create that Covered Code and the date -of any change. You must include a prominent statement that the Modification -is derived, directly or indirectly, from Original Code provided by the Initial -Developer and including the name of the Initial Developer in (a) the Source -Code, and (b) in any notice in an Executable version or related documentation -in which You describe the origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters. - -(a) Third Party Claims. If Contributor has knowledge that a license under -a third party's intellectual property rights is required to exercise the rights -granted by such Contributor under Sections 2.1 or 2.2, Contributor must include -a text file with the Source Code distribution titled "LEGAL" which describes -the claim and the party making the claim in sufficient detail that a recipient -will know whom to contact. If Contributor obtains such knowledge after the -Modification is made available as described in Section 3.2, Contributor shall -promptly modify the LEGAL file in all copies Contributor makes available thereafter -and shall take other steps (such as notifying appropriate mailing lists or -newsgroups) reasonably calculated to inform those who received the Covered -Code that new knowledge has been obtained. - -(b) Contributor APIs. If Contributor's Modifications include an application -programming interface and Contributor has knowledge of patent licenses which -are reasonably necessary to implement that API, Contributor must also include -this information in the LEGAL file. - -(c) Representations. Contributor represents that, except as disclosed pursuant -to Section 3.4(a) above, Contributor believes that Contributor's Modifications -are Contributor's original creation(s) and/or Contributor has sufficient rights -to grant the rights conveyed by this License. - - 3.5. Required Notices. - -You must duplicate the notice in Exhibit A in each file of the Source Code. -If it is not possible to put such notice in a particular Source Code file -due to its structure, then You must include such notice in a location (such -as a relevant directory) where a user would be likely to look for such a notice. -If You created one or more Modification(s) You may add your name as a Contributor -to the notice described in Exhibit A. You must also duplicate this License -in any documentation for the Source Code where You describe recipients' rights -or ownership rights relating to Covered Code. You may choose to offer, and -to charge a fee for, warranty, support, indemnity or liability obligations -to one or more recipients of Covered Code. However, You may do so only on -Your own behalf, and not on behalf of the Initial Developer or any Contributor. - - 3.6. Distribution of Executable Versions. - -You may distribute Covered Code in Executable form only if the requirements -of Section 3.1-3.5 have been met for that Covered Code. You may distribute -the Executable version of Covered Code or ownership rights under a license -of Your choice, which may contain terms different from this License, provided -that You are in compliance with the terms of this License and that the license -for the Executable version does not attempt to limit or alter the recipient's -rights in the Source Code version from the rights set forth in this License. -If You distribute the Executable version under a different license You must -make it absolutely clear that any terms which differ from this License are -offered by You alone, not by the Initial Developer or any Contributor. If -you distribute executable versions containing Covered Code as part of a product, -you must reproduce the notice in Exhibit B in the documentation and/or other -materials provided with the product. - - 3.7. Larger Works. - -You may create a Larger Work by combining Covered Code with other code not -governed by the terms of this License and distribute the Larger Work as a -single product. In such a case, You must make sure the requirements of this -License are fulfilled for the Covered Code. - - 3.8. Restrictions. - -You may not remove any product identification, copyright, proprietary notices -or labels from gSOAP. - - 4 INABILITY TO COMPLY DUE TO STATUTE OR REGULATION. - -If it is impossible for You to comply with any of the terms of this License -with respect to some or all of the Covered Code due to statute, judicial order, -or regulation then You must: (a) comply with the terms of this License to -the maximum extent possible; and (b) describe the limitations and the code -they affect. Such description must be included in the LEGAL file described -in Section 3.4 and must be included with all distributions of the Source Code. -Except to the extent prohibited by statute or regulation, such description -must be sufficiently detailed for a recipient of ordinary skill to be able -to understand it. - - 5 APPLICATION OF THIS LICENSE. - -This License applies to code to which the Initial Developer has attached the -notice in Exhibit A and to related Covered Code. - - 6 VERSIONS OF THE LICENSE. - - 6.1. New Versions. - -Grantor may publish revised and/or new versions of the License from time to -time. Each version will be given a distinguishing version number. - - 6.2. Effect of New Versions. - -Once Covered Code has been published under a particular version of the License, -You may always continue to use it under the terms of that version. You may -also choose to use such Covered Code under the terms of any subsequent version -of the License. - - 6.3. Derivative Works. - -If You create or use a modified version of this License (which you may only -do in order to apply it to code which is not already Covered Code governed -by this License), You must (a) rename Your license so that the phrase "gSOAP" -or any confusingly similar phrase do not appear in your license (except to -note that you license differs from this License) and (b) otherwise make it -clear that Your version of the license contains terms which differ from the -gSOAP Public License. (Filling in the name of the Initial Developer, Original -Code or Contributor in the notice described in Exhibit A shall not of themselves -be deemed to be modifications of this License.) - - 7 DISCLAIMER OF WARRANTY. - -COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY -OF ANY KIND, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, -THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, -NONINFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS, AND ANY WARRANTY -THAT MAY ARISE BY REASON OF TRADE USAGE, CUSTOM, OR COURSE OF DEALING. WITHOUT -LIMITING THE FOREGOING, YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS -IS" AND THAT THE AUTHORS DO NOT WARRANT THE SOFTWARE WILL RUN UNINTERRUPTED -OR ERROR FREE. LIMITED LIABILITY THE ENTIRE RISK AS TO RESULTS AND PERFORMANCE -OF THE SOFTWARE IS ASSUMED BY YOU. UNDER NO CIRCUMSTANCES WILL THE AUTHORS -BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL -DAMAGES OF ANY KIND OR NATURE WHATSOEVER, WHETHER BASED ON CONTRACT, WARRANTY, -TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, ARISING OUT OF -OR IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF THE AUTHORS HAVE BEEN ADVISED -ON THE POSSIBILITY OF SUCH DAMAGE OR IF SUCH DAMAGE COULD HAVE BEEN REASONABLY -FORESEEN, AND NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY EXCLUSIVE -REMEDY PROVIDED. SUCH LIMITATION ON DAMAGES INCLUDES, BUT IS NOT LIMITED TO, -DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS, LOSS OF DATA OR SOFTWARE, WORK -STOPPAGE, COMPUTER FAILURE OR MALFUNCTION OR IMPAIRMENT OF OTHER GOODS. IN -NO EVENT WILL THE AUTHORS BE LIABLE FOR THE COSTS OF PROCUREMENT OF SUBSTITUTE -SOFTWARE OR SERVICES. YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT DESIGNED FOR -USE IN ON-LINE EQUIPMENT IN HAZARDOUS ENVIRONMENTS SUCH AS OPERATION OF NUCLEAR -FACILITIES, AIRCRAFT NAVIGATION OR CONTROL, OR LIFE-CRITICAL APPLICATIONS. -THE AUTHORS EXPRESSLY DISCLAIM ANY LIABILITY RESULTING FROM USE OF THE SOFTWARE -IN ANY SUCH ON-LINE EQUIPMENT IN HAZARDOUS ENVIRONMENTS AND ACCEPTS NO LIABILITY -IN RESPECT OF ANY ACTIONS OR CLAIMS BASED ON THE USE OF THE SOFTWARE IN ANY -SUCH ON-LINE EQUIPMENT IN HAZARDOUS ENVIRONMENTS BY YOU. FOR PURPOSES OF THIS -PARAGRAPH, THE TERM "LIFE-CRITICAL APPLICATION" MEANS AN APPLICATION IN WHICH -THE FUNCTIONING OR MALFUNCTIONING OF THE SOFTWARE MAY RESULT DIRECTLY OR INDIRECTLY -IN PHYSICAL INJURY OR LOSS OF HUMAN LIFE. THIS DISCLAIMER OF WARRANTY CONSTITUTES -AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED -HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - - 8 TERMINATION. - -8.1. This License and the rights granted hereunder will terminate automatically -if You fail to comply with terms herein and fail to cure such breach within -30 days of becoming aware of the breach. All sublicenses to the Covered Code -which are properly granted shall survive any termination of this License. -Provisions which, by their nature, must remain in effect beyond the termination -of this License shall survive. - - 8.2. - -8.3. If You assert a patent infringement claim against Participant alleging -that such Participant's Contributor Version directly or indirectly infringes -any patent where such claim is resolved (such as by license or settlement) -prior to the initiation of patent infringement litigation, then the reasonable -value of the licenses granted by such Participant under Sections 2.1 or 2.2 -shall be taken into account in determining the amount or value of any payment -or license. - -8.4. In the event of termination under Sections 8.1 or 8.2 above, all end -user license agreements (excluding distributors and resellers) which have -been validly granted by You or any distributor hereunder prior to termination -shall survive termination. - - 9 LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF -ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, -OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES -FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY -AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE -BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY -SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH -PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. -SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL -OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO -YOU. - - 10 U.S. GOVERNMENT END USERS. - - 11 MISCELLANEOUS. - - 12 RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is responsible -for claims and damages arising, directly or indirectly, out of its utilization -of rights under this License and You agree to work with Initial Developer -and Contributors to distribute such responsibility on an equitable basis. -Nothing herein is intended or shall be deemed to constitute any admission -of liability. - - - - EXHIBIT A. - -"The contents of this file are subject to the gSOAP Public License Version -1.3 (the "License"); you may not use this file except in compliance with the -License. You may obtain a copy of the License at - - http://www.cs.fsu.edu/ engelen/soaplicense.html - -Software distributed under the License is distributed on an "AS IS" basis, -WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for -the specific language governing rights and limitations under the License. - -The Original Code of the gSOAP Software is: stdsoap.h, stdsoap2.h, stdsoap.c, -stdsoap2.c, stdsoap.cpp, stdsoap2.cpp, soapcpp2.h, soapcpp2.c, soapcpp2_lex.l, -soapcpp2_yacc.y, error2.h, error2.c, symbol2.c, init2.c, soapdoc2.html, and -soapdoc2.pdf, httpget.h, httpget.c, stl.h, stldeque.h, stllist.h, stlvector.h, -stlset.h. - -The Initial Developer of the Original Code is Robert A. van Engelen. Portions -created by Robert A. van Engelen are Copyright (C) 2001-2004 Robert A. van -Engelen, Genivia inc. All Rights Reserved. - - Contributor(s): - - "________________________." - -[Note: The text of this Exhibit A may differ slightly form the text of the -notices in the Source Code files of the Original code. You should use the -text of this Exhibit A rather than the text found in the Original Code Source -Code for Your Modifications.] - - - - EXHIBIT B. - - "Part of the software embedded in this product is gSOAP software. - -Portions created by gSOAP are Copyright (C) 2001-2009 Robert A. van Engelen, -Genivia inc. All Rights Reserved. - -THE SOFTWARE IN THIS PRODUCT WAS IN PART PROVIDED BY GENIVIA INC AND ANY EXPRESS -OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN -NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; -OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER -IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE." +3 DISTRIBUTION OBLIGATIONS. + +3.1. Application of License. +The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients' rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5. + +3.2. Availability of Source Code. +Any Modification created by You will be provided to the Initial Developer in Source Code form and are subject to the terms of the License. + +3.3. Description of Modifications. +You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code. + +3.4. Intellectual Property Matters. + (a) Third Party Claims. If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled "LEGAL" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained. + + (b) Contributor APIs. If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file. + + (c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License. + +3.5. Required Notices. +You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients' rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. + +3.6. Distribution of Executable Versions. +You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient's rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer or any Contributor. If you distribute executable versions containing Covered Code as part of a product, you must reproduce the notice in Exhibit B in the documentation and/or other materials provided with the product. + +3.7. Larger Works. +You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code. + +3.8. Restrictions. +You may not remove any product identification, copyright, proprietary notices or labels from gSOAP. + +4 INABILITY TO COMPLY DUE TO STATUTE OR REGULATION. + +If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it. + +5 APPLICATION OF THIS LICENSE. + +This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code. + +6 VERSIONS OF THE LICENSE. + +6.1. New Versions. +Grantor may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number. + +6.2. Effect of New Versions. +Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License. + +6.3. Derivative Works. +If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrase "gSOAP" or any confusingly similar phrase do not appear in your license (except to note that you license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the gSOAP Public License. (Filling in the name of the Initial Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.) + +7 DISCLAIMER OF WARRANTY. + +COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT OF THIRD PARTY INTELLECTUAL PROPERTY RIGHTS, AND ANY WARRANTY THAT MAY ARISE BY REASON OF TRADE USAGE, CUSTOM, OR COURSE OF DEALING. WITHOUT LIMITING THE FOREGOING, YOU ACKNOWLEDGE THAT THE SOFTWARE IS PROVIDED "AS IS" AND THAT THE AUTHORS DO NOT WARRANT THE SOFTWARE WILL RUN UNINTERRUPTED OR ERROR FREE. LIMITED LIABILITY THE ENTIRE RISK AS TO RESULTS AND PERFORMANCE OF THE SOFTWARE IS ASSUMED BY YOU. UNDER NO CIRCUMSTANCES WILL THE AUTHORS BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES OF ANY KIND OR NATURE WHATSOEVER, WHETHER BASED ON CONTRACT, WARRANTY, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, ARISING OUT OF OR IN ANY WAY RELATED TO THE SOFTWARE, EVEN IF THE AUTHORS HAVE BEEN ADVISED ON THE POSSIBILITY OF SUCH DAMAGE OR IF SUCH DAMAGE COULD HAVE BEEN REASONABLY FORESEEN, AND NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY EXCLUSIVE REMEDY PROVIDED. SUCH LIMITATION ON DAMAGES INCLUDES, BUT IS NOT LIMITED TO, DAMAGES FOR LOSS OF GOODWILL, LOST PROFITS, LOSS OF DATA OR SOFTWARE, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION OR IMPAIRMENT OF OTHER GOODS. IN NO EVENT WILL THE AUTHORS BE LIABLE FOR THE COSTS OF PROCUREMENT OF SUBSTITUTE SOFTWARE OR SERVICES. YOU ACKNOWLEDGE THAT THIS SOFTWARE IS NOT DESIGNED FOR USE IN ON-LINE EQUIPMENT IN HAZARDOUS ENVIRONMENTS SUCH AS OPERATION OF NUCLEAR FACILITIES, AIRCRAFT NAVIGATION OR CONTROL, OR LIFE-CRITICAL APPLICATIONS. THE AUTHORS EXPRESSLY DISCLAIM ANY LIABILITY RESULTING FROM USE OF THE SOFTWARE IN ANY SUCH ON-LINE EQUIPMENT IN HAZARDOUS ENVIRONMENTS AND ACCEPTS NO LIABILITY IN RESPECT OF ANY ACTIONS OR CLAIMS BASED ON THE USE OF THE SOFTWARE IN ANY SUCH ON-LINE EQUIPMENT IN HAZARDOUS ENVIRONMENTS BY YOU. FOR PURPOSES OF THIS PARAGRAPH, THE TERM "LIFE-CRITICAL APPLICATION" MEANS AN APPLICATION IN WHICH THE FUNCTIONING OR MALFUNCTIONING OF THE SOFTWARE MAY RESULT DIRECTLY OR INDIRECTLY IN PHYSICAL INJURY OR LOSS OF HUMAN LIFE. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +8 TERMINATION. + +8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive. + +8.2. + +8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license. + +8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination. + +9 LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. + +10 U.S. GOVERNMENT END USERS. + +11 MISCELLANEOUS. + +12 RESPONSIBILITY FOR CLAIMS. + +As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability. + +EXHIBIT A. + +"The contents of this file are subject to the gSOAP Public License Version 1.3 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at +http://www.cs.fsu.edu/ engelen/soaplicense.html +Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. +The Original Code of the gSOAP Software is: stdsoap.h, stdsoap2.h, stdsoap.c, stdsoap2.c, stdsoap.cpp, stdsoap2.cpp, soapcpp2.h, soapcpp2.c, soapcpp2_lex.l, soapcpp2_yacc.y, error2.h, error2.c, symbol2.c, init2.c, soapdoc2.html, and soapdoc2.pdf, httpget.h, httpget.c, stl.h, stldeque.h, stllist.h, stlvector.h, stlset.h. +The Initial Developer of the Original Code is Robert A. van Engelen. Portions created by Robert A. van Engelen are Copyright (C) 2001-2004 Robert A. van Engelen, Genivia inc. All Rights Reserved. +Contributor(s): +"________________________." +[Note: The text of this Exhibit A may differ slightly form the text of the notices in the Source Code files of the Original code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.] + +EXHIBIT B. + +"Part of the software embedded in this product is gSOAP software. +Portions created by gSOAP are Copyright (C) 2001-2009 Robert A. van Engelen, Genivia inc. All Rights Reserved. +THE SOFTWARE IN THIS PRODUCT WAS IN PART PROVIDED BY GENIVIA INC AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." diff --git a/options/license/gnu-javamail-exception b/options/license/gnu-javamail-exception index 8f3b9ab0d..6b24ec821 100644 --- a/options/license/gnu-javamail-exception +++ b/options/license/gnu-javamail-exception @@ -1 +1 @@ -As a special exception, if you link this library with other files to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License. +As a special exception, if you link this library with other files to produce an executable, this library does not by itself cause the resulting executable to be covered by the GNU General Public License. This exception does not however invalidate any other reasons why the executable file might be covered by the GNU General Public License." diff --git a/options/license/gnuplot b/options/license/gnuplot index 3fa5aa513..10bfbd424 100644 --- a/options/license/gnuplot +++ b/options/license/gnuplot @@ -1,29 +1,14 @@ Copyright 1986 - 1993, 1998, 2004 Thomas Williams, Colin Kelley -Permission to use, copy, and distribute this software and its documentation -for any purpose with or without fee is hereby granted, provided that the above -copyright notice appear in all copies and that both that copyright notice -and this permission notice appear in supporting documentation. +Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. -Permission to modify the software is granted, but not the right to distribute -the complete modified source code. Modifications are to be distributed as -patches to the released version. Permission to distribute binaries produced -by compiling modified sources is granted, provided you +Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you -1. distribute the corresponding source modifications from the released version -in the form of a patch file along with the binaries, + 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries, + 2. add special version identification to distinguish your version in addition to the base release version number, + 3. provide your name and address as the primary contact for the support of your modified version, and + 4. retain our contact information in regard to use of the base software. -2. add special version identification to distinguish your version in addition -to the base release version number, +Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions. -3. provide your name and address as the primary contact for the support of -your modified version, and - - 4. retain our contact information in regard to use of the base software. - -Permission to distribute the released version of the source code along with -corresponding source modifications in the form of a patch file is granted -with same provisions 2 through 4 for binary distributions. - -This software is provided "as is" without express or implied warranty to the -extent permitted by applicable law. +This software is provided "as is" without express or implied warranty to the extent permitted by applicable law. diff --git a/options/license/i2p-gpl-java-exception b/options/license/i2p-gpl-java-exception index 63ddd4a6f..2b7277d77 100644 --- a/options/license/i2p-gpl-java-exception +++ b/options/license/i2p-gpl-java-exception @@ -1 +1 @@ -In addition, as a special exception, XXXX gives permission to link the code of this program with the proprietary Java implementation provided by Sun (or other vendors as well), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than the proprietary Java implementation. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. +In addition, as a special exception, <> gives permission to link the code of this program with the proprietary Java implementation provided by Sun (or other vendors as well), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than the proprietary Java implementation. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. diff --git a/options/license/iMatix b/options/license/iMatix index baea40239..7689d97b3 100644 --- a/options/license/iMatix +++ b/options/license/iMatix @@ -1,78 +1,39 @@ The SFL License Agreement -This license agreement covers your use of the iMatix STANDARD FUNCTION LIBRARY -(SFL), its source code, documentation, and executable files, hereinafter referred -to as "the Product". +This license agreement covers your use of the iMatix STANDARD FUNCTION LIBRARY (SFL), its source code, documentation, and executable files, hereinafter referred to as "the Product". -The Product is Copyright (c) 1991-2000 iMatix Corporation. You may use it -and distribute it according to this following License Agreement. If you do -not agree with these terms, please remove the Product from your system. By -incorporating the Product in your work or distributing the Product to others -you implicitly agree to these license terms. +The Product is Copyright (c) 1991-2000 iMatix Corporation. You may use it and distribute it according to this following License Agreement. If you do not agree with these terms, please remove the Product from your system. By incorporating the Product in your work or distributing the Product to others you implicitly agree to these license terms. Statement Of Copyright -The Product is, and remains, Copyright © 1991-2000 iMatix Corporation, with -exception of specific copyrights as noted in the individual source files. +The Product is, and remains, Copyright © 1991-2000 iMatix Corporation, with exception of specific copyrights as noted in the individual source files. Conditions Of Use -You do not need to provide the source code for the Product as part of your -product. However, you must do one of these things to comply with the Product -License Agreement: +You do not need to provide the source code for the Product as part of your product. However, you must do one of these things to comply with the Product License Agreement: - 1. Provide the source code for Product modules that you use, or - -2. Make your product freely available according to a license similar to the -GNU General Public License, or the Perl Artistic License, or - -3. Add this phrase to the documentation for your product: "This product uses -parts of the iMatix SFL, Copyright © 1991-2000 iMatix Corporation ". + 1. Provide the source code for Product modules that you use, or + 2. Make your product freely available according to a license similar to the GNU General Public License, or the Perl Artistic License, or + 3. Add this phrase to the documentation for your product: "This product uses parts of the iMatix SFL, Copyright © 1991-2000 iMatix Corporation ". Rights Of Usage -You may freely and at no cost use the Product in any project, commercial, -academic, military, or private, so long as you respect the License Agreement. -The License Agreement does not affect any software except the Product. In -particular, any application that uses the Product does not itself fall under -the License Agreement. +You may freely and at no cost use the Product in any project, commercial, academic, military, or private, so long as you respect the License Agreement. The License Agreement does not affect any software except the Product. In particular, any application that uses the Product does not itself fall under the License Agreement. -You may modify any part of the Product, including sources and documentation, -except this License Agreement, which you may not modify. +You may modify any part of the Product, including sources and documentation, except this License Agreement, which you may not modify. -You must clearly indicate any modifications at the start of each source file. -The user of any modified Product code must know that the source file is not -original. +You must clearly indicate any modifications at the start of each source file. The user of any modified Product code must know that the source file is not original. - - -At your discretion, you may rewrite or reuse any part of the Product so that -your derived code is not obviously part of the Product. This derived code -does not fall under the Product License Agreement directly, but you must include -a credit at the start of each source file indicating the original authorship -and source of the code, and a statement of copyright as follows: - - "Parts copyright (c) 1991-2000 iMatix Corporation." +At your discretion, you may rewrite or reuse any part of the Product so that your derived code is not obviously part of the Product. This derived code does not fall under the Product License Agreement directly, but you must include a credit at the start of each source file indicating the original authorship and source of the code, and a statement of copyright as follows:"Parts copyright (c) 1991-2000 iMatix Corporation." Rights Of Distribution -You may freely distribute the Product, or any subset of the Product, by any -means. The License, in the form of the file called "LICENSE.TXT" must accompany -any such distribution. +You may freely distribute the Product, or any subset of the Product, by any means. The License, in the form of the file called "LICENSE.TXT" must accompany any such distribution. -You may charge a fee for distributing the Product, for providing a warranty -on the Product, for making modifications to the Product, or for any other -service provided in relation to the Product. You are not required to ask our -permission for any of these activities. +You may charge a fee for distributing the Product, for providing a warranty on the Product, for making modifications to the Product, or for any other service provided in relation to the Product. You are not required to ask our permission for any of these activities. -At no time will iMatix associate itself with any distribution of the Product -except that supplied from the Internet site http://www.imatix.com. +At no time will iMatix associate itself with any distribution of the Product except that supplied from the Internet site http://www.imatix.com. Disclaimer Of Warranty -The Product is provided as free software, in the hope that it will be useful. -It is provided "as-is", without warranty of any kind, either expressed or -implied, including, but not limited to, the implied warranties of merchantability -and fitness for a particular purpose. The entire risk as to the quality and -performance of the Product is with you. Should the Product prove defective, -the full cost of repair, servicing, or correction lies with you. +The Product is provided as free software, in the hope that it will be useful. It is provided "as-is", without warranty of any kind, either expressed or implied, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose. The entire risk as to the quality and performance of the Product is with you. Should the Product prove defective, the full cost of repair, servicing, or correction lies with you. diff --git a/options/license/libpng-2.0 b/options/license/libpng-2.0 index 6ccca8b79..1cc8b0deb 100644 --- a/options/license/libpng-2.0 +++ b/options/license/libpng-2.0 @@ -1,34 +1,33 @@ -PNG Reference Library License version 2 --------------------------------------- +PNG Reference Library License version 2 +--------------------------------------- - * Copyright (c) 1995-2018 The PNG Reference Library Authors. + * Copyright (c) 1995-2018 The PNG Reference Library Authors. + * Copyright (c) 2018 Cosmin Truta. + * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. + * Copyright (c) 1996-1997 Andreas Dilger. + * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. - * Copyright (c) 2018 Cosmin Truta. +The software is supplied "as is", without warranty of any kind, +express or implied, including, without limitation, the warranties +of merchantability, fitness for a particular purpose, title, and +non-infringement. In no even shall the Copyright owners, or +anyone distributing the software, be liable for any damages or +other liability, whether in contract, tort or otherwise, arising +from, out of, or in connection with the software, or the use or +other dealings in the software, even if advised of the possibility +of such damage. - * Copyright (c) 2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson. +Permission is hereby granted to use, copy, modify, and distribute +this software, or portions hereof, for any purpose, without fee, +subject to the following restrictions: - * Copyright (c) 1996-1997 Andreas Dilger. + 1. The origin of this software must not be misrepresented; you + must not claim that you wrote the original software. If you + use this software in a product, an acknowledgment in the product + documentation would be appreciated, but is not required. - * Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc. + 2. Altered source versions must be plainly marked as such, and must + not be misrepresented as being the original software. -The software is supplied "as is", without warranty of any kind, express or -implied, including, without limitation, the warranties of merchantability, -fitness for a particular purpose, title, and non-infringement. In no even -shall the Copyright owners, or anyone distributing the software, be liable -for any damages or other liability, whether in contract, tort or otherwise, -arising from, out of, or in connection with the software, or the use or other -dealings in the software, even if advised of the possibility of such damage. - -Permission is hereby granted to use, copy, modify, and distribute this software, -or portions hereof, for any purpose, without fee, subject to the following -restrictions: - -1. The origin of this software must not be misrepresented; you must not claim -that you wrote the original software. If you use this software in a product, -an acknowledgment in the product documentation would be appreciated, but is -not required. - -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. - -3. This Copyright notice may not be removed or altered from any source or -altered source distribution. + 3. This Copyright notice may not be removed or altered from any + source or altered source distribution. diff --git a/options/license/libselinux-1.0 b/options/license/libselinux-1.0 index da106afd9..d38626891 100644 --- a/options/license/libselinux-1.0 +++ b/options/license/libselinux-1.0 @@ -1,19 +1,21 @@ This library (libselinux) is public domain software, i.e. not copyrighted. -Warranty Exclusion ------------------ +Warranty Exclusion +------------------ +You agree that this software is a +non-commercially developed program that may contain "bugs" (as that +term is used in the industry) and that it may not function as intended. +The software is licensed "as is". NSA makes no, and hereby expressly +disclaims all, warranties, express, implied, statutory, or otherwise +with respect to the software, including noninfringement and the implied +warranties of merchantability and fitness for a particular purpose. -You agree that this software is a non-commercially developed program that -may contain "bugs" (as that term is used in the industry) and that it may -not function as intended. The software is licensed "as is". NSA makes no, -and hereby expressly disclaims all, warranties, express, implied, statutory, -or otherwise with respect to the software, including noninfringement and the -implied warranties of merchantability and fitness for a particular purpose. - -Limitation of Liability ----------------------- - -In no event will NSA be liable for any damages, including loss of data, lost -profits, cost of cover, or other special, incidental, consequential, direct -or indirect damages arising from the software or the use thereof, however -caused and on any theory of liability. This limitation will apply even if -NSA has been advised of the possibility of such damage. You acknowledge that -this is a reasonable allocation of risk. +Limitation of Liability +----------------------- +In no event will NSA be liable for any damages, including loss of data, +lost profits, cost of cover, or other special, incidental, +consequential, direct or indirect damages arising from the software or +the use thereof, however caused and on any theory of liability. This +limitation will apply even if NSA has been advised of the possibility +of such damage. You acknowledge that this is a reasonable allocation of +risk. diff --git a/options/license/libtiff b/options/license/libtiff index 39bba26bb..b11996b67 100644 --- a/options/license/libtiff +++ b/options/license/libtiff @@ -1,21 +1,8 @@ Copyright (c) 1988-1997 Sam Leffler - Copyright (c) 1991-1997 Silicon Graphics, Inc. -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -(i) the above copyright notices and this permission notice appear in all copies -of the software and related documentation, and (ii) the names of Sam Leffler -and Silicon Graphics may not be used in any advertising or publicity relating -to the software without the specific, prior written permission of Sam Leffler -and Silicon Graphics. +Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that (i) the above copyright notices and this permission notice appear in all copies of the software and related documentation, and (ii) the names of Sam Leffler and Silicon Graphics may not be used in any advertising or publicity relating to the software without the specific, prior written permission of Sam Leffler and Silicon Graphics. -THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, -IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY -OR FITNESS FOR A PARTICULAR PURPOSE. +THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. -IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, -INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED -OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT -OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/options/license/mpich2 b/options/license/mpich2 index 3bd57ab67..5c32b0ec1 100644 --- a/options/license/mpich2 +++ b/options/license/mpich2 @@ -1,35 +1,18 @@ COPYRIGHT -The following is a notice of limited availability of the code, and disclaimer -which must be included in the prologue of the code and in all source listings -of the code. +The following is a notice of limited availability of the code, and disclaimer which must be included in the prologue of the code and in all source listings of the code. Copyright Notice - + 2002 University of Chicago -Permission is hereby granted to use, reproduce, prepare derivative works, -and to redistribute to others. This software was authored by: +Permission is hereby granted to use, reproduce, prepare derivative works, and to redistribute to others. This software was authored by: -Argonne National Laboratory Group W. Gropp: (630) 252-4318; FAX: (630) 252-5986; -e-mail: gropp@mcs.anl.gov E. Lusk: (630) 252-7852; FAX: (630) 252-5986; e-mail: -lusk@mcs.anl.gov Mathematics and Computer Science Division Argonne National -Laboratory, Argonne IL 60439 +Argonne National Laboratory Group W. Gropp: (630) 252-4318; FAX: (630) 252-5986; e-mail: gropp@mcs.anl.gov E. Lusk: (630) 252-7852; FAX: (630) 252-5986; e-mail: lusk@mcs.anl.gov Mathematics and Computer Science Division Argonne National Laboratory, Argonne IL 60439 GOVERNMENT LICENSE -Portions of this material resulted from work developed under a U.S. Government -Contract and are subject to the following license: the Government is granted -for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable -worldwide license in this computer software to reproduce, prepare derivative -works, and perform publicly and display publicly. +Portions of this material resulted from work developed under a U.S. Government Contract and are subject to the following license: the Government is granted for itself and others acting on its behalf a paid-up, nonexclusive, irrevocable worldwide license in this computer software to reproduce, prepare derivative works, and perform publicly and display publicly. DISCLAIMER -This computer code material was prepared, in part, as an account of work sponsored -by an agency of the United States Government. Neither the United States, nor -the University of Chicago, nor any of their employees, makes any warranty -express or implied, or assumes any legal liability or responsibility for the -accuracy, completeness, or usefulness of any information, apparatus, product, -or process disclosed, or represents that its use would not infringe privately -owned rights. +This computer code material was prepared, in part, as an account of work sponsored by an agency of the United States Government. Neither the United States, nor the University of Chicago, nor any of their employees, makes any warranty express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. diff --git a/options/license/psfrag b/options/license/psfrag index a6f092662..c5c3a7773 100644 --- a/options/license/psfrag +++ b/options/license/psfrag @@ -1,9 +1,5 @@ -psfrag.dtx Copyright (C) 1996 Craig Barratt, Michael C. Grant, and David Carlisle. - +psfrag.dtx +Copyright (C) 1996 Craig Barratt, Michael C. Grant, and David Carlisle. All rights are reserved. -This system is distributed in the hope that it will be useful, but WITHOUT -ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. Don't come complaining to us if you modify this -file and it doesn't work! If this file is modified by anyone but the authors, -those changes and their authors must be explicitly stated HERE. +This system is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Don't come complaining to us if you modify this file and it doesn't work! If this file is modified by anyone but the authors, those changes and their authors must be explicitly stated HERE. diff --git a/options/license/psutils b/options/license/psutils index ed031859b..a42074185 100644 --- a/options/license/psutils +++ b/options/license/psutils @@ -1,53 +1,29 @@ -PS Utilities Package The constituent files of this package listed below are -copyright (C) 1991-1995 Angus J. C. Duggan. +PS Utilities Package -LICENSE Makefile.msc Makefile.nt Makefile.os2 - -Makefile.unix README config.h descrip.mms - -epsffit.c epsffit.man extractres.man extractres.pl - -fixdlsrps.man fixdlsrps.pl fixfmps.man fixfmps.pl - -fixmacps.man fixmacps.pl fixpsditps.man fixpsditps.pl - -fixpspps.man fixpspps.pl fixscribeps.man fixscribeps.pl - -fixtpps.man fixtpps.pl fixwfwps.man fixwfwps.pl - -fixwpps.man fixwpps.pl fixwwps.man fixwwps.pl - -getafm getafm.man includeres.man includeres.pl - -maketext patchlev.h psbook.c psbook.man - -pserror.c pserror.h psmerge.man psmerge.pl - -psnup.c psnup.man psresize.c psresize.man - -psselect.c psselect.man psspec.c psspec.h - -pstops.c pstops.man psutil.c psutil.h +The constituent files of this package listed below are copyright (C) 1991-1995 Angus J. C. Duggan. +LICENSE Makefile.msc Makefile.nt Makefile.os2 +Makefile.unix README config.h descrip.mms +epsffit.c epsffit.man extractres.man extractres.pl +fixdlsrps.man fixdlsrps.pl fixfmps.man fixfmps.pl +fixmacps.man fixmacps.pl fixpsditps.man fixpsditps.pl +fixpspps.man fixpspps.pl fixscribeps.man fixscribeps.pl +fixtpps.man fixtpps.pl fixwfwps.man fixwfwps.pl +fixwpps.man fixwpps.pl fixwwps.man fixwwps.pl +getafm getafm.man includeres.man includeres.pl +maketext patchlev.h psbook.c psbook.man +pserror.c pserror.h psmerge.man psmerge.pl +psnup.c psnup.man psresize.c psresize.man +psselect.c psselect.man psspec.c psspec.h +pstops.c pstops.man psutil.c psutil.h showchar -They may be copied and used for any purpose (including distribution as part -of a for-profit product), provided: +They may be copied and used for any purpose (including distribution as part of a for-profit product), provided: -1) The original attribution of the programs is clearly displayed in the product -and/or documentation, even if the programs are modified and/or renamed as -part of the product. +1) The original attribution of the programs is clearly displayed in the product and/or documentation, even if the programs are modified and/or renamed as part of the product. -2) The original source code of the programs is provided free of charge (except -for reasonable distribution costs). For a definition of reasonable distribution -costs, see the Gnu General Public License or Larry Wall's Artistic License -(provided with the Perl 4 kit). The GPL and Artistic License in NO WAY affect -this license; they are merely used as examples of the spirit in which it is -intended. +2) The original source code of the programs is provided free of charge (except for reasonable distribution costs). For a definition of reasonable distribution costs, see the Gnu General Public License or Larry Wall's Artistic License (provided with the Perl 4 kit). The GPL and Artistic License in NO WAY affect this license; they are merely used as examples of the spirit in which it is intended. -3) These programs are provided "as-is". No warranty or guarantee of their -fitness for any particular task is provided. Use of these programs is completely -at your own risk. +3) These programs are provided "as-is". No warranty or guarantee of their fitness for any particular task is provided. Use of these programs is completely at your own risk. -Basically, I don't mind how you use the programs so long as you acknowledge -the author, and give people the originals if they want them. +Basically, I don't mind how you use the programs so long as you acknowledge the author, and give people the originals if they want them. diff --git a/options/license/u-boot-exception-2.0 b/options/license/u-boot-exception-2.0 index 70dbb23ec..3158dade3 100644 --- a/options/license/u-boot-exception-2.0 +++ b/options/license/u-boot-exception-2.0 @@ -1,7 +1,6 @@ -GPL License Exception: +The U-Boot License Exception: Even though U-Boot in general is covered by the GPL-2.0/GPL-2.0+, this does *not* cover the so-called "standalone" applications that use U-Boot services by means of the jump table provided by U-Boot exactly for this purpose - this is merely considered normal use of U-Boot, and does *not* fall under the heading of "derived work". The header files "include/image.h" and "arch/*/include/asm/u-boot.h" define interfaces to U-Boot. Including these (unmodified) header files in another file is considered normal use of U-Boot, and does *not* fall under the heading of "derived work". - -- Wolfgang Denk diff --git a/options/license/xinetd b/options/license/xinetd index 70c0bb8e7..684e13ba3 100644 --- a/options/license/xinetd +++ b/options/license/xinetd @@ -1,42 +1,25 @@ -ORIGINAL LICENSE: This software is (c) Copyright 1992 by Panagiotis Tsirigotis +ORIGINAL LICENSE: This software is -The author (Panagiotis Tsirigotis) grants permission to use, copy, and distribute -this software and its documentation for any purpose and without fee, provided -that the above copyright notice extant in files in this distribution is not -removed from files included in any redistribution and that this copyright -notice is also included in any redistribution. +(c) Copyright 1992 by Panagiotis Tsirigotis -Modifications to this software may be distributed, either by distributing -the modified software or by distributing patches to the original software, -under the following additional terms: +The author (Panagiotis Tsirigotis) grants permission to use, copy, and distribute this software and its documentation for any purpose and without fee, provided that the above copyright notice extant in files in this distribution is not removed from files included in any redistribution and that this copyright notice is also included in any redistribution. - 1. The version number will be modified as follows: +Modifications to this software may be distributed, either by distributing the modified software or by distributing patches to the original software, under the following additional terms: -a. The first 3 components of the version number (i.e ..) -will remain unchanged. +1. The version number will be modified as follows: + a. The first 3 components of the version number (i.e ..) will remain unchanged. + b. A new component will be appended to the version number to indicate the modification level. The form of this component is up to the author of the modifications. -b. A new component will be appended to the version number to indicate the -modification level. The form of this component is up to the author of the -modifications. +2. The author of the modifications will include his/her name by appending it along with the new version number to this file and will be responsible for any wrong behavior of the modified software. -2. The author of the modifications will include his/her name by appending -it along with the new version number to this file and will be responsible -for any wrong behavior of the modified software. - -The author makes no representations about the suitability of this software -for any purpose. It is provided "as is" without any express or implied warranty. +The author makes no representations about the suitability of this software for any purpose. It is provided "as is" without any express or implied warranty. Modifications: Version: 2.1.8.7-current Copyright 1998-2001 by Rob Braun Sensor Addition Version: 2.1.8.9pre14a Copyright 2001 by Steve Grubb -This is an exerpt from an email I recieved from the original author, allowing -xinetd as maintained by me (Rob Braun), to use the higher version numbers: +This is an exerpt from an email I recieved from the original author, allowing xinetd as maintained by me (Rob Braun), to use the higher version numbers: -I appreciate your maintaining the version string guidelines as specified in -the copyright. But I did not mean them to last as long as they did. +I appreciate your maintaining the version string guidelines as specified in the copyright. But I did not mean them to last as long as they did. -So, if you want, you may use any 2.N.* (N >= 3) version string for future -xinetd versions that you release. Note that I am excluding the 2.2.* line; -using that would only create confusion. Naming the next release 2.3.0 would -put to rest the confusion about 2.2.1 and 2.1.8.*. +So, if you want, you may use any 2.N.* (N >= 3) version string for future xinetd versions that you release. Note that I am excluding the 2.2.* line; using that would only create confusion. Naming the next release 2.3.0 would put to rest the confusion about 2.2.1 and 2.1.8.*. diff --git a/options/license/xpp b/options/license/xpp index c90681560..c36660a72 100644 --- a/options/license/xpp +++ b/options/license/xpp @@ -1,44 +1,21 @@ -LICENSE FOR THE Extreme! Lab PullParser Copyright (c) 2002 The Trustees of -Indiana University. All rights reserved. +LICENSE FOR THE Extreme! Lab PullParser -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Copyright (c) 2002 The Trustees of Indiana University. All rights reserved. -1) All redistributions of source code must retain the above copyright notice, -the list of authors in the original source code, this list of conditions and -the disclaimer listed in this license; +Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -2) All redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the disclaimer listed in this license in the documentation -and/or other materials provided with the distribution; +1) All redistributions of source code must retain the above copyright notice, the list of authors in the original source code, this list of conditions and the disclaimer listed in this license; -3) Any documentation included with all redistributions must include the following -acknowledgement: +2) All redistributions in binary form must reproduce the above copyright notice, this list of conditions and the disclaimer listed in this license in the documentation and/or other materials provided with the distribution; -"This product includes software developed by the Indiana University Extreme! -Lab. For further information please visit http://www.extreme.indiana.edu/" +3) Any documentation included with all redistributions must include the following acknowledgement: -Alternatively, this acknowledgment may appear in the software itself, and -wherever such third-party acknowledgments normally appear. + "This product includes software developed by the Indiana University Extreme! Lab. For further information please visit http://www.extreme.indiana.edu/" -4) The name "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab" shall -not be used to endorse or promote products derived from this software without -prior written permission from Indiana University. For written permission, -please contact http://www.extreme.indiana.edu/. +Alternatively, this acknowledgment may appear in the software itself, and wherever such third-party acknowledgments normally appear. -5) Products derived from this software may not use "Indiana Univeristy" name -nor may "Indiana Univeristy" appear in their name, without prior written permission -of the Indiana University. Indiana University provides no reassurances that -the source code provided does not infringe the patent or any other intellectual -property rights of any other entity. Indiana University disclaims any liability -to any recipient for claims brought by any other entity based on infringement -of intellectual property rights or otherwise. +4) The name "Indiana Univeristy" and "Indiana Univeristy Extreme! Lab" shall not be used to endorse or promote products derived from this software without prior written permission from Indiana University. For written permission, please contact http://www.extreme.indiana.edu/. -LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO WARRANTIES -AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES NO WARRANTIES -AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF INFRINGEMENT OF THIRD -PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES -NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", -"TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE -RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, AND TO -THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. +5) Products derived from this software may not use "Indiana Univeristy" name nor may "Indiana Univeristy" appear in their name, without prior written permission of the Indiana University. Indiana University provides no reassurances that the source code provided does not infringe the patent or any other intellectual property rights of any other entity. Indiana University disclaims any liability to any recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. + +LICENSEE UNDERSTANDS THAT SOFTWARE IS PROVIDED "AS IS" FOR WHICH NO WARRANTIES AS TO CAPABILITIES OR ACCURACY ARE MADE. INDIANA UNIVERSITY GIVES NO WARRANTIES AND MAKES NO REPRESENTATION THAT SOFTWARE IS FREE OF INFRINGEMENT OF THIRD PARTY PATENT, COPYRIGHT, OR OTHER PROPRIETARY RIGHTS. INDIANA UNIVERSITY MAKES NO WARRANTIES THAT SOFTWARE IS FREE FROM "BUGS", "VIRUSES", "TROJAN HORSES", "TRAP DOORS", "WORMS", OR OTHER HARMFUL CODE. LICENSEE ASSUMES THE ENTIRE RISK AS TO THE PERFORMANCE OF SOFTWARE AND/OR ASSOCIATED MATERIALS, AND TO THE PERFORMANCE AND VALIDITY OF INFORMATION GENERATED USING SOFTWARE. diff --git a/options/license/zlib-acknowledgement b/options/license/zlib-acknowledgement index fa01c0415..cf95431f2 100644 --- a/options/license/zlib-acknowledgement +++ b/options/license/zlib-acknowledgement @@ -1,26 +1,15 @@ Copyright (c) 2002-2007 Charlie Poole - Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov - Copyright (c) 2000-2002 Philip A. Craig -This software is provided 'as-is', without any express or implied warranty. -In no event will the authors be held liable for any damages arising from the -use of this software. +This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. -Permission is granted to anyone to use this software for any purpose, including -commercial applications, and to alter it and redistribute it freely, subject -to the following restrictions: +Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: -1. The origin of this software must not be misrepresented; you must not claim -that you wrote the original software. If you use this software in a product, -an acknowledgment (see the following) in the product documentation is required. +1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment (see the following) in the product documentation is required. -Portions Copyright (c) 2002-2007 Charlie Poole or Copyright (c) 2002-2004 -James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright (c) 2000-2002 -Philip A. Craig + Portions Copyright (c) 2002-2007 Charlie Poole or Copyright (c) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov or Copyright (c) 2000-2002 Philip A. Craig -2. Altered source versions must be plainly marked as such, and must not be -misrepresented as being the original software. +2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. +3. This notice may not be removed or altered from any source distribution. diff --git a/options/locale/locale_bg-BG.ini b/options/locale/locale_bg-BG.ini index 2c64ec379..451cd8bec 100644 --- a/options/locale/locale_bg-BG.ini +++ b/options/locale/locale_bg-BG.ini @@ -82,6 +82,7 @@ loading=Зареждане… error404=Страницата, която се опитвате да достъпите, не съществува или не сте оторизирани да я достъпите. + [error] [startpage] @@ -249,7 +250,6 @@ openid_connect_submit=Свързване openid_connect_title=Свързване към съществуващ профил openid_register_title=Създай нов акаунт openid_signin_desc=Въведете вашето OpenID URI. Например: https://anne.me, bob.openid.org.cn или gnusocial.net/carry. -disable_forgot_password_mail=Възстановяването на профили е изключено. Моля обърнете се към администратора на сайта. authorize_application=Оторизиране на приложение authorize_redirect_notice=Ще бъдете пренасочени към %s ако оторизирате това приложение. authorize_application_created_by=Това приложение е създадено от %s. @@ -258,12 +258,22 @@ authorization_failed=Оторизацията беше неуспешна sspi_auth_failed=SSPI удостоверяването беше неуспешно [mail] + activate_account=Моля активирайте Вашия профил + activate_email=Провери адрес на ел. поща -reset_password=Възстановете акаунта си -register_success=Успешна регистрация + register_notify=Добре дошли в Gitea +reset_password=Възстановете акаунта си + +register_success=Успешна регистрация + + + + + + [modal] yes=Да no=Не @@ -479,6 +489,7 @@ delete_account_title=Изтриване на потребителски акау email_notifications.disable=Изключване на известията по имейл + [repo] owner=Притежател repo_name=Име на хранилището @@ -506,6 +517,7 @@ pick_reaction=Подберете реакцията си language_other=Друго + template.git_hooks=Git куки template.avatar=Аватар @@ -721,9 +733,7 @@ issues.unlock_confirm=Отключване issues.lock.notice_1=-Други потребители не могат да добавят нови коментари по този въпрос. issues.lock.reason=Причина за заключване issues.tracker=Тракер на време -issues.start_tracking_short=Начало issues.tracker_auto_close=Таймерът ще бъде спрян автоматично, когато билетът бъде затворен -issues.stop_tracking=Спиране issues.add_time_short=Добави време issues.add_time_cancel=Отказ issues.add_time_history=`добави прекарано време %s` @@ -731,7 +741,6 @@ issues.del_time_history=`изтрий прекарано време %s` issues.add_time_hours=Часа issues.add_time_minutes=Минути issues.add_time_sum_to_small=Няма въведено време. -issues.cancel_tracking=Отказ issues.due_date_form=гггг-мм-дд issues.due_date_form_add=Добави краен срок issues.due_date_form_edit=Редакция @@ -750,6 +759,7 @@ issues.review.show_outdated=Покажи остарели issues.review.hide_outdated=Скрий остарели issues.assignee.error=Не всички изпълнители бяха добавени поради неочаквана грешка. + pulls.new=Нова заявка за сливане pulls.compare_base=слей в pulls.filter_branch=Филтър по клон @@ -770,7 +780,6 @@ pulls.merged_as=Тази заявка за сливане е била обеди pulls.is_closed=Тази заявка за сливане е затворена. pulls.has_merged=Тази заявка за сливане е обединена. pulls.title_wip_desc=`Започнете заглавието с %s, за да предотвратите случайно обединяване на заявката за сливане.` -pulls.cannot_merge_work_in_progress=Тази завка за сливане е отбелязане като работа в прогрес. Премахнете %s представката от заглавието, когато е готова pulls.can_auto_merge_desc=Може да се извърши обединяване на тази заявка за сливане. pulls.num_conflicting_files_1=%d конфликтен файл pulls.num_conflicting_files_n=%d конфликтни файлове @@ -778,7 +787,6 @@ pulls.num_conflicting_files_n=%d конфликтни файлове pulls.no_merge_desc=Тази заявка за сливане не може да бъде обединена, защото всички опции за обединяване на хранилището са изключени. pulls.no_merge_helper=Включете опции за сливане в настройките на хранилището или обединете заявката за сливане ръчно. pulls.no_merge_wip=Тази заявка за сливане не може да бъде обединена, защото е отбелязана като работа в прогрес. -pulls.merge_pull_request=Обедини заявка за сливане ; %[2]s
    %[3]s
    pulls.status_checks_success=Всички проверявания бяха успешни pulls.update_branch=Осъвременяване на клона @@ -873,9 +881,9 @@ settings.tracker_issue_style.alphanumeric=Символен settings.danger_zone=Опасна зона settings.new_owner_has_same_repo=Новият притежател вече има хранилище със същото име. Изберете друго име. settings.transfer=Прехвърли притежание +settings.transfer_owner=Нов притежател settings.delete=Изтрий това хранилище settings.delete_notices_1=- Тази операция НЕ МОЖЕ да бъде отменена в последствие. -settings.transfer_owner=Нов притежател settings.add_collaborator=Добавяне на сътрудник settings.delete_collaborator=Премахване settings.search_user_placeholder=Търсене на потребител… @@ -966,8 +974,10 @@ branch.create_from=от '%s' branch.deleted_by=Изтрито от %s branch.included=Включено + topic.done=Готово + [org] org_name_holder=Име на организацията org_full_name_holder=Пълно име на организацията @@ -1116,7 +1126,6 @@ auths.smtp_auth=SMTP удостоверяване auths.smtphost=SMTP сървър auths.smtpport=SMTP порт auths.allowed_domains=Разрешени домейни -auths.enable_tls=Включи TLS криптиране auths.skip_tls_verify=Пропусни проверка на TLS сертификат auths.pam_service_name=Име на PAM услуга auths.oauth2_profileURL=URL адрес на профила diff --git a/options/locale/locale_cs-CZ.ini b/options/locale/locale_cs-CZ.ini index 28a17bf88..622117df1 100644 --- a/options/locale/locale_cs-CZ.ini +++ b/options/locale/locale_cs-CZ.ini @@ -15,6 +15,7 @@ page=Strana template=Šablona language=Jazyk notifications=Oznámení +active_stopwatch=Aktivní sledování času create_new=Vytvořit… user_profile_and_more=Profily a nastavení… signed_in_as=Přihlášen jako @@ -75,12 +76,14 @@ pull_requests=Požadavky na natažení issues=Úkoly milestones=Milníky +ok=OK cancel=Zrušit save=Uložit add=Přidat add_all=Přidat vše remove=Odstranit remove_all=Odstranit vše +edit=Upravit write=Zapsat preview=Náhled @@ -89,11 +92,16 @@ loading=Načítá se… step1=Krok 1: step2=Krok 2: +error=Chyba error404=Stránka, kterou se snažíte zobrazit, buď neexistuje, nebo nemáte oprávnění ji zobrazit. +never=Nikdy + [error] occurred=Nastala chyba report_message=Pokud jste si jisti, že se jedná o chybu Gitea, prosím vyhledejte problém na GitHub a v případě potřeby otevřete nový problém. +missing_csrf=Špatný požadavek: Neexistuje CSRF token +invalid_csrf=Špatný požadavek: Neplatný CSRF token [startpage] app_desc=Snadno přístupný vlastní Git @@ -203,6 +211,8 @@ default_enable_timetracking=Povolit sledování času ve výchozím nastavení default_enable_timetracking_popup=Povolí sledování času pro nové repozitáře. no_reply_address=Skrytá e-mailová doména no_reply_address_helper=Název domény pro uživatele se skrytou e-mailovou adresou. Příklad: Pokud je název skryté e-mailové domény nastaven na „noreply.example.org“, uživatelské jméno „joe“ bude zaznamenáno v Gitu jako „joe@noreply.example.org“. +password_algorithm=Hash algoritmus hesla +password_algorithm_helper=Nastavte algoritmus hashování hesla. Algoritmy mají odlišné požadavky a sílu. `argon2` používá mnoho paměti a může být nevhodný pro malé systémy. [home] uname_holder=Uživatelské jméno nebo e-mailová adresa @@ -236,6 +246,8 @@ users=Uživatelé organizations=Organizace search=Vyhledat code=Zdrojový kód +search.fuzzy=Fuzzy +search.match=Shoda repo_no_results=Nebyly nalezeny žádné odpovídající repozitáře. user_no_results=Nebyly nalezeni žádní odpovídající uživatelé. org_no_results=Nebyly nalezeny žádné odpovídající organizace. @@ -270,7 +282,7 @@ send_reset_mail=Zaslat e-mail pro obnovení účtu reset_password=Obnovení účtu invalid_code=Tento potvrzující kód je neplatný nebo mu vypršela platnost. reset_password_helper=Obnovit účet -reset_password_wrong_user=Jste přihlášen(a) jako %s, ale odkaz pro obnovení účtu je pro %s +reset_password_wrong_user=Jste přihlášen/a jako %s, ale odkaz pro obnovení účtu je pro %s password_too_short=Délka hesla musí být minimálně %d znaků. non_local_account=Externě ověřovaní uživatelé nemohou aktualizovat své heslo prostřednictvím webového rozhraní Gitea. verify=Ověřit @@ -293,7 +305,8 @@ openid_connect_desc=Zvolené OpenID URI není známé. Přidružte nový účet openid_register_title=Vytvořit nový účet openid_register_desc=Zvolené OpenID URI není známé. Přidružte nový účet zde. openid_signin_desc=Zadejte své OpenID URI. Například: https://anne.me, bob.openid.org.cn nebo gnusocial.net/carry. -disable_forgot_password_mail=Obnovení účtu je zakázané. Prosíme, kontaktujte správce systému. +disable_forgot_password_mail=Obnovení účtu je zakázáno, protože není nastaven žádný e-mail. Obraťte se na správce webu. +disable_forgot_password_mail_admin=Obnovení účtu je dostupné pouze po nastavení e-mailu. Pro povolení obnovy účtu nastavte prosím e-mail. email_domain_blacklisted=Nemůžete se registrovat s vaší e-mailovou adresou. authorize_application=Autorizovat aplikaci authorize_redirect_notice=Budete přesměrováni na %s, pokud autorizujete tuto aplikaci. @@ -307,11 +320,49 @@ password_pwned=Heslo, které jste zvolili, je na nastavte své heslo. + +reset_password=Obnovit váš účet +reset_password.text=Klikněte prosím na následující odkaz pro obnovení vašeho účtu v rámci %s: + +register_success=Registrace byla úspěšná + + +issue.x_mentioned_you=@%s vás zmínil/a: +issue.action.push_1=@%[1]s nahrál/a %[3]d commit do %[2]s +issue.action.push_n=@%[1]s nahrál/a %[3]d commity do %[2]s +issue.action.close=@%[1]s uzavřel/a #%[2]d. +issue.in_tree_path=V %s: + +release.new.subject=%s v %s vydáno +release.title=Název: %s +release.note=Poznámka: +release.downloads=Soubory ke stažení: +release.download.zip=Zdrojový kód (ZIP) +release.download.targz=Zdrojový kód (TAR.GZ) + +repo.transfer.subject_to=%s by chtěl převést „%s“ pro %s +repo.transfer.subject_to_you=%s by Vám chtěl převést „%s“ +repo.transfer.to_you=vám + +repo.collaborator.added.subject=%s vás přidal do %s [modal] yes=Ano @@ -332,9 +383,9 @@ AuthName=Název ověření AdminEmail=E-mailová adresa správce NewBranchName=Název nové větve -CommitSummary=Shrnutí revize -CommitMessage=Zpráva revize -CommitChoice=Výběr revize +CommitSummary=Shrnutí commity +CommitMessage=Zpráva commitu +CommitChoice=Výběr commitu TreeName=Cesta k souboru Content=Obsah @@ -358,6 +409,7 @@ password_not_match=Zadaná hesla nesouhlasí. lang_select_error=Vyberte jazyk ze seznamu. username_been_taken=Uživatelské jméno je již obsazeno. +username_change_not_local_user=Uživatelé, kteří jsou ověřováni jinak než lokálně, si nemohou změnit uživatelské jméno. repo_name_been_taken=Název repozitáře je již použit. repository_files_already_exist=Soubory pro tento repozitář již existují. Obraťte se na správce systému. repository_files_already_exist.adopt=Soubory pro tento repozitář již existují a mohou být pouze přijaty. @@ -378,6 +430,7 @@ password_uppercase_one=Alespoň jedno velké písmeno password_digit_one=Alespoň jedna číslice password_special_one=Alespoň jeden speciální znak (interpunkce, závorky, uvozovky, atd.) enterred_invalid_repo_name=Zadaný název repozitáře není správný. +enterred_invalid_org_name=Zadaný název organizace není správný. enterred_invalid_owner_name=Nové jméno vlastníka není správné. enterred_invalid_password=Zadané heslo není správné. user_not_exist=Tento uživatel neexistuje. @@ -404,6 +457,7 @@ repositories=Repozitáře activity=Veřejná aktivita followers=Sledující starred=Oblíbené repozitáře +watched=Sledované repozitáře projects=Projekty following=Sledovaní follow=Sledovat @@ -447,6 +501,7 @@ update_language_not_found=Jazyk „%s“ není k dispozici. update_profile_success=Váš profil byl aktualizován. change_username=Vaše uživatelské jméno bylo změněno. change_username_prompt=Poznámka: změna uživatelského jména změní také URL účtu. +change_username_redirect_prompt=Staré uživatelské jméno bude přesměrovávat, dokud nebude znovu obsazeno. continue=Pokračovat cancel=Zrušit language=Jazyk @@ -487,7 +542,7 @@ activate_email=Odeslat aktivaci activations_pending=Čekající aktivace delete_email=Smazat email_deletion=Odstranit e-mailovou adresu -email_deletion_desc=E-mailová adresa a přidružené informace budou z vašeho účtu odstraněny. Revize Gitu s touto e-mailovou adresou zůstanou nezměněny. Pokračovat? +email_deletion_desc=E-mailová adresa a přidružené informace budou z vašeho účtu odstraněny. Commity Gitu s touto e-mailovou adresou zůstanou nezměněny. Pokračovat? email_deletion_success=E-mailová adresa byla odstraněna. theme_update_success=Váš motiv vzhledu byl aktualizován. theme_update_error=Vybraný motiv vzhledu neexistuje. @@ -512,19 +567,27 @@ manage_gpg_keys=Správa GPG klíčů add_key=Přidat klíč ssh_desc=Tyto veřejné SSH klíče jsou propojeny s vaším účtem. Odpovídající soukromé klíče umožní plný přístup k vašim repozitářům. principal_desc=Tyto SSH Principal certifikáty jsou přidruženy k vašemu účtu a umožňují plný přístup do vašich repozitářů. -gpg_desc=Tyto veřejné GPG klíče jsou propojeny s vaším účtem. Uchovejte vaše soukromé klíče, protože umožňují ověření revizí. +gpg_desc=Tyto veřejné GPG klíče jsou propojeny s vaším účtem. Uchovejte vaše soukromé klíče, protože umožňují ověření commitů. ssh_helper=Potřebujete pomoct? Podívejte se do příručky GitHubu na to vytvoření vlastních klíčů SSH nebo vyřešte běžné problémy, se kterými se můžete potkat při použití SSH. gpg_helper=Potřebujete pomoct? Podívejte se do příručky GitHubu o GPG. add_new_key=Přidat klíč SSH add_new_gpg_key=Přidat GPG klíč -key_content_ssh_placeholder=Začíná s „ssh-ed25519“, „ssh-rsa“, „ecdsa-sha2-nistp256“, „ecdsa-sha2-nistp384“, nebo „ecdsa-sha2-nistp521“ +key_content_ssh_placeholder=Začíná s „ssh-ed25519“, „ssh-rsa“, „ecdsa-sha2-nistp256“, „ecdsa-sha2-nistp384“, „ecdsa-sha2-nistp521“, „sk-ecdsa-sha2-nistp256@openssh.com“, nebo „sk-ssh-ed25519@openssh.com“ key_content_gpg_placeholder=Začíná s „-----BEGIN PGP PUBLIC KEY BLOCK-----“ add_new_principal=Přidat SSH Principal certifikát ssh_key_been_used=Tento SSH klíč byl na server již přidán. ssh_key_name_used=SSH klíč se stejným jménem již u vašeho účtu existuje. ssh_principal_been_used=Tento SSH Principal certifikát již byl přidán na server. gpg_key_id_used=Veřejný GPG klíč se stejným ID již existuje. -gpg_no_key_email_found=Tento GPG klíč není použitelný s žádnou e-mailovou adresou propojenou s vaším účtem. +gpg_no_key_email_found=Tento GPG klíč neodpovídá žádné aktivované e-mailové adrese spojené s vaším účtem. Může být stále přidán, pokud podepíšete zadaný token. +gpg_key_matched_identities_long=Vložené identity do tohoto klíče odpovídají následujícím aktivovaným e-mailovým adresám tohoto uživatele. Commity odpovídající těmto e-mailovým adresám lze ověřit pomocí tohoto klíče. +gpg_key_verified_long=Klíč byl ověřen pomocí tokenu a může být použit k ověření commitů shodujících se s libovolnou vaší aktivovanou e-mailovou adresou pro tohoto uživatele navíc k jakékoli odpovídající identitě tohoto klíče. +gpg_key_verify=Ověřit +gpg_invalid_token_signature=Zadaný GPG klíč, podpis a token se neshodují nebo je token zastaralý. +gpg_token_required=Musíte zadat podpis pro níže uvedený token +gpg_token=Token +gpg_token_help=Podpis můžete vygenerovat pomocí: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig subkeys=Podklíče key_id=ID klíče key_name=Název klíče @@ -538,7 +601,7 @@ ssh_key_deletion=Odstraňte SSH klíč gpg_key_deletion=Odstraňte GPG klíč ssh_principal_deletion=Odstranit SSH Principal certifikát ssh_key_deletion_desc=Odstranění SSH klíče zruší jeho přístup k vašemu účtu. Pokračovat? -gpg_key_deletion_desc=Odstranění GPG klíče zneplatníte ověření revizí, které jsou jím podepsány. Pokračovat? +gpg_key_deletion_desc=Odstranění GPG klíče zneplatníte ověření commitů, které jsou jím podepsány. Pokračovat? ssh_principal_deletion_desc=Odstranění SSH Principal certifikátu zruší jeho přístup k vašemu účtu. Pokračovat? ssh_key_deletion_success=SSH klíč byl odstraněn. gpg_key_deletion_success=GPG klíč byl odstraněn. @@ -623,6 +686,7 @@ or_enter_secret=Nebo zadejte tajný kód: %s then_enter_passcode=A zadejte přístupový kód zobrazený ve vaší aplikaci: passcode_invalid=Přístupový kód není platný. Zkuste to znovu. twofa_enrolled=Ve vašem účtu bylo povoleno dvoufaktorové ověřování. Uložte si pomocný token (%s) na bezpečném místě, protože bude zobrazen pouze jednou! +twofa_failed_get_secret=Nepodařilo se získat tajemství. u2f_desc=Bezpečnostní klíče jsou hardwarová zařízení obsahující kryptografické klíče. Mohou být použity pro dvoufaktorové ověřování. Bezpečnostní klíče musí podporovat FIDO U2F standard. u2f_require_twofa=Váš účet musí mít povolené dvoufaktorové ověřování, aby bylo možné použít bezpečnostní klíč. @@ -644,6 +708,7 @@ repos_none=Nevlastníte žádné repozitáře delete_account=Smazat váš účet delete_prompt=Tato operace natrvalo odstraní váš uživatelský účet. NELZE ji vrátit zpět. +delete_with_all_comments=Váš účet je mladší než %s. Aby se zabránilo fantomovým komentářům, všechny komentáře k úkolům/požadavkům na natažení budou smazány. confirm_delete_account=Potvrdit smazání delete_account_title=Smazat uživatelský účet delete_account_desc=Jste si jisti, že chcete trvale smazat tento účet? @@ -653,7 +718,12 @@ email_notifications.onmention=E-mail pouze při zmínce email_notifications.disable=Zakázat e-mailová oznámení email_notifications.submit=Nastavit předvolby e-mailu +visibility=Viditelnost uživatele +visibility.public_tooltip=Viditelné pro všechny uživatele +visibility.limited_tooltip=Viditelné jen pro přihlášené uživatele + [repo] +new_repo_helper=Repozitář obsahuje všechny projektové soubory, včetně historie revizí. Už ho máte jinde? Migrovat repozitář. owner=Vlastník owner_helper=Některé organizace se nemusejí v seznamu zobrazit kvůli maximálnímu dosaženému počtu repozitářů. repo_name=Název repozitáře @@ -673,29 +743,47 @@ fork_repo=Rozštěpení repozitáře fork_from=Rozštěpit z fork_visibility_helper=Viditelnost rozštěpeného repozitáře nemůže být změněna. use_template=Použít tuto šablonu +download_zip=Stáhnout ZIP +download_tar=Stáhnout TAR.GZ generate_repo=Generovat repozitář generate_from=Generovat z repo_desc=Popis +repo_desc_helper=Zadejte krátký popis (volitelné) repo_lang=Jazyk repo_gitignore_helper=Vyberte šablony .gitignore. +repo_gitignore_helper_desc=Vyberte soubory, které nechcete sledovat ze seznamu šablon pro běžné jazyky. Typické artefakty generované nástroji pro sestavení každého jazyka jsou ve výchozím stavu součástí .gitignore. issue_labels=Štítky úkolů issue_labels_helper=Vyberte sadu štítků úkolů. license=Licence license_helper=Vyberte licenční soubor. +license_helper_desc=Licence řídí, co ostatní mohou a nemohou dělat s vaším kódem. Nejste si jisti, která je pro váš projekt správná? Podívejte se na Zvolte licenci readme=README readme_helper=Vyberte šablonu souboru README. +readme_helper_desc=Toto je místo, kde můžete napsat úplný popis vašeho projektu. auto_init=Inicializovat repozitář (Přidá .gitignore, License a README) +trust_model_helper=Vyberte model důvěry pro ověření podpisu. Možnosti jsou: +trust_model_helper_collaborator=Spolupracovník: Důvěřovat podpisům spolupracovníků +trust_model_helper_committer=Přispěvatel: Důvěřovat podpisům, které se shodují s přispěvateli +trust_model_helper_collaborator_committer=Spolupracovník+Přispěvatel: Důvěřovat podpisům od spolupracovníků, které odpovídají přispěvateli +trust_model_helper_default=Výchozí: Použít výchozí model důvěry pro tuto instalaci create_repo=Vytvořit repozitář default_branch=Výchozí větev +default_branch_helper=Výchozí větev je základní větev pro požadavky na natažení a commity kódu. mirror_prune=Vyčistit mirror_prune_desc=Odstranit zastaralé reference na vzdálené sledování mirror_interval=Interval zrcadlení (platné časové jednotky jsou „h“, „m“ a „s“). 0 zakáže automatickou synchronizaci. mirror_interval_invalid=Interval zrcadlení není platný. mirror_address=Klonovat z URL -mirror_address_desc=Zadejte nějaké přístupové údaje do sekce Ověření klonování. mirror_address_url_invalid=Poskytnutá URL je neplatná. Všechny komponenty musíte správně nahradit escape sekvencí. mirror_address_protocol_invalid=Zadaná URL je neplatná. Mohou být zrcadleny pouze umístění http(s):// nebo git://. +mirror_lfs=Úložiště velkých souborů (LFS) +mirror_lfs_desc=Aktivovat zrcadlení dat LFS. +mirror_lfs_endpoint=Koncový bod LFS +mirror_lfs_endpoint_desc=Synchronizace se pokusí použít URL pro klonování k určení LFS serveru. Můžete také zadat vlastní koncový bod, pokud jsou data LFS repozitáře uložena někde jinde. mirror_last_synced=Poslední synchronizace +mirror_password_placeholder=(Nezměněno) +mirror_password_blank_placeholder=(Nenastaveno) +mirror_password_help=Změňte uživatelské jméno pro vymazání uloženého hesla. watchers=Sledující stargazers=Sledující forks=Rozštěpení @@ -713,6 +801,13 @@ delete_preexisting=Odstranit již existující soubory delete_preexisting_content=Odstranit soubory v %s delete_preexisting_success=Smazány nepřijaté soubory v %s +transfer.accept=Přijmout převod +transfer.accept_desc=Převést do „%s“ +transfer.reject=Odmítnout převod +transfer.reject_desc=Zrušit převod do „%s“ +transfer.no_permission_to_accept=Nemáte oprávnění k přijetí +transfer.no_permission_to_reject=Nemáte oprávnění k odmítnutí + desc.private=Soukromý desc.public=Veřejný desc.private_template=Soukromá šablona @@ -736,15 +831,21 @@ archive.title=Tento repozitář je archivovaný. Můžete prohlížet soubory, k archive.issue.nocomment=Tento repozitář je archivovaný. Nemůžete komentovat úkoly. archive.pull.nocomment=Tento repozitář je archivovaný. Nemůžete komentovat požadavky na natažení. -form.reach_limit_of_creation=Již jste dosáhli svůj limit %d repozitářů. +form.reach_limit_of_creation_1=Již jste dosáhli svůj limit %d repozitář. +form.reach_limit_of_creation_n=Již jste dosáhli svůj limit %d repozitářů. form.name_reserved=Jméno repozitáře „%s“ je rezervované. form.name_pattern_not_allowed=Vzor „%s“ není povolený v názvu repozitáře. -need_auth=Ověření klonování +need_auth=Ověření migrate_options=Možnosti migrace migrate_service=Migrační služba migrate_options_mirror_helper=Tento repozitář bude zrcadlem migrate_options_mirror_disabled=Administrátor vašeho webu zakázal nová zrcadla. +migrate_options_lfs=Migrovat LFS soubory +migrate_options_lfs_endpoint.label=Koncový bod LFS +migrate_options_lfs_endpoint.description=Migrace se pokusí použít váš vzdálený Git pro určení LFS serveru. Můžete také zadat vlastní koncový bod, pokud jsou data LFS repozitáře uložena někde jinde. +migrate_options_lfs_endpoint.description.local=Podporována je také cesta k lokálnímu serveru. +migrate_options_lfs_endpoint.placeholder=Ponechte prázdné pro odvození z URL adresy pro klonování migrate_items=Položky pro migrování migrate_items_wiki=Wiki migrate_items_milestones=Milníky @@ -758,19 +859,18 @@ migrate.clone_address=Migrovat / klonovat z URL migrate.clone_address_desc=HTTP(S) nebo URL pro klonování existujícího repozitáře migrate.clone_local_path=nebo místní cesta serveru migrate.permission_denied=Není dovoleno importovat místní repozitáře. +migrate.permission_denied_blocked=Nemáte oprávnění provést import z blokovaných serverů. +migrate.permission_denied_private_ip=Nemáte oprávnění provést import ze soukromých IP adres. migrate.invalid_local_path=Místní cesta je neplatná, buď neexistuje nebo není adresářem. +migrate.invalid_lfs_endpoint=Koncový bod LFS není platný. migrate.failed=Přenesení selhalo: %v -migrate.lfs_mirror_unsupported=Zrcadlení LFS objektů není podporováno - použijte místo toho „git lfs fetch --all“ a „git lfs push --all“. migrate.migrate_items_options=Pro migraci dalších položek je vyžadován přístupový token migrated_from=Migrováno z %[2]s migrated_from_fake=Migrováno z %[1]s migrate.migrate=Migrovat z %s migrate.migrating=Probíhá migrace z %s ... migrate.migrating_failed=Migrace z %s se nezdařila. -migrate.github.description=Migrace dat z Github.com nebo Github Enterprise. -migrate.git.description=Migrace nebo zrcadlení git dat ze služeb Git -migrate.gitlab.description=Migrace dat z GitLab.com nebo vlastního gitlab serveru. -migrate.gitea.description=Migrace dat ze serveru Gitea.com nebo vlastního serveru Gitea. +migrate.migrating_failed.error=Chyba: %s mirror_from=zrcadlo forked_from=rozštěpen z @@ -798,11 +898,12 @@ push_exist_repo=Nahrání existujícího repozitáře z příkazové řádky empty_message=Tento repozitář nemá žádný obsah. code=Zdrojový kód -code.desc=Přístup ke zdrojovým kódům, souborům, revizím a větvím. +code.desc=Přístup ke zdrojovým kódům, souborům, commitům a větvím. branch=Větev tree=Strom clear_ref=`Vymazat aktuální referenci" filter_branch_and_tag=Filtr pro větev nebo značku +find_tag=Najít značku branches=Větve tags=Značky issues=Úkoly @@ -813,14 +914,16 @@ org_labels_desc=Štítky na úrovni organizace, které mohou být použity se “ editor.add=Přidat „%s“ editor.update=Aktualizovat „%s“ editor.delete=Smazat „%s“ editor.commit_message_desc=Přidat volitelný rozšířený popis… -editor.commit_directly_to_this_branch=Uložte změny revize přímo do větve %s. -editor.create_new_branch=Vytvořit novou větev pro tuto revizi a spustit požadavek na natažení. -editor.create_new_branch_np=Vytvořte novou větev z této revize. +editor.signoff_desc=Přidat Signed-off-by podpis přispěvatele na konec zprávy o commitu. +editor.commit_directly_to_this_branch=Odevzdat přímo do větve %s. +editor.create_new_branch=Vytvořit novou větev pro tento commit a spustit požadavek na natažení. +editor.create_new_branch_np=Vytvořte novou větev z tohoto commitu. editor.propose_file_change=Navrhnout změnu souboru editor.new_branch_name_desc=Název nové větve… editor.cancel=Zrušit @@ -879,7 +983,7 @@ editor.file_editing_no_longer_exists=Upravovaný soubor „%s“ již není sou editor.file_deleting_no_longer_exists=Odstraňovaný soubor „%s“ již není součástí tohoto repozitáře. editor.file_changed_while_editing=Obsah souboru byl změněn od doby, kdy jste začaly s úpravou. Klikněte zde, abyste je zobrazili, nebo potvrďte změny ještě jednou pro jejich přepsání. editor.file_already_exists=Soubor „%s“ již existuje v tomto repozitáři. -editor.commit_empty_file_header=Potvrďte prázdný soubor +editor.commit_empty_file_header=Odevzdat prázdný soubor editor.commit_empty_file_text=Soubor, který se chystáte odevzdat, je prázdný. Pokračovat? editor.no_changes_to_show=Žádné změny k zobrazení. editor.fail_to_update_file=Nepodařilo se aktualizovat/vytvořit soubor „%s“. @@ -891,15 +995,16 @@ editor.add_subdir=Přidat adresář… editor.unable_to_upload_files=Nepodařilo se nahrát soubor „%s“. Chyba: %v editor.upload_file_is_locked=Soubor '%s' uzamkl %s. editor.upload_files_to_dir=Nahrát soubory do „%s“ -editor.cannot_commit_to_protected_branch=Nelze vytvořit revizi v chráněné větvi „%s“. +editor.cannot_commit_to_protected_branch=Nelze vytvořit commit v chráněné větvi „%s“. editor.no_commit_to_branch=Nelze odevzdat přímo do větve, protože: editor.user_no_push_to_branch=Uživatel nemůže nahrávat do větve -editor.require_signed_commit=Větev vyžaduje podepsané revize +editor.require_signed_commit=Větev vyžaduje podepsaný commit commits.desc=Procházet historii změn zdrojového kódu. -commits.commits=Revize -commits.no_commits=Žádné společné revize. '%s' a '%s' mají zcela odlišnou historii. -commits.search=Hledání revizí… +commits.commits=Commity +commits.no_commits=Žádné společné commity. '%s' a '%s' mají zcela odlišnou historii. +commits.nothing_to_compare=Tyto větve jsou stejné. +commits.search=Hledání commitů… commits.search.tooltip=Můžete předřadit klíčová slova s „author:“, „committer:“, „after:“ nebo „before:“, např. „revert author:Alice before:2019-04-01“. commits.find=Vyhledat commits.search_all=Všechny větve @@ -910,7 +1015,7 @@ commits.older=Starší commits.newer=Novější commits.signed_by=Podepsáno commits.signed_by_untrusted_user=Podepsáno nedůvěryhodným uživatelem -commits.signed_by_untrusted_user_unmatched=Podepsáno nedůvěryhodným uživatelem, který nesouhlasí s tvůrcem revize +commits.signed_by_untrusted_user_unmatched=Podepsáno nedůvěryhodným uživatelem, který nesouhlasí s přispěvatelem commits.gpg_key_id=ID GPG klíče ext_issues=Ext. úkoly @@ -918,6 +1023,8 @@ ext_issues.desc=Odkaz na externí systém úkolů. projects=Projekty projects.desc=Spravovat úkoly a požadavky na natažení na projektových nástěnkách. +projects.description=Popis (volitelné) +projects.description_placeholder=Popis projects.create=Vytvořit projekt projects.title=Název projects.new=Nový projekt @@ -941,6 +1048,8 @@ projects.board.edit_title=Název nástěnky projects.board.new_title=Název nové nástěnky projects.board.new_submit=Odeslat projects.board.new=Nová nástěnka +projects.board.set_default=Nastavit jako výchozí +projects.board.set_default_desc=Nastavit tuto nástěnku jako výchozí pro nekategorizované úkoly a požadavky na natažení projects.board.delete=Smazat nástěnku projects.board.deletion_desc=Smazáním projektové nástěnky přesune všechny související problémy do kategorie „Nezařazené“. Pokračovat? projects.open=Otevřít @@ -991,25 +1100,25 @@ issues.label_templates.info=Neexistují žádné štítky. Vytvořte štítek po issues.label_templates.helper=Vyberte sadu značek issues.label_templates.use=Použít sadu štítků issues.label_templates.fail_to_load_file=Nepodařilo se nahrát soubor šablony značek „%s“: %v -issues.add_label=přidal(a) %s štítek %s -issues.add_labels=přidal(a) %s štítky %s -issues.remove_label=odstranil(a) %s štítek %s -issues.remove_labels=odstranil(a) %s štítky %s +issues.add_label=přidal/a %s štítek %s +issues.add_labels=přidal/a %s štítky %s +issues.remove_label=odstranil/a %s štítek %s +issues.remove_labels=odstranil/a %s štítky %s issues.add_remove_labels=přidáno %s a odebráno %s štítků %s -issues.add_milestone_at=`přidal(a) toto do milníku %s %s` -issues.add_project_at=`přidal(a) toto do projektu %s %s` -issues.change_milestone_at=`upravil(a) milník z %s na %s %s` -issues.change_project_at=`upravil(a) projekt z %s na %s %s` -issues.remove_milestone_at=`odstranil(a) toto z milníku %s %s` -issues.remove_project_at=`odstranil(a) toto z projektu %s %s` +issues.add_milestone_at=`přidal/a toto do milníku %s %s` +issues.add_project_at=`přidal/a toto do projektu %s %s` +issues.change_milestone_at=`upravil/a milník z %s na %s %s` +issues.change_project_at=`upravil/a projekt z %s na %s %s` +issues.remove_milestone_at=`odstranil/a toto z milníku %s %s` +issues.remove_project_at=`odstranil/a toto z projektu %s %s` issues.deleted_milestone=`(odstraněno)` issues.deleted_project=`(odstraněno)` -issues.self_assign_at=`přiřadil(a) sobě toto %s` +issues.self_assign_at=`přiřadil/a sobě toto %s` issues.add_assignee_at=`byl přiřazen %s %s` issues.remove_assignee_at=`byl odstraněn z přiřazení %s %s` -issues.remove_self_assignment=`odstranil(a) jejich přiřazení %s` -issues.change_title_at=`změnil(a) název z %s na %s %s` -issues.delete_branch_at=`odstranil(a) větev %s %s` +issues.remove_self_assignment=`odstranil/a jejich přiřazení %s` +issues.change_title_at=`změnil/a název z %s na %s %s` +issues.delete_branch_at=`odstranil/a větev %s %s` issues.open_tab=%d otevřených issues.close_tab=%d zavřených issues.filter_label=Štítek @@ -1024,6 +1133,7 @@ issues.filter_type.all_issues=Všechny úkoly issues.filter_type.assigned_to_you=Přiřazené vám issues.filter_type.created_by_you=Vytvořené vámi issues.filter_type.mentioning_you=Zmiňující vás +issues.filter_type.review_requested=Požadováno posouzení issues.filter_sort=Seřadit issues.filter_sort.latest=Nejnovější issues.filter_sort.oldest=Nejstarší @@ -1059,24 +1169,26 @@ issues.commented_at=`okomentoval %s` issues.delete_comment_confirm=Jste si jist, že chcete smazat tento komentář? issues.context.copy_link=Kopírovat odkaz issues.context.quote_reply=Citovat odpověď +issues.context.reference_issue=Odkázat v novém úkolu issues.context.edit=Upravit issues.context.delete=Smazat issues.no_content=Není zde žádný obsah. issues.close_issue=Zavřít -issues.pull_merged_at=`sloučil(a) revizi %[2]s do %[3]s %[4]s` +issues.pull_merged_at=`sloučil/a commit %[2]s do %[3]s %[4]s` +issues.manually_pull_merged_at=`sloučil/a commit %[2]s do %[3]s ručně %[4]s` issues.close_comment_issue=Okomentovat a zavřít issues.reopen_issue=Znovuotevřít issues.reopen_comment_issue=Okomentovat a znovuotevřít issues.create_comment=Okomentovat -issues.closed_at=`uzavřel(a) tento úkol %[2]s` -issues.reopened_at=`znovuotevřel(a) tento úkol %[2]s` -issues.commit_ref_at=`odkázal na tento úkol z revize %[2]s` -issues.ref_issue_from=`odkazoval(a) na tento úkol %[4]s %[2]s` -issues.ref_pull_from=`odkazoval(a) na tento požadavek na natažení %[4]s %[2]s` -issues.ref_closing_from=`odkazoval(a) na požadavek na natažení %[4]s, který uzavře tento úkol %[2]s` -issues.ref_reopening_from=`odkazoval(a) na požadavek na natažení %[4]s, který znovu otevře tento úkol %[2]s` -issues.ref_closed_from=`uzavřel(a) tento úkol %[4]s %[2]s` -issues.ref_reopened_from=`znovu otevřel(a) tento úkol %[4]s %[2]s` +issues.closed_at=`uzavřel/a tento úkol %[2]s` +issues.reopened_at=`znovuotevřel/a tento úkol %[2]s` +issues.commit_ref_at=`odkázal na tento úkol z commitu %[2]s` +issues.ref_issue_from=`odkazoval/a na tento úkol %[4]s %[2]s` +issues.ref_pull_from=`odkazoval/a na tento požadavek na natažení %[4]s %[2]s` +issues.ref_closing_from=`odkazoval/a na požadavek na natažení %[4]s, který uzavře tento úkol %[2]s` +issues.ref_reopening_from=`odkazoval/a na požadavek na natažení %[4]s, který znovu otevře tento úkol %[2]s` +issues.ref_closed_from=`uzavřel/a tento úkol %[4]s %[2]s` +issues.ref_reopened_from=`znovu otevřel/a tento úkol %[4]s %[2]s` issues.ref_from=`z %[1]s` issues.poster=Autor issues.collaborator=Spolupracovník @@ -1085,6 +1197,8 @@ issues.re_request_review=Znovu požádat o posouzení issues.is_stale=Od tohoto posouzení došlo ke změnám v tomto požadavku na natažení issues.remove_request_review=Odstranit žádost o posouzení issues.remove_request_review_block=Nelze odstranit žádost o posouzení +issues.dismiss_review=Zamítnout posouzení +issues.dismiss_review_warning=Jste si jisti, že chcete zamítnout toto posouzení? issues.sign_in_require_desc=Přihlaste se pro zapojení do konverzace. issues.edit=Upravit issues.cancel=Zrušit @@ -1114,9 +1228,9 @@ issues.unlock=Odemknout konverzaci issues.lock.unknown_reason=Úkol nelze z neznámého důvodu uzamknout. issues.lock_duplicate=Úkol nemůže být uzamčený dvakrát. issues.unlock_error=Nelze odemknout úkol, který je uzamčený. -issues.lock_with_reason=uzamkl(a) jako %s a omezil(a) konverzaci na spolupracovníky %s -issues.lock_no_reason=uzamkl(a) a omezil(a) konverzaci na spolupracovníky %s -issues.unlock_comment=odemkl(a) tuto konverzaci %s +issues.lock_with_reason=uzamkl/a jako %s a omezil/a konverzaci na spolupracovníky %s +issues.lock_no_reason=uzamkl/a a omezil/a konverzaci na spolupracovníky %s +issues.unlock_comment=odemkl/a tuto konverzaci %s issues.lock_confirm=Uzamknout issues.unlock_confirm=Odemknout issues.lock.notice_1=- Další uživatelé nemohou komentovat tento úkol. @@ -1129,41 +1243,42 @@ issues.lock.title=Uzamknout konverzaci u tohoto úkolu. issues.unlock.title=Odemknout konverzaci u tohoto úkolu. issues.comment_on_locked=Nemůžete komentovat uzamčený úkol. issues.tracker=Sledování času -issues.start_tracking_short=Start +issues.start_tracking_short=Spustit časovač issues.start_tracking=Spustit sledování času -issues.start_tracking_history=`započal(a) práci %s` +issues.start_tracking_history=`započal/a práci %s` issues.tracker_auto_close=Časovač se automaticky zastaví po zavření tohoto úkolu issues.tracking_already_started=`Již jste spustili sledování času na jiném úkolu!` -issues.stop_tracking=Stop -issues.stop_tracking_history=`ukončil(a) práci %s` +issues.stop_tracking=Zastavit časovač +issues.stop_tracking_history=`ukončil/a práci %s` +issues.cancel_tracking=Zahodit +issues.cancel_tracking_history=`zrušil/a sledování času %s` issues.add_time=Přidat čas ručně +issues.del_time=Odstranit tento časový záznam issues.add_time_short=Přidat čas issues.add_time_cancel=Zrušit -issues.add_time_history=`přidal(a) strávený čas %s` -issues.del_time_history=`odstranil(a) strávený čas %s` +issues.add_time_history=`přidal/a strávený čas %s` +issues.del_time_history=`odstranil/a strávený čas %s` issues.add_time_hours=Hodiny issues.add_time_minutes=Minuty issues.add_time_sum_to_small=Čas nebyl zadán. -issues.cancel_tracking=Zrušit -issues.cancel_tracking_history=`zrušil(a) sledování času %s` issues.time_spent_total=Celkový strávený čas issues.time_spent_from_all_authors=`Celkový strávený čas: %s` issues.due_date=Termín dokončení issues.invalid_due_date_format=Termín dokončení musí být ve formátu 'rrrr-mm-dd'. issues.error_modifying_due_date=Změna termínu dokončení selhala. issues.error_removing_due_date=Odstranění termínu dokončení selhalo. -issues.push_commit_1=přidal(a) %d revizi %s -issues.push_commits_n=přidal(a) %d revize %s -issues.force_push_codes=`vynucené nahrání %[1]s z %[2]s do %[4]s %[6]s` +issues.push_commit_1=přidal/a %d commit %s +issues.push_commits_n=přidal/a %d commity %s +issues.force_push_codes=`vynucené nahrání %[1]s od %[2]s do %[4]s %[6]s` issues.due_date_form=rrrr-mm-dd issues.due_date_form_add=Přidat termín dokončení issues.due_date_form_edit=Upravit issues.due_date_form_remove=Odstranit issues.due_date_not_writer=Potřebujete práva na zápis do repozitáře pro úpravy termínu dokončení úkolu. issues.due_date_not_set=Žádný termín dokončení. -issues.due_date_added=přidal(a) termín dokončení %s %s -issues.due_date_modified=upravil(a) termín dokončení z %s na %s %s -issues.due_date_remove=odstranil(a) termín dokončení %s %s +issues.due_date_added=přidal/a termín dokončení %s %s +issues.due_date_modified=upravil/a termín dokončení z %s na %s %s +issues.due_date_remove=odstranil/a termín dokončení %s %s issues.due_date_overdue=Zpožděné issues.due_date_invalid=Termín dokončení není platný nebo je mimo rozsah. Použijte prosím formát „rrrr-mm-dd“. issues.dependency.title=Závislosti @@ -1173,10 +1288,8 @@ issues.dependency.add=Přidat závislost… issues.dependency.cancel=Zrušit issues.dependency.remove=Odstranit issues.dependency.remove_info=Odstranit tuto závislost -issues.dependency.added_dependency=`přidal(a) novou závislost %s` -issues.dependency.removed_dependency=`odstranil(a) závislost %s` -issues.dependency.issue_closing_blockedby=Uzavření tohoto požadavku na natažení je blokováno následujícími úkoly -issues.dependency.pr_closing_blockedby=Uzavření tohoto úkolu je blokováno následujícími úkoly +issues.dependency.added_dependency=`přidal/a novou závislost %s` +issues.dependency.removed_dependency=`odstranil/a závislost %s` issues.dependency.issue_close_blocks=Tento úkol blokuje uzavření následujících úkolů issues.dependency.pr_close_blocks=Tento požadavek na natažení blokuje uzavření následujících úkolů issues.dependency.issue_close_blocked=Musíte zavřít všechny úkoly, které blokují tento úkol, aby jej bylo možné zavřít. @@ -1197,6 +1310,8 @@ issues.review.self.approval=Nemůžete schválit svůj požadavek na natažení. issues.review.self.rejection=Nemůžete požadovat změny ve svém vlastním požadavku na natažení. issues.review.approve=schválil tyto změny %s issues.review.comment=posoudil %s +issues.review.dismissed=zamítl/a posouzení od %s %s +issues.review.dismissed_label=Zamítnuto issues.review.left_comment=zanechal komentář issues.review.content.empty=Je potřeba zanechat poznámku s uvedením požadované změny (požadovaných změn). issues.review.reject=požadované změny %s @@ -1216,6 +1331,10 @@ issues.review.resolve_conversation=Vyřešit konverzaci issues.review.un_resolve_conversation=Nevyřešit konverzaci issues.review.resolved_by=označil tuto konverzaci jako vyřešenou issues.assignee.error=Ne všichni zpracovatelé byli přidáni z důvodu neočekávané chyby. +issues.reference_issue.body=Tělo zprávy + +compare.compare_base=základ +compare.compare_head=porovnat pulls.desc=Povolit požadavky na natažení a posuzování kódu. pulls.new=Nový požadavek na natažení @@ -1226,25 +1345,32 @@ pulls.compare_compare=natáhnout z pulls.filter_branch=Filtrovat větev pulls.no_results=Nebyly nalezeny žádné výsledky. pulls.nothing_to_compare=Tyto větve jsou stejné. Není potřeba vytvářet požadavek na natažení. +pulls.nothing_to_compare_and_allow_empty_pr=Tyto větve jsou stejné. Tento požadavek na natažení bude prázdný. pulls.has_pull_request=`Požadavek na natažení mezi těmito dvěma větvemi již existuje: %[2]s#%[3]d` pulls.create=Vytvořit požadavek na natažení -pulls.title_desc=chce sloučit %[1]d revizí z větve %[2]s do %[3]s -pulls.merged_title_desc=sloučil %[1]d revizí z větve %[2]s do větve %[3]s před %[4]s -pulls.change_target_branch_at=`změnil(a) cílovou větev z %s na %s %s` +pulls.title_desc=chce sloučit %[1]d commity z větve %[2]s do %[3]s +pulls.merged_title_desc=sloučil %[1]d commity z větve %[2]s do větve %[3]s před %[4]s +pulls.change_target_branch_at=`změnil/a cílovou větev z %s na %s %s` pulls.tab_conversation=Konverzace -pulls.tab_commits=Revize +pulls.tab_commits=Commity pulls.tab_files=Změněné soubory pulls.reopen_to_merge=Prosíme, otevřete znovu tento požadavek na natažení, aby se provedlo sloučení. pulls.cant_reopen_deleted_branch=Tento požadavek na natažení nemůže být znovu otevřen protože větev byla smazána. pulls.merged=Sloučený pulls.merged_as=Požadavek na natažení byl sloučen jako %[2]s. +pulls.manually_merged=Sloučeno ručně +pulls.manually_merged_as=Požadavek na natažení byl ručně sloučen jako %[2]s. pulls.is_closed=Požadavek na natažení byl uzavřen. pulls.has_merged=Požadavek na natažení byl sloučen. pulls.title_wip_desc=`Začněte název s %s a zamezíte tak nechtěnému sloučení požadavku na natažení.` -pulls.cannot_merge_work_in_progress=Požadavek na natažení je označen jako ve vývoji. Odstraňte %s prefix z titulku, až bude hotový +pulls.cannot_merge_work_in_progress=Tento požadavek na natažení je označen jako probíhající práce. +pulls.still_in_progress=Stále probíhá? +pulls.add_prefix=Přidat prefix %s +pulls.remove_prefix=Odstranit prefix %s pulls.data_broken=Tento požadavek na natažení je rozbitý kvůli chybějícím informacím o rozštěpení. pulls.files_conflicted=Tento požadavek na natažení obsahuje změny, které kolidují s cílovou větví. pulls.is_checking=Právě probíhá kontrola konfliktů při sloučení. Zkuste to za chvíli. +pulls.is_empty=Tato větev je stejná jako cílová větev. pulls.required_status_check_failed=Některé požadované kontroly nebyly úspěšné. pulls.required_status_check_missing=Některé požadované kontroly chybí. pulls.required_status_check_administrator=Jako administrátor stále můžete sloučit tento požadavek na natažení. @@ -1265,21 +1391,23 @@ pulls.reject_count_1=%d žádost o změnu pulls.reject_count_n=%d žádosti o změnu pulls.waiting_count_1=%d čekající posouzení pulls.waiting_count_n=%d čekající posouzení +pulls.wrong_commit_id=ID commitu musí být ID commitu v cílové větvi pulls.no_merge_desc=Tento požadavek na natažení nemůže být sloučen, protože všechny možnosti repozitáře na sloučení jsou zakázány. pulls.no_merge_helper=Povolte možnosti sloučení v nastavení repozitáře nebo proveďte sloučení požadavku na natažení ručně. pulls.no_merge_wip=Požadavek na natažení nemůže být sloučen protože je označen jako nedokončený. pulls.no_merge_not_ready=Tento požadavek na natažení není připraven na sloučení, zkontrolujte stav posouzení a kontrolu stavu. pulls.no_merge_access=Nemáte oprávnění sloučit tento požadavek na natažení. -pulls.merge_pull_request=Sloučit požadavek na natažení -pulls.rebase_merge_pull_request=Rebase a sloučit -pulls.rebase_merge_commit_pull_request=Rebase a sloučit (--no-ff) -pulls.squash_merge_pull_request=Squash a sloučit -pulls.require_signed_wont_sign=Větev vyžaduje podepsané revize, ale toto sloučení nebude podepsáno +pulls.merge_pull_request=Vytvořit slučovací commit +pulls.rebase_merge_commit_pull_request=Rebase a poté vytvořit slučovací commit +pulls.squash_merge_pull_request=Vytvořit squash commit +pulls.merge_manually=Sloučeno ručně +pulls.merge_commit_id=ID slučovacího commitu +pulls.require_signed_wont_sign=Větev vyžaduje podepsané commity, ale toto sloučení nebude podepsáno pulls.invalid_merge_option=Nemůžete použít tuto možnost sloučení pro tento požadavek na natažení. pulls.merge_conflict=Sloučení selhalo: Došlo ke konfliktu při sloučení. Tip: Zkuste jinou strategii pulls.merge_conflict_summary=Chybové hlášení -pulls.rebase_conflict=Sloučení selhalo: Došlo ke konfliktu při rebase revize: %[1]s. Tip: Zkuste jinou strategii +pulls.rebase_conflict=Sloučení selhalo: Došlo ke konfliktu při rebase commitu: %[1]s. Tip: Zkuste jinou strategii pulls.rebase_conflict_summary=Chybové hlášení ; %[2]s
    %[3]s
    pulls.unrelated_histories=Sloučení selhalo: Základní revize nesdílí společnou historii. Tip: Zkuste jinou strategii @@ -1299,8 +1427,8 @@ pulls.update_branch=Aktualizovat větev pulls.update_branch_success=Aktualizace větve byla úspěšná pulls.update_not_allowed=Nemáte oprávnění aktualizovat větev pulls.outdated_with_base_branch=Tato větev je zastaralá oproti základní větvi -pulls.closed_at=`uzavřel(a) tento požadavek na natažení %[2]s` -pulls.reopened_at=`znovuotevřel(a) tento požadavek na natažení %[2]s` +pulls.closed_at=`uzavřel/a tento požadavek na natažení %[2]s` +pulls.reopened_at=`znovuotevřel/a tento požadavek na natažení %[2]s` pulls.merge_instruction_hint=`Můžete také zobrazit instrukce příkazové řádky.` pulls.merge_instruction_step1_desc=Z vašeho repositáře projektu se podívejte na novou větev a vyzkoušejte změny. @@ -1338,16 +1466,16 @@ milestones.filter_sort.most_complete=Nejvíce dokončené milestones.filter_sort.most_issues=Nejvíce úkolů milestones.filter_sort.least_issues=Nejméně úkolů -signing.will_sign=Tato revize bude podepsána klíčem '%s' -signing.wont_sign.error=Došlo k chybě při kontrole, zda může být revize podepsána -signing.wont_sign.nokey=K podpisu této revize není k dispozici žádný klíč -signing.wont_sign.never=Revize nejsou nikdy podepsány -signing.wont_sign.always=Revize jsou vždy podepsány -signing.wont_sign.pubkey=Revize nebude podepsána, protože nemáte veřejný klíč spojený s vaším účtem -signing.wont_sign.twofa=Pro podepsání revizí musíte mít povoleno dvoufaktorové ověření -signing.wont_sign.parentsigned=Revize nebude podepsána, protože nadřazená revize není podepsána -signing.wont_sign.basesigned=Sloučení nebude podepsáno, protože základní revize není podepsána -signing.wont_sign.headsigned=Sloučení nebude podepsáno, protože základní revize není podepsána +signing.will_sign=Tento commit bude podepsána klíčem '%s' +signing.wont_sign.error=Došlo k chybě při kontrole, zda může být commit podepsán +signing.wont_sign.nokey=K podpisu tohoto commitu není k dispozici žádný klíč +signing.wont_sign.never=Commity nejsou nikdy podepsány +signing.wont_sign.always=Commity jsou vždy podepsány +signing.wont_sign.pubkey=Commit nebude podepsán, protože nemáte veřejný klíč spojený s vaším účtem +signing.wont_sign.twofa=Pro podepsání commitů musíte mít povoleno dvoufaktorové ověření +signing.wont_sign.parentsigned=Commit nebude podepsán, protože nadřazený commit není podepsán +signing.wont_sign.basesigned=Sloučení nebude podepsáno, protože základní commit není podepsaný +signing.wont_sign.headsigned=Sloučení nebude podepsáno, protože základní commit není podepaný signing.wont_sign.commitssigned=Sloučení nebude podepsáno, protože všechny přidružené revize nejsou podepsány signing.wont_sign.approved=Sloučení nebude podepsáno, protože požadavek na natažení není schválen signing.wont_sign.not_signed_in=Nejste přihlášeni @@ -1408,7 +1536,7 @@ activity.closed_issues_count_1=Uzavřený úkol activity.closed_issues_count_n=Uzavřené úkoly activity.title.issues_1=%d úkol activity.title.issues_n=%d úkolů -activity.title.issues_closed_by=%s uzavřel %s +activity.title.issues_closed_from=%s uzavřel z %s activity.title.issues_created_by=%s vytvořil %s activity.closed_issue_label=Uzavřený activity.new_issues_count_1=Nový úkol @@ -1422,14 +1550,14 @@ activity.title.releases_1=%d Vydání activity.title.releases_n=%d Vydání activity.title.releases_published_by=%s publikoval %s activity.published_release_label=Publikováno -activity.no_git_activity=V tomto období nebyla žádná aktivita v revizích. +activity.no_git_activity=V tomto období nebyla žádná aktivita při odevzdání. activity.git_stats_exclude_merges=Při vyloučení slučování, activity.git_stats_author_1=%d autor activity.git_stats_author_n=%d autoři activity.git_stats_pushed_1=nahrál activity.git_stats_pushed_n=nahrály -activity.git_stats_commit_1=%d revize -activity.git_stats_commit_n=%d revizí +activity.git_stats_commit_1=%d commit +activity.git_stats_commit_n=%d commity activity.git_stats_push_to_branch=do %s a activity.git_stats_push_to_all_branches=do všech větví. activity.git_stats_on_default_branch=Na %s, @@ -1446,6 +1574,8 @@ activity.git_stats_deletion_n=%d odebrání search=Vyhledat search.search_repo=Hledat repozitář +search.fuzzy=Fuzzy +search.match=Shoda search.results=Výsledky hledání „%s“ v %s settings=Nastavení @@ -1461,6 +1591,11 @@ settings.hooks=Webové háčky settings.githooks=Háčky Gitu settings.basic_settings=Základní nastavení settings.mirror_settings=Nastavení zrcadla +settings.mirror_settings.direction.pull=Natáhnout +settings.mirror_settings.direction.push=Nahrát +settings.mirror_settings.push_mirror.none=Nenastavena žádná zrcadla pro nahrání +settings.mirror_settings.push_mirror.remote_url=URL vzdáleného Git repozitáře +settings.mirror_settings.push_mirror.add=Přidat zrcadlo pro nahrání settings.sync_mirror=Synchronizovat nyní settings.mirror_sync_in_progress=Právě probíhá synchronizace zrcadla. Zkuste to za chvíli. settings.email_notifications.enable=Povolit e-mailová oznámení @@ -1469,6 +1604,7 @@ settings.email_notifications.disable=Zakázat e-mailová oznámení settings.email_notifications.submit=Nastavit předvolby e-mailu settings.site=Webová stránka settings.update_settings=Aktualizovat nastavení +settings.branches.update_default_branch=Aktualizovat výchozí větev settings.advanced_settings=Pokročilá nastavení settings.wiki_desc=Povolit Wiki repozitáře settings.use_internal_wiki=Používat vestavěnou Wiki @@ -1492,14 +1628,16 @@ settings.enable_timetracker=Povolit sledování času settings.allow_only_contributors_to_track_time=Povolit sledování času pouze přispěvatelům settings.pulls_desc=Povolit požadavky na natažení settings.pulls.ignore_whitespace=Ignorovat bílé znaky při konfliktech -settings.pulls.allow_merge_commits=Povolit slučování revizí -settings.pulls.allow_rebase_merge=Povolit rebase pro slučovací revize -settings.pulls.allow_rebase_merge_commit=Povolit rebase s vyžádanou slučovací revizí (--no-ff) -settings.pulls.allow_squash_commits=Povolit squash pro slučovací revize +settings.pulls.allow_merge_commits=Povolit slučování commitů +settings.pulls.allow_rebase_merge=Povolit rebase pro slučovací commity +settings.pulls.allow_rebase_merge_commit=Povolit rebase s vyžádaným slučovacím commitem (--no-ff) +settings.pulls.allow_squash_commits=Povolit squash pro slučovací commity +settings.pulls.allow_manual_merge=Povolit označování požadavků na natažení jako ručně sloučené +settings.pulls.enable_autodetect_manual_merge=Povolit autodetekci ručních sloučení (Poznámka: V některých zvláštních případech může dojít k nesprávnému rozhodnutí) settings.projects_desc=Povolit projekty v repozitáři settings.admin_settings=Nastavení správce settings.admin_enable_health_check=Povolit kontrolu stavu repozitáře (git fsck) -settings.admin_enable_close_issues_via_commit_in_any_branch=Zavřít úkol pomocí revize v jiné než výchozí větvi +settings.admin_enable_close_issues_via_commit_in_any_branch=Zavřít úkol pomocí commitu v jiné než výchozí větvi settings.danger_zone=Nebezpečná zóna settings.new_owner_has_same_repo=Nový vlastník již repozitář se stejným názvem má. Vyberte prosím jiné jméno. settings.convert=Převést na běžný repozitář @@ -1513,23 +1651,33 @@ settings.convert_fork_notices_1=Tato operace převede rozštěpení na běžný settings.convert_fork_confirm=Převést repozitář settings.convert_fork_succeed=Rozštěpení bylo překonvertován na běžný repozitář. settings.transfer=Předat vlastnictví +settings.transfer.rejected=Převod repozitáře byl zamítnut. +settings.transfer.success=Převod repozitáře byl úspěšný. +settings.transfer_abort=Zrušit převod +settings.transfer_abort_invalid=Nemůžete zrušit neexistující převod repozitáře. +settings.transfer_abort_success=Převod repozitáře do %s byl úspěšně zrušen. settings.transfer_desc=Předat tento repozitář uživateli nebo organizaci, ve které máte administrátorská práva. +settings.transfer_form_title=Zadejte jméno repozitáře pro potvrzení: +settings.transfer_in_progress=V současné době probíhá převod. Zrušte jej, pokud chcete převést tento repozitář jinému uživateli. settings.transfer_notices_1=- Ztratíte přístup k repozitáři, pokud jej převedete na uživatele. settings.transfer_notices_2=- Zůstane vám přístup k repozitáři, pokud jej převedete na organizaci kterou (spolu)vlastníte. -settings.transfer_form_title=Zadejte jméno repozitáře pro potvrzení: +settings.transfer_owner=Nový vlastník +settings.transfer_perform=Provést převod +settings.transfer_started=Tento repozitář byl označen pro převod a čeká na potvrzení od „%s“ +settings.transfer_succeed=Repozitář byl předán. settings.signing_settings=Nastavení ověřování podpisu settings.trust_model=Model důvěry podpisu settings.trust_model.default=Výchozí model důvěry settings.trust_model.default.desc=Použít výchozí model důvěry pro tuto instalaci. settings.trust_model.collaborator=Spolupracovník settings.trust_model.collaborator.long=Spolupracovník: Důvěřovat podpisům spolupracovníků -settings.trust_model.collaborator.desc=Platné podpisy spolupracovníků tohoto repozitáře budou označeny jako „důvěryhodné“ - (ať se shodují s autorem, či nikoli). V opačném případě budou platné podpisy označeny jako „nedůvěryhodné“, pokud se podpis shoduje s autorem a „neodpovídající“, pokud ne. -settings.trust_model.committer=Tvůrce revize -settings.trust_model.committer.long=Tvůrce revize: Důvěřovat podpisům, které odpovídají autorům (což odpovídá GitHub a přinutí Giteu nastavit jako tvůrce pro Giteou podepsané revize) -settings.trust_model.committer.desc=Platné podpisy budou označeny pouze jako „důvěryhodné“, pokud se shodují s autorem, jinak budou označeny jako „neodpovídající“. To přinutí Giteu, aby byla autorem podepsaných revizí se skutečným autorem označeným jako Co-authored-by: a Co-committed-by: na konci revize. Výchozí klíč Gitea musí odpovídat uživateli v databázi. -settings.trust_model.collaboratorcommitter=Spolupracovník+Tvůrce revize -settings.trust_model.collaboratorcommitter.long=Spolupracovník+Tvůrce revize: Důvěřovat podpisům od spolupracovníků, které odpovídají tvůrci revize -settings.trust_model.collaboratorcommitter.desc=Platné podpisy spolupracovníků tohoto repozitáře budou označeny jako „důvěryhodné“, pokud se shodují s autorem. V opačném případě budou platné podpisy označeny jako "nedůvěryhodné", pokud se podpis shoduje s autorem a „neodpovídajícím“ v opačném případě. To přinutí Giteu, aby byla označena jako autor podepsaných revizí se skutečným autorem označeným jako Co-Authored-By: a Co-Committed-By: na konci revize. Výchozí klíč Gitea musí odpovídat uživateli v databázi. +settings.trust_model.collaborator.desc=Platné podpisy spolupracovníků tohoto repozitáře budou označeny jako „důvěryhodné“ - (ať se shodují s autorem, či nikoli). V opačném případě budou platné podpisy označeny jako „nedůvěryhodné“, pokud se podpis shoduje s přispěvatelem a „neodpovídající“, pokud ne. +settings.trust_model.committer=Přispěvatel +settings.trust_model.committer.long=Přispěvatel: Důvěřovat podpisům, které odpovídají autorům (což odpovídá GitHub a přinutí Giteu nastavit jako tvůrce pro Giteou podepsané revize) +settings.trust_model.committer.desc=Platné podpisy budou označeny pouze jako „důvěryhodné“, pokud se shodují s přispěvatelem, jinak budou označeny jako „neodpovídající“. To přinutí Giteu, aby byla přispěvatelem podepsaných commitů se skutečným přispěvatelem označeným jako Co-authored-by: a Co-committed-by: na konci commitu. Výchozí klíč Gitea musí odpovídat uživateli v databázi. +settings.trust_model.collaboratorcommitter=Spolupracovník+Přispěvatel +settings.trust_model.collaboratorcommitter.long=Spolupracovník+Přispěvatel: Důvěřovat podpisům od spolupracovníků, které odpovídají tvůrci revize +settings.trust_model.collaboratorcommitter.desc=Platné podpisy spolupracovníků tohoto repozitáře budou označeny jako „důvěryhodné“, pokud se shodují s přispěvatelem. V opačném případě budou platné podpisy označeny jako "nedůvěryhodné", pokud se podpis shoduje s přispěvatelem a „neodpovídajícím“ v opačném případě. To přinutí Giteu, aby byla označena jako přispěvatel podepsaných commitů se skutečným přispěvatelem označeným jako Co-Authored-By: a Co-Committed-By: na konci commitu. Výchozí klíč Gitea musí odpovídat uživateli v databázi. settings.wiki_delete=Odstranit data Wiki settings.wiki_delete_desc=Smazání Wiki dat repozitáře je trvalé a nemůže být vráceno zpět. settings.wiki_delete_notices_1=- Natrvalo odstraní a zakáže wiki repozitáře pro %s. @@ -1542,9 +1690,6 @@ settings.delete_notices_2=- Tato operace trvale smaže repozitář %s
    *
    , všechny události jsou ohlášeny. Podívejte se na dokumentaci syntaxe na github.com/gobwas/glob. Příklady: master, {master,release*}. settings.active=Aktivní settings.active_helper=Informace o spuštěných událostech budou odeslány na URL webového háčku. settings.add_hook_success=Webový háček byl přidán. @@ -1709,7 +1853,6 @@ settings.dismiss_stale_approvals_desc=Pokud budou do větve nahrány nové reviz settings.require_signed_commits=Vyžadovat podepsané revize settings.require_signed_commits_desc=Odmítnout nahrání do této větve pokud nejsou podepsaná nebo jsou neověřitelná. settings.protect_protected_file_patterns=Chráněné vzory souborů (oddělené středníkem „\;“): -settings.protect_protected_file_patterns_desc=Chráněné soubory, které nemají povoleno být měněny přímo, i když uživatel má právo přidávat, upravovat nebo mazat soubory v této větvi. Více vzorů lze oddělit pomocí středníku („\;“). Podívejte se na github.com/gobwas/glob dokumentaci pro syntaxi vzoru. Příklady: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Zapnout ochranu settings.delete_protected_branch=Vypnout ochranu settings.update_protect_branch_success=Ochrana větví pro větev „%s“ byla aktualizována. @@ -1723,10 +1866,19 @@ settings.block_on_official_review_requests_desc=Slučování nebude možné, pok settings.block_outdated_branch=Blokovat sloučení, pokud je požadavek na natažení zastaralý settings.block_outdated_branch_desc=Slučování nebude možné, pokud je hlavní větev za základní větví. settings.default_branch_desc=Vybrat výchozí větev repozitáře pro požadavky na natažení a revize kódu: +settings.default_merge_style_desc=Výchozí styl sloučení pro požadavky na natažení: settings.choose_branch=Vyberte větev… settings.no_protected_branch=Nejsou tu žádné chráněné větve. settings.edit_protected_branch=Upravit settings.protected_branch_required_approvals_min=Požadovaná schválení nesmí být záporné číslo. +settings.tags=Značky +settings.tags.protection=Ochrana značek +settings.tags.protection.pattern=Vzor značky +settings.tags.protection.allowed.users=Povolení uživatelé +settings.tags.protection.allowed.teams=Povolené týmy +settings.tags.protection.allowed.noone=Nikdo +settings.tags.protection.create=Chránit značku +settings.tags.protection.none=Neexistují žádné chráněné značky. settings.bot_token=Poukázka pro robota settings.chat_id=ID chatu settings.matrix.homeserver_url=URL adresa Homeserveru @@ -1740,6 +1892,7 @@ settings.archive.success=Repozitář byl úspěšně archivován. settings.archive.error=Nastala chyba při archivování repozitáře. Prohlédněte si záznam pro více detailů. settings.archive.error_ismirror=Nemůžete archivovat zrcadlený repozitář. settings.archive.branchsettings_unavailable=Nastavení větví není dostupné, pokud je repozitář archivovaný. +settings.archive.tagsettings_unavailable=Nastavení značek není k dispozici, pokud je repozitář archivován. settings.unarchive.button=Obnovit repozitář settings.unarchive.header=Obnovit tento repozitář settings.unarchive.text=Obnovení repozitáře vrátí možnost přijímání revizí a nahrávání. Stejně tak se obnoví i možnost zadávání nových úkolů a požadavků na natažení. @@ -1791,13 +1944,15 @@ diff.whitespace_ignore_at_eol=Ignorovat změny v bílých znacích na konci ří diff.stats_desc= %d změnil soubory, kde provedl %d přidání a %d odebrání diff.stats_desc_file=%d změn: %d přidání a %d smazání diff.bin=binární +diff.bin_not_shown=Binární soubor nebyl zobrazen. diff.view_file=Zobrazit soubor diff.file_before=Před diff.file_after=Za diff.file_image_width=Šířka diff.file_image_height=Výška diff.file_byte_size=Velikost -diff.file_suppressed=Diff nebyl zobrazen, protože je příliš veliký +diff.file_suppressed=Rozdílový obsah nebyl zobrazen, protože je příliš veliký +diff.file_suppressed_line_too_long=Rozdílový obsah nebyl zobrazen, protože některé řádky jsou příliš dlouhá diff.too_many_files=Některé soubory nejsou zobrazny, neboť je v této revizi změněno mnoho souborů diff.comment.placeholder=Zanechat komentář diff.comment.markdown_info=Je podporována úprava vzhledu pomocí markdown. @@ -1813,6 +1968,9 @@ diff.review.approve=Schválit diff.review.reject=Požadovat změny diff.committed_by=odevzdal diff.protected=Chráněno +diff.image.side_by_side=Vedle sebe +diff.image.swipe=Posunout +diff.image.overlay=Překrytí releases.desc=Sledování verzí projektu a souborů ke stažení. release.releases=Vydání @@ -1822,6 +1980,7 @@ release.new_release=Nové vydání release.draft=Koncept release.prerelease=Předběžná verze release.stable=Stabilní +release.compare=Porovnat release.edit=upravit release.ahead.commits=%d revizí release.ahead.target=do %s od tohoto vydání @@ -1848,9 +2007,12 @@ release.deletion_tag_desc=Odstraní tuto značku z repozitáře. Obsah repozitá release.deletion_tag_success=Značka byla odstraněna. release.tag_name_already_exist=Vydání s touto značkou již existuje. release.tag_name_invalid=Název štítku není platný. +release.tag_name_protected=Název značky je chráněn. release.tag_already_exist=Tato značka již existuje. release.downloads=Soubory ke stažení release.download_count=Stažení: %s +release.add_tag_msg=Použít název a obsah vydání jako zprávu značky. +release.add_tag=Vytvořit pouze značku branch.name=Jméno větve branch.search=Hledat větve @@ -1877,12 +2039,23 @@ branch.restore=Obnovit větev „%s“ branch.download=Stáhnout větev „%s“ branch.included_desc=Tato větev je součástí výchozí větve branch.included=Zahrnuje +branch.create_new_branch=Vytvořit větev z větve: +branch.confirm_create_branch=Vytvořit větev +branch.new_branch=Vytvořit novou větev +branch.new_branch_from=Vytvořit novou větev z „%s“ + +tag.create_tag=Vytvořit značku %s +tag.create_success=Značka „%s“ byla vytvořena. topic.manage_topics=Spravovat témata topic.done=Hotovo topic.count_prompt=Nelze vybrat více než 25 témat topic.format_prompt=Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků. +error.csv.too_large=Tento soubor nelze vykreslit, protože je příliš velký. +error.csv.unexpected=Tento soubor nelze vykreslit, protože obsahuje neočekávaný znak na řádku %d ve sloupci %d. +error.csv.invalid_field_count=Soubor nelze vykreslit, protože má nesprávný počet polí na řádku %d. + [org] org_name_holder=Název organizace org_full_name_holder=Celý název organizace @@ -1926,6 +2099,7 @@ settings.visibility.private_shortname=Soukromý settings.update_settings=Upravit nastavení settings.update_setting_success=Nastavení organizace bylo upraveno. settings.change_orgname_prompt=Poznámka: změna názvu organizace změní i její URL. +settings.change_orgname_redirect_prompt=Staré jméno bude přesměrovávat, dokud nebude znovu obsazeno. settings.update_avatar_success=Avatar organizace byl aktualizován. settings.delete=Smazat organizaci settings.delete_account=Smazat tuto organizaci @@ -1997,8 +2171,7 @@ dashboard=Přehled users=Uživatelské účty organizations=Organizace repositories=Repozitáře -hooks=Výchozí webové háčky -systemhooks=Systémové webové háčky +hooks=Webové háčky authentication=Zdroje ověření emails=Uživatelské e-maily config=Nastavení @@ -2030,7 +2203,7 @@ dashboard.cron.error=Chyba v naplánované úloze: %s: %[3]s dashboard.cron.finished=Naplánovaná úloha: %[1]s skončila dashboard.delete_inactive_accounts=Smazat všechny neaktivované účty dashboard.delete_inactive_accounts.started=Spuštěna úloha mazání všech neaktivovaných účtů. -dashboard.delete_repo_archives=Smazat všechny archivy repozitáře +dashboard.delete_repo_archives=Odstranit všechny archivy repozitáře (ZIP, TAR.GZ, atd.) dashboard.delete_repo_archives.started=Spuštěna úloha smazání všech archivovaných repozitářů. dashboard.delete_missing_repos=Smazat všechny repozitáře, které nemají Git soubory dashboard.delete_missing_repos.started=Spuštěna úloha mazání všech repozitářů, které nemají Git soubory. @@ -2049,6 +2222,7 @@ dashboard.resync_all_sshprincipals.desc=(Není potřeba pro vestavěný SSH serv dashboard.resync_all_hooks=Znovu synchronizovat háčky před přijetím, aktualizace a po přijetí všech repozitářů. dashboard.reinit_missing_repos=Znovu inicializovat všechny chybějící repozitáře, pro které existují záznamy dashboard.sync_external_users=Synchronizovat externí uživatelská data +dashboard.cleanup_hook_task_table=Vyčistit tabulku hook_task dashboard.server_uptime=Doba provozu serveru dashboard.current_goroutine=Aktuální Goroutines dashboard.current_memory_usage=Aktuální využití paměti @@ -2078,6 +2252,8 @@ dashboard.total_gc_time=Celková pauza GC dashboard.total_gc_pause=Celková pauza GC dashboard.last_gc_pause=Poslední pauza GC dashboard.gc_times=Časy GC +dashboard.delete_old_actions=Odstranit všechny staré akce z databáze +dashboard.delete_old_actions.started=Začalo odstraňování všech starých akcí z databáze. users.user_manage_panel=Správa uživatelských účtů users.new_account=Vytvořit uživatelský účet @@ -2148,10 +2324,12 @@ repos.forks=Rozštěpení repos.issues=Úkoly repos.size=Velikost -hooks.desc=Webové háčky automaticky vytvářejí HTTP POST dotazy na server při určitých Gitea událostech. Webové háčky definované zde jsou výchozí a budou zkopírovány do všech nových repozitářů. Přečtěte si více v průvodci webovými háčky. -hooks.add_webhook=Přidat výchozí webový háček -hooks.update_webhook=Aktualizovat výchozí webový háček +defaulthooks=Výchozí webové háčky +defaulthooks.desc=Webové háčky automaticky vytvářejí HTTP POST dotazy na server při určitých Gitea událostech. Webové háčky definované zde jsou výchozí a budou zkopírovány do všech nových repozitářů. Přečtěte si více v průvodci webovými háčky. +defaulthooks.add_webhook=Přidat výchozí webový háček +defaulthooks.update_webhook=Aktualizovat výchozí webový háček +systemhooks=Systémové webové háčky systemhooks.desc=Webové háčky automaticky vytvářejí HTTP POST dotazy na server při určitých Gitea událostech. Webové háčky definované zde budou vykonány na všech repozitářích systému, proto prosím zvažte jakékoli důsledky, které to může mít na výkon. Přečtěte si více v průvodci webovými háčky. systemhooks.add_webhook=Přidat systémový webový háček systemhooks.update_webhook=Aktualizovat systémový webový háček @@ -2171,7 +2349,6 @@ auths.host=Server auths.port=Port auths.bind_dn=Připojení DN auths.bind_password=Heslo připojení -auths.bind_password_helper=Upozornění: Toto heslo je ukládáno v nešifrované podobě. Použijte účet pouze pro čtení, pokud je to možné. auths.user_base=Výchozí bod hledání uživatelů auths.user_dn=DN uživatele auths.attribute_username=Atribut uživatelského jména @@ -2199,9 +2376,12 @@ auths.smtphost=Server SMTP auths.smtpport=Port SMTP auths.allowed_domains=Povolené domény auths.allowed_domains_helper=Nechte prázdné k povolení všech domén. Oddělte více domén pomocí čárky („,“). -auths.enable_tls=Povolit šifrování TLS auths.skip_tls_verify=Přeskočit ověření TLS +auths.force_smtps=Vynutit SMTPS +auths.helo_hostname=HELO Hostname +auths.disable_helo=Zakázat HELO auths.pam_service_name=Název služby PAM +auths.pam_email_domain=PAM e-mailová doména (volitelné) auths.oauth2_provider=Poskytovatel OAuth2 auths.oauth2_icon_url=URL ikony auths.oauth2_clientID=Klientské ID (klíč) @@ -2301,6 +2481,7 @@ config.db_path=Cesta config.service_config=Nastavení služby config.register_email_confirm=Pro registraci vyžadovat potvrzení e-mailu config.disable_register=Vypnout možnost uživatelské registrace +config.allow_only_internal_registration=Povolit registraci pouze prostřednictvím Gitea config.allow_only_external_registration=Povolit registraci pouze prostřednictvím externích služeb config.enable_openid_signup=Povolit automatickou registraci pomocí OpenID config.enable_openid_signin=Povolit přihlášení pomocí OpenID @@ -2377,7 +2558,6 @@ config.git_gc_timeout=Časový limit operace GC config.log_config=Nastavení logů config.log_mode=Způsob logování -config.macaron_log_mode=Režim logování Macaron config.own_named_logger=Pojmenovaný logger config.routes_to_default_logger=Cesty k výchozímu loggeru config.go_log=Použít Go log (přesměrován na výchozí) @@ -2470,31 +2650,32 @@ notices.op=Akce notices.delete_success=Systémové upozornění bylo smazáno. [action] -create_repo=vytvořil(a) repozitář %s -rename_repo=přejmenoval(a) repozitář z %[1]s na %[3]s -commit_repo=nahrál(a) do %[3]s v %[4]s +create_repo=vytvořil/a repozitář %s +rename_repo=přejmenoval/a repozitář z %[1]s na %[3]s +commit_repo=nahrál/a do %[3]s v %[4]s create_issue=`vytvořil úkol %s#%[2]s` close_issue=`uzavřel úkol %s#%[2]s` reopen_issue=`znovuotevřel úkol %s#%[2]s` -create_pull_request=`vytvořil(a) požadavek na natažení %s#%[2]s` +create_pull_request=`vytvořil/a požadavek na natažení %s#%[2]s` close_pull_request=`uzavřel požadavek na natažení %s#%[2]s` -reopen_pull_request=`znovuotevřel(a) požadavek na natažení %s#%[2]s` +reopen_pull_request=`znovuotevřel/a požadavek na natažení %s#%[2]s` comment_issue=`přidal komentář k úkolu %s#%[2]s` -comment_pull=`okomentoval(a) požadavek na natažení %s#%[2]s` -merge_pull_request=`sloučil(a) požadavek na natažení %s#%[2]s` -transfer_repo=předal(a) repozitář %s uživateli/organizaci %s -push_tag=nahrána značka %[2]s do %[3]s +comment_pull=`okomentoval/a požadavek na natažení %s#%[2]s` +merge_pull_request=`sloučil/a požadavek na natažení %s#%[2]s` +transfer_repo=předal/a repozitář %s uživateli/organizaci %s delete_tag=smazána značka %[2]s z %[3]s -delete_branch=smazal(a) větev %[2]s z %[3]s +delete_branch=smazal/a větev %[2]s z %[3]s compare_branch=Porovnat compare_commits=Porovnat %d revizí compare_commits_general=Porovnat revize -mirror_sync_push=synchronizoval(a) revize do %[3]s v %[4]s ze zrcadla -mirror_sync_create=synchronizoval(a) novou referenci %[2]s do %[3]s ze zrcadla -mirror_sync_delete=synchronizoval(a) a smazal(a) referenci %[2]s v %[3]s ze zrcadla -approve_pull_request=`schválil(a) %s#%[2]s` -reject_pull_request=`navrhl(a) změny pro %s#%[2]s` +mirror_sync_push=synchronizoval/a revize do %[3]s v %[4]s ze zrcadla +mirror_sync_create=synchronizoval/a novou referenci %[2]s do %[3]s ze zrcadla +mirror_sync_delete=synchronizoval/a a smazal/a referenci %[2]s v %[3]s ze zrcadla +approve_pull_request=`schválil/a %s#%[2]s` +reject_pull_request=`navrhl/a změny pro %s#%[2]s` publish_release=`vydána značka "%[4]s" v %[3]s` +review_dismissed=`zamítl posouzení z %[4]s pro %[3]s#%[2]s` +review_dismissed_reason=Důvod: create_branch=vytvořena větev %[3]s v %[4]s [tool] @@ -2540,10 +2721,10 @@ mark_all_as_read=Označit vše jako přečtené default_key=Podepsáno výchozím klíčem error.extract_sign=Selhalo získání podpisu error.generate_hash=Selhalo vygenerování hash revize -error.no_committer_account=Žádný účet není propojen s e-mailovou adresou tvůrce revize +error.no_committer_account=Žádný účet není propojen s e-mailovou adresou přispěvatele error.no_gpg_keys_found=V databázi nebyl nalezen žádný známý klíč pro tento podpis error.not_signed_commit=Nepodepsaná revize -error.failed_retrieval_gpg_keys=Nelze získat žádný klíč propojený s účtem tvůrce revize +error.failed_retrieval_gpg_keys=Nelze získat žádný klíč propojený s účtem přispěvatele error.probable_bad_signature=VAROVÁNÍ! Přestože v databázi existuje klíč s tímto ID, tuto revizi neověřuje! Tato revize je PODEZŘELÁ. error.probable_bad_default_signature=VAROVÁNÍ! Ačkoli výchozí klíč má toto ID, neověřuje tuto revizi! Tato revize je PODEZŘELÁ. diff --git a/options/locale/locale_de-DE.ini b/options/locale/locale_de-DE.ini index 94de786a9..5668933a7 100644 --- a/options/locale/locale_de-DE.ini +++ b/options/locale/locale_de-DE.ini @@ -15,6 +15,7 @@ page=Seite template=Template language=Sprache notifications=Benachrichtigungen +active_stopwatch=Aktive Zeiterfassung create_new=Erstellen… user_profile_and_more=Profil und Einstellungen… signed_in_as=Angemeldet als @@ -75,12 +76,14 @@ pull_requests=Pull-Requests issues=Issues milestones=Meilensteine +ok=OK cancel=Abbrechen save=Speichern add=Hinzufügen add_all=Alle hinzufügen remove=Löschen remove_all=Alle entfernen +edit=Bearbeiten write=Verfassen preview=Vorschau @@ -89,11 +92,16 @@ loading=Laden… step1=Schritt 1: step2=Schritt 2: +error=Fehler error404=Die Seite, die du gerade versuchst aufzurufen, existiert entweder nicht oder du bist nicht berechtigt, diese anzusehen. +never=Niemals + [error] occurred=Ein Fehler ist aufgetreten report_message=Wenn du dir sicher bist, dass dies ein Gitea-Fehler ist, suche bitte auf GitHub nach diesem Fehler und erstelle gegebenenfalls einen neuen Bugreport. +missing_csrf=Fehlerhafte Anfrage: Kein CSRF Token verfügbar +invalid_csrf=Fehlerhafte Anfrage: Ungültiger CSRF Token [startpage] app_desc=Ein einfacher, selbst gehosteter Git-Service @@ -203,6 +211,8 @@ default_enable_timetracking=Zeiterfassung standardmäßig aktivieren default_enable_timetracking_popup=Zeiterfassung standardmäßig für neue Repositories aktivieren. no_reply_address=Versteckte E-Mail-Domain no_reply_address_helper=Domain-Name für Benutzer mit einer versteckten Emailadresse. Zum Beispiel wird der Benutzername „Joe“ in Git als „joe@noreply.example.org“ protokolliert, wenn die versteckte E-Mail-Domain „noreply.example.org“ festgelegt ist. +password_algorithm=Passwort Hashing Algorithmus +password_algorithm_helper=Lege den Passwort Hashing Algorithmus fest. Unterschiedliche Algorithmen haben unterschiedliche Voraussetzungen und Stärken. "Argon2" ist zwar sehr sicher, aber auch sehr speicherhungrig, und somit nicht für schwache Systeme geeignet. [home] uname_holder=E-Mail-Adresse oder Benutzername @@ -236,6 +246,8 @@ users=Benutzer organizations=Organisationen search=Suche code=Code +search.fuzzy=Ähnlich +search.match=Genau repo_no_results=Keine passenden Repositories gefunden. user_no_results=Keine passenden Benutzer gefunden. org_no_results=Keine passenden Organisationen gefunden. @@ -293,7 +305,8 @@ openid_connect_desc=Die gewählte OpenID-URI ist unbekannt. Ordne sie hier einem openid_register_title=Neues Konto einrichten openid_register_desc=Die gewählte OpenID-URI ist unbekannt. Ordne sie hier einem neuen Account zu. openid_signin_desc=Gib deine OpenID-URI ein. Zum Beispiel: https://anne.me, bob.openid.org.cn oder gnusocial.net/carry. -disable_forgot_password_mail=Die Kontowiederherstellung ist deaktiviert. Bitte wende dich an den Administrator. +disable_forgot_password_mail=Die Kontowiederherstellung ist deaktiviert, da keine E-Mail eingerichtet ist. Bitte kontaktiere den zuständigen Administrator. +disable_forgot_password_mail_admin=Die Kontowiederherstellung ist nur verfügbar, wenn eine E-Mail eingerichtet wurde. Bitte richte eine E-Mail Adresse ein, um die Kontowiederherstellung freizuschalten. email_domain_blacklisted=Du kannst dich nicht mit deiner E-Mail-Adresse registrieren. authorize_application=Anwendung autorisieren authorize_redirect_notice=Du wirst zu %s weitergeleitet, wenn du diese Anwendung autorisierst. @@ -307,11 +320,64 @@ password_pwned=Das von dir gewählte Passwort ist auf einer %s, + activate_account=Bitte aktiviere dein Konto +activate_account.title=%s, bitte aktiviere dein Konto +activate_account.text_1=Hallo %[1]s, danke für deine Registrierung bei %[2]! +activate_account.text_2=Bitte klicke innerhalb von %s auf folgenden Link, um dein Konto zu aktivieren: + activate_email=Bestätige deine E-Mail-Adresse -reset_password=Stelle dein Konto wieder her -register_success=Registrierung erfolgreich +activate_email.title=%s, bitte verifiziere deine E-Mail-Adresse +activate_email.text=Bitte klicke innerhalb von %s auf folgenden Link, um dein Konto zu aktivieren: + register_notify=Willkommen bei Gitea +register_notify.title=%[1]s, willkommen bei %[2]s +register_notify.text_1=dies ist deine Bestätigungs-E-Mail für %s! +register_notify.text_2=Du kannst dich jetzt mit dem Benutzernamen "%s" anmelden. +register_notify.text_3=Wenn dieser Account von dir erstellt wurde, musst du zuerst dein Passwort setzen. + +reset_password=Stelle dein Konto wieder her +reset_password.title=%s, du hast um Wiederherstellung deines Kontos gebeten +reset_password.text=Bitte klicke innerhalb von %s auf folgenden Link, um dein Konto wiederherzustellen: + +register_success=Registrierung erfolgreich + +issue_assigned.pull=@%[1]s hat dich im Repository %[3]s dem Pull Request %[2]s zugewiesen. +issue_assigned.issue=@%[1]s hat dich im Repository %[3]s dem Issue %[2]s zugewiesen. + +issue.x_mentioned_you=@%s hat dich erwähnt: +issue.action.force_push=%[1]s hat %[3]s mit %[4]s auf %[2]s überschrieben. +issue.action.push_1=@%[1]s hat einen Commit auf %[2]s gepusht +issue.action.push_n=@%[1]s hat %[3]d Commits auf %[2]s gepusht +issue.action.close=@%[1]s hat #%[2]d geschlossen. +issue.action.reopen=@%[1]s hat #%[2]d wieder geöffnet. +issue.action.merge=@%[1]s hat #%[2]d in %[3]s gemergt. +issue.action.approve=@%[1]s hat diesen Pull-Request approved. +issue.action.reject=@%[1]s hat Änderungen auf diesem Pull-Request angefordert. +issue.action.review=@%[1]s hat diesen Pull-Request kommentiert. +issue.action.review_dismissed=@%[1]s hat das letzte Review von %[2]s für diesen Pull Request verworfen. +issue.action.ready_for_review=@%[1]s hat diesen Pull Request zum Review freigegeben. +issue.action.new=@%[1]s hat #%[2]d geöffnet. +issue.in_tree_path=In %s: + +release.new.subject=Release %s in %s erschienen +release.new.text=@%[1]s hat %[2]s in %[3]s released +release.title=Titel: %s +release.note=Anmerkung: +release.downloads=Downloads: +release.download.zip=Quellcode (ZIP Datei) +release.download.targz=Quellcode (TAR.GZ Datei) + +repo.transfer.subject_to=%s möchte "%s" an %s übertragen +repo.transfer.subject_to_you=%s möchte dir "%s" übertragen +repo.transfer.to_you=dir +repo.transfer.body=Um es anzunehmen oder abzulehnen, öffne %s, oder ignoriere es einfach. + +repo.collaborator.added.subject=%s hat dich zu %s hinzugefügt +repo.collaborator.added.text=Du wurdest als Mitarbeiter für folgendes Repository hinzugefügt: [modal] yes=Ja @@ -352,12 +418,14 @@ email_error=` ist keine gültige E-Mail-Adresse.` url_error=` ist keine gültige URL.` include_error=` muss den Text „%s“ enthalten.` glob_pattern_error=` Der Glob Pattern ist ungültig: %s.` +regex_pattern_error=` regex ist ungültig: %s.` unknown_error=Unbekannter Fehler: captcha_incorrect=Der eingegebene CAPTCHA-Code ist falsch. password_not_match=Die Passwörter stimmen nicht überein. lang_select_error=Wähle eine Sprache aus der Liste aus. username_been_taken=Der Benutzername ist bereits vergeben. +username_change_not_local_user=Nicht-lokale Benutzer dürfen ihren Nutzernamen nicht ändern. repo_name_been_taken=Der Repository-Name wird schon verwendet. repository_files_already_exist=Dateien für dieses Repository sind bereits vorhanden. Kontaktiere den Systemadministrator. repository_files_already_exist.adopt=Dateien für dieses Repository existieren bereits und können nur übernommen werden. @@ -378,6 +446,7 @@ password_uppercase_one=Mindestens ein Großbuchstabe password_digit_one=Mindestens eine Ziffer password_special_one=Mindestens ein Sonderzeichen (Satzzeichen, Klammern, Anführungszeichen, etc.) enterred_invalid_repo_name=Der eingegebenen Repository-Name ist falsch. +enterred_invalid_org_name=Der eingegebene Organisation-Name ist falsch. enterred_invalid_owner_name=Der Name des neuen Besitzers ist ungültig. enterred_invalid_password=Das eingegebene Passwort ist falsch. user_not_exist=Dieser Benutzer ist nicht vorhanden. @@ -404,6 +473,7 @@ repositories=Repositories activity=Öffentliche Aktivität followers=Follower starred=Favoriten +watched=Beobachtete Repositories projects=Projekte following=Folge ich follow=Folgen @@ -447,6 +517,7 @@ update_language_not_found=Sprache '%s' ist nicht verfügbar. update_profile_success=Dein Profil wurde aktualisiert. change_username=Dein Benutzername wurde geändert. change_username_prompt=Hinweis: Wenn du deinen Benutzernamen änderst, wird auch deine Konto-URL geändert. +change_username_redirect_prompt=Der alte Benutzername wird auf den neuen Benutzernamen weiterleiten, bis er erneut als Benutzername verwendet wird. continue=Weiter cancel=Abbrechen language=Sprache @@ -517,14 +588,27 @@ ssh_helper=Brauchst du Hilfe? Hier ist GitHubs Anleitung zum Brauchst du Hilfe? Hier ist GitHubs Anleitung über GPG. add_new_key=SSH-Schlüssel hinzufügen add_new_gpg_key=GPG-Schlüssel hinzufügen -key_content_ssh_placeholder=Beginnt mit 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384' oder 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=Startet mit 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', oder 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=Beginnt mit '-----BEGIN PGP PUBLIC KEY BLOCK-----' add_new_principal=Identität hinzufügen ssh_key_been_used=Dieser SSH-Key wird auf diesem Server bereits verwendet. ssh_key_name_used=Ein gleichnamiger SSH-Key existiert bereits in deinem Account. ssh_principal_been_used=Diese Identität ist bereits auf dem Server vorhanden. gpg_key_id_used=Ein öffentlicher GPG-Schlüssel mit der gleichen ID existiert bereits. -gpg_no_key_email_found=Dieser GPG-Schlüssel kann mit keiner E-Mail-Adresse deines Kontos verwendet werden. +gpg_no_key_email_found=Dieser GPG-Key entspricht keiner mit deinem Account verbundenen aktivierten E-Mail-Addresse. Er kann trotzdem hinzugefügt werden, wenn du den gegebenen Token signierst. +gpg_key_matched_identities=Passende Identitäten: +gpg_key_matched_identities_long=Die eingebetteten Identitäten in diesem Schlüssel stimmen mit den folgenden aktivierten E-Mail-Adressen für diesen Benutzer überein. Commits, die mit diesen E-Mail-Addressen committed wurden, können mit diesem Schlüssel verifiziert werden. +gpg_key_verified=Verifizierter Schlüssel +gpg_key_verified_long=Der Schlüssel wurde mit einem Token verifiziert. Er kann verwendet werden, um Commits zu verifizieren, die mit irgendeiner für diesen Nutzer aktivierten E-Mail-Adresse und irgendeiner Identität dieses Schlüssels übereinstimmen. +gpg_key_verify=Verifizieren +gpg_invalid_token_signature=Der GPG Key, die Signatur, und das Token stimmen nicht überein, oder das Token ist veraltet. +gpg_token_required=Du musst eine Signatur für das folgende Token angeben +gpg_token=Token +gpg_token_help=Du kannst eine Signatur wie folgt generieren: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature=GPG Textsignatur (armored signature) +key_signature_gpg_placeholder=Beginnt mit '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=Der GPG-Key "%s" wurde verifiziert. subkeys=Unterschlüssel key_id=Schlüssel-ID key_name=Schlüsselname @@ -623,6 +707,7 @@ or_enter_secret=Oder gib das Secret ein: %s then_enter_passcode=Und gebe dann die angezeigte PIN der Anwendung ein: passcode_invalid=Die PIN ist falsch. Probiere es erneut. twofa_enrolled=Die Zwei-Faktor-Authentifizierung wurde für dein Konto aktiviert. Bewahre dein Einmalpasswort (%s) an einem sicheren Ort auf, da es nicht wieder angezeigt werden wird. +twofa_failed_get_secret=Fehler beim Abrufen des Secrets. u2f_desc=Sicherheitsschlüssel sind Geräte, die kryptografische Schlüssel beeinhalten. Diese können für die Zwei-Faktor-Authentifizierung verwendet werden. Der Sicherheitsschlüssel muss den Standard „FIDO U2F“ unterstützen. u2f_require_twofa=Du musst die Zwei-Faktor-Authentifizierung für deinen Account aktivieren, um Sicherheitsschlüssel benutzen zu können. @@ -644,6 +729,7 @@ repos_none=Du besitzt keine Repositories delete_account=Konto löschen delete_prompt=Wenn du fortfährst, wird dein Account permanent gelöscht. Dies KANN NICHT rückgängig gemacht werden. +delete_with_all_comments=Dein Account existiert seit weniger als %s Tagen. Um Geisterkommentare zu vermeiden, werden alle deine Issue/PR-Kommentare gelöscht. confirm_delete_account=Löschen bestätigen delete_account_title=Benutzerkonto löschen delete_account_desc=Bist du sicher, dass du diesen Account dauerhaft löschen möchtest? @@ -653,8 +739,18 @@ email_notifications.onmention=Nur E-Mail bei Erwähnung email_notifications.disable=E-Mail Benachrichtigungen deaktivieren email_notifications.submit=E-Mail-Einstellungen festlegen +visibility=Nutzer Sichtbarkeit +visibility.public=Öffentlich +visibility.public_tooltip=Für alle Nutzer sichtbar +visibility.limited=Begrenzt +visibility.limited_tooltip=Nur für eingeloggte Benutzer sichtbar +visibility.private=Privat +visibility.private_tooltip=Nur für Organisationsmitglieder sichtbar + [repo] +new_repo_helper=Ein Repository enthält alle Projektdateien, einschließlich des Änderungsverlaufs. Schon woanders vorhanden? Migriere das Repository. owner=Besitzer +owner_helper=Einige Organisationen könnten in der Dropdown-Liste nicht angezeigt werden, da die Anzahl an Repositories begrenzt ist. repo_name=Repository-Name repo_name_helper=Ein guter Repository-Name besteht normalerweise aus kurzen, unvergesslichen und einzigartigen Schlagwörtern. repo_size=Repository Größe @@ -672,29 +768,50 @@ fork_repo=Repository forken fork_from=Fork von fork_visibility_helper=Die Sichtbarkeit eines geforkten Repositorys kann nicht geändert werden. use_template=Dieses Template verwenden +clone_in_vsc=In VS Code klonen +download_zip=ZIP herunterladen +download_tar=TAR.GZ herunterladen +download_bundle=BUNDLE herunterladen generate_repo=Repository erstellen generate_from=Erstelle aus repo_desc=Beschreibung +repo_desc_helper=Gib eine kurze Beschreibung an (optional) repo_lang=Sprache repo_gitignore_helper=Wähle eine .gitignore-Vorlage aus. +repo_gitignore_helper_desc=Wähle aus einer Liste an Vorlagen für bekannte Sprachen, welche Dateien ignoriert werden sollen. Typische Artefakte, die durch die Build Tools der gewählten Sprache generiert werden, sind standardmäßig Bestandteil der .gitignore. issue_labels=Issue Label issue_labels_helper=Wähle ein Issue-Label-Set. license=Lizenz license_helper=Wähle eine Lizenz aus. +license_helper_desc=Eine Lizenz regelt, was Andere mit deinem Code (nicht) tun können. Unsicher, welches für dein Projekt die Richtige ist? Siehe eine Lizenz wählen. readme=README readme_helper=Wähle eine README-Vorlage aus. +readme_helper_desc=Hier kannst du eine komplette Beschreibung für dein Projekt schreiben. auto_init=Repository initialisieren (Fügt .gitignore, License und README-Dateien hinzu) +trust_model_helper=Wähle das Vertrauensmodell für die Signaturvalidierung aus. Mögliche Modelle sind: +trust_model_helper_collaborator=Mitarbeiter: Vertraue Signaturen von Mitarbeitern am Projekt +trust_model_helper_committer=Committer: Vertraue Signaturen, die mit ihren Committern übereinstimmen +trust_model_helper_collaborator_committer=Mitarbeiter+Committer: Vertraue Signaturen von Mitarbeitern, die mit dem Committer übereinstimmen +trust_model_helper_default=Standard: Verwende das Standardvertrauensmodell für diese Installation create_repo=Repository erstellen default_branch=Standardbranch +default_branch_helper=Der default Branch ist der Basisbranch für Pull-Requests und Commits. mirror_prune=Entfernen mirror_prune_desc=Entferne veraltete remote-tracking Referenzen mirror_interval=Spiegel-Intervall (gültige Zeiteinheiten sind 'h', 'm', 's'). 0 schaltet die automatische Synchronisierung aus. mirror_interval_invalid=Das Spiegel-Intervall ist ungültig. mirror_address=Klonen via URL -mirror_address_desc=Gib alle erforderlichen Anmeldedaten im Abschnitt "Autorisierung klonen" ein. +mirror_address_desc=Gib alle erforderlichen Anmeldedaten im Abschnitt "Authentifizierung" ein. mirror_address_url_invalid=Die angegebene URL ist ungültig. Achte darauf, alle URL-Komponenten korrekt zu maskieren. mirror_address_protocol_invalid=Die angegebene URL ist ungültig. Nur Pfade beginnend mit http(s):// oder git:// können gespiegelt werden. +mirror_lfs=Großdatei-Speicher (LFS) +mirror_lfs_desc=Mirroring von LFS-Dateien aktivieren. +mirror_lfs_endpoint=LFS-Endpunkt +mirror_lfs_endpoint_desc=Sync wird versuchen, die Klon-URL zu verwenden, um den LFS-Server zu bestimmen. Du kannst auch einen eigenen Endpunkt angeben, wenn die LFS-Dateien woanders gespeichert werden. mirror_last_synced=Zuletzt synchronisiert +mirror_password_placeholder=(unverändert) +mirror_password_blank_placeholder=(Nicht gesetzt) +mirror_password_help=Ändere den Benutzernamen, um ein gespeichertes Passwort zu löschen. watchers=Beobachter stargazers=Favorisiert von forks=Forks @@ -711,6 +828,14 @@ delete_preexisting_label=Löschen delete_preexisting=Vorhandene Dateien löschen delete_preexisting_content=Dateien in %s löschen delete_preexisting_success=Nicht übernommene Dateien in %s gelöscht +blame_prior=Blame vor dieser Änderung anzeigen + +transfer.accept=Übertragung Akzeptieren +transfer.accept_desc=Übertragung nach "%s" +transfer.reject=Übertragung Ablehnen +transfer.reject_desc=Übertragung nach "%s " abbrechen +transfer.no_permission_to_accept=Du hast nicht die Berechtigung die Übertragung zu akzeptieren +transfer.no_permission_to_reject=Du hast nicht die Berechtigung die Übertragung abzubrechen desc.private=Privat desc.public=Öffentlich @@ -735,15 +860,21 @@ archive.title=Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, archive.issue.nocomment=Dieses Repo ist archiviert. Du kannst Issues nicht kommentieren. archive.pull.nocomment=Dieses Repo ist archiviert. Du kannst Pull-Requests nicht kommentieren. -form.reach_limit_of_creation=Du hast bereits dein Limit von %d Repositories erreicht. +form.reach_limit_of_creation_1=Du hast bereits dein Limit von %d Repository erreicht. +form.reach_limit_of_creation_n=Du hast bereits dein Limit von %d Repositories erreicht. form.name_reserved=Der Repository-Name „%s“ ist reserviert. form.name_pattern_not_allowed='%s' ist nicht erlaubt für Repository-Namen. -need_auth=Authentifizierung zum Klonen benötigt +need_auth=Authentifizierung migrate_options=Migrationsoptionen migrate_service=Migrationsdienst migrate_options_mirror_helper=Dieses Repository wird ein Mirror sein migrate_options_mirror_disabled=Dein Administrator hat neue Mirrors deaktiviert. +migrate_options_lfs=LFS-Dateien migrieren +migrate_options_lfs_endpoint.label=LFS-Endpunkt +migrate_options_lfs_endpoint.description=Migration wird versuchen, über den entfernten Git-Server den LFS-Server zu bestimmen. Du kannst auch einen eigenen Endpunkt angeben, wenn die LFS-Dateien woanders gespeichert werden. +migrate_options_lfs_endpoint.description.local=Ein lokaler Serverpfad wird ebenfalls unterstützt. +migrate_options_lfs_endpoint.placeholder=Leer lassen, um aus der Klon-URL abzuleiten migrate_items=Migrationselemente migrate_items_wiki=Wiki migrate_items_milestones=Meilensteine @@ -757,19 +888,31 @@ migrate.clone_address=Migrations- / Klon-URL migrate.clone_address_desc=Die HTTP(S)- oder „git clone“-URL eines bereits existierenden Repositorys migrate.clone_local_path=oder ein lokaler Serverpfad migrate.permission_denied=Du hast keine Berechtigung zum Importieren lokaler Repositories. +migrate.permission_denied_blocked=Du darfst nicht von geblockten Hosts importieren. +migrate.permission_denied_private_ip=Du darfst nicht von privaten IP-Addressen importieren. migrate.invalid_local_path=Der lokale Pfad ist ungültig, existiert nicht oder ist kein Ordner. +migrate.invalid_lfs_endpoint=Ungültiger LFS Endpunkt. migrate.failed=Fehler bei der Migration: %v -migrate.lfs_mirror_unsupported=Spiegeln von LFS-Objekten wird nicht unterstützt - nutze stattdessen 'git lfs fetch --all' und 'git lfs push --all'. migrate.migrate_items_options=Zugangs-Token wird benötigt, um zusätzliche Elemente zu migrieren migrated_from=Migriert von %[2]s migrated_from_fake=Migriert von %[1]s migrate.migrate=Migrieren von %s migrate.migrating=Migriere von %s ... migrate.migrating_failed=Migrieren von %s fehlgeschlagen. -migrate.github.description=Migriere Daten von Github.com oder Github Enterprise. -migrate.git.description=Migriere oder spiegele git-Daten von Git-Services -migrate.gitlab.description=Migriere Daten von GitLab.com oder einem selbst gehostetem gitlab Server. -migrate.gitea.description=Migriere Daten von Gitea.com oder einem selbst gehostetem Gitea Server. +migrate.migrating_failed.error=Fehler: %s +migrate.github.description=Daten von github.com oder anderen GitHub Instanzen migrieren. +migrate.git.description=Ein Repository von einem beliebigen Git Service klonen. +migrate.gitlab.description=Daten von gitlab.com oder anderen GitLab Instanzen migrieren. +migrate.gitea.description=Daten von gitea.com oder anderen Gitea Instanzen migrieren. +migrate.gogs.description=Daten von notabug.org oder anderen Gogs Instanzen migrieren. +migrate.onedev.description=Daten von code.onedev.io oder anderen OneDev Instanzen migrieren. +migrate.migrating_git=Git Daten werden migriert +migrate.migrating_topics=Themen werden migriert +migrate.migrating_milestones=Meilensteine werden migriert +migrate.migrating_labels=Labels werden migriert +migrate.migrating_releases=Releases werden migriert +migrate.migrating_issues=Issues werden migriert +migrate.migrating_pulls=Pull Requests werden migriert mirror_from=Mirror von forked_from=geforkt von @@ -802,6 +945,7 @@ branch=Branch tree=Struktur clear_ref=`Aktuelle Referenz löschen` filter_branch_and_tag=Branch oder Tag filtern +find_tag=Tag finden branches=Branches tags=Tags issues=Issues @@ -820,6 +964,8 @@ tag=Tag released_this=hat released file_raw=Originalformat file_history=Verlauf +file_view_source=Quelltext anzeigen +file_view_rendered=Ansicht rendern file_view_raw=Originalformat anzeigen file_permalink=Permalink file_too_large=Die Datei ist zu groß zum Anzeigen. @@ -861,6 +1007,7 @@ editor.add=„%s“ hinzufügen editor.update=„%s“ ändern editor.delete=„%s“ löschen editor.commit_message_desc=Eine ausführlichere (optionale) Beschreibung hinzufügen… +editor.signoff_desc=Am Ende der Commit Nachricht einen Signed-off-by Anhang vom Committer hinzufügen. editor.commit_directly_to_this_branch=Direkt in den Branch „%s“ einchecken. editor.create_new_branch=Einen neuen Branch für diesen Commit erstellen und einen Pull Request starten. editor.create_new_branch_np=Erstelle einen neuen Branch für diesen Commit. @@ -898,6 +1045,7 @@ editor.require_signed_commit=Branch erfordert einen signierten Commit commits.desc=Durchsuche die Quellcode-Änderungshistorie. commits.commits=Commits commits.no_commits=Keine gemeinsamen Commits. '%s' and '%s' haben vollständig unterschiedliche Historien. +commits.nothing_to_compare=Diese Branches sind auf demselben Stand. commits.search=Commits durchsuchen… commits.search.tooltip=Du kannst Suchbegriffen "author:", " committer:", "after:", oder " before:" voranstellen, z.B. "revert author:Alice before:2019-04-01". commits.find=Suchen @@ -916,7 +1064,9 @@ ext_issues=Externe Issues ext_issues.desc=Link zu externem Issuetracker. projects=Projekte -projects.desc=Verwalte Issue und Pull-Requests in Projektboards. +projects.desc=Verwalte Issues und Pull-Requests in Projektboards. +projects.description=Beschreibung (optional) +projects.description_placeholder=Beschreibung projects.create=Projekt erstellen projects.title=Titel projects.new=Neues Projekt @@ -940,6 +1090,8 @@ projects.board.edit_title=Neuer Boardname projects.board.new_title=Neuer Boardname projects.board.new_submit=Bestätigen projects.board.new=Neues Board +projects.board.set_default=Als Standard verwenden +projects.board.set_default_desc=Dieses Board als Standard für unkategorisierte Issues und Pull Requests festlegen projects.board.delete=Board löschen projects.board.deletion_desc=Beim Löschen eines Projektboards werden alle Einträge nach 'Uncategorized' verschoben. Fortfahren? projects.open=Öffnen @@ -990,11 +1142,16 @@ issues.label_templates.info=Es existieren noch keine Label. Erstelle ein neues L issues.label_templates.helper=Wähle ein Label-Set issues.label_templates.use=Label-Set verwenden issues.label_templates.fail_to_load_file=Fehler beim Laden der Label-Vorlagendatei „%s“: %v +issues.add_label=hat das Label %s %s hinzugefügt +issues.add_labels=hat die Labels %s %s hinzugefügt +issues.remove_label=hat das Label %s %s entfernt +issues.remove_labels=hat die Labels %s %s entfernt +issues.add_remove_labels=hat %s hinzugefügt, und %s %s enternt issues.add_milestone_at=`hat diesen Issue %[2]s zum %[1]s Meilenstein hinzugefügt` issues.add_project_at=`hat dieses zum %s projekt %s hinzugefügt` issues.change_milestone_at=`hat den Meilenstein %[3]s von %[1]s zu %[2]s geändert` issues.change_project_at=`hat das Projekt %[3]s von %[1]s zu %[2]s geändert` -issues.remove_milestone_at=`hat diesen Issue %[2]s vom %[1]s Meilenstein entfernt` +issues.remove_milestone_at=`hat dieses Issue %[2]s vom %[1]s Meilenstein entfernt` issues.remove_project_at=`hat dieses vom %s Projekt %s entfernt` issues.deleted_milestone=`(gelöscht)` issues.deleted_project=`(gelöscht)` @@ -1018,6 +1175,7 @@ issues.filter_type.all_issues=Alle Issues issues.filter_type.assigned_to_you=Dir zugewiesen issues.filter_type.created_by_you=Von dir erstellt issues.filter_type.mentioning_you=Hat dich erwähnt +issues.filter_type.review_requested=Review angefordert issues.filter_sort=Sortieren issues.filter_sort.latest=Neueste issues.filter_sort.oldest=Älteste @@ -1053,11 +1211,13 @@ issues.commented_at=`hat %s kommentiert` issues.delete_comment_confirm=Bist du sicher dass du diesen Kommentar löschen möchtest? issues.context.copy_link=Link kopieren issues.context.quote_reply=Antwort zitieren +issues.context.reference_issue=In neuem Issue referenzieren issues.context.edit=Bearbeiten issues.context.delete=Löschen issues.no_content=Hier gibt es bis jetzt noch keinen Inhalt. issues.close_issue=Schließen -issues.pull_merged_at=`hat den Commit %[2]s in %[3]s %[4]s gemergt` +issues.pull_merged_at=`mergte den Commit %[2]s %[4]s in %[3]s` +issues.manually_pull_merged_at=`mergte den Commit %[2]s %[4]s manuell in %[3]s` issues.close_comment_issue=Kommentieren und schließen issues.reopen_issue=Wieder öffnen issues.reopen_comment_issue=Kommentieren und wieder öffnen @@ -1079,6 +1239,8 @@ issues.re_request_review=Review erneut anfordern issues.is_stale=Seit diesem Review gab es Änderungen an diesem PR issues.remove_request_review=Review-Anfrage entfernen issues.remove_request_review_block=Review-Anfrage kann nicht entfernt werden +issues.dismiss_review=Review verwerfen +issues.dismiss_review_warning=Bist du dir sicher, dass du dieses Review verwerfen willst? issues.sign_in_require_desc=Anmelden, um an der Diskussion teilzunehmen. issues.edit=Bearbeiten issues.cancel=Abbrechen @@ -1123,14 +1285,17 @@ issues.lock.title=Diskussion zu diesem Issue sperren. issues.unlock.title=Diskussion zu diesem Issue entsperren. issues.comment_on_locked=Du kannst einen gesperrten Issue nicht kommentieren. issues.tracker=Zeiterfassung -issues.start_tracking_short=Start +issues.start_tracking_short=Zeiterfassung starten issues.start_tracking=Zeiterfassung starten issues.start_tracking_history=hat die Zeiterfassung %s gestartet issues.tracker_auto_close=Der Timer wird automatisch gestoppt, wenn dieser Issue geschlossen wird issues.tracking_already_started=`Du hast die Zeiterfassung bereits in diesem Issue gestartet!` -issues.stop_tracking=Stopp +issues.stop_tracking=Zeiterfassung stoppen issues.stop_tracking_history=hat die Zeiterfassung %s angehalten +issues.cancel_tracking=Verwerfen +issues.cancel_tracking_history=hat die Zeiterfassung %s abgebrochen issues.add_time=Zeit manuell hinzufügen +issues.del_time=Diese Zeiterfassung löschen issues.add_time_short=Zeit hinzufügen issues.add_time_cancel=Abbrechen issues.add_time_history=`hat %s gearbeitete Zeit hinzugefügt` @@ -1138,8 +1303,6 @@ issues.del_time_history=`hat %s gearbeitete Zeit gelöscht` issues.add_time_hours=Stunden issues.add_time_minutes=Minuten issues.add_time_sum_to_small=Es wurde keine Zeit eingegeben. -issues.cancel_tracking=Abbrechen -issues.cancel_tracking_history=hat die Zeiterfassung %s abgebrochen issues.time_spent_total=Zeitaufwand insgesamt issues.time_spent_from_all_authors=`Aufgewendete Zeit: %s` issues.due_date=Fällig am @@ -1148,7 +1311,7 @@ issues.error_modifying_due_date=Fehler beim Ändern des Fälligkeitsdatums. issues.error_removing_due_date=Fehler beim Entfernen des Fälligkeitsdatums. issues.push_commit_1=hat %d Commit %s hinzugefügt issues.push_commits_n=hat %d Commits %s hinzugefügt -issues.force_push_codes=`force-pushte %[1]s von %[2]s auf %[4]s %[6]s` +issues.force_push_codes=`hat %[6]s %[1]s von %[2]s zu %[4]s force-gepusht` issues.due_date_form=JJJJ-MM-TT issues.due_date_form_add=Fälligkeitsdatum hinzufügen issues.due_date_form_edit=Bearbeiten @@ -1169,8 +1332,8 @@ issues.dependency.remove=Entfernen issues.dependency.remove_info=Abhängigkeit löschen issues.dependency.added_dependency=`hat eine neue Abhängigkeit %s hinzugefügt` issues.dependency.removed_dependency=`hat eine Abhängigkeit %s entfernt` -issues.dependency.issue_closing_blockedby=Das Schließen dieses Pull-Requests wird von den folgenden Issues blockiert -issues.dependency.pr_closing_blockedby=Das Schließen dieses Issues wird von den folgenden Issues blockiert +issues.dependency.pr_closing_blockedby=Das Schließen dieses Pull-Requests wird von den folgenden Issues blockiert +issues.dependency.issue_closing_blockedby=Das Schließen dieses Issues wird von den folgenden Issues blockiert issues.dependency.issue_close_blocks=Dieses Issue blockiert die Schließung der folgenden Issues issues.dependency.pr_close_blocks=Dieser Pull-Request blockiert die Schließung der folgenden Issues issues.dependency.issue_close_blocked=Du musst alle Issues, die dieses Issue blockieren, schließen, bevor du es schließen kannst. @@ -1191,6 +1354,8 @@ issues.review.self.approval=Du kannst nicht dein eigenen Pull-Request genehmigen issues.review.self.rejection=Du kannst keine Änderungen an deinem eigenen Pull-Request anfragen. issues.review.approve=hat die Änderungen %s genehmigt issues.review.comment=hat %s überprüft +issues.review.dismissed=verwarf %ss Review %s +issues.review.dismissed_label=Verworfen issues.review.left_comment=hat einen Kommentar hinterlassen issues.review.content.empty=Du musst einen Kommentar hinterlassen, der die gewünschte(n) Änderung(en) beschreibt. issues.review.reject=hat %s Änderungen angefragt @@ -1210,35 +1375,46 @@ issues.review.resolve_conversation=Diskussion als "erledigt" markieren issues.review.un_resolve_conversation=Diskussion als "nicht-erledigt" markieren issues.review.resolved_by=markierte diese Unterhaltung als gelöst issues.assignee.error=Aufgrund eines unerwarteten Fehlers konnten nicht alle Beauftragten hinzugefügt werden. +issues.reference_issue.body=Beschreibung + +compare.compare_base=Basis +compare.compare_head=vergleichen pulls.desc=Pull-Requests und Code-Reviews aktivieren. pulls.new=Neuer Pull-Request pulls.compare_changes=Neuer Pull-Request -pulls.compare_changes_desc=Wähle die Ziel- und Quellbranch aus. +pulls.compare_changes_desc=Wähle den Ziel- und Quellbranch aus. pulls.compare_base=Ziel pulls.compare_compare=pullen von pulls.filter_branch=Branch filtern pulls.no_results=Keine Ergebnisse verfügbar. pulls.nothing_to_compare=Diese Branches sind identisch. Es muss kein Pull-Request erstellt werden. +pulls.nothing_to_compare_and_allow_empty_pr=Diese Branches sind gleich. Der Pull-Request wird leer sein. pulls.has_pull_request=`Es existiert bereits ein Pull-Request zwischen diesen beiden Branches: %[2]s#%[3]d` pulls.create=Pull-Request erstellen -pulls.title_desc=möchte %[1]d Commits von %[2]s nach %[3]s zusammenführen +pulls.title_desc=möchte %[1]d Commits von %[2]s nach %[3]s mergen pulls.merged_title_desc=hat %[1]d Commits von %[2]s nach %[3]s %[4]s zusammengeführt pulls.change_target_branch_at=`hat den Zielbranch von %s nach %s %s geändert` pulls.tab_conversation=Diskussion pulls.tab_commits=Commits pulls.tab_files=Geänderte Dateien -pulls.reopen_to_merge=Bitte diesen Pull-Request wieder öffnen, um die Merge-Operation auszuführen. +pulls.reopen_to_merge=Bitte diesen Pull-Request wieder öffnen, um zu mergen. pulls.cant_reopen_deleted_branch=Dieser Pull-Request kann nicht wieder geöffnet werden, da die Branche bereits gelöscht wurde. pulls.merged=Zusammengeführt -pulls.merged_as=Der Pull Request wurde als %[2]s zusammengeführt. +pulls.merged_as=Der Pull Request wurde als %[2]s gemergt. +pulls.manually_merged=Manuell gemergt +pulls.manually_merged_as=Dieser Pull Request wurde manuell als %[2]s gemergt. pulls.is_closed=Der Pull-Request wurde geschlossen. -pulls.has_merged=Der Pull-Request wurde zusammengeführt. -pulls.title_wip_desc=`Beginne den Titel mit %s um zu verhindern, dass der Pull Request versehentlich zusammengeführt wird.` -pulls.cannot_merge_work_in_progress=Dieser Pull Request wurde als Work In Progress markiert. Entferne den %s-Präfix vom Titel, wenn dieser fertig ist. +pulls.has_merged=Der Pull-Request wurde gemergt. +pulls.title_wip_desc=`Beginne den Titel mit %s um zu verhindern, dass der Pull Request versehentlich gemergt wird.` +pulls.cannot_merge_work_in_progress=Dieser Pull Request ist als Work in Progress markiert. +pulls.still_in_progress=Noch in Bearbeitung? +pulls.add_prefix=%s Präfix hinzufügen +pulls.remove_prefix=%s Präfix entfernen pulls.data_broken=Dieser Pull-Requests ist kaputt, da Fork-Informationen gelöscht wurden. pulls.files_conflicted=Dieser Pull-Request hat Änderungen, die im Widerspruch zum Ziel-Branch stehen. pulls.is_checking=Die Konfliktprüfung läuft noch. Bitte aktualisiere die Seite in wenigen Augenblicken. +pulls.is_empty=Dieser Branch ist gleich mit dem Zielbranch. pulls.required_status_check_failed=Einige erforderliche Prüfungen waren nicht erfolgreich. pulls.required_status_check_missing=Einige erforderliche Prüfungen fehlen. pulls.required_status_check_administrator=Als Administrator kannst du diesen Pull-Request weiterhin zusammenführen. @@ -1248,9 +1424,9 @@ pulls.blocked_by_official_review_requests=Dieser Pull Request hat offizielle Rev pulls.blocked_by_outdated_branch=Dieser Pull Request ist blockiert, da er veraltet ist. pulls.blocked_by_changed_protected_files_1=Diese Pull Request ist blockiert, weil er eine geschützte Datei ändert: pulls.blocked_by_changed_protected_files_n=Dieser Pull Request ist blockiert, weil er geschützte Dateien ändert: -pulls.can_auto_merge_desc=Dieser Pull-Request kann automatisch zusammengeführt werden. -pulls.cannot_auto_merge_desc=Dieser Pull-Request kann nicht automatisch zusammengeführt werden, da es Konflikte gibt. -pulls.cannot_auto_merge_helper=Bitte manuell zusammenführen, um die Konflikte zu lösen. +pulls.can_auto_merge_desc=Dieser Pull-Request kann automatisch gemergt werden. +pulls.cannot_auto_merge_desc=Dieser Pull-Request kann nicht automatisch gemergt werden, da es Konflikte gibt. +pulls.cannot_auto_merge_helper=Bitte manuell mergen, um die Konflikte zu beheben. pulls.num_conflicting_files_1=%d Datei mit Konflikten pulls.num_conflicting_files_n=%d Dateien mit Konflikten pulls.approve_count_1=%d Zustimmung @@ -1259,17 +1435,20 @@ pulls.reject_count_1=%d Änderungsanfrage pulls.reject_count_n=%d Änderungsanfragen pulls.waiting_count_1=%d wartendes Review pulls.waiting_count_n=%d wartende Reviews +pulls.wrong_commit_id=die Commit ID muss eine Commit ID auf dem Zielbranch sein pulls.no_merge_desc=Dieser Pull-Request kann nicht gemerged werden, da keine Mergeoptionen aktiviert sind. pulls.no_merge_helper=Aktiviere Mergeoptionen in den Repositoryeinstellungen oder merge den Pull-Request manuell. -pulls.no_merge_wip=Dieser Pull Request kann nicht zusammengeführt werden, da er als Work In Progress gekennzeichnet ist. -pulls.no_merge_not_ready=Dieser Pull-Request kann nicht zusammengeführt werden, überprüfe den Reviewstatus und die Statusprüfungen. +pulls.no_merge_wip=Dieser Pull Request kann nicht gemergt werden, da er als Work In Progress gekennzeichnet ist. +pulls.no_merge_not_ready=Dieser Pull-Request kann nicht gemergt werden, überprüfe den Reviewstatus und die Statusprüfungen. pulls.no_merge_access=Du bist nicht berechtigt, diesen Pull-Request zu Mergen. -pulls.merge_pull_request=Pull-Request zusammenführen -pulls.rebase_merge_pull_request=Rebase und Mergen -pulls.rebase_merge_commit_pull_request=Rebasen und Mergen (--no-ff) -pulls.squash_merge_pull_request=Zusammenfassen und Mergen -pulls.require_signed_wont_sign=Die Branch erfordert einen signierten Commit, aber dieser Merge wird nicht signiert +pulls.merge_pull_request=Merge Commit erstellen +pulls.rebase_merge_pull_request=Rebasen und dann fast-forwarden +pulls.rebase_merge_commit_pull_request=Rebasen und dann mergen +pulls.squash_merge_pull_request=Squash Commit erstellen +pulls.merge_manually=Manuell mergen +pulls.merge_commit_id=Der Mergecommit ID +pulls.require_signed_wont_sign=Der Branch erfordert einen signierten Commit, aber dieser Merge wird nicht signiert pulls.invalid_merge_option=Du kannst diese Mergeoption auf diesen Pull-Request nicht anwenden. pulls.merge_conflict=Zusammenführen fehlgeschlagen: Beim Zusammenführen gab es einen Konflikt. Hinweis: Probiere eine andere Strategie pulls.merge_conflict_summary=Fehlermeldung @@ -1402,7 +1581,7 @@ activity.closed_issues_count_1=Geschlossenes Issue activity.closed_issues_count_n=Geschlossene Issues activity.title.issues_1=%d Issue activity.title.issues_n=%d Issues -activity.title.issues_closed_by=%s von %s geschlossen +activity.title.issues_closed_from=%s von %s geschlossen activity.title.issues_created_by=%s von %s erstellt activity.closed_issue_label=Geschlossen activity.new_issues_count_1=Neuer Issue @@ -1440,6 +1619,8 @@ activity.git_stats_deletion_n=%d Löschungen search=Suchen search.search_repo=Repository durchsuchen +search.fuzzy=Ähnlich +search.match=Genau search.results=Suchergebnisse für „%s“ in %s settings=Einstellungen @@ -1455,6 +1636,15 @@ settings.hooks=Webhooks settings.githooks=Git-Hooks settings.basic_settings=Grundeinstellungen settings.mirror_settings=Mirror-Einstellungen +settings.mirror_settings.docs=Richte dein Projekt so ein, dass Änderungen automatisch in ein anderes Repository gepusht, oder aus einem anderen Repository gepullt werden. Branches, tags und commits werden dann automatisch synchronisiert. Wie kann ich ein Repository spiegeln? (Englisch) +settings.mirror_settings.mirrored_repository=Gespiegeltes Repository +settings.mirror_settings.direction=Richtung +settings.mirror_settings.direction.pull=Pull +settings.mirror_settings.direction.push=Push +settings.mirror_settings.last_update=Letzte Aktualisierung +settings.mirror_settings.push_mirror.none=Keine Push-Mirrors konfiguriert +settings.mirror_settings.push_mirror.remote_url=URL zum Git-Remote-Repository +settings.mirror_settings.push_mirror.add=Push-Mirror hinzufügen settings.sync_mirror=Jetzt synchronisieren settings.mirror_sync_in_progress=Mirror-Synchronisierung wird zurzeit ausgeführt. Komm in ein paar Minuten zurück. settings.email_notifications.enable=E-Mail Benachrichtigungen aktivieren @@ -1463,6 +1653,7 @@ settings.email_notifications.disable=E-Mail Benachrichtigungen deaktivieren settings.email_notifications.submit=E-Mail-Einstellungen festlegen settings.site=Webseite settings.update_settings=Einstellungen speichern +settings.branches.update_default_branch=Standardbranch aktualisieren settings.advanced_settings=Erweiterte Einstellungen settings.wiki_desc=Repository-Wiki aktivieren settings.use_internal_wiki=Eingebautes Wiki verwenden @@ -1490,6 +1681,9 @@ settings.pulls.allow_merge_commits=Mergecommits aktivieren settings.pulls.allow_rebase_merge=Mergen von Commits durch Rebasen aktivieren settings.pulls.allow_rebase_merge_commit=Rebasing mit expliziten merge commits aktivieren (--no-ff) settings.pulls.allow_squash_commits=Mergen von Commits durch Squash aktivieren +settings.pulls.allow_manual_merge=Manuelles Mergen von Pull Requests aktivieren +settings.pulls.enable_autodetect_manual_merge=Autoerkennung von manuellen Merges aktivieren (in Ausnahmefällen können Fehleinschätzungen auftreten) +settings.pulls.default_delete_branch_after_merge=Standardmäßig bei Pull-Requests den Branch nach dem Mergen löschen settings.projects_desc=Repository-Projekte aktivieren settings.admin_settings=Administratoreinstellungen settings.admin_enable_health_check=Repository-Health-Checks aktivieren (git fsck) @@ -1507,10 +1701,21 @@ settings.convert_fork_notices_1=Dieser Vorgang konvertiert den Fork in ein norma settings.convert_fork_confirm=Repository umwandeln settings.convert_fork_succeed=Der Fork wurde in ein normales Repository konvertiert. settings.transfer=Besitz übertragen +settings.transfer.rejected=Repository-Übertragung wurde abgelehnt. +settings.transfer.success=Repository-Übertragung war erfolgreich. +settings.transfer_abort=Übertragung abbrechen +settings.transfer_abort_invalid=Du kannst nur eingeleitete Repository-Übertragung abbrechen. +settings.transfer_abort_success=Die Übertragung nach %s wurde erfolgreich abgebrochen. settings.transfer_desc=Übertrage dieses Repository auf einen anderen Benutzer oder eine Organisation, in der du Admin-Rechte hast. +settings.transfer_form_title=Gib den Repository-Namen zur Bestätigung ein: +settings.transfer_in_progress=Es gibt derzeit eine laufende Übertragung. Bitte brich diese ab, wenn du dieses Repository an einen anderen Benutzer übertragen möchtest. settings.transfer_notices_1=– Du wirst keinen Zugriff mehr haben, wenn der neue Besitzer ein individueller Benutzer ist. settings.transfer_notices_2=– Du wirst weiterhin Zugriff haben, wenn der neue Besitzer eine Organisation ist und du einer der Besitzer bist. -settings.transfer_form_title=Gib den Repository-Namen zur Bestätigung ein: +settings.transfer_notices_3=- Wenn das Repository privat ist und an einen einzelnen Benutzer übertragen wird, wird sichergestellt, dass der Benutzer mindestens Leserechte hat (und die Berechtigungen werden gegebenenfalls ändert). +settings.transfer_owner=Neuer Besitzer +settings.transfer_perform=Übertragung durchführen +settings.transfer_started=Für dieses Repository wurde eine Übertragung eingeleitet und wartet nun auf die Bestätigung von "%s" +settings.transfer_succeed=Das Repository wurde transferiert. settings.signing_settings=Signaturüberprüfungseinstellungen settings.trust_model=Signaturvertrauensmodell settings.trust_model.default=Standardvertrauensmodell @@ -1520,6 +1725,7 @@ settings.trust_model.collaborator.long=Mitarbeiter: Vertraue Signaturen von Mita settings.trust_model.collaborator.desc=Gültige Signaturen von Mitarbeitern dieses Projekts werden als "vertrauenswürdig" markiert - ( egal ob sie mit dem Committer übereinstimmen oder nicht). Andernfalls werden gültige Signaturen als "nicht vertrauenswürdig" markiert, unabhängig ob die Signatur mit dem Committer übereinstimmt oder nicht. settings.trust_model.committer=Committer settings.trust_model.committer.long=Committer: Vertraue Signaturen, die zu Committern passen (Dies stimmt mit GitHub überein und zwingt signierte Commits von Gitea dazu, Gitea als Committer zu haben) +settings.trust_model.committer.desc=Gültige Signaturen von Mitwirkenden werden als "vertrauenswürdig" gekennzeichnet, wenn sie mit ihrem Committer übereinstimmen. Ansonsten werden sie als "nicht übereinstimmend" markiert. Das führt dazu, dass Gitea auf signierten Commits, bei denen der echte Committer als Co-authored-by: oder Co-committed-by in der Beschreibung eingetragen wurde, als Committer gilt. Der Standard Gitea Schlüssel muss auf einen User in der Datenbank zeigen. settings.trust_model.collaboratorcommitter=Mitarbeiter+Committer settings.trust_model.collaboratorcommitter.long=Mitarbeiter+Committer: Signaturen der Mitarbeiter vertrauen die mit dem Committer übereinstimmen settings.trust_model.collaboratorcommitter.desc=Gültige Signaturen von Mitarbeitern dieses Projekts werden als "vertrauenswürdig" markiert, wenn sie mit dem Committer übereinstimmen. Andernfalls werden gültige Signaturen als "nicht vertrauenswürdig" markiert, wenn die Signatur mit dem Committer übereinstimmt als "nicht übereinstimmend". Dies zwingt Gitea als Committer bei signierten Commits mit dem tatsächlichen Committer als Co-Authored-By: und Co-Committed-By: Trailer im Commit. Der Standard-Gitea-Schlüssel muss mit einem Benutzer in der Datenbank übereinstimmen. @@ -1535,9 +1741,6 @@ settings.delete_notices_2=– Die Operation wird das %s-Reposit settings.delete_notices_fork_1=– Forks dieses Repositorys werden nach dem Löschen unabhängig. settings.deletion_success=Das Repository wurde gelöscht. settings.update_settings_success=Repository-Einstellungen wurden aktualisiert. -settings.transfer_owner=Neuer Besitzer -settings.make_transfer=Transfer durchführen -settings.transfer_succeed=Das Repository wurde transferiert. settings.confirm_delete=Repository löschen settings.add_collaborator=Mitarbeiter hinzufügen settings.add_collaborator_success=Der Mitarbeiter wurde hinzugefügt. @@ -1632,7 +1835,7 @@ settings.event_pull_request_review_desc=Pull-Request genehmigt, abgelehnt oder K settings.event_pull_request_sync=Pull-Request synchronisiert settings.event_pull_request_sync_desc=Pull-Request synchronisiert. settings.branch_filter=Branch-Filter -settings.branch_filter_desc=Branch-Whitelist für Push, Brancherstellung und Branchlöschung, als glob pattern. Ist dieser leer oder nur * angegeben, werden Ereignisse für alle Branches gemeldet. Siehe Dokumentation unter github.com/gobwas/glob für die Syntax. Beispiele: master, {master,release*}. +settings.branch_filter_desc=Whitelist für Branches für Push-, Erzeugungs- und Löschevents, als glob Pattern beschrieben. Es werden Events für alle Branches gemeldet, falls das Pattern * ist, oder falls es leer ist. Siehe die github.com/gobwas/glob Dokumentation für die Syntax (Englisch). Beispiele: master, {master,release*}. settings.active=Aktiv settings.active_helper=Informationen über ausgelöste Ereignisse werden an diese Webhook-URL gesendet. settings.add_hook_success=Webhook wurde hinzugefügt. @@ -1651,6 +1854,7 @@ settings.add_telegram_hook_desc=Telegram-Integration zu deinem settings.add_matrix_hook_desc=Matrix-Integration zu deinem Repository hinzufügen. settings.add_msteams_hook_desc="Microsoft Teams"-Integration zu deinem Repository hinzufügen. settings.add_feishu_hook_desc=Feishu-Integration zu deinem Repository hinzufügen. +settings.add_Wechat_hook_desc=Wechatwork in dein Repository integrieren. settings.deploy_keys=Deploy-Schlüssel settings.add_deploy_key=Deploy-Schlüssel hinzufügen settings.deploy_key_desc=Deploy-Keys haben nur Lesezugriff auf das Repository. @@ -1689,7 +1893,7 @@ settings.protect_merge_whitelist_committers_desc=Erlaube Nutzern oder Teams auf settings.protect_merge_whitelist_users=Nutzer, die mergen dürfen: settings.protect_merge_whitelist_teams=Teams, die mergen dürfen: settings.protect_check_status_contexts=Statusprüfungen aktivieren -settings.protect_check_status_contexts_desc=Statusprüfungen vor dem Zusammenführen erforderlich. Wähle aus, welche Statusprüfungen erfolgreich durchgeführt werden müssen, bevor Branches in einen anderen zusammengeführt werden können, der dieser Regel entspricht. Wenn aktiviert, müssen Commits zuerst auf einen anderen Branch gepusht werden, dann nach bestandener Statusprüfung zusammengeführt oder direkt auf den Branch gepusht werden, der dieser Regel entspricht. Wenn keine Kontext ausgewählt ist, muss der letzte Commit unabhängig vom Kontext erfolgreich sein. +settings.protect_check_status_contexts_desc=Vor dem Mergen müssen Statusprüfungen bestanden werden. Wähle aus, welche Statusprüfungen erfolgreich durchgeführt werden müssen, bevor Branches in einen anderen gemergt werden können, der dieser Regel entspricht. Wenn aktiviert, müssen Commits zuerst auf einen anderen Branch gepusht werden, dann nach bestandener Statusprüfung gemergt oder direkt auf einen Branch gepusht werden, der dieser Regel entspricht. Wenn kein Kontext ausgewählt ist, muss der letzte Commit unabhängig vom Kontext erfolgreich sein. settings.protect_check_status_contexts_list=Statusprüfungen, die in der letzten Woche für dieses Repository gefunden wurden settings.protect_required_approvals=Erforderliche Zustimmungen: settings.protect_required_approvals_desc=Erlaube nur Pull-Request mit genügend positiven Reviews zusammenzuführen. @@ -1702,7 +1906,7 @@ settings.dismiss_stale_approvals_desc=Wenn neue Commits gepusht werden, die den settings.require_signed_commits=Signierte Commits erforderlich settings.require_signed_commits_desc=Pushes auf diesen Branch ablehnen, wenn Commits nicht signiert oder nicht überprüfbar sind. settings.protect_protected_file_patterns=Geschützte Dateimuster (durch Semikolon getrennt '\;'): -settings.protect_protected_file_patterns_desc=Geschützte Dateien, die nicht direkt geändert werden dürfen, auch wenn der Benutzer die Rechte hat, Dateien in diesem Branch hinzuzufügen, zu bearbeiten oder zu löschen. Mehrere Muster können mit Semikolon ('\;') getrennt werden. Siehe github.com/gobwas/glob Dokumentation für Mustersyntax. Beispiele: .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns_desc=Geschützte Dateien, die nicht einmal geändert werden können, wenn der Benutzer die Rechte hat, Dateien in diesem Branch hinzuzufügen, zu bearbeiten, oder zu löschen. Verschiedene Pattern können per Semicolon (';') getrennt werden. Siehe die github.com/gobwas/glob Dokumentation für die Pattern Syntax (Englisch). Beispiele: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Schutz aktivieren settings.delete_protected_branch=Schutz deaktivieren settings.update_protect_branch_success=Branch-Schutz für den Branch „%s“ wurde geändert. @@ -1714,12 +1918,23 @@ settings.block_rejected_reviews_desc=Mergen ist nicht möglich, wenn Änderungen settings.block_on_official_review_requests=Mergen bei offiziellen Review-Anfragen blockieren settings.block_on_official_review_requests_desc=Zusammenführung wird nicht möglich sein, wenn offizielle Review-Anfrangen vorliegen, selbst wenn genügend Genehmigungen vorliegen. settings.block_outdated_branch=Merge blockieren, wenn der Pull-Request veraltet ist -settings.block_outdated_branch_desc=Die Zusammenführung ist nicht möglich, wenn die Head-Branch hinter der Basis-Branch ist. +settings.block_outdated_branch_desc=Mergen ist nicht möglich, wenn der Head-Branch hinter dem Basis-Branch ist. settings.default_branch_desc=Wähle einen Standardbranch für Pull-Requests und Code-Commits: +settings.default_merge_style_desc=Standard Mergeverhalten für Pull Requests: settings.choose_branch=Wähle einen Branch … settings.no_protected_branch=Es gibt keine geschützten Branches. settings.edit_protected_branch=Bearbeiten settings.protected_branch_required_approvals_min=Die Anzahl der erforderlichen Zustimmungen darf nicht negativ sein. +settings.tags=Tags +settings.tags.protection=Tag-Schutz +settings.tags.protection.pattern=Tag Muster +settings.tags.protection.allowed=Erlaubt +settings.tags.protection.allowed.users=Erlaubte Benutzer +settings.tags.protection.allowed.teams=Erlaubte Teams +settings.tags.protection.allowed.noone=Niemand +settings.tags.protection.create=Tag schützen +settings.tags.protection.none=Es gibt keine geschützten Tags. +settings.tags.protection.pattern.description=Du kannst einen einzigen Namen oder ein globales Schema oder einen regulären Ausdruck verwenden, um mehrere Tags zu schützen. Mehr dazu im geschützte Tags Guide (Englisch). settings.bot_token=Bot-Token settings.chat_id=Chat-ID settings.matrix.homeserver_url=Homeserver-URL @@ -1733,6 +1948,7 @@ settings.archive.success=Das Repo wurde erfolgreich archiviert. settings.archive.error=Beim Versuch, das Repository zu archivieren, ist ein Fehler aufgetreten. Weitere Details finden sich im Log. settings.archive.error_ismirror=Du kannst keinen Repo-Mirror archivieren. settings.archive.branchsettings_unavailable=Branch-Einstellungen sind nicht verfügbar wenn das Repo archiviert ist. +settings.archive.tagsettings_unavailable=Tag Einstellungen sind nicht verfügbar, wenn das Repo archiviert wurde. settings.unarchive.button=Archivieren rückgängig machen settings.unarchive.header=Archivieren dieses Repos rückgängig machen settings.unarchive.text=Durch das Aufheben der Archivierung kann das Repo wieder Commits und Pushes sowie neue Issues und Pull-Requests empfangen. @@ -1784,6 +2000,7 @@ diff.whitespace_ignore_at_eol=Ignoriere EOL-whitespace-Änderungen diff.stats_desc= %d geänderte Dateien mit %d neuen und %d gelöschten Zeilen diff.stats_desc_file=%d Änderungen: %d Ergänzungen und %d Löschungen diff.bin=BIN +diff.bin_not_shown=Binäre Datei nicht angezeigt. diff.view_file=Datei anzeigen diff.file_before=Vorher diff.file_after=Nachher @@ -1791,6 +2008,7 @@ diff.file_image_width=Breite diff.file_image_height=Höhe diff.file_byte_size=Größe diff.file_suppressed=Datei-Diff unterdrückt, da er zu groß ist +diff.file_suppressed_line_too_long=Dateidiff unterdrückt, weil mindestens eine Zeile zu lang ist diff.too_many_files=Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden. diff.comment.placeholder=Kommentieren... diff.comment.markdown_info=Styling mit Markdown wird unterstützt. @@ -1804,8 +2022,11 @@ diff.review.placeholder=Kommentar zum Review diff.review.comment=Kommentieren diff.review.approve=Genehmigen diff.review.reject=Änderung anfragen -diff.committed_by=committed von +diff.committed_by=committet von diff.protected=Geschützt +diff.image.side_by_side=Nebeneinander +diff.image.swipe=Wischen +diff.image.overlay=Überlagert releases.desc=Behalte den Überblick über Versionen und Downloads. release.releases=Releases @@ -1815,6 +2036,7 @@ release.new_release=Neues Release release.draft=Entwurf release.prerelease=Pre-Release release.stable=Stabil +release.compare=Vergleichen release.edit=bearbeiten release.ahead.commits=%d Commits release.ahead.target=zu %s seit dieser Version @@ -1841,9 +2063,12 @@ release.deletion_tag_desc=Löscht dieses Tag aus dem Projektarchiv. Repository-I release.deletion_tag_success=Der Tag wurde gelöscht. release.tag_name_already_exist=Ein Release mit diesem Tag existiert bereits. release.tag_name_invalid=Der Tag-Name ist ungültig. +release.tag_name_protected=Der Tag-Name ist geschützt. release.tag_already_exist=Dieser Tag-Name existiert bereits. release.downloads=Downloads release.download_count=Downloads: %s +release.add_tag_msg=Titel und Beschreibung des Releases als Tag Nachricht verwenden. +release.add_tag=Nur Tag erstellen branch.name=Branchname branch.search=Branches durchsuchen @@ -1870,12 +2095,23 @@ branch.restore=Branch „%s“ wiederherstellen branch.download=Branch „%s“ herunterladen branch.included_desc=Dieser Branch ist im Standard-Branch enthalten branch.included=Enthalten +branch.create_new_branch=Branch aus Branch erstellen: +branch.confirm_create_branch=Branch erstellen +branch.new_branch=Neue Branch erstellen +branch.new_branch_from=Neue Branch von '%s' erstellen + +tag.create_tag=Tag %s erstellen +tag.create_success=Tag "%s" wurde erstellt. topic.manage_topics=Themen verwalten topic.done=Fertig topic.count_prompt=Du kannst nicht mehr als 25 Themen auswählen topic.format_prompt=Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein. +error.csv.too_large=Diese Datei kann nicht gerendert werden, da sie zu groß ist. +error.csv.unexpected=Diese Datei kann nicht gerendert werden, da sie ein unerwartetes Zeichen in Zeile %d und Spalte %d enthält. +error.csv.invalid_field_count=Diese Datei kann nicht gerendert werden, da sie eine falsche Anzahl an Feldern in Zeile %d hat. + [org] org_name_holder=Name der Organisation org_full_name_holder=Vollständiger Name der Organisation @@ -1919,6 +2155,7 @@ settings.visibility.private_shortname=Privat settings.update_settings=Einstellungen speichern settings.update_setting_success=Organisationseinstellungen wurden aktualisiert. settings.change_orgname_prompt=Hinweis: Die Änderung des Organisationsnamens ändert auch ihre URL. +settings.change_orgname_redirect_prompt=Der alte Name wird weiterleiten, bis er wieder beansprucht wird. settings.update_avatar_success=Der Organisationsavatar wurde aktualisiert. settings.delete=Organisation löschen settings.delete_account=Diese Organisation löschen @@ -1939,12 +2176,15 @@ members.member_role=Mitgliedsrolle: members.owner=Besitzer members.member=Mitglied members.remove=Entfernen +members.remove.detail=%[1]s aus %[2]s entfernen? members.leave=Verlassen +members.leave.detail=%s verlassen? members.invite_desc=Neues Mitglied zu %s hinzufügen: members.invite_now=Jetzt einladen teams.join=Beitreten teams.leave=Verlassen +teams.leave.detail=%s verlassen? teams.can_create_org_repo=Repositories erstellen teams.can_create_org_repo_helper=Mitglieder können neue Repositories in der Organisation erstellen. Der Ersteller erhält Administrator-Zugriff auf das neue Repository. teams.read_access=Lesezugriff @@ -1990,8 +2230,7 @@ dashboard=Dashboard users=Benutzerkonten organizations=Organisationen repositories=Repositories -hooks=Standard-Webhooks -systemhooks=System-Webhooks +hooks=Webhooks authentication=Authentifizierungsquellen emails=Benutzer E-Mails config=Konfiguration @@ -2023,7 +2262,7 @@ dashboard.cron.error=Fehler in Cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s ist beendet dashboard.delete_inactive_accounts=Alle nicht aktivierten Konten löschen dashboard.delete_inactive_accounts.started=Löschen aller nicht aktivierten Account-Aufgabe gestartet. -dashboard.delete_repo_archives=Alle Repository-Archive löschen +dashboard.delete_repo_archives=Lösche alle Repository Archive (ZIP, TAR.GZ, …) dashboard.delete_repo_archives.started=Löschen aller Repository-Archive gestartet. dashboard.delete_missing_repos=Alle Repository-Datensätze mit verloren gegangenen Git-Dateien löschen dashboard.delete_missing_repos.started=Alle Repositories löschen, die die Git-Dateien-Aufgabe nicht gestartet haben. @@ -2042,6 +2281,7 @@ dashboard.resync_all_sshprincipals.desc=(Nicht benötigt für den eingebauten SS dashboard.resync_all_hooks=Synchronisiere „pre-receive“-, „update“- und „post-receive“-Hooks für alle Repositories erneut. dashboard.reinit_missing_repos=Alle Git-Repositories mit Einträgen neu einlesen dashboard.sync_external_users=Externe Benutzerdaten synchronisieren +dashboard.cleanup_hook_task_table=Hook-Task-Tabelle bereinigen dashboard.server_uptime=Server-Uptime dashboard.current_goroutine=Aktuelle Goroutinen dashboard.current_memory_usage=Aktuelle Speichernutzung @@ -2071,6 +2311,8 @@ dashboard.total_gc_time=Gesamte GC-Pause dashboard.total_gc_pause=Gesamte GC-Pause dashboard.last_gc_pause=Letzte GC-Pause dashboard.gc_times=Anzahl GC +dashboard.delete_old_actions=Alle alten Aktionen aus der Datenbank löschen +dashboard.delete_old_actions.started=Löschen aller alten Aktionen in der Datenbank gestartet. users.user_manage_panel=Benutzerkontenverwaltung users.new_account=Benutzerkonto erstellen @@ -2141,11 +2383,13 @@ repos.forks=Forks repos.issues=Issues repos.size=Größe -hooks.desc=Webhooks stellen automatisch HTTP POST-Anfragen an einen Server, wenn bestimmte Gitea-Ereignisse ausgelöst werden. Die hier definierten Webhooks sind Standardwerte und werden in alle neuen Repositories kopiert. Mehr Infos findest du in der Webhooks-Anleitung. -hooks.add_webhook=Standard-Webhook hinzufügen -hooks.update_webhook=Standard-Webhook aktualisieren +defaulthooks=Standard-Webhooks +defaulthooks.desc=Webhooks senden automatisch eine HTTP POST Anfrage an einen Server, wenn bestimmte Gitea Events ausgelöst werden. Hier definierte Webhooks sind die Standardwerte, die in alle neuen Repositories kopiert werden. Mehr Infos findest du in der Webhooks Anleitung (auf englisch). +defaulthooks.add_webhook=Standard-Webhook hinzufügen +defaulthooks.update_webhook=Standard-Webhook aktualisieren -systemhooks.desc=Webhooks senden automatisch POST-HTTP-Anfragen an einen anderen Server, wenn ein bestimmtes Gitea-Event ausgelöst wird. Webhook-Events können von allen Repositories ausgelöst werden, beachte daher mögliche Leistungs-Implikationen. Mehr Informationen sind in der Webhook-Anleitung in der Dokumentation zu finden. +systemhooks=System-Webhooks +systemhooks.desc=Webhooks senden automatisch HTTP-POST Anfragen an einen Server, wenn bestimmte Gitea Events getriggered werden. Hier definierte Webhooks werden auf alle Repositories des Systems übertragen, beachte daher mögliche Performance-Einbrüche. Mehr Infos findest du in der Webhooks Anleitung (auf englisch). systemhooks.add_webhook=System-Webhook hinzufügen systemhooks.update_webhook=System-Webhook aktualisieren @@ -2164,7 +2408,6 @@ auths.host=Host auths.port=Port auths.bind_dn=DN binden auths.bind_password=Passwort binden -auths.bind_password_helper=Achtung: Das Passwort wird im Klartext gespeichert. Benutze, wenn möglich, einen Account, der nur über Lesezugriff verfügt. auths.user_base=Basis für Benutzersuche auths.user_dn=Benutzer-DN auths.attribute_username=Benutzernamens-Attribut @@ -2192,9 +2435,14 @@ auths.smtphost=SMTP-Host auths.smtpport=SMTP-Port auths.allowed_domains=Erlaubte Domains auths.allowed_domains_helper=Leer lassen, um alle Domains zuzulassen. Trenne mehrere Domänen mit einem Komma („,“). -auths.enable_tls=TLS-Verschlüsselung aktivieren auths.skip_tls_verify=TLS-Verifikation überspringen +auths.force_smtps=SMTPS erzwingen +auths.force_smtps_helper=SMTPS wird immer auf Port 465 verwendet. Setze dies, um SMTPS auf anderen Ports zu erzwingen. (Sonst wird STARTTLS auf anderen Ports verwendet, wenn es vom Host unterstützt wird.) +auths.helo_hostname=HELO Hostname +auths.helo_hostname_helper=Mit HELO gesendeter Hostname. Leer lassen, um den aktuellen Hostnamen zu senden. +auths.disable_helo=HELO deaktivieren auths.pam_service_name=PAM-Dienstname +auths.pam_email_domain=PAM E-Mail-Domain (optional) auths.oauth2_provider=OAuth2-Anbieter auths.oauth2_icon_url=Icon URL auths.oauth2_clientID=Client-ID (Schlüssel) @@ -2205,6 +2453,7 @@ auths.oauth2_tokenURL=Token-URL auths.oauth2_authURL=Authorisierungs-URL auths.oauth2_profileURL=Profil-URL auths.oauth2_emailURL=E-Mail-URL +auths.oauth2_tenant=Inhaber auths.enable_auto_register=Automatische Registrierung aktivieren auths.sspi_auto_create_users=Benutzer automatisch anlegen auths.sspi_auto_create_users_helper=Erlaube der SSPI Authentifikationsmethode, automatisch neue Konten für unbekannte Benutzer anzulegen @@ -2294,6 +2543,7 @@ config.db_path=Verzeichnis config.service_config=Service-Konfiguration config.register_email_confirm=E-Mail-Bestätigung benötigt zum Registrieren config.disable_register=Selbstregistrierung deaktivieren +config.allow_only_internal_registration=Registrierung nur über Gitea selbst erlauben config.allow_only_external_registration=Registrierung nur über externe Services erlauben config.enable_openid_signup=OpenID-Selbstregistrierung aktivieren config.enable_openid_signin=OpenID-Anmeldung aktivieren @@ -2370,7 +2620,6 @@ config.git_gc_timeout=Zeitlimit für GC config.log_config=Konfiguration des Loggings config.log_mode=Log-Modus -config.macaron_log_mode=Macaron Log-Modus config.own_named_logger=Benannte Logger config.routes_to_default_logger=Pfade zum Standard-Logger config.go_log=Verwendet Go Log (auf Standard umgeleitet) @@ -2474,9 +2723,9 @@ close_pull_request=`hat den Pull-Request %s#%[2]s gesc reopen_pull_request=`hat den Pull-Request %s#%[2]s wieder geöffnet` comment_issue=`hat das Issue %s#%[2]s kommentiert` comment_pull=`kommentierte im Pull Request %s#%[2]s` -merge_pull_request=`hat den Pull-Request %s#%[2]s zusammengeführt` +merge_pull_request=`hat den Pull-Request %s#%[2]s gemergt` transfer_repo=hat Repository %s transferiert an %s -push_tag=hat Tag %[2]s auf %[3]s gepusht +push_tag=hat Tag %[4]s auf %[3]s gepusht delete_tag=hat Tag %[2]s in %[3]s gelöscht delete_branch=hat Branch %[2]s in %[3]s gelöscht compare_branch=Vergleichen @@ -2488,6 +2737,8 @@ mirror_sync_delete=hat die Referenz des Mirrors %[2]s in %s#%[2]s genehmigt` reject_pull_request=`hat für %s#%[2]s Änderungen vorgeschlagen` publish_release=`hat "%[4]s" %[3]s released` +review_dismissed=`verworfenes Review von %[4]s für %[3]s#%[2]s` +review_dismissed_reason=Grund: create_branch=hat den Branch %[3]s in %[4]s angelegt [tool] diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 48a43aa90..3462a15cc 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -15,6 +15,7 @@ page = Page template = Template language = Language notifications = Notifications +active_stopwatch = Active Time Tracker create_new = Create… user_profile_and_more = Profile and Settings… signed_in_as = Signed in as @@ -75,12 +76,14 @@ pull_requests = Pull Requests issues = Issues milestones = Milestones +ok = OK cancel = Cancel save = Save add = Add add_all = Add All remove = Remove remove_all = Remove All +edit = Edit write = Write preview = Preview @@ -89,11 +92,16 @@ loading = Loading… step1 = Step 1: step2 = Step 2: +error = Error error404 = The page you are trying to reach either does not exist or you are not authorized to view it. +never = Never + [error] occurred = An error has occurred report_message = If you are sure this is a Gitea bug, please search for issue on GitHub and open new issue if necessary. +missing_csrf = Bad Request: no CSRF token present +invalid_csrf = Bad Request: Invalid CSRF token [startpage] app_desc = A painless, self-hosted Git service @@ -203,6 +211,8 @@ default_enable_timetracking = Enable Time Tracking by Default default_enable_timetracking_popup = Enable time tracking for new repositories by default. no_reply_address = Hidden Email Domain no_reply_address_helper = Domain name for users with a hidden email address. For example, the username 'joe' will be logged in Git as 'joe@noreply.example.org' if the hidden email domain is set to 'noreply.example.org'. +password_algorithm = Password Hash Algorithm +password_algorithm_helper = Set the password hashing algorithm. Algorithms have differing requirements and strength. `argon2` whilst having good characteristics uses a lot of memory and may be inappropriate for small systems. [home] uname_holder = Username or Email Address @@ -236,6 +246,8 @@ users = Users organizations = Organizations search = Search code = Code +search.fuzzy = Fuzzy +search.match = Match repo_no_results = No matching repositories found. user_no_results = No matching users found. org_no_results = No matching organizations found. @@ -293,7 +305,8 @@ openid_connect_desc = The chosen OpenID URI is unknown. Associate it with a new openid_register_title = Create new account openid_register_desc = The chosen OpenID URI is unknown. Associate it with a new account here. openid_signin_desc = Enter your OpenID URI. For example: https://anne.me, bob.openid.org.cn or gnusocial.net/carry. -disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator. +disable_forgot_password_mail = Account recovery is disabled because no email is set up. Please contact your site administrator. +disable_forgot_password_mail_admin = Account recovery is only available when email is set up. Please set up email to enable account recovery. email_domain_blacklisted = You cannot register with your email address. authorize_application = Authorize Application authorize_redirect_notice = You will be redirected to %s if you authorize this application. @@ -302,17 +315,69 @@ authorize_application_description = If you grant the access, it will be able to authorize_title = Authorize "%s" to access your account? authorization_failed = Authorization failed authorization_failed_desc = The authorization failed because we detected an invalid request. Please contact the maintainer of the app you've tried to authorize. -disable_forgot_password_mail = Account recovery is disabled. Please contact your site administrator. sspi_auth_failed = SSPI authentication failed password_pwned = The password you chose is on a list of stolen passwords previously exposed in public data breaches. Please try again with a different password. password_pwned_err = Could not complete request to HaveIBeenPwned [mail] +view_it_on = View it on %s +link_not_working_do_paste = Not working? Try copying and pasting it to your browser. +hi_user_x = Hi %s, + activate_account = Please activate your account +activate_account.title = %s, please activate your account +activate_account.text_1 = Hi %[1]s, thanks for registering at %[2]s! +activate_account.text_2 = Please click the following link to activate your account within %s: + activate_email = Verify your email address -reset_password = Recover your account -register_success = Registration successful +activate_email.title = %s, please verify your e-mail address +activate_email.text = Please click the following link to verify your email address within %s: + register_notify = Welcome to Gitea +register_notify.title = %[1]s, welcome to %[2]s +register_notify.text_1 = this is your registration confirmation email for %s! +register_notify.text_2 = You can now login via username: %s. +register_notify.text_3 = If this account has been created for you, please set your password first. + +reset_password = Recover your account +reset_password.title = %s, you have requested to recover your account +reset_password.text = Please click the following link to recover your account within %s: + +register_success = Registration successful + +issue_assigned.pull = @%[1]s assigned you to the pull request %[2]s in repository %[3]s. +issue_assigned.issue = @%[1]s assigned you to the issue %[2]s in repository %[3]s. + +issue.x_mentioned_you = @%s mentioned you: +issue.action.force_push = %[1]s force-pushed the %[2]s from %[3]s to %[4]s. +issue.action.push_1 = @%[1]s pushed %[3]d commit to %[2]s +issue.action.push_n = @%[1]s pushed %[3]d commits to %[2]s +issue.action.close = @%[1]s closed #%[2]d. +issue.action.reopen = @%[1]s reopened #%[2]d. +issue.action.merge = @%[1]s merged #%[2]d into %[3]s. +issue.action.approve = @%[1]s approved this pull request. +issue.action.reject = @%[1]s requested changes on this pull request. +issue.action.review = @%[1]s commented on this pull request. +issue.action.review_dismissed = @%[1]s dismissed last review from %[2]s for this pull request. +issue.action.ready_for_review = @%[1]s marked this pull request ready for review. +issue.action.new = @%[1]s created #%[2]d. +issue.in_tree_path = In %s: + +release.new.subject = %s in %s released +release.new.text = @%[1]s released %[2]s in %[3]s +release.title = Title: %s +release.note = Note: +release.downloads = Downloads: +release.download.zip = Source Code (ZIP) +release.download.targz = Source Code (TAR.GZ) + +repo.transfer.subject_to = %s would like to transfer "%s" to %s +repo.transfer.subject_to_you = %s would like to transfer "%s" to you +repo.transfer.to_you = you +repo.transfer.body = To accept or reject it visit %s or just ignore it. + +repo.collaborator.added.subject = %s added you to %s +repo.collaborator.added.text = You have been added as a collaborator of repository: [modal] yes = Yes @@ -353,6 +418,7 @@ email_error = ` is not a valid email address.` url_error = ` is not a valid URL.` include_error = ` must contain substring '%s'.` glob_pattern_error = ` glob pattern is invalid: %s.` +regex_pattern_error = ` regex pattern is invalid: %s.` unknown_error = Unknown error: captcha_incorrect = The CAPTCHA code is incorrect. password_not_match = The passwords do not match. @@ -380,6 +446,7 @@ password_uppercase_one = At least one uppercase character password_digit_one = At least one digit password_special_one = At least one special character (punctuation, brackets, quotes, etc.) enterred_invalid_repo_name = The repository name you entered is incorrect. +enterred_invalid_org_name = The organization name you entered is incorrect. enterred_invalid_owner_name = The new owner name is not valid. enterred_invalid_password = The password you entered is incorrect. user_not_exist = The user does not exist. @@ -406,6 +473,7 @@ repositories = Repositories activity = Public Activity followers = Followers starred = Starred Repositories +watched = Watched Repositories projects = Projects following = Following follow = Follow @@ -449,6 +517,7 @@ update_language_not_found = Language '%s' is not available. update_profile_success = Your profile has been updated. change_username = Your username has been changed. change_username_prompt = Note: username changes also change your account URL. +change_username_redirect_prompt = The old username will redirect until it is claimed. continue = Continue cancel = Cancel language = Language @@ -519,14 +588,27 @@ ssh_helper = Need help? Have a look at GitHub's guide to Need help? Have a look at GitHub's guide about GPG. add_new_key = Add SSH Key add_new_gpg_key = Add GPG Key -key_content_ssh_placeholder = Begins with 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', or 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder = Begins with 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', or 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder = Begins with '-----BEGIN PGP PUBLIC KEY BLOCK-----' add_new_principal = Add Principal ssh_key_been_used = This SSH key has already been added to the server. ssh_key_name_used = An SSH key with same name already exists on your account. ssh_principal_been_used = This principal has already been added to the server. gpg_key_id_used = A public GPG key with same ID already exists. -gpg_no_key_email_found = This GPG key is not usable with any email address associated with your account. +gpg_no_key_email_found = This GPG key does not match any activated email address associated with your account. It may still be added if you sign the provided token. +gpg_key_matched_identities = Matched Identities: +gpg_key_matched_identities_long=The embedded identities in this key match the following activated email addresses for this user. Commits matching these email addresses can be verified with this key. +gpg_key_verified=Verified Key +gpg_key_verified_long=Key has been verified with a token and can be used to verify commits matching any activated email addresses for this user in addition to any matched identities for this key. +gpg_key_verify=Verify +gpg_invalid_token_signature = The provided GPG key, signature and token do not match or token is out-of-date. +gpg_token_required = You must provide a signature for the below token +gpg_token = Token +gpg_token_help = You can generate a signature using: +gpg_token_code = echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature = Armored GPG signature +key_signature_gpg_placeholder = Begins with '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success = The GPG key '%s' has been verified. subkeys = Subkeys key_id = Key ID key_name = Key Name @@ -625,6 +707,7 @@ or_enter_secret = Or enter the secret: %s then_enter_passcode = And enter the passcode shown in the application: passcode_invalid = The passcode is incorrect. Try again. twofa_enrolled = Your account has been enrolled into two-factor authentication. Store your scratch token (%s) in a safe place as it is only shown once! +twofa_failed_get_secret = Failed to get secret. u2f_desc = Security keys are hardware devices containing cryptographic keys. They can be used for two-factor authentication. Security keys must support the FIDO U2F standard. u2f_require_twofa = Your account must be enrolled in two-factor authentication to use security keys. @@ -646,6 +729,7 @@ repos_none = You do not own any repositories delete_account = Delete Your Account delete_prompt = This operation will permanently delete your user account. It CAN NOT be undone. +delete_with_all_comments = Your account is younger than %s. To avoid ghost comments, all issue/PR comments will be deleted with it. confirm_delete_account = Confirm Deletion delete_account_title = Delete User Account delete_account_desc = Are you sure you want to permanently delete this user account? @@ -655,7 +739,16 @@ email_notifications.onmention = Only Email on Mention email_notifications.disable = Disable Email Notifications email_notifications.submit = Set Email Preference +visibility = User visibility +visibility.public = Public +visibility.public_tooltip = Visible to all users +visibility.limited = Limited +visibility.limited_tooltip = Visible to logged in users only +visibility.private = Private +visibility.private_tooltip = Visible only to organization members + [repo] +new_repo_helper = A repository contains all project files, including revision history. Already have it elsewhere? Migrate repository. owner = Owner owner_helper = Some organizations may not show up in the dropdown due to a maximum repository count limit. repo_name = Repository Name @@ -675,29 +768,50 @@ fork_repo = Fork Repository fork_from = Fork From fork_visibility_helper = The visibility of a forked repository cannot be changed. use_template = Use this template +clone_in_vsc = Clone in VS Code +download_zip = Download ZIP +download_tar = Download TAR.GZ +download_bundle = Download BUNDLE generate_repo = Generate Repository generate_from = Generate From repo_desc = Description +repo_desc_helper = Enter short description (optional) repo_lang = Language repo_gitignore_helper = Select .gitignore templates. +repo_gitignore_helper_desc = Choose which files not to track from a list of templates for common languages. Typical artifacts generated by each language's build tools are included on .gitignore by default. issue_labels = Issue Labels issue_labels_helper = Select an issue label set. license = License license_helper = Select a license file. +license_helper_desc = A license governs what others can and can't do with your code. Not sure which one is right for your project? See Choose a license. readme = README readme_helper = Select a README file template. +readme_helper_desc = This is the place where you can write a complete description for your project. auto_init = Initialize Repository (Adds .gitignore, License and README) +trust_model_helper = Select trust model for signature verification. Possible options are: +trust_model_helper_collaborator = Collaborator: Trust signatures by collaborators +trust_model_helper_committer = Committer: Trust signatures that match committers +trust_model_helper_collaborator_committer = Collaborator+Committer: Trust signatures by collaborators which match the committer +trust_model_helper_default = Default: Use the default trust model for this installation create_repo = Create Repository default_branch = Default Branch +default_branch_helper = The default branch is the base branch for pull requests and code commits. mirror_prune = Prune mirror_prune_desc = Remove obsolete remote-tracking references mirror_interval = Mirror Interval (valid time units are 'h', 'm', 's'). 0 to disable automatic sync. mirror_interval_invalid = The mirror interval is not valid. mirror_address = Clone From URL -mirror_address_desc = Put any required credentials in the Clone Authorization section. +mirror_address_desc = Put any required credentials in the Authorization section. mirror_address_url_invalid = The provided url is invalid. You must escape all components of the url correctly. mirror_address_protocol_invalid = The provided url is invalid. Only http(s):// or git:// locations can be mirrored from. +mirror_lfs = Large File Storage (LFS) +mirror_lfs_desc = Activate mirroring of LFS data. +mirror_lfs_endpoint = LFS Endpoint +mirror_lfs_endpoint_desc = Sync will attempt to use the clone url to determine the LFS server. You can also specify a custom endpoint if the repository LFS data is stored somewhere else. mirror_last_synced = Last Synchronized +mirror_password_placeholder = (Unchanged) +mirror_password_blank_placeholder = (Unset) +mirror_password_help = Change the username to erase a stored password. watchers = Watchers stargazers = Stargazers forks = Forks @@ -714,6 +828,14 @@ delete_preexisting_label = Delete delete_preexisting = Delete pre-existing files delete_preexisting_content = Delete files in %s delete_preexisting_success = Deleted unadopted files in %s +blame_prior = View blame prior to this change + +transfer.accept = Accept Transfer +transfer.accept_desc = Transfer to "%s" +transfer.reject = Reject Transfer +transfer.reject_desc = Cancel transfer to "%s" +transfer.no_permission_to_accept = You do not have permission to Accept +transfer.no_permission_to_reject = You do not have permission to Reject desc.private = Private desc.public = Public @@ -738,15 +860,21 @@ archive.title = This repo is archived. You can view files and clone it, but cann archive.issue.nocomment = This repo is archived. You cannot comment on issues. archive.pull.nocomment = This repo is archived. You cannot comment on pull requests. -form.reach_limit_of_creation = You have already reached your limit of %d repositories. +form.reach_limit_of_creation_1 = You have already reached your limit of %d repository. +form.reach_limit_of_creation_n = You have already reached your limit of %d repositories. form.name_reserved = The repository name '%s' is reserved. form.name_pattern_not_allowed = The pattern '%s' is not allowed in a repository name. -need_auth = Clone Authorization +need_auth = Authorization migrate_options = Migration Options migrate_service = Migration Service migrate_options_mirror_helper = This repository will be a mirror migrate_options_mirror_disabled = Your site administrator has disabled new mirrors. +migrate_options_lfs = Migrate LFS files +migrate_options_lfs_endpoint.label = LFS Endpoint +migrate_options_lfs_endpoint.description = Migration will attempt to use your Git remote to determine the LFS server. You can also specify a custom endpoint if the repository LFS data is stored somewhere else. +migrate_options_lfs_endpoint.description.local = A local server path is supported too. +migrate_options_lfs_endpoint.placeholder = Leave blank to derive from clone URL migrate_items = Migration Items migrate_items_wiki = Wiki migrate_items_milestones = Milestones @@ -760,19 +888,31 @@ migrate.clone_address = Migrate / Clone From URL migrate.clone_address_desc = The HTTP(S) or Git 'clone' URL of an existing repository migrate.clone_local_path = or a local server path migrate.permission_denied = You are not allowed to import local repositories. +migrate.permission_denied_blocked = You are not allowed to import from blocked hosts. +migrate.permission_denied_private_ip = You are not allowed to import from private IPs. migrate.invalid_local_path = "The local path is invalid. It does not exist or is not a directory." +migrate.invalid_lfs_endpoint = The LFS endpoint is not valid. migrate.failed = Migration failed: %v -migrate.lfs_mirror_unsupported = Mirroring LFS objects is not supported - use 'git lfs fetch --all' and 'git lfs push --all' instead. migrate.migrate_items_options = Access Token is required to migrate additional items migrated_from = Migrated from %[2]s migrated_from_fake = Migrated From %[1]s migrate.migrate = Migrate From %s migrate.migrating = Migrating from %s ... migrate.migrating_failed = Migrating from %s failed. -migrate.github.description = Migrating data from Github.com or Github Enterprise. -migrate.git.description = Migrating or Mirroring git data from Git services -migrate.gitlab.description = Migrating data from GitLab.com or Self-Hosted gitlab server. -migrate.gitea.description = Migrating data from Gitea.com or Self-Hosted Gitea server. +migrate.migrating_failed.error = Error: %s +migrate.github.description = Migrate data from github.com or other Github instances. +migrate.git.description = Migrate a repository only from any Git service. +migrate.gitlab.description = Migrate data from gitlab.com or other GitLab instances. +migrate.gitea.description = Migrate data from gitea.com or other Gitea instances. +migrate.gogs.description = Migrate data from notabug.org or other Gogs instances. +migrate.onedev.description = Migrate data from code.onedev.io or other OneDev instances. +migrate.migrating_git = Migrating Git Data +migrate.migrating_topics = Migrating Topics +migrate.migrating_milestones = Migrating Milestones +migrate.migrating_labels = Migrating Labels +migrate.migrating_releases = Migrating Releases +migrate.migrating_issues = Migrating Issues +migrate.migrating_pulls = Migrating Pull Requests mirror_from = mirror of forked_from = forked from @@ -805,6 +945,7 @@ branch = Branch tree = Tree clear_ref = `Clear current reference` filter_branch_and_tag = Filter branch or tag +find_tag = Find tag branches = Branches tags = Tags issues = Issues @@ -866,6 +1007,7 @@ editor.add = Add '%s' editor.update = Update '%s' editor.delete = Delete '%s' editor.commit_message_desc = Add an optional extended description… +editor.signoff_desc = Add a Signed-off-by trailer by the committer at the end of the commit log message. editor.commit_directly_to_this_branch = Commit directly to the %s branch. editor.create_new_branch = Create a new branch for this commit and start a pull request. editor.create_new_branch_np = Create a new branch for this commit. @@ -903,6 +1045,7 @@ editor.require_signed_commit = Branch requires a signed commit commits.desc = Browse source code change history. commits.commits = Commits commits.no_commits = No commits in common. '%s' and '%s' have entirely different histories. +commits.nothing_to_compare = These branches are equal. commits.search = Search commits… commits.search.tooltip = You can prefix keywords with "author:", "committer:", "after:", or "before:", e.g. "revert author:Alice before:2019-04-01". commits.find = Search @@ -922,6 +1065,8 @@ ext_issues.desc = Link to an external issue tracker. projects = Projects projects.desc = Manage issues and pulls in project boards. +projects.description = Description (optional) +projects.description_placeholder = Description projects.create = Create Project projects.title = Title projects.new = New project @@ -945,6 +1090,8 @@ projects.board.edit_title = "New Board Name" projects.board.new_title = "New Board Name" projects.board.new_submit = "Submit" projects.board.new = "New Board" +projects.board.set_default = "Set Default" +projects.board.set_default_desc = "Set this board as default for uncategorized issues and pulls" projects.board.delete = "Delete Board" projects.board.deletion_desc = "Deleting a project board moves all related issues to 'Uncategorized'. Continue?" projects.open = Open @@ -1028,6 +1175,7 @@ issues.filter_type.all_issues = All issues issues.filter_type.assigned_to_you = Assigned to you issues.filter_type.created_by_you = Created by you issues.filter_type.mentioning_you = Mentioning you +issues.filter_type.review_requested = Review requested issues.filter_sort = Sort issues.filter_sort.latest = Newest issues.filter_sort.oldest = Oldest @@ -1063,11 +1211,13 @@ issues.commented_at = `commented %s` issues.delete_comment_confirm = Are you sure you want to delete this comment? issues.context.copy_link = Copy Link issues.context.quote_reply = Quote Reply +issues.context.reference_issue = Reference in new issue issues.context.edit = Edit issues.context.delete = Delete issues.no_content = There is no content yet. issues.close_issue = Close -issues.pull_merged_at = `merged commit %[2]s into %[3]s %[4]s` +issues.pull_merged_at = `merged commit %[2]s into %[3]s %[4]s` +issues.manually_pull_merged_at = `merged commit %[2]s into %[3]s manually %[4]s` issues.close_comment_issue = Comment and Close issues.reopen_issue = Reopen issues.reopen_comment_issue = Comment and Reopen @@ -1089,6 +1239,8 @@ issues.re_request_review=Re-request review issues.is_stale = There have been changes to this PR since this review issues.remove_request_review=Remove review request issues.remove_request_review_block=Can't remove review request +issues.dismiss_review = Dismiss Review +issues.dismiss_review_warning = Are you sure you want to dismiss this review? issues.sign_in_require_desc = Sign in to join this conversation. issues.edit = Edit issues.cancel = Cancel @@ -1133,14 +1285,17 @@ issues.lock.title = Lock conversation on this issue. issues.unlock.title = Unlock conversation on this issue. issues.comment_on_locked = You cannot comment on a locked issue. issues.tracker = Time Tracker -issues.start_tracking_short = Start +issues.start_tracking_short = Start Timer issues.start_tracking = Start Time Tracking issues.start_tracking_history = `started working %s` issues.tracker_auto_close = Timer will be stopped automatically when this issue gets closed issues.tracking_already_started = `You have already started time tracking on another issue!` -issues.stop_tracking = Stop +issues.stop_tracking = Stop Timer issues.stop_tracking_history = `stopped working %s` +issues.cancel_tracking = Discard +issues.cancel_tracking_history = `cancelled time tracking %s` issues.add_time = Manually Add Time +issues.del_time = Delete this time log issues.add_time_short = Add Time issues.add_time_cancel = Cancel issues.add_time_history = `added spent time %s` @@ -1148,8 +1303,6 @@ issues.del_time_history= `deleted spent time %s` issues.add_time_hours = Hours issues.add_time_minutes = Minutes issues.add_time_sum_to_small = No time was entered. -issues.cancel_tracking = Cancel -issues.cancel_tracking_history = `cancelled time tracking %s` issues.time_spent_total = Total Time Spent issues.time_spent_from_all_authors = `Total Time Spent: %s` issues.due_date = Due Date @@ -1158,7 +1311,7 @@ issues.error_modifying_due_date = "Failed to modify the due date." issues.error_removing_due_date = "Failed to remove the due date." issues.push_commit_1 = "added %d commit %s" issues.push_commits_n = "added %d commits %s" -issues.force_push_codes = `force-pushed %[1]s from %[2]s to %[4]s %[6]s` +issues.force_push_codes = `force-pushed %[1]s from %[2]s to %[4]s %[6]s` issues.due_date_form = "yyyy-mm-dd" issues.due_date_form_add = "Add due date" issues.due_date_form_edit = "Edit" @@ -1179,8 +1332,8 @@ issues.dependency.remove = Remove issues.dependency.remove_info = Remove this dependency issues.dependency.added_dependency = `added a new dependency %s` issues.dependency.removed_dependency = `removed a dependency %s` -issues.dependency.issue_closing_blockedby = Closing this pull request is blocked by the following issues -issues.dependency.pr_closing_blockedby = Closing this issue is blocked by the following issues +issues.dependency.pr_closing_blockedby = Closing this pull request is blocked by the following issues +issues.dependency.issue_closing_blockedby = Closing this issue is blocked by the following issues issues.dependency.issue_close_blocks = This issue blocks closing of the following issues issues.dependency.pr_close_blocks = This pull request blocks closing of the following issues issues.dependency.issue_close_blocked = You need to close all issues blocking this issue before you can close it. @@ -1201,6 +1354,8 @@ issues.review.self.approval = You cannot approve your own pull request. issues.review.self.rejection = You cannot request changes on your own pull request. issues.review.approve = "approved these changes %s" issues.review.comment = "reviewed %s" +issues.review.dismissed = "dismissed %s’s review %s" +issues.review.dismissed_label = Dismissed issues.review.left_comment = left a comment issues.review.content.empty = You need to leave a comment indicating the requested change(s). issues.review.reject = "requested changes %s" @@ -1220,6 +1375,10 @@ issues.review.resolve_conversation = Resolve conversation issues.review.un_resolve_conversation = Unresolve conversation issues.review.resolved_by = marked this conversation as resolved issues.assignee.error = Not all assignees was added due to an unexpected error. +issues.reference_issue.body = Body + +compare.compare_base = base +compare.compare_head = compare pulls.desc = Enable pull requests and code reviews. pulls.new = New Pull Request @@ -1230,6 +1389,7 @@ pulls.compare_compare = pull from pulls.filter_branch = Filter branch pulls.no_results = No results found. pulls.nothing_to_compare = These branches are equal. There is no need to create a pull request. +pulls.nothing_to_compare_and_allow_empty_pr = These branches are equal. This PR will be empty. pulls.has_pull_request = `A pull request between these branches already exists: %[2]s#%[3]d` pulls.create = Create Pull Request pulls.title_desc = wants to merge %[1]d commits from %[2]s into %[3]s @@ -1242,13 +1402,19 @@ pulls.reopen_to_merge = Please reopen this pull request to perform a merge. pulls.cant_reopen_deleted_branch = This pull request cannot be reopened because the branch was deleted. pulls.merged = Merged pulls.merged_as = The pull request has been merged as %[2]s. +pulls.manually_merged = Manually merged +pulls.manually_merged_as = The pull request has been manually merged as %[2]s. pulls.is_closed = The pull request has been closed. pulls.has_merged = The pull request has been merged. pulls.title_wip_desc = `Start the title with %s to prevent the pull request from being merged accidentally.` -pulls.cannot_merge_work_in_progress = This pull request is marked as a work in progress. Remove the %s prefix from the title when it's ready +pulls.cannot_merge_work_in_progress = This pull request is marked as a work in progress. +pulls.still_in_progress = Still in progress? +pulls.add_prefix = Add %s prefix +pulls.remove_prefix = Remove %s prefix pulls.data_broken = This pull request is broken due to missing fork information. pulls.files_conflicted = This pull request has changes conflicting with the target branch. pulls.is_checking = "Merge conflict checking is in progress. Try again in few moments." +pulls.is_empty = "This branch is equal with the target branch." pulls.required_status_check_failed = Some required checks were not successful. pulls.required_status_check_missing = Some required checks are missing. pulls.required_status_check_administrator = As an administrator, you may still merge this pull request. @@ -1269,16 +1435,19 @@ pulls.reject_count_1 = "%d change request" pulls.reject_count_n = "%d change requests" pulls.waiting_count_1 = "%d waiting review" pulls.waiting_count_n = "%d waiting reviews" +pulls.wrong_commit_id = "commit id must be a commit id on the target branch" pulls.no_merge_desc = This pull request cannot be merged because all repository merge options are disabled. pulls.no_merge_helper = Enable merge options in the repository settings or merge the pull request manually. pulls.no_merge_wip = This pull request can not be merged because it is marked as being a work in progress. pulls.no_merge_not_ready = This pull request is not ready to be merged, check review status and status checks. pulls.no_merge_access = You are not authorized to merge this pull request. -pulls.merge_pull_request = Merge Pull Request -pulls.rebase_merge_pull_request = Rebase and Merge -pulls.rebase_merge_commit_pull_request = Rebase and Merge (--no-ff) -pulls.squash_merge_pull_request = Squash and Merge +pulls.merge_pull_request = Create merge commit +pulls.rebase_merge_pull_request = Rebase then fast-forward +pulls.rebase_merge_commit_pull_request = Rebase then create merge commit +pulls.squash_merge_pull_request = Create squash commit +pulls.merge_manually = Manually merged +pulls.merge_commit_id = The merge commit ID pulls.require_signed_wont_sign = The branch requires signed commits but this merge will not be signed pulls.invalid_merge_option = You cannot use this merge option for this pull request. pulls.merge_conflict = Merge Failed: There was a conflict whilst merging. Hint: Try a different strategy @@ -1299,7 +1468,8 @@ pulls.status_checks_failure = Some checks failed pulls.status_checks_error = Some checks reported errors pulls.status_checks_requested = Required pulls.status_checks_details = Details -pulls.update_branch = Update branch +pulls.update_branch = Update branch by merge +pulls.update_branch_rebase = Update branch by rebase pulls.update_branch_success = Branch update was successful pulls.update_not_allowed = You are not allowed to update branch pulls.outdated_with_base_branch = This branch is out-of-date with the base branch @@ -1412,7 +1582,7 @@ activity.closed_issues_count_1 = Closed Issue activity.closed_issues_count_n = Closed Issues activity.title.issues_1 = %d Issue activity.title.issues_n = %d Issues -activity.title.issues_closed_by = %s closed by %s +activity.title.issues_closed_from = %s closed from %s activity.title.issues_created_by = %s created by %s activity.closed_issue_label = Closed activity.new_issues_count_1 = New Issue @@ -1450,6 +1620,8 @@ activity.git_stats_deletion_n = %d deletions search = Search search.search_repo = Search repository +search.fuzzy = Fuzzy +search.match = Match search.results = Search results for "%s" in %s settings = Settings @@ -1465,6 +1637,15 @@ settings.hooks = Webhooks settings.githooks = Git Hooks settings.basic_settings = Basic Settings settings.mirror_settings = Mirror Settings +settings.mirror_settings.docs = Set up your project to automatically push and/or pull changes to/from another repository. Branches, tags, and commits will be synced automatically. How do I mirror repositories? +settings.mirror_settings.mirrored_repository = Mirrored repository +settings.mirror_settings.direction = Direction +settings.mirror_settings.direction.pull = Pull +settings.mirror_settings.direction.push = Push +settings.mirror_settings.last_update = Last update +settings.mirror_settings.push_mirror.none = No push mirrors configured +settings.mirror_settings.push_mirror.remote_url = Git Remote Repository URL +settings.mirror_settings.push_mirror.add = Add Push Mirror settings.sync_mirror = Synchronize Now settings.mirror_sync_in_progress = Mirror synchronization is in progress. Check back in a minute. settings.email_notifications.enable = Enable Email Notifications @@ -1473,6 +1654,7 @@ settings.email_notifications.disable = Disable Email Notifications settings.email_notifications.submit = Set Email Preference settings.site = Website settings.update_settings = Update Settings +settings.branches.update_default_branch = Update Default Branch settings.advanced_settings = Advanced Settings settings.wiki_desc = Enable Repository Wiki settings.use_internal_wiki = Use Built-In Wiki @@ -1500,6 +1682,9 @@ settings.pulls.allow_merge_commits = Enable Commit Merging settings.pulls.allow_rebase_merge = Enable Rebasing to Merge Commits settings.pulls.allow_rebase_merge_commit = Enable Rebasing with explicit merge commits (--no-ff) settings.pulls.allow_squash_commits = Enable Squashing to Merge Commits +settings.pulls.allow_manual_merge = Enable Mark PR as manually merged +settings.pulls.enable_autodetect_manual_merge = Enable autodetect manual merge (Note: In some special cases, misjudgments can occur) +settings.pulls.default_delete_branch_after_merge = Delete pull request branch after merge by default settings.projects_desc = Enable Repository Projects settings.admin_settings = Administrator Settings settings.admin_enable_health_check = Enable Repository Health Checks (git fsck) @@ -1517,10 +1702,21 @@ settings.convert_fork_notices_1 = This operation will convert the fork into a re settings.convert_fork_confirm = Convert Repository settings.convert_fork_succeed = The fork has been converted into a regular repository. settings.transfer = Transfer Ownership +settings.transfer.rejected = Repository transfer was rejected. +settings.transfer.success = Repository transfer was successful. +settings.transfer_abort = Cancel transfer +settings.transfer_abort_invalid = You cannot cancel a non existent repository transfer. +settings.transfer_abort_success = The repository transfer to %s was successfully cancelled. settings.transfer_desc = Transfer this repository to a user or to an organization for which you have administrator rights. +settings.transfer_form_title = Enter the repository name as confirmation: +settings.transfer_in_progress = There is currently an ongoing transfer. Please cancel it if you will like to transfer this repository to another user. settings.transfer_notices_1 = - You will lose access to the repository if you transfer it to an individual user. settings.transfer_notices_2 = - You will keep access to the repository if you transfer it to an organization that you (co-)own. -settings.transfer_form_title = Enter the repository name as confirmation: +settings.transfer_notices_3 = - If the repository is private and is transferred to an individual user, this action makes sure that the user does have at least read permission (and changes permissions if necessary). +settings.transfer_owner = New Owner +settings.transfer_perform = Perform Transfer +settings.transfer_started = This repository has been marked for transfer and awaits confirmation from "%s" +settings.transfer_succeed = The repository has been transferred. settings.signing_settings = Signing Verification Settings settings.trust_model = Signature Trust Model settings.trust_model.default = Default Trust Model @@ -1546,9 +1742,6 @@ settings.delete_notices_2 = - This operation will permanently delete the *, events for all branches are reported. See github.com/gobwas/glob documentation for syntax. Examples: master, {master,release*}. +settings.branch_filter_desc = Branch whitelist for push, branch creation and branch deletion events, specified as glob pattern. If empty or *, events for all branches are reported. See github.com/gobwas/glob documentation for syntax. Examples: master, {master,release*}. settings.active = Active settings.active_helper = Information about triggered events will be sent to this webhook URL. settings.add_hook_success = The webhook has been added. @@ -1662,6 +1855,7 @@ settings.add_telegram_hook_desc = Integrate Telegram into your settings.add_matrix_hook_desc = Integrate Matrix into your repository. settings.add_msteams_hook_desc = Integrate Microsoft Teams into your repository. settings.add_feishu_hook_desc = Integrate Feishu into your repository. +settings.add_Wechat_hook_desc = Integrate Wechatwork into your repository. settings.deploy_keys = Deploy Keys settings.add_deploy_key = Add Deploy Key settings.deploy_key_desc = Deploy keys have read-only pull access to the repository. @@ -1713,7 +1907,7 @@ settings.dismiss_stale_approvals_desc = When new commits that change the content settings.require_signed_commits = Require Signed Commits settings.require_signed_commits_desc = Reject pushes to this branch if they are unsigned or unverifiable. settings.protect_protected_file_patterns = Protected file patterns (separated using semicolon '\;'): -settings.protect_protected_file_patterns_desc = Protected files that are not allowed to be changed directly even if user has rights to add, edit, or delete files in this branch. Multiple patterns can be separated using semicolon ('\;'). See github.com/gobwas/glob documentation for pattern syntax. Examples: .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns_desc = Protected files that are not allowed to be changed directly even if user has rights to add, edit, or delete files in this branch. Multiple patterns can be separated using semicolon ('\;'). See github.com/gobwas/glob documentation for pattern syntax. Examples: .drone.yml, /docs/**/*.txt. settings.add_protected_branch = Enable protection settings.delete_protected_branch = Disable protection settings.update_protect_branch_success = Branch protection for branch '%s' has been updated. @@ -1727,10 +1921,21 @@ settings.block_on_official_review_requests_desc = Merging will not be possible w settings.block_outdated_branch = Block merge if pull request is outdated settings.block_outdated_branch_desc = Merging will not be possible when head branch is behind base branch. settings.default_branch_desc = Select a default repository branch for pull requests and code commits: +settings.default_merge_style_desc = Default merge style for pull requests: settings.choose_branch = Choose a branch… settings.no_protected_branch = There are no protected branches. settings.edit_protected_branch = Edit settings.protected_branch_required_approvals_min = Required approvals cannot be negative. +settings.tags = Tags +settings.tags.protection = Tag Protection +settings.tags.protection.pattern = Tag Pattern +settings.tags.protection.allowed = Allowed +settings.tags.protection.allowed.users = Allowed users +settings.tags.protection.allowed.teams = Allowed teams +settings.tags.protection.allowed.noone = No One +settings.tags.protection.create = Protect Tag +settings.tags.protection.none = There are no protected tags. +settings.tags.protection.pattern.description = You can use a single name or a glob pattern or regular expression to match multiple tags. Read more in the protected tags guide. settings.bot_token = Bot Token settings.chat_id = Chat ID settings.matrix.homeserver_url = Homeserver URL @@ -1744,6 +1949,7 @@ settings.archive.success = The repo was successfully archived. settings.archive.error = An error occurred while trying to archive the repo. See the log for more details. settings.archive.error_ismirror = You cannot archive a mirrored repo. settings.archive.branchsettings_unavailable = Branch settings are not available if the repo is archived. +settings.archive.tagsettings_unavailable = Tag settings are not available if the repo is archived. settings.unarchive.button = Un-Archive Repo settings.unarchive.header = Un-Archive This Repo settings.unarchive.text = Un-Archiving the repo will restore its ability to receive commits and pushes, as well as new issues and pull-requests. @@ -1795,6 +2001,7 @@ diff.whitespace_ignore_at_eol = Ignore changes in whitespace at EOL diff.stats_desc = %d changed files with %d additions and %d deletions diff.stats_desc_file = %d changes: %d additions and %d deletions diff.bin = BIN +diff.bin_not_shown = Binary file not shown. diff.view_file = View File diff.file_before = Before diff.file_after = After @@ -1802,6 +2009,7 @@ diff.file_image_width = Width diff.file_image_height = Height diff.file_byte_size = Size diff.file_suppressed = File diff suppressed because it is too large +diff.file_suppressed_line_too_long = File diff suppressed because one or more lines are too long diff.too_many_files = Some files were not shown because too many files changed in this diff diff.comment.placeholder = Leave a comment diff.comment.markdown_info = Styling with markdown is supported. @@ -1817,6 +2025,9 @@ diff.review.approve = Approve diff.review.reject = Request changes diff.committed_by = committed by diff.protected = Protected +diff.image.side_by_side = Side by Side +diff.image.swipe = Swipe +diff.image.overlay = Overlay releases.desc = Track project versions and downloads. release.releases = Releases @@ -1826,6 +2037,7 @@ release.new_release = New Release release.draft = Draft release.prerelease = Pre-Release release.stable = Stable +release.compare = Compare release.edit = edit release.ahead.commits = %d commits release.ahead.target = to %s since this release @@ -1852,9 +2064,12 @@ release.deletion_tag_desc = Will delete this tag from repository. Repository con release.deletion_tag_success = The tag has been deleted. release.tag_name_already_exist = A release with this tag name already exists. release.tag_name_invalid = The tag name is not valid. +release.tag_name_protected = The tag name is protected. release.tag_already_exist = This tag name already exists. release.downloads = Downloads release.download_count = Downloads: %s +release.add_tag_msg = Use the title and content of release as tag message. +release.add_tag = Create Tag Only branch.name = Branch Name branch.search = Search branches @@ -1881,12 +2096,23 @@ branch.restore = Restore Branch '%s' branch.download = Download Branch '%s' branch.included_desc = This branch is part of the default branch branch.included = Included +branch.create_new_branch = Create branch from branch: +branch.confirm_create_branch = Create branch +branch.new_branch = Create new branch +branch.new_branch_from = Create new branch from '%s' + +tag.create_tag = Create tag %s +tag.create_success = Tag '%s' has been created. topic.manage_topics = Manage Topics topic.done = Done topic.count_prompt = You can not select more than 25 topics topic.format_prompt = Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long. +error.csv.too_large = Can't render this file because it is too large. +error.csv.unexpected = Can't render this file because it contains an unexpected character in line %d and column %d. +error.csv.invalid_field_count = Can't render this file because it has a wrong number of fields in line %d. + [org] org_name_holder = Organization Name org_full_name_holder = Organization Full Name @@ -1930,6 +2156,7 @@ settings.visibility.private_shortname = Private settings.update_settings = Update Settings settings.update_setting_success = Organization settings have been updated. settings.change_orgname_prompt = Note: changing the organization name also changes the organization's URL. +settings.change_orgname_redirect_prompt = The old name will redirect until it is claimed. settings.update_avatar_success = The organization's avatar has been updated. settings.delete = Delete Organization settings.delete_account = Delete This Organization @@ -1950,12 +2177,15 @@ members.member_role = Member Role: members.owner = Owner members.member = Member members.remove = Remove +members.remove.detail = Remove %[1]s from %[2]s? members.leave = Leave +members.leave.detail = Leave %s? members.invite_desc = Add a new member to %s: members.invite_now = Invite Now teams.join = Join teams.leave = Leave +teams.leave.detail = Leave %s? teams.can_create_org_repo = Create repositories teams.can_create_org_repo_helper = Members can create new repositories in organization. Creator will get administrator access to the new repository. teams.read_access = Read Access @@ -2001,8 +2231,7 @@ dashboard = Dashboard users = User Accounts organizations = Organizations repositories = Repositories -hooks = Default Webhooks -systemhooks = System Webhooks +hooks = Webhooks authentication = Authentication Sources emails = User Emails config = Configuration @@ -2034,7 +2263,7 @@ dashboard.cron.error=Error in Cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s has finished dashboard.delete_inactive_accounts = Delete all unactivated accounts dashboard.delete_inactive_accounts.started = Delete all unactivated accounts task started. -dashboard.delete_repo_archives = Delete all repository archives +dashboard.delete_repo_archives = "Delete all repositories' archives (ZIP, TAR.GZ, etc..)" dashboard.delete_repo_archives.started = Delete all repository archives task started. dashboard.delete_missing_repos = Delete all repositories missing their Git files dashboard.delete_missing_repos.started = Delete all repositories missing their Git files task started. @@ -2053,6 +2282,7 @@ dashboard.resync_all_sshprincipals.desc = (Not needed for the built-in SSH serve dashboard.resync_all_hooks = Resynchronize pre-receive, update and post-receive hooks of all repositories. dashboard.reinit_missing_repos = Reinitialize all missing Git repositories for which records exist dashboard.sync_external_users = Synchronize external user data +dashboard.cleanup_hook_task_table = Cleanup hook_task table dashboard.server_uptime = Server Uptime dashboard.current_goroutine = Current Goroutines dashboard.current_memory_usage = Current Memory Usage @@ -2082,6 +2312,8 @@ dashboard.total_gc_time = Total GC Pause dashboard.total_gc_pause = Total GC Pause dashboard.last_gc_pause = Last GC Pause dashboard.gc_times = GC Times +dashboard.delete_old_actions = Delete all old actions from database +dashboard.delete_old_actions.started = Delete all old actions from database started. users.user_manage_panel = User Account Management users.new_account = Create User Account @@ -2152,11 +2384,13 @@ repos.forks = Forks repos.issues = Issues repos.size = Size -hooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined here are defaults and will be copied into all new repositories. Read more in the webhooks guide. -hooks.add_webhook = Add Default Webhook -hooks.update_webhook = Update Default Webhook +defaulthooks = Default Webhooks +defaulthooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined here are defaults and will be copied into all new repositories. Read more in the webhooks guide. +defaulthooks.add_webhook = Add Default Webhook +defaulthooks.update_webhook = Update Default Webhook -systemhooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined will act on all repositories on the system, so please consider any performance implications this may have. Read more in the webhooks guide. +systemhooks = System Webhooks +systemhooks.desc = Webhooks automatically make HTTP POST requests to a server when certain Gitea events trigger. Webhooks defined here will act on all repositories on the system, so please consider any performance implications this may have. Read more in the webhooks guide. systemhooks.add_webhook = Add System Webhook systemhooks.update_webhook = Update System Webhook @@ -2175,7 +2409,6 @@ auths.host = Host auths.port = Port auths.bind_dn = Bind DN auths.bind_password = Bind Password -auths.bind_password_helper = Warning: This password is stored in plain text. Use a read-only account if possible. auths.user_base = User Search Base auths.user_dn = User DN auths.attribute_username = Username Attribute @@ -2203,9 +2436,14 @@ auths.smtphost = SMTP Host auths.smtpport = SMTP Port auths.allowed_domains = Allowed Domains auths.allowed_domains_helper = Leave empty to allow all domains. Separate multiple domains with a comma (','). -auths.enable_tls = Enable TLS Encryption auths.skip_tls_verify = Skip TLS Verify +auths.force_smtps = Force SMTPS +auths.force_smtps_helper = SMTPS is always used on port 465. Set this to force SMTPS on other ports. (Otherwise STARTTLS will be used on other ports if it is supported by the host.) +auths.helo_hostname = HELO Hostname +auths.helo_hostname_helper = Hostname sent with HELO. Leave blank to send current hostname. +auths.disable_helo = Disable HELO auths.pam_service_name = PAM Service Name +auths.pam_email_domain = PAM Email Domain (optional) auths.oauth2_provider = OAuth2 Provider auths.oauth2_icon_url = Icon URL auths.oauth2_clientID = Client ID (Key) @@ -2216,6 +2454,7 @@ auths.oauth2_tokenURL = Token URL auths.oauth2_authURL = Authorize URL auths.oauth2_profileURL = Profile URL auths.oauth2_emailURL = Email URL +auths.oauth2_tenant = Tenant auths.enable_auto_register = Enable Auto Registration auths.sspi_auto_create_users = Automatically create users auths.sspi_auto_create_users_helper = Allow SSPI auth method to automatically create new accounts for users that login for the first time @@ -2305,6 +2544,7 @@ config.db_path = Path config.service_config = Service Configuration config.register_email_confirm = Require Email Confirmation to Register config.disable_register = Disable Self-Registration +config.allow_only_internal_registration = Allow Registration Only Through Gitea itself config.allow_only_external_registration = Allow Registration Only Through External Services config.enable_openid_signup = Enable OpenID Self-Registration config.enable_openid_signin = Enable OpenID Sign-In @@ -2381,7 +2621,6 @@ config.git_gc_timeout = GC Operation Timeout config.log_config = Log Configuration config.log_mode = Log Mode -config.macaron_log_mode = Macaron Log Mode config.own_named_logger = Named Logger config.routes_to_default_logger = Routes To Default Logger config.go_log = Uses Go Log (redirected to default) @@ -2487,7 +2726,7 @@ comment_issue = `commented on issue %s#%[2]s` comment_pull = `commented on pull request %s#%[2]s` merge_pull_request = `merged pull request %s#%[2]s` transfer_repo = transferred repository %s to %s -push_tag = pushed tag %[2]s to %[3]s +push_tag = pushed tag %[4]s to %[3]s delete_tag = deleted tag %[2]s from %[3]s delete_branch = deleted branch %[2]s from %[3]s compare_branch = Compare @@ -2499,6 +2738,8 @@ mirror_sync_delete = synced and deleted reference %[2]s at %s#%[2]s` reject_pull_request = `suggested changes for %s#%[2]s` publish_release = `released "%[4]s" at %[3]s` +review_dismissed = `dismissed review from %[4]s for %[3]s#%[2]s` +review_dismissed_reason = Reason: create_branch = created branch %[3]s in %[4]s [tool] diff --git a/options/locale/locale_es-ES.ini b/options/locale/locale_es-ES.ini index b0daa3d47..12284966a 100644 --- a/options/locale/locale_es-ES.ini +++ b/options/locale/locale_es-ES.ini @@ -15,6 +15,7 @@ page=Página template=Plantilla language=Idioma notifications=Notificaciones +active_stopwatch=Rastreador de tiempo activo create_new=Crear… user_profile_and_more=Perfil y ajustes… signed_in_as=Identificado como @@ -75,23 +76,32 @@ pull_requests=Pull Requests issues=Incidencias milestones=Hitos +ok=OK cancel=Cancelar save=Guardar add=Añadir add_all=Añadir todo remove=Eliminar remove_all=Eliminar todos +edit=Editar write=Escribir preview=Vista previa loading=Cargando… +step1=Paso 1: +step2=Paso 2: +error=Error error404=La página a la que está intentando acceder o no existe o no está autorizado para verla. +never=Nunca + [error] occurred=Se ha producido un error report_message=Si estás seguro de que este es un error de Gitea, por favor busca un problema en GitHub y abre un nuevo problema si es necesario. +missing_csrf=Solicitud incorrecta: sin token CSRF +invalid_csrf=Solicitud incorrecta: el token CSRF no es válido [startpage] app_desc=Un servicio de Git autoalojado y sin complicaciones @@ -201,6 +211,8 @@ default_enable_timetracking=Activar el seguimiento de tiempo por defecto default_enable_timetracking_popup=Activar el seguimiento de tiempo para nuevos repositorios por defecto. no_reply_address=Dominio de correos electrónicos ocultos no_reply_address_helper=Nombre de dominio para usuarios con dirección de correo electrónico oculta. Por ejemplo, el usuario 'joe' quedará registrado en Git como 'joe@noreply.example.org' si el dominio de correo electrónico oculto se establece a 'noreply.example.org'. +password_algorithm=Algoritmo Hash de Contraseña +password_algorithm_helper=Establece el algoritmo de hashing de contraseña. Los algoritmos tienen diferentes requisitos y fuerza. `argon2` mientras tiene buenas características usa mucha memoria y puede ser inapropiado para sistemas pequeños. [home] uname_holder=Nombre de usuario o correo electrónico @@ -214,6 +226,7 @@ my_mirrors=Mis réplicas view_home=Ver %s search_repos=Buscar un repositorio… filter=Otros filtros +filter_by_team_repositories=Filtrar por repositorios de equipo show_archived=Archivado show_both_archived_unarchived=Mostrar respositorios archivados y desarchivados @@ -233,6 +246,8 @@ users=Usuarios organizations=Organizaciones search=Buscar code=Código +search.fuzzy=Parcial +search.match=Coincidir repo_no_results=No se ha encontrado ningún repositorio coincidente. user_no_results=No se ha encontrado ningún usuario coincidente. org_no_results=No se ha encontrado ninguna organización coincidente. @@ -260,8 +275,8 @@ account_activated=La cuenta ha sido activada prohibit_login=Ingreso prohibido prohibit_login_desc=Su cuenta tiene prohibido ingresar al sistema. Por favor contacte con el administrador del sistema. resent_limit_prompt=Ya ha solicitado recientemente un correo de activación. Por favor, espere 3 minutos y vuelva a intentarlo. -has_unconfirmed_mail=Hola %s, tu correo electrónico (%s) no está confirmado. Si no has recibido un correo de confirmación o necesitas que lo enviemos de nuevo, por favor, haz click en el siguiente botón. -resend_mail=Haz click aquí para reenviar tu correo electrónico de activación +has_unconfirmed_mail=Hola %s, su correo electrónico (%s) no está confirmado. Si no ha recibido un correo de confirmación o necesita que lo enviemos de nuevo, por favor, haga click en el siguiente botón. +resend_mail=Haga click aquí para reenviar su correo electrónico de activación email_not_associate=Esta dirección de correo electrónico no esta asociada a ninguna cuenta. send_reset_mail=Enviar correo de recuperación de cuenta reset_password=Recuperación de cuenta @@ -290,7 +305,8 @@ openid_connect_desc=La URI OpenID elegida es desconocida. Asóciela a una nueva openid_register_title=Crear una nueva cuenta openid_register_desc=La URI OpenID elegida es desconocida. Asóciela a una nueva cuenta aquí. openid_signin_desc=Introduzca su URI OpenID. Por ejemplo: https://anne.me, bob.openid.org.cn o gnusocial.net/carry. -disable_forgot_password_mail=La recuperación de cuentas está desactivada. Por favor, contacte con el administrador del sitio. +disable_forgot_password_mail=La recuperación de cuentas está desactivada porque no hay correo electrónico configurado. Por favor, contacte con el administrador del sitio. +disable_forgot_password_mail_admin=La recuperación de cuentas solo está disponible cuando se configura el correo electrónico configurado. Por favor, configure el correo electrónico para permitir la recuperación de cuentas. email_domain_blacklisted=No puede registrarse con su correo electrónico. authorize_application=Autorizar aplicación authorize_redirect_notice=Será redirigido a %s si autoriza esta aplicación. @@ -304,11 +320,64 @@ password_pwned=La contraseña que eligió está en una establezca su contraseña primero. + +reset_password=Recupere su cuenta +reset_password.title=%s, has solicitado recuperar tu cuenta +reset_password.text=Haga clic en el siguiente enlace para recuperar su cuenta dentro de %s: + +register_success=Registro completado + +issue_assigned.pull=@%[1]s le asignó al pull request %[2]s en el repositorio %[3]s. +issue_assigned.issue=@%[1]s le asignó a la incidencia %[2]s en el repositorio %[3]s. + +issue.x_mentioned_you=@%s te mencionó: +issue.action.force_push=%[1]s empujó a la fuerza el %[2]s de %[3]s a %[4]s. +issue.action.push_1=@%[1]s hizo %[3]d commit al %[2]s +issue.action.push_n=@%[1]s push %[3]d commits a %[2]s +issue.action.close=@%[1]s cerró #%[2]d. +issue.action.reopen=@%[1]s reabrió #%[2]d. +issue.action.merge=@%[1]s fusionó #%[2]d en %[3]s. +issue.action.approve=@%[1]s aprobó este pull request. +issue.action.reject=@%[1]s solicitó cambios en este pull request. +issue.action.review=@%[1]s comentó en este pull request. +issue.action.review_dismissed=@%[1]s descartó la última revisión de %[2]s para este pull request. +issue.action.ready_for_review=@%[1]s marcó este pull request listo para ser revisado. +issue.action.new=@%[1]s creó #%[2]d. +issue.in_tree_path=En %s: + +release.new.subject=%s en %s publicado +release.new.text=@%[1]s lanzó %[2]s en %[3]s +release.title=Título: %s +release.note=Nota: +release.downloads=Descargas: +release.download.zip=Código fuente (ZIP) +release.download.targz=Código fuente (TAR.GZ) + +repo.transfer.subject_to=%s desea transferir "%s" a %s +repo.transfer.subject_to_you=%s desea transferir "%s" a usted +repo.transfer.to_you=usted +repo.transfer.body=Para aceptarlo o rechazarlo, visita %s o simplemente ignórelo. + +repo.collaborator.added.subject=%s le añadió en %s +repo.collaborator.added.text=Has sido añadido como colaborador del repositorio: [modal] yes=Sí @@ -349,12 +418,14 @@ email_error=` no es una dirección de correo válida.` url_error=` no es una URL válida.` include_error=` debe contener la subcadena '%s'.` glob_pattern_error=` el patrón globo no es válido: %s.` +regex_pattern_error=` el patrón de regex no es válido: %s.` unknown_error=Error desconocido: captcha_incorrect=El código CAPTCHA no es correcto. password_not_match=Las contraseñas no coinciden. lang_select_error=Seleccione un idioma de la lista. username_been_taken=El nombre de usuario ya está en uso. +username_change_not_local_user=Los usuarios que no son locales no tienen permitido cambiar su nombre de usuario. repo_name_been_taken=El nombre del repositorio ya está usado. repository_files_already_exist=Ya existen archivos para este repositorio. Póngase en contacto con el administrador del sistema. repository_files_already_exist.adopt=Los archivos ya existen para este repositorio y sólo pueden ser aprobados. @@ -375,6 +446,7 @@ password_uppercase_one=Al menos una letra mayúscula password_digit_one=Al menos un dígito password_special_one=Al menos un carácter especial (puntuación, corchetes, comillas, etc.) enterred_invalid_repo_name=El nombre de repositorio que ha entrado es incorrecto. +enterred_invalid_org_name=El nombre de la organización que ha introducido es incorrecto. enterred_invalid_owner_name=El nuevo nombre de usuario no es válido. enterred_invalid_password=La contraseña que ha introducido es incorrecta. user_not_exist=Este usuario no existe. @@ -401,6 +473,7 @@ repositories=Repositorios activity=Actividad pública followers=Seguidores starred=Repositorios Favoritos +watched=Repositorios seguidos projects=Proyectos following=Siguiendo follow=Seguir @@ -444,6 +517,7 @@ update_language_not_found=El idioma '%s' no está disponible. update_profile_success=Tu perfil ha sido actualizado. change_username=Su nombre de usuario ha sido cambiado. change_username_prompt=Nota: los cambios de nombre de usuario también cambian la URL de su cuenta. +change_username_redirect_prompt=El nombre antiguo se redirigirá hasta que se reclame. continue=Continuar cancel=Cancelar language=Idioma @@ -514,14 +588,27 @@ ssh_helper=¿Necesitas ayuda? Echa un vistazo en la guía de Gi gpg_helper=¿Necesitas ayuda? Echa un vistazo en la guía de GitHub sobre GPG. add_new_key=Añadir clave SSH add_new_gpg_key=Añadir clave GPG -key_content_ssh_placeholder=Comienza con 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384' o 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=Comienza con 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', or 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=Comienza con '-----BEGIN PGP PUBLIC KEY BLOCK-----' add_new_principal=Añadir Principal ssh_key_been_used=Esta clave SSH ya ha sido añadida al servidor. ssh_key_name_used=Una clave SSH con el mismo nombre ya ha sido añadida a su cuenta. ssh_principal_been_used=Este principal ya ha sido añadido al servidor. gpg_key_id_used=Ya existe una clave GPG pública con el mismo ID. -gpg_no_key_email_found=Esta clave GPG no es usable con ninguna de las direcciones de correo electrónico asociadas con su cuenta. +gpg_no_key_email_found=Esta clave GPG no coincide con ninguna dirección de correo electrónico activada asociada a su cuenta. Todavía puede ser añadida si firma el token proporcionado. +gpg_key_matched_identities=Identidades coincidentes: +gpg_key_matched_identities_long=Las identidades incrustadas en esta clave coinciden con las siguientes direcciones de correo electrónico activadas para este usuario. Los commits que coincidan con estas direcciones de correo electrónico pueden ser verificados con esta clave. +gpg_key_verified=Clave verificada +gpg_key_verified_long=La clave ha sido verificada con un token y puede ser usada para verificar confirmaciones que coincidan con cualquier dirección de correo electrónico activada para este usuario, además de cualquier identidad coincidente para esta clave. +gpg_key_verify=Verificar +gpg_invalid_token_signature=La clave GPG proporcionada, la firma y el token no coinciden o el token está desactualizado. +gpg_token_required=Debe proporcionar una firma para el token de abajo +gpg_token=Token +gpg_token_help=Puede generar una firma de la siguiente manera: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature=Firma GPG armadura +key_signature_gpg_placeholder=Comienza con '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=La clave GPG '%s' ha sido verificada. subkeys=Subclaves key_id=ID de clave key_name=Nombre de la Clave @@ -553,6 +640,7 @@ principal_state_desc=Este principal ha sido utilizado en los últimos 7 días show_openid=Mostrar mi perfil hide_openid=Esconderse de perfil ssh_disabled=SSH deshabilitado +ssh_externally_managed=Esta clave SSH está administrada externamente para este usuario manage_social=Gestionar Redes Sociales asociadas social_desc=Estas cuentas sociales están vinculadas a su cuenta de Gitea. Asegúrese de que las reconoce todas, ya que pueden ser usadas para iniciar sesión en su cuenta de Gitea. unbind=Desvincular @@ -619,6 +707,7 @@ or_enter_secret=O introduzca el secreto: %s then_enter_passcode=E introduzca el código de acceso mostrado en la aplicación: passcode_invalid=El código de acceso es incorrecto. Vuelva a intentarlo. twofa_enrolled=Su cuenta ha sido inscrita en la autenticación de doble factor. ¡Guarde su código de respaldo (%s) en un lugar seguro, ya que sólo se muestra una vez! +twofa_failed_get_secret=No se pudo obtener el secreto. u2f_desc=Las claves de seguridad son dispositivos hardware que contienen claves criptográficas. Pueden ser usados para la autenticación de doble factor. Las claves de seguridad deben soportar el estándar FIDOU2F. u2f_require_twofa=Su cuenta debe tener activada la autenticación de doble factor para utilizar claves de seguridad. @@ -640,6 +729,7 @@ repos_none=No posees ningún repositorio delete_account=Elimina tu cuenta delete_prompt=Esta operación eliminará permanentemente su cuenta de usuario. NO podrá deshacerse. +delete_with_all_comments=Tu cuenta es menor de %s. Para evitar comentarios fantasma, todos los comentarios/PR serán eliminados con ella. confirm_delete_account=Confirmar Eliminación delete_account_title=Eliminar cuenta de usuario delete_account_desc=¿Está seguro que desea eliminar permanentemente esta cuenta de usuario? @@ -649,8 +739,18 @@ email_notifications.onmention=Enviar correo sólo al ser mencionado email_notifications.disable=Deshabilitar las notificaciones por correo electrónico email_notifications.submit=Establecer preferencias de correo electrónico +visibility=Visibilidad del usuario +visibility.public=Público +visibility.public_tooltip=Visible para todos los usuarios +visibility.limited=Limitado +visibility.limited_tooltip=Visible sólo para usuarios conectados +visibility.private=Privado +visibility.private_tooltip=Sólo visible para los miembros de la organización + [repo] +new_repo_helper=Un repositorio contiene todos los archivos del proyecto, incluyendo el historial de revisiones. ¿Ya lo tiene en otro lugar? Migrar repositorio. owner=Propietario +owner_helper=Algunas organizaciones pueden no aparecer en el menú desplegable debido a un límite máximo de recuento de repositorios. repo_name=Nombre del repositorio repo_name_helper=Un buen nombre de repositorio está compuesto por palabras clave cortas, memorables y únicas. repo_size=Tamaño del repositorio @@ -668,29 +768,49 @@ fork_repo=Hacer fork del repositorio fork_from=Crear un fork desde fork_visibility_helper=La visibilidad de un repositorio del cual se ha hecho fork no puede ser cambiada. use_template=Utilizar esta plantilla +clone_in_vsc=Clonar en VS Code +download_zip=Descargar ZIP +download_tar=Descargar TAR.GZ generate_repo=Generar repositorio generate_from=Generar desde repo_desc=Descripción +repo_desc_helper=Introduce una descripción corta (opcional) repo_lang=Idioma repo_gitignore_helper=Seleccionar plantillas de .gitignore. +repo_gitignore_helper_desc=Elija qué archivos no rastrear de una lista de plantillas para idiomas comunes. Los artefactos típicos generados por las herramientas de construcción de cada idioma se incluyen por defecto en .gitignore. issue_labels=Etiquetas de incidencia issue_labels_helper=Seleccione un conjunto de etiquetas de incidencia. license=Licencia license_helper=Seleccione un archivo de licencia. +license_helper_desc=Una licencia regula lo que otros pueden y no pueden hacer con tu código. ¿No está seguro de cuál es el adecuado para su proyecto? Vea Elija una licencia. readme=LÉAME readme_helper=Seleccione una plantilla de archivo LÉAME. +readme_helper_desc=Este es el lugar donde puedes escribir una descripción completa de su proyecto. auto_init=Inicializar el repositorio (añade .gitignore, licencia y README) +trust_model_helper=Seleccionar modelo de confianza para la verificación de la firma. Las opciones posibles son: +trust_model_helper_collaborator=Colaborador: Confiar en firmas de colaboradores +trust_model_helper_committer=Comitter: Firmas de confianza que coinciden con los committers +trust_model_helper_collaborator_committer=Colaborador+Comitter: Confiar en firmas de colaboradores que coincidan con el committer +trust_model_helper_default=Predeterminado: Utilice el modelo de confianza por defecto para esta instalación create_repo=Crear repositorio default_branch=Rama por defecto +default_branch_helper=La rama por defecto es la rama base para pull requests y commits de código. mirror_prune=Purgar mirror_prune_desc=Eliminar referencias de seguimiento de remotes obsoletas mirror_interval=Intervalo de réplica (Las unidades de tiempo válidas son 'h', 'm', 's'). Pone 0 para deshabilitar la sincronización automática. mirror_interval_invalid=El intervalo de réplica no es válido. mirror_address=Clonar desde URL -mirror_address_desc=Agregue las credenciales que sean necesarias en la sección de Autorización de Clonado. +mirror_address_desc=Ponga cualquier credencial requerida en la sección de Autorización. mirror_address_url_invalid=La url proporcionada no es válida. Debe escapar correctamente de todos los componentes de la url. mirror_address_protocol_invalid=La url proporcionada no es válida. Sólo las ubicaciones http(s):// o git:// pueden ser replicadas desde. +mirror_lfs=Almacenamiento de archivos grande (LFS) +mirror_lfs_desc=Activar la reproducción de datos LFS. +mirror_lfs_endpoint=Punto final de LFS +mirror_lfs_endpoint_desc=Sync intentará usar la url del clon para determinar el servidor LFS. También puede especificar un punto final personalizado si los datos LFS del repositorio se almacenan en otro lugar. mirror_last_synced=Sincronizado por última vez +mirror_password_placeholder=(Sin cambios) +mirror_password_blank_placeholder=(Indefinido) +mirror_password_help=Cambie el nombre de usario para eliminar una contraseña almacenada. watchers=Seguidores stargazers=Fans forks=Forks @@ -707,6 +827,14 @@ delete_preexisting_label=Eliminar delete_preexisting=Eliminar archivos preexistentes delete_preexisting_content=Eliminar archivos en %s delete_preexisting_success=Eliminó archivos no adoptados en %s +blame_prior=Ver la culpa antes de este cambio + +transfer.accept=Aceptar transferencia +transfer.accept_desc=Transferir a "%s" +transfer.reject=Rechazar transferencia +transfer.reject_desc=Cancelar transferencia a "%s" +transfer.no_permission_to_accept=No tiene permiso para aceptar +transfer.no_permission_to_reject=No tienes permiso para rechazar desc.private=Privado desc.public=Público @@ -731,15 +859,21 @@ archive.title=Este repositorio está archivado. Puede ver los archivos y clonarl archive.issue.nocomment=Este repositorio está archivado. No se puede comentar en las incidencias. archive.pull.nocomment=Este repositorio está archivado. No se puede comentar en los pull requests. -form.reach_limit_of_creation=Ya han alcanzado su límite de repositorios de %d. +form.reach_limit_of_creation_1=Ya han alcanzado su límite de %d repositorios. +form.reach_limit_of_creation_n=Ya han alcanzado su límite de repositorios de %d. form.name_reserved=El nombre de repositorio '%s' está reservado. form.name_pattern_not_allowed=El patrón '%s' no está permitido en un nombre de repositorio. -need_auth=Autorización de clonación +need_auth=Autorización migrate_options=Opciones de migración migrate_service=Servicio de Migración migrate_options_mirror_helper=Este repositorio será uno replicado migrate_options_mirror_disabled=El administrador de tu sitio ha desactivado nuevos repositorios replicados. +migrate_options_lfs=Migrar archivos LFS +migrate_options_lfs_endpoint.label=Punto final de LFS +migrate_options_lfs_endpoint.description=Migración intentará usar su mando Git para determinar el servidor LFS. También puede especificar un punto final personalizado si los datos LFS del repositorio se almacenan en otro lugar. +migrate_options_lfs_endpoint.description.local=También se admite una ruta del servidor local. +migrate_options_lfs_endpoint.placeholder=Dejar en blanco para derivar de la URL de clonar migrate_items=Objetos de migración migrate_items_wiki=Wiki migrate_items_milestones=Hitos @@ -753,19 +887,25 @@ migrate.clone_address=Migrar / Clonar desde URL migrate.clone_address_desc=La URL HTTP(S) o de Git 'clone' de un repositorio existente migrate.clone_local_path=o una ruta local del servidor migrate.permission_denied=No te está permitido importar repositorios locales. +migrate.permission_denied_blocked=No está permitido importar desde hosts bloqueados. +migrate.permission_denied_private_ip=No está permitido importar desde direcciones IP privadas. migrate.invalid_local_path=La ruta local es inválida. No existe o no es un directorio. +migrate.invalid_lfs_endpoint=El punto final de LFS no es válido. migrate.failed=Migración fallida: %v -migrate.lfs_mirror_unsupported=La replicación de objetos LFS no está soportada - use 'git lfs fetch --all' y 'git lfs push --all' en su lugar. migrate.migrate_items_options=Un token de acceso es necesario para migrar elementos adicionales migrated_from=Migrado desde %[2]s migrated_from_fake=Migrado desde %[1]s migrate.migrate=Migrar desde %s migrate.migrating=Migrando desde %s... migrate.migrating_failed=La migración desde %s ha fallado. -migrate.github.description=Migrar datos de Github.com o Github Enterprise. -migrate.git.description=Migrar o replicar de datos de git desde los servicios de Git -migrate.gitlab.description=Migrar datos de GitLab.com o servidor gitlab autoalojado. -migrate.gitea.description=Migrando datos de Gitea.com o servidor Gitea autoalojado. +migrate.migrating_failed.error=Error: %s +migrate.migrating_git=Migrando datos de Git +migrate.migrating_topics=Migrando Temas +migrate.migrating_milestones=Migrando Hitos +migrate.migrating_labels=Migrando etiquetas +migrate.migrating_releases=Migrando Lanzamientos +migrate.migrating_issues=Migrando Incidencías +migrate.migrating_pulls=Migrando Pull Requests mirror_from=réplica de forked_from=forkeado de @@ -798,6 +938,7 @@ branch=Rama tree=Árbol clear_ref=`Borrar referencia actual` filter_branch_and_tag=Filtrar por rama o etiqueta +find_tag=Buscar etiqueta branches=Ramas tags=Etiquetas issues=Incidencias @@ -816,6 +957,8 @@ tag=Etiqueta released_this=publicó esto file_raw=Original file_history=Histórico +file_view_source=Ver código fuente +file_view_rendered=Ver procesado file_view_raw=Ver original file_permalink=Enlace permanente file_too_large=El archivo es demasiado grande para ser mostrado. @@ -857,6 +1000,7 @@ editor.add=Añadir '%s' editor.update=Actualizar '%s' editor.delete=Eliminar '%s' editor.commit_message_desc=Añadir una descripción extendida opcional… +editor.signoff_desc=Añadir un trailer firmado por el committer al final del mensaje de registro de confirmación. editor.commit_directly_to_this_branch=Hacer commit directamente en la rama %s. editor.create_new_branch=Crear una nueva rama para este commit y hacer un pull request. editor.create_new_branch_np=Crear una nueva rama para este commit. @@ -872,7 +1016,7 @@ editor.file_is_a_symlink='%s' es un enlace simbólico. Los enlaces simbólicos n editor.filename_is_a_directory=Nombre de archivo '%s' ya se utiliza como un nombre de directorio en este repositorio. editor.file_editing_no_longer_exists=El archivo que está editando, '%s', ya no existe en este repositorio. editor.file_deleting_no_longer_exists=El archivo que se está eliminando, '%s', ya no existe en este repositorio. -editor.file_changed_while_editing=Desde que comenzó a editar, el contenido del archivo ha sido cambiado. Clic aquí para ver qué ha cambiado o presione confirmar de nuevo para sobrescribir los cambios. +editor.file_changed_while_editing=Desde que comenzó a editar, el contenido del archivo ha sido cambiado. Haga clic aquí para ver qué ha cambiado o presione confirmar de nuevo para sobrescribir los cambios. editor.file_already_exists=Ya existe un archivo con nombre '%s' en este repositorio. editor.commit_empty_file_header=Commit un archivo vacío editor.commit_empty_file_text=El archivo que estás tratando de commit está vacío. ¿Proceder? @@ -894,6 +1038,7 @@ editor.require_signed_commit=Esta rama requiere un commit firmado commits.desc=Ver el historial de cambios de código fuente. commits.commits=Commits commits.no_commits=No hay commits en común. '%s' y '%s' tienen historias completamente diferentes. +commits.nothing_to_compare=Estas ramas son iguales. commits.search=Buscar commits… commits.search.tooltip=Puede prefijar palabras clave con "author:", "committer:", "after:", o "before:", por ejemplo, "revert author:Alice before:2019-04-01". commits.find=Buscar @@ -913,6 +1058,8 @@ ext_issues.desc=Enlace a un gestor de incidencias externo. projects=Proyectos projects.desc=Gestionar problemas y pulls en los tablones del proyecto. +projects.description=Descripción (opcional) +projects.description_placeholder=Descripción projects.create=Crear Proyecto projects.title=Título projects.new=Nuevo proyecto @@ -936,6 +1083,8 @@ projects.board.edit_title=Nuevo Nombre del Tablón projects.board.new_title=Nuevo Nombre del Tablón projects.board.new_submit=Enviar projects.board.new=Nuevo tablón +projects.board.set_default=Establecer como predeterminado +projects.board.set_default_desc=Establecer este tablero como predeterminado para incidencias no categorizadas y pulls projects.board.delete=Eliminar tablón projects.board.deletion_desc=Eliminar un tablón de proyecto mueve todas las incidencias relacionadas a 'Sin categorizar'. ¿Continuar? projects.open=Abrir @@ -1019,6 +1168,7 @@ issues.filter_type.all_issues=Todas las incidencias issues.filter_type.assigned_to_you=Asignadas a ti issues.filter_type.created_by_you=Creadas por ti issues.filter_type.mentioning_you=Citado en +issues.filter_type.review_requested=Revisión solicitada issues.filter_sort=Ordenar issues.filter_sort.latest=Más recientes issues.filter_sort.oldest=Más antiguas @@ -1054,11 +1204,13 @@ issues.commented_at=`comentado %s` issues.delete_comment_confirm=¿Seguro que deseas eliminar este comentario? issues.context.copy_link=Copiar enlace issues.context.quote_reply=Citar respuesta +issues.context.reference_issue=Referencia en una nueva incidencia issues.context.edit=Editar issues.context.delete=Eliminar issues.no_content=Aún no existe contenido. issues.close_issue=Cerrar -issues.pull_merged_at=`fusionado commit %[2]s en %[3]s %[4]s` +issues.pull_merged_at=`fusionado commit %[2]s en %[3]s %[4]s` +issues.manually_pull_merged_at=`fusionado manualmente commit %[2]s en %[3]s %[4]s` issues.close_comment_issue=Comentar y cerrar issues.reopen_issue=Reabrir issues.reopen_comment_issue=Comentar y reabrir @@ -1080,6 +1232,8 @@ issues.re_request_review=Solicitar revisión de nuevo issues.is_stale=Ha habido cambios en este PR desde esta revisión issues.remove_request_review=Eliminar solicitud de revisión issues.remove_request_review_block=No se puede eliminar la solicitud de revisión +issues.dismiss_review=Descartar revisión +issues.dismiss_review_warning=¿Estás seguro de que deseas eliminar la revisión? issues.sign_in_require_desc=Inicie sesión para unirse a esta conversación. issues.edit=Editar issues.cancel=Cancelar @@ -1090,7 +1244,7 @@ issues.label_color=Color etiqueta issues.label_count=%d etiquetas issues.label_open_issues=%d incidencias abiertas issues.label_edit=Editar -issues.label_delete=Borrar +issues.label_delete=Eliminar issues.label_modify=Editar etiqueta issues.label_deletion=Eliminar etiqueta issues.label_deletion_desc=Eliminar una etiqueta la elimina de todos las incidencias. ¿Continuar? @@ -1124,13 +1278,17 @@ issues.lock.title=Bloquear conversación sobre esta incidencia. issues.unlock.title=Desbloquear conversación sobre esta incidencia. issues.comment_on_locked=No puede comentar una incidencia bloqueada. issues.tracker=Gestor de tiempo -issues.start_tracking_short=Iniciar +issues.start_tracking_short=Iniciar temporizador issues.start_tracking=Inicio de seguimiento de tiempo issues.start_tracking_history=`ha empezado a trabajar %s` issues.tracker_auto_close=El temporizador se detendrá automáticamente cuando se cierre este problema -issues.stop_tracking=Detener +issues.tracking_already_started=`¡Ya has iniciado el seguimiento de tiempo en otro problema!` +issues.stop_tracking=Detener temporizador issues.stop_tracking_history=`dejó de trabajar %s` +issues.cancel_tracking=Descartar +issues.cancel_tracking_history=`canceló el seguimiento de tiempo %s` issues.add_time=Añadir tiempo gastado manualmente +issues.del_time=Eliminar este registro de tiempo issues.add_time_short=Añadir tiempo gastado issues.add_time_cancel=Cancelar issues.add_time_history=`añadió tiempo gastado %s` @@ -1138,8 +1296,6 @@ issues.del_time_history=`eliminado el tiempo gastado %s` issues.add_time_hours=Horas issues.add_time_minutes=Minutos issues.add_time_sum_to_small=No se ha entrado tiempo. -issues.cancel_tracking=Cancelar -issues.cancel_tracking_history=`canceló el seguimiento de tiempo %s` issues.time_spent_total=Tiempo total gastado issues.time_spent_from_all_authors=`Tiempo total gastado: %s` issues.due_date=Fecha de vencimiento @@ -1148,7 +1304,7 @@ issues.error_modifying_due_date=Fallo al modificar la fecha de vencimiento. issues.error_removing_due_date=Fallo al eliminar la fecha de vencimiento. issues.push_commit_1=añadido %d commit %s issues.push_commits_n=añadido %d commits %s -issues.force_push_codes=`hizo push forzado %[1]s de %[2]s a %[4]s %[6]s` +issues.force_push_codes=`hizo push forzado %[1]s de %[2]s a %[4]s %[6]s` issues.due_date_form=aaaa-mm-dd issues.due_date_form_add=Añadir fecha de vencimiento issues.due_date_form_edit=Editar @@ -1169,8 +1325,6 @@ issues.dependency.remove=Eliminar issues.dependency.remove_info=Eliminar esta dependencia issues.dependency.added_dependency=`añadida una nueva dependencia %s` issues.dependency.removed_dependency=`eliminada una dependencia %s` -issues.dependency.issue_closing_blockedby=Cerrar este pull request está bloqueado por las siguientes issues -issues.dependency.pr_closing_blockedby=Cierre de esta incidencia es bloqueado por las siguientes incidencias issues.dependency.issue_close_blocks=Esta incidencia bloquea el cierre de las siguientes incidencias issues.dependency.pr_close_blocks=Este pull request bloquea el cierre de las siguientes incidencias issues.dependency.issue_close_blocked=Necesita cerrar todos las incidencias que bloquean esta incidencia antes de que se puede cerrar. @@ -1191,6 +1345,8 @@ issues.review.self.approval=No puede aprobar su propio pull request. issues.review.self.rejection=No puede sugerir cambios en su propio pull request. issues.review.approve=aprobado estos cambios %s issues.review.comment=revisado %s +issues.review.dismissed=descartó la revisión de %s %s +issues.review.dismissed_label=Descartado issues.review.left_comment=dejó un comentario issues.review.content.empty=Es necesario dejar un comentario indicando los cambios solicitados. issues.review.reject=cambios solicitados %s @@ -1210,6 +1366,10 @@ issues.review.resolve_conversation=Resolver conversación issues.review.un_resolve_conversation=Marcar conversación sin resolver issues.review.resolved_by=ha marcado esta conversación como resuelta issues.assignee.error=No todos los asignados fueron añadidos debido a un error inesperado. +issues.reference_issue.body=Cuerpo + +compare.compare_base=base +compare.compare_head=comparar pulls.desc=Activar Pull Requests y revisiones de código. pulls.new=Nuevo Pull Request @@ -1220,6 +1380,7 @@ pulls.compare_compare=recuperar de pulls.filter_branch=Filtrar rama pulls.no_results=Sin resultados. pulls.nothing_to_compare=Estas ramas son iguales. No hay necesidad para crear un pull request. +pulls.nothing_to_compare_and_allow_empty_pr=Estas ramas son iguales. Este PR estará vacío. pulls.has_pull_request=`Ya existe un pull request entre estas ramas: %[2]s#%[3]d` pulls.create=Crear Pull Request pulls.title_desc=desea fusionar %[1]d commits de %[2]s en %[3]s @@ -1232,13 +1393,19 @@ pulls.reopen_to_merge=Vuelva a abrir este Pull Request para realizar una fusión pulls.cant_reopen_deleted_branch=Este pull request no se puede reabrir porque la rama fue eliminada. pulls.merged=Fusionado pulls.merged_as=El Pull Request se ha fusionado como %[2]s. +pulls.manually_merged=Fusionado manualmente +pulls.manually_merged_as=El Pull Request se ha fusionado manualmente como %[2]s. pulls.is_closed=El pull request ha sido cerrado. pulls.has_merged=El pull request ha sido fusionado. pulls.title_wip_desc=`Comience el título con %s para prevenir que el pull request se fusione accidentalmente.` -pulls.cannot_merge_work_in_progress=Este pull request está marcado como un trabajo en progreso. Elimine el prefijo %s del título cuando esté listo +pulls.cannot_merge_work_in_progress=Este pull request está marcado como un trabajo en curso. +pulls.still_in_progress=¿Aún en curso? +pulls.add_prefix=Añadir prefijo %s +pulls.remove_prefix=Eliminar prefijo %s pulls.data_broken=Este pull request está rota debido a que falta información del fork. pulls.files_conflicted=Este pull request tiene cambios en conflicto con la rama de destino. pulls.is_checking=La comprobación de conflicto de fusión está en progreso. Inténtalo de nuevo en unos momentos. +pulls.is_empty=Esta rama es igual a la rama objetivo. pulls.required_status_check_failed=Algunos controles requeridos no han tenido éxito. pulls.required_status_check_missing=Faltan algunos controles necesarios. pulls.required_status_check_administrator=Como administrador, aún puede fusionar este Pull Request. @@ -1259,16 +1426,19 @@ pulls.reject_count_1=%d solicitud de cambio pulls.reject_count_n=%d solicitudes de cambio pulls.waiting_count_1=%d esperando revisión pulls.waiting_count_n=%d esperando revisiónes +pulls.wrong_commit_id=la identificación de commit debe ser para un commit en la rama de destino pulls.no_merge_desc=Este pull request no se puede combinar porque todas las opciones de combinación del repositorio están deshabilitadas. pulls.no_merge_helper=Habilite las opciones de combinación en la configuración del repositorio o fusione el pull request manualmente. pulls.no_merge_wip=Este pull request no se puede combinar porque está marcada como un trabajo en progreso. pulls.no_merge_not_ready=Este pull request no está listo para ser fusionado, compruebe el estado de revisión y las comprobaciones de estado. pulls.no_merge_access=No está autorizado para fusionar de este pull request. -pulls.merge_pull_request=Fusionar Pull Request -pulls.rebase_merge_pull_request=Hacer Rebase y Fusionar -pulls.rebase_merge_commit_pull_request=Hacer Rebase y Fusionar (--no-ff) -pulls.squash_merge_pull_request=Hacer Squash y Fusionar +pulls.merge_pull_request=Crear commit fusionado +pulls.rebase_merge_pull_request=Rebase y luego fast-forward +pulls.rebase_merge_commit_pull_request=Rebase y luego crear commit fusionado +pulls.squash_merge_pull_request=Crear commit squash +pulls.merge_manually=Fusionado manualmente +pulls.merge_commit_id=La identificación del commit fusionado pulls.require_signed_wont_sign=Esta rama requiere commits firmados pero esta fusión no será firmada pulls.invalid_merge_option=No puede utilizar esta opción de combinación para esta solicitud de extracción. pulls.merge_conflict=Fusión fallida: Hubo un conflicto mientras se fusionaba. Pista: Pruebe una estrategia diferente @@ -1295,7 +1465,10 @@ pulls.update_not_allowed=No tiene permisos para actualizar esta rama pulls.outdated_with_base_branch=Esta rama está desactualizada con la rama base pulls.closed_at=`cerró este pull request %[2]s` pulls.reopened_at=`reabrió este pull request %[2]s` +pulls.merge_instruction_hint=`También puede ver instrucciones de línea de comandos.` +pulls.merge_instruction_step1_desc=Desde el repositorio de su proyecto, revisa una nueva rama y prueba los cambios. +pulls.merge_instruction_step2_desc=Combine los cambios y actualice en Gitea. milestones.new=Nuevo hito milestones.open_tab=%d abiertas @@ -1399,7 +1572,7 @@ activity.closed_issues_count_1=Incidencia cerrada activity.closed_issues_count_n=Incidencias cerradas activity.title.issues_1=%d Incidencia activity.title.issues_n=%d incidencias -activity.title.issues_closed_by=%s cerrada por %s +activity.title.issues_closed_from=%s cerrado de %s activity.title.issues_created_by=%s creada por %s activity.closed_issue_label=Cerrada activity.new_issues_count_1=Nueva incidencia @@ -1437,6 +1610,8 @@ activity.git_stats_deletion_n=%d eliminaciones search=Buscar search.search_repo=Buscar repositorio +search.fuzzy=Parcial +search.match=Coincidir search.results=Resultados de la búsqueda para "%s" en %s settings=Configuración @@ -1452,6 +1627,15 @@ settings.hooks=Webhooks settings.githooks=Git Hooks settings.basic_settings=Configuración Básica settings.mirror_settings=Configuración de réplica +settings.mirror_settings.docs=Configure su proyecto para insertar y/o extraer automáticamente los cambios hacia/desde otro repositorio. Las ramas, etiquetas y commits se sincronizarán automáticamente. ¿Cómo replico los repositorios? +settings.mirror_settings.mirrored_repository=Repositorio Replicado +settings.mirror_settings.direction=Dirección +settings.mirror_settings.direction.pull=Pull +settings.mirror_settings.direction.push=Push +settings.mirror_settings.last_update=Última actualización +settings.mirror_settings.push_mirror.none=No hay Réplicas de Push configurados +settings.mirror_settings.push_mirror.remote_url=URL del repositorio remoto de Git +settings.mirror_settings.push_mirror.add=Añadir Réplica de Push settings.sync_mirror=Sincronizar ahora settings.mirror_sync_in_progress=La sincronización del repositorio replicado está en curso. Vuelva a intentarlo más tarde. settings.email_notifications.enable=Habilitar las notificaciones por correo electrónico @@ -1460,6 +1644,7 @@ settings.email_notifications.disable=Deshabilitar las notificaciones por correo settings.email_notifications.submit=Establecer Preferencia de correo electrónico settings.site=Sitio web settings.update_settings=Actualizar configuración +settings.branches.update_default_branch=Actualizar rama por defecto settings.advanced_settings=Ajustes avanzados settings.wiki_desc=Activar Wiki de repositorio settings.use_internal_wiki=Usar Wiki integrada @@ -1487,6 +1672,9 @@ settings.pulls.allow_merge_commits=Activar Commit Fusionar settings.pulls.allow_rebase_merge=Activar Rebase de los commits fusionados settings.pulls.allow_rebase_merge_commit=Activar Rebase con commits explícitos de fusión (--no-ff) settings.pulls.allow_squash_commits=Activar Squash en los commits fusionados +settings.pulls.allow_manual_merge=Habilitar marcar PR como fusionado manualmente +settings.pulls.enable_autodetect_manual_merge=Habilitar la autodetección de los commits fusionado manualmente (Nota: en algunos casos especiales, pueden producirse errores de apreciación) +settings.pulls.default_delete_branch_after_merge=Eliminar por defecto la rama de pull request después de fusionar settings.projects_desc=Activar Proyectos de Repositorio settings.admin_settings=Ajustes de administrador settings.admin_enable_health_check=Activar cheques de estado de salud del repositorio (git fsck) @@ -1504,10 +1692,21 @@ settings.convert_fork_notices_1=Esta operación convertirá el fork en un reposi settings.convert_fork_confirm=Convertir repositorio settings.convert_fork_succeed=El fork se ha convertido en un repositorio normal. settings.transfer=Transferir la propiedad +settings.transfer.rejected=La transferencia de repositorio fue rechazada. +settings.transfer.success=La transferencia del repositorio fue exitosa. +settings.transfer_abort=Cancelar transferencia +settings.transfer_abort_invalid=No puede cancelar una transferencia de repositorio inexistente. +settings.transfer_abort_success=La transferencia del repositorio a %s fue cancelada con éxito. settings.transfer_desc=Transferir este repositorio a un usuario o una organizacion de la cual disponga de privilegios administrativos. +settings.transfer_form_title=Escriba el nombre del repositorio como confirmación: +settings.transfer_in_progress=Actualmente hay una transferencia en curso. Por favor, cancela si quieres transferir este repositorio a otro usuario. settings.transfer_notices_1=- Perderá el acceso al repositorio si lo transfiere a un usuario individual. settings.transfer_notices_2=- Mantendrá el acceso al repositorio si lo transfiere a una organización que usted (co-)posee. -settings.transfer_form_title=Escriba el nombre del repositorio como confirmación: +settings.transfer_notices_3=- Si el repositorio es privado y se transfiere a un usuario individual, esta acción se asegura de que el usuario tenga al menos permisos de lectura (y cambie los permisos si es necesario). +settings.transfer_owner=Nuevo Propietario +settings.transfer_perform=Realizar transferencia +settings.transfer_started=Este repositorio ha sido marcado para transferencia y espera confirmación de "%s" +settings.transfer_succeed=El repositorio ha sido transferido. settings.signing_settings=Configuración de verificación de firmas settings.trust_model=Modelo de confianza de firma settings.trust_model.default=Modelo de confianza por defecto @@ -1517,6 +1716,7 @@ settings.trust_model.collaborator.long=Colaborador: Confiar en firmas de colabor settings.trust_model.collaborator.desc=Las firmas válidas de los colaboradores de este repositorio serán marcadas como "confiables" - (coincidan o no con el committer). De lo contrario, las firmas válidas serán marcadas como "no confiables" si la firma coincide con el committer y "no coincidente" si no lo es. settings.trust_model.committer=Committer settings.trust_model.committer.long=Committer: Firmas de confianza que coinciden con los committers (Esto coincide con GitHub y obligará a Gitea a firmar los commits a tener a Gitea como el committer) +settings.trust_model.committer.desc=Las firmas válidas solo se marcarán como "confiables" si coinciden con el autor de la confirmación; de lo contrario, se marcarán como "no coincidentes". Esto obligará a Gitea a ser el confirmador en los compromisos firmados con el confirmador real marcado como Co-authored-by: y Co-committed-ny: tráiler en el commit. La clave Gitea predeterminada debe coincidir con un usuario en la base de datos. settings.trust_model.collaboratorcommitter=Colaborador+Comitter settings.trust_model.collaboratorcommitter.long=Colaborador+Comitter: Confiar en firmas de colaboradores que coincidan con el committer settings.trust_model.collaboratorcommitter.desc=Las firmas válidas de los colaboradores de este repositorio se marcarán como "de confianza" si coinciden con el confirmador. De lo contrario, las firmas válidas se marcarán como "no confiables" si la firma coincide con el autor de la confirmación y como "no coincidentes" en caso contrario. Esto obligará a Gitea a ser marcado como el confirmador en los compromisos firmados con el confirmador real marcado como Coautor por: y Cocommitido por: tráiler en el compromiso. La clave Gitea predeterminada debe coincidir con un usuario en la base de datos. @@ -1532,9 +1732,6 @@ settings.delete_notices_2=- Esta operación eliminará permanentemente todo en e settings.delete_notices_fork_1=Los forks de este repositorio serán independientes después de eliminarlo. settings.deletion_success=El repositorio ha sido eliminado. settings.update_settings_success=Las opciones del repositorio han sido actualizadas. -settings.transfer_owner=Nuevo Propietario -settings.make_transfer=Realizar Transferencia -settings.transfer_succeed=El repositorio ha sido transferido. settings.confirm_delete=Eliminar este repositorio settings.add_collaborator=Añadir colaborador settings.add_collaborator_success=El nuevo colaborador ha sido añadido. @@ -1629,7 +1826,7 @@ settings.event_pull_request_review_desc=Pull request aprobado, rechazado o comen settings.event_pull_request_sync=Pull Request sincronizado settings.event_pull_request_sync_desc=Pull request sincronizado. settings.branch_filter=Filtro de rama -settings.branch_filter_desc=Lista blanca de rama para eventos de push, creación de rama y eliminación de rama, especificados como patrón globo. Si está vacío o *, se reportan eventos para todas las ramas. Ver github.com/gobwas/glob documentación para la sintaxis. Ejemplos: master, {master,release*}. +settings.branch_filter_desc=Lista blanca de rama para eventos de push, creación de rama y eliminación de rama, especificados como patrón globo. Si está vacío o *, se reportan eventos para todas las ramas. Ver github.com/gobwas/glob documentación para la sintaxis. Ejemplos: master, {master,release*}. settings.active=Activo settings.active_helper=La información sobre los eventos desencadenados se enviará a esta URL de webhook. settings.add_hook_success=El webhook ha sido añadido. @@ -1648,6 +1845,7 @@ settings.add_telegram_hook_desc=Integrar Telegrama en tu reposi settings.add_matrix_hook_desc=Integrar Matrix en su repositorio. settings.add_msteams_hook_desc=Integrar Microsoft Teams en tu repositorio. settings.add_feishu_hook_desc=Integrar Slack en su repositorio. +settings.add_Wechat_hook_desc=Integrar Wechatwork en su repositorio. settings.deploy_keys=Claves de Implementación settings.add_deploy_key=Añadir Clave de Implementación settings.deploy_key_desc=Las claves de implementación tienen acceso de sólo lectura al repositorio. @@ -1699,7 +1897,7 @@ settings.dismiss_stale_approvals_desc=Cuando los nuevos commits que cambien el c settings.require_signed_commits=Requiere commits firmados settings.require_signed_commits_desc=Rechazar push en esta rama si los commits no están firmados o no son verificables. settings.protect_protected_file_patterns=Patrones de archivos protegidos (separados con punto y coma '\;'): -settings.protect_protected_file_patterns_desc=No se permite cambiar directamente archivos protegidos, incluso si el usuario tiene derechos para añadir, editar o eliminar archivos en esta rama. Se pueden separar múltiples patrones usando punto y coma ('\;'). Véase la documentación de github.com/gobwas/glob sobre sintaxis de patrones. Ejemplos: .drone.yml,/docs/**/*.txt. +settings.protect_protected_file_patterns_desc=Archivos protegidos que no están permitidos a ser cambiados directamente incluso si el usuario tiene permiso para agregar, editar o borrar archivos en esta rama. Múltiples patrones pueden separarse usando punto y coma ('\;'). Vea la documentación de github.com/gobwas/glob para la sintaxis de patrones. Ejemplos: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Activar protección settings.delete_protected_branch=Desactivar protección settings.update_protect_branch_success=La protección de la rama '%s' ha sido actualizada. @@ -1713,10 +1911,21 @@ settings.block_on_official_review_requests_desc=Fusionar no será posible cuando settings.block_outdated_branch=Bloquear fusión si la pull request está desactualizada settings.block_outdated_branch_desc=La fusión no será posible cuando la rama principal esté detrás de la rama base. settings.default_branch_desc=Seleccione una rama de repositorio por defecto para los pull request y los commits: +settings.default_merge_style_desc=Estilo de fusión por defecto para pull requests: settings.choose_branch=Elija una rama… settings.no_protected_branch=No hay ramas protegidas. settings.edit_protected_branch=Editar settings.protected_branch_required_approvals_min=Las aprobaciones necesarias no pueden ser negativas. +settings.tags=Etiquetas +settings.tags.protection=Protección de etiquetas +settings.tags.protection.pattern=Patrón de etiquetas +settings.tags.protection.allowed=Permitido +settings.tags.protection.allowed.users=Usuarios permitidos +settings.tags.protection.allowed.teams=Equipos permitidos +settings.tags.protection.allowed.noone=Ningún +settings.tags.protection.create=Proteger Etiqueta +settings.tags.protection.none=No hay etiquetas protegidas. +settings.tags.protection.pattern.description=Puede usar un solo nombre o un patrón de glob o expresión regular para que coincida con varias etiquetas. Lea más en la guía de etiquetas protegida. settings.bot_token=Token del Bot settings.chat_id=ID Chat settings.matrix.homeserver_url=URL de Homeserver @@ -1730,6 +1939,7 @@ settings.archive.success=El repositorio ha sido archivado exitosamente. settings.archive.error=Ha ocurrido un error al intentar archivar el repositorio. Vea el registro para más detalles. settings.archive.error_ismirror=No puede archivar un repositorio replicado. settings.archive.branchsettings_unavailable=Los ajustes de rama no están disponibles si el repositorio está archivado. +settings.archive.tagsettings_unavailable=Los ajustes de las etiquetas no están disponibles si el repositorio está archivado. settings.unarchive.button=Desarchivar Repositorio settings.unarchive.header=Desarchivar este Repositorio settings.unarchive.text=Des-archivar el repositorio restaurará su capacidad de recibir commits y pushes, así como nuevas incidencias y pull-requests. @@ -1779,7 +1989,9 @@ diff.whitespace_ignore_all_whitespace=Ignorar espacio en blanco al comparar lín diff.whitespace_ignore_amount_changes=Ignorar cambios en cantidad de espacio en blanco diff.whitespace_ignore_at_eol=Ignorar cambios en espacios en blanco al final de la línea diff.stats_desc=Se han modificado %d ficheros con %d adiciones y %d borrados +diff.stats_desc_file=%d cambios: %d adiciones y %d eliminaciones diff.bin=BIN +diff.bin_not_shown=Archivo binario no mostrado. diff.view_file=Ver fichero diff.file_before=Antes diff.file_after=Después @@ -1787,6 +1999,7 @@ diff.file_image_width=Anchura diff.file_image_height=Altura diff.file_byte_size=Tamaño diff.file_suppressed=La diferencia del archivo ha sido suprimido porque es demasiado grande +diff.file_suppressed_line_too_long=Las diferiencias del archivo han sido suprimidas porque una o mas lineas son muy largas diff.too_many_files=Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio diff.comment.placeholder=Deja un comentario diff.comment.markdown_info=Es posible estilizar con markdown. @@ -1802,6 +2015,9 @@ diff.review.approve=Aprobar diff.review.reject=Solicitud de cambios diff.committed_by=cometido por diff.protected=Protegido +diff.image.side_by_side=Lado a lado +diff.image.swipe=Deslizar +diff.image.overlay=Superposición releases.desc=Seguir las versiones y descargas del proyecto. release.releases=Lanzamientos @@ -1811,6 +2027,7 @@ release.new_release=Nueva Release release.draft=Borrador release.prerelease=Pre-lanzamiento release.stable=Estable +release.compare=Comparar release.edit=editar release.ahead.commits=%d commits release.ahead.target=a %s desde esta versión @@ -1837,9 +2054,12 @@ release.deletion_tag_desc=Eliminará esta etiqueta del repositorio. El contenido release.deletion_tag_success=La etiqueta ha sido eliminada. release.tag_name_already_exist=Ya existe uno lanzamiento con esta etiqueta. release.tag_name_invalid=El nombre de la etiqueta no es válido. +release.tag_name_protected=El nombre de la etiqueta está protegido. release.tag_already_exist=Este nombre de etiqueta ya existe. release.downloads=Descargas release.download_count=Descargas: %s +release.add_tag_msg=Utilice el título y el contenido de la liberación como mensaje de etiqueta. +release.add_tag=Crear solo etiqueta branch.name=Nombre de la rama branch.search=Buscar ramas @@ -1866,12 +2086,23 @@ branch.restore=Restaurar rama '%s' branch.download=Descargar rama '%s' branch.included_desc=Esta rama forma parte de la predeterminada branch.included=Incluida +branch.create_new_branch=Crear rama desde la rama: +branch.confirm_create_branch=Crear rama +branch.new_branch=Crear nueva rama +branch.new_branch_from=Crear nueva rama desde '%s' + +tag.create_tag=Crear etiqueta %s +tag.create_success=La etiqueta '%s' ha sido creada. topic.manage_topics=Administrar temas topic.done=Hecho topic.count_prompt=No puede seleccionar más de 25 temas topic.format_prompt=Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo. +error.csv.too_large=No se puede renderizar este archivo porque es demasiado grande. +error.csv.unexpected=No se puede procesar este archivo porque contiene un carácter inesperado en la línea %d y la columna %d. +error.csv.invalid_field_count=No se puede procesar este archivo porque tiene un número incorrecto de campos en la línea %d. + [org] org_name_holder=Nombre de la organización org_full_name_holder=Nombre completo de la organización @@ -1915,6 +2146,7 @@ settings.visibility.private_shortname=Privado settings.update_settings=Actualizar configuración settings.update_setting_success=Configuración de la organización se han actualizado. settings.change_orgname_prompt=Nota: cambiar el nombre de la organización también cambia la URL de la organización. +settings.change_orgname_redirect_prompt=El nombre antiguo se redirigirá hasta que se reclame. settings.update_avatar_success=Se ha actualizado el avatar de la organización. settings.delete=Eliminar organización settings.delete_account=Eliminar esta organización @@ -1986,8 +2218,7 @@ dashboard=Panel de control users=Cuenta de Usuario organizations=Organizaciones repositories=Repositorios -hooks=Webhooks por defecto -systemhooks=Webhooks del sistema +hooks=Webhooks authentication=Orígenes de autenticación emails=Correos de usuario config=Configuración @@ -2019,7 +2250,7 @@ dashboard.cron.error=Error en Cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s ha finalizado dashboard.delete_inactive_accounts=Eliminar todas las cuentas inactivas dashboard.delete_inactive_accounts.started=Se ha iniciado la tarea: "Eliminar todas las cuentas inactivas". -dashboard.delete_repo_archives=Eliminar todos los archivos de repositorios +dashboard.delete_repo_archives=Eliminar todos los archivos del repositorio (ZIP, TAR.GZ, etc.) dashboard.delete_repo_archives.started=Se ha iniciado la tarea: "Eliminar todos los archivos del repositorios". dashboard.delete_missing_repos=Eliminar todos los repositorios que faltan sus archivos Git dashboard.delete_missing_repos.started=Se ha iniciado la tarea: "Eliminar todos los repositorios que faltan sus archivos Git". @@ -2038,6 +2269,7 @@ dashboard.resync_all_sshprincipals.desc=(No es necesario para el servidor SSH in dashboard.resync_all_hooks=Resincronizar los hooks de pre-recepción, actualización y post-recepción de todos los repositorios. dashboard.reinit_missing_repos=Reiniciar todos los repositorios Git faltantes de los que existen registros dashboard.sync_external_users=Sincronizar datos de usuario externo +dashboard.cleanup_hook_task_table=Limpiar tabla hook_task dashboard.server_uptime=Tiempo de actividad del servidor dashboard.current_goroutine=Gorutinas actuales dashboard.current_memory_usage=Uso de memoria actual @@ -2067,6 +2299,8 @@ dashboard.total_gc_time=Pausa Total por GC dashboard.total_gc_pause=Pausa Total por GC dashboard.last_gc_pause=Última Pausa por GC dashboard.gc_times=Ejecuciones GC +dashboard.delete_old_actions=Eliminar todas las acciones antiguas de la base de datos +dashboard.delete_old_actions.started=Eliminar todas las acciones antiguas de la base de datos inicializada. users.user_manage_panel=Gestión de cuentas de usuario users.new_account=Crear Cuenta de Usuario @@ -2104,6 +2338,7 @@ users.delete_account=Eliminar Cuenta de Usuario users.still_own_repo=Este usuario todavía posee uno o más depósitos. Eliminar o transferir estos repositorios primero. users.still_has_org=Este usuario es un miembro de una organización. Primero retire el usuario de cualquier organización. users.deletion_success=La cuenta de usuario ha sido eliminada. +users.reset_2fa=Reiniciar 2FA emails.email_manage_panel=Gestion de Correo del Usuario emails.primary=Principal @@ -2136,10 +2371,12 @@ repos.forks=Forks repos.issues=Incidencias repos.size=Tamaño -hooks.desc=Los Webhooks automáticamente hacen peticiones HTTP POST a un servidor cuando ciertos eventos de Gitea se activan. Los ganchos definidos aquí son predeterminados y serán copiados en todos los nuevos repositorios. Leer más en la guía webhooks. -hooks.add_webhook=Añadir Webhook por defecto -hooks.update_webhook=Actualizar Webhook por defecto +defaulthooks=Webhooks por defecto +defaulthooks.desc=Los Webhooks automáticamente hacen peticiones HTTP POST a un servidor cuando ciertos eventos de Gitea se activan. Los ganchos definidos aquí son predeterminados y serán copiados en todos los nuevos repositorios. Leer más en la guía webhooks. +defaulthooks.add_webhook=Añadir Webhook por defecto +defaulthooks.update_webhook=Actualizar Webhook por defecto +systemhooks=Webhooks del sistema systemhooks.desc=Los webhooks automáticamente hacen peticiones HTTP POST a un servidor cuando ciertos eventos de Gitea se activan. Los webhooks definidos actuarán en todos los repositorios del sistema, así que por favor considere las implicaciones de rendimiento que esto pueda tener. Lea más en la guía de webhooks. systemhooks.add_webhook=Añadir Webhook del Sistema systemhooks.update_webhook=Actualizar Webhook del Sistema @@ -2159,7 +2396,6 @@ auths.host=Servidor auths.port=Puerto auths.bind_dn=Bind DN auths.bind_password=Contraseña Bind -auths.bind_password_helper=Advertencia: Esta contraseña se almacena en texto plano. Utilice una cuenta de sólo lectura si es posible. auths.user_base=Base de búsqueda de usuarios auths.user_dn=DN de Usuario auths.attribute_username=Atributo nombre de usuario @@ -2187,10 +2423,16 @@ auths.smtphost=Servidor SMTP auths.smtpport=Puerto SMTP auths.allowed_domains=Dominios Permitidos auths.allowed_domains_helper=Dejar vacío para permitir todos los dominios. Separa múltiples dominios con una coma (','). -auths.enable_tls=Habilitar cifrado TLS auths.skip_tls_verify=Omitir la verificación TLS +auths.force_smtps=Forzar SMTPS +auths.force_smtps_helper=SMTPS se utiliza siempre en el puerto 465. Establezca esto para forzar SMTPS en otros puertos. (De lo contrario, STARTTLS se utilizará en otros puertos si es soportado por el host.) +auths.helo_hostname=Nombre de anfitrión HELO +auths.helo_hostname_helper=Nombre de anfitrión enviado con HELO. Déjelo vacío para enviar el nombre de anfitrión actual. +auths.disable_helo=Desactivar HELO auths.pam_service_name=Nombre del Servicio PAM +auths.pam_email_domain=Dominio de correo de PAM (opcional) auths.oauth2_provider=Proveedor OAuth2 +auths.oauth2_icon_url=URL de icono auths.oauth2_clientID=ID de cliente (clave) auths.oauth2_clientSecret=Secreto del cliente auths.openIdConnectAutoDiscoveryURL=URL de descubrimiento automático de OpenID Connect @@ -2199,6 +2441,7 @@ auths.oauth2_tokenURL=URL del token auths.oauth2_authURL=URL de Autorización auths.oauth2_profileURL=URL del perfil auths.oauth2_emailURL=URL de correo +auths.oauth2_tenant=Tenant auths.enable_auto_register=Hablilitar Auto-Registro auths.sspi_auto_create_users=Crear usuarios automáticamente auths.sspi_auto_create_users_helper=Permitir al método de autenticación SSPI crear automáticamente nuevas cuentas para los usuarios que se conectan por primera vez @@ -2288,6 +2531,7 @@ config.db_path=Ruta config.service_config=Configuración del servicio config.register_email_confirm=Requerir confirmación de correo electrónico para registrarse config.disable_register=Deshabilitar auto-registro +config.allow_only_internal_registration=Permitir el registro solo desde Gitea config.allow_only_external_registration=Permitir el registro únicamente a través de servicios externos config.enable_openid_signup=Habilitar el auto-registro con OpenID config.enable_openid_signin=Habilitar el inicio de sesión con OpenID @@ -2364,7 +2608,6 @@ config.git_gc_timeout=Tiempo de espera de operación de GC config.log_config=Configuración del Log config.log_mode=Modo del Log -config.macaron_log_mode=Modo de registro Macaron config.own_named_logger=Registro Nombrado config.routes_to_default_logger=Enviado al registro por defecto config.go_log=Utiliza el registro de Go (redireccionado a predeterminado) @@ -2470,7 +2713,7 @@ comment_issue=`comentó en la incidencia %s#%[2]s` comment_pull=`comentado en pull request %s#%[2]s` merge_pull_request=`fusionado pull request %s#%[2]s` transfer_repo=transfirió el repositorio %s a %s -push_tag=hizó push la etiqueta %[2]s a %[3]s +push_tag=hizó push la etiqueta %[4]s a %[3]s delete_tag=etiqueta eliminada %[2]s de %[3]s delete_branch=rama %[2]s eliminada, de %[3]s compare_branch=Comparar @@ -2482,6 +2725,9 @@ mirror_sync_delete=sincronizada y eliminada referencia %[2]s en %s#%[2]s` reject_pull_request=`sugerido cambios para %s#%[2]s` publish_release=`se lanzó "%[4]s" en %[3]s` +review_dismissed=`descartó la revisión de %[4]s para %[3]s#%[2]s` +review_dismissed_reason=Motivo: +create_branch=creó rama %[3]s en %[4]s [tool] ago=hace %s diff --git a/options/locale/locale_fa-IR.ini b/options/locale/locale_fa-IR.ini index 012ceda6c..eb98f2a64 100644 --- a/options/locale/locale_fa-IR.ini +++ b/options/locale/locale_fa-IR.ini @@ -87,6 +87,7 @@ loading=بارگذاری… error404=صفحه موردنظر شما یا وجود ندارد یا شما دسترسی کافی برای مشاهده آن را ندارید. + [error] occurred=خطایی رخ داده است report_message=اگر شما مطمئن هستیند این مشکل مربوط به یک باگ در Gitea است، لطفا در GitHub مشکل را جستجو کنید و در صورت نیاز، یک موضوع جدید باز کنید. @@ -286,7 +287,6 @@ openid_connect_desc=نشانی OpenID URI وارد شده شناخته نشد. openid_register_title=ایجاد یک حساب جدید openid_register_desc=نشانی URI وارد شده شناخته نشد. آن را با یک حساب جدید متصل کنید. openid_signin_desc=نوع حساب کاربری خود را وارد کنید. به عنوان مثال: https://anne.me و bob.openid.org.cn یا gnusocial.net/carry. -disable_forgot_password_mail=بازیابی حساب غیر فعال شده است. لطفا با مدیر سایت تماس بگیرید. email_domain_blacklisted=شما نمیتوانید با ایمیل خود ثبت نام کنید. authorize_application=برنامه احراز هویت authorize_redirect_notice=اگر شما این برنامه را تایید کنید، به %s منتقل خواهید شد. @@ -298,12 +298,22 @@ authorization_failed_desc=تاییدیه ناموفق بود. لذا ما درخ sspi_auth_failed=SSPI عدم احراز هویت [mail] + activate_account=لطفا حساب خود را فعال کنید + activate_email=نشانی ایمیل خود را تایید کنید -reset_password=حساب خود را دوباره فعال کنید -register_success=ثبت‌نام با موفقیت انجام شد + register_notify=به گیتی یا گیت‌گو خوش آمدید +reset_password=حساب خود را دوباره فعال کنید + +register_success=ثبت‌نام با موفقیت انجام شد + + + + + + [modal] yes=بله no=خیر @@ -501,7 +511,6 @@ add_new_key=اضافه کردن کلید SSH add_new_gpg_key=اضافه کردن کلید GPG ssh_key_been_used=این کلید SSH پیش از این به سرور افزوده شده است. gpg_key_id_used=یک کلید GPG با این ID پیش از این وجود داشته است. -gpg_no_key_email_found=این کلید GPG با هیچ ایمیلی که به حساب شما مرتبط است، قابل استفاده نیست. subkeys=کلید های زیر مجموعه key_id=شناسه کلید key_name=نام کلید @@ -624,6 +633,7 @@ email_notifications.onmention=فقط یادآوری توسط ایمیل email_notifications.disable=غیرفعال‌ کردن اعلان‌های ایمیل email_notifications.submit=ثبت اولویت ایمیل + [repo] owner=مالک repo_name=نام مخزن @@ -662,7 +672,6 @@ mirror_prune_desc=حذف منابع پیگیری‌راه‌دور منسوخ mirror_interval=بازه زمانی قرینه سازی (mirror) با 'h', 'm', 's'. برای غیر فعال کردن همگام سازی خودکار 0 بگذارید. mirror_interval_invalid=بازه زمانی سازی قرینه نیست. mirror_address=همسان‌سازی از نشانی -mirror_address_desc=هر گواهینامه لازم را در بخش Clone Authority (مجوز همسان‌سازی) قرار دهید. mirror_address_url_invalid=Url ارائه شده نامعتبر است. شما باید از تمام اجزای Url صحیح گزیر بزنید. mirror_address_protocol_invalid=نشانی ارائه شده غیرمعتبر است. فقط استفاده از http(s):// یا git:// می‌تواند قرینه شوند. mirror_last_synced=آخرین همگام سازی @@ -674,6 +683,7 @@ reactions_more=و %d بیشتر unit_disabled=مدیر سایت این قسمت مخزن را غیرفعال کرده است. language_other=دیگر + desc.private=خصوصی desc.public=عمومی desc.private_template=قالب خصوصی @@ -697,11 +707,9 @@ archive.title=این مخزن بایگانی شد. شما می توانید فا archive.issue.nocomment=این مخزن بایگانی شده است. شما نمی‎توانید در مورد مسائل اظهار نظر کنید. archive.pull.nocomment=این مخزن بایگانی شده. شما نمی توانید دیدگاهی بر روی این تقاضای واکشی ارسال کنید. -form.reach_limit_of_creation=شما قبلاً به حد مجاز مخازن %d رسیده‎اید. form.name_reserved=یک مخزن با نام '%s' از قبل وجود دارد. form.name_pattern_not_allowed=الگوی %s در نام مخزن مجاز نیست. -need_auth=مجوز همسان‌سازی migrate_items=مولفه های مهاجرت migrate_items_wiki=دانشنامه migrate_items_milestones=نقاط عطف @@ -716,7 +724,6 @@ migrate.clone_local_path=یا مسیر سرویس دهنده محلی migrate.permission_denied=شما مجاز به واردات مخازن محلی نیستید. migrate.invalid_local_path=مسیر محلی نامعتبر است. وجود ندارد یا یک پوشه نیست. migrate.failed=انتقال انجام نشد: %v -migrate.lfs_mirror_unsupported=قرینه سازی LFS اشیا پشتیبانی نمی‌شود به جای آن از 'git lfs fetch --all' و 'git lfs push --all' استفاده کنید. migrated_from=مهاجرت از %[2]s migrated_from_fake=مهاجرت از %[1]s migrate.migrating=مهاجرت از %s ... @@ -958,7 +965,6 @@ issues.context.edit=ویرایش issues.context.delete=حذف issues.no_content=هنوز محتوایی ایجاد نشده. issues.close_issue=ببند -issues.pull_merged_at=`انجام ادغام تغییرات %[2]s داخل %[3]s %[4]s` issues.close_comment_issue=ثبت دیدگاه و بستن issues.reopen_issue=بازگشایی issues.reopen_comment_issue=ثبت دیدگاه و بازگشایی @@ -1023,12 +1029,11 @@ issues.lock.title=انسداد مکالمه در این مسئله. issues.unlock.title=رفع انسداد مکالمه در این مسئله. issues.comment_on_locked=شما نمی‌توانید در مسئله قفل شده اظهار نظر کنید. issues.tracker=پیگیری زمان -issues.start_tracking_short=آغاز issues.start_tracking=شروع به پیگیری زمان issues.start_tracking_history=`شروع به کار %s` issues.tracker_auto_close=زمان‌سنج به صورت خودکار متوقف میشود زمانی که مسئله بسته شود -issues.stop_tracking=توقف issues.stop_tracking_history=`توقف کار در %s` +issues.cancel_tracking_history=`انصراف از پیگیری زمان %s` issues.add_time=زمان را به صورت دستی وارد کنید issues.add_time_short=افزودن زمان issues.add_time_cancel=انصراف @@ -1037,8 +1042,6 @@ issues.del_time_history=`زمان صرف شده حذف شد %s` issues.add_time_hours=ساعت issues.add_time_minutes=دقیقه issues.add_time_sum_to_small=هیچ زمانی وارد نشده. -issues.cancel_tracking=انصراف -issues.cancel_tracking_history=`انصراف از پیگیری زمان %s` issues.time_spent_total=کل زمان صرف شده issues.time_spent_from_all_authors=`زمان صرف شده: %s` issues.due_date=موعد مقرر @@ -1047,7 +1050,6 @@ issues.error_modifying_due_date=تغییر موعد مقرر با شکست مو issues.error_removing_due_date=حذف موعد مقرر با شکست مواجه شد. issues.push_commit_1=%d اعمال تغییر اضافه شده است %s issues.push_commits_n=%d اعمال تغییرات اضافه شده است %s -issues.force_push_codes=`ارسال به سرور اجباری %[1] از %[2]s به%[4]s %[6]s` issues.due_date_form=yyyy-mm-dd issues.due_date_form_add=افزودن موعد مقرر issues.due_date_form_edit=ویرایش @@ -1068,8 +1070,6 @@ issues.dependency.remove=حذف/ساقط کردن issues.dependency.remove_info=حذف این وابستگی issues.dependency.added_dependency=`%s یک مخزن جدید اضافه کرد` issues.dependency.removed_dependency=`%s یک وابستگی را حذف کرد` -issues.dependency.issue_closing_blockedby=بستن این تقاضای واکشی وسط موضوعات زیر رد/ مسدود شده است -issues.dependency.pr_closing_blockedby=بستن این موضوع وسط موضوعات زیر رد/ مسدود شده است issues.dependency.issue_close_blocks=این مسئله با توجه به موضوعات مطرح شده مسدود شده است issues.dependency.pr_close_blocks=این تقاضای واکشی با توجه به موضوعات مطرح شده مسدود شده است issues.dependency.issue_close_blocked=شما نیاز به بستن تمامی مسائل مسدود شده مسئله قبل بستن آن هستید. @@ -1109,6 +1109,7 @@ issues.review.un_resolve_conversation=مکالمه را بعنوان حل نشد issues.review.resolved_by=علامت گذاری این مکالمه بعنوان حل شده issues.assignee.error=به دلیل خطای غیرمنتظره همه تکالیف اضافه نشد. + pulls.desc=نمایش تقاضای واکشی ها و بازبینی های کد. pulls.new=ایجاد تقاضای واکشی pulls.compare_changes=تقاضای واکشی جدید @@ -1133,7 +1134,6 @@ pulls.merged_as=تقاضای واکشی شروع شذع با عنوان %s برای جلو گیری کردن از تقاضای واکشی که موقع ادغام دچار تصادم میشود.` -pulls.cannot_merge_work_in_progress=این تقاضای واکشی در حال پردازش است. پیشوند %s پس از آنکه آماده شد از عنوانش حذف میشود pulls.data_broken=این تقاضای واکشی به دلیل از دست رفتن اطلاعات انشعاب با شکست مواجه شد. pulls.files_conflicted=این تقاضای واکشی دارای تغییراتی است که با شاخه هدف تداخل دارد. pulls.is_checking=در حال پردازش تداخل در ادغام می‌باشد. لطفاً لحظاتی بعد امتحان کنید. @@ -1160,10 +1160,6 @@ pulls.no_merge_helper=گزینه های ادغام را در تنظیمات مخ pulls.no_merge_wip=این تقاضای واکشی قابل ادغام نیست لذا اکنون به این مخزن درحال پردازش علامت گذاری شده است. pulls.no_merge_not_ready=این درخواست واکشی آماده ادغام نیست، وضعیت بازبینی را چک کنید. pulls.no_merge_access=شما مجاز به ادغام این درخواست واکشی نیستید. -pulls.merge_pull_request=ادغام تقاضای واکشی -pulls.rebase_merge_pull_request=بازگردانی و ادغام -pulls.rebase_merge_commit_pull_request=بازگردانی و ادغام (--no-ff) -pulls.squash_merge_pull_request=له کردن و ادغام pulls.require_signed_wont_sign=انشعاب نیازمند تغییرات امضا شده است اما این ادغام امضا نخواهد شد pulls.invalid_merge_option=شما نمی‌توانید از این گزینه برای تقاضای واکشی استفاده کنید. ; %[2]s
    %[3]s
    @@ -1267,7 +1263,6 @@ activity.closed_issues_count_1=مسئله حل شده activity.closed_issues_count_n=مسائل حل شده activity.title.issues_1=%d مسئله activity.title.issues_n=%d مسئله -activity.title.issues_closed_by=%s بسته شده توسط %s activity.title.issues_created_by=%s ایجاد شده توسط %s activity.closed_issue_label=بسته شده activity.new_issues_count_1=مسئله‌ی جدید @@ -1372,9 +1367,11 @@ settings.convert_fork_confirm=تبدیل مخزن settings.convert_fork_succeed=انشعاب به یک مخزن عادی تبدیل شده است. settings.transfer=انتقال مالکیت settings.transfer_desc=انتقال مالکیت این مخزن به کاربر بانی یا سازمانی که شما حق مدیریت در آن دارید. +settings.transfer_form_title=نام مخزن را برای تایید عمل خورد اینجا وارد کنید: settings.transfer_notices_1=- شما دسترسی خود را نسبت مخزن را از دست میدهید اگر مالکیت آن را به یک کاربری مفرد انتقال دهید. settings.transfer_notices_2=- شما دسترسی خود را نسبت مخزن را حفظ میکنید. اگر مالکیت آن را به یک سازمانی که در آن مالکیت دارید انتقال دهید. -settings.transfer_form_title=نام مخزن را برای تایید عمل خورد اینجا وارد کنید: +settings.transfer_owner=مالک جدید +settings.transfer_succeed=این مخزن با موفقیت منتقل شد. settings.wiki_delete=حذف اطلاعات دانشنامه settings.wiki_delete_desc=حذف اطلاعات دانشنامه مخزن همیشگی بوده و قابل بازگشت نخواهد بود. settings.wiki_delete_notices_1=- این به صورت کامل حذف خواهد کرد و دانشنامه این برای محزن %s غیر فعال می‌کند. @@ -1387,9 +1384,6 @@ settings.delete_notices_2=این عملیات برای همیشه مخزن * باشد. رخداد های تمامی شاخه های گزارش می شوند. به github.com/gobwas/glob برای مستندات املای آن نگاه کنید. مثال ها: master, {master,release*}. settings.active=فعال settings.active_helper=اطلاعات درباره کشیده شدن ماشه رویدادها به این نشانی هوک تحت وب ارسال خواهد شد. settings.add_hook_success=یک هوک تحت وب جدید افزوده شده است. @@ -1664,11 +1657,13 @@ branch.download=بارگیری یا دریافت شاخه '%s' branch.included_desc=این شاخه بخشی از شاخه پیش فرض است branch.included=مشمول شده + topic.manage_topics=مدیریت موضوعات topic.done=انجام شد topic.count_prompt=شما نمی توانید بیش از 25 موضوع انتخاب کنید topic.format_prompt=موضوع می‌بایستی با حروف یا شماره ها شروع شود. و می‌تواند شامل دَش ('-') باشد و طول آن تا 35 کارکتر نیز امکانپذیر است. + [org] org_name_holder=نام سازمان org_full_name_holder=نام کامل سازمان @@ -1779,7 +1774,6 @@ dashboard=پیشخوان users=حساب کاربران organizations=تشکیلات repositories=مخازن -hooks=افزودن هوک‌های تحت وب پیش فرض authentication=منابع احراز هویت config=پیکربندی notices=هشدارهای سامانه @@ -1797,7 +1791,6 @@ dashboard.operation_switch=تعویض dashboard.operation_run=اجرا dashboard.clean_unbind_oauth=تمیز کردن اتصال بدون مرز OAuth dashboard.clean_unbind_oauth_success=تمامی اتصالات بدون مرز OAuth حذف شدند. -dashboard.delete_repo_archives=حذف تمامی مخازن بایگانی شده dashboard.delete_missing_repos=حذف تمامی مخازنی که پرونده‌های گیت آنها از بین رفته است dashboard.delete_generated_repository_avatars=حذف آواتار هایی که برای مخزن تولید شده اند dashboard.git_gc_repos=متراکم کردن تمامی زباله‌های مخازن @@ -1883,9 +1876,6 @@ repos.forks=انشعاب‌ها repos.issues=مسائل repos.size=اندازه -hooks.desc=هوک تحت وب به صورت خودکار درخواست POST HTTP را به سمت سرور روانه می‌کند زمانی که ماشه رخداد Gitea کشیده شود. هوک تحت وب اینجا به صورت پیش فرض اینجا تعریف شده و برای تمامی مخزن جدید کپی خواهد شد. برای اطلاعات بیشتر به e راهنمای هوک تحت وب مراجعه کنید. -hooks.add_webhook=افزودن هوک تحت وب پیش فرض -hooks.update_webhook=به روز رسانی هوک تحت وب پیش فرض auths.auth_manage_panel=مدیریت منابع احراز هویت @@ -1903,7 +1893,6 @@ auths.host=میزبان auths.port=درگاه (پورت) auths.bind_dn=DN متصل شده auths.bind_password=اتصال گذرواژه -auths.bind_password_helper=هشدار: این گذرواژه به صورت متن خام ذخیره می شود. استفاده حساب های کاربری فقط-خواندنی امکان پذیر هست. auths.user_base=پایگاه جستجوی کاربر auths.user_dn=کاربر DN auths.attribute_username=ویژگی نام کاربری @@ -1923,7 +1912,6 @@ auths.smtphost=میزبان SMTP auths.smtpport=گذرگاه(پورت) SMTP auths.allowed_domains=دامنه های مجاز auths.allowed_domains_helper=برای اجازه به تمامی دامنه های آن را خالی رها کنید. یا با ویرگول (',') از یک دیگر جدا کنید. -auths.enable_tls=فعال کردن رمزگذاری TLS auths.skip_tls_verify=صرف نظر از اعتبار سنجی TLS auths.pam_service_name=نام سرویس PAM auths.oauth2_provider=تامین کننده OAuth2 @@ -2095,7 +2083,6 @@ config.git_gc_timeout=زمان آستانه ی عملیات GC config.log_config=پیکربندی ثبت رخداد config.log_mode=شیوه ثبت رخداد -config.macaron_log_mode=مکرون شیوه ثبت رخداد config.own_named_logger=نام ثبت کننده رخداد config.routes_to_default_logger=خط سیر به ثبت کننده رخداد پیشفرض config.go_log=استفاده از ثبت رخداد (هدایت به پیشفرض) @@ -2150,7 +2137,6 @@ comment_issue=`در مسئله ی %s#%[2]s اظهار comment_pull=`تقاضای واکشی برای %s#%[2]s توضیح داده شده است` merge_pull_request=`تقاضای واکشی برای %s#%[2]sایجاد شده است` transfer_repo=مخزن از %s به %sمنتقل شده است -push_tag=برچسب درج شده %[2]s به %[3]s delete_tag=برچسب %[2] از %[3] حذف شدند delete_branch=شاخه %[2] از %[3] حذف شدند compare_commits=%d کامیت‌‌ مقایسه شد diff --git a/options/locale/locale_fi-FI.ini b/options/locale/locale_fi-FI.ini index b5ceb3f2b..81534306c 100644 --- a/options/locale/locale_fi-FI.ini +++ b/options/locale/locale_fi-FI.ini @@ -20,6 +20,7 @@ user_profile_and_more=Profiili ja asetukset… signed_in_as=Kirjautuneena käyttäjänä enable_javascript=Tämä sivusto toimii paremmin JavaScriptillä. toc=Sisällysluettelo +licenses=Lisenssit username=Käyttäjätunnus email=Sähköpostiosoite @@ -69,6 +70,7 @@ issues=Ongelmat milestones=Merkkipaalut cancel=Peruuta +save=Tallenna add=Lisää add_all=Lisää kaikki remove=Poista @@ -81,6 +83,7 @@ loading=Ladataan… error404=Sivu, jota yrität nähdä, joko ei löydy tai et ole oikeutettu katsomaan sitä. + [error] occurred=Tapahtui virhe @@ -189,6 +192,7 @@ view_home=Näytä %s search_repos=Etsi repo… +show_private=Yksityinen issues.in_your_repos=Repoissasi @@ -250,7 +254,6 @@ openid_connect_desc=Valittu OpenID-osoite on tuntematon. Liitä se uuteen tiliin openid_register_title=Luo uusi tili openid_register_desc=Valittu OpenID-osoite on tuntematon. Liitä se uuteen tiliin täällä. openid_signin_desc=Anna OpenID-osoitteesi. Esimerkiksi: https://anne.me, bob.openid.org.cn tai gnusocial.net/carry. -disable_forgot_password_mail=Tilin palautus ei ole käytössä. Ota yhteyttä sivuston ylläpitäjään. email_domain_blacklisted=Et voi rekisteröityä sähköpostiosoittellasi. authorize_application=Valtuuta sovellus authorize_redirect_notice=Sinut uudelleen ohjataan osoitteeseen %s jos valtuutat tämän sovelluksen. @@ -262,12 +265,22 @@ authorization_failed_desc=Käyttöoikeuden varmistus epäonnistui virheellisen p sspi_auth_failed=SSPI todennus epäonnistui [mail] + activate_account=Ole hyvä ja aktivoi tilisi + activate_email=Vahvista sähköpostiosoitteesi -reset_password=Palauta käyttäjätili -register_success=Rekisteröinti onnistui + register_notify=Tervetuloa Giteaan +reset_password=Palauta käyttäjätili + +register_success=Rekisteröinti onnistui + + + + + + [modal] yes=Kyllä no=Ei @@ -485,6 +498,7 @@ delete_account_title=Poista käyttäjätili email_notifications.enable=Ota käyttöön sähköpostiilmoitukset + [repo] owner=Omistaja repo_name=Repon nimi @@ -513,13 +527,13 @@ forks=Haarat pick_reaction=Valitse reaktiosi + template.topics=Aiheet template.avatar=Profiilikuva template.issue_labels=Ongelmien tunnisteet -need_auth=Kloonauksen valtuutus migrate_items=Siirrettävät asiat migrate_items_wiki=Wiki migrate_items_milestones=Merkkipaalut @@ -706,6 +720,8 @@ issues.label_modify=Muokkaa tunniste issues.label_deletion=Poista tunniste issues.label.filter_sort.alphabetically=Aakkosjärjestyksessä issues.label.filter_sort.reverse_alphabetically=Käänteisessä aakkosjärjestyksessä +issues.label.filter_sort.by_size=Pienin koko +issues.label.filter_sort.reverse_by_size=Suurin koko issues.num_participants=%d osallistujaa issues.subscribe=Tilaa issues.unsubscribe=Lopeta tilaus @@ -721,11 +737,9 @@ issues.lock.reason=Lukitsemisen syy issues.lock.title=Lukitse keskustelu tästä ongelmasta. issues.unlock.title=Avaa keskustelu tästä ongelmasta. issues.tracker=Ajan seuranta -issues.start_tracking_short=Aloita issues.start_tracking=Aloita ajan seuranta issues.start_tracking_history=`aloitti työskentelyn %s` issues.tracker_auto_close=Ajan seuranta pysähtyy automaattisesti kun tämä ongelma on suljettu -issues.stop_tracking=Lopeta issues.stop_tracking_history=`lopetti työskentelyn %s` issues.add_time=Lisää aika käsin issues.add_time_short=Lisää aika @@ -734,7 +748,6 @@ issues.add_time_history=`lisäsi käytetyn ajan %s` issues.add_time_hours=Tuntia issues.add_time_minutes=Minuuttia issues.add_time_sum_to_small=Aikaa ei syötetty. -issues.cancel_tracking=Peru issues.time_spent_from_all_authors=`Käytetty kokonaisaika: %s` issues.due_date=Määräpäivä issues.due_date_form_edit=Muokkaa @@ -749,6 +762,7 @@ issues.dependency.remove_info=Poistä tämä riippuvuus issues.review.self.approval=Et voi hyväksyä omia vetopyyntöjä. issues.review.approve=hyväksyi nämä muutokset %s + pulls.new=Uusi pull pyyntö pulls.filter_branch=Suodata branch pulls.no_results=Tuloksia ei löytynyt. @@ -763,7 +777,6 @@ pulls.merged=Yhdistetty pulls.has_merged=Vetopyyntö on yhdistetty. pulls.can_auto_merge_desc=Tämä pull-pyyntö voidaan yhdistää automaattisesti. -pulls.merge_pull_request=Yhdistä Pull-pyyntö ; %[2]s
    %[3]s
    @@ -822,6 +835,8 @@ activity.title.issues_created_by=%s luonnut %s activity.closed_issue_label=Suljettu activity.new_issues_count_1=Uusi ongelma activity.new_issues_count_n=Uutta ongelmaa +activity.new_issue_label=Avoinna +activity.unresolved_conv_label=Auki activity.published_release_label=Julkaistu activity.git_stats_file_1=%d tiedosto activity.git_stats_file_n=%d tiedostoa @@ -859,6 +874,7 @@ settings.danger_zone=Vaaravyöhyke settings.new_owner_has_same_repo=Uudella omistajalla on jo samanniminen repo. Ole hyvä ja valitse toinen nimi. settings.transfer=Siirrä omistajuus settings.transfer_form_title=Syötä repon nimi vahvistuksena: +settings.transfer_owner=Uusi omistaja settings.wiki_delete=Poista Wiki data settings.wiki_delete_desc=Repon wikin data poistaminen on pysyvä eikä voi peruuttaa. settings.confirm_wiki_delete=Wiki datan poistaminen @@ -867,9 +883,10 @@ settings.delete=Poista tämä repo settings.delete_desc=Repon poistaminen on pysyvä eikä voi peruuttaa. settings.delete_notices_1=- Tätä toimintoa EI VOI peruuttaa myöhemmin. settings.update_settings_success=Repon asetukset on päivitetty. -settings.transfer_owner=Uusi omistaja settings.delete_collaborator=Poista settings.search_user_placeholder=Etsi käyttäjä… +settings.teams=Tiimit +settings.add_team=Lisää tiimi settings.add_webhook=Lisää webkoukku settings.webhook.test_delivery=Testitoimitus settings.webhook.request=Pyyntö @@ -881,6 +898,7 @@ settings.githook_edit_desc=Jos koukku ei ole käytössä, esitellään esimerkki settings.githook_name=Koukun nimi settings.githook_content=Koukun sisältö settings.update_githook=Päivitys koukku +settings.http_method=HTTP-menetelmä settings.secret=Salaus settings.slack_username=Käyttäjätunnus settings.slack_icon_url=Kuvakkeen URL @@ -947,6 +965,7 @@ diff.file_image_width=Leveys diff.file_image_height=Korkeus diff.file_byte_size=Koko diff.comment.add_review_comment=Lisää kommentti +diff.comment.reply=Vastaa diff.review.comment=Kommentoi diff.review.approve=Hyväksy @@ -978,9 +997,11 @@ branch.name=Haaran nimi branch.delete_head=Poista branch.delete=Poista haara '%s' + topic.manage_topics=Hallitse aiheita topic.done=Valmis + [org] org_name_holder=Organisaatio org_full_name_holder=Organisaation täydellinen nimi @@ -1057,6 +1078,7 @@ teams.admin_permission_desc=Tämä tiimi myöntää jäsenille Ylläpito teams.repositories=Tiimin repot teams.add_nonexistent_repo=Repo jota yrität lisätä ei ole vielä olemassa, ole hyvä ja luo se ensin. teams.members.none=Ei jäseniä tässä tiimissä. +teams.all_repositories=Kaikki repot [admin] dashboard=Kojelauta @@ -1108,6 +1130,7 @@ dashboard.gc_times=GC aikoja users.user_manage_panel=Tilien hallinta users.new_account=Luo käyttäjätili users.name=Käyttäjätunnus +users.full_name=Kokonimi users.activated=Aktivoitu users.admin=Ylläpito users.repos=Repot @@ -1168,7 +1191,6 @@ auths.smtp_auth=SMTP todennustyyppi auths.smtphost=SMTP isäntä auths.smtpport=SMTP portti auths.allowed_domains=Sallitut verkkotunnukset -auths.enable_tls=Ota käyttöön TLS-salaus auths.skip_tls_verify=Ohita TLS tarkistaminen auths.pam_service_name=PAM palvelun nimi auths.enable_auto_register=Ota käyttöön automaattinen rekisteröinti @@ -1273,6 +1295,7 @@ monitor.desc=Kuvaus monitor.start=Alkamisaika monitor.execute_time=Suoritusaika monitor.queues=Jonot +monitor.queue=Jono: %s monitor.queue.name=Nimi monitor.queue.type=Tyyppi diff --git a/options/locale/locale_fr-FR.ini b/options/locale/locale_fr-FR.ini index ed729ae10..0b90ee5d7 100644 --- a/options/locale/locale_fr-FR.ini +++ b/options/locale/locale_fr-FR.ini @@ -15,15 +15,19 @@ page=Page template=Modèle language=Langue notifications=Notifications +active_stopwatch=Suivi du temps actif create_new=Créer… user_profile_and_more=Profil et réglages… signed_in_as=Connecté en tant que enable_javascript=Ce site fonctionne mieux avec JavaScript. toc=Sommaire +licenses=Licences +return_to_gitea=Revenir à Gitea username=Nom d'utilisateur email=Adresse e-mail password=Mot de passe +access_token=Jeton d’accès re_type=Confirmez le mot de passe captcha=CAPTCHA twofa=Authentification à deux facteurs @@ -51,6 +55,8 @@ new_migrate=Nouvelle migration new_mirror=Nouveau miroir new_fork=Nouvelle bifurcation new_org=Nouvelle organisation +new_project=Nouveau projet +new_project_board=Nouveau tableau de projet manage_org=Gérer les organisations admin_panel=Administration du site account_settings=Paramètres du compte @@ -70,22 +76,32 @@ pull_requests=Demandes d'ajout issues=Tickets milestones=Jalons +ok=OK cancel=Annuler +save=Enregistrer add=Ajouter add_all=Tout Ajouter remove=Retirer remove_all=Tout Retirer +edit=Éditer write=Écrire preview=Aperçu loading=Chargement… +step1=Étape 1: +step2=Étape 2: +error=Erreur error404=La page que vous essayez d'atteindre n'existe pas ou vous n'êtes pas autorisé à la voir. +never=Jamais + [error] occurred=Une erreur est survenue report_message=Si vous êtes sûr qu'il s'agit d'un bug de Gitea, cherchez s’il existe un ticket sur GitHub et ouvrez-en un nouveau si nécessaire. +missing_csrf=Requête incorrecte: aucun jeton CSRF présent +invalid_csrf=Requête incorrecte: jeton CSRF invalide [startpage] app_desc=Un service Git auto-hébergé sans prise de tête @@ -163,10 +179,11 @@ federated_avatar_lookup_popup=Activer la recherche unifiée d'avatars en utilisa disable_registration=Désactiver le formulaire d'inscription disable_registration_popup=Désactiver les nouvelles inscriptions. Seuls les administrateurs pourront créer de nouveaux comptes utilisateurs. allow_only_external_registration_popup=N'autoriser l'inscription qu'à partir des services externes -openid_signin=Activer l'inscription OpenID +openid_signin=Activer l'authentification OpenID openid_signin_popup=Activer l'authentification via OpenID. openid_signup=Activer l'inscription OpenID openid_signup_popup=Activer l'inscription avec OpenID. +enable_captcha=Activer le CAPTCHA d'inscription enable_captcha_popup=Demander un Captcha à l'inscription. require_sign_in_view=Exiger la connexion à un compte pour afficher les pages require_sign_in_view_popup=Limiter l'accès aux pages aux utilisateurs connectés. Les visiteurs ne verront que les pages de connexion et d'inscription. @@ -194,6 +211,8 @@ default_enable_timetracking=Activer le suivi de temps par défaut default_enable_timetracking_popup=Activer le suivi du temps pour les nouveaux dépôts par défaut. no_reply_address=Domaine pour les e-mails cachés no_reply_address_helper=Nom de domaine pour les utilisateurs possédant une adresse email cachée. Par exemple, le nom d’utilisateur « joe » sera enregistré dans Git comme « joe@noreply.example.org » si le domaine pour les e-mails cachés a la valeur « noreply.example.org ». +password_algorithm=Algorithme de hachage du mot de passe +password_algorithm_helper=Définissez l'algorithme de hachage du mot de passe. Les algorithmes ont des exigences matérielles et une force différentes. `argon2` a de bonnes caractéristiques mais utilise beaucoup de mémoire et peut être inapproprié pour les systèmes limités en ressources. [home] uname_holder=Nom d'utilisateur ou adresse e-mail @@ -207,10 +226,17 @@ my_mirrors=Mes miroirs view_home=Voir %s search_repos=Trouver un dépôt … filter=Autres filtres +filter_by_team_repositories=Dépôts filtrés par équipe show_archived=Archivé +show_both_archived_unarchived=Afficher à la fois archivé et non archivé +show_only_archived=Afficher uniquement les archivés +show_only_unarchived=Afficher uniquement les non archivés show_private=Privé +show_both_private_public=Afficher les publics et privés +show_only_private=Afficher uniquement les privés +show_only_public=Afficher uniquement les publics issues.in_your_repos=Dans vos dépôts @@ -220,6 +246,8 @@ users=Utilisateurs organizations=Organisations search=Rechercher code=Code +search.fuzzy=Approximative +search.match=Exacte repo_no_results=Aucun dépôt correspondant n'a été trouvé. user_no_results=Aucun utilisateur correspondant n'a été trouvé. org_no_results=Aucune organisation correspondante n'a été trouvée. @@ -233,6 +261,7 @@ register_helper_msg=Déjà enregistré ? Connectez-vous ! social_register_helper_msg=Déjà inscrit ? Connectez-vous ! disable_register_prompt=Les inscriptions sont désactivées. Veuillez contacter l'administrateur du site. disable_register_mail=La confirmation par e-mail à l'inscription est désactivée. +remember_me=Mémoriser cet appareil forgot_password_title=Mot de passe oublié forgot_password=Mot de passe oublié ? sign_up_now=Pas de compte ? Inscrivez-vous maintenant. @@ -265,6 +294,7 @@ twofa_scratch_token_incorrect=Votre code de secours est incorrect. login_userpass=Connexion login_openid=OpenID oauth_signup_tab=Créer un compte +oauth_signup_title=Compléter le nouveau compte oauth_signup_submit=Finaliser la création du compte oauth_signin_tab=Lier à un compte existant oauth_signin_title=Connectez-vous pour autoriser le compte lié @@ -275,7 +305,8 @@ openid_connect_desc=L'URI OpenID choisie est inconnue. Associez-le à un nouveau openid_register_title=Créer un nouveau compte openid_register_desc=L'URI OpenID choisie est inconnue. Associez-le à un nouveau compte ici. openid_signin_desc=Veuillez entrer votre URI OpenID. Par exemple: https://anne.me, bob.openid.org.cn ou gnusocial.net/charles. -disable_forgot_password_mail=La récupération de compte est désactivée. Veuillez contacter l'administrateur du site. +disable_forgot_password_mail=La récupération du compte est désactivée car aucune adresse courriel n'est configurée. Veuillez contacter l'administrateur de votre site. +disable_forgot_password_mail_admin=La récupération du compte est disponible uniquement lorsque l'adresse courriel est configurée. Veuillez configurer l'adresse courriel pour activer la récupération du compte. email_domain_blacklisted=Vous ne pouvez pas vous enregistrer avec votre adresse e-mail. authorize_application=Autoriser l'application authorize_redirect_notice=Vous serez redirigé vers %s si vous autorisez cette application. @@ -285,14 +316,45 @@ authorize_title=Autoriser "%s" à accéder à votre compte ? authorization_failed=L’autorisation a échoué authorization_failed_desc=L'autorisation a échoué car nous avons détecté une requête invalide. Veuillez contacter le responsable de l'application que vous avez essayé d'autoriser. sspi_auth_failed=Échec de l'authentification SSPI +password_pwned=Le mot de passe que vous avez choisi est sur une liste de mots de passe volés précédemment exposés dans des violations de données publiques. Veuillez réessayer avec un mot de passe différent. +password_pwned_err=Impossible d'envoyer la demande à HaveIBeenPwned [mail] +view_it_on=Voir sur %s +link_not_working_do_paste=Le lien ne fonctionne pas ? Essayez de le copier-coller dans votre navigateur. +hi_user_x=Bonjour %s, + activate_account=Veuillez activer votre compte +activate_account.title=%s, veuillez activer votre compte + activate_email=Veuillez vérifier votre adresse e-mail -reset_password=Récupérer votre compte -register_success=Inscription réussie + register_notify=Bienvenue sur Gitea +reset_password=Récupérer votre compte + +register_success=Inscription réussie + + +issue.x_mentioned_you=@%s vous a mentionné: +issue.action.approve=@%[1]s a approuvé cette demande d'ajout. +issue.action.reject=@%[1]s a demandé des modifications sur cette demande d'ajout. +issue.action.review=@%[1]s a commenté sur cette demande d'ajout. +issue.action.review_dismissed=@%[1]s a rejeté la dernière révision de %[2]s pour cette demande d'ajout. +issue.action.ready_for_review=@%[1]s a marqué cette demande d'ajout prête à être revue. +issue.in_tree_path=Dans %s: + +release.new.subject=%s publiée dans %s +release.title=Titre: %s +release.downloads=Téléchargements : + +repo.transfer.subject_to=%s aimerait transférer "%s" à %s +repo.transfer.subject_to_you=%s aimerait vous transférer "%s" +repo.transfer.to_you=vous + +repo.collaborator.added.subject=%s vous a ajouté à %s +repo.collaborator.added.text=Vous avez été ajouté en tant que collaborateur du dépôt : + [modal] yes=Oui no=Non @@ -338,13 +400,19 @@ password_not_match=Les mots de passe ne correspondent pas. lang_select_error=Sélectionnez une langue dans la liste. username_been_taken=Le nom d'utilisateur est déjà pris. +username_change_not_local_user=Les utilisateurs non-locaux n'ont pas le droit de modifier leur nom d'utilisateur. repo_name_been_taken=Ce nom de dépôt est déjà utilisé. +repository_files_already_exist=Les fichiers existent déjà pour ce dépôt. Contactez l'administrateur système. +repository_files_already_exist.adopt=Des fichiers existent déjà pour ce dépôt et peuvent seulement être adoptés. +repository_files_already_exist.delete=Des fichiers existent déjà pour ce dépôt. Vous devez les supprimer. +repository_files_already_exist.adopt_or_delete=Des fichiers existent déjà pour ce dépôt. Veuillez les adopter ou les supprimer. visit_rate_limit=Le taux d'appel à distance autorisé a été dépassé. 2fa_auth_required=L'accès à distance requiert une authentification à deux facteurs. org_name_been_taken=Ce nom d'organisation est déjà pris. team_name_been_taken=Le nom d'équipe est déjà pris. team_no_units_error=Autoriser l’accès à au moins une section du dépôt. email_been_used=Cette adresse e-mail est déjà utilisée. +email_invalid=L'adresse e-mail est invalide. openid_been_used=Adresse OpenID '%s' déjà utilisée. username_password_incorrect=Identifiant ou mot de passe invalide. password_complexity=Le mot de passe ne respecte pas les exigences de complexité: @@ -353,14 +421,17 @@ password_uppercase_one=Au moins un caractère majuscule password_digit_one=Au moins un chiffre password_special_one=Au moins un caractère spécial (ponctuation, parenthèses, guillemets, etc.) enterred_invalid_repo_name=Le nom de dépôt saisi est incorrect. +enterred_invalid_org_name=Le nom de l'organisation que vous avez entré est incorrect. enterred_invalid_owner_name=Le nom du nouveau propriétaire est invalide. enterred_invalid_password=Le mot de passe saisi est incorrect. user_not_exist=Cet utilisateur n'existe pas. team_not_exist=L'équipe n'existe pas. +last_org_owner=Vous ne pouvez pas retirer le dernier utilisateur de l’équipe « propriétaires ». Il doit y avoir au moins un propriétaire dans chaque organisation. cannot_add_org_to_team=Une organisation ne peut être ajoutée comme membre d'une équipe. invalid_ssh_key=Impossible de vérifier votre clé SSH : %s invalid_gpg_key=Impossible de vérifier votre clé GPG : %s +invalid_ssh_principal=Principal invalide : %s unable_verify_ssh_key=Impossible de vérifier la clé SSH ; veuillez vérifier que vous n'avez pas fait d'erreur. auth_failed=Échec d'authentification : %v @@ -377,11 +448,14 @@ repositories=Dépôts activity=Activité publique followers=abonnés starred=Dépôts favoris +watched=Dépôts surveillés +projects=Projets following=Abonnements follow=Suivre unfollow=Ne plus suivre heatmap.loading=Chargement de la Heatmap… user_bio=Biographie +disabled_public_activity=Cet utilisateur a désactivé la visibilité publique de l'activité. form.name_reserved=Le nom d’utilisateur "%s" est réservé. form.name_pattern_not_allowed="%s" n'est pas autorisé dans un nom d'utilisateur. @@ -406,6 +480,7 @@ uid=ID d'Utilisateur u2f=Clefs de sécurité public_profile=Profil public +biography_placeholder=Parlez-nous un peu de vous profile_desc=Votre adresse e-mail sera utilisée pour les notifications et d'autres opérations. password_username_disabled=Les utilisateurs externes ne peuvent pas modifier leur nom d'utilisateur. Merci de contacter l'administrateur de votre site pour plus d'informations. full_name=Nom complet @@ -413,13 +488,18 @@ website=Site Web location=Localisation update_theme=Mise à jour du thème update_profile=Valider les modifications +update_language_not_found=La langue '%s' n'est pas disponible. update_profile_success=Votre profil a été mis à jour. change_username=Votre nom d'utilisateur a été modifié. change_username_prompt=Remarque : changer votre nom d'utilisateur change également l'URL de votre compte. +change_username_redirect_prompt=L'ancien nom d'utilisateur sera redirigé jusqu'à ce qu'il soit réclamé. continue=Continuer cancel=Annuler language=Langues ui=Thème +privacy=Confidentialité +keep_activity_private=Masquer l'activité de la page de profil +keep_activity_private_popup=Rend l'activité visible uniquement pour vous et les administrateurs lookup_avatar_by_mail=Rechercher un avatar par adresse e-mail federated_avatar_lookup=Recherche d'avatars unifiés @@ -473,30 +553,41 @@ keep_email_private_popup=Votre adresse e-mail sera cachée aux autres utilisateu openid_desc=OpenID vous permet de confier l'authentification à une tierce partie. manage_ssh_keys=Gérer les clés SSH +manage_ssh_principals=Gérer les principaux certificats SSH manage_gpg_keys=Gérer les clés GPG add_key=Ajouter une clé ssh_desc=Ces clefs SSH publiques sont associées à votre compte. Les clefs privées correspondantes permettent l'accès complet à vos dépôts. +principal_desc=Ces principaux certificats SSH sont associés à votre compte et permettent un accès complet à vos dépôts. gpg_desc=Ces clefs GPG sont associées avec votre compte. Conservez-les en lieu sûr car elles permettent la vérification de vos révisions. ssh_helper=Besoin d'aide ? Consultez le guide Github pour générer votre clé SSH ou résoudre les problèmes courants que vous pouvez rencontrer en utilisant SSH. gpg_helper=Besoin d'aide ? Consultez le guide Github à propos de GPG. add_new_key=Ajouter une clé SSH add_new_gpg_key=Ajouter une clé GPG +key_content_ssh_placeholder=Commence par 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', ou 'sk-ssh-ed25519@openssh.com' +key_content_gpg_placeholder=Commence par '-----BEGIN PGP PUBLIC KEY BLOCK-----' +add_new_principal=Ajouter le principal ssh_key_been_used=Cette clef SSH a déjà été ajoutée au serveur. +ssh_key_name_used=Une clé SSH avec le même nom existe déjà sur votre compte. +ssh_principal_been_used=Ce principal a déjà été ajouté au serveur. gpg_key_id_used=Une clef GPG publique avec le même identifiant existe déjà. -gpg_no_key_email_found=Cette clef GPG n'est utilisable avec aucune adresse e-mail associée à ce compte. subkeys=Sous-clés key_id=Clé ID key_name=Nom de la Clé key_content=Contenu +principal_content=Contenu add_key_success=La clef SSH "%s" a été ajoutée. add_gpg_key_success=La clef GPG "%s" a été ajoutée. +add_principal_success=Le certificat SSH principal '%s' a été ajouté. delete_key=Supprimer ssh_key_deletion=Supprimer la clé SSH gpg_key_deletion=Supprimer la clé GPG +ssh_principal_deletion=Supprimer le certificat SSH principal ssh_key_deletion_desc=La suppression d'une clé SSH révoque son accès à votre compte. Continuer ? gpg_key_deletion_desc=Retirer une clef GPG annule la vérification des révisions l'utilisant. Continuer ? +ssh_principal_deletion_desc=La suppression d'un certificat principal SSH révoque son accès à votre compte. Continuer ? ssh_key_deletion_success=La clé SSH a été retirée. gpg_key_deletion_success=La clé GPG a été retirée. +ssh_principal_deletion_success=Le principal a été supprimé. add_on=Ajouté le valid_until=Valide jusqu’à valid_forever=Valide pour toujours @@ -506,9 +597,11 @@ can_read_info=Lecture can_write_info=Écriture key_state_desc=Cette clé a été utilisée durant les 7 derniers jours token_state_desc=Ce jeton a été utilisé durant les 7 derniers jours +principal_state_desc=Ce principal a été utilisé au cours des 7 derniers jours show_openid=Afficher sur mon profil hide_openid=Masquer du profil ssh_disabled=SSH désactivé +ssh_externally_managed=Cette clé SSH est gérée de manière externe pour cet utilisateur manage_social=Gérer les réseaux sociaux associés social_desc=Ces réseaux sociaux sont liés à votre compte Gitea. Veuillez vous assurer que vous les reconnaissez tous car ils peuvent être utilisés pour se connecter à votre compte Gitea. unbind=Dissocier @@ -575,6 +668,7 @@ or_enter_secret=Ou saisissez le code secret: %s then_enter_passcode=Et entrez le mot de passe s'affichant dans l'application : passcode_invalid=Le mot de passe est invalide. Réessayez. twofa_enrolled=L'authentification à deux facteurs a été activée pour votre compte. Gardez votre jeton de secours (%s) en lieu sûr car il ne vous sera montré qu'une seule fois ! +twofa_failed_get_secret=Impossible d'obtenir le secret. u2f_desc=Les clefs de sécurité sont des dispositifs matériels contenant des clefs cryptographiques. Elles peuvent être utilisées pour l'authentification à deux facteurs. La clef de sécurité doit supporter le standard FIDO U2F. u2f_require_twofa=L'authentification à deux facteurs doit être activée pour votre compte afin d’utiliser des clés de sécurité. @@ -596,6 +690,7 @@ repos_none=Vous ne possédez aucun dépôt delete_account=Supprimer votre compte delete_prompt=Cette opération supprimera votre compte. Ceci NE PEUT PAS être annulé. +delete_with_all_comments=Votre compte est plus jeune que %s. Pour éviter les commentaires fantôme, tous les commentaires de ticket/PR seront supprimés avec lui. confirm_delete_account=Confirmer la suppression delete_account_title=Supprimer un compte delete_account_desc=Êtes-vous sûr de vouloir supprimer définitivement ce compte ? @@ -605,8 +700,11 @@ email_notifications.onmention=N'envoyer un e-mail que si vous êtes mentionné email_notifications.disable=Désactiver les notifications par email email_notifications.submit=Définir la préférence e-mail + [repo] +new_repo_helper=Un dépôt contient tous les fichiers du projet, y compris l'historique des révisions. Vous l'avez déjà ailleurs ? Migrer le dépôt. owner=Propriétaire +owner_helper=Certaines organisations peuvent ne pas apparaître dans la liste déroulante en raison d'une limite maximale du nombre de dépôts. repo_name=Nom du dépôt repo_name_helper=Idéalement, le nom d'un dépôt devrait être court, mémorisable et unique. repo_size=Taille du dépôt @@ -627,26 +725,41 @@ use_template=Utiliser ce modèle generate_repo=Générer un dépôt generate_from=Générer depuis repo_desc=Description +repo_desc_helper=Ajoutez une courte description (facultative) repo_lang=Langue repo_gitignore_helper=Choisissez un modèle de fichier .gitignore. +repo_gitignore_helper_desc=Choisissez les fichiers à ne pas suivre à partir d'une liste de modèles pour les langage courants. Les fichiers habituels générés par les outils de construction de chaque langage sont inclus dans le .gitignore par défaut. issue_labels=Étiquettes des tickets issue_labels_helper=Sélectionnez une étiquette de ticket. license=Licence license_helper=Sélectionner un fichier de licence. +license_helper_desc=Une licence indique ce que les autres peuvent ou ne peuvent pas faire avec votre code. Vous ne savez pas laquelle est la bonne pour votre projet ? Consultez Choisir une licence. readme=LISEZMOI readme_helper=Choisissez un modèle de fichier LISEZMOI. +readme_helper_desc=Vous pouvez écrire ici une description complète de votre projet. auto_init=Initialiser le dépôt (ajoute les fichiers .gitignore, Licence et LISEZMOI) +trust_model_helper=Sélectionnez le modèle de confiance pour la vérification des signatures. Les options possibles sont : +trust_model_helper_collaborator=Collaborateur: Faire confiance aux signatures des collaborateurs +trust_model_helper_default=Valeur par défaut: Utiliser le modèle de confiance par défaut pour cette installation create_repo=Créer un dépôt default_branch=Branche par défaut +default_branch_helper=La branche par défaut est la branche de base pour les demandes d'ajout et les révisions de code. mirror_prune=Purger mirror_prune_desc=Supprimer les références externes obsolètes mirror_interval=Intervalle de synchronisation ('h', 'm', et 's' sont des unités valides), 0 pour désactiver. mirror_interval_invalid=L'intervalle de synchronisation est invalide. mirror_address=Cloner depuis une URL -mirror_address_desc=Mettez les identifiants requis dans la section Autorisation de Clonage. +mirror_address_desc=Insérez tous les identifiants requis dans la section Autorisation. mirror_address_url_invalid=L'url fournie est invalide. Vous devez échapper tous les composants de l'url correctement. mirror_address_protocol_invalid=L'url fournie est invalide. Seuls les protocoles http(s):// ou git:// peuvent être la source du miroir. +mirror_lfs=Stockage de fichiers volumineux (LFS) +mirror_lfs_desc=Activer la mise en miroir des données LFS. +mirror_lfs_endpoint=Point d'accès LFS +mirror_lfs_endpoint_desc=La synchronisation tentera d'utiliser l'url de clonage pour déterminer le serveur LFS. Vous pouvez également spécifier un point d'accès personnalisé si les données LFS du dépôt sont stockées ailleurs. mirror_last_synced=Dernière synchronisation +mirror_password_placeholder=(Aucune modification) +mirror_password_blank_placeholder=(Non défini) +mirror_password_help=Modifiez le nom d'utilisateur pour effacer un mot de passe enregistré. watchers=Observateurs stargazers=Fans forks=Bifurcations @@ -654,7 +767,30 @@ pick_reaction=Choisissez votre réaction reactions_more=et %d de plus unit_disabled=L'administrateur du site a désactivé cette section du dépôt. language_other=Autre +adopt_search=Entrez le nom d'utilisateur pour rechercher les dépôts non adoptés... (laissez vide pour tous les trouver) +adopt_preexisting_label=Adopter les fichiers +adopt_preexisting=Adopter les fichiers préexistants +adopt_preexisting_content=Créer un dépôt à partir de %s +adopt_preexisting_success=Fichiers adoptés et dépôt créé depuis %s +delete_preexisting_label=Supprimer +delete_preexisting=Supprimer les fichiers préexistants +delete_preexisting_content=Supprimer les fichiers dans %s +delete_preexisting_success=Supprimer les fichiers non adoptés dans %s +transfer.accept=Accepter le transfert +transfer.accept_desc=Transférer à "%s" +transfer.reject=Refuser le transfert +transfer.reject_desc=Annuler le transfert à "%s" +transfer.no_permission_to_accept=Vous n’avez pas la permission pour accepter +transfer.no_permission_to_reject=Vous n'avez pas la permission pour rejeter + +desc.private=Privé +desc.public=Publique +desc.private_template=Modèle privé +desc.public_template=Modèle +desc.internal=Interne +desc.internal_template=Modèle interne +desc.archived=Archivé template.items=Élément du modèle template.git_content=Contenu Git (branche par défaut) @@ -671,36 +807,61 @@ archive.title=Ce dépôt est archivé. Vous pouvez voir les fichiers et le clone archive.issue.nocomment=Ce dépôt est archivé. Vous ne pouvez pas commenter de tickets. archive.pull.nocomment=Ce dépôt est archivé. Vous ne pouvez pas commenter de demande d'ajout. -form.reach_limit_of_creation=Vous avez déjà atteint la limite des %d dépôts. +form.reach_limit_of_creation_1=Vous avez déjà atteint la limite d'%d dépôt. +form.reach_limit_of_creation_n=Vous avez déjà atteint la limite de %d dépôts. form.name_reserved=Le dépôt "%s" a un nom réservé. form.name_pattern_not_allowed="%s" n'est pas autorisé dans un nom de dépôt. -need_auth=Autorisations de clonage +need_auth=Autorisation +migrate_options=Options de migration +migrate_service=Service de migration +migrate_options_mirror_helper=Ce dépôt sera un miroir +migrate_options_mirror_disabled=L’administrateur du site a désactivé les nouveaux miroirs. +migrate_options_lfs=Migrer les fichiers LFS +migrate_options_lfs_endpoint.label=Point d'accès LFS +migrate_options_lfs_endpoint.description=La migration va tenter d'utiliser votre dépôt Git distant pour déterminer le serveur LFS. Vous pouvez également spécifier un point d'accès personnalisé si les données LFS du dépôt sont stockées ailleurs. +migrate_options_lfs_endpoint.description.local=Un chemin de serveur local est également pris en charge. +migrate_options_lfs_endpoint.placeholder=Laisser vide pour dériver de l'URL de clonage migrate_items=Éléments à migrer migrate_items_wiki=Wiki migrate_items_milestones=Jalons migrate_items_labels=Étiquettes migrate_items_issues=Tickets migrate_items_pullrequests=Demandes d'ajout +migrate_items_merge_requests=Demandes de fusion migrate_items_releases=Versions migrate_repo=Migrer le dépôt migrate.clone_address=Migrer/Cloner depuis une URL migrate.clone_address_desc=L'URL HTTP(S) ou Git "clone" d'un dépôt existant migrate.clone_local_path=ou un chemin serveur local migrate.permission_denied=Vous n'êtes pas autorisé à importer des dépôts locaux. +migrate.permission_denied_blocked=Vous n'êtes pas autorisé à importer à partir d'hôtes bloqués. +migrate.permission_denied_private_ip=Vous n'êtes pas autorisé à importer depuis des adresses IP privées. migrate.invalid_local_path=Chemin local non valide, non existant ou n'étant pas un dossier. +migrate.invalid_lfs_endpoint=Le point d'accès LFS n'est pas valide. migrate.failed=Echec de migration: %v -migrate.lfs_mirror_unsupported=La synchronisation des objets LFS n'est pas supportée - veuillez utiliser 'git lfs fetch --all' et 'git lfs push --all' à la place. +migrate.migrate_items_options=Un jeton d'accès est requis pour migrer des éléments supplémentaires migrated_from=Migré de %[2]s migrated_from_fake=Migré de %[1]s +migrate.migrate=Migrer depuis %s migrate.migrating=Migration de %s ... migrate.migrating_failed=La migration de %s a échoué. +migrate.migrating_failed.error=Erreur: %s +migrate.migrating_git=Migration des données Git +migrate.migrating_topics=Migration des sujets +migrate.migrating_milestones=Migration des jalons +migrate.migrating_labels=Migration des étiquettes +migrate.migrating_releases=Migration des versions +migrate.migrating_issues=Migration des tickets +migrate.migrating_pulls=Migration des demandes d'ajout mirror_from=miroir de forked_from=bifurqué depuis generated_from=généré depuis fork_from_self=Vous ne pouvez pas bifurquer un dépôt que vous possédez. fork_guest_user=Connectez vous pour forker ce dépôt. +watch_guest_user=Connectez-vous pour consulter ce dépôt. +star_guest_user=Connectez-vous pour ajouter aux favoris ce dépôt. copy_link=Copier copy_link_success=Le lien a été copié copy_link_error=Appuyez sur ⌘-C ou Ctrl-C pour copier @@ -723,11 +884,14 @@ code=Code code.desc=Accéder au code source, fichiers, révisions et branches. branch=Branche tree=Aborescence +clear_ref=`Effacer la référence actuelle` filter_branch_and_tag=Filtrer une branche ou un tag +find_tag=Rechercher un tag branches=Branches tags=Tags issues=Tickets pulls=Demandes d'ajout +project_board=Projets labels=Étiquettes org_labels_desc=Les étiquettes de niveau d'une organisation peuvent être utilisés avec tous les dépôts de cette organisation org_labels_desc_manage=gérer @@ -735,9 +899,14 @@ org_labels_desc_manage=gérer milestones=Jalons commits=Révisions commit=Commit +release=Versions releases=Versions +tag=Tag +released_this=a publié ceci file_raw=Brut file_history=Historique +file_view_source=Voir le code source +file_view_rendered=Voir le rendu file_view_raw=Voir le Raw file_permalink=Lien permanent file_too_large=Le fichier est trop gros pour être affiché. @@ -746,6 +915,10 @@ audio_not_supported_in_browser=Votre navigateur ne supporte pas la balise « au stored_lfs=Stocké avec Git LFS symbolic_link=Lien symbolique commit_graph=Graphique des révisions +commit_graph.select=Sélectionner les branches +commit_graph.hide_pr_refs=Masquer les demandes d'ajout +commit_graph.monochrome=Monochrome +commit_graph.color=Couleur blame=Annotations normal_view=Vue normale line=ligne @@ -775,6 +948,7 @@ editor.add=Ajouter '%s' editor.update=Mise à jour de '%s' editor.delete=Supprimer '%s' editor.commit_message_desc=Ajouter une description détaillée facultative… +editor.signoff_desc=Ajout d'un trailer Signed-off-by par le committeur à la fin du message du journal de commit. editor.commit_directly_to_this_branch=Soumettre directement dans la branche %s. editor.create_new_branch=Créer une nouvelle branche pour cette révision et envoyer une nouvelle demande d'ajout. editor.create_new_branch_np=Créer une nouvelle branche pour cette révision. @@ -793,8 +967,13 @@ editor.file_deleting_no_longer_exists=Le fichier en cours de suppression, '%s', editor.file_changed_while_editing=Le contenu du fichier a changé depuis que vous avez commencé à éditer. Cliquez ici pour voir les changements ou soumettez de nouveau pour les écraser. editor.file_already_exists=Un fichier nommé '%s' existe déjà dans ce dépôt. editor.commit_empty_file_header=Commiter un fichier vide +editor.commit_empty_file_text=Le fichier que vous allez commiter est vide. Continuer ? editor.no_changes_to_show=Il n’y a aucun changement à afficher. +editor.fail_to_update_file=Impossible de mettre à jour/créer le fichier '%s'. +editor.fail_to_update_file_summary=Message d'erreur : editor.push_rejected_no_message=La modification a été rejetée par le serveur sans message. Veuillez vérifier les githooks. +editor.push_rejected=La modification a été rejetée par le serveur. Veuillez vérifier vos githooks. +editor.push_rejected_summary=Message de rejet complet : editor.add_subdir=Ajouter un dossier… editor.unable_to_upload_files=Échec lors de l'envoie du fichier '%s' avec l’erreur : %v editor.upload_file_is_locked=Le fichier '%s' est verrouillé par %s. @@ -824,10 +1003,44 @@ commits.gpg_key_id=ID de la clé GPG ext_issues=Gestionnaire de tickets externe ext_issues.desc=Lien vers un gestionnaire de tickets externe. +projects=Projets +projects.desc=Gérer les tickets et les demandes d’ajouts dans les tableaux de projet. +projects.description=Description (facultative) +projects.description_placeholder=Description +projects.create=Créer un projet +projects.title=Titre +projects.new=Nouveau projet +projects.new_subheader=Coordonnez, surveillez, et mettez à jour votre travail en un seul endroit, afin que les projets restent transparents et dans les délais. +projects.create_success=Le projet « %s » a été créé. +projects.deletion=Supprimer le projet +projects.deletion_desc=Supprimer un projet efface également de tous les tickets liés. Voulez vous continuer? +projects.deletion_success=Le projet a été supprimé. +projects.edit=Modifier les projets +projects.edit_subheader=Les projets organisent les tickets et la progression. +projects.modify=Modifier le projet +projects.edit_success=Le projet « %s » a été mis à jour. +projects.type.none=Aucun +projects.type.basic_kanban=Kanban basique +projects.type.bug_triage=Bug à trier +projects.template.desc=Modèle de projet +projects.template.desc_helper=Sélectionnez un modèle de projet pour débuter +projects.type.uncategorized=Non catégorisé +projects.board.edit=Modifier le tableau +projects.board.edit_title=Nom du nouveau tableau +projects.board.new_title=Nom du nouveau tableau +projects.board.new_submit=Soumettre +projects.board.new=Nouveau tableau +projects.board.set_default=Définir par défaut +projects.board.set_default_desc=Définir ce tableau comme valeur par défaut pour les tickets et demande d'ajouts non catégorisés +projects.board.delete=Supprimer le tableau +projects.board.deletion_desc=La suppression d'un tableau de projet déplace tous les tickets liés dans 'Non catégorisé'. Voulez vous continuer ? +projects.open=Ouvrir +projects.close=Fermer issues.desc=Organiser les rapports de bug, les tâches et les jalons. issues.filter_assignees=Filtrer par assignation issues.filter_milestones=Filtrer le jalon +issues.filter_projects=Filtrer par projet issues.filter_labels=Filtrer une étiquette issues.filter_reviewers=Filtrer par réviseur issues.new=Nouveau ticket @@ -836,6 +1049,12 @@ issues.new.labels=Étiquettes issues.new.add_labels_title=Appliquer une étiquette issues.new.no_label=Pas d'étiquette issues.new.clear_labels=Effacer les étiquettes +issues.new.projects=Projets +issues.new.add_project_title=Indiquer un projet +issues.new.clear_projects=Effacer les projets +issues.new.no_projects=Pas de projet +issues.new.open_projects=Projets ouverts +issues.new.closed_projects=Projets clôturés issues.new.no_items=Pas d'élément issues.new.milestone=Jalon issues.new.add_milestone_title=Affecter un jalon @@ -849,6 +1068,9 @@ issues.new.clear_assignees=Supprimer les affectations issues.new.no_assignees=Pas d'assignataires issues.new.no_reviewers=Pas de relecteur issues.new.add_reviewer_title=Demander une revue +issues.choose.get_started=Démarrons +issues.choose.blank=Par défaut +issues.choose.blank_about=Créer un ticket à partir du modèle par défaut. issues.no_ref=Aucune branche/tag spécifiés issues.create=Créer un ticket issues.new_label=Nouvelle étiquette @@ -860,10 +1082,19 @@ issues.label_templates.info=Il n'existe pas encore d'étiquettes. Créez une ét issues.label_templates.helper=Sélectionnez un ensemble d'étiquettes issues.label_templates.use=Utiliser le jeu de labels issues.label_templates.fail_to_load_file=Impossible de charger le fichier de modèle étiquette '%s' : %v +issues.add_label=a ajouté l'étiquette %s %s +issues.add_labels=a ajouté les étiquettes %s %s +issues.remove_label=a supprimé l'étiquette %s %s +issues.remove_labels=a supprimé les étiquettes %s %s +issues.add_remove_labels=a ajouté %s et supprimé les étiquettes %s %s issues.add_milestone_at=`a ajouté cela au jalon %s %s` +issues.add_project_at=`a ajouté au projet %s %s` issues.change_milestone_at=`a modifié le jalon de %s à %s %s` +issues.change_project_at=`modification du projet de %s à %s %s` issues.remove_milestone_at=`a supprimé cela du jalon %s %s` +issues.remove_project_at=`supprimer du projet %s %s` issues.deleted_milestone=`(supprimée)` +issues.deleted_project=`(supprimé)` issues.self_assign_at=`s'est assigné cela %s` issues.add_assignee_at=`s'est vu assigner cela par %s %s` issues.remove_assignee_at=`mis en non assigné par %s %s` @@ -884,6 +1115,7 @@ issues.filter_type.all_issues=Tous les tickets issues.filter_type.assigned_to_you=Qui vous sont assignés issues.filter_type.created_by_you=Créés par vous issues.filter_type.mentioning_you=Vous mentionnant +issues.filter_type.review_requested=Revue demandée issues.filter_sort=Trier issues.filter_sort.latest=Plus récent issues.filter_sort.oldest=Plus ancien/ne @@ -905,7 +1137,10 @@ issues.action_milestone_no_select=Aucun jalon issues.action_assignee=Assigné à issues.action_assignee_no_select=Pas d'assignataire issues.opened_by=créé %[1]s par %[3]s +pulls.merged_by=par %[3]s fusionné %[1]s +pulls.merged_by_fake=par %[2]s fusionnés %[1]s issues.closed_by=par %[3]s fermé %[1]s +issues.opened_by_fake=par %[2]s ouverts %[1]s issues.closed_by_fake=par %[2]s fermé %[1]s issues.previous=Page Précédente issues.next=Page Suivante @@ -916,11 +1151,13 @@ issues.commented_at=`a commenté %s` issues.delete_comment_confirm=Êtes-vous certain de vouloir supprimer ce commentaire? issues.context.copy_link=Copier le lien issues.context.quote_reply=Citer et répondre +issues.context.reference_issue=Référencer dans un nouveau ticket issues.context.edit=Éditer issues.context.delete=Supprimer issues.no_content=Il n'existe pas encore de contenu. issues.close_issue=Fermer -issues.pull_merged_at=`commit de fusion %[2]s dans %[3]s %[4]s` +issues.pull_merged_at=`révision fusionnée %[2]s dans %[3]s %[4]s` +issues.manually_pull_merged_at=`révision fusionnée %[2]s dans %[3]s manuellement %[4]s` issues.close_comment_issue=Commenter et Fermer issues.reopen_issue=Réouvrir issues.reopen_comment_issue=Commenter et Réouvrir @@ -939,8 +1176,11 @@ issues.poster=Publier issues.collaborator=Collaborateur issues.owner=Propriétaire issues.re_request_review=Redemander la revue +issues.is_stale=Il y a eu des modifications à cette PR depuis cette révision issues.remove_request_review=Retirer la demande de revue issues.remove_request_review_block=Ne peut pas retirer la demande de revue +issues.dismiss_review=Rejeter la revue +issues.dismiss_review_warning=Êtes-vous sûr de vouloir rejeter la revue ? issues.sign_in_require_desc=Connectez-vous pour rejoindre cette conversation. issues.edit=Modifier issues.cancel=Annuler @@ -985,13 +1225,17 @@ issues.lock.title=Verrouiller la conversation sur ce ticket. issues.unlock.title=Déverrouiller la conversation sur ce ticket. issues.comment_on_locked=Vous ne pouvez pas commenter un ticket verrouillé. issues.tracker=Suivi du temps -issues.start_tracking_short=Démarrer +issues.start_tracking_short=Démarrer le suivi de temps issues.start_tracking=Démarrer le suivi du temps issues.start_tracking_history=`a démarré il y a %s` issues.tracker_auto_close=Le suivi de temps sera automatiquement arrêté quand le ticket sera fermé -issues.stop_tracking=Arrêter +issues.tracking_already_started=`Vous avez déjà commencé à suivre le temps sur un autre ticket!` +issues.stop_tracking=Arrêter le suivi de temps issues.stop_tracking_history=`a fini de travaillé pour %s` +issues.cancel_tracking=Annuler +issues.cancel_tracking_history=`a annulé le suivi de temps pour %s` issues.add_time=Ajouter un minuteur manuellement +issues.del_time=Supprimer ce journal des temps issues.add_time_short=Ajouter un minuteur issues.add_time_cancel=Annuler issues.add_time_history=` temps passé ajouté %s` @@ -999,14 +1243,15 @@ issues.del_time_history=`a supprimé le temps passé %s` issues.add_time_hours=Heures issues.add_time_minutes=Minutes issues.add_time_sum_to_small=Aucun minuteur n'a été saisi. -issues.cancel_tracking=Annuler -issues.cancel_tracking_history=`a annulé le suivi de temps pour %s` issues.time_spent_total=Temps passé total issues.time_spent_from_all_authors=`Temps passé total : %s` issues.due_date=Échéance issues.invalid_due_date_format=Le format de la date d'échéance est invalide, il doit être comme suit 'aaaa-mm-jj'. issues.error_modifying_due_date=Impossible de modifier l'échéance. issues.error_removing_due_date=Impossible de supprimer l'échéance. +issues.push_commit_1=a ajouté %d révision %s +issues.push_commits_n=a ajouté %d révisions %s +issues.force_push_codes=`a forcé la poussée %[1]s de %[2]s vers %[4]s %[6]s` issues.due_date_form=aaaa-mm-jj issues.due_date_form_add=Ajouter une échéance issues.due_date_form_edit=Éditer @@ -1027,8 +1272,6 @@ issues.dependency.remove=Supprimer issues.dependency.remove_info=Supprimer cette dépendance issues.dependency.added_dependency=`a ajouté une nouvelle dépendance %s` issues.dependency.removed_dependency=`a supprimé une dépendance %s` -issues.dependency.issue_closing_blockedby=La clôture de cette demande d'ajout est bloquée par les tickets suivants -issues.dependency.pr_closing_blockedby=La clôture de ce ticket est bloquée par les tickets suivants issues.dependency.issue_close_blocks=Cette demande d'ajout empêche la clôture des tickets suivants issues.dependency.pr_close_blocks=Cette demande d'ajout empêche la clôture des tickets suivants issues.dependency.issue_close_blocked=Vous devez fermer tous les tickets qui bloquent ce ticket avant de pouvoir le fermer. @@ -1049,16 +1292,19 @@ issues.review.self.approval=Vous ne pouvez approuver vos propres demandes d'ajou issues.review.self.rejection=Vous ne pouvez demander de changements sur vos propres demandes de changement. issues.review.approve=ces changements ont été approuvés %s issues.review.comment=révisé %s +issues.review.dismissed=a rejeté la revue de %s %s +issues.review.dismissed_label=Rejeté issues.review.left_comment=laisser un commentaire issues.review.content.empty=Vous devez laisser un commentaire indiquant le(s) changement(s) demandé(s). issues.review.reject=a requis les changements %s -issues.review.wait=a demandé une révision pour %s -issues.review.add_review_request=demande de révision de %s %s +issues.review.wait=a été sollicité pour une révision %s +issues.review.add_review_request=a demandé une révision de %s %s issues.review.remove_review_request=a supprimé la demande de révision pour %s %s issues.review.remove_review_request_self=a refusé la revue %s issues.review.pending=En attente issues.review.review=Révision issues.review.reviewers=Relecteurs +issues.review.outdated=Périmé issues.review.show_outdated=Afficher les révisions périmées issues.review.hide_outdated=Cacher les révisions périmées issues.review.show_resolved=Montrer les résolus @@ -1067,6 +1313,10 @@ issues.review.resolve_conversation=Conversation résolue issues.review.un_resolve_conversation=Conversation non résolue issues.review.resolved_by=marquer cette conversation comme résolue issues.assignee.error=Tous les assignés n'ont pas été ajoutés en raison d'une erreur inattendue. +issues.reference_issue.body=Corps + +compare.compare_base=base +compare.compare_head=comparer pulls.desc=Activer les demandes de fusion et la revue de code. pulls.new=Nouvelle demande d'ajout @@ -1077,6 +1327,7 @@ pulls.compare_compare=tirer les modifications depuis pulls.filter_branch=Filtre de branche pulls.no_results=Aucun résultat trouvé. pulls.nothing_to_compare=Ces branches sont identiques. Il n'y a pas besoin de créer une demande de fusion. +pulls.nothing_to_compare_and_allow_empty_pr=Ces branches sont égales. Cette demande d'ajout sera vide. pulls.has_pull_request=`Une demande de fusion entre ces branches existe déjà : %[2]s#%[3]d` pulls.create=Créer une demande d'ajout pulls.title_desc=veut fusionner %[1]d révision(s) depuis %[2]s vers %[3]s @@ -1088,20 +1339,26 @@ pulls.tab_files=Fichiers Modifiés pulls.reopen_to_merge=Veuillez rouvrir cette demande d'ajout pour effectuer l'opération de fusion. pulls.cant_reopen_deleted_branch=Cette demande d'ajout ne peut pas être rouverte car la branche a été supprimée. pulls.merged=Fusionnée -pulls.merged_as=La demande de tirage a été fusionnée en %[2]s. +pulls.merged_as=La demande d'ajout a été fusionnée en %[2]s. +pulls.manually_merged=Fusionné manuellement +pulls.manually_merged_as=La demande d'ajout a été fusionnée manuellement en tant que %[2]s. pulls.is_closed=La demande de fusion a été fermée. pulls.has_merged=La pull request a été fusionnée. pulls.title_wip_desc=`Préfixer le titre par %s pour empêcher cette demande d'ajout d'être fusionnée par erreur.` -pulls.cannot_merge_work_in_progress=Cette demande d'ajout est marquée comme en cours de chantier. Retirer le préfixe %s du titre quand elle sera prête +pulls.remove_prefix=Enlever le préfixe %s pulls.data_broken=Cette demande de fusion est impossible par manque d'informations de bifurcation. pulls.files_conflicted=Cette demande d'ajout contient des modifications en conflit avec la branche ciblée. pulls.is_checking=Vérification des conflits de fusion en cours. Réessayez dans quelques instants. +pulls.is_empty=Cette branche est identique à la branche cible. pulls.required_status_check_failed=Certains contrôles requis n'ont pas réussi. pulls.required_status_check_missing=Certains contrôles requis sont manquants. pulls.required_status_check_administrator=En tant qu'administrateur, vous pouvez toujours fusionner cette requête de pull. pulls.blocked_by_approvals=Cette demande d'ajout n'a pas assez d'approbation. %d sur %d approbations accordées. pulls.blocked_by_rejection=Cette demande de fusion a des modifications demandées par un réviseur officiel. +pulls.blocked_by_official_review_requests=Cette demande d'ajout a des demandes de revue officielles. pulls.blocked_by_outdated_branch=Cette demande d'ajout est bloquée car elle est obsolète. +pulls.blocked_by_changed_protected_files_1=Cette demande d'ajout est bloquée car elle modifie un fichier protégé : +pulls.blocked_by_changed_protected_files_n=Cette Pull Request est bloquée car elle modifie les fichiers protégés : pulls.can_auto_merge_desc=Cette demande d'ajout peut être fusionnée automatiquement. pulls.cannot_auto_merge_desc=Cette demande de fusion ne peut être appliquée automatiquement en raison de conflits de fusion. pulls.cannot_auto_merge_helper=Fusionner manuellement pour résoudre les conflits. @@ -1113,21 +1370,26 @@ pulls.reject_count_1=%d changement requis pulls.reject_count_n=%d changements requis pulls.waiting_count_1=%d en attente de revue pulls.waiting_count_n=%d en attente de revues +pulls.wrong_commit_id=l'ID de la révision doit être un ID de révision sur la branche cible pulls.no_merge_desc=Cette demande de fusion ne peut être appliquée directement car toutes les options de fusion du dépôt sont désactivées. pulls.no_merge_helper=Activez des options de fusion dans les paramètres du dépôt ou fusionnez la demande manuellement. pulls.no_merge_wip=Cette demande d'ajout ne peut pas être fusionnée car elle est marquée comme en cours de chantier. pulls.no_merge_not_ready=Cette demande d'ajout n'est pas prête à être fusionnée, vérifiez l'état de la revue et les vérifications. pulls.no_merge_access=Vous n'êtes pas autorisé-e a fusionnée cette demande d'ajout. -pulls.merge_pull_request=Fusionner la demande d'ajout -pulls.rebase_merge_pull_request=Rebase et fusionner -pulls.rebase_merge_commit_pull_request=Rebase et Fusion (--no-ff) -pulls.squash_merge_pull_request=Squash et fusionner +pulls.merge_manually=Fusionné manuellement +pulls.merge_commit_id=L'ID de la révision de fusion pulls.require_signed_wont_sign=La branche nécessite des révisions signées mais cette fusion ne sera pas signée pulls.invalid_merge_option=Vous ne pouvez pas utiliser cette option de fusion pour cette demande. +pulls.merge_conflict=Échec de la fusion : il y a eu un conflit lors de la fusion. Indice : Essayez une autre stratégie +pulls.merge_conflict_summary=Message d'erreur +pulls.rebase_conflict=Fusion échouée : il y a eu un conflit lors du rebase du commit: %[1]s. Astuce : Essayez une stratégie différente +pulls.rebase_conflict_summary=Message d'erreur ; %[2]s
    %[3]s
    pulls.unrelated_histories=Échec de la fusion: La tête de fusion et la base ne partagent pas d'historique commun. Indice : Essayez une stratégie différente pulls.merge_out_of_date=Échec de la fusion: La base a été mise à jour en cours de fusion. Indice : Réessayez. +pulls.push_rejected=Fusion échouée : le push a été rejeté. Vérifiez vos githooks pour ce dépôt. +pulls.push_rejected_summary=Message de rejet complet pulls.push_rejected_no_message=Fusion échouée : l'envoi a été rejeté mais il n'y avait pas de message distant.
    Revoir les githooks pour ce dépôt pulls.open_unmerged_pull_exists=`Vous ne pouvez pas ré-ouvrir cette demande de fusion car il y a une demande de fusion (#%d) en attente avec des propriétés identiques.` pulls.status_checking=Certains contrôles sont en attente @@ -1135,18 +1397,24 @@ pulls.status_checks_success=Tous les contrôles ont réussi pulls.status_checks_warning=Quelques vérifications ont signalé des avertissements pulls.status_checks_failure=Certaines vérifications ont échoué pulls.status_checks_error=Quelques vérifications ont signalé des erreurs +pulls.status_checks_requested=Requis +pulls.status_checks_details=Détails pulls.update_branch=Mettre à jour la branche pulls.update_branch_success=La mise à jour de la branche a réussi pulls.update_not_allowed=Vous n'êtes pas autorisé à mettre à jour la branche pulls.outdated_with_base_branch=Cette branche est désynchronisée avec la branche de base pulls.closed_at=`a fermé cette pull request %[2]s` pulls.reopened_at=`a réouvert cette pull request %[2]s` +pulls.merge_instruction_hint=`Vous pouvez également voir les instructions en ligne de commande.` +pulls.merge_instruction_step1_desc=Depuis le dépôt de votre projet, sélectionnez une nouvelle branche et testez les modifications. +pulls.merge_instruction_step2_desc=Fusionner les modifications et mettre à jour sur Gitea. milestones.new=Nouveau jalon milestones.open_tab=%d Ouvert milestones.close_tab=%d Fermé milestones.closed=%s fermé +milestones.update_ago=Mis à jour il y a %s milestones.no_due_date=Aucune date d'échéance milestones.open=Ouvrir milestones.close=Fermer @@ -1186,6 +1454,7 @@ signing.wont_sign.basesigned=La fusion ne sera pas signée car la révision sour signing.wont_sign.headsigned=La fusion ne sera pas signée car la révision source n'est pas signée signing.wont_sign.commitssigned=La fusion ne sera pas signée car toutes les révisions associées ne sont pas signées signing.wont_sign.approved=La fusion ne sera pas signée car la PR n'a pas approuvée +signing.wont_sign.not_signed_in=Vous n'êtes pas authentifié ext_wiki=Wiki externe ext_wiki.desc=Lier un wiki externe. @@ -1243,7 +1512,7 @@ activity.closed_issues_count_1=Ticket fermé activity.closed_issues_count_n=Tickets fermés activity.title.issues_1=%d ticket activity.title.issues_n=%d tickets -activity.title.issues_closed_by=%s fermé par %s +activity.title.issues_closed_from=%s fermé par %s activity.title.issues_created_by=%s créé par %s activity.closed_issue_label=Fermé activity.new_issues_count_1=Nouveau ticket @@ -1281,6 +1550,8 @@ activity.git_stats_deletion_n=%d suppressions search=Chercher search.search_repo=Rechercher dans le dépôt +search.fuzzy=Approximative +search.match=Exacte search.results=Résultats de la recherche « %s » dans %s settings=Paramètres @@ -1296,6 +1567,9 @@ settings.hooks=Déclencheurs Web settings.githooks=Déclencheurs Git settings.basic_settings=Paramètres de base settings.mirror_settings=Réglages Miroir +settings.mirror_settings.direction=Direction +settings.mirror_settings.last_update=Dernière mise à jour +settings.mirror_settings.push_mirror.remote_url=URL du dépôt distant Git settings.sync_mirror=Synchroniser maintenant settings.mirror_sync_in_progress=La synchronisation est en cours. Revenez dans une minute. settings.email_notifications.enable=Activer les notifications par e-mail @@ -1304,6 +1578,7 @@ settings.email_notifications.disable=Désactiver les notifications par e-mail settings.email_notifications.submit=Définir la préférence e-mail settings.site=Site Web settings.update_settings=Valider +settings.branches.update_default_branch=Changer la Branche par Défaut settings.advanced_settings=Paramètres avancés settings.wiki_desc=Activer le wiki du dépôt settings.use_internal_wiki=Utiliser le wiki interne @@ -1331,6 +1606,9 @@ settings.pulls.allow_merge_commits=Activer la fusion de révisions settings.pulls.allow_rebase_merge=Activer le rebasage pour la fusion de révisions settings.pulls.allow_rebase_merge_commit=Activer le rebasage avec un commit de fusion explicite (--no-ff) settings.pulls.allow_squash_commits=Activer la concaténation de révisions +settings.pulls.allow_manual_merge=Activer le marquage des demandes d'ajout comme fusionnées manuellement +settings.pulls.enable_autodetect_manual_merge=Activer la détection automatique de la fusion manuelle (Remarque : dans certains cas particuliers, des erreurs de détection peuvent se produire) +settings.projects_desc=Activer les projets de dépôt settings.admin_settings=Paramètres administrateur settings.admin_enable_health_check=Activer les vérifications de santé du dépôt (git fsck) settings.admin_enable_close_issues_via_commit_in_any_branch=Fermer un ticket via une révision faite sur une branche non par défaut @@ -1341,11 +1619,38 @@ settings.convert_desc=Vous pouvez convertir ce miroir en dépôt standard. Ceci settings.convert_notices_1=Cette opération convertira le miroir en dépôt standard et ne peut être annulée. settings.convert_confirm=Convertir le dépôt settings.convert_succeed=Le miroir a été converti en dépôt standard. +settings.convert_fork=Convertir en dépôt standard +settings.convert_fork_desc=Vous pouvez convertir ce miroir en dépôt standard. Ceci ne peut pas être annulé. +settings.convert_fork_notices_1=Cette opération convertira le miroir en dépôt standard et ne peut être annulée. +settings.convert_fork_confirm=Convertir le dépôt +settings.convert_fork_succeed=Le miroir a été converti en dépôt standard. settings.transfer=Changer de propriétaire +settings.transfer.rejected=Le transfert du dépôt a été rejeté. +settings.transfer.success=Le transfert du dépôt a réussi. +settings.transfer_abort=Annuler le transfert +settings.transfer_abort_invalid=Vous ne pouvez pas annuler un transfert de dépôt inexistant. +settings.transfer_abort_success=Le transfert du dépôt vers %s a été annulé avec succès. settings.transfer_desc=Transférer ce dépôt à un autre utilisateur ou une organisation dont vous possédez des droits d'administrateur. +settings.transfer_form_title=Entrez le nom du dépôt pour confirmer : +settings.transfer_in_progress=Il y a actuellement un transfert en cours. Veuillez l'annuler si vous souhaitez transférer ce dépôt à un autre utilisateur. settings.transfer_notices_1=- Vous perdrez l'accès à ce dépôt si vous le transférez à un autre utilisateur. settings.transfer_notices_2=- Vous conserverez l'accès à ce dépôt si vous le transférez à une organisation dont vous êtes (co-)propriétaire. -settings.transfer_form_title=Entrez le nom du dépôt pour confirmer : +settings.transfer_owner=Nouveau propriétaire +settings.transfer_perform=Effectuer le transfert +settings.transfer_started=Ce dépôt a été marqué pour le transfert et attend la confirmation de "%s" +settings.transfer_succeed=Le dépôt a été transféré. +settings.signing_settings=Paramètres de vérification de la signature +settings.trust_model=Modèle de confiance de la signature +settings.trust_model.default=Modèle de confiance par défaut +settings.trust_model.default.desc=Utiliser le modèle de confiance par défaut pour cette installation. +settings.trust_model.collaborator=Collaborateur +settings.trust_model.collaborator.long=Collaborateur: Signatures de confiance de collaborateurs +settings.trust_model.collaborator.desc=Les signatures valides par des collaborateurs de ce dépôt seront marquées "de confiance" - (qu'elles correspondent ou non à l'auteur de la révision). Sinon, les signatures valides seront marquées "non fiables" si la signature correspond à l'auteur de la révision et "sans correspondance" si ce n'est pas le cas. +settings.trust_model.committer=Committer +settings.trust_model.committer.long=Committer: Signatures de confiance qui correspondent aux committers (Cela correspond à GitHub et obligera Gitea à avoir Gitea comme committer) +settings.trust_model.committer.desc=Les signatures valides ne seront marquées "en confiance" que si elles correspondent à l'expéditeur, sinon elles seront marquées "sans correspondance". Cela forcera Gitea à être le committer sur les commits signés avec le committer réel marqué comme Co-authored-by: et Co-commissiond-by: en pied de la livraison. La clé par défaut de Gitea doit correspondre à un utilisateur dans la base de données. +settings.trust_model.collaboratorcommitter=Collaborateur+Committer +settings.trust_model.collaboratorcommitter.long=Collaborateur+Committer: Faire confiance aux signatures des collaborateurs qui correspondent à l'auteur settings.trust_model.collaboratorcommitter.desc=Les signatures valides des des collaborateurs de ce dépôt seront marquées "de confiance" si elles correspondent à l'expéditeur. Dans le cas contraire, les signatures valides seront marquées "non fiables" si la signature correspond au validateur et "sans correspondance" pour les autres cas. Cela forcera Gitea à être marqué comme le committer sur les commits signés avec le committer réel marqué comme Co-Authored-By: et Co-Committed-By: inclus dans la livraison. La clé par défaut de Gitea doit correspondre à un utilisateur dans la base de données. settings.wiki_delete=Supprimer les données du Wiki settings.wiki_delete_desc=Supprimer les données du wiki d'un dépôt est permanent et ne peut être annulé. @@ -1359,9 +1664,6 @@ settings.delete_notices_2=- Cette opération supprimera définitivement le dép settings.delete_notices_fork_1=- Les bifurcations de ce dépôt deviendront indépendants après suppression. settings.deletion_success=Le dépôt a été supprimé. settings.update_settings_success=Les options du dépôt ont été mises à jour. -settings.transfer_owner=Nouveau propriétaire -settings.make_transfer=Transférer -settings.transfer_succeed=Le dépôt a été transféré. settings.confirm_delete=Supprimer le dépôt settings.add_collaborator=Ajouter un collaborateur settings.add_collaborator_success=Le collaborateur a été ajouté. @@ -1456,7 +1758,6 @@ settings.event_pull_request_review_desc=Demande d'ajout approvée, rejetée ou c settings.event_pull_request_sync=Demande d'ajout synchronisée settings.event_pull_request_sync_desc=Demande d'ajout synchronisée. settings.branch_filter=Filtre de branche -settings.branch_filter_desc=Liste blanche pour les évènements de poussage, de création et de suppression de branche, spécifiés par un motif de développement. Si ce champ est vide ou vaut *, ces évènements sont rapportés pour toutes les branches . Voir la documentation pour la syntaxe sur github.com/gobwas/glob. Exemples : master, {master,release*}. settings.active=Actif settings.active_helper=Les informations sur les événements déclenchés seront envoyées à cette url de Webhook. settings.add_hook_success=Nouveau Webhook ajouté. @@ -1503,6 +1804,7 @@ settings.protect_enable_push=Activer le Push settings.protect_enable_push_desc=Toute personne ayant un accès en écriture sera autorisée à pousser vers cette branche (mais pas de mise à jour forcée). settings.protect_whitelist_committers=Liste blanche des restrictions d'envoi settings.protect_whitelist_committers_desc=Seuls les utilisateurs ou les équipes autorisés pourront pousser vers cette branche (mais pas de mise à jour forcée). +settings.protect_whitelist_deploy_keys=Mettez les clés de déploiement sur liste blanche avec accès en écriture pour pousser. settings.protect_whitelist_users=Utilisateurs en liste blanche : settings.protect_whitelist_search_users=Rechercher des utilisateurs… settings.protect_whitelist_teams=Équipes en liste blanche : @@ -1512,6 +1814,7 @@ settings.protect_merge_whitelist_committers_desc=N'autoriser que les utilisateur settings.protect_merge_whitelist_users=Utilisateurs en liste blanche de fusion : settings.protect_merge_whitelist_teams=Équipes en liste blanche de fusion : settings.protect_check_status_contexts=Activer le Contrôle Qualité +settings.protect_check_status_contexts_desc=Exiger le passage du contrôle qualité avant de fusionner. Choisir quels contrôles qualité doivent être validés avant que les branches puissent être fusionnées dans une branche qui correspond à cette règle. Si activé, les commits doivent d'abord être poussés vers une autre branche avant d'être fusionnés ou bien poussés directement vers une branche qui correspond à cette règle après que les contrôles qualité soient passés. Si aucun contexte n'a été choisi, le dernier commit doit passer le contrôle qualité peu-importe le contexte. settings.protect_check_status_contexts_list=Contrôles qualité trouvés au cours de la semaine dernière pour ce dépôt settings.protect_required_approvals=Agréments nécessaires : settings.protect_required_approvals_desc=Permettre uniquement de fusionner les demandes d'ajout avec suffisamment de commentaires positifs. @@ -1522,6 +1825,7 @@ settings.protect_approvals_whitelist_teams=Équipes en liste blanche pour les r settings.dismiss_stale_approvals=Rejeter les approbations obsolètes settings.dismiss_stale_approvals_desc=Quand de nouvelles révisions qui changent le contenu de la demande d'ajout sont poussées vers la branche, les anciennes approbations seront rejetées. settings.require_signed_commits=Exiger des révisions signées +settings.require_signed_commits_desc=Rejeter les pushs vers cette branche s’ils ne sont pas signés ou vérifiables. settings.protect_protected_file_patterns=Motifs des fichiers protégés (séparés par un point-virgule '\;') : settings.add_protected_branch=Activer la protection settings.delete_protected_branch=Désactiver la protection @@ -1531,9 +1835,12 @@ settings.protected_branch_deletion=Désactiver la protection de branche settings.protected_branch_deletion_desc=Désactiver la protection de branche permet aux utilisateurs ayant accès en écriture de pousser des modifications sur la branche. Continuer ? settings.block_rejected_reviews=Bloquer la fusion quand il y a des avis de rejet settings.block_rejected_reviews_desc=La fusion ne sera pas possible lorsque des modifications sont demandées par les réviseurs officiels, même si les approbations sont suffisantes. +settings.block_on_official_review_requests=Bloquer la fusion en cas de demande de revue officielle +settings.block_on_official_review_requests_desc=La fusion ne sera pas possible quand elle aura des demandes de revues officielles, même si le nombre d'approbations est suffisant. settings.block_outdated_branch=Bloquer la fusion si la demande d'ajout est obsolète settings.block_outdated_branch_desc=La fusion ne sera pas possible lorsque la branche principale est derrière la branche de base. settings.default_branch_desc=Sélectionnez une branche par défaut pour les demandes de fusion et les révisions : +settings.default_merge_style_desc=Style de fusion par défaut pour les demandes d'ajouts : settings.choose_branch=Choisissez une branche… settings.no_protected_branch=Il n'y a pas de branche protégée. settings.edit_protected_branch=Éditer @@ -1600,7 +1907,9 @@ diff.whitespace_ignore_all_whitespace=Ignorer les espaces lors de la comparaison diff.whitespace_ignore_amount_changes=Ignorer les changements quand ce sont des espaces diff.whitespace_ignore_at_eol=Ignorer les changements quand ce sont des espaces à la fin de la ligne diff.stats_desc= %d fichiers modifiés avec %d ajouts et %d suppressions +diff.stats_desc_file=%d modifications: %d ajouts et %d suppressions diff.bin=BIN +diff.bin_not_shown=Fichier binaire non affiché. diff.view_file=Voir le fichier diff.file_before=Avant diff.file_after=Après @@ -1621,14 +1930,22 @@ diff.review.placeholder=Commentaire de révision diff.review.comment=Commenter diff.review.approve=Approuver diff.review.reject=Demander des changements +diff.committed_by=commité par +diff.protected=Protégé +diff.image.side_by_side=Côte à côte +diff.image.swipe=Glisser +diff.image.overlay=Superposition releases.desc=Suivi des versions et des téléchargements. release.releases=Versions +release.detail=Détails de la version +release.tags=Tags release.new_release=Nouvelle version release.draft=Brouillon release.prerelease=Pré-publication release.stable=Stable release.edit=Éditer +release.ahead.target=à %s depuis cette livraison release.source_code=Code source release.new_subheader=Les versions organisent les versions publiées du projet. release.edit_subheader=Les versions organisent les versions publiées du projet. @@ -1644,10 +1961,13 @@ release.publish=Publier release.save_draft=Sauvegarder le Brouillon release.edit_release=Modifier la version release.delete_release=Supprimer cette version +release.delete_tag=Supprimer le tag release.deletion=Supprimer cette version release.deletion_success=Cette livraison a été supprimée. +release.deletion_tag_success=L'étiquette a été supprimée. release.tag_name_already_exist=Une version avec ce nom de balise existe déjà. release.tag_name_invalid=Le nom de balise est invalide. +release.tag_already_exist=Ce nom d'étiquette existe déjà. release.downloads=Téléchargements release.download_count=Télécharger: %s @@ -1677,11 +1997,13 @@ branch.download=Télécharger la branche '%s' branch.included_desc=Cette branche fait partie de la branche par défaut branch.included=Incluses + topic.manage_topics=Gérer les sujets topic.done=Terminé topic.count_prompt=Vous ne pouvez pas sélectionner plus de 25 sujets topic.format_prompt=Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères. + [org] org_name_holder=Nom de l'organisation org_full_name_holder=Nom complet de l'organisation @@ -1794,8 +2116,6 @@ dashboard=Tableau de bord users=Comptes utilisateurs organizations=Organisations repositories=Dépôts -hooks=Webhooks par défaut -systemhooks=Rappels système authentication=Sources d'authentification emails=Courriels de l'utilisateur config=Configuration @@ -1814,15 +2134,19 @@ dashboard.operation_switch=Basculer dashboard.operation_run=Exécuter dashboard.clean_unbind_oauth=Effacer les connexions OAuth associées dashboard.clean_unbind_oauth_success=Toutes les connexions OAuth associées ont été supprimées. -dashboard.delete_repo_archives=Supprimer toutes les archives du dépôt +dashboard.cron.finished=Tâche planifiée : %[1]s a terminé +dashboard.delete_repo_archives=Supprimer toutes les archives des dépôts (ZIP, TAR.GZ, etc..) +dashboard.delete_repo_archives.started=Tâche de suppression de toutes les archives de dépôts démarrée. dashboard.delete_missing_repos=Supprimer tous les dépôts dont les fichiers Git sont manquants dashboard.delete_generated_repository_avatars=Supprimer les avatars de dépôt générés +dashboard.repo_health_check=Vérifier l'état de santé de tous les dépôts dashboard.check_repo_stats=Voir les statistiques de tous les dépôts dashboard.archive_cleanup=Supprimer les archives des vieux dépôts dashboard.git_gc_repos=Collecter les déchets des dépôts dashboard.resync_all_hooks=Re-synchroniser les déclencheurs Git pre-receive, update et post-receive de tous les dépôts. dashboard.reinit_missing_repos=Réinitialiser tous les dépôts Git manquants pour lesquels un enregistrement existe dashboard.sync_external_users=Synchroniser les données de l’utilisateur externe +dashboard.cleanup_hook_task_table=Nettoyer la table hook_task dashboard.server_uptime=Uptime du serveur dashboard.current_goroutine=Goroutines actuelles dashboard.current_memory_usage=Utilisation Mémoire actuelle @@ -1852,6 +2176,7 @@ dashboard.total_gc_time=Pause GC dashboard.total_gc_pause=Pause GC dashboard.last_gc_pause=Dernière Pause GC dashboard.gc_times=Nombres de GC +dashboard.delete_old_actions=Supprimer toutes les anciennes actions de la base de données users.user_manage_panel=Gestion du compte utilisateur users.new_account=Créer un compte @@ -1860,6 +2185,7 @@ users.full_name=Non Complet users.activated=Activé users.admin=Administrateur users.restricted=Restreint +users.2fa=2FA users.repos=Dépôts users.created=Créés users.last_login=Dernière connexion @@ -1887,6 +2213,7 @@ users.delete_account=Supprimer cet utilisateur users.still_own_repo=Cet utilisateur possède un ou plusieurs dépôts. Veuillez les supprimer ou les transférer à un autre utilisateur. users.still_has_org=Cet utilisateur est membre d'une organisation. Veuillez le retirer de toutes les organisations dont il est membre au préalable. users.deletion_success=Le compte a été supprimé. +users.reset_2fa=Réinitialiser l'authentification à deux facteurs emails.email_manage_panel=Gestion des courriels des utilisateurs emails.primary=Principale @@ -1908,6 +2235,7 @@ orgs.members=Membres orgs.new_orga=Nouvelle organisation repos.repo_manage_panel=Gestion des dépôts +repos.unadopted=Dépôts non adoptés repos.owner=Propriétaire repos.name=Nom repos.private=Privé @@ -1917,11 +2245,9 @@ repos.forks=Bifurcations repos.issues=Tickets repos.size=Taille -hooks.desc=Les Webhooks font automatiquement une requête HTTP POST à un serveur quand certains événements Gitea sont déclenchés. Les Webhooks définis ici sont ceux par défaut et seront copiés dans tous les nouveaux dépôts. Lire la suite dans le guide sur les Webhooks. -hooks.add_webhook=Ajouter un Webhook par défaut -hooks.update_webhook=Modifier un Webhook par défaut -systemhooks.desc=Les Webhooks font automatiquement une requête HTTP POST à un serveur quand certains événements Gitea sont déclenchés. Les Webhooks définis ici sont ceux par défaut et seront copiés dans tous les nouveaux dépôts. pour plus d'information voir le guide sur les Webhooks. +systemhooks=Rappels système +systemhooks.desc=Les Webhooks font automatiquement des requêtes HTTP POST à un serveur lorsque certains événements Gitea se déclenchent. Les Webhooks définis ici agiront sur tous les dépots du système, donc veuillez prendre en compte les implications en termes de performances que cela peut avoir. Lire la suite dans le guide des Webhooks. systemhooks.add_webhook=Ajouter un rappel système systemhooks.update_webhook=Mettre à jour un rappel système @@ -1940,7 +2266,6 @@ auths.host=Hôte auths.port=Port auths.bind_dn=Bind DN auths.bind_password=Bind mot de passe -auths.bind_password_helper=Attention: ce mot de passe est stocké en clair. Veuillez utiliser, si possible, un compte avec des droits limités en lecture seule. auths.user_base=Utilisateur Search Base auths.user_dn=Utilisateur DN auths.attribute_username=Attribut nom d'utilisateur @@ -1963,7 +2288,6 @@ auths.smtphost=Hôte SMTP auths.smtpport=Port SMTP auths.allowed_domains=Domaines autorisés auths.allowed_domains_helper=Laisser ce champ vide autorise tous les domaines. Separez les domaines multiples avec une virgule (","). -auths.enable_tls=Activer le Chiffrement TLS auths.skip_tls_verify=Ne pas vérifier TLS auths.pam_service_name=Nom du Service PAM auths.oauth2_provider=Fournisseur OAuth2 @@ -2097,6 +2421,7 @@ config.mailer_use_sendmail=Utiliser Sendmail config.mailer_sendmail_path=Chemin d’accès à Sendmail config.mailer_sendmail_args=Arguments supplémentaires pour Sendmail config.mailer_sendmail_timeout=Délai d’attente de Sendmail +config.test_email_placeholder=E-mail (ex: test@example.com) config.send_test_mail=Envoyer un e-mail de test config.test_mail_failed=Impossible d'envoyer un e-mail de test à '%s' : %v config.test_mail_sent=Un e-mail de test à été envoyé à '%s'. @@ -2138,7 +2463,6 @@ config.git_gc_timeout=Délai imparti pour l'opération "GC" config.log_config=Configuration du journal config.log_mode=Mode du journal -config.macaron_log_mode=Mode du journal de Macaron config.own_named_logger=Logger nommé config.routes_to_default_logger=Routes vers le Logger par Défaut config.go_log=Utilise Go Log (redirigé par défaut) @@ -2225,6 +2549,7 @@ notices.delete_selected=Supprimé les éléments sélectionnés notices.delete_all=Supprimer toutes les notifications notices.type=Type notices.type_1=Dépôt +notices.type_2=Tâche notices.desc=Description notices.op=Opération notices.delete_success=Les informations systèmes ont été supprimées. @@ -2243,7 +2568,6 @@ comment_issue=`a commenté le ticket %s#%[2]s` comment_pull=`a commenté la demande d’ajout %s#%[2]s` merge_pull_request=`a fusionné la demande d'ajout %s#%[2]s` transfer_repo=a transféré le dépôt %s à %s -push_tag=a soumis le tag %[2]s sur %[3]s delete_tag=étiquette supprimée %[2]s de %[3]s delete_branch=branche %[2]s supprimée de %[3]s compare_branch=Comparer @@ -2254,6 +2578,8 @@ mirror_sync_create=a synchronisé la nouvelle référence %[ mirror_sync_delete=a synchronisé puis supprimé la nouvelle référence %[2]s vers %[3]s depuis le miroir approve_pull_request=`a approuvé %s#%[2]s` reject_pull_request=`a suggérés du changement pour %s#%[2]s` +review_dismissed_reason=Raison : +create_branch=nouvelle branche créée %[3]s sur %[4]s [tool] ago=il y a %s diff --git a/options/locale/locale_hu-HU.ini b/options/locale/locale_hu-HU.ini index 170fd298d..eca0f26bb 100644 --- a/options/locale/locale_hu-HU.ini +++ b/options/locale/locale_hu-HU.ini @@ -19,6 +19,9 @@ create_new=Létrehozás… user_profile_and_more=Profil és beállítások... signed_in_as=Bejelentkezve mint enable_javascript=Ez az oldal jobban működik JavaScript-tel. +toc=Tartalomjegyzék +licenses=Licencek +return_to_gitea=Vissza a Gitea-hoz username=Felhasználónév email=E-mail cím @@ -50,6 +53,8 @@ new_migrate=Új migráció new_mirror=Új tükör new_fork=Új másolat new_org=Új szervezet +new_project=Új projekt +new_project_board=Új projekt tábla manage_org=Szervezetek kezelése admin_panel=Rendszergazdai felület account_settings=Fiók beállítások @@ -70,6 +75,7 @@ issues=Hibajegyek milestones=Mérföldkövek cancel=Mégse +save=Mentés add=Hozzáadás add_all=Összes hozzáadása remove=Eltávolítás @@ -79,9 +85,12 @@ write=Írás preview=Előnézet loading=Betöltés… +step1=1. lépés: +step2=2. lépés: error404=Az elérni kívánt oldal vagy nem létezik, vagy nincs jogosultsága a megtekintéséhez. + [error] occurred=Probléma lépett fel report_message=Ha biztos benne, hogy ez egy Gitea hiba, keressen a problémára a GitHub-on és hozzon létre új hibajelentést, ha szükséges. @@ -90,6 +99,7 @@ report_message=Ha biztos benne, hogy ez egy Gitea hiba, keressen a problémára app_desc=Fájdalommentes, saját gépre telepíthető Git szolgáltatás install=Könnyen telepíthető platform=Keresztplatformos +platform_desc=A Gitea minden platformon fut, ahol a Go fordíthat: Windows, macOS, Linux, ARM, stb. Válassza azt, amelyet szereti! lightweight=Könnyűsúlyú license=Nyílt forráskódú @@ -201,7 +211,12 @@ my_mirrors=Tükreim view_home=Nézet %s search_repos=Tároló keresés… +show_archived=Archivált +show_private=Privát +show_both_private_public=Publikus és privát mutatása +show_only_private=Csak privát mutatása +show_only_public=Csak publikus mutatása issues.in_your_repos=A tárolóidban @@ -224,6 +239,7 @@ register_helper_msg=Van már felhasználói fiókja? Jelentkezzen be! social_register_helper_msg=Van már felhasználói fiókja? Csatlakoztassa most! disable_register_prompt=Regisztráció le van tiltva. Kérjük, lépjen kapcsolatba az oldal adminisztrátorával. disable_register_mail=Ki van kapcsolva a visszaigazoló e-mail küldése a regisztrációnál. +remember_me=Eszköz megjegyzése forgot_password_title=Elfelejtett jelszó forgot_password=Elfelejtette a jelszavát? sign_up_now=Szeretne bejelentkezni? Regisztráljon most. @@ -266,7 +282,6 @@ openid_connect_desc=A kiválasztott OpenID URI ismeretlen. Itt társíthatja egy openid_register_title=Új fiók létrehozása openid_register_desc=A kiválasztott OpenID URI ismeretlen. Itt társíthatja egy új fiókkal. openid_signin_desc=Adja meg az OpenID URI-jét. Például https://anne.me, bob.openid.org.cn vagy gnusocial.net/carry. -disable_forgot_password_mail=A felhasználó visszaállítás le van tiltva. Kérjük, lépjen kapcsolatba az oldal adminisztrátorával. email_domain_blacklisted=Ezzel az email címmel nem regisztrálhat. authorize_application=Alkalmazás engedélyezése authorize_redirect_notice=Ha engedélyezi ezt az alkalmazást, akkor átirányításra kerül a %s címre. @@ -276,12 +291,22 @@ authorization_failed=Az engedélyezés nem sikerült sspi_auth_failed=SSPI hitelesítés sikertelen [mail] + activate_account=Kérjük aktiválja a fiókját + activate_email=E-mail cím megerősítése -reset_password=Fiókjának visszaállítása -register_success=Sikeres regisztráció + register_notify=A Gitea üdvözli +reset_password=Fiókjának visszaállítása + +register_success=Sikeres regisztráció + + + + + + [modal] yes=Igen no=Nem @@ -363,6 +388,7 @@ repositories=Tárolók activity=Nyilvános tevékenységek followers=Követők starred=Csillagozott tárolók +projects=Projektek following=Követve follow=Követés unfollow=Követés törlése @@ -406,6 +432,7 @@ continue=Folytatás cancel=Mégsem language=Nyelv ui=Téma +privacy=Adatvédelem lookup_avatar_by_mail=Avatar mutatása email cím alapján federated_avatar_lookup=Összevont profilkép keresés @@ -464,11 +491,11 @@ add_new_key=SSH kulcs hozzáadása add_new_gpg_key=GPG kulcs hozzáadása ssh_key_been_used=Ezt az SSH kulcsot már hozzáadták a ehhez a szerverhez. gpg_key_id_used=Ilyen azonosítóval már létezik nyilvános GPG kulcs. -gpg_no_key_email_found=Ez a GPG kulcs nem használható egyik email címeddel sem. subkeys=Alkulcsok key_id=Kulcs ID key_name=Kulcs neve key_content=Tartalom +principal_content=Tartalom add_key_success=A SSH kulcsod sikeresen hozzáadva: '%s' add_gpg_key_success=A GPG kulcsod sikeresen hozzáadva: '%s' delete_key=Eltávolítás @@ -500,6 +527,7 @@ new_token_desc=A tokent használó alkalmazásoknak teljes hozzáférése van a token_name=Token neve generate_token=Token generálása generate_token_success=Új token létrehozva. Másold le most, mivel többször nem fog megjelenni. +generate_token_name_duplicate=A %s nevet már használja egy alkalmazás. Válassz kérlek más nevet. delete_token=Törlés access_token_deletion=Hozzáférési Token Törlése access_token_deletion_desc=Egy token törlésével visszavonja a hozzáférést a fiókjához az ezt használó alkalmazásoktól. Folytatja? @@ -537,6 +565,7 @@ twofa_is_enrolled=A fiókja jelenleg használ kétlépcsős hit twofa_not_enrolled=A fiókja jelenleg nem használ kétlépcsős hitelesítést. twofa_disable=Kétlépcsős hitelesítés letiltása twofa_scratch_token_regenerate=Kaparós kód újragenerálása +twofa_enroll=Kétlépcsős hitelesítés használata twofa_disable_note=A kétlépcsős azonosítás szükség esetén letiltható. twofa_disable_desc=A kétlépcsős hitelesítés letiltása a fiókot kevésbé biztonságossá teszi. Folytatható? twofa_disabled=Kétlépcsős hitelesítés letiltva. @@ -567,6 +596,7 @@ email_notifications.onmention=Email küldése csak megjelölés esetén email_notifications.disable=Email értesítés kikapcsolása email_notifications.submit=E-mail beállítások megadása + [repo] owner=Tulajdonos repo_name=Tároló neve @@ -612,8 +642,17 @@ reactions_more=és további %d language_other=Egyéb +desc.private=Privát +desc.public=Nyilvános +desc.private_template=Privát sablon +desc.public_template=Sablon +desc.internal=Belső +desc.archived=Archivált + template.items=Sablon elemek template.git_content=Git tartalom (alapértelmezett branch) +template.git_hooks=Git Hook-ok +template.webhooks=Webhook-ok template.topics=Témák template.avatar=Avatar template.issue_labels=Hibajegy címkék @@ -624,11 +663,9 @@ archive.title=Ez a tároló archíválva van. A fájl megtekinthetőek és máso archive.issue.nocomment=Ez a tároló archiválva van. Nem szólhat hozzá ehhez a problémához. archive.pull.nocomment=Ez a tároló archíválva van. Nem szólhat hozzá ehhez az egyesítési kéréshez. -form.reach_limit_of_creation=Elérte a tárolók maximális számát (%d). form.name_reserved=A tárolónév ('%s') a rendszernek van fenntartva. form.name_pattern_not_allowed='%s' minta nem engedélyezett tárolónévben. -need_auth=Hitelesítés másoláshoz migrate_items_wiki=Wiki migrate_items_milestones=Mérföldkövek migrate_items_labels=Címkék @@ -642,7 +679,6 @@ migrate.clone_local_path=vagy a helyi szerver elérési útja migrate.permission_denied=Nem engedélyezett számodra a helyi tárolók importálása. migrate.invalid_local_path=A helyi elérési út érvénytelen; nem létezik vagy nem mappára mutat. migrate.failed=A migráció sikertelen: %v -migrate.lfs_mirror_unsupported=LFS objektumok tükrözése nem támogatott - használja a 'git lfs fetch --all' és a 'git lfs push --all" parancsokat helyette. migrated_from=Migrálva innen: %[2]s migrated_from_fake=Migrálva innen: %[1]s @@ -677,11 +713,14 @@ tags=Címkék issues=Hibajegyek pulls=Egyesítési kérések labels=Címkék +org_labels_desc_manage=kezelés milestones=Mérföldkövek commits=Commit-ok commit=Commit +release=Kiadás releases=Kiadások +tag=Címke file_raw=Nyers file_history=Előzmények file_view_raw=Nyers fájl megtekintése @@ -692,6 +731,7 @@ audio_not_supported_in_browser=A böngésző nem támogatja a HTML5 audio tag-et stored_lfs=Git LFS-el eltárolva symbolic_link=Szimbolikus hivatkozás commit_graph=Commit gráf +commit_graph.hide_pr_refs=Pull request-ek elrejtése normal_view=Normál nézet line=sor lines=sor @@ -754,12 +794,17 @@ ext_issues.desc=Külső hibakövető csatlakoztatás. issues.desc=Hibajelentések, feladatok és mérföldkövek elrendezése. +issues.filter_milestones=Mérföldkövek szűrése +issues.filter_labels=Címkék szűrése issues.new=Új hibajegy issues.new.title_empty=A cím nem lehet üres issues.new.labels=Címkék +issues.new.add_labels_title=Címke alkalmazása issues.new.no_label=Nincs címke issues.new.clear_labels=Címkék kiürítése +issues.new.no_items=Nincsenek elemek issues.new.milestone=Mérföldkő +issues.new.add_milestone_title=Mérföldkő beállítása issues.new.no_milestone=Nincs mérföldkő issues.new.clear_milestone=Mérföldkő eltávolítása issues.new.open_milestone=Nyitott mérföldkövek @@ -767,6 +812,8 @@ issues.new.closed_milestone=Lezárt mérföldkövek issues.new.assignees=Megbízottak issues.new.clear_assignees=Megbízottak eltávolítása issues.new.no_assignees=Nincsenek megbízottak +issues.new.no_reviewers=Nincs véleményező +issues.new.add_reviewer_title=Véleményezés kérése issues.no_ref=Nincsen ág/címke megadva issues.create=Hibajegy létrehozása issues.new_label=Új címke @@ -842,6 +889,7 @@ issues.commit_ref_at=`hivatkozott erre a hibajegyre egy commit-ból Jelentkezz be hogy csatlakozz a beszélgetéshez. issues.edit=Szerkesztés issues.cancel=Mégsem @@ -879,11 +927,10 @@ issues.lock.title=Beszélgetés lezárása ezen a hibajegyen. issues.unlock.title=Hibajegy újranyitása. issues.comment_on_locked=Egy zárolt hibajegyhez nem lehet hozzászólni. issues.tracker=Időzítő -issues.start_tracking_short=Indítás issues.start_tracking=Időmérés elkezdése issues.start_tracking_history=`elkezdett dolgozni %s` -issues.stop_tracking=Leállítás issues.stop_tracking_history=`abbahagyta a %s` +issues.cancel_tracking_history=`törölte az időzítőt %s` issues.add_time=Idő kézi hozzáadása issues.add_time_short=Idő hozzáadása issues.add_time_cancel=Megszakítva @@ -891,8 +938,6 @@ issues.add_time_history=`hozzáadta %s` issues.add_time_hours=Óra issues.add_time_minutes=Perc issues.add_time_sum_to_small=Nem volt idő megadva. -issues.cancel_tracking=Megszakítva -issues.cancel_tracking_history=`törölte az időzítőt %s` issues.time_spent_total=Teljes ráfordított idő issues.time_spent_from_all_authors=`Teljes ráfordított idő: %s` issues.due_date=Határidő @@ -913,7 +958,6 @@ issues.dependency.add=Függőség hozzáadása… issues.dependency.cancel=Mégse issues.dependency.remove=Eltávolítás issues.dependency.remove_info=Függőség eltávolítása -issues.dependency.pr_closing_blockedby=Ennek a hibajegynek a lezárását megakadályozzák a következő hibajegyek issues.dependency.issue_close_blocks=Ez a hibajegy megakadályozza a következő hibajegyek lezárását issues.dependency.blocks_short=Blokkok issues.dependency.blocked_by_short=A következőtől függ: @@ -933,6 +977,7 @@ issues.review.show_outdated=Elavultak mutatása issues.review.hide_outdated=Elavultak elrejtése issues.assignee.error=Nem minden megbízott lett hozzáadva egy nem várt hiba miatt. + pulls.new=Egyesítési kérés pulls.compare_changes=Új egyesítési kérés pulls.compare_base=egyesítés ide @@ -952,9 +997,6 @@ pulls.cant_reopen_deleted_branch=Ez a pull request nem nyitható meg újra, mive pulls.merged=Egyesítve pulls.can_auto_merge_desc=Ez az egyesítési kérés automatikusan végrehajtható. -pulls.merge_pull_request=Egyesítési kérés végrehajtása -pulls.rebase_merge_pull_request=Rebase és egyesítés -pulls.squash_merge_pull_request=Squash és egyesítés ; %[2]s
    %[3]s
    pulls.status_checking=Néhány ellenőrzés függőben van pulls.status_checks_success=Minden ellenőrzés sikeres volt @@ -1048,7 +1090,6 @@ activity.closed_issues_count_1=Lezárt Hibajegy activity.closed_issues_count_n=Lezárt hibajegyek activity.title.issues_1=%d Hibajegy activity.title.issues_n=%d Hibajegyek -activity.title.issues_closed_by=%s lezárta %s activity.title.issues_created_by=%s létrehozta %s activity.closed_issue_label=Lezárt activity.new_issues_count_1=Új hibajegy @@ -1126,9 +1167,10 @@ settings.convert_confirm=Tároló átalakítása settings.convert_succeed=A tükör át lett alakítva rendes tárolóvá. settings.transfer=Tulajdonjog átadása settings.transfer_desc=A tároló tulajdonának átruházása egy másik felhasználóra, vagy egy szervezetre ahol rendszergazdai jogai vannak. +settings.transfer_form_title=Írja be a tároló nevét megerősítésként: settings.transfer_notices_1=- Ön elveszti a hozzáférési jogát a tárolóhoz ha átruházása egy másik felhasználóra. settings.transfer_notices_2=- Ön megtartjaa hozzáférési jogát a tárolóhoz ha átruházza egy szervezetre ahol rendszergazdai jogai vannak. -settings.transfer_form_title=Írja be a tároló nevét megerősítésként: +settings.transfer_owner=Új tulajdonos settings.wiki_delete=Wiki adatainak törlése settings.wiki_delete_desc=A wiki adatainak törlése végleges és nem fordítható vissza. settings.wiki_delete_notices_1=- Ez törli és letiltja a tároló wiki-t %s időre. @@ -1140,7 +1182,6 @@ settings.delete_notices_1=- Ezt a műveletet NEM lehet visszavo settings.delete_notices_2=- Ez a művelet véglegesen törölni fog mindent ami a(z) %s tárolóhoz tartozik: többek között kódot, hibajegyeket, hozzászólásokat, Wiki oldalakat és a közreműködők jogait. settings.deletion_success=A tároló törölve lett. settings.update_settings_success=A tároló beállításai firssítve lettek. -settings.transfer_owner=Új tulajdonos settings.confirm_delete=A tároló törlése settings.add_collaborator=Új együttműködő settings.add_collaborator_success=Az együttműködő hozzáadva. @@ -1154,6 +1195,8 @@ settings.add_team_duplicate=A csapat már rendelkezik a tárolóval settings.add_team_success=A csapatnak most van hozzáférése a tárolóhoz. settings.remove_team_success=A csapat hozzáférése a tárolóhoz törölve lett. settings.add_webhook=Webhook hozzáadása +settings.webhook_deletion=Webhook eltávolítása +settings.webhook_deletion_success=A webhook el lett távolítva. settings.webhook.test_delivery=Küldés Kipróbálása settings.webhook.request=Kérés settings.webhook.response=Válasz @@ -1254,6 +1297,7 @@ diff.show_unified_view=Egyesített nézet diff.stats_desc=%d fájl változott, egészen pontosan %d új sor hozzáadva és %d régi sor törölve diff.bin=BINáris diff.view_file=Fájl megtekintése +diff.file_byte_size=Méret diff.file_suppressed=A különbségek nem kerülnek megjelenítésre, mivel a fájl túl nagy diff.too_many_files=Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott diff.comment.placeholder=Hozzászólás létrehozása @@ -1277,6 +1321,7 @@ release.cancel=Mégse release.publish=Kiadás közzététele release.save_draft=Piszkozat mentése release.deletion_success=A kiadás törölve. +release.deletion_tag_success=A cimke törölve lett. release.tag_name_invalid=Ez a címkenév érvénytelen. release.downloads=Letöltések release.download_count=Letöltések: %s @@ -1289,9 +1334,11 @@ branch.create_from='%s'-ból/ből branch.branch_already_exists=A(z) '%s' ág már létezik a tárolóban. branch.deleted_by=Törölve %s által + topic.manage_topics=Témák kezelése topic.done=Kész + [org] org_name_holder=Szervezet neve org_full_name_holder=Szervezet teljes neve @@ -1494,7 +1541,6 @@ auths.host=Kiszolgáló auths.port=Port auths.bind_dn=Bind DN auths.bind_password=Bind Jelszó -auths.bind_password_helper=Figyelem: Ez a jelszó egyszerű szövegben van tárolva. Ha lehetséges használjon csak olvasható fiókot. auths.user_base=Felhasználókeresés alapja (BaseDN) auths.user_dn=Felhasználói DN auths.attribute_username=Felhasználónév attribútum @@ -1513,7 +1559,6 @@ auths.smtphost=SMTP kiszolgáló auths.smtpport=SMTP port auths.allowed_domains=Engedélyezett tartományok auths.allowed_domains_helper=Hagyja üresen, ha minden tartományt szeretne engedélyezi. Több tartományt vesszővel(',') válasszon el. -auths.enable_tls=TLS titkosítás engedélyezése auths.skip_tls_verify=TLS ellenőrzés kihagyása auths.pam_service_name=PAM szolgáltatás neve auths.oauth2_provider=OAuth2 szolgáltató @@ -1650,6 +1695,7 @@ config.session_life_time=Munkamenet Élettartama config.https_only=Csak HTTPS config.cookie_life_time=Süti Élettartam +config.picture_config=Kép és Avatár Konfiguráció config.picture_service=Kép Szolgáltatás config.disable_gravatar=Gravatar Kikapcsolása config.enable_federated_avatar=Összevont profilkép lekérés engedélyezése @@ -1670,12 +1716,14 @@ config.log_config=Naplózási Beállítások config.log_mode=Naplózási Módja config.disabled_logger=Letiltva config.access_log_template=Sablon +config.xorm_log_sql=SQL naplózása monitor.cron=Ütemezett Feladatok monitor.name=Név monitor.schedule=Ütemezés monitor.next=Legközelebb monitor.previous=Legutóbb +monitor.execute_times=Végrehajtások monitor.process=Futó Folyamatok monitor.desc=Leírás monitor.start=Kezdés Időpontja @@ -1699,6 +1747,7 @@ notices.delete_selected=Kiválasztottak Törlése notices.delete_all=Minden Értesítés Törlése notices.type=Típus notices.type_1=Tároló +notices.type_2=Feladat notices.desc=Leírás notices.op=Op. notices.delete_success=A rendszer-értesítések törölve lettek. @@ -1717,6 +1766,7 @@ merge_pull_request=`végrehajtott egy egyesítési kérést: %s delete_tag=címke %[2]s törölve innen: %[3]s delete_branch=ág %[2]s törölve innen: %[3]s +compare_branch=Összehasonlítás compare_commits=%d commit összehasonlítása compare_commits_general=Commitok összehasonlítása diff --git a/options/locale/locale_id-ID.ini b/options/locale/locale_id-ID.ini index ab57181eb..1f0debc71 100644 --- a/options/locale/locale_id-ID.ini +++ b/options/locale/locale_id-ID.ini @@ -19,6 +19,7 @@ create_new=Buat… user_profile_and_more=Profil dan Pengaturan… signed_in_as=Masuk sebagai enable_javascript=Situs web ini bekerja lebih baik dengan JavaScript. +toc=Daftar Isi username=Nama Pengguna email=Alamat Email @@ -70,6 +71,7 @@ issues=Masalah milestones=Tonggak cancel=Batal +save=Simpan add=Tambah add_all=Tambah Semua remove=Buang @@ -81,6 +83,7 @@ loading=Memuat… + [error] [startpage] @@ -266,7 +269,6 @@ openid_connect_desc=OpenID URI yang dipilih tak dikenal. Asosiasikan dengan akun openid_register_title=Buat akun baru openid_register_desc=OpenID URI yang dipilih tak dikenal. Asosiasikan dengan akun baru disini. openid_signin_desc=Masukkan URI OpenID Anda. Misalnya: https://anne.me, bob.openid.org.cn, atau gnusocial.net/carry. -disable_forgot_password_mail=Pemulihan akun ditiadakan. Hubungi admin situs Anda. email_domain_blacklisted=Anda tidak dapat mendaftar dengan alamat email. authorize_application=Izinkan aplikasi authorize_redirect_notice=Anda akan dialihkan ke %s apabila Anda mengizinkan aplikasi ini. @@ -278,12 +280,22 @@ authorization_failed_desc=Otorisasi gagal oleh karena kami mendeteksi permintaan sspi_auth_failed=Autentikasi SSPI gagal [mail] + activate_account=Silakan aktifkan akun anda + activate_email=Verifikasi alamat surel anda -reset_password=Pulihkan akun Anda -register_success=Pendaftaran berhasil + register_notify=Selamat Datang di Gitea +reset_password=Pulihkan akun Anda + +register_success=Pendaftaran berhasil + + + + + + [modal] yes=Ya no=Tidak @@ -468,7 +480,6 @@ add_new_key=Tambahkan Kunci SSH add_new_gpg_key=Tambahkan Kunci GPG ssh_key_been_used=Kunci SSH ini telah ditambahkan ke peladen. gpg_key_id_used=Kunci publik GPG dengan ID yang sama sudah ada. -gpg_no_key_email_found=Kunci GPG ini tidak dapat digunakan dengan alamat surel apapun yang terasosiasi dengan akun Anda. subkeys=Subkunci key_id=ID Kunci key_name=Nama Kunci @@ -585,6 +596,7 @@ email_notifications.enable=Aktifkan Pemberitahuan Surel email_notifications.disable=Nonaktifkan Email Notifikasi email_notifications.submit=Pasang Pengaturan Email + [repo] owner=Pemilik repo_name=Nama Repositori @@ -624,6 +636,7 @@ reactions_more=dan %d lainnya unit_disabled=Administrator web menonaktifkan bagian repositori ini. + template.webhooks=Webhooks template.topics=Topik template.avatar=Avatar @@ -632,18 +645,15 @@ archive.title=Repositori ini diarsipkan. Anda bisa melihat berkas dan mengklonin archive.issue.nocomment=Repositori ini diarsipkan. Anda tidak dapat mengomentari masalah. archive.pull.nocomment=Repositori ini diarsipkan. Anda tidak dapat mengomentari permintaan tarik. -form.reach_limit_of_creation=Anda telah mencapai batas dari repositori %d. form.name_reserved=Nama repositori '%s' dicadangkan. form.name_pattern_not_allowed=Pola '%s' tidak diperbolehkan dalam nama repositori. -need_auth=Otorisasi Kloning migrate_items=Ihwal Migrasi migrate_items_wiki=Wiki migrate_repo=Migrasi Repositori migrate.permission_denied=Anda tidak diizinkan untuk mengimpor repositori lokal. migrate.invalid_local_path=Jalur lokal tidak valid; tidak ada atau bukan direktori. migrate.failed=Migrasi gagal: %v -migrate.lfs_mirror_unsupported=Mencerminkan object LFS tidak didukung - gunakan 'git lfs fetch --all' dan 'git lfs push --all'. migrated_from=Termigrasi dari %[2]s migrated_from_fake=Termigrasi Dari %[1]s migrate.migrating=Memigrasi dari %s ... @@ -830,16 +840,14 @@ issues.attachment.open_tab=`Klik untuk melihat "%s" di tab baru` issues.attachment.download=`Klik untuk mengunduh "%s"` issues.subscribe=Berlangganan issues.unsubscribe=Berhenti berlangganan -issues.start_tracking_short=Mulai issues.start_tracking_history=`mulai bekerja %s` -issues.stop_tracking=Berhenti issues.stop_tracking_history=`berhenti bekerja %s` +issues.cancel_tracking_history=`batalkan pelacakan waktu %s` issues.add_time_cancel=Batalkan issues.add_time_history=`tambah menghabiskan waktu %s` issues.add_time_hours=Jam issues.add_time_minutes=Menit -issues.cancel_tracking=Batal -issues.cancel_tracking_history=`batalkan pelacakan waktu %s` + pulls.new=Permintaan Tarik Baru pulls.filter_branch=Penyaringan cabang @@ -853,9 +861,6 @@ pulls.reopen_to_merge=Tolong buka kembali permintaan tarik ini untuk melaksanaka pulls.merged=Menggabungkan pulls.can_auto_merge_desc=Permintaan tarik ini dapat digabung secara otomatis. -pulls.merge_pull_request=Gabungkan Permintaan Tarik -pulls.rebase_merge_pull_request=Membuat Ulang Dasar dan Menggabungkan -pulls.squash_merge_pull_request=Tindih dan Gabungkan ; %[2]s
    %[3]s
    @@ -922,7 +927,6 @@ activity.closed_issues_count_1=Masalah tertutup activity.closed_issues_count_n=Masalah tertutup activity.title.issues_1=%d Masalah activity.title.issues_n=%d Masalah -activity.title.issues_closed_by=%s ditutup oleh %s activity.title.issues_created_by=%s dibuat oleh %s activity.closed_issue_label=Tertutup activity.new_issues_count_1=Masalah Baru @@ -957,9 +961,9 @@ settings.tracker_issue_style.alphanumeric=Alfhanumerik settings.danger_zone=Zona Bahaya settings.new_owner_has_same_repo=Pemilik baru sudah memiliki repositori dengan nama yang sama. Silakan pilih nama lain. settings.transfer=Transfer Kepemilikan +settings.transfer_owner=Pemilik Baru settings.delete=Menghapus Repositori Ini settings.delete_notices_1=- Operasi ini TIDAK BISA dibatalkan. -settings.transfer_owner=Pemilik Baru settings.search_user_placeholder=Cari pengguna… settings.add_webhook=Tambahkan Webhook settings.webhook.test_delivery=Percobaan Pengiriman @@ -1039,6 +1043,8 @@ branch.branch_already_exists=Cabang '%s' sudah ada di repositori ini. branch.deleted_by=Dihapus oleh %s + + [org] org_name_holder=Nama Organisasi org_full_name_holder=Organisasi Nama Lengkap @@ -1183,7 +1189,6 @@ auths.smtp_auth=Jenis otentikasi SMTP auths.smtphost=Host SMTP auths.smtpport=Port SMTP auths.allowed_domains=Domain yang diizinkan -auths.enable_tls=Aktifkan enkripsi TLS auths.skip_tls_verify=Lewati verifikasi TLS auths.pam_service_name=Nama layanan PAM auths.oauth2_provider=Penyediaan OAuth2 @@ -1307,7 +1312,6 @@ config.git_gc_timeout=Waktu habis operasi GC config.log_config=Catat konfigurasi config.log_mode=Mode catat -config.macaron_log_mode=Mode Catatan Macaron config.disabled_logger=Nonaktif config.xorm_log_sql=Catatan SQL diff --git a/options/locale/locale_it-IT.ini b/options/locale/locale_it-IT.ini index abec12913..19d55d855 100644 --- a/options/locale/locale_it-IT.ini +++ b/options/locale/locale_it-IT.ini @@ -15,6 +15,7 @@ page=Pagina template=Template language=Lingua notifications=Notifiche +active_stopwatch=Tracker Tempo Attivo create_new=Crea… user_profile_and_more=Profilo ed Impostazioni… signed_in_as=Accesso effettuato come @@ -75,6 +76,7 @@ pull_requests=Pull Request issues=Problemi milestones=Milestones +ok=OK cancel=Annulla save=Salva add=Aggiungi @@ -86,9 +88,12 @@ write=Scrivi preview=Anteprima loading=Caricamento… +step1=Passo 1: +step2=Passo 2: error404=La pagina che stai cercando di raggiungere non esiste oppure non sei autorizzato a visualizzarla. + [error] occurred=Si è verificato un errore report_message=Se sei sicuro che sia un bug di Gitea, cerca il problema su GitHub e apri una nuova segnalazione se necessario. @@ -201,6 +206,8 @@ default_enable_timetracking=Attiva il cronografo di Default default_enable_timetracking_popup=Attiva il cronografo per le nuove repositories di default. no_reply_address=Dominio email nascosto no_reply_address_helper=Nome dominio per utenti con un indirizzo email nascosto. Ad esempio, il nome utente 'joe' accederà a Git come 'joe@noreply.example.org' se il dominio email nascosto è impostato a 'noreply.example.org'. +password_algorithm=Algoritmo Password Hash +password_algorithm_helper=Imposta l'algoritmo di hashing della password. Gli algoritmi hanno requisiti e forza diversi. `argon2` pur avendo buone caratteristiche utilizza un sacco di memoria e può essere inappropriato per piccoli sistemi. [home] uname_holder=Nome utente o Indirizzo Email @@ -214,6 +221,7 @@ my_mirrors=I miei Mirror view_home=Vedi %s search_repos=Trova un repository… filter=Altro filtri +filter_by_team_repositories=Filtra per repository del team show_archived=Archiviato show_both_archived_unarchived=Mostra sia gli archiviati che i non archiviati @@ -233,6 +241,8 @@ users=Utenti organizations=Organizzazioni search=Cerca code=Codice +search.fuzzy=Fuzzy +search.match=Corrispondenze repo_no_results=Nessuna repository corrispondente. user_no_results=Nessun utente corrispondente. org_no_results=Nessun'organizzazione corrispondente trovata. @@ -246,6 +256,7 @@ register_helper_msg=Hai già un account? Accedi ora! social_register_helper_msg=Hai già un account? Accedi ora! disable_register_prompt=La registrazione è disabilitata. Si prega di contattare l'amministratore del sito. disable_register_mail=Email di conferma per la registrazione disabilitata. +remember_me=Ricorda questo dispositivo forgot_password_title=Password Dimenticata forgot_password=Password dimenticata? sign_up_now=Hai bisogno di un account? Registrati adesso. @@ -278,6 +289,7 @@ twofa_scratch_token_incorrect=I tuo codice scratch non è corretto. login_userpass=Accedi login_openid=OpenID oauth_signup_tab=Creare nuovo account +oauth_signup_title=Completa Nuovo Account oauth_signup_submit=Completa l'Account oauth_signin_tab=Collegamento ad un Account Esistente oauth_signin_title=Accedi per autorizzare l' Account collegato @@ -288,7 +300,6 @@ openid_connect_desc=L'URI OpenID scelto è sconosciuto. Qui puoi associarlo a un openid_register_title=Crea Nuovo Account openid_register_desc=L'URI OpenID scelto è sconosciuto. Qui puoi associarlo a un nuovo account. openid_signin_desc=Inserisci il tuo URI OpenID. Ad esempio: https://anne.me, bob.openid.org.cn o gnusocial.net/carry. -disable_forgot_password_mail=La reimpostazione della password è disabilitata. Si prega di contattare l'amministratore del sito. email_domain_blacklisted=Non è possibile registrarsi con il proprio indirizzo email. authorize_application=Autorizza applicazione authorize_redirect_notice=Verrai reindirizzato a %s se autorizzi questa applicazione. @@ -302,12 +313,22 @@ password_pwned=La password che hai scelto è in una lista Hai bisogno di aiuto?
    Dai un'occhiata alla guida di GitHub percrea le tue chiavi SSH o risolvere problemi comuni che potresti trovare utilizzando SSH. gpg_helper=Hai bisogno di aiuto? Dai un'occhiata alla guida di GitHub riguardo il GPG. add_new_key=Aggiungi Chiave SSH add_new_gpg_key=Aggiungi Chiave GPG -key_content_ssh_placeholder=Comincia con 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', o 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=Inizia con 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', o 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=Comincia con '-----BEGIN PGP PUBLIC KEY BLOCK-----' ssh_key_been_used=Questa chiave SSH è già stata aggiunta al server. +ssh_key_name_used=Una chiave SSH con lo stesso nome esiste già sul tuo account. +ssh_principal_been_used=Questa chiave SSH è già stata aggiunta al server. gpg_key_id_used=Esiste già una chiave GPG pubblica con lo stesso ID. -gpg_no_key_email_found=Questa chiave GPG non è utilizzabile con nessun indirizzo email associato al tuo account. subkeys=Sottochiavi key_id=ID chiave key_name=Nome della Chiave key_content=Contenuto +principal_content=Contenuto add_key_success=La chiave SSH '%s' è stata aggiunta. add_gpg_key_success=La chiave GPG %s' è stata aggiunta. +add_principal_success=Il certificato SSH '%s' è stato aggiunto. delete_key=Rimuovi ssh_key_deletion=Rimuovi chiave SSH gpg_key_deletion=Rimuovi chiave GPG +ssh_principal_deletion=Rimuovi certificato SSH principale ssh_key_deletion_desc=Rimuovere una chiave SSH ne revoca l'accesso al tuo account. Continuare? gpg_key_deletion_desc=La rimozione di una chiave GPG invalida i commits firmati da essa. Continuare? ssh_key_deletion_success=La chiave SSH è stata rimossa. @@ -537,6 +568,7 @@ token_state_desc=Questo token è stato utilizzato negli ultimi 7 giorni show_openid=Mostra nel profilo hide_openid=Nascondi dal profilo ssh_disabled=SSH disabilitato +ssh_externally_managed=Questa chiave SSH è gestita esternamente per questo utente manage_social=Gestisci gli Account Sociali Associati social_desc=Questi account sociali sono collegati al tuo account Gitea. Assicurati di riconoscerli tutti in quanto possono essere usati per effettuare il login con il tuo account Gitea. unbind=Rimuovi il collegamento @@ -603,6 +635,7 @@ or_enter_secret=O immettere il segreto: %s then_enter_passcode=E immetti il codice di accesso indicato nell'applicazione: passcode_invalid=Il codice di accesso non è corretto. Riprova. twofa_enrolled=Il tuo account è stato registrato alla verifica in due passaggi. Conserva il token di sicurezza (%s) in un luogo sicuro in quanto viene visualizzato sono una volta! +twofa_failed_get_secret=Impossibile ottenere il segreto. u2f_desc=Le chiavi di sicurezza sono dispositivi fisici conenenti chiavi crtittografiche. Possono essere usati per una autenticazione a du fattori. Le chiavi di sicurezza devno supportare lo standard FIDO U2F. u2f_require_twofa=Il tuo account deve essere abilitato all'autenticazione a due fattori per utilizzare le chiavi di sicurezza. @@ -633,6 +666,7 @@ email_notifications.onmention=Solo email su Menzione email_notifications.disable=Disabilita notifiche email email_notifications.submit=Imposta Preferenze Email + [repo] owner=Proprietario repo_name=Nome Repository @@ -655,6 +689,7 @@ use_template=Usa questo modello generate_repo=Genera repository generate_from=Genera da repo_desc=Descrizione +repo_desc_helper=Inserisci una breve descrizione (opzionale) repo_lang=Lingua repo_gitignore_helper=Seleziona i template di .gitignore. issue_labels=Etichette Issue @@ -663,7 +698,10 @@ license=Licenza license_helper=Seleziona un file di licenza. readme=LEGGIMI readme_helper=Seleziona un template per il file LEGGIMI. +readme_helper_desc=Qui puoi scrivere una descrizione completa del progetto. auto_init=Inizializza Repository (Aggiungi .gitignore, Licenza e LEGGIMI) +trust_model_helper=Seleziona il modello di fiducia per la verifica della firma. Le opzioni possibili sono: +trust_model_helper_collaborator=Collaboratore: Fidati delle firme da parte dei collaboratori create_repo=Crea Repository default_branch=Ramo (Branch) predefinito mirror_prune=Rimuovi @@ -671,7 +709,6 @@ mirror_prune_desc=Rimuovi i riferimenti di puntamento-remoto obsoleti mirror_interval=Intervallo del Mirror (unità di tempo valide 'h', 'm', 's'). 0 per disabilitare la sincronizzazione automatica. mirror_interval_invalid=L'intervallo di aggiornamento dei mirror non è valido. mirror_address=Clona da URL -mirror_address_desc=Inserisci le credenziali richieste nella scheda Clone sezione Autorizzazione. mirror_address_url_invalid=L'url fornito non è valido. Devi effettuare l'escape completo tutti i componenti dell'Url. mirror_address_protocol_invalid=L'url fornito non è valido. Solo dai link http(s):// o git:// possono essere replicate. mirror_last_synced=Ultima sincronizzazione @@ -692,6 +729,12 @@ delete_preexisting=Elimina file preesistenti delete_preexisting_content=Elimina file in %s delete_preexisting_success=Eliminato file non adottati in %s +transfer.accept=Accetta trasferimento +transfer.accept_desc=Trasferisci a "%s" +transfer.reject=Rifiuta trasferimento +transfer.reject_desc=Annulla il trasferimento a "%s" +transfer.no_permission_to_accept=Non hai i permessi per accettare + desc.private=Privato desc.public=Pubblico desc.private_template=Modello privato @@ -715,11 +758,9 @@ archive.title=Questo repository è archiviato. Puoi vedere i file e clonarli, ma archive.issue.nocomment=Questo repository è archiviato. Non puoi commentare i problemi. archive.pull.nocomment=Questo repository è archiviato. Non puoi commentare le richieste di pull. -form.reach_limit_of_creation=Hai già raggiunto il tuo limite %d repository. form.name_reserved=Il nome repository '%s' è riservato. form.name_pattern_not_allowed=Il modello '%s' non è consentito come nome di un repository. -need_auth=Autorizzazione clone migrate_options=Opzioni di migrazione migrate_service=Servizio migrazione migrate_options_mirror_helper=Questo repository sarà un mirror @@ -739,16 +780,12 @@ migrate.clone_local_path=o un percorso del server locale migrate.permission_denied=Non è consentito importare repository locali. migrate.invalid_local_path=Percorso locale non valido, non esiste o non è una cartella. migrate.failed=Migrazione non riuscita: %v -migrate.lfs_mirror_unsupported=La duplicazione di oggetti LFS non è supportata - usa ' git lfs fetch --all e 'git lfs push --all' invece. migrate.migrate_items_options=Il Token di accesso è richiesto per migrare elementi aggiuntivi migrated_from=Migrato da %[2]s migrated_from_fake=Migrato da %[1]s migrate.migrate=Migra da %s migrate.migrating=Migrazione da %s... migrate.migrating_failed=Migrazione da %s fallita. -migrate.github.description=Migrazione dati da Github.com o Github Enterprise. -migrate.git.description=Migrazione o Mirroring dei dati git dai servizi Git -migrate.gitlab.description=Migrazione dei dati dal server gitlab di GitLab.com o Self-Hosted. mirror_from=mirror da forked_from=forkato da @@ -793,9 +830,12 @@ org_labels_desc_manage=gestisci milestones=Traguardi commits=Commit commit=Commit +release=Rilascio releases=Rilasci +tag=Etichetta file_raw=Originale file_history=Cronologia +file_view_source=Visualizza sorgente file_view_raw=Vedi originale file_permalink=Permalink file_too_large=Il file è troppo grande per essere visualizzato. @@ -804,6 +844,7 @@ audio_not_supported_in_browser=Il tuo browser non supporta il tag "video" di HTM stored_lfs=Memorizzati con Git LFS symbolic_link=Link Simbolico commit_graph=Grafico dei commit +commit_graph.select=Seleziona rami commit_graph.monochrome=Mono commit_graph.color=Colore blame=Blame @@ -855,7 +896,9 @@ editor.file_already_exists=Un file di nome '%s' esiste già in questo repository editor.commit_empty_file_header=Commit di un file vuoto editor.commit_empty_file_text=Il file che stai per effettuare il commit è vuoto. Procedere? editor.no_changes_to_show=Non ci sono cambiamenti da mostrare. +editor.fail_to_update_file_summary=Messaggio d'errore: editor.push_rejected_no_message=La modifica è stata rifiutata dal server senza un messaggio. Controlla githooks. +editor.push_rejected=La modifica è stata rifiutata dal server. Controlla githook. editor.add_subdir=Aggiungi una directory… editor.unable_to_upload_files=Impossibile caricare i file su '%s' con errore:%v editor.upload_file_is_locked=Il file '%s' è bloccato da %s. @@ -886,7 +929,8 @@ ext_issues=Issue esterne ext_issues.desc=Collegamento al puntatore di una issue esterna. projects=Progetti -projects.desc=Gestisci problemi e fai il pull nelle schede di progetto. +projects.description=Descrizione (opzionale) +projects.description_placeholder=Descrizione projects.create=Crea un progetto projects.title=Titolo projects.new=Nuovo progetto @@ -910,6 +954,7 @@ projects.board.edit_title=Nuovo Nome Della Scheda projects.board.new_title=Nuovo Nome Della Scheda projects.board.new_submit=Invia projects.board.new=Nuova Scheda +projects.board.set_default=Imposta come predefinito projects.board.delete=Elimina Scheda projects.board.deletion_desc=L'eliminazione di una scheda di progetto sposta tutti i problemi correlati a 'Uncategorized'. Continuare? projects.open=Apri @@ -988,6 +1033,7 @@ issues.filter_type.all_issues=Tutti i problemi issues.filter_type.assigned_to_you=Assegnati a te issues.filter_type.created_by_you=Creati da te issues.filter_type.mentioning_you=Che ti riguardano +issues.filter_type.review_requested=Richiesta revisione issues.filter_sort=Ordina issues.filter_sort.latest=Più recenti issues.filter_sort.oldest=Più vecchi @@ -1008,7 +1054,7 @@ issues.action_milestone=Pietra Miliare issues.action_milestone_no_select=Nessuna pietra miliare issues.action_assignee=Assegnatario issues.action_assignee_no_select=Nessun assegnatario -issues.opened_by=aperto %[1]s da %[3]s +issues.opened_by=aperto %[1]s da %[3]s issues.closed_by=del %[3]s chiuso %[1]s issues.closed_by_fake=della %[2]s chiusa %[1]s issues.previous=Pagina precedente @@ -1024,7 +1070,6 @@ issues.context.edit=Modifica issues.context.delete=Elimina issues.no_content=Non ci sono ancora contenuti. issues.close_issue=Chiudi -issues.pull_merged_at=`merged commit %[2]s in %[3]s %[4]s` issues.close_comment_issue=Commenta e Chiudi issues.reopen_issue=Riapri issues.reopen_comment_issue=Commenta e Riapri @@ -1090,12 +1135,11 @@ issues.lock.title=Blocca la conversazione su questa issue. issues.unlock.title=Sblocca la conversazione su questa issue. issues.comment_on_locked=Non puoi commentare un problema bloccato. issues.tracker=Cronografo -issues.start_tracking_short=Inizio issues.start_tracking=Avvia cronografo issues.start_tracking_history='ha iniziato a lavorare %s` issues.tracker_auto_close=Il timer verrà interrotto automaticamente una volta che il problema verrá chiuso -issues.stop_tracking=Interrompi issues.stop_tracking_history=`ha smesso di funzionare %s` +issues.cancel_tracking_history=`ha cancellato il cronografo %s` issues.add_time=Aggiungi Tempo manualmente issues.add_time_short=Aggiungi tempo issues.add_time_cancel=Annulla @@ -1104,8 +1148,6 @@ issues.del_time_history=`tempo trascorso eliminato %s` issues.add_time_hours=Ore issues.add_time_minutes=Minuti issues.add_time_sum_to_small=Non è stato inserito alcun tempo. -issues.cancel_tracking=Annulla -issues.cancel_tracking_history=`ha cancellato il cronografo %s` issues.time_spent_total=Tempo totale trascorso issues.time_spent_from_all_authors=`Totale tempo trascorso: %s` issues.due_date=Data di scadenza @@ -1114,7 +1156,6 @@ issues.error_modifying_due_date=Impossibile modificare la data di scadenza. issues.error_removing_due_date=Impossibile rimuovere la data di scadenza. issues.push_commit_1=aggiunto %d commit %s issues.push_commits_n=aggiunto %d commit %s -issues.force_push_codes=`force-pushed %[1]s da %[2]s a %[4]s %[6]s` issues.due_date_form=yyyy-mm-dd issues.due_date_form_add=Aggiungi data di scadenza issues.due_date_form_edit=Modifica @@ -1135,8 +1176,6 @@ issues.dependency.remove=Rimuovi issues.dependency.remove_info=Rimuovi questa dipendenza issues.dependency.added_dependency=`ha aggiunto una nuova dipendenza %s` issues.dependency.removed_dependency=`ha rimosso una dipendenza %s` -issues.dependency.issue_closing_blockedby=La chiusura di questa richiesta pull è bloccata per i seguenti problemi -issues.dependency.pr_closing_blockedby=La chiusura di questo problema è bloccata per i seguenti problemi issues.dependency.issue_close_blocks=Questo problema impedisce la chiusura dei seguenti problemi issues.dependency.pr_close_blocks=Questa richiesta di pull impedisce la chiusura dei seguenti problemi issues.dependency.issue_close_blocked=Devi chiudere tutte le anomalie che bloiccano questo problema prima di chiudelo. @@ -1176,6 +1215,7 @@ issues.review.un_resolve_conversation=Segnala la conversazione come non risolta issues.review.resolved_by=ha contrassegnato questa conversazione come risolta issues.assignee.error=Non tutte le assegnazioni sono state aggiunte a causa di un errore imprevisto. + pulls.desc=Attiva pull request e revisioni di codice. pulls.new=Nuova Pull Request pulls.compare_changes=Nuova Pull Request @@ -1197,10 +1237,10 @@ pulls.reopen_to_merge=Riapri questa pull request per effettuare l'unione. pulls.cant_reopen_deleted_branch=Questa pull request non può essere riaperta perché il branch è stato eliminato. pulls.merged=Unito pulls.merged_as=La pull request è stata unita come %[2]s. +pulls.manually_merged=Unito manualmente pulls.is_closed=La pull request è stata chiusa. pulls.has_merged=La pull request è stata unita. pulls.title_wip_desc=`Inizia il titolo con %s per evitare che la pull request venga unita accidentalmente.` -pulls.cannot_merge_work_in_progress=Questa pull request è contrassegnata come un lavoro in corso. Rimuovi il prefisso %s dal titolo quando è pronta pulls.data_broken=Questa pull request è rovinata a causa di informazioni mancanti del fork. pulls.files_conflicted=Questa pull request ha modifiche in conflitto con il branch di destinazione. pulls.is_checking=Verifica dei conflitti di merge in corso. Riprova tra qualche istante. @@ -1227,12 +1267,9 @@ pulls.no_merge_helper=Attiva le opzioni di merge nelle impostazioni del reposito pulls.no_merge_wip=Questa pull request non può essere unita perché è contrassegnata come un lavoro in corso. pulls.no_merge_not_ready=Questa pull request non è pronta per il merge, controlla lo stato della revisione e i controlli di stato. pulls.no_merge_access=Non sei autorizzato ad effettuare il merge su questa pull request. -pulls.merge_pull_request=Unisci Pull Request -pulls.rebase_merge_pull_request=Fai rebase e unisci -pulls.rebase_merge_commit_pull_request=Rebase e Merge (--no-ff) -pulls.squash_merge_pull_request=Fai squash e unisci pulls.require_signed_wont_sign=Il branch richiede commit firmati ma questo merge non verrà firmato pulls.invalid_merge_option=Non puoi utilizzare questa opzione di merge per questa pull request. +pulls.merge_conflict_summary=Messaggio d'errore ; %[2]s
    %[3]s
    pulls.unrelated_histories=Unione fallita: gli Head del ramo da unire e la base non condividono una storia cronologica in comune. Suggerimento: prova una strategia diversa pulls.merge_out_of_date=Unione fallita: Durante la generazione del merge, la base è stata aggiornata. Suggerimento: Riprova. @@ -1353,7 +1390,7 @@ activity.closed_issues_count_1=Issue chiusa activity.closed_issues_count_n=Issue chiuse activity.title.issues_1=%d Issue activity.title.issues_n=%d Issue -activity.title.issues_closed_by=%s chiusa da %s +activity.title.issues_closed_from=%s chiusa da %s activity.title.issues_created_by=%s creata da %s activity.closed_issue_label=Chiusa activity.new_issues_count_1=Nuova issue @@ -1391,6 +1428,7 @@ activity.git_stats_deletion_n=%d cancellazioni search=Ricerca search.search_repo=Ricerca repository +search.fuzzy=Fuzzy search.results=Risultati della ricerca per "%s" in %s settings=Impostazioni @@ -1458,9 +1496,11 @@ settings.convert_fork_confirm=Converti Repository settings.convert_fork_succeed=Il fork è stato convertito in un repository regolare. settings.transfer=Trasferisci proprietà settings.transfer_desc=Trasferisci questo repository a un altro utente o a un'organizzazione nella quale hai diritti d'amministratore. +settings.transfer_form_title=Inserisci il nome del repository come conferma: settings.transfer_notices_1=-Si perderà l'accesso al repository se lo si trasferisce ad un utente singolo. settings.transfer_notices_2=-Si manterrà l'accesso al repository se si trasferisce in un'organizzazione che possiedi (o condividi con qualcun'altro). -settings.transfer_form_title=Inserisci il nome del repository come conferma: +settings.transfer_owner=Nuovo Proprietario +settings.transfer_succeed=Il repository è stato trasferito. settings.signing_settings=Impostazioni Verifica Firma settings.trust_model=Modello di Fiducia per la Firma settings.trust_model.default=Modello Di Fiducia Predefinito @@ -1481,9 +1521,6 @@ settings.delete_notices_2=-Questa operazione eliminerà definitivamente il repos settings.delete_notices_fork_1=-I fork di questo repository diventeranno indipendenti dopo la cancellazione. settings.deletion_success=Il repository è stato eliminato. settings.update_settings_success=Le impostazioni del repository sono state aggiornate. -settings.transfer_owner=Nuovo Proprietario -settings.make_transfer=Esegui trasferimento -settings.transfer_succeed=Il repository è stato trasferito. settings.confirm_delete=Elimina repository settings.add_collaborator=Aggiungi collaboratore settings.add_collaborator_success=Il collaboratore è stato aggiunto. @@ -1565,7 +1602,6 @@ settings.event_pull_request_label=Pull Request etichettata settings.event_pull_request_label_desc=Etichette Pull request aggiornate o cancellate. settings.event_pull_request_sync_desc=Pull request sincronizzata. settings.branch_filter=Filtro branch -settings.branch_filter_desc=Whitelist branch per gli eventi di push, creazione e cancellazione del ramo, specificati con un pattern globale. Se vuoto o *, gli eventi per tutti i rami vengono segnalati. Vedi github.com/gobwas/glob documentazione per la sintassi. Esempi: master, {master,release*}. settings.active=Attivo settings.active_helper=Le informazioni sugli eventi innescati saranno inviate a questo URL del webhook. settings.add_hook_success=Il webhook è stato aggiunto. @@ -1706,7 +1742,9 @@ diff.whitespace_ignore_all_whitespace=Ignora spazi bianchi quando confronti le l diff.whitespace_ignore_amount_changes=Ignora cambiamenti di quantità di spazi bianchi diff.whitespace_ignore_at_eol=Ignora cambiamenti di spazi bianchi alla fine delle linee diff.stats_desc=%d ha cambiato i file con %d aggiunte e %d eliminazioni +diff.stats_desc_file=%d modifiche: %d aggiunte e %d cancellazioni diff.bin=BIN +diff.bin_not_shown=File binario non mostrato. diff.view_file=Vedi File diff.file_before=Prima diff.file_after=Dopo @@ -1728,13 +1766,16 @@ diff.review.comment=Commentare diff.review.approve=Approva diff.review.reject=Richiedi cambiamenti diff.committed_by=committato da +diff.protected=Protetto releases.desc=Tenere traccia di versioni e download del progetto. release.releases=Rilasci +release.detail=Dettagli rilascio release.new_release=Nuovo Rilascio release.draft=Bozza release.prerelease=Pre-Rilascio release.stable=Stabile +release.compare=Confronta release.edit=modifica release.source_code=Codice Sorgente release.new_subheader=Le release organizzano le versioni del progetto. @@ -1753,6 +1794,7 @@ release.edit_release=Aggiorna release release.delete_release=Elimina release release.deletion=Elimina release release.deletion_success=La release è stata eliminata. +release.deletion_tag_success=L'etichetta è stata eliminata. release.tag_name_already_exist=Una release con questo nome tag esiste già. release.tag_name_invalid=Il nome tag non è valido. release.downloads=Download @@ -1783,11 +1825,13 @@ branch.download=Scarica Branch '%s' branch.included_desc=Questo ramo fa parte del ramo predefinito branch.included=Incluso + topic.manage_topics=Gestisci argomenti topic.done=Fatto topic.count_prompt=Non puoi selezionare più di 25 argomenti topic.format_prompt=Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri. + [org] org_name_holder=Nome dell'Organizzazione org_full_name_holder=Nome completo dell'organizzazione @@ -1901,8 +1945,6 @@ dashboard=Pannello di Controllo users=Account utenti organizations=Organizzazioni repositories=Repository -hooks=Webhook predefiniti -systemhooks=Webhooks di Sistema authentication=Fonti di autenticazione emails=Email Utente config=Configurazione @@ -1933,7 +1975,6 @@ dashboard.cron.error=Errore in Cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s ha finito dashboard.delete_inactive_accounts=Elimina tutti gli account non attivati dashboard.delete_inactive_accounts.started=Attività di eliminazione degli account non attivati iniziata. -dashboard.delete_repo_archives=Elimina tutti gli archivi dei repository dashboard.delete_repo_archives.started=Attività di eliminazione degli archivi del repository iniziata. dashboard.delete_missing_repos=Elimina tutti i repository mancanti dei loro file Git dashboard.delete_missing_repos.started=Elimina tutti i repository mancanti dei loro file Git. @@ -2042,10 +2083,8 @@ repos.forks=Fork repos.issues=Problemi repos.size=Dimensione -hooks.desc=I Webhooks effettuano automaticamente richieste HTTP POST ad un server quando si verificano determinati eventi Gitea. I Webhooks definiti qui sono predefiniti e verranno copiati in tutti le nuove repository. Per saperne di più leggi la guida ai webhooks. -hooks.add_webhook=Aggiungi Webhook predefinito -hooks.update_webhook=Aggiorna Webhook predefinito +systemhooks=Webhooks di Sistema systemhooks.add_webhook=Aggiungi Webhook di Sistema systemhooks.update_webhook=Aggiorna Webhook di Sistema @@ -2064,7 +2103,6 @@ auths.host=Host auths.port=Porta auths.bind_dn=Binda DN auths.bind_password=Binda Password -auths.bind_password_helper=Attenzione: La password è memorizzata in testo normale. Se possibile, utilizzare un account di sola lettura. auths.user_base=Base ricerca utente auths.user_dn=DN dell'utente auths.attribute_username=Attributo nome utente @@ -2092,10 +2130,10 @@ auths.smtphost=Host SMTP auths.smtpport=Porta SMTP auths.allowed_domains=Domini consentiti auths.allowed_domains_helper=Lasciare vuoto per ammettere tutti i domini. Separare più domini con una virgola (','). -auths.enable_tls=Abilitare Crittografia TLS auths.skip_tls_verify=Salta verifica TLS auths.pam_service_name=Nome del Servizio PAM auths.oauth2_provider=OAuth2 Provider +auths.oauth2_icon_url=URL icona auths.oauth2_clientID=ID Client (Chiave) auths.oauth2_clientSecret=Segreto del client auths.openIdConnectAutoDiscoveryURL=OpenID Connect Auto Discovery URL @@ -2265,7 +2303,6 @@ config.git_gc_timeout=Timeout operazione GC config.log_config=Configurazione Log config.log_mode=Modalità Log -config.macaron_log_mode=Modalitá log macaron config.own_named_logger=Logger con nome config.routes_to_default_logger=Usa il Logger di default config.go_log=Usa Go Log (redirezionato di default) @@ -2367,7 +2404,6 @@ comment_issue=`ha commentato il problema %s#%[2]s` comment_pull=`commentato la pull request %s#%[2]s` merge_pull_request=`unita pull request %s#%[2]s` transfer_repo=repository %s trasferito in %s -push_tag=pushato il tag %[2]s to %[3]s delete_tag=tag eliminato %[2]s da %[3]s delete_branch=branch eliminato %[2]s da %[3]s compare_branch=Confronta @@ -2379,6 +2415,7 @@ mirror_sync_delete=riferimento sincronizzato ed eliminato %[2]s a < approve_pull_request=`approvato %s#%[2]s` reject_pull_request=`modifiche suggerite per %s#%[2]s` publish_release=`rilasciata tag %[4]s a %[3]s` +review_dismissed_reason=Motivo: [tool] ago=%s fa diff --git a/options/locale/locale_ja-JP.ini b/options/locale/locale_ja-JP.ini index fdd5e4561..affbb76b5 100644 --- a/options/locale/locale_ja-JP.ini +++ b/options/locale/locale_ja-JP.ini @@ -15,6 +15,7 @@ page=ページ template=テンプレート language=言語 notifications=通知 +active_stopwatch=進行中のタイムトラッカー create_new=作成… user_profile_and_more=プロフィールと設定… signed_in_as=サインイン済み @@ -72,15 +73,17 @@ forks=フォーク activities=アクティビティ pull_requests=プルリクエスト -issues=課題 +issues=イシュー milestones=マイルストーン +ok=OK cancel=キャンセル save=保存 add=追加 add_all=すべて追加 remove=除去 remove_all=すべて除去 +edit=編集 write=書き込み preview=プレビュー @@ -89,11 +92,16 @@ loading=読み込み中… step1=ステップ 1: step2=ステップ 2: +error=エラー error404=アクセスしようとしたページは存在しないか、閲覧が許可されていません。 +never=無し + [error] occurred=エラーが発生しました report_message=Giteaのバグが疑われる場合は、GitHubでIssueを検索して、見つからなければ新しいIssueを作成してください。 +missing_csrf=不正なリクエスト: CSRFトークンが不明です +invalid_csrf=不正なリクエスト: CSRFトークンが無効です [startpage] app_desc=自分で立てる、超簡単 Git サービス @@ -203,6 +211,8 @@ default_enable_timetracking=デフォルトでタイムトラッキング有効 default_enable_timetracking_popup=新しいリポジトリのタイムトラッキングをデフォルトで有効にします。 no_reply_address=メールを隠すときのドメイン no_reply_address_helper=メールアドレスを隠しているユーザーに使用するドメイン名。 例えば 'noreply.example.org' と設定した場合、ユーザー名 'joe' はGitに 'joe@noreply.example.org' としてログインすることになります。 +password_algorithm=パスワードハッシュアルゴリズム +password_algorithm_helper=パスワードハッシュアルゴリズムを設定します。 アルゴリズムにより動作要件と強度が異なります。 `argon2`は良い特性を備えていますが、多くのメモリを使用するため小さなシステムには適さない場合があります。 [home] uname_holder=ユーザー名またはメールアドレス @@ -236,6 +246,8 @@ users=ユーザー organizations=組織 search=検索 code=コード +search.fuzzy=あいまい +search.match=一致 repo_no_results=一致するリポジトリが見つかりません。 user_no_results=一致するユーザーが見つかりません。 org_no_results=一致する組織が見つかりません。 @@ -293,7 +305,8 @@ openid_connect_desc=選択したOpenID URIは未登録です。 ここで新し openid_register_title=アカウント新規作成 openid_register_desc=選択したOpenID URIは未登録です。 ここで新しいアカウントと関連付けます。 openid_signin_desc=あなたのOpenID URIを入力してください。 例: https://anne.me、bob.openid.org.cn、nusocial.net/carry -disable_forgot_password_mail=アカウント回復機能は無効になっています。 サイト管理者にお問い合わせください。 +disable_forgot_password_mail=メール送信設定が無いためアカウントの回復は無効になっています。 サイト管理者にお問い合わせください。 +disable_forgot_password_mail_admin=アカウントの回復はメール送信が設定済みの場合だけ使用できます。 アカウントの回復を有効にするにはメール送信を設定してください。 email_domain_blacklisted=あなたのメールアドレスでは登録することはできません。 authorize_application=アプリケーションを許可 authorize_redirect_notice=このアプリケーションを許可すると %s にリダイレクトします。 @@ -307,11 +320,64 @@ password_pwned=あなたが選択したパスワードは、過去の情報漏 password_pwned_err=HaveIBeenPwnedへのリクエストを完了できませんでした [mail] +view_it_on=%s で見る +link_not_working_do_paste=開かないですか? コピーしてブラウザーに貼り付けてみてください。 +hi_user_x=こんにちは、%s さん。 + activate_account=あなたのアカウントをアクティベートしてください。 +activate_account.title=%s さん、アカウントをアクティベートしてください +activate_account.text_1=こんにちは、%[1]s さん。 %[2]s へのご登録ありがとうございます! +activate_account.text_2=あなたのアカウントを有効化するため、%s以内に次のリンクをクリックしてください: + activate_email=メール アドレスを確認します -reset_password=アカウントを回復 -register_success=登録が完了しました +activate_email.title=%s さん、メールアドレス確認をお願いします +activate_email.text=あなたのメールアドレスを確認するため、%s以内に次のリンクをクリックしてください: + register_notify=Giteaへようこそ +register_notify.title=%[1]s さん、%[2]s にようこそ +register_notify.text_1=これは %s への登録確認メールです! +register_notify.text_2=あなたはユーザー名 %s でログインできるようになりました。 +register_notify.text_3=このアカウントがあなたに作成されたものであれば、最初にパスワードを設定してください。 + +reset_password=アカウントを回復 +reset_password.title=%s さん、あなたのアカウントの回復がリクエストされました +reset_password.text=あなたのアカウントを回復するには、%s以内に次のリンクをクリックしてください: + +register_success=登録が完了しました + +issue_assigned.pull=リポジトリ %[3]s で @%[1]s さんが、あなたをプルリクエスト %[2]s の担当者にしました。 +issue_assigned.issue=リポジトリ %[3]s で @%[1]s さんが、あなたをイシュー %[2]s の担当者にしました。 + +issue.x_mentioned_you=@%s さんが、あなたにメンションしました: +issue.action.force_push=%[1]s さんが %[2]s に強制プッシュしました。(%[3]s から %[4]s へ) +issue.action.push_1=@%[1]s さんが %[2]s にコミット%[3]d件をプッシュしました。 +issue.action.push_n=@%[1]s さんが %[2]s にコミット%[3]d件をプッシュしました。 +issue.action.close=@%[1]s さんが #%[2]d をクローズしました。 +issue.action.reopen=@%[1]s さんが #%[2]d を再オープンしました。 +issue.action.merge=@%[1]s さんが #%[2]d を %[3]s にマージしました。 +issue.action.approve=@%[1]s さんがプルリクエストを承認しました。 +issue.action.reject=@%[1]s さんがプルリクエストに変更を要請しました。 +issue.action.review=@%[1]s さんがプルリクエストにコメントしました。 +issue.action.review_dismissed=@%[1]s さんが、プルリクエストに対する %[2]s さんの最新レビューを棄却しました。 +issue.action.ready_for_review=@%[1]s さんが、プルリクエストをレビュー可能な状態にしました。 +issue.action.new=@%[1]s さんが #%[2]d を作成しました。 +issue.in_tree_path=%s: + +release.new.subject=%[2]s の %[1]s がリリースされました +release.new.text=@%[1]s さんが %[3]s で %[2]s をリリースしました +release.title=タイトル: %s +release.note=リリースノート: +release.downloads=ダウンロード: +release.download.zip=ソースコード (ZIP) +release.download.targz=ソースコード (TAR.GZ) + +repo.transfer.subject_to=%s が "%s" を %s に移転しようとしています +repo.transfer.subject_to_you=%s が "%s" をあなたに移転しようとしています +repo.transfer.to_you=あなた +repo.transfer.body=承認または拒否するには %s を開きます。 もしくは単に無視してもかまいません。 + +repo.collaborator.added.subject=%s が %s にあなたを追加しました +repo.collaborator.added.text=あなたは次のリポジトリの共同作業者に追加されました: [modal] yes=はい @@ -352,12 +418,14 @@ email_error=`は有効なメールアドレスではありません。` url_error=`は有効なURLではありません。` include_error=`は文字列 '%s' を含んでいる必要があります。` glob_pattern_error=`のglobパターンが不正です: %s.` +regex_pattern_error=`の正規表現パターンが不正です: %s.` unknown_error=不明なエラー: captcha_incorrect=CAPTCHAコードが正しくありません。 password_not_match=パスワードが一致しません。 lang_select_error=言語をリストから選択してください。 username_been_taken=ユーザー名が既に使用されています。 +username_change_not_local_user=非ローカルユーザーのユーザー名は変更できません。 repo_name_been_taken=リポジトリ名が既に使用されています。 repository_files_already_exist=このリポジトリのファイルはすでに存在します。システム管理者に問い合わせてください。 repository_files_already_exist.adopt=このリポジトリのファイルはすでに存在しており、それらを登録することしかできません。 @@ -378,6 +446,7 @@ password_uppercase_one=最低1文字の大文字 password_digit_one=最低1文字の数字 password_special_one=最低1文字の英字記号 (句読点、括弧、引用符、etc.) enterred_invalid_repo_name=入力したリポジトリ名が間違っています。 +enterred_invalid_org_name=入力した Organization の名前が間違っています。 enterred_invalid_owner_name=新しいオーナーの名前が正しくありません。 enterred_invalid_password=入力されたパスワードが間違っています。 user_not_exist=指定されたユーザーは存在しません。 @@ -404,6 +473,7 @@ repositories=リポジトリ activity=公開アクティビティ followers=フォロワー starred=スター付きリポジトリ +watched=ウォッチ中リポジトリ projects=プロジェクト following=フォロー中 follow=フォロー @@ -447,6 +517,7 @@ update_language_not_found=言語 '%s' は利用できません。 update_profile_success=プロフィールを更新しました。 change_username=ユーザー名を変更しました。 change_username_prompt=注: ユーザー名を変更すると、アカウントのURLも変わります。 +change_username_redirect_prompt=古いユーザー名は、再使用されていない限りリダイレクトします。 continue=続行 cancel=キャンセル language=言語 @@ -517,14 +588,27 @@ ssh_helper=ヘルプが必要ですか? GitHubのガイドを gpg_helper=ヘルプが必要ですか? GitHubのガイドをご覧ください: GPGについて add_new_key=SSHキーの追加 add_new_gpg_key=GPGキーの追加 -key_content_ssh_placeholder=先頭は次のいずれか 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=先頭は次のいずれか 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', or 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=先頭は '-----BEGIN PGP PUBLIC KEY BLOCK-----' add_new_principal=プリンシパルを追加 ssh_key_been_used=このSSHキーは既にサーバーに追加されています。 ssh_key_name_used=同じ名前のSSHキーが既にアカウントに存在しています。 ssh_principal_been_used=このプリンシパルは既にサーバーに追加されています。 gpg_key_id_used=同じIDを持つGPG公開鍵が既に存在しています。 -gpg_no_key_email_found=このGPGキーは、あなたのアカウントに関連付けられたどのメールアドレスでも使用できません。 +gpg_no_key_email_found=あなたのアカウントに関連付けられているアクティベート済みメールアドレスとGPG鍵が一致しません。 指定したトークンに署名すれば、まだ追加される余地はあります。 +gpg_key_matched_identities=一致したID: +gpg_key_matched_identities_long=次のアクティベート済みメールアドレスが、鍵に埋め込まれているIDと一致しています。 これらのメールアドレスに一致するコミットは、この鍵を使用して検証することができます。 +gpg_key_verified=確認済みの鍵 +gpg_key_verified_long=鍵はトークンを使用して確認済みです。 鍵のIDに一致するコミットだけでなく、このユーザーのいずれかのアクティベート済みメールアドレスに一致するコミットについても、この鍵を使用して検証することができます。 +gpg_key_verify=確認 +gpg_invalid_token_signature=入力されたGPG鍵、署名、トークンが合致しないか、トークンが古いです。 +gpg_token_required=以下のトークンの署名を入力する必要があります +gpg_token=トークン +gpg_token_help=署名はこの方法で生成できます: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature=Armor形式のGPG署名 +key_signature_gpg_placeholder=先頭は '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=GPG鍵 '%s' を確認しました。 subkeys=サブキー key_id=キーID key_name=キー名 @@ -623,6 +707,7 @@ or_enter_secret=またはシークレット文字列を入力: %s then_enter_passcode=次に、アプリケーションに表示されているパスコードを入力します。 passcode_invalid=パスコードが間違っています。 再度お試しください。 twofa_enrolled=あなたのアカウントに2要素認証が設定されました。 スクラッチトークン (%s) は一度しか表示しませんので安全な場所に保存してください! +twofa_failed_get_secret=シークレットが取得できません。 u2f_desc=セキュリティキーは暗号化キーを内蔵するハードウェア ・ デバイスで、2要素認証に使用できます。 セキュリティキーはFIDO U2F規格をサポートしている必要があります。 u2f_require_twofa=セキュリティキーを使用するには、アカウントに2要素認証を設定する必要があります。 @@ -644,6 +729,7 @@ repos_none=あなたはリポジトリを所有していません。 delete_account=アカウントを削除 delete_prompt=この操作により、あなたのユーザーアカウントは恒久的に抹消されます。 取り消すことはできません。 +delete_with_all_comments=あなたのアカウントは作成からまだ %s 経過していません。 幽霊コメント回避のため、イシューやPRのすべてのコメントは一緒に削除されます。 confirm_delete_account=削除の続行 delete_account_title=ユーザーアカウントの削除 delete_account_desc=このユーザーアカウントを恒久的に削除してもよろしいですか? @@ -653,11 +739,20 @@ email_notifications.onmention=メンションのみメール通知 email_notifications.disable=メール通知無効 email_notifications.submit=メール設定を保存 +visibility=ユーザーの公開範囲 +visibility.public=パブリック +visibility.public_tooltip=すべてのユーザーに表示します +visibility.limited=限定 +visibility.limited_tooltip=ログインしているユーザーにのみ表示します +visibility.private=プライベート +visibility.private_tooltip=組織のメンバーにのみ表示します + [repo] +new_repo_helper=リポジトリには、プロジェクトのすべてのファイルとリビジョン履歴が入ります。 すでにほかの場所にありますか? リポジトリを移行 もどうぞ。 owner=オーナー owner_helper=リポジトリ数の上限により、一部の組織はドロップダウンに表示されない場合があります。 repo_name=リポジトリ名 -repo_name_helper=短く、覚えやすく、かつ他と重複しないキーワードを使用するのが良いリポジトリ名です。 +repo_name_helper=リポジトリ名は、短く、覚えやすく、他と重複しないキーワードを使用しましょう。 repo_size=リポジトリサイズ template=テンプレート template_select=テンプレートを選択してください。 @@ -673,29 +768,50 @@ fork_repo=リポジトリをフォーク fork_from=フォーク元 fork_visibility_helper=フォークしたリポジトリの公開/非公開は変更できません。 use_template=このテンプレートを使用 +clone_in_vsc=VSCodeでクローン +download_zip=ZIPファイルをダウンロード +download_tar=TAR.GZファイルをダウンロード +download_bundle=バンドルをダウンロード generate_repo=リポジトリの生成 generate_from=他からの生成 repo_desc=説明 +repo_desc_helper=簡単な説明を入力してください (オプション) repo_lang=言語 repo_gitignore_helper=.gitignoreテンプレートを選択してください。 -issue_labels=課題ラベル -issue_labels_helper=課題のラベルセットを選択 +repo_gitignore_helper_desc=追跡しないファイルの設定を、一般的な言語について用意されたテンプレートから選択します。 .gitignoreには、それぞれの言語のビルドツールが生成するファイルで、よくあるものがデフォルトで含まれています。 +issue_labels=イシューラベル +issue_labels_helper=イシューのラベルセットを選択 license=ライセンス license_helper=ライセンス ファイルを選択してください。 +license_helper_desc=ライセンスにより、他人があなたのコードに対して何ができて何ができないのかを規定します。 どれがプロジェクトにふさわしいか迷っていますか? ライセンス選択サイト も確認してみてください。 readme=README readme_helper=READMEファイル テンプレートを選択してください。 +readme_helper_desc=プロジェクトについての説明をひととおり書く場所です。 auto_init=リポジトリの初期設定 (.gitignore、ライセンスファイル、READMEファイルの追加) +trust_model_helper=署名検証のトラストモデルを選択します。 選択肢は次のとおりです: +trust_model_helper_collaborator=共同作業者: 共同作業者による署名を信頼します +trust_model_helper_committer=コミッター: コミットした人と一致している署名を信頼します +trust_model_helper_collaborator_committer=共同作業者+コミッター: 共同作業者による署名で、コミットした人と一致しているものを信頼します +trust_model_helper_default=デフォルト: このシステムのデフォルトのトラストモデルを使用します create_repo=リポジトリを作成 default_branch=デフォルトブランチ +default_branch_helper=デフォルトブランチはプルリクエストとコードコミットのベースブランチとなります。 mirror_prune=Prune mirror_prune_desc=不要になった古いリモートトラッキング参照を削除 mirror_interval=ミラー間隔 (有効な時間の単位は'h'、'm'、's')。 自動的な同期を無効にする場合は0。 mirror_interval_invalid=ミラー間隔が不正です。 mirror_address=クローンするURL -mirror_address_desc=必要な資格情報は「クローン時の認証」セクションに設定してください。 +mirror_address_desc=必要な資格情報は「認証」セクションに設定してください。 mirror_address_url_invalid=入力したURLは無効です。 URLの構成要素はすべて正しくエスケープする必要があります。 mirror_address_protocol_invalid=入力したURLは無効です。 ミラーできるのは、http(s):// または git:// の場所からだけです。 +mirror_lfs=Large File Storage (LFS) +mirror_lfs_desc=LFS データのミラーリングを有効にする。 +mirror_lfs_endpoint=LFS エンドポイント +mirror_lfs_endpoint_desc=同期するときは、クローンURLをもとにLFSサーバーを決定しようとします。 リポジトリのLFSデータがほかの場所に保存されている場合は、独自のエンドポイントを指定することができます。 mirror_last_synced=前回の同期 +mirror_password_placeholder=(変更なし) +mirror_password_blank_placeholder=(未設定) +mirror_password_help=ユーザー名を変更すると保存されているパスワードは消去されます。 watchers=ウォッチャー stargazers=スターゲイザー forks=フォーク @@ -712,6 +828,14 @@ delete_preexisting_label=削除 delete_preexisting=既存のファイルを削除 delete_preexisting_content=%s のファイルを削除します delete_preexisting_success=%s の未登録ファイルを削除しました +blame_prior=この変更より前のBlameを表示 + +transfer.accept=転送を承認 +transfer.accept_desc="%s" に転送 +transfer.reject=転送を拒否 +transfer.reject_desc="%s" への転送をキャンセル +transfer.no_permission_to_accept=承認を行う権限がありません +transfer.no_permission_to_reject=拒否を行う権限がありません desc.private=プライベート desc.public=公開 @@ -728,28 +852,34 @@ template.git_hooks_tooltip=現在のところ、一度追加したGitフック template.webhooks=Webhook template.topics=トピック template.avatar=アバター -template.issue_labels=課題ラベル +template.issue_labels=イシューラベル template.one_item=最低一つはテンプレート項目を選択する必要があります template.invalid=テンプレートリポジトリを選択する必要があります -archive.title=このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、課題・プルリクエストのオープンはできません。 -archive.issue.nocomment=このリポジトリはアーカイブされています。 課題にコメントを追加することはできません。 +archive.title=このリポジトリはアーカイブされています。 ファイルの閲覧とクローンは可能ですが、プッシュや、イシュー・プルリクエストのオープンはできません。 +archive.issue.nocomment=このリポジトリはアーカイブされています。 イシューにコメントを追加することはできません。 archive.pull.nocomment=このリポジトリはアーカイブされています。 プルリクエストにコメントを追加することはできません。 -form.reach_limit_of_creation=すでにあなたが作成できるリポジトリ数の上限 %d 個に達しています。 +form.reach_limit_of_creation_1=すでにあなたが作成できるリポジトリ数の上限 %d 個に達しています。 +form.reach_limit_of_creation_n=すでにあなたが作成できるリポジトリ数の上限 %d 個に達しています。 form.name_reserved=リポジトリ名 '%s' は予約されています。 form.name_pattern_not_allowed='%s' の形式はリポジトリ名に使用できません。 -need_auth=クローン時の認証 +need_auth=認証 migrate_options=移行オプション migrate_service=移行するサービス migrate_options_mirror_helper=このリポジトリをミラーにする migrate_options_mirror_disabled=サイト管理者はミラーの新規作成を無効にしています。 +migrate_options_lfs=LFS ファイルのマイグレート +migrate_options_lfs_endpoint.label=LFS エンドポイント +migrate_options_lfs_endpoint.description=マイグレーションでは、リモート側のGitをもとにLFSサーバーを決定しようとします。 リポジトリのLFSデータがほかの場所に保存されている場合は、独自のエンドポイントを指定することができます。 +migrate_options_lfs_endpoint.description.local=ローカルサーバーのパスもサポートされています。 +migrate_options_lfs_endpoint.placeholder=クローン URL から派生するには空白のままにしてください。 migrate_items=移行する項目 migrate_items_wiki=Wiki migrate_items_milestones=マイルストーン migrate_items_labels=ラベル -migrate_items_issues=課題 +migrate_items_issues=イシュー migrate_items_pullrequests=プルリクエスト migrate_items_merge_requests=マージリクエスト migrate_items_releases=リリース @@ -758,19 +888,31 @@ migrate.clone_address=移行 / クローンするURL migrate.clone_address_desc=既存リポジトリの、HTTP(S)またはGit形式のクローンURL migrate.clone_local_path=、またはローカルサーバー上のパス migrate.permission_denied=ローカルリポジトリをインポートする権限がありません。 +migrate.permission_denied_blocked=ブロックしているホストからのインポートは禁止されています。 +migrate.permission_denied_private_ip=プライベートIPからのインポートは禁止されています。 migrate.invalid_local_path=ローカルパスが無効です。 存在しないかディレクトリではありません。 +migrate.invalid_lfs_endpoint=LFS エンドポイントが無効です。 migrate.failed=移行に失敗しました: %v -migrate.lfs_mirror_unsupported=LFSオブジェクトのミラーはサポートされていません。 代わりに 'git lfs fetch --all' と 'git lfs push --all' を使ってください。 migrate.migrate_items_options=追加の項目を移行するにはアクセストークンが必要です migrated_from=%[2]sから移行 migrated_from_fake=%[1]sから移行 migrate.migrate=%s からの移行 migrate.migrating=%s から移行しています ... migrate.migrating_failed=%s からの移行が失敗しました。 -migrate.github.description=Github.com または Github Enterprise からデータを移行します。 -migrate.git.description=Gitサービスからgitデータを移行またはミラーを作成します -migrate.gitlab.description=GitLab.com またはセルフホストのgitlabサーバーからデータを移行します。 -migrate.gitea.description=Gitea.comまたはセルフホストのGiteaサーバーからデータを移行します。 +migrate.migrating_failed.error=エラー: %s +migrate.github.description=github.com やその他の Github インスタンスからデータを移行します。 +migrate.git.description=Git サービスからリポジトリのみを移行します。 +migrate.gitlab.description=gitlab.com やその他の GitLab インスタンスからデータを移行します。 +migrate.gitea.description=gitea.com やその他の Gitea インスタンスからデータを移行します。 +migrate.gogs.description=notabug.org やその他の Gogs インスタンスからデータを移行します。 +migrate.onedev.description=code.onedev.io やその他の OneDev インスタンスからデータを移行します。 +migrate.migrating_git=Gitデータ移行中 +migrate.migrating_topics=トピック移行中 +migrate.migrating_milestones=マイルストーン移行中 +migrate.migrating_labels=ラベル移行中 +migrate.migrating_releases=リリース移行中 +migrate.migrating_issues=イシュー移行中 +migrate.migrating_pulls=プルリクエスト移行中 mirror_from=ミラー元 forked_from=フォーク元 @@ -803,9 +945,10 @@ branch=ブランチ tree=ツリー clear_ref=`現在の参照をクリア` filter_branch_and_tag=ブランチまたはタグを絞り込み +find_tag=タグを検索 branches=ブランチ tags=タグ -issues=課題 +issues=イシュー pulls=プルリクエスト project_board=プロジェクト labels=ラベル @@ -821,6 +964,8 @@ tag=タグ released_this=がこれをリリース file_raw=Raw file_history=履歴 +file_view_source=ソースを表示 +file_view_rendered=レンダリング表示 file_view_raw=Rawデータを見る file_permalink=パーマリンク file_too_large=このファイルは大きすぎるため、表示できません。 @@ -862,6 +1007,7 @@ editor.add='%s' を追加 editor.update='%s' を更新 editor.delete='%s' を削除 editor.commit_message_desc=詳細な説明を追加… +editor.signoff_desc=コミットログメッセージの最後にコミッターの Signed-off-by 行を追加 editor.commit_directly_to_this_branch=ブランチ%sへ直接コミットする。 editor.create_new_branch=新しいブランチにコミットしてプルリクエストを作成する。 editor.create_new_branch_np=新しいブランチにコミットする。 @@ -899,6 +1045,7 @@ editor.require_signed_commit=ブランチでは署名されたコミットが必 commits.desc=ソースコードの変更履歴を参照します。 commits.commits=コミット commits.no_commits=共通のコミットはありません。 '%s' と '%s' の履歴はすべて異なっています。 +commits.nothing_to_compare=二つのブランチは同じ内容です。 commits.search=コミットの検索… commits.search.tooltip=キーワード "author:"、"committer:"、"after:"、"before:" を付けて指定できます。 例 "revert author:Alice before:2019-04-01" commits.find=検索 @@ -913,21 +1060,23 @@ commits.signed_by_untrusted_user=信頼できないユーザーによる署名 commits.signed_by_untrusted_user_unmatched=コミッターと一致しない信頼できないユーザーによる署名 commits.gpg_key_id=GPGキーID -ext_issues=外部課題 -ext_issues.desc=外部の課題管理システムへのリンク。 +ext_issues=外部イシュー +ext_issues.desc=外部のイシュートラッカーへのリンク。 projects=プロジェクト -projects.desc=プロジェクトボードで課題とプルを管理します。 +projects.desc=プロジェクトボードでイシューとプルを管理します。 +projects.description=説明 (オプション) +projects.description_placeholder=説明 projects.create=プロジェクトを作成 projects.title=タイトル projects.new=新しいプロジェクト projects.new_subheader=作業の調整・追跡・更新をひとつの場所で行い、プロジェクトの透明性と良好な進捗を維持します。 projects.create_success=プロジェクト '%s' を作成しました。 projects.deletion=プロジェクトの削除 -projects.deletion_desc=プロジェクトを削除し、関連するすべての課題から除去します。続行しますか? +projects.deletion_desc=プロジェクトを削除し、関連するすべてのイシューから除去します。続行しますか? projects.deletion_success=プロジェクトを削除しました。 projects.edit=プロジェクトの編集 -projects.edit_subheader=プロジェクトは課題をまとめ、進捗を管理します。 +projects.edit_subheader=プロジェクトはイシューをまとめ、進捗を管理します。 projects.modify=プロジェクトを更新 projects.edit_success=プロジェクト '%s' を更新しました。 projects.type.none=なし @@ -941,8 +1090,10 @@ projects.board.edit_title=新しいボードの名前 projects.board.new_title=新しいボードの名前 projects.board.new_submit=送信 projects.board.new=新しいボード +projects.board.set_default=デフォルトに設定 +projects.board.set_default_desc=このボードを未分類のイシューやプルリクエストが入るデフォルトのボードに設定します projects.board.delete=ボードを削除 -projects.board.deletion_desc=プロジェクトボードを削除すると、関連するすべての課題が '未分類' に移動します。 続行しますか? +projects.board.deletion_desc=プロジェクトボードを削除すると、関連するすべてのイシューが '未分類' に移動します。 続行しますか? projects.open=オープン projects.close=クローズ @@ -952,7 +1103,7 @@ issues.filter_milestones=マイルストーンの絞り込み issues.filter_projects=プロジェクトの絞り込み issues.filter_labels=ラベルの絞り込み issues.filter_reviewers=レビューアの絞り込み -issues.new=新しい課題 +issues.new=新しいイシュー issues.new.title_empty=タイトルは空にできません issues.new.labels=ラベル issues.new.add_labels_title=ラベル付け @@ -979,9 +1130,9 @@ issues.new.no_reviewers=レビューアなし issues.new.add_reviewer_title=レビュー依頼 issues.choose.get_started=始める issues.choose.blank=デフォルト -issues.choose.blank_about=デフォルトのテンプレートから課題を作成。 +issues.choose.blank_about=デフォルトのテンプレートからイシューを作成。 issues.no_ref=ブランチ/タグ指定なし -issues.create=課題を作成 +issues.create=イシューを作成 issues.new_label=新しいラベル issues.new_label_placeholder=ラベル名 issues.new_label_desc_placeholder=説明 @@ -1020,10 +1171,11 @@ issues.filter_milestone_no_select=すべてのマイルストーン issues.filter_assignee=担当者 issues.filter_assginee_no_select=すべての担当者 issues.filter_type=タイプ -issues.filter_type.all_issues=すべての課題 +issues.filter_type.all_issues=すべてのイシュー issues.filter_type.assigned_to_you=自分が担当 issues.filter_type.created_by_you=自分が作成 issues.filter_type.mentioning_you=自分が関係 +issues.filter_type.review_requested=レビュー依頼あり issues.filter_sort=並べ替え issues.filter_sort.latest=新しい順 issues.filter_sort.oldest=古い順 @@ -1059,24 +1211,26 @@ issues.commented_at=`が %s にコメント` issues.delete_comment_confirm=このコメントを削除してよろしいですか? issues.context.copy_link=リンクをコピー issues.context.quote_reply=引用して返信 +issues.context.reference_issue=新しいイシューから参照 issues.context.edit=編集 issues.context.delete=削除 issues.no_content=まだ内容がありません issues.close_issue=クローズする -issues.pull_merged_at=`がコミット %[2]s%[3]s にマージ %[4]s` +issues.pull_merged_at=`がコミット %[2]s%[3]s にマージ %[4]s` +issues.manually_pull_merged_at=`がコミット %[2]s%[3]s に手動マージ %[4]s` issues.close_comment_issue=コメントしてクローズ issues.reopen_issue=再オープンする issues.reopen_comment_issue=コメントして再オープン issues.create_comment=コメントする -issues.closed_at=`が課題をクローズ %[2]s` -issues.reopened_at=`が課題を再オープン %[2]s` -issues.commit_ref_at=`がコミットでこの課題を参照 %[2]s` -issues.ref_issue_from=`が%[4]s、この課題を参照 %[2]s` +issues.closed_at=`がイシューをクローズ %[2]s` +issues.reopened_at=`がイシューを再オープン %[2]s` +issues.commit_ref_at=`がコミットでこのイシューを参照 %[2]s` +issues.ref_issue_from=`が%[4]s、このイシューを参照 %[2]s` issues.ref_pull_from=`が%[4]s、このプルリクエストを参照 %[2]s` -issues.ref_closing_from=`が%[4]s、プルリクエストがこの課題をクローズするよう参照 %[2]s` -issues.ref_reopening_from=`が%[4]s、プルリクエストがこの課題を再オープンするよう参照 %[2]s` -issues.ref_closed_from=`が%[4]s、この課題をクローズ %[2]s` -issues.ref_reopened_from=`が%[4]s、この課題を再オープン %[2]s` +issues.ref_closing_from=`が%[4]s、プルリクエストがこのイシューをクローズするよう参照 %[2]s` +issues.ref_reopening_from=`が%[4]s、プルリクエストがこのイシューを再オープンするよう参照 %[2]s` +issues.ref_closed_from=`が%[4]s、このイシューをクローズ %[2]s` +issues.ref_reopened_from=`が%[4]s、このイシューを再オープン %[2]s` issues.ref_from=` %[1]s にて` issues.poster=投稿者 issues.collaborator=共同作業者 @@ -1085,6 +1239,8 @@ issues.re_request_review=レビューを再依頼 issues.is_stale=このレビューのあと、このPRに変更がありました issues.remove_request_review=レビュー依頼を取り消し issues.remove_request_review_block=レビュー依頼の取り消しはできません +issues.dismiss_review=レビューを棄却 +issues.dismiss_review_warning=このレビューを棄却してよろしいですか? issues.sign_in_require_desc=サインインしてこの会話に参加。 issues.edit=編集 issues.cancel=キャンセル @@ -1093,12 +1249,12 @@ issues.label_title=ラベル名 issues.label_description=ラベルの説明 issues.label_color=ラベルの色 issues.label_count=ラベル %d件 -issues.label_open_issues=オープン中の課題 %d件 +issues.label_open_issues=オープン中のイシュー %d件 issues.label_edit=編集 issues.label_delete=削除 issues.label_modify=ラベルの編集 issues.label_deletion=ラベルの削除 -issues.label_deletion_desc=ラベルを削除し、すべての課題から除去します。 続行しますか? +issues.label_deletion_desc=ラベルを削除し、すべてのイシューから除去します。 続行しますか? issues.label_deletion_success=ラベルを削除しました。 issues.label.filter_sort.alphabetically=アルファベット順 issues.label.filter_sort.reverse_alphabetically=逆アルファベット順 @@ -1111,32 +1267,35 @@ issues.subscribe=購読する issues.unsubscribe=購読を解除 issues.lock=会話をロック issues.unlock=会話をアンロック -issues.lock.unknown_reason=未定義の理由では課題をロックできません。 -issues.lock_duplicate=課題は二重にロックできません。 -issues.unlock_error=ロックされていない課題をアンロックできません。 +issues.lock.unknown_reason=未定義の理由ではイシューをロックできません。 +issues.lock_duplicate=イシューは二重にロックできません。 +issues.unlock_error=ロックされていないイシューをアンロックできません。 issues.lock_with_reason=が%sのためロックし会話を共同作業者に限定 %s issues.lock_no_reason=がロックして会話を共同作業者に限定 %s issues.unlock_comment=がこの会話をアンロック %s issues.lock_confirm=ロック issues.unlock_confirm=アンロック -issues.lock.notice_1=- 他のユーザーはこの課題に新しいコメントを追加できません。 +issues.lock.notice_1=- 他のユーザーはこのイシューに新しいコメントを追加できません。 issues.lock.notice_2=- あなたとこのリポジトリにアクセスできる共同作業者はまだコメントを残すことができ、そのコメントは他の人も見ることができます。 issues.lock.notice_3=- アンロックはいつでも可能です。 -issues.unlock.notice_1=- 誰でもこの課題にもう一度コメントできるようになります。 +issues.unlock.notice_1=- 誰でもこのイシューにもう一度コメントできるようになります。 issues.unlock.notice_2=- 再びロックすることはいつでも可能です。 issues.lock.reason=ロックする理由 -issues.lock.title=この課題の会話をロックします。 -issues.unlock.title=この課題の会話をアンロックします。 -issues.comment_on_locked=ロックされている課題にコメントはできません。 +issues.lock.title=このイシューの会話をロックします。 +issues.unlock.title=このイシューの会話をアンロックします。 +issues.comment_on_locked=ロックされているイシューにコメントはできません。 issues.tracker=タイムトラッカー -issues.start_tracking_short=開始 +issues.start_tracking_short=タイマー 開始 issues.start_tracking=タイムトラッキングを開始 issues.start_tracking_history=`が作業を開始 %s` -issues.tracker_auto_close=タイマーは、この課題がクローズされると自動的に終了します -issues.tracking_already_started=`別の課題で既にタイムトラッキングを開始しています!` -issues.stop_tracking=停止 +issues.tracker_auto_close=タイマーは、このイシューがクローズされると自動的に終了します +issues.tracking_already_started=`別のイシューで既にタイムトラッキングを開始しています!` +issues.stop_tracking=タイマー 終了 issues.stop_tracking_history=`が作業を終了 %s` +issues.cancel_tracking=中止 +issues.cancel_tracking_history=`がタイムトラッキングを中止 %s` issues.add_time=手で時間を入力 +issues.del_time=このタイムログを削除 issues.add_time_short=時間入力 issues.add_time_cancel=キャンセル issues.add_time_history=`が作業時間を追加 %s` @@ -1144,8 +1303,6 @@ issues.del_time_history=`が作業時間を削除 %s` issues.add_time_hours=時間 issues.add_time_minutes=分 issues.add_time_sum_to_small=時間が入力されていません。 -issues.cancel_tracking=キャンセル -issues.cancel_tracking_history=`がタイムトラッキングを中止 %s` issues.time_spent_total=かかった時間の合計 issues.time_spent_from_all_authors=`かかった時間の合計: %s` issues.due_date=期日 @@ -1154,12 +1311,12 @@ issues.error_modifying_due_date=期日を変更できませんでした。 issues.error_removing_due_date=期日を削除できませんでした。 issues.push_commit_1=が %d コミット追加 %s issues.push_commits_n=が %d コミット追加 %s -issues.force_push_codes=`が %[1]s を %[2]s から %[4]s に強制プッシュ %[6]s` +issues.force_push_codes=`が %[1]s を強制プッシュ ( %[2]s から %[4]s へ ) %[6]s` issues.due_date_form=yyyy-mm-dd issues.due_date_form_add=期日の追加 issues.due_date_form_edit=変更 issues.due_date_form_remove=削除 -issues.due_date_not_writer=課題の期日を変更するには、リポジトリへの書き込み権限が必要です。 +issues.due_date_not_writer=イシューの期日を変更するには、リポジトリへの書き込み権限が必要です。 issues.due_date_not_set=期日は未設定です。 issues.due_date_added=が期日 %s を追加 %s issues.due_date_modified=が期日を %[2]s から %[1]s に変更 %[3]s @@ -1167,7 +1324,7 @@ issues.due_date_remove=が期日 %s を削除 %s issues.due_date_overdue=期日は過ぎています issues.due_date_invalid=期日が正しくないか範囲を超えています。 'yyyy-mm-dd' の形式で入力してください。 issues.dependency.title=依存関係 -issues.dependency.issue_no_dependencies=この課題に依存関係はありません。 +issues.dependency.issue_no_dependencies=このイシューに依存関係はありません。 issues.dependency.pr_no_dependencies=このプルリクエストに依存関係はありません。 issues.dependency.add=依存関係を追加... issues.dependency.cancel=キャンセル @@ -1175,28 +1332,30 @@ issues.dependency.remove=削除 issues.dependency.remove_info=この依存関係を削除 issues.dependency.added_dependency=`が新しい依存関係を追加 %s` issues.dependency.removed_dependency=`が依存関係を削除 %s` -issues.dependency.issue_closing_blockedby=このプルリクエストのクローズは、これらの課題によりブロックされています -issues.dependency.pr_closing_blockedby=この課題のクローズは、これらの課題によりブロックされています -issues.dependency.issue_close_blocks=この課題は、これらの課題のクローズをブロックしています -issues.dependency.pr_close_blocks=このプルリクエストは、これらの課題のクローズをブロックしています -issues.dependency.issue_close_blocked=この課題をクローズするには、ブロックしている課題をすべてクローズする必要があります。 -issues.dependency.pr_close_blocked=このプルリクエストを操作するには、ブロックしている課題をすべてクローズする必要があります。 +issues.dependency.pr_closing_blockedby=このプルリクエストのクローズは、これらのイシューによりブロックされています +issues.dependency.issue_closing_blockedby=このイシューのクローズは、これらのイシューによりブロックされています +issues.dependency.issue_close_blocks=このイシューは、これらのイシューのクローズをブロックしています +issues.dependency.pr_close_blocks=このプルリクエストは、これらのイシューのクローズをブロックしています +issues.dependency.issue_close_blocked=このイシューをクローズするには、ブロックしているイシューをすべてクローズする必要があります。 +issues.dependency.pr_close_blocked=このプルリクエストを操作するには、ブロックしているイシューをすべてクローズする必要があります。 issues.dependency.blocks_short=ブロック対象 issues.dependency.blocked_by_short=依存先 issues.dependency.remove_header=依存関係の削除 -issues.dependency.issue_remove_text=この依存関係を課題から削除します。 続行しますか? +issues.dependency.issue_remove_text=この依存関係をイシューから削除します。 続行しますか? issues.dependency.pr_remove_text=この依存関係をプルリクエストから削除します。 続行しますか? -issues.dependency.setting=課題とプルリクエストの依存関係を有効にする -issues.dependency.add_error_same_issue=依存先を課題自身にすることはできません。 -issues.dependency.add_error_dep_issue_not_exist=依存先の課題が存在していません。 +issues.dependency.setting=イシューとプルリクエストの依存関係を有効にする +issues.dependency.add_error_same_issue=依存先をイシュー自身にすることはできません。 +issues.dependency.add_error_dep_issue_not_exist=依存先のイシューが存在していません。 issues.dependency.add_error_dep_not_exist=依存関係が存在していません。 issues.dependency.add_error_dep_exists=依存関係は既に設定済みです。 -issues.dependency.add_error_cannot_create_circular=2つの課題が互いにブロックする依存関係は作成できません。 -issues.dependency.add_error_dep_not_same_repo=両方とも同じリポジトリの課題にする必要があります。 +issues.dependency.add_error_cannot_create_circular=2つのイシューが互いにブロックする依存関係は作成できません。 +issues.dependency.add_error_dep_not_same_repo=両方とも同じリポジトリのイシューにする必要があります。 issues.review.self.approval=自分のプルリクエストを承認することはできません。 issues.review.self.rejection=自分のプルリクエストに対して修正を要求することはできません。 issues.review.approve=が変更を承認 %s issues.review.comment=がレビュー %s +issues.review.dismissed=が %s のレビューを棄却 %s +issues.review.dismissed_label=棄却 issues.review.left_comment=がコメント issues.review.content.empty=修正を指示するコメントを残す必要があります。 issues.review.reject=が変更を要請 %s @@ -1216,6 +1375,10 @@ issues.review.resolve_conversation=解決済みにする issues.review.un_resolve_conversation=未解決にする issues.review.resolved_by=がこの会話を解決済みにしました issues.assignee.error=予期しないエラーにより、一部の担当者を追加できませんでした。 +issues.reference_issue.body=内容 + +compare.compare_base=基準 +compare.compare_head=比較 pulls.desc=プルリクエストとコードレビューの有効化。 pulls.new=新しいプルリクエスト @@ -1226,6 +1389,7 @@ pulls.compare_compare=プル元 pulls.filter_branch=ブランチの絞り込み pulls.no_results=結果が見つかりませんでした。 pulls.nothing_to_compare=同じブランチ同士のため、 プルリクエストを作成する必要がありません。 +pulls.nothing_to_compare_and_allow_empty_pr=これらのブランチは内容が同じです。 空のプルリクエストになります。 pulls.has_pull_request=`同じブランチのプルリクエストはすでに存在します: %[2]s#%[3]d` pulls.create=プルリクエストを作成 pulls.title_desc=が %[2]s から %[3]s への %[1]d コミットのマージを希望しています @@ -1238,13 +1402,19 @@ pulls.reopen_to_merge=このプルリクエストをマージする場合は再 pulls.cant_reopen_deleted_branch=このプルリクエストはブランチが削除されているため、再オープンできません。 pulls.merged=マージ済み pulls.merged_as=プルリクエストは %[2]s でマージされています。 +pulls.manually_merged=手動マージ済み +pulls.manually_merged_as=プルリクエストは %[2]s で手動マージされています。 pulls.is_closed=プルリクエストはクローズされています。 pulls.has_merged=プルリクエストはマージされています。 pulls.title_wip_desc=`誤ってマージされないようにするには、タイトルの頭に %s を付けます。` -pulls.cannot_merge_work_in_progress=このプルリクエストはWork in Progressとマークされています。 マージできる状態になったら、タイトルから %s を消してください。 +pulls.cannot_merge_work_in_progress=このプルリクエストは作業中(WIP)としてマーキングされています。 +pulls.still_in_progress=まだ作業中? +pulls.add_prefix=先頭に %s を追加 +pulls.remove_prefix=先頭の %s を除去 pulls.data_broken=このプルリクエストは、フォークの情報が見つからないため壊れています。 pulls.files_conflicted=このプルリクエストは、ターゲットブランチと競合する変更を含んでいます。 pulls.is_checking=マージのコンフリクトを確認中です。 少し待ってからもう一度実行してください。 +pulls.is_empty=このブランチの内容はターゲットブランチと同じです。 pulls.required_status_check_failed=いくつかの必要なステータスチェックが成功していません。 pulls.required_status_check_missing=必要なステータスチェックが見つかりません。 pulls.required_status_check_administrator=管理者であるため、このプルリクエストをマージすることは可能です。 @@ -1265,16 +1435,19 @@ pulls.reject_count_1=変更要請 %d pulls.reject_count_n=変更要請 %d pulls.waiting_count_1=レビュー待ち %d pulls.waiting_count_n=レビュー待ち %d +pulls.wrong_commit_id=コミットIDはターゲットブランチ上のコミットIDを指定してください pulls.no_merge_desc=リポジトリのマージオプションがすべて無効になっているため、このプルリクエストをマージすることはできせん。 pulls.no_merge_helper=リポジトリ設定でマージを有効にするか、手動でマージしてください。 pulls.no_merge_wip=このプルリクエストはWork In Progressとマークされているため、マージすることはできません。 pulls.no_merge_not_ready=このプルリクエストはマージする準備ができていません。 レビュー状況とステータスチェックを確認してください。 pulls.no_merge_access=このプルリクエストをマージする権限がありません。 -pulls.merge_pull_request=プルリクエストをマージ -pulls.rebase_merge_pull_request=リベースしてマージ -pulls.rebase_merge_commit_pull_request=リベースしてマージ(--no-ff) -pulls.squash_merge_pull_request=スカッシュしてマージ +pulls.merge_pull_request=マージコミットを作成 +pulls.rebase_merge_pull_request=リベース後にファストフォワード +pulls.rebase_merge_commit_pull_request=リベース後にマージコミット作成 +pulls.squash_merge_pull_request=スカッシュコミットを作成 +pulls.merge_manually=手動マージ済みにする +pulls.merge_commit_id=マージコミットID pulls.require_signed_wont_sign=ブランチでは署名されたコミットが必須ですが、このマージでは署名がされません pulls.invalid_merge_option=このプルリクエストでは、指定したマージ方法は使えません。 pulls.merge_conflict=マージ失敗: マージ中にコンフリクトがありました。 ヒント: 別のストラテジーを試してみてください @@ -1314,7 +1487,7 @@ milestones.update_ago=%s 前に更新 milestones.no_due_date=期日なし milestones.open=オープン milestones.close=クローズ -milestones.new_subheader=マイルストーンは課題をまとめ、進捗を管理します。 +milestones.new_subheader=マイルストーンはイシューをまとめ、進捗を管理します。 milestones.completeness=%d%%消化 milestones.create=マイルストーンを作成 milestones.title=タイトル @@ -1324,19 +1497,19 @@ milestones.clear=消去 milestones.invalid_due_date_format=期日は 'yyyy-mm-dd' の形式で入力してください。 milestones.create_success=マイルストーン '%s' を作成しました。 milestones.edit=マイルストーンを編集 -milestones.edit_subheader=マイルストーンは課題をまとめ、進捗を管理します。 +milestones.edit_subheader=マイルストーンはイシューをまとめ、進捗を管理します。 milestones.cancel=キャンセル milestones.modify=マイルストーンを更新 milestones.edit_success=マイルストーン '%s' を更新しました。 milestones.deletion=マイルストーンの削除 -milestones.deletion_desc=マイルストーンを削除すると、関連するすべての課題から除去されます。 続行しますか? +milestones.deletion_desc=マイルストーンを削除すると、関連するすべてのイシューから除去されます。 続行しますか? milestones.deletion_success=マイルストーンを削除しました。 milestones.filter_sort.closest_due_date=期日が近い順 milestones.filter_sort.furthest_due_date=期日が遠い順 milestones.filter_sort.least_complete=消化率の低い順 milestones.filter_sort.most_complete=消化率の高い順 -milestones.filter_sort.most_issues=課題の多い順 -milestones.filter_sort.least_issues=課題の少ない順 +milestones.filter_sort.most_issues=イシューの多い順 +milestones.filter_sort.least_issues=イシューの少ない順 signing.will_sign=このコミットは鍵 '%s' で署名されます signing.wont_sign.error=コミットの署名可否を確認中にエラーが発生しました @@ -1402,21 +1575,21 @@ activity.title.prs_merged_by=%sが%sによってマージされました activity.title.prs_opened_by=%sが%sによって提案されました activity.merged_prs_label=マージ済み activity.opened_prs_label=提案中 -activity.active_issues_count_1=%d件のアクティブな課題 -activity.active_issues_count_n=%d件のアクティブな課題 -activity.closed_issues_count_1=クローズされた課題 -activity.closed_issues_count_n=クローズされた課題 -activity.title.issues_1=%d件の課題 -activity.title.issues_n=%d件の課題 -activity.title.issues_closed_by=%sが%sによってクローズされました +activity.active_issues_count_1=%d件のアクティブなイシュー +activity.active_issues_count_n=%d件のアクティブなイシュー +activity.closed_issues_count_1=クローズされたイシュー +activity.closed_issues_count_n=クローズされたイシュー +activity.title.issues_1=%d件のイシュー +activity.title.issues_n=%d件のイシュー +activity.title.issues_closed_from=%[2]sからの%[1]sがクローズされました activity.title.issues_created_by=%sが%sによって作成されました activity.closed_issue_label=クローズ -activity.new_issues_count_1=新しい課題 -activity.new_issues_count_n=新しい課題 +activity.new_issues_count_1=新しいイシュー +activity.new_issues_count_n=新しいイシュー activity.new_issue_label=オープン activity.title.unresolved_conv_1=%d件の未解決の会話 activity.title.unresolved_conv_n=%d件の未解決の会話 -activity.unresolved_conv_desc=これらの最近更新された課題やプルリクエストはまだ完了していません。 +activity.unresolved_conv_desc=これらの最近更新されたイシューやプルリクエストはまだ完了していません。 activity.unresolved_conv_label=オープン activity.title.releases_1=%d件のリリース activity.title.releases_n=%d件のリリース @@ -1446,6 +1619,8 @@ activity.git_stats_deletion_n=%d行削除 search=検索 search.search_repo=リポジトリを検索 +search.fuzzy=あいまい +search.match=一致 search.results=%[3]s 内での "%[1]s" の検索結果 settings=設定 @@ -1461,6 +1636,15 @@ settings.hooks=Webhook settings.githooks=Gitフック settings.basic_settings=基本設定 settings.mirror_settings=ミラー設定 +settings.mirror_settings.docs=他のリポジトリへの自動的なプッシュ/プルを行うよう、プロジェクトを設定します。 ブランチ、タグ、コミットが自動的に同期されます。 リポジトリをミラーするには? +settings.mirror_settings.mirrored_repository=同期するリポジトリ +settings.mirror_settings.direction=方向 +settings.mirror_settings.direction.pull=プル +settings.mirror_settings.direction.push=プッシュ +settings.mirror_settings.last_update=最終更新 +settings.mirror_settings.push_mirror.none=プッシュミラーは設定されていません +settings.mirror_settings.push_mirror.remote_url=リモートGitリポジトリのURL +settings.mirror_settings.push_mirror.add=プッシュミラーを追加 settings.sync_mirror=今すぐ同期 settings.mirror_sync_in_progress=ミラー同期を実行しています。 しばらくあとでまた確認してください。 settings.email_notifications.enable=メール通知有効 @@ -1469,6 +1653,7 @@ settings.email_notifications.disable=メール通知無効 settings.email_notifications.submit=メール設定を保存 settings.site=Webサイト settings.update_settings=設定を更新 +settings.branches.update_default_branch=デフォルトブランチを更新 settings.advanced_settings=拡張設定 settings.wiki_desc=Wikiを有効にする settings.use_internal_wiki=ビルトインのWikiを使用する @@ -1476,18 +1661,18 @@ settings.use_external_wiki=外部のWikiを使用する settings.external_wiki_url=外部WikiのURL settings.external_wiki_url_error=外部WikiのURLが有効なURLではありません。 settings.external_wiki_url_desc=訪問者がWikiタブをクリックすると、外部WikiのURLにリダイレクトされます。 -settings.issues_desc=課題管理を有効にする -settings.use_internal_issue_tracker=ビルトインの課題管理を使用する -settings.use_external_issue_tracker=外部の課題管理システムを使用する -settings.external_tracker_url=外部の課題管理システムのURL -settings.external_tracker_url_error=外部の課題管理システムのURLが、有効なURLではありません。 -settings.external_tracker_url_desc=訪問者が課題タブをクリックすると、外部の課題管理システムのURLにリダイレクトされます。 -settings.tracker_url_format=外部課題管理システムのURLフォーマット -settings.tracker_url_format_error=外部の課題管理システムのURLが、有効なURLの形式ではありません。 -settings.tracker_issue_style=外部課題管理システムの番号形式 +settings.issues_desc=イシュートラッカーを有効にする +settings.use_internal_issue_tracker=ビルトインのイシュートラッカーを使用する +settings.use_external_issue_tracker=外部のイシュートラッカーを使用する +settings.external_tracker_url=外部のイシュートラッカーのURL +settings.external_tracker_url_error=外部のイシュートラッカーのURLが、有効なURLではありません。 +settings.external_tracker_url_desc=訪問者がイシュータブをクリックすると、外部のイシュートラッカーのURLにリダイレクトされます。 +settings.tracker_url_format=外部イシュートラッカーのURLフォーマット +settings.tracker_url_format_error=外部のイシュートラッカーのURLが、有効なURLの形式ではありません。 +settings.tracker_issue_style=外部イシュートラッカーの番号形式 settings.tracker_issue_style.numeric=数値 settings.tracker_issue_style.alphanumeric=英数字 -settings.tracker_url_format_desc={user}, {repo}, {index} を、ユーザー名、リポジトリ名、課題番号のプレースホルダ―として使用してください。 +settings.tracker_url_format_desc={user}, {repo}, {index} を、ユーザー名、リポジトリ名、イシュー番号のプレースホルダ―として使用してください。 settings.enable_timetracker=タイムトラッキングを有効にする settings.allow_only_contributors_to_track_time=コントリビューターだけタイムトラッキングする settings.pulls_desc=プルリクエストを有効にする @@ -1496,10 +1681,13 @@ settings.pulls.allow_merge_commits=マージコミットを有効にする settings.pulls.allow_rebase_merge=リベースによるコミットのマージを有効にする settings.pulls.allow_rebase_merge_commit=マージコミット(--no-ff)を伴うリベースを有効にする settings.pulls.allow_squash_commits=スカッシュによるコミットのマージを有効にする +settings.pulls.allow_manual_merge=プルリクエストを手動マージ済みにマークすることを可能にする +settings.pulls.enable_autodetect_manual_merge=手動マージの自動検出を有効にする (注意: 特殊なケースでは判定ミスが発生する場合があります) +settings.pulls.default_delete_branch_after_merge=デフォルトでプルリクエストのブランチをマージ後に削除する settings.projects_desc=リポジトリプロジェクトを有効にする settings.admin_settings=管理者用設定 settings.admin_enable_health_check=リポジトリのヘルスチェックを有効にする (git fsck) -settings.admin_enable_close_issues_via_commit_in_any_branch=デフォルトブランチ以外へのコミットによる課題のクローズ +settings.admin_enable_close_issues_via_commit_in_any_branch=デフォルトブランチ以外へのコミットによるイシューのクローズ settings.danger_zone=危険地帯 settings.new_owner_has_same_repo=新しいオーナーは、既に同じ名前のリポジトリを持っています。 settings.convert=通常のリポジトリに変換 @@ -1513,10 +1701,21 @@ settings.convert_fork_notices_1=この操作によりフォークから通常の settings.convert_fork_confirm=リポジトリを変換 settings.convert_fork_succeed=フォークを通常のリポジトリに変換しました。 settings.transfer=オーナー移転 +settings.transfer.rejected=リポジトリの転送は拒否されました。 +settings.transfer.success=リポジトリの転送が成功しました。 +settings.transfer_abort=転送をキャンセル +settings.transfer_abort_invalid=存在しないリポジトリの転送はキャンセルできません。 +settings.transfer_abort_success=%s へのリポジトリ転送は正常にキャンセルされました。 settings.transfer_desc=別のユーザーやあなたが管理者権限を持っている組織にリポジトリを移転します。 +settings.transfer_form_title=確認のためリポジトリ名を入力: +settings.transfer_in_progress=現在進行中の転送があります。このリポジトリを別のユーザーに転送したい場合はキャンセルしてください。 settings.transfer_notices_1=- 個人ユーザーに移転すると、あなたはリポジトリへのアクセス権を失います。 settings.transfer_notices_2=- あなたが所有(または共同で所有)している組織に移転すると、リポジトリへのアクセス権は維持されます。 -settings.transfer_form_title=確認のためリポジトリ名を入力: +settings.transfer_notices_3=- プライベートリポジトリを個人ユーザーに移転した場合は、最低限そのユーザーが読み取り権限を持つよう設定されます (必要に応じて権限が変更されます)。 +settings.transfer_owner=新しいオーナー +settings.transfer_perform=転送を実行 +settings.transfer_started=このリポジトリは転送のためにマークされており、「%s」からの確認を待っています +settings.transfer_succeed=リポジトリを移転しました。 settings.signing_settings=署名検証の設定 settings.trust_model=署名トラストモデル settings.trust_model.default=デフォルトのトラストモデル @@ -1538,13 +1737,10 @@ settings.wiki_deletion_success=リポジトリのWikiデータを削除しまし settings.delete=このリポジトリを削除 settings.delete_desc=リポジトリの削除は恒久的で元に戻すことはできません。 settings.delete_notices_1=- この操作は元に戻せません 。 -settings.delete_notices_2=- この操作は、リポジトリ %s のコード、課題、コメント、Wiki、共同作業者の関連付けなどを恒久的に削除します。 +settings.delete_notices_2=- この操作は、リポジトリ %s のコード、イシュー、コメント、Wiki、共同作業者の関連付けなどを恒久的に削除します。 settings.delete_notices_fork_1=- このリポジトリのフォークは、このリポジトリを削除すると独立したリポジトリになります。 settings.deletion_success=リポジトリを削除しました。 settings.update_settings_success=リポジトリの設定を更新しました。 -settings.transfer_owner=新しいオーナー -settings.make_transfer=移転を実行 -settings.transfer_succeed=リポジトリを移転しました。 settings.confirm_delete=リポジトリを削除 settings.add_collaborator=共同作業者を追加 settings.add_collaborator_success=共同作業者を追加しました。 @@ -1612,17 +1808,17 @@ settings.event_push=プッシュ settings.event_push_desc=Gitがリポジトリにプッシュを行ったとき。 settings.event_repository=リポジトリ settings.event_repository_desc=リポジトリが作成・削除されたとき。 -settings.event_header_issue=課題のイベント -settings.event_issues=課題 -settings.event_issues_desc=課題がオープン・クローズ・再オープン・編集されたとき。 -settings.event_issue_assign=課題のアサイン -settings.event_issue_assign_desc=課題の担当者が割り当てられたとき、解除されたとき。 -settings.event_issue_label=課題のラベル -settings.event_issue_label_desc=課題のラベルが更新・クリアされたとき。 -settings.event_issue_milestone=課題のマイルストーン -settings.event_issue_milestone_desc=課題のマイルストーンが設定・解除されたとき。 -settings.event_issue_comment=課題へのコメント -settings.event_issue_comment_desc=課題へのコメントが作成・編集・削除されたとき。 +settings.event_header_issue=イシューのイベント +settings.event_issues=イシュー +settings.event_issues_desc=イシューがオープン・クローズ・再オープン・編集されたとき。 +settings.event_issue_assign=イシューのアサイン +settings.event_issue_assign_desc=イシューの担当者が割り当てられたとき、解除されたとき。 +settings.event_issue_label=イシューのラベル +settings.event_issue_label_desc=イシューのラベルが更新・クリアされたとき。 +settings.event_issue_milestone=イシューのマイルストーン +settings.event_issue_milestone_desc=イシューのマイルストーンが設定・解除されたとき。 +settings.event_issue_comment=イシューへのコメント +settings.event_issue_comment_desc=イシューへのコメントが作成・編集・削除されたとき。 settings.event_header_pull_request=プルリクエストのイベント settings.event_pull_request=プルリクエスト settings.event_pull_request_desc=プルリクエストがオープン・クローズ・再オープン・編集されたとき。 @@ -1639,7 +1835,7 @@ settings.event_pull_request_review_desc=プルリクエストの承認・拒否 settings.event_pull_request_sync=プルリクエストの同期 settings.event_pull_request_sync_desc=プルリクエストが同期されたとき。 settings.branch_filter=ブランチ フィルター -settings.branch_filter_desc=プッシュ、ブランチ作成、ブランチ削除のイベントを通知するブランチを、globパターンで指定するホワイトリストです。 空か*のときは、すべてのブランチのイベントを通知します。 文法は github.com/gobwas/glob を参照してください。 例: master{master,release*} +settings.branch_filter_desc=プッシュ、ブランチ作成、ブランチ削除のイベントを通知するブランチを、globパターンで指定するホワイトリストです。 空か*のときは、すべてのブランチのイベントを通知します。 文法については github.com/gobwas/glob を参照してください。 例: master{master,release*} settings.active=有効 settings.active_helper=トリガーとなったイベントに関する情報が、このWebhookのURLに送信されます。 settings.add_hook_success=Webhookを追加しました。 @@ -1658,6 +1854,7 @@ settings.add_telegram_hook_desc=Telegramをリポジトリと settings.add_matrix_hook_desc=Matrix とリポジトリを組み合わせます。 settings.add_msteams_hook_desc=Microsoft Teamsをリポジトリと組み合わせます。 settings.add_feishu_hook_desc=Feishuをリポジトリと組み合わせます。 +settings.add_Wechat_hook_desc=Wechatworkをリポジトリと組み合わせます。 settings.deploy_keys=デプロイキー settings.add_deploy_key=デプロイキーを追加 settings.deploy_key_desc=デプロイキーには、リポジトリの読み取り専用プルアクセス権が与えられます。 @@ -1709,7 +1906,7 @@ settings.dismiss_stale_approvals_desc=プルリクエストの内容を変える settings.require_signed_commits=コミット署名必須 settings.require_signed_commits_desc=署名されていない場合、または署名が検証できなかった場合は、このブランチへのプッシュを拒否します。 settings.protect_protected_file_patterns=保護されるファイルのパターン (セミコロン'\;'で区切る): -settings.protect_protected_file_patterns_desc=保護されたファイルは、このブランチにファイルを追加・編集・削除する権限を持つユーザーであっても、そのままでは変更することはできません。 複数のパターンはセミコロン('\;')で区切ります。 パターンの文法については github.com/gobwas/glob を参照してください。 例: .drone.yml, /docs/**/*.txt +settings.protect_protected_file_patterns_desc=保護されたファイルは、このブランチにファイルを追加・編集・削除する権限を持つユーザーであっても、直接変更することができなくなります。 セミコロン('\;')で区切って複数のパターンを指定できます。 パターンの文法については github.com/gobwas/glob を参照してください。 例: .drone.yml, /docs/**/*.txt settings.add_protected_branch=保護を有効にする settings.delete_protected_branch=保護を無効にする settings.update_protect_branch_success=ブランチ '%s' の保護を更新しました。 @@ -1723,10 +1920,21 @@ settings.block_on_official_review_requests_desc=公式レビュー依頼があ settings.block_outdated_branch=遅れているプルリクエストのマージをブロック settings.block_outdated_branch_desc=baseブランチがheadブランチより進んでいる場合、マージできないようにします。 settings.default_branch_desc=プルリクエストやコミット表示のデフォルトのブランチを選択: +settings.default_merge_style_desc=プルリクエストのデフォルトのマージ方法: settings.choose_branch=ブランチを選択… settings.no_protected_branch=保護しているブランチはありません。 settings.edit_protected_branch=編集 settings.protected_branch_required_approvals_min=必要な承認数は負の数にできません。 +settings.tags=タグ +settings.tags.protection=タグの保護 +settings.tags.protection.pattern=タグ名パターン +settings.tags.protection.allowed=許可 +settings.tags.protection.allowed.users=許可するユーザー +settings.tags.protection.allowed.teams=許可するチーム +settings.tags.protection.allowed.noone=なし +settings.tags.protection.create=タグを保護 +settings.tags.protection.none=タグは保護されていません。 +settings.tags.protection.pattern.description=ひとつのタグ名か、複数のタグにマッチするglobパターンまたは正規表現を使用できます。 詳しくは タグの保護ガイド をご覧ください。 settings.bot_token=Botトークン settings.chat_id=チャットID settings.matrix.homeserver_url=ホームサーバー URL @@ -1735,14 +1943,15 @@ settings.matrix.access_token=アクセストークン settings.matrix.message_type=メッセージ種別 settings.archive.button=アーカイブ settings.archive.header=このリポジトリをアーカイブ -settings.archive.text=リポジトリをアーカイブすると、リポジトリ全体が読み出し専用となります。 ダッシュボードには表示されなくなり、コミットも、課題やプルリクエストの作成もできません。 +settings.archive.text=リポジトリをアーカイブすると、リポジトリ全体が読み出し専用となります。 ダッシュボードには表示されなくなり、コミットも、イシューやプルリクエストの作成もできません。 settings.archive.success=リポジトリをアーカイブしました。 settings.archive.error=リポジトリのアーカイブ設定でエラーが発生しました。 詳細はログを確認してください。 settings.archive.error_ismirror=ミラーのリポジトリはアーカイブできません。 settings.archive.branchsettings_unavailable=ブランチ設定は、アーカイブリポジトリでは使用できません。 +settings.archive.tagsettings_unavailable=タグ設定は、アーカイブリポジトリでは使用できません。 settings.unarchive.button=アーカイブ解除 settings.unarchive.header=このリポジトリをアーカイブ解除 -settings.unarchive.text=リポジトリのアーカイブを解除すると、コミット、プッシュ、新規の課題やプルリクエストを受け付けるよう元に戻されます。 +settings.unarchive.text=リポジトリのアーカイブを解除すると、コミット、プッシュ、新規のイシューやプルリクエストを受け付けるよう元に戻されます。 settings.unarchive.success=リポジトリのアーカイブを解除しました。 settings.unarchive.error=リポジトリのアーカイブ解除でエラーが発生しました。 詳細はログを確認してください。 settings.update_avatar_success=リポジトリのアバターを更新しました。 @@ -1791,6 +2000,7 @@ diff.whitespace_ignore_at_eol=行末の空白の違いは無視 diff.stats_desc=%d個のファイルの変更%d行の追加%d行の削除 diff.stats_desc_file=変更 %d 行: 追加 %d 行, 削除 %d 行 diff.bin=バイナリ +diff.bin_not_shown=バイナリファイルは表示されません。 diff.view_file=ファイルの表示 diff.file_before=変更前 diff.file_after=変更後 @@ -1798,6 +2008,7 @@ diff.file_image_width=幅 diff.file_image_height=高さ diff.file_byte_size=サイズ diff.file_suppressed=ファイル差分が大きすぎるため省略します +diff.file_suppressed_line_too_long=長すぎる行があるためファイル差分は表示されません diff.too_many_files=変更されたファイルが多すぎるため、一部のファイルは表示されません diff.comment.placeholder=コメントを残す diff.comment.markdown_info=Markdownによる書式設定をサポートしています。 @@ -1813,6 +2024,9 @@ diff.review.approve=承認 diff.review.reject=変更要請 diff.committed_by=committed by diff.protected=保護されているファイル +diff.image.side_by_side=並べて表示 +diff.image.swipe=スワイプ +diff.image.overlay=オーバーレイ releases.desc=プロジェクトバージョンとダウンロードの追跡。 release.releases=リリース @@ -1822,6 +2036,7 @@ release.new_release=新しいリリース release.draft=下書き release.prerelease=プレリリース release.stable=安定版 +release.compare=比較 release.edit=編集 release.ahead.commits=%d件のコミット release.ahead.target=が、このリリース後 %s に追加されています @@ -1848,9 +2063,12 @@ release.deletion_tag_desc=リポジトリからこのタグを削除します。 release.deletion_tag_success=タグを削除しました。 release.tag_name_already_exist=このタグ名のリリースが既に存在します。 release.tag_name_invalid=タグ名が不正です。 +release.tag_name_protected=保護されているタグ名です。 release.tag_already_exist=このタグ名は既に存在します。 release.downloads=ダウンロード release.download_count=ダウンロード数: %s +release.add_tag_msg=リリースのタイトルと内容をタグのメッセージにする +release.add_tag=タグのみ作成 branch.name=ブランチ名 branch.search=ブランチを検索 @@ -1877,12 +2095,23 @@ branch.restore=ブランチ '%s' の復元 branch.download=ブランチ '%s' をダウンロード branch.included_desc=このブランチはデフォルトブランチに含まれています branch.included=埋没 +branch.create_new_branch=このブランチをもとに作成します: +branch.confirm_create_branch=ブランチを作成 +branch.new_branch=新しいブランチの作成 +branch.new_branch_from='%s' から新しいブランチを作成 + +tag.create_tag=タグ %s を作成 +tag.create_success=タグ '%s' が作成されました。 topic.manage_topics=トピックの管理 topic.done=完了 topic.count_prompt=選択できるのは25トピックまでです。 topic.format_prompt=トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。 +error.csv.too_large=このファイルは大きすぎるため表示できません。 +error.csv.unexpected=このファイルは %d 行目の %d 文字目に予期しない文字が含まれているため表示できません。 +error.csv.invalid_field_count=このファイルは %d 行目のフィールドの数が正しくないため表示できません。 + [org] org_name_holder=組織名 org_full_name_holder=組織のフルネーム @@ -1926,6 +2155,7 @@ settings.visibility.private_shortname=プライベート settings.update_settings=設定の更新 settings.update_setting_success=組織の設定を更新しました。 settings.change_orgname_prompt=注: 組織の名称を変更すると、組織のURLも変わります。 +settings.change_orgname_redirect_prompt=古い名前は、再使用されていない限りリダイレクトします。 settings.update_avatar_success=組織のアバターを更新しました。 settings.delete=組織を削除 settings.delete_account=この組織を削除 @@ -1935,7 +2165,7 @@ settings.delete_org_title=組織の削除 settings.delete_org_desc=組織を恒久的に削除します。 続行しますか? settings.hooks_desc=この組織のすべてのリポジトリに対して発行されるWebhookを追加します。 -settings.labels_desc=この組織のすべてのリポジトリで使用可能な課題ラベルを追加します。 +settings.labels_desc=この組織のすべてのリポジトリで使用可能なイシューラベルを追加します。 members.membership_visibility=所属の公開/非公開: members.public=公開 @@ -1946,12 +2176,15 @@ members.member_role=メンバーの役割: members.owner=オーナー members.member=メンバー members.remove=削除 +members.remove.detail=%[2]s から %[1]s を削除しますか? members.leave=脱退 +members.leave.detail=%s から脱退しますか? members.invite_desc=%s に新しいメンバーを追加 members.invite_now=今すぐ招待 teams.join=参加 teams.leave=脱退 +teams.leave.detail=%s から脱退しますか? teams.can_create_org_repo=リポジトリを作成 teams.can_create_org_repo_helper=メンバーは組織のリポジトリを新たに作成できます。作成者には新しいリポジトリの管理者権限が与えられます。 teams.read_access=読み取りアクセス権 @@ -1997,8 +2230,7 @@ dashboard=ダッシュボード users=ユーザーアカウント organizations=組織 repositories=リポジトリ -hooks=デフォルトのWebhooks -systemhooks=システムWebhook +hooks=Webhook authentication=認証ソース emails=ユーザーメールアドレス config=設定 @@ -2011,7 +2243,7 @@ total=合計: %d dashboard.statistic=サマリー dashboard.operations=メンテナンス操作 dashboard.system_status=システム状況 -dashboard.statistic_info=Giteaデータベースは %d ユーザー, %d 組織, %d 公開鍵, %d リポジトリ, %d ウォッチ, %d スター, %d アクション, %d アクセス, %d 課題, %d コメント, %d ソーシャルアカウント, %d フォロー, %d ミラー, %d リリース, %d 認証ソース, %d Webhook, %d マイルストーン, %d ラベル, %d フックタスク, %d チーム, %d 更新タスク, %d 添付ファイル の情報を持っています。 +dashboard.statistic_info=Giteaデータベースは %d ユーザー, %d 組織, %d 公開鍵, %d リポジトリ, %d ウォッチ, %d スター, %d アクション, %d アクセス, %d イシュー, %d コメント, %d ソーシャルアカウント, %d フォロー, %d ミラー, %d リリース, %d 認証ソース, %d Webhook, %d マイルストーン, %d ラベル, %d フックタスク, %d チーム, %d 更新タスク, %d 添付ファイル の情報を持っています。 dashboard.operation_name=操作の名称 dashboard.operation_switch=切り替え dashboard.operation_run=実行 @@ -2030,7 +2262,7 @@ dashboard.cron.error=Cronでエラー: %s: %[3]s dashboard.cron.finished=Cron: %[1]s が完了 dashboard.delete_inactive_accounts=アクティベートされていないアカウントをすべて削除 dashboard.delete_inactive_accounts.started=アクティベートされていないアカウントをすべて削除するタスクを開始しました。 -dashboard.delete_repo_archives=リポジトリアーカイブをすべて削除 +dashboard.delete_repo_archives=リポジトリのアーカイブ (ZIP, TAR.GZ, etc..) をすべて削除 dashboard.delete_repo_archives.started=リポジトリアーカイブをすべて削除するタスクを開始しました。 dashboard.delete_missing_repos=Gitファイルが存在しないリポジトリをすべて削除 dashboard.delete_missing_repos.started=Gitファイルが存在しないリポジトリをすべて削除するタスクを開始しました。 @@ -2049,6 +2281,7 @@ dashboard.resync_all_sshprincipals.desc=(ビルトインSSHサーバーでは不 dashboard.resync_all_hooks=すべてのリポジトリの pre-receive, update, post-receive フックを更新する。 dashboard.reinit_missing_repos=レコードが存在するが見当たらないすべてのGitリポジトリを再初期化する dashboard.sync_external_users=外部ユーザーデータの同期 +dashboard.cleanup_hook_task_table=hook_taskテーブルのクリーンアップ dashboard.server_uptime=サーバーの稼働時間 dashboard.current_goroutine=現在のGoroutine数 dashboard.current_memory_usage=現在のメモリ使用量 @@ -2078,6 +2311,8 @@ dashboard.total_gc_time=GC停止時間の合計 dashboard.total_gc_pause=GC停止時間の合計 dashboard.last_gc_pause=前回のGC停止時間 dashboard.gc_times=GC実行回数 +dashboard.delete_old_actions=データベースから古い操作履歴をすべて削除 +dashboard.delete_old_actions.started=データベースからの古い操作履歴の削除を開始しました。 users.user_manage_panel=ユーザーアカウント管理 users.new_account=ユーザーアカウントを作成 @@ -2145,13 +2380,15 @@ repos.private=プライベート repos.watches=ウォッチ repos.stars=スター repos.forks=フォーク -repos.issues=課題 +repos.issues=イシュー repos.size=サイズ -hooks.desc=Webhookは、特定のGiteaイベントトリガーが発生した際に、自動的にHTTP POSTリクエストをサーバーへ送信するものです。 ここで定義されたWebhookはデフォルトとなり、全ての新規リポジトリにコピーされます。 詳しくはwebhooks guideをご覧下さい。 -hooks.add_webhook=デフォルトのWebhookを追加 -hooks.update_webhook=デフォルトのWebhookを更新 +defaulthooks=デフォルトWebhook +defaulthooks.desc=Webhookは、特定のGiteaイベントトリガーが発生した際に、自動的にHTTP POSTリクエストをサーバーへ送信するものです。 ここで定義されたWebhookはデフォルトとなり、全ての新規リポジトリにコピーされます。 詳しくはwebhooks guideをご覧下さい。 +defaulthooks.add_webhook=デフォルトWebhookの追加 +defaulthooks.update_webhook=デフォルトWebhookの更新 +systemhooks=システムWebhook systemhooks.desc=Webhookは、特定のGiteaイベントトリガーが発生した際に、自動的にHTTP POSTリクエストをサーバーへ送信するものです。 ここで定義したWebhookはシステム内のすべてのリポジトリで呼び出されます。 そのため、パフォーマンスに及ぼす影響を考慮したうえで設定してください。 詳しくはwebhooks guideをご覧下さい。 systemhooks.add_webhook=システムWebhookを追加 systemhooks.update_webhook=システムWebhookを更新 @@ -2171,7 +2408,6 @@ auths.host=ホスト auths.port=ポート auths.bind_dn=バインドDN auths.bind_password=バインドパスワード -auths.bind_password_helper=警告: このパスワードはプレーンテキストで保存されます。 可能であれば読み取り専用アカウントを使用してください。 auths.user_base=ユーザー検索ベース auths.user_dn=ユーザーDN auths.attribute_username=ユーザー名 @@ -2199,9 +2435,14 @@ auths.smtphost=SMTPホスト auths.smtpport=SMTPポート auths.allowed_domains=許可するドメイン auths.allowed_domains_helper=すべてのドメインを許可する場合は空のままにします。 複数のドメインはカンマ(',')で区切ります。 -auths.enable_tls=TLS暗号化を有効にする auths.skip_tls_verify=TLS検証を省略 +auths.force_smtps=強制的にSMTPSにする +auths.force_smtps_helper=ポート465ではSMTPSが常に使用されます。 これを指定すると、他のポートでもSMTPSの使用を強制します。 (指定しない場合は、ホストがサポートしていればSTARTTLSが使用されます。) +auths.helo_hostname=HELOホストネーム +auths.helo_hostname_helper=HELOで送られるホスト名。現在のホスト名で送信する場合は空白にします。 +auths.disable_helo=HELOを無効にする auths.pam_service_name=PAMサービス名 +auths.pam_email_domain=PAM メールドメイン名 (オプション) auths.oauth2_provider=OAuth2プロバイダー auths.oauth2_icon_url=アイコンのURL auths.oauth2_clientID=クライアントID (キー) @@ -2212,6 +2453,7 @@ auths.oauth2_tokenURL=トークンURL auths.oauth2_authURL=認可URL auths.oauth2_profileURL=プロフィールURL auths.oauth2_emailURL=メールURL +auths.oauth2_tenant=テナント auths.enable_auto_register=自動登録を有効にする auths.sspi_auto_create_users=自動的にユーザーを作成 auths.sspi_auto_create_users_helper=初回ログインのユーザーに対して、SSPI認証処理が新しいアカウントを自動的に作成することを許可します @@ -2301,6 +2543,7 @@ config.db_path=パス config.service_config=サービス設定 config.register_email_confirm=登録にはメールによる確認が必要 config.disable_register=セルフ登録無効 +config.allow_only_internal_registration=Gitea上での登録のみを許可 config.allow_only_external_registration=外部サービスを使用した登録のみを許可 config.enable_openid_signup=OpenIDを使ったセルフ登録有効 config.enable_openid_signin=OpenIDを使ったサインイン有効 @@ -2318,7 +2561,7 @@ config.default_enable_timetracking=デフォルトでタイムトラッキング config.default_allow_only_contributors_to_track_time=コントリビューターだけタイムトラッキングする config.no_reply_address=メールを隠すときのドメイン config.default_visibility_organization=新しい組織のデフォルトの表示設定 -config.default_enable_dependencies=デフォルトで課題の依存関係有効 +config.default_enable_dependencies=デフォルトでイシューの依存関係有効 config.webhook_config=Webhook設定 config.queue_length=キューの長さ @@ -2377,7 +2620,6 @@ config.git_gc_timeout=GC操作のタイムアウト config.log_config=ログ設定 config.log_mode=ログモード -config.macaron_log_mode=Macaronログのモード config.own_named_logger=名前付きロガー config.routes_to_default_logger=デフォルトロガーに出力 config.go_log=Go Logを使用 (デフォルト) @@ -2473,17 +2715,17 @@ notices.delete_success=システム通知を削除しました。 create_repo=がリポジトリ %s を作成しました rename_repo=がリポジトリ名を %[1]s から [3]s へ変更しました commit_repo=が %[4]s%[3]s にプッシュしました -create_issue=`が課題 %s#%[2]s をオープンしました` -close_issue=`が課題 %s#%[2]s をクローズしました` -reopen_issue=`が課題 %s#%[2]s を再オープンしました` +create_issue=`がイシュー %s#%[2]s をオープンしました` +close_issue=`がイシュー %s#%[2]s をクローズしました` +reopen_issue=`がイシュー %s#%[2]s を再オープンしました` create_pull_request=`がプルリクエスト %s#%[2]s を作成しました` close_pull_request=`がプルリクエスト %s#%[2]s をクローズしました` reopen_pull_request=`がプルリクエスト %s#%[2]s を再オープンしました` -comment_issue=`が課題 %s#%[2]s にコメントしました` +comment_issue=`がイシュー %s#%[2]s にコメントしました` comment_pull=`がプルリクエスト %s#%[2]s にコメントしました` merge_pull_request=`がプルリクエスト %s#%[2]s をマージしました` transfer_repo=がリポジトリ %s%s へ移転しました -push_tag=がタグ %[2]s%[3]s にプッシュしました +push_tag=がタグ %[4]s%[3]s にプッシュしました delete_tag=がタグ %[2]s を %[3]s から削除しました delete_branch=がブランチ %[2]s を %[3]s から削除しました compare_branch=比較 @@ -2495,6 +2737,8 @@ mirror_sync_delete=が %[3]s の参照 %[2]s approve_pull_request=`が %s#%[2]s を承認しました` reject_pull_request=`が %s#%[2]s について変更を求めました` publish_release=`が %[3]s "%[4]s" をリリースしました` +review_dismissed=`が %[4]s%[3]s#%[2]s へのレビューを棄却しました` +review_dismissed_reason=理由: create_branch=が %[4]s にブランチ %[3]s を作成しました [tool] diff --git a/options/locale/locale_ko-KR.ini b/options/locale/locale_ko-KR.ini index a92b2cbd0..de4a05e6c 100644 --- a/options/locale/locale_ko-KR.ini +++ b/options/locale/locale_ko-KR.ini @@ -50,6 +50,8 @@ new_migrate=새 마이그레이션 new_mirror=새로운 미러 new_fork=새 저장소 포크 new_org=새로운 조직 +new_project=새 프로젝트 +new_project_board=새 프로젝트 보드 manage_org=조직 관리 admin_panel=사이트 관리 account_settings=계정 설정 @@ -70,6 +72,7 @@ issues=이슈들 milestones=마일스톤 cancel=취소 +save=저장 add=추가 add_all=모두 추가 remove=삭제 @@ -81,7 +84,9 @@ loading=불러오는 중... + [error] +occurred=오류가 발생했습니다 [startpage] app_desc=편리한 설치형 Git 서비스 @@ -267,12 +272,22 @@ authorization_failed=인증 실패 sspi_auth_failed=SSPI 인증 실패 [mail] + activate_account=계정을 활성화하세요 + activate_email=이메일 주소 확인 -reset_password=계정 복구 -register_success=등록 완료 + register_notify=Gitea에 오신것을 환영합니다! +reset_password=계정 복구 + +register_success=등록 완료 + + + + + + [modal] yes=예 no=아니오 @@ -448,7 +463,6 @@ gpg_helper=도움이 필요하세요? GitHub의 설명서를 add_new_key=SSH 키 추가 add_new_gpg_key=GPG 키 추가 gpg_key_id_used=같은 ID의 GPG 공개키가 이미 존재합니다. -gpg_no_key_email_found=이 GPG 키는 귀하의 계정에 연결된 어떠한 이메일 주소로도 사용할 수 없습니다. subkeys=하위 키 key_id=키 ID key_name=키 이름 @@ -542,6 +556,7 @@ delete_account_desc=이 계정을 정말로 삭제하시겠습니까? email_notifications.enable=이메일 알림 켜기 email_notifications.disable=이메일 알림 끄기 + [repo] owner=소유자 repo_name=저장소 이름 @@ -583,14 +598,13 @@ reactions_more=그리고 %d 더 language_other=기타 + template.topics=토론 주제 -form.reach_limit_of_creation=이미 최대치인 %d 개의 레포지터리를 가지고 있습니다. form.name_reserved=저장소 이름 '%s'은 예약 되어 있습니다. form.name_pattern_not_allowed='%s' 패턴은 저장소명으로 허용되지 않습니다. -need_auth=클론시 인증 migrate_items_wiki=위키 migrate_items_issues=이슈 migrate_repo=저장소 마이그레이션 @@ -798,11 +812,10 @@ issues.attachment.download=' "%s"를 다운로드 하려면 클릭 하십시오 issues.subscribe=구독하기 issues.unsubscribe=구독 취소 issues.tracker=타임 트래커 -issues.start_tracking_short=시작 issues.start_tracking=타임 트래킹 시작 issues.start_tracking_history=`%s가 작업 시작` -issues.stop_tracking=중단 issues.stop_tracking_history=`작업 중단 %s` +issues.cancel_tracking_history=`%s 타임 트래킹이 취소되었습니다` issues.add_time=수동으로 시간 입력 issues.add_time_short=시간 입력 issues.add_time_cancel=취소 @@ -810,8 +823,6 @@ issues.add_time_history=`사용 시간이 추가됨 %s` issues.add_time_hours=시간 issues.add_time_minutes=분 issues.add_time_sum_to_small=시간이 입력되지 않았습니다. -issues.cancel_tracking=취소 -issues.cancel_tracking_history=`%s 타임 트래킹이 취소되었습니다` issues.time_spent_total=총 경과된 시간 issues.time_spent_from_all_authors=`총 경과된 시간: %s` issues.due_date=마감일 @@ -856,6 +867,7 @@ issues.review.reviewers=리뷰어 issues.review.show_outdated=오래된 내역 보기 issues.review.hide_outdated=오래된 내역 숨기기 + pulls.new=새 풀 리퀘스트 pulls.compare_changes=새 풀 리퀘스트 pulls.compare_base=병합하기 @@ -875,10 +887,6 @@ pulls.can_auto_merge_desc=이 풀리퀘스트는 자동적으로 머지될 수 pulls.cannot_auto_merge_helper=충돌을 해결하려면 수동으로 머지하십시오. pulls.no_merge_desc=모든 저장소 머지 옵션이 비활성화 되어있기 때문에 이 풀 리퀘스트를 머지할 수 없습니다. -pulls.merge_pull_request=풀리퀘스트 머지 -pulls.rebase_merge_pull_request=리베이스와 머지 -pulls.rebase_merge_commit_pull_request=리베이스와 머지 (--no-ff) -pulls.squash_merge_pull_request=스쿼시하고 머지 pulls.invalid_merge_option=이 풀 리퀘스트에서 설정한 머지 옵션을 사용하실 수 없습니다. ; %[2]s
    %[3]s
    @@ -961,7 +969,6 @@ activity.closed_issues_count_1=클로즈된 이슈 activity.closed_issues_count_n=클로즈된 이슈 activity.title.issues_1=이슈 %d개 activity.title.issues_n=이슈 %d개 -activity.title.issues_closed_by=%s 가 %s 에 의해 클로즈되었습니다. activity.title.issues_created_by=%s 가 %s 에 의해 생성되었습니다. activity.closed_issue_label=닫힘 activity.new_issues_count_1=새로운 이슈 @@ -1025,15 +1032,14 @@ settings.new_owner_has_same_repo=새로운 소유자가 같은 이름의 저장 settings.convert=일반 저장소로 변환 settings.convert_confirm=저장소 변환 settings.transfer=소유권 이전 +settings.transfer_owner=새 소유자 +settings.transfer_succeed=저장소가 이전 되었습니다. settings.wiki_delete=위키 데이터 삭제 settings.confirm_wiki_delete=위키 데이터 삭제 settings.delete=이 저장소 삭제 settings.delete_notices_1=- 이 작업은 취소할 수 없습니다. settings.deletion_success=저장소가 삭제되었습니다. settings.update_settings_success=저장소 설정이 갱신되었습니다. -settings.transfer_owner=새 소유자 -settings.make_transfer=이전 실행 -settings.transfer_succeed=저장소가 이전 되었습니다. settings.confirm_delete=저장소 삭제 settings.add_collaborator=새 공동작업자 추가 settings.add_collaborator_success=공동작업자가 추가 되었습니다. @@ -1195,10 +1201,12 @@ branch.restore_success='%s' 브랜치가 복구되었습니다. branch.restore_failed='%s' 브랜치를 복구하는데 실패하였습니다. branch.protected_deletion_failed='%s' 브랜치가 보호되었습니다. 삭제할 수 없습니다. + topic.manage_topics=토픽 관리 topic.done=완료 topic.count_prompt=25개 이상의 토픽을 선택하실 수 없습니다. + [org] org_name_holder=조직 이름 org_full_name_holder=조직 전체 이름 @@ -1282,7 +1290,6 @@ dashboard.system_status=시스템 상태 dashboard.operation_name=작업 명 dashboard.operation_switch=스위치 dashboard.operation_run=실행 -dashboard.delete_repo_archives=모든 저장소 아카이브 삭제 dashboard.git_gc_repos=모든 저장소 가비지 콜렉트 dashboard.sync_external_users=외부 사용자 데이터 동기화 dashboard.server_uptime=서버를 켠 시간 @@ -1393,7 +1400,6 @@ auths.smtp_auth=SMTP 인증 유형 auths.smtphost=SMTP 호스트 auths.smtpport=SMTP 포트 auths.allowed_domains=허용된 도메인 -auths.enable_tls=TLS 암호화 활성화 auths.skip_tls_verify=TLS 검증 건너뛰기 auths.pam_service_name=PAM 서비스 명 auths.oauth2_provider=OAuth2 프로바이더 diff --git a/options/locale/locale_lv-LV.ini b/options/locale/locale_lv-LV.ini index 54e226c9c..fb5f83e87 100644 --- a/options/locale/locale_lv-LV.ini +++ b/options/locale/locale_lv-LV.ini @@ -15,6 +15,7 @@ page=Lapa template=Sagatave language=Valoda notifications=Paziņojumi +active_stopwatch=Aktīvā laika uzskaite create_new=Izveidot… user_profile_and_more=Profils un iestatījumi… signed_in_as=Pierakstījies kā @@ -75,23 +76,32 @@ pull_requests=Izmaiņu pieprasījumi issues=Problēmas milestones=Atskaites punkti +ok=Labi cancel=Atcelt save=Saglabāt add=Pievienot add_all=Pievienot visus remove=Noņemt remove_all=Noņemt visus +edit=Labot write=Rakstīt preview=Priekšskatītījums loading=Notiek ielāde… +step1=Solis 1: +step2=Solis 2: +error=Kļūda error404=Lapa, ko vēlaties atvērt, neeksistē vai arī Jums nav tiesības to aplūkot. +never=Nekad + [error] occurred=Radusies kļūda report_message=Ja esat drošs, ka šī ir Gitea kļūda, pirms ziņošanas Gitea problēmās pārliecinieties, ka lietojat jaunāko Gitea versiju un par šādu kļūdu jau nav ziņots. +missing_csrf=Kļūdains pieprasījums: netika saņemts drošības talons +invalid_csrf=Kļūdains pieprasījums: iesūtīts kļūdains drošības talons [startpage] app_desc=Viegli uzstādāms Git serviss @@ -201,6 +211,8 @@ default_enable_timetracking=Pēc noklusējuma iespējot laika uzskaiti default_enable_timetracking_popup=Repozitorijiem pēc noklusējuma tiks iespējota laika uzskaite atkarībā no šī iestatījuma. no_reply_address=Neatbildēt e-pasta adreses domēns no_reply_address_helper=Domēns lietotāja e-pasta adresei git žurnālos, ja lietotājs izvēlas paturēt savu e-pasta adresi privātu. Piemēram, ja lietotājs ir 'janis' un domēns 'neatbildet.piemers.lv', tad e-pasta adrese būs 'janis@neatbildet.piemers.lv'. +password_algorithm=Paroles jaucējsummas algoritms +password_algorithm_helper=Norādiet paroles jaucējkoda algoritmu. Alogritmiem ir dažādas prasības un stiprums. Lai arī `argon2` ir nodrošina labu drošība, tas patērē daudz operatīvās atmiņas un var nebūt piemērots sistēmām ar nelieliem resursiem. [home] uname_holder=Lietotājvārds vai e-pasts @@ -214,6 +226,7 @@ my_mirrors=Mani spoguļi view_home=Skatīties %s search_repos=Meklēt repozitoriju… filter=Citi filtri +filter_by_team_repositories=Filtrēt pēc komandas repozitorijiem show_archived=Arhivētie show_both_archived_unarchived=Attēlo gan arhivētie, gan nearhivētie @@ -233,6 +246,8 @@ users=Lietotāji organizations=Organizācijas search=Meklēt code=Kods +search.fuzzy=Aptuveni +search.match=Precīzi repo_no_results=Netika atrasts neviens repozitorijs, kas atbilstu kritērijiem. user_no_results=Netika atrasts neviens lietotājs, kas atbilstu kritērijiem. org_no_results=Netika atrasta neviena organizācija, kas atbilstu kritērijiem. @@ -246,6 +261,7 @@ register_helper_msg=Jau ir konts? Pieraksties tagad! social_register_helper_msg=Jau ir konts? Pievienojies! disable_register_prompt=Reģistrācija ir atspējota. Lūdzu, sazinieties ar vietnes administratoru. disable_register_mail=Reģistrācijas e-pasta apstiprināšana ir atspējota. +remember_me=Atcerēties šo ierīci forgot_password_title=Aizmirsu paroli forgot_password=Aizmirsi paroli? sign_up_now=Nepieciešams konts? Reģistrējies tagad. @@ -278,6 +294,7 @@ twofa_scratch_token_incorrect=Ievadīts nepareizs vienreizējais kods. login_userpass=Pierakstīties login_openid=OpenID oauth_signup_tab=Reģistrēt jaunu kontu +oauth_signup_title=Pabeigt konta veidošanu oauth_signup_submit=Pabeigt reģistrāciju oauth_signin_tab=Savienot ar esošu kontu oauth_signin_title=Pierakstīties, lai autorizētu saistīto kontu @@ -288,7 +305,8 @@ openid_connect_desc=Izvēlētais OpenID konts sistēmā netika atpazīts, bet J openid_register_title=Izveidot jaunu kontu openid_register_desc=Izvēlētais OpenID konts sistēmā netika atpazīts, bet Jūs to varat piesaistīt esošam kontam. openid_signin_desc=Ievadiet savu OpenID URI, piemēram: https://anna.me, peteris.openid.org.lv, gnusocial.net/janis. -disable_forgot_password_mail=Paroles atjaunošanas iespēja ir atslēgta. Sazinieties ar lapas administratoru. +disable_forgot_password_mail=Konta atjaunošana ir atspējota, jo nav uzstādīti e-pasta servera iestatījumi. Sazinieties ar lapas administratoru. +disable_forgot_password_mail_admin=Kontu atjaunošana ir pieejama tikai, ja ir veikta e-pasta servera iestatījumu konfigurēšana. Norādiet e-pasta servera iestatījumus, lai iespējotu kontu atjaunošanu. email_domain_blacklisted=Nav atļauts reģistrēties ar šādu e-pasta adresi. authorize_application=Autorizēt lietotni authorize_redirect_notice=Jūs tiksiet nosūtīts uz %s, ja autorizēsiet šo lietotni. @@ -302,11 +320,64 @@ password_pwned=Ievadītā parole ir %s, + activate_account=Lūdzu, aktivizējiet savu kontu +activate_account.title=%s, aktivizējiet savu kontu +activate_account.text_1=Sveiki %[1]s, esat reģistrējies %[2]s! +activate_account.text_2=Nospiediet uz saites, lai aktivizētu savu kontu lapā %s: + activate_email=Apstipriniet savu e-pasta adresi -reset_password=Atgūt kontu -register_success=Veiksmīga reģistrācija +activate_email.title=%s, apstipriniet savu e-pasta adresi +activate_email.text=Nospiediet uz saites, lai apstiprinātu savu e-pasta adresi lapā %s: + register_notify=Laipni lūdzam Gitea +register_notify.title=%[1]s, esat reģistrējies %[2]s +register_notify.text_1=šis ir reģistrācijas apstiprinājuma e-pasts lapai %s! +register_notify.text_2=Tagad varat autorizēties ar lietotāja vārdu: %s. +register_notify.text_3=Ja šis konts Jums tika izveidots, tad obligāti nomainiet citu paroli. + +reset_password=Atgūt kontu +reset_password.title=%s, esat pieprasījis atjaunot savu kontu +reset_password.text=Nospiediet uz saites, lai atjaunotu savu kontu lapā %s: + +register_success=Veiksmīga reģistrācija + +issue_assigned.pull=@%[1]s piešķīra jums izmaiņu pieprasījumu %[2]s repozitorijā %[3]s. +issue_assigned.issue=@%[1]s piešķīra jums problēmu %[2]s repozitorijā %[3]s. + +issue.x_mentioned_you=@%s pieminēja Jūs: +issue.action.force_push=%[1]s veica piespiedu izmaiņu iesūtīšanu atzarā %[2]s no revīzijas %[3]s uz %[4]s. +issue.action.push_1=@%[1]s iesūtīja %[3]d revīziju atzarā %[2]s +issue.action.push_n=@%[1]s iesūtīja %[3]d revīzijas atzarā %[2]s +issue.action.close=@%[1]s aizvēra #%[2]d. +issue.action.reopen=@%[1]s atkārtoti atvēra #%[2]d. +issue.action.merge=@%[1]s sapludināja #%[2]d atzarā %[3]s. +issue.action.approve=@%[1]s apstiprināja izmaiņu pieprasījumu. +issue.action.reject=@%[1]s pieprasīja izmaiņas šajā izmaiņu pieprasījumā. +issue.action.review=@%[1]s komentēja šo izmaiņu pieprasījumu. +issue.action.review_dismissed=@%[1]s atmeta pēdējo %[2]s recenziju šim izmaiņu pieprasījumam. +issue.action.ready_for_review=@%[1]s atzīmēja šo izmaiņu pieprasījumu, ka tas ir gatavs recenzēšanai. +issue.action.new=@%[1]s izveidoja #%[2]d. +issue.in_tree_path=Ceļā %s: + +release.new.subject=Jauns laidiens %s repozitorijā %s +release.new.text=@%[1]s izveidoja jaunu laidienu %[2]s repozitorijā %[3]s +release.title=Nosaukums: %s +release.note=Piezīmes: +release.downloads=Lejupielādes: +release.download.zip=Izejas kods (ZIP) +release.download.targz=Izejas kods (TAR.GZ) + +repo.transfer.subject_to=%s vēlas pārsūtīt repozitoriju "%s" organizācijai %s +repo.transfer.subject_to_you=%s vēlas Jums pārsūtīt repozitoriju "%s" +repo.transfer.to_you=Jums +repo.transfer.body=Ja vēlaties to noraidīt vai apstiprināt, tad apmeklējiet saiti %s. + +repo.collaborator.added.subject=%s pievienoja Jūs repozitorijam %s +repo.collaborator.added.text=Jūs tikāt pievienots kā līdzstrādnieks repozitorijam: [modal] yes=Jā @@ -346,13 +417,15 @@ max_size_error=` jabūt ne mazāk kā %s simbolu garumā.` email_error=` nav derīga e-pasta adrese.` url_error=` nav korekts URL.` include_error=` ir jāsatur tekstu '%s'.` -glob_pattern_error=` glob izteiksme nav korekta: %s.` +glob_pattern_error=` glob šablons nav korekts: %s.` +regex_pattern_error=` regulārā izteiksme nav korekta: %s.` unknown_error=Nezināma kļūda: captcha_incorrect=Ievadīts nepareizs drošības kods. password_not_match=Izvēlētā parole nesakrīt ar atkārtoti ievadīto. lang_select_error=Izvēlieties valodu no saraksta. username_been_taken=Lietotājvārds jau ir aizņemts. +username_change_not_local_user=Ne-lokālie lietotāji nevar mainīt savus lietotājvārdus. repo_name_been_taken=Jau eksistē repozitorijs ar šādu nosaukumu. repository_files_already_exist=Šī repozitorija faili jau eksistē, sazinieties ar sistēmas administratoru. repository_files_already_exist.adopt=Šī repozitorija faili jau eksistē un var tikt tikai pārņemti. @@ -364,6 +437,7 @@ org_name_been_taken=Organizācijas nosaukums jau ir aizņemts. team_name_been_taken=Komandas nosaukums jau ir aizņemts. team_no_units_error=Komandai ir jābūt iespējotai vismaz vienai sadaļai. email_been_used=E-pasta adrese jau ir izmantota. +email_invalid=Epasta adrese nav korekta. openid_been_used=OpenID adrese '%s' jau ir izmantota. username_password_incorrect=Nepareizs lietotājvārds vai parole. password_complexity=Parole neatbilst drošības prasībām: @@ -372,6 +446,7 @@ password_uppercase_one=Vismaz viens lielais burts password_digit_one=Vismaz viens cipars password_special_one=Vismaz viens speciālais simbols (punkts, iekavas, pēdiņas utt.) enterred_invalid_repo_name=Pārliecinieties, vai ievadītā repozitorija nosaukums ir pareizs. +enterred_invalid_org_name=Ievadītais organizācijas nosaukums ir nepareizs. enterred_invalid_owner_name=Pārliecinieties, vai ievadītā īpašnieka vārds ir pareizs. enterred_invalid_password=Pārliecinieties, vai ievadītā parole ir pareiza. user_not_exist=Lietotājs neeksistē. @@ -398,6 +473,7 @@ repositories=Repozitoriji activity=Publiskā aktivitāte followers=Sekotāji starred=Atzīmēti repozitoriji +watched=Vērotie repozitoriji projects=Projekti following=Seko follow=Sekot @@ -437,9 +513,11 @@ website=Mājas lapa location=Atrašanās vieta update_theme=Mainīt motīvu update_profile=Mainīt profilu +update_language_not_found=Valoda '%s' nav pieejama. update_profile_success=Jūsu profila informācija tika saglabāta. change_username=Lietotājvārds mainīts. change_username_prompt=Piezīme: Šī darbība izmainīs norādes uz šo kontu. +change_username_redirect_prompt=Vecais lietotāja vārds pārsūtīs kamēr vien tas nebūs izmantots. continue=Turpināt cancel=Atcelt language=Valoda @@ -510,14 +588,27 @@ ssh_helper=Vajadzīga palīdzība? Iepazīstieties ar GitHub pa gpg_helper=Vajadzīga palīdzība? Iepazīstieties ar GitHub pamācību par GPG. add_new_key=Pievienot SSH atslēgu add_new_gpg_key=Pievienot GPG atslēgu -key_content_ssh_placeholder=Sākas ar 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384' vai 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=Sākas ar 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com' vai 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=Sākas ar '-----BEGIN PGP PUBLIC KEY BLOCK-----' add_new_principal=Pievienot identitāti ssh_key_been_used=Šī SSH atslēga jau ir pievienota šajā serverī. ssh_key_name_used=SSH atslēga ar šādu nosaukumu šim kontam jau eksistē. ssh_principal_been_used=Šāda identitāte jau ir pievienota šājā serverī. gpg_key_id_used=Publiskā GPG atslēga ar šādu ID jau eksistē. -gpg_no_key_email_found=Jūsu kontam nav piesaistīta neviena no šīs GPG atslēgas e-pasta adresēm. +gpg_no_key_email_found=GPG atslēga neatbilst nevienai Jūsu konta aktivizētajai e-pasta adresei. Šo atslēgu ir iespējams pievienot, veicot, talona parakstīšanu. +gpg_key_matched_identities=Atbilstošās identitātes: +gpg_key_matched_identities_long=Iegultās identitātes šājā atslēgā atbilst sekojošām aktivizētām e-pasta adresēm šim lietotajam. Revīzijas ar atbilstošām e-pasta adresēm var tik pārbaudītas ar šo atslēgu. +gpg_key_verified=Pārbaudītā atslēga +gpg_key_verified_long=Atslēga tika pārbaudīta ar talonu un var tikt izmantota, lai pārbaudītu revīzijas, kas atbilst jebkurai aktivizētai e-pasta adresei šim lietotājam papildus šīs atslēgas atbilstošajām identitātēm. +gpg_key_verify=Pārbaudīt +gpg_invalid_token_signature=Norādītā GPG atslēga, paraksts un talons neatbilst vai talonam ir beidzies derīguma termiņš. +gpg_token_required=Jānorāda paraksts zemāk esošajam talonam +gpg_token=Talons +gpg_token_help=Parakstu ir iespējams uzģenerēt izmantojot komandu: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature=Tekstuāls GPG paraksts +key_signature_gpg_placeholder=Sākas ar '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=GPG atslēga '%s' ir pārbaudīta. subkeys=Apakšatslēgas key_id=Atslēgas ID key_name=Atslēgas nosaukums @@ -549,6 +640,7 @@ principal_state_desc=Šī identitāte ir lietota pēdējās 7 dienās show_openid=Rādīt profilā hide_openid=Paslēpt no profila ssh_disabled=SSH atspējots +ssh_externally_managed=Šim lietotājam SSH atslēga tiek pāvaldīta attālināti manage_social=Pārvaldīt piesaistītos sociālos kontus social_desc=Šis ir saraksts ar Jūsu Gitea kontam piesaistītajiem sociālajiem kontiem. Drošības nolūkos, pārliecinieties, ka atpazīstat visus no tiem, jo tos var izmantot, lai pieslēgtos Jūsu Gitea kontam. unbind=Atsaistīt @@ -615,6 +707,7 @@ or_enter_secret=Vai ievadiet šo noslēpumu: %s then_enter_passcode=Ievadiet piekļuves kodu no lietojumprogrammas: passcode_invalid=Nederīgs piekļuves kods. Mēģiniet ievadīt atkārtoti. twofa_enrolled=Kontam tagad ir ieslēgta divu faktoru autentifikācija. Saglabājiet savu vienreizējo kodu (%s), jo tas vairāk netiks parādīts! +twofa_failed_get_secret=Neizdevās ielādēt noslēpumu. u2f_desc=Drošības atslēgas ir ierīces, kas satur kriptogrāfiskās atslēgas. Tās var tikt izmantotas divu faktoru autentifikācijai. Drošības atslēgām ir jāatbalsta FIDO U2F standarts. u2f_require_twofa=Jūsu kontam ir jābūt ieslēgtai divu faktoru autentifikācijai, lai izmantotu drošības atslēgas. @@ -636,6 +729,7 @@ repos_none=Jums nepieder neviens repozitorijs delete_account=Dzēst savu kontu delete_prompt=Šī darbība pilnībā izdzēsīs Jūsu kontu, kā arī tā ir NEATGRIEZENISKA. +delete_with_all_comments=Jūsu konts ir jaunāks par %s. Lai izveirotos no spoka komentāriem, visu problēmu un izmaiņu pieprasījumu komentāri tiks dzēsti līdz ar kontu. confirm_delete_account=Apstiprināt dzēšanu delete_account_title=Dzēst lietotāja kontu delete_account_desc=Vai tiešām vēlaties dzēst šo kontu? @@ -645,8 +739,18 @@ email_notifications.onmention=Tikai, ja esmu pieminēts email_notifications.disable=Nesūtīt paziņojumus email_notifications.submit=Saglabāt sūtīšanas iestatījumus +visibility=Lietotāja redzamība +visibility.public=Publisks +visibility.public_tooltip=Redzams visiem lietotājiem +visibility.limited=Ierobežota +visibility.limited_tooltip=Redzams tikai autorizētajiem lietotājiem +visibility.private=Privāts +visibility.private_tooltip=Redzams tikai organizāciju dalībniekiem + [repo] +new_repo_helper=Repozitorijs satur projekta visus failus, tai skaitā to izmaiņu vēsturi. Jau ir pieejams citur? Migrējiet repozitoriju. owner=Īpašnieks +owner_helper=Ņemot vērā maksimālā repozitoriju skaita ierobežojumu, ne visas organizācijas var tikt parādītas sarakstā. repo_name=Repozitorija nosaukums repo_name_helper=Labi repozitorija nosaukumi ir īsi, unikāli un tādi, ko viegli atcerēties. repo_size=Repozitorija izmērs @@ -667,17 +771,27 @@ use_template=Izmantot šo sagatavi generate_repo=Ģenerēt repozitoriju generate_from=Ģenerēt no repo_desc=Apraksts +repo_desc_helper=Ievadiet īsu aprakstu (neobligāts) repo_lang=Valoda repo_gitignore_helper=Izvēlieties .gitignore sagatavi. +repo_gitignore_helper_desc=Izvēlieties kādi faili netiks glabāti repozitorijā no sagatavēm biežāk lietotājām valodām. Pēc noklusējuma .gitignore iekļauj valodu kompilācijas rīku artifaktus. issue_labels=Problēmu etiķetes issue_labels_helper=Izvēlieties problēmu etiķešu kopu. license=Licence license_helper=Izvēlieties licences failu. +license_helper_desc=Licence nosaka, ko citi var un ko nevar darīt ar šo kodu. Neesat pārliecintāts, kādu izvēlēties šim projektam? Aplūkojiet licences izvēle. readme=LASIMANI readme_helper=Izvēlieties LASIMANI faila sagatavi. +readme_helper_desc=Šajā vietā ir iespējams detalizēti aprakstīt šo projektu. auto_init=Inicializēt repozitoriju (Pievieno .gitignore, licenci un README) +trust_model_helper=Izvēlieties parakstu pārbaudes uzticamības modeli. Iespējamie varianti ir: +trust_model_helper_collaborator=Līdzstrādnieka: Uzticēties līdzstrādnieku parakstiem +trust_model_helper_committer=Revīzijas iesūtītāja: Uzticēties parakstiem, kas atbilst revīzijas iesūtītājam +trust_model_helper_collaborator_committer=Līdzstrādnieka un revīzijas iesūtītāja: Uzticēties līdzstrādnieku parakstiem, kas atbilst revīzijas iesūtītājam +trust_model_helper_default=Noklusētais: Izmantojiet šī servera noklusēto uzticamības modeli create_repo=Izveidot repozitoriju default_branch=Noklusējuma atzars +default_branch_helper=Noklusētais atzars nosaka pamata atzaru uz kuru tiks veidoti izmaiņu pieprasījumi un koda revīziju iesūtīšana. mirror_prune=Izmest mirror_prune_desc=Izdzēst visas ārējās atsauces, kas ārējā repozitorijā vairs neeksistē mirror_interval=Spoguļošanas biežums (atļautās laika vienības 'h', 'm' un 's'). Ievadiet 0, lai atslēgtu automātisko spoguļošanu. @@ -686,7 +800,14 @@ mirror_address=Spoguļa adrese mirror_address_desc=Pieslēgšanās rekvizītus norādiet autorizācijas sadaļā. mirror_address_url_invalid=Norādītais URL nav korekts. Norādiet visas URL daļas korekti. mirror_address_protocol_invalid=Norādītais URL nav korekts. Var spoguļot tikai no http(s):// vai git:// adresēm. +mirror_lfs=Lielu failu glabātuve (LFS) +mirror_lfs_desc=Aktivizēt LFS datu spoguļošanu. +mirror_lfs_endpoint=LFS galapunkts +mirror_lfs_endpoint_desc=Sinhronizācija mēģinās izmantot klonēsanas URL, lai noteiktu LFS serveri. Var norādīt arī citu galapunktu, ja repozitorija LFS dati ir izvietoti citā vietā. mirror_last_synced=Pēdējo reizi sinhronizēts +mirror_password_placeholder=(bez izmaiņām) +mirror_password_blank_placeholder=(nav uzstādīts) +mirror_password_help=Nomainiet lietotāju, lai izdzēstu saglabāto paroli. watchers=Novērotāji stargazers=Zvaigžņdevēji forks=Atdalītie repozitoriji @@ -703,6 +824,14 @@ delete_preexisting_label=Dzēst delete_preexisting=Dzēst jau eksistējošos failus delete_preexisting_content=Dzēst failus direktorijā %s delete_preexisting_success=Dzēst nepārņemtos failus direktorijā %s +blame_prior=Aplūkot vainīgo par izmaiņām pirms šīs revīzijas + +transfer.accept=Apstiprināt īpašnieka maiņu +transfer.accept_desc=Mainīt īpašnieku uz "%s" +transfer.reject=Noraidīt īpašnieka maiņu +transfer.reject_desc=Atcelt īpašnieka maiņu uz "%s" +transfer.no_permission_to_accept=Jums nav tiesību apstiprināt +transfer.no_permission_to_reject=Jums nav tiesību noraidīt desc.private=Privāts desc.public=Publisks @@ -727,15 +856,21 @@ archive.title=Repozitorijs ir arhivēts. Tam var aplūkot failus un to var klon archive.issue.nocomment=Repozitorijs ir arhivēts. Problēmām nevar pievienot jaunus komentārus. archive.pull.nocomment=Repozitorijs ir arhivēts. Izmaiņu pieprasījumiem nevar pievienot jaunus komentārus. -form.reach_limit_of_creation=Ir sasniegts Jums noteiktais %d repozitoriju ierobežojums. +form.reach_limit_of_creation_1=Sasniegts Jums noteiktais %d repozitorija ierobežojums. +form.reach_limit_of_creation_n=Sasniegts Jums noteiktais %d repozitoriju ierobežojums. form.name_reserved=Repozitorija nosaukums '%s' ir jau rezervēts. form.name_pattern_not_allowed=Repozitorija nosaukums '%s' nav atļauts. -need_auth=Nepieciešama autorizācija +need_auth=Autorizācija migrate_options=Migrācijas opcijas migrate_service=Migrācijas serviss migrate_options_mirror_helper=Šis repozitorijs būs spogulis migrate_options_mirror_disabled=Lapas administrators ir atslēdzies iespēju viedot jaunus spoguļus. +migrate_options_lfs=Migrēt LFS failus +migrate_options_lfs_endpoint.label=LFS galapunkts +migrate_options_lfs_endpoint.description=Migrācija mēģinās izmantot attālināto URL, lai noteiktu LFS serveri. Var norādīt arī citu galapunktu, ja repozitorija LFS dati ir izvietoti citā vietā. +migrate_options_lfs_endpoint.description.local=Iespējams norādīt arī servera ceļu. +migrate_options_lfs_endpoint.placeholder=Atstājiet tukšu, lai noteiktu pēc klonēšanas URL migrate_items=Vienības, ko pārņemt migrate_items_wiki=Vikivietni migrate_items_milestones=Atskaites punktus @@ -749,19 +884,25 @@ migrate.clone_address=Klonēšanas adrese migrate.clone_address_desc=Tā var būt HTTP(S) adrese vai Git 'clone' URL eksistējošam repozitorijam migrate.clone_local_path=vai servera lokālais ceļš migrate.permission_denied=Jums nav tiesību importēt lokālu repozitoriju. +migrate.permission_denied_blocked=Nav atļauts veikt importu no bloķētiem serveriem. +migrate.permission_denied_private_ip=Nav atļauts veikt importu no bloķētiem no privātām IP adresēm. migrate.invalid_local_path=Nederīgs lokālais ceļš. Tas neeksistē vai nav direktorija. +migrate.invalid_lfs_endpoint=LFS galapunkts nav korekts. migrate.failed=Migrācija neizdevās: %v -migrate.lfs_mirror_unsupported=LFS objektu spoguļošana netiek atbalstīta - tā vietā izmantojiet 'git lfs fetch --all' un 'git lfs push --all'. migrate.migrate_items_options=Piekļuves talons ir nepieciešams, lai migrētu papildus datus migrated_from=Migrēts no %[2]s migrated_from_fake=Migrēts no %[1]s migrate.migrate=Migrēt no %s migrate.migrating=Migrācija no %s ... migrate.migrating_failed=Migrācija no %s neizdevās. -migrate.github.description=Migrēt datus no Github.com vai Github Enterprise servera. -migrate.git.description=Migrēt vai spoguļot git datus no Git servisiem -migrate.gitlab.description=Migrēt datus no Gitlab.com vai cita Gitlab servera. -migrate.gitea.description=Migrēt datus no Gitea.com vai cita Gitea servera. +migrate.migrating_failed.error=Kļūda: %s +migrate.migrating_git=Migrē git datus +migrate.migrating_topics=Migrē tēmas +migrate.migrating_milestones=Migrē atskaites punktus +migrate.migrating_labels=Migrē etiķetes +migrate.migrating_releases=Migrē laidienus +migrate.migrating_issues=Migrācijas problēmas +migrate.migrating_pulls=Migrē izmaiņu pieprasījumus mirror_from=spogulis no forked_from=atdalīts no @@ -794,6 +935,7 @@ branch=Atzars tree=Koks clear_ref=`Notīrīt pašreizējo atsauci` filter_branch_and_tag=Filtrēt atzarus vai tagus +find_tag=Atrast tagu branches=Atzari tags=Tagi issues=Problēmas @@ -806,9 +948,14 @@ org_labels_desc_manage=pārvaldīt milestones=Atskaites punkti commits=Revīzijas commit=Revīzija +release=Laidiens releases=Laidieni +tag=Tags +released_this=izveidoja šo laidienu file_raw=Neapstrādāts file_history=Vēsture +file_view_source=Skatīt avotu +file_view_rendered=Skatīt rezultātu file_view_raw=Rādīt neapstrādātu file_permalink=Patstāvīgā saite file_too_large=Šis fails ir par lielu, lai to parādītu. @@ -817,6 +964,8 @@ audio_not_supported_in_browser=Jūsu pārlūks neatbalsta HTML5 audio. stored_lfs=Saglabāts Git LFS symbolic_link=Simboliska saite commit_graph=Revīziju grafs +commit_graph.select=Izvēlieties atzarus +commit_graph.hide_pr_refs=Paslēpt izmaiņu pieprasījumus commit_graph.monochrome=Melnbalts commit_graph.color=Krāsains blame=Vainot @@ -848,6 +997,7 @@ editor.add=Pievienot '%s' editor.update=Atjaunināt '%s' editor.delete=Dzēst '%s' editor.commit_message_desc=Pievienot neobligātu paplašinātu aprakstu… +editor.signoff_desc=Pievienot revīzijas žurnāla ziņojuma beigās Signed-off-by ar revīzijas autoru. editor.commit_directly_to_this_branch=Apstiprināt revīzijas izmaiņas atzarā %s. editor.create_new_branch=Izveidot jaunu atzaru un izmaiņu pieprasījumu šai revīzijai. editor.create_new_branch_np=Izveidot jaunu atzaru šai revīzijai. @@ -868,7 +1018,11 @@ editor.file_already_exists=Fails ar nosaukumu '%s' šajā repozitorijā jau eksi editor.commit_empty_file_header=Iesūtīt tukšu failu editor.commit_empty_file_text=Fails, ko vēlaties iesūtīt, ir tukšs. Vai turpināt? editor.no_changes_to_show=Nav izmaiņu, ko rādīt. +editor.fail_to_update_file=Neizdevās atjaunot/izveidot failu '%s'. +editor.fail_to_update_file_summary=Kļūdas ziņojums: editor.push_rejected_no_message=Izmaiņu iesūtīšana tika noraidīta, bet serveris neatgrieza paziņojumu. Pārbaudiet git āķus šim repozitorijam. +editor.push_rejected=Serveris noraidīja šo izmaiņu. Pārbaudiet git āķus. +editor.push_rejected_summary=Pilns noraidīšanas ziņojums: editor.add_subdir=Pievienot direktoriju… editor.unable_to_upload_files=Neizdevās augšupielādēt failus uz direktoriju '%s', kļūda: %v editor.upload_file_is_locked=Failu '%s' ir nobloķējis %s. @@ -899,7 +1053,9 @@ ext_issues=Ārējās problēmas ext_issues.desc=Saite uz ārējo problēmu sekotāju. projects=Projekti -projects.desc=Pārvaldi problēmas un izmaiņu pieprasījumus uz projektu dēļos. +projects.desc=Pārvaldīt problēmu un izmaiņu pieprasījumu projektu dēļus. +projects.description=Apraksts (neobligāts) +projects.description_placeholder=Apraksts projects.create=Izveidot projektu projects.title=Nosaukums projects.new=Jauns projekts @@ -923,6 +1079,8 @@ projects.board.edit_title=Dēļa nosaukums projects.board.new_title=Dēļa nosaukums projects.board.new_submit=Apstiprināt projects.board.new=Jauns dēlis +projects.board.set_default=Izvēlēties kā noklusēto +projects.board.set_default_desc=Izvēlēties šo dēli kā noklusēto nekategorizētām problēmām un izmaiņu pieteikumiem projects.board.delete=Dzēst dēli projects.board.deletion_desc=Dzēšot projekta dēli visas tam piesaistītās problēmas tiks pārliktas kā nekategorizētas. Vai turpināt? projects.open=Aktīvie @@ -973,6 +1131,11 @@ issues.label_templates.info=Nav izveidota neviena etiķete. Jūs varat noklikš issues.label_templates.helper=Izvēlieties etiķešu kopu issues.label_templates.use=Izmantot etiķešu kopu issues.label_templates.fail_to_load_file=Neizdevās ielādēt etiķetes sagataves failu '%s': %v +issues.add_label=pievienoja %s etiķeti %s +issues.add_labels=pievienoja %s etiķetes %s +issues.remove_label=noņēma %s etiķeti %s +issues.remove_labels=noņēma %s etiķetes %s +issues.add_remove_labels=pievienoja %s un noņēma %s etiķetes %s issues.add_milestone_at=`pievienoja atskaites punktu %s %s` issues.add_project_at=`pievienoja šo problēmu %s projektam %s` issues.change_milestone_at=`nomainīja atskaites punktu no %s uz %s %s` @@ -1001,6 +1164,7 @@ issues.filter_type.all_issues=Visas problēmas issues.filter_type.assigned_to_you=Piešķirtās Jums issues.filter_type.created_by_you=Jūsu izveidotās issues.filter_type.mentioning_you=Esat pieminēts +issues.filter_type.review_requested=Pieprasīta recenzija issues.filter_sort=Kārtot issues.filter_sort.latest=Jaunākie issues.filter_sort.oldest=Vecakie @@ -1022,7 +1186,10 @@ issues.action_milestone_no_select=Nav atskaites punkta issues.action_assignee=Atbildīgais issues.action_assignee_no_select=Nav atbildīgā issues.opened_by=%[3]s atvēra %[1]s +pulls.merged_by=%[3]s sapludināja %[1]s +pulls.merged_by_fake=%[2]s sapludināja %[1]s issues.closed_by=%[3]s aizvēra %[1]s +issues.opened_by_fake=%[2]s atvēra %[1]s issues.closed_by_fake=%[2]s aizvēra %[1]s issues.previous=Iepriekšējā issues.next=Nākamā @@ -1033,11 +1200,13 @@ issues.commented_at=` komentēja %s` issues.delete_comment_confirm=Vai patiešām vēlaties dzēst šo komentāru? issues.context.copy_link=Kopēt saiti issues.context.quote_reply=Atbildēt citējot +issues.context.reference_issue=Atsaukties uz šo jaunā problēmā issues.context.edit=Labot issues.context.delete=Dzēst issues.no_content=Vēl nav satura. issues.close_issue=Aizvērt -issues.pull_merged_at=`sapludināja revīziju %[2]s atzarā %[3]s %[4]s` +issues.pull_merged_at=`sapludināja revīziju %[2]s atzarā %[3]s %[4]s` +issues.manually_pull_merged_at=`manuāli sapludināja revīziju %[2]s atzarā %[3]s %[4]s` issues.close_comment_issue=Komentēt un aizvērt issues.reopen_issue=Atvērt atkārtoti issues.reopen_comment_issue=Komentēt un atvērt atkārtoti @@ -1059,6 +1228,8 @@ issues.re_request_review=Pieprasīt atkārtotu recenziju issues.is_stale=Šajā izmaiņu pieprasījumā ir notikušas izmaiņās, kopš veicāt tā recenziju issues.remove_request_review=Noņemt recenzijas pieprasījumu issues.remove_request_review_block=Nevar noņemt recenzījas pieprasījumu +issues.dismiss_review=Atmest recenziju +issues.dismiss_review_warning=Vai patiešām vēlaties atmest šo recenziju? issues.sign_in_require_desc=Pierakstieties, lai pievienotos šai sarunai. issues.edit=Labot issues.cancel=Atcelt @@ -1103,13 +1274,17 @@ issues.lock.title=Slēgt komentēšanu šai problēmai. issues.unlock.title=Atļaut komentēšanu šai problēmai. issues.comment_on_locked=Jūs nevarat komentēt slēgtai problēmai. issues.tracker=Laika uzskaite -issues.start_tracking_short=Sākt +issues.start_tracking_short=Uzsākt taimeri issues.start_tracking=Uzsākt laika uzskaiti issues.start_tracking_history=` uzsāka darbu %s` issues.tracker_auto_close=Taimeris tiks automātiski apturēts, kad šī problēma tiks aizvērta -issues.stop_tracking=Beigt +issues.tracking_already_started=`Jau ir uzsākta laika uzskaite par citu problēmu!` +issues.stop_tracking=Apturēt taimeri issues.stop_tracking_history=` beidza strādāt %s` +issues.cancel_tracking=Atmest +issues.cancel_tracking_history=` atcēla laika uzskaiti %s` issues.add_time=Manuāli pievienot laiku +issues.del_time=Dzēst šo laika žurnāla ierakstu issues.add_time_short=Pievienot laiku issues.add_time_cancel=Atcelt issues.add_time_history=` pievienoja patērēto laiku %s` @@ -1117,8 +1292,6 @@ issues.del_time_history=`dzēsts patērētais laiks %s` issues.add_time_hours=Stundas issues.add_time_minutes=Minūtes issues.add_time_sum_to_small=Nav norādīts laiks. -issues.cancel_tracking=Atcelt -issues.cancel_tracking_history=` atcēla laika uzskaiti %s` issues.time_spent_total=Kopējais patērētais laiks issues.time_spent_from_all_authors=`Kopējais patērētais laiks: %s` issues.due_date=Izpildes termiņš @@ -1127,7 +1300,7 @@ issues.error_modifying_due_date=Neizdevās izmainīt izpildes termiņu. issues.error_removing_due_date=Neizdevās noņemt izpildes termiņu. issues.push_commit_1=iesūtīja %d revīziju %s issues.push_commits_n=iesūtīja %d revīzijas %s -issues.force_push_codes=`veica piespiedu izmaiņu nosūtīšanu atzaram %[1]s no %[2]s uz %[4]s %[6]s` +issues.force_push_codes=`veica piespiedu izmaiņu iesūtīšanu atzarā %[1]s no revīzijas %[2]s uz %[4]s %[6]s` issues.due_date_form=yyyy-mm-dd issues.due_date_form_add=Pievienot izpildes termiņu issues.due_date_form_edit=Labot @@ -1148,8 +1321,6 @@ issues.dependency.remove=Noņemt issues.dependency.remove_info=Noņemt šo atkarību issues.dependency.added_dependency=`pievienoja jaunu atkarību %s` issues.dependency.removed_dependency=`noņema atkarību %s` -issues.dependency.issue_closing_blockedby=Šī izmaiņu pieprasījuma sapludināšanu bloķē sekojošas problēmas -issues.dependency.pr_closing_blockedby=Šīs problēmas aizvēršanu bloķē sekojošas problēmas issues.dependency.issue_close_blocks=Šī problēma bloķē sekojošu problēmu aizvēršanu issues.dependency.pr_close_blocks=Šis izmaiņu pieprasījums bloķē sekojošu problēmu aizvēršanu issues.dependency.issue_close_blocked=Nepieciešams aizvērt visas problēmas, kas bloķē šo problēmu, lai to varētu aizērt. @@ -1170,6 +1341,8 @@ issues.review.self.approval=Nevar apstiprināt savu izmaiņu pieprasījumi. issues.review.self.rejection=Nevar pieprasīt izmaiņas savam izmaiņu pieprasījumam. issues.review.approve=apstiprināja izmaiņas %s issues.review.comment=recenzēja %s +issues.review.dismissed=atmeta %s recenziju %s +issues.review.dismissed_label=Atmesta issues.review.left_comment=atstāja komentāru issues.review.content.empty=Nepieciešams norādīt komentāru par prasītajām izmaiņām. issues.review.reject=pieprasīja izmaiņas %s @@ -1180,6 +1353,7 @@ issues.review.remove_review_request_self=atteicās recenzēt %s issues.review.pending=Nav iesūtīts issues.review.review=Recenzija issues.review.reviewers=Recenzenti +issues.review.outdated=Novecojis issues.review.show_outdated=Rādīt novecojušu issues.review.hide_outdated=Paslēpt novecojušu issues.review.show_resolved=Rādīt atrisināto @@ -1188,6 +1362,10 @@ issues.review.resolve_conversation=Atrisināt sarunu issues.review.un_resolve_conversation=Atcelt sarunas atrisinājumu issues.review.resolved_by=atzīmēja sarunu kā atrisinātu issues.assignee.error=Ne visi atbildīgie tika pievienoti, jo radās neparedzēta kļūda. +issues.reference_issue.body=Saturs + +compare.compare_base=pamata +compare.compare_head=salīdzināt pulls.desc=Iespējot izmaiņu pieprasījumus un koda recenzēšanu. pulls.new=Jauns izmaiņu pieprasījums @@ -1198,6 +1376,7 @@ pulls.compare_compare=salīdzināmais pulls.filter_branch=Filtrēt atzarus pulls.no_results=Nekas netika atrasts. pulls.nothing_to_compare=Nav ko salīdzināt, jo bāzes un salīdzināmie atzari ir vienādi. +pulls.nothing_to_compare_and_allow_empty_pr=Šie atzari ir vienādi. Izveidotais izmaiņu pieprasījums būs tukšs. pulls.has_pull_request=`Jau eksistē izmaiņu pieprasījums starp šiem diviem atzariem: %[2]s#%[3]d` pulls.create=Izveidot izmaiņu pieprasījumu pulls.title_desc=vēlas sapludināt %[1]d revīzijas no %[2]s uz %[3]s @@ -1210,18 +1389,25 @@ pulls.reopen_to_merge=Atkārtoti atveriet izmaiņu pieprasījumu, lai veiktu sap pulls.cant_reopen_deleted_branch=Šo izmaiņu pieprasīju nevar atkāroti atvērt, jo atzars ir izdzēsts. pulls.merged=Sapludināts pulls.merged_as=Izmaiņu pieprasījums tika sapludināts ar revīziju %[2]s. +pulls.manually_merged=Manuāli sapludināts +pulls.manually_merged_as=Izmaiņu pieprasījums tika sapludināts manuāli ar revīziju %[2]s. pulls.is_closed=Izmaiņu pieprasījums tika aizvērts. pulls.has_merged=Šis izmaiņu pieprasījums tika veiksmīgi sapludināts. pulls.title_wip_desc=`Sāciet virsrakstu ar %s, lai ierobežotu, ka izmaiņu pieprasījums netīšām tiktu sapludināts.` -pulls.cannot_merge_work_in_progress=Šis izmaiņu pieprasījums ir atzīmēts, ka pie tā vēl notiek izstrāde. Noņemiet %s no virsraksta sākuma, kad tas ir pabeigts. +pulls.cannot_merge_work_in_progress=Šis izmaiņu pieprasījums ir atzīmēts, ka pie tā vēl notiek izstrāde. +pulls.still_in_progress=Joprojām notiek izstrāde? +pulls.add_prefix=Pievienot %s prefiksu +pulls.remove_prefix=Noņemt %s prefiksu pulls.data_broken=Izmaiņu pieprasījums ir bojāts, jo dzēsta informācija no atdalītā repozitorija. pulls.files_conflicted=Šīs izmaiņu pieprasījuma izmaiņas konfliktē ar mērķa atzaru. pulls.is_checking=Notiek konfliktu pārbaude, mirkli uzgaidiet un atjaunojiet lapu. +pulls.is_empty=Šis atzars ir vienāds ar mērķa atzaru. pulls.required_status_check_failed=Dažas no pārbaudēm nebija veiksmīgas. pulls.required_status_check_missing=Trūkst dažu obligāto pārbaužu. pulls.required_status_check_administrator=Kā administrators Jūs varat sapludināt šo izmaiņu pieprasījumu. pulls.blocked_by_approvals=Šim izmaiņu pieprasījumam nav nepieciešamais apstiprinājumu daudzums. %d no %d apstiprinājumi piešķirti. pulls.blocked_by_rejection=Šo izmaiņu pieprasījumu nevar sapludināt, jo tam ir peprasītas izmaiņas. +pulls.blocked_by_official_review_requests=Šim izmaiņu pieprasījumam ir oficiālas recenzijas pieprasītās izmaiņas. pulls.blocked_by_outdated_branch=Šis izmaiņu pieprasījums ir bloķēts, jo tas nav aktuāls. pulls.blocked_by_changed_protected_files_1=Šis izmaiņu pieprasījums ir bloķēts, jo izmaina aizsargāto failu: pulls.blocked_by_changed_protected_files_n=Šis izmaiņu pieprasījums ir bloķēts, jo izmaina aizsargātos failus: @@ -1236,21 +1422,26 @@ pulls.reject_count_1=%d izmaiņu pieprasījums pulls.reject_count_n=%d pieprasītas izmaiņas pulls.waiting_count_1=nepieciešama %d recenzija pulls.waiting_count_n=nepieciešamas %d recenzijas +pulls.wrong_commit_id=revīzijas identifikātoram ir jābūt revīzijas identifikatoram no mērķa atzara pulls.no_merge_desc=Šo izmaiņu pieprasījumu nav iespējams sapludināt, jo nav atļauts neviens sapludināšanas veids. pulls.no_merge_helper=Lai sapludinātu šo izmaiņu pieprasījumu, iespējojiet vismaz vienu sapludināšanas veidu repozitorija iestatījumos vai sapludiniet to manuāli. pulls.no_merge_wip=Šo izmaiņu pieprasījumu nav iespējams sapludināt, jo tas ir atzīmēts, ka darbs pie tā vēl nav pabeigts. pulls.no_merge_not_ready=Izmaiņu pieprasījumu nav iespējams sapludināt, pārbaudiet recenziju statusu un statusa pārbaudes. pulls.no_merge_access=Jums nav tiesību sapludināt šo izmaiņu pieprasījumu. -pulls.merge_pull_request=Izmaiņu pieprasījuma sapludināšana -pulls.rebase_merge_pull_request=Pārbāzēt un sapludināt -pulls.rebase_merge_commit_pull_request=Pārbāzēt un sapludināt (--no-ff) -pulls.squash_merge_pull_request=Saspiest un sapludināt +pulls.merge_manually=Manuāli sapludināts +pulls.merge_commit_id=Sapludināšanas revīzijas ID pulls.require_signed_wont_sign=Atzarā var iesūtīt tikai parakstītas revīzijas, bet sapludināšanas revīzijas netiks parakstīta pulls.invalid_merge_option=Nav iespējams izmantot šādu sapludināšanas veidu šim izmaiņu pieprasījumam. +pulls.merge_conflict=Sapludināšana neizdevās: Veicot sapludināšanu, radās konflikts. Mēģiniet izmantot citu sapludināšanas stratēģiju +pulls.merge_conflict_summary=Kļūdas paziņojums +pulls.rebase_conflict=Sapludināšana neizdevās: Veicot pārbāzēšanu uz revīziju %[1]s, radās konflikts. Mēģiniet izmantot citu sapludināšanas stratēģiju +pulls.rebase_conflict_summary=Kļūdas paziņojums ; %[2]s
    %[3]s
    pulls.unrelated_histories=Sapludināšana neizdevās: mērķa un bāzes atzariem nav kopējas vēstures. Ieteikums: izvēlieties citu sapludināšanas stratēģiju pulls.merge_out_of_date=Sapludināšana neizdevās: sapludināšanas laikā, bāzes atzarā tika iesūtītas izmaiņas. Ieteikums: mēģiniet atkārtoti. +pulls.push_rejected=Sapludināšana neizdevās: iesūtīšana tika noraidīta. Pārbaudiet git āķus šim repozitorijam. +pulls.push_rejected_summary=Pilns noraidīšanas ziņojums pulls.push_rejected_no_message=Sapludināšana neizdevās: Izmaiņu iesūtīšana tika noraidīta, bet serveris neatgrieza paziņojumu.
    Pārbaudiet git āķus šim repozitorijam pulls.open_unmerged_pull_exists=`Jūs nevarat veikt atkārtotas atvēršanas darbību, jo jau eksistē izmaiņu pieprasījums (#%d) ar šādu sapludināšanas informāciju.` pulls.status_checking=Dažas pārbaudes vēl tiek veiktas @@ -1266,7 +1457,10 @@ pulls.update_not_allowed=Jums nav tiesību veikt atzara atjaunošanu pulls.outdated_with_base_branch=Atzars ir novecojis salīdzinot ar bāzes atzaru pulls.closed_at=`aizvēra šo izmaiņu pieprasījumu %[2]s` pulls.reopened_at=`atkārtoti atvēra šo izmaiņu pieprasījumu %[2]s` +pulls.merge_instruction_hint=`Varat aplūkot arī komandrindas instrukcijas.` +pulls.merge_instruction_step1_desc=Projekta repozitorijā izveidojiet jaunu jaunu atzaru un pārbaudiet savas izmaiņas. +pulls.merge_instruction_step2_desc=Sapludināt izmaiņas un atjaunot tās Gitea. milestones.new=Jauns atskaites punkts milestones.open_tab=%d atvērti @@ -1370,7 +1564,7 @@ activity.closed_issues_count_1=Slēgta problēma activity.closed_issues_count_n=Slēgtas problēmas activity.title.issues_1=%d problēmu activity.title.issues_n=%d problēmas -activity.title.issues_closed_by=%s slēdza %s +activity.title.issues_closed_from=%s aizvērts no %s activity.title.issues_created_by=%s izveidoja %s activity.closed_issue_label=Slēgta activity.new_issues_count_1=Jauna problēma @@ -1408,6 +1602,8 @@ activity.git_stats_deletion_n=%d dzēšanas search=Meklēt search.search_repo=Meklēšana repozitorijā +search.fuzzy=Aptuveni +search.match=Precīzi search.results=Meklēšanas rezultāti nosacījumam "%s" repozitorijā %s settings=Iestatījumi @@ -1423,6 +1619,15 @@ settings.hooks=Tīmekļa āķi settings.githooks=Git āķi settings.basic_settings=Pamatiestatījumi settings.mirror_settings=Spoguļa iestatījumi +settings.mirror_settings.docs=Konfigurējiet projektu, lai automātiski iesūtītu un/vai saņemtu izmaiņas uz/no cita repozitorija. Atzari, tagi un revīzijas tiks automātiski sinhronizētas. Kā spoguļot repozitorijus? +settings.mirror_settings.mirrored_repository=Spoguļotais repozitorijs +settings.mirror_settings.direction=Virziens +settings.mirror_settings.direction.pull=Izmaiņu saņemšana +settings.mirror_settings.direction.push=Izmaiņu nosūtīšana +settings.mirror_settings.last_update=Pēdējās izmaiņas +settings.mirror_settings.push_mirror.none=Nav konfigurēts iesūtīšanas spogulis +settings.mirror_settings.push_mirror.remote_url=Git attālinātā repozitorija URL +settings.mirror_settings.push_mirror.add=Pievienot iesūtīšanas spoguli settings.sync_mirror=Sinhronizēt tagad settings.mirror_sync_in_progress=Notiek spoguļa sinhronizācija. Atjaunojiet lapu, lai pārbaudītu atkārtoti, pēc brīža. settings.email_notifications.enable=Iespējot e-pasta paziņojumus @@ -1431,6 +1636,7 @@ settings.email_notifications.disable=Nesūtīt paziņojumus settings.email_notifications.submit=Saglabāt sūtīšanas iestatījumus settings.site=Mājas lapa settings.update_settings=Mainīt iestatījumus +settings.branches.update_default_branch=Atjaunot noklusēto atzaru settings.advanced_settings=Papildu iestatījumi settings.wiki_desc=Iespējot vikivietnes settings.use_internal_wiki=Izmantot iebūvēto vikivietni @@ -1458,6 +1664,9 @@ settings.pulls.allow_merge_commits=Iespējot revīziju sapludināšanu settings.pulls.allow_rebase_merge=Iespējot pārbāzēšanu sapludinot revīzijas settings.pulls.allow_rebase_merge_commit=Iespējot pārbāzēšanu sapludinot revīzijas (--no-ff) settings.pulls.allow_squash_commits=Iespējot saspiešanu sapludinot revīzijas +settings.pulls.allow_manual_merge=Iespējot atzīmēt izmaiņu pieprasījumu kā manuāli sapludinātu +settings.pulls.enable_autodetect_manual_merge=Iespējot manuālo sapludināšanas noteikšanu (Piezīme: dažos speciālos gadījumos, tas var nostrādāt nekorekti) +settings.pulls.default_delete_branch_after_merge=Pēc noklusējuma dzēst izmaiņu pieprasījuma atzaru pēc sapludināšanas settings.projects_desc=Iespējot repozitorija projektus settings.admin_settings=Administratora iestatījumi settings.admin_enable_health_check=Iespējot veselības pārbaudi (git fsck) šim repozitorijam @@ -1475,10 +1684,21 @@ settings.convert_fork_notices_1=Šī darbība mainīs atdalīto repozitoriju uz settings.convert_fork_confirm=Konvertēt repozitoriju settings.convert_fork_succeed=Atdalītais repozitorijs tika izmainīts par neatkarīgu repozitoriju. settings.transfer=Mainīt īpašnieku +settings.transfer.rejected=Repozitorija īpašnieka maiņas pieprasījums tika noraidīts. +settings.transfer.success=Repozitorija īpašnieka maiņa veiksmīga. +settings.transfer_abort=Atcelt īpašnieka maiņu +settings.transfer_abort_invalid=Nevar atcelt neeksistējošu repozitorija īpašnieka maiņu. +settings.transfer_abort_success=Repozitrija īpašnieks tika veiksmīgi nomainīts uz %s. settings.transfer_desc=Mainīt šī repozitorija īpašnieku uz citu lietotāju vai organizāciju, kurai Jums ir administratora tiesības. +settings.transfer_form_title=Ievadiet repozitorija nosaukumu, lai apstiprinātu: +settings.transfer_in_progress=Pašlaik jau tiek veikta repozitorija īpašnieka maiņa. Atceliet iepriekšējo īpašnieka maiņu, ja vēlaties mainīt uz citu. settings.transfer_notices_1=- Jūs zaudēsiet piekļuvi, ja jaunais īpašnieks ir individuāls lietotājs. settings.transfer_notices_2=- Jūs saglabāsiet piekļuvi, ja jaunais īpašnieks ir organizācija un Jūs esat viens no tās īpašniekiem. -settings.transfer_form_title=Ievadiet repozitorija nosaukumu, lai apstiprinātu: +settings.transfer_notices_3=- Ja repozitorijs ir privāts un tas tiks pārsūtīts lietotājam, tad pārliecināties, ka lietotājam ir vismaz skatīšanās tiesības (veiciet nepieciešamās izmaiņas, ja nepieciešams). +settings.transfer_owner=Jaunais īpašnieks +settings.transfer_perform=Veikt īpašnieka maiņu +settings.transfer_started=Šim repozitorijam tiek veikta īpašnieka maiņa un nepieciešams apstiprinājums no "%s" +settings.transfer_succeed=Repozitorijs tika pārcelts. settings.signing_settings=Parakstu pārbaudes iestatījumi settings.trust_model=Uzticēšanās modelis parakstiem settings.trust_model.default=Noklusējuma uzticēšanās modelis @@ -1488,6 +1708,7 @@ settings.trust_model.collaborator.long=Līdzstrādnieka: Uzticēties līdzstrād settings.trust_model.collaborator.desc=Ticami līdzstrādnieku paraksti tiks atzīmēti kā "uzticami" (neatkarīgi no tā vai tie atbilst revīzijas iesūtītājam vai nē). Citos gadījumos ticami paraksti tiks atzīmēti kā "neuzticami", ja paraksts atbilst revīzijas iesūtītājam vai "nesakrītošs", ja neatbilst. settings.trust_model.committer=Revīzijas iesūtītāja settings.trust_model.committer.long=Revīzijas iesūtītāja: Uzticēties parakstiem, kas atbilst revīzijas iesūtītājiem (Šis atbilst GitHub uzvedībai un piespiedīs Gitea parakstītām revīzijām būt Gitea kā revīzijas iesūtītājam) +settings.trust_model.committer.desc=Ticami paraksti tiks atzīmēti kā "uzticami", ja tie atbilst revīzijas iesūtītājam, citos gadījumos tie tiks atzīmēti kā "nesakrītoši". Šis nozīmē, ka Gitea būs kā revīzijas iesūtītājs parakstītām revīzijām, kur īstais revīzijas iesūtītājs tiks atīzmēts revīzijas komentāra beigās ar tekstu Co-authored-by: un Co-committed-by:. Noklusētajai Gitea atslēgai ir jāatbilst lietotājam datu bāzē. settings.trust_model.collaboratorcommitter=Līdzstrādnieka un revīzijas iesūtītāja settings.trust_model.collaboratorcommitter.long=Līdzstrādnieka un revīzijas iesūtītāja: Uzticēties līdzstrādnieku parakstiem, kas atbilst revīzijas iesūtītājam settings.trust_model.collaboratorcommitter.desc=Ticami līdzstrādnieku paraksti tiks atzīmēti kā "uzticami", ja tie atbilst revīzijas iesūtītājam, citos gadījumos tie tiks atzīmēti kā "neuzticami", ja paraksts atbilst revīzijas iesūtītajam, vai "nesakrītoši", ja neatbilst. Šis nozīmē, ka Gitea būs kā revīzijas iesūtītājs parakstītām revīzijām, kur īstais revīzijas iesūtītājs tiks atīzmēts revīzijas komentāra beigās ar tekstu Co-Authored-By: un Co-Committed-By:. Noklusētajai Gitea atslēgai ir jāatbilst lietotājam datu bāzē. @@ -1503,9 +1724,6 @@ settings.delete_notices_2=- Šī darbība neatgriezeniski izdzēsīs visu repozi settings.delete_notices_fork_1=- Visi atdalītie repozitoriju pēc dzēšanas kļūs neatkarīgi. settings.deletion_success=Repozitorijs tika izdzēsts. settings.update_settings_success=Repozitorija iestatījumi tika saglabāti. -settings.transfer_owner=Jaunais īpašnieks -settings.make_transfer=Veikt pārcelšanu -settings.transfer_succeed=Repozitorijs tika pārcelts. settings.confirm_delete=Dzēst repozitoriju settings.add_collaborator=Pievienot līdzstrādnieku settings.add_collaborator_success=Jauns līdzstrādnieks tika pievienots. @@ -1600,7 +1818,7 @@ settings.event_pull_request_review_desc=Izmaiņu pieprasījums apstiprināts, no settings.event_pull_request_sync=Izmaiņu pieprasījums sinhronizēts settings.event_pull_request_sync_desc=Izmaiņu pieprasījums sinhronizēts. settings.branch_filter=Atzaru filtrs -settings.branch_filter_desc=Atzaru ierobežojumi izmaiņu iesūtīšanas, zaru izveidošanas vai dzēšanas notikumien, izmantojot, glob izteiksmi. Ja norādīts tukšs vai *, notikumi uz visiem zariem tiks nosūtīti. Skatieties github.com/gobwas/glob pieraksta dokumentāciju. Piemērs: master, {master,release*}. +settings.branch_filter_desc=Atzaru ierobežojumi izmaiņu iesūtīšanas, zaru izveidošanas vai dzēšanas notikumiem, izmantojot, glob šablonu. Ja norādīts tukšs vai *, tiks nosūtīti notikumi no visiem zariem. Skatieties github.com/gobwas/glob pieraksta dokumentāciju. Piemērs: master, {master,release*}. settings.active=Aktīvs settings.active_helper=Informācija par notikumiem tiks nosūtīta uz šo tīmekļa āķa URL. settings.add_hook_success=Tīmekļa āķis tika pievienots. @@ -1670,7 +1888,7 @@ settings.dismiss_stale_approvals_desc=Kad tiek iesūtītas jaunas revīzijas, ka settings.require_signed_commits=Pieprasīt parakstītas revīzijas settings.require_signed_commits_desc=Noraidīt iesūtītās izmaiņas šim atzaram, ja tās nav parakstītas vai nav iespējams pārbaudīt. settings.protect_protected_file_patterns=Aizsargāto failu šablons (vairākus var norādīt atdalot ar semikolu '\;'): -settings.protect_protected_file_patterns_desc=Aizsargātie faili, ko nevar mainīt, pat ja lietotājam ir tiesības veidot jaunus, labot vai dzēst failus šajā atzarā. Vairākus šablons ir iespējams norādīt atdalot tos ar semikolu ('\;'). Sīkāka informācija par šabloniem pieejama github.com/gobwas/glob dokumentācijā. Piemēram, .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns_desc=Aizsargātie faili, ko nevar mainīt, pat ja lietotājam ir tiesības veidot jaunus, labot vai dzēst failus šajā atzarā. Vairākus šablons ir iespējams norādīt atdalot tos ar semikolu ('\;'). Sīkāka informācija par šabloniem pieejama github.com/gobwas/glob dokumentācijā. Piemēram, .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Iespējot aizsargāšanu settings.delete_protected_branch=Atspējot aizsargāšanu settings.update_protect_branch_success=Atzara aizsardzība atzaram '%s' tika saglabāta. @@ -1679,13 +1897,26 @@ settings.protected_branch_deletion=Atspējot atzara aizsardzību settings.protected_branch_deletion_desc=Atspējojot atzara aizsardzību, ļaus lietotājiem ar rakstīšanas tiesībām nosūtīt izmaiņas uz atzaru. Vai turpināt? settings.block_rejected_reviews=Neļaut sapludināt izmaiņu pieprasījumus, kam ir pieprasītas izmaiņas settings.block_rejected_reviews_desc=Sapludināšana nebūs iespējama, kad ir pieprasītas izmaiņas, pat ja ir nepieciešamais apstiprinājumu skaits. +settings.block_on_official_review_requests=Bloķēt sapludināšanu, ja ir oficiālas recenzijas pieprasītās izmaiņas +settings.block_on_official_review_requests_desc=Sapludināšana nebūs iespējama, ja ir pieprasītas oficiālas recenzijas izmaiņas, pat ja ir pietiekošs apstiprinājumu skaits. settings.block_outdated_branch=Bloķēt sapludināšanau, ja izmaiņu pieprasījums ir novecojis settings.block_outdated_branch_desc=Sapludināšana nebūs pieejama, ja atzars būs atpalicis no bāzes atzara. settings.default_branch_desc=Norādiet noklusēto repozitorija atzaru izmaiņu pieprasījumiem un koda revīzijām: +settings.default_merge_style_desc=Noklusētais sapludināšanas veids izmaiņu pieprasījumiem: settings.choose_branch=Izvēlieties atzaru… settings.no_protected_branch=Nav neviena aizsargātā atzara. settings.edit_protected_branch=Labot settings.protected_branch_required_approvals_min=Pieprasīto recenziju skaits nevar būt negatīvs. +settings.tags=Tagi +settings.tags.protection=Tagu aizsargāšana +settings.tags.protection.pattern=Tagu šablons +settings.tags.protection.allowed=Atļauts +settings.tags.protection.allowed.users=Atļauts lietotājiem +settings.tags.protection.allowed.teams=Atļauts komandām +settings.tags.protection.allowed.noone=Nevienam +settings.tags.protection.create=Aizsargāt tagus +settings.tags.protection.none=Nav uzstādīta tagu aizsargāšana. +settings.tags.protection.pattern.description=Var izmantot pilnu nosaukumu, glob šablonu vai regulāro izteiksmi, lai aizsargātu vairākus tagus. Detalizētāk var izlasīt tagu aizsargāšanas pamācībā. settings.bot_token=Bota talons settings.chat_id=Tērzēšanas ID settings.matrix.homeserver_url=Mājas servera URL @@ -1699,6 +1930,7 @@ settings.archive.success=Repozitorijs veiksmīgi arhivēts. settings.archive.error=Arhivējot repozitoriju radās neparedzēta kļūda. Pārbaudiet kļūdu žurnālu, lai uzzinātu sīkāk. settings.archive.error_ismirror=Nav iespējams arhivēt spoguļotus repozitorijus. settings.archive.branchsettings_unavailable=Atzaru iestatījumi nav pieejami, ja repozitorijs ir arhivēts. +settings.archive.tagsettings_unavailable=Tagu iestatījumi nav pieejami, ja repozitorijs ir arhivēts. settings.unarchive.button=Atcelt arhivāciju settings.unarchive.header=Atcelt repozitorija arhivāciju settings.unarchive.text=Atceļot repozitoriju arhivāciju, tam atkal varēs iesūtīt jaunas izmaiņas, kā arī pieteikt problēmas un veidot izmaiņu pieprasījumus. @@ -1748,7 +1980,9 @@ diff.whitespace_ignore_all_whitespace=Ignorēt atstarpes salīdzinot rindas diff.whitespace_ignore_amount_changes=Ignorēt atstarpju daudzuma izmaiņas diff.whitespace_ignore_at_eol=Ignorēt atstarpju izmaiņas rindu beigās diff.stats_desc=%d mainītis faili ar %d papildinājumiem un %d dzēšanām +diff.stats_desc_file=%d izmaiņas: %d pievienotas un %d dzēstas diff.bin=Binārs +diff.bin_not_shown=Bināro failu nav iespējams attēlot. diff.view_file=Parādīt failu diff.file_before=Pirms diff.file_after=Pēc @@ -1756,6 +1990,7 @@ diff.file_image_width=Platums diff.file_image_height=Augstums diff.file_byte_size=Izmērs diff.file_suppressed=Failā izmaiņas netiks attēlotas, jo tās ir par lielu +diff.file_suppressed_line_too_long=Faila izmaiņas netiek rādītas, jo viena vai vairākas līnijas ir pārāk garas diff.too_many_files=Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels diff.comment.placeholder=Ievadiet komentāru diff.comment.markdown_info=Tiek atbalstīta formatēšana ar Markdown. @@ -1771,13 +2006,19 @@ diff.review.approve=Apstiprināt diff.review.reject=Pieprasīt izmaiņas diff.committed_by=revīziju iesūtīja diff.protected=Aizsargāts +diff.image.side_by_side=Blakus +diff.image.swipe=Pārvelkot +diff.image.overlay=Pārklājoši releases.desc=Pārvaldiet projekta versijas un lejupielādes. release.releases=Laidieni +release.detail=Laidiena papildus informācija +release.tags=Tagi release.new_release=Jauns laidiens release.draft=Melnraksts release.prerelease=Pirmsizlaides versija release.stable=Stabila +release.compare=Salīdzināt release.edit=labot release.ahead.commits=%d revīzijas release.ahead.target=no %s kopš laidiena publicēšanas @@ -1796,12 +2037,20 @@ release.publish=Publicēt laidienu release.save_draft=Saglabāt melnrakstu release.edit_release=Labot laidienu release.delete_release=Dzēst laidienu +release.delete_tag=Dzēst tagu release.deletion=Dzēst laidienu +release.deletion_desc=Dzēšot laidienu, tas tiks izdzēsts no Gitea. Git tags, repozitorija saturs un vēsture paliks nemainīti. Vai turpināt? release.deletion_success=Laidiens tika izdzēsts. +release.deletion_tag_desc=Tiks izdzēsts tags no repozitorija. Repozitorija saturs un vēsture netiks mainīta. Vai turpināt? +release.deletion_tag_success=Tags tika izdzēsts. release.tag_name_already_exist=Laidiens ar šādu taga nosaukumu jau eksistē. release.tag_name_invalid=Nekorekts taga nosaukums. +release.tag_name_protected=Taga nosaukums ir aizsargāts. +release.tag_already_exist=Tags ar šādu nosaukumu jau eksistē. release.downloads=Lejupielādes release.download_count=Lejupielādes: %s +release.add_tag_msg=Izmantot laidiena nosaukumu un saturu kā taga aprakstu. +release.add_tag=Izveidot tikai tagu branch.name=Atzara nosaukums branch.search=Meklēt atzarus @@ -1828,12 +2077,23 @@ branch.restore=Atjaunot atzaru '%s' branch.download=Lejupielādēt atzaru '%s' branch.included_desc=Šis atzars ir daļa no noklusēta atzara branch.included=Iekļauts +branch.create_new_branch=Izveidot jaunu atzaru no atzara: +branch.confirm_create_branch=Izveidot atzaru +branch.new_branch=Izveidot jaunu atzaru +branch.new_branch_from=Izveidot jaunu atzaru no '%s' + +tag.create_tag=Izveidot tagu %s +tag.create_success=Tags '%s' tika izveidots. topic.manage_topics=Pārvaldīt tēmas topic.done=Gatavs topic.count_prompt=Nevar pievienot vairāk kā 25 tēmas topic.format_prompt=Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara. +error.csv.too_large=Nevar attēlot šo failu, jo tas ir pārāk liels. +error.csv.unexpected=Nevar attēlot šo failu, jo tas satur neparedzētu simbolu %d. līnijas %d. kolonnā. +error.csv.invalid_field_count=Nevar attēlot šo failu, jo tas satur nepareizu skaitu ar laukiem %d. līnijā. + [org] org_name_holder=Organizācijas nosaukums org_full_name_holder=Organizācijas pilnais nosaukums @@ -1877,6 +2137,7 @@ settings.visibility.private_shortname=Privāta settings.update_settings=Mainīt iestatījumus settings.update_setting_success=Organizācijas iestatījumi tika saglabāti. settings.change_orgname_prompt=Ņemiet vērā: Mainot organizācijas nosaukumu tiks izmainītas šīs organizācijas saites. +settings.change_orgname_redirect_prompt=Vecais vārds pārsūtīs uz jauno, kamēr vien tas nebūs izmantots. settings.update_avatar_success=Organizācijas attēls tika saglabāts. settings.delete=Dzēst organizāciju settings.delete_account=Dzēst šo organizāciju @@ -1948,8 +2209,7 @@ dashboard=Infopanelis users=Lietotāju konti organizations=Organizācijas repositories=Repozitoriji -hooks=Noklusēti tīmekļa āķi -systemhooks=Sistēmas tīmekļa āķi +hooks=Tīmekļa āķi authentication=Autentificēšanas avoti emails=Lietotāja e-pasts config=Konfigurācija @@ -1981,7 +2241,7 @@ dashboard.cron.error=Kļūda Cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s pabeigts dashboard.delete_inactive_accounts=Dzēst visus neaktivizētos kontus dashboard.delete_inactive_accounts.started=Uzdevums visu neaktivizēto kontu dzēšanai uzsākts. -dashboard.delete_repo_archives=Dzēst visu repozitoriju arhīvus +dashboard.delete_repo_archives=Dzēst visu repozitoriju arhīvus (ZIP, TAR.GZ utt.) dashboard.delete_repo_archives.started=Uzdevums visu repozitoriju arhīvu dzēšanai uzsākts. dashboard.delete_missing_repos=Dzēst visus repozitorijus, kam trūkst Git failu dashboard.delete_missing_repos.started=Uzdevums visu repozitoriju dzēšanai, kam trūkst git failu, uzsākts. @@ -2000,6 +2260,7 @@ dashboard.resync_all_sshprincipals.desc=(Nav nepieciešams iebūvētajam SSH ser dashboard.resync_all_hooks=Pārsinhronizēt pirms-saņemšanas, atjaunošanas un pēc-saņemšanas āķus visiem repozitorijiem. dashboard.reinit_missing_repos=Atkārtoti inicializēt visus pazaudētos Git repozitorijus par kuriem eksistē ieraksti dashboard.sync_external_users=Sinhronizēt ārējo lietotāju datus +dashboard.cleanup_hook_task_table=Iztīrīt tīmekļa āķu vēsturi dashboard.server_uptime=Servera darbības laiks dashboard.current_goroutine=Izmantotās Gorutīnas dashboard.current_memory_usage=Pašreiz izmantotā atmiņa @@ -2029,6 +2290,8 @@ dashboard.total_gc_time=Kopējais GC izpildes laiks dashboard.total_gc_pause=Kopējais GC izpildes laiks dashboard.last_gc_pause=Pedējās GC izpildes laiks dashboard.gc_times=GC reizes +dashboard.delete_old_actions=Dzēst visas darbības no datu bāzes +dashboard.delete_old_actions.started=Uzsākta visu novecojušo darbību dzēšana no datu bāzes. users.user_manage_panel=Lietotāju kontu pārvaldība users.new_account=Izveidot lietotāja kontu @@ -2066,6 +2329,7 @@ users.delete_account=Dzēst lietotāja kontu users.still_own_repo=Lietotājam pieder repozitoriji, tos sākumā ir nepieciešams izdzēst vai mainīt to īpašnieku. users.still_has_org=Šis lietotājs ir vienas vai vairāku organizāciju biedrs, lietotāju sākumā ir nepieciešams pamest šīs organizācijas vai viņu no tām ir jāizdzēš. users.deletion_success=Lietotāja konts veiksmīgi izdzēsts. +users.reset_2fa=Noņemt 2FA emails.email_manage_panel=Lietotāju e-pastu pārvaldība emails.primary=Primārais @@ -2098,10 +2362,12 @@ repos.forks=Atdalītie repos.issues=Problēmas repos.size=Izmērs -hooks.desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem notikumiem, kas notiek Gitea. Kad iestāsies kāds notikums, katram ārējā servisa URL tiks nosūtīts POST pieprasījums. Šeit izveidotie tīmekļa āķi tiks pievienoti visiem jaunajajiem repozitorijiem. Lai uzzinātu sīkāk skatieties tīmekļa āķu rokasgrāmatā. -hooks.add_webhook=Pievienot noklusēto tīmekļa āķi -hooks.update_webhook=Mainīt noklusēto tīmekļa āķi +defaulthooks=Noklusētie tīmekļa āķi +defaulthooks.desc=Tīmekļa āķi ļauj paziņot ārējiem servisiem par noteiktiem notikumiem, kas notiek Gitea. Kad iestāsies kāds notikums, katram ārējā servisa URL tiks nosūtīts POST pieprasījums. Šeit izveidotie tīmekļa āķi tiks pievienoti visiem jaunajajiem repozitorijiem. Lai uzzinātu sīkāk skatieties tīmekļa āķu rokasgrāmatā. +defaulthooks.add_webhook=Pievienot noklusēto tīmekļa āķi +defaulthooks.update_webhook=Mainīt noklusēto tīmekļa āķi +systemhooks=Sistēmas tīmekļa āķi systemhooks.desc=Tīmekļa āķi automātiski veic HTTP POST pieprasījumus uz serveri, kad notiek noteikti Gitea notikumi. Tīmekļa āķi izpildīsies uz visu servera repozitoriju notikumiem, tāpēc būtu jāņem vērā, ka tas var radīt ātrdarbības problēmas. Vairāk par tiem var uzzināt tīmekļa āķu dokumentācijā. systemhooks.add_webhook=Pievienot sistēmas tīmekļa āķi systemhooks.update_webhook=Mainīt sistēmas tīmekļa āķi @@ -2121,7 +2387,6 @@ auths.host=Resursdators auths.port=Ports auths.bind_dn=Saistīšanas DN auths.bind_password=Saistīšanas parole -auths.bind_password_helper=Brīdinājums: Šī parole tiks glabāta nešifrētā veidā. Ieteicams izmantot kontu ar tikai lasīšanas tiesībām. auths.user_base=Lietotāja pamatnosacījumi auths.user_dn=Lietotāja DN auths.attribute_username=Lietotājvārda atribūts @@ -2149,10 +2414,11 @@ auths.smtphost=SMTP resursdators auths.smtpport=SMTP ports auths.allowed_domains=Atļautie domēni auths.allowed_domains_helper=Atstājiet tukšu, lai atļautu visus domēnus. Lai norādītu vairākus domēnus, tos var atdalīt ar komatu (','). -auths.enable_tls=Iespējot TLS šifrēšanu auths.skip_tls_verify=Izlaist TLS pārbaudi auths.pam_service_name=PAM servisa nosaukums +auths.pam_email_domain=PAM e-pasta domēns (neobligāts) auths.oauth2_provider=OAuth2 pakalpojuma sniedzējs +auths.oauth2_icon_url=Ikonas URL auths.oauth2_clientID=Klienta ID (atslēga) auths.oauth2_clientSecret=Klienta noslēpums auths.openIdConnectAutoDiscoveryURL=OpenID Connect automātiskās atklāšanas URL @@ -2188,6 +2454,7 @@ auths.tip.twitter=Dodieties uz adresi https://dev.twitter.com/apps, izveidojiet auths.tip.discord=Reģistrējiet jaunu aplikāciju adresē https://discordapp.com/developers/applications/me auths.tip.gitea=Reģistrēt jaunu OAuth2 lietojumprogrammu. Pamācību iespējams atrast https://docs.gitea.io/en-us/oauth2-provider/ auths.tip.yandex=Izveidojiet jaunu aplikāciju adresē https://oauth.yandex.com/client/new. Izvēlieties sekojošas tiesības "Yandex.Passport API" sadaļā: "Access to email address", "Access to user avatar" un "Access to username, first name and surname, gender" +auths.tip.mastodon=Norādiet pielāgotu mastodon instances URL, ar kuru vēlaties autorizēties (vai izmantojiet noklusēto) auths.edit=Labot autentifikācijas avotu auths.activated=Autentifikācijas avots ir atkivizēts auths.new_success=Jauna autentifikācija'%s' tika pievienota. @@ -2249,6 +2516,7 @@ config.db_path=Ceļš config.service_config=Pakalpojuma konfigurācija config.register_email_confirm=Reģistrējoties pieprasīt apstiprināt e-pasta adresi config.disable_register=Atspējot lietotāju reģistrāciju +config.allow_only_internal_registration=Atļaut reģistrāciju tikai no Gitea config.allow_only_external_registration=Atļaut reģistrēties tikai ar ārējiem servisiem config.enable_openid_signup=Iespējot reģistrāciju, izmantojot OpenID config.enable_openid_signin=Iespējot OpenID autorizāciju @@ -2325,7 +2593,6 @@ config.git_gc_timeout=GC darbības noilgums config.log_config=Žurnalizēšanas konfigurācija config.log_mode=Žurnalizēšanas veids -config.macaron_log_mode=Macaron žurnalizēšanas veids config.own_named_logger=Pielāgots žurnalizētājs config.routes_to_default_logger=Pārsūtīt uz noklusēto žurnalizētāju config.go_log=Izmanto Go žurnalizēšanu (pārsūtīts uz noklusēto) @@ -2431,7 +2698,6 @@ comment_issue=`pievienoja komentāru problēmai %s#%[2]s< comment_pull=`komentēja izmaiņu pieprasījumu %s#%[2]s` merge_pull_request=`sapludināja izmaiņu pieprasījumu %s#%[2]s` transfer_repo=mainīja repozitorija %s īpašnieku uz %s -push_tag=pievienoja tagu %[2]s repozitorijam %[3]s delete_tag=izdzēsa tagu %[2]s no %[3]s delete_branch=izdzēsa atzaru %[2]s no %[3]s compare_branch=Salīdzināt @@ -2443,6 +2709,9 @@ mirror_sync_delete=ar spoguli sinhronizēta un izdzēsta atsauce %[2]s%s#%[2]s` reject_pull_request=`ieteica izmaiņas %s#%[2]s` publish_release=`publicēts laidiens "%[4]s" saitē %[3]s` +review_dismissed=`atmeta recenziju no %[4]s izmaiņu pieprasījumam %[3]s#%[2]s` +review_dismissed_reason=Iemesls: +create_branch=izveidoja atzaru %[3]s repozitorijā %[4]s [tool] ago=pirms %s diff --git a/options/locale/locale_ml-IN.ini b/options/locale/locale_ml-IN.ini index ba9e5bd80..efe155673 100644 --- a/options/locale/locale_ml-IN.ini +++ b/options/locale/locale_ml-IN.ini @@ -75,6 +75,7 @@ loading=ലഭ്യമാക്കുന്നു… + [error] [startpage] @@ -249,7 +250,6 @@ openid_connect_desc=തിരഞ്ഞെടുത്ത ഓപ്പൺഐഡ openid_register_title=അംഗത്വമെടുക്കുക openid_register_desc=തിരഞ്ഞെടുത്ത ഓപ്പൺഐഡി യുആർഐ അജ്ഞാതമാണ്. ഇവിടെ നിന്നും ഒരു പുതിയ അക്കൗണ്ടുമായി ബന്ധപ്പെടുത്തുക. openid_signin_desc=നിങ്ങളുടെ OpenID URI നൽകുക. ഉദാഹരണത്തിന്: https://anne.me, bob.openid.org.cn അല്ലെങ്കിൽ gnusocial.net/carry. -disable_forgot_password_mail=അക്കൗണ്ട് വീണ്ടെടുക്കൽ പ്രവർത്തനരഹിതമാണ്. നിങ്ങളുടെ സൈറ്റ് അഡ്മിനിസ്ട്രേറ്ററുമായി ബന്ധപ്പെടുക. email_domain_blacklisted=നിങ്ങളുടെ ഇമെയിൽ വിലാസത്തിൽ രജിസ്റ്റർ ചെയ്യാൻ കഴിയില്ല. authorize_application=അപ്ലിക്കേഷനു് അംഗീകാരം നല്കുക authorize_application_created_by=%s സൃഷ്‌ടിച്ച അപ്ലിക്കേഷൻ ആണ്. @@ -259,12 +259,22 @@ authorization_failed=അംഗീകാരം നല്‍കുന്നതി authorization_failed_desc=അസാധുവായ ഒരു അഭ്യർത്ഥന കണ്ടെത്തിയതിനാൽ ഞങ്ങൾ അംഗീകാരം പരാജയപ്പെടുത്തി. ദയവായി നിങ്ങൾ അംഗീകരിക്കാൻ ശ്രമിച്ച അപ്ലിക്കേഷന്റെ പരിപാലകനുമായി ബന്ധപ്പെടുക. [mail] + activate_account=നിങ്ങളുടെ അക്കൗണ്ട് സജീവമാക്കുക + activate_email=ഇമെയില്‍ വിലാസം സ്ഥിരീകരിയ്ക്കുക -reset_password=നിങ്ങളുടെ അക്കൗണ്ട് വീണ്ടെടുക്കുക -register_success=രജിസ്ട്രേഷൻ വിജയകരം + register_notify=ഗിറ്റീയിലേയ്ക്കു് സ്വാഗതം +reset_password=നിങ്ങളുടെ അക്കൗണ്ട് വീണ്ടെടുക്കുക + +register_success=രജിസ്ട്രേഷൻ വിജയകരം + + + + + + [modal] yes=അതെ no=ഇല്ല @@ -440,7 +450,6 @@ add_new_key=SSH കീ ചേർക്കുക add_new_gpg_key=GPG കീ ചേർക്കുക ssh_key_been_used=ഈ SSH കീ ഇതിനകം ചേർത്തു. gpg_key_id_used=സമാന ഐഡിയുള്ള ഒരു പൊതു ജിപിജി കീ ഇതിനകം നിലവിലുണ്ട്. -gpg_no_key_email_found=നിങ്ങളുടെ അക്കൗണ്ടുമായി ബന്ധപ്പെട്ട ഏതെങ്കിലും ഇമെയിൽ വിലാസത്തിൽ ഈ GPG കീ ഉപയോഗിക്കാൻ കഴിയില്ല. subkeys=സബ് കീകള്‍ key_id=കീ ഐഡി key_name=കീയുടെ പേരു് @@ -561,6 +570,7 @@ email_notifications.onmention=ഇ-മെയിൽ പരാമര്‍ശിച email_notifications.disable=ഇമെയിൽ അറിയിപ്പുകൾ അപ്രാപ്തമാക്കുക email_notifications.submit=ഇ-മെയില്‍ മുൻഗണനകള്‍ + [repo] owner=ഉടമസ്ഥന്‍ repo_name=കലവറയുടെ പേരു് @@ -600,15 +610,14 @@ reactions_more=കൂടാതെ %d അധികം + archive.title=ഈ കലവറ ചരിത്രരേഖാപരമായി നിലനിര്‍ത്തിയിരിക്കുന്നു. നിങ്ങൾക്ക് ഫയലുകൾ കാണാനും ക്ലോൺ ചെയ്യാനും കഴിയും, പക്ഷേ പ്രശ്‌നങ്ങൾ / ലയന അഭ്യർത്ഥനകൾ ഉണ്ടാക്കാനോ തുറക്കാനോ കഴിയില്ല. archive.issue.nocomment=ഈ കലവറ ചരിത്രപരമായി നിലനിര്‍ത്തിയിരിക്കുന്നതാണു്. നിങ്ങൾക്ക് പ്രശ്നങ്ങളിൽ അഭിപ്രായമിടാൻ കഴിയില്ല. archive.pull.nocomment=ഈ കലവറ ചരിത്രപരമായി നിലനിര്‍ത്തിയിരിക്കുന്നതാണു്. നിങ്ങൾക്ക് ലയന അഭ്യർത്ഥനകളില്‍ അഭിപ്രായമിടാൻ കഴിയില്ല. -form.reach_limit_of_creation=നിങ്ങളുടെ കലവറകളുടെ പരിധിയായ %d നിങ്ങൾ ഇതിനകം എത്തി. form.name_reserved='%s' എന്ന കലവറയുടെ പേരു് മറ്റാവശ്യങ്ങള്‍ക്കായി നീക്കിവച്ചിരിക്കുന്നു. form.name_pattern_not_allowed=കലവറനാമത്തിൽ '%s' എന്ന ശ്രേണി അനുവദനീയമല്ല. -need_auth=ക്ലോൺ അംഗീകാരിയ്ക്കുക migrate_items=മൈഗ്രേഷൻ ഇനങ്ങൾ migrate_items_wiki=വിക്കി migrate_items_milestones=നാഴികക്കല്ലുകള്‍ @@ -623,7 +632,6 @@ migrate.clone_local_path=അല്ലെങ്കിൽ ഒരു പ്രാ migrate.permission_denied=പ്രാദേശിക കലവറകള്‍ ഇറക്കുമതി ചെയ്യാൻ നിങ്ങള്‍ക്കു് അനുവാദമില്ല. migrate.invalid_local_path=പ്രാദേശിക പാത അസാധുവാണ്. ഇത് നിലവിലില്ല അല്ലെങ്കിൽ ഒരു ഡയറക്ടറിയല്ല. migrate.failed=മൈഗ്രേഷൻ പരാജയപ്പെട്ടു: %v -migrate.lfs_mirror_unsupported=എൽ‌എഫ്‌എസ് ഒബ്‌ജക്റ്റുകളുടെ മിററിംഗ് പിന്തുണയ്‌ക്കുന്നില്ല - പകരം 'git lfs fetch --all', 'git lfs push --all' എന്നിവ ഉപയോഗിക്കുക. migrated_from=%[2]s നിന്ന് മൈഗ്രേറ്റുചെയ്‌തു migrated_from_fake=%[1]s നിന്ന് മൈഗ്രേറ്റുചെയ്തു @@ -730,8 +738,6 @@ issues.deleted_milestone=`(ഇല്ലാതാക്കി)` issues.filter_type.all_issues=എല്ലാ ഇഷ്യൂകളും issues.label_open_issues=%d തുറന്നനിലയിലുള്ള ഇഷ്യൂകള്‍ issues.label_deletion_desc=ഒരു ലേബൽ ഇല്ലാതാക്കിയാല്‍, അതു് നിയുകതമാക്കിയ എല്ലാ ഇഷ്യൂകളില്‍ നിന്നും നീക്കംചെയ്യും. തുടരട്ടെ? -issues.dependency.issue_closing_blockedby=ഈ ലയന അഭ്യര്‍ത്ഥന അടയ്‌ക്കുന്നത് ഇനിപ്പറയുന്ന ഇഷ്യൂകള്‍ തടയുന്നു് -issues.dependency.pr_closing_blockedby=ഈ ഇഷ്യു അടയ്‌ക്കുന്നത് ഇനിപ്പറയുന്ന ലയന അഭ്യര്‍ത്ഥന തടയുന്നു് issues.dependency.issue_close_blocks=ഈ ഇഷ്യു അടയ്‌ക്കുന്നത് ഇനിപ്പറയുന്ന ഇഷ്യൂകള്‍ തടയുന്നു് issues.dependency.pr_close_blocks=ഈ ഇഷ്യൂകള്‍ അടയ്‌ക്കുന്നത് ഈ ലയന അഭ്യര്‍ത്ഥന തടയുന്നു് issues.dependency.issue_close_blocked=ഈ ഇഷ്യൂ അടയ്‌ക്കുന്നതിന് മുമ്പ് ഇതിനെ തടയുന്ന എല്ലാ ഇഷ്യൂകളും നിങ്ങൾ അടയ്‌ക്കേണ്ടതുണ്ട്. @@ -741,6 +747,7 @@ issues.dependency.add_error_cannot_create_circular=രണ്ട് ഇഷ്യ issues.dependency.add_error_dep_not_same_repo=രണ്ട് പ്രശ്നങ്ങളും ഒരേ കലവറയിലേതു് ആയിരിക്കണം. + ; %[2]s
    %[3]s
    @@ -762,6 +769,8 @@ settings.event_issues=ഇഷ്യൂകള്‍ + + [org] diff --git a/options/locale/locale_nl-NL.ini b/options/locale/locale_nl-NL.ini index 8fc84e799..19f753931 100644 --- a/options/locale/locale_nl-NL.ini +++ b/options/locale/locale_nl-NL.ini @@ -15,6 +15,7 @@ page=Pagina template=Sjabloon language=Taal notifications=Meldingen +active_stopwatch=Actieve Tijd Tracker create_new=Maken… user_profile_and_more=Profiel en instellingen… signed_in_as=Aangemeld als @@ -75,6 +76,7 @@ pull_requests=Pull requests issues=Kwesties milestones=Mijlpalen +ok=OK cancel=Annuleren save=Opslaan add=Toevoegen @@ -86,9 +88,12 @@ write=Schrijf preview=Voorbeeld loading=Laden… +step1=Stap 1: +step2=Stap 2: error404=De pagina die u probeert te bereiken bestaat niet of u bent niet gemachtigd om het te bekijken. + [error] occurred=Er is een fout opgetreden report_message=Als je zeker weet dat dit een Gitea bug is, zoek dan naar een issue op GitHub en open zo nodig een nieuw issue. @@ -201,6 +206,7 @@ default_enable_timetracking=Tijdregistratie standaard inschakelen default_enable_timetracking_popup=Tijdsregistratie voor nieuwe repositories standaard inschakelen. no_reply_address=Verborgen e-maildomein no_reply_address_helper=Domeinnaam voor gebruikers met een verborgen e-mailadres. Bijvoorbeeld zal de gebruikersnaam 'joe' in Git worden geregistreerd als 'joe@noreply.example.org' als het verborgen email domein is ingesteld op 'noreply.example.org'. +password_algorithm=Wachtwoord Hash Algoritme [home] uname_holder=Gebruikersnaam of e-mailadres @@ -214,6 +220,7 @@ my_mirrors=Mijn kopieën view_home=Bekijk %s search_repos=Zoek een repository… filter=Andere filters +filter_by_team_repositories=Filter op team repositories show_archived=Gearchiveerd show_both_archived_unarchived=Toont zowel gearchiveerd als niet-gearchiveerd @@ -288,7 +295,6 @@ openid_connect_desc=De gekozen OpenID-URI is onbekend. Koppel het aan een nieuw openid_register_title=Nieuw account aanmaken openid_register_desc=De gekozen OpenID-URI is onbekend. Koppel het aan een nieuw account hier. openid_signin_desc=Geef uw OpenID-URI. Bijvoorbeeld: https://anne.me, bob.openid.org.cn of gnusocial.net/carry. -disable_forgot_password_mail=Accountherstel is uitgeschakeld. Neem contact op met de beheerder van uw site. email_domain_blacklisted=Je kan je niet registreren met dit e-mailadres. authorize_application=Autoriseer applicatie authorize_redirect_notice=U wordt doorgestuurd naar %s als u deze toepassing toestaat. @@ -302,12 +308,27 @@ password_pwned=Het gekozen wachtwoord staat op een Weet u niet hoe?
    Lees dan onze handleiding voor het gpg_helper=Hulp nodig? Neem een kijkje op de GitHub handleiding over GPG. add_new_key=SSH sleutel toevoegen add_new_gpg_key=GPG sleutel toevoegen -key_content_ssh_placeholder=Begint met 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', of 'ecdsa-sha2-nistp521' key_content_gpg_placeholder=Begint met '-----BEGIN PGP PUBLIC KEY BLOCK-----' add_new_principal=Verantwoordelijke toevoegen ssh_key_been_used=Deze SSH-sleutel is al toegevoegd aan de server. ssh_key_name_used=Er bestaat al een SSH sleutel met dezelfde naam in uw account. ssh_principal_been_used=Deze verantwoordelijke is al toegevoegd aan de server. gpg_key_id_used=Een publieke GPG-sleutel met dit ID bestaat al. -gpg_no_key_email_found=Deze GPG-sleutel kan met geen van de e-mailadressen van dit account gebruikt worden. subkeys=Subkeys key_id=Key-ID key_name=Sleutel naam @@ -647,8 +667,10 @@ email_notifications.onmention=Alleen e-mail op vermelding email_notifications.disable=E-mailnotificaties uitschakelen email_notifications.submit=E-mailvoorkeur instellen + [repo] owner=Eigenaar +owner_helper=Sommige organisaties kunnen niet worden weergegeven in de dropdown vanwege een limiet op het maximale aantal repositories. repo_name=Naam van repository repo_name_helper=Goede repository-namen zijn kort, makkelijk te onthouden en uniek. repo_size=Repositorygrootte @@ -669,6 +691,7 @@ use_template=Gebruik dit sjabloon generate_repo=Repository genereren generate_from=Genereer van repo_desc=Omschrijving +repo_desc_helper=Voer korte beschrijving in (optioneel) repo_lang=Taal repo_gitignore_helper=Selecteer .gitignore templates. issue_labels=Issuelabels @@ -685,7 +708,6 @@ mirror_prune_desc=Verwijder verouderde remote-tracking-referenties mirror_interval=Kopie-interval (geldige tijdseenheden zijn 'h', 'm' en 's'). 0 om automatische synchronisatie uit te schakelen. mirror_interval_invalid=Kloon-interval is niet geldig. mirror_address=Klonen van URL -mirror_address_desc=Voeg alle vereiste inloggegevens toe in de kloon autorisatiesectie. mirror_address_url_invalid=De opgegeven url is ongeldig. U dient alle componenten van de url correct te escapen. mirror_address_protocol_invalid=De opgegeven url is ongeldig. Alleen http(s):// of git:// locaties kunnen worden gemirrord. mirror_last_synced=Laatst gesynchroniseerd @@ -706,6 +728,7 @@ delete_preexisting=Verwijder reeds bestaande bestanden delete_preexisting_content=Verwijder bestanden in %s delete_preexisting_success=Niet-geadopteerde bestanden verwijderd in %s + desc.private=Privé desc.public=Openbaar desc.private_template=Privé sjabloon @@ -729,11 +752,9 @@ archive.title=Deze repo is gearchiveerd. U kunt bestanden bekijken en het klonen archive.issue.nocomment=Deze repo is gearchiveerd. U kunt niet reageren op problemen. archive.pull.nocomment=Deze repo is gearchiveerd. U kunt niet reageren op pull requests. -form.reach_limit_of_creation=U hebt uw limiet van %d repositories al bereikt. form.name_reserved=Repositorienaam '%s' is gereserveerd. form.name_pattern_not_allowed=Het patroon '%s' is niet toegestaan in de naam van een repository. -need_auth=Authenticatie benodigd om te klonen migrate_options=Migratie opties migrate_service=Migratie Service migrate_options_mirror_helper=Deze repository zal een kopie zijn @@ -753,16 +774,12 @@ migrate.clone_local_path=of een lokaal pad migrate.permission_denied=U bent niet gemachtigd om deze lokale repositories te importeren. migrate.invalid_local_path=Het lokale pad is ongeldig, bestaat niet of is geen map. migrate.failed=Migratie is mislukt: %v -migrate.lfs_mirror_unsupported=Het kopiëren van LFS-objecten wordt niet ondersteund - gebruik in plaats daarvan 'git lfs fetch --all' en 'git lfs push --all'. migrate.migrate_items_options=Toegangstoken is vereist om extra items te migreren migrated_from=Gemigreerd van %[2]s migrated_from_fake=Gemigreerd van %[1]s migrate.migrate=Migreer van %s migrate.migrating=Migreren van %s... migrate.migrating_failed=Migreren van %s is mislukt. -migrate.github.description=Gegevens migreren van Github.com of Github Enterprise. -migrate.git.description=Migreren of Mirroring git gegevens van Git services -migrate.gitlab.description=Gegevens migreren van GitLab.com of Self-Hosted gitlab server. mirror_from=kopie van forked_from=geforked van @@ -905,7 +922,6 @@ ext_issues=Ext. issues ext_issues.desc=Koppelen aan een externe kwestie-tracker. projects=Projecten -projects.desc=Beheer issues en pulls in projectborden. projects.create=Project aanmaken projects.title=Titel projects.new=Nieuw project @@ -1027,7 +1043,7 @@ issues.action_milestone=Mijlpaal issues.action_milestone_no_select=Geen mijlpaal issues.action_assignee=Toegewezene issues.action_assignee_no_select=Geen verantwoordelijke -issues.opened_by=%[1]s werd geopend door %[3]s +issues.opened_by=%[1]s geopend door %[3]s issues.closed_by=door %[3]s gesloten %[1]s issues.closed_by_fake=met %[2]gesloten %[1]s issues.previous=Vorige @@ -1043,7 +1059,6 @@ issues.context.edit=Bewerken issues.context.delete=Verwijder issues.no_content=Er is nog geen inhoud. issues.close_issue=Sluit -issues.pull_merged_at=`heeft commit %[2]s samengevoegd in %[3]s %[4]s` issues.close_comment_issue=Reageer en sluit issues.reopen_issue=Heropen issues.reopen_comment_issue=Heropen en geef commentaar @@ -1109,12 +1124,11 @@ issues.lock.title=Vergrendel gesprek over dit probleem. issues.unlock.title=Ontgrendel gesprek over dit probleem. issues.comment_on_locked=Je kunt geen commentaar geven op een vergrendeld probleem. issues.tracker=Tijdregistratie -issues.start_tracking_short=Start issues.start_tracking=Start tijdregistratie issues.start_tracking_history=`%s is begonnen` issues.tracker_auto_close=Timer wordt automatisch gestopt wanneer dit probleem wordt gesloten -issues.stop_tracking=Stop issues.stop_tracking_history=`gestopt met werken aan %s` +issues.cancel_tracking_history=`tijd bijhouden geannuleerd: %s` issues.add_time=Tijd handmatig toevoegen issues.add_time_short=Timer toevoegen issues.add_time_cancel=Annuleren @@ -1123,8 +1137,6 @@ issues.del_time_history=`heeft besteedde tijd verwijderd: %s` issues.add_time_hours=Uren issues.add_time_minutes=Minuten issues.add_time_sum_to_small=Geen tijd opgegeven. -issues.cancel_tracking=Annuleren -issues.cancel_tracking_history=`tijd bijhouden geannuleerd: %s` issues.time_spent_total=Totaal besteedde tijd issues.time_spent_from_all_authors=`Totaal besteedde tijd: %s` issues.due_date=Vervaldatum @@ -1133,7 +1145,6 @@ issues.error_modifying_due_date=Deadline aanpassen mislukt. issues.error_removing_due_date=Deadline verwijderen mislukt. issues.push_commit_1=toegevoegd %d commit %s issues.push_commits_n=toegevoegd %d commits %s -issues.force_push_codes=`geforceerd-pushed %[1]s van %[2]s naar %[4]s %[6]s` issues.due_date_form=jjjj-mm-dd issues.due_date_form_add=Vervaldatum toevoegen issues.due_date_form_edit=Bewerk @@ -1154,8 +1165,6 @@ issues.dependency.remove=Verwijder issues.dependency.remove_info=Verwijder afhankelijkheid issues.dependency.added_dependency=`voegde een nieuwe afhankelijkheid %s toe ` issues.dependency.removed_dependency=`verwijderde een afhankelijkheid %s` -issues.dependency.issue_closing_blockedby=Het sluiten van deze pull-aanvraag is geblokkeerd door de volgende kwesties -issues.dependency.pr_closing_blockedby=Het sluiten van deze kwestie is geblokkeerd door de volgende kwesties issues.dependency.issue_close_blocks=Deze kwestie blokkeert het sluiten van de volgende kwesties issues.dependency.pr_close_blocks=Deze pull-aanvraag blokkeert het sluiten van de volgende kwesties issues.dependency.issue_close_blocked=Je moet alle kwesties die deze kwestie blokkeren sluiten voordat je deze kan sluiten. @@ -1196,6 +1205,7 @@ issues.review.un_resolve_conversation=Gesprek niet oplossen issues.review.resolved_by=markeerde dit gesprek als opgelost issues.assignee.error=Niet alle aangewezen personen zijn toegevoegd vanwege een onverwachte fout. + pulls.desc=Schakel pull-aanvragen en code-beoordelingen in. pulls.new=Nieuwe Pull aanvraag pulls.compare_changes=Nieuwe pull-aanvraag @@ -1220,7 +1230,6 @@ pulls.merged_as=De pull request is samengevoegd als Start de titel met %s om te voorkomen dat deze pull-aanvraag per ongeluk wordt samengevoegd.` -pulls.cannot_merge_work_in_progress=Deze pull-aanvraag is als "work in progress" gemarkeerd. Verwijder de %s-prefix van de titel zodra hij klaar is pulls.data_broken=Deze pull-aanvraag is ongeldig wegens missende fork-informatie. pulls.files_conflicted=Dit pull request heeft wijzigingen die strijdig zijn met de doel branch. pulls.is_checking=Controle op samenvoegingsconflicten is nog bezig. Probeer later nog een keer. @@ -1249,14 +1258,11 @@ pulls.no_merge_helper=Schakel samenvoegingsopties in in de repositoryinstellinge pulls.no_merge_wip=Deze pull-aanvraag kan niet worden samengevoegd omdat hij als "work in progress" is gemarkeerd. pulls.no_merge_not_ready=Deze pull-aanvraag is niet klaar om samen te voegen, controleer de status en status controles. pulls.no_merge_access=Je bent niet gemachtigd om deze pull-aanvraag samen te voegen. -pulls.merge_pull_request=Samenvoegen van pull verzoek -pulls.rebase_merge_pull_request=Rebase en Merge -pulls.rebase_merge_commit_pull_request=Rebase en voeg samen (--no-ff) -pulls.squash_merge_pull_request=Squash en Merge pulls.require_signed_wont_sign=De branch heeft ondertekende commits nodig, maar deze merge zal niet worden ondertekend pulls.invalid_merge_option=Je kan de samenvoegingsoptie niet gebruiken voor deze pull-aanvraag. pulls.merge_conflict=Samenvoegen mislukt: Er was een conflict tijdens het samenvoegen. Hint: Probeer een andere strategie pulls.merge_conflict_summary=Foutmelding +pulls.rebase_conflict=Samenvoegen mislukt: Er was een conflict tijdens het rebasen van commit: %[1]s. Hint: Probeer een andere strategie pulls.rebase_conflict_summary=Foutmelding ; %[2]s
    %[3]s
    pulls.unrelated_histories=Samenvoegen mislukt: de HEAD en base delen geen gemeenschappelijke geschiedenis. Tip: Probeer een andere strategie @@ -1382,7 +1388,6 @@ activity.closed_issues_count_1=Gesloten problemen activity.closed_issues_count_n=Gesloten problemen activity.title.issues_1=%d Probleem activity.title.issues_n=%d Problemen -activity.title.issues_closed_by=%s gesloten door %s activity.title.issues_created_by=%s gemaakt door %s activity.closed_issue_label=Gesloten activity.new_issues_count_1=Nieuw probleem @@ -1488,9 +1493,11 @@ settings.convert_fork_confirm=Converteer Repository settings.convert_fork_succeed=De fork is omgezet in een gewone repository. settings.transfer=Eigendom overdragen settings.transfer_desc=Draag deze repo over aan een andere gebruiker of een organisatie waar u beheerders rechten heeft. +settings.transfer_form_title=Voer de repository naam in als bevestiging: settings.transfer_notices_1=- U verliest de toegang tot de repository als u deze overdraagt aan een individuele gebruiker. settings.transfer_notices_2=- U behoudt toegang tot de repository als u deze overdraag aan een organisatie waar u (mede)eigenaar van bent. -settings.transfer_form_title=Voer de repository naam in als bevestiging: +settings.transfer_owner=Nieuwe eigenaar +settings.transfer_succeed=De repository is overgedragen. settings.signing_settings=Ondertekening verificatie Instellingen settings.trust_model=Handtekening vertrouwensmodel settings.trust_model.default=Standaard vertrouwensmodel @@ -1500,6 +1507,7 @@ settings.trust_model.collaborator.long=Medewerker: Vertrouw handtekeningen door settings.trust_model.collaborator.desc=Geldige handtekeningen door medewerkers van deze repository worden gemarkeerd als "vertrouwd" - (ongeacht of ze overeenkomen met de committer of niet). Anders worden geldige handtekeningen gemarkeerd als "niet vertrouwd" als de handtekening overeenkomt met de committer en "niet overeenkomend" als dat niet het geval is. settings.trust_model.committer=Committer settings.trust_model.committer.long=Committer: Vertrouw handtekeningen die overeenkomen met committers (Dit komt overeen met GitHub en zal Gitea ondertekende commits dwingen om Gitea als de committer te hebben) +settings.trust_model.committer.desc=Geldige handtekeningen worden alleen gemarkeerd als "vertrouwd" als ze overeenkomen met de committer, anders worden ze gemarkeerd als "niet overeenkomend". Dit zal Gitea dwingen om de committer te zijn aan ondertekende commits met de eigenlijke committer gemarkeerd als Co-Authored-By: en Co-Committed-By: trailer in de commit. De standaard Gitea-sleutel moet overeenkomen met een gebruiker in de database. settings.trust_model.collaboratorcommitter=Medewerker+Committer settings.trust_model.collaboratorcommitter.long=Medewerker+Committer: Vertrouw handtekeningen door medewerkers die overeenkomen met de committer settings.wiki_delete=Wiki-gegevens verwijderen @@ -1514,9 +1522,6 @@ settings.delete_notices_2=- Deze bewerking zal permanent de %s settings.delete_notices_fork_1=- Forks van deze repository zullen onafhankelijk worden na verwijdering. settings.deletion_success=De repository is verwijderd. settings.update_settings_success=De repository-instellingen zijn bijgewerkt. -settings.transfer_owner=Nieuwe eigenaar -settings.make_transfer=Overdracht uitvoeren -settings.transfer_succeed=De repository is overgedragen. settings.confirm_delete=Verwijder repository settings.add_collaborator=Medewerker toevoegen settings.add_collaborator_success=De medewerker is toegevoegd. @@ -1611,7 +1616,6 @@ settings.event_pull_request_review_desc=Pull request goedgekeurd, afgewezen of r settings.event_pull_request_sync=Pull request gesynchroniseerd settings.event_pull_request_sync_desc=Pull request gesynchroniseerd. settings.branch_filter=Branch filter -settings.branch_filter_desc=Branch whitelist voor push, branch creatie en branch verwijdering events, gespecificeerd als glob patroon. Indien leeg of * worden events voor alle branches gerapporteerd. Zie github.com/gobwas/glob documentatie voor syntaxis. Voorbeelden: master, {master,release*}. settings.active=Actief settings.active_helper=Informatie over geactiveerde gebeurtenissen wordt naar deze webhook URL gestuurd. settings.add_hook_success=De webhook is toegevoegd. @@ -1680,7 +1684,6 @@ settings.dismiss_stale_approvals_desc=Wanneer nieuwe commits die de inhoud van h settings.require_signed_commits=Ondertekende Commits vereisen settings.require_signed_commits_desc=Weiger pushes naar deze branch als deze niet ondertekend of niet verifieerbaar is. settings.protect_protected_file_patterns=Beschermde bestandspatronen (gescheiden door een puntkomma '\;'): -settings.protect_protected_file_patterns_desc=Beschermde bestanden die niet direct gewijzigd mogen worden, zelfs als de gebruiker het recht heeft om bestanden in deze branch toe te voegen, te bewerken of te verwijderen. Meerdere patronen kunnen worden gescheiden met een puntkomma ('\;'). Zie github.com/gobwas/glob documentatie voor patroon syntaxis. Voorbeelden: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Bescherming aanzetten settings.delete_protected_branch=Bescherming uitzetten settings.update_protect_branch_success=Branch bescherming voor branch '%s' is bijgewerkt. @@ -1704,6 +1707,7 @@ settings.matrix.access_token=Toegangstoken settings.matrix.message_type=Bericht type settings.archive.button=Repo archiveren settings.archive.header=Deze Repo archiveren +settings.archive.text=Het archiveren van de repository maakt deze volledig alleen-lezen. Het is verborgen op het dashboard, er kan niet naar worden gecommit, en er kunnen geen kwesties of pull-aanvragen worden aangemaakt. settings.archive.success=De repo is succesvol gearchiveerd. settings.archive.error=Er is een fout opgetreden tijdens het archiveren van de repo. Zie het logboek voor meer informatie. settings.archive.error_ismirror=U kunt geen gespiegelde repo archiveren. @@ -1825,6 +1829,7 @@ branch.create_from=van '%s' branch.create_success=Branch '%s' is aangemaakt. branch.branch_already_exists=Branch '%s' bestaat al in deze repository. branch.branch_name_conflict=Branch naam '%s' conflicteert met de reeds bestaande branch '%s'. +branch.tag_collision=Branch '%s' kan niet worden aangemaakt als een label als dezelfde naam al bestaat in de repository. branch.deleted_by=Verwijderd door %s branch.restore_success=Branch '%s' is hersteld. branch.restore_failed=Herstellen van branch '%s' is mislukt. @@ -1835,11 +1840,13 @@ branch.download=Download Branch '%s' branch.included_desc=Deze branch maakt deel uit van de standaard branch branch.included=Inbegrepen + topic.manage_topics=Beheer topics topic.done=Klaar topic.count_prompt=Je kunt niet meer dan 25 onderwerpen selecteren topic.format_prompt=Onderwerpen moeten beginnen met een letter of nummer, kunnen streepjes bevatten ('-') en kunnen maximaal 35 tekens lang zijn. + [org] org_name_holder=Organisatienaam org_full_name_holder=Volledige naam organisatie @@ -1886,9 +1893,11 @@ settings.change_orgname_prompt=Opmerking: het wijzigen van de organisatienaam ve settings.update_avatar_success=De avatar van de organisatie is aangepast. settings.delete=Verwijder organisatie settings.delete_account=Verwijder deze organisatie +settings.delete_prompt=Deze organisatie zal permanent worden verwijderd. U kunt dit NIET ongedaan maken! settings.confirm_delete_account=Bevestig verwijdering settings.delete_org_title=Verwijder organisatie settings.delete_org_desc=Deze organisatie zal permanent verwijderd worden. Doorgaan? +settings.hooks_desc=Een webhook toevoegen die door alle repositories in deze organisatie getriggerd kan worden. settings.labels_desc=Voeg labels toe die kunnen worden gebruikt bij problemen voor alle repositories in deze organisatie. @@ -1928,6 +1937,7 @@ teams.delete_team_success=Het team is verwijderd. teams.read_permission_desc=Dit team heeft Lees rechten: leden kunnen repositories lezen en klonen. teams.write_permission_desc=Dit team heeft Schrijf rechten: leden kunnen repositories lezen en push aanvragen verwerken. teams.admin_permission_desc=Dit team heeft beheersrechten: leden kunnen van en naar teamrepositories pullen, pushen, en er medewerkers aan toevoegen. +teams.create_repo_permission_desc=Daarnaast verleent dit team Maak repository permissie: leden kunnen nieuwe repositories maken in de organisatie. teams.repositories=Teamrepositories teams.search_repo_placeholder=Repository zoeken… teams.remove_all_repos_title=Verwijder alle team repositories @@ -1939,6 +1949,7 @@ teams.add_duplicate_users=Gebruiker is al een teamlid. teams.repos.none=Er konden geen repositories worden benaderd door dit team. teams.members.none=Geen leden in dit team. teams.specific_repositories=Specifieke repositories +teams.specific_repositories_helper=Leden zullen alleen toegang hebben tot repositories die expliciet aan het team zijn toegevoegd. Door dit te selecteren, worden niet repositories die al zijn toegevoegd met Alle repositories. teams.all_repositories=Alle repositories teams.all_repositories_helper=Team heeft toegang tot alle repositories. Door dit te selecteren worden alle bestaande repositories aan het team toegevoegd. teams.all_repositories_read_permission_desc=Dit team heeft Lees toegang tot alle repositories: leden kunnen repositories bekijken en klonen. @@ -1948,8 +1959,6 @@ dashboard=Overzicht users=Gebruikersacount organizations=Organisaties repositories=Repositories -hooks=Standaard Webhooks -systemhooks=Systeem webhooks authentication=Authenticatie bronnen emails=Gebruikeremails config=Configuratie @@ -1981,7 +1990,6 @@ dashboard.cron.error=Fout in cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s is klaar dashboard.delete_inactive_accounts=Verwijder alle niet geactiveerde accounts dashboard.delete_inactive_accounts.started=Verwijder alle niet geactiveerde accounts taak gestart. -dashboard.delete_repo_archives=Verwijder alle repositories archieven dashboard.delete_repo_archives.started=Verwijder alle repositoryarchieven taak gestart. dashboard.delete_missing_repos=Verwijder alle repositories waarvan hun Git bestanden missen dashboard.delete_missing_repos.started=Verwijder alle repositories die hun Git bestanden missen taak gestart. @@ -2098,10 +2106,8 @@ repos.forks=Forks repos.issues=Kwesties repos.size=Grootte -hooks.add_webhook=Standaard Webhook toevoegen -hooks.update_webhook=Standaard Webhook bijwerken -systemhooks.desc=Webhooks maken automatisch HTTP POST-verzoeken naar een server wanneer bepaalde Gitea-gebeurtenissen geactiveerd worden. Gedefinieerd webhooks zullen werken op alle repositories van het systeem, dus overweeg eventuele prestatiegevolgen die dit kan hebben. Lees meer in de webhooks gids. +systemhooks=Systeem webhooks systemhooks.add_webhook=Systeem Webhook toevoegen systemhooks.update_webhook=Systeem-webhook bijwerken @@ -2119,7 +2125,6 @@ auths.host=Host auths.port=Poort auths.bind_dn=Binden DN auths.bind_password=Bind wachtwoord -auths.bind_password_helper=Waarschuwing: Dit wachtwoord wordt opgeslagen in platte tekst. Indien mogelijk gebruik dan een alleen-lezen account. auths.user_base=User Search Base auths.user_dn=User DN auths.attribute_username=Gebruikersnaam attribuut @@ -2146,7 +2151,6 @@ auths.smtphost=SMTP host auths.smtpport=SMTP poort auths.allowed_domains=Toegelaten domeinen auths.allowed_domains_helper=Laat leeg om alle domeinen toe te staan. Meerdere domeinen scheiden met een komma (','). -auths.enable_tls=Activeer TLS-encryptie auths.skip_tls_verify=TLS-verificatie overslaan auths.pam_service_name=PAM servicenaam auths.oauth2_provider=OAuth2 Provider @@ -2167,6 +2171,7 @@ auths.sspi_strip_domain_names=Verwijder domeinnamen uit gebruikersnamen auths.sspi_separator_replacement=Scheidingsteken voor gebruik in plaats van \, / en @ auths.sspi_separator_replacement_helper=Het karakter dat moet worden gebruikt om de scheidingstekens van namen op downniveau logon te vervangen (bijv. de \ in "DOMAIN\user") en gebruikersverantwoordelijken (bijv. de @ in "user@example.org"). auths.sspi_default_language=Standaard gebruikerstaal +auths.sspi_default_language_helper=Standaardtaal voor gebruikers wordt automatisch gemaakt met SSPI authenticatiemethode. Laat leeg als u de taal automatisch wilt detecteren. auths.tips=Tips auths.tips.oauth2.general=OAuth2 authenticatie auths.tip.oauth2_provider=OAuth2 Provider @@ -2311,7 +2316,6 @@ config.git_gc_timeout=GC operatie timeout config.log_config=Logconfiguratie config.log_mode=Log-modus -config.macaron_log_mode=Macaron logboek modus config.own_named_logger=Benoemde Logger config.routes_to_default_logger=Routes naar standaard Logger config.go_log=Gebruikt Go Log (doorgestuurd naar standaard) @@ -2411,7 +2415,6 @@ comment_issue=`reactie op issue %s#%[2]s` comment_pull=`gaf reactie op pull request %s#%[2]s` merge_pull_request=`voegde pull request samen %s#%[2]s` transfer_repo=repository verplaatst naar %s naar %s -push_tag=heeft tag %[2]s naar %[3]s gepusht delete_tag=heeft label %[2]s van %[3]s verwijderd delete_branch=heeft branch %[2]s in %[3]s verwijderd compare_branch=Vergelijk @@ -2466,6 +2469,7 @@ error.generate_hash=Genereren van commit hash mislukt error.no_committer_account=Geen account gekoppeld aan het e-mailadres van de committer error.no_gpg_keys_found=Geen bekende sleutel gevonden voor deze handtekening in de database error.not_signed_commit=Geen ondertekende commit +error.probable_bad_default_signature=WAARSCHUWING! Hoewel de standaard sleutel dit ID heeft, is deze commit niet geverifieerd! Deze commit is VERDACHT. [units] error.no_unit_allowed_repo=U heeft geen toegang tot een enkele sectie van deze repository. diff --git a/options/locale/locale_pl-PL.ini b/options/locale/locale_pl-PL.ini index ef6a3222f..3c3363714 100644 --- a/options/locale/locale_pl-PL.ini +++ b/options/locale/locale_pl-PL.ini @@ -87,6 +87,7 @@ loading=Ładowanie… error404=Strona, do której próbujesz dotrzeć nie istnieje lub nie jesteś autoryzowany aby go zobaczyć. + [error] occurred=Wystąpił błąd report_message=Jeśli jesteś pewien, że jest to błąd w Gitea, poszukaj problemu na GitHub i w razie potrzeby otwórz nowe zgłoszenie. @@ -286,7 +287,6 @@ openid_connect_desc=Wybrany URI OpenID jest nieznany. Powiąż go z nowym kontem openid_register_title=Stwórz nowe konto openid_register_desc=Wybrany URI OpenID jest nieznany. Powiąż go z nowym kontem w tym miejscu. openid_signin_desc=Wpisz swój URI OpenID. Na przykład: https://anne.me, bob.openid.org.cn or gnusocial.net/carry. -disable_forgot_password_mail=Odzyskiwanie konta jest wyłączone. Skontaktuj się z administratorem strony. email_domain_blacklisted=Nie możesz zarejestrować się za pomocą tego adresu e-mail. authorize_application=Autoryzuj aplikację authorize_redirect_notice=Zostaniesz przekierowany(-a) do %s, jeśli autoryzujesz tę aplikację. @@ -298,12 +298,22 @@ authorization_failed_desc=Autoryzacja nie powiodła się ze względu na niewła sspi_auth_failed=Uwierzytelnianie SSPI nie powiodło się [mail] + activate_account=Aktywuj swoje konto + activate_email=Potwierdź swój adres e-mail -reset_password=Odzyskaj swoje konto -register_success=Rejestracja powiodła się + register_notify=Witamy w Gitea +reset_password=Odzyskaj swoje konto + +register_success=Rejestracja powiodła się + + + + + + [modal] yes=Tak no=Nie @@ -497,11 +507,9 @@ ssh_helper=Potrzebujesz pomocy? Sprawdź na GitHubie przewodnik gpg_helper=Potrzebujesz pomocy? Przeczytaj na GitHubie poradnik na temat GPG. add_new_key=Dodaj klucz SSH add_new_gpg_key=Dodaj klucz GPG -key_content_ssh_placeholder=Zaczyna się od 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384' lub 'ecdsa-sha2-nistp521' key_content_gpg_placeholder=Zaczyna się od '-----BEGIN PGP PUBLICZNEJ BLOKI KLUCZOWEJ PGP---' ssh_key_been_used=Ten klucz SSH został już dodany do tego serwera. gpg_key_id_used=Publiczny klucz GPG z tym ID już istnieje. -gpg_no_key_email_found=Tego klucza GPG nie można używać z żadnym adresem e-mail powiązanym z Twoim kontem. subkeys=Podklucze key_id=ID klucza key_name=Nazwa klucza @@ -623,6 +631,7 @@ email_notifications.onmention=Wyślij wiadomość e-mail wyłącznie przy wzmian email_notifications.disable=Wyłącz powiadomienia e-mail email_notifications.submit=Ustaw preferencje wiadomości e-mail + [repo] owner=Właściciel repo_name=Nazwa repozytorium @@ -661,7 +670,6 @@ mirror_prune_desc=Usuń przestarzałe odwołania do zdalnych śledzeń mirror_interval=Przedział czasowy dla tworzenia kopii lustrzanej (prawidłowe jednostki czasu to 'h' (godziny), 'm', 's'). 0, aby wyłączyć automatyczną synchronizację. mirror_interval_invalid=Interwał lustrzanej kopii jest niepoprawny. mirror_address=Sklonuj z adresu URL -mirror_address_desc=Wpisz wymagane dane uwierzytelnienia w sekcji Autoryzacja klonowania. mirror_address_url_invalid=Podany adres URL jest niewłaściwy. Musisz poprawnie escape'ować wszystkie jego elementy. mirror_address_protocol_invalid=Podany adres URL jest niewłaściwy. Tylko z http(s):// lub git:// można utworzyć kopie lustrzane. mirror_last_synced=Ostatnio zsynchronizowano @@ -673,6 +681,7 @@ reactions_more=i %d więcej unit_disabled=Administrator witryny wyłączył tę sekcję repozytorium. language_other=Pozostałe + desc.private=Prywatne desc.public=Publiczne desc.private_template=Szablon prywatny @@ -696,11 +705,9 @@ archive.title=To repozytorium jest zarchiwizowane. Możesz wyświetlać pliki i archive.issue.nocomment=To repozytorium jest zarchiwizowane. Nie możesz komentować zgłoszeń. archive.pull.nocomment=To repozytorium jest zarchiwizowane. Nie możesz komentować Pull Requestów. -form.reach_limit_of_creation=Osiągnąłeś limit %d repozytoriów. form.name_reserved=Nazwa repozytorium „%s” jest zarezerwowana. form.name_pattern_not_allowed=Wzór "%s" nie jest dozwolony w nazwie repozytorium. -need_auth=Autoryzacja klonowania migrate_items=Składniki migracji migrate_items_wiki=Wiki migrate_items_milestones=Kamienie milowe @@ -715,7 +722,6 @@ migrate.clone_local_path=lub ścieżka lokalnego serwera migrate.permission_denied=Nie możesz importować lokalnych repozytoriów. migrate.invalid_local_path=Lokalna ścieżka jest niepoprawna - nie istnieje lub nie jest katalogiem. migrate.failed=Migracja nie powiodła się: %v -migrate.lfs_mirror_unsupported=Tworzenie kopii lustrzanych elementów LFS nie jest wspierane - użyj zamiast tego 'git lfs fetch --all' i 'git lfs push --all'. migrated_from=Zmigrowane z %[2]s migrated_from_fake=Zmigrowane z %[1]s migrate.migrating=Migrowanie z %s... @@ -853,7 +859,6 @@ ext_issues=Zgłoszenia zewn. ext_issues.desc=Link do zewnętrznego systemu śledzenia zgłoszeń. projects=Projekty -projects.desc=Zarządzaj zgłoszeniami i pullami w tablicach projektów. projects.create=Utwórz projekt projects.title=Tytuł projects.new=Nowy projekt @@ -982,7 +987,6 @@ issues.context.edit=Edytuj issues.context.delete=Usuń issues.no_content=Nie ma jeszcze treści. issues.close_issue=Zamknij -issues.pull_merged_at=`scalił(-a) commit %[2]s do %[3]s %[4]s` issues.close_comment_issue=Skomentuj i zamknij issues.reopen_issue=Otwórz ponownie issues.reopen_comment_issue=Skomentuj i otwórz ponownie @@ -1047,12 +1051,11 @@ issues.lock.title=Zablokuj konwersację w tym zgłoszeniu. issues.unlock.title=Odblokuj konwersację w tym zgłoszeniu. issues.comment_on_locked=Nie możesz umieszczać komentarzy pod zablokowanym zgłoszeniem. issues.tracker=Śledzenie czasu -issues.start_tracking_short=Rozpocznij issues.start_tracking=Rozpocznij śledzenie czasu issues.start_tracking_history=`rozpoczął(-ęła) pracę nad %s` issues.tracker_auto_close=Licznik czasu zostanie automatycznie zatrzymany w momencie zamknięcia tego zgłoszenia -issues.stop_tracking=Zatrzymaj issues.stop_tracking_history=`zakończył(-a) pracę nad %s` +issues.cancel_tracking_history=`anulował(-a) śledzenie czasu %s` issues.add_time=Dodaj czas ręcznie issues.add_time_short=Dodaj czas issues.add_time_cancel=Anuluj @@ -1061,8 +1064,6 @@ issues.del_time_history=`usunął(-ęła) spędzony czas %s' issues.add_time_hours=Godziny issues.add_time_minutes=Minuty issues.add_time_sum_to_small=Czas nie został wprowadzony. -issues.cancel_tracking=Anuluj -issues.cancel_tracking_history=`anulował(-a) śledzenie czasu %s` issues.time_spent_total=Całkowity spędzony czas issues.time_spent_from_all_authors=`Całkowity spędzony czas: %s` issues.due_date=Termin realizacji @@ -1071,7 +1072,6 @@ issues.error_modifying_due_date=Nie udało się zmodyfikować terminu realizacji issues.error_removing_due_date=Nie udało się usunąć terminu realizacji. issues.push_commit_1=dodał(-a) %d commit %s issues.push_commits_n=dodał(-a) %d commity(-ów) %s -issues.force_push_codes=`przymusowo wypchnął %[1]s z %[2]s do %[4]s %[6]s` issues.due_date_form=yyyy-mm-dd issues.due_date_form_add=Dodaj termin realizacji issues.due_date_form_edit=Edytuj @@ -1092,8 +1092,6 @@ issues.dependency.remove=Usuń issues.dependency.remove_info=Usuń tę zależność issues.dependency.added_dependency=`dodał nową zależność %s` issues.dependency.removed_dependency=`usunął zależność %s` -issues.dependency.issue_closing_blockedby=Zamknięcie tego Pull Requesta jest blokowane przez następujące zgłoszenia -issues.dependency.pr_closing_blockedby=Zamknięcie tego zgłoszenia jest blokowane przez następujące zgłoszenia issues.dependency.issue_close_blocks=To zgłoszenie blokuje zamknięcie następujących zgłoszeń issues.dependency.pr_close_blocks=Ten Pull Request blokuje zamknięcie następujących zgłoszeń issues.dependency.issue_close_blocked=Musisz zamknąć wszystkie zgłoszenia blokujące to zgłoszenie zanim je zamkniesz. @@ -1133,6 +1131,7 @@ issues.review.un_resolve_conversation=Oznacz dyskusję jako nierozstrzygniętą issues.review.resolved_by=oznaczył(-a) tę rozmowę jako rozwiązaną issues.assignee.error=Nie udało się dodać wszystkich wybranych osób do przypisanych przez nieoczekiwany błąd. + pulls.desc=Włącz Pull Requesty i recenzjonowanie kodu. pulls.new=Nowy Pull Request pulls.compare_changes=Nowy Pull Request @@ -1157,7 +1156,6 @@ pulls.merged_as=Pull Request został scalony jako Poprzedź tytuł przy pomocy %s, aby zapobiec przypadkowemu scaleniu tego Pull Requesta.` -pulls.cannot_merge_work_in_progress=Ten Pull Request został oznaczony jako praca w toku. Usuń prefiks %s z tytułu, kiedy będzie już gotowy. pulls.data_broken=Ten Pull Request jest uszkodzony ze względu na brakujące informacje o forku. pulls.files_conflicted=Ten Pull Request zawiera zmiany konfliktujące z docelową gałęzią. pulls.is_checking=Sprawdzanie konfliktów ze scalaniem w toku. Spróbuj ponownie za chwilę. @@ -1184,10 +1182,6 @@ pulls.no_merge_helper=Włącz opcje scalania w ustawieniach repozytorium, lub sc pulls.no_merge_wip=Ten pull request nie może być automatycznie scalony, ponieważ jest oznaczony jako praca w toku. pulls.no_merge_not_ready=Ten Pull Request nie jest gotowy do scalenia, sprawdź status recenzji i kontrolki stanu. pulls.no_merge_access=Nie masz uprawnień, aby scalić ten Pull Request. -pulls.merge_pull_request=Scal Pull Request -pulls.rebase_merge_pull_request=Zmień bazę i scal -pulls.rebase_merge_commit_pull_request=Zmień bazę i scal (--no-ff) -pulls.squash_merge_pull_request=Zmiażdż i scal pulls.require_signed_wont_sign=Ta gałąź wymaga podpisanych commitów, ale to scalenie nie będzie podpisane pulls.invalid_merge_option=Nie możesz użyć tej opcji scalania dla tego pull request'a. ; %[2]s
    %[3]s
    @@ -1309,7 +1303,6 @@ activity.closed_issues_count_1=Zamknięte zgłoszenie activity.closed_issues_count_n=Zamknięte zgłoszenia activity.title.issues_1=%d Zgłoszenie activity.title.issues_n=%d Zgłoszenia -activity.title.issues_closed_by=%s zamknięte przez %s activity.title.issues_created_by=%s utworzone przez %s activity.closed_issue_label=Zamknięty activity.new_issues_count_1=Nowe zgłoszenie @@ -1415,9 +1408,11 @@ settings.convert_fork_confirm=Konwertuj repozytorium settings.convert_fork_succeed=Fork został przekonwertowany w zwykłe repozytorium. settings.transfer=Przeniesienie własności settings.transfer_desc=Przenieś to repozytorium do innego użytkownika lub organizacji, w której posiadasz uprawnienia administratora. +settings.transfer_form_title=Wpisz nazwę repozytorium w celu potwierdzenia: settings.transfer_notices_1=- Stracisz dostęp do tego repozytorium, jeśli przeniesiesz je do innego użytkownika. settings.transfer_notices_2=- Utrzymasz dostęp do tego repozytorium, jeśli przeniesiesz je do organizacji, której jesteś (współ-)właścicielem. -settings.transfer_form_title=Wpisz nazwę repozytorium w celu potwierdzenia: +settings.transfer_owner=Nowy właściciel +settings.transfer_succeed=Repozytorium zostało przeniesione. settings.wiki_delete=Usuń dane Wiki settings.wiki_delete_desc=Usunięcie danych wiki jest nieodwracalne. settings.wiki_delete_notices_1=- Ta operacja usunie i wyłączy wiki repozytorium %s. @@ -1430,9 +1425,6 @@ settings.delete_notices_2=- Ta operacja trwale usunie repozytorium %s*
    , zdarzenia dla wszystkich gałęzi są wyświetlane. Sprawdź dokumentację github.com/gobwas/glob dla składni. Przykładowo: master, {master,release*}. settings.active=Aktywne settings.active_helper=Informacja o wywołanych wydarzeniach będzie przesłana do tego adresu URL Webhooka. settings.add_hook_success=Webhook został dodany. @@ -1596,7 +1587,6 @@ settings.dismiss_stale_approvals_desc=Kiedy nowe commity zmieniające zawartoś settings.require_signed_commits=Wymagaj podpisanych commitów settings.require_signed_commits_desc=Odrzucaj zmiany wypychane do tej gałęzi, jeśli nie są podpisane, lub są niemożliwe do zweryfikowania. settings.protect_protected_file_patterns=Wzory chronionych plików (rozdzielone średnikiem '\;'): -settings.protect_protected_file_patterns_desc=Chronione pliki, które nie mogą być zmienione bezpośrednio, nawet jeśli użytkownik ma uprawnienia do dodawania, edytowania lub usuwania plików w tej gałęzi. Wzorce można rozdzielić za pomocą średnika ('\;'). Zobacz dokumentację github.com/gobwas/glob dla składni wzorca. Przykłady: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Włącz ochronę settings.delete_protected_branch=Wyłącz ochronę settings.update_protect_branch_success=Ochrona gałęzi dla gałęzi "%s" została zaktualizowana. @@ -1754,11 +1744,13 @@ branch.download=Pobierz gałąź '%s' branch.included_desc=Ta gałąź jest częścią domyślnej gałęzi branch.included=Zawarte + topic.manage_topics=Zarządzaj tematami topic.done=Gotowe topic.count_prompt=Nie możesz wybrać więcej, niż 25 tematów topic.format_prompt=Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków. + [org] org_name_holder=Nazwa organizacji org_full_name_holder=Pełna nazwa organizacji @@ -1871,8 +1863,6 @@ dashboard=Pulpit users=Konta użytkownika organizations=Organizacje repositories=Repozytoria -hooks=Domyślne Webhooki -systemhooks=Webhooki Systemowe authentication=Źródła uwierzytelniania emails=Emaile użytkowników config=Konfiguracja @@ -1904,7 +1894,6 @@ dashboard.cron.error=Błąd w Cronie: %s: %[3]s dashboard.cron.finished=Cron: %[1]s zakończony dashboard.delete_inactive_accounts=Usuń wszystkie nieaktywowane konta dashboard.delete_inactive_accounts.started=Zadanie usuwania nieaktywowanych kont zostało rozpoczęte. -dashboard.delete_repo_archives=Usuń wszystkie archiwa repozytoriów dashboard.delete_repo_archives.started=Zadanie usuwania archiwów repozytoriów zostało rozpoczęte. dashboard.delete_missing_repos=Usuń wszystkie repozytoria, które nie mają plików Gita dashboard.delete_missing_repos.started=Zadanie usuwania repozytoriów, które nie mają plików Gita, zostało rozpoczęte. @@ -2014,11 +2003,8 @@ repos.forks=Forki repos.issues=Zgłoszenia repos.size=Rozmiar -hooks.desc=Webhooki automatycznie tworzą zapytania HTTP POST do serwera, kiedy następują pewne zdarzenia w Gitea. Webhooki zdefiniowane w tym miejscu będą domyślnie kopiowane do wszystkich nowych repozytoriów. Przeczytaj o tym więcej w przewodniku o Webhookach. -hooks.add_webhook=Dodaj domyślny Webhook -hooks.update_webhook=Zaktualizuj domyślny Webhook -systemhooks.desc=Webhooki automatycznie tworzą zapytania HTTP POST do serwera, kiedy następują pewne zdarzenia w Gitea. Webhooki zdefiniowane w tym miejscu będą wykonywane dla wszystkich repozytoriów, więc rozważ ewentualne konsekwencje pod względem wydajności. Przeczytaj o tym więcej w przewodniku o Webhookach. +systemhooks=Webhooki Systemowe systemhooks.add_webhook=Dodaj Webhook Systemowy systemhooks.update_webhook=Aktualizuj Webhook Systemowy @@ -2037,7 +2023,6 @@ auths.host=Serwer auths.port=Port auths.bind_dn=DN powiązania auths.bind_password=Hasło Bind -auths.bind_password_helper=Uwaga: To hasło będzie przechowywane w czystym tekście. Użyj konta "tylko do odczytu", jeśli to możliwe. auths.user_base=Baza wyszukiwania auths.user_dn=DN użytkownika auths.attribute_username=Atrybut nazwy użytkownika @@ -2060,7 +2045,6 @@ auths.smtphost=Serwer SMTP auths.smtpport=Port SMTP auths.allowed_domains=Dozwolone domeny auths.allowed_domains_helper=Pozostaw puste, aby zezwolić na wszystkie domeny. Rozdziel kolejne domeny przecinkiem (','). -auths.enable_tls=Włącz szyfrowanie TLS auths.skip_tls_verify=Pomiń weryfikację protokołu TLS auths.pam_service_name=Nazwa usługi PAM auths.oauth2_provider=Dostawca OAuth2 @@ -2236,7 +2220,6 @@ config.git_gc_timeout=Limit czasu usuwania śmieci config.log_config=Konfiguracja dziennika config.log_mode=Tryb dziennika -config.macaron_log_mode=Tryb dziennika Macaron config.own_named_logger=Nazwany logger config.routes_to_default_logger=Ścieżki do domyślnego loggera config.go_log=Używa dziennika Go (domyślne przekierowanie) @@ -2339,7 +2322,6 @@ comment_issue=`dodaje komentarz w zgłoszeniu %s#%[2]s%s#%[2]s` merge_pull_request=`scala Pull Request %s#%[2]s` transfer_repo=przenosi repozytorium %s do %s -push_tag=wypycha tag %[2]s do %[3]s delete_tag=usuwa tag %[2]s z %[3]s delete_branch=usuwa gałąź %[2]s z %[3]s compare_branch=Porównaj diff --git a/options/locale/locale_pt-BR.ini b/options/locale/locale_pt-BR.ini index 56a5b6fb0..35ed9631b 100644 --- a/options/locale/locale_pt-BR.ini +++ b/options/locale/locale_pt-BR.ini @@ -15,16 +15,19 @@ page=Página template=Template language=Idioma notifications=Notificações +active_stopwatch=Cronômetro ativo create_new=Criar… user_profile_and_more=Perfil e Configurações... signed_in_as=Acessado como enable_javascript=Este site funciona melhor com JavaScript. toc=Índice licenses=Licenças +return_to_gitea=Volte para Gitea username=Nome de usuário email=Endereço de e-mail password=Senha +access_token=Token de Acesso re_type=Digite a senha novamente captcha=CAPTCHA twofa=Autenticação de dois fatores @@ -52,6 +55,8 @@ new_migrate=Nova migração new_mirror=Novo espelhamento new_fork=Novo Fork de Repositório new_org=Nova organização +new_project=Novo Projeto +new_project_board=Novo quadro de projeto manage_org=Gerenciar organizações admin_panel=Administração geral account_settings=Configurações da conta @@ -71,27 +76,37 @@ pull_requests=Pull requests issues=Issues milestones=Marcos +ok=Ok cancel=Cancelar save=Salvar add=Adicionar add_all=Adicionar todos remove=Remover remove_all=Excluir todos +edit=Editar write=Escrever preview=Pré-visualização loading=Carregando… +step1=Passo 1: +step2=Passo 2: +error=Erro error404=A página que você está tentando acessar não existe ou você não está autorizado a visualizá-la. +never=Nunca + [error] occurred=Ocorreu um erro report_message=Se você tem certeza de que se trata de um bug do Gitea, por favor, procure a issue no GitHub e abra novas issues se necessário. +missing_csrf=Pedido inválido: não tem token CSRF presente +invalid_csrf=Pedido inválido: token CSRF inválido [startpage] app_desc=Um serviço de hospedagem Git amigável install=Fácil de instalar +install_desc=Simplesmente execute o binário para seu sistema operacional, instale com o Docker ou faça download do pacote. platform=Multi-plataforma platform_desc=Gitea roda em qualquer sistema operacional em que Go consegue compilar: Windows, macOS, Linux, ARM, etc. Escolha qual você gosta mais! lightweight=Leve e rápido @@ -168,6 +183,7 @@ openid_signin=Habilitar acesso via OpenID openid_signin_popup=Habilitar o acesso de usuários via OpenID. openid_signup=Habilitar o auto-cadastro via OpenID openid_signup_popup=Habilitar o auto-cadastro com base no OpenID. +enable_captcha=Habilitar CAPTCHA ao registrar enable_captcha_popup=Obrigar validação por CAPTCHA para auto-cadastro de usuários. require_sign_in_view=Exigir acesso do usuário para a visualização de páginas require_sign_in_view_popup=Limitar o acesso de página aos usuários que acessaram. Os visitantes só verão a página de 'acesso' e páginas de cadastro. @@ -195,6 +211,8 @@ default_enable_timetracking=Habilitar o contador de tempo por padrão default_enable_timetracking_popup=Habilitar o contador de tempo para novos repositórios por padrão. no_reply_address=Domínio de e-mail oculto no_reply_address_helper=Nome de domínio para usuários com um endereço de e-mail oculto. Por exemplo, o nome de usuário 'joe' será registrado no Git como 'joe@noreply.example.org' se o domínio de e-mail oculto estiver definido como 'noreply.example.org'. +password_algorithm=Algoritmo Hash de Senha +password_algorithm_helper=Escolha o algoritmo de hash para as senhas. Diferentes algoritmos têm requerimentos e forças diversos. O `Argon2` possui boa qualidade, porém usa muita memória e pode ser inapropriado para sistemas com menos recursos. [home] uname_holder=Usuário ou e-mail @@ -208,10 +226,17 @@ my_mirrors=Meus espelhos view_home=Ver %s search_repos=Encontre um repositório… filter=Outros filtros +filter_by_team_repositories=Filtrar por repositórios da equipe show_archived=Arquivado +show_both_archived_unarchived=Mostrando arquivados e não arquivados +show_only_archived=Mostrando somente arquivados +show_only_unarchived=Mostrando somente não arquivados show_private=Privado +show_both_private_public=Mostrando públicos e privados +show_only_private=Mostrando somente privados +show_only_public=Mostrando somente públicos issues.in_your_repos=Em seus repositórios @@ -221,6 +246,7 @@ users=Usuários organizations=Organizações search=Pesquisar code=Código +search.fuzzy=Similar repo_no_results=Nenhum repositório correspondente foi encontrado. user_no_results=Nenhum usuário correspondente foi encontrado. org_no_results=Nenhuma organização correspondente foi encontrada. @@ -234,6 +260,7 @@ register_helper_msg=Já tem uma conta? Acesse agora! social_register_helper_msg=Já tem uma conta? Vincule agora! disable_register_prompt=Cadastro está desabilitado. Entre em contato com o administrador do site. disable_register_mail=E-mail de confirmação de cadastro está desabilitado. +remember_me=Lembrar deste Dispositivo forgot_password_title=Esqueci minha senha forgot_password=Esqueceu sua senha? sign_up_now=Precisa de uma conta? Cadastre-se agora. @@ -266,6 +293,7 @@ twofa_scratch_token_incorrect=Seu código de backup está incorreto. login_userpass=Acessar login_openid=OpenID oauth_signup_tab=Cadastrar nova conta +oauth_signup_title=Completar Nova Conta oauth_signup_submit=Completar conta oauth_signin_tab=Vincular à uma conta existente oauth_signin_title=Acesse com uma conta vinculada @@ -276,7 +304,6 @@ openid_connect_desc=O URI do OpenID escolhido é desconhecido. Associe-o com uma openid_register_title=Criar uma nova conta openid_register_desc=O URI do OpenID escolhido é desconhecido. Associe-o com uma nova conta aqui. openid_signin_desc=Digite a URI do seu OpenID. Por exemplo: https://anne.me, bob.openid.org.cn ou gnusocial.net/carry. -disable_forgot_password_mail=Recuperação de conta está desativada. Por favor, contate o administrador do servidor. email_domain_blacklisted=Você não pode se cadastrar com seu endereço de e-mail. authorize_application=Autorizar aplicativo authorize_redirect_notice=Você será redirecionado para %s se você autorizar este aplicativo. @@ -286,14 +313,31 @@ authorize_title=Autorizar "%s" para acessar sua conta? authorization_failed=Autorização falhou authorization_failed_desc=A autorização falhou porque detectamos uma solicitação inválida. Entre em contato com o mantenedor do aplicativo que você tentou autorizar. sspi_auth_failed=Falha de autenticação SSPI +password_pwned=A senha escolhida está em uma lista de senhas roubadas anteriormente expostas em violações de dados públicos. Por favor, tente novamente com uma senha diferente. +password_pwned_err=Não foi possível concluir a requisição ao HaveIBeenPwned [mail] + activate_account=Por favor, ative sua conta + activate_email=Verifique seu endereço de e-mail -reset_password=Recuperar sua conta -register_success=Cadastro bem-sucedido + register_notify=Bem-vindo ao Gitea +reset_password=Recuperar sua conta + +register_success=Cadastro bem-sucedido + + + +release.new.subject=%s em %s lançado + +repo.transfer.subject_to=%s gostaria de transferir "%s" para %s +repo.transfer.subject_to_you=%s gostaria de transferir "%s" para você +repo.transfer.to_you=você + +repo.collaborator.added.subject=%s adicionou você a %s + [modal] yes=Sim no=Não @@ -339,13 +383,19 @@ password_not_match=As senhas não coincidem. lang_select_error=Selecione um idioma da lista. username_been_taken=O nome de usuário já está sendo usado. +username_change_not_local_user=Usuários não-locais não são autorizados a alterar nome de usuário. repo_name_been_taken=O nome de repositório já está sendo usado. +repository_files_already_exist=Arquivos já existem neste repositório. Contate o administrador. +repository_files_already_exist.adopt=Arquivos já existem neste repositório e só podem ser adotados. +repository_files_already_exist.delete=Arquivos já existem neste repositório. Você deve deletá-los. +repository_files_already_exist.adopt_or_delete=Arquivos já existem neste repositório. Você deve adotá-los ou deletá-los. visit_rate_limit=Limitação da taxa de visita remota. 2fa_auth_required=Visita remota requer autenticação de dois fatores. org_name_been_taken=O nome da organização já está sendo usado. -team_name_been_taken=O nome do time já está sendo usado. +team_name_been_taken=O nome da equipe já está sendo usado. team_no_units_error=Permitir acesso a pelo menos uma seção de repositório. email_been_used=Este endereço de e-mail já está sendo usado. +email_invalid=O endereço de email é inválido. openid_been_used=O endereço OpenID '%s' já está sendo usado. username_password_incorrect=Nome de usuário ou senha incorretos. password_complexity=A senha não passa pelos requisitos de complexidade: @@ -354,14 +404,17 @@ password_uppercase_one=Pelo menos um caractere maiúsculo password_digit_one=Pelo menos um dígito password_special_one=Pelo menos um caractere especial (pontuação, parênteses, aspas, etc.) enterred_invalid_repo_name=O nome do repositório que você digitou está incorreto. +enterred_invalid_org_name=O nome da organização inserido é incorreto. enterred_invalid_owner_name=O nome do novo proprietário não é válido. enterred_invalid_password=A senha que você digitou está incorreta. user_not_exist=O usuário não existe. team_not_exist=A equipe não existe. -cannot_add_org_to_team=Uma organização não pode ser adicionada como membro de um time. +last_org_owner=Você não pode remover o último usuário do time 'proprietários'. Deve haver pelo menos um proprietário em uma organização. +cannot_add_org_to_team=Uma organização não pode ser adicionada como membro de uma equipe. invalid_ssh_key=Não é possível verificar sua chave SSH: %s invalid_gpg_key=Não é possível verificar sua chave GPG: %s +invalid_ssh_principal=Nome principal inválido: %s unable_verify_ssh_key=Não é possível verificar sua chave SSH; verifique novamente se há erros. auth_failed=Autenticação falhou: %v @@ -378,6 +431,8 @@ repositories=Repositórios activity=Atividade pública followers=Seguidores starred=Repositórios favoritos +watched=Repositórios observados +projects=Projetos following=Seguindo follow=Seguir unfollow=Deixar de seguir @@ -408,6 +463,7 @@ uid=Uid u2f=Chaves de segurança public_profile=Perfil público +biography_placeholder=Nos conte um pouco sobre você profile_desc=Seu endereço de e-mail será usado para notificações e outras operações. password_username_disabled=Usuários não-locais não podem alterar seus nomes de usuário. Por favor contate o administrador do site para mais informações. full_name=Nome completo @@ -415,9 +471,11 @@ website=Site location=Localização update_theme=Atualizar o tema update_profile=Atualizar o perfil +update_language_not_found=Idioma '%s' não está disponível. update_profile_success=Seu perfil foi atualizado. change_username=Seu nome de usuário foi alterado. change_username_prompt=Nota: as alterações de nome de usuário também mudam sua URL da conta. +change_username_redirect_prompt=O nome de usuário antigo, enquanto disponível, irá redirecionar. continue=Continuar cancel=Cancelar language=Idioma @@ -451,7 +509,11 @@ manage_openid=Gerencia endereços OpenID email_desc=Seu endereço de e-mail principal será usado para notificações e outras operações. theme_desc=Este será o seu tema padrão em todo o site. primary=Principal +activated=Ativado +requires_activation=Requer ativação primary_email=Tornar privado +activate_email=Enviar Ativação +activations_pending=Ativações pendentes delete_email=Remover email_deletion=Remover endereço de e-mail email_deletion_desc=O endereço de e-mail e informações relacionadas serão removidos de sua conta. Commits aplicados por este endereço de e-mail permanecerão inalterados. Continuar? @@ -467,36 +529,55 @@ add_email=Adicionar novo endereço de e-mail add_openid=Adicionar URI OpenID add_email_confirmation_sent=Um novo e-mail de confirmação foi enviado para '%s'. Por favor verifique sua caixa de e-mail dentro de %s para confirmar seu e-mail. add_email_success=O novo endereço de e-mail foi adicionado. +email_preference_set_success=Preferência de e-mail definida com sucesso. add_openid_success=O novo endereço de OpenID foi adicionado. keep_email_private=Ocultar endereço de e-mail keep_email_private_popup=Seu endereço de e-mail será ocultado de outros usuários. openid_desc=OpenID permite delegar autenticação para um provedor externo. manage_ssh_keys=Gerenciar Chaves SSH +manage_ssh_principals=Gerenciar Nomes Principais do certificado SSH manage_gpg_keys=Gerenciar chaves GPG add_key=Adicionar chave ssh_desc=Estas chaves SSH públicas estão associados a sua conta. Chaves privadas correspondentes permitam acesso completo a seus repositórios. +principal_desc=Estes nomes principais do certificado SSH estão associados à sua conta e permitem acesso total aos seus repositórios. gpg_desc=Essas chaves GPG públicas estão associadas à sua conta. Mantenha suas chaves privadas seguras, pois elas permitem que os commits sejam verificados. ssh_helper=Precisa de ajuda? Dê uma olhada no guia do GitHub para criar suas próprias chaves SSH ou resolver problemas comuns que você pode ter usando SSH. gpg_helper=Precisa de ajuda? Dê uma olhada no guia do GitHub sobre GPG. add_new_key=Adicionar Chave SSH add_new_gpg_key=Adicionar chave GPG +key_content_ssh_placeholder=Começa por 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', ou 'sk-ssh-ed25519@openssh.com' +key_content_gpg_placeholder=Começa com '-----BEGIN PGP PUBLIC KEY BLOCK-----' +add_new_principal=Adicionar Nome Principal ssh_key_been_used=Esta chave SSH já foi adicionada ao servidor. +ssh_key_name_used=Uma chave SSH com o mesmo nome já existe em sua conta. +ssh_principal_been_used=Este nome principal já foi adicionada ao servidor. gpg_key_id_used=Uma chave GPG pública com a mesma ID já existe. -gpg_no_key_email_found=Esta chave GPG não é utilizável com qualquer endereço de e-mail associado à sua conta. +gpg_invalid_token_signature=A chave GPG fornecida, a assinatura ou o token não correspondem ou o token está desatualizado. +gpg_token_required=Você tem que fornecer uma assinatura para o token abaixo +gpg_token=Token +gpg_token_help=Você pode gerar uma assinatura usando: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +key_signature_gpg_placeholder=Começa com '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=A chave GPG '%s' foi validada. subkeys=Subchaves key_id=ID da chave key_name=Nome da Chave key_content=Conteúdo +principal_content=Conteúdo add_key_success=A chave SSH '%s' foi adicionada. add_gpg_key_success=A chave GPG '%s' foi adicionada. +add_principal_success=O nome principal do certificado SSH '%s' foi adicionado. delete_key=Remover ssh_key_deletion=Remover a chave SSH gpg_key_deletion=Remover a chave GPG +ssh_principal_deletion=Remover Nome Principal do Certificado SSH ssh_key_deletion_desc=A exclusão de uma chave SSH revoga seu acesso à sua conta. Continuar? gpg_key_deletion_desc=A exclusão de uma chave GPG cancela a verificação de confirmações assinadas por ela. Continuar? +ssh_principal_deletion_desc=A exclusão de um Nome Principal de um Certificado SSH revoga o seu acesso à sua conta. Proceder? ssh_key_deletion_success=A chave SSH foi removida. gpg_key_deletion_success=A chave GPG foi removida. +ssh_principal_deletion_success=O nome principal foi removido. add_on=Adicionado em valid_until=Válido até valid_forever=Válido para sempre @@ -506,9 +587,11 @@ can_read_info=Leitura can_write_info=Escrita key_state_desc=Esta chave tem sido utilizada nos últimos 7 dias token_state_desc=Este token tem sido utilizado nos últimos 7 dias +principal_state_desc=Este nome principal foi utilizado nos últimos 7 dias show_openid=Mostrar no perfil hide_openid=Ocultar no perfil ssh_disabled=SSH desabilitado +ssh_externally_managed=Esta chave SSH para este usuário é gerenciada externamente manage_social=Gerenciar contas sociais associadas social_desc=Essas contas sociais estão vinculadas à sua conta do Gitea. Certifique-se de reconhecer todas elas, pois elas podem ser usadas para acessar a sua conta do Gitea. unbind=Desvincular @@ -521,6 +604,7 @@ new_token_desc=Aplicativos usando um token possuem acesso total à sua conta. token_name=Nome do token generate_token=Gerar token generate_token_success=Seu novo token foi gerado. Copie-o agora, pois ele não será mostrado novamente. +generate_token_name_duplicate=%s já foi usado como um nome de aplicativo. Por favor, use outro. delete_token=Excluir access_token_deletion=Excluir token de acesso access_token_deletion_desc=A exclusão de um token revoga o acesso à sua conta para aplicativos que o usam. Continuar? @@ -574,6 +658,7 @@ or_enter_secret=Ou digite esse código: %s then_enter_passcode=E insira a senha mostrada no aplicativo: passcode_invalid=Esse código de acesso é inválido. Tente novamente. twofa_enrolled=Sua conta foi inscrita na autenticação de dois fatores. Armazene seu token de backup (%s) em um local seguro, pois ele é exibido apenas uma vez! +twofa_failed_get_secret=Falha ao obter o segredo. u2f_desc=Chaves de segurança são dispositivos de hardware contendo chaves criptográficas. Eles podem ser usados para autenticação de dois fatores. As chaves de segurança devem suportar o padrão FIDO U2F. u2f_require_twofa=Sua conta deve estar inscrita na autenticação de dois fatores para usar as chaves de segurança. @@ -595,6 +680,7 @@ repos_none=Você não possui nenhum repositório delete_account=Excluir sua conta delete_prompt=Esta operação irá apagar permanentemente a sua conta de usuário. Isto NÃO PODERÁ ser desfeito. +delete_with_all_comments=Sua conta é mais nova que %s. Para evitar comentários fantasmas, todos os comentários de Issue/PR serão excluídos com ela. confirm_delete_account=Confirmar exclusão delete_account_title=Excluir conta de usuário delete_account_desc=Tem certeza que deseja apagar sua conta de usuário permanentemente? @@ -604,8 +690,18 @@ email_notifications.onmention=Somente e-mail com menção email_notifications.disable=Desabilitar notificações de e-mail email_notifications.submit=Atualizar preferências de e-mail +visibility=Visibilidade do usuário +visibility.public=Pública +visibility.public_tooltip=Visível para todos os usuários +visibility.limited=Limitada +visibility.limited_tooltip=Visível apenas para usuários logados +visibility.private=Privada +visibility.private_tooltip=Visível apenas para membros da organização + [repo] +new_repo_helper=Um repositório contém todos os arquivos do projeto, incluindo o histórico de revisão. Já o tem em outro lugar? Migre o repositório. owner=Proprietário +owner_helper=Algumas organizações podem não aparecer no menu devido a um limite de contagem dos repositórios. repo_name=Nome do repositório repo_name_helper=Um bom nome de repositório é composto por palavras curtas, memorizáveis e únicas. repo_size=Tamanho do repositório @@ -623,29 +719,47 @@ fork_repo=Fork do repositório fork_from=Fork de fork_visibility_helper=A visibilidade do fork de um repositório não pode ser alterada. use_template=Usar este modelo +clone_in_vsc=Clonar no VS Code +download_zip=Baixar ZIP +download_tar=Baixar TAR.GZ +download_bundle=Baixar PACOTE generate_repo=Gerar repositório generate_from=Gerar de repo_desc=Descrição +repo_desc_helper=Digite uma breve descrição (opcional) repo_lang=Linguagem repo_gitignore_helper=Selecione modelos do .gitignore. issue_labels=Etiquetas de issue issue_labels_helper=Selecione um conjunto de etiquetas de issue. license=Licença license_helper=Selecione um arquivo de licença. +license_helper_desc=Uma licença define o que os outros podem e não podem fazer com o seu código. Não tem certeza qual é a mais adequada para o seu projeto? Veja Escolher uma licença. readme=LEIA-ME readme_helper=Selecione um modelo de arquivo LEIA-ME. +readme_helper_desc=Aqui você pode escrever uma descrição completa para o seu projeto. auto_init=Inicializar o repositório (adicionando .gitignore, licença e LEIA-ME) +trust_model_helper=Selecione o modelo de confiança para verificação de assinatura. As opções possíveis são: +trust_model_helper_collaborator=Colaborador: Confiar em assinaturas de colaboradores +trust_model_helper_default=Padrão: Usar o modelo de confiança padrão para esta instalação create_repo=Criar repositório default_branch=Branch padrão +default_branch_helper=O branch padrão é o branch base para pull requests e commits de código. mirror_prune=Varrer mirror_prune_desc=Remover referências obsoletas de controle remoto mirror_interval=Intervalo de espelhamento (as unidades de tempo válidas são 'h', 'm', 's'). 0 para desativar a sincronização automática. mirror_interval_invalid=O intervalo do espelhamento não é válido. mirror_address=Clonar de URL -mirror_address_desc=Coloque qualquer credencial necessária na seção de Autorização de Clone. +mirror_address_desc=Coloque todas as credenciais necessárias na seção de autorização. mirror_address_url_invalid=A url fornecida é inválida. Você deve escapar todos os componentes da url corretamente. mirror_address_protocol_invalid=A url fornecida é inválida. Apenas http(s):// ou git:// podem ser espelhados. +mirror_lfs=Armazenamento de Arquivo Grande (LFS) +mirror_lfs_desc=Ativar espelhamento de dados LFS. +mirror_lfs_endpoint=Destino LFS +mirror_lfs_endpoint_desc=A sincronização tentará usar o URL de clonagem para determinar o servidor LFS. Você também pode especificar um destino personalizado se os dados do repositório LFS forem armazenados em outro lugar. mirror_last_synced=Última sincronização +mirror_password_placeholder=(inalterada) +mirror_password_blank_placeholder=(não definida) +mirror_password_help=Altere o nome de usuário para apagar uma senha armazenada. watchers=Observadores stargazers=Usuários que estrelaram forks=Forks @@ -653,10 +767,30 @@ pick_reaction=Escolha sua reação reactions_more=e %d mais unit_disabled=O administrador do site desabilitou esta seção do repositório. language_other=Outra +adopt_search=Digite o nome de usuário para pesquisar por repositórios órfãos... (deixe em branco para encontrar todos) +adopt_preexisting_label=Adotar arquivos +adopt_preexisting=Adotar arquivos pré-existentes +adopt_preexisting_content=Criar repositório a partir de %s +adopt_preexisting_success=Arquivos adotados e repositório criado a partir de %s +delete_preexisting_label=Excluir +delete_preexisting=Excluir arquivos pré-existentes +delete_preexisting_content=Excluir arquivos em %s +delete_preexisting_success=Arquivos órfãos excluídos em %s +blame_prior=Ver a responsabilização anterior a esta modificação + +transfer.accept=Aceitar transferência +transfer.accept_desc=Transferir para "%s" +transfer.reject=Rejeitar transferência +transfer.reject_desc=Cancelar a transferência para "%s" +transfer.no_permission_to_accept=Você não tem permissão para Aceitar +transfer.no_permission_to_reject=Você não tem permissão para Rejeitar desc.private=Privado desc.public=Público +desc.private_template=Modelo privado +desc.public_template=Modelo desc.internal=Interno +desc.internal_template=Modelo interno desc.archived=Arquivado template.items=Itens do modelo @@ -674,36 +808,67 @@ archive.title=Este repositório está arquivado. Você pode visualizar os arquiv archive.issue.nocomment=Este repositório está arquivado. Você não pode comentar nas issues. archive.pull.nocomment=Este repositório está arquivado. Você não pode comentar nos pull requests. -form.reach_limit_of_creation=Você já atingiu o seu limite de %d repositórios. +form.reach_limit_of_creation_1=Você já atingiu o seu limite de %d repositório. +form.reach_limit_of_creation_n=Você já atingiu o limite de %d repositórios. form.name_reserved=O nome de repositório '%s' está reservado e não pode ser usado. form.name_pattern_not_allowed=O padrão de '%s' não é permitido em um nome de repositório. -need_auth=Autorização de clone +need_auth=Autorização +migrate_options=Opções de Migração +migrate_service=Serviço de Migração +migrate_options_mirror_helper=Este repositório será um espelho +migrate_options_mirror_disabled=O administrador do site desabilitou novos espelhamentos. +migrate_options_lfs=Migrar arquivos LFS +migrate_options_lfs_endpoint.label=Destino LFS +migrate_options_lfs_endpoint.description=A migração tentará usar seu controle remoto Git para determinar o servidor LFS. Você também pode especificar um destino personalizado se os dados do repositório LFS forem armazenados em outro lugar. +migrate_options_lfs_endpoint.description.local=Um caminho de servidor local também é suportado. +migrate_options_lfs_endpoint.placeholder=Deixe em branco para derivar do URL de clonagem migrate_items=Itens da migração migrate_items_wiki=Wiki migrate_items_milestones=Marcos migrate_items_labels=Etiquetas migrate_items_issues=Issues migrate_items_pullrequests=Pull requests +migrate_items_merge_requests=Requisições de merge migrate_items_releases=Versões migrate_repo=Migrar repositório migrate.clone_address=Migrar / Clonar de URL migrate.clone_address_desc=URL HTTP (S) ou Git 'clone' de um repositório existente migrate.clone_local_path=ou um caminho de servidor local migrate.permission_denied=Você não pode importar repositórios locais. +migrate.permission_denied_blocked=Você não tem permissão para importar de origens bloqueadas. +migrate.permission_denied_private_ip=Você não tem permissão para importar de IPs privados. migrate.invalid_local_path=O caminho local é inválido. Ele não existe ou não é um diretório. +migrate.invalid_lfs_endpoint=O destino LFS não é válido. migrate.failed=Migração falhou: %v -migrate.lfs_mirror_unsupported=Espelhamento de objetos Git LFS não é suportado; ao invés use 'git lfs fetch --all' e 'git lfs push --all'. +migrate.migrate_items_options=Um Token de Acesso é necessário para migrar itens adicionais migrated_from=Migrado de %[2]s migrated_from_fake=Migrado de %[1]s +migrate.migrate=Migrar de %s migrate.migrating=Migrando a partir de %s ... migrate.migrating_failed=Migração a partir de %s falhou. +migrate.migrating_failed.error=Erro: %s +migrate.github.description=Migrar dados de github.com ou de outras instâncias do Github. +migrate.git.description=Migrar um repositório somente de qualquer serviço Git. +migrate.gitlab.description=Migrar dados de gitlab.com ou de outras instâncias do GitLab. +migrate.gitea.description=Migrar dados de gitea.com ou de outras instâncias do Gitea. +migrate.gogs.description=Migrar dados de notabug.org ou de outras instâncias do Gogs. +migrate.onedev.description=Migrar dados de code.onedev.io ou de outras instâncias do OneDev. +migrate.migrating_git=Migrando dados Git +migrate.migrating_topics=Migrando tópicos +migrate.migrating_milestones=Migrando Marcos +migrate.migrating_labels=Migrando Rótulos +migrate.migrating_releases=Migrando Versões +migrate.migrating_issues=Migrando Issues +migrate.migrating_pulls=Migrando Pull Requests mirror_from=espelhamento de forked_from=feito fork de generated_from=gerado a partir de fork_from_self=Você não pode criar um fork de um repositório que já é seu. fork_guest_user=Acesse para realizar um fork deste repositório. +watch_guest_user=Entre para observar este repositório. +star_guest_user=Entre para adicionar uma estrela neste repositório. copy_link=Copiar copy_link_success=O link foi copiado copy_link_error=Use ⌘-C ou Ctrl-C para copiar @@ -726,19 +891,27 @@ code=Código code.desc=Acesso a código-fonte, arquivos, commits e branches. branch=Branch tree=Tag +clear_ref=`Limpar referência atual` filter_branch_and_tag=Filtrar branch ou tag +find_tag=Pesquisar etiqueta branches=Branches tags=Tags issues=Issues pulls=Pull requests +project_board=Projetos labels=Etiquetas +org_labels_desc_manage=gerenciar milestones=Marcos commits=Commits commit=Commit +release=Versão releases=Versões +released_this=lançou isto file_raw=Original file_history=Histórico +file_view_source=Exibir código-fonte +file_view_rendered=Ver Renderizado file_view_raw=Ver original file_permalink=Link permanente file_too_large=O arquivo é muito grande para ser mostrado. @@ -747,6 +920,10 @@ audio_not_supported_in_browser=Seu navegador não suporta a tag 'audio' do HTML5 stored_lfs=Armazenado com Git LFS symbolic_link=Link simbólico commit_graph=Gráfico de commits +commit_graph.select=Selecionar branches +commit_graph.hide_pr_refs=Esconder Pull Requests +commit_graph.monochrome=Monocromático +commit_graph.color=Cor blame=Anotar normal_view=Visão normal line=linha @@ -776,6 +953,7 @@ editor.add=Adicionar '%s' editor.update=Atualizar '%s' editor.delete=Excluir '%s' editor.commit_message_desc=Adicione uma descrição detalhada (opcional)... +editor.signoff_desc=Adicione um assinado-por-committer no final do log do commit. editor.commit_directly_to_this_branch=Commit diretamente no branch %s. editor.create_new_branch=Crie um novo branch para este commit e crie um pull request. editor.create_new_branch_np=Crie um novo branch para este commit. @@ -796,7 +974,11 @@ editor.file_already_exists=Um arquivo com nome '%s' já existe neste repositóri editor.commit_empty_file_header=Fazer commit de um arquivo vazio editor.commit_empty_file_text=O arquivo que você está prestes fazer commit está vazio. Continuar? editor.no_changes_to_show=Nenhuma alteração a mostrar. +editor.fail_to_update_file=Falha ao atualizar/criar arquivo '%s'. +editor.fail_to_update_file_summary=Mensagem de erro: editor.push_rejected_no_message=A alteração foi rejeitada pelo servidor sem uma mensagem. Por favor, verifique os githooks. +editor.push_rejected=A alteração foi rejeitada pelo servidor. Por favor, verifique os githooks. +editor.push_rejected_summary=Mensagem completa de rejeição: editor.add_subdir=Adicionar um subdiretório... editor.unable_to_upload_files=Houve erro ao fazer upload de arquivos para '%s': %v editor.upload_file_is_locked=Arquivo '%s' está bloqueado por %s. @@ -819,19 +1001,64 @@ commits.date=Data commits.older=Mais Antigo commits.newer=Mais recente commits.signed_by=Acessado por +commits.signed_by_untrusted_user=Assinado por usuário não confiável +commits.signed_by_untrusted_user_unmatched=Assinado por usuário não confiável que não corresponde ao autor da submissão commits.gpg_key_id=ID da chave GPG ext_issues=Ext. Issues ext_issues.desc=Link para o issue tracker externo. +projects=Projetos +projects.desc=Gerencie issues e PRs nos quadros do projeto. +projects.description=Descrição (opcional) +projects.description_placeholder=Descrição +projects.create=Criar Projeto +projects.title=Título +projects.new=Novo projeto +projects.new_subheader=Coordene, acompanhe e atualize seu trabalho em um só lugar, para que os projetos permaneçam transparentes e dentro do cronograma. +projects.create_success=O projeto '%s' foi criado. +projects.deletion=Apagar Projeto +projects.deletion_desc=Excluir um projeto o remove de todas as issues relacionadas. Deseja continuar? +projects.deletion_success=O projeto foi excluido. +projects.edit=Editar Projetos +projects.edit_subheader=Projetos organizam issues e acompanham o progresso. +projects.modify=Atualizar Projeto +projects.edit_success=Projeto '%s' foi atualizado. +projects.type.none=Nenhum +projects.type.basic_kanban=Kanban básico +projects.type.bug_triage=Triagem de Bugs +projects.template.desc=Modelo de projeto +projects.template.desc_helper=Selecione um modelo de projeto para começar +projects.type.uncategorized=Sem categoria +projects.board.edit=Editar quadro +projects.board.edit_title=Novo nome do quadro +projects.board.new_title=Novo nome do quadro +projects.board.new_submit=Enviar +projects.board.new=Novo Quadro +projects.board.set_default=Definir como padrão +projects.board.set_default_desc=Definir este quadro como padrão para pull e issues sem categoria +projects.board.delete=Excluir Quadro +projects.board.deletion_desc=Excluir um quadro de projeto move todas as issues relacionadas para 'Sem Categoria'. Continuar? +projects.open=Abrir +projects.close=Fechar issues.desc=Organize relatórios de bugs, tarefas e marcos. +issues.filter_assignees=Filtrar Atribuição +issues.filter_milestones=Filtrar Marco +issues.filter_projects=Filtrar Projeto +issues.filter_reviewers=Filtrar Revisor issues.new=Nova issue issues.new.title_empty=Título não pode ser em branco issues.new.labels=Etiquetas issues.new.add_labels_title=Aplicar etiquetas issues.new.no_label=Sem etiqueta issues.new.clear_labels=Limpar etiquetas +issues.new.projects=Projetos +issues.new.add_project_title=Definir Projeto +issues.new.clear_projects=Limpar projetos +issues.new.no_projects=Sem projeto +issues.new.open_projects=Abrir Projetos +issues.new.closed_projects=Projetos fechados issues.new.no_items=Nenhum item issues.new.milestone=Marco issues.new.add_milestone_title=Definir marco @@ -843,6 +1070,11 @@ issues.new.assignees=Responsáveis issues.new.add_assignees_title=Atribuir usuários issues.new.clear_assignees=Limpar responsáveis issues.new.no_assignees=Sem responsável +issues.new.no_reviewers=Sem revisor +issues.new.add_reviewer_title=Solicitar revisão +issues.choose.get_started=Primeiros passos +issues.choose.blank=Padrão +issues.choose.blank_about=Criar uma issue a partir do modelo padrão. issues.no_ref=Nenhum branch/tag especificado issues.create=Criar issue issues.new_label=Nova etiqueta @@ -855,9 +1087,13 @@ issues.label_templates.helper=Selecione um conjunto de etiquetas issues.label_templates.use=Use o conjunto de etiquetas issues.label_templates.fail_to_load_file=Houve erro ao carregar arquivo de template '%s': %v issues.add_milestone_at=`adicionou esta issue para o marco %s %s` +issues.add_project_at=`adicionado ao projeto %s %s` issues.change_milestone_at=`modificou o marco de %s para %s %s` +issues.change_project_at=`modificou o projeto de %s para %s %s` issues.remove_milestone_at=`removeu esta issue do marco %s %s` +issues.remove_project_at=`removido do projeto %s %s` issues.deleted_milestone='(excluído)' +issues.deleted_project=`(excluído)` issues.self_assign_at=`se auto atribuiu para esta issue %s` issues.add_assignee_at=`foi atribuído por %s %s` issues.remove_assignee_at=`teve sua atribuição removida por %s %s` @@ -878,6 +1114,7 @@ issues.filter_type.all_issues=Todas as issues issues.filter_type.assigned_to_you=Atribuídos a você issues.filter_type.created_by_you=Criado por você issues.filter_type.mentioning_you=Mencionando você +issues.filter_type.review_requested=Revisão solicitada issues.filter_sort=Ordenação issues.filter_sort.latest=Mais recentes issues.filter_sort.oldest=Mais antigos @@ -899,6 +1136,8 @@ issues.action_milestone_no_select=Sem marco issues.action_assignee=Responsável issues.action_assignee_no_select=Sem responsável issues.opened_by=aberto por %[3]s %[1]s +pulls.merged_by=por %[3]s merge aplicado %[1]s +pulls.merged_by_fake=por %[2]s merge aplicado %[1]s issues.previous=Anterior issues.next=Próximo issues.open_title=Aberto @@ -972,12 +1211,11 @@ issues.lock.title=Conversação bloqueada para esta issue. issues.unlock.title=Conversação desbloqueada para esta issue. issues.comment_on_locked=Você não pode comentar em uma issue bloqueada. issues.tracker=Contador de tempo -issues.start_tracking_short=Iniciar issues.start_tracking=Iniciar contador de tempo issues.start_tracking_history=`começou a trabalhar %s` issues.tracker_auto_close=Contador de tempo será parado automaticamente quando esta issue for fechada -issues.stop_tracking=Parar issues.stop_tracking_history=`parou de trabalhar %s` +issues.cancel_tracking_history=`cancelou contador de tempo %s` issues.add_time=Adicionar tempo manualmente issues.add_time_short=Adicionar tempo issues.add_time_cancel=Cancelar @@ -986,8 +1224,6 @@ issues.del_time_history=`removeu tempo gasto %s` issues.add_time_hours=Horas issues.add_time_minutes=Minutos issues.add_time_sum_to_small=Nenhum tempo foi inserido. -issues.cancel_tracking=Cancelar -issues.cancel_tracking_history=`cancelou contador de tempo %s` issues.time_spent_total=Tempo total gasto issues.time_spent_from_all_authors=`Tempo total gasto: %s` issues.due_date=Data limite @@ -1012,8 +1248,6 @@ issues.dependency.add=Adicione… issues.dependency.cancel=Cancelar issues.dependency.remove=Remover issues.dependency.remove_info=Remover esta dependência -issues.dependency.issue_closing_blockedby=Fechamento deste pull request está bloqueado pelas seguintes issues -issues.dependency.pr_closing_blockedby=Fechamento desta issue está bloqueado pelas seguintes issues issues.dependency.issue_close_blocks=Esta issue bloqueia o fechamento das seguintes issues issues.dependency.pr_close_blocks=Este pull request bloqueia o fechamento das seguintes issues issues.dependency.issue_close_blocked=Você precisa fechar todas as issues que bloqueiam esta issue antes de poder fechá-la. @@ -1043,6 +1277,9 @@ issues.review.show_outdated=Mostrar desatualizado issues.review.hide_outdated=Ocultar desatualizado issues.assignee.error=Nem todos os responsáveis foram adicionados devido a um erro inesperado. +compare.compare_base=base +compare.compare_head=comparar + pulls.desc=Habilitar pull requests e revisões de código. pulls.new=Novo pull request pulls.compare_changes=Novo pull request @@ -1064,51 +1301,81 @@ pulls.reopen_to_merge=Por favor reabra este pull request para aplicar o merge. pulls.cant_reopen_deleted_branch=Este pull request não pode ser reaberto porque o branch foi excluído. pulls.merged=Merge aplicado pulls.merged_as=O pull request teve merge aplicado como %[2]s. +pulls.manually_merged=Merge aplicado manualmente pulls.is_closed=O pull request foi fechado. pulls.has_merged=O merge deste pull request foi aplicado. pulls.title_wip_desc=`Inicie o título com o prefixo %s para prevenir o merge do pull request até que o mesmo esteja pronto.` -pulls.cannot_merge_work_in_progress=Este pull request está marcado como um trabalho em andamento. Remova o prefixo %s do título quando estiver pronto +pulls.cannot_merge_work_in_progress=Este pull request está marcado como um trabalho em andamento. +pulls.still_in_progress=Ainda em andamento? +pulls.add_prefix=Adicione o prefixo %s +pulls.remove_prefix=Remover o prefixo %s pulls.data_broken=Este pull request está quebrado devido a falta de informação do fork. pulls.files_conflicted=Este pull request tem alterações conflitantes com o branch de destino. pulls.is_checking=Verificação de conflitos do merge está em andamento. Tente novamente em alguns momentos. pulls.required_status_check_failed=Algumas verificações necessárias não foram bem sucedidas. +pulls.required_status_check_missing=Estão faltando algumas verificações necessárias. pulls.required_status_check_administrator=Como administrador, você ainda pode aplicar o merge deste pull request. pulls.blocked_by_approvals=Este pull request ainda não possui aprovações suficientes. %d de %d aprovações concedidas. pulls.blocked_by_rejection=Este pull request possui alterações solicitadas por um revisor oficial. +pulls.blocked_by_official_review_requests=Este Pull Request possui solicitações de revisão oficiais. +pulls.blocked_by_outdated_branch=Este Pull Request está bloqueado porque está desatualizado. +pulls.blocked_by_changed_protected_files_1=Este Pull Request está bloqueado porque altera um arquivo protegido: +pulls.blocked_by_changed_protected_files_n=Este Pull Request está bloqueado porque altera arquivos protegidos: pulls.can_auto_merge_desc=O merge deste pull request pode ser aplicado automaticamente. pulls.cannot_auto_merge_desc=O merge deste pull request não pode ser aplicado automaticamente pois há conflitos. pulls.cannot_auto_merge_helper=Faça o merge manualmente para resolver os conflitos. pulls.num_conflicting_files_1=%d arquivo conflitante pulls.num_conflicting_files_n=%d arquivos conflitantes +pulls.approve_count_1=%d aprovação +pulls.approve_count_n=%d aprovações +pulls.reject_count_1=%d pedido de alteração +pulls.reject_count_n=%d pedidos de alteração +pulls.waiting_count_1=aguardando %d revisão +pulls.waiting_count_n=aguardando %d revisões +pulls.wrong_commit_id=id de commit tem que ser um id de commit no branch de destino pulls.no_merge_desc=O merge deste pull request não pode ser aplicado porque todas as opções de mesclagem do repositório estão desabilitadas. pulls.no_merge_helper=Habilite as opções de merge nas configurações do repositório ou faça o merge do pull request manualmente. pulls.no_merge_wip=O merge deste pull request não pode ser aplicado porque está marcado como um trabalho em andamento. pulls.no_merge_not_ready=Este pull request não está pronto para ser realizado o merge, verifique o status da revisão e as verificações de status. pulls.no_merge_access=Você não está autorizado para realizar o merge deste pull request. -pulls.merge_pull_request=Aplicar merge do pull request -pulls.rebase_merge_pull_request=Aplicar Rebase e Merge -pulls.rebase_merge_commit_pull_request=Aplicar Rebase e Merge (--no-ff) -pulls.squash_merge_pull_request=Aplicar Squash e Merge +pulls.merge_pull_request=Criar commit de merge +pulls.squash_merge_pull_request=Criar commit de squash +pulls.merge_manually=Merge feito manualmente +pulls.merge_commit_id=A ID de merge commit pulls.require_signed_wont_sign=O branch requer commits assinados, mas este merge não será assinado pulls.invalid_merge_option=Você não pode usar esta opção de merge neste pull request. +pulls.merge_conflict_summary=Mensagem de erro +pulls.rebase_conflict_summary=Mensagem de Erro ; %[2]s
    %[3]s
    pulls.unrelated_histories=Merge falhou: O merge do principal e da base não compartilham uma história comum. Dica: Tente uma estratégia diferente pulls.merge_out_of_date=Merge falhou: durante a geração do merge, a base não foi atualizada. Dica: Tente novamente. +pulls.push_rejected=O merge falhou: A push foi rejeitada. Revise os githooks para este repositório. +pulls.push_rejected_summary=Mensagem completa da rejeição pulls.push_rejected_no_message=Merge falhou: O push foi rejeitado mas não havia mensagem remota.
    Revise os githooks para este repositório pulls.open_unmerged_pull_exists=`Não é possível executar uma operação de reabertura pois há um pull request pendente (#%d) com propriedades idênticas.` pulls.status_checking=Algumas verificações estão pendentes pulls.status_checks_success=Todas as verificações foram bem sucedidas +pulls.status_checks_warning=Algumas verificações reportaram avisos +pulls.status_checks_failure=Algumas verificações falharam +pulls.status_checks_error=Algumas verificações reportaram erros +pulls.status_checks_requested=Obrigatário +pulls.status_checks_details=Detalhes pulls.update_branch=Atualizar branch pulls.update_branch_success=Atualização da branch foi bem-sucedida pulls.update_not_allowed=Você não tem permissão para atualizar a branch pulls.outdated_with_base_branch=Esta branch está desatualizado com a branch base +pulls.closed_at=`fechou este pull request %[2]s` +pulls.reopened_at=`reabriu este pull request %[2]s` +pulls.merge_instruction_hint=`Você também pode ver as instruções para a linha de comandos.` +pulls.merge_instruction_step2_desc=Faça merge das alterações e atualize no Gitea. milestones.new=Novo marco milestones.open_tab=%d Aberto milestones.close_tab=%d Fechado milestones.closed=Fechado %s +milestones.update_ago=Atualizado há %s milestones.no_due_date=Sem data limite milestones.open=Reabrir milestones.close=Fechar @@ -1205,7 +1472,6 @@ activity.closed_issues_count_1=Issue fechada activity.closed_issues_count_n=Issues fechadas activity.title.issues_1=+%d Issue activity.title.issues_n=+%d Issues -activity.title.issues_closed_by=%s fechada por %s activity.title.issues_created_by=%s criada por %s activity.closed_issue_label=Fechado activity.new_issues_count_1=Nova issue @@ -1243,6 +1509,7 @@ activity.git_stats_deletion_n=%d exclusões search=Pesquisar search.search_repo=Pesquisar no repositório... +search.fuzzy=Aproximada search.results=Resultados da pesquisa para "%s" em %s settings=Configurações @@ -1258,6 +1525,7 @@ settings.hooks=Webhooks settings.githooks=Hooks do Git settings.basic_settings=Configurações básicas settings.mirror_settings=Opções de espelhamento +settings.mirror_settings.mirrored_repository=Repositório espelhado settings.sync_mirror=Sincronizar agora settings.mirror_sync_in_progress=Sincronização do espelhamento está em andamento. Verifique novamente em um minuto. settings.email_notifications.enable=Habilitar notificações de e-mail @@ -1305,9 +1573,11 @@ settings.convert_confirm=Converter o repositório settings.convert_succeed=O espelhamento foi convertido em um repositório tradicional. settings.transfer=Transferir propriedade settings.transfer_desc=Transferir este repositório para outro usuário ou para uma organização onde você tem direitos de administrador. +settings.transfer_form_title=Digite o nome do repositório para confirmar: settings.transfer_notices_1=- Você perderá o acesso ao repositório se transferir para um usuário individual. settings.transfer_notices_2=- Você manterá acesso ao repositório se transferi-lo para uma organização que você também é proprietário. -settings.transfer_form_title=Digite o nome do repositório para confirmar: +settings.transfer_owner=Novo proprietário +settings.transfer_succeed=O repositório foi transferido. settings.wiki_delete=Excluir dados da wiki settings.wiki_delete_desc=A exclusão de dados da wiki é permanente e não pode ser desfeita. settings.wiki_delete_notices_1=- Isso excluirá e desabilitará permanentemente a wiki do repositório %s. @@ -1320,9 +1590,6 @@ settings.delete_notices_2=- Essa operação excluirá permanentemente o reposit settings.delete_notices_fork_1=- Forks deste repositório se tornarão independentes após a exclusão. settings.deletion_success=O repositório foi excluído. settings.update_settings_success=As configurações do repositório foram atualizadas. -settings.transfer_owner=Novo proprietário -settings.make_transfer=Executar transferência -settings.transfer_succeed=O repositório foi transferido. settings.confirm_delete=Excluir repositório settings.add_collaborator=Adicionar colaborador settings.add_collaborator_success=O colaborador foi adicionado. @@ -1387,7 +1654,6 @@ settings.event_issue_comment=Comentário da issue settings.event_issue_comment_desc=Comentário da issue criado, editado ou excluído. settings.event_pull_request=Pull request settings.branch_filter=Filtro de branch -settings.branch_filter_desc=Controle de permissão de push, eventos de criação e exclusão de branch, especificados como padrão glob. Se vazio ou *, eventos para todos os branches serão relatados. Veja github.com/gobwas/glob documentação para sintaxe. Exemplos: master, {master,release*}. settings.active=Ativo settings.active_helper=Informações sobre eventos disparados serão enviadas para esta URL do webhook. settings.add_hook_success=O webhook foi adicionado. @@ -1599,11 +1865,13 @@ branch.download=Baixar branch '%s' branch.included_desc=Este branch faz parte do branch padrão branch.included=Incluído + topic.manage_topics=Gerenciar Tópicos topic.done=Feito topic.count_prompt=Você não pode selecionar mais de 25 tópicos topic.format_prompt=Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres. + [org] org_name_holder=Nome da organização org_full_name_holder=Nome completo da organização @@ -1664,12 +1932,15 @@ members.member_role=Categoria de membro: members.owner=Proprietário members.member=Membro members.remove=Remover +members.remove.detail=Remover %[1]s de %[2]s? members.leave=Sair +members.leave.detail=Sair de %s? members.invite_desc=Adicionar novo membro em %s: members.invite_now=Convidar agora teams.join=Juntar-se teams.leave=Deixar +teams.leave.detail=Sair de %s? teams.can_create_org_repo=Criar repositórios teams.can_create_org_repo_helper=Membros podem criar novos repositórios na organização. O criador terá acesso administrativo ao novo repositório. teams.read_access=Acesso de leitura @@ -1715,7 +1986,6 @@ dashboard=Painel users=Contas de usuário organizations=Organizações repositories=Repositórios -hooks=Webhooks padrão authentication=Fontes de autenticação config=Configuração notices=Avisos do sistema @@ -1737,7 +2007,6 @@ dashboard.task.process=Tarefa: %[1]s dashboard.task.unknown=Tarefa desconhecida: %[1]s dashboard.delete_inactive_accounts=Excluir todas as contas não ativadas dashboard.delete_inactive_accounts.started=A tarefa de apagar todas as contas não ativadas foi iniciada. -dashboard.delete_repo_archives=Excluir todos os arquivos do repositório dashboard.delete_missing_repos=Excluir todos os repositórios que não possuem seus arquivos Git dashboard.delete_generated_repository_avatars=Excluir avatares gerados do repositório dashboard.update_mirrors=Atualizar espelhamentos @@ -1831,9 +2100,6 @@ repos.forks=Forks repos.issues=Issues repos.size=Tamanho -hooks.desc=Os webhooks fazem solicitações HTTP POST automaticamente para um servidor quando determinados eventos do Gitea são acionados. Webhooks definidos aqui são padrões e serão copiados em todos os novos repositórios. Leia mais em guia de webhooks . -hooks.add_webhook=Adicionar Webhook padrão -hooks.update_webhook=Atualizar Webhook padrão auths.auth_manage_panel=Gerenciamento de fonte de autenticação @@ -1851,7 +2117,6 @@ auths.host=Servidor auths.port=Porta auths.bind_dn=Vincular DN auths.bind_password=Vincular senha -auths.bind_password_helper=Atenção: Esta senha é armazenada em texto sem formatação. Se possível, use uma conta de somente leitura. auths.user_base=Base de pesquisa do usuário auths.user_dn=Usuário do DN auths.attribute_username=Atributo nome de usuário @@ -1872,9 +2137,14 @@ auths.smtphost=Host SMTP auths.smtpport=Porta SMTP auths.allowed_domains=Domínios permitidos auths.allowed_domains_helper=Deixe em branco para permitir todos os domínios. Separe vários domínios com uma vírgula (','). -auths.enable_tls=Habilitar Criptografia TLS auths.skip_tls_verify=Pular verificação de TLS +auths.force_smtps=Forçar SMTPS +auths.force_smtps_helper=SMTPS é sempre usado no porto 465. Defina isso para forçar o SMTPS em outros portos. (Caso contrário STARTTLS será usado em outros portos se for suportado pelo host.) +auths.helo_hostname=HELO Hostname +auths.helo_hostname_helper=Hostname enviado com HELO. Deixe em branco para enviar o hostname atual. +auths.disable_helo=Desativar HELO auths.pam_service_name=Nome de Serviço PAM +auths.pam_email_domain=Domínio de e-mail do PAM (opcional) auths.oauth2_provider=Provedor OAuth2 auths.oauth2_clientID=ID do cliente (chave) auths.oauth2_clientSecret=Senha do cliente @@ -2045,7 +2315,6 @@ config.git_gc_timeout=Tempo limite para execução do GC config.log_config=Configuração de log config.log_mode=Modo do log -config.macaron_log_mode=Modo log Macaron config.own_named_logger=Logger nomeado config.routes_to_default_logger=Rotas para o logger padrão config.go_log=Usar log Go (redirecionado para o padrão) @@ -2151,7 +2420,6 @@ comment_issue=`comentou sobre a issue %s#%[2]s` comment_pull=`comentou no pull request %s#%[2]s` merge_pull_request=`aplicou merge do pull request %s#%[2]s` transfer_repo=transferiu repositório de %s para %s -push_tag=realizou push da tag %[2]s para %[3]s delete_tag=excluiu tag %[2]s de %[3]s delete_branch=excluiu branch %[2]s de %[3]s compare_branch=Comparar diff --git a/options/locale/locale_pt-PT.ini b/options/locale/locale_pt-PT.ini index 21ddf16af..248dce648 100644 --- a/options/locale/locale_pt-PT.ini +++ b/options/locale/locale_pt-PT.ini @@ -15,6 +15,7 @@ page=Página template=Modelo language=Idioma notifications=Notificações +active_stopwatch=Cronómetro em andamento create_new=Criar… user_profile_and_more=Perfil e configurações… signed_in_as=Sessão iniciada como @@ -52,10 +53,10 @@ mirror=Espelho new_repo=Novo repositório new_migrate=Nova migração new_mirror=Novo espelho -new_fork=Nova bifurcação do repositório +new_fork=Nova derivação do repositório new_org=Nova organização new_project=Novo projecto -new_project_board=Novo quadro de projecto +new_project_board=Novo painel para o projecto manage_org=Gerir organizações admin_panel=Administração do sítio account_settings=Configurações da conta @@ -75,30 +76,39 @@ pull_requests=Pedidos de integração issues=Questões milestones=Etapas +ok=OK cancel=Cancelar save=Guardar add=Adicionar add_all=Adicionar tudo remove=Remover remove_all=Remover tudo +edit=Editar write=Escrever preview=Pré-visualizar loading=Carregando… +step1=Passo 1: +step2=Passo 2: +error=Erro error404=A página que pretende aceder não existe ou não tem autorização para a ver. +never=Nunca + [error] occurred=Ocorreu um erro report_message=Se tiver certeza de que se trata de um erro do Gitea, por favor, procure a questão no GitHub e abra uma nova questão, se necessário. +missing_csrf=Pedido inválido: não há código CSRF +invalid_csrf=Pedido inválido: código CSRF inválido [startpage] app_desc=Um serviço Git auto-hospedado e fácil de usar install=Fácil de instalar install_desc=Corra, simplesmente, o ficheiro binário executável para a sua plataforma, despache-o com o Docker, ou obtenha-o sob a forma de pacote. platform=Multiplataforma -platform_desc=Gitea corre em qualquer plataforma onde possa compilar em linguagemGo: Windows, macOS, Linux, ARM, etc. Escolha a sua preferida! +platform_desc=Gitea corre em qualquer plataforma onde possa compilar em linguagem Go: Windows, macOS, Linux, ARM, etc. Escolha a sua preferida! lightweight=Leve lightweight_desc=Gitea requer poucos recursos e pode correr num simples Raspberry Pi. Economize a energia da sua máquina! license=Código aberto @@ -189,7 +199,7 @@ sqlite3_not_available=Esta versão do Gitea não suporta o SQLite3. Descarregue invalid_db_setting=As configurações da base de dados são inválidas: %v invalid_repo_path=A localização base dos repositórios é inválida: %v run_user_not_match=O nome de utilizador para 'executar como' não é o nome de utilizador corrente: %s → %s -save_config_failed=Falha ao guardar a configuração: %v +save_config_failed=Falhou ao guardar a configuração: %v invalid_admin_setting=A configuração da conta de administrador é inválida: %v install_success=Bem-vindo(a)! Obrigado por escolher o Gitea. Divirta-se e aproveite! invalid_log_root_path=A localização dos registos é inválida: %v @@ -201,6 +211,8 @@ default_enable_timetracking=Habilitar, por norma, a contagem do tempo default_enable_timetracking_popup=Habilitar, por norma, a contagem do tempo nos novos repositórios. no_reply_address=Domínio dos emails ocultos no_reply_address_helper=Nome de domínio para utilizadores com um endereço de email oculto. Por exemplo, o nome de utilizador 'silva' será registado no Git como 'silva@semresposta.exemplo.org' se o domínio de email oculto estiver definido como 'semresposta.exemplo.org'. +password_algorithm=Algoritmo de Hash da Senha +password_algorithm_helper=Definir o algoritmo de hash da senha. Os algoritmos têm requisitos e resistência distintos. `argon2`, embora tenha boas características, usa muita memória e pode ser inapropriado para sistemas pequenos. [home] uname_holder=Nome de utilizador ou endereço de email @@ -214,6 +226,7 @@ my_mirrors=Os meus espelhos view_home=Ver %s search_repos=Procurar um repositório… filter=Outros filtros +filter_by_team_repositories=Filtrar por repositórios da equipa show_archived=Arquivado show_both_archived_unarchived=Apresentando arquivados e não arquivados @@ -233,6 +246,8 @@ users=Utilizadores organizations=Organizações search=Procurar code=Código +search.fuzzy=Aproximada +search.match=Fiel repo_no_results=Não foram encontrados quaisquer repositórios correspondentes. user_no_results=Não foram encontrados quaisquer utilizadores correspondentes. org_no_results=Não foram encontradas quaisquer organizações correspondentes. @@ -270,7 +285,7 @@ reset_password_helper=Recuperar conta reset_password_wrong_user=Tem conta iniciada como %s, mas a ligação de recuperação de conta é para %s password_too_short=O tamanho da senha não pode ser inferior a %d caracteres. non_local_account=Os utilizadores não-locais não podem alterar a sua senha através da interface web do Gitea. -verify=Verificar +verify=Validar scratch_code=Código de recuperação use_scratch_code=Usar um código de recuperação twofa_scratch_used=Você usou o seu código de recuperação. Foi reencaminhado para a página de configurações da autenticação em dois passos para poder remover o registo do seu dispositivo ou gerar um novo código de recuperação. @@ -290,7 +305,8 @@ openid_connect_desc=O URI do OpenID escolhido é desconhecido. Associe-o a uma n openid_register_title=Criar uma conta nova openid_register_desc=O URI do OpenID escolhido é desconhecido. Associe-o a uma nova conta aqui. openid_signin_desc=Insira o seu URI OpenID. Por exemplo: https://maria.me, manuel.openid.org.cn ou gnusocial.net/antonio. -disable_forgot_password_mail=A recuperação de conta está desabilitada. Entre em contacto com o administrador do sítio. +disable_forgot_password_mail=A recuperação de conta está desabilitada porque não foi definido o email. Entre em contacto com o administrador do sítio. +disable_forgot_password_mail_admin=A recuperação de conta só está disponível quando o email está configurado. Por favor, configure o email para permitir a recuperação de conta. email_domain_blacklisted=Não pode fazer um registo com o seu endereço de email. authorize_application=Autorizar aplicação authorize_redirect_notice=Irá ser reencaminhado para %s se autorizar esta aplicação. @@ -304,11 +320,64 @@ password_pwned=A senha utilizada está numa defina a sua senha primeiro. + +reset_password=Recupere a sua conta +reset_password.title=%s, você pediu para recuperar a sua conta +reset_password.text=Por favor clique na seguinte ligação para recuperar a sua conta em %s: + +register_success=Inscrição bem sucedida + +issue_assigned.pull=@%[1]s atribuiu-lhe o pedido de integração %[2]s no repositório %[3]s. +issue_assigned.issue=@%[1]s atribuiu-lhe a questão %[2]s no repositório %[3]s. + +issue.x_mentioned_you=@%s mencionou a si: +issue.action.force_push=%[1]s forçou o envio de %[2]s de %[3]s para %[4]s. +issue.action.push_1=@%[1]s enviou %[3]d cometimento para o ramo %[2]s +issue.action.push_n=@%[1]s enviou %[3]d cometimentos para o ramo %[2]s +issue.action.close=@%[1]s fechou #%[2]d. +issue.action.reopen=@%[1]s reabriu #%[2]d. +issue.action.merge=@%[1]s integrou #%[2]d no ramo %[3]s. +issue.action.approve=@%[1]s aprovou este pedido de integração. +issue.action.reject=@%[1]s solicitou modificações sobre este pedido de integração. +issue.action.review=@%[1]s fez um comentário sobre este pedido de integração. +issue.action.review_dismissed=@%[1]s descartou a última revisão de %[2]s sobre este pedido de integração. +issue.action.ready_for_review=@%[1]s marcou este pedido de integração como estando pronto para revisão. +issue.action.new=@%[1]s criou #%[2]d. +issue.in_tree_path=Em %s: + +release.new.subject=%s em %s lançado +release.new.text=@%[1]s lançou %[2]s em %[3]s +release.title=Título: %s +release.note=Nota: +release.downloads=Descargas: +release.download.zip=Código fonte (ZIP) +release.download.targz=Código fonte (TAR.GZ) + +repo.transfer.subject_to=%s gostaria de transferir "%s" para %s +repo.transfer.subject_to_you=%s gostaria de transferir "%s" para si +repo.transfer.to_you=você +repo.transfer.body=Para o aceitar ou rejeitar visite %s, ou ignore-o, simplesmente. + +repo.collaborator.added.subject=%s adicionou você a %s +repo.collaborator.added.text=Foi adicionado(a) como colaborador(a) do repositório: [modal] yes=Sim @@ -336,7 +405,7 @@ TreeName=Caminho do ficheiro Content=Conteúdo SSPISeparatorReplacement=Separador -SSPIDefaultLanguage=Idioma padrão +SSPIDefaultLanguage=Idioma predefinido require_error=` não pode estar em branco.` alpha_dash_error=` deve conter apenas caracteres alfanuméricos, hífen ('-') e sublinhado ('_').` @@ -349,12 +418,14 @@ email_error=` não é um endereço de email válido.` url_error=` não é um URL válido.` include_error=` tem que conter o texto '%s'.` glob_pattern_error=` o padrão glob é inválido: %s.` +regex_pattern_error=` o padrão regex é inválido: %s.` unknown_error=Erro desconhecido: captcha_incorrect=O código CAPTCHA está errado. password_not_match=As senhas não coincidem. lang_select_error=Escolha um idioma da lista. username_been_taken=O nome de utilizador já foi tomado. +username_change_not_local_user=Utilizadores que não são locais não têm permissão para mudar o nome de utilizador. repo_name_been_taken=O nome do repositório já foi usado. repository_files_already_exist=Já existem ficheiros neste repositório. Contacte o administrador do sistema. repository_files_already_exist.adopt=Já existem ficheiros neste repositório e só podem ser adoptados. @@ -375,6 +446,7 @@ password_uppercase_one=Pelo menos um caractere maiúsculo password_digit_one=Pelo menos um dígito password_special_one=Pelo menos um caractere especial (pontuação, parênteses, aspas, etc.) enterred_invalid_repo_name=O nome do repositório que inseriu está errado. +enterred_invalid_org_name=O nome da organização que inseriu está errado. enterred_invalid_owner_name=O novo nome de proprietário não é válido. enterred_invalid_password=A senha que inseriu está errada. user_not_exist=O utilizador não existe. @@ -382,11 +454,11 @@ team_not_exist=A equipa não existe. last_org_owner=Não pode remover o último utilizador da equipa 'proprietários'. Tem que haver pelo menos um proprietário numa organização. cannot_add_org_to_team=Uma organização não pode ser adicionada como membro de uma equipa. -invalid_ssh_key=Não é possível verificar sua chave SSH: %s -invalid_gpg_key=Não é possível verificar sua chave GPG: %s +invalid_ssh_key=Não é possível validar a sua chave SSH: %s +invalid_gpg_key=Não é possível validar a sua chave GPG: %s invalid_ssh_principal=Protagonista inválido: %s -unable_verify_ssh_key=Não é possível verificar a chave SSH; verifique novamente se há erros. -auth_failed=Falha na autenticação: %v +unable_verify_ssh_key=Não é possível validar a chave SSH; verifique novamente se há erros. +auth_failed=Falhou a autenticação: %v still_own_repo=A sua conta possui um ou mais repositórios; deve excluí-los ou transferi-los primeiro. still_has_org=A sua conta é membro de uma ou mais organizações; deixe-as primeiro. @@ -395,12 +467,13 @@ org_still_own_repo=Esta organização ainda possui repositórios; deve excluí-l target_branch_not_exist=O ramo de destino não existe. [user] -change_avatar=Alterar seu avatar… +change_avatar=Mude o seu avatar… join_on=Inscreveu-se em repositories=Repositórios activity=Trabalho público followers=Seguidores starred=Repositórios favoritos +watched=Repositórios sob vigilância projects=Projectos following=Que segue follow=Seguir @@ -442,8 +515,9 @@ update_theme=Substituir tema update_profile=Modificar perfil update_language_not_found=O idioma '%s' não está disponível. update_profile_success=O seu perfil foi modificado. -change_username=Seu nome de utilizador foi alterado. +change_username=O seu nome de utilizador foi modificado. change_username_prompt=Nota: alterações do nome de utilizador também alteram o URL de sua conta. +change_username_redirect_prompt=O antigo nome de utilizador, enquanto não for reivindicado, irá reencaminhar para o novo. continue=Continuar cancel=Cancelar language=Idioma @@ -458,8 +532,8 @@ enable_custom_avatar=Usar avatar personalizado choose_new_avatar=Escolher um novo avatar update_avatar=Substituir avatar delete_current_avatar=Eliminar o avatar corrente -uploaded_avatar_not_a_image=O ficheiro enviado não é uma imagem. -uploaded_avatar_is_too_big=O ficheiro enviado excedeu o tamanho máximo. +uploaded_avatar_not_a_image=O ficheiro carregado não é uma imagem. +uploaded_avatar_is_too_big=O ficheiro carregado excedeu o tamanho máximo. update_avatar_success=O seu avatar foi substituído. change_password=Substituir a senha @@ -509,19 +583,32 @@ manage_gpg_keys=Gerir chaves GPG add_key=Adicionar chave ssh_desc=Essas chaves públicas SSH estão associadas à sua conta. As chaves privadas correspondentes permitem acesso total aos seus repositórios. principal_desc=Estes protagonistas de certificados SSH estão associados à sua conta e permitem acesso total aos seus repositórios. -gpg_desc=Essas chaves GPG públicas estão associadas à sua conta. Mantenha as suas chaves privadas seguras, uma vez que elas permitem a verificação dos cometimentos. +gpg_desc=Essas chaves GPG públicas estão associadas à sua conta. Mantenha as suas chaves privadas seguras, uma vez que elas permitem a validação dos cometimentos. ssh_helper=Precisa de ajuda? Dê uma vista de olhos no guia do GitHub para criar as suas próprias chaves SSH ou para resolver problemas comuns que pode encontrar ao usar o SSH. gpg_helper=Precisa de ajuda? Dê uma vista de olhos no guia do GitHub sobre GPG. add_new_key=Adicionar Chave SSH add_new_gpg_key=Adicionar chave GPG -key_content_ssh_placeholder=Começa com 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', ou 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=Começa com 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', ou 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=Começa com '-----BEGIN PGP PUBLIC KEY BLOCK-----' add_new_principal=Adicional Protagonista ssh_key_been_used=Esta chave SSH já tinha sido adicionada ao servidor. ssh_key_name_used=Já existe uma chave SSH com o mesmo nome na sua conta. ssh_principal_been_used=Este protagonista já tinha sido adicionado ao servidor. gpg_key_id_used=Já existe uma chave pública GPG com o mesmo ID. -gpg_no_key_email_found=Esta chave GPG não é utilizável com qualquer endereço de email associado à sua conta. +gpg_no_key_email_found=Esta chave GPG não corresponde a nenhum endereço de email em uso associado à sua conta. No entanto, a chave ainda poderá ser adicionada, se você assinar o código fornecido. +gpg_key_matched_identities=Identidades correspondentes: +gpg_key_matched_identities_long=As identidades incorporadas nesta chave correspondem aos seguintes endereços de email em uso por parte deste utilizador. Os cometimentos que correspondam a estes endereços de email podem ser validados com esta chave. +gpg_key_verified=Chave validada +gpg_key_verified_long=A chave foi validada com um código e pode ser usada para validar cometimentos que correspondam a qualquer dos endereços de email em uso por parte deste utilizador, para além das identidades correspondentes a esta chave. +gpg_key_verify=Validar +gpg_invalid_token_signature=A chave GPG, assinatura ou código fornecidos não correspondem ou então o código expirou. +gpg_token_required=Tem que fornecer uma assinatura para o código abaixo +gpg_token=Código +gpg_token_help=Pode gerar uma assinatura usando o seguinte comando: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature=Assinatura GPG blindada (com armadura ASCII) +key_signature_gpg_placeholder=Começa com '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=A chave GPG '%s' foi validada. subkeys=Subchaves key_id=ID da chave key_name=Nome da chave @@ -535,7 +622,7 @@ ssh_key_deletion=Remover chave SSH gpg_key_deletion=Remover chave GPG ssh_principal_deletion=Remover Protagonista de Certificado SSH ssh_key_deletion_desc=Remover uma chave SSH revoga o acesso dessa chave à sua conta. Quer continuar? -gpg_key_deletion_desc=Remover uma chave GPG retira as verificações feitas sobre os cometimentos assinados com ela. Quer continuar? +gpg_key_deletion_desc=Remover uma chave GPG retira as validações feitas sobre os cometimentos assinados com ela. Quer continuar? ssh_principal_deletion_desc=Remover um Protagonista de Certificado SSH revoga o seu acesso à sua conta. Quer continuar? ssh_key_deletion_success=A chave SSH foi removida. gpg_key_deletion_success=A chave GPG foi removida. @@ -553,6 +640,7 @@ principal_state_desc=Este protagonista foi usado nos últimos 7 dias show_openid=Mostrar no perfil hide_openid=Ocultar do perfil ssh_disabled=SSH desabilitado +ssh_externally_managed=Esta chave SSH é gerida externamente para este utilizador manage_social=Gerir contas sociais associadas social_desc=Estas contas sociais estão vinculadas à sua conta do Gitea. Certifique-se que as reconhece todas, uma vez que podem ser usadas para iniciar sessão na sua conta do Gitea. unbind=Desvincular @@ -619,6 +707,7 @@ or_enter_secret=Ou insira o segredo: %s then_enter_passcode=E insira o código apresentado na aplicação: passcode_invalid=O código está errado. Tente de novo. twofa_enrolled=A sua conta usa autenticação em dois passos. Guarde o seu código de recuperação (%s) num lugar seguro porque é mostrado somente uma vez! +twofa_failed_get_secret=Falhou a obtenção do segredo. u2f_desc=Chaves de segurança são dispositivos de hardware contendo chaves criptográficas. Podem ser usadas para autenticação em dois passos. As chaves de segurança têm de suportar o standard FIDO U2F. u2f_require_twofa=A sua conta tem que ter habilitada a autenticação em dois passos para poder usar chaves de segurança. @@ -640,6 +729,7 @@ repos_none=Não tem nenhum repositório delete_account=Eliminar a sua conta delete_prompt=Esta operação irá eliminar permanentemente sua conta de utilizador. Isso NÃO PODERÁ ser desfeito. +delete_with_all_comments=A sua conta tem menos de %s. Para evitar comentários fantasma, todas os comentários em questões ou nos pedidos de integração serão também eliminados. confirm_delete_account=Confirme a eliminação delete_account_title=Eliminar conta de utilizador delete_account_desc=Tem a certeza que quer eliminar permanentemente esta conta de utilizador? @@ -649,8 +739,18 @@ email_notifications.onmention=Enviar email somente quando mencionado(a) email_notifications.disable=Desabilitar notificações por email email_notifications.submit=Definir preferência do email +visibility=Visibilidade do utilizador +visibility.public=Pública +visibility.public_tooltip=Visível para todos os utilizadores +visibility.limited=Limitada +visibility.limited_tooltip=Visível apenas para utilizadores com sessão iniciada +visibility.private=Privada +visibility.private_tooltip=Visível apenas para membros da organização + [repo] +new_repo_helper=Um repositório contém todos os ficheiros do projecto, incluindo o histórico das revisões. Já o tem noutro sítio? Migre o repositório. owner=Proprietário(a) +owner_helper=Algumas organizações podem não aparecer na lista suspensa devido a um limite máximo de contagem de repositórios. repo_name=Nome do repositório repo_name_helper=Um bom nome de repositório utiliza palavras curtas, memoráveis e únicas. repo_size=Tamanho do repositório @@ -666,31 +766,52 @@ visibility_fork_helper=(alterar este parâmetro irá alterar também todas as de clone_helper=Precisa de ajuda para clonar? Visite a Ajuda. fork_repo=Derivar repositório fork_from=Derivar de -fork_visibility_helper=A visibilidade de um repositório derivado não pode ser alterada. +fork_visibility_helper=A visibilidade de um repositório derivado não poderá ser alterada posteriormente. use_template=Usar este modelo +clone_in_vsc=Clonar no VS Code +download_zip=Descarregar ZIP +download_tar=Descarregar TAR.GZ +download_bundle=Descarregar PACOTE generate_repo=Gerar repositório generate_from=Gerar a partir de repo_desc=Descrição +repo_desc_helper=Insira uma descrição curta (opcional) repo_lang=Idioma repo_gitignore_helper=Escolher modelos .gitignore. -issue_labels=Etiquetas para as questões -issue_labels_helper=Escolha um conjunto de etiquetas para as questões. +repo_gitignore_helper_desc=Escolha os ficheiros que não são para rastrear, a partir de uma lista de modelos de linguagens comuns. Serão incluídos no ficheiro .gitignore, logo à partida, artefactos típicos gerados pelas ferramentas de construção de cada uma das linguagens. +issue_labels=Rótulos para as questões +issue_labels_helper=Escolha um conjunto de rótulos para as questões. license=Licença license_helper=Escolha um ficheiro de licença. +license_helper_desc=Uma licença rege o que os outros podem, ou não, fazer com o seu código fonte. Não tem a certeza sobre qual a mais indicada para o seu projecto? Veja: Escolher uma licença. readme=README readme_helper=Escolha um modelo de ficheiro README. +readme_helper_desc=Este é o sítio onde pode escrever uma descrição completa do seu projecto. auto_init=Inicializar repositório (adiciona `.gitignore`, `LICENSE` e `README.md`) +trust_model_helper=Escolha o modelo de confiança para a validação das assinaturas. As opções são: +trust_model_helper_collaborator=Colaborador: Confiar nas assinaturas dos colaboradores +trust_model_helper_committer=Autor do cometimento: Confiar nas assinaturas que correspondem a autores de cometimentos +trust_model_helper_collaborator_committer=Colaborador + Autor do cometimento: Confiar nas assinaturas de colaboradores que correspondem ao autor do cometimento +trust_model_helper_default=Padrão: Usar o modelo de confiança padrão para esta instalação create_repo=Criar repositório -default_branch=Ramo padrão +default_branch=Ramo principal +default_branch_helper=O ramo principal é o ramo base para pedidos de integração e cometimentos. mirror_prune=Podar mirror_prune_desc=Remover referências obsoletas de seguimento remoto mirror_interval=Intervalo de espelhamento (as unidade de tempo válidas são 'h', 'm' e 's'). O valor zero desabilita a sincronização automática. mirror_interval_invalid=O intervalo do espelhamento não é válido. mirror_address=Clonar a partir do URL -mirror_address_desc=Coloque, na secção de Autorização de Clonagem, as credenciais que, eventualmente, sejam necessárias. +mirror_address_desc=Coloque, na secção de Autorização, as credenciais que, eventualmente, sejam necessárias. mirror_address_url_invalid=O URL fornecido é inválido. Tem que codificar adequadamente todos os componentes do URL. mirror_address_protocol_invalid=O URL fornecido é inválido. Só se pode espelhar a partir de endereços http(s):// ou git://. +mirror_lfs=Armazenamento de Ficheiros Grandes (LFS) +mirror_lfs_desc=Habilitar o espelhamento de dados LFS. +mirror_lfs_endpoint=Destino LFS +mirror_lfs_endpoint_desc=A sincronização irá tentar usar o URL de clonagem para determinar o servidor LFS. Também pode especificar um destino personalizado se os dados do repositório LFS forem armazenados noutro lugar. mirror_last_synced=Última sincronização +mirror_password_placeholder=(inalterada) +mirror_password_blank_placeholder=(não definida) +mirror_password_help=Altere o nome de utilizador para eliminar uma senha armazenada. watchers=Vigilantes stargazers=Fãs forks=Derivações @@ -706,7 +827,15 @@ adopt_preexisting_success=Ficheiros adoptados e repositório criado a partir de delete_preexisting_label=Eliminar delete_preexisting=Eliminar ficheiros pré-existentes delete_preexisting_content=Eliminar ficheiros em %s -delete_preexisting_success=Eliminar ficheiros não adoptados em %s +delete_preexisting_success=Eliminados os ficheiros não adoptados em %s +blame_prior=Ver a responsabilização anterior a esta modificação + +transfer.accept=Aceitar transferência +transfer.accept_desc=Transferir para "%s" +transfer.reject=Rejeitar transferência +transfer.reject_desc=Cancelar transferência para "%s" +transfer.no_permission_to_accept=Não tem permissão para Aceitar +transfer.no_permission_to_reject=Não tem permissão para Rejeitar desc.private=Privado desc.public=Público @@ -717,33 +846,39 @@ desc.internal_template=Modelo interno desc.archived=Arquivado template.items=Itens do modelo -template.git_content=Conteúdo Git (ramo padrão) +template.git_content=Conteúdo Git (ramo principal) template.git_hooks=Automatismos do Git template.git_hooks_tooltip=Neste momento não pode modificar ou remover automatismos do git depois de adicionados. Escolha esta opção somente se confiar no repositório modelo. template.webhooks=Automatismos web template.topics=Tópicos template.avatar=Avatar -template.issue_labels=Etiquetas das questões +template.issue_labels=Rótulos das questões template.one_item=Tem que escolher pelo menos um item do modelo template.invalid=Tem que escolher um repositório modelo -archive.title=Este repositório está arquivado. Pode ver ficheiros e cloná-lo, mas não pode fazer envios ou lançar questões ou pedidos de integração. +archive.title=Este repositório está arquivado. Pode ver os seus ficheiros e cloná-lo, mas não pode fazer envios para o repositório nem lançar questões ou fazer pedidos de integração. archive.issue.nocomment=Este repositório está arquivado. Não pode comentar nas questões. archive.pull.nocomment=Este repositório está arquivado. Não pode comentar nos pedidos de integração. -form.reach_limit_of_creation=Já atingiu o seu limite de %d repositórios. +form.reach_limit_of_creation_1=Já atingiu o seu limite de %d repositório. +form.reach_limit_of_creation_n=Já atingiu o seu limite de %d repositórios. form.name_reserved=O nome de repositório '%s' está reservado. form.name_pattern_not_allowed=O padrão '%s' não é permitido no nome de um repositório. -need_auth=Autorização de clonagem +need_auth=Autorização migrate_options=Opções de migração migrate_service=Serviço de migração migrate_options_mirror_helper=Este repositório irá ser um espelho migrate_options_mirror_disabled=O administrador desabilitou novos espelhos. +migrate_options_lfs=Migrar ficheiros LFS +migrate_options_lfs_endpoint.label=Destino LFS +migrate_options_lfs_endpoint.description=A migração irá tentar usar o seu controlo remoto do Git para determinar o servidor LFS. Também pode especificar um destino personalizado se os dados do repositório LFS forem armazenados noutro lugar. +migrate_options_lfs_endpoint.description.local=Um caminho de servidor local também é suportado. +migrate_options_lfs_endpoint.placeholder=Deixe em branco para derivar do URL de clonagem migrate_items=Itens da migração migrate_items_wiki=Wiki migrate_items_milestones=Etapas -migrate_items_labels=Etiquetas +migrate_items_labels=Rótulos migrate_items_issues=Questões migrate_items_pullrequests=Pedidos de integração migrate_items_merge_requests=Pedidos de integração @@ -753,25 +888,37 @@ migrate.clone_address=Migrar / clonar a partir do URL migrate.clone_address_desc=O URL de clonagem HTTP(S) ou Git de um repositório existente migrate.clone_local_path=ou um caminho no servidor local migrate.permission_denied=Não está autorizado a importar repositórios locais. +migrate.permission_denied_blocked=Não tem permissão para importar a partir de servidores bloqueados. +migrate.permission_denied_private_ip=Não tem permissão para importar a partir de IPs privados. migrate.invalid_local_path=O caminho local é inválido. Não existe ou não é uma pasta. +migrate.invalid_lfs_endpoint=O destino LFS não é válido. migrate.failed=A migração falhou: %v -migrate.lfs_mirror_unsupported=O espelhamento de elementos LFS não é suportado - ao invés disso use 'git lfs fetch --all' e 'git lfs push --all'. migrate.migrate_items_options=É necessário um código de acesso para migrar itens adicionais migrated_from=Migrado de %[2]s migrated_from_fake=Migrado de %[1]s migrate.migrate=Migrar de %s -migrate.migrating=Migrando de %s... +migrate.migrating=Migrando a partir de %s ... migrate.migrating_failed=A migração de %s falhou. -migrate.github.description=Migrando dados do Github.com ou do Github Enterprise. -migrate.git.description=Migrando ou espelhando dados git a partir de serviços Git -migrate.gitlab.description=Migrando dados do GitLab.com ou de um servidor GitLab auto-hospedado. -migrate.gitea.description=Migrando dados do Gitea.com ou de um servidor Gitea auto-hospedado. +migrate.migrating_failed.error=Erro: %s +migrate.github.description=Migrar dados de github.com ou de outras instâncias do Github. +migrate.git.description=Migrar um repositório somente de qualquer serviço Git. +migrate.gitlab.description=Migrar dados de gitlab.com ou de outras instâncias do GitLab. +migrate.gitea.description=Migrar dados de gitea.com ou de outras instâncias do Gitea. +migrate.gogs.description=Migrar dados de notabug.org ou de outras instâncias do Gogs. +migrate.onedev.description=Migrar dados de code.onedev.io ou de outras instâncias do OneDev. +migrate.migrating_git=Migrando dados Git +migrate.migrating_topics=Migrando tópicos +migrate.migrating_milestones=Migrando etapas +migrate.migrating_labels=Migrando rótulos +migrate.migrating_releases=Migrando lançamentos +migrate.migrating_issues=Migrando questões +migrate.migrating_pulls=Migrando pedidos de integração mirror_from=espelho de forked_from=derivado de generated_from=gerado a partir de -fork_from_self=Não pode derivar de um repositório que já é seu. -fork_guest_user=Inicie a sessão para derivar este repositório. +fork_from_self=Não pode criar uma derivação de um repositório que já é seu. +fork_guest_user=Inicie a sessão para fazer uma derivação deste repositório. watch_guest_user=Inicie sessão para começar a vigiar este repositório. star_guest_user=Inicie sessão para marcar este repositório como favorito. copy_link=Copiar @@ -789,7 +936,7 @@ no_desc=Sem descrição quick_guide=Guia rápido clone_this_repo=Clonar este repositório create_new_repo_command=Criando um novo repositório na linha de comandos -push_exist_repo=Enviando um repositório existente pela linha de comandos +push_exist_repo=Enviando, pela linha de comandos, um repositório existente empty_message=Este repositório não contém qualquer conteúdo. code=Código @@ -798,13 +945,14 @@ branch=Ramo tree=Árvore clear_ref=`Apagar a referência vigente` filter_branch_and_tag=Filtrar ramo ou etiqueta +find_tag=Procurar etiqueta branches=Ramos tags=Etiquetas issues=Questões pulls=Pedidos de integração project_board=Projectos -labels=Etiquetas -org_labels_desc=Etiquetas ao nível da organização que podem ser usadas em todos os repositórios desta organização +labels=Rótulos +org_labels_desc=Rótulos ao nível da organização que podem ser usados em todos os repositórios desta organização org_labels_desc_manage=gerir milestones=Etapas @@ -816,6 +964,8 @@ tag=Etiqueta released_this=lançou isto file_raw=Em bruto file_history=Histórico +file_view_source=Ver código-fonte +file_view_rendered=Ver resultado processado file_view_raw=Ver em bruto file_permalink=Ligação permanente file_too_large=O ficheiro é demasiado grande para ser apresentado. @@ -834,33 +984,34 @@ line=linha lines=linhas editor.new_file=Novo ficheiro -editor.upload_file=Enviar ficheiro +editor.upload_file=Carregar ficheiro editor.edit_file=Editar ficheiro -editor.preview_changes=Pré-visualizar alterações +editor.preview_changes=Pré-visualizar modificações editor.cannot_edit_lfs_files=Ficheiros LFS não podem ser editados na interface web. editor.cannot_edit_non_text_files=Ficheiros binários não podem ser editados na interface da web. editor.edit_this_file=Editar ficheiro editor.this_file_locked=Ficheiro bloqueado -editor.must_be_on_a_branch=Tem que estar num ramo para fazer ou propor alterações neste ficheiro. -editor.fork_before_edit=Tem que fazer uma derivação deste repositório para fazer ou propor alterações neste ficheiro. +editor.must_be_on_a_branch=Tem que estar num ramo para fazer ou propor modificações neste ficheiro. +editor.fork_before_edit=Tem que fazer uma derivação deste repositório para fazer ou propor modificações neste ficheiro. editor.delete_this_file=Eliminar ficheiro -editor.must_have_write_access=Tem que ter permissões de escrita para fazer ou propor alterações neste ficheiro. +editor.must_have_write_access=Tem que ter permissões de escrita para fazer ou propor modificações neste ficheiro. editor.file_delete_success=O ficheiro '%s' foi eliminado. editor.name_your_file=Nomeie o seu ficheiro… editor.filename_help=Adicione uma pasta escrevendo o nome dessa pasta seguido de uma barra('/'). Remova uma pasta carregando na tecla de apagar ('←') no início do campo. editor.or=ou editor.cancel_lower=Cancelar -editor.commit_signed_changes=Cometer alterações assinadas -editor.commit_changes=Cometer alterações +editor.commit_signed_changes=Cometer modificações assinadas +editor.commit_changes=Cometer modificações editor.add_tmpl=Adicionar '' editor.add=Adicionar '%s' editor.update=Modificar '%s' editor.delete=Eliminar '%s' editor.commit_message_desc=Adicionar uma descrição alargada opcional… +editor.signoff_desc=Adicionar "Assinado-por" seguido do autor do cometimento no fim da mensagem do registo de cometimentos. editor.commit_directly_to_this_branch=Cometer imediatamente no ramo %s. editor.create_new_branch=Crie um novo ramo para este cometimento e inicie um pedido de integração. editor.create_new_branch_np=Criar um novo ramo para este cometimento. -editor.propose_file_change=Propor alteração de ficheiro +editor.propose_file_change=Propor modificação do ficheiro editor.new_branch_name_desc=Nome do novo ramo… editor.cancel=Cancelar editor.filename_cannot_be_empty=O nome do ficheiro não pode estar em branco. @@ -876,29 +1027,30 @@ editor.file_changed_while_editing=O conteúdo do ficheiro mudou desde que começ editor.file_already_exists=Já existe um ficheiro com o nome '%s' neste repositório. editor.commit_empty_file_header=Cometer um ficheiro vazio editor.commit_empty_file_text=O ficheiro que está prestes a cometer está vazio. Quer continuar? -editor.no_changes_to_show=Não existem alterações a mostrar. +editor.no_changes_to_show=Não existem modificações para mostrar. editor.fail_to_update_file=Falhou ao modificar/criar o ficheiro '%s'. editor.fail_to_update_file_summary=Mensagem de erro: -editor.push_rejected_no_message=A alteração foi rejeitada pelo servidor sem qualquer mensagem. Verifique os automatismos do Git. -editor.push_rejected=A alteração foi rejeitada pelo servidor. Verifique os automatismos do Git. +editor.push_rejected_no_message=A modificação foi rejeitada pelo servidor sem qualquer mensagem. Verifique os automatismos do Git. +editor.push_rejected=A modificação foi rejeitada pelo servidor. Verifique os automatismos do Git. editor.push_rejected_summary=Mensagem completa de rejeição: editor.add_subdir=Adicionar uma pasta… -editor.unable_to_upload_files=Falha ao enviar ficheiros para '%s' com erro: %v +editor.unable_to_upload_files=Falhou o carregamento de ficheiros para '%s' com o erro: %v editor.upload_file_is_locked=O ficheiro '%s' está bloqueado por %s. -editor.upload_files_to_dir=Enviar ficheiros para '%s' +editor.upload_files_to_dir=Carregar ficheiros para '%s' editor.cannot_commit_to_protected_branch=Não é possível cometer para o ramo protegido '%s'. editor.no_commit_to_branch=Não é possível cometer imediatamente para o ramo porque: editor.user_no_push_to_branch=O utilizador não pode enviar para o ramo editor.require_signed_commit=O ramo requer um cometimento assinado -commits.desc=Navegar pelo histórico de alterações no código fonte. +commits.desc=Navegar pelo histórico de modificações no código fonte. commits.commits=Cometimentos commits.no_commits=Não há cometimentos em comum. '%s' e '%s' têm históricos completamente diferentes. +commits.nothing_to_compare=Estes ramos são iguais. commits.search=Procurar cometimentos… commits.search.tooltip=Pode prefixar palavras-chave com "author:", "committer:", "after:", ou "before:". Por exemplo: "revert author:Alice before:2019-04-01". commits.find=Procurar commits.search_all=Todos os ramos -commits.author=Autor +commits.author=Autor(a) commits.message=Mensagem commits.date=Data commits.older=Mais antigos @@ -913,6 +1065,8 @@ ext_issues.desc=Ligação para um rastreador de questões externo. projects=Projectos projects.desc=Gerir questões e integrações nos quadros do projecto. +projects.description=Descrição (opcional) +projects.description_placeholder=Descrição projects.create=Criar projecto projects.title=Título projects.new=Novo projecto @@ -931,13 +1085,15 @@ projects.type.bug_triage=Triagem de erros projects.template.desc=Modelo de projecto projects.template.desc_helper=Escolha um modelo de projecto para começar projects.type.uncategorized=Sem categoria -projects.board.edit=Editar quadro -projects.board.edit_title=Novo nome para o quadro -projects.board.new_title=Novo nome para o quadro +projects.board.edit=Editar painel +projects.board.edit_title=Novo nome para o painel +projects.board.new_title=Novo nome para o painel projects.board.new_submit=Submeter -projects.board.new=Novo quadro -projects.board.delete=Eliminar quadro -projects.board.deletion_desc=Eliminar um quadro de projecto faz com que todas as questões relacionadas sejam movidas para 'Sem categoria'. Continuar? +projects.board.new=Novo painel +projects.board.set_default=Definir como padrão +projects.board.set_default_desc=Definir este painel como padrão para questões e pedidos de integração não categorizados +projects.board.delete=Eliminar painel +projects.board.deletion_desc=Eliminar um painel de projecto faz com que todas as questões nesse painel sejam movidas para o painel 'Sem categoria'. Continuar? projects.open=Abrir projects.close=Fechar @@ -945,14 +1101,14 @@ issues.desc=Organize relatórios de erros, tarefas e etapas. issues.filter_assignees=Filtrar responsável issues.filter_milestones=Filtrar etapa issues.filter_projects=Filtrar projecto -issues.filter_labels=Filtrar etiqueta -issues.filter_reviewers=Filtrar avaliador -issues.new=Nova questão +issues.filter_labels=Filtrar rótulo +issues.filter_reviewers=Filtrar revisor +issues.new=Questão nova issues.new.title_empty=O título não pode estar vazio -issues.new.labels=Etiquetas -issues.new.add_labels_title=Aplicar etiquetas -issues.new.no_label=Sem etiquetas -issues.new.clear_labels=Limpar etiquetas +issues.new.labels=Rótulos +issues.new.add_labels_title=Aplicar rótulos +issues.new.no_label=Sem rótulo +issues.new.clear_labels=Retirar rótulos issues.new.projects=Projectos issues.new.add_project_title=Definir projecto issues.new.clear_projects=Limpar projectos @@ -977,22 +1133,22 @@ issues.choose.blank=Padrão issues.choose.blank_about=Cria uma questão a partir do modelo padrão. issues.no_ref=Sem ramo ou etiqueta especificados issues.create=Criar questão -issues.new_label=Nova etiqueta -issues.new_label_placeholder=Nome da etiqueta +issues.new_label=Novo rótulo +issues.new_label_placeholder=Nome do rótulo issues.new_label_desc_placeholder=Descrição -issues.create_label=Criar etiqueta -issues.label_templates.title=Carregar um conjunto predefinido de etiquetas -issues.label_templates.info=Ainda não existem etiquetas. Crie uma etiqueta com 'Nova etiqueta' ou use um conjunto de etiquetas predefinido: -issues.label_templates.helper=Escolha um conjunto de etiquetas -issues.label_templates.use=Usar conjunto de etiquetas -issues.label_templates.fail_to_load_file=Falha ao carregar o ficheiro modelo de etiquetas '%s': %v -issues.add_label=adicionou a etiqueta %s %s -issues.add_labels=adicionou as etiquetas %s %s -issues.remove_label=removeu a etiqueta %s %s -issues.remove_labels=removeu as etiquetas %s %s -issues.add_remove_labels=adicionou etiquetas %s e removeu %s %s +issues.create_label=Criar rótulo +issues.label_templates.title=Carregar um conjunto predefinido de rótulos +issues.label_templates.info=Ainda não existem rótulos. Crie um rótulo com 'Novo rótulo' ou use um conjunto de rótulos predefinido: +issues.label_templates.helper=Escolha um conjunto de rótulos +issues.label_templates.use=Usar conjunto de rótulos +issues.label_templates.fail_to_load_file=Falhou ao carregar o ficheiro modelo de rótulos '%s': %v +issues.add_label=adicionou o rótulo %s %s +issues.add_labels=adicionou os rótulos %s %s +issues.remove_label=removeu o rótulo %s %s +issues.remove_labels=removeu os rótulos %s %s +issues.add_remove_labels=adicionou o(s) rótulo(s) %s e removeu %s %s issues.add_milestone_at=`adicionou esta questão à etapa %s %s` -issues.add_project_at=`adicionou isto ao projecto %s %s` +issues.add_project_at=`adicionou esta questão ao projecto %s %s` issues.change_milestone_at=`modificou a etapa de %s para %s %s` issues.change_project_at=`modificou o projecto de %s para %s %s` issues.remove_milestone_at=`removeu esta questão da etapa %s %s` @@ -1007,9 +1163,9 @@ issues.change_title_at=`mudou o título de %s para %s issues.delete_branch_at=`eliminou o ramo %s %s` issues.open_tab=%d abertas issues.close_tab=%d fechadas -issues.filter_label=Etiqueta -issues.filter_label_exclude=`Use alt + clique/enter para excluir etiquetas` -issues.filter_label_no_select=Todas as etiquetas +issues.filter_label=Rótulo +issues.filter_label_exclude=`Use alt + clique/enter para excluir rótulos` +issues.filter_label_no_select=Todos os rótulos issues.filter_milestone=Etapa issues.filter_milestone_no_select=Todas as etapas issues.filter_assignee=Responsável @@ -1019,82 +1175,87 @@ issues.filter_type.all_issues=Todas as questões issues.filter_type.assigned_to_you=Atribuídas a si issues.filter_type.created_by_you=Criadas por si issues.filter_type.mentioning_you=Mencionando a si +issues.filter_type.review_requested=Revisão solicitada issues.filter_sort=Ordem -issues.filter_sort.latest=Mais recente -issues.filter_sort.oldest=Mais antiga +issues.filter_sort.latest=Mais recentes +issues.filter_sort.oldest=Mais antigas issues.filter_sort.recentupdate=Modificadas recentemente -issues.filter_sort.leastupdate=Modificadas há mais tempo -issues.filter_sort.mostcomment=Mais comentada -issues.filter_sort.leastcomment=Menos comentada -issues.filter_sort.nearduedate=Mais perto da data limite -issues.filter_sort.farduedate=Mais distante da data limite +issues.filter_sort.leastupdate=Modificadas há muito tempo +issues.filter_sort.mostcomment=Mais comentadas +issues.filter_sort.leastcomment=Menos comentadas +issues.filter_sort.nearduedate=Data de vencimento mais próxima +issues.filter_sort.farduedate=Data de vencimento mais distante issues.filter_sort.moststars=Favorito (decrescente) issues.filter_sort.feweststars=Favorito (crescente) issues.filter_sort.mostforks=Mais derivações issues.filter_sort.fewestforks=Menos derivações issues.action_open=Abrir issues.action_close=Fechar -issues.action_label=Etiqueta +issues.action_label=Rótulo issues.action_milestone=Etapa issues.action_milestone_no_select=Sem etapa issues.action_assignee=Responsável issues.action_assignee_no_select=Sem responsável issues.opened_by=aberta %[1]s por %[3]s -pulls.merged_by=por %[3]s integrou %[1]s +pulls.merged_by=de %[3]s integrado %[1]s pulls.merged_by_fake=por %[2]s integrou %[1]s issues.closed_by=de %[3]s fechada %[1]s -issues.opened_by_fake=por %[2]s abriu %[1]s +issues.opened_by_fake=de %[2]s aberto %[1]s issues.closed_by_fake=de %[2]s fechada %[1]s issues.previous=Anterior issues.next=Seguinte -issues.open_title=Abertas -issues.closed_title=Fechadas +issues.open_title=Aberta +issues.closed_title=Fechada issues.num_comments=%d comentários -issues.commented_at=`comentado %s` +issues.commented_at=`comentou %s` issues.delete_comment_confirm=Tem a certeza que quer eliminar este comentário? issues.context.copy_link=Copiar ligação issues.context.quote_reply=Citar resposta +issues.context.reference_issue=Criar uma nova questão referindo esta issues.context.edit=Editar issues.context.delete=Eliminar issues.no_content=Ainda não há conteúdo. issues.close_issue=Fechar -issues.pull_merged_at=`cometimento %[2]s integrado em %[3]s %[4]s` +issues.pull_merged_at=`integrou o cometimento %[2]s no ramo %[3]s %[4]s` +issues.manually_pull_merged_at=`integrou o cometimento %[2]s no ramo %[3]s manualmente %[4]s` issues.close_comment_issue=Comentar e fechar issues.reopen_issue=Reabrir issues.reopen_comment_issue=Comentar e reabrir issues.create_comment=Comentar -issues.closed_at=`fechou esta questão %[2]s` +issues.closed_at=`encerrou esta questão %[2]s` issues.reopened_at=`reabriu esta questão %[2]s` issues.commit_ref_at=`referenciou esta questão num cometimento %[2]s` issues.ref_issue_from=`referiu esta questão %[4]s %[2]s` issues.ref_pull_from=`referiu este pedido de integração %[4]s %[2]s` issues.ref_closing_from=`referiu um pedido de integração %[4]s que fechará esta questão %[2]s` issues.ref_reopening_from=`referiu um pedido de integração %[4]s que reabrirá esta questão %[2]s` -issues.ref_closed_from=`fechou esta questão %[4]s %[2]s` +issues.ref_closed_from=`encerrou esta questão %[4]s %[2]s` issues.ref_reopened_from=`reabriu esta questão %[4]s %[2]s` issues.ref_from=`de %[1]s` -issues.poster=Autor +issues.poster=Remetente issues.collaborator=Colaborador(a) issues.owner=Proprietário(a) issues.re_request_review=Voltar a solicitar revisão -issues.is_stale=Houve alterações neste pedido de integração posteriormente a esta revisão +issues.is_stale=Houve modificações neste pedido de integração posteriormente a esta revisão issues.remove_request_review=Remover solicitação de revisão issues.remove_request_review_block=Não é possível remover a solicitação de revisão +issues.dismiss_review=Descartar revisão +issues.dismiss_review_warning=Tem a certeza que quer descartar esta revisão? issues.sign_in_require_desc=Inicie a sessão para participar neste diálogo. issues.edit=Editar issues.cancel=Cancelar issues.save=Guardar -issues.label_title=Nome da etiqueta -issues.label_description=Descrição da etiqueta -issues.label_color=Cor da etiqueta -issues.label_count=%d etiquetas +issues.label_title=Nome do rótulo +issues.label_description=Descrição do rótulo +issues.label_color=Cor do rótulo +issues.label_count=%d rótulos issues.label_open_issues=%d questões abertas issues.label_edit=Editar issues.label_delete=Eliminar -issues.label_modify=Editar etiqueta -issues.label_deletion=Eliminar etiqueta -issues.label_deletion_desc=Se eliminar uma etiqueta, irá removê-la de todas as questões. Quer continuar? -issues.label_deletion_success=A etiqueta foi eliminada. +issues.label_modify=Editar rótulo +issues.label_deletion=Eliminar rótulo +issues.label_deletion_desc=Se eliminar um rótulo, irá removê-lo de todas as questões. Quer continuar? +issues.label_deletion_success=O rótulo foi eliminado. issues.label.filter_sort.alphabetically=por ordem alfabética issues.label.filter_sort.reverse_alphabetically=por ordem alfabética inversa issues.label.filter_sort.by_size=Menor tamanho @@ -1109,57 +1270,59 @@ issues.unlock=Desbloquear diálogo issues.lock.unknown_reason=Não é possível bloquear uma questão com um motivo desconhecido. issues.lock_duplicate=Uma questão não pode ser bloqueada duas vezes. issues.unlock_error=Não é possível desbloquear uma questão que não está bloqueada. -issues.lock_with_reason=bloqueada como %s e o diálogo está limitado aos colaboradores %s -issues.lock_no_reason=bloqueada e o diálogo está limitado aos colaboradores %s -issues.unlock_comment=bloqueou este diálogo %s +issues.lock_with_reason=bloqueou o diálogo como sendo %s e restringiu-o aos colaboradores %s +issues.lock_no_reason=bloqueou o diálogo e restringiu-o aos colaboradores %s +issues.unlock_comment=desbloqueou este diálogo %s issues.lock_confirm=Bloquear issues.unlock_confirm=Desbloquear -issues.lock.notice_1=- Outros utilizadores não podem adicionar novos comentários a esta questão. -issues.lock.notice_2=- Você e outros colaboradores com acesso a este repositório ainda podem deixar comentários que outros possam ver. -issues.lock.notice_3=- Pode sempre voltar a desbloquear esta questão no futuro. -issues.unlock.notice_1=- Todos poderiam comentar mais uma vez nesta questão. -issues.unlock.notice_2=- Pode sempre voltar a bloquear esta questão no futuro. +issues.lock.notice_1=- Os outros utilizadores deixarão de poder adicionar novos comentários a esta questão. +issues.lock.notice_2=- Você e outros colaboradores com acesso a este repositório ainda poderão deixar comentários que outros possam ver. +issues.lock.notice_3=- Poderá sempre voltar a desbloquear esta questão no futuro. +issues.unlock.notice_1=- Toda gente poderá voltar a comentar nesta questão. +issues.unlock.notice_2=- Poderá sempre voltar a bloquear esta questão no futuro. issues.lock.reason=Motivo do bloqueio issues.lock.title=Bloquear diálogo sobre esta questão. issues.unlock.title=Desbloquear diálogo sobre esta questão. issues.comment_on_locked=Não pode comentar numa questão bloqueada. issues.tracker=Gestor de tempo -issues.start_tracking_short=Iniciar +issues.start_tracking_short=Iniciar cronómetro issues.start_tracking=Iniciar contagem de tempo issues.start_tracking_history=`começou a trabalhar %s` -issues.tracker_auto_close=O temporizador será parado automaticamente quando esta questão for fechada -issues.stop_tracking=Parar +issues.tracker_auto_close=O cronómetro será parado automaticamente quando esta questão for fechada +issues.tracking_already_started=`Você já iniciou a contagem de tempo noutra questão!` +issues.stop_tracking=Parar cronómetro issues.stop_tracking_history=`parou de trabalhar %s` +issues.cancel_tracking=Descartar +issues.cancel_tracking_history=`cancelou a contagem de tempo %s` issues.add_time=Adicionar tempo manualmente +issues.del_time=Eliminar este registo de tempo issues.add_time_short=Adicionar tempo issues.add_time_cancel=Cancelar -issues.add_time_history=`adicionou o tempo gasto %s` -issues.del_time_history=`apagou o tempo gasto %s` +issues.add_time_history=`adicionou tempo gasto nesta questão %s` +issues.del_time_history=`eliminou o tempo gasto nesta questão %s` issues.add_time_hours=Horas issues.add_time_minutes=Minutos issues.add_time_sum_to_small=Não foi inserido qualquer tempo. -issues.cancel_tracking=Cancelar -issues.cancel_tracking_history=`cancelou o contador de tempo %s` issues.time_spent_total=Total de tempo gasto -issues.time_spent_from_all_authors=`Tempo total gasto: %s` -issues.due_date=Date limite -issues.invalid_due_date_format=O formato da data limite tem que ser 'aaaa-mm-dd'. -issues.error_modifying_due_date=Falha ao modificar a data limite. -issues.error_removing_due_date=Falha ao remover a data limite. +issues.time_spent_from_all_authors=`Total de tempo gasto: %s` +issues.due_date=Data de vencimento +issues.invalid_due_date_format=O formato da data de vencimento tem que ser 'aaaa-mm-dd'. +issues.error_modifying_due_date=Falhou a modificação da data de vencimento. +issues.error_removing_due_date=Falhou a remoção da data de vencimento. issues.push_commit_1=adicionou %d cometimento %s issues.push_commits_n=adicionou %d cometimentos %s -issues.force_push_codes=`forçou o envio de %[1]s de %[2]s para %[4]s %[6]s` +issues.force_push_codes=`forçou o envio %[1]s de %[2]s para %[4]s %[6]s` issues.due_date_form=yyyy-mm-dd -issues.due_date_form_add=Adicionar data limite +issues.due_date_form_add=Adicionar data de vencimento issues.due_date_form_edit=Editar issues.due_date_form_remove=Remover -issues.due_date_not_writer=Tem que ter permissões de escrita no repositório para poder modificar o prazo de uma questão. -issues.due_date_not_set=Sem data limite definida. -issues.due_date_added=adicionou a data limite %s %s -issues.due_date_modified=modificou a data limite de %[2]s para %[1]s %[3]s -issues.due_date_remove=removeu a data limite %s %s +issues.due_date_not_writer=Tem que ter permissões de escrita no repositório para poder modificar a data de vencimento de uma questão. +issues.due_date_not_set=Sem data de vencimento definida. +issues.due_date_added=adicionou a data de vencimento %s %s +issues.due_date_modified=modificou a data de vencimento de %[2]s para %[1]s %[3]s +issues.due_date_remove=removeu a data de vencimento %s %s issues.due_date_overdue=Em atraso -issues.due_date_invalid=A data limite é inválida ou está fora do intervalo permitido. Por favor, use o formato 'aaaa-mm-dd'. +issues.due_date_invalid=A data de vencimento é inválida ou está fora do intervalo permitido. Por favor, use o formato 'aaaa-mm-dd'. issues.dependency.title=Dependências issues.dependency.issue_no_dependencies=Esta questão não tem quaisquer dependências, neste momento. issues.dependency.pr_no_dependencies=Este pedido de integração não tem quaisquer dependências, neste momento. @@ -1169,8 +1332,8 @@ issues.dependency.remove=Remover issues.dependency.remove_info=Remover esta dependência issues.dependency.added_dependency=`adicionou uma nova dependência %s` issues.dependency.removed_dependency=`removeu uma dependência %s` -issues.dependency.issue_closing_blockedby=O encerramento deste pedido de integração está bloqueado pelas seguintes questões -issues.dependency.pr_closing_blockedby=O encerramento desta questão está bloqueado pelas seguintes questões +issues.dependency.pr_closing_blockedby=O encerramento deste pedido de integração está bloqueado pelas seguintes questões +issues.dependency.issue_closing_blockedby=O encerramento desta questão está bloqueado pelas seguintes questões issues.dependency.issue_close_blocks=Esta questão bloqueia o encerramento das seguintes questões issues.dependency.pr_close_blocks=Este pedido de integração bloqueia o encerramento das seguintes questões issues.dependency.issue_close_blocked=Tem que encerrar todas as questões que bloqueiam esta questão antes de a poder encerrar. @@ -1188,66 +1351,79 @@ issues.dependency.add_error_dep_exists=A dependência já existe. issues.dependency.add_error_cannot_create_circular=Não pode criar uma dependência onde duas questões se bloqueiam simultaneamente. issues.dependency.add_error_dep_not_same_repo=Ambas as questões têm que estar no mesmo repositório. issues.review.self.approval=Não pode aprovar o seu próprio pedido de integração. -issues.review.self.rejection=Não pode solicitar alterações sobre o seu próprio pedido de integração. -issues.review.approve=aprovou estas alterações %s +issues.review.self.rejection=Não pode solicitar modificações sobre o seu próprio pedido de integração. +issues.review.approve=aprovou estas modificações %s issues.review.comment=reviu %s +issues.review.dismissed=descartou a revisão de %s %s +issues.review.dismissed_label=Descartada issues.review.left_comment=deixou um comentário -issues.review.content.empty=Tem que deixar um comentário indicando a(s) alteração(ões) solicitada(s). -issues.review.reject=alterações solicitadas %s -issues.review.wait=foi solicitada para avaliação %s +issues.review.content.empty=Tem que deixar um comentário indicando a(s) modificação(ões) solicitada(s). +issues.review.reject=modificações solicitadas %s +issues.review.wait=foi solicitada para revisão %s issues.review.add_review_request=solicitou revisão de %s %s issues.review.remove_review_request=removeu a solicitação de revisão para %s %s -issues.review.remove_review_request_self=recusou-se a avaliar %s +issues.review.remove_review_request_self=recusou-se a rever %s issues.review.pending=Pendente issues.review.review=Revisão issues.review.reviewers=Revisores issues.review.outdated=Obsoleta issues.review.show_outdated=Mostrar as obsoletas issues.review.hide_outdated=Esconder as obsoletas -issues.review.show_resolved=Mostrar resolvidos -issues.review.hide_resolved=Ocultar resolvidos +issues.review.show_resolved=Mostrar os concluídos +issues.review.hide_resolved=Ocultar os concluídos issues.review.resolve_conversation=Passar diálogo ao estado de resolvido issues.review.un_resolve_conversation=Passar diálogo ao estado de não resolvido -issues.review.resolved_by=marcou este diálogo como resolvido +issues.review.resolved_by=marcou este diálogo como estando concluído issues.assignee.error=Nem todos os responsáveis foram adicionados devido a um erro inesperado. +issues.reference_issue.body=Conteúdo + +compare.compare_base=base +compare.compare_head=comparar pulls.desc=Habilitar pedidos de integração e revisão de código. pulls.new=Novo pedido de integração pulls.compare_changes=Novo pedido de integração pulls.compare_changes_desc=Escolha o ramo de destino e o ramo de origem. pulls.compare_base=integrar em -pulls.compare_compare=integrar a partir de +pulls.compare_compare=puxar de pulls.filter_branch=Filtrar ramo pulls.no_results=Não foram encontrados quaisquer resultados. pulls.nothing_to_compare=Estes ramos são iguais. Não há necessidade de criar um pedido de integração. +pulls.nothing_to_compare_and_allow_empty_pr=Estes ramos são iguais. Este pedido de integração ficará vazio. pulls.has_pull_request=`Já existe um pedido de integração entre estes dois ramos: %[2]s#%[3]d` pulls.create=Criar um pedido de integração -pulls.title_desc=quer integrar %[1]d cometimentos de %[2] em %[3]s -pulls.merged_title_desc=integrou %[1]d cometimentos de %[2] em %[3]s %[4]s +pulls.title_desc=quer integrar %[1]d cometimento(s) do ramo %[2]s no ramo %[3]s +pulls.merged_title_desc=integrou %[1]d cometimento(s) do ramo %[2]s no ramo %[3]s %[4]s pulls.change_target_branch_at=`mudou o ramo de destino de %s para %s %s` pulls.tab_conversation=Diálogo pulls.tab_commits=Cometimentos pulls.tab_files=Ficheiros modificados pulls.reopen_to_merge=Reabra este pedido de integração para executar uma integração. pulls.cant_reopen_deleted_branch=Este pedido de integração não pode ser reaberto porque o ramo foi eliminado. -pulls.merged=Integração executada -pulls.merged_as=A integração constante no pedido foi executada como %[2]s. +pulls.merged=Integrado +pulls.merged_as=A integração foi executada no cometimento %[2]s. +pulls.manually_merged=Integrado manualmente +pulls.manually_merged_as=A integração foi executada manualmente no cometimento %[2]s. pulls.is_closed=O pedido de integração foi fechado. -pulls.has_merged=A integração constante no pedido foi executada. -pulls.title_wip_desc=`Inicie o título com %s para evitar que o pedido de integração seja executado acidentalmente.` -pulls.cannot_merge_work_in_progress=Este pedido de integração está marcado como um trabalho em andamento. Remova o prefixo %s do título quando estiver pronto +pulls.has_merged=A integração foi executada. +pulls.title_wip_desc=`Inicie o título com %s para evitar que a integração seja executada acidentalmente.` +pulls.cannot_merge_work_in_progress=Este pedido de integração está marcado como trabalho em andamento. +pulls.still_in_progress=Ainda em andamento? +pulls.add_prefix=Adicione o prefixo %s +pulls.remove_prefix=Remover o prefixo %s pulls.data_broken=Este pedido de integração está danificado devido à falta de informação da derivação. -pulls.files_conflicted=Este pedido de integração contém alterações que entram em conflito com o ramo de destino. +pulls.files_conflicted=Este pedido de integração contém modificações que entram em conflito com o ramo de destino. pulls.is_checking=Está em andamento uma verificação de conflitos na integração. Tente novamente daqui a alguns momentos. +pulls.is_empty=Este ramo é igual ao ramo de destino. pulls.required_status_check_failed=Algumas das verificações obrigatórias não foram bem sucedidas. pulls.required_status_check_missing=Estão faltando algumas verificações necessárias. pulls.required_status_check_administrator=Uma vez que é administrador, ainda pode realizar a integração deste pedido. pulls.blocked_by_approvals=Este pedido de integração ainda não tem aprovações suficientes. Já foram concedidas %d de um total de%d aprovações. -pulls.blocked_by_rejection=Este pedido de integração tem alterações solicitadas por um avaliador oficial. -pulls.blocked_by_official_review_requests=Este Pedido de Integração tem pedidos de revisão oficiais. +pulls.blocked_by_rejection=Este pedido de integração tem modificações solicitadas por um revisor oficial. +pulls.blocked_by_official_review_requests=Este pedido de integração tem pedidos de revisão oficiais. pulls.blocked_by_outdated_branch=Este pedido de integração foi bloqueado por ser obsoleto. -pulls.blocked_by_changed_protected_files_1=Este pedido de integração está bloqueado porque altera um ficheiro protegido: -pulls.blocked_by_changed_protected_files_n=Este pedido de integração está bloqueado porque altera ficheiros protegidos: +pulls.blocked_by_changed_protected_files_1=Este pedido de integração está bloqueado porque modifica um ficheiro protegido: +pulls.blocked_by_changed_protected_files_n=Este pedido de integração está bloqueado porque modifica ficheiros protegidos: pulls.can_auto_merge_desc=A integração constante neste pedido pode ser executada automaticamente. pulls.cannot_auto_merge_desc=A integração constante neste pedido não pode ser executada automaticamente porque existem conflitos. pulls.cannot_auto_merge_helper=Faça a integração manualmente para resolver os conflitos. @@ -1255,20 +1431,23 @@ pulls.num_conflicting_files_1=%d ficheiro em conflito pulls.num_conflicting_files_n=%d ficheiros em conflito pulls.approve_count_1=%d aprovação pulls.approve_count_n=%d aprovações -pulls.reject_count_1=%d pedido de alteração -pulls.reject_count_n=%d pedidos de alteração -pulls.waiting_count_1=%d avaliação pendente -pulls.waiting_count_n=%d avaliações pendentes +pulls.reject_count_1=%d pedido de modificação +pulls.reject_count_n=%d pedidos de modificação +pulls.waiting_count_1=%d revisão pendente +pulls.waiting_count_n=%d revisões pendentes +pulls.wrong_commit_id=ID do cometimento tem que ser um ID de cometimento no ramo de destino pulls.no_merge_desc=A integração constante neste pedido não pode ser executada porque todas as opções de integração do repositório estão desabilitadas. -pulls.no_merge_helper=Habilite as opções de integração nas configurações do repositório ou faça manualmente a integração constante no pedido. +pulls.no_merge_helper=Habilite as opções de integração nas configurações do repositório ou faça a integração manualmente. pulls.no_merge_wip=A integração constante neste pedido não pode ser executada porque está marcada como sendo trabalho em andamento. pulls.no_merge_not_ready=A integração constante neste pedido não pode ser executada. Verifique o estado da revisão e as verificações de estado. pulls.no_merge_access=Não tem autorização para executar a integração constante neste pedido. -pulls.merge_pull_request=Executar a integração constante neste pedido -pulls.rebase_merge_pull_request=Mudar a base e integrar -pulls.rebase_merge_commit_pull_request=Mudar a base e integrar (--no-ff) -pulls.squash_merge_pull_request=Comprimir e integrar +pulls.merge_pull_request=Criar um cometimento de integração +pulls.rebase_merge_pull_request=Mudar a base e avançar rapidamente +pulls.rebase_merge_commit_pull_request=Mudar a base e criar um cometimento de integração +pulls.squash_merge_pull_request=Criar cometimento de compressão +pulls.merge_manually=Integrado manualmente +pulls.merge_commit_id=O ID de cometimento da integração pulls.require_signed_wont_sign=O ramo requer que os cometimentos sejam assinados mas esta integração não vai ser assinada pulls.invalid_merge_option=Não pode usar esta opção de integração neste pedido de integração. pulls.merge_conflict=A integração falhou: Houve um conflito durante a integração. Dica: tente uma estratégia diferente @@ -1276,11 +1455,11 @@ pulls.merge_conflict_summary=Mensagem de erro pulls.rebase_conflict=A integração falhou: Houve um conflito durante a mudança de base do cometimento %[1]s. Dica: Tente uma estratégia diferente pulls.rebase_conflict_summary=Mensagem de erro ; %[2]s
    %[3]s
    -pulls.unrelated_histories=Integração falhada: A cabeça da integração e a base não partilham um histórico comum. Dica: Tente uma estratégia diferente +pulls.unrelated_histories=A integração falhou: A cabeça da integração e a base não partilham um histórico comum. Dica: Tente uma estratégia diferente pulls.merge_out_of_date=Falhou a integração: Enquanto estava a gerar a integração, a base foi modificada. Dica: Tente de novo. pulls.push_rejected=A integração falhou: O envio foi rejeitado. Reveja os automatismos do Git neste repositório. pulls.push_rejected_summary=Mensagem completa de rejeição -pulls.push_rejected_no_message=Integração falhada: O envio foi rejeitado mas não houve qualquer mensagem remota.
    Reveja os automatismos do git para este repositório +pulls.push_rejected_no_message=A integração falhou: O envio foi rejeitado mas não houve qualquer mensagem remota.
    Reveja os automatismos do git para este repositório pulls.open_unmerged_pull_exists=`Não pode executar uma operação de reabertura porque há um pedido de integração pendente (#%d) com propriedades idênticas.` pulls.status_checking=Algumas verificações estão pendentes pulls.status_checks_success=Todas as verificações foram bem sucedidas @@ -1295,14 +1474,17 @@ pulls.update_not_allowed=Não tem autorização para sincronizar o ramo pulls.outdated_with_base_branch=Este ramo é obsoleto em relação ao ramo base pulls.closed_at=`fechou este pedido de integração %[2]s` pulls.reopened_at=`reabriu este pedido de integração %[2]s` +pulls.merge_instruction_hint=`Também pode ver as instruções para a linha de comandos.` +pulls.merge_instruction_step1_desc=No seu repositório do projecto, crie um novo ramo e teste as modificações. +pulls.merge_instruction_step2_desc=Integre as modificações e envie para o Gitea. milestones.new=Nova etapa milestones.open_tab=%d abertas milestones.close_tab=%d fechadas milestones.closed=Encerrada %s milestones.update_ago=Modificada há %s -milestones.no_due_date=Sem data limite +milestones.no_due_date=Sem data de vencimento milestones.open=Abrir milestones.close=Fechar milestones.new_subheader=As etapas organizam as questões e acompanham o progresso. @@ -1310,9 +1492,9 @@ milestones.completeness=%d%% concluído milestones.create=Criar etapa milestones.title=Título milestones.desc=Descrição -milestones.due_date=Data limite (opcional) +milestones.due_date=Data de vencimento (opcional) milestones.clear=Limpar -milestones.invalid_due_date_format=O formato da data limite tem que ser 'aaaa-mm-dd'. +milestones.invalid_due_date_format=O formato da data de vencimento tem que ser 'aaaa-mm-dd'. milestones.create_success=A etapa '%s' foi criada. milestones.edit=Editar etapa milestones.edit_subheader=As etapas organizam as questões e acompanham o progresso. @@ -1322,8 +1504,8 @@ milestones.edit_success=A etapa '%s' foi modificada. milestones.deletion=Eliminar etapa milestones.deletion_desc=Se eliminar uma etapa, irá removê-la de todas as questões relacionadas. Quer continuar? milestones.deletion_success=A etapa foi eliminada. -milestones.filter_sort.closest_due_date=Data limite mais próxima -milestones.filter_sort.furthest_due_date=Data limite mais distante +milestones.filter_sort.closest_due_date=Data de vencimento mais próxima +milestones.filter_sort.furthest_due_date=Data de vencimento mais distante milestones.filter_sort.least_complete=Menos completo milestones.filter_sort.most_complete=Mais completo milestones.filter_sort.most_issues=Mais questões @@ -1395,19 +1577,19 @@ activity.merged_prs_label=Integrados activity.opened_prs_label=Propostos activity.active_issues_count_1=%d questão vigente activity.active_issues_count_n=%d questões vigentes -activity.closed_issues_count_1=Questão encerrada -activity.closed_issues_count_n=Questões encerradas +activity.closed_issues_count_1=questão encerrada +activity.closed_issues_count_n=questões encerradas activity.title.issues_1=%d questão activity.title.issues_n=%d questões -activity.title.issues_closed_by=%s encerrada por %s +activity.title.issues_closed_from=%s resolvidas de %s activity.title.issues_created_by=%s criada por %s activity.closed_issue_label=Encerrada -activity.new_issues_count_1=Nova questão -activity.new_issues_count_n=Novas questões +activity.new_issues_count_1=questão nova +activity.new_issues_count_n=questões novas activity.new_issue_label=Em aberto -activity.title.unresolved_conv_1=%d diálogo não resolvido -activity.title.unresolved_conv_n=%d diálogos não resolvidos -activity.unresolved_conv_desc=Estas questões e estes pedidos de integração que foram alterados recentemente ainda não foram resolvidos. +activity.title.unresolved_conv_1=%d diálogo não concluído +activity.title.unresolved_conv_n=%d diálogos não concluídos +activity.unresolved_conv_desc=Estas questões e estes pedidos de integração que foram modificados recentemente ainda não foram concluídos. activity.unresolved_conv_label=Em aberto activity.title.releases_1=%d lançamento activity.title.releases_n=%d Lançamentos @@ -1421,13 +1603,13 @@ activity.git_stats_pushed_1=enviou activity.git_stats_pushed_n=enviaram activity.git_stats_commit_1=%d cometimento activity.git_stats_commit_n=%d cometimentos -activity.git_stats_push_to_branch=para %s e +activity.git_stats_push_to_branch=para o ramo %s e activity.git_stats_push_to_all_branches=para todos os ramos. -activity.git_stats_on_default_branch=Em %s, +activity.git_stats_on_default_branch=No ramo %s, activity.git_stats_file_1=%d ficheiro activity.git_stats_file_n=%d ficheiros -activity.git_stats_files_changed_1=foi alterado -activity.git_stats_files_changed_n=foram alterados +activity.git_stats_files_changed_1=foi modificado +activity.git_stats_files_changed_n=foram modificados activity.git_stats_additions=e houve activity.git_stats_addition_1=%d adição activity.git_stats_addition_n=%d adições @@ -1437,6 +1619,8 @@ activity.git_stats_deletion_n=%d eliminações search=Procurar search.search_repo=Procurar repositório +search.fuzzy=Aproximada +search.match=Fiel search.results=Resultados da procura de "%s" em %s settings=Configurações @@ -1452,6 +1636,15 @@ settings.hooks=Automatismos web settings.githooks=Automatismos do Git settings.basic_settings=Configurações básicas settings.mirror_settings=Configurações do espelhamento +settings.mirror_settings.docs=Configure o seu repositório para puxar e/ou enviar automaticamente as modificações de/para outro repositório. Ramos, etiquetas e cometimentos serão sincronizados automaticamente. Como é que eu faço um espelho de outro repositório? +settings.mirror_settings.mirrored_repository=Repositório espelhado +settings.mirror_settings.direction=Sentido +settings.mirror_settings.direction.pull=Puxada +settings.mirror_settings.direction.push=Envio +settings.mirror_settings.last_update=Última modificação +settings.mirror_settings.push_mirror.none=Não foram configurados quaisquer espelhos de envio +settings.mirror_settings.push_mirror.remote_url=URL do repositório remoto Git +settings.mirror_settings.push_mirror.add=Adicionar espelho de envio settings.sync_mirror=Sincronizar agora settings.mirror_sync_in_progress=A sincronização do espelho está em andamento. Volte a verificar daqui a um minuto. settings.email_notifications.enable=Habilitar notificações por email @@ -1460,6 +1653,7 @@ settings.email_notifications.disable=Desabilitar notificações por email settings.email_notifications.submit=Definir preferência do email settings.site=Sítio web settings.update_settings=Modificar configurações +settings.branches.update_default_branch=Definir o ramo principal settings.advanced_settings=Configurações avançadas settings.wiki_desc=Habilitar wiki do repositório settings.use_internal_wiki=Usar o wiki nativo @@ -1487,10 +1681,13 @@ settings.pulls.allow_merge_commits=Habilitar integração de cometimentos settings.pulls.allow_rebase_merge=Habilitar cometimentos de mudança de base para integrar settings.pulls.allow_rebase_merge_commit=Habilitar mudança de base com cometimentos de integração explícitos (--no-ff) settings.pulls.allow_squash_commits=Habilitar cometimentos de condensação para integrar +settings.pulls.allow_manual_merge=Habilitar a marcação dos pedidos de integração como tendo sido executados manualmente +settings.pulls.enable_autodetect_manual_merge=Habilitar a identificação automática de integrações manuais (obs.: nalguns casos especiais a avaliação pode ser errada) +settings.pulls.default_delete_branch_after_merge=Eliminar o ramo do pedido de integração depois de finalizada a integração, como predefinição settings.projects_desc=Habilitar projectos no repositório settings.admin_settings=Configurações do administrador settings.admin_enable_health_check=Habilitar verificações de integridade (git fsck) no repositório -settings.admin_enable_close_issues_via_commit_in_any_branch=Fechar uma questão através de um cometimento feito num ramo não padrão +settings.admin_enable_close_issues_via_commit_in_any_branch=Fechar uma questão através de um cometimento feito num ramo que não seja o principal settings.danger_zone=Zona de perigo settings.new_owner_has_same_repo=O novo dono já tem um repositório com o mesmo nome. Por favor, escolha outro nome. settings.convert=Converter para um repositório normal @@ -1504,11 +1701,22 @@ settings.convert_fork_notices_1=Esta operação irá converter a derivação num settings.convert_fork_confirm=Converter repositório settings.convert_fork_succeed=A derivação foi convertida num repositório normal. settings.transfer=Transferir a propriedade +settings.transfer.rejected=A transferência do repositório foi rejeitada. +settings.transfer.success=A transferência do repositório foi bem sucedida. +settings.transfer_abort=Cancelar a transferência +settings.transfer_abort_invalid=Não pode cancelar a transferência de um repositório inexistente. +settings.transfer_abort_success=A transferência de repositório para %s foi cancelada com sucesso. settings.transfer_desc=Transferir este repositório para um utilizador ou para uma organização na qual você tenha direitos de administrador. -settings.transfer_notices_1=- Você perderá o acesso ao repositório se transferir para um utilizador individual. -settings.transfer_notices_2=- Você manterá o acesso ao repositório se o transferir para uma organização da qual você é (co-)proprietário. settings.transfer_form_title=Insira o nome do repositório para confirmar: -settings.signing_settings=Configurações de verificação de assinatura +settings.transfer_in_progress=Está a ser feita uma transferência. Cancele-a, por favor, se quiser transferir este repositório para outro utilizador. +settings.transfer_notices_1=- Você perderá o acesso ao repositório se o transferir para um utilizador individual. +settings.transfer_notices_2=- Você manterá o acesso ao repositório se o transferir para uma organização da qual você é (co-)proprietário(a). +settings.transfer_notices_3=- Se o repositório for privado e for transferido para um utilizador individual, esta operação certifica que o utilizador tem pelo menos a permissão de leitura (e altera as permissões se for necessário). +settings.transfer_owner=Novo proprietário +settings.transfer_perform=Executar transferência +settings.transfer_started=Este repositório foi marcado para ser transferido e aguarda a confirmação de "%s" +settings.transfer_succeed=O repositório foi transferido. +settings.signing_settings=Configuração da validação de assinaturas settings.trust_model=Modelo de confiança na assinatura settings.trust_model.default=Modelo de confiança padrão settings.trust_model.default.desc=Usar o modelo de confiança padrão do repositório para esta instalação. @@ -1517,12 +1725,13 @@ settings.trust_model.collaborator.long=Colaborador: Confiar nas assinaturas dos settings.trust_model.collaborator.desc=Assinaturas válidas dos colaboradores deste repositório serão marcadas como "fiável" (quer correspondam ou não ao autor do cometimento). Caso contrário, assinaturas válidas serão marcadas como "não fiável" se a assinatura corresponder ao autor do cometimento e "não corresponde", se não corresponder. settings.trust_model.committer=Autor do cometimento settings.trust_model.committer.long=Autor do cometimento: Confiar nas assinaturas que correspondam aos autores dos cometimentos (isto corresponde ao funcionamento do GitHub e força a que os cometimentos assinados do Gitea tenham o Gitea como autor do cometimento) +settings.trust_model.committer.desc=Assinaturas válidas apenas serão marcadas como "fiável" se corresponderem ao autor do cometimento, caso contrário serão marcadas como "não corresponde". Isto irá forçar a que o Gitea seja o autor do cometimento nos cometimentos assinados, ficando o autor real marcado como "Co-autorado-por:" e "Co-cometido-por:" no resumo do cometimento. A chave padrão do Gitea tem que corresponder a um utilizador na base de dados. settings.trust_model.collaboratorcommitter=Colaborador + Autor do cometimento settings.trust_model.collaboratorcommitter.long=Colaborador + Autor do cometimento: Confiar nas assinaturas dos colaboradores que correspondam ao autor do cometimento -settings.trust_model.collaboratorcommitter.desc=Assinaturas válidas feitas por colaboradores deste repositório serão marcadas como "fiável" se corresponderem ao autor do cometimento. Caso contrário, assinaturas válidas serão marcadas como "não fiável" se a assinatura corresponder ao autor do cometimento e "não corresponde" se não corresponder. Isto irá forçar a que o Gitea seja marcado como sendo o autor do cometimento nos cometimentos assinados, ficando o autor real marcado como Co-Autorado-Por: e Co-Cometido-Por: no resumo do cometimento. A chave padrão do Gitea tem que corresponder a um utilizador na base de dados. +settings.trust_model.collaboratorcommitter.desc=Assinaturas válidas feitas por colaboradores deste repositório serão marcadas como "fiável" se corresponderem ao autor do cometimento. Caso contrário, assinaturas válidas serão marcadas como "não fiável" se a assinatura corresponder ao autor do cometimento e "não corresponde" se não corresponder. Isto irá forçar a que o Gitea seja marcado como sendo o autor do cometimento nos cometimentos assinados, ficando o autor real marcado como "Co-autorado-por:" e "Co-cometido-por:" no resumo do cometimento. A chave padrão do Gitea tem que corresponder a um utilizador na base de dados. settings.wiki_delete=Eliminar dados do wiki settings.wiki_delete_desc=Eliminar os dados do repositório do wiki é permanente e não pode ser revertido. -settings.wiki_delete_notices_1=- Isso excluirá e desabilitará permanentemente o repositório do wiki para %s. +settings.wiki_delete_notices_1=- Isso excluirá e desabilitará permanentemente o wiki do repositório para %s. settings.confirm_wiki_delete=Eliminar dados do wiki settings.wiki_deletion_success=Os dados do repositório do wiki foram eliminados. settings.delete=Eliminar este repositório @@ -1532,9 +1741,6 @@ settings.delete_notices_2=- Esta operação eliminará permanentemente o reposit settings.delete_notices_fork_1=- Derivações deste repositório tornar-se-ão independentes, após a eliminação. settings.deletion_success=O repositório foi eliminado. settings.update_settings_success=As configurações do repositório foram modificadas. -settings.transfer_owner=Novo proprietário -settings.make_transfer=Executar transferência -settings.transfer_succeed=O repositório foi transferido. settings.confirm_delete=Eliminar repositório settings.add_collaborator=Adicionar colaborador settings.add_collaborator_success=O colaborador foi adicionado. @@ -1553,12 +1759,12 @@ settings.add_team=Adicionar equipa settings.add_team_duplicate=A equipa já tem o repositório settings.add_team_success=A equipa agora tem acesso ao repositório. settings.search_team=Procurar equipa… -settings.change_team_permission_tip=A permissão da equipa é definida na página de configurações da equipa e não pode ter alterações específicas de cada repositório +settings.change_team_permission_tip=A permissão da equipa é definida na página de configurações da equipa e não pode ter modificações específicas de cada repositório settings.delete_team_tip=Esta equipa tem acesso a todos os repositórios e não pode ser removida settings.remove_team_success=O acesso da equipa ao repositório foi removido. settings.add_webhook=Adicionar automatismo web settings.add_webhook.invalid_channel_name=O nome de canal do automatismo web não pode estar vazio e não pode conter somente um caractere #. -settings.hooks_desc=Os automatismos web fazem pedidos HTTP POST automaticamente a um servidor quanto certos eventos Gitea são despoletados. Leia mais no guia sobre automatismos web. +settings.hooks_desc=Os automatismos web fazem pedidos HTTP POST automaticamente a um servidor quando determinados eventos Gitea são despoletados. Leia mais no guia sobre automatismos web. settings.webhook_deletion=Remover automatismo web settings.webhook_deletion_desc=Remover um automatismo web elimina as configurações e o histórico de entrega desse automatismo. Quer continuar? settings.webhook_deletion_success=O automatismo web foi removido. @@ -1599,7 +1805,7 @@ settings.event_fork_desc=Feita a derivação do repositório. settings.event_release=Lançamento settings.event_release_desc=Lançamento publicado, modificado ou eliminado num repositório. settings.event_push=Enviar -settings.event_push_desc=Envio de Git para um repositório. +settings.event_push_desc=Envio do Git para um repositório. settings.event_repository=Repositório settings.event_repository_desc=Repositório criado ou eliminado. settings.event_header_issue=Eventos da questão @@ -1607,29 +1813,29 @@ settings.event_issues=Questões settings.event_issues_desc=Questão aberta, fechada, reaberta ou editada. settings.event_issue_assign=Questão atribuída settings.event_issue_assign_desc=Responsável atribuído ou retirado à questão. -settings.event_issue_label=Questão com etiqueta -settings.event_issue_label_desc=Etiquetas modificadas ou retiradas às questões. +settings.event_issue_label=Questão com rótulo +settings.event_issue_label_desc=Rótulos modificados ou retirados às questões. settings.event_issue_milestone=Questão com etapa atribuída settings.event_issue_milestone_desc=Etapa atribuída ou retirada à questão. settings.event_issue_comment=Comentário da questão settings.event_issue_comment_desc=Comentário da questão criado, editado ou eliminado. settings.event_header_pull_request=Eventos de pedidos de integração settings.event_pull_request=Pedido de integração -settings.event_pull_request_desc=Pedidos de integração abertos, fechados, reabertos ou editados. +settings.event_pull_request_desc=Pedido de integração aberto, fechado, reaberto ou editado. settings.event_pull_request_assign=Responsável atribuído ao pedido de integração settings.event_pull_request_assign_desc=Responsável atribuído ou retirado ao pedido de integração. -settings.event_pull_request_label=Etiqueta atribuída ao pedido de integração -settings.event_pull_request_label_desc=Etiquetas modificadas ou retiradas aos pedidos de integração. +settings.event_pull_request_label=Rótulo atribuído ao pedido de integração +settings.event_pull_request_label_desc=Rótulos modificados ou retirados aos pedidos de integração. settings.event_pull_request_milestone=Etapa atribuída ao pedido de integração settings.event_pull_request_milestone_desc=Etapa atribuída ou retirada ao pedido de integração. settings.event_pull_request_comment=Comentário do pedido de integração -settings.event_pull_request_comment_desc=Pedido de integração criado, editado ou eliminado. -settings.event_pull_request_review=Pedido de integração avaliado -settings.event_pull_request_review_desc=Pedido de integração aprovado, rejeitado ou comentado. +settings.event_pull_request_comment_desc=Comentário do pedido de integração criado, editado ou eliminado. +settings.event_pull_request_review=Pedido de integração revisto +settings.event_pull_request_review_desc=Pedido de integração aprovado, rejeitado ou comentado na revisão. settings.event_pull_request_sync=Pedido de integração sincronizado settings.event_pull_request_sync_desc=Pedido de integração sincronizado. -settings.branch_filter=Filtro por ramo -settings.branch_filter_desc=Lista branca para eventos de envio e de criação e eliminação de ramos, especificada como um padrão glob. Se estiver em branco ou for *, serão reportados eventos para todos os ramos. Veja a documentação github.com/gobwas/glob para detalhes da sintaxe. Exemplos: master, {master,release*}. +settings.branch_filter=Filtro de ramos +settings.branch_filter_desc=Lista dos ramos a serem considerados nos eventos de envio e de criação e eliminação de ramos, especificada como um padrão glob. Se estiver em branco ou for *, serão reportados eventos para todos os ramos. Veja a documentação github.com/gobwas/glob para ver os detalhes da sintaxe. Exemplos: trunk, {trunk,release*}. settings.active=Em funcionamento settings.active_helper=Informação sobre eventos despoletados será enviada para o URL deste automatismo web. settings.add_hook_success=O automatismo web foi adicionado. @@ -1648,11 +1854,12 @@ settings.add_telegram_hook_desc=Integrar Telegram no seu reposi settings.add_matrix_hook_desc=Integrar Matrix no seu repositório. settings.add_msteams_hook_desc=Integrar Microsoft Teams no seu repositório. settings.add_feishu_hook_desc=Integrar Feishu no seu repositório. +settings.add_Wechat_hook_desc=Integrar Wechatwork no seu repositório. settings.deploy_keys=Chaves de instalação settings.add_deploy_key=Adicionar chave de instalação -settings.deploy_key_desc=Chaves de instalação têm acesso apenas de leitura ao repositório. +settings.deploy_key_desc=Chaves de instalação têm acesso para puxar do repositório apenas em modo de leitura. settings.is_writable=Habilitar acesso de escrita -settings.is_writable_info=Permitir que esta chave de instalação envie para o repositório. +settings.is_writable_info=Permitir a esta chave de instalação enviar para o repositório. settings.no_deploy_keys=Ainda não existem quaisquer chaves de instalação. settings.title=Título settings.deploy_key_content=Conteúdo @@ -1664,18 +1871,18 @@ settings.deploy_key_deletion_desc=Remover uma chave de instalação irá revogar settings.deploy_key_deletion_success=A chave de instalação foi removida. settings.branches=Ramos settings.protected_branch=Salvaguarda do ramo -settings.protected_branch_can_push=Permitir envio? +settings.protected_branch_can_push=Permitir envios? settings.protected_branch_can_push_yes=Pode enviar settings.protected_branch_can_push_no=Não pode enviar settings.branch_protection=Salvaguarda do ramo '%s' settings.protect_this_branch=Habilitar salvaguarda do ramo -settings.protect_this_branch_desc=Impede a eliminação e restringe o envio e integração do Git no ramo. -settings.protect_disable_push=Desabilitar envio -settings.protect_disable_push_desc=O envio para este ramo não será permitido. -settings.protect_enable_push=Habilitar envio +settings.protect_this_branch_desc=Impede a eliminação e restringe envios e integrações do Git no ramo. +settings.protect_disable_push=Desabilitar envios +settings.protect_disable_push_desc=Não será permitido enviar para este ramo. +settings.protect_enable_push=Habilitar envios settings.protect_enable_push_desc=Qualquer utilizador com acesso de escrita terá permissão para enviar para este ramo (mas não poderá fazer envios forçados). -settings.protect_whitelist_committers=Lista de permissão restrita para envio -settings.protect_whitelist_committers_desc=Apenas os utilizadores ou equipas da lista terão permissão para enviar para este ramo (mas não poderão fazer envios forçados). +settings.protect_whitelist_committers=Lista de permissões para restringir os envios +settings.protect_whitelist_committers_desc=Apenas os utilizadores ou equipas constantes na lista terão permissão para enviar para este ramo (mas não poderão fazer envios forçados). settings.protect_whitelist_deploy_keys=Dar permissão às chaves de instalação para terem acesso de escrita para enviar. settings.protect_whitelist_users=Utilizadores com permissão para enviar: settings.protect_whitelist_search_users=Procurar utilizadores… @@ -1689,34 +1896,45 @@ settings.protect_check_status_contexts=Habilitar verificação de estado settings.protect_check_status_contexts_desc=Exigir que as verificações de estado passem antes de ser aplicada a integração. Escolha quais as verificações de estado que têm de passar para que os ramos possam ser integrados num ramo que corresponda a esta regra. Quando habilitado, os cometimentos primeiro têm de ser enviados para outro ramo e depois integrados, ou então enviados imediatamente para um ramo que corresponda a esta regra, após terem passado as verificações de estado. Se não forem escolhidos quaisquer contextos, o último cometimento tem que ser bem sucedido, independentemente do contexto. settings.protect_check_status_contexts_list=Verificações de estado encontradas na última semana para este repositório settings.protect_required_approvals=Aprovações necessárias: -settings.protect_required_approvals_desc=Permitir somente a integração constante de pedidos que tenham avaliações positivas suficientes. +settings.protect_required_approvals_desc=Permitir somente a integração constante de pedidos que tenham revisões positivas suficientes. settings.protect_approvals_whitelist_enabled=Restringir aprovações a utilizadores ou equipas da lista de permissão -settings.protect_approvals_whitelist_enabled_desc=Somente as avaliações dos utilizadores ou equipas da lista de permissão irão contar para as aprovações necessárias. Se não houver uma lista de permissão de aprovações, avaliações de qualquer pessoa com acesso de escrita contam para as aprovações necessárias. -settings.protect_approvals_whitelist_users=Avaliadores com permissão: +settings.protect_approvals_whitelist_enabled_desc=Somente as revisões dos utilizadores ou equipas da lista de permissão irão contar para as aprovações necessárias. Se não houver uma lista de permissão de aprovações, revisões de qualquer pessoa com acesso de escrita contam para as aprovações necessárias. +settings.protect_approvals_whitelist_users=Revisores com permissão: settings.protect_approvals_whitelist_teams=Equipas com permissão para rever: settings.dismiss_stale_approvals=Descartar aprovações obsoletas -settings.dismiss_stale_approvals_desc=Quando novos cometimentos que mudam o conteúdo do pedido de integração são enviados para o ramo, as aprovações antigas serão descartadas. +settings.dismiss_stale_approvals_desc=Quando novos cometimentos que mudam o conteúdo do pedido de integração forem enviados para o ramo, as aprovações antigas serão descartadas. settings.require_signed_commits=Exigir cometimentos assinados -settings.require_signed_commits_desc=Rejeitar envios para este ramo se não estiverem assinados ou não forem verificáveis. +settings.require_signed_commits_desc=Rejeitar envios para este ramo que não estejam assinados ou que não sejam validáveis. settings.protect_protected_file_patterns=Padrões de ficheiros protegidos (separados com ponto e vírgula '\;'): -settings.protect_protected_file_patterns_desc=Ficheiros protegidos que não podem ser alterados, mesmo que o utilizador tenha direitos para adicionar, editar ou eliminar ficheiros neste ramo. Múltiplos padrões podem ser separados com ponto e vírgula ('\;'). Veja a documentação em github.com/gobwas/glob para ver a sintaxe. Exemplos: .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns_desc=Ficheiros protegidos que não podem ser modificados, mesmo que o utilizador tenha direitos para adicionar, editar ou eliminar ficheiros neste ramo. Múltiplos padrões podem ser separados com ponto e vírgula ('\;'). Veja a documentação em github.com/gobwas/glob para ver a sintaxe. Exemplos: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Habilitar salvaguarda settings.delete_protected_branch=Desabilitar salvaguarda settings.update_protect_branch_success=A salvaguarda do ramo '%s' foi modificada. settings.remove_protected_branch_success=A salvaguarda do ramo '%s' foi desabilitada. settings.protected_branch_deletion=Desabilitar salvaguarda do ramo settings.protected_branch_deletion_desc=Desabilitar a salvaguarda do ramo irá permitir que os utilizadores que tenham permissão de escrita enviem para o ramo. Quer continuar? -settings.block_rejected_reviews=Bloquear a integração quando há avaliações rejeitadas -settings.block_rejected_reviews_desc=A integração não será possível quando as alterações forem pedidas pelos revisores oficiais, mesmo que haja aprovações suficientes. +settings.block_rejected_reviews=Bloquear a integração quando há revisões rejeitadas +settings.block_rejected_reviews_desc=A integração não será possível quando as modificações forem pedidas pelos revisores oficiais, mesmo que haja aprovações suficientes. settings.block_on_official_review_requests=Bloquear integração nos pedidos de revisão oficiais settings.block_on_official_review_requests_desc=A integração não será possível quando tiver pedidos de revisão oficiais, mesmo que haja aprovações suficientes. settings.block_outdated_branch=Bloquear integração se o pedido de integração for obsoleto settings.block_outdated_branch_desc=A integração não será possível quando o ramo de topo estiver abaixo do ramo base. -settings.default_branch_desc=Escolha um ramo padrão do repositório para pedidos de integração e cometimentos: +settings.default_branch_desc=Escolha um ramo do repositório como sendo o predefinido para pedidos de integração e cometimentos: +settings.default_merge_style_desc=Tipo de integração predefinido para pedidos de integração: settings.choose_branch=Escolha um ramo… settings.no_protected_branch=Não existem ramos protegidos. settings.edit_protected_branch=Editar settings.protected_branch_required_approvals_min=O número mínimo exigido de aprovações não pode ser negativo. +settings.tags=Etiquetas +settings.tags.protection=Proteger etiquetas +settings.tags.protection.pattern=Padrão das etiquetas +settings.tags.protection.allowed=Com permissão +settings.tags.protection.allowed.users=Utilizadores com permissão +settings.tags.protection.allowed.teams=Equipas com permissão +settings.tags.protection.allowed.noone=Ninguém +settings.tags.protection.create=Proteger etiqueta +settings.tags.protection.none=Não há etiquetas protegidas. +settings.tags.protection.pattern.description=Pode usar um só nome ou um padrão glob ou uma expressão regular para corresponder a várias etiquetas. Para mais informações leia o guia das etiquetas protegidas. settings.bot_token=Código do bot settings.chat_id=ID do diálogo settings.matrix.homeserver_url=URL do servidor caseiro @@ -1725,11 +1943,12 @@ settings.matrix.access_token=Código de acesso settings.matrix.message_type=Tipo de mensagem settings.archive.button=Arquivar repositório settings.archive.header=Arquivar este repositório -settings.archive.text=Arquivar um repositório fará com que seja inteiramente de leitura. Não estará visível no painel de controlo, não poderá receber cometimentos e não será possível criar questões ou pedidos de integração. +settings.archive.text=Arquivar um repositório fará com que fique inteira e exclusivamente de leitura. Não ficará visível no painel de controlo, não poderá receber cometimentos e não será possível criar questões ou pedidos de integração. settings.archive.success=O repositório foi arquivado com sucesso. settings.archive.error=Ocorreu um erro enquanto decorria o processo de arquivo do repositório. Veja os registo para obter mais detalhes. settings.archive.error_ismirror=Não pode arquivar um repositório que tenha sido espelhado. settings.archive.branchsettings_unavailable=As configurações dos ramos não estão disponíveis quando o repositório está arquivado. +settings.archive.tagsettings_unavailable=As configurações sobre etiquetas não estão disponíveis quando o repositório está arquivado. settings.unarchive.button=Desarquivar repositório settings.unarchive.header=Desarquivar este repositório settings.unarchive.text=Desarquivar o repositório irá restaurar a capacidade de receber cometimentos e envios, assim como novas questões e pedidos de integração. @@ -1741,7 +1960,7 @@ settings.lfs_filelist=Ficheiros LFS armazenados neste repositório settings.lfs_no_lfs_files=Não existem quaisquer ficheiros LFS armazenados neste repositório settings.lfs_findcommits=Procurar cometimentos settings.lfs_lfs_file_no_commits=Não foram encontrados quaisquer cometimentos para este ficheiro LFS -settings.lfs_noattribute=Este caminho não tem o atributo bloqueável no ramo padrão +settings.lfs_noattribute=Este caminho não tem o atributo bloqueável no ramo principal settings.lfs_delete=Eliminar ficheiro LFS com o OID %s settings.lfs_delete_warning=Eliminar um ficheiro LFS pode causar erros do tipo 'elemento não existe' no checkout. Tem a certeza? settings.lfs_findpointerfiles=Procurar ficheiros apontadores @@ -1752,7 +1971,7 @@ settings.lfs_lock_already_exists=Já existe um bloqueio: %s settings.lfs_lock=Bloquear settings.lfs_lock_path=Caminho de ficheiro a bloquear... settings.lfs_locks_no_locks=Sem bloqueios -settings.lfs_lock_file_no_exist=O ficheiro bloqueado não existe no ramo padrão +settings.lfs_lock_file_no_exist=O ficheiro bloqueado não existe no ramo principal settings.lfs_force_unlock=Forçar desbloqueio settings.lfs_pointers.found=Encontrado(s) %d ponteiro(s) de blob - %d associado(a), %d desassociado(a) (%d ausente do armazenamento) settings.lfs_pointers.sha=SHA do blob @@ -1774,12 +1993,14 @@ diff.download_diff=Descarregar ficheiro diff diff.show_split_view=Visualização em 2 colunas diff.show_unified_view=Visualização unificada diff.whitespace_button=Espaço em branco -diff.whitespace_show_everything=Mostrar todas as alterações +diff.whitespace_show_everything=Mostrar todas as modificações diff.whitespace_ignore_all_whitespace=Ignorar espaço em branco ao comparar linhas -diff.whitespace_ignore_amount_changes=Ignorar alterações na quantidade de espaço em branco -diff.whitespace_ignore_at_eol=Ignorar alterações do espaço em branco no fim das linhas -diff.stats_desc= %d ficheiros alterados com %d adições e %d eliminações +diff.whitespace_ignore_amount_changes=Ignorar modificações na quantidade de espaço em branco +diff.whitespace_ignore_at_eol=Ignorar modificações do espaço em branco no fim das linhas +diff.stats_desc= %d ficheiros modificados com %d adições e %d eliminações +diff.stats_desc_file=%d modificações: %d adições e %d exclusões diff.bin=BIN +diff.bin_not_shown=Ficheiro binário não mostrado. diff.view_file=Ver ficheiro diff.file_before=Antes diff.file_after=Depois @@ -1787,7 +2008,8 @@ diff.file_image_width=Largura diff.file_image_height=Altura diff.file_byte_size=Tamanho diff.file_suppressed=A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande -diff.too_many_files=Alguns ficheiros não foram mostrados porque foram alterados demasiados ficheiros neste diff +diff.file_suppressed_line_too_long=A apresentação das diferenças entre ficheiros foi suprimida porque há linhas demasiado longas +diff.too_many_files=Alguns ficheiros não foram mostrados porque foram modificados demasiados ficheiros neste diff diff.comment.placeholder=Deixar um comentário diff.comment.markdown_info=A formatação com markdown é suportada. diff.comment.add_single_comment=Adicionar um único comentário @@ -1795,13 +2017,16 @@ diff.comment.add_review_comment=Adicionar comentário diff.comment.start_review=Iniciar revisão diff.comment.reply=Responder diff.review=Revisão -diff.review.header=Submeter avaliação -diff.review.placeholder=Comentário da avaliação +diff.review.header=Submeter revisão +diff.review.placeholder=Comentário da revisão diff.review.comment=Comentar diff.review.approve=Aprovar -diff.review.reject=Solicitar alterações +diff.review.reject=Solicitar modificações diff.committed_by=cometido por diff.protected=Protegido +diff.image.side_by_side=Lado a Lado +diff.image.swipe=Deslizar +diff.image.overlay=Sobrepor releases.desc=Acompanhe as versões e as descargas do repositório. release.releases=Lançamentos @@ -1811,6 +2036,7 @@ release.new_release=Novo lançamento release.draft=Rascunho release.prerelease=Pré-lançamento release.stable=Estável +release.compare=Comparar release.edit=editar release.ahead.commits=%d cometimentos release.ahead.target=para %s desde este lançamento @@ -1837,9 +2063,12 @@ release.deletion_tag_desc=Esta etiqueta vai ser eliminada do repositório. O con release.deletion_tag_success=A etiqueta foi eliminada. release.tag_name_already_exist=Já existe um lançamento com esta etiqueta. release.tag_name_invalid=A etiqueta não é válida. +release.tag_name_protected=O nome da etiqueta está protegido. release.tag_already_exist=Este nome de etiqueta já existe. release.downloads=Descargas release.download_count=Descargas: %s +release.add_tag_msg=Usar o título e o conteúdo do lançamento como mensagem da etiqueta. +release.add_tag=Criar apenas a etiqueta branch.name=Nome do ramo branch.search=Procurar ramos @@ -1861,17 +2090,28 @@ branch.deleted_by=Eliminado por %s branch.restore_success=O ramo '%s' foi restaurado. branch.restore_failed=Falhou a restauração do ramo '%s'. branch.protected_deletion_failed=O ramo '%s' está protegido, não pode ser eliminado. -branch.default_deletion_failed=O ramo '%s' é o ramo padrão, não pode ser eliminado. +branch.default_deletion_failed=O ramo '%s' é o ramo principal, não pode ser eliminado. branch.restore=Restaurar ramo '%s' branch.download=Descarregar o ramo '%s' -branch.included_desc=Este ramo faz parte do ramo padrão +branch.included_desc=Este ramo faz parte do ramo principal branch.included=Incluído +branch.create_new_branch=Criar ramo a partir do ramo: +branch.confirm_create_branch=Criar ramo +branch.new_branch=Criar um novo ramo +branch.new_branch_from=Criar um novo ramo a partir do ramo '%s' + +tag.create_tag=Criar etiqueta %s +tag.create_success=A etiqueta '%s' foi criada. topic.manage_topics=Gerir tópicos topic.done=Concluído topic.count_prompt=Não pode escolher mais do que 25 tópicos topic.format_prompt=Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres. +error.csv.too_large=Não é possível apresentar este ficheiro por ser demasiado grande. +error.csv.unexpected=Não é possível apresentar este ficheiro porque contém um caractere inesperado na linha %d e coluna %d. +error.csv.invalid_field_count=Não é possível apresentar este ficheiro porque tem um número errado de campos na linha %d. + [org] org_name_holder=Nome da organização org_full_name_holder=Nome completo da organização @@ -1915,6 +2155,7 @@ settings.visibility.private_shortname=Privado settings.update_settings=Modificar configurações settings.update_setting_success=As configurações da organização foram modificadas. settings.change_orgname_prompt=Nota: alterar o nome da organização altera também o URL da organização. +settings.change_orgname_redirect_prompt=O nome antigo, enquanto não for reivindicado, irá reencaminhar para o novo. settings.update_avatar_success=O avatar da organização foi modificado. settings.delete=Eliminar organização settings.delete_account=Eliminar esta organização @@ -1924,7 +2165,7 @@ settings.delete_org_title=Eliminar organização settings.delete_org_desc=Esta organização será eliminada permanentemente. Quer continuar? settings.hooks_desc=Adicionar automatismos web que serão despoletados para todos os repositórios desta organização. -settings.labels_desc=Adicionar etiquetas que possam ser usadas em questões para todos os repositórios desta organização. +settings.labels_desc=Adicionar rótulos que possam ser usados em questões para todos os repositórios desta organização. members.membership_visibility=Visibilidade da filiação: members.public=Visível @@ -1935,12 +2176,15 @@ members.member_role=Função do membro: members.owner=Proprietário(a) members.member=Membro members.remove=Remover +members.remove.detail=Remover %[1]s de %[2]s? members.leave=Sair +members.leave.detail=Sair de %s? members.invite_desc=Adicionar um novo membro a %s: members.invite_now=Convidar agora teams.join=Aderir teams.leave=Sair +teams.leave.detail=Sair de %s? teams.can_create_org_repo=Criar repositórios teams.can_create_org_repo_helper=Os membros podem criar novos repositórios na organização. O criador terá acesso de administrador ao novo repositório. teams.read_access=Acesso de leitura @@ -1948,7 +2192,7 @@ teams.read_access_helper=Os membros podem ver e clonar os repositórios da equip teams.write_access=Acesso de escrita teams.write_access_helper=Os membros podem ler e enviar para os repositórios da equipa. teams.admin_access=Acesso de administrador -teams.admin_access_helper=Os membros podem enviar para e receber dos repositórios da equipa e adicionar colaboradores a esses repositórios. +teams.admin_access_helper=Os membros podem puxar de, e enviar para os repositórios da equipa e adicionar colaboradores a esses repositórios. teams.no_desc=Esta equipa não tem descrição teams.settings=Configurações teams.owners_permission_desc=Os proprietários têm acesso total a todos os repositórios e têm acesso de administrador à organização. @@ -1960,8 +2204,8 @@ teams.delete_team_title=Eliminar equipa teams.delete_team_desc=Eliminar uma equipa revoga o acesso dos seus membros ao repositório. Quer continuar? teams.delete_team_success=A equipa foi eliminada. teams.read_permission_desc=Esta equipa atribui acesso de leitura: os seus membros podem ver e clonar os repositórios da equipa. -teams.write_permission_desc=Esta equipa atribui acesso de escrita: os seus membros podem ler de e enviar para os repositórios da equipa. -teams.admin_permission_desc=Esta equipa atribui o acesso de administração: os seus membros podem ler de, enviar para e adicionar colaboradores aos repositórios da equipa. +teams.write_permission_desc=Esta equipa atribui acesso de escrita: os seus membros podem ler de, e enviar para os repositórios da equipa. +teams.admin_permission_desc=Esta equipa atribui o acesso de administração: os seus membros podem ler de, enviar para, e adicionar colaboradores aos repositórios da equipa. teams.create_repo_permission_desc=Adicionalmente, esta equipa atribui a permissão de criar repositórios: os seus membros podem criar novos repositórios na organização. teams.repositories=Repositórios da equipa teams.search_repo_placeholder=Procurar repositório… @@ -1978,16 +2222,15 @@ teams.specific_repositories_helper=Os membros só terão acesso a repositórios teams.all_repositories=Todos os repositórios teams.all_repositories_helper=A equipa tem acesso a todos os repositórios. Escolher isto irá adicionar todos os repositórios existentes à equipa. teams.all_repositories_read_permission_desc=Esta equipa atribui o acesso de leitura a todos os repositórios: os seus membros podem ver e clonar os repositórios. -teams.all_repositories_write_permission_desc=Esta equipa atribui o acesso de escrita a todos os repositórios: os seus membros podem ler de e enviar para os repositórios. -teams.all_repositories_admin_permission_desc=Esta equipa atribui o acesso de administração a todos os repositórios: os seus membros podem ler de, enviar para e adicionar colaboradores aos repositórios. +teams.all_repositories_write_permission_desc=Esta equipa atribui o acesso de escrita a todos os repositórios: os seus membros podem ler de, e enviar para os repositórios. +teams.all_repositories_admin_permission_desc=Esta equipa atribui o acesso de administração a todos os repositórios: os seus membros podem ler de, enviar para, e adicionar colaboradores aos repositórios. [admin] dashboard=Painel de controlo users=Contas de utilizador organizations=Organizações repositories=Repositórios -hooks=Automatismos web padrão -systemhooks=Automatismos web do sistema +hooks=Automatismos web authentication=Fontes de autenticação emails=Emails do utilizador config=Configuração @@ -2000,7 +2243,7 @@ total=total: %d dashboard.statistic=Resumo dashboard.operations=Operações de manutenção dashboard.system_status=Estado do sistema -dashboard.statistic_info=A base de dados do Gitea contém %d utilizadores, %d organizações, %d chaves públicas, %d repositórios, %d vigilâncias, %d marcas de favoritos, %d operações, %d acessos, %d questões, %d comentários, %d contas sociais, %d seguimentos, %d espelhos, %d lançamentos, %d fontes de autenticação, %d automatismos web, %d etapas, %d etiquetas, %d tarefas de automatismos %d equipas, %d tarefas de modificações e %d anexos. +dashboard.statistic_info=A base de dados do Gitea contém %d utilizadores, %d organizações, %d chaves públicas, %d repositórios, %d vigilâncias, %d marcas de favoritos, %d operações, %d acessos, %d questões, %d comentários, %d contas sociais, %d seguimentos, %d espelhos, %d lançamentos, %d fontes de autenticação, %d automatismos web, %d etapas, %d rótulos, %d tarefas de automatismos %d equipas, %d tarefas de modificações e %d anexos. dashboard.operation_name=Nome da operação dashboard.operation_switch=Comutar dashboard.operation_run=Executar @@ -2019,7 +2262,7 @@ dashboard.cron.error=Erro no cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s concluído dashboard.delete_inactive_accounts=Eliminar todas as contas que não tenham sido habilitadas dashboard.delete_inactive_accounts.started=Foi iniciada a eliminação de todas as contas que não foram habilitadas. -dashboard.delete_repo_archives=Eliminar todos os arquivos dos repositórios +dashboard.delete_repo_archives=Eliminar todos os arquivos dos repositórios (ZIP, TAR.GZ, etc) dashboard.delete_repo_archives.started=Foi iniciada a tarefa de eliminação de todos os repositórios arquivados. dashboard.delete_missing_repos=Eliminar todos os repositórios que não tenham os seus ficheiros Git dashboard.delete_missing_repos.started=Foi iniciada a tarefa de eliminação de todos os repositórios que não têm ficheiros git. @@ -2038,6 +2281,7 @@ dashboard.resync_all_sshprincipals.desc=(não é necessário no caso do servidor dashboard.resync_all_hooks=Voltar a sincronizar automatismos de pré-acolhimento, modificação e pós-acolhimento de todos os repositórios. dashboard.reinit_missing_repos=Reinicializar todos os repositórios Git em falta para os quais existam registos dashboard.sync_external_users=Sincronizar dados externos do utilizador +dashboard.cleanup_hook_task_table=Limpar tabela hook_task dashboard.server_uptime=Tempo em funcionamento contínuo do servidor dashboard.current_goroutine=Goroutines em execução dashboard.current_memory_usage=Utilização de memória corrente @@ -2067,6 +2311,8 @@ dashboard.total_gc_time=Pausa total da recolha de lixo dashboard.total_gc_pause=Pausa total da recolha de lixo dashboard.last_gc_pause=Última pausa da recolha de lixo dashboard.gc_times=Tempos da recolha de lixo +dashboard.delete_old_actions=Eliminar todas as operações antigas da base de dados +dashboard.delete_old_actions.started=Foi iniciado o processo de eliminação de todas as operações antigas da base de dados. users.user_manage_panel=Gestão das contas de utilizadores users.new_account=Criar conta de utilizador @@ -2104,6 +2350,7 @@ users.delete_account=Eliminar conta de utilizador users.still_own_repo=Este utilizador ainda possui um ou mais repositórios. Elimine ou transfira esses repositórios primeiro. users.still_has_org=Este utilizador é membro de uma organização. Remova, primeiro, o utilizador de todas as organizações. users.deletion_success=A conta de utilizador foi eliminada. +users.reset_2fa=Reinicializar 2FA emails.email_manage_panel=Gestão de endereços de email do utilizador emails.primary=Principal @@ -2136,13 +2383,15 @@ repos.forks=Derivações repos.issues=Questões repos.size=Tamanho -hooks.desc=Os automatismos web fazem pedidos HTTP POST automaticamente a um servidor quando são despoletados determinados eventos do Gitea. Os automatismos web definidos aqui são os padrões e serão copiados para todos os novos repositórios. Leia mais no guia de automatismos web. -hooks.add_webhook=Adicionar automatismo web padrão -hooks.update_webhook=Modificar automatismo web padrão +defaulthooks=Automatismos web padrão +defaulthooks.desc=Os automatismos web fazem pedidos HTTP POST automaticamente a um servidor quando são despoletados determinados eventos do Gitea. Os automatismos web definidos aqui são os padrões e serão copiados para todos os novos repositórios. Leia mais no guia de automatismos web. +defaulthooks.add_webhook=Adicionar automatismo web padrão +defaulthooks.update_webhook=Modificar automatismo web padrão -systemhooks.desc=Os automatismos web fazem pedidos HTTP POST automaticamente a um servidor quando são despoletados determinados eventos do Gitea. Os automatismos web definidos irão operar em todos os repositórios deste sistema, por isso tenha em consideração quaisquer implicações de desempenho que isso possa ter. Leia mais no guia de automatismos web. +systemhooks=Automatismos web do sistema +systemhooks.desc=Os automatismos web fazem pedidos HTTP POST automaticamente a um servidor quando são despoletados determinados eventos do Gitea. Os automatismos web definidos aqui irão operar em todos os repositórios deste sistema, por isso tenha em consideração quaisquer implicações de desempenho que isso possa ter. Leia mais no guia de automatismos web. systemhooks.add_webhook=Adicionar automatismo web do sistema -systemhooks.update_webhook=Modificar automatismo do sistema +systemhooks.update_webhook=Modificar automatismo web do sistema auths.auth_manage_panel=Gestão das fontes de autenticação auths.new=Adicionar fonte de autenticação @@ -2159,7 +2408,6 @@ auths.host=Servidor auths.port=Porto auths.bind_dn=Vincular DN auths.bind_password=Vincular senha -auths.bind_password_helper=Atenção: Esta senha é armazenada em texto simples. Use uma conta só de leitura, se possível. auths.user_base=Base de pesquisa de utilizador auths.user_dn=DN do utilizador auths.attribute_username=Atributo do nome de utilizador @@ -2176,7 +2424,7 @@ auths.filter=Filtro de utilizador auths.admin_filter=Filtro de administrador auths.restricted_filter=Filtro restrito auths.restricted_filter_helper=Deixe em branco para não definir quaisquer utilizadores como restritos. Use um asterisco ('*') para definir todos os utilizadores que não correspondam ao filtro de administrador como restritos. -auths.verify_group_membership=Verificar afiliação ao grupo no LDAP +auths.verify_group_membership=Validar afiliação ao grupo no LDAP auths.group_search_base=Base DN para a pesquisa de grupos auths.valid_groups_filter=Filtro de grupos válidos auths.group_attribute_list_users=Atributo de grupo que contém a lista de utilizadores @@ -2187,10 +2435,16 @@ auths.smtphost=Servidor SMTP auths.smtpport=Porto do SMTP auths.allowed_domains=Domínios permitidos auths.allowed_domains_helper=Deixe em branco para permitir todos os domínios. Separe múltiplos domínios com uma vírgula (','). -auths.enable_tls=Habilitar encriptação TLS -auths.skip_tls_verify=Ignorar verificação TLS +auths.skip_tls_verify=Ignorar validação TLS +auths.force_smtps=Forçar SMTPS +auths.force_smtps_helper=SMTPS é usado sempre no porto 465. Defina um valor para forçar o SMTPS a usar outros portos (caso contrário será usado STARTTLS noutros portos, se for suportado pelo servidor). +auths.helo_hostname=Nome de servidor HELO +auths.helo_hostname_helper=Nome de servidor a ser enviado com HELO. Deixe em branco para enviar o nome de servidor vigente. +auths.disable_helo=Desabilitar HELO auths.pam_service_name=Nome do Serviço PAM +auths.pam_email_domain=Domínio de email do PAM (opcional) auths.oauth2_provider=Fornecedor OAuth2 +auths.oauth2_icon_url=URL do ícone auths.oauth2_clientID=ID do cliente (chave) auths.oauth2_clientSecret=Segredo do cliente auths.openIdConnectAutoDiscoveryURL=URL de descoberta automática de conexão do OpenID @@ -2199,6 +2453,7 @@ auths.oauth2_tokenURL=URL do código auths.oauth2_authURL=URL da autorização auths.oauth2_profileURL=URL do perfil auths.oauth2_emailURL=URL do email +auths.oauth2_tenant=Locatário auths.enable_auto_register=Habilitar o registo automático auths.sspi_auto_create_users=Criar utilizadores automaticamente auths.sspi_auto_create_users_helper=Permitir que o método de autenticação SSPI crie, automaticamente, novas contas para utilizadores que iniciam a sessão pela primeira vez @@ -2288,6 +2543,7 @@ config.db_path=Caminho config.service_config=Configuração do serviço config.register_email_confirm=Exigir confirmação de email para se inscrever config.disable_register=Desabilitar a auto-inscrição +config.allow_only_internal_registration=Permitir registo somente através do próprio Gitea config.allow_only_external_registration=Permitir a inscrição somente por meio de serviços externos config.enable_openid_signup=Habilitar a auto-inscrição com OpenID config.enable_openid_signin=Habilitar início de sessão com OpenID @@ -2304,13 +2560,13 @@ config.enable_timetracking=Habilitar a contagem de tempo config.default_enable_timetracking=Habilitar, por norma, a contagem do tempo config.default_allow_only_contributors_to_track_time=Permitir a contagem de tempo somente aos contribuidores config.no_reply_address=Domínio dos emails ocultos -config.default_visibility_organization=Visibilidade padrão para as novas organizações +config.default_visibility_organization=Visibilidade predefinida para as novas organizações config.default_enable_dependencies=Habilitar, por norma, dependências nas questões config.webhook_config=Configuração do automatismo web config.queue_length=Tamanho da fila config.deliver_timeout=Prazo da entrega -config.skip_tls_verify=Ignorar verificação TLS +config.skip_tls_verify=Ignorar validação TLS config.mailer_config=Configuração da aplicação SMTP config.mailer_enabled=Habilitado @@ -2324,7 +2580,7 @@ config.mailer_sendmail_args=Argumentos extras para o sendmail config.mailer_sendmail_timeout=Tempo limite do Sendmail config.test_email_placeholder=Email (ex.: teste@exemplo.com) config.send_test_mail=Enviar email de teste -config.test_mail_failed=Ocorreu uma falha ao enviar um email de teste para '%s': %v +config.test_mail_failed=Falhou o envio de um email de teste para '%s': %v config.test_mail_sent=Foi enviado um email de teste para '%s'. config.oauth_config=Configuração OAuth @@ -2359,12 +2615,11 @@ config.git_gc_args=Argumentos da recolha de lixo config.git_migrate_timeout=Prazo da migração config.git_mirror_timeout=Tempo limite do espelhamento config.git_clone_timeout=Prazo da operação de clonagem -config.git_pull_timeout=Prazo da operação de receber +config.git_pull_timeout=Prazo da operação de puxar config.git_gc_timeout=Prazo da operação de recolha de lixo config.log_config=Configuração do registo config.log_mode=Modo de registo -config.macaron_log_mode=Modo de registo Macaron config.own_named_logger=Registador nomeado config.routes_to_default_logger=Encaminha para o registador padrão config.go_log=Usa o registo do Go (reencaminhado para o padrão) @@ -2470,7 +2725,7 @@ comment_issue=`comentou na questão %s#%[2]s` comment_pull=`comentou no pedido de integração %s#%[2]s` merge_pull_request=`executou a integração constante no pedido %s#%[2]s` transfer_repo=transferiu o repositório %s para %s -push_tag=enviou a etiqueta %[2]s para %[3]s +push_tag=enviou a etiqueta %[4]s para %[3]s delete_tag=eliminou a etiqueta %[2]de %[3]s delete_branch=eliminou o ramo %[2]s de %[3]s compare_branch=Comparar @@ -2480,8 +2735,11 @@ mirror_sync_push=sincronizou cometimentos para %[3]s%[2]s para %[3]s do espelho mirror_sync_delete=sincronizou e eliminou a referência %[2]s em %[3]s do ficheiro approve_pull_request=`aprovou %s#%[2]s` -reject_pull_request=`sugeriu alterações para %s#%[2]s` +reject_pull_request=`sugeriu modificações para %s#%[2]s` publish_release=`lançou "%[4]s" à %[3]s` +review_dismissed=`descartou a revisão de %[4]s para %[3]s#%[2]s` +review_dismissed_reason=Motivo: +create_branch=criou o ramo %[3]s em %[4] [tool] ago=há %s @@ -2506,8 +2764,8 @@ raw_seconds=segundos raw_minutes=minutos [dropzone] -default_message=Largue os ficheiros aqui ou clique aqui para os enviar. -invalid_input_type=Não pode enviar ficheiros deste tipo. +default_message=Largue os ficheiros aqui ou clique aqui para os carregar. +invalid_input_type=Não pode carregar ficheiros deste tipo. file_too_big=O tamanho do ficheiro ({{filesize}} MB) excede o tamanho máximo de ({{maxFilesize}} MB). remove_file=Remover ficheiro @@ -2530,8 +2788,8 @@ error.no_committer_account=Não existe qualquer conta ligada ao endereço de ema error.no_gpg_keys_found=Não foi encontrada uma chave conhecida para esta assinatura, na base de dados error.not_signed_commit=Não é um cometimento assinado error.failed_retrieval_gpg_keys=Falhou ao obter uma chave ligada à conta de quem cometeu -error.probable_bad_signature=AVISO! Embora exista uma chave com este ID na base de dados, ela não verifica este cometimento! Este cometimento é SUSPEITO. -error.probable_bad_default_signature=AVISO! Embora a chave padrão tenha este ID, ela não verifica este cometimento! Este cometimento é SUSPEITO. +error.probable_bad_signature=AVISO! Embora exista uma chave com este ID na base de dados, ela não valida este cometimento! Este cometimento é SUSPEITO. +error.probable_bad_default_signature=AVISO! Embora a chave padrão tenha este ID, ela não valida este cometimento! Este cometimento é SUSPEITO. [units] error.no_unit_allowed_repo=Não tem permissão para aceder a nenhuma parte deste repositório. diff --git a/options/locale/locale_ru-RU.ini b/options/locale/locale_ru-RU.ini index 26521cf13..3bb6a8bce 100644 --- a/options/locale/locale_ru-RU.ini +++ b/options/locale/locale_ru-RU.ini @@ -15,6 +15,7 @@ page=Страница template=Шаблон language=Язык notifications=Уведомления +active_stopwatch=Трекер рабочего времени create_new=Создать… user_profile_and_more=Профиль и настройки... signed_in_as=Вы вошли как @@ -75,23 +76,32 @@ pull_requests=Pull Request'ы issues=Задачи milestones=Этапы +ok=ОК cancel=Отмена save=Сохранить add=Добавить add_all=Добавить все remove=Удалить remove_all=Удалить все +edit=Изменить write=Редактирование preview=Предпросмотр loading=Загрузка… +step1=Шаг 1: +step2=Шаг 2: +error=Ошибка error404=Страница, которую вы пытаетесь открыть, либо не существует, либо вы не авторизованы для ее просмотра. +never=Никогда + [error] occurred=Произошла ошибка report_message=Если вы уверены, что это ошибка Gitea, пожалуйста, проверьте наличие существующей проблемы на GitHub и откройте новую при необходимости. +missing_csrf=Некорректный запрос: CSRF токен отсутствует +invalid_csrf=Неверный запрос: неверный CSRF токен [startpage] app_desc=Удобный сервис собственного хостинга репозиториев Git @@ -102,7 +112,7 @@ platform_desc=Gitea работает на любой операционной с lightweight=Легковесный lightweight_desc=Gitea имеет низкие системные требования и может работать на недорогом Raspberry Pi. Экономьте энергию вашей машины! license=Открытый исходный код -license_desc=Всё это на code.gitea.io/gitea! Присоединяйтесь к нам, внося вклад, чтобы сделать этот проект еще лучше. Не бойтесь помогать! +license_desc=Всё это на code.gitea.io/gitea! Присоединяйтесь к нам, внося вклад, чтобы сделать этот проект ещё лучше. Не бойтесь помогать! [install] install=Установка @@ -201,6 +211,8 @@ default_enable_timetracking=Включение отслеживания врем default_enable_timetracking_popup=Включить отслеживание времени для новых репозиториев по умолчанию. no_reply_address=Скрытый почтовый домен no_reply_address_helper=Доменное имя для пользователей со скрытым адресом электронной почты. Например, имя пользователя 'joe' будет зарегистрировано в Git как 'joe@noreply.example.org' если скрытый домен электронной почты установлен как 'noreply.example.org'. +password_algorithm=Алгоритм хеширования пароля +password_algorithm_helper=Задайте алгоритм хеширования паролей. Алгоритмы имеют различные требования и стойкость. У алгоритма `argon2` хорошие характеристики, но он использует много памяти и может не подходить для слабых систем. [home] uname_holder=Имя пользователя / Адрес эл. почты @@ -214,6 +226,7 @@ my_mirrors=Мои зеркала view_home=Показать %s search_repos=Поиск репозитория… filter=Другие фильтры +filter_by_team_repositories=Фильтровать по репозиториям команды show_archived=Архивировано show_both_archived_unarchived=Показаны архивированные и разархивированные @@ -233,6 +246,8 @@ users=Пользователи organizations=Организации search=Поиск code=Код +search.fuzzy=Неточный +search.match=Соответствие repo_no_results=Подходящие репозитории не найдены. user_no_results=Подходящие пользователи не найдены. org_no_results=Подходящие организации не найдены. @@ -246,6 +261,7 @@ register_helper_msg=Уже есть аккаунт? Авторизуйтесь! social_register_helper_msg=Уже есть аккаунт? Свяжите его сейчас! disable_register_prompt=Извините, возможность регистрации отключена. Пожалуйста, свяжитесь с администратором сайта. disable_register_mail=Подтверждение регистрации по электронной почте отключено. +remember_me=Запомнить это устройство forgot_password_title=Забыл пароль forgot_password=Забыли пароль? sign_up_now=Нужен аккаунт? Зарегистрируйтесь. @@ -278,6 +294,7 @@ twofa_scratch_token_incorrect=Неверный scratch-код. login_userpass=Вход login_openid=OpenID oauth_signup_tab=Зарегистрировать новый аккаунт +oauth_signup_title=Полная новая учётная запись oauth_signup_submit=Полная учётная запись oauth_signin_tab=Ссылка на существующую учётную запись oauth_signin_title=Войдите, чтобы авторизовать связанную учётную запись @@ -288,7 +305,8 @@ openid_connect_desc=Выбранный OpenID URI неизвестен. Свяж openid_register_title=Создать новый аккаунт openid_register_desc=Выбранный OpenID URI неизвестен. Свяжите с новой учетной записью здесь. openid_signin_desc=Введите свой OpenID URI. Например: https://anne.me, bob.openid.org.cn или gnusocial.net/carry. -disable_forgot_password_mail=Восстановление аккаунта отключено. Пожалуйста, свяжитесь с администратором сайта. +disable_forgot_password_mail=Восстановление учётной записи отключено, потому что электронная почта не настроена. Пожалуйста, свяжитесь с администратором сайта. +disable_forgot_password_mail_admin=Восстановление учетной записи доступно только при настройке электронной почты. Пожалуйста, настройте электронную почту, чтобы включить восстановление аккаунта. email_domain_blacklisted=С данным адресом электронной почты регистрация невозможна. authorize_application=Авторизация приложения authorize_redirect_notice=Вы будете перенаправлены на %s, если вы авторизуете это приложение. @@ -302,11 +320,63 @@ password_pwned=Выбранный вами пароль находится в %s
    , + activate_account=Пожалуйста активируйте свой аккаунт +activate_account.title=%s, пожалуйста, активируйте вашу учетную запись +activate_account.text_1=Привет, %[1]s, спасибо за регистрацию в %[2]s! +activate_account.text_2=Пожалуйста, перейдите по ссылке, чтобы активировать свою учетную запись в течение %s: + activate_email=Подтвердите адрес своей электронной почты -reset_password=Восстановить учётную запись -register_success=Регистрация прошла успешно +activate_email.title=%s, пожалуйста, подтвердите ваш адрес электронной почты +activate_email.text=Пожалуйста, перейдите по ссылке, чтобы подтвердить ваш адрес электронной почты в течение %s: + register_notify=Добро пожаловать на Gitea +register_notify.title=%[1], добро пожаловать в %[2] +register_notify.text_1=это письмо с вашим подтверждением регистрации в %s! +register_notify.text_2=Теперь вы можете войти через логин: %s. +register_notify.text_3=Если эта учетная запись была создана для вас, пожалуйста, сначала установите пароль. + +reset_password=Восстановить учётную запись +reset_password.title=%s, вы запросили восстановление вашей учетной записи +reset_password.text=Пожалуйста, перейдите по ссылке, чтобы восстановить учетную запись в течение %s: + +register_success=Регистрация прошла успешно + +issue_assigned.pull=@%[1] назначил вам запрос на слияние %[2] в репозитории %[3]. +issue_assigned.issue=@%[1]s назначил вам задачу %[2]s в репозитории %[3]s. + +issue.x_mentioned_you=@%s упомянул вас: +issue.action.force_push=%[1]s форсировал отправку изменений %[2]s с %[3]s до %[4]s. +issue.action.push_n=@%[1]s отправил %[3]d изменений %[2]s +issue.action.close=@%[1]s закрыты #%[2]d. +issue.action.reopen=@%[1]s переоткрыты #%[2]d. +issue.action.merge=@%[1]s слиты #%[2]d в %[3]s. +issue.action.approve=@%[1]s одобрил этот запрос на слияние. +issue.action.reject=@%[1]s запросил изменения в этом запросе на слияние. +issue.action.review=@%[1]s прокомментировал этот запрос на слияние. +issue.action.review_dismissed=@%[1]s отклонил последний отзыв с %[2]s для этого запроса на слияние. +issue.action.ready_for_review=@%[1]s отметил этот запрос на слияние как готовый к рассмотрению. +issue.action.new=@%[1]s создал #%[2]d. +issue.in_tree_path=В %s: + +release.new.subject=%s в %s выпущено +release.new.text=@%[1]s выпустил релиз %[2]s в %[3]s +release.title=Название: %s +release.note=Примечание: +release.downloads=Загрузки: +release.download.zip=Исходный код (ZIP) +release.download.targz=Исходный код (TAR.GZ) + +repo.transfer.subject_to=%s хочет передать "%s" в %s +repo.transfer.subject_to_you=%s хочет передать "%s" вам +repo.transfer.to_you=вам +repo.transfer.body=Для того чтобы принять или отклонить перейдите по ссылке %s или просто проигнорируйте данный запрос. + +repo.collaborator.added.subject=%s добавил вас в %s +repo.collaborator.added.text=Вы были добавлены в качестве соавтора репозитория: [modal] yes=Да @@ -347,12 +417,14 @@ email_error=`не является адресом электронной поч url_error=` не является допустимым URL-адресом.` include_error=` должен содержать '%s'.` glob_pattern_error=` неверный glob шаблон: %s.` +regex_pattern_error=` Неверный шаблон регулярного выражения: %s.` unknown_error=Неизвестная ошибка: captcha_incorrect=Капча не пройдена. password_not_match=Пароли не совпадают. lang_select_error=Выберите язык из списка. username_been_taken=Имя пользователя уже занято. +username_change_not_local_user=Нелокальным пользователям запрещено изменять их имя пользователя. repo_name_been_taken=Название репозитория уже используется. repository_files_already_exist=Файлы уже существуют для этого репозитория. Обратитесь к системному администратору. repository_files_already_exist.adopt=Файлы уже существуют для этого репозитория и могут быть только приняты. @@ -364,6 +436,7 @@ org_name_been_taken=Название организации уже занято. team_name_been_taken=Название команды уже занято. team_no_units_error=Разрешите доступ хотя бы к одному разделу репозитория. email_been_used=Этот адрес электронной почты уже используется. +email_invalid=Недопустимый адрес электронной почты. openid_been_used=Адрес OpenID '%s' уже используется. username_password_incorrect=Неверное имя пользователя или пароль. password_complexity=Пароль не удовлетворяет требованиям к сложности: @@ -372,6 +445,7 @@ password_uppercase_one=Как минимум один заглавный сим password_digit_one=По крайней мере одна цифра password_special_one=По крайней мере один специальный символ (знаки пунктуации, скобки, кавычки и т. д.) enterred_invalid_repo_name=Введённое вами название репозитория неверно. +enterred_invalid_org_name=Введенное вам название организации некоррктно. enterred_invalid_owner_name=Имя нового владельца недоступно. enterred_invalid_password=Введенный пароль неверный. user_not_exist=Пользователь не существует. @@ -381,6 +455,7 @@ cannot_add_org_to_team=Организацию нельзя добавить в invalid_ssh_key=Не удается проверить SSH ключ: %s invalid_gpg_key=Не удается проверить GPG ключ: %s +invalid_ssh_principal=Неверный участник: %s unable_verify_ssh_key=Не удается проверить ключ SSH; дважды проверьте его на наличие ошибок. auth_failed=Ошибка аутентификации: %v @@ -391,12 +466,13 @@ org_still_own_repo=Эта организация по-прежнему влад target_branch_not_exist=Целевая ветка не существует [user] -change_avatar=Измените свой авататар… +change_avatar=Изменить свой аватар… join_on=Присоединился(-ась) repositories=Репозитории activity=Активность followers=Подписчики starred=Избранные репозитории +watched=Отслеживаемые репозитории projects=Проекты following=Подписки follow=Подписаться @@ -436,9 +512,11 @@ website=Веб-сайт location=Местоположение update_theme=Обновить тему update_profile=Обновить профиль +update_language_not_found=Язык '%s' недоступен. update_profile_success=Ваш профиль успешно обновлен. change_username=Ваше имя пользователя было изменено. change_username_prompt=Примечание: изменения имени пользователя также изменяют URL-адрес учетной записи. +change_username_redirect_prompt=Старое имя пользователя будет перенаправлено до тех пор, пока оно не будет введено. continue=Далее cancel=Отмена language=Язык @@ -499,32 +577,54 @@ keep_email_private_popup=Ваш адрес электронной почты б openid_desc=OpenID позволяет делегировать проверку подлинности внешнему поставщику. manage_ssh_keys=Управление SSH ключами +manage_ssh_principals=Управление SSH сертификатами участников manage_gpg_keys=Управление GPG ключами add_key=Добавить ключ ssh_desc=Эти открытые SSH ключи связаны с вашей учетной записью. Соответствующие закрытые ключи обеспечивают полный доступ к вашим хранилищам. +principal_desc=Эти SSH сертификаты указаны в вашем аккаунте и разрешают полный доступ к вашим хранилищам. gpg_desc=Эти открытые GPG ключи связаны с вашей учетной записью. Храните закрытые ключи в безопасности, так как они позволяют проверять подлинности коммитов. ssh_helper=Нужна помощь? Ознакомьтесь с руководством GitHub по созданию SSH ключей или решению возникающих проблем при использовании SSH. gpg_helper=Нужна помощь? Взгляните на руководство GitHub по GPG. add_new_key=Добавить SSH ключ add_new_gpg_key=Добавить GPG ключ -key_content_ssh_placeholder=Начинается с 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', или 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=Начинается с 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', или 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=Начинается с '-----BEGIN PGP PUBLIC KEY BLOCK-----' +add_new_principal=Добавить участника ssh_key_been_used=Этот SSH ключ уже был добавлен на сервер. +ssh_key_name_used=SSH ключ с этим именем уже есть в вашем аккаунте. +ssh_principal_been_used=Участник уже был добавлен на сервер. gpg_key_id_used=Публичный GPG ключ с таким же идентификатором уже существует. -gpg_no_key_email_found=Этот ключ GPG не может использоваться с любым адресом электронной почты, привязанной к вашей учетной записи. +gpg_no_key_email_found=Этот GPG ключ не соответствует ни одному активному адресу электронной почты, связанному с вашей учетной записью. Он по-прежнему может быть добавлен, если вы подписали указанный токен. +gpg_key_matched_identities=Соответствующие идентификаторы: +gpg_key_verified=Проверенный ключ +gpg_key_verified_long=Ключ был проверен токеном и может быть использован для проверки коммитов, соответствующих любым активным адресом электронной почты этого пользователя в дополнение к любым соответствующим идентификаторам этого ключа. +gpg_key_verify=Проверить +gpg_invalid_token_signature=Предоставленный GPG ключ, подпись и токен не совпадают или токен устарел. +gpg_token_required=Вы должны предоставить подпись для токена ниже +gpg_token=Токен +gpg_token_help=Вы можете сгенерировать подпись с помощью: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature=Бронированная GPG подпись +key_signature_gpg_placeholder=Начинается с '-----BEGIN PGP SIGNATURE-----' +verify_gpg_key_success=GPG ключ '%s' проверен. subkeys=Подключи key_id=ИД ключа key_name=Имя ключа key_content=Содержимое +principal_content=Содержимое add_key_success=SSH ключ '%s' добавлен. add_gpg_key_success=GPG ключ '%s' добавлен. +add_principal_success=Был добавлен SSH сертификат пользователя '%s'. delete_key=Удалить ssh_key_deletion=Удалить SSH ключ gpg_key_deletion=Удалить GPG ключ +ssh_principal_deletion=Удалить SSH сертификат участника ssh_key_deletion_desc=Удаление SSH ключа аннулирует его доступ к вашей учетной записи. Продолжить? gpg_key_deletion_desc=Удаление GPG ключа отменяет проверку подписанных им коммитов. Продолжить? +ssh_principal_deletion_desc=Удаление SSH сертификата удалит доступ к вашему аккаунту. Продолжить? ssh_key_deletion_success=SSH ключ был удален. gpg_key_deletion_success=GPG ключ был удален. +ssh_principal_deletion_success=Участник был удалён. add_on=Добавлено valid_until=Действителен до valid_forever=Действителен навсегда @@ -534,9 +634,11 @@ can_read_info=Чтение can_write_info=Запись key_state_desc=Этот ключ использовался в течение последних 7 дней token_state_desc=Этот токен использовался в течение последних 7 дней +principal_state_desc=Участник был тут в последние 7 дней show_openid=Показывать в профиле hide_openid=Скрыть из профиля ssh_disabled=SSH отключён +ssh_externally_managed=Этот SSH ключ управляется извне для этого пользователя manage_social=Управление привязанными учетными записями в соцсетях social_desc=Эти социальные сети связаны с вашим аккаунтом Gitea. Их можно использовать для входа в учетную запись Gitea, поэтому необходимо быть уверенным в том, что никаких посторонних аккаунтов не подключено. unbind=Удалить связь @@ -603,6 +705,7 @@ or_enter_secret=Или введите кодовое слово: %s then_enter_passcode=И введите пароль, показанный в приложении: passcode_invalid=Неверный пароль. попробуйте снова. twofa_enrolled=Для вашего аккаунта была включена двухфакторная аутентификация. Сохраните ваш scratch-токен (%s), он будет показан только один раз! +twofa_failed_get_secret=Не удалось получить ключ. u2f_desc=Ключами безопасности являются аппаратные устройства, содержащие криптографические ключи. Они могут использоваться для двухфакторной аутентификации. Ключи безопасности должны поддерживать стандарт FIDO U2F. u2f_require_twofa=Для использования ключей безопасности ваша учетная запись должна использовать двухфакторную аутентификацию. @@ -624,6 +727,7 @@ repos_none=Вы не владеете репозиториями delete_account=Удалить свой аккаунт delete_prompt=Эта операция навсегда удалит вашу учетную запись. Это НЕВОЗМОЖНО будет отменить. +delete_with_all_comments=Ваша учетная запись младше %s. Чтобы избежать комментариев к плану, все комментарии к ней будут удалены. confirm_delete_account=Подтвердите удаление delete_account_title=Удалить аккаунт delete_account_desc=Вы уверены, что хотите навсегда удалить этот аккаунт? @@ -633,8 +737,18 @@ email_notifications.onmention=Посылать письмо на эл. почт email_notifications.disable=Отключить почтовые уведомления email_notifications.submit=Установить настройки электронной почты +visibility=Видимость пользователя +visibility.public=Публичный +visibility.public_tooltip=Видимый для всех пользователей +visibility.limited=Ограниченный +visibility.limited_tooltip=Видимый только авторизованным пользователям +visibility.private=Приватный +visibility.private_tooltip=Видимый только членам организации + [repo] +new_repo_helper=Репозиторий содержит все файлы проекта, включая историю ревизии. Уже есть где-то еще? Мигрировать репозиторий. owner=Владелец +owner_helper=Некоторые организации могут не отображаться в раскрывающемся списке из-за максимального ограничения количества репозиториев. repo_name=Название репозитория repo_name_helper=Лучшие названия репозиториев состоят из коротких, легко запоминаемых и уникальных ключевых слов. repo_size=Размер репозитория @@ -655,26 +769,43 @@ use_template=Использовать этот шаблон generate_repo=Создать репозиторий generate_from=Создать из repo_desc=Описание +repo_desc_helper=Добавьте краткое описание (необязательно) repo_lang=Язык repo_gitignore_helper=Выберите шаблон .gitignore. +repo_gitignore_helper_desc=Выберите из списка шаблонов для популярных языков , какие файлы не надо отслеживать. По умолчанию в .gitignore включены типичные артефакты, создаваемые инструментами сборки каждого языка. issue_labels=Метки задач issue_labels_helper=Выберите набор ярлыков задачи. license=Лицензия license_helper=Выберите файл лицензии. +license_helper_desc=Лицензия определяет, что другие люди могут, а что не могут делать с вашим кодом. Не уверены, какая лицензия подходит для вашего проекта? Смотрите Выберите лицензию. readme=README readme_helper=Выберите шаблон README. +readme_helper_desc=Это место, где вы можете написать подробное описание вашего проекта. auto_init=Инициализировать репозиторий (Добавляет .gitignore, LICENSE and README) +trust_model_helper=Выберите модель доверия для проверки подписи. Возможные варианты: +trust_model_helper_collaborator=Соавтор: Подписи доверия от соавторов +trust_model_helper_committer=Участник: доверенные подписи участников +trust_model_helper_collaborator_committer=Соавтор+Коммитер: Доверять подписи соавторам, которые соответствуют коммитеру +trust_model_helper_default=По умолчанию: используйте модель доверия по умолчанию для этой установки create_repo=Создать репозиторий default_branch=Ветка по умолчанию +default_branch_helper=Ветка по умолчанию является базовой веткой для pull request'ов и коммитов кода. mirror_prune=Очистить mirror_prune_desc=Удаление устаревших отслеживаемых ссылок mirror_interval=Интервал зеркалирования (допустимые единицы измерения 'h', 'm', 's'). Значение 0 отключает синхронизацию. mirror_interval_invalid=Недопустимый интервал зеркалирования. mirror_address=Клонировать по URL -mirror_address_desc=Поместите все необходимые учётные данные в раздел Авторизация клона. +mirror_address_desc=Поместите необходимые учетные данные в секцию авторизации. mirror_address_url_invalid=Указанный url неверный. Вы должны правильно экранировать все компоненты url. mirror_address_protocol_invalid=Указанный url неверный. Только http(s):// или git:// местоположения могут быть зеркалированы. +mirror_lfs=Хранилище больших файлов (LFS) +mirror_lfs_desc=Активировать зеркалирование данных LFS. +mirror_lfs_endpoint=LFS Endpoint +mirror_lfs_endpoint_desc=Sync попытается использовать URL-адрес клона для определения сервера LFS. Вы также можете указать пользовательскую конечную точку, если данные хранится где-то в хранилище. mirror_last_synced=Последняя синхронизация +mirror_password_placeholder=(Неизменный) +mirror_password_blank_placeholder=(Отменено) +mirror_password_help=Смените имя пользователя для удаления пароля. watchers=Наблюдатели stargazers=Звездочеты forks=Форки @@ -691,6 +822,14 @@ delete_preexisting_label=Удалить delete_preexisting=Удалить уже существующие файлы delete_preexisting_content=Удалить файлы из %s delete_preexisting_success=Удалены непринятые файлы в %s +blame_prior=Посмотреть авторство до этих изменений + +transfer.accept=Принять трансфер +transfer.accept_desc=Переместить в "%s" +transfer.reject=Отказаться от перемещения +transfer.reject_desc=Отменить перемещение в "%s" +transfer.no_permission_to_accept=Недостаточно прав чтобы принять +transfer.no_permission_to_reject=Недостаточно прав чтобы отказать desc.private=Приватный desc.public=Публичный @@ -715,15 +854,21 @@ archive.title=Это архивный репозиторий. Вы можете archive.issue.nocomment=Этот репозиторий в архиве. Вы не можете комментировать задачи. archive.pull.nocomment=Это архивный репозиторий. Вы не можете комментировать запросы на слияние. -form.reach_limit_of_creation=Вы уже достигли ваш предел %d репозиториев. +form.reach_limit_of_creation_1=Вы уже достигли вашего лимита в %d репозитории. +form.reach_limit_of_creation_n=Вы уже достигли ваш предел %d репозиториев. form.name_reserved=Название репозитория '%s' зарезервировано. form.name_pattern_not_allowed=Шаблон имени репозитория '%s' не допускается. -need_auth=Требуется авторизация +need_auth=Авторизация migrate_options=Параметры миграции migrate_service=Сервис миграции migrate_options_mirror_helper=Этот репозиторий будет зеркалом migrate_options_mirror_disabled=Администратор вашего сайта отключил новые зеркала. +migrate_options_lfs=Перенос LFS файлов +migrate_options_lfs_endpoint.label=LFS Endpoint +migrate_options_lfs_endpoint.description=Миграция попытается использовать ваш Git удаленно, чтобы определить сервер LFS. Вы также можете указать пользовательскую конечную точку, если данные хранится где-то в хранилище. +migrate_options_lfs_endpoint.description.local=Поддерживается также путь на локальном сервере. +migrate_options_lfs_endpoint.placeholder=Оставьте пустым для получения из клонируемого URL migrate_items=Элементы миграции migrate_items_wiki=Вики migrate_items_milestones=Этапы @@ -737,18 +882,25 @@ migrate.clone_address=Перенос / Клонирование по URL migrate.clone_address_desc=Это может быть HTTP/HTTPS/GIT адрес или локальный путь существующего репозитория на сервере. migrate.clone_local_path=или путь к локальному серверу migrate.permission_denied=У вас нет прав на импорт локальных репозиториев. +migrate.permission_denied_blocked=Вам не разрешено импортировать с заблокированных узлов. +migrate.permission_denied_private_ip=Вы не можете импортировать с приватных IP. migrate.invalid_local_path=Недопустимый локальный путь. Возможно он не существует или не является папкой. +migrate.invalid_lfs_endpoint=Конечная точка LFS недействительна. migrate.failed=Миграция не удалась: %v -migrate.lfs_mirror_unsupported=Зеркалирование LFS объектов не поддерживается - используйте 'git lfs fetch --all' и 'git lfs push --all' вручную. migrate.migrate_items_options=Токен доступа необходим для миграции дополнительных элементов migrated_from=Перенесено с %[2]s migrated_from_fake=Перенесено с %[1]s migrate.migrate=Миграция из %s migrate.migrating=Перенос из %s... migrate.migrating_failed=Перенос из %s не удался. -migrate.github.description=Миграция данных с Github.com или Github Enterprise. -migrate.git.description=Миграция или зеркалирование данных git из служб Git -migrate.gitlab.description=Миграция данных с GitLab.com или сервера Self-Hosted gitlab. +migrate.migrating_failed.error=Ошибка: %s +migrate.migrating_git=Перенос Git данных +migrate.migrating_topics=Миграция тем +migrate.migrating_milestones=Миграция этапов +migrate.migrating_labels=Миграция меток +migrate.migrating_releases=Миграция релизов +migrate.migrating_issues=Миграция Замечаний +migrate.migrating_pulls=Миграция Pull Request mirror_from=зеркало из forked_from=форкнуто от @@ -781,6 +933,7 @@ branch=ветка tree=Дерево clear_ref=`Удалить текущую ссылку` filter_branch_and_tag=Фильтр по ветке или тегу +find_tag=Найти тег branches=Ветки tags=Теги issues=Задачи @@ -793,9 +946,14 @@ org_labels_desc_manage=управлять milestones=Этапы commits=коммитов commit=коммит +release=Релиз releases=Релизы +tag=Тег +released_this=выпустил(-а) это file_raw=Исходник file_history=История +file_view_source=Просмотреть исходный код +file_view_rendered=Просмотр отрендеренного file_view_raw=Посмотреть исходник file_permalink=Постоянная ссылка file_too_large=Этот файл слишком большой, поэтому он не может быть отображён. @@ -804,6 +962,8 @@ audio_not_supported_in_browser=Ваш браузер не поддерживае stored_lfs=Хранится Git LFS symbolic_link=Символическая ссылка commit_graph=Граф коммитов +commit_graph.select=Выбрать ветку +commit_graph.hide_pr_refs=Скрыть Pull Requests commit_graph.monochrome=Моно commit_graph.color=Цвет blame=Вина @@ -835,6 +995,7 @@ editor.add=Создал(а) '%s' editor.update=Изменил(а) на '%s' editor.delete=Удалить '%s' editor.commit_message_desc=Добавьте необязательное расширенное описание… +editor.signoff_desc=Добавить Signed-off-by коммитом в конце сообщения журнала коммитов. editor.commit_directly_to_this_branch=Сделайте коммит прямо в ветку %s. editor.create_new_branch=Создайте новую ветку для этого коммита, и сделайте Pull Request. editor.create_new_branch_np=Создать новую ветку для этого коммита. @@ -855,11 +1016,15 @@ editor.file_already_exists=Файл с именем '%s' уже существу editor.commit_empty_file_header=Закоммитить пустой файл editor.commit_empty_file_text=Файл, который в коммите, пуст. Продолжить? editor.no_changes_to_show=Нет изменений. +editor.fail_to_update_file=Ошибка обновления/создания файла '%s'. +editor.fail_to_update_file_summary=Ошибка: editor.push_rejected_no_message=Сервер отклонил изменение без сообщения. Пожалуйста, проверьте githooks. +editor.push_rejected=Изменение отклонено сервером. Пожалуйста, проверьте гит-хуки. +editor.push_rejected_summary=Ошибка отказа полностью: editor.add_subdir=Добавить каталог… -editor.unable_to_upload_files=Не удалось загрузить файлы в «%s» из-за ошибки: %v +editor.unable_to_upload_files=Не удалось загрузить файлы в '%s' из-за ошибки: %v editor.upload_file_is_locked=Файл '%s' заблокирован %s. -editor.upload_files_to_dir=Загрузить файлы '%s' +editor.upload_files_to_dir=Загрузил(а) файлы в '%s' editor.cannot_commit_to_protected_branch=Нельзя коммитить в защищённую ветку '%s'. editor.no_commit_to_branch=Невозможно совершить прямой коммит в ветку по причине: editor.user_no_push_to_branch=Пользователь не может отправлять коммиты в эту ветку @@ -886,7 +1051,9 @@ ext_issues=Внешние задачи ext_issues.desc=Ссылка на внешнюю систему отслеживания ошибок. projects=Проекты -projects.desc=Управление задачами и pull'ами в проектных досках. +projects.desc=Управление задачами и pull'ами в досках проекта. +projects.description=Описание (необязательно) +projects.description_placeholder=Описание projects.create=Создать проект projects.title=Заголовок projects.new=Новый проект @@ -910,6 +1077,8 @@ projects.board.edit_title=Новое имя доски projects.board.new_title=Название новой доски projects.board.new_submit=Отправить projects.board.new=Новая доска +projects.board.set_default=Установить по умолчанию +projects.board.set_default_desc=Установить эту доску по умолчанию для неклассифицированных задач и pull-ов projects.board.delete=Удалить доску projects.board.deletion_desc=Удаление доски проектов перемещает все связанные задачи в 'Без категории'. Продолжить? projects.open=Открыть @@ -960,6 +1129,11 @@ issues.label_templates.info=Меток пока не существует. Со issues.label_templates.helper=Выберите метку issues.label_templates.use=Использовать набор меток issues.label_templates.fail_to_load_file=Не удалось загрузить файл шаблона метки «%s»: %v +issues.add_label=добавлен %s с меткой %s +issues.add_labels=добавлен %s с метками %s +issues.remove_label=удалён %s с меткой %s +issues.remove_labels=удалён %s с метками %s +issues.add_remove_labels=добавлен %s и удалён %s с метками %s issues.add_milestone_at=`добавил(а) к этапу %s %s` issues.add_project_at=`добавил в %s проект %s` issues.change_milestone_at=`поменял целевой этап с %s на %s %s` @@ -988,6 +1162,7 @@ issues.filter_type.all_issues=Все задачи issues.filter_type.assigned_to_you=Назначено вам issues.filter_type.created_by_you=Созданные вами issues.filter_type.mentioning_you=Вы упомянуты +issues.filter_type.review_requested=Проверка запрошена issues.filter_sort=Сортировать issues.filter_sort.latest=Новейшие issues.filter_sort.oldest=Старейшие @@ -1009,7 +1184,10 @@ issues.action_milestone_no_select=Нет этапа issues.action_assignee=Ответственный issues.action_assignee_no_select=Нет ответственного issues.opened_by=открыта %[1]s %[3]s +pulls.merged_by=на %[3]s мигрированных %[1]s +pulls.merged_by_fake=%[2]s мигрировал %[1]s issues.closed_by=на %[3]s закрытых %[1]s +issues.opened_by_fake=%[2]s открыл(а) %[1]s issues.closed_by_fake=%[2]s закрыл(а) %[1]s issues.previous=Предыдущая страница issues.next=Следующая страница @@ -1020,11 +1198,13 @@ issues.commented_at=`прокомментировал %s` issues.delete_comment_confirm=Вы уверены, что хотите удалить этот комментарий? issues.context.copy_link=Копировать ссылку issues.context.quote_reply=Цитировать ответ +issues.context.reference_issue=Ссылка в новой проблеме issues.context.edit=Редактировать issues.context.delete=Удалить issues.no_content=Пока нет содержимого. issues.close_issue=Закрыть -issues.pull_merged_at=`Объединил коммит %[2]s на %[3]s %[4]s` +issues.pull_merged_at=`Объединил коммит %[2]s в %[3]s %[4]s` +issues.manually_pull_merged_at=`%[4]s вручную объединил коммит %[2]s в %[3]s` issues.close_comment_issue=Прокомментировать и закрыть issues.reopen_issue=Открыть снова issues.reopen_comment_issue=Прокомментировать и открыть снова @@ -1046,6 +1226,8 @@ issues.re_request_review=Повторить запрос на отзыв issues.is_stale=Со времени этого обзора в этот PR были внесены некоторые изменения issues.remove_request_review=Удалить запрос на отзыв issues.remove_request_review_block=Невозможно удалить запрос на отзыв +issues.dismiss_review=Отклонить отзыв +issues.dismiss_review_warning=Вы уверены, что хотите отклонить эту рецензию? issues.sign_in_require_desc=Войдите, чтобы присоединиться к обсуждению. issues.edit=Изменить issues.cancel=Отмена @@ -1090,13 +1272,17 @@ issues.lock.title=Ограничить обсуждение данной зад issues.unlock.title=Снять ограничение обсуждения данной задачи. issues.comment_on_locked=Вы не можете оставить комментарий по задаче, ограниченной для обсуждения. issues.tracker=Отслеживание времени -issues.start_tracking_short=Начать +issues.start_tracking_short=Запустить таймер issues.start_tracking=Начать отслеживание времени issues.start_tracking_history=`начал(а) работать %s` issues.tracker_auto_close=Таймер будет остановлен автоматически, когда эта проблема будет закрыта -issues.stop_tracking=Остановить +issues.tracking_already_started=`Вы уже начали отслеживать время для другой задачи!` +issues.stop_tracking=Остановить таймер issues.stop_tracking_history=`перестал работать %s` +issues.cancel_tracking=Отмена +issues.cancel_tracking_history=`отменил отслеживание %s` issues.add_time=Вручную добавить время +issues.del_time=Удалить этот журнал времени issues.add_time_short=Добавить время issues.add_time_cancel=Отмена issues.add_time_history=`добавил(а) к затраченному времени %s` @@ -1104,8 +1290,6 @@ issues.del_time_history=`удалил потраченное время %s` issues.add_time_hours=Часы issues.add_time_minutes=Минуты issues.add_time_sum_to_small=Время не было введено. -issues.cancel_tracking=Отмена -issues.cancel_tracking_history=`отменил отслеживание %s` issues.time_spent_total=Общее затраченное время issues.time_spent_from_all_authors=`Общее затраченное время: %s` issues.due_date=Срок выполнения @@ -1114,7 +1298,7 @@ issues.error_modifying_due_date=Не удалось изменить срок в issues.error_removing_due_date=Не удалось убрать срок выполнения. issues.push_commit_1=добавил(а) %d коммит %s issues.push_commits_n=добавил(а) %d коммитов %s -issues.force_push_codes=`Принудительный push %[1]s ветки из %[2]s to %[4]s. %[6]s` +issues.force_push_codes=`принудительно залито %[1]s от %[2] к %[4]s %[6]s` issues.due_date_form=гггг-мм-дд issues.due_date_form_add=Добавить срок выполнения issues.due_date_form_edit=Редактировать @@ -1122,7 +1306,7 @@ issues.due_date_form_remove=Удалить issues.due_date_not_writer=Для обновления срока выполнения необходим доступ на запись в репозиторий. issues.due_date_not_set=Срок выполнения не установлен. issues.due_date_added=добавлено в срок выполнения %s %s -issues.due_date_modified=срок изменён c %s %s на %s +issues.due_date_modified=срок выполнения изменён на %s с %s %s issues.due_date_remove=удалён срок выполнения %s %s issues.due_date_overdue=Просроченные issues.due_date_invalid=Срок действия недействителен или находится за пределами допустимого диапазона. Пожалуйста, используйте формат 'гггг-мм-дд'. @@ -1135,8 +1319,6 @@ issues.dependency.remove=Удалить issues.dependency.remove_info=Удалить эту зависимость issues.dependency.added_dependency=`добавить новую зависимость %s` issues.dependency.removed_dependency=`убрал зависимость %s` -issues.dependency.issue_closing_blockedby=Закрытие этого запроса на слияние невозможно до закрытия следующих задач -issues.dependency.pr_closing_blockedby=Закрытие этой задачи блокируется следующими задачами issues.dependency.issue_close_blocks=Эта задача блокирует закрытие следующих задач issues.dependency.pr_close_blocks=Этот запрос на слияние блокирует закрытие следующих задач issues.dependency.issue_close_blocked=Вам необходимо закрыть все задачи, блокирующие эту задачу, прежде чем вы сможете её закрыть. @@ -1157,6 +1339,8 @@ issues.review.self.approval=Вы не можете одобрить собств issues.review.self.rejection=Невозможно запрашивать изменения своего Pull Request'а. issues.review.approve=одобрил(а) эти изменения %s issues.review.comment=рассмотрел(а) изменения %s +issues.review.dismissed=отклонен отзыв %s %s +issues.review.dismissed_label=Отклонено issues.review.left_comment=оставил комментарий issues.review.content.empty=Запрашивая изменения, вы обязаны оставить комментарий с пояснением своих пожеланий относительно Pull Request'а. issues.review.reject=запросил(а) изменения %s @@ -1167,6 +1351,7 @@ issues.review.remove_review_request_self=отказано в отзыве %s issues.review.pending=Ожидание issues.review.review=Рецензия issues.review.reviewers=Рецензенты +issues.review.outdated=Устаревшее issues.review.show_outdated=Показать устаревшие issues.review.hide_outdated=Скрыть устаревшие issues.review.show_resolved=Показать разрешенные @@ -1175,6 +1360,10 @@ issues.review.resolve_conversation=Покинуть диалог issues.review.un_resolve_conversation=Незавершённый разговор issues.review.resolved_by=пометить этот разговор как разрешённый issues.assignee.error=Не все назначения были добавлены из-за непредвиденной ошибки. +issues.reference_issue.body=Тело + +compare.compare_base=Основа +compare.compare_head=сравнить pulls.desc=Включить запросы на слияние и проверки кода. pulls.new=Новый Pull Request @@ -1185,6 +1374,7 @@ pulls.compare_compare=взять из pulls.filter_branch=Фильтр по ветке pulls.no_results=Результатов не найдено. pulls.nothing_to_compare=Нечего сравнивать, родительская и текущая ветка одинаковые. +pulls.nothing_to_compare_and_allow_empty_pr=Ветки идентичны. Этот PR будет пустым. pulls.has_pull_request=`Уже существует запрос на слияние между двумя целями: %[2]s#%[3]d` pulls.create=Создать Pull Request pulls.title_desc=хочет смерджить %[1]d коммит(ов) из %[2]s в %[3]s @@ -1197,19 +1387,27 @@ pulls.reopen_to_merge=Пожалуйста, переоткройте этот Pu pulls.cant_reopen_deleted_branch=Этот запрос на слияние не может быть открыт заново, потому что ветка была удалена. pulls.merged=Слито pulls.merged_as=Pull Request был объединен как %[2]s. +pulls.manually_merged=Слито вручную +pulls.manually_merged_as=Pull request был объединён вручную, как %[2]s. pulls.is_closed=Слияние этого запроса успешно завершено. pulls.has_merged=Слияние этого запроса успешно завершено. pulls.title_wip_desc=`Добавьте %s в начало заголовка для защиты от случайного досрочного принятия Pull Request'а.` -pulls.cannot_merge_work_in_progress=Данный Pull Request помечен как находящийся ещё в разработке. Удалите %s из названия после завершения работы над ним +pulls.cannot_merge_work_in_progress=Этот запрос на слияние помечен как в процессе работы. +pulls.still_in_progress=Всё ещё в процессе? +pulls.add_prefix=Добавить %s префикс +pulls.remove_prefix=Удалить %s префикс pulls.data_broken=Содержимое этого запроса было нарушено вследствие удаления информации форка. pulls.files_conflicted=Этот Pull Request имеет изменения, конфликтующие с целевой веткой. pulls.is_checking=Продолжается проверка конфликтов, пожалуйста обновите страницу несколько позже. +pulls.is_empty=Ветвь идентична с целевой. pulls.required_status_check_failed=Некоторые необходимые проверки не были пройдены. pulls.required_status_check_missing=Отсутствуют некоторые обязательные проверки. pulls.required_status_check_administrator=Как администратор, вы все равно можете cмержить этот PR. pulls.blocked_by_approvals=Этому Pull Request'у не хватает одобрений. Получено %d из %d одобрений. pulls.blocked_by_rejection=Официальным проверяющим были запрошены изменения для этого запроса на слияние. +pulls.blocked_by_official_review_requests=Этот Pull Request содержит официальные запросы на проверку. pulls.blocked_by_outdated_branch=Этот Pull Request заблокирован, потому что он устарел. +pulls.blocked_by_changed_protected_files_1=Этот Pull Request заблокирован, потому что он изменяет защищенный файл: pulls.blocked_by_changed_protected_files_n=Этот Pull Request заблокирован, потому что он изменяет защищенные файлы: pulls.can_auto_merge_desc=Этот Pull Request может быть объединён автоматически. pulls.cannot_auto_merge_desc=Этот запрос на слияние не может быть объединён автоматически. @@ -1222,21 +1420,26 @@ pulls.reject_count_1=%d запрос на изменение pulls.reject_count_n=%d запросов на изменение pulls.waiting_count_1=%d ожидает проверки pulls.waiting_count_n=%d ожидающих отзывов +pulls.wrong_commit_id=id фиксации должен быть идентификатором фиксации в целевой ветке pulls.no_merge_desc=Pull Request не может быть принят, так как отключены все настройки слияния. pulls.no_merge_helper=Включите опции слияния в настройках репозитория или совершите слияние Pull Request'а вручную. pulls.no_merge_wip=Данный Pull Request не может быть принят, поскольку он помечен как находящийся в разработке. pulls.no_merge_not_ready=Этот запрос не готов к слиянию, обратите внимания на ревью и проверки. pulls.no_merge_access=У вас нет права для слияния данного запроса. -pulls.merge_pull_request=Принять Pull Request -pulls.rebase_merge_pull_request=Выполнить rebase и принять PR -pulls.rebase_merge_commit_pull_request=Выполнить rebase и принять PR (--no-ff) -pulls.squash_merge_pull_request=Объединить и принять PR +pulls.merge_manually=Слито вручную +pulls.merge_commit_id=ID коммита слияния pulls.require_signed_wont_sign=Данная ветка ожидает подписанные коммиты, однако слияние не будет подписано pulls.invalid_merge_option=Этот параметр слияния нельзя использовать для этого Pull Request'а. +pulls.merge_conflict=Слияние не удалось: Произошел конфликт во время слияния. Совет: попробуйте другую стратегию +pulls.merge_conflict_summary=Сообщение об ошибке +pulls.rebase_conflict=Слияние не удалось: Произошел конфликт во время слияния: %[1]s. Совет: попробуйте другую стратегию +pulls.rebase_conflict_summary=Сообщение об ошибке ; %[2]s
    %[3]s
    pulls.unrelated_histories=Слияние не удалось: У источника и цели слияния нет общей истории. Совет: попробуйте другую стратегию pulls.merge_out_of_date=Ошибка слияния: при создании слияния база данных была обновлена. Подсказка: попробуйте ещё раз. +pulls.push_rejected=Слияние не удалось: push был отклонён. Просмотрите githooks для этого репозитория. +pulls.push_rejected_summary=Полная ошибка отклонения pulls.push_rejected_no_message=Слияние не удалось: отправка была отклонена, но сообщение не было удалено.
    Просмотрите githooks для этого репозитория pulls.open_unmerged_pull_exists=`Вы не можете снова открыть, поскольку уже существует запрос на слияние (#%d) из того же репозитория с той же информацией о слиянии и ожидающий слияния.` pulls.status_checking=Выполняются некоторые проверки @@ -1252,7 +1455,10 @@ pulls.update_not_allowed=У вас недостаточно прав для об pulls.outdated_with_base_branch=Эта ветка отстает от базовой ветки pulls.closed_at=`закрыл этот запрос на слияние %[2]s` pulls.reopened_at=`переоткрыл этот запрос на слияние %[2]s` +pulls.merge_instruction_hint=`Вы также можете просмотреть инструкции командной строки.` +pulls.merge_instruction_step1_desc=В репозитории вашего проекта посмотрите новую ветку и протестируйте изменения. +pulls.merge_instruction_step2_desc=Объединить изменения и обновить на Gitea. milestones.new=Новый этап milestones.open_tab=%d открыто(ы) @@ -1356,7 +1562,7 @@ activity.closed_issues_count_1=Закрытая задача activity.closed_issues_count_n=Закрытых задач activity.title.issues_1=%d Задача activity.title.issues_n=%d Задач -activity.title.issues_closed_by=%s закрыто %s +activity.title.issues_closed_from=%s закрыто %s activity.title.issues_created_by=%s создано %s activity.closed_issue_label=Закрыто activity.new_issues_count_1=Новая задача @@ -1394,6 +1600,8 @@ activity.git_stats_deletion_n=%d удалений search=Поиск search.search_repo=Поиск по репозиторию +search.fuzzy=Неточный +search.match=Соответствие search.results=Результаты поиска "%s" в %s settings=Настройки @@ -1409,6 +1617,15 @@ settings.hooks=Веб-хуки settings.githooks=Git Hook'и settings.basic_settings=Основные параметры settings.mirror_settings=Настройки зеркалирования +settings.mirror_settings.docs=Настройте свой проект, чтобы автоматически отправлять и/или получать изменения из другого репозитория. Ветки, теги и коммиты будут синхронизированы автоматически. Как мне зеркалировать репозитории? +settings.mirror_settings.mirrored_repository=Синхронизированное хранилище +settings.mirror_settings.direction=Направление +settings.mirror_settings.direction.pull=Отправка +settings.mirror_settings.direction.push=Получение +settings.mirror_settings.last_update=Последнее обновление +settings.mirror_settings.push_mirror.none=Push-зеркало не добавлено +settings.mirror_settings.push_mirror.remote_url=URL удалённого хранилища +settings.mirror_settings.push_mirror.add=Добавить Push-зеркало settings.sync_mirror=Синхронизировать settings.mirror_sync_in_progress=Синхронизируются репозитории-зеркала. Подождите минуту и обновите страницу. settings.email_notifications.enable=Включить почтовые уведомления @@ -1417,6 +1634,7 @@ settings.email_notifications.disable=Отключить почтовые уве settings.email_notifications.submit=Установить настройки электронной почты settings.site=Сайт settings.update_settings=Обновить настройки +settings.branches.update_default_branch=Обновить ветку по умолчанию settings.advanced_settings=Расширенные настройки settings.wiki_desc=Включить Вики для репозитория settings.use_internal_wiki=Использовать встроенную вики-систему @@ -1444,6 +1662,9 @@ settings.pulls.allow_merge_commits=Разрешить коммиты слиян settings.pulls.allow_rebase_merge=Разрешить rebase-слияние settings.pulls.allow_rebase_merge_commit=Разрешить rebase с явным коммитом слияния (--no-ff) settings.pulls.allow_squash_commits=Разрешить объединять коммиты перед слиянием (squash) +settings.pulls.allow_manual_merge=Пометить PR как слитый вручную +settings.pulls.enable_autodetect_manual_merge=Включить автоопределение ручного слияния (Примечание: в некоторых особых случаях могут возникнуть ошибки) +settings.pulls.default_delete_branch_after_merge=Удалить ветку Pull Request после слияния по умолчанию settings.projects_desc=Включить проекты репозитория settings.admin_settings=Настройки администратора settings.admin_enable_health_check=Выполнять проверки целостности этого репозитория (git fsck) @@ -1461,10 +1682,21 @@ settings.convert_fork_notices_1=Эта операция преобразует settings.convert_fork_confirm=Преобразовать Репозиторий settings.convert_fork_succeed=Форк был преобразован в обычный репозиторий. settings.transfer=Передать права собственности +settings.transfer.rejected=Трансфер репозитория отменён. +settings.transfer.success=Трансфер репозитория успешно выполнен. +settings.transfer_abort=Отменить трансфер +settings.transfer_abort_invalid=Невозможно отменить трансфер несуществующего репозитория. +settings.transfer_abort_success=Трансфер репозитория в %s успешно отменён. settings.transfer_desc=Передать репозиторий другому пользователю или организации где у вас есть права администратора. +settings.transfer_form_title=Введите сопутствующую информацию для подтверждения операции: +settings.transfer_in_progress=Трансфер в процессе выполнения. Отмените его, если желаете выполнить трансфер другому пользователю. settings.transfer_notices_1=- Вы можете потерять доступ, если новый владелец является отдельным пользователем. settings.transfer_notices_2=- Вы сохраните доступ, если новым владельцем станет организация, владельцем которой вы являетесь. -settings.transfer_form_title=Введите сопутствующую информацию для подтверждения операции: +settings.transfer_notices_3=- если репозиторий является приватным и передается отдельному пользователю, это действие позволяет убедиться, что пользователь имеет хотя бы права на чтение (и при необходимости изменяет права доступа). +settings.transfer_owner=Новый владелец +settings.transfer_perform=Выполнить трансфер +settings.transfer_started=Репозиторий ожидает подтверждения трансфера от "%s" +settings.transfer_succeed=Репозиторий перенесён. settings.signing_settings=Настройки подписи верификации settings.trust_model=Модель доверия подписи settings.trust_model.default=Модель доверия по умолчанию @@ -1474,6 +1706,7 @@ settings.trust_model.collaborator.long=Соавтор: Подписи довер settings.trust_model.collaborator.desc=Допустимые подписи соавторов этого репозитория будут помечены как "доверенные" - (если они соответствуют коммиту или нет). В противном случае, правильные подписи будут помечены как "ненадёжные", если подпись соответствует коммиту и "не совпадает", если нет. settings.trust_model.committer=Коммитер settings.trust_model.committer.long=Коммитер: Доверять подписям, соответствующим коммитерам (Это совпадает с GitHub и заставит подписать коммиты Gitea в качестве коммитера) +settings.trust_model.committer.desc=Допустимые подписи будут помечены "доверенными" только если они соответствуют коммитеру, в противном случае они будут помечены "недоверенными". Это заставит Gitea быть коммитером подписанных коммитов вместе с фактическим коммитером, обозначенным как Co-Authored-By: и Co-Committed-By: прикреплён в этом коммите. Ключ Gitea по умолчанию должен совпадать с пользователем в базе данных. settings.trust_model.collaboratorcommitter=Соавтор+Коммитер settings.trust_model.collaboratorcommitter.long=Соавтор+Коммитер: Доверять подписи соавторам, которые соответствуют коммитеру settings.trust_model.collaboratorcommitter.desc=Допустимые подписи соавторов этого репозитория будут помечены "доверенными", если они соответствуют коммиту. В противном случае, правильные подписи будут помечены как "недоверенными", если подпись соответствует коммиту и не совпадает. Это заставит Gitea быть отмеченным в качестве ответственного за подписание коммитеров с фактическим коммитером, обозначенным как Co-Authored-By: и Co-Committed-By: прикреплённым для выполнения этого коммита. По умолчанию ключ Gitea должен совпадать с пользователем в базе данных. @@ -1489,9 +1722,6 @@ settings.delete_notices_2=- Эта операция навсегда удали settings.delete_notices_fork_1=- Все форки станут независимыми репозиториями после удаления. settings.deletion_success=Репозиторий удалён. settings.update_settings_success=Настройки репозитория обновлены. -settings.transfer_owner=Новый владелец -settings.make_transfer=Выполнить передачу -settings.transfer_succeed=Репозиторий перенесён. settings.confirm_delete=Удалить репозиторий settings.add_collaborator=Добавить соавтора settings.add_collaborator_success=Соавтор добавлен. @@ -1586,7 +1816,7 @@ settings.event_pull_request_review_desc=Запрос на слияние утв settings.event_pull_request_sync=Синхронизация Pull Request settings.event_pull_request_sync_desc=Запрос на слияние синхронизирован. settings.branch_filter=Фильтр веток -settings.branch_filter_desc=Белый список ветвей для событий Push, создания ветвей и удаления ветвей, указанных в виде глобуса. Если пусто или *, сообщается о событиях для всех филиалов. Смотрите github.com/gobwas/glob документацию по синтаксису. Примеры: master, {master,release*}. +settings.branch_filter_desc=Белый список ветвей для событий Push, создания ветвей и удаления ветвей, указанных в виде глоб-шаблона. Если пустой или *, то все событий для всех ветвей будут зарегистрированы. Перейдите по ссылке github.com/gobwas/glob на документацию по синтаксису. Примеры: master, {master,release*}. settings.active=Активный settings.active_helper=Информация о происходящих событиях будет отправляться на URL-адрес этого вебхука. settings.add_hook_success=Вебхук был добавлен. @@ -1656,7 +1886,7 @@ settings.dismiss_stale_approvals_desc=Когда новые коммиты, из settings.require_signed_commits=Требовать подписанные коммиты settings.require_signed_commits_desc=Отклонить push'ы в эту ветку, если они не подписаны или не проверены. settings.protect_protected_file_patterns=Защищённые шаблоны файлов (разделённые через '\;'): -settings.protect_protected_file_patterns_desc=Защищенные файлы, которые не могут быть изменены напрямую, даже если пользователь имеет право добавлять, редактировать или удалять файлы в этой ветке. Несколько шаблонов могут быть разделены точкой с запятой ('\;'). Смотрите github.com/gobwas/glob документацию для синтаксиса шаблонов. Например: .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns_desc=Защищенные файлы, которые не могут быть изменены напрямую, даже если пользователь имеет право добавлять, редактировать или удалять файлы в этой ветке. Шаблоны могут быть разделены точкой с запятой ('\;'). Смотрите github.com/gobwas/glob документацию для синтаксиса шаблонов. Например: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Включить защиту settings.delete_protected_branch=Отключить защиту settings.update_protect_branch_success=Настройки защиты ветки '%s' были успешно изменены. @@ -1665,13 +1895,26 @@ settings.protected_branch_deletion=Отключение защиты ветки settings.protected_branch_deletion_desc=Любой пользователь с разрешениями на запись сможет выполнять push в эту ветку. Вы уверены? settings.block_rejected_reviews=Блокировка слияния по отклоненным отзывам settings.block_rejected_reviews_desc=Слияние будет не возможным, если будут запрошены официальными рецензентами изменения, даже если имеется достаточное количество одобрений. +settings.block_on_official_review_requests=Блокировать слияние при запросах на официальное рассмотрение +settings.block_on_official_review_requests_desc=Слияние невозможно, если не имеется достаточное количество одобрений официальных представителей. settings.block_outdated_branch=Блокировать слияние, если pull request устарел settings.block_outdated_branch_desc=Слияние будет невозможно, если головная ветвь находится позади базовой ветви. settings.default_branch_desc=Главная ветка является "базовой" для вашего репозитория, на которую по умолчанию направлены все Pull Request'ы и которая является лицом вашего репозитория. Первое, что увидит посетитель — это содержимое главной ветки. Выберите её из уже существующих: +settings.default_merge_style_desc=Стиль слияния по умолчанию: settings.choose_branch=Выберите ветку… settings.no_protected_branch=Нет защищённых веток. settings.edit_protected_branch=Редактировать settings.protected_branch_required_approvals_min=Число необходимых одобрений не может быть отрицательным. +settings.tags=Теги +settings.tags.protection=Защита тегов +settings.tags.protection.pattern=Шаблон тегов +settings.tags.protection.allowed=Разрешено +settings.tags.protection.allowed.users=Разрешенные пользователи +settings.tags.protection.allowed.teams=Разрешенные команды +settings.tags.protection.allowed.noone=Ни один +settings.tags.protection.create=Защитить тег +settings.tags.protection.none=Нет защищенных тегов. +settings.tags.protection.pattern.description=Вы можете использовать одно имя или глоб-шаблон или регулярное выражение, для выбора нескольких тегов. Подробнее о защищенных тэгах. settings.bot_token=Токен для бота settings.chat_id=ID чата settings.matrix.homeserver_url=URL домашнего сервера @@ -1685,6 +1928,7 @@ settings.archive.success=Репозиторий был успешно архив settings.archive.error=Ошибка при попытке архивировать репозиторий. Смотрите логи для получения подробностей. settings.archive.error_ismirror=Вы не можете поместить зеркалируемый репозиторий в архив. settings.archive.branchsettings_unavailable=Настройки ветки недоступны, если репозиторий архивирован. +settings.archive.tagsettings_unavailable=Настройки тегов недоступны, если репозиторий архивирован. settings.unarchive.button=Разархивировать settings.unarchive.header=Разархивировать этот репозиторий settings.unarchive.text=Разархивация восстанавливает возможность совершать push в репозиторий, создавать новые коммиты, задачи и запросы на слияние. @@ -1734,7 +1978,9 @@ diff.whitespace_ignore_all_whitespace=Игнорировать пробелы п diff.whitespace_ignore_amount_changes=Игнорировать изменения количества пробелов diff.whitespace_ignore_at_eol=Игнорировать изменения в пробельных символах на концах строк diff.stats_desc= %d изменённых файлов: %d добавлений и %d удалений +diff.stats_desc_file=%d изменений: %d дополнений и %d удалений diff.bin=Двоичные данные +diff.bin_not_shown=Двоичный файл не отображается. diff.view_file=Просмотреть файл diff.file_before=До diff.file_after=После @@ -1742,6 +1988,7 @@ diff.file_image_width=Ширина diff.file_image_height=Высота diff.file_byte_size=Размер diff.file_suppressed=Разница между файлами не показана из-за своего большого размера +diff.file_suppressed_line_too_long=Различия файлов скрыты, потому что одна или несколько строк слишком длинны diff.too_many_files=Некоторые файлы не были показаны из-за большого количества измененных файлов diff.comment.placeholder=Оставить комментарий diff.comment.markdown_info=Поддерживается синтаксис Markdown. @@ -1756,13 +2003,20 @@ diff.review.comment=Комментировать diff.review.approve=Утвердить diff.review.reject=Запрос изменений diff.committed_by=коммит произвёл +diff.protected=Защищено +diff.image.side_by_side=Режим "рядом" +diff.image.swipe=Свайп +diff.image.overlay=Оверлей releases.desc=Релизы позволяют организовать хранение готовых сборок проекта в строгом хронологически верном порядке. release.releases=Релизы +release.detail=Детали релиза +release.tags=Теги release.new_release=Новый релиз release.draft=Черновик release.prerelease=Пре-релиз release.stable=Стабильный +release.compare=Сравнить release.edit=Редактировать release.ahead.commits=%d коммиты release.ahead.target=%s с этого релиза @@ -1781,12 +2035,20 @@ release.publish=Опубликовать релиз release.save_draft=Сохранить черновик release.edit_release=Редактировать релиз release.delete_release=Удалить этот релиз +release.delete_tag=Удалить тег release.deletion=Удаление релиза +release.deletion_desc=Будет удалён только релиз. Тег, содержимое хранилища и история не изменятся. Продолжить? release.deletion_success=Релиз был удалён. +release.deletion_tag_desc=Этот тег будет удалён из хранилища. Содержимое хранилища и история не изменятся. Продолжить? +release.deletion_tag_success=Тег был удалён. release.tag_name_already_exist=Релиз с этим именем метки уже существует. release.tag_name_invalid=Имя тега является не допустимым. +release.tag_name_protected=Имя тега защищено. +release.tag_already_exist=Этот тег уже используется. release.downloads=Загрузки release.download_count=Загрузки: %s +release.add_tag_msg=Использовать заголовок и содержимое релиза в качестве тега сообщения. +release.add_tag=Создать только тег branch.name=Имя ветки branch.search=Поиск веток @@ -1813,12 +2075,23 @@ branch.restore=Восстановить ветку '%s' branch.download=Скачать ветку '%s' branch.included_desc=Эта ветка является частью ветки по умолчанию branch.included=Включено +branch.create_new_branch=Создать ветку из ветви: +branch.confirm_create_branch=Создать ветку +branch.new_branch=Создать новую ветку +branch.new_branch_from=Создать новую ветку из '%s' + +tag.create_tag=Создать тег %s +tag.create_success=Тег '%s' был создан. topic.manage_topics=Редактировать тематические метки topic.done=Сохранить topic.count_prompt=Вы не можете выбрать более 25 тем topic.format_prompt=Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов. +error.csv.too_large=Не удается отобразить этот файл, потому что он слишком большой. +error.csv.unexpected=Не удается отобразить этот файл, потому что он содержит неожиданный символ в строке %d и столбце %d. +error.csv.invalid_field_count=Не удается отобразить этот файл, потому что он имеет неправильное количество полей в строке %d. + [org] org_name_holder=Название организации org_full_name_holder=Полное название организации @@ -1857,11 +2130,12 @@ settings.visibility.public=Публичный settings.visibility.limited=Ограничено (Видно только для авторизованных пользователей) settings.visibility.limited_shortname=Ограничить settings.visibility.private=Частный (Видимый только для участников организации) -settings.visibility.private_shortname=Приватизировать +settings.visibility.private_shortname=Приватный settings.update_settings=Обновить настройки settings.update_setting_success=Настройки организации обновлены. settings.change_orgname_prompt=Это изменение изменит ссылки на организацию. +settings.change_orgname_redirect_prompt=Старое имя будет перенаправлено до тех пор, пока оно не будет введено. settings.update_avatar_success=Аватар организации обновлён. settings.delete=Удалить организацию settings.delete_account=Удалить эту организацию @@ -1933,8 +2207,7 @@ dashboard=Панель users=Пользователи organizations=Организации repositories=Репозитории -hooks=Стандартные Веб-хуки -systemhooks=Системные вебхуки +hooks=Веб-хуки authentication=Авторизация emails=Адреса эл. почты пользователей config=Конфигурация @@ -1966,7 +2239,7 @@ dashboard.cron.error=Ошибка в задаче Cron: %s: %[3]s dashboard.cron.finished=Крон: %[1]s завершено dashboard.delete_inactive_accounts=Удалить все неактивированные учётные записи dashboard.delete_inactive_accounts.started=Удалить все запущенные задачи неактивированных аккаунтов. -dashboard.delete_repo_archives=Удаление всех архивов репозиториев +dashboard.delete_repo_archives=Удалить все архивы репозиториев (ZIP, TAR.GZ, и т.д..) dashboard.delete_repo_archives.started=Удаление всех архивов репозитория началось. dashboard.delete_missing_repos=Удалить все записи о репозиториях с отсутствующими файлами Git dashboard.delete_missing_repos.started=Задача по удалению всех репозиториев, в которых отсутствуют их git-файлы, начата. @@ -1980,9 +2253,12 @@ dashboard.update_migration_poster_id=Обновить ID плакатов миг dashboard.git_gc_repos=Выполнить сборку мусора для всех репозиториев dashboard.resync_all_sshkeys=Обновить файл '.ssh/authorized_keys' с SSH ключами Gitea. dashboard.resync_all_sshkeys.desc=(Не требуется для встроенного SSH сервера.) +dashboard.resync_all_sshprincipals=Обновите файл '.ssh/authorized_principals' SSH данными участника Gitea. +dashboard.resync_all_sshprincipals.desc=(Не требуется для встроенного SSH сервера.) dashboard.resync_all_hooks=Повторная синхронизация hook'ов pre-receive, update и post-receive во всех репозиториях. dashboard.reinit_missing_repos=Переинициализировать все отсутствующие Git репозитории, для которых существуют записи dashboard.sync_external_users=Синхронизировать данные внешних пользователей +dashboard.cleanup_hook_task_table=Очистить таблицу hook_task dashboard.server_uptime=Время непрерывной работы сервера dashboard.current_goroutine=Текущее количество Goroutines dashboard.current_memory_usage=Текущее использование памяти @@ -2012,6 +2288,8 @@ dashboard.total_gc_time=Итоговая задержка GC dashboard.total_gc_pause=Итоговая задержка GC dashboard.last_gc_pause=Последняя пауза сборщика мусора dashboard.gc_times=Количество сборок мусора +dashboard.delete_old_actions=Удалите все старые действия из базы данных +dashboard.delete_old_actions.started=Удалите все старые действия из запущенной базы данных. users.user_manage_panel=Панель управления пользователями users.new_account=Создать новый аккаунт @@ -2041,6 +2319,7 @@ users.prohibit_login=Этой учетной записи запрещён вх users.is_admin=У этой учетной записи есть права администратора users.is_restricted=Ограничен users.allow_git_hook=Эта учётная запись имеет разрешение на создание Git hook'ов +users.allow_git_hook_tooltip=Git Hooks выполняется как пользователь ОС с Gitea и будет иметь одинаковый уровень доступа к хосту. В результате пользователи с привилегией Git Hook могут получить доступ и модифицировать все репозитории Gitea, а также базу данных, используемую Gitea. Следовательно, они также могут получить привилегии администратора Gitea. users.allow_import_local=Пользователь имеет право импортировать локальные репозитории users.allow_create_organization=Эта учетная запись имеет разрешения на создание организаций users.update_profile=Обновить профиль учетной записи @@ -2048,6 +2327,7 @@ users.delete_account=Удалить эту учетную запись users.still_own_repo=На вашем аккаунте все еще остается один или более репозиториев, сначала вам нужно удалить или передать их. users.still_has_org=Эта учетная запись все еще является членом одной или более организаций. Для продолжения, покиньте или удалите организации. users.deletion_success=Учётная запись успешно удалена. +users.reset_2fa=Сброс 2FA emails.email_manage_panel=Управление эл. почтой пользователя emails.primary=Первичный @@ -2080,10 +2360,12 @@ repos.forks=Форки repos.issues=Задачи repos.size=Размер -hooks.desc=Вебхуки автоматически делают HTTP-POST запросы на сервер, когда вызываются определенные события Gitea. Вебхуки, определённые здесь, по умолчанию и будут скопированы во все новые репозитории. Подробнее читайте в руководстве по вебхукам. -hooks.add_webhook=Добавить стандартный Веб-хук -hooks.update_webhook=Обновить стандартный Веб-хук +defaulthooks=Стандартные Веб-хуки +defaulthooks.desc=Вебхуки автоматически делают HTTP-POST запросы на сервер, когда вызываются определенные события Gitea. Вебхуки, определённые здесь, по умолчанию и будут скопированы во все новые репозитории. Подробнее читайте в руководстве по вебхукам. +defaulthooks.add_webhook=Добавить стандартный Веб-хук +defaulthooks.update_webhook=Обновить стандартный Веб-хук +systemhooks=Системные вебхуки systemhooks.desc=Вебхуки автоматически делают HTTP-POST запросы на сервер, когда вызываются определённые события Gitea. Определённые вебхуки будут действовать на всех репозиториях системы, поэтому пожалуйста, учитывайте любые последствия для производительности. Подробнее читайте в руководстве по вебхукам. systemhooks.add_webhook=Добавить системный вебхук systemhooks.update_webhook=Обновить системный вебхук @@ -2103,7 +2385,6 @@ auths.host=Сервер auths.port=Порт auths.bind_dn=Bind DN auths.bind_password=Привязать пароль -auths.bind_password_helper=Предупреждение: этот пароль хранится в виде простого текста. Используйте учетную запись только для чтения, если это возможно. auths.user_base=База для поиска пользователя auths.user_dn=DN пользователя auths.attribute_username=Атрибут Username @@ -2131,10 +2412,11 @@ auths.smtphost=Узел SMTP auths.smtpport=SMTP-порт auths.allowed_domains=Разрешенные домены auths.allowed_domains_helper=Оставьте пустым, чтобы разрешить все домены. Разделите несколько доменов запятой (','). -auths.enable_tls=Включение шифрования TLS auths.skip_tls_verify=Пропустить проверку TLS auths.pam_service_name=Имя службы PAM +auths.pam_email_domain=Домен почты PAM (необязательно) auths.oauth2_provider=Поставщик OAuth2 +auths.oauth2_icon_url=URL иконки auths.oauth2_clientID=ID клиента (ключ) auths.oauth2_clientSecret=Клиентский ключ auths.openIdConnectAutoDiscoveryURL=OpenID Connect URL для автоматизации входа @@ -2170,6 +2452,7 @@ auths.tip.twitter=Перейдите на https://dev.twitter.com/apps, созд auths.tip.discord=Добавьте новое приложение на https://discordapp.com/developers/applications/me auths.tip.gitea=Зарегистрировать новое приложение OAuth2. Руководство можно найти на https://docs.gitea.io/ru-us/oauth2-provider/ auths.tip.yandex=Создайте новое приложение по адресу https://oauth.yandex.com/client/new. В разделе "API Яндекс.Паспорта" выберите следующие разрешения: "Доступ к адресу электронной почты", "Доступ к аватару пользователя" и "Доступ к имени пользователя, фамилии и полу" +auths.tip.mastodon=Введите пользовательский URL экземпляра для экземпляра mastodon, с которым вы хотите аутентифицироваться (или использовать его по умолчанию) auths.edit=Обновить параметры аутентификации auths.activated=Эта аутентификация активирована auths.new_success=Метод аутентификации '%s' был добавлен. @@ -2231,6 +2514,7 @@ config.db_path=Путь config.service_config=Сервисная конфигурация config.register_email_confirm=Требуется подтверждение по электронной почте config.disable_register=Отключить самостоятельную регистрацию +config.allow_only_internal_registration=Разрешить регистрацию только через Gitea config.allow_only_external_registration=Разрешить регистрацию только через сторонние сервисы config.enable_openid_signup=Включить cамостоятельную регистрацию OpenID config.enable_openid_signin=Включение входа через OpenID @@ -2307,7 +2591,6 @@ config.git_gc_timeout=Лимит времени сборки мусора config.log_config=Конфигурация журнала config.log_mode=Режим журналирования -config.macaron_log_mode=Режим журнала Macaron config.own_named_logger=Именованный журнал config.routes_to_default_logger=Маршруты в стандартный журнал config.go_log=Использует Go-журнал (перенаправлено в стандартный) @@ -2409,11 +2692,10 @@ reopen_issue=`переоткрыл(а) задачу %s#%[ create_pull_request=`создал(а) Pull Request %s#%[2]s` close_pull_request=`закрыл(а) Pull Request %s#%[2]s` reopen_pull_request=`переоткрыл(а) Pull Request %s#%[2]s` -comment_issue=`прокомментировал(а) вопрос %s#%[2]s` +comment_issue=`прокомментировал(а) задачу %s#%[2]s` comment_pull=`прокомментировал(а) запрос на слияние %s#%[2]s` merge_pull_request=`принял(а) Pull Request %s#%[2]s` transfer_repo=передал(а) репозиторий %s %s -push_tag=создал(а) тэг %[2]s в %[3]s delete_tag=удалил(а) тэг %[2]s из %[3]s delete_branch=удалил(а) ветку %[2]s из %[3]s compare_branch=Сравнить @@ -2425,6 +2707,9 @@ mirror_sync_delete=синхронизированные и удаленные с approve_pull_request=`утвердил(а) %s#%[2]s` reject_pull_request=`предложил(а) изменения для %s#%[2]s` publish_release=`выпущено "%[4]s" в %[3]s` +review_dismissed=`отклонил отзыв от %[4]s для %[3]s#%[2]s` +review_dismissed_reason=Причина: +create_branch=создана ветка в %[3]s в %[4]s [tool] ago=%s назад diff --git a/options/locale/locale_sr-SP.ini b/options/locale/locale_sr-SP.ini index a5402c3f4..45971b8f2 100644 --- a/options/locale/locale_sr-SP.ini +++ b/options/locale/locale_sr-SP.ini @@ -37,6 +37,7 @@ cancel=Откажи + [error] [startpage] @@ -86,9 +87,19 @@ has_unconfirmed_mail=Здраво, %s! Имате непотврђену адр resend_mail=Кликните овде да поново пошаљете писмо [mail] + activate_account=Молимо вас активирајте ваш налог + activate_email=Потврдите вашу адресу е-поште + + + + + + + + [modal] yes=Да no=Не @@ -190,6 +201,7 @@ delete_account=Уклоните ваш налог confirm_delete_account=Потврдите брисање + [repo] owner=Власник repo_name=Име спремишта @@ -210,6 +222,7 @@ forks=Огранци + migrate_repo=Мигрирајте спремиште migrate.permission_denied=Немате права на увезете локално спремиште. migrate.failed=Миграција није успела: %v @@ -331,6 +344,7 @@ issues.num_participants=%d учесника issues.attachment.open_tab=`Кликните "%s" да видите у новом прозору` issues.attachment.download=`Кликните да преузмете "%s"` + pulls.new=Нови захтев за спајање pulls.filter_branch=Филтер по грани pulls.no_results=Нема резултата. @@ -341,7 +355,6 @@ pulls.tab_commits=Комити pulls.merged=Спојено pulls.can_auto_merge_desc=Овај захтев за спајање може бити обављен аутоматски. -pulls.merge_pull_request=Обави спајање ; %[2]s
    %[3]s
    @@ -392,9 +405,9 @@ settings.tracker_issue_style.alphanumeric=Алфанумерично settings.danger_zone=Опасна зона settings.new_owner_has_same_repo=Нови власник већ има спремиште по истим називом. Молимо вас изаберите друго име. settings.transfer=Пренеси власништво +settings.transfer_owner=Нови власник settings.delete=Уклони ово спремиште settings.delete_notices_1=- Ова операција НЕЋЕ МОЧИ бити укинута. -settings.transfer_owner=Нови власник settings.add_webhook=Додај Webhook settings.webhook.test_delivery=Провери испоруку settings.webhook.request=Захтев @@ -450,6 +463,8 @@ release.downloads=Преузимања + + [org] org_name_holder=Име организације org_full_name_holder=Пун назив организације @@ -578,7 +593,6 @@ auths.smtp_auth=Тип SMTP аутентикације auths.smtphost=SMTP хост auths.smtpport=SMTP порт auths.allowed_domains=Дозвољени домени -auths.enable_tls=Омогући TLS шифровање auths.skip_tls_verify=Прескочи TLS проверу auths.pam_service_name=Назив PAM сервиса auths.enable_auto_register=Омогући аутоматску регистрацију diff --git a/options/locale/locale_sv-SE.ini b/options/locale/locale_sv-SE.ini index 992b22826..004af542c 100644 --- a/options/locale/locale_sv-SE.ini +++ b/options/locale/locale_sv-SE.ini @@ -89,6 +89,7 @@ loading=Laddar… error404=Sidan du försöker nå finns inte eller så har du inte behörighet att se den. + [error] occurred=Ett fel har inträffat report_message=Om du är säker på att detta är en Gitea bugg, vänligen sök efter ärende på GitHub och öppna nytt ärende om det behövs. @@ -246,6 +247,7 @@ register_helper_msg=Har du redan ett konto? Logga in nu! social_register_helper_msg=Har du redan ett konto? Länka det nu! disable_register_prompt=Registrering inaktiverad. Vänligen kontakta din sidadministratör. disable_register_mail=Bekräftelsemejl vid registrering är inaktiverad. +remember_me=Kom ihåg denna enhet forgot_password_title=Glömt lösenord forgot_password=Glömt lösenord? sign_up_now=Behöver du ett konto? Registrera nu. @@ -278,6 +280,7 @@ twofa_scratch_token_incorrect=Din skrapkod är ogiltlig. login_userpass=Logga in login_openid=OpenID oauth_signup_tab=Skapa nytt konto +oauth_signup_title=Slutför nytt konto oauth_signup_submit=Slutför kontot oauth_signin_tab=Länka till befintligt konto oauth_signin_title=Logga in för att godkänna länkat konto @@ -288,7 +291,6 @@ openid_connect_desc=Vald OpenID URI är okänd. Associera den med ett nytt konto openid_register_title=Skapa nytt konto openid_register_desc=Vald OpenID URI är okänd. Associera den med ett nytt konto här. openid_signin_desc=Ange din OpenID URI. Exempelvis: https://anne.me, bob.openid.org.cn eller gnusocial.net/carry. -disable_forgot_password_mail=Kontoåterställning är inaktiverat. Vänligen kontakta din webbplatsadministratör. email_domain_blacklisted=Du kan inte registrera dig med din e-postadress. authorize_application=Godkänn applikation authorize_redirect_notice=Du kommer att omdirigeras till %s om du auktoriserar denna applikation. @@ -302,12 +304,22 @@ password_pwned=Lösenordet du valde finns på en om GPG. add_new_key=Lägg till SSH-nyckel add_new_gpg_key=Lägg till GPG-nyckel -key_content_ssh_placeholder=Börjar med 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', eller 'ecdsa-sha2-nistp521' key_content_gpg_placeholder=Börjar med '-----BEGIN PGP PUBLIC KEY BLOCK-----' ssh_key_been_used=Denna SSH-nyckel har redan lagts till på servern. gpg_key_id_used=En publik GPG-nyckel med samma ID existerar redan. -gpg_no_key_email_found=Denna GPG-nyckel är inte brukbar med någon utav mejladresserna associerade med ditt konto. subkeys=Undernycklar key_id=Nyckel-ID key_name=Nyckelnamn @@ -633,6 +644,7 @@ email_notifications.onmention=Endast e-post vid omnämnanden email_notifications.disable=Inaktivera notiser via mejl email_notifications.submit=Ställ in e-post inställningar + [repo] owner=Ägare repo_name=Utvecklingskatalogens namn @@ -671,7 +683,6 @@ mirror_prune_desc=Ta bort förlegade fjärrföljande referenser mirror_interval=Intervall för spegling (giltiga enheter är 'h', 'm', 's'). 0 stänger av automatisk synkronisering. mirror_interval_invalid=Speglingsintervallen är inte giltig. mirror_address=Klona Från URL -mirror_address_desc=Fyll i alla nödvändiga uppgifter i avsnittet Klona Auktorisering. mirror_address_url_invalid=Den angivna webbadressen är ogiltig. Du måste "escapa" alla delar av webbadressen korrekt. mirror_address_protocol_invalid=Den angivna webbadressen är ogiltig. Endast http(s):// eller git:// platser går att spegla från. mirror_last_synced=Senaste Synkronisering @@ -687,6 +698,7 @@ delete_preexisting_label=Radera delete_preexisting=Ta bort befintliga filer delete_preexisting_content=Ta bort filer i %s + desc.private=Privat desc.public=Publik desc.private_template=Privat mall @@ -710,11 +722,9 @@ archive.title=Den här utvecklingskatalogen är arkiverad. Du kan se filer och k archive.issue.nocomment=Den här utvecklingskatalogen är arkiverad. Du kan inte kommentera ärenden. archive.pull.nocomment=Den här utvecklingskatalogen är arkiverad. Du kan inte kommentera på pull-förfrågningar. -form.reach_limit_of_creation=Du har redan nått gränsen av %d repos. form.name_reserved=Utvecklingskatalogsnamnet '%s' är reserverat. form.name_pattern_not_allowed=Mönstret '%s' är otillåtet i ett utvecklingskatalogsnamn. -need_auth=Klona Auktorisering migrate_options=Migrationsalternativ migrate_service=Migreringstjänst migrate_options_mirror_helper=Denna utvecklingskatalog kommer att vara en spegel @@ -734,16 +744,12 @@ migrate.clone_local_path=eller en lokal serversökväg migrate.permission_denied=Du får inte importera lokala repon. migrate.invalid_local_path=Ogiltig lokal sökväg. Den finns inte, eller är inte en katalog. migrate.failed=Migrering misslyckades: %v -migrate.lfs_mirror_unsupported=Spegling av LFS-objekt stöds ej. Använd 'git lfs fetch --all' och 'git lfs push -all' istället. migrate.migrate_items_options=Åtkomsttoken krävs för att migrera ytterligare objekt migrated_from=Migrerad från %[2]s migrated_from_fake=Migrerad från %[1]s migrate.migrate=Migrera från %s migrate.migrating=Migrerar från %s ... migrate.migrating_failed=Migrering från %s misslyckades. -migrate.github.description=Migrera data från Github.com eller Github Enterprise. -migrate.git.description=Migrera eller spegla git-data från Git-tjänster -migrate.gitlab.description=Migrera data från GitLab.com eller fristående gitlab-server. mirror_from=spegling av forked_from=forkad från @@ -823,7 +829,7 @@ editor.name_your_file=Namnge din fil… editor.filename_help=Lägg till en katalog genom att skriva dess namn följt utav en slash ('/'). Ta bort katalog genom att sudda i början utav fältet. editor.or=eller editor.cancel_lower=Avbryt -editor.commit_signed_changes=Commita signerade ändringar +editor.commit_signed_changes=Committa signerade ändringar editor.commit_changes=Checka in ändringar editor.add_tmpl=Lägg till '' editor.add=Lägg till '%s' @@ -850,6 +856,7 @@ editor.file_already_exists=En fil vid namn '%s' finns redan i denna utvecklingsk editor.commit_empty_file_header=Committa en tom fil editor.commit_empty_file_text=Filen du vill committa är tom. Vill du fortsätta? editor.no_changes_to_show=Det finns inga ändringar att visa. +editor.fail_to_update_file_summary=Felmeddelande: editor.push_rejected_no_message=Ändringarna avvisades av servern utan något meddelande. Kontrollera githookarna. editor.add_subdir=Lägga till en katalog… editor.unable_to_upload_files=Uppladdning av filen '%s' misslyckades med felet: %v @@ -890,9 +897,13 @@ projects.deletion_success=Projektet har tagits bort. projects.edit=Redigera projekt projects.modify=Uppdatera projekt projects.edit_success=Projektet '%s' har uppdaterats. +projects.type.none=Ingen projects.template.desc=Projektmall projects.type.uncategorized=Okatergoriserad +projects.board.edit=Redigera tavla projects.board.new_submit=Skicka +projects.board.new=Ny tavla +projects.board.delete=Ta bort tavla projects.open=Öppna projects.close=Stäng @@ -1003,7 +1014,6 @@ issues.context.edit=Redigera issues.context.delete=Ta bort issues.no_content=Det finns inget innehåll än. issues.close_issue=Stäng -issues.pull_merged_at=`sammanfogade commit %[2]s in i %[3]s %[4]s` issues.close_comment_issue=Kommentera och stäng issues.reopen_issue=Återöppna issues.reopen_comment_issue=Kommentera och återöppna @@ -1067,12 +1077,11 @@ issues.lock.title=Lås konversationen för detta ärende. issues.unlock.title=Lås upp konversation för ärendet. issues.comment_on_locked=Du kan inte kommentera ett låst ärende. issues.tracker=Tidsredovisning -issues.start_tracking_short=Starta issues.start_tracking=Starta tidsredovisning issues.start_tracking_history=`började arbeta %s` issues.tracker_auto_close=Timern stoppas automatiskt när ärendet stängs -issues.stop_tracking=Stoppa issues.stop_tracking_history=`slutade arbeta %s` +issues.cancel_tracking_history=”avbröt tidredovisning %s' issues.add_time=Lägg till tid manuellt issues.add_time_short=Lägg till tid issues.add_time_cancel=Avbryt @@ -1081,8 +1090,6 @@ issues.del_time_history=`raderade tillbringad tid %s` issues.add_time_hours=Timmar issues.add_time_minutes=Minuter issues.add_time_sum_to_small=Inge tid har angivits. -issues.cancel_tracking=Avfärda -issues.cancel_tracking_history=”avbröt tidredovisning %s' issues.time_spent_total=Total Tid Spenderad issues.time_spent_from_all_authors=`Total Tid Spenderad: %s` issues.due_date=Förfallodatum @@ -1111,8 +1118,6 @@ issues.dependency.remove=Ta bort issues.dependency.remove_info=Ta bort detta beroende issues.dependency.added_dependency=`lade till ett nytt beroende %s` issues.dependency.removed_dependency=`tog bort ett beroende %s` -issues.dependency.issue_closing_blockedby=En stängning av denna pull-förfrågan blockeras av följande ärenden -issues.dependency.pr_closing_blockedby=En stängning av ärendet blockeras av följande ärenden issues.dependency.issue_close_blocks=Detta ärende blockerar en stängning av följande ärenden issues.dependency.pr_close_blocks=Denna pull-förfrågan blockerar stängning av följande ärenden issues.dependency.issue_close_blocked=Du måste stänga alla ärenden som blockerar det här ärendet innan du kan stänga det. @@ -1151,6 +1156,7 @@ issues.review.resolve_conversation=Lös konversation issues.review.resolved_by=markerade denna konversation som löst issues.assignee.error=Inte alla tilldelade har lagts till på grund av ett oväntat fel. + pulls.desc=Aktivera pull-förfrågningar och kodgranskning. pulls.new=Ny Pull-Förfrågan pulls.compare_changes=Ny Pull-Request @@ -1175,7 +1181,6 @@ pulls.merged_as=Pull-förfrågan har sammanfogats som Börja titeln med %s för att förhindra att pull-förfrågan sammanfogas av misstag` -pulls.cannot_merge_work_in_progress=Denna pull-förfrågan är markerad som ett pågående arbete. Ta bort prefixet %s från titeln när den är klar pulls.data_broken=Pull-requesten är trasig pågrund av oexisterande information on forken. pulls.files_conflicted=Den här pull-förfrågan ha ändringar som är i konflikt med mål-branchen. pulls.is_checking=Merge-konfliktkontroll pågår. Försök igen senare. @@ -1189,10 +1194,6 @@ pulls.cannot_auto_merge_helper=Merga manuellt för att lösa konlifterna. pulls.no_merge_desc=Pull-requesten kan inte mergas för alla alternativ för merging är inaktiverade för denna utvecklingskatalog. pulls.no_merge_helper=Aktivera mergealternativ i utvecklingskatalogsinställningarna, eller merga manuellt. -pulls.merge_pull_request=Sammanfoga Pull-förfrågan -pulls.rebase_merge_pull_request=Rebase och sammanfogning -pulls.rebase_merge_commit_pull_request=Rebase och Merge (--no-ff) -pulls.squash_merge_pull_request=Squasha och sammanfogning pulls.invalid_merge_option=Du kan inte använda detta mergealternativet för denna pull-request. ; %[2]s
    %[3]s
    pulls.push_rejected_no_message=Sammanfogningen misslyckades: Push-förfrågan avvisades, men utan något meddelande från fjärrvärden.
    Granska githookarna för denna utvecklingskatalog @@ -1278,7 +1279,7 @@ activity.active_prs_count_n=%d Aktiva Pull begärelser activity.merged_prs_count_1=Sammanfogad Pull-förfrågan activity.merged_prs_count_n=Sammanfogade Pull-förfrågningar activity.opened_prs_count_1=Föreslagen Pull begäran -activity.opened_prs_count_n=Föreslagna Pull-begärelser +activity.opened_prs_count_n=Föreslagna Pull-förfrågningar activity.title.user_1=%d användare activity.title.user_n=%d användare activity.title.prs_1=%d Pull-begäran @@ -1293,7 +1294,6 @@ activity.closed_issues_count_1=Stängt ärende activity.closed_issues_count_n=Stängda ärenden activity.title.issues_1=%d ärende activity.title.issues_n=%d Ärenden -activity.title.issues_closed_by=%s stängd av %s activity.title.issues_created_by=%s skapad av %s activity.closed_issue_label=Stängd activity.new_issues_count_1=Nytt ärende @@ -1350,7 +1350,7 @@ settings.update_settings=Uppdatera inställningar settings.advanced_settings=Advancerade Inställningar settings.wiki_desc=Aktivera wiki för utvecklingskatalog settings.use_internal_wiki=Använd inbyggd Wiki -settings.use_external_wiki=Använd extern wiki +settings.use_external_wiki=Använd extern Wiki settings.external_wiki_url=Extern Wiki-URL settings.external_wiki_url_error=Den externa wiki-länken är inte giltig. settings.external_wiki_url_desc=Besökare omdirigeras till den externa wiki-länken när de trycker på wiki-tabben. @@ -1386,9 +1386,11 @@ settings.convert_succeed=Speglingen har blivit konverterad till en vanlig utveck settings.convert_fork=Konvertera till vanlig utvecklingskatalog settings.transfer=Överför Ägarskap settings.transfer_desc=Överför denna utvecklingskatalog till en användare eller organisation för vilken du har administratörsrättigheter till. +settings.transfer_form_title=Ange utvecklingskatalogens namn för att bekräfta: settings.transfer_notices_1=- Du kommer förlora åtkomst till denna utvecklingskatalog om du för över den till en individuell användare. settings.transfer_notices_2=- Du kommer behålla åtkomst till utvecklingskatalogen om du för över den till en organisation som du antingen äger eller är delägare i. -settings.transfer_form_title=Ange utvecklingskatalogens namn för att bekräfta: +settings.transfer_owner=Ny Ägare +settings.transfer_succeed=Utvecklingskatalogen har flyttats över. settings.trust_model.collaborator=Medarbetare settings.wiki_delete=Ta bort wiki-data settings.wiki_delete_desc=Borttagning av utvecklingskatalogens wiki-data är permanent och kan ej ångras. @@ -1402,9 +1404,6 @@ settings.delete_notices_2=- Denna åtgärd kommer permanent ta bort utvecklingsk settings.delete_notices_fork_1=- Forkar av denna utvecklingskatalog kommer bli självständiga efter borttagning. settings.deletion_success=Utvecklingskatalog har tagits bort. settings.update_settings_success=Inställningar för utvecklingskatalog har uppdaterats. -settings.transfer_owner=Ny Ägare -settings.make_transfer=Utför förflyttning -settings.transfer_succeed=Utvecklingskatalogen har flyttats över. settings.confirm_delete=Ta bort utvecklingskatalog settings.add_collaborator=Lägg till medarbetare settings.add_collaborator_success=Medarbetare har lagts till. @@ -1663,11 +1662,13 @@ branch.protected_deletion_failed=Branch '%s' är skyddad. Den kan inte bli bortt branch.restore=Återställ branch '%s' branch.download=Ladda ner branch '%s' + topic.manage_topics=Hantera ämnen topic.done=Klar topic.count_prompt=Du kan inte välja fler än 25 ämnen topic.format_prompt=Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa. + [org] org_name_holder=Organisationsnamn org_full_name_holder=Organisationens Fullständiga Namn @@ -1780,8 +1781,6 @@ dashboard=Instrumentpanel users=Användarkonto organizations=Organisationer repositories=Utvecklingskataloger -hooks=Förvalda webhooks -systemhooks=Systemets webbhooks authentication=Autentiseringskälla config=Konfiguration notices=Systemaviseringar @@ -1799,7 +1798,6 @@ dashboard.operation_switch=Byt till dashboard.operation_run=Kör dashboard.clean_unbind_oauth=Rena obundna OAuth anslutningar dashboard.clean_unbind_oauth_success=Alla obundna OAuth anslutningar har raderats. -dashboard.delete_repo_archives=Ta bort alla utvecklingskatalogers arkiv dashboard.delete_missing_repos=Ta bort alla utvecklingskataloger som saknar filer specifika för Git dashboard.delete_generated_repository_avatars=Ta bort genererade avatarer för utvecklingskatalogen dashboard.git_gc_repos=Rensa skräpfiler på samtliga utvecklingskataloger @@ -1892,11 +1890,8 @@ repos.forks=Forkar repos.issues=Ärenden repos.size=Storlek -hooks.desc=Webbhookar gör automatiskt HTTP POST förfrågningar till en server när särskilda Gitea-händelser utlöses. Webbhookar som definieras här är förinställda och kommer kopieras till alla nya utvecklingskataloger. Läs mer i guiden för webbhookar. -hooks.add_webhook=Lägg till en förvald webhook -hooks.update_webhook=Uppdatera en förvald webhook -systemhooks.desc=Webhooks gör automatiskt HTTP POST förfrågningar till en server när vissa Gitea händelser utlösare. Webhooks definierade kommer att agera på alla utvecklingskataloger på systemet, så tänk på eventuella prestandakonsekvenser detta kan ha. Läs mer i guiden för webbhookar. +systemhooks=Systemets webbhooks auths.auth_manage_panel=Hantering av autentiseringkälla auths.new=Lägg till autensieringskälla @@ -1913,7 +1908,6 @@ auths.host=Värd auths.port=Port auths.bind_dn=Bind DN auths.bind_password=Bind Lösenord -auths.bind_password_helper=Varning: Detta lösenord lagras i klartext. Använd ett konto med endast läsrättigheter om möjligt. auths.user_base=Användarsökbas auths.user_dn=Användarnas DN auths.attribute_username=Användarnamnsattribut @@ -1933,7 +1927,6 @@ auths.smtphost=SMTP-server auths.smtpport=SMTP-port auths.allowed_domains=Tillåtna Domäner auths.allowed_domains_helper=Lämna tomt om du vill tillåta alla domäner. Separera flera domäner med ett kommatecken (','). -auths.enable_tls=Aktivera TLS-kryptering auths.skip_tls_verify=Skippa verifikation av TLS auths.pam_service_name=PAM Tjänstnamn auths.oauth2_provider=OAuth2 leverantör @@ -2126,6 +2119,7 @@ notices.delete_selected=Ta Bort Markerade notices.delete_all=Ta Bort Alla Notiser notices.type=Typ notices.type_1=Utvecklingskatalog +notices.type_2=Uppgift notices.desc=Beskrivning notices.op=Op. notices.delete_success=Systemnotifikationer har blivit raderade. @@ -2144,6 +2138,7 @@ merge_pull_request=`sammanslog pull-request %s#%[2]s` transfer_repo=överförde utvecklingskalatogen %s till %s delete_tag=tog bort taggen %[2]s från %[3]s delete_branch=tog bort branchen %[2]s from %[3]s +compare_branch=Jämför compare_commits=Jämför %d commits compare_commits_general=Jämför commits mirror_sync_create=synkade ny referens %[2]s till %[3]s från spegel diff --git a/options/locale/locale_tr-TR.ini b/options/locale/locale_tr-TR.ini index 0e1b24422..a886c9c34 100644 --- a/options/locale/locale_tr-TR.ini +++ b/options/locale/locale_tr-TR.ini @@ -15,6 +15,7 @@ page=Sayfa template=Şablon language=Dil notifications=Bildirimler +active_stopwatch=Etkin Zaman Takibi create_new=Oluştur… user_profile_and_more=Profil ve Ayarlar… signed_in_as=Giriş yapan: @@ -75,12 +76,14 @@ pull_requests=Değişiklik İstekleri issues=Konular milestones=Kilometre Taşları +ok=Tamam cancel=İptal save=Kaydet add=Ekle add_all=Tümünü Ekle remove=Kaldır remove_all=Tümünü Kaldır +edit=Düzenle write=Yaz preview=Önizleme @@ -89,11 +92,16 @@ loading=Yükleniyor… step1=1. Adım: step2=2. Adım: +error=Hata error404=Ulaşmaya çalıştığınız sayfa mevcut değil veya görüntüleme yetkiniz yok. +never=Asla + [error] occurred=Bir hata oluştu report_message=Bunun bir Gitea hatası olduğundan eminseniz, lütfen GitHub 'da sorunu arayın ve gerekirse yeni bir sorun açın. +missing_csrf=Hatalı İstek: CSRF anahtarı yok +invalid_csrf=Hatalı İstek: Geçersiz CSRF anahtarı [startpage] app_desc=Zahmetsiz, kendi sunucunuzda barındırabileceğiniz Git servisi @@ -203,6 +211,8 @@ default_enable_timetracking=Varsayılan Olarak Zaman Takibini Etkinleştir default_enable_timetracking_popup=Yeni depolar için zaman takibini varsayılan olarak etkinleştir. no_reply_address=Gizlenecek E-Posta Alan Adı no_reply_address_helper=Gizlenmiş e-posta adresine sahip kullanıcılar için alan adı. Örneğin 'ali' kullanıcı adı, gizlenmiş e-postalar için alan adı 'yanityok.ornek.org' olarak ayarlandığında Git günlüğüne 'ali@yanityok.ornek.org' olarak kaydedilecektir. +password_algorithm=Parola Hash Algoritması +password_algorithm_helper=Parola için hash algoritmasını ayarlayın. Algoritmalar değişen gereksinimlere ve güce sahiptirler. `argon2` iyi özelliklere sahip olmasına rağmen fazla miktarda bellek kullanır ve küçük sistemler için uygun olmayabilir. [home] uname_holder=Kullanıcı Adı veya E-Posta Adresi @@ -236,6 +246,8 @@ users=Kullanıcılar organizations=Organizasyonlar search=Ara code=Kod +search.fuzzy=Belirsiz +search.match=Eşleştir repo_no_results=Eşleşen bir depo bulunamadı. user_no_results=Eşleşen kullanıcı bulunamadı. org_no_results=Eşleşen organizasyon bulunamadı. @@ -293,7 +305,8 @@ openid_connect_desc=Seçilen OpenID URI'si bilinmiyor. Burada yeni bir hesapla i openid_register_title=Yeni hesap oluştur openid_register_desc=Seçilen OpenID URI'si bilinmiyor. Burada yeni bir hesapla ilişkilendir. openid_signin_desc=OpenID URI'nızı girin. Örneğin: https://anne.me, bob.openid.org.cn veya gnusocial.net/carry. -disable_forgot_password_mail=Hesap kurtarma devre dışı. Lütfen site yöneticinizle iletişime geçin. +disable_forgot_password_mail=E posta ayarlanmadığından hesap kurtarma devre dışı. Site yöneticinizle iletişime geçin. +disable_forgot_password_mail_admin=Hesap kurtarma sadece e posta ayarlıyken kullanılabilir. Hesap kurtarmayı etkinleştirmek için lütfen e posta ayarlayın. email_domain_blacklisted=Bu e-posta adresinizle kayıt olamazsınız. authorize_application=Uygulamayı Yetkilendir authorize_redirect_notice=Bu uygulamayı yetkilendirirseniz %s adresine yönlendirileceksiniz. @@ -307,11 +320,64 @@ password_pwned=Seçtiğiniz parola, daha önce herkese açık veri ihlallerinde password_pwned_err=HaveIBeenPwned'e yapılan istek tamamlanamadı [mail] +view_it_on=%s üzerinde görüntüle +link_not_working_do_paste=Çalışmıyorsa, kopyalayıp tarayıcıya yapıştırmayı deneyin. +hi_user_x=Merhaba %s, + activate_account=Lütfen hesabınızı aktifleştirin +activate_account.title=%s, lütfen hesabınızı etkinleştirin +activate_account.text_1=Merhaba %[1]s, %[2]s kaydınızı yaptırdığınız için teşekkürler! +activate_account.text_2=Hesabınızı etkinleştirmek için lütfen %s içinde linke tıklayın: + activate_email=E-posta adresinizi doğrulayın -reset_password=Hesabınızı kurtarın -register_success=Kayıt başarılı +activate_email.title=%s, lütfen e posta adresinizi doğrulayın +activate_email.text=E posta adresinizi doğrulamak için lütfen %s içinde linke tıklayın: + register_notify=Gitea'ya Hoş Geldiniz +register_notify.title=%[1]s, %[2]s e hoşgeldiniz +register_notify.text_1=bu %s için kayıt onay e postanızdır! +register_notify.text_2=Artık %s kullanıcı adı ile oturum açabilirsiniz. +register_notify.text_3=Eğer bu hesap sizin için oluşturulduysa, lütfen önce şifrenizi ayarlayın. + +reset_password=Hesabınızı kurtarın +reset_password.title=%s, hesap kurtarma talep ettiniz +reset_password.text=Hesabınızı kurtarmak için lütfen %s içinde linke tıklayın: + +register_success=Kayıt başarılı + +issue_assigned.pull=@%[1]s sizi %[3]s deposundaki %[2]s değişiklik isteğine atadı. +issue_assigned.issue=@%[1]s sizi %[3]s deposundaki %[2]s konusuna atadı. + +issue.x_mentioned_you=@%s sizden bahsetti: +issue.action.force_push=%[1]s %[3]s den %[2]s i %[4]s e zorla gönderdi. +issue.action.push_1=@%[1]s %[3]d işlemesini %[2]s konumuna gönderdi +issue.action.push_n=@%[1]s %[3]d işlemeyi %[2]s konumuna gönderdi +issue.action.close=@%[1]s kapattı #%[2]d. +issue.action.reopen=@%[1]s yeniden açtı #%[2]d. +issue.action.merge=@%[1]s #%[2]d değişiklik isteğini %[3]s ile birleştirdi. +issue.action.approve=@%[1]s bu değişiklik isteğini onayladı. +issue.action.reject=@%[1]s bu değişiklik isteği üzerinde değişiklikler talep etti. +issue.action.review=@%[1]s bu değişiklik isteğine yorum yaptı. +issue.action.review_dismissed=@%[1]s %[2]s tarafından bu değişiklik isteği için yapılmış son incelemeyi reddetti. +issue.action.ready_for_review=@%[1]s bu değişiklik isteğini incelemeye hazır olarak işaretledi. +issue.action.new=@%[1]s #%[2]d oluşturdu. +issue.in_tree_path=%s içinde: + +release.new.subject=%s içinden %s bırakıldı +release.new.text=@%[1]s %[2]s içinde %[3]s çıkardı +release.title=Başlık: %s +release.note=Not: +release.downloads=İndirmeler: +release.download.zip=Kaynak Kodu (ZIP) +release.download.targz=Kaynak Kodu (TAR.GZ) + +repo.transfer.subject_to=%s "%s" aktarımını %s tarafına gerçekleştirmek istiyor +repo.transfer.subject_to_you=%s size "%s" aktarmak istiyor +repo.transfer.to_you=siz +repo.transfer.body=Kabul veya reddetmek için %s ziyaret edin veya görmezden gelin. + +repo.collaborator.added.subject=%s sizi %s ekledi +repo.collaborator.added.text=Bu depo için katkıcı olarak eklendiniz: [modal] yes=Evet @@ -352,12 +418,14 @@ email_error=' geçerli bir e-posta adresi değil.' url_error=` geçerli bir bağlantı değil.` include_error=` '%s' içermelidir.` glob_pattern_error=` glob deseni geçersiz: %s.` +regex_pattern_error=` regex dizisi geçersiz: %s.` unknown_error=Bilinmeyen hata: captcha_incorrect=CAPTCHA eşleşmedi. password_not_match=Parolalar uyuşmuyor. lang_select_error=Listeden bir dil seçin. username_been_taken=Bu kullanıcı adı daha önce alınmış. +username_change_not_local_user=Yerel olmayan kullanıcılar kendi kullanıcı adlarını değiştiremezler. repo_name_been_taken=Depo adı zaten kullanılıyor. repository_files_already_exist=Bu depo için dosyalar zaten var. Sistem yöneticisine başvurun. repository_files_already_exist.adopt=Bu depo için dosyalar zaten var ve yalnızca Kabul Edilebilir. @@ -378,6 +446,7 @@ password_uppercase_one=En az bir büyük karakter password_digit_one=En az bir rakam password_special_one=En az bir özel karakter (noktalama işaretleri, parantezler, tırnaklar vb.) enterred_invalid_repo_name=Girdiğiniz depo adı hatalı. +enterred_invalid_org_name=Girdiğiniz organizsyon adı hatalı. enterred_invalid_owner_name=Yeni sahip ismi hatalı. enterred_invalid_password=Girdiğiniz parola hatalı. user_not_exist=Böyle bir kullanıcı yok. @@ -404,6 +473,7 @@ repositories=Depolar activity=Genel Aktivite followers=Takipçiler starred=Yıldızlanmış depolar +watched=İzlenen Depolar projects=Projeler following=Takip Edilenler follow=Takip Et @@ -447,6 +517,7 @@ update_language_not_found=‘%s‘ dili mevcut değil. update_profile_success=Profil resminiz güncellendi. change_username=Kullanıcı adınız değiştirildi. change_username_prompt=Not: Kullanıcı adı değişiklikleri hesap URL'nizi de değiştirir. +change_username_redirect_prompt=Eski kullanıcı adı, talep edilene kadar yeniden yönlendirilecektir. continue=Devam Et cancel=İptal language=Dil @@ -517,14 +588,15 @@ ssh_helper=Yardıma ihtiyacınız mı var? Github klavuzundaki gpg_helper=Yardıma ihtiyacınız mı var?Github klavuzundaki GPG hakkında bölümüne göz atınız. add_new_key=SSH Anahtarı Ekle add_new_gpg_key=GPG Anahtarı Ekle -key_content_ssh_placeholder='ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', veya 'ecdsa-sha2-nistp521' ile başlar +key_content_ssh_placeholder='ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', veya 'sk-ssh-ed25519@openssh.com ile başlar' key_content_gpg_placeholder='-----BEGIN PGP PUBLIC KEY BLOCK-----' ile başlar add_new_principal=Sorumlu Ekle ssh_key_been_used=Bu SSH anahtarı, sunucuya zaten eklenmiş. ssh_key_name_used=Hesabınızda aynı ada sahip bir SSH anahtarı zaten var. ssh_principal_been_used=Bu sorumlu sunucuya zaten eklendi. gpg_key_id_used=Aynı kimliğe sahip bir açık GPG anahtarı zaten var. -gpg_no_key_email_found=Bu GPG anahtarı, hesabınızla ilişkili hiçbir e-posta adresiyle kullanılamaz. +key_signature_gpg_placeholder='-----PGP İMZA BAŞLAT -----' ile başlar +verify_gpg_key_success=GPG anahtarı '%s' doğrulandı. subkeys=Alt anahtarlar key_id=Anahtar Kimliği key_name=Anahtar İsmi @@ -623,6 +695,7 @@ or_enter_secret=Veya gizli şeyi girin: %s then_enter_passcode=Ve uygulamada gösterilen şifreyi girin: passcode_invalid=Şifre geçersiz. Tekrar deneyin. twofa_enrolled=Hesabınız iki faktörlü kimlik doğrulamasına kaydedildi. Kazıma belirtecini (%s) yalnızca bir kez gösterdiği gibi güvenli bir yerde saklayın! +twofa_failed_get_secret=Gizlilik elde edilemedi. u2f_desc=Güvenlik anahtarları, şifreleme anahtarlarını içeren donanım aygıtlarıdır. İki faktörlü kimlik doğrulama için kullanılabilirler. Güvenlik anahtarları FIDO U2F standardını desteklemelidir. u2f_require_twofa=Güvenlik anahtarlarını kullanmak için hesabınızın iki faktörlü kimlik doğrulamasına kaydedilmiş olması gerekir. @@ -644,6 +717,7 @@ repos_none=Herhangi bir depoya sahip değilsiniz delete_account=Hesabınızı Silin delete_prompt=Bu işlem kullanıcı hesabınızı kalıcı olarak siler. Bu işlem GERİ ALINAMAZ. +delete_with_all_comments=Hesabınız %s günden daha genç. Hayalet yorumları önlemek için, tüm konu/Dİ yorumları onunla birlikte silinecektir. confirm_delete_account=Silmeyi Onayla delete_account_title=Kullanıcı Hesabını Silin delete_account_desc=Bu kullanıcı hesabını kalıcı olarak silmek istediğinizden emin misiniz? @@ -653,7 +727,16 @@ email_notifications.onmention=Sadece Bahsedilen E-posta email_notifications.disable=E-posta Bildirimlerini Devre Dışı Bırak email_notifications.submit=E-posta Tercihlerini Ayarla +visibility=Kullanıcı görünürlüğü +visibility.public=Herkese Açık +visibility.public_tooltip=Bütün kullanıcılara görünür +visibility.limited=Sınırlı +visibility.limited_tooltip=Sadece oturum açmış kullanıcılar görebilir +visibility.private=Özel +visibility.private_tooltip=Yalnızca organizasyon üyeleri tarafından görülebilir + [repo] +new_repo_helper=Bir depo, revizyon geçmişi dahil tüm proje dosyalarını içerir. Zaten başka bir yerde mi var? Depoyu taşıyın. owner=Sahibi owner_helper=Bazı organizasyonlar, en çok depo sayısı sınırı nedeniyle açılır menüde görünmeyebilir. repo_name=Depo İsmi @@ -676,26 +759,43 @@ use_template=Bu şablonu kullan generate_repo=Depo Oluştur generate_from=Şuradan Oluştur repo_desc=Açıklama +repo_desc_helper=Kısa açıklama girin (isteğe bağlı) repo_lang=Dil repo_gitignore_helper=.gitignore şablonlarını seç. +repo_gitignore_helper_desc=Sık kullanılan diller için bir şablon listesinden hangi dosyaların izlenmeyeceğini seçin. Her dilin oluşturma araçları tarafından oluşturulan tipik yapılar, varsayılan olarak .gitignore dosyasına dahil edilmiştir. issue_labels=Konu Etiketleri issue_labels_helper=Bir konu etiket seti seçin. license=Lisans license_helper=Bir lisans dosyası seçin. +license_helper_desc=Bir lisans, başkalarının kodunuzla neler yapıp yapamayacağını yönetir. Projeniz için hangisinin doğru olduğundan emin değil misiniz? Lisans seçme konusuna bakın readme=README readme_helper=Bir README dosyası şablonu seçin. +readme_helper_desc=Projeniz için eksiksiz bir açıklama yazabileceğiniz yer burasıdır. auto_init=Depoyu başlat (.gitignore, Lisans ve README dosyalarını ekler) +trust_model_helper=İmza doğrulaması için güven modelini seçin. Olası seçenekler şunlardır: +trust_model_helper_collaborator=Ortak çalışan: Ortak çalışanların imzalarına güven +trust_model_helper_committer=İşleyen: İşleyenlerle eşleşen imzalara güven +trust_model_helper_collaborator_committer=Ortak çalışan+İşleyen: İşleyenle eşleşen ortak çalışanların imzalarına güven +trust_model_helper_default=Varsayılan: Bu kurulum için varsayılan güven modelini kullan create_repo=Depo Oluştur default_branch=Varsayılan Dal +default_branch_helper=Varsayılan dal, değişiklik istekleri ve kod işlemeleri için temel daldır. mirror_prune=Buda mirror_prune_desc=Kullanılmayan uzak depoları izleyen referansları kaldır mirror_interval=Yansı Aralığı (geçerli zaman birimleri 'h', 'm', 's'). 0 otomatik senkronizasyonu devre dışı bırakmak için. mirror_interval_invalid=Yansı süre aralığı geçerli değil. mirror_address=URL'den Klonla -mirror_address_desc=Gerekli kimlikleri Yetkilendirmeyi Klonla bölümüne girin. +mirror_address_desc=Yetkilendirme bölümüne gerekli tüm kimlik bilgilerini girin. mirror_address_url_invalid=Sağlanan Url geçersiz. Url'nin tüm bileşenlerinden doğru olarak kaçmalısınız. mirror_address_protocol_invalid=Sağlanan url geçersiz. Yalnızca http(s):// veya git:// konumları yansıtılabilir. +mirror_lfs=Büyük Dosya Depolama (LFS) +mirror_lfs_desc=LFS verisinin yansılamasını etkinleştir. +mirror_lfs_endpoint=LFS Uç Noktası +mirror_lfs_endpoint_desc=Senkronizasyon, LFS sunucusunu belirlemek için klonlama url'sini kullanmaya çalışacak. Eğer LFS veri deposu başka yerdeyse özel bir uç nokta da belirtebilirsiniz. mirror_last_synced=Son Senkronize Edilen +mirror_password_placeholder=(Değiştirilmedi) +mirror_password_blank_placeholder=(Ayarı kaldır) +mirror_password_help=Saklanan bir parolayı silmek için kullanıcı adını değiştirin. watchers=İzleyenler stargazers=Yıldızlayanlar forks=Çatallamalar @@ -712,6 +812,14 @@ delete_preexisting_label=Sil delete_preexisting=Önceden var olan dosyaları sil delete_preexisting_content=%s içindeki dosyaları sil delete_preexisting_success=%s içindeki kabul edilmeyen dosyalar silindi +blame_prior=Bu değişiklikten önceki suçu görüntüle + +transfer.accept=Aktarımı Kabul Et +transfer.accept_desc="%s" tarafına aktar +transfer.reject=Aktarımı Reddet +transfer.reject_desc="%s" tarafına aktarımı iptal et +transfer.no_permission_to_accept=Kabul Etme iznine sahip değilsiniz +transfer.no_permission_to_reject=Reddetme iznine sahip değilsiniz desc.private=Özel desc.public=Genel @@ -736,15 +844,21 @@ archive.title=Bu depo arşivlendi. Dosyaları görüntüleyebilir ve klonlayabil archive.issue.nocomment=Bu depo arşivlendi. Konular bölümünde yorum yapamazsınız. archive.pull.nocomment=Bu depo arşivlendi. Değişiklik istekleri bölümünde yorum yapamazsınız. -form.reach_limit_of_creation=Zaten %d depo limitinize ulaştınız. +form.reach_limit_of_creation_1=Zaten %d depo limitinize ulaştınız. +form.reach_limit_of_creation_n=Zaten %d depo limitinize ulaştınız. form.name_reserved=Depo ismi '%s' rezerve edildi. form.name_pattern_not_allowed='%s' deseni, depo adı için geçerli değildir. -need_auth=Yetkilendirmeyi Klonla +need_auth=Yetkilendirme migrate_options=Göç Seçenekleri migrate_service=Göç Hizmeti migrate_options_mirror_helper=Bu depo bir yansı olacaktır migrate_options_mirror_disabled=Site yöneticiniz yeni yansıları devre dışı bıraktı. +migrate_options_lfs=LFS dosyalarını taşı +migrate_options_lfs_endpoint.label=LFS Uç Noktası +migrate_options_lfs_endpoint.description=Taşıma, LFS sunucusunu belirlemek için Git uzak sunucusunu kullanmaya çalışacak. Eğer LFS veri deposu başka yerdeyse özel bir uç nokta da belirtebilirsiniz. +migrate_options_lfs_endpoint.description.local=Yerel bir sunucu yolu da destekleniyor. +migrate_options_lfs_endpoint.placeholder=Klonlama URL'sinden üretmek için boş bırakın migrate_items=Göç Öğeleri migrate_items_wiki=Wiki migrate_items_milestones=Kilometre Taşları @@ -758,19 +872,25 @@ migrate.clone_address=URL'den Taşı / Klonla migrate.clone_address_desc=Varolan bir deponun HTTP(S) veya Git 'klonlama' URL'si migrate.clone_local_path=veya bir yerel sunucu yolu migrate.permission_denied=Yerel depoları içeri aktarma izniniz yok. +migrate.permission_denied_blocked=Engellenen ana bilgisayarlardan içeri aktarmanıza izin verilmiyor. +migrate.permission_denied_private_ip=Özel IP'lerden içeri aktarmanıza izin verilmiyor. migrate.invalid_local_path=Yerel yol geçersiz. Mevcut değil veya bir dizin değil. +migrate.invalid_lfs_endpoint=LFS Uç noktası geçerli değil. migrate.failed=Göç başarısız: %v -migrate.lfs_mirror_unsupported=LFS nesnelerini yansılama desteklenmiyor - yerine 'git lfs fetch --all' ve 'git lfs push --all' kullanın. migrate.migrate_items_options=Ek öğeleri taşımak için Erişim Kodu gereklidir migrated_from=%[2]s konumundan göç edildi migrated_from_fake=%[1]s Konumundan Göç Edildi migrate.migrate=%s Konumundan Göç Et migrate.migrating=%s konumundan taşınıyor ... migrate.migrating_failed=%s konumundan taşıma başarısız oldu. -migrate.github.description=Github.com veya Github Enterprise'dan veri taşıma. -migrate.git.description=Git hizmetlerinden git verilerini taşıma veya yansıtma -migrate.gitlab.description=Verileri GitLab.com'dan veya Kendi Kendine Barındırılan gitlab sunucusundan taşıma. -migrate.gitea.description=Verileri Gitea.com'dan veya Kendi Kendine Barındırılan Gitea sunucusundan taşıma. +migrate.migrating_failed.error=Hata: %s +migrate.migrating_git=Git Verilerini Taşıma +migrate.migrating_topics=Konuları Taşıma +migrate.migrating_milestones=Kilometre Taşlarını Taşıma +migrate.migrating_labels=Etiketleri Taşıma +migrate.migrating_releases=Sürümleri Taşıma +migrate.migrating_issues=Konuları Taşıma +migrate.migrating_pulls=Değişiklik İsteklerini Taşıma mirror_from=şunun yansıması forked_from=şundan çatallanmış @@ -803,6 +923,7 @@ branch=Dal tree=Ağaç clear_ref='Geçerli referansı temizle' filter_branch_and_tag=Dal veya biçim imini filtrele +find_tag=Etiketi bul branches=Dal tags=Etiket issues=Konular @@ -821,6 +942,8 @@ tag=Etiket released_this=bu sürümü yayınladı file_raw=Ham file_history=Geçmiş +file_view_source=Kaynağı Görüntüle +file_view_rendered=Oluşturulanları Görüntüle file_view_raw=Ham Görünüm file_permalink=Kalıcı Bağlantı file_too_large=Bu dosya görüntülemek için çok büyük. @@ -862,6 +985,7 @@ editor.add='%s' ekle editor.update='%s' güncelle editor.delete='%s' sil editor.commit_message_desc=İsteğe bağlı uzun bir açıklama ekleyin… +editor.signoff_desc=İşleme günlüğü mesajının sonuna işleyen tarafından imzalanan bir fragman ekleyin. editor.commit_directly_to_this_branch=Doğrudan %s bölümüne uygula. editor.create_new_branch=Bu işleme için yeni bir dal oluşturun ve bir değişiklik isteği başlatın. editor.create_new_branch_np=Bu işleme için yeni bir dal oluştur. @@ -899,6 +1023,7 @@ editor.require_signed_commit=Dal imzalı bir işleme gerektirir commits.desc=Kaynak kodu değişiklik geçmişine göz atın. commits.commits=İşleme commits.no_commits=Ortak bir işleme yok. '%s' ve '%s' tamamen farklı geçmişlere sahip. +commits.nothing_to_compare=Bu dallar eşit. commits.search=İşlemeleri ara… commits.search.tooltip=Anahtar kelimeleri "yazar:", "işleyici:", "sonra:" veya "önce:", örneğin; "eski haline yazan: Alice önce: 2019-04-01" ile önekleyebilirsiniz. commits.find=Ara @@ -918,6 +1043,8 @@ ext_issues.desc=Dışsal konu takip sistemine bağla. projects=Projeler projects.desc=Proje panolarındaki konuları ve değişiklikleri yönetin. +projects.description=Açıklama (isteğe bağlı) +projects.description_placeholder=Açıklama projects.create=Proje Oluştur projects.title=Başlık projects.new=Yeni proje @@ -941,6 +1068,8 @@ projects.board.edit_title=Yeni Pano Adı projects.board.new_title=Yeni Pano Adı projects.board.new_submit=Gönder projects.board.new=Yeni Pano +projects.board.set_default=Varsayılana Ayarla +projects.board.set_default_desc=Kategorize edilmemiş konular ve çekme istekleri için bu panoyu varsayılan olarak ayarlayın projects.board.delete=Panoyu Sil projects.board.deletion_desc=Bir proje panosunun silinmesi, ilgili tüm konuları 'Kategorize edilmemiş'e taşır. Devam edilsin mi? projects.open=Aç @@ -1024,6 +1153,7 @@ issues.filter_type.all_issues=Tüm konular issues.filter_type.assigned_to_you=Size atanan issues.filter_type.created_by_you=Sizin oluşturduklarınız issues.filter_type.mentioning_you=Sizden bahsedilen +issues.filter_type.review_requested=İnceleme istendi issues.filter_sort=Sırala issues.filter_sort.latest=En yeni issues.filter_sort.oldest=En eski @@ -1059,11 +1189,13 @@ issues.commented_at=`%s yorum yaptı` issues.delete_comment_confirm=Bu yorumu silmek istediğinizden emin misiniz? issues.context.copy_link=Bağlantıyı Kopyala issues.context.quote_reply=Alıntı Cevapla +issues.context.reference_issue=Yeni konuda referans issues.context.edit=Düzenle issues.context.delete=Sil issues.no_content=Henüz bir içerik yok. issues.close_issue=Kapat -issues.pull_merged_at=`%[2]s işlemesini %[3]s ile %[4]s birleştirdi` +issues.pull_merged_at=`%[2]s işlemesini %[3]s %[4]s ile birleştirdi` +issues.manually_pull_merged_at=`%[2]s işlemesini %[3]s %[4]s ile elle birleştirdi` issues.close_comment_issue=Yorum Yap ve Kapat issues.reopen_issue=Yeniden aç issues.reopen_comment_issue=Yorum Yap ve Yeniden Aç @@ -1085,6 +1217,8 @@ issues.re_request_review=İncelemeyi yeniden iste issues.is_stale=Bu incelemeden bu yana bu istekte değişiklikler oldu issues.remove_request_review=İnceleme isteğini kaldır issues.remove_request_review_block=İnceleme isteği kaldırılamadı +issues.dismiss_review=İncelemeyi Reddet +issues.dismiss_review_warning=Bu incelemeyi reddetmek istediğinizden emin misiniz? issues.sign_in_require_desc=Bu konuşmaya katılmak için oturum aç. issues.edit=Düzenle issues.cancel=İptal @@ -1129,14 +1263,17 @@ issues.lock.title=Konuşmayı kilitle. issues.unlock.title=Konuşmanın kilidini aç. issues.comment_on_locked=Kilitli bir konuya yorum yapamazsınız. issues.tracker=Zaman Takibi -issues.start_tracking_short=Başlat +issues.start_tracking_short=Zamanlayıcıyı Başlat issues.start_tracking=Zaman İzlemeyi Başlat issues.start_tracking_history=`%s çalışma başlattı` issues.tracker_auto_close=Bu konu kapatıldığında zamanlayıcı otomatik olarak durur issues.tracking_already_started=`başka bir konuda zaten zaman izleyici başlattınız!` -issues.stop_tracking=Durdur +issues.stop_tracking=Zamanlayıcıyı Bitir issues.stop_tracking_history=`%s çalışmayı durdurdu` +issues.cancel_tracking=Yoksay +issues.cancel_tracking_history=` %s zaman takibini iptal etti` issues.add_time=El ile Zaman Ekle +issues.del_time=Bu zaman kaydını sil issues.add_time_short=Zaman Ekle issues.add_time_cancel=İptal issues.add_time_history=`%s harcanan zaman eklendi` @@ -1144,8 +1281,6 @@ issues.del_time_history=`%s harcanan zaman silindi` issues.add_time_hours=Saat issues.add_time_minutes=Dakika issues.add_time_sum_to_small=Zaman girilmedi. -issues.cancel_tracking=İptal -issues.cancel_tracking_history=` %s zaman takibini iptal etti` issues.time_spent_total=Toplam Harcanan Zaman issues.time_spent_from_all_authors=`Toplam Harcanan Zaman: %s` issues.due_date=Bitiş Tarihi @@ -1154,7 +1289,7 @@ issues.error_modifying_due_date=Bitiş tarihi değiştirilemedi. issues.error_removing_due_date=Bitiş tarihi silinemedi. issues.push_commit_1=%d işlemeyi %s ekledi issues.push_commits_n=%d işlemeyi %s ekledi -issues.force_push_codes=`%[1]s %[2]s konumundan %[4]s %[6]s konumuna zorla güncellendi` +issues.force_push_codes=`%[1]s %[2]s hedefinden %[4]s hedefine zorla gönderildi %[6]s` issues.due_date_form=yyyy-aa-gg issues.due_date_form_add=Bitiş tarihi ekle issues.due_date_form_edit=Düzenle @@ -1168,15 +1303,13 @@ issues.due_date_overdue=Süresi Geçmiş issues.due_date_invalid=Bitiş tarihi geçersiz veya aralık dışında. Lütfen 'yyyy-aa-gg' biçimini kullanın. issues.dependency.title=Bağımlılıklar issues.dependency.issue_no_dependencies=Bu konu henüz bir bağımlılık içermiyor. -issues.dependency.pr_no_dependencies=Bu çekme isteği henüz bir bağımlılık içermiyor. +issues.dependency.pr_no_dependencies=Bu değişiklik isteği henüz bir bağımlılık içermiyor. issues.dependency.add=Bağımlılık ekle… issues.dependency.cancel=İptal issues.dependency.remove=Kaldır issues.dependency.remove_info=Bu bağımlılığı kaldır issues.dependency.added_dependency=`yeni bir %s bağımlılığı eklendi` issues.dependency.removed_dependency=`bir %s bağımlılığı kaldırıldı` -issues.dependency.issue_closing_blockedby=Bu değişiklik isteğinin kapatılması aşağıdaki konular nedeniyle engelleniyor -issues.dependency.pr_closing_blockedby=Bu konunun kapatılması aşağıdaki konular tarafından engelleniyor issues.dependency.issue_close_blocks=Bu konu aşağıdaki konuların kapatılmasını engelliyor issues.dependency.pr_close_blocks=Bu değişiklik isteği aşağıdaki sorunların kapatılmasını engelliyor issues.dependency.issue_close_blocked=Kapatmadan önce bu konuyu engelleyen tüm konuları kapatmanız gerekir. @@ -1197,11 +1330,13 @@ issues.review.self.approval=Kendi değişiklik isteğinizi onaylayamazsınız. issues.review.self.rejection=Kendi değişiklik isteğinizde değişiklik isteyemezsiniz. issues.review.approve=%s bu değişiklikleri onayladı issues.review.comment=%s incelendi -issues.review.left_comment=bir yorum bırak +issues.review.dismissed=%s incelemesini %s reddetti +issues.review.dismissed_label=Reddedildi +issues.review.left_comment=bir yorum yaptı issues.review.content.empty=İstenen değişiklik(ler)i belirten bir yorum bırakmanız gerekir. issues.review.reject=%s değişiklik istedi -issues.review.wait=%s incelemesi için istendi -issues.review.add_review_request=%s %s tarafından istenen inceleme +issues.review.wait=için %s inceleme isteği +issues.review.add_review_request=%s tarafından %s inceleme istedi issues.review.remove_review_request=%s %s için inceleme isteği kaldırıldı issues.review.remove_review_request_self=%s incelemeyi reddetti issues.review.pending=Beklemede @@ -1216,6 +1351,10 @@ issues.review.resolve_conversation=Konuşmayı çöz issues.review.un_resolve_conversation=Konuşmayı çözme issues.review.resolved_by=bu konuşmayı çözümlenmiş olarak işaretledi issues.assignee.error=Beklenmeyen bir hata nedeniyle tüm atananlar eklenmedi. +issues.reference_issue.body=Gövde + +compare.compare_base=temel +compare.compare_head=karşılaştır pulls.desc=Değişiklik isteklerini ve kod incelemelerini etkinleştir. pulls.new=Yeni Değişiklik İsteği @@ -1226,6 +1365,7 @@ pulls.compare_compare=şuradan çek pulls.filter_branch=Dal filtrele pulls.no_results=Sonuç bulunamadı. pulls.nothing_to_compare=Bu dallar eşit. Değişiklik isteği oluşturmaya gerek yok. +pulls.nothing_to_compare_and_allow_empty_pr=Bu dallar eşittir. Bu Dİ boş olacak. pulls.has_pull_request=`Bu dallar arasında bir değişiklik isteği zaten var: %[2]s#%[3]d` pulls.create=Değişiklik İsteği Oluştur pulls.title_desc=%[2]s içindeki %[1]d işlemeyi %[3]s ile birleştirmek istiyor @@ -1238,13 +1378,19 @@ pulls.reopen_to_merge=Lütfen birleştirme gerçekleştirmek için bu değişikl pulls.cant_reopen_deleted_branch=Dal silindiğinden bu değişiklik isteği yeniden açılamaz. pulls.merged=Birleştirildi pulls.merged_as=Değişiklik isteği %[2]s olarak birleştirildi. +pulls.manually_merged=Elle birleştirildi +pulls.manually_merged_as=Değişiklik isteği %[2]s olarak elle birleştirildi. pulls.is_closed=Değişiklik isteği kapatıldı. pulls.has_merged=Değişiklik isteği birleştirildi. pulls.title_wip_desc=`Değişiklik isteğinin yanlışlıkla birleştirilmesini önlemek için, başlığı %s ile başlatın` -pulls.cannot_merge_work_in_progress=Bu değişiklik isteği devam eden bir çalışma olarak işaretlendi. Hazır olduğunda %s ön ekini başlıktan kaldırın +pulls.cannot_merge_work_in_progress=Bu değişiklik isteği, devam eden bir çalışma olarak işaretlendi. +pulls.still_in_progress=Hala devam ediyor mu? +pulls.add_prefix=%s ön ekini ekle +pulls.remove_prefix=%s ön ekini kaldır pulls.data_broken=Bu değişiklik isteği, çatallama bilgilerinin eksik olması nedeniyle bozuldu. pulls.files_conflicted=Bu değişiklik isteğinde, hedef dalla çakışan değişiklikler var. pulls.is_checking=Birleştirme çakışması denetimi devam ediyor. Birkaç dakika sonra tekrar deneyin. +pulls.is_empty=Bu dal, hedef dalla eşittir. pulls.required_status_check_failed=Bazı gerekli denetimler başarılı olmadı. pulls.required_status_check_missing=Gerekli bazı kontroller eksik. pulls.required_status_check_administrator=Yönetici olarak, bu değişiklik isteğini yine de birleştirebilirsiniz. @@ -1265,16 +1411,15 @@ pulls.reject_count_1=%d değişiklik isteği pulls.reject_count_n=%d değişiklik isteği pulls.waiting_count_1=%d bekleyen inceleme pulls.waiting_count_n=%d bekleyen inceleme +pulls.wrong_commit_id=işleme kimliği, hedef daldaki bir işleme kimliği olmalıdır pulls.no_merge_desc=Tüm depo birleştirme seçenekleri devre dışı bırakıldığından, bu değişiklik isteği birleştirilemez. pulls.no_merge_helper=Depo ayarlarındaki birleştirme seçeneklerini etkinleştirin veya değişiklik isteğini el ile birleştirin. pulls.no_merge_wip=Bu değişiklik isteği birleştirilemez çünkü devam eden bir çalışma olarak işaretlendi. pulls.no_merge_not_ready=Bu değişiklik isteği birleştirilmeye hazır değil, inceleme durumunu ve durum kontrollerini kontrol edin. pulls.no_merge_access=Bu değişiklik isteğini birleştirme yetkiniz yok. -pulls.merge_pull_request=Değişiklik İsteğini Birleştir -pulls.rebase_merge_pull_request=Yeniden Yapılandır ve Birleştir -pulls.rebase_merge_commit_pull_request=Yeniden Yapılandır ve Birleştir (--no-ff) -pulls.squash_merge_pull_request=Ez ve Birleştir +pulls.merge_manually=Elle birleştirildi +pulls.merge_commit_id=Birleştirme işlemesi kimliği pulls.require_signed_wont_sign=Dal imzalı işlemeler gerektiriyor, ancak bu birleştirme imzalanmayacak pulls.invalid_merge_option=Bu değişiklik isteği için bu birleştirme seçeneğini kullanamazsınız. pulls.merge_conflict=Birleştirme Başarısız Oldu: Birleştirme sırasında bir çakışma oldu. İpucu: Farklı bir strateji deneyin @@ -1389,9 +1534,9 @@ activity.period.semiyearly=6 ay activity.period.yearly=1 yıl activity.overview=Genel Bakış activity.active_prs_count_1=%d Aktif Değişiklik İsteği -activity.active_prs_count_n=%d Aktif Çekme İsteği +activity.active_prs_count_n=%d Aktif Değişiklik İsteği activity.merged_prs_count_1=Birleştirilmiş Değişiklik İsteği -activity.merged_prs_count_n=Birleştirilmiş Çekme İsteği +activity.merged_prs_count_n=Birleştirilmiş Değişiklik İsteği activity.opened_prs_count_1=Önerilen Değişiklik İsteği activity.opened_prs_count_n=Önerilen Değişiklik İsteği activity.title.user_1=%d kullanıcı @@ -1408,7 +1553,7 @@ activity.closed_issues_count_1=Kapalı Konu activity.closed_issues_count_n=Kapalı Konu activity.title.issues_1=%d Konu activity.title.issues_n=%d Konu -activity.title.issues_closed_by=%s %s tarafından kapatıldı +activity.title.issues_closed_from=%s %s tarafından kapatıldı activity.title.issues_created_by=%s %s tarafından oluşturuldu activity.closed_issue_label=Kapalı activity.new_issues_count_1=Yeni Konu @@ -1446,6 +1591,8 @@ activity.git_stats_deletion_n=%d silme oldu search=Ara search.search_repo=Depo ara +search.fuzzy=Belirsiz +search.match=Eşleştir search.results="%s" için %s içinde sonuçları ara settings=Ayarlar @@ -1461,6 +1608,15 @@ settings.hooks=Web İstemcileri settings.githooks=Git İstekleri settings.basic_settings=Temel Ayarlar settings.mirror_settings=Yansıma Ayarları +settings.mirror_settings.docs=Projenizi, değişiklikleri başka bir depoya/depodan otomatik olarak gönderecek ve/veya çekecek şekilde ayarlayın. Dallar, etiketler ve işlemeler otomatik olarak senkronize edilecektir. Depoları nasıl yansıtrım? +settings.mirror_settings.mirrored_repository=Yansıtılmış depo +settings.mirror_settings.direction=Yön +settings.mirror_settings.direction.pull=Çek +settings.mirror_settings.direction.push=Gönder +settings.mirror_settings.last_update=Son güncelleme +settings.mirror_settings.push_mirror.none=Yapılandırılmış yansı gönderimi yok +settings.mirror_settings.push_mirror.remote_url=Git Uzak Depo URL'si +settings.mirror_settings.push_mirror.add=Yansı Gönderimi Ekle settings.sync_mirror=Şimdi Eşitle settings.mirror_sync_in_progress=Yansı senkronizasyonu devam ediyor. Bir dakika sonra tekrar kontrol edin. settings.email_notifications.enable=E-posta Bildirimlerini Etkinleştir @@ -1469,6 +1625,7 @@ settings.email_notifications.disable=E-posta Bildirimlerini Devre Dışı Bırak settings.email_notifications.submit=E-posta Tercihlerini Ayarla settings.site=Web Sitesi settings.update_settings=Ayarları Güncelle +settings.branches.update_default_branch=Varsayılan Dalı Değiştir settings.advanced_settings=Gelişmiş Ayarlar settings.wiki_desc=Depo Wiki'sini Etkinkleştir settings.use_internal_wiki=Dahili Wiki Kullan @@ -1482,7 +1639,7 @@ settings.use_external_issue_tracker=Harici Konu İzleyici Kullan settings.external_tracker_url=Harici Konu İzleyici URLsi settings.external_tracker_url_error=Harici konu izleyici URL'si geçerli bir URL değil. settings.external_tracker_url_desc=Ziyaretçiler, konular sekmesine tıkladığında harici konu izleyici URL'sine yönlendirilir. -settings.tracker_url_format=Harici Sorun Takipçisi Bağlantı Formatı +settings.tracker_url_format=Harici Konu İzleyici URL Biçimi settings.tracker_url_format_error=Harici konu izleyici URL biçimi geçerli bir URL değil. settings.tracker_issue_style=Harici Konu İzleyici Numara Biçimi settings.tracker_issue_style.numeric=Sayısal @@ -1496,6 +1653,9 @@ settings.pulls.allow_merge_commits=İşleme Birleştirmeyi Etkinleştir settings.pulls.allow_rebase_merge=İşlemeleri Birleştirmek için Yeniden Yapılandırmayı Etkinleştir settings.pulls.allow_rebase_merge_commit=Açık birleştirme işlemeleri ile Yeniden Yapılandırmayı Etkinleştir (--no-ff) settings.pulls.allow_squash_commits=İşlemeleri Birleştirmek için Ezmeyi Etkinleştir +settings.pulls.allow_manual_merge=Dİ'yi elle birleştirilmiş olarak işaretlemeyi etkinleştir +settings.pulls.enable_autodetect_manual_merge=Kendiliğinden algılamalı elle birleştirmeyi etkinleştir (Not: Bazı özel durumlarda yanlış kararlar olabilir) +settings.pulls.default_delete_branch_after_merge=Varsayılan olarak birleştirmeden sonra değişiklik isteği dalını sil settings.projects_desc=Depo Projelerini Etkinleştir settings.admin_settings=Yönetici Ayarları settings.admin_enable_health_check=Depo Sağlık Kontrollerini Etkinleştir (git fsck) @@ -1513,10 +1673,21 @@ settings.convert_fork_notices_1=Bu işlem çatalı normal bir depoya dönüştü settings.convert_fork_confirm=Depoyu Dönüştür settings.convert_fork_succeed=Çatal normal bir depoya dönüştürüldü. settings.transfer=Sahipliği Aktar +settings.transfer.rejected=Depo aktarımı reddedildi. +settings.transfer.success=Depo aktarımı başarıyla tamamlandı. +settings.transfer_abort=Aktarımı iptal et +settings.transfer_abort_invalid=Var olmayan bir depo aktarımını iptal edemezsiniz. +settings.transfer_abort_success=%s tarafına yapılan depo aktarımı başarıyla iptal edildi. settings.transfer_desc=Bu depoyu bir kullanıcıya veya yönetici haklarına sahip olduğunuz bir organizasyona aktarın. +settings.transfer_form_title=Onaylamak için depo adını girin: +settings.transfer_in_progress=Şu anda devam etmekte olan bir aktarım mevcut. Eğer bu depoyu başka bir kullanıcıya aktarmak istiyorsanız mevcut aktarımı iptal edin. settings.transfer_notices_1=- Bireysel bir kullanıcıya aktarırsanız depoya erişiminizi kaybedersiniz. settings.transfer_notices_2=- Sahip (-yardımcı) olduğunuz bir organizasyona devrederseniz, depoya erişmeye devam edersiniz. -settings.transfer_form_title=Onaylamak için depo adını girin: +settings.transfer_notices_3=- Depo özelse ve bireysel bir kullanıcıya aktarılmışsa, bu eylem kullanıcının en azından okuma iznine sahip olmasını sağlar (ve gerekirse izinleri değiştirir). +settings.transfer_owner=Yeni Sahip +settings.transfer_perform=Aktarımı Gerçekleştir +settings.transfer_started=Bu depo aktarılmak üzere işaretlendi ve "%s" tarafından onay bekliyor +settings.transfer_succeed=Depo transfer edildi. settings.signing_settings=İmza Doğrulama Ayarları settings.trust_model=İmza Güven Modeli settings.trust_model.default=Varsayılan Güven Modeli @@ -1542,9 +1713,6 @@ settings.delete_notices_2=- Bu işlem, kod, sorunlar, yorumlar, wiki verileri ve settings.delete_notices_fork_1=- Silme işleminden sonra bu deponun çatalları bağımsız hale gelecektir. settings.deletion_success=Depo silindi. settings.update_settings_success=Depo ayarları güncellendi. -settings.transfer_owner=Yeni Sahip -settings.make_transfer=Transfer Et -settings.transfer_succeed=Depo transfer edildi. settings.confirm_delete=Depoyu Sil settings.add_collaborator=Katkıcı Ekle settings.add_collaborator_success=Katkıcı eklendi. @@ -1639,7 +1807,7 @@ settings.event_pull_request_review_desc=Değişiklik isteği onaylandı, reddedi settings.event_pull_request_sync=Değişiklik İsteği Senkronize Edildi settings.event_pull_request_sync_desc=Değişiklik isteği senkronize edildi. settings.branch_filter=Dal filtresi -settings.branch_filter_desc=Glob deseni olarak belirtilen itme, dal oluşturma ve dal silme olayları için dal beyaz listesi. Boş veya * ise, tüm dallar için olaylar bildirilir. Sözdizimi için github.com/gobwas/glob belgelerine bakın. Örnekler: master, {master,release*}. +settings.branch_filter_desc=Gönderme, dal oluşturma ve dal silme olayları için glob deseni olarak belirtilen dal beyaz listesi. Boşsa veya * ise, tüm dallar için olaylar raporlanır. Sözdizimi için github.com/gobwas/glob belgelerine bakın. Örnekler: master, {master,release*}. settings.active=Etkin settings.active_helper=Tetiklenen olaylar hakkındaki bilgiler bu web isteği URL'sine gönderilir. settings.add_hook_success=Web isteği eklendi. @@ -1658,6 +1826,7 @@ settings.add_telegram_hook_desc=Deponuza Telegram entegre edin. settings.add_matrix_hook_desc=Deponuza Matrix entegre edin. settings.add_msteams_hook_desc=Deponuza Microsoft Teams entegre edin. settings.add_feishu_hook_desc=Deponuza Feishu entegre edin. +settings.add_Wechat_hook_desc=Deponuza Wechatwork entegre edin. settings.deploy_keys=Dağıtım Anahtarları settings.add_deploy_key=Dağıtım Anahtarı Ekle settings.deploy_key_desc=Dağıtım anahtarları, depoyu salt okunur çekme yetkisine sahip. @@ -1679,7 +1848,7 @@ settings.protected_branch_can_push_yes=İtebilirsiniz settings.protected_branch_can_push_no=İtemezsiniz settings.branch_protection=%s dalı için Dal Koruması settings.protect_this_branch=Dal Korumayı Etkinleştir -settings.protect_this_branch_desc=Silmeyi önler ve dala Git itmesini ve birleştirmesini kısıtlar. +settings.protect_this_branch_desc=Silmeyi önler ve dala Git gönderimini ve birleştirmesini kısıtlar. settings.protect_disable_push=İtmeyi Devre Dışı Bırak settings.protect_disable_push_desc=Bu dala itme yapılmasına izin verilmeyecek. settings.protect_enable_push=İtmeyi Etkinleştir @@ -1709,7 +1878,7 @@ settings.dismiss_stale_approvals_desc=Değişiklik isteğinin içeriğini deği settings.require_signed_commits=İmzalı İşleme Gerekli settings.require_signed_commits_desc=Reddetme, onlar imzasızsa veya doğrulanamazsa bu dala gönderir. settings.protect_protected_file_patterns=Korumalı dosya kalıpları (noktalı virgülle ayrılmış '\;'): -settings.protect_protected_file_patterns_desc=Kullanıcı bu dalda dosya ekleme, düzenleme veya silme haklarına sahip olsa bile doğrudan değiştirilmesine izin verilmeyen korumalı dosyalar. Birden çok desen noktalı virgül ('\;') kullanılarak ayrılabilir. Desen sözdizimi belgeleri için github.com/gobwas/glob adresine bakın. Örnekler: .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns_desc=Kullanıcının bu dalda dosya ekleme, düzenleme veya silme hakları olsa bile doğrudan değiştirilmesine izin verilmeyen korumalı dosyalar. Birden çok desen noktalı virgül ('\;') kullanılarak ayrılabilir. Desen sözdizimi için github.com/gobwas/glob belgelerine bakın. Örnekler: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Korumayı etkinleştir settings.delete_protected_branch=Korumayı devre dışı bırak settings.update_protect_branch_success='%s' dalı için dal koruması güncellendi. @@ -1723,10 +1892,21 @@ settings.block_on_official_review_requests_desc=Yeterli onay olsa bile, resmi in settings.block_outdated_branch=Değişiklik isteği güncel değilse birleştirmeyi engelle settings.block_outdated_branch_desc=Baş dal taban dalın arkasındayken birleştirme mümkün olmayacaktır. settings.default_branch_desc=Değişiklik istekleri ve kod işlemeleri için varsayılan bir depo dalı seçin: +settings.default_merge_style_desc=Değişiklik istekleri için varsayılan birleştirme tarzı: settings.choose_branch=Bir dal seç… settings.no_protected_branch=Korumalı dal yok. settings.edit_protected_branch=Düzenle settings.protected_branch_required_approvals_min=Gerekli onaylar negatif olamaz. +settings.tags=Etiketler +settings.tags.protection=Etiket Koruması +settings.tags.protection.pattern=Etiket Deseni +settings.tags.protection.allowed=İzin Verilen +settings.tags.protection.allowed.users=İzin verilen kullanıcılar +settings.tags.protection.allowed.teams=İzin verilen takımlar +settings.tags.protection.allowed.noone=Hiç kimse +settings.tags.protection.create=Etiketi Koru +settings.tags.protection.none=Korumalı etiket yok. +settings.tags.protection.pattern.description=Birden çok etiketi eşleştirmek için tek bir ad, glob deseni veya normal ifade kullanabilirsiniz. Daha fazlası için korumalı etiketler rehberini okuyun. settings.bot_token=Bot Jetonu settings.chat_id=Sohbet Kimliği settings.matrix.homeserver_url=Ev sunucusu URL'si @@ -1740,6 +1920,7 @@ settings.archive.success=Depo başarıyla arşivlendi. settings.archive.error=Depoyu arşivlemeye çalışırken bir hata oluştu. Daha fazla ayrıntı için günlüğe bakın. settings.archive.error_ismirror=Yansılanmış bir depoyu arşivleyemezsiniz. settings.archive.branchsettings_unavailable=Depo arşivlenirse dal ayarları kullanılamaz. +settings.archive.tagsettings_unavailable=Depo arşivlenmişse etiket ayarları kullanılamaz. settings.unarchive.button=Depoyu Arşivden Çıkar settings.unarchive.header=Bu Depoyu Arşivden Çıkar settings.unarchive.text=Depoyu arşivden çıkarmak, yeni sorunların ve değişiklik isteklerinin yanı sıra işleme ve itme yeteneğini de geri kazandıracaktır. @@ -1791,6 +1972,7 @@ diff.whitespace_ignore_at_eol=Satır sonundaki boşluk değişiklikleri yoksay diff.stats_desc= %d değiştirilmiş dosya ile %d ekleme ve %d silme diff.stats_desc_file=%d değişiklik: %d ekleme ve %d silme diff.bin=BIN +diff.bin_not_shown=İkili dosya gösterilmiyor. diff.view_file=Dosyayı Görüntüle diff.file_before=Önce diff.file_after=Sonra @@ -1798,6 +1980,7 @@ diff.file_image_width=Genişlik diff.file_image_height=Yükseklik diff.file_byte_size=Boyut diff.file_suppressed=Dosya farkı çok büyük olduğundan ihmal edildi +diff.file_suppressed_line_too_long=Dosya farkları bir veya daha fazla satır çok uzun olduğundan bastırıldı diff.too_many_files=Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor diff.comment.placeholder=Yorum Yap diff.comment.markdown_info=Markdown ile şekillendirme desteklenir. @@ -1813,6 +1996,9 @@ diff.review.approve=Onayla diff.review.reject=Değişiklik iste diff.committed_by=işlemeyi yapan: diff.protected=Korumalı +diff.image.side_by_side=Yan Yana +diff.image.swipe=Kaydır +diff.image.overlay=Arayüz releases.desc=Proje sürümlerini ve indirmeleri takip edin. release.releases=Sürümler @@ -1822,6 +2008,7 @@ release.new_release=Yeni Sürüm release.draft=Taslak release.prerelease=Ön Sürüm release.stable=Kararlı +release.compare=Karşılaştır release.edit=düzenle release.ahead.commits=%d işleme release.ahead.target=bu sürümden bu yana %s dalına gönderildi @@ -1848,9 +2035,12 @@ release.deletion_tag_desc=Bu etiket depodan silinecek. Depo içeriği ve geçmi release.deletion_tag_success=Etiket silindi. release.tag_name_already_exist=Bu etiket adına sahip bir sürüm zaten var. release.tag_name_invalid=Etiket adı geçerli değil. +release.tag_name_protected=Etiket ismi korumalıdır. release.tag_already_exist=Bu etiket adı zaten var. release.downloads=İndirmeler release.download_count=İndirilen: %s +release.add_tag_msg=Sürümün başlığını ve içeriğini etiket mesajı olarak kullanın. +release.add_tag=Yalnızca Etiket Oluştur branch.name=Dal Adı branch.search=Dalları ara @@ -1877,12 +2067,23 @@ branch.restore='%s' Dalını Geri Yükle branch.download='%s' Dalını İndir branch.included_desc=Bu dal varsayılan dalın bir parçasıdır branch.included=Dahil +branch.create_new_branch=Şu daldan dal oluştur: +branch.confirm_create_branch=Dal oluştur +branch.new_branch=Yeni dal oluştur +branch.new_branch_from='%s' dalından yeni dal oluştur + +tag.create_tag=%s etiketi oluştur +tag.create_success='%s' etiketi oluşturuldu. topic.manage_topics=Konuları Yönet topic.done=Bitti topic.count_prompt=25'ten fazla konu seçemezsiniz topic.format_prompt=Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir. +error.csv.too_large=Bu dosya çok büyük olduğu için işlenemiyor. +error.csv.unexpected=%d satırı ve %d sütununda beklenmeyen bir karakter içerdiğinden bu dosya işlenemiyor. +error.csv.invalid_field_count=%d satırında yanlış sayıda alan olduğundan bu dosya işlenemiyor. + [org] org_name_holder=Organizasyon Adı org_full_name_holder=Organizasyon Tam Adı @@ -1926,6 +2127,7 @@ settings.visibility.private_shortname=Özel settings.update_settings=Ayarları Güncelle settings.update_setting_success=Organizasyon ayarları güncellendi. settings.change_orgname_prompt=Not: Organizasyon adını değiştirmek, kuruluşun URL’sini de değiştirir. +settings.change_orgname_redirect_prompt=Eski ad, talep edilene kadar yeniden yönlendirilecektir. settings.update_avatar_success=Organizasyonun resmi güncellendi. settings.delete=Organizasyonu Sil settings.delete_account=Bu Organizasyonu Sil @@ -1997,8 +2199,7 @@ dashboard=Pano users=Kullanıcı Hesapları organizations=Organizasyonlar repositories=Depolar -hooks=Varsayılan Web İstemcileri -systemhooks=Sistem Web İstemcileri +hooks=Web İstemcileri authentication=Yetkilendirme Kaynakları emails=Kullanıcı E-postaları config=Yapılandırma @@ -2030,7 +2231,7 @@ dashboard.cron.error=Cron Hatası: %s: %[3]s dashboard.cron.finished=Cron: %[1]s bitti dashboard.delete_inactive_accounts=Etkinleştirilmemiş tüm hesapları sil dashboard.delete_inactive_accounts.started=Etkinleştirilmemiş tüm hesapları silme görevi başladı. -dashboard.delete_repo_archives=Tüm arşiv depoları sil +dashboard.delete_repo_archives=Tüm depoların arşivlerini (ZIP, TAR.GZ, vb.) sil dashboard.delete_repo_archives.started=Tüm depo arşivlerini silme görevi başladı. dashboard.delete_missing_repos=Git dosyaları eksik olan tüm depoları sil dashboard.delete_missing_repos.started=Git dosyaları eksik olan tüm depoları silme görevi başladı. @@ -2049,6 +2250,7 @@ dashboard.resync_all_sshprincipals.desc=(Yerleşik SSH sunucusu için gerekli de dashboard.resync_all_hooks=Tüm depoların alma öncesi, güncelleme ve alma sonrası kancalarını yeniden senkronize edin. dashboard.reinit_missing_repos=Kayıtları bulunanlar için tüm eksik Git depolarını yeniden başlat dashboard.sync_external_users=Harici kullanıcı verisini senkronize et +dashboard.cleanup_hook_task_table=Hook_task tablosunu temizleme dashboard.server_uptime=Sunucunun Ayakta Kalma Süresi dashboard.current_goroutine=Güncel Goroutine'ler dashboard.current_memory_usage=Güncel Bellek Kullanımı @@ -2078,6 +2280,8 @@ dashboard.total_gc_time=Toplam GC Durması dashboard.total_gc_pause=Toplam GC Durması dashboard.last_gc_pause=Son GC Durması dashboard.gc_times=GC Zamanları +dashboard.delete_old_actions=Veritabanından tüm eski eylemleri sil +dashboard.delete_old_actions.started=Veritabanından başlatılan tüm eski eylemleri silin. users.user_manage_panel=Kullanıcı Hesap Yönetimi users.new_account=Yeni Kullanıcı Hesabı @@ -2086,7 +2290,7 @@ users.full_name=Tam İsim users.activated=Aktifleştirilmiş users.admin=Yönetici users.restricted=Kısıtlanmış -users.2fa=2ED +users.2fa=2FD users.repos=Depolar users.created=Oluşturuldu users.last_login=Son Oturum Açma @@ -2115,6 +2319,7 @@ users.delete_account=Kullanıcı Hesabını Sil users.still_own_repo=Bu kullanıcı hala bir veya daha fazla depoya sahip. Önce bu depoları silin veya transfer edin. users.still_has_org=Bu kullanıcı bir organizasyonun üyesidir. Önce kullanıcıyı tüm organizasyonlardan çıkarın. users.deletion_success=Kullanıcı hesabı silindi. +users.reset_2fa=2FD'yi sıfırla emails.email_manage_panel=Kullanıcı E-posta Yönetimi emails.primary=Birincil @@ -2147,11 +2352,13 @@ repos.forks=Çatallar repos.issues=Konular repos.size=Boyut -hooks.desc=Web İstemcileri, belirli Gitea olayları tetiklendiğinde otomatik olarak HTTP POST isteklerini sunucuya yapar. Burada tanımlanan Web İstemcileri varsayılandır ve tüm yeni depolara kopyalanır. web istemcileri kılavuzunda daha fazla bilgi edinin. -hooks.add_webhook=Varsayılan Web İstemcisi Ekle -hooks.update_webhook=Varsayılan Web İstemcisini Güncelle +defaulthooks=Varsayılan Web İstemcileri +defaulthooks.desc=Web İstemcileri, belirli Gitea olayları tetiklendiğinde otomatik olarak HTTP POST isteklerini sunucuya yapar. Burada tanımlanan Web İstemcileri varsayılandır ve tüm yeni depolara kopyalanır. web istemcileri kılavuzunda daha fazla bilgi edinin. +defaulthooks.add_webhook=Varsayılan Web İstemcisi Ekle +defaulthooks.update_webhook=Varsayılan Web İstemcisini Güncelle -systemhooks.desc=Belirli Gitea olayları tetiklendiğinde Web istemcileri otomatik olarak bir sunucuya HTTP POST istekleri yapar. Tanımlanan web istemcileri sistemdeki tüm depolar üzerinde çalışır, bu yüzden lütfen bunun olabilecek tüm performans sonuçlarını göz önünde bulundurun. web istemcileri kılavuzunda daha fazla bilgi edinin. +systemhooks=Sistem Web İstemcileri +systemhooks.desc=Belirli Gitea olayları tetiklendiğinde Web istemcileri otomatik olarak bir sunucuya HTTP POST istekleri yapar. Burada tanımlanan web istemcileri sistemdeki tüm depolar üzerinde çalışır, bu yüzden lütfen bunun olabilecek tüm performans sonuçlarını göz önünde bulundurun. web istemcileri kılavuzunda daha fazla bilgi edinin. systemhooks.add_webhook=Sistem Web İstemcisi Ekle systemhooks.update_webhook=Sistem Web İstemcisi Güncelle @@ -2170,7 +2377,6 @@ auths.host=Sunucu auths.port=Bağlantı Noktası auths.bind_dn=Bağlama DN'i auths.bind_password=Bağlama Parolası -auths.bind_password_helper=Uyarı: Bu parola düz metin olarak saklanır. Mümkünse salt okunur bir hesap kullanın. auths.user_base=Kullanıcı Arama Tabanı auths.user_dn=Kullanıcı DN'i auths.attribute_username=Kullanıcı Adı Özelliği @@ -2198,9 +2404,9 @@ auths.smtphost=SMTP Sunucusu auths.smtpport=SMTP Portu auths.allowed_domains=İzin Verilen Alan Adları auths.allowed_domains_helper=Tüm alanlara izin vermek için boş bırakın. Birden çok alan adını virgülle (',') ayırın. -auths.enable_tls=TLS Şifrelemeyi Aktifleştir auths.skip_tls_verify=TLS Doğrulamasını Atla auths.pam_service_name=PAM Servis Adı +auths.pam_email_domain=PAM E-posta Alan adı (tercihen) auths.oauth2_provider=OAuth2 Sağlayıcısı auths.oauth2_icon_url=Simge URL'si auths.oauth2_clientID=İstemci Kimliği (Anahtar) @@ -2300,6 +2506,7 @@ config.db_path=Yol config.service_config=Servis Yapılandırması config.register_email_confirm=Kayıt Olmak İçin E-posta Onayı Gereksin config.disable_register=Kullanıcı Kaydını Devre Dışı Bırak +config.allow_only_internal_registration=Kayda Sadece Gitea'nın Kendisi Üzerinden İzin Ver config.allow_only_external_registration=Sadece Dış Hizmetler Aracılığıyla Kullanıcı Kaydına İzin Ver config.enable_openid_signup=OpenID Kendinden Kaydı'nı Etkinleştir config.enable_openid_signin=OpenID Oturum Açmayı Etkinleştiriniz @@ -2376,7 +2583,6 @@ config.git_gc_timeout=GC İşlemi Zaman Aşımı config.log_config=Log Yapılandırması config.log_mode=Log Modu -config.macaron_log_mode=Macaron Günlük Kipi config.own_named_logger=Adlandırılmış Günlük Kaydedicisi config.routes_to_default_logger=Varsayılan Günlük Kaydedicisine Yönlendirir config.go_log=Go Log kullanılır (varsayılana yönlendirilir) @@ -2482,18 +2688,21 @@ comment_issue=`%s#%[2]s konusuna yorum yazdı` comment_pull=`%s#%[2]s değişiklik isteği üzerinde yorum yapıldı` merge_pull_request=`%s#%[2]s değişiklik isteğini birleştirdi` transfer_repo=depo %s %s'a aktarıldı -push_tag=%[3]s deposuna %[2]s etiketi itildi +push_tag=%[4]s etiketini %[3]s konumuna gönderdi delete_tag=%[2]s etiketi %[3]s deposundan silindi delete_branch=%[3]s deposundan %[2]s dalı silindi compare_branch=Karşılaştır compare_commits=%d işlemeyi karşılaştır compare_commits_general=İşlemeleri karşılaştır -mirror_sync_push=işlemeler yansıdan %[4]s deposundaki %[3]s dalına eşitlendi -mirror_sync_create=%[2]s referansı %[3]s için yansıdan senkronize edildi -mirror_sync_delete=%[3]s adresindeki %[2]s referansı eşitlendi ve silindi -approve_pull_request=`%s#%[2]s onaylandı` +mirror_sync_push=yansıdan işlemeleri %[4]s deposundaki %[3]s dalına eşitledi +mirror_sync_create=%[2]s referansını %[3]s için yansıdan senkronize etti +mirror_sync_delete=%[3]s adresindeki %[2]s referansını eşitledi ve sildi +approve_pull_request=`%s#%[2]s isteğini onayladı` reject_pull_request=`%s#%[2]s için değişiklik önerdi ` publish_release=` %[3]s deposunda "%[4]s" sürümü yayınlandı` +review_dismissed=`%[3]s#%[2]s için %[4]s tarafından incelemeyi reddetti` +review_dismissed_reason=Sebep: +create_branch=%[4]s içinde %[3]s dalını oluşturdu [tool] ago=%s önce diff --git a/options/locale/locale_uk-UA.ini b/options/locale/locale_uk-UA.ini index a3adc11f5..4d6019ba6 100644 --- a/options/locale/locale_uk-UA.ini +++ b/options/locale/locale_uk-UA.ini @@ -15,16 +15,19 @@ page=Сторінка template=Шаблон language=Мова notifications=Сповіщення +active_stopwatch=Трекер робочого часу create_new=Створити… user_profile_and_more=Профіль і налаштування… signed_in_as=Увійшов як enable_javascript=Цей веб-сайт працює краще з JavaScript. toc=Зміст licenses=Ліцензії +return_to_gitea=Повернутися до Gitea username=Ім'я кристувача email=Адреса електронної пошти password=Пароль +access_token=Токен Доступу re_type=Введіть пароль ще раз captcha=CAPTCHA twofa=Двофакторна авторизація @@ -73,20 +76,27 @@ pull_requests=Запити на злиття issues=Проблеми milestones=Етапи +ok=OK cancel=Відмінити save=Зберегти add=Додати add_all=Додати все remove=Видалити remove_all=Видалити все +edit=Редагувати write=Писати preview=Попередній перегляд loading=Завантаження… +step1=Крок 1: +step2=Крок 2: +error=Помилка error404=Сторінка, до якої ви намагаєтеся звернутися або до , не існує або Ви не маєте права на її перегляд. +never=Ніколи + [error] occurred=Сталася помилка report_message=Якщо ви впевнені, що це помилка Gitea, будь ласка, спробуйте відшукати відповідну проблему на GitHub та за відсутності створіть нову. @@ -199,6 +209,8 @@ default_enable_timetracking=Увімкнути відстеження часу default_enable_timetracking_popup=Включити відстеження часу для нових репозиторіїв за замовчуванням. no_reply_address=Прихований поштовий домен no_reply_address_helper=Доменне ім'я для користувачів із прихованою електронною адресою. Наприклад, ім'я користувача 'joe' буде входити в Git як 'joe@noreply.example.org', якщо для прихованого домену електронної пошти встановлено 'noreply.example.org'. +password_algorithm=Алгоритм хешування пароля +password_algorithm_helper=Встановіть алгоритм хешування пароля. Алгоритми мають різні вимоги та силу. `argon2` незважаючи на хороші характеристики використовує багато пам'яті і може бути недоцільним для малих систем. [home] uname_holder=Ім'я користувача або Ел. пошта @@ -212,6 +224,7 @@ my_mirrors=Мої дзеркала view_home=Переглянути %s search_repos=Шукати репозиторій… filter=Інші фільтри +filter_by_team_repositories=Фільтрувати за репозиторіями команд show_archived=Архівовані show_both_archived_unarchived=Показано архівовані і не архівовані @@ -231,6 +244,8 @@ users=Користувачі organizations=Організації search=Пошук code=Код +search.fuzzy=Неточний +search.match=Відповідність repo_no_results=Відповідних репозиторіїв не знайдено. user_no_results=Відповідних користувачів не знайдено. org_no_results=Відповідних організацій не знайдено. @@ -244,6 +259,7 @@ register_helper_msg=Вже зареєстровані? Увійдіть зара social_register_helper_msg=Вже є аккаунт? Зв'яжіть його зараз! disable_register_prompt=Вибачте, можливість реєстрації відключена. Будь ласка, зв'яжіться з адміністратором сайту. disable_register_mail=Підтвердження реєстрації електронною поштою вимкнено. +remember_me=Запам’ятати цей пристрій forgot_password_title=Забув пароль forgot_password=Забули пароль? sign_up_now=Потрібен обліковий запис? Зареєструйтеся зараз. @@ -276,6 +292,7 @@ twofa_scratch_token_incorrect=Невірний одноразовий парол login_userpass=Увійти login_openid=OpenID oauth_signup_tab=Зареєструвати обліковий запис +oauth_signup_title=Повний новий обліковий запис oauth_signup_submit=Повний обліковий запис oauth_signin_tab=Посилання на існуючий обліковий запис oauth_signin_title=Увійдіть щоб авторизувати пов'язаний обліковий запис @@ -286,7 +303,8 @@ openid_connect_desc=Вибраний OpenID URI невідомий. Пов'яж openid_register_title=Створити новий обліковий запис openid_register_desc=Вибраний OpenID URI невідомий. Пов'яжіть йогоз новим обліковим записом тут. openid_signin_desc=Введіть свій ідентифікатор OpenID. Наприклад: https://anne.me, bob.openid.org.cn або gnusocial.net/carry. -disable_forgot_password_mail=Відновлення облікового запису вимкнено. Зверніться до адміністратора сайту. +disable_forgot_password_mail=Відновлення облікового запису вимкнено, оскільки не налаштована електронна пошта. Будь ласка, зв'яжіться з адміністратором сайту. +disable_forgot_password_mail_admin=Відновлення облікового запису доступне лише після налаштування електронної пошти. Будь ласка, налаштуйте ел. пошту для відновлення облікового запису. email_domain_blacklisted=З вказаним email реєстрація неможлива. authorize_application=Авторизувати програму authorize_redirect_notice=Вас буде переадресовано до %s, якщо ви авторизуєте цю програму. @@ -296,13 +314,65 @@ authorize_title=Авторизуйвати "%s" для доступу до ва authorization_failed=Помилка авторизації authorization_failed_desc=Авторизація не вдалася, оскільки ми виявили недійсний запит. Зверніться до супровідника програми, яку ви намагалися авторизувати. sspi_auth_failed=Помилка SSPI-автентифікації +password_pwned=Вибраний вами пароль знаходиться в списку вкрадених паролів раніше викритих у витоках публічних даних. Будь ласка, спробуйте ще раз з іншим паролем. +password_pwned_err=Не вдалося виконати запит до HaveIBeenPwed [mail] +view_it_on=Переглянути на %s +link_not_working_do_paste=Не працює? Спробуйте скопіювати та вставити його в свій браузер. +hi_user_x=Привіт %s, + activate_account=Будь ласка, активуйте ваш обліковий запис +activate_account.title=%s, будь ласка, активуйте свій обліковий запис + activate_email=Підтвердить вашу адресу електронної пошти -reset_password=Відновлення вашого облікового запису -register_success=Реєстрація успішна +activate_email.title=%s, будь ласка, підтвердіть вашу адресу електронної пошти +activate_email.text=Перейдіть за цим посиланням, щоб підтвердити вашу електронну адресу в %s: + register_notify=Ласкаво просимо у Gitea +register_notify.title=%[1]s, ласкаво просимо до %[2]s +register_notify.text_1=це ваша е-пошта для підтвердження реєстрації для %s! +register_notify.text_2=Тепер ви можете увійти як: %s. +register_notify.text_3=Якщо цей обліковий запис було створено для вас, будь ласка, спочатку встановіть свій пароль. + +reset_password=Відновлення вашого облікового запису +reset_password.title=%s, ви відправили запит на відновлення облікового запису +reset_password.text=Перейдіть за цим посиланням, щоб відновити ваш обліковий запис в %s: + +register_success=Реєстрація успішна + +issue_assigned.pull=@%[1]s призначив вам запит на злиття %[2]s в репозиторії %[3]s. +issue_assigned.issue=@%[1]s призначив вам проблему %[2]s у репозиторії %[3]s. + +issue.x_mentioned_you=@%s згадав вас: +issue.action.force_push=%[1]s force-pushed %[2]s з %[3]s в %[4]s. +issue.action.push_n=@%[1]s відправив %[3]d коміти до %[2]s +issue.action.close=@%[1]s закрито #%[2]d. +issue.action.reopen=@%[1] заново відкрив #%[2]d. +issue.action.merge=@%[1]s об'єднав #%[2]d до %[3]s. +issue.action.approve=@%[1]s затвердили цей запит на злиття. +issue.action.reject=@%[1]s запитують зміни на цей запит на злиття. +issue.action.review=@%[1]s прокоментували цей запит на злиття. +issue.action.review_dismissed=@%[1]s відхилено останній відгук від %[2]s для цього запиту на злиття. +issue.action.ready_for_review=@%[1]s позначили цей запит на злиття як готовий до розгляду. +issue.action.new=@%[1]s створили #%[2]d. +issue.in_tree_path=В %s: + +release.new.subject=%s в %s випущено +release.new.text=@%[1]s випустив %[2]s в %[3]s +release.title=Назва: %s +release.note=Примітка: +release.downloads=Звантаження: +release.download.zip=Вихідний код (ZIP) +release.download.targz=Вихідний код (TAR.GZ) + +repo.transfer.subject_to=%s бажає передати"%s" в %s +repo.transfer.subject_to_you=%s бажає передати"%s" вам +repo.transfer.to_you=вам +repo.transfer.body=Щоб прийняти або відхилити перейдіть до %s або просто ігноруйте. + +repo.collaborator.added.subject=%s додав вас до %s +repo.collaborator.added.text=Ви були додані в якості співавтора репозиторію: [modal] yes=Так @@ -343,19 +413,26 @@ email_error=` не є адресою електронної пошти.` url_error=` не є припустимою URL-Адресою.` include_error=`повинен бути текст '%s'` glob_pattern_error=` неприпустимий шаблон glob: %s.` +regex_pattern_error=` неприпустимий шаблон regex: %s.` unknown_error=Невідома помилка: captcha_incorrect=Код CAPTCHA неправильний. password_not_match=Паролі не співпадають. lang_select_error=Оберіть мову з переліку. username_been_taken=Ім'я користувача вже зайнято. +username_change_not_local_user=Нелокальні користувачі не можуть змінити своє ім'я користувача. repo_name_been_taken=Ім'я репозіторію вже використовується. +repository_files_already_exist=Файли вже існують для цього репозитарію. Зверніться до системного адміністратора. +repository_files_already_exist.adopt=Файли вже існують для цього репозиторію і можуть бути лише прийняті. +repository_files_already_exist.delete=Файли вже існують для цього сховища. Ви повинні видалити їх. +repository_files_already_exist.adopt_or_delete=Файли вже існують для цього репозиторію. Їх можливо прийняти або видалити. visit_rate_limit=Обмеження швидкості віддаленого доступу. 2fa_auth_required=Для віддаленого доступу необхідна двуфакторна аутентифікація. org_name_been_taken=Назва організації вже зайнято. team_name_been_taken=Назва команди вже зайнято. team_no_units_error=Дозволити доступ до принаймні одного розділу репозитарію. email_been_used=Ця електронна адреса вже використовується. +email_invalid=Адреса електронної пошти помилкова. openid_been_used=OpenID адреса '%s' вже використовується. username_password_incorrect=Неправильне ім'я користувача або пароль. password_complexity=Пароль не відповідає вимогам до складності: @@ -364,14 +441,17 @@ password_uppercase_one=Принаймні одна буква в верхньо password_digit_one=Принаймні одна цифра password_special_one=Принаймні один спеціальний символ (пунктуація, дужки, лапки тощо) enterred_invalid_repo_name=Невірно введено ім'я репозиторію. +enterred_invalid_org_name=Невірно введено ім'я організації. enterred_invalid_owner_name=Ім'я нового власника не є дійсним. enterred_invalid_password=Введений вами пароль некоректний. user_not_exist=Даний користувач не існує. team_not_exist=Команда не існує. +last_org_owner=Ви не можете видалити останнього користувача з команди 'власники'. У кожній команді має бути принаймні один власник. cannot_add_org_to_team=Організацію неможливо додати як учасника команди. invalid_ssh_key=Неможливо перевірити ваш SSH ключ: %s invalid_gpg_key=Неможливо перевірити ваш GPG ключ: %s +invalid_ssh_principal=Некоректний відповідальний: %s unable_verify_ssh_key=Не вдається підтвердити ключ SSH; подвійно перевірте його на наявність похибки. auth_failed=Помилка автентифікації: %v @@ -388,6 +468,7 @@ repositories=Репозиторії activity=Публічна активність followers=Читачі starred=Обрані Репозиторії +watched=Відстежувані репозиторії projects=Проекти following=Читає follow=Підписатися @@ -419,6 +500,7 @@ uid=Ідентифікатор Uid u2f=Ключі безпеки public_profile=Загальнодоступний профіль +biography_placeholder=Розкажіть трохи про себе profile_desc=Ваша адреса електронної пошти використовуватиметься для сповіщення та інших операцій. password_username_disabled=Нелокальним користувачам заборонено змінювати ім'я користувача. Щоб отримати докладнішу інформацію, зв'яжіться з адміністратором сайту. full_name=Повне ім'я @@ -426,9 +508,11 @@ website=Веб-сайт location=Місцезнаходження update_theme=Оновити тему update_profile=Оновити профіль +update_language_not_found=Мова '%s' недоступна. update_profile_success=Профіль успішно оновлено. change_username=Ваше Ім'я кристувача було змінено. change_username_prompt=Примітка. Зміни в імені також змінюють URL-адресу облікового запису. +change_username_redirect_prompt=Старе ім'я користувача буде перенаправлено до тих пір, поки воно не буде затверджено. continue=Продовжити cancel=Відмінити language=Мова @@ -489,32 +573,41 @@ keep_email_private_popup=Вашу адресу електронної пошти openid_desc=OpenID дозволяє делегувати аутентифікацію зовнішньому постачальнику послуг. manage_ssh_keys=Керувати SSH ключами +manage_ssh_principals=Управління SSH сертифікатами користувачів manage_gpg_keys=Керувати GPG ключами add_key=Додати ключ ssh_desc=Ці відкриті SSH-ключі пов'язані з вашим обліковим записом. Відповідні приватні ключі дозволяють отримати повний доступ до ваших репозиторіїв. +principal_desc=Ці настройки SSH сертифікатів вказані у вашому обліковому записі та надають повний доступ до ваших репозиторіїв. gpg_desc=Ці публічні ключі GPG пов'язані з вашим обліковим записом. Тримайте свої приватні ключі в безпеці, оскільки вони дозволяють здійснювати перевірку комітів. ssh_helper=Потрібна допомога? Дивіться гід на GitHub з генерації ключів SSH або виправлення типових неполадок SSH. gpg_helper= Потрібна допомога? Перегляньте посібник GitHub про GPG . add_new_key=Додати SSH ключ add_new_gpg_key=Додати GPG ключ -key_content_ssh_placeholder=Починається з 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384' або 'ecdsa-sha2-nistp521' +key_content_ssh_placeholder=Починається з 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', або 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=Починається з '-----BEGIN PGP PUBLIC KEY BLOCK-----' +add_new_principal=Додати користувача ssh_key_been_used=Цей SSH ключ вже був додано до сервера. +ssh_key_name_used=Ключ SSH з таким ім'ям вже існує у вашому обліковому записі. +ssh_principal_been_used=Цей користувач вже був доданий на сервер. gpg_key_id_used=Публічний ключ GPG з таким самим ідентифікатором вже існує. -gpg_no_key_email_found=Цей ключ GPG непридатний для використання з будь-якою електронною адресою, що пов'язана з вашим обліковим записом. subkeys=Підключі key_id=ID ключа key_name=Ім'я ключа key_content=Зміст +principal_content=Зміст add_key_success=SSH ключ '%s' додано. add_gpg_key_success=GPG ключ '%s' додано. +add_principal_success=Було додано SSH сертификат користувача '%s'. delete_key=Видалити ssh_key_deletion=Видалити SSH ключ gpg_key_deletion=Видалити GPG ключ +ssh_principal_deletion=Видалити SSH сертифікат користувача ssh_key_deletion_desc=Видалення ключа SSH скасовує доступ до вашого облікового запису. Продовжити? gpg_key_deletion_desc=Видалення GPG ключа скасовує перевірку підписаних ним комітів. Продовжити? +ssh_principal_deletion_desc=Видалення ключа SSH скасовує доступ до вашого облікового запису. Продовжити? ssh_key_deletion_success=SSH ключ був видалений. gpg_key_deletion_success=GPG було видалено. +ssh_principal_deletion_success=Користувача видалено. add_on=Додано valid_until=Дійсний до valid_forever=Дійсний завжди @@ -524,9 +617,11 @@ can_read_info=Читати can_write_info=Написати key_state_desc=Цей ключ використовувався в останні 7 днів token_state_desc=Цей токен використовувався в останні 7 днів +principal_state_desc=Участник був на сайті в останні 7 днів show_openid=Показати у профілю hide_openid=Не показувати у профілі ssh_disabled=SSH вимкнено +ssh_externally_managed=Цей ключ SSH має зовнішнє управління для цього користувача manage_social=Керувати зв'язаними обліковими записами соціальних мереж social_desc=Ці адреси соціальних мереж пов'язані з вашим обліковим записом Gitea. Переконайтеся, що ви їх впізнаєте, оскільки вони можуть бути використані для входу в обліковий запис Gitea. unbind=Від'єднати @@ -593,6 +688,7 @@ or_enter_secret=Або введіть секрет: %s then_enter_passcode=І введіть пароль, який відображається в додатку: passcode_invalid=Некоректний пароль. Спробуй ще раз. twofa_enrolled=Для вашого облікового запису було включена двофакторна автентифікація. Зберігайте свій scratch-токен (%s) у безпечному місці, оскільки він показується лише один раз! +twofa_failed_get_secret=Не вдалося отримати секрет. u2f_desc=Ключами безпеки є апаратні пристрої що містять криптографічні ключі. Вони можуть бути використані для двофакторної автентифікації. Ключ безпеки повинен підтримувати стандарт FIDO U2F. u2f_require_twofa=Для використання ключів безпеки ваш обліковий запис має використовувати двофакторну автентифікацію. @@ -614,6 +710,7 @@ repos_none=У вас немає власних репозиторіїв delete_account=Видалити ваш обліковий запис delete_prompt=Ця операція остаточно видалить обліковий запис користувача. Це НЕ МОЖЛИВО відмінити. +delete_with_all_comments=Ваш обліковий запис молодший за %s днів. Щоб уникнути коментарів-привидів, всі запити/PR коментрарі будуть видалені з ним. confirm_delete_account=Підтвердження видалення delete_account_title=Видалити цей обліковий запис delete_account_desc=Ви впевнені, що хочете остаточно видалити цей обліковий запис? @@ -623,8 +720,18 @@ email_notifications.onmention=Повідомлення email тільки кол email_notifications.disable=Вимкнути email сповіщення email_notifications.submit=Налаштувати параметри email +visibility=Видимість користувача +visibility.public=Публічний +visibility.public_tooltip=Видимий для всіх користувачів +visibility.limited=Обмежений +visibility.limited_tooltip=Видимий лише для користувачів, що ввійшли в систему +visibility.private=Приватний +visibility.private_tooltip=Видимий лише членам організації + [repo] +new_repo_helper=Репозиторій містить усі файли проекту, включаючи історію ревізій. Ще десь є? Мігрувати репозиторій. owner=Власник +owner_helper=Деякі організації можуть не відображатися у випадаючому списку через максимальну кількість репозиторііїв. repo_name=Назва репозиторію repo_name_helper=Хороші назви репозиторіїв використовують короткі, унікальні ключові слова що легко запам'ятати. repo_size=Розмір репозиторію @@ -645,26 +752,43 @@ use_template=Застосувати цей шаблон generate_repo=Згенерувати репозиторій generate_from=Генерувати з repo_desc=Опис +repo_desc_helper=Введіть короткий опис (опціонально) repo_lang=Мова repo_gitignore_helper=Виберіть шаблон .gitignore. +repo_gitignore_helper_desc=Оберіть з списку мовних шаблонів файли, які не будуть відстежуватись. Типові артефакти, які генеруються за допомогою інструментів побудови кожної мови, за замовчуванням включені до .gitignor. issue_labels=Мітки проблем issue_labels_helper=Вибрати мітку для проблеми. license=Ліцензія license_helper=Виберіть ліцензійний файл. +license_helper_desc=Ліцензія регулює те, що інші можуть і не можуть робити з вашим кодом. Не впевнені, що саме підходить для вашого проекту? Дивіться Виберіть ліцензію. readme=README readme_helper=Виберіть шаблон README. +readme_helper_desc=Це місце, де ви можете написати повний опис вашого проекту. auto_init=Ініціалізувати репозиторій (Додає .gitignore, LICENSE та README) +trust_model_helper=Виберіть модель довіри для підтвердження підпису. Можливі варіанти: +trust_model_helper_collaborator=Співавтор: підписи довіри від співавторів +trust_model_helper_committer=Учасник: довірені підписи участників +trust_model_helper_collaborator_committer=Співавтор+Комітер: довірчі підписи від співавторів, які відповідають комітеру +trust_model_helper_default=За замовчуванням: використовувати стандартну модель довіри для цієї установки create_repo=Створити репозиторій default_branch=Головна гілка +default_branch_helper=Гілка за замовчуванням є базовою гілкою для запитів на злиття та комітів коду. mirror_prune=Очистити mirror_prune_desc=Видалення застарілих посилань які ви відслідковуєте mirror_interval=Інтервал дзеркалювання (допустимі значення 'h', 'm', 's'). 0 - щоб вимкнути автоматичну синхронізацію. mirror_interval_invalid=Інтервал дзеркалювання є неприпустимим. mirror_address=Клонування з URL-адреси -mirror_address_desc=Покласти будь-які необхідні облікові дані у розділі клонування авторизації. +mirror_address_desc=Помістіть будь-які необхідні облікові дані у розділі Авторизація. mirror_address_url_invalid=Надана URL-адреса є неприпустимою. Ви повинні екранувати всі компоненти URL-адреси правильно. mirror_address_protocol_invalid=Надана URL-адреса є неприпустимою. Тільки http(s):// або git:// можливо використовувати при дзеркальні. +mirror_lfs=Склад великих файлів (LFS) +mirror_lfs_desc=Активувати дзеркальне відображення даних LFS. +mirror_lfs_endpoint=Кінцева точка LFS +mirror_lfs_endpoint_desc=Синхронізація спробує використовувати url для клону щоб визначити LFS-сервер. Ви також можете вказати кінцеву точку користувача, якщо дані репозиторію LFS зберігаються в іншому місці. mirror_last_synced=Остання синхронізація +mirror_password_placeholder=(без змін) +mirror_password_blank_placeholder=(відключено) +mirror_password_help=Змініть ім'я користувача, щоб видалити збережений пароль. watchers=Спостерігачі stargazers=Зацікавлені forks=Форки @@ -672,6 +796,22 @@ pick_reaction=Залиште свою оцінку reactions_more=додати %d більше unit_disabled=Адміністратор сайту вимкнув цей розділ репозиторію. language_other=Інші +adopt_search=Введіть ім'я користувача для пошуку неприйнятних репозиторіїв... (залиште порожнім, щоб знайти всі) +adopt_preexisting_label=Прийняті файли +adopt_preexisting=Прийняти вже існуючі файли +adopt_preexisting_content=Створити репозиторій з %s +adopt_preexisting_success=Прийняти файли та створити репозиторій з %s +delete_preexisting_label=Видалити +delete_preexisting=Видалити існуючі файли +delete_preexisting_content=Видалити файли з %s +delete_preexisting_success=Видалено неприйняті файли в %s + +transfer.accept=Дозволити трансфер +transfer.accept_desc=Перемістити до "%s" +transfer.reject=Відхилити трансфер +transfer.reject_desc=Скасувати переміщення до "%s" +transfer.no_permission_to_accept=У вас немає дозволу на прийняття +transfer.no_permission_to_reject=У вас немає дозволу для відхилення desc.private=Приватний desc.public=Публічний @@ -696,36 +836,61 @@ archive.title=Це архівний репозитарій. Ви можете п archive.issue.nocomment=Це архівний репозитарій. Ви не можете коментувати запити. archive.pull.nocomment=Це архівний репозитарій. Ви не можете коментувати пулл-реквести. -form.reach_limit_of_creation=Ви досягли максимальної кількості %d створених репозиторіїв. +form.reach_limit_of_creation_1=Ви вже досягли ліміту в %d репозиторіїв. +form.reach_limit_of_creation_n=Ви досягли максимальної кількості %d створених репозиторіїв. form.name_reserved=Назву репозиторію '%s' зарезервовано. form.name_pattern_not_allowed=Шаблон '%s' не дозволено в назві репозиторія. -need_auth=Клонувати з авторизацією +need_auth=Авторизація +migrate_options=Параметри міграції +migrate_service=Сервіс міграції +migrate_options_mirror_helper=Цей репозиторій буде дзеркалом +migrate_options_mirror_disabled=Адміністратор вашого сайту вимкнув створення нових дзеркал. +migrate_options_lfs=Перенесення LFS файлів +migrate_options_lfs_endpoint.label=Кінцева точка LFS +migrate_options_lfs_endpoint.description=Міграція буде намагатися використовувати ваш Git віддалено, щоб визначати LFS сервер. Ви також можете вказати свою кінцеву точку, якщо дані репозиторію LFS зберігаються в іншому місці. +migrate_options_lfs_endpoint.description.local=Також підтримуються шляхи на локальному сервері. +migrate_options_lfs_endpoint.placeholder=Залиште порожнім, щоб отримати з клонуванного URL migrate_items=Деталі міграції migrate_items_wiki=Вікі migrate_items_milestones=Етапи migrate_items_labels=Мітки migrate_items_issues=Проблеми migrate_items_pullrequests=Запити на злиття +migrate_items_merge_requests=Запити на злиття migrate_items_releases=Релізи migrate_repo=Перенести репозиторій migrate.clone_address=Міграція / клонувати з URL-адреси migrate.clone_address_desc=URL-адреса HTTP(S) або Git "clone" існуючого репозиторія migrate.clone_local_path=або шлях до локального серверу migrate.permission_denied=Вам не дозволено імпортувати локальні репозиторії. +migrate.permission_denied_blocked=Вам не дозволено імпортувати з заблокованих хостів. +migrate.permission_denied_private_ip=Вам не дозволено імпортувати з приватних IP-адрес. migrate.invalid_local_path=Локальний шлях недійсний. Він не існує або не є каталогом. +migrate.invalid_lfs_endpoint=Помилкова кінцева точка LFS. migrate.failed=Міграція не вдалася: %v -migrate.lfs_mirror_unsupported=Дзеркалювання LFS об'єктів не підтримується - використовуйте 'git lfs fetch --all' і 'git lfs push --all' вручну. +migrate.migrate_items_options=Для перенесення додаткових елементів потрібен токен доступу migrated_from=Перенесено з %[2]s migrated_from_fake=Перенесено з %[1]s +migrate.migrate=Міграція з %s migrate.migrating=Міграція із %s... migrate.migrating_failed=Міграція із %s не вдалася. +migrate.migrating_failed.error=Помилка: %s +migrate.migrating_git=Міграція Git даних +migrate.migrating_topics=Міграція тем +migrate.migrating_milestones=Міграція етапів +migrate.migrating_labels=Міграція міток +migrate.migrating_releases=Міграція релізів +migrate.migrating_issues=Міграція проблем +migrate.migrating_pulls=Міграція запитів на злиття mirror_from=дзеркало forked_from=форк від generated_from=згенеровано з fork_from_self=Ви не можете форкнути репозиторій, так як ви його власник. fork_guest_user=Увійдіть, щоб зробити форк репозитарію. +watch_guest_user=Увійдіть, щоб слідкувати за цим репозиторієм. +star_guest_user=Увійдіть, щоб додати в обране цей репозиторій. copy_link=Копіювати copy_link_success=Посилання було скопійоване copy_link_error=Натисніть ⌘-C або Ctrl-C, щоб скопіювати @@ -748,7 +913,9 @@ code=Код code.desc=Доступ до коду, файлів, комітів та гілок. branch=Гілка tree=Дерево +clear_ref=`Очистити поточне посилання` filter_branch_and_tag=Фільтрувати гілку або тег +find_tag=Знайти тег branches=Гілки tags=Теги issues=Проблеми @@ -761,9 +928,14 @@ org_labels_desc_manage=керувати milestones=Етап commits=Коміти commit=Коміт +release=Реліз releases=Релізи +tag=Тег +released_this=випущені релізи file_raw=Неформатований file_history=Історія +file_view_source=Переглянути вихідний код +file_view_rendered=Переглянути відрендерено file_view_raw=Перегляд Raw file_permalink=Постійне посилання file_too_large=Цей файл завеликий щоб бути показаним. @@ -772,6 +944,8 @@ audio_not_supported_in_browser=Ваш браузер не підтримує т stored_lfs=Збережено з Git LFS symbolic_link=Символічне посилання commit_graph=Графік комітів +commit_graph.select=Виберіть гілки +commit_graph.hide_pr_refs=Приховати запити на злиття commit_graph.monochrome=Монохром commit_graph.color=Колір blame=Звинувачення @@ -803,6 +977,7 @@ editor.add=Додати '%s' editor.update=Оновити '%s' editor.delete=Видалити '%s' editor.commit_message_desc=Додати необов'язковий розширений опис… +editor.signoff_desc=Додатиь Signed-off-by комітом в конці повідомлення журналу комітів. editor.commit_directly_to_this_branch=Зробіть коміт прямо в гілку %s. editor.create_new_branch=Створити нову гілку для цього коміту та відкрити запит на злиття. editor.create_new_branch_np=Створити нову гілку для цього коміту. @@ -821,8 +996,13 @@ editor.file_deleting_no_longer_exists=Видалений файл '%s' біль editor.file_changed_while_editing=Зміст файлу змінився з моменту початку редагування. Натисніть тут , щоб переглянути що було змінено, або закомітьте зміни ще раз, щоб переписати їх. editor.file_already_exists=Файл з назвою "%s" уже існує у цьому репозиторію. editor.commit_empty_file_header=Закомітити порожній файл +editor.commit_empty_file_text=Файл, в комміті порожній. Продовжити? editor.no_changes_to_show=Нема змін для показу. +editor.fail_to_update_file=Не вдалося оновити/створити файл '%s'. +editor.fail_to_update_file_summary=Помилка: editor.push_rejected_no_message=Зміна була відхилена сервером без повідомлення. Будь ласка, перевірте git-хуки. +editor.push_rejected=Зміни було відхилено сервером. Будь ласка, перевірте githook'и. +editor.push_rejected_summary=Повне повідомлення про відмову: editor.add_subdir=Додати каталог… editor.unable_to_upload_files=Не вдалося завантажити файли до '%s' через помилку: %v editor.upload_file_is_locked=Файл '%s' заблоковано %s. @@ -854,6 +1034,8 @@ ext_issues.desc=Посилання на зовнішню систему відс projects=Проєкти projects.desc=Керуйте проблемами та запитами злиття на дошках проєкту. +projects.description=Опис (необов'язково) +projects.description_placeholder=Опис projects.create=Створити проєкт projects.title=Назва projects.new=Новий проєкт @@ -877,6 +1059,8 @@ projects.board.edit_title=Нова назва дошки projects.board.new_title=Назва нової дошки projects.board.new_submit=Створити projects.board.new=Нова дошка +projects.board.set_default=Встановити за замовчуванням +projects.board.set_default_desc=Встановити цю дошку за замовчуванням для проблем без категорії та витягувань projects.board.delete=Видалити дошку projects.board.deletion_desc=Видалення дошки проєкту перенесе всі пов'язані проблеми в дошку 'Без категорії'. Продовжити? projects.open=Відкрити @@ -913,6 +1097,9 @@ issues.new.clear_assignees=Прибрати виконавеців issues.new.no_assignees=Немає виконавеця issues.new.no_reviewers=Немає рецензентів issues.new.add_reviewer_title=Попросити рецензію +issues.choose.get_started=Початок роботи +issues.choose.blank=Типово +issues.choose.blank_about=Створити задачу із шаблону за замовчуванням. issues.no_ref=Не вказана гілка або тег issues.create=Створити проблему issues.new_label=Нова мітка @@ -924,6 +1111,11 @@ issues.label_templates.info=Ще немає міток. Натисніть 'Но issues.label_templates.helper=Оберіть набір міток issues.label_templates.use=Використовувати набір міток issues.label_templates.fail_to_load_file=Не вдалося завантажити файл шаблона мітки '%s': %v +issues.add_label=додано %s з міткою %s +issues.add_labels=додано %s з мітками %s +issues.remove_label=видалено %s з міткою %s +issues.remove_labels=видалено %s з мітками %s +issues.add_remove_labels=додано %s і видалено %s мітками %s issues.add_milestone_at=`додав(ла) до %s етапу %s` issues.add_project_at=`додав до проєкту %s %s` issues.change_milestone_at=`змінено цільової етап з %s на %s %s` @@ -952,6 +1144,7 @@ issues.filter_type.all_issues=Всі проблеми issues.filter_type.assigned_to_you=Призначене вам issues.filter_type.created_by_you=Створено вами issues.filter_type.mentioning_you=Вас згадано +issues.filter_type.review_requested=Відгук запитано issues.filter_sort=Сортувати issues.filter_sort.latest=Найновіші issues.filter_sort.oldest=Найстаріші @@ -973,7 +1166,10 @@ issues.action_milestone_no_select=Етап відсутній issues.action_assignee=Виконавець issues.action_assignee_no_select=Немає виконавеця issues.opened_by=%[1]s відкрито %[3]s +pulls.merged_by=до %[3] злито %[1]s +pulls.merged_by_fake=%[2]s об'єднаний %[1]s issues.closed_by=закрито %[3]s %[1]s +issues.opened_by_fake=%[2]s відкрив(ла) %[1]s issues.closed_by_fake=закрито %[2]s %[1]s issues.previous=Попередній issues.next=Далі @@ -984,11 +1180,13 @@ issues.commented_at=`прокоментував(ла) %s` issues.delete_comment_confirm=Ви впевнені, що хочете видалити цей коментар? issues.context.copy_link=Скопіювати посилання issues.context.quote_reply=Цитувати відповідь +issues.context.reference_issue=Посилання в новій проблемі issues.context.edit=Редагувати issues.context.delete=Видалити issues.no_content=Тут ще немає жодного змісту. issues.close_issue=Закрити -issues.pull_merged_at=`злив коміт %[2]s в %[3]s %[4]s` +issues.pull_merged_at=`Злиті коміти %[2]s в %[3]s %[4]s` +issues.manually_pull_merged_at=`%[4]s вручну злив коміти %[2]s в %[3]s` issues.close_comment_issue=Прокоментувати і закрити issues.reopen_issue=Відкрити знову issues.reopen_comment_issue=Прокоментувати та відкрити знову @@ -1007,8 +1205,11 @@ issues.poster=Автор issues.collaborator=Співавтор issues.owner=Власник issues.re_request_review=Повторно попросити рецензію +issues.is_stale=З часу останньої перевірки в цей PR було внесено деякі зміни issues.remove_request_review=Видалити запит рецензування issues.remove_request_review_block=Неможливо видалити запит рецензування +issues.dismiss_review=Відхилити рецензiю +issues.dismiss_review_warning=Ви впевнені, що хочете відхилити цей відгук? issues.sign_in_require_desc=Підпишіться щоб приєднатися до обговорення. issues.edit=Редагувати issues.cancel=Відмінити @@ -1053,13 +1254,17 @@ issues.lock.title=Заблокувати обговорення цієї про issues.unlock.title=Розблокувати обговорення цієї проблеми. issues.comment_on_locked=Ви не можете коментувати заблоковану проблему. issues.tracker=Відстеження часу -issues.start_tracking_short=Запустити +issues.start_tracking_short=Запустити таймер issues.start_tracking=Почати відстеження часу issues.start_tracking_history=`почав працювати %s` issues.tracker_auto_close=Таймер буде автоматично зупинено, коли ця проблема буде закрита -issues.stop_tracking=Стоп +issues.tracking_already_started=`Ви вже почали відстежувати час для іншої проблеми!` +issues.stop_tracking=Зупинити таймер issues.stop_tracking_history=`перестав(-ла) працювати %s` +issues.cancel_tracking=Скасувати +issues.cancel_tracking_history=`скасував відстеження часу %s` issues.add_time=Вручну додати час +issues.del_time=Видалити цей журнал часу issues.add_time_short=Додати час issues.add_time_cancel=Відмінити issues.add_time_history=`додав(-ла) витрачений час %s` @@ -1067,8 +1272,6 @@ issues.del_time_history=`видалив витрачений час %s` issues.add_time_hours=Години issues.add_time_minutes=Хвилини issues.add_time_sum_to_small=Час не введено. -issues.cancel_tracking=Відмінити -issues.cancel_tracking_history=`скасував відстеження часу %s` issues.time_spent_total=Загальний витрачений час issues.time_spent_from_all_authors=`Загальний витрачений час: %s` issues.due_date=Дата завершення @@ -1077,7 +1280,7 @@ issues.error_modifying_due_date=Не вдалося змінити дату за issues.error_removing_due_date=Не вдалося видалити дату завершення. issues.push_commit_1=додав %d коміт %s issues.push_commits_n=додав %d коміти(-ів) %s -issues.force_push_codes=`виконав force-push %[1]s з %[2]s на %[4]s %[6]s` +issues.force_push_codes=`примусово залито %[1]s з %[2] до %[4]s %[6]s` issues.due_date_form=рррр-мм-дд issues.due_date_form_add=Додати дату завершення issues.due_date_form_edit=Редагувати @@ -1098,8 +1301,6 @@ issues.dependency.remove=Видалити issues.dependency.remove_info=Видалити цю залежність issues.dependency.added_dependency=`додав нову залежність %s` issues.dependency.removed_dependency=`видалив залежність %s` -issues.dependency.issue_closing_blockedby=Закриття цього запиту на злиття заблокує наступні проблеми -issues.dependency.pr_closing_blockedby=Закриття цієї проблеми заблокує наступні проблеми issues.dependency.issue_close_blocks=Ця проблема блокує закриття залежних проблем issues.dependency.pr_close_blocks=Цей пулл-реквест блокує закриття залежних проблем issues.dependency.issue_close_blocked=Вам потрібно закрити всі проблеми, що блокують цю проблему, перед її закриттям. @@ -1120,6 +1321,8 @@ issues.review.self.approval=Ви не можете схвалити власни issues.review.self.rejection=Ви не можете надіслати запит на зміну на власний пулл-реквест. issues.review.approve=зміни затверджено %s issues.review.comment=рецензовано %s +issues.review.dismissed=відхилено відгук %s %s +issues.review.dismissed_label=Відхилено issues.review.left_comment=додав коментар issues.review.content.empty=Запрошуючи зміни, ви зобов'язані залишити коментар з поясненнями своїх побажань відносно Pull Request'а. issues.review.reject=зробив запит змін %s @@ -1130,6 +1333,7 @@ issues.review.remove_review_request_self=відмовився рецензува issues.review.pending=Очікування issues.review.review=Рецензії issues.review.reviewers=Рецензенти +issues.review.outdated=Застарілі issues.review.show_outdated=Показати застарілі issues.review.hide_outdated=Приховати застарілі issues.review.show_resolved=Показати вирішене @@ -1138,6 +1342,10 @@ issues.review.resolve_conversation=Завершити обговорення issues.review.un_resolve_conversation=Поновити обговорення issues.review.resolved_by=позначив обговорення завершеним issues.assignee.error=Додано не всіх виконавців через непередбачену помилку. +issues.reference_issue.body=Тіло + +compare.compare_base=основа +compare.compare_head=порівняти pulls.desc=Увімкнути запити на злиття та огляд коду. pulls.new=Новий запит на злиття @@ -1148,6 +1356,7 @@ pulls.compare_compare=pull з pulls.filter_branch=Фільтр по гілці pulls.no_results=Результатів не знайдено. pulls.nothing_to_compare=Ці гілки однакові. Немає необхідності створювати запитів на злиття. +pulls.nothing_to_compare_and_allow_empty_pr=Одинакові гілки. Цей PR буде порожнім. pulls.has_pull_request=`Вже існує запит на злиття між двома цілями: %[2]s#%[3]d` pulls.create=Створити запит на злиття pulls.title_desc=хоче злити %[1]d комітів з %[2]s в %[3]s @@ -1160,19 +1369,28 @@ pulls.reopen_to_merge=Будь ласка перевідкрийте цей за pulls.cant_reopen_deleted_branch=Цей запит не можна повторно відкрити, оскільки гілку видалено. pulls.merged=Злито pulls.merged_as=Запит на злиття був влитиий як %[2]s. +pulls.manually_merged=Ручне злиття +pulls.manually_merged_as=Запит на злиття був вручну злитиий як %[2]s. pulls.is_closed=Запит на злиття було закрито. pulls.has_merged=Запит на злиття було об'єднано. pulls.title_wip_desc=`Почніть заголовок з %s щоб запобігти випадковому злиттю запитів.` -pulls.cannot_merge_work_in_progress=Цей пулл-реквест вже в стадії виконання. Видаліть префікс %s з заголовку після того як роботи будуть завершені +pulls.cannot_merge_work_in_progress=Цей пулл-реквест позначений як прийнятий в опрацювання. +pulls.still_in_progress=Все ще в процесі? +pulls.add_prefix=Додати префікс %s +pulls.remove_prefix=Видалити префікс %s pulls.data_broken=Зміст цього запиту було порушено внаслідок видалення інформації Форком. Цей запит тягнеться через відсутність інформації про вилучення. pulls.files_conflicted=Цей запит має зміни, що конфліктують з цільовою гілкою. pulls.is_checking=Триває перевірка конфліктів, будь ласка обновіть сторінку дещо пізніше. +pulls.is_empty=Ця гілка ідентична з цільовою гілкою. pulls.required_status_check_failed=Деякі необхідні перевірки виконані з помилками. pulls.required_status_check_missing=Декілька з необхідних перевірок відсутні. pulls.required_status_check_administrator=Як адміністратор ви все одно можете об'єднати цей запит на злиття. pulls.blocked_by_approvals=Цей pull-запит ще не має достатньо схвалень. %d від %d схвалень надано. pulls.blocked_by_rejection=Цей запит на злиття має запит змін від офіційного рецензента. +pulls.blocked_by_official_review_requests=Цей pull-запит має офіційні запити на перевірку. pulls.blocked_by_outdated_branch=Цей запит на злиття заблоковано, оскільки він застарів. +pulls.blocked_by_changed_protected_files_1=Цей pull-запит заблоковано, оскільки він змінює захищений файл: +pulls.blocked_by_changed_protected_files_n=Цей pull-запит заблоковано, оскільки він змінює захищені файли: pulls.can_auto_merge_desc=Цей запит можна об'єднати автоматично. pulls.cannot_auto_merge_desc=Цей запит на злиття не може бути злитий автоматично через конфлікти. pulls.cannot_auto_merge_helper=Злийте вручну для вирішення конфліктів. @@ -1184,21 +1402,26 @@ pulls.reject_count_1=%d запит на зміну pulls.reject_count_n=%d запити на зміну pulls.waiting_count_1=очікується %d рецензія pulls.waiting_count_n=очікується %d рецензії(й) +pulls.wrong_commit_id=id коміту повинен бути id коміту в цільовій гілці pulls.no_merge_desc=Цей запити на злиття неможливо злити, оскільки всі параметри об'єднання репозиторія вимкнено. pulls.no_merge_helper=Увімкніть параметри злиття в налаштуваннях репозиторія або злийте запити на злиття вручну. pulls.no_merge_wip=Цей пулл-реквест не можливо об'єднати, тому-що він вже виконується. pulls.no_merge_not_ready=Цей запит не готовий до злиття, перевірте статус рецензіювання і статус перевірки. pulls.no_merge_access=Ви не авторизовані, щоб виконати цей запит на злиття. -pulls.merge_pull_request=Об'єднати запит на злиття -pulls.rebase_merge_pull_request=Зробити Rebase і злити -pulls.rebase_merge_commit_pull_request=Rebase та злитя (--no-ff) -pulls.squash_merge_pull_request=Об'єднати (Squash) і злити +pulls.merge_manually=Об’єднано вручну +pulls.merge_commit_id=ID коміту злиття pulls.require_signed_wont_sign=Гілка вимагає підписаних комітів, але це злиття не буде підписано pulls.invalid_merge_option=Цей параметр злиття не можна використовувати для цього Pull Request'а. +pulls.merge_conflict=Злиття не вдалося: Був конфлікт при злиття. Підказка: спробуйте іншу стратегію +pulls.merge_conflict_summary=Помилка +pulls.rebase_conflict=Злиття не вдалося: відбувся конфлікт під час злиття: %[1]s. Підказка: спробуйте іншу стратегію +pulls.rebase_conflict_summary=Помилка ; %[2]s
    %[3]s
    pulls.unrelated_histories=Помилка злиття: head та base злиття не мають спільної історії. Підказка: спробуйте іншу стратегію pulls.merge_out_of_date=Помилка злиття: base було оновлено, поки відбувалося злиття. Підказка: спробуйте знову. +pulls.push_rejected=Не вдалося виконати злиття: push було відхилено. Перегляньте githooks для цього репозиторію. +pulls.push_rejected_summary=Повне повідомлення про відмову pulls.push_rejected_no_message=Не вдалося виконати злиття: push було відхилено без повідомлення.
    Перегляньте git-хуки для цього репозиторію pulls.open_unmerged_pull_exists=`Ви не можете знову відкрити, оскільки вже існує запит на злиття (%d) з того ж репозиторія з тією ж інформацією про злиття і в очікуванні.` pulls.status_checking=Деякі перевірки знаходяться на розгляді @@ -1206,18 +1429,24 @@ pulls.status_checks_success=Всі перевірки були успішним pulls.status_checks_warning=Декілька перевірок завершилися з попередженнями pulls.status_checks_failure=Декілька перевірок не були успішними pulls.status_checks_error=Декілька перевірок завершилися з помилками +pulls.status_checks_requested=Обов'язково +pulls.status_checks_details=Подробиці pulls.update_branch=Оновити гілку pulls.update_branch_success=Оновлення гілки пройшло успішно pulls.update_not_allowed=Ви не можете оновити гілку pulls.outdated_with_base_branch=Ця гілка застаріла відносно базової гілки pulls.closed_at=`закрив цей запит на злиття %[2]s` pulls.reopened_at=`повторно відкрив цей запит на злиття %[2]s` +pulls.merge_instruction_hint=`Також можна переглянути інструкції для командного рядка.` +pulls.merge_instruction_step1_desc=У репозиторії вашого проекту перевірте нову гілку і протестуйте зміни. +pulls.merge_instruction_step2_desc=Об'єднати зміни і оновити на Gitea. milestones.new=Новий етап milestones.open_tab=%d відкрито milestones.close_tab=%d закрито milestones.closed=Закрито %s +milestones.update_ago=Оновлено %s назад milestones.no_due_date=Немає дати завершення milestones.open=Відкрити milestones.close=Закрити @@ -1257,6 +1486,7 @@ signing.wont_sign.basesigned=Злиття не буде підписано, ос signing.wont_sign.headsigned=Злиття не буде підписано, оскільки головний коміт не підписано signing.wont_sign.commitssigned=Злиття не буде підписано, оскільки всі пов'язані коміти не підписані signing.wont_sign.approved=Злиття не буде підписано, оскільки PR не затверджено +signing.wont_sign.not_signed_in=Ви не ввійшли ext_wiki=Зов. Вікі ext_wiki.desc=Посилання на зовнішню вікі. @@ -1314,7 +1544,7 @@ activity.closed_issues_count_1=Закрита проблема activity.closed_issues_count_n=Закриті проблеми activity.title.issues_1=%d Проблема activity.title.issues_n=%d Проблеми -activity.title.issues_closed_by=%s закрита(і) %s +activity.title.issues_closed_from=%s закрито %s activity.title.issues_created_by=%s створена(і) %s activity.closed_issue_label=Закрито activity.new_issues_count_1=Нова Проблема @@ -1352,6 +1582,8 @@ activity.git_stats_deletion_n=%d видалені search=Пошук search.search_repo=Пошук репозиторію +search.fuzzy=Неточний +search.match=Збігається search.results=Результати пошуку для "%s" в %s settings=Налаштування @@ -1367,6 +1599,15 @@ settings.hooks=Веб-хуки settings.githooks=Git хуки settings.basic_settings=Базові налаштування settings.mirror_settings=Налаштування дзеркала +settings.mirror_settings.docs=Налаштуйте свій проект, щоб автоматично відправляти/отримувати зміни з іншого репозиторію. Гілки, теги і коміти будуть синхронізуватися автоматично. Як я можу відзеркалити репозиторії? +settings.mirror_settings.mirrored_repository=Віддзеркалений репозиторій +settings.mirror_settings.direction=Напрямок +settings.mirror_settings.direction.pull=Pull +settings.mirror_settings.direction.push=Push +settings.mirror_settings.last_update=Останнє оновлення +settings.mirror_settings.push_mirror.none=Не налаштовано дзеркало push +settings.mirror_settings.push_mirror.remote_url=URL віддаленого репозитарія git +settings.mirror_settings.push_mirror.add=Додати Push дзеркало settings.sync_mirror=Синхронізувати зараз settings.mirror_sync_in_progress=Синхронізуються репозиторії-дзеркала. Зачекайте хвилину і обновіть сторінку. settings.email_notifications.enable=Увімкнути сповіщення email @@ -1375,6 +1616,7 @@ settings.email_notifications.disable=Вимкнути email сповіщення settings.email_notifications.submit=Налаштувати параметри email settings.site=Веб-сайт settings.update_settings=Оновити налаштування +settings.branches.update_default_branch=Оновити гілку за замовчуванням settings.advanced_settings=Додаткові налаштування settings.wiki_desc=Увімкнути репозиторії Вікі settings.use_internal_wiki=Використовувати вбудовані Вікі @@ -1402,6 +1644,8 @@ settings.pulls.allow_merge_commits=Дозволити коміти злиття settings.pulls.allow_rebase_merge=Увімкнути Rebasing коміти перед злиттям settings.pulls.allow_rebase_merge_commit=Ввімкнути Rebase з явним злиттям (--no-ff) settings.pulls.allow_squash_commits=Увімкнути об'єднувати коміти перед злиттям +settings.pulls.allow_manual_merge=Позначити PR як об'єднаний вручну +settings.pulls.enable_autodetect_manual_merge=Увімкнути автовизначення ручного злиття (Примітка: у деяких особливий випадках можуть виникнуть помилки) settings.projects_desc=Увімкнути проєкти у репозиторії settings.admin_settings=Налаштування адміністратора settings.admin_enable_health_check=Включити перевірки працездатності репозиторію (git fsck) @@ -1419,10 +1663,34 @@ settings.convert_fork_notices_1=Ця операція перетворить ф settings.convert_fork_confirm=Перетворити репозиторій settings.convert_fork_succeed=Цей форк успішно перетворено на звичайний репозиторій. settings.transfer=Передати новому власнику +settings.transfer.rejected=Перенесення репозиторію відхилено. +settings.transfer.success=Перенесення репозиторію виконано. +settings.transfer_abort=Скасувати перенесення +settings.transfer_abort_invalid=Ви не можете скасувати неіснуюче перенесення сховища. +settings.transfer_abort_success=Перенесення сховища до %s була успішно скасована. settings.transfer_desc=Передати репозиторій користувачеві або організації, де ви маєте права адміністратора. +settings.transfer_form_title=Введіть ім'я репозиторія як підтвердження: +settings.transfer_in_progress=В даний час відбувається перенесення. Будь ласка, скасуйте його, якщо ви бажаєте перенести цей репозиторій іншому користувачу. settings.transfer_notices_1=- Ви втратите доступ до репозиторія, якщо ви переведете його окремому користувачеві. settings.transfer_notices_2=- Ви збережете доступ, якщо новим власником стане організація, власником якої ви є. -settings.transfer_form_title=Введіть ім'я репозиторія як підтвердження: +settings.transfer_notices_3=- Якщо репозиторій є приватним і передається окремому користувачеві, ця дія гарантує, що користувач має хоча б дозвіл на читаня репозитарію (і при необхідності змінює права дозволів). +settings.transfer_owner=Новий власник +settings.transfer_perform=Здіснити перенесення +settings.transfer_started=Цей репозиторій чекає підтвердження перенесення від "%s" +settings.transfer_succeed=Репозиторій був перенесений. +settings.signing_settings=Параметри перевірки підпису +settings.trust_model=Модель довіри для підпису +settings.trust_model.default=Модель довіри за замовчуванням +settings.trust_model.default.desc=Використовувати модель довіри репозиторію за замовчуванням для цього сайту. +settings.trust_model.collaborator=Співавтор +settings.trust_model.collaborator.long=Співавтор: підписи довіри від співавторів +settings.trust_model.collaborator.desc=Допустимі підписи співавторів цього репозиторію буде позначано як "довірені" - (якщо вони відповідають комітеру чи ні). В іншому випадку дійсні підписи будуть позначені як «ненадійні», якщо підпис співпадає з комітером і «невідповідні», якщо ні. +settings.trust_model.committer=Коммітер +settings.trust_model.committer.long=Коммітер: Довіряти підписам які відповідають комітерам (Так як і на GitHub, і змусить підписати коміти Gitea в якості коммітера) +settings.trust_model.committer.desc=Дозволені підписи будуть позначені лише "довіреними", якщо вони співпадають з комітером, інакше вони будуть позначені "невідповідними". Це змусить Gitea бути комітером на підписані коміти, а фактичні комітери будут зазначені в Co-authored-by: та Co-committed-by: що будуть вставлені в комміт. Типовий ключ Gitea повинен відповідати користувачу в базі даних. +settings.trust_model.collaboratorcommitter=Співавтор+Коммітер +settings.trust_model.collaboratorcommitter.long=Співавтор+Коммітер: Довіряти підписам від співавторів, які відповідають комітеру +settings.trust_model.collaboratorcommitter.desc=Допустимі підписи співавторів цього репозиторію будуть позначатися як "довірені", якщо вони відповідають комітеру. В іншому випадку дійсні підписи будуть позначені як «ненадійні», якщо підпис співпадає з комітером і як «невідповіді» в іншому випадку. Це змусить Gitea бути відміченим як комітер після підписання фактичним комітером, позначеним Co-Authored-By: і Co-Committed-By: прикріпленим до комміту. Типовий ключ Gitea повинен відповідати користувачу в базі даних. settings.wiki_delete=Видалити вікі-дані settings.wiki_delete_desc=Будьте уважні! Як тільки ви видалите Вікі - шляху назад не буде. settings.wiki_delete_notices_1=- Це назавжди знищить і відключить wiki для %s. @@ -1435,9 +1703,6 @@ settings.delete_notices_2=- Ця операція назавжди видали settings.delete_notices_fork_1=- Всі форки стануть незалежними репозиторіями після видалення. settings.deletion_success=Репозиторій успішно видалено. settings.update_settings_success=Налаштування репозиторію було оновлено. -settings.transfer_owner=Новий власник -settings.make_transfer=Здіснити перенесення -settings.transfer_succeed=Репозиторій був перенесений. settings.confirm_delete=Видалити репозиторій settings.add_collaborator=Додати співавтора settings.add_collaborator_success=Додано співавтора. @@ -1532,7 +1797,7 @@ settings.event_pull_request_review_desc=Коментар запиту до зл settings.event_pull_request_sync=Запит на злиття синхронізується settings.event_pull_request_sync_desc=Запит до злиття синхронізовано. settings.branch_filter=Фільтр гілок -settings.branch_filter_desc=Білий список повідомлень push гілок, створення гілок та видалення гілок, визначається як glob шаблон. Якщо пустий або *, повідомлення для вісіх гілок ввімкнено. Дівіться github.com/gobwas/glob документацію на синтаксис. Приклад: master, {master,release*}. +settings.branch_filter_desc=Білий список повідомлень для push, створення гілок та видалення гілок, визначається як glob шаблон. Якщо він пустий або містить *, повідомлення для вісіх гілок ввімкнені. Дівіться github.com/gobwas/glob документацію на синтаксис. Наприклад: master, {master,release*}. settings.active=Активний settings.active_helper=Інформацію про викликані події буде надіслано за цією веб-хук URL-адресою. settings.add_hook_success=Веб-хук було додано. @@ -1602,7 +1867,7 @@ settings.dismiss_stale_approvals_desc=Коли нові коміти що змі settings.require_signed_commits=Потрібно підписані коміти settings.require_signed_commits_desc=Відхиляти push до цієї гілки, якщо вони не підписані або підпис неможливо перевірити. settings.protect_protected_file_patterns=Шаблони захищених файлів (розділені крапками з комою '\;'): -settings.protect_protected_file_patterns_desc=Захищені файли, які заборонено змінювати напряму, навіть якщо користувач має дозвіл додавати, редагувати чи видаляти файли у цій гілці. Декілька шаблонів можуть бути розділеними за допомогою крапки з комою ('\;'). github.com/gobwas/glob надає документацію щодо синтаксису шаблонів. Приклади: .drone.yml, /docs/**/*.txt. +settings.protect_protected_file_patterns_desc=Захищені файли, які не дозволено змінювати, навіть якщо користувач має права на додавання, редагування або видалення файлів у цій гілці. Кілька шаблонів можливо розділяти за допомогою крапки з комою ('\;'). Дивіться github.com/gobwas/glob документацію для синтаксису шаблонів. Наприклад: .drone.yml, /docs/**/*.txt. settings.add_protected_branch=Увімкнути захист settings.delete_protected_branch=Вимкнути захист settings.update_protect_branch_success=Налаштування захисту гілки '%s' були успішно змінені. @@ -1611,13 +1876,26 @@ settings.protected_branch_deletion=Відключити захист гілки settings.protected_branch_deletion_desc=Будь-який користувач з дозволами на запис зможе виконувати push в цю гілку. Ви впевнені? settings.block_rejected_reviews=Блокувати злиття при відкидаючих рецензіях settings.block_rejected_reviews_desc=Злиття буде недоступним, якщо є запит змін від офіційних рецензентів, навіть за наявності достатньої кількості схвалень. +settings.block_on_official_review_requests=Блокувати злиття при запиті на офіціальний розгляд +settings.block_on_official_review_requests_desc=Об’єднання неможливе, коли воно має офіційні запити на розгляд, навіть якщо достатньо схвалень. settings.block_outdated_branch=Блокувати злиття, якщо запит на злиття застарів settings.block_outdated_branch_desc=Злиття буде неможливим, коли головна гілка позаду основної. settings.default_branch_desc=Головна гілка є 'базовою' для вашого репозиторія, на яку за замовчуванням спрямовані всі запити на злиття і яка є обличчям вашого репозиторія. Перше, що побачить відвідувач - це зміст головної гілки. Виберіть її з уже існуючих: +settings.default_merge_style_desc=Стиль злиття за замовчуванням: settings.choose_branch=Оберіть гілку… settings.no_protected_branch=Немає захищених гілок. settings.edit_protected_branch=Редагувати settings.protected_branch_required_approvals_min=Число необхідних схвалень не може бути від'ємним. +settings.tags=Мітки +settings.tags.protection=Захист мітки +settings.tags.protection.pattern=Шаблон тега +settings.tags.protection.allowed=Дозволено +settings.tags.protection.allowed.users=Дозволені користувачі +settings.tags.protection.allowed.teams=Дозволені команди +settings.tags.protection.allowed.noone=Ніхто +settings.tags.protection.create=Захистна мітка +settings.tags.protection.none=Там не немає захищених міток. +settings.tags.protection.pattern.description=Ви можете використовувати одне ім'я або глобальний шаблон або регулярний вираз для декількох тегів.. Детальніше в посібнику із захищених тегів. settings.bot_token=Токен для бота settings.chat_id=Чат ID settings.matrix.homeserver_url=URL домашньої сторінки @@ -1631,6 +1909,7 @@ settings.archive.success=Репозиторію успішно присвоєн settings.archive.error=Сталася помилка при спробі архівувати репозиторій. Докладнішу інформацію див. у журналі. settings.archive.error_ismirror=Неможливо архівувати дзеркальний репозиротрій. settings.archive.branchsettings_unavailable=Параметри гілки не доступні, якщо репозиторій архівний. +settings.archive.tagsettings_unavailable=Параметри міток недоступні, якщо репозиторій архівний. settings.unarchive.button=Зняти архівний статус settings.unarchive.header=Зняти архівний статус для репозиторія settings.unarchive.text=Зняття статусу архівного відновить запис в репозиторій, а також відкриє можливість створювати запити з нових проблем та пулл-запити. @@ -1680,7 +1959,9 @@ diff.whitespace_ignore_all_whitespace=Ігнорувати пробіли, по diff.whitespace_ignore_amount_changes=Ігнорувати зміни у кількості пробілів diff.whitespace_ignore_at_eol=Ігнорувати зміни у пробілах в кінці рядка diff.stats_desc= %d змінених файлів з %d додано та %d видалено +diff.stats_desc_file=%d змін: %d доповнень та %d видалень diff.bin=BIN +diff.bin_not_shown=Бінарний файл не відображається. diff.view_file=Переглянути файл diff.file_before=Перед diff.file_after=Після @@ -1688,6 +1969,7 @@ diff.file_image_width=Ширина diff.file_image_height=Висота diff.file_byte_size=Розмір diff.file_suppressed=Різницю між файлами не показано, бо вона завелика +diff.file_suppressed_line_too_long=Різницю між файлами не показано, оскільки один чи декілька рядків занадто довгі diff.too_many_files=Деякі файли не було показано, через те що забагато файлів було змінено diff.comment.placeholder=Залишити коментар diff.comment.markdown_info=Стилізація з markdown підтримується. @@ -1702,13 +1984,20 @@ diff.review.comment=Коментар diff.review.approve=Затвердити diff.review.reject=Запит змін diff.committed_by=зафіксовано +diff.protected=Захищений +diff.image.side_by_side=Пліч-о-пліч +diff.image.swipe=Свайп +diff.image.overlay=Оверлей releases.desc=Відслідковувати версії проекту (релізи) та завантаження. release.releases=Релізи +release.detail=Деталі релізу +release.tags=Теги release.new_release=Новий реліз release.draft=Чернетка release.prerelease=Пре-реліз release.stable=Стабільний +release.compare=Порівняти release.edit=редагувати release.ahead.commits=%d коміт(ів) release.ahead.target=до %s з моменту цього випуску @@ -1727,12 +2016,20 @@ release.publish=Опублікувати реліз release.save_draft=Зберегти чернетку release.edit_release=Оновити реліз release.delete_release=Видалити реліз +release.delete_tag=Видалити тег release.deletion=Видалити реліз +release.deletion_desc=Видалення релізу видаляє його тільки з Gitea. Git теги, вміст репозиторію і історія залишаться незмінними. Продовжити? release.deletion_success=Реліз, було видалено. +release.deletion_tag_desc=Буде видалено цей тег із репозиторію. Вміст репозиторія та історія залишаться незмінними. Продовжити? +release.deletion_tag_success=Мітка видалена. release.tag_name_already_exist=Реліз з цим ім'ям мітки вже існує. release.tag_name_invalid=Неприпустиме ім'я тега. +release.tag_name_protected=Ім'я тега захищене. +release.tag_already_exist=Цей тег вже використовується. release.downloads=Завантажити release.download_count=Завантаження: %s +release.add_tag_msg=Використовуйте заголовок і зміст релізу як повідомлення як тег повідомлення. +release.add_tag=Створити тільки мітку branch.name=Ім'я гілки branch.search=Пошук гілок @@ -1759,12 +2056,23 @@ branch.restore=Відновити гілку '%s' branch.download=Завантажити гілку '%s' branch.included_desc=Ця гілка є частиною типової гілки branch.included=Включено +branch.create_new_branch=Створити гілку з гілки: +branch.confirm_create_branch=Створити гілку +branch.new_branch=Створити нову гілку +branch.new_branch_from=Створити нову гілку з '%s' + +tag.create_tag=Створити тег %s +tag.create_success=Тег '%s' був створений. topic.manage_topics=Керувати тематичними мітками topic.done=Готово topic.count_prompt=Ви не можете вибрати більше 25 тем topic.format_prompt=Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів. +error.csv.too_large=Не вдається відобразити цей файл, тому що він завеликий. +error.csv.unexpected=Не вдається відобразити цей файл, тому що він містить неочікуваний символ в рядку %d і стовпці %d. +error.csv.invalid_field_count=Не вдається відобразити цей файл, тому що він має неправильну кількість полів у рядку %d. + [org] org_name_holder=Назва організації org_full_name_holder=Повна назва організації @@ -1801,11 +2109,14 @@ settings.repoadminchangeteam=Адміністратор репозитарію settings.visibility=Видимість settings.visibility.public=Публічний settings.visibility.limited=Обмежений (Видимий лише для користувачів, що ввійшли в систему) +settings.visibility.limited_shortname=Обмежений settings.visibility.private=Приватний (Видимий лише членам організації) +settings.visibility.private_shortname=Приватний settings.update_settings=Оновити налаштування settings.update_setting_success=Налаштування організації оновлені. settings.change_orgname_prompt=Ця зміна змінить посилання на організацію. +settings.change_orgname_redirect_prompt=Старе ім'я буде перенаправлено до тих пір, поки воно не буде заброньовано. settings.update_avatar_success=Аватар організації оновлений. settings.delete=Видалити організацію settings.delete_account=Видалити цю організацію @@ -1877,8 +2188,7 @@ dashboard=Панель управління users=Облікові записи користувачів organizations=Організації repositories=Репозиторії -hooks=Типові веб-хуки -systemhooks=Системні вебхуки +hooks=Веб-хуки authentication=Джерела автентифікації emails=Електронні адреси Користувача config=Конфігурація @@ -1910,7 +2220,7 @@ dashboard.cron.error=Помилка в Cron: %s: %[3]s dashboard.cron.finished=Cron: %[1]s завершено dashboard.delete_inactive_accounts=Видалити всі неактивовані облікові записи dashboard.delete_inactive_accounts.started=Запущено завдання видалення всі неактивованих облікових записів. -dashboard.delete_repo_archives=Видалити всі архіви репозиторіїв +dashboard.delete_repo_archives=Видалити всі архіви репозиторіїв (ZIP, TAR.GZ, і т. д..) dashboard.delete_repo_archives.started=Запущено завдання видалення всіх архівів репозиторіїв. dashboard.delete_missing_repos=Видалити всі записи про репозиторії з відсутніми файлами Git dashboard.delete_missing_repos.started=Запущено завдання видалення всіх репозиторіїв, в яких відсутні файли Git. @@ -1924,9 +2234,12 @@ dashboard.update_migration_poster_id=Оновити мігровані ID авт dashboard.git_gc_repos=Виконати очистку сміття для всіх репозиторіїв dashboard.resync_all_sshkeys=Оновити файл '.ssh/authorized_keys' з SSH ключами Gitea. dashboard.resync_all_sshkeys.desc=(Не потрібне при використанні вбудованого сервера SSH.) +dashboard.resync_all_sshprincipals=Оновіть файл '.ssh/authorized_princтipals' з SSH даними користувача Gitea. +dashboard.resync_all_sshprincipals.desc=(Не потрібно для вбудованого SSH серверу.) dashboard.resync_all_hooks=Пересинхронізувати перед-прийнятні, оновлюючі та пост-прийнятні хуки в усіх репозиторіях. dashboard.reinit_missing_repos=Переініціалізувати усі репозитрії git-файли яких втрачено dashboard.sync_external_users=Синхронізувати дані зовнішніх користувачів +dashboard.cleanup_hook_task_table=Очистити hook_task таблицю dashboard.server_uptime=Uptime серверу dashboard.current_goroutine=Поточна кількість Goroutines dashboard.current_memory_usage=Поточне використання пам'яті @@ -1956,6 +2269,8 @@ dashboard.total_gc_time=Загальна пауза збирача сміття dashboard.total_gc_pause=Загальна пауза збирача сміття (GC) dashboard.last_gc_pause=Остання пауза збирача сміття (GC) dashboard.gc_times=Кількість запусків збирача сміття (GC) +dashboard.delete_old_actions=Видалити всі старі дії з бази даних +dashboard.delete_old_actions.started=Видалення всіх старі дії з бази даних розпочато. users.user_manage_panel=Керування обліковими записами користувачів users.new_account=Створити обліковий запис @@ -1985,6 +2300,7 @@ users.prohibit_login=Вимкнути вхід users.is_admin=Адміністратор users.is_restricted=Обмежений users.allow_git_hook=Може створювати Git хуки +users.allow_git_hook_tooltip=Git хуки виконуються від імені користувача OS сервісу Gitea і мають однаковий рівень доступу до хоста. Як результат, користувачі з доступом до Git-хуків можуть отримати доступ і змінювати всі репозиторії Gitea, а також базу даних, що використовуються в Gitea. Отже, вони також здатні отримати права адміністратора Gitea. users.allow_import_local=Може імпортувати локальні репозиторії users.allow_create_organization=Може створювати організацій users.update_profile=Оновити обліковий запис @@ -1992,6 +2308,7 @@ users.delete_account=Видалити цей обліковий запис users.still_own_repo=Ваш обліковий запис все ще володіє одним або кількома репозиторіями, спочатку вам потрібно видалити або передати їх. users.still_has_org=Цей обліковий запис все ще є учасником однієї або декількох організацій. Для продовження, покиньте або видаліть організації. users.deletion_success=Обліковий запис користувача було видалено. +users.reset_2fa=Скинути 2FA emails.email_manage_panel=Управління поштою користувача emails.primary=Головний @@ -2013,6 +2330,8 @@ orgs.members=Учасники orgs.new_orga=Нова організація repos.repo_manage_panel=Керування репозиторіями +repos.unadopted=Неприйняті репозиторії +repos.unadopted.no_more=Не знайдено більше неприйнятих репозиторіїв repos.owner=Власник repos.name=Назва repos.private=Приватний @@ -2022,11 +2341,13 @@ repos.forks=Форки repos.issues=Проблеми repos.size=Розмір -hooks.desc=Веб-хуки автоматично створюють HTTP POST-запити до сервера, коли виконуються певні події Gitea. Визначені тут веб-хуки є типовими і копіюються у всі нові сховища. Детальніше читайте в інструкції по використанню web-хуків. -hooks.add_webhook=Додати типовий веб-хук -hooks.update_webhook=Змінити типовий веб-хук +defaulthooks=Веб-хуки за замовчуванням +defaulthooks.desc=Веб-хуки автоматично створюють HTTP POST-запити до сервера, коли виконуються певні події Gitea. Визначені тут веб-хуки є типовими і копіюються у всі нові сховища. Детальніше читайте в інструкції по використанню web-хуків. +defaulthooks.add_webhook=Додати веб-хук за замовчуванням +defaulthooks.update_webhook=Змінити веб-хук за замовчуванням -systemhooks.desc=Веб-хуки автоматично створюють HTTP POST-запити до сервера, коли виконуються певні тригери в Gitea. Визначені тут веб-хуки є типовими і копіюються у всі нові сховища. Детальніше читайте в інструкції по використанню web-хуків. +systemhooks=Системні вебхуки +systemhooks.desc=Веб-хуки автоматично створюють HTTP POST-запити до сервера, коли виконуються певні тригери в Gitea. Визначені веб-хуки є типовими і копіюються у всі нові сховища. Детальніше читайте в інструкції по використанню web-хуків. systemhooks.add_webhook=Додати системний вебхук systemhooks.update_webhook=Оновити системний вебхук @@ -2045,7 +2366,6 @@ auths.host=Хост auths.port=Порт auths.bind_dn=Прив'язати DN auths.bind_password=Прив'язати пароль -auths.bind_password_helper=Попередження: цей пароль зберігається у вигляді простого тексту. Використовуйте обліковий запис тільки для читання, якщо це можливо. auths.user_base=База пошуку користувачів auths.user_dn=DN користувача auths.attribute_username=Атрибут імені користувача @@ -2062,16 +2382,22 @@ auths.filter=Користувацький фільтр auths.admin_filter=Фільтр адміністратора auths.restricted_filter=Обмежуючий фільтр auths.restricted_filter_helper=Залиште пустим, щоб не встановлювати обмеження на жодного з користувачів. Використовуйте зірочку ("*') щоб встановити обмеження на всіх користувачів, які не відповідають фільтру Адміністратора. +auths.verify_group_membership=Перевірити членство в групах в LDAP +auths.group_search_base=Пошукова база груп DN +auths.valid_groups_filter=Допустимий фільтр груп +auths.group_attribute_list_users=Атрибут групи зі списком користувачів +auths.user_attribute_in_group=Атрибути користувача в групі auths.ms_ad_sa=Атрибути пошуку MS AD auths.smtp_auth=Тип автентифікації SMTP auths.smtphost=SMTP хост auths.smtpport=SMTP порт auths.allowed_domains=Дозволені домени auths.allowed_domains_helper=Залиште порожнім, щоб дозволити всі домени. Розділіть кілька доменів за допомогою коми (','). -auths.enable_tls=Увімкнути TLS-шифрування auths.skip_tls_verify=Пропустити перевірку TLS auths.pam_service_name=Ім'я служби PAM +auths.pam_email_domain=Поштовий домен PAM (необов'язково) auths.oauth2_provider=Постачальник OAuth2 +auths.oauth2_icon_url=URL іконки auths.oauth2_clientID=ID клієнта (ключ) auths.oauth2_clientSecret=Ключ клієнта auths.openIdConnectAutoDiscoveryURL=OpenID Connect URL для автоматизації входу @@ -2107,6 +2433,7 @@ auths.tip.twitter=Перейдіть на https://dev.twitter.com/apps, ство auths.tip.discord=Зареєструйте новий додаток на https://discordapp.com/developers/applications/me auths.tip.gitea=Зареєструйте новий додаток OAuth2. Керівництво можна знайти на https://docs.gitea.io/en-us/oauth2-provider/ auths.tip.yandex=Створіть нову програму в https://oauth.yandex.com/client/new. Виберіть наступні дозволи з "Yandex. assport API": "Доступ до адреси електронної пошти", "Доступ до аватара" і "Доступ до імені користувача, імені та прізвища, статі" +auths.tip.mastodon=Введіть URL спеціального екземпляра для екземпляра mastodon, який ви хочете автентифікувати за допомогою (або використовувати за замовчуванням) auths.edit=Редагувати джерело автентифікації auths.activated=Ця аутентифікація активована auths.new_success=Метод аутентифікації '%s' був доданий. @@ -2168,6 +2495,7 @@ config.db_path=Шлях config.service_config=Конфігурація сервісу config.register_email_confirm=Потрібно підтвердити електронну пошту для реєстрації config.disable_register=Вимкнути самостійну реєстрацію +config.allow_only_internal_registration=Дозволити реєстрацію тільки через Gitea config.allow_only_external_registration=Дозволити реєстрацію тільки через сторонні сервіси config.enable_openid_signup=Увімкнути самостійну реєстрацію за допомогою OpenID config.enable_openid_signin=Увімкнути реєстрацію за допомогою OpenID @@ -2244,7 +2572,6 @@ config.git_gc_timeout=Тайм-аут операції збирача смітт config.log_config=Конфігурація журналу config.log_mode=Режим журналювання -config.macaron_log_mode=Macaron-режим запису журналу config.own_named_logger=Іменований журнал config.routes_to_default_logger=Перенаправити в стандартний журнал config.go_log=Використовувати Go-журнал (перенаправлення на стандартний) @@ -2350,7 +2677,6 @@ comment_issue=`прокоментував(ла) проблему %s#%[2]s` merge_pull_request=`злив(ла) запит на злиття %s#%[2]s` transfer_repo=перенесено репозиторій %s у %s -push_tag=створено тег %[2]s в %[3]s delete_tag=видалено мітку %[2]s з %[3]s delete_branch=видалено гілку %[2]s з %[3]s compare_branch=Порівняти @@ -2362,6 +2688,9 @@ mirror_sync_delete=синхронізовано й видалено посила approve_pull_request=`схвалив %s#%[2]s` reject_pull_request=`запропонував зміни до %s#%[2]s` publish_release=`опублікував випуск "%[4]s" з %[3]s` +review_dismissed=`відхилений відгук від %[4] у %[3]s#%[2]s` +review_dismissed_reason=Причина: +create_branch=створено гілку %[3]s у %[4]s [tool] ago=%s тому diff --git a/options/locale/locale_zh-CN.ini b/options/locale/locale_zh-CN.ini index 002c6aefa..46d7d5d9f 100644 --- a/options/locale/locale_zh-CN.ini +++ b/options/locale/locale_zh-CN.ini @@ -15,6 +15,7 @@ page=页面 template=模板 language=语言选项 notifications=通知 +active_stopwatch=活动时间跟踪器 create_new=创建… user_profile_and_more=个人信息和配置 signed_in_as=已登录用户 @@ -75,12 +76,14 @@ pull_requests=合并请求 issues=工单管理 milestones=里程碑 +ok=确定 cancel=取消 save=保存 add=添加 add_all=添加所有 remove=移除 remove_all=移除所有 +edit=编辑 write=撰写 preview=预览 @@ -89,11 +92,16 @@ loading=正在加载... step1=第一步: step2=第二步: +error=错误 error404=您正尝试访问的页面 不存在您尚未被授权 查看该页面。 +never=从不 + [error] occurred=发生错误 report_message=如果您确定这是一个 Gitea bug,请在 GitHub 上搜索问题,并在必要时打开新问题。 +missing_csrf=错误的请求:没有 CSRF 令牌 +invalid_csrf=错误的请求:无效的 CSRF 令牌 [startpage] app_desc=一款极易搭建的自助 Git 服务 @@ -203,6 +211,8 @@ default_enable_timetracking=默认情况下启用时间跟踪 default_enable_timetracking_popup=默认情况下启用新存储库的时间跟踪。 no_reply_address=隐藏电子邮件 no_reply_address_helper=具有隐藏电子邮件地址的用户的域名。例如, 用户名 "joe" 将以 "joe@noreply.example.org" 的身份登录到 Git 中. 如果隐藏的电子邮件域设置为 "noreply.example.org"。 +password_algorithm=密码哈希算法 +password_algorithm_helper=设置密码哈希算法。 算法具有不同的要求和强度。 具有良好特性的`argon2`却会占用大量内存,可能不适用于小型系统。 [home] uname_holder=登录名或电子邮箱地址 @@ -216,6 +226,7 @@ my_mirrors=我的镜像 view_home=访问 %s search_repos=查找仓库… filter=其他过滤器 +filter_by_team_repositories=按团队仓库筛选 show_archived=已存档 show_both_archived_unarchived=显示已存档和未存档的 @@ -235,6 +246,8 @@ users=用户 organizations=组织 search=搜索 code=代码 +search.fuzzy=模糊 +search.match=匹配 repo_no_results=未找到匹配的仓库。 user_no_results=未找到匹配的用户。 org_no_results=未找到匹配的组织。 @@ -292,7 +305,8 @@ openid_connect_desc=所选的 OpenID URI 未知。在这里关联一个新帐户 openid_register_title=创建新帐户 openid_register_desc=所选的 OpenID URI 未知。在这里关联一个新帐户。 openid_signin_desc=输入您的 OpenID URI。例如: https://anne.me、bob.openid.org.cn 或 gnusocial.net/carry。 -disable_forgot_password_mail=帐户恢复功能已被禁用。请与网站管理员联系。 +disable_forgot_password_mail=由于未设置电子邮件,帐户恢复被禁用。 请联系您的站点管理员。 +disable_forgot_password_mail_admin=帐户恢复仅在设置电子邮件后可用。 请设置电子邮件以启用帐户恢复。 email_domain_blacklisted=您不能使用您的电子邮件地址注册。 authorize_application=应用授权 authorize_redirect_notice=如果您授权此应用,您将会被重定向到 %s。 @@ -306,11 +320,64 @@ password_pwned=此密码出现在 %s 您好, + activate_account=请激活您的帐户 +activate_account.title=%s,请激活您的帐户 +activate_account.text_1=%[1]s 您好,感谢注册 %[2]s ! +activate_account.text_2=请点击以下链接激活您在 %s 的帐户: + activate_email=请验证您的邮箱地址 -reset_password=恢复您的账户 -register_success=注册成功 +activate_email.title=%s,请验证您的电子邮件地址 +activate_email.text=请点击以下链接,以验证你的电子邮件地址在 %s 中 + register_notify=欢迎来到 Gitea +register_notify.title=%[1]s,欢迎来到 %[2]s +register_notify.text_1=这是您的 %s 注册确认电子邮件 ! +register_notify.text_2=您现在可以以用户名 %s 登录。 +register_notify.text_3=如果此账户已为您创建,请先 设置您的密码。 + +reset_password=恢复您的账户 +reset_password.title=%s,您已请求恢复您的帐户 +reset_password.text=请点击以下链接,恢复你在 %s 的账户: + +register_success=注册成功 + +issue_assigned.pull=@%[1]s 已将代码库 %[3]s 中的合并请求 %[2]s 指派给您 +issue_assigned.issue=@%[1]s 已将代码库 %[3]s 中的工单 %[2]s 指派给您 + +issue.x_mentioned_you=@%s 提到了您: +issue.action.force_push=%[1]s 强制从 %[3]s 推送 %[2]s 至 [4]s。 +issue.action.push_1=@%[1]s 推送了 %[3]d 个提交到 %[2]s +issue.action.push_n=@%[1]s 推送了 %[3]d 个提交到 %[2]s +issue.action.close=@%[1]s 关闭了 #%[2]d. +issue.action.reopen=@%[1]s 重新打开了 #%[2]d. +issue.action.merge=@%[1]s 将 #%[2]d 合并到 #%[3]s。 +issue.action.approve=@%[1]s 批准了此合并请求。 +issue.action.reject=@%[1]s 请求更改此合并请求。 +issue.action.review=@%[1]s 评论了这个合并请求。 +issue.action.review_dismissed=@%[1]s 拒绝了 %[2]s 对此合并请求的上个审核。 +issue.action.ready_for_review=@%[1]s 标记此合并请求已评审通过。 +issue.action.new=@%[1]s 创建了 #%[2]d. +issue.in_tree_path=在 %s 中: + +release.new.subject=%[2]s 中的 %[1]s 发布了 +release.new.text=@%[1]s 于 %[3]s 发布了 %[2]s +release.title=标题: %s +release.note=注释: +release.downloads=下载: +release.download.zip=源代码 (ZIP) +release.download.targz=源代码 (TAR.GZ) + +repo.transfer.subject_to=%s 想要将 "%s" 转让给 %s +repo.transfer.subject_to_you=%s 想要将 "%s" 转让给你 +repo.transfer.to_you=你 +repo.transfer.body=访问 %s 以接受或拒绝转移,亦可忽略此邮件。 + +repo.collaborator.added.subject=%s 把你添加到了 %s +repo.collaborator.added.text=您已被添加为代码库的协作者: [modal] yes=确认操作 @@ -351,12 +418,14 @@ email_error=不是一个有效的邮箱地址。 url_error=不是一个有效的 URL。 include_error=必须包含子字符串 '%s'。 glob_pattern_error=`匹配模式无效:%s.` +regex_pattern_error=`正则表达式无效:%s.` unknown_error=未知错误: captcha_incorrect=验证码不正确。 password_not_match=密码不匹配。 lang_select_error=从列表中选出语言 username_been_taken=用户名已被使用。 +username_change_not_local_user=非本地用户不允许更改用户名。 repo_name_been_taken=仓库名称已被使用。 repository_files_already_exist=此仓库已存在文件。请联系系统管理员。 repository_files_already_exist.adopt=此仓库已存在文件,只能被收录。 @@ -377,6 +446,7 @@ password_uppercase_one=至少一个大写字符 password_digit_one=至少一个数字 password_special_one=至少一个特殊字符(标点符号,括号,引号等) enterred_invalid_repo_name=输入的仓库名称不正确 +enterred_invalid_org_name=您输入的组织名称不正确。 enterred_invalid_owner_name=新的所有者名称无效。 enterred_invalid_password=输入的密码不正确 user_not_exist=该用户名不存在 @@ -403,6 +473,7 @@ repositories=仓库列表 activity=公开活动 followers=关注者 starred=已点赞 +watched=已关注仓库 projects=项目 following=关注中 follow=关注 @@ -446,6 +517,7 @@ update_language_not_found=语言 %s 不可用。 update_profile_success=您的资料信息已经更新 change_username=您的用户名已更改。 change_username_prompt=注意:更改账号名将同时改变账号的URL +change_username_redirect_prompt=在被人使用前,旧用户名将会被重定向。 continue=继续操作 cancel=取消操作 language=界面语言 @@ -516,14 +588,27 @@ ssh_helper=需要帮助? 请查看有关 如何 gpg_helper=需要帮助吗?看一看 GitHub 关于GPG 的指导。 add_new_key=增加 SSH 密钥 add_new_gpg_key=添加的 GPG 密钥 -key_content_ssh_placeholder=以 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384' 或 'ecdsa-sha2-nistp521' 开头 +key_content_ssh_placeholder=以 'ssh-ed25519'、 'ssh-rsa'、 'ecdsa-sha2-nistp256'、'ecdsa-sha2-nistp384'、'ecdsa-sha2-nistp521'、 'sk-ecdsa-sha2-nistp256@openssh.com' 或 'sk-ssh-ed25519@openssh.com' 开头 key_content_gpg_placeholder=以 '-----BEGIN PGP PUBLIC KEY BLOCK-----' 开头 add_new_principal=添加规则 ssh_key_been_used=此 SSH 密钥已添加到服务器。 ssh_key_name_used=使用相同名称的SSH公钥已经存在! ssh_principal_been_used=此规则已经加入到了服务器。 gpg_key_id_used=使用相同名称的GPG公钥已经存在! -gpg_no_key_email_found=此 GPG 公钥没有使用任何你的电子邮箱地址。 +gpg_no_key_email_found=此 GPG 密钥与您帐户关联的任何已激活电子邮件地址均不匹配。如果您在提供的令牌上签名,它仍然可以被添加。 +gpg_key_matched_identities=匹配的身份: +gpg_key_matched_identities_long=此密钥中包含的身份信息与下面这个该用户已激活电子邮件地址是相匹配的。因此,能与这些电子邮件地址相匹配的提交可以通过此密钥进行验证。 +gpg_key_verified=已验证的密钥 +gpg_key_verified_long=密钥已经用令牌进行了验证,并且可以用来验证匹配此用户任何已激活电子邮件地址的提交,以及匹配此密钥的任何身份。 +gpg_key_verify=验证 +gpg_invalid_token_signature=提供的 GPG 密钥、签名和令牌不匹配或过期。 +gpg_token_required=您必须为下面的令牌提供签名 +gpg_token=令牌 +gpg_token_help=您可以使用以下方式生成签名: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature= GPG 增强签名 +key_signature_gpg_placeholder=以 '-----BEGIN PGP PUBLIC KEY BLOCK-----' 开头 +verify_gpg_key_success=GPG 密钥 %s 已被验证。 subkeys=子项 key_id=键ID key_name=密钥名称 @@ -555,6 +640,7 @@ principal_state_desc=7 天内使用过该规则 show_openid=在个人信息上显示 hide_openid=在个人信息上隐藏 ssh_disabled=SSH 被禁用 +ssh_externally_managed=此 SSH 密钥是由外部管理的 manage_social=管理关联社交帐户 social_desc=这些外部账号已经绑定到你的Gitea账号。请确认这些账号,因为这些账号可以用来登录系统。 unbind=取消链接 @@ -621,6 +707,7 @@ or_enter_secret=或者输入密钥:%s then_enter_passcode=并输入应用程序中显示的密码: passcode_invalid=密码不正确。再试一次。 twofa_enrolled=你的账号已经启用了两步验证。请保存初始令牌(%s)到一个安全的地方,此令牌仅当前显示一次。 +twofa_failed_get_secret=获取 secret 失败。 u2f_desc=安全密钥是包含加密算法的硬件设备。它们可以用于两步验证。安全密钥必须支持 FIDO U2F 标准。 u2f_require_twofa=必须先启用两步验证才能使用安全密钥。 @@ -642,6 +729,7 @@ repos_none=你并不拥有任何仓库 delete_account=删除当前帐户 delete_prompt=此操作将永久删除您的用户帐户。它 不能 被撤消。 +delete_with_all_comments=你的帐户年龄小于 %s。为了避免幽灵评论,所有工单/合并请求的评论都将与它一起被删除。 confirm_delete_account=确认删除帐户 delete_account_title=删除当前帐户 delete_account_desc=确实要永久删除此用户帐户吗? @@ -651,8 +739,18 @@ email_notifications.onmention=只在被提到时邮件通知 email_notifications.disable=停用邮件通知 email_notifications.submit=邮件通知设置 +visibility=用户可见性 +visibility.public=公开 +visibility.public_tooltip=所有用户可见 +visibility.limited=受限 +visibility.limited_tooltip=仅登录用户可见 +visibility.private=私有 +visibility.private_tooltip=仅对组织成员可见 + [repo] +new_repo_helper=仓库包含所有项目文件,包括修订历史。已经在别处有了吗? 迁移代码库 owner=拥有者 +owner_helper=由于最大存储库限制,一些组织可能不会显示在下拉列表中。 repo_name=仓库名称 repo_name_helper=好的存储库名称使用简短、深刻和独特的关键字。 repo_size=仓库大小 @@ -673,26 +771,43 @@ use_template=使用此模板 generate_repo=生成仓库 generate_from=生成自 repo_desc=仓库描述 +repo_desc_helper=输入简要描述 (可选) repo_lang=仓库语言 repo_gitignore_helper=选择 .gitignore 模板。 +repo_gitignore_helper_desc=从常见语言的模板列表中选择忽略跟踪的文件。默认情况下,由开发或构建工具生成的特殊文件都包含在 .gitignore 中。 issue_labels=工单标签 issue_labels_helper=选择一个工单标签集 license=授权许可 license_helper=选择授权许可文件。 +license_helper_desc=许可证说明了其他人可以和不可以用您的代码做什么。不确定哪一个适合你的项目?见 选择一个许可证 readme=自述 readme_helper=选择自述文件模板。 +readme_helper_desc=这是您可以为您的项目撰写完整描述的地方。 auto_init=初始化存储库 (添加. gitignore、许可证和自述文件) +trust_model_helper=选择签名验证的“信任模型”。可能的选项是: +trust_model_helper_collaborator=协作者:信任协作者的签名 +trust_model_helper_committer=提交者:信任匹配提交者的签名 +trust_model_helper_collaborator_committer=协作者+提交者:信任与提交者匹配的协作者的签名 +trust_model_helper_default=默认:使用此安装的默认信任模型 create_repo=创建仓库 default_branch=默认分支 +default_branch_helper=默认分支是用于合并请求和代码提交的基础分支。 mirror_prune=修剪 mirror_prune_desc=删除过时的远程跟踪引用 mirror_interval=镜像间隔 (有效时间单位为 "h"、"m"、"s")。0将禁用自动同步。 mirror_interval_invalid=镜像间隔无效。 mirror_address=从URL克隆 -mirror_address_desc=在 Clone 认证部分里输入必要的信息。 +mirror_address_desc=在授权框中输入必要的凭据。 mirror_address_url_invalid=URL无效。请检查您所输入的URL是否正确。 mirror_address_protocol_invalid=提供的 url 无效。只能从 http(s):// 或 git:// 位置进行镜像。 +mirror_lfs=大文件存储 (LFS) +mirror_lfs_desc=镜像 LFS 数据。 +mirror_lfs_endpoint=LFS 网址 +mirror_lfs_endpoint_desc=同步将尝试使用克隆网址来 确定 LFS 服务器。如果仓库 LFS 数据存储在其他位置,你还可以指定自定义网址。 mirror_last_synced=上次同步 +mirror_password_placeholder=(未更改) +mirror_password_blank_placeholder=(未设置) +mirror_password_help=更改用户名以删除已储存的密码。 watchers=关注者 stargazers=称赞者 forks=派生仓库 @@ -709,6 +824,14 @@ delete_preexisting_label=刪除 delete_preexisting=删除已存在的文件 delete_preexisting_content=删除 %s 中的文件 delete_preexisting_success=删除 %s 中未收录的文件 +blame_prior=查看此更改前的 blame + +transfer.accept=接受转移 +transfer.accept_desc=转移到 "%s" +transfer.reject=拒绝转移 +transfer.reject_desc=取消转移到 "%s" +transfer.no_permission_to_accept=您没有接受的权限 +transfer.no_permission_to_reject=您没有拒绝的权限 desc.private=私有库 desc.public=公开 @@ -733,15 +856,21 @@ archive.title=此仓库已存档。您可以查看文件和克隆,但不能推 archive.issue.nocomment=此仓库已存档,您不能在此工单添加评论。 archive.pull.nocomment=此仓库已存档,您不能在此合并请求添加评论。 -form.reach_limit_of_creation=你已经达到了您的 %d 仓库的限制。 +form.reach_limit_of_creation_1=你已经达到了 %d 仓库的上限。 +form.reach_limit_of_creation_n=你已经达到了 %d 个仓库的上限。 form.name_reserved=仓库名称 '%s' 是被保留的。 form.name_pattern_not_allowed=仓库名称中不允许使用模式 "%s"。 -need_auth=需要授权验证 +need_auth=授权 migrate_options=迁移选项 migrate_service=迁移服务 migrate_options_mirror_helper=该仓库将是一个 镜像 migrate_options_mirror_disabled=您的站点管理员已禁用创建新镜像。 +migrate_options_lfs=迁移 LFS 文件 +migrate_options_lfs_endpoint.label=LFS 网址 +migrate_options_lfs_endpoint.description=迁移将尝试使用你的Git remote 来 确定LFS服务器。如果仓库 LFS 数据存储在其他位置,你还可以指定自定义网址。 +migrate_options_lfs_endpoint.description.local=支持本地服务器路径。 +migrate_options_lfs_endpoint.placeholder=留空则从克隆网址生成 migrate_items=迁移项目 migrate_items_wiki=百科 migrate_items_milestones=里程碑 @@ -755,19 +884,25 @@ migrate.clone_address=从 URL 迁移/克隆 migrate.clone_address_desc=现有仓库的 HTTP(s) 或 Git "clone" URL migrate.clone_local_path=或服务器本地路径 migrate.permission_denied=您没有获得导入本地仓库的权限。 +migrate.permission_denied_blocked=不允许从被屏蔽的主机导入。 +migrate.permission_denied_private_ip=不允许从私有IP导入。 migrate.invalid_local_path=无效的本地路径,不存在或不是一个目录! +migrate.invalid_lfs_endpoint=LFS 网址无效。 migrate.failed=迁移失败:%v -migrate.lfs_mirror_unsupported=不支持镜像 LFS 对象 - 使用 'git lfs fetch --all' 和 'git lfs push --all' 替代。 migrate.migrate_items_options=需要访问令牌来迁移额外的内容 migrated_from=从 %[2]s 迁移 migrated_from_fake=从 %[1]s 迁移成功 migrate.migrate=从 %s 迁移 migrate.migrating=正在从 %s 迁移... migrate.migrating_failed=从 %s 迁移失败。 -migrate.github.description=从 Github.com 或者 Github Enterprise 迁移数据 -migrate.git.description=从 Git 迁移数据 -migrate.gitlab.description=从 GitLab.com 或者 自部署 GitLab 迁移数据 -migrate.gitea.description=从 Gitea.com 或 自托管 Gitea 服务器迁移数据。 +migrate.migrating_failed.error=错误:%s +migrate.migrating_git=迁移Git数据 +migrate.migrating_topics=迁移主题 +migrate.migrating_milestones=迁移里程碑 +migrate.migrating_labels=迁移标签 +migrate.migrating_releases=迁移发布 +migrate.migrating_issues=迁移工单 +migrate.migrating_pulls=迁移合并请求 mirror_from=镜像自地址 forked_from=派生自 @@ -800,6 +935,7 @@ branch=分支 tree=目录树 clear_ref=`清除当前引用` filter_branch_and_tag=过滤分支或标签 +find_tag=查找Git标签 branches=分支列表 tags=标签列表 issues=工单 @@ -818,6 +954,8 @@ tag=Git标签 released_this=发布 file_raw=原始文件 file_history=文件历史 +file_view_source=源码模式 +file_view_rendered=渲染模式 file_view_raw=查看原始文件 file_permalink=永久链接 file_too_large=文件过大,无法显示。 @@ -859,6 +997,7 @@ editor.add=添加 '%s' editor.update=更新 '%s' editor.delete=删除 '%s' editor.commit_message_desc=添加一个可选的扩展描述... +editor.signoff_desc=在提交日志消息末尾添加签署人信息。 editor.commit_directly_to_this_branch=直接提交至 %s 分支。 editor.create_new_branch=为此提交创建一个 新的分支 并发起合并请求。 editor.create_new_branch_np=为此提交创建 新分支。 @@ -914,7 +1053,9 @@ ext_issues=外部工单 ext_issues.desc=链接到外部工单跟踪系统。 projects=项目 -projects.desc=管理看板中的工单和合并请求。 +projects.desc=在项目看板中管理工单和合并请求。 +projects.description=描述(可选) +projects.description_placeholder=描述 projects.create=创建项目 projects.title=标题 projects.new=创建项目 @@ -938,6 +1079,8 @@ projects.board.edit_title=新看板名称 projects.board.new_title=新看板名称 projects.board.new_submit=提交 projects.board.new=创建看板 +projects.board.set_default=设为默认 +projects.board.set_default_desc=将此面板设为未分类问题和合并请求的默认值 projects.board.delete=删除看板 projects.board.deletion_desc=删除项目看板会将所有相关问题移至“未分类”。继续吗? projects.open=开启 @@ -988,12 +1131,12 @@ issues.label_templates.info=还没有任何标签。您可以使用'创建标签 issues.label_templates.helper=选择标签模板 issues.label_templates.use=使用标签集 issues.label_templates.fail_to_load_file=加载标签模板文件 '%s' 时发生错误:%v -issues.add_label=于 %s 添加标签 %s +issues.add_label=于 %[2]s 添加了标签 %[1]s issues.add_labels=于 %s 添加 %s 标签 -issues.remove_label=已删除 %s 标签 %s -issues.remove_labels=已删除 %s 标签 %s -issues.add_remove_labels=于 %s 添加标签 %s ,删除标签 %s -issues.add_milestone_at=` %[2]s 添加了里程碑 %[1]s` +issues.remove_label=于 %[2]s 删除了标签 %[1]s +issues.remove_labels=于 %[2]s 删除了标签 %[1]s +issues.add_remove_labels=于 %[3]s 添加了标签 %[1]s ,删除了标签 %[2]s +issues.add_milestone_at=`于 %[2]s 添加了里程碑 %[1]s` issues.add_project_at=`将此添加到 %s 项目 %s` issues.change_milestone_at=`%[3]s 修改了里程碑从 %[1]s%[2]s` issues.change_project_at=`修改项目从 %s%s %s @@ -1021,6 +1164,7 @@ issues.filter_type.all_issues=所有工单 issues.filter_type.assigned_to_you=指派给您的 issues.filter_type.created_by_you=由您创建的 issues.filter_type.mentioning_you=提及您的 +issues.filter_type.review_requested=已请求评审 issues.filter_sort=排序 issues.filter_sort.latest=最新创建 issues.filter_sort.oldest=最早创建 @@ -1056,22 +1200,24 @@ issues.commented_at=`评论于 %s` issues.delete_comment_confirm=您确定要删除该条评论吗? issues.context.copy_link=复制链接 issues.context.quote_reply=引用回复 +issues.context.reference_issue=在新工单中引用 issues.context.edit=编辑 issues.context.delete=刪除 issues.no_content=这个人很懒,什么都没留下。 issues.close_issue=关闭 -issues.pull_merged_at=`已合并提交 %[2]s%[3]s 分支 %[4]s` +issues.pull_merged_at=`于 %[4]s 合并了提交 %[2]s%[3]s` +issues.manually_pull_merged_at=`于 %[4]s 手动合并了提交 %[2]s%[3]s` issues.close_comment_issue=评论并关闭 issues.reopen_issue=重新开启 issues.reopen_comment_issue=评论并重新开启 issues.create_comment=评论 -issues.closed_at=`关闭这个问题 %[2]s` +issues.closed_at=`于 %[2]s 关闭此工单` issues.reopened_at=`重新打开此问题 %[2]s` issues.commit_ref_at=`于 %[2]s 在代码提交中引用了该工单` -issues.ref_issue_from=`引用了这个工单 %[4]s %[2]s` -issues.ref_pull_from=`引用了此合并请求 %[4]s %[2]s` -issues.ref_closing_from=`引用了一个合并请求 %[4]s将关闭此问题 %[2]s` -issues.ref_reopening_from=`引用了一个合并请求 %[4]s将重新讨论这个工单 %[2]s` +issues.ref_issue_from=`于 %[2]s 引用了工单 %[4]s ` +issues.ref_pull_from=`于 %[2]s 引用了合并请求 %[4]s ` +issues.ref_closing_from=`于 %[2]s 引用了合并请求 %[4]s 将关闭此工单` +issues.ref_reopening_from=`于 %[2]s 引用了合并请求 %[4]s 将重新讨论此工单 ` issues.ref_closed_from=`关闭了这个工单 %[4]s %[2]s` issues.ref_reopened_from=`重新打开这个工单 %[4]s %[2]s` issues.ref_from=`来自 %[1]s` @@ -1082,6 +1228,8 @@ issues.re_request_review=再次请求审核 issues.is_stale=此评审之后代码有更新 issues.remove_request_review=移除审核请求 issues.remove_request_review_block=无法移除审核请求 +issues.dismiss_review=取消评审 +issues.dismiss_review_warning=您确定要取消此评审吗? issues.sign_in_require_desc=登录 并参与到对话中。 issues.edit=编辑 issues.cancel=取消 @@ -1126,13 +1274,17 @@ issues.lock.title=锁定有关此问题的对话。 issues.unlock.title=解锁有关此问题的对话。 issues.comment_on_locked=您不能对锁定的问题发表评论。 issues.tracker=时间跟踪 -issues.start_tracking_short=开始 +issues.start_tracking_short=启动计时器 issues.start_tracking=开始时间跟踪 issues.start_tracking_history=`开始工作 %s` issues.tracker_auto_close=当此工单关闭时,自动停止计时器 -issues.stop_tracking=停止 +issues.tracking_already_started=`你已经开始对 另一个工单 进行时间跟踪!` +issues.stop_tracking=停止计时器 issues.stop_tracking_history=`停止工作 %s` +issues.cancel_tracking=放弃 +issues.cancel_tracking_history=`取消时间跟踪 %s` issues.add_time=手动添加时间 +issues.del_time=删除此时间跟踪日志 issues.add_time_short=添加时间 issues.add_time_cancel=取消 issues.add_time_history=`添加耗时 %s` @@ -1140,17 +1292,15 @@ issues.del_time_history=`已删除时间 %s` issues.add_time_hours=小时 issues.add_time_minutes=分钟 issues.add_time_sum_to_small=没有输入时间。 -issues.cancel_tracking=取消 -issues.cancel_tracking_history=`取消时间跟踪 %s` issues.time_spent_total=总用时 issues.time_spent_from_all_authors=`总花费时间:%s` issues.due_date=到期时间 issues.invalid_due_date_format=到期时间的格式错误,必须是 'yyyy-mm-dd' 的形式。 issues.error_modifying_due_date=未能修改到期时间。 issues.error_removing_due_date=未能删除到期时间。 -issues.push_commit_1=已于 %[2]s 推送了 %[1]d 提交 -issues.push_commits_n=已于 %[2]s 推送了 %[1]d 提交 -issues.force_push_codes=`%[6]s 强制从 %[2]s 推送 %[1]s 到 %[4]s` +issues.push_commit_1=于 %[2]s 推送了 %[1]d 个提交 +issues.push_commits_n=于 %[2]s 推送了 %[1]d 个提交 +issues.force_push_codes=`于 %[6]s 强制推送 %[1]s,从 %[2]s,至 %[4]s` issues.due_date_form=yyyy年mm月dd日 issues.due_date_form_add=添加到期时间 issues.due_date_form_edit=编辑 @@ -1171,8 +1321,6 @@ issues.dependency.remove=删除 issues.dependency.remove_info=删除此依赖项 issues.dependency.added_dependency=`添加了一个新的依赖项 %s` issues.dependency.removed_dependency=`移除了一个依赖项 %s` -issues.dependency.issue_closing_blockedby=以下工单阻止了关闭此合并请求 -issues.dependency.pr_closing_blockedby=以下工单阻止了关闭此工单 issues.dependency.issue_close_blocks=此工单阻止了以下工单的关闭 issues.dependency.pr_close_blocks=此合并请求阻止以下工单的关闭 issues.dependency.issue_close_blocked=您需要关闭所有阻止此工单的工单, 然后才能关闭它。 @@ -1191,13 +1339,15 @@ issues.dependency.add_error_cannot_create_circular=您不能创建依赖, 使得 issues.dependency.add_error_dep_not_same_repo=这两个工单必须在同一仓库。 issues.review.self.approval=您不能批准您自己的合并请求。 issues.review.self.rejection=您不能请求对您自己的合并请求进行更改。 -issues.review.approve=已于 %s 批准这些更改 +issues.review.approve=于 %s 批准此合并请求 issues.review.comment=评审于 %s +issues.review.dismissed=于 %[2]s 取消了 %[1]s 的评审 +issues.review.dismissed_label=已取消 issues.review.left_comment=留下了一条评论 issues.review.content.empty=您需要留下一个注释,表明需要的更改。 issues.review.reject=请求变更 %s issues.review.wait=已请求 %s 审核 -issues.review.add_review_request=请求 %s 评审 %s +issues.review.add_review_request=于 %[2]s 请求 %[1]s 评审 issues.review.remove_review_request=取消对 %s 的评审请求 %s issues.review.remove_review_request_self=拒绝审核 %s issues.review.pending=待定 @@ -1212,6 +1362,10 @@ issues.review.resolve_conversation=已解决问题 issues.review.un_resolve_conversation=未解决问题 issues.review.resolved_by=标记问题为已解决 issues.assignee.error=因为未知原因,并非所有的指派都成功。 +issues.reference_issue.body=内容 + +compare.compare_base=基准分支 +compare.compare_head=比较 pulls.desc=启用合并请求和代码评审。 pulls.new=创建合并请求 @@ -1222,6 +1376,7 @@ pulls.compare_compare=拉取从 pulls.filter_branch=过滤分支 pulls.no_results=未找到结果 pulls.nothing_to_compare=分支内容相同,无需创建合并请求。 +pulls.nothing_to_compare_and_allow_empty_pr=这些分支是相等的,此合并请求将为空。 pulls.has_pull_request="在这些分支之间的合并请求已存在: %[2]s%#[3]d" pulls.create=创建合并请求 pulls.title_desc=请求将 %[1]d 次代码提交从 %[2]s 合并至 %[3]s @@ -1230,17 +1385,23 @@ pulls.change_target_branch_at=将目标分支从 %s 更改为 %s % pulls.tab_conversation=对话内容 pulls.tab_commits=代码提交 pulls.tab_files=文件变动 -pulls.reopen_to_merge=请重新打开此拉请求执行合并。 +pulls.reopen_to_merge=请重新创建此合并请求。 pulls.cant_reopen_deleted_branch=无法重新打开此合并请求,因为分支已删除。 pulls.merged=已合并 pulls.merged_as=该合并请求已作为 %[2]s 被合并。 +pulls.manually_merged=已手动合并 +pulls.manually_merged_as=合并请求已被手动合并为 %[2]s pulls.is_closed=合并请求已经关闭。 pulls.has_merged=请求已合并。 pulls.title_wip_desc=`标题以 %s 开头以免合并请求意外合并。` -pulls.cannot_merge_work_in_progress=这个合并请求被标记为尚未完成的工作。完成后请从标题中移除%s前缀。 +pulls.cannot_merge_work_in_progress=此合并请求被标记为正在进行的工作。 +pulls.still_in_progress=仍在进行中? +pulls.add_prefix=添加 %s 前缀 +pulls.remove_prefix=删除 %s 前缀 pulls.data_broken=此合并请求因为派生仓库信息缺失而中断。 pulls.files_conflicted=此合并请求有变更与目标分支冲突。 pulls.is_checking=正在进行合并冲突检测,请稍后再试。 +pulls.is_empty=此分支与目标分支相同。 pulls.required_status_check_failed=一些必要的检查没有成功 pulls.required_status_check_missing=缺少一些必要的检查。 pulls.required_status_check_administrator=作为管理员,您仍可合并此合并请求 @@ -1261,16 +1422,15 @@ pulls.reject_count_1=%d 变更请求 pulls.reject_count_n=%d 变更请求 pulls.waiting_count_1=%d 个正在等待审核 pulls.waiting_count_n=%d 个正在等待审核 +pulls.wrong_commit_id=提交 id 必须在目标分支 上 pulls.no_merge_desc=由于未启用合并选项,此合并请求无法被合并。 pulls.no_merge_helper=在仓库设置中启用合并选项或者手工合并请求。 pulls.no_merge_wip=这个合并请求无法合并,因为被标记为尚未完成的工作。 pulls.no_merge_not_ready=此拉取请求尚未准备好合并,请检查审核状态和状态检查。 pulls.no_merge_access=您无权合并此拉取请求。 -pulls.merge_pull_request=合并请求 -pulls.rebase_merge_pull_request=变基并合并 -pulls.rebase_merge_commit_pull_request=变基合并 (--no-ff) -pulls.squash_merge_pull_request=压缩提交并合并 +pulls.merge_manually=手动合并 +pulls.merge_commit_id=合并提交 ID pulls.require_signed_wont_sign=分支需要签名的提交,但这个合并将不会被签名 pulls.invalid_merge_option=你可以在此合并请求中使用合并选项。 pulls.merge_conflict=合并失败:合并时有冲突发生。提示:采用其它合并策略 @@ -1295,7 +1455,7 @@ pulls.update_branch=更新分支 pulls.update_branch_success=分支更新成功 pulls.update_not_allowed=您无权更新分支 pulls.outdated_with_base_branch=此分支相比基础分支已过期 -pulls.closed_at=`关闭此合并请求 %[2]s` +pulls.closed_at=`于 %[2]s 关闭此合并请求 ` pulls.reopened_at=`重新打开此合并请求 %[2]s` pulls.merge_instruction_hint=`你也可以查看 命令行指令` @@ -1404,7 +1564,7 @@ activity.closed_issues_count_1=已关闭的工单 activity.closed_issues_count_n=已关闭的工单 activity.title.issues_1=%d 工单 activity.title.issues_n=%d 工单 -activity.title.issues_closed_by=%[2]s 关闭了 %[1]s +activity.title.issues_closed_from=%s 从 %s 被关闭 activity.title.issues_created_by=%[2]s 创建了 %[1]s activity.closed_issue_label=已关闭 activity.new_issues_count_1=创建工单 @@ -1442,9 +1602,11 @@ activity.git_stats_deletion_n=删除 %d 行 search=搜索 search.search_repo=搜索仓库... +search.fuzzy=模糊 +search.match=匹配 search.results=在 %s 中搜索 "%s" 的结果 -settings=仓库设置 +settings=设置 settings.desc=设置是你可以管理仓库设置的地方 settings.options=仓库 settings.collaboration=协作者 @@ -1453,10 +1615,19 @@ settings.collaboration.write=可写权限 settings.collaboration.read=可读权限 settings.collaboration.owner=所有者 settings.collaboration.undefined=未定义 -settings.hooks=管理 Web 钩子 +settings.hooks=Web 钩子 settings.githooks=管理 Git 钩子 settings.basic_settings=基本设置 settings.mirror_settings=镜像设置 +settings.mirror_settings.docs=将你的项目设置成自动从其它存储库推送或拉取变更。分支、标签以及提交将会自动同步。如何镜像存储库? +settings.mirror_settings.mirrored_repository=镜像库 +settings.mirror_settings.direction=方向 +settings.mirror_settings.direction.pull=拉取 +settings.mirror_settings.direction.push=推送 +settings.mirror_settings.last_update=最后更新 +settings.mirror_settings.push_mirror.none=未配置推送镜像 +settings.mirror_settings.push_mirror.remote_url=Git 远程存储库链接 +settings.mirror_settings.push_mirror.add=添加推送镜像 settings.sync_mirror=同步 settings.mirror_sync_in_progress=镜像同步正在进行中,请稍后后再试。 settings.email_notifications.enable=启用邮件通知 @@ -1465,6 +1636,7 @@ settings.email_notifications.disable=停用邮件通知 settings.email_notifications.submit=邮件通知设置 settings.site=网站 settings.update_settings=更新仓库设置 +settings.branches.update_default_branch=更新默认分支 settings.advanced_settings=高级设置 settings.wiki_desc=启用仓库百科 settings.use_internal_wiki=使用内置百科 @@ -1492,6 +1664,9 @@ settings.pulls.allow_merge_commits=允许合并 settings.pulls.allow_rebase_merge=启用变基合并提交 settings.pulls.allow_rebase_merge_commit=启用变基显式合并 (--no-ff) settings.pulls.allow_squash_commits=启用Squash合并提交 +settings.pulls.allow_manual_merge=允许将合并请求标记为手动合并 +settings.pulls.enable_autodetect_manual_merge=启用自动检测手动合并 (注意:在某些特殊情况下可能发生错误判断) +settings.pulls.default_delete_branch_after_merge=默认合并后删除合并请求分支 settings.projects_desc=启用仓库项目 settings.admin_settings=管理员设置 settings.admin_enable_health_check=启用仓库健康检查 (git fsck) @@ -1509,10 +1684,21 @@ settings.convert_fork_notices_1=该操作会将派生仓库转换为普通仓库 settings.convert_fork_confirm=转换仓库 settings.convert_fork_succeed=此派生仓库已经转换为普通仓库。 settings.transfer=转移仓库所有权 +settings.transfer.rejected=代码库转移被拒绝。 +settings.transfer.success=代码库转移成功。 +settings.transfer_abort=取消转移 +settings.transfer_abort_invalid=你不能取消不存在的代码库转移。 +settings.transfer_abort_success=成功取消了将代码库转让给 %s settings.transfer_desc=您可以将仓库转移至您拥有管理员权限的帐户或组织。 +settings.transfer_form_title=输入仓库名称以做确认: +settings.transfer_in_progress=当前正在进行转让。 如果你想将此代码库转让给另一个用户,请取消它。 settings.transfer_notices_1=-如果将其传输给单个用户, 您将失去对存储库的访问权限。 settings.transfer_notices_2=-如果将其转移到您 (共同) 拥有的组织,您可以继续访问该仓库。 -settings.transfer_form_title=输入仓库名称以做确认: +settings.transfer_notices_3=- 如果存储库是私有的并且被转移给某个用户,那么此操作可以确保该用户至少具有读权限(以及必要时的更改权限)。 +settings.transfer_owner=新拥有者 +settings.transfer_perform=执行转让 +settings.transfer_started=该代码库已被标记为转让并等待来自 %s 的确认 +settings.transfer_succeed=仓库已被转移。 settings.signing_settings=签名验证设置 settings.trust_model=签名信任模型 settings.trust_model.default=默认信任模型 @@ -1522,6 +1708,7 @@ settings.trust_model.collaborator.long=协作者:信任协作者的签名 settings.trust_model.collaborator.desc=此仓库中协作者的有效签名将被标记为“可信” - 不管他们是否是提交者。否则,如果签名匹配了提交者,有效的签名将被标记为“不可信”。 settings.trust_model.committer=提交者 settings.trust_model.committer.long=提交者: 信任与提交者匹配的签名 (匹配GitHub 并强制Gitea签名的提交者将Gitea作为提交者) +settings.trust_model.committer.desc=有效的签名只有与提交者匹配时才会被标记为“可信”,否则会被标记为“不匹配”。这会强制Gitea成为已签名提交的提交者,而实际提交者在提交中被标记为Co-authored-by: 和Co-committed-by: trailer。默认的Gitea密钥必须与数据库中的一位用户相匹配。 settings.trust_model.collaboratorcommitter=协作者+提交者 settings.trust_model.collaboratorcommitter.long=协作者+提交者:信任协作者同时是提交者的签名 settings.trust_model.collaboratorcommitter.desc=如果匹配为提交者,此仓库中协作者的有效签名将被标记为“可信”。否则,如果签名匹配了提交者或者未匹配,有效的签名将被标记为“不可信”。这将强制 Gitea 在签名提交上将实际提交者加上 Co-Authored-By: 和 Co-Committed-By: 。默认的Gitea密钥必须匹配Gitea用户。 @@ -1537,9 +1724,6 @@ settings.delete_notices_2=- 此操作将永久删除仓库 %s settings.delete_notices_fork_1=- 在此仓库删除后,它的派生仓库将变成独立仓库。 settings.deletion_success=仓库已被删除。 settings.update_settings_success=仓库设置已更新。 -settings.transfer_owner=新拥有者 -settings.make_transfer=开始转移 -settings.transfer_succeed=仓库已被转移。 settings.confirm_delete=删除本仓库 settings.add_collaborator=增加协作者 settings.add_collaborator_success=协作者添加成功! @@ -1634,7 +1818,7 @@ settings.event_pull_request_review_desc=合并请求被批准、拒绝或提出 settings.event_pull_request_sync=合并请求被同步 settings.event_pull_request_sync_desc=合并请求被同步。 settings.branch_filter=分支过滤 -settings.branch_filter_desc=推送、创建,删除分支事件白名单,支持匹配符。如果为空或者 *,所有分支的事件均被触发。语法参见 github.com/gobwas/glob 。示例: Master, {master,release*}。 +settings.branch_filter_desc=推送、创建,删除分支事件的分支白名单,使用 glob 模式匹配指定。若为空或 *,则将报告所有分支的事件。语法文档见 github.com/gobwas/glob。示例:master,{master,release*}。 settings.active=激活 settings.active_helper=触发事件的信息将发送到此 webhook 网址。 settings.add_hook_success=Web 钩子添加成功! @@ -1653,7 +1837,7 @@ settings.add_telegram_hook_desc=将 Telegram 集成到您的仓 settings.add_matrix_hook_desc=将 Matrix 集成到您的仓库中。 settings.add_msteams_hook_desc=将 Microsoft Teams 集成到您的仓库中。 settings.add_feishu_hook_desc=将 Feishu 集成到您的仓库中。 -settings.deploy_keys=管理部署密钥 +settings.deploy_keys=部署密钥 settings.add_deploy_key=添加部署密钥 settings.deploy_key_desc=部署密钥具有对仓库的只读拉取权限。 settings.is_writable=启用写权限 @@ -1667,7 +1851,7 @@ settings.add_key_success=部署密钥 '%s' 添加成功。 settings.deploy_key_deletion=删除部署密钥 settings.deploy_key_deletion_desc=删除部署密钥将吊销对此存储库的访问权限。继续? settings.deploy_key_deletion_success=部署密钥已删除。 -settings.branches=分支列表 +settings.branches=分支 settings.protected_branch=分支保护 settings.protected_branch_can_push=允许推吗? settings.protected_branch_can_push_yes=你可以推 @@ -1704,7 +1888,7 @@ settings.dismiss_stale_approvals_desc=当新的提交更改合并请求内容被 settings.require_signed_commits=需要签名提交 settings.require_signed_commits_desc=拒绝推送未签名或无法验证的提交到分支 settings.protect_protected_file_patterns=受保护的文件模式(使用分号分隔) -settings.protect_protected_file_patterns_desc=即使用户有权添加、编辑或删除此分支中的文件,不允许直接更改受保护文件。 可以使用分号 ('\;') 分隔多个模式。 见 github.com/gobwas/glob 文档以获取图案语法。例如: .drone.yml, /docs/**/*.txt +settings.protect_protected_file_patterns_desc=即使用户有权在此分支中添加、编辑或删除文件,也不允许直接更改受保护文件。 可以使用分号分隔多个模式 ('\;')。语法文档见 github.com/gobwas/glob。示例:.drone.yml/docs/**/*.txt。 settings.add_protected_branch=启用保护 settings.delete_protected_branch=禁用保护 settings.update_protect_branch_success=分支 "%s" 的分支保护已更新。 @@ -1718,10 +1902,21 @@ settings.block_on_official_review_requests_desc=处于评审状态时,即使 settings.block_outdated_branch=如果拉取请求已经过时,阻止合并 settings.block_outdated_branch_desc=当头部分支落后基础分支时,不能合并。 settings.default_branch_desc=请选择一个默认的分支用于合并请求和提交: +settings.default_merge_style_desc=合并请求的默认合并样式: settings.choose_branch=选择一个分支... settings.no_protected_branch=没有受保护的分支 settings.edit_protected_branch=编辑 settings.protected_branch_required_approvals_min=所需的审批数不能为负数。 +settings.tags=标签 +settings.tags.protection=Git标签保护 +settings.tags.protection.pattern=Git标签模式 +settings.tags.protection.allowed=允许列表 +settings.tags.protection.allowed.users=允许的账号 +settings.tags.protection.allowed.teams=允许的团队 +settings.tags.protection.allowed.noone=无 +settings.tags.protection.create=保护Git标签 +settings.tags.protection.none=没有受保护的Git标签 +settings.tags.protection.pattern.description=你可以使用单个名称或 glob 模式匹配或正则表达式来匹配多个标签。了解更多请阅读 受保护Git标签指南 settings.bot_token=Bot 令牌 settings.chat_id=聊天 ID settings.matrix.homeserver_url=主服务器网址 @@ -1735,6 +1930,7 @@ settings.archive.success=仓库已成功归档。 settings.archive.error=仓库在归档时出现异常。请通过日志获取详细信息。 settings.archive.error_ismirror=请不要对镜像仓库归档,谢谢! settings.archive.branchsettings_unavailable=已归档仓库无法进行分支设置。 +settings.archive.tagsettings_unavailable=已归档仓库的Git标签设置不可用。 settings.unarchive.button=撤销仓库归档 settings.unarchive.header=撤销此仓库归档 settings.unarchive.text=取消存档将恢复仓库接收提交,推送,新工单和合并请求。 @@ -1786,6 +1982,7 @@ diff.whitespace_ignore_at_eol=忽略行末空白符号的更改 diff.stats_desc=共有 %d 个文件被更改,包括 %d 次插入%d 次删除 diff.stats_desc_file=变更 %d 行:新增 %d 行,删除 %d 行 diff.bin=二进制 +diff.bin_not_shown=二进制文件未显示。 diff.view_file=查看文件 diff.file_before=之前 diff.file_after=之后 @@ -1793,6 +1990,7 @@ diff.file_image_width=宽度 diff.file_image_height=高度 diff.file_byte_size=大小 diff.file_suppressed=文件差异内容过多而无法显示 +diff.file_suppressed_line_too_long=文件差异因一行或多行过长而隐藏 diff.too_many_files=部分文件因为文件数量过多而无法显示 diff.comment.placeholder=留下评论 diff.comment.markdown_info=支持使用Markdown格式。 @@ -1808,6 +2006,9 @@ diff.review.approve=通过 diff.review.reject=请求变更 diff.committed_by=提交者 diff.protected=受保护的 +diff.image.side_by_side=双排 +diff.image.swipe=滑动 +diff.image.overlay=叠加 releases.desc=跟踪项目版本和下载。 release.releases=版本发布 @@ -1817,6 +2018,7 @@ release.new_release=发布新版 release.draft=草稿 release.prerelease=预发行 release.stable=稳定 +release.compare=比较 release.edit=编辑 release.ahead.commits=%d 次提交 release.ahead.target=到 %s 自发布后 @@ -1843,9 +2045,12 @@ release.deletion_tag_desc=将从仓库中删除此 Git标签。仓库内容和 release.deletion_tag_success=该 Git标签 已经被删除 release.tag_name_already_exist=使用此标签名称的发布版本已经存在。 release.tag_name_invalid=标签名称无效。 +release.tag_name_protected=Git标签名称已受保护。 release.tag_already_exist=此 Git标签 名称已存在 release.downloads=下载附件 release.download_count=下载:%s +release.add_tag_msg=使用发布的标题和内容作为标签消息。 +release.add_tag=仅创建标签 branch.name=分支名称 branch.search=搜索分支 @@ -1872,12 +2077,23 @@ branch.restore=恢复分支 '%s' branch.download=下载分支 '%s' branch.included_desc=此分支是默认分支的一部分 branch.included=已包含 +branch.create_new_branch=从下列分支创建分支: +branch.confirm_create_branch=创建分支 +branch.new_branch=创建新分支 +branch.new_branch_from=从 %s 创建新分支 + +tag.create_tag=创建标签 %s +tag.create_success=标签 '%s' 已创建。 topic.manage_topics=管理主题 topic.done=保存 topic.count_prompt=您最多选择25个主题 topic.format_prompt=主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符 +error.csv.too_large=无法渲染此文件,因为它太大了。 +error.csv.unexpected=无法渲染此文件,因为它包含了意外字符,其位于第 %d 行和第 %d 列。 +error.csv.invalid_field_count=无法渲染此文件,因为它在第 %d 行中的字段数有误。 + [org] org_name_holder=组织名称 org_full_name_holder=组织全名 @@ -1921,6 +2137,7 @@ settings.visibility.private_shortname=私有 settings.update_settings=更新组织设置 settings.update_setting_success=组织设置已更新。 settings.change_orgname_prompt=注意:修改组织名称将会同时修改对应的URL。 +settings.change_orgname_redirect_prompt=在被人使用前,旧用户名将会被重定向。 settings.update_avatar_success=组织头像已经更新。 settings.delete=删除组织 settings.delete_account=删除当前组织 @@ -1992,8 +2209,7 @@ dashboard=管理面板 users=帐户管理 organizations=组织管理 repositories=仓库管理 -hooks=默认Web钩子 -systemhooks=系统 Web 钩子 +hooks=Web 钩子 authentication=认证源 emails=用户邮件 config=应用配置 @@ -2025,7 +2241,7 @@ dashboard.cron.error=任务中的错误: %s: %[3]s dashboard.cron.finished=任务:%[1]s 已经完成 dashboard.delete_inactive_accounts=删除所有未激活的帐户 dashboard.delete_inactive_accounts.started=删除所有未激活的账户任务已启动。 -dashboard.delete_repo_archives=删除所有仓库存档 +dashboard.delete_repo_archives=删除所有代码库的存档 (ZIP、 TAR、GZ, 等...) dashboard.delete_repo_archives.started=删除所有仓库存档任务已启动。 dashboard.delete_missing_repos=删除所有丢失 Git 文件的仓库 dashboard.delete_missing_repos.started=删除所有丢失 Git 文件的仓库任务已启动。 @@ -2044,6 +2260,7 @@ dashboard.resync_all_sshprincipals.desc=(内置的 SSH 服务器不需要。) dashboard.resync_all_hooks=重新同步所有仓库的 pre-receive、update 和 post-receive 钩子 dashboard.reinit_missing_repos=重新初始化所有丢失的 Git 仓库存在的记录 dashboard.sync_external_users=同步外部用户数据 +dashboard.cleanup_hook_task_table=清理 hook_task 表 dashboard.server_uptime=服务运行时间 dashboard.current_goroutine=当前 Goroutines 数量 dashboard.current_memory_usage=当前内存使用量 @@ -2073,6 +2290,8 @@ dashboard.total_gc_time=GC 暂停时间总量 dashboard.total_gc_pause=GC 暂停时间总量 dashboard.last_gc_pause=上次 GC 暂停时间 dashboard.gc_times=GC 执行次数 +dashboard.delete_old_actions=从数据库中删除所有旧操作记录 +dashboard.delete_old_actions.started=已开始从数据库中删除所有旧操作记录。 users.user_manage_panel=用户帐户管理 users.new_account=创建新帐户 @@ -2110,6 +2329,7 @@ users.delete_account=删除帐户 users.still_own_repo=此用户仍然拥有一个或多个仓库。必须首先删除或转让这些仓库。 users.still_has_org=此用户是组织的成员。必须先从组织中删除用户。 users.deletion_success=用户帐户已被删除。 +users.reset_2fa=重置两步验证 emails.email_manage_panel=邮件管理 emails.primary=主要的 @@ -2142,11 +2362,13 @@ repos.forks=派生数 repos.issues=工单数 repos.size=大小 -hooks.desc=当某些 Gitea 事件触发时, Web 钩子会自动向服务器发出 HTTP POST 请求。此处定义的 Web 钩子是默认值, 将复制到所有新建仓库中。参阅 Web钩子指南 获取更多内容。 -hooks.add_webhook=新增默认Web钩子 -hooks.update_webhook=更新默认Web钩子 +defaulthooks=默认Web钩子 +defaulthooks.desc=当某些 Gitea 事件触发时,Web 钩子自动向服务器发出HTTP POST请求。这里定义的 web 钩子是默认值,将被复制到所有新的存储库中。详情请访问 web 钩子指南。 +defaulthooks.add_webhook=添加默认Web 钩子 +defaulthooks.update_webhook=更新默认 Web 钩子 -systemhooks.desc=当某些 Gitea 事件触发时, Web 钩子会自动向服务器发出 HTTP POST 请求。此处定义的 Web 钩子是默认值, 将复制到所有新建仓库中。参阅 Web钩子指南 获取更多内容。 +systemhooks=系统 Web 钩子 +systemhooks.desc=当某些 Gitea 事件触发时,Web 钩子自动向服务器发出HTTP POST请求。这里定义的 web 钩子将作用于系统上的所有存储库,所以请考虑这可能带来的任何性能影响。了解详情请访问 web 钩子指南。 systemhooks.add_webhook=添加系统 Web 钩子 systemhooks.update_webhook=更新系统 Web 钩子 @@ -2165,7 +2387,6 @@ auths.host=主机 auths.port=端口 auths.bind_dn=绑定 DN auths.bind_password=绑定密码 -auths.bind_password_helper=警告:密码将会被明文存储。如果可能请使用只读账号。 auths.user_base=用户搜索基准 auths.user_dn=用户 DN auths.attribute_username=用户名属性 @@ -2193,10 +2414,11 @@ auths.smtphost=SMTP 主机地址 auths.smtpport=SMTP 主机端口 auths.allowed_domains=域名白名单 auths.allowed_domains_helper=置空将允许所有域名,每个域名用逗号分隔。 -auths.enable_tls=启用 TLS 加密 auths.skip_tls_verify=忽略 TLS 验证 auths.pam_service_name=PAM 服务名称 +auths.pam_email_domain=PAM 电子邮件域(可选) auths.oauth2_provider=OAuth2 提供程序 +auths.oauth2_icon_url=图标 URL auths.oauth2_clientID=客户端 ID (键) auths.oauth2_clientSecret=客户端密钥 auths.openIdConnectAutoDiscoveryURL=OpenID 连接自动发现 URL @@ -2230,7 +2452,7 @@ auths.tip.google_plus=从谷歌 API 控制台 (https://console.developers.google auths.tip.openid_connect=使用 OpenID 连接发现 URL (/.well-known/openid-configuration) 来指定终点 auths.tip.twitter=访问 https://dev.twitter.com/apps,创建应用并确保启用了"允许此应用程序用于登录 Twitter"的选项。 auths.tip.discord=在 https://discordapp.com/developers/applications/me 上注册新应用程序 -auths.tip.gitea=注册一个新的 OAuth2 应用程序。可以访问 https://docs.gitea.io/en-us/oauth 2-product/ 查看帮助 。 +auths.tip.gitea=注册一个新的 OAuth2 应用程序,可以访问 https://docs.gitea.io/en-us/oauth2-provider/ 查看帮助 。 auths.tip.yandex=在 https://oauth.yandex.com/client/new 上创建一个新的应用程序。在“ Yandex.Passport API”这部分中选择以下权限:“访问电子邮件地址(Access to email address)”,“访问用户头像(Access to user avatar)”和“访问用户名,名字和姓氏,性别(Access to username, first name and surname, genderAccess to username, first name and surname, gender)” auths.tip.mastodon=输入您想要认证的 mastodon 实例的自定义 URL (或使用默认值) auths.edit=修改认证源 @@ -2294,6 +2516,7 @@ config.db_path=数据库路径 config.service_config=服务配置 config.register_email_confirm=需要电子邮件确认注册 config.disable_register=禁止用户注册 +config.allow_only_internal_registration=只允许通过 Gitea 进行注册 config.allow_only_external_registration=仅允许通过外部服务注册 config.enable_openid_signup=启用 OpenID 自注册 config.enable_openid_signin=启用 OpenID 登录 @@ -2370,7 +2593,6 @@ config.git_gc_timeout=GC 操作超时 config.log_config=日志配置 config.log_mode=日志模式 -config.macaron_log_mode=Macaron 日志模式 config.own_named_logger=命名日志 config.routes_to_default_logger=路由到默认日志 config.go_log=使用 Go 日志(重定向至默认记录器) @@ -2465,7 +2687,7 @@ notices.delete_success=系统通知已被删除。 [action] create_repo=创建了仓库 %s rename_repo=重命名仓库 %[1]s%[3]s -commit_repo=推送了 %[3]s 分支的代码到 %[4]s +commit_repo=推送了 %[3]s 分支到 %[4]s create_issue=`创建了工单 %s#%[2]s` close_issue=`关闭了工单 %s#%[2]s` reopen_issue=`重新开启了工单 %s#%[2]s` @@ -2476,7 +2698,7 @@ comment_issue=`评论了工单 %s#%[2]s` comment_pull=`评论了合并请求 %s#%[2]s` merge_pull_request=`合并了合并请求 %s#%[2]s` transfer_repo=将仓库 %s 转移至 %s -push_tag=推送了标签 %[2]s%[3]s +push_tag=推送了标签 %[4]s%[3]s delete_tag=从%[3]s 删除了标签 %[2]s delete_branch=从 %[3]s 删除分支 %[2]s compare_branch=比较 @@ -2488,6 +2710,9 @@ mirror_sync_delete=从镜像同步并从 %[3]s 删除了引 approve_pull_request=`同意了 %s#%[2]s` reject_pull_request=`建议变更 %s#%[2]s` publish_release=`发布了 "%[4]s" %[3]s` +review_dismissed=`取消了 %[4]s%[3]s#%[2]s 的评审` +review_dismissed_reason=原因: +create_branch=创建分支 %[3]s%[4]s [tool] ago=%s前 diff --git a/options/locale/locale_zh-HK.ini b/options/locale/locale_zh-HK.ini index cf25ef25a..54a342097 100644 --- a/options/locale/locale_zh-HK.ini +++ b/options/locale/locale_zh-HK.ini @@ -44,6 +44,7 @@ cancel=取消 + [error] [startpage] @@ -107,11 +108,21 @@ openid_connect_title=連接到現有帳戶 openid_register_title=建立新帳戶 [mail] + activate_account=請啟用您的帳戶 + activate_email=請驗證您的郵箱地址 -register_success=註冊成功 + register_notify=歡迎來到 Gitea + +register_success=註冊成功 + + + + + + [modal] yes=確認操作 no=取消操作 @@ -239,6 +250,7 @@ delete_account=刪除當前帳戶 confirm_delete_account=確認刪除帳戶 + [repo] owner=擁有者 repo_name=儲存庫名稱 @@ -258,7 +270,7 @@ forks=複製儲存庫 -form.reach_limit_of_creation=您已經達到了儲存庫 %d 的上限。 + form.name_reserved=儲存庫名稱 '%s' 是預留的。 migrate_repo=遷移儲存庫 @@ -405,6 +417,7 @@ issues.attachment.download=`點擊下載 '%s'` issues.subscribe=訂閱 issues.unsubscribe=取消訂閱 + pulls.new=建立合併請求 pulls.filter_branch=過濾分支 pulls.no_results=未找到結果 @@ -416,7 +429,6 @@ pulls.reopen_to_merge=請重新開啟合併請求來完成合併操作。 pulls.merged=已合併 pulls.can_auto_merge_desc=這個拉請求可以自動合併。 -pulls.merge_pull_request=合併請求 ; %[2]s
    %[3]s
    @@ -476,9 +488,9 @@ settings.tracker_issue_style.alphanumeric=字母及數字 settings.danger_zone=危險操作區 settings.new_owner_has_same_repo=新的儲存庫擁有者已經存在同名儲存庫! settings.transfer=轉移儲存庫所有權 +settings.transfer_owner=新擁有者 settings.delete=刪除本儲存庫 settings.delete_notices_1=- 此操作 不可以 被回滾。 -settings.transfer_owner=新擁有者 settings.add_webhook=建立 Webhook settings.webhook.test_delivery=測試推送 settings.webhook.request=請求內容 @@ -545,6 +557,8 @@ release.downloads=下載附件 + + [org] org_name_holder=組織名稱 org_full_name_holder=組織全名 @@ -685,7 +699,6 @@ auths.smtp_auth=SMTP 驗證類型 auths.smtphost=SMTP 主機地址 auths.smtpport=SMTP 主機端口 auths.allowed_domains=域名白名單 -auths.enable_tls=啟用 TLS 加密 auths.skip_tls_verify=忽略 TLS 驗證 auths.pam_service_name=PAM 服務名稱 auths.oauth2_provider=OAuth2 提供者 diff --git a/options/locale/locale_zh-TW.ini b/options/locale/locale_zh-TW.ini index 4864698ee..0dfc8f563 100644 --- a/options/locale/locale_zh-TW.ini +++ b/options/locale/locale_zh-TW.ini @@ -12,9 +12,10 @@ website=網站 version=版本 powered_by=技術提供: %s page=頁面 -template=樣板 +template=範本 language=語言 notifications=通知 +active_stopwatch=進行中的時間追蹤 create_new=建立... user_profile_and_more=個人資料和設定... signed_in_as=已登入 @@ -38,7 +39,7 @@ u2f_sign_in=按下安全金鑰上的按鈕。如果安全金鑰沒有按鈕, u2f_press_button=請按下安全金鑰上的按鈕… u2f_use_twofa=使用來自手機的兩步驟驗證碼 u2f_error=無法讀取您的安全金鑰。 -u2f_unsupported_browser=你的瀏覽器不支援 U2F 安全金鑰。 +u2f_unsupported_browser=您的瀏覽器不支援 U2F 安全金鑰。 u2f_error_1=發生未知錯誤,請再試一次。 u2f_error_2=請確認使用正確,加密的 (https://) URL。 u2f_error_3=伺服器無法執行您的請求。 @@ -75,12 +76,14 @@ pull_requests=合併請求 issues=問題 milestones=里程碑 +ok=確認 cancel=取消 save=儲存 add=增加 add_all=全部增加 remove=移除 remove_all=全部移除 +edit=編輯 write=撰寫 preview=預覽 @@ -89,13 +92,19 @@ loading=載入中… step1=第一步: step2=第二步: +error=錯誤 error404=您正嘗試訪問的頁面 不存在您尚未被授權 查看該頁面。 +never=從來沒有 + [error] occurred=發生錯誤 report_message=如果你確定這是一個 Gitea 的 bug,請去 GitHub 搜尋相關的問題,如果有需要你也可以開一個新的問題 +missing_csrf=Bad Request: no CSRF token present +invalid_csrf=Bad Request: Invalid CSRF token [startpage] +app_desc=一套極易架設的 Git 服務 install=安裝容易 install_desc=簡單地執行您平台的二進位檔,或是使用 Docker,你也可以從套件管理員安裝。 platform=跨平台 @@ -169,7 +178,7 @@ federated_avatar_lookup=啟用 Federated Avatars federated_avatar_lookup_popup=使用 Libravatar 以啟用 Federated Avatar 查詢服務 disable_registration=關閉註冊功能 disable_registration_popup=關閉註冊功能,只有管理員可以新增帳戶。 -allow_only_external_registration_popup=僅允許通過外部服務進行註冊 +allow_only_external_registration_popup=只允許從外部服務註冊 openid_signin=啟用 OpenID 登入 openid_signin_popup=啟用 OpenID 登入 openid_signup=啟用 OpenID 註冊 @@ -185,7 +194,7 @@ admin_password=管理員密碼 confirm_password=確認密碼 admin_email=電子信箱 install_btn_confirm=安裝 Gitea -test_git_failed=無法識別 'git' 命令:%v +test_git_failed=無法識別「git」命令:%v sqlite3_not_available=您目前的版本不支援 SQLite3,請從 %s 下載官方的預先編譯版本(不是 gobuild 版本)。 invalid_db_setting=資料庫設定不正確: %v invalid_repo_path=儲存庫根目錄設定不正確:%v @@ -201,7 +210,9 @@ default_allow_create_organization_popup=預設允許新使用者建立組織 default_enable_timetracking=預設啟用時間追蹤 default_enable_timetracking_popup=預設情況下啟用新存儲庫的時間跟蹤。 no_reply_address=隱藏電子信箱域名 -no_reply_address_helper=作為隱藏電子信箱使用者的域名。例如,如果隱藏的電子信箱域名設定為「noreply.example.org」,帳號「joe」將以「joe@noreply.example.org」的身份登錄到 Git 中。 +no_reply_address_helper=作為隱藏電子信箱使用者的域名。例如,如果隱藏的電子信箱域名設定為「noreply.example.org」,帳號「joe」將以「joe@noreply.example.org」的身分登錄到 Git 中。 +password_algorithm=密碼雜湊演算法 +password_algorithm_helper=設定密碼雜湊演算法。演算法有不同的需求和強度。「argon2」雖然有優秀的特性但會占用大量記憶體,所以可能不適用於小型系統。 [home] uname_holder=帳號或電子信箱 @@ -235,11 +246,13 @@ users=使用者 organizations=組織 search=搜尋 code=程式碼 +search.fuzzy=模糊 +search.match=符合 repo_no_results=沒有找到符合的儲存庫。 user_no_results=沒有找到符合的使用者。 org_no_results=沒有找到符合的組織。 code_no_results=找不到符合您關鍵字的原始碼。 -code_search_results=搜尋結果:'%s' +code_search_results=「%s」的搜尋結果 code_last_indexed_at=最後索引 %s [auth] @@ -253,10 +266,10 @@ forgot_password_title=忘記密碼 forgot_password=忘記密碼? sign_up_now=還沒有帳戶?馬上註冊。 sign_up_successful=帳戶已成功建立。 -confirmation_mail_sent_prompt=一封新的確認信已發送至 %s。請檢查您的收件匣,並在 %s 內完成註冊作業。 +confirmation_mail_sent_prompt=新的確認信已發送至 %s。請在 %s內檢查您的收件匣並完成註冊作業。 must_change_password=更新您的密碼 allow_password_change=要求使用者更改密碼 (推薦) -reset_password_mail_sent_prompt=一封確認信已發送至 %s。請檢查您的收件匣,並在 %s 內完成帳戶救援作業。 +reset_password_mail_sent_prompt=確認信已發送至 %s。請在 %s內檢查您的收件匣並完成帳戶救援作業。 active_your_account=啟用您的帳戶 account_activated=帳戶已啟用 prohibit_login=禁止登入 @@ -269,14 +282,14 @@ send_reset_mail=發送帳戶救援信 reset_password=帳戶救援 invalid_code=您的確認代碼無效或已過期。 reset_password_helper=帳戶救援 -reset_password_wrong_user=你已經使用 %s 的帳戶登入,但帳戶救援連結是給 %s 的 +reset_password_wrong_user=您已經使用 %s 的帳戶登入,但帳戶救援連結是給 %s 的 password_too_short=密碼長度不能少於 %d 個字! non_local_account=非本地帳戶無法透過 Gitea 的網頁介面更改密碼。 verify=驗證 scratch_code=備用驗證碼 use_scratch_code=使用備用驗證碼 twofa_scratch_used=您已經用掉了備用驗證碼。您已被重新導向到兩步驟驗證設定頁面以便移除你已註冊設備或重新產生新的備用驗證碼。 -twofa_passcode_incorrect=你的驗證碼不正確。如果您遺失設備,請使用您的備用驗證碼登入。 +twofa_passcode_incorrect=您的驗證碼不正確。如果您遺失設備,請使用您的備用驗證碼登入。 twofa_scratch_token_incorrect=您的備用驗證碼不正確 login_userpass=登入 login_openid=OpenID @@ -292,7 +305,8 @@ openid_connect_desc=所選的 OpenID URI 未知。在這裡連結一個新帳戶 openid_register_title=建立新帳戶 openid_register_desc=所選的 OpenID URI 未知。在這裡連結一個新帳戶。 openid_signin_desc=輸入您的 OpenID URI。例如: https://anne.me、bob.openid.org.cn 或 gnusocial.net/carry。 -disable_forgot_password_mail=已停用帳戶救援功能。請與網站管理員聯絡。 +disable_forgot_password_mail=由於未設定電子郵件功能,帳戶救援功能已被停用。請與網站管理員聯絡。 +disable_forgot_password_mail_admin=帳戶救援功能需要設定電子郵件功能才能使用。請設定電子郵件功能以啟用帳戶救援功能。 email_domain_blacklisted=您無法使用您的電子信箱註冊帳號。 authorize_application=授權應用程式 authorize_redirect_notice=如果您授權此應用程式,您將會被重新導向至 %s。 @@ -302,15 +316,68 @@ authorize_title=授權「%s」存取您的帳戶? authorization_failed=授權失效 authorization_failed_desc=授權失敗,因為我們偵測到無效的請求。請聯絡您欲授權之應用程式的維護人員。 sspi_auth_failed=SSPI 認證失敗 -password_pwned=您選擇的密碼已被列於被盜密碼清單中,該清單因公共資料外洩而暴露。請試試其它密碼。 +password_pwned=您選擇的密碼已被列於被盜密碼清單中,該清單因公共資料外洩而暴露。請試試其他密碼。 password_pwned_err=無法完成對 HaveIBeenPwned 的請求。 [mail] +view_it_on=在 %s 上查看 +link_not_working_do_paste=無法開啟?請複製超連結到瀏覽器貼上。 +hi_user_x=%s 您好, + activate_account=請啟用您的帳戶 -activate_email=請驗證您的郵箱地址 -reset_password=救援您的帳戶 -register_success=註冊成功 +activate_account.title=%s,請啟用您的帳戶 +activate_account.text_1=%[1]s 您好,感謝您註冊 %[2]s! +activate_account.text_2=請在 %s內點擊下列連結以啟用您的帳戶: + +activate_email=請驗證您的電子信箱 +activate_email.title=%s,請驗證您的電子信箱 +activate_email.text=請在 %s內點擊下列連結以驗證您的電子信箱: + register_notify=歡迎來到 Gitea +register_notify.title=%[1]s,歡迎來到 %[2]s +register_notify.text_1=這是您在 %s 的註冊確認信! +register_notify.text_2=您現在可以用帳號 %s 登入。 +register_notify.text_3=如果這是由管理員為您建立的帳戶,請先設定您的密碼。 + +reset_password=救援您的帳戶 +reset_password.title=%s,您已請求帳戶救援 +reset_password.text=請在 %s內點擊下列連結以救援您的帳戶: + +register_success=註冊成功 + +issue_assigned.pull=@%[1]s 將儲存庫 %[3]s 的合併請求 %[2]s 指派給您。 +issue_assigned.issue=@%[1]s 將儲存庫 %[3]s 的問題 %[2]s 指派給您。 + +issue.x_mentioned_you=@%s 提到了您: +issue.action.force_push=%[1]s 強制推送了 %[2]s 自 %[3]s 至 %[4]s。 +issue.action.push_1=@%[1]s 推送了 %[3]d 個提交到 %[2]s +issue.action.push_n=@%[1]s 推送了 %[3]d 個提交到 %[2]s +issue.action.close=@%[1]s 關閉了 #%[2]d。 +issue.action.reopen=@%[1]s 重新開放了 #%[2]d。 +issue.action.merge=@%[1]s 合併了 #%[2]d 到 %[3]s。 +issue.action.approve=@%[1]s 核可了此合併請求。 +issue.action.reject=@%[1]s 請求更改此合併請求。 +issue.action.review=@%[1]s 在此合併請求上留言。 +issue.action.review_dismissed=@%[1]s 取消了 %[2]s 對此合併請求的上一個審核。 +issue.action.ready_for_review=@%[1]s 標記了此合併請求為準備好供審核。 +issue.action.new=@%[1]s 建立了 #%[2]d。 +issue.in_tree_path=在 %s 中: + +release.new.subject=%[2]s 中的 %[1]s 發佈了 +release.new.text=@%[1]s 於 %[3]s 發佈了 %[2]s +release.title=標題:%s +release.note=說明: +release.downloads=下載: +release.download.zip=原始碼(ZIP) +release.download.targz=原始碼(TAR.GZ) + +repo.transfer.subject_to=%s 想要把「%s」轉移給 %s +repo.transfer.subject_to_you=%s 想要把「%s」轉移給您 +repo.transfer.to_you=您 +repo.transfer.body=請造訪 %s 以接受或拒絕轉移,您也可以忽略它。 + +repo.collaborator.added.subject=%s 把您加入到 %s +repo.collaborator.added.text=您已被新增為儲存庫的協作者: [modal] yes=確認操作 @@ -320,7 +387,7 @@ modify=更新 [form] UserName=帳號 RepoName=儲存庫名稱 -Email=郵箱地址 +Email=電子信箱 Password=密碼 Retype=再次輸入密碼 SSHTitle=SSH 金鑰名稱 @@ -328,7 +395,7 @@ HttpsUrl=HTTPS URL 地址 PayloadUrl=推送地址 TeamName=團隊名稱 AuthName=認證名稱 -AdminEmail=管理員郵箱 +AdminEmail=管理員電子信箱 NewBranchName=新的分支名稱 CommitSummary=提交摘要 @@ -340,17 +407,18 @@ Content=內容 SSPISeparatorReplacement=分隔符 SSPIDefaultLanguage=預設語言 -require_error=不能為空。 +require_error=` 不能為空。` alpha_dash_error=`應該只包含英文字母、數字、破折號 ("-")、和底線 ("_") 字元。` alpha_dash_dot_error=`應該只包含英文字母、數字、破折號 ("-")、下底線("_")和小數點 (".") 字元。` git_ref_name_error=` 必須是格式正確的 Git 參考名稱。` -size_error=長度必須為 %s。 -min_size_error=長度最小為 %s 個字符。 -max_size_error=長度最大為 %s 個字符。 -email_error=不是一個有效的郵箱地址。 -url_error=不是一個有效的 URL。 -include_error=必須包含子字符串 '%s'。 -glob_pattern_error=` glob 比對模式無效: %s.` +size_error=` 長度必須為 %s。` +min_size_error=` 長度最小為 %s 個字元。` +max_size_error=` 長度最大為 %s 個字元。` +email_error=` 是無效的電子信箱。` +url_error=` 是無效的 URL。` +include_error=` 必須包含子字串「%s」。 +glob_pattern_error=` glob 比對模式無效:%s.` +regex_pattern_error=` 正規表示式模式無效:%s.` unknown_error=未知錯誤: captcha_incorrect=驗證碼不正確。 password_not_match=密碼錯誤。 @@ -370,16 +438,17 @@ team_name_been_taken=團隊名稱已被使用。 team_no_units_error=請至少選擇一個儲存庫區域。 email_been_used=此電子信箱已被使用 email_invalid=此電子信箱無效。 -openid_been_used=OpenID 位址 '%s' 已被使用。 +openid_been_used=OpenID 位址「%s」已被使用。 username_password_incorrect=帳號或密碼不正確 password_complexity=密碼複雜度沒有通過以下的要求: password_lowercase_one=至少要有一個小寫字母 password_uppercase_one=至少要有一個大寫字母 password_digit_one=至少要有一個數字 password_special_one=至少要有一個特殊字元(標點符號,括號,引號等) -enterred_invalid_repo_name=輸入的儲存庫名稱不正確。 +enterred_invalid_repo_name=您輸入的儲存庫名稱不正確。 +enterred_invalid_org_name=您輸入的組織名稱不正確。 enterred_invalid_owner_name=新的擁有者名稱無效。 -enterred_invalid_password=輸入的密碼不正確。 +enterred_invalid_password=您輸入的密碼不正確。 user_not_exist=該用戶名不存在 team_not_exist=團隊不存在 last_org_owner=你不能從「Owners」團隊中刪除最後一個使用者。每個組織中至少要有一個擁有者。 @@ -404,6 +473,7 @@ repositories=儲存庫列表 activity=公開動態 followers=追蹤者 starred=已加星號 +watched=關注的儲存庫 projects=專案 following=追蹤中 follow=追蹤 @@ -414,7 +484,7 @@ disabled_public_activity=這個使用者已對外隱藏動態 form.name_reserved=帳號「%s」是被保留的。 form.name_pattern_not_allowed=帳號不可包含字元「%s」。 -form.name_chars_not_allowed=使用者名稱 '%s' 包含無效字元。 +form.name_chars_not_allowed=使用者名稱「%s」包含無效字元。 [settings] profile=個人資料 @@ -446,7 +516,8 @@ update_profile=更新個人資料 update_language_not_found=無法使用語言「%s」。 update_profile_success=已更新您的個人資料。 change_username=您的帳號已更改。 -change_username_prompt=注意:帳號更改也會更改您的帳戶的 URL。 +change_username_prompt=注意:修改帳號也會更改您的帳戶的 URL。 +change_username_redirect_prompt=舊的帳號被領用前,會重新導向您的新帳號。 continue=繼續操作 cancel=取消操作 language=語言 @@ -492,13 +563,13 @@ email_deletion_success=該電子信箱已被刪除 theme_update_success=已更新佈景主題。 theme_update_error=選取的佈景主題不存在。 openid_deletion=移除 OpenID 位址 -openid_deletion_desc=從您的帳戶刪除此 OpenID 位址將會無法使用它進行登入。你確定要繼續嗎? +openid_deletion_desc=從您的帳戶刪除此 OpenID 位址將會無法使用它進行登入。是否繼續? openid_deletion_success=該 OpenID 已被刪除 add_new_email=新增電子信箱 add_new_openid=新增 OpenID URI add_email=新增電子信箱 add_openid=新增 OpenID URI -add_email_confirmation_sent=一封新的確認郵件已發送至 '%s',請檢查您的收件匣並在 %s 內確認您的電郵地址。 +add_email_confirmation_sent=確認信已發送至「%s」,請在 %s內檢查您的收件匣並確認您的電子信箱。 add_email_success=已加入新的電子信箱。 email_preference_set_success=已套用郵件偏好設定 add_openid_success=該 OpenID 已添加。 @@ -517,21 +588,34 @@ ssh_helper=需要協助嗎?建議可看看 GitHub 的文件 gpg_helper=需要協助嗎?建議可看看 GitHub 的 about GPG 文件。 add_new_key=增加 SSH 金鑰 add_new_gpg_key=新增 GPG 金鑰 -key_content_ssh_placeholder=以 'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521' 開頭 +key_content_ssh_placeholder=以下列字段開頭:'ssh-ed25519', 'ssh-rsa', 'ecdsa-sha2-nistp256', 'ecdsa-sha2-nistp384', 'ecdsa-sha2-nistp521', 'sk-ecdsa-sha2-nistp256@openssh.com', or 'sk-ssh-ed25519@openssh.com' key_content_gpg_placeholder=以 '-----BEGIN PGP PUBLIC KEY BLOCK-----' 開頭 add_new_principal=新增主體 ssh_key_been_used=此 SSH 金鑰已添加到伺服器。 ssh_key_name_used=已有相同名稱的 SSH 金鑰存在於您的帳戶。 ssh_principal_been_used=此伺服器已有名為「%s」的主體。 gpg_key_id_used=已存在具有相同 ID 的 GPG 金鑰。 -gpg_no_key_email_found=此 GPG 金鑰不適用於您的任何電子信箱。 +gpg_no_key_email_found=此 GPG 金鑰不符合任何已關聯到您帳戶且已啟用的電子信箱。若您為提供的 Token 進行簽署,您仍然可以新增它。 +gpg_key_matched_identities=符合的身分: +gpg_key_matched_identities_long=此金鑰中嵌入的身分符合此使用者已啟用的電子信箱。此金鑰可用來驗證符合此信箱的提交。 +gpg_key_verified=已驗證的金鑰 +gpg_key_verified_long=金鑰已被 Token 驗證且可用來驗證符合此使用者已啟用的電子信箱的提交,以及任何符合此金鑰的身分。 +gpg_key_verify=驗證 +gpg_invalid_token_signature=提供的 GPG 金鑰、簽署、Token 不符合或 Token 已過期。 +gpg_token_required=您必須為下列的 Token 提供簽署 +gpg_token=Token +gpg_token_help=您可以使用以下方法產生簽署: +gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig +gpg_token_signature=Armored GPG 簽署 +key_signature_gpg_placeholder=以「-----BEGIN PGP SIGNATURE-----」開頭 +verify_gpg_key_success=已驗證 GPG 金鑰「%s」。 subkeys=次金鑰 key_id=金鑰 ID key_name=金鑰名稱 key_content=內容 principal_content=內容 -add_key_success=SSH 金鑰 "%s" 已被添加。 -add_gpg_key_success=GPG 金鑰 "%s" 已被添加。 +add_key_success=已新增 SSH 金鑰「%s」。 +add_gpg_key_success=已新增 GPG 金鑰「%s」。 add_principal_success=已新增 SSH 認證主體「%s」。 delete_key=移除 ssh_key_deletion=移除 SSH 金鑰 @@ -579,7 +663,7 @@ manage_oauth2_applications=管理 OAuth2 應用程式 edit_oauth2_application=編輯 OAuth2 應用程式 oauth2_applications_desc=OAuth2 應用程式讓您的第三方應用程式安全地驗證此 Gitea 中的使用者。 remove_oauth2_application=刪除 OAuth2 應用程式 -remove_oauth2_application_desc=刪除 OAuth2 應用程式將會撤銷所有已簽署的 access token 存取權。繼續嗎? +remove_oauth2_application_desc=刪除 OAuth2 應用程式將會撤銷所有已簽署的 Access Token 存取權。是否繼續? remove_oauth2_application_success=已刪除應用程式。 create_oauth2_application=新增 OAuth2 應用程式 create_oauth2_application_button=建立應用程式 @@ -598,7 +682,7 @@ oauth2_regenerate_secret_hint=遺失您的密鑰? oauth2_client_secret_hint=請備份您的祕鑰。祕鑰在您離開這個頁面後將不會再顯示。 oauth2_application_edit=編輯 oauth2_application_create_description=OAuth2 應用程式讓您的第三方應用程式可以存取此 Gitea 上的帳戶。 -oauth2_application_remove_description=刪除 OAuth2 應用會拒絕它存取此 Gitea 上已授權的帳戶。繼續嗎? +oauth2_application_remove_description=刪除 OAuth2 應用會拒絕它存取此 Gitea 上已授權的帳戶。是否繼續? authorized_oauth2_applications=已授權的 OAuth2 應用程式 authorized_oauth2_applications_description=您已授權給這些第三方應用程式存取您個人 Gitea 帳戶。請對不再需要的應用程式撤銷存取權。 @@ -623,6 +707,7 @@ or_enter_secret=或者輸入密碼: %s then_enter_passcode=然後輸入應用程式中顯示的驗證碼: passcode_invalid=無效的驗證碼,請重試。 twofa_enrolled=您的帳戶已經啟用了兩步驟驗證。請將備用驗證碼 (%s) 保存到一個安全的地方,它只會顯示這麼一次! +twofa_failed_get_secret=取得密鑰(Secret)失敗。 u2f_desc=安全密鑰是包含加密密鑰的硬體設備。 它們可以用於兩步驟驗證。 安全密鑰必須支援 FIDO U2F 標準。 u2f_require_twofa=您的帳戶必須啟用兩步驟驗證以使用安全金鑰。 @@ -630,7 +715,7 @@ u2f_register_key=新增安全密鑰 u2f_nickname=暱稱 u2f_press_button=按下安全密鑰上的密碼進行註冊。 u2f_delete_key=移除安全密鑰 -u2f_delete_key_desc=如果刪除安全金鑰,將不能再使用它登入。確定要刪除嗎? +u2f_delete_key_desc=如果刪除安全金鑰,將不能再使用它登入。是否繼續? manage_account_links=管理已連結的帳戶 manage_account_links_desc=這些外部帳戶已連結到您的 Gitea 帳戶。 @@ -644,6 +729,7 @@ repos_none=您不擁有任何存儲庫 delete_account=刪除您的帳戶 delete_prompt=此動作將永久刪除您的使用者帳戶,而且無法復原。 +delete_with_all_comments=因為您的帳戶年齡小於 %s,為了避免幽靈留言,所有問題及合併請求的留言都會隨帳戶一同被刪除。 confirm_delete_account=確認刪除帳戶 delete_account_title=刪除使用者帳戶 delete_account_desc=您確定要永久刪除此帳戶嗎? @@ -653,7 +739,16 @@ email_notifications.onmention=只在被提到時傳送郵件通知 email_notifications.disable=關閉郵件通知 email_notifications.submit=套用郵件偏好設定 +visibility=使用者瀏覽權限 +visibility.public=公開 +visibility.public_tooltip=對所有人公開 +visibility.limited=受限 +visibility.limited_tooltip=只有登入的使用者才能看到 +visibility.private=私人 +visibility.private_tooltip=只有組織成員才能看到 + [repo] +new_repo_helper=儲存庫包含所有專案檔案,包含修訂歷史。已經存放於別處了嗎?遷移儲存庫。 owner=擁有者 owner_helper=組織可能因為儲存庫數量上限而未列入此選單。 repo_name=儲存庫名稱 @@ -673,36 +768,57 @@ fork_repo=Fork 儲存庫 fork_from=Fork 自 fork_visibility_helper=無法更改 fork 儲存庫的瀏覽權限。 use_template=使用此範本 +clone_in_vsc=在 VS Code 中 Clone +download_zip=下載 ZIP +download_tar=下載 TAR.GZ +download_bundle=下載 BUNDLE generate_repo=產生儲存庫 generate_from=產生自 repo_desc=儲存庫描述 +repo_desc_helper=輸入簡介(非必要) repo_lang=儲存庫語言 repo_gitignore_helper=選擇 .gitignore 範本 +repo_gitignore_helper_desc=從常見語言範本清單中挑選忽略追蹤的檔案。預設情況下各種語言建置工具產生的特殊檔案都包含在 .gitignore 中。 issue_labels=問題標籤 issue_labels_helper=選擇一個問題標籤集 license=授權條款 license_helper=請選擇授權條款檔案 +license_helper_desc=授權條款定義了他人使用您原始碼的允許和禁止事項。不確定哪個適用於您的專案?查看選擇授權條款。 readme=讀我檔案 readme_helper=選擇讀我檔案範本。 +readme_helper_desc=這是您能為專案撰寫完整描述的地方。 auto_init=初始化儲存庫(建立 .gitignore、授權條款和讀我檔案) +trust_model_helper=選擇簽署驗證的信任模型。可用的選項: +trust_model_helper_collaborator=協作者:信任協作者的簽署 +trust_model_helper_committer=提交者:信任與提交者相符的簽署 +trust_model_helper_collaborator_committer=協作者 + 提交者:信任協作者同時是提交者的簽署 +trust_model_helper_default=預設:使用此 Gitea 的預設儲存庫信任模式 create_repo=建立儲存庫 default_branch=預設分支 +default_branch_helper=預設分支是合併請求和提交程式碼的基礎分支。 mirror_prune=裁減 mirror_prune_desc=刪除過時的遠端追蹤參考 mirror_interval=鏡像間隔(有效時間單位為 'h'、'm'、's')。設為 0 以停用自動同步。 mirror_interval_invalid=鏡像週期無效 mirror_address=從 URL Clone -mirror_address_desc=在 Clone 授權資訊中填入必要的資料。 +mirror_address_desc=在授權資訊中填入必要的資料。 mirror_address_url_invalid=提供的網址無效。請檢查您輸入的網址是否正確。 mirror_address_protocol_invalid=提供的網址無效。只能從 http(s):// 或是 git:// 位址鏡像儲存庫。 +mirror_lfs=Large File Storage (LFS) +mirror_lfs_desc=啟動 LFS 檔案的鏡像功能。 +mirror_lfs_endpoint=LFS 端點 +mirror_lfs_endpoint_desc=同步將會嘗試使用 Clone URL 來確認 LFS 伺服器。如果存儲庫的 LFS 資料放在其他地方,您也可以指定自訂的端點。 mirror_last_synced=上次同步 +mirror_password_placeholder=(未變更) +mirror_password_blank_placeholder=(未設定) +mirror_password_help=修改帳號以清除已儲存的密碼。 watchers=關注者 stargazers=占星術師 forks=Fork pick_reaction=選擇你的表情反應 reactions_more=再多添加 %d個 unit_disabled=網站管理員已經停用這個儲存庫區域。 -language_other=其它 +language_other=其他 adopt_search=輸入帳號以搜尋未接管的儲存庫... (留白以查詢全部) adopt_preexisting_label=接管檔案 adopt_preexisting=接管既有的檔案 @@ -712,6 +828,14 @@ delete_preexisting_label=刪除 delete_preexisting=刪除既有的檔案 delete_preexisting_content=刪除 %s 中的檔案 delete_preexisting_success=刪除 %s 中未接管的檔案 +blame_prior=檢視此變更前的 Blame + +transfer.accept=同意轉移 +transfer.accept_desc=轉移到「%s」 +transfer.reject=拒絕轉移 +transfer.reject_desc=取消轉移到「%s」 +transfer.no_permission_to_accept=您沒有同意的權限 +transfer.no_permission_to_reject=您沒有拒絕的權限 desc.private=私有 desc.public=公開 @@ -736,15 +860,21 @@ archive.title=此存儲庫已封存。您可以查看檔案及 Clone 此存儲 archive.issue.nocomment=此存儲庫已封存,您不能在問題上留言。 archive.pull.nocomment=此存儲庫已封存,您不能在合併請求上留言。 -form.reach_limit_of_creation=您已經達到了您儲存庫的數量上限 (%d 個)。 -form.name_reserved=儲存庫名稱 '%s' 是預留的。 -form.name_pattern_not_allowed=儲存庫名稱無法使用 "%s"。 +form.reach_limit_of_creation_1=您已經達到了您儲存庫的數量上限 (%d 個)。 +form.reach_limit_of_creation_n=您已經達到了您儲存庫的數量上限 (%d 個)。 +form.name_reserved=儲存庫名稱「%s」是被保留的。 +form.name_pattern_not_allowed=儲存庫名稱不可包含字元「%s」。 -need_auth=Clone 授權資訊 +need_auth=授權 migrate_options=遷移選項 migrate_service=遷移服務 migrate_options_mirror_helper=將此儲存庫設定為鏡像儲存庫 migrate_options_mirror_disabled=您的網站管理員已經停用新增鏡像儲存庫的功能。 +migrate_options_lfs=遷移 LFS 檔案 +migrate_options_lfs_endpoint.label=LFS 端點 +migrate_options_lfs_endpoint.description=遷移將會嘗試使用您的 Git Remote 來確認 LFS 伺服器。如果存儲庫的 LFS 資料放在其他地方,您也可以指定自訂的端點。 +migrate_options_lfs_endpoint.description.local=同時也支援本地伺服器路徑。 +migrate_options_lfs_endpoint.placeholder=留空則使用 Clone URL migrate_items=遷移項目 migrate_items_wiki=Wiki migrate_items_milestones=里程碑 @@ -758,21 +888,33 @@ migrate.clone_address=從 URL 遷移 / Clone migrate.clone_address_desc=現有存儲庫的 HTTP(S) 或 Git Clone URL migrate.clone_local_path=或者是本地端伺服器路徑 migrate.permission_denied=您並沒有導入本地儲存庫的權限。 +migrate.permission_denied_blocked=您未被允許從已封鎖的主機匯入。 +migrate.permission_denied_private_ip=您未被允許從私有 IP 匯入。 migrate.invalid_local_path=無效的本地路徑,該路徑不存在或不是一個目錄! +migrate.invalid_lfs_endpoint=該 LFS 端點無效。 migrate.failed=遷移失敗:%v -migrate.lfs_mirror_unsupported=不支援鏡像 LFS 物件,請改用指令 'git lfs fetch --all' 和 'git lfs push --all'。 migrate.migrate_items_options=遷移其他項目需要 Access Token。 migrated_from=已從 %[2]s 遷移 migrated_from_fake=已從 %[1]s 遷移 migrate.migrate=從 %s 遷移 migrate.migrating=正在從 %s 遷移... migrate.migrating_failed=從 %s 遷移失敗 -migrate.github.description=從 Github.com 或 Github Enterprise 遷移資料。 -migrate.git.description=從 Git 服務遷移或鏡像資料。 -migrate.gitlab.description=從 GitLab.com 或自託管的 Gitlab 伺服器遷移資料。 -migrate.gitea.description=從 Gitea.com 或自託管的 Gitea 伺服器遷移資料。 +migrate.migrating_failed.error=錯誤:%s +migrate.github.description=從 github.com 或其他 Github 實例遷移資料。 +migrate.git.description=從任何 Git 服務遷移儲存庫。 +migrate.gitlab.description=從 gitlab.com 或其他 GitLab 實例遷移資料。 +migrate.gitea.description=從 gitea.com 或其他 Gitea 實例遷移資料。 +migrate.gogs.description=從 notabug.org 或其他 Gogs 實例遷移資料。 +migrate.onedev.description=從 code.onedev.io 或其他 OneDev 實例遷移資料。 +migrate.migrating_git=正在遷移 Git 資料 +migrate.migrating_topics=正在遷移主題 +migrate.migrating_milestones=正在遷移里程碑 +migrate.migrating_labels=正在遷移標籤 +migrate.migrating_releases=正在遷移版本發佈 +migrate.migrating_issues=正在遷移問題 +migrate.migrating_pulls=正在遷移合併請求 -mirror_from=镜像来自 +mirror_from=鏡像自 forked_from=fork 自 generated_from=產生自 fork_from_self=您無法 fork 已經擁有的儲存庫。 @@ -803,6 +945,7 @@ branch=分支 tree=目錄樹 clear_ref=`清除目前的參考` filter_branch_and_tag=過濾分支或標籤 +find_tag=尋找標籤 branches=分支 tags=標籤 issues=問題 @@ -821,11 +964,13 @@ tag=標籤 released_this=發佈了此版本 file_raw=原始文件 file_history=歷史記錄 +file_view_source=檢視原始碼 +file_view_rendered=檢視渲染圖 file_view_raw=查看原始文件 file_permalink=永久連結 file_too_large=檔案太大,無法顯示。 video_not_supported_in_browser=您的瀏覽器不支援使用 HTML5 播放影片。 -audio_not_supported_in_browser=您的瀏覽器不支援 HTML5 'audio' 標籤 +audio_not_supported_in_browser=您的瀏覽器不支援 HTML5 的「audio」標籤 stored_lfs=已使用 Git LFS 儲存 symbolic_link=符號連結 commit_graph=提交線圖 @@ -858,10 +1003,11 @@ editor.cancel_lower=取消 editor.commit_signed_changes=提交簽署過的變更 editor.commit_changes=提交變更 editor.add_tmpl=新增「」 -editor.add=新增 '%s' -editor.update=更新 '%s' -editor.delete=刪除 '%s' +editor.add=新增「%s」 +editor.update=更新「%s」 +editor.delete=刪除「%s」 editor.commit_message_desc=(選填)加入詳細說明... +editor.signoff_desc=在提交訊息底部加入提交者的「Signed-off-by」資訊。 editor.commit_directly_to_this_branch=直接提交到 %s 分支。 editor.create_new_branch=為此提交建立新分支並提出合併請求。 editor.create_new_branch_np=為本次提交建立一個 新分支。 @@ -871,7 +1017,7 @@ editor.cancel=取消 editor.filename_cannot_be_empty=檔案名稱不能為空。 editor.filename_is_invalid=檔名無效:%s editor.branch_does_not_exist=此儲存庫沒有名為「%s」的分支。 -editor.branch_already_exists='%s' 已存在於此存儲庫。 +editor.branch_already_exists=此儲存庫已有名為「%s」的分支。 editor.directory_is_a_file=目錄名稱「%s」已被此儲存庫的檔案使用。 editor.file_is_a_symlink=「%s」是符號連結。無法在網頁編輯器中修改符號連結。 editor.filename_is_a_directory=檔案名稱「%s」已被此儲存庫的目錄使用。 @@ -884,13 +1030,13 @@ editor.commit_empty_file_text=你準備提交的檔案是空白的,是否繼 editor.no_changes_to_show=沒有可以顯示的變更。 editor.fail_to_update_file=更新/建立檔案「%s」失敗。 editor.fail_to_update_file_summary=錯誤訊息: -editor.push_rejected_no_message=該變更被伺服器拒絕但未提供其它資訊。請檢查 Githook。 +editor.push_rejected_no_message=該變更被伺服器拒絕但未提供其他資訊。請檢查 Githook。 editor.push_rejected=該變更被伺服器拒絕但。請檢查 Githook。 editor.push_rejected_summary=完整的拒絕訊息: editor.add_subdir=加入目錄 -editor.unable_to_upload_files=上傳檔案失敗到 '%s', 錯誤訊息: %v +editor.unable_to_upload_files=上傳檔案到「%s」時失敗,錯誤訊息:%v editor.upload_file_is_locked=檔案「%s」已被 %s 鎖定 -editor.upload_files_to_dir=上傳檔案到 '%s' +editor.upload_files_to_dir=上傳檔案到「%s」 editor.cannot_commit_to_protected_branch=無法提交到受保護的分支「%s」。 editor.no_commit_to_branch=無法直接提交到分支因為: editor.user_no_push_to_branch=使用者無法推送到分支 @@ -899,6 +1045,7 @@ editor.require_signed_commit=分支僅接受經簽署的提交 commits.desc=瀏覽原始碼修改歷程。 commits.commits=次程式碼提交 commits.no_commits=沒有共同的提交。「%s」和「%s」的歷史完全不同。 +commits.nothing_to_compare=這些分支是相同的。 commits.search=搜尋提交歷史... commits.search.tooltip=你可以用「author:」、「committer:」、「after:」或「before:」作為關鍵詞的前綴,例如:「revert author:Alice before:2019-04-01」。 commits.find=搜尋 @@ -917,19 +1064,21 @@ ext_issues=外部問題 ext_issues.desc=連結到外部問題追蹤器。 projects=專案 -projects.desc=在專案看板中管理問題和 pull。 +projects.desc=在專案看板中管理問題與合併請求。 +projects.description=描述(非必要) +projects.description_placeholder=描述 projects.create=建立專案 projects.title=標題 projects.new=新增專案 projects.new_subheader=在同一個地方協調、追蹤和更新您的工作,使專案保持透明並按計畫進行。 -projects.create_success=已建立專案 '%s'。 +projects.create_success=已建立專案「%s」。 projects.deletion=刪除專案 projects.deletion_desc=刪除專案會從所有相關的問題移除它。是否繼續? projects.deletion_success=專案已被刪除。 projects.edit=編輯專案 projects.edit_subheader=專案可用來組織問題和追蹤進度。 projects.modify=更新專案 -projects.edit_success=專案 '%s' 已被更新。 +projects.edit_success=已更新專案「%s」。 projects.type.none=無 projects.type.basic_kanban=基本看板 projects.type.bug_triage=Bug 檢傷分類 @@ -941,8 +1090,10 @@ projects.board.edit_title=新看板名稱 projects.board.new_title=新看板名稱 projects.board.new_submit=送出 projects.board.new=新增看板 +projects.board.set_default=設為預設 +projects.board.set_default_desc=將此看板設定為未分類問題及合併請求的預設看板 projects.board.delete=刪除看板 -projects.board.deletion_desc=刪除專案看板會將相關的問題移動到 '未分類'。是否繼續? +projects.board.deletion_desc=刪除專案看板會將所有相關的問題移動到「未分類」,是否繼續? projects.open=開啟 projects.close=關閉 @@ -990,7 +1141,7 @@ issues.label_templates.title=載入一組預定義的標籤 issues.label_templates.info=沒有任何標籤。點擊「新增標籤」按鈕或使用預定義的標籤集。 issues.label_templates.helper=選擇一個標籤集 issues.label_templates.use=使用標籤集 -issues.label_templates.fail_to_load_file=載入標籤範本檔案 '%s' 失敗: %v +issues.label_templates.fail_to_load_file=載入標籤範本檔「%s」失敗:%v issues.add_label=加入了 %s 標籤 %s issues.add_labels=加入了 %s 標籤 %s issues.remove_label=移除了 %s 標籤 %s @@ -1013,7 +1164,7 @@ issues.delete_branch_at=`刪除分支 %s %s` issues.open_tab=%d 個開放中 issues.close_tab=%d 個已關閉 issues.filter_label=標籤 -issues.filter_label_exclude=`使用 alt + click/enter 來排除標籤`。 +issues.filter_label_exclude=`使用 alt + click/enter 來排除標籤` issues.filter_label_no_select=所有標籤 issues.filter_milestone=里程碑 issues.filter_milestone_no_select=所有里程碑 @@ -1024,6 +1175,7 @@ issues.filter_type.all_issues=所有問題 issues.filter_type.assigned_to_you=指派給您的 issues.filter_type.created_by_you=由您建立的 issues.filter_type.mentioning_you=提及您的 +issues.filter_type.review_requested=已提出審核請求 issues.filter_sort=排序 issues.filter_sort.latest=最新建立 issues.filter_sort.oldest=最早建立 @@ -1059,22 +1211,24 @@ issues.commented_at=`已留言 %s` issues.delete_comment_confirm=您確定要刪除這則留言嗎? issues.context.copy_link=複製連結 issues.context.quote_reply=引用回覆 +issues.context.reference_issue=新增問題並參考 issues.context.edit=編輯 issues.context.delete=刪除 issues.no_content=尚未有任何內容 issues.close_issue=關閉 -issues.pull_merged_at=`合併了提交 %[2]s%[3]s %[4]s` +issues.pull_merged_at=`合併了提交 %[2]s%[3]s %[4]s` +issues.manually_pull_merged_at=`手動合併了提交 %[2]s%[3]s %[4]s` issues.close_comment_issue=留言並關閉 issues.reopen_issue=重新開放 issues.reopen_comment_issue=留言並重新開放 issues.create_comment=留言 issues.closed_at=`關閉了這個問題 %[2]s` issues.reopened_at=`重新開放了這個問題 %[2]s` -issues.commit_ref_at=`在提交中引用了此問題 %[2]s` -issues.ref_issue_from=`引用了這個問題 %[4]s %[2]s` -issues.ref_pull_from=`引用了這個合併請求 %[4]s %[2]s` -issues.ref_closing_from=`引用了合併請求 %[4]s 將關閉這個問題 %[2]s` -issues.ref_reopening_from=`引用了合併請求 %[4]s 將重新開放這個問題 %[2]s` +issues.commit_ref_at=`在提交中關聯了這個問題 %[2]s` +issues.ref_issue_from=`關聯了這個問題 %[4]s %[2]s` +issues.ref_pull_from=`關聯了這個合併請求 %[4]s %[2]s` +issues.ref_closing_from=`關聯了合併請求 %[4]s 將關閉這個問題 %[2]s` +issues.ref_reopening_from=`關聯了合併請求 %[4]s 將重新開放這個問題 %[2]s` issues.ref_closed_from=`關閉了這個問題 %[4]s %[2]s` issues.ref_reopened_from=`重新開放了這個問題 %[4]s %[2]s` issues.ref_from=`自 %[1]s` @@ -1085,6 +1239,8 @@ issues.re_request_review=再次請求審核 issues.is_stale=經過此審核以後,此合併請求有被修改 issues.remove_request_review=移除審核請求 issues.remove_request_review_block=無法移除審核請求 +issues.dismiss_review=取消審核 +issues.dismiss_review_warning=你確定要取消此審核嗎? issues.sign_in_require_desc= 登入 才能加入這對話。 issues.edit=編輯 issues.cancel=取消 @@ -1098,15 +1254,15 @@ issues.label_edit=編輯 issues.label_delete=刪除 issues.label_modify=編輯標籤 issues.label_deletion=刪除標籤 -issues.label_deletion_desc=刪除標籤會將其從所有問題中刪除,繼續? +issues.label_deletion_desc=刪除標籤會將其從所有問題中刪除。是否繼續? issues.label_deletion_success=標籤已刪除。 issues.label.filter_sort.alphabetically=按字母順序排序 issues.label.filter_sort.reverse_alphabetically=按字母反向排序 issues.label.filter_sort.by_size=檔案由小到大 issues.label.filter_sort.reverse_by_size=檔案由大到小 issues.num_participants=%d 參與者 -issues.attachment.open_tab=`在新分頁中查看 '%s'` -issues.attachment.download=`點擊下載 '%s'` +issues.attachment.open_tab=`在新分頁中查看「%s」` +issues.attachment.download=`點擊下載「%s」` issues.subscribe=訂閱 issues.unsubscribe=取消訂閱 issues.lock=鎖定對話 @@ -1129,14 +1285,17 @@ issues.lock.title=鎖定此問題的對話。 issues.unlock.title=解鎖此問題的對話。 issues.comment_on_locked=您無法在已鎖定的問題上留言。 issues.tracker=時間追蹤 -issues.start_tracking_short=開始 +issues.start_tracking_short=開始計時 issues.start_tracking=開始時間追蹤 issues.start_tracking_history=`開始工作 %s` issues.tracker_auto_close=當這個問題被關閉時,自動停止計時器 issues.tracking_already_started=`您已在另一個問題上開始時間追蹤!` -issues.stop_tracking=停止 +issues.stop_tracking=停止計時 issues.stop_tracking_history=`結束工作 %s` +issues.cancel_tracking=捨棄 +issues.cancel_tracking_history=`取消時間追蹤 %s` issues.add_time=手動新增時間 +issues.del_time=刪除此時間記錄 issues.add_time_short=新增時間 issues.add_time_cancel=取消 issues.add_time_history=`加入了花費時間 %s` @@ -1144,17 +1303,15 @@ issues.del_time_history=`刪除了花費時間 %s` issues.add_time_hours=小時 issues.add_time_minutes=分鐘 issues.add_time_sum_to_small=沒有輸入時間。 -issues.cancel_tracking=取消 -issues.cancel_tracking_history=`取消時間追蹤 %s` issues.time_spent_total=總花費時間 issues.time_spent_from_all_authors=`總花費時間:%s` issues.due_date=截止日期 -issues.invalid_due_date_format=截止日期的格式錯誤,必須是 "yyyy-mm-dd" 的形式。 +issues.invalid_due_date_format=截止日期的格式必須為「yyyy-mm-dd」。 issues.error_modifying_due_date=無法修改截止日期。 issues.error_removing_due_date=無法移除截止日期。 issues.push_commit_1=加入了 %d 個提交 %s issues.push_commits_n=加入了 %d 個提交 %s -issues.force_push_codes=`強制推送了 %[1]s 自 %[2]s%[4]s %[6]s` +issues.force_push_codes=`強制推送了 %[1]s 自 %[2]s%[4]s %[6]s` issues.due_date_form=yyyy年mm月dd日 issues.due_date_form_add=新增截止日期 issues.due_date_form_edit=編輯 @@ -1175,8 +1332,8 @@ issues.dependency.remove=移除 issues.dependency.remove_info=移除此先決條件 issues.dependency.added_dependency=`加入了新的先決條件 %s` issues.dependency.removed_dependency=`移除了先決條件 %s` -issues.dependency.issue_closing_blockedby=此合併請求被下列問題阻擋而無法關閉 -issues.dependency.pr_closing_blockedby=此問題被下列問題阻擋而無法關閉 +issues.dependency.pr_closing_blockedby=此合併請求被下列問題阻擋而無法關閉 +issues.dependency.issue_closing_blockedby=此問題被下列問題阻擋而無法關閉 issues.dependency.issue_close_blocks=因為此問題的阻擋,下列問題無法被關閉 issues.dependency.pr_close_blocks=因為此合併請求的阻擋,下列問題無法被關閉 issues.dependency.issue_close_blocked=在您關閉此問題以前,您必須先關閉所有阻擋它的問題。 @@ -1197,6 +1354,8 @@ issues.review.self.approval=您不能核可自己的合併請求。 issues.review.self.rejection=您不能對自己的合併請求提出請求變更。 issues.review.approve=核可了這些變更 %s issues.review.comment=已審核 %s +issues.review.dismissed=取消 %s 的審核 %s +issues.review.dismissed_label=已取消 issues.review.left_comment=留下了回應 issues.review.content.empty=您必須留下訊息指出需要修正的地方。 issues.review.reject=請求了變更 %s @@ -1216,6 +1375,10 @@ issues.review.resolve_conversation=解決對話 issues.review.un_resolve_conversation=取消解決對話 issues.review.resolved_by=標記了此對話為已解決 issues.assignee.error=因為未預期的錯誤,未能成功指派所有成員。 +issues.reference_issue.body=內容 + +compare.compare_base=基底分支 +compare.compare_head=比較 pulls.desc=啟用合併請求和程式碼審核。 pulls.new=建立合併請求 @@ -1226,7 +1389,8 @@ pulls.compare_compare=拉取自 pulls.filter_branch=過濾分支 pulls.no_results=未找到結果 pulls.nothing_to_compare=這些分支的內容相同,無需建立合併請求。 -pulls.has_pull_request=`已有相同的合併請求: %[2]s#%[3]d` +pulls.nothing_to_compare_and_allow_empty_pr=這些分支的內容相同,此合併請求將會是空白的。 +pulls.has_pull_request=`已有相同的合併請求:%[2]s#%[3]d` pulls.create=建立合併請求 pulls.title_desc=請求將 %[1]d 次程式碼提交從 %[2]s 合併至 %[3]s pulls.merged_title_desc=將 %[1]d 次代碼提交從 %[2]s 合併至 %[3]s %[4]s @@ -1238,17 +1402,23 @@ pulls.reopen_to_merge=請重新開放此合併請求以進行合併作業。 pulls.cant_reopen_deleted_branch=無法重新開放此合併請求,因為該分支已刪除。 pulls.merged=已合併 pulls.merged_as=此合併請求已被合併為 %[2]s。 +pulls.manually_merged=手動合併 +pulls.manually_merged_as=此合併請求已被手動合併為 %[2]s。 pulls.is_closed=合併請求已被關閉。 pulls.has_merged=合併請求已合併。 pulls.title_wip_desc=`標題用 %s 開頭以避免意外地合併此合併請求。` -pulls.cannot_merge_work_in_progress=此合併請求被標記為仍在作業中。準備好要合併時請移除 %s 前綴。 +pulls.cannot_merge_work_in_progress=此合併請求被標記為還在進行中(WIP)。 +pulls.still_in_progress=還在進行中嗎? +pulls.add_prefix=加入 %s 前綴 +pulls.remove_prefix=移除 %s 前綴 pulls.data_broken=此合併請求已損毀,因為遺失 Fork 資訊。 pulls.files_conflicted=此合併請求有變更和目標分支衝突。 pulls.is_checking=正在進行合併衝突檢查,請稍後再試。 +pulls.is_empty=此分支與目標分支相同。 pulls.required_status_check_failed=未通過某些必要的檢查。 pulls.required_status_check_missing=遺失某些必要的檢查。 pulls.required_status_check_administrator=身為系統管理員,您依然可以進行合併。 -pulls.blocked_by_approvals=此合併請求尚未獲得足夠的核可。需要 %d 個核可,已經獲得 %d 個。 +pulls.blocked_by_approvals=此合併請求尚未獲得足夠的核可。需要 %[2]d 個核可,已經獲得 %[1]d 個。 pulls.blocked_by_rejection=官方審核人員要求修改此合併請求。 pulls.blocked_by_official_review_requests=此合併請求有官方的審核請求。 pulls.blocked_by_outdated_branch=此合併請求因逾期而被阻擋。 @@ -1265,16 +1435,19 @@ pulls.reject_count_1=%d 變更請求 pulls.reject_count_n=%d 變更請求 pulls.waiting_count_1=%d 等待審核 pulls.waiting_count_n=%d 等待審核 +pulls.wrong_commit_id=提交 id 必須存在於目標分支上 pulls.no_merge_desc=無法進行合併,因為所有儲存庫的合併選項已被停用。 pulls.no_merge_helper=在儲存庫設定啟用合併選項或手動合併該合併請求。 pulls.no_merge_wip=無法進行合併,因為它被標記為還在進行中。 pulls.no_merge_not_ready=此合併請求還沒準備好被合併,請檢查審核狀態和狀態檢查。 pulls.no_merge_access=您未被授權合併此合併請求。 -pulls.merge_pull_request=合併 -pulls.rebase_merge_pull_request=Rebase 後合併 -pulls.rebase_merge_commit_pull_request=Rebase 後合併 (--no-ff) -pulls.squash_merge_pull_request=Squash 後合併 +pulls.merge_pull_request=建立合併提交 +pulls.rebase_merge_pull_request=Rebase 後快轉 +pulls.rebase_merge_commit_pull_request=Rebase 後建立合併提交 +pulls.squash_merge_pull_request=建立 Squash 提交 +pulls.merge_manually=手動合併 +pulls.merge_commit_id=合併提交 ID pulls.require_signed_wont_sign=該分支需要經簽署的提交,但此合併將不會被簽署。 pulls.invalid_merge_option=您無法對此合併請求使用這個合併選項。 pulls.merge_conflict=合併失敗:合併時發生衝突。 提示:請嘗試不同的策略 @@ -1286,7 +1459,7 @@ pulls.unrelated_histories=合併失敗:要合併的 HEAD 和基底分支沒有 pulls.merge_out_of_date=合併失敗:產生合併時,基底已被更新。提示:再試一次。 pulls.push_rejected=合併失敗:此推送被拒絕。請檢查此儲存庫的 Githook。 pulls.push_rejected_summary=完整的拒絕訊息 -pulls.push_rejected_no_message=合併失敗:此推送被拒絕但未提供其它資訊。
    請檢查此儲存庫的 Githook。 +pulls.push_rejected_no_message=合併失敗:此推送被拒絕但未提供其他資訊。
    請檢查此儲存庫的 Githook。 pulls.open_unmerged_pull_exists=`您不能重新開放,因為目前有相同的合併請求 (#%d) 正在進行中。` pulls.status_checking=還在進行一些檢查 pulls.status_checks_success=所有檢查都通過 @@ -1321,13 +1494,13 @@ milestones.title=標題 milestones.desc=描述 milestones.due_date=截止日期(可選) milestones.clear=清除 -milestones.invalid_due_date_format=截止日期的格式必須為 'yyyy-mm-dd'。 -milestones.create_success=已建立里程碑 '%s'。 +milestones.invalid_due_date_format=截止日期的格式必須為「yyyy-mm-dd」。 +milestones.create_success=已建立里程碑「%s」。 milestones.edit=編輯里程碑 milestones.edit_subheader=里程碑可用來組織問題和追蹤進度。 milestones.cancel=取消 milestones.modify=更新里程碑 -milestones.edit_success=里程碑 '%s' 已更新。 +milestones.edit_success=已更新里程碑「%s」。 milestones.deletion=刪除里程碑 milestones.deletion_desc=刪除里程碑會從所有相關的問題移除它。是否繼續? milestones.deletion_success=里程碑已刪除 @@ -1408,7 +1581,7 @@ activity.closed_issues_count_1=關閉的問題 activity.closed_issues_count_n=關閉的問題 activity.title.issues_1=%d 個問題 activity.title.issues_n=%d 個問題 -activity.title.issues_closed_by=%[2]s關閉了 %[1]s +activity.title.issues_closed_from=%[2]s關閉了 %[1]s activity.title.issues_created_by=%[2]s建立了 %[1]s activity.closed_issue_label=已關閉 activity.new_issues_count_1=新增問題 @@ -1437,7 +1610,7 @@ activity.git_stats_file_1=%d 個檔案 activity.git_stats_file_n=%d 個檔案 activity.git_stats_files_changed_1=已變更 activity.git_stats_files_changed_n=已變更 -activity.git_stats_additions=: +activity.git_stats_additions=: activity.git_stats_addition_1=新增 %d 行 activity.git_stats_addition_n=新增 %d 行 activity.git_stats_and_deletions=和 @@ -1446,6 +1619,8 @@ activity.git_stats_deletion_n=刪除 %d 行 search=搜尋 search.search_repo=搜尋儲存庫 +search.fuzzy=模糊 +search.match=符合 search.results=在 %s 中搜尋 "%s" 的结果 settings=設定 @@ -1461,7 +1636,16 @@ settings.hooks=Webhook settings.githooks=Git Hook settings.basic_settings=基本設定 settings.mirror_settings=鏡像設定 -settings.sync_mirror=現在同步 +settings.mirror_settings.docs=設定您的專案自動向其他儲存庫推送、拉取變更,分支、標籤和提交會自動同步。如何鏡像儲存庫? +settings.mirror_settings.mirrored_repository=已鏡像的儲存庫 +settings.mirror_settings.direction=方向 +settings.mirror_settings.direction.pull=拉取 +settings.mirror_settings.direction.push=推送 +settings.mirror_settings.last_update=最近更新時間 +settings.mirror_settings.push_mirror.none=未設定推送鏡像 +settings.mirror_settings.push_mirror.remote_url=Git 遠端儲存庫 URL +settings.mirror_settings.push_mirror.add=新增推送鏡像 +settings.sync_mirror=立即同步 settings.mirror_sync_in_progress=鏡像同步正在進行中。 請稍後再回來看看。 settings.email_notifications.enable=啟用郵件通知 settings.email_notifications.onmention=只在被提到時傳送郵件通知 @@ -1469,6 +1653,7 @@ settings.email_notifications.disable=關閉郵件通知 settings.email_notifications.submit=套用郵件偏好設定 settings.site=網站 settings.update_settings=更新設定 +settings.branches.update_default_branch=更新預設分支 settings.advanced_settings=進階設定 settings.wiki_desc=啟用儲存庫 Wiki settings.use_internal_wiki=使用內建 Wiki @@ -1496,6 +1681,9 @@ settings.pulls.allow_merge_commits=啟用提交合併 settings.pulls.allow_rebase_merge=啟用 Rebase 合併提交 settings.pulls.allow_rebase_merge_commit=啟用 Rebase 顯式合併提交(--no-ff) settings.pulls.allow_squash_commits=啟用 Squash 合併提交 +settings.pulls.allow_manual_merge=允許將合併請求標記為手動合併 +settings.pulls.enable_autodetect_manual_merge=啟用自動偵測手動合併(注意:在某些特殊情況下可能發生誤判) +settings.pulls.default_delete_branch_after_merge=預設在合併後刪除合併請求分支 settings.projects_desc=啟用儲存庫專案 settings.admin_settings=管理員設定 settings.admin_enable_health_check=啟用儲存庫的健康檢查 (git fsck) @@ -1513,10 +1701,21 @@ settings.convert_fork_notices_1=此操作會將此 fork 轉換成普通儲存庫 settings.convert_fork_confirm=轉換儲存庫 settings.convert_fork_succeed=此 fork 已轉換成普通儲存庫。 settings.transfer=轉移儲存庫所有權 -settings.transfer_desc=將此儲存庫轉移給其它使用者或受您管理的組織。 +settings.transfer.rejected=儲存庫轉移被拒絕。 +settings.transfer.success=儲存庫已成功轉移。 +settings.transfer_abort=取消轉移 +settings.transfer_abort_invalid=您無法取消不存在的儲存庫轉移。 +settings.transfer_abort_success=已成功取消將儲存庫轉移到「%s」的請求。 +settings.transfer_desc=將此儲存庫轉移給其他使用者或受您管理的組織。 +settings.transfer_form_title=輸入儲存庫名稱以確認: +settings.transfer_in_progress=目前正在進行轉移。如果您想要將此儲存庫轉移給其他使用者,請取消他。 settings.transfer_notices_1=- 如果將此儲存庫轉移給個別使用者,您將會失去此儲存庫的存取權。 settings.transfer_notices_2=- 如果將此儲存庫轉移到您(共同)擁有的組織,您將能繼續保有此儲存庫的存取權。 -settings.transfer_form_title=輸入儲存庫名稱以確認: +settings.transfer_notices_3=- 如果此儲存庫為私有儲存庫且將轉移給個別使用者,此動作確保該使用者至少擁有讀取權限(必要時將會修改權限)。 +settings.transfer_owner=新擁有者 +settings.transfer_perform=進行轉移 +settings.transfer_started=此儲存庫已被標記為待轉移且正在等待「%s」的確認 +settings.transfer_succeed=已轉移儲存庫。 settings.signing_settings=簽署驗證設定 settings.trust_model=簽署信任模式 settings.trust_model.default=預設信任模式 @@ -1542,9 +1741,6 @@ settings.delete_notices_2=- 此操作將永久刪除 %s 儲存 settings.delete_notices_fork_1=- 在此儲存庫刪除後,它的 fork 將會變成獨立儲存庫。 settings.deletion_success=這個儲存庫已被刪除。 settings.update_settings_success=已更新儲存庫的設定。 -settings.transfer_owner=新擁有者 -settings.make_transfer=進行轉移 -settings.transfer_succeed=已轉移儲存庫。 settings.confirm_delete=刪除儲存庫 settings.add_collaborator=增加協作者 settings.add_collaborator_success=成功增加協作者! @@ -1639,7 +1835,7 @@ settings.event_pull_request_review_desc=核准、退回或提出審核留言。 settings.event_pull_request_sync=合併請求同步 settings.event_pull_request_sync_desc=合併請求同步。 settings.branch_filter=分支篩選 -settings.branch_filter_desc=推送、建立分支、刪除分支事件的白名單,請使用 glob 比對模式。如果留白或輸入*,所有分支的事件都會被回報。語法參見 github.com/gobwas/glob。範例:master, {master,release*}。 +settings.branch_filter_desc=推送、建立分支、刪除分支事件的白名單,請使用 glob 比對模式。如果留白或輸入*,所有分支的事件都會被回報。語法參見 github.com/gobwas/glob。範例:master, {master,release*}。 settings.active=啟用 settings.active_helper=觸發事件的資訊將會被送到此 Webhook URL。 settings.add_hook_success=Webhook 新增成功! @@ -1658,6 +1854,7 @@ settings.add_telegram_hook_desc=將 Telegram 整合到您的儲 settings.add_matrix_hook_desc=將 Matrix 整合到您的儲存庫。 settings.add_msteams_hook_desc=將 Microsoft Teams 整合到您的儲存庫。 settings.add_feishu_hook_desc=將 Feishu 整合到您的儲存庫。 +settings.add_Wechat_hook_desc=將 Wechatwork 整合到您的儲存庫。 settings.deploy_keys=部署金鑰 settings.add_deploy_key=新增部署金鑰 settings.deploy_key_desc=部署金鑰具有唯讀權限,可拉取此儲存庫。 @@ -1698,7 +1895,7 @@ settings.protect_merge_whitelist_teams=允許合併的團隊: settings.protect_check_status_contexts=啟用狀態檢查 settings.protect_check_status_contexts_desc=合併前必須先通過狀態檢查。選擇合併前必須通過的檢查。啟用時,必須先將提交推送到另一個分支,通過狀態檢查後再合併或直接推送到符合規則的分支。如果未選擇任何項目,最一個提交必將成功通過狀態檢查。 settings.protect_check_status_contexts_list=此儲存庫一週內曾進行過狀態檢查 -settings.protect_required_approvals=需要的核可數量: +settings.protect_required_approvals=需要的核可數量: settings.protect_required_approvals_desc=只有在獲得足夠數量的核可後才能進行合併。 settings.protect_approvals_whitelist_enabled=使用白名單控管審核人員與團隊 settings.protect_approvals_whitelist_enabled_desc=只有白名單內的使用者與團隊會被計入需要的核可數量。未使用白名單時,將計算任何有寫入權限之人的核可。 @@ -1709,11 +1906,11 @@ settings.dismiss_stale_approvals_desc=當新的提交有修改到合併請求的 settings.require_signed_commits=僅接受經簽署的提交 settings.require_signed_commits_desc=拒絕未經簽署或未經驗證的提交推送到此分支。 settings.protect_protected_file_patterns=受保護的檔案模式(以分號區隔「\;」): -settings.protect_protected_file_patterns_desc=即便您有權限新增、修改和刪除此分支的檔案,仍不允許直接修改受保護的檔案。可以用分號「\;」分隔多個模式。請於 github.com/gobwas/glob 文件查看模式格式。範例:.drone.yml, /docs/**/*.txt。 +settings.protect_protected_file_patterns_desc=即便使用者有權限新增、修改和刪除此分支的檔案,仍不允許直接修改受保護的檔案。可以用半形分號「\;」分隔多個模式。請於github.com/gobwas/glob 文件查看模式格式。範例:.drone.yml, /docs/**/*.txt。 settings.add_protected_branch=啟用保護 settings.delete_protected_branch=停用保護 -settings.update_protect_branch_success='%s' 的分支保護已被更新 -settings.remove_protected_branch_success='%s' 的分支保護已被停用 +settings.update_protect_branch_success=已更新「%s」的分支保護。 +settings.remove_protected_branch_success=已停用「%s」的分支保護。 settings.protected_branch_deletion=停用分支保護 settings.protected_branch_deletion_desc=停用分支保護將允許有寫入權限的使用者推送至該分支,是否繼續? settings.block_rejected_reviews=有退回的審核時阻擋合併 @@ -1723,10 +1920,21 @@ settings.block_on_official_review_requests_desc=如果有官方的審核請求 settings.block_outdated_branch=如果合併請求已經過時則阻擋合併 settings.block_outdated_branch_desc=當 head 分支落後於基礎分支時不得合併。 settings.default_branch_desc=請選擇一個用來提交程式碼和合併請求的預設分支。 +settings.default_merge_style_desc=合併請求的預設方式: settings.choose_branch=選擇一個分支... settings.no_protected_branch=沒有受保護的分支。 settings.edit_protected_branch=編輯 settings.protected_branch_required_approvals_min=需要的核可數量不能為負數。 +settings.tags=標籤 +settings.tags.protection=標籤保護 +settings.tags.protection.pattern=標籤格式 +settings.tags.protection.allowed=允許的 +settings.tags.protection.allowed.users=允許的使用者 +settings.tags.protection.allowed.teams=允許的團隊 +settings.tags.protection.allowed.noone=無 +settings.tags.protection.create=保護標籤 +settings.tags.protection.none=沒有受保護的標籤。 +settings.tags.protection.pattern.description=您可以使用單一名稱、Glob 模式、正規表示式來配對多個標籤。在受保護的標籤指南閱讀更多內容。 settings.bot_token=Bot Token settings.chat_id=Chat ID settings.matrix.homeserver_url=Homeserver 網址 @@ -1740,6 +1948,7 @@ settings.archive.success=此儲存庫已被封存 settings.archive.error=嘗試封存儲存庫時發生錯誤。查看日誌檔以獲得更多資訊。 settings.archive.error_ismirror=無法封存鏡像儲存庫。 settings.archive.branchsettings_unavailable=已封存的儲存庫無法使用分支設定。 +settings.archive.tagsettings_unavailable=已封存的儲存庫無法使用標籤設定。 settings.unarchive.button=解除封存儲存庫 settings.unarchive.header=解除封存本儲存庫 settings.unarchive.text=取消封存此儲存庫將使它能再次接收提交、推送、新問題與合併請求。 @@ -1777,10 +1986,10 @@ diff.parent=父節點 diff.commit=當前提交 diff.git-notes=備註 diff.data_not_available=沒有內容比較可以使用 -diff.options_button=Diff 選項 +diff.options_button=差異選項 diff.show_diff_stats=顯示統計資料 diff.download_patch=下載 Patch 檔 -diff.download_diff=下載 Diff 檔 +diff.download_diff=下載差異檔 diff.show_split_view=分割檢視 diff.show_unified_view=合併檢視 diff.whitespace_button=空白符號 @@ -1791,14 +2000,16 @@ diff.whitespace_ignore_at_eol=忽略行尾空白符號的變更 diff.stats_desc=共有 %d 個檔案被更改,包括 %d 行新增%d 行删除 diff.stats_desc_file=變更 %d 行:新增 %d 行,删除 %d 行 diff.bin=二進制 +diff.bin_not_shown=未顯示二進位檔案。 diff.view_file=查看文件 diff.file_before=之前 diff.file_after=之後 diff.file_image_width=寬度 diff.file_image_height=高度 diff.file_byte_size=大小 -diff.file_suppressed=文件差異過大導致無法顯示 -diff.too_many_files=部分文件因文件數量過多而無法顯示 +diff.file_suppressed=檔案差異因為檔案過大而無法顯示 +diff.file_suppressed_line_too_long=檔案差異因為一行或多行太長而無法顯示 +diff.too_many_files=本差異變更的檔案數量過多導致部分檔案未顯示 diff.comment.placeholder=留言... diff.comment.markdown_info=支援 markdown 格式。 diff.comment.add_single_comment=加入單獨的留言 @@ -1813,6 +2024,9 @@ diff.review.approve=核可 diff.review.reject=請求變更 diff.committed_by=提交者 diff.protected=受保護 +diff.image.side_by_side=並列 +diff.image.swipe=滑動 +diff.image.overlay=重疊 releases.desc=追蹤專案版本和檔案下載。 release.releases=版本發佈 @@ -1822,6 +2036,7 @@ release.new_release=發佈新版本 release.draft=草稿 release.prerelease=預發佈版本 release.stable=穩定 +release.compare=比較 release.edit=編輯 release.ahead.commits=%d 次提交 release.ahead.target=在此版本發佈後被加入到 %s @@ -1848,13 +2063,16 @@ release.deletion_tag_desc=即將從儲存庫移除此標籤。儲存庫內容和 release.deletion_tag_success=已刪除此標籤。 release.tag_name_already_exist=已經存在使用相同標籤的發佈版本。 release.tag_name_invalid=標籤名稱無效。 +release.tag_name_protected=標籤名稱已受保護。 release.tag_already_exist=此標籤名稱已存在。 release.downloads=下載附件 release.download_count=下載次數:%s +release.add_tag_msg=使用此版本的標題和內容作為標籤訊息。 +release.add_tag=只建立標籤 branch.name=分支名稱 branch.search=搜尋分支 -branch.already_exists=分支名稱 ”%s“ 已經存在 +branch.already_exists=已存在名為「%s」的分支。 branch.delete_head=刪除 branch.delete=刪除分支「%s」 branch.delete_html=刪除分支 @@ -1863,25 +2081,36 @@ branch.deletion_success=分支「%s」已被刪除。 branch.deletion_failed=刪除分支「%s」失敗。 branch.delete_branch_has_new_commits=因為合併後已加入了新的提交,「%s」分支無法被刪除。 branch.create_branch=建立分支 %s -branch.create_from=從 '%s' -branch.create_success=已建立分支 '%s'。 -branch.branch_already_exists=分支 '%s' 已存在此儲存庫 +branch.create_from=從「%s」 +branch.create_success=已建立分支「%s」。 +branch.branch_already_exists=此儲存庫已有名為「%s」的分支。 branch.branch_name_conflict=分支名稱「%s」與現有分支「%s」衝突。 branch.tag_collision=無法建立「%s」分支,因為此儲存庫中已有同名的標籤。 -branch.deleted_by=刪除人: %s +branch.deleted_by=由 %s 刪除 branch.restore_success=已還原分支「%s」。 branch.restore_failed=還原分支 %s 失敗 branch.protected_deletion_failed=分支「%s」已被保護,不能刪除。 branch.default_deletion_failed=分支「%s」為預設分支,不能刪除。 branch.restore=還原分支「%s」 -branch.download=下載分支 '%s' +branch.download=下載分支「%s」 branch.included_desc=此分支是預設分支的一部分 branch.included=包含 +branch.create_new_branch=從下列分支建立分支: +branch.confirm_create_branch=建立分支 +branch.new_branch=建立新分支 +branch.new_branch_from=從「%s」建立新分支 + +tag.create_tag=建立標籤 %s +tag.create_success=已建立標籤「%s」。 topic.manage_topics=管理主題 topic.done=完成 topic.count_prompt=您最多能選擇 25 個主題 -topic.format_prompt=主題必須以字母或數字為開頭,可包含連接號 ('-') 且最長為 35 個字。 +topic.format_prompt=主題必須以字母或數字為開頭,可包含連接號「-」且最長為 35 個字元。 + +error.csv.too_large=無法渲染此檔案,因為它太大了。 +error.csv.unexpected=無法渲染此檔案,因為它包含了未預期的字元,於第 %d 行第 %d 列。 +error.csv.invalid_field_count=無法渲染此檔案,因為它第 %d 行的欄位數量有誤。 [org] org_name_holder=組織名稱 @@ -1905,8 +2134,8 @@ team_permission_desc=權限 team_unit_desc=允許存取的儲存庫區域 team_unit_disabled=(已停用) -form.name_reserved=組織名稱 '%s' 是被保留的。 -form.name_pattern_not_allowed=儲存庫名稱無法使用 "%s"。 +form.name_reserved=組織名稱「%s」是被保留的。 +form.name_pattern_not_allowed=儲存庫名稱不可包含字元「%s」。 form.create_org_not_allowed=此帳號禁止建立組織。 settings=組織設定 @@ -1918,14 +2147,15 @@ settings.permission=權限 settings.repoadminchangeteam=儲存庫管理者可增加與移除團隊權限 settings.visibility=瀏覽權限 settings.visibility.public=公開 -settings.visibility.limited=受限(只有登入的使用者才能看到) +settings.visibility.limited=受限(只有登入的使用者才能看到) settings.visibility.limited_shortname=受限 -settings.visibility.private=私有(只有組織成員才能看到) +settings.visibility.private=私有(只有組織成員才能看到) settings.visibility.private_shortname=私有 settings.update_settings=更新設定 settings.update_setting_success=組織設定已更新。 settings.change_orgname_prompt=注意:修改組織名稱將會同時修改對應的 URL。 +settings.change_orgname_redirect_prompt=舊的名稱被領用前,會重新導向新名稱。 settings.update_avatar_success=已更新組織的大頭貼。 settings.delete=刪除組織 settings.delete_account=刪除這個組織 @@ -1946,12 +2176,15 @@ members.member_role=成員角色: members.owner=擁有者 members.member=普通成員 members.remove=移除 +members.remove.detail=確定要從 %[2]s 中刪除 %[1]s 嗎? members.leave=離開 +members.leave.detail=確定要離開 %s 嗎? members.invite_desc=邀請新的用戶加入 %s: members.invite_now=立即邀請 teams.join=加入 teams.leave=離開 +teams.leave.detail=確定要離開 %s 嗎? teams.can_create_org_repo=建立儲存庫 teams.can_create_org_repo_helper=成員可以在組織中新增儲存庫。建立者將自動取得新儲存庫的管理員權限。 teams.read_access=讀取權限 @@ -1997,8 +2230,7 @@ dashboard=資訊主頁 users=使用者帳戶 organizations=組織 repositories=儲存庫 -hooks=預設 Webhook -systemhooks=系統 Webhook +hooks=Webhook authentication=認證來源 emails=使用者電子信箱 config=組態 @@ -2030,7 +2262,7 @@ dashboard.cron.error=Cron 中的錯誤: %s: %[3]s dashboard.cron.finished=Cron: %[1]s 已完成 dashboard.delete_inactive_accounts=刪除所有未啟用帳戶 dashboard.delete_inactive_accounts.started=刪除所有未啟用帳戶的任務已啟動。 -dashboard.delete_repo_archives=刪除所有儲存庫存檔 +dashboard.delete_repo_archives=刪除所有儲存庫存檔(ZIP, TAR.GZ, etc..) dashboard.delete_repo_archives.started=刪除所有儲存庫存檔的任務已啟動。 dashboard.delete_missing_repos=刪除所有遺失 Git 檔案的儲存庫 dashboard.delete_missing_repos.started=刪除所有遺失 Git 檔案的儲存庫的任務已啟動。 @@ -2049,6 +2281,7 @@ dashboard.resync_all_sshprincipals.desc=(內建 SSH 伺服器無需使用。) dashboard.resync_all_hooks=重新同步所有儲存庫的 pre-receive、update 和 post-receive Hook。 dashboard.reinit_missing_repos=重新初始化所有記錄存在但遺失的 Git 儲存庫 dashboard.sync_external_users=同步外部使用者資料 +dashboard.cleanup_hook_task_table=清理 hook_task 資料表 dashboard.server_uptime=服務執行時間 dashboard.current_goroutine=目前的 Goroutines 數量 dashboard.current_memory_usage=目前記憶體使用量 @@ -2071,13 +2304,15 @@ dashboard.mcache_structures_usage=MCache 結構記使用量 dashboard.mcache_structures_obtained=被分配的 MCache 結構 dashboard.profiling_bucket_hash_table_obtained=被分配的剖析雜湊表 dashboard.gc_metadata_obtained=被分配 GC Metadata -dashboard.other_system_allocation_obtained=其它被分配的系統記憶體 +dashboard.other_system_allocation_obtained=其他被分配的系統記憶體 dashboard.next_gc_recycle=下次 GC 記憶體回收量 dashboard.last_gc_time=距離上次 GC 時間 dashboard.total_gc_time=總 GC 暫停時間 dashboard.total_gc_pause=總 GC 暫停時間 dashboard.last_gc_pause=上次 GC 暫停時間 dashboard.gc_times=GC 執行次數 +dashboard.delete_old_actions=從資料庫刪除所有舊行為 +dashboard.delete_old_actions.started=從資料庫刪除所有舊行為的任務已啟動。 users.user_manage_panel=使用者帳戶管理 users.new_account=建立使用者帳戶 @@ -2092,7 +2327,7 @@ users.created=建立時間 users.last_login=上次登入 users.never_login=從未登入 users.send_register_notify=寄送使用者註冊通知 -users.new_success=已建立新帳戶 '%s'。 +users.new_success=已建立新帳戶「%s」。 users.edit=編輯 users.auth_source=認證來源 users.local=本地 @@ -2138,7 +2373,7 @@ orgs.new_orga=新增組織 repos.repo_manage_panel=儲存庫管理 repos.unadopted=未接管的儲存庫 -repos.unadopted.no_more=找不到其它未接管的儲存庫 +repos.unadopted.no_more=找不到其他未接管的儲存庫 repos.owner=擁有者 repos.name=儲存庫名稱 repos.private=私有 @@ -2148,10 +2383,12 @@ repos.forks=Fork 數 repos.issues=問題數 repos.size=大小 -hooks.desc=當觸發某些 Gitea 事件時,Webhook 會自動發出 HTTP POST 請求到指定的伺服器。這裡所定義的 Webhook 是預設的,並且會複製到所有新儲存庫。在 Webhook 指南閱讀更多內容。 -hooks.add_webhook=新增預設 Webhook -hooks.update_webhook=更新預設 Webhook +defaulthooks=預設 Webhook +defaulthooks.desc=當觸發某些 Gitea 事件時,Webhook 會自動發出 HTTP POST 請求到指定的伺服器。這裡所定義的 Webhook 是預設的,並且會複製到所有新儲存庫。在 Webhook 指南閱讀更多內容。 +defaulthooks.add_webhook=新增預設 Webhook +defaulthooks.update_webhook=更新預設 Webhook +systemhooks=系統 Webhook systemhooks.desc=當觸發某些 Gitea 事件時,Webhook 會自動發出 HTTP POST 請求到指定的伺服器。由於這裡所定義的 Webhook 會影響此系統上的所有儲存庫,因此請評估這會對效能造成多少影響。在 Webhook 指南閱讀更多內容。 systemhooks.add_webhook=新增系統 Webhook systemhooks.update_webhook=更新系統 Webhook @@ -2171,7 +2408,6 @@ auths.host=主機地址 auths.port=連接埠 auths.bind_dn=Bind DN auths.bind_password=Bind 密碼 -auths.bind_password_helper=警告:此密碼以明文存儲。 請儘可能使用唯讀帳戶。 auths.user_base=用戶搜尋基準 auths.user_dn=用戶 DN auths.attribute_username=帳號屬性 @@ -2198,10 +2434,15 @@ auths.smtp_auth=SMTP 驗證類型 auths.smtphost=SMTP 主機地址 auths.smtpport=SMTP 連接埠 auths.allowed_domains=域名白名單 -auths.allowed_domains_helper=留白以允許所有域名。以逗號 (',') 分隔多個域名。 -auths.enable_tls=啟用 TLS 加密 +auths.allowed_domains_helper=留白以允許所有域名。以半形逗號「,」分隔多個域名。 auths.skip_tls_verify=忽略 TLS 驗證 +auths.force_smtps=強制 SMTPS +auths.force_smtps_helper=SMTPS 總是使用 465 埠。設定此選項以強制 SMTPS 使用其他埠。(除此之外若主機支援的話 STARTTLS 也會使用該埠。) +auths.helo_hostname=HELO 主機名稱 +auths.helo_hostname_helper=用 HELO 傳送的主機名稱。留空以傳送目前的主機名稱。 +auths.disable_helo=停用 HELO auths.pam_service_name=PAM 服務名稱 +auths.pam_email_domain=PAM 電子信箱域名(非必要) auths.oauth2_provider=OAuth2 提供者 auths.oauth2_icon_url=圖示 URL auths.oauth2_clientID=客戶端 ID (金鑰) @@ -2212,6 +2453,7 @@ auths.oauth2_tokenURL=Token URL auths.oauth2_authURL=授權 URL auths.oauth2_profileURL=個人資料 URL auths.oauth2_emailURL=電子郵件 URL +auths.oauth2_tenant=租戶 auths.enable_auto_register=允許授權用戶自動註冊 auths.sspi_auto_create_users=自動建立使用者 auths.sspi_auto_create_users_helper=允許 SSPI 認證方法於使用者首次登入時自動建立新帳戶 @@ -2242,7 +2484,7 @@ auths.tip.yandex=建立新的應用程式,從「Yandex.Passport API」區塊 auths.tip.mastodon=輸入您欲認證的 Mastodon 執行個體的自訂網址(或使用預設值) auths.edit=修改認證來源 auths.activated=該認證來源已啟用 -auths.new_success=已增加認證'%s'。 +auths.new_success=已增加認證「%s」。 auths.update_success=已更新認證來源。 auths.update=更新認證來源 auths.delete=刪除認證來源 @@ -2301,13 +2543,14 @@ config.db_path=資料庫路徑 config.service_config=服務組態 config.register_email_confirm=要求註冊時確認電子郵件 config.disable_register=關閉註冊功能 +config.allow_only_internal_registration=只允許從 Gitea 註冊 config.allow_only_external_registration=只允許從外部服務註冊 config.enable_openid_signup=啟用 OpenID 註冊 config.enable_openid_signin=啟用 OpenID 登入 config.show_registration_button=顯示註冊按鈕 config.require_sign_in_view=需要登入才能瀏覽頁面 config.mail_notify=啟用郵件通知 -config.disable_key_size_check=禁用金鑰最小長度檢查 +config.disable_key_size_check=停用金鑰最小長度檢查 config.enable_captcha=啟用驗證碼 config.active_code_lives=啟用用戶連結有效期 config.reset_password_code_lives=帳戶救援碼有效時間 @@ -2327,7 +2570,7 @@ config.skip_tls_verify=略過 TLS 驗證 config.mailer_config=SMTP 組態 config.mailer_enabled=啟用服務 -config.mailer_disable_helo=禁用 HELO 操作 +config.mailer_disable_helo=停用 HELO 操作 config.mailer_name=發送者名稱 config.mailer_host=郵件主機地址 config.mailer_user=發送者帳號 @@ -2337,8 +2580,8 @@ config.mailer_sendmail_args=Sendmail 參數 config.mailer_sendmail_timeout=Sendmail 逾時 config.test_email_placeholder=電子信箱 (例:test@example.com) config.send_test_mail=傳送測試郵件 -config.test_mail_failed=傳送測試郵件到 '%s' 時失敗:'%v" -config.test_mail_sent=測試郵件已發送到 '%s' +config.test_mail_failed=傳送測試郵件到「%s」時失敗:%v +config.test_mail_sent=測試郵件已傳送到「%s」。 config.oauth_config=OAuth 組態 config.oauth_enabled=啟用服務 @@ -2364,10 +2607,10 @@ config.disable_gravatar=停用 Gravatar config.enable_federated_avatar=啟用 Federated Avatars config.git_config=Git 組態 -config.git_disable_diff_highlight=禁用比較語法高亮 -config.git_max_diff_lines=Max Diff 線 (對於單個檔) -config.git_max_diff_line_characters=最大比較的字元 (單行) -config.git_max_diff_files=Max Diff 檔 (顯示) +config.git_disable_diff_highlight=停用比較語法高亮 +config.git_max_diff_lines=差異比較時顯示的最多行數(單檔) +config.git_max_diff_line_characters=差異比較時顯示的最多字元數(單行) +config.git_max_diff_files=差異比較時顯示的最多檔案數 config.git_gc_args=GC 參數 config.git_migrate_timeout=遷移逾時 config.git_mirror_timeout=鏡像更新超時 @@ -2377,7 +2620,6 @@ config.git_gc_timeout=GC 作業逾時 config.log_config=日誌組態 config.log_mode=日誌模式 -config.macaron_log_mode=Macaron 日誌模式 config.own_named_logger=具名日誌記錄器 config.routes_to_default_logger=路由到預設日誌記錄器 config.go_log=使用 Go 日誌 (重新導向到預設) @@ -2412,7 +2654,7 @@ monitor.queue.review=檢視組態 monitor.queue.review_add=檢視/新增工作者 monitor.queue.configuration=初始組態 monitor.queue.nopool.title=沒有工作者集區 -monitor.queue.nopool.desc=此佇列包裝著其它佇列,且本身沒有工作者集區。 +monitor.queue.nopool.desc=此佇列包裝著其他佇列,且本身沒有工作者集區。 monitor.queue.wrapped.desc=一個被包裝的佇列包裝著一個緩慢啟動的佇列,在 Channel 中緩衝請求。它本身沒有工作者集區。 monitor.queue.persistable-channel.desc=一個持久性的 Channel 包裝著兩個列隊。一個擁有自己工作者集區的 Channel 佇列,另一個是 Level 佇列用於先前關閉後持續的請求。它本身沒有工作者集區。 monitor.queue.pool.timeout=逾時 @@ -2483,7 +2725,7 @@ comment_issue=`在問題上留言 %s#%[2]s` comment_pull=`在合併請求上留言 %s#%[2]s` merge_pull_request=`合併了合併請求 %s#%[2]s` transfer_repo=將儲存庫 %s 轉移至 %s -push_tag=推送了標籤 %[2]s%[3]s +push_tag=推送了標籤 %[4]s%[3]s delete_tag=刪除了 %[3]s 的標籤 %[2]s delete_branch=刪除了 %[3]s 的 %[2]s 分支 compare_branch=比較 @@ -2495,6 +2737,8 @@ mirror_sync_delete=從鏡像同步並從 %[3]s 刪除了參 approve_pull_request=`核可了 %s#%[2]s` reject_pull_request=`建議變更 %s#%[2]s` publish_release=`發佈了 %[3]s「%[4]s」` +review_dismissed=`取消了 %[4]s%[3]s#%[2]s 的審核` +review_dismissed_reason=原因: create_branch=建立了分支 %[3]s%[4]s [tool] diff --git a/package-lock.json b/package-lock.json index e20eaf4a3..f12fb7f36 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,15043 @@ { + "name": "gitea", + "lockfileVersion": 2, "requires": true, - "lockfileVersion": 1, + "packages": { + "": { + "license": "MIT", + "dependencies": { + "@claviska/jquery-minicolors": "2.3.5", + "@primer/octicons": "15.0.1", + "add-asset-webpack-plugin": "2.0.1", + "codemirror": "5.62.2", + "css-loader": "6.2.0", + "dropzone": "5.9.2", + "easymde": "2.15.0", + "esbuild-loader": "2.15.0", + "escape-goat": "4.0.0", + "fast-glob": "3.2.7", + "font-awesome": "4.7.0", + "jquery": "3.6.0", + "jquery.are-you-sure": "1.9.0", + "less": "4.1.1", + "less-loader": "10.0.1", + "license-checker-webpack-plugin": "0.2.1", + "mermaid": "8.11.5", + "mini-css-extract-plugin": "2.2.0", + "monaco-editor": "0.27.0", + "monaco-editor-webpack-plugin": "4.1.2", + "pretty-ms": "7.0.1", + "sortablejs": "1.14.0", + "swagger-ui-dist": "4.0.0-beta.4", + "tributejs": "5.1.3", + "vue": "2.6.14", + "vue-bar-graph": "1.3.0", + "vue-calendar-heatmap": "0.8.4", + "vue-loader": "15.9.8", + "vue-template-compiler": "2.6.14", + "webpack": "5.50.0", + "webpack-cli": "4.8.0", + "workbox-routing": "6.2.4", + "workbox-strategies": "6.2.4", + "worker-loader": "3.0.8", + "wrap-ansi": "8.0.0" + }, + "devDependencies": { + "editorconfig-checker": "4.0.2", + "eslint": "7.32.0", + "eslint-plugin-html": "6.1.2", + "eslint-plugin-import": "2.24.0", + "eslint-plugin-unicorn": "35.0.0", + "eslint-plugin-vue": "7.16.0", + "jest": "27.0.6", + "jest-extended": "0.11.5", + "stylelint": "13.13.1", + "stylelint-config-standard": "22.0.0", + "svgo": "2.4.0", + "updates": "12.1.0" + }, + "engines": { + "node": ">= 12.17.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", + "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", + "dependencies": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.0", + "@babel/helper-module-transforms": "^7.15.0", + "@babel/helpers": "^7.14.8", + "@babel/parser": "^7.15.0", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.1.2", + "semver": "^6.3.0", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dependencies": { + "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/eslint-parser": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.15.0.tgz", + "integrity": "sha512-+gSPtjSBxOZz4Uh8Ggqu7HbfpB8cT1LwW0DnVVLZEJvzXauiD0Di3zszcBkRmfGGrLdYeHUwcflG7i3tr9kQlw==", + "dev": true, + "dependencies": { + "eslint-scope": "^5.1.1", + "eslint-visitor-keys": "^2.1.0", + "semver": "^6.3.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" + }, + "peerDependencies": { + "@babel/core": ">=7.11.0", + "eslint": ">=7.5.0" + } + }, + "node_modules/@babel/eslint-parser/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", + "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", + "dependencies": { + "@babel/types": "^7.15.0", + "jsesc": "^2.5.1", + "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-annotate-as-pure": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", + "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", + "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "peer": true, + "dependencies": { + "@babel/helper-explode-assignable-expression": "^7.14.5", + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", + "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", + "dependencies": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", + "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-member-expression-to-functions": "^7.15.0", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", + "@babel/helper-split-export-declaration": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-create-regexp-features-plugin": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", + "peer": true, + "dependencies": { + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "peerDependencies": { + "@babel/core": "^7.4.0-0" + } + }, + "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", + "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "peer": true, + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", + "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", + "dependencies": { + "@babel/helper-get-function-arity": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-get-function-arity": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", + "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", + "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-member-expression-to-functions": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", + "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", + "dependencies": { + "@babel/types": "^7.15.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", + "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", + "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", + "dependencies": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", + "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-optimise-call-expression": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", + "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-remap-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", + "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-wrap-function": "^7.14.5", + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-replace-supers": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", + "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", + "dependencies": { + "@babel/helper-member-expression-to-functions": "^7.15.0", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.14.8", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", + "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", + "dependencies": { + "@babel/types": "^7.14.8" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", + "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", + "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", + "dependencies": { + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-wrap-function": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", + "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "peer": true, + "dependencies": { + "@babel/helper-function-name": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", + "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", + "dependencies": { + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", + "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" + } + }, + "node_modules/@babel/plugin-proposal-async-generator-functions": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", + "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz", + "integrity": "sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg==", + "peer": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" + } + }, + "node_modules/@babel/plugin-proposal-dynamic-import": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-export-namespace-from": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", + "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-json-strings": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", + "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-numeric-separator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", + "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.14.7", + "@babel/helper-compilation-targets": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-catch-binding": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-methods": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "peer": true, + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q==", + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-proposal-unicode-property-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-dynamic-import": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", + "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-export-namespace-from": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", + "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-flow": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.14.5.tgz", + "integrity": "sha512-9WK5ZwKCdWHxVuU13XNT6X73FGmutAXeor5lGFq6qhOFtMFUF4jkbijuyUdZZlpYq6E2hZeZf/u3959X9wsv0Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", + "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-arrow-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-async-to-generator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "peer": true, + "dependencies": { + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoped-functions": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-block-scoping": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", + "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", + "peer": true, + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-classes/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/plugin-transform-computed-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-destructuring": { + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-dotall-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-duplicate-keys": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-exponentiation-operator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "peer": true, + "dependencies": { + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-flow-strip-types": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.14.5.tgz", + "integrity": "sha512-KhcolBKfXbvjwI3TV7r7TkYm8oNXHNBqGOy6JDVwtecFaRoKYsUUqJdS10q0YDKW1c6aZQgO+Ys3LfGkox8pXA==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-flow": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-for-of": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", + "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-function-name": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "peer": true, + "dependencies": { + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-member-expression-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-amd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "peer": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-commonjs": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", + "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", + "dependencies": { + "@babel/helper-module-transforms": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.14.8", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-systemjs": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", + "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "peer": true, + "dependencies": { + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.5", + "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-modules-umd": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "peer": true, + "dependencies": { + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/plugin-transform-new-target": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-object-super": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-parameters": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", + "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-property-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-regenerator": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "peer": true, + "dependencies": { + "regenerator-transform": "^0.14.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-reserved-words": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-shorthand-properties": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-spread": { + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", + "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-sticky-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-template-literals": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typeof-symbol": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-typescript": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.0.tgz", + "integrity": "sha512-WIIEazmngMEEHDaPTx0IZY48SaAmjVWe3TRSX7cmJXn0bEv9midFzAjxiruOWYIVf5iQ10vFx7ASDpgEO08L5w==", + "dependencies": { + "@babel/helper-create-class-features-plugin": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-typescript": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-escapes": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-unicode-regex": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "peer": true, + "dependencies": { + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.0.tgz", + "integrity": "sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q==", + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-async-generator-functions": "^7.14.9", + "@babel/plugin-proposal-class-properties": "^7.14.5", + "@babel/plugin-proposal-class-static-block": "^7.14.5", + "@babel/plugin-proposal-dynamic-import": "^7.14.5", + "@babel/plugin-proposal-export-namespace-from": "^7.14.5", + "@babel/plugin-proposal-json-strings": "^7.14.5", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", + "@babel/plugin-proposal-numeric-separator": "^7.14.5", + "@babel/plugin-proposal-object-rest-spread": "^7.14.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-private-methods": "^7.14.5", + "@babel/plugin-proposal-private-property-in-object": "^7.14.5", + "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", + "@babel/plugin-syntax-export-namespace-from": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.14.5", + "@babel/plugin-transform-async-to-generator": "^7.14.5", + "@babel/plugin-transform-block-scoped-functions": "^7.14.5", + "@babel/plugin-transform-block-scoping": "^7.14.5", + "@babel/plugin-transform-classes": "^7.14.9", + "@babel/plugin-transform-computed-properties": "^7.14.5", + "@babel/plugin-transform-destructuring": "^7.14.7", + "@babel/plugin-transform-dotall-regex": "^7.14.5", + "@babel/plugin-transform-duplicate-keys": "^7.14.5", + "@babel/plugin-transform-exponentiation-operator": "^7.14.5", + "@babel/plugin-transform-for-of": "^7.14.5", + "@babel/plugin-transform-function-name": "^7.14.5", + "@babel/plugin-transform-literals": "^7.14.5", + "@babel/plugin-transform-member-expression-literals": "^7.14.5", + "@babel/plugin-transform-modules-amd": "^7.14.5", + "@babel/plugin-transform-modules-commonjs": "^7.15.0", + "@babel/plugin-transform-modules-systemjs": "^7.14.5", + "@babel/plugin-transform-modules-umd": "^7.14.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", + "@babel/plugin-transform-new-target": "^7.14.5", + "@babel/plugin-transform-object-super": "^7.14.5", + "@babel/plugin-transform-parameters": "^7.14.5", + "@babel/plugin-transform-property-literals": "^7.14.5", + "@babel/plugin-transform-regenerator": "^7.14.5", + "@babel/plugin-transform-reserved-words": "^7.14.5", + "@babel/plugin-transform-shorthand-properties": "^7.14.5", + "@babel/plugin-transform-spread": "^7.14.6", + "@babel/plugin-transform-sticky-regex": "^7.14.5", + "@babel/plugin-transform-template-literals": "^7.14.5", + "@babel/plugin-transform-typeof-symbol": "^7.14.5", + "@babel/plugin-transform-unicode-escapes": "^7.14.5", + "@babel/plugin-transform-unicode-regex": "^7.14.5", + "@babel/preset-modules": "^0.1.4", + "@babel/types": "^7.15.0", + "babel-plugin-polyfill-corejs2": "^0.2.2", + "babel-plugin-polyfill-corejs3": "^0.2.2", + "babel-plugin-polyfill-regenerator": "^0.2.2", + "core-js-compat": "^3.16.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-flow": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.14.5.tgz", + "integrity": "sha512-pP5QEb4qRUSVGzzKx9xqRuHUrM/jEzMqdrZpdMA+oUCRgd5zM1qGr5y5+ZgAL/1tVv1H0dyk5t4SKJntqyiVtg==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-flow-strip-types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-modules": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", + "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", + "@babel/plugin-transform-dotall-regex": "^7.4.4", + "@babel/types": "^7.4.4", + "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/preset-typescript": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.15.0.tgz", + "integrity": "sha512-lt0Y/8V3y06Wq/8H/u0WakrqciZ7Fz7mwPDHWUJAXlABL5hiUG42BNlRXiELNjeWjO5rWmnNKlx+yzJvxezHow==", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-typescript": "^7.15.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/register": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.15.3.tgz", + "integrity": "sha512-mj4IY1ZJkorClxKTImccn4T81+UKTo4Ux0+OFSV9hME1ooqS9UV+pJ6BjD0qXPK4T3XW/KNa79XByjeEMZz+fw==", + "dependencies": { + "clone-deep": "^4.0.1", + "find-cache-dir": "^2.0.0", + "make-dir": "^2.1.0", + "pirates": "^4.0.0", + "source-map-support": "^0.5.16" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/register/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/register/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/@babel/register/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/@babel/runtime": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", + "dependencies": { + "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", + "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", + "dependencies": { + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.14.5", + "@babel/types": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/template/node_modules/@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dependencies": { + "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", + "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", + "dependencies": { + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.0", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/parser": "^7.15.0", + "@babel/types": "^7.15.0", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dependencies": { + "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", + "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.9", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@braintree/sanitize-url": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz", + "integrity": "sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg==" + }, + "node_modules/@claviska/jquery-minicolors": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@claviska/jquery-minicolors/-/jquery-minicolors-2.3.5.tgz", + "integrity": "sha512-LpiN8hyqRPYB2tEzFD4lI54GxKHQXhzrJMnKnsumElYxjkjbdAPmiIm+1k/Mkfn92HepL7t9uaK5iQSFP/19aw==", + "peerDependencies": { + "jquery": ">= 1.7.x" + } + }, + "node_modules/@discoveryjs/json-ext": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz", + "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^13.9.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jest/console": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.0.6.tgz", + "integrity": "sha512-fMlIBocSHPZ3JxgWiDNW/KPj6s+YRd0hicb33IrmelCcjXo/pXPwvuiKFmZz+XuqI/1u7nbUK10zSsWL/1aegg==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^27.0.6", + "jest-util": "^27.0.6", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/core": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.0.6.tgz", + "integrity": "sha512-SsYBm3yhqOn5ZLJCtccaBcvD/ccTLCeuDv8U41WJH/V1MW5eKUkeMHT9U+Pw/v1m1AIWlnIW/eM2XzQr0rEmow==", + "dev": true, + "dependencies": { + "@jest/console": "^27.0.6", + "@jest/reporters": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^27.0.6", + "jest-config": "^27.0.6", + "jest-haste-map": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-resolve-dependencies": "^27.0.6", + "jest-runner": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "jest-watcher": "^27.0.6", + "micromatch": "^4.0.4", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/environment": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.0.6.tgz", + "integrity": "sha512-4XywtdhwZwCpPJ/qfAkqExRsERW+UaoSRStSHCCiQTUpoYdLukj+YJbQSFrZjhlUDRZeNiU9SFH0u7iNimdiIg==", + "dev": true, + "dependencies": { + "@jest/fake-timers": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "jest-mock": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/fake-timers": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.0.6.tgz", + "integrity": "sha512-sqd+xTWtZ94l3yWDKnRTdvTeZ+A/V7SSKrxsrOKSqdyddb9CeNRF8fbhAU0D7ZJBpTTW2nbp6MftmKJDZfW2LQ==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "@sinonjs/fake-timers": "^7.0.2", + "@types/node": "*", + "jest-message-util": "^27.0.6", + "jest-mock": "^27.0.6", + "jest-util": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.0.6.tgz", + "integrity": "sha512-DdTGCP606rh9bjkdQ7VvChV18iS7q0IMJVP1piwTWyWskol4iqcVwthZmoJEf7obE1nc34OpIyoVGPeqLC+ryw==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.0.6", + "@jest/types": "^27.0.6", + "expect": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/reporters": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.0.6.tgz", + "integrity": "sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-util": "^27.0.6", + "jest-worker": "^27.0.6", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^8.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@jest/source-map": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.0.6.tgz", + "integrity": "sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.4", + "source-map": "^0.6.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/source-map/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@jest/test-result": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.0.6.tgz", + "integrity": "sha512-ja/pBOMTufjX4JLEauLxE3LQBPaI2YjGFtXexRAjt1I/MbfNlMx0sytSX3tn5hSLzQsR3Qy2rd0hc1BWojtj9w==", + "dev": true, + "dependencies": { + "@jest/console": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz", + "integrity": "sha512-bISzNIApazYOlTHDum9PwW22NOyDa6VI31n6JucpjTVM0jD6JDgqEZ9+yn575nDdPF0+4csYDxNNW13NvFQGZA==", + "dev": true, + "dependencies": { + "@jest/test-result": "^27.0.6", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^27.0.6", + "jest-runtime": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.0.6.tgz", + "integrity": "sha512-rj5Dw+mtIcntAUnMlW/Vju5mr73u8yg+irnHwzgtgoeI6cCPOvUwQ0D1uQtc/APmWgvRweEb1g05pkUpxH3iCA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/types": "^27.0.6", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-util": "^27.0.6", + "micromatch": "^4.0.4", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@jest/transform/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@jest/types": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.0.6.tgz", + "integrity": "sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@oclif/command": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.0.tgz", + "integrity": "sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==", + "dependencies": { + "@oclif/config": "^1.15.1", + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.3", + "@oclif/plugin-help": "^3", + "debug": "^4.1.1", + "semver": "^7.3.2" + }, + "engines": { + "node": ">=8.0.0" + }, + "peerDependencies": { + "@oclif/config": "^1" + } + }, + "node_modules/@oclif/config": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.17.0.tgz", + "integrity": "sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA==", + "dependencies": { + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/config/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@oclif/errors": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.3.5.tgz", + "integrity": "sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ==", + "dependencies": { + "clean-stack": "^3.0.0", + "fs-extra": "^8.1", + "indent-string": "^4.0.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/errors/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@oclif/linewrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz", + "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" + }, + "node_modules/@oclif/parser": { + "version": "3.8.5", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.5.tgz", + "integrity": "sha512-yojzeEfmSxjjkAvMRj0KzspXlMjCfBzNRPkWw8ZwOSoNWoJn+OCS/m/S+yfV6BvAM4u2lTzX9Y5rCbrFIgkJLg==", + "dependencies": { + "@oclif/errors": "^1.2.2", + "@oclif/linewrap": "^1.0.0", + "chalk": "^2.4.2", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/parser/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/parser/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/parser/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@oclif/parser/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/@oclif/parser/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@oclif/parser/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/parser/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/plugin-help": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-3.2.3.tgz", + "integrity": "sha512-l2Pd0lbOMq4u/7xsl9hqISFqyR9gWEz/8+05xmrXFr67jXyS6EUCQB+mFBa0wepltrmJu0sAFg9AvA2mLaMMqQ==", + "dependencies": { + "@oclif/command": "^1.5.20", + "@oclif/config": "^1.15.1", + "@oclif/errors": "^1.2.2", + "chalk": "^4.1.0", + "indent-string": "^4.0.0", + "lodash.template": "^4.4.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^4.0.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oclif/plugin-help/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/plugin-help/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/plugin-help/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@oclif/plugin-help/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/@oclif/plugin-help/node_modules/is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/plugin-help/node_modules/wrap-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-4.0.0.tgz", + "integrity": "sha512-uMTsj9rDb0/7kk1PbcbCcwvHUxp60fGDB/NNXpVa0Q+ic/e7y5+BwTxKfQ33VYgDppSwi/FBzpetYzo8s6tfbg==", + "dependencies": { + "ansi-styles": "^3.2.0", + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@oclif/plugin-help/node_modules/wrap-ansi/node_modules/string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dependencies": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@oclif/plugin-help/node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dependencies": { + "ansi-regex": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@percy/config": { + "version": "1.0.0-beta.65", + "resolved": "https://registry.npmjs.org/@percy/config/-/config-1.0.0-beta.65.tgz", + "integrity": "sha512-q6mkrBq+nmDtIDj793lNIodEYmc5wVE7ZwsQ2kNRQIAq4aiIIrD8L5CfhEOSYQ5OzhFq+qUjcZK5GptmheF0sw==", + "dependencies": { + "@percy/logger": "1.0.0-beta.65", + "ajv": "^8.6.2", + "cosmiconfig": "^7.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@percy/config/node_modules/ajv": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/@percy/config/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + }, + "node_modules/@percy/logger": { + "version": "1.0.0-beta.65", + "resolved": "https://registry.npmjs.org/@percy/logger/-/logger-1.0.0-beta.65.tgz", + "integrity": "sha512-BJV0pjNlvcj4Y3nuMUGdb5RhjMduK40fRJJ9Lh/2qNk3pmnkGb9rH+GY+/0WY7quupNKxQjjyXcIP7I46/azNg==", + "engines": { + "node": ">=12" + } + }, + "node_modules/@percy/migrate": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@percy/migrate/-/migrate-0.10.0.tgz", + "integrity": "sha512-3vOmOPmEeMlIZyCEDClZ2VER+4LH/Zp/YhvLkZeKH9RKxbktROF4Dnfs1u3m4YQ1gglerqK6VXFJfOjLJGyVuw==", + "dependencies": { + "@oclif/command": "^1.8.0", + "@oclif/config": "^1.17.0", + "@oclif/plugin-help": "^3.2.0", + "@percy/config": "^1.0.0-beta.36", + "@percy/logger": "^1.0.0-beta.36", + "cross-spawn": "^7.0.3", + "inquirer": "^8.0.0", + "inquirer-glob-prompt": "^0.1.0", + "jscodeshift": "^0.11.0", + "semver": "^7.3.4" + }, + "bin": { + "percy-migrate": "bin/run" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@primer/octicons": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-15.0.1.tgz", + "integrity": "sha512-mp1OkOq0tAknXPLGAUPxiMac3HCj4LPPbAfmj847AWb2Tej33YFjUfGA1S2wXmiyP0MARoIdWtrsXt7UCBdVeQ==", + "dependencies": { + "object-assign": "^4.1.1" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@stylelint/postcss-css-in-js": { + "version": "0.37.2", + "resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz", + "integrity": "sha512-nEhsFoJurt8oUmieT8qy4nk81WRHmJynmVwn/Vts08PL9fhgIsMhk1GId5yAN643OzqEEb5S/6At2TZW7pqPDA==", + "dev": true, + "dependencies": { + "@babel/core": ">=7.9.0" + }, + "peerDependencies": { + "postcss": ">=7.0.0", + "postcss-syntax": ">=0.36.2" + } + }, + "node_modules/@stylelint/postcss-markdown": { + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/@stylelint/postcss-markdown/-/postcss-markdown-0.36.2.tgz", + "integrity": "sha512-2kGbqUVJUGE8dM+bMzXG/PYUWKkjLIkRLWNh39OaADkiabDRdw8ATFCgbMz5xdIcvwspPAluSL7uY+ZiTWdWmQ==", + "dev": true, + "dependencies": { + "remark": "^13.0.0", + "unist-util-find-all-after": "^3.0.2" + }, + "peerDependencies": { + "postcss": ">=7.0.0", + "postcss-syntax": ">=0.36.2" + } + }, + "node_modules/@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/@trysound/sax": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.1.1.tgz", + "integrity": "sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==", + "dev": true, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.1.15", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.15.tgz", + "integrity": "sha512-bxlMKPDbY8x5h6HBwVzEOk2C8fb6SLfYQ5Jw3uBYuYF1lfWk/kbLd81la82vrIkBb0l+JdmrZaDikPrNxpS/Ew==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz", + "integrity": "sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", + "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.3.0" + } + }, + "node_modules/@types/codemirror": { + "version": "0.0.109", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.109.tgz", + "integrity": "sha512-cSdiHeeLjvGn649lRTNeYrVCDOgDrtP+bDDSFDd1TF+i0jKGPDRozno2NOJ9lTniso+taiv4kiVS8dgM8Jm5lg==", + "dependencies": { + "@types/tern": "*" + } + }, + "node_modules/@types/eslint": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", + "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "dependencies": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" + }, + "node_modules/@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", + "dev": true + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" + }, + "node_modules/@types/marked": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-2.0.4.tgz", + "integrity": "sha512-L9VRSe0Id8xbPL99mUo/4aKgD7ZoRwFZqUQScNKHi2pFjF9ZYSMNShUHD6VlMT6J/prQq0T1mxuU25m3R7dFzg==" + }, + "node_modules/@types/mdast": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.7.tgz", + "integrity": "sha512-YwR7OK8aPmaBvMMUi+pZXBNoW2unbVbfok4YRqGMJBe1dpDlzpRkJrYEYmvjxgs5JhuQmKfDexrN98u941Zasg==", + "dev": true, + "dependencies": { + "@types/unist": "*" + } + }, + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", + "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, + "node_modules/@types/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, + "node_modules/@types/prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog==", + "dev": true + }, + "node_modules/@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "node_modules/@types/tern": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz", + "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==", + "dependencies": { + "@types/estree": "*" + } + }, + "node_modules/@types/unist": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, + "node_modules/@types/yargs": { + "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", + "dev": true + }, + "node_modules/@vue/component-compiler-utils": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.2.tgz", + "integrity": "sha512-rAYMLmgMuqJFWAOb3Awjqqv5X3Q3hVr4jH/kgrFJpiU0j3a90tnNBplqbj+snzrgZhC9W128z+dtgMifOiMfJg==", + "dependencies": { + "consolidate": "^0.15.1", + "hash-sum": "^1.0.2", + "lru-cache": "^4.1.2", + "merge-source-map": "^1.1.0", + "postcss": "^7.0.36", + "postcss-selector-parser": "^6.0.2", + "source-map": "~0.6.1", + "vue-template-es2015-compiler": "^1.9.0" + }, + "optionalDependencies": { + "prettier": "^1.18.2" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "node_modules/@vue/component-compiler-utils/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "engines": { + "node": ">=4" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/lru-cache": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", + "dependencies": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/@vue/component-compiler-utils/node_modules/yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + }, + "node_modules/@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dependencies": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "node_modules/@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" + }, + "node_modules/@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" + }, + "node_modules/@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" + }, + "node_modules/@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dependencies": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" + }, + "node_modules/@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "node_modules/@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dependencies": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "node_modules/@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dependencies": { + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" + }, + "node_modules/@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "node_modules/@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dependencies": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "node_modules/@webpack-cli/configtest": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz", + "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==", + "peerDependencies": { + "webpack": "4.x.x || 5.x.x", + "webpack-cli": "4.x.x" + } + }, + "node_modules/@webpack-cli/info": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz", + "integrity": "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w==", + "dependencies": { + "envinfo": "^7.7.3" + }, + "peerDependencies": { + "webpack-cli": "4.x.x" + } + }, + "node_modules/@webpack-cli/serve": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.2.tgz", + "integrity": "sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==", + "peerDependencies": { + "webpack-cli": "4.x.x" + }, + "peerDependenciesMeta": { + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==" + }, + "node_modules/@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" + }, + "node_modules/abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "dependencies": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/add-asset-webpack-plugin": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/add-asset-webpack-plugin/-/add-asset-webpack-plugin-2.0.1.tgz", + "integrity": "sha512-Hx9EKnirCUfdh684y1yhx8QOFolpkIG2VRHHgNm8wFy1Cf7P3RGwS678hoN7Y1XvZRPpVXWa+6QnfL/2i0CMCA==", + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + }, + "peerDependencies": { + "webpack": ">=5" + } + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "peerDependencies": { + "ajv": "^6.9.1" + } + }, + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-includes": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", + "is-string": "^1.0.5" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.0-next.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ast-types": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.14.2.tgz", + "integrity": "sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==", + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/ast-types/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "node_modules/atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "bin": { + "atob": "bin/atob.js" + }, + "engines": { + "node": ">= 4.5.0" + } + }, + "node_modules/autoprefixer": { + "version": "9.8.6", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", + "integrity": "sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg==", + "dev": true, + "dependencies": { + "browserslist": "^4.12.0", + "caniuse-lite": "^1.0.30001109", + "colorette": "^1.2.1", + "normalize-range": "^0.1.2", + "num2fraction": "^1.2.2", + "postcss": "^7.0.32", + "postcss-value-parser": "^4.1.0" + }, + "bin": { + "autoprefixer": "bin/autoprefixer" + }, + "funding": { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/autoprefixer" + } + }, + "node_modules/autoprefixer/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/autoprefixer/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/autoprefixer/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/autoprefixer/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/autoprefixer/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/autoprefixer/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/autoprefixer/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/autoprefixer/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/autoprefixer/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/autoprefixer/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/babel-core": { + "version": "7.0.0-bridge.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz", + "integrity": "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==", + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-jest": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.0.6.tgz", + "integrity": "sha512-iTJyYLNc4wRofASmofpOc5NK9QunwMk+TLFgGXsTFS8uEqmd8wdI7sga0FPe2oVH3b5Agt/EAK1QjPEuKL8VfA==", + "dev": true, + "dependencies": { + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^27.0.6", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.8.0" + } + }, + "node_modules/babel-plugin-dynamic-import-node": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", + "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", + "dependencies": { + "object.assign": "^4.1.0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz", + "integrity": "sha512-CewFeM9Vv2gM7Yr9n5eyyLVPRSiBnk6lKZRjgwYnGKSl9M14TMn2vkN02wTF04OGuSDLEzlWiMzvjXuW9mB6Gw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", + "peer": true, + "dependencies": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", + "semver": "^6.1.1" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", + "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", + "peer": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.14.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-plugin-polyfill-regenerator": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", + "peer": true, + "dependencies": { + "@babel/helper-define-polyfill-provider": "^0.2.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/babel-preset-jest": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz", + "integrity": "sha512-WObA0/Biw2LrVVwZkF/2GqbOdzhKD6Fkdwhoy9ASIrOWr/zodcSpQh72JOkEn6NWyjmnPDjNSqaGN4KnpKzhXw==", + "dev": true, + "dependencies": { + "babel-plugin-jest-hoist": "^27.0.6", + "babel-preset-current-node-syntax": "^1.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/bail": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", + "integrity": "sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dependencies": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "engines": { + "node": "*" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" + }, + "node_modules/boolbase": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, + "node_modules/browserslist": { + "version": "4.16.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", + "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", + "dependencies": { + "caniuse-lite": "^1.0.30001248", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.793", + "escalade": "^3.1.1", + "node-releases": "^1.1.73" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" + }, + "node_modules/builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dependencies": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001251", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", + "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/character-entities": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", + "integrity": "sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz", + "integrity": "sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-reference-invalid": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz", + "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "engines": { + "node": ">=6.0" + } + }, + "node_modules/ci-info": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", + "integrity": "sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==", + "dev": true + }, + "node_modules/cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "node_modules/class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dependencies": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/class-utils/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/class-utils/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha1-jffHquUf02h06PjQW5GAvBGj/tc=", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/clean-stack": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", + "dependencies": { + "escape-string-regexp": "4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", + "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", + "engines": { + "node": ">=0.8" + } + }, + "node_modules/clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dependencies": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/clone-regexp": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz", + "integrity": "sha512-beMpP7BOtTipFuW8hrJvREQ2DrRu3BE7by0ZpibtfBA+qfHYvMGTc2Yb1JMYPKg/JUw0CHYvpg796aNTSW9z7Q==", + "dev": true, + "dependencies": { + "is-regexp": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true, + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/codemirror": { + "version": "5.62.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.2.tgz", + "integrity": "sha512-tVFMUa4J3Q8JUd1KL9yQzQB0/BJt7ZYZujZmTPgo/54Lpuq3ez4C8x/ATUY/wv7b7X3AUq8o3Xd+2C5ZrCGWHw==" + }, + "node_modules/codemirror-spell-checker": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/codemirror-spell-checker/-/codemirror-spell-checker-1.1.2.tgz", + "integrity": "sha1-HGYPkIlIPMtRE7m6nKGcP0mTNx4=", + "dependencies": { + "typo-js": "*" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "node_modules/collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dependencies": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "node_modules/colorette": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" + }, + "node_modules/colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==", + "engines": { + "node": ">=0.1.90" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" + }, + "node_modules/component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "node_modules/consolidate": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/consolidate/-/consolidate-0.15.1.tgz", + "integrity": "sha512-DW46nrsMJgy9kqAbPt5rKaCr7uFtpo4mSUvLHIUbJEjm0vo+aY5QLwBUq3FK4tRnJr/X0Psc0C4jf/h+HtXSMw==", + "dependencies": { + "bluebird": "^3.1.1" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/copy-anything": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz", + "integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==", + "dependencies": { + "is-what": "^3.12.0" + } + }, + "node_modules/copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/core-js-compat": { + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.1.tgz", + "integrity": "sha512-NHXQXvRbd4nxp9TEmooTJLUf94ySUG6+DSsscBpTftN1lQLQ4LjnWvc7AoIo4UjDsFF3hB8Uh5LLCRRdaiT5MQ==", + "peer": true, + "dependencies": { + "browserslist": "^4.16.7", + "semver": "7.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "peer": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/cosmiconfig": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", + "dependencies": { + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/css-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz", + "integrity": "sha512-/rvHfYRjIpymZblf49w8jYcRo2y9gj6rV8UroHGmBxKrIyGLokpycyKzp9OkitvqT29ZSpzJ0Ic7SpnJX3sC8g==", + "dependencies": { + "icss-utils": "^5.1.0", + "postcss": "^8.2.15", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.1.0", + "semver": "^7.3.5" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/css-select": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", + "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0", + "css-what": "^5.0.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0", + "nth-check": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/css-tree": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, + "dependencies": { + "mdn-data": "2.0.14", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/css-tree/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/css-what": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "dev": true, + "engines": { + "node": ">= 6" + }, + "funding": { + "url": "https://github.com/sponsors/fb55" + } + }, + "node_modules/cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "bin": { + "cssesc": "bin/cssesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/csso": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", + "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, + "dependencies": { + "css-tree": "^1.1.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true + }, + "node_modules/cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "dependencies": { + "cssom": "~0.3.6" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cssstyle/node_modules/cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true + }, + "node_modules/d3": { + "version": "5.16.0", + "resolved": "https://registry.npmjs.org/d3/-/d3-5.16.0.tgz", + "integrity": "sha512-4PL5hHaHwX4m7Zr1UapXW23apo6pexCgdetdJ5kTmADpG/7T9Gkxw0M0tf/pjoB63ezCCm0u5UaFYy2aMt0Mcw==", + "dependencies": { + "d3-array": "1", + "d3-axis": "1", + "d3-brush": "1", + "d3-chord": "1", + "d3-collection": "1", + "d3-color": "1", + "d3-contour": "1", + "d3-dispatch": "1", + "d3-drag": "1", + "d3-dsv": "1", + "d3-ease": "1", + "d3-fetch": "1", + "d3-force": "1", + "d3-format": "1", + "d3-geo": "1", + "d3-hierarchy": "1", + "d3-interpolate": "1", + "d3-path": "1", + "d3-polygon": "1", + "d3-quadtree": "1", + "d3-random": "1", + "d3-scale": "2", + "d3-scale-chromatic": "1", + "d3-selection": "1", + "d3-shape": "1", + "d3-time": "1", + "d3-time-format": "2", + "d3-timer": "1", + "d3-transition": "1", + "d3-voronoi": "1", + "d3-zoom": "1" + } + }, + "node_modules/d3-array": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-1.2.4.tgz", + "integrity": "sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==" + }, + "node_modules/d3-axis": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-1.0.12.tgz", + "integrity": "sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ==" + }, + "node_modules/d3-brush": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-1.1.6.tgz", + "integrity": "sha512-7RW+w7HfMCPyZLifTz/UnJmI5kdkXtpCbombUSs8xniAyo0vIbrDzDwUJB6eJOgl9u5DQOt2TQlYumxzD1SvYA==", + "dependencies": { + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" + } + }, + "node_modules/d3-chord": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-1.0.6.tgz", + "integrity": "sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA==", + "dependencies": { + "d3-array": "1", + "d3-path": "1" + } + }, + "node_modules/d3-collection": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-collection/-/d3-collection-1.0.7.tgz", + "integrity": "sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==" + }, + "node_modules/d3-color": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-1.4.1.tgz", + "integrity": "sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==" + }, + "node_modules/d3-contour": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-1.3.2.tgz", + "integrity": "sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg==", + "dependencies": { + "d3-array": "^1.1.1" + } + }, + "node_modules/d3-dispatch": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.6.tgz", + "integrity": "sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA==" + }, + "node_modules/d3-drag": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.5.tgz", + "integrity": "sha512-rD1ohlkKQwMZYkQlYVCrSFxsWPzI97+W+PaEIBNTMxRuxz9RF0Hi5nJWHGVJ3Om9d2fRTe1yOBINJyy/ahV95w==", + "dependencies": { + "d3-dispatch": "1", + "d3-selection": "1" + } + }, + "node_modules/d3-dsv": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.2.0.tgz", + "integrity": "sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g==", + "dependencies": { + "commander": "2", + "iconv-lite": "0.4", + "rw": "1" + }, + "bin": { + "csv2json": "bin/dsv2json", + "csv2tsv": "bin/dsv2dsv", + "dsv2dsv": "bin/dsv2dsv", + "dsv2json": "bin/dsv2json", + "json2csv": "bin/json2dsv", + "json2dsv": "bin/json2dsv", + "json2tsv": "bin/json2dsv", + "tsv2csv": "bin/dsv2dsv", + "tsv2json": "bin/dsv2json" + } + }, + "node_modules/d3-ease": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.7.tgz", + "integrity": "sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ==" + }, + "node_modules/d3-fetch": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-1.2.0.tgz", + "integrity": "sha512-yC78NBVcd2zFAyR/HnUiBS7Lf6inSCoWcSxFfw8FYL7ydiqe80SazNwoffcqOfs95XaLo7yebsmQqDKSsXUtvA==", + "dependencies": { + "d3-dsv": "1" + } + }, + "node_modules/d3-force": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.2.1.tgz", + "integrity": "sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg==", + "dependencies": { + "d3-collection": "1", + "d3-dispatch": "1", + "d3-quadtree": "1", + "d3-timer": "1" + } + }, + "node_modules/d3-format": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-1.4.5.tgz", + "integrity": "sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ==" + }, + "node_modules/d3-geo": { + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.12.1.tgz", + "integrity": "sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg==", + "dependencies": { + "d3-array": "1" + } + }, + "node_modules/d3-hierarchy": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-1.1.9.tgz", + "integrity": "sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==" + }, + "node_modules/d3-interpolate": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.4.0.tgz", + "integrity": "sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==", + "dependencies": { + "d3-color": "1" + } + }, + "node_modules/d3-path": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz", + "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==" + }, + "node_modules/d3-polygon": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-1.0.6.tgz", + "integrity": "sha512-k+RF7WvI08PC8reEoXa/w2nSg5AUMTi+peBD9cmFc+0ixHfbs4QmxxkarVal1IkVkgxVuk9JSHhJURHiyHKAuQ==" + }, + "node_modules/d3-quadtree": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-1.0.7.tgz", + "integrity": "sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA==" + }, + "node_modules/d3-random": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-1.1.2.tgz", + "integrity": "sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ==" + }, + "node_modules/d3-scale": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.2.2.tgz", + "integrity": "sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==", + "dependencies": { + "d3-array": "^1.2.0", + "d3-collection": "1", + "d3-format": "1", + "d3-interpolate": "1", + "d3-time": "1", + "d3-time-format": "2" + } + }, + "node_modules/d3-scale-chromatic": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-1.5.0.tgz", + "integrity": "sha512-ACcL46DYImpRFMBcpk9HhtIyC7bTBR4fNOPxwVSl0LfulDAwyiHyPOTqcDG1+t5d4P9W7t/2NAuWu59aKko/cg==", + "dependencies": { + "d3-color": "1", + "d3-interpolate": "1" + } + }, + "node_modules/d3-selection": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.4.2.tgz", + "integrity": "sha512-SJ0BqYihzOjDnnlfyeHT0e30k0K1+5sR3d5fNueCNeuhZTnGw4M4o8mqJchSwgKMXCNFo+e2VTChiSJ0vYtXkg==" + }, + "node_modules/d3-shape": { + "version": "1.3.7", + "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz", + "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==", + "dependencies": { + "d3-path": "1" + } + }, + "node_modules/d3-time": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-1.1.0.tgz", + "integrity": "sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA==" + }, + "node_modules/d3-time-format": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.3.0.tgz", + "integrity": "sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==", + "dependencies": { + "d3-time": "1" + } + }, + "node_modules/d3-timer": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.10.tgz", + "integrity": "sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==" + }, + "node_modules/d3-transition": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.3.2.tgz", + "integrity": "sha512-sc0gRU4PFqZ47lPVHloMn9tlPcv8jxgOQg+0zjhfZXMQuvppjG6YuwdMBE0TuqCZjeJkLecku/l9R0JPcRhaDA==", + "dependencies": { + "d3-color": "1", + "d3-dispatch": "1", + "d3-ease": "1", + "d3-interpolate": "1", + "d3-selection": "^1.1.0", + "d3-timer": "1" + } + }, + "node_modules/d3-voronoi": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/d3-voronoi/-/d3-voronoi-1.1.4.tgz", + "integrity": "sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg==" + }, + "node_modules/d3-zoom": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-1.8.3.tgz", + "integrity": "sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ==", + "dependencies": { + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" + } + }, + "node_modules/dagre": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/dagre/-/dagre-0.8.5.tgz", + "integrity": "sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw==", + "dependencies": { + "graphlib": "^2.1.8", + "lodash": "^4.17.15" + } + }, + "node_modules/dagre-d3": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/dagre-d3/-/dagre-d3-0.6.4.tgz", + "integrity": "sha512-e/6jXeCP7/ptlAM48clmX4xTZc5Ek6T6kagS7Oz2HrYSdqcLZFLqpAfh7ldbZRFfxCZVyh61NEPR08UQRVxJzQ==", + "dependencies": { + "d3": "^5.14", + "dagre": "^0.8.5", + "graphlib": "^2.1.8", + "lodash": "^4.17.15" + } + }, + "node_modules/data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "dev": true, + "dependencies": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/de-indent": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", + "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=" + }, + "node_modules/debug": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk=", + "dev": true, + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decimal.js": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", + "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "dev": true + }, + "node_modules/decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "dependencies": { + "clone": "^1.0.2" + } + }, + "node_modules/define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dependencies": { + "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dependencies": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/diff-sequences": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.0.6.tgz", + "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", + "dev": true, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/dom-serializer": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", + "entities": "^2.0.0" + }, + "funding": { + "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" + } + }, + "node_modules/domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", + "dev": true, + "dependencies": { + "webidl-conversions": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/domexception/node_modules/webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, + "dependencies": { + "domelementtype": "^2.2.0" + }, + "engines": { + "node": ">= 4" + }, + "funding": { + "url": "https://github.com/fb55/domhandler?sponsor=1" + } + }, + "node_modules/dompurify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.0.tgz", + "integrity": "sha512-VV5C6Kr53YVHGOBKO/F86OYX6/iLTw2yVSI721gKetxpHCK/V5TaLEf9ODjRgl1KLSWRMY6cUhAbv/c+IUnwQw==" + }, + "node_modules/domutils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", + "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "dev": true, + "dependencies": { + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" + }, + "funding": { + "url": "https://github.com/fb55/domutils?sponsor=1" + } + }, + "node_modules/dropzone": { + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/dropzone/-/dropzone-5.9.2.tgz", + "integrity": "sha512-5t2z51DzIsWDbTpwcJIvUlwxBbvcwdCApz0yb9ecKJwG155Xm92KMEZmHW1B0MzoXOKvFwdd0nPu5cpeVcvPHQ==" + }, + "node_modules/easymde": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/easymde/-/easymde-2.15.0.tgz", + "integrity": "sha512-9jMRIVvKt1d0UjRN45yotUYECAM4xvw0TTAQw8sYDONP++keWJVnd8Xrn+V+vQEN/v9/X0SWEoo1rFSgCooGpw==", + "dependencies": { + "@types/codemirror": "0.0.109", + "@types/marked": "^2.0.2", + "codemirror": "^5.61.0", + "codemirror-spell-checker": "1.1.2", + "marked": "^2.0.3" + } + }, + "node_modules/editorconfig-checker": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/editorconfig-checker/-/editorconfig-checker-4.0.2.tgz", + "integrity": "sha512-tUI7ABIzMB1kfwTUQmX+gaZGCMNuUgGuRHJ+Xu4Tk9T8lV8Vy5w/EaQsSZ7NKrOgLxbekptw6MUgrzHTvhceLw==", + "dev": true, + "dependencies": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.0", + "tar": "^6.0.0" + }, + "bin": { + "ec": "dist/index.js", + "editorconfig-checker": "dist/index.js" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.3.807", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.807.tgz", + "integrity": "sha512-p8uxxg2a23zRsvQ2uwA/OOI+O4BQxzaR7YKMIGGGQCpYmkFX2CVF5f0/hxLMV7yCr7nnJViCwHLhPfs52rIYCA==" + }, + "node_modules/emittery": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", + "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, + "node_modules/emojis-list": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", + "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "bin": { + "envinfo": "dist/cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/errno": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", + "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "optional": true, + "dependencies": { + "prr": "~1.0.1" + }, + "bin": { + "errno": "cli.js" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-abstract": { + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-module-lexer": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", + "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==" + }, + "node_modules/es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/esbuild": { + "version": "0.12.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.20.tgz", + "integrity": "sha512-u7+0qTo9Z64MD9PhooEngCmzyEYJ6ovFhPp8PLNh3UasR5Ihjv6HWVXqm8uHmasdQlpsAf0IsY4U0YVUfCpt4Q==", + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + } + }, + "node_modules/esbuild-loader": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/esbuild-loader/-/esbuild-loader-2.15.0.tgz", + "integrity": "sha512-wgysEJkQGrb4goa8cArl5Pivd1xGbfpTQIQOQhfbiprJxNltwXuN34wVlmj0/OGhIFtESSOry5NwQ6RxjAjByw==", + "dependencies": { + "esbuild": "^0.12.19", + "joycon": "^3.0.1", + "json5": "^2.2.0", + "loader-utils": "^2.0.0", + "tapable": "^2.2.0", + "type-fest": "^1.4.0", + "webpack-sources": "^2.2.0" + }, + "funding": { + "url": "https://github.com/privatenumber/esbuild-loader?sponsor=1" + }, + "peerDependencies": { + "webpack": "^4.40.0 || ^5.0.0" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-goat": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", + "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/escodegen/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/escodegen/node_modules/levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "dependencies": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/escodegen/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/escodegen/node_modules/type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "dependencies": { + "prelude-ls": "~1.1.2" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.9", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "resolve": "^1.20.0" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", + "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "pkg-dir": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-html": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.1.2.tgz", + "integrity": "sha512-bhBIRyZFqI4EoF12lGDHAmgfff8eLXx6R52/K3ESQhsxzCzIE6hdebS7Py651f7U3RBotqroUnC3L29bR7qJWQ==", + "dev": true, + "dependencies": { + "htmlparser2": "^6.0.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz", + "integrity": "sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", + "debug": "^2.6.9", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.5", + "eslint-module-utils": "^2.6.2", + "find-up": "^2.0.0", + "has": "^1.0.3", + "is-core-module": "^2.4.0", + "minimatch": "^3.0.4", + "object.values": "^1.1.3", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", + "tsconfig-paths": "^3.9.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node_modules/eslint-plugin-unicorn": { + "version": "35.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-35.0.0.tgz", + "integrity": "sha512-FHsaO68tDPQILfs/mGF8eSISJp8RswR4FpUuBDnueK2wyEHC6zmsc9WxjYyldXoIsBuVmru6jQyFCbCWPoW/KQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.14.9", + "ci-info": "^3.2.0", + "clean-regexp": "^1.0.0", + "eslint-template-visitor": "^2.3.2", + "eslint-utils": "^3.0.0", + "is-builtin-module": "^3.1.0", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.23", + "safe-regex": "^2.1.1", + "semver": "^7.3.5" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=7.28.0" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^2.0.0" + }, + "engines": { + "node": "^10.0.0 || ^12.0.0 || >= 14.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-unicorn/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-vue": { + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.16.0.tgz", + "integrity": "sha512-0E2dVvVC7I2Xm1HXyx+ZwPj9CNX4NJjs4K4r+GVsHWyt5Pew3JLD4fI7A91b2jeL0TXE7LlszrwLSTJU9eqehw==", + "dev": true, + "dependencies": { + "eslint-utils": "^2.1.0", + "natural-compare": "^1.4.0", + "semver": "^6.3.0", + "vue-eslint-parser": "^7.10.0" + }, + "engines": { + "node": ">=8.10" + }, + "peerDependencies": { + "eslint": "^6.2.0 || ^7.0.0" + } + }, + "node_modules/eslint-plugin-vue/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-template-visitor": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz", + "integrity": "sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==", + "dev": true, + "dependencies": { + "@babel/core": "^7.12.16", + "@babel/eslint-parser": "^7.12.16", + "eslint-visitor-keys": "^2.0.0", + "esquery": "^1.3.1", + "multimap": "^1.1.0" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execall": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/execall/-/execall-2.0.0.tgz", + "integrity": "sha512-0FU2hZ5Hh6iQnarpRtQurM/aAvp3RIbfvgLHrcqJYzhXyV2KFruhuChf9NC6waAhiUR7FFtlugkI4p7f2Fqlow==", + "dev": true, + "dependencies": { + "clone-regexp": "^2.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dependencies": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/expand-brackets/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/expand-brackets/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/expect": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.0.6.tgz", + "integrity": "sha512-psNLt8j2kwg42jGBDSfAlU49CEZxejN1f1PlANWDZqIhBOVU/c2Pm888FcjWJzFewhIsNWfZJeLjUjtKGiPuSw==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "ansi-styles": "^5.0.0", + "jest-get-type": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-regex-util": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/expect/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "node_modules/extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dependencies": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dependencies": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dependencies": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extglob/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, + "node_modules/fast-glob": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==" + }, + "node_modules/fastq": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", + "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "dependencies": { + "bser": "2.1.1" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/figures/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dependencies": { + "find-up": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/find-cache-dir/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", + "dev": true + }, + "node_modules/flow-parser": { + "version": "0.157.0", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.157.0.tgz", + "integrity": "sha512-p0vdtrM8oAMlscIXpX0e/eGWll5NPteVChNtlQncbIbivH+BdiwXHN5QO6myAfmebd027r9RiQKdUPsFAiEVgQ==", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/font-awesome": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", + "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=", + "engines": { + "node": ">=0.10.3" + } + }, + "node_modules/for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dependencies": { + "map-cache": "^0.2.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "dependencies": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + }, + "engines": { + "node": ">=6 <7 || >=8" + } + }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stdin": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", + "integrity": "sha512-sY22aA6xchAzprjyqmSEQv4UbAAzRN0L2dQB0NlN5acTTK9Don6nhoc3eAbUnpZiCANAMfd/+40kVdKfFygohg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/glob": { + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==" + }, + "node_modules/global-modules": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz", + "integrity": "sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A==", + "dev": true, + "dependencies": { + "global-prefix": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz", + "integrity": "sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg==", + "dev": true, + "dependencies": { + "ini": "^1.3.5", + "kind-of": "^6.0.2", + "which": "^1.3.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/global-prefix/node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/globals": { + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/globby/node_modules/ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "engines": { + "node": ">= 4" + } + }, + "node_modules/globjoin": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/globjoin/-/globjoin-0.1.4.tgz", + "integrity": "sha1-L0SUrIkZ43Z8XLtpHp9GMyQoXUM=", + "dev": true + }, + "node_modules/gonzales-pe": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz", + "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "gonzales": "bin/gonzales.js" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" + }, + "node_modules/graphlib": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/graphlib/-/graphlib-2.1.8.tgz", + "integrity": "sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==", + "dependencies": { + "lodash": "^4.17.15" + } + }, + "node_modules/gsap": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.7.1.tgz", + "integrity": "sha512-4qxuaC2yFWRjMRof5tI/7c9/+L4xMsCoqHrZAmuh+IbOokTnZyoeF0VgvcVHq3uo+/VJZCs7PTvjrFasfGl+ww==" + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dependencies": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dependencies": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/has-values/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/has-values/node_modules/kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hash-sum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/hash-sum/-/hash-sum-1.0.2.tgz", + "integrity": "sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=" + }, + "node_modules/he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "bin": { + "he": "bin/he" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dev": true, + "dependencies": { + "whatwg-encoding": "^1.0.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/html-tags": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", + "integrity": "sha512-1qYz89hW3lFDEazhjW0yVAV87lw8lVkrJocr72XmBkMKsoSVJCQx3W8BXsC7hO2qAt8BoVjYjtAcZ9perqGnNg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/htmlparser2": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", + "dev": true, + "funding": [ + "https://github.com/fb55/htmlparser2?sponsor=1", + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ], + "dependencies": { + "domelementtype": "^2.0.1", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", + "entities": "^2.0.0" + } + }, + "node_modules/http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "dependencies": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/image-size": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", + "integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=", + "optional": true, + "bin": { + "image-size": "bin/image-size.js" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-lazy": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-4.0.0.tgz", + "integrity": "sha512-rKtvo6a868b5Hu3heneU+L4yEQ4jYKLtjpnPeUdK7h0yzXGmyBTypknlkCvHFBqfX9YlorEiMM6Dnq/5atfHkw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/import-local/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "engines": { + "node": ">=6" + } + }, + "node_modules/import-local/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/import-local/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true + }, + "node_modules/inquirer": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.1.2.tgz", + "integrity": "sha512-DHLKJwLPNgkfwNmsuEUKSejJFbkv0FMO9SMiQbjI3n5NQuCrSIBqP66ggqyz2a6t2qEolKrMjhQ3+W/xXgUQ+Q==", + "dependencies": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.3.0", + "run-async": "^2.4.0", + "rxjs": "^7.2.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/inquirer-glob-prompt": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/inquirer-glob-prompt/-/inquirer-glob-prompt-0.1.0.tgz", + "integrity": "sha512-Zw9XYJdrBBJ5TZjLH8Nu8PIa54huvkP0xeNOTtKh3bis0DNAJWMtdpT9PIJBkqheMUnwIPmv8jkjOr7aPKYFqg==", + "dependencies": { + "chalk": "^4.1.0", + "figures": "^3.2.0", + "globby": "^11.0.3", + "rxjs": "^6.6.7" + } + }, + "node_modules/inquirer-glob-prompt/node_modules/rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "dependencies": { + "tslib": "^1.9.0" + }, + "engines": { + "npm": ">=2.0.0" + } + }, + "node_modules/internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-alphabetical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz", + "integrity": "sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-alphanumerical": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz", + "integrity": "sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A==", + "dev": true, + "dependencies": { + "is-alphabetical": "^1.0.0", + "is-decimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + }, + "node_modules/is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "dependencies": { + "has-bigints": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-buffer": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", + "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=4" + } + }, + "node_modules/is-builtin-module": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz", + "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-ci": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", + "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", + "dev": true, + "dependencies": { + "ci-info": "^3.1.1" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/is-core-module": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", + "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dependencies": { + "kind-of": "^6.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-date-object": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-decimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz", + "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dependencies": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dependencies": { + "is-plain-object": "^2.0.4" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-hexadecimal": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz", + "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-negative-zero": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", + "dev": true + }, + "node_modules/is-regex": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-regexp": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz", + "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-string": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-symbol": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-what": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "node_modules/isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.0.6.tgz", + "integrity": "sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA==", + "dev": true, + "dependencies": { + "@jest/core": "^27.0.6", + "import-local": "^3.0.2", + "jest-cli": "^27.0.6" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.0.6.tgz", + "integrity": "sha512-BuL/ZDauaq5dumYh5y20sn4IISnf1P9A0TDswTxUi84ORGtVa86ApuBHqICL0vepqAnZiY6a7xeSPWv2/yy4eA==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "execa": "^5.0.0", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-circus": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.0.6.tgz", + "integrity": "sha512-OJlsz6BBeX9qR+7O9lXefWoc2m9ZqcZ5Ohlzz0pTEAG4xMiZUJoacY8f4YDHxgk0oKYxj277AfOk9w6hZYvi1Q==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "expect": "^27.0.6", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "pretty-format": "^27.0.6", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-cli": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.0.6.tgz", + "integrity": "sha512-qUUVlGb9fdKir3RDE+B10ULI+LQrz+MCflEH2UJyoUjoHHCbxDrMxSzjQAPUMsic4SncI62ofYCcAvW6+6rhhg==", + "dev": true, + "dependencies": { + "@jest/core": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "jest-config": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "prompts": "^2.0.1", + "yargs": "^16.0.3" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.0.6.tgz", + "integrity": "sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w==", + "dev": true, + "dependencies": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^27.0.6", + "@jest/types": "^27.0.6", + "babel-jest": "^27.0.6", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "is-ci": "^3.0.0", + "jest-circus": "^27.0.6", + "jest-environment-jsdom": "^27.0.6", + "jest-environment-node": "^27.0.6", + "jest-get-type": "^27.0.6", + "jest-jasmine2": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-runner": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "micromatch": "^4.0.4", + "pretty-format": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "peerDependencies": { + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.0.6.tgz", + "integrity": "sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "diff-sequences": "^27.0.6", + "jest-get-type": "^27.0.6", + "pretty-format": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.0.6.tgz", + "integrity": "sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA==", + "dev": true, + "dependencies": { + "detect-newline": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-each": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.0.6.tgz", + "integrity": "sha512-m6yKcV3bkSWrUIjxkE9OC0mhBZZdhovIW5ergBYirqnkLXkyEn3oUUF/QZgyecA1cF1QFyTE8bRRl8Tfg1pfLA==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "jest-get-type": "^27.0.6", + "jest-util": "^27.0.6", + "pretty-format": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-environment-jsdom": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz", + "integrity": "sha512-FvetXg7lnXL9+78H+xUAsra3IeZRTiegA3An01cWeXBspKXUhAwMM9ycIJ4yBaR0L7HkoMPaZsozCLHh4T8fuw==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.0.6", + "@jest/fake-timers": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "jest-mock": "^27.0.6", + "jest-util": "^27.0.6", + "jsdom": "^16.6.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.0.6.tgz", + "integrity": "sha512-+Vi6yLrPg/qC81jfXx3IBlVnDTI6kmRr08iVa2hFCWmJt4zha0XW7ucQltCAPhSR0FEKEoJ3i+W4E6T0s9is0w==", + "dev": true, + "dependencies": { + "@jest/environment": "^27.0.6", + "@jest/fake-timers": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "jest-mock": "^27.0.6", + "jest-util": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-extended": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-0.11.5.tgz", + "integrity": "sha512-3RsdFpLWKScpsLD6hJuyr/tV5iFOrw7v6YjA3tPdda9sJwoHwcMROws5gwiIZfcwhHlJRwFJB2OUvGmF3evV/Q==", + "dev": true, + "dependencies": { + "expect": "^24.1.0", + "jest-get-type": "^22.4.3", + "jest-matcher-utils": "^22.0.0" + } + }, + "node_modules/jest-extended/node_modules/@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "dependencies": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "dependencies": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/@types/istanbul-reports": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz", + "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "*", + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/jest-extended/node_modules/@types/stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", + "dev": true + }, + "node_modules/jest-extended/node_modules/@types/yargs": { + "version": "13.0.12", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.12.tgz", + "integrity": "sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ==", + "dev": true, + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/jest-extended/node_modules/ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-extended/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-extended/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-extended/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/jest-extended/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/jest-extended/node_modules/diff-sequences": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", + "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/jest-extended/node_modules/expect": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", + "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "dev": true, + "dependencies": { + "@jest/types": "^24.9.0", + "ansi-styles": "^3.2.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-regex-util": "^24.9.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/expect/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-extended/node_modules/expect/node_modules/jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/expect/node_modules/jest-matcher-utils": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", + "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", + "dev": true, + "dependencies": { + "chalk": "^2.0.1", + "jest-diff": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/expect/node_modules/pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "dependencies": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-extended/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/jest-extended/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/jest-diff": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", + "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", + "dev": true, + "dependencies": { + "chalk": "^2.0.1", + "diff-sequences": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/jest-diff/node_modules/ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-extended/node_modules/jest-diff/node_modules/jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/jest-diff/node_modules/pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "dependencies": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/jest-get-type": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "node_modules/jest-extended/node_modules/jest-matcher-utils": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz", + "integrity": "sha512-lsEHVaTnKzdAPR5t4B6OcxXo9Vy4K+kRRbG5gtddY8lBEC+Mlpvm1CJcsMESRjzUhzkz568exMV1hTB76nAKbA==", + "dev": true, + "dependencies": { + "chalk": "^2.0.1", + "jest-get-type": "^22.4.3", + "pretty-format": "^22.4.3" + } + }, + "node_modules/jest-extended/node_modules/jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/jest-regex-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", + "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/jest-extended/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/pretty-format": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.3.tgz", + "integrity": "sha512-S4oT9/sT6MN7/3COoOy+ZJeA92VmOnveLHgrwBE3Z1W5N9S2A1QGNYiE1z75DAENbJrXXUb+OWXhpJcg05QKQQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + } + }, + "node_modules/jest-extended/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "node_modules/jest-extended/node_modules/slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/jest-extended/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-extended/node_modules/stack-utils": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.5.tgz", + "integrity": "sha512-KZiTzuV3CnSnSvgMRrARVCj+Ht7rMbauGDK0LdVFRGyenwdylpajAp4Q0i6SX8rEmbTpMMf6ryq2gb8pPq2WgQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-extended/node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jest-extended/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/jest-extended/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jest-get-type": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.0.6.tgz", + "integrity": "sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg==", + "dev": true, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.0.6.tgz", + "integrity": "sha512-4ldjPXX9h8doB2JlRzg9oAZ2p6/GpQUNAeiYXqcpmrKbP0Qev0wdZlxSMOmz8mPOEnt4h6qIzXFLDi8RScX/1w==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^27.0.6", + "jest-serializer": "^27.0.6", + "jest-util": "^27.0.6", + "jest-worker": "^27.0.6", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + }, + "optionalDependencies": { + "fsevents": "^2.3.2" + } + }, + "node_modules/jest-jasmine2": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz", + "integrity": "sha512-cjpH2sBy+t6dvCeKBsHpW41mjHzXgsavaFMp+VWRf0eR4EW8xASk1acqmljFtK2DgyIECMv2yCdY41r2l1+4iA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^27.0.6", + "@jest/source-map": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^27.0.6", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "pretty-format": "^27.0.6", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-leak-detector": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz", + "integrity": "sha512-2/d6n2wlH5zEcdctX4zdbgX8oM61tb67PQt4Xh8JFAIy6LRKUnX528HulkaG6nD5qDl5vRV1NXejCe1XRCH5gQ==", + "dev": true, + "dependencies": { + "jest-get-type": "^27.0.6", + "pretty-format": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.0.6.tgz", + "integrity": "sha512-OFgF2VCQx9vdPSYTHWJ9MzFCehs20TsyFi6bIHbk5V1u52zJOnvF0Y/65z3GLZHKRuTgVPY4Z6LVePNahaQ+tA==", + "dev": true, + "dependencies": { + "chalk": "^4.0.0", + "jest-diff": "^27.0.6", + "jest-get-type": "^27.0.6", + "pretty-format": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.0.6.tgz", + "integrity": "sha512-rBxIs2XK7rGy+zGxgi+UJKP6WqQ+KrBbD1YMj517HYN3v2BG66t3Xan3FWqYHKZwjdB700KiAJ+iES9a0M+ixw==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^27.0.6", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.4", + "pretty-format": "^27.0.6", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-message-util/node_modules/@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/jest-mock": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.0.6.tgz", + "integrity": "sha512-lzBETUoK8cSxts2NYXSBWT+EJNzmUVtVVwS1sU9GwE1DLCfGsngg+ZVSIe0yd0ZSm+y791esiuo+WSwpXJQ5Bw==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "@types/node": "*" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "engines": { + "node": ">=6" + }, + "peerDependencies": { + "jest-resolve": "*" + }, + "peerDependenciesMeta": { + "jest-resolve": { + "optional": true + } + } + }, + "node_modules/jest-regex-util": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.0.6.tgz", + "integrity": "sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ==", + "dev": true, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.0.6.tgz", + "integrity": "sha512-yKmIgw2LgTh7uAJtzv8UFHGF7Dm7XfvOe/LQ3Txv101fLM8cx2h1QVwtSJ51Q/SCxpIiKfVn6G2jYYMDNHZteA==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "escalade": "^3.1.1", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "resolve": "^1.20.0", + "slash": "^3.0.0" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.6.tgz", + "integrity": "sha512-mg9x9DS3BPAREWKCAoyg3QucCr0n6S8HEEsqRCKSPjPcu9HzRILzhdzY3imsLoZWeosEbJZz6TKasveczzpJZA==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-snapshot": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-runner": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.0.6.tgz", + "integrity": "sha512-W3Bz5qAgaSChuivLn+nKOgjqNxM7O/9JOJoKDCqThPIg2sH/d4A/lzyiaFgnb9V1/w29Le11NpzTJSzga1vyYQ==", + "dev": true, + "dependencies": { + "@jest/console": "^27.0.6", + "@jest/environment": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-docblock": "^27.0.6", + "jest-environment-jsdom": "^27.0.6", + "jest-environment-node": "^27.0.6", + "jest-haste-map": "^27.0.6", + "jest-leak-detector": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-util": "^27.0.6", + "jest-worker": "^27.0.6", + "source-map-support": "^0.5.6", + "throat": "^6.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.0.6.tgz", + "integrity": "sha512-BhvHLRVfKibYyqqEFkybsznKwhrsu7AWx2F3y9G9L95VSIN3/ZZ9vBpm/XCS2bS+BWz3sSeNGLzI3TVQ0uL85Q==", + "dev": true, + "dependencies": { + "@jest/console": "^27.0.6", + "@jest/environment": "^27.0.6", + "@jest/fake-timers": "^27.0.6", + "@jest/globals": "^27.0.6", + "@jest/source-map": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-mock": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^16.0.3" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-serializer": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.0.6.tgz", + "integrity": "sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==", + "dev": true, + "dependencies": { + "@types/node": "*", + "graceful-fs": "^4.2.4" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.0.6.tgz", + "integrity": "sha512-NTHaz8He+ATUagUgE7C/UtFcRoHqR2Gc+KDfhQIyx+VFgwbeEMjeP+ILpUTLosZn/ZtbNdCF5LkVnN/l+V751A==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.2", + "@babel/generator": "^7.7.2", + "@babel/parser": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.0.0", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^27.0.6", + "graceful-fs": "^4.2.4", + "jest-diff": "^27.0.6", + "jest-get-type": "^27.0.6", + "jest-haste-map": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-util": "^27.0.6", + "natural-compare": "^1.4.0", + "pretty-format": "^27.0.6", + "semver": "^7.3.2" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-util": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.0.6.tgz", + "integrity": "sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^3.0.0", + "picomatch": "^2.2.3" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-validate": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.0.6.tgz", + "integrity": "sha512-yhZZOaMH3Zg6DC83n60pLmdU1DQE46DW+KLozPiPbSbPhlXXaiUTDlhHQhHFpaqIFRrInko1FHXjTRpjWRuWfA==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^27.0.6", + "leven": "^3.1.0", + "pretty-format": "^27.0.6" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.0.6.tgz", + "integrity": "sha512-/jIoKBhAP00/iMGnTwUBLgvxkn7vsOweDrOTSPzc7X9uOyUtJIDthQBTI1EXz90bdkrxorUZVhJwiB69gcHtYQ==", + "dev": true, + "dependencies": { + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^27.0.6", + "string-length": "^4.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/jest-worker": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", + "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "dependencies": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + }, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/joycon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.0.1.tgz", + "integrity": "sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==", + "engines": { + "node": ">=10" + } + }, + "node_modules/jquery": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" + }, + "node_modules/jquery.are-you-sure": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/jquery.are-you-sure/-/jquery.are-you-sure-1.9.0.tgz", + "integrity": "sha512-2r0uFx8CyAopjeHGOdvvwpFP921TnW1+v1uJXcAWQYHYGB1tryTDhQY+5u6HsVeMwbWiRTKVZFWnLaFpDvIqZQ==", + "dependencies": { + "jquery": ">=1.4.2" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==" + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jscodeshift": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.11.0.tgz", + "integrity": "sha512-SdRK2C7jjs4k/kT2mwtO07KJN9RnjxtKn03d9JVj6c3j9WwaLcFYsICYDnLAzY0hp+wG2nxl+Cm2jWLiNVYb8g==", + "dependencies": { + "@babel/core": "^7.1.6", + "@babel/parser": "^7.1.6", + "@babel/plugin-proposal-class-properties": "^7.1.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.1.0", + "@babel/plugin-proposal-optional-chaining": "^7.1.0", + "@babel/plugin-transform-modules-commonjs": "^7.1.0", + "@babel/preset-flow": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", + "@babel/register": "^7.0.0", + "babel-core": "^7.0.0-bridge.0", + "colors": "^1.1.2", + "flow-parser": "0.*", + "graceful-fs": "^4.2.4", + "micromatch": "^3.1.10", + "neo-async": "^2.5.0", + "node-dir": "^0.1.17", + "recast": "^0.20.3", + "temp": "^0.8.1", + "write-file-atomic": "^2.3.0" + }, + "bin": { + "jscodeshift": "bin/jscodeshift.js" + }, + "peerDependencies": { + "@babel/preset-env": "^7.1.6" + } + }, + "node_modules/jscodeshift/node_modules/braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dependencies": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/braces/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/fill-range/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/jscodeshift/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/is-number/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dependencies": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/jscodeshift/node_modules/write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dependencies": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, + "node_modules/jsdom": { + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "dev": true, + "dependencies": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "canvas": "^2.5.0" + }, + "peerDependenciesMeta": { + "canvas": { + "optional": true + } + } + }, + "node_modules/jsdom/node_modules/acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/json5": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "optionalDependencies": { + "graceful-fs": "^4.1.6" + } + }, + "node_modules/khroma": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/khroma/-/khroma-1.4.1.tgz", + "integrity": "sha512-+GmxKvmiRuCcUYDgR7g5Ngo0JEDeOsGdNONdU2zsiBQaK4z19Y2NvXqfEDE0ZiIrg45GTZyAnPLVsLZZACYm3Q==" + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/klona": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/klona/-/klona-2.0.4.tgz", + "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/known-css-properties": { + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.21.0.tgz", + "integrity": "sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw==", + "dev": true + }, + "node_modules/less": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/less/-/less-4.1.1.tgz", + "integrity": "sha512-w09o8tZFPThBscl5d0Ggp3RcrKIouBoQscnOMgFH3n5V3kN/CXGHNfCkRPtxJk6nKryDXaV9aHLK55RXuH4sAw==", + "dependencies": { + "copy-anything": "^2.0.1", + "parse-node-version": "^1.0.1", + "tslib": "^1.10.0" + }, + "bin": { + "lessc": "bin/lessc" + }, + "engines": { + "node": ">=6" + }, + "optionalDependencies": { + "errno": "^0.1.1", + "graceful-fs": "^4.1.2", + "image-size": "~0.5.0", + "make-dir": "^2.1.0", + "mime": "^1.4.1", + "needle": "^2.5.2", + "source-map": "~0.6.0" + } + }, + "node_modules/less-loader": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-10.0.1.tgz", + "integrity": "sha512-Crln//HpW9M5CbtdfWm3IO66Cvx1WhZQvNybXgfB2dD/6Sav9ppw+IWqs/FQKPBFO4B6X0X28Z0WNznshgwUzA==", + "dependencies": { + "klona": "^2.0.4" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "less": "^3.5.0 || ^4.0.0", + "webpack": "^5.0.0" + } + }, + "node_modules/less/node_modules/make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "optional": true, + "dependencies": { + "pify": "^4.0.1", + "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "optional": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/less/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "optional": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/less/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "optional": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/license-checker-webpack-plugin": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/license-checker-webpack-plugin/-/license-checker-webpack-plugin-0.2.1.tgz", + "integrity": "sha512-rX8B+mH6fk1vxbnIu/UztqTEonQw95xwOkoRjX3TSrRZA/pbG9CWa3wnSo89KY/ej379JQoq050fsuthy6AU+A==", + "dependencies": { + "glob": "^7.1.6", + "lodash.template": "^4.5.0", + "minimatch": "^3.0.4", + "semver": "^6.3.0", + "spdx-expression-validate": "^2.0.0", + "spdx-satisfies": "^5.0.0", + "superstruct": "^0.10.12", + "webpack-sources": "^1.4.3", + "wrap-ansi": "^6.1.0" + }, + "peerDependencies": { + "webpack": "^4.4.0 || ^5.4.0" + } + }, + "node_modules/license-checker-webpack-plugin/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/license-checker-webpack-plugin/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/license-checker-webpack-plugin/node_modules/webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "dependencies": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, + "node_modules/license-checker-webpack-plugin/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "dev": true, + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", + "engines": { + "node": ">=6.11.5" + } + }, + "node_modules/loader-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^2.1.2" + }, + "engines": { + "node": ">=8.9.0" + } + }, + "node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/lodash._reinterpolate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", + "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "node_modules/lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "peer": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/lodash.template": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", + "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "dependencies": { + "lodash._reinterpolate": "^3.0.0", + "lodash.templatesettings": "^4.0.0" + } + }, + "node_modules/lodash.templatesettings": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz", + "integrity": "sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==", + "dependencies": { + "lodash._reinterpolate": "^3.0.0" + } + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/longest-streak": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/longest-streak/-/longest-streak-2.0.4.tgz", + "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "dependencies": { + "tmpl": "1.0.x" + } + }, + "node_modules/map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/map-obj": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dependencies": { + "object-visit": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/marked": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==", + "bin": { + "marked": "bin/marked" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/mathml-tag-names": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz", + "integrity": "sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/mdast-util-from-markdown": { + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", + "dev": true, + "dependencies": { + "@types/mdast": "^3.0.0", + "mdast-util-to-string": "^2.0.0", + "micromark": "~2.11.0", + "parse-entities": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-markdown": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "longest-streak": "^2.0.0", + "mdast-util-to-string": "^2.0.0", + "parse-entities": "^2.0.0", + "repeat-string": "^1.0.0", + "zwitch": "^1.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-to-string": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz", + "integrity": "sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdn-data": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true + }, + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/hosted-git-info": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/normalize-package-data": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", + "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", + "dev": true, + "dependencies": { + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/meow/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/meow/node_modules/read-pkg/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dependencies": { + "source-map": "^0.6.1" + } + }, + "node_modules/merge-source-map/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==" + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/mermaid": { + "version": "8.11.5", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-8.11.5.tgz", + "integrity": "sha512-lbIaDQlFoIQLxnLy8hZgfS6L7gt2Wxlk83fudLslUEhj4yafHyVjzGOlojJQxgsLU5khEANhxLbo0xebtOrhXQ==", + "dependencies": { + "@braintree/sanitize-url": "^3.1.0", + "@percy/migrate": "^0.10.0", + "d3": "^5.7.0", + "dagre": "^0.8.5", + "dagre-d3": "^0.6.4", + "dompurify": "2.3.0", + "graphlib": "^2.1.8", + "khroma": "^1.4.1", + "moment-mini": "^2.24.0", + "stylis": "^4.0.10" + } + }, + "node_modules/micromark": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "dependencies": { + "debug": "^4.0.0", + "parse-entities": "^2.0.0" + } + }, + "node_modules/micromatch": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", + "dependencies": { + "braces": "^3.0.1", + "picomatch": "^2.2.3" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mime": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", + "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "optional": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "dependencies": { + "mime-db": "1.49.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/mini-css-extract-plugin": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.2.0.tgz", + "integrity": "sha512-91HeVHbq7PUJ4TwOuMTlFWfVWrLqf3SF0PlEDPV+wtgsfxrMebN9LLzflyQqdKLp4/H3PexRB1WLKsCqpWKkxQ==", + "dependencies": { + "schema-utils": "^3.1.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.0.0" + } + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/minipass": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", + "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dependencies": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/moment-mini": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment-mini/-/moment-mini-2.24.0.tgz", + "integrity": "sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ==" + }, + "node_modules/monaco-editor": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.27.0.tgz", + "integrity": "sha512-UhwP78Wb8w0ZSYoKXQNTV/0CHObp6NS3nCt51QfKE6sKyBo5PBsvuDOHoI2ooBakc6uIwByRLHVeT7+yXQe2fQ==" + }, + "node_modules/monaco-editor-webpack-plugin": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-4.1.2.tgz", + "integrity": "sha512-snmHecygICKT0UlHhva+Cs2WaLPpxy3111xbvInhjjTr5m0xQTFHlmJ2QQDcB14Vzmm7f07uc1TtbvOpmL50BA==", + "dependencies": { + "loader-utils": "^2.0.0" + }, + "peerDependencies": { + "monaco-editor": "0.25.x || 0.26.x || 0.27.x", + "webpack": "^4.5.0 || 5.x" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/multimap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/multimap/-/multimap-1.1.0.tgz", + "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==", + "dev": true + }, + "node_modules/mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" + }, + "node_modules/nanoid": { + "version": "3.1.25", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", + "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dependencies": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/needle": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.8.0.tgz", + "integrity": "sha512-ZTq6WYkN/3782H1393me3utVYdq2XyqNUFBsprEE3VMAT0+hP/cItpnITpqsY6ep2yeFE4Tqtqwc74VqUlUYtw==", + "optional": true, + "dependencies": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "bin": { + "needle": "bin/needle" + }, + "engines": { + "node": ">= 4.4.x" + } + }, + "node_modules/needle/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "optional": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/node-dir": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=", + "dependencies": { + "minimatch": "^3.0.2" + }, + "engines": { + "node": ">= 0.10.5" + } + }, + "node_modules/node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true, + "engines": { + "node": "4.x || >=6.0.0" + } + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node_modules/node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/node-releases": { + "version": "1.1.74", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.74.tgz", + "integrity": "sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==" + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-range": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", + "integrity": "sha1-LRDAa9/TEuqXd2laTShDlFa3WUI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/normalize-selector": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", + "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", + "dev": true + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nth-check": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "dev": true, + "dependencies": { + "boolbase": "^1.0.0" + }, + "funding": { + "url": "https://github.com/fb55/nth-check?sponsor=1" + } + }, + "node_modules/num2fraction": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", + "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", + "dev": true + }, + "node_modules/nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dependencies": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/object-copy/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/is-descriptor/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-copy/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dependencies": { + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dependencies": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dependencies": { + "isobject": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object.values": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.18.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-entities": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz", + "integrity": "sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ==", + "dev": true, + "dependencies": { + "character-entities": "^1.0.0", + "character-entities-legacy": "^1.0.0", + "character-reference-invalid": "^1.0.0", + "is-alphanumerical": "^1.0.0", + "is-decimal": "^1.0.0", + "is-hexadecimal": "^1.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/parse-ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", + "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "node_modules/pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "engines": { + "node": ">=4" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/picomatch": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/pirates": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "dependencies": { + "node-modules-regexp": "^1.0.0" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "dependencies": { + "find-up": "^2.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/popper.js": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", + "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==", + "deprecated": "You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1", + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, + "node_modules/posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", + "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "dependencies": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-html": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/postcss-html/-/postcss-html-0.36.0.tgz", + "integrity": "sha512-HeiOxGcuwID0AFsNAL0ox3mW6MHH5cstWN1Z3Y+n6H+g12ih7LHdYxWwEA/QmrebctLjo79xz9ouK3MroHwOJw==", + "dev": true, + "dependencies": { + "htmlparser2": "^3.10.0" + }, + "peerDependencies": { + "postcss": ">=5.0.0", + "postcss-syntax": ">=0.36.0" + } + }, + "node_modules/postcss-html/node_modules/dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "dependencies": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + } + }, + "node_modules/postcss-html/node_modules/dom-serializer/node_modules/domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fb55" + } + ] + }, + "node_modules/postcss-html/node_modules/dom-serializer/node_modules/entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/postcss-html/node_modules/domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, + "node_modules/postcss-html/node_modules/domhandler": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", + "integrity": "sha512-JiK04h0Ht5u/80fdLMCEmV4zkNh2BcoMFBmZ/91WtYZ8qVXSKjiw7fXMgFPnHcSZgOo3XdinHvmnDUeMf5R4wA==", + "dev": true, + "dependencies": { + "domelementtype": "1" + } + }, + "node_modules/postcss-html/node_modules/domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "dependencies": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, + "node_modules/postcss-html/node_modules/entities": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", + "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==", + "dev": true + }, + "node_modules/postcss-html/node_modules/htmlparser2": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.1.tgz", + "integrity": "sha512-IgieNijUMbkDovyoKObU1DUhm1iwNYE/fuifEoEHfd1oZKZDaONBSkal7Y01shxsM49R4XaMdGez3WnF9UfiCQ==", + "dev": true, + "dependencies": { + "domelementtype": "^1.3.1", + "domhandler": "^2.3.0", + "domutils": "^1.5.1", + "entities": "^1.1.1", + "inherits": "^2.0.1", + "readable-stream": "^3.1.1" + } + }, + "node_modules/postcss-less": { + "version": "3.1.4", + "resolved": "https://registry.npmjs.org/postcss-less/-/postcss-less-3.1.4.tgz", + "integrity": "sha512-7TvleQWNM2QLcHqvudt3VYjULVB49uiW6XzEUFmvwHzvsOEF5MwBrIXZDJQvJNFGjJQTzSzZnDoCJ8h/ljyGXA==", + "dev": true, + "dependencies": { + "postcss": "^7.0.14" + }, + "engines": { + "node": ">=6.14.4" + } + }, + "node_modules/postcss-less/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-less/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-less/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-less/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/postcss-less/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/postcss-less/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/postcss-less/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-less/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-less/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss-less/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/postcss-media-query-parser": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/postcss-media-query-parser/-/postcss-media-query-parser-0.2.3.tgz", + "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", + "dev": true + }, + "node_modules/postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dependencies": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dependencies": { + "postcss-selector-parser": "^6.0.4" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dependencies": { + "icss-utils": "^5.0.0" + }, + "engines": { + "node": "^10 || ^12 || >= 14" + }, + "peerDependencies": { + "postcss": "^8.1.0" + } + }, + "node_modules/postcss-resolve-nested-selector": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", + "integrity": "sha1-Kcy8fDfe36wwTp//C/FZaz9qDk4=", + "dev": true + }, + "node_modules/postcss-safe-parser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/postcss-safe-parser/-/postcss-safe-parser-4.0.2.tgz", + "integrity": "sha512-Uw6ekxSWNLCPesSv/cmqf2bY/77z11O7jZGPax3ycZMFU/oi2DMH9i89AdHc1tRwFg/arFoEwX0IS3LCUxJh1g==", + "dev": true, + "dependencies": { + "postcss": "^7.0.26" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/postcss-safe-parser/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-safe-parser/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-safe-parser/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-safe-parser/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/postcss-safe-parser/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/postcss-safe-parser/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/postcss-safe-parser/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-safe-parser/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-safe-parser/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss-safe-parser/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/postcss-sass": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/postcss-sass/-/postcss-sass-0.4.4.tgz", + "integrity": "sha512-BYxnVYx4mQooOhr+zer0qWbSPYnarAy8ZT7hAQtbxtgVf8gy+LSLT/hHGe35h14/pZDTw1DsxdbrwxBN++H+fg==", + "dev": true, + "dependencies": { + "gonzales-pe": "^4.3.0", + "postcss": "^7.0.21" + } + }, + "node_modules/postcss-sass/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-sass/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-sass/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-sass/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/postcss-sass/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/postcss-sass/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/postcss-sass/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-sass/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-sass/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss-sass/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/postcss-scss": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-2.1.1.tgz", + "integrity": "sha512-jQmGnj0hSGLd9RscFw9LyuSVAa5Bl1/KBPqG1NQw9w8ND55nY4ZEsdlVuYJvLPpV+y0nwTV5v/4rHPzZRihQbA==", + "dev": true, + "dependencies": { + "postcss": "^7.0.6" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/postcss-scss/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-scss/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-scss/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-scss/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/postcss-scss/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/postcss-scss/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/postcss-scss/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-scss/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/postcss-scss/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/postcss-scss/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/postcss-selector-parser": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", + "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "dependencies": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/postcss-syntax": { + "version": "0.36.2", + "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", + "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==", + "dev": true, + "peerDependencies": { + "postcss": ">=5.0.0" + } + }, + "node_modules/postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz", + "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", + "optional": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/pretty-format": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.0.6.tgz", + "integrity": "sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ==", + "dev": true, + "dependencies": { + "@jest/types": "^27.0.6", + "ansi-regex": "^5.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/pretty-ms": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", + "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "dependencies": { + "parse-ms": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/prompts": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", + "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/prr": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", + "integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=", + "optional": true + }, + "node_modules/pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "node_modules/psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true + }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", + "dev": true, + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", + "dev": true, + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/recast": { + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.20.5.tgz", + "integrity": "sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ==", + "dependencies": { + "ast-types": "0.14.2", + "esprima": "~4.0.0", + "source-map": "~0.6.1", + "tslib": "^2.0.1" + }, + "engines": { + "node": ">= 4" + } + }, + "node_modules/recast/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/recast/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dependencies": { + "resolve": "^1.9.0" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/regenerate": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "peer": true + }, + "node_modules/regenerate-unicode-properties": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", + "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "peer": true, + "dependencies": { + "regenerate": "^1.4.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + }, + "node_modules/regenerator-transform": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", + "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "peer": true, + "dependencies": { + "@babel/runtime": "^7.8.4" + } + }, + "node_modules/regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dependencies": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/regex-not/node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/regexp-tree": { + "version": "0.1.23", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.23.tgz", + "integrity": "sha512-+7HWfb4Bvu8Rs2eQTUIpX9I/PlQkYOuTNbRpKLJlQpSgwSkzFYh+pUj0gtvglnOZLKB6YgnIgRuJ2/IlpL48qw==", + "dev": true, + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, + "node_modules/regexpp": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/regexpu-core": { + "version": "4.7.1", + "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", + "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "peer": true, + "dependencies": { + "regenerate": "^1.4.0", + "regenerate-unicode-properties": "^8.2.0", + "regjsgen": "^0.5.1", + "regjsparser": "^0.6.4", + "unicode-match-property-ecmascript": "^1.0.4", + "unicode-match-property-value-ecmascript": "^1.2.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/regjsgen": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "peer": true + }, + "node_modules/regjsparser": { + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "peer": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "peer": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, + "node_modules/remark": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", + "integrity": "sha512-HDz1+IKGtOyWN+QgBiAT0kn+2s6ovOxHyPAFGKVE81VSzJ+mq7RwHFledEvB5F1p4iJvOah/LOKdFuzvRnNLCA==", + "dev": true, + "dependencies": { + "remark-parse": "^9.0.0", + "remark-stringify": "^9.0.0", + "unified": "^9.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-parse": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-9.0.0.tgz", + "integrity": "sha512-geKatMwSzEXKHuzBNU1z676sGcDcFoChMK38TgdHJNAYfFtsfHDQG7MoJAjs6sgYMqyLduCYWDIWZIxiPeafEw==", + "dev": true, + "dependencies": { + "mdast-util-from-markdown": "^0.8.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/remark-stringify": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-9.0.1.tgz", + "integrity": "sha512-mWmNg3ZtESvZS8fv5PTvaPckdL4iNlCHTt8/e/8oN08nArHRHjNZMKzA/YW3+p7/lYqIw4nx1XsjCBo/AxNChg==", + "dev": true, + "dependencies": { + "mdast-util-to-markdown": "^0.6.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-cwd/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "engines": { + "node": ">=4" + } + }, + "node_modules/resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "deprecated": "https://github.com/lydell/resolve-url#deprecated" + }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "engines": { + "node": ">=0.12" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/rw": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", + "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" + }, + "node_modules/rxjs": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.3.0.tgz", + "integrity": "sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw==", + "dependencies": { + "tslib": "~2.1.0" + } + }, + "node_modules/rxjs/node_modules/tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "node_modules/safe-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-2.1.1.tgz", + "integrity": "sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A==", + "dev": true, + "dependencies": { + "regexp-tree": "~0.1.1" + } + }, + "node_modules/safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "node_modules/sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "optional": true + }, + "node_modules/saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "dependencies": { + "xmlchars": "^2.2.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dependencies": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dependencies": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/set-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dependencies": { + "kind-of": "^6.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dependencies": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dependencies": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-node/node_modules/define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dependencies": { + "is-descriptor": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dependencies": { + "kind-of": "^3.2.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon-util/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/snapdragon-util/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dependencies": { + "ms": "2.0.0" + } + }, + "node_modules/snapdragon/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dependencies": { + "is-extendable": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/snapdragon/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/snapdragon/node_modules/ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "node_modules/sortablejs": { + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" + }, + "node_modules/source-list-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==" + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dependencies": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/source-map-support/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, + "node_modules/spdx-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", + "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==", + "dependencies": { + "array-find-index": "^1.0.2", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-expression-validate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-validate/-/spdx-expression-validate-2.0.0.tgz", + "integrity": "sha512-b3wydZLM+Tc6CFvaRDBOF9d76oGIHNCLYFeHbftFXUWjnfZWganmDmvtM5sm1cRwJc/VDBMLyGGrsLFd1vOxbg==", + "dependencies": { + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" + }, + "node_modules/spdx-ranges": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz", + "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==" + }, + "node_modules/spdx-satisfies": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-5.0.1.tgz", + "integrity": "sha512-Nwor6W6gzFp8XX4neaKQ7ChV4wmpSh2sSDemMFSzHxpTw460jxFYeOn+jq4ybnSSw/5sc3pjka9MQPouksQNpw==", + "dependencies": { + "spdx-compare": "^1.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, + "node_modules/specificity": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/specificity/-/specificity-0.4.1.tgz", + "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==", + "dev": true, + "bin": { + "specificity": "bin/specificity" + } + }, + "node_modules/split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dependencies": { + "extend-shallow": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/stable": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dependencies": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dependencies": { + "is-descriptor": "^0.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-accessor-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/static-extend/node_modules/is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-data-descriptor/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dependencies": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/static-extend/node_modules/kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/style-search": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/style-search/-/style-search-0.1.0.tgz", + "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=", + "dev": true + }, + "node_modules/stylelint": { + "version": "13.13.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.13.1.tgz", + "integrity": "sha512-Mv+BQr5XTUrKqAXmpqm6Ddli6Ief+AiPZkRsIrAoUKFuq/ElkUh9ZMYxXD0iQNZ5ADghZKLOWz1h7hTClB7zgQ==", + "dev": true, + "dependencies": { + "@stylelint/postcss-css-in-js": "^0.37.2", + "@stylelint/postcss-markdown": "^0.36.2", + "autoprefixer": "^9.8.6", + "balanced-match": "^2.0.0", + "chalk": "^4.1.1", + "cosmiconfig": "^7.0.0", + "debug": "^4.3.1", + "execall": "^2.0.0", + "fast-glob": "^3.2.5", + "fastest-levenshtein": "^1.0.12", + "file-entry-cache": "^6.0.1", + "get-stdin": "^8.0.0", + "global-modules": "^2.0.0", + "globby": "^11.0.3", + "globjoin": "^0.1.4", + "html-tags": "^3.1.0", + "ignore": "^5.1.8", + "import-lazy": "^4.0.0", + "imurmurhash": "^0.1.4", + "known-css-properties": "^0.21.0", + "lodash": "^4.17.21", + "log-symbols": "^4.1.0", + "mathml-tag-names": "^2.1.3", + "meow": "^9.0.0", + "micromatch": "^4.0.4", + "normalize-selector": "^0.2.0", + "postcss": "^7.0.35", + "postcss-html": "^0.36.0", + "postcss-less": "^3.1.4", + "postcss-media-query-parser": "^0.2.3", + "postcss-resolve-nested-selector": "^0.1.1", + "postcss-safe-parser": "^4.0.2", + "postcss-sass": "^0.4.4", + "postcss-scss": "^2.1.1", + "postcss-selector-parser": "^6.0.5", + "postcss-syntax": "^0.36.2", + "postcss-value-parser": "^4.1.0", + "resolve-from": "^5.0.0", + "slash": "^3.0.0", + "specificity": "^0.4.1", + "string-width": "^4.2.2", + "strip-ansi": "^6.0.0", + "style-search": "^0.1.0", + "sugarss": "^2.0.0", + "svg-tags": "^1.0.0", + "table": "^6.6.0", + "v8-compile-cache": "^2.3.0", + "write-file-atomic": "^3.0.3" + }, + "bin": { + "stylelint": "bin/stylelint.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/stylelint" + } + }, + "node_modules/stylelint-config-recommended": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-5.0.0.tgz", + "integrity": "sha512-c8aubuARSu5A3vEHLBeOSJt1udOdS+1iue7BmJDTSXoCBmfEQmmWX+59vYIj3NQdJBY6a/QRv1ozVFpaB9jaqA==", + "dev": true, + "peerDependencies": { + "stylelint": "^13.13.0" + } + }, + "node_modules/stylelint-config-standard": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-22.0.0.tgz", + "integrity": "sha512-uQVNi87SHjqTm8+4NIP5NMAyY/arXrBgimaaT7skvRfE9u3JKXRK9KBkbr4pVmeciuCcs64kAdjlxfq6Rur7Hw==", + "dev": true, + "dependencies": { + "stylelint-config-recommended": "^5.0.0" + }, + "peerDependencies": { + "stylelint": "^13.13.0" + } + }, + "node_modules/stylelint/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/stylelint/node_modules/balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "dev": true + }, + "node_modules/stylelint/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/stylelint/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/stylelint/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/stylelint/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/stylelint/node_modules/ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/stylelint/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/stylelint/node_modules/postcss/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/stylelint/node_modules/postcss/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/stylelint/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/stylelint/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stylelint/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/stylis": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz", + "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==" + }, + "node_modules/sugarss": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/sugarss/-/sugarss-2.0.0.tgz", + "integrity": "sha512-WfxjozUk0UVA4jm+U1d736AUpzSrNsQcIbyOkoE364GrtWmIrFdk5lksEupgWMD4VaT/0kVx1dobpiDumSgmJQ==", + "dev": true, + "dependencies": { + "postcss": "^7.0.2" + } + }, + "node_modules/sugarss/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sugarss/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sugarss/node_modules/chalk/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/sugarss/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/sugarss/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/sugarss/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/sugarss/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/sugarss/node_modules/postcss": { + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", + "dev": true, + "dependencies": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "engines": { + "node": ">=6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + } + }, + "node_modules/sugarss/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sugarss/node_modules/supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/superstruct": { + "version": "0.10.13", + "resolved": "https://registry.npmjs.org/superstruct/-/superstruct-0.10.13.tgz", + "integrity": "sha512-W4SitSZ9MOyMPbHreoZVEneSZyPEeNGbdfJo/7FkJyRs/M3wQRFzq+t3S/NBwlrFSWdx1ONLjLb9pB+UKe4IqQ==" + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/svg-tags": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz", + "integrity": "sha1-WPcc7jvVGbWdSyqEO2x95krAR2Q=", + "dev": true + }, + "node_modules/svgo": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.4.0.tgz", + "integrity": "sha512-W25S1UUm9Lm9VnE0TvCzL7aso/NCzDEaXLaElCUO/KaVitw0+IBicSVfM1L1c0YHK5TOFh73yQ2naCpVHEQ/OQ==", + "dev": true, + "dependencies": { + "@trysound/sax": "0.1.1", + "colorette": "^1.2.2", + "commander": "^7.1.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.2", + "csso": "^4.2.0", + "stable": "^0.1.8" + }, + "bin": { + "svgo": "bin/svgo" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/svgo/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true, + "engines": { + "node": ">= 10" + } + }, + "node_modules/swagger-ui-dist": { + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.0.0-beta.4.tgz", + "integrity": "sha512-lWEMkO2Hgi+sNNNwodDr+ocua7FWp8fIldstdIvIpXJVYsFpEPlOeGRoNerrtCSsgKwpziVNII+WO9xQZIJMsw==" + }, + "node_modules/symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true + }, + "node_modules/table": { + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", + "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/tapable": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "engines": { + "node": ">=6" + } + }, + "node_modules/tar": { + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.8.tgz", + "integrity": "sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^3.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/temp": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", + "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", + "dependencies": { + "rimraf": "~2.6.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/temp/node_modules/rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + } + }, + "node_modules/terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "dependencies": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terser": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", + "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "dependencies": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/terser-webpack-plugin": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", + "integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", + "dependencies": { + "jest-worker": "^27.0.2", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1", + "terser": "^5.7.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/terser-webpack-plugin/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/terser-webpack-plugin/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/terser/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "engines": { + "node": ">= 8" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/throat": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", + "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "dev": true + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "node_modules/tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dependencies": { + "os-tmpdir": "~1.0.2" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "engines": { + "node": ">=4" + } + }, + "node_modules/to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dependencies": { + "kind-of": "^3.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-object-path/node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "node_modules/to-object-path/node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dependencies": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/to-regex/node_modules/safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dependencies": { + "ret": "~0.1.10" + } + }, + "node_modules/tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "dependencies": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "dev": true, + "dependencies": { + "punycode": "^2.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tributejs": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/tributejs/-/tributejs-5.1.3.tgz", + "integrity": "sha512-B5CXihaVzXw+1UHhNFyAwUTMDk1EfoLP5Tj1VhD9yybZ1I8DZJEv8tZ1l0RJo0t0tk9ZhR8eG5tEsaCvRigmdQ==" + }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/trough": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz", + "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/tsconfig-paths": { + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", + "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", + "dev": true, + "dependencies": { + "json5": "^2.2.0", + "minimist": "^1.2.0", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typo-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.0.tgz", + "integrity": "sha512-dELuLBVa2jvWdU/CHTKi2L/POYaRupv942k+vRsFXsM17acXesQGAiGCio82RW7fvcr7bkuD/Zj8XpUh6aPC2A==" + }, + "node_modules/unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/unicode-canonical-property-names-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-ecmascript": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", + "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "peer": true, + "dependencies": { + "unicode-canonical-property-names-ecmascript": "^1.0.4", + "unicode-property-aliases-ecmascript": "^1.0.4" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-match-property-value-ecmascript": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unicode-property-aliases-ecmascript": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/unified": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", + "dev": true, + "dependencies": { + "bail": "^1.0.0", + "extend": "^3.0.0", + "is-buffer": "^2.0.0", + "is-plain-obj": "^2.0.0", + "trough": "^1.0.0", + "vfile": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unified/node_modules/is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dependencies": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/union-value/node_modules/is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unist-util-find-all-after": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/unist-util-find-all-after/-/unist-util-find-all-after-3.0.2.tgz", + "integrity": "sha512-xaTC/AGZ0rIM2gM28YVRAFPIZpzbpDtU3dRmp7EXlNVA8ziQc4hY3H7BHXM1J49nEmiqc3svnqMReW+PGqbZKQ==", + "dev": true, + "dependencies": { + "unist-util-is": "^4.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-is": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/unist-util-stringify-position": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz", + "integrity": "sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", + "engines": { + "node": ">= 4.0.0" + } + }, + "node_modules/unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dependencies": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dependencies": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-value/node_modules/isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dependencies": { + "isarray": "1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unset-value/node_modules/has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/updates": { + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/updates/-/updates-12.1.0.tgz", + "integrity": "sha512-cC/jeGLoeMiu0NteTQsFZTQ9p1aLYs9uODV3HbS3Zx7fAk+dY0GsrUCC8C153szTH3X9NkPtYp0FpLLS2qIKMw==", + "dev": true, + "bin": { + "updates": "updates.cjs" + }, + "engines": { + "node": ">= 12.20.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "deprecated": "Please see https://github.com/lydell/urix#deprecated" + }, + "node_modules/use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "node_modules/v-tooltip": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.1.3.tgz", + "integrity": "sha512-xXngyxLQTOx/yUEy50thb8te7Qo4XU6h4LZB6cvEfVd9mnysUxLEoYwGWDdqR+l69liKsy3IPkdYff3J1gAJ5w==", + "dependencies": { + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "popper.js": "^1.16.1", + "vue-resize": "^1.0.1" + } + }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "node_modules/v8-to-istanbul": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz", + "integrity": "sha512-LkmXi8UUNxnCC+JlH7/fsfsKr5AU110l+SYGJimWNkWhxbN5EyeOtm1MJ0hhvqMMOhGwBj1Fp70Yv9i+hX0QAg==", + "dev": true, + "dependencies": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vfile": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", + "integrity": "sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "is-buffer": "^2.0.0", + "unist-util-stringify-position": "^2.0.0", + "vfile-message": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vfile-message": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz", + "integrity": "sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-stringify-position": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/vue": { + "version": "2.6.14", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", + "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" + }, + "node_modules/vue-bar-graph": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vue-bar-graph/-/vue-bar-graph-1.3.0.tgz", + "integrity": "sha512-xU4875dPrwxhzZ1fHZq7qm/y3aWXUJAP6VwyE5TKKzO9SczWZaM2r0J4ck9pejWe/6xO1YYwRnNnPGIXHgYKJA==", + "dependencies": { + "gsap": "^3.6.1", + "vue": "^2.6.12" + } + }, + "node_modules/vue-calendar-heatmap": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/vue-calendar-heatmap/-/vue-calendar-heatmap-0.8.4.tgz", + "integrity": "sha512-Hx7OYBY1ghUIxKmFIIzpLT4XlcrwnI3WpadJEj/sKj5quoxwEuSDKmf94v0zWOHeQ/2CrB1G66geaKR/O56+OQ==", + "dependencies": { + "v-tooltip": "^2.0.0-rc.32" + } + }, + "node_modules/vue-eslint-parser": { + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.10.0.tgz", + "integrity": "sha512-7tc/ewS9Vq9Bn741pvpg8op2fWJPH3k32aL+jcIcWGCTzh/zXSdh7pZ5FV3W2aJancP9+ftPAv292zY5T5IPCg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "eslint-scope": "^5.1.1", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.2.1", + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8.10" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + }, + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, + "node_modules/vue-eslint-parser/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/vue-eslint-parser/node_modules/espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "dependencies": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/vue-eslint-parser/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/vue-hot-reload-api": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz", + "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" + }, + "node_modules/vue-loader": { + "version": "15.9.8", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.8.tgz", + "integrity": "sha512-GwSkxPrihfLR69/dSV3+5CdMQ0D+jXg8Ma1S4nQXKJAznYFX14vHdc/NetQc34Dw+rBbIJyP7JOuVb9Fhprvog==", + "dependencies": { + "@vue/component-compiler-utils": "^3.1.0", + "hash-sum": "^1.0.2", + "loader-utils": "^1.1.0", + "vue-hot-reload-api": "^2.3.0", + "vue-style-loader": "^4.1.0" + }, + "peerDependencies": { + "css-loader": "*", + "webpack": "^3.0.0 || ^4.1.0 || ^5.0.0-0" + }, + "peerDependenciesMeta": { + "cache-loader": { + "optional": true + }, + "vue-template-compiler": { + "optional": true + } + } + }, + "node_modules/vue-loader/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/vue-loader/node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/vue-resize": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-1.0.1.tgz", + "integrity": "sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==", + "dependencies": { + "@babel/runtime": "^7.13.10" + }, + "peerDependencies": { + "vue": "^2.6.0" + } + }, + "node_modules/vue-style-loader": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", + "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==", + "dependencies": { + "hash-sum": "^1.0.2", + "loader-utils": "^1.0.2" + } + }, + "node_modules/vue-style-loader/node_modules/json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/vue-style-loader/node_modules/loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dependencies": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/vue-template-compiler": { + "version": "2.6.14", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz", + "integrity": "sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==", + "dependencies": { + "de-indent": "^1.0.2", + "he": "^1.1.0" + } + }, + "node_modules/vue-template-es2015-compiler": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", + "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==" + }, + "node_modules/w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "dependencies": { + "browser-process-hrtime": "^1.0.0" + } + }, + "node_modules/w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "dependencies": { + "xml-name-validator": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "dependencies": { + "makeerror": "1.0.x" + } + }, + "node_modules/watchpack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", + "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "dependencies": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "dependencies": { + "defaults": "^1.0.3" + } + }, + "node_modules/webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true, + "engines": { + "node": ">=10.4" + } + }, + "node_modules/webpack": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.50.0.tgz", + "integrity": "sha512-hqxI7t/KVygs0WRv/kTgUW8Kl3YC81uyWQSo/7WUs5LsuRw0htH/fCwbVBGCuiX/t4s7qzjXFcf41O8Reiypag==", + "dependencies": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.50", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.0", + "es-module-lexer": "^0.7.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.2.0", + "webpack-sources": "^3.2.0" + }, + "bin": { + "webpack": "bin/webpack.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependenciesMeta": { + "webpack-cli": { + "optional": true + } + } + }, + "node_modules/webpack-cli": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.8.0.tgz", + "integrity": "sha512-+iBSWsX16uVna5aAYN6/wjhJy1q/GKk4KjKvfg90/6hykCTSgozbfz5iRgDTSJt/LgSbYxdBX3KBHeobIs+ZEw==", + "dependencies": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.0.4", + "@webpack-cli/info": "^1.3.0", + "@webpack-cli/serve": "^1.5.2", + "colorette": "^1.2.1", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + }, + "bin": { + "webpack-cli": "bin/cli.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "peerDependencies": { + "webpack": "4.x.x || 5.x.x" + }, + "peerDependenciesMeta": { + "@webpack-cli/generators": { + "optional": true + }, + "@webpack-cli/migrate": { + "optional": true + }, + "webpack-bundle-analyzer": { + "optional": true + }, + "webpack-dev-server": { + "optional": true + } + } + }, + "node_modules/webpack-cli/node_modules/commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dependencies": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/webpack-sources": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.1.tgz", + "integrity": "sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==", + "dependencies": { + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/webpack-sources/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/webpack/node_modules/acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/webpack/node_modules/acorn-import-assertions": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz", + "integrity": "sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA==", + "peerDependencies": { + "acorn": "^8" + } + }, + "node_modules/webpack/node_modules/webpack-sources": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.0.tgz", + "integrity": "sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw==", + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "dependencies": { + "iconv-lite": "0.4.24" + } + }, + "node_modules/whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "dev": true, + "dependencies": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "dependencies": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/workbox-core": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.2.4.tgz", + "integrity": "sha512-Nu8X4R4Is3g8uzEJ6qwbW2CGVpzntW/cSf8OfsQGIKQR0nt84FAKzP2cLDaNLp3L/iV9TuhZgCTZzkMiap5/OQ==" + }, + "node_modules/workbox-routing": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.2.4.tgz", + "integrity": "sha512-jHnOmpeH4MOWR4eXv6l608npD2y6IFv7yFJ1bT9/RbB8wq2vXHXJQ0ExTZRTWGbVltSG22wEU+MQ8VebDDwDeg==", + "dependencies": { + "workbox-core": "6.2.4" + } + }, + "node_modules/workbox-strategies": { + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.2.4.tgz", + "integrity": "sha512-DKgGC3ruceDuu2o+Ae5qmJy0p0q21mFP+RrkdqKrjyf2u8cJvvtvt1eIt4nevKc5BESiKxmhC2h+TZpOSzUDvA==", + "dependencies": { + "workbox-core": "6.2.4" + } + }, + "node_modules/worker-loader": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-3.0.8.tgz", + "integrity": "sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g==", + "dependencies": { + "loader-utils": "^2.0.0", + "schema-utils": "^3.0.0" + }, + "engines": { + "node": ">= 10.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^4.0.0 || ^5.0.0" + } + }, + "node_modules/wrap-ansi": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.0.tgz", + "integrity": "sha512-Z8D7Y4g4l2rDGMwV1NtKjqbhNoXWQK264I38RoO4eDKqOKIeL2HUi/Uf0OG9+4XRlfxZ0OPGL4c2DTrnV+G/RQ==", + "dependencies": { + "ansi-styles": "^6.0.0", + "string-width": "^5.0.0", + "strip-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.0.tgz", + "integrity": "sha512-tAaOSrWCHF+1Ear1Z4wnJCXA9GGox4K6Ic85a5qalES2aeEwQGr7UC93mwef49536PkCYjzkp0zIxfFvexJ6zQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", + "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.0.0.tgz", + "integrity": "sha512-zwXcRmLUdiWhMPrHz6EXITuyTgcEnUqDzspTkCLhQovxywWz6NP9VHgqfVg20V/1mUg0B95AKbXxNT+ALRmqCw==", + "dependencies": { + "emoji-regex": "^9.2.2", + "is-fullwidth-code-point": "^4.0.0", + "strip-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.0.tgz", + "integrity": "sha512-UhDTSnGF1dc0DRbUqr1aXwNoY3RgVkSWG8BrpnuFIxhP57IqbS7IRta2Gfiavds4yCxc5+fEAVVOgBZWnYkvzg==", + "dependencies": { + "ansi-regex": "^6.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/ws": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "dev": true, + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "node_modules/xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/zwitch": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz", + "integrity": "sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + } + }, "dependencies": { "@babel/code-frame": { "version": "7.12.11", @@ -11,389 +15048,546 @@ } }, "@babel/compat-data": { - "version": "7.12.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.12.7.tgz", - "integrity": "sha512-YaxPMGs/XIWtYqrdEOZOCPsVWfEoriXopnsz3/i7apYPXQ3698UFhS6dVT1KN5qOsWmVgw/FOrmQgpRaZayGsw==" + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", + "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==" }, "@babel/core": { - "version": "7.12.10", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.12.10.tgz", - "integrity": "sha512-eTAlQKq65zHfkHZV0sIVODCPGVgoo1HdBlbSLi9CqOzuZanMv2ihzY+4paiKr1mH+XmYESMAmJ/dpZ68eN6d8w==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.0.tgz", + "integrity": "sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw==", "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/generator": "^7.12.10", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helpers": "^7.12.5", - "@babel/parser": "^7.12.10", - "@babel/template": "^7.12.7", - "@babel/traverse": "^7.12.10", - "@babel/types": "^7.12.10", + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.0", + "@babel/helper-module-transforms": "^7.15.0", + "@babel/helpers": "^7.14.8", + "@babel/parser": "^7.15.0", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0", "convert-source-map": "^1.7.0", "debug": "^4.1.0", - "gensync": "^1.0.0-beta.1", + "gensync": "^1.0.0-beta.2", "json5": "^2.1.2", - "lodash": "^4.17.19", - "semver": "^5.4.1", + "semver": "^6.3.0", "source-map": "^0.5.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } + } + }, + "@babel/eslint-parser": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.15.0.tgz", + "integrity": "sha512-+gSPtjSBxOZz4Uh8Ggqu7HbfpB8cT1LwW0DnVVLZEJvzXauiD0Di3zszcBkRmfGGrLdYeHUwcflG7i3tr9kQlw==", + "dev": true, + "requires": { + "eslint-scope": "^5.1.1", + "eslint-visitor-keys": "^2.1.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "@babel/generator": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.12.11.tgz", - "integrity": "sha512-Ggg6WPOJtSi8yYQvLVjG8F/TlpWDlKx0OpS4Kt+xMQPs5OaGYWy+v1A+1TvxI6sAMGZpKWWoAQ1DaeQbImlItA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.0.tgz", + "integrity": "sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ==", "requires": { - "@babel/types": "^7.12.11", + "@babel/types": "^7.15.0", "jsesc": "^2.5.1", "source-map": "^0.5.0" } }, "@babel/helper-annotate-as-pure": { - "version": "7.12.10", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.10.tgz", - "integrity": "sha512-XplmVbC1n+KY6jL8/fgLVXXUauDIB+lD5+GsQEh6F6GBF1dq1qy4DP4yXWzDKcoqXB3X58t61e85Fitoww4JVQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.14.5.tgz", + "integrity": "sha512-EivH9EgBIb+G8ij1B2jAwSH36WnGvkQSEC6CkX/6v6ZFlw5fVOHvsgGF4uiEHO2GzMvunZb6tDLQEQSdrdocrA==", "requires": { - "@babel/types": "^7.12.10" + "@babel/types": "^7.14.5" } }, "@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz", - "integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.14.5.tgz", + "integrity": "sha512-YTA/Twn0vBXDVGJuAX6PwW7x5zQei1luDDo2Pl6q1qZ7hVNl0RZrhHCQG/ArGpR29Vl7ETiB8eJyrvpuRp300w==", + "peer": true, "requires": { - "@babel/helper-explode-assignable-expression": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/helper-explode-assignable-expression": "^7.14.5", + "@babel/types": "^7.14.5" } }, "@babel/helper-compilation-targets": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.5.tgz", - "integrity": "sha512-+qH6NrscMolUlzOYngSBMIOQpKUGPPsc61Bu5W10mg84LxZ7cmvnBHzARKbDoFxVvqqAbj6Tg6N7bSrWSPXMyw==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz", + "integrity": "sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A==", "requires": { - "@babel/compat-data": "^7.12.5", - "@babel/helper-validator-option": "^7.12.1", - "browserslist": "^4.14.5", - "semver": "^5.5.0" + "@babel/compat-data": "^7.15.0", + "@babel/helper-validator-option": "^7.14.5", + "browserslist": "^4.16.6", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + } } }, "@babel/helper-create-class-features-plugin": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.1.tgz", - "integrity": "sha512-hkL++rWeta/OVOBTRJc9a5Azh5mt5WgZUGAKMD8JM141YsE08K//bp1unBBieO6rUKkIPyUE0USQ30jAy3Sk1w==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.0.tgz", + "integrity": "sha512-MdmDXgvTIi4heDVX/e9EFfeGpugqm9fobBVg/iioE8kueXrOHdRDe36FAY7SnE9xXLVeYCoJR/gdrBEIHRC83Q==", "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-member-expression-to-functions": "^7.12.1", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.10.4" + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-member-expression-to-functions": "^7.15.0", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", + "@babel/helper-split-export-declaration": "^7.14.5" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.12.7", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.7.tgz", - "integrity": "sha512-idnutvQPdpbduutvi3JVfEgcVIHooQnhvhx0Nk9isOINOIGYkZea1Pk2JlJRiUnMefrlvr0vkByATBY/mB4vjQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", + "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", + "peer": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", + "@babel/helper-annotate-as-pure": "^7.14.5", "regexpu-core": "^4.7.1" } }, - "@babel/helper-define-map": { - "version": "7.10.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.10.5.tgz", - "integrity": "sha512-fMw4kgFB720aQFXSVaXr79pjjcW5puTCM16+rECJ/plGS+zByelE8l9nCpV1GibxTnFVmUuYG9U8wYfQHdzOEQ==", + "@babel/helper-define-polyfill-provider": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", + "peer": true, "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/types": "^7.10.5", - "lodash": "^4.17.19" + "@babel/helper-compilation-targets": "^7.13.0", + "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/traverse": "^7.13.0", + "debug": "^4.1.1", + "lodash.debounce": "^4.0.8", + "resolve": "^1.14.2", + "semver": "^6.1.2" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true + } } }, "@babel/helper-explode-assignable-expression": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.12.1.tgz", - "integrity": "sha512-dmUwH8XmlrUpVqgtZ737tK88v07l840z9j3OEhCLwKTkjlvKpfqXVIZ0wpK3aeOxspwGrf/5AP5qLx4rO3w5rA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.14.5.tgz", + "integrity": "sha512-Htb24gnGJdIGT4vnRKMdoXiOIlqOLmdiUYpAQ0mYfgVT/GDm8GOYhgi4GL+hMKrkiPRohO4ts34ELFsGAPQLDQ==", + "peer": true, "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.14.5" } }, "@babel/helper-function-name": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.11.tgz", - "integrity": "sha512-AtQKjtYNolKNi6nNNVLQ27CP6D9oFR6bq/HPYSizlzbp7uC1M59XJe8L+0uXjbIaZaUJF99ruHqVGiKXU/7ybA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz", + "integrity": "sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ==", "requires": { - "@babel/helper-get-function-arity": "^7.12.10", - "@babel/template": "^7.12.7", - "@babel/types": "^7.12.11" + "@babel/helper-get-function-arity": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/types": "^7.14.5" } }, "@babel/helper-get-function-arity": { - "version": "7.12.10", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz", - "integrity": "sha512-mm0n5BPjR06wh9mPQaDdXWDoll/j5UpCAPl1x8fS71GHm7HA6Ua2V4ylG1Ju8lvcTOietbPNNPaSilKj+pj+Ag==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz", + "integrity": "sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg==", "requires": { - "@babel/types": "^7.12.10" + "@babel/types": "^7.14.5" } }, "@babel/helper-hoist-variables": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.10.4.tgz", - "integrity": "sha512-wljroF5PgCk2juF69kanHVs6vrLwIPNp6DLD+Lrl3hoQ3PpPPikaDRNFA+0t81NOoMt2DL6WW/mdU8k4k6ZzuA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz", + "integrity": "sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ==", "requires": { - "@babel/types": "^7.10.4" + "@babel/types": "^7.14.5" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.12.7", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz", - "integrity": "sha512-DCsuPyeWxeHgh1Dus7APn7iza42i/qXqiFPWyBDdOFtvS581JQePsc1F/nD+fHrcswhLlRc2UpYS1NwERxZhHw==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz", + "integrity": "sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg==", "requires": { - "@babel/types": "^7.12.7" + "@babel/types": "^7.15.0" } }, "@babel/helper-module-imports": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.12.5.tgz", - "integrity": "sha512-SR713Ogqg6++uexFRORf/+nPXMmWIn80TALu0uaFb+iQIUoR7bOC7zBWyzBs5b3tBBJXuyD0cRu1F15GyzjOWA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz", + "integrity": "sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ==", "requires": { - "@babel/types": "^7.12.5" + "@babel/types": "^7.14.5" } }, "@babel/helper-module-transforms": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz", - "integrity": "sha512-QQzehgFAZ2bbISiCpmVGfiGux8YVFXQ0abBic2Envhej22DVXV9nCFaS5hIQbkyo1AdGb+gNME2TSh3hYJVV/w==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz", + "integrity": "sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg==", "requires": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-simple-access": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.11.0", - "@babel/helper-validator-identifier": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.1", - "@babel/types": "^7.12.1", - "lodash": "^4.17.19" + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-replace-supers": "^7.15.0", + "@babel/helper-simple-access": "^7.14.8", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.9", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/helper-optimise-call-expression": { - "version": "7.12.10", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz", - "integrity": "sha512-4tpbU0SrSTjjt65UMWSrUOPZTsgvPgGG4S8QSTNHacKzpS51IVWGDj0yCwyeZND/i+LSN2g/O63jEXEWm49sYQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz", + "integrity": "sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA==", "requires": { - "@babel/types": "^7.12.10" + "@babel/types": "^7.14.5" } }, "@babel/helper-plugin-utils": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz", - "integrity": "sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg==" + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", + "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==" }, "@babel/helper-remap-async-to-generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.12.1.tgz", - "integrity": "sha512-9d0KQCRM8clMPcDwo8SevNs+/9a8yWVVmaE80FGJcEP8N1qToREmWEGnBn8BUlJhYRFz6fqxeRL1sl5Ogsed7A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.14.5.tgz", + "integrity": "sha512-rLQKdQU+HYlxBwQIj8dk4/0ENOUEhA/Z0l4hN8BexpvmSMN9oA9EagjnhnDpNsRdWCfjwa4mn/HyBXO9yhQP6A==", + "peer": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-wrap-function": "^7.10.4", - "@babel/types": "^7.12.1" + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-wrap-function": "^7.14.5", + "@babel/types": "^7.14.5" } }, "@babel/helper-replace-supers": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.12.11.tgz", - "integrity": "sha512-q+w1cqmhL7R0FNzth/PLLp2N+scXEK/L2AHbXUyydxp828F4FEa5WcVoqui9vFRiHDQErj9Zof8azP32uGVTRA==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz", + "integrity": "sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.12.7", - "@babel/helper-optimise-call-expression": "^7.12.10", - "@babel/traverse": "^7.12.10", - "@babel/types": "^7.12.11" + "@babel/helper-member-expression-to-functions": "^7.15.0", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/helper-simple-access": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.12.1.tgz", - "integrity": "sha512-OxBp7pMrjVewSSC8fXDFrHrBcJATOOFssZwv16F3/6Xtc138GHybBfPbm9kfiqQHKhYQrlamWILwlDCeyMFEaA==", + "version": "7.14.8", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz", + "integrity": "sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg==", "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.14.8" } }, "@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz", - "integrity": "sha512-Mf5AUuhG1/OCChOJ/HcADmvcHM42WJockombn8ATJG3OnyiSxBK/Mm5x78BQWvmtXZKHgbjdGL2kin/HOLlZGA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.14.5.tgz", + "integrity": "sha512-dmqZB7mrb94PZSAOYtr+ZN5qt5owZIAgqtoTuqiFbHFtxgEcmQlRJVI+bO++fciBunXtB6MK7HrzrfcAzIz2NQ==", "requires": { - "@babel/types": "^7.12.1" + "@babel/types": "^7.14.5" } }, "@babel/helper-split-export-declaration": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.11.tgz", - "integrity": "sha512-LsIVN8j48gHgwzfocYUSkO/hjYAOJqlpJEc7tGXcIm4cubjVUf8LGW6eWRyxEu7gA25q02p0rQUWoCI33HNS5g==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz", + "integrity": "sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA==", "requires": { - "@babel/types": "^7.12.11" + "@babel/types": "^7.14.5" } }, "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz", + "integrity": "sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g==" }, "@babel/helper-validator-option": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz", - "integrity": "sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw==" + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", + "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==" }, "@babel/helper-wrap-function": { - "version": "7.12.3", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.12.3.tgz", - "integrity": "sha512-Cvb8IuJDln3rs6tzjW3Y8UeelAOdnpB8xtQ4sme2MSZ9wOxrbThporC0y/EtE16VAtoyEfLM404Xr1e0OOp+ow==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.14.5.tgz", + "integrity": "sha512-YEdjTCq+LNuNS1WfxsDCNpgXkJaIyqco6DAelTUjT4f2KIWC1nBcaCaSdHTBqQVLnTBexBcVcFhLSU1KnYuePQ==", + "peer": true, "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.10.4", - "@babel/types": "^7.10.4" + "@babel/helper-function-name": "^7.14.5", + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.14.5", + "@babel/types": "^7.14.5" } }, "@babel/helpers": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.12.5.tgz", - "integrity": "sha512-lgKGMQlKqA8meJqKsW6rUnc4MdUk35Ln0ATDqdM1a/UpARODdI4j5Y5lVfUScnSNkJcdCRAaWkspykNoFg9sJA==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.3.tgz", + "integrity": "sha512-HwJiz52XaS96lX+28Tnbu31VeFSQJGOeKHJeaEPQlTl7PnlhFElWPj8tUXtqFIzeN86XxXoBr+WFAyK2PPVz6g==", "requires": { - "@babel/template": "^7.10.4", - "@babel/traverse": "^7.12.5", - "@babel/types": "^7.12.5" + "@babel/template": "^7.14.5", + "@babel/traverse": "^7.15.0", + "@babel/types": "^7.15.0" } }, "@babel/highlight": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", - "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", + "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "requires": { - "@babel/helper-validator-identifier": "^7.10.4", + "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } } }, "@babel/parser": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz", - "integrity": "sha512-N3UxG+uuF4CMYoNj8AhnbAcJF0PiuJ9KHuy1lQmkYsxTer/MAH9UBNHsBoAX/4s6NvlDD047No8mYVGGzLL4hg==" + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.3.tgz", + "integrity": "sha512-O0L6v/HvqbdJawj0iBEfVQMc3/6WP+AeOsovsIgBFyJaG+W2w7eqvZB7puddATmWuARlm1SX7DwxJ/JJUnDpEA==" + }, + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ZoJS2XCKPBfTmL122iP6NM9dOg+d4lc9fFk3zxc8iDjvt8Pk4+TlsHSKhIPf6X+L5ORCdBzqMZDjL/WHj7WknQ==", + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5" + } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.12.tgz", - "integrity": "sha512-nrz9y0a4xmUrRq51bYkWJIO5SBZyG2ys2qinHsN0zHDHVsUaModrkpyWWWXfGqYQmOL3x9sQIcTNN/pBGpo09A==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.9.tgz", + "integrity": "sha512-d1lnh+ZnKrFKwtTYdw320+sQWCTwgkB9fmUhNXRADA4akR6wLjaruSGnIEUjpt9HCOwTr4ynFTKu19b7rFRpmw==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4" } }, "@babel/plugin-proposal-class-properties": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.12.1.tgz", - "integrity": "sha512-cKp3dlQsFsEs5CWKnN7BnSHOd0EOW8EKpEjkoz1pO2E5KzIDNV9Ros1b0CnmbVgAGXJubOYVBOGCT1OmJwOI7w==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", + "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", "requires": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.5.tgz", + "integrity": "sha512-KBAH5ksEnYHCegqseI5N9skTdxgJdmDoAOc0uXa+4QMYKeZD0w5IARh4FMlTNtaHhbB8v+KzMdTgxMMzsIy6Yg==", + "peer": true, + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-class-static-block": "^7.14.5" } }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz", - "integrity": "sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", + "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-dynamic-import": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.1.tgz", - "integrity": "sha512-6CThGf0irEkzujYS5LQcjBx8j/4aQGiVv7J9+2f7pGfxqyKh3WnmVJYW3hdrQjyksErMGBPQrCnHfOtna+WLbw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", + "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.12.1.tgz", - "integrity": "sha512-GoLDUi6U9ZLzlSda2Df++VSqDJg3CG+dR0+iWsv6XRw1rEq+zwt4DirM9yrxW6XWaTpmai1cWJLMfM8qQJf+yw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", + "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-json-strings": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.12.1.tgz", - "integrity": "sha512-k8ZmVv0JU+4gcUGeCDZOGd0lCIamU/sMtIiX3UWnUc5yzgq6YUGyEolNYD+MLYKfSzgECPcqetVcJP9Afe/aCA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", + "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.12.1.tgz", - "integrity": "sha512-nZY0ESiaQDI1y96+jk6VxMOaL4LPo/QDHBqL+SF3/vl6dHkTwHlOI8L4ZwuRBHgakRBw5zsVylel7QPbbGuYgg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", + "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.12.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.7.tgz", - "integrity": "sha512-8c+uy0qmnRTeukiGsjLGy6uVs/TFjJchGXUeBqlG4VWYOdJWkhhVPdQ3uHwbmalfJwv2JsV0qffXP4asRfL2SQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", + "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz", - "integrity": "sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA==", + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.7.tgz", + "integrity": "sha512-082hsZz+sVabfmDWo1Oct1u1AgbKbUAyVgmX4otIc7bdsRgHBXwTwb3DpDmD4Eyyx6DNiuz5UAATT655k+kL5g==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-transform-parameters": "^7.12.1" + "@babel/compat-data": "^7.14.7", + "@babel/helper-compilation-targets": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.14.5" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.12.1.tgz", - "integrity": "sha512-hFvIjgprh9mMw5v42sJWLI1lzU5L2sznP805zeT6rySVRA0Y18StRhDqhSxlap0oVgItRsB6WSROp4YnJTJz0g==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", + "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.12.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.7.tgz", - "integrity": "sha512-4ovylXZ0PWmwoOvhU2vhnzVNnm88/Sm9nx7V8BPgMvAzn5zDou3/Awy0EjglyubVHasJj+XCEkr/r1X3P5elCA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", + "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", - "@babel/plugin-syntax-optional-chaining": "^7.8.0" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", + "@babel/plugin-syntax-optional-chaining": "^7.8.3" } }, "@babel/plugin-proposal-private-methods": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.12.1.tgz", - "integrity": "sha512-mwZ1phvH7/NHK6Kf8LP7MYDogGV+DKB1mryFOEwx5EBNQrosvIczzZFTUmWaeujd5xT6G1ELYWUz3CutMhjE1w==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", + "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "peer": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-62EyfyA3WA0mZiF2e2IV9mc9Ghwxcg8YTu8BS4Wss4Y3PY725OmS9M0qLORbJwLqFtGh+jiE4wAmocK2CTUK2Q==", + "peer": true, + "requires": { + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-create-class-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5" } }, "@babel/plugin-proposal-unicode-property-regex": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.1.tgz", - "integrity": "sha512-MYq+l+PvHuw/rKUz1at/vb6nCnQ2gmJBNaM62z0OgH7B2W1D9pvkpYtlti9bGtizNIU1K3zm4bZF9F91efVY0w==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", + "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "peer": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-syntax-async-generators": { @@ -404,18 +15598,37 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, - "@babel/plugin-syntax-class-properties": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.1.tgz", - "integrity": "sha512-U40A76x5gTwmESz+qiqssqmeEsKvcSyvtgktrm0uzcARAmM9I1jR221f6Oq+GmHrcD+LvZDag1UTOTe2fL3TeA==", + "@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", + "dev": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.8.0" + } + }, + "@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "peer": true, + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", + "peer": true, "requires": { "@babel/helper-plugin-utils": "^7.8.0" } @@ -424,10 +15637,28 @@ "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", + "peer": true, "requires": { "@babel/helper-plugin-utils": "^7.8.3" } }, + "@babel/plugin-syntax-flow": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-flow/-/plugin-syntax-flow-7.14.5.tgz", + "integrity": "sha512-9WK5ZwKCdWHxVuU13XNT6X73FGmutAXeor5lGFq6qhOFtMFUF4jkbijuyUdZZlpYq6E2hZeZf/u3959X9wsv0Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.10.4" + } + }, "@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", @@ -484,382 +15715,473 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, - "@babel/plugin-syntax-top-level-await": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.1.tgz", - "integrity": "sha512-i7ooMZFS+a/Om0crxZodrTzNEPJHZrlMVGMTEpFAj6rYY/bKCddB0Dk/YxfPuYXOopuhKk/e1jV6h+WUU9XN3A==", + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-syntax-typescript": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.14.5.tgz", + "integrity": "sha512-u6OXzDaIXjEstBRRoBCQ/uKQKlbuaeE5in0RvWdA4pN6AhqxTIwUsnHPU1CFZA/amYObMsuWhYfRl3Ch90HD0Q==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-arrow-functions": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.12.1.tgz", - "integrity": "sha512-5QB50qyN44fzzz4/qxDPQMBCTHgxg3n0xRBLJUmBlLoU/sFvxVWGZF/ZUfMVDQuJUKXaBhbupxIzIfZ6Fwk/0A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", + "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-async-to-generator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.12.1.tgz", - "integrity": "sha512-SDtqoEcarK1DFlRJ1hHRY5HvJUj5kX4qmtpMAm2QnhOlyuMC4TMdCRgW6WXpv93rZeYNeLP22y8Aq2dbcDRM1A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", + "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", + "peer": true, "requires": { - "@babel/helper-module-imports": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-remap-async-to-generator": "^7.12.1" + "@babel/helper-module-imports": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-remap-async-to-generator": "^7.14.5" } }, "@babel/plugin-transform-block-scoped-functions": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.12.1.tgz", - "integrity": "sha512-5OpxfuYnSgPalRpo8EWGPzIYf0lHBWORCkj5M0oLBwHdlux9Ri36QqGW3/LR13RSVOAoUUMzoPI/jpE4ABcHoA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", + "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-block-scoping": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.12.tgz", - "integrity": "sha512-VOEPQ/ExOVqbukuP7BYJtI5ZxxsmegTwzZ04j1aF0dkSypGo9XpDHuOrABsJu+ie+penpSJheDJ11x1BEZNiyQ==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", + "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-classes": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.12.1.tgz", - "integrity": "sha512-/74xkA7bVdzQTBeSUhLLJgYIcxw/dpEpCdRDiHgPJ3Mv6uC11UhjpOhl72CgqbBCmt1qtssCyB2xnJm1+PFjog==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.9.tgz", + "integrity": "sha512-NfZpTcxU3foGWbl4wxmZ35mTsYJy8oQocbeIMoDAGGFarAmSQlL+LWMkDx/tj6pNotpbX3rltIA4dprgAPOq5A==", + "peer": true, "requires": { - "@babel/helper-annotate-as-pure": "^7.10.4", - "@babel/helper-define-map": "^7.10.4", - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-optimise-call-expression": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1", - "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/helper-annotate-as-pure": "^7.14.5", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-optimise-call-expression": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "peer": true + } } }, "@babel/plugin-transform-computed-properties": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.12.1.tgz", - "integrity": "sha512-vVUOYpPWB7BkgUWPo4C44mUQHpTZXakEqFjbv8rQMg7TC6S6ZhGZ3otQcRH6u7+adSlE5i0sp63eMC/XGffrzg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", + "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-destructuring": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.12.1.tgz", - "integrity": "sha512-fRMYFKuzi/rSiYb2uRLiUENJOKq4Gnl+6qOv5f8z0TZXg3llUwUhsNNwrwaT/6dUhJTzNpBr+CUvEWBtfNY1cw==", + "version": "7.14.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", + "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-dotall-regex": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.12.1.tgz", - "integrity": "sha512-B2pXeRKoLszfEW7J4Hg9LoFaWEbr/kzo3teWHmtFCszjRNa/b40f9mfeqZsIDLLt/FjwQ6pz/Gdlwy85xNckBA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", + "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", + "peer": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-duplicate-keys": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.12.1.tgz", - "integrity": "sha512-iRght0T0HztAb/CazveUpUQrZY+aGKKaWXMJ4uf9YJtqxSUe09j3wteztCUDRHs+SRAL7yMuFqUsLoAKKzgXjw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", + "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-exponentiation-operator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.12.1.tgz", - "integrity": "sha512-7tqwy2bv48q+c1EHbXK0Zx3KXd2RVQp6OC7PbwFNt/dPTAV3Lu5sWtWuAj8owr5wqtWnqHfl2/mJlUmqkChKug==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", + "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", + "peer": true, "requires": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-flow-strip-types": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-flow-strip-types/-/plugin-transform-flow-strip-types-7.14.5.tgz", + "integrity": "sha512-KhcolBKfXbvjwI3TV7r7TkYm8oNXHNBqGOy6JDVwtecFaRoKYsUUqJdS10q0YDKW1c6aZQgO+Ys3LfGkox8pXA==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-flow": "^7.14.5" } }, "@babel/plugin-transform-for-of": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.12.1.tgz", - "integrity": "sha512-Zaeq10naAsuHo7heQvyV0ptj4dlZJwZgNAtBYBnu5nNKJoW62m0zKcIEyVECrUKErkUkg6ajMy4ZfnVZciSBhg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.14.5.tgz", + "integrity": "sha512-CfmqxSUZzBl0rSjpoQSFoR9UEj3HzbGuGNL21/iFTmjb5gFggJp3ph0xR1YBhexmLoKRHzgxuFvty2xdSt6gTA==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-function-name": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.12.1.tgz", - "integrity": "sha512-JF3UgJUILoFrFMEnOJLJkRHSk6LUSXLmEFsA23aR2O5CSLUxbeUX1IZ1YQ7Sn0aXb601Ncwjx73a+FVqgcljVw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", + "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", + "peer": true, "requires": { - "@babel/helper-function-name": "^7.10.4", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-literals": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.12.1.tgz", - "integrity": "sha512-+PxVGA+2Ag6uGgL0A5f+9rklOnnMccwEBzwYFL3EUaKuiyVnUipyXncFcfjSkbimLrODoqki1U9XxZzTvfN7IQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", + "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-member-expression-literals": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.12.1.tgz", - "integrity": "sha512-1sxePl6z9ad0gFMB9KqmYofk34flq62aqMt9NqliS/7hPEpURUCMbyHXrMPlo282iY7nAvUB1aQd5mg79UD9Jg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", + "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-modules-amd": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.12.1.tgz", - "integrity": "sha512-tDW8hMkzad5oDtzsB70HIQQRBiTKrhfgwC/KkJeGsaNFTdWhKNt/BiE8c5yj19XiGyrxpbkOfH87qkNg1YGlOQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", + "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", + "peer": true, "requires": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.12.1.tgz", - "integrity": "sha512-dY789wq6l0uLY8py9c1B48V8mVL5gZh/+PQ5ZPrylPYsnAvnEMjqsUXkuoDVPeVK+0VyGar+D08107LzDQ6pag==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.0.tgz", + "integrity": "sha512-3H/R9s8cXcOGE8kgMlmjYYC9nqr5ELiPkJn4q0mypBrjhYQoc+5/Maq69vV4xRPWnkzZuwJPf5rArxpB/35Cig==", "requires": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-simple-access": "^7.12.1", + "@babel/helper-module-transforms": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-simple-access": "^7.14.8", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-systemjs": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.12.1.tgz", - "integrity": "sha512-Hn7cVvOavVh8yvW6fLwveFqSnd7rbQN3zJvoPNyNaQSvgfKmDBO9U1YL9+PCXGRlZD9tNdWTy5ACKqMuzyn32Q==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.14.5.tgz", + "integrity": "sha512-mNMQdvBEE5DcMQaL5LbzXFMANrQjd2W7FPzg34Y4yEz7dBgdaC+9B84dSO+/1Wba98zoDbInctCDo4JGxz1VYA==", + "peer": true, "requires": { - "@babel/helper-hoist-variables": "^7.10.4", - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-identifier": "^7.10.4", + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-identifier": "^7.14.5", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-umd": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.12.1.tgz", - "integrity": "sha512-aEIubCS0KHKM0zUos5fIoQm+AZUMt1ZvMpqz0/H5qAQ7vWylr9+PLYurT+Ic7ID/bKLd4q8hDovaG3Zch2uz5Q==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", + "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", + "peer": true, "requires": { - "@babel/helper-module-transforms": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-module-transforms": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.12.1.tgz", - "integrity": "sha512-tB43uQ62RHcoDp9v2Nsf+dSM8sbNodbEicbQNA53zHz8pWUhsgHSJCGpt7daXxRydjb0KnfmB+ChXOv3oADp1Q==", + "version": "7.14.9", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", + "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", + "peer": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1" + "@babel/helper-create-regexp-features-plugin": "^7.14.5" } }, "@babel/plugin-transform-new-target": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.12.1.tgz", - "integrity": "sha512-+eW/VLcUL5L9IvJH7rT1sT0CzkdUTvPrXC2PXTn/7z7tXLBuKvezYbGdxD5WMRoyvyaujOq2fWoKl869heKjhw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", + "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-object-super": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.12.1.tgz", - "integrity": "sha512-AvypiGJH9hsquNUn+RXVcBdeE3KHPZexWRdimhuV59cSoOt5kFBmqlByorAeUlGG2CJWd0U+4ZtNKga/TB0cAw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", + "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-replace-supers": "^7.12.1" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-replace-supers": "^7.14.5" } }, "@babel/plugin-transform-parameters": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.12.1.tgz", - "integrity": "sha512-xq9C5EQhdPK23ZeCdMxl8bbRnAgHFrw5EOC3KJUsSylZqdkCaFEXxGSBuTSObOpiiHHNyb82es8M1QYgfQGfNg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.5.tgz", + "integrity": "sha512-Tl7LWdr6HUxTmzQtzuU14SqbgrSKmaR77M0OKyq4njZLQTPfOvzblNKyNkGwOfEFCEx7KeYHQHDI0P3F02IVkA==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-property-literals": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.12.1.tgz", - "integrity": "sha512-6MTCR/mZ1MQS+AwZLplX4cEySjCpnIF26ToWo942nqn8hXSm7McaHQNeGx/pt7suI1TWOWMfa/NgBhiqSnX0cQ==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", + "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-regenerator": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.1.tgz", - "integrity": "sha512-gYrHqs5itw6i4PflFX3OdBPMQdPbF4bj2REIUxlMRUFk0/ZOAIpDFuViuxPjUL7YC8UPnf+XG7/utJvqXdPKng==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", + "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", + "peer": true, "requires": { "regenerator-transform": "^0.14.2" } }, "@babel/plugin-transform-reserved-words": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.12.1.tgz", - "integrity": "sha512-pOnUfhyPKvZpVyBHhSBoX8vfA09b7r00Pmm1sH+29ae2hMTKVmSp4Ztsr8KBKjLjx17H0eJqaRC3bR2iThM54A==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", + "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" - } - }, - "@babel/plugin-transform-runtime": { - "version": "7.12.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.10.tgz", - "integrity": "sha512-xOrUfzPxw7+WDm9igMgQCbO3cJKymX7dFdsgRr1eu9n3KjjyU4pptIXbXPseQDquw+W+RuJEJMHKHNsPNNm3CA==", - "requires": { - "@babel/helper-module-imports": "^7.12.5", - "@babel/helper-plugin-utils": "^7.10.4", - "semver": "^5.5.1" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-shorthand-properties": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.12.1.tgz", - "integrity": "sha512-GFZS3c/MhX1OusqB1MZ1ct2xRzX5ppQh2JU1h2Pnfk88HtFTM+TWQqJNfwkmxtPQtb/s1tk87oENfXJlx7rSDw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", + "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-spread": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.12.1.tgz", - "integrity": "sha512-vuLp8CP0BE18zVYjsEBZ5xoCecMK6LBMMxYzJnh01rxQRvhNhH1csMMmBfNo5tGpGO+NhdSNW2mzIvBu3K1fng==", + "version": "7.14.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", + "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1" + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" } }, "@babel/plugin-transform-sticky-regex": { - "version": "7.12.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.12.7.tgz", - "integrity": "sha512-VEiqZL5N/QvDbdjfYQBhruN0HYjSPjC4XkeqW4ny/jNtH9gcbgaqBIXYEZCNnESMAGs0/K/R7oFGMhOyu/eIxg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", + "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-template-literals": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.12.1.tgz", - "integrity": "sha512-b4Zx3KHi+taXB1dVRBhVJtEPi9h1THCeKmae2qP0YdUHIFhVjtpqqNfxeVAa1xeHVhAy4SbHxEwx5cltAu5apw==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", + "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-typeof-symbol": { - "version": "7.12.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.12.10.tgz", - "integrity": "sha512-JQ6H8Rnsogh//ijxspCjc21YPd3VLVoYtAwv3zQmqAt8YGYUtdo5usNhdl4b9/Vir2kPFZl6n1h0PfUz4hJhaA==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", + "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" + } + }, + "@babel/plugin-transform-typescript": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.15.0.tgz", + "integrity": "sha512-WIIEazmngMEEHDaPTx0IZY48SaAmjVWe3TRSX7cmJXn0bEv9midFzAjxiruOWYIVf5iQ10vFx7ASDpgEO08L5w==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/plugin-syntax-typescript": "^7.14.5" } }, "@babel/plugin-transform-unicode-escapes": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.1.tgz", - "integrity": "sha512-I8gNHJLIc7GdApm7wkVnStWssPNbSRMPtgHdmH3sRM1zopz09UWPS4x5V4n1yz/MIWTVnJ9sp6IkuXdWM4w+2Q==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", + "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", + "peer": true, "requires": { - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/plugin-transform-unicode-regex": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.12.1.tgz", - "integrity": "sha512-SqH4ClNngh/zGwHZOOQMTD+e8FGWexILV+ePMyiDJttAWRh5dhDL8rcl5lSgU3Huiq6Zn6pWTMvdPAb21Dwdyg==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", + "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", + "peer": true, "requires": { - "@babel/helper-create-regexp-features-plugin": "^7.12.1", - "@babel/helper-plugin-utils": "^7.10.4" + "@babel/helper-create-regexp-features-plugin": "^7.14.5", + "@babel/helper-plugin-utils": "^7.14.5" } }, "@babel/preset-env": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.12.11.tgz", - "integrity": "sha512-j8Tb+KKIXKYlDBQyIOy4BLxzv1NUOwlHfZ74rvW+Z0Gp4/cI2IMDPBWAgWceGcE7aep9oL/0K9mlzlMGxA8yNw==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.0.tgz", + "integrity": "sha512-FhEpCNFCcWW3iZLg0L2NPE9UerdtsCR6ZcsGHUX6Om6kbCQeL5QZDqFDmeNHC6/fy6UH3jEge7K4qG5uC9In0Q==", + "peer": true, "requires": { - "@babel/compat-data": "^7.12.7", - "@babel/helper-compilation-targets": "^7.12.5", - "@babel/helper-module-imports": "^7.12.5", - "@babel/helper-plugin-utils": "^7.10.4", - "@babel/helper-validator-option": "^7.12.11", - "@babel/plugin-proposal-async-generator-functions": "^7.12.1", - "@babel/plugin-proposal-class-properties": "^7.12.1", - "@babel/plugin-proposal-dynamic-import": "^7.12.1", - "@babel/plugin-proposal-export-namespace-from": "^7.12.1", - "@babel/plugin-proposal-json-strings": "^7.12.1", - "@babel/plugin-proposal-logical-assignment-operators": "^7.12.1", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1", - "@babel/plugin-proposal-numeric-separator": "^7.12.7", - "@babel/plugin-proposal-object-rest-spread": "^7.12.1", - "@babel/plugin-proposal-optional-catch-binding": "^7.12.1", - "@babel/plugin-proposal-optional-chaining": "^7.12.7", - "@babel/plugin-proposal-private-methods": "^7.12.1", - "@babel/plugin-proposal-unicode-property-regex": "^7.12.1", - "@babel/plugin-syntax-async-generators": "^7.8.0", - "@babel/plugin-syntax-class-properties": "^7.12.1", - "@babel/plugin-syntax-dynamic-import": "^7.8.0", + "@babel/compat-data": "^7.15.0", + "@babel/helper-compilation-targets": "^7.15.0", + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-async-generator-functions": "^7.14.9", + "@babel/plugin-proposal-class-properties": "^7.14.5", + "@babel/plugin-proposal-class-static-block": "^7.14.5", + "@babel/plugin-proposal-dynamic-import": "^7.14.5", + "@babel/plugin-proposal-export-namespace-from": "^7.14.5", + "@babel/plugin-proposal-json-strings": "^7.14.5", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", + "@babel/plugin-proposal-numeric-separator": "^7.14.5", + "@babel/plugin-proposal-object-rest-spread": "^7.14.7", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", + "@babel/plugin-proposal-optional-chaining": "^7.14.5", + "@babel/plugin-proposal-private-methods": "^7.14.5", + "@babel/plugin-proposal-private-property-in-object": "^7.14.5", + "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.0", + "@babel/plugin-syntax-json-strings": "^7.8.3", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.0", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.0", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.0", - "@babel/plugin-syntax-optional-chaining": "^7.8.0", - "@babel/plugin-syntax-top-level-await": "^7.12.1", - "@babel/plugin-transform-arrow-functions": "^7.12.1", - "@babel/plugin-transform-async-to-generator": "^7.12.1", - "@babel/plugin-transform-block-scoped-functions": "^7.12.1", - "@babel/plugin-transform-block-scoping": "^7.12.11", - "@babel/plugin-transform-classes": "^7.12.1", - "@babel/plugin-transform-computed-properties": "^7.12.1", - "@babel/plugin-transform-destructuring": "^7.12.1", - "@babel/plugin-transform-dotall-regex": "^7.12.1", - "@babel/plugin-transform-duplicate-keys": "^7.12.1", - "@babel/plugin-transform-exponentiation-operator": "^7.12.1", - "@babel/plugin-transform-for-of": "^7.12.1", - "@babel/plugin-transform-function-name": "^7.12.1", - "@babel/plugin-transform-literals": "^7.12.1", - "@babel/plugin-transform-member-expression-literals": "^7.12.1", - "@babel/plugin-transform-modules-amd": "^7.12.1", - "@babel/plugin-transform-modules-commonjs": "^7.12.1", - "@babel/plugin-transform-modules-systemjs": "^7.12.1", - "@babel/plugin-transform-modules-umd": "^7.12.1", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.1", - "@babel/plugin-transform-new-target": "^7.12.1", - "@babel/plugin-transform-object-super": "^7.12.1", - "@babel/plugin-transform-parameters": "^7.12.1", - "@babel/plugin-transform-property-literals": "^7.12.1", - "@babel/plugin-transform-regenerator": "^7.12.1", - "@babel/plugin-transform-reserved-words": "^7.12.1", - "@babel/plugin-transform-shorthand-properties": "^7.12.1", - "@babel/plugin-transform-spread": "^7.12.1", - "@babel/plugin-transform-sticky-regex": "^7.12.7", - "@babel/plugin-transform-template-literals": "^7.12.1", - "@babel/plugin-transform-typeof-symbol": "^7.12.10", - "@babel/plugin-transform-unicode-escapes": "^7.12.1", - "@babel/plugin-transform-unicode-regex": "^7.12.1", - "@babel/preset-modules": "^0.1.3", - "@babel/types": "^7.12.11", - "core-js-compat": "^3.8.0", - "semver": "^5.5.0" + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5", + "@babel/plugin-transform-arrow-functions": "^7.14.5", + "@babel/plugin-transform-async-to-generator": "^7.14.5", + "@babel/plugin-transform-block-scoped-functions": "^7.14.5", + "@babel/plugin-transform-block-scoping": "^7.14.5", + "@babel/plugin-transform-classes": "^7.14.9", + "@babel/plugin-transform-computed-properties": "^7.14.5", + "@babel/plugin-transform-destructuring": "^7.14.7", + "@babel/plugin-transform-dotall-regex": "^7.14.5", + "@babel/plugin-transform-duplicate-keys": "^7.14.5", + "@babel/plugin-transform-exponentiation-operator": "^7.14.5", + "@babel/plugin-transform-for-of": "^7.14.5", + "@babel/plugin-transform-function-name": "^7.14.5", + "@babel/plugin-transform-literals": "^7.14.5", + "@babel/plugin-transform-member-expression-literals": "^7.14.5", + "@babel/plugin-transform-modules-amd": "^7.14.5", + "@babel/plugin-transform-modules-commonjs": "^7.15.0", + "@babel/plugin-transform-modules-systemjs": "^7.14.5", + "@babel/plugin-transform-modules-umd": "^7.14.5", + "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", + "@babel/plugin-transform-new-target": "^7.14.5", + "@babel/plugin-transform-object-super": "^7.14.5", + "@babel/plugin-transform-parameters": "^7.14.5", + "@babel/plugin-transform-property-literals": "^7.14.5", + "@babel/plugin-transform-regenerator": "^7.14.5", + "@babel/plugin-transform-reserved-words": "^7.14.5", + "@babel/plugin-transform-shorthand-properties": "^7.14.5", + "@babel/plugin-transform-spread": "^7.14.6", + "@babel/plugin-transform-sticky-regex": "^7.14.5", + "@babel/plugin-transform-template-literals": "^7.14.5", + "@babel/plugin-transform-typeof-symbol": "^7.14.5", + "@babel/plugin-transform-unicode-escapes": "^7.14.5", + "@babel/plugin-transform-unicode-regex": "^7.14.5", + "@babel/preset-modules": "^0.1.4", + "@babel/types": "^7.15.0", + "babel-plugin-polyfill-corejs2": "^0.2.2", + "babel-plugin-polyfill-corejs3": "^0.2.2", + "babel-plugin-polyfill-regenerator": "^0.2.2", + "core-js-compat": "^3.16.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true + } + } + }, + "@babel/preset-flow": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/preset-flow/-/preset-flow-7.14.5.tgz", + "integrity": "sha512-pP5QEb4qRUSVGzzKx9xqRuHUrM/jEzMqdrZpdMA+oUCRgd5zM1qGr5y5+ZgAL/1tVv1H0dyk5t4SKJntqyiVtg==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-flow-strip-types": "^7.14.5" } }, "@babel/preset-modules": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", + "peer": true, "requires": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", @@ -868,50 +16190,123 @@ "esutils": "^2.0.2" } }, + "@babel/preset-typescript": { + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.15.0.tgz", + "integrity": "sha512-lt0Y/8V3y06Wq/8H/u0WakrqciZ7Fz7mwPDHWUJAXlABL5hiUG42BNlRXiELNjeWjO5rWmnNKlx+yzJvxezHow==", + "requires": { + "@babel/helper-plugin-utils": "^7.14.5", + "@babel/helper-validator-option": "^7.14.5", + "@babel/plugin-transform-typescript": "^7.15.0" + } + }, + "@babel/register": { + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/register/-/register-7.15.3.tgz", + "integrity": "sha512-mj4IY1ZJkorClxKTImccn4T81+UKTo4Ux0+OFSV9hME1ooqS9UV+pJ6BjD0qXPK4T3XW/KNa79XByjeEMZz+fw==", + "requires": { + "clone-deep": "^4.0.1", + "find-cache-dir": "^2.0.0", + "make-dir": "^2.1.0", + "pirates": "^4.0.0", + "source-map-support": "^0.5.16" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } + } + }, "@babel/runtime": { - "version": "7.12.5", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.12.5.tgz", - "integrity": "sha512-plcc+hbExy3McchJCEQG3knOsuh3HH+Prx1P6cLIkET/0dLuQDEnrT+s27Axgc9bqfsmNUNHfscgMUdBpC9xfg==", + "version": "7.15.3", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", + "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", "requires": { "regenerator-runtime": "^0.13.4" } }, "@babel/template": { - "version": "7.12.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.12.7.tgz", - "integrity": "sha512-GkDzmHS6GV7ZeXfJZ0tLRBhZcMcY0/Lnb+eEbXDBfCAcZCjrZKe6p3J4we/D24O9Y8enxWAg1cWwof59yLh2ow==", + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.14.5.tgz", + "integrity": "sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g==", "requires": { - "@babel/code-frame": "^7.10.4", - "@babel/parser": "^7.12.7", - "@babel/types": "^7.12.7" + "@babel/code-frame": "^7.14.5", + "@babel/parser": "^7.14.5", + "@babel/types": "^7.14.5" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "requires": { + "@babel/highlight": "^7.14.5" + } + } } }, "@babel/traverse": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz", - "integrity": "sha512-s88i0X0lPy45RrLM8b9mz8RPH5FqO9G9p7ti59cToE44xFm1Q+Pjh5Gq4SXBbtb88X7Uy7pexeqRIQDDMNkL0w==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.0.tgz", + "integrity": "sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw==", "requires": { - "@babel/code-frame": "^7.12.11", - "@babel/generator": "^7.12.11", - "@babel/helper-function-name": "^7.12.11", - "@babel/helper-split-export-declaration": "^7.12.11", - "@babel/parser": "^7.12.11", - "@babel/types": "^7.12.12", + "@babel/code-frame": "^7.14.5", + "@babel/generator": "^7.15.0", + "@babel/helper-function-name": "^7.14.5", + "@babel/helper-hoist-variables": "^7.14.5", + "@babel/helper-split-export-declaration": "^7.14.5", + "@babel/parser": "^7.15.0", + "@babel/types": "^7.15.0", "debug": "^4.1.0", - "globals": "^11.1.0", - "lodash": "^4.17.19" + "globals": "^11.1.0" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "requires": { + "@babel/highlight": "^7.14.5" + } + }, + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + } } }, "@babel/types": { - "version": "7.12.12", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.12.12.tgz", - "integrity": "sha512-lnIX7piTxOH22xE7fDXDbSHg9MM1/6ORnafpJmov5rs0kX5g4BZxeXNJLXsMRiO0U5Rb8/FvMS6xlTnTHvxonQ==", + "version": "7.15.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", + "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.9", "to-fast-properties": "^2.0.0" } }, + "@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, "@braintree/sanitize-url": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz", @@ -920,97 +16315,642 @@ "@claviska/jquery-minicolors": { "version": "2.3.5", "resolved": "https://registry.npmjs.org/@claviska/jquery-minicolors/-/jquery-minicolors-2.3.5.tgz", - "integrity": "sha512-LpiN8hyqRPYB2tEzFD4lI54GxKHQXhzrJMnKnsumElYxjkjbdAPmiIm+1k/Mkfn92HepL7t9uaK5iQSFP/19aw==" + "integrity": "sha512-LpiN8hyqRPYB2tEzFD4lI54GxKHQXhzrJMnKnsumElYxjkjbdAPmiIm+1k/Mkfn92HepL7t9uaK5iQSFP/19aw==", + "requires": {} }, "@discoveryjs/json-ext": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.2.tgz", - "integrity": "sha512-HyYEUDeIj5rRQU2Hk5HTB2uHsbRQpF70nvMhVzi+VJR0X+xNEhjPui4/kBf3VeH/wqD28PT4sVOm8qqLjBrSZg==" + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz", + "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==" }, "@eslint/eslintrc": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", - "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz", + "integrity": "sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw==", "dev": true, "requires": { "ajv": "^6.12.4", "debug": "^4.1.1", "espree": "^7.3.0", - "globals": "^12.1.0", + "globals": "^13.9.0", "ignore": "^4.0.6", "import-fresh": "^3.2.1", "js-yaml": "^3.13.1", - "lodash": "^4.17.19", "minimatch": "^3.0.4", "strip-json-comments": "^3.1.1" + } + }, + "@humanwhocodes/config-array": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.5.0.tgz", + "integrity": "sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^1.2.0", + "debug": "^4.1.1", + "minimatch": "^3.0.4" + } + }, + "@humanwhocodes/object-schema": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz", + "integrity": "sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w==", + "dev": true + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, "dependencies": { - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, "requires": { - "type-fest": "^0.8.1" + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" } }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" + "p-locate": "^4.1.0" } }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", "dev": true } } }, - "@nodelib/fs.scandir": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", - "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.0.6.tgz", + "integrity": "sha512-fMlIBocSHPZ3JxgWiDNW/KPj6s+YRd0hicb33IrmelCcjXo/pXPwvuiKFmZz+XuqI/1u7nbUK10zSsWL/1aegg==", + "dev": true, "requires": { - "@nodelib/fs.stat": "2.0.3", + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^27.0.6", + "jest-util": "^27.0.6", + "slash": "^3.0.0" + } + }, + "@jest/core": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.0.6.tgz", + "integrity": "sha512-SsYBm3yhqOn5ZLJCtccaBcvD/ccTLCeuDv8U41WJH/V1MW5eKUkeMHT9U+Pw/v1m1AIWlnIW/eM2XzQr0rEmow==", + "dev": true, + "requires": { + "@jest/console": "^27.0.6", + "@jest/reporters": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-changed-files": "^27.0.6", + "jest-config": "^27.0.6", + "jest-haste-map": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-resolve-dependencies": "^27.0.6", + "jest-runner": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "jest-watcher": "^27.0.6", + "micromatch": "^4.0.4", + "p-each-series": "^2.1.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "@jest/environment": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-27.0.6.tgz", + "integrity": "sha512-4XywtdhwZwCpPJ/qfAkqExRsERW+UaoSRStSHCCiQTUpoYdLukj+YJbQSFrZjhlUDRZeNiU9SFH0u7iNimdiIg==", + "dev": true, + "requires": { + "@jest/fake-timers": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "jest-mock": "^27.0.6" + } + }, + "@jest/fake-timers": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-27.0.6.tgz", + "integrity": "sha512-sqd+xTWtZ94l3yWDKnRTdvTeZ+A/V7SSKrxsrOKSqdyddb9CeNRF8fbhAU0D7ZJBpTTW2nbp6MftmKJDZfW2LQ==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "@sinonjs/fake-timers": "^7.0.2", + "@types/node": "*", + "jest-message-util": "^27.0.6", + "jest-mock": "^27.0.6", + "jest-util": "^27.0.6" + } + }, + "@jest/globals": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-27.0.6.tgz", + "integrity": "sha512-DdTGCP606rh9bjkdQ7VvChV18iS7q0IMJVP1piwTWyWskol4iqcVwthZmoJEf7obE1nc34OpIyoVGPeqLC+ryw==", + "dev": true, + "requires": { + "@jest/environment": "^27.0.6", + "@jest/types": "^27.0.6", + "expect": "^27.0.6" + } + }, + "@jest/reporters": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-27.0.6.tgz", + "integrity": "sha512-TIkBt09Cb2gptji3yJXb3EE+eVltW6BjO7frO7NEfjI9vSIYoISi5R3aI3KpEDXlB1xwB+97NXIqz84qYeYsfA==", + "dev": true, + "requires": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.2", + "graceful-fs": "^4.2.4", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^4.0.3", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "jest-haste-map": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-util": "^27.0.6", + "jest-worker": "^27.0.6", + "slash": "^3.0.0", + "source-map": "^0.6.0", + "string-length": "^4.0.1", + "terminal-link": "^2.0.0", + "v8-to-istanbul": "^8.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/source-map": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-27.0.6.tgz", + "integrity": "sha512-Fek4mi5KQrqmlY07T23JRi0e7Z9bXTOOD86V/uS0EIW4PClvPDqZOyFlLpNJheS6QI0FNX1CgmPjtJ4EA/2M+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.2.4", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/test-result": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-27.0.6.tgz", + "integrity": "sha512-ja/pBOMTufjX4JLEauLxE3LQBPaI2YjGFtXexRAjt1I/MbfNlMx0sytSX3tn5hSLzQsR3Qy2rd0hc1BWojtj9w==", + "dev": true, + "requires": { + "@jest/console": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/istanbul-lib-coverage": "^2.0.0", + "collect-v8-coverage": "^1.0.0" + } + }, + "@jest/test-sequencer": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-27.0.6.tgz", + "integrity": "sha512-bISzNIApazYOlTHDum9PwW22NOyDa6VI31n6JucpjTVM0jD6JDgqEZ9+yn575nDdPF0+4csYDxNNW13NvFQGZA==", + "dev": true, + "requires": { + "@jest/test-result": "^27.0.6", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^27.0.6", + "jest-runtime": "^27.0.6" + } + }, + "@jest/transform": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-27.0.6.tgz", + "integrity": "sha512-rj5Dw+mtIcntAUnMlW/Vju5mr73u8yg+irnHwzgtgoeI6cCPOvUwQ0D1uQtc/APmWgvRweEb1g05pkUpxH3iCA==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/types": "^27.0.6", + "babel-plugin-istanbul": "^6.0.0", + "chalk": "^4.0.0", + "convert-source-map": "^1.4.0", + "fast-json-stable-stringify": "^2.0.0", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-util": "^27.0.6", + "micromatch": "^4.0.4", + "pirates": "^4.0.1", + "slash": "^3.0.0", + "source-map": "^0.6.1", + "write-file-atomic": "^3.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@jest/types": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-27.0.6.tgz", + "integrity": "sha512-aSquT1qa9Pik26JK5/3rvnYb4bGtm1VFNesHKmNTwmPIgOrixvhL2ghIvFRNEpzy3gU+rUgjIF/KodbkFAl++g==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^3.0.0", + "@types/node": "*", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0" + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "requires": { + "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "@nodelib/fs.stat": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", - "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==" + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==" }, "@nodelib/fs.walk": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", - "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", "requires": { - "@nodelib/fs.scandir": "2.1.3", + "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, - "@npmcli/move-file": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-1.0.1.tgz", - "integrity": "sha512-Uv6h1sT+0DrblvIrolFtbvM1FgWm+/sy4B3pvLp67Zys+thcukzS5ekn7HsZFGpWP4Q3fYJCljbWQE/XivMRLw==", + "@oclif/command": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@oclif/command/-/command-1.8.0.tgz", + "integrity": "sha512-5vwpq6kbvwkQwKqAoOU3L72GZ3Ta8RRrewKj9OJRolx28KLJJ8Dg9Rf7obRwt5jQA9bkYd8gqzMTrI7H3xLfaw==", "requires": { - "mkdirp": "^1.0.4" + "@oclif/config": "^1.15.1", + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.3", + "@oclif/plugin-help": "^3", + "debug": "^4.1.1", + "semver": "^7.3.2" + } + }, + "@oclif/config": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@oclif/config/-/config-1.17.0.tgz", + "integrity": "sha512-Lmfuf6ubjQ4ifC/9bz1fSCHc6F6E653oyaRXxg+lgT4+bYf9bk+nqrUpAbrXyABkCqgIBiFr3J4zR/kiFdE1PA==", + "requires": { + "@oclif/errors": "^1.3.3", + "@oclif/parser": "^3.8.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-wsl": "^2.1.1", + "tslib": "^2.0.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@oclif/errors": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@oclif/errors/-/errors-1.3.5.tgz", + "integrity": "sha512-OivucXPH/eLLlOT7FkCMoZXiaVYf8I/w1eTAM1+gKzfhALwWTusxEx7wBmW0uzvkSg/9ovWLycPaBgJbM3LOCQ==", + "requires": { + "clean-stack": "^3.0.0", + "fs-extra": "^8.1", + "indent-string": "^4.0.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "@oclif/linewrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@oclif/linewrap/-/linewrap-1.0.0.tgz", + "integrity": "sha512-Ups2dShK52xXa8w6iBWLgcjPJWjais6KPJQq3gQ/88AY6BXoTX+MIGFPrWQO1KLMiQfoTpcLnUwloN4brrVUHw==" + }, + "@oclif/parser": { + "version": "3.8.5", + "resolved": "https://registry.npmjs.org/@oclif/parser/-/parser-3.8.5.tgz", + "integrity": "sha512-yojzeEfmSxjjkAvMRj0KzspXlMjCfBzNRPkWw8ZwOSoNWoJn+OCS/m/S+yfV6BvAM4u2lTzX9Y5rCbrFIgkJLg==", + "requires": { + "@oclif/errors": "^1.2.2", + "@oclif/linewrap": "^1.0.0", + "chalk": "^2.4.2", + "tslib": "^1.9.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@oclif/plugin-help": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-3.2.3.tgz", + "integrity": "sha512-l2Pd0lbOMq4u/7xsl9hqISFqyR9gWEz/8+05xmrXFr67jXyS6EUCQB+mFBa0wepltrmJu0sAFg9AvA2mLaMMqQ==", + "requires": { + "@oclif/command": "^1.5.20", + "@oclif/config": "^1.15.1", + "@oclif/errors": "^1.2.2", + "chalk": "^4.1.0", + "indent-string": "^4.0.0", + "lodash.template": "^4.4.0", + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^4.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=" + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" + }, + "wrap-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-4.0.0.tgz", + "integrity": "sha512-uMTsj9rDb0/7kk1PbcbCcwvHUxp60fGDB/NNXpVa0Q+ic/e7y5+BwTxKfQ33VYgDppSwi/FBzpetYzo8s6tfbg==", + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0" + }, + "dependencies": { + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + } + } + }, + "@percy/config": { + "version": "1.0.0-beta.65", + "resolved": "https://registry.npmjs.org/@percy/config/-/config-1.0.0-beta.65.tgz", + "integrity": "sha512-q6mkrBq+nmDtIDj793lNIodEYmc5wVE7ZwsQ2kNRQIAq4aiIIrD8L5CfhEOSYQ5OzhFq+qUjcZK5GptmheF0sw==", + "requires": { + "@percy/logger": "1.0.0-beta.65", + "ajv": "^8.6.2", + "cosmiconfig": "^7.0.0", + "yaml": "^1.10.0" + }, + "dependencies": { + "ajv": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" + } + } + }, + "@percy/logger": { + "version": "1.0.0-beta.65", + "resolved": "https://registry.npmjs.org/@percy/logger/-/logger-1.0.0-beta.65.tgz", + "integrity": "sha512-BJV0pjNlvcj4Y3nuMUGdb5RhjMduK40fRJJ9Lh/2qNk3pmnkGb9rH+GY+/0WY7quupNKxQjjyXcIP7I46/azNg==" + }, + "@percy/migrate": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@percy/migrate/-/migrate-0.10.0.tgz", + "integrity": "sha512-3vOmOPmEeMlIZyCEDClZ2VER+4LH/Zp/YhvLkZeKH9RKxbktROF4Dnfs1u3m4YQ1gglerqK6VXFJfOjLJGyVuw==", + "requires": { + "@oclif/command": "^1.8.0", + "@oclif/config": "^1.17.0", + "@oclif/plugin-help": "^3.2.0", + "@percy/config": "^1.0.0-beta.36", + "@percy/logger": "^1.0.0-beta.36", + "cross-spawn": "^7.0.3", + "inquirer": "^8.0.0", + "inquirer-glob-prompt": "^0.1.0", + "jscodeshift": "^0.11.0", + "semver": "^7.3.4" } }, "@primer/octicons": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-11.2.0.tgz", - "integrity": "sha512-a9ORJaeu7Kt0LCaawQy8S+ZVPDe1qXJvKZraX0b6R0KXkXjL519rpGUDRiGUlskuxEpVf2kmbVYfqGDDlMGLMg==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/@primer/octicons/-/octicons-15.0.1.tgz", + "integrity": "sha512-mp1OkOq0tAknXPLGAUPxiMac3HCj4LPPbAfmj847AWb2Tej33YFjUfGA1S2wXmiyP0MARoIdWtrsXt7UCBdVeQ==", "requires": { "object-assign": "^4.1.1" } }, + "@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "requires": { + "type-detect": "4.0.8" + } + }, + "@sinonjs/fake-timers": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", + "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", + "dev": true, + "requires": { + "@sinonjs/commons": "^1.7.0" + } + }, "@stylelint/postcss-css-in-js": { "version": "0.37.2", "resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz", @@ -1030,99 +16970,272 @@ "unist-util-find-all-after": "^3.0.2" } }, + "@tootallnate/once": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-1.1.2.tgz", + "integrity": "sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw==", + "dev": true + }, + "@trysound/sax": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@trysound/sax/-/sax-0.1.1.tgz", + "integrity": "sha512-Z6DoceYb/1xSg5+e+ZlPZ9v0N16ZvZ+wYMraFue4HYrE4ttONKtsvruIRf6t9TBR0YvSOfi1hUU0fJfBLCDYow==", + "dev": true + }, + "@types/babel__core": { + "version": "7.1.15", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.15.tgz", + "integrity": "sha512-bxlMKPDbY8x5h6HBwVzEOk2C8fb6SLfYQ5Jw3uBYuYF1lfWk/kbLd81la82vrIkBb0l+JdmrZaDikPrNxpS/Ew==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "@types/babel__generator": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.3.tgz", + "integrity": "sha512-/GWCmzJWqV7diQW54smJZzWbSFf4QYtF71WCKhcx6Ru/tFyQIY2eiiITcCAeuPbNSvT9YCGkVMqqvSk2Z0mXiA==", + "dev": true, + "requires": { + "@babel/types": "^7.0.0" + } + }, + "@types/babel__template": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.1.tgz", + "integrity": "sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==", + "dev": true, + "requires": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "@types/babel__traverse": { + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.14.2.tgz", + "integrity": "sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA==", + "dev": true, + "requires": { + "@babel/types": "^7.3.0" + } + }, + "@types/codemirror": { + "version": "0.0.109", + "resolved": "https://registry.npmjs.org/@types/codemirror/-/codemirror-0.0.109.tgz", + "integrity": "sha512-cSdiHeeLjvGn649lRTNeYrVCDOgDrtP+bDDSFDd1TF+i0jKGPDRozno2NOJ9lTniso+taiv4kiVS8dgM8Jm5lg==", + "requires": { + "@types/tern": "*" + } + }, "@types/eslint": { - "version": "7.2.6", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.2.6.tgz", - "integrity": "sha512-I+1sYH+NPQ3/tVqCeUSBwTE/0heyvtXqpIopUUArlBm0Kpocb8FbMa3AZ/ASKIFpN3rnEx932TTXDbt9OXsNDw==", + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", + "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", "requires": { "@types/estree": "*", "@types/json-schema": "*" } }, "@types/eslint-scope": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.0.tgz", - "integrity": "sha512-O/ql2+rrCUe2W2rs7wMR+GqPRcgB6UiqN5RhrR5xruFlY7l9YLMn0ZkDzjoHLeiFkR8MCQZVudUuuvQ2BLC9Qw==", + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", "requires": { "@types/eslint": "*", "@types/estree": "*" } }, "@types/estree": { - "version": "0.0.45", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.45.tgz", - "integrity": "sha512-jnqIUKDUqJbDIUxm0Uj7bnlMnRm1T/eZ9N+AVMqhPgzrba2GhGG5o/jCTwmdPK709nEZsGoMzXEDUjcXHa3W0g==" + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==" }, - "@types/json-schema": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.6.tgz", - "integrity": "sha512-3c+yGKvVP5Y9TYBEibGNR+kLtijnj7mYrXRg+WpFb2X9xm04g/DXYkfg4hmzJQosc9snFNUPkbYIhu+KAm6jJw==" + "@types/graceful-fs": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.5.tgz", + "integrity": "sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==", + "dev": true, + "requires": { + "@types/node": "*" + } }, - "@types/json5": { - "version": "0.0.29", - "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", - "integrity": "sha1-7ihweulOEdK4J7y+UnC86n8+ce4=", + "@types/istanbul-lib-coverage": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.3.tgz", + "integrity": "sha512-sz7iLqvVUg1gIedBOvlkxPlc8/uVzyS5OwGz1cKjXzkl3FpL3al0crU8YGU1WoHkxn0Wxbw5tyi6hvzJKNzFsw==", "dev": true }, + "@types/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*" + } + }, + "@types/istanbul-reports": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz", + "integrity": "sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw==", + "dev": true, + "requires": { + "@types/istanbul-lib-report": "*" + } + }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==" + }, + "@types/marked": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-2.0.4.tgz", + "integrity": "sha512-L9VRSe0Id8xbPL99mUo/4aKgD7ZoRwFZqUQScNKHi2pFjF9ZYSMNShUHD6VlMT6J/prQq0T1mxuU25m3R7dFzg==" + }, "@types/mdast": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.3.tgz", - "integrity": "sha512-SXPBMnFVQg1s00dlMCc/jCdvPqdE4mXaMMCeRlxLDmTAEoegHT53xKtkDnzDTOcmMHUfcjyf36/YYZ6SxRdnsw==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.7.tgz", + "integrity": "sha512-YwR7OK8aPmaBvMMUi+pZXBNoW2unbVbfok4YRqGMJBe1dpDlzpRkJrYEYmvjxgs5JhuQmKfDexrN98u941Zasg==", "dev": true, "requires": { "@types/unist": "*" } }, "@types/minimist": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.1.tgz", - "integrity": "sha512-fZQQafSREFyuZcdWFAExYjBiCL7AUCdgsk80iO0q4yihYYdcIiH28CcuPTGFgLOCC8RlW49GSQxdHwZP+I7CNg==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", "dev": true }, "@types/node": { - "version": "14.14.16", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.16.tgz", - "integrity": "sha512-naXYePhweTi+BMv11TgioE2/FXU4fSl29HAH1ffxVciNsH3rYXjNP2yM8wqmSm7jS20gM8TIklKiTen+1iVncw==" + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", + "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==" }, "@types/normalize-package-data": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.0.tgz", - "integrity": "sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==", + "integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==" + }, + "@types/prettier": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/@types/prettier/-/prettier-2.3.2.tgz", + "integrity": "sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog==", "dev": true }, - "@types/q": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", - "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==" + "@types/stack-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz", + "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==", + "dev": true + }, + "@types/tern": { + "version": "0.23.4", + "resolved": "https://registry.npmjs.org/@types/tern/-/tern-0.23.4.tgz", + "integrity": "sha512-JAUw1iXGO1qaWwEOzxTKJZ/5JxVeON9kvGZ/osgZaJImBnyjyn0cjovPsf6FNLmyGY8Vw9DoXZCMlfMkMwHRWg==", + "requires": { + "@types/estree": "*" + } }, "@types/unist": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.3.tgz", - "integrity": "sha512-FvUupuM3rlRsRtCN+fDudtmytGO6iHJuuRKS1Ss0pG5z8oX0diNEw94UEL7hgDbpN94rgaK5R7sWm6RrSkZuAQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz", + "integrity": "sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==", + "dev": true + }, + "@types/yargs": { + "version": "16.0.4", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-16.0.4.tgz", + "integrity": "sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "@types/yargs-parser": { + "version": "20.2.1", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-20.2.1.tgz", + "integrity": "sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw==", "dev": true }, "@vue/component-compiler-utils": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.0.tgz", - "integrity": "sha512-lejBLa7xAMsfiZfNp7Kv51zOzifnb29FwdnMLa96z26kXErPFioSf9BMcePVIQ6/Gc6/mC0UrPpxAWIHyae0vw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/@vue/component-compiler-utils/-/component-compiler-utils-3.2.2.tgz", + "integrity": "sha512-rAYMLmgMuqJFWAOb3Awjqqv5X3Q3hVr4jH/kgrFJpiU0j3a90tnNBplqbj+snzrgZhC9W128z+dtgMifOiMfJg==", "requires": { "consolidate": "^0.15.1", "hash-sum": "^1.0.2", "lru-cache": "^4.1.2", "merge-source-map": "^1.1.0", - "postcss": "^7.0.14", + "postcss": "^7.0.36", "postcss-selector-parser": "^6.0.2", "prettier": "^1.18.2", "source-map": "~0.6.1", "vue-template-es2015-compiler": "^1.9.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + }, "lru-cache": { "version": "4.1.5", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", @@ -1133,9 +17246,9 @@ } }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "requires": { "chalk": "^2.4.2", "source-map": "^0.6.1", @@ -1163,174 +17276,155 @@ } }, "@webassemblyjs/ast": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.1.tgz", - "integrity": "sha512-uMu1nCWn2Wxyy126LlGqRVlhdTOsO/bsBRI4dNq3+6SiSuRKRQX6ejjKgh82LoGAPSq72lDUiQ4FWVaf0PecYw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", "requires": { - "@webassemblyjs/helper-module-context": "1.9.1", - "@webassemblyjs/helper-wasm-bytecode": "1.9.1", - "@webassemblyjs/wast-parser": "1.9.1" + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.1.tgz", - "integrity": "sha512-5VEKu024RySmLKTTBl9q1eO/2K5jk9ZS+2HXDBLA9s9p5IjkaXxWiDb/+b7wSQp6FRdLaH1IVGIfOex58Na2pg==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==" }, "@webassemblyjs/helper-api-error": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.1.tgz", - "integrity": "sha512-y1lGmfm38djrScwpeL37rRR9f1D6sM8RhMpvM7CYLzOlHVboouZokXK/G88BpzW0NQBSvCCOnW5BFhten4FPfA==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==" }, "@webassemblyjs/helper-buffer": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.1.tgz", - "integrity": "sha512-uS6VSgieHbk/m4GSkMU5cqe/5TekdCzQso4revCIEQ3vpGZgqSSExi4jWpTWwDpAHOIAb1Jfrs0gUB9AA4n71w==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==" }, - "@webassemblyjs/helper-code-frame": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.1.tgz", - "integrity": "sha512-ZQ2ZT6Evk4DPIfD+92AraGYaFIqGm4U20e7FpXwl7WUo2Pn1mZ1v8VGH8i+Y++IQpxPbQo/UyG0Khs7eInskzA==", + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", "requires": { - "@webassemblyjs/wast-printer": "1.9.1" - } - }, - "@webassemblyjs/helper-fsm": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.1.tgz", - "integrity": "sha512-J32HGpveEqqcKFS0YbgicB0zAlpfIxJa5MjxDxhu3i5ltPcVfY5EPvKQ1suRguFPehxiUs+/hfkwPEXom/l0lw==" - }, - "@webassemblyjs/helper-module-context": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.1.tgz", - "integrity": "sha512-IEH2cMmEQKt7fqelLWB5e/cMdZXf2rST1JIrzWmf4XBt3QTxGdnnLvV4DYoN8pJjOx0VYXsWg+yF16MmJtolZg==", - "requires": { - "@webassemblyjs/ast": "1.9.1" + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" } }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.1.tgz", - "integrity": "sha512-i2rGTBqFUcSXxyjt2K4vm/3kkHwyzG6o427iCjcIKjOqpWH8SEem+xe82jUk1iydJO250/CvE5o7hzNAMZf0dQ==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==" }, "@webassemblyjs/helper-wasm-section": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.1.tgz", - "integrity": "sha512-FetqzjtXZr2d57IECK+aId3D0IcGweeM0CbAnJHkYJkcRTHP+YcMb7Wmc0j21h5UWBpwYGb9dSkK/93SRCTrGg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", "requires": { - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/helper-buffer": "1.9.1", - "@webassemblyjs/helper-wasm-bytecode": "1.9.1", - "@webassemblyjs/wasm-gen": "1.9.1" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" } }, "@webassemblyjs/ieee754": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.1.tgz", - "integrity": "sha512-EvTG9M78zP1MmkBpUjGQHZc26DzPGZSLIPxYHCjQsBMo60Qy2W34qf8z0exRDtxBbRIoiKa5dFyWer/7r1aaSQ==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.1.tgz", - "integrity": "sha512-Oc04ub0vFfLnF+2/+ki3AE+anmW4sv9uNBqb+79fgTaPv6xJsOT0dhphNfL3FrME84CbX/D1T9XT8tjFo0IIiw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", "requires": { "@xtuc/long": "4.2.2" } }, "@webassemblyjs/utf8": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.1.tgz", - "integrity": "sha512-llkYtppagjCodFjo0alWOUhAkfOiQPQDIc5oA6C9sFAXz7vC9QhZf/f8ijQIX+A9ToM3c9Pq85X0EX7nx9gVhg==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==" }, "@webassemblyjs/wasm-edit": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.1.tgz", - "integrity": "sha512-S2IaD6+x9B2Xi8BCT0eGsrXXd8UxAh2LVJpg1ZMtHXnrDcsTtIX2bDjHi40Hio6Lc62dWHmKdvksI+MClCYbbw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", "requires": { - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/helper-buffer": "1.9.1", - "@webassemblyjs/helper-wasm-bytecode": "1.9.1", - "@webassemblyjs/helper-wasm-section": "1.9.1", - "@webassemblyjs/wasm-gen": "1.9.1", - "@webassemblyjs/wasm-opt": "1.9.1", - "@webassemblyjs/wasm-parser": "1.9.1", - "@webassemblyjs/wast-printer": "1.9.1" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" } }, "@webassemblyjs/wasm-gen": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.1.tgz", - "integrity": "sha512-bqWI0S4lBQsEN5FTZ35vYzfKUJvtjNnBobB1agCALH30xNk1LToZ7Z8eiaR/Z5iVECTlBndoRQV3F6mbEqE/fg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", "requires": { - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/helper-wasm-bytecode": "1.9.1", - "@webassemblyjs/ieee754": "1.9.1", - "@webassemblyjs/leb128": "1.9.1", - "@webassemblyjs/utf8": "1.9.1" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" } }, "@webassemblyjs/wasm-opt": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.1.tgz", - "integrity": "sha512-gSf7I7YWVXZ5c6XqTEqkZjVs8K1kc1k57vsB6KBQscSagDNbAdxt6MwuJoMjsE1yWY1tsuL+pga268A6u+Fdkg==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", "requires": { - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/helper-buffer": "1.9.1", - "@webassemblyjs/wasm-gen": "1.9.1", - "@webassemblyjs/wasm-parser": "1.9.1" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" } }, "@webassemblyjs/wasm-parser": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.1.tgz", - "integrity": "sha512-ImM4N2T1MEIond0MyE3rXvStVxEmivQrDKf/ggfh5pP6EHu3lL/YTAoSrR7shrbKNPpeKpGesW1LIK/L4kqduw==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", "requires": { - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/helper-api-error": "1.9.1", - "@webassemblyjs/helper-wasm-bytecode": "1.9.1", - "@webassemblyjs/ieee754": "1.9.1", - "@webassemblyjs/leb128": "1.9.1", - "@webassemblyjs/utf8": "1.9.1" - } - }, - "@webassemblyjs/wast-parser": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.1.tgz", - "integrity": "sha512-2xVxejXSvj3ls/o2TR/zI6p28qsGupjHhnHL6URULQRcXmryn3w7G83jQMcT7PHqUfyle65fZtWLukfdLdE7qw==", - "requires": { - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/floating-point-hex-parser": "1.9.1", - "@webassemblyjs/helper-api-error": "1.9.1", - "@webassemblyjs/helper-code-frame": "1.9.1", - "@webassemblyjs/helper-fsm": "1.9.1", - "@xtuc/long": "4.2.2" + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" } }, "@webassemblyjs/wast-printer": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.1.tgz", - "integrity": "sha512-tDV8V15wm7mmbAH6XvQRU1X+oPGmeOzYsd6h7hlRLz6QpV4Ec/KKxM8OpLtFmQPLCreGxTp+HuxtH4pRIZyL9w==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", "requires": { - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/wast-parser": "1.9.1", + "@webassemblyjs/ast": "1.11.1", "@xtuc/long": "4.2.2" } }, + "@webpack-cli/configtest": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz", + "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==", + "requires": {} + }, "@webpack-cli/info": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.2.0.tgz", - "integrity": "sha512-+wA8lBKopgKmN76BSGJVJby5ZXDlsrO6p/nm7fUBsHznRNWB/ozotJP7Yfcz8JPfqeG2LxwYlTH2u6D9a/0XAw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz", + "integrity": "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w==", "requires": { "envinfo": "^7.7.3" } }, "@webpack-cli/serve": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.2.0.tgz", - "integrity": "sha512-jI3P7jMp/AXDSPkM+ClwRcJZbxnlvNC8bVZBmyRr4scMMZ4p5WQcXkw3Q+Hc7RQekomJlBMN+UQGliT4hhG8Vw==" + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.2.tgz", + "integrity": "sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw==", + "requires": {} }, "@xtuc/ieee754": { "version": "1.2.0", @@ -1342,29 +17436,54 @@ "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, + "abab": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.5.tgz", + "integrity": "sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q==", + "dev": true + }, "acorn": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.0.4.tgz", - "integrity": "sha512-XNP0PqF1XD19ZlLKvB7cMmnZswW4C/03pRHgirB30uSJTaS3A3V1/P4sS3HPvFmjoriPCJQs+JDSbm4bL1TxGQ==" + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-globals": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/acorn-globals/-/acorn-globals-6.0.0.tgz", + "integrity": "sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-walk": "^7.1.1" + } }, "acorn-jsx": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", - "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "requires": {} + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", "dev": true }, "add-asset-webpack-plugin": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/add-asset-webpack-plugin/-/add-asset-webpack-plugin-2.0.0.tgz", - "integrity": "sha512-Vx+MuIwT+IvtSZr4amGLjwu3hI8V2uhA4xYR5X5W6z13FRu5kuAOyEY+YLAvywPtCZS8v/JdVUyiwqHHa68Nyw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/add-asset-webpack-plugin/-/add-asset-webpack-plugin-2.0.1.tgz", + "integrity": "sha512-Hx9EKnirCUfdh684y1yhx8QOFolpkIG2VRHHgNm8wFy1Cf7P3RGwS678hoN7Y1XvZRPpVXWa+6QnfL/2i0CMCA==", + "requires": {} }, - "aggregate-error": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", - "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, "requires": { - "clean-stack": "^2.0.0", - "indent-string": "^4.0.0" + "debug": "4" } }, "ajv": { @@ -1381,17 +17500,29 @@ "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==" - }, - "alphanum-sort": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz", - "integrity": "sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM=" + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "requires": {} }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==" + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "requires": { + "type-fest": "^0.21.3" + }, + "dependencies": { + "type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==" + } + } }, "ansi-regex": { "version": "5.0.0", @@ -1399,44 +17530,74 @@ "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==" }, "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "requires": { - "color-convert": "^1.9.0" + "color-convert": "^2.0.1" + } + }, + "anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" } }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, "requires": { "sprintf-js": "~1.0.2" } }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=" + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==" + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=" + }, "array-find-index": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" }, "array-includes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.2.tgz", - "integrity": "sha512-w2GspexNQpx+PutG3QpT437/BenZBj0M/MZGn5mzv/MofYqo0xmRHzn4lFsoDlWJ+THYsGJmFlW68WlDFx7VRw==", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.3.tgz", + "integrity": "sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A==", "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1", - "get-intrinsic": "^1.0.1", + "es-abstract": "^1.18.0-next.2", + "get-intrinsic": "^1.1.1", "is-string": "^1.0.5" } }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==" + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=" }, "array.prototype.flat": { "version": "1.2.4", @@ -1455,12 +17616,43 @@ "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0=", "dev": true }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" + }, + "ast-types": { + "version": "0.14.2", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.14.2.tgz", + "integrity": "sha512-O0yuUDnZeQDL+ncNGlJ78BiO4jnYI3bvMsD5prT0/nsgijG/LpNBIr63gTjVTNsiGkgQhiyCShTgxt8oXOrklA==", + "requires": { + "tslib": "^2.0.1" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==" + }, "autoprefixer": { "version": "9.8.6", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.6.tgz", @@ -1476,10 +17668,68 @@ "postcss-value-parser": "^4.1.0" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -1504,37 +17754,26 @@ } } }, - "babel-eslint": { - "version": "10.1.0", - "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", - "integrity": "sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==", + "babel-core": { + "version": "7.0.0-bridge.0", + "resolved": "https://registry.npmjs.org/babel-core/-/babel-core-7.0.0-bridge.0.tgz", + "integrity": "sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==", + "requires": {} + }, + "babel-jest": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.0.6.tgz", + "integrity": "sha512-iTJyYLNc4wRofASmofpOc5NK9QunwMk+TLFgGXsTFS8uEqmd8wdI7sga0FPe2oVH3b5Agt/EAK1QjPEuKL8VfA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@babel/parser": "^7.7.0", - "@babel/traverse": "^7.7.0", - "@babel/types": "^7.7.0", - "eslint-visitor-keys": "^1.0.0", - "resolve": "^1.12.0" - }, - "dependencies": { - "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", - "dev": true - } - } - }, - "babel-loader": { - "version": "8.2.2", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.2.tgz", - "integrity": "sha512-JvTd0/D889PQBtUXJ2PXaKU/pjZDMtHA9V2ecm+eNRmmBCMR09a+fmpGTNwnJtFmFl5Ei7Vy47LjBb+L0wQ99g==", - "requires": { - "find-cache-dir": "^3.3.1", - "loader-utils": "^1.4.0", - "make-dir": "^3.1.0", - "schema-utils": "^2.6.5" + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/babel__core": "^7.1.14", + "babel-plugin-istanbul": "^6.0.0", + "babel-preset-jest": "^27.0.6", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "slash": "^3.0.0" } }, "babel-plugin-dynamic-import-node": { @@ -1545,6 +17784,99 @@ "object.assign": "^4.1.0" } }, + "babel-plugin-istanbul": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.0.0.tgz", + "integrity": "sha512-AF55rZXpe7trmEylbaE1Gv54wn6rwU03aptvRoVIGP8YykoSxqdVLV1TfwflBCE/QtHmqtP8SWlTENqbK8GCSQ==", + "dev": true, + "requires": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-instrument": "^4.0.0", + "test-exclude": "^6.0.0" + } + }, + "babel-plugin-jest-hoist": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-27.0.6.tgz", + "integrity": "sha512-CewFeM9Vv2gM7Yr9n5eyyLVPRSiBnk6lKZRjgwYnGKSl9M14TMn2vkN02wTF04OGuSDLEzlWiMzvjXuW9mB6Gw==", + "dev": true, + "requires": { + "@babel/template": "^7.3.3", + "@babel/types": "^7.3.3", + "@types/babel__core": "^7.0.0", + "@types/babel__traverse": "^7.0.6" + } + }, + "babel-plugin-polyfill-corejs2": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", + "peer": true, + "requires": { + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", + "semver": "^6.1.1" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "peer": true + } + } + }, + "babel-plugin-polyfill-corejs3": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", + "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", + "peer": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.14.0" + } + }, + "babel-plugin-polyfill-regenerator": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", + "peer": true, + "requires": { + "@babel/helper-define-polyfill-provider": "^0.2.2" + } + }, + "babel-preset-current-node-syntax": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", + "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "dev": true, + "requires": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.8.3", + "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-top-level-await": "^7.8.3" + } + }, + "babel-preset-jest": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-27.0.6.tgz", + "integrity": "sha512-WObA0/Biw2LrVVwZkF/2GqbOdzhKD6Fkdwhoy9ASIrOWr/zodcSpQh72JOkEn6NWyjmnPDjNSqaGN4KnpKzhXw==", + "dev": true, + "requires": { + "babel-plugin-jest-hoist": "^27.0.6", + "babel-preset-current-node-syntax": "^1.0.0" + } + }, "bail": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz", @@ -1552,15 +17884,54 @@ "dev": true }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==" }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==" }, + "bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -1569,7 +17940,8 @@ "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=" + "integrity": "sha1-aN/1++YMUes3cl6p4+0xDcwed24=", + "dev": true }, "brace-expansion": { "version": "1.1.11", @@ -1588,90 +17960,88 @@ "fill-range": "^7.0.1" } }, + "browser-process-hrtime": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", + "dev": true + }, "browserslist": { - "version": "4.16.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.0.tgz", - "integrity": "sha512-/j6k8R0p3nxOC6kx5JGAxsnhc9ixaWJfYc+TNTzxg6+ARaESAvQGV7h0uNOB4t+pLQJZWzcrMxXOxjgsCj3dqQ==", + "version": "4.16.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", + "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", "requires": { - "caniuse-lite": "^1.0.30001165", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.621", + "caniuse-lite": "^1.0.30001248", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.793", "escalade": "^3.1.1", - "node-releases": "^1.1.67" + "node-releases": "^1.1.73" + } + }, + "bser": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.1.tgz", + "integrity": "sha512-gQxTNE/GAfIIrmHLUE3oJyp5FO6HRBfhjnw4/wMmA63ZGDJnWBmgY/lyQBpnDUkGmAhbSe39tx2d/iTOAfglwQ==", + "dev": true, + "requires": { + "node-int64": "^0.4.0" + } + }, + "buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "requires": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" } }, "buffer-from": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", - "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, - "cacache": { - "version": "15.0.5", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-15.0.5.tgz", - "integrity": "sha512-lloiL22n7sOjEEXdL8NAjTgv9a1u43xICE9/203qonkZUCj5X1UEWIdf2/Y0d6QcCtMzbKQyhrcDbdvlZTs/+A==", + "builtin-modules": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.2.0.tgz", + "integrity": "sha512-lGzLKcioL90C7wMczpkY0n/oART3MbBa8R9OFGE1rJxoVI86u4WAGfEk8Wjv10eKSyTHVGkSo3bvBylCEtk7LA==", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", "requires": { - "@npmcli/move-file": "^1.0.1", - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "glob": "^7.1.4", - "infer-owner": "^1.0.4", - "lru-cache": "^6.0.0", - "minipass": "^3.1.1", - "minipass-collect": "^1.0.2", - "minipass-flush": "^1.0.5", - "minipass-pipeline": "^1.2.2", - "mkdirp": "^1.0.3", - "p-map": "^4.0.0", - "promise-inflight": "^1.0.1", - "rimraf": "^3.0.2", - "ssri": "^8.0.0", - "tar": "^6.0.2", - "unique-filename": "^1.1.1" + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" } }, "call-bind": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.0.tgz", - "integrity": "sha512-AEXsYIyyDY3MCzbwdhzG3Jx1R0J2wetQyUynn6dYHAO+bg8l1k7jwZtRv4ryryFs7EP+NDlikJlVe59jr0cM2w==", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "requires": { "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.0" - } - }, - "caller-callsite": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", - "integrity": "sha1-hH4PzgoiN1CpoCfFSzNzGtMVQTQ=", - "requires": { - "callsites": "^2.0.0" - } - }, - "caller-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-2.0.0.tgz", - "integrity": "sha1-Ro+DBE42mrIBD6xfBs7uFbsssfQ=", - "requires": { - "caller-callsite": "^2.0.0" + "get-intrinsic": "^1.0.2" } }, "callsites": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz", - "integrity": "sha1-BuuE8A7qQT2oav/vrL/7Ngk7PFA=" - }, - "camel-case": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", - "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", - "requires": { - "no-case": "^2.2.0", - "upper-case": "^1.1.1" - } + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" }, "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==" + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true }, "camelcase-keys": { "version": "6.2.2", @@ -1682,42 +18052,28 @@ "camelcase": "^5.3.1", "map-obj": "^4.0.0", "quick-lru": "^4.0.1" - }, - "dependencies": { - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true - } - } - }, - "caniuse-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz", - "integrity": "sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==", - "requires": { - "browserslist": "^4.0.0", - "caniuse-lite": "^1.0.0", - "lodash.memoize": "^4.1.2", - "lodash.uniq": "^4.5.0" } }, "caniuse-lite": { - "version": "1.0.30001170", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001170.tgz", - "integrity": "sha512-Dd4d/+0tsK0UNLrZs3CvNukqalnVTRrxb5mcQm8rHL49t7V5ZaTygwXkrq+FB+dVDf++4ri8eJnFEJAB8332PA==" + "version": "1.0.30001251", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", + "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==" }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, + "char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true + }, "character-entities": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz", @@ -1736,37 +18092,108 @@ "integrity": "sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg==", "dev": true }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==" + }, "chownr": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "requires": { - "tslib": "^1.9.0" - } - }, - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", "dev": true }, - "clean-css": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz", - "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==", + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" + }, + "ci-info": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.2.0.tgz", + "integrity": "sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A==", + "dev": true + }, + "cjs-module-lexer": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz", + "integrity": "sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA==", + "dev": true + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", "requires": { - "source-map": "~0.6.0" + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" } } }, @@ -1777,21 +18204,79 @@ "dev": true, "requires": { "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + } } }, "clean-stack": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", - "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==" - }, - "clipboard": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.6.tgz", - "integrity": "sha512-g5zbiixBRk/wyKakSwCKd7vQXDjFnAMGHoEyBogG/bw9kTD9GvdAvaoRR1ALcEzt3pVKxZR0pViekPMIS0QyGg==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-3.0.1.tgz", + "integrity": "sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==", "requires": { - "good-listener": "^1.2.2", - "select": "^1.1.2", - "tiny-emitter": "^2.0.0" + "escape-string-regexp": "4.0.0" + } + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-spinners": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.6.0.tgz", + "integrity": "sha512-t+4/y50K/+4xcCRosKkA7W4gTr1MySvLV0q+PxmG7FJ5g+66ChKurYjxBCjHggHH3HA5Hh9cy+lcUGWDqVH+4Q==" + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==" + }, + "cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, + "clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=" + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" } }, "clone-regexp": { @@ -1803,20 +18288,16 @@ "is-regexp": "^2.0.0" } }, - "coa": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/coa/-/coa-2.0.2.tgz", - "integrity": "sha512-q5/jG+YQnSy4nRTV4F7lPepBJZ8qBNJJDBuJdoejDyLXgmL7IEo+Le2JDZudFTFt7mrCqIRaSjws4ygRCTCAXA==", - "requires": { - "@types/q": "^1.5.1", - "chalk": "^2.4.1", - "q": "^1.1.2" - } + "co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", + "dev": true }, "codemirror": { - "version": "5.59.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.59.0.tgz", - "integrity": "sha512-UGzSkCacY9z0rSpQ3wnTWRN2nvRE6foDXnJltWW8pazInR/R+3gXHrao4IFQMv/bSBvFBxt8/HPpkpKAS54x5Q==" + "version": "5.62.2", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.62.2.tgz", + "integrity": "sha512-tVFMUa4J3Q8JUd1KL9yQzQB0/BJt7ZYZujZmTPgo/54Lpuq3ez4C8x/ATUY/wv7b7X3AUq8o3Xd+2C5ZrCGWHw==" }, "codemirror-spell-checker": { "version": "1.1.2", @@ -1826,41 +18307,52 @@ "typo-js": "*" } }, - "color": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/color/-/color-3.1.3.tgz", - "integrity": "sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==", + "collect-v8-coverage": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz", + "integrity": "sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==", + "dev": true + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", "requires": { - "color-convert": "^1.9.1", - "color-string": "^1.5.4" + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" } }, "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "requires": { - "color-name": "1.1.3" + "color-name": "~1.1.4" } }, "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" - }, - "color-string": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz", - "integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "colorette": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", - "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==" + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==" + }, + "colors": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", + "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } }, "commander": { "version": "2.20.3", @@ -1872,6 +18364,11 @@ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==" + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -1885,58 +18382,55 @@ "bluebird": "^3.1.1" } }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", - "dev": true - }, "convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "requires": { "safe-buffer": "~5.1.1" } }, "copy-anything": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.1.tgz", - "integrity": "sha512-lA57e7viQHOdPQcrytv5jFeudZZOXuyk47lZym279FiDQ8jeZomXiGuVf6ffMKkJ+3TIai3J1J3yi6M+/4U35g==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz", + "integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==", "requires": { - "is-what": "^3.7.1" + "is-what": "^3.12.0" } }, - "core-js": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.8.1.tgz", - "integrity": "sha512-9Id2xHY1W7m8hCl8NkhQn5CufmF/WuR30BTRewvCXc1aZd3kMECwNZ69ndLbekKfakw9Rf2Xyc+QR6E7Gg+obg==" + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js-compat": { - "version": "3.8.1", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.1.tgz", - "integrity": "sha512-a16TLmy9NVD1rkjUGbwuyWkiDoN0FDpAwrfLONvHFQx0D9k7J9y0srwMT8QP/Z6HE3MIFaVynEeYwZwPX1o5RQ==", + "version": "3.16.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.1.tgz", + "integrity": "sha512-NHXQXvRbd4nxp9TEmooTJLUf94ySUG6+DSsscBpTftN1lQLQ4LjnWvc7AoIo4UjDsFF3hB8Uh5LLCRRdaiT5MQ==", + "peer": true, "requires": { - "browserslist": "^4.15.0", + "browserslist": "^4.16.7", "semver": "7.0.0" }, "dependencies": { "semver": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==" + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "peer": true } } }, "cosmiconfig": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", - "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", + "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", "requires": { - "import-fresh": "^2.0.0", - "is-directory": "^0.3.1", - "js-yaml": "^3.13.1", - "parse-json": "^4.0.0" + "@types/parse-json": "^4.0.0", + "import-fresh": "^3.2.1", + "parse-json": "^5.0.0", + "path-type": "^4.0.0", + "yaml": "^1.10.0" } }, "cross-spawn": { @@ -1949,354 +18443,92 @@ "which": "^2.0.1" } }, - "css-b64-images": { - "version": "0.2.5", - "resolved": "https://registry.npmjs.org/css-b64-images/-/css-b64-images-0.2.5.tgz", - "integrity": "sha1-QgBdgyBLK0pdk7axpWRBM7WSegI=" - }, - "css-color-names": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/css-color-names/-/css-color-names-0.0.4.tgz", - "integrity": "sha1-gIrcLnnPhHOAabZGyyDsJ762KeA=" - }, - "css-declaration-sorter": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-4.0.1.tgz", - "integrity": "sha512-BcxQSKTSEEQUftYpBVnsH4SF05NTuBokb19/sBt6asXGKZ/6VP7PLG1CBCkFDYOnhXhPh0jMhO6xZ71oYHXHBA==", - "requires": { - "postcss": "^7.0.1", - "timsort": "^0.3.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "css-loader": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.0.1.tgz", - "integrity": "sha512-cXc2ti9V234cq7rJzFKhirb2L2iPy8ZjALeVJAozXYz9te3r4eqLSixNAbMDJSgJEQywqXzs8gonxaboeKqwiw==", + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz", + "integrity": "sha512-/rvHfYRjIpymZblf49w8jYcRo2y9gj6rV8UroHGmBxKrIyGLokpycyKzp9OkitvqT29ZSpzJ0Ic7SpnJX3sC8g==", "requires": { - "camelcase": "^6.2.0", - "cssesc": "^3.0.0", - "icss-utils": "^5.0.0", - "loader-utils": "^2.0.0", - "postcss": "^8.1.4", + "icss-utils": "^5.1.0", + "postcss": "^8.2.15", "postcss-modules-extract-imports": "^3.0.0", "postcss-modules-local-by-default": "^4.0.0", "postcss-modules-scope": "^3.0.0", "postcss-modules-values": "^4.0.0", "postcss-value-parser": "^4.1.0", - "schema-utils": "^3.0.0", - "semver": "^7.3.2" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "css-minimizer-webpack-plugin": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-1.1.5.tgz", - "integrity": "sha512-mXgaoFjNpIudZfxD49N1aPtLxfXGJt+BVPVjQ+H66I48b5n4wJtFpYfffVr7izK8W6fD01J7K0kUcP6HGjw90w==", - "requires": { - "cacache": "^15.0.5", - "cssnano": "^4.1.10", - "find-cache-dir": "^3.3.1", - "jest-worker": "^26.3.0", - "p-limit": "^3.0.2", - "schema-utils": "^3.0.0", - "serialize-javascript": "^5.0.1", - "source-map": "^0.6.1", - "webpack-sources": "^1.4.3" - }, - "dependencies": { - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } + "semver": "^7.3.5" } }, "css-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-2.1.0.tgz", - "integrity": "sha512-Dqk7LQKpwLoH3VovzZnkzegqNSuAziQyNZUcrdDM401iY+R5NkGBXGmtO05/yaXQziALuPogeG0b7UAgjnTJTQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz", + "integrity": "sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA==", + "dev": true, "requires": { "boolbase": "^1.0.0", - "css-what": "^3.2.1", - "domutils": "^1.7.0", - "nth-check": "^1.0.2" + "css-what": "^5.0.0", + "domhandler": "^4.2.0", + "domutils": "^2.6.0", + "nth-check": "^2.0.0" } }, - "css-select-base-adapter": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/css-select-base-adapter/-/css-select-base-adapter-0.1.1.tgz", - "integrity": "sha512-jQVeeRG70QI08vSTwf1jHxp74JoZsr2XSgETae8/xC8ovSnL2WF87GTLO86Sbwdt2lK4Umg4HnnwMO4YF3Ce7w==" - }, "css-tree": { - "version": "1.0.0-alpha.37", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.0.0-alpha.37.tgz", - "integrity": "sha512-DMxWJg0rnz7UgxKT0Q1HU/L9BeJI0M6ksor0OgqOnF+aRCDWg/N2641HmVyU9KVIu0OVVWOb2IpC9A+BJRnejg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz", + "integrity": "sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q==", + "dev": true, "requires": { - "mdn-data": "2.0.4", + "mdn-data": "2.0.14", "source-map": "^0.6.1" }, "dependencies": { "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, "css-what": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-3.4.2.tgz", - "integrity": "sha512-ACUm3L0/jiZTqfzRM3Hi9Q8eZqd6IK37mMWPLz9PJxkLWllYeRf+EHUSHYEtFop2Eqytaq1FizFVh7XfBnXCDQ==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/css-what/-/css-what-5.0.1.tgz", + "integrity": "sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg==", + "dev": true }, "cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==" }, - "cssnano": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/cssnano/-/cssnano-4.1.10.tgz", - "integrity": "sha512-5wny+F6H4/8RgNlaqab4ktc3e0/blKutmq8yNlBFXA//nSFFAqAngjNVRzUvCgYROULmZZUoosL/KSoZo5aUaQ==", - "requires": { - "cosmiconfig": "^5.0.0", - "cssnano-preset-default": "^4.0.7", - "is-resolvable": "^1.0.0", - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "cssnano-preset-default": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-4.0.7.tgz", - "integrity": "sha512-x0YHHx2h6p0fCl1zY9L9roD7rnlltugGu7zXSKQx6k2rYw0Hi3IqxcoAGF7u9Q5w1nt7vK0ulxV8Lo+EvllGsA==", - "requires": { - "css-declaration-sorter": "^4.0.1", - "cssnano-util-raw-cache": "^4.0.1", - "postcss": "^7.0.0", - "postcss-calc": "^7.0.1", - "postcss-colormin": "^4.0.3", - "postcss-convert-values": "^4.0.1", - "postcss-discard-comments": "^4.0.2", - "postcss-discard-duplicates": "^4.0.2", - "postcss-discard-empty": "^4.0.1", - "postcss-discard-overridden": "^4.0.1", - "postcss-merge-longhand": "^4.0.11", - "postcss-merge-rules": "^4.0.3", - "postcss-minify-font-values": "^4.0.2", - "postcss-minify-gradients": "^4.0.2", - "postcss-minify-params": "^4.0.2", - "postcss-minify-selectors": "^4.0.2", - "postcss-normalize-charset": "^4.0.1", - "postcss-normalize-display-values": "^4.0.2", - "postcss-normalize-positions": "^4.0.2", - "postcss-normalize-repeat-style": "^4.0.2", - "postcss-normalize-string": "^4.0.2", - "postcss-normalize-timing-functions": "^4.0.2", - "postcss-normalize-unicode": "^4.0.1", - "postcss-normalize-url": "^4.0.1", - "postcss-normalize-whitespace": "^4.0.2", - "postcss-ordered-values": "^4.1.2", - "postcss-reduce-initial": "^4.0.3", - "postcss-reduce-transforms": "^4.0.2", - "postcss-svgo": "^4.0.2", - "postcss-unique-selectors": "^4.0.1" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "cssnano-util-get-arguments": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-arguments/-/cssnano-util-get-arguments-4.0.0.tgz", - "integrity": "sha1-7ToIKZ8h11dBsg87gfGU7UnMFQ8=" - }, - "cssnano-util-get-match": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/cssnano-util-get-match/-/cssnano-util-get-match-4.0.0.tgz", - "integrity": "sha1-wOTKB/U4a7F+xeUiULT1lhNlFW0=" - }, - "cssnano-util-raw-cache": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-raw-cache/-/cssnano-util-raw-cache-4.0.1.tgz", - "integrity": "sha512-qLuYtWK2b2Dy55I8ZX3ky1Z16WYsx544Q0UWViebptpwn/xDBmog2TLg4f+DBMg1rJ6JDWtn96WHbOKDWt1WQA==", - "requires": { - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "cssnano-util-same-parent": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/cssnano-util-same-parent/-/cssnano-util-same-parent-4.0.1.tgz", - "integrity": "sha512-WcKx5OY+KoSIAxBW6UBBRay1U6vkYheCdjyVNDm85zt5K9mHoGOfsOsqIszfAqrQQFIIKgjh2+FDgIj/zsl21Q==" - }, "csso": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz", "integrity": "sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA==", + "dev": true, "requires": { "css-tree": "^1.1.2" + } + }, + "cssom": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz", + "integrity": "sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw==", + "dev": true + }, + "cssstyle": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-2.3.0.tgz", + "integrity": "sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A==", + "dev": true, + "requires": { + "cssom": "~0.3.6" }, "dependencies": { - "css-tree": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-1.1.2.tgz", - "integrity": "sha512-wCoWush5Aeo48GLhfHPbmvZs59Z+M7k5+B1xDnXbdWNcEF423DoFdqSWE0PM5aNk5nI5cp1q7ms36zGApY/sKQ==", - "requires": { - "mdn-data": "2.0.14", - "source-map": "^0.6.1" - } - }, - "mdn-data": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", - "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "cssom": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/cssom/-/cssom-0.3.8.tgz", + "integrity": "sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg==", + "dev": true } } }, @@ -2584,15 +18816,26 @@ "lodash": "^4.17.15" } }, + "data-urls": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-2.0.0.tgz", + "integrity": "sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ==", + "dev": true, + "requires": { + "abab": "^2.0.3", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.0.0" + } + }, "de-indent": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz", "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=" }, "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", + "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "requires": { "ms": "2.1.2" } @@ -2621,12 +18864,43 @@ } } }, + "decimal.js": { + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.3.1.tgz", + "integrity": "sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=" + }, + "dedent": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-0.7.0.tgz", + "integrity": "sha1-JJXduvbrh0q7Dhvp3yLS5aVEMmw=", + "dev": true + }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "deepmerge": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", + "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", + "dev": true + }, + "defaults": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", + "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", + "requires": { + "clone": "^1.0.2" + } + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -2635,26 +18909,39 @@ "object-keys": "^1.0.12" } }, - "delegate": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", - "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true + }, + "diff-sequences": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-27.0.6.tgz", + "integrity": "sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ==", + "dev": true }, "dir-glob": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", - "dev": true, "requires": { "path-type": "^4.0.0" - }, - "dependencies": { - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - } } }, "doctrine": { @@ -2667,79 +18954,102 @@ } }, "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz", + "integrity": "sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig==", + "dev": true, "requires": { "domelementtype": "^2.0.1", + "domhandler": "^4.2.0", "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==" - } } }, "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==" + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true }, - "domhandler": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-3.3.0.tgz", - "integrity": "sha512-J1C5rIANUbuYK+FuFL98650rihynUOEzRLxW+90bKZRWB6A1X1Tf82GxR1qAWLyfNPRvjqfip3Q5tdYlmAa9lA==", + "domexception": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/domexception/-/domexception-2.0.1.tgz", + "integrity": "sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg==", "dev": true, "requires": { - "domelementtype": "^2.0.1" + "webidl-conversions": "^5.0.0" }, "dependencies": { - "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "webidl-conversions": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-5.0.0.tgz", + "integrity": "sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA==", "dev": true } } }, - "domutils": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", - "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "domhandler": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.2.0.tgz", + "integrity": "sha512-zk7sgt970kzPks2Bf+dwT/PLzghLnsivb9CcxkvR8Mzr66Olr0Ofd8neSbglHJHaHa2MadfoSdNlKYAaafmWfA==", + "dev": true, "requires": { - "dom-serializer": "0", - "domelementtype": "1" + "domelementtype": "^2.2.0" } }, - "dot-prop": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", - "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dompurify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-2.3.0.tgz", + "integrity": "sha512-VV5C6Kr53YVHGOBKO/F86OYX6/iLTw2yVSI721gKetxpHCK/V5TaLEf9ODjRgl1KLSWRMY6cUhAbv/c+IUnwQw==" + }, + "domutils": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.7.0.tgz", + "integrity": "sha512-8eaHa17IwJUPAiB+SoTYBo5mCdeMgdcAoXJ59m6DT1vw+5iLS3gNoqYaRowaBKtGVrOF1Jz4yDTgYKLK2kvfJg==", + "dev": true, "requires": { - "is-obj": "^2.0.0" + "dom-serializer": "^1.0.1", + "domelementtype": "^2.2.0", + "domhandler": "^4.2.0" } }, "dropzone": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/dropzone/-/dropzone-5.7.2.tgz", - "integrity": "sha512-m217bJHtf0J1IiKn4Tv6mnu1h5QvQNBnKZ39gma7hzGQhIZMxYq1vYEHs4AVd4ThFwmALys+52NAOD4zdLTG4w==" + "version": "5.9.2", + "resolved": "https://registry.npmjs.org/dropzone/-/dropzone-5.9.2.tgz", + "integrity": "sha512-5t2z51DzIsWDbTpwcJIvUlwxBbvcwdCApz0yb9ecKJwG155Xm92KMEZmHW1B0MzoXOKvFwdd0nPu5cpeVcvPHQ==" }, "easymde": { - "version": "2.13.0", - "resolved": "https://registry.npmjs.org/easymde/-/easymde-2.13.0.tgz", - "integrity": "sha512-Q9cfsMzIwtXS2h/1toB404aYRkOukjVroZP2/7uItO4W5e3pC8mey2NsHlSAGRdR2pIwR2XheA4TucX0IjseBA==", + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/easymde/-/easymde-2.15.0.tgz", + "integrity": "sha512-9jMRIVvKt1d0UjRN45yotUYECAM4xvw0TTAQw8sYDONP++keWJVnd8Xrn+V+vQEN/v9/X0SWEoo1rFSgCooGpw==", "requires": { - "codemirror": "^5.58.2", + "@types/codemirror": "0.0.109", + "@types/marked": "^2.0.2", + "codemirror": "^5.61.0", "codemirror-spell-checker": "1.1.2", - "marked": "^1.2.3" + "marked": "^2.0.3" + } + }, + "editorconfig-checker": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/editorconfig-checker/-/editorconfig-checker-4.0.2.tgz", + "integrity": "sha512-tUI7ABIzMB1kfwTUQmX+gaZGCMNuUgGuRHJ+Xu4Tk9T8lV8Vy5w/EaQsSZ7NKrOgLxbekptw6MUgrzHTvhceLw==", + "dev": true, + "requires": { + "https-proxy-agent": "^5.0.0", + "node-fetch": "^2.6.0", + "tar": "^6.0.0" } }, "electron-to-chromium": { - "version": "1.3.633", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.633.tgz", - "integrity": "sha512-bsVCsONiVX1abkWdH7KtpuDAhsQ3N3bjPYhROSAXE78roJKet0Y5wznA14JE9pzbwSZmSMAW6KiKYf1RvbTJkA==" + "version": "1.3.807", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.807.tgz", + "integrity": "sha512-p8uxxg2a23zRsvQ2uwA/OOI+O4BQxzaR7YKMIGGGQCpYmkFX2CVF5f0/hxLMV7yCr7nnJViCwHLhPfs52rIYCA==" + }, + "emittery": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.8.1.tgz", + "integrity": "sha512-uDfvUjVrfGJJhymx/kz6prltenw1u7WrCg1oa94zYY8xxVpLLUu045LAT0dhDZdXG58/EpPL/5kA180fQ/qudg==", + "dev": true }, "emoji-regex": { "version": "8.0.0", @@ -2751,18 +19061,10 @@ "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz", "integrity": "sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==" }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "requires": { - "once": "^1.4.0" - } - }, "enhanced-resolve": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.4.1.tgz", - "integrity": "sha512-4GbyIMzYktTFoRSmkbgZ1LU+RXwf4AQ8Z+rSuuh1dC8plp0PPeaWvx6+G4hh4KnUJ48VoxKbNyA1QQQIUpXjYA==", + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", "requires": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -2772,27 +19074,21 @@ "version": "2.3.6", "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, "requires": { "ansi-colors": "^4.1.1" } }, "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==" - }, - "entity-decode": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/entity-decode/-/entity-decode-2.0.2.tgz", - "integrity": "sha512-5CCY/3ci4MC1m2jlumNjWd7VBFt4VfFnmSqSNmVcXq4gxM3Vmarxtt+SvmBnzwLS669MWdVuXboNVj1qN2esVg==", - "requires": { - "he": "^1.1.1" - } + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true }, "envinfo": { - "version": "7.7.3", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.7.3.tgz", - "integrity": "sha512-46+j5QxbPWza0PB1i15nZx0xQ4I/EfQxg9J8Had3b408SV63nEtor2e+oiY63amTo9KTuh2a3XLObNwduxYwwA==" + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==" }, "errno": { "version": "0.1.8", @@ -2812,73 +19108,174 @@ } }, "es-abstract": { - "version": "1.18.0-next.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", - "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", + "version": "1.18.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.5.tgz", + "integrity": "sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA==", + "dev": true, "requires": { + "call-bind": "^1.0.2", "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.3", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.3", + "is-string": "^1.0.6", + "object-inspect": "^1.11.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" } }, + "es-module-lexer": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", + "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==" + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" } }, + "esbuild": { + "version": "0.12.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.12.20.tgz", + "integrity": "sha512-u7+0qTo9Z64MD9PhooEngCmzyEYJ6ovFhPp8PLNh3UasR5Ihjv6HWVXqm8uHmasdQlpsAf0IsY4U0YVUfCpt4Q==" + }, + "esbuild-loader": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/esbuild-loader/-/esbuild-loader-2.15.0.tgz", + "integrity": "sha512-wgysEJkQGrb4goa8cArl5Pivd1xGbfpTQIQOQhfbiprJxNltwXuN34wVlmj0/OGhIFtESSOry5NwQ6RxjAjByw==", + "requires": { + "esbuild": "^0.12.19", + "joycon": "^3.0.1", + "json5": "^2.2.0", + "loader-utils": "^2.0.0", + "tapable": "^2.2.0", + "type-fest": "^1.4.0", + "webpack-sources": "^2.2.0" + } + }, "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" }, "escape-goat": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-3.0.0.tgz", - "integrity": "sha512-w3PwNZJwRxlp47QGzhuEBldEqVHHhh8/tIPcl6ecf2Bou99cdAt0knihBV0Ecc7CGxYduXVBDheH1K2oADRlvw==" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-goat/-/escape-goat-4.0.0.tgz", + "integrity": "sha512-2Sd4ShcWxbx6OY1IHyla/CVNwvg7XwZVoXZHcSu9w9SReNP1EzzD5T8NWKIR38fIqEns9kDWKUQTXXAmlDrdPg==" }, "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" }, - "eslint": { - "version": "7.16.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.16.0.tgz", - "integrity": "sha512-iVWPS785RuDA4dWuhhgXTNrGxHHK3a8HLSMBgbbU59ruJDubUraXN8N5rn7kb8tG6sjg74eE0RA3YWT51eusEw==", + "escodegen": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.0.0.tgz", + "integrity": "sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.2.2", + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.6.1" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + } + } + }, + "eslint": { + "version": "7.32.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.32.0.tgz", + "integrity": "sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.3", + "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", + "escape-string-regexp": "^4.0.0", "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", "eslint-visitor-keys": "^2.0.0", "espree": "^7.3.1", - "esquery": "^1.2.0", + "esquery": "^1.4.0", "esutils": "^2.0.2", - "file-entry-cache": "^6.0.0", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", "functional-red-black-tree": "^1.0.1", - "glob-parent": "^5.0.0", - "globals": "^12.1.0", + "glob-parent": "^5.1.2", + "globals": "^13.6.0", "ignore": "^4.0.6", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -2886,7 +19283,7 @@ "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.4.1", - "lodash": "^4.17.19", + "lodash.merge": "^4.6.2", "minimatch": "^3.0.4", "natural-compare": "^1.4.0", "optionator": "^0.9.1", @@ -2895,245 +19292,82 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^6.0.4", + "table": "^6.0.9", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "globals": { - "version": "12.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", - "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", - "dev": true, - "requires": { - "type-fest": "^0.8.1" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - } - }, - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "eslint-ast-utils": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/eslint-ast-utils/-/eslint-ast-utils-1.1.0.tgz", - "integrity": "sha512-otzzTim2/1+lVrlH19EfQQJEhVJSu0zOb9ygb3iapN6UlyaDtyRq4b5U1FuW0v1lRa9Fp/GJyHkSwm6NqABgCA==", - "dev": true, - "requires": { - "lodash.get": "^4.4.2", - "lodash.zip": "^4.2.0" } }, "eslint-import-resolver-node": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", - "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz", + "integrity": "sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw==", "dev": true, "requires": { - "debug": "^2.6.9", - "resolve": "^1.13.1" + "debug": "^3.2.7", + "resolve": "^1.20.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" + "ms": "^2.1.1" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true } } }, "eslint-module-utils": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", - "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.2.tgz", + "integrity": "sha512-QG8pcgThYOuqxupd06oYTZoNOGaUdTY1PqK+oS6ElF6vs4pBdk/aYxFVQQXzcrAqp9m7cl7lb2ubazX+g16k2Q==", "dev": true, "requires": { - "debug": "^2.6.9", + "debug": "^3.2.7", "pkg-dir": "^2.0.0" }, "dependencies": { "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { - "ms": "2.0.0" - } - }, - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - }, - "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", - "dev": true, - "requires": { - "find-up": "^2.1.0" + "ms": "^2.1.1" } } } }, "eslint-plugin-html": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.1.1.tgz", - "integrity": "sha512-JSe3ZDb7feKMnQM27XWGeoIjvP4oWQMJD9GZ6wW67J7/plVL87NK72RBwlvfc3tTZiYUchHhxAwtgEd1GdofDA==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-html/-/eslint-plugin-html-6.1.2.tgz", + "integrity": "sha512-bhBIRyZFqI4EoF12lGDHAmgfff8eLXx6R52/K3ESQhsxzCzIE6hdebS7Py651f7U3RBotqroUnC3L29bR7qJWQ==", "dev": true, "requires": { - "htmlparser2": "^5.0.1" + "htmlparser2": "^6.0.1" } }, "eslint-plugin-import": { - "version": "2.22.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", - "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.24.0.tgz", + "integrity": "sha512-Kc6xqT9hiYi2cgybOc0I2vC9OgAYga5o/rAFinam/yF/t5uBqxQbauNPMC6fgb640T/89P0gFoO27FOilJ/Cqg==", "dev": true, "requires": { - "array-includes": "^3.1.1", - "array.prototype.flat": "^1.2.3", - "contains-path": "^0.1.0", + "array-includes": "^3.1.3", + "array.prototype.flat": "^1.2.4", "debug": "^2.6.9", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.4", - "eslint-module-utils": "^2.6.0", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.5", + "eslint-module-utils": "^2.6.2", + "find-up": "^2.0.0", "has": "^1.0.3", + "is-core-module": "^2.4.0", "minimatch": "^3.0.4", - "object.values": "^1.1.1", - "read-pkg-up": "^2.0.0", - "resolve": "^1.17.0", + "object.values": "^1.1.3", + "pkg-up": "^2.0.0", + "read-pkg-up": "^3.0.0", + "resolve": "^1.20.0", "tsconfig-paths": "^3.9.0" }, "dependencies": { @@ -3147,13 +19381,12 @@ } }, "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "esutils": "^2.0.2" } }, "ms": { @@ -3165,38 +19398,83 @@ } }, "eslint-plugin-unicorn": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-24.0.0.tgz", - "integrity": "sha512-NfLjIZas/ZUwc3S+pUtbTRqgCkODxPEkJBJ5ZR8wIu90BmX4jmXp10hoOZMScR2CR1NYTtrx0OX4BQvBnbzZzA==", + "version": "35.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-35.0.0.tgz", + "integrity": "sha512-FHsaO68tDPQILfs/mGF8eSISJp8RswR4FpUuBDnueK2wyEHC6zmsc9WxjYyldXoIsBuVmru6jQyFCbCWPoW/KQ==", "dev": true, "requires": { - "ci-info": "^2.0.0", + "@babel/helper-validator-identifier": "^7.14.9", + "ci-info": "^3.2.0", "clean-regexp": "^1.0.0", - "eslint-ast-utils": "^1.1.0", - "eslint-template-visitor": "^2.2.1", - "eslint-utils": "^2.1.0", - "import-modules": "^2.0.0", - "lodash": "^4.17.20", + "eslint-template-visitor": "^2.3.2", + "eslint-utils": "^3.0.0", + "is-builtin-module": "^3.1.0", + "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", - "regexp-tree": "^0.1.21", - "reserved-words": "^0.1.2", + "regexp-tree": "^0.1.23", "safe-regex": "^2.1.1", - "semver": "^7.3.4" + "semver": "^7.3.5" }, "dependencies": { - "parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", - "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", + "eslint-utils": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz", + "integrity": "sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "eslint-visitor-keys": "^2.0.0" } }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -3228,37 +19506,31 @@ "type-fest": "^0.8.1" } }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true } } }, "eslint-plugin-vue": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.3.0.tgz", - "integrity": "sha512-4rc9xrZgwT4aLz3XE6lrHu+FZtDLWennYvtzVvvS81kW9c65U4DUzQQWAFjDCgCFvN6HYWxi7ueEtxZVSB+f0g==", + "version": "7.16.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.16.0.tgz", + "integrity": "sha512-0E2dVvVC7I2Xm1HXyx+ZwPj9CNX4NJjs4K4r+GVsHWyt5Pew3JLD4fI7A91b2jeL0TXE7LlszrwLSTJU9eqehw==", "dev": true, "requires": { "eslint-utils": "^2.1.0", "natural-compare": "^1.4.0", - "semver": "^7.3.2", - "vue-eslint-parser": "^7.3.0" + "semver": "^6.3.0", + "vue-eslint-parser": "^7.10.0" }, "dependencies": { "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -3272,12 +19544,13 @@ } }, "eslint-template-visitor": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.2.2.tgz", - "integrity": "sha512-SkcLjzKw3JjKTWHacRDeLBa2gxb600zbCKTkXj/V97QnZ9yxkknoPL8vc8PFueqbFXP7mYNTQzjCjcMpTRdRaA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz", + "integrity": "sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA==", "dev": true, "requires": { - "babel-eslint": "^10.1.0", + "@babel/core": "^7.12.16", + "@babel/eslint-parser": "^7.12.16", "eslint-visitor-keys": "^2.0.0", "esquery": "^1.3.1", "multimap": "^1.1.0" @@ -3301,9 +19574,9 @@ } }, "eslint-visitor-keys": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", - "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", "dev": true }, "espree": { @@ -3317,12 +19590,6 @@ "eslint-visitor-keys": "^1.3.0" }, "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", @@ -3337,9 +19604,9 @@ "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" }, "esquery": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", - "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { "estraverse": "^5.1.0" @@ -3379,23 +19646,23 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==" }, "events": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.2.0.tgz", - "integrity": "sha512-/46HWwbfCX2xTawVfkKLGxMifJYQBWMwY1mjywRtb4c9x8l5NP3KoJtnIOiL1hfdRkIuYhETxQlo62IF8tcnlg==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" }, "execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", "requires": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, @@ -3408,28 +19675,218 @@ "clone-regexp": "^2.1.0" } }, + "exit": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", + "integrity": "sha1-BjJjj42HfMghB9MKD/8aF8uhzQw=", + "dev": true + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "expect": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/expect/-/expect-27.0.6.tgz", + "integrity": "sha512-psNLt8j2kwg42jGBDSfAlU49CEZxejN1f1PlANWDZqIhBOVU/c2Pm888FcjWJzFewhIsNWfZJeLjUjtKGiPuSw==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "ansi-styles": "^5.0.0", + "jest-get-type": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-regex-util": "^27.0.6" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, "extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", "dev": true }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + } + } + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.7.tgz", + "integrity": "sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", + "glob-parent": "^5.1.2", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.4" } }, "fast-json-stable-stringify": { @@ -3449,53 +19906,46 @@ "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==" }, "fastq": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.10.0.tgz", - "integrity": "sha512-NL2Qc5L3iQEsyYzweq7qfgy5OtXCmGzGvhElGEd/SoFWEMOEczNh5s5ocaF01HDetxz+p8ecjNPA6cZxxIHmzA==", + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", + "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", "requires": { "reusify": "^1.0.4" } }, + "fb-watchman": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.1.tgz", + "integrity": "sha512-DkPJKQeY6kKwmuMretBhr7G6Vodr7bFwDYTXIkfG1gjvNpaxBTQV3PbXg6bR1c1UP4jPOX0jHUbbHANL9vRjVg==", + "dev": true, + "requires": { + "bser": "2.1.1" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + } + } + }, "file-entry-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", - "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { "flat-cache": "^3.0.4" } }, - "file-loader": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz", - "integrity": "sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==", - "requires": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, "fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", @@ -3505,22 +19955,89 @@ } }, "find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", "requires": { "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "requires": { + "find-up": "^3.0.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + } } }, "find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, "requires": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" + "locate-path": "^2.0.0" } }, "flat-cache": { @@ -3534,20 +20051,60 @@ } }, "flatted": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", - "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.2.tgz", + "integrity": "sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==", "dev": true }, + "flow-parser": { + "version": "0.157.0", + "resolved": "https://registry.npmjs.org/flow-parser/-/flow-parser-0.157.0.tgz", + "integrity": "sha512-p0vdtrM8oAMlscIXpX0e/eGWll5NPteVChNtlQncbIbivH+BdiwXHN5QO6myAfmebd027r9RiQKdUPsFAiEVgQ==" + }, "font-awesome": { "version": "4.7.0", "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz", "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM=" }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=" + }, + "form-data": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", + "integrity": "sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs-minipass": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, "requires": { "minipass": "^3.0.0" } @@ -3557,6 +20114,13 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -3573,16 +20137,28 @@ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==" }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-intrinsic": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", - "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1" } }, + "get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true + }, "get-stdin": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-8.0.0.tgz", @@ -3590,17 +20166,19 @@ "dev": true }, "get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "requires": { - "pump": "^3.0.0" - } + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==" + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -3611,9 +20189,9 @@ } }, "glob-parent": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", - "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "requires": { "is-glob": "^4.0.1" } @@ -3655,15 +20233,26 @@ } }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==" + "version": "13.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.11.0.tgz", + "integrity": "sha512-08/xrJ7wQjK9kkkRoI3OFUBbLx4f+6x3SGwcPvQ0QH6goFDrOU2oyAWrmh3dJezu65buo+HBMzAMQy6rovVC3g==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } }, "globby": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.1.tgz", - "integrity": "sha512-iH9RmgwCmUJHi2z5o2l3eTtGBtXek1OYlHrbcxOYugyHLmAsZrPj43OtHThd62Buh/Vv6VyCBD2bdyWcGNQqoQ==", - "dev": true, + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", "requires": { "array-union": "^2.1.0", "dir-glob": "^3.0.1", @@ -3676,8 +20265,7 @@ "ignore": { "version": "5.1.8", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", - "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", - "dev": true + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==" } } }, @@ -3696,18 +20284,10 @@ "minimist": "^1.2.5" } }, - "good-listener": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", - "integrity": "sha1-1TswzfkxPf+33JoNR3CWqm0UXFA=", - "requires": { - "delegate": "^3.1.2" - } - }, "graceful-fs": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", - "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==" }, "graphlib": { "version": "2.1.8", @@ -3718,9 +20298,9 @@ } }, "gsap": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.5.1.tgz", - "integrity": "sha512-EMV0RSUKZNeTUzLKAizGlwxVOUyif3/g8I3S1aA/hf3gbqwBvmQ02x1RdTBQNQMOpHCVBv9y/vaHwfctoAg8zw==" + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.7.1.tgz", + "integrity": "sha512-4qxuaC2yFWRjMRof5tI/7c9/+L4xMsCoqHrZAmuh+IbOokTnZyoeF0VgvcVHq3uo+/VJZCs7PTvjrFasfGl+ww==" }, "hard-rejection": { "version": "2.1.0", @@ -3736,15 +20316,82 @@ "function-bind": "^1.1.1" } }, + "has-bigints": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", + "dev": true + }, "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.2" + } + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } }, "hash-sum": { "version": "1.0.2", @@ -3756,46 +20403,27 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, - "hex-color-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/hex-color-regex/-/hex-color-regex-1.1.0.tgz", - "integrity": "sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==" - }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, - "hsl-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz", - "integrity": "sha1-1JMwx4ntgZ4nakwNJy3/owsY/m4=" - }, - "hsla-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/hsla-regex/-/hsla-regex-1.0.0.tgz", - "integrity": "sha1-wc56MWjIxmFAM6S194d/OyJfnDg=" - }, - "html-comment-regex": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/html-comment-regex/-/html-comment-regex-1.1.2.tgz", - "integrity": "sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ==" - }, - "html-minifier": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", - "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", + "html-encoding-sniffer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz", + "integrity": "sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ==", + "dev": true, "requires": { - "camel-case": "^3.0.0", - "clean-css": "^4.2.1", - "commander": "^2.19.0", - "he": "^1.2.0", - "param-case": "^2.1.1", - "relateurl": "^0.2.7", - "uglify-js": "^3.5.1" + "whatwg-encoding": "^1.0.5" } }, + "html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, "html-tags": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/html-tags/-/html-tags-3.1.0.tgz", @@ -3803,73 +20431,42 @@ "dev": true }, "htmlparser2": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-5.0.1.tgz", - "integrity": "sha512-vKZZra6CSe9qsJzh0BjBGXo8dvzNsq/oGvsjfRdOrrryfeD9UOBEEQdeoqCRmKZchF5h2zOBMQ6YuQ0uRUmdbQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz", + "integrity": "sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A==", "dev": true, "requires": { "domelementtype": "^2.0.1", - "domhandler": "^3.3.0", - "domutils": "^2.4.2", + "domhandler": "^4.0.0", + "domutils": "^2.5.2", "entities": "^2.0.0" - }, - "dependencies": { - "dom-serializer": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.2.0.tgz", - "integrity": "sha512-n6kZFH/KlCrqs/1GHMOd5i2fd/beQHuehKdWvNNffbGHTr/almdhuVvTVFb3V7fglz+nC50fFusu3lY33h12pA==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0", - "entities": "^2.0.0" - }, - "dependencies": { - "domhandler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", - "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", - "dev": true, - "requires": { - "domelementtype": "^2.1.0" - } - } - } - }, - "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", - "dev": true - }, - "domutils": { - "version": "2.4.4", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-2.4.4.tgz", - "integrity": "sha512-jBC0vOsECI4OMdD0GC9mGn7NXPLb+Qt6KW1YDQzeQYRUFKmNG8lh7mO5HiELfr+lLQE7loDVI4QcAxV80HS+RA==", - "dev": true, - "requires": { - "dom-serializer": "^1.0.1", - "domelementtype": "^2.0.1", - "domhandler": "^4.0.0" - }, - "dependencies": { - "domhandler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-4.0.0.tgz", - "integrity": "sha512-KPTbnGQ1JeEMQyO1iYXoagsI6so/C96HZiFyByU3T6iAzpXn8EGEvct6unm1ZGoed8ByO2oirxgwxBmqKF9haA==", - "dev": true, - "requires": { - "domelementtype": "^2.1.0" - } - } - } - } + } + }, + "http-proxy-agent": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz", + "integrity": "sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg==", + "dev": true, + "requires": { + "@tootallnate/once": "1", + "agent-base": "6", + "debug": "4" + } + }, + "https-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", + "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", + "dev": true, + "requires": { + "agent-base": "6", + "debug": "4" } }, "human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==" }, "iconv-lite": { "version": "0.4.24", @@ -3882,7 +20479,13 @@ "icss-utils": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", - "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==" + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "requires": {} + }, + "ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==" }, "ignore": { "version": "4.0.6", @@ -3897,12 +20500,12 @@ "optional": true }, "import-fresh": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-2.0.0.tgz", - "integrity": "sha1-2BNVwVYS04bGH53dOSLUMEgipUY=", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "requires": { - "caller-path": "^2.0.0", - "resolve-from": "^3.0.0" + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" } }, "import-lazy": { @@ -3918,14 +20521,61 @@ "requires": { "pkg-dir": "^4.2.0", "resolve-cwd": "^3.0.0" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "requires": { + "find-up": "^4.0.0" + } + } } }, - "import-modules": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/import-modules/-/import-modules-2.1.0.tgz", - "integrity": "sha512-8HEWcnkbGpovH9yInoisxaSoIg9Brbul+Ju3Kqe2UsYDUBJD/iQjSgEj0zPcTDPKfPp2fs5xlv1i+JSye/m1/A==", - "dev": true - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -3936,16 +20586,6 @@ "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==" }, - "indexes-of": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", - "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=" - }, - "infer-owner": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", - "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==" - }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -3966,15 +20606,71 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, + "inquirer": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.1.2.tgz", + "integrity": "sha512-DHLKJwLPNgkfwNmsuEUKSejJFbkv0FMO9SMiQbjI3n5NQuCrSIBqP66ggqyz2a6t2qEolKrMjhQ3+W/xXgUQ+Q==", + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.1", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.21", + "mute-stream": "0.0.8", + "ora": "^5.3.0", + "run-async": "^2.4.0", + "rxjs": "^7.2.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + } + }, + "inquirer-glob-prompt": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/inquirer-glob-prompt/-/inquirer-glob-prompt-0.1.0.tgz", + "integrity": "sha512-Zw9XYJdrBBJ5TZjLH8Nu8PIa54huvkP0xeNOTtKh3bis0DNAJWMtdpT9PIJBkqheMUnwIPmv8jkjOr7aPKYFqg==", + "requires": { + "chalk": "^4.1.0", + "figures": "^3.2.0", + "globby": "^11.0.3", + "rxjs": "^6.6.7" + }, + "dependencies": { + "rxjs": { + "version": "6.6.7", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz", + "integrity": "sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==", + "requires": { + "tslib": "^1.9.0" + } + } + } + }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, "interpret": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==" }, - "is-absolute-url": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-absolute-url/-/is-absolute-url-2.1.0.tgz", - "integrity": "sha1-UFMN+4T8yap9vnhS6Do3uTufKqY=" + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "requires": { + "kind-of": "^6.0.0" + } }, "is-alphabetical": { "version": "1.0.4", @@ -3997,42 +20693,79 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" }, + "is-bigint": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "dev": true, + "requires": { + "has-bigints": "^1.0.1" + } + }, + "is-boolean-object": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, "is-buffer": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", "dev": true }, - "is-callable": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", - "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==" - }, - "is-color-stop": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-color-stop/-/is-color-stop-1.1.0.tgz", - "integrity": "sha1-z/9HGu5N1cnhWFmPvhKWe1za00U=", + "is-builtin-module": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.1.0.tgz", + "integrity": "sha512-OV7JjAgOTfAFJmHZLvpSTb4qi0nIILDV1gWPYDnDJUTNFM5aGlRAhk4QcT8i7TuAleeEV5Fdkqn3t4mS+Q11fg==", + "dev": true, "requires": { - "css-color-names": "^0.0.4", - "hex-color-regex": "^1.1.0", - "hsl-regex": "^1.0.0", - "hsla-regex": "^1.0.0", - "rgb-regex": "^1.0.1", - "rgba-regex": "^1.0.0" + "builtin-modules": "^3.0.0" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", + "dev": true + }, + "is-ci": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-3.0.0.tgz", + "integrity": "sha512-kDXyttuLeslKAHYL/K28F2YkM3x5jvFPEw3yXbRptXydjD9rpLEz+C5K5iutY9ZiUu6AP41JdvRQwF4Iqs4ZCQ==", + "dev": true, + "requires": { + "ci-info": "^3.1.1" } }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", + "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", "requires": { "has": "^1.0.3" } }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "requires": { + "kind-of": "^6.0.0" + } + }, "is-date-object": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", - "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", + "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-decimal": { "version": "1.0.4", @@ -4040,10 +20773,28 @@ "integrity": "sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw==", "dev": true }, - "is-directory": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz", - "integrity": "sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=" + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + }, + "is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==" + }, + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "requires": { + "is-plain-object": "^2.0.4" + } }, "is-extglob": { "version": "2.1.1", @@ -4055,6 +20806,12 @@ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" }, + "is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true + }, "is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", @@ -4069,33 +20826,59 @@ "integrity": "sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw==", "dev": true }, + "is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==" + }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", + "dev": true }, "is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==" }, - "is-obj": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", - "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==" + "is-number-object": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", + "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", + "dev": true, + "requires": { + "has-tostringtag": "^1.0.0" + } }, "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "requires": { + "isobject": "^3.0.1" + } + }, + "is-potential-custom-element-name": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz", + "integrity": "sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==", "dev": true }, "is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "dev": true, "requires": { - "has-symbols": "^1.0.1" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, "is-regexp": { @@ -4104,36 +20887,27 @@ "integrity": "sha512-OZ4IlER3zmRIoB9AqNhEggVxqIH4ofDns5nRrPS6yQxXE1TPCUpFznBfRQmQa8uC+pXqjMnukiJBxCisIxiLGA==", "dev": true }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==" - }, "is-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.0.tgz", - "integrity": "sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw==" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" }, "is-string": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", - "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", - "dev": true - }, - "is-svg": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz", - "integrity": "sha512-gi4iHK53LR2ujhLVVj+37Ykh9GLqYHX6JOVXbLAucaG/Cqw9xwdFOjDM2qeifLs1sF1npXXFvDu0r5HNgCMrzQ==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "dev": true, "requires": { - "html-comment-regex": "^1.1.0" + "has-tostringtag": "^1.0.0" } }, "is-symbol": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", - "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", + "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "dev": true, "requires": { - "has-symbols": "^1.0.1" + "has-symbols": "^1.0.2" } }, "is-typedarray": { @@ -4142,51 +20916,1050 @@ "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", "dev": true }, + "is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==" + }, "is-what": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.12.0.tgz", - "integrity": "sha512-2ilQz5/f/o9V7WRWJQmpFYNmQFZ9iM+OXRonZKcYgTkCzjb949Vi4h282PD1UfmgHk666rcWonbRJ++KI41VGw==" + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==" + }, + "is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "requires": { + "is-docker": "^2.0.0" + } }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=" + }, + "istanbul-lib-coverage": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz", + "integrity": "sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg==", + "dev": true + }, + "istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "requires": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "dependencies": { + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + } + }, + "istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "requires": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + } + }, + "jest": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest/-/jest-27.0.6.tgz", + "integrity": "sha512-EjV8aETrsD0wHl7CKMibKwQNQc3gIRBXlTikBmmHUeVMKaPFxdcUIBfoDqTSXDoGJIivAYGqCWVlzCSaVjPQsA==", + "dev": true, + "requires": { + "@jest/core": "^27.0.6", + "import-local": "^3.0.2", + "jest-cli": "^27.0.6" + } + }, + "jest-changed-files": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-27.0.6.tgz", + "integrity": "sha512-BuL/ZDauaq5dumYh5y20sn4IISnf1P9A0TDswTxUi84ORGtVa86ApuBHqICL0vepqAnZiY6a7xeSPWv2/yy4eA==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "execa": "^5.0.0", + "throat": "^6.0.1" + } + }, + "jest-circus": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-27.0.6.tgz", + "integrity": "sha512-OJlsz6BBeX9qR+7O9lXefWoc2m9ZqcZ5Ohlzz0pTEAG4xMiZUJoacY8f4YDHxgk0oKYxj277AfOk9w6hZYvi1Q==", + "dev": true, + "requires": { + "@jest/environment": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "dedent": "^0.7.0", + "expect": "^27.0.6", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "pretty-format": "^27.0.6", + "slash": "^3.0.0", + "stack-utils": "^2.0.3", + "throat": "^6.0.1" + } + }, + "jest-cli": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-27.0.6.tgz", + "integrity": "sha512-qUUVlGb9fdKir3RDE+B10ULI+LQrz+MCflEH2UJyoUjoHHCbxDrMxSzjQAPUMsic4SncI62ofYCcAvW6+6rhhg==", + "dev": true, + "requires": { + "@jest/core": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "import-local": "^3.0.2", + "jest-config": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "prompts": "^2.0.1", + "yargs": "^16.0.3" + } + }, + "jest-config": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-27.0.6.tgz", + "integrity": "sha512-JZRR3I1Plr2YxPBhgqRspDE2S5zprbga3swYNrvY3HfQGu7p/GjyLOqwrYad97tX3U3mzT53TPHVmozacfP/3w==", + "dev": true, + "requires": { + "@babel/core": "^7.1.0", + "@jest/test-sequencer": "^27.0.6", + "@jest/types": "^27.0.6", + "babel-jest": "^27.0.6", + "chalk": "^4.0.0", + "deepmerge": "^4.2.2", + "glob": "^7.1.1", + "graceful-fs": "^4.2.4", + "is-ci": "^3.0.0", + "jest-circus": "^27.0.6", + "jest-environment-jsdom": "^27.0.6", + "jest-environment-node": "^27.0.6", + "jest-get-type": "^27.0.6", + "jest-jasmine2": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-runner": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "micromatch": "^4.0.4", + "pretty-format": "^27.0.6" + } + }, + "jest-diff": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-27.0.6.tgz", + "integrity": "sha512-Z1mqgkTCSYaFgwTlP/NUiRzdqgxmmhzHY1Tq17zL94morOHfHu3K4bgSgl+CR4GLhpV8VxkuOYuIWnQ9LnFqmg==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "diff-sequences": "^27.0.6", + "jest-get-type": "^27.0.6", + "pretty-format": "^27.0.6" + } + }, + "jest-docblock": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-27.0.6.tgz", + "integrity": "sha512-Fid6dPcjwepTFraz0YxIMCi7dejjJ/KL9FBjPYhBp4Sv1Y9PdhImlKZqYU555BlN4TQKaTc+F2Av1z+anVyGkA==", + "dev": true, + "requires": { + "detect-newline": "^3.0.0" + } + }, + "jest-each": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-27.0.6.tgz", + "integrity": "sha512-m6yKcV3bkSWrUIjxkE9OC0mhBZZdhovIW5ergBYirqnkLXkyEn3oUUF/QZgyecA1cF1QFyTE8bRRl8Tfg1pfLA==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "jest-get-type": "^27.0.6", + "jest-util": "^27.0.6", + "pretty-format": "^27.0.6" + } + }, + "jest-environment-jsdom": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-27.0.6.tgz", + "integrity": "sha512-FvetXg7lnXL9+78H+xUAsra3IeZRTiegA3An01cWeXBspKXUhAwMM9ycIJ4yBaR0L7HkoMPaZsozCLHh4T8fuw==", + "dev": true, + "requires": { + "@jest/environment": "^27.0.6", + "@jest/fake-timers": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "jest-mock": "^27.0.6", + "jest-util": "^27.0.6", + "jsdom": "^16.6.0" + } + }, + "jest-environment-node": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-27.0.6.tgz", + "integrity": "sha512-+Vi6yLrPg/qC81jfXx3IBlVnDTI6kmRr08iVa2hFCWmJt4zha0XW7ucQltCAPhSR0FEKEoJ3i+W4E6T0s9is0w==", + "dev": true, + "requires": { + "@jest/environment": "^27.0.6", + "@jest/fake-timers": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "jest-mock": "^27.0.6", + "jest-util": "^27.0.6" + } + }, + "jest-extended": { + "version": "0.11.5", + "resolved": "https://registry.npmjs.org/jest-extended/-/jest-extended-0.11.5.tgz", + "integrity": "sha512-3RsdFpLWKScpsLD6hJuyr/tV5iFOrw7v6YjA3tPdda9sJwoHwcMROws5gwiIZfcwhHlJRwFJB2OUvGmF3evV/Q==", + "dev": true, + "requires": { + "expect": "^24.1.0", + "jest-get-type": "^22.4.3", + "jest-matcher-utils": "^22.0.0" + }, + "dependencies": { + "@jest/console": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-24.9.0.tgz", + "integrity": "sha512-Zuj6b8TnKXi3q4ymac8EQfc3ea/uhLeCGThFqXeC8H9/raaH8ARPUTdId+XyGd03Z4In0/VjD2OYFcBF09fNLQ==", + "dev": true, + "requires": { + "@jest/source-map": "^24.9.0", + "chalk": "^2.0.1", + "slash": "^2.0.0" + } + }, + "@jest/source-map": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-24.9.0.tgz", + "integrity": "sha512-/Xw7xGlsZb4MJzNDgB7PW5crou5JqWiBQaz6xyPd3ArOg2nfn/PunV8+olXbbEZzNl591o5rWKE9BRDaFAuIBg==", + "dev": true, + "requires": { + "callsites": "^3.0.0", + "graceful-fs": "^4.1.15", + "source-map": "^0.6.0" + } + }, + "@jest/test-result": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-24.9.0.tgz", + "integrity": "sha512-XEFrHbBonBJ8dGp2JmF8kP/nQI/ImPpygKHwQ/SY+es59Z3L5PI4Qb9TQQMAEeYsThG1xF0k6tmG0tIKATNiiA==", + "dev": true, + "requires": { + "@jest/console": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/istanbul-lib-coverage": "^2.0.0" + } + }, + "@jest/types": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-24.9.0.tgz", + "integrity": "sha512-XKK7ze1apu5JWQ5eZjHITP66AX+QsLlbaJRBGYr8pNzwcAE2JVkwnf0yqjHTsDRcjR0mujy/NmZMXw5kl+kGBw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.0", + "@types/istanbul-reports": "^1.1.1", + "@types/yargs": "^13.0.0" + } + }, + "@types/istanbul-reports": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-1.1.2.tgz", + "integrity": "sha512-P/W9yOX/3oPZSpaYOCQzGqgCQRXn0FFO/V8bWrCQs+wLmvVVxk6CRBXALEvNs9OHIatlnlFokfhuDo2ug01ciw==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "*", + "@types/istanbul-lib-report": "*" + } + }, + "@types/stack-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-1.0.1.tgz", + "integrity": "sha512-l42BggppR6zLmpfU6fq9HEa2oGPEI8yrSPL3GITjfRInppYFahObbIQOQK3UGxEnyQpltZLaPe75046NOZQikw==", + "dev": true + }, + "@types/yargs": { + "version": "13.0.12", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-13.0.12.tgz", + "integrity": "sha512-qCxJE1qgz2y0hA4pIxjBR+PelCH0U5CK1XJXFwCNqfmliatKp47UCXXE9Dyk1OXBDLvsCF57TqQEJaeLfDYEOQ==", + "dev": true, + "requires": { + "@types/yargs-parser": "*" + } + }, + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "diff-sequences": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-24.9.0.tgz", + "integrity": "sha512-Dj6Wk3tWyTE+Fo1rW8v0Xhwk80um6yFYKbuAxc9c3EZxIHFDYwbi34Uk42u1CdnIiVorvt4RmlSDjIPyzGC2ew==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "expect": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/expect/-/expect-24.9.0.tgz", + "integrity": "sha512-wvVAx8XIol3Z5m9zvZXiyZOQ+sRJqNTIm6sGjdWlaZIeupQGO3WbYI+15D/AmEwZywL6wtJkbAbJtzkOfBuR0Q==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-styles": "^3.2.0", + "jest-get-type": "^24.9.0", + "jest-matcher-utils": "^24.9.0", + "jest-message-util": "^24.9.0", + "jest-regex-util": "^24.9.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "jest-matcher-utils": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-24.9.0.tgz", + "integrity": "sha512-OZz2IXsu6eaiMAwe67c1T+5tUAtQyQx27/EMEkbFAGiw52tB9em+uGbzpcgYVpA8wl0hlxKPZxrly4CXU/GjHA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-diff": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + } + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "jest-diff": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-24.9.0.tgz", + "integrity": "sha512-qMfrTs8AdJE2iqrTp0hzh7kTd2PQWrsFyj9tORoKmu32xjPjeE4NyjVRDz8ybYwqS2ik8N4hsIpiVTyFeo2lBQ==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "diff-sequences": "^24.9.0", + "jest-get-type": "^24.9.0", + "pretty-format": "^24.9.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + }, + "jest-get-type": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-24.9.0.tgz", + "integrity": "sha512-lUseMzAley4LhIcpSP9Jf+fTrQ4a1yHQwLNeeVa2cEmbCGeoZAtYPOIv8JaxLD/sUpKxetKGP+gsHl8f8TSj8Q==", + "dev": true + }, + "pretty-format": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-24.9.0.tgz", + "integrity": "sha512-00ZMZUiHaJrNfk33guavqgvfJS30sLYf0f8+Srklv0AMPodGGHcoHgksZ3OThYnIvOd+8yMCn0YiEOogjlgsnA==", + "dev": true, + "requires": { + "@jest/types": "^24.9.0", + "ansi-regex": "^4.0.0", + "ansi-styles": "^3.2.0", + "react-is": "^16.8.4" + } + } + } + }, + "jest-get-type": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz", + "integrity": "sha512-/jsz0Y+V29w1chdXVygEKSz2nBoHoYqNShPe+QgxSNjAuP1i8+k4LbQNrfoliKej0P45sivkSCh7yiD6ubHS3w==", + "dev": true + }, + "jest-matcher-utils": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-22.4.3.tgz", + "integrity": "sha512-lsEHVaTnKzdAPR5t4B6OcxXo9Vy4K+kRRbG5gtddY8lBEC+Mlpvm1CJcsMESRjzUhzkz568exMV1hTB76nAKbA==", + "dev": true, + "requires": { + "chalk": "^2.0.1", + "jest-get-type": "^22.4.3", + "pretty-format": "^22.4.3" + } + }, + "jest-message-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-24.9.0.tgz", + "integrity": "sha512-oCj8FiZ3U0hTP4aSui87P4L4jC37BtQwUMqk+zk/b11FR19BJDeZsZAvIHutWnmtw7r85UmR3CEWZ0HWU2mAlw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@jest/test-result": "^24.9.0", + "@jest/types": "^24.9.0", + "@types/stack-utils": "^1.0.1", + "chalk": "^2.0.1", + "micromatch": "^3.1.10", + "slash": "^2.0.0", + "stack-utils": "^1.0.1" + } + }, + "jest-regex-util": { + "version": "24.9.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-24.9.0.tgz", + "integrity": "sha512-05Cmb6CuxaA+Ys6fjr3PhvV3bGQmO+2p2La4hFbU+W5uOc479f7FdLXUWXw4pYMAhhSZIuKHwSXSu6CsSBAXQA==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "pretty-format": { + "version": "22.4.3", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-22.4.3.tgz", + "integrity": "sha512-S4oT9/sT6MN7/3COoOy+ZJeA92VmOnveLHgrwBE3Z1W5N9S2A1QGNYiE1z75DAENbJrXXUb+OWXhpJcg05QKQQ==", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0", + "ansi-styles": "^3.2.0" + } + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", + "dev": true + }, + "slash": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", + "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "stack-utils": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.5.tgz", + "integrity": "sha512-KZiTzuV3CnSnSvgMRrARVCj+Ht7rMbauGDK0LdVFRGyenwdylpajAp4Q0i6SX8rEmbTpMMf6ryq2gb8pPq2WgQ==", + "dev": true, + "requires": { + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + } + } + }, + "jest-get-type": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-get-type/-/jest-get-type-27.0.6.tgz", + "integrity": "sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg==", + "dev": true + }, + "jest-haste-map": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-27.0.6.tgz", + "integrity": "sha512-4ldjPXX9h8doB2JlRzg9oAZ2p6/GpQUNAeiYXqcpmrKbP0Qev0wdZlxSMOmz8mPOEnt4h6qIzXFLDi8RScX/1w==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "@types/graceful-fs": "^4.1.2", + "@types/node": "*", + "anymatch": "^3.0.3", + "fb-watchman": "^2.0.0", + "fsevents": "^2.3.2", + "graceful-fs": "^4.2.4", + "jest-regex-util": "^27.0.6", + "jest-serializer": "^27.0.6", + "jest-util": "^27.0.6", + "jest-worker": "^27.0.6", + "micromatch": "^4.0.4", + "walker": "^1.0.7" + } + }, + "jest-jasmine2": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-27.0.6.tgz", + "integrity": "sha512-cjpH2sBy+t6dvCeKBsHpW41mjHzXgsavaFMp+VWRf0eR4EW8xASk1acqmljFtK2DgyIECMv2yCdY41r2l1+4iA==", + "dev": true, + "requires": { + "@babel/traverse": "^7.1.0", + "@jest/environment": "^27.0.6", + "@jest/source-map": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "co": "^4.6.0", + "expect": "^27.0.6", + "is-generator-fn": "^2.0.0", + "jest-each": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "pretty-format": "^27.0.6", + "throat": "^6.0.1" + } + }, + "jest-leak-detector": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-27.0.6.tgz", + "integrity": "sha512-2/d6n2wlH5zEcdctX4zdbgX8oM61tb67PQt4Xh8JFAIy6LRKUnX528HulkaG6nD5qDl5vRV1NXejCe1XRCH5gQ==", + "dev": true, + "requires": { + "jest-get-type": "^27.0.6", + "pretty-format": "^27.0.6" + } + }, + "jest-matcher-utils": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-27.0.6.tgz", + "integrity": "sha512-OFgF2VCQx9vdPSYTHWJ9MzFCehs20TsyFi6bIHbk5V1u52zJOnvF0Y/65z3GLZHKRuTgVPY4Z6LVePNahaQ+tA==", + "dev": true, + "requires": { + "chalk": "^4.0.0", + "jest-diff": "^27.0.6", + "jest-get-type": "^27.0.6", + "pretty-format": "^27.0.6" + } + }, + "jest-message-util": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-27.0.6.tgz", + "integrity": "sha512-rBxIs2XK7rGy+zGxgi+UJKP6WqQ+KrBbD1YMj517HYN3v2BG66t3Xan3FWqYHKZwjdB700KiAJ+iES9a0M+ixw==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.12.13", + "@jest/types": "^27.0.6", + "@types/stack-utils": "^2.0.0", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "micromatch": "^4.0.4", + "pretty-format": "^27.0.6", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", + "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.14.5" + } + } + } + }, + "jest-mock": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-27.0.6.tgz", + "integrity": "sha512-lzBETUoK8cSxts2NYXSBWT+EJNzmUVtVVwS1sU9GwE1DLCfGsngg+ZVSIe0yd0ZSm+y791esiuo+WSwpXJQ5Bw==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "@types/node": "*" + } + }, + "jest-pnp-resolver": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz", + "integrity": "sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w==", + "dev": true, + "requires": {} + }, + "jest-regex-util": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-27.0.6.tgz", + "integrity": "sha512-SUhPzBsGa1IKm8hx2F4NfTGGp+r7BXJ4CulsZ1k2kI+mGLG+lxGrs76veN2LF/aUdGosJBzKgXmNCw+BzFqBDQ==", + "dev": true + }, + "jest-resolve": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-27.0.6.tgz", + "integrity": "sha512-yKmIgw2LgTh7uAJtzv8UFHGF7Dm7XfvOe/LQ3Txv101fLM8cx2h1QVwtSJ51Q/SCxpIiKfVn6G2jYYMDNHZteA==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "chalk": "^4.0.0", + "escalade": "^3.1.1", + "graceful-fs": "^4.2.4", + "jest-pnp-resolver": "^1.2.2", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "resolve": "^1.20.0", + "slash": "^3.0.0" + } + }, + "jest-resolve-dependencies": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-27.0.6.tgz", + "integrity": "sha512-mg9x9DS3BPAREWKCAoyg3QucCr0n6S8HEEsqRCKSPjPcu9HzRILzhdzY3imsLoZWeosEbJZz6TKasveczzpJZA==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-snapshot": "^27.0.6" + } + }, + "jest-runner": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-27.0.6.tgz", + "integrity": "sha512-W3Bz5qAgaSChuivLn+nKOgjqNxM7O/9JOJoKDCqThPIg2sH/d4A/lzyiaFgnb9V1/w29Le11NpzTJSzga1vyYQ==", + "dev": true, + "requires": { + "@jest/console": "^27.0.6", + "@jest/environment": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.4", + "jest-docblock": "^27.0.6", + "jest-environment-jsdom": "^27.0.6", + "jest-environment-node": "^27.0.6", + "jest-haste-map": "^27.0.6", + "jest-leak-detector": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-runtime": "^27.0.6", + "jest-util": "^27.0.6", + "jest-worker": "^27.0.6", + "source-map-support": "^0.5.6", + "throat": "^6.0.1" + } + }, + "jest-runtime": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-27.0.6.tgz", + "integrity": "sha512-BhvHLRVfKibYyqqEFkybsznKwhrsu7AWx2F3y9G9L95VSIN3/ZZ9vBpm/XCS2bS+BWz3sSeNGLzI3TVQ0uL85Q==", + "dev": true, + "requires": { + "@jest/console": "^27.0.6", + "@jest/environment": "^27.0.6", + "@jest/fake-timers": "^27.0.6", + "@jest/globals": "^27.0.6", + "@jest/source-map": "^27.0.6", + "@jest/test-result": "^27.0.6", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/yargs": "^16.0.0", + "chalk": "^4.0.0", + "cjs-module-lexer": "^1.0.0", + "collect-v8-coverage": "^1.0.0", + "exit": "^0.1.2", + "glob": "^7.1.3", + "graceful-fs": "^4.2.4", + "jest-haste-map": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-mock": "^27.0.6", + "jest-regex-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-snapshot": "^27.0.6", + "jest-util": "^27.0.6", + "jest-validate": "^27.0.6", + "slash": "^3.0.0", + "strip-bom": "^4.0.0", + "yargs": "^16.0.3" + } + }, + "jest-serializer": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-serializer/-/jest-serializer-27.0.6.tgz", + "integrity": "sha512-PtGdVK9EGC7dsaziskfqaAPib6wTViY3G8E5wz9tLVPhHyiDNTZn/xjZ4khAw+09QkoOVpn7vF5nPSN6dtBexA==", + "dev": true, + "requires": { + "@types/node": "*", + "graceful-fs": "^4.2.4" + } + }, + "jest-snapshot": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-27.0.6.tgz", + "integrity": "sha512-NTHaz8He+ATUagUgE7C/UtFcRoHqR2Gc+KDfhQIyx+VFgwbeEMjeP+ILpUTLosZn/ZtbNdCF5LkVnN/l+V751A==", + "dev": true, + "requires": { + "@babel/core": "^7.7.2", + "@babel/generator": "^7.7.2", + "@babel/parser": "^7.7.2", + "@babel/plugin-syntax-typescript": "^7.7.2", + "@babel/traverse": "^7.7.2", + "@babel/types": "^7.0.0", + "@jest/transform": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/babel__traverse": "^7.0.4", + "@types/prettier": "^2.1.5", + "babel-preset-current-node-syntax": "^1.0.0", + "chalk": "^4.0.0", + "expect": "^27.0.6", + "graceful-fs": "^4.2.4", + "jest-diff": "^27.0.6", + "jest-get-type": "^27.0.6", + "jest-haste-map": "^27.0.6", + "jest-matcher-utils": "^27.0.6", + "jest-message-util": "^27.0.6", + "jest-resolve": "^27.0.6", + "jest-util": "^27.0.6", + "natural-compare": "^1.4.0", + "pretty-format": "^27.0.6", + "semver": "^7.3.2" + } + }, + "jest-util": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-27.0.6.tgz", + "integrity": "sha512-1JjlaIh+C65H/F7D11GNkGDDZtDfMEM8EBXsvd+l/cxtgQ6QhxuloOaiayt89DxUvDarbVhqI98HhgrM1yliFQ==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "@types/node": "*", + "chalk": "^4.0.0", + "graceful-fs": "^4.2.4", + "is-ci": "^3.0.0", + "picomatch": "^2.2.3" + } + }, + "jest-validate": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-27.0.6.tgz", + "integrity": "sha512-yhZZOaMH3Zg6DC83n60pLmdU1DQE46DW+KLozPiPbSbPhlXXaiUTDlhHQhHFpaqIFRrInko1FHXjTRpjWRuWfA==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "camelcase": "^6.2.0", + "chalk": "^4.0.0", + "jest-get-type": "^27.0.6", + "leven": "^3.1.0", + "pretty-format": "^27.0.6" + }, + "dependencies": { + "camelcase": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", + "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", + "dev": true + } + } + }, + "jest-watcher": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-27.0.6.tgz", + "integrity": "sha512-/jIoKBhAP00/iMGnTwUBLgvxkn7vsOweDrOTSPzc7X9uOyUtJIDthQBTI1EXz90bdkrxorUZVhJwiB69gcHtYQ==", + "dev": true, + "requires": { + "@jest/test-result": "^27.0.6", + "@jest/types": "^27.0.6", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "jest-util": "^27.0.6", + "string-length": "^4.0.1" + } + }, "jest-worker": { - "version": "26.6.2", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-26.6.2.tgz", - "integrity": "sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==", + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", + "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", "requires": { "@types/node": "*", "merge-stream": "^2.0.0", - "supports-color": "^7.0.0" + "supports-color": "^8.0.0" }, "dependencies": { - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", "requires": { "has-flag": "^4.0.0" } } } }, + "joycon": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/joycon/-/joycon-3.0.1.tgz", + "integrity": "sha512-SJcJNBg32dGgxhPtM0wQqxqV0ax9k/9TaUskGDSJkSFSQOEWWvQ3zzWdGQRIUry2j1zA5+ReH13t0Mf3StuVZA==" + }, "jquery": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.5.1.tgz", - "integrity": "sha512-XwIBPqcMn57FxfT+Go5pzySnm4KWkT1Tv7gjrpT1srtf8Weynl6R273VJ5GjkRb51IzMp5nbaPjJXMWeju2MKg==" + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" }, "jquery.are-you-sure": { "version": "1.9.0", @@ -4205,11 +21978,198 @@ "version": "3.14.1", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" } }, + "jscodeshift": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/jscodeshift/-/jscodeshift-0.11.0.tgz", + "integrity": "sha512-SdRK2C7jjs4k/kT2mwtO07KJN9RnjxtKn03d9JVj6c3j9WwaLcFYsICYDnLAzY0hp+wG2nxl+Cm2jWLiNVYb8g==", + "requires": { + "@babel/core": "^7.1.6", + "@babel/parser": "^7.1.6", + "@babel/plugin-proposal-class-properties": "^7.1.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.1.0", + "@babel/plugin-proposal-optional-chaining": "^7.1.0", + "@babel/plugin-transform-modules-commonjs": "^7.1.0", + "@babel/preset-flow": "^7.0.0", + "@babel/preset-typescript": "^7.1.0", + "@babel/register": "^7.0.0", + "babel-core": "^7.0.0-bridge.0", + "colors": "^1.1.2", + "flow-parser": "0.*", + "graceful-fs": "^4.2.4", + "micromatch": "^3.1.10", + "neo-async": "^2.5.0", + "node-dir": "^0.1.17", + "recast": "^0.20.3", + "temp": "^0.8.1", + "write-file-atomic": "^2.3.0" + }, + "dependencies": { + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + } + } + }, + "jsdom": { + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-16.7.0.tgz", + "integrity": "sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw==", + "dev": true, + "requires": { + "abab": "^2.0.5", + "acorn": "^8.2.4", + "acorn-globals": "^6.0.0", + "cssom": "^0.4.4", + "cssstyle": "^2.3.0", + "data-urls": "^2.0.0", + "decimal.js": "^10.2.1", + "domexception": "^2.0.1", + "escodegen": "^2.0.0", + "form-data": "^3.0.0", + "html-encoding-sniffer": "^2.0.1", + "http-proxy-agent": "^4.0.1", + "https-proxy-agent": "^5.0.0", + "is-potential-custom-element-name": "^1.0.1", + "nwsapi": "^2.2.0", + "parse5": "6.0.1", + "saxes": "^5.0.1", + "symbol-tree": "^3.2.4", + "tough-cookie": "^4.0.0", + "w3c-hr-time": "^1.0.2", + "w3c-xmlserializer": "^2.0.0", + "webidl-conversions": "^6.1.0", + "whatwg-encoding": "^1.0.5", + "whatwg-mimetype": "^2.3.0", + "whatwg-url": "^8.5.0", + "ws": "^7.4.6", + "xml-name-validator": "^3.0.0" + }, + "dependencies": { + "acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "dev": true + } + } + }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -4223,8 +22183,7 @@ "json-parse-even-better-errors": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", - "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", - "dev": true + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==" }, "json-schema-traverse": { "version": "0.4.1", @@ -4238,22 +22197,35 @@ "dev": true }, "json5": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz", - "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", + "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "requires": { "minimist": "^1.2.5" } }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, "khroma": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/khroma/-/khroma-1.1.0.tgz", - "integrity": "sha512-aTO+YX22tYOLEQJYFiatAj1lc5QZ+H5sHWFRBWNCiKwc5NWNUJZyeSeiHEPeURJ2a1GEVYcmyMUwGjjLe5ec5A==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/khroma/-/khroma-1.4.1.tgz", + "integrity": "sha512-+GmxKvmiRuCcUYDgR7g5Ngo0JEDeOsGdNONdU2zsiBQaK4z19Y2NvXqfEDE0ZiIrg45GTZyAnPLVsLZZACYm3Q==" }, "kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==" + }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", "dev": true }, "klona": { @@ -4262,15 +22234,15 @@ "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==" }, "known-css-properties": { - "version": "0.20.0", - "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.20.0.tgz", - "integrity": "sha512-URvsjaA9ypfreqJ2/ylDr5MUERhJZ+DhguoWRr2xgS5C7aGCalXo+ewL+GixgKBfhT2vuL02nbIgNGqVWgTOYw==", + "version": "0.21.0", + "resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.21.0.tgz", + "integrity": "sha512-sZLUnTqimCkvkgRS+kbPlYW5o8q5w1cu+uIisKpEWkj31I8mx8kNG162DwRav8Zirkva6N5uoFsm9kzK4mUXjw==", "dev": true }, "less": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/less/-/less-4.0.0.tgz", - "integrity": "sha512-av1eEa2D0xZfF7fjLJS/Dld7zAYSLU7EOEJvuOELeaNI3i6L/81AdjbK5/pytaRkBwi7ZEa0433IDvMLskKCOw==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/less/-/less-4.1.1.tgz", + "integrity": "sha512-w09o8tZFPThBscl5d0Ggp3RcrKIouBoQscnOMgFH3n5V3kN/CXGHNfCkRPtxJk6nKryDXaV9aHLK55RXuH4sAw==", "requires": { "copy-anything": "^2.0.1", "errno": "^0.1.1", @@ -4278,7 +22250,7 @@ "image-size": "~0.5.0", "make-dir": "^2.1.0", "mime": "^1.4.1", - "native-request": "^1.0.5", + "needle": "^2.5.2", "parse-node-version": "^1.0.1", "source-map": "~0.6.0", "tslib": "^1.10.0" @@ -4294,6 +22266,18 @@ "semver": "^5.6.0" } }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "optional": true + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "optional": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4303,37 +22287,19 @@ } }, "less-loader": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-7.2.0.tgz", - "integrity": "sha512-C/08kYL2+wFLFQ/c8tey4qX6xpPVtBBwGa9gtpI/bktWpSUaUkZxeOUMM2zGDrQ4s/ZVpA+Rv2RyIvwEXNVuIg==", + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/less-loader/-/less-loader-10.0.1.tgz", + "integrity": "sha512-Crln//HpW9M5CbtdfWm3IO66Cvx1WhZQvNybXgfB2dD/6Sav9ppw+IWqs/FQKPBFO4B6X0X28Z0WNznshgwUzA==", "requires": { - "klona": "^2.0.4", - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } + "klona": "^2.0.4" } }, + "leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -4360,32 +22326,25 @@ "wrap-ansi": "^6.1.0" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "webpack-sources": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", + "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "requires": { + "source-list-map": "^2.0.0", + "source-map": "~0.6.1" + } + }, "wrap-ansi": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", @@ -4401,91 +22360,90 @@ "lines-and-columns": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", - "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=", - "dev": true + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA=" }, "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", + "parse-json": "^4.0.0", + "pify": "^3.0.0", "strip-bom": "^3.0.0" }, "dependencies": { "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true } } }, "loader-runner": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.1.0.tgz", - "integrity": "sha512-oR4lB4WvwFoC70ocraKhn5nkKSs23t57h9udUgw8o0iH8hMXeEoRuUgfcvgUwAJ1ZpRqBvcou4N2SMvM1DwMrA==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==" }, "loader-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", - "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", + "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", "requires": { "big.js": "^5.2.2", "emojis-list": "^3.0.0", - "json5": "^1.0.1" - }, - "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "requires": { - "minimist": "^1.2.0" - } - } + "json5": "^2.1.2" } }, "locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, "requires": { - "p-locate": "^4.1.0" + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==" + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, "lodash._reinterpolate": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=" }, - "lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", "dev": true }, - "lodash.memoize": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz", - "integrity": "sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4=" + "lodash.debounce": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", + "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", + "peer": true + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true }, "lodash.template": { "version": "4.5.0", @@ -4504,75 +22462,19 @@ "lodash._reinterpolate": "^3.0.0" } }, - "lodash.uniq": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", - "integrity": "sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=" - }, - "lodash.zip": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.zip/-/lodash.zip-4.2.0.tgz", - "integrity": "sha1-7GZi5IlkCO1KtsVCo5kLcswIACA=", + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", "dev": true }, "log-symbols": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", - "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", - "dev": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", "requires": { - "chalk": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" } }, "longest-streak": { @@ -4581,11 +22483,6 @@ "integrity": "sha512-vM6rUVCVUJJt33bnmHiZEvr7wPT78ztX7rojL+LW51bHtLh6HTjx84LA5W4+oa6aKEJA7jJu5LR6vQRBpA5DVg==", "dev": true }, - "lower-case": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", - "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=" - }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -4598,6 +22495,7 @@ "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, "requires": { "semver": "^6.0.0" }, @@ -4605,20 +22503,43 @@ "semver": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==" + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, + "makeerror": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", + "integrity": "sha1-4BpckQnyr3lmDk6LlYd5AYT1qWw=", + "dev": true, + "requires": { + "tmpl": "1.0.x" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=" + }, "map-obj": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.1.0.tgz", - "integrity": "sha512-glc9y00wgtwcDmp7GaE/0b0OnxpNJsVf3ael/An6Fe2Q51LLwN1er6sdomLRzz5h0+yMpiYLhWYF5R7HeqVd4g==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", "dev": true }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "requires": { + "object-visit": "^1.0.0" + } + }, "marked": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.7.tgz", - "integrity": "sha512-No11hFYcXr/zkBvL6qFmAp1z6BKY3zqLMHny/JN/ey+al7qwCM2+CMBL9BOgqMxZU36fz4cCWfn2poWIf7QRXA==" + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/marked/-/marked-2.1.3.tgz", + "integrity": "sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==" }, "mathml-tag-names": { "version": "2.1.3", @@ -4627,9 +22548,9 @@ "dev": true }, "mdast-util-from-markdown": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.4.tgz", - "integrity": "sha512-jj891B5pV2r63n2kBTFh8cRI2uR9LQHsXG1zSDqfhXkIlDzrTcIlbB5+5aaYEkl8vOPIOPLf8VT7Ere1wWTMdw==", + "version": "0.8.5", + "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-0.8.5.tgz", + "integrity": "sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==", "dev": true, "requires": { "@types/mdast": "^3.0.0", @@ -4640,9 +22561,9 @@ } }, "mdast-util-to-markdown": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.2.tgz", - "integrity": "sha512-iRczns6WMvu0hUw02LXsPDJshBIwtUPbvHBWo19IQeU0YqmzlA8Pd30U8V7uiI0VPkxzS7A/NXBXH6u+HS87Zg==", + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/mdast-util-to-markdown/-/mdast-util-to-markdown-0.6.5.tgz", + "integrity": "sha512-XeV9sDE7ZlOQvs45C9UKMtfTcctcaj/pGwH8YLbMHoMOXNNCn2LsqVQOqrF1+/NU8lKDAqozme9SCXWyo9oAcQ==", "dev": true, "requires": { "@types/unist": "^2.0.0", @@ -4660,18 +22581,20 @@ "dev": true }, "mdn-data": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.4.tgz", - "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==" + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz", + "integrity": "sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==", + "dev": true }, "meow": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.0.tgz", - "integrity": "sha512-fNWkgM1UVMey2kf24yLiccxLihc5W+6zVus3/N0b+VfnJgxV99E9u04X6NAiKdg6ED7DAQBX5sy36NM0QJZkWA==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", "dev": true, "requires": { "@types/minimist": "^1.2.0", "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", "decamelize-keys": "^1.1.0", "hard-rejection": "^2.1.0", "minimist-options": "4.1.0", @@ -4683,39 +22606,76 @@ "yargs-parser": "^20.2.3" }, "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, "hosted-git-info": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz", - "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.0.2.tgz", + "integrity": "sha512-c9OGXbZ3guC/xOlCg1Ci/VgWlwsqDv1yMQL1CWqXDL0hDjXuNcq0zuR4xqPSuasI3kqFDhqSyTjREz5gzq0fXg==", "dev": true, "requires": { "lru-cache": "^6.0.0" } }, - "normalize-package-data": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.0.tgz", - "integrity": "sha512-6lUjEI0d3v6kFrtgA/lOx4zHCWULXsFNIjHolnZCKCTLA6m/G625cdn3O7eNmT0iD3jfo6HZ9cdImGZwf21prw==", + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, "requires": { - "hosted-git-info": "^3.0.6", - "resolve": "^1.17.0", - "semver": "^7.3.2", + "p-locate": "^4.1.0" + } + }, + "normalize-package-data": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.2.tgz", + "integrity": "sha512-6CdZocmfGaKnIHPVFhJJZ3GuR8SsLKvDANFp47Jmy51aKIr8akjAWTSxtpI+MBgBFdSMRyo4hMpDlT6dTffgZg==", + "dev": true, + "requires": { + "hosted-git-info": "^4.0.1", + "resolve": "^1.20.0", + "semver": "^7.3.4", "validate-npm-package-license": "^3.0.1" } }, - "parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", - "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" + "p-try": "^2.0.0" } }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, "read-pkg": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", @@ -4729,9 +22689,9 @@ }, "dependencies": { "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", "dev": true }, "normalize-package-data": { @@ -4779,15 +22739,6 @@ } } }, - "semver": { - "version": "7.3.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", - "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, "type-fest": { "version": "0.18.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", @@ -4822,27 +22773,26 @@ "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==" }, "mermaid": { - "version": "8.8.4", - "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-8.8.4.tgz", - "integrity": "sha512-YPn35uEAIrOcsDPjCiKNXXBdO1Aoazsv2zTZjG4+oXa7+tTVUb5sI81NqaTYa47RnoH9Vl4waLlEEJfB8KM9VA==", + "version": "8.11.5", + "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-8.11.5.tgz", + "integrity": "sha512-lbIaDQlFoIQLxnLy8hZgfS6L7gt2Wxlk83fudLslUEhj4yafHyVjzGOlojJQxgsLU5khEANhxLbo0xebtOrhXQ==", "requires": { "@braintree/sanitize-url": "^3.1.0", + "@percy/migrate": "^0.10.0", "d3": "^5.7.0", - "dagre": "^0.8.4", + "dagre": "^0.8.5", "dagre-d3": "^0.6.4", - "entity-decode": "^2.0.2", - "graphlib": "^2.1.7", - "he": "^1.2.0", - "khroma": "^1.1.0", - "minify": "^4.1.1", - "moment-mini": "^2.22.1", - "stylis": "^3.5.2" + "dompurify": "2.3.0", + "graphlib": "^2.1.8", + "khroma": "^1.4.1", + "moment-mini": "^2.24.0", + "stylis": "^4.0.10" } }, "micromark": { - "version": "2.11.2", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.2.tgz", - "integrity": "sha512-IXuP76p2uj8uMg4FQc1cRE7lPCLsfAXuEfdjtdO55VRiFO1asrCSQ5g43NmPqFtRwzEnEhafRVzn2jg0UiKArQ==", + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-2.11.4.tgz", + "integrity": "sha512-+WoovN/ppKolQOFIAajxi7Lu9kInbPxFuTBVEavFcL8eAfVstoc5MocPmqBeAdBOJV00uaVjegzH4+MA0DN/uA==", "dev": true, "requires": { "debug": "^4.0.0", @@ -4850,12 +22800,12 @@ } }, "micromatch": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", - "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz", + "integrity": "sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg==", "requires": { "braces": "^3.0.1", - "picomatch": "^2.0.5" + "picomatch": "^2.2.3" } }, "mime": { @@ -4865,16 +22815,16 @@ "optional": true }, "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==" }, "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", "requires": { - "mime-db": "1.44.0" + "mime-db": "1.49.0" } }, "mimic-fn": { @@ -4889,49 +22839,11 @@ "dev": true }, "mini-css-extract-plugin": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.3.tgz", - "integrity": "sha512-7lvliDSMiuZc81kI+5/qxvn47SCM7BehXex3f2c6l/pR3Goj58IQxZh9nuPQ3AkGQgoETyXuIqLDaO5Oa0TyBw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.2.0.tgz", + "integrity": "sha512-91HeVHbq7PUJ4TwOuMTlFWfVWrLqf3SF0PlEDPV+wtgsfxrMebN9LLzflyQqdKLp4/H3PexRB1WLKsCqpWKkxQ==", "requires": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0", - "webpack-sources": "^1.1.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } - }, - "minify": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/minify/-/minify-4.1.3.tgz", - "integrity": "sha512-ykuscavxivSmVpcCzsXmsVTukWYLUUtPhHj0w2ILvHDGqC+hsuTCihBn9+PJBd58JNvWTNg9132J9nrrI2anzA==", - "requires": { - "clean-css": "^4.1.6", - "css-b64-images": "~0.2.5", - "debug": "^4.1.0", - "html-minifier": "^4.0.0", - "terser": "^4.0.0", - "try-catch": "^2.0.0", - "try-to-catch": "^1.0.2" + "schema-utils": "^3.1.0" } }, "minimatch": { @@ -4956,61 +22868,41 @@ "arrify": "^1.0.1", "is-plain-obj": "^1.1.0", "kind-of": "^6.0.3" - }, - "dependencies": { - "is-plain-obj": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true - } } }, "minipass": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", + "dev": true, "requires": { "yallist": "^4.0.0" } }, - "minipass-collect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", - "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", - "requires": { - "minipass": "^3.0.0" - } - }, - "minipass-pipeline": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", - "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", - "requires": { - "minipass": "^3.0.0" - } - }, "minizlib": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, "requires": { "minipass": "^3.0.0", "yallist": "^4.0.0" } }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + } + }, "mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true }, "moment-mini": { "version": "2.24.0", @@ -5018,28 +22910,16 @@ "integrity": "sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ==" }, "monaco-editor": { - "version": "0.21.2", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.21.2.tgz", - "integrity": "sha512-jS51RLuzMaoJpYbu7F6TPuWpnWTLD4kjRW0+AZzcryvbxrTwhNy1KC9yboyKpgMTahpUbDUsuQULoo0GV1EPqg==" + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.27.0.tgz", + "integrity": "sha512-UhwP78Wb8w0ZSYoKXQNTV/0CHObp6NS3nCt51QfKE6sKyBo5PBsvuDOHoI2ooBakc6uIwByRLHVeT7+yXQe2fQ==" }, "monaco-editor-webpack-plugin": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-2.1.0.tgz", - "integrity": "sha512-DG7Dpo/ItWEOl/BG2egc/UIiHoCbHjq0EOF0E6eJQT+6QNZBOfSVU4GxaXG+kQJXB8rauxli96Xp1ITnNLZtSw==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-4.1.2.tgz", + "integrity": "sha512-snmHecygICKT0UlHhva+Cs2WaLPpxy3111xbvInhjjTr5m0xQTFHlmJ2QQDcB14Vzmm7f07uc1TtbvOpmL50BA==", "requires": { "loader-utils": "^2.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - } } }, "ms": { @@ -5053,16 +22933,33 @@ "integrity": "sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw==", "dev": true }, - "nanoid": { - "version": "3.1.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.20.tgz", - "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==" + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==" }, - "native-request": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/native-request/-/native-request-1.0.8.tgz", - "integrity": "sha512-vU2JojJVelUGp6jRcLwToPoWGxSx23z/0iX+I77J3Ht17rf2INGjrhOoQnjVo60nQd8wVsgzKkPfRXBiVdD2ag==", - "optional": true + "nanoid": { + "version": "3.1.25", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", + "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==" + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } }, "natural-compare": { "version": "1.4.0", @@ -5070,23 +22967,62 @@ "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", "dev": true }, + "needle": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.8.0.tgz", + "integrity": "sha512-ZTq6WYkN/3782H1393me3utVYdq2XyqNUFBsprEE3VMAT0+hP/cItpnITpqsY6ep2yeFE4Tqtqwc74VqUlUYtw==", + "optional": true, + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "optional": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" }, - "no-case": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", - "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", + "node-dir": { + "version": "0.1.17", + "resolved": "https://registry.npmjs.org/node-dir/-/node-dir-0.1.17.tgz", + "integrity": "sha1-X1Zl2TNRM1yqvvjxxVRRbPXx5OU=", "requires": { - "lower-case": "^1.1.1" + "minimatch": "^3.0.2" } }, + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true + }, + "node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs=", + "dev": true + }, + "node-modules-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz", + "integrity": "sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA=" + }, "node-releases": { - "version": "1.1.67", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.67.tgz", - "integrity": "sha512-V5QF9noGFl3EymEwUYzO+3NTDpGfQB4ve6Qfnzf3UNydMhjQRVPR1DZTuvWiLzaFJYw2fmDwAfnRNEVb64hSIg==" + "version": "1.1.74", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.74.tgz", + "integrity": "sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==" }, "normalize-package-data": { "version": "2.5.0", @@ -5098,8 +23034,22 @@ "resolve": "^1.10.0", "semver": "2 || 3 || 4 || 5", "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, "normalize-range": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz", @@ -5112,11 +23062,6 @@ "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=", "dev": true }, - "normalize-url": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-3.3.0.tgz", - "integrity": "sha512-U+JJi7duF1o+u2pynbp2zXDW2/PADgC30f0GsHZtRh+HOcXHnw137TrNlyxxRvWW5fjKd3bcLHPxofWuCjaeZg==" - }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -5126,11 +23071,12 @@ } }, "nth-check": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-1.0.2.tgz", - "integrity": "sha512-WeBOdju8SnzPN5vTUJYxYUxLeXpCaVP5i5e0LF8fg7WORF2Wd7wFX/pk0tYZk7s8T+J7VLy0Da6J1+wCT0AtHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.0.0.tgz", + "integrity": "sha512-i4sc/Kj8htBrAiH1viZ0TgU8Y5XqCaV/FziYK6TBczxmeKm3AEFWqqF3195yKudrarqy7Zu80Ra5dobFjn9X/Q==", + "dev": true, "requires": { - "boolbase": "~1.0.0" + "boolbase": "^1.0.0" } }, "num2fraction": { @@ -5139,21 +23085,102 @@ "integrity": "sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4=", "dev": true }, + "nwsapi": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/nwsapi/-/nwsapi-2.2.0.tgz", + "integrity": "sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==", + "dev": true + }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, "object-inspect": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", - "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==" + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", + "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", + "dev": true }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "requires": { + "isobject": "^3.0.0" + } + }, "object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", @@ -5165,25 +23192,23 @@ "object-keys": "^1.1.1" } }, - "object.getownpropertydescriptors": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.1.tgz", - "integrity": "sha512-6DtXgZ/lIZ9hqx4GtZETobXLR/ZLaa0aqV0kzbn80Rf8Z2e/XFnhA0I7p07N2wH8bBBltr2xQPi6sbKWAY2Eng==", + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1" + "isobject": "^3.0.1" } }, "object.values": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", - "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.4.tgz", + "integrity": "sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg==", + "dev": true, "requires": { - "call-bind": "^1.0.0", + "call-bind": "^1.0.2", "define-properties": "^1.1.3", - "es-abstract": "^1.18.0-next.1", - "has": "^1.0.3" + "es-abstract": "^1.18.2" } }, "once": { @@ -5216,58 +23241,63 @@ "word-wrap": "^1.2.3" } }, - "p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", "requires": { - "p-try": "^2.0.0" + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "p-each-series": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-2.2.0.tgz", + "integrity": "sha512-ycIL2+1V32th+8scbpTvyHNaHe02z0sjgh91XXjAk+ZeXoPN4Z46DVUnzdso0aX4KckKw0FNNFHdjZ2UsZvxiA==", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" } }, "p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, "requires": { - "p-limit": "^2.2.0" - } - }, - "p-map": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", - "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", - "requires": { - "aggregate-error": "^3.0.0" + "p-limit": "^1.1.0" } }, "p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==" - }, - "param-case": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", - "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", - "requires": { - "no-case": "^2.2.0" - } + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", - "dev": true, "requires": { "callsites": "^3.0.0" - }, - "dependencies": { - "callsites": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", - "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", - "dev": true - } } }, "parse-entities": { @@ -5285,23 +23315,41 @@ } }, "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", "requires": { + "@babel/code-frame": "^7.0.0", "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" } }, + "parse-ms": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", + "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==" + }, "parse-node-version": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==" }, + "parse5": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", + "integrity": "sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=" + }, "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -5314,44 +23362,50 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==" }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "dev": true, - "requires": { - "pify": "^2.0.0" - }, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==" }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==" }, "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + }, + "pirates": { "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "optional": true + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.1.tgz", + "integrity": "sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA==", + "requires": { + "node-modules-regexp": "^1.0.0" + } }, "pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, "requires": { - "find-up": "^4.0.0" + "find-up": "^2.1.0" + } + }, + "pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-up/-/pkg-up-2.0.0.tgz", + "integrity": "sha1-yBmscoBZpGHKscOImivjxJoATX8=", + "dev": true, + "requires": { + "find-up": "^2.1.0" } }, "pluralize": { @@ -5365,269 +23419,19 @@ "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.16.1.tgz", "integrity": "sha512-Wb4p1J4zyFTbM+u6WuO4XstYx4Ky9Cewe4DWrel7B0w6VVICvPwdOpotjzcf6eD8TsckVnIMNONQyPIUFOUbCQ==" }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" + }, "postcss": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.1.tgz", - "integrity": "sha512-RhsqOOAQzTgh1UB/IZdca7F9WDb7SUCR2Vnv1x7DbvuuggQIpoDwjK+q0rzoPffhYvWNKX5JSwS4so4K3UC6vA==", + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", + "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", "requires": { - "colorette": "^1.2.1", - "nanoid": "^3.1.20", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - } - } - }, - "postcss-calc": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/postcss-calc/-/postcss-calc-7.0.5.tgz", - "integrity": "sha512-1tKHutbGtLtEZF6PT4JSihCHfIVldU72mZ8SdZHIYriIZ9fh9k9aWSppaT8rHsyI3dX+KSR+W+Ix9BMY3AODrg==", - "requires": { - "postcss": "^7.0.27", - "postcss-selector-parser": "^6.0.2", - "postcss-value-parser": "^4.0.2" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-colormin": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-4.0.3.tgz", - "integrity": "sha512-WyQFAdDZpExQh32j0U0feWisZ0dmOtPl44qYmJKkq9xFWY3p+4qnRzCHeNrkeRhwPHz9bQ3mo0/yVkaply0MNw==", - "requires": { - "browserslist": "^4.0.0", - "color": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-convert-values": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-4.0.1.tgz", - "integrity": "sha512-Kisdo1y77KUC0Jmn0OXU/COOJbzM8cImvw1ZFsBgBgMgb1iL23Zs/LXRe3r+EZqM3vGYKdQ2YJVQ5VkJI+zEJQ==", - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-discard-comments": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-4.0.2.tgz", - "integrity": "sha512-RJutN259iuRf3IW7GZyLM5Sw4GLTOH8FmsXBnv8Ab/Tc2k4SR4qbV4DNbyyY4+Sjo362SyDmW2DQ7lBSChrpkg==", - "requires": { - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-discard-duplicates": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-4.0.2.tgz", - "integrity": "sha512-ZNQfR1gPNAiXZhgENFfEglF93pciw0WxMkJeVmw8eF+JZBbMD7jp6C67GqJAXVZP2BWbOztKfbsdmMp/k8c6oQ==", - "requires": { - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-discard-empty": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-4.0.1.tgz", - "integrity": "sha512-B9miTzbznhDjTfjvipfHoqbWKwd0Mj+/fL5s1QOz06wufguil+Xheo4XpOnc4NqKYBCNqqEzgPv2aPBIJLox0w==", - "requires": { - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-discard-overridden": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-4.0.1.tgz", - "integrity": "sha512-IYY2bEDD7g1XM1IDEsUT4//iEYCxAmP5oDSFMVU/JVvT7gh+l4fmjciLqGgwjdWpQIdb0Che2VX00QObS5+cTg==", - "requires": { - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" } }, "postcss-html": { @@ -5639,6 +23443,36 @@ "htmlparser2": "^3.10.0" }, "dependencies": { + "dom-serializer": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", + "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", + "dev": true, + "requires": { + "domelementtype": "^2.0.1", + "entities": "^2.0.0" + }, + "dependencies": { + "domelementtype": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", + "dev": true + }, + "entities": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", + "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", + "dev": true + } + } + }, + "domelementtype": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", + "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", + "dev": true + }, "domhandler": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz", @@ -5648,6 +23482,16 @@ "domelementtype": "1" } }, + "domutils": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.7.0.tgz", + "integrity": "sha512-Lgd2XcJ/NjEw+7tFvfKxOzCYKZsdct5lczQ2ZaQY8Djz7pfAD3Gbp8ySJWtreII/vDlMVmxwa6pHmdxIYgttDg==", + "dev": true, + "requires": { + "dom-serializer": "0", + "domelementtype": "1" + } + }, "entities": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", @@ -5679,10 +23523,68 @@ "postcss": "^7.0.14" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -5713,268 +23615,11 @@ "integrity": "sha1-J7Ocb02U+Bsac7j3Y1HGCeXO8kQ=", "dev": true }, - "postcss-merge-longhand": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-4.0.11.tgz", - "integrity": "sha512-alx/zmoeXvJjp7L4mxEMjh8lxVlDFX1gqWHzaaQewwMZiVhLo42TEClKaeHbRf6J7j82ZOdTJ808RtN0ZOZwvw==", - "requires": { - "css-color-names": "0.0.4", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "stylehacks": "^4.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-merge-rules": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-4.0.3.tgz", - "integrity": "sha512-U7e3r1SbvYzO0Jr3UT/zKBVgYYyhAz0aitvGIYOYK5CPmkNih+WDSsS5tvPrJ8YMQYlEMvsZIiqmn7HdFUaeEQ==", - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "cssnano-util-same-parent": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0", - "vendors": "^1.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-minify-font-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-4.0.2.tgz", - "integrity": "sha512-j85oO6OnRU9zPf04+PZv1LYIYOprWm6IA6zkXkrJXyRveDEuQggG6tvoy8ir8ZwjLxLuGfNkCZEQG7zan+Hbtg==", - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-minify-gradients": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-4.0.2.tgz", - "integrity": "sha512-qKPfwlONdcf/AndP1U8SJ/uzIJtowHlMaSioKzebAXSG4iJthlWC9iSWznQcX4f66gIWX44RSA841HTHj3wK+Q==", - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "is-color-stop": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-minify-params": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-4.0.2.tgz", - "integrity": "sha512-G7eWyzEx0xL4/wiBBJxJOz48zAKV2WG3iZOqVhPet/9geefm/Px5uo1fzlHu+DOjT+m0Mmiz3jkQzVHe6wxAWg==", - "requires": { - "alphanum-sort": "^1.0.0", - "browserslist": "^4.0.0", - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-minify-selectors": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-4.0.2.tgz", - "integrity": "sha512-D5S1iViljXBj9kflQo4YutWnJmwm8VvIsU1GeXJGiG9j8CIg9zs4voPMdQDUmIxetUOh60VilsNzCiAFTOqu3g==", - "requires": { - "alphanum-sort": "^1.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "postcss-modules-extract-imports": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", - "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==" + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -6002,478 +23647,6 @@ "icss-utils": "^5.0.0" } }, - "postcss-normalize-charset": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz", - "integrity": "sha512-gMXCrrlWh6G27U0hF3vNvR3w8I1s2wOBILvA87iNXaPvSNo5uZAMYsZG7XjCUf1eVxuPfyL4TJ7++SGZLc9A3g==", - "requires": { - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-display-values": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-4.0.2.tgz", - "integrity": "sha512-3F2jcsaMW7+VtRMAqf/3m4cPFhPD3EFRgNs18u+k3lTJJlVe7d0YPO+bnwqo2xg8YiRpDXJI2u8A0wqJxMsQuQ==", - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-positions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-4.0.2.tgz", - "integrity": "sha512-Dlf3/9AxpxE+NF1fJxYDeggi5WwV35MXGFnnoccP/9qDtFrTArZ0D0R+iKcg5WsUd8nUYMIl8yXDCtcrT8JrdA==", - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-repeat-style": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-4.0.2.tgz", - "integrity": "sha512-qvigdYYMpSuoFs3Is/f5nHdRLJN/ITA7huIoCyqqENJe9PvPmLhNLMu7QTjPdtnVf6OcYYO5SHonx4+fbJE1+Q==", - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-string": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-4.0.2.tgz", - "integrity": "sha512-RrERod97Dnwqq49WNz8qo66ps0swYZDSb6rM57kN2J+aoyEAJfZ6bMx0sx/F9TIEX0xthPGCmeyiam/jXif0eA==", - "requires": { - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-timing-functions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-4.0.2.tgz", - "integrity": "sha512-acwJY95edP762e++00Ehq9L4sZCEcOPyaHwoaFOhIwWCDfik6YvqsYNxckee65JHLKzuNSSmAdxwD2Cud1Z54A==", - "requires": { - "cssnano-util-get-match": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-unicode": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-4.0.1.tgz", - "integrity": "sha512-od18Uq2wCYn+vZ/qCOeutvHjB5jm57ToxRaMeNuf0nWVHaP9Hua56QyMF6fs/4FSUnVIw0CBPsU0K4LnBPwYwg==", - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-url": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-4.0.1.tgz", - "integrity": "sha512-p5oVaF4+IHwu7VpMan/SSpmpYxcJMtkGppYf0VbdH5B6hN8YNmVyJLuY9FmLQTzY3fag5ESUUHDqM+heid0UVA==", - "requires": { - "is-absolute-url": "^2.0.0", - "normalize-url": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-normalize-whitespace": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-4.0.2.tgz", - "integrity": "sha512-tO8QIgrsI3p95r8fyqKV+ufKlSHh9hMJqACqbv2XknufqEDhDvbguXGBBqxw9nsQoXWf0qOqppziKJKHMD4GtA==", - "requires": { - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-ordered-values": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-4.1.2.tgz", - "integrity": "sha512-2fCObh5UanxvSxeXrtLtlwVThBvHn6MQcu4ksNT2tsaV2Fg76R2CV98W7wNSlX+5/pFwEyaDwKLLoEV7uRybAw==", - "requires": { - "cssnano-util-get-arguments": "^4.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-reduce-initial": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-4.0.3.tgz", - "integrity": "sha512-gKWmR5aUulSjbzOfD9AlJiHCGH6AEVLaM0AV+aSioxUDd16qXP1PCh8d1/BGVvpdWn8k/HiK7n6TjeoXN1F7DA==", - "requires": { - "browserslist": "^4.0.0", - "caniuse-api": "^3.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "postcss-reduce-transforms": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-4.0.2.tgz", - "integrity": "sha512-EEVig1Q2QJ4ELpJXMZR8Vt5DQx8/mo+dGWSR7vWXqcob2gQLyQGsionYcGKATXvQzMPn6DSN1vTN7yFximdIAg==", - "requires": { - "cssnano-util-get-match": "^4.0.0", - "has": "^1.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "postcss-resolve-nested-selector": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/postcss-resolve-nested-selector/-/postcss-resolve-nested-selector-0.1.1.tgz", @@ -6489,10 +23662,68 @@ "postcss": "^7.0.26" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -6527,10 +23758,68 @@ "postcss": "^7.0.21" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -6564,10 +23853,68 @@ "postcss": "^7.0.6" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -6593,97 +23940,20 @@ } }, "postcss-selector-parser": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.4.tgz", - "integrity": "sha512-gjMeXBempyInaBqpp8gODmwZ52WaYsVOsfr4L4lDQ7n3ncD6mEyySiDtgzCT+NYC0mmeOLvtsF8iaEf0YT6dBw==", + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", + "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", "requires": { "cssesc": "^3.0.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1", "util-deprecate": "^1.0.2" } }, - "postcss-svgo": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-4.0.2.tgz", - "integrity": "sha512-C6wyjo3VwFm0QgBy+Fu7gCYOkCmgmClghO+pjcxvrcBKtiKt0uCF+hvbMO1fyv5BMImRK90SMb+dwUnfbGd+jw==", - "requires": { - "is-svg": "^3.0.0", - "postcss": "^7.0.0", - "postcss-value-parser": "^3.0.0", - "svgo": "^1.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-value-parser": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", - "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "postcss-syntax": { "version": "0.36.2", "resolved": "https://registry.npmjs.org/postcss-syntax/-/postcss-syntax-0.36.2.tgz", "integrity": "sha512-nBRg/i7E3SOHWxF3PpF5WnJM/jQ1YpY9000OaVXlAQj6Zp/kIqJxEDWIZ67tAd7NLuk7zqN4yqe9nc0oNAOs1w==", - "dev": true - }, - "postcss-unique-selectors": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-4.0.1.tgz", - "integrity": "sha512-+JanVaryLo9QwZjKrmJgkI4Fn8SBgRO6WXQBJi7KiAVPlmxikB5Jzc4EvXMT2H0/m0RjrVVm9rGNhZddm/8Spg==", - "requires": { - "alphanum-sort": "^1.0.0", - "postcss": "^7.0.0", - "uniqs": "^2.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } + "dev": true, + "requires": {} }, "postcss-value-parser": { "version": "4.1.0", @@ -6702,16 +23972,49 @@ "integrity": "sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==", "optional": true }, + "pretty-format": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-27.0.6.tgz", + "integrity": "sha512-8tGD7gBIENgzqA+UBzObyWqQ5B778VIFZA/S66cclyd5YkFLYs2Js7gxDKf0MXtTc9zcS7t1xhdfcElJ3YIvkQ==", + "dev": true, + "requires": { + "@jest/types": "^27.0.6", + "ansi-regex": "^5.0.0", + "ansi-styles": "^5.0.0", + "react-is": "^17.0.1" + }, + "dependencies": { + "ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true + } + } + }, + "pretty-ms": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", + "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", + "requires": { + "parse-ms": "^2.1.0" + } + }, "progress": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, - "promise-inflight": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", - "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=" + "prompts": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.1.tgz", + "integrity": "sha512-EQyfIuO2hPDsX1L/blblV+H7I0knhgAd82cVneCwcdND9B8AuCDuRcBH6yIcG4dFzlOUqbazQqwGjx5xmsNLuQ==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } }, "prr": { "version": "1.0.1", @@ -6724,24 +24027,21 @@ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "dev": true }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=" + "queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==" }, "quick-lru": { "version": "4.0.1", @@ -6757,124 +24057,81 @@ "safe-buffer": "^5.1.0" } }, - "raw-loader": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/raw-loader/-/raw-loader-4.0.2.tgz", - "integrity": "sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==", - "requires": { - "loader-utils": "^2.0.0", - "schema-utils": "^3.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } - } + "react-is": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", + "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", + "dev": true }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^2.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "path-type": "^3.0.0" + }, + "dependencies": { + "path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "requires": { + "pify": "^3.0.0" + } + } } }, "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc=", "dev": true, "requires": { "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", - "dev": true - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true - } + "read-pkg": "^3.0.0" } }, "readable-stream": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, + "recast": { + "version": "0.20.5", + "resolved": "https://registry.npmjs.org/recast/-/recast-0.20.5.tgz", + "integrity": "sha512-E5qICoPoNL4yU0H0NoBDntNB0Q5oMSNh9usFctYniLBluTthi3RsQVBXIJNbApOlvSwW/RGxIuokPcAc59J5fQ==", + "requires": { + "ast-types": "0.14.2", + "esprima": "~4.0.0", + "source-map": "~0.6.1", + "tslib": "^2.0.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "rechoir": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.0.tgz", - "integrity": "sha512-ADsDEH2bvbjltXEP+hTIAmeFekTFK0V2BTxMkok6qILyAJEXV0AFfoWcAq4yfll5VdIMd/RVXq0lR+wQi5ZU3Q==", + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", "requires": { "resolve": "^1.9.0" } @@ -6892,45 +24149,68 @@ "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==" + "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", + "peer": true }, "regenerate-unicode-properties": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-8.2.0.tgz", "integrity": "sha512-F9DjY1vKLo/tPePDycuH3dn9H1OTPIkVD9Kz4LODu+F2C75mgjAJ7x/gwy6ZcSNRAAkhNlJSOHRe8k3p+K9WhA==", + "peer": true, "requires": { "regenerate": "^1.4.0" } }, "regenerator-runtime": { - "version": "0.13.7", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.7.tgz", - "integrity": "sha512-a54FxoJDIr27pgf7IgeQGxmqUNYrcV338lf/6gH456HZ/PhX+5BcwHXG9ajESmwe6WRO0tAzRUrRmNONWgkrew==" + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" }, "regenerator-transform": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", + "peer": true, "requires": { "@babel/runtime": "^7.8.4" } }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + } + } + }, "regexp-tree": { - "version": "0.1.21", - "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.21.tgz", - "integrity": "sha512-kUUXjX4AnqnR8KRTCrayAo9PzYMRKmVoGgaz2tBuz0MF3g1ZbGebmtW0yFHfFK9CmBjQKeYIgoL22pFLBJY7sw==", + "version": "0.1.23", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.23.tgz", + "integrity": "sha512-+7HWfb4Bvu8Rs2eQTUIpX9I/PlQkYOuTNbRpKLJlQpSgwSkzFYh+pUj0gtvglnOZLKB6YgnIgRuJ2/IlpL48qw==", "dev": true }, "regexpp": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", - "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz", + "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==", "dev": true }, "regexpu-core": { "version": "4.7.1", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.7.1.tgz", "integrity": "sha512-ywH2VUraA44DZQuRKzARmw6S66mr48pQVva4LBeRhcOltJ6hExvWly5ZjFLYo67xbIxb6W1q4bAGtgfEl20zfQ==", + "peer": true, "requires": { "regenerate": "^1.4.0", "regenerate-unicode-properties": "^8.2.0", @@ -6943,12 +24223,14 @@ "regjsgen": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==" + "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", + "peer": true }, "regjsparser": { - "version": "0.6.4", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.4.tgz", - "integrity": "sha512-64O87/dPDgfk8/RQqC4gkZoGyyWFIEUTTh80CU6CWuK5vkCGyekIx+oKcEIYtP/RAxSQltCZHCNu/mdd7fqlJw==", + "version": "0.6.9", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz", + "integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==", + "peer": true, "requires": { "jsesc": "~0.5.0" }, @@ -6956,15 +24238,11 @@ "jsesc": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=" + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "peer": true } } }, - "relateurl": { - "version": "0.2.7", - "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", - "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=" - }, "remark": { "version": "13.0.0", "resolved": "https://registry.npmjs.org/remark/-/remark-13.0.0.tgz", @@ -6994,24 +24272,33 @@ "mdast-util-to-markdown": "^0.6.0" } }, + "repeat-element": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" + }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", "dev": true }, - "reserved-words": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/reserved-words/-/reserved-words-0.1.2.tgz", - "integrity": "sha1-AKCUD5jNUBrqqsMWQR2a3FKzGrE=", - "dev": true + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==" }, "resolve": { - "version": "1.19.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", - "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "requires": { - "is-core-module": "^2.1.0", + "is-core-module": "^2.2.0", "path-parse": "^1.0.6" } }, @@ -7031,43 +24318,76 @@ } }, "resolve-from": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", - "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=" + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==" + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=" + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==" }, "reusify": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==" }, - "rgb-regex": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/rgb-regex/-/rgb-regex-1.0.1.tgz", - "integrity": "sha1-wODWiC3w4jviVKR16O3UGRX+rrE=" - }, - "rgba-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/rgba-regex/-/rgba-regex-1.0.0.tgz", - "integrity": "sha1-QzdOLiyglosO8VI0YLfXMP8i7rM=" - }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, "requires": { "glob": "^7.1.3" } }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==" + }, "run-parallel": { - "version": "1.1.10", - "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.10.tgz", - "integrity": "sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "requires": { + "queue-microtask": "^1.2.2" + } }, "rw": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" }, + "rxjs": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.3.0.tgz", + "integrity": "sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw==", + "requires": { + "tslib": "~2.1.0" + }, + "dependencies": { + "tslib": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", + "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==" + } + } + }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -7090,36 +24410,78 @@ "sax": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "optional": true + }, + "saxes": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/saxes/-/saxes-5.0.1.tgz", + "integrity": "sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw==", + "dev": true, + "requires": { + "xmlchars": "^2.2.0" + } }, "schema-utils": { - "version": "2.7.1", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", - "integrity": "sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", "requires": { - "@types/json-schema": "^7.0.5", - "ajv": "^6.12.4", + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", "ajv-keywords": "^3.5.2" } }, - "select": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", - "integrity": "sha1-DnNQrN7ICxEIUoeG7B1EGNEbOW0=" - }, "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } }, "serialize-javascript": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz", - "integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "requires": { "randombytes": "^2.1.0" } }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + } + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "requires": { + "kind-of": "^6.0.2" + } + }, "shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7133,31 +24495,32 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==" }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=", - "requires": { - "is-arrayish": "^0.3.1" - }, - "dependencies": { - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - } - } + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==" }, "slice-ansi": { "version": "4.0.0", @@ -7168,38 +24531,162 @@ "ansi-styles": "^4.0.0", "astral-regex": "^2.0.0", "is-fullwidth-code-point": "^3.0.0" + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" }, "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "requires": { - "color-convert": "^2.0.1" + "ms": "2.0.0" } }, - "color-convert": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", "requires": { - "color-name": "~1.1.4" + "is-extendable": "^0.1.0" } }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "requires": { + "is-descriptor": "^1.0.0" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } } } }, "sortablejs": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.12.0.tgz", - "integrity": "sha512-bPn57rCjBRlt2sC24RBsu40wZsmLkSo2XeqG8k6DC1zru5eObQUIPPZAQG7W2SJ8FZQYq+BEJmvuw1Zxb3chqg==" + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.14.0.tgz", + "integrity": "sha512-pBXvQCs5/33fdN1/39pPL0NZF20LeRbLQ5jtnheIPN9JQAaufGjKdWduZn4U7wCtVuzKhmRkI0DFYHYRbB2H1w==" }, "source-list-map": { "version": "2.0.1", @@ -7211,6 +24698,23 @@ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" }, + "source-map-js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==" + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, "source-map-support": { "version": "0.5.19", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", @@ -7227,6 +24731,11 @@ } } }, + "source-map-url": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", + "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" + }, "spdx-compare": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", @@ -7270,9 +24779,9 @@ } }, "spdx-license-ids": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.7.tgz", - "integrity": "sha512-U+MTEOO0AiDzxwFvoa4JVnMV6mZlJKk2sBLt90s7G0Gd0Mlknc7kxEn3nuDPNZRta7O2uy8oLcZLVT+4sqNZHQ==" + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==" }, "spdx-ranges": { "version": "2.1.1", @@ -7280,9 +24789,9 @@ "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==" }, "spdx-satisfies": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-5.0.0.tgz", - "integrity": "sha512-/hGhwh20BeGmkA+P/lm06RvXD94JduwNxtx/oX3B5ClPt1/u/m5MCaDNo1tV3Y9laLkQr/NRde63b9lLMhlNfw==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-5.0.1.tgz", + "integrity": "sha512-Nwor6W6gzFp8XX4neaKQ7ChV4wmpSh2sSDemMFSzHxpTw460jxFYeOn+jq4ybnSSw/5sc3pjka9MQPouksQNpw==", "requires": { "spdx-compare": "^1.0.0", "spdx-expression-parse": "^3.0.0", @@ -7295,57 +24804,122 @@ "integrity": "sha512-1klA3Gi5PD1Wv9Q0wUoOQN1IWAuPu0D1U03ThXTr0cJ20+/iq2tHSDnK7Kk/0LXJ1ztUB2/1Os0wKmfyNgUQfg==", "dev": true }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "requires": { + "extend-shallow": "^3.0.0" + } + }, "sprintf-js": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" - }, - "ssri": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/ssri/-/ssri-8.0.0.tgz", - "integrity": "sha512-aq/pz989nxVYwn16Tsbj1TqFpD5LLrQxHf5zaHuieFV+R0Bbr4y8qUsOA45hXT/N4/9UNXTarBjnjVmjSOVaAA==", - "requires": { - "minipass": "^3.1.1" - } + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true }, "stable": { "version": "0.1.8", "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==" + "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", + "dev": true }, - "string-width": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", - "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-gL//fkxfWUsIlFL2Tl42Cl6+HFALEaB1FU76I/Fy+oZjRreP7OPMXFlGbxM7NQsI0ZpUfw76sHnv0WNYuTb7Iw==", + "dev": true, "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" + "escape-string-regexp": "^2.0.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true + } } }, - "string.prototype.trimend": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz", - "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==", + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - } - }, - "string.prototype.trimstart": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz", - "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==", - "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + } + }, + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==" + } } }, "string_decoder": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, "requires": { "safe-buffer": "~5.2.0" }, @@ -7353,11 +24927,50 @@ "safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" } } }, + "string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "requires": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + } + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "string.prototype.trimend": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", + "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, + "string.prototype.trimstart": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", + "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3" + } + }, "strip-ansi": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", @@ -7367,9 +24980,9 @@ } }, "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", "dev": true }, "strip-final-newline": { @@ -7398,82 +25011,37 @@ "integrity": "sha1-eVjHk+R+MuB9K1yv5cC/jhLneQI=", "dev": true }, - "stylehacks": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", - "integrity": "sha512-7GlLk9JwlElY4Y6a/rmbH2MhVlTyVmiJd1PfTCqFaIBEGMYNsrO/v3SeGTdhBThLg4Z+NbOk/qFMwCa+J+3p/g==", - "requires": { - "browserslist": "^4.0.0", - "postcss": "^7.0.0", - "postcss-selector-parser": "^3.0.0" - }, - "dependencies": { - "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", - "requires": { - "chalk": "^2.4.2", - "source-map": "^0.6.1", - "supports-color": "^6.1.0" - } - }, - "postcss-selector-parser": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-3.1.2.tgz", - "integrity": "sha512-h7fJ/5uWuRVyOtkO45pnt1Ih40CEleeyCHzipqAZO2e5H20g25Y48uYnFUiShvY4rZWNJ/Bib/KVPmanaCtOhA==", - "requires": { - "dot-prop": "^5.2.0", - "indexes-of": "^1.0.1", - "uniq": "^1.0.1" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, "stylelint": { - "version": "13.8.0", - "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.8.0.tgz", - "integrity": "sha512-iHH3dv3UI23SLDrH4zMQDjLT9/dDIz/IpoFeuNxZmEx86KtfpjDOscxLTFioQyv+2vQjPlRZnK0UoJtfxLICXQ==", + "version": "13.13.1", + "resolved": "https://registry.npmjs.org/stylelint/-/stylelint-13.13.1.tgz", + "integrity": "sha512-Mv+BQr5XTUrKqAXmpqm6Ddli6Ief+AiPZkRsIrAoUKFuq/ElkUh9ZMYxXD0iQNZ5ADghZKLOWz1h7hTClB7zgQ==", "dev": true, "requires": { "@stylelint/postcss-css-in-js": "^0.37.2", "@stylelint/postcss-markdown": "^0.36.2", "autoprefixer": "^9.8.6", - "balanced-match": "^1.0.0", - "chalk": "^4.1.0", + "balanced-match": "^2.0.0", + "chalk": "^4.1.1", "cosmiconfig": "^7.0.0", - "debug": "^4.2.0", + "debug": "^4.3.1", "execall": "^2.0.0", - "fast-glob": "^3.2.4", + "fast-glob": "^3.2.5", "fastest-levenshtein": "^1.0.12", - "file-entry-cache": "^6.0.0", + "file-entry-cache": "^6.0.1", "get-stdin": "^8.0.0", "global-modules": "^2.0.0", - "globby": "^11.0.1", + "globby": "^11.0.3", "globjoin": "^0.1.4", "html-tags": "^3.1.0", "ignore": "^5.1.8", "import-lazy": "^4.0.0", "imurmurhash": "^0.1.4", - "known-css-properties": "^0.20.0", - "lodash": "^4.17.20", - "log-symbols": "^4.0.0", + "known-css-properties": "^0.21.0", + "lodash": "^4.17.21", + "log-symbols": "^4.1.0", "mathml-tag-names": "^2.1.3", - "meow": "^8.0.0", - "micromatch": "^4.0.2", + "meow": "^9.0.0", + "micromatch": "^4.0.4", "normalize-selector": "^0.2.0", "postcss": "^7.0.35", "postcss-html": "^0.36.0", @@ -7483,73 +25051,62 @@ "postcss-safe-parser": "^4.0.2", "postcss-sass": "^0.4.4", "postcss-scss": "^2.1.1", - "postcss-selector-parser": "^6.0.4", + "postcss-selector-parser": "^6.0.5", "postcss-syntax": "^0.36.2", "postcss-value-parser": "^4.1.0", "resolve-from": "^5.0.0", "slash": "^3.0.0", "specificity": "^0.4.1", - "string-width": "^4.2.0", + "string-width": "^4.2.2", "strip-ansi": "^6.0.0", "style-search": "^0.1.0", "sugarss": "^2.0.0", "svg-tags": "^1.0.0", - "table": "^6.0.3", - "v8-compile-cache": "^2.2.0", + "table": "^6.6.0", + "v8-compile-cache": "^2.3.0", "write-file-atomic": "^3.0.3" }, "dependencies": { "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, "requires": { - "color-convert": "^2.0.1" + "color-convert": "^1.9.0" } }, - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } + "balanced-match": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-2.0.0.tgz", + "integrity": "sha512-1ugUSr8BHXRnK23KfuYS+gVMC3LB8QGH9W1iGtDPsNWoQbgtXSExkBu2aDR4epiGWZOjZsj6lDl/N/AqqTC3UA==", + "dev": true }, "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, "requires": { - "color-name": "~1.1.4" + "color-name": "1.1.3" } }, "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "cosmiconfig": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.0.tgz", - "integrity": "sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==", - "dev": true, - "requires": { - "@types/parse-json": "^4.0.0", - "import-fresh": "^3.2.1", - "parse-json": "^5.0.0", - "path-type": "^4.0.0", - "yaml": "^1.10.0" - } + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true }, "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, "ignore": { @@ -7558,46 +25115,10 @@ "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", "dev": true }, - "import-fresh": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", - "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", - "dev": true, - "requires": { - "parent-module": "^1.0.0", - "resolve-from": "^4.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", - "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true - } - } - }, - "parse-json": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.1.0.tgz", - "integrity": "sha512-+mi/lmVVNKFNVyLXV31ERiy2CY5E1/F6QtJFEzoChPRwwngMNXRDQ9GJ5WdE2Z2P4AujsOi0/+2qHID68KwfIQ==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.0.0", - "error-ex": "^1.3.1", - "json-parse-even-better-errors": "^2.3.0", - "lines-and-columns": "^1.1.6" - } - }, - "path-type": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", - "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true - }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -7605,15 +25126,6 @@ "supports-color": "^6.1.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -7635,36 +25147,6 @@ } } } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true - }, - "supports-color": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", - "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } } } }, @@ -7681,35 +25163,36 @@ "dev": true }, "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", "dev": true, "requires": { - "has-flag": "^4.0.0" + "has-flag": "^3.0.0" } } } }, "stylelint-config-recommended": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-3.0.0.tgz", - "integrity": "sha512-F6yTRuc06xr1h5Qw/ykb2LuFynJ2IxkKfCMf+1xqPffkxh0S09Zc902XCffcsw/XMFq/OzQ1w54fLIDtmRNHnQ==", - "dev": true + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-recommended/-/stylelint-config-recommended-5.0.0.tgz", + "integrity": "sha512-c8aubuARSu5A3vEHLBeOSJt1udOdS+1iue7BmJDTSXoCBmfEQmmWX+59vYIj3NQdJBY6a/QRv1ozVFpaB9jaqA==", + "dev": true, + "requires": {} }, "stylelint-config-standard": { - "version": "20.0.0", - "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-20.0.0.tgz", - "integrity": "sha512-IB2iFdzOTA/zS4jSVav6z+wGtin08qfj+YyExHB3LF9lnouQht//YyB0KZq9gGz5HNPkddHOzcY8HsUey6ZUlA==", + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/stylelint-config-standard/-/stylelint-config-standard-22.0.0.tgz", + "integrity": "sha512-uQVNi87SHjqTm8+4NIP5NMAyY/arXrBgimaaT7skvRfE9u3JKXRK9KBkbr4pVmeciuCcs64kAdjlxfq6Rur7Hw==", "dev": true, "requires": { - "stylelint-config-recommended": "^3.0.0" + "stylelint-config-recommended": "^5.0.0" } }, "stylis": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", - "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==" + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.0.10.tgz", + "integrity": "sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==" }, "sugarss": { "version": "2.0.0", @@ -7720,10 +25203,68 @@ "postcss": "^7.0.2" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "postcss": { - "version": "7.0.35", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.35.tgz", - "integrity": "sha512-3QT8bBJeX/S5zKTTjTCIjRF3If4avAT6kqxcASlTWEtAFCb9NH0OUxNDfgZSWdP5fJnBYCMEWkIFfWeugjzYMg==", + "version": "7.0.36", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.36.tgz", + "integrity": "sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw==", "dev": true, "requires": { "chalk": "^2.4.2", @@ -7754,11 +25295,21 @@ "integrity": "sha512-W4SitSZ9MOyMPbHreoZVEneSZyPEeNGbdfJo/7FkJyRs/M3wQRFzq+t3S/NBwlrFSWdx1ONLjLb9pB+UKe4IqQ==" }, "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "requires": { - "has-flag": "^3.0.0" + "has-flag": "^4.0.0" + } + }, + "supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "requires": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" } }, "svg-tags": { @@ -7768,50 +25319,71 @@ "dev": true }, "svgo": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/svgo/-/svgo-1.3.2.tgz", - "integrity": "sha512-yhy/sQYxR5BkC98CY7o31VGsg014AKLEPxdfhora76l36hD9Rdy5NZA/Ocn6yayNPgSamYdtX2rFJdcv07AYVw==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/svgo/-/svgo-2.4.0.tgz", + "integrity": "sha512-W25S1UUm9Lm9VnE0TvCzL7aso/NCzDEaXLaElCUO/KaVitw0+IBicSVfM1L1c0YHK5TOFh73yQ2naCpVHEQ/OQ==", + "dev": true, "requires": { - "chalk": "^2.4.1", - "coa": "^2.0.2", - "css-select": "^2.0.0", - "css-select-base-adapter": "^0.1.1", - "css-tree": "1.0.0-alpha.37", - "csso": "^4.0.2", - "js-yaml": "^3.13.1", - "mkdirp": "~0.5.1", - "object.values": "^1.1.0", - "sax": "~1.2.4", - "stable": "^0.1.8", - "unquote": "~1.1.1", - "util.promisify": "~1.0.0" + "@trysound/sax": "0.1.1", + "colorette": "^1.2.2", + "commander": "^7.1.0", + "css-select": "^4.1.3", + "css-tree": "^1.1.2", + "csso": "^4.2.0", + "stable": "^0.1.8" }, "dependencies": { - "mkdirp": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", - "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", - "requires": { - "minimist": "^1.2.5" - } + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true } } }, "swagger-ui-dist": { - "version": "3.38.0", - "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-3.38.0.tgz", - "integrity": "sha512-sselV8VY6f1BBauY9Sdmwz0jVaWTnGuHQWei7BaTpiUrLcoEUdmmK5bKefLXiwq+dx//es2S8mOvUS+tcXDsKg==" + "version": "4.0.0-beta.4", + "resolved": "https://registry.npmjs.org/swagger-ui-dist/-/swagger-ui-dist-4.0.0-beta.4.tgz", + "integrity": "sha512-lWEMkO2Hgi+sNNNwodDr+ocua7FWp8fIldstdIvIpXJVYsFpEPlOeGRoNerrtCSsgKwpziVNII+WO9xQZIJMsw==" + }, + "symbol-tree": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", + "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", + "dev": true }, "table": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/table/-/table-6.0.4.tgz", - "integrity": "sha512-sBT4xRLdALd+NFBvwOz8bw4b15htyythha+q+DVZqy2RS08PPC8O2sZFgJYEY7bJvbCFKccs+WIZ/cd+xxTWCw==", + "version": "6.7.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.7.1.tgz", + "integrity": "sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg==", "dev": true, "requires": { - "ajv": "^6.12.4", - "lodash": "^4.17.20", + "ajv": "^8.0.1", + "lodash.clonedeep": "^4.5.0", + "lodash.truncate": "^4.4.2", "slice-ansi": "^4.0.0", - "string-width": "^4.2.0" + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "ajv": { + "version": "8.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.6.2.tgz", + "integrity": "sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } } }, "tapable": { @@ -7820,9 +25392,10 @@ "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==" }, "tar": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.0.5.tgz", - "integrity": "sha512-0b4HOimQHj9nXNEAA7zWwMM91Zhhba3pspja6sQbgTpynOJf+bkjBnfybNYzbpLbnwXnbyB4LOREvlyXLkCHSg==", + "version": "6.1.8", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.8.tgz", + "integrity": "sha512-sb9b0cp855NbkMJcskdSYA7b11Q8JsX4qe4pyUAfHp+Y6jBjJeek2ZVlwEfWayshEIwlIzXx0Fain3QG9JPm2A==", + "dev": true, "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", @@ -7832,34 +25405,62 @@ "yallist": "^4.0.0" } }, + "temp": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/temp/-/temp-0.8.4.tgz", + "integrity": "sha512-s0ZZzd0BzYv5tLSptZooSjK8oj6C+c19p7Vqta9+6NPOf7r+fxq0cJe6/oN4LTC79sy5NY8ucOJNgwsKCSbfqg==", + "requires": { + "rimraf": "~2.6.2" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "terminal-link": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", + "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "supports-hyperlinks": "^2.0.0" + } + }, "terser": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz", - "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==", + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", + "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", "requires": { "commander": "^2.20.0", - "source-map": "~0.6.1", - "source-map-support": "~0.5.12" + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" }, "dependencies": { "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" } } }, "terser-webpack-plugin": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.0.3.tgz", - "integrity": "sha512-zFdGk8Lh9ZJGPxxPE6jwysOlATWB8GMW8HcfGULWA/nPal+3VdATflQvSBSLQJRCmYZnfFJl6vkRTiwJGNgPiQ==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", + "integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", "requires": { - "jest-worker": "^26.6.1", - "p-limit": "^3.0.2", + "jest-worker": "^27.0.2", + "p-limit": "^3.1.0", "schema-utils": "^3.0.0", - "serialize-javascript": "^5.0.1", + "serialize-javascript": "^6.0.0", "source-map": "^0.6.1", - "terser": "^5.3.8" + "terser": "^5.7.0" }, "dependencies": { "p-limit": { @@ -7870,61 +25471,104 @@ "yocto-queue": "^0.1.0" } }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" - }, - "terser": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz", - "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==", - "requires": { - "commander": "^2.20.0", - "source-map": "~0.7.2", - "source-map-support": "~0.5.19" - }, - "dependencies": { - "source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==" - } - } } } }, + "test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "requires": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + } + }, "text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "timsort": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/timsort/-/timsort-0.3.0.tgz", - "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=" + "throat": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/throat/-/throat-6.0.1.tgz", + "integrity": "sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w==", + "dev": true }, - "tiny-emitter": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", - "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=" + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "tmpl": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz", + "integrity": "sha1-I2QN17QtAEM5ERQIIOXPRA5SHdE=", + "dev": true }, "to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=" }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + }, + "dependencies": { + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "requires": { + "ret": "~0.1.10" + } + } + } + }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -7933,15 +25577,35 @@ "is-number": "^7.0.0" } }, + "tough-cookie": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", + "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "dev": true, + "requires": { + "psl": "^1.1.33", + "punycode": "^2.1.1", + "universalify": "^0.1.2" + } + }, + "tr46": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-2.1.0.tgz", + "integrity": "sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw==", + "dev": true, + "requires": { + "punycode": "^2.1.1" + } + }, "tributejs": { "version": "5.1.3", "resolved": "https://registry.npmjs.org/tributejs/-/tributejs-5.1.3.tgz", "integrity": "sha512-B5CXihaVzXw+1UHhNFyAwUTMDk1EfoLP5Tj1VhD9yybZ1I8DZJEv8tZ1l0RJo0t0tk9ZhR8eG5tEsaCvRigmdQ==" }, "trim-newlines": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.0.tgz", - "integrity": "sha512-C4+gOpvmxaSMKuEf9Qc134F1ZuOHVXKRbtEflf4NTtuuJDEIJ9p5PXsalL8SkeRw+qit1Mo+yuvMPAKwWg/1hA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", "dev": true }, "trough": { @@ -7950,36 +25614,22 @@ "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==", "dev": true }, - "try-catch": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/try-catch/-/try-catch-2.0.1.tgz", - "integrity": "sha512-LsOrmObN/2WdM+y2xG+t16vhYrQsnV8wftXIcIOWZhQcBJvKGYuamJGwnU98A7Jxs2oZNkJztXlphEOoA0DWqg==" - }, - "try-to-catch": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-1.1.1.tgz", - "integrity": "sha512-ikUlS+/BcImLhNYyIgZcEmq4byc31QpC+46/6Jm5ECWkVFhf8SM2Fp/0pMVXPX6vk45SMCwrP4Taxucne8I0VA==" - }, "tsconfig-paths": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz", - "integrity": "sha512-dRcuzokWhajtZWkQsDVKbWyY+jgcLC5sqJhg2PSgf4ZkH2aHPvaOY8YWGhmjb68b5qqTfasSsDO9k7RUiEmZAw==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz", + "integrity": "sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==", "dev": true, "requires": { - "@types/json5": "^0.0.29", - "json5": "^1.0.1", + "json5": "^2.2.0", "minimist": "^1.2.0", "strip-bom": "^3.0.0" }, "dependencies": { - "json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true } } }, @@ -7997,12 +25647,17 @@ "prelude-ls": "^1.2.1" } }, - "type-fest": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", - "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", "dev": true }, + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==" + }, "typedarray-to-buffer": { "version": "3.1.5", "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", @@ -8017,20 +25672,29 @@ "resolved": "https://registry.npmjs.org/typo-js/-/typo-js-1.2.0.tgz", "integrity": "sha512-dELuLBVa2jvWdU/CHTKi2L/POYaRupv942k+vRsFXsM17acXesQGAiGCio82RW7fvcr7bkuD/Zj8XpUh6aPC2A==" }, - "uglify-js": { - "version": "3.12.3", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.12.3.tgz", - "integrity": "sha512-feZzR+kIcSVuLi3s/0x0b2Tx4Iokwqt+8PJM7yRHKuldg4MLdam4TCFeICv+lgDtuYiCtdmrtIP+uN9LWvDasw==" + "unbox-primitive": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", + "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has-bigints": "^1.0.1", + "has-symbols": "^1.0.2", + "which-boxed-primitive": "^1.0.2" + } }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", - "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==" + "integrity": "sha512-jDrNnXWHd4oHiTZnx/ZG7gtUTVp+gCcTTKr8L0HjlwphROEW3+Him+IpvC+xcJEFegapiMZyZe02CyuOnRmbnQ==", + "peer": true }, "unicode-match-property-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-1.0.4.tgz", "integrity": "sha512-L4Qoh15vTfntsn4P1zqnHulG0LdXgjSO035fEpdtp6YxXhMT51Q6vgM5lYdG/5X3MjS+k/Y9Xw4SFCY9IkR0rg==", + "peer": true, "requires": { "unicode-canonical-property-names-ecmascript": "^1.0.4", "unicode-property-aliases-ecmascript": "^1.0.4" @@ -8039,17 +25703,19 @@ "unicode-match-property-value-ecmascript": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-1.2.0.tgz", - "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==" + "integrity": "sha512-wjuQHGQVofmSJv1uVISKLE5zO2rNGzM/KCYZch/QQvez7C1hUhBIuZ701fYXExuufJFMPhv2SyL8CyoIfMLbIQ==", + "peer": true }, "unicode-property-aliases-ecmascript": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-1.1.0.tgz", - "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==" + "integrity": "sha512-PqSoPh/pWetQ2phoj5RLiaqIk4kCNwoV3CI+LfGmWLKI3rE3kl1h59XpX2BjgDrmbxD9ARtQobPGU1SguCYuQg==", + "peer": true }, "unified": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz", - "integrity": "sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg==", + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz", + "integrity": "sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ==", "dev": true, "requires": { "bail": "^1.0.0", @@ -8058,32 +25724,32 @@ "is-plain-obj": "^2.0.0", "trough": "^1.0.0", "vfile": "^4.0.0" + }, + "dependencies": { + "is-plain-obj": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", + "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", + "dev": true + } } }, - "uniq": { + "union-value": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=" - }, - "uniqs": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/uniqs/-/uniqs-2.0.0.tgz", - "integrity": "sha1-/+3ks2slKQaW5uFl1KWe25mOawI=" - }, - "unique-filename": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", - "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", "requires": { - "unique-slug": "^2.0.0" - } - }, - "unique-slug": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", - "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", - "requires": { - "imurmurhash": "^0.1.4" + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=" + } } }, "unist-util-find-all-after": { @@ -8096,9 +25762,9 @@ } }, "unist-util-is": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.0.4.tgz", - "integrity": "sha512-3dF39j/u423v4BBQrk1AQ2Ve1FxY5W3JKwXxVFzBODQ6WEvccguhgp802qQLKSnxPODE6WuRZtV+ohlUg4meBA==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz", + "integrity": "sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==", "dev": true }, "unist-util-stringify-position": { @@ -8110,80 +25776,110 @@ "@types/unist": "^2.0.2" } }, - "unquote": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/unquote/-/unquote-1.1.1.tgz", - "integrity": "sha1-j97XMk7G6IoP+LkF58CYzcCG1UQ=" + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=" + } + } }, "updates": { - "version": "11.4.2", - "resolved": "https://registry.npmjs.org/updates/-/updates-11.4.2.tgz", - "integrity": "sha512-5xtBOb15oytcrWIPAfgDxD4GCSwDeIe21uhN4Gfi8lSVLOAnikZotKpvZPlMM5ayyyE5NW49qqablhk6kGEtwg==", + "version": "12.1.0", + "resolved": "https://registry.npmjs.org/updates/-/updates-12.1.0.tgz", + "integrity": "sha512-cC/jeGLoeMiu0NteTQsFZTQ9p1aLYs9uODV3HbS3Zx7fAk+dY0GsrUCC8C153szTH3X9NkPtYp0FpLLS2qIKMw==", "dev": true }, - "upper-case": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", - "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=" - }, "uri-js": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", - "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "requires": { "punycode": "^2.1.0" } }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=" + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" + }, "util-deprecate": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, - "util.promisify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.1.tgz", - "integrity": "sha512-g9JpC/3He3bm38zsLupWryXHoEcS22YHthuPQSJdMy6KNrzIRzWqcsHzD/WUnqe45whVou4VIsPew37DoXWNrA==", - "requires": { - "define-properties": "^1.1.3", - "es-abstract": "^1.17.2", - "has-symbols": "^1.0.1", - "object.getownpropertydescriptors": "^2.1.0" - }, - "dependencies": { - "es-abstract": { - "version": "1.17.7", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", - "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.2", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.1", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - } - } - }, "v-tooltip": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.0.3.tgz", - "integrity": "sha512-KZZY3s+dcijzZmV2qoDH4rYmjMZ9YKGBVoUznZKQX0e3c2GjpJm3Sldzz8HHH2Ud87JqhZPB4+4gyKZ6m98cKQ==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.1.3.tgz", + "integrity": "sha512-xXngyxLQTOx/yUEy50thb8te7Qo4XU6h4LZB6cvEfVd9mnysUxLEoYwGWDdqR+l69liKsy3IPkdYff3J1gAJ5w==", "requires": { - "lodash": "^4.17.15", - "popper.js": "^1.16.0", - "vue-resize": "^0.4.5" + "@babel/runtime": "^7.13.10", + "lodash": "^4.17.21", + "popper.js": "^1.16.1", + "vue-resize": "^1.0.1" } }, "v8-compile-cache": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", - "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==" + }, + "v8-to-istanbul": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-8.0.0.tgz", + "integrity": "sha512-LkmXi8UUNxnCC+JlH7/fsfsKr5AU110l+SYGJimWNkWhxbN5EyeOtm1MJ0hhvqMMOhGwBj1Fp70Yv9i+hX0QAg==", + "dev": true, + "requires": { + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^1.6.0", + "source-map": "^0.7.3" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } }, "validate-npm-package-license": { "version": "3.0.4", @@ -8195,11 +25891,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "vendors": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/vendors/-/vendors-1.0.4.tgz", - "integrity": "sha512-/juG65kTL4Cy2su4P8HjtkTxk6VmJDiOPBufWniqQ6wknac6jNiXS9vU+hO3wgusiyqWlzTbVHi0dyJqRONg3w==" - }, "vfile": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz", @@ -8223,18 +25914,17 @@ } }, "vue": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz", - "integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg==" + "version": "2.6.14", + "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.14.tgz", + "integrity": "sha512-x2284lgYvjOMj3Za7kqzRcUSxBboHqtgRE2zlos1qWaOye5yUmHn42LB1250NJBLRwEcdrB0JRwyPTEPhfQjiQ==" }, "vue-bar-graph": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vue-bar-graph/-/vue-bar-graph-1.2.0.tgz", - "integrity": "sha512-vqe2KZPlm0JpKMxDlgTwGDYnLvN32dSLrGm4EC2ivuiZ2FJ8T8/mqi67XEeM0zkFKi9jmp7U09zKCYkg1ag+WQ==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/vue-bar-graph/-/vue-bar-graph-1.3.0.tgz", + "integrity": "sha512-xU4875dPrwxhzZ1fHZq7qm/y3aWXUJAP6VwyE5TKKzO9SczWZaM2r0J4ck9pejWe/6xO1YYwRnNnPGIXHgYKJA==", "requires": { - "core-js": "^3.6.1", - "gsap": "^3.0.4", - "vue": "^2.6.11" + "gsap": "^3.6.1", + "vue": "^2.6.12" } }, "vue-calendar-heatmap": { @@ -8246,25 +25936,20 @@ } }, "vue-eslint-parser": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.3.0.tgz", - "integrity": "sha512-n5PJKZbyspD0+8LnaZgpEvNCrjQx1DyDHw8JdWwoxhhC+yRip4TAvSDpXGf9SWX6b0umeB5aR61gwUo6NVvFxw==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.10.0.tgz", + "integrity": "sha512-7tc/ewS9Vq9Bn741pvpg8op2fWJPH3k32aL+jcIcWGCTzh/zXSdh7pZ5FV3W2aJancP9+ftPAv292zY5T5IPCg==", "dev": true, "requires": { "debug": "^4.1.1", - "eslint-scope": "^5.0.0", + "eslint-scope": "^5.1.1", "eslint-visitor-keys": "^1.1.0", "espree": "^6.2.1", - "esquery": "^1.0.1", - "lodash": "^4.17.15" + "esquery": "^1.4.0", + "lodash": "^4.17.21", + "semver": "^6.3.0" }, "dependencies": { - "acorn": { - "version": "7.4.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", - "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", - "dev": true - }, "eslint-visitor-keys": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", @@ -8281,6 +25966,12 @@ "acorn-jsx": "^5.2.0", "eslint-visitor-keys": "^1.1.0" } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true } } }, @@ -8290,35 +25981,78 @@ "integrity": "sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==" }, "vue-loader": { - "version": "15.9.6", - "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.6.tgz", - "integrity": "sha512-j0cqiLzwbeImIC6nVIby2o/ABAWhlppyL/m5oJ67R5MloP0hj/DtFgb0Zmq3J9CG7AJ+AXIvHVnJAPBvrLyuDg==", + "version": "15.9.8", + "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.8.tgz", + "integrity": "sha512-GwSkxPrihfLR69/dSV3+5CdMQ0D+jXg8Ma1S4nQXKJAznYFX14vHdc/NetQc34Dw+rBbIJyP7JOuVb9Fhprvog==", "requires": { "@vue/component-compiler-utils": "^3.1.0", "hash-sum": "^1.0.2", "loader-utils": "^1.1.0", "vue-hot-reload-api": "^2.3.0", "vue-style-loader": "^4.1.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + } } }, "vue-resize": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-0.4.5.tgz", - "integrity": "sha512-bhP7MlgJQ8TIkZJXAfDf78uJO+mEI3CaLABLjv0WNzr4CcGRGPIAItyWYnP6LsPA4Oq0WE+suidNs6dgpO4RHg==" + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-1.0.1.tgz", + "integrity": "sha512-z5M7lJs0QluJnaoMFTIeGx6dIkYxOwHThlZDeQnWZBizKblb99GSejPnK37ZbNE/rVwDcYcHY+Io+AxdpY952w==", + "requires": { + "@babel/runtime": "^7.13.10" + } }, "vue-style-loader": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.2.tgz", - "integrity": "sha512-0ip8ge6Gzz/Bk0iHovU9XAUQaFt/G2B61bnWa2tCcqqdgfHs1lF9xXorFbE55Gmy92okFT+8bfmySuUOu13vxQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", + "integrity": "sha512-sFuh0xfbtpRlKfm39ss/ikqs9AbKCoXZBpHeVZ8Tx650o0k0q/YCM7FRvigtxpACezfq6af+a7JeqVTWvncqDg==", "requires": { "hash-sum": "^1.0.2", "loader-utils": "^1.0.2" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + } } }, "vue-template-compiler": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.12.tgz", - "integrity": "sha512-OzzZ52zS41YUbkCBfdXShQTe69j1gQDZ9HIX8miuC9C3rBCk9wIRjLiZZLrmX9V+Ftq/YEyv1JaVr5Y/hNtByg==", + "version": "2.6.14", + "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.6.14.tgz", + "integrity": "sha512-ODQS1SyMbjKoO1JBJZojSw6FE4qnh9rIpUZn2EUT86FKizx9uH5z6uXiIrm4/Nb/gwxTi/o17ZDEGWAXHvtC7g==", "requires": { "de-indent": "^1.0.2", "he": "^1.1.0" @@ -8329,155 +26063,148 @@ "resolved": "https://registry.npmjs.org/vue-template-es2015-compiler/-/vue-template-es2015-compiler-1.9.1.tgz", "integrity": "sha512-4gDntzrifFnCEvyoO8PqyJDmguXgVPxKiIxrBKjIowvL9l+N66196+72XVYR8BBf1Uv1Fgt3bGevJ+sEmxfZzw==" }, + "w3c-hr-time": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", + "integrity": "sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ==", + "dev": true, + "requires": { + "browser-process-hrtime": "^1.0.0" + } + }, + "w3c-xmlserializer": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz", + "integrity": "sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA==", + "dev": true, + "requires": { + "xml-name-validator": "^3.0.0" + } + }, + "walker": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz", + "integrity": "sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=", + "dev": true, + "requires": { + "makeerror": "1.0.x" + } + }, "watchpack": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.1.0.tgz", - "integrity": "sha512-UjgD1mqjkG99+3lgG36at4wPnUXNvis2v1utwTgQ43C22c4LD71LsYMExdWXh4HZ+RmW+B0t1Vrg2GpXAkTOQw==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", + "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", "requires": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" } }, + "wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=", + "requires": { + "defaults": "^1.0.3" + } + }, + "webidl-conversions": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", + "integrity": "sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w==", + "dev": true + }, "webpack": { - "version": "5.11.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.11.0.tgz", - "integrity": "sha512-ubWv7iP54RqAC/VjixgpnLLogCFbAfSOREcSWnnOlZEU8GICC5eKmJSu6YEnph2N2amKqY9rvxSwgyHxVqpaRw==", + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.50.0.tgz", + "integrity": "sha512-hqxI7t/KVygs0WRv/kTgUW8Kl3YC81uyWQSo/7WUs5LsuRw0htH/fCwbVBGCuiX/t4s7qzjXFcf41O8Reiypag==", "requires": { "@types/eslint-scope": "^3.7.0", - "@types/estree": "^0.0.45", - "@webassemblyjs/ast": "1.9.1", - "@webassemblyjs/helper-module-context": "1.9.1", - "@webassemblyjs/wasm-edit": "1.9.1", - "@webassemblyjs/wasm-parser": "1.9.1", - "acorn": "^8.0.4", + "@types/estree": "^0.0.50", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", "browserslist": "^4.14.5", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.3.1", - "eslint-scope": "^5.1.1", + "enhanced-resolve": "^5.8.0", + "es-module-lexer": "^0.7.1", + "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.2.4", "json-parse-better-errors": "^1.0.2", - "loader-runner": "^4.1.0", + "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", - "pkg-dir": "^5.0.0", - "schema-utils": "^3.0.0", + "schema-utils": "^3.1.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.0.3", - "watchpack": "^2.0.0", - "webpack-sources": "^2.1.1" + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.2.0", + "webpack-sources": "^3.2.0" }, "dependencies": { - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } + "acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==" }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "requires": { - "p-locate": "^5.0.0" - } - }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "requires": { - "p-limit": "^3.0.2" - } - }, - "pkg-dir": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-5.0.0.tgz", - "integrity": "sha512-NPE8TDbzl/3YQYY7CSS228s3g2ollTFnc+Qi3tqmqJp9Vg2ovUpixcJEo2HJScN2Ez+kEaal6y70c0ehqJBJeA==", - "requires": { - "find-up": "^5.0.0" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "acorn-import-assertions": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz", + "integrity": "sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA==", + "requires": {} }, "webpack-sources": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.2.0.tgz", - "integrity": "sha512-bQsA24JLwcnWGArOKUxYKhX3Mz/nK1Xf6hxullKERyktjNMC4x8koOeaDNTA2fEJ09BdWLbM/iTW0ithREUP0w==", - "requires": { - "source-list-map": "^2.0.1", - "source-map": "^0.6.1" - } + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.0.tgz", + "integrity": "sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw==" } } }, "webpack-cli": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.3.0.tgz", - "integrity": "sha512-gve+BBKrzMPTOYDjupzV8JchUznhVWMKtWM1hFIQWi6XoeLvGNoQwkrtMWVb+aJ437GgCKdta7sIn10v621pKA==", + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.8.0.tgz", + "integrity": "sha512-+iBSWsX16uVna5aAYN6/wjhJy1q/GKk4KjKvfg90/6hykCTSgozbfz5iRgDTSJt/LgSbYxdBX3KBHeobIs+ZEw==", "requires": { "@discoveryjs/json-ext": "^0.5.0", - "@webpack-cli/info": "^1.2.0", - "@webpack-cli/serve": "^1.2.0", + "@webpack-cli/configtest": "^1.0.4", + "@webpack-cli/info": "^1.3.0", + "@webpack-cli/serve": "^1.5.2", "colorette": "^1.2.1", - "commander": "^6.2.0", - "enquirer": "^2.3.6", - "execa": "^4.1.0", + "commander": "^7.0.0", + "execa": "^5.0.0", "fastest-levenshtein": "^1.0.12", "import-local": "^3.0.2", "interpret": "^2.2.0", "rechoir": "^0.7.0", "v8-compile-cache": "^2.2.0", - "webpack-merge": "^4.2.2" + "webpack-merge": "^5.7.3" }, "dependencies": { "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==" } } }, "webpack-merge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-4.2.2.tgz", - "integrity": "sha512-TUE1UGoTX2Cd42j3krGYqObZbOD+xF7u28WB7tfUordytSjbWTIjK/8V0amkBfTYN4/pB/GIDlJZZ657BGG19g==", + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", "requires": { - "lodash": "^4.17.15" + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" } }, "webpack-sources": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", - "integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.1.tgz", + "integrity": "sha512-y9EI9AO42JjEcrTJFOYmVywVZdKVUfOvDUPsJea5GIr1JOEGFVqwlY2K098fFoIjOkDzHn2AjRvM8dsBZu+gCA==", "requires": { - "source-list-map": "^2.0.0", - "source-map": "~0.6.1" + "source-list-map": "^2.0.1", + "source-map": "^0.6.1" }, "dependencies": { "source-map": { @@ -8487,6 +26214,32 @@ } } }, + "whatwg-encoding": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz", + "integrity": "sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw==", + "dev": true, + "requires": { + "iconv-lite": "0.4.24" + } + }, + "whatwg-mimetype": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", + "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==", + "dev": true + }, + "whatwg-url": { + "version": "8.7.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-8.7.0.tgz", + "integrity": "sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg==", + "dev": true, + "requires": { + "lodash": "^4.7.0", + "tr46": "^2.1.0", + "webidl-conversions": "^6.1.0" + } + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -8495,6 +26248,32 @@ "isexe": "^2.0.0" } }, + "which-boxed-primitive": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "dev": true, + "requires": { + "is-bigint": "^1.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "is-symbol": "^1.0.3" + } + }, + "widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "requires": { + "string-width": "^4.0.0" + } + }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", @@ -8502,87 +26281,82 @@ "dev": true }, "workbox-core": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.0.2.tgz", - "integrity": "sha512-Ksl6qeikGb+BOCILoCUJGxwlEQOeeqdpOnpOr9UDt3NtacPYbfYBmpYpKArw5DFWK+5geBsFqgUUlXThlCYfKQ==" + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/workbox-core/-/workbox-core-6.2.4.tgz", + "integrity": "sha512-Nu8X4R4Is3g8uzEJ6qwbW2CGVpzntW/cSf8OfsQGIKQR0nt84FAKzP2cLDaNLp3L/iV9TuhZgCTZzkMiap5/OQ==" }, "workbox-routing": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.0.2.tgz", - "integrity": "sha512-iQ9ch3fL1YpztDLfHNURaHQ0ispgPCdzWmZZhtSHUyy/+YkTlIiDVTbOQCIpHIrWlKQiim6X3K2ItIy1FW9+wA==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/workbox-routing/-/workbox-routing-6.2.4.tgz", + "integrity": "sha512-jHnOmpeH4MOWR4eXv6l608npD2y6IFv7yFJ1bT9/RbB8wq2vXHXJQ0ExTZRTWGbVltSG22wEU+MQ8VebDDwDeg==", "requires": { - "workbox-core": "^6.0.2" + "workbox-core": "6.2.4" } }, "workbox-strategies": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.0.2.tgz", - "integrity": "sha512-HjLnYCVS60U7OKhl5NIq8NAQXrotJQRDakmIONnRlQIlP2If/kAiQSUP3QCHMq4EeXGiF+/CdlR1/bhYBHZzZg==", + "version": "6.2.4", + "resolved": "https://registry.npmjs.org/workbox-strategies/-/workbox-strategies-6.2.4.tgz", + "integrity": "sha512-DKgGC3ruceDuu2o+Ae5qmJy0p0q21mFP+RrkdqKrjyf2u8cJvvtvt1eIt4nevKc5BESiKxmhC2h+TZpOSzUDvA==", "requires": { - "workbox-core": "^6.0.2" + "workbox-core": "6.2.4" } }, "worker-loader": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-3.0.7.tgz", - "integrity": "sha512-LjYLuYJw6kqQKDoygpoD5vWeR1CbZjuVSW3/8pFsptMlUl8gatNM/pszhasSDAWt+dYxMipWB6695k+1zId+iQ==", + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/worker-loader/-/worker-loader-3.0.8.tgz", + "integrity": "sha512-XQyQkIFeRVC7f7uRhFdNMe/iJOdO6zxAaR3EWbDp45v3mDhrTi+++oswKNxShUNjPC/1xUp5DB29YKLhFo129g==", "requires": { "loader-utils": "^2.0.0", "schema-utils": "^3.0.0" - }, - "dependencies": { - "loader-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz", - "integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==", - "requires": { - "big.js": "^5.2.2", - "emojis-list": "^3.0.0", - "json5": "^2.1.2" - } - }, - "schema-utils": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", - "integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", - "requires": { - "@types/json-schema": "^7.0.6", - "ajv": "^6.12.5", - "ajv-keywords": "^3.5.2" - } - } } }, "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.0.tgz", + "integrity": "sha512-Z8D7Y4g4l2rDGMwV1NtKjqbhNoXWQK264I38RoO4eDKqOKIeL2HUi/Uf0OG9+4XRlfxZ0OPGL4c2DTrnV+G/RQ==", "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" + "ansi-styles": "^6.0.0", + "string-width": "^5.0.0", + "strip-ansi": "^7.0.0" }, "dependencies": { + "ansi-regex": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.0.tgz", + "integrity": "sha512-tAaOSrWCHF+1Ear1Z4wnJCXA9GGox4K6Ic85a5qalES2aeEwQGr7UC93mwef49536PkCYjzkp0zIxfFvexJ6zQ==" + }, "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz", + "integrity": "sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ==" + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==" + }, + "is-fullwidth-code-point": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==" + }, + "string-width": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.0.0.tgz", + "integrity": "sha512-zwXcRmLUdiWhMPrHz6EXITuyTgcEnUqDzspTkCLhQovxywWz6NP9VHgqfVg20V/1mUg0B95AKbXxNT+ALRmqCw==", "requires": { - "color-convert": "^2.0.1" + "emoji-regex": "^9.2.2", + "is-fullwidth-code-point": "^4.0.0", + "strip-ansi": "^7.0.0" } }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "strip-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.0.tgz", + "integrity": "sha512-UhDTSnGF1dc0DRbUqr1aXwNoY3RgVkSWG8BrpnuFIxhP57IqbS7IRta2Gfiavds4yCxc5+fEAVVOgBZWnYkvzg==", "requires": { - "color-name": "~1.1.4" + "ansi-regex": "^6.0.0" } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" } } }, @@ -8603,21 +26377,60 @@ "typedarray-to-buffer": "^3.1.5" } }, + "ws": { + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.3.tgz", + "integrity": "sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==", + "dev": true, + "requires": {} + }, + "xml-name-validator": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", + "integrity": "sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw==", + "dev": true + }, + "xmlchars": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz", + "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", + "dev": true + }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, "yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "yaml": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz", - "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==", - "dev": true + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==" + }, + "yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "requires": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + } }, "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, "yocto-queue": { diff --git a/package.json b/package.json index 2abdc5ab7..30e4f60fa 100644 --- a/package.json +++ b/package.json @@ -1,66 +1,60 @@ { "license": "MIT", "private": true, + "type": "module", "engines": { - "node": ">= 10.13.0" + "node": ">= 12.17.0" }, "dependencies": { - "@babel/core": "7.12.10", - "@babel/plugin-transform-runtime": "7.12.10", - "@babel/preset-env": "7.12.11", - "@babel/runtime": "7.12.5", "@claviska/jquery-minicolors": "2.3.5", - "@primer/octicons": "11.2.0", - "add-asset-webpack-plugin": "2.0.0", - "babel-loader": "8.2.2", - "clipboard": "2.0.6", - "codemirror": "5.59.0", - "core-js": "3.8.1", - "css-loader": "5.0.1", - "css-minimizer-webpack-plugin": "1.1.5", - "dropzone": "5.7.2", - "easymde": "2.13.0", - "escape-goat": "3.0.0", - "fast-glob": "3.2.4", - "file-loader": "6.2.0", + "@primer/octicons": "15.0.1", + "add-asset-webpack-plugin": "2.0.1", + "codemirror": "5.62.2", + "css-loader": "6.2.0", + "dropzone": "5.9.2", + "easymde": "2.15.0", + "esbuild-loader": "2.15.0", + "escape-goat": "4.0.0", + "fast-glob": "3.2.7", "font-awesome": "4.7.0", - "jquery": "3.5.1", + "jquery": "3.6.0", "jquery.are-you-sure": "1.9.0", - "less": "4.0.0", - "less-loader": "7.2.0", + "less": "4.1.1", + "less-loader": "10.0.1", "license-checker-webpack-plugin": "0.2.1", - "mermaid": "8.8.4", - "mini-css-extract-plugin": "1.3.3", - "monaco-editor": "0.21.2", - "monaco-editor-webpack-plugin": "2.1.0", - "postcss": "8.2.1", - "raw-loader": "4.0.2", - "sortablejs": "1.12.0", - "swagger-ui-dist": "3.38.0", - "terser-webpack-plugin": "5.0.3", + "mermaid": "8.11.5", + "mini-css-extract-plugin": "2.2.0", + "monaco-editor": "0.27.0", + "monaco-editor-webpack-plugin": "4.1.2", + "pretty-ms": "7.0.1", + "sortablejs": "1.14.0", + "swagger-ui-dist": "4.0.0-beta.4", "tributejs": "5.1.3", - "vue": "2.6.12", - "vue-bar-graph": "1.2.0", + "vue": "2.6.14", + "vue-bar-graph": "1.3.0", "vue-calendar-heatmap": "0.8.4", - "vue-loader": "15.9.6", - "vue-template-compiler": "2.6.12", - "webpack": "5.11.0", - "webpack-cli": "4.3.0", - "workbox-routing": "6.0.2", - "workbox-strategies": "6.0.2", - "worker-loader": "3.0.7", - "wrap-ansi": "7.0.0" + "vue-loader": "15.9.8", + "vue-template-compiler": "2.6.14", + "webpack": "5.50.0", + "webpack-cli": "4.8.0", + "workbox-routing": "6.2.4", + "workbox-strategies": "6.2.4", + "worker-loader": "3.0.8", + "wrap-ansi": "8.0.0" }, "devDependencies": { - "eslint": "7.16.0", - "eslint-plugin-html": "6.1.1", - "eslint-plugin-import": "2.22.1", - "eslint-plugin-unicorn": "24.0.0", - "eslint-plugin-vue": "7.3.0", - "stylelint": "13.8.0", - "stylelint-config-standard": "20.0.0", - "svgo": "1.3.2", - "updates": "11.4.2" + "editorconfig-checker": "4.0.2", + "eslint": "7.32.0", + "eslint-plugin-html": "6.1.2", + "eslint-plugin-import": "2.24.0", + "eslint-plugin-unicorn": "35.0.0", + "eslint-plugin-vue": "7.16.0", + "jest": "27.0.6", + "jest-extended": "0.11.5", + "stylelint": "13.13.1", + "stylelint-config-standard": "22.0.0", + "svgo": "2.4.0", + "updates": "12.1.0" }, "browserslist": [ "defaults", diff --git a/public/img/auth/azuread.png b/public/img/auth/azuread.png new file mode 100644 index 000000000..1adbf15e2 Binary files /dev/null and b/public/img/auth/azuread.png differ diff --git a/public/img/auth/azureadv2.png b/public/img/auth/azureadv2.png new file mode 100644 index 000000000..1adbf15e2 Binary files /dev/null and b/public/img/auth/azureadv2.png differ diff --git a/public/img/auth/microsoftonline.png b/public/img/auth/microsoftonline.png new file mode 100644 index 000000000..a8129dce2 Binary files /dev/null and b/public/img/auth/microsoftonline.png differ diff --git a/public/img/emoji/codeberg.png b/public/img/emoji/codeberg.png new file mode 100644 index 000000000..b91613833 Binary files /dev/null and b/public/img/emoji/codeberg.png differ diff --git a/public/img/emoji/git.png b/public/img/emoji/git.png new file mode 100644 index 000000000..00a6bcfca Binary files /dev/null and b/public/img/emoji/git.png differ diff --git a/public/img/emoji/github.png b/public/img/emoji/github.png new file mode 100644 index 000000000..88efc353e Binary files /dev/null and b/public/img/emoji/github.png differ diff --git a/public/img/emoji/gitlab.png b/public/img/emoji/gitlab.png new file mode 100644 index 000000000..55a0d2b70 Binary files /dev/null and b/public/img/emoji/gitlab.png differ diff --git a/public/img/emoji/gogs.png b/public/img/emoji/gogs.png new file mode 100644 index 000000000..6471a84da Binary files /dev/null and b/public/img/emoji/gogs.png differ diff --git a/public/img/logo.svg b/public/img/logo.svg index dca9b4f4d..afeeacb77 100644 --- a/public/img/logo.svg +++ b/public/img/logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/fontawesome-openid.svg b/public/img/svg/fontawesome-openid.svg new file mode 100644 index 000000000..9bcb92b87 --- /dev/null +++ b/public/img/svg/fontawesome-openid.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/fontawesome-windows.svg b/public/img/svg/fontawesome-windows.svg new file mode 100644 index 000000000..8e322daf0 --- /dev/null +++ b/public/img/svg/fontawesome-windows.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/gitea-double-chevron-left.svg b/public/img/svg/gitea-double-chevron-left.svg index 68d2d9978..8921eef58 100644 --- a/public/img/svg/gitea-double-chevron-left.svg +++ b/public/img/svg/gitea-double-chevron-left.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-double-chevron-right.svg b/public/img/svg/gitea-double-chevron-right.svg index 06ff40fd5..da4304542 100644 --- a/public/img/svg/gitea-double-chevron-right.svg +++ b/public/img/svg/gitea-double-chevron-right.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-git.svg b/public/img/svg/gitea-git.svg index c716b1b28..ed592a6bb 100644 --- a/public/img/svg/gitea-git.svg +++ b/public/img/svg/gitea-git.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-gitea.svg b/public/img/svg/gitea-gitea.svg index e69c8ecaa..39bf40ecb 100644 --- a/public/img/svg/gitea-gitea.svg +++ b/public/img/svg/gitea-gitea.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-github.svg b/public/img/svg/gitea-github.svg index 0ed1d44b5..b9c062174 100644 --- a/public/img/svg/gitea-github.svg +++ b/public/img/svg/gitea-github.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-gitlab.svg b/public/img/svg/gitea-gitlab.svg index a72a37823..9d7176cee 100644 --- a/public/img/svg/gitea-gitlab.svg +++ b/public/img/svg/gitea-gitlab.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-gogs.svg b/public/img/svg/gitea-gogs.svg new file mode 100644 index 000000000..887147dd1 --- /dev/null +++ b/public/img/svg/gitea-gogs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/gitea-lock-cog.svg b/public/img/svg/gitea-lock-cog.svg index 11a9d1172..0b10e8676 100644 --- a/public/img/svg/gitea-lock-cog.svg +++ b/public/img/svg/gitea-lock-cog.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-lock.svg b/public/img/svg/gitea-lock.svg index a3ebc3444..3da5f730c 100644 --- a/public/img/svg/gitea-lock.svg +++ b/public/img/svg/gitea-lock.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/gitea-onedev.svg b/public/img/svg/gitea-onedev.svg new file mode 100644 index 000000000..1f0d1d836 --- /dev/null +++ b/public/img/svg/gitea-onedev.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/gitea-unlock.svg b/public/img/svg/gitea-unlock.svg index c798f15b7..f7340b69c 100644 --- a/public/img/svg/gitea-unlock.svg +++ b/public/img/svg/gitea-unlock.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-alert.svg b/public/img/svg/octicon-alert.svg index 42b848e5f..c77ebb9cf 100644 --- a/public/img/svg/octicon-alert.svg +++ b/public/img/svg/octicon-alert.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-archive.svg b/public/img/svg/octicon-archive.svg index 3be9e3687..cbc47ebd6 100644 --- a/public/img/svg/octicon-archive.svg +++ b/public/img/svg/octicon-archive.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-arrow-both.svg b/public/img/svg/octicon-arrow-both.svg index 51a1c93d0..673d5c077 100644 --- a/public/img/svg/octicon-arrow-both.svg +++ b/public/img/svg/octicon-arrow-both.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-arrow-down.svg b/public/img/svg/octicon-arrow-down.svg index 24c89dd01..744c9ce00 100644 --- a/public/img/svg/octicon-arrow-down.svg +++ b/public/img/svg/octicon-arrow-down.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-arrow-left.svg b/public/img/svg/octicon-arrow-left.svg index 399550ce6..94eef67bf 100644 --- a/public/img/svg/octicon-arrow-left.svg +++ b/public/img/svg/octicon-arrow-left.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-arrow-right.svg b/public/img/svg/octicon-arrow-right.svg index 025e1e97e..337c246a1 100644 --- a/public/img/svg/octicon-arrow-right.svg +++ b/public/img/svg/octicon-arrow-right.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-arrow-switch.svg b/public/img/svg/octicon-arrow-switch.svg index 9063ba02b..cee8a3b2f 100644 --- a/public/img/svg/octicon-arrow-switch.svg +++ b/public/img/svg/octicon-arrow-switch.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-arrow-up.svg b/public/img/svg/octicon-arrow-up.svg index 5c9ee7367..4ad5a3808 100644 --- a/public/img/svg/octicon-arrow-up.svg +++ b/public/img/svg/octicon-arrow-up.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-beaker.svg b/public/img/svg/octicon-beaker.svg index f2b683b95..7ed628d32 100644 --- a/public/img/svg/octicon-beaker.svg +++ b/public/img/svg/octicon-beaker.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-bell-slash.svg b/public/img/svg/octicon-bell-slash.svg index 2930a10a2..909ebcbd4 100644 --- a/public/img/svg/octicon-bell-slash.svg +++ b/public/img/svg/octicon-bell-slash.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-bell.svg b/public/img/svg/octicon-bell.svg index 63550d0ad..400bd7882 100644 --- a/public/img/svg/octicon-bell.svg +++ b/public/img/svg/octicon-bell.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-blocked.svg b/public/img/svg/octicon-blocked.svg new file mode 100644 index 000000000..a85f07618 --- /dev/null +++ b/public/img/svg/octicon-blocked.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-bold.svg b/public/img/svg/octicon-bold.svg index 92853772b..4e09a8065 100644 --- a/public/img/svg/octicon-bold.svg +++ b/public/img/svg/octicon-bold.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-book.svg b/public/img/svg/octicon-book.svg index ccacaf8bc..9790824e1 100644 --- a/public/img/svg/octicon-book.svg +++ b/public/img/svg/octicon-book.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-bookmark-slash.svg b/public/img/svg/octicon-bookmark-slash.svg index 5f78c9897..86c511751 100644 --- a/public/img/svg/octicon-bookmark-slash.svg +++ b/public/img/svg/octicon-bookmark-slash.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-bookmark.svg b/public/img/svg/octicon-bookmark.svg index 290f1936b..01e72b9ba 100644 --- a/public/img/svg/octicon-bookmark.svg +++ b/public/img/svg/octicon-bookmark.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-briefcase.svg b/public/img/svg/octicon-briefcase.svg index 23b0e1863..2fd3b4768 100644 --- a/public/img/svg/octicon-briefcase.svg +++ b/public/img/svg/octicon-briefcase.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-broadcast.svg b/public/img/svg/octicon-broadcast.svg index f9f0e88cc..8b3b05400 100644 --- a/public/img/svg/octicon-broadcast.svg +++ b/public/img/svg/octicon-broadcast.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-browser.svg b/public/img/svg/octicon-browser.svg index 366758a26..d8d7d6ebd 100644 --- a/public/img/svg/octicon-browser.svg +++ b/public/img/svg/octicon-browser.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-bug.svg b/public/img/svg/octicon-bug.svg index a4bc334ac..ad99e32c3 100644 --- a/public/img/svg/octicon-bug.svg +++ b/public/img/svg/octicon-bug.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-calendar.svg b/public/img/svg/octicon-calendar.svg index daa701819..ff31292a5 100644 --- a/public/img/svg/octicon-calendar.svg +++ b/public/img/svg/octicon-calendar.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-check-circle-fill.svg b/public/img/svg/octicon-check-circle-fill.svg index 5f89e8c0b..931f38962 100644 --- a/public/img/svg/octicon-check-circle-fill.svg +++ b/public/img/svg/octicon-check-circle-fill.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-check-circle.svg b/public/img/svg/octicon-check-circle.svg index 593675e75..880acb92f 100644 --- a/public/img/svg/octicon-check-circle.svg +++ b/public/img/svg/octicon-check-circle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-check.svg b/public/img/svg/octicon-check.svg index 07ce907a6..029c94c09 100644 --- a/public/img/svg/octicon-check.svg +++ b/public/img/svg/octicon-check.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-checklist.svg b/public/img/svg/octicon-checklist.svg index d866228f4..4b2adc163 100644 --- a/public/img/svg/octicon-checklist.svg +++ b/public/img/svg/octicon-checklist.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-chevron-down.svg b/public/img/svg/octicon-chevron-down.svg index fe2114b79..8685bdafb 100644 --- a/public/img/svg/octicon-chevron-down.svg +++ b/public/img/svg/octicon-chevron-down.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-chevron-left.svg b/public/img/svg/octicon-chevron-left.svg index 292f02178..70f327f2e 100644 --- a/public/img/svg/octicon-chevron-left.svg +++ b/public/img/svg/octicon-chevron-left.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-chevron-right.svg b/public/img/svg/octicon-chevron-right.svg index 03fa903e9..cf4d1b3c7 100644 --- a/public/img/svg/octicon-chevron-right.svg +++ b/public/img/svg/octicon-chevron-right.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-chevron-up.svg b/public/img/svg/octicon-chevron-up.svg index f1619ffd2..5fa573d35 100644 --- a/public/img/svg/octicon-chevron-up.svg +++ b/public/img/svg/octicon-chevron-up.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-circle-slash.svg b/public/img/svg/octicon-circle-slash.svg index 2697cb30b..31498e481 100644 --- a/public/img/svg/octicon-circle-slash.svg +++ b/public/img/svg/octicon-circle-slash.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-circle.svg b/public/img/svg/octicon-circle.svg index 80118b4d8..53ed3c061 100644 --- a/public/img/svg/octicon-circle.svg +++ b/public/img/svg/octicon-circle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-clippy.svg b/public/img/svg/octicon-clippy.svg deleted file mode 100644 index 2c7a7fe1d..000000000 --- a/public/img/svg/octicon-clippy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/img/svg/octicon-clock.svg b/public/img/svg/octicon-clock.svg index 4ddef5fe6..82bb9ab02 100644 --- a/public/img/svg/octicon-clock.svg +++ b/public/img/svg/octicon-clock.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-code-review.svg b/public/img/svg/octicon-code-review.svg index 95c10fb3a..3b4a01af2 100644 --- a/public/img/svg/octicon-code-review.svg +++ b/public/img/svg/octicon-code-review.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-code-square.svg b/public/img/svg/octicon-code-square.svg index 8ab510bd3..9afba6ff2 100644 --- a/public/img/svg/octicon-code-square.svg +++ b/public/img/svg/octicon-code-square.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-code.svg b/public/img/svg/octicon-code.svg index 758f71450..b7f6ddc11 100644 --- a/public/img/svg/octicon-code.svg +++ b/public/img/svg/octicon-code.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-codescan-checkmark.svg b/public/img/svg/octicon-codescan-checkmark.svg new file mode 100644 index 000000000..31d1ea6aa --- /dev/null +++ b/public/img/svg/octicon-codescan-checkmark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-codescan.svg b/public/img/svg/octicon-codescan.svg new file mode 100644 index 000000000..ad7400efa --- /dev/null +++ b/public/img/svg/octicon-codescan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-codespaces.svg b/public/img/svg/octicon-codespaces.svg new file mode 100644 index 000000000..627300c14 --- /dev/null +++ b/public/img/svg/octicon-codespaces.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-columns.svg b/public/img/svg/octicon-columns.svg new file mode 100644 index 000000000..5eefbae1e --- /dev/null +++ b/public/img/svg/octicon-columns.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-comment-discussion.svg b/public/img/svg/octicon-comment-discussion.svg index 582c53661..e93ae4d4b 100644 --- a/public/img/svg/octicon-comment-discussion.svg +++ b/public/img/svg/octicon-comment-discussion.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-comment.svg b/public/img/svg/octicon-comment.svg index dc2fa3f5d..45abf5e74 100644 --- a/public/img/svg/octicon-comment.svg +++ b/public/img/svg/octicon-comment.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-container.svg b/public/img/svg/octicon-container.svg index fd936fd01..f2ed91657 100644 --- a/public/img/svg/octicon-container.svg +++ b/public/img/svg/octicon-container.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-copy.svg b/public/img/svg/octicon-copy.svg new file mode 100644 index 000000000..5ccaeeb33 --- /dev/null +++ b/public/img/svg/octicon-copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-cpu.svg b/public/img/svg/octicon-cpu.svg index 6e64d5310..8e0dbdc8a 100644 --- a/public/img/svg/octicon-cpu.svg +++ b/public/img/svg/octicon-cpu.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-credit-card.svg b/public/img/svg/octicon-credit-card.svg index 2524a4fad..87d703b06 100644 --- a/public/img/svg/octicon-credit-card.svg +++ b/public/img/svg/octicon-credit-card.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-cross-reference.svg b/public/img/svg/octicon-cross-reference.svg index 3ad58c6ce..f7a17de8e 100644 --- a/public/img/svg/octicon-cross-reference.svg +++ b/public/img/svg/octicon-cross-reference.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-dash.svg b/public/img/svg/octicon-dash.svg index d2826f554..929e2f9b8 100644 --- a/public/img/svg/octicon-dash.svg +++ b/public/img/svg/octicon-dash.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-database.svg b/public/img/svg/octicon-database.svg index b4b5542b4..a4f6531ae 100644 --- a/public/img/svg/octicon-database.svg +++ b/public/img/svg/octicon-database.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-dependabot.svg b/public/img/svg/octicon-dependabot.svg new file mode 100644 index 000000000..b64a16603 --- /dev/null +++ b/public/img/svg/octicon-dependabot.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-desktop-download.svg b/public/img/svg/octicon-desktop-download.svg index 7042ede8f..c0fbe8941 100644 --- a/public/img/svg/octicon-desktop-download.svg +++ b/public/img/svg/octicon-desktop-download.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-device-camera-video.svg b/public/img/svg/octicon-device-camera-video.svg index 9321c7b11..623937b85 100644 --- a/public/img/svg/octicon-device-camera-video.svg +++ b/public/img/svg/octicon-device-camera-video.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-device-desktop.svg b/public/img/svg/octicon-device-desktop.svg index a8b361f6e..d540efe27 100644 --- a/public/img/svg/octicon-device-desktop.svg +++ b/public/img/svg/octicon-device-desktop.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-device-mobile.svg b/public/img/svg/octicon-device-mobile.svg index ce9aafd45..3a7c04240 100644 --- a/public/img/svg/octicon-device-mobile.svg +++ b/public/img/svg/octicon-device-mobile.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-diamond.svg b/public/img/svg/octicon-diamond.svg new file mode 100644 index 000000000..d13a10b67 --- /dev/null +++ b/public/img/svg/octicon-diamond.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-diff-added.svg b/public/img/svg/octicon-diff-added.svg index 54c32ca0c..35ce1e238 100644 --- a/public/img/svg/octicon-diff-added.svg +++ b/public/img/svg/octicon-diff-added.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-diff-ignored.svg b/public/img/svg/octicon-diff-ignored.svg index 1ae3254d8..e0cd2db1c 100644 --- a/public/img/svg/octicon-diff-ignored.svg +++ b/public/img/svg/octicon-diff-ignored.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-diff-modified.svg b/public/img/svg/octicon-diff-modified.svg index 63d3f11f2..286533fec 100644 --- a/public/img/svg/octicon-diff-modified.svg +++ b/public/img/svg/octicon-diff-modified.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-diff-removed.svg b/public/img/svg/octicon-diff-removed.svg index 240924143..feca991cf 100644 --- a/public/img/svg/octicon-diff-removed.svg +++ b/public/img/svg/octicon-diff-removed.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-diff-renamed.svg b/public/img/svg/octicon-diff-renamed.svg index 324fb8a0d..018541b63 100644 --- a/public/img/svg/octicon-diff-renamed.svg +++ b/public/img/svg/octicon-diff-renamed.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-diff.svg b/public/img/svg/octicon-diff.svg index 3212507dc..8171fbf40 100644 --- a/public/img/svg/octicon-diff.svg +++ b/public/img/svg/octicon-diff.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-dot-fill.svg b/public/img/svg/octicon-dot-fill.svg index 8a6a9b7d8..bd4ad8fb5 100644 --- a/public/img/svg/octicon-dot-fill.svg +++ b/public/img/svg/octicon-dot-fill.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-dot.svg b/public/img/svg/octicon-dot.svg index 22037a78e..752413e7a 100644 --- a/public/img/svg/octicon-dot.svg +++ b/public/img/svg/octicon-dot.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-download.svg b/public/img/svg/octicon-download.svg index ce7901fa1..c9f398163 100644 --- a/public/img/svg/octicon-download.svg +++ b/public/img/svg/octicon-download.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-duplicate.svg b/public/img/svg/octicon-duplicate.svg new file mode 100644 index 000000000..a9a0f1a74 --- /dev/null +++ b/public/img/svg/octicon-duplicate.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-ellipsis.svg b/public/img/svg/octicon-ellipsis.svg index c997d3c0e..2ab775046 100644 --- a/public/img/svg/octicon-ellipsis.svg +++ b/public/img/svg/octicon-ellipsis.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-eye-closed.svg b/public/img/svg/octicon-eye-closed.svg index 3ffcc630a..d22b04b10 100644 --- a/public/img/svg/octicon-eye-closed.svg +++ b/public/img/svg/octicon-eye-closed.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-eye.svg b/public/img/svg/octicon-eye.svg index 8cb1dbd52..e7f3ad7db 100644 --- a/public/img/svg/octicon-eye.svg +++ b/public/img/svg/octicon-eye.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-badge.svg b/public/img/svg/octicon-file-badge.svg index ef91f0e01..ef52524e2 100644 --- a/public/img/svg/octicon-file-badge.svg +++ b/public/img/svg/octicon-file-badge.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-binary.svg b/public/img/svg/octicon-file-binary.svg index 4d6ccb444..9834f8390 100644 --- a/public/img/svg/octicon-file-binary.svg +++ b/public/img/svg/octicon-file-binary.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-code.svg b/public/img/svg/octicon-file-code.svg index 23d5bde4b..8456343b3 100644 --- a/public/img/svg/octicon-file-code.svg +++ b/public/img/svg/octicon-file-code.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-diff.svg b/public/img/svg/octicon-file-diff.svg index 49c119583..0ffaf284b 100644 --- a/public/img/svg/octicon-file-diff.svg +++ b/public/img/svg/octicon-file-diff.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-directory.svg b/public/img/svg/octicon-file-directory.svg index 5d55f4790..d5fbf1efb 100644 --- a/public/img/svg/octicon-file-directory.svg +++ b/public/img/svg/octicon-file-directory.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-submodule.svg b/public/img/svg/octicon-file-submodule.svg index b26cf8ade..994d50a29 100644 --- a/public/img/svg/octicon-file-submodule.svg +++ b/public/img/svg/octicon-file-submodule.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-symlink-file.svg b/public/img/svg/octicon-file-symlink-file.svg index e39906351..cc6c628ce 100644 --- a/public/img/svg/octicon-file-symlink-file.svg +++ b/public/img/svg/octicon-file-symlink-file.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file-zip.svg b/public/img/svg/octicon-file-zip.svg index 607da6284..3794b7964 100644 --- a/public/img/svg/octicon-file-zip.svg +++ b/public/img/svg/octicon-file-zip.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-file.svg b/public/img/svg/octicon-file.svg index db55ca6f6..4e05d6feb 100644 --- a/public/img/svg/octicon-file.svg +++ b/public/img/svg/octicon-file.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-filter.svg b/public/img/svg/octicon-filter.svg index 53c204fab..69baf2ee3 100644 --- a/public/img/svg/octicon-filter.svg +++ b/public/img/svg/octicon-filter.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-flame.svg b/public/img/svg/octicon-flame.svg index 4f324e9e2..d4cda7e30 100644 --- a/public/img/svg/octicon-flame.svg +++ b/public/img/svg/octicon-flame.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-fold-down.svg b/public/img/svg/octicon-fold-down.svg index 656a68d57..15fb505f7 100644 --- a/public/img/svg/octicon-fold-down.svg +++ b/public/img/svg/octicon-fold-down.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-fold-up.svg b/public/img/svg/octicon-fold-up.svg index 5c784b17e..a062740ef 100644 --- a/public/img/svg/octicon-fold-up.svg +++ b/public/img/svg/octicon-fold-up.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-fold.svg b/public/img/svg/octicon-fold.svg index 9274e07b3..809949ab1 100644 --- a/public/img/svg/octicon-fold.svg +++ b/public/img/svg/octicon-fold.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-gear.svg b/public/img/svg/octicon-gear.svg index 6e7b932cc..7a833198f 100644 --- a/public/img/svg/octicon-gear.svg +++ b/public/img/svg/octicon-gear.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-gift.svg b/public/img/svg/octicon-gift.svg index 2072fe3d1..f8101891d 100644 --- a/public/img/svg/octicon-gift.svg +++ b/public/img/svg/octicon-gift.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-git-branch.svg b/public/img/svg/octicon-git-branch.svg index c49abac25..796f7128a 100644 --- a/public/img/svg/octicon-git-branch.svg +++ b/public/img/svg/octicon-git-branch.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-git-commit.svg b/public/img/svg/octicon-git-commit.svg index 83ab117f9..06be9837a 100644 --- a/public/img/svg/octicon-git-commit.svg +++ b/public/img/svg/octicon-git-commit.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-git-compare.svg b/public/img/svg/octicon-git-compare.svg index 16643746d..00be2721a 100644 --- a/public/img/svg/octicon-git-compare.svg +++ b/public/img/svg/octicon-git-compare.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-git-merge.svg b/public/img/svg/octicon-git-merge.svg index e7e96a568..4fd322f44 100644 --- a/public/img/svg/octicon-git-merge.svg +++ b/public/img/svg/octicon-git-merge.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-git-pull-request-closed.svg b/public/img/svg/octicon-git-pull-request-closed.svg new file mode 100644 index 000000000..feacb3c77 --- /dev/null +++ b/public/img/svg/octicon-git-pull-request-closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-git-pull-request-draft.svg b/public/img/svg/octicon-git-pull-request-draft.svg new file mode 100644 index 000000000..edd5ce7dd --- /dev/null +++ b/public/img/svg/octicon-git-pull-request-draft.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-git-pull-request.svg b/public/img/svg/octicon-git-pull-request.svg index d93c5ad65..35e6e3654 100644 --- a/public/img/svg/octicon-git-pull-request.svg +++ b/public/img/svg/octicon-git-pull-request.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-globe.svg b/public/img/svg/octicon-globe.svg index b955a6316..b9b0d4e8c 100644 --- a/public/img/svg/octicon-globe.svg +++ b/public/img/svg/octicon-globe.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-grabber.svg b/public/img/svg/octicon-grabber.svg index fc6eaeaa6..2d20faf04 100644 --- a/public/img/svg/octicon-grabber.svg +++ b/public/img/svg/octicon-grabber.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-graph.svg b/public/img/svg/octicon-graph.svg index 0a634bdac..e562645ae 100644 --- a/public/img/svg/octicon-graph.svg +++ b/public/img/svg/octicon-graph.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-hash.svg b/public/img/svg/octicon-hash.svg new file mode 100644 index 000000000..277ac29a0 --- /dev/null +++ b/public/img/svg/octicon-hash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-heading.svg b/public/img/svg/octicon-heading.svg index 5f1447b54..dc85efc9e 100644 --- a/public/img/svg/octicon-heading.svg +++ b/public/img/svg/octicon-heading.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-heart-fill.svg b/public/img/svg/octicon-heart-fill.svg index bd222350c..f668e261d 100644 --- a/public/img/svg/octicon-heart-fill.svg +++ b/public/img/svg/octicon-heart-fill.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-heart.svg b/public/img/svg/octicon-heart.svg index f684b7ac6..d3280ef89 100644 --- a/public/img/svg/octicon-heart.svg +++ b/public/img/svg/octicon-heart.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-history.svg b/public/img/svg/octicon-history.svg index 12f641af4..c84b7e49e 100644 --- a/public/img/svg/octicon-history.svg +++ b/public/img/svg/octicon-history.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-home.svg b/public/img/svg/octicon-home.svg index 13722cda1..78aef58de 100644 --- a/public/img/svg/octicon-home.svg +++ b/public/img/svg/octicon-home.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-horizontal-rule.svg b/public/img/svg/octicon-horizontal-rule.svg index 3846437d4..28e3b738e 100644 --- a/public/img/svg/octicon-horizontal-rule.svg +++ b/public/img/svg/octicon-horizontal-rule.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-hourglass.svg b/public/img/svg/octicon-hourglass.svg index b3a29c9da..fc7f36256 100644 --- a/public/img/svg/octicon-hourglass.svg +++ b/public/img/svg/octicon-hourglass.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-hubot.svg b/public/img/svg/octicon-hubot.svg index f972598d8..706b4003f 100644 --- a/public/img/svg/octicon-hubot.svg +++ b/public/img/svg/octicon-hubot.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-image.svg b/public/img/svg/octicon-image.svg index f3a3c5b49..e278a80f4 100644 --- a/public/img/svg/octicon-image.svg +++ b/public/img/svg/octicon-image.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-inbox.svg b/public/img/svg/octicon-inbox.svg index 774c191bf..21ca60a59 100644 --- a/public/img/svg/octicon-inbox.svg +++ b/public/img/svg/octicon-inbox.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-info.svg b/public/img/svg/octicon-info.svg index 01577ad5e..dc50b6fac 100644 --- a/public/img/svg/octicon-info.svg +++ b/public/img/svg/octicon-info.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-issue-closed.svg b/public/img/svg/octicon-issue-closed.svg index 276e3f8b9..dba68ab07 100644 --- a/public/img/svg/octicon-issue-closed.svg +++ b/public/img/svg/octicon-issue-closed.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-issue-draft.svg b/public/img/svg/octicon-issue-draft.svg new file mode 100644 index 000000000..0efacc1b5 --- /dev/null +++ b/public/img/svg/octicon-issue-draft.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-issue-opened.svg b/public/img/svg/octicon-issue-opened.svg index 962fb252b..bd55f8394 100644 --- a/public/img/svg/octicon-issue-opened.svg +++ b/public/img/svg/octicon-issue-opened.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-issue-reopened.svg b/public/img/svg/octicon-issue-reopened.svg index 8d7d21a47..c8367cfef 100644 --- a/public/img/svg/octicon-issue-reopened.svg +++ b/public/img/svg/octicon-issue-reopened.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-italic.svg b/public/img/svg/octicon-italic.svg index f31d3868b..485bf091c 100644 --- a/public/img/svg/octicon-italic.svg +++ b/public/img/svg/octicon-italic.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-kebab-horizontal.svg b/public/img/svg/octicon-kebab-horizontal.svg index fff917e2e..8852e0ca4 100644 --- a/public/img/svg/octicon-kebab-horizontal.svg +++ b/public/img/svg/octicon-kebab-horizontal.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-key-asterisk.svg b/public/img/svg/octicon-key-asterisk.svg new file mode 100644 index 000000000..7ed156b9b --- /dev/null +++ b/public/img/svg/octicon-key-asterisk.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-key.svg b/public/img/svg/octicon-key.svg index b3983a119..db8b3111d 100644 --- a/public/img/svg/octicon-key.svg +++ b/public/img/svg/octicon-key.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-law.svg b/public/img/svg/octicon-law.svg index 40178ee52..78417b3ff 100644 --- a/public/img/svg/octicon-law.svg +++ b/public/img/svg/octicon-law.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-light-bulb.svg b/public/img/svg/octicon-light-bulb.svg index 9e9b9c305..3428df521 100644 --- a/public/img/svg/octicon-light-bulb.svg +++ b/public/img/svg/octicon-light-bulb.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-link-external.svg b/public/img/svg/octicon-link-external.svg index 25f0a6920..e0a6f8bc5 100644 --- a/public/img/svg/octicon-link-external.svg +++ b/public/img/svg/octicon-link-external.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-link.svg b/public/img/svg/octicon-link.svg index 772973d51..37f5738ab 100644 --- a/public/img/svg/octicon-link.svg +++ b/public/img/svg/octicon-link.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-list-ordered.svg b/public/img/svg/octicon-list-ordered.svg index ba6251186..d0238e5e8 100644 --- a/public/img/svg/octicon-list-ordered.svg +++ b/public/img/svg/octicon-list-ordered.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-list-unordered.svg b/public/img/svg/octicon-list-unordered.svg index 07b357920..0f0111065 100644 --- a/public/img/svg/octicon-list-unordered.svg +++ b/public/img/svg/octicon-list-unordered.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-location.svg b/public/img/svg/octicon-location.svg index 83a4c61b5..4d74ff3b9 100644 --- a/public/img/svg/octicon-location.svg +++ b/public/img/svg/octicon-location.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-lock.svg b/public/img/svg/octicon-lock.svg index 567737abc..1d7406844 100644 --- a/public/img/svg/octicon-lock.svg +++ b/public/img/svg/octicon-lock.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-logo-github.svg b/public/img/svg/octicon-logo-github.svg index 10a17fb04..737936621 100644 --- a/public/img/svg/octicon-logo-github.svg +++ b/public/img/svg/octicon-logo-github.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-mail.svg b/public/img/svg/octicon-mail.svg index b369f3047..44b22ff80 100644 --- a/public/img/svg/octicon-mail.svg +++ b/public/img/svg/octicon-mail.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-mark-github.svg b/public/img/svg/octicon-mark-github.svg index bb1a4ec8e..d00b2bcf1 100644 --- a/public/img/svg/octicon-mark-github.svg +++ b/public/img/svg/octicon-mark-github.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-megaphone.svg b/public/img/svg/octicon-megaphone.svg index 41b0c82a4..b733aa552 100644 --- a/public/img/svg/octicon-megaphone.svg +++ b/public/img/svg/octicon-megaphone.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-mention.svg b/public/img/svg/octicon-mention.svg index 6cf4714f8..6847fed0f 100644 --- a/public/img/svg/octicon-mention.svg +++ b/public/img/svg/octicon-mention.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-meter.svg b/public/img/svg/octicon-meter.svg index 759db58b1..d4bf6e875 100644 --- a/public/img/svg/octicon-meter.svg +++ b/public/img/svg/octicon-meter.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-milestone.svg b/public/img/svg/octicon-milestone.svg index aab216009..37c431b54 100644 --- a/public/img/svg/octicon-milestone.svg +++ b/public/img/svg/octicon-milestone.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-mirror.svg b/public/img/svg/octicon-mirror.svg index 5a8f806f7..42c9b45ae 100644 --- a/public/img/svg/octicon-mirror.svg +++ b/public/img/svg/octicon-mirror.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-moon.svg b/public/img/svg/octicon-moon.svg index 06d9fbbfc..fe9733e22 100644 --- a/public/img/svg/octicon-moon.svg +++ b/public/img/svg/octicon-moon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-mortar-board.svg b/public/img/svg/octicon-mortar-board.svg index e6d59537c..fa3941192 100644 --- a/public/img/svg/octicon-mortar-board.svg +++ b/public/img/svg/octicon-mortar-board.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-multi-select.svg b/public/img/svg/octicon-multi-select.svg new file mode 100644 index 000000000..0cde4d60d --- /dev/null +++ b/public/img/svg/octicon-multi-select.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-mute.svg b/public/img/svg/octicon-mute.svg index c8006807d..088b756fc 100644 --- a/public/img/svg/octicon-mute.svg +++ b/public/img/svg/octicon-mute.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-no-entry.svg b/public/img/svg/octicon-no-entry.svg index a67f21623..6671f118a 100644 --- a/public/img/svg/octicon-no-entry.svg +++ b/public/img/svg/octicon-no-entry.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-north-star.svg b/public/img/svg/octicon-north-star.svg index a894bb573..ee501e413 100644 --- a/public/img/svg/octicon-north-star.svg +++ b/public/img/svg/octicon-north-star.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-note.svg b/public/img/svg/octicon-note.svg index 38baab238..02ae3d515 100644 --- a/public/img/svg/octicon-note.svg +++ b/public/img/svg/octicon-note.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-number.svg b/public/img/svg/octicon-number.svg new file mode 100644 index 000000000..0d60392de --- /dev/null +++ b/public/img/svg/octicon-number.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-octoface.svg b/public/img/svg/octicon-octoface.svg deleted file mode 100644 index da9da10f0..000000000 --- a/public/img/svg/octicon-octoface.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/img/svg/octicon-organization.svg b/public/img/svg/octicon-organization.svg index d0a079449..1a5ebf73d 100644 --- a/public/img/svg/octicon-organization.svg +++ b/public/img/svg/octicon-organization.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-package-dependencies.svg b/public/img/svg/octicon-package-dependencies.svg index 542d0230f..cf6f8d336 100644 --- a/public/img/svg/octicon-package-dependencies.svg +++ b/public/img/svg/octicon-package-dependencies.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-package-dependents.svg b/public/img/svg/octicon-package-dependents.svg index 11b7ce765..4fa70763c 100644 --- a/public/img/svg/octicon-package-dependents.svg +++ b/public/img/svg/octicon-package-dependents.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-package.svg b/public/img/svg/octicon-package.svg index 47f3b0ae8..9614e0b7c 100644 --- a/public/img/svg/octicon-package.svg +++ b/public/img/svg/octicon-package.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-paintbrush.svg b/public/img/svg/octicon-paintbrush.svg index 52a25db9f..aa8be69e0 100644 --- a/public/img/svg/octicon-paintbrush.svg +++ b/public/img/svg/octicon-paintbrush.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-paper-airplane.svg b/public/img/svg/octicon-paper-airplane.svg index afb3f1b89..72f9bf7c0 100644 --- a/public/img/svg/octicon-paper-airplane.svg +++ b/public/img/svg/octicon-paper-airplane.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-paste.svg b/public/img/svg/octicon-paste.svg new file mode 100644 index 000000000..3e5b1cb35 --- /dev/null +++ b/public/img/svg/octicon-paste.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-pencil.svg b/public/img/svg/octicon-pencil.svg index 041600179..19ead37d8 100644 --- a/public/img/svg/octicon-pencil.svg +++ b/public/img/svg/octicon-pencil.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-people.svg b/public/img/svg/octicon-people.svg index 82fed59e8..8a00d3a42 100644 --- a/public/img/svg/octicon-people.svg +++ b/public/img/svg/octicon-people.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-person-add.svg b/public/img/svg/octicon-person-add.svg new file mode 100644 index 000000000..fbec6c90f --- /dev/null +++ b/public/img/svg/octicon-person-add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-person.svg b/public/img/svg/octicon-person.svg index 0dcbb4935..b81ba0e4d 100644 --- a/public/img/svg/octicon-person.svg +++ b/public/img/svg/octicon-person.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-pin.svg b/public/img/svg/octicon-pin.svg index dcb08c5ed..152d37994 100644 --- a/public/img/svg/octicon-pin.svg +++ b/public/img/svg/octicon-pin.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-play.svg b/public/img/svg/octicon-play.svg index 4485c577e..b06ad02f9 100644 --- a/public/img/svg/octicon-play.svg +++ b/public/img/svg/octicon-play.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-plug.svg b/public/img/svg/octicon-plug.svg index fffd5ddab..4e7bf2dad 100644 --- a/public/img/svg/octicon-plug.svg +++ b/public/img/svg/octicon-plug.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-plus-circle.svg b/public/img/svg/octicon-plus-circle.svg index 649077f02..4f0a9798b 100644 --- a/public/img/svg/octicon-plus-circle.svg +++ b/public/img/svg/octicon-plus-circle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-plus.svg b/public/img/svg/octicon-plus.svg index d443cf1fa..0c392bea2 100644 --- a/public/img/svg/octicon-plus.svg +++ b/public/img/svg/octicon-plus.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-project.svg b/public/img/svg/octicon-project.svg index 9592957df..f47b19cc7 100644 --- a/public/img/svg/octicon-project.svg +++ b/public/img/svg/octicon-project.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-pulse.svg b/public/img/svg/octicon-pulse.svg index ee0d08830..1f1637b66 100644 --- a/public/img/svg/octicon-pulse.svg +++ b/public/img/svg/octicon-pulse.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-question.svg b/public/img/svg/octicon-question.svg index d38cb7673..42a39fb51 100644 --- a/public/img/svg/octicon-question.svg +++ b/public/img/svg/octicon-question.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-quote.svg b/public/img/svg/octicon-quote.svg index 1cc0faff0..819a0c902 100644 --- a/public/img/svg/octicon-quote.svg +++ b/public/img/svg/octicon-quote.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-reply.svg b/public/img/svg/octicon-reply.svg index bc491604a..8d5053f19 100644 --- a/public/img/svg/octicon-reply.svg +++ b/public/img/svg/octicon-reply.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-repo-forked.svg b/public/img/svg/octicon-repo-forked.svg index f5999545d..42a565db1 100644 --- a/public/img/svg/octicon-repo-forked.svg +++ b/public/img/svg/octicon-repo-forked.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-repo-push.svg b/public/img/svg/octicon-repo-push.svg index 3103fd0e3..c7b16a837 100644 --- a/public/img/svg/octicon-repo-push.svg +++ b/public/img/svg/octicon-repo-push.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-repo-template.svg b/public/img/svg/octicon-repo-template.svg index bfc0c1549..b18c540f8 100644 --- a/public/img/svg/octicon-repo-template.svg +++ b/public/img/svg/octicon-repo-template.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-repo.svg b/public/img/svg/octicon-repo.svg index 2031d09fc..5ac69c249 100644 --- a/public/img/svg/octicon-repo.svg +++ b/public/img/svg/octicon-repo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-report.svg b/public/img/svg/octicon-report.svg index b432c33e7..a17354fb8 100644 --- a/public/img/svg/octicon-report.svg +++ b/public/img/svg/octicon-report.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-rocket.svg b/public/img/svg/octicon-rocket.svg index a9583b1b7..1b1607546 100644 --- a/public/img/svg/octicon-rocket.svg +++ b/public/img/svg/octicon-rocket.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-rows.svg b/public/img/svg/octicon-rows.svg new file mode 100644 index 000000000..7f522994b --- /dev/null +++ b/public/img/svg/octicon-rows.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-rss.svg b/public/img/svg/octicon-rss.svg index 608e51723..18d4fc05f 100644 --- a/public/img/svg/octicon-rss.svg +++ b/public/img/svg/octicon-rss.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-ruby.svg b/public/img/svg/octicon-ruby.svg index b95b04bba..41025699e 100644 --- a/public/img/svg/octicon-ruby.svg +++ b/public/img/svg/octicon-ruby.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-screen-full.svg b/public/img/svg/octicon-screen-full.svg index 330f228db..e76cd9f9c 100644 --- a/public/img/svg/octicon-screen-full.svg +++ b/public/img/svg/octicon-screen-full.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-screen-normal.svg b/public/img/svg/octicon-screen-normal.svg index 4f12b76ed..5fcefec3a 100644 --- a/public/img/svg/octicon-screen-normal.svg +++ b/public/img/svg/octicon-screen-normal.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-search.svg b/public/img/svg/octicon-search.svg index d86bb2a91..a8d717d8d 100644 --- a/public/img/svg/octicon-search.svg +++ b/public/img/svg/octicon-search.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-select-single.svg b/public/img/svg/octicon-select-single.svg new file mode 100644 index 000000000..eba35e990 --- /dev/null +++ b/public/img/svg/octicon-select-single.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-server.svg b/public/img/svg/octicon-server.svg index 55e86a3f4..140b56bd6 100644 --- a/public/img/svg/octicon-server.svg +++ b/public/img/svg/octicon-server.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-share-android.svg b/public/img/svg/octicon-share-android.svg index e9b47cf51..a84adb98b 100644 --- a/public/img/svg/octicon-share-android.svg +++ b/public/img/svg/octicon-share-android.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-share.svg b/public/img/svg/octicon-share.svg index 60f64c0e7..2171a82f3 100644 --- a/public/img/svg/octicon-share.svg +++ b/public/img/svg/octicon-share.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-shield-check.svg b/public/img/svg/octicon-shield-check.svg index a6ca9464b..3d633205e 100644 --- a/public/img/svg/octicon-shield-check.svg +++ b/public/img/svg/octicon-shield-check.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-shield-lock.svg b/public/img/svg/octicon-shield-lock.svg index b6ea624f7..3d6f3fb9c 100644 --- a/public/img/svg/octicon-shield-lock.svg +++ b/public/img/svg/octicon-shield-lock.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-shield-x.svg b/public/img/svg/octicon-shield-x.svg index 6e0ecc97d..9b5e4eb28 100644 --- a/public/img/svg/octicon-shield-x.svg +++ b/public/img/svg/octicon-shield-x.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-shield.svg b/public/img/svg/octicon-shield.svg index 465364ae4..22b8f039e 100644 --- a/public/img/svg/octicon-shield.svg +++ b/public/img/svg/octicon-shield.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-sidebar-collapse.svg b/public/img/svg/octicon-sidebar-collapse.svg new file mode 100644 index 000000000..29f23e87b --- /dev/null +++ b/public/img/svg/octicon-sidebar-collapse.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-sidebar-expand.svg b/public/img/svg/octicon-sidebar-expand.svg new file mode 100644 index 000000000..9b432e28f --- /dev/null +++ b/public/img/svg/octicon-sidebar-expand.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-sign-in.svg b/public/img/svg/octicon-sign-in.svg index f24489964..014d78f6d 100644 --- a/public/img/svg/octicon-sign-in.svg +++ b/public/img/svg/octicon-sign-in.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-sign-out.svg b/public/img/svg/octicon-sign-out.svg index d83eb102d..ea39f78d4 100644 --- a/public/img/svg/octicon-sign-out.svg +++ b/public/img/svg/octicon-sign-out.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-skip.svg b/public/img/svg/octicon-skip.svg index eaf724ced..f889a7e23 100644 --- a/public/img/svg/octicon-skip.svg +++ b/public/img/svg/octicon-skip.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-smiley.svg b/public/img/svg/octicon-smiley.svg index 0792a561b..e68c2280f 100644 --- a/public/img/svg/octicon-smiley.svg +++ b/public/img/svg/octicon-smiley.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-sort-asc.svg b/public/img/svg/octicon-sort-asc.svg new file mode 100644 index 000000000..4588fc6f1 --- /dev/null +++ b/public/img/svg/octicon-sort-asc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-sort-desc.svg b/public/img/svg/octicon-sort-desc.svg new file mode 100644 index 000000000..ed018f31c --- /dev/null +++ b/public/img/svg/octicon-sort-desc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-square-fill.svg b/public/img/svg/octicon-square-fill.svg index 7dadaad02..8b8182b6c 100644 --- a/public/img/svg/octicon-square-fill.svg +++ b/public/img/svg/octicon-square-fill.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-square.svg b/public/img/svg/octicon-square.svg index 1132970de..3243253cf 100644 --- a/public/img/svg/octicon-square.svg +++ b/public/img/svg/octicon-square.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-squirrel.svg b/public/img/svg/octicon-squirrel.svg index 92a0f84d3..e3b6f9b15 100644 --- a/public/img/svg/octicon-squirrel.svg +++ b/public/img/svg/octicon-squirrel.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-star-fill.svg b/public/img/svg/octicon-star-fill.svg index 56a6ded73..fd0b38d9e 100644 --- a/public/img/svg/octicon-star-fill.svg +++ b/public/img/svg/octicon-star-fill.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-star.svg b/public/img/svg/octicon-star.svg index 3dd05a2f6..5d48dfc17 100644 --- a/public/img/svg/octicon-star.svg +++ b/public/img/svg/octicon-star.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-stop.svg b/public/img/svg/octicon-stop.svg index b1037345c..367686e34 100644 --- a/public/img/svg/octicon-stop.svg +++ b/public/img/svg/octicon-stop.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-stopwatch.svg b/public/img/svg/octicon-stopwatch.svg index e12e6c458..2ef2d8b12 100644 --- a/public/img/svg/octicon-stopwatch.svg +++ b/public/img/svg/octicon-stopwatch.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-strikethrough.svg b/public/img/svg/octicon-strikethrough.svg index f323d940d..8797d6b69 100644 --- a/public/img/svg/octicon-strikethrough.svg +++ b/public/img/svg/octicon-strikethrough.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-sun.svg b/public/img/svg/octicon-sun.svg index ea51099e5..9d6c27c8e 100644 --- a/public/img/svg/octicon-sun.svg +++ b/public/img/svg/octicon-sun.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-sync.svg b/public/img/svg/octicon-sync.svg index ec003cb7d..d8fc52746 100644 --- a/public/img/svg/octicon-sync.svg +++ b/public/img/svg/octicon-sync.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-table.svg b/public/img/svg/octicon-table.svg new file mode 100644 index 000000000..905b2bb9b --- /dev/null +++ b/public/img/svg/octicon-table.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-tag.svg b/public/img/svg/octicon-tag.svg index 390d027ff..a9c9be3ce 100644 --- a/public/img/svg/octicon-tag.svg +++ b/public/img/svg/octicon-tag.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-tasklist.svg b/public/img/svg/octicon-tasklist.svg index 481c11a88..81e41a87c 100644 --- a/public/img/svg/octicon-tasklist.svg +++ b/public/img/svg/octicon-tasklist.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-telescope.svg b/public/img/svg/octicon-telescope.svg index 671611b7d..4f9817914 100644 --- a/public/img/svg/octicon-telescope.svg +++ b/public/img/svg/octicon-telescope.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-terminal.svg b/public/img/svg/octicon-terminal.svg index 8fdd1b98f..27caf2487 100644 --- a/public/img/svg/octicon-terminal.svg +++ b/public/img/svg/octicon-terminal.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-three-bars.svg b/public/img/svg/octicon-three-bars.svg index 482b9b0ef..1d741f76b 100644 --- a/public/img/svg/octicon-three-bars.svg +++ b/public/img/svg/octicon-three-bars.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-thumbsdown.svg b/public/img/svg/octicon-thumbsdown.svg index 0638824fd..368d98b4d 100644 --- a/public/img/svg/octicon-thumbsdown.svg +++ b/public/img/svg/octicon-thumbsdown.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-thumbsup.svg b/public/img/svg/octicon-thumbsup.svg index 69b31223f..69e409768 100644 --- a/public/img/svg/octicon-thumbsup.svg +++ b/public/img/svg/octicon-thumbsup.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-tools.svg b/public/img/svg/octicon-tools.svg index 180666850..eb5201fd9 100644 --- a/public/img/svg/octicon-tools.svg +++ b/public/img/svg/octicon-tools.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-trash.svg b/public/img/svg/octicon-trash.svg new file mode 100644 index 000000000..8902dcc60 --- /dev/null +++ b/public/img/svg/octicon-trash.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-trashcan.svg b/public/img/svg/octicon-trashcan.svg deleted file mode 100644 index e88628a10..000000000 --- a/public/img/svg/octicon-trashcan.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/img/svg/octicon-triangle-down.svg b/public/img/svg/octicon-triangle-down.svg index dcc36c5c7..3a0054d83 100644 --- a/public/img/svg/octicon-triangle-down.svg +++ b/public/img/svg/octicon-triangle-down.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-triangle-left.svg b/public/img/svg/octicon-triangle-left.svg index 1876b3f36..f2bdfd220 100644 --- a/public/img/svg/octicon-triangle-left.svg +++ b/public/img/svg/octicon-triangle-left.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-triangle-right.svg b/public/img/svg/octicon-triangle-right.svg index 68dfaa905..c73ac10f0 100644 --- a/public/img/svg/octicon-triangle-right.svg +++ b/public/img/svg/octicon-triangle-right.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-triangle-up.svg b/public/img/svg/octicon-triangle-up.svg index 9ff519754..9da17678c 100644 --- a/public/img/svg/octicon-triangle-up.svg +++ b/public/img/svg/octicon-triangle-up.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-typography.svg b/public/img/svg/octicon-typography.svg index 068c6a9d5..dffb43d6d 100644 --- a/public/img/svg/octicon-typography.svg +++ b/public/img/svg/octicon-typography.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-unfold.svg b/public/img/svg/octicon-unfold.svg index 1520f3c1f..8bbd21aa3 100644 --- a/public/img/svg/octicon-unfold.svg +++ b/public/img/svg/octicon-unfold.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-unlock.svg b/public/img/svg/octicon-unlock.svg index 00ec7749e..42c000dc8 100644 --- a/public/img/svg/octicon-unlock.svg +++ b/public/img/svg/octicon-unlock.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-unmute.svg b/public/img/svg/octicon-unmute.svg index e499e1043..6e007d68d 100644 --- a/public/img/svg/octicon-unmute.svg +++ b/public/img/svg/octicon-unmute.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-unverified.svg b/public/img/svg/octicon-unverified.svg index b3a815cb3..af5292662 100644 --- a/public/img/svg/octicon-unverified.svg +++ b/public/img/svg/octicon-unverified.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-upload.svg b/public/img/svg/octicon-upload.svg index 04d50935e..184f5d595 100644 --- a/public/img/svg/octicon-upload.svg +++ b/public/img/svg/octicon-upload.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-verified.svg b/public/img/svg/octicon-verified.svg index 9748b2e0d..f03be8064 100644 --- a/public/img/svg/octicon-verified.svg +++ b/public/img/svg/octicon-verified.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-versions.svg b/public/img/svg/octicon-versions.svg index a9af183b5..a52370c95 100644 --- a/public/img/svg/octicon-versions.svg +++ b/public/img/svg/octicon-versions.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-video.svg b/public/img/svg/octicon-video.svg new file mode 100644 index 000000000..a584f75dc --- /dev/null +++ b/public/img/svg/octicon-video.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/public/img/svg/octicon-workflow.svg b/public/img/svg/octicon-workflow.svg index e1e424782..276a4980f 100644 --- a/public/img/svg/octicon-workflow.svg +++ b/public/img/svg/octicon-workflow.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-x-circle-fill.svg b/public/img/svg/octicon-x-circle-fill.svg index 1a17027a5..8eaecda15 100644 --- a/public/img/svg/octicon-x-circle-fill.svg +++ b/public/img/svg/octicon-x-circle-fill.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-x-circle.svg b/public/img/svg/octicon-x-circle.svg index 4c4fe02ab..0fb14679c 100644 --- a/public/img/svg/octicon-x-circle.svg +++ b/public/img/svg/octicon-x-circle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-x.svg b/public/img/svg/octicon-x.svg index bf4273d0a..eafe15906 100644 --- a/public/img/svg/octicon-x.svg +++ b/public/img/svg/octicon-x.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/svg/octicon-zap.svg b/public/img/svg/octicon-zap.svg index 51aae5a42..1b9c78a48 100644 --- a/public/img/svg/octicon-zap.svg +++ b/public/img/svg/octicon-zap.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/public/img/wechatwork.png b/public/img/wechatwork.png new file mode 100644 index 000000000..296225fb8 Binary files /dev/null and b/public/img/wechatwork.png differ diff --git a/routers/admin/admin.go b/routers/admin/admin.go deleted file mode 100644 index 4180076b0..000000000 --- a/routers/admin/admin.go +++ /dev/null @@ -1,483 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "encoding/json" - "fmt" - "net/url" - "os" - "runtime" - "strconv" - "strings" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/cron" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/process" - "code.gitea.io/gitea/modules/queue" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/services/mailer" - - "gitea.com/macaron/macaron" - "gitea.com/macaron/session" -) - -const ( - tplDashboard base.TplName = "admin/dashboard" - tplConfig base.TplName = "admin/config" - tplMonitor base.TplName = "admin/monitor" - tplQueue base.TplName = "admin/queue" -) - -var sysStatus struct { - Uptime string - NumGoroutine int - - // General statistics. - MemAllocated string // bytes allocated and still in use - MemTotal string // bytes allocated (even if freed) - MemSys string // bytes obtained from system (sum of XxxSys below) - Lookups uint64 // number of pointer lookups - MemMallocs uint64 // number of mallocs - MemFrees uint64 // number of frees - - // Main allocation heap statistics. - HeapAlloc string // bytes allocated and still in use - HeapSys string // bytes obtained from system - HeapIdle string // bytes in idle spans - HeapInuse string // bytes in non-idle span - HeapReleased string // bytes released to the OS - HeapObjects uint64 // total number of allocated objects - - // Low-level fixed-size structure allocator statistics. - // Inuse is bytes used now. - // Sys is bytes obtained from system. - StackInuse string // bootstrap stacks - StackSys string - MSpanInuse string // mspan structures - MSpanSys string - MCacheInuse string // mcache structures - MCacheSys string - BuckHashSys string // profiling bucket hash table - GCSys string // GC metadata - OtherSys string // other system allocations - - // Garbage collector statistics. - NextGC string // next run in HeapAlloc time (bytes) - LastGC string // last run in absolute time (ns) - PauseTotalNs string - PauseNs string // circular buffer of recent GC pause times, most recent at [(NumGC+255)%256] - NumGC uint32 -} - -func updateSystemStatus() { - sysStatus.Uptime = timeutil.TimeSincePro(setting.AppStartTime, "en") - - m := new(runtime.MemStats) - runtime.ReadMemStats(m) - sysStatus.NumGoroutine = runtime.NumGoroutine() - - sysStatus.MemAllocated = base.FileSize(int64(m.Alloc)) - sysStatus.MemTotal = base.FileSize(int64(m.TotalAlloc)) - sysStatus.MemSys = base.FileSize(int64(m.Sys)) - sysStatus.Lookups = m.Lookups - sysStatus.MemMallocs = m.Mallocs - sysStatus.MemFrees = m.Frees - - sysStatus.HeapAlloc = base.FileSize(int64(m.HeapAlloc)) - sysStatus.HeapSys = base.FileSize(int64(m.HeapSys)) - sysStatus.HeapIdle = base.FileSize(int64(m.HeapIdle)) - sysStatus.HeapInuse = base.FileSize(int64(m.HeapInuse)) - sysStatus.HeapReleased = base.FileSize(int64(m.HeapReleased)) - sysStatus.HeapObjects = m.HeapObjects - - sysStatus.StackInuse = base.FileSize(int64(m.StackInuse)) - sysStatus.StackSys = base.FileSize(int64(m.StackSys)) - sysStatus.MSpanInuse = base.FileSize(int64(m.MSpanInuse)) - sysStatus.MSpanSys = base.FileSize(int64(m.MSpanSys)) - sysStatus.MCacheInuse = base.FileSize(int64(m.MCacheInuse)) - sysStatus.MCacheSys = base.FileSize(int64(m.MCacheSys)) - sysStatus.BuckHashSys = base.FileSize(int64(m.BuckHashSys)) - sysStatus.GCSys = base.FileSize(int64(m.GCSys)) - sysStatus.OtherSys = base.FileSize(int64(m.OtherSys)) - - sysStatus.NextGC = base.FileSize(int64(m.NextGC)) - sysStatus.LastGC = fmt.Sprintf("%.1fs", float64(time.Now().UnixNano()-int64(m.LastGC))/1000/1000/1000) - sysStatus.PauseTotalNs = fmt.Sprintf("%.1fs", float64(m.PauseTotalNs)/1000/1000/1000) - sysStatus.PauseNs = fmt.Sprintf("%.3fs", float64(m.PauseNs[(m.NumGC+255)%256])/1000/1000/1000) - sysStatus.NumGC = m.NumGC -} - -// Dashboard show admin panel dashboard -func Dashboard(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.dashboard") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminDashboard"] = true - ctx.Data["Stats"] = models.GetStatistic() - // FIXME: update periodically - updateSystemStatus() - ctx.Data["SysStatus"] = sysStatus - ctx.Data["SSH"] = setting.SSH - ctx.HTML(200, tplDashboard) -} - -// DashboardPost run an admin operation -func DashboardPost(ctx *context.Context, form auth.AdminDashboardForm) { - ctx.Data["Title"] = ctx.Tr("admin.dashboard") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminDashboard"] = true - ctx.Data["Stats"] = models.GetStatistic() - updateSystemStatus() - ctx.Data["SysStatus"] = sysStatus - - // Run operation. - if form.Op != "" { - task := cron.GetTask(form.Op) - if task != nil { - go task.RunWithUser(ctx.User, nil) - ctx.Flash.Success(ctx.Tr("admin.dashboard.task.started", ctx.Tr("admin.dashboard."+form.Op))) - } else { - ctx.Flash.Error(ctx.Tr("admin.dashboard.task.unknown", form.Op)) - } - } - if form.From == "monitor" { - ctx.Redirect(setting.AppSubURL + "/admin/monitor") - } else { - ctx.Redirect(setting.AppSubURL + "/admin") - } -} - -// SendTestMail send test mail to confirm mail service is OK -func SendTestMail(ctx *context.Context) { - email := ctx.Query("email") - // Send a test email to the user's email address and redirect back to Config - if err := mailer.SendTestMail(email); err != nil { - ctx.Flash.Error(ctx.Tr("admin.config.test_mail_failed", email, err)) - } else { - ctx.Flash.Info(ctx.Tr("admin.config.test_mail_sent", email)) - } - - ctx.Redirect(setting.AppSubURL + "/admin/config") -} - -func shadowPasswordKV(cfgItem, splitter string) string { - fields := strings.Split(cfgItem, splitter) - for i := 0; i < len(fields); i++ { - if strings.HasPrefix(fields[i], "password=") { - fields[i] = "password=******" - break - } - } - return strings.Join(fields, splitter) -} - -func shadowURL(provider, cfgItem string) string { - u, err := url.Parse(cfgItem) - if err != nil { - log.Error("Shadowing Password for %v failed: %v", provider, err) - return cfgItem - } - if u.User != nil { - atIdx := strings.Index(cfgItem, "@") - if atIdx > 0 { - colonIdx := strings.LastIndex(cfgItem[:atIdx], ":") - if colonIdx > 0 { - return cfgItem[:colonIdx+1] + "******" + cfgItem[atIdx:] - } - } - } - return cfgItem -} - -func shadowPassword(provider, cfgItem string) string { - switch provider { - case "redis": - return shadowPasswordKV(cfgItem, ",") - case "mysql": - //root:@tcp(localhost:3306)/macaron?charset=utf8 - atIdx := strings.Index(cfgItem, "@") - if atIdx > 0 { - colonIdx := strings.Index(cfgItem[:atIdx], ":") - if colonIdx > 0 { - return cfgItem[:colonIdx+1] + "******" + cfgItem[atIdx:] - } - } - return cfgItem - case "postgres": - // user=jiahuachen dbname=macaron port=5432 sslmode=disable - if !strings.HasPrefix(cfgItem, "postgres://") { - return shadowPasswordKV(cfgItem, " ") - } - fallthrough - case "couchbase": - return shadowURL(provider, cfgItem) - // postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full - // Notice: use shadowURL - } - return cfgItem -} - -// Config show admin config page -func Config(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.config") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminConfig"] = true - - ctx.Data["CustomConf"] = setting.CustomConf - ctx.Data["AppUrl"] = setting.AppURL - ctx.Data["Domain"] = setting.Domain - ctx.Data["OfflineMode"] = setting.OfflineMode - ctx.Data["DisableRouterLog"] = setting.DisableRouterLog - ctx.Data["RunUser"] = setting.RunUser - ctx.Data["RunMode"] = strings.Title(macaron.Env) - if version, err := git.LocalVersion(); err == nil { - ctx.Data["GitVersion"] = version.Original() - } - ctx.Data["RepoRootPath"] = setting.RepoRootPath - ctx.Data["CustomRootPath"] = setting.CustomPath - ctx.Data["StaticRootPath"] = setting.StaticRootPath - ctx.Data["LogRootPath"] = setting.LogRootPath - ctx.Data["ScriptType"] = setting.ScriptType - ctx.Data["ReverseProxyAuthUser"] = setting.ReverseProxyAuthUser - ctx.Data["ReverseProxyAuthEmail"] = setting.ReverseProxyAuthEmail - - ctx.Data["SSH"] = setting.SSH - ctx.Data["LFS"] = setting.LFS - - ctx.Data["Service"] = setting.Service - ctx.Data["DbCfg"] = setting.Database - ctx.Data["Webhook"] = setting.Webhook - - ctx.Data["MailerEnabled"] = false - if setting.MailService != nil { - ctx.Data["MailerEnabled"] = true - ctx.Data["Mailer"] = setting.MailService - } - - ctx.Data["CacheAdapter"] = setting.CacheService.Adapter - ctx.Data["CacheInterval"] = setting.CacheService.Interval - - ctx.Data["CacheConn"] = shadowPassword(setting.CacheService.Adapter, setting.CacheService.Conn) - ctx.Data["CacheItemTTL"] = setting.CacheService.TTL - - sessionCfg := setting.SessionConfig - if sessionCfg.Provider == "VirtualSession" { - var realSession session.Options - if err := json.Unmarshal([]byte(sessionCfg.ProviderConfig), &realSession); err != nil { - log.Error("Unable to unmarshall session config for virtualed provider config: %s\nError: %v", sessionCfg.ProviderConfig, err) - } - sessionCfg.Provider = realSession.Provider - sessionCfg.ProviderConfig = realSession.ProviderConfig - sessionCfg.CookieName = realSession.CookieName - sessionCfg.CookiePath = realSession.CookiePath - sessionCfg.Gclifetime = realSession.Gclifetime - sessionCfg.Maxlifetime = realSession.Maxlifetime - sessionCfg.Secure = realSession.Secure - sessionCfg.Domain = realSession.Domain - } - sessionCfg.ProviderConfig = shadowPassword(sessionCfg.Provider, sessionCfg.ProviderConfig) - ctx.Data["SessionConfig"] = sessionCfg - - ctx.Data["DisableGravatar"] = setting.DisableGravatar - ctx.Data["EnableFederatedAvatar"] = setting.EnableFederatedAvatar - - ctx.Data["Git"] = setting.Git - - type envVar struct { - Name, Value string - } - - envVars := map[string]*envVar{} - if len(os.Getenv("GITEA_WORK_DIR")) > 0 { - envVars["GITEA_WORK_DIR"] = &envVar{"GITEA_WORK_DIR", os.Getenv("GITEA_WORK_DIR")} - } - if len(os.Getenv("GITEA_CUSTOM")) > 0 { - envVars["GITEA_CUSTOM"] = &envVar{"GITEA_CUSTOM", os.Getenv("GITEA_CUSTOM")} - } - - ctx.Data["EnvVars"] = envVars - ctx.Data["Loggers"] = setting.GetLogDescriptions() - ctx.Data["RedirectMacaronLog"] = setting.RedirectMacaronLog - ctx.Data["EnableAccessLog"] = setting.EnableAccessLog - ctx.Data["AccessLogTemplate"] = setting.AccessLogTemplate - ctx.Data["DisableRouterLog"] = setting.DisableRouterLog - ctx.Data["EnableXORMLog"] = setting.EnableXORMLog - ctx.Data["LogSQL"] = setting.Database.LogSQL - - ctx.HTML(200, tplConfig) -} - -// Monitor show admin monitor page -func Monitor(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.monitor") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminMonitor"] = true - ctx.Data["Processes"] = process.GetManager().Processes() - ctx.Data["Entries"] = cron.ListTasks() - ctx.Data["Queues"] = queue.GetManager().ManagedQueues() - ctx.HTML(200, tplMonitor) -} - -// MonitorCancel cancels a process -func MonitorCancel(ctx *context.Context) { - pid := ctx.ParamsInt64("pid") - process.GetManager().Cancel(pid) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/monitor", - }) -} - -// Queue shows details for a specific queue -func Queue(ctx *context.Context) { - qid := ctx.ParamsInt64("qid") - mq := queue.GetManager().GetManagedQueue(qid) - if mq == nil { - ctx.Status(404) - return - } - ctx.Data["Title"] = ctx.Tr("admin.monitor.queue", mq.Name) - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminMonitor"] = true - ctx.Data["Queue"] = mq - ctx.HTML(200, tplQueue) -} - -// WorkerCancel cancels a worker group -func WorkerCancel(ctx *context.Context) { - qid := ctx.ParamsInt64("qid") - mq := queue.GetManager().GetManagedQueue(qid) - if mq == nil { - ctx.Status(404) - return - } - pid := ctx.ParamsInt64("pid") - mq.CancelWorkers(pid) - ctx.Flash.Info(ctx.Tr("admin.monitor.queue.pool.cancelling")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid), - }) -} - -// Flush flushes a queue -func Flush(ctx *context.Context) { - qid := ctx.ParamsInt64("qid") - mq := queue.GetManager().GetManagedQueue(qid) - if mq == nil { - ctx.Status(404) - return - } - timeout, err := time.ParseDuration(ctx.Query("timeout")) - if err != nil { - timeout = -1 - } - ctx.Flash.Info(ctx.Tr("admin.monitor.queue.pool.flush.added", mq.Name)) - go func() { - err := mq.Flush(timeout) - if err != nil { - log.Error("Flushing failure for %s: Error %v", mq.Name, err) - } - }() - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) -} - -// AddWorkers adds workers to a worker group -func AddWorkers(ctx *context.Context) { - qid := ctx.ParamsInt64("qid") - mq := queue.GetManager().GetManagedQueue(qid) - if mq == nil { - ctx.Status(404) - return - } - number := ctx.QueryInt("number") - if number < 1 { - ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.addworkers.mustnumbergreaterzero")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) - return - } - timeout, err := time.ParseDuration(ctx.Query("timeout")) - if err != nil { - ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.addworkers.musttimeoutduration")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) - return - } - if _, ok := mq.Managed.(queue.ManagedPool); !ok { - ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.none")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) - return - } - mq.AddWorkers(number, timeout) - ctx.Flash.Success(ctx.Tr("admin.monitor.queue.pool.added")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) -} - -// SetQueueSettings sets the maximum number of workers and other settings for this queue -func SetQueueSettings(ctx *context.Context) { - qid := ctx.ParamsInt64("qid") - mq := queue.GetManager().GetManagedQueue(qid) - if mq == nil { - ctx.Status(404) - return - } - if _, ok := mq.Managed.(queue.ManagedPool); !ok { - ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.none")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) - return - } - - maxNumberStr := ctx.Query("max-number") - numberStr := ctx.Query("number") - timeoutStr := ctx.Query("timeout") - - var err error - var maxNumber, number int - var timeout time.Duration - if len(maxNumberStr) > 0 { - maxNumber, err = strconv.Atoi(maxNumberStr) - if err != nil { - ctx.Flash.Error(ctx.Tr("admin.monitor.queue.settings.maxnumberworkers.error")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) - return - } - if maxNumber < -1 { - maxNumber = -1 - } - } else { - maxNumber = mq.MaxNumberOfWorkers() - } - - if len(numberStr) > 0 { - number, err = strconv.Atoi(numberStr) - if err != nil || number < 0 { - ctx.Flash.Error(ctx.Tr("admin.monitor.queue.settings.numberworkers.error")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) - return - } - } else { - number = mq.BoostWorkers() - } - - if len(timeoutStr) > 0 { - timeout, err = time.ParseDuration(timeoutStr) - if err != nil { - ctx.Flash.Error(ctx.Tr("admin.monitor.queue.settings.timeout.error")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) - return - } - } else { - timeout = mq.BoostTimeout() - } - - mq.SetPoolSettings(maxNumber, number, timeout) - ctx.Flash.Success(ctx.Tr("admin.monitor.queue.settings.changed")) - ctx.Redirect(setting.AppSubURL + fmt.Sprintf("/admin/monitor/queue/%d", qid)) -} diff --git a/routers/admin/auths.go b/routers/admin/auths.go deleted file mode 100644 index 7a9d28637..000000000 --- a/routers/admin/auths.go +++ /dev/null @@ -1,404 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "errors" - "fmt" - "regexp" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/auth/ldap" - "code.gitea.io/gitea/modules/auth/oauth2" - "code.gitea.io/gitea/modules/auth/pam" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" - - "xorm.io/xorm/convert" -) - -const ( - tplAuths base.TplName = "admin/auth/list" - tplAuthNew base.TplName = "admin/auth/new" - tplAuthEdit base.TplName = "admin/auth/edit" -) - -var ( - separatorAntiPattern = regexp.MustCompile(`[^\w-\.]`) - langCodePattern = regexp.MustCompile(`^[a-z]{2}-[A-Z]{2}$`) -) - -// Authentications show authentication config page -func Authentications(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.authentication") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminAuthentications"] = true - - var err error - ctx.Data["Sources"], err = models.LoginSources() - if err != nil { - ctx.ServerError("LoginSources", err) - return - } - - ctx.Data["Total"] = models.CountLoginSources() - ctx.HTML(200, tplAuths) -} - -type dropdownItem struct { - Name string - Type interface{} -} - -var ( - authSources = func() []dropdownItem { - items := []dropdownItem{ - {models.LoginNames[models.LoginLDAP], models.LoginLDAP}, - {models.LoginNames[models.LoginDLDAP], models.LoginDLDAP}, - {models.LoginNames[models.LoginSMTP], models.LoginSMTP}, - {models.LoginNames[models.LoginOAuth2], models.LoginOAuth2}, - {models.LoginNames[models.LoginSSPI], models.LoginSSPI}, - } - if pam.Supported { - items = append(items, dropdownItem{models.LoginNames[models.LoginPAM], models.LoginPAM}) - } - return items - }() - - securityProtocols = []dropdownItem{ - {models.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted], ldap.SecurityProtocolUnencrypted}, - {models.SecurityProtocolNames[ldap.SecurityProtocolLDAPS], ldap.SecurityProtocolLDAPS}, - {models.SecurityProtocolNames[ldap.SecurityProtocolStartTLS], ldap.SecurityProtocolStartTLS}, - } -) - -// NewAuthSource render adding a new auth source page -func NewAuthSource(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.auths.new") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminAuthentications"] = true - - ctx.Data["type"] = models.LoginLDAP - ctx.Data["CurrentTypeName"] = models.LoginNames[models.LoginLDAP] - ctx.Data["CurrentSecurityProtocol"] = models.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted] - ctx.Data["smtp_auth"] = "PLAIN" - ctx.Data["is_active"] = true - ctx.Data["is_sync_enabled"] = true - ctx.Data["AuthSources"] = authSources - ctx.Data["SecurityProtocols"] = securityProtocols - ctx.Data["SMTPAuths"] = models.SMTPAuths - ctx.Data["OAuth2Providers"] = models.OAuth2Providers - ctx.Data["OAuth2DefaultCustomURLMappings"] = models.OAuth2DefaultCustomURLMappings - - ctx.Data["SSPIAutoCreateUsers"] = true - ctx.Data["SSPIAutoActivateUsers"] = true - ctx.Data["SSPIStripDomainNames"] = true - ctx.Data["SSPISeparatorReplacement"] = "_" - ctx.Data["SSPIDefaultLanguage"] = "" - - // only the first as default - for key := range models.OAuth2Providers { - ctx.Data["oauth2_provider"] = key - break - } - - ctx.HTML(200, tplAuthNew) -} - -func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig { - var pageSize uint32 - if form.UsePagedSearch { - pageSize = uint32(form.SearchPageSize) - } - return &models.LDAPConfig{ - Source: &ldap.Source{ - Name: form.Name, - Host: form.Host, - Port: form.Port, - SecurityProtocol: ldap.SecurityProtocol(form.SecurityProtocol), - SkipVerify: form.SkipVerify, - BindDN: form.BindDN, - UserDN: form.UserDN, - BindPassword: form.BindPassword, - UserBase: form.UserBase, - AttributeUsername: form.AttributeUsername, - AttributeName: form.AttributeName, - AttributeSurname: form.AttributeSurname, - AttributeMail: form.AttributeMail, - AttributesInBind: form.AttributesInBind, - AttributeSSHPublicKey: form.AttributeSSHPublicKey, - SearchPageSize: pageSize, - Filter: form.Filter, - GroupsEnabled: form.GroupsEnabled, - GroupDN: form.GroupDN, - GroupFilter: form.GroupFilter, - GroupMemberUID: form.GroupMemberUID, - UserUID: form.UserUID, - AdminFilter: form.AdminFilter, - RestrictedFilter: form.RestrictedFilter, - AllowDeactivateAll: form.AllowDeactivateAll, - Enabled: true, - }, - } -} - -func parseSMTPConfig(form auth.AuthenticationForm) *models.SMTPConfig { - return &models.SMTPConfig{ - Auth: form.SMTPAuth, - Host: form.SMTPHost, - Port: form.SMTPPort, - AllowedDomains: form.AllowedDomains, - TLS: form.TLS, - SkipVerify: form.SkipVerify, - } -} - -func parseOAuth2Config(form auth.AuthenticationForm) *models.OAuth2Config { - var customURLMapping *oauth2.CustomURLMapping - if form.Oauth2UseCustomURL { - customURLMapping = &oauth2.CustomURLMapping{ - TokenURL: form.Oauth2TokenURL, - AuthURL: form.Oauth2AuthURL, - ProfileURL: form.Oauth2ProfileURL, - EmailURL: form.Oauth2EmailURL, - } - } else { - customURLMapping = nil - } - return &models.OAuth2Config{ - Provider: form.Oauth2Provider, - ClientID: form.Oauth2Key, - ClientSecret: form.Oauth2Secret, - OpenIDConnectAutoDiscoveryURL: form.OpenIDConnectAutoDiscoveryURL, - CustomURLMapping: customURLMapping, - IconURL: form.Oauth2IconURL, - } -} - -func parseSSPIConfig(ctx *context.Context, form auth.AuthenticationForm) (*models.SSPIConfig, error) { - if util.IsEmptyString(form.SSPISeparatorReplacement) { - ctx.Data["Err_SSPISeparatorReplacement"] = true - return nil, errors.New(ctx.Tr("form.SSPISeparatorReplacement") + ctx.Tr("form.require_error")) - } - if separatorAntiPattern.MatchString(form.SSPISeparatorReplacement) { - ctx.Data["Err_SSPISeparatorReplacement"] = true - return nil, errors.New(ctx.Tr("form.SSPISeparatorReplacement") + ctx.Tr("form.alpha_dash_dot_error")) - } - - if form.SSPIDefaultLanguage != "" && !langCodePattern.MatchString(form.SSPIDefaultLanguage) { - ctx.Data["Err_SSPIDefaultLanguage"] = true - return nil, errors.New(ctx.Tr("form.lang_select_error")) - } - - return &models.SSPIConfig{ - AutoCreateUsers: form.SSPIAutoCreateUsers, - AutoActivateUsers: form.SSPIAutoActivateUsers, - StripDomainNames: form.SSPIStripDomainNames, - SeparatorReplacement: form.SSPISeparatorReplacement, - DefaultLanguage: form.SSPIDefaultLanguage, - }, nil -} - -// NewAuthSourcePost response for adding an auth source -func NewAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) { - ctx.Data["Title"] = ctx.Tr("admin.auths.new") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminAuthentications"] = true - - ctx.Data["CurrentTypeName"] = models.LoginNames[models.LoginType(form.Type)] - ctx.Data["CurrentSecurityProtocol"] = models.SecurityProtocolNames[ldap.SecurityProtocol(form.SecurityProtocol)] - ctx.Data["AuthSources"] = authSources - ctx.Data["SecurityProtocols"] = securityProtocols - ctx.Data["SMTPAuths"] = models.SMTPAuths - ctx.Data["OAuth2Providers"] = models.OAuth2Providers - ctx.Data["OAuth2DefaultCustomURLMappings"] = models.OAuth2DefaultCustomURLMappings - - ctx.Data["SSPIAutoCreateUsers"] = true - ctx.Data["SSPIAutoActivateUsers"] = true - ctx.Data["SSPIStripDomainNames"] = true - ctx.Data["SSPISeparatorReplacement"] = "_" - ctx.Data["SSPIDefaultLanguage"] = "" - - hasTLS := false - var config convert.Conversion - switch models.LoginType(form.Type) { - case models.LoginLDAP, models.LoginDLDAP: - config = parseLDAPConfig(form) - hasTLS = ldap.SecurityProtocol(form.SecurityProtocol) > ldap.SecurityProtocolUnencrypted - case models.LoginSMTP: - config = parseSMTPConfig(form) - hasTLS = true - case models.LoginPAM: - config = &models.PAMConfig{ - ServiceName: form.PAMServiceName, - } - case models.LoginOAuth2: - config = parseOAuth2Config(form) - case models.LoginSSPI: - var err error - config, err = parseSSPIConfig(ctx, form) - if err != nil { - ctx.RenderWithErr(err.Error(), tplAuthNew, form) - return - } - existing, err := models.LoginSourcesByType(models.LoginSSPI) - if err != nil || len(existing) > 0 { - ctx.Data["Err_Type"] = true - ctx.RenderWithErr(ctx.Tr("admin.auths.login_source_of_type_exist"), tplAuthNew, form) - return - } - default: - ctx.Error(400) - return - } - ctx.Data["HasTLS"] = hasTLS - - if ctx.HasError() { - ctx.HTML(200, tplAuthNew) - return - } - - if err := models.CreateLoginSource(&models.LoginSource{ - Type: models.LoginType(form.Type), - Name: form.Name, - IsActived: form.IsActive, - IsSyncEnabled: form.IsSyncEnabled, - Cfg: config, - }); err != nil { - if models.IsErrLoginSourceAlreadyExist(err) { - ctx.Data["Err_Name"] = true - ctx.RenderWithErr(ctx.Tr("admin.auths.login_source_exist", err.(models.ErrLoginSourceAlreadyExist).Name), tplAuthNew, form) - } else { - ctx.ServerError("CreateSource", err) - } - return - } - - log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, form.Name) - - ctx.Flash.Success(ctx.Tr("admin.auths.new_success", form.Name)) - ctx.Redirect(setting.AppSubURL + "/admin/auths") -} - -// EditAuthSource render editing auth source page -func EditAuthSource(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.auths.edit") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminAuthentications"] = true - - ctx.Data["SecurityProtocols"] = securityProtocols - ctx.Data["SMTPAuths"] = models.SMTPAuths - ctx.Data["OAuth2Providers"] = models.OAuth2Providers - ctx.Data["OAuth2DefaultCustomURLMappings"] = models.OAuth2DefaultCustomURLMappings - - source, err := models.GetLoginSourceByID(ctx.ParamsInt64(":authid")) - if err != nil { - ctx.ServerError("GetLoginSourceByID", err) - return - } - ctx.Data["Source"] = source - ctx.Data["HasTLS"] = source.HasTLS() - - if source.IsOAuth2() { - ctx.Data["CurrentOAuth2Provider"] = models.OAuth2Providers[source.OAuth2().Provider] - } - ctx.HTML(200, tplAuthEdit) -} - -// EditAuthSourcePost response for editing auth source -func EditAuthSourcePost(ctx *context.Context, form auth.AuthenticationForm) { - ctx.Data["Title"] = ctx.Tr("admin.auths.edit") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminAuthentications"] = true - - ctx.Data["SMTPAuths"] = models.SMTPAuths - ctx.Data["OAuth2Providers"] = models.OAuth2Providers - ctx.Data["OAuth2DefaultCustomURLMappings"] = models.OAuth2DefaultCustomURLMappings - - source, err := models.GetLoginSourceByID(ctx.ParamsInt64(":authid")) - if err != nil { - ctx.ServerError("GetLoginSourceByID", err) - return - } - ctx.Data["Source"] = source - ctx.Data["HasTLS"] = source.HasTLS() - - if ctx.HasError() { - ctx.HTML(200, tplAuthEdit) - return - } - - var config convert.Conversion - switch models.LoginType(form.Type) { - case models.LoginLDAP, models.LoginDLDAP: - config = parseLDAPConfig(form) - case models.LoginSMTP: - config = parseSMTPConfig(form) - case models.LoginPAM: - config = &models.PAMConfig{ - ServiceName: form.PAMServiceName, - } - case models.LoginOAuth2: - config = parseOAuth2Config(form) - case models.LoginSSPI: - config, err = parseSSPIConfig(ctx, form) - if err != nil { - ctx.RenderWithErr(err.Error(), tplAuthEdit, form) - return - } - default: - ctx.Error(400) - return - } - - source.Name = form.Name - source.IsActived = form.IsActive - source.IsSyncEnabled = form.IsSyncEnabled - source.Cfg = config - if err := models.UpdateSource(source); err != nil { - if models.IsErrOpenIDConnectInitialize(err) { - ctx.Flash.Error(err.Error(), true) - ctx.HTML(200, tplAuthEdit) - } else { - ctx.ServerError("UpdateSource", err) - } - return - } - log.Trace("Authentication changed by admin(%s): %d", ctx.User.Name, source.ID) - - ctx.Flash.Success(ctx.Tr("admin.auths.update_success")) - ctx.Redirect(setting.AppSubURL + "/admin/auths/" + fmt.Sprint(form.ID)) -} - -// DeleteAuthSource response for deleting an auth source -func DeleteAuthSource(ctx *context.Context) { - source, err := models.GetLoginSourceByID(ctx.ParamsInt64(":authid")) - if err != nil { - ctx.ServerError("GetLoginSourceByID", err) - return - } - - if err = models.DeleteSource(source); err != nil { - if models.IsErrLoginSourceInUse(err) { - ctx.Flash.Error(ctx.Tr("admin.auths.still_in_used")) - } else { - ctx.Flash.Error(fmt.Sprintf("DeleteSource: %v", err)) - } - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/auths/" + ctx.Params(":authid"), - }) - return - } - log.Trace("Authentication deleted by admin(%s): %d", ctx.User.Name, source.ID) - - ctx.Flash.Success(ctx.Tr("admin.auths.deletion_success")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/auths", - }) -} diff --git a/routers/admin/hooks.go b/routers/admin/hooks.go deleted file mode 100644 index 4697c4d93..000000000 --- a/routers/admin/hooks.go +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/setting" -) - -const ( - // tplAdminHooks template path to render hook settings - tplAdminHooks base.TplName = "admin/hooks" -) - -// DefaultOrSystemWebhooks renders both admin default and system webhook list pages -func DefaultOrSystemWebhooks(ctx *context.Context) { - var ws []*models.Webhook - var err error - - // Are we looking at default webhooks? - if ctx.Params(":configType") == "hooks" { - ctx.Data["Title"] = ctx.Tr("admin.hooks") - ctx.Data["Description"] = ctx.Tr("admin.hooks.desc") - ctx.Data["PageIsAdminHooks"] = true - ctx.Data["BaseLink"] = setting.AppSubURL + "/admin/hooks" - ws, err = models.GetDefaultWebhooks() - } else { - ctx.Data["Title"] = ctx.Tr("admin.systemhooks") - ctx.Data["Description"] = ctx.Tr("admin.systemhooks.desc") - ctx.Data["PageIsAdminSystemHooks"] = true - ctx.Data["BaseLink"] = setting.AppSubURL + "/admin/system-hooks" - ws, err = models.GetSystemWebhooks() - } - - if err != nil { - ctx.ServerError("GetWebhooksAdmin", err) - return - } - - ctx.Data["Webhooks"] = ws - ctx.HTML(200, tplAdminHooks) -} - -// DeleteDefaultOrSystemWebhook handler to delete an admin-defined system or default webhook -func DeleteDefaultOrSystemWebhook(ctx *context.Context) { - if err := models.DeleteDefaultSystemWebhook(ctx.QueryInt64("id")); err != nil { - ctx.Flash.Error("DeleteDefaultWebhook: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success")) - } - - // Are we looking at default webhooks? - if ctx.Params(":configType") == "hooks" { - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/hooks", - }) - } else { - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/system-hooks", - }) - } -} diff --git a/routers/admin/main_test.go b/routers/admin/main_test.go deleted file mode 100644 index 9a7191d47..000000000 --- a/routers/admin/main_test.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "path/filepath" - "testing" - - "code.gitea.io/gitea/models" -) - -func TestMain(m *testing.M) { - models.MainTest(m, filepath.Join("..", "..")) -} diff --git a/routers/admin/orgs.go b/routers/admin/orgs.go deleted file mode 100644 index 627f56eae..000000000 --- a/routers/admin/orgs.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2020 The Gitea Authors. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers" -) - -const ( - tplOrgs base.TplName = "admin/org/list" -) - -// Organizations show all the organizations -func Organizations(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.organizations") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminOrganizations"] = true - - routers.RenderUserSearch(ctx, &models.SearchUserOptions{ - Type: models.UserTypeOrganization, - ListOptions: models.ListOptions{ - PageSize: setting.UI.Admin.OrgPagingNum, - }, - Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate}, - }, tplOrgs) -} diff --git a/routers/admin/repos.go b/routers/admin/repos.go deleted file mode 100644 index 46d0b60f2..000000000 --- a/routers/admin/repos.go +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "net/url" - "strconv" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/repository" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" - "code.gitea.io/gitea/routers" - repo_service "code.gitea.io/gitea/services/repository" -) - -const ( - tplRepos base.TplName = "admin/repo/list" - tplUnadoptedRepos base.TplName = "admin/repo/unadopted" -) - -// Repos show all the repositories -func Repos(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.repositories") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminRepositories"] = true - - routers.RenderRepoSearch(ctx, &routers.RepoSearchOptions{ - Private: true, - PageSize: setting.UI.Admin.RepoPagingNum, - TplName: tplRepos, - }) -} - -// DeleteRepo delete one repository -func DeleteRepo(ctx *context.Context) { - repo, err := models.GetRepositoryByID(ctx.QueryInt64("id")) - if err != nil { - ctx.ServerError("GetRepositoryByID", err) - return - } - - if err := repo_service.DeleteRepository(ctx.User, repo); err != nil { - ctx.ServerError("DeleteRepository", err) - return - } - log.Trace("Repository deleted: %s", repo.FullName()) - - ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/repos?page=" + ctx.Query("page") + "&sort=" + ctx.Query("sort"), - }) -} - -// UnadoptedRepos lists the unadopted repositories -func UnadoptedRepos(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.repositories") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminRepositories"] = true - - opts := models.ListOptions{ - PageSize: setting.UI.Admin.UserPagingNum, - Page: ctx.QueryInt("page"), - } - - if opts.Page <= 0 { - opts.Page = 1 - } - - ctx.Data["CurrentPage"] = opts.Page - - doSearch := ctx.QueryBool("search") - - ctx.Data["search"] = doSearch - q := ctx.Query("q") - - if !doSearch { - pager := context.NewPagination(0, opts.PageSize, opts.Page, 5) - pager.SetDefaultParams(ctx) - pager.AddParam(ctx, "search", "search") - ctx.Data["Page"] = pager - ctx.HTML(200, tplUnadoptedRepos) - return - } - - ctx.Data["Keyword"] = q - repoNames, count, err := repository.ListUnadoptedRepositories(q, &opts) - if err != nil { - ctx.ServerError("ListUnadoptedRepositories", err) - } - ctx.Data["Dirs"] = repoNames - pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) - pager.SetDefaultParams(ctx) - pager.AddParam(ctx, "search", "search") - ctx.Data["Page"] = pager - ctx.HTML(200, tplUnadoptedRepos) -} - -// AdoptOrDeleteRepository adopts or deletes a repository -func AdoptOrDeleteRepository(ctx *context.Context) { - dir := ctx.Query("id") - action := ctx.Query("action") - page := ctx.QueryInt("page") - q := ctx.Query("q") - - dirSplit := strings.SplitN(dir, "/", 2) - if len(dirSplit) != 2 { - ctx.Redirect(setting.AppSubURL + "/admin/repos") - return - } - - ctxUser, err := models.GetUserByName(dirSplit[0]) - if err != nil { - if models.IsErrUserNotExist(err) { - log.Debug("User does not exist: %s", dirSplit[0]) - ctx.Redirect(setting.AppSubURL + "/admin/repos") - return - } - ctx.ServerError("GetUserByName", err) - return - } - - repoName := dirSplit[1] - - // check not a repo - has, err := models.IsRepositoryExist(ctxUser, repoName) - if err != nil { - ctx.ServerError("IsRepositoryExist", err) - return - } - isDir, err := util.IsDir(models.RepoPath(ctxUser.Name, repoName)) - if err != nil { - ctx.ServerError("IsDir", err) - return - } - if has || !isDir { - // Fallthrough to failure mode - } else if action == "adopt" { - if _, err := repository.AdoptRepository(ctx.User, ctxUser, models.CreateRepoOptions{ - Name: dirSplit[1], - IsPrivate: true, - }); err != nil { - ctx.ServerError("repository.AdoptRepository", err) - return - } - ctx.Flash.Success(ctx.Tr("repo.adopt_preexisting_success", dir)) - } else if action == "delete" { - if err := repository.DeleteUnadoptedRepository(ctx.User, ctxUser, dirSplit[1]); err != nil { - ctx.ServerError("repository.AdoptRepository", err) - return - } - ctx.Flash.Success(ctx.Tr("repo.delete_preexisting_success", dir)) - } - ctx.Redirect(setting.AppSubURL + "/admin/repos/unadopted?search=true&q=" + url.QueryEscape(q) + "&page=" + strconv.Itoa(page)) -} diff --git a/routers/admin/users.go b/routers/admin/users.go deleted file mode 100644 index 9fe5c3ef7..000000000 --- a/routers/admin/users.go +++ /dev/null @@ -1,367 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2020 The Gitea Authors. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "fmt" - "strconv" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/password" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/routers" - router_user_setting "code.gitea.io/gitea/routers/user/setting" - "code.gitea.io/gitea/services/mailer" -) - -const ( - tplUsers base.TplName = "admin/user/list" - tplUserNew base.TplName = "admin/user/new" - tplUserEdit base.TplName = "admin/user/edit" -) - -// Users show all the users -func Users(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.users") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminUsers"] = true - - routers.RenderUserSearch(ctx, &models.SearchUserOptions{ - Type: models.UserTypeIndividual, - ListOptions: models.ListOptions{ - PageSize: setting.UI.Admin.UserPagingNum, - }, - SearchByEmail: true, - }, tplUsers) -} - -// NewUser render adding a new user page -func NewUser(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.users.new_account") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminUsers"] = true - - ctx.Data["login_type"] = "0-0" - - sources, err := models.LoginSources() - if err != nil { - ctx.ServerError("LoginSources", err) - return - } - ctx.Data["Sources"] = sources - - ctx.Data["CanSendEmail"] = setting.MailService != nil - ctx.HTML(200, tplUserNew) -} - -// NewUserPost response for adding a new user -func NewUserPost(ctx *context.Context, form auth.AdminCreateUserForm) { - ctx.Data["Title"] = ctx.Tr("admin.users.new_account") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminUsers"] = true - - sources, err := models.LoginSources() - if err != nil { - ctx.ServerError("LoginSources", err) - return - } - ctx.Data["Sources"] = sources - - ctx.Data["CanSendEmail"] = setting.MailService != nil - - if ctx.HasError() { - ctx.HTML(200, tplUserNew) - return - } - - u := &models.User{ - Name: form.UserName, - Email: form.Email, - Passwd: form.Password, - IsActive: true, - LoginType: models.LoginPlain, - } - - if len(form.LoginType) > 0 { - fields := strings.Split(form.LoginType, "-") - if len(fields) == 2 { - lType, _ := strconv.ParseInt(fields[0], 10, 0) - u.LoginType = models.LoginType(lType) - u.LoginSource, _ = strconv.ParseInt(fields[1], 10, 64) - u.LoginName = form.LoginName - } - } - if u.LoginType == models.LoginNoType || u.LoginType == models.LoginPlain { - if len(form.Password) < setting.MinPasswordLength { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplUserNew, &form) - return - } - if !password.IsComplexEnough(form.Password) { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(password.BuildComplexityError(ctx), tplUserNew, &form) - return - } - pwned, err := password.IsPwned(ctx.Req.Context(), form.Password) - if pwned { - ctx.Data["Err_Password"] = true - errMsg := ctx.Tr("auth.password_pwned") - if err != nil { - log.Error(err.Error()) - errMsg = ctx.Tr("auth.password_pwned_err") - } - ctx.RenderWithErr(errMsg, tplUserNew, &form) - return - } - u.MustChangePassword = form.MustChangePassword - } - if err := models.CreateUser(u); err != nil { - switch { - case models.IsErrUserAlreadyExist(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplUserNew, &form) - case models.IsErrEmailAlreadyUsed(err): - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserNew, &form) - case models.IsErrEmailInvalid(err): - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserNew, &form) - case models.IsErrNameReserved(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), tplUserNew, &form) - case models.IsErrNamePatternNotAllowed(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplUserNew, &form) - case models.IsErrNameCharsNotAllowed(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_chars_not_allowed", err.(models.ErrNameCharsNotAllowed).Name), tplUserNew, &form) - default: - ctx.ServerError("CreateUser", err) - } - return - } - log.Trace("Account created by admin (%s): %s", ctx.User.Name, u.Name) - - // Send email notification. - if form.SendNotify { - mailer.SendRegisterNotifyMail(ctx.Locale, u) - } - - ctx.Flash.Success(ctx.Tr("admin.users.new_success", u.Name)) - ctx.Redirect(setting.AppSubURL + "/admin/users/" + fmt.Sprint(u.ID)) -} - -func prepareUserInfo(ctx *context.Context) *models.User { - u, err := models.GetUserByID(ctx.ParamsInt64(":userid")) - if err != nil { - ctx.ServerError("GetUserByID", err) - return nil - } - ctx.Data["User"] = u - - if u.LoginSource > 0 { - ctx.Data["LoginSource"], err = models.GetLoginSourceByID(u.LoginSource) - if err != nil { - ctx.ServerError("GetLoginSourceByID", err) - return nil - } - } else { - ctx.Data["LoginSource"] = &models.LoginSource{} - } - - sources, err := models.LoginSources() - if err != nil { - ctx.ServerError("LoginSources", err) - return nil - } - ctx.Data["Sources"] = sources - - ctx.Data["TwoFactorEnabled"] = true - _, err = models.GetTwoFactorByUID(u.ID) - if err != nil { - if !models.IsErrTwoFactorNotEnrolled(err) { - ctx.InternalServerError(err) - return nil - } - ctx.Data["TwoFactorEnabled"] = false - } - - return u -} - -// EditUser show editting user page -func EditUser(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("admin.users.edit_account") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminUsers"] = true - ctx.Data["DisableRegularOrgCreation"] = setting.Admin.DisableRegularOrgCreation - ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations - - prepareUserInfo(ctx) - if ctx.Written() { - return - } - - ctx.HTML(200, tplUserEdit) -} - -// EditUserPost response for editting user -func EditUserPost(ctx *context.Context, form auth.AdminEditUserForm) { - ctx.Data["Title"] = ctx.Tr("admin.users.edit_account") - ctx.Data["PageIsAdmin"] = true - ctx.Data["PageIsAdminUsers"] = true - ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations - - u := prepareUserInfo(ctx) - if ctx.Written() { - return - } - - if ctx.HasError() { - ctx.HTML(200, tplUserEdit) - return - } - - fields := strings.Split(form.LoginType, "-") - if len(fields) == 2 { - loginType, _ := strconv.ParseInt(fields[0], 10, 0) - loginSource, _ := strconv.ParseInt(fields[1], 10, 64) - - if u.LoginSource != loginSource { - u.LoginSource = loginSource - u.LoginType = models.LoginType(loginType) - } - } - - if len(form.Password) > 0 && (u.IsLocal() || u.IsOAuth2()) { - var err error - if len(form.Password) < setting.MinPasswordLength { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplUserEdit, &form) - return - } - if !password.IsComplexEnough(form.Password) { - ctx.RenderWithErr(password.BuildComplexityError(ctx), tplUserEdit, &form) - return - } - pwned, err := password.IsPwned(ctx.Req.Context(), form.Password) - if pwned { - ctx.Data["Err_Password"] = true - errMsg := ctx.Tr("auth.password_pwned") - if err != nil { - log.Error(err.Error()) - errMsg = ctx.Tr("auth.password_pwned_err") - } - ctx.RenderWithErr(errMsg, tplUserNew, &form) - return - } - if u.Salt, err = models.GetUserSalt(); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - if err = u.SetPassword(form.Password); err != nil { - ctx.InternalServerError(err) - return - } - } - - if len(form.UserName) != 0 && u.Name != form.UserName { - if err := router_user_setting.HandleUsernameChange(ctx, u, form.UserName); err != nil { - ctx.Redirect(setting.AppSubURL + "/admin/users") - return - } - u.Name = form.UserName - u.LowerName = strings.ToLower(form.UserName) - } - - if form.Reset2FA { - tf, err := models.GetTwoFactorByUID(u.ID) - if err != nil && !models.IsErrTwoFactorNotEnrolled(err) { - ctx.InternalServerError(err) - return - } - - if err = models.DeleteTwoFactorByID(tf.ID, u.ID); err != nil { - ctx.InternalServerError(err) - return - } - } - - u.LoginName = form.LoginName - u.FullName = form.FullName - u.Email = form.Email - u.Website = form.Website - u.Location = form.Location - u.MaxRepoCreation = form.MaxRepoCreation - u.IsActive = form.Active - u.IsAdmin = form.Admin - u.IsRestricted = form.Restricted - u.AllowGitHook = form.AllowGitHook - u.AllowImportLocal = form.AllowImportLocal - u.AllowCreateOrganization = form.AllowCreateOrganization - - // skip self Prohibit Login - if ctx.User.ID == u.ID { - u.ProhibitLogin = false - } else { - u.ProhibitLogin = form.ProhibitLogin - } - - if err := models.UpdateUser(u); err != nil { - if models.IsErrEmailAlreadyUsed(err) { - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserEdit, &form) - } else if models.IsErrEmailInvalid(err) { - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserEdit, &form) - } else { - ctx.ServerError("UpdateUser", err) - } - return - } - log.Trace("Account profile updated by admin (%s): %s", ctx.User.Name, u.Name) - - ctx.Flash.Success(ctx.Tr("admin.users.update_profile_success")) - ctx.Redirect(setting.AppSubURL + "/admin/users/" + ctx.Params(":userid")) -} - -// DeleteUser response for deleting a user -func DeleteUser(ctx *context.Context) { - u, err := models.GetUserByID(ctx.ParamsInt64(":userid")) - if err != nil { - ctx.ServerError("GetUserByID", err) - return - } - - if err = models.DeleteUser(u); err != nil { - switch { - case models.IsErrUserOwnRepos(err): - ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"), - }) - case models.IsErrUserHasOrgs(err): - ctx.Flash.Error(ctx.Tr("admin.users.still_has_org")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"), - }) - default: - ctx.ServerError("DeleteUser", err) - } - return - } - log.Trace("Account deleted by admin (%s): %s", ctx.User.Name, u.Name) - - ctx.Flash.Success(ctx.Tr("admin.users.deletion_success")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/admin/users", - }) -} diff --git a/routers/admin/users_test.go b/routers/admin/users_test.go deleted file mode 100644 index a282507f5..000000000 --- a/routers/admin/users_test.go +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package admin - -import ( - "testing" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/test" - - "github.com/stretchr/testify/assert" -) - -func TestNewUserPost_MustChangePassword(t *testing.T) { - - models.PrepareTestEnv(t) - ctx := test.MockContext(t, "admin/users/new") - - u := models.AssertExistsAndLoadBean(t, &models.User{ - IsAdmin: true, - ID: 2, - }).(*models.User) - - ctx.User = u - - username := "gitea" - email := "gitea@gitea.io" - - form := auth.AdminCreateUserForm{ - LoginType: "local", - LoginName: "local", - UserName: username, - Email: email, - Password: "abc123ABC!=$", - SendNotify: false, - MustChangePassword: true, - } - - NewUserPost(ctx, form) - - assert.NotEmpty(t, ctx.Flash.SuccessMsg) - - u, err := models.GetUserByName(username) - - assert.NoError(t, err) - assert.Equal(t, username, u.Name) - assert.Equal(t, email, u.Email) - assert.True(t, u.MustChangePassword) -} - -func TestNewUserPost_MustChangePasswordFalse(t *testing.T) { - - models.PrepareTestEnv(t) - ctx := test.MockContext(t, "admin/users/new") - - u := models.AssertExistsAndLoadBean(t, &models.User{ - IsAdmin: true, - ID: 2, - }).(*models.User) - - ctx.User = u - - username := "gitea" - email := "gitea@gitea.io" - - form := auth.AdminCreateUserForm{ - LoginType: "local", - LoginName: "local", - UserName: username, - Email: email, - Password: "abc123ABC!=$", - SendNotify: false, - MustChangePassword: false, - } - - NewUserPost(ctx, form) - - assert.NotEmpty(t, ctx.Flash.SuccessMsg) - - u, err := models.GetUserByName(username) - - assert.NoError(t, err) - assert.Equal(t, username, u.Name) - assert.Equal(t, email, u.Email) - assert.False(t, u.MustChangePassword) -} - -func TestNewUserPost_InvalidEmail(t *testing.T) { - - models.PrepareTestEnv(t) - ctx := test.MockContext(t, "admin/users/new") - - u := models.AssertExistsAndLoadBean(t, &models.User{ - IsAdmin: true, - ID: 2, - }).(*models.User) - - ctx.User = u - - username := "gitea" - email := "gitea@gitea.io\r\n" - - form := auth.AdminCreateUserForm{ - LoginType: "local", - LoginName: "local", - UserName: username, - Email: email, - Password: "abc123ABC!=$", - SendNotify: false, - MustChangePassword: false, - } - - NewUserPost(ctx, form) - - assert.NotEmpty(t, ctx.Flash.ErrorMsg) -} diff --git a/routers/api/v1/admin/adopt.go b/routers/api/v1/admin/adopt.go index fdef94e6c..9c1b9fc0f 100644 --- a/routers/api/v1/admin/adopt.go +++ b/routers/api/v1/admin/adopt.go @@ -5,7 +5,6 @@ package admin import ( - "fmt" "net/http" "code.gitea.io/gitea/models" @@ -42,13 +41,12 @@ func ListUnadoptedRepositories(ctx *context.APIContext) { // "$ref": "#/responses/forbidden" listOptions := utils.GetListOptions(ctx) - repoNames, count, err := repository.ListUnadoptedRepositories(ctx.Query("query"), &listOptions) + repoNames, count, err := repository.ListUnadoptedRepositories(ctx.FormString("query"), &listOptions) if err != nil { ctx.InternalServerError(err) } - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", count)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count") + ctx.SetTotalCountHeader(int64(count)) ctx.JSON(http.StatusOK, repoNames) } diff --git a/routers/api/v1/admin/cron.go b/routers/api/v1/admin/cron.go index 2531346fc..970fad838 100644 --- a/routers/api/v1/admin/cron.go +++ b/routers/api/v1/admin/cron.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/modules/cron" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -36,12 +37,10 @@ func ListCronTasks(ctx *context.APIContext) { // "403": // "$ref": "#/responses/forbidden" tasks := cron.ListTasks() - listOpts := utils.GetListOptions(ctx) - start, end := listOpts.GetStartEnd() + count := len(tasks) - if len(tasks) > listOpts.PageSize { - tasks = tasks[start:end] - } + listOpts := utils.GetListOptions(ctx) + tasks = util.PaginateSlice(tasks, listOpts.Page, listOpts.PageSize).(cron.TaskTable) res := make([]structs.Cron, len(tasks)) for i, task := range tasks { @@ -53,6 +52,8 @@ func ListCronTasks(ctx *context.APIContext) { ExecTimes: task.ExecTimes, } } + + ctx.SetTotalCountHeader(int64(count)) ctx.JSON(http.StatusOK, res) } diff --git a/routers/api/v1/admin/org.go b/routers/api/v1/admin/org.go index 0fd9e17f4..5da87fa7d 100644 --- a/routers/api/v1/admin/org.go +++ b/routers/api/v1/admin/org.go @@ -6,19 +6,19 @@ package admin import ( - "fmt" "net/http" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/user" "code.gitea.io/gitea/routers/api/v1/utils" ) // CreateOrg api for create organization -func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) { +func CreateOrg(ctx *context.APIContext) { // swagger:operation POST /admin/users/{username}/orgs admin adminCreateOrg // --- // summary: Create an organization @@ -43,7 +43,7 @@ func CreateOrg(ctx *context.APIContext, form api.CreateOrgOption) { // "$ref": "#/responses/forbidden" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateOrgOption) u := user.GetUserByParams(ctx) if ctx.Written() { return @@ -105,6 +105,7 @@ func GetAllOrgs(ctx *context.APIContext) { listOptions := utils.GetListOptions(ctx) users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{ + Actor: ctx.User, Type: models.UserTypeOrganization, OrderBy: models.SearchOrderByAlphabetically, ListOptions: listOptions, @@ -120,7 +121,6 @@ func GetAllOrgs(ctx *context.APIContext) { } ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, &orgs) } diff --git a/routers/api/v1/admin/repo.go b/routers/api/v1/admin/repo.go index 73c7d740f..467f8a22f 100644 --- a/routers/api/v1/admin/repo.go +++ b/routers/api/v1/admin/repo.go @@ -7,12 +7,13 @@ package admin import ( "code.gitea.io/gitea/modules/context" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/repo" "code.gitea.io/gitea/routers/api/v1/user" ) // CreateRepo api for creating a repository -func CreateRepo(ctx *context.APIContext, form api.CreateRepoOption) { +func CreateRepo(ctx *context.APIContext) { // swagger:operation POST /admin/users/{username}/repos admin adminCreateRepo // --- // summary: Create a repository on behalf of a user @@ -41,11 +42,11 @@ func CreateRepo(ctx *context.APIContext, form api.CreateRepoOption) { // "$ref": "#/responses/error" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateRepoOption) owner := user.GetUserByParams(ctx) if ctx.Written() { return } - repo.CreateUserRepo(ctx, owner, form) + repo.CreateUserRepo(ctx, owner, *form) } diff --git a/routers/api/v1/admin/user.go b/routers/api/v1/admin/user.go index 670baf020..e5a75da75 100644 --- a/routers/api/v1/admin/user.go +++ b/routers/api/v1/admin/user.go @@ -16,6 +16,7 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/password" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/user" "code.gitea.io/gitea/routers/api/v1/utils" "code.gitea.io/gitea/services/mailer" @@ -42,7 +43,7 @@ func parseLoginSource(ctx *context.APIContext, u *models.User, sourceID int64, l } // CreateUser create a user -func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { +func CreateUser(ctx *context.APIContext) { // swagger:operation POST /admin/users admin adminCreateUser // --- // summary: Create a user @@ -64,6 +65,7 @@ func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { // "$ref": "#/responses/forbidden" // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.CreateUserOption) u := &models.User{ Name: form.Username, @@ -87,7 +89,7 @@ func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { ctx.Error(http.StatusBadRequest, "PasswordComplexity", err) return } - pwned, err := password.IsPwned(ctx.Req.Context(), form.Password) + pwned, err := password.IsPwned(ctx, form.Password) if pwned { if err != nil { log.Error(err.Error()) @@ -96,7 +98,15 @@ func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { ctx.Error(http.StatusBadRequest, "PasswordPwned", errors.New("PasswordPwned")) return } - if err := models.CreateUser(u); err != nil { + + var overwriteDefault *models.CreateUserOverwriteOptions + if form.Visibility != "" { + overwriteDefault = &models.CreateUserOverwriteOptions{ + Visibility: api.VisibilityModes[form.Visibility], + } + } + + if err := models.CreateUser(u, overwriteDefault); err != nil { if models.IsErrUserAlreadyExist(err) || models.IsErrEmailAlreadyUsed(err) || models.IsErrNameReserved(err) || @@ -113,13 +123,13 @@ func CreateUser(ctx *context.APIContext, form api.CreateUserOption) { // Send email notification. if form.SendNotify { - mailer.SendRegisterNotifyMail(ctx.Locale, u) + mailer.SendRegisterNotifyMail(u) } - ctx.JSON(http.StatusCreated, convert.ToUser(u, ctx.IsSigned, ctx.User.IsAdmin)) + ctx.JSON(http.StatusCreated, convert.ToUser(u, ctx.User)) } // EditUser api for modifying a user's information -func EditUser(ctx *context.APIContext, form api.EditUserOption) { +func EditUser(ctx *context.APIContext) { // swagger:operation PATCH /admin/users/{username} admin adminEditUser // --- // summary: Edit an existing user @@ -144,7 +154,7 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { // "$ref": "#/responses/forbidden" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.EditUserOption) u := user.GetUserByParams(ctx) if ctx.Written() { return @@ -161,7 +171,7 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { ctx.Error(http.StatusBadRequest, "PasswordComplexity", err) return } - pwned, err := password.IsPwned(ctx.Req.Context(), form.Password) + pwned, err := password.IsPwned(ctx, form.Password) if pwned { if err != nil { log.Error(err.Error()) @@ -202,9 +212,15 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { if form.Location != nil { u.Location = *form.Location } + if form.Description != nil { + u.Description = *form.Description + } if form.Active != nil { u.IsActive = *form.Active } + if len(form.Visibility) != 0 { + u.Visibility = api.VisibilityModes[form.Visibility] + } if form.Admin != nil { u.IsAdmin = *form.Admin } @@ -223,6 +239,9 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { if form.ProhibitLogin != nil { u.ProhibitLogin = *form.ProhibitLogin } + if form.Restricted != nil { + u.IsRestricted = *form.Restricted + } if err := models.UpdateUser(u); err != nil { if models.IsErrEmailAlreadyUsed(err) || models.IsErrEmailInvalid(err) { @@ -234,7 +253,7 @@ func EditUser(ctx *context.APIContext, form api.EditUserOption) { } log.Trace("Account profile updated by admin (%s): %s", ctx.User.Name, u.Name) - ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.IsSigned, ctx.User.IsAdmin)) + ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.User)) } // DeleteUser api for deleting a user @@ -283,7 +302,7 @@ func DeleteUser(ctx *context.APIContext) { } // CreatePublicKey api for creating a public key to a user -func CreatePublicKey(ctx *context.APIContext, form api.CreateKeyOption) { +func CreatePublicKey(ctx *context.APIContext) { // swagger:operation POST /admin/users/{username}/keys admin adminCreatePublicKey // --- // summary: Add a public key on behalf of a user @@ -308,12 +327,12 @@ func CreatePublicKey(ctx *context.APIContext, form api.CreateKeyOption) { // "$ref": "#/responses/forbidden" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateKeyOption) u := user.GetUserByParams(ctx) if ctx.Written() { return } - user.CreateUserPublicKey(ctx, form, u.ID) + user.CreateUserPublicKey(ctx, *form, u.ID) } // DeleteUserPublicKey api for deleting a user's public key @@ -388,6 +407,7 @@ func GetAllUsers(ctx *context.APIContext) { listOptions := utils.GetListOptions(ctx) users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{ + Actor: ctx.User, Type: models.UserTypeIndividual, OrderBy: models.SearchOrderByAlphabetically, ListOptions: listOptions, @@ -399,11 +419,10 @@ func GetAllUsers(ctx *context.APIContext) { results := make([]*api.User, len(users)) for i := range users { - results[i] = convert.ToUser(users[i], ctx.IsSigned, ctx.User.IsAdmin) + results[i] = convert.ToUser(users[i], ctx.User) } ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, &results) } diff --git a/routers/api/v1/api.go b/routers/api/v1/api.go index e9f1a395e..e74ff4099 100644 --- a/routers/api/v1/api.go +++ b/routers/api/v1/api.go @@ -9,7 +9,7 @@ // // Schemes: http, https // BasePath: /api/v1 -// Version: 1.1.1 +// Version: {{AppVer | JSEscape | Safe}} // License: MIT http://opensource.org/licenses/MIT // // Consumes: @@ -66,14 +66,15 @@ package v1 import ( "net/http" + "reflect" "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/admin" "code.gitea.io/gitea/routers/api/v1/misc" "code.gitea.io/gitea/routers/api/v1/notify" @@ -82,14 +83,17 @@ import ( "code.gitea.io/gitea/routers/api/v1/settings" _ "code.gitea.io/gitea/routers/api/v1/swagger" // for swagger generation "code.gitea.io/gitea/routers/api/v1/user" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/forms" - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" + "gitea.com/go-chi/binding" + "gitea.com/go-chi/session" + "github.com/go-chi/cors" ) -func sudo() macaron.Handler { +func sudo() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { - sudo := ctx.Query("sudo") + sudo := ctx.FormString("sudo") if len(sudo) == 0 { sudo = ctx.Req.Header.Get("Sudo") } @@ -117,10 +121,10 @@ func sudo() macaron.Handler { } } -func repoAssignment() macaron.Handler { +func repoAssignment() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { - userName := ctx.Params(":username") - repoName := ctx.Params(":reponame") + userName := ctx.Params("username") + repoName := ctx.Params("reponame") var ( owner *models.User @@ -134,7 +138,13 @@ func repoAssignment() macaron.Handler { owner, err = models.GetUserByName(userName) if err != nil { if models.IsErrUserNotExist(err) { - ctx.NotFound() + if redirectUserID, err := models.LookupUserRedirect(userName); err == nil { + context.RedirectToUser(ctx.Context, userName, redirectUserID) + } else if models.IsErrUserRedirectNotExist(err) { + ctx.NotFound("GetUserByName", err) + } else { + ctx.Error(http.StatusInternalServerError, "LookupUserRedirect", err) + } } else { ctx.Error(http.StatusInternalServerError, "GetUserByName", err) } @@ -178,7 +188,7 @@ func repoAssignment() macaron.Handler { } // Contexter middleware already checks token for user sign in process. -func reqToken() macaron.Handler { +func reqToken() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if true == ctx.Data["IsApiToken"] { return @@ -195,7 +205,15 @@ func reqToken() macaron.Handler { } } -func reqBasicAuth() macaron.Handler { +func reqExploreSignIn() func(ctx *context.APIContext) { + return func(ctx *context.APIContext) { + if setting.Service.Explore.RequireSigninView && !ctx.IsSigned { + ctx.Error(http.StatusUnauthorized, "reqExploreSignIn", "you must be signed in to search for users") + } + } +} + +func reqBasicAuth() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.Context.IsBasicAuth { ctx.Error(http.StatusUnauthorized, "reqBasicAuth", "basic auth required") @@ -206,7 +224,7 @@ func reqBasicAuth() macaron.Handler { } // reqSiteAdmin user should be the site admin -func reqSiteAdmin() macaron.Handler { +func reqSiteAdmin() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.IsUserSiteAdmin() { ctx.Error(http.StatusForbidden, "reqSiteAdmin", "user should be the site admin") @@ -216,7 +234,7 @@ func reqSiteAdmin() macaron.Handler { } // reqOwner user should be the owner of the repo or site admin. -func reqOwner() macaron.Handler { +func reqOwner() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.IsUserRepoOwner() && !ctx.IsUserSiteAdmin() { ctx.Error(http.StatusForbidden, "reqOwner", "user should be the owner of the repo") @@ -226,7 +244,7 @@ func reqOwner() macaron.Handler { } // reqAdmin user should be an owner or a collaborator with admin write of a repository, or site admin -func reqAdmin() macaron.Handler { +func reqAdmin() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.IsUserRepoAdmin() && !ctx.IsUserSiteAdmin() { ctx.Error(http.StatusForbidden, "reqAdmin", "user should be an owner or a collaborator with admin write of a repository") @@ -236,7 +254,7 @@ func reqAdmin() macaron.Handler { } // reqRepoWriter user should have a permission to write to a repo, or be a site admin -func reqRepoWriter(unitTypes ...models.UnitType) macaron.Handler { +func reqRepoWriter(unitTypes ...models.UnitType) func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.IsUserRepoWriter(unitTypes) && !ctx.IsUserRepoAdmin() && !ctx.IsUserSiteAdmin() { ctx.Error(http.StatusForbidden, "reqRepoWriter", "user should have a permission to write to a repo") @@ -246,7 +264,7 @@ func reqRepoWriter(unitTypes ...models.UnitType) macaron.Handler { } // reqRepoReader user should have specific read permission or be a repo admin or a site admin -func reqRepoReader(unitType models.UnitType) macaron.Handler { +func reqRepoReader(unitType models.UnitType) func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.IsUserRepoReaderSpecific(unitType) && !ctx.IsUserRepoAdmin() && !ctx.IsUserSiteAdmin() { ctx.Error(http.StatusForbidden, "reqRepoReader", "user should have specific read permission or be a repo admin or a site admin") @@ -256,7 +274,7 @@ func reqRepoReader(unitType models.UnitType) macaron.Handler { } // reqAnyRepoReader user should have any permission to read repository or permissions of site admin -func reqAnyRepoReader() macaron.Handler { +func reqAnyRepoReader() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.IsUserRepoReaderAny() && !ctx.IsUserSiteAdmin() { ctx.Error(http.StatusForbidden, "reqAnyRepoReader", "user should have any permission to read repository or permissions of site admin") @@ -266,7 +284,7 @@ func reqAnyRepoReader() macaron.Handler { } // reqOrgOwnership user should be an organization owner, or a site admin -func reqOrgOwnership() macaron.Handler { +func reqOrgOwnership() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if ctx.Context.IsUserSiteAdmin() { return @@ -298,7 +316,7 @@ func reqOrgOwnership() macaron.Handler { } // reqTeamMembership user should be an team member, or a site admin -func reqTeamMembership() macaron.Handler { +func reqTeamMembership() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if ctx.Context.IsUserSiteAdmin() { return @@ -335,7 +353,7 @@ func reqTeamMembership() macaron.Handler { } // reqOrgMembership user should be an organization member, or a site admin -func reqOrgMembership() macaron.Handler { +func reqOrgMembership() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if ctx.Context.IsUserSiteAdmin() { return @@ -365,7 +383,7 @@ func reqOrgMembership() macaron.Handler { } } -func reqGitHook() macaron.Handler { +func reqGitHook() func(ctx *context.APIContext) { return func(ctx *context.APIContext) { if !ctx.User.CanEditGitHook() { ctx.Error(http.StatusForbidden, "", "must be allowed to edit Git hooks") @@ -374,7 +392,17 @@ func reqGitHook() macaron.Handler { } } -func orgAssignment(args ...bool) macaron.Handler { +// reqWebhooksEnabled requires webhooks to be enabled by admin. +func reqWebhooksEnabled() func(ctx *context.APIContext) { + return func(ctx *context.APIContext) { + if setting.DisableWebhooks { + ctx.Error(http.StatusForbidden, "", "webhooks disabled by administrator") + return + } + } +} + +func orgAssignment(args ...bool) func(ctx *context.APIContext) { var ( assignOrg bool assignTeam bool @@ -393,7 +421,14 @@ func orgAssignment(args ...bool) macaron.Handler { ctx.Org.Organization, err = models.GetOrgByName(ctx.Params(":org")) if err != nil { if models.IsErrOrgNotExist(err) { - ctx.NotFound() + redirectUserID, err := models.LookupUserRedirect(ctx.Params(":org")) + if err == nil { + context.RedirectToUser(ctx.Context, ctx.Params(":org"), redirectUserID) + } else if models.IsErrUserRedirectNotExist(err) { + ctx.NotFound("GetOrgByName", err) + } else { + ctx.Error(http.StatusInternalServerError, "LookupUserRedirect", err) + } } else { ctx.Error(http.StatusInternalServerError, "GetOrgByName", err) } @@ -487,13 +522,6 @@ func mustEnableIssuesOrPulls(ctx *context.APIContext) { } } -func mustEnableUserHeatmap(ctx *context.APIContext) { - if !setting.Service.EnableUserHeatmap { - ctx.NotFound() - return - } -} - func mustNotBeArchived(ctx *context.APIContext) { if ctx.Repo.Repository.IsArchived { ctx.NotFound() @@ -501,18 +529,65 @@ func mustNotBeArchived(ctx *context.APIContext) { } } -// RegisterRoutes registers all v1 APIs routes to web application. -func RegisterRoutes(m *macaron.Macaron) { - bind := binding.Bind - - if setting.API.EnableSwagger { - m.Get("/swagger", misc.Swagger) // Render V1 by default +// bind binding an obj to a func(ctx *context.APIContext) +func bind(obj interface{}) http.HandlerFunc { + var tp = reflect.TypeOf(obj) + for tp.Kind() == reflect.Ptr { + tp = tp.Elem() } + return web.Wrap(func(ctx *context.APIContext) { + var theObj = reflect.New(tp).Interface() // create a new form obj for every request but not use obj directly + errs := binding.Bind(ctx.Req, theObj) + if len(errs) > 0 { + ctx.Error(http.StatusUnprocessableEntity, "validationError", errs[0].Error()) + return + } + web.SetForm(ctx, theObj) + }) +} - m.Group("/v1", func() { +// Routes registers all v1 APIs routes to web application. +func Routes() *web.Route { + var m = web.NewRoute() + + m.Use(session.Sessioner(session.Options{ + Provider: setting.SessionConfig.Provider, + ProviderConfig: setting.SessionConfig.ProviderConfig, + CookieName: setting.SessionConfig.CookieName, + CookiePath: setting.SessionConfig.CookiePath, + Gclifetime: setting.SessionConfig.Gclifetime, + Maxlifetime: setting.SessionConfig.Maxlifetime, + Secure: setting.SessionConfig.Secure, + SameSite: setting.SessionConfig.SameSite, + Domain: setting.SessionConfig.Domain, + })) + m.Use(securityHeaders()) + if setting.CORSConfig.Enabled { + m.Use(cors.Handler(cors.Options{ + //Scheme: setting.CORSConfig.Scheme, // FIXME: the cors middleware needs scheme option + AllowedOrigins: setting.CORSConfig.AllowDomain, + //setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option + AllowedMethods: setting.CORSConfig.Methods, + AllowCredentials: setting.CORSConfig.AllowCredentials, + AllowedHeaders: []string{"Authorization", "X-CSRFToken", "X-Gitea-OTP"}, + MaxAge: int(setting.CORSConfig.MaxAge.Seconds()), + })) + } + m.Use(context.APIContexter()) + + // Get user from session if logged in. + m.Use(context.APIAuth(auth.NewGroup(auth.Methods()...))) + + m.Use(context.ToggleAPI(&context.ToggleOptions{ + SignInRequired: setting.Service.RequireSignInView, + })) + + m.Group("", func() { // Miscellaneous if setting.API.EnableSwagger { - m.Get("/swagger", misc.Swagger) + m.Get("/swagger", func(ctx *context.APIContext) { + ctx.Redirect("/api/swagger") + }) } m.Get("/version", misc.Version) m.Get("/signing-key.gpg", misc.SigningKey) @@ -531,37 +606,40 @@ func RegisterRoutes(m *macaron.Macaron) { Get(notify.ListNotifications). Put(notify.ReadNotifications) m.Get("/new", notify.NewAvailable) - m.Combo("/threads/:id"). + m.Combo("/threads/{id}"). Get(notify.GetThread). Patch(notify.ReadThread) }, reqToken()) // Users m.Group("/users", func() { - m.Get("/search", user.Search) + m.Get("/search", reqExploreSignIn(), user.Search) - m.Group("/:username", func() { - m.Get("", user.GetInfo) - m.Get("/heatmap", mustEnableUserHeatmap, user.GetUserHeatmapData) + m.Group("/{username}", func() { + m.Get("", reqExploreSignIn(), user.GetInfo) - m.Get("/repos", user.ListUserRepos) + if setting.Service.EnableUserHeatmap { + m.Get("/heatmap", user.GetUserHeatmapData) + } + + m.Get("/repos", reqExploreSignIn(), user.ListUserRepos) m.Group("/tokens", func() { m.Combo("").Get(user.ListAccessTokens). Post(bind(api.CreateAccessTokenOption{}), user.CreateAccessToken) - m.Combo("/:id").Delete(user.DeleteAccessToken) + m.Combo("/{id}").Delete(user.DeleteAccessToken) }, reqBasicAuth()) }) }) m.Group("/users", func() { - m.Group("/:username", func() { + m.Group("/{username}", func() { m.Get("/keys", user.ListPublicKeys) m.Get("/gpg_keys", user.ListGPGKeys) m.Get("/followers", user.ListFollowers) m.Group("/following", func() { m.Get("", user.ListFollowing) - m.Get("/:target", user.CheckFollowing) + m.Get("/{target}", user.CheckFollowing) }) m.Get("/starred", user.GetStarredRepos) @@ -572,6 +650,10 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/user", func() { m.Get("", user.GetAuthenticatedUser) + m.Group("/settings", func() { + m.Get("", user.GetUserSettings) + m.Patch("", bind(api.UserSettingsOptions{}), user.UpdateUserSettings) + }, reqToken()) m.Combo("/emails").Get(user.ListEmails). Post(bind(api.CreateEmailOption{}), user.AddEmail). Delete(bind(api.DeleteEmailOption{}), user.DeleteEmail) @@ -579,20 +661,20 @@ func RegisterRoutes(m *macaron.Macaron) { m.Get("/followers", user.ListMyFollowers) m.Group("/following", func() { m.Get("", user.ListMyFollowing) - m.Combo("/:username").Get(user.CheckMyFollowing).Put(user.Follow).Delete(user.Unfollow) + m.Combo("/{username}").Get(user.CheckMyFollowing).Put(user.Follow).Delete(user.Unfollow) }) m.Group("/keys", func() { m.Combo("").Get(user.ListMyPublicKeys). Post(bind(api.CreateKeyOption{}), user.CreatePublicKey) - m.Combo("/:id").Get(user.GetPublicKey). + m.Combo("/{id}").Get(user.GetPublicKey). Delete(user.DeletePublicKey) }) m.Group("/applications", func() { m.Combo("/oauth2"). Get(user.ListOauth2Applications). Post(bind(api.CreateOAuth2ApplicationOptions{}), user.CreateOauth2Application) - m.Combo("/oauth2/:id"). + m.Combo("/oauth2/{id}"). Delete(user.DeleteOauth2Application). Patch(bind(api.CreateOAuth2ApplicationOptions{}), user.UpdateOauth2Application). Get(user.GetOauth2Application) @@ -601,16 +683,19 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/gpg_keys", func() { m.Combo("").Get(user.ListMyGPGKeys). Post(bind(api.CreateGPGKeyOption{}), user.CreateGPGKey) - m.Combo("/:id").Get(user.GetGPGKey). + m.Combo("/{id}").Get(user.GetGPGKey). Delete(user.DeleteGPGKey) }) + m.Get("/gpg_key_token", user.GetVerificationToken) + m.Post("/gpg_key_verify", bind(api.VerifyGPGKeyOption{}), user.VerifyUserGPGKey) + m.Combo("/repos").Get(user.ListMyRepos). Post(bind(api.CreateRepoOption{}), repo.Create) m.Group("/starred", func() { m.Get("", user.GetMyStarredRepos) - m.Group("/:username/:reponame", func() { + m.Group("/{username}/{reponame}", func() { m.Get("", user.IsStarring) m.Put("", user.Star) m.Delete("", user.Unstar) @@ -626,9 +711,9 @@ func RegisterRoutes(m *macaron.Macaron) { }, reqToken()) // Repositories - m.Post("/org/:org/repos", reqToken(), bind(api.CreateRepoOption{}), repo.CreateOrgRepoDeprecated) + m.Post("/org/{org}/repos", reqToken(), bind(api.CreateRepoOption{}), repo.CreateOrgRepoDeprecated) - m.Combo("/repositories/:id", reqToken()).Get(repo.GetByID) + m.Combo("/repositories/{id}", reqToken()).Get(repo.GetByID) m.Group("/repos", func() { m.Get("/search", repo.Search) @@ -637,39 +722,48 @@ func RegisterRoutes(m *macaron.Macaron) { m.Post("/migrate", reqToken(), bind(api.MigrateRepoOptions{}), repo.Migrate) - m.Group("/:username/:reponame", func() { + m.Group("/{username}/{reponame}", func() { m.Combo("").Get(reqAnyRepoReader(), repo.Get). Delete(reqToken(), reqOwner(), repo.Delete). - Patch(reqToken(), reqAdmin(), bind(api.EditRepoOption{}), context.RepoRefForAPI(), repo.Edit) + Patch(reqToken(), reqAdmin(), bind(api.EditRepoOption{}), repo.Edit) + m.Post("/generate", reqToken(), reqRepoReader(models.UnitTypeCode), bind(api.GenerateRepoOption{}), repo.Generate) m.Post("/transfer", reqOwner(), bind(api.TransferRepoOption{}), repo.Transfer) m.Combo("/notifications"). Get(reqToken(), notify.ListRepoNotifications). Put(reqToken(), notify.ReadRepoNotifications) + m.Group("/hooks/git", func() { + m.Combo("").Get(repo.ListGitHooks) + m.Group("/{id}", func() { + m.Combo("").Get(repo.GetGitHook). + Patch(bind(api.EditGitHookOption{}), repo.EditGitHook). + Delete(repo.DeleteGitHook) + }) + }, reqToken(), reqAdmin(), reqGitHook(), context.ReferencesGitRepo(true)) m.Group("/hooks", func() { m.Combo("").Get(repo.ListHooks). Post(bind(api.CreateHookOption{}), repo.CreateHook) - m.Group("/:id", func() { + m.Group("/{id}", func() { m.Combo("").Get(repo.GetHook). Patch(bind(api.EditHookOption{}), repo.EditHook). Delete(repo.DeleteHook) - m.Post("/tests", context.RepoRefForAPI(), repo.TestHook) + m.Post("/tests", context.RepoRefForAPI, repo.TestHook) }) - m.Group("/git", func() { - m.Combo("").Get(repo.ListGitHooks) - m.Group("/:id", func() { - m.Combo("").Get(repo.GetGitHook). - Patch(bind(api.EditGitHookOption{}), repo.EditGitHook). - Delete(repo.DeleteGitHook) - }) - }, reqGitHook(), context.ReferencesGitRepo(true)) - }, reqToken(), reqAdmin()) + }, reqToken(), reqAdmin(), reqWebhooksEnabled()) m.Group("/collaborators", func() { m.Get("", reqAnyRepoReader(), repo.ListCollaborators) - m.Combo("/:collaborator").Get(reqAnyRepoReader(), repo.IsCollaborator). + m.Combo("/{collaborator}").Get(reqAnyRepoReader(), repo.IsCollaborator). Put(reqAdmin(), bind(api.AddCollaboratorOption{}), repo.AddCollaborator). Delete(reqAdmin(), repo.DeleteCollaborator) }, reqToken()) - m.Get("/raw/*", context.RepoRefForAPI(), reqRepoReader(models.UnitTypeCode), repo.GetRawFile) + m.Get("/assignees", reqToken(), reqAnyRepoReader(), repo.GetAssignees) + m.Get("/reviewers", reqToken(), reqAnyRepoReader(), repo.GetReviewers) + m.Group("/teams", func() { + m.Get("", reqAnyRepoReader(), repo.ListTeams) + m.Combo("/{team}").Get(reqAnyRepoReader(), repo.IsTeam). + Put(reqAdmin(), repo.AddTeam). + Delete(reqAdmin(), repo.DeleteTeam) + }, reqToken()) + m.Get("/raw/*", context.RepoRefForAPI, reqRepoReader(models.UnitTypeCode), repo.GetRawFile) m.Get("/archive/*", reqRepoReader(models.UnitTypeCode), repo.GetArchive) m.Combo("/forks").Get(repo.ListForks). Post(reqToken(), reqRepoReader(models.UnitTypeCode), bind(api.CreateForkOption{}), repo.CreateFork) @@ -682,7 +776,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/branch_protections", func() { m.Get("", repo.ListBranchProtections) m.Post("", bind(api.CreateBranchProtectionOption{}), repo.CreateBranchProtection) - m.Group("/:name", func() { + m.Group("/{name}", func() { m.Get("", repo.GetBranchProtection) m.Patch("", bind(api.EditBranchProtectionOption{}), repo.EditBranchProtection) m.Delete("", repo.DeleteBranchProtection) @@ -690,40 +784,43 @@ func RegisterRoutes(m *macaron.Macaron) { }, reqToken(), reqAdmin()) m.Group("/tags", func() { m.Get("", repo.ListTags) + m.Get("/*", repo.GetTag) + m.Post("", reqRepoWriter(models.UnitTypeCode), bind(api.CreateTagOption{}), repo.CreateTag) + m.Delete("/*", repo.DeleteTag) }, reqRepoReader(models.UnitTypeCode), context.ReferencesGitRepo(true)) m.Group("/keys", func() { m.Combo("").Get(repo.ListDeployKeys). Post(bind(api.CreateKeyOption{}), repo.CreateDeployKey) - m.Combo("/:id").Get(repo.GetDeployKey). + m.Combo("/{id}").Get(repo.GetDeployKey). Delete(repo.DeleteDeploykey) }, reqToken(), reqAdmin()) m.Group("/times", func() { m.Combo("").Get(repo.ListTrackedTimesByRepository) - m.Combo("/:timetrackingusername").Get(repo.ListTrackedTimesByUser) + m.Combo("/{timetrackingusername}").Get(repo.ListTrackedTimesByUser) }, mustEnableIssues, reqToken()) m.Group("/issues", func() { m.Combo("").Get(repo.ListIssues). Post(reqToken(), mustNotBeArchived, bind(api.CreateIssueOption{}), repo.CreateIssue) m.Group("/comments", func() { m.Get("", repo.ListRepoIssueComments) - m.Group("/:id", func() { + m.Group("/{id}", func() { m.Combo(""). Get(repo.GetIssueComment). Patch(mustNotBeArchived, reqToken(), bind(api.EditIssueCommentOption{}), repo.EditIssueComment). Delete(reqToken(), repo.DeleteIssueComment) m.Combo("/reactions"). Get(repo.GetIssueCommentReactions). - Post(bind(api.EditReactionOption{}), reqToken(), repo.PostIssueCommentReaction). - Delete(bind(api.EditReactionOption{}), reqToken(), repo.DeleteIssueCommentReaction) + Post(reqToken(), bind(api.EditReactionOption{}), repo.PostIssueCommentReaction). + Delete(reqToken(), bind(api.EditReactionOption{}), repo.DeleteIssueCommentReaction) }) }) - m.Group("/:index", func() { + m.Group("/{index}", func() { m.Combo("").Get(repo.GetIssue). Patch(reqToken(), bind(api.EditIssueOption{}), repo.EditIssue) m.Group("/comments", func() { m.Combo("").Get(repo.ListIssueComments). Post(reqToken(), mustNotBeArchived, bind(api.CreateIssueCommentOption{}), repo.CreateIssueComment) - m.Combo("/:id", reqToken()).Patch(bind(api.EditIssueCommentOption{}), repo.EditIssueCommentDeprecated). + m.Combo("/{id}", reqToken()).Patch(bind(api.EditIssueCommentOption{}), repo.EditIssueCommentDeprecated). Delete(repo.DeleteIssueCommentDeprecated) }) m.Group("/labels", func() { @@ -731,14 +828,14 @@ func RegisterRoutes(m *macaron.Macaron) { Post(reqToken(), bind(api.IssueLabelsOption{}), repo.AddIssueLabels). Put(reqToken(), bind(api.IssueLabelsOption{}), repo.ReplaceIssueLabels). Delete(reqToken(), repo.ClearIssueLabels) - m.Delete("/:id", reqToken(), repo.DeleteIssueLabel) + m.Delete("/{id}", reqToken(), repo.DeleteIssueLabel) }) m.Group("/times", func() { m.Combo(""). Get(repo.ListTrackedTimes). Post(bind(api.AddTimeOption{}), repo.AddTime). Delete(repo.ResetIssueTime) - m.Delete("/:id", repo.DeleteTime) + m.Delete("/{id}", repo.DeleteTime) }, reqToken()) m.Combo("/deadline").Post(reqToken(), bind(api.EditDeadlineOption{}), repo.UpdateIssueDeadline) m.Group("/stopwatch", func() { @@ -749,19 +846,19 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/subscriptions", func() { m.Get("", repo.GetIssueSubscribers) m.Get("/check", reqToken(), repo.CheckIssueSubscription) - m.Put("/:user", reqToken(), repo.AddIssueSubscription) - m.Delete("/:user", reqToken(), repo.DelIssueSubscription) + m.Put("/{user}", reqToken(), repo.AddIssueSubscription) + m.Delete("/{user}", reqToken(), repo.DelIssueSubscription) }) m.Combo("/reactions"). Get(repo.GetIssueReactions). - Post(bind(api.EditReactionOption{}), reqToken(), repo.PostIssueReaction). - Delete(bind(api.EditReactionOption{}), reqToken(), repo.DeleteIssueReaction) + Post(reqToken(), bind(api.EditReactionOption{}), repo.PostIssueReaction). + Delete(reqToken(), bind(api.EditReactionOption{}), repo.DeleteIssueReaction) }) }, mustEnableIssuesOrPulls) m.Group("/labels", func() { m.Combo("").Get(repo.ListLabels). Post(reqToken(), reqRepoWriter(models.UnitTypeIssues, models.UnitTypePullRequests), bind(api.CreateLabelOption{}), repo.CreateLabel) - m.Combo("/:id").Get(repo.GetLabel). + m.Combo("/{id}").Get(repo.GetLabel). Patch(reqToken(), reqRepoWriter(models.UnitTypeIssues, models.UnitTypePullRequests), bind(api.EditLabelOption{}), repo.EditLabel). Delete(reqToken(), reqRepoWriter(models.UnitTypeIssues, models.UnitTypePullRequests), repo.DeleteLabel) }) @@ -770,7 +867,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/milestones", func() { m.Combo("").Get(repo.ListMilestones). Post(reqToken(), reqRepoWriter(models.UnitTypeIssues, models.UnitTypePullRequests), bind(api.CreateMilestoneOption{}), repo.CreateMilestone) - m.Combo("/:id").Get(repo.GetMilestone). + m.Combo("/{id}").Get(repo.GetMilestone). Patch(reqToken(), reqRepoWriter(models.UnitTypeIssues, models.UnitTypePullRequests), bind(api.EditMilestoneOption{}), repo.EditMilestone). Delete(reqToken(), reqRepoWriter(models.UnitTypeIssues, models.UnitTypePullRequests), repo.DeleteMilestone) }) @@ -784,48 +881,51 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/releases", func() { m.Combo("").Get(repo.ListReleases). Post(reqToken(), reqRepoWriter(models.UnitTypeReleases), context.ReferencesGitRepo(false), bind(api.CreateReleaseOption{}), repo.CreateRelease) - m.Group("/:id", func() { + m.Group("/{id}", func() { m.Combo("").Get(repo.GetRelease). Patch(reqToken(), reqRepoWriter(models.UnitTypeReleases), context.ReferencesGitRepo(false), bind(api.EditReleaseOption{}), repo.EditRelease). Delete(reqToken(), reqRepoWriter(models.UnitTypeReleases), repo.DeleteRelease) m.Group("/assets", func() { m.Combo("").Get(repo.ListReleaseAttachments). Post(reqToken(), reqRepoWriter(models.UnitTypeReleases), repo.CreateReleaseAttachment) - m.Combo("/:asset").Get(repo.GetReleaseAttachment). + m.Combo("/{asset}").Get(repo.GetReleaseAttachment). Patch(reqToken(), reqRepoWriter(models.UnitTypeReleases), bind(api.EditAttachmentOptions{}), repo.EditReleaseAttachment). Delete(reqToken(), reqRepoWriter(models.UnitTypeReleases), repo.DeleteReleaseAttachment) }) }) m.Group("/tags", func() { - m.Combo("/:tag"). - Get(repo.GetReleaseTag). - Delete(reqToken(), reqRepoWriter(models.UnitTypeReleases), repo.DeleteReleaseTag) + m.Combo("/{tag}"). + Get(repo.GetReleaseByTag). + Delete(reqToken(), reqRepoWriter(models.UnitTypeReleases), repo.DeleteReleaseByTag) }) }, reqRepoReader(models.UnitTypeReleases)) m.Post("/mirror-sync", reqToken(), reqRepoWriter(models.UnitTypeCode), repo.MirrorSync) - m.Get("/editorconfig/:filename", context.RepoRefForAPI(), reqRepoReader(models.UnitTypeCode), repo.GetEditorconfig) + m.Get("/editorconfig/{filename}", context.RepoRefForAPI, reqRepoReader(models.UnitTypeCode), repo.GetEditorconfig) m.Group("/pulls", func() { - m.Combo("").Get(bind(api.ListPullRequestsOptions{}), repo.ListPullRequests). + m.Combo("").Get(repo.ListPullRequests). Post(reqToken(), mustNotBeArchived, bind(api.CreatePullRequestOption{}), repo.CreatePullRequest) - m.Group("/:index", func() { + m.Group("/{index}", func() { m.Combo("").Get(repo.GetPullRequest). - Patch(reqToken(), reqRepoWriter(models.UnitTypePullRequests), bind(api.EditPullRequestOption{}), repo.EditPullRequest) + Patch(reqToken(), bind(api.EditPullRequestOption{}), repo.EditPullRequest) m.Get(".diff", repo.DownloadPullDiff) m.Get(".patch", repo.DownloadPullPatch) m.Post("/update", reqToken(), repo.UpdatePullRequest) + m.Get("/commits", repo.GetPullRequestCommits) m.Combo("/merge").Get(repo.IsPullRequestMerged). - Post(reqToken(), mustNotBeArchived, bind(auth.MergePullRequestForm{}), repo.MergePullRequest) + Post(reqToken(), mustNotBeArchived, bind(forms.MergePullRequestForm{}), repo.MergePullRequest) m.Group("/reviews", func() { m.Combo(""). Get(repo.ListPullReviews). Post(reqToken(), bind(api.CreatePullReviewOptions{}), repo.CreatePullReview) - m.Group("/:id", func() { + m.Group("/{id}", func() { m.Combo(""). Get(repo.GetPullReview). Delete(reqToken(), repo.DeletePullReview). Post(reqToken(), bind(api.SubmitPullReviewOptions{}), repo.SubmitPullReview) m.Combo("/comments"). Get(repo.GetPullReviewComments) + m.Post("/dismissals", reqToken(), bind(api.DismissPullReviewOptions{}), repo.DismissPullReview) + m.Post("/undismissals", reqToken(), repo.UnDismissPullReview) }) }) m.Combo("/requested_reviewers"). @@ -834,25 +934,26 @@ func RegisterRoutes(m *macaron.Macaron) { }) }, mustAllowPulls, reqRepoReader(models.UnitTypeCode), context.ReferencesGitRepo(false)) m.Group("/statuses", func() { - m.Combo("/:sha").Get(repo.GetCommitStatuses). + m.Combo("/{sha}").Get(repo.GetCommitStatuses). Post(reqToken(), bind(api.CreateStatusOption{}), repo.NewCommitStatus) }, reqRepoReader(models.UnitTypeCode)) m.Group("/commits", func() { m.Get("", repo.GetAllCommits) - m.Group("/:ref", func() { + m.Group("/{ref}", func() { m.Get("/status", repo.GetCombinedCommitStatusByRef) m.Get("/statuses", repo.GetCommitStatusesByRef) }) }, reqRepoReader(models.UnitTypeCode)) m.Group("/git", func() { m.Group("/commits", func() { - m.Get("/:sha", repo.GetSingleCommit) + m.Get("/{sha}", repo.GetSingleCommit) }) m.Get("/refs", repo.GetGitAllRefs) m.Get("/refs/*", repo.GetGitRefs) - m.Get("/trees/:sha", context.RepoRefForAPI(), repo.GetTree) - m.Get("/blobs/:sha", context.RepoRefForAPI(), repo.GetBlob) - m.Get("/tags/:sha", context.RepoRefForAPI(), repo.GetTag) + m.Get("/trees/{sha}", context.RepoRefForAPI, repo.GetTree) + m.Get("/blobs/{sha}", context.RepoRefForAPI, repo.GetBlob) + m.Get("/tags/{sha}", context.RepoRefForAPI, repo.GetAnnotatedTag) + m.Get("/notes/{sha}", repo.GetNote) }, reqRepoReader(models.UnitTypeCode)) m.Group("/contents", func() { m.Get("", repo.GetContentsList) @@ -867,7 +968,7 @@ func RegisterRoutes(m *macaron.Macaron) { m.Group("/topics", func() { m.Combo("").Get(repo.ListTopics). Put(reqToken(), reqAdmin(), bind(api.RepoTopicOptions{}), repo.UpdateTopics) - m.Group("/:topic", func() { + m.Group("/{topic}", func() { m.Combo("").Put(reqToken(), repo.AddTopic). Delete(reqToken(), repo.DeleteTopic) }, reqAdmin()) @@ -879,10 +980,10 @@ func RegisterRoutes(m *macaron.Macaron) { // Organizations m.Get("/user/orgs", reqToken(), org.ListMyOrgs) - m.Get("/users/:username/orgs", org.ListUserOrgs) + m.Get("/users/{username}/orgs", org.ListUserOrgs) m.Post("/orgs", reqToken(), bind(api.CreateOrgOption{}), org.Create) m.Get("/orgs", org.GetAll) - m.Group("/orgs/:org", func() { + m.Group("/orgs/{org}", func() { m.Combo("").Get(org.Get). Patch(reqToken(), reqOrgOwnership(), bind(api.EditOrgOption{}), org.Edit). Delete(reqToken(), reqOrgOwnership(), org.Delete) @@ -890,73 +991,69 @@ func RegisterRoutes(m *macaron.Macaron) { Post(reqToken(), bind(api.CreateRepoOption{}), repo.CreateOrgRepo) m.Group("/members", func() { m.Get("", org.ListMembers) - m.Combo("/:username").Get(org.IsMember). + m.Combo("/{username}").Get(org.IsMember). Delete(reqToken(), reqOrgOwnership(), org.DeleteMember) }) m.Group("/public_members", func() { m.Get("", org.ListPublicMembers) - m.Combo("/:username").Get(org.IsPublicMember). + m.Combo("/{username}").Get(org.IsPublicMember). Put(reqToken(), reqOrgMembership(), org.PublicizeMember). Delete(reqToken(), reqOrgMembership(), org.ConcealMember) }) m.Group("/teams", func() { - m.Combo("", reqToken()).Get(org.ListTeams). - Post(reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam) + m.Get("", org.ListTeams) + m.Post("", reqOrgOwnership(), bind(api.CreateTeamOption{}), org.CreateTeam) m.Get("/search", org.SearchTeam) - }, reqOrgMembership()) + }, reqToken(), reqOrgMembership()) m.Group("/labels", func() { m.Get("", org.ListLabels) m.Post("", reqToken(), reqOrgOwnership(), bind(api.CreateLabelOption{}), org.CreateLabel) - m.Combo("/:id").Get(org.GetLabel). + m.Combo("/{id}").Get(org.GetLabel). Patch(reqToken(), reqOrgOwnership(), bind(api.EditLabelOption{}), org.EditLabel). Delete(reqToken(), reqOrgOwnership(), org.DeleteLabel) }) m.Group("/hooks", func() { m.Combo("").Get(org.ListHooks). Post(bind(api.CreateHookOption{}), org.CreateHook) - m.Combo("/:id").Get(org.GetHook). + m.Combo("/{id}").Get(org.GetHook). Patch(bind(api.EditHookOption{}), org.EditHook). Delete(org.DeleteHook) - }, reqToken(), reqOrgOwnership()) + }, reqToken(), reqOrgOwnership(), reqWebhooksEnabled()) }, orgAssignment(true)) - m.Group("/teams/:teamid", func() { + m.Group("/teams/{teamid}", func() { m.Combo("").Get(org.GetTeam). Patch(reqOrgOwnership(), bind(api.EditTeamOption{}), org.EditTeam). Delete(reqOrgOwnership(), org.DeleteTeam) m.Group("/members", func() { m.Get("", org.GetTeamMembers) - m.Combo("/:username"). + m.Combo("/{username}"). Get(org.GetTeamMember). Put(reqOrgOwnership(), org.AddTeamMember). Delete(reqOrgOwnership(), org.RemoveTeamMember) }) m.Group("/repos", func() { m.Get("", org.GetTeamRepos) - m.Combo("/:org/:reponame"). + m.Combo("/{org}/{reponame}"). Put(org.AddTeamRepository). Delete(org.RemoveTeamRepository) }) }, orgAssignment(false, true), reqToken(), reqTeamMembership()) - m.Any("/*", func(ctx *context.APIContext) { - ctx.NotFound() - }) - m.Group("/admin", func() { m.Group("/cron", func() { m.Get("", admin.ListCronTasks) - m.Post("/:task", admin.PostCronTask) + m.Post("/{task}", admin.PostCronTask) }) m.Get("/orgs", admin.GetAllOrgs) m.Group("/users", func() { m.Get("", admin.GetAllUsers) m.Post("", bind(api.CreateUserOption{}), admin.CreateUser) - m.Group("/:username", func() { + m.Group("/{username}", func() { m.Combo("").Patch(bind(api.EditUserOption{}), admin.EditUser). Delete(admin.DeleteUser) m.Group("/keys", func() { m.Post("", bind(api.CreateKeyOption{}), admin.CreatePublicKey) - m.Delete("/:id", admin.DeleteUserPublicKey) + m.Delete("/{id}", admin.DeleteUserPublicKey) }) m.Get("/orgs", org.ListUserOrgs) m.Post("/orgs", bind(api.CreateOrgOption{}), admin.CreateOrg) @@ -965,23 +1062,26 @@ func RegisterRoutes(m *macaron.Macaron) { }) m.Group("/unadopted", func() { m.Get("", admin.ListUnadoptedRepositories) - m.Post("/:username/:reponame", admin.AdoptRepository) - m.Delete("/:username/:reponame", admin.DeleteUnadoptedRepository) + m.Post("/{username}/{reponame}", admin.AdoptRepository) + m.Delete("/{username}/{reponame}", admin.DeleteUnadoptedRepository) }) }, reqToken(), reqSiteAdmin()) m.Group("/topics", func() { m.Get("/search", repo.TopicSearch) }) - }, securityHeaders(), context.APIContexter(), sudo()) + }, sudo()) + + return m } -func securityHeaders() macaron.Handler { - return func(ctx *macaron.Context) { - ctx.Resp.Before(func(w macaron.ResponseWriter) { +func securityHeaders() func(http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { // CORB: https://www.chromium.org/Home/chromium-security/corb-for-developers // http://stackoverflow.com/a/3146618/244009 - w.Header().Set("x-content-type-options", "nosniff") + resp.Header().Set("x-content-type-options", "nosniff") + next.ServeHTTP(resp, req) }) } } diff --git a/routers/api/v1/misc/markdown.go b/routers/api/v1/misc/markdown.go index a10c288df..f1007b7ee 100644 --- a/routers/api/v1/misc/markdown.go +++ b/routers/api/v1/misc/markdown.go @@ -9,16 +9,18 @@ import ( "strings" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" "mvdan.cc/xurls/v2" ) // Markdown render markdown document to HTML -func Markdown(ctx *context.APIContext, form api.MarkdownOption) { +func Markdown(ctx *context.APIContext) { // swagger:operation POST /markdown miscellaneous renderMarkdown // --- // summary: Render a markdown document as HTML @@ -37,6 +39,8 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.MarkdownOption) + if ctx.HasAPIError() { ctx.Error(http.StatusUnprocessableEntity, "", ctx.GetErrMsg()) return @@ -51,7 +55,6 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) { case "comment": fallthrough case "gfm": - md := []byte(form.Text) urlPrefix := form.Context meta := map[string]string{} if !strings.HasPrefix(setting.AppSubURL+"/", urlPrefix) { @@ -73,22 +76,19 @@ func Markdown(ctx *context.APIContext, form api.MarkdownOption) { if form.Mode == "gfm" { meta["mode"] = "document" } - if form.Wiki { - _, err := ctx.Write([]byte(markdown.RenderWiki(md, urlPrefix, meta))) - if err != nil { - ctx.InternalServerError(err) - return - } - } else { - _, err := ctx.Write(markdown.Render(md, urlPrefix, meta)) - if err != nil { - ctx.InternalServerError(err) - return - } + + if err := markdown.Render(&markup.RenderContext{ + URLPrefix: urlPrefix, + Metas: meta, + IsWiki: form.Wiki, + }, strings.NewReader(form.Text), ctx.Resp); err != nil { + ctx.InternalServerError(err) + return } default: - _, err := ctx.Write(markdown.RenderRaw([]byte(form.Text), "", false)) - if err != nil { + if err := markdown.RenderRaw(&markup.RenderContext{ + URLPrefix: form.Context, + }, strings.NewReader(form.Text), ctx.Resp); err != nil { ctx.InternalServerError(err) return } @@ -116,14 +116,8 @@ func MarkdownRaw(ctx *context.APIContext) { // "$ref": "#/responses/MarkdownRender" // "422": // "$ref": "#/responses/validationError" - - body, err := ctx.Req.Body().Bytes() - if err != nil { - ctx.Error(http.StatusUnprocessableEntity, "", err) - return - } - _, err = ctx.Write(markdown.RenderRaw(body, "", false)) - if err != nil { + defer ctx.Req.Body.Close() + if err := markdown.RenderRaw(&markup.RenderContext{}, ctx.Req.Body, ctx.Resp); err != nil { ctx.InternalServerError(err) return } diff --git a/routers/api/v1/misc/markdown_test.go b/routers/api/v1/misc/markdown_test.go index 6c81ec8eb..3ae3165fd 100644 --- a/routers/api/v1/misc/markdown_test.go +++ b/routers/api/v1/misc/markdown_test.go @@ -15,10 +15,10 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/templates" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" - "gitea.com/macaron/inject" - "gitea.com/macaron/macaron" "github.com/stretchr/testify/assert" ) @@ -26,25 +26,21 @@ const AppURL = "http://localhost:3000/" const Repo = "gogits/gogs" const AppSubURL = AppURL + Repo + "/" -func createContext(req *http.Request) (*macaron.Context, *httptest.ResponseRecorder) { +func createContext(req *http.Request) (*context.Context, *httptest.ResponseRecorder) { + var rnd = templates.HTMLRenderer() resp := httptest.NewRecorder() - c := &macaron.Context{ - Injector: inject.New(), - Req: macaron.Request{Request: req}, - Resp: macaron.NewResponseWriter(req.Method, resp), - Render: &macaron.DummyRender{ResponseWriter: resp}, - Data: make(map[string]interface{}), + c := &context.Context{ + Req: req, + Resp: context.NewResponse(resp), + Render: rnd, + Data: make(map[string]interface{}), } - c.Map(c) - c.Map(req) return c, resp } -func wrap(ctx *macaron.Context) *context.APIContext { +func wrap(ctx *context.Context) *context.APIContext { return &context.APIContext{ - Context: &context.Context{ - Context: ctx, - }, + Context: ctx, } } @@ -115,7 +111,8 @@ Here are some links to the most important topics. You can find the full list of for i := 0; i < len(testCases); i += 2 { options.Text = testCases[i] - Markdown(ctx, options) + web.SetForm(ctx, &options) + Markdown(ctx) assert.Equal(t, testCases[i+1], resp.Body.String()) resp.Body.Reset() } @@ -156,7 +153,8 @@ func TestAPI_RenderSimple(t *testing.T) { for i := 0; i < len(simpleCases); i += 2 { options.Text = simpleCases[i] - Markdown(ctx, options) + web.SetForm(ctx, &options) + Markdown(ctx) assert.Equal(t, simpleCases[i+1], resp.Body.String()) resp.Body.Reset() } @@ -174,7 +172,7 @@ func TestAPI_RenderRaw(t *testing.T) { ctx := wrap(m) for i := 0; i < len(simpleCases); i += 2 { - ctx.Req.Request.Body = ioutil.NopCloser(strings.NewReader(simpleCases[i])) + ctx.Req.Body = ioutil.NopCloser(strings.NewReader(simpleCases[i])) MarkdownRaw(ctx) assert.Equal(t, simpleCases[i+1], resp.Body.String()) resp.Body.Reset() diff --git a/routers/api/v1/notify/notifications.go b/routers/api/v1/notify/notifications.go index 71dd7d949..9dd9da85c 100644 --- a/routers/api/v1/notify/notifications.go +++ b/routers/api/v1/notify/notifications.go @@ -6,10 +6,12 @@ package notify import ( "net/http" + "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/routers/api/v1/utils" ) // NewAvailable check if unread notifications exist @@ -22,3 +24,44 @@ func NewAvailable(ctx *context.APIContext) { // "$ref": "#/responses/NotificationCount" ctx.JSON(http.StatusOK, api.NotificationCount{New: models.CountUnread(ctx.User)}) } + +func getFindNotificationOptions(ctx *context.APIContext) *models.FindNotificationOptions { + before, since, err := utils.GetQueryBeforeSince(ctx) + if err != nil { + ctx.Error(http.StatusUnprocessableEntity, "GetQueryBeforeSince", err) + return nil + } + opts := &models.FindNotificationOptions{ + ListOptions: utils.GetListOptions(ctx), + UserID: ctx.User.ID, + UpdatedBeforeUnix: before, + UpdatedAfterUnix: since, + } + if !ctx.FormBool("all") { + statuses := ctx.FormStrings("status-types") + opts.Status = statusStringsToNotificationStatuses(statuses, []string{"unread", "pinned"}) + } + + subjectTypes := ctx.FormStrings("subject-type") + if len(subjectTypes) != 0 { + opts.Source = subjectToSource(subjectTypes) + } + + return opts +} + +func subjectToSource(value []string) (result []models.NotificationSource) { + for _, v := range value { + switch strings.ToLower(v) { + case "issue": + result = append(result, models.NotificationSourceIssue) + case "pull": + result = append(result, models.NotificationSourcePullRequest) + case "commit": + result = append(result, models.NotificationSourceCommit) + case "repository": + result = append(result, models.NotificationSourceRepository) + } + } + return +} diff --git a/routers/api/v1/notify/repo.go b/routers/api/v1/notify/repo.go index 0a75fcd30..1a36642b6 100644 --- a/routers/api/v1/notify/repo.go +++ b/routers/api/v1/notify/repo.go @@ -13,7 +13,6 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/routers/api/v1/utils" ) func statusStringToNotificationStatus(status string) models.NotificationStatus { @@ -66,8 +65,7 @@ func ListRepoNotifications(ctx *context.APIContext) { // - name: all // in: query // description: If true, show notifications marked as read. Default value is false - // type: string - // required: false + // type: boolean // - name: status-types // in: query // description: "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned" @@ -75,19 +73,24 @@ func ListRepoNotifications(ctx *context.APIContext) { // collectionFormat: multi // items: // type: string - // required: false + // - name: subject-type + // in: query + // description: "filter notifications by subject type" + // type: array + // collectionFormat: multi + // items: + // type: string + // enum: [issue,pull,commit,repository] // - name: since // in: query // description: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format // type: string // format: date-time - // required: false // - name: before // in: query // description: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format // type: string // format: date-time - // required: false // - name: page // in: query // description: page number of results to return (1-based) @@ -99,24 +102,18 @@ func ListRepoNotifications(ctx *context.APIContext) { // responses: // "200": // "$ref": "#/responses/NotificationThreadList" - - before, since, err := utils.GetQueryBeforeSince(ctx) - if err != nil { - ctx.Error(http.StatusUnprocessableEntity, "GetQueryBeforeSince", err) + opts := getFindNotificationOptions(ctx) + if ctx.Written() { return } - opts := models.FindNotificationOptions{ - ListOptions: utils.GetListOptions(ctx), - UserID: ctx.User.ID, - RepoID: ctx.Repo.Repository.ID, - UpdatedBeforeUnix: before, - UpdatedAfterUnix: since, + opts.RepoID = ctx.Repo.Repository.ID + + totalCount, err := models.CountNotifications(opts) + if err != nil { + ctx.InternalServerError(err) + return } - if !ctx.QueryBool("all") { - statuses := ctx.QueryStrings("status-types") - opts.Status = statusStringsToNotificationStatuses(statuses, []string{"unread", "pinned"}) - } nl, err := models.GetNotifications(opts) if err != nil { ctx.InternalServerError(err) @@ -128,6 +125,8 @@ func ListRepoNotifications(ctx *context.APIContext) { return } + ctx.SetTotalCountHeader(totalCount) + ctx.JSON(http.StatusOK, convert.ToNotifications(nl)) } @@ -180,7 +179,7 @@ func ReadRepoNotifications(ctx *context.APIContext) { // "$ref": "#/responses/empty" lastRead := int64(0) - qLastRead := strings.Trim(ctx.Query("last_read_at"), " ") + qLastRead := ctx.FormTrim("last_read_at") if len(qLastRead) > 0 { tmpLastRead, err := time.Parse(time.RFC3339, qLastRead) if err != nil { @@ -192,14 +191,14 @@ func ReadRepoNotifications(ctx *context.APIContext) { } } - opts := models.FindNotificationOptions{ + opts := &models.FindNotificationOptions{ UserID: ctx.User.ID, RepoID: ctx.Repo.Repository.ID, UpdatedBeforeUnix: lastRead, } - if !ctx.QueryBool("all") { - statuses := ctx.QueryStrings("status-types") + if !ctx.FormBool("all") { + statuses := ctx.FormStrings("status-types") opts.Status = statusStringsToNotificationStatuses(statuses, []string{"unread"}) log.Error("%v", opts.Status) } @@ -209,7 +208,7 @@ func ReadRepoNotifications(ctx *context.APIContext) { return } - targetStatus := statusStringToNotificationStatus(ctx.Query("to-status")) + targetStatus := statusStringToNotificationStatus(ctx.FormString("to-status")) if targetStatus == 0 { targetStatus = models.NotificationStatusRead } diff --git a/routers/api/v1/notify/threads.go b/routers/api/v1/notify/threads.go index efe5bcb59..1774c0b41 100644 --- a/routers/api/v1/notify/threads.go +++ b/routers/api/v1/notify/threads.go @@ -82,7 +82,7 @@ func ReadThread(ctx *context.APIContext) { return } - targetStatus := statusStringToNotificationStatus(ctx.Query("to-status")) + targetStatus := statusStringToNotificationStatus(ctx.FormString("to-status")) if targetStatus == 0 { targetStatus = models.NotificationStatusRead } diff --git a/routers/api/v1/notify/user.go b/routers/api/v1/notify/user.go index e739c6a38..e4626cb71 100644 --- a/routers/api/v1/notify/user.go +++ b/routers/api/v1/notify/user.go @@ -6,13 +6,11 @@ package notify import ( "net/http" - "strings" "time" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" - "code.gitea.io/gitea/routers/api/v1/utils" ) // ListNotifications list users's notification threads @@ -28,8 +26,7 @@ func ListNotifications(ctx *context.APIContext) { // - name: all // in: query // description: If true, show notifications marked as read. Default value is false - // type: string - // required: false + // type: boolean // - name: status-types // in: query // description: "Show notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread & pinned." @@ -37,19 +34,24 @@ func ListNotifications(ctx *context.APIContext) { // collectionFormat: multi // items: // type: string - // required: false + // - name: subject-type + // in: query + // description: "filter notifications by subject type" + // type: array + // collectionFormat: multi + // items: + // type: string + // enum: [issue,pull,commit,repository] // - name: since // in: query // description: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format // type: string // format: date-time - // required: false // - name: before // in: query // description: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format // type: string // format: date-time - // required: false // - name: page // in: query // description: page number of results to return (1-based) @@ -61,22 +63,17 @@ func ListNotifications(ctx *context.APIContext) { // responses: // "200": // "$ref": "#/responses/NotificationThreadList" - - before, since, err := utils.GetQueryBeforeSince(ctx) - if err != nil { - ctx.Error(http.StatusUnprocessableEntity, "GetQueryBeforeSince", err) + opts := getFindNotificationOptions(ctx) + if ctx.Written() { return } - opts := models.FindNotificationOptions{ - ListOptions: utils.GetListOptions(ctx), - UserID: ctx.User.ID, - UpdatedBeforeUnix: before, - UpdatedAfterUnix: since, - } - if !ctx.QueryBool("all") { - statuses := ctx.QueryStrings("status-types") - opts.Status = statusStringsToNotificationStatuses(statuses, []string{"unread", "pinned"}) + + totalCount, err := models.CountNotifications(opts) + if err != nil { + ctx.InternalServerError(err) + return } + nl, err := models.GetNotifications(opts) if err != nil { ctx.InternalServerError(err) @@ -88,6 +85,7 @@ func ListNotifications(ctx *context.APIContext) { return } + ctx.SetTotalCountHeader(totalCount) ctx.JSON(http.StatusOK, convert.ToNotifications(nl)) } @@ -130,7 +128,7 @@ func ReadNotifications(ctx *context.APIContext) { // "$ref": "#/responses/empty" lastRead := int64(0) - qLastRead := strings.Trim(ctx.Query("last_read_at"), " ") + qLastRead := ctx.FormTrim("last_read_at") if len(qLastRead) > 0 { tmpLastRead, err := time.Parse(time.RFC3339, qLastRead) if err != nil { @@ -141,12 +139,12 @@ func ReadNotifications(ctx *context.APIContext) { lastRead = tmpLastRead.Unix() } } - opts := models.FindNotificationOptions{ + opts := &models.FindNotificationOptions{ UserID: ctx.User.ID, UpdatedBeforeUnix: lastRead, } - if !ctx.QueryBool("all") { - statuses := ctx.QueryStrings("status-types") + if !ctx.FormBool("all") { + statuses := ctx.FormStrings("status-types") opts.Status = statusStringsToNotificationStatuses(statuses, []string{"unread"}) } nl, err := models.GetNotifications(opts) @@ -155,7 +153,7 @@ func ReadNotifications(ctx *context.APIContext) { return } - targetStatus := statusStringToNotificationStatus(ctx.Query("to-status")) + targetStatus := statusStringToNotificationStatus(ctx.FormString("to-status")) if targetStatus == 0 { targetStatus = models.NotificationStatusRead } diff --git a/routers/api/v1/org/hook.go b/routers/api/v1/org/hook.go index cce959bb4..c5982300e 100644 --- a/routers/api/v1/org/hook.go +++ b/routers/api/v1/org/hook.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -39,16 +40,29 @@ func ListHooks(ctx *context.APIContext) { // "200": // "$ref": "#/responses/HookList" - org := ctx.Org.Organization - orgHooks, err := models.GetWebhooksByOrgID(org.ID, utils.GetListOptions(ctx)) + opts := &models.ListWebhookOptions{ + ListOptions: utils.GetListOptions(ctx), + OrgID: ctx.Org.Organization.ID, + } + + count, err := models.CountWebhooksByOpts(opts) if err != nil { - ctx.Error(http.StatusInternalServerError, "GetWebhooksByOrgID", err) + ctx.InternalServerError(err) return } + + orgHooks, err := models.ListWebhooksByOpts(opts) + if err != nil { + ctx.InternalServerError(err) + return + } + hooks := make([]*api.Hook, len(orgHooks)) for i, hook := range orgHooks { - hooks[i] = convert.ToHook(org.HomeLink(), hook) + hooks[i] = convert.ToHook(ctx.Org.Organization.HomeLink(), hook) } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, hooks) } @@ -85,7 +99,7 @@ func GetHook(ctx *context.APIContext) { } // CreateHook create a hook for an organization -func CreateHook(ctx *context.APIContext, form api.CreateHookOption) { +func CreateHook(ctx *context.APIContext) { // swagger:operation POST /orgs/{org}/hooks/ organization orgCreateHook // --- // summary: Create a hook @@ -108,15 +122,16 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) { // "201": // "$ref": "#/responses/Hook" + form := web.GetForm(ctx).(*api.CreateHookOption) //TODO in body params - if !utils.CheckCreateHookOption(ctx, &form) { + if !utils.CheckCreateHookOption(ctx, form) { return } - utils.AddOrgHook(ctx, &form) + utils.AddOrgHook(ctx, form) } // EditHook modify a hook of a repository -func EditHook(ctx *context.APIContext, form api.EditHookOption) { +func EditHook(ctx *context.APIContext) { // swagger:operation PATCH /orgs/{org}/hooks/{id} organization orgEditHook // --- // summary: Update a hook @@ -144,9 +159,11 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) { // "200": // "$ref": "#/responses/Hook" + form := web.GetForm(ctx).(*api.EditHookOption) + //TODO in body params hookID := ctx.ParamsInt64(":id") - utils.EditOrgHook(ctx, &form, hookID) + utils.EditOrgHook(ctx, form, hookID) } // DeleteHook delete a hook of an organization diff --git a/routers/api/v1/org/label.go b/routers/api/v1/org/label.go index 9a8a4fa29..09acb0bf0 100644 --- a/routers/api/v1/org/label.go +++ b/routers/api/v1/org/label.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -42,17 +43,24 @@ func ListLabels(ctx *context.APIContext) { // "200": // "$ref": "#/responses/LabelList" - labels, err := models.GetLabelsByOrgID(ctx.Org.Organization.ID, ctx.Query("sort"), utils.GetListOptions(ctx)) + labels, err := models.GetLabelsByOrgID(ctx.Org.Organization.ID, ctx.FormString("sort"), utils.GetListOptions(ctx)) if err != nil { ctx.Error(http.StatusInternalServerError, "GetLabelsByOrgID", err) return } + count, err := models.CountLabelsByOrgID(ctx.Org.Organization.ID) + if err != nil { + ctx.InternalServerError(err) + return + } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, convert.ToLabelList(labels)) } // CreateLabel create a label for a repository -func CreateLabel(ctx *context.APIContext, form api.CreateLabelOption) { +func CreateLabel(ctx *context.APIContext) { // swagger:operation POST /orgs/{org}/labels organization orgCreateLabel // --- // summary: Create a label for an organization @@ -75,7 +83,7 @@ func CreateLabel(ctx *context.APIContext, form api.CreateLabelOption) { // "$ref": "#/responses/Label" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateLabelOption) form.Color = strings.Trim(form.Color, " ") if len(form.Color) == 6 { form.Color = "#" + form.Color @@ -144,7 +152,7 @@ func GetLabel(ctx *context.APIContext) { } // EditLabel modify a label for an Organization -func EditLabel(ctx *context.APIContext, form api.EditLabelOption) { +func EditLabel(ctx *context.APIContext) { // swagger:operation PATCH /orgs/{org}/labels/{id} organization orgEditLabel // --- // summary: Update a label @@ -173,7 +181,7 @@ func EditLabel(ctx *context.APIContext, form api.EditLabelOption) { // "$ref": "#/responses/Label" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.EditLabelOption) label, err := models.GetLabelInOrgByID(ctx.Org.Organization.ID, ctx.ParamsInt64(":id")) if err != nil { if models.IsErrOrgLabelNotExist(err) { diff --git a/routers/api/v1/org/member.go b/routers/api/v1/org/member.go index 75ae1191a..97940d592 100644 --- a/routers/api/v1/org/member.go +++ b/routers/api/v1/org/member.go @@ -5,7 +5,6 @@ package org import ( - "fmt" "net/http" "code.gitea.io/gitea/models" @@ -19,23 +18,30 @@ import ( // listMembers list an organization's members func listMembers(ctx *context.APIContext, publicOnly bool) { - var members []*models.User - - members, _, err := models.FindOrgMembers(&models.FindOrgMembersOpts{ + opts := &models.FindOrgMembersOpts{ OrgID: ctx.Org.Organization.ID, PublicOnly: publicOnly, ListOptions: utils.GetListOptions(ctx), - }) + } + + count, err := models.CountOrgMembers(opts) if err != nil { - ctx.Error(http.StatusInternalServerError, "GetUsersByIDs", err) + ctx.InternalServerError(err) + return + } + + members, _, err := models.FindOrgMembers(opts) + if err != nil { + ctx.InternalServerError(err) return } apiMembers := make([]*api.User, len(members)) for i, member := range members { - apiMembers[i] = convert.ToUser(member, ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin) + apiMembers[i] = convert.ToUser(member, ctx.User) } + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, apiMembers) } @@ -153,8 +159,7 @@ func IsMember(ctx *context.APIContext) { } } - redirectURL := fmt.Sprintf("%sapi/v1/orgs/%s/public_members/%s", - setting.AppURL, ctx.Org.Organization.Name, userToCheck.Name) + redirectURL := setting.AppURL + "api/v1/orgs/" + ctx.Org.Organization.Name + "/public_members/" + userToCheck.Name ctx.Redirect(redirectURL, 302) } diff --git a/routers/api/v1/org/org.go b/routers/api/v1/org/org.go index ca3e10173..cf4c328eb 100644 --- a/routers/api/v1/org/org.go +++ b/routers/api/v1/org/org.go @@ -6,13 +6,14 @@ package org import ( - "fmt" "net/http" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/user" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -27,18 +28,17 @@ func listUserOrgs(ctx *context.APIContext, u *models.User) { ctx.Error(http.StatusInternalServerError, "GetOrgsByUserID", err) return } - maxResults := len(orgs) - orgs = utils.PaginateUserSlice(orgs, listOptions.Page, listOptions.PageSize) + maxResults := len(orgs) + orgs, _ = util.PaginateSlice(orgs, listOptions.Page, listOptions.PageSize).([]*models.User) apiOrgs := make([]*api.Organization, len(orgs)) for i := range orgs { apiOrgs[i] = convert.ToOrganization(orgs[i]) } - ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetLinkHeader(maxResults, listOptions.PageSize) + ctx.SetTotalCountHeader(int64(maxResults)) ctx.JSON(http.StatusOK, &apiOrgs) } @@ -128,6 +128,7 @@ func GetAll(ctx *context.APIContext) { listOptions := utils.GetListOptions(ctx) publicOrgs, maxResults, err := models.SearchUsers(&models.SearchUserOptions{ + Actor: ctx.User, ListOptions: listOptions, Type: models.UserTypeOrganization, OrderBy: models.SearchOrderByAlphabetically, @@ -143,13 +144,12 @@ func GetAll(ctx *context.APIContext) { } ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, &orgs) } // Create api for create organization -func Create(ctx *context.APIContext, form api.CreateOrgOption) { +func Create(ctx *context.APIContext) { // swagger:operation POST /orgs organization orgCreate // --- // summary: Create an organization @@ -169,7 +169,7 @@ func Create(ctx *context.APIContext, form api.CreateOrgOption) { // "$ref": "#/responses/forbidden" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateOrgOption) if !ctx.User.CanCreateOrganization() { ctx.Error(http.StatusForbidden, "Create organization not allowed", nil) return @@ -223,15 +223,15 @@ func Get(ctx *context.APIContext) { // "200": // "$ref": "#/responses/Organization" - if !models.HasOrgVisible(ctx.Org.Organization, ctx.User) { - ctx.NotFound("HasOrgVisible", nil) + if !models.HasOrgOrUserVisible(ctx.Org.Organization, ctx.User) { + ctx.NotFound("HasOrgOrUserVisible", nil) return } ctx.JSON(http.StatusOK, convert.ToOrganization(ctx.Org.Organization)) } // Edit change an organization's information -func Edit(ctx *context.APIContext, form api.EditOrgOption) { +func Edit(ctx *context.APIContext) { // swagger:operation PATCH /orgs/{org} organization orgEdit // --- // summary: Edit an organization @@ -253,7 +253,7 @@ func Edit(ctx *context.APIContext, form api.EditOrgOption) { // responses: // "200": // "$ref": "#/responses/Organization" - + form := web.GetForm(ctx).(*api.EditOrgOption) org := ctx.Org.Organization org.FullName = form.FullName org.Description = form.Description @@ -262,7 +262,13 @@ func Edit(ctx *context.APIContext, form api.EditOrgOption) { if form.Visibility != "" { org.Visibility = api.VisibilityModes[form.Visibility] } - if err := models.UpdateUserCols(org, "full_name", "description", "website", "location", "visibility"); err != nil { + if form.RepoAdminChangeTeamAccess != nil { + org.RepoAdminChangeTeamAccess = *form.RepoAdminChangeTeamAccess + } + if err := models.UpdateUserCols(org, + "full_name", "description", "website", "location", + "visibility", "repo_admin_change_team_access", + ); err != nil { ctx.Error(http.StatusInternalServerError, "EditOrganization", err) return } diff --git a/routers/api/v1/org/team.go b/routers/api/v1/org/team.go index 72387dcbf..a84763d6f 100644 --- a/routers/api/v1/org/team.go +++ b/routers/api/v1/org/team.go @@ -6,15 +6,14 @@ package org import ( - "fmt" "net/http" - "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/user" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -44,23 +43,27 @@ func ListTeams(ctx *context.APIContext) { // "200": // "$ref": "#/responses/TeamList" - org := ctx.Org.Organization - if err := org.GetTeams(&models.SearchTeamOptions{ + teams, count, err := models.SearchTeam(&models.SearchTeamOptions{ ListOptions: utils.GetListOptions(ctx), - }); err != nil { - ctx.Error(http.StatusInternalServerError, "GetTeams", err) + OrgID: ctx.Org.Organization.ID, + }) + + if err != nil { + ctx.Error(http.StatusInternalServerError, "LoadTeams", err) return } - apiTeams := make([]*api.Team, len(org.Teams)) - for i := range org.Teams { - if err := org.Teams[i].GetUnits(); err != nil { + apiTeams := make([]*api.Team, len(teams)) + for i := range teams { + if err := teams[i].GetUnits(); err != nil { ctx.Error(http.StatusInternalServerError, "GetUnits", err) return } - apiTeams[i] = convert.ToTeam(org.Teams[i]) + apiTeams[i] = convert.ToTeam(teams[i]) } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, apiTeams) } @@ -84,7 +87,10 @@ func ListUserTeams(ctx *context.APIContext) { // "200": // "$ref": "#/responses/TeamList" - teams, err := models.GetUserTeams(ctx.User.ID, utils.GetListOptions(ctx)) + teams, count, err := models.SearchTeam(&models.SearchTeamOptions{ + ListOptions: utils.GetListOptions(ctx), + UserID: ctx.User.ID, + }) if err != nil { ctx.Error(http.StatusInternalServerError, "GetUserTeams", err) return @@ -106,6 +112,8 @@ func ListUserTeams(ctx *context.APIContext) { apiTeams[i] = convert.ToTeam(teams[i]) apiTeams[i].Organization = apiOrg } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, apiTeams) } @@ -131,7 +139,7 @@ func GetTeam(ctx *context.APIContext) { } // CreateTeam api for create a team -func CreateTeam(ctx *context.APIContext, form api.CreateTeamOption) { +func CreateTeam(ctx *context.APIContext) { // swagger:operation POST /orgs/{org}/teams organization orgCreateTeam // --- // summary: Create a team @@ -154,7 +162,7 @@ func CreateTeam(ctx *context.APIContext, form api.CreateTeamOption) { // "$ref": "#/responses/Team" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateTeamOption) team := &models.Team{ OrgID: ctx.Org.Organization.ID, Name: form.Name, @@ -190,7 +198,7 @@ func CreateTeam(ctx *context.APIContext, form api.CreateTeamOption) { } // EditTeam api for edit a team -func EditTeam(ctx *context.APIContext, form api.EditTeamOption) { +func EditTeam(ctx *context.APIContext) { // swagger:operation PATCH /teams/{id} organization orgEditTeam // --- // summary: Edit a team @@ -212,6 +220,8 @@ func EditTeam(ctx *context.APIContext, form api.EditTeamOption) { // "200": // "$ref": "#/responses/Team" + form := web.GetForm(ctx).(*api.EditTeamOption) + team := ctx.Org.Team if err := team.GetUnits(); err != nil { ctx.InternalServerError(err) @@ -325,17 +335,19 @@ func GetTeamMembers(ctx *context.APIContext) { ctx.NotFound() return } - team := ctx.Org.Team - if err := team.GetMembers(&models.SearchMembersOptions{ + + if err := ctx.Org.Team.GetMembers(&models.SearchMembersOptions{ ListOptions: utils.GetListOptions(ctx), }); err != nil { ctx.Error(http.StatusInternalServerError, "GetTeamMembers", err) return } - members := make([]*api.User, len(team.Members)) - for i, member := range team.Members { - members[i] = convert.ToUser(member, ctx.IsSigned, ctx.User.IsAdmin) + members := make([]*api.User, len(ctx.Org.Team.Members)) + for i, member := range ctx.Org.Team.Members { + members[i] = convert.ToUser(member, ctx.User) } + + ctx.SetTotalCountHeader(int64(ctx.Org.Team.NumMembers)) ctx.JSON(http.StatusOK, members) } @@ -377,7 +389,7 @@ func GetTeamMember(ctx *context.APIContext) { ctx.NotFound() return } - ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.IsSigned, ctx.User.IsAdmin)) + ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.User)) } // AddTeamMember api for add a member to a team @@ -655,9 +667,9 @@ func SearchTeam(ctx *context.APIContext) { opts := &models.SearchTeamOptions{ UserID: ctx.User.ID, - Keyword: strings.TrimSpace(ctx.Query("q")), + Keyword: ctx.FormTrim("q"), OrgID: ctx.Org.Organization.ID, - IncludeDesc: (ctx.Query("include_desc") == "" || ctx.QueryBool("include_desc")), + IncludeDesc: ctx.FormString("include_desc") == "" || ctx.FormBool("include_desc"), ListOptions: listOptions, } @@ -685,8 +697,7 @@ func SearchTeam(ctx *context.APIContext) { } ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, map[string]interface{}{ "ok": true, "data": apiTeams, diff --git a/routers/api/v1/repo/branch.go b/routers/api/v1/repo/branch.go index 9a0a552ba..8653b0bc8 100644 --- a/routers/api/v1/repo/branch.go +++ b/routers/api/v1/repo/branch.go @@ -6,6 +6,7 @@ package repo import ( + "errors" "fmt" "net/http" @@ -13,9 +14,10 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/log" repo_module "code.gitea.io/gitea/modules/repository" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/api/v1/utils" pull_service "code.gitea.io/gitea/services/pull" repo_service "code.gitea.io/gitea/services/repository" ) @@ -115,67 +117,25 @@ func DeleteBranch(ctx *context.APIContext) { branchName := ctx.Params("*") - if ctx.Repo.Repository.DefaultBranch == branchName { - ctx.Error(http.StatusForbidden, "DefaultBranch", fmt.Errorf("can not delete default branch")) - return - } - - isProtected, err := ctx.Repo.Repository.IsProtectedBranch(branchName, ctx.User) - if err != nil { - ctx.InternalServerError(err) - return - } - if isProtected { - ctx.Error(http.StatusForbidden, "IsProtectedBranch", fmt.Errorf("branch protected")) - return - } - - branch, err := repo_module.GetBranch(ctx.Repo.Repository, branchName) - if err != nil { - if git.IsErrBranchNotExist(err) { + if err := repo_service.DeleteBranch(ctx.User, ctx.Repo.Repository, ctx.Repo.GitRepo, branchName); err != nil { + switch { + case git.IsErrBranchNotExist(err): ctx.NotFound(err) - } else { - ctx.Error(http.StatusInternalServerError, "GetBranch", err) + case errors.Is(err, repo_service.ErrBranchIsDefault): + ctx.Error(http.StatusForbidden, "DefaultBranch", fmt.Errorf("can not delete default branch")) + case errors.Is(err, repo_service.ErrBranchIsProtected): + ctx.Error(http.StatusForbidden, "IsProtectedBranch", fmt.Errorf("branch protected")) + default: + ctx.Error(http.StatusInternalServerError, "DeleteBranch", err) } return } - c, err := branch.GetCommit() - if err != nil { - ctx.Error(http.StatusInternalServerError, "GetCommit", err) - return - } - - if err := ctx.Repo.GitRepo.DeleteBranch(branchName, git.DeleteBranchOptions{ - Force: true, - }); err != nil { - ctx.Error(http.StatusInternalServerError, "DeleteBranch", err) - return - } - - // Don't return error below this - if err := repo_service.PushUpdate( - &repo_module.PushUpdateOptions{ - RefFullName: git.BranchPrefix + branchName, - OldCommitID: c.ID.String(), - NewCommitID: git.EmptySHA, - PusherID: ctx.User.ID, - PusherName: ctx.User.Name, - RepoUserName: ctx.Repo.Owner.Name, - RepoName: ctx.Repo.Repository.Name, - }); err != nil { - log.Error("Update: %v", err) - } - - if err := ctx.Repo.Repository.AddDeletedBranch(branchName, c.ID.String(), ctx.User.ID); err != nil { - log.Warn("AddDeletedBranch: %v", err) - } - ctx.Status(http.StatusNoContent) } // CreateBranch creates a branch for a user's repository -func CreateBranch(ctx *context.APIContext, opt api.CreateBranchRepoOption) { +func CreateBranch(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/branches repository repoCreateBranch // --- // summary: Create a branch @@ -206,6 +166,7 @@ func CreateBranch(ctx *context.APIContext, opt api.CreateBranchRepoOption) { // "409": // description: The branch with the same name already exists. + opt := web.GetForm(ctx).(*api.CreateBranchRepoOption) if ctx.Repo.Repository.IsEmpty { ctx.Error(http.StatusNotFound, "", "Git Repository is empty.") return @@ -282,11 +243,21 @@ func ListBranches(ctx *context.APIContext) { // description: name of the repo // type: string // required: true + // - name: page + // in: query + // description: page number of results to return (1-based) + // type: integer + // - name: limit + // in: query + // description: page size of results + // type: integer // responses: // "200": // "$ref": "#/responses/BranchList" - branches, err := repo_module.GetBranches(ctx.Repo.Repository) + listOptions := utils.GetListOptions(ctx) + skip, _ := listOptions.GetStartEnd() + branches, totalNumOfBranches, err := repo_module.GetBranches(ctx.Repo.Repository, skip, listOptions.PageSize) if err != nil { ctx.Error(http.StatusInternalServerError, "GetBranches", err) return @@ -311,6 +282,8 @@ func ListBranches(ctx *context.APIContext) { } } + ctx.SetLinkHeader(totalNumOfBranches, listOptions.PageSize) + ctx.SetTotalCountHeader(int64(totalNumOfBranches)) ctx.JSON(http.StatusOK, &apiBranches) } @@ -395,7 +368,7 @@ func ListBranchProtections(ctx *context.APIContext) { } // CreateBranchProtection creates a branch protection for a repo -func CreateBranchProtection(ctx *context.APIContext, form api.CreateBranchProtectionOption) { +func CreateBranchProtection(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/branch_protections repository repoCreateBranchProtection // --- // summary: Create a branch protections for a repository @@ -428,6 +401,7 @@ func CreateBranchProtection(ctx *context.APIContext, form api.CreateBranchProtec // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.CreateBranchProtectionOption) repo := ctx.Repo.Repository // Currently protection must match an actual branch @@ -561,7 +535,7 @@ func CreateBranchProtection(ctx *context.APIContext, form api.CreateBranchProtec } // EditBranchProtection edits a branch protection for a repo -func EditBranchProtection(ctx *context.APIContext, form api.EditBranchProtectionOption) { +func EditBranchProtection(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/branch_protections/{name} repository repoEditBranchProtection // --- // summary: Edit a branch protections for a repository. Only fields that are set will be changed @@ -596,7 +570,7 @@ func EditBranchProtection(ctx *context.APIContext, form api.EditBranchProtection // "$ref": "#/responses/notFound" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.EditBranchProtectionOption) repo := ctx.Repo.Repository bpName := ctx.Params(":name") protectBranch, err := models.GetProtectedBranchBy(repo.ID, bpName) diff --git a/routers/api/v1/repo/collaborators.go b/routers/api/v1/repo/collaborators.go index 497255a47..d636220f6 100644 --- a/routers/api/v1/repo/collaborators.go +++ b/routers/api/v1/repo/collaborators.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -46,15 +47,24 @@ func ListCollaborators(ctx *context.APIContext) { // "200": // "$ref": "#/responses/UserList" + count, err := ctx.Repo.Repository.CountCollaborators() + if err != nil { + ctx.InternalServerError(err) + return + } + collaborators, err := ctx.Repo.Repository.GetCollaborators(utils.GetListOptions(ctx)) if err != nil { ctx.Error(http.StatusInternalServerError, "ListCollaborators", err) return } + users := make([]*api.User, len(collaborators)) for i, collaborator := range collaborators { - users[i] = convert.ToUser(collaborator.User, ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin) + users[i] = convert.ToUser(collaborator.User, ctx.User) } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, users) } @@ -111,7 +121,7 @@ func IsCollaborator(ctx *context.APIContext) { } // AddCollaborator add a collaborator to a repository -func AddCollaborator(ctx *context.APIContext, form api.AddCollaboratorOption) { +func AddCollaborator(ctx *context.APIContext) { // swagger:operation PUT /repos/{owner}/{repo}/collaborators/{collaborator} repository repoAddCollaborator // --- // summary: Add a collaborator to a repository @@ -143,6 +153,8 @@ func AddCollaborator(ctx *context.APIContext, form api.AddCollaboratorOption) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.AddCollaboratorOption) + collaborator, err := models.GetUserByName(ctx.Params(":collaborator")) if err != nil { if models.IsErrUserNotExist(err) { @@ -218,3 +230,63 @@ func DeleteCollaborator(ctx *context.APIContext) { } ctx.Status(http.StatusNoContent) } + +// GetReviewers return all users that can be requested to review in this repo +func GetReviewers(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/reviewers repository repoGetReviewers + // --- + // summary: Return all users that can be requested to review in this repo + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/UserList" + + reviewers, err := ctx.Repo.Repository.GetReviewers(ctx.User.ID, 0) + if err != nil { + ctx.Error(http.StatusInternalServerError, "ListCollaborators", err) + return + } + ctx.JSON(http.StatusOK, convert.ToUsers(ctx.User, reviewers)) +} + +// GetAssignees return all users that have write access and can be assigned to issues +func GetAssignees(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/assignees repository repoGetAssignees + // --- + // summary: Return all users that have write access and can be assigned to issues + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/UserList" + + assignees, err := ctx.Repo.Repository.GetAssignees() + if err != nil { + ctx.Error(http.StatusInternalServerError, "ListCollaborators", err) + return + } + ctx.JSON(http.StatusOK, convert.ToUsers(ctx.User, assignees)) +} diff --git a/routers/api/v1/repo/commits.go b/routers/api/v1/repo/commits.go index 8c877285a..975b9cab2 100644 --- a/routers/api/v1/repo/commits.go +++ b/routers/api/v1/repo/commits.go @@ -69,7 +69,11 @@ func getCommit(ctx *context.APIContext, identifier string) { defer gitRepo.Close() commit, err := gitRepo.GetCommit(identifier) if err != nil { - ctx.NotFoundOrServerError("GetCommit", git.IsErrNotExist, err) + if git.IsErrNotExist(err) { + ctx.NotFound(identifier) + return + } + ctx.Error(http.StatusInternalServerError, "gitRepo.GetCommit", err) return } @@ -139,11 +143,11 @@ func GetAllCommits(ctx *context.APIContext) { listOptions.Page = 1 } - if listOptions.PageSize > git.CommitsRangeSize { - listOptions.PageSize = git.CommitsRangeSize + if listOptions.PageSize > setting.Git.CommitsRangeSize { + listOptions.PageSize = setting.Git.CommitsRangeSize } - sha := ctx.Query("sha") + sha := ctx.FormString("sha") var baseCommit *git.Commit if len(sha) == 0 { @@ -186,32 +190,26 @@ func GetAllCommits(ctx *context.APIContext) { userCache := make(map[string]*models.User) - apiCommits := make([]*api.Commit, commits.Len()) - - i := 0 - for commitPointer := commits.Front(); commitPointer != nil; commitPointer = commitPointer.Next() { - commit := commitPointer.Value.(*git.Commit) - + apiCommits := make([]*api.Commit, len(commits)) + for i, commit := range commits { // Create json struct apiCommits[i], err = convert.ToCommit(ctx.Repo.Repository, commit, userCache) if err != nil { ctx.Error(http.StatusInternalServerError, "toCommit", err) return } - - i++ } + ctx.SetLinkHeader(int(commitsCountTotal), listOptions.PageSize) + ctx.SetTotalCountHeader(commitsCountTotal) + // kept for backwards compatibility ctx.Header().Set("X-Page", strconv.Itoa(listOptions.Page)) ctx.Header().Set("X-PerPage", strconv.Itoa(listOptions.PageSize)) ctx.Header().Set("X-Total", strconv.FormatInt(commitsCountTotal, 10)) ctx.Header().Set("X-PageCount", strconv.Itoa(pageCount)) ctx.Header().Set("X-HasMore", strconv.FormatBool(listOptions.Page < pageCount)) - - ctx.SetLinkHeader(int(commitsCountTotal), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", commitsCountTotal)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, X-PerPage, X-Total, X-PageCount, X-HasMore, Link") + ctx.AppendAccessControlExposeHeaders("X-Page", "X-PerPage", "X-Total", "X-PageCount", "X-HasMore") ctx.JSON(http.StatusOK, &apiCommits) } diff --git a/routers/api/v1/repo/file.go b/routers/api/v1/repo/file.go index bc85fec63..2b14d1a93 100644 --- a/routers/api/v1/repo/file.go +++ b/routers/api/v1/repo/file.go @@ -16,7 +16,9 @@ import ( "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/repofiles" api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/routers/repo" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/common" + "code.gitea.io/gitea/routers/web/repo" ) // GetRawFile get a file by path on a repository @@ -42,6 +44,11 @@ func GetRawFile(ctx *context.APIContext) { // description: filepath of the file to get // type: string // required: true + // - name: ref + // in: query + // description: "The name of the commit/branch/tag. Default the repository’s default branch (usually master)" + // type: string + // required: false // responses: // 200: // description: success @@ -53,7 +60,22 @@ func GetRawFile(ctx *context.APIContext) { return } - blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreePath) + commit := ctx.Repo.Commit + + if ref := ctx.FormTrim("ref"); len(ref) > 0 { + var err error + commit, err = ctx.Repo.GitRepo.GetCommit(ref) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound() + } else { + ctx.Error(http.StatusInternalServerError, "GetBlobByPath", err) + } + return + } + } + + blob, err := commit.GetBlobByPath(ctx.Repo.TreePath) if err != nil { if git.IsErrNotExist(err) { ctx.NotFound() @@ -62,7 +84,7 @@ func GetRawFile(ctx *context.APIContext) { } return } - if err = repo.ServeBlob(ctx.Context, blob); err != nil { + if err = common.ServeBlob(ctx.Context, blob); err != nil { ctx.Error(http.StatusInternalServerError, "ServeBlob", err) } } @@ -167,7 +189,7 @@ func canReadFiles(r *context.Repository) bool { } // CreateFile handles API call for creating a file -func CreateFile(ctx *context.APIContext, apiOpts api.CreateFileOptions) { +func CreateFile(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/contents/{filepath} repository repoCreateFile // --- // summary: Create a file in a repository @@ -206,6 +228,7 @@ func CreateFile(ctx *context.APIContext, apiOpts api.CreateFileOptions) { // "422": // "$ref": "#/responses/error" + apiOpts := web.GetForm(ctx).(*api.CreateFileOptions) if ctx.Repo.Repository.IsEmpty { ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty")) } @@ -233,6 +256,7 @@ func CreateFile(ctx *context.APIContext, apiOpts api.CreateFileOptions) { Author: apiOpts.Dates.Author, Committer: apiOpts.Dates.Committer, }, + Signoff: apiOpts.Signoff, } if opts.Dates.Author.IsZero() { opts.Dates.Author = time.Now() @@ -253,7 +277,7 @@ func CreateFile(ctx *context.APIContext, apiOpts api.CreateFileOptions) { } // UpdateFile handles API call for updating a file -func UpdateFile(ctx *context.APIContext, apiOpts api.UpdateFileOptions) { +func UpdateFile(ctx *context.APIContext) { // swagger:operation PUT /repos/{owner}/{repo}/contents/{filepath} repository repoUpdateFile // --- // summary: Update a file in a repository @@ -291,7 +315,7 @@ func UpdateFile(ctx *context.APIContext, apiOpts api.UpdateFileOptions) { // "$ref": "#/responses/notFound" // "422": // "$ref": "#/responses/error" - + apiOpts := web.GetForm(ctx).(*api.UpdateFileOptions) if ctx.Repo.Repository.IsEmpty { ctx.Error(http.StatusUnprocessableEntity, "RepoIsEmpty", fmt.Errorf("repo is empty")) } @@ -321,6 +345,7 @@ func UpdateFile(ctx *context.APIContext, apiOpts api.UpdateFileOptions) { Author: apiOpts.Dates.Author, Committer: apiOpts.Dates.Committer, }, + Signoff: apiOpts.Signoff, } if opts.Dates.Author.IsZero() { opts.Dates.Author = time.Now() @@ -377,7 +402,7 @@ func createOrUpdateFile(ctx *context.APIContext, opts *repofiles.UpdateRepoFileO } // DeleteFile Delete a fle in a repository -func DeleteFile(ctx *context.APIContext, apiOpts api.DeleteFileOptions) { +func DeleteFile(ctx *context.APIContext) { // swagger:operation DELETE /repos/{owner}/{repo}/contents/{filepath} repository repoDeleteFile // --- // summary: Delete a file in a repository @@ -416,6 +441,7 @@ func DeleteFile(ctx *context.APIContext, apiOpts api.DeleteFileOptions) { // "404": // "$ref": "#/responses/error" + apiOpts := web.GetForm(ctx).(*api.DeleteFileOptions) if !canWriteFiles(ctx.Repo) { ctx.Error(http.StatusForbidden, "DeleteFile", models.ErrUserDoesNotHaveAccessToRepo{ UserID: ctx.User.ID, @@ -446,6 +472,7 @@ func DeleteFile(ctx *context.APIContext, apiOpts api.DeleteFileOptions) { Author: apiOpts.Dates.Author, Committer: apiOpts.Dates.Committer, }, + Signoff: apiOpts.Signoff, } if opts.Dates.Author.IsZero() { opts.Dates.Author = time.Now() @@ -522,7 +549,7 @@ func GetContents(ctx *context.APIContext) { } treePath := ctx.Params("*") - ref := ctx.QueryTrim("ref") + ref := ctx.FormTrim("ref") if fileList, err := repofiles.GetContentsOrList(ctx.Repo.Repository, treePath, ref); err != nil { if git.IsErrNotExist(err) { diff --git a/routers/api/v1/repo/fork.go b/routers/api/v1/repo/fork.go index 24700f7a7..b3504faad 100644 --- a/routers/api/v1/repo/fork.go +++ b/routers/api/v1/repo/fork.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" repo_service "code.gitea.io/gitea/services/repository" ) @@ -61,11 +62,13 @@ func ListForks(ctx *context.APIContext) { } apiForks[i] = convert.ToRepo(fork, access) } + + ctx.SetTotalCountHeader(int64(ctx.Repo.Repository.NumForks)) ctx.JSON(http.StatusOK, apiForks) } // CreateFork create a fork of a repo -func CreateFork(ctx *context.APIContext, form api.CreateForkOption) { +func CreateFork(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/forks repository createFork // --- // summary: Fork a repository @@ -94,6 +97,7 @@ func CreateFork(ctx *context.APIContext, form api.CreateForkOption) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.CreateForkOption) repo := ctx.Repo.Repository var forker *models.User // user/org that will own the fork if form.Organization == nil { @@ -119,7 +123,11 @@ func CreateFork(ctx *context.APIContext, form api.CreateForkOption) { forker = org } - fork, err := repo_service.ForkRepository(ctx.User, forker, repo, repo.Name, repo.Description) + fork, err := repo_service.ForkRepository(ctx.User, forker, models.ForkRepoOptions{ + BaseRepo: repo, + Name: repo.Name, + Description: repo.Description, + }) if err != nil { ctx.Error(http.StatusInternalServerError, "ForkRepository", err) return diff --git a/routers/api/v1/repo/git_hook.go b/routers/api/v1/repo/git_hook.go index 0c538ac6b..0b4e09cad 100644 --- a/routers/api/v1/repo/git_hook.go +++ b/routers/api/v1/repo/git_hook.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" ) // ListGitHooks list all Git hooks of a repository @@ -91,7 +92,7 @@ func GetGitHook(ctx *context.APIContext) { } // EditGitHook modify a Git hook of a repository -func EditGitHook(ctx *context.APIContext, form api.EditGitHookOption) { +func EditGitHook(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/hooks/git/{id} repository repoEditGitHook // --- // summary: Edit a Git hook in a repository @@ -123,6 +124,7 @@ func EditGitHook(ctx *context.APIContext, form api.EditGitHookOption) { // "404": // "$ref": "#/responses/notFound" + form := web.GetForm(ctx).(*api.EditGitHookOption) hookID := ctx.Params(":id") hook, err := ctx.Repo.GitRepo.GetHook(hookID) if err != nil { diff --git a/routers/api/v1/repo/git_ref.go b/routers/api/v1/repo/git_ref.go index bd43ad4fc..e304e0674 100644 --- a/routers/api/v1/repo/git_ref.go +++ b/routers/api/v1/repo/git_ref.go @@ -8,8 +8,8 @@ import ( "net/http" "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/routers/api/v1/utils" ) // GetGitAllRefs get ref or an list all the refs of a repository @@ -73,22 +73,8 @@ func GetGitRefs(ctx *context.APIContext) { getGitRefsInternal(ctx, ctx.Params("*")) } -func getGitRefs(ctx *context.APIContext, filter string) ([]*git.Reference, string, error) { - gitRepo, err := git.OpenRepository(ctx.Repo.Repository.RepoPath()) - if err != nil { - return nil, "OpenRepository", err - } - defer gitRepo.Close() - - if len(filter) > 0 { - filter = "refs/" + filter - } - refs, err := gitRepo.GetRefsFiltered(filter) - return refs, "GetRefsFiltered", err -} - func getGitRefsInternal(ctx *context.APIContext, filter string) { - refs, lastMethodName, err := getGitRefs(ctx, filter) + refs, lastMethodName, err := utils.GetGitRefs(ctx, filter) if err != nil { ctx.Error(http.StatusInternalServerError, lastMethodName, err) return diff --git a/routers/api/v1/repo/hook.go b/routers/api/v1/repo/hook.go index 575b1fc48..74860fd72 100644 --- a/routers/api/v1/repo/hook.go +++ b/routers/api/v1/repo/hook.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" "code.gitea.io/gitea/services/webhook" ) @@ -47,9 +48,20 @@ func ListHooks(ctx *context.APIContext) { // "200": // "$ref": "#/responses/HookList" - hooks, err := models.GetWebhooksByRepoID(ctx.Repo.Repository.ID, utils.GetListOptions(ctx)) + opts := &models.ListWebhookOptions{ + ListOptions: utils.GetListOptions(ctx), + RepoID: ctx.Repo.Repository.ID, + } + + count, err := models.CountWebhooksByOpts(opts) if err != nil { - ctx.Error(http.StatusInternalServerError, "GetWebhooksByRepoID", err) + ctx.InternalServerError(err) + return + } + + hooks, err := models.ListWebhooksByOpts(opts) + if err != nil { + ctx.InternalServerError(err) return } @@ -57,6 +69,8 @@ func ListHooks(ctx *context.APIContext) { for i := range hooks { apiHooks[i] = convert.ToHook(ctx.Repo.RepoLink, hooks[i]) } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, &apiHooks) } @@ -139,16 +153,17 @@ func TestHook(ctx *context.APIContext) { return } + commit := convert.ToPayloadCommit(ctx.Repo.Repository, ctx.Repo.Commit) + if err := webhook.PrepareWebhook(hook, ctx.Repo.Repository, models.HookEventPush, &api.PushPayload{ - Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch, - Before: ctx.Repo.Commit.ID.String(), - After: ctx.Repo.Commit.ID.String(), - Commits: []*api.PayloadCommit{ - convert.ToPayloadCommit(ctx.Repo.Repository, ctx.Repo.Commit), - }, - Repo: convert.ToRepo(ctx.Repo.Repository, models.AccessModeNone), - Pusher: convert.ToUser(ctx.User, ctx.IsSigned, false), - Sender: convert.ToUser(ctx.User, ctx.IsSigned, false), + Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch, + Before: ctx.Repo.Commit.ID.String(), + After: ctx.Repo.Commit.ID.String(), + Commits: []*api.PayloadCommit{commit}, + HeadCommit: commit, + Repo: convert.ToRepo(ctx.Repo.Repository, models.AccessModeNone), + Pusher: convert.ToUserWithAccessMode(ctx.User, models.AccessModeNone), + Sender: convert.ToUserWithAccessMode(ctx.User, models.AccessModeNone), }); err != nil { ctx.Error(http.StatusInternalServerError, "PrepareWebhook: ", err) return @@ -158,7 +173,7 @@ func TestHook(ctx *context.APIContext) { } // CreateHook create a hook for a repository -func CreateHook(ctx *context.APIContext, form api.CreateHookOption) { +func CreateHook(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/hooks repository repoCreateHook // --- // summary: Create a hook @@ -184,14 +199,16 @@ func CreateHook(ctx *context.APIContext, form api.CreateHookOption) { // responses: // "201": // "$ref": "#/responses/Hook" - if !utils.CheckCreateHookOption(ctx, &form) { + form := web.GetForm(ctx).(*api.CreateHookOption) + + if !utils.CheckCreateHookOption(ctx, form) { return } - utils.AddRepoHook(ctx, &form) + utils.AddRepoHook(ctx, form) } // EditHook modify a hook of a repository -func EditHook(ctx *context.APIContext, form api.EditHookOption) { +func EditHook(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/hooks/{id} repository repoEditHook // --- // summary: Edit a hook in a repository @@ -221,8 +238,9 @@ func EditHook(ctx *context.APIContext, form api.EditHookOption) { // responses: // "200": // "$ref": "#/responses/Hook" + form := web.GetForm(ctx).(*api.EditHookOption) hookID := ctx.ParamsInt64(":id") - utils.EditRepoHook(ctx, &form, hookID) + utils.EditRepoHook(ctx, form, hookID) } // DeleteHook delete a hook of a repository diff --git a/routers/api/v1/repo/issue.go b/routers/api/v1/repo/issue.go index 25153ad50..e8ef2f3d0 100644 --- a/routers/api/v1/repo/issue.go +++ b/routers/api/v1/repo/issue.go @@ -16,12 +16,12 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" issue_indexer "code.gitea.io/gitea/modules/indexer/issues" - "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" issue_service "code.gitea.io/gitea/services/issue" ) @@ -42,6 +42,10 @@ func SearchIssues(ctx *context.APIContext) { // in: query // description: comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded // type: string + // - name: milestones + // in: query + // description: comma separated list of milestone names. Fetch only issues that have any of this milestones. Non existent are discarded + // type: string // - name: q // in: query // description: search string @@ -79,6 +83,18 @@ func SearchIssues(ctx *context.APIContext) { // in: query // description: filter (issues / pulls) mentioning you, default is false // type: boolean + // - name: review_requested + // in: query + // description: filter pulls requesting your review, default is false + // type: boolean + // - name: owner + // in: query + // description: filter by owner + // type: string + // - name: team + // in: query + // description: filter by team (requires organization owner parameter to be provided) + // type: string // - name: page // in: query // description: page number of results to return (1-based) @@ -98,7 +114,7 @@ func SearchIssues(ctx *context.APIContext) { } var isClosed util.OptionalBool - switch ctx.Query("state") { + switch ctx.FormString("state") { case "closed": isClosed = util.OptionalBoolTrue case "all": @@ -108,11 +124,7 @@ func SearchIssues(ctx *context.APIContext) { } // find repos user can access (for issue search) - repoIDs := make([]int64, 0) opts := &models.SearchRepoOptions{ - ListOptions: models.ListOptions{ - PageSize: 15, - }, Private: false, AllPublic: true, TopicOnly: false, @@ -126,33 +138,52 @@ func SearchIssues(ctx *context.APIContext) { opts.Private = true opts.AllLimited = true } - - for page := 1; ; page++ { - opts.Page = page - repos, count, err := models.SearchRepositoryByName(opts) + if ctx.FormString("owner") != "" { + owner, err := models.GetUserByName(ctx.FormString("owner")) if err != nil { - ctx.Error(http.StatusInternalServerError, "SearchRepositoryByName", err) + if models.IsErrUserNotExist(err) { + ctx.Error(http.StatusBadRequest, "Owner not found", err) + } else { + ctx.Error(http.StatusInternalServerError, "GetUserByName", err) + } return } + opts.OwnerID = owner.ID + opts.AllLimited = false + opts.AllPublic = false + opts.Collaborate = util.OptionalBoolFalse + } + if ctx.FormString("team") != "" { + if ctx.FormString("owner") == "" { + ctx.Error(http.StatusBadRequest, "", "Owner organisation is required for filtering on team") + return + } + team, err := models.GetTeam(opts.OwnerID, ctx.FormString("team")) + if err != nil { + if models.IsErrTeamNotExist(err) { + ctx.Error(http.StatusBadRequest, "Team not found", err) + } else { + ctx.Error(http.StatusInternalServerError, "GetUserByName", err) + } + return + } + opts.TeamID = team.ID + } - if len(repos) == 0 { - break - } - log.Trace("Processing next %d repos of %d", len(repos), count) - for _, repo := range repos { - repoIDs = append(repoIDs, repo.ID) - } + repoIDs, _, err := models.SearchRepositoryIDs(opts) + if err != nil { + ctx.Error(http.StatusInternalServerError, "SearchRepositoryByName", err) + return } var issues []*models.Issue var filteredCount int64 - keyword := strings.Trim(ctx.Query("q"), " ") + keyword := ctx.FormTrim("q") if strings.IndexByte(keyword, 0) >= 0 { keyword = "" } var issueIDs []int64 - var labelIDs []int64 if len(keyword) > 0 && len(repoIDs) > 0 { if issueIDs, err = issue_indexer.SearchIssuesByKeyword(repoIDs, keyword); err != nil { ctx.Error(http.StatusInternalServerError, "SearchIssuesByKeyword", err) @@ -161,7 +192,7 @@ func SearchIssues(ctx *context.APIContext) { } var isPull util.OptionalBool - switch ctx.Query("type") { + switch ctx.FormString("type") { case "pulls": isPull = util.OptionalBoolTrue case "issues": @@ -170,15 +201,21 @@ func SearchIssues(ctx *context.APIContext) { isPull = util.OptionalBoolNone } - labels := strings.TrimSpace(ctx.Query("labels")) + labels := ctx.FormTrim("labels") var includedLabelNames []string if len(labels) > 0 { includedLabelNames = strings.Split(labels, ",") } + milestones := ctx.FormTrim("milestones") + var includedMilestones []string + if len(milestones) > 0 { + includedMilestones = strings.Split(milestones, ",") + } + // this api is also used in UI, // so the default limit is set to fit UI needs - limit := ctx.QueryInt("limit") + limit := ctx.FormInt("limit") if limit == 0 { limit = setting.UI.IssuePagingNum } else if limit > setting.API.MaxResponseItems { @@ -187,33 +224,37 @@ func SearchIssues(ctx *context.APIContext) { // Only fetch the issues if we either don't have a keyword or the search returned issues // This would otherwise return all issues if no issues were found by the search. - if len(keyword) == 0 || len(issueIDs) > 0 || len(labelIDs) > 0 { + if len(keyword) == 0 || len(issueIDs) > 0 || len(includedLabelNames) > 0 || len(includedMilestones) > 0 { issuesOpt := &models.IssuesOptions{ ListOptions: models.ListOptions{ - Page: ctx.QueryInt("page"), + Page: ctx.FormInt("page"), PageSize: limit, }, RepoIDs: repoIDs, IsClosed: isClosed, IssueIDs: issueIDs, IncludedLabelNames: includedLabelNames, + IncludeMilestones: includedMilestones, SortType: "priorityrepo", - PriorityRepoID: ctx.QueryInt64("priority_repo_id"), + PriorityRepoID: ctx.FormInt64("priority_repo_id"), IsPull: isPull, UpdatedBeforeUnix: before, UpdatedAfterUnix: since, } - // Filter for: Created by User, Assigned to User, Mentioning User - if ctx.QueryBool("created") { + // Filter for: Created by User, Assigned to User, Mentioning User, Review of User Requested + if ctx.FormBool("created") { issuesOpt.PosterID = ctx.User.ID } - if ctx.QueryBool("assigned") { + if ctx.FormBool("assigned") { issuesOpt.AssigneeID = ctx.User.ID } - if ctx.QueryBool("mentioned") { + if ctx.FormBool("mentioned") { issuesOpt.MentionedID = ctx.User.ID } + if ctx.FormBool("review_requested") { + issuesOpt.ReviewRequestedID = ctx.User.ID + } if issues, err = models.Issues(issuesOpt); err != nil { ctx.Error(http.StatusInternalServerError, "Issues", err) @@ -230,8 +271,7 @@ func SearchIssues(ctx *context.APIContext) { } ctx.SetLinkHeader(int(filteredCount), setting.UI.IssuePagingNum) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", filteredCount)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(filteredCount) ctx.JSON(http.StatusOK, convert.ToAPIIssueList(issues)) } @@ -275,6 +315,30 @@ func ListIssues(ctx *context.APIContext) { // in: query // description: comma separated list of milestone names or ids. It uses names and fall back to ids. Fetch only issues that have any of this milestones. Non existent milestones are discarded // type: string + // - name: since + // in: query + // description: Only show notifications updated after the given time. This is a timestamp in RFC 3339 format + // type: string + // format: date-time + // required: false + // - name: before + // in: query + // description: Only show notifications updated before the given time. This is a timestamp in RFC 3339 format + // type: string + // format: date-time + // required: false + // - name: created_by + // in: query + // description: filter (issues / pulls) created to + // type: string + // - name: assigned_by + // in: query + // description: filter (issues / pulls) assigned to + // type: string + // - name: mentioned_by + // in: query + // description: filter (issues / pulls) mentioning to + // type: string // - name: page // in: query // description: page number of results to return (1-based) @@ -286,9 +350,14 @@ func ListIssues(ctx *context.APIContext) { // responses: // "200": // "$ref": "#/responses/IssueList" + before, since, err := utils.GetQueryBeforeSince(ctx) + if err != nil { + ctx.Error(http.StatusUnprocessableEntity, "GetQueryBeforeSince", err) + return + } var isClosed util.OptionalBool - switch ctx.Query("state") { + switch ctx.FormString("state") { case "closed": isClosed = util.OptionalBoolTrue case "all": @@ -300,13 +369,12 @@ func ListIssues(ctx *context.APIContext) { var issues []*models.Issue var filteredCount int64 - keyword := strings.Trim(ctx.Query("q"), " ") + keyword := ctx.FormTrim("q") if strings.IndexByte(keyword, 0) >= 0 { keyword = "" } var issueIDs []int64 var labelIDs []int64 - var err error if len(keyword) > 0 { issueIDs, err = issue_indexer.SearchIssuesByKeyword([]int64{ctx.Repo.Repository.ID}, keyword) if err != nil { @@ -315,7 +383,7 @@ func ListIssues(ctx *context.APIContext) { } } - if splitted := strings.Split(ctx.Query("labels"), ","); len(splitted) > 0 { + if splitted := strings.Split(ctx.FormString("labels"), ","); len(splitted) > 0 { labelIDs, err = models.GetLabelIDsInRepoByNames(ctx.Repo.Repository.ID, splitted) if err != nil { ctx.Error(http.StatusInternalServerError, "GetLabelIDsInRepoByNames", err) @@ -324,7 +392,7 @@ func ListIssues(ctx *context.APIContext) { } var mileIDs []int64 - if part := strings.Split(ctx.Query("milestones"), ","); len(part) > 0 { + if part := strings.Split(ctx.FormString("milestones"), ","); len(part) > 0 { for i := range part { // uses names and fall back to ids // non existent milestones are discarded @@ -356,7 +424,7 @@ func ListIssues(ctx *context.APIContext) { listOptions := utils.GetListOptions(ctx) var isPull util.OptionalBool - switch ctx.Query("type") { + switch ctx.FormString("type") { case "pulls": isPull = util.OptionalBoolTrue case "issues": @@ -365,17 +433,36 @@ func ListIssues(ctx *context.APIContext) { isPull = util.OptionalBoolNone } + // FIXME: we should be more efficient here + createdByID := getUserIDForFilter(ctx, "created_by") + if ctx.Written() { + return + } + assignedByID := getUserIDForFilter(ctx, "assigned_by") + if ctx.Written() { + return + } + mentionedByID := getUserIDForFilter(ctx, "mentioned_by") + if ctx.Written() { + return + } + // Only fetch the issues if we either don't have a keyword or the search returned issues // This would otherwise return all issues if no issues were found by the search. if len(keyword) == 0 || len(issueIDs) > 0 || len(labelIDs) > 0 { issuesOpt := &models.IssuesOptions{ - ListOptions: listOptions, - RepoIDs: []int64{ctx.Repo.Repository.ID}, - IsClosed: isClosed, - IssueIDs: issueIDs, - LabelIDs: labelIDs, - MilestoneIDs: mileIDs, - IsPull: isPull, + ListOptions: listOptions, + RepoIDs: []int64{ctx.Repo.Repository.ID}, + IsClosed: isClosed, + IssueIDs: issueIDs, + LabelIDs: labelIDs, + MilestoneIDs: mileIDs, + IsPull: isPull, + UpdatedBeforeUnix: before, + UpdatedAfterUnix: since, + PosterID: createdByID, + AssigneeID: assignedByID, + MentionedID: mentionedByID, } if issues, err = models.Issues(issuesOpt); err != nil { @@ -393,11 +480,30 @@ func ListIssues(ctx *context.APIContext) { } ctx.SetLinkHeader(int(filteredCount), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", filteredCount)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(filteredCount) ctx.JSON(http.StatusOK, convert.ToAPIIssueList(issues)) } +func getUserIDForFilter(ctx *context.APIContext, queryName string) int64 { + userName := ctx.FormString(queryName) + if len(userName) == 0 { + return 0 + } + + user, err := models.GetUserByName(userName) + if models.IsErrUserNotExist(err) { + ctx.NotFound(err) + return 0 + } + + if err != nil { + ctx.InternalServerError(err) + return 0 + } + + return user.ID +} + // GetIssue get an issue of a repository func GetIssue(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/issues/{index} issue issueGetIssue @@ -441,7 +547,7 @@ func GetIssue(ctx *context.APIContext) { } // CreateIssue create an issue of a repository -func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) { +func CreateIssue(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/issues issue issueCreateIssue // --- // summary: Create an issue. If using deadline only the date will be taken into account, and time of day ignored. @@ -473,7 +579,7 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) { // "$ref": "#/responses/error" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateIssueOption) var deadlineUnix timeutil.TimeStamp if form.Deadline != nil && ctx.Repo.CanWrite(models.UnitTypeIssues) { deadlineUnix = timeutil.TimeStamp(form.Deadline.Unix()) @@ -557,7 +663,7 @@ func CreateIssue(ctx *context.APIContext, form api.CreateIssueOption) { } // EditIssue modify an issue of a repository -func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { +func EditIssue(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/issues/{index} issue issueEditIssue // --- // summary: Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. @@ -596,6 +702,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { // "412": // "$ref": "#/responses/error" + form := web.GetForm(ctx).(*api.EditIssueOption) issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrIssueNotExist(err) { @@ -682,7 +789,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { } } if form.State != nil { - issue.IsClosed = (api.StateClosed == api.StateType(*form.State)) + issue.IsClosed = api.StateClosed == api.StateType(*form.State) } statusChangeComment, titleChanged, err := models.UpdateIssueByAPI(issue, ctx.User) if err != nil { @@ -716,7 +823,7 @@ func EditIssue(ctx *context.APIContext, form api.EditIssueOption) { } // UpdateIssueDeadline updates an issue deadline -func UpdateIssueDeadline(ctx *context.APIContext, form api.EditDeadlineOption) { +func UpdateIssueDeadline(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/issues/{index}/deadline issue issueEditIssueDeadline // --- // summary: Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored. @@ -752,7 +859,7 @@ func UpdateIssueDeadline(ctx *context.APIContext, form api.EditDeadlineOption) { // "$ref": "#/responses/forbidden" // "404": // "$ref": "#/responses/notFound" - + form := web.GetForm(ctx).(*api.EditDeadlineOption) issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrIssueNotExist(err) { diff --git a/routers/api/v1/repo/issue_comment.go b/routers/api/v1/repo/issue_comment.go index 245c90d49..13e7de46b 100644 --- a/routers/api/v1/repo/issue_comment.go +++ b/routers/api/v1/repo/issue_comment.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" comment_service "code.gitea.io/gitea/services/comments" ) @@ -67,17 +68,25 @@ func ListIssueComments(ctx *context.APIContext) { } issue.Repo = ctx.Repo.Repository - comments, err := models.FindComments(models.FindCommentsOptions{ + opts := &models.FindCommentsOptions{ IssueID: issue.ID, Since: since, Before: before, Type: models.CommentTypeComment, - }) + } + + comments, err := models.FindComments(opts) if err != nil { ctx.Error(http.StatusInternalServerError, "FindComments", err) return } + totalCount, err := models.CountComments(opts) + if err != nil { + ctx.InternalServerError(err) + return + } + if err := models.CommentList(comments).LoadPosters(); err != nil { ctx.Error(http.StatusInternalServerError, "LoadPosters", err) return @@ -88,6 +97,8 @@ func ListIssueComments(ctx *context.APIContext) { comment.Issue = issue apiComments[i] = convert.ToComment(comments[i]) } + + ctx.SetTotalCountHeader(totalCount) ctx.JSON(http.StatusOK, &apiComments) } @@ -137,18 +148,26 @@ func ListRepoIssueComments(ctx *context.APIContext) { return } - comments, err := models.FindComments(models.FindCommentsOptions{ + opts := &models.FindCommentsOptions{ ListOptions: utils.GetListOptions(ctx), RepoID: ctx.Repo.Repository.ID, Type: models.CommentTypeComment, Since: since, Before: before, - }) + } + + comments, err := models.FindComments(opts) if err != nil { ctx.Error(http.StatusInternalServerError, "FindComments", err) return } + totalCount, err := models.CountComments(opts) + if err != nil { + ctx.InternalServerError(err) + return + } + if err = models.CommentList(comments).LoadPosters(); err != nil { ctx.Error(http.StatusInternalServerError, "LoadPosters", err) return @@ -170,11 +189,13 @@ func ListRepoIssueComments(ctx *context.APIContext) { for i := range comments { apiComments[i] = convert.ToComment(comments[i]) } + + ctx.SetTotalCountHeader(totalCount) ctx.JSON(http.StatusOK, &apiComments) } // CreateIssueComment create a comment for an issue -func CreateIssueComment(ctx *context.APIContext, form api.CreateIssueCommentOption) { +func CreateIssueComment(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/issues/{index}/comments issue issueCreateComment // --- // summary: Add a comment to an issue @@ -208,7 +229,7 @@ func CreateIssueComment(ctx *context.APIContext, form api.CreateIssueCommentOpti // "$ref": "#/responses/Comment" // "403": // "$ref": "#/responses/forbidden" - + form := web.GetForm(ctx).(*api.CreateIssueCommentOption) issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { ctx.Error(http.StatusInternalServerError, "GetIssueByIndex", err) @@ -298,7 +319,7 @@ func GetIssueComment(ctx *context.APIContext) { } // EditIssueComment modify a comment of an issue -func EditIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption) { +func EditIssueComment(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/issues/comments/{id} issue issueEditComment // --- // summary: Edit a comment @@ -337,11 +358,12 @@ func EditIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption) // "404": // "$ref": "#/responses/notFound" - editIssueComment(ctx, form) + form := web.GetForm(ctx).(*api.EditIssueCommentOption) + editIssueComment(ctx, *form) } // EditIssueCommentDeprecated modify a comment of an issue -func EditIssueCommentDeprecated(ctx *context.APIContext, form api.EditIssueCommentOption) { +func EditIssueCommentDeprecated(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/issues/{index}/comments/{id} issue issueEditCommentDeprecated // --- // summary: Edit a comment @@ -386,7 +408,8 @@ func EditIssueCommentDeprecated(ctx *context.APIContext, form api.EditIssueComme // "404": // "$ref": "#/responses/notFound" - editIssueComment(ctx, form) + form := web.GetForm(ctx).(*api.EditIssueCommentOption) + editIssueComment(ctx, *form) } func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption) { @@ -509,7 +532,7 @@ func deleteIssueComment(ctx *context.APIContext) { return } - if err = comment_service.DeleteComment(comment, ctx.User); err != nil { + if err = comment_service.DeleteComment(ctx.User, comment); err != nil { ctx.Error(http.StatusInternalServerError, "DeleteCommentByID", err) return } diff --git a/routers/api/v1/repo/issue_label.go b/routers/api/v1/repo/issue_label.go index 8b2a1988f..d7f64b2d9 100644 --- a/routers/api/v1/repo/issue_label.go +++ b/routers/api/v1/repo/issue_label.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" issue_service "code.gitea.io/gitea/services/issue" ) @@ -64,7 +65,7 @@ func ListIssueLabels(ctx *context.APIContext) { } // AddIssueLabels add labels for an issue -func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { +func AddIssueLabels(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/issues/{index}/labels issue issueAddLabel // --- // summary: Add a label to an issue @@ -99,7 +100,8 @@ func AddIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { // "403": // "$ref": "#/responses/forbidden" - issue, labels, err := prepareForReplaceOrAdd(ctx, form) + form := web.GetForm(ctx).(*api.IssueLabelsOption) + issue, labels, err := prepareForReplaceOrAdd(ctx, *form) if err != nil { return } @@ -190,7 +192,7 @@ func DeleteIssueLabel(ctx *context.APIContext) { } // ReplaceIssueLabels replace labels for an issue -func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { +func ReplaceIssueLabels(ctx *context.APIContext) { // swagger:operation PUT /repos/{owner}/{repo}/issues/{index}/labels issue issueReplaceLabels // --- // summary: Replace an issue's labels @@ -224,8 +226,8 @@ func ReplaceIssueLabels(ctx *context.APIContext, form api.IssueLabelsOption) { // "$ref": "#/responses/LabelList" // "403": // "$ref": "#/responses/forbidden" - - issue, labels, err := prepareForReplaceOrAdd(ctx, form) + form := web.GetForm(ctx).(*api.IssueLabelsOption) + issue, labels, err := prepareForReplaceOrAdd(ctx, *form) if err != nil { return } diff --git a/routers/api/v1/repo/issue_reaction.go b/routers/api/v1/repo/issue_reaction.go index dfe618480..d0ba8dac6 100644 --- a/routers/api/v1/repo/issue_reaction.go +++ b/routers/api/v1/repo/issue_reaction.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -80,7 +81,7 @@ func GetIssueCommentReactions(ctx *context.APIContext) { var result []api.Reaction for _, r := range reactions { result = append(result, api.Reaction{ - User: convert.ToUser(r.User, ctx.IsSigned, false), + User: convert.ToUser(r.User, ctx.User), Reaction: r.Type, Created: r.CreatedUnix.AsTime(), }) @@ -90,7 +91,7 @@ func GetIssueCommentReactions(ctx *context.APIContext) { } // PostIssueCommentReaction add a reaction to a comment of an issue -func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) { +func PostIssueCommentReaction(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issuePostCommentReaction // --- // summary: Add a reaction to a comment of an issue @@ -127,11 +128,13 @@ func PostIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOpti // "403": // "$ref": "#/responses/forbidden" - changeIssueCommentReaction(ctx, form, true) + form := web.GetForm(ctx).(*api.EditReactionOption) + + changeIssueCommentReaction(ctx, *form, true) } // DeleteIssueCommentReaction remove a reaction from a comment of an issue -func DeleteIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption) { +func DeleteIssueCommentReaction(ctx *context.APIContext) { // swagger:operation DELETE /repos/{owner}/{repo}/issues/comments/{id}/reactions issue issueDeleteCommentReaction // --- // summary: Remove a reaction from a comment of an issue @@ -166,7 +169,9 @@ func DeleteIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp // "403": // "$ref": "#/responses/forbidden" - changeIssueCommentReaction(ctx, form, false) + form := web.GetForm(ctx).(*api.EditReactionOption) + + changeIssueCommentReaction(ctx, *form, false) } func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOption, isCreateType bool) { @@ -198,7 +203,7 @@ func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp ctx.Error(http.StatusForbidden, err.Error(), err) } else if models.IsErrReactionAlreadyExist(err) { ctx.JSON(http.StatusOK, api.Reaction{ - User: convert.ToUser(ctx.User, true, true), + User: convert.ToUser(ctx.User, ctx.User), Reaction: reaction.Type, Created: reaction.CreatedUnix.AsTime(), }) @@ -209,7 +214,7 @@ func changeIssueCommentReaction(ctx *context.APIContext, form api.EditReactionOp } ctx.JSON(http.StatusCreated, api.Reaction{ - User: convert.ToUser(ctx.User, true, true), + User: convert.ToUser(ctx.User, ctx.User), Reaction: reaction.Type, Created: reaction.CreatedUnix.AsTime(), }) @@ -294,7 +299,7 @@ func GetIssueReactions(ctx *context.APIContext) { var result []api.Reaction for _, r := range reactions { result = append(result, api.Reaction{ - User: convert.ToUser(r.User, ctx.IsSigned, false), + User: convert.ToUser(r.User, ctx.User), Reaction: r.Type, Created: r.CreatedUnix.AsTime(), }) @@ -304,7 +309,7 @@ func GetIssueReactions(ctx *context.APIContext) { } // PostIssueReaction add a reaction to an issue -func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) { +func PostIssueReaction(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/issues/{index}/reactions issue issuePostIssueReaction // --- // summary: Add a reaction to an issue @@ -340,12 +345,12 @@ func PostIssueReaction(ctx *context.APIContext, form api.EditReactionOption) { // "$ref": "#/responses/Reaction" // "403": // "$ref": "#/responses/forbidden" - - changeIssueReaction(ctx, form, true) + form := web.GetForm(ctx).(*api.EditReactionOption) + changeIssueReaction(ctx, *form, true) } // DeleteIssueReaction remove a reaction from an issue -func DeleteIssueReaction(ctx *context.APIContext, form api.EditReactionOption) { +func DeleteIssueReaction(ctx *context.APIContext) { // swagger:operation DELETE /repos/{owner}/{repo}/issues/{index}/reactions issue issueDeleteIssueReaction // --- // summary: Remove a reaction from an issue @@ -379,8 +384,8 @@ func DeleteIssueReaction(ctx *context.APIContext, form api.EditReactionOption) { // "$ref": "#/responses/empty" // "403": // "$ref": "#/responses/forbidden" - - changeIssueReaction(ctx, form, false) + form := web.GetForm(ctx).(*api.EditReactionOption) + changeIssueReaction(ctx, *form, false) } func changeIssueReaction(ctx *context.APIContext, form api.EditReactionOption, isCreateType bool) { @@ -407,7 +412,7 @@ func changeIssueReaction(ctx *context.APIContext, form api.EditReactionOption, i ctx.Error(http.StatusForbidden, err.Error(), err) } else if models.IsErrReactionAlreadyExist(err) { ctx.JSON(http.StatusOK, api.Reaction{ - User: convert.ToUser(ctx.User, true, true), + User: convert.ToUser(ctx.User, ctx.User), Reaction: reaction.Type, Created: reaction.CreatedUnix.AsTime(), }) @@ -418,7 +423,7 @@ func changeIssueReaction(ctx *context.APIContext, form api.EditReactionOption, i } ctx.JSON(http.StatusCreated, api.Reaction{ - User: convert.ToUser(ctx.User, true, true), + User: convert.ToUser(ctx.User, ctx.User), Reaction: reaction.Type, Created: reaction.CreatedUnix.AsTime(), }) diff --git a/routers/api/v1/repo/issue_stopwatch.go b/routers/api/v1/repo/issue_stopwatch.go index a4a2261b9..82a9ffe10 100644 --- a/routers/api/v1/repo/issue_stopwatch.go +++ b/routers/api/v1/repo/issue_stopwatch.go @@ -225,11 +225,18 @@ func GetStopwatches(ctx *context.APIContext) { return } + count, err := models.CountUserStopwatches(ctx.User.ID) + if err != nil { + ctx.InternalServerError(err) + return + } + apiSWs, err := convert.ToStopWatches(sws) if err != nil { ctx.Error(http.StatusInternalServerError, "APIFormat", err) return } + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, apiSWs) } diff --git a/routers/api/v1/repo/issue_subscription.go b/routers/api/v1/repo/issue_subscription.go index 2bbd72299..8acd378cc 100644 --- a/routers/api/v1/repo/issue_subscription.go +++ b/routers/api/v1/repo/issue_subscription.go @@ -279,7 +279,7 @@ func GetIssueSubscribers(ctx *context.APIContext) { } apiUsers := make([]*api.User, 0, len(users)) for i := range users { - apiUsers[i] = convert.ToUser(users[i], ctx.IsSigned, false) + apiUsers[i] = convert.ToUser(users[i], ctx.User) } ctx.JSON(http.StatusOK, apiUsers) diff --git a/routers/api/v1/repo/issue_tracked_time.go b/routers/api/v1/repo/issue_tracked_time.go index 70ce420b7..e9d8fbab2 100644 --- a/routers/api/v1/repo/issue_tracked_time.go +++ b/routers/api/v1/repo/issue_tracked_time.go @@ -7,13 +7,13 @@ package repo import ( "fmt" "net/http" - "strings" "time" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -83,13 +83,13 @@ func ListTrackedTimes(ctx *context.APIContext) { return } - opts := models.FindTrackedTimesOptions{ + opts := &models.FindTrackedTimesOptions{ ListOptions: utils.GetListOptions(ctx), RepositoryID: ctx.Repo.Repository.ID, IssueID: issue.ID, } - qUser := strings.Trim(ctx.Query("user"), " ") + qUser := ctx.FormTrim("user") if qUser != "" { user, err := models.GetUserByName(qUser) if models.IsErrUserNotExist(err) { @@ -119,6 +119,12 @@ func ListTrackedTimes(ctx *context.APIContext) { } } + count, err := models.CountTrackedTimes(opts) + if err != nil { + ctx.InternalServerError(err) + return + } + trackedTimes, err := models.GetTrackedTimes(opts) if err != nil { ctx.Error(http.StatusInternalServerError, "GetTrackedTimes", err) @@ -128,11 +134,13 @@ func ListTrackedTimes(ctx *context.APIContext) { ctx.Error(http.StatusInternalServerError, "LoadAttributes", err) return } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, convert.ToTrackedTimeList(trackedTimes)) } // AddTime add time manual to the given issue -func AddTime(ctx *context.APIContext, form api.AddTimeOption) { +func AddTime(ctx *context.APIContext) { // swagger:operation Post /repos/{owner}/{repo}/issues/{index}/times issue issueAddTime // --- // summary: Add tracked time to a issue @@ -168,7 +176,7 @@ func AddTime(ctx *context.APIContext, form api.AddTimeOption) { // "$ref": "#/responses/error" // "403": // "$ref": "#/responses/forbidden" - + form := web.GetForm(ctx).(*api.AddTimeOption) issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrIssueNotExist(err) { @@ -423,7 +431,7 @@ func ListTrackedTimesByUser(ctx *context.APIContext) { return } - opts := models.FindTrackedTimesOptions{ + opts := &models.FindTrackedTimesOptions{ UserID: user.ID, RepositoryID: ctx.Repo.Repository.ID, } @@ -493,13 +501,13 @@ func ListTrackedTimesByRepository(ctx *context.APIContext) { return } - opts := models.FindTrackedTimesOptions{ + opts := &models.FindTrackedTimesOptions{ ListOptions: utils.GetListOptions(ctx), RepositoryID: ctx.Repo.Repository.ID, } // Filters - qUser := strings.Trim(ctx.Query("user"), " ") + qUser := ctx.FormTrim("user") if qUser != "" { user, err := models.GetUserByName(qUser) if models.IsErrUserNotExist(err) { @@ -525,11 +533,17 @@ func ListTrackedTimesByRepository(ctx *context.APIContext) { if opts.UserID == 0 { opts.UserID = ctx.User.ID } else { - ctx.Error(http.StatusForbidden, "", fmt.Errorf("query user not allowed not enouth rights")) + ctx.Error(http.StatusForbidden, "", fmt.Errorf("query by user not allowed; not enough rights")) return } } + count, err := models.CountTrackedTimes(opts) + if err != nil { + ctx.InternalServerError(err) + return + } + trackedTimes, err := models.GetTrackedTimes(opts) if err != nil { ctx.Error(http.StatusInternalServerError, "GetTrackedTimes", err) @@ -539,6 +553,8 @@ func ListTrackedTimesByRepository(ctx *context.APIContext) { ctx.Error(http.StatusInternalServerError, "LoadAttributes", err) return } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, convert.ToTrackedTimeList(trackedTimes)) } @@ -573,7 +589,7 @@ func ListMyTrackedTimes(ctx *context.APIContext) { // "200": // "$ref": "#/responses/TrackedTimeList" - opts := models.FindTrackedTimesOptions{ + opts := &models.FindTrackedTimesOptions{ ListOptions: utils.GetListOptions(ctx), UserID: ctx.User.ID, } @@ -584,6 +600,12 @@ func ListMyTrackedTimes(ctx *context.APIContext) { return } + count, err := models.CountTrackedTimes(opts) + if err != nil { + ctx.InternalServerError(err) + return + } + trackedTimes, err := models.GetTrackedTimes(opts) if err != nil { ctx.Error(http.StatusInternalServerError, "GetTrackedTimesByUser", err) @@ -595,5 +617,6 @@ func ListMyTrackedTimes(ctx *context.APIContext) { return } + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, convert.ToTrackedTimeList(trackedTimes)) } diff --git a/routers/api/v1/repo/key.go b/routers/api/v1/repo/key.go index 3e6174f62..98ee2b4de 100644 --- a/routers/api/v1/repo/key.go +++ b/routers/api/v1/repo/key.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -74,26 +75,29 @@ func ListDeployKeys(ctx *context.APIContext) { // "200": // "$ref": "#/responses/DeployKeyList" - var keys []*models.DeployKey - var err error - - fingerprint := ctx.Query("fingerprint") - keyID := ctx.QueryInt64("key_id") - if fingerprint != "" || keyID != 0 { - keys, err = models.SearchDeployKeys(ctx.Repo.Repository.ID, keyID, fingerprint) - } else { - keys, err = models.ListDeployKeys(ctx.Repo.Repository.ID, utils.GetListOptions(ctx)) + opts := &models.ListDeployKeysOptions{ + ListOptions: utils.GetListOptions(ctx), + RepoID: ctx.Repo.Repository.ID, + KeyID: ctx.FormInt64("key_id"), + Fingerprint: ctx.FormString("fingerprint"), } + keys, err := models.ListDeployKeys(opts) if err != nil { - ctx.Error(http.StatusInternalServerError, "ListDeployKeys", err) + ctx.InternalServerError(err) + return + } + + count, err := models.CountDeployKeys(opts) + if err != nil { + ctx.InternalServerError(err) return } apiLink := composeDeployKeysAPILink(ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name) apiKeys := make([]*api.DeployKey, len(keys)) for i := range keys { - if err = keys[i].GetContent(); err != nil { + if err := keys[i].GetContent(); err != nil { ctx.Error(http.StatusInternalServerError, "GetContent", err) return } @@ -103,6 +107,7 @@ func ListDeployKeys(ctx *context.APIContext) { } } + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, &apiKeys) } @@ -185,7 +190,7 @@ func HandleAddKeyError(ctx *context.APIContext, err error) { } // CreateDeployKey create deploy key for a repository -func CreateDeployKey(ctx *context.APIContext, form api.CreateKeyOption) { +func CreateDeployKey(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/keys repository repoCreateKey // --- // summary: Add a key to a repository @@ -214,6 +219,7 @@ func CreateDeployKey(ctx *context.APIContext, form api.CreateKeyOption) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.CreateKeyOption) content, err := models.CheckPublicKeyString(form.Key) if err != nil { HandleCheckKeyStringError(ctx, err) diff --git a/routers/api/v1/repo/label.go b/routers/api/v1/repo/label.go index fef6ebf07..1de5705aa 100644 --- a/routers/api/v1/repo/label.go +++ b/routers/api/v1/repo/label.go @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -48,12 +49,19 @@ func ListLabels(ctx *context.APIContext) { // "200": // "$ref": "#/responses/LabelList" - labels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID, ctx.Query("sort"), utils.GetListOptions(ctx)) + labels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID, ctx.FormString("sort"), utils.GetListOptions(ctx)) if err != nil { ctx.Error(http.StatusInternalServerError, "GetLabelsByRepoID", err) return } + count, err := models.CountLabelsByRepoID(ctx.Repo.Repository.ID) + if err != nil { + ctx.InternalServerError(err) + return + } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, convert.ToLabelList(labels)) } @@ -108,7 +116,7 @@ func GetLabel(ctx *context.APIContext) { } // CreateLabel create a label for a repository -func CreateLabel(ctx *context.APIContext, form api.CreateLabelOption) { +func CreateLabel(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/labels issue issueCreateLabel // --- // summary: Create a label @@ -137,6 +145,7 @@ func CreateLabel(ctx *context.APIContext, form api.CreateLabelOption) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.CreateLabelOption) form.Color = strings.Trim(form.Color, " ") if len(form.Color) == 6 { form.Color = "#" + form.Color @@ -160,7 +169,7 @@ func CreateLabel(ctx *context.APIContext, form api.CreateLabelOption) { } // EditLabel modify a label for a repository -func EditLabel(ctx *context.APIContext, form api.EditLabelOption) { +func EditLabel(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/labels/{id} issue issueEditLabel // --- // summary: Update a label @@ -195,6 +204,7 @@ func EditLabel(ctx *context.APIContext, form api.EditLabelOption) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.EditLabelOption) label, err := models.GetLabelInRepoByID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")) if err != nil { if models.IsErrRepoLabelNotExist(err) { diff --git a/routers/api/v1/repo/migrate.go b/routers/api/v1/repo/migrate.go index f07599399..de33a3645 100644 --- a/routers/api/v1/repo/migrate.go +++ b/routers/api/v1/repo/migrate.go @@ -12,21 +12,24 @@ import ( "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/migrations" + "code.gitea.io/gitea/modules/migrations/base" "code.gitea.io/gitea/modules/notification" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" ) // Migrate migrate remote git repository to gitea -func Migrate(ctx *context.APIContext, form api.MigrateRepoOptions) { +func Migrate(ctx *context.APIContext) { // swagger:operation POST /repos/migrate repository repoMigrate // --- // summary: Migrate a remote git repository @@ -47,6 +50,8 @@ func Migrate(ctx *context.APIContext, form api.MigrateRepoOptions) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.MigrateRepoOptions) + //get repoOwner var ( repoOwner *models.User @@ -92,23 +97,12 @@ func Migrate(ctx *context.APIContext, form api.MigrateRepoOptions) { } } - remoteAddr, err := auth.ParseRemoteAddr(form.CloneAddr, form.AuthUsername, form.AuthPassword, ctx.User) + remoteAddr, err := forms.ParseRemoteAddr(form.CloneAddr, form.AuthUsername, form.AuthPassword) + if err == nil { + err = migrations.IsMigrateURLAllowed(remoteAddr, ctx.User) + } if err != nil { - if models.IsErrInvalidCloneAddr(err) { - addrErr := err.(models.ErrInvalidCloneAddr) - switch { - case addrErr.IsURLError: - ctx.Error(http.StatusUnprocessableEntity, "", err) - case addrErr.IsPermissionDenied: - ctx.Error(http.StatusUnprocessableEntity, "", "You are not allowed to import local repositories.") - case addrErr.IsInvalidPath: - ctx.Error(http.StatusUnprocessableEntity, "", "Invalid local path, it does not exist or not a directory.") - default: - ctx.Error(http.StatusInternalServerError, "ParseRemoteAddr", "Unknown error type (ErrInvalidCloneAddr): "+err.Error()) - } - } else { - ctx.Error(http.StatusInternalServerError, "ParseRemoteAddr", err) - } + handleRemoteAddrError(ctx, err) return } @@ -124,12 +118,29 @@ func Migrate(ctx *context.APIContext, form api.MigrateRepoOptions) { return } + form.LFS = form.LFS && setting.LFS.StartServer + + if form.LFS && len(form.LFSEndpoint) > 0 { + ep := lfs.DetermineEndpoint("", form.LFSEndpoint) + if ep == nil { + ctx.Error(http.StatusInternalServerError, "", ctx.Tr("repo.migrate.invalid_lfs_endpoint")) + return + } + err = migrations.IsMigrateURLAllowed(ep.String(), ctx.User) + if err != nil { + handleRemoteAddrError(ctx, err) + return + } + } + var opts = migrations.MigrateOptions{ CloneAddr: remoteAddr, RepoName: form.RepoName, Description: form.Description, Private: form.Private || setting.Repository.ForcePrivate, Mirror: form.Mirror, + LFS: form.LFS, + LFSEndpoint: form.LFSEndpoint, AuthUsername: form.AuthUsername, AuthPassword: form.AuthPassword, AuthToken: form.AuthToken, @@ -188,7 +199,7 @@ func Migrate(ctx *context.APIContext, form api.MigrateRepoOptions) { } }() - if _, err = migrations.MigrateRepository(graceful.GetManager().HammerContext(), ctx.User, repoOwner.Name, opts); err != nil { + if _, err = migrations.MigrateRepository(graceful.GetManager().HammerContext(), ctx.User, repoOwner.Name, opts, nil); err != nil { handleMigrateError(ctx, repoOwner, remoteAddr, err) return } @@ -215,10 +226,12 @@ func handleMigrateError(ctx *context.APIContext, repoOwner *models.User, remoteA ctx.Error(http.StatusUnprocessableEntity, "", fmt.Sprintf("The username '%s' contains invalid characters.", err.(models.ErrNameCharsNotAllowed).Name)) case models.IsErrNamePatternNotAllowed(err): ctx.Error(http.StatusUnprocessableEntity, "", fmt.Sprintf("The pattern '%s' is not allowed in a username.", err.(models.ErrNamePatternNotAllowed).Pattern)) - case models.IsErrMigrationNotAllowed(err): + case models.IsErrInvalidCloneAddr(err): + ctx.Error(http.StatusUnprocessableEntity, "", err) + case base.IsErrNotSupported(err): ctx.Error(http.StatusUnprocessableEntity, "", err) default: - err = util.URLSanitizedError(err, remoteAddr) + err = util.NewStringURLSanitizedError(err, remoteAddr, true) if strings.Contains(err.Error(), "Authentication failed") || strings.Contains(err.Error(), "Bad credentials") || strings.Contains(err.Error(), "could not read Username") { @@ -230,3 +243,27 @@ func handleMigrateError(ctx *context.APIContext, repoOwner *models.User, remoteA } } } + +func handleRemoteAddrError(ctx *context.APIContext, err error) { + if models.IsErrInvalidCloneAddr(err) { + addrErr := err.(*models.ErrInvalidCloneAddr) + switch { + case addrErr.IsURLError: + ctx.Error(http.StatusUnprocessableEntity, "", err) + case addrErr.IsPermissionDenied: + if addrErr.LocalPath { + ctx.Error(http.StatusUnprocessableEntity, "", "You are not allowed to import local repositories.") + } else if len(addrErr.PrivateNet) == 0 { + ctx.Error(http.StatusUnprocessableEntity, "", "You are not allowed to import from blocked hosts.") + } else { + ctx.Error(http.StatusUnprocessableEntity, "", "You are not allowed to import from private IPs.") + } + case addrErr.IsInvalidPath: + ctx.Error(http.StatusUnprocessableEntity, "", "Invalid local path, it does not exist or not a directory.") + default: + ctx.Error(http.StatusInternalServerError, "ParseRemoteAddr", "Unknown error type (ErrInvalidCloneAddr): "+err.Error()) + } + } else { + ctx.Error(http.StatusInternalServerError, "ParseRemoteAddr", err) + } +} diff --git a/routers/api/v1/repo/milestone.go b/routers/api/v1/repo/milestone.go index db86d0868..be1da18c5 100644 --- a/routers/api/v1/repo/milestone.go +++ b/routers/api/v1/repo/milestone.go @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -56,11 +57,11 @@ func ListMilestones(ctx *context.APIContext) { // "200": // "$ref": "#/responses/MilestoneList" - milestones, err := models.GetMilestones(models.GetMilestonesOption{ + milestones, total, err := models.GetMilestones(models.GetMilestonesOption{ ListOptions: utils.GetListOptions(ctx), RepoID: ctx.Repo.Repository.ID, - State: api.StateType(ctx.Query("state")), - Name: ctx.Query("name"), + State: api.StateType(ctx.FormString("state")), + Name: ctx.FormString("name"), }) if err != nil { ctx.Error(http.StatusInternalServerError, "GetMilestones", err) @@ -71,6 +72,8 @@ func ListMilestones(ctx *context.APIContext) { for i := range milestones { apiMilestones[i] = convert.ToAPIMilestone(milestones[i]) } + + ctx.SetTotalCountHeader(total) ctx.JSON(http.StatusOK, &apiMilestones) } @@ -110,7 +113,7 @@ func GetMilestone(ctx *context.APIContext) { } // CreateMilestone create a milestone for a repository -func CreateMilestone(ctx *context.APIContext, form api.CreateMilestoneOption) { +func CreateMilestone(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/milestones issue issueCreateMilestone // --- // summary: Create a milestone @@ -136,6 +139,7 @@ func CreateMilestone(ctx *context.APIContext, form api.CreateMilestoneOption) { // responses: // "201": // "$ref": "#/responses/Milestone" + form := web.GetForm(ctx).(*api.CreateMilestoneOption) if form.Deadline == nil { defaultDeadline, _ := time.ParseInLocation("2006-01-02", "9999-12-31", time.Local) @@ -162,7 +166,7 @@ func CreateMilestone(ctx *context.APIContext, form api.CreateMilestoneOption) { } // EditMilestone modify a milestone for a repository by ID and if not available by name -func EditMilestone(ctx *context.APIContext, form api.EditMilestoneOption) { +func EditMilestone(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/milestones/{id} issue issueEditMilestone // --- // summary: Update a milestone @@ -193,7 +197,7 @@ func EditMilestone(ctx *context.APIContext, form api.EditMilestoneOption) { // responses: // "200": // "$ref": "#/responses/Milestone" - + form := web.GetForm(ctx).(*api.EditMilestoneOption) milestone := getMilestoneByIDOrName(ctx) if ctx.Written() { return diff --git a/routers/api/v1/repo/notes.go b/routers/api/v1/repo/notes.go new file mode 100644 index 000000000..a5f951298 --- /dev/null +++ b/routers/api/v1/repo/notes.go @@ -0,0 +1,82 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "fmt" + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" + "code.gitea.io/gitea/modules/git" + api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/validation" +) + +// GetNote Get a note corresponding to a single commit from a repository +func GetNote(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/git/notes/{sha} repository repoGetNote + // --- + // summary: Get a note corresponding to a single commit from a repository + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: sha + // in: path + // description: a git ref or commit sha + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/Note" + // "422": + // "$ref": "#/responses/validationError" + // "404": + // "$ref": "#/responses/notFound" + + sha := ctx.Params(":sha") + if (validation.GitRefNamePatternInvalid.MatchString(sha) || !validation.CheckGitRefAdditionalRulesValid(sha)) && !git.SHAPattern.MatchString(sha) { + ctx.Error(http.StatusUnprocessableEntity, "no valid ref or sha", fmt.Sprintf("no valid ref or sha: %s", sha)) + return + } + getNote(ctx, sha) +} + +func getNote(ctx *context.APIContext, identifier string) { + gitRepo, err := git.OpenRepository(ctx.Repo.Repository.RepoPath()) + if err != nil { + ctx.Error(http.StatusInternalServerError, "OpenRepository", err) + return + } + defer gitRepo.Close() + var note git.Note + err = git.GetNote(ctx, gitRepo, identifier, ¬e) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound(identifier) + return + } + ctx.Error(http.StatusInternalServerError, "GetNote", err) + return + } + + cmt, err := convert.ToCommit(ctx.Repo.Repository, note.Commit, nil) + if err != nil { + ctx.Error(http.StatusInternalServerError, "ToCommit", err) + return + } + apiNote := api.Note{Message: string(note.Message), Commit: cmt} + ctx.JSON(http.StatusOK, apiNote) +} diff --git a/routers/api/v1/repo/pull.go b/routers/api/v1/repo/pull.go index b2b71180a..e493e720f 100644 --- a/routers/api/v1/repo/pull.go +++ b/routers/api/v1/repo/pull.go @@ -5,13 +5,15 @@ package repo import ( + "errors" "fmt" + "math" "net/http" + "strconv" "strings" "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" @@ -19,13 +21,16 @@ import ( "code.gitea.io/gitea/modules/notification" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" + "code.gitea.io/gitea/services/forms" issue_service "code.gitea.io/gitea/services/issue" pull_service "code.gitea.io/gitea/services/pull" + repo_service "code.gitea.io/gitea/services/repository" ) // ListPullRequests returns a list of all PRs -func ListPullRequests(ctx *context.APIContext, form api.ListPullRequestsOptions) { +func ListPullRequests(ctx *context.APIContext) { // swagger:operation GET /repos/{owner}/{repo}/pulls repository repoListPullRequests // --- // summary: List a repo's pull requests @@ -81,10 +86,10 @@ func ListPullRequests(ctx *context.APIContext, form api.ListPullRequestsOptions) prs, maxResults, err := models.PullRequests(ctx.Repo.Repository.ID, &models.PullRequestsOptions{ ListOptions: listOptions, - State: ctx.QueryTrim("state"), - SortType: ctx.QueryTrim("sort"), - Labels: ctx.QueryStrings("labels"), - MilestoneID: ctx.QueryInt64("milestone"), + State: ctx.FormTrim("state"), + SortType: ctx.FormTrim("sort"), + Labels: ctx.FormStrings("labels"), + MilestoneID: ctx.FormInt64("milestone"), }) if err != nil { @@ -114,8 +119,7 @@ func ListPullRequests(ctx *context.APIContext, form api.ListPullRequestsOptions) } ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, &apiPrs) } @@ -253,7 +257,7 @@ func DownloadPullDiffOrPatch(ctx *context.APIContext, patch bool) { } // CreatePullRequest does what it says -func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption) { +func CreatePullRequest(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/pulls repository repoCreatePullRequest // --- // summary: Create a pull request @@ -284,6 +288,7 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption // "422": // "$ref": "#/responses/validationError" + form := *web.GetForm(ctx).(*api.CreatePullRequestOption) if form.Head == form.Base { ctx.Error(http.StatusUnprocessableEntity, "BaseHeadSame", "Invalid PullRequest: There are no changes between the head and the base") @@ -293,7 +298,6 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption var ( repo = ctx.Repo.Repository labelIDs []int64 - assigneeID int64 milestoneID int64 ) @@ -305,7 +309,7 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption defer headGitRepo.Close() // Check if another PR exists with the same targets - existingPr, err := models.GetUnmergedPullRequest(headRepo.ID, ctx.Repo.Repository.ID, headBranch, baseBranch) + existingPr, err := models.GetUnmergedPullRequest(headRepo.ID, ctx.Repo.Repository.ID, headBranch, baseBranch, models.PullRequestFlowGithub) if err != nil { if !models.IsErrPullRequestNotExist(err) { ctx.Error(http.StatusInternalServerError, "GetUnmergedPullRequest", err) @@ -354,7 +358,7 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption } if form.Milestone > 0 { - milestone, err := models.GetMilestoneByRepoID(ctx.Repo.Repository.ID, milestoneID) + milestone, err := models.GetMilestoneByRepoID(ctx.Repo.Repository.ID, form.Milestone) if err != nil { if models.IsErrMilestoneNotExist(err) { ctx.NotFound() @@ -378,7 +382,6 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption PosterID: ctx.User.ID, Poster: ctx.User, MilestoneID: milestoneID, - AssigneeID: assigneeID, IsPull: true, Content: form.Body, DeadlineUnix: deadlineUnix, @@ -437,7 +440,7 @@ func CreatePullRequest(ctx *context.APIContext, form api.CreatePullRequestOption } // EditPullRequest does what it says -func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) { +func EditPullRequest(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/pulls/{index} repository repoEditPullRequest // --- // summary: Update a pull request. If using deadline only the date will be taken into account, and time of day ignored. @@ -478,6 +481,7 @@ func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) { // "422": // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.EditPullRequestOption) pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrPullRequestNotExist(err) { @@ -579,7 +583,7 @@ func EditPullRequest(ctx *context.APIContext, form api.EditPullRequestOption) { } if form.State != nil { - issue.IsClosed = (api.StateClosed == api.StateType(*form.State)) + issue.IsClosed = api.StateClosed == api.StateType(*form.State) } statusChangeComment, titleChanged, err := models.UpdateIssueByAPI(issue, ctx.User) if err != nil { @@ -685,7 +689,7 @@ func IsPullRequestMerged(ctx *context.APIContext) { } // MergePullRequest merges a PR given an index -func MergePullRequest(ctx *context.APIContext, form auth.MergePullRequestForm) { +func MergePullRequest(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/pulls/{index}/merge repository repoMergePullRequest // --- // summary: Merge a pull request @@ -720,6 +724,7 @@ func MergePullRequest(ctx *context.APIContext, form auth.MergePullRequestForm) { // "409": // "$ref": "#/responses/error" + form := web.GetForm(ctx).(*forms.MergePullRequestForm) pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrPullRequestNotExist(err) { @@ -765,13 +770,31 @@ func MergePullRequest(ctx *context.APIContext, form auth.MergePullRequestForm) { return } - if !pr.CanAutoMerge() { - ctx.Error(http.StatusMethodNotAllowed, "PR not in mergeable state", "Please try again later") + if pr.HasMerged { + ctx.Error(http.StatusMethodNotAllowed, "PR already merged", "") return } - if pr.HasMerged { - ctx.Error(http.StatusMethodNotAllowed, "PR already merged", "") + // handle manually-merged mark + if models.MergeStyle(form.Do) == models.MergeStyleManuallyMerged { + if err = pull_service.MergedManually(pr, ctx.User, ctx.Repo.GitRepo, form.MergeCommitID); err != nil { + if models.IsErrInvalidMergeStyle(err) { + ctx.Error(http.StatusMethodNotAllowed, "Invalid merge style", fmt.Errorf("%s is not allowed an allowed merge style for this repository", models.MergeStyle(form.Do))) + return + } + if strings.Contains(err.Error(), "Wrong commit ID") { + ctx.JSON(http.StatusConflict, err) + return + } + ctx.Error(http.StatusInternalServerError, "Manually-Merged", err) + return + } + ctx.Status(http.StatusOK) + return + } + + if !pr.CanAutoMerge() { + ctx.Error(http.StatusMethodNotAllowed, "PR not in mergeable state", "Please try again later") return } @@ -856,6 +879,38 @@ func MergePullRequest(ctx *context.APIContext, form auth.MergePullRequestForm) { } log.Trace("Pull request merged: %d", pr.ID) + + if form.DeleteBranchAfterMerge { + var headRepo *git.Repository + if ctx.Repo != nil && ctx.Repo.Repository != nil && ctx.Repo.Repository.ID == pr.HeadRepoID && ctx.Repo.GitRepo != nil { + headRepo = ctx.Repo.GitRepo + } else { + headRepo, err = git.OpenRepository(pr.HeadRepo.RepoPath()) + if err != nil { + ctx.ServerError(fmt.Sprintf("OpenRepository[%s]", pr.HeadRepo.RepoPath()), err) + return + } + defer headRepo.Close() + } + if err := repo_service.DeleteBranch(ctx.User, pr.HeadRepo, headRepo, pr.HeadBranch); err != nil { + switch { + case git.IsErrBranchNotExist(err): + ctx.NotFound(err) + case errors.Is(err, repo_service.ErrBranchIsDefault): + ctx.Error(http.StatusForbidden, "DefaultBranch", fmt.Errorf("can not delete default branch")) + case errors.Is(err, repo_service.ErrBranchIsProtected): + ctx.Error(http.StatusForbidden, "IsProtectedBranch", fmt.Errorf("branch protected")) + default: + ctx.Error(http.StatusInternalServerError, "DeleteBranch", err) + } + return + } + if err := models.AddDeletePRBranchComment(ctx.User, pr.BaseRepo, pr.Issue.ID, pr.HeadBranch); err != nil { + // Do not fail here as branch has already been deleted + log.Error("DeleteBranch: %v", err) + } + } + ctx.Status(http.StatusOK) } @@ -1010,6 +1065,11 @@ func UpdatePullRequest(ctx *context.APIContext) { // type: integer // format: int64 // required: true + // - name: style + // in: query + // description: how to update pull request + // type: string + // enum: [merge, rebase] // responses: // "200": // "$ref": "#/responses/empty" @@ -1056,13 +1116,15 @@ func UpdatePullRequest(ctx *context.APIContext) { return } - allowedUpdate, err := pull_service.IsUserAllowedToUpdate(pr, ctx.User) + rebase := ctx.FormString("style") == "rebase" + + allowedUpdateByMerge, allowedUpdateByRebase, err := pull_service.IsUserAllowedToUpdate(pr, ctx.User) if err != nil { ctx.Error(http.StatusInternalServerError, "IsUserAllowedToMerge", err) return } - if !allowedUpdate { + if (!allowedUpdateByMerge && !rebase) || (rebase && !allowedUpdateByRebase) { ctx.Status(http.StatusForbidden) return } @@ -1070,7 +1132,7 @@ func UpdatePullRequest(ctx *context.APIContext) { // default merge commit message message := fmt.Sprintf("Merge branch '%s' into %s", pr.BaseBranch, pr.HeadBranch) - if err = pull_service.Update(pr, ctx.User, message); err != nil { + if err = pull_service.Update(pr, ctx.User, message, rebase); err != nil { if models.IsErrMergeConflicts(err) { ctx.Error(http.StatusConflict, "Update", "merge failed because of conflict") return @@ -1081,3 +1143,109 @@ func UpdatePullRequest(ctx *context.APIContext) { ctx.Status(http.StatusOK) } + +// GetPullRequestCommits gets all commits associated with a given PR +func GetPullRequestCommits(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/pulls/{index}/commits repository repoGetPullRequestCommits + // --- + // summary: Get commits for a pull request + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: index + // in: path + // description: index of the pull request to get + // type: integer + // format: int64 + // required: true + // - name: page + // in: query + // description: page number of results to return (1-based) + // type: integer + // - name: limit + // in: query + // description: page size of results + // type: integer + // responses: + // "200": + // "$ref": "#/responses/CommitList" + // "404": + // "$ref": "#/responses/notFound" + + pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) + if err != nil { + if models.IsErrPullRequestNotExist(err) { + ctx.NotFound() + } else { + ctx.Error(http.StatusInternalServerError, "GetPullRequestByIndex", err) + } + return + } + + if err := pr.LoadBaseRepo(); err != nil { + ctx.InternalServerError(err) + return + } + + var prInfo *git.CompareInfo + baseGitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) + if err != nil { + ctx.ServerError("OpenRepository", err) + return + } + defer baseGitRepo.Close() + if pr.HasMerged { + prInfo, err = baseGitRepo.GetCompareInfo(pr.BaseRepo.RepoPath(), pr.MergeBase, pr.GetGitRefName()) + } else { + prInfo, err = baseGitRepo.GetCompareInfo(pr.BaseRepo.RepoPath(), pr.BaseBranch, pr.GetGitRefName()) + } + if err != nil { + ctx.ServerError("GetCompareInfo", err) + return + } + commits := prInfo.Commits + + listOptions := utils.GetListOptions(ctx) + + totalNumberOfCommits := len(commits) + totalNumberOfPages := int(math.Ceil(float64(totalNumberOfCommits) / float64(listOptions.PageSize))) + + userCache := make(map[string]*models.User) + + start, end := listOptions.GetStartEnd() + + if end > totalNumberOfCommits { + end = totalNumberOfCommits + } + + apiCommits := make([]*api.Commit, 0, end-start) + for i := start; i < end; i++ { + apiCommit, err := convert.ToCommit(ctx.Repo.Repository, commits[i], userCache) + if err != nil { + ctx.ServerError("toCommit", err) + return + } + apiCommits = append(apiCommits, apiCommit) + } + + ctx.SetLinkHeader(totalNumberOfCommits, listOptions.PageSize) + ctx.SetTotalCountHeader(int64(totalNumberOfCommits)) + + ctx.Header().Set("X-Page", strconv.Itoa(listOptions.Page)) + ctx.Header().Set("X-PerPage", strconv.Itoa(listOptions.PageSize)) + ctx.Header().Set("X-PageCount", strconv.Itoa(totalNumberOfPages)) + ctx.Header().Set("X-HasMore", strconv.FormatBool(listOptions.Page < totalNumberOfPages)) + ctx.AppendAccessControlExposeHeaders("X-Page", "X-PerPage", "X-PageCount", "X-HasMore") + + ctx.JSON(http.StatusOK, &apiCommits) +} diff --git a/routers/api/v1/repo/pull_review.go b/routers/api/v1/repo/pull_review.go index 9e7fd1566..55b517830 100644 --- a/routers/api/v1/repo/pull_review.go +++ b/routers/api/v1/repo/pull_review.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" issue_service "code.gitea.io/gitea/services/issue" pull_service "code.gitea.io/gitea/services/pull" @@ -77,14 +78,21 @@ func ListPullReviews(ctx *context.APIContext) { return } - allReviews, err := models.FindReviews(models.FindReviewOptions{ + opts := models.FindReviewOptions{ ListOptions: utils.GetListOptions(ctx), Type: models.ReviewTypeUnknown, IssueID: pr.IssueID, - }) + } + allReviews, err := models.FindReviews(opts) if err != nil { - ctx.Error(http.StatusInternalServerError, "FindReviews", err) + ctx.InternalServerError(err) + return + } + + count, err := models.CountReviews(opts) + if err != nil { + ctx.InternalServerError(err) return } @@ -94,6 +102,7 @@ func ListPullReviews(ctx *context.APIContext) { return } + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, &apiReviews) } @@ -258,7 +267,7 @@ func DeletePullReview(ctx *context.APIContext) { } // CreatePullReview create a review to an pull request -func CreatePullReview(ctx *context.APIContext, opts api.CreatePullReviewOptions) { +func CreatePullReview(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/pulls/{index}/reviews repository repoCreatePullReview // --- // summary: Create a review to an pull request @@ -294,6 +303,7 @@ func CreatePullReview(ctx *context.APIContext, opts api.CreatePullReviewOptions) // "422": // "$ref": "#/responses/validationError" + opts := web.GetForm(ctx).(*api.CreatePullReviewOptions) pr, err := models.GetPullRequestByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) if err != nil { if models.IsErrPullRequestNotExist(err) { @@ -305,7 +315,7 @@ func CreatePullReview(ctx *context.APIContext, opts api.CreatePullReviewOptions) } // determine review type - reviewType, isWrong := preparePullReviewType(ctx, pr, opts.Event, opts.Body) + reviewType, isWrong := preparePullReviewType(ctx, pr, opts.Event, opts.Body, len(opts.Comments) > 0) if isWrong { return } @@ -357,7 +367,7 @@ func CreatePullReview(ctx *context.APIContext, opts api.CreatePullReviewOptions) } // create review and associate all pending review comments - review, _, err := pull_service.SubmitReview(ctx.User, ctx.Repo.GitRepo, pr.Issue, reviewType, opts.Body, opts.CommitID) + review, _, err := pull_service.SubmitReview(ctx.User, ctx.Repo.GitRepo, pr.Issue, reviewType, opts.Body, opts.CommitID, nil) if err != nil { ctx.Error(http.StatusInternalServerError, "SubmitReview", err) return @@ -373,7 +383,7 @@ func CreatePullReview(ctx *context.APIContext, opts api.CreatePullReviewOptions) } // SubmitPullReview submit a pending review to an pull request -func SubmitPullReview(ctx *context.APIContext, opts api.SubmitPullReviewOptions) { +func SubmitPullReview(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id} repository repoSubmitPullReview // --- // summary: Submit a pending review to an pull request @@ -415,6 +425,7 @@ func SubmitPullReview(ctx *context.APIContext, opts api.SubmitPullReviewOptions) // "422": // "$ref": "#/responses/validationError" + opts := web.GetForm(ctx).(*api.SubmitPullReviewOptions) review, pr, isWrong := prepareSingleReview(ctx) if isWrong { return @@ -426,7 +437,7 @@ func SubmitPullReview(ctx *context.APIContext, opts api.SubmitPullReviewOptions) } // determine review type - reviewType, isWrong := preparePullReviewType(ctx, pr, opts.Event, opts.Body) + reviewType, isWrong := preparePullReviewType(ctx, pr, opts.Event, opts.Body, len(review.Comments) > 0) if isWrong { return } @@ -444,7 +455,7 @@ func SubmitPullReview(ctx *context.APIContext, opts api.SubmitPullReviewOptions) } // create review and associate all pending review comments - review, _, err = pull_service.SubmitReview(ctx.User, ctx.Repo.GitRepo, pr.Issue, reviewType, opts.Body, headCommitID) + review, _, err = pull_service.SubmitReview(ctx.User, ctx.Repo.GitRepo, pr.Issue, reviewType, opts.Body, headCommitID, nil) if err != nil { ctx.Error(http.StatusInternalServerError, "SubmitReview", err) return @@ -460,12 +471,15 @@ func SubmitPullReview(ctx *context.APIContext, opts api.SubmitPullReviewOptions) } // preparePullReviewType return ReviewType and false or nil and true if an error happen -func preparePullReviewType(ctx *context.APIContext, pr *models.PullRequest, event api.ReviewStateType, body string) (models.ReviewType, bool) { +func preparePullReviewType(ctx *context.APIContext, pr *models.PullRequest, event api.ReviewStateType, body string, hasComments bool) (models.ReviewType, bool) { if err := pr.LoadIssue(); err != nil { ctx.Error(http.StatusInternalServerError, "LoadIssue", err) return -1, true } + needsBody := true + hasBody := len(strings.TrimSpace(body)) > 0 + var reviewType models.ReviewType switch event { case api.ReviewStateApproved: @@ -475,6 +489,7 @@ func preparePullReviewType(ctx *context.APIContext, pr *models.PullRequest, even return -1, true } reviewType = models.ReviewTypeApprove + needsBody = false case api.ReviewStateRequestChanges: // can not reject your own PR @@ -486,13 +501,19 @@ func preparePullReviewType(ctx *context.APIContext, pr *models.PullRequest, even case api.ReviewStateComment: reviewType = models.ReviewTypeComment + needsBody = false + // if there is no body we need to ensure that there are comments + if !hasBody && !hasComments { + ctx.Error(http.StatusUnprocessableEntity, "", fmt.Errorf("review event %s requires a body or a comment", event)) + return -1, true + } default: reviewType = models.ReviewTypePending } - // reject reviews with empty body if not approve type - if reviewType != models.ReviewTypeApprove && len(strings.TrimSpace(body)) == 0 { - ctx.Error(http.StatusUnprocessableEntity, "", fmt.Errorf("review event %s need body", event)) + // reject reviews with empty body if a body is required for this call + if needsBody && !hasBody { + ctx.Error(http.StatusUnprocessableEntity, "", fmt.Errorf("review event %s requires a body", event)) return -1, true } @@ -542,7 +563,7 @@ func prepareSingleReview(ctx *context.APIContext) (*models.Review, *models.PullR } // CreateReviewRequests create review requests to an pull request -func CreateReviewRequests(ctx *context.APIContext, opts api.PullReviewRequestOptions) { +func CreateReviewRequests(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/pulls/{index}/requested_reviewers repository repoCreatePullReviewRequests // --- // summary: create review requests for a pull request @@ -577,11 +598,13 @@ func CreateReviewRequests(ctx *context.APIContext, opts api.PullReviewRequestOpt // "$ref": "#/responses/validationError" // "404": // "$ref": "#/responses/notFound" - apiReviewRequest(ctx, opts, true) + + opts := web.GetForm(ctx).(*api.PullReviewRequestOptions) + apiReviewRequest(ctx, *opts, true) } // DeleteReviewRequests delete review requests to an pull request -func DeleteReviewRequests(ctx *context.APIContext, opts api.PullReviewRequestOptions) { +func DeleteReviewRequests(ctx *context.APIContext) { // swagger:operation DELETE /repos/{owner}/{repo}/pulls/{index}/requested_reviewers repository repoDeletePullReviewRequests // --- // summary: cancel review requests for a pull request @@ -616,7 +639,8 @@ func DeleteReviewRequests(ctx *context.APIContext, opts api.PullReviewRequestOpt // "$ref": "#/responses/validationError" // "404": // "$ref": "#/responses/notFound" - apiReviewRequest(ctx, opts, false) + opts := web.GetForm(ctx).(*api.PullReviewRequestOptions) + apiReviewRequest(ctx, *opts, false) } func apiReviewRequest(ctx *context.APIContext, opts api.PullReviewRequestOptions, isAdd bool) { @@ -751,3 +775,129 @@ func apiReviewRequest(ctx *context.APIContext, opts api.PullReviewRequestOptions return } } + +// DismissPullReview dismiss a review for a pull request +func DismissPullReview(ctx *context.APIContext) { + // swagger:operation POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/dismissals repository repoDismissPullReview + // --- + // summary: Dismiss a review for a pull request + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: index + // in: path + // description: index of the pull request + // type: integer + // format: int64 + // required: true + // - name: id + // in: path + // description: id of the review + // type: integer + // format: int64 + // required: true + // - name: body + // in: body + // required: true + // schema: + // "$ref": "#/definitions/DismissPullReviewOptions" + // responses: + // "200": + // "$ref": "#/responses/PullReview" + // "403": + // "$ref": "#/responses/forbidden" + // "422": + // "$ref": "#/responses/validationError" + opts := web.GetForm(ctx).(*api.DismissPullReviewOptions) + dismissReview(ctx, opts.Message, true) +} + +// UnDismissPullReview cancel to dismiss a review for a pull request +func UnDismissPullReview(ctx *context.APIContext) { + // swagger:operation POST /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals repository repoUnDismissPullReview + // --- + // summary: Cancel to dismiss a review for a pull request + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: index + // in: path + // description: index of the pull request + // type: integer + // format: int64 + // required: true + // - name: id + // in: path + // description: id of the review + // type: integer + // format: int64 + // required: true + // responses: + // "200": + // "$ref": "#/responses/PullReview" + // "403": + // "$ref": "#/responses/forbidden" + // "422": + // "$ref": "#/responses/validationError" + dismissReview(ctx, "", false) +} + +func dismissReview(ctx *context.APIContext, msg string, isDismiss bool) { + if !ctx.Repo.IsAdmin() { + ctx.Error(http.StatusForbidden, "", "Must be repo admin") + return + } + review, pr, isWrong := prepareSingleReview(ctx) + if isWrong { + return + } + + if review.Type != models.ReviewTypeApprove && review.Type != models.ReviewTypeReject { + ctx.Error(http.StatusForbidden, "", "not need to dismiss this review because it's type is not Approve or change request") + return + } + + if pr.Issue.IsClosed { + ctx.Error(http.StatusForbidden, "", "not need to dismiss this review because this pr is closed") + return + } + + _, err := pull_service.DismissReview(review.ID, msg, ctx.User, isDismiss) + if err != nil { + ctx.Error(http.StatusInternalServerError, "pull_service.DismissReview", err) + return + } + + if review, err = models.GetReviewByID(review.ID); err != nil { + ctx.Error(http.StatusInternalServerError, "GetReviewByID", err) + return + } + + // convert response + apiReview, err := convert.ToPullReview(review, ctx.User) + if err != nil { + ctx.Error(http.StatusInternalServerError, "convertToPullReview", err) + return + } + ctx.JSON(http.StatusOK, apiReview) +} diff --git a/routers/api/v1/repo/release.go b/routers/api/v1/repo/release.go index 358cc0114..6438c6e9b 100644 --- a/routers/api/v1/repo/release.go +++ b/routers/api/v1/repo/release.go @@ -11,6 +11,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" releaseservice "code.gitea.io/gitea/services/release" ) @@ -82,6 +83,14 @@ func ListReleases(ctx *context.APIContext) { // description: name of the repo // type: string // required: true + // - name: draft + // in: query + // description: filter (exclude / include) drafts, if you dont have repo write access none will show + // type: boolean + // - name: pre-release + // in: query + // description: filter (exclude / include) pre-releases + // type: boolean // - name: per_page // in: query // description: page size of results, deprecated - use limit @@ -99,15 +108,19 @@ func ListReleases(ctx *context.APIContext) { // "200": // "$ref": "#/responses/ReleaseList" listOptions := utils.GetListOptions(ctx) - if ctx.QueryInt("per_page") != 0 { - listOptions.PageSize = ctx.QueryInt("per_page") + if listOptions.PageSize == 0 && ctx.FormInt("per_page") != 0 { + listOptions.PageSize = ctx.FormInt("per_page") } - releases, err := models.GetReleasesByRepoID(ctx.Repo.Repository.ID, models.FindReleasesOptions{ + opts := models.FindReleasesOptions{ ListOptions: listOptions, IncludeDrafts: ctx.Repo.AccessMode >= models.AccessModeWrite, IncludeTags: false, - }) + IsDraft: ctx.FormOptionalBool("draft"), + IsPreRelease: ctx.FormOptionalBool("pre-release"), + } + + releases, err := models.GetReleasesByRepoID(ctx.Repo.Repository.ID, opts) if err != nil { ctx.Error(http.StatusInternalServerError, "GetReleasesByRepoID", err) return @@ -120,11 +133,20 @@ func ListReleases(ctx *context.APIContext) { } rels[i] = convert.ToRelease(release) } + + filteredCount, err := models.CountReleasesByRepoID(ctx.Repo.Repository.ID, opts) + if err != nil { + ctx.InternalServerError(err) + return + } + + ctx.SetLinkHeader(int(filteredCount), listOptions.PageSize) + ctx.SetTotalCountHeader(filteredCount) ctx.JSON(http.StatusOK, rels) } // CreateRelease create a release -func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) { +func CreateRelease(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/releases repository repoCreateRelease // --- // summary: Create a release @@ -154,7 +176,7 @@ func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) { // "$ref": "#/responses/notFound" // "409": // "$ref": "#/responses/error" - + form := web.GetForm(ctx).(*api.CreateReleaseOption) rel, err := models.GetRelease(ctx.Repo.Repository.ID, form.TagName) if err != nil { if !models.IsErrReleaseNotExist(err) { @@ -178,7 +200,7 @@ func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) { IsTag: false, Repo: ctx.Repo.Repository, } - if err := releaseservice.CreateRelease(ctx.Repo.GitRepo, rel, nil); err != nil { + if err := releaseservice.CreateRelease(ctx.Repo.GitRepo, rel, nil, ""); err != nil { if models.IsErrReleaseAlreadyExist(err) { ctx.Error(http.StatusConflict, "ReleaseAlreadyExist", err) } else { @@ -201,8 +223,8 @@ func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) { rel.Repo = ctx.Repo.Repository rel.Publisher = ctx.User - if err = releaseservice.UpdateReleaseOrCreatReleaseFromTag(ctx.User, ctx.Repo.GitRepo, rel, nil, true); err != nil { - ctx.Error(http.StatusInternalServerError, "UpdateReleaseOrCreatReleaseFromTag", err) + if err = releaseservice.UpdateRelease(ctx.User, ctx.Repo.GitRepo, rel, nil, nil, nil); err != nil { + ctx.Error(http.StatusInternalServerError, "UpdateRelease", err) return } } @@ -210,7 +232,7 @@ func CreateRelease(ctx *context.APIContext, form api.CreateReleaseOption) { } // EditRelease edit a release -func EditRelease(ctx *context.APIContext, form api.EditReleaseOption) { +func EditRelease(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/releases/{id} repository repoEditRelease // --- // summary: Update a release @@ -245,6 +267,7 @@ func EditRelease(ctx *context.APIContext, form api.EditReleaseOption) { // "404": // "$ref": "#/responses/notFound" + form := web.GetForm(ctx).(*api.EditReleaseOption) id := ctx.ParamsInt64(":id") rel, err := models.GetReleaseByID(id) if err != nil && !models.IsErrReleaseNotExist(err) { @@ -275,8 +298,8 @@ func EditRelease(ctx *context.APIContext, form api.EditReleaseOption) { if form.IsPrerelease != nil { rel.IsPrerelease = *form.IsPrerelease } - if err := releaseservice.UpdateReleaseOrCreatReleaseFromTag(ctx.User, ctx.Repo.GitRepo, rel, nil, false); err != nil { - ctx.Error(http.StatusInternalServerError, "UpdateReleaseOrCreatReleaseFromTag", err) + if err := releaseservice.UpdateRelease(ctx.User, ctx.Repo.GitRepo, rel, nil, nil, nil); err != nil { + ctx.Error(http.StatusInternalServerError, "UpdateRelease", err) return } diff --git a/routers/api/v1/repo/release_attachment.go b/routers/api/v1/repo/release_attachment.go index 51e1b160d..083466765 100644 --- a/routers/api/v1/repo/release_attachment.go +++ b/routers/api/v1/repo/release_attachment.go @@ -14,6 +14,7 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/upload" + "code.gitea.io/gitea/modules/web" ) // GetReleaseAttachment gets a single attachment of the release @@ -168,7 +169,7 @@ func CreateReleaseAttachment(ctx *context.APIContext) { } // Get uploaded file from request - file, header, err := ctx.GetFile("attachment") + file, header, err := ctx.Req.FormFile("attachment") if err != nil { ctx.Error(http.StatusInternalServerError, "GetFile", err) return @@ -189,7 +190,7 @@ func CreateReleaseAttachment(ctx *context.APIContext) { } var filename = header.Filename - if query := ctx.Query("name"); query != "" { + if query := ctx.FormString("name"); query != "" { filename = query } @@ -208,7 +209,7 @@ func CreateReleaseAttachment(ctx *context.APIContext) { } // EditReleaseAttachment updates the given attachment -func EditReleaseAttachment(ctx *context.APIContext, form api.EditAttachmentOptions) { +func EditReleaseAttachment(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} repository repoEditReleaseAttachment // --- // summary: Edit a release attachment @@ -247,6 +248,8 @@ func EditReleaseAttachment(ctx *context.APIContext, form api.EditAttachmentOptio // "201": // "$ref": "#/responses/Attachment" + form := web.GetForm(ctx).(*api.EditAttachmentOptions) + // Check if release exists an load release releaseID := ctx.ParamsInt64(":id") attachID := ctx.ParamsInt64(":asset") diff --git a/routers/api/v1/repo/release_tags.go b/routers/api/v1/repo/release_tags.go index ef07ce5e1..4b853d44b 100644 --- a/routers/api/v1/repo/release_tags.go +++ b/routers/api/v1/repo/release_tags.go @@ -5,7 +5,6 @@ package repo import ( - "errors" "net/http" "code.gitea.io/gitea/models" @@ -14,9 +13,9 @@ import ( releaseservice "code.gitea.io/gitea/services/release" ) -// GetReleaseTag get a single release of a repository by its tagname -func GetReleaseTag(ctx *context.APIContext) { - // swagger:operation GET /repos/{owner}/{repo}/releases/tags/{tag} repository repoGetReleaseTag +// GetReleaseByTag get a single release of a repository by tag name +func GetReleaseByTag(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/releases/tags/{tag} repository repoGetReleaseByTag // --- // summary: Get a release by tag name // produces: @@ -34,7 +33,7 @@ func GetReleaseTag(ctx *context.APIContext) { // required: true // - name: tag // in: path - // description: tagname of the release to get + // description: tag name of the release to get // type: string // required: true // responses: @@ -48,25 +47,30 @@ func GetReleaseTag(ctx *context.APIContext) { release, err := models.GetRelease(ctx.Repo.Repository.ID, tag) if err != nil { if models.IsErrReleaseNotExist(err) { - ctx.Error(http.StatusNotFound, "GetRelease", err) + ctx.NotFound() return } ctx.Error(http.StatusInternalServerError, "GetRelease", err) return } - if err := release.LoadAttributes(); err != nil { + if release.IsTag { + ctx.NotFound() + return + } + + if err = release.LoadAttributes(); err != nil { ctx.Error(http.StatusInternalServerError, "LoadAttributes", err) return } ctx.JSON(http.StatusOK, convert.ToRelease(release)) } -// DeleteReleaseTag delete a tag from a repository -func DeleteReleaseTag(ctx *context.APIContext) { - // swagger:operation DELETE /repos/{owner}/{repo}/releases/tags/{tag} repository repoDeleteReleaseTag +// DeleteReleaseByTag delete a release from a repository by tag name +func DeleteReleaseByTag(ctx *context.APIContext) { + // swagger:operation DELETE /repos/{owner}/{repo}/releases/tags/{tag} repository repoDeleteReleaseByTag // --- - // summary: Delete a release tag + // summary: Delete a release by tag name // parameters: // - name: owner // in: path @@ -80,7 +84,7 @@ func DeleteReleaseTag(ctx *context.APIContext) { // required: true // - name: tag // in: path - // description: name of the tag to delete + // description: tag name of the release to delete // type: string // required: true // responses: @@ -88,27 +92,25 @@ func DeleteReleaseTag(ctx *context.APIContext) { // "$ref": "#/responses/empty" // "404": // "$ref": "#/responses/notFound" - // "409": - // "$ref": "#/responses/conflict" tag := ctx.Params(":tag") release, err := models.GetRelease(ctx.Repo.Repository.ID, tag) if err != nil { if models.IsErrReleaseNotExist(err) { - ctx.Error(http.StatusNotFound, "GetRelease", err) + ctx.NotFound() return } ctx.Error(http.StatusInternalServerError, "GetRelease", err) return } - if !release.IsTag { - ctx.Error(http.StatusConflict, "IsTag", errors.New("a tag attached to a release cannot be deleted directly")) + if release.IsTag { + ctx.NotFound() return } - if err := releaseservice.DeleteReleaseByID(release.ID, ctx.User, true); err != nil { + if err = releaseservice.DeleteReleaseByID(release.ID, ctx.User, false); err != nil { ctx.Error(http.StatusInternalServerError, "DeleteReleaseByID", err) } diff --git a/routers/api/v1/repo/repo.go b/routers/api/v1/repo/repo.go index 82d380a81..0f85d917d 100644 --- a/routers/api/v1/repo/repo.go +++ b/routers/api/v1/repo/repo.go @@ -20,6 +20,7 @@ import ( api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/validation" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" repo_service "code.gitea.io/gitea/services/repository" ) @@ -134,27 +135,27 @@ func Search(ctx *context.APIContext) { opts := &models.SearchRepoOptions{ ListOptions: utils.GetListOptions(ctx), Actor: ctx.User, - Keyword: strings.Trim(ctx.Query("q"), " "), - OwnerID: ctx.QueryInt64("uid"), - PriorityOwnerID: ctx.QueryInt64("priority_owner_id"), - TeamID: ctx.QueryInt64("team_id"), - TopicOnly: ctx.QueryBool("topic"), + Keyword: ctx.FormTrim("q"), + OwnerID: ctx.FormInt64("uid"), + PriorityOwnerID: ctx.FormInt64("priority_owner_id"), + TeamID: ctx.FormInt64("team_id"), + TopicOnly: ctx.FormBool("topic"), Collaborate: util.OptionalBoolNone, - Private: ctx.IsSigned && (ctx.Query("private") == "" || ctx.QueryBool("private")), + Private: ctx.IsSigned && (ctx.FormString("private") == "" || ctx.FormBool("private")), Template: util.OptionalBoolNone, - StarredByID: ctx.QueryInt64("starredBy"), - IncludeDescription: ctx.QueryBool("includeDesc"), + StarredByID: ctx.FormInt64("starredBy"), + IncludeDescription: ctx.FormBool("includeDesc"), } - if ctx.Query("template") != "" { - opts.Template = util.OptionalBoolOf(ctx.QueryBool("template")) + if ctx.FormString("template") != "" { + opts.Template = util.OptionalBoolOf(ctx.FormBool("template")) } - if ctx.QueryBool("exclusive") { + if ctx.FormBool("exclusive") { opts.Collaborate = util.OptionalBoolFalse } - var mode = ctx.Query("mode") + var mode = ctx.FormString("mode") switch mode { case "source": opts.Fork = util.OptionalBoolFalse @@ -172,17 +173,17 @@ func Search(ctx *context.APIContext) { return } - if ctx.Query("archived") != "" { - opts.Archived = util.OptionalBoolOf(ctx.QueryBool("archived")) + if ctx.FormString("archived") != "" { + opts.Archived = util.OptionalBoolOf(ctx.FormBool("archived")) } - if ctx.Query("is_private") != "" { - opts.IsPrivate = util.OptionalBoolOf(ctx.QueryBool("is_private")) + if ctx.FormString("is_private") != "" { + opts.IsPrivate = util.OptionalBoolOf(ctx.FormBool("is_private")) } - var sortMode = ctx.Query("sort") + var sortMode = ctx.FormString("sort") if len(sortMode) > 0 { - var sortOrder = ctx.Query("order") + var sortOrder = ctx.FormString("order") if len(sortOrder) == 0 { sortOrder = "asc" } @@ -229,8 +230,7 @@ func Search(ctx *context.APIContext) { } ctx.SetLinkHeader(int(count), opts.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", count)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, api.SearchResults{ OK: true, Data: results, @@ -277,7 +277,7 @@ func CreateUserRepo(ctx *context.APIContext, owner *models.User, opt api.CreateR } // Create one repository of mine -func Create(ctx *context.APIContext, opt api.CreateRepoOption) { +func Create(ctx *context.APIContext) { // swagger:operation POST /user/repos repository user createCurrentUserRepo // --- // summary: Create a repository @@ -297,17 +297,131 @@ func Create(ctx *context.APIContext, opt api.CreateRepoOption) { // description: The repository with the same name already exists. // "422": // "$ref": "#/responses/validationError" - + opt := web.GetForm(ctx).(*api.CreateRepoOption) if ctx.User.IsOrganization() { // Shouldn't reach this condition, but just in case. ctx.Error(http.StatusUnprocessableEntity, "", "not allowed creating repository for organization") return } - CreateUserRepo(ctx, ctx.User, opt) + CreateUserRepo(ctx, ctx.User, *opt) +} + +// Generate Create a repository using a template +func Generate(ctx *context.APIContext) { + // swagger:operation POST /repos/{template_owner}/{template_repo}/generate repository generateRepo + // --- + // summary: Create a repository using a template + // consumes: + // - application/json + // produces: + // - application/json + // parameters: + // - name: template_owner + // in: path + // description: name of the template repository owner + // type: string + // required: true + // - name: template_repo + // in: path + // description: name of the template repository + // type: string + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/GenerateRepoOption" + // responses: + // "201": + // "$ref": "#/responses/Repository" + // "403": + // "$ref": "#/responses/forbidden" + // "404": + // "$ref": "#/responses/notFound" + // "409": + // description: The repository with the same name already exists. + // "422": + // "$ref": "#/responses/validationError" + form := web.GetForm(ctx).(*api.GenerateRepoOption) + + if !ctx.Repo.Repository.IsTemplate { + ctx.Error(http.StatusUnprocessableEntity, "", "this is not a template repo") + return + } + + if ctx.User.IsOrganization() { + ctx.Error(http.StatusUnprocessableEntity, "", "not allowed creating repository for organization") + return + } + + opts := models.GenerateRepoOptions{ + Name: form.Name, + Description: form.Description, + Private: form.Private, + GitContent: form.GitContent, + Topics: form.Topics, + GitHooks: form.GitHooks, + Webhooks: form.Webhooks, + Avatar: form.Avatar, + IssueLabels: form.Labels, + } + + if !opts.IsValid() { + ctx.Error(http.StatusUnprocessableEntity, "", "must select at least one template item") + return + } + + ctxUser := ctx.User + var err error + if form.Owner != ctxUser.Name { + ctxUser, err = models.GetUserByName(form.Owner) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.JSON(http.StatusNotFound, map[string]interface{}{ + "error": "request owner `" + form.Owner + "` does not exist", + }) + return + } + + ctx.Error(http.StatusInternalServerError, "GetUserByName", err) + return + } + + if !ctx.User.IsAdmin && !ctxUser.IsOrganization() { + ctx.Error(http.StatusForbidden, "", "Only admin can generate repository for other user.") + return + } + + if !ctx.User.IsAdmin { + canCreate, err := ctxUser.CanCreateOrgRepo(ctx.User.ID) + if err != nil { + ctx.ServerError("CanCreateOrgRepo", err) + return + } else if !canCreate { + ctx.Error(http.StatusForbidden, "", "Given user is not allowed to create repository in organization.") + return + } + } + } + + repo, err := repo_service.GenerateRepository(ctx.User, ctxUser, ctx.Repo.Repository, opts) + if err != nil { + if models.IsErrRepoAlreadyExist(err) { + ctx.Error(http.StatusConflict, "", "The repository with the same name already exists.") + } else if models.IsErrNameReserved(err) || + models.IsErrNamePatternNotAllowed(err) { + ctx.Error(http.StatusUnprocessableEntity, "", err) + } else { + ctx.Error(http.StatusInternalServerError, "CreateRepository", err) + } + return + } + log.Trace("Repository generated [%d]: %s/%s", repo.ID, ctxUser.Name, repo.Name) + + ctx.JSON(http.StatusCreated, convert.ToRepo(repo, models.AccessModeOwner)) } // CreateOrgRepoDeprecated create one repository of the organization -func CreateOrgRepoDeprecated(ctx *context.APIContext, opt api.CreateRepoOption) { +func CreateOrgRepoDeprecated(ctx *context.APIContext) { // swagger:operation POST /org/{org}/repos organization createOrgRepoDeprecated // --- // summary: Create a repository in an organization @@ -334,11 +448,11 @@ func CreateOrgRepoDeprecated(ctx *context.APIContext, opt api.CreateRepoOption) // "403": // "$ref": "#/responses/forbidden" - CreateOrgRepo(ctx, opt) + CreateOrgRepo(ctx) } // CreateOrgRepo create one repository of the organization -func CreateOrgRepo(ctx *context.APIContext, opt api.CreateRepoOption) { +func CreateOrgRepo(ctx *context.APIContext) { // swagger:operation POST /orgs/{org}/repos organization createOrgRepo // --- // summary: Create a repository in an organization @@ -363,7 +477,7 @@ func CreateOrgRepo(ctx *context.APIContext, opt api.CreateRepoOption) { // "$ref": "#/responses/notFound" // "403": // "$ref": "#/responses/forbidden" - + opt := web.GetForm(ctx).(*api.CreateRepoOption) org, err := models.GetOrgByName(ctx.Params(":org")) if err != nil { if models.IsErrOrgNotExist(err) { @@ -374,8 +488,8 @@ func CreateOrgRepo(ctx *context.APIContext, opt api.CreateRepoOption) { return } - if !models.HasOrgVisible(org, ctx.User) { - ctx.NotFound("HasOrgVisible", nil) + if !models.HasOrgOrUserVisible(org, ctx.User) { + ctx.NotFound("HasOrgOrUserVisible", nil) return } @@ -389,7 +503,7 @@ func CreateOrgRepo(ctx *context.APIContext, opt api.CreateRepoOption) { return } } - CreateUserRepo(ctx, org, opt) + CreateUserRepo(ctx, org, *opt) } // Get one repository @@ -457,7 +571,7 @@ func GetByID(ctx *context.APIContext) { } // Edit edit repository properties -func Edit(ctx *context.APIContext, opts api.EditRepoOption) { +func Edit(ctx *context.APIContext) { // swagger:operation PATCH /repos/{owner}/{repo} repository repoEdit // --- // summary: Edit a repository's properties. Only fields that are set will be changed. @@ -488,6 +602,8 @@ func Edit(ctx *context.APIContext, opts api.EditRepoOption) { // "422": // "$ref": "#/responses/validationError" + opts := *web.GetForm(ctx).(*api.EditRepoOption) + if err := updateBasicProperties(ctx, opts); err != nil { return } @@ -508,7 +624,13 @@ func Edit(ctx *context.APIContext, opts api.EditRepoOption) { } } - ctx.JSON(http.StatusOK, convert.ToRepo(ctx.Repo.Repository, ctx.Repo.AccessMode)) + repo, err := models.GetRepositoryByID(ctx.Repo.Repository.ID) + if err != nil { + ctx.InternalServerError(err) + return + } + + ctx.JSON(http.StatusOK, convert.ToRepo(repo, ctx.Repo.AccessMode)) } // updateBasicProperties updates the basic properties of a repo: Name, Description, Website and Visibility @@ -553,6 +675,10 @@ func updateBasicProperties(ctx *context.APIContext, opts api.EditRepoOption) err if opts.Private != nil { // Visibility of forked repository is forced sync with base repository. if repo.IsFork { + if err := repo.GetBaseRepo(); err != nil { + ctx.Error(http.StatusInternalServerError, "Unable to load base repository", err) + return err + } *opts.Private = repo.BaseRepo.IsPrivate } @@ -571,12 +697,24 @@ func updateBasicProperties(ctx *context.APIContext, opts api.EditRepoOption) err repo.IsTemplate = *opts.Template } - // Default branch only updated if changed and exist - if opts.DefaultBranch != nil && repo.DefaultBranch != *opts.DefaultBranch && ctx.Repo.GitRepo.IsBranchExist(*opts.DefaultBranch) { - if err := ctx.Repo.GitRepo.SetDefaultBranch(*opts.DefaultBranch); err != nil { - if !git.IsErrUnsupportedVersion(err) { - ctx.Error(http.StatusInternalServerError, "SetDefaultBranch", err) - return err + if ctx.Repo.GitRepo == nil && !repo.IsEmpty { + var err error + ctx.Repo.GitRepo, err = git.OpenRepository(ctx.Repo.Repository.RepoPath()) + if err != nil { + ctx.Error(http.StatusInternalServerError, "Unable to OpenRepository", err) + return err + } + defer ctx.Repo.GitRepo.Close() + } + + // Default branch only updated if changed and exist or the repository is empty + if opts.DefaultBranch != nil && repo.DefaultBranch != *opts.DefaultBranch && (repo.IsEmpty || ctx.Repo.GitRepo.IsBranchExist(*opts.DefaultBranch)) { + if !repo.IsEmpty { + if err := ctx.Repo.GitRepo.SetDefaultBranch(*opts.DefaultBranch); err != nil { + if !git.IsErrUnsupportedVersion(err) { + ctx.Error(http.StatusInternalServerError, "SetDefaultBranch", err) + return err + } } } repo.DefaultBranch = *opts.DefaultBranch @@ -705,11 +843,15 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { if err != nil { // Unit type doesn't exist so we make a new config file with default values config = &models.PullRequestsConfig{ - IgnoreWhitespaceConflicts: false, - AllowMerge: true, - AllowRebase: true, - AllowRebaseMerge: true, - AllowSquash: true, + IgnoreWhitespaceConflicts: false, + AllowMerge: true, + AllowRebase: true, + AllowRebaseMerge: true, + AllowSquash: true, + AllowManualMerge: true, + AutodetectManualMerge: false, + DefaultDeleteBranchAfterMerge: false, + DefaultMergeStyle: models.MergeStyleMerge, } } else { config = unit.PullRequestsConfig() @@ -730,6 +872,18 @@ func updateRepoUnits(ctx *context.APIContext, opts api.EditRepoOption) error { if opts.AllowSquash != nil { config.AllowSquash = *opts.AllowSquash } + if opts.AllowManualMerge != nil { + config.AllowManualMerge = *opts.AllowManualMerge + } + if opts.AutodetectManualMerge != nil { + config.AutodetectManualMerge = *opts.AutodetectManualMerge + } + if opts.DefaultDeleteBranchAfterMerge != nil { + config.DefaultDeleteBranchAfterMerge = *opts.DefaultDeleteBranchAfterMerge + } + if opts.DefaultMergeStyle != nil { + config.DefaultMergeStyle = models.MergeStyle(*opts.DefaultMergeStyle) + } units = append(units, models.RepoUnit{ RepoID: repo.ID, @@ -858,6 +1012,10 @@ func Delete(ctx *context.APIContext) { return } + if ctx.Repo.GitRepo != nil { + ctx.Repo.GitRepo.Close() + } + if err := repo_service.DeleteRepository(ctx.User, repo); err != nil { ctx.Error(http.StatusInternalServerError, "DeleteRepository", err) return diff --git a/routers/api/v1/repo/repo_test.go b/routers/api/v1/repo/repo_test.go index 053134ec6..a1bd3e85d 100644 --- a/routers/api/v1/repo/repo_test.go +++ b/routers/api/v1/repo/repo_test.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/context" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/modules/web" "github.com/stretchr/testify/assert" ) @@ -53,7 +54,9 @@ func TestRepoEdit(t *testing.T) { Archived: &archived, } - Edit(&context.APIContext{Context: ctx, Org: nil}, opts) + var apiCtx = &context.APIContext{Context: ctx, Org: nil} + web.SetForm(apiCtx, &opts) + Edit(apiCtx) assert.EqualValues(t, http.StatusOK, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.Repository{ @@ -73,7 +76,9 @@ func TestRepoEditNameChange(t *testing.T) { Name: &name, } - Edit(&context.APIContext{Context: ctx, Org: nil}, opts) + var apiCtx = &context.APIContext{Context: ctx, Org: nil} + web.SetForm(apiCtx, &opts) + Edit(apiCtx) assert.EqualValues(t, http.StatusOK, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.Repository{ diff --git a/routers/api/v1/repo/star.go b/routers/api/v1/repo/star.go index 774b32647..5fa42c324 100644 --- a/routers/api/v1/repo/star.go +++ b/routers/api/v1/repo/star.go @@ -50,7 +50,9 @@ func ListStargazers(ctx *context.APIContext) { } users := make([]*api.User, len(stargazers)) for i, stargazer := range stargazers { - users[i] = convert.ToUser(stargazer, ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin) + users[i] = convert.ToUser(stargazer, ctx.User) } + + ctx.SetTotalCountHeader(int64(ctx.Repo.Repository.NumStars)) ctx.JSON(http.StatusOK, users) } diff --git a/routers/api/v1/repo/status.go b/routers/api/v1/repo/status.go index 9c0d902f7..b884432f7 100644 --- a/routers/api/v1/repo/status.go +++ b/routers/api/v1/repo/status.go @@ -13,11 +13,12 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/repofiles" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) // NewCommitStatus creates a new CommitStatus -func NewCommitStatus(ctx *context.APIContext, form api.CreateStatusOption) { +func NewCommitStatus(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/statuses/{sha} repository repoCreateStatus // --- // summary: Create a commit status @@ -49,6 +50,7 @@ func NewCommitStatus(ctx *context.APIContext, form api.CreateStatusOption) { // "400": // "$ref": "#/responses/error" + form := web.GetForm(ctx).(*api.CreateStatusOption) sha := ctx.Params("sha") if len(sha) == 0 { ctx.Error(http.StatusBadRequest, "sha not given", nil) @@ -169,39 +171,14 @@ func GetCommitStatusesByRef(ctx *context.APIContext) { // "400": // "$ref": "#/responses/error" - filter := ctx.Params("ref") - if len(filter) == 0 { - ctx.Error(http.StatusBadRequest, "ref not given", nil) + filter := utils.ResolveRefOrSha(ctx, ctx.Params("ref")) + if ctx.Written() { return } - for _, reftype := range []string{"heads", "tags"} { //Search branches and tags - refSHA, lastMethodName, err := searchRefCommitByType(ctx, reftype, filter) - if err != nil { - ctx.Error(http.StatusInternalServerError, lastMethodName, err) - return - } - if refSHA != "" { - filter = refSHA - break - } - - } - getCommitStatuses(ctx, filter) //By default filter is maybe the raw SHA } -func searchRefCommitByType(ctx *context.APIContext, refType, filter string) (string, string, error) { - refs, lastMethodName, err := getGitRefs(ctx, refType+"/"+filter) //Search by type - if err != nil { - return "", lastMethodName, err - } - if len(refs) > 0 { - return refs[0].Object.String(), "", nil //Return found SHA - } - return "", "", nil -} - func getCommitStatuses(ctx *context.APIContext, sha string) { if len(sha) == 0 { ctx.Error(http.StatusBadRequest, "ref/sha not given", nil) @@ -213,11 +190,11 @@ func getCommitStatuses(ctx *context.APIContext, sha string) { statuses, maxResults, err := models.GetCommitStatuses(repo, sha, &models.CommitStatusOptions{ ListOptions: listOptions, - SortType: ctx.QueryTrim("sort"), - State: ctx.QueryTrim("state"), + SortType: ctx.FormTrim("sort"), + State: ctx.FormTrim("state"), }) if err != nil { - ctx.Error(http.StatusInternalServerError, "GetCommitStatuses", fmt.Errorf("GetCommitStatuses[%s, %s, %d]: %v", repo.FullName(), sha, ctx.QueryInt("page"), err)) + ctx.Error(http.StatusInternalServerError, "GetCommitStatuses", fmt.Errorf("GetCommitStatuses[%s, %s, %d]: %v", repo.FullName(), sha, ctx.FormInt("page"), err)) return } @@ -227,8 +204,7 @@ func getCommitStatuses(ctx *context.APIContext, sha string) { } ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, apiStatuses) } @@ -270,11 +246,11 @@ func GetCombinedCommitStatusByRef(ctx *context.APIContext) { // "400": // "$ref": "#/responses/error" - sha := ctx.Params("ref") - if len(sha) == 0 { - ctx.Error(http.StatusBadRequest, "ref/sha not given", nil) + sha := utils.ResolveRefOrSha(ctx, ctx.Params("ref")) + if ctx.Written() { return } + repo := ctx.Repo.Repository statuses, err := models.GetLatestCommitStatus(repo.ID, sha, utils.GetListOptions(ctx)) @@ -290,5 +266,6 @@ func GetCombinedCommitStatusByRef(ctx *context.APIContext) { combiStatus := convert.ToCombinedStatus(statuses, convert.ToRepo(repo, ctx.Repo.AccessMode)) + // TODO: ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, combiStatus) } diff --git a/routers/api/v1/repo/subscriber.go b/routers/api/v1/repo/subscriber.go index ac61710bd..dae92969b 100644 --- a/routers/api/v1/repo/subscriber.go +++ b/routers/api/v1/repo/subscriber.go @@ -50,7 +50,9 @@ func ListSubscribers(ctx *context.APIContext) { } users := make([]*api.User, len(subscribers)) for i, subscriber := range subscribers { - users[i] = convert.ToUser(subscriber, ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin) + users[i] = convert.ToUser(subscriber, ctx.User) } + + ctx.SetTotalCountHeader(int64(ctx.Repo.Repository.NumWatches)) ctx.JSON(http.StatusOK, users) } diff --git a/routers/api/v1/repo/tag.go b/routers/api/v1/repo/tag.go index 76c612bea..8d42e63a4 100644 --- a/routers/api/v1/repo/tag.go +++ b/routers/api/v1/repo/tag.go @@ -5,12 +5,17 @@ package repo import ( + "errors" + "fmt" "net/http" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" + releaseservice "code.gitea.io/gitea/services/release" ) // ListTags list all the tags of a repository @@ -45,7 +50,7 @@ func ListTags(ctx *context.APIContext) { listOpts := utils.GetListOptions(ctx) - tags, err := ctx.Repo.GitRepo.GetTagInfos(listOpts.Page, listOpts.PageSize) + tags, total, err := ctx.Repo.GitRepo.GetTagInfos(listOpts.Page, listOpts.PageSize) if err != nil { ctx.Error(http.StatusInternalServerError, "GetTags", err) return @@ -56,12 +61,13 @@ func ListTags(ctx *context.APIContext) { apiTags[i] = convert.ToTag(ctx.Repo.Repository, tags[i]) } + ctx.SetTotalCountHeader(int64(total)) ctx.JSON(http.StatusOK, &apiTags) } -// GetTag get the tag of a repository. -func GetTag(ctx *context.APIContext) { - // swagger:operation GET /repos/{owner}/{repo}/git/tags/{sha} repository GetTag +// GetAnnotatedTag get the tag of a repository. +func GetAnnotatedTag(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/git/tags/{sha} repository GetAnnotatedTag // --- // summary: Gets the tag object of an annotated tag (not lightweight tags) // produces: @@ -95,12 +101,163 @@ func GetTag(ctx *context.APIContext) { } if tag, err := ctx.Repo.GitRepo.GetAnnotatedTag(sha); err != nil { - ctx.Error(http.StatusBadRequest, "GetTag", err) + ctx.Error(http.StatusBadRequest, "GetAnnotatedTag", err) } else { commit, err := tag.Commit() if err != nil { - ctx.Error(http.StatusBadRequest, "GetTag", err) + ctx.Error(http.StatusBadRequest, "GetAnnotatedTag", err) } ctx.JSON(http.StatusOK, convert.ToAnnotatedTag(ctx.Repo.Repository, tag, commit)) } } + +// GetTag get the tag of a repository +func GetTag(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/tags/{tag} repository repoGetTag + // --- + // summary: Get the tag of a repository by tag name + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: tag + // in: path + // description: name of tag + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/Tag" + // "404": + // "$ref": "#/responses/notFound" + tagName := ctx.Params("*") + + tag, err := ctx.Repo.GitRepo.GetTag(tagName) + if err != nil { + ctx.NotFound(tagName) + return + } + ctx.JSON(http.StatusOK, convert.ToTag(ctx.Repo.Repository, tag)) +} + +// CreateTag create a new git tag in a repository +func CreateTag(ctx *context.APIContext) { + // swagger:operation POST /repos/{owner}/{repo}/tags repository repoCreateTag + // --- + // summary: Create a new git tag in a repository + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/CreateTagOption" + // responses: + // "200": + // "$ref": "#/responses/Tag" + // "404": + // "$ref": "#/responses/notFound" + // "409": + // "$ref": "#/responses/conflict" + form := web.GetForm(ctx).(*api.CreateTagOption) + + // If target is not provided use default branch + if len(form.Target) == 0 { + form.Target = ctx.Repo.Repository.DefaultBranch + } + + commit, err := ctx.Repo.GitRepo.GetCommit(form.Target) + if err != nil { + ctx.Error(http.StatusNotFound, "target not found", fmt.Errorf("target not found: %v", err)) + return + } + + if err := releaseservice.CreateNewTag(ctx.User, ctx.Repo.Repository, commit.ID.String(), form.TagName, form.Message); err != nil { + if models.IsErrTagAlreadyExists(err) { + ctx.Error(http.StatusConflict, "tag exist", err) + return + } + ctx.InternalServerError(err) + return + } + + tag, err := ctx.Repo.GitRepo.GetTag(form.TagName) + if err != nil { + ctx.InternalServerError(err) + return + } + ctx.JSON(http.StatusCreated, convert.ToTag(ctx.Repo.Repository, tag)) +} + +// DeleteTag delete a specific tag of in a repository by name +func DeleteTag(ctx *context.APIContext) { + // swagger:operation DELETE /repos/{owner}/{repo}/tags/{tag} repository repoDeleteTag + // --- + // summary: Delete a repository's tag by name + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: tag + // in: path + // description: name of tag to delete + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" + // "409": + // "$ref": "#/responses/conflict" + tagName := ctx.Params("*") + + tag, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) + if err != nil { + if models.IsErrReleaseNotExist(err) { + ctx.NotFound() + return + } + ctx.Error(http.StatusInternalServerError, "GetRelease", err) + return + } + + if !tag.IsTag { + ctx.Error(http.StatusConflict, "IsTag", errors.New("a tag attached to a release cannot be deleted directly")) + return + } + + if err = releaseservice.DeleteReleaseByID(tag.ID, ctx.User, true); err != nil { + ctx.Error(http.StatusInternalServerError, "DeleteReleaseByID", err) + } + + ctx.Status(http.StatusNoContent) +} diff --git a/routers/api/v1/repo/teams.go b/routers/api/v1/repo/teams.go new file mode 100644 index 000000000..1348205ec --- /dev/null +++ b/routers/api/v1/repo/teams.go @@ -0,0 +1,233 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "fmt" + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" + api "code.gitea.io/gitea/modules/structs" +) + +// ListTeams list a repository's teams +func ListTeams(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/teams repository repoListTeams + // --- + // summary: List a repository's teams + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/TeamList" + + if !ctx.Repo.Owner.IsOrganization() { + ctx.Error(http.StatusMethodNotAllowed, "noOrg", "repo is not owned by an organization") + return + } + + teams, err := ctx.Repo.Repository.GetRepoTeams() + if err != nil { + ctx.InternalServerError(err) + return + } + + apiTeams := make([]*api.Team, len(teams)) + for i := range teams { + if err := teams[i].GetUnits(); err != nil { + ctx.Error(http.StatusInternalServerError, "GetUnits", err) + return + } + + apiTeams[i] = convert.ToTeam(teams[i]) + } + + ctx.JSON(http.StatusOK, apiTeams) +} + +// IsTeam check if a team is assigned to a repository +func IsTeam(ctx *context.APIContext) { + // swagger:operation GET /repos/{owner}/{repo}/teams/{team} repository repoCheckTeam + // --- + // summary: Check if a team is assigned to a repository + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: team + // in: path + // description: team name + // type: string + // required: true + // responses: + // "200": + // "$ref": "#/responses/Team" + // "404": + // "$ref": "#/responses/notFound" + // "405": + // "$ref": "#/responses/error" + + if !ctx.Repo.Owner.IsOrganization() { + ctx.Error(http.StatusMethodNotAllowed, "noOrg", "repo is not owned by an organization") + return + } + + team := getTeamByParam(ctx) + if team == nil { + return + } + + if team.HasRepository(ctx.Repo.Repository.ID) { + if err := team.GetUnits(); err != nil { + ctx.Error(http.StatusInternalServerError, "GetUnits", err) + return + } + apiTeam := convert.ToTeam(team) + ctx.JSON(http.StatusOK, apiTeam) + return + } + + ctx.NotFound() +} + +// AddTeam add a team to a repository +func AddTeam(ctx *context.APIContext) { + // swagger:operation PUT /repos/{owner}/{repo}/teams/{team} repository repoAddTeam + // --- + // summary: Add a team to a repository + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: team + // in: path + // description: team name + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "422": + // "$ref": "#/responses/validationError" + // "405": + // "$ref": "#/responses/error" + + changeRepoTeam(ctx, true) +} + +// DeleteTeam delete a team from a repository +func DeleteTeam(ctx *context.APIContext) { + // swagger:operation DELETE /repos/{owner}/{repo}/teams/{team} repository repoDeleteTeam + // --- + // summary: Delete a team from a repository + // produces: + // - application/json + // parameters: + // - name: owner + // in: path + // description: owner of the repo + // type: string + // required: true + // - name: repo + // in: path + // description: name of the repo + // type: string + // required: true + // - name: team + // in: path + // description: team name + // type: string + // required: true + // responses: + // "204": + // "$ref": "#/responses/empty" + // "422": + // "$ref": "#/responses/validationError" + // "405": + // "$ref": "#/responses/error" + + changeRepoTeam(ctx, false) +} + +func changeRepoTeam(ctx *context.APIContext, add bool) { + if !ctx.Repo.Owner.IsOrganization() { + ctx.Error(http.StatusMethodNotAllowed, "noOrg", "repo is not owned by an organization") + } + if !ctx.Repo.Owner.RepoAdminChangeTeamAccess && !ctx.Repo.IsOwner() { + ctx.Error(http.StatusForbidden, "noAdmin", "user is nor repo admin nor owner") + return + } + + team := getTeamByParam(ctx) + if team == nil { + return + } + + repoHasTeam := team.HasRepository(ctx.Repo.Repository.ID) + var err error + if add { + if repoHasTeam { + ctx.Error(http.StatusUnprocessableEntity, "alreadyAdded", fmt.Errorf("team '%s' is already added to repo", team.Name)) + return + } + err = team.AddRepository(ctx.Repo.Repository) + } else { + if !repoHasTeam { + ctx.Error(http.StatusUnprocessableEntity, "notAdded", fmt.Errorf("team '%s' was not added to repo", team.Name)) + return + } + err = team.RemoveRepository(ctx.Repo.Repository.ID) + } + if err != nil { + ctx.InternalServerError(err) + return + } + + ctx.Status(http.StatusNoContent) +} + +func getTeamByParam(ctx *context.APIContext) *models.Team { + team, err := models.GetTeam(ctx.Repo.Owner.ID, ctx.Params(":team")) + if err != nil { + if models.IsErrTeamNotExist(err) { + ctx.Error(http.StatusNotFound, "TeamNotExit", err) + return nil + } + ctx.InternalServerError(err) + return nil + } + return team +} diff --git a/routers/api/v1/repo/topic.go b/routers/api/v1/repo/topic.go index 41fa37a2c..fc277cb3f 100644 --- a/routers/api/v1/repo/topic.go +++ b/routers/api/v1/repo/topic.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/log" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -46,12 +47,13 @@ func ListTopics(ctx *context.APIContext) { // "200": // "$ref": "#/responses/TopicNames" - topics, err := models.FindTopics(&models.FindTopicOptions{ + opts := &models.FindTopicOptions{ ListOptions: utils.GetListOptions(ctx), RepoID: ctx.Repo.Repository.ID, - }) + } + + topics, total, err := models.FindTopics(opts) if err != nil { - log.Error("ListTopics failed: %v", err) ctx.InternalServerError(err) return } @@ -60,13 +62,15 @@ func ListTopics(ctx *context.APIContext) { for i, topic := range topics { topicNames[i] = topic.Name } + + ctx.SetTotalCountHeader(total) ctx.JSON(http.StatusOK, map[string]interface{}{ "topics": topicNames, }) } // UpdateTopics updates repo with a new set of topics -func UpdateTopics(ctx *context.APIContext, form api.RepoTopicOptions) { +func UpdateTopics(ctx *context.APIContext) { // swagger:operation PUT /repos/{owner}/{repo}/topics repository repoUpdateTopics // --- // summary: Replace list of topics for a repository @@ -93,6 +97,7 @@ func UpdateTopics(ctx *context.APIContext, form api.RepoTopicOptions) { // "422": // "$ref": "#/responses/invalidTopicsError" + form := web.GetForm(ctx).(*api.RepoTopicOptions) topicNames := form.Topics validTopics, invalidTopics := models.SanitizeAndValidateTopics(topicNames) @@ -124,7 +129,7 @@ func UpdateTopics(ctx *context.APIContext, form api.RepoTopicOptions) { // AddTopic adds a topic name to a repo func AddTopic(ctx *context.APIContext) { - // swagger:operation PUT /repos/{owner}/{repo}/topics/{topic} repository repoAddTopíc + // swagger:operation PUT /repos/{owner}/{repo}/topics/{topic} repository repoAddTopic // --- // summary: Add a topic to a repository // produces: @@ -162,15 +167,15 @@ func AddTopic(ctx *context.APIContext) { } // Prevent adding more topics than allowed to repo - topics, err := models.FindTopics(&models.FindTopicOptions{ + count, err := models.CountTopics(&models.FindTopicOptions{ RepoID: ctx.Repo.Repository.ID, }) if err != nil { - log.Error("AddTopic failed: %v", err) + log.Error("CountTopics failed: %v", err) ctx.InternalServerError(err) return } - if len(topics) >= 25 { + if count >= 25 { ctx.JSON(http.StatusUnprocessableEntity, map[string]interface{}{ "message": "Exceeding maximum allowed topics per repo.", }) @@ -267,21 +272,13 @@ func TopicSearch(ctx *context.APIContext) { // "403": // "$ref": "#/responses/forbidden" - if ctx.User == nil { - ctx.Error(http.StatusForbidden, "UserIsNil", "Only owners could change the topics.") - return + opts := &models.FindTopicOptions{ + Keyword: ctx.FormString("q"), + ListOptions: utils.GetListOptions(ctx), } - kw := ctx.Query("q") - - listOptions := utils.GetListOptions(ctx) - - topics, err := models.FindTopics(&models.FindTopicOptions{ - Keyword: kw, - ListOptions: listOptions, - }) + topics, total, err := models.FindTopics(opts) if err != nil { - log.Error("SearchTopics failed: %v", err) ctx.InternalServerError(err) return } @@ -290,6 +287,8 @@ func TopicSearch(ctx *context.APIContext) { for i, topic := range topics { topicResponses[i] = convert.ToTopicResponse(topic) } + + ctx.SetTotalCountHeader(total) ctx.JSON(http.StatusOK, map[string]interface{}{ "topics": topicResponses, }) diff --git a/routers/api/v1/repo/transfer.go b/routers/api/v1/repo/transfer.go index a0999a6ce..2e052aa4f 100644 --- a/routers/api/v1/repo/transfer.go +++ b/routers/api/v1/repo/transfer.go @@ -14,11 +14,12 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/structs" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" repo_service "code.gitea.io/gitea/services/repository" ) // Transfer transfers the ownership of a repository -func Transfer(ctx *context.APIContext, opts api.TransferRepoOption) { +func Transfer(ctx *context.APIContext) { // swagger:operation POST /repos/{owner}/{repo}/transfer repository repoTransfer // --- // summary: Transfer a repo ownership @@ -51,6 +52,8 @@ func Transfer(ctx *context.APIContext, opts api.TransferRepoOption) { // "422": // "$ref": "#/responses/validationError" + opts := web.GetForm(ctx).(*api.TransferRepoOption) + newOwner, err := models.GetUserByName(opts.NewOwner) if err != nil { if models.IsErrUserNotExist(err) { @@ -93,17 +96,27 @@ func Transfer(ctx *context.APIContext, opts api.TransferRepoOption) { } } - if err = repo_service.TransferOwnership(ctx.User, newOwner, ctx.Repo.Repository, teams); err != nil { + if err := repo_service.StartRepositoryTransfer(ctx.User, newOwner, ctx.Repo.Repository, teams); err != nil { + if models.IsErrRepoTransferInProgress(err) { + ctx.Error(http.StatusConflict, "CreatePendingRepositoryTransfer", err) + return + } + + if models.IsErrRepoAlreadyExist(err) { + ctx.Error(http.StatusUnprocessableEntity, "CreatePendingRepositoryTransfer", err) + return + } + ctx.InternalServerError(err) return } - newRepo, err := models.GetRepositoryByName(newOwner.ID, ctx.Repo.Repository.Name) - if err != nil { - ctx.InternalServerError(err) + if ctx.Repo.Repository.Status == models.RepositoryPendingTransfer { + log.Trace("Repository transfer initiated: %s -> %s", ctx.Repo.Repository.FullName(), newOwner.Name) + ctx.JSON(http.StatusCreated, convert.ToRepo(ctx.Repo.Repository, models.AccessModeAdmin)) return } log.Trace("Repository transferred: %s -> %s", ctx.Repo.Repository.FullName(), newOwner.Name) - ctx.JSON(http.StatusAccepted, convert.ToRepo(newRepo, models.AccessModeAdmin)) + ctx.JSON(http.StatusAccepted, convert.ToRepo(ctx.Repo.Repository, models.AccessModeAdmin)) } diff --git a/routers/api/v1/repo/tree.go b/routers/api/v1/repo/tree.go index e6c57af3e..aec336235 100644 --- a/routers/api/v1/repo/tree.go +++ b/routers/api/v1/repo/tree.go @@ -60,7 +60,7 @@ func GetTree(ctx *context.APIContext) { ctx.Error(http.StatusBadRequest, "", "sha not provided") return } - if tree, err := repofiles.GetTreeBySHA(ctx.Repo.Repository, sha, ctx.QueryInt("page"), ctx.QueryInt("per_page"), ctx.QueryBool("recursive")); err != nil { + if tree, err := repofiles.GetTreeBySHA(ctx.Repo.Repository, sha, ctx.FormInt("page"), ctx.FormInt("per_page"), ctx.FormBool("recursive")); err != nil { ctx.Error(http.StatusBadRequest, "", err.Error()) } else { ctx.JSON(http.StatusOK, tree) diff --git a/routers/api/v1/settings/settings.go b/routers/api/v1/settings/settings.go index 609598840..ca2d28fb8 100644 --- a/routers/api/v1/settings/settings.go +++ b/routers/api/v1/settings/settings.go @@ -25,6 +25,7 @@ func GetGeneralUISettings(ctx *context.APIContext) { ctx.JSON(http.StatusOK, api.GeneralUISettings{ DefaultTheme: setting.UI.DefaultTheme, AllowedReactions: setting.UI.Reactions, + CustomEmojis: setting.UI.CustomEmojis, }) } @@ -57,9 +58,12 @@ func GetGeneralRepoSettings(ctx *context.APIContext) { // "200": // "$ref": "#/responses/GeneralRepoSettings" ctx.JSON(http.StatusOK, api.GeneralRepoSettings{ - MirrorsDisabled: setting.Repository.DisableMirrors, - HTTPGitDisabled: setting.Repository.DisableHTTPGit, - MigrationsDisabled: setting.Repository.DisableMigrations, + MirrorsDisabled: setting.Repository.DisableMirrors, + HTTPGitDisabled: setting.Repository.DisableHTTPGit, + MigrationsDisabled: setting.Repository.DisableMigrations, + StarsDisabled: setting.Repository.DisableStars, + TimeTrackingDisabled: !setting.Service.EnableTimetracking, + LFSDisabled: !setting.LFS.StartServer, }) } diff --git a/routers/api/v1/swagger/app.go b/routers/api/v1/swagger/app.go index 8be2c8557..9783abe1a 100644 --- a/routers/api/v1/swagger/app.go +++ b/routers/api/v1/swagger/app.go @@ -14,3 +14,10 @@ type swaggerResponseOAuth2Application struct { // in:body Body api.OAuth2Application `json:"body"` } + +// AccessToken represents an API access token. +// swagger:response AccessToken +type swaggerResponseAccessToken struct { + // in:body + Body api.AccessToken `json:"body"` +} diff --git a/routers/api/v1/swagger/options.go b/routers/api/v1/swagger/options.go index a3bb9cc65..3f0c6e2d5 100644 --- a/routers/api/v1/swagger/options.go +++ b/routers/api/v1/swagger/options.go @@ -5,8 +5,8 @@ package swagger import ( - "code.gitea.io/gitea/modules/auth" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/services/forms" ) // not actually a response, just a hack to get go-swagger to include definitions @@ -72,7 +72,7 @@ type swaggerParameterBodies struct { // in:body EditPullRequestOption api.EditPullRequestOption // in:body - MergePullRequestOption auth.MergePullRequestForm + MergePullRequestOption forms.MergePullRequestForm // in:body CreateReleaseOption api.CreateReleaseOption @@ -87,6 +87,8 @@ type swaggerParameterBodies struct { TransferRepoOption api.TransferRepoOption // in:body CreateForkOption api.CreateForkOption + // in:body + GenerateRepoOption api.GenerateRepoOption // in:body CreateStatusOption api.CreateStatusOption @@ -106,7 +108,7 @@ type swaggerParameterBodies struct { EditUserOption api.EditUserOption // in:body - MigrateRepoForm auth.MigrateRepoForm + MigrateRepoForm forms.MigrateRepoForm // in:body EditAttachmentOptions api.EditAttachmentOptions @@ -150,9 +152,21 @@ type swaggerParameterBodies struct { // in:body SubmitPullReviewOptions api.SubmitPullReviewOptions + // in:body + DismissPullReviewOptions api.DismissPullReviewOptions + // in:body MigrateRepoOptions api.MigrateRepoOptions // in:body PullReviewRequestOptions api.PullReviewRequestOptions + + // in:body + CreateTagOption api.CreateTagOption + + // in:body + CreateAccessTokenOption api.CreateAccessTokenOption + + // in:body + UserSettingsOptions api.UserSettingsOptions } diff --git a/routers/api/v1/swagger/repo.go b/routers/api/v1/swagger/repo.go index d539bcb9f..ed5fe5169 100644 --- a/routers/api/v1/swagger/repo.go +++ b/routers/api/v1/swagger/repo.go @@ -254,6 +254,13 @@ type swaggerCommitList struct { Body []api.Commit `json:"body"` } +// Note +// swagger:response Note +type swaggerNote struct { + // in: body + Body api.Note `json:"body"` +} + // EmptyRepository // swagger:response EmptyRepository type swaggerEmptyRepository struct { diff --git a/routers/api/v1/swagger/user.go b/routers/api/v1/swagger/user.go index a2df40e4c..a4d520123 100644 --- a/routers/api/v1/swagger/user.go +++ b/routers/api/v1/swagger/user.go @@ -42,3 +42,10 @@ type swaggerResponseUserHeatmapData struct { // in:body Body []models.UserHeatmapData `json:"body"` } + +// UserSettings +// swagger:response UserSettings +type swaggerResponseUserSettings struct { + // in:body + Body []api.UserSettings `json:"body"` +} diff --git a/routers/api/v1/user/app.go b/routers/api/v1/user/app.go index 547730ea5..f0f7cb415 100644 --- a/routers/api/v1/user/app.go +++ b/routers/api/v1/user/app.go @@ -15,6 +15,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -43,9 +44,16 @@ func ListAccessTokens(ctx *context.APIContext) { // "200": // "$ref": "#/responses/AccessTokenList" - tokens, err := models.ListAccessTokens(models.ListAccessTokensOptions{UserID: ctx.User.ID, ListOptions: utils.GetListOptions(ctx)}) + opts := models.ListAccessTokensOptions{UserID: ctx.User.ID, ListOptions: utils.GetListOptions(ctx)} + + count, err := models.CountAccessTokens(opts) if err != nil { - ctx.Error(http.StatusInternalServerError, "ListAccessTokens", err) + ctx.InternalServerError(err) + return + } + tokens, err := models.ListAccessTokens(opts) + if err != nil { + ctx.InternalServerError(err) return } @@ -57,11 +65,13 @@ func ListAccessTokens(ctx *context.APIContext) { TokenLastEight: tokens[i].TokenLastEight, } } + + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, &apiTokens) } // CreateAccessToken create access tokens -func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption) { +func CreateAccessToken(ctx *context.APIContext) { // swagger:operation POST /users/{username}/tokens user userCreateToken // --- // summary: Create an access token @@ -75,18 +85,17 @@ func CreateAccessToken(ctx *context.APIContext, form api.CreateAccessTokenOption // description: username of user // type: string // required: true - // - name: accessToken + // - name: userCreateToken // in: body // schema: - // type: object - // required: - // - name - // properties: - // name: - // type: string + // "$ref": "#/definitions/CreateAccessTokenOption" // responses: // "201": // "$ref": "#/responses/AccessToken" + // "400": + // "$ref": "#/responses/error" + + form := web.GetForm(ctx).(*api.CreateAccessTokenOption) t := &models.AccessToken{ UID: ctx.User.ID, @@ -136,6 +145,8 @@ func DeleteAccessToken(ctx *context.APIContext) { // responses: // "204": // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" // "422": // "$ref": "#/responses/error" @@ -159,7 +170,7 @@ func DeleteAccessToken(ctx *context.APIContext) { case 1: tokenID = tokens[0].ID default: - ctx.Error(http.StatusUnprocessableEntity, "DeleteAccessTokenByID", fmt.Errorf("multible matches for token name '%s'", token)) + ctx.Error(http.StatusUnprocessableEntity, "DeleteAccessTokenByID", fmt.Errorf("multiple matches for token name '%s'", token)) return } } @@ -181,7 +192,7 @@ func DeleteAccessToken(ctx *context.APIContext) { } // CreateOauth2Application is the handler to create a new OAuth2 Application for the authenticated user -func CreateOauth2Application(ctx *context.APIContext, data api.CreateOAuth2ApplicationOptions) { +func CreateOauth2Application(ctx *context.APIContext) { // swagger:operation POST /user/applications/oauth2 user userCreateOAuth2Application // --- // summary: creates a new OAuth2 application @@ -196,6 +207,11 @@ func CreateOauth2Application(ctx *context.APIContext, data api.CreateOAuth2Appli // responses: // "201": // "$ref": "#/responses/OAuth2Application" + // "400": + // "$ref": "#/responses/error" + + data := web.GetForm(ctx).(*api.CreateOAuth2ApplicationOptions) + app, err := models.CreateOAuth2Application(models.CreateOAuth2ApplicationOptions{ Name: data.Name, UserID: ctx.User.ID, @@ -235,7 +251,7 @@ func ListOauth2Applications(ctx *context.APIContext) { // "200": // "$ref": "#/responses/OAuth2ApplicationList" - apps, err := models.ListOAuth2Applications(ctx.User.ID, utils.GetListOptions(ctx)) + apps, total, err := models.ListOAuth2Applications(ctx.User.ID, utils.GetListOptions(ctx)) if err != nil { ctx.Error(http.StatusInternalServerError, "ListOAuth2Applications", err) return @@ -246,6 +262,8 @@ func ListOauth2Applications(ctx *context.APIContext) { apiApps[i] = convert.ToOAuth2Application(apps[i]) apiApps[i].ClientSecret = "" // Hide secret on application list } + + ctx.SetTotalCountHeader(total) ctx.JSON(http.StatusOK, &apiApps) } @@ -266,9 +284,15 @@ func DeleteOauth2Application(ctx *context.APIContext) { // responses: // "204": // "$ref": "#/responses/empty" + // "404": + // "$ref": "#/responses/notFound" appID := ctx.ParamsInt64(":id") if err := models.DeleteOAuth2Application(appID, ctx.User.ID); err != nil { - ctx.Error(http.StatusInternalServerError, "DeleteOauth2ApplicationByID", err) + if models.IsErrOAuthApplicationNotFound(err) { + ctx.NotFound() + } else { + ctx.Error(http.StatusInternalServerError, "DeleteOauth2ApplicationByID", err) + } return } @@ -292,6 +316,8 @@ func GetOauth2Application(ctx *context.APIContext) { // responses: // "200": // "$ref": "#/responses/OAuth2Application" + // "404": + // "$ref": "#/responses/notFound" appID := ctx.ParamsInt64(":id") app, err := models.GetOAuth2ApplicationByID(appID) if err != nil { @@ -309,7 +335,7 @@ func GetOauth2Application(ctx *context.APIContext) { } // UpdateOauth2Application update OAuth2 Application -func UpdateOauth2Application(ctx *context.APIContext, data api.CreateOAuth2ApplicationOptions) { +func UpdateOauth2Application(ctx *context.APIContext) { // swagger:operation PATCH /user/applications/oauth2/{id} user userUpdateOAuth2Application // --- // summary: update an OAuth2 Application, this includes regenerating the client secret @@ -330,8 +356,12 @@ func UpdateOauth2Application(ctx *context.APIContext, data api.CreateOAuth2Appli // responses: // "200": // "$ref": "#/responses/OAuth2Application" + // "404": + // "$ref": "#/responses/notFound" appID := ctx.ParamsInt64(":id") + data := web.GetForm(ctx).(*api.CreateOAuth2ApplicationOptions) + app, err := models.UpdateOAuth2Application(models.UpdateOAuth2ApplicationOptions{ Name: data.Name, UserID: ctx.User.ID, diff --git a/routers/api/v1/user/email.go b/routers/api/v1/user/email.go index d848f5e58..9dd35f91b 100644 --- a/routers/api/v1/user/email.go +++ b/routers/api/v1/user/email.go @@ -13,6 +13,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" ) // ListEmails list all of the authenticated user's email addresses @@ -40,7 +41,7 @@ func ListEmails(ctx *context.APIContext) { } // AddEmail add an email address -func AddEmail(ctx *context.APIContext, form api.CreateEmailOption) { +func AddEmail(ctx *context.APIContext) { // swagger:operation POST /user/emails user userAddEmail // --- // summary: Add email addresses @@ -61,7 +62,7 @@ func AddEmail(ctx *context.APIContext, form api.CreateEmailOption) { // "$ref": "#/responses/EmailList" // "422": // "$ref": "#/responses/validationError" - + form := web.GetForm(ctx).(*api.CreateEmailOption) if len(form.Emails) == 0 { ctx.Error(http.StatusUnprocessableEntity, "", "Email list empty") return @@ -96,7 +97,7 @@ func AddEmail(ctx *context.APIContext, form api.CreateEmailOption) { } // DeleteEmail delete email -func DeleteEmail(ctx *context.APIContext, form api.DeleteEmailOption) { +func DeleteEmail(ctx *context.APIContext) { // swagger:operation DELETE /user/emails user userDeleteEmail // --- // summary: Delete email addresses @@ -110,7 +111,9 @@ func DeleteEmail(ctx *context.APIContext, form api.DeleteEmailOption) { // responses: // "204": // "$ref": "#/responses/empty" - + // "404": + // "$ref": "#/responses/notFound" + form := web.GetForm(ctx).(*api.DeleteEmailOption) if len(form.Emails) == 0 { ctx.Status(http.StatusNoContent) return @@ -125,6 +128,10 @@ func DeleteEmail(ctx *context.APIContext, form api.DeleteEmailOption) { } if err := models.DeleteEmailAddresses(emails); err != nil { + if models.IsErrEmailAddressNotExist(err) { + ctx.Error(http.StatusNotFound, "DeleteEmailAddresses", err) + return + } ctx.Error(http.StatusInternalServerError, "DeleteEmailAddresses", err) return } diff --git a/routers/api/v1/user/follower.go b/routers/api/v1/user/follower.go index 39f3c2092..e273ac6a0 100644 --- a/routers/api/v1/user/follower.go +++ b/routers/api/v1/user/follower.go @@ -18,7 +18,7 @@ import ( func responseAPIUsers(ctx *context.APIContext, users []*models.User) { apiUsers := make([]*api.User, len(users)) for i := range users { - apiUsers[i] = convert.ToUser(users[i], ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin) + apiUsers[i] = convert.ToUser(users[i], ctx.User) } ctx.JSON(http.StatusOK, &apiUsers) } @@ -29,6 +29,8 @@ func listUserFollowers(ctx *context.APIContext, u *models.User) { ctx.Error(http.StatusInternalServerError, "GetUserFollowers", err) return } + + ctx.SetTotalCountHeader(int64(u.NumFollowers)) responseAPIUsers(ctx, users) } @@ -93,6 +95,8 @@ func listUserFollowing(ctx *context.APIContext, u *models.User) { ctx.Error(http.StatusInternalServerError, "GetFollowing", err) return } + + ctx.SetTotalCountHeader(int64(u.NumFollowing)) responseAPIUsers(ctx, users) } diff --git a/routers/api/v1/user/gpg_key.go b/routers/api/v1/user/gpg_key.go index 7290ef485..f32d60d03 100644 --- a/routers/api/v1/user/gpg_key.go +++ b/routers/api/v1/user/gpg_key.go @@ -5,12 +5,14 @@ package user import ( + "fmt" "net/http" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -26,6 +28,13 @@ func listGPGKeys(ctx *context.APIContext, uid int64, listOptions models.ListOpti apiKeys[i] = convert.ToGPGKey(keys[i]) } + total, err := models.CountUserGPGKeys(uid) + if err != nil { + ctx.InternalServerError(err) + return + } + + ctx.SetTotalCountHeader(total) ctx.JSON(http.StatusOK, &apiKeys) } @@ -118,14 +127,84 @@ func GetGPGKey(ctx *context.APIContext) { // CreateUserGPGKey creates new GPG key to given user by ID. func CreateUserGPGKey(ctx *context.APIContext, form api.CreateGPGKeyOption, uid int64) { - keys, err := models.AddGPGKey(uid, form.ArmoredKey) + token := models.VerificationToken(ctx.User, 1) + lastToken := models.VerificationToken(ctx.User, 0) + + keys, err := models.AddGPGKey(uid, form.ArmoredKey, token, form.Signature) + if err != nil && models.IsErrGPGInvalidTokenSignature(err) { + keys, err = models.AddGPGKey(uid, form.ArmoredKey, lastToken, form.Signature) + } if err != nil { - HandleAddGPGKeyError(ctx, err) + HandleAddGPGKeyError(ctx, err, token) return } ctx.JSON(http.StatusCreated, convert.ToGPGKey(keys[0])) } +// GetVerificationToken returns the current token to be signed for this user +func GetVerificationToken(ctx *context.APIContext) { + // swagger:operation GET /user/gpg_key_token user getVerificationToken + // --- + // summary: Get a Token to verify + // produces: + // - text/plain + // parameters: + // responses: + // "200": + // "$ref": "#/responses/string" + // "404": + // "$ref": "#/responses/notFound" + + token := models.VerificationToken(ctx.User, 1) + ctx.PlainText(http.StatusOK, []byte(token)) +} + +// VerifyUserGPGKey creates new GPG key to given user by ID. +func VerifyUserGPGKey(ctx *context.APIContext) { + // swagger:operation POST /user/gpg_key_verify user userVerifyGPGKey + // --- + // summary: Verify a GPG key + // consumes: + // - application/json + // produces: + // - application/json + // responses: + // "201": + // "$ref": "#/responses/GPGKey" + // "404": + // "$ref": "#/responses/notFound" + // "422": + // "$ref": "#/responses/validationError" + + form := web.GetForm(ctx).(*api.VerifyGPGKeyOption) + token := models.VerificationToken(ctx.User, 1) + lastToken := models.VerificationToken(ctx.User, 0) + + _, err := models.VerifyGPGKey(ctx.User.ID, form.KeyID, token, form.Signature) + if err != nil && models.IsErrGPGInvalidTokenSignature(err) { + _, err = models.VerifyGPGKey(ctx.User.ID, form.KeyID, lastToken, form.Signature) + } + + if err != nil { + if models.IsErrGPGInvalidTokenSignature(err) { + ctx.Error(http.StatusUnprocessableEntity, "GPGInvalidSignature", fmt.Sprintf("The provided GPG key, signature and token do not match or token is out of date. Provide a valid signature for the token: %s", token)) + return + } + ctx.Error(http.StatusInternalServerError, "VerifyUserGPGKey", err) + } + + key, err := models.GetGPGKeysByKeyID(form.KeyID) + if err != nil { + if models.IsErrGPGKeyNotExist(err) { + ctx.NotFound() + } else { + ctx.Error(http.StatusInternalServerError, "GetGPGKeysByKeyID", err) + } + return + } + ctx.JSON(http.StatusOK, convert.ToGPGKey(key[0])) +} + // swagger:parameters userCurrentPostGPGKey type swaggerUserCurrentPostGPGKey struct { // in:body @@ -133,7 +212,7 @@ type swaggerUserCurrentPostGPGKey struct { } //CreateGPGKey create a GPG key belonging to the authenticated user -func CreateGPGKey(ctx *context.APIContext, form api.CreateGPGKeyOption) { +func CreateGPGKey(ctx *context.APIContext) { // swagger:operation POST /user/gpg_keys user userCurrentPostGPGKey // --- // summary: Create a GPG key @@ -149,7 +228,8 @@ func CreateGPGKey(ctx *context.APIContext, form api.CreateGPGKeyOption) { // "422": // "$ref": "#/responses/validationError" - CreateUserGPGKey(ctx, form, ctx.User.ID) + form := web.GetForm(ctx).(*api.CreateGPGKeyOption) + CreateUserGPGKey(ctx, *form, ctx.User.ID) } //DeleteGPGKey remove a GPG key belonging to the authenticated user @@ -187,7 +267,7 @@ func DeleteGPGKey(ctx *context.APIContext) { } // HandleAddGPGKeyError handle add GPGKey error -func HandleAddGPGKeyError(ctx *context.APIContext, err error) { +func HandleAddGPGKeyError(ctx *context.APIContext, err error, token string) { switch { case models.IsErrGPGKeyAccessDenied(err): ctx.Error(http.StatusUnprocessableEntity, "GPGKeyAccessDenied", "You do not have access to this GPG key") @@ -196,7 +276,9 @@ func HandleAddGPGKeyError(ctx *context.APIContext, err error) { case models.IsErrGPGKeyParsing(err): ctx.Error(http.StatusUnprocessableEntity, "GPGKeyParsing", err) case models.IsErrGPGNoEmailFound(err): - ctx.Error(http.StatusNotFound, "GPGNoEmailFound", err) + ctx.Error(http.StatusNotFound, "GPGNoEmailFound", fmt.Sprintf("None of the emails attached to the GPG key could be found. It may still be added if you provide a valid signature for the token: %s", token)) + case models.IsErrGPGInvalidTokenSignature(err): + ctx.Error(http.StatusUnprocessableEntity, "GPGInvalidSignature", fmt.Sprintf("The provided GPG key, signature and token do not match or token is out of date. Provide a valid signature for the token: %s", token)) default: ctx.Error(http.StatusInternalServerError, "AddGPGKey", err) } diff --git a/routers/api/v1/user/helper.go b/routers/api/v1/user/helper.go new file mode 100644 index 000000000..a3500e0ee --- /dev/null +++ b/routers/api/v1/user/helper.go @@ -0,0 +1,36 @@ +// Copyright 2021 The Gitea Authors. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" +) + +// GetUserByParamsName get user by name +func GetUserByParamsName(ctx *context.APIContext, name string) *models.User { + username := ctx.Params(name) + user, err := models.GetUserByName(username) + if err != nil { + if models.IsErrUserNotExist(err) { + if redirectUserID, err2 := models.LookupUserRedirect(username); err2 == nil { + context.RedirectToUser(ctx.Context, username, redirectUserID) + } else { + ctx.NotFound("GetUserByName", err) + } + } else { + ctx.Error(http.StatusInternalServerError, "GetUserByName", err) + } + return nil + } + return user +} + +// GetUserByParams returns user whose name is presented in URL (":username"). +func GetUserByParams(ctx *context.APIContext) *models.User { + return GetUserByParamsName(ctx, ":username") +} diff --git a/routers/api/v1/user/key.go b/routers/api/v1/user/key.go index 806966065..36b1c17b8 100644 --- a/routers/api/v1/user/key.go +++ b/routers/api/v1/user/key.go @@ -12,6 +12,7 @@ import ( "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/api/v1/repo" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -24,13 +25,13 @@ func appendPrivateInformation(apiKey *api.PublicKey, key *models.PublicKey, defa apiKey.KeyType = "user" if defaultUser.ID == key.OwnerID { - apiKey.Owner = convert.ToUser(defaultUser, true, true) + apiKey.Owner = convert.ToUser(defaultUser, defaultUser) } else { user, err := models.GetUserByID(key.OwnerID) if err != nil { return apiKey, err } - apiKey.Owner = convert.ToUser(user, true, true) + apiKey.Owner = convert.ToUser(user, user) } } else { apiKey.KeyType = "unknown" @@ -39,25 +40,6 @@ func appendPrivateInformation(apiKey *api.PublicKey, key *models.PublicKey, defa return apiKey, nil } -// GetUserByParamsName get user by name -func GetUserByParamsName(ctx *context.APIContext, name string) *models.User { - user, err := models.GetUserByName(ctx.Params(name)) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.NotFound() - } else { - ctx.Error(http.StatusInternalServerError, "GetUserByName", err) - } - return nil - } - return user -} - -// GetUserByParams returns user whose name is presented in URL paramenter. -func GetUserByParams(ctx *context.APIContext) *models.User { - return GetUserByParamsName(ctx, ":username") -} - func composePublicKeysAPILink() string { return setting.AppURL + "api/v1/user/keys/" } @@ -65,8 +47,9 @@ func composePublicKeysAPILink() string { func listPublicKeys(ctx *context.APIContext, user *models.User) { var keys []*models.PublicKey var err error + var count int - fingerprint := ctx.Query("fingerprint") + fingerprint := ctx.FormString("fingerprint") username := ctx.Params("username") if fingerprint != "" { @@ -78,7 +61,15 @@ func listPublicKeys(ctx *context.APIContext, user *models.User) { // Unrestricted keys, err = models.SearchPublicKey(0, fingerprint) } + count = len(keys) } else { + total, err2 := models.CountPublicKeys(user.ID) + if err2 != nil { + ctx.InternalServerError(err) + return + } + count = int(total) + // Use ListPublicKeys keys, err = models.ListPublicKeys(user.ID, utils.GetListOptions(ctx)) } @@ -97,6 +88,7 @@ func listPublicKeys(ctx *context.APIContext, user *models.User) { } } + ctx.SetTotalCountHeader(int64(count)) ctx.JSON(http.StatusOK, &apiKeys) } @@ -223,7 +215,7 @@ func CreateUserPublicKey(ctx *context.APIContext, form api.CreateKeyOption, uid } // CreatePublicKey create one public key for me -func CreatePublicKey(ctx *context.APIContext, form api.CreateKeyOption) { +func CreatePublicKey(ctx *context.APIContext) { // swagger:operation POST /user/keys user userCurrentPostKey // --- // summary: Create a public key @@ -242,7 +234,8 @@ func CreatePublicKey(ctx *context.APIContext, form api.CreateKeyOption) { // "422": // "$ref": "#/responses/validationError" - CreateUserPublicKey(ctx, form, ctx.User.ID) + form := web.GetForm(ctx).(*api.CreateKeyOption) + CreateUserPublicKey(ctx, *form, ctx.User.ID) } // DeletePublicKey delete one public key diff --git a/routers/api/v1/user/repo.go b/routers/api/v1/user/repo.go index b17841e67..5116c17ab 100644 --- a/routers/api/v1/user/repo.go +++ b/routers/api/v1/user/repo.go @@ -6,7 +6,6 @@ package user import ( "net/http" - "strconv" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" @@ -43,8 +42,7 @@ func listUserRepos(ctx *context.APIContext, u *models.User, private bool) { } ctx.SetLinkHeader(int(count), opts.PageSize) - ctx.Header().Set("X-Total-Count", strconv.FormatInt(count, 10)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, &apiRepos) } @@ -85,7 +83,7 @@ func ListUserRepos(ctx *context.APIContext) { func ListMyRepos(ctx *context.APIContext) { // swagger:operation GET /user/repos user userCurrentListRepos // --- - // summary: List the repos that the authenticated user owns or has access to + // summary: List the repos that the authenticated user owns // produces: // - application/json // parameters: @@ -130,8 +128,7 @@ func ListMyRepos(ctx *context.APIContext) { } ctx.SetLinkHeader(int(count), opts.ListOptions.PageSize) - ctx.Header().Set("X-Total-Count", strconv.FormatInt(count, 10)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(count) ctx.JSON(http.StatusOK, &results) } diff --git a/routers/api/v1/user/settings.go b/routers/api/v1/user/settings.go new file mode 100644 index 000000000..b4548e744 --- /dev/null +++ b/routers/api/v1/user/settings.go @@ -0,0 +1,83 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" + api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web" +) + +// GetUserSettings returns user settings +func GetUserSettings(ctx *context.APIContext) { + // swagger:operation GET /user/settings user getUserSettings + // --- + // summary: Get user settings + // produces: + // - application/json + // responses: + // "200": + // "$ref": "#/responses/UserSettings" + ctx.JSON(http.StatusOK, convert.User2UserSettings(ctx.User)) +} + +// UpdateUserSettings returns user settings +func UpdateUserSettings(ctx *context.APIContext) { + // swagger:operation PATCH /user/settings user updateUserSettings + // --- + // summary: Update user settings + // parameters: + // - name: body + // in: body + // schema: + // "$ref": "#/definitions/UserSettingsOptions" + // produces: + // - application/json + // responses: + // "200": + // "$ref": "#/responses/UserSettings" + + form := web.GetForm(ctx).(*api.UserSettingsOptions) + + if form.FullName != nil { + ctx.User.FullName = *form.FullName + } + if form.Description != nil { + ctx.User.Description = *form.Description + } + if form.Website != nil { + ctx.User.Website = *form.Website + } + if form.Location != nil { + ctx.User.Location = *form.Location + } + if form.Language != nil { + ctx.User.Language = *form.Language + } + if form.Theme != nil { + ctx.User.Theme = *form.Theme + } + if form.DiffViewStyle != nil { + ctx.User.DiffViewStyle = *form.DiffViewStyle + } + + if form.HideEmail != nil { + ctx.User.KeepEmailPrivate = *form.HideEmail + } + if form.HideActivity != nil { + ctx.User.KeepActivityPrivate = *form.HideActivity + } + + if err := models.UpdateUser(ctx.User); err != nil { + ctx.InternalServerError(err) + return + } + + ctx.JSON(http.StatusOK, convert.User2UserSettings(ctx.User)) +} diff --git a/routers/api/v1/user/star.go b/routers/api/v1/user/star.go index 937dcb477..8ee167685 100644 --- a/routers/api/v1/user/star.go +++ b/routers/api/v1/user/star.go @@ -92,6 +92,8 @@ func GetMyStarredRepos(ctx *context.APIContext) { if err != nil { ctx.Error(http.StatusInternalServerError, "getStarredRepos", err) } + + ctx.SetTotalCountHeader(int64(ctx.User.NumStars)) ctx.JSON(http.StatusOK, &repos) } diff --git a/routers/api/v1/user/user.go b/routers/api/v1/user/user.go index b860219e6..535a49d76 100644 --- a/routers/api/v1/user/user.go +++ b/routers/api/v1/user/user.go @@ -6,14 +6,11 @@ package user import ( - "fmt" "net/http" - "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" - api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/routers/api/v1/utils" ) @@ -57,14 +54,13 @@ func Search(ctx *context.APIContext) { listOptions := utils.GetListOptions(ctx) - opts := &models.SearchUserOptions{ - Keyword: strings.Trim(ctx.Query("q"), " "), - UID: ctx.QueryInt64("uid"), + users, maxResults, err := models.SearchUsers(&models.SearchUserOptions{ + Actor: ctx.User, + Keyword: ctx.FormTrim("q"), + UID: ctx.FormInt64("uid"), Type: models.UserTypeIndividual, ListOptions: listOptions, - } - - users, maxResults, err := models.SearchUsers(opts) + }) if err != nil { ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ "ok": false, @@ -73,18 +69,12 @@ func Search(ctx *context.APIContext) { return } - results := make([]*api.User, len(users)) - for i := range users { - results[i] = convert.ToUser(users[i], ctx.IsSigned, ctx.User != nil && ctx.User.IsAdmin) - } - ctx.SetLinkHeader(int(maxResults), listOptions.PageSize) - ctx.Header().Set("X-Total-Count", fmt.Sprintf("%d", maxResults)) - ctx.Header().Set("Access-Control-Expose-Headers", "X-Total-Count, Link") + ctx.SetTotalCountHeader(maxResults) ctx.JSON(http.StatusOK, map[string]interface{}{ "ok": true, - "data": results, + "data": convert.ToUsers(ctx.User, users), }) } @@ -107,17 +97,18 @@ func GetInfo(ctx *context.APIContext) { // "404": // "$ref": "#/responses/notFound" - u, err := models.GetUserByName(ctx.Params(":username")) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.NotFound() - } else { - ctx.Error(http.StatusInternalServerError, "GetUserByName", err) - } + u := GetUserByParams(ctx) + + if ctx.Written() { return } - ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.IsSigned, ctx.User != nil && (ctx.User.ID == u.ID || ctx.User.IsAdmin))) + if !u.IsVisibleToUser(ctx.User) { + // fake ErrUserNotExist error message to not leak information about existence + ctx.NotFound("GetUserByName", models.ErrUserNotExist{Name: ctx.Params(":username")}) + return + } + ctx.JSON(http.StatusOK, convert.ToUser(u, ctx.User)) } // GetAuthenticatedUser get current user's information @@ -131,7 +122,7 @@ func GetAuthenticatedUser(ctx *context.APIContext) { // "200": // "$ref": "#/responses/User" - ctx.JSON(http.StatusOK, convert.ToUser(ctx.User, ctx.IsSigned, ctx.User != nil)) + ctx.JSON(http.StatusOK, convert.ToUser(ctx.User, ctx.User)) } // GetUserHeatmapData is the handler to get a users heatmap @@ -153,14 +144,8 @@ func GetUserHeatmapData(ctx *context.APIContext) { // "404": // "$ref": "#/responses/notFound" - // Get the user to throw an error if it does not exist - user, err := models.GetUserByName(ctx.Params(":username")) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Status(http.StatusNotFound) - } else { - ctx.Error(http.StatusInternalServerError, "GetUserByName", err) - } + user := GetUserByParams(ctx) + if ctx.Written() { return } diff --git a/routers/api/v1/user/watch.go b/routers/api/v1/user/watch.go index ab656f322..f32ce7359 100644 --- a/routers/api/v1/user/watch.go +++ b/routers/api/v1/user/watch.go @@ -14,23 +14,22 @@ import ( "code.gitea.io/gitea/routers/api/v1/utils" ) -// getWatchedRepos returns the repos that the user with the specified userID is -// watching -func getWatchedRepos(user *models.User, private bool, listOptions models.ListOptions) ([]*api.Repository, error) { - watchedRepos, err := models.GetWatchedRepos(user.ID, private, listOptions) +// getWatchedRepos returns the repos that the user with the specified userID is watching +func getWatchedRepos(user *models.User, private bool, listOptions models.ListOptions) ([]*api.Repository, int64, error) { + watchedRepos, total, err := models.GetWatchedRepos(user.ID, private, listOptions) if err != nil { - return nil, err + return nil, 0, err } repos := make([]*api.Repository, len(watchedRepos)) for i, watched := range watchedRepos { access, err := models.AccessLevel(user, watched) if err != nil { - return nil, err + return nil, 0, err } repos[i] = convert.ToRepo(watched, access) } - return repos, nil + return repos, total, nil } // GetWatchedRepos returns the repos that the user specified in ctx is watching @@ -60,10 +59,12 @@ func GetWatchedRepos(ctx *context.APIContext) { user := GetUserByParams(ctx) private := user.ID == ctx.User.ID - repos, err := getWatchedRepos(user, private, utils.GetListOptions(ctx)) + repos, total, err := getWatchedRepos(user, private, utils.GetListOptions(ctx)) if err != nil { ctx.Error(http.StatusInternalServerError, "getWatchedRepos", err) } + + ctx.SetTotalCountHeader(total) ctx.JSON(http.StatusOK, &repos) } @@ -87,10 +88,12 @@ func GetMyWatchedRepos(ctx *context.APIContext) { // "200": // "$ref": "#/responses/RepositoryList" - repos, err := getWatchedRepos(ctx.User, true, utils.GetListOptions(ctx)) + repos, total, err := getWatchedRepos(ctx.User, true, utils.GetListOptions(ctx)) if err != nil { ctx.Error(http.StatusInternalServerError, "getWatchedRepos", err) } + + ctx.SetTotalCountHeader(total) ctx.JSON(http.StatusOK, &repos) } diff --git a/routers/api/v1/utils/git.go b/routers/api/v1/utils/git.go new file mode 100644 index 000000000..ac68c3625 --- /dev/null +++ b/routers/api/v1/utils/git.go @@ -0,0 +1,61 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package utils + +import ( + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" +) + +// ResolveRefOrSha resolve ref to sha if exist +func ResolveRefOrSha(ctx *context.APIContext, ref string) string { + if len(ref) == 0 { + ctx.Error(http.StatusBadRequest, "ref not given", nil) + return "" + } + + // Search branches and tags + for _, refType := range []string{"heads", "tags"} { + refSHA, lastMethodName, err := searchRefCommitByType(ctx, refType, ref) + if err != nil { + ctx.Error(http.StatusInternalServerError, lastMethodName, err) + return "" + } + if refSHA != "" { + return refSHA + } + } + return ref +} + +// GetGitRefs return git references based on filter +func GetGitRefs(ctx *context.APIContext, filter string) ([]*git.Reference, string, error) { + if ctx.Repo.GitRepo == nil { + var err error + ctx.Repo.GitRepo, err = git.OpenRepository(ctx.Repo.Repository.RepoPath()) + if err != nil { + return nil, "OpenRepository", err + } + defer ctx.Repo.GitRepo.Close() + } + if len(filter) > 0 { + filter = "refs/" + filter + } + refs, err := ctx.Repo.GitRepo.GetRefsFiltered(filter) + return refs, "GetRefsFiltered", err +} + +func searchRefCommitByType(ctx *context.APIContext, refType, filter string) (string, string, error) { + refs, lastMethodName, err := GetGitRefs(ctx, refType+"/"+filter) //Search by type + if err != nil { + return "", lastMethodName, err + } + if len(refs) > 0 { + return refs[0].Object.String(), "", nil //Return found SHA + } + return "", "", nil +} diff --git a/routers/api/v1/utils/hook.go b/routers/api/v1/utils/hook.go index b0ce40b9f..a257260ca 100644 --- a/routers/api/v1/utils/hook.go +++ b/routers/api/v1/utils/hook.go @@ -5,7 +5,6 @@ package utils import ( - "encoding/json" "fmt" "net/http" "strings" @@ -13,6 +12,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" + "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/routers/utils" @@ -133,7 +133,7 @@ func addHook(ctx *context.APIContext, form *api.CreateHookOption, orgID, repoID BranchFilter: form.BranchFilter, }, IsActive: form.Active, - Type: models.HookTaskType(form.Type), + Type: models.HookType(form.Type), } if w.Type == models.SLACK { channel, ok := form.Config["channel"] diff --git a/routers/api/v1/utils/utils.go b/routers/api/v1/utils/utils.go index 5732ea7f7..81f5086c9 100644 --- a/routers/api/v1/utils/utils.go +++ b/routers/api/v1/utils/utils.go @@ -54,34 +54,15 @@ func parseTime(value string) (int64, error) { // prepareQueryArg unescape and trim a query arg func prepareQueryArg(ctx *context.APIContext, name string) (value string, err error) { - value, err = url.PathUnescape(ctx.Query(name)) - value = strings.Trim(value, " ") + value, err = url.PathUnescape(ctx.FormString(name)) + value = strings.TrimSpace(value) return } // GetListOptions returns list options using the page and limit parameters func GetListOptions(ctx *context.APIContext) models.ListOptions { return models.ListOptions{ - Page: ctx.QueryInt("page"), - PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")), + Page: ctx.FormInt("page"), + PageSize: convert.ToCorrectPageSize(ctx.FormInt("limit")), } } - -// PaginateUserSlice cut a slice of Users as per pagination options -// TODO: make it generic -func PaginateUserSlice(items []*models.User, page, pageSize int) []*models.User { - if page != 0 { - page-- - } - - if page*pageSize >= len(items) { - return items[len(items):] - } - - items = items[page*pageSize:] - - if len(items) > pageSize { - return items[:pageSize] - } - return items -} diff --git a/routers/common/db.go b/routers/common/db.go new file mode 100644 index 000000000..069a46f64 --- /dev/null +++ b/routers/common/db.go @@ -0,0 +1,39 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package common + +import ( + "context" + "fmt" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/models/migrations" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" +) + +// InitDBEngine In case of problems connecting to DB, retry connection. Eg, PGSQL in Docker Container on Synology +func InitDBEngine(ctx context.Context) (err error) { + log.Info("Beginning ORM engine initialization.") + for i := 0; i < setting.Database.DBConnectRetries; i++ { + select { + case <-ctx.Done(): + return fmt.Errorf("Aborted due to shutdown:\nin retry ORM engine initialization") + default: + } + log.Info("ORM engine initialization attempt #%d/%d...", i+1, setting.Database.DBConnectRetries) + if err = models.NewEngine(ctx, migrations.Migrate); err == nil { + break + } else if i == setting.Database.DBConnectRetries-1 { + return err + } + log.Error("ORM engine initialization attempt #%d/%d failed. Error: %v", i+1, setting.Database.DBConnectRetries, err) + log.Info("Backing off for %d seconds", int64(setting.Database.DBConnectBackoff/time.Second)) + time.Sleep(setting.Database.DBConnectBackoff) + } + models.HasEngine = true + return nil +} diff --git a/routers/common/logger.go b/routers/common/logger.go new file mode 100644 index 000000000..bc1149543 --- /dev/null +++ b/routers/common/logger.go @@ -0,0 +1,33 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package common + +import ( + "net/http" + "time" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" +) + +// LoggerHandler is a handler that will log the routing to the default gitea log +func LoggerHandler(level log.Level) func(next http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + start := time.Now() + + _ = log.GetLogger("router").Log(0, level, "Started %s %s for %s", log.ColoredMethod(req.Method), req.URL.RequestURI(), req.RemoteAddr) + + next.ServeHTTP(w, req) + + var status int + if v, ok := w.(context.ResponseWriter); ok { + status = v.Status() + } + + _ = log.GetLogger("router").Log(0, level, "Completed %s %s %v %s in %v", log.ColoredMethod(req.Method), req.URL.RequestURI(), log.ColoredStatus(status), log.ColoredStatus(status, http.StatusText(status)), log.ColoredTime(time.Since(start))) + }) + } +} diff --git a/routers/common/middleware.go b/routers/common/middleware.go new file mode 100644 index 000000000..1d96522dd --- /dev/null +++ b/routers/common/middleware.go @@ -0,0 +1,76 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package common + +import ( + "fmt" + "net/http" + "strings" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + + "github.com/chi-middleware/proxy" + "github.com/go-chi/chi/middleware" +) + +// Middlewares returns common middlewares +func Middlewares() []func(http.Handler) http.Handler { + var handlers = []func(http.Handler) http.Handler{ + func(next http.Handler) http.Handler { + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + next.ServeHTTP(context.NewResponse(resp), req) + }) + }, + } + + if setting.ReverseProxyLimit > 0 { + opt := proxy.NewForwardedHeadersOptions(). + WithForwardLimit(setting.ReverseProxyLimit). + ClearTrustedProxies() + for _, n := range setting.ReverseProxyTrustedProxies { + if !strings.Contains(n, "/") { + opt.AddTrustedProxy(n) + } else { + opt.AddTrustedNetwork(n) + } + } + handlers = append(handlers, proxy.ForwardedHeaders(opt)) + } + + handlers = append(handlers, middleware.StripSlashes) + + if !setting.DisableRouterLog && setting.RouterLogLevel != log.NONE { + if log.GetLogger("router").GetLevel() <= setting.RouterLogLevel { + handlers = append(handlers, LoggerHandler(setting.RouterLogLevel)) + } + } + if setting.EnableAccessLog { + handlers = append(handlers, context.AccessLogger()) + } + + handlers = append(handlers, func(next http.Handler) http.Handler { + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + // Why we need this? The Recovery() will try to render a beautiful + // error page for user, but the process can still panic again, and other + // middleware like session also may panic then we have to recover twice + // and send a simple error page that should not panic any more. + defer func() { + if err := recover(); err != nil { + combinedErr := fmt.Sprintf("PANIC: %v\n%s", err, string(log.Stack(2))) + log.Error("%v", combinedErr) + if setting.IsProd() { + http.Error(resp, http.StatusText(500), 500) + } else { + http.Error(resp, combinedErr, 500) + } + } + }() + next.ServeHTTP(resp, req) + }) + }) + return handlers +} diff --git a/routers/common/repo.go b/routers/common/repo.go new file mode 100644 index 000000000..af9170164 --- /dev/null +++ b/routers/common/repo.go @@ -0,0 +1,105 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package common + +import ( + "fmt" + "io" + "path" + "path/filepath" + "strings" + + "code.gitea.io/gitea/modules/charset" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/httpcache" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/typesniffer" +) + +// ServeBlob download a git.Blob +func ServeBlob(ctx *context.Context, blob *git.Blob) error { + if httpcache.HandleGenericETagCache(ctx.Req, ctx.Resp, `"`+blob.ID.String()+`"`) { + return nil + } + + dataRc, err := blob.DataAsync() + if err != nil { + return err + } + defer func() { + if err = dataRc.Close(); err != nil { + log.Error("ServeBlob: Close: %v", err) + } + }() + + return ServeData(ctx, ctx.Repo.TreePath, blob.Size(), dataRc) +} + +// ServeData download file from io.Reader +func ServeData(ctx *context.Context, name string, size int64, reader io.Reader) error { + buf := make([]byte, 1024) + n, err := reader.Read(buf) + if err != nil && err != io.EOF { + return err + } + if n >= 0 { + buf = buf[:n] + } + + ctx.Resp.Header().Set("Cache-Control", "public,max-age=86400") + + if size >= 0 { + ctx.Resp.Header().Set("Content-Length", fmt.Sprintf("%d", size)) + } else { + log.Error("ServeData called to serve data: %s with size < 0: %d", name, size) + } + name = path.Base(name) + + // Google Chrome dislike commas in filenames, so let's change it to a space + name = strings.ReplaceAll(name, ",", " ") + + st := typesniffer.DetectContentType(buf) + + mappedMimeType := "" + if setting.MimeTypeMap.Enabled { + fileExtension := strings.ToLower(filepath.Ext(name)) + mappedMimeType = setting.MimeTypeMap.Map[fileExtension] + } + if st.IsText() || ctx.FormBool("render") { + cs, err := charset.DetectEncoding(buf) + if err != nil { + log.Error("Detect raw file %s charset failed: %v, using by default utf-8", name, err) + cs = "utf-8" + } + if mappedMimeType == "" { + mappedMimeType = "text/plain" + } + ctx.Resp.Header().Set("Content-Type", mappedMimeType+"; charset="+strings.ToLower(cs)) + } else { + ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition") + if mappedMimeType != "" { + ctx.Resp.Header().Set("Content-Type", mappedMimeType) + } + if (st.IsImage() || st.IsPDF()) && (setting.UI.SVG.Enabled || !st.IsSvgImage()) { + ctx.Resp.Header().Set("Content-Disposition", fmt.Sprintf(`inline; filename="%s"`, name)) + if st.IsSvgImage() { + ctx.Resp.Header().Set("Content-Security-Policy", "default-src 'none'; style-src 'unsafe-inline'; sandbox") + ctx.Resp.Header().Set("X-Content-Type-Options", "nosniff") + ctx.Resp.Header().Set("Content-Type", typesniffer.SvgMimeType) + } + } else { + ctx.Resp.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, name)) + } + } + + _, err = ctx.Resp.Write(buf) + if err != nil { + return err + } + _, err = io.Copy(ctx.Resp, reader) + return err +} diff --git a/routers/events/events.go b/routers/events/events.go deleted file mode 100644 index a1131f29e..000000000 --- a/routers/events/events.go +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package events - -import ( - "net/http" - "time" - - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/eventsource" - "code.gitea.io/gitea/modules/graceful" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/routers/user" -) - -// Events listens for events -func Events(ctx *context.Context) { - // FIXME: Need to check if resp is actually a http.Flusher! - how though? - - // Set the headers related to event streaming. - ctx.Resp.Header().Set("Content-Type", "text/event-stream") - ctx.Resp.Header().Set("Cache-Control", "no-cache") - ctx.Resp.Header().Set("Connection", "keep-alive") - ctx.Resp.Header().Set("X-Accel-Buffering", "no") - ctx.Resp.WriteHeader(http.StatusOK) - - // Listen to connection close and un-register messageChan - notify := ctx.Req.Context().Done() - ctx.Resp.Flush() - - shutdownCtx := graceful.GetManager().ShutdownContext() - - uid := ctx.User.ID - - messageChan := eventsource.GetManager().Register(uid) - - unregister := func() { - eventsource.GetManager().Unregister(uid, messageChan) - // ensure the messageChan is closed - for { - _, ok := <-messageChan - if !ok { - break - } - } - } - - if _, err := ctx.Resp.Write([]byte("\n")); err != nil { - log.Error("Unable to write to EventStream: %v", err) - unregister() - return - } - - timer := time.NewTicker(30 * time.Second) - -loop: - for { - select { - case <-timer.C: - event := &eventsource.Event{ - Name: "ping", - } - _, err := event.WriteTo(ctx.Resp) - if err != nil { - log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) - go unregister() - break loop - } - ctx.Resp.Flush() - case <-notify: - go unregister() - break loop - case <-shutdownCtx.Done(): - go unregister() - break loop - case event, ok := <-messageChan: - if !ok { - break loop - } - - // Handle logout - if event.Name == "logout" { - if ctx.Session.ID() == event.Data { - _, _ = (&eventsource.Event{ - Name: "logout", - Data: "here", - }).WriteTo(ctx.Resp) - ctx.Resp.Flush() - go unregister() - user.HandleSignOut(ctx) - break loop - } - // Replace the event - we don't want to expose the session ID to the user - event = (&eventsource.Event{ - Name: "logout", - Data: "elsewhere", - }) - } - - _, err := event.WriteTo(ctx.Resp) - if err != nil { - log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) - go unregister() - break loop - } - ctx.Resp.Flush() - } - } - timer.Stop() -} diff --git a/routers/home.go b/routers/home.go deleted file mode 100644 index d37bf8e31..000000000 --- a/routers/home.go +++ /dev/null @@ -1,400 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package routers - -import ( - "bytes" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - code_indexer "code.gitea.io/gitea/modules/indexer/code" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/util" - "code.gitea.io/gitea/routers/user" -) - -const ( - // tplHome home page template - tplHome base.TplName = "home" - // tplExploreRepos explore repositories page template - tplExploreRepos base.TplName = "explore/repos" - // tplExploreUsers explore users page template - tplExploreUsers base.TplName = "explore/users" - // tplExploreOrganizations explore organizations page template - tplExploreOrganizations base.TplName = "explore/organizations" - // tplExploreCode explore code page template - tplExploreCode base.TplName = "explore/code" -) - -// Home render home page -func Home(ctx *context.Context) { - if ctx.IsSigned { - if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { - ctx.Data["Title"] = ctx.Tr("auth.active_your_account") - ctx.HTML(200, user.TplActivate) - } else if !ctx.User.IsActive || ctx.User.ProhibitLogin { - log.Info("Failed authentication attempt for %s from %s", ctx.User.Name, ctx.RemoteAddr()) - ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") - ctx.HTML(200, "user/auth/prohibit_login") - } else if ctx.User.MustChangePassword { - ctx.Data["Title"] = ctx.Tr("auth.must_change_password") - ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/change_password" - ctx.SetCookie("redirect_to", setting.AppSubURL+ctx.Req.URL.RequestURI(), 0, setting.AppSubURL) - ctx.Redirect(setting.AppSubURL + "/user/settings/change_password") - } else { - user.Dashboard(ctx) - } - return - // Check non-logged users landing page. - } else if setting.LandingPageURL != setting.LandingPageHome { - ctx.Redirect(setting.AppSubURL + string(setting.LandingPageURL)) - return - } - - // Check auto-login. - uname := ctx.GetCookie(setting.CookieUserName) - if len(uname) != 0 { - ctx.Redirect(setting.AppSubURL + "/user/login") - return - } - - ctx.Data["PageIsHome"] = true - ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - ctx.HTML(200, tplHome) -} - -// RepoSearchOptions when calling search repositories -type RepoSearchOptions struct { - OwnerID int64 - Private bool - Restricted bool - PageSize int - TplName base.TplName -} - -var ( - nullByte = []byte{0x00} -) - -func isKeywordValid(keyword string) bool { - return !bytes.Contains([]byte(keyword), nullByte) -} - -// RenderRepoSearch render repositories search page -func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) { - page := ctx.QueryInt("page") - if page <= 0 { - page = 1 - } - - var ( - repos []*models.Repository - count int64 - err error - orderBy models.SearchOrderBy - ) - - ctx.Data["SortType"] = ctx.Query("sort") - switch ctx.Query("sort") { - case "newest": - orderBy = models.SearchOrderByNewest - case "oldest": - orderBy = models.SearchOrderByOldest - case "recentupdate": - orderBy = models.SearchOrderByRecentUpdated - case "leastupdate": - orderBy = models.SearchOrderByLeastUpdated - case "reversealphabetically": - orderBy = models.SearchOrderByAlphabeticallyReverse - case "alphabetically": - orderBy = models.SearchOrderByAlphabetically - case "reversesize": - orderBy = models.SearchOrderBySizeReverse - case "size": - orderBy = models.SearchOrderBySize - case "moststars": - orderBy = models.SearchOrderByStarsReverse - case "feweststars": - orderBy = models.SearchOrderByStars - case "mostforks": - orderBy = models.SearchOrderByForksReverse - case "fewestforks": - orderBy = models.SearchOrderByForks - default: - ctx.Data["SortType"] = "recentupdate" - orderBy = models.SearchOrderByRecentUpdated - } - - keyword := strings.Trim(ctx.Query("q"), " ") - topicOnly := ctx.QueryBool("topic") - ctx.Data["TopicOnly"] = topicOnly - - repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ - ListOptions: models.ListOptions{ - Page: page, - PageSize: opts.PageSize, - }, - Actor: ctx.User, - OrderBy: orderBy, - Private: opts.Private, - Keyword: keyword, - OwnerID: opts.OwnerID, - AllPublic: true, - AllLimited: true, - TopicOnly: topicOnly, - IncludeDescription: setting.UI.SearchRepoDescription, - }) - if err != nil { - ctx.ServerError("SearchRepository", err) - return - } - ctx.Data["Keyword"] = keyword - ctx.Data["Total"] = count - ctx.Data["Repos"] = repos - ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - - pager := context.NewPagination(int(count), opts.PageSize, page, 5) - pager.SetDefaultParams(ctx) - pager.AddParam(ctx, "topic", "TopicOnly") - ctx.Data["Page"] = pager - - ctx.HTML(200, opts.TplName) -} - -// ExploreRepos render explore repositories page -func ExploreRepos(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("explore") - ctx.Data["PageIsExplore"] = true - ctx.Data["PageIsExploreRepositories"] = true - ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - - var ownerID int64 - if ctx.User != nil && !ctx.User.IsAdmin { - ownerID = ctx.User.ID - } - - RenderRepoSearch(ctx, &RepoSearchOptions{ - PageSize: setting.UI.ExplorePagingNum, - OwnerID: ownerID, - Private: ctx.User != nil, - TplName: tplExploreRepos, - }) -} - -// RenderUserSearch render user search page -func RenderUserSearch(ctx *context.Context, opts *models.SearchUserOptions, tplName base.TplName) { - opts.Page = ctx.QueryInt("page") - if opts.Page <= 1 { - opts.Page = 1 - } - - var ( - users []*models.User - count int64 - err error - orderBy models.SearchOrderBy - ) - - ctx.Data["SortType"] = ctx.Query("sort") - switch ctx.Query("sort") { - case "newest": - orderBy = models.SearchOrderByIDReverse - case "oldest": - orderBy = models.SearchOrderByID - case "recentupdate": - orderBy = models.SearchOrderByRecentUpdated - case "leastupdate": - orderBy = models.SearchOrderByLeastUpdated - case "reversealphabetically": - orderBy = models.SearchOrderByAlphabeticallyReverse - case "alphabetically": - orderBy = models.SearchOrderByAlphabetically - default: - ctx.Data["SortType"] = "alphabetically" - orderBy = models.SearchOrderByAlphabetically - } - - opts.Keyword = strings.Trim(ctx.Query("q"), " ") - opts.OrderBy = orderBy - if len(opts.Keyword) == 0 || isKeywordValid(opts.Keyword) { - users, count, err = models.SearchUsers(opts) - if err != nil { - ctx.ServerError("SearchUsers", err) - return - } - } - ctx.Data["Keyword"] = opts.Keyword - ctx.Data["Total"] = count - ctx.Data["Users"] = users - ctx.Data["UsersTwoFaStatus"] = models.UserList(users).GetTwoFaStatus() - ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail - ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - - pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - - ctx.HTML(200, tplName) -} - -// ExploreUsers render explore users page -func ExploreUsers(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("explore") - ctx.Data["PageIsExplore"] = true - ctx.Data["PageIsExploreUsers"] = true - ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - - RenderUserSearch(ctx, &models.SearchUserOptions{ - Actor: ctx.User, - Type: models.UserTypeIndividual, - ListOptions: models.ListOptions{PageSize: setting.UI.ExplorePagingNum}, - IsActive: util.OptionalBoolTrue, - Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate}, - }, tplExploreUsers) -} - -// ExploreOrganizations render explore organizations page -func ExploreOrganizations(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("explore") - ctx.Data["PageIsExplore"] = true - ctx.Data["PageIsExploreOrganizations"] = true - ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - - visibleTypes := []structs.VisibleType{structs.VisibleTypePublic} - if ctx.User != nil { - visibleTypes = append(visibleTypes, structs.VisibleTypeLimited, structs.VisibleTypePrivate) - } - - RenderUserSearch(ctx, &models.SearchUserOptions{ - Actor: ctx.User, - Type: models.UserTypeOrganization, - ListOptions: models.ListOptions{PageSize: setting.UI.ExplorePagingNum}, - Visible: visibleTypes, - }, tplExploreOrganizations) -} - -// ExploreCode render explore code page -func ExploreCode(ctx *context.Context) { - if !setting.Indexer.RepoIndexerEnabled { - ctx.Redirect(setting.AppSubURL+"/explore", 302) - return - } - - ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled - ctx.Data["Title"] = ctx.Tr("explore") - ctx.Data["PageIsExplore"] = true - ctx.Data["PageIsExploreCode"] = true - - language := strings.TrimSpace(ctx.Query("l")) - keyword := strings.TrimSpace(ctx.Query("q")) - page := ctx.QueryInt("page") - if page <= 0 { - page = 1 - } - - var ( - repoIDs []int64 - err error - isAdmin bool - ) - if ctx.User != nil { - isAdmin = ctx.User.IsAdmin - } - - // guest user or non-admin user - if ctx.User == nil || !isAdmin { - repoIDs, err = models.FindUserAccessibleRepoIDs(ctx.User) - if err != nil { - ctx.ServerError("SearchResults", err) - return - } - } - - var ( - total int - searchResults []*code_indexer.Result - searchResultLanguages []*code_indexer.SearchResultLanguages - ) - - // if non-admin login user, we need check UnitTypeCode at first - if ctx.User != nil && len(repoIDs) > 0 { - repoMaps, err := models.GetRepositoriesMapByIDs(repoIDs) - if err != nil { - ctx.ServerError("SearchResults", err) - return - } - - var rightRepoMap = make(map[int64]*models.Repository, len(repoMaps)) - repoIDs = make([]int64, 0, len(repoMaps)) - for id, repo := range repoMaps { - if repo.CheckUnitUser(ctx.User, models.UnitTypeCode) { - rightRepoMap[id] = repo - repoIDs = append(repoIDs, id) - } - } - - ctx.Data["RepoMaps"] = rightRepoMap - - total, searchResults, searchResultLanguages, err = code_indexer.PerformSearch(repoIDs, language, keyword, page, setting.UI.RepoSearchPagingNum) - if err != nil { - ctx.ServerError("SearchResults", err) - return - } - // if non-login user or isAdmin, no need to check UnitTypeCode - } else if (ctx.User == nil && len(repoIDs) > 0) || isAdmin { - total, searchResults, searchResultLanguages, err = code_indexer.PerformSearch(repoIDs, language, keyword, page, setting.UI.RepoSearchPagingNum) - if err != nil { - ctx.ServerError("SearchResults", err) - return - } - - var loadRepoIDs = make([]int64, 0, len(searchResults)) - for _, result := range searchResults { - var find bool - for _, id := range loadRepoIDs { - if id == result.RepoID { - find = true - break - } - } - if !find { - loadRepoIDs = append(loadRepoIDs, result.RepoID) - } - } - - repoMaps, err := models.GetRepositoriesMapByIDs(loadRepoIDs) - if err != nil { - ctx.ServerError("SearchResults", err) - return - } - - ctx.Data["RepoMaps"] = repoMaps - } - - ctx.Data["Keyword"] = keyword - ctx.Data["Language"] = language - ctx.Data["SearchResults"] = searchResults - ctx.Data["SearchResultLanguages"] = searchResultLanguages - ctx.Data["RequireHighlightJS"] = true - ctx.Data["PageIsViewCode"] = true - - pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5) - pager.SetDefaultParams(ctx) - pager.AddParam(ctx, "l", "Language") - ctx.Data["Page"] = pager - - ctx.HTML(200, tplExploreCode) -} - -// NotFound render 404 page -func NotFound(ctx *context.Context) { - ctx.Data["Title"] = "Page Not Found" - ctx.NotFound("home.NotFound", nil) -} diff --git a/routers/init.go b/routers/init.go index ff2ddcc0b..27cd066b7 100644 --- a/routers/init.go +++ b/routers/init.go @@ -6,13 +6,9 @@ package routers import ( "context" - "fmt" "strings" - "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/models/migrations" - "code.gitea.io/gitea/modules/auth/sso" "code.gitea.io/gitea/modules/cache" "code.gitea.io/gitea/modules/cron" "code.gitea.io/gitea/modules/eventsource" @@ -32,29 +28,21 @@ import ( "code.gitea.io/gitea/modules/svg" "code.gitea.io/gitea/modules/task" "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/modules/web" + apiv1 "code.gitea.io/gitea/routers/api/v1" + "code.gitea.io/gitea/routers/common" + "code.gitea.io/gitea/routers/private" + web_routers "code.gitea.io/gitea/routers/web" + "code.gitea.io/gitea/services/archiver" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/oauth2" "code.gitea.io/gitea/services/mailer" mirror_service "code.gitea.io/gitea/services/mirror" pull_service "code.gitea.io/gitea/services/pull" "code.gitea.io/gitea/services/repository" "code.gitea.io/gitea/services/webhook" - - "gitea.com/macaron/macaron" ) -func checkRunMode() { - switch setting.RunMode { - case "dev": - git.Debug = true - case "test": - git.Debug = true - default: - macaron.Env = macaron.PROD - macaron.ColorLog = false - setting.ProdMode = true - } - log.Info("Run Mode: %s", strings.Title(macaron.Env)) -} - // NewServices init new services func NewServices() { setting.NewServices() @@ -65,64 +53,12 @@ func NewServices() { log.Fatal("repository init failed: %v", err) } mailer.NewContext() - _ = cache.NewContext() + if err := cache.NewContext(); err != nil { + log.Fatal("Unable to start cache service: %v", err) + } notification.NewContext() -} - -// In case of problems connecting to DB, retry connection. Eg, PGSQL in Docker Container on Synology -func initDBEngine(ctx context.Context) (err error) { - log.Info("Beginning ORM engine initialization.") - for i := 0; i < setting.Database.DBConnectRetries; i++ { - select { - case <-ctx.Done(): - return fmt.Errorf("Aborted due to shutdown:\nin retry ORM engine initialization") - default: - } - log.Info("ORM engine initialization attempt #%d/%d...", i+1, setting.Database.DBConnectRetries) - if err = models.NewEngine(ctx, migrations.Migrate); err == nil { - break - } else if i == setting.Database.DBConnectRetries-1 { - return err - } - log.Error("ORM engine initialization attempt #%d/%d failed. Error: %v", i+1, setting.Database.DBConnectRetries, err) - log.Info("Backing off for %d seconds", int64(setting.Database.DBConnectBackoff/time.Second)) - time.Sleep(setting.Database.DBConnectBackoff) - } - models.HasEngine = true - return nil -} - -// PreInstallInit preloads the configuration to check if we need to run install -func PreInstallInit(ctx context.Context) bool { - setting.NewContext() - if !setting.InstallLock { - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) - log.Trace("Preparing to run install page") - translation.InitLocales() - if setting.EnableSQLite3 { - log.Info("SQLite3 Supported") - } - setting.InitDBConfig() - svg.Init() - } - - return !setting.InstallLock -} - -// PostInstallInit rereads the settings and starts up the database -func PostInstallInit(ctx context.Context) { - setting.NewContext() - setting.InitDBConfig() - if setting.InstallLock { - if err := initDBEngine(ctx); err == nil { - log.Info("ORM engine initialization successful!") - } else { - log.Fatal("ORM engine initialization failed: %v", err) - } - svg.Init() + if err := archiver.Init(); err != nil { + log.Fatal("archiver init failed: %v", err) } } @@ -132,14 +68,18 @@ func GlobalInit(ctx context.Context) { if !setting.InstallLock { log.Fatal("Gitea is not installed") } + if err := git.Init(ctx); err != nil { log.Fatal("Git module init failed: %v", err) } - setting.CheckLFSVersion() - log.Trace("AppPath: %s", setting.AppPath) - log.Trace("AppWorkPath: %s", setting.AppWorkPath) - log.Trace("Custom path: %s", setting.CustomPath) - log.Trace("Log path: %s", setting.LogRootPath) + log.Info(git.VersionInfo()) + + git.CheckLFSVersion() + log.Info("AppPath: %s", setting.AppPath) + log.Info("AppWorkPath: %s", setting.AppWorkPath) + log.Info("Custom path: %s", setting.CustomPath) + log.Info("Log path: %s", setting.LogRootPath) + log.Info("Run Mode: %s", strings.Title(setting.RunMode)) // Setup i18n translation.InitLocales() @@ -147,15 +87,21 @@ func GlobalInit(ctx context.Context) { NewServices() highlight.NewContext() - external.RegisterParsers() + external.RegisterRenderers() markup.Init() - if err := initDBEngine(ctx); err == nil { + + if setting.EnableSQLite3 { + log.Info("SQLite3 Supported") + } else if setting.Database.UseSQLite3 { + log.Fatal("SQLite3 is set in settings but NOT Supported") + } + if err := common.InitDBEngine(ctx); err == nil { log.Info("ORM engine initialization successful!") } else { log.Fatal("ORM engine initialization failed: %v", err) } - if err := models.InitOAuth2(); err != nil { + if err := oauth2.Init(); err != nil { log.Fatal("Failed to initialize OAuth2 support: %v", err) } @@ -181,18 +127,26 @@ func GlobalInit(ctx context.Context) { } eventsource.GetManager().Init() - if setting.EnableSQLite3 { - log.Info("SQLite3 Supported") - } - checkRunMode() - if setting.SSH.StartBuiltinServer { ssh.Listen(setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs) log.Info("SSH server started on %s:%d. Cipher list (%v), key exchange algorithms (%v), MACs (%v)", setting.SSH.ListenHost, setting.SSH.ListenPort, setting.SSH.ServerCiphers, setting.SSH.ServerKeyExchanges, setting.SSH.ServerMACs) } else { ssh.Unused() } - sso.Init() + auth.Init() svg.Init() } + +// NormalRoutes represents non install routes +func NormalRoutes() *web.Route { + r := web.NewRoute() + for _, middle := range common.Middlewares() { + r.Use(middle) + } + + r.Mount("/", web_routers.Routes()) + r.Mount("/api/v1", apiv1.Routes()) + r.Mount("/api/internal", private.Routes()) + return r +} diff --git a/routers/install.go b/routers/install/install.go similarity index 84% rename from routers/install.go rename to routers/install/install.go index 50e929b6f..ad985cf18 100644 --- a/routers/install.go +++ b/routers/install/install.go @@ -1,8 +1,9 @@ // Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2021 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package routers +package install import ( "fmt" @@ -11,18 +12,24 @@ import ( "os/exec" "path/filepath" "strings" + "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/generate" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/translation" "code.gitea.io/gitea/modules/user" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/forms" + "gitea.com/go-chi/session" "gopkg.in/ini.v1" ) @@ -32,23 +39,54 @@ const ( tplPostInstall base.TplName = "post-install" ) -// InstallInit prepare for rendering installation page -func InstallInit(ctx *context.Context) { - if setting.InstallLock { - ctx.Header().Add("Refresh", "1; url="+setting.AppURL+"user/login") - ctx.HTML(200, tplPostInstall) - return - } +// Init prepare for rendering installation page +func Init(next http.Handler) http.Handler { + var rnd = templates.HTMLRenderer() - ctx.Data["Title"] = ctx.Tr("install.install") - ctx.Data["PageIsInstall"] = true - - ctx.Data["DbOptions"] = setting.SupportedDatabases + return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) { + if setting.InstallLock { + resp.Header().Add("Refresh", "1; url="+setting.AppURL+"user/login") + _ = rnd.HTML(resp, 200, string(tplPostInstall), nil) + return + } + var locale = middleware.Locale(resp, req) + var startTime = time.Now() + var ctx = context.Context{ + Resp: context.NewResponse(resp), + Flash: &middleware.Flash{}, + Locale: locale, + Render: rnd, + Session: session.GetSession(req), + Data: map[string]interface{}{ + "Title": locale.Tr("install.install"), + "PageIsInstall": true, + "DbOptions": setting.SupportedDatabases, + "i18n": locale, + "Language": locale.Language(), + "Lang": locale.Language(), + "AllLangs": translation.AllLangs(), + "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), + "PageStartTime": startTime, + "TmplLoadTimes": func() string { + return time.Since(startTime).String() + }, + "PasswordHashAlgorithms": models.AvailableHashAlgorithms, + }, + } + for _, lang := range translation.AllLangs() { + if lang.Lang == locale.Language() { + ctx.Data["LangName"] = lang.Name + break + } + } + ctx.Req = context.WithContext(req, &ctx) + next.ServeHTTP(resp, ctx.Req) + }) } // Install render installation page func Install(ctx *context.Context) { - form := auth.InstallForm{} + form := forms.InstallForm{} // Database settings form.DbHost = setting.Database.Host @@ -115,13 +153,15 @@ func Install(ctx *context.Context) { form.DefaultAllowCreateOrganization = setting.Service.DefaultAllowCreateOrganization form.DefaultEnableTimetracking = setting.Service.DefaultEnableTimetracking form.NoReplyAddress = setting.Service.NoReplyAddress + form.PasswordAlgorithm = setting.PasswordHashAlgo - auth.AssignForm(form, ctx.Data) - ctx.HTML(200, tplInstall) + middleware.AssignForm(form, ctx.Data) + ctx.HTML(http.StatusOK, tplInstall) } -// InstallPost response for submit install items -func InstallPost(ctx *context.Context, form auth.InstallForm) { +// SubmitInstall response for submit install items +func SubmitInstall(ctx *context.Context) { + form := *web.GetForm(ctx).(*forms.InstallForm) var err error ctx.Data["CurDbOption"] = form.DbType @@ -135,7 +175,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { ctx.Data["Err_Admin"] = true } - ctx.HTML(200, tplInstall) + ctx.HTML(http.StatusOK, tplInstall) return } @@ -157,6 +197,8 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { setting.Database.Charset = form.Charset setting.Database.Path = form.DbPath + setting.PasswordHashAlgo = form.PasswordAlgorithm + if (setting.Database.Type == "sqlite3") && len(setting.Database.Path) == 0 { ctx.Data["Err_DbPath"] = true @@ -301,7 +343,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { cfg.Section("server").Key("LFS_START_SERVER").SetValue("true") cfg.Section("server").Key("LFS_CONTENT_PATH").SetValue(form.LFSRootPath) var secretKey string - if secretKey, err = generate.NewJwtSecret(); err != nil { + if secretKey, err = generate.NewJwtSecretBase64(); err != nil { ctx.RenderWithErr(ctx.Tr("install.lfs_jwt_secret_failed", err), tplInstall, &form) return } @@ -341,10 +383,8 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { cfg.Section("session").Key("PROVIDER").SetValue("file") cfg.Section("log").Key("MODE").SetValue("console") - cfg.Section("log").Key("LEVEL").SetValue(setting.LogLevel) + cfg.Section("log").Key("LEVEL").SetValue(setting.LogLevel.String()) cfg.Section("log").Key("ROOT_PATH").SetValue(form.LogRootPath) - cfg.Section("log").Key("REDIRECT_MACARON_LOG").SetValue("true") - cfg.Section("log").Key("MACARON").SetValue("console") cfg.Section("log").Key("ROUTER").SetValue("console") cfg.Section("security").Key("INSTALL_LOCK").SetValue("true") @@ -354,6 +394,9 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { return } cfg.Section("security").Key("SECRET_KEY").SetValue(secretKey) + if len(form.PasswordAlgorithm) > 0 { + cfg.Section("security").Key("PASSWORD_HASH_ALGO").SetValue(form.PasswordAlgorithm) + } err = os.MkdirAll(filepath.Dir(setting.CustomConf), os.ModePerm) if err != nil { @@ -367,7 +410,7 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { } // Re-read settings - PostInstallInit(ctx.Req.Context()) + ReloadSettings(ctx) // Create admin account if len(form.AdminName) > 0 { @@ -391,9 +434,10 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { } days := 86400 * setting.LogInRememberDays - ctx.SetCookie(setting.CookieUserName, u.Name, days, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) + ctx.SetCookie(setting.CookieUserName, u.Name, days) + ctx.SetSuperSecureCookie(base.EncodeMD5(u.Rands+u.Passwd), - setting.CookieRememberName, u.Name, days, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) + setting.CookieRememberName, u.Name, days) // Auto-login for admin if err = ctx.Session.Set("uid", u.ID); err != nil { @@ -416,11 +460,11 @@ func InstallPost(ctx *context.Context, form auth.InstallForm) { ctx.Flash.Success(ctx.Tr("install.install_success")) ctx.Header().Add("Refresh", "1; url="+setting.AppURL+"user/login") - ctx.HTML(200, tplPostInstall) + ctx.HTML(http.StatusOK, tplPostInstall) // Now get the http.Server from this request and shut it down // NB: This is not our hammerable graceful shutdown this is http.Server.Shutdown - srv := ctx.Req.Context().Value(http.ServerContextKey).(*http.Server) + srv := ctx.Value(http.ServerContextKey).(*http.Server) go func() { if err := srv.Shutdown(graceful.GetManager().HammerContext()); err != nil { log.Error("Unable to shutdown the install server! Error: %v", err) diff --git a/routers/install/routes.go b/routers/install/routes.go new file mode 100644 index 000000000..e9aca85d8 --- /dev/null +++ b/routers/install/routes.go @@ -0,0 +1,113 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package install + +import ( + "fmt" + "net/http" + "path" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/public" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/routers/common" + "code.gitea.io/gitea/services/forms" + + "gitea.com/go-chi/session" +) + +type dataStore map[string]interface{} + +func (d *dataStore) GetData() map[string]interface{} { + return *d +} + +func installRecovery() func(next http.Handler) http.Handler { + var rnd = templates.HTMLRenderer() + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + defer func() { + // Why we need this? The first recover will try to render a beautiful + // error page for user, but the process can still panic again, then + // we have to just recover twice and send a simple error page that + // should not panic any more. + defer func() { + if err := recover(); err != nil { + combinedErr := fmt.Sprintf("PANIC: %v\n%s", err, string(log.Stack(2))) + log.Error(combinedErr) + if setting.IsProd() { + http.Error(w, http.StatusText(500), 500) + } else { + http.Error(w, combinedErr, 500) + } + } + }() + + if err := recover(); err != nil { + combinedErr := fmt.Sprintf("PANIC: %v\n%s", err, string(log.Stack(2))) + log.Error("%v", combinedErr) + + lc := middleware.Locale(w, req) + var store = dataStore{ + "Language": lc.Language(), + "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), + "i18n": lc, + "SignedUserID": int64(0), + "SignedUserName": "", + } + + w.Header().Set(`X-Frame-Options`, setting.CORSConfig.XFrameOptions) + + if !setting.IsProd() { + store["ErrorMsg"] = combinedErr + } + err = rnd.HTML(w, 500, "status/500", templates.BaseVars().Merge(store)) + if err != nil { + log.Error("%v", err) + } + } + }() + + next.ServeHTTP(w, req) + }) + } +} + +// Routes registers the install routes +func Routes() *web.Route { + r := web.NewRoute() + for _, middle := range common.Middlewares() { + r.Use(middle) + } + + r.Use(public.AssetsHandler(&public.Options{ + Directory: path.Join(setting.StaticRootPath, "public"), + Prefix: "/assets", + })) + + r.Use(session.Sessioner(session.Options{ + Provider: setting.SessionConfig.Provider, + ProviderConfig: setting.SessionConfig.ProviderConfig, + CookieName: setting.SessionConfig.CookieName, + CookiePath: setting.SessionConfig.CookiePath, + Gclifetime: setting.SessionConfig.Gclifetime, + Maxlifetime: setting.SessionConfig.Maxlifetime, + Secure: setting.SessionConfig.Secure, + SameSite: setting.SessionConfig.SameSite, + Domain: setting.SessionConfig.Domain, + })) + + r.Use(installRecovery()) + r.Use(Init) + r.Get("/", Install) + r.Post("/", web.Bind(forms.InstallForm{}), SubmitInstall) + r.NotFound(func(w http.ResponseWriter, req *http.Request) { + http.Redirect(w, req, setting.AppURL, http.StatusFound) + }) + return r +} diff --git a/routers/install/routes_test.go b/routers/install/routes_test.go new file mode 100644 index 000000000..35a66c1c4 --- /dev/null +++ b/routers/install/routes_test.go @@ -0,0 +1,20 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package install + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestRoutes(t *testing.T) { + routes := Routes() + assert.NotNil(t, routes) + assert.Len(t, routes.R.Routes(), 1) + assert.EqualValues(t, "/", routes.R.Routes()[0].Pattern) + assert.Nil(t, routes.R.Routes()[0].SubRoutes) + assert.Len(t, routes.R.Routes()[0].Handlers, 2) +} diff --git a/routers/install/setting.go b/routers/install/setting.go new file mode 100644 index 000000000..7b9b7bd8c --- /dev/null +++ b/routers/install/setting.go @@ -0,0 +1,50 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package install + +import ( + "context" + + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/svg" + "code.gitea.io/gitea/modules/translation" + "code.gitea.io/gitea/routers/common" +) + +// PreloadSettings preloads the configuration to check if we need to run install +func PreloadSettings(ctx context.Context) bool { + setting.NewContext() + if !setting.InstallLock { + log.Info("AppPath: %s", setting.AppPath) + log.Info("AppWorkPath: %s", setting.AppWorkPath) + log.Info("Custom path: %s", setting.CustomPath) + log.Info("Log path: %s", setting.LogRootPath) + log.Info("Preparing to run install page") + translation.InitLocales() + if setting.EnableSQLite3 { + log.Info("SQLite3 Supported") + } + setting.InitDBConfig() + setting.NewServicesForInstall() + svg.Init() + } + + return !setting.InstallLock +} + +// ReloadSettings rereads the settings and starts up the database +func ReloadSettings(ctx context.Context) { + setting.NewContext() + setting.InitDBConfig() + if setting.InstallLock { + if err := common.InitDBEngine(ctx); err == nil { + log.Info("ORM engine initialization successful!") + } else { + log.Fatal("ORM engine initialization failed: %v", err) + } + svg.Init() + } +} diff --git a/routers/org/home.go b/routers/org/home.go deleted file mode 100644 index ff3e1e3e7..000000000 --- a/routers/org/home.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package org - -import ( - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/markup/markdown" - "code.gitea.io/gitea/modules/setting" -) - -const ( - tplOrgHome base.TplName = "org/home" -) - -// Home show organization home page -func Home(ctx *context.Context) { - ctx.SetParams(":org", ctx.Params(":username")) - context.HandleOrgAssignment(ctx) - if ctx.Written() { - return - } - - org := ctx.Org.Organization - - if !models.HasOrgVisible(org, ctx.User) { - ctx.NotFound("HasOrgVisible", nil) - return - } - - ctx.Data["PageIsUserProfile"] = true - ctx.Data["Title"] = org.DisplayName() - if len(org.Description) != 0 { - ctx.Data["RenderedDescription"] = string(markdown.Render([]byte(org.Description), ctx.Repo.RepoLink, map[string]string{"mode": "document"})) - } - - var orderBy models.SearchOrderBy - ctx.Data["SortType"] = ctx.Query("sort") - switch ctx.Query("sort") { - case "newest": - orderBy = models.SearchOrderByNewest - case "oldest": - orderBy = models.SearchOrderByOldest - case "recentupdate": - orderBy = models.SearchOrderByRecentUpdated - case "leastupdate": - orderBy = models.SearchOrderByLeastUpdated - case "reversealphabetically": - orderBy = models.SearchOrderByAlphabeticallyReverse - case "alphabetically": - orderBy = models.SearchOrderByAlphabetically - case "moststars": - orderBy = models.SearchOrderByStarsReverse - case "feweststars": - orderBy = models.SearchOrderByStars - case "mostforks": - orderBy = models.SearchOrderByForksReverse - case "fewestforks": - orderBy = models.SearchOrderByForks - default: - ctx.Data["SortType"] = "recentupdate" - orderBy = models.SearchOrderByRecentUpdated - } - - keyword := strings.Trim(ctx.Query("q"), " ") - ctx.Data["Keyword"] = keyword - - page := ctx.QueryInt("page") - if page <= 0 { - page = 1 - } - - var ( - repos []*models.Repository - count int64 - err error - ) - repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ - ListOptions: models.ListOptions{ - PageSize: setting.UI.User.RepoPagingNum, - Page: page, - }, - Keyword: keyword, - OwnerID: org.ID, - OrderBy: orderBy, - Private: ctx.IsSigned, - Actor: ctx.User, - IncludeDescription: setting.UI.SearchRepoDescription, - }) - if err != nil { - ctx.ServerError("SearchRepository", err) - return - } - - var opts = models.FindOrgMembersOpts{ - OrgID: org.ID, - PublicOnly: true, - ListOptions: models.ListOptions{Page: 1, PageSize: 25}, - } - - if ctx.User != nil { - isMember, err := org.IsOrgMember(ctx.User.ID) - if err != nil { - ctx.Error(500, "IsOrgMember") - return - } - opts.PublicOnly = !isMember && !ctx.User.IsAdmin - } - - members, _, err := models.FindOrgMembers(&opts) - if err != nil { - ctx.ServerError("FindOrgMembers", err) - return - } - - membersCount, err := models.CountOrgMembers(opts) - if err != nil { - ctx.ServerError("CountOrgMembers", err) - return - } - - ctx.Data["Owner"] = org - ctx.Data["Repos"] = repos - ctx.Data["Total"] = count - ctx.Data["MembersTotal"] = membersCount - ctx.Data["Members"] = members - ctx.Data["Teams"] = org.Teams - - ctx.Data["DisabledMirrors"] = setting.Repository.DisableMirrors - - pager := context.NewPagination(int(count), setting.UI.User.RepoPagingNum, page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - - ctx.HTML(200, tplOrgHome) -} diff --git a/routers/org/members.go b/routers/org/members.go deleted file mode 100644 index 00ca381ad..000000000 --- a/routers/org/members.go +++ /dev/null @@ -1,126 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2020 The Gitea Authors. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package org - -import ( - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" -) - -const ( - // tplMembers template for organization members page - tplMembers base.TplName = "org/member/members" -) - -// Members render organization users page -func Members(ctx *context.Context) { - org := ctx.Org.Organization - ctx.Data["Title"] = org.FullName - ctx.Data["PageIsOrgMembers"] = true - - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - - var opts = models.FindOrgMembersOpts{ - OrgID: org.ID, - PublicOnly: true, - } - - if ctx.User != nil { - isMember, err := ctx.Org.Organization.IsOrgMember(ctx.User.ID) - if err != nil { - ctx.Error(500, "IsOrgMember") - return - } - opts.PublicOnly = !isMember && !ctx.User.IsAdmin - } - - total, err := models.CountOrgMembers(opts) - if err != nil { - ctx.Error(500, "CountOrgMembers") - return - } - - pager := context.NewPagination(int(total), setting.UI.MembersPagingNum, page, 5) - opts.ListOptions.Page = page - opts.ListOptions.PageSize = setting.UI.MembersPagingNum - members, membersIsPublic, err := models.FindOrgMembers(&opts) - if err != nil { - ctx.ServerError("GetMembers", err) - return - } - ctx.Data["Page"] = pager - ctx.Data["Members"] = members - ctx.Data["MembersIsPublicMember"] = membersIsPublic - ctx.Data["MembersIsUserOrgOwner"] = members.IsUserOrgOwner(org.ID) - ctx.Data["MembersTwoFaStatus"] = members.GetTwoFaStatus() - - ctx.HTML(200, tplMembers) -} - -// MembersAction response for operation to a member of organization -func MembersAction(ctx *context.Context) { - uid := ctx.QueryInt64("uid") - if uid == 0 { - ctx.Redirect(ctx.Org.OrgLink + "/members") - return - } - - org := ctx.Org.Organization - var err error - switch ctx.Params(":action") { - case "private": - if ctx.User.ID != uid && !ctx.Org.IsOwner { - ctx.Error(404) - return - } - err = models.ChangeOrgUserStatus(org.ID, uid, false) - case "public": - if ctx.User.ID != uid && !ctx.Org.IsOwner { - ctx.Error(404) - return - } - err = models.ChangeOrgUserStatus(org.ID, uid, true) - case "remove": - if !ctx.Org.IsOwner { - ctx.Error(404) - return - } - err = org.RemoveMember(uid) - if models.IsErrLastOrgOwner(err) { - ctx.Flash.Error(ctx.Tr("form.last_org_owner")) - ctx.Redirect(ctx.Org.OrgLink + "/members") - return - } - case "leave": - err = org.RemoveMember(ctx.User.ID) - if models.IsErrLastOrgOwner(err) { - ctx.Flash.Error(ctx.Tr("form.last_org_owner")) - ctx.Redirect(ctx.Org.OrgLink + "/members") - return - } - } - - if err != nil { - log.Error("Action(%s): %v", ctx.Params(":action"), err) - ctx.JSON(200, map[string]interface{}{ - "ok": false, - "err": err.Error(), - }) - return - } - - if ctx.Params(":action") != "leave" { - ctx.Redirect(ctx.Org.OrgLink + "/members") - } else { - ctx.Redirect(setting.AppSubURL + "/") - } -} diff --git a/routers/org/org.go b/routers/org/org.go deleted file mode 100644 index 85bc25217..000000000 --- a/routers/org/org.go +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package org - -import ( - "errors" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" -) - -const ( - // tplCreateOrg template path for create organization - tplCreateOrg base.TplName = "org/create" -) - -// Create render the page for create organization -func Create(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("new_org") - ctx.Data["DefaultOrgVisibilityMode"] = setting.Service.DefaultOrgVisibilityMode - if !ctx.User.CanCreateOrganization() { - ctx.ServerError("Not allowed", errors.New(ctx.Tr("org.form.create_org_not_allowed"))) - return - } - ctx.HTML(200, tplCreateOrg) -} - -// CreatePost response for create organization -func CreatePost(ctx *context.Context, form auth.CreateOrgForm) { - ctx.Data["Title"] = ctx.Tr("new_org") - - if !ctx.User.CanCreateOrganization() { - ctx.ServerError("Not allowed", errors.New(ctx.Tr("org.form.create_org_not_allowed"))) - return - } - - if ctx.HasError() { - ctx.HTML(200, tplCreateOrg) - return - } - - org := &models.User{ - Name: form.OrgName, - IsActive: true, - Type: models.UserTypeOrganization, - Visibility: form.Visibility, - RepoAdminChangeTeamAccess: form.RepoAdminChangeTeamAccess, - } - - if err := models.CreateOrganization(org, ctx.User); err != nil { - ctx.Data["Err_OrgName"] = true - switch { - case models.IsErrUserAlreadyExist(err): - ctx.RenderWithErr(ctx.Tr("form.org_name_been_taken"), tplCreateOrg, &form) - case models.IsErrNameReserved(err): - ctx.RenderWithErr(ctx.Tr("org.form.name_reserved", err.(models.ErrNameReserved).Name), tplCreateOrg, &form) - case models.IsErrNamePatternNotAllowed(err): - ctx.RenderWithErr(ctx.Tr("org.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplCreateOrg, &form) - case models.IsErrUserNotAllowedCreateOrg(err): - ctx.RenderWithErr(ctx.Tr("org.form.create_org_not_allowed"), tplCreateOrg, &form) - default: - ctx.ServerError("CreateOrganization", err) - } - return - } - log.Trace("Organization created: %s", org.Name) - - ctx.Redirect(setting.AppSubURL + "/org/" + form.OrgName + "/dashboard") -} diff --git a/routers/org/setting.go b/routers/org/setting.go deleted file mode 100644 index 454714c7e..000000000 --- a/routers/org/setting.go +++ /dev/null @@ -1,208 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package org - -import ( - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - userSetting "code.gitea.io/gitea/routers/user/setting" -) - -const ( - // tplSettingsOptions template path for render settings - tplSettingsOptions base.TplName = "org/settings/options" - // tplSettingsDelete template path for render delete repository - tplSettingsDelete base.TplName = "org/settings/delete" - // tplSettingsHooks template path for render hook settings - tplSettingsHooks base.TplName = "org/settings/hooks" - // tplSettingsLabels template path for render labels settings - tplSettingsLabels base.TplName = "org/settings/labels" -) - -// Settings render the main settings page -func Settings(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("org.settings") - ctx.Data["PageIsSettingsOptions"] = true - ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility - ctx.Data["RepoAdminChangeTeamAccess"] = ctx.Org.Organization.RepoAdminChangeTeamAccess - ctx.HTML(200, tplSettingsOptions) -} - -// SettingsPost response for settings change submited -func SettingsPost(ctx *context.Context, form auth.UpdateOrgSettingForm) { - ctx.Data["Title"] = ctx.Tr("org.settings") - ctx.Data["PageIsSettingsOptions"] = true - ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility - - if ctx.HasError() { - ctx.HTML(200, tplSettingsOptions) - return - } - - org := ctx.Org.Organization - - // Check if organization name has been changed. - if org.LowerName != strings.ToLower(form.Name) { - isExist, err := models.IsUserExist(org.ID, form.Name) - if err != nil { - ctx.ServerError("IsUserExist", err) - return - } else if isExist { - ctx.Data["OrgName"] = true - ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplSettingsOptions, &form) - return - } else if err = models.ChangeUserName(org, form.Name); err != nil { - if err == models.ErrUserNameIllegal { - ctx.Data["OrgName"] = true - ctx.RenderWithErr(ctx.Tr("form.illegal_username"), tplSettingsOptions, &form) - } else { - ctx.ServerError("ChangeUserName", err) - } - return - } - // reset ctx.org.OrgLink with new name - ctx.Org.OrgLink = setting.AppSubURL + "/org/" + form.Name - log.Trace("Organization name changed: %s -> %s", org.Name, form.Name) - } - // In case it's just a case change. - org.Name = form.Name - org.LowerName = strings.ToLower(form.Name) - - if ctx.User.IsAdmin { - org.MaxRepoCreation = form.MaxRepoCreation - } - - org.FullName = form.FullName - org.Description = form.Description - org.Website = form.Website - org.Location = form.Location - org.RepoAdminChangeTeamAccess = form.RepoAdminChangeTeamAccess - - visibilityChanged := form.Visibility != org.Visibility - org.Visibility = form.Visibility - - if err := models.UpdateUser(org); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - - // update forks visibility - if visibilityChanged { - if err := org.GetRepositories(models.ListOptions{Page: 1, PageSize: org.NumRepos}); err != nil { - ctx.ServerError("GetRepositories", err) - return - } - for _, repo := range org.Repos { - if err := models.UpdateRepository(repo, true); err != nil { - ctx.ServerError("UpdateRepository", err) - return - } - } - } - - log.Trace("Organization setting updated: %s", org.Name) - ctx.Flash.Success(ctx.Tr("org.settings.update_setting_success")) - ctx.Redirect(ctx.Org.OrgLink + "/settings") -} - -// SettingsAvatar response for change avatar on settings page -func SettingsAvatar(ctx *context.Context, form auth.AvatarForm) { - form.Source = auth.AvatarLocal - if err := userSetting.UpdateAvatarSetting(ctx, form, ctx.Org.Organization); err != nil { - ctx.Flash.Error(err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("org.settings.update_avatar_success")) - } - - ctx.Redirect(ctx.Org.OrgLink + "/settings") -} - -// SettingsDeleteAvatar response for delete avatar on setings page -func SettingsDeleteAvatar(ctx *context.Context) { - if err := ctx.Org.Organization.DeleteAvatar(); err != nil { - ctx.Flash.Error(err.Error()) - } - - ctx.Redirect(ctx.Org.OrgLink + "/settings") -} - -// SettingsDelete response for deleting an organization -func SettingsDelete(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("org.settings") - ctx.Data["PageIsSettingsDelete"] = true - - org := ctx.Org.Organization - if ctx.Req.Method == "POST" { - if _, err := models.UserSignIn(ctx.User.Name, ctx.Query("password")); err != nil { - if models.IsErrUserNotExist(err) { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_password"), tplSettingsDelete, nil) - } else { - ctx.ServerError("UserSignIn", err) - } - return - } - - if err := models.DeleteOrganization(org); err != nil { - if models.IsErrUserOwnRepos(err) { - ctx.Flash.Error(ctx.Tr("form.org_still_own_repo")) - ctx.Redirect(ctx.Org.OrgLink + "/settings/delete") - } else { - ctx.ServerError("DeleteOrganization", err) - } - } else { - log.Trace("Organization deleted: %s", org.Name) - ctx.Redirect(setting.AppSubURL + "/") - } - return - } - - ctx.HTML(200, tplSettingsDelete) -} - -// Webhooks render webhook list page -func Webhooks(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("org.settings") - ctx.Data["PageIsSettingsHooks"] = true - ctx.Data["BaseLink"] = ctx.Org.OrgLink + "/settings/hooks" - ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc") - - ws, err := models.GetWebhooksByOrgID(ctx.Org.Organization.ID, models.ListOptions{}) - if err != nil { - ctx.ServerError("GetWebhooksByOrgId", err) - return - } - - ctx.Data["Webhooks"] = ws - ctx.HTML(200, tplSettingsHooks) -} - -// DeleteWebhook response for delete webhook -func DeleteWebhook(ctx *context.Context) { - if err := models.DeleteWebhookByOrgID(ctx.Org.Organization.ID, ctx.QueryInt64("id")); err != nil { - ctx.Flash.Error("DeleteWebhookByOrgID: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success")) - } - - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Org.OrgLink + "/settings/hooks", - }) -} - -// Labels render organization labels page -func Labels(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.labels") - ctx.Data["PageIsOrgSettingsLabels"] = true - ctx.Data["RequireTribute"] = true - ctx.Data["LabelTemplates"] = models.LabelTemplates - ctx.HTML(200, tplSettingsLabels) -} diff --git a/routers/org/teams.go b/routers/org/teams.go deleted file mode 100644 index fa98add60..000000000 --- a/routers/org/teams.go +++ /dev/null @@ -1,354 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package org - -import ( - "net/http" - "path" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/routers/utils" -) - -const ( - // tplTeams template path for teams list page - tplTeams base.TplName = "org/team/teams" - // tplTeamNew template path for create new team page - tplTeamNew base.TplName = "org/team/new" - // tplTeamMembers template path for showing team members page - tplTeamMembers base.TplName = "org/team/members" - // tplTeamRepositories template path for showing team repositories page - tplTeamRepositories base.TplName = "org/team/repositories" -) - -// Teams render teams list page -func Teams(ctx *context.Context) { - org := ctx.Org.Organization - ctx.Data["Title"] = org.FullName - ctx.Data["PageIsOrgTeams"] = true - - for _, t := range org.Teams { - if err := t.GetMembers(&models.SearchMembersOptions{}); err != nil { - ctx.ServerError("GetMembers", err) - return - } - } - ctx.Data["Teams"] = org.Teams - - ctx.HTML(200, tplTeams) -} - -// TeamsAction response for join, leave, remove, add operations to team -func TeamsAction(ctx *context.Context) { - uid := ctx.QueryInt64("uid") - if uid == 0 { - ctx.Redirect(ctx.Org.OrgLink + "/teams") - return - } - - page := ctx.Query("page") - var err error - switch ctx.Params(":action") { - case "join": - if !ctx.Org.IsOwner { - ctx.Error(404) - return - } - err = ctx.Org.Team.AddMember(ctx.User.ID) - case "leave": - err = ctx.Org.Team.RemoveMember(ctx.User.ID) - case "remove": - if !ctx.Org.IsOwner { - ctx.Error(404) - return - } - err = ctx.Org.Team.RemoveMember(uid) - page = "team" - case "add": - if !ctx.Org.IsOwner { - ctx.Error(404) - return - } - uname := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.Query("uname"))) - var u *models.User - u, err = models.GetUserByName(uname) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Flash.Error(ctx.Tr("form.user_not_exist")) - ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName) - } else { - ctx.ServerError(" GetUserByName", err) - } - return - } - - if u.IsOrganization() { - ctx.Flash.Error(ctx.Tr("form.cannot_add_org_to_team")) - ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName) - return - } - - if ctx.Org.Team.IsMember(u.ID) { - ctx.Flash.Error(ctx.Tr("org.teams.add_duplicate_users")) - } else { - err = ctx.Org.Team.AddMember(u.ID) - } - - page = "team" - } - - if err != nil { - if models.IsErrLastOrgOwner(err) { - ctx.Flash.Error(ctx.Tr("form.last_org_owner")) - } else { - log.Error("Action(%s): %v", ctx.Params(":action"), err) - ctx.JSON(200, map[string]interface{}{ - "ok": false, - "err": err.Error(), - }) - return - } - } - - switch page { - case "team": - ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName) - case "home": - ctx.Redirect(ctx.Org.Organization.HomeLink()) - default: - ctx.Redirect(ctx.Org.OrgLink + "/teams") - } -} - -// TeamsRepoAction operate team's repository -func TeamsRepoAction(ctx *context.Context) { - if !ctx.Org.IsOwner { - ctx.Error(404) - return - } - - var err error - action := ctx.Params(":action") - switch action { - case "add": - repoName := path.Base(ctx.Query("repo_name")) - var repo *models.Repository - repo, err = models.GetRepositoryByName(ctx.Org.Organization.ID, repoName) - if err != nil { - if models.IsErrRepoNotExist(err) { - ctx.Flash.Error(ctx.Tr("org.teams.add_nonexistent_repo")) - ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories") - return - } - ctx.ServerError("GetRepositoryByName", err) - return - } - err = ctx.Org.Team.AddRepository(repo) - case "remove": - err = ctx.Org.Team.RemoveRepository(ctx.QueryInt64("repoid")) - case "addall": - err = ctx.Org.Team.AddAllRepositories() - case "removeall": - err = ctx.Org.Team.RemoveAllRepositories() - } - - if err != nil { - log.Error("Action(%s): '%s' %v", ctx.Params(":action"), ctx.Org.Team.Name, err) - ctx.ServerError("TeamsRepoAction", err) - return - } - - if action == "addall" || action == "removeall" { - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories", - }) - return - } - ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories") -} - -// NewTeam render create new team page -func NewTeam(ctx *context.Context) { - ctx.Data["Title"] = ctx.Org.Organization.FullName - ctx.Data["PageIsOrgTeams"] = true - ctx.Data["PageIsOrgTeamsNew"] = true - ctx.Data["Team"] = &models.Team{} - ctx.Data["Units"] = models.Units - ctx.HTML(200, tplTeamNew) -} - -// NewTeamPost response for create new team -func NewTeamPost(ctx *context.Context, form auth.CreateTeamForm) { - ctx.Data["Title"] = ctx.Org.Organization.FullName - ctx.Data["PageIsOrgTeams"] = true - ctx.Data["PageIsOrgTeamsNew"] = true - ctx.Data["Units"] = models.Units - var includesAllRepositories = (form.RepoAccess == "all") - - t := &models.Team{ - OrgID: ctx.Org.Organization.ID, - Name: form.TeamName, - Description: form.Description, - Authorize: models.ParseAccessMode(form.Permission), - IncludesAllRepositories: includesAllRepositories, - CanCreateOrgRepo: form.CanCreateOrgRepo, - } - - if t.Authorize < models.AccessModeOwner { - var units = make([]*models.TeamUnit, 0, len(form.Units)) - for _, tp := range form.Units { - units = append(units, &models.TeamUnit{ - OrgID: ctx.Org.Organization.ID, - Type: tp, - }) - } - t.Units = units - } - - ctx.Data["Team"] = t - - if ctx.HasError() { - ctx.HTML(200, tplTeamNew) - return - } - - if t.Authorize < models.AccessModeAdmin && len(form.Units) == 0 { - ctx.RenderWithErr(ctx.Tr("form.team_no_units_error"), tplTeamNew, &form) - return - } - - if err := models.NewTeam(t); err != nil { - ctx.Data["Err_TeamName"] = true - switch { - case models.IsErrTeamAlreadyExist(err): - ctx.RenderWithErr(ctx.Tr("form.team_name_been_taken"), tplTeamNew, &form) - default: - ctx.ServerError("NewTeam", err) - } - return - } - log.Trace("Team created: %s/%s", ctx.Org.Organization.Name, t.Name) - ctx.Redirect(ctx.Org.OrgLink + "/teams/" + t.LowerName) -} - -// TeamMembers render team members page -func TeamMembers(ctx *context.Context) { - ctx.Data["Title"] = ctx.Org.Team.Name - ctx.Data["PageIsOrgTeams"] = true - ctx.Data["PageIsOrgTeamMembers"] = true - if err := ctx.Org.Team.GetMembers(&models.SearchMembersOptions{}); err != nil { - ctx.ServerError("GetMembers", err) - return - } - ctx.HTML(200, tplTeamMembers) -} - -// TeamRepositories show the repositories of team -func TeamRepositories(ctx *context.Context) { - ctx.Data["Title"] = ctx.Org.Team.Name - ctx.Data["PageIsOrgTeams"] = true - ctx.Data["PageIsOrgTeamRepos"] = true - if err := ctx.Org.Team.GetRepositories(&models.SearchTeamOptions{}); err != nil { - ctx.ServerError("GetRepositories", err) - return - } - ctx.HTML(200, tplTeamRepositories) -} - -// EditTeam render team edit page -func EditTeam(ctx *context.Context) { - ctx.Data["Title"] = ctx.Org.Organization.FullName - ctx.Data["PageIsOrgTeams"] = true - ctx.Data["team_name"] = ctx.Org.Team.Name - ctx.Data["desc"] = ctx.Org.Team.Description - ctx.Data["Units"] = models.Units - ctx.HTML(200, tplTeamNew) -} - -// EditTeamPost response for modify team information -func EditTeamPost(ctx *context.Context, form auth.CreateTeamForm) { - t := ctx.Org.Team - ctx.Data["Title"] = ctx.Org.Organization.FullName - ctx.Data["PageIsOrgTeams"] = true - ctx.Data["Team"] = t - ctx.Data["Units"] = models.Units - - isAuthChanged := false - isIncludeAllChanged := false - var includesAllRepositories = (form.RepoAccess == "all") - if !t.IsOwnerTeam() { - // Validate permission level. - auth := models.ParseAccessMode(form.Permission) - - t.Name = form.TeamName - if t.Authorize != auth { - isAuthChanged = true - t.Authorize = auth - } - - if t.IncludesAllRepositories != includesAllRepositories { - isIncludeAllChanged = true - t.IncludesAllRepositories = includesAllRepositories - } - } - t.Description = form.Description - if t.Authorize < models.AccessModeOwner { - var units = make([]models.TeamUnit, 0, len(form.Units)) - for _, tp := range form.Units { - units = append(units, models.TeamUnit{ - OrgID: t.OrgID, - TeamID: t.ID, - Type: tp, - }) - } - err := models.UpdateTeamUnits(t, units) - if err != nil { - ctx.Error(http.StatusInternalServerError, "LoadIssue", err.Error()) - return - } - } - t.CanCreateOrgRepo = form.CanCreateOrgRepo - - if ctx.HasError() { - ctx.HTML(200, tplTeamNew) - return - } - - if t.Authorize < models.AccessModeAdmin && len(form.Units) == 0 { - ctx.RenderWithErr(ctx.Tr("form.team_no_units_error"), tplTeamNew, &form) - return - } - - if err := models.UpdateTeam(t, isAuthChanged, isIncludeAllChanged); err != nil { - ctx.Data["Err_TeamName"] = true - switch { - case models.IsErrTeamAlreadyExist(err): - ctx.RenderWithErr(ctx.Tr("form.team_name_been_taken"), tplTeamNew, &form) - default: - ctx.ServerError("UpdateTeam", err) - } - return - } - ctx.Redirect(ctx.Org.OrgLink + "/teams/" + t.LowerName) -} - -// DeleteTeam response for the delete team request -func DeleteTeam(ctx *context.Context) { - if err := models.DeleteTeam(ctx.Org.Team); err != nil { - ctx.Flash.Error("DeleteTeam: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("org.teams.delete_team_success")) - } - - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Org.OrgLink + "/teams", - }) -} diff --git a/routers/private/hook.go b/routers/private/hook.go index 34e849f6f..40edcd9c5 100644 --- a/routers/private/hook.go +++ b/routers/private/hook.go @@ -15,16 +15,17 @@ import ( "strings" "code.gitea.io/gitea/models" + gitea_context "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/private" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/agit" pull_service "code.gitea.io/gitea/services/pull" repo_service "code.gitea.io/gitea/services/repository" - - "gitea.com/macaron/macaron" ) func verifyCommits(oldCommitID, newCommitID string, repo *git.Repository, env []string) error { @@ -117,14 +118,15 @@ func isErrUnverifiedCommit(err error) bool { } // HookPreReceive checks whether a individual commit is acceptable -func HookPreReceive(ctx *macaron.Context, opts private.HookOptions) { +func HookPreReceive(ctx *gitea_context.PrivateContext) { + opts := web.GetForm(ctx).(*private.HookOptions) ownerName := ctx.Params(":owner") repoName := ctx.Params(":repo") repo, err := models.GetRepositoryByOwnerAndName(ownerName, repoName) if err != nil { log.Error("Unable to get repository: %s/%s Error: %v", ownerName, repoName, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } @@ -132,8 +134,8 @@ func HookPreReceive(ctx *macaron.Context, opts private.HookOptions) { gitRepo, err := git.OpenRepository(repo.RepoPath()) if err != nil { log.Error("Unable to get git repository for: %s/%s Error: %v", ownerName, repoName, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } @@ -154,215 +156,322 @@ func HookPreReceive(ctx *macaron.Context, opts private.HookOptions) { private.GitQuarantinePath+"="+opts.GitQuarantinePath) } + if git.SupportProcReceive { + pusher, err := models.GetUserByID(opts.UserID) + if err != nil { + log.Error("models.GetUserByID:%v", err) + ctx.Error(http.StatusInternalServerError, "") + return + } + + perm, err := models.GetUserRepoPermission(repo, pusher) + if err != nil { + log.Error("models.GetUserRepoPermission:%v", err) + ctx.Error(http.StatusInternalServerError, "") + return + } + + canCreatePullRequest := perm.CanRead(models.UnitTypePullRequests) + + for _, refFullName := range opts.RefFullNames { + // if user want update other refs (branch or tag), + // should check code write permission because + // this check was delayed. + if !strings.HasPrefix(refFullName, git.PullRequestPrefix) { + if !perm.CanWrite(models.UnitTypeCode) { + ctx.JSON(http.StatusForbidden, map[string]interface{}{ + "err": "User permission denied.", + }) + return + } + + break + } else if repo.IsEmpty { + ctx.JSON(http.StatusForbidden, map[string]interface{}{ + "err": "Can't create pull request for an empty repository.", + }) + return + } else if !canCreatePullRequest { + ctx.JSON(http.StatusForbidden, map[string]interface{}{ + "err": "User permission denied.", + }) + return + } else if opts.IsWiki { + // TODO: maybe can do it ... + ctx.JSON(http.StatusForbidden, map[string]interface{}{ + "err": "not support send pull request to wiki.", + }) + return + } + } + } + + protectedTags, err := repo.GetProtectedTags() + if err != nil { + log.Error("Unable to get protected tags for %-v Error: %v", repo, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), + }) + return + } + // Iterate across the provided old commit IDs for i := range opts.OldCommitIDs { oldCommitID := opts.OldCommitIDs[i] newCommitID := opts.NewCommitIDs[i] refFullName := opts.RefFullNames[i] - branchName := strings.TrimPrefix(refFullName, git.BranchPrefix) - if branchName == repo.DefaultBranch && newCommitID == git.EmptySHA { - log.Warn("Forbidden: Branch: %s is the default branch in %-v and cannot be deleted", branchName, repo) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("branch %s is the default branch and cannot be deleted", branchName), - }) - return - } + if strings.HasPrefix(refFullName, git.BranchPrefix) { + branchName := strings.TrimPrefix(refFullName, git.BranchPrefix) + if branchName == repo.DefaultBranch && newCommitID == git.EmptySHA { + log.Warn("Forbidden: Branch: %s is the default branch in %-v and cannot be deleted", branchName, repo) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("branch %s is the default branch and cannot be deleted", branchName), + }) + return + } - protectBranch, err := models.GetProtectedBranchBy(repo.ID, branchName) - if err != nil { - log.Error("Unable to get protected branch: %s in %-v Error: %v", branchName, repo, err) - ctx.JSON(500, map[string]interface{}{ - "err": err.Error(), - }) - return - } - - // Allow pushes to non-protected branches - if protectBranch == nil || !protectBranch.IsProtected() { - continue - } - - // This ref is a protected branch. - // - // First of all we need to enforce absolutely: - // - // 1. Detect and prevent deletion of the branch - if newCommitID == git.EmptySHA { - log.Warn("Forbidden: Branch: %s in %-v is protected from deletion", branchName, repo) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("branch %s is protected from deletion", branchName), - }) - return - } - - // 2. Disallow force pushes to protected branches - if git.EmptySHA != oldCommitID { - output, err := git.NewCommand("rev-list", "--max-count=1", oldCommitID, "^"+newCommitID).RunInDirWithEnv(repo.RepoPath(), env) + protectBranch, err := models.GetProtectedBranchBy(repo.ID, branchName) if err != nil { - log.Error("Unable to detect force push between: %s and %s in %-v Error: %v", oldCommitID, newCommitID, repo, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Fail to detect force push: %v", err), - }) - return - } else if len(output) > 0 { - log.Warn("Forbidden: Branch: %s in %-v is protected from force push", branchName, repo) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("branch %s is protected from force push", branchName), - }) - return - - } - } - - // 3. Enforce require signed commits - if protectBranch.RequireSignedCommits { - err := verifyCommits(oldCommitID, newCommitID, gitRepo, env) - if err != nil { - if !isErrUnverifiedCommit(err) { - log.Error("Unable to check commits from %s to %s in %-v: %v", oldCommitID, newCommitID, repo, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Unable to check commits from %s to %s: %v", oldCommitID, newCommitID, err), - }) - return - } - unverifiedCommit := err.(*errUnverifiedCommit).sha - log.Warn("Forbidden: Branch: %s in %-v is protected from unverified commit %s", branchName, repo, unverifiedCommit) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("branch %s is protected from unverified commit %s", branchName, unverifiedCommit), - }) - return - } - } - - // Now there are several tests which can be overridden: - // - // 4. Check protected file patterns - this is overridable from the UI - changedProtectedfiles := false - protectedFilePath := "" - - globs := protectBranch.GetProtectedFilePatterns() - if len(globs) > 0 { - _, err := pull_service.CheckFileProtection(oldCommitID, newCommitID, globs, 1, env, gitRepo) - if err != nil { - if !models.IsErrFilePathProtected(err) { - log.Error("Unable to check file protection for commits from %s to %s in %-v: %v", oldCommitID, newCommitID, repo, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Unable to check file protection for commits from %s to %s: %v", oldCommitID, newCommitID, err), - }) - return - } - - changedProtectedfiles = true - protectedFilePath = err.(models.ErrFilePathProtected).Path - } - } - - // 5. Check if the doer is allowed to push - canPush := false - if opts.IsDeployKey { - canPush = !changedProtectedfiles && protectBranch.CanPush && (!protectBranch.EnableWhitelist || protectBranch.WhitelistDeployKeys) - } else { - canPush = !changedProtectedfiles && protectBranch.CanUserPush(opts.UserID) - } - - // 6. If we're not allowed to push directly - if !canPush { - // Is this is a merge from the UI/API? - if opts.ProtectedBranchID == 0 { - // 6a. If we're not merging from the UI/API then there are two ways we got here: - // - // We are changing a protected file and we're not allowed to do that - if changedProtectedfiles { - log.Warn("Forbidden: Branch: %s in %-v is protected from changing file %s", branchName, repo, protectedFilePath) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("branch %s is protected from changing file %s", branchName, protectedFilePath), - }) - return - } - - // Or we're simply not able to push to this protected branch - log.Warn("Forbidden: User %d is not allowed to push to protected branch: %s in %-v", opts.UserID, branchName, repo) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("Not allowed to push to protected branch %s", branchName), - }) - return - } - // 6b. Merge (from UI or API) - - // Get the PR, user and permissions for the user in the repository - pr, err := models.GetPullRequestByID(opts.ProtectedBranchID) - if err != nil { - log.Error("Unable to get PullRequest %d Error: %v", opts.ProtectedBranchID, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Unable to get PullRequest %d Error: %v", opts.ProtectedBranchID, err), - }) - return - } - user, err := models.GetUserByID(opts.UserID) - if err != nil { - log.Error("Unable to get User id %d Error: %v", opts.UserID, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Unable to get User id %d Error: %v", opts.UserID, err), - }) - return - } - perm, err := models.GetUserRepoPermission(repo, user) - if err != nil { - log.Error("Unable to get Repo permission of repo %s/%s of User %s", repo.OwnerName, repo.Name, user.Name, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Unable to get Repo permission of repo %s/%s of User %s: %v", repo.OwnerName, repo.Name, user.Name, err), + log.Error("Unable to get protected branch: %s in %-v Error: %v", branchName, repo, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } - // Now check if the user is allowed to merge PRs for this repository - allowedMerge, err := pull_service.IsUserAllowedToMerge(pr, perm, user) - if err != nil { - log.Error("Error calculating if allowed to merge: %v", err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Error calculating if allowed to merge: %v", err), - }) - return - } - - if !allowedMerge { - log.Warn("Forbidden: User %d is not allowed to push to protected branch: %s in %-v and is not allowed to merge pr #%d", opts.UserID, branchName, repo, pr.Index) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("Not allowed to push to protected branch %s", branchName), - }) - return - } - - // If we're an admin for the repository we can ignore status checks, reviews and override protected files - if perm.IsAdmin() { + // Allow pushes to non-protected branches + if protectBranch == nil || !protectBranch.IsProtected() { continue } - // Now if we're not an admin - we can't overwrite protected files so fail now - if changedProtectedfiles { - log.Warn("Forbidden: Branch: %s in %-v is protected from changing file %s", branchName, repo, protectedFilePath) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("branch %s is protected from changing file %s", branchName, protectedFilePath), + // This ref is a protected branch. + // + // First of all we need to enforce absolutely: + // + // 1. Detect and prevent deletion of the branch + if newCommitID == git.EmptySHA { + log.Warn("Forbidden: Branch: %s in %-v is protected from deletion", branchName, repo) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("branch %s is protected from deletion", branchName), }) return } - // Check all status checks and reviews are ok - if err := pull_service.CheckPRReadyToMerge(pr, true); err != nil { - if models.IsErrNotAllowedToMerge(err) { - log.Warn("Forbidden: User %d is not allowed push to protected branch %s in %-v and pr #%d is not ready to be merged: %s", opts.UserID, branchName, repo, pr.Index, err.Error()) - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": fmt.Sprintf("Not allowed to push to protected branch %s and pr #%d is not ready to be merged: %s", branchName, opts.ProtectedBranchID, err.Error()), + // 2. Disallow force pushes to protected branches + if git.EmptySHA != oldCommitID { + output, err := git.NewCommand("rev-list", "--max-count=1", oldCommitID, "^"+newCommitID).RunInDirWithEnv(repo.RepoPath(), env) + if err != nil { + log.Error("Unable to detect force push between: %s and %s in %-v Error: %v", oldCommitID, newCommitID, repo, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Fail to detect force push: %v", err), + }) + return + } else if len(output) > 0 { + log.Warn("Forbidden: Branch: %s in %-v is protected from force push", branchName, repo) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("branch %s is protected from force push", branchName), + }) + return + + } + } + + // 3. Enforce require signed commits + if protectBranch.RequireSignedCommits { + err := verifyCommits(oldCommitID, newCommitID, gitRepo, env) + if err != nil { + if !isErrUnverifiedCommit(err) { + log.Error("Unable to check commits from %s to %s in %-v: %v", oldCommitID, newCommitID, repo, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to check commits from %s to %s: %v", oldCommitID, newCommitID, err), + }) + return + } + unverifiedCommit := err.(*errUnverifiedCommit).sha + log.Warn("Forbidden: Branch: %s in %-v is protected from unverified commit %s", branchName, repo, unverifiedCommit) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("branch %s is protected from unverified commit %s", branchName, unverifiedCommit), }) return } - log.Error("Unable to check if mergable: protected branch %s in %-v and pr #%d. Error: %v", opts.UserID, branchName, repo, pr.Index, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Unable to get status of pull request %d. Error: %v", opts.ProtectedBranchID, err), + } + + // Now there are several tests which can be overridden: + // + // 4. Check protected file patterns - this is overridable from the UI + changedProtectedfiles := false + protectedFilePath := "" + + globs := protectBranch.GetProtectedFilePatterns() + if len(globs) > 0 { + _, err := pull_service.CheckFileProtection(oldCommitID, newCommitID, globs, 1, env, gitRepo) + if err != nil { + if !models.IsErrFilePathProtected(err) { + log.Error("Unable to check file protection for commits from %s to %s in %-v: %v", oldCommitID, newCommitID, repo, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to check file protection for commits from %s to %s: %v", oldCommitID, newCommitID, err), + }) + return + } + + changedProtectedfiles = true + protectedFilePath = err.(models.ErrFilePathProtected).Path + } + } + + // 5. Check if the doer is allowed to push + canPush := false + if opts.IsDeployKey { + canPush = !changedProtectedfiles && protectBranch.CanPush && (!protectBranch.EnableWhitelist || protectBranch.WhitelistDeployKeys) + } else { + canPush = !changedProtectedfiles && protectBranch.CanUserPush(opts.UserID) + } + + // 6. If we're not allowed to push directly + if !canPush { + // Is this is a merge from the UI/API? + if opts.PullRequestID == 0 { + // 6a. If we're not merging from the UI/API then there are two ways we got here: + // + // We are changing a protected file and we're not allowed to do that + if changedProtectedfiles { + log.Warn("Forbidden: Branch: %s in %-v is protected from changing file %s", branchName, repo, protectedFilePath) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("branch %s is protected from changing file %s", branchName, protectedFilePath), + }) + return + } + + // Or we're simply not able to push to this protected branch + log.Warn("Forbidden: User %d is not allowed to push to protected branch: %s in %-v", opts.UserID, branchName, repo) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("Not allowed to push to protected branch %s", branchName), + }) + return + } + // 6b. Merge (from UI or API) + + // Get the PR, user and permissions for the user in the repository + pr, err := models.GetPullRequestByID(opts.PullRequestID) + if err != nil { + log.Error("Unable to get PullRequest %d Error: %v", opts.PullRequestID, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to get PullRequest %d Error: %v", opts.PullRequestID, err), + }) + return + } + user, err := models.GetUserByID(opts.UserID) + if err != nil { + log.Error("Unable to get User id %d Error: %v", opts.UserID, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to get User id %d Error: %v", opts.UserID, err), + }) + return + } + perm, err := models.GetUserRepoPermission(repo, user) + if err != nil { + log.Error("Unable to get Repo permission of repo %s/%s of User %s", repo.OwnerName, repo.Name, user.Name, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to get Repo permission of repo %s/%s of User %s: %v", repo.OwnerName, repo.Name, user.Name, err), + }) + return + } + + // Now check if the user is allowed to merge PRs for this repository + allowedMerge, err := pull_service.IsUserAllowedToMerge(pr, perm, user) + if err != nil { + log.Error("Error calculating if allowed to merge: %v", err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Error calculating if allowed to merge: %v", err), + }) + return + } + + if !allowedMerge { + log.Warn("Forbidden: User %d is not allowed to push to protected branch: %s in %-v and is not allowed to merge pr #%d", opts.UserID, branchName, repo, pr.Index) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("Not allowed to push to protected branch %s", branchName), + }) + return + } + + // If we're an admin for the repository we can ignore status checks, reviews and override protected files + if perm.IsAdmin() { + continue + } + + // Now if we're not an admin - we can't overwrite protected files so fail now + if changedProtectedfiles { + log.Warn("Forbidden: Branch: %s in %-v is protected from changing file %s", branchName, repo, protectedFilePath) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("branch %s is protected from changing file %s", branchName, protectedFilePath), + }) + return + } + + // Check all status checks and reviews are ok + if err := pull_service.CheckPRReadyToMerge(pr, true); err != nil { + if models.IsErrNotAllowedToMerge(err) { + log.Warn("Forbidden: User %d is not allowed push to protected branch %s in %-v and pr #%d is not ready to be merged: %s", opts.UserID, branchName, repo, pr.Index, err.Error()) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("Not allowed to push to protected branch %s and pr #%d is not ready to be merged: %s", branchName, opts.PullRequestID, err.Error()), + }) + return + } + log.Error("Unable to check if mergable: protected branch %s in %-v and pr #%d. Error: %v", opts.UserID, branchName, repo, pr.Index, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to get status of pull request %d. Error: %v", opts.PullRequestID, err), + }) + return + } + } + } else if strings.HasPrefix(refFullName, git.TagPrefix) { + tagName := strings.TrimPrefix(refFullName, git.TagPrefix) + + isAllowed, err := models.IsUserAllowedToControlTag(protectedTags, tagName, opts.UserID) + if err != nil { + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } + if !isAllowed { + log.Warn("Forbidden: Tag %s in %-v is protected", tagName, repo) + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("Tag %s is protected", tagName), + }) + return + } + } else if git.SupportProcReceive && strings.HasPrefix(refFullName, git.PullRequestPrefix) { + baseBranchName := opts.RefFullNames[i][len(git.PullRequestPrefix):] + + baseBranchExist := false + if gitRepo.IsBranchExist(baseBranchName) { + baseBranchExist = true + } + + if !baseBranchExist { + for p, v := range baseBranchName { + if v == '/' && gitRepo.IsBranchExist(baseBranchName[:p]) && p != len(baseBranchName)-1 { + baseBranchExist = true + break + } + } + } + + if !baseBranchExist { + ctx.JSON(http.StatusForbidden, private.Response{ + Err: fmt.Sprintf("Unexpected ref: %s", refFullName), + }) + return + } + } else { + log.Error("Unexpected ref: %s", refFullName) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unexpected ref: %s", refFullName), + }) + return } } @@ -370,7 +479,8 @@ func HookPreReceive(ctx *macaron.Context, opts private.HookOptions) { } // HookPostReceive updates services and users -func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) { +func HookPostReceive(ctx *gitea_context.PrivateContext) { + opts := web.GetForm(ctx).(*private.HookOptions) ownerName := ctx.Params(":owner") repoName := ctx.Params(":repo") @@ -502,7 +612,7 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) { continue } - pr, err := models.GetUnmergedPullRequest(repo.ID, baseRepo.ID, branch, baseRepo.DefaultBranch) + pr, err := models.GetUnmergedPullRequest(repo.ID, baseRepo.ID, branch, baseRepo.DefaultBranch, models.PullRequestFlowGithub) if err != nil && !models.IsErrPullRequestNotExist(err) { log.Error("Failed to get active PR in: %-v Branch: %s to: %-v Branch: %s Error: %v", repo, branch, baseRepo, baseRepo.DefaultBranch, err) ctx.JSON(http.StatusInternalServerError, private.HookPostReceiveResult{ @@ -539,16 +649,40 @@ func HookPostReceive(ctx *macaron.Context, opts private.HookOptions) { }) } +// HookProcReceive proc-receive hook +func HookProcReceive(ctx *gitea_context.PrivateContext) { + opts := web.GetForm(ctx).(*private.HookOptions) + if !git.SupportProcReceive { + ctx.Status(http.StatusNotFound) + return + } + + cancel := loadRepositoryAndGitRepoByParams(ctx) + if ctx.Written() { + return + } + defer cancel() + + results := agit.ProcRecive(ctx, opts) + if ctx.Written() { + return + } + + ctx.JSON(http.StatusOK, private.HookProcReceiveResult{ + Results: results, + }) +} + // SetDefaultBranch updates the default branch -func SetDefaultBranch(ctx *macaron.Context) { +func SetDefaultBranch(ctx *gitea_context.PrivateContext) { ownerName := ctx.Params(":owner") repoName := ctx.Params(":repo") branch := ctx.Params(":branch") repo, err := models.GetRepositoryByOwnerAndName(ownerName, repoName) if err != nil { log.Error("Failed to get repository: %s/%s Error: %v", ownerName, repoName, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "Err": fmt.Sprintf("Failed to get repository: %s/%s Error: %v", ownerName, repoName, err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Failed to get repository: %s/%s Error: %v", ownerName, repoName, err), }) return } @@ -559,16 +693,16 @@ func SetDefaultBranch(ctx *macaron.Context) { repo.DefaultBranch = branch gitRepo, err := git.OpenRepository(repo.RepoPath()) if err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "Err": fmt.Sprintf("Failed to get git repository: %s/%s Error: %v", ownerName, repoName, err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Failed to get git repository: %s/%s Error: %v", ownerName, repoName, err), }) return } if err := gitRepo.SetDefaultBranch(repo.DefaultBranch); err != nil { if !git.IsErrUnsupportedVersion(err) { gitRepo.Close() - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "Err": fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), }) return } @@ -576,10 +710,51 @@ func SetDefaultBranch(ctx *macaron.Context) { gitRepo.Close() if err := repo.UpdateDefaultBranch(); err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "Err": fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Unable to set default branch on repository: %s/%s Error: %v", ownerName, repoName, err), }) return } - ctx.PlainText(200, []byte("success")) + ctx.PlainText(http.StatusOK, []byte("success")) +} + +func loadRepositoryAndGitRepoByParams(ctx *gitea_context.PrivateContext) context.CancelFunc { + ownerName := ctx.Params(":owner") + repoName := ctx.Params(":repo") + + repo, err := models.GetRepositoryByOwnerAndName(ownerName, repoName) + if err != nil { + log.Error("Failed to get repository: %s/%s Error: %v", ownerName, repoName, err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to get repository: %s/%s Error: %v", ownerName, repoName, err), + }) + return nil + } + if repo.OwnerName == "" { + repo.OwnerName = ownerName + } + + gitRepo, err := git.OpenRepository(repo.RepoPath()) + if err != nil { + log.Error("Failed to open repository: %s/%s Error: %v", ownerName, repoName, err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to open repository: %s/%s Error: %v", ownerName, repoName, err), + }) + return nil + } + + ctx.Repo = &gitea_context.Repository{ + Repository: repo, + GitRepo: gitRepo, + } + + // We opened it, we should close it + cancel := func() { + // If it's been set to nil then assume someone else has closed it. + if ctx.Repo.GitRepo != nil { + ctx.Repo.GitRepo.Close() + } + } + + return cancel } diff --git a/routers/private/internal.go b/routers/private/internal.go index 4fb267a49..155e8c036 100644 --- a/routers/private/internal.go +++ b/routers/private/internal.go @@ -6,47 +6,72 @@ package private import ( + "net/http" + "reflect" "strings" + "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" + "gitea.com/go-chi/binding" ) // CheckInternalToken check internal token is set -func CheckInternalToken(ctx *macaron.Context) { - tokens := ctx.Req.Header.Get("Authorization") - fields := strings.Fields(tokens) - if len(fields) != 2 || fields[0] != "Bearer" || fields[1] != setting.InternalToken { - log.Debug("Forbidden attempt to access internal url: Authorization header: %s", tokens) - ctx.Error(403) +func CheckInternalToken(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + tokens := req.Header.Get("Authorization") + fields := strings.SplitN(tokens, " ", 2) + if len(fields) != 2 || fields[0] != "Bearer" || fields[1] != setting.InternalToken { + log.Debug("Forbidden attempt to access internal url: Authorization header: %s", tokens) + http.Error(w, http.StatusText(http.StatusForbidden), http.StatusForbidden) + } else { + next.ServeHTTP(w, req) + } + }) +} + +// bind binding an obj to a handler +func bind(obj interface{}) http.HandlerFunc { + var tp = reflect.TypeOf(obj) + for tp.Kind() == reflect.Ptr { + tp = tp.Elem() } + return web.Wrap(func(ctx *context.PrivateContext) { + var theObj = reflect.New(tp).Interface() // create a new form obj for every request but not use obj directly + binding.Bind(ctx.Req, theObj) + web.SetForm(ctx, theObj) + }) } -// RegisterRoutes registers all internal APIs routes to web application. +// Routes registers all internal APIs routes to web application. // These APIs will be invoked by internal commands for example `gitea serv` and etc. -func RegisterRoutes(m *macaron.Macaron) { - bind := binding.Bind +func Routes() *web.Route { + var r = web.NewRoute() + r.Use(context.PrivateContexter()) + r.Use(CheckInternalToken) - m.Group("/", func() { - m.Post("/ssh/authorized_keys", AuthorizedPublicKeyByContent) - m.Post("/ssh/:id/update/:repoid", UpdatePublicKeyInRepo) - m.Post("/hook/pre-receive/:owner/:repo", bind(private.HookOptions{}), HookPreReceive) - m.Post("/hook/post-receive/:owner/:repo", bind(private.HookOptions{}), HookPostReceive) - m.Post("/hook/set-default-branch/:owner/:repo/:branch", SetDefaultBranch) - m.Get("/serv/none/:keyid", ServNoCommand) - m.Get("/serv/command/:keyid/:owner/:repo", ServCommand) - m.Post("/manager/shutdown", Shutdown) - m.Post("/manager/restart", Restart) - m.Post("/manager/flush-queues", bind(private.FlushOptions{}), FlushQueues) - m.Post("/manager/pause-logging", PauseLogging) - m.Post("/manager/resume-logging", ResumeLogging) - m.Post("/manager/release-and-reopen-logging", ReleaseReopenLogging) - m.Post("/manager/add-logger", bind(private.LoggerOptions{}), AddLogger) - m.Post("/manager/remove-logger/:group/:name", RemoveLogger) - m.Post("/mail/send", SendEmail) - }, CheckInternalToken) + r.Post("/ssh/authorized_keys", AuthorizedPublicKeyByContent) + r.Post("/ssh/{id}/update/{repoid}", UpdatePublicKeyInRepo) + r.Post("/ssh/log", bind(private.SSHLogOption{}), SSHLog) + r.Post("/hook/pre-receive/{owner}/{repo}", bind(private.HookOptions{}), HookPreReceive) + r.Post("/hook/post-receive/{owner}/{repo}", bind(private.HookOptions{}), HookPostReceive) + r.Post("/hook/proc-receive/{owner}/{repo}", bind(private.HookOptions{}), HookProcReceive) + r.Post("/hook/set-default-branch/{owner}/{repo}/{branch}", SetDefaultBranch) + r.Get("/serv/none/{keyid}", ServNoCommand) + r.Get("/serv/command/{keyid}/{owner}/{repo}", ServCommand) + r.Post("/manager/shutdown", Shutdown) + r.Post("/manager/restart", Restart) + r.Post("/manager/flush-queues", bind(private.FlushOptions{}), FlushQueues) + r.Post("/manager/pause-logging", PauseLogging) + r.Post("/manager/resume-logging", ResumeLogging) + r.Post("/manager/release-and-reopen-logging", ReleaseReopenLogging) + r.Post("/manager/add-logger", bind(private.LoggerOptions{}), AddLogger) + r.Post("/manager/remove-logger/{group}/{name}", RemoveLogger) + r.Post("/mail/send", SendEmail) + r.Post("/restore_repo", RestoreRepo) + + return r } diff --git a/routers/private/key.go b/routers/private/key.go index c00330fe8..4f518e41f 100644 --- a/routers/private/key.go +++ b/routers/private/key.go @@ -9,18 +9,18 @@ import ( "net/http" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/timeutil" - - "gitea.com/macaron/macaron" ) // UpdatePublicKeyInRepo update public key and deploy key updates -func UpdatePublicKeyInRepo(ctx *macaron.Context) { +func UpdatePublicKeyInRepo(ctx *context.PrivateContext) { keyID := ctx.ParamsInt64(":id") repoID := ctx.ParamsInt64(":repoid") if err := models.UpdatePublicKeyUpdated(keyID); err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } @@ -28,18 +28,18 @@ func UpdatePublicKeyInRepo(ctx *macaron.Context) { deployKey, err := models.GetDeployKeyByRepo(keyID, repoID) if err != nil { if models.IsErrDeployKeyNotExist(err) { - ctx.PlainText(200, []byte("success")) + ctx.PlainText(http.StatusOK, []byte("success")) return } - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } deployKey.UpdatedUnix = timeutil.TimeStampNow() if err = models.UpdateDeployKeyCols(deployKey, "updated_unix"); err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } @@ -49,13 +49,13 @@ func UpdatePublicKeyInRepo(ctx *macaron.Context) { // AuthorizedPublicKeyByContent searches content as prefix (leak e-mail part) // and returns public key found. -func AuthorizedPublicKeyByContent(ctx *macaron.Context) { - content := ctx.Query("content") +func AuthorizedPublicKeyByContent(ctx *context.PrivateContext) { + content := ctx.FormString("content") publicKey, err := models.SearchPublicKeyByContent(content) if err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } diff --git a/routers/private/mail.go b/routers/private/mail.go index b3b21d042..6b9100159 100644 --- a/routers/private/mail.go +++ b/routers/private/mail.go @@ -5,37 +5,38 @@ package private import ( - "encoding/json" "fmt" "net/http" "strconv" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/services/mailer" - "gitea.com/macaron/macaron" ) // SendEmail pushes messages to mail queue // // It doesn't wait before each message will be processed -func SendEmail(ctx *macaron.Context) { +func SendEmail(ctx *context.PrivateContext) { if setting.MailService == nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": "Mail service is not enabled.", + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: "Mail service is not enabled.", }) return } var mail private.Email - rd := ctx.Req.Body().ReadCloser() + rd := ctx.Req.Body defer rd.Close() + if err := json.NewDecoder(rd).Decode(&mail); err != nil { log.Error("%v", err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err, + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } @@ -47,8 +48,8 @@ func SendEmail(ctx *macaron.Context) { if err != nil { err := fmt.Sprintf("Failed to get user information: %v", err) log.Error(err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err, + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err, }) return } @@ -67,8 +68,8 @@ func SendEmail(ctx *macaron.Context) { if err != nil { err := fmt.Sprintf("Failed to find users: %v", err) log.Error(err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err, + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err, }) return } @@ -77,7 +78,7 @@ func SendEmail(ctx *macaron.Context) { sendEmail(ctx, mail.Subject, mail.Message, emails) } -func sendEmail(ctx *macaron.Context, subject, message string, to []string) { +func sendEmail(ctx *context.PrivateContext, subject, message string, to []string) { for _, email := range to { msg := mailer.NewMessage([]string{email}, subject, message) mailer.SendAsync(msg) diff --git a/routers/private/manager.go b/routers/private/manager.go index 67bd92003..2b4cfb8ef 100644 --- a/routers/private/manager.go +++ b/routers/private/manager.go @@ -5,21 +5,22 @@ package private import ( - "encoding/json" "fmt" "net/http" + "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/queue" "code.gitea.io/gitea/modules/setting" - - "gitea.com/macaron/macaron" + "code.gitea.io/gitea/modules/web" ) // FlushQueues flushes all the Queues -func FlushQueues(ctx *macaron.Context, opts private.FlushOptions) { +func FlushQueues(ctx *context.PrivateContext) { + opts := web.GetForm(ctx).(*private.FlushOptions) if opts.NonBlocking { // Save the hammer ctx here - as a new one is created each time you call this. baseCtx := graceful.GetManager().HammerContext() @@ -29,37 +30,37 @@ func FlushQueues(ctx *macaron.Context, opts private.FlushOptions) { log.Error("Flushing request timed-out with error: %v", err) } }() - ctx.JSON(http.StatusAccepted, map[string]interface{}{ - "err": "Flushing", + ctx.JSON(http.StatusAccepted, private.Response{ + Err: "Flushing", }) return } - err := queue.GetManager().FlushAll(ctx.Req.Request.Context(), opts.Timeout) + err := queue.GetManager().FlushAll(ctx, opts.Timeout) if err != nil { - ctx.JSON(http.StatusRequestTimeout, map[string]interface{}{ - "err": fmt.Sprintf("%v", err), + ctx.JSON(http.StatusRequestTimeout, private.Response{ + Err: fmt.Sprintf("%v", err), }) } ctx.PlainText(http.StatusOK, []byte("success")) } // PauseLogging pauses logging -func PauseLogging(ctx *macaron.Context) { +func PauseLogging(ctx *context.PrivateContext) { log.Pause() ctx.PlainText(http.StatusOK, []byte("success")) } // ResumeLogging resumes logging -func ResumeLogging(ctx *macaron.Context) { +func ResumeLogging(ctx *context.PrivateContext) { log.Resume() ctx.PlainText(http.StatusOK, []byte("success")) } // ReleaseReopenLogging releases and reopens logging files -func ReleaseReopenLogging(ctx *macaron.Context) { +func ReleaseReopenLogging(ctx *context.PrivateContext) { if err := log.ReleaseReopen(); err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Error during release and reopen: %v", err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Error during release and reopen: %v", err), }) return } @@ -67,13 +68,13 @@ func ReleaseReopenLogging(ctx *macaron.Context) { } // RemoveLogger removes a logger -func RemoveLogger(ctx *macaron.Context) { +func RemoveLogger(ctx *context.PrivateContext) { group := ctx.Params("group") name := ctx.Params("name") ok, err := log.GetLogger(group).DelLogger(name) if err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Failed to remove logger: %s %s %v", group, name, err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Failed to remove logger: %s %s %v", group, name, err), }) return } @@ -84,7 +85,8 @@ func RemoveLogger(ctx *macaron.Context) { } // AddLogger adds a logger -func AddLogger(ctx *macaron.Context, opts private.LoggerOptions) { +func AddLogger(ctx *context.PrivateContext) { + opts := web.GetForm(ctx).(*private.LoggerOptions) if len(opts.Group) == 0 { opts.Group = log.DEFAULT } @@ -131,8 +133,8 @@ func AddLogger(ctx *macaron.Context, opts private.LoggerOptions) { byteConfig, err := json.Marshal(opts.Config) if err != nil { log.Error("Failed to marshal log configuration: %v %v", opts.Config, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Failed to marshal log configuration: %v %v", opts.Config, err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Failed to marshal log configuration: %v %v", opts.Config, err), }) return } @@ -140,8 +142,8 @@ func AddLogger(ctx *macaron.Context, opts private.LoggerOptions) { if err := log.NewNamedLogger(opts.Group, bufferLen, opts.Name, opts.Mode, config); err != nil { log.Error("Failed to create new named logger: %s %v", config, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": fmt.Sprintf("Failed to create new named logger: %s %v", config, err), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Failed to create new named logger: %s %v", config, err), }) return } diff --git a/routers/private/manager_unix.go b/routers/private/manager_unix.go index ec5e97605..1738c06a0 100644 --- a/routers/private/manager_unix.go +++ b/routers/private/manager_unix.go @@ -1,28 +1,28 @@ -// +build !windows - // Copyright 2020 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build !windows +// +build !windows + package private import ( "net/http" + "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/graceful" - - "gitea.com/macaron/macaron" ) // Restart causes the server to perform a graceful restart -func Restart(ctx *macaron.Context) { +func Restart(ctx *context.PrivateContext) { graceful.GetManager().DoGracefulRestart() ctx.PlainText(http.StatusOK, []byte("success")) } // Shutdown causes the server to perform a graceful shutdown -func Shutdown(ctx *macaron.Context) { +func Shutdown(ctx *context.PrivateContext) { graceful.GetManager().DoGracefulShutdown() ctx.PlainText(http.StatusOK, []byte("success")) } diff --git a/routers/private/manager_windows.go b/routers/private/manager_windows.go index ac840a9d8..a8a477313 100644 --- a/routers/private/manager_windows.go +++ b/routers/private/manager_windows.go @@ -1,28 +1,29 @@ -// +build windows - // Copyright 2020 The Gitea Authors. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. +//go:build windows +// +build windows + package private import ( "net/http" + "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/graceful" - - "gitea.com/macaron/macaron" + "code.gitea.io/gitea/modules/private" ) // Restart is not implemented for Windows based servers as they can't fork -func Restart(ctx *macaron.Context) { - ctx.JSON(http.StatusNotImplemented, map[string]interface{}{ - "err": "windows servers cannot be gracefully restarted - shutdown and restart manually", +func Restart(ctx *context.PrivateContext) { + ctx.JSON(http.StatusNotImplemented, private.Response{ + Err: "windows servers cannot be gracefully restarted - shutdown and restart manually", }) } // Shutdown causes the server to perform a graceful shutdown -func Shutdown(ctx *macaron.Context) { +func Shutdown(ctx *context.PrivateContext) { graceful.GetManager().DoGracefulShutdown() ctx.PlainText(http.StatusOK, []byte("success")) } diff --git a/routers/private/restore_repo.go b/routers/private/restore_repo.go new file mode 100644 index 000000000..87d60537c --- /dev/null +++ b/routers/private/restore_repo.go @@ -0,0 +1,52 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package private + +import ( + "io/ioutil" + "net/http" + + myCtx "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/migrations" + "code.gitea.io/gitea/modules/private" +) + +// RestoreRepo restore a repository from data +func RestoreRepo(ctx *myCtx.PrivateContext) { + bs, err := ioutil.ReadAll(ctx.Req.Body) + if err != nil { + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), + }) + return + } + var params = struct { + RepoDir string + OwnerName string + RepoName string + Units []string + }{} + if err = json.Unmarshal(bs, ¶ms); err != nil { + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), + }) + return + } + + if err := migrations.RestoreRepository( + ctx, + params.RepoDir, + params.OwnerName, + params.RepoName, + params.Units, + ); err != nil { + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), + }) + } else { + ctx.Status(http.StatusOK) + } +} diff --git a/routers/private/serv.go b/routers/private/serv.go index 90e1d30b0..aae2a8722 100644 --- a/routers/private/serv.go +++ b/routers/private/serv.go @@ -11,21 +11,21 @@ import ( "strings" "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/private" "code.gitea.io/gitea/modules/setting" repo_service "code.gitea.io/gitea/services/repository" wiki_service "code.gitea.io/gitea/services/wiki" - - "gitea.com/macaron/macaron" ) // ServNoCommand returns information about the provided keyid -func ServNoCommand(ctx *macaron.Context) { +func ServNoCommand(ctx *context.PrivateContext) { keyID := ctx.ParamsInt64(":keyid") if keyID <= 0 { - ctx.JSON(http.StatusBadRequest, map[string]interface{}{ - "err": fmt.Sprintf("Bad key id: %d", keyID), + ctx.JSON(http.StatusBadRequest, private.Response{ + Err: fmt.Sprintf("Bad key id: %d", keyID), }) } results := private.KeyAndOwner{} @@ -33,14 +33,14 @@ func ServNoCommand(ctx *macaron.Context) { key, err := models.GetPublicKeyByID(keyID) if err != nil { if models.IsErrKeyNotExist(err) { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "err": fmt.Sprintf("Cannot find key: %d", keyID), + ctx.JSON(http.StatusUnauthorized, private.Response{ + Err: fmt.Sprintf("Cannot find key: %d", keyID), }) return } log.Error("Unable to get public key: %d Error: %v", keyID, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } @@ -50,20 +50,20 @@ func ServNoCommand(ctx *macaron.Context) { user, err := models.GetUserByID(key.OwnerID) if err != nil { if models.IsErrUserNotExist(err) { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "err": fmt.Sprintf("Cannot find owner with id: %d for key: %d", key.OwnerID, keyID), + ctx.JSON(http.StatusUnauthorized, private.Response{ + Err: fmt.Sprintf("Cannot find owner with id: %d for key: %d", key.OwnerID, keyID), }) return } log.Error("Unable to get owner with id: %d for public key: %d Error: %v", key.OwnerID, keyID, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "err": err.Error(), + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: err.Error(), }) return } if !user.IsActive || user.ProhibitLogin { - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": "Your account is disabled.", + ctx.JSON(http.StatusForbidden, private.Response{ + Err: "Your account is disabled.", }) return } @@ -73,11 +73,11 @@ func ServNoCommand(ctx *macaron.Context) { } // ServCommand returns information about the provided keyid -func ServCommand(ctx *macaron.Context) { +func ServCommand(ctx *context.PrivateContext) { keyID := ctx.ParamsInt64(":keyid") ownerName := ctx.Params(":owner") repoName := ctx.Params(":repo") - mode := models.AccessMode(ctx.QueryInt("mode")) + mode := models.AccessMode(ctx.FormInt("mode")) // Set the basic parts of the results to return results := private.ServCommandResults{ @@ -107,18 +107,16 @@ func ServCommand(ctx *macaron.Context) { owner, err := models.GetUserByName(results.OwnerName) if err != nil { log.Error("Unable to get repository owner: %s/%s Error: %v", results.OwnerName, results.RepoName, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Unable to get repository owner: %s/%s %v", results.OwnerName, results.RepoName, err), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Unable to get repository owner: %s/%s %v", results.OwnerName, results.RepoName, err), }) return } if !owner.IsOrganization() && !owner.IsActive { - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "results": results, - "type": "ForbiddenError", - "err": "Repository cannot be accessed, you could retry it later", + ctx.JSON(http.StatusForbidden, private.ErrServCommand{ + Results: results, + Err: "Repository cannot be accessed, you could retry it later", }) return } @@ -129,24 +127,22 @@ func ServCommand(ctx *macaron.Context) { if err != nil { if models.IsErrRepoNotExist(err) { repoExist = false - for _, verb := range ctx.QueryStrings("verb") { + for _, verb := range ctx.FormStrings("verb") { if "git-upload-pack" == verb { // User is fetching/cloning a non-existent repository log.Error("Failed authentication attempt (cannot find repository: %s/%s) from %s", results.OwnerName, results.RepoName, ctx.RemoteAddr()) - ctx.JSON(http.StatusNotFound, map[string]interface{}{ - "results": results, - "type": "ErrRepoNotExist", - "err": fmt.Sprintf("Cannot find repository: %s/%s", results.OwnerName, results.RepoName), + ctx.JSON(http.StatusNotFound, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Cannot find repository: %s/%s", results.OwnerName, results.RepoName), }) return } } } else { log.Error("Unable to get repository: %s/%s Error: %v", results.OwnerName, results.RepoName, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Unable to get repository: %s/%s %v", results.OwnerName, results.RepoName, err), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Unable to get repository: %s/%s %v", results.OwnerName, results.RepoName, err), }) return } @@ -158,20 +154,18 @@ func ServCommand(ctx *macaron.Context) { results.RepoID = repo.ID if repo.IsBeingCreated() { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": "Repository is being created, you could retry after it finished", + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: "Repository is being created, you could retry after it finished", }) return } // We can shortcut at this point if the repo is a mirror if mode > models.AccessModeRead && repo.IsMirror { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "results": results, - "type": "ErrMirrorReadOnly", - "err": fmt.Sprintf("Mirror Repository %s/%s is read-only", results.OwnerName, results.RepoName), + ctx.JSON(http.StatusForbidden, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Mirror Repository %s/%s is read-only", results.OwnerName, results.RepoName), }) return } @@ -181,18 +175,16 @@ func ServCommand(ctx *macaron.Context) { key, err := models.GetPublicKeyByID(keyID) if err != nil { if models.IsErrKeyNotExist(err) { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "results": results, - "type": "ErrKeyNotExist", - "err": fmt.Sprintf("Cannot find key: %d", keyID), + ctx.JSON(http.StatusNotFound, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Cannot find key: %d", keyID), }) return } log.Error("Unable to get public key: %d Error: %v", keyID, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Unable to get key: %d Error: %v", keyID, err), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Unable to get key: %d Error: %v", keyID, err), }) return } @@ -202,10 +194,9 @@ func ServCommand(ctx *macaron.Context) { // If repo doesn't exist, deploy key doesn't make sense if !repoExist && key.Type == models.KeyTypeDeploy { - ctx.JSON(http.StatusNotFound, map[string]interface{}{ - "results": results, - "type": "ErrRepoNotExist", - "err": fmt.Sprintf("Cannot find repository %s/%s", results.OwnerName, results.RepoName), + ctx.JSON(http.StatusNotFound, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Cannot find repository %s/%s", results.OwnerName, results.RepoName), }) return } @@ -222,18 +213,16 @@ func ServCommand(ctx *macaron.Context) { deployKey, err = models.GetDeployKeyByRepo(key.ID, repo.ID) if err != nil { if models.IsErrDeployKeyNotExist(err) { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "results": results, - "type": "ErrDeployKeyNotExist", - "err": fmt.Sprintf("Public (Deploy) Key: %d:%s is not authorized to %s %s/%s.", key.ID, key.Name, modeString, results.OwnerName, results.RepoName), + ctx.JSON(http.StatusNotFound, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Public (Deploy) Key: %d:%s is not authorized to %s %s/%s.", key.ID, key.Name, modeString, results.OwnerName, results.RepoName), }) return } log.Error("Unable to get deploy for public (deploy) key: %d in %-v Error: %v", key.ID, repo, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Unable to get Deploy Key for Public Key: %d:%s in %s/%s.", key.ID, key.Name, results.OwnerName, results.RepoName), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Unable to get Deploy Key for Public Key: %d:%s in %s/%s.", key.ID, key.Name, results.OwnerName, results.RepoName), }) return } @@ -253,25 +242,23 @@ func ServCommand(ctx *macaron.Context) { user, err = models.GetUserByID(key.OwnerID) if err != nil { if models.IsErrUserNotExist(err) { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "results": results, - "type": "ErrUserNotExist", - "err": fmt.Sprintf("Public Key: %d:%s owner %d does not exist.", key.ID, key.Name, key.OwnerID), + ctx.JSON(http.StatusUnauthorized, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Public Key: %d:%s owner %d does not exist.", key.ID, key.Name, key.OwnerID), }) return } log.Error("Unable to get owner: %d for public key: %d:%s Error: %v", key.OwnerID, key.ID, key.Name, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Unable to get Owner: %d for Deploy Key: %d:%s in %s/%s.", key.OwnerID, key.ID, key.Name, ownerName, repoName), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Unable to get Owner: %d for Deploy Key: %d:%s in %s/%s.", key.OwnerID, key.ID, key.Name, ownerName, repoName), }) return } if !user.IsActive || user.ProhibitLogin { - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "err": "Your account is disabled.", + ctx.JSON(http.StatusForbidden, private.Response{ + Err: "Your account is disabled.", }) return } @@ -284,10 +271,9 @@ func ServCommand(ctx *macaron.Context) { // Don't allow pushing if the repo is archived if repoExist && mode > models.AccessModeRead && repo.IsArchived { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "results": results, - "type": "ErrRepoIsArchived", - "err": fmt.Sprintf("Repo: %s/%s is archived.", results.OwnerName, results.RepoName), + ctx.JSON(http.StatusUnauthorized, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Repo: %s/%s is archived.", results.OwnerName, results.RepoName), }) return } @@ -296,21 +282,24 @@ func ServCommand(ctx *macaron.Context) { if repoExist && (mode > models.AccessModeRead || repo.IsPrivate || setting.Service.RequireSignInView) { if key.Type == models.KeyTypeDeploy { if deployKey.Mode < mode { - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "results": results, - "type": "ErrUnauthorized", - "err": fmt.Sprintf("Deploy Key: %d:%s is not authorized to %s %s/%s.", key.ID, key.Name, modeString, results.OwnerName, results.RepoName), + ctx.JSON(http.StatusUnauthorized, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Deploy Key: %d:%s is not authorized to %s %s/%s.", key.ID, key.Name, modeString, results.OwnerName, results.RepoName), }) return } } else { + // Because of special ref "refs/for" .. , need delay write permission check + if git.SupportProcReceive && unitType == models.UnitTypeCode { + mode = models.AccessModeRead + } + perm, err := models.GetUserRepoPermission(repo, user) if err != nil { log.Error("Unable to get permissions for %-v with key %d in %-v Error: %v", user, key.ID, repo, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Unable to get permissions for user %d:%s with key %d in %s/%s Error: %v", user.ID, user.Name, key.ID, results.OwnerName, results.RepoName, err), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Unable to get permissions for user %d:%s with key %d in %s/%s Error: %v", user.ID, user.Name, key.ID, results.OwnerName, results.RepoName, err), }) return } @@ -319,10 +308,9 @@ func ServCommand(ctx *macaron.Context) { if userMode < mode { log.Error("Failed authentication attempt for %s with key %s (not authorized to %s %s/%s) from %s", user.Name, key.Name, modeString, ownerName, repoName, ctx.RemoteAddr()) - ctx.JSON(http.StatusUnauthorized, map[string]interface{}{ - "results": results, - "type": "ErrUnauthorized", - "err": fmt.Sprintf("User: %d:%s with Key: %d:%s is not authorized to %s %s/%s.", user.ID, user.Name, key.ID, key.Name, modeString, ownerName, repoName), + ctx.JSON(http.StatusUnauthorized, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("User: %d:%s with Key: %d:%s is not authorized to %s %s/%s.", user.ID, user.Name, key.ID, key.Name, modeString, ownerName, repoName), }) return } @@ -333,27 +321,24 @@ func ServCommand(ctx *macaron.Context) { if !repoExist { owner, err := models.GetUserByName(ownerName) if err != nil { - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Unable to get owner: %s %v", results.OwnerName, err), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Unable to get owner: %s %v", results.OwnerName, err), }) return } if owner.IsOrganization() && !setting.Repository.EnablePushCreateOrg { - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "results": results, - "type": "ErrForbidden", - "err": "Push to create is not enabled for organizations.", + ctx.JSON(http.StatusForbidden, private.ErrServCommand{ + Results: results, + Err: "Push to create is not enabled for organizations.", }) return } if !owner.IsOrganization() && !setting.Repository.EnablePushCreateUser { - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "results": results, - "type": "ErrForbidden", - "err": "Push to create is not enabled for users.", + ctx.JSON(http.StatusForbidden, private.ErrServCommand{ + Results: results, + Err: "Push to create is not enabled for users.", }) return } @@ -361,10 +346,9 @@ func ServCommand(ctx *macaron.Context) { repo, err = repo_service.PushCreateRepo(user, owner, results.RepoName) if err != nil { log.Error("pushCreateRepo: %v", err) - ctx.JSON(http.StatusNotFound, map[string]interface{}{ - "results": results, - "type": "ErrRepoNotExist", - "err": fmt.Sprintf("Cannot find repository: %s/%s", results.OwnerName, results.RepoName), + ctx.JSON(http.StatusNotFound, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Cannot find repository: %s/%s", results.OwnerName, results.RepoName), }) return } @@ -375,18 +359,16 @@ func ServCommand(ctx *macaron.Context) { // Ensure the wiki is enabled before we allow access to it if _, err := repo.GetUnit(models.UnitTypeWiki); err != nil { if models.IsErrUnitTypeNotExist(err) { - ctx.JSON(http.StatusForbidden, map[string]interface{}{ - "results": results, - "type": "ErrForbidden", - "err": "repository wiki is disabled", + ctx.JSON(http.StatusForbidden, private.ErrServCommand{ + Results: results, + Err: "repository wiki is disabled", }) return } log.Error("Failed to get the wiki unit in %-v Error: %v", repo, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Failed to get the wiki unit in %s/%s Error: %v", ownerName, repoName, err), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Failed to get the wiki unit in %s/%s Error: %v", ownerName, repoName, err), }) return } @@ -394,10 +376,9 @@ func ServCommand(ctx *macaron.Context) { // Finally if we're trying to touch the wiki we should init it if err = wiki_service.InitWiki(repo); err != nil { log.Error("Failed to initialize the wiki in %-v Error: %v", repo, err) - ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ - "results": results, - "type": "InternalServerError", - "err": fmt.Sprintf("Failed to initialize the wiki in %s/%s Error: %v", ownerName, repoName, err), + ctx.JSON(http.StatusInternalServerError, private.ErrServCommand{ + Results: results, + Err: fmt.Sprintf("Failed to initialize the wiki in %s/%s Error: %v", ownerName, repoName, err), }) return } diff --git a/routers/private/ssh_log.go b/routers/private/ssh_log.go new file mode 100644 index 000000000..2f1793a0e --- /dev/null +++ b/routers/private/ssh_log.go @@ -0,0 +1,34 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package private + +import ( + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/private" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" +) + +// SSHLog hook to response ssh log +func SSHLog(ctx *context.PrivateContext) { + if !setting.EnableSSHLog { + ctx.Status(http.StatusOK) + return + } + + opts := web.GetForm(ctx).(*private.SSHLogOption) + + if opts.IsError { + log.Error("ssh: %v", opts.Message) + ctx.Status(http.StatusOK) + return + } + + log.Debug("ssh: %v", opts.Message) + ctx.Status(http.StatusOK) +} diff --git a/routers/repo/activity.go b/routers/repo/activity.go deleted file mode 100644 index 88c704b8c..000000000 --- a/routers/repo/activity.go +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" -) - -const ( - tplActivity base.TplName = "repo/activity" -) - -// Activity render the page to show repository latest changes -func Activity(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.activity") - ctx.Data["PageIsActivity"] = true - - ctx.Data["Period"] = ctx.Params("period") - - timeUntil := time.Now() - var timeFrom time.Time - - switch ctx.Data["Period"] { - case "daily": - timeFrom = timeUntil.Add(-time.Hour * 24) - case "halfweekly": - timeFrom = timeUntil.Add(-time.Hour * 72) - case "weekly": - timeFrom = timeUntil.Add(-time.Hour * 168) - case "monthly": - timeFrom = timeUntil.AddDate(0, -1, 0) - case "quarterly": - timeFrom = timeUntil.AddDate(0, -3, 0) - case "semiyearly": - timeFrom = timeUntil.AddDate(0, -6, 0) - case "yearly": - timeFrom = timeUntil.AddDate(-1, 0, 0) - default: - ctx.Data["Period"] = "weekly" - timeFrom = timeUntil.Add(-time.Hour * 168) - } - ctx.Data["DateFrom"] = timeFrom.Format("January 2, 2006") - ctx.Data["DateUntil"] = timeUntil.Format("January 2, 2006") - ctx.Data["PeriodText"] = ctx.Tr("repo.activity.period." + ctx.Data["Period"].(string)) - - var err error - if ctx.Data["Activity"], err = models.GetActivityStats(ctx.Repo.Repository, timeFrom, - ctx.Repo.CanRead(models.UnitTypeReleases), - ctx.Repo.CanRead(models.UnitTypeIssues), - ctx.Repo.CanRead(models.UnitTypePullRequests), - ctx.Repo.CanRead(models.UnitTypeCode)); err != nil { - ctx.ServerError("GetActivityStats", err) - return - } - - if ctx.Data["ActivityTopAuthors"], err = models.GetActivityStatsTopAuthors(ctx.Repo.Repository, timeFrom, 10); err != nil { - ctx.ServerError("GetActivityStatsTopAuthors", err) - return - } - - ctx.HTML(200, tplActivity) -} - -// ActivityAuthors renders JSON with top commit authors for given time period over all branches -func ActivityAuthors(ctx *context.Context) { - timeUntil := time.Now() - var timeFrom time.Time - - switch ctx.Params("period") { - case "daily": - timeFrom = timeUntil.Add(-time.Hour * 24) - case "halfweekly": - timeFrom = timeUntil.Add(-time.Hour * 72) - case "weekly": - timeFrom = timeUntil.Add(-time.Hour * 168) - case "monthly": - timeFrom = timeUntil.AddDate(0, -1, 0) - case "quarterly": - timeFrom = timeUntil.AddDate(0, -3, 0) - case "semiyearly": - timeFrom = timeUntil.AddDate(0, -6, 0) - case "yearly": - timeFrom = timeUntil.AddDate(-1, 0, 0) - default: - timeFrom = timeUntil.Add(-time.Hour * 168) - } - - var err error - authors, err := models.GetActivityStatsTopAuthors(ctx.Repo.Repository, timeFrom, 10) - if err != nil { - ctx.ServerError("GetActivityStatsTopAuthors", err) - return - } - - ctx.JSON(200, authors) -} diff --git a/routers/repo/blame.go b/routers/repo/blame.go deleted file mode 100644 index 9be1ea05a..000000000 --- a/routers/repo/blame.go +++ /dev/null @@ -1,250 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "bytes" - "container/list" - "fmt" - "html" - gotemplate "html/template" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/highlight" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/templates" - "code.gitea.io/gitea/modules/timeutil" -) - -const ( - tplBlame base.TplName = "repo/home" -) - -// RefBlame render blame page -func RefBlame(ctx *context.Context) { - fileName := ctx.Repo.TreePath - if len(fileName) == 0 { - ctx.NotFound("Blame FileName", nil) - return - } - - userName := ctx.Repo.Owner.Name - repoName := ctx.Repo.Repository.Name - commitID := ctx.Repo.CommitID - - commit, err := ctx.Repo.GitRepo.GetCommit(commitID) - if err != nil { - if git.IsErrNotExist(err) { - ctx.NotFound("Repo.GitRepo.GetCommit", err) - } else { - ctx.ServerError("Repo.GitRepo.GetCommit", err) - } - return - } - if len(commitID) != 40 { - commitID = commit.ID.String() - } - - branchLink := ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL() - treeLink := branchLink - rawLink := ctx.Repo.RepoLink + "/raw/" + ctx.Repo.BranchNameSubURL() - - if len(ctx.Repo.TreePath) > 0 { - treeLink += "/" + ctx.Repo.TreePath - } - - var treeNames []string - paths := make([]string, 0, 5) - if len(ctx.Repo.TreePath) > 0 { - treeNames = strings.Split(ctx.Repo.TreePath, "/") - for i := range treeNames { - paths = append(paths, strings.Join(treeNames[:i+1], "/")) - } - - ctx.Data["HasParentPath"] = true - if len(paths)-2 >= 0 { - ctx.Data["ParentPath"] = "/" + paths[len(paths)-1] - } - } - - // Show latest commit info of repository in table header, - // or of directory if not in root directory. - latestCommit := ctx.Repo.Commit - if len(ctx.Repo.TreePath) > 0 { - latestCommit, err = ctx.Repo.Commit.GetCommitByPath(ctx.Repo.TreePath) - if err != nil { - ctx.ServerError("GetCommitByPath", err) - return - } - } - ctx.Data["LatestCommit"] = latestCommit - ctx.Data["LatestCommitVerification"] = models.ParseCommitWithSignature(latestCommit) - ctx.Data["LatestCommitUser"] = models.ValidateCommitWithEmail(latestCommit) - - statuses, err := models.GetLatestCommitStatus(ctx.Repo.Repository.ID, ctx.Repo.Commit.ID.String(), models.ListOptions{}) - if err != nil { - log.Error("GetLatestCommitStatus: %v", err) - } - - // Get current entry user currently looking at. - entry, err := ctx.Repo.Commit.GetTreeEntryByPath(ctx.Repo.TreePath) - if err != nil { - ctx.NotFoundOrServerError("Repo.Commit.GetTreeEntryByPath", git.IsErrNotExist, err) - return - } - - blob := entry.Blob() - - ctx.Data["LatestCommitStatus"] = models.CalcCommitStatus(statuses) - ctx.Data["LatestCommitStatuses"] = statuses - - ctx.Data["Paths"] = paths - ctx.Data["TreeLink"] = treeLink - ctx.Data["TreeNames"] = treeNames - ctx.Data["BranchLink"] = branchLink - - ctx.Data["RawFileLink"] = rawLink + "/" + ctx.Repo.TreePath - ctx.Data["PageIsViewCode"] = true - - ctx.Data["IsBlame"] = true - - ctx.Data["FileSize"] = blob.Size() - ctx.Data["FileName"] = blob.Name() - - ctx.Data["NumLines"], err = blob.GetBlobLineCount() - if err != nil { - ctx.NotFound("GetBlobLineCount", err) - return - } - - blameReader, err := git.CreateBlameReader(ctx.Req.Context(), models.RepoPath(userName, repoName), commitID, fileName) - if err != nil { - ctx.NotFound("CreateBlameReader", err) - return - } - defer blameReader.Close() - - blameParts := make([]git.BlamePart, 0) - - for { - blamePart, err := blameReader.NextPart() - if err != nil { - ctx.NotFound("NextPart", err) - return - } - if blamePart == nil { - break - } - blameParts = append(blameParts, *blamePart) - } - - commitNames := make(map[string]models.UserCommit) - commits := list.New() - - for _, part := range blameParts { - sha := part.Sha - if _, ok := commitNames[sha]; ok { - continue - } - - commit, err := ctx.Repo.GitRepo.GetCommit(sha) - if err != nil { - if git.IsErrNotExist(err) { - ctx.NotFound("Repo.GitRepo.GetCommit", err) - } else { - ctx.ServerError("Repo.GitRepo.GetCommit", err) - } - return - } - - commits.PushBack(commit) - - commitNames[commit.ID.String()] = models.UserCommit{} - } - - commits = models.ValidateCommitsWithEmails(commits) - - for e := commits.Front(); e != nil; e = e.Next() { - c := e.Value.(models.UserCommit) - - commitNames[c.ID.String()] = c - } - - // Get Topics of this repo - renderRepoTopics(ctx) - if ctx.Written() { - return - } - - renderBlame(ctx, blameParts, commitNames) - - ctx.HTML(200, tplBlame) -} - -func renderBlame(ctx *context.Context, blameParts []git.BlamePart, commitNames map[string]models.UserCommit) { - repoLink := ctx.Repo.RepoLink - - var lines = make([]string, 0) - - var commitInfo bytes.Buffer - var lineNumbers bytes.Buffer - var codeLines bytes.Buffer - - var i = 0 - for pi, part := range blameParts { - for index, line := range part.Lines { - i++ - lines = append(lines, line) - - var attr = "" - if len(part.Lines)-1 == index && len(blameParts)-1 != pi { - attr = " bottom-line" - } - commit := commitNames[part.Sha] - if index == 0 { - // User avatar image - commitSince := timeutil.TimeSinceUnix(timeutil.TimeStamp(commit.Author.When.Unix()), ctx.Data["Lang"].(string)) - - var avatar string - if commit.User != nil { - avatar = string(templates.Avatar(commit.User, 18, "mr-3")) - } else { - avatar = string(templates.AvatarByEmail(commit.Author.Email, commit.Author.Name, 18, "mr-3")) - } - - commitInfo.WriteString(fmt.Sprintf(`
    %s
    %s
    `, attr, avatar, repoLink, part.Sha, html.EscapeString(commit.CommitMessage), commitSince)) - } else { - commitInfo.WriteString(fmt.Sprintf(`
    `, attr)) - } - - //Line number - if len(part.Lines)-1 == index && len(blameParts)-1 != pi { - lineNumbers.WriteString(fmt.Sprintf(``, i, i)) - } else { - lineNumbers.WriteString(fmt.Sprintf(``, i, i)) - } - - if i != len(lines)-1 { - line += "\n" - } - fileName := fmt.Sprintf("%v", ctx.Data["FileName"]) - line = highlight.Code(fileName, line) - line = `` + line + `` - if len(part.Lines)-1 == index && len(blameParts)-1 != pi { - codeLines.WriteString(fmt.Sprintf(`
  • %s
  • `, i, i, line)) - } else { - codeLines.WriteString(fmt.Sprintf(`
  • %s
  • `, i, i, line)) - } - } - } - - ctx.Data["BlameContent"] = gotemplate.HTML(codeLines.String()) - ctx.Data["BlameCommitInfo"] = gotemplate.HTML(commitInfo.String()) - ctx.Data["BlameLineNums"] = gotemplate.HTML(lineNumbers.String()) -} diff --git a/routers/repo/branch.go b/routers/repo/branch.go deleted file mode 100644 index 81e8916af..000000000 --- a/routers/repo/branch.go +++ /dev/null @@ -1,379 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "fmt" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/repofiles" - repo_module "code.gitea.io/gitea/modules/repository" - "code.gitea.io/gitea/modules/util" - "code.gitea.io/gitea/routers/utils" - repo_service "code.gitea.io/gitea/services/repository" -) - -const ( - tplBranch base.TplName = "repo/branch/list" -) - -// Branch contains the branch information -type Branch struct { - Name string - Commit *git.Commit - IsProtected bool - IsDeleted bool - IsIncluded bool - DeletedBranch *models.DeletedBranch - CommitsAhead int - CommitsBehind int - LatestPullRequest *models.PullRequest - MergeMovedOn bool -} - -// Branches render repository branch page -func Branches(ctx *context.Context) { - ctx.Data["Title"] = "Branches" - ctx.Data["IsRepoToolbarBranches"] = true - ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch - ctx.Data["AllowsPulls"] = ctx.Repo.Repository.AllowsPulls() - ctx.Data["IsWriter"] = ctx.Repo.CanWrite(models.UnitTypeCode) - ctx.Data["IsMirror"] = ctx.Repo.Repository.IsMirror - ctx.Data["CanPull"] = ctx.Repo.CanWrite(models.UnitTypeCode) || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) - ctx.Data["PageIsViewCode"] = true - ctx.Data["PageIsBranches"] = true - - ctx.Data["Branches"] = loadBranches(ctx) - ctx.HTML(200, tplBranch) -} - -// DeleteBranchPost responses for delete merged branch -func DeleteBranchPost(ctx *context.Context) { - defer redirect(ctx) - branchName := ctx.Query("name") - if branchName == ctx.Repo.Repository.DefaultBranch { - ctx.Flash.Error(ctx.Tr("repo.branch.default_deletion_failed", branchName)) - return - } - - isProtected, err := ctx.Repo.Repository.IsProtectedBranch(branchName, ctx.User) - if err != nil { - log.Error("DeleteBranch: %v", err) - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", branchName)) - return - } - - if isProtected { - ctx.Flash.Error(ctx.Tr("repo.branch.protected_deletion_failed", branchName)) - return - } - - if !ctx.Repo.GitRepo.IsBranchExist(branchName) || branchName == ctx.Repo.Repository.DefaultBranch { - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", branchName)) - return - } - - if err := deleteBranch(ctx, branchName); err != nil { - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", branchName)) - return - } - - ctx.Flash.Success(ctx.Tr("repo.branch.deletion_success", branchName)) -} - -// RestoreBranchPost responses for delete merged branch -func RestoreBranchPost(ctx *context.Context) { - defer redirect(ctx) - - branchID := ctx.QueryInt64("branch_id") - branchName := ctx.Query("name") - - deletedBranch, err := ctx.Repo.Repository.GetDeletedBranchByID(branchID) - if err != nil { - log.Error("GetDeletedBranchByID: %v", err) - ctx.Flash.Error(ctx.Tr("repo.branch.restore_failed", branchName)) - return - } - - if err := git.Push(ctx.Repo.Repository.RepoPath(), git.PushOptions{ - Remote: ctx.Repo.Repository.RepoPath(), - Branch: fmt.Sprintf("%s:%s%s", deletedBranch.Commit, git.BranchPrefix, deletedBranch.Name), - Env: models.PushingEnvironment(ctx.User, ctx.Repo.Repository), - }); err != nil { - if strings.Contains(err.Error(), "already exists") { - ctx.Flash.Error(ctx.Tr("repo.branch.already_exists", deletedBranch.Name)) - return - } - log.Error("CreateBranch: %v", err) - ctx.Flash.Error(ctx.Tr("repo.branch.restore_failed", deletedBranch.Name)) - return - } - - // Don't return error below this - if err := repo_service.PushUpdate( - &repo_module.PushUpdateOptions{ - RefFullName: git.BranchPrefix + deletedBranch.Name, - OldCommitID: git.EmptySHA, - NewCommitID: deletedBranch.Commit, - PusherID: ctx.User.ID, - PusherName: ctx.User.Name, - RepoUserName: ctx.Repo.Owner.Name, - RepoName: ctx.Repo.Repository.Name, - }); err != nil { - log.Error("Update: %v", err) - } - - ctx.Flash.Success(ctx.Tr("repo.branch.restore_success", deletedBranch.Name)) -} - -func redirect(ctx *context.Context) { - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/branches", - }) -} - -func deleteBranch(ctx *context.Context, branchName string) error { - commit, err := ctx.Repo.GitRepo.GetBranchCommit(branchName) - if err != nil { - log.Error("GetBranchCommit: %v", err) - return err - } - - if err := ctx.Repo.GitRepo.DeleteBranch(branchName, git.DeleteBranchOptions{ - Force: true, - }); err != nil { - log.Error("DeleteBranch: %v", err) - return err - } - - // Don't return error below this - if err := repo_service.PushUpdate( - &repo_module.PushUpdateOptions{ - RefFullName: git.BranchPrefix + branchName, - OldCommitID: commit.ID.String(), - NewCommitID: git.EmptySHA, - PusherID: ctx.User.ID, - PusherName: ctx.User.Name, - RepoUserName: ctx.Repo.Owner.Name, - RepoName: ctx.Repo.Repository.Name, - }); err != nil { - log.Error("Update: %v", err) - } - - if err := ctx.Repo.Repository.AddDeletedBranch(branchName, commit.ID.String(), ctx.User.ID); err != nil { - log.Warn("AddDeletedBranch: %v", err) - } - - return nil -} - -func loadBranches(ctx *context.Context) []*Branch { - rawBranches, err := repo_module.GetBranches(ctx.Repo.Repository) - if err != nil { - ctx.ServerError("GetBranches", err) - return nil - } - - protectedBranches, err := ctx.Repo.Repository.GetProtectedBranches() - if err != nil { - ctx.ServerError("GetProtectedBranches", err) - return nil - } - - repoIDToRepo := map[int64]*models.Repository{} - repoIDToRepo[ctx.Repo.Repository.ID] = ctx.Repo.Repository - - repoIDToGitRepo := map[int64]*git.Repository{} - repoIDToGitRepo[ctx.Repo.Repository.ID] = ctx.Repo.GitRepo - - branches := make([]*Branch, len(rawBranches)) - for i := range rawBranches { - commit, err := rawBranches[i].GetCommit() - if err != nil { - ctx.ServerError("GetCommit", err) - return nil - } - - var isProtected bool - branchName := rawBranches[i].Name - for _, b := range protectedBranches { - if b.BranchName == branchName { - isProtected = true - break - } - } - - divergence, divergenceError := repofiles.CountDivergingCommits(ctx.Repo.Repository, git.BranchPrefix+branchName) - if divergenceError != nil { - ctx.ServerError("CountDivergingCommits", divergenceError) - return nil - } - - pr, err := models.GetLatestPullRequestByHeadInfo(ctx.Repo.Repository.ID, branchName) - if err != nil { - ctx.ServerError("GetLatestPullRequestByHeadInfo", err) - return nil - } - headCommit := commit.ID.String() - - mergeMovedOn := false - if pr != nil { - pr.HeadRepo = ctx.Repo.Repository - if err := pr.LoadIssue(); err != nil { - ctx.ServerError("pr.LoadIssue", err) - return nil - } - if repo, ok := repoIDToRepo[pr.BaseRepoID]; ok { - pr.BaseRepo = repo - } else if err := pr.LoadBaseRepo(); err != nil { - ctx.ServerError("pr.LoadBaseRepo", err) - return nil - } else { - repoIDToRepo[pr.BaseRepoID] = pr.BaseRepo - } - pr.Issue.Repo = pr.BaseRepo - - if pr.HasMerged { - baseGitRepo, ok := repoIDToGitRepo[pr.BaseRepoID] - if !ok { - baseGitRepo, err = git.OpenRepository(pr.BaseRepo.RepoPath()) - if err != nil { - ctx.ServerError("OpenRepository", err) - return nil - } - defer baseGitRepo.Close() - repoIDToGitRepo[pr.BaseRepoID] = baseGitRepo - } - pullCommit, err := baseGitRepo.GetRefCommitID(pr.GetGitRefName()) - if err != nil && !git.IsErrNotExist(err) { - ctx.ServerError("GetBranchCommitID", err) - return nil - } - if err == nil && headCommit != pullCommit { - // the head has moved on from the merge - we shouldn't delete - mergeMovedOn = true - } - } - } - - isIncluded := divergence.Ahead == 0 && ctx.Repo.Repository.DefaultBranch != branchName - - branches[i] = &Branch{ - Name: branchName, - Commit: commit, - IsProtected: isProtected, - IsIncluded: isIncluded, - CommitsAhead: divergence.Ahead, - CommitsBehind: divergence.Behind, - LatestPullRequest: pr, - MergeMovedOn: mergeMovedOn, - } - } - - if ctx.Repo.CanWrite(models.UnitTypeCode) { - deletedBranches, err := getDeletedBranches(ctx) - if err != nil { - ctx.ServerError("getDeletedBranches", err) - return nil - } - branches = append(branches, deletedBranches...) - } - - return branches -} - -func getDeletedBranches(ctx *context.Context) ([]*Branch, error) { - branches := []*Branch{} - - deletedBranches, err := ctx.Repo.Repository.GetDeletedBranches() - if err != nil { - return branches, err - } - - for i := range deletedBranches { - deletedBranches[i].LoadUser() - branches = append(branches, &Branch{ - Name: deletedBranches[i].Name, - IsDeleted: true, - DeletedBranch: deletedBranches[i], - }) - } - - return branches, nil -} - -// CreateBranch creates new branch in repository -func CreateBranch(ctx *context.Context, form auth.NewBranchForm) { - if !ctx.Repo.CanCreateBranch() { - ctx.NotFound("CreateBranch", nil) - return - } - - if ctx.HasError() { - ctx.Flash.Error(ctx.GetErrMsg()) - ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) - return - } - - var err error - if ctx.Repo.IsViewBranch { - err = repo_module.CreateNewBranch(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) - } else if ctx.Repo.IsViewTag { - err = repo_module.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.CommitID, form.NewBranchName) - } else { - err = repo_module.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) - } - if err != nil { - if models.IsErrTagAlreadyExists(err) { - e := err.(models.ErrTagAlreadyExists) - ctx.Flash.Error(ctx.Tr("repo.branch.tag_collision", e.TagName)) - ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) - return - } - if models.IsErrBranchAlreadyExists(err) || git.IsErrPushOutOfDate(err) { - ctx.Flash.Error(ctx.Tr("repo.branch.branch_already_exists", form.NewBranchName)) - ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) - return - } - if models.IsErrBranchNameConflict(err) { - e := err.(models.ErrBranchNameConflict) - ctx.Flash.Error(ctx.Tr("repo.branch.branch_name_conflict", form.NewBranchName, e.BranchName)) - ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) - return - } - if git.IsErrPushRejected(err) { - e := err.(*git.ErrPushRejected) - if len(e.Message) == 0 { - ctx.Flash.Error(ctx.Tr("repo.editor.push_rejected_no_message")) - } else { - flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ - "Message": ctx.Tr("repo.editor.push_rejected"), - "Summary": ctx.Tr("repo.editor.push_rejected_summary"), - "Details": utils.SanitizeFlashErrorString(e.Message), - }) - if err != nil { - ctx.ServerError("UpdatePullRequest.HTMLString", err) - return - } - ctx.Flash.Error(flashError) - } - ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) - return - } - - ctx.ServerError("CreateNewBranch", err) - return - } - - ctx.Flash.Success(ctx.Tr("repo.branch.create_success", form.NewBranchName)) - ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(form.NewBranchName)) -} diff --git a/routers/repo/commit.go b/routers/repo/commit.go deleted file mode 100644 index c411d247e..000000000 --- a/routers/repo/commit.go +++ /dev/null @@ -1,394 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "path" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/charset" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/gitgraph" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/services/gitdiff" -) - -const ( - tplCommits base.TplName = "repo/commits" - tplGraph base.TplName = "repo/graph" - tplGraphDiv base.TplName = "repo/graph/div" - tplCommitPage base.TplName = "repo/commit_page" -) - -// RefCommits render commits page -func RefCommits(ctx *context.Context) { - switch { - case len(ctx.Repo.TreePath) == 0: - Commits(ctx) - case ctx.Repo.TreePath == "search": - SearchCommits(ctx) - default: - FileHistory(ctx) - } -} - -// Commits render branch's commits -func Commits(ctx *context.Context) { - ctx.Data["PageIsCommits"] = true - if ctx.Repo.Commit == nil { - ctx.NotFound("Commit not found", nil) - return - } - ctx.Data["PageIsViewCode"] = true - - commitsCount, err := ctx.Repo.GetCommitsCount() - if err != nil { - ctx.ServerError("GetCommitsCount", err) - return - } - - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - - pageSize := ctx.QueryInt("limit") - if pageSize <= 0 { - pageSize = git.CommitsRangeSize - } - - // Both `git log branchName` and `git log commitId` work. - commits, err := ctx.Repo.Commit.CommitsByRange(page, pageSize) - if err != nil { - ctx.ServerError("CommitsByRange", err) - return - } - commits = models.ValidateCommitsWithEmails(commits) - commits = models.ParseCommitsWithSignature(commits, ctx.Repo.Repository) - commits = models.ParseCommitsWithStatus(commits, ctx.Repo.Repository) - ctx.Data["Commits"] = commits - - ctx.Data["Username"] = ctx.Repo.Owner.Name - ctx.Data["Reponame"] = ctx.Repo.Repository.Name - ctx.Data["CommitCount"] = commitsCount - ctx.Data["Branch"] = ctx.Repo.BranchName - - pager := context.NewPagination(int(commitsCount), git.CommitsRangeSize, page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - - ctx.HTML(200, tplCommits) -} - -// Graph render commit graph - show commits from all branches. -func Graph(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.commit_graph") - ctx.Data["PageIsCommits"] = true - ctx.Data["PageIsViewCode"] = true - mode := strings.ToLower(ctx.QueryTrim("mode")) - if mode != "monochrome" { - mode = "color" - } - ctx.Data["Mode"] = mode - hidePRRefs := ctx.QueryBool("hide-pr-refs") - ctx.Data["HidePRRefs"] = hidePRRefs - branches := ctx.QueryStrings("branch") - realBranches := make([]string, len(branches)) - copy(realBranches, branches) - for i, branch := range realBranches { - if strings.HasPrefix(branch, "--") { - realBranches[i] = "refs/heads/" + branch - } - } - ctx.Data["SelectedBranches"] = realBranches - files := ctx.QueryStrings("file") - - commitsCount, err := ctx.Repo.GetCommitsCount() - if err != nil { - ctx.ServerError("GetCommitsCount", err) - return - } - - graphCommitsCount, err := ctx.Repo.GetCommitGraphsCount(hidePRRefs, realBranches, files) - if err != nil { - log.Warn("GetCommitGraphsCount error for generate graph exclude prs: %t branches: %s in %-v, Will Ignore branches and try again. Underlying Error: %v", hidePRRefs, branches, ctx.Repo.Repository, err) - realBranches = []string{} - branches = []string{} - graphCommitsCount, err = ctx.Repo.GetCommitGraphsCount(hidePRRefs, realBranches, files) - if err != nil { - ctx.ServerError("GetCommitGraphsCount", err) - return - } - } - - page := ctx.QueryInt("page") - - graph, err := gitgraph.GetCommitGraph(ctx.Repo.GitRepo, page, 0, hidePRRefs, realBranches, files) - if err != nil { - ctx.ServerError("GetCommitGraph", err) - return - } - - if err := graph.LoadAndProcessCommits(ctx.Repo.Repository, ctx.Repo.GitRepo); err != nil { - ctx.ServerError("LoadAndProcessCommits", err) - return - } - - ctx.Data["Graph"] = graph - - gitRefs, err := ctx.Repo.GitRepo.GetRefs() - if err != nil { - ctx.ServerError("GitRepo.GetRefs", err) - return - } - - ctx.Data["AllRefs"] = gitRefs - - ctx.Data["Username"] = ctx.Repo.Owner.Name - ctx.Data["Reponame"] = ctx.Repo.Repository.Name - ctx.Data["CommitCount"] = commitsCount - ctx.Data["Branch"] = ctx.Repo.BranchName - paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5) - paginator.AddParam(ctx, "mode", "Mode") - paginator.AddParam(ctx, "hide-pr-refs", "HidePRRefs") - for _, branch := range branches { - paginator.AddParamString("branch", branch) - } - for _, file := range files { - paginator.AddParamString("file", file) - } - ctx.Data["Page"] = paginator - if ctx.QueryBool("div-only") { - ctx.HTML(200, tplGraphDiv) - return - } - - ctx.HTML(200, tplGraph) -} - -// SearchCommits render commits filtered by keyword -func SearchCommits(ctx *context.Context) { - ctx.Data["PageIsCommits"] = true - ctx.Data["PageIsViewCode"] = true - - query := strings.Trim(ctx.Query("q"), " ") - if len(query) == 0 { - ctx.Redirect(ctx.Repo.RepoLink + "/commits/" + ctx.Repo.BranchNameSubURL()) - return - } - - all := ctx.QueryBool("all") - opts := git.NewSearchCommitsOptions(query, all) - commits, err := ctx.Repo.Commit.SearchCommits(opts) - if err != nil { - ctx.ServerError("SearchCommits", err) - return - } - commits = models.ValidateCommitsWithEmails(commits) - commits = models.ParseCommitsWithSignature(commits, ctx.Repo.Repository) - commits = models.ParseCommitsWithStatus(commits, ctx.Repo.Repository) - ctx.Data["Commits"] = commits - - ctx.Data["Keyword"] = query - if all { - ctx.Data["All"] = "checked" - } - ctx.Data["Username"] = ctx.Repo.Owner.Name - ctx.Data["Reponame"] = ctx.Repo.Repository.Name - ctx.Data["CommitCount"] = commits.Len() - ctx.Data["Branch"] = ctx.Repo.BranchName - ctx.HTML(200, tplCommits) -} - -// FileHistory show a file's reversions -func FileHistory(ctx *context.Context) { - ctx.Data["IsRepoToolbarCommits"] = true - - fileName := ctx.Repo.TreePath - if len(fileName) == 0 { - Commits(ctx) - return - } - - branchName := ctx.Repo.BranchName - commitsCount, err := ctx.Repo.GitRepo.FileCommitsCount(branchName, fileName) - if err != nil { - ctx.ServerError("FileCommitsCount", err) - return - } else if commitsCount == 0 { - ctx.NotFound("FileCommitsCount", nil) - return - } - - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - - commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(branchName, fileName, page) - if err != nil { - ctx.ServerError("CommitsByFileAndRange", err) - return - } - commits = models.ValidateCommitsWithEmails(commits) - commits = models.ParseCommitsWithSignature(commits, ctx.Repo.Repository) - commits = models.ParseCommitsWithStatus(commits, ctx.Repo.Repository) - ctx.Data["Commits"] = commits - - ctx.Data["Username"] = ctx.Repo.Owner.Name - ctx.Data["Reponame"] = ctx.Repo.Repository.Name - ctx.Data["FileName"] = fileName - ctx.Data["CommitCount"] = commitsCount - ctx.Data["Branch"] = branchName - - pager := context.NewPagination(int(commitsCount), git.CommitsRangeSize, page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - - ctx.HTML(200, tplCommits) -} - -// Diff show different from current commit to previous commit -func Diff(ctx *context.Context) { - ctx.Data["PageIsDiff"] = true - ctx.Data["RequireHighlightJS"] = true - ctx.Data["RequireSimpleMDE"] = true - ctx.Data["RequireTribute"] = true - - userName := ctx.Repo.Owner.Name - repoName := ctx.Repo.Repository.Name - commitID := ctx.Params(":sha") - var ( - gitRepo *git.Repository - err error - repoPath string - ) - - if ctx.Data["PageIsWiki"] != nil { - gitRepo, err = git.OpenRepository(ctx.Repo.Repository.WikiPath()) - if err != nil { - ctx.ServerError("Repo.GitRepo.GetCommit", err) - return - } - repoPath = ctx.Repo.Repository.WikiPath() - } else { - gitRepo = ctx.Repo.GitRepo - repoPath = models.RepoPath(userName, repoName) - } - - commit, err := gitRepo.GetCommit(commitID) - if err != nil { - if git.IsErrNotExist(err) { - ctx.NotFound("Repo.GitRepo.GetCommit", err) - } else { - ctx.ServerError("Repo.GitRepo.GetCommit", err) - } - return - } - if len(commitID) != 40 { - commitID = commit.ID.String() - } - - statuses, err := models.GetLatestCommitStatus(ctx.Repo.Repository.ID, commitID, models.ListOptions{}) - if err != nil { - log.Error("GetLatestCommitStatus: %v", err) - } - - ctx.Data["CommitStatus"] = models.CalcCommitStatus(statuses) - ctx.Data["CommitStatuses"] = statuses - - diff, err := gitdiff.GetDiffCommit(repoPath, - commitID, setting.Git.MaxGitDiffLines, - setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles) - if err != nil { - ctx.NotFound("GetDiffCommit", err) - return - } - - parents := make([]string, commit.ParentCount()) - for i := 0; i < commit.ParentCount(); i++ { - sha, err := commit.ParentID(i) - if err != nil { - ctx.NotFound("repo.Diff", err) - return - } - parents[i] = sha.String() - } - - ctx.Data["CommitID"] = commitID - ctx.Data["AfterCommitID"] = commitID - ctx.Data["Username"] = userName - ctx.Data["Reponame"] = repoName - - var parentCommit *git.Commit - if commit.ParentCount() > 0 { - parentCommit, err = gitRepo.GetCommit(parents[0]) - if err != nil { - ctx.NotFound("GetParentCommit", err) - return - } - } - setImageCompareContext(ctx, parentCommit, commit) - headTarget := path.Join(userName, repoName) - setPathsCompareContext(ctx, parentCommit, commit, headTarget) - ctx.Data["Title"] = commit.Summary() + " · " + base.ShortSha(commitID) - ctx.Data["Commit"] = commit - verification := models.ParseCommitWithSignature(commit) - ctx.Data["Verification"] = verification - ctx.Data["Author"] = models.ValidateCommitWithEmail(commit) - ctx.Data["Diff"] = diff - ctx.Data["Parents"] = parents - ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0 - - if err := models.CalculateTrustStatus(verification, ctx.Repo.Repository, nil); err != nil { - ctx.ServerError("CalculateTrustStatus", err) - return - } - - note := &git.Note{} - err = git.GetNote(ctx.Repo.GitRepo, commitID, note) - if err == nil { - ctx.Data["Note"] = string(charset.ToUTF8WithFallback(note.Message)) - ctx.Data["NoteCommit"] = note.Commit - ctx.Data["NoteAuthor"] = models.ValidateCommitWithEmail(note.Commit) - } - - ctx.Data["BranchName"], err = commit.GetBranchName() - if err != nil { - ctx.ServerError("commit.GetBranchName", err) - return - } - - ctx.Data["TagName"], err = commit.GetTagName() - if err != nil { - ctx.ServerError("commit.GetTagName", err) - return - } - ctx.HTML(200, tplCommitPage) -} - -// RawDiff dumps diff results of repository in given commit ID to io.Writer -func RawDiff(ctx *context.Context) { - var repoPath string - if ctx.Data["PageIsWiki"] != nil { - repoPath = ctx.Repo.Repository.WikiPath() - } else { - repoPath = models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name) - } - if err := git.GetRawDiff( - repoPath, - ctx.Params(":sha"), - git.RawDiffType(ctx.Params(":ext")), - ctx.Resp, - ); err != nil { - ctx.ServerError("GetRawDiff", err) - return - } -} diff --git a/routers/repo/download.go b/routers/repo/download.go deleted file mode 100644 index f04dac6aa..000000000 --- a/routers/repo/download.go +++ /dev/null @@ -1,176 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "fmt" - "io" - "path" - "strings" - - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/charset" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/lfs" - "code.gitea.io/gitea/modules/log" -) - -// ServeData download file from io.Reader -func ServeData(ctx *context.Context, name string, reader io.Reader) error { - buf := make([]byte, 1024) - n, err := reader.Read(buf) - if err != nil && err != io.EOF { - return err - } - if n >= 0 { - buf = buf[:n] - } - - ctx.Resp.Header().Set("Cache-Control", "public,max-age=86400") - name = path.Base(name) - - // Google Chrome dislike commas in filenames, so let's change it to a space - name = strings.ReplaceAll(name, ",", " ") - - if base.IsTextFile(buf) || ctx.QueryBool("render") { - cs, err := charset.DetectEncoding(buf) - if err != nil { - log.Error("Detect raw file %s charset failed: %v, using by default utf-8", name, err) - cs = "utf-8" - } - ctx.Resp.Header().Set("Content-Type", "text/plain; charset="+strings.ToLower(cs)) - } else if base.IsImageFile(buf) || base.IsPDFFile(buf) { - ctx.Resp.Header().Set("Content-Disposition", fmt.Sprintf(`inline; filename="%s"`, name)) - ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition") - if base.IsSVGImageFile(buf) { - ctx.Resp.Header().Set("Content-Security-Policy", "default-src 'none'; style-src 'unsafe-inline'; sandbox") - ctx.Resp.Header().Set("X-Content-Type-Options", "nosniff") - ctx.Resp.Header().Set("Content-Type", base.SVGMimeType) - } - } else { - ctx.Resp.Header().Set("Content-Disposition", fmt.Sprintf(`attachment; filename="%s"`, name)) - ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition") - } - - _, err = ctx.Resp.Write(buf) - if err != nil { - return err - } - _, err = io.Copy(ctx.Resp, reader) - return err -} - -// ServeBlob download a git.Blob -func ServeBlob(ctx *context.Context, blob *git.Blob) error { - dataRc, err := blob.DataAsync() - if err != nil { - return err - } - defer func() { - if err = dataRc.Close(); err != nil { - log.Error("ServeBlob: Close: %v", err) - } - }() - - return ServeData(ctx, ctx.Repo.TreePath, dataRc) -} - -// ServeBlobOrLFS download a git.Blob redirecting to LFS if necessary -func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error { - dataRc, err := blob.DataAsync() - if err != nil { - return err - } - defer func() { - if err = dataRc.Close(); err != nil { - log.Error("ServeBlobOrLFS: Close: %v", err) - } - }() - - if meta, _ := lfs.ReadPointerFile(dataRc); meta != nil { - meta, _ = ctx.Repo.Repository.GetLFSMetaObjectByOid(meta.Oid) - if meta == nil { - return ServeBlob(ctx, blob) - } - lfsDataRc, err := lfs.ReadMetaObject(meta) - if err != nil { - return err - } - defer func() { - if err = lfsDataRc.Close(); err != nil { - log.Error("ServeBlobOrLFS: Close: %v", err) - } - }() - return ServeData(ctx, ctx.Repo.TreePath, lfsDataRc) - } - - return ServeBlob(ctx, blob) -} - -// SingleDownload download a file by repos path -func SingleDownload(ctx *context.Context) { - blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreePath) - if err != nil { - if git.IsErrNotExist(err) { - ctx.NotFound("GetBlobByPath", nil) - } else { - ctx.ServerError("GetBlobByPath", err) - } - return - } - if err = ServeBlob(ctx, blob); err != nil { - ctx.ServerError("ServeBlob", err) - } -} - -// SingleDownloadOrLFS download a file by repos path redirecting to LFS if necessary -func SingleDownloadOrLFS(ctx *context.Context) { - blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreePath) - if err != nil { - if git.IsErrNotExist(err) { - ctx.NotFound("GetBlobByPath", nil) - } else { - ctx.ServerError("GetBlobByPath", err) - } - return - } - if err = ServeBlobOrLFS(ctx, blob); err != nil { - ctx.ServerError("ServeBlobOrLFS", err) - } -} - -// DownloadByID download a file by sha1 ID -func DownloadByID(ctx *context.Context) { - blob, err := ctx.Repo.GitRepo.GetBlob(ctx.Params("sha")) - if err != nil { - if git.IsErrNotExist(err) { - ctx.NotFound("GetBlob", nil) - } else { - ctx.ServerError("GetBlob", err) - } - return - } - if err = ServeBlob(ctx, blob); err != nil { - ctx.ServerError("ServeBlob", err) - } -} - -// DownloadByIDOrLFS download a file by sha1 ID taking account of LFS -func DownloadByIDOrLFS(ctx *context.Context) { - blob, err := ctx.Repo.GitRepo.GetBlob(ctx.Params("sha")) - if err != nil { - if git.IsErrNotExist(err) { - ctx.NotFound("GetBlob", nil) - } else { - ctx.ServerError("GetBlob", err) - } - return - } - if err = ServeBlobOrLFS(ctx, blob); err != nil { - ctx.ServerError("ServeBlob", err) - } -} diff --git a/routers/repo/http.go b/routers/repo/http.go deleted file mode 100644 index d4464ec62..000000000 --- a/routers/repo/http.go +++ /dev/null @@ -1,688 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "bytes" - "compress/gzip" - gocontext "context" - "fmt" - "io/ioutil" - "net/http" - "os" - "os/exec" - "path" - "regexp" - "strconv" - "strings" - "sync" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth/sso" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/process" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/modules/util" - repo_service "code.gitea.io/gitea/services/repository" -) - -// HTTP implmentation git smart HTTP protocol -func HTTP(ctx *context.Context) { - if len(setting.Repository.AccessControlAllowOrigin) > 0 { - allowedOrigin := setting.Repository.AccessControlAllowOrigin - // Set CORS headers for browser-based git clients - ctx.Resp.Header().Set("Access-Control-Allow-Origin", allowedOrigin) - ctx.Resp.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization, User-Agent") - - // Handle preflight OPTIONS request - if ctx.Req.Method == "OPTIONS" { - if allowedOrigin == "*" { - ctx.Status(http.StatusOK) - } else if allowedOrigin == "null" { - ctx.Status(http.StatusForbidden) - } else { - origin := ctx.Req.Header.Get("Origin") - if len(origin) > 0 && origin == allowedOrigin { - ctx.Status(http.StatusOK) - } else { - ctx.Status(http.StatusForbidden) - } - } - return - } - } - - username := ctx.Params(":username") - reponame := strings.TrimSuffix(ctx.Params(":reponame"), ".git") - - if ctx.Query("go-get") == "1" { - context.EarlyResponseForGoGetMeta(ctx) - return - } - - var isPull, receivePack bool - service := ctx.Query("service") - if service == "git-receive-pack" || - strings.HasSuffix(ctx.Req.URL.Path, "git-receive-pack") { - isPull = false - receivePack = true - } else if service == "git-upload-pack" || - strings.HasSuffix(ctx.Req.URL.Path, "git-upload-pack") { - isPull = true - } else if service == "git-upload-archive" || - strings.HasSuffix(ctx.Req.URL.Path, "git-upload-archive") { - isPull = true - } else { - isPull = (ctx.Req.Method == "GET") - } - - var accessMode models.AccessMode - if isPull { - accessMode = models.AccessModeRead - } else { - accessMode = models.AccessModeWrite - } - - isWiki := false - var unitType = models.UnitTypeCode - if strings.HasSuffix(reponame, ".wiki") { - isWiki = true - unitType = models.UnitTypeWiki - reponame = reponame[:len(reponame)-5] - } - - owner, err := models.GetUserByName(username) - if err != nil { - log.Error("Attempted access of unknown user from %s", ctx.RemoteAddr()) - ctx.NotFoundOrServerError("GetUserByName", models.IsErrUserNotExist, err) - return - } - if !owner.IsOrganization() && !owner.IsActive { - ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.") - return - } - - repoExist := true - repo, err := models.GetRepositoryByName(owner.ID, reponame) - if err != nil { - if models.IsErrRepoNotExist(err) { - if redirectRepoID, err := models.LookupRepoRedirect(owner.ID, reponame); err == nil { - context.RedirectToRepo(ctx, redirectRepoID) - return - } - repoExist = false - } else { - ctx.ServerError("GetRepositoryByName", err) - return - } - } - - // Don't allow pushing if the repo is archived - if repoExist && repo.IsArchived && !isPull { - ctx.HandleText(http.StatusForbidden, "This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.") - return - } - - // Only public pull don't need auth. - isPublicPull := repoExist && !repo.IsPrivate && isPull - var ( - askAuth = !isPublicPull || setting.Service.RequireSignInView - authUser *models.User - authUsername string - authPasswd string - environ []string - ) - - // don't allow anonymous pulls if organization is not public - if isPublicPull { - if err := repo.GetOwner(); err != nil { - ctx.ServerError("GetOwner", err) - return - } - - askAuth = askAuth || (repo.Owner.Visibility != structs.VisibleTypePublic) - } - - // check access - if askAuth { - authUsername = ctx.Req.Header.Get(setting.ReverseProxyAuthUser) - if setting.Service.EnableReverseProxyAuth && len(authUsername) > 0 { - authUser, err = models.GetUserByName(authUsername) - if err != nil { - ctx.HandleText(401, "reverse proxy login error, got error while running GetUserByName") - return - } - } else { - authHead := ctx.Req.Header.Get("Authorization") - if len(authHead) == 0 { - ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=\".\"") - ctx.Error(http.StatusUnauthorized) - return - } - - auths := strings.Fields(authHead) - // currently check basic auth - // TODO: support digit auth - // FIXME: middlewares/context.go did basic auth check already, - // maybe could use that one. - if len(auths) != 2 || auths[0] != "Basic" { - ctx.HandleText(http.StatusUnauthorized, "no basic auth and digit auth") - return - } - authUsername, authPasswd, err = base.BasicAuthDecode(auths[1]) - if err != nil { - ctx.HandleText(http.StatusUnauthorized, "no basic auth and digit auth") - return - } - - // Check if username or password is a token - isUsernameToken := len(authPasswd) == 0 || authPasswd == "x-oauth-basic" - // Assume username is token - authToken := authUsername - if !isUsernameToken { - // Assume password is token - authToken = authPasswd - } - uid := sso.CheckOAuthAccessToken(authToken) - if uid != 0 { - ctx.Data["IsApiToken"] = true - - authUser, err = models.GetUserByID(uid) - if err != nil { - ctx.ServerError("GetUserByID", err) - return - } - } - // Assume password is a token. - token, err := models.GetAccessTokenBySHA(authToken) - if err == nil { - authUser, err = models.GetUserByID(token.UID) - if err != nil { - ctx.ServerError("GetUserByID", err) - return - } - - token.UpdatedUnix = timeutil.TimeStampNow() - if err = models.UpdateAccessToken(token); err != nil { - ctx.ServerError("UpdateAccessToken", err) - } - } else if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) { - log.Error("GetAccessTokenBySha: %v", err) - } - - if authUser == nil { - // Check username and password - authUser, err = models.UserSignIn(authUsername, authPasswd) - if err != nil { - if models.IsErrUserProhibitLogin(err) { - ctx.HandleText(http.StatusForbidden, "User is not permitted to login") - return - } else if !models.IsErrUserNotExist(err) { - ctx.ServerError("UserSignIn error: %v", err) - return - } - } - - if authUser == nil { - ctx.HandleText(http.StatusUnauthorized, fmt.Sprintf("invalid credentials from %s", ctx.RemoteAddr())) - return - } - - _, err = models.GetTwoFactorByUID(authUser.ID) - if err == nil { - // TODO: This response should be changed to "invalid credentials" for security reasons once the expectation behind it (creating an app token to authenticate) is properly documented - ctx.HandleText(http.StatusUnauthorized, "Users with two-factor authentication enabled cannot perform HTTP/HTTPS operations via plain username and password. Please create and use a personal access token on the user settings page") - return - } else if !models.IsErrTwoFactorNotEnrolled(err) { - ctx.ServerError("IsErrTwoFactorNotEnrolled", err) - return - } - } - } - - if !authUser.IsActive || authUser.ProhibitLogin { - ctx.HandleText(http.StatusForbidden, "Your account is disabled.") - return - } - - if repoExist { - perm, err := models.GetUserRepoPermission(repo, authUser) - if err != nil { - ctx.ServerError("GetUserRepoPermission", err) - return - } - - if !perm.CanAccess(accessMode, unitType) { - ctx.HandleText(http.StatusForbidden, "User permission denied") - return - } - - if !isPull && repo.IsMirror { - ctx.HandleText(http.StatusForbidden, "mirror repository is read-only") - return - } - } - - environ = []string{ - models.EnvRepoUsername + "=" + username, - models.EnvRepoName + "=" + reponame, - models.EnvPusherName + "=" + authUser.Name, - models.EnvPusherID + fmt.Sprintf("=%d", authUser.ID), - models.EnvIsDeployKey + "=false", - models.EnvAppURL + "=" + setting.AppURL, - } - - if !authUser.KeepEmailPrivate { - environ = append(environ, models.EnvPusherEmail+"="+authUser.Email) - } - - if isWiki { - environ = append(environ, models.EnvRepoIsWiki+"=true") - } else { - environ = append(environ, models.EnvRepoIsWiki+"=false") - } - } - - if !repoExist { - if !receivePack { - ctx.HandleText(http.StatusNotFound, "Repository not found") - return - } - - if owner.IsOrganization() && !setting.Repository.EnablePushCreateOrg { - ctx.HandleText(http.StatusForbidden, "Push to create is not enabled for organizations.") - return - } - if !owner.IsOrganization() && !setting.Repository.EnablePushCreateUser { - ctx.HandleText(http.StatusForbidden, "Push to create is not enabled for users.") - return - } - - // Return dummy payload if GET receive-pack - if ctx.Req.Method == http.MethodGet { - dummyInfoRefs(ctx) - return - } - - repo, err = repo_service.PushCreateRepo(authUser, owner, reponame) - if err != nil { - log.Error("pushCreateRepo: %v", err) - ctx.Status(http.StatusNotFound) - return - } - } - - if isWiki { - // Ensure the wiki is enabled before we allow access to it - if _, err := repo.GetUnit(models.UnitTypeWiki); err != nil { - if models.IsErrUnitTypeNotExist(err) { - ctx.HandleText(http.StatusForbidden, "repository wiki is disabled") - return - } - log.Error("Failed to get the wiki unit in %-v Error: %v", repo, err) - ctx.ServerError("GetUnit(UnitTypeWiki) for "+repo.FullName(), err) - return - } - } - - environ = append(environ, models.EnvRepoID+fmt.Sprintf("=%d", repo.ID)) - - w := ctx.Resp - r := ctx.Req.Request - cfg := &serviceConfig{ - UploadPack: true, - ReceivePack: true, - Env: environ, - } - - r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name - - for _, route := range routes { - if m := route.reg.FindStringSubmatch(r.URL.Path); m != nil { - if setting.Repository.DisableHTTPGit { - w.WriteHeader(http.StatusForbidden) - _, err := w.Write([]byte("Interacting with repositories by HTTP protocol is not allowed")) - if err != nil { - log.Error(err.Error()) - } - return - } - if route.method != r.Method { - if r.Proto == "HTTP/1.1" { - w.WriteHeader(http.StatusMethodNotAllowed) - _, err := w.Write([]byte("Method Not Allowed")) - if err != nil { - log.Error(err.Error()) - } - } else { - w.WriteHeader(http.StatusBadRequest) - _, err := w.Write([]byte("Bad Request")) - if err != nil { - log.Error(err.Error()) - } - } - return - } - - file := strings.Replace(r.URL.Path, m[1]+"/", "", 1) - dir, err := getGitRepoPath(m[1]) - if err != nil { - log.Error(err.Error()) - ctx.NotFound("Smart Git HTTP", err) - return - } - - route.handler(serviceHandler{cfg, w, r, dir, file, cfg.Env}) - return - } - } - - ctx.NotFound("Smart Git HTTP", nil) -} - -var ( - infoRefsCache []byte - infoRefsOnce sync.Once -) - -func dummyInfoRefs(ctx *context.Context) { - infoRefsOnce.Do(func() { - tmpDir, err := ioutil.TempDir(os.TempDir(), "gitea-info-refs-cache") - if err != nil { - log.Error("Failed to create temp dir for git-receive-pack cache: %v", err) - return - } - - defer func() { - if err := util.RemoveAll(tmpDir); err != nil { - log.Error("RemoveAll: %v", err) - } - }() - - if err := git.InitRepository(tmpDir, true); err != nil { - log.Error("Failed to init bare repo for git-receive-pack cache: %v", err) - return - } - - refs, err := git.NewCommand("receive-pack", "--stateless-rpc", "--advertise-refs", ".").RunInDirBytes(tmpDir) - if err != nil { - log.Error(fmt.Sprintf("%v - %s", err, string(refs))) - } - - log.Debug("populating infoRefsCache: \n%s", string(refs)) - infoRefsCache = refs - }) - - ctx.Header().Set("Expires", "Fri, 01 Jan 1980 00:00:00 GMT") - ctx.Header().Set("Pragma", "no-cache") - ctx.Header().Set("Cache-Control", "no-cache, max-age=0, must-revalidate") - ctx.Header().Set("Content-Type", "application/x-git-receive-pack-advertisement") - _, _ = ctx.Write(packetWrite("# service=git-receive-pack\n")) - _, _ = ctx.Write([]byte("0000")) - _, _ = ctx.Write(infoRefsCache) -} - -type serviceConfig struct { - UploadPack bool - ReceivePack bool - Env []string -} - -type serviceHandler struct { - cfg *serviceConfig - w http.ResponseWriter - r *http.Request - dir string - file string - environ []string -} - -func (h *serviceHandler) setHeaderNoCache() { - h.w.Header().Set("Expires", "Fri, 01 Jan 1980 00:00:00 GMT") - h.w.Header().Set("Pragma", "no-cache") - h.w.Header().Set("Cache-Control", "no-cache, max-age=0, must-revalidate") -} - -func (h *serviceHandler) setHeaderCacheForever() { - now := time.Now().Unix() - expires := now + 31536000 - h.w.Header().Set("Date", fmt.Sprintf("%d", now)) - h.w.Header().Set("Expires", fmt.Sprintf("%d", expires)) - h.w.Header().Set("Cache-Control", "public, max-age=31536000") -} - -func (h *serviceHandler) sendFile(contentType string) { - reqFile := path.Join(h.dir, h.file) - - fi, err := os.Stat(reqFile) - if os.IsNotExist(err) { - h.w.WriteHeader(http.StatusNotFound) - return - } - - h.w.Header().Set("Content-Type", contentType) - h.w.Header().Set("Content-Length", fmt.Sprintf("%d", fi.Size())) - h.w.Header().Set("Last-Modified", fi.ModTime().Format(http.TimeFormat)) - http.ServeFile(h.w, h.r, reqFile) -} - -type route struct { - reg *regexp.Regexp - method string - handler func(serviceHandler) -} - -var routes = []route{ - {regexp.MustCompile(`(.*?)/git-upload-pack$`), "POST", serviceUploadPack}, - {regexp.MustCompile(`(.*?)/git-receive-pack$`), "POST", serviceReceivePack}, - {regexp.MustCompile(`(.*?)/info/refs$`), "GET", getInfoRefs}, - {regexp.MustCompile(`(.*?)/HEAD$`), "GET", getTextFile}, - {regexp.MustCompile(`(.*?)/objects/info/alternates$`), "GET", getTextFile}, - {regexp.MustCompile(`(.*?)/objects/info/http-alternates$`), "GET", getTextFile}, - {regexp.MustCompile(`(.*?)/objects/info/packs$`), "GET", getInfoPacks}, - {regexp.MustCompile(`(.*?)/objects/info/[^/]*$`), "GET", getTextFile}, - {regexp.MustCompile(`(.*?)/objects/[0-9a-f]{2}/[0-9a-f]{38}$`), "GET", getLooseObject}, - {regexp.MustCompile(`(.*?)/objects/pack/pack-[0-9a-f]{40}\.pack$`), "GET", getPackFile}, - {regexp.MustCompile(`(.*?)/objects/pack/pack-[0-9a-f]{40}\.idx$`), "GET", getIdxFile}, -} - -// one or more key=value pairs separated by colons -var safeGitProtocolHeader = regexp.MustCompile(`^[0-9a-zA-Z]+=[0-9a-zA-Z]+(:[0-9a-zA-Z]+=[0-9a-zA-Z]+)*$`) - -func getGitConfig(option, dir string) string { - out, err := git.NewCommand("config", option).RunInDir(dir) - if err != nil { - log.Error("%v - %s", err, out) - } - return out[0 : len(out)-1] -} - -func getConfigSetting(service, dir string) bool { - service = strings.ReplaceAll(service, "-", "") - setting := getGitConfig("http."+service, dir) - - if service == "uploadpack" { - return setting != "false" - } - - return setting == "true" -} - -func hasAccess(service string, h serviceHandler, checkContentType bool) bool { - if checkContentType { - if h.r.Header.Get("Content-Type") != fmt.Sprintf("application/x-git-%s-request", service) { - return false - } - } - - if !(service == "upload-pack" || service == "receive-pack") { - return false - } - if service == "receive-pack" { - return h.cfg.ReceivePack - } - if service == "upload-pack" { - return h.cfg.UploadPack - } - - return getConfigSetting(service, h.dir) -} - -func serviceRPC(h serviceHandler, service string) { - defer func() { - if err := h.r.Body.Close(); err != nil { - log.Error("serviceRPC: Close: %v", err) - } - - }() - - if !hasAccess(service, h, true) { - h.w.WriteHeader(http.StatusUnauthorized) - return - } - - h.w.Header().Set("Content-Type", fmt.Sprintf("application/x-git-%s-result", service)) - - var err error - var reqBody = h.r.Body - - // Handle GZIP. - if h.r.Header.Get("Content-Encoding") == "gzip" { - reqBody, err = gzip.NewReader(reqBody) - if err != nil { - log.Error("Fail to create gzip reader: %v", err) - h.w.WriteHeader(http.StatusInternalServerError) - return - } - } - - // set this for allow pre-receive and post-receive execute - h.environ = append(h.environ, "SSH_ORIGINAL_COMMAND="+service) - - if protocol := h.r.Header.Get("Git-Protocol"); protocol != "" && safeGitProtocolHeader.MatchString(protocol) { - h.environ = append(h.environ, "GIT_PROTOCOL="+protocol) - } - - ctx, cancel := gocontext.WithCancel(git.DefaultContext) - defer cancel() - var stderr bytes.Buffer - cmd := exec.CommandContext(ctx, git.GitExecutable, service, "--stateless-rpc", h.dir) - cmd.Dir = h.dir - cmd.Env = append(os.Environ(), h.environ...) - cmd.Stdout = h.w - cmd.Stdin = reqBody - cmd.Stderr = &stderr - - pid := process.GetManager().Add(fmt.Sprintf("%s %s %s [repo_path: %s]", git.GitExecutable, service, "--stateless-rpc", h.dir), cancel) - defer process.GetManager().Remove(pid) - - if err := cmd.Run(); err != nil { - log.Error("Fail to serve RPC(%s) in %s: %v - %s", service, h.dir, err, stderr.String()) - return - } -} - -func serviceUploadPack(h serviceHandler) { - serviceRPC(h, "upload-pack") -} - -func serviceReceivePack(h serviceHandler) { - serviceRPC(h, "receive-pack") -} - -func getServiceType(r *http.Request) string { - serviceType := r.FormValue("service") - if !strings.HasPrefix(serviceType, "git-") { - return "" - } - return strings.Replace(serviceType, "git-", "", 1) -} - -func updateServerInfo(dir string) []byte { - out, err := git.NewCommand("update-server-info").RunInDirBytes(dir) - if err != nil { - log.Error(fmt.Sprintf("%v - %s", err, string(out))) - } - return out -} - -func packetWrite(str string) []byte { - s := strconv.FormatInt(int64(len(str)+4), 16) - if len(s)%4 != 0 { - s = strings.Repeat("0", 4-len(s)%4) + s - } - return []byte(s + str) -} - -func getInfoRefs(h serviceHandler) { - h.setHeaderNoCache() - if hasAccess(getServiceType(h.r), h, false) { - service := getServiceType(h.r) - - if protocol := h.r.Header.Get("Git-Protocol"); protocol != "" && safeGitProtocolHeader.MatchString(protocol) { - h.environ = append(h.environ, "GIT_PROTOCOL="+protocol) - } - h.environ = append(os.Environ(), h.environ...) - - refs, err := git.NewCommand(service, "--stateless-rpc", "--advertise-refs", ".").RunInDirTimeoutEnv(h.environ, -1, h.dir) - if err != nil { - log.Error(fmt.Sprintf("%v - %s", err, string(refs))) - } - - h.w.Header().Set("Content-Type", fmt.Sprintf("application/x-git-%s-advertisement", service)) - h.w.WriteHeader(http.StatusOK) - _, _ = h.w.Write(packetWrite("# service=git-" + service + "\n")) - _, _ = h.w.Write([]byte("0000")) - _, _ = h.w.Write(refs) - } else { - updateServerInfo(h.dir) - h.sendFile("text/plain; charset=utf-8") - } -} - -func getTextFile(h serviceHandler) { - h.setHeaderNoCache() - h.sendFile("text/plain") -} - -func getInfoPacks(h serviceHandler) { - h.setHeaderCacheForever() - h.sendFile("text/plain; charset=utf-8") -} - -func getLooseObject(h serviceHandler) { - h.setHeaderCacheForever() - h.sendFile("application/x-git-loose-object") -} - -func getPackFile(h serviceHandler) { - h.setHeaderCacheForever() - h.sendFile("application/x-git-packed-objects") -} - -func getIdxFile(h serviceHandler) { - h.setHeaderCacheForever() - h.sendFile("application/x-git-packed-objects-toc") -} - -func getGitRepoPath(subdir string) (string, error) { - if !strings.HasSuffix(subdir, ".git") { - subdir += ".git" - } - - fpath := path.Join(setting.RepoRootPath, subdir) - if _, err := os.Stat(fpath); os.IsNotExist(err) { - return "", err - } - - return fpath, nil -} diff --git a/routers/repo/issue.go b/routers/repo/issue.go deleted file mode 100644 index 1d8d9c036..000000000 --- a/routers/repo/issue.go +++ /dev/null @@ -1,2494 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "bytes" - "errors" - "fmt" - "io/ioutil" - "net/http" - "path" - "strconv" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/convert" - "code.gitea.io/gitea/modules/git" - issue_indexer "code.gitea.io/gitea/modules/indexer/issues" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/markup" - "code.gitea.io/gitea/modules/markup/markdown" - "code.gitea.io/gitea/modules/setting" - api "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/upload" - "code.gitea.io/gitea/modules/util" - comment_service "code.gitea.io/gitea/services/comments" - issue_service "code.gitea.io/gitea/services/issue" - pull_service "code.gitea.io/gitea/services/pull" - - "github.com/unknwon/com" -) - -const ( - tplAttachment base.TplName = "repo/issue/view_content/attachments" - - tplIssues base.TplName = "repo/issue/list" - tplIssueNew base.TplName = "repo/issue/new" - tplIssueChoose base.TplName = "repo/issue/choose" - tplIssueView base.TplName = "repo/issue/view" - - tplReactions base.TplName = "repo/issue/view_content/reactions" - - issueTemplateKey = "IssueTemplate" - issueTemplateTitleKey = "IssueTemplateTitle" -) - -var ( - // ErrTooManyFiles upload too many files - ErrTooManyFiles = errors.New("Maximum number of files to upload exceeded") - // IssueTemplateCandidates issue templates - IssueTemplateCandidates = []string{ - "ISSUE_TEMPLATE.md", - "issue_template.md", - ".gitea/ISSUE_TEMPLATE.md", - ".gitea/issue_template.md", - ".github/ISSUE_TEMPLATE.md", - ".github/issue_template.md", - } -) - -// MustAllowUserComment checks to make sure if an issue is locked. -// If locked and user has permissions to write to the repository, -// then the comment is allowed, else it is blocked -func MustAllowUserComment(ctx *context.Context) { - issue := GetActionIssue(ctx) - if ctx.Written() { - return - } - - if issue.IsLocked && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) && !ctx.User.IsAdmin { - ctx.Flash.Error(ctx.Tr("repo.issues.comment_on_locked")) - ctx.Redirect(issue.HTMLURL()) - return - } -} - -// MustEnableIssues check if repository enable internal issues -func MustEnableIssues(ctx *context.Context) { - if !ctx.Repo.CanRead(models.UnitTypeIssues) && - !ctx.Repo.CanRead(models.UnitTypeExternalTracker) { - ctx.NotFound("MustEnableIssues", nil) - return - } - - unit, err := ctx.Repo.Repository.GetUnit(models.UnitTypeExternalTracker) - if err == nil { - ctx.Redirect(unit.ExternalTrackerConfig().ExternalTrackerURL) - return - } -} - -// MustAllowPulls check if repository enable pull requests and user have right to do that -func MustAllowPulls(ctx *context.Context) { - if !ctx.Repo.Repository.CanEnablePulls() || !ctx.Repo.CanRead(models.UnitTypePullRequests) { - ctx.NotFound("MustAllowPulls", nil) - return - } - - // User can send pull request if owns a forked repository. - if ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID) { - ctx.Repo.PullRequest.Allowed = true - ctx.Repo.PullRequest.HeadInfo = ctx.User.Name + ":" + ctx.Repo.BranchName - } -} - -func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption util.OptionalBool) { - var err error - viewType := ctx.Query("type") - sortType := ctx.Query("sort") - types := []string{"all", "your_repositories", "assigned", "created_by", "mentioned"} - if !util.IsStringInSlice(viewType, types, true) { - viewType = "all" - } - - var ( - assigneeID = ctx.QueryInt64("assignee") - posterID int64 - mentionedID int64 - forceEmpty bool - ) - - if ctx.IsSigned { - switch viewType { - case "created_by": - posterID = ctx.User.ID - case "mentioned": - mentionedID = ctx.User.ID - case "assigned": - assigneeID = ctx.User.ID - } - } - - repo := ctx.Repo.Repository - var labelIDs []int64 - selectLabels := ctx.Query("labels") - if len(selectLabels) > 0 && selectLabels != "0" { - labelIDs, err = base.StringsToInt64s(strings.Split(selectLabels, ",")) - if err != nil { - ctx.ServerError("StringsToInt64s", err) - return - } - } - - keyword := strings.Trim(ctx.Query("q"), " ") - if bytes.Contains([]byte(keyword), []byte{0x00}) { - keyword = "" - } - - var issueIDs []int64 - if len(keyword) > 0 { - issueIDs, err = issue_indexer.SearchIssuesByKeyword([]int64{repo.ID}, keyword) - if err != nil { - ctx.ServerError("issueIndexer.Search", err) - return - } - if len(issueIDs) == 0 { - forceEmpty = true - } - } - - var issueStats *models.IssueStats - if forceEmpty { - issueStats = &models.IssueStats{} - } else { - issueStats, err = models.GetIssueStats(&models.IssueStatsOptions{ - RepoID: repo.ID, - Labels: selectLabels, - MilestoneID: milestoneID, - AssigneeID: assigneeID, - MentionedID: mentionedID, - PosterID: posterID, - IsPull: isPullOption, - IssueIDs: issueIDs, - }) - if err != nil { - ctx.ServerError("GetIssueStats", err) - return - } - } - - isShowClosed := ctx.Query("state") == "closed" - // if open issues are zero and close don't, use closed as default - if len(ctx.Query("state")) == 0 && issueStats.OpenCount == 0 && issueStats.ClosedCount != 0 { - isShowClosed = true - } - - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - - var total int - if !isShowClosed { - total = int(issueStats.OpenCount) - } else { - total = int(issueStats.ClosedCount) - } - pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5) - - var mileIDs []int64 - if milestoneID > 0 { - mileIDs = []int64{milestoneID} - } - - var issues []*models.Issue - if forceEmpty { - issues = []*models.Issue{} - } else { - issues, err = models.Issues(&models.IssuesOptions{ - ListOptions: models.ListOptions{ - Page: pager.Paginater.Current(), - PageSize: setting.UI.IssuePagingNum, - }, - RepoIDs: []int64{repo.ID}, - AssigneeID: assigneeID, - PosterID: posterID, - MentionedID: mentionedID, - MilestoneIDs: mileIDs, - ProjectID: projectID, - IsClosed: util.OptionalBoolOf(isShowClosed), - IsPull: isPullOption, - LabelIDs: labelIDs, - SortType: sortType, - IssueIDs: issueIDs, - }) - if err != nil { - ctx.ServerError("Issues", err) - return - } - } - - approvalCounts, err := models.IssueList(issues).GetApprovalCounts() - if err != nil { - ctx.ServerError("ApprovalCounts", err) - return - } - - var commitStatus = make(map[int64]*models.CommitStatus, len(issues)) - - // Get posters. - for i := range issues { - // Check read status - if !ctx.IsSigned { - issues[i].IsRead = true - } else if err = issues[i].GetIsRead(ctx.User.ID); err != nil { - ctx.ServerError("GetIsRead", err) - return - } - - if issues[i].IsPull { - if err := issues[i].LoadPullRequest(); err != nil { - ctx.ServerError("LoadPullRequest", err) - return - } - - var statuses, _ = pull_service.GetLastCommitStatus(issues[i].PullRequest) - commitStatus[issues[i].PullRequest.ID] = models.CalcCommitStatus(statuses) - } - } - - ctx.Data["Issues"] = issues - ctx.Data["CommitStatus"] = commitStatus - - // Get assignees. - ctx.Data["Assignees"], err = repo.GetAssignees() - if err != nil { - ctx.ServerError("GetAssignees", err) - return - } - - handleTeamMentions(ctx) - if ctx.Written() { - return - } - - labels, err := models.GetLabelsByRepoID(repo.ID, "", models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLabelsByRepoID", err) - return - } - - if repo.Owner.IsOrganization() { - orgLabels, err := models.GetLabelsByOrgID(repo.Owner.ID, ctx.Query("sort"), models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLabelsByOrgID", err) - return - } - - ctx.Data["OrgLabels"] = orgLabels - labels = append(labels, orgLabels...) - } - - for _, l := range labels { - l.LoadSelectedLabelsAfterClick(labelIDs) - } - ctx.Data["Labels"] = labels - ctx.Data["NumLabels"] = len(labels) - - if ctx.QueryInt64("assignee") == 0 { - assigneeID = 0 // Reset ID to prevent unexpected selection of assignee. - } - - ctx.Data["IssueRefEndNames"], ctx.Data["IssueRefURLs"] = - issue_service.GetRefEndNamesAndURLs(issues, ctx.Repo.RepoLink) - - ctx.Data["ApprovalCounts"] = func(issueID int64, typ string) int64 { - counts, ok := approvalCounts[issueID] - if !ok || len(counts) == 0 { - return 0 - } - reviewTyp := models.ReviewTypeApprove - if typ == "reject" { - reviewTyp = models.ReviewTypeReject - } else if typ == "waiting" { - reviewTyp = models.ReviewTypeRequest - } - for _, count := range counts { - if count.Type == reviewTyp { - return count.Count - } - } - return 0 - } - ctx.Data["IssueStats"] = issueStats - ctx.Data["SelLabelIDs"] = labelIDs - ctx.Data["SelectLabels"] = selectLabels - ctx.Data["ViewType"] = viewType - ctx.Data["SortType"] = sortType - ctx.Data["MilestoneID"] = milestoneID - ctx.Data["AssigneeID"] = assigneeID - ctx.Data["IsShowClosed"] = isShowClosed - ctx.Data["Keyword"] = keyword - if isShowClosed { - ctx.Data["State"] = "closed" - } else { - ctx.Data["State"] = "open" - } - - pager.AddParam(ctx, "q", "Keyword") - pager.AddParam(ctx, "type", "ViewType") - pager.AddParam(ctx, "sort", "SortType") - pager.AddParam(ctx, "state", "State") - pager.AddParam(ctx, "labels", "SelectLabels") - pager.AddParam(ctx, "milestone", "MilestoneID") - pager.AddParam(ctx, "assignee", "AssigneeID") - ctx.Data["Page"] = pager -} - -// Issues render issues page -func Issues(ctx *context.Context) { - isPullList := ctx.Params(":type") == "pulls" - if isPullList { - MustAllowPulls(ctx) - if ctx.Written() { - return - } - ctx.Data["Title"] = ctx.Tr("repo.pulls") - ctx.Data["PageIsPullList"] = true - } else { - MustEnableIssues(ctx) - if ctx.Written() { - return - } - ctx.Data["Title"] = ctx.Tr("repo.issues") - ctx.Data["PageIsIssueList"] = true - ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 - } - - issues(ctx, ctx.QueryInt64("milestone"), ctx.QueryInt64("project"), util.OptionalBoolOf(isPullList)) - - var err error - // Get milestones - ctx.Data["Milestones"], err = models.GetMilestones(models.GetMilestonesOption{ - RepoID: ctx.Repo.Repository.ID, - State: api.StateType(ctx.Query("state")), - }) - if err != nil { - ctx.ServerError("GetAllRepoMilestones", err) - return - } - - ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList) - - ctx.HTML(200, tplIssues) -} - -// RetrieveRepoMilestonesAndAssignees find all the milestones and assignees of a repository -func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository) { - var err error - ctx.Data["OpenMilestones"], err = models.GetMilestones(models.GetMilestonesOption{ - RepoID: repo.ID, - State: api.StateOpen, - }) - if err != nil { - ctx.ServerError("GetMilestones", err) - return - } - ctx.Data["ClosedMilestones"], err = models.GetMilestones(models.GetMilestonesOption{ - RepoID: repo.ID, - State: api.StateClosed, - }) - if err != nil { - ctx.ServerError("GetMilestones", err) - return - } - - ctx.Data["Assignees"], err = repo.GetAssignees() - if err != nil { - ctx.ServerError("GetAssignees", err) - return - } - - handleTeamMentions(ctx) - if ctx.Written() { - return - } -} - -func retrieveProjects(ctx *context.Context, repo *models.Repository) { - - var err error - - ctx.Data["OpenProjects"], _, err = models.GetProjects(models.ProjectSearchOptions{ - RepoID: repo.ID, - Page: -1, - IsClosed: util.OptionalBoolFalse, - Type: models.ProjectTypeRepository, - }) - if err != nil { - ctx.ServerError("GetProjects", err) - return - } - - ctx.Data["ClosedProjects"], _, err = models.GetProjects(models.ProjectSearchOptions{ - RepoID: repo.ID, - Page: -1, - IsClosed: util.OptionalBoolTrue, - Type: models.ProjectTypeRepository, - }) - if err != nil { - ctx.ServerError("GetProjects", err) - return - } -} - -// repoReviewerSelection items to bee shown -type repoReviewerSelection struct { - IsTeam bool - Team *models.Team - User *models.User - Review *models.Review - CanChange bool - Checked bool - ItemID int64 -} - -// RetrieveRepoReviewers find all reviewers of a repository -func RetrieveRepoReviewers(ctx *context.Context, repo *models.Repository, issue *models.Issue, canChooseReviewer bool) { - ctx.Data["CanChooseReviewer"] = canChooseReviewer - - originalAuthorReviews, err := models.GetReviewersFromOriginalAuthorsByIssueID(issue.ID) - if err != nil { - ctx.ServerError("GetReviewersFromOriginalAuthorsByIssueID", err) - return - } - ctx.Data["OriginalReviews"] = originalAuthorReviews - - reviews, err := models.GetReviewersByIssueID(issue.ID) - if err != nil { - ctx.ServerError("GetReviewersByIssueID", err) - return - } - - if len(reviews) == 0 && !canChooseReviewer { - return - } - - var ( - pullReviews []*repoReviewerSelection - reviewersResult []*repoReviewerSelection - teamReviewersResult []*repoReviewerSelection - teamReviewers []*models.Team - reviewers []*models.User - ) - - if canChooseReviewer { - posterID := issue.PosterID - if issue.OriginalAuthorID > 0 { - posterID = 0 - } - - reviewers, err = repo.GetReviewers(ctx.User.ID, posterID) - if err != nil { - ctx.ServerError("GetReviewers", err) - return - } - - teamReviewers, err = repo.GetReviewerTeams() - if err != nil { - ctx.ServerError("GetReviewerTeams", err) - return - } - - if len(reviewers) > 0 { - reviewersResult = make([]*repoReviewerSelection, 0, len(reviewers)) - } - - if len(teamReviewers) > 0 { - teamReviewersResult = make([]*repoReviewerSelection, 0, len(teamReviewers)) - } - } - - pullReviews = make([]*repoReviewerSelection, 0, len(reviews)) - - for _, review := range reviews { - tmp := &repoReviewerSelection{ - Checked: review.Type == models.ReviewTypeRequest, - Review: review, - ItemID: review.ReviewerID, - } - if review.ReviewerTeamID > 0 { - tmp.IsTeam = true - tmp.ItemID = -review.ReviewerTeamID - } - - if ctx.Repo.IsAdmin() { - // Admin can dismiss or re-request any review requests - tmp.CanChange = true - } else if ctx.User != nil && ctx.User.ID == review.ReviewerID && review.Type == models.ReviewTypeRequest { - // A user can refuse review requests - tmp.CanChange = true - } else if (canChooseReviewer || (ctx.User != nil && ctx.User.ID == issue.PosterID)) && review.Type != models.ReviewTypeRequest && - ctx.User.ID != review.ReviewerID { - // The poster of the PR, a manager, or official reviewers can re-request review from other reviewers - tmp.CanChange = true - } - - pullReviews = append(pullReviews, tmp) - - if canChooseReviewer { - if tmp.IsTeam { - teamReviewersResult = append(teamReviewersResult, tmp) - } else { - reviewersResult = append(reviewersResult, tmp) - } - } - } - - if len(pullReviews) > 0 { - // Drop all non-existing users and teams from the reviews - currentPullReviewers := make([]*repoReviewerSelection, 0, len(pullReviews)) - for _, item := range pullReviews { - if item.Review.ReviewerID > 0 { - if err = item.Review.LoadReviewer(); err != nil { - if models.IsErrUserNotExist(err) { - continue - } - ctx.ServerError("LoadReviewer", err) - return - } - item.User = item.Review.Reviewer - } else if item.Review.ReviewerTeamID > 0 { - if err = item.Review.LoadReviewerTeam(); err != nil { - if models.IsErrTeamNotExist(err) { - continue - } - ctx.ServerError("LoadReviewerTeam", err) - return - } - item.Team = item.Review.ReviewerTeam - } else { - continue - } - - currentPullReviewers = append(currentPullReviewers, item) - } - ctx.Data["PullReviewers"] = currentPullReviewers - } - - if canChooseReviewer && reviewersResult != nil { - preadded := len(reviewersResult) - for _, reviewer := range reviewers { - found := false - reviewAddLoop: - for _, tmp := range reviewersResult[:preadded] { - if tmp.ItemID == reviewer.ID { - tmp.User = reviewer - found = true - break reviewAddLoop - } - } - - if found { - continue - } - - reviewersResult = append(reviewersResult, &repoReviewerSelection{ - IsTeam: false, - CanChange: true, - User: reviewer, - ItemID: reviewer.ID, - }) - } - - ctx.Data["Reviewers"] = reviewersResult - } - - if canChooseReviewer && teamReviewersResult != nil { - preadded := len(teamReviewersResult) - for _, team := range teamReviewers { - found := false - teamReviewAddLoop: - for _, tmp := range teamReviewersResult[:preadded] { - if tmp.ItemID == -team.ID { - tmp.Team = team - found = true - break teamReviewAddLoop - } - } - - if found { - continue - } - - teamReviewersResult = append(teamReviewersResult, &repoReviewerSelection{ - IsTeam: true, - CanChange: true, - Team: team, - ItemID: -team.ID, - }) - } - - ctx.Data["TeamReviewers"] = teamReviewersResult - } -} - -// RetrieveRepoMetas find all the meta information of a repository -func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository, isPull bool) []*models.Label { - if !ctx.Repo.CanWriteIssuesOrPulls(isPull) { - return nil - } - - labels, err := models.GetLabelsByRepoID(repo.ID, "", models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLabelsByRepoID", err) - return nil - } - ctx.Data["Labels"] = labels - if repo.Owner.IsOrganization() { - orgLabels, err := models.GetLabelsByOrgID(repo.Owner.ID, ctx.Query("sort"), models.ListOptions{}) - if err != nil { - return nil - } - - ctx.Data["OrgLabels"] = orgLabels - labels = append(labels, orgLabels...) - } - - RetrieveRepoMilestonesAndAssignees(ctx, repo) - if ctx.Written() { - return nil - } - - retrieveProjects(ctx, repo) - if ctx.Written() { - return nil - } - - brs, err := ctx.Repo.GitRepo.GetBranches() - if err != nil { - ctx.ServerError("GetBranches", err) - return nil - } - ctx.Data["Branches"] = brs - - // Contains true if the user can create issue dependencies - ctx.Data["CanCreateIssueDependencies"] = ctx.Repo.CanCreateIssueDependencies(ctx.User, isPull) - - return labels -} - -func getFileContentFromDefaultBranch(ctx *context.Context, filename string) (string, bool) { - var bytes []byte - - if ctx.Repo.Commit == nil { - var err error - ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) - if err != nil { - return "", false - } - } - - entry, err := ctx.Repo.Commit.GetTreeEntryByPath(filename) - if err != nil { - return "", false - } - if entry.Blob().Size() >= setting.UI.MaxDisplayFileSize { - return "", false - } - r, err := entry.Blob().DataAsync() - if err != nil { - return "", false - } - defer r.Close() - bytes, err = ioutil.ReadAll(r) - if err != nil { - return "", false - } - return string(bytes), true -} - -func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleDirs []string, possibleFiles []string) { - templateCandidates := make([]string, 0, len(possibleFiles)) - if ctx.Query("template") != "" { - for _, dirName := range possibleDirs { - templateCandidates = append(templateCandidates, path.Join(dirName, ctx.Query("template"))) - } - } - templateCandidates = append(templateCandidates, possibleFiles...) // Append files to the end because they should be fallback - for _, filename := range templateCandidates { - templateContent, found := getFileContentFromDefaultBranch(ctx, filename) - if found { - var meta api.IssueTemplate - templateBody, err := markdown.ExtractMetadata(templateContent, &meta) - if err != nil { - log.Debug("could not extract metadata from %s [%s]: %v", filename, ctx.Repo.Repository.FullName(), err) - ctx.Data[ctxDataKey] = templateContent - return - } - ctx.Data[issueTemplateTitleKey] = meta.Title - ctx.Data[ctxDataKey] = templateBody - labelIDs := make([]string, 0, len(meta.Labels)) - if repoLabels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID, "", models.ListOptions{}); err == nil { - for _, metaLabel := range meta.Labels { - for _, repoLabel := range repoLabels { - if strings.EqualFold(repoLabel.Name, metaLabel) { - repoLabel.IsChecked = true - labelIDs = append(labelIDs, fmt.Sprintf("%d", repoLabel.ID)) - break - } - } - } - ctx.Data["Labels"] = repoLabels - } - ctx.Data["HasSelectedLabel"] = len(labelIDs) > 0 - ctx.Data["label_ids"] = strings.Join(labelIDs, ",") - return - } - } -} - -// NewIssue render creating issue page -func NewIssue(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.issues.new") - ctx.Data["PageIsIssueList"] = true - ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 - ctx.Data["RequireHighlightJS"] = true - ctx.Data["RequireSimpleMDE"] = true - ctx.Data["RequireTribute"] = true - ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes - title := ctx.Query("title") - ctx.Data["TitleQuery"] = title - body := ctx.Query("body") - ctx.Data["BodyQuery"] = body - ctx.Data["IsProjectsEnabled"] = ctx.Repo.CanRead(models.UnitTypeProjects) - ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled - upload.AddUploadContext(ctx, "comment") - - milestoneID := ctx.QueryInt64("milestone") - if milestoneID > 0 { - milestone, err := models.GetMilestoneByID(milestoneID) - if err != nil { - log.Error("GetMilestoneByID: %d: %v", milestoneID, err) - } else { - ctx.Data["milestone_id"] = milestoneID - ctx.Data["Milestone"] = milestone - } - } - - projectID := ctx.QueryInt64("project") - if projectID > 0 { - project, err := models.GetProjectByID(projectID) - if err != nil { - log.Error("GetProjectByID: %d: %v", projectID, err) - } else if project.RepoID != ctx.Repo.Repository.ID { - log.Error("GetProjectByID: %d: %v", projectID, fmt.Errorf("project[%d] not in repo [%d]", project.ID, ctx.Repo.Repository.ID)) - } else { - ctx.Data["project_id"] = projectID - ctx.Data["Project"] = project - } - - } - - RetrieveRepoMetas(ctx, ctx.Repo.Repository, false) - setTemplateIfExists(ctx, issueTemplateKey, context.IssueTemplateDirCandidates, IssueTemplateCandidates) - if ctx.Written() { - return - } - - ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypeIssues) - - ctx.HTML(200, tplIssueNew) -} - -// NewIssueChooseTemplate render creating issue from template page -func NewIssueChooseTemplate(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.issues.new") - ctx.Data["PageIsIssueList"] = true - ctx.Data["milestone"] = ctx.QueryInt64("milestone") - - issueTemplates := ctx.IssueTemplatesFromDefaultBranch() - ctx.Data["NewIssueChooseTemplate"] = len(issueTemplates) > 0 - ctx.Data["IssueTemplates"] = issueTemplates - - ctx.HTML(200, tplIssueChoose) -} - -// ValidateRepoMetas check and returns repository's meta informations -func ValidateRepoMetas(ctx *context.Context, form auth.CreateIssueForm, isPull bool) ([]int64, []int64, int64, int64) { - var ( - repo = ctx.Repo.Repository - err error - ) - - labels := RetrieveRepoMetas(ctx, ctx.Repo.Repository, isPull) - if ctx.Written() { - return nil, nil, 0, 0 - } - - var labelIDs []int64 - hasSelected := false - // Check labels. - if len(form.LabelIDs) > 0 { - labelIDs, err = base.StringsToInt64s(strings.Split(form.LabelIDs, ",")) - if err != nil { - return nil, nil, 0, 0 - } - labelIDMark := base.Int64sToMap(labelIDs) - - for i := range labels { - if labelIDMark[labels[i].ID] { - labels[i].IsChecked = true - hasSelected = true - } - } - } - - ctx.Data["Labels"] = labels - ctx.Data["HasSelectedLabel"] = hasSelected - ctx.Data["label_ids"] = form.LabelIDs - - // Check milestone. - milestoneID := form.MilestoneID - if milestoneID > 0 { - ctx.Data["Milestone"], err = repo.GetMilestoneByID(milestoneID) - if err != nil { - ctx.ServerError("GetMilestoneByID", err) - return nil, nil, 0, 0 - } - ctx.Data["milestone_id"] = milestoneID - } - - if form.ProjectID > 0 { - p, err := models.GetProjectByID(form.ProjectID) - if err != nil { - ctx.ServerError("GetProjectByID", err) - return nil, nil, 0, 0 - } - if p.RepoID != ctx.Repo.Repository.ID { - ctx.NotFound("", nil) - return nil, nil, 0, 0 - } - - ctx.Data["Project"] = p - ctx.Data["project_id"] = form.ProjectID - } - - // Check assignees - var assigneeIDs []int64 - if len(form.AssigneeIDs) > 0 { - assigneeIDs, err = base.StringsToInt64s(strings.Split(form.AssigneeIDs, ",")) - if err != nil { - return nil, nil, 0, 0 - } - - // Check if the passed assignees actually exists and is assignable - for _, aID := range assigneeIDs { - assignee, err := models.GetUserByID(aID) - if err != nil { - ctx.ServerError("GetUserByID", err) - return nil, nil, 0, 0 - } - - valid, err := models.CanBeAssigned(assignee, repo, isPull) - if err != nil { - ctx.ServerError("CanBeAssigned", err) - return nil, nil, 0, 0 - } - - if !valid { - ctx.ServerError("canBeAssigned", models.ErrUserDoesNotHaveAccessToRepo{UserID: aID, RepoName: repo.Name}) - return nil, nil, 0, 0 - } - } - } - - // Keep the old assignee id thingy for compatibility reasons - if form.AssigneeID > 0 { - assigneeIDs = append(assigneeIDs, form.AssigneeID) - } - - return labelIDs, assigneeIDs, milestoneID, form.ProjectID -} - -// NewIssuePost response for creating new issue -func NewIssuePost(ctx *context.Context, form auth.CreateIssueForm) { - ctx.Data["Title"] = ctx.Tr("repo.issues.new") - ctx.Data["PageIsIssueList"] = true - ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 - ctx.Data["RequireHighlightJS"] = true - ctx.Data["RequireSimpleMDE"] = true - ctx.Data["ReadOnly"] = false - ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes - ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled - upload.AddUploadContext(ctx, "comment") - - var ( - repo = ctx.Repo.Repository - attachments []string - ) - - labelIDs, assigneeIDs, milestoneID, projectID := ValidateRepoMetas(ctx, form, false) - if ctx.Written() { - return - } - - if setting.Attachment.Enabled { - attachments = form.Files - } - - if ctx.HasError() { - ctx.HTML(200, tplIssueNew) - return - } - - if util.IsEmptyString(form.Title) { - ctx.RenderWithErr(ctx.Tr("repo.issues.new.title_empty"), tplIssueNew, form) - return - } - - issue := &models.Issue{ - RepoID: repo.ID, - Title: form.Title, - PosterID: ctx.User.ID, - Poster: ctx.User, - MilestoneID: milestoneID, - Content: form.Content, - Ref: form.Ref, - } - - if err := issue_service.NewIssue(repo, issue, labelIDs, attachments, assigneeIDs); err != nil { - if models.IsErrUserDoesNotHaveAccessToRepo(err) { - ctx.Error(400, "UserDoesNotHaveAccessToRepo", err.Error()) - return - } - ctx.ServerError("NewIssue", err) - return - } - - if projectID > 0 { - if err := models.ChangeProjectAssign(issue, ctx.User, projectID); err != nil { - ctx.ServerError("ChangeProjectAssign", err) - return - } - } - - log.Trace("Issue created: %d/%d", repo.ID, issue.ID) - ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + fmt.Sprint(issue.Index)) -} - -// commentTag returns the CommentTag for a comment in/with the given repo, poster and issue -func commentTag(repo *models.Repository, poster *models.User, issue *models.Issue) (models.CommentTag, error) { - perm, err := models.GetUserRepoPermission(repo, poster) - if err != nil { - return models.CommentTagNone, err - } - if perm.IsOwner() { - if !poster.IsAdmin { - return models.CommentTagOwner, nil - } - - ok, err := models.IsUserRealRepoAdmin(repo, poster) - if err != nil { - return models.CommentTagNone, err - } - - if ok { - return models.CommentTagOwner, nil - } - - if ok, err = repo.IsCollaborator(poster.ID); ok && err == nil { - return models.CommentTagWriter, nil - } - - return models.CommentTagNone, err - } - - if perm.CanWrite(models.UnitTypeCode) { - return models.CommentTagWriter, nil - } - - return models.CommentTagNone, nil -} - -func getBranchData(ctx *context.Context, issue *models.Issue) { - ctx.Data["BaseBranch"] = nil - ctx.Data["HeadBranch"] = nil - ctx.Data["HeadUserName"] = nil - ctx.Data["BaseName"] = ctx.Repo.Repository.OwnerName - if issue.IsPull { - pull := issue.PullRequest - ctx.Data["BaseBranch"] = pull.BaseBranch - ctx.Data["HeadBranch"] = pull.HeadBranch - ctx.Data["HeadUserName"] = pull.MustHeadUserName() - } -} - -// ViewIssue render issue view page -func ViewIssue(ctx *context.Context) { - if ctx.Params(":type") == "issues" { - // If issue was requested we check if repo has external tracker and redirect - extIssueUnit, err := ctx.Repo.Repository.GetUnit(models.UnitTypeExternalTracker) - if err == nil && extIssueUnit != nil { - if extIssueUnit.ExternalTrackerConfig().ExternalTrackerStyle == markup.IssueNameStyleNumeric || extIssueUnit.ExternalTrackerConfig().ExternalTrackerStyle == "" { - metas := ctx.Repo.Repository.ComposeMetas() - metas["index"] = ctx.Params(":index") - ctx.Redirect(com.Expand(extIssueUnit.ExternalTrackerConfig().ExternalTrackerFormat, metas)) - return - } - } else if err != nil && !models.IsErrUnitTypeNotExist(err) { - ctx.ServerError("GetUnit", err) - return - } - } - - issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) - if err != nil { - if models.IsErrIssueNotExist(err) { - ctx.NotFound("GetIssueByIndex", err) - } else { - ctx.ServerError("GetIssueByIndex", err) - } - return - } - - // Make sure type and URL matches. - if ctx.Params(":type") == "issues" && issue.IsPull { - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } else if ctx.Params(":type") == "pulls" && !issue.IsPull { - ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + fmt.Sprint(issue.Index)) - return - } - - if issue.IsPull { - MustAllowPulls(ctx) - if ctx.Written() { - return - } - ctx.Data["PageIsPullList"] = true - ctx.Data["PageIsPullConversation"] = true - } else { - MustEnableIssues(ctx) - if ctx.Written() { - return - } - ctx.Data["PageIsIssueList"] = true - ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 - } - - if issue.IsPull && !ctx.Repo.CanRead(models.UnitTypeIssues) { - ctx.Data["IssueType"] = "pulls" - } else if !issue.IsPull && !ctx.Repo.CanRead(models.UnitTypePullRequests) { - ctx.Data["IssueType"] = "issues" - } else { - ctx.Data["IssueType"] = "all" - } - - ctx.Data["RequireHighlightJS"] = true - ctx.Data["RequireTribute"] = true - ctx.Data["RequireSimpleMDE"] = true - ctx.Data["IsProjectsEnabled"] = ctx.Repo.CanRead(models.UnitTypeProjects) - ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled - upload.AddUploadContext(ctx, "comment") - - if err = issue.LoadAttributes(); err != nil { - ctx.ServerError("LoadAttributes", err) - return - } - - if err = filterXRefComments(ctx, issue); err != nil { - ctx.ServerError("filterXRefComments", err) - return - } - - ctx.Data["Title"] = fmt.Sprintf("#%d - %s", issue.Index, issue.Title) - - iw := new(models.IssueWatch) - if ctx.User != nil { - iw.UserID = ctx.User.ID - iw.IssueID = issue.ID - iw.IsWatching, err = models.CheckIssueWatch(ctx.User, issue) - if err != nil { - ctx.InternalServerError(err) - return - } - } - ctx.Data["IssueWatch"] = iw - - issue.RenderedContent = string(markdown.Render([]byte(issue.Content), ctx.Repo.RepoLink, - ctx.Repo.Repository.ComposeMetas())) - - repo := ctx.Repo.Repository - - // Get more information if it's a pull request. - if issue.IsPull { - if issue.PullRequest.HasMerged { - ctx.Data["DisableStatusChange"] = issue.PullRequest.HasMerged - PrepareMergedViewPullInfo(ctx, issue) - } else { - PrepareViewPullInfo(ctx, issue) - ctx.Data["DisableStatusChange"] = ctx.Data["IsPullRequestBroken"] == true && issue.IsClosed - } - if ctx.Written() { - return - } - } - - // Metas. - // Check labels. - labelIDMark := make(map[int64]bool) - for i := range issue.Labels { - labelIDMark[issue.Labels[i].ID] = true - } - labels, err := models.GetLabelsByRepoID(repo.ID, "", models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLabelsByRepoID", err) - return - } - ctx.Data["Labels"] = labels - - if repo.Owner.IsOrganization() { - orgLabels, err := models.GetLabelsByOrgID(repo.Owner.ID, ctx.Query("sort"), models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLabelsByOrgID", err) - return - } - ctx.Data["OrgLabels"] = orgLabels - - labels = append(labels, orgLabels...) - } - - hasSelected := false - for i := range labels { - if labelIDMark[labels[i].ID] { - labels[i].IsChecked = true - hasSelected = true - } - } - ctx.Data["HasSelectedLabel"] = hasSelected - - // Check milestone and assignee. - if ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) { - RetrieveRepoMilestonesAndAssignees(ctx, repo) - retrieveProjects(ctx, repo) - - if ctx.Written() { - return - } - } - - if issue.IsPull { - canChooseReviewer := ctx.Repo.CanWrite(models.UnitTypePullRequests) - if !canChooseReviewer && ctx.User != nil && ctx.IsSigned { - canChooseReviewer, err = models.IsOfficialReviewer(issue, ctx.User) - if err != nil { - ctx.ServerError("IsOfficialReviewer", err) - return - } - } - - RetrieveRepoReviewers(ctx, repo, issue, canChooseReviewer) - if ctx.Written() { - return - } - } - - if ctx.IsSigned { - // Update issue-user. - if err = issue.ReadBy(ctx.User.ID); err != nil { - ctx.ServerError("ReadBy", err) - return - } - } - - var ( - tag models.CommentTag - ok bool - marked = make(map[int64]models.CommentTag) - comment *models.Comment - participants = make([]*models.User, 1, 10) - ) - if ctx.Repo.Repository.IsTimetrackerEnabled() { - if ctx.IsSigned { - // Deal with the stopwatch - ctx.Data["IsStopwatchRunning"] = models.StopwatchExists(ctx.User.ID, issue.ID) - if !ctx.Data["IsStopwatchRunning"].(bool) { - var exists bool - var sw *models.Stopwatch - if exists, sw, err = models.HasUserStopwatch(ctx.User.ID); err != nil { - ctx.ServerError("HasUserStopwatch", err) - return - } - ctx.Data["HasUserStopwatch"] = exists - if exists { - // Add warning if the user has already a stopwatch - var otherIssue *models.Issue - if otherIssue, err = models.GetIssueByID(sw.IssueID); err != nil { - ctx.ServerError("GetIssueByID", err) - return - } - if err = otherIssue.LoadRepo(); err != nil { - ctx.ServerError("LoadRepo", err) - return - } - // Add link to the issue of the already running stopwatch - ctx.Data["OtherStopwatchURL"] = otherIssue.HTMLURL() - } - } - ctx.Data["CanUseTimetracker"] = ctx.Repo.CanUseTimetracker(issue, ctx.User) - } else { - ctx.Data["CanUseTimetracker"] = false - } - if ctx.Data["WorkingUsers"], err = models.TotalTimes(models.FindTrackedTimesOptions{IssueID: issue.ID}); err != nil { - ctx.ServerError("TotalTimes", err) - return - } - } - - // Check if the user can use the dependencies - ctx.Data["CanCreateIssueDependencies"] = ctx.Repo.CanCreateIssueDependencies(ctx.User, issue.IsPull) - - // check if dependencies can be created across repositories - ctx.Data["AllowCrossRepositoryDependencies"] = setting.Service.AllowCrossRepositoryDependencies - - if issue.ShowTag, err = commentTag(repo, issue.Poster, issue); err != nil { - ctx.ServerError("commentTag", err) - return - } - marked[issue.PosterID] = issue.ShowTag - - // Render comments and and fetch participants. - participants[0] = issue.Poster - for _, comment = range issue.Comments { - comment.Issue = issue - - if err := comment.LoadPoster(); err != nil { - ctx.ServerError("LoadPoster", err) - return - } - - if comment.Type == models.CommentTypeComment { - if err := comment.LoadAttachments(); err != nil { - ctx.ServerError("LoadAttachments", err) - return - } - - comment.RenderedContent = string(markdown.Render([]byte(comment.Content), ctx.Repo.RepoLink, - ctx.Repo.Repository.ComposeMetas())) - - // Check tag. - tag, ok = marked[comment.PosterID] - if ok { - comment.ShowTag = tag - continue - } - - comment.ShowTag, err = commentTag(repo, comment.Poster, issue) - if err != nil { - ctx.ServerError("commentTag", err) - return - } - marked[comment.PosterID] = comment.ShowTag - participants = addParticipant(comment.Poster, participants) - } else if comment.Type == models.CommentTypeLabel { - if err = comment.LoadLabel(); err != nil { - ctx.ServerError("LoadLabel", err) - return - } - } else if comment.Type == models.CommentTypeMilestone { - if err = comment.LoadMilestone(); err != nil { - ctx.ServerError("LoadMilestone", err) - return - } - ghostMilestone := &models.Milestone{ - ID: -1, - Name: ctx.Tr("repo.issues.deleted_milestone"), - } - if comment.OldMilestoneID > 0 && comment.OldMilestone == nil { - comment.OldMilestone = ghostMilestone - } - if comment.MilestoneID > 0 && comment.Milestone == nil { - comment.Milestone = ghostMilestone - } - } else if comment.Type == models.CommentTypeProject { - - if err = comment.LoadProject(); err != nil { - ctx.ServerError("LoadProject", err) - return - } - - ghostProject := &models.Project{ - ID: -1, - Title: ctx.Tr("repo.issues.deleted_project"), - } - - if comment.OldProjectID > 0 && comment.OldProject == nil { - comment.OldProject = ghostProject - } - - if comment.ProjectID > 0 && comment.Project == nil { - comment.Project = ghostProject - } - - } else if comment.Type == models.CommentTypeAssignees || comment.Type == models.CommentTypeReviewRequest { - if err = comment.LoadAssigneeUserAndTeam(); err != nil { - ctx.ServerError("LoadAssigneeUserAndTeam", err) - return - } - } else if comment.Type == models.CommentTypeRemoveDependency || comment.Type == models.CommentTypeAddDependency { - if err = comment.LoadDepIssueDetails(); err != nil { - if !models.IsErrIssueNotExist(err) { - ctx.ServerError("LoadDepIssueDetails", err) - return - } - } - } else if comment.Type == models.CommentTypeCode || comment.Type == models.CommentTypeReview { - comment.RenderedContent = string(markdown.Render([]byte(comment.Content), ctx.Repo.RepoLink, - ctx.Repo.Repository.ComposeMetas())) - if err = comment.LoadReview(); err != nil && !models.IsErrReviewNotExist(err) { - ctx.ServerError("LoadReview", err) - return - } - participants = addParticipant(comment.Poster, participants) - if comment.Review == nil { - continue - } - if err = comment.Review.LoadAttributes(); err != nil { - if !models.IsErrUserNotExist(err) { - ctx.ServerError("Review.LoadAttributes", err) - return - } - comment.Review.Reviewer = models.NewGhostUser() - } - if err = comment.Review.LoadCodeComments(); err != nil { - ctx.ServerError("Review.LoadCodeComments", err) - return - } - - if err = comment.LoadResolveDoer(); err != nil { - ctx.ServerError("LoadResolveDoer", err) - return - } - } else if comment.Type == models.CommentTypePullPush { - participants = addParticipant(comment.Poster, participants) - if err = comment.LoadPushCommits(); err != nil { - ctx.ServerError("LoadPushCommits", err) - return - } - } - } - - // Combine multiple label assignments into a single comment - combineLabelComments(issue) - - getBranchData(ctx, issue) - if issue.IsPull { - pull := issue.PullRequest - pull.Issue = issue - canDelete := false - ctx.Data["AllowMerge"] = false - - if ctx.IsSigned { - if err := pull.LoadHeadRepo(); err != nil { - log.Error("LoadHeadRepo: %v", err) - } else if pull.HeadRepo != nil && pull.HeadBranch != pull.HeadRepo.DefaultBranch { - perm, err := models.GetUserRepoPermission(pull.HeadRepo, ctx.User) - if err != nil { - ctx.ServerError("GetUserRepoPermission", err) - return - } - if perm.CanWrite(models.UnitTypeCode) { - // Check if branch is not protected - if protected, err := pull.HeadRepo.IsProtectedBranch(pull.HeadBranch, ctx.User); err != nil { - log.Error("IsProtectedBranch: %v", err) - } else if !protected { - canDelete = true - ctx.Data["DeleteBranchLink"] = ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index) + "/cleanup" - } - } - } - - if err := pull.LoadBaseRepo(); err != nil { - log.Error("LoadBaseRepo: %v", err) - } - perm, err := models.GetUserRepoPermission(pull.BaseRepo, ctx.User) - if err != nil { - ctx.ServerError("GetUserRepoPermission", err) - return - } - ctx.Data["AllowMerge"], err = pull_service.IsUserAllowedToMerge(pull, perm, ctx.User) - if err != nil { - ctx.ServerError("IsUserAllowedToMerge", err) - return - } - - if ctx.Data["CanMarkConversation"], err = models.CanMarkConversation(issue, ctx.User); err != nil { - ctx.ServerError("CanMarkConversation", err) - return - } - } - - prUnit, err := repo.GetUnit(models.UnitTypePullRequests) - if err != nil { - ctx.ServerError("GetUnit", err) - return - } - prConfig := prUnit.PullRequestsConfig() - - // Check correct values and select default - if ms, ok := ctx.Data["MergeStyle"].(models.MergeStyle); !ok || - !prConfig.IsMergeStyleAllowed(ms) { - if prConfig.AllowMerge { - ctx.Data["MergeStyle"] = models.MergeStyleMerge - } else if prConfig.AllowRebase { - ctx.Data["MergeStyle"] = models.MergeStyleRebase - } else if prConfig.AllowRebaseMerge { - ctx.Data["MergeStyle"] = models.MergeStyleRebaseMerge - } else if prConfig.AllowSquash { - ctx.Data["MergeStyle"] = models.MergeStyleSquash - } else { - ctx.Data["MergeStyle"] = "" - } - } - if err = pull.LoadProtectedBranch(); err != nil { - ctx.ServerError("LoadProtectedBranch", err) - return - } - if pull.ProtectedBranch != nil { - cnt := pull.ProtectedBranch.GetGrantedApprovalsCount(pull) - ctx.Data["IsBlockedByApprovals"] = !pull.ProtectedBranch.HasEnoughApprovals(pull) - ctx.Data["IsBlockedByRejection"] = pull.ProtectedBranch.MergeBlockedByRejectedReview(pull) - ctx.Data["IsBlockedByOfficialReviewRequests"] = pull.ProtectedBranch.MergeBlockedByOfficialReviewRequests(pull) - ctx.Data["IsBlockedByOutdatedBranch"] = pull.ProtectedBranch.MergeBlockedByOutdatedBranch(pull) - ctx.Data["GrantedApprovals"] = cnt - ctx.Data["RequireSigned"] = pull.ProtectedBranch.RequireSignedCommits - ctx.Data["ChangedProtectedFiles"] = pull.ChangedProtectedFiles - ctx.Data["IsBlockedByChangedProtectedFiles"] = len(pull.ChangedProtectedFiles) != 0 - ctx.Data["ChangedProtectedFilesNum"] = len(pull.ChangedProtectedFiles) - } - ctx.Data["WillSign"] = false - if ctx.User != nil { - sign, key, _, err := pull.SignMerge(ctx.User, pull.BaseRepo.RepoPath(), pull.BaseBranch, pull.GetGitRefName()) - ctx.Data["WillSign"] = sign - ctx.Data["SigningKey"] = key - if err != nil { - if models.IsErrWontSign(err) { - ctx.Data["WontSignReason"] = err.(*models.ErrWontSign).Reason - } else { - ctx.Data["WontSignReason"] = "error" - log.Error("Error whilst checking if could sign pr %d in repo %s. Error: %v", pull.ID, pull.BaseRepo.FullName(), err) - } - } - } else { - ctx.Data["WontSignReason"] = "not_signed_in" - } - ctx.Data["IsPullBranchDeletable"] = canDelete && - pull.HeadRepo != nil && - git.IsBranchExist(pull.HeadRepo.RepoPath(), pull.HeadBranch) && - (!pull.HasMerged || ctx.Data["HeadBranchCommitID"] == ctx.Data["PullHeadCommitID"]) - } - - // Get Dependencies - ctx.Data["BlockedByDependencies"], err = issue.BlockedByDependencies() - if err != nil { - ctx.ServerError("BlockedByDependencies", err) - return - } - ctx.Data["BlockingDependencies"], err = issue.BlockingDependencies() - if err != nil { - ctx.ServerError("BlockingDependencies", err) - return - } - - ctx.Data["Participants"] = participants - ctx.Data["NumParticipants"] = len(participants) - ctx.Data["Issue"] = issue - ctx.Data["ReadOnly"] = false - ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + ctx.Data["Link"].(string) - ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID) - ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) - ctx.Data["HasProjectsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypeProjects) - ctx.Data["IsRepoAdmin"] = ctx.IsSigned && (ctx.Repo.IsAdmin() || ctx.User.IsAdmin) - ctx.Data["LockReasons"] = setting.Repository.Issue.LockReasons - ctx.Data["RefEndName"] = git.RefEndName(issue.Ref) - ctx.HTML(200, tplIssueView) -} - -// GetActionIssue will return the issue which is used in the context. -func GetActionIssue(ctx *context.Context) *models.Issue { - issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) - if err != nil { - ctx.NotFoundOrServerError("GetIssueByIndex", models.IsErrIssueNotExist, err) - return nil - } - issue.Repo = ctx.Repo.Repository - checkIssueRights(ctx, issue) - if ctx.Written() { - return nil - } - if err = issue.LoadAttributes(); err != nil { - ctx.ServerError("LoadAttributes", nil) - return nil - } - return issue -} - -func checkIssueRights(ctx *context.Context, issue *models.Issue) { - if issue.IsPull && !ctx.Repo.CanRead(models.UnitTypePullRequests) || - !issue.IsPull && !ctx.Repo.CanRead(models.UnitTypeIssues) { - ctx.NotFound("IssueOrPullRequestUnitNotAllowed", nil) - } -} - -func getActionIssues(ctx *context.Context) []*models.Issue { - commaSeparatedIssueIDs := ctx.Query("issue_ids") - if len(commaSeparatedIssueIDs) == 0 { - return nil - } - issueIDs := make([]int64, 0, 10) - for _, stringIssueID := range strings.Split(commaSeparatedIssueIDs, ",") { - issueID, err := strconv.ParseInt(stringIssueID, 10, 64) - if err != nil { - ctx.ServerError("ParseInt", err) - return nil - } - issueIDs = append(issueIDs, issueID) - } - issues, err := models.GetIssuesByIDs(issueIDs) - if err != nil { - ctx.ServerError("GetIssuesByIDs", err) - return nil - } - // Check access rights for all issues - issueUnitEnabled := ctx.Repo.CanRead(models.UnitTypeIssues) - prUnitEnabled := ctx.Repo.CanRead(models.UnitTypePullRequests) - for _, issue := range issues { - if issue.IsPull && !prUnitEnabled || !issue.IsPull && !issueUnitEnabled { - ctx.NotFound("IssueOrPullRequestUnitNotAllowed", nil) - return nil - } - if err = issue.LoadAttributes(); err != nil { - ctx.ServerError("LoadAttributes", err) - return nil - } - } - return issues -} - -// UpdateIssueTitle change issue's title -func UpdateIssueTitle(ctx *context.Context) { - issue := GetActionIssue(ctx) - if ctx.Written() { - return - } - - if !ctx.IsSigned || (!issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) { - ctx.Error(403) - return - } - - title := ctx.QueryTrim("title") - if len(title) == 0 { - ctx.Error(204) - return - } - - if err := issue_service.ChangeTitle(issue, ctx.User, title); err != nil { - ctx.ServerError("ChangeTitle", err) - return - } - - ctx.JSON(200, map[string]interface{}{ - "title": issue.Title, - }) -} - -// UpdateIssueRef change issue's ref (branch) -func UpdateIssueRef(ctx *context.Context) { - issue := GetActionIssue(ctx) - if ctx.Written() { - return - } - - if !ctx.IsSigned || (!issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) || issue.IsPull { - ctx.Error(403) - return - } - - ref := ctx.QueryTrim("ref") - - if err := issue_service.ChangeIssueRef(issue, ctx.User, ref); err != nil { - ctx.ServerError("ChangeRef", err) - return - } - - ctx.JSON(200, map[string]interface{}{ - "ref": ref, - }) -} - -// UpdateIssueContent change issue's content -func UpdateIssueContent(ctx *context.Context) { - issue := GetActionIssue(ctx) - if ctx.Written() { - return - } - - if !ctx.IsSigned || (ctx.User.ID != issue.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) { - ctx.Error(403) - return - } - - content := ctx.Query("content") - if err := issue_service.ChangeContent(issue, ctx.User, content); err != nil { - ctx.ServerError("ChangeContent", err) - return - } - - files := ctx.QueryStrings("files[]") - if err := updateAttachments(issue, files); err != nil { - ctx.ServerError("UpdateAttachments", err) - } - - ctx.JSON(200, map[string]interface{}{ - "content": string(markdown.Render([]byte(issue.Content), ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())), - "attachments": attachmentsHTML(ctx, issue.Attachments, issue.Content), - }) -} - -// UpdateIssueMilestone change issue's milestone -func UpdateIssueMilestone(ctx *context.Context) { - issues := getActionIssues(ctx) - if ctx.Written() { - return - } - - milestoneID := ctx.QueryInt64("id") - for _, issue := range issues { - oldMilestoneID := issue.MilestoneID - if oldMilestoneID == milestoneID { - continue - } - issue.MilestoneID = milestoneID - if err := issue_service.ChangeMilestoneAssign(issue, ctx.User, oldMilestoneID); err != nil { - ctx.ServerError("ChangeMilestoneAssign", err) - return - } - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// UpdateIssueAssignee change issue's or pull's assignee -func UpdateIssueAssignee(ctx *context.Context) { - issues := getActionIssues(ctx) - if ctx.Written() { - return - } - - assigneeID := ctx.QueryInt64("id") - action := ctx.Query("action") - - for _, issue := range issues { - switch action { - case "clear": - if err := issue_service.DeleteNotPassedAssignee(issue, ctx.User, []*models.User{}); err != nil { - ctx.ServerError("ClearAssignees", err) - return - } - default: - assignee, err := models.GetUserByID(assigneeID) - if err != nil { - ctx.ServerError("GetUserByID", err) - return - } - - valid, err := models.CanBeAssigned(assignee, issue.Repo, issue.IsPull) - if err != nil { - ctx.ServerError("canBeAssigned", err) - return - } - if !valid { - ctx.ServerError("canBeAssigned", models.ErrUserDoesNotHaveAccessToRepo{UserID: assigneeID, RepoName: issue.Repo.Name}) - return - } - - _, _, err = issue_service.ToggleAssignee(issue, ctx.User, assigneeID) - if err != nil { - ctx.ServerError("ToggleAssignee", err) - return - } - } - } - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// UpdatePullReviewRequest add or remove review request -func UpdatePullReviewRequest(ctx *context.Context) { - issues := getActionIssues(ctx) - if ctx.Written() { - return - } - - reviewID := ctx.QueryInt64("id") - action := ctx.Query("action") - - // TODO: Not support 'clear' now - if action != "attach" && action != "detach" { - ctx.Status(403) - return - } - - for _, issue := range issues { - if err := issue.LoadRepo(); err != nil { - ctx.ServerError("issue.LoadRepo", err) - return - } - - if !issue.IsPull { - log.Warn( - "UpdatePullReviewRequest: refusing to add review request for non-PR issue %-v#%d", - issue.Repo, issue.Index, - ) - ctx.Status(403) - return - } - if reviewID < 0 { - // negative reviewIDs represent team requests - if err := issue.Repo.GetOwner(); err != nil { - ctx.ServerError("issue.Repo.GetOwner", err) - return - } - - if !issue.Repo.Owner.IsOrganization() { - log.Warn( - "UpdatePullReviewRequest: refusing to add team review request for %s#%d owned by non organization UID[%d]", - issue.Repo.FullName(), issue.Index, issue.Repo.ID, - ) - ctx.Status(403) - return - } - - team, err := models.GetTeamByID(-reviewID) - if err != nil { - ctx.ServerError("models.GetTeamByID", err) - return - } - - if team.OrgID != issue.Repo.OwnerID { - log.Warn( - "UpdatePullReviewRequest: refusing to add team review request for UID[%d] team %s to %s#%d owned by UID[%d]", - team.OrgID, team.Name, issue.Repo.FullName(), issue.Index, issue.Repo.ID) - ctx.Status(403) - return - } - - err = issue_service.IsValidTeamReviewRequest(team, ctx.User, action == "attach", issue) - if err != nil { - if models.IsErrNotValidReviewRequest(err) { - log.Warn( - "UpdatePullReviewRequest: refusing to add invalid team review request for UID[%d] team %s to %s#%d owned by UID[%d]: Error: %v", - team.OrgID, team.Name, issue.Repo.FullName(), issue.Index, issue.Repo.ID, - err, - ) - ctx.Status(403) - return - } - ctx.ServerError("IsValidTeamReviewRequest", err) - return - } - - _, err = issue_service.TeamReviewRequest(issue, ctx.User, team, action == "attach") - if err != nil { - ctx.ServerError("TeamReviewRequest", err) - return - } - continue - } - - reviewer, err := models.GetUserByID(reviewID) - if err != nil { - if models.IsErrUserNotExist(err) { - log.Warn( - "UpdatePullReviewRequest: requested reviewer [%d] for %-v to %-v#%d is not exist: Error: %v", - reviewID, issue.Repo, issue.Index, - err, - ) - ctx.Status(403) - return - } - ctx.ServerError("GetUserByID", err) - return - } - - err = issue_service.IsValidReviewRequest(reviewer, ctx.User, action == "attach", issue, nil) - if err != nil { - if models.IsErrNotValidReviewRequest(err) { - log.Warn( - "UpdatePullReviewRequest: refusing to add invalid review request for %-v to %-v#%d: Error: %v", - reviewer, issue.Repo, issue.Index, - err, - ) - ctx.Status(403) - return - } - ctx.ServerError("isValidReviewRequest", err) - return - } - - _, err = issue_service.ReviewRequest(issue, ctx.User, reviewer, action == "attach") - if err != nil { - ctx.ServerError("ReviewRequest", err) - return - } - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// UpdateIssueStatus change issue's status -func UpdateIssueStatus(ctx *context.Context) { - issues := getActionIssues(ctx) - if ctx.Written() { - return - } - - var isClosed bool - switch action := ctx.Query("action"); action { - case "open": - isClosed = false - case "close": - isClosed = true - default: - log.Warn("Unrecognized action: %s", action) - } - - if _, err := models.IssueList(issues).LoadRepositories(); err != nil { - ctx.ServerError("LoadRepositories", err) - return - } - for _, issue := range issues { - if issue.IsClosed != isClosed { - if err := issue_service.ChangeStatus(issue, ctx.User, isClosed); err != nil { - if models.IsErrDependenciesLeft(err) { - ctx.JSON(http.StatusPreconditionFailed, map[string]interface{}{ - "error": "cannot close this issue because it still has open dependencies", - }) - return - } - ctx.ServerError("ChangeStatus", err) - return - } - } - } - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// NewComment create a comment for issue -func NewComment(ctx *context.Context, form auth.CreateCommentForm) { - issue := GetActionIssue(ctx) - if ctx.Written() { - return - } - - if !ctx.IsSigned || (ctx.User.ID != issue.PosterID && !ctx.Repo.CanReadIssuesOrPulls(issue.IsPull)) { - if log.IsTrace() { - if ctx.IsSigned { - issueType := "issues" - if issue.IsPull { - issueType = "pulls" - } - log.Trace("Permission Denied: User %-v not the Poster (ID: %d) and cannot read %s in Repo %-v.\n"+ - "User in Repo has Permissions: %-+v", - ctx.User, - log.NewColoredIDValue(issue.PosterID), - issueType, - ctx.Repo.Repository, - ctx.Repo.Permission) - } else { - log.Trace("Permission Denied: Not logged in") - } - } - - ctx.Error(403) - return - } - - if issue.IsLocked && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) && !ctx.User.IsAdmin { - ctx.Flash.Error(ctx.Tr("repo.issues.comment_on_locked")) - ctx.Redirect(issue.HTMLURL(), http.StatusSeeOther) - return - } - - var attachments []string - if setting.Attachment.Enabled { - attachments = form.Files - } - - if ctx.HasError() { - ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) - ctx.Redirect(issue.HTMLURL()) - return - } - - var comment *models.Comment - defer func() { - // Check if issue admin/poster changes the status of issue. - if (ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) || (ctx.IsSigned && issue.IsPoster(ctx.User.ID))) && - (form.Status == "reopen" || form.Status == "close") && - !(issue.IsPull && issue.PullRequest.HasMerged) { - - // Duplication and conflict check should apply to reopen pull request. - var pr *models.PullRequest - - if form.Status == "reopen" && issue.IsPull { - pull := issue.PullRequest - var err error - pr, err = models.GetUnmergedPullRequest(pull.HeadRepoID, pull.BaseRepoID, pull.HeadBranch, pull.BaseBranch) - if err != nil { - if !models.IsErrPullRequestNotExist(err) { - ctx.ServerError("GetUnmergedPullRequest", err) - return - } - } - - // Regenerate patch and test conflict. - if pr == nil { - pull_service.AddToTaskQueue(issue.PullRequest) - } - } - - if pr != nil { - ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index)) - } else { - isClosed := form.Status == "close" - if err := issue_service.ChangeStatus(issue, ctx.User, isClosed); err != nil { - log.Error("ChangeStatus: %v", err) - - if models.IsErrDependenciesLeft(err) { - if issue.IsPull { - ctx.Flash.Error(ctx.Tr("repo.issues.dependency.pr_close_blocked")) - ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index), http.StatusSeeOther) - } else { - ctx.Flash.Error(ctx.Tr("repo.issues.dependency.issue_close_blocked")) - ctx.Redirect(fmt.Sprintf("%s/issues/%d", ctx.Repo.RepoLink, issue.Index), http.StatusSeeOther) - } - return - } - } else { - if err := stopTimerIfAvailable(ctx.User, issue); err != nil { - ctx.ServerError("CreateOrStopIssueStopwatch", err) - return - } - - log.Trace("Issue [%d] status changed to closed: %v", issue.ID, issue.IsClosed) - } - } - } - - // Redirect to comment hashtag if there is any actual content. - typeName := "issues" - if issue.IsPull { - typeName = "pulls" - } - if comment != nil { - ctx.Redirect(fmt.Sprintf("%s/%s/%d#%s", ctx.Repo.RepoLink, typeName, issue.Index, comment.HashTag())) - } else { - ctx.Redirect(fmt.Sprintf("%s/%s/%d", ctx.Repo.RepoLink, typeName, issue.Index)) - } - }() - - // Fix #321: Allow empty comments, as long as we have attachments. - if len(form.Content) == 0 && len(attachments) == 0 { - return - } - - comment, err := comment_service.CreateIssueComment(ctx.User, ctx.Repo.Repository, issue, form.Content, attachments) - if err != nil { - ctx.ServerError("CreateIssueComment", err) - return - } - - log.Trace("Comment created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, comment.ID) -} - -// UpdateCommentContent change comment of issue's content -func UpdateCommentContent(ctx *context.Context) { - comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) - if err != nil { - ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) - return - } - - if err := comment.LoadIssue(); err != nil { - ctx.NotFoundOrServerError("LoadIssue", models.IsErrIssueNotExist, err) - return - } - - if comment.Type == models.CommentTypeComment { - if err := comment.LoadAttachments(); err != nil { - ctx.ServerError("LoadAttachments", err) - return - } - } - - if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) { - ctx.Error(403) - return - } else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode { - ctx.Error(204) - return - } - - oldContent := comment.Content - comment.Content = ctx.Query("content") - if len(comment.Content) == 0 { - ctx.JSON(200, map[string]interface{}{ - "content": "", - }) - return - } - if err = comment_service.UpdateComment(comment, ctx.User, oldContent); err != nil { - ctx.ServerError("UpdateComment", err) - return - } - - files := ctx.QueryStrings("files[]") - if err := updateAttachments(comment, files); err != nil { - ctx.ServerError("UpdateAttachments", err) - } - - ctx.JSON(200, map[string]interface{}{ - "content": string(markdown.Render([]byte(comment.Content), ctx.Query("context"), ctx.Repo.Repository.ComposeMetas())), - "attachments": attachmentsHTML(ctx, comment.Attachments, comment.Content), - }) -} - -// DeleteComment delete comment of issue -func DeleteComment(ctx *context.Context) { - comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) - if err != nil { - ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) - return - } - - if err := comment.LoadIssue(); err != nil { - ctx.NotFoundOrServerError("LoadIssue", models.IsErrIssueNotExist, err) - return - } - - if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) { - ctx.Error(403) - return - } else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode { - ctx.Error(204) - return - } - - if err = comment_service.DeleteComment(comment, ctx.User); err != nil { - ctx.ServerError("DeleteCommentByID", err) - return - } - - ctx.Status(200) -} - -// ChangeIssueReaction create a reaction for issue -func ChangeIssueReaction(ctx *context.Context, form auth.ReactionForm) { - issue := GetActionIssue(ctx) - if ctx.Written() { - return - } - - if !ctx.IsSigned || (ctx.User.ID != issue.PosterID && !ctx.Repo.CanReadIssuesOrPulls(issue.IsPull)) { - if log.IsTrace() { - if ctx.IsSigned { - issueType := "issues" - if issue.IsPull { - issueType = "pulls" - } - log.Trace("Permission Denied: User %-v not the Poster (ID: %d) and cannot read %s in Repo %-v.\n"+ - "User in Repo has Permissions: %-+v", - ctx.User, - log.NewColoredIDValue(issue.PosterID), - issueType, - ctx.Repo.Repository, - ctx.Repo.Permission) - } else { - log.Trace("Permission Denied: Not logged in") - } - } - - ctx.Error(403) - return - } - - if ctx.HasError() { - ctx.ServerError("ChangeIssueReaction", errors.New(ctx.GetErrMsg())) - return - } - - switch ctx.Params(":action") { - case "react": - reaction, err := models.CreateIssueReaction(ctx.User, issue, form.Content) - if err != nil { - if models.IsErrForbiddenIssueReaction(err) { - ctx.ServerError("ChangeIssueReaction", err) - return - } - log.Info("CreateIssueReaction: %s", err) - break - } - // Reload new reactions - issue.Reactions = nil - if err = issue.LoadAttributes(); err != nil { - log.Info("issue.LoadAttributes: %s", err) - break - } - - log.Trace("Reaction for issue created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, reaction.ID) - case "unreact": - if err := models.DeleteIssueReaction(ctx.User, issue, form.Content); err != nil { - ctx.ServerError("DeleteIssueReaction", err) - return - } - - // Reload new reactions - issue.Reactions = nil - if err := issue.LoadAttributes(); err != nil { - log.Info("issue.LoadAttributes: %s", err) - break - } - - log.Trace("Reaction for issue removed: %d/%d", ctx.Repo.Repository.ID, issue.ID) - default: - ctx.NotFound(fmt.Sprintf("Unknown action %s", ctx.Params(":action")), nil) - return - } - - if len(issue.Reactions) == 0 { - ctx.JSON(200, map[string]interface{}{ - "empty": true, - "html": "", - }) - return - } - - html, err := ctx.HTMLString(string(tplReactions), map[string]interface{}{ - "ctx": ctx.Data, - "ActionURL": fmt.Sprintf("%s/issues/%d/reactions", ctx.Repo.RepoLink, issue.Index), - "Reactions": issue.Reactions.GroupByType(), - }) - if err != nil { - ctx.ServerError("ChangeIssueReaction.HTMLString", err) - return - } - ctx.JSON(200, map[string]interface{}{ - "html": html, - }) -} - -// ChangeCommentReaction create a reaction for comment -func ChangeCommentReaction(ctx *context.Context, form auth.ReactionForm) { - comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) - if err != nil { - ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) - return - } - - if err := comment.LoadIssue(); err != nil { - ctx.NotFoundOrServerError("LoadIssue", models.IsErrIssueNotExist, err) - return - } - - if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull)) { - if log.IsTrace() { - if ctx.IsSigned { - issueType := "issues" - if comment.Issue.IsPull { - issueType = "pulls" - } - log.Trace("Permission Denied: User %-v not the Poster (ID: %d) and cannot read %s in Repo %-v.\n"+ - "User in Repo has Permissions: %-+v", - ctx.User, - log.NewColoredIDValue(comment.Issue.PosterID), - issueType, - ctx.Repo.Repository, - ctx.Repo.Permission) - } else { - log.Trace("Permission Denied: Not logged in") - } - } - - ctx.Error(403) - return - } else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode { - ctx.Error(204) - return - } - - switch ctx.Params(":action") { - case "react": - reaction, err := models.CreateCommentReaction(ctx.User, comment.Issue, comment, form.Content) - if err != nil { - if models.IsErrForbiddenIssueReaction(err) { - ctx.ServerError("ChangeIssueReaction", err) - return - } - log.Info("CreateCommentReaction: %s", err) - break - } - // Reload new reactions - comment.Reactions = nil - if err = comment.LoadReactions(ctx.Repo.Repository); err != nil { - log.Info("comment.LoadReactions: %s", err) - break - } - - log.Trace("Reaction for comment created: %d/%d/%d/%d", ctx.Repo.Repository.ID, comment.Issue.ID, comment.ID, reaction.ID) - case "unreact": - if err := models.DeleteCommentReaction(ctx.User, comment.Issue, comment, form.Content); err != nil { - ctx.ServerError("DeleteCommentReaction", err) - return - } - - // Reload new reactions - comment.Reactions = nil - if err = comment.LoadReactions(ctx.Repo.Repository); err != nil { - log.Info("comment.LoadReactions: %s", err) - break - } - - log.Trace("Reaction for comment removed: %d/%d/%d", ctx.Repo.Repository.ID, comment.Issue.ID, comment.ID) - default: - ctx.NotFound(fmt.Sprintf("Unknown action %s", ctx.Params(":action")), nil) - return - } - - if len(comment.Reactions) == 0 { - ctx.JSON(200, map[string]interface{}{ - "empty": true, - "html": "", - }) - return - } - - html, err := ctx.HTMLString(string(tplReactions), map[string]interface{}{ - "ctx": ctx.Data, - "ActionURL": fmt.Sprintf("%s/comments/%d/reactions", ctx.Repo.RepoLink, comment.ID), - "Reactions": comment.Reactions.GroupByType(), - }) - if err != nil { - ctx.ServerError("ChangeCommentReaction.HTMLString", err) - return - } - ctx.JSON(200, map[string]interface{}{ - "html": html, - }) -} - -func addParticipant(poster *models.User, participants []*models.User) []*models.User { - for _, part := range participants { - if poster.ID == part.ID { - return participants - } - } - return append(participants, poster) -} - -func filterXRefComments(ctx *context.Context, issue *models.Issue) error { - // Remove comments that the user has no permissions to see - for i := 0; i < len(issue.Comments); { - c := issue.Comments[i] - if models.CommentTypeIsRef(c.Type) && c.RefRepoID != issue.RepoID && c.RefRepoID != 0 { - var err error - // Set RefRepo for description in template - c.RefRepo, err = models.GetRepositoryByID(c.RefRepoID) - if err != nil { - return err - } - perm, err := models.GetUserRepoPermission(c.RefRepo, ctx.User) - if err != nil { - return err - } - if !perm.CanReadIssuesOrPulls(c.RefIsPull) { - issue.Comments = append(issue.Comments[:i], issue.Comments[i+1:]...) - continue - } - } - i++ - } - return nil -} - -// GetIssueAttachments returns attachments for the issue -func GetIssueAttachments(ctx *context.Context) { - issue := GetActionIssue(ctx) - var attachments = make([]*api.Attachment, len(issue.Attachments)) - for i := 0; i < len(issue.Attachments); i++ { - attachments[i] = convert.ToReleaseAttachment(issue.Attachments[i]) - } - ctx.JSON(200, attachments) -} - -// GetCommentAttachments returns attachments for the comment -func GetCommentAttachments(ctx *context.Context) { - comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) - if err != nil { - ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) - return - } - var attachments = make([]*api.Attachment, 0) - if comment.Type == models.CommentTypeComment { - if err := comment.LoadAttachments(); err != nil { - ctx.ServerError("LoadAttachments", err) - return - } - for i := 0; i < len(comment.Attachments); i++ { - attachments = append(attachments, convert.ToReleaseAttachment(comment.Attachments[i])) - } - } - ctx.JSON(200, attachments) -} - -func updateAttachments(item interface{}, files []string) error { - var attachments []*models.Attachment - switch content := item.(type) { - case *models.Issue: - attachments = content.Attachments - case *models.Comment: - attachments = content.Attachments - default: - return fmt.Errorf("Unknown Type: %T", content) - } - for i := 0; i < len(attachments); i++ { - if util.IsStringInSlice(attachments[i].UUID, files) { - continue - } - if err := models.DeleteAttachment(attachments[i], true); err != nil { - return err - } - } - var err error - if len(files) > 0 { - switch content := item.(type) { - case *models.Issue: - err = content.UpdateAttachments(files) - case *models.Comment: - err = content.UpdateAttachments(files) - default: - return fmt.Errorf("Unknown Type: %T", content) - } - if err != nil { - return err - } - } - switch content := item.(type) { - case *models.Issue: - content.Attachments, err = models.GetAttachmentsByIssueID(content.ID) - case *models.Comment: - content.Attachments, err = models.GetAttachmentsByCommentID(content.ID) - default: - return fmt.Errorf("Unknown Type: %T", content) - } - return err -} - -func attachmentsHTML(ctx *context.Context, attachments []*models.Attachment, content string) string { - attachHTML, err := ctx.HTMLString(string(tplAttachment), map[string]interface{}{ - "ctx": ctx.Data, - "Attachments": attachments, - "Content": content, - }) - if err != nil { - ctx.ServerError("attachmentsHTML.HTMLString", err) - return "" - } - return attachHTML -} - -func combineLabelComments(issue *models.Issue) { - for i := 0; i < len(issue.Comments); i++ { - var ( - prev *models.Comment - cur = issue.Comments[i] - ) - if i > 0 { - prev = issue.Comments[i-1] - } - if i == 0 || cur.Type != models.CommentTypeLabel || - (prev != nil && prev.PosterID != cur.PosterID) || - (prev != nil && cur.CreatedUnix-prev.CreatedUnix >= 60) { - if cur.Type == models.CommentTypeLabel { - if cur.Content != "1" { - cur.RemovedLabels = append(cur.RemovedLabels, cur.Label) - } else { - cur.AddedLabels = append(cur.AddedLabels, cur.Label) - } - } - continue - } - - if cur.Content != "1" { - prev.RemovedLabels = append(prev.RemovedLabels, cur.Label) - } else { - prev.AddedLabels = append(prev.AddedLabels, cur.Label) - } - prev.CreatedUnix = cur.CreatedUnix - issue.Comments = append(issue.Comments[:i], issue.Comments[i+1:]...) - i-- - } -} - -// get all teams that current user can mention -func handleTeamMentions(ctx *context.Context) { - if ctx.User == nil || !ctx.Repo.Owner.IsOrganization() { - return - } - - isAdmin := false - var err error - // Admin has super access. - if ctx.User.IsAdmin { - isAdmin = true - } else { - isAdmin, err = ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) - if err != nil { - ctx.ServerError("IsOwnedBy", err) - return - } - } - - if isAdmin { - if err := ctx.Repo.Owner.GetTeams(&models.SearchTeamOptions{}); err != nil { - ctx.ServerError("GetTeams", err) - return - } - } else { - ctx.Repo.Owner.Teams, err = ctx.Repo.Owner.GetUserTeams(ctx.User.ID) - if err != nil { - ctx.ServerError("GetUserTeams", err) - return - } - } - - ctx.Data["MentionableTeams"] = ctx.Repo.Owner.Teams - ctx.Data["MentionableTeamsOrg"] = ctx.Repo.Owner.Name - ctx.Data["MentionableTeamsOrgAvatar"] = ctx.Repo.Owner.RelAvatarLink() -} diff --git a/routers/repo/issue_label.go b/routers/repo/issue_label.go deleted file mode 100644 index f1e188fe3..000000000 --- a/routers/repo/issue_label.go +++ /dev/null @@ -1,217 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - issue_service "code.gitea.io/gitea/services/issue" -) - -const ( - tplLabels base.TplName = "repo/issue/labels" -) - -// Labels render issue's labels page -func Labels(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.labels") - ctx.Data["PageIsIssueList"] = true - ctx.Data["PageIsLabels"] = true - ctx.Data["RequireTribute"] = true - ctx.Data["LabelTemplates"] = models.LabelTemplates - ctx.HTML(200, tplLabels) -} - -// InitializeLabels init labels for a repository -func InitializeLabels(ctx *context.Context, form auth.InitializeLabelsForm) { - if ctx.HasError() { - ctx.Redirect(ctx.Repo.RepoLink + "/labels") - return - } - - if err := models.InitializeLabels(models.DefaultDBContext(), ctx.Repo.Repository.ID, form.TemplateName, false); err != nil { - if models.IsErrIssueLabelTemplateLoad(err) { - originalErr := err.(models.ErrIssueLabelTemplateLoad).OriginalError - ctx.Flash.Error(ctx.Tr("repo.issues.label_templates.fail_to_load_file", form.TemplateName, originalErr)) - ctx.Redirect(ctx.Repo.RepoLink + "/labels") - return - } - ctx.ServerError("InitializeLabels", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/labels") -} - -// RetrieveLabels find all the labels of a repository and organization -func RetrieveLabels(ctx *context.Context) { - labels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID, ctx.Query("sort"), models.ListOptions{}) - if err != nil { - ctx.ServerError("RetrieveLabels.GetLabels", err) - return - } - - for _, l := range labels { - l.CalOpenIssues() - } - - ctx.Data["Labels"] = labels - - if ctx.Repo.Owner.IsOrganization() { - orgLabels, err := models.GetLabelsByOrgID(ctx.Repo.Owner.ID, ctx.Query("sort"), models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLabelsByOrgID", err) - return - } - for _, l := range orgLabels { - l.CalOpenOrgIssues(ctx.Repo.Repository.ID, l.ID) - } - ctx.Data["OrgLabels"] = orgLabels - - org, err := models.GetOrgByName(ctx.Repo.Owner.LowerName) - if err != nil { - ctx.ServerError("GetOrgByName", err) - return - } - if ctx.User != nil { - ctx.Org.IsOwner, err = org.IsOwnedBy(ctx.User.ID) - if err != nil { - ctx.ServerError("org.IsOwnedBy", err) - return - } - ctx.Org.OrgLink = setting.AppSubURL + "/org/" + org.LowerName - ctx.Data["IsOrganizationOwner"] = ctx.Org.IsOwner - ctx.Data["OrganizationLink"] = ctx.Org.OrgLink - } - } - ctx.Data["NumLabels"] = len(labels) - ctx.Data["SortType"] = ctx.Query("sort") -} - -// NewLabel create new label for repository -func NewLabel(ctx *context.Context, form auth.CreateLabelForm) { - ctx.Data["Title"] = ctx.Tr("repo.labels") - ctx.Data["PageIsLabels"] = true - - if ctx.HasError() { - ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) - ctx.Redirect(ctx.Repo.RepoLink + "/labels") - return - } - - l := &models.Label{ - RepoID: ctx.Repo.Repository.ID, - Name: form.Title, - Description: form.Description, - Color: form.Color, - } - if err := models.NewLabel(l); err != nil { - ctx.ServerError("NewLabel", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/labels") -} - -// UpdateLabel update a label's name and color -func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm) { - l, err := models.GetLabelInRepoByID(ctx.Repo.Repository.ID, form.ID) - if err != nil { - switch { - case models.IsErrRepoLabelNotExist(err): - ctx.Error(404) - default: - ctx.ServerError("UpdateLabel", err) - } - return - } - - l.Name = form.Title - l.Description = form.Description - l.Color = form.Color - if err := models.UpdateLabel(l); err != nil { - ctx.ServerError("UpdateLabel", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/labels") -} - -// DeleteLabel delete a label -func DeleteLabel(ctx *context.Context) { - if err := models.DeleteLabel(ctx.Repo.Repository.ID, ctx.QueryInt64("id")); err != nil { - ctx.Flash.Error("DeleteLabel: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("repo.issues.label_deletion_success")) - } - - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/labels", - }) -} - -// UpdateIssueLabel change issue's labels -func UpdateIssueLabel(ctx *context.Context) { - issues := getActionIssues(ctx) - if ctx.Written() { - return - } - - switch action := ctx.Query("action"); action { - case "clear": - for _, issue := range issues { - if err := issue_service.ClearLabels(issue, ctx.User); err != nil { - ctx.ServerError("ClearLabels", err) - return - } - } - case "attach", "detach", "toggle": - label, err := models.GetLabelByID(ctx.QueryInt64("id")) - if err != nil { - if models.IsErrRepoLabelNotExist(err) { - ctx.Error(404, "GetLabelByID") - } else { - ctx.ServerError("GetLabelByID", err) - } - return - } - - if action == "toggle" { - // detach if any issues already have label, otherwise attach - action = "attach" - for _, issue := range issues { - if issue.HasLabel(label.ID) { - action = "detach" - break - } - } - } - - if action == "attach" { - for _, issue := range issues { - if err = issue_service.AddLabel(issue, ctx.User, label); err != nil { - ctx.ServerError("AddLabel", err) - return - } - } - } else { - for _, issue := range issues { - if err = issue_service.RemoveLabel(issue, ctx.User, label); err != nil { - ctx.ServerError("RemoveLabel", err) - return - } - } - } - default: - log.Warn("Unrecognized action: %s", action) - ctx.Error(500) - return - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} diff --git a/routers/repo/issue_stopwatch.go b/routers/repo/issue_stopwatch.go deleted file mode 100644 index 28105dfe0..000000000 --- a/routers/repo/issue_stopwatch.go +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "net/http" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/context" -) - -// IssueStopwatch creates or stops a stopwatch for the given issue. -func IssueStopwatch(c *context.Context) { - issue := GetActionIssue(c) - if c.Written() { - return - } - - var showSuccessMessage bool - - if !models.StopwatchExists(c.User.ID, issue.ID) { - showSuccessMessage = true - } - - if !c.Repo.CanUseTimetracker(issue, c.User) { - c.NotFound("CanUseTimetracker", nil) - return - } - - if err := models.CreateOrStopIssueStopwatch(c.User, issue); err != nil { - c.ServerError("CreateOrStopIssueStopwatch", err) - return - } - - if showSuccessMessage { - c.Flash.Success(c.Tr("repo.issues.tracker_auto_close")) - } - - url := issue.HTMLURL() - c.Redirect(url, http.StatusSeeOther) -} - -// CancelStopwatch cancel the stopwatch -func CancelStopwatch(c *context.Context) { - issue := GetActionIssue(c) - if c.Written() { - return - } - if !c.Repo.CanUseTimetracker(issue, c.User) { - c.NotFound("CanUseTimetracker", nil) - return - } - - if err := models.CancelStopwatch(c.User, issue); err != nil { - c.ServerError("CancelStopwatch", err) - return - } - - url := issue.HTMLURL() - c.Redirect(url, http.StatusSeeOther) -} diff --git a/routers/repo/issue_timetrack.go b/routers/repo/issue_timetrack.go deleted file mode 100644 index 0f711bc73..000000000 --- a/routers/repo/issue_timetrack.go +++ /dev/null @@ -1,48 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "net/http" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/context" -) - -// AddTimeManually tracks time manually -func AddTimeManually(c *context.Context, form auth.AddTimeManuallyForm) { - issue := GetActionIssue(c) - if c.Written() { - return - } - if !c.Repo.CanUseTimetracker(issue, c.User) { - c.NotFound("CanUseTimetracker", nil) - return - } - url := issue.HTMLURL() - - if c.HasError() { - c.Flash.Error(c.GetErrMsg()) - c.Redirect(url) - return - } - - total := time.Duration(form.Hours)*time.Hour + time.Duration(form.Minutes)*time.Minute - - if total <= 0 { - c.Flash.Error(c.Tr("repo.issues.add_time_sum_to_small")) - c.Redirect(url, http.StatusSeeOther) - return - } - - if _, err := models.AddTime(c.User, issue, int64(total.Seconds()), time.Now()); err != nil { - c.ServerError("AddTime", err) - return - } - - c.Redirect(url, http.StatusSeeOther) -} diff --git a/routers/repo/lfs.go b/routers/repo/lfs.go deleted file mode 100644 index fb0e3b10e..000000000 --- a/routers/repo/lfs.go +++ /dev/null @@ -1,604 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "bufio" - "bytes" - "fmt" - gotemplate "html/template" - "io" - "io/ioutil" - "path" - "strconv" - "strings" - "sync" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/charset" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/git/pipeline" - "code.gitea.io/gitea/modules/lfs" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" -) - -const ( - tplSettingsLFS base.TplName = "repo/settings/lfs" - tplSettingsLFSLocks base.TplName = "repo/settings/lfs_locks" - tplSettingsLFSFile base.TplName = "repo/settings/lfs_file" - tplSettingsLFSFileFind base.TplName = "repo/settings/lfs_file_find" - tplSettingsLFSPointers base.TplName = "repo/settings/lfs_pointers" -) - -// LFSFiles shows a repository's LFS files -func LFSFiles(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSFiles", nil) - return - } - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - total, err := ctx.Repo.Repository.CountLFSMetaObjects() - if err != nil { - ctx.ServerError("LFSFiles", err) - return - } - ctx.Data["Total"] = total - - pager := context.NewPagination(int(total), setting.UI.ExplorePagingNum, page, 5) - ctx.Data["Title"] = ctx.Tr("repo.settings.lfs") - ctx.Data["PageIsSettingsLFS"] = true - lfsMetaObjects, err := ctx.Repo.Repository.GetLFSMetaObjects(pager.Paginater.Current(), setting.UI.ExplorePagingNum) - if err != nil { - ctx.ServerError("LFSFiles", err) - return - } - ctx.Data["LFSFiles"] = lfsMetaObjects - ctx.Data["Page"] = pager - ctx.HTML(200, tplSettingsLFS) -} - -// LFSLocks shows a repository's LFS locks -func LFSLocks(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSLocks", nil) - return - } - ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" - - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - total, err := models.CountLFSLockByRepoID(ctx.Repo.Repository.ID) - if err != nil { - ctx.ServerError("LFSLocks", err) - return - } - ctx.Data["Total"] = total - - pager := context.NewPagination(int(total), setting.UI.ExplorePagingNum, page, 5) - ctx.Data["Title"] = ctx.Tr("repo.settings.lfs_locks") - ctx.Data["PageIsSettingsLFS"] = true - lfsLocks, err := models.GetLFSLockByRepoID(ctx.Repo.Repository.ID, pager.Paginater.Current(), setting.UI.ExplorePagingNum) - if err != nil { - ctx.ServerError("LFSLocks", err) - return - } - ctx.Data["LFSLocks"] = lfsLocks - - if len(lfsLocks) == 0 { - ctx.Data["Page"] = pager - ctx.HTML(200, tplSettingsLFSLocks) - return - } - - // Clone base repo. - tmpBasePath, err := models.CreateTemporaryPath("locks") - if err != nil { - log.Error("Failed to create temporary path: %v", err) - ctx.ServerError("LFSLocks", err) - return - } - defer func() { - if err := models.RemoveTemporaryPath(tmpBasePath); err != nil { - log.Error("LFSLocks: RemoveTemporaryPath: %v", err) - } - }() - - if err := git.Clone(ctx.Repo.Repository.RepoPath(), tmpBasePath, git.CloneRepoOptions{ - Bare: true, - Shared: true, - }); err != nil { - log.Error("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err) - ctx.ServerError("LFSLocks", fmt.Errorf("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err)) - return - } - - gitRepo, err := git.OpenRepository(tmpBasePath) - if err != nil { - log.Error("Unable to open temporary repository: %s (%v)", tmpBasePath, err) - ctx.ServerError("LFSLocks", fmt.Errorf("Failed to open new temporary repository in: %s %v", tmpBasePath, err)) - return - } - defer gitRepo.Close() - - filenames := make([]string, len(lfsLocks)) - - for i, lock := range lfsLocks { - filenames[i] = lock.Path - } - - if err := gitRepo.ReadTreeToIndex(ctx.Repo.Repository.DefaultBranch); err != nil { - log.Error("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err) - ctx.ServerError("LFSLocks", fmt.Errorf("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err)) - return - } - - name2attribute2info, err := gitRepo.CheckAttribute(git.CheckAttributeOpts{ - Attributes: []string{"lockable"}, - Filenames: filenames, - CachedOnly: true, - }) - if err != nil { - log.Error("Unable to check attributes in %s (%v)", tmpBasePath, err) - ctx.ServerError("LFSLocks", err) - return - } - - lockables := make([]bool, len(lfsLocks)) - for i, lock := range lfsLocks { - attribute2info, has := name2attribute2info[lock.Path] - if !has { - continue - } - if attribute2info["lockable"] != "set" { - continue - } - lockables[i] = true - } - ctx.Data["Lockables"] = lockables - - filelist, err := gitRepo.LsFiles(filenames...) - if err != nil { - log.Error("Unable to lsfiles in %s (%v)", tmpBasePath, err) - ctx.ServerError("LFSLocks", err) - return - } - - filemap := make(map[string]bool, len(filelist)) - for _, name := range filelist { - filemap[name] = true - } - - linkable := make([]bool, len(lfsLocks)) - for i, lock := range lfsLocks { - linkable[i] = filemap[lock.Path] - } - ctx.Data["Linkable"] = linkable - - ctx.Data["Page"] = pager - ctx.HTML(200, tplSettingsLFSLocks) -} - -// LFSLockFile locks a file -func LFSLockFile(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSLocks", nil) - return - } - originalPath := ctx.Query("path") - lockPath := originalPath - if len(lockPath) == 0 { - ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_locking_path", originalPath)) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") - return - } - if lockPath[len(lockPath)-1] == '/' { - ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_lock_directory", originalPath)) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") - return - } - lockPath = path.Clean("/" + lockPath)[1:] - if len(lockPath) == 0 { - ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_locking_path", originalPath)) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") - return - } - - _, err := models.CreateLFSLock(&models.LFSLock{ - Repo: ctx.Repo.Repository, - Path: lockPath, - Owner: ctx.User, - }) - if err != nil { - if models.IsErrLFSLockAlreadyExist(err) { - ctx.Flash.Error(ctx.Tr("repo.settings.lfs_lock_already_exists", originalPath)) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") - return - } - ctx.ServerError("LFSLockFile", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") -} - -// LFSUnlock forcibly unlocks an LFS lock -func LFSUnlock(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSUnlock", nil) - return - } - _, err := models.DeleteLFSLockByID(ctx.ParamsInt64("lid"), ctx.User, true) - if err != nil { - ctx.ServerError("LFSUnlock", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") -} - -// LFSFileGet serves a single LFS file -func LFSFileGet(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSFileGet", nil) - return - } - ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" - oid := ctx.Params("oid") - ctx.Data["Title"] = oid - ctx.Data["PageIsSettingsLFS"] = true - meta, err := ctx.Repo.Repository.GetLFSMetaObjectByOid(oid) - if err != nil { - if err == models.ErrLFSObjectNotExist { - ctx.NotFound("LFSFileGet", nil) - return - } - ctx.ServerError("LFSFileGet", err) - return - } - ctx.Data["LFSFile"] = meta - dataRc, err := lfs.ReadMetaObject(meta) - if err != nil { - ctx.ServerError("LFSFileGet", err) - return - } - defer dataRc.Close() - buf := make([]byte, 1024) - n, err := dataRc.Read(buf) - if err != nil { - ctx.ServerError("Data", err) - return - } - buf = buf[:n] - - ctx.Data["IsTextFile"] = base.IsTextFile(buf) - isRepresentableAsText := base.IsRepresentableAsText(buf) - - fileSize := meta.Size - ctx.Data["FileSize"] = meta.Size - ctx.Data["RawFileLink"] = fmt.Sprintf("%s%s.git/info/lfs/objects/%s/%s", setting.AppURL, ctx.Repo.Repository.FullName(), meta.Oid, "direct") - switch { - case isRepresentableAsText: - // This will be true for SVGs. - if base.IsImageFile(buf) { - ctx.Data["IsImageFile"] = true - } - - if fileSize >= setting.UI.MaxDisplayFileSize { - ctx.Data["IsFileTooLarge"] = true - break - } - - d, _ := ioutil.ReadAll(dataRc) - buf = charset.ToUTF8WithFallback(append(buf, d...)) - - // Building code view blocks with line number on server side. - var fileContent string - if content, err := charset.ToUTF8WithErr(buf); err != nil { - log.Error("ToUTF8WithErr: %v", err) - fileContent = string(buf) - } else { - fileContent = content - } - - var output bytes.Buffer - lines := strings.Split(fileContent, "\n") - //Remove blank line at the end of file - if len(lines) > 0 && lines[len(lines)-1] == "" { - lines = lines[:len(lines)-1] - } - for index, line := range lines { - line = gotemplate.HTMLEscapeString(line) - if index != len(lines)-1 { - line += "\n" - } - output.WriteString(fmt.Sprintf(`
  • %s
  • `, index+1, index+1, line)) - } - ctx.Data["FileContent"] = gotemplate.HTML(output.String()) - - output.Reset() - for i := 0; i < len(lines); i++ { - output.WriteString(fmt.Sprintf(`%d`, i+1, i+1)) - } - ctx.Data["LineNums"] = gotemplate.HTML(output.String()) - - case base.IsPDFFile(buf): - ctx.Data["IsPDFFile"] = true - case base.IsVideoFile(buf): - ctx.Data["IsVideoFile"] = true - case base.IsAudioFile(buf): - ctx.Data["IsAudioFile"] = true - case base.IsImageFile(buf): - ctx.Data["IsImageFile"] = true - } - ctx.HTML(200, tplSettingsLFSFile) -} - -// LFSDelete disassociates the provided oid from the repository and if the lfs file is no longer associated with any repositories - deletes it -func LFSDelete(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSDelete", nil) - return - } - oid := ctx.Params("oid") - count, err := ctx.Repo.Repository.RemoveLFSMetaObjectByOid(oid) - if err != nil { - ctx.ServerError("LFSDelete", err) - return - } - // FIXME: Warning: the LFS store is not locked - and can't be locked - there could be a race condition here - // Please note a similar condition happens in models/repo.go DeleteRepository - if count == 0 { - oidPath := path.Join(oid[0:2], oid[2:4], oid[4:]) - err = storage.LFS.Delete(oidPath) - if err != nil { - ctx.ServerError("LFSDelete", err) - return - } - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs") -} - -// LFSFileFind guesses a sha for the provided oid (or uses the provided sha) and then finds the commits that contain this sha -func LFSFileFind(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSFind", nil) - return - } - oid := ctx.Query("oid") - size := ctx.QueryInt64("size") - if len(oid) == 0 || size == 0 { - ctx.NotFound("LFSFind", nil) - return - } - sha := ctx.Query("sha") - ctx.Data["Title"] = oid - ctx.Data["PageIsSettingsLFS"] = true - var hash git.SHA1 - if len(sha) == 0 { - meta := models.LFSMetaObject{Oid: oid, Size: size} - pointer := meta.Pointer() - hash = git.ComputeBlobHash([]byte(pointer)) - sha = hash.String() - } else { - hash = git.MustIDFromString(sha) - } - ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" - ctx.Data["Oid"] = oid - ctx.Data["Size"] = size - ctx.Data["SHA"] = sha - - results, err := pipeline.FindLFSFile(ctx.Repo.GitRepo, hash) - if err != nil && err != io.EOF { - log.Error("Failure in FindLFSFile: %v", err) - ctx.ServerError("LFSFind: FindLFSFile.", err) - return - } - - ctx.Data["Results"] = results - ctx.HTML(200, tplSettingsLFSFileFind) -} - -// LFSPointerFiles will search the repository for pointer files and report which are missing LFS files in the content store -func LFSPointerFiles(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSFileGet", nil) - return - } - ctx.Data["PageIsSettingsLFS"] = true - err := git.LoadGitVersion() - if err != nil { - log.Fatal("Error retrieving git version: %v", err) - } - ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" - - basePath := ctx.Repo.Repository.RepoPath() - - pointerChan := make(chan pointerResult) - - catFileCheckReader, catFileCheckWriter := io.Pipe() - shasToBatchReader, shasToBatchWriter := io.Pipe() - catFileBatchReader, catFileBatchWriter := io.Pipe() - errChan := make(chan error, 1) - wg := sync.WaitGroup{} - wg.Add(5) - - var numPointers, numAssociated, numNoExist, numAssociatable int - - go func() { - defer wg.Done() - pointers := make([]pointerResult, 0, 50) - for pointer := range pointerChan { - pointers = append(pointers, pointer) - if pointer.InRepo { - numAssociated++ - } - if !pointer.Exists { - numNoExist++ - } - if !pointer.InRepo && pointer.Accessible { - numAssociatable++ - } - } - numPointers = len(pointers) - ctx.Data["Pointers"] = pointers - ctx.Data["NumPointers"] = numPointers - ctx.Data["NumAssociated"] = numAssociated - ctx.Data["NumAssociatable"] = numAssociatable - ctx.Data["NumNoExist"] = numNoExist - ctx.Data["NumNotAssociated"] = numPointers - numAssociated - }() - go createPointerResultsFromCatFileBatch(catFileBatchReader, &wg, pointerChan, ctx.Repo.Repository, ctx.User) - go pipeline.CatFileBatch(shasToBatchReader, catFileBatchWriter, &wg, basePath) - go pipeline.BlobsLessThan1024FromCatFileBatchCheck(catFileCheckReader, shasToBatchWriter, &wg) - if git.CheckGitVersionAtLeast("2.6.0") != nil { - revListReader, revListWriter := io.Pipe() - shasToCheckReader, shasToCheckWriter := io.Pipe() - wg.Add(2) - go pipeline.CatFileBatchCheck(shasToCheckReader, catFileCheckWriter, &wg, basePath) - go pipeline.BlobsFromRevListObjects(revListReader, shasToCheckWriter, &wg) - go pipeline.RevListAllObjects(revListWriter, &wg, basePath, errChan) - } else { - go pipeline.CatFileBatchCheckAllObjects(catFileCheckWriter, &wg, basePath, errChan) - } - wg.Wait() - - select { - case err, has := <-errChan: - if has { - ctx.ServerError("LFSPointerFiles", err) - } - default: - } - ctx.HTML(200, tplSettingsLFSPointers) -} - -type pointerResult struct { - SHA string - Oid string - Size int64 - InRepo bool - Exists bool - Accessible bool -} - -func createPointerResultsFromCatFileBatch(catFileBatchReader *io.PipeReader, wg *sync.WaitGroup, pointerChan chan<- pointerResult, repo *models.Repository, user *models.User) { - defer wg.Done() - defer catFileBatchReader.Close() - contentStore := lfs.ContentStore{ObjectStorage: storage.LFS} - - bufferedReader := bufio.NewReader(catFileBatchReader) - buf := make([]byte, 1025) - for { - // File descriptor line: sha - sha, err := bufferedReader.ReadString(' ') - if err != nil { - _ = catFileBatchReader.CloseWithError(err) - break - } - // Throw away the blob - if _, err := bufferedReader.ReadString(' '); err != nil { - _ = catFileBatchReader.CloseWithError(err) - break - } - sizeStr, err := bufferedReader.ReadString('\n') - if err != nil { - _ = catFileBatchReader.CloseWithError(err) - break - } - size, err := strconv.Atoi(sizeStr[:len(sizeStr)-1]) - if err != nil { - _ = catFileBatchReader.CloseWithError(err) - break - } - pointerBuf := buf[:size+1] - if _, err := io.ReadFull(bufferedReader, pointerBuf); err != nil { - _ = catFileBatchReader.CloseWithError(err) - break - } - pointerBuf = pointerBuf[:size] - // Now we need to check if the pointerBuf is an LFS pointer - pointer := lfs.IsPointerFile(&pointerBuf) - if pointer == nil { - continue - } - - result := pointerResult{ - SHA: strings.TrimSpace(sha), - Oid: pointer.Oid, - Size: pointer.Size, - } - - // Then we need to check that this pointer is in the db - if _, err := repo.GetLFSMetaObjectByOid(pointer.Oid); err != nil { - if err != models.ErrLFSObjectNotExist { - _ = catFileBatchReader.CloseWithError(err) - break - } - } else { - result.InRepo = true - } - - result.Exists, err = contentStore.Exists(pointer) - if err != nil { - _ = catFileBatchReader.CloseWithError(err) - break - } - - if result.Exists { - if !result.InRepo { - // Can we fix? - // OK well that's "simple" - // - we need to check whether current user has access to a repo that has access to the file - result.Accessible, err = models.LFSObjectAccessible(user, result.Oid) - if err != nil { - _ = catFileBatchReader.CloseWithError(err) - break - } - } else { - result.Accessible = true - } - } - pointerChan <- result - } - close(pointerChan) -} - -// LFSAutoAssociate auto associates accessible lfs files -func LFSAutoAssociate(ctx *context.Context) { - if !setting.LFS.StartServer { - ctx.NotFound("LFSAutoAssociate", nil) - return - } - oids := ctx.QueryStrings("oid") - metas := make([]*models.LFSMetaObject, len(oids)) - for i, oid := range oids { - idx := strings.IndexRune(oid, ' ') - if idx < 0 || idx+1 > len(oid) { - ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s", oid)) - return - } - var err error - metas[i] = &models.LFSMetaObject{} - metas[i].Size, err = strconv.ParseInt(oid[idx+1:], 10, 64) - if err != nil { - ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s %v", oid, err)) - return - } - metas[i].Oid = oid[:idx] - //metas[i].RepositoryID = ctx.Repo.Repository.ID - } - if err := models.LFSAutoAssociate(metas, ctx.User, ctx.Repo.Repository.ID); err != nil { - ctx.ServerError("LFSAutoAssociate", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs") -} diff --git a/routers/repo/main_test.go b/routers/repo/main_test.go deleted file mode 100644 index 04bbeeb21..000000000 --- a/routers/repo/main_test.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "path/filepath" - "testing" - - "code.gitea.io/gitea/models" -) - -func TestMain(m *testing.M) { - models.MainTest(m, filepath.Join("..", "..")) -} diff --git a/routers/repo/migrate.go b/routers/repo/migrate.go deleted file mode 100644 index a628fd2e2..000000000 --- a/routers/repo/migrate.go +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "net/http" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/migrations" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/task" - "code.gitea.io/gitea/modules/util" -) - -const ( - tplMigrate base.TplName = "repo/migrate/migrate" -) - -// Migrate render migration of repository page -func Migrate(ctx *context.Context) { - if setting.Repository.DisableMigrations { - ctx.Error(http.StatusForbidden, "Migrate: the site administrator has disabled migrations") - return - } - - ctx.Data["Services"] = append([]structs.GitServiceType{structs.PlainGitService}, structs.SupportedFullGitService...) - serviceType := ctx.QueryInt("service_type") - if serviceType == 0 { - ctx.Data["Org"] = ctx.Query("org") - ctx.Data["Mirror"] = ctx.Query("mirror") - - ctx.HTML(200, tplMigrate) - return - } - - ctx.Data["Title"] = ctx.Tr("new_migrate") - ctx.Data["private"] = getRepoPrivate(ctx) - ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate - ctx.Data["DisableMirrors"] = setting.Repository.DisableMirrors - ctx.Data["mirror"] = ctx.Query("mirror") == "1" - ctx.Data["wiki"] = ctx.Query("wiki") == "1" - ctx.Data["milestones"] = ctx.Query("milestones") == "1" - ctx.Data["labels"] = ctx.Query("labels") == "1" - ctx.Data["issues"] = ctx.Query("issues") == "1" - ctx.Data["pull_requests"] = ctx.Query("pull_requests") == "1" - ctx.Data["releases"] = ctx.Query("releases") == "1" - ctx.Data["LFSActive"] = setting.LFS.StartServer - // Plain git should be first - ctx.Data["service"] = structs.GitServiceType(serviceType) - - ctxUser := checkContextUser(ctx, ctx.QueryInt64("org")) - if ctx.Written() { - return - } - ctx.Data["ContextUser"] = ctxUser - - ctx.HTML(200, base.TplName("repo/migrate/"+structs.GitServiceType(serviceType).Name())) -} - -func handleMigrateError(ctx *context.Context, owner *models.User, err error, name string, tpl base.TplName, form *auth.MigrateRepoForm) { - if setting.Repository.DisableMigrations { - ctx.Error(http.StatusForbidden, "MigrateError: the site administrator has disabled migrations") - return - } - - switch { - case migrations.IsRateLimitError(err): - ctx.RenderWithErr(ctx.Tr("form.visit_rate_limit"), tpl, form) - case migrations.IsTwoFactorAuthError(err): - ctx.RenderWithErr(ctx.Tr("form.2fa_auth_required"), tpl, form) - case models.IsErrReachLimitOfRepo(err): - ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form) - case models.IsErrRepoAlreadyExist(err): - ctx.Data["Err_RepoName"] = true - ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form) - case models.IsErrRepoFilesAlreadyExist(err): - ctx.Data["Err_RepoName"] = true - switch { - case ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories): - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt_or_delete"), tpl, form) - case setting.Repository.AllowAdoptionOfUnadoptedRepositories: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt"), tpl, form) - case setting.Repository.AllowDeleteOfUnadoptedRepositories: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.delete"), tpl, form) - default: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist"), tpl, form) - } - case models.IsErrNameReserved(err): - ctx.Data["Err_RepoName"] = true - ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tpl, form) - case models.IsErrNamePatternNotAllowed(err): - ctx.Data["Err_RepoName"] = true - ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tpl, form) - default: - remoteAddr, _ := auth.ParseRemoteAddr(form.CloneAddr, form.AuthUsername, form.AuthPassword, owner) - err = util.URLSanitizedError(err, remoteAddr) - if strings.Contains(err.Error(), "Authentication failed") || - strings.Contains(err.Error(), "Bad credentials") || - strings.Contains(err.Error(), "could not read Username") { - ctx.Data["Err_Auth"] = true - ctx.RenderWithErr(ctx.Tr("form.auth_failed", err.Error()), tpl, form) - } else if strings.Contains(err.Error(), "fatal:") { - ctx.Data["Err_CloneAddr"] = true - ctx.RenderWithErr(ctx.Tr("repo.migrate.failed", err.Error()), tpl, form) - } else { - ctx.ServerError(name, err) - } - } -} - -// MigratePost response for migrating from external git repository -func MigratePost(ctx *context.Context, form auth.MigrateRepoForm) { - if setting.Repository.DisableMigrations { - ctx.Error(http.StatusForbidden, "MigratePost: the site administrator has disabled migrations") - return - } - - ctx.Data["Title"] = ctx.Tr("new_migrate") - // Plain git should be first - ctx.Data["service"] = structs.GitServiceType(form.Service) - ctx.Data["Services"] = append([]structs.GitServiceType{structs.PlainGitService}, structs.SupportedFullGitService...) - - tpl := base.TplName("repo/migrate/" + structs.GitServiceType(form.Service).Name()) - - ctxUser := checkContextUser(ctx, form.UID) - if ctx.Written() { - return - } - ctx.Data["ContextUser"] = ctxUser - - if ctx.HasError() { - ctx.HTML(200, tpl) - return - } - - remoteAddr, err := auth.ParseRemoteAddr(form.CloneAddr, form.AuthUsername, form.AuthPassword, ctx.User) - if err != nil { - if models.IsErrInvalidCloneAddr(err) { - ctx.Data["Err_CloneAddr"] = true - addrErr := err.(models.ErrInvalidCloneAddr) - switch { - case addrErr.IsURLError: - ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, &form) - case addrErr.IsPermissionDenied: - ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tpl, &form) - case addrErr.IsInvalidPath: - ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_local_path"), tpl, &form) - default: - ctx.ServerError("Unknown error", err) - } - } else { - ctx.ServerError("ParseRemoteAddr", err) - } - return - } - - var opts = migrations.MigrateOptions{ - OriginalURL: form.CloneAddr, - GitServiceType: structs.GitServiceType(form.Service), - CloneAddr: remoteAddr, - RepoName: form.RepoName, - Description: form.Description, - Private: form.Private || setting.Repository.ForcePrivate, - Mirror: form.Mirror && !setting.Repository.DisableMirrors, - AuthUsername: form.AuthUsername, - AuthPassword: form.AuthPassword, - AuthToken: form.AuthToken, - Wiki: form.Wiki, - Issues: form.Issues, - Milestones: form.Milestones, - Labels: form.Labels, - Comments: form.Issues || form.PullRequests, - PullRequests: form.PullRequests, - Releases: form.Releases, - } - if opts.Mirror { - opts.Issues = false - opts.Milestones = false - opts.Labels = false - opts.Comments = false - opts.PullRequests = false - opts.Releases = false - } - - err = models.CheckCreateRepository(ctx.User, ctxUser, opts.RepoName, false) - if err != nil { - handleMigrateError(ctx, ctxUser, err, "MigratePost", tpl, &form) - return - } - - err = task.MigrateRepository(ctx.User, ctxUser, opts) - if err == nil { - ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + opts.RepoName) - return - } - - handleMigrateError(ctx, ctxUser, err, "MigratePost", tpl, &form) -} diff --git a/routers/repo/projects.go b/routers/repo/projects.go deleted file mode 100644 index 07327df9e..000000000 --- a/routers/repo/projects.go +++ /dev/null @@ -1,600 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "fmt" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/markup/markdown" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" -) - -const ( - tplProjects base.TplName = "repo/projects/list" - tplProjectsNew base.TplName = "repo/projects/new" - tplProjectsView base.TplName = "repo/projects/view" - tplGenericProjectsNew base.TplName = "user/project" -) - -// MustEnableProjects check if projects are enabled in settings -func MustEnableProjects(ctx *context.Context) { - if models.UnitTypeProjects.UnitGlobalDisabled() { - ctx.NotFound("EnableKanbanBoard", nil) - return - } - - if ctx.Repo.Repository != nil { - if !ctx.Repo.CanRead(models.UnitTypeProjects) { - ctx.NotFound("MustEnableProjects", nil) - return - } - } -} - -// Projects renders the home page of projects -func Projects(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.project_board") - - sortType := ctx.QueryTrim("sort") - - isShowClosed := strings.ToLower(ctx.QueryTrim("state")) == "closed" - repo := ctx.Repo.Repository - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - - ctx.Data["OpenCount"] = repo.NumOpenProjects - ctx.Data["ClosedCount"] = repo.NumClosedProjects - - var total int - if !isShowClosed { - total = repo.NumOpenProjects - } else { - total = repo.NumClosedProjects - } - - projects, count, err := models.GetProjects(models.ProjectSearchOptions{ - RepoID: repo.ID, - Page: page, - IsClosed: util.OptionalBoolOf(isShowClosed), - SortType: sortType, - Type: models.ProjectTypeRepository, - }) - if err != nil { - ctx.ServerError("GetProjects", err) - return - } - - for i := range projects { - projects[i].RenderedContent = string(markdown.Render([]byte(projects[i].Description), ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())) - } - - ctx.Data["Projects"] = projects - - if isShowClosed { - ctx.Data["State"] = "closed" - } else { - ctx.Data["State"] = "open" - } - - numPages := 0 - if count > 0 { - numPages = int((int(count) - 1) / setting.UI.IssuePagingNum) - } - - pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, numPages) - pager.AddParam(ctx, "state", "State") - ctx.Data["Page"] = pager - - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - ctx.Data["IsShowClosed"] = isShowClosed - ctx.Data["IsProjectsPage"] = true - ctx.Data["SortType"] = sortType - - ctx.HTML(200, tplProjects) -} - -// NewProject render creating a project page -func NewProject(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.projects.new") - ctx.Data["ProjectTypes"] = models.GetProjectsConfig() - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - ctx.HTML(200, tplProjectsNew) -} - -// NewProjectPost creates a new project -func NewProjectPost(ctx *context.Context, form auth.CreateProjectForm) { - ctx.Data["Title"] = ctx.Tr("repo.projects.new") - - if ctx.HasError() { - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - ctx.Data["ProjectTypes"] = models.GetProjectsConfig() - ctx.HTML(200, tplProjectsNew) - return - } - - if err := models.NewProject(&models.Project{ - RepoID: ctx.Repo.Repository.ID, - Title: form.Title, - Description: form.Content, - CreatorID: ctx.User.ID, - BoardType: form.BoardType, - Type: models.ProjectTypeRepository, - }); err != nil { - ctx.ServerError("NewProject", err) - return - } - - ctx.Flash.Success(ctx.Tr("repo.projects.create_success", form.Title)) - ctx.Redirect(ctx.Repo.RepoLink + "/projects") -} - -// ChangeProjectStatus updates the status of a project between "open" and "close" -func ChangeProjectStatus(ctx *context.Context) { - toClose := false - switch ctx.Params(":action") { - case "open": - toClose = false - case "close": - toClose = true - default: - ctx.Redirect(ctx.Repo.RepoLink + "/projects") - } - id := ctx.ParamsInt64(":id") - - if err := models.ChangeProjectStatusByRepoIDAndID(ctx.Repo.Repository.ID, id, toClose); err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", err) - } else { - ctx.ServerError("ChangeProjectStatusByIDAndRepoID", err) - } - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/projects?state=" + ctx.Params(":action")) -} - -// DeleteProject delete a project -func DeleteProject(ctx *context.Context) { - p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - if p.RepoID != ctx.Repo.Repository.ID { - ctx.NotFound("", nil) - return - } - - if err := models.DeleteProjectByID(p.ID); err != nil { - ctx.Flash.Error("DeleteProjectByID: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("repo.projects.deletion_success")) - } - - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/projects", - }) -} - -// EditProject allows a project to be edited -func EditProject(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.projects.edit") - ctx.Data["PageIsProjects"] = true - ctx.Data["PageIsEditProjects"] = true - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - - p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - if p.RepoID != ctx.Repo.Repository.ID { - ctx.NotFound("", nil) - return - } - - ctx.Data["title"] = p.Title - ctx.Data["content"] = p.Description - - ctx.HTML(200, tplProjectsNew) -} - -// EditProjectPost response for editing a project -func EditProjectPost(ctx *context.Context, form auth.CreateProjectForm) { - ctx.Data["Title"] = ctx.Tr("repo.projects.edit") - ctx.Data["PageIsProjects"] = true - ctx.Data["PageIsEditProjects"] = true - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - - if ctx.HasError() { - ctx.HTML(200, tplProjectsNew) - return - } - - p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - if p.RepoID != ctx.Repo.Repository.ID { - ctx.NotFound("", nil) - return - } - - p.Title = form.Title - p.Description = form.Content - if err = models.UpdateProject(p); err != nil { - ctx.ServerError("UpdateProjects", err) - return - } - - ctx.Flash.Success(ctx.Tr("repo.projects.edit_success", p.Title)) - ctx.Redirect(ctx.Repo.RepoLink + "/projects") -} - -// ViewProject renders the project board for a project -func ViewProject(ctx *context.Context) { - - project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - if project.RepoID != ctx.Repo.Repository.ID { - ctx.NotFound("", nil) - return - } - - uncategorizedBoard, err := models.GetUncategorizedBoard(project.ID) - uncategorizedBoard.Title = ctx.Tr("repo.projects.type.uncategorized") - if err != nil { - ctx.ServerError("GetUncategorizedBoard", err) - return - } - - boards, err := models.GetProjectBoards(project.ID) - if err != nil { - ctx.ServerError("GetProjectBoards", err) - return - } - - allBoards := models.ProjectBoardList{uncategorizedBoard} - allBoards = append(allBoards, boards...) - - if ctx.Data["Issues"], err = allBoards.LoadIssues(); err != nil { - ctx.ServerError("LoadIssuesOfBoards", err) - return - } - - project.RenderedContent = string(markdown.Render([]byte(project.Description), ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())) - - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - ctx.Data["Project"] = project - ctx.Data["Boards"] = allBoards - ctx.Data["PageIsProjects"] = true - ctx.Data["RequiresDraggable"] = true - - ctx.HTML(200, tplProjectsView) -} - -// UpdateIssueProject change an issue's project -func UpdateIssueProject(ctx *context.Context) { - issues := getActionIssues(ctx) - if ctx.Written() { - return - } - - projectID := ctx.QueryInt64("id") - for _, issue := range issues { - oldProjectID := issue.ProjectID() - if oldProjectID == projectID { - continue - } - - if err := models.ChangeProjectAssign(issue, ctx.User, projectID); err != nil { - ctx.ServerError("ChangeProjectAssign", err) - return - } - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// DeleteProjectBoard allows for the deletion of a project board -func DeleteProjectBoard(ctx *context.Context) { - if ctx.User == nil { - ctx.JSON(403, map[string]string{ - "message": "Only signed in users are allowed to perform this action.", - }) - return - } - - if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { - ctx.JSON(403, map[string]string{ - "message": "Only authorized users are allowed to perform this action.", - }) - return - } - - project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - - pb, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID")) - if err != nil { - ctx.InternalServerError(err) - return - } - if pb.ProjectID != ctx.ParamsInt64(":id") { - ctx.JSON(422, map[string]string{ - "message": fmt.Sprintf("ProjectBoard[%d] is not in Project[%d] as expected", pb.ID, project.ID), - }) - return - } - - if project.RepoID != ctx.Repo.Repository.ID { - ctx.JSON(422, map[string]string{ - "message": fmt.Sprintf("ProjectBoard[%d] is not in Repository[%d] as expected", pb.ID, ctx.Repo.Repository.ID), - }) - return - } - - if err := models.DeleteProjectBoardByID(ctx.ParamsInt64(":boardID")); err != nil { - ctx.ServerError("DeleteProjectBoardByID", err) - return - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// AddBoardToProjectPost allows a new board to be added to a project. -func AddBoardToProjectPost(ctx *context.Context, form auth.EditProjectBoardTitleForm) { - - if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { - ctx.JSON(403, map[string]string{ - "message": "Only authorized users are allowed to perform this action.", - }) - return - } - - project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - - if err := models.NewProjectBoard(&models.ProjectBoard{ - ProjectID: project.ID, - Title: form.Title, - CreatorID: ctx.User.ID, - }); err != nil { - ctx.ServerError("NewProjectBoard", err) - return - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// EditProjectBoardTitle allows a project board's title to be updated -func EditProjectBoardTitle(ctx *context.Context, form auth.EditProjectBoardTitleForm) { - - if ctx.User == nil { - ctx.JSON(403, map[string]string{ - "message": "Only signed in users are allowed to perform this action.", - }) - return - } - - if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { - ctx.JSON(403, map[string]string{ - "message": "Only authorized users are allowed to perform this action.", - }) - return - } - - project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - - board, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID")) - if err != nil { - ctx.InternalServerError(err) - return - } - if board.ProjectID != ctx.ParamsInt64(":id") { - ctx.JSON(422, map[string]string{ - "message": fmt.Sprintf("ProjectBoard[%d] is not in Project[%d] as expected", board.ID, project.ID), - }) - return - } - - if project.RepoID != ctx.Repo.Repository.ID { - ctx.JSON(422, map[string]string{ - "message": fmt.Sprintf("ProjectBoard[%d] is not in Repository[%d] as expected", board.ID, ctx.Repo.Repository.ID), - }) - return - } - - if form.Title != "" { - board.Title = form.Title - } - - if err := models.UpdateProjectBoard(board); err != nil { - ctx.ServerError("UpdateProjectBoard", err) - return - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// MoveIssueAcrossBoards move a card from one board to another in a project -func MoveIssueAcrossBoards(ctx *context.Context) { - - if ctx.User == nil { - ctx.JSON(403, map[string]string{ - "message": "Only signed in users are allowed to perform this action.", - }) - return - } - - if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { - ctx.JSON(403, map[string]string{ - "message": "Only authorized users are allowed to perform this action.", - }) - return - } - - p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) - if err != nil { - if models.IsErrProjectNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectByID", err) - } - return - } - if p.RepoID != ctx.Repo.Repository.ID { - ctx.NotFound("", nil) - return - } - - var board *models.ProjectBoard - - if ctx.ParamsInt64(":boardID") == 0 { - - board = &models.ProjectBoard{ - ID: 0, - ProjectID: 0, - Title: ctx.Tr("repo.projects.type.uncategorized"), - } - - } else { - board, err = models.GetProjectBoard(ctx.ParamsInt64(":boardID")) - if err != nil { - if models.IsErrProjectBoardNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetProjectBoard", err) - } - return - } - if board.ProjectID != p.ID { - ctx.NotFound("", nil) - return - } - } - - issue, err := models.GetIssueByID(ctx.ParamsInt64(":index")) - if err != nil { - if models.IsErrIssueNotExist(err) { - ctx.NotFound("", nil) - } else { - ctx.ServerError("GetIssueByID", err) - } - - return - } - - if err := models.MoveIssueAcrossProjectBoards(issue, board); err != nil { - ctx.ServerError("MoveIssueAcrossProjectBoards", err) - return - } - - ctx.JSON(200, map[string]interface{}{ - "ok": true, - }) -} - -// CreateProject renders the generic project creation page -func CreateProject(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.projects.new") - ctx.Data["ProjectTypes"] = models.GetProjectsConfig() - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - - ctx.HTML(200, tplGenericProjectsNew) -} - -// CreateProjectPost creates an individual and/or organization project -func CreateProjectPost(ctx *context.Context, form auth.UserCreateProjectForm) { - - user := checkContextUser(ctx, form.UID) - if ctx.Written() { - return - } - - ctx.Data["ContextUser"] = user - - if ctx.HasError() { - ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) - ctx.HTML(200, tplGenericProjectsNew) - return - } - - var projectType = models.ProjectTypeIndividual - if user.IsOrganization() { - projectType = models.ProjectTypeOrganization - } - - if err := models.NewProject(&models.Project{ - Title: form.Title, - Description: form.Content, - CreatorID: user.ID, - BoardType: form.BoardType, - Type: projectType, - }); err != nil { - ctx.ServerError("NewProject", err) - return - } - - ctx.Flash.Success(ctx.Tr("repo.projects.create_success", form.Title)) - ctx.Redirect(setting.AppSubURL + "/") -} diff --git a/routers/repo/pull.go b/routers/repo/pull.go deleted file mode 100644 index 1594e9a9c..000000000 --- a/routers/repo/pull.go +++ /dev/null @@ -1,1336 +0,0 @@ -// Copyright 2018 The Gitea Authors. -// Copyright 2014 The Gogs Authors. -// All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "container/list" - "crypto/subtle" - "fmt" - "net/http" - "path" - "strings" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" - repo_module "code.gitea.io/gitea/modules/repository" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/upload" - "code.gitea.io/gitea/modules/util" - "code.gitea.io/gitea/routers/utils" - "code.gitea.io/gitea/services/gitdiff" - pull_service "code.gitea.io/gitea/services/pull" - repo_service "code.gitea.io/gitea/services/repository" -) - -const ( - tplFork base.TplName = "repo/pulls/fork" - tplCompareDiff base.TplName = "repo/diff/compare" - tplPullCommits base.TplName = "repo/pulls/commits" - tplPullFiles base.TplName = "repo/pulls/files" - - pullRequestTemplateKey = "PullRequestTemplate" -) - -var ( - pullRequestTemplateCandidates = []string{ - "PULL_REQUEST_TEMPLATE.md", - "pull_request_template.md", - ".gitea/PULL_REQUEST_TEMPLATE.md", - ".gitea/pull_request_template.md", - ".github/PULL_REQUEST_TEMPLATE.md", - ".github/pull_request_template.md", - } -) - -func getRepository(ctx *context.Context, repoID int64) *models.Repository { - repo, err := models.GetRepositoryByID(repoID) - if err != nil { - if models.IsErrRepoNotExist(err) { - ctx.NotFound("GetRepositoryByID", nil) - } else { - ctx.ServerError("GetRepositoryByID", err) - } - return nil - } - - perm, err := models.GetUserRepoPermission(repo, ctx.User) - if err != nil { - ctx.ServerError("GetUserRepoPermission", err) - return nil - } - - if !perm.CanRead(models.UnitTypeCode) { - log.Trace("Permission Denied: User %-v cannot read %-v of repo %-v\n"+ - "User in repo has Permissions: %-+v", - ctx.User, - models.UnitTypeCode, - ctx.Repo, - perm) - ctx.NotFound("getRepository", nil) - return nil - } - return repo -} - -func getForkRepository(ctx *context.Context) *models.Repository { - forkRepo := getRepository(ctx, ctx.ParamsInt64(":repoid")) - if ctx.Written() { - return nil - } - - if forkRepo.IsEmpty { - log.Trace("Empty repository %-v", forkRepo) - ctx.NotFound("getForkRepository", nil) - return nil - } - - if err := forkRepo.GetOwner(); err != nil { - ctx.ServerError("GetOwner", err) - return nil - } - - ctx.Data["repo_name"] = forkRepo.Name - ctx.Data["description"] = forkRepo.Description - ctx.Data["IsPrivate"] = forkRepo.IsPrivate || forkRepo.Owner.Visibility == structs.VisibleTypePrivate - canForkToUser := forkRepo.OwnerID != ctx.User.ID && !ctx.User.HasForkedRepo(forkRepo.ID) - - ctx.Data["ForkFrom"] = forkRepo.Owner.Name + "/" + forkRepo.Name - ctx.Data["ForkFromOwnerID"] = forkRepo.Owner.ID - - if err := ctx.User.GetOwnedOrganizations(); err != nil { - ctx.ServerError("GetOwnedOrganizations", err) - return nil - } - var orgs []*models.User - for _, org := range ctx.User.OwnedOrgs { - if forkRepo.OwnerID != org.ID && !org.HasForkedRepo(forkRepo.ID) { - orgs = append(orgs, org) - } - } - - var traverseParentRepo = forkRepo - var err error - for { - if ctx.User.ID == traverseParentRepo.OwnerID { - canForkToUser = false - } else { - for i, org := range orgs { - if org.ID == traverseParentRepo.OwnerID { - orgs = append(orgs[:i], orgs[i+1:]...) - break - } - } - } - - if !traverseParentRepo.IsFork { - break - } - traverseParentRepo, err = models.GetRepositoryByID(traverseParentRepo.ForkID) - if err != nil { - ctx.ServerError("GetRepositoryByID", err) - return nil - } - } - - ctx.Data["CanForkToUser"] = canForkToUser - ctx.Data["Orgs"] = orgs - - if canForkToUser { - ctx.Data["ContextUser"] = ctx.User - } else if len(orgs) > 0 { - ctx.Data["ContextUser"] = orgs[0] - } - - return forkRepo -} - -// Fork render repository fork page -func Fork(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("new_fork") - - getForkRepository(ctx) - if ctx.Written() { - return - } - - ctx.HTML(200, tplFork) -} - -// ForkPost response for forking a repository -func ForkPost(ctx *context.Context, form auth.CreateRepoForm) { - ctx.Data["Title"] = ctx.Tr("new_fork") - - ctxUser := checkContextUser(ctx, form.UID) - if ctx.Written() { - return - } - - forkRepo := getForkRepository(ctx) - if ctx.Written() { - return - } - - ctx.Data["ContextUser"] = ctxUser - - if ctx.HasError() { - ctx.HTML(200, tplFork) - return - } - - var err error - var traverseParentRepo = forkRepo - for { - if ctxUser.ID == traverseParentRepo.OwnerID { - ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), tplFork, &form) - return - } - repo, has := models.HasForkedRepo(ctxUser.ID, traverseParentRepo.ID) - if has { - ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + repo.Name) - return - } - if !traverseParentRepo.IsFork { - break - } - traverseParentRepo, err = models.GetRepositoryByID(traverseParentRepo.ForkID) - if err != nil { - ctx.ServerError("GetRepositoryByID", err) - return - } - } - - // Check ownership of organization. - if ctxUser.IsOrganization() { - isOwner, err := ctxUser.IsOwnedBy(ctx.User.ID) - if err != nil { - ctx.ServerError("IsOwnedBy", err) - return - } else if !isOwner { - ctx.Error(403) - return - } - } - - repo, err := repo_service.ForkRepository(ctx.User, ctxUser, forkRepo, form.RepoName, form.Description) - if err != nil { - ctx.Data["Err_RepoName"] = true - switch { - case models.IsErrRepoAlreadyExist(err): - ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), tplFork, &form) - case models.IsErrNameReserved(err): - ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tplFork, &form) - case models.IsErrNamePatternNotAllowed(err): - ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplFork, &form) - default: - ctx.ServerError("ForkPost", err) - } - return - } - - log.Trace("Repository forked[%d]: %s/%s", forkRepo.ID, ctxUser.Name, repo.Name) - ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + repo.Name) -} - -func checkPullInfo(ctx *context.Context) *models.Issue { - issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) - if err != nil { - if models.IsErrIssueNotExist(err) { - ctx.NotFound("GetIssueByIndex", err) - } else { - ctx.ServerError("GetIssueByIndex", err) - } - return nil - } - if err = issue.LoadPoster(); err != nil { - ctx.ServerError("LoadPoster", err) - return nil - } - if err := issue.LoadRepo(); err != nil { - ctx.ServerError("LoadRepo", err) - return nil - } - ctx.Data["Title"] = fmt.Sprintf("#%d - %s", issue.Index, issue.Title) - ctx.Data["Issue"] = issue - - if !issue.IsPull { - ctx.NotFound("ViewPullCommits", nil) - return nil - } - - if err = issue.LoadPullRequest(); err != nil { - ctx.ServerError("LoadPullRequest", err) - return nil - } - - if err = issue.PullRequest.LoadHeadRepo(); err != nil { - ctx.ServerError("LoadHeadRepo", err) - return nil - } - - if ctx.IsSigned { - // Update issue-user. - if err = issue.ReadBy(ctx.User.ID); err != nil { - ctx.ServerError("ReadBy", err) - return nil - } - } - - return issue -} - -func setMergeTarget(ctx *context.Context, pull *models.PullRequest) { - if ctx.Repo.Owner.Name == pull.MustHeadUserName() { - ctx.Data["HeadTarget"] = pull.HeadBranch - } else if pull.HeadRepo == nil { - ctx.Data["HeadTarget"] = pull.MustHeadUserName() + ":" + pull.HeadBranch - } else { - ctx.Data["HeadTarget"] = pull.MustHeadUserName() + "/" + pull.HeadRepo.Name + ":" + pull.HeadBranch - } - ctx.Data["BaseTarget"] = pull.BaseBranch -} - -// PrepareMergedViewPullInfo show meta information for a merged pull request view page -func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo { - pull := issue.PullRequest - - setMergeTarget(ctx, pull) - ctx.Data["HasMerged"] = true - - compareInfo, err := ctx.Repo.GitRepo.GetCompareInfo(ctx.Repo.Repository.RepoPath(), - pull.MergeBase, pull.GetGitRefName()) - if err != nil { - if strings.Contains(err.Error(), "fatal: Not a valid object name") || strings.Contains(err.Error(), "unknown revision or path not in the working tree") { - ctx.Data["IsPullRequestBroken"] = true - ctx.Data["BaseTarget"] = pull.BaseBranch - ctx.Data["NumCommits"] = 0 - ctx.Data["NumFiles"] = 0 - return nil - } - - ctx.ServerError("GetCompareInfo", err) - return nil - } - ctx.Data["NumCommits"] = compareInfo.Commits.Len() - ctx.Data["NumFiles"] = compareInfo.NumFiles - - if compareInfo.Commits.Len() != 0 { - sha := compareInfo.Commits.Front().Value.(*git.Commit).ID.String() - commitStatuses, err := models.GetLatestCommitStatus(ctx.Repo.Repository.ID, sha, models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLatestCommitStatus", err) - return nil - } - if len(commitStatuses) != 0 { - ctx.Data["LatestCommitStatuses"] = commitStatuses - ctx.Data["LatestCommitStatus"] = models.CalcCommitStatus(commitStatuses) - } - } - - return compareInfo -} - -// PrepareViewPullInfo show meta information for a pull request preview page -func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo { - repo := ctx.Repo.Repository - pull := issue.PullRequest - - if err := pull.LoadHeadRepo(); err != nil { - ctx.ServerError("LoadHeadRepo", err) - return nil - } - - if err := pull.LoadBaseRepo(); err != nil { - ctx.ServerError("LoadBaseRepo", err) - return nil - } - - setMergeTarget(ctx, pull) - - if err := pull.LoadProtectedBranch(); err != nil { - ctx.ServerError("LoadProtectedBranch", err) - return nil - } - ctx.Data["EnableStatusCheck"] = pull.ProtectedBranch != nil && pull.ProtectedBranch.EnableStatusCheck - - baseGitRepo, err := git.OpenRepository(pull.BaseRepo.RepoPath()) - if err != nil { - ctx.ServerError("OpenRepository", err) - return nil - } - defer baseGitRepo.Close() - - if !baseGitRepo.IsBranchExist(pull.BaseBranch) { - ctx.Data["IsPullRequestBroken"] = true - ctx.Data["BaseTarget"] = pull.BaseBranch - ctx.Data["HeadTarget"] = pull.HeadBranch - - sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName()) - if err != nil { - ctx.ServerError(fmt.Sprintf("GetRefCommitID(%s)", pull.GetGitRefName()), err) - return nil - } - commitStatuses, err := models.GetLatestCommitStatus(repo.ID, sha, models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLatestCommitStatus", err) - return nil - } - if len(commitStatuses) > 0 { - ctx.Data["LatestCommitStatuses"] = commitStatuses - ctx.Data["LatestCommitStatus"] = models.CalcCommitStatus(commitStatuses) - } - - compareInfo, err := baseGitRepo.GetCompareInfo(pull.BaseRepo.RepoPath(), - pull.MergeBase, pull.GetGitRefName()) - if err != nil { - if strings.Contains(err.Error(), "fatal: Not a valid object name") { - ctx.Data["IsPullRequestBroken"] = true - ctx.Data["BaseTarget"] = pull.BaseBranch - ctx.Data["NumCommits"] = 0 - ctx.Data["NumFiles"] = 0 - return nil - } - - ctx.ServerError("GetCompareInfo", err) - return nil - } - - ctx.Data["NumCommits"] = compareInfo.Commits.Len() - ctx.Data["NumFiles"] = compareInfo.NumFiles - return compareInfo - } - - var headBranchExist bool - var headBranchSha string - // HeadRepo may be missing - if pull.HeadRepo != nil { - headGitRepo, err := git.OpenRepository(pull.HeadRepo.RepoPath()) - if err != nil { - ctx.ServerError("OpenRepository", err) - return nil - } - defer headGitRepo.Close() - - headBranchExist = headGitRepo.IsBranchExist(pull.HeadBranch) - - if headBranchExist { - headBranchSha, err = headGitRepo.GetBranchCommitID(pull.HeadBranch) - if err != nil { - ctx.ServerError("GetBranchCommitID", err) - return nil - } - } - } - - if headBranchExist { - ctx.Data["UpdateAllowed"], err = pull_service.IsUserAllowedToUpdate(pull, ctx.User) - if err != nil { - ctx.ServerError("IsUserAllowedToUpdate", err) - return nil - } - ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(pull) - } - - sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName()) - if err != nil { - if git.IsErrNotExist(err) { - ctx.Data["IsPullRequestBroken"] = true - if pull.IsSameRepo() { - ctx.Data["HeadTarget"] = pull.HeadBranch - } else if pull.HeadRepo == nil { - ctx.Data["HeadTarget"] = ":" + pull.HeadBranch - } else { - ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch - } - ctx.Data["BaseTarget"] = pull.BaseBranch - ctx.Data["NumCommits"] = 0 - ctx.Data["NumFiles"] = 0 - return nil - } - ctx.ServerError(fmt.Sprintf("GetRefCommitID(%s)", pull.GetGitRefName()), err) - return nil - } - - commitStatuses, err := models.GetLatestCommitStatus(repo.ID, sha, models.ListOptions{}) - if err != nil { - ctx.ServerError("GetLatestCommitStatus", err) - return nil - } - if len(commitStatuses) > 0 { - ctx.Data["LatestCommitStatuses"] = commitStatuses - ctx.Data["LatestCommitStatus"] = models.CalcCommitStatus(commitStatuses) - } - - if pull.ProtectedBranch != nil && pull.ProtectedBranch.EnableStatusCheck { - ctx.Data["is_context_required"] = func(context string) bool { - for _, c := range pull.ProtectedBranch.StatusCheckContexts { - if c == context { - return true - } - } - return false - } - ctx.Data["RequiredStatusCheckState"] = pull_service.MergeRequiredContextsCommitStatus(commitStatuses, pull.ProtectedBranch.StatusCheckContexts) - } - - ctx.Data["HeadBranchMovedOn"] = headBranchSha != sha - ctx.Data["HeadBranchCommitID"] = headBranchSha - ctx.Data["PullHeadCommitID"] = sha - - if pull.HeadRepo == nil || !headBranchExist || headBranchSha != sha { - ctx.Data["IsPullRequestBroken"] = true - if pull.IsSameRepo() { - ctx.Data["HeadTarget"] = pull.HeadBranch - } else if pull.HeadRepo == nil { - ctx.Data["HeadTarget"] = ":" + pull.HeadBranch - } else { - ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch - } - } - - compareInfo, err := baseGitRepo.GetCompareInfo(pull.BaseRepo.RepoPath(), - git.BranchPrefix+pull.BaseBranch, pull.GetGitRefName()) - if err != nil { - if strings.Contains(err.Error(), "fatal: Not a valid object name") { - ctx.Data["IsPullRequestBroken"] = true - ctx.Data["BaseTarget"] = pull.BaseBranch - ctx.Data["NumCommits"] = 0 - ctx.Data["NumFiles"] = 0 - return nil - } - - ctx.ServerError("GetCompareInfo", err) - return nil - } - - if pull.IsWorkInProgress() { - ctx.Data["IsPullWorkInProgress"] = true - ctx.Data["WorkInProgressPrefix"] = pull.GetWorkInProgressPrefix() - } - - if pull.IsFilesConflicted() { - ctx.Data["IsPullFilesConflicted"] = true - ctx.Data["ConflictedFiles"] = pull.ConflictedFiles - } - - ctx.Data["NumCommits"] = compareInfo.Commits.Len() - ctx.Data["NumFiles"] = compareInfo.NumFiles - return compareInfo -} - -// ViewPullCommits show commits for a pull request -func ViewPullCommits(ctx *context.Context) { - ctx.Data["PageIsPullList"] = true - ctx.Data["PageIsPullCommits"] = true - - issue := checkPullInfo(ctx) - if ctx.Written() { - return - } - pull := issue.PullRequest - - var commits *list.List - var prInfo *git.CompareInfo - if pull.HasMerged { - prInfo = PrepareMergedViewPullInfo(ctx, issue) - } else { - prInfo = PrepareViewPullInfo(ctx, issue) - } - - if ctx.Written() { - return - } else if prInfo == nil { - ctx.NotFound("ViewPullCommits", nil) - return - } - - ctx.Data["Username"] = ctx.Repo.Owner.Name - ctx.Data["Reponame"] = ctx.Repo.Repository.Name - commits = prInfo.Commits - commits = models.ValidateCommitsWithEmails(commits) - commits = models.ParseCommitsWithSignature(commits, ctx.Repo.Repository) - commits = models.ParseCommitsWithStatus(commits, ctx.Repo.Repository) - ctx.Data["Commits"] = commits - ctx.Data["CommitCount"] = commits.Len() - - getBranchData(ctx, issue) - ctx.HTML(200, tplPullCommits) -} - -// ViewPullFiles render pull request changed files list page -func ViewPullFiles(ctx *context.Context) { - ctx.Data["PageIsPullList"] = true - ctx.Data["PageIsPullFiles"] = true - - issue := checkPullInfo(ctx) - if ctx.Written() { - return - } - pull := issue.PullRequest - - whitespaceFlags := map[string]string{ - "ignore-all": "-w", - "ignore-change": "-b", - "ignore-eol": "--ignore-space-at-eol", - "": ""} - - var ( - diffRepoPath string - startCommitID string - endCommitID string - gitRepo *git.Repository - ) - - var headTarget string - var prInfo *git.CompareInfo - if pull.HasMerged { - prInfo = PrepareMergedViewPullInfo(ctx, issue) - } else { - prInfo = PrepareViewPullInfo(ctx, issue) - } - - if ctx.Written() { - return - } else if prInfo == nil { - ctx.NotFound("ViewPullFiles", nil) - return - } - - diffRepoPath = ctx.Repo.GitRepo.Path - gitRepo = ctx.Repo.GitRepo - - headCommitID, err := gitRepo.GetRefCommitID(pull.GetGitRefName()) - if err != nil { - ctx.ServerError("GetRefCommitID", err) - return - } - - startCommitID = prInfo.MergeBase - endCommitID = headCommitID - - headTarget = path.Join(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name) - ctx.Data["Username"] = ctx.Repo.Owner.Name - ctx.Data["Reponame"] = ctx.Repo.Repository.Name - ctx.Data["AfterCommitID"] = endCommitID - - diff, err := gitdiff.GetDiffRangeWithWhitespaceBehavior(diffRepoPath, - startCommitID, endCommitID, setting.Git.MaxGitDiffLines, - setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, - whitespaceFlags[ctx.Data["WhitespaceBehavior"].(string)]) - if err != nil { - ctx.ServerError("GetDiffRangeWithWhitespaceBehavior", err) - return - } - - if err = diff.LoadComments(issue, ctx.User); err != nil { - ctx.ServerError("LoadComments", err) - return - } - - if err = pull.LoadProtectedBranch(); err != nil { - ctx.ServerError("LoadProtectedBranch", err) - return - } - - if pull.ProtectedBranch != nil { - glob := pull.ProtectedBranch.GetProtectedFilePatterns() - if len(glob) != 0 { - for _, file := range diff.Files { - file.IsProtected = pull.ProtectedBranch.IsProtectedFile(glob, file.Name) - } - } - } - - ctx.Data["Diff"] = diff - ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0 - - baseCommit, err := ctx.Repo.GitRepo.GetCommit(startCommitID) - if err != nil { - ctx.ServerError("GetCommit", err) - return - } - commit, err := gitRepo.GetCommit(endCommitID) - if err != nil { - ctx.ServerError("GetCommit", err) - return - } - - if ctx.IsSigned && ctx.User != nil { - if ctx.Data["CanMarkConversation"], err = models.CanMarkConversation(issue, ctx.User); err != nil { - ctx.ServerError("CanMarkConversation", err) - return - } - } - - setImageCompareContext(ctx, baseCommit, commit) - setPathsCompareContext(ctx, baseCommit, commit, headTarget) - - ctx.Data["RequireHighlightJS"] = true - ctx.Data["RequireSimpleMDE"] = true - ctx.Data["RequireTribute"] = true - if ctx.Data["Assignees"], err = ctx.Repo.Repository.GetAssignees(); err != nil { - ctx.ServerError("GetAssignees", err) - return - } - handleTeamMentions(ctx) - if ctx.Written() { - return - } - ctx.Data["CurrentReview"], err = models.GetCurrentReview(ctx.User, issue) - if err != nil && !models.IsErrReviewNotExist(err) { - ctx.ServerError("GetCurrentReview", err) - return - } - getBranchData(ctx, issue) - ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID) - ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) - ctx.HTML(200, tplPullFiles) -} - -// UpdatePullRequest merge PR's baseBranch into headBranch -func UpdatePullRequest(ctx *context.Context) { - issue := checkPullInfo(ctx) - if ctx.Written() { - return - } - if issue.IsClosed { - ctx.NotFound("MergePullRequest", nil) - return - } - if issue.PullRequest.HasMerged { - ctx.NotFound("MergePullRequest", nil) - return - } - - if err := issue.PullRequest.LoadBaseRepo(); err != nil { - ctx.InternalServerError(err) - return - } - if err := issue.PullRequest.LoadHeadRepo(); err != nil { - ctx.InternalServerError(err) - return - } - - allowedUpdate, err := pull_service.IsUserAllowedToUpdate(issue.PullRequest, ctx.User) - if err != nil { - ctx.ServerError("IsUserAllowedToMerge", err) - return - } - - // ToDo: add check if maintainers are allowed to change branch ... (need migration & co) - if !allowedUpdate { - ctx.Flash.Error(ctx.Tr("repo.pulls.update_not_allowed")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } - - // default merge commit message - message := fmt.Sprintf("Merge branch '%s' into %s", issue.PullRequest.BaseBranch, issue.PullRequest.HeadBranch) - - if err = pull_service.Update(issue.PullRequest, ctx.User, message); err != nil { - if models.IsErrMergeConflicts(err) { - conflictError := err.(models.ErrMergeConflicts) - flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ - "Message": ctx.Tr("repo.pulls.merge_conflict"), - "Summary": ctx.Tr("repo.pulls.merge_conflict_summary"), - "Details": utils.SanitizeFlashErrorString(conflictError.StdErr) + "
    " + utils.SanitizeFlashErrorString(conflictError.StdOut), - }) - if err != nil { - ctx.ServerError("UpdatePullRequest.HTMLString", err) - return - } - ctx.Flash.Error(flashError) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } - ctx.Flash.Error(err.Error()) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } - - time.Sleep(1 * time.Second) - - ctx.Flash.Success(ctx.Tr("repo.pulls.update_branch_success")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) -} - -// MergePullRequest response for merging pull request -func MergePullRequest(ctx *context.Context, form auth.MergePullRequestForm) { - issue := checkPullInfo(ctx) - if ctx.Written() { - return - } - if issue.IsClosed { - if issue.IsPull { - ctx.Flash.Error(ctx.Tr("repo.pulls.is_closed")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } - ctx.Flash.Error(ctx.Tr("repo.issues.closed_title")) - ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + fmt.Sprint(issue.Index)) - return - } - - pr := issue.PullRequest - - allowedMerge, err := pull_service.IsUserAllowedToMerge(pr, ctx.Repo.Permission, ctx.User) - if err != nil { - ctx.ServerError("IsUserAllowedToMerge", err) - return - } - if !allowedMerge { - ctx.Flash.Error(ctx.Tr("repo.pulls.update_not_allowed")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } - - if !pr.CanAutoMerge() { - ctx.Flash.Error(ctx.Tr("repo.pulls.no_merge_not_ready")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } - - if pr.HasMerged { - ctx.Flash.Error(ctx.Tr("repo.pulls.has_merged")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) - return - } - - if pr.IsWorkInProgress() { - ctx.Flash.Error(ctx.Tr("repo.pulls.no_merge_wip")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } - - if err := pull_service.CheckPRReadyToMerge(pr, false); err != nil { - if !models.IsErrNotAllowedToMerge(err) { - ctx.ServerError("Merge PR status", err) - return - } - if isRepoAdmin, err := models.IsUserRepoAdmin(pr.BaseRepo, ctx.User); err != nil { - ctx.ServerError("IsUserRepoAdmin", err) - return - } else if !isRepoAdmin { - ctx.Flash.Error(ctx.Tr("repo.pulls.no_merge_not_ready")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } - } - - if ctx.HasError() { - ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } - - message := strings.TrimSpace(form.MergeTitleField) - if len(message) == 0 { - if models.MergeStyle(form.Do) == models.MergeStyleMerge { - message = pr.GetDefaultMergeMessage() - } - if models.MergeStyle(form.Do) == models.MergeStyleRebaseMerge { - message = pr.GetDefaultMergeMessage() - } - if models.MergeStyle(form.Do) == models.MergeStyleSquash { - message = pr.GetDefaultSquashMessage() - } - } - - form.MergeMessageField = strings.TrimSpace(form.MergeMessageField) - if len(form.MergeMessageField) > 0 { - message += "\n\n" + form.MergeMessageField - } - - pr.Issue = issue - pr.Issue.Repo = ctx.Repo.Repository - - noDeps, err := models.IssueNoDependenciesLeft(issue) - if err != nil { - return - } - - if !noDeps { - ctx.Flash.Error(ctx.Tr("repo.issues.dependency.pr_close_blocked")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } - - if err = pull_service.Merge(pr, ctx.User, ctx.Repo.GitRepo, models.MergeStyle(form.Do), message); err != nil { - if models.IsErrInvalidMergeStyle(err) { - ctx.Flash.Error(ctx.Tr("repo.pulls.invalid_merge_option")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } else if models.IsErrMergeConflicts(err) { - conflictError := err.(models.ErrMergeConflicts) - flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ - "Message": ctx.Tr("repo.editor.merge_conflict"), - "Summary": ctx.Tr("repo.editor.merge_conflict_summary"), - "Details": utils.SanitizeFlashErrorString(conflictError.StdErr) + "
    " + utils.SanitizeFlashErrorString(conflictError.StdOut), - }) - if err != nil { - ctx.ServerError("MergePullRequest.HTMLString", err) - return - } - ctx.Flash.Error(flashError) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } else if models.IsErrRebaseConflicts(err) { - conflictError := err.(models.ErrRebaseConflicts) - flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ - "Message": ctx.Tr("repo.pulls.rebase_conflict", utils.SanitizeFlashErrorString(conflictError.CommitSHA)), - "Summary": ctx.Tr("repo.pulls.rebase_conflict_summary"), - "Details": utils.SanitizeFlashErrorString(conflictError.StdErr) + "
    " + utils.SanitizeFlashErrorString(conflictError.StdOut), - }) - if err != nil { - ctx.ServerError("MergePullRequest.HTMLString", err) - return - } - ctx.Flash.Error(flashError) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } else if models.IsErrMergeUnrelatedHistories(err) { - log.Debug("MergeUnrelatedHistories error: %v", err) - ctx.Flash.Error(ctx.Tr("repo.pulls.unrelated_histories")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } else if git.IsErrPushOutOfDate(err) { - log.Debug("MergePushOutOfDate error: %v", err) - ctx.Flash.Error(ctx.Tr("repo.pulls.merge_out_of_date")) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } else if git.IsErrPushRejected(err) { - log.Debug("MergePushRejected error: %v", err) - pushrejErr := err.(*git.ErrPushRejected) - message := pushrejErr.Message - if len(message) == 0 { - ctx.Flash.Error(ctx.Tr("repo.pulls.push_rejected_no_message")) - } else { - flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ - "Message": ctx.Tr("repo.pulls.push_rejected"), - "Summary": ctx.Tr("repo.pulls.push_rejected_summary"), - "Details": utils.SanitizeFlashErrorString(pushrejErr.Message), - }) - if err != nil { - ctx.ServerError("MergePullRequest.HTMLString", err) - return - } - ctx.Flash.Error(flashError) - } - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) - return - } - ctx.ServerError("Merge", err) - return - } - - if err := stopTimerIfAvailable(ctx.User, issue); err != nil { - ctx.ServerError("CreateOrStopIssueStopwatch", err) - return - } - - log.Trace("Pull request merged: %d", pr.ID) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) -} - -func stopTimerIfAvailable(user *models.User, issue *models.Issue) error { - - if models.StopwatchExists(user.ID, issue.ID) { - if err := models.CreateOrStopIssueStopwatch(user, issue); err != nil { - return err - } - } - - return nil -} - -// CompareAndPullRequestPost response for creating pull request -func CompareAndPullRequestPost(ctx *context.Context, form auth.CreateIssueForm) { - ctx.Data["Title"] = ctx.Tr("repo.pulls.compare_changes") - ctx.Data["PageIsComparePull"] = true - ctx.Data["IsDiffCompare"] = true - ctx.Data["RequireHighlightJS"] = true - ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes - ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled - upload.AddUploadContext(ctx, "comment") - - var ( - repo = ctx.Repo.Repository - attachments []string - ) - - headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch := ParseCompareInfo(ctx) - if ctx.Written() { - return - } - defer headGitRepo.Close() - - labelIDs, assigneeIDs, milestoneID, _ := ValidateRepoMetas(ctx, form, true) - if ctx.Written() { - return - } - - if setting.Attachment.Enabled { - attachments = form.Files - } - - if ctx.HasError() { - auth.AssignForm(form, ctx.Data) - - // This stage is already stop creating new pull request, so it does not matter if it has - // something to compare or not. - PrepareCompareDiff(ctx, headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch) - if ctx.Written() { - return - } - - ctx.HTML(200, tplCompareDiff) - return - } - - if util.IsEmptyString(form.Title) { - PrepareCompareDiff(ctx, headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch) - if ctx.Written() { - return - } - - ctx.RenderWithErr(ctx.Tr("repo.issues.new.title_empty"), tplCompareDiff, form) - return - } - - pullIssue := &models.Issue{ - RepoID: repo.ID, - Title: form.Title, - PosterID: ctx.User.ID, - Poster: ctx.User, - MilestoneID: milestoneID, - IsPull: true, - Content: form.Content, - } - pullRequest := &models.PullRequest{ - HeadRepoID: headRepo.ID, - BaseRepoID: repo.ID, - HeadBranch: headBranch, - BaseBranch: baseBranch, - HeadRepo: headRepo, - BaseRepo: repo, - MergeBase: prInfo.MergeBase, - Type: models.PullRequestGitea, - } - // FIXME: check error in the case two people send pull request at almost same time, give nice error prompt - // instead of 500. - - if err := pull_service.NewPullRequest(repo, pullIssue, labelIDs, attachments, pullRequest, assigneeIDs); err != nil { - if models.IsErrUserDoesNotHaveAccessToRepo(err) { - ctx.Error(400, "UserDoesNotHaveAccessToRepo", err.Error()) - return - } else if git.IsErrPushRejected(err) { - pushrejErr := err.(*git.ErrPushRejected) - message := pushrejErr.Message - if len(message) == 0 { - ctx.Flash.Error(ctx.Tr("repo.pulls.push_rejected_no_message")) - } else { - flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ - "Message": ctx.Tr("repo.pulls.push_rejected"), - "Summary": ctx.Tr("repo.pulls.push_rejected_summary"), - "Details": utils.SanitizeFlashErrorString(pushrejErr.Message), - }) - if err != nil { - ctx.ServerError("CompareAndPullRequest.HTMLString", err) - return - } - ctx.Flash.Error(flashError) - } - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pullIssue.Index)) - return - } - ctx.ServerError("NewPullRequest", err) - return - } - - log.Trace("Pull request created: %d/%d", repo.ID, pullIssue.ID) - ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pullIssue.Index)) -} - -// TriggerTask response for a trigger task request -func TriggerTask(ctx *context.Context) { - pusherID := ctx.QueryInt64("pusher") - branch := ctx.Query("branch") - secret := ctx.Query("secret") - if len(branch) == 0 || len(secret) == 0 || pusherID <= 0 { - ctx.Error(404) - log.Trace("TriggerTask: branch or secret is empty, or pusher ID is not valid") - return - } - owner, repo := parseOwnerAndRepo(ctx) - if ctx.Written() { - return - } - got := []byte(base.EncodeMD5(owner.Salt)) - want := []byte(secret) - if subtle.ConstantTimeCompare(got, want) != 1 { - ctx.Error(404) - log.Trace("TriggerTask [%s/%s]: invalid secret", owner.Name, repo.Name) - return - } - - pusher, err := models.GetUserByID(pusherID) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Error(404) - } else { - ctx.ServerError("GetUserByID", err) - } - return - } - - log.Trace("TriggerTask '%s/%s' by %s", repo.Name, branch, pusher.Name) - - go pull_service.AddTestPullRequestTask(pusher, repo.ID, branch, true, "", "") - ctx.Status(202) -} - -// CleanUpPullRequest responses for delete merged branch when PR has been merged -func CleanUpPullRequest(ctx *context.Context) { - issue := checkPullInfo(ctx) - if ctx.Written() { - return - } - - pr := issue.PullRequest - - // Don't cleanup unmerged and unclosed PRs - if !pr.HasMerged && !issue.IsClosed { - ctx.NotFound("CleanUpPullRequest", nil) - return - } - - if err := pr.LoadHeadRepo(); err != nil { - ctx.ServerError("LoadHeadRepo", err) - return - } else if pr.HeadRepo == nil { - // Forked repository has already been deleted - ctx.NotFound("CleanUpPullRequest", nil) - return - } else if err = pr.LoadBaseRepo(); err != nil { - ctx.ServerError("LoadBaseRepo", err) - return - } else if err = pr.HeadRepo.GetOwner(); err != nil { - ctx.ServerError("HeadRepo.GetOwner", err) - return - } - - perm, err := models.GetUserRepoPermission(pr.HeadRepo, ctx.User) - if err != nil { - ctx.ServerError("GetUserRepoPermission", err) - return - } - if !perm.CanWrite(models.UnitTypeCode) { - ctx.NotFound("CleanUpPullRequest", nil) - return - } - - fullBranchName := pr.HeadRepo.Owner.Name + "/" + pr.HeadBranch - - gitRepo, err := git.OpenRepository(pr.HeadRepo.RepoPath()) - if err != nil { - ctx.ServerError(fmt.Sprintf("OpenRepository[%s]", pr.HeadRepo.RepoPath()), err) - return - } - defer gitRepo.Close() - - gitBaseRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) - if err != nil { - ctx.ServerError(fmt.Sprintf("OpenRepository[%s]", pr.BaseRepo.RepoPath()), err) - return - } - defer gitBaseRepo.Close() - - defer func() { - ctx.JSON(200, map[string]interface{}{ - "redirect": pr.BaseRepo.Link() + "/pulls/" + fmt.Sprint(issue.Index), - }) - }() - - if pr.HeadBranch == pr.HeadRepo.DefaultBranch || !gitRepo.IsBranchExist(pr.HeadBranch) { - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) - return - } - - // Check if branch is not protected - if protected, err := pr.HeadRepo.IsProtectedBranch(pr.HeadBranch, ctx.User); err != nil || protected { - if err != nil { - log.Error("HeadRepo.IsProtectedBranch: %v", err) - } - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) - return - } - - // Check if branch has no new commits - headCommitID, err := gitBaseRepo.GetRefCommitID(pr.GetGitRefName()) - if err != nil { - log.Error("GetRefCommitID: %v", err) - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) - return - } - branchCommitID, err := gitRepo.GetBranchCommitID(pr.HeadBranch) - if err != nil { - log.Error("GetBranchCommitID: %v", err) - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) - return - } - if headCommitID != branchCommitID { - ctx.Flash.Error(ctx.Tr("repo.branch.delete_branch_has_new_commits", fullBranchName)) - return - } - - if err := gitRepo.DeleteBranch(pr.HeadBranch, git.DeleteBranchOptions{ - Force: true, - }); err != nil { - log.Error("DeleteBranch: %v", err) - ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) - return - } - - if err := repo_service.PushUpdate( - &repo_module.PushUpdateOptions{ - RefFullName: git.BranchPrefix + pr.HeadBranch, - OldCommitID: branchCommitID, - NewCommitID: git.EmptySHA, - PusherID: ctx.User.ID, - PusherName: ctx.User.Name, - RepoUserName: pr.HeadRepo.Owner.Name, - RepoName: pr.HeadRepo.Name, - }); err != nil { - log.Error("Update: %v", err) - } - - if err := models.AddDeletePRBranchComment(ctx.User, pr.BaseRepo, issue.ID, pr.HeadBranch); err != nil { - // Do not fail here as branch has already been deleted - log.Error("DeleteBranch: %v", err) - } - - ctx.Flash.Success(ctx.Tr("repo.branch.deletion_success", fullBranchName)) -} - -// DownloadPullDiff render a pull's raw diff -func DownloadPullDiff(ctx *context.Context) { - DownloadPullDiffOrPatch(ctx, false) -} - -// DownloadPullPatch render a pull's raw patch -func DownloadPullPatch(ctx *context.Context) { - DownloadPullDiffOrPatch(ctx, true) -} - -// DownloadPullDiffOrPatch render a pull's raw diff or patch -func DownloadPullDiffOrPatch(ctx *context.Context, patch bool) { - issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) - if err != nil { - if models.IsErrIssueNotExist(err) { - ctx.NotFound("GetIssueByIndex", err) - } else { - ctx.ServerError("GetIssueByIndex", err) - } - return - } - - // Return not found if it's not a pull request - if !issue.IsPull { - ctx.NotFound("DownloadPullDiff", - fmt.Errorf("Issue is not a pull request")) - return - } - - if err = issue.LoadPullRequest(); err != nil { - ctx.ServerError("LoadPullRequest", err) - return - } - - pr := issue.PullRequest - - if err := pull_service.DownloadDiffOrPatch(pr, ctx, patch); err != nil { - ctx.ServerError("DownloadDiffOrPatch", err) - return - } -} - -// UpdatePullRequestTarget change pull request's target branch -func UpdatePullRequestTarget(ctx *context.Context) { - issue := GetActionIssue(ctx) - pr := issue.PullRequest - if ctx.Written() { - return - } - if !issue.IsPull { - ctx.Error(http.StatusNotFound) - return - } - - if !ctx.IsSigned || (!issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) { - ctx.Error(http.StatusForbidden) - return - } - - targetBranch := ctx.QueryTrim("target_branch") - if len(targetBranch) == 0 { - ctx.Error(http.StatusNoContent) - return - } - - if err := pull_service.ChangeTargetBranch(pr, ctx.User, targetBranch); err != nil { - if models.IsErrPullRequestAlreadyExists(err) { - err := err.(models.ErrPullRequestAlreadyExists) - - RepoRelPath := ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name - errorMessage := ctx.Tr("repo.pulls.has_pull_request", ctx.Repo.RepoLink, RepoRelPath, err.IssueID) - - ctx.Flash.Error(errorMessage) - ctx.JSON(http.StatusConflict, map[string]interface{}{ - "error": err.Error(), - "user_error": errorMessage, - }) - } else if models.IsErrIssueIsClosed(err) { - errorMessage := ctx.Tr("repo.pulls.is_closed") - - ctx.Flash.Error(errorMessage) - ctx.JSON(http.StatusConflict, map[string]interface{}{ - "error": err.Error(), - "user_error": errorMessage, - }) - } else if models.IsErrPullRequestHasMerged(err) { - errorMessage := ctx.Tr("repo.pulls.has_merged") - - ctx.Flash.Error(errorMessage) - ctx.JSON(http.StatusConflict, map[string]interface{}{ - "error": err.Error(), - "user_error": errorMessage, - }) - } else if models.IsErrBranchesEqual(err) { - errorMessage := ctx.Tr("repo.pulls.nothing_to_compare") - - ctx.Flash.Error(errorMessage) - ctx.JSON(http.StatusBadRequest, map[string]interface{}{ - "error": err.Error(), - "user_error": errorMessage, - }) - } else { - ctx.ServerError("UpdatePullRequestTarget", err) - } - return - } - notification.NotifyPullRequestChangeTargetBranch(ctx.User, pr, targetBranch) - - ctx.JSON(http.StatusOK, map[string]interface{}{ - "base_branch": pr.BaseBranch, - }) -} diff --git a/routers/repo/release.go b/routers/repo/release.go deleted file mode 100644 index 4d75c37c8..000000000 --- a/routers/repo/release.go +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "fmt" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/convert" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/markup/markdown" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/upload" - releaseservice "code.gitea.io/gitea/services/release" -) - -const ( - tplReleases base.TplName = "repo/release/list" - tplReleaseNew base.TplName = "repo/release/new" -) - -// calReleaseNumCommitsBehind calculates given release has how many commits behind release target. -func calReleaseNumCommitsBehind(repoCtx *context.Repository, release *models.Release, countCache map[string]int64) error { - // Fast return if release target is same as default branch. - if repoCtx.BranchName == release.Target { - release.NumCommitsBehind = repoCtx.CommitsCount - release.NumCommits - return nil - } - - // Get count if not exists - if _, ok := countCache[release.Target]; !ok { - if repoCtx.GitRepo.IsBranchExist(release.Target) { - commit, err := repoCtx.GitRepo.GetBranchCommit(release.Target) - if err != nil { - return fmt.Errorf("GetBranchCommit: %v", err) - } - countCache[release.Target], err = commit.CommitsCount() - if err != nil { - return fmt.Errorf("CommitsCount: %v", err) - } - } else { - // Use NumCommits of the newest release on that target - countCache[release.Target] = release.NumCommits - } - } - release.NumCommitsBehind = countCache[release.Target] - release.NumCommits - return nil -} - -// Releases render releases list page -func Releases(ctx *context.Context) { - releasesOrTags(ctx, false) -} - -// TagsList render tags list page -func TagsList(ctx *context.Context) { - releasesOrTags(ctx, true) -} - -func releasesOrTags(ctx *context.Context, isTagList bool) { - ctx.Data["PageIsReleaseList"] = true - ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch - - if isTagList { - ctx.Data["Title"] = ctx.Tr("repo.release.tags") - ctx.Data["PageIsTagList"] = true - } else { - ctx.Data["Title"] = ctx.Tr("repo.release.releases") - ctx.Data["PageIsTagList"] = false - } - - writeAccess := ctx.Repo.CanWrite(models.UnitTypeReleases) - ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived - - opts := models.FindReleasesOptions{ - ListOptions: models.ListOptions{ - Page: ctx.QueryInt("page"), - PageSize: convert.ToCorrectPageSize(ctx.QueryInt("limit")), - }, - IncludeDrafts: writeAccess, - IncludeTags: isTagList, - } - - releases, err := models.GetReleasesByRepoID(ctx.Repo.Repository.ID, opts) - if err != nil { - ctx.ServerError("GetReleasesByRepoID", err) - return - } - - count, err := models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, opts) - if err != nil { - ctx.ServerError("GetReleaseCountByRepoID", err) - return - } - - if err = models.GetReleaseAttachments(releases...); err != nil { - ctx.ServerError("GetReleaseAttachments", err) - return - } - - // Temporary cache commits count of used branches to speed up. - countCache := make(map[string]int64) - cacheUsers := make(map[int64]*models.User) - if ctx.User != nil { - cacheUsers[ctx.User.ID] = ctx.User - } - var ok bool - - for _, r := range releases { - if r.Publisher, ok = cacheUsers[r.PublisherID]; !ok { - r.Publisher, err = models.GetUserByID(r.PublisherID) - if err != nil { - if models.IsErrUserNotExist(err) { - r.Publisher = models.NewGhostUser() - } else { - ctx.ServerError("GetUserByID", err) - return - } - } - cacheUsers[r.PublisherID] = r.Publisher - } - if err := calReleaseNumCommitsBehind(ctx.Repo, r, countCache); err != nil { - ctx.ServerError("calReleaseNumCommitsBehind", err) - return - } - r.Note = markdown.RenderString(r.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas()) - } - - ctx.Data["Releases"] = releases - ctx.Data["ReleasesNum"] = len(releases) - - pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - - ctx.HTML(200, tplReleases) -} - -// SingleRelease renders a single release's page -func SingleRelease(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.release.releases") - ctx.Data["PageIsReleaseList"] = true - - writeAccess := ctx.Repo.CanWrite(models.UnitTypeReleases) - ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived - - release, err := models.GetRelease(ctx.Repo.Repository.ID, ctx.Params("*")) - if err != nil { - if models.IsErrReleaseNotExist(err) { - ctx.NotFound("GetRelease", err) - return - } - ctx.ServerError("GetReleasesByRepoID", err) - return - } - - err = models.GetReleaseAttachments(release) - if err != nil { - ctx.ServerError("GetReleaseAttachments", err) - return - } - - release.Publisher, err = models.GetUserByID(release.PublisherID) - if err != nil { - if models.IsErrUserNotExist(err) { - release.Publisher = models.NewGhostUser() - } else { - ctx.ServerError("GetUserByID", err) - return - } - } - if err := calReleaseNumCommitsBehind(ctx.Repo, release, make(map[string]int64)); err != nil { - ctx.ServerError("calReleaseNumCommitsBehind", err) - return - } - release.Note = markdown.RenderString(release.Note, ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas()) - - ctx.Data["Releases"] = []*models.Release{release} - ctx.HTML(200, tplReleases) -} - -// LatestRelease redirects to the latest release -func LatestRelease(ctx *context.Context) { - release, err := models.GetLatestReleaseByRepoID(ctx.Repo.Repository.ID) - if err != nil { - if models.IsErrReleaseNotExist(err) { - ctx.NotFound("LatestRelease", err) - return - } - ctx.ServerError("GetLatestReleaseByRepoID", err) - return - } - - if err := release.LoadAttributes(); err != nil { - ctx.ServerError("LoadAttributes", err) - return - } - - ctx.Redirect(release.HTMLURL()) -} - -// NewRelease render creating release page -func NewRelease(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.release.new_release") - ctx.Data["PageIsReleaseList"] = true - ctx.Data["tag_target"] = ctx.Repo.Repository.DefaultBranch - if tagName := ctx.Query("tag"); len(tagName) > 0 { - rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) - if err != nil && !models.IsErrReleaseNotExist(err) { - ctx.ServerError("GetRelease", err) - return - } - - if rel != nil { - ctx.Data["tag_name"] = rel.TagName - ctx.Data["tag_target"] = rel.Target - ctx.Data["title"] = rel.Title - ctx.Data["content"] = rel.Note - } - } - ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled - upload.AddUploadContext(ctx, "release") - ctx.HTML(200, tplReleaseNew) -} - -// NewReleasePost response for creating a release -func NewReleasePost(ctx *context.Context, form auth.NewReleaseForm) { - ctx.Data["Title"] = ctx.Tr("repo.release.new_release") - ctx.Data["PageIsReleaseList"] = true - - if ctx.HasError() { - ctx.HTML(200, tplReleaseNew) - return - } - - if !ctx.Repo.GitRepo.IsBranchExist(form.Target) { - ctx.RenderWithErr(ctx.Tr("form.target_branch_not_exist"), tplReleaseNew, &form) - return - } - - var attachmentUUIDs []string - if setting.Attachment.Enabled { - attachmentUUIDs = form.Files - } - - rel, err := models.GetRelease(ctx.Repo.Repository.ID, form.TagName) - if err != nil { - if !models.IsErrReleaseNotExist(err) { - ctx.ServerError("GetRelease", err) - return - } - - rel = &models.Release{ - RepoID: ctx.Repo.Repository.ID, - PublisherID: ctx.User.ID, - Title: form.Title, - TagName: form.TagName, - Target: form.Target, - Note: form.Content, - IsDraft: len(form.Draft) > 0, - IsPrerelease: form.Prerelease, - IsTag: false, - } - - if err = releaseservice.CreateRelease(ctx.Repo.GitRepo, rel, attachmentUUIDs); err != nil { - ctx.Data["Err_TagName"] = true - switch { - case models.IsErrReleaseAlreadyExist(err): - ctx.RenderWithErr(ctx.Tr("repo.release.tag_name_already_exist"), tplReleaseNew, &form) - case models.IsErrInvalidTagName(err): - ctx.RenderWithErr(ctx.Tr("repo.release.tag_name_invalid"), tplReleaseNew, &form) - default: - ctx.ServerError("CreateRelease", err) - } - return - } - } else { - if !rel.IsTag { - ctx.Data["Err_TagName"] = true - ctx.RenderWithErr(ctx.Tr("repo.release.tag_name_already_exist"), tplReleaseNew, &form) - return - } - - rel.Title = form.Title - rel.Note = form.Content - rel.Target = form.Target - rel.IsDraft = len(form.Draft) > 0 - rel.IsPrerelease = form.Prerelease - rel.PublisherID = ctx.User.ID - rel.IsTag = false - - if err = releaseservice.UpdateReleaseOrCreatReleaseFromTag(ctx.User, ctx.Repo.GitRepo, rel, attachmentUUIDs, true); err != nil { - ctx.Data["Err_TagName"] = true - ctx.ServerError("UpdateReleaseOrCreatReleaseFromTag", err) - return - } - } - log.Trace("Release created: %s/%s:%s", ctx.User.LowerName, ctx.Repo.Repository.Name, form.TagName) - - ctx.Redirect(ctx.Repo.RepoLink + "/releases") -} - -// EditRelease render release edit page -func EditRelease(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.release.edit_release") - ctx.Data["PageIsReleaseList"] = true - ctx.Data["PageIsEditRelease"] = true - ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled - upload.AddUploadContext(ctx, "release") - - tagName := ctx.Params("*") - rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) - if err != nil { - if models.IsErrReleaseNotExist(err) { - ctx.NotFound("GetRelease", err) - } else { - ctx.ServerError("GetRelease", err) - } - return - } - ctx.Data["ID"] = rel.ID - ctx.Data["tag_name"] = rel.TagName - ctx.Data["tag_target"] = rel.Target - ctx.Data["title"] = rel.Title - ctx.Data["content"] = rel.Note - ctx.Data["prerelease"] = rel.IsPrerelease - ctx.Data["IsDraft"] = rel.IsDraft - - ctx.HTML(200, tplReleaseNew) -} - -// EditReleasePost response for edit release -func EditReleasePost(ctx *context.Context, form auth.EditReleaseForm) { - ctx.Data["Title"] = ctx.Tr("repo.release.edit_release") - ctx.Data["PageIsReleaseList"] = true - ctx.Data["PageIsEditRelease"] = true - - tagName := ctx.Params("*") - rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) - if err != nil { - if models.IsErrReleaseNotExist(err) { - ctx.NotFound("GetRelease", err) - } else { - ctx.ServerError("GetRelease", err) - } - return - } - if rel.IsTag { - ctx.NotFound("GetRelease", err) - return - } - ctx.Data["tag_name"] = rel.TagName - ctx.Data["tag_target"] = rel.Target - ctx.Data["title"] = rel.Title - ctx.Data["content"] = rel.Note - ctx.Data["prerelease"] = rel.IsPrerelease - - if ctx.HasError() { - ctx.HTML(200, tplReleaseNew) - return - } - - var attachmentUUIDs []string - if setting.Attachment.Enabled { - attachmentUUIDs = form.Files - } - - rel.Title = form.Title - rel.Note = form.Content - rel.IsDraft = len(form.Draft) > 0 - rel.IsPrerelease = form.Prerelease - if err = releaseservice.UpdateReleaseOrCreatReleaseFromTag(ctx.User, ctx.Repo.GitRepo, rel, attachmentUUIDs, false); err != nil { - ctx.ServerError("UpdateRelease", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/releases") -} - -// DeleteRelease delete a release -func DeleteRelease(ctx *context.Context) { - deleteReleaseOrTag(ctx, false) -} - -// DeleteTag delete a tag -func DeleteTag(ctx *context.Context) { - deleteReleaseOrTag(ctx, true) -} - -func deleteReleaseOrTag(ctx *context.Context, isDelTag bool) { - if err := releaseservice.DeleteReleaseByID(ctx.QueryInt64("id"), ctx.User, isDelTag); err != nil { - ctx.Flash.Error("DeleteReleaseByID: " + err.Error()) - } else { - if isDelTag { - ctx.Flash.Success(ctx.Tr("repo.release.deletion_tag_success")) - } else { - ctx.Flash.Success(ctx.Tr("repo.release.deletion_success")) - } - } - - if isDelTag { - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/tags", - }) - return - } - - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/releases", - }) -} diff --git a/routers/repo/repo.go b/routers/repo/repo.go deleted file mode 100644 index 2614389aa..000000000 --- a/routers/repo/repo.go +++ /dev/null @@ -1,372 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "fmt" - "strings" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - archiver_service "code.gitea.io/gitea/services/archiver" - repo_service "code.gitea.io/gitea/services/repository" -) - -const ( - tplCreate base.TplName = "repo/create" - tplAlertDetails base.TplName = "base/alert_details" -) - -// MustBeNotEmpty render when a repo is a empty git dir -func MustBeNotEmpty(ctx *context.Context) { - if ctx.Repo.Repository.IsEmpty { - ctx.NotFound("MustBeNotEmpty", nil) - } -} - -// MustBeEditable check that repo can be edited -func MustBeEditable(ctx *context.Context) { - if !ctx.Repo.Repository.CanEnableEditor() || ctx.Repo.IsViewCommit { - ctx.NotFound("", nil) - return - } -} - -// MustBeAbleToUpload check that repo can be uploaded to -func MustBeAbleToUpload(ctx *context.Context) { - if !setting.Repository.Upload.Enabled { - ctx.NotFound("", nil) - } -} - -func checkContextUser(ctx *context.Context, uid int64) *models.User { - orgs, err := models.GetOrgsCanCreateRepoByUserID(ctx.User.ID) - if err != nil { - ctx.ServerError("GetOrgsCanCreateRepoByUserID", err) - return nil - } - - if !ctx.User.IsAdmin { - orgsAvailable := []*models.User{} - for i := 0; i < len(orgs); i++ { - if orgs[i].CanCreateRepo() { - orgsAvailable = append(orgsAvailable, orgs[i]) - } - } - ctx.Data["Orgs"] = orgsAvailable - } else { - ctx.Data["Orgs"] = orgs - } - - // Not equal means current user is an organization. - if uid == ctx.User.ID || uid == 0 { - return ctx.User - } - - org, err := models.GetUserByID(uid) - if models.IsErrUserNotExist(err) { - return ctx.User - } - - if err != nil { - ctx.ServerError("GetUserByID", fmt.Errorf("[%d]: %v", uid, err)) - return nil - } - - // Check ownership of organization. - if !org.IsOrganization() { - ctx.Error(403) - return nil - } - if !ctx.User.IsAdmin { - canCreate, err := org.CanCreateOrgRepo(ctx.User.ID) - if err != nil { - ctx.ServerError("CanCreateOrgRepo", err) - return nil - } else if !canCreate { - ctx.Error(403) - return nil - } - } else { - ctx.Data["Orgs"] = orgs - } - return org -} - -func getRepoPrivate(ctx *context.Context) bool { - switch strings.ToLower(setting.Repository.DefaultPrivate) { - case setting.RepoCreatingLastUserVisibility: - return ctx.User.LastRepoVisibility - case setting.RepoCreatingPrivate: - return true - case setting.RepoCreatingPublic: - return false - default: - return ctx.User.LastRepoVisibility - } -} - -// Create render creating repository page -func Create(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("new_repo") - - // Give default value for template to render. - ctx.Data["Gitignores"] = models.Gitignores - ctx.Data["LabelTemplates"] = models.LabelTemplates - ctx.Data["Licenses"] = models.Licenses - ctx.Data["Readmes"] = models.Readmes - ctx.Data["readme"] = "Default" - ctx.Data["private"] = getRepoPrivate(ctx) - ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate - ctx.Data["default_branch"] = setting.Repository.DefaultBranch - - ctxUser := checkContextUser(ctx, ctx.QueryInt64("org")) - if ctx.Written() { - return - } - ctx.Data["ContextUser"] = ctxUser - - ctx.Data["repo_template_name"] = ctx.Tr("repo.template_select") - templateID := ctx.QueryInt64("template_id") - if templateID > 0 { - templateRepo, err := models.GetRepositoryByID(templateID) - if err == nil && templateRepo.CheckUnitUser(ctxUser, models.UnitTypeCode) { - ctx.Data["repo_template"] = templateID - ctx.Data["repo_template_name"] = templateRepo.Name - } - } - - if !ctx.User.CanCreateRepo() { - ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", ctx.User.MaxCreationLimit()), tplCreate, nil) - } else { - ctx.HTML(200, tplCreate) - } -} - -func handleCreateError(ctx *context.Context, owner *models.User, err error, name string, tpl base.TplName, form interface{}) { - switch { - case models.IsErrReachLimitOfRepo(err): - ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form) - case models.IsErrRepoAlreadyExist(err): - ctx.Data["Err_RepoName"] = true - ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form) - case models.IsErrRepoFilesAlreadyExist(err): - ctx.Data["Err_RepoName"] = true - switch { - case ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories): - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt_or_delete"), tpl, form) - case setting.Repository.AllowAdoptionOfUnadoptedRepositories: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt"), tpl, form) - case setting.Repository.AllowDeleteOfUnadoptedRepositories: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.delete"), tpl, form) - default: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist"), tpl, form) - } - case models.IsErrNameReserved(err): - ctx.Data["Err_RepoName"] = true - ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tpl, form) - case models.IsErrNamePatternNotAllowed(err): - ctx.Data["Err_RepoName"] = true - ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tpl, form) - default: - ctx.ServerError(name, err) - } -} - -// CreatePost response for creating repository -func CreatePost(ctx *context.Context, form auth.CreateRepoForm) { - ctx.Data["Title"] = ctx.Tr("new_repo") - - ctx.Data["Gitignores"] = models.Gitignores - ctx.Data["LabelTemplates"] = models.LabelTemplates - ctx.Data["Licenses"] = models.Licenses - ctx.Data["Readmes"] = models.Readmes - - ctxUser := checkContextUser(ctx, form.UID) - if ctx.Written() { - return - } - ctx.Data["ContextUser"] = ctxUser - - if ctx.HasError() { - ctx.HTML(200, tplCreate) - return - } - - var repo *models.Repository - var err error - if form.RepoTemplate > 0 { - opts := models.GenerateRepoOptions{ - Name: form.RepoName, - Description: form.Description, - Private: form.Private, - GitContent: form.GitContent, - Topics: form.Topics, - GitHooks: form.GitHooks, - Webhooks: form.Webhooks, - Avatar: form.Avatar, - IssueLabels: form.Labels, - } - - if !opts.IsValid() { - ctx.RenderWithErr(ctx.Tr("repo.template.one_item"), tplCreate, form) - return - } - - templateRepo := getRepository(ctx, form.RepoTemplate) - if ctx.Written() { - return - } - - if !templateRepo.IsTemplate { - ctx.RenderWithErr(ctx.Tr("repo.template.invalid"), tplCreate, form) - return - } - - repo, err = repo_service.GenerateRepository(ctx.User, ctxUser, templateRepo, opts) - if err == nil { - log.Trace("Repository generated [%d]: %s/%s", repo.ID, ctxUser.Name, repo.Name) - ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + repo.Name) - return - } - } else { - repo, err = repo_service.CreateRepository(ctx.User, ctxUser, models.CreateRepoOptions{ - Name: form.RepoName, - Description: form.Description, - Gitignores: form.Gitignores, - IssueLabels: form.IssueLabels, - License: form.License, - Readme: form.Readme, - IsPrivate: form.Private || setting.Repository.ForcePrivate, - DefaultBranch: form.DefaultBranch, - AutoInit: form.AutoInit, - IsTemplate: form.Template, - TrustModel: models.ToTrustModel(form.TrustModel), - }) - if err == nil { - log.Trace("Repository created [%d]: %s/%s", repo.ID, ctxUser.Name, repo.Name) - ctx.Redirect(setting.AppSubURL + "/" + ctxUser.Name + "/" + repo.Name) - return - } - } - - handleCreateError(ctx, ctxUser, err, "CreatePost", tplCreate, &form) -} - -// Action response for actions to a repository -func Action(ctx *context.Context) { - var err error - switch ctx.Params(":action") { - case "watch": - err = models.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, true) - case "unwatch": - err = models.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, false) - case "star": - err = models.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, true) - case "unstar": - err = models.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, false) - case "desc": // FIXME: this is not used - if !ctx.Repo.IsOwner() { - ctx.Error(404) - return - } - - ctx.Repo.Repository.Description = ctx.Query("desc") - ctx.Repo.Repository.Website = ctx.Query("site") - err = models.UpdateRepository(ctx.Repo.Repository, false) - } - - if err != nil { - ctx.ServerError(fmt.Sprintf("Action (%s)", ctx.Params(":action")), err) - return - } - - ctx.RedirectToFirst(ctx.Query("redirect_to"), ctx.Repo.RepoLink) -} - -// RedirectDownload return a file based on the following infos: -func RedirectDownload(ctx *context.Context) { - var ( - vTag = ctx.Params("vTag") - fileName = ctx.Params("fileName") - ) - tagNames := []string{vTag} - curRepo := ctx.Repo.Repository - releases, err := models.GetReleasesByRepoIDAndNames(models.DefaultDBContext(), curRepo.ID, tagNames) - if err != nil { - if models.IsErrAttachmentNotExist(err) { - ctx.Error(404) - return - } - ctx.ServerError("RedirectDownload", err) - return - } - if len(releases) == 1 { - release := releases[0] - att, err := models.GetAttachmentByReleaseIDFileName(release.ID, fileName) - if err != nil { - ctx.Error(404) - return - } - if att != nil { - ctx.Redirect(att.DownloadURL()) - return - } - } - ctx.Error(404) -} - -// Download an archive of a repository -func Download(ctx *context.Context) { - uri := ctx.Params("*") - aReq := archiver_service.DeriveRequestFrom(ctx, uri) - - if aReq == nil { - ctx.Error(404) - return - } - - downloadName := ctx.Repo.Repository.Name + "-" + aReq.GetArchiveName() - complete := aReq.IsComplete() - if !complete { - aReq = archiver_service.ArchiveRepository(aReq) - complete = aReq.WaitForCompletion(ctx) - } - - if complete { - ctx.ServeFile(aReq.GetArchivePath(), downloadName) - } else { - ctx.Error(404) - } -} - -// InitiateDownload will enqueue an archival request, as needed. It may submit -// a request that's already in-progress, but the archiver service will just -// kind of drop it on the floor if this is the case. -func InitiateDownload(ctx *context.Context) { - uri := ctx.Params("*") - aReq := archiver_service.DeriveRequestFrom(ctx, uri) - - if aReq == nil { - ctx.Error(404) - return - } - - complete := aReq.IsComplete() - if !complete { - aReq = archiver_service.ArchiveRepository(aReq) - complete, _ = aReq.TimedWaitForCompletion(ctx, 2*time.Second) - } - - ctx.JSON(200, map[string]interface{}{ - "complete": complete, - }) -} diff --git a/routers/repo/search.go b/routers/repo/search.go deleted file mode 100644 index e110ae2a7..000000000 --- a/routers/repo/search.go +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "path" - "strings" - - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - code_indexer "code.gitea.io/gitea/modules/indexer/code" - "code.gitea.io/gitea/modules/setting" -) - -const tplSearch base.TplName = "repo/search" - -// Search render repository search page -func Search(ctx *context.Context) { - if !setting.Indexer.RepoIndexerEnabled { - ctx.Redirect(ctx.Repo.RepoLink, 302) - return - } - language := strings.TrimSpace(ctx.Query("l")) - keyword := strings.TrimSpace(ctx.Query("q")) - page := ctx.QueryInt("page") - if page <= 0 { - page = 1 - } - total, searchResults, searchResultLanguages, err := code_indexer.PerformSearch([]int64{ctx.Repo.Repository.ID}, - language, keyword, page, setting.UI.RepoSearchPagingNum) - if err != nil { - ctx.ServerError("SearchResults", err) - return - } - ctx.Data["Keyword"] = keyword - ctx.Data["Language"] = language - ctx.Data["SourcePath"] = setting.AppSubURL + "/" + - path.Join(ctx.Repo.Repository.Owner.Name, ctx.Repo.Repository.Name) - ctx.Data["SearchResults"] = searchResults - ctx.Data["SearchResultLanguages"] = searchResultLanguages - ctx.Data["RequireHighlightJS"] = true - ctx.Data["PageIsViewCode"] = true - - pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5) - pager.SetDefaultParams(ctx) - pager.AddParam(ctx, "l", "Language") - ctx.Data["Page"] = pager - - ctx.HTML(200, tplSearch) -} diff --git a/routers/repo/setting.go b/routers/repo/setting.go deleted file mode 100644 index 368879234..000000000 --- a/routers/repo/setting.go +++ /dev/null @@ -1,975 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package repo - -import ( - "errors" - "fmt" - "io/ioutil" - "net/url" - "regexp" - "strings" - "time" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/git" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/repository" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/structs" - "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/modules/validation" - "code.gitea.io/gitea/routers/utils" - "code.gitea.io/gitea/services/mailer" - mirror_service "code.gitea.io/gitea/services/mirror" - repo_service "code.gitea.io/gitea/services/repository" - - "mvdan.cc/xurls/v2" -) - -const ( - tplSettingsOptions base.TplName = "repo/settings/options" - tplCollaboration base.TplName = "repo/settings/collaboration" - tplBranches base.TplName = "repo/settings/branches" - tplGithooks base.TplName = "repo/settings/githooks" - tplGithookEdit base.TplName = "repo/settings/githook_edit" - tplDeployKeys base.TplName = "repo/settings/deploy_keys" - tplProtectedBranch base.TplName = "repo/settings/protected_branch" -) - -var validFormAddress *regexp.Regexp - -// Settings show a repository's settings page -func Settings(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.settings") - ctx.Data["PageIsSettingsOptions"] = true - ctx.Data["ForcePrivate"] = setting.Repository.ForcePrivate - - signing, _ := models.SigningKey(ctx.Repo.Repository.RepoPath()) - ctx.Data["SigningKeyAvailable"] = len(signing) > 0 - ctx.Data["SigningSettings"] = setting.Repository.Signing - - ctx.HTML(200, tplSettingsOptions) -} - -// SettingsPost response for changes of a repository -func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { - ctx.Data["Title"] = ctx.Tr("repo.settings") - ctx.Data["PageIsSettingsOptions"] = true - - repo := ctx.Repo.Repository - - switch ctx.Query("action") { - case "update": - if ctx.HasError() { - ctx.HTML(200, tplSettingsOptions) - return - } - - newRepoName := form.RepoName - // Check if repository name has been changed. - if repo.LowerName != strings.ToLower(newRepoName) { - // Close the GitRepo if open - if ctx.Repo.GitRepo != nil { - ctx.Repo.GitRepo.Close() - ctx.Repo.GitRepo = nil - } - if err := repo_service.ChangeRepositoryName(ctx.User, repo, newRepoName); err != nil { - ctx.Data["Err_RepoName"] = true - switch { - case models.IsErrRepoAlreadyExist(err): - ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tplSettingsOptions, &form) - case models.IsErrNameReserved(err): - ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tplSettingsOptions, &form) - case models.IsErrRepoFilesAlreadyExist(err): - ctx.Data["Err_RepoName"] = true - switch { - case ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories): - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt_or_delete"), tplSettingsOptions, form) - case setting.Repository.AllowAdoptionOfUnadoptedRepositories: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt"), tplSettingsOptions, form) - case setting.Repository.AllowDeleteOfUnadoptedRepositories: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.delete"), tplSettingsOptions, form) - default: - ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist"), tplSettingsOptions, form) - } - case models.IsErrNamePatternNotAllowed(err): - ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplSettingsOptions, &form) - default: - ctx.ServerError("ChangeRepositoryName", err) - } - return - } - - log.Trace("Repository name changed: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newRepoName) - } - // In case it's just a case change. - repo.Name = newRepoName - repo.LowerName = strings.ToLower(newRepoName) - repo.Description = form.Description - repo.Website = form.Website - repo.IsTemplate = form.Template - - // Visibility of forked repository is forced sync with base repository. - if repo.IsFork { - form.Private = repo.BaseRepo.IsPrivate || repo.BaseRepo.Owner.Visibility == structs.VisibleTypePrivate - } - - visibilityChanged := repo.IsPrivate != form.Private - // when ForcePrivate enabled, you could change public repo to private, but only admin users can change private to public - if visibilityChanged && setting.Repository.ForcePrivate && !form.Private && !ctx.User.IsAdmin { - ctx.ServerError("Force Private enabled", errors.New("cannot change private repository to public")) - return - } - - repo.IsPrivate = form.Private - if err := models.UpdateRepository(repo, visibilityChanged); err != nil { - ctx.ServerError("UpdateRepository", err) - return - } - log.Trace("Repository basic settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) - - ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) - ctx.Redirect(repo.Link() + "/settings") - - case "mirror": - if !repo.IsMirror { - ctx.NotFound("", nil) - return - } - - // This section doesn't require repo_name/RepoName to be set in the form, don't show it - // as an error on the UI for this action - ctx.Data["Err_RepoName"] = nil - - interval, err := time.ParseDuration(form.Interval) - if err != nil || (interval != 0 && interval < setting.Mirror.MinInterval) { - ctx.Data["Err_Interval"] = true - ctx.RenderWithErr(ctx.Tr("repo.mirror_interval_invalid"), tplSettingsOptions, &form) - } else { - ctx.Repo.Mirror.EnablePrune = form.EnablePrune - ctx.Repo.Mirror.Interval = interval - if interval != 0 { - ctx.Repo.Mirror.NextUpdateUnix = timeutil.TimeStampNow().AddDuration(interval) - } else { - ctx.Repo.Mirror.NextUpdateUnix = 0 - } - if err := models.UpdateMirror(ctx.Repo.Mirror); err != nil { - ctx.Data["Err_Interval"] = true - ctx.RenderWithErr(ctx.Tr("repo.mirror_interval_invalid"), tplSettingsOptions, &form) - return - } - } - - // Validate the form.MirrorAddress - u, err := url.Parse(form.MirrorAddress) - if err != nil { - ctx.Data["Err_MirrorAddress"] = true - ctx.RenderWithErr(ctx.Tr("repo.mirror_address_url_invalid"), tplSettingsOptions, &form) - return - } - - if u.Opaque != "" || !(u.Scheme == "http" || u.Scheme == "https" || u.Scheme == "git") { - ctx.Data["Err_MirrorAddress"] = true - ctx.RenderWithErr(ctx.Tr("repo.mirror_address_protocol_invalid"), tplSettingsOptions, &form) - return - } - - if form.MirrorUsername != "" || form.MirrorPassword != "" { - u.User = url.UserPassword(form.MirrorUsername, form.MirrorPassword) - } - - // Now use xurls - address := validFormAddress.FindString(form.MirrorAddress) - if address != form.MirrorAddress && form.MirrorAddress != "" { - ctx.Data["Err_MirrorAddress"] = true - ctx.RenderWithErr(ctx.Tr("repo.mirror_address_url_invalid"), tplSettingsOptions, &form) - return - } - - if u.EscapedPath() == "" || u.Host == "" || !u.IsAbs() { - ctx.Data["Err_MirrorAddress"] = true - ctx.RenderWithErr(ctx.Tr("repo.mirror_address_url_invalid"), tplSettingsOptions, &form) - return - } - - address = u.String() - - if err := mirror_service.UpdateAddress(ctx.Repo.Mirror, address); err != nil { - ctx.ServerError("UpdateAddress", err) - return - } - - ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) - ctx.Redirect(repo.Link() + "/settings") - - case "mirror-sync": - if !repo.IsMirror { - ctx.NotFound("", nil) - return - } - - mirror_service.StartToMirror(repo.ID) - - ctx.Flash.Info(ctx.Tr("repo.settings.mirror_sync_in_progress")) - ctx.Redirect(repo.Link() + "/settings") - - case "advanced": - var units []models.RepoUnit - var deleteUnitTypes []models.UnitType - - // This section doesn't require repo_name/RepoName to be set in the form, don't show it - // as an error on the UI for this action - ctx.Data["Err_RepoName"] = nil - - if form.EnableWiki && form.EnableExternalWiki && !models.UnitTypeExternalWiki.UnitGlobalDisabled() { - if !validation.IsValidExternalURL(form.ExternalWikiURL) { - ctx.Flash.Error(ctx.Tr("repo.settings.external_wiki_url_error")) - ctx.Redirect(repo.Link() + "/settings") - return - } - - units = append(units, models.RepoUnit{ - RepoID: repo.ID, - Type: models.UnitTypeExternalWiki, - Config: &models.ExternalWikiConfig{ - ExternalWikiURL: form.ExternalWikiURL, - }, - }) - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeWiki) - } else if form.EnableWiki && !form.EnableExternalWiki && !models.UnitTypeWiki.UnitGlobalDisabled() { - units = append(units, models.RepoUnit{ - RepoID: repo.ID, - Type: models.UnitTypeWiki, - Config: new(models.UnitConfig), - }) - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalWiki) - } else { - if !models.UnitTypeExternalWiki.UnitGlobalDisabled() { - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalWiki) - } - if !models.UnitTypeWiki.UnitGlobalDisabled() { - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeWiki) - } - } - - if form.EnableIssues && form.EnableExternalTracker && !models.UnitTypeExternalTracker.UnitGlobalDisabled() { - if !validation.IsValidExternalURL(form.ExternalTrackerURL) { - ctx.Flash.Error(ctx.Tr("repo.settings.external_tracker_url_error")) - ctx.Redirect(repo.Link() + "/settings") - return - } - if len(form.TrackerURLFormat) != 0 && !validation.IsValidExternalTrackerURLFormat(form.TrackerURLFormat) { - ctx.Flash.Error(ctx.Tr("repo.settings.tracker_url_format_error")) - ctx.Redirect(repo.Link() + "/settings") - return - } - units = append(units, models.RepoUnit{ - RepoID: repo.ID, - Type: models.UnitTypeExternalTracker, - Config: &models.ExternalTrackerConfig{ - ExternalTrackerURL: form.ExternalTrackerURL, - ExternalTrackerFormat: form.TrackerURLFormat, - ExternalTrackerStyle: form.TrackerIssueStyle, - }, - }) - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeIssues) - } else if form.EnableIssues && !form.EnableExternalTracker && !models.UnitTypeIssues.UnitGlobalDisabled() { - units = append(units, models.RepoUnit{ - RepoID: repo.ID, - Type: models.UnitTypeIssues, - Config: &models.IssuesConfig{ - EnableTimetracker: form.EnableTimetracker, - AllowOnlyContributorsToTrackTime: form.AllowOnlyContributorsToTrackTime, - EnableDependencies: form.EnableIssueDependencies, - }, - }) - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalTracker) - } else { - if !models.UnitTypeExternalTracker.UnitGlobalDisabled() { - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalTracker) - } - if !models.UnitTypeIssues.UnitGlobalDisabled() { - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeIssues) - } - } - - if form.EnableProjects && !models.UnitTypeProjects.UnitGlobalDisabled() { - units = append(units, models.RepoUnit{ - RepoID: repo.ID, - Type: models.UnitTypeProjects, - }) - } else if !models.UnitTypeProjects.UnitGlobalDisabled() { - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeProjects) - } - - if form.EnablePulls && !models.UnitTypePullRequests.UnitGlobalDisabled() { - units = append(units, models.RepoUnit{ - RepoID: repo.ID, - Type: models.UnitTypePullRequests, - Config: &models.PullRequestsConfig{ - IgnoreWhitespaceConflicts: form.PullsIgnoreWhitespace, - AllowMerge: form.PullsAllowMerge, - AllowRebase: form.PullsAllowRebase, - AllowRebaseMerge: form.PullsAllowRebaseMerge, - AllowSquash: form.PullsAllowSquash, - }, - }) - } else if !models.UnitTypePullRequests.UnitGlobalDisabled() { - deleteUnitTypes = append(deleteUnitTypes, models.UnitTypePullRequests) - } - - if err := models.UpdateRepositoryUnits(repo, units, deleteUnitTypes); err != nil { - ctx.ServerError("UpdateRepositoryUnits", err) - return - } - log.Trace("Repository advanced settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) - - ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - - case "signing": - changed := false - - trustModel := models.ToTrustModel(form.TrustModel) - if trustModel != repo.TrustModel { - repo.TrustModel = trustModel - changed = true - } - - if changed { - if err := models.UpdateRepository(repo, false); err != nil { - ctx.ServerError("UpdateRepository", err) - return - } - } - log.Trace("Repository signing settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) - - ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - - case "admin": - if !ctx.User.IsAdmin { - ctx.Error(403) - return - } - - if repo.IsFsckEnabled != form.EnableHealthCheck { - repo.IsFsckEnabled = form.EnableHealthCheck - } - - if repo.CloseIssuesViaCommitInAnyBranch != form.EnableCloseIssuesViaCommitInAnyBranch { - repo.CloseIssuesViaCommitInAnyBranch = form.EnableCloseIssuesViaCommitInAnyBranch - } - - if err := models.UpdateRepository(repo, false); err != nil { - ctx.ServerError("UpdateRepository", err) - return - } - - log.Trace("Repository admin settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) - - ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - - case "convert": - if !ctx.Repo.IsOwner() { - ctx.Error(404) - return - } - if repo.Name != form.RepoName { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) - return - } - - if !repo.IsMirror { - ctx.Error(404) - return - } - repo.IsMirror = false - - if _, err := repository.CleanUpMigrateInfo(repo); err != nil { - ctx.ServerError("CleanUpMigrateInfo", err) - return - } else if err = models.DeleteMirrorByRepoID(ctx.Repo.Repository.ID); err != nil { - ctx.ServerError("DeleteMirrorByRepoID", err) - return - } - log.Trace("Repository converted from mirror to regular: %s", repo.FullName()) - ctx.Flash.Success(ctx.Tr("repo.settings.convert_succeed")) - ctx.Redirect(repo.Link()) - - case "convert_fork": - if !ctx.Repo.IsOwner() { - ctx.Error(404) - return - } - if err := repo.GetOwner(); err != nil { - ctx.ServerError("Convert Fork", err) - return - } - if repo.Name != form.RepoName { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) - return - } - - if !repo.IsFork { - ctx.Error(404) - return - } - - if !ctx.Repo.Owner.CanCreateRepo() { - ctx.Flash.Error(ctx.Tr("repo.form.reach_limit_of_creation", ctx.User.MaxCreationLimit())) - ctx.Redirect(repo.Link() + "/settings") - return - } - - repo.IsFork = false - repo.ForkID = 0 - if err := models.UpdateRepository(repo, false); err != nil { - log.Error("Unable to update repository %-v whilst converting from fork", repo) - ctx.ServerError("Convert Fork", err) - return - } - - log.Trace("Repository converted from fork to regular: %s", repo.FullName()) - ctx.Flash.Success(ctx.Tr("repo.settings.convert_fork_succeed")) - ctx.Redirect(repo.Link()) - - case "transfer": - if !ctx.Repo.IsOwner() { - ctx.Error(404) - return - } - if repo.Name != form.RepoName { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) - return - } - - newOwner, err := models.GetUserByName(ctx.Query("new_owner_name")) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), tplSettingsOptions, nil) - return - } - ctx.ServerError("IsUserExist", err) - return - } - - if newOwner.Type == models.UserTypeOrganization { - if !ctx.User.IsAdmin && newOwner.Visibility == structs.VisibleTypePrivate && !newOwner.HasMemberWithUserID(ctx.User.ID) { - // The user shouldn't know about this organization - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), tplSettingsOptions, nil) - return - } - } - - // Close the GitRepo if open - if ctx.Repo.GitRepo != nil { - ctx.Repo.GitRepo.Close() - ctx.Repo.GitRepo = nil - } - if err = repo_service.TransferOwnership(ctx.User, newOwner, repo, nil); err != nil { - if models.IsErrRepoAlreadyExist(err) { - ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), tplSettingsOptions, nil) - } else { - ctx.ServerError("TransferOwnership", err) - } - return - } - - log.Trace("Repository transferred: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newOwner) - ctx.Flash.Success(ctx.Tr("repo.settings.transfer_succeed")) - ctx.Redirect(setting.AppSubURL + "/" + newOwner.Name + "/" + repo.Name) - - case "delete": - if !ctx.Repo.IsOwner() { - ctx.Error(404) - return - } - if repo.Name != form.RepoName { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) - return - } - - if err := repo_service.DeleteRepository(ctx.User, ctx.Repo.Repository); err != nil { - ctx.ServerError("DeleteRepository", err) - return - } - log.Trace("Repository deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name) - - ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success")) - ctx.Redirect(ctx.Repo.Owner.DashboardLink()) - - case "delete-wiki": - if !ctx.Repo.IsOwner() { - ctx.Error(404) - return - } - if repo.Name != form.RepoName { - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) - return - } - - err := repo.DeleteWiki() - if err != nil { - log.Error("Delete Wiki: %v", err.Error()) - } - log.Trace("Repository wiki deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name) - - ctx.Flash.Success(ctx.Tr("repo.settings.wiki_deletion_success")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - - case "archive": - if !ctx.Repo.IsOwner() { - ctx.Error(403) - return - } - - if repo.IsMirror { - ctx.Flash.Error(ctx.Tr("repo.settings.archive.error_ismirror")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - return - } - - if err := repo.SetArchiveRepoState(true); err != nil { - log.Error("Tried to archive a repo: %s", err) - ctx.Flash.Error(ctx.Tr("repo.settings.archive.error")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - return - } - - ctx.Flash.Success(ctx.Tr("repo.settings.archive.success")) - - log.Trace("Repository was archived: %s/%s", ctx.Repo.Owner.Name, repo.Name) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - case "unarchive": - if !ctx.Repo.IsOwner() { - ctx.Error(403) - return - } - - if err := repo.SetArchiveRepoState(false); err != nil { - log.Error("Tried to unarchive a repo: %s", err) - ctx.Flash.Error(ctx.Tr("repo.settings.unarchive.error")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - return - } - - ctx.Flash.Success(ctx.Tr("repo.settings.unarchive.success")) - - log.Trace("Repository was un-archived: %s/%s", ctx.Repo.Owner.Name, repo.Name) - ctx.Redirect(ctx.Repo.RepoLink + "/settings") - - default: - ctx.NotFound("", nil) - } -} - -// Collaboration render a repository's collaboration page -func Collaboration(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.settings") - ctx.Data["PageIsSettingsCollaboration"] = true - - users, err := ctx.Repo.Repository.GetCollaborators(models.ListOptions{}) - if err != nil { - ctx.ServerError("GetCollaborators", err) - return - } - ctx.Data["Collaborators"] = users - - teams, err := ctx.Repo.Repository.GetRepoTeams() - if err != nil { - ctx.ServerError("GetRepoTeams", err) - return - } - ctx.Data["Teams"] = teams - ctx.Data["Repo"] = ctx.Repo.Repository - ctx.Data["OrgID"] = ctx.Repo.Repository.OwnerID - ctx.Data["OrgName"] = ctx.Repo.Repository.OwnerName - ctx.Data["Org"] = ctx.Repo.Repository.Owner - ctx.Data["Units"] = models.Units - - ctx.HTML(200, tplCollaboration) -} - -// CollaborationPost response for actions for a collaboration of a repository -func CollaborationPost(ctx *context.Context) { - name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.Query("collaborator"))) - if len(name) == 0 || ctx.Repo.Owner.LowerName == name { - ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) - return - } - - u, err := models.GetUserByName(name) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Flash.Error(ctx.Tr("form.user_not_exist")) - ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) - } else { - ctx.ServerError("GetUserByName", err) - } - return - } - - if !u.IsActive { - ctx.Flash.Error(ctx.Tr("repo.settings.add_collaborator_inactive_user")) - ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) - return - } - - // Organization is not allowed to be added as a collaborator. - if u.IsOrganization() { - ctx.Flash.Error(ctx.Tr("repo.settings.org_not_allowed_to_be_collaborator")) - ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) - return - } - - if got, err := ctx.Repo.Repository.IsCollaborator(u.ID); err == nil && got { - ctx.Flash.Error(ctx.Tr("repo.settings.add_collaborator_duplicate")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - - if err = ctx.Repo.Repository.AddCollaborator(u); err != nil { - ctx.ServerError("AddCollaborator", err) - return - } - - if setting.Service.EnableNotifyMail { - mailer.SendCollaboratorMail(u, ctx.User, ctx.Repo.Repository) - } - - ctx.Flash.Success(ctx.Tr("repo.settings.add_collaborator_success")) - ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) -} - -// ChangeCollaborationAccessMode response for changing access of a collaboration -func ChangeCollaborationAccessMode(ctx *context.Context) { - if err := ctx.Repo.Repository.ChangeCollaborationAccessMode( - ctx.QueryInt64("uid"), - models.AccessMode(ctx.QueryInt("mode"))); err != nil { - log.Error("ChangeCollaborationAccessMode: %v", err) - } -} - -// DeleteCollaboration delete a collaboration for a repository -func DeleteCollaboration(ctx *context.Context) { - if err := ctx.Repo.Repository.DeleteCollaboration(ctx.QueryInt64("id")); err != nil { - ctx.Flash.Error("DeleteCollaboration: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("repo.settings.remove_collaborator_success")) - } - - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/settings/collaboration", - }) -} - -// AddTeamPost response for adding a team to a repository -func AddTeamPost(ctx *context.Context) { - if !ctx.Repo.Owner.RepoAdminChangeTeamAccess && !ctx.Repo.IsOwner() { - ctx.Flash.Error(ctx.Tr("repo.settings.change_team_access_not_allowed")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - - name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.Query("team"))) - if len(name) == 0 { - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - - team, err := ctx.Repo.Owner.GetTeam(name) - if err != nil { - if models.IsErrTeamNotExist(err) { - ctx.Flash.Error(ctx.Tr("form.team_not_exist")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - } else { - ctx.ServerError("GetTeam", err) - } - return - } - - if team.OrgID != ctx.Repo.Repository.OwnerID { - ctx.Flash.Error(ctx.Tr("repo.settings.team_not_in_organization")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - - if models.HasTeamRepo(ctx.Repo.Repository.OwnerID, team.ID, ctx.Repo.Repository.ID) { - ctx.Flash.Error(ctx.Tr("repo.settings.add_team_duplicate")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - - if err = team.AddRepository(ctx.Repo.Repository); err != nil { - ctx.ServerError("team.AddRepository", err) - return - } - - ctx.Flash.Success(ctx.Tr("repo.settings.add_team_success")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") -} - -// DeleteTeam response for deleting a team from a repository -func DeleteTeam(ctx *context.Context) { - if !ctx.Repo.Owner.RepoAdminChangeTeamAccess && !ctx.Repo.IsOwner() { - ctx.Flash.Error(ctx.Tr("repo.settings.change_team_access_not_allowed")) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") - return - } - - team, err := models.GetTeamByID(ctx.QueryInt64("id")) - if err != nil { - ctx.ServerError("GetTeamByID", err) - return - } - - if err = team.RemoveRepository(ctx.Repo.Repository.ID); err != nil { - ctx.ServerError("team.RemoveRepositorys", err) - return - } - - ctx.Flash.Success(ctx.Tr("repo.settings.remove_team_success")) - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/settings/collaboration", - }) -} - -// parseOwnerAndRepo get repos by owner -func parseOwnerAndRepo(ctx *context.Context) (*models.User, *models.Repository) { - owner, err := models.GetUserByName(ctx.Params(":username")) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.NotFound("GetUserByName", err) - } else { - ctx.ServerError("GetUserByName", err) - } - return nil, nil - } - - repo, err := models.GetRepositoryByName(owner.ID, ctx.Params(":reponame")) - if err != nil { - if models.IsErrRepoNotExist(err) { - ctx.NotFound("GetRepositoryByName", err) - } else { - ctx.ServerError("GetRepositoryByName", err) - } - return nil, nil - } - - return owner, repo -} - -// GitHooks hooks of a repository -func GitHooks(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.settings.githooks") - ctx.Data["PageIsSettingsGitHooks"] = true - - hooks, err := ctx.Repo.GitRepo.Hooks() - if err != nil { - ctx.ServerError("Hooks", err) - return - } - ctx.Data["Hooks"] = hooks - - ctx.HTML(200, tplGithooks) -} - -// GitHooksEdit render for editing a hook of repository page -func GitHooksEdit(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.settings.githooks") - ctx.Data["PageIsSettingsGitHooks"] = true - - name := ctx.Params(":name") - hook, err := ctx.Repo.GitRepo.GetHook(name) - if err != nil { - if err == git.ErrNotValidHook { - ctx.NotFound("GetHook", err) - } else { - ctx.ServerError("GetHook", err) - } - return - } - ctx.Data["Hook"] = hook - ctx.HTML(200, tplGithookEdit) -} - -// GitHooksEditPost response for editing a git hook of a repository -func GitHooksEditPost(ctx *context.Context) { - name := ctx.Params(":name") - hook, err := ctx.Repo.GitRepo.GetHook(name) - if err != nil { - if err == git.ErrNotValidHook { - ctx.NotFound("GetHook", err) - } else { - ctx.ServerError("GetHook", err) - } - return - } - hook.Content = ctx.Query("content") - if err = hook.Update(); err != nil { - ctx.ServerError("hook.Update", err) - return - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings/hooks/git") -} - -// DeployKeys render the deploy keys list of a repository page -func DeployKeys(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys") - ctx.Data["PageIsSettingsKeys"] = true - ctx.Data["DisableSSH"] = setting.SSH.Disabled - - keys, err := models.ListDeployKeys(ctx.Repo.Repository.ID, models.ListOptions{}) - if err != nil { - ctx.ServerError("ListDeployKeys", err) - return - } - ctx.Data["Deploykeys"] = keys - - ctx.HTML(200, tplDeployKeys) -} - -// DeployKeysPost response for adding a deploy key of a repository -func DeployKeysPost(ctx *context.Context, form auth.AddKeyForm) { - ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys") - ctx.Data["PageIsSettingsKeys"] = true - - keys, err := models.ListDeployKeys(ctx.Repo.Repository.ID, models.ListOptions{}) - if err != nil { - ctx.ServerError("ListDeployKeys", err) - return - } - ctx.Data["Deploykeys"] = keys - - if ctx.HasError() { - ctx.HTML(200, tplDeployKeys) - return - } - - content, err := models.CheckPublicKeyString(form.Content) - if err != nil { - if models.IsErrSSHDisabled(err) { - ctx.Flash.Info(ctx.Tr("settings.ssh_disabled")) - } else if models.IsErrKeyUnableVerify(err) { - ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key")) - } else { - ctx.Data["HasError"] = true - ctx.Data["Err_Content"] = true - ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error())) - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings/keys") - return - } - - key, err := models.AddDeployKey(ctx.Repo.Repository.ID, form.Title, content, !form.IsWritable) - if err != nil { - ctx.Data["HasError"] = true - switch { - case models.IsErrDeployKeyAlreadyExist(err): - ctx.Data["Err_Content"] = true - ctx.RenderWithErr(ctx.Tr("repo.settings.key_been_used"), tplDeployKeys, &form) - case models.IsErrKeyAlreadyExist(err): - ctx.Data["Err_Content"] = true - ctx.RenderWithErr(ctx.Tr("settings.ssh_key_been_used"), tplDeployKeys, &form) - case models.IsErrKeyNameAlreadyUsed(err): - ctx.Data["Err_Title"] = true - ctx.RenderWithErr(ctx.Tr("repo.settings.key_name_used"), tplDeployKeys, &form) - case models.IsErrDeployKeyNameAlreadyUsed(err): - ctx.Data["Err_Title"] = true - ctx.RenderWithErr(ctx.Tr("repo.settings.key_name_used"), tplDeployKeys, &form) - default: - ctx.ServerError("AddDeployKey", err) - } - return - } - - log.Trace("Deploy key added: %d", ctx.Repo.Repository.ID) - ctx.Flash.Success(ctx.Tr("repo.settings.add_key_success", key.Name)) - ctx.Redirect(ctx.Repo.RepoLink + "/settings/keys") -} - -// DeleteDeployKey response for deleting a deploy key -func DeleteDeployKey(ctx *context.Context) { - if err := models.DeleteDeployKey(ctx.User, ctx.QueryInt64("id")); err != nil { - ctx.Flash.Error("DeleteDeployKey: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("repo.settings.deploy_key_deletion_success")) - } - - ctx.JSON(200, map[string]interface{}{ - "redirect": ctx.Repo.RepoLink + "/settings/keys", - }) -} - -func init() { - var err error - validFormAddress, err = xurls.StrictMatchingScheme(`(https?)|(git)://`) - if err != nil { - panic(err) - } -} - -// UpdateAvatarSetting update repo's avatar -func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm) error { - ctxRepo := ctx.Repo.Repository - - if form.Avatar == nil { - // No avatar is uploaded and we not removing it here. - // No random avatar generated here. - // Just exit, no action. - if ctxRepo.CustomAvatarRelativePath() == "" { - log.Trace("No avatar was uploaded for repo: %d. Default icon will appear instead.", ctxRepo.ID) - } - return nil - } - - r, err := form.Avatar.Open() - if err != nil { - return fmt.Errorf("Avatar.Open: %v", err) - } - defer r.Close() - - if form.Avatar.Size > setting.Avatar.MaxFileSize { - return errors.New(ctx.Tr("settings.uploaded_avatar_is_too_big")) - } - - data, err := ioutil.ReadAll(r) - if err != nil { - return fmt.Errorf("ioutil.ReadAll: %v", err) - } - if !base.IsImageFile(data) { - return errors.New(ctx.Tr("settings.uploaded_avatar_not_a_image")) - } - if err = ctxRepo.UploadAvatar(data); err != nil { - return fmt.Errorf("UploadAvatar: %v", err) - } - return nil -} - -// SettingsAvatar save new POSTed repository avatar -func SettingsAvatar(ctx *context.Context, form auth.AvatarForm) { - form.Source = auth.AvatarLocal - if err := UpdateAvatarSetting(ctx, form); err != nil { - ctx.Flash.Error(err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("repo.settings.update_avatar_success")) - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings") -} - -// SettingsDeleteAvatar delete repository avatar -func SettingsDeleteAvatar(ctx *context.Context) { - if err := ctx.Repo.Repository.DeleteAvatar(); err != nil { - ctx.Flash.Error(fmt.Sprintf("DeleteAvatar: %v", err)) - } - ctx.Redirect(ctx.Repo.RepoLink + "/settings") -} diff --git a/routers/routes/chi.go b/routers/routes/chi.go deleted file mode 100644 index 6e609fc2f..000000000 --- a/routers/routes/chi.go +++ /dev/null @@ -1,301 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package routes - -import ( - "bytes" - "errors" - "fmt" - "io" - "net/http" - "os" - "path" - "strings" - "text/template" - "time" - - "code.gitea.io/gitea/modules/httpcache" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/metrics" - "code.gitea.io/gitea/modules/public" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/storage" - "code.gitea.io/gitea/routers" - - "gitea.com/go-chi/session" - "github.com/go-chi/chi" - "github.com/go-chi/chi/middleware" - "github.com/prometheus/client_golang/prometheus" -) - -type routerLoggerOptions struct { - req *http.Request - Identity *string - Start *time.Time - ResponseWriter http.ResponseWriter -} - -// SignedUserName returns signed user's name via context -// FIXME currently no any data stored on chi.Context but macaron.Context, so this will -// return "" before we remove macaron totally -func SignedUserName(req *http.Request) string { - if v, ok := req.Context().Value("SignedUserName").(string); ok { - return v - } - return "" -} - -func setupAccessLogger(c chi.Router) { - logger := log.GetLogger("access") - - logTemplate, _ := template.New("log").Parse(setting.AccessLogTemplate) - c.Use(func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - start := time.Now() - next.ServeHTTP(w, req) - identity := "-" - if val := SignedUserName(req); val != "" { - identity = val - } - rw := w - - buf := bytes.NewBuffer([]byte{}) - err := logTemplate.Execute(buf, routerLoggerOptions{ - req: req, - Identity: &identity, - Start: &start, - ResponseWriter: rw, - }) - if err != nil { - log.Error("Could not set up macaron access logger: %v", err.Error()) - } - - err = logger.SendLog(log.INFO, "", "", 0, buf.String(), "") - if err != nil { - log.Error("Could not set up macaron access logger: %v", err.Error()) - } - }) - }) -} - -// LoggerHandler is a handler that will log the routing to the default gitea log -func LoggerHandler(level log.Level) func(next http.Handler) http.Handler { - return func(next http.Handler) http.Handler { - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - start := time.Now() - - _ = log.GetLogger("router").Log(0, level, "Started %s %s for %s", log.ColoredMethod(req.Method), req.RequestURI, req.RemoteAddr) - - next.ServeHTTP(w, req) - - ww := middleware.NewWrapResponseWriter(w, req.ProtoMajor) - - status := ww.Status() - _ = log.GetLogger("router").Log(0, level, "Completed %s %s %v %s in %v", log.ColoredMethod(req.Method), req.RequestURI, log.ColoredStatus(status), log.ColoredStatus(status, http.StatusText(status)), log.ColoredTime(time.Since(start))) - }) - } -} - -func storageHandler(storageSetting setting.Storage, prefix string, objStore storage.ObjectStorage) func(next http.Handler) http.Handler { - return func(next http.Handler) http.Handler { - if storageSetting.ServeDirect { - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - if req.Method != "GET" && req.Method != "HEAD" { - next.ServeHTTP(w, req) - return - } - - if !strings.HasPrefix(req.RequestURI, "/"+prefix) { - next.ServeHTTP(w, req) - return - } - - rPath := strings.TrimPrefix(req.RequestURI, "/"+prefix) - u, err := objStore.URL(rPath, path.Base(rPath)) - if err != nil { - if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) { - log.Warn("Unable to find %s %s", prefix, rPath) - http.Error(w, "file not found", 404) - return - } - log.Error("Error whilst getting URL for %s %s. Error: %v", prefix, rPath, err) - http.Error(w, fmt.Sprintf("Error whilst getting URL for %s %s", prefix, rPath), 500) - return - } - http.Redirect( - w, - req, - u.String(), - 301, - ) - }) - } - - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - if req.Method != "GET" && req.Method != "HEAD" { - next.ServeHTTP(w, req) - return - } - - if !strings.HasPrefix(req.RequestURI, "/"+prefix) { - next.ServeHTTP(w, req) - return - } - - rPath := strings.TrimPrefix(req.RequestURI, "/"+prefix) - rPath = strings.TrimPrefix(rPath, "/") - - fi, err := objStore.Stat(rPath) - if err == nil && httpcache.HandleTimeCache(req, w, fi) { - return - } - - //If we have matched and access to release or issue - fr, err := objStore.Open(rPath) - if err != nil { - if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) { - log.Warn("Unable to find %s %s", prefix, rPath) - http.Error(w, "file not found", 404) - return - } - log.Error("Error whilst opening %s %s. Error: %v", prefix, rPath, err) - http.Error(w, fmt.Sprintf("Error whilst opening %s %s", prefix, rPath), 500) - return - } - defer fr.Close() - - _, err = io.Copy(w, fr) - if err != nil { - log.Error("Error whilst rendering %s %s. Error: %v", prefix, rPath, err) - http.Error(w, fmt.Sprintf("Error whilst rendering %s %s", prefix, rPath), 500) - return - } - }) - } -} - -var ( - sessionManager *session.Manager -) - -// NewChi creates a chi Router -func NewChi() chi.Router { - c := chi.NewRouter() - c.Use(middleware.RealIP) - if !setting.DisableRouterLog && setting.RouterLogLevel != log.NONE { - if log.GetLogger("router").GetLevel() <= setting.RouterLogLevel { - c.Use(LoggerHandler(setting.RouterLogLevel)) - } - } - - var opt = session.Options{ - Provider: setting.SessionConfig.Provider, - ProviderConfig: setting.SessionConfig.ProviderConfig, - CookieName: setting.SessionConfig.CookieName, - CookiePath: setting.SessionConfig.CookiePath, - Gclifetime: setting.SessionConfig.Gclifetime, - Maxlifetime: setting.SessionConfig.Maxlifetime, - Secure: setting.SessionConfig.Secure, - Domain: setting.SessionConfig.Domain, - } - opt = session.PrepareOptions([]session.Options{opt}) - - var err error - sessionManager, err = session.NewManager(opt.Provider, opt) - if err != nil { - panic(err) - } - - c.Use(Recovery()) - if setting.EnableAccessLog { - setupAccessLogger(c) - } - - c.Use(public.Custom( - &public.Options{ - SkipLogging: setting.DisableRouterLog, - }, - )) - c.Use(public.Static( - &public.Options{ - Directory: path.Join(setting.StaticRootPath, "public"), - SkipLogging: setting.DisableRouterLog, - }, - )) - - c.Use(storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars)) - c.Use(storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars)) - - return c -} - -// RegisterInstallRoute registers the install routes -func RegisterInstallRoute(c chi.Router) { - m := NewMacaron() - RegisterMacaronInstallRoute(m) - - // We need at least one handler in chi so that it does not drop - // our middleware: https://github.com/go-gitea/gitea/issues/13725#issuecomment-735244395 - c.Get("/", func(w http.ResponseWriter, req *http.Request) { - m.ServeHTTP(w, req) - }) - - c.NotFound(func(w http.ResponseWriter, req *http.Request) { - m.ServeHTTP(w, req) - }) - - c.MethodNotAllowed(func(w http.ResponseWriter, req *http.Request) { - m.ServeHTTP(w, req) - }) -} - -// NormalRoutes represents non install routes -func NormalRoutes() http.Handler { - r := chi.NewRouter() - - // for health check - r.Head("/", func(w http.ResponseWriter, req *http.Request) { - w.WriteHeader(http.StatusOK) - }) - - if setting.HasRobotsTxt { - r.Get("/robots.txt", func(w http.ResponseWriter, req *http.Request) { - filePath := path.Join(setting.CustomPath, "robots.txt") - fi, err := os.Stat(filePath) - if err == nil && httpcache.HandleTimeCache(req, w, fi) { - return - } - http.ServeFile(w, req, filePath) - }) - } - - r.Get("/apple-touch-icon.png", func(w http.ResponseWriter, req *http.Request) { - http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "img/apple-touch-icon.png"), 301) - }) - - // prometheus metrics endpoint - if setting.Metrics.Enabled { - c := metrics.NewCollector() - prometheus.MustRegister(c) - - r.Get("/metrics", routers.Metrics) - } - - return r -} - -// DelegateToMacaron delegates other routes to macaron -func DelegateToMacaron(r chi.Router) { - m := NewMacaron() - RegisterMacaronRoutes(m) - - r.NotFound(func(w http.ResponseWriter, req *http.Request) { - m.ServeHTTP(w, req) - }) - - r.MethodNotAllowed(func(w http.ResponseWriter, req *http.Request) { - m.ServeHTTP(w, req) - }) -} diff --git a/routers/routes/macaron.go b/routers/routes/macaron.go deleted file mode 100644 index 66c39b7f8..000000000 --- a/routers/routes/macaron.go +++ /dev/null @@ -1,988 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package routes - -import ( - "encoding/gob" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/lfs" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/options" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/templates" - "code.gitea.io/gitea/modules/validation" - "code.gitea.io/gitea/routers" - "code.gitea.io/gitea/routers/admin" - apiv1 "code.gitea.io/gitea/routers/api/v1" - "code.gitea.io/gitea/routers/dev" - "code.gitea.io/gitea/routers/events" - "code.gitea.io/gitea/routers/org" - "code.gitea.io/gitea/routers/private" - "code.gitea.io/gitea/routers/repo" - "code.gitea.io/gitea/routers/user" - userSetting "code.gitea.io/gitea/routers/user/setting" - "code.gitea.io/gitea/services/mailer" - - // to registers all internal adapters - _ "code.gitea.io/gitea/modules/session" - - "gitea.com/macaron/binding" - "gitea.com/macaron/cache" - "gitea.com/macaron/captcha" - "gitea.com/macaron/cors" - "gitea.com/macaron/csrf" - "gitea.com/macaron/gzip" - "gitea.com/macaron/i18n" - "gitea.com/macaron/macaron" - "gitea.com/macaron/session" - "gitea.com/macaron/toolbox" - "github.com/tstranex/u2f" -) - -// NewMacaron initializes Macaron instance. -func NewMacaron() *macaron.Macaron { - gob.Register(&u2f.Challenge{}) - var m *macaron.Macaron - if setting.RedirectMacaronLog { - loggerAsWriter := log.NewLoggerAsWriter("INFO", log.GetLogger("macaron")) - m = macaron.NewWithLogger(loggerAsWriter) - } else { - m = macaron.New() - } - - if setting.EnableGzip { - m.Use(gzip.Middleware()) - } - if setting.Protocol == setting.FCGI || setting.Protocol == setting.FCGIUnix { - m.SetURLPrefix(setting.AppSubURL) - } - - m.Use(templates.HTMLRenderer()) - - mailer.InitMailRender(templates.Mailer()) - - localeNames, err := options.Dir("locale") - - if err != nil { - log.Fatal("Failed to list locale files: %v", err) - } - - localFiles := make(map[string][]byte) - - for _, name := range localeNames { - localFiles[name], err = options.Locale(name) - - if err != nil { - log.Fatal("Failed to load %s locale file. %v", name, err) - } - } - - m.Use(i18n.I18n(i18n.Options{ - SubURL: setting.AppSubURL, - Files: localFiles, - Langs: setting.Langs, - Names: setting.Names, - DefaultLang: "en-US", - Redirect: false, - CookieHttpOnly: true, - Secure: setting.SessionConfig.Secure, - CookieDomain: setting.SessionConfig.Domain, - })) - m.Use(cache.Cacher(cache.Options{ - Adapter: setting.CacheService.Adapter, - AdapterConfig: setting.CacheService.Conn, - Interval: setting.CacheService.Interval, - })) - m.Use(captcha.Captchaer(captcha.Options{ - SubURL: setting.AppSubURL, - })) - m.Use(session.Sessioner(session.Options{ - Provider: setting.SessionConfig.Provider, - ProviderConfig: setting.SessionConfig.ProviderConfig, - CookieName: setting.SessionConfig.CookieName, - CookiePath: setting.SessionConfig.CookiePath, - Gclifetime: setting.SessionConfig.Gclifetime, - Maxlifetime: setting.SessionConfig.Maxlifetime, - Secure: setting.SessionConfig.Secure, - Domain: setting.SessionConfig.Domain, - })) - m.Use(csrf.Csrfer(csrf.Options{ - Secret: setting.SecretKey, - Cookie: setting.CSRFCookieName, - SetCookie: true, - Secure: setting.SessionConfig.Secure, - CookieHttpOnly: setting.CSRFCookieHTTPOnly, - Header: "X-Csrf-Token", - CookieDomain: setting.SessionConfig.Domain, - CookiePath: setting.AppSubURL, - })) - m.Use(toolbox.Toolboxer(m, toolbox.Options{ - HealthCheckFuncs: []*toolbox.HealthCheckFuncDesc{ - { - Desc: "Database connection", - Func: models.Ping, - }, - }, - DisableDebug: !setting.EnablePprof, - })) - m.Use(context.Contexter()) - m.SetAutoHead(true) - return m -} - -// RegisterMacaronInstallRoute registers the install routes -func RegisterMacaronInstallRoute(m *macaron.Macaron) { - m.Combo("/", routers.InstallInit).Get(routers.Install). - Post(binding.BindIgnErr(auth.InstallForm{}), routers.InstallPost) - m.NotFound(func(ctx *context.Context) { - ctx.Redirect(setting.AppURL, 302) - }) -} - -// RegisterMacaronRoutes routes routes to Macaron -func RegisterMacaronRoutes(m *macaron.Macaron) { - reqSignIn := context.Toggle(&context.ToggleOptions{SignInRequired: true}) - ignSignIn := context.Toggle(&context.ToggleOptions{SignInRequired: setting.Service.RequireSignInView}) - ignSignInAndCsrf := context.Toggle(&context.ToggleOptions{DisableCSRF: true}) - reqSignOut := context.Toggle(&context.ToggleOptions{SignOutRequired: true}) - - bindIgnErr := binding.BindIgnErr - validation.AddBindingRules() - - openIDSignInEnabled := func(ctx *context.Context) { - if !setting.Service.EnableOpenIDSignIn { - ctx.Error(403) - return - } - } - - openIDSignUpEnabled := func(ctx *context.Context) { - if !setting.Service.EnableOpenIDSignUp { - ctx.Error(403) - return - } - } - - reqMilestonesDashboardPageEnabled := func(ctx *context.Context) { - if !setting.Service.ShowMilestonesDashboardPage { - ctx.Error(403) - return - } - } - - m.Use(user.GetNotificationCount) - m.Use(func(ctx *context.Context) { - ctx.Data["UnitWikiGlobalDisabled"] = models.UnitTypeWiki.UnitGlobalDisabled() - ctx.Data["UnitIssuesGlobalDisabled"] = models.UnitTypeIssues.UnitGlobalDisabled() - ctx.Data["UnitPullsGlobalDisabled"] = models.UnitTypePullRequests.UnitGlobalDisabled() - ctx.Data["UnitProjectsGlobalDisabled"] = models.UnitTypeProjects.UnitGlobalDisabled() - }) - - // FIXME: not all routes need go through same middlewares. - // Especially some AJAX requests, we can reduce middleware number to improve performance. - // Routers. - // for health check - m.Get("/", routers.Home) - m.Group("/explore", func() { - m.Get("", func(ctx *context.Context) { - ctx.Redirect(setting.AppSubURL + "/explore/repos") - }) - m.Get("/repos", routers.ExploreRepos) - m.Get("/users", routers.ExploreUsers) - m.Get("/organizations", routers.ExploreOrganizations) - m.Get("/code", routers.ExploreCode) - }, ignSignIn) - m.Combo("/install", routers.InstallInit).Get(routers.Install). - Post(bindIgnErr(auth.InstallForm{}), routers.InstallPost) - m.Get("/issues", reqSignIn, user.Issues) - m.Get("/pulls", reqSignIn, user.Pulls) - m.Get("/milestones", reqSignIn, reqMilestonesDashboardPageEnabled, user.Milestones) - - // ***** START: User ***** - m.Group("/user", func() { - m.Get("/login", user.SignIn) - m.Post("/login", bindIgnErr(auth.SignInForm{}), user.SignInPost) - m.Group("", func() { - m.Combo("/login/openid"). - Get(user.SignInOpenID). - Post(bindIgnErr(auth.SignInOpenIDForm{}), user.SignInOpenIDPost) - }, openIDSignInEnabled) - m.Group("/openid", func() { - m.Combo("/connect"). - Get(user.ConnectOpenID). - Post(bindIgnErr(auth.ConnectOpenIDForm{}), user.ConnectOpenIDPost) - m.Group("/register", func() { - m.Combo(""). - Get(user.RegisterOpenID, openIDSignUpEnabled). - Post(bindIgnErr(auth.SignUpOpenIDForm{}), user.RegisterOpenIDPost) - }, openIDSignUpEnabled) - }, openIDSignInEnabled) - m.Get("/sign_up", user.SignUp) - m.Post("/sign_up", bindIgnErr(auth.RegisterForm{}), user.SignUpPost) - m.Group("/oauth2", func() { - m.Get("/:provider", user.SignInOAuth) - m.Get("/:provider/callback", user.SignInOAuthCallback) - }) - m.Get("/link_account", user.LinkAccount) - m.Post("/link_account_signin", bindIgnErr(auth.SignInForm{}), user.LinkAccountPostSignIn) - m.Post("/link_account_signup", bindIgnErr(auth.RegisterForm{}), user.LinkAccountPostRegister) - m.Group("/two_factor", func() { - m.Get("", user.TwoFactor) - m.Post("", bindIgnErr(auth.TwoFactorAuthForm{}), user.TwoFactorPost) - m.Get("/scratch", user.TwoFactorScratch) - m.Post("/scratch", bindIgnErr(auth.TwoFactorScratchAuthForm{}), user.TwoFactorScratchPost) - }) - m.Group("/u2f", func() { - m.Get("", user.U2F) - m.Get("/challenge", user.U2FChallenge) - m.Post("/sign", bindIgnErr(u2f.SignResponse{}), user.U2FSign) - - }) - }, reqSignOut) - - m.Any("/user/events", reqSignIn, events.Events) - - m.Group("/login/oauth", func() { - m.Get("/authorize", bindIgnErr(auth.AuthorizationForm{}), user.AuthorizeOAuth) - m.Post("/grant", bindIgnErr(auth.GrantApplicationForm{}), user.GrantApplicationOAuth) - // TODO manage redirection - m.Post("/authorize", bindIgnErr(auth.AuthorizationForm{}), user.AuthorizeOAuth) - }, ignSignInAndCsrf, reqSignIn) - m.Post("/login/oauth/access_token", bindIgnErr(auth.AccessTokenForm{}), ignSignInAndCsrf, user.AccessTokenOAuth) - - m.Group("/user/settings", func() { - m.Get("", userSetting.Profile) - m.Post("", bindIgnErr(auth.UpdateProfileForm{}), userSetting.ProfilePost) - m.Get("/change_password", user.MustChangePassword) - m.Post("/change_password", bindIgnErr(auth.MustChangePasswordForm{}), user.MustChangePasswordPost) - m.Post("/avatar", binding.MultipartForm(auth.AvatarForm{}), userSetting.AvatarPost) - m.Post("/avatar/delete", userSetting.DeleteAvatar) - m.Group("/account", func() { - m.Combo("").Get(userSetting.Account).Post(bindIgnErr(auth.ChangePasswordForm{}), userSetting.AccountPost) - m.Post("/email", bindIgnErr(auth.AddEmailForm{}), userSetting.EmailPost) - m.Post("/email/delete", userSetting.DeleteEmail) - m.Post("/delete", userSetting.DeleteAccount) - m.Post("/theme", bindIgnErr(auth.UpdateThemeForm{}), userSetting.UpdateUIThemePost) - }) - m.Group("/security", func() { - m.Get("", userSetting.Security) - m.Group("/two_factor", func() { - m.Post("/regenerate_scratch", userSetting.RegenerateScratchTwoFactor) - m.Post("/disable", userSetting.DisableTwoFactor) - m.Get("/enroll", userSetting.EnrollTwoFactor) - m.Post("/enroll", bindIgnErr(auth.TwoFactorAuthForm{}), userSetting.EnrollTwoFactorPost) - }) - m.Group("/u2f", func() { - m.Post("/request_register", bindIgnErr(auth.U2FRegistrationForm{}), userSetting.U2FRegister) - m.Post("/register", bindIgnErr(u2f.RegisterResponse{}), userSetting.U2FRegisterPost) - m.Post("/delete", bindIgnErr(auth.U2FDeleteForm{}), userSetting.U2FDelete) - }) - m.Group("/openid", func() { - m.Post("", bindIgnErr(auth.AddOpenIDForm{}), userSetting.OpenIDPost) - m.Post("/delete", userSetting.DeleteOpenID) - m.Post("/toggle_visibility", userSetting.ToggleOpenIDVisibility) - }, openIDSignInEnabled) - m.Post("/account_link", userSetting.DeleteAccountLink) - }) - m.Group("/applications/oauth2", func() { - m.Get("/:id", userSetting.OAuth2ApplicationShow) - m.Post("/:id", bindIgnErr(auth.EditOAuth2ApplicationForm{}), userSetting.OAuthApplicationsEdit) - m.Post("/:id/regenerate_secret", userSetting.OAuthApplicationsRegenerateSecret) - m.Post("", bindIgnErr(auth.EditOAuth2ApplicationForm{}), userSetting.OAuthApplicationsPost) - m.Post("/delete", userSetting.DeleteOAuth2Application) - m.Post("/revoke", userSetting.RevokeOAuth2Grant) - }) - m.Combo("/applications").Get(userSetting.Applications). - Post(bindIgnErr(auth.NewAccessTokenForm{}), userSetting.ApplicationsPost) - m.Post("/applications/delete", userSetting.DeleteApplication) - m.Combo("/keys").Get(userSetting.Keys). - Post(bindIgnErr(auth.AddKeyForm{}), userSetting.KeysPost) - m.Post("/keys/delete", userSetting.DeleteKey) - m.Get("/organization", userSetting.Organization) - m.Get("/repos", userSetting.Repos) - m.Post("/repos/unadopted", userSetting.AdoptOrDeleteRepository) - }, reqSignIn, func(ctx *context.Context) { - ctx.Data["PageIsUserSettings"] = true - ctx.Data["AllThemes"] = setting.UI.Themes - }) - - m.Group("/user", func() { - // r.Get("/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds) - m.Any("/activate", user.Activate, reqSignIn) - m.Any("/activate_email", user.ActivateEmail) - m.Get("/avatar/:username/:size", user.Avatar) - m.Get("/email2user", user.Email2User) - m.Get("/recover_account", user.ResetPasswd) - m.Post("/recover_account", user.ResetPasswdPost) - m.Get("/forgot_password", user.ForgotPasswd) - m.Post("/forgot_password", user.ForgotPasswdPost) - m.Post("/logout", user.SignOut) - m.Get("/task/:task", user.TaskStatus) - }) - // ***** END: User ***** - - m.Get("/avatar/:hash", user.AvatarByEmailHash) - - adminReq := context.Toggle(&context.ToggleOptions{SignInRequired: true, AdminRequired: true}) - - // ***** START: Admin ***** - m.Group("/admin", func() { - m.Get("", adminReq, admin.Dashboard) - m.Post("", adminReq, bindIgnErr(auth.AdminDashboardForm{}), admin.DashboardPost) - m.Get("/config", admin.Config) - m.Post("/config/test_mail", admin.SendTestMail) - m.Group("/monitor", func() { - m.Get("", admin.Monitor) - m.Post("/cancel/:pid", admin.MonitorCancel) - m.Group("/queue/:qid", func() { - m.Get("", admin.Queue) - m.Post("/set", admin.SetQueueSettings) - m.Post("/add", admin.AddWorkers) - m.Post("/cancel/:pid", admin.WorkerCancel) - m.Post("/flush", admin.Flush) - }) - }) - - m.Group("/users", func() { - m.Get("", admin.Users) - m.Combo("/new").Get(admin.NewUser).Post(bindIgnErr(auth.AdminCreateUserForm{}), admin.NewUserPost) - m.Combo("/:userid").Get(admin.EditUser).Post(bindIgnErr(auth.AdminEditUserForm{}), admin.EditUserPost) - m.Post("/:userid/delete", admin.DeleteUser) - }) - - m.Group("/emails", func() { - m.Get("", admin.Emails) - m.Post("/activate", admin.ActivateEmail) - }) - - m.Group("/orgs", func() { - m.Get("", admin.Organizations) - }) - - m.Group("/repos", func() { - m.Get("", admin.Repos) - m.Combo("/unadopted").Get(admin.UnadoptedRepos).Post(admin.AdoptOrDeleteRepository) - m.Post("/delete", admin.DeleteRepo) - }) - - m.Group("/^:configType(hooks|system-hooks)$", func() { - m.Get("", admin.DefaultOrSystemWebhooks) - m.Post("/delete", admin.DeleteDefaultOrSystemWebhook) - m.Get("/:type/new", repo.WebhooksNew) - m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.GiteaHooksNewPost) - m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost) - m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) - m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) - m.Post("/dingtalk/new", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) - m.Post("/telegram/new", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksNewPost) - m.Post("/matrix/new", bindIgnErr(auth.NewMatrixHookForm{}), repo.MatrixHooksNewPost) - m.Post("/msteams/new", bindIgnErr(auth.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost) - m.Post("/feishu/new", bindIgnErr(auth.NewFeishuHookForm{}), repo.FeishuHooksNewPost) - m.Get("/:id", repo.WebHooksEdit) - m.Post("/gitea/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) - m.Post("/gogs/:id", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksEditPost) - m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) - m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) - m.Post("/dingtalk/:id", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) - m.Post("/telegram/:id", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksEditPost) - m.Post("/matrix/:id", bindIgnErr(auth.NewMatrixHookForm{}), repo.MatrixHooksEditPost) - m.Post("/msteams/:id", bindIgnErr(auth.NewMSTeamsHookForm{}), repo.MSTeamsHooksEditPost) - m.Post("/feishu/:id", bindIgnErr(auth.NewFeishuHookForm{}), repo.FeishuHooksEditPost) - }) - - m.Group("/auths", func() { - m.Get("", admin.Authentications) - m.Combo("/new").Get(admin.NewAuthSource).Post(bindIgnErr(auth.AuthenticationForm{}), admin.NewAuthSourcePost) - m.Combo("/:authid").Get(admin.EditAuthSource). - Post(bindIgnErr(auth.AuthenticationForm{}), admin.EditAuthSourcePost) - m.Post("/:authid/delete", admin.DeleteAuthSource) - }) - - m.Group("/notices", func() { - m.Get("", admin.Notices) - m.Post("/delete", admin.DeleteNotices) - m.Post("/empty", admin.EmptyNotices) - }) - }, adminReq) - // ***** END: Admin ***** - - m.Group("", func() { - m.Get("/:username", user.Profile) - m.Get("/attachments/:uuid", repo.GetAttachment) - }, ignSignIn) - - m.Group("/:username", func() { - m.Post("/action/:action", user.Action) - }, reqSignIn) - - if macaron.Env == macaron.DEV { - m.Get("/template/*", dev.TemplatePreview) - } - - reqRepoAdmin := context.RequireRepoAdmin() - reqRepoCodeWriter := context.RequireRepoWriter(models.UnitTypeCode) - reqRepoCodeReader := context.RequireRepoReader(models.UnitTypeCode) - reqRepoReleaseWriter := context.RequireRepoWriter(models.UnitTypeReleases) - reqRepoReleaseReader := context.RequireRepoReader(models.UnitTypeReleases) - reqRepoWikiWriter := context.RequireRepoWriter(models.UnitTypeWiki) - reqRepoIssueWriter := context.RequireRepoWriter(models.UnitTypeIssues) - reqRepoIssueReader := context.RequireRepoReader(models.UnitTypeIssues) - reqRepoPullsReader := context.RequireRepoReader(models.UnitTypePullRequests) - reqRepoIssuesOrPullsWriter := context.RequireRepoWriterOr(models.UnitTypeIssues, models.UnitTypePullRequests) - reqRepoIssuesOrPullsReader := context.RequireRepoReaderOr(models.UnitTypeIssues, models.UnitTypePullRequests) - reqRepoProjectsReader := context.RequireRepoReader(models.UnitTypeProjects) - reqRepoProjectsWriter := context.RequireRepoWriter(models.UnitTypeProjects) - - // ***** START: Organization ***** - m.Group("/org", func() { - m.Group("", func() { - m.Get("/create", org.Create) - m.Post("/create", bindIgnErr(auth.CreateOrgForm{}), org.CreatePost) - }) - - m.Group("/:org", func() { - m.Get("/dashboard", user.Dashboard) - m.Get("/dashboard/:team", user.Dashboard) - m.Get("/issues", user.Issues) - m.Get("/issues/:team", user.Issues) - m.Get("/pulls", user.Pulls) - m.Get("/pulls/:team", user.Pulls) - m.Get("/milestones", reqMilestonesDashboardPageEnabled, user.Milestones) - m.Get("/milestones/:team", reqMilestonesDashboardPageEnabled, user.Milestones) - m.Get("/members", org.Members) - m.Post("/members/action/:action", org.MembersAction) - m.Get("/teams", org.Teams) - }, context.OrgAssignment(true, false, true)) - - m.Group("/:org", func() { - m.Get("/teams/:team", org.TeamMembers) - m.Get("/teams/:team/repositories", org.TeamRepositories) - m.Post("/teams/:team/action/:action", org.TeamsAction) - m.Post("/teams/:team/action/repo/:action", org.TeamsRepoAction) - }, context.OrgAssignment(true, false, true)) - - m.Group("/:org", func() { - m.Get("/teams/new", org.NewTeam) - m.Post("/teams/new", bindIgnErr(auth.CreateTeamForm{}), org.NewTeamPost) - m.Get("/teams/:team/edit", org.EditTeam) - m.Post("/teams/:team/edit", bindIgnErr(auth.CreateTeamForm{}), org.EditTeamPost) - m.Post("/teams/:team/delete", org.DeleteTeam) - - m.Group("/settings", func() { - m.Combo("").Get(org.Settings). - Post(bindIgnErr(auth.UpdateOrgSettingForm{}), org.SettingsPost) - m.Post("/avatar", binding.MultipartForm(auth.AvatarForm{}), org.SettingsAvatar) - m.Post("/avatar/delete", org.SettingsDeleteAvatar) - - m.Group("/hooks", func() { - m.Get("", org.Webhooks) - m.Post("/delete", org.DeleteWebhook) - m.Get("/:type/new", repo.WebhooksNew) - m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.GiteaHooksNewPost) - m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost) - m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) - m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) - m.Post("/dingtalk/new", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) - m.Post("/telegram/new", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksNewPost) - m.Post("/matrix/new", bindIgnErr(auth.NewMatrixHookForm{}), repo.MatrixHooksNewPost) - m.Post("/msteams/new", bindIgnErr(auth.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost) - m.Post("/feishu/new", bindIgnErr(auth.NewFeishuHookForm{}), repo.FeishuHooksNewPost) - m.Get("/:id", repo.WebHooksEdit) - m.Post("/gitea/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) - m.Post("/gogs/:id", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksEditPost) - m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) - m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) - m.Post("/dingtalk/:id", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) - m.Post("/telegram/:id", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksEditPost) - m.Post("/matrix/:id", bindIgnErr(auth.NewMatrixHookForm{}), repo.MatrixHooksEditPost) - m.Post("/msteams/:id", bindIgnErr(auth.NewMSTeamsHookForm{}), repo.MSTeamsHooksEditPost) - m.Post("/feishu/:id", bindIgnErr(auth.NewFeishuHookForm{}), repo.FeishuHooksEditPost) - }) - - m.Group("/labels", func() { - m.Get("", org.RetrieveLabels, org.Labels) - m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), org.NewLabel) - m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), org.UpdateLabel) - m.Post("/delete", org.DeleteLabel) - m.Post("/initialize", bindIgnErr(auth.InitializeLabelsForm{}), org.InitializeLabels) - }) - - m.Route("/delete", "GET,POST", org.SettingsDelete) - }) - }, context.OrgAssignment(true, true)) - }, reqSignIn) - // ***** END: Organization ***** - - // ***** START: Repository ***** - m.Group("/repo", func() { - m.Get("/create", repo.Create) - m.Post("/create", bindIgnErr(auth.CreateRepoForm{}), repo.CreatePost) - m.Get("/migrate", repo.Migrate) - m.Post("/migrate", bindIgnErr(auth.MigrateRepoForm{}), repo.MigratePost) - m.Group("/fork", func() { - m.Combo("/:repoid").Get(repo.Fork). - Post(bindIgnErr(auth.CreateRepoForm{}), repo.ForkPost) - }, context.RepoIDAssignment(), context.UnitTypes(), reqRepoCodeReader) - }, reqSignIn) - - // ***** Release Attachment Download without Signin - m.Get("/:username/:reponame/releases/download/:vTag/:fileName", ignSignIn, context.RepoAssignment(), repo.MustBeNotEmpty, repo.RedirectDownload) - - m.Group("/:username/:reponame", func() { - m.Group("/settings", func() { - m.Combo("").Get(repo.Settings). - Post(bindIgnErr(auth.RepoSettingForm{}), repo.SettingsPost) - m.Post("/avatar", binding.MultipartForm(auth.AvatarForm{}), repo.SettingsAvatar) - m.Post("/avatar/delete", repo.SettingsDeleteAvatar) - - m.Group("/collaboration", func() { - m.Combo("").Get(repo.Collaboration).Post(repo.CollaborationPost) - m.Post("/access_mode", repo.ChangeCollaborationAccessMode) - m.Post("/delete", repo.DeleteCollaboration) - m.Group("/team", func() { - m.Post("", repo.AddTeamPost) - m.Post("/delete", repo.DeleteTeam) - }) - }) - m.Group("/branches", func() { - m.Combo("").Get(repo.ProtectedBranch).Post(repo.ProtectedBranchPost) - m.Combo("/*").Get(repo.SettingsProtectedBranch). - Post(bindIgnErr(auth.ProtectBranchForm{}), context.RepoMustNotBeArchived(), repo.SettingsProtectedBranchPost) - }, repo.MustBeNotEmpty) - - m.Group("/hooks", func() { - m.Get("", repo.Webhooks) - m.Post("/delete", repo.DeleteWebhook) - m.Get("/:type/new", repo.WebhooksNew) - m.Post("/gitea/new", bindIgnErr(auth.NewWebhookForm{}), repo.GiteaHooksNewPost) - m.Post("/gogs/new", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksNewPost) - m.Post("/slack/new", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksNewPost) - m.Post("/discord/new", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksNewPost) - m.Post("/dingtalk/new", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) - m.Post("/telegram/new", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksNewPost) - m.Post("/matrix/new", bindIgnErr(auth.NewMatrixHookForm{}), repo.MatrixHooksNewPost) - m.Post("/msteams/new", bindIgnErr(auth.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost) - m.Post("/feishu/new", bindIgnErr(auth.NewFeishuHookForm{}), repo.FeishuHooksNewPost) - m.Get("/:id", repo.WebHooksEdit) - m.Post("/:id/test", repo.TestWebhook) - m.Post("/gitea/:id", bindIgnErr(auth.NewWebhookForm{}), repo.WebHooksEditPost) - m.Post("/gogs/:id", bindIgnErr(auth.NewGogshookForm{}), repo.GogsHooksEditPost) - m.Post("/slack/:id", bindIgnErr(auth.NewSlackHookForm{}), repo.SlackHooksEditPost) - m.Post("/discord/:id", bindIgnErr(auth.NewDiscordHookForm{}), repo.DiscordHooksEditPost) - m.Post("/dingtalk/:id", bindIgnErr(auth.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) - m.Post("/telegram/:id", bindIgnErr(auth.NewTelegramHookForm{}), repo.TelegramHooksEditPost) - m.Post("/matrix/:id", bindIgnErr(auth.NewMatrixHookForm{}), repo.MatrixHooksEditPost) - m.Post("/msteams/:id", bindIgnErr(auth.NewMSTeamsHookForm{}), repo.MSTeamsHooksEditPost) - m.Post("/feishu/:id", bindIgnErr(auth.NewFeishuHookForm{}), repo.FeishuHooksEditPost) - - m.Group("/git", func() { - m.Get("", repo.GitHooks) - m.Combo("/:name").Get(repo.GitHooksEdit). - Post(repo.GitHooksEditPost) - }, context.GitHookService()) - }) - - m.Group("/keys", func() { - m.Combo("").Get(repo.DeployKeys). - Post(bindIgnErr(auth.AddKeyForm{}), repo.DeployKeysPost) - m.Post("/delete", repo.DeleteDeployKey) - }) - - m.Group("/lfs", func() { - m.Get("", repo.LFSFiles) - m.Get("/show/:oid", repo.LFSFileGet) - m.Post("/delete/:oid", repo.LFSDelete) - m.Get("/pointers", repo.LFSPointerFiles) - m.Post("/pointers/associate", repo.LFSAutoAssociate) - m.Get("/find", repo.LFSFileFind) - m.Group("/locks", func() { - m.Get("/", repo.LFSLocks) - m.Post("/", repo.LFSLockFile) - m.Post("/:lid/unlock", repo.LFSUnlock) - }) - }) - - }, func(ctx *context.Context) { - ctx.Data["PageIsSettings"] = true - ctx.Data["LFSStartServer"] = setting.LFS.StartServer - }) - }, reqSignIn, context.RepoAssignment(), context.UnitTypes(), reqRepoAdmin, context.RepoRef()) - - m.Post("/:username/:reponame/action/:action", reqSignIn, context.RepoAssignment(), context.UnitTypes(), repo.Action) - - // Grouping for those endpoints not requiring authentication - m.Group("/:username/:reponame", func() { - m.Group("/milestone", func() { - m.Get("/:id", repo.MilestoneIssuesAndPulls) - }, reqRepoIssuesOrPullsReader, context.RepoRef()) - m.Combo("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists). - Get(ignSignIn, repo.SetDiffViewStyle, repo.CompareDiff). - Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(auth.CreateIssueForm{}), repo.CompareAndPullRequestPost) - }, context.RepoAssignment(), context.UnitTypes()) - - // Grouping for those endpoints that do require authentication - m.Group("/:username/:reponame", func() { - m.Group("/issues", func() { - m.Group("/new", func() { - m.Combo("").Get(context.RepoRef(), repo.NewIssue). - Post(bindIgnErr(auth.CreateIssueForm{}), repo.NewIssuePost) - m.Get("/choose", context.RepoRef(), repo.NewIssueChooseTemplate) - }) - }, context.RepoMustNotBeArchived(), reqRepoIssueReader) - // FIXME: should use different URLs but mostly same logic for comments of issue and pull reuqest. - // So they can apply their own enable/disable logic on routers. - m.Group("/issues", func() { - m.Group("/:index", func() { - m.Post("/title", repo.UpdateIssueTitle) - m.Post("/content", repo.UpdateIssueContent) - m.Post("/watch", repo.IssueWatch) - m.Post("/ref", repo.UpdateIssueRef) - m.Group("/dependency", func() { - m.Post("/add", repo.AddDependency) - m.Post("/delete", repo.RemoveDependency) - }) - m.Combo("/comments").Post(repo.MustAllowUserComment, bindIgnErr(auth.CreateCommentForm{}), repo.NewComment) - m.Group("/times", func() { - m.Post("/add", bindIgnErr(auth.AddTimeManuallyForm{}), repo.AddTimeManually) - m.Group("/stopwatch", func() { - m.Post("/toggle", repo.IssueStopwatch) - m.Post("/cancel", repo.CancelStopwatch) - }) - }) - m.Post("/reactions/:action", bindIgnErr(auth.ReactionForm{}), repo.ChangeIssueReaction) - m.Post("/lock", reqRepoIssueWriter, bindIgnErr(auth.IssueLockForm{}), repo.LockIssue) - m.Post("/unlock", reqRepoIssueWriter, repo.UnlockIssue) - }, context.RepoMustNotBeArchived()) - m.Group("/:index", func() { - m.Get("/attachments", repo.GetIssueAttachments) - m.Get("/attachments/:uuid", repo.GetAttachment) - }) - - m.Post("/labels", reqRepoIssuesOrPullsWriter, repo.UpdateIssueLabel) - m.Post("/milestone", reqRepoIssuesOrPullsWriter, repo.UpdateIssueMilestone) - m.Post("/projects", reqRepoIssuesOrPullsWriter, repo.UpdateIssueProject) - m.Post("/assignee", reqRepoIssuesOrPullsWriter, repo.UpdateIssueAssignee) - m.Post("/request_review", reqRepoIssuesOrPullsReader, repo.UpdatePullReviewRequest) - m.Post("/status", reqRepoIssuesOrPullsWriter, repo.UpdateIssueStatus) - m.Post("/resolve_conversation", reqRepoIssuesOrPullsReader, repo.UpdateResolveConversation) - m.Post("/attachments", repo.UploadIssueAttachment) - m.Post("/attachments/remove", repo.DeleteAttachment) - }, context.RepoMustNotBeArchived()) - m.Group("/comments/:id", func() { - m.Post("", repo.UpdateCommentContent) - m.Post("/delete", repo.DeleteComment) - m.Post("/reactions/:action", bindIgnErr(auth.ReactionForm{}), repo.ChangeCommentReaction) - }, context.RepoMustNotBeArchived()) - m.Group("/comments/:id", func() { - m.Get("/attachments", repo.GetCommentAttachments) - }) - m.Group("/labels", func() { - m.Post("/new", bindIgnErr(auth.CreateLabelForm{}), repo.NewLabel) - m.Post("/edit", bindIgnErr(auth.CreateLabelForm{}), repo.UpdateLabel) - m.Post("/delete", repo.DeleteLabel) - m.Post("/initialize", bindIgnErr(auth.InitializeLabelsForm{}), repo.InitializeLabels) - }, context.RepoMustNotBeArchived(), reqRepoIssuesOrPullsWriter, context.RepoRef()) - m.Group("/milestones", func() { - m.Combo("/new").Get(repo.NewMilestone). - Post(bindIgnErr(auth.CreateMilestoneForm{}), repo.NewMilestonePost) - m.Get("/:id/edit", repo.EditMilestone) - m.Post("/:id/edit", bindIgnErr(auth.CreateMilestoneForm{}), repo.EditMilestonePost) - m.Post("/:id/:action", repo.ChangeMilestoneStatus) - m.Post("/delete", repo.DeleteMilestone) - }, context.RepoMustNotBeArchived(), reqRepoIssuesOrPullsWriter, context.RepoRef()) - m.Group("/pull", func() { - m.Post("/:index/target_branch", repo.UpdatePullRequestTarget) - }, context.RepoMustNotBeArchived()) - - m.Group("", func() { - m.Group("", func() { - m.Combo("/_edit/*").Get(repo.EditFile). - Post(bindIgnErr(auth.EditRepoFileForm{}), repo.EditFilePost) - m.Combo("/_new/*").Get(repo.NewFile). - Post(bindIgnErr(auth.EditRepoFileForm{}), repo.NewFilePost) - m.Post("/_preview/*", bindIgnErr(auth.EditPreviewDiffForm{}), repo.DiffPreviewPost) - m.Combo("/_delete/*").Get(repo.DeleteFile). - Post(bindIgnErr(auth.DeleteRepoFileForm{}), repo.DeleteFilePost) - m.Combo("/_upload/*", repo.MustBeAbleToUpload). - Get(repo.UploadFile). - Post(bindIgnErr(auth.UploadRepoFileForm{}), repo.UploadFilePost) - }, context.RepoRefByType(context.RepoRefBranch), repo.MustBeEditable) - m.Group("", func() { - m.Post("/upload-file", repo.UploadFileToServer) - m.Post("/upload-remove", bindIgnErr(auth.RemoveUploadFileForm{}), repo.RemoveUploadFileFromServer) - }, context.RepoRef(), repo.MustBeEditable, repo.MustBeAbleToUpload) - }, context.RepoMustNotBeArchived(), reqRepoCodeWriter, repo.MustBeNotEmpty) - - m.Group("/branches", func() { - m.Group("/_new/", func() { - m.Post("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.CreateBranch) - m.Post("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.CreateBranch) - m.Post("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.CreateBranch) - }, bindIgnErr(auth.NewBranchForm{})) - m.Post("/delete", repo.DeleteBranchPost) - m.Post("/restore", repo.RestoreBranchPost) - }, context.RepoMustNotBeArchived(), reqRepoCodeWriter, repo.MustBeNotEmpty) - - }, reqSignIn, context.RepoAssignment(), context.UnitTypes()) - - // Releases - m.Group("/:username/:reponame", func() { - m.Get("/tags", repo.TagsList, repo.MustBeNotEmpty, - reqRepoCodeReader, context.RepoRefByType(context.RepoRefTag)) - m.Group("/releases", func() { - m.Get("/", repo.Releases) - m.Get("/tag/*", repo.SingleRelease) - m.Get("/latest", repo.LatestRelease) - m.Get("/attachments/:uuid", repo.GetAttachment) - }, repo.MustBeNotEmpty, reqRepoReleaseReader, context.RepoRefByType(context.RepoRefTag)) - m.Group("/releases", func() { - m.Get("/new", repo.NewRelease) - m.Post("/new", bindIgnErr(auth.NewReleaseForm{}), repo.NewReleasePost) - m.Post("/delete", repo.DeleteRelease) - m.Post("/attachments", repo.UploadReleaseAttachment) - m.Post("/attachments/remove", repo.DeleteAttachment) - }, reqSignIn, repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoReleaseWriter, context.RepoRef()) - m.Post("/tags/delete", repo.DeleteTag, reqSignIn, - repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoCodeWriter, context.RepoRef()) - m.Group("/releases", func() { - m.Get("/edit/*", repo.EditRelease) - m.Post("/edit/*", bindIgnErr(auth.EditReleaseForm{}), repo.EditReleasePost) - }, reqSignIn, repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoReleaseWriter, func(ctx *context.Context) { - var err error - ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) - if err != nil { - ctx.ServerError("GetBranchCommit", err) - return - } - ctx.Repo.CommitsCount, err = ctx.Repo.GetCommitsCount() - if err != nil { - ctx.ServerError("GetCommitsCount", err) - return - } - ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount - }) - }, ignSignIn, context.RepoAssignment(), context.UnitTypes(), reqRepoReleaseReader) - - m.Group("/:username/:reponame", func() { - m.Post("/topics", repo.TopicsPost) - }, context.RepoAssignment(), context.RepoMustNotBeArchived(), reqRepoAdmin) - - m.Group("/:username/:reponame", func() { - m.Group("", func() { - m.Get("/^:type(issues|pulls)$", repo.Issues) - m.Get("/^:type(issues|pulls)$/:index", repo.ViewIssue) - m.Get("/labels/", reqRepoIssuesOrPullsReader, repo.RetrieveLabels, repo.Labels) - m.Get("/milestones", reqRepoIssuesOrPullsReader, repo.Milestones) - }, context.RepoRef()) - - m.Group("/projects", func() { - m.Get("", repo.Projects) - m.Get("/:id", repo.ViewProject) - m.Group("", func() { - m.Get("/new", repo.NewProject) - m.Post("/new", bindIgnErr(auth.CreateProjectForm{}), repo.NewProjectPost) - m.Group("/:id", func() { - m.Post("", bindIgnErr(auth.EditProjectBoardTitleForm{}), repo.AddBoardToProjectPost) - m.Post("/delete", repo.DeleteProject) - - m.Get("/edit", repo.EditProject) - m.Post("/edit", bindIgnErr(auth.CreateProjectForm{}), repo.EditProjectPost) - m.Post("/^:action(open|close)$", repo.ChangeProjectStatus) - - m.Group("/:boardID", func() { - m.Put("", bindIgnErr(auth.EditProjectBoardTitleForm{}), repo.EditProjectBoardTitle) - m.Delete("", repo.DeleteProjectBoard) - - m.Post("/:index", repo.MoveIssueAcrossBoards) - }) - }) - }, reqRepoProjectsWriter, context.RepoMustNotBeArchived()) - }, reqRepoProjectsReader, repo.MustEnableProjects) - - m.Group("/wiki", func() { - m.Get("/?:page", repo.Wiki) - m.Get("/_pages", repo.WikiPages) - m.Get("/:page/_revision", repo.WikiRevision) - m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff) - m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", repo.RawDiff) - - m.Group("", func() { - m.Combo("/_new").Get(repo.NewWiki). - Post(bindIgnErr(auth.NewWikiForm{}), repo.NewWikiPost) - m.Combo("/:page/_edit").Get(repo.EditWiki). - Post(bindIgnErr(auth.NewWikiForm{}), repo.EditWikiPost) - m.Post("/:page/delete", repo.DeleteWikiPagePost) - }, context.RepoMustNotBeArchived(), reqSignIn, reqRepoWikiWriter) - }, repo.MustEnableWiki, context.RepoRef(), func(ctx *context.Context) { - ctx.Data["PageIsWiki"] = true - }) - - m.Group("/wiki", func() { - m.Get("/raw/*", repo.WikiRaw) - }, repo.MustEnableWiki) - - m.Group("/activity", func() { - m.Get("", repo.Activity) - m.Get("/:period", repo.Activity) - }, context.RepoRef(), repo.MustBeNotEmpty, context.RequireRepoReaderOr(models.UnitTypePullRequests, models.UnitTypeIssues, models.UnitTypeReleases)) - - m.Group("/activity_author_data", func() { - m.Get("", repo.ActivityAuthors) - m.Get("/:period", repo.ActivityAuthors) - }, context.RepoRef(), repo.MustBeNotEmpty, context.RequireRepoReaderOr(models.UnitTypeCode)) - - m.Group("/archive", func() { - m.Get("/*", repo.Download) - m.Post("/*", repo.InitiateDownload) - }, repo.MustBeNotEmpty, reqRepoCodeReader) - - m.Group("/branches", func() { - m.Get("", repo.Branches) - }, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) - - m.Group("/blob_excerpt", func() { - m.Get("/:sha", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.ExcerptBlob) - }, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) - - m.Group("/pulls/:index", func() { - m.Get(".diff", repo.DownloadPullDiff) - m.Get(".patch", repo.DownloadPullPatch) - m.Get("/commits", context.RepoRef(), repo.ViewPullCommits) - m.Post("/merge", context.RepoMustNotBeArchived(), bindIgnErr(auth.MergePullRequestForm{}), repo.MergePullRequest) - m.Post("/update", repo.UpdatePullRequest) - m.Post("/cleanup", context.RepoMustNotBeArchived(), context.RepoRef(), repo.CleanUpPullRequest) - m.Group("/files", func() { - m.Get("", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.ViewPullFiles) - m.Group("/reviews", func() { - m.Get("/new_comment", repo.RenderNewCodeCommentForm) - m.Post("/comments", bindIgnErr(auth.CodeCommentForm{}), repo.CreateCodeComment) - m.Post("/submit", bindIgnErr(auth.SubmitReviewForm{}), repo.SubmitReview) - }, context.RepoMustNotBeArchived()) - }) - }, repo.MustAllowPulls) - - m.Group("/media", func() { - m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.SingleDownloadOrLFS) - m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.SingleDownloadOrLFS) - m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.SingleDownloadOrLFS) - m.Get("/blob/:sha", context.RepoRefByType(context.RepoRefBlob), repo.DownloadByIDOrLFS) - // "/*" route is deprecated, and kept for backward compatibility - m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.SingleDownloadOrLFS) - }, repo.MustBeNotEmpty, reqRepoCodeReader) - - m.Group("/raw", func() { - m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.SingleDownload) - m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.SingleDownload) - m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.SingleDownload) - m.Get("/blob/:sha", context.RepoRefByType(context.RepoRefBlob), repo.DownloadByID) - // "/*" route is deprecated, and kept for backward compatibility - m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.SingleDownload) - }, repo.MustBeNotEmpty, reqRepoCodeReader) - - m.Group("/commits", func() { - m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.RefCommits) - m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.RefCommits) - m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.RefCommits) - // "/*" route is deprecated, and kept for backward compatibility - m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.RefCommits) - }, repo.MustBeNotEmpty, reqRepoCodeReader) - - m.Group("/blame", func() { - m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.RefBlame) - m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.RefBlame) - m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.RefBlame) - }, repo.MustBeNotEmpty, reqRepoCodeReader) - - m.Group("", func() { - m.Get("/graph", repo.Graph) - m.Get("/commit/:sha([a-f0-9]{7,40})$", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.Diff) - }, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) - - m.Group("/src", func() { - m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Home) - m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Home) - m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Home) - // "/*" route is deprecated, and kept for backward compatibility - m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Home) - }, repo.SetEditorconfigIfExists) - - m.Group("", func() { - m.Get("/forks", repo.Forks) - }, context.RepoRef(), reqRepoCodeReader) - m.Get("/commit/:sha([a-f0-9]{7,40})\\.:ext(patch|diff)", - repo.MustBeNotEmpty, reqRepoCodeReader, repo.RawDiff) - }, ignSignIn, context.RepoAssignment(), context.UnitTypes()) - m.Group("/:username/:reponame", func() { - m.Get("/stars", repo.Stars) - m.Get("/watchers", repo.Watchers) - m.Get("/search", reqRepoCodeReader, repo.Search) - }, ignSignIn, context.RepoAssignment(), context.RepoRef(), context.UnitTypes()) - - m.Group("/:username", func() { - m.Group("/:reponame", func() { - m.Get("", repo.SetEditorconfigIfExists, repo.Home) - m.Get("\\.git$", repo.SetEditorconfigIfExists, repo.Home) - }, ignSignIn, context.RepoAssignment(), context.RepoRef(), context.UnitTypes()) - - m.Group("/:reponame", func() { - m.Group("\\.git/info/lfs", func() { - m.Post("/objects/batch", lfs.BatchHandler) - m.Get("/objects/:oid/:filename", lfs.ObjectOidHandler) - m.Any("/objects/:oid", lfs.ObjectOidHandler) - m.Post("/objects", lfs.PostHandler) - m.Post("/verify", lfs.VerifyHandler) - m.Group("/locks", func() { - m.Get("/", lfs.GetListLockHandler) - m.Post("/", lfs.PostLockHandler) - m.Post("/verify", lfs.VerifyLockHandler) - m.Post("/:lid/unlock", lfs.UnLockHandler) - }) - m.Any("/*", func(ctx *context.Context) { - ctx.NotFound("", nil) - }) - }, ignSignInAndCsrf) - m.Any("/*", ignSignInAndCsrf, repo.HTTP) - m.Head("/tasks/trigger", repo.TriggerTask) - }) - }) - // ***** END: Repository ***** - - m.Group("/notifications", func() { - m.Get("", user.Notifications) - m.Post("/status", user.NotificationStatusPost) - m.Post("/purge", user.NotificationPurgePost) - }, reqSignIn) - - if setting.API.EnableSwagger { - m.Get("/swagger.v1.json", templates.JSONRenderer(), routers.SwaggerV1Json) - } - - var handlers []macaron.Handler - if setting.CORSConfig.Enabled { - handlers = append(handlers, cors.CORS(cors.Options{ - Scheme: setting.CORSConfig.Scheme, - AllowDomain: setting.CORSConfig.AllowDomain, - AllowSubdomain: setting.CORSConfig.AllowSubdomain, - Methods: setting.CORSConfig.Methods, - MaxAgeSeconds: int(setting.CORSConfig.MaxAge.Seconds()), - AllowCredentials: setting.CORSConfig.AllowCredentials, - })) - } - handlers = append(handlers, ignSignIn) - m.Group("/api", func() { - apiv1.RegisterRoutes(m) - }, handlers...) - - m.Group("/api/internal", func() { - // package name internal is ideal but Golang is not allowed, so we use private as package name. - private.RegisterRoutes(m) - }) - - // Not found handler. - m.NotFound(routers.NotFound) -} diff --git a/routers/routes/recovery.go b/routers/routes/recovery.go deleted file mode 100644 index f392d1d55..000000000 --- a/routers/routes/recovery.go +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package routes - -import ( - "fmt" - "net/http" - - "code.gitea.io/gitea/modules/auth/sso" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/middlewares" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/templates" - - "github.com/unrolled/render" -) - -type dataStore struct { - Data map[string]interface{} -} - -func (d *dataStore) GetData() map[string]interface{} { - return d.Data -} - -// Recovery returns a middleware that recovers from any panics and writes a 500 and a log if so. -// Although similar to macaron.Recovery() the main difference is that this error will be created -// with the gitea 500 page. -func Recovery() func(next http.Handler) http.Handler { - var isDevelopment = setting.RunMode != "prod" - return func(next http.Handler) http.Handler { - rnd := render.New(render.Options{ - Extensions: []string{".tmpl"}, - Directory: "templates", - Funcs: templates.NewFuncMap(), - Asset: templates.GetAsset, - AssetNames: templates.GetAssetNames, - IsDevelopment: isDevelopment, - }) - - return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - defer func() { - // Why we need this? The first recover will try to render a beautiful - // error page for user, but the process can still panic again, then - // we have to just recover twice and send a simple error page that - // should not panic any more. - defer func() { - if err := recover(); err != nil { - combinedErr := fmt.Sprintf("PANIC: %v\n%s", err, string(log.Stack(2))) - log.Error(combinedErr) - if isDevelopment { - http.Error(w, combinedErr, 500) - } else { - http.Error(w, http.StatusText(500), 500) - } - } - }() - - if err := recover(); err != nil { - combinedErr := fmt.Sprintf("PANIC: %v\n%s", err, string(log.Stack(2))) - log.Error("%v", combinedErr) - - lc := middlewares.Locale(w, req) - - // TODO: this should be replaced by real session after macaron removed totally - sessionStore, err := sessionManager.Start(w, req) - if err != nil { - // Just invoke the above recover catch - panic("session(start): " + err.Error()) - } - - var store = dataStore{ - Data: templates.Vars{ - "Language": lc.Language(), - "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), - "i18n": lc, - }, - } - - // Get user from session if logged in. - user, _ := sso.SignedInUser(req, w, &store, sessionStore) - if user != nil { - store.Data["IsSigned"] = true - store.Data["SignedUser"] = user - store.Data["SignedUserID"] = user.ID - store.Data["SignedUserName"] = user.Name - store.Data["IsAdmin"] = user.IsAdmin - } else { - store.Data["SignedUserID"] = int64(0) - store.Data["SignedUserName"] = "" - } - - w.Header().Set(`X-Frame-Options`, `SAMEORIGIN`) - - if setting.RunMode != "prod" { - store.Data["ErrMsg"] = combinedErr - } - err = rnd.HTML(w, 500, "status/500", templates.BaseVars().Merge(store.Data)) - if err != nil { - log.Error("%v", err) - } - } - }() - - next.ServeHTTP(w, req) - }) - } -} diff --git a/routers/swagger_json.go b/routers/swagger_json.go deleted file mode 100644 index 58c4ec50d..000000000 --- a/routers/swagger_json.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package routers - -import ( - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" -) - -// tplSwaggerV1Json swagger v1 json template -const tplSwaggerV1Json base.TplName = "swagger/v1_json" - -// SwaggerV1Json render swagger v1 json -func SwaggerV1Json(ctx *context.Context) { - ctx.HTML(200, tplSwaggerV1Json) -} diff --git a/routers/user/auth.go b/routers/user/auth.go deleted file mode 100644 index bce801847..000000000 --- a/routers/user/auth.go +++ /dev/null @@ -1,1616 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "errors" - "fmt" - "net/http" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/auth/oauth2" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/eventsource" - "code.gitea.io/gitea/modules/hcaptcha" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/password" - "code.gitea.io/gitea/modules/recaptcha" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/routers/utils" - "code.gitea.io/gitea/services/externalaccount" - "code.gitea.io/gitea/services/mailer" - - "gitea.com/macaron/captcha" - "github.com/markbates/goth" - "github.com/tstranex/u2f" -) - -const ( - // tplMustChangePassword template for updating a user's password - tplMustChangePassword = "user/auth/change_passwd" - // tplSignIn template for sign in page - tplSignIn base.TplName = "user/auth/signin" - // tplSignUp template path for sign up page - tplSignUp base.TplName = "user/auth/signup" - // TplActivate template path for activate user - TplActivate base.TplName = "user/auth/activate" - tplForgotPassword base.TplName = "user/auth/forgot_passwd" - tplResetPassword base.TplName = "user/auth/reset_passwd" - tplTwofa base.TplName = "user/auth/twofa" - tplTwofaScratch base.TplName = "user/auth/twofa_scratch" - tplLinkAccount base.TplName = "user/auth/link_account" - tplU2F base.TplName = "user/auth/u2f" -) - -// AutoSignIn reads cookie and try to auto-login. -func AutoSignIn(ctx *context.Context) (bool, error) { - if !models.HasEngine { - return false, nil - } - - uname := ctx.GetCookie(setting.CookieUserName) - if len(uname) == 0 { - return false, nil - } - - isSucceed := false - defer func() { - if !isSucceed { - log.Trace("auto-login cookie cleared: %s", uname) - ctx.SetCookie(setting.CookieUserName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - ctx.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - } - }() - - u, err := models.GetUserByName(uname) - if err != nil { - if !models.IsErrUserNotExist(err) { - return false, fmt.Errorf("GetUserByName: %v", err) - } - return false, nil - } - - if val, ok := ctx.GetSuperSecureCookie( - base.EncodeMD5(u.Rands+u.Passwd), setting.CookieRememberName); !ok || val != u.Name { - return false, nil - } - - isSucceed = true - - // Set session IDs - if err := ctx.Session.Set("uid", u.ID); err != nil { - return false, err - } - if err := ctx.Session.Set("uname", u.Name); err != nil { - return false, err - } - if err := ctx.Session.Release(); err != nil { - return false, err - } - - ctx.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - return true, nil -} - -func checkAutoLogin(ctx *context.Context) bool { - // Check auto-login. - isSucceed, err := AutoSignIn(ctx) - if err != nil { - ctx.ServerError("AutoSignIn", err) - return true - } - - redirectTo := ctx.Query("redirect_to") - if len(redirectTo) > 0 { - ctx.SetCookie("redirect_to", redirectTo, 0, setting.AppSubURL, "", setting.SessionConfig.Secure, true) - } else { - redirectTo = ctx.GetCookie("redirect_to") - } - - if isSucceed { - ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL, "", setting.SessionConfig.Secure, true) - ctx.RedirectToFirst(redirectTo, setting.AppSubURL+string(setting.LandingPageURL)) - return true - } - - return false -} - -// SignIn render sign in page -func SignIn(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("sign_in") - - // Check auto-login. - if checkAutoLogin(ctx) { - return - } - - orderedOAuth2Names, oauth2Providers, err := models.GetActiveOAuth2Providers() - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - ctx.Data["OrderedOAuth2Names"] = orderedOAuth2Names - ctx.Data["OAuth2Providers"] = oauth2Providers - ctx.Data["Title"] = ctx.Tr("sign_in") - ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login" - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsLogin"] = true - ctx.Data["EnableSSPI"] = models.IsSSPIEnabled() - - ctx.HTML(200, tplSignIn) -} - -// SignInPost response for sign in request -func SignInPost(ctx *context.Context, form auth.SignInForm) { - ctx.Data["Title"] = ctx.Tr("sign_in") - - orderedOAuth2Names, oauth2Providers, err := models.GetActiveOAuth2Providers() - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - ctx.Data["OrderedOAuth2Names"] = orderedOAuth2Names - ctx.Data["OAuth2Providers"] = oauth2Providers - ctx.Data["Title"] = ctx.Tr("sign_in") - ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login" - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsLogin"] = true - ctx.Data["EnableSSPI"] = models.IsSSPIEnabled() - - if ctx.HasError() { - ctx.HTML(200, tplSignIn) - return - } - - u, err := models.UserSignIn(form.UserName, form.Password) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplSignIn, &form) - log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) - } else if models.IsErrEmailAlreadyUsed(err) { - ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSignIn, &form) - log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) - } else if models.IsErrUserProhibitLogin(err) { - log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) - ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") - ctx.HTML(200, "user/auth/prohibit_login") - } else if models.IsErrUserInactive(err) { - if setting.Service.RegisterEmailConfirm { - ctx.Data["Title"] = ctx.Tr("auth.active_your_account") - ctx.HTML(200, TplActivate) - } else { - log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) - ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") - ctx.HTML(200, "user/auth/prohibit_login") - } - } else { - ctx.ServerError("UserSignIn", err) - } - return - } - // If this user is enrolled in 2FA, we can't sign the user in just yet. - // Instead, redirect them to the 2FA authentication page. - _, err = models.GetTwoFactorByUID(u.ID) - if err != nil { - if models.IsErrTwoFactorNotEnrolled(err) { - handleSignIn(ctx, u, form.Remember) - } else { - ctx.ServerError("UserSignIn", err) - } - return - } - - // User needs to use 2FA, save data and redirect to 2FA page. - if err := ctx.Session.Set("twofaUid", u.ID); err != nil { - ctx.ServerError("UserSignIn: Unable to set twofaUid in session", err) - return - } - if err := ctx.Session.Set("twofaRemember", form.Remember); err != nil { - ctx.ServerError("UserSignIn: Unable to set twofaRemember in session", err) - return - } - if err := ctx.Session.Release(); err != nil { - ctx.ServerError("UserSignIn: Unable to save session", err) - return - } - - regs, err := models.GetU2FRegistrationsByUID(u.ID) - if err == nil && len(regs) > 0 { - ctx.Redirect(setting.AppSubURL + "/user/u2f") - return - } - - ctx.Redirect(setting.AppSubURL + "/user/two_factor") -} - -// TwoFactor shows the user a two-factor authentication page. -func TwoFactor(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("twofa") - - // Check auto-login. - if checkAutoLogin(ctx) { - return - } - - // Ensure user is in a 2FA session. - if ctx.Session.Get("twofaUid") == nil { - ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) - return - } - - ctx.HTML(200, tplTwofa) -} - -// TwoFactorPost validates a user's two-factor authentication token. -func TwoFactorPost(ctx *context.Context, form auth.TwoFactorAuthForm) { - ctx.Data["Title"] = ctx.Tr("twofa") - - // Ensure user is in a 2FA session. - idSess := ctx.Session.Get("twofaUid") - if idSess == nil { - ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) - return - } - - id := idSess.(int64) - twofa, err := models.GetTwoFactorByUID(id) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - // Validate the passcode with the stored TOTP secret. - ok, err := twofa.ValidateTOTP(form.Passcode) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - if ok && twofa.LastUsedPasscode != form.Passcode { - remember := ctx.Session.Get("twofaRemember").(bool) - u, err := models.GetUserByID(id) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - if ctx.Session.Get("linkAccount") != nil { - gothUser := ctx.Session.Get("linkAccountGothUser") - if gothUser == nil { - ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) - return - } - - err = externalaccount.LinkAccountToUser(u, gothUser.(goth.User)) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - } - - twofa.LastUsedPasscode = form.Passcode - if err = models.UpdateTwoFactor(twofa); err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - handleSignIn(ctx, u, remember) - return - } - - ctx.RenderWithErr(ctx.Tr("auth.twofa_passcode_incorrect"), tplTwofa, auth.TwoFactorAuthForm{}) -} - -// TwoFactorScratch shows the scratch code form for two-factor authentication. -func TwoFactorScratch(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("twofa_scratch") - - // Check auto-login. - if checkAutoLogin(ctx) { - return - } - - // Ensure user is in a 2FA session. - if ctx.Session.Get("twofaUid") == nil { - ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) - return - } - - ctx.HTML(200, tplTwofaScratch) -} - -// TwoFactorScratchPost validates and invalidates a user's two-factor scratch token. -func TwoFactorScratchPost(ctx *context.Context, form auth.TwoFactorScratchAuthForm) { - ctx.Data["Title"] = ctx.Tr("twofa_scratch") - - // Ensure user is in a 2FA session. - idSess := ctx.Session.Get("twofaUid") - if idSess == nil { - ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) - return - } - - id := idSess.(int64) - twofa, err := models.GetTwoFactorByUID(id) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - // Validate the passcode with the stored TOTP secret. - if twofa.VerifyScratchToken(form.Token) { - // Invalidate the scratch token. - _, err = twofa.GenerateScratchToken() - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - if err = models.UpdateTwoFactor(twofa); err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - remember := ctx.Session.Get("twofaRemember").(bool) - u, err := models.GetUserByID(id) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - handleSignInFull(ctx, u, remember, false) - ctx.Flash.Info(ctx.Tr("auth.twofa_scratch_used")) - ctx.Redirect(setting.AppSubURL + "/user/settings/security") - return - } - - ctx.RenderWithErr(ctx.Tr("auth.twofa_scratch_token_incorrect"), tplTwofaScratch, auth.TwoFactorScratchAuthForm{}) -} - -// U2F shows the U2F login page -func U2F(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("twofa") - ctx.Data["RequireU2F"] = true - // Check auto-login. - if checkAutoLogin(ctx) { - return - } - - // Ensure user is in a 2FA session. - if ctx.Session.Get("twofaUid") == nil { - ctx.ServerError("UserSignIn", errors.New("not in U2F session")) - return - } - - ctx.HTML(200, tplU2F) -} - -// U2FChallenge submits a sign challenge to the browser -func U2FChallenge(ctx *context.Context) { - // Ensure user is in a U2F session. - idSess := ctx.Session.Get("twofaUid") - if idSess == nil { - ctx.ServerError("UserSignIn", errors.New("not in U2F session")) - return - } - id := idSess.(int64) - regs, err := models.GetU2FRegistrationsByUID(id) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - if len(regs) == 0 { - ctx.ServerError("UserSignIn", errors.New("no device registered")) - return - } - challenge, err := u2f.NewChallenge(setting.U2F.AppID, setting.U2F.TrustedFacets) - if err != nil { - ctx.ServerError("u2f.NewChallenge", err) - return - } - if err := ctx.Session.Set("u2fChallenge", challenge); err != nil { - ctx.ServerError("UserSignIn: unable to set u2fChallenge in session", err) - return - } - if err := ctx.Session.Release(); err != nil { - ctx.ServerError("UserSignIn: unable to store session", err) - } - - ctx.JSON(200, challenge.SignRequest(regs.ToRegistrations())) -} - -// U2FSign authenticates the user by signResp -func U2FSign(ctx *context.Context, signResp u2f.SignResponse) { - challSess := ctx.Session.Get("u2fChallenge") - idSess := ctx.Session.Get("twofaUid") - if challSess == nil || idSess == nil { - ctx.ServerError("UserSignIn", errors.New("not in U2F session")) - return - } - challenge := challSess.(*u2f.Challenge) - id := idSess.(int64) - regs, err := models.GetU2FRegistrationsByUID(id) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - for _, reg := range regs { - r, err := reg.Parse() - if err != nil { - log.Fatal("parsing u2f registration: %v", err) - continue - } - newCounter, authErr := r.Authenticate(signResp, *challenge, reg.Counter) - if authErr == nil { - reg.Counter = newCounter - user, err := models.GetUserByID(id) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - remember := ctx.Session.Get("twofaRemember").(bool) - if err := reg.UpdateCounter(); err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - if ctx.Session.Get("linkAccount") != nil { - gothUser := ctx.Session.Get("linkAccountGothUser") - if gothUser == nil { - ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) - return - } - - err = externalaccount.LinkAccountToUser(user, gothUser.(goth.User)) - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - } - redirect := handleSignInFull(ctx, user, remember, false) - if redirect == "" { - redirect = setting.AppSubURL + "/" - } - ctx.PlainText(200, []byte(redirect)) - return - } - } - ctx.Error(401) -} - -// This handles the final part of the sign-in process of the user. -func handleSignIn(ctx *context.Context, u *models.User, remember bool) { - handleSignInFull(ctx, u, remember, true) -} - -func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyRedirect bool) string { - if remember { - days := 86400 * setting.LogInRememberDays - ctx.SetCookie(setting.CookieUserName, u.Name, days, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - ctx.SetSuperSecureCookie(base.EncodeMD5(u.Rands+u.Passwd), - setting.CookieRememberName, u.Name, days, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - } - - _ = ctx.Session.Delete("openid_verified_uri") - _ = ctx.Session.Delete("openid_signin_remember") - _ = ctx.Session.Delete("openid_determined_email") - _ = ctx.Session.Delete("openid_determined_username") - _ = ctx.Session.Delete("twofaUid") - _ = ctx.Session.Delete("twofaRemember") - _ = ctx.Session.Delete("u2fChallenge") - _ = ctx.Session.Delete("linkAccount") - if err := ctx.Session.Set("uid", u.ID); err != nil { - log.Error("Error setting uid %d in session: %v", u.ID, err) - } - if err := ctx.Session.Set("uname", u.Name); err != nil { - log.Error("Error setting uname %s session: %v", u.Name, err) - } - if err := ctx.Session.Release(); err != nil { - log.Error("Unable to store session: %v", err) - } - - // Language setting of the user overwrites the one previously set - // If the user does not have a locale set, we save the current one. - if len(u.Language) == 0 { - u.Language = ctx.Locale.Language() - if err := models.UpdateUserCols(u, "language"); err != nil { - log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", u.ID, u.Language)) - return setting.AppSubURL + "/" - } - } - - ctx.SetCookie("lang", u.Language, nil, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - - // Clear whatever CSRF has right now, force to generate a new one - ctx.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - - // Register last login - u.SetLastLogin() - if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { - ctx.ServerError("UpdateUserCols", err) - return setting.AppSubURL + "/" - } - - if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !utils.IsExternalURL(redirectTo) { - ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL, "", setting.SessionConfig.Secure, true) - if obeyRedirect { - ctx.RedirectToFirst(redirectTo) - } - return redirectTo - } - - if obeyRedirect { - ctx.Redirect(setting.AppSubURL + "/") - } - return setting.AppSubURL + "/" -} - -// SignInOAuth handles the OAuth2 login buttons -func SignInOAuth(ctx *context.Context) { - provider := ctx.Params(":provider") - - loginSource, err := models.GetActiveOAuth2LoginSourceByName(provider) - if err != nil { - ctx.ServerError("SignIn", err) - return - } - - // try to do a direct callback flow, so we don't authenticate the user again but use the valid accesstoken to get the user - user, gothUser, err := oAuth2UserLoginCallback(loginSource, ctx.Req.Request, ctx.Resp) - if err == nil && user != nil { - // we got the user without going through the whole OAuth2 authentication flow again - handleOAuth2SignIn(user, gothUser, ctx, err) - return - } - - if err = oauth2.Auth(loginSource.Name, ctx.Req.Request, ctx.Resp); err != nil { - if strings.Contains(err.Error(), "no provider for ") { - if err = models.ResetOAuth2(); err != nil { - ctx.ServerError("SignIn", err) - return - } - if err = oauth2.Auth(loginSource.Name, ctx.Req.Request, ctx.Resp); err != nil { - ctx.ServerError("SignIn", err) - } - return - } - ctx.ServerError("SignIn", err) - } - // redirect is done in oauth2.Auth -} - -// SignInOAuthCallback handles the callback from the given provider -func SignInOAuthCallback(ctx *context.Context) { - provider := ctx.Params(":provider") - - // first look if the provider is still active - loginSource, err := models.GetActiveOAuth2LoginSourceByName(provider) - if err != nil { - ctx.ServerError("SignIn", err) - return - } - - if loginSource == nil { - ctx.ServerError("SignIn", errors.New("No valid provider found, check configured callback url in provider")) - return - } - - u, gothUser, err := oAuth2UserLoginCallback(loginSource, ctx.Req.Request, ctx.Resp) - - handleOAuth2SignIn(u, gothUser, ctx, err) -} - -func handleOAuth2SignIn(u *models.User, gothUser goth.User, ctx *context.Context, err error) { - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - if u == nil { - // no existing user is found, request attach or new account - if err := ctx.Session.Set("linkAccountGothUser", gothUser); err != nil { - log.Error("Error setting linkAccountGothUser in session: %v", err) - } - if err := ctx.Session.Release(); err != nil { - log.Error("Error storing session: %v", err) - } - ctx.Redirect(setting.AppSubURL + "/user/link_account") - return - } - - // If this user is enrolled in 2FA, we can't sign the user in just yet. - // Instead, redirect them to the 2FA authentication page. - _, err = models.GetTwoFactorByUID(u.ID) - if err != nil { - if !models.IsErrTwoFactorNotEnrolled(err) { - ctx.ServerError("UserSignIn", err) - return - } - - if err := ctx.Session.Set("uid", u.ID); err != nil { - log.Error("Error setting uid in session: %v", err) - } - if err := ctx.Session.Set("uname", u.Name); err != nil { - log.Error("Error setting uname in session: %v", err) - } - if err := ctx.Session.Release(); err != nil { - log.Error("Error storing session: %v", err) - } - - // Clear whatever CSRF has right now, force to generate a new one - ctx.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - - // Register last login - u.SetLastLogin() - if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { - ctx.ServerError("UpdateUserCols", err) - return - } - - // update external user information - if err := models.UpdateExternalUser(u, gothUser); err != nil { - log.Error("UpdateExternalUser failed: %v", err) - } - - if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 { - ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL, "", setting.SessionConfig.Secure, true) - ctx.RedirectToFirst(redirectTo) - return - } - - ctx.Redirect(setting.AppSubURL + "/") - return - } - - // User needs to use 2FA, save data and redirect to 2FA page. - if err := ctx.Session.Set("twofaUid", u.ID); err != nil { - log.Error("Error setting twofaUid in session: %v", err) - } - if err := ctx.Session.Set("twofaRemember", false); err != nil { - log.Error("Error setting twofaRemember in session: %v", err) - } - if err := ctx.Session.Release(); err != nil { - log.Error("Error storing session: %v", err) - } - - // If U2F is enrolled -> Redirect to U2F instead - regs, err := models.GetU2FRegistrationsByUID(u.ID) - if err == nil && len(regs) > 0 { - ctx.Redirect(setting.AppSubURL + "/user/u2f") - return - } - - ctx.Redirect(setting.AppSubURL + "/user/two_factor") -} - -// OAuth2UserLoginCallback attempts to handle the callback from the OAuth2 provider and if successful -// login the user -func oAuth2UserLoginCallback(loginSource *models.LoginSource, request *http.Request, response http.ResponseWriter) (*models.User, goth.User, error) { - gothUser, err := oauth2.ProviderCallback(loginSource.Name, request, response) - - if err != nil { - if err.Error() == "securecookie: the value is too long" { - log.Error("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", loginSource.Name, setting.OAuth2.MaxTokenLength) - err = fmt.Errorf("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", loginSource.Name, setting.OAuth2.MaxTokenLength) - } - return nil, goth.User{}, err - } - - user := &models.User{ - LoginName: gothUser.UserID, - LoginType: models.LoginOAuth2, - LoginSource: loginSource.ID, - } - - hasUser, err := models.GetUser(user) - if err != nil { - return nil, goth.User{}, err - } - - if hasUser { - return user, gothUser, nil - } - - // search in external linked users - externalLoginUser := &models.ExternalLoginUser{ - ExternalID: gothUser.UserID, - LoginSourceID: loginSource.ID, - } - hasUser, err = models.GetExternalLogin(externalLoginUser) - if err != nil { - return nil, goth.User{}, err - } - if hasUser { - user, err = models.GetUserByID(externalLoginUser.UserID) - return user, gothUser, err - } - - // no user found to login - return nil, gothUser, nil - -} - -// LinkAccount shows the page where the user can decide to login or create a new account -func LinkAccount(ctx *context.Context) { - ctx.Data["DisablePassword"] = !setting.Service.RequireExternalRegistrationPassword || setting.Service.AllowOnlyExternalRegistration - ctx.Data["Title"] = ctx.Tr("link_account") - ctx.Data["LinkAccountMode"] = true - ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha - ctx.Data["CaptchaType"] = setting.Service.CaptchaType - ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL - ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey - ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration - ctx.Data["ShowRegistrationButton"] = false - - // use this to set the right link into the signIn and signUp templates in the link_account template - ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin" - ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/link_account_signup" - - gothUser := ctx.Session.Get("linkAccountGothUser") - if gothUser == nil { - ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) - return - } - - uname := gothUser.(goth.User).NickName - email := gothUser.(goth.User).Email - ctx.Data["user_name"] = uname - ctx.Data["email"] = email - - if len(email) != 0 { - u, err := models.GetUserByEmail(email) - if err != nil && !models.IsErrUserNotExist(err) { - ctx.ServerError("UserSignIn", err) - return - } - if u != nil { - ctx.Data["user_exists"] = true - } - } else if len(uname) != 0 { - u, err := models.GetUserByName(uname) - if err != nil && !models.IsErrUserNotExist(err) { - ctx.ServerError("UserSignIn", err) - return - } - if u != nil { - ctx.Data["user_exists"] = true - } - } - - ctx.HTML(200, tplLinkAccount) -} - -// LinkAccountPostSignIn handle the coupling of external account with another account using signIn -func LinkAccountPostSignIn(ctx *context.Context, signInForm auth.SignInForm) { - ctx.Data["DisablePassword"] = !setting.Service.RequireExternalRegistrationPassword || setting.Service.AllowOnlyExternalRegistration - ctx.Data["Title"] = ctx.Tr("link_account") - ctx.Data["LinkAccountMode"] = true - ctx.Data["LinkAccountModeSignIn"] = true - ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha - ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL - ctx.Data["CaptchaType"] = setting.Service.CaptchaType - ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey - ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration - ctx.Data["ShowRegistrationButton"] = false - - // use this to set the right link into the signIn and signUp templates in the link_account template - ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin" - ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/link_account_signup" - - gothUser := ctx.Session.Get("linkAccountGothUser") - if gothUser == nil { - ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) - return - } - - if ctx.HasError() { - ctx.HTML(200, tplLinkAccount) - return - } - - u, err := models.UserSignIn(signInForm.UserName, signInForm.Password) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Data["user_exists"] = true - ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplLinkAccount, &signInForm) - } else { - ctx.ServerError("UserLinkAccount", err) - } - return - } - - // If this user is enrolled in 2FA, we can't sign the user in just yet. - // Instead, redirect them to the 2FA authentication page. - _, err = models.GetTwoFactorByUID(u.ID) - if err != nil { - if !models.IsErrTwoFactorNotEnrolled(err) { - ctx.ServerError("UserLinkAccount", err) - return - } - - err = externalaccount.LinkAccountToUser(u, gothUser.(goth.User)) - if err != nil { - ctx.ServerError("UserLinkAccount", err) - return - } - - handleSignIn(ctx, u, signInForm.Remember) - return - } - - // User needs to use 2FA, save data and redirect to 2FA page. - if err := ctx.Session.Set("twofaUid", u.ID); err != nil { - log.Error("Error setting twofaUid in session: %v", err) - } - if err := ctx.Session.Set("twofaRemember", signInForm.Remember); err != nil { - log.Error("Error setting twofaRemember in session: %v", err) - } - if err := ctx.Session.Set("linkAccount", true); err != nil { - log.Error("Error setting linkAccount in session: %v", err) - } - if err := ctx.Session.Release(); err != nil { - log.Error("Error storing session: %v", err) - } - - // If U2F is enrolled -> Redirect to U2F instead - regs, err := models.GetU2FRegistrationsByUID(u.ID) - if err == nil && len(regs) > 0 { - ctx.Redirect(setting.AppSubURL + "/user/u2f") - return - } - - ctx.Redirect(setting.AppSubURL + "/user/two_factor") -} - -// LinkAccountPostRegister handle the creation of a new account for an external account using signUp -func LinkAccountPostRegister(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterForm) { - // TODO Make insecure passwords optional for local accounts also, - // once email-based Second-Factor Auth is available - ctx.Data["DisablePassword"] = !setting.Service.RequireExternalRegistrationPassword || setting.Service.AllowOnlyExternalRegistration - ctx.Data["Title"] = ctx.Tr("link_account") - ctx.Data["LinkAccountMode"] = true - ctx.Data["LinkAccountModeRegister"] = true - ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha - ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL - ctx.Data["CaptchaType"] = setting.Service.CaptchaType - ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey - ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration - ctx.Data["ShowRegistrationButton"] = false - - // use this to set the right link into the signIn and signUp templates in the link_account template - ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin" - ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/link_account_signup" - - gothUser := ctx.Session.Get("linkAccountGothUser") - if gothUser == nil { - ctx.ServerError("UserSignUp", errors.New("not in LinkAccount session")) - return - } - - if ctx.HasError() { - ctx.HTML(200, tplLinkAccount) - return - } - - if setting.Service.DisableRegistration { - ctx.Error(403) - return - } - - if setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha { - var valid bool - var err error - switch setting.Service.CaptchaType { - case setting.ImageCaptcha: - valid = cpt.VerifyReq(ctx.Req) - case setting.ReCaptcha: - valid, err = recaptcha.Verify(ctx.Req.Context(), form.GRecaptchaResponse) - case setting.HCaptcha: - valid, err = hcaptcha.Verify(ctx.Req.Context(), form.HcaptchaResponse) - default: - ctx.ServerError("Unknown Captcha Type", fmt.Errorf("Unknown Captcha Type: %s", setting.Service.CaptchaType)) - return - } - if err != nil { - log.Debug("%s", err.Error()) - } - - if !valid { - ctx.Data["Err_Captcha"] = true - ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), tplLinkAccount, &form) - return - } - } - - if setting.Service.AllowOnlyExternalRegistration || !setting.Service.RequireExternalRegistrationPassword { - // In models.User an empty password is classed as not set, so we set form.Password to empty. - // Eventually the database should be changed to indicate "Second Factor"-enabled accounts - // (accounts that do not introduce the security vulnerabilities of a password). - // If a user decides to circumvent second-factor security, and purposefully create a password, - // they can still do so using the "Recover Account" option. - form.Password = "" - } else { - if (len(strings.TrimSpace(form.Password)) > 0 || len(strings.TrimSpace(form.Retype)) > 0) && form.Password != form.Retype { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplLinkAccount, &form) - return - } - if len(strings.TrimSpace(form.Password)) > 0 && len(form.Password) < setting.MinPasswordLength { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplLinkAccount, &form) - return - } - } - - loginSource, err := models.GetActiveOAuth2LoginSourceByName(gothUser.(goth.User).Provider) - if err != nil { - ctx.ServerError("CreateUser", err) - } - - u := &models.User{ - Name: form.UserName, - Email: form.Email, - Passwd: form.Password, - IsActive: !(setting.Service.RegisterEmailConfirm || setting.Service.RegisterManualConfirm), - LoginType: models.LoginOAuth2, - LoginSource: loginSource.ID, - LoginName: gothUser.(goth.User).UserID, - } - - //nolint: dupl - if err := models.CreateUser(u); err != nil { - switch { - case models.IsErrUserAlreadyExist(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplLinkAccount, &form) - case models.IsErrEmailAlreadyUsed(err): - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplLinkAccount, &form) - case models.IsErrEmailInvalid(err): - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplSignUp, &form) - case models.IsErrNameReserved(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), tplLinkAccount, &form) - case models.IsErrNamePatternNotAllowed(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplLinkAccount, &form) - case models.IsErrNameCharsNotAllowed(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_chars_not_allowed", err.(models.ErrNameCharsNotAllowed).Name), tplLinkAccount, &form) - default: - ctx.ServerError("CreateUser", err) - } - return - } - log.Trace("Account created: %s", u.Name) - - // Auto-set admin for the only user. - if models.CountUsers() == 1 { - u.IsAdmin = true - u.IsActive = true - u.SetLastLogin() - if err := models.UpdateUserCols(u, "is_admin", "is_active", "last_login_unix"); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - } - - // update external user information - if err := models.UpdateExternalUser(u, gothUser.(goth.User)); err != nil { - log.Error("UpdateExternalUser failed: %v", err) - } - - // Send confirmation email - if setting.Service.RegisterEmailConfirm && u.ID > 1 { - mailer.SendActivateAccountMail(ctx.Locale, u) - - ctx.Data["IsSendRegisterMail"] = true - ctx.Data["Email"] = u.Email - ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()) - ctx.HTML(200, TplActivate) - - if err := ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { - log.Error("Set cache(MailResendLimit) fail: %v", err) - } - return - } - - ctx.Redirect(setting.AppSubURL + "/user/login") -} - -// HandleSignOut resets the session and sets the cookies -func HandleSignOut(ctx *context.Context) { - _ = ctx.Session.Flush() - _ = ctx.Session.Destroy(ctx.Context) - ctx.SetCookie(setting.CookieUserName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - ctx.SetCookie(setting.CookieRememberName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - ctx.SetCookie(setting.CSRFCookieName, "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - ctx.SetCookie("lang", "", -1, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) // Setting the lang cookie will trigger the middleware to reset the language ot previous state. - ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL) // logout default should set redirect to to default -} - -// SignOut sign out from login status -func SignOut(ctx *context.Context) { - if ctx.User != nil { - eventsource.GetManager().SendMessageBlocking(ctx.User.ID, &eventsource.Event{ - Name: "logout", - Data: ctx.Session.ID(), - }) - } - HandleSignOut(ctx) - ctx.Redirect(setting.AppSubURL + "/") -} - -// SignUp render the register page -func SignUp(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("sign_up") - - ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/sign_up" - - ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha - ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL - ctx.Data["CaptchaType"] = setting.Service.CaptchaType - ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey - ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey - ctx.Data["PageIsSignUp"] = true - - //Show Disabled Registration message if DisableRegistration or AllowOnlyExternalRegistration options are true - ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration || setting.Service.AllowOnlyExternalRegistration - - ctx.HTML(200, tplSignUp) -} - -// SignUpPost response for sign up information submission -func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterForm) { - ctx.Data["Title"] = ctx.Tr("sign_up") - - ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/sign_up" - - ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha - ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL - ctx.Data["CaptchaType"] = setting.Service.CaptchaType - ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey - ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey - ctx.Data["PageIsSignUp"] = true - - //Permission denied if DisableRegistration or AllowOnlyExternalRegistration options are true - if setting.Service.DisableRegistration || setting.Service.AllowOnlyExternalRegistration { - ctx.Error(403) - return - } - - if ctx.HasError() { - ctx.HTML(200, tplSignUp) - return - } - - if setting.Service.EnableCaptcha { - var valid bool - var err error - switch setting.Service.CaptchaType { - case setting.ImageCaptcha: - valid = cpt.VerifyReq(ctx.Req) - case setting.ReCaptcha: - valid, err = recaptcha.Verify(ctx.Req.Context(), form.GRecaptchaResponse) - case setting.HCaptcha: - valid, err = hcaptcha.Verify(ctx.Req.Context(), form.HcaptchaResponse) - default: - ctx.ServerError("Unknown Captcha Type", fmt.Errorf("Unknown Captcha Type: %s", setting.Service.CaptchaType)) - return - } - if err != nil { - log.Debug("%s", err.Error()) - } - - if !valid { - ctx.Data["Err_Captcha"] = true - ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), tplSignUp, &form) - return - } - } - - if !form.IsEmailDomainWhitelisted() { - ctx.RenderWithErr(ctx.Tr("auth.email_domain_blacklisted"), tplSignUp, &form) - return - } - - if form.Password != form.Retype { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplSignUp, &form) - return - } - if len(form.Password) < setting.MinPasswordLength { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplSignUp, &form) - return - } - if !password.IsComplexEnough(form.Password) { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(password.BuildComplexityError(ctx), tplSignUp, &form) - return - } - pwned, err := password.IsPwned(ctx.Req.Context(), form.Password) - if pwned { - errMsg := ctx.Tr("auth.password_pwned") - if err != nil { - log.Error(err.Error()) - errMsg = ctx.Tr("auth.password_pwned_err") - } - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(errMsg, tplSignUp, &form) - return - } - - u := &models.User{ - Name: form.UserName, - Email: form.Email, - Passwd: form.Password, - IsActive: !(setting.Service.RegisterEmailConfirm || setting.Service.RegisterManualConfirm), - } - if err := models.CreateUser(u); err != nil { - switch { - case models.IsErrUserAlreadyExist(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplSignUp, &form) - case models.IsErrEmailAlreadyUsed(err): - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSignUp, &form) - case models.IsErrEmailInvalid(err): - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplSignUp, &form) - case models.IsErrNameReserved(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), tplSignUp, &form) - case models.IsErrNamePatternNotAllowed(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplSignUp, &form) - default: - ctx.ServerError("CreateUser", err) - } - return - } - log.Trace("Account created: %s", u.Name) - - // Auto-set admin for the only user. - if models.CountUsers() == 1 { - u.IsAdmin = true - u.IsActive = true - u.SetLastLogin() - if err := models.UpdateUserCols(u, "is_admin", "is_active", "last_login_unix"); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - } - - // Send confirmation email, no need for social account. - if setting.Service.RegisterEmailConfirm && u.ID > 1 { - mailer.SendActivateAccountMail(ctx.Locale, u) - - ctx.Data["IsSendRegisterMail"] = true - ctx.Data["Email"] = u.Email - ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()) - ctx.HTML(200, TplActivate) - - if err := ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { - log.Error("Set cache(MailResendLimit) fail: %v", err) - } - return - } - - ctx.Flash.Success(ctx.Tr("auth.sign_up_successful")) - handleSignInFull(ctx, u, false, true) -} - -// Activate render activate user page -func Activate(ctx *context.Context) { - code := ctx.Query("code") - password := ctx.Query("password") - - if len(code) == 0 { - ctx.Data["IsActivatePage"] = true - if ctx.User.IsActive { - ctx.Error(404) - return - } - // Resend confirmation email. - if setting.Service.RegisterEmailConfirm { - if ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName) { - ctx.Data["ResendLimited"] = true - } else { - ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()) - mailer.SendActivateAccountMail(ctx.Locale, ctx.User) - - if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil { - log.Error("Set cache(MailResendLimit) fail: %v", err) - } - } - } else { - ctx.Data["ServiceNotEnabled"] = true - } - ctx.HTML(200, TplActivate) - return - } - - user := models.VerifyUserActiveCode(code) - // if code is wrong - if user == nil { - ctx.Data["IsActivateFailed"] = true - ctx.HTML(200, TplActivate) - return - } - - // if account is local account, verify password - if user.LoginSource == 0 { - if len(password) == 0 { - ctx.Data["Code"] = code - ctx.Data["NeedsPassword"] = true - ctx.HTML(200, TplActivate) - return - } - if !user.ValidatePassword(password) { - ctx.Data["IsActivateFailed"] = true - ctx.HTML(200, TplActivate) - return - } - } - - user.IsActive = true - var err error - if user.Rands, err = models.GetUserSalt(); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - if err := models.UpdateUserCols(user, "is_active", "rands"); err != nil { - if models.IsErrUserNotExist(err) { - ctx.Error(404) - } else { - ctx.ServerError("UpdateUser", err) - } - return - } - - log.Trace("User activated: %s", user.Name) - - if err := ctx.Session.Set("uid", user.ID); err != nil { - log.Error(fmt.Sprintf("Error setting uid in session: %v", err)) - } - if err := ctx.Session.Set("uname", user.Name); err != nil { - log.Error(fmt.Sprintf("Error setting uname in session: %v", err)) - } - if err := ctx.Session.Release(); err != nil { - log.Error("Error storing session: %v", err) - } - - ctx.Flash.Success(ctx.Tr("auth.account_activated")) - ctx.Redirect(setting.AppSubURL + "/") -} - -// ActivateEmail render the activate email page -func ActivateEmail(ctx *context.Context) { - code := ctx.Query("code") - emailStr := ctx.Query("email") - - // Verify code. - if email := models.VerifyActiveEmailCode(code, emailStr); email != nil { - if err := email.Activate(); err != nil { - ctx.ServerError("ActivateEmail", err) - } - - log.Trace("Email activated: %s", email.Email) - ctx.Flash.Success(ctx.Tr("settings.add_email_success")) - - if u, err := models.GetUserByID(email.UID); err != nil { - log.Warn("GetUserByID: %d", email.UID) - } else { - // Allow user to validate more emails - _ = ctx.Cache.Delete("MailResendLimit_" + u.LowerName) - } - } - - // FIXME: e-mail verification does not require the user to be logged in, - // so this could be redirecting to the login page. - // Should users be logged in automatically here? (consider 2FA requirements, etc.) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") -} - -// ForgotPasswd render the forget pasword page -func ForgotPasswd(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("auth.forgot_password_title") - - if setting.MailService == nil { - ctx.Data["IsResetDisable"] = true - ctx.HTML(200, tplForgotPassword) - return - } - - email := ctx.Query("email") - ctx.Data["Email"] = email - - ctx.Data["IsResetRequest"] = true - ctx.HTML(200, tplForgotPassword) -} - -// ForgotPasswdPost response for forget password request -func ForgotPasswdPost(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("auth.forgot_password_title") - - if setting.MailService == nil { - ctx.NotFound("ForgotPasswdPost", nil) - return - } - ctx.Data["IsResetRequest"] = true - - email := ctx.Query("email") - ctx.Data["Email"] = email - - u, err := models.GetUserByEmail(email) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.Data["ResetPwdCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, ctx.Locale.Language()) - ctx.Data["IsResetSent"] = true - ctx.HTML(200, tplForgotPassword) - return - } - - ctx.ServerError("user.ResetPasswd(check existence)", err) - return - } - - if !u.IsLocal() && !u.IsOAuth2() { - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("auth.non_local_account"), tplForgotPassword, nil) - return - } - - if ctx.Cache.IsExist("MailResendLimit_" + u.LowerName) { - ctx.Data["ResendLimited"] = true - ctx.HTML(200, tplForgotPassword) - return - } - - mailer.SendResetPasswordMail(ctx.Locale, u) - - if err = ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { - log.Error("Set cache(MailResendLimit) fail: %v", err) - } - - ctx.Data["ResetPwdCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, ctx.Locale.Language()) - ctx.Data["IsResetSent"] = true - ctx.HTML(200, tplForgotPassword) -} - -func commonResetPassword(ctx *context.Context) (*models.User, *models.TwoFactor) { - code := ctx.Query("code") - - ctx.Data["Title"] = ctx.Tr("auth.reset_password") - ctx.Data["Code"] = code - - if nil != ctx.User { - ctx.Data["user_signed_in"] = true - } - - if len(code) == 0 { - ctx.Flash.Error(ctx.Tr("auth.invalid_code")) - return nil, nil - } - - // Fail early, don't frustrate the user - u := models.VerifyUserActiveCode(code) - if u == nil { - ctx.Flash.Error(ctx.Tr("auth.invalid_code")) - return nil, nil - } - - twofa, err := models.GetTwoFactorByUID(u.ID) - if err != nil { - if !models.IsErrTwoFactorNotEnrolled(err) { - ctx.Error(http.StatusInternalServerError, "CommonResetPassword", err.Error()) - return nil, nil - } - } else { - ctx.Data["has_two_factor"] = true - ctx.Data["scratch_code"] = ctx.QueryBool("scratch_code") - } - - // Show the user that they are affecting the account that they intended to - ctx.Data["user_email"] = u.Email - - if nil != ctx.User && u.ID != ctx.User.ID { - ctx.Flash.Error(ctx.Tr("auth.reset_password_wrong_user", ctx.User.Email, u.Email)) - return nil, nil - } - - return u, twofa -} - -// ResetPasswd render the account recovery page -func ResetPasswd(ctx *context.Context) { - ctx.Data["IsResetForm"] = true - - commonResetPassword(ctx) - if ctx.Written() { - return - } - - ctx.HTML(200, tplResetPassword) -} - -// ResetPasswdPost response from account recovery request -func ResetPasswdPost(ctx *context.Context) { - u, twofa := commonResetPassword(ctx) - if ctx.Written() { - return - } - - if u == nil { - // Flash error has been set - ctx.HTML(200, tplResetPassword) - return - } - - // Validate password length. - passwd := ctx.Query("password") - if len(passwd) < setting.MinPasswordLength { - ctx.Data["IsResetForm"] = true - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplResetPassword, nil) - return - } else if !password.IsComplexEnough(passwd) { - ctx.Data["IsResetForm"] = true - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(password.BuildComplexityError(ctx), tplResetPassword, nil) - return - } else if pwned, err := password.IsPwned(ctx.Req.Context(), passwd); pwned || err != nil { - errMsg := ctx.Tr("auth.password_pwned") - if err != nil { - log.Error(err.Error()) - errMsg = ctx.Tr("auth.password_pwned_err") - } - ctx.Data["IsResetForm"] = true - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(errMsg, tplResetPassword, nil) - return - } - - // Handle two-factor - regenerateScratchToken := false - if twofa != nil { - if ctx.QueryBool("scratch_code") { - if !twofa.VerifyScratchToken(ctx.Query("token")) { - ctx.Data["IsResetForm"] = true - ctx.Data["Err_Token"] = true - ctx.RenderWithErr(ctx.Tr("auth.twofa_scratch_token_incorrect"), tplResetPassword, nil) - return - } - regenerateScratchToken = true - } else { - passcode := ctx.Query("passcode") - ok, err := twofa.ValidateTOTP(passcode) - if err != nil { - ctx.Error(http.StatusInternalServerError, "ValidateTOTP", err.Error()) - return - } - if !ok || twofa.LastUsedPasscode == passcode { - ctx.Data["IsResetForm"] = true - ctx.Data["Err_Passcode"] = true - ctx.RenderWithErr(ctx.Tr("auth.twofa_passcode_incorrect"), tplResetPassword, nil) - return - } - - twofa.LastUsedPasscode = passcode - if err = models.UpdateTwoFactor(twofa); err != nil { - ctx.ServerError("ResetPasswdPost: UpdateTwoFactor", err) - return - } - } - } - var err error - if u.Rands, err = models.GetUserSalt(); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - if err = u.SetPassword(passwd); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - u.MustChangePassword = false - if err := models.UpdateUserCols(u, "must_change_password", "passwd", "passwd_hash_algo", "rands", "salt"); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - - log.Trace("User password reset: %s", u.Name) - ctx.Data["IsResetFailed"] = true - remember := len(ctx.Query("remember")) != 0 - - if regenerateScratchToken { - // Invalidate the scratch token. - _, err = twofa.GenerateScratchToken() - if err != nil { - ctx.ServerError("UserSignIn", err) - return - } - if err = models.UpdateTwoFactor(twofa); err != nil { - ctx.ServerError("UserSignIn", err) - return - } - - handleSignInFull(ctx, u, remember, false) - ctx.Flash.Info(ctx.Tr("auth.twofa_scratch_used")) - ctx.Redirect(setting.AppSubURL + "/user/settings/security") - return - } - - handleSignInFull(ctx, u, remember, true) -} - -// MustChangePassword renders the page to change a user's password -func MustChangePassword(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("auth.must_change_password") - ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/settings/change_password" - ctx.Data["MustChangePassword"] = true - ctx.HTML(200, tplMustChangePassword) -} - -// MustChangePasswordPost response for updating a user's password after his/her -// account was created by an admin -func MustChangePasswordPost(ctx *context.Context, cpt *captcha.Captcha, form auth.MustChangePasswordForm) { - ctx.Data["Title"] = ctx.Tr("auth.must_change_password") - ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/settings/change_password" - if ctx.HasError() { - ctx.HTML(200, tplMustChangePassword) - return - } - u := ctx.User - // Make sure only requests for users who are eligible to change their password via - // this method passes through - if !u.MustChangePassword { - ctx.ServerError("MustUpdatePassword", errors.New("cannot update password.. Please visit the settings page")) - return - } - - if form.Password != form.Retype { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplMustChangePassword, &form) - return - } - - if len(form.Password) < setting.MinPasswordLength { - ctx.Data["Err_Password"] = true - ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplMustChangePassword, &form) - return - } - - var err error - if err = u.SetPassword(form.Password); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - - u.MustChangePassword = false - - if err := models.UpdateUserCols(u, "must_change_password", "passwd", "passwd_hash_algo", "salt"); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - - ctx.Flash.Success(ctx.Tr("settings.change_password_success")) - - log.Trace("User updated password: %s", u.Name) - - if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !utils.IsExternalURL(redirectTo) { - ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL) - ctx.RedirectToFirst(redirectTo) - return - } - - ctx.Redirect(setting.AppSubURL + "/") -} diff --git a/routers/user/auth_openid.go b/routers/user/auth_openid.go deleted file mode 100644 index 39e75f202..000000000 --- a/routers/user/auth_openid.go +++ /dev/null @@ -1,482 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "fmt" - "net/url" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/auth/openid" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/generate" - "code.gitea.io/gitea/modules/hcaptcha" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/recaptcha" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/services/mailer" - - "gitea.com/macaron/captcha" -) - -const ( - tplSignInOpenID base.TplName = "user/auth/signin_openid" - tplConnectOID base.TplName = "user/auth/signup_openid_connect" - tplSignUpOID base.TplName = "user/auth/signup_openid_register" -) - -// SignInOpenID render sign in page -func SignInOpenID(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("sign_in") - - if ctx.Query("openid.return_to") != "" { - signInOpenIDVerify(ctx) - return - } - - // Check auto-login. - isSucceed, err := AutoSignIn(ctx) - if err != nil { - ctx.ServerError("AutoSignIn", err) - return - } - - redirectTo := ctx.Query("redirect_to") - if len(redirectTo) > 0 { - ctx.SetCookie("redirect_to", redirectTo, 0, setting.AppSubURL, "", setting.SessionConfig.Secure, true) - } else { - redirectTo = ctx.GetCookie("redirect_to") - } - - if isSucceed { - ctx.SetCookie("redirect_to", "", -1, setting.AppSubURL, "", setting.SessionConfig.Secure, true) - ctx.RedirectToFirst(redirectTo) - return - } - - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsLoginOpenID"] = true - ctx.HTML(200, tplSignInOpenID) -} - -// Check if the given OpenID URI is allowed by blacklist/whitelist -func allowedOpenIDURI(uri string) (err error) { - - // In case a Whitelist is present, URI must be in it - // in order to be accepted - if len(setting.Service.OpenIDWhitelist) != 0 { - for _, pat := range setting.Service.OpenIDWhitelist { - if pat.MatchString(uri) { - return nil // pass - } - } - // must match one of this or be refused - return fmt.Errorf("URI not allowed by whitelist") - } - - // A blacklist match expliclty forbids - for _, pat := range setting.Service.OpenIDBlacklist { - if pat.MatchString(uri) { - return fmt.Errorf("URI forbidden by blacklist") - } - } - - return nil -} - -// SignInOpenIDPost response for openid sign in request -func SignInOpenIDPost(ctx *context.Context, form auth.SignInOpenIDForm) { - ctx.Data["Title"] = ctx.Tr("sign_in") - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsLoginOpenID"] = true - - if ctx.HasError() { - ctx.HTML(200, tplSignInOpenID) - return - } - - id, err := openid.Normalize(form.Openid) - if err != nil { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &form) - return - } - form.Openid = id - - log.Trace("OpenID uri: " + id) - - err = allowedOpenIDURI(id) - if err != nil { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &form) - return - } - - redirectTo := setting.AppURL + "user/login/openid" - url, err := openid.RedirectURL(id, redirectTo, setting.AppURL) - if err != nil { - log.Error("Error in OpenID redirect URL: %s, %v", redirectTo, err.Error()) - ctx.RenderWithErr(fmt.Sprintf("Unable to find OpenID provider in %s", redirectTo), tplSignInOpenID, &form) - return - } - - // Request optional nickname and email info - // NOTE: change to `openid.sreg.required` to require it - url += "&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1" - url += "&openid.sreg.optional=nickname%2Cemail" - - log.Trace("Form-passed openid-remember: %t", form.Remember) - - if err := ctx.Session.Set("openid_signin_remember", form.Remember); err != nil { - log.Error("SignInOpenIDPost: Could not set openid_signin_remember in session: %v", err) - } - if err := ctx.Session.Release(); err != nil { - log.Error("SignInOpenIDPost: Unable to save changes to the session: %v", err) - } - - ctx.Redirect(url) -} - -// signInOpenIDVerify handles response from OpenID provider -func signInOpenIDVerify(ctx *context.Context) { - - log.Trace("Incoming call to: " + ctx.Req.Request.URL.String()) - - fullURL := setting.AppURL + ctx.Req.Request.URL.String()[1:] - log.Trace("Full URL: " + fullURL) - - var id, err = openid.Verify(fullURL) - if err != nil { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &auth.SignInOpenIDForm{ - Openid: id, - }) - return - } - - log.Trace("Verified ID: " + id) - - /* Now we should seek for the user and log him in, or prompt - * to register if not found */ - - u, err := models.GetUserByOpenID(id) - if err != nil { - if !models.IsErrUserNotExist(err) { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &auth.SignInOpenIDForm{ - Openid: id, - }) - return - } - log.Error("signInOpenIDVerify: %v", err) - } - if u != nil { - log.Trace("User exists, logging in") - remember, _ := ctx.Session.Get("openid_signin_remember").(bool) - log.Trace("Session stored openid-remember: %t", remember) - handleSignIn(ctx, u, remember) - return - } - - log.Trace("User with openid " + id + " does not exist, should connect or register") - - parsedURL, err := url.Parse(fullURL) - if err != nil { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &auth.SignInOpenIDForm{ - Openid: id, - }) - return - } - values, err := url.ParseQuery(parsedURL.RawQuery) - if err != nil { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &auth.SignInOpenIDForm{ - Openid: id, - }) - return - } - email := values.Get("openid.sreg.email") - nickname := values.Get("openid.sreg.nickname") - - log.Trace("User has email=" + email + " and nickname=" + nickname) - - if email != "" { - u, err = models.GetUserByEmail(email) - if err != nil { - if !models.IsErrUserNotExist(err) { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &auth.SignInOpenIDForm{ - Openid: id, - }) - return - } - log.Error("signInOpenIDVerify: %v", err) - } - if u != nil { - log.Trace("Local user " + u.LowerName + " has OpenID provided email " + email) - } - } - - if u == nil && nickname != "" { - u, _ = models.GetUserByName(nickname) - if err != nil { - if !models.IsErrUserNotExist(err) { - ctx.RenderWithErr(err.Error(), tplSignInOpenID, &auth.SignInOpenIDForm{ - Openid: id, - }) - return - } - } - if u != nil { - log.Trace("Local user " + u.LowerName + " has OpenID provided nickname " + nickname) - } - } - - if err := ctx.Session.Set("openid_verified_uri", id); err != nil { - log.Error("signInOpenIDVerify: Could not set openid_verified_uri in session: %v", err) - } - if err := ctx.Session.Set("openid_determined_email", email); err != nil { - log.Error("signInOpenIDVerify: Could not set openid_determined_email in session: %v", err) - } - - if u != nil { - nickname = u.LowerName - } - - if err := ctx.Session.Set("openid_determined_username", nickname); err != nil { - log.Error("signInOpenIDVerify: Could not set openid_determined_username in session: %v", err) - } - if err := ctx.Session.Release(); err != nil { - log.Error("signInOpenIDVerify: Unable to save changes to the session: %v", err) - } - - if u != nil || !setting.Service.EnableOpenIDSignUp { - ctx.Redirect(setting.AppSubURL + "/user/openid/connect") - } else { - ctx.Redirect(setting.AppSubURL + "/user/openid/register") - } -} - -// ConnectOpenID shows a form to connect an OpenID URI to an existing account -func ConnectOpenID(ctx *context.Context) { - oid, _ := ctx.Session.Get("openid_verified_uri").(string) - if oid == "" { - ctx.Redirect(setting.AppSubURL + "/user/login/openid") - return - } - ctx.Data["Title"] = "OpenID connect" - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsOpenIDConnect"] = true - ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp - ctx.Data["OpenID"] = oid - userName, _ := ctx.Session.Get("openid_determined_username").(string) - if userName != "" { - ctx.Data["user_name"] = userName - } - ctx.HTML(200, tplConnectOID) -} - -// ConnectOpenIDPost handles submission of a form to connect an OpenID URI to an existing account -func ConnectOpenIDPost(ctx *context.Context, form auth.ConnectOpenIDForm) { - - oid, _ := ctx.Session.Get("openid_verified_uri").(string) - if oid == "" { - ctx.Redirect(setting.AppSubURL + "/user/login/openid") - return - } - ctx.Data["Title"] = "OpenID connect" - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsOpenIDConnect"] = true - ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp - ctx.Data["OpenID"] = oid - - u, err := models.UserSignIn(form.UserName, form.Password) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplConnectOID, &form) - } else { - ctx.ServerError("ConnectOpenIDPost", err) - } - return - } - - // add OpenID for the user - userOID := &models.UserOpenID{UID: u.ID, URI: oid} - if err = models.AddUserOpenID(userOID); err != nil { - if models.IsErrOpenIDAlreadyUsed(err) { - ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplConnectOID, &form) - return - } - ctx.ServerError("AddUserOpenID", err) - return - } - - ctx.Flash.Success(ctx.Tr("settings.add_openid_success")) - - remember, _ := ctx.Session.Get("openid_signin_remember").(bool) - log.Trace("Session stored openid-remember: %t", remember) - handleSignIn(ctx, u, remember) -} - -// RegisterOpenID shows a form to create a new user authenticated via an OpenID URI -func RegisterOpenID(ctx *context.Context) { - oid, _ := ctx.Session.Get("openid_verified_uri").(string) - if oid == "" { - ctx.Redirect(setting.AppSubURL + "/user/login/openid") - return - } - ctx.Data["Title"] = "OpenID signup" - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsOpenIDRegister"] = true - ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp - ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha - ctx.Data["CaptchaType"] = setting.Service.CaptchaType - ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey - ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey - ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL - ctx.Data["OpenID"] = oid - userName, _ := ctx.Session.Get("openid_determined_username").(string) - if userName != "" { - ctx.Data["user_name"] = userName - } - email, _ := ctx.Session.Get("openid_determined_email").(string) - if email != "" { - ctx.Data["email"] = email - } - ctx.HTML(200, tplSignUpOID) -} - -// RegisterOpenIDPost handles submission of a form to create a new user authenticated via an OpenID URI -func RegisterOpenIDPost(ctx *context.Context, cpt *captcha.Captcha, form auth.SignUpOpenIDForm) { - oid, _ := ctx.Session.Get("openid_verified_uri").(string) - if oid == "" { - ctx.Redirect(setting.AppSubURL + "/user/login/openid") - return - } - - ctx.Data["Title"] = "OpenID signup" - ctx.Data["PageIsSignIn"] = true - ctx.Data["PageIsOpenIDRegister"] = true - ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp - ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha - ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL - ctx.Data["CaptchaType"] = setting.Service.CaptchaType - ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey - ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey - ctx.Data["OpenID"] = oid - - if setting.Service.EnableCaptcha { - var valid bool - var err error - switch setting.Service.CaptchaType { - case setting.ImageCaptcha: - valid = cpt.VerifyReq(ctx.Req) - case setting.ReCaptcha: - if err := ctx.Req.ParseForm(); err != nil { - ctx.ServerError("", err) - return - } - valid, err = recaptcha.Verify(ctx.Req.Context(), form.GRecaptchaResponse) - case setting.HCaptcha: - if err := ctx.Req.ParseForm(); err != nil { - ctx.ServerError("", err) - return - } - valid, err = hcaptcha.Verify(ctx.Req.Context(), form.HcaptchaResponse) - default: - ctx.ServerError("Unknown Captcha Type", fmt.Errorf("Unknown Captcha Type: %s", setting.Service.CaptchaType)) - return - } - if err != nil { - log.Debug("%s", err.Error()) - } - - if !valid { - ctx.Data["Err_Captcha"] = true - ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), tplSignUpOID, &form) - return - } - } - - length := setting.MinPasswordLength - if length < 256 { - length = 256 - } - password, err := generate.GetRandomString(length) - if err != nil { - ctx.RenderWithErr(err.Error(), tplSignUpOID, form) - return - } - - // TODO: abstract a finalizeSignUp function ? - u := &models.User{ - Name: form.UserName, - Email: form.Email, - Passwd: password, - IsActive: !setting.Service.RegisterEmailConfirm, - } - //nolint: dupl - if err := models.CreateUser(u); err != nil { - switch { - case models.IsErrUserAlreadyExist(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplSignUpOID, &form) - case models.IsErrEmailAlreadyUsed(err): - ctx.Data["Err_Email"] = true - ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSignUpOID, &form) - case models.IsErrNameReserved(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), tplSignUpOID, &form) - case models.IsErrNamePatternNotAllowed(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplSignUpOID, &form) - case models.IsErrNameCharsNotAllowed(err): - ctx.Data["Err_UserName"] = true - ctx.RenderWithErr(ctx.Tr("user.form.name_chars_not_allowed", err.(models.ErrNameCharsNotAllowed).Name), tplSignUpOID, &form) - default: - ctx.ServerError("CreateUser", err) - } - return - } - log.Trace("Account created: %s", u.Name) - - // add OpenID for the user - userOID := &models.UserOpenID{UID: u.ID, URI: oid} - if err = models.AddUserOpenID(userOID); err != nil { - if models.IsErrOpenIDAlreadyUsed(err) { - ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplSignUpOID, &form) - return - } - ctx.ServerError("AddUserOpenID", err) - return - } - - // Auto-set admin for the only user. - if models.CountUsers() == 1 { - u.IsAdmin = true - u.IsActive = true - u.SetLastLogin() - if err := models.UpdateUserCols(u, "is_admin", "is_active", "last_login_unix"); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - } - - // Send confirmation email, no need for social account. - if setting.Service.RegisterEmailConfirm && u.ID > 1 { - mailer.SendActivateAccountMail(ctx.Locale, u) - - ctx.Data["IsSendRegisterMail"] = true - ctx.Data["Email"] = u.Email - ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()) - ctx.HTML(200, TplActivate) - - if err := ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { - log.Error("Set cache(MailResendLimit) fail: %v", err) - } - return - } - - remember, _ := ctx.Session.Get("openid_signin_remember").(bool) - log.Trace("Session stored openid-remember: %t", remember) - handleSignIn(ctx, u, remember) -} diff --git a/routers/user/avatar.go b/routers/user/avatar.go deleted file mode 100644 index c3ece4908..000000000 --- a/routers/user/avatar.go +++ /dev/null @@ -1,83 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "errors" - "net/url" - "strconv" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" -) - -// Avatar redirect browser to user avatar of requested size -func Avatar(ctx *context.Context) { - userName := ctx.Params(":username") - size, err := strconv.Atoi(ctx.Params(":size")) - if err != nil { - ctx.ServerError("Invalid avatar size", err) - return - } - - log.Debug("Asked avatar for user %v and size %v", userName, size) - - var user *models.User - if strings.ToLower(userName) != "ghost" { - user, err = models.GetUserByName(userName) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.ServerError("Requested avatar for invalid user", err) - } else { - ctx.ServerError("Retrieving user by name", err) - } - return - } - } else { - user = models.NewGhostUser() - } - - ctx.Redirect(user.RealSizedAvatarLink(size)) -} - -// AvatarByEmailHash redirects the browser to the appropriate Avatar link -func AvatarByEmailHash(ctx *context.Context) { - var err error - - hash := ctx.Params(":hash") - if len(hash) == 0 { - ctx.ServerError("invalid avatar hash", errors.New("hash cannot be empty")) - return - } - - var email string - email, err = models.GetEmailForHash(hash) - if err != nil { - ctx.ServerError("invalid avatar hash", err) - return - } - if len(email) == 0 { - ctx.Redirect(models.DefaultAvatarLink()) - return - } - size := ctx.QueryInt("size") - if size == 0 { - size = models.DefaultAvatarSize - } - - var avatarURL *url.URL - avatarURL, err = models.LibravatarURL(email) - if err != nil { - avatarURL, err = url.Parse(models.DefaultAvatarLink()) - if err != nil { - ctx.ServerError("invalid default avatar url", err) - return - } - } - - ctx.Redirect(models.MakeFinalAvatarURL(avatarURL, size)) -} diff --git a/routers/user/home.go b/routers/user/home.go deleted file mode 100644 index 3c27bbe2a..000000000 --- a/routers/user/home.go +++ /dev/null @@ -1,899 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "bytes" - "encoding/json" - "fmt" - "regexp" - "sort" - "strconv" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - issue_indexer "code.gitea.io/gitea/modules/indexer/issues" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/markup/markdown" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" - issue_service "code.gitea.io/gitea/services/issue" - pull_service "code.gitea.io/gitea/services/pull" - - "github.com/keybase/go-crypto/openpgp" - "github.com/keybase/go-crypto/openpgp/armor" - "xorm.io/builder" -) - -const ( - tplDashboard base.TplName = "user/dashboard/dashboard" - tplIssues base.TplName = "user/dashboard/issues" - tplMilestones base.TplName = "user/dashboard/milestones" - tplProfile base.TplName = "user/profile" -) - -// getDashboardContextUser finds out which context user dashboard is being viewed as . -func getDashboardContextUser(ctx *context.Context) *models.User { - ctxUser := ctx.User - orgName := ctx.Params(":org") - if len(orgName) > 0 { - ctxUser = ctx.Org.Organization - ctx.Data["Teams"] = ctx.Org.Organization.Teams - } - ctx.Data["ContextUser"] = ctxUser - - if err := ctx.User.GetOrganizations(&models.SearchOrganizationsOptions{All: true}); err != nil { - ctx.ServerError("GetOrganizations", err) - return nil - } - ctx.Data["Orgs"] = ctx.User.Orgs - - return ctxUser -} - -// retrieveFeeds loads feeds for the specified user -func retrieveFeeds(ctx *context.Context, options models.GetFeedsOptions) { - actions, err := models.GetFeeds(options) - if err != nil { - ctx.ServerError("GetFeeds", err) - return - } - - userCache := map[int64]*models.User{options.RequestedUser.ID: options.RequestedUser} - if ctx.User != nil { - userCache[ctx.User.ID] = ctx.User - } - for _, act := range actions { - if act.ActUser != nil { - userCache[act.ActUserID] = act.ActUser - } - } - - for _, act := range actions { - repoOwner, ok := userCache[act.Repo.OwnerID] - if !ok { - repoOwner, err = models.GetUserByID(act.Repo.OwnerID) - if err != nil { - if models.IsErrUserNotExist(err) { - continue - } - ctx.ServerError("GetUserByID", err) - return - } - userCache[repoOwner.ID] = repoOwner - } - act.Repo.Owner = repoOwner - } - ctx.Data["Feeds"] = actions -} - -// Dashboard render the dashboard page -func Dashboard(ctx *context.Context) { - ctxUser := getDashboardContextUser(ctx) - if ctx.Written() { - return - } - - ctx.Data["Title"] = ctxUser.DisplayName() + " - " + ctx.Tr("dashboard") - ctx.Data["PageIsDashboard"] = true - ctx.Data["PageIsNews"] = true - ctx.Data["SearchLimit"] = setting.UI.User.RepoPagingNum - - // no heatmap access for admins; GetUserHeatmapDataByUser ignores the calling user - // so everyone would get the same empty heatmap - if setting.Service.EnableUserHeatmap && !ctxUser.KeepActivityPrivate { - data, err := models.GetUserHeatmapDataByUserTeam(ctxUser, ctx.Org.Team, ctx.User) - if err != nil { - ctx.ServerError("GetUserHeatmapDataByUserTeam", err) - return - } - ctx.Data["HeatmapData"] = data - } - - var err error - var mirrors []*models.Repository - if ctxUser.IsOrganization() { - var env models.AccessibleReposEnvironment - if ctx.Org.Team != nil { - env = ctxUser.AccessibleTeamReposEnv(ctx.Org.Team) - } else { - env, err = ctxUser.AccessibleReposEnv(ctx.User.ID) - if err != nil { - ctx.ServerError("AccessibleReposEnv", err) - return - } - } - mirrors, err = env.MirrorRepos() - if err != nil { - ctx.ServerError("env.MirrorRepos", err) - return - } - } else { - mirrors, err = ctxUser.GetMirrorRepositories() - if err != nil { - ctx.ServerError("GetMirrorRepositories", err) - return - } - } - ctx.Data["MaxShowRepoNum"] = setting.UI.User.RepoPagingNum - - if err := models.MirrorRepositoryList(mirrors).LoadAttributes(); err != nil { - ctx.ServerError("MirrorRepositoryList.LoadAttributes", err) - return - } - ctx.Data["MirrorCount"] = len(mirrors) - ctx.Data["Mirrors"] = mirrors - - retrieveFeeds(ctx, models.GetFeedsOptions{ - RequestedUser: ctxUser, - RequestedTeam: ctx.Org.Team, - Actor: ctx.User, - IncludePrivate: true, - OnlyPerformedBy: false, - IncludeDeleted: false, - }) - - if ctx.Written() { - return - } - ctx.HTML(200, tplDashboard) -} - -// Milestones render the user milestones page -func Milestones(ctx *context.Context) { - if models.UnitTypeIssues.UnitGlobalDisabled() && models.UnitTypePullRequests.UnitGlobalDisabled() { - log.Debug("Milestones overview page not available as both issues and pull requests are globally disabled") - ctx.Status(404) - return - } - - ctx.Data["Title"] = ctx.Tr("milestones") - ctx.Data["PageIsMilestonesDashboard"] = true - - ctxUser := getDashboardContextUser(ctx) - if ctx.Written() { - return - } - - repoOpts := models.SearchRepoOptions{ - Actor: ctxUser, - OwnerID: ctxUser.ID, - Private: true, - AllPublic: false, // Include also all public repositories of users and public organisations - AllLimited: false, // Include also all public repositories of limited organisations - HasMilestones: util.OptionalBoolTrue, // Just needs display repos has milestones - } - - if ctxUser.IsOrganization() && ctx.Org.Team != nil { - repoOpts.TeamID = ctx.Org.Team.ID - } - - var ( - userRepoCond = models.SearchRepositoryCondition(&repoOpts) // all repo condition user could visit - repoCond = userRepoCond - repoIDs []int64 - - reposQuery = ctx.Query("repos") - isShowClosed = ctx.Query("state") == "closed" - sortType = ctx.Query("sort") - page = ctx.QueryInt("page") - ) - - if page <= 1 { - page = 1 - } - - if len(reposQuery) != 0 { - if issueReposQueryPattern.MatchString(reposQuery) { - // remove "[" and "]" from string - reposQuery = reposQuery[1 : len(reposQuery)-1] - //for each ID (delimiter ",") add to int to repoIDs - - for _, rID := range strings.Split(reposQuery, ",") { - // Ensure nonempty string entries - if rID != "" && rID != "0" { - rIDint64, err := strconv.ParseInt(rID, 10, 64) - // If the repo id specified by query is not parseable or not accessible by user, just ignore it. - if err == nil { - repoIDs = append(repoIDs, rIDint64) - } - } - } - if len(repoIDs) > 0 { - // Don't just let repoCond = builder.In("id", repoIDs) because user may has no permission on repoIDs - // But the original repoCond has a limitation - repoCond = repoCond.And(builder.In("id", repoIDs)) - } - } else { - log.Warn("issueReposQueryPattern not match with query") - } - } - - counts, err := models.CountMilestonesByRepoCond(userRepoCond, isShowClosed) - if err != nil { - ctx.ServerError("CountMilestonesByRepoIDs", err) - return - } - - milestones, err := models.SearchMilestones(repoCond, page, isShowClosed, sortType) - if err != nil { - ctx.ServerError("GetMilestonesByRepoIDs", err) - return - } - - showRepos, _, err := models.SearchRepositoryByCondition(&repoOpts, userRepoCond, false) - if err != nil { - ctx.ServerError("SearchRepositoryByCondition", err) - return - } - sort.Sort(showRepos) - - for i := 0; i < len(milestones); { - for _, repo := range showRepos { - if milestones[i].RepoID == repo.ID { - milestones[i].Repo = repo - break - } - } - if milestones[i].Repo == nil { - log.Warn("Cannot find milestone %d 's repository %d", milestones[i].ID, milestones[i].RepoID) - milestones = append(milestones[:i], milestones[i+1:]...) - continue - } - - milestones[i].RenderedContent = string(markdown.Render([]byte(milestones[i].Content), milestones[i].Repo.Link(), milestones[i].Repo.ComposeMetas())) - if milestones[i].Repo.IsTimetrackerEnabled() { - err := milestones[i].LoadTotalTrackedTime() - if err != nil { - ctx.ServerError("LoadTotalTrackedTime", err) - return - } - } - i++ - } - - milestoneStats, err := models.GetMilestonesStatsByRepoCond(repoCond) - if err != nil { - ctx.ServerError("GetMilestoneStats", err) - return - } - - var totalMilestoneStats *models.MilestonesStats - if len(repoIDs) == 0 { - totalMilestoneStats = milestoneStats - } else { - totalMilestoneStats, err = models.GetMilestonesStatsByRepoCond(userRepoCond) - if err != nil { - ctx.ServerError("GetMilestoneStats", err) - return - } - } - - var pagerCount int - if isShowClosed { - ctx.Data["State"] = "closed" - ctx.Data["Total"] = totalMilestoneStats.ClosedCount - pagerCount = int(milestoneStats.ClosedCount) - } else { - ctx.Data["State"] = "open" - ctx.Data["Total"] = totalMilestoneStats.OpenCount - pagerCount = int(milestoneStats.OpenCount) - } - - ctx.Data["Milestones"] = milestones - ctx.Data["Repos"] = showRepos - ctx.Data["Counts"] = counts - ctx.Data["MilestoneStats"] = milestoneStats - ctx.Data["SortType"] = sortType - if milestoneStats.Total() != totalMilestoneStats.Total() { - ctx.Data["RepoIDs"] = repoIDs - } - ctx.Data["IsShowClosed"] = isShowClosed - - pager := context.NewPagination(pagerCount, setting.UI.IssuePagingNum, page, 5) - pager.AddParam(ctx, "repos", "RepoIDs") - pager.AddParam(ctx, "sort", "SortType") - pager.AddParam(ctx, "state", "State") - ctx.Data["Page"] = pager - - ctx.HTML(200, tplMilestones) -} - -// Pulls renders the user's pull request overview page -func Pulls(ctx *context.Context) { - if models.UnitTypePullRequests.UnitGlobalDisabled() { - log.Debug("Pull request overview page not available as it is globally disabled.") - ctx.Status(404) - return - } - - ctx.Data["Title"] = ctx.Tr("pull_requests") - ctx.Data["PageIsPulls"] = true - buildIssueOverview(ctx, models.UnitTypePullRequests) -} - -// Issues renders the user's issues overview page -func Issues(ctx *context.Context) { - if models.UnitTypeIssues.UnitGlobalDisabled() { - log.Debug("Issues overview page not available as it is globally disabled.") - ctx.Status(404) - return - } - - ctx.Data["Title"] = ctx.Tr("issues") - ctx.Data["PageIsIssues"] = true - buildIssueOverview(ctx, models.UnitTypeIssues) -} - -// Regexp for repos query -var issueReposQueryPattern = regexp.MustCompile(`^\[\d+(,\d+)*,?\]$`) - -func buildIssueOverview(ctx *context.Context, unitType models.UnitType) { - - // ---------------------------------------------------- - // Determine user; can be either user or organization. - // Return with NotFound or ServerError if unsuccessful. - // ---------------------------------------------------- - - ctxUser := getDashboardContextUser(ctx) - if ctx.Written() { - return - } - - var ( - viewType string - sortType = ctx.Query("sort") - filterMode = models.FilterModeAll - ) - - // -------------------------------------------------------------------------------- - // Distinguish User from Organization. - // Org: - // - Remember pre-determined viewType string for later. Will be posted to ctx.Data. - // Organization does not have view type and filter mode. - // User: - // - Use ctx.Query("type") to determine filterMode. - // The type is set when clicking for example "assigned to me" on the overview page. - // - Remember either this or a fallback. Will be posted to ctx.Data. - // -------------------------------------------------------------------------------- - - // TODO: distinguish during routing - - viewType = ctx.Query("type") - switch viewType { - case "assigned": - filterMode = models.FilterModeAssign - case "created_by": - filterMode = models.FilterModeCreate - case "mentioned": - filterMode = models.FilterModeMention - case "your_repositories": // filterMode already set to All - default: - viewType = "your_repositories" - } - - // -------------------------------------------------------------------------- - // Build opts (IssuesOptions), which contains filter information. - // Will eventually be used to retrieve issues relevant for the overview page. - // Note: Non-final states of opts are used in-between, namely for: - // - Keyword search - // - Count Issues by repo - // -------------------------------------------------------------------------- - - isPullList := unitType == models.UnitTypePullRequests - opts := &models.IssuesOptions{ - IsPull: util.OptionalBoolOf(isPullList), - SortType: sortType, - IsArchived: util.OptionalBoolFalse, - } - - // Get repository IDs where User/Org/Team has access. - var team *models.Team - if ctx.Org != nil { - team = ctx.Org.Team - } - userRepoIDs, err := getActiveUserRepoIDs(ctxUser, team, unitType) - if err != nil { - ctx.ServerError("userRepoIDs", err) - return - } - - switch filterMode { - case models.FilterModeAll: - opts.RepoIDs = userRepoIDs - case models.FilterModeAssign: - opts.AssigneeID = ctx.User.ID - case models.FilterModeCreate: - opts.PosterID = ctx.User.ID - case models.FilterModeMention: - opts.MentionedID = ctx.User.ID - } - - if ctxUser.IsOrganization() { - opts.RepoIDs = userRepoIDs - } - - // keyword holds the search term entered into the search field. - keyword := strings.Trim(ctx.Query("q"), " ") - ctx.Data["Keyword"] = keyword - - // Execute keyword search for issues. - // USING NON-FINAL STATE OF opts FOR A QUERY. - issueIDsFromSearch, err := issueIDsFromSearch(ctxUser, keyword, opts) - if err != nil { - ctx.ServerError("issueIDsFromSearch", err) - return - } - - // Ensure no issues are returned if a keyword was provided that didn't match any issues. - var forceEmpty bool - - if len(issueIDsFromSearch) > 0 { - opts.IssueIDs = issueIDsFromSearch - } else if len(keyword) > 0 { - forceEmpty = true - } - - // Educated guess: Do or don't show closed issues. - isShowClosed := ctx.Query("state") == "closed" - opts.IsClosed = util.OptionalBoolOf(isShowClosed) - - // Filter repos and count issues in them. Count will be used later. - // USING NON-FINAL STATE OF opts FOR A QUERY. - var issueCountByRepo map[int64]int64 - if !forceEmpty { - issueCountByRepo, err = models.CountIssuesByRepo(opts) - if err != nil { - ctx.ServerError("CountIssuesByRepo", err) - return - } - } - - // Make sure page number is at least 1. Will be posted to ctx.Data. - page := ctx.QueryInt("page") - if page <= 1 { - page = 1 - } - opts.Page = page - opts.PageSize = setting.UI.IssuePagingNum - - // Get IDs for labels (a filter option for issues/pulls). - // Required for IssuesOptions. - var labelIDs []int64 - selectedLabels := ctx.Query("labels") - if len(selectedLabels) > 0 && selectedLabels != "0" { - labelIDs, err = base.StringsToInt64s(strings.Split(selectedLabels, ",")) - if err != nil { - ctx.ServerError("StringsToInt64s", err) - return - } - } - opts.LabelIDs = labelIDs - - // Parse ctx.Query("repos") and remember matched repo IDs for later. - // Gets set when clicking filters on the issues overview page. - repoIDs := getRepoIDs(ctx.Query("repos")) - if len(repoIDs) > 0 { - opts.RepoIDs = repoIDs - } - - // ------------------------------ - // Get issues as defined by opts. - // ------------------------------ - - // Slice of Issues that will be displayed on the overview page - // USING FINAL STATE OF opts FOR A QUERY. - var issues []*models.Issue - if !forceEmpty { - issues, err = models.Issues(opts) - if err != nil { - ctx.ServerError("Issues", err) - return - } - } else { - issues = []*models.Issue{} - } - - // ---------------------------------- - // Add repository pointers to Issues. - // ---------------------------------- - - // showReposMap maps repository IDs to their Repository pointers. - showReposMap, err := repoIDMap(ctxUser, issueCountByRepo, unitType) - if err != nil { - if models.IsErrRepoNotExist(err) { - ctx.NotFound("GetRepositoryByID", err) - return - } - ctx.ServerError("repoIDMap", err) - return - } - - // a RepositoryList - showRepos := models.RepositoryListOfMap(showReposMap) - sort.Sort(showRepos) - if err = showRepos.LoadAttributes(); err != nil { - ctx.ServerError("LoadAttributes", err) - return - } - - // maps pull request IDs to their CommitStatus. Will be posted to ctx.Data. - var commitStatus = make(map[int64]*models.CommitStatus, len(issues)) - for _, issue := range issues { - issue.Repo = showReposMap[issue.RepoID] - - if isPullList { - var statuses, _ = pull_service.GetLastCommitStatus(issue.PullRequest) - commitStatus[issue.PullRequest.ID] = models.CalcCommitStatus(statuses) - } - } - - // ------------------------------- - // Fill stats to post to ctx.Data. - // ------------------------------- - - userIssueStatsOpts := models.UserIssueStatsOptions{ - UserID: ctx.User.ID, - UserRepoIDs: userRepoIDs, - FilterMode: filterMode, - IsPull: isPullList, - IsClosed: isShowClosed, - IsArchived: util.OptionalBoolFalse, - LabelIDs: opts.LabelIDs, - } - if len(repoIDs) > 0 { - userIssueStatsOpts.UserRepoIDs = repoIDs - } - if ctxUser.IsOrganization() { - userIssueStatsOpts.RepoIDs = userRepoIDs - } - userIssueStats, err := models.GetUserIssueStats(userIssueStatsOpts) - if err != nil { - ctx.ServerError("GetUserIssueStats User", err) - return - } - - var shownIssueStats *models.IssueStats - if !forceEmpty { - statsOpts := models.UserIssueStatsOptions{ - UserID: ctx.User.ID, - UserRepoIDs: userRepoIDs, - FilterMode: filterMode, - IsPull: isPullList, - IsClosed: isShowClosed, - IssueIDs: issueIDsFromSearch, - IsArchived: util.OptionalBoolFalse, - LabelIDs: opts.LabelIDs, - } - if len(repoIDs) > 0 { - statsOpts.RepoIDs = repoIDs - } else if ctxUser.IsOrganization() { - statsOpts.RepoIDs = userRepoIDs - } - shownIssueStats, err = models.GetUserIssueStats(statsOpts) - if err != nil { - ctx.ServerError("GetUserIssueStats Shown", err) - return - } - } else { - shownIssueStats = &models.IssueStats{} - } - - var allIssueStats *models.IssueStats - if !forceEmpty { - allIssueStatsOpts := models.UserIssueStatsOptions{ - UserID: ctx.User.ID, - UserRepoIDs: userRepoIDs, - FilterMode: filterMode, - IsPull: isPullList, - IsClosed: isShowClosed, - IssueIDs: issueIDsFromSearch, - IsArchived: util.OptionalBoolFalse, - LabelIDs: opts.LabelIDs, - } - if ctxUser.IsOrganization() { - allIssueStatsOpts.RepoIDs = userRepoIDs - } - allIssueStats, err = models.GetUserIssueStats(allIssueStatsOpts) - if err != nil { - ctx.ServerError("GetUserIssueStats All", err) - return - } - } else { - allIssueStats = &models.IssueStats{} - } - - // Will be posted to ctx.Data. - var shownIssues int - if !isShowClosed { - shownIssues = int(shownIssueStats.OpenCount) - ctx.Data["TotalIssueCount"] = int(allIssueStats.OpenCount) - } else { - shownIssues = int(shownIssueStats.ClosedCount) - ctx.Data["TotalIssueCount"] = int(allIssueStats.ClosedCount) - } - - ctx.Data["IsShowClosed"] = isShowClosed - - ctx.Data["IssueRefEndNames"], ctx.Data["IssueRefURLs"] = - issue_service.GetRefEndNamesAndURLs(issues, ctx.Query("RepoLink")) - - ctx.Data["Issues"] = issues - - approvalCounts, err := models.IssueList(issues).GetApprovalCounts() - if err != nil { - ctx.ServerError("ApprovalCounts", err) - return - } - ctx.Data["ApprovalCounts"] = func(issueID int64, typ string) int64 { - counts, ok := approvalCounts[issueID] - if !ok || len(counts) == 0 { - return 0 - } - reviewTyp := models.ReviewTypeApprove - if typ == "reject" { - reviewTyp = models.ReviewTypeReject - } else if typ == "waiting" { - reviewTyp = models.ReviewTypeRequest - } - for _, count := range counts { - if count.Type == reviewTyp { - return count.Count - } - } - return 0 - } - ctx.Data["CommitStatus"] = commitStatus - ctx.Data["Repos"] = showRepos - ctx.Data["Counts"] = issueCountByRepo - ctx.Data["IssueStats"] = userIssueStats - ctx.Data["ShownIssueStats"] = shownIssueStats - ctx.Data["ViewType"] = viewType - ctx.Data["SortType"] = sortType - ctx.Data["RepoIDs"] = repoIDs - ctx.Data["IsShowClosed"] = isShowClosed - ctx.Data["SelectLabels"] = selectedLabels - - if isShowClosed { - ctx.Data["State"] = "closed" - } else { - ctx.Data["State"] = "open" - } - - // Convert []int64 to string - reposParam, _ := json.Marshal(repoIDs) - - ctx.Data["ReposParam"] = string(reposParam) - - pager := context.NewPagination(shownIssues, setting.UI.IssuePagingNum, page, 5) - pager.AddParam(ctx, "q", "Keyword") - pager.AddParam(ctx, "type", "ViewType") - pager.AddParam(ctx, "repos", "ReposParam") - pager.AddParam(ctx, "sort", "SortType") - pager.AddParam(ctx, "state", "State") - pager.AddParam(ctx, "labels", "SelectLabels") - pager.AddParam(ctx, "milestone", "MilestoneID") - pager.AddParam(ctx, "assignee", "AssigneeID") - ctx.Data["Page"] = pager - - ctx.HTML(200, tplIssues) -} - -func getRepoIDs(reposQuery string) []int64 { - if len(reposQuery) == 0 { - return []int64{} - } - if !issueReposQueryPattern.MatchString(reposQuery) { - log.Warn("issueReposQueryPattern does not match query") - return []int64{} - } - - var repoIDs []int64 - // remove "[" and "]" from string - reposQuery = reposQuery[1 : len(reposQuery)-1] - //for each ID (delimiter ",") add to int to repoIDs - for _, rID := range strings.Split(reposQuery, ",") { - // Ensure nonempty string entries - if rID != "" && rID != "0" { - rIDint64, err := strconv.ParseInt(rID, 10, 64) - if err == nil { - repoIDs = append(repoIDs, rIDint64) - } - } - } - - return repoIDs -} - -func getActiveUserRepoIDs(ctxUser *models.User, team *models.Team, unitType models.UnitType) ([]int64, error) { - var userRepoIDs []int64 - var err error - - if ctxUser.IsOrganization() { - userRepoIDs, err = getActiveTeamOrOrgRepoIds(ctxUser, team, unitType) - if err != nil { - return nil, fmt.Errorf("orgRepoIds: %v", err) - } - } else { - userRepoIDs, err = ctxUser.GetActiveAccessRepoIDs(unitType) - if err != nil { - return nil, fmt.Errorf("ctxUser.GetAccessRepoIDs: %v", err) - } - } - - if len(userRepoIDs) == 0 { - userRepoIDs = []int64{-1} - } - - return userRepoIDs, nil -} - -// getActiveTeamOrOrgRepoIds gets RepoIDs for ctxUser as Organization. -// Should be called if and only if ctxUser.IsOrganization == true. -func getActiveTeamOrOrgRepoIds(ctxUser *models.User, team *models.Team, unitType models.UnitType) ([]int64, error) { - var orgRepoIDs []int64 - var err error - var env models.AccessibleReposEnvironment - - if team != nil { - env = ctxUser.AccessibleTeamReposEnv(team) - if err != nil { - return nil, fmt.Errorf("AccessibleTeamReposEnv: %v", err) - } - } else { - env, err = ctxUser.AccessibleReposEnv(ctxUser.ID) - if err != nil { - return nil, fmt.Errorf("AccessibleReposEnv: %v", err) - } - } - orgRepoIDs, err = env.RepoIDs(1, ctxUser.NumRepos) - if err != nil { - return nil, fmt.Errorf("env.RepoIDs: %v", err) - } - orgRepoIDs, err = models.FilterOutRepoIdsWithoutUnitAccess(ctxUser, orgRepoIDs, unitType) - if err != nil { - return nil, fmt.Errorf("FilterOutRepoIdsWithoutUnitAccess: %v", err) - } - - return orgRepoIDs, nil -} - -func issueIDsFromSearch(ctxUser *models.User, keyword string, opts *models.IssuesOptions) ([]int64, error) { - if len(keyword) == 0 { - return []int64{}, nil - } - - searchRepoIDs, err := models.GetRepoIDsForIssuesOptions(opts, ctxUser) - if err != nil { - return nil, fmt.Errorf("GetRepoIDsForIssuesOptions: %v", err) - } - issueIDsFromSearch, err := issue_indexer.SearchIssuesByKeyword(searchRepoIDs, keyword) - if err != nil { - return nil, fmt.Errorf("SearchIssuesByKeyword: %v", err) - } - - return issueIDsFromSearch, nil -} - -func repoIDMap(ctxUser *models.User, issueCountByRepo map[int64]int64, unitType models.UnitType) (map[int64]*models.Repository, error) { - repoByID := make(map[int64]*models.Repository, len(issueCountByRepo)) - for id := range issueCountByRepo { - if id <= 0 { - continue - } - if _, ok := repoByID[id]; !ok { - repo, err := models.GetRepositoryByID(id) - if models.IsErrRepoNotExist(err) { - return nil, err - } else if err != nil { - return nil, fmt.Errorf("GetRepositoryByID: [%d]%v", id, err) - } - repoByID[id] = repo - } - repo := repoByID[id] - - // Check if user has access to given repository. - perm, err := models.GetUserRepoPermission(repo, ctxUser) - if err != nil { - return nil, fmt.Errorf("GetUserRepoPermission: [%d]%v", id, err) - } - if !perm.CanRead(unitType) { - log.Debug("User created Issues in Repository which they no longer have access to: [%d]", id) - } - } - return repoByID, nil -} - -// ShowSSHKeys output all the ssh keys of user by uid -func ShowSSHKeys(ctx *context.Context, uid int64) { - keys, err := models.ListPublicKeys(uid, models.ListOptions{}) - if err != nil { - ctx.ServerError("ListPublicKeys", err) - return - } - - var buf bytes.Buffer - for i := range keys { - buf.WriteString(keys[i].OmitEmail()) - buf.WriteString("\n") - } - ctx.PlainText(200, buf.Bytes()) -} - -// ShowGPGKeys output all the public GPG keys of user by uid -func ShowGPGKeys(ctx *context.Context, uid int64) { - keys, err := models.ListGPGKeys(uid, models.ListOptions{}) - if err != nil { - ctx.ServerError("ListGPGKeys", err) - return - } - entities := make([]*openpgp.Entity, 0) - failedEntitiesID := make([]string, 0) - for _, k := range keys { - e, err := models.GPGKeyToEntity(k) - if err != nil { - if models.IsErrGPGKeyImportNotExist(err) { - failedEntitiesID = append(failedEntitiesID, k.KeyID) - continue //Skip previous import without backup of imported armored key - } - ctx.ServerError("ShowGPGKeys", err) - return - } - entities = append(entities, e) - } - var buf bytes.Buffer - - headers := make(map[string]string) - if len(failedEntitiesID) > 0 { //If some key need re-import to be exported - headers["Note"] = fmt.Sprintf("The keys with the following IDs couldn't be exported and need to be reuploaded %s", strings.Join(failedEntitiesID, ", ")) - } - writer, _ := armor.Encode(&buf, "PGP PUBLIC KEY BLOCK", headers) - for _, e := range entities { - err = e.Serialize(writer) //TODO find why key are exported with a different cipherTypeByte as original (should not be blocking but strange) - if err != nil { - ctx.ServerError("ShowGPGKeys", err) - return - } - } - writer.Close() - ctx.PlainText(200, buf.Bytes()) -} - -// Email2User show user page via email -func Email2User(ctx *context.Context) { - u, err := models.GetUserByEmail(ctx.Query("email")) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.NotFound("GetUserByEmail", err) - } else { - ctx.ServerError("GetUserByEmail", err) - } - return - } - ctx.Redirect(setting.AppSubURL + "/user/" + u.Name) -} diff --git a/routers/user/main_test.go b/routers/user/main_test.go deleted file mode 100644 index ed0724dc7..000000000 --- a/routers/user/main_test.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2017 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "path/filepath" - "testing" - - "code.gitea.io/gitea/models" -) - -func TestMain(m *testing.M) { - models.MainTest(m, filepath.Join("..", "..")) -} diff --git a/routers/user/oauth.go b/routers/user/oauth.go deleted file mode 100644 index dda1268f8..000000000 --- a/routers/user/oauth.go +++ /dev/null @@ -1,558 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "encoding/base64" - "fmt" - "html" - "net/url" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/timeutil" - - "gitea.com/macaron/binding" - "github.com/dgrijalva/jwt-go" -) - -const ( - tplGrantAccess base.TplName = "user/auth/grant" - tplGrantError base.TplName = "user/auth/grant_error" -) - -// TODO move error and responses to SDK or models - -// AuthorizeErrorCode represents an error code specified in RFC 6749 -type AuthorizeErrorCode string - -const ( - // ErrorCodeInvalidRequest represents the according error in RFC 6749 - ErrorCodeInvalidRequest AuthorizeErrorCode = "invalid_request" - // ErrorCodeUnauthorizedClient represents the according error in RFC 6749 - ErrorCodeUnauthorizedClient AuthorizeErrorCode = "unauthorized_client" - // ErrorCodeAccessDenied represents the according error in RFC 6749 - ErrorCodeAccessDenied AuthorizeErrorCode = "access_denied" - // ErrorCodeUnsupportedResponseType represents the according error in RFC 6749 - ErrorCodeUnsupportedResponseType AuthorizeErrorCode = "unsupported_response_type" - // ErrorCodeInvalidScope represents the according error in RFC 6749 - ErrorCodeInvalidScope AuthorizeErrorCode = "invalid_scope" - // ErrorCodeServerError represents the according error in RFC 6749 - ErrorCodeServerError AuthorizeErrorCode = "server_error" - // ErrorCodeTemporaryUnavailable represents the according error in RFC 6749 - ErrorCodeTemporaryUnavailable AuthorizeErrorCode = "temporarily_unavailable" -) - -// AuthorizeError represents an error type specified in RFC 6749 -type AuthorizeError struct { - ErrorCode AuthorizeErrorCode `json:"error" form:"error"` - ErrorDescription string - State string -} - -// Error returns the error message -func (err AuthorizeError) Error() string { - return fmt.Sprintf("%s: %s", err.ErrorCode, err.ErrorDescription) -} - -// AccessTokenErrorCode represents an error code specified in RFC 6749 -type AccessTokenErrorCode string - -const ( - // AccessTokenErrorCodeInvalidRequest represents an error code specified in RFC 6749 - AccessTokenErrorCodeInvalidRequest AccessTokenErrorCode = "invalid_request" - // AccessTokenErrorCodeInvalidClient represents an error code specified in RFC 6749 - AccessTokenErrorCodeInvalidClient = "invalid_client" - // AccessTokenErrorCodeInvalidGrant represents an error code specified in RFC 6749 - AccessTokenErrorCodeInvalidGrant = "invalid_grant" - // AccessTokenErrorCodeUnauthorizedClient represents an error code specified in RFC 6749 - AccessTokenErrorCodeUnauthorizedClient = "unauthorized_client" - // AccessTokenErrorCodeUnsupportedGrantType represents an error code specified in RFC 6749 - AccessTokenErrorCodeUnsupportedGrantType = "unsupported_grant_type" - // AccessTokenErrorCodeInvalidScope represents an error code specified in RFC 6749 - AccessTokenErrorCodeInvalidScope = "invalid_scope" -) - -// AccessTokenError represents an error response specified in RFC 6749 -type AccessTokenError struct { - ErrorCode AccessTokenErrorCode `json:"error" form:"error"` - ErrorDescription string `json:"error_description"` -} - -// Error returns the error message -func (err AccessTokenError) Error() string { - return fmt.Sprintf("%s: %s", err.ErrorCode, err.ErrorDescription) -} - -// TokenType specifies the kind of token -type TokenType string - -const ( - // TokenTypeBearer represents a token type specified in RFC 6749 - TokenTypeBearer TokenType = "bearer" - // TokenTypeMAC represents a token type specified in RFC 6749 - TokenTypeMAC = "mac" -) - -// AccessTokenResponse represents a successful access token response -type AccessTokenResponse struct { - AccessToken string `json:"access_token"` - TokenType TokenType `json:"token_type"` - ExpiresIn int64 `json:"expires_in"` - RefreshToken string `json:"refresh_token"` - IDToken string `json:"id_token,omitempty"` -} - -func newAccessTokenResponse(grant *models.OAuth2Grant, clientSecret string) (*AccessTokenResponse, *AccessTokenError) { - if setting.OAuth2.InvalidateRefreshTokens { - if err := grant.IncreaseCounter(); err != nil { - return nil, &AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidGrant, - ErrorDescription: "cannot increase the grant counter", - } - } - } - // generate access token to access the API - expirationDate := timeutil.TimeStampNow().Add(setting.OAuth2.AccessTokenExpirationTime) - accessToken := &models.OAuth2Token{ - GrantID: grant.ID, - Type: models.TypeAccessToken, - StandardClaims: jwt.StandardClaims{ - ExpiresAt: expirationDate.AsTime().Unix(), - }, - } - signedAccessToken, err := accessToken.SignToken() - if err != nil { - return nil, &AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidRequest, - ErrorDescription: "cannot sign token", - } - } - - // generate refresh token to request an access token after it expired later - refreshExpirationDate := timeutil.TimeStampNow().Add(setting.OAuth2.RefreshTokenExpirationTime * 60 * 60).AsTime().Unix() - refreshToken := &models.OAuth2Token{ - GrantID: grant.ID, - Counter: grant.Counter, - Type: models.TypeRefreshToken, - StandardClaims: jwt.StandardClaims{ - ExpiresAt: refreshExpirationDate, - }, - } - signedRefreshToken, err := refreshToken.SignToken() - if err != nil { - return nil, &AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidRequest, - ErrorDescription: "cannot sign token", - } - } - - // generate OpenID Connect id_token - signedIDToken := "" - if grant.ScopeContains("openid") { - app, err := models.GetOAuth2ApplicationByID(grant.ApplicationID) - if err != nil { - return nil, &AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidRequest, - ErrorDescription: "cannot find application", - } - } - idToken := &models.OIDCToken{ - StandardClaims: jwt.StandardClaims{ - ExpiresAt: expirationDate.AsTime().Unix(), - Issuer: setting.AppURL, - Audience: app.ClientID, - Subject: fmt.Sprint(grant.UserID), - }, - Nonce: grant.Nonce, - } - signedIDToken, err = idToken.SignToken(clientSecret) - if err != nil { - return nil, &AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidRequest, - ErrorDescription: "cannot sign token", - } - } - } - - return &AccessTokenResponse{ - AccessToken: signedAccessToken, - TokenType: TokenTypeBearer, - ExpiresIn: setting.OAuth2.AccessTokenExpirationTime, - RefreshToken: signedRefreshToken, - IDToken: signedIDToken, - }, nil -} - -// AuthorizeOAuth manages authorize requests -func AuthorizeOAuth(ctx *context.Context, form auth.AuthorizationForm) { - errs := binding.Errors{} - errs = form.Validate(ctx.Context, errs) - if len(errs) > 0 { - errstring := "" - for _, e := range errs { - errstring += e.Error() + "\n" - } - ctx.ServerError("AuthorizeOAuth: Validate: ", fmt.Errorf("errors occurred during validation: %s", errstring)) - return - } - - app, err := models.GetOAuth2ApplicationByClientID(form.ClientID) - if err != nil { - if models.IsErrOauthClientIDInvalid(err) { - handleAuthorizeError(ctx, AuthorizeError{ - ErrorCode: ErrorCodeUnauthorizedClient, - ErrorDescription: "Client ID not registered", - State: form.State, - }, "") - return - } - ctx.ServerError("GetOAuth2ApplicationByClientID", err) - return - } - if err := app.LoadUser(); err != nil { - ctx.ServerError("LoadUser", err) - return - } - - if !app.ContainsRedirectURI(form.RedirectURI) { - handleAuthorizeError(ctx, AuthorizeError{ - ErrorCode: ErrorCodeInvalidRequest, - ErrorDescription: "Unregistered Redirect URI", - State: form.State, - }, "") - return - } - - if form.ResponseType != "code" { - handleAuthorizeError(ctx, AuthorizeError{ - ErrorCode: ErrorCodeUnsupportedResponseType, - ErrorDescription: "Only code response type is supported.", - State: form.State, - }, form.RedirectURI) - return - } - - // pkce support - switch form.CodeChallengeMethod { - case "S256": - case "plain": - if err := ctx.Session.Set("CodeChallengeMethod", form.CodeChallengeMethod); err != nil { - handleAuthorizeError(ctx, AuthorizeError{ - ErrorCode: ErrorCodeServerError, - ErrorDescription: "cannot set code challenge method", - State: form.State, - }, form.RedirectURI) - return - } - if err := ctx.Session.Set("CodeChallengeMethod", form.CodeChallenge); err != nil { - handleAuthorizeError(ctx, AuthorizeError{ - ErrorCode: ErrorCodeServerError, - ErrorDescription: "cannot set code challenge", - State: form.State, - }, form.RedirectURI) - return - } - // Here we're just going to try to release the session early - if err := ctx.Session.Release(); err != nil { - // we'll tolerate errors here as they *should* get saved elsewhere - log.Error("Unable to save changes to the session: %v", err) - } - case "": - break - default: - handleAuthorizeError(ctx, AuthorizeError{ - ErrorCode: ErrorCodeInvalidRequest, - ErrorDescription: "unsupported code challenge method", - State: form.State, - }, form.RedirectURI) - return - } - - grant, err := app.GetGrantByUserID(ctx.User.ID) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - return - } - - // Redirect if user already granted access - if grant != nil { - code, err := grant.GenerateNewAuthorizationCode(form.RedirectURI, form.CodeChallenge, form.CodeChallengeMethod) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - return - } - redirect, err := code.GenerateRedirectURI(form.State) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - return - } - // Update nonce to reflect the new session - if len(form.Nonce) > 0 { - err := grant.SetNonce(form.Nonce) - if err != nil { - log.Error("Unable to update nonce: %v", err) - } - } - ctx.Redirect(redirect.String(), 302) - return - } - - // show authorize page to grant access - ctx.Data["Application"] = app - ctx.Data["RedirectURI"] = form.RedirectURI - ctx.Data["State"] = form.State - ctx.Data["Scope"] = form.Scope - ctx.Data["Nonce"] = form.Nonce - ctx.Data["ApplicationUserLink"] = "@" + html.EscapeString(app.User.Name) + "" - ctx.Data["ApplicationRedirectDomainHTML"] = "" + html.EscapeString(form.RedirectURI) + "" - // TODO document SESSION <=> FORM - err = ctx.Session.Set("client_id", app.ClientID) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - log.Error(err.Error()) - return - } - err = ctx.Session.Set("redirect_uri", form.RedirectURI) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - log.Error(err.Error()) - return - } - err = ctx.Session.Set("state", form.State) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - log.Error(err.Error()) - return - } - // Here we're just going to try to release the session early - if err := ctx.Session.Release(); err != nil { - // we'll tolerate errors here as they *should* get saved elsewhere - log.Error("Unable to save changes to the session: %v", err) - } - ctx.HTML(200, tplGrantAccess) -} - -// GrantApplicationOAuth manages the post request submitted when a user grants access to an application -func GrantApplicationOAuth(ctx *context.Context, form auth.GrantApplicationForm) { - if ctx.Session.Get("client_id") != form.ClientID || ctx.Session.Get("state") != form.State || - ctx.Session.Get("redirect_uri") != form.RedirectURI { - ctx.Error(400) - return - } - app, err := models.GetOAuth2ApplicationByClientID(form.ClientID) - if err != nil { - ctx.ServerError("GetOAuth2ApplicationByClientID", err) - return - } - grant, err := app.CreateGrant(ctx.User.ID, form.Scope) - if err != nil { - handleAuthorizeError(ctx, AuthorizeError{ - State: form.State, - ErrorDescription: "cannot create grant for user", - ErrorCode: ErrorCodeServerError, - }, form.RedirectURI) - return - } - if len(form.Nonce) > 0 { - err := grant.SetNonce(form.Nonce) - if err != nil { - log.Error("Unable to update nonce: %v", err) - } - } - - var codeChallenge, codeChallengeMethod string - codeChallenge, _ = ctx.Session.Get("CodeChallenge").(string) - codeChallengeMethod, _ = ctx.Session.Get("CodeChallengeMethod").(string) - - code, err := grant.GenerateNewAuthorizationCode(form.RedirectURI, codeChallenge, codeChallengeMethod) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - return - } - redirect, err := code.GenerateRedirectURI(form.State) - if err != nil { - handleServerError(ctx, form.State, form.RedirectURI) - return - } - ctx.Redirect(redirect.String(), 302) -} - -// AccessTokenOAuth manages all access token requests by the client -func AccessTokenOAuth(ctx *context.Context, form auth.AccessTokenForm) { - if form.ClientID == "" { - authHeader := ctx.Req.Header.Get("Authorization") - authContent := strings.SplitN(authHeader, " ", 2) - if len(authContent) == 2 && authContent[0] == "Basic" { - payload, err := base64.StdEncoding.DecodeString(authContent[1]) - if err != nil { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidRequest, - ErrorDescription: "cannot parse basic auth header", - }) - return - } - pair := strings.SplitN(string(payload), ":", 2) - if len(pair) != 2 { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidRequest, - ErrorDescription: "cannot parse basic auth header", - }) - return - } - form.ClientID = pair[0] - form.ClientSecret = pair[1] - } - } - switch form.GrantType { - case "refresh_token": - handleRefreshToken(ctx, form) - return - case "authorization_code": - handleAuthorizationCode(ctx, form) - return - default: - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeUnsupportedGrantType, - ErrorDescription: "Only refresh_token or authorization_code grant type is supported", - }) - } -} - -func handleRefreshToken(ctx *context.Context, form auth.AccessTokenForm) { - token, err := models.ParseOAuth2Token(form.RefreshToken) - if err != nil { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeUnauthorizedClient, - ErrorDescription: "client is not authorized", - }) - return - } - // get grant before increasing counter - grant, err := models.GetOAuth2GrantByID(token.GrantID) - if err != nil || grant == nil { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidGrant, - ErrorDescription: "grant does not exist", - }) - return - } - - // check if token got already used - if setting.OAuth2.InvalidateRefreshTokens && (grant.Counter != token.Counter || token.Counter == 0) { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeUnauthorizedClient, - ErrorDescription: "token was already used", - }) - log.Warn("A client tried to use a refresh token for grant_id = %d was used twice!", grant.ID) - return - } - accessToken, tokenErr := newAccessTokenResponse(grant, form.ClientSecret) - if tokenErr != nil { - handleAccessTokenError(ctx, *tokenErr) - return - } - ctx.JSON(200, accessToken) -} - -func handleAuthorizationCode(ctx *context.Context, form auth.AccessTokenForm) { - app, err := models.GetOAuth2ApplicationByClientID(form.ClientID) - if err != nil { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidClient, - ErrorDescription: fmt.Sprintf("cannot load client with client id: '%s'", form.ClientID), - }) - return - } - if !app.ValidateClientSecret([]byte(form.ClientSecret)) { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeUnauthorizedClient, - ErrorDescription: "client is not authorized", - }) - return - } - if form.RedirectURI != "" && !app.ContainsRedirectURI(form.RedirectURI) { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeUnauthorizedClient, - ErrorDescription: "client is not authorized", - }) - return - } - authorizationCode, err := models.GetOAuth2AuthorizationByCode(form.Code) - if err != nil || authorizationCode == nil { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeUnauthorizedClient, - ErrorDescription: "client is not authorized", - }) - return - } - // check if code verifier authorizes the client, PKCE support - if !authorizationCode.ValidateCodeChallenge(form.CodeVerifier) { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeUnauthorizedClient, - ErrorDescription: "client is not authorized", - }) - return - } - // check if granted for this application - if authorizationCode.Grant.ApplicationID != app.ID { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidGrant, - ErrorDescription: "invalid grant", - }) - return - } - // remove token from database to deny duplicate usage - if err := authorizationCode.Invalidate(); err != nil { - handleAccessTokenError(ctx, AccessTokenError{ - ErrorCode: AccessTokenErrorCodeInvalidRequest, - ErrorDescription: "cannot proceed your request", - }) - } - resp, tokenErr := newAccessTokenResponse(authorizationCode.Grant, form.ClientSecret) - if tokenErr != nil { - handleAccessTokenError(ctx, *tokenErr) - return - } - // send successful response - ctx.JSON(200, resp) -} - -func handleAccessTokenError(ctx *context.Context, acErr AccessTokenError) { - ctx.JSON(400, acErr) -} - -func handleServerError(ctx *context.Context, state string, redirectURI string) { - handleAuthorizeError(ctx, AuthorizeError{ - ErrorCode: ErrorCodeServerError, - ErrorDescription: "A server error occurred", - State: state, - }, redirectURI) -} - -func handleAuthorizeError(ctx *context.Context, authErr AuthorizeError, redirectURI string) { - if redirectURI == "" { - log.Warn("Authorization failed: %v", authErr.ErrorDescription) - ctx.Data["Error"] = authErr - ctx.HTML(400, tplGrantError) - return - } - redirect, err := url.Parse(redirectURI) - if err != nil { - ctx.ServerError("url.Parse", err) - return - } - q := redirect.Query() - q.Set("error", string(authErr.ErrorCode)) - q.Set("error_description", authErr.ErrorDescription) - q.Set("state", authErr.State) - redirect.RawQuery = q.Encode() - ctx.Redirect(redirect.String(), 302) -} diff --git a/routers/user/profile.go b/routers/user/profile.go deleted file mode 100644 index bd5b35927..000000000 --- a/routers/user/profile.go +++ /dev/null @@ -1,292 +0,0 @@ -// Copyright 2015 The Gogs Authors. All rights reserved. -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "fmt" - "path" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/markup/markdown" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" - "code.gitea.io/gitea/routers/org" -) - -// GetUserByName get user by name -func GetUserByName(ctx *context.Context, name string) *models.User { - user, err := models.GetUserByName(name) - if err != nil { - if models.IsErrUserNotExist(err) { - ctx.NotFound("GetUserByName", nil) - } else { - ctx.ServerError("GetUserByName", err) - } - return nil - } - return user -} - -// GetUserByParams returns user whose name is presented in URL paramenter. -func GetUserByParams(ctx *context.Context) *models.User { - return GetUserByName(ctx, ctx.Params(":username")) -} - -// Profile render user's profile page -func Profile(ctx *context.Context) { - uname := ctx.Params(":username") - // Special handle for FireFox requests favicon.ico. - if uname == "favicon.ico" { - ctx.ServeFile(path.Join(setting.StaticRootPath, "public/img/favicon.png")) - return - } else if strings.HasSuffix(uname, ".png") { - ctx.Error(404) - return - } - - isShowKeys := false - if strings.HasSuffix(uname, ".keys") { - isShowKeys = true - uname = strings.TrimSuffix(uname, ".keys") - } - - isShowGPG := false - if strings.HasSuffix(uname, ".gpg") { - isShowGPG = true - uname = strings.TrimSuffix(uname, ".gpg") - } - - ctxUser := GetUserByName(ctx, uname) - if ctx.Written() { - return - } - - // Show SSH keys. - if isShowKeys { - ShowSSHKeys(ctx, ctxUser.ID) - return - } - - // Show GPG keys. - if isShowGPG { - ShowGPGKeys(ctx, ctxUser.ID) - return - } - - if ctxUser.IsOrganization() { - org.Home(ctx) - return - } - - // Show OpenID URIs - openIDs, err := models.GetUserOpenIDs(ctxUser.ID) - if err != nil { - ctx.ServerError("GetUserOpenIDs", err) - return - } - - ctx.Data["Title"] = ctxUser.DisplayName() - ctx.Data["PageIsUserProfile"] = true - ctx.Data["Owner"] = ctxUser - ctx.Data["OpenIDs"] = openIDs - - // no heatmap access for admins; GetUserHeatmapDataByUser ignores the calling user - // so everyone would get the same empty heatmap - if setting.Service.EnableUserHeatmap && !ctxUser.KeepActivityPrivate { - data, err := models.GetUserHeatmapDataByUser(ctxUser, ctx.User) - if err != nil { - ctx.ServerError("GetUserHeatmapDataByUser", err) - return - } - ctx.Data["HeatmapData"] = data - } - - if len(ctxUser.Description) != 0 { - ctx.Data["RenderedDescription"] = string(markdown.Render([]byte(ctxUser.Description), ctx.Repo.RepoLink, map[string]string{"mode": "document"})) - } - - showPrivate := ctx.IsSigned && (ctx.User.IsAdmin || ctx.User.ID == ctxUser.ID) - - orgs, err := models.GetOrgsByUserID(ctxUser.ID, showPrivate) - if err != nil { - ctx.ServerError("GetOrgsByUserIDDesc", err) - return - } - - ctx.Data["Orgs"] = orgs - ctx.Data["HasOrgsVisible"] = models.HasOrgsVisible(orgs, ctx.User) - - tab := ctx.Query("tab") - ctx.Data["TabName"] = tab - - page := ctx.QueryInt("page") - if page <= 0 { - page = 1 - } - - topicOnly := ctx.QueryBool("topic") - - var ( - repos []*models.Repository - count int64 - total int - orderBy models.SearchOrderBy - ) - - ctx.Data["SortType"] = ctx.Query("sort") - switch ctx.Query("sort") { - case "newest": - orderBy = models.SearchOrderByNewest - case "oldest": - orderBy = models.SearchOrderByOldest - case "recentupdate": - orderBy = models.SearchOrderByRecentUpdated - case "leastupdate": - orderBy = models.SearchOrderByLeastUpdated - case "reversealphabetically": - orderBy = models.SearchOrderByAlphabeticallyReverse - case "alphabetically": - orderBy = models.SearchOrderByAlphabetically - case "moststars": - orderBy = models.SearchOrderByStarsReverse - case "feweststars": - orderBy = models.SearchOrderByStars - case "mostforks": - orderBy = models.SearchOrderByForksReverse - case "fewestforks": - orderBy = models.SearchOrderByForks - default: - ctx.Data["SortType"] = "recentupdate" - orderBy = models.SearchOrderByRecentUpdated - } - - keyword := strings.Trim(ctx.Query("q"), " ") - ctx.Data["Keyword"] = keyword - switch tab { - case "followers": - items, err := ctxUser.GetFollowers(models.ListOptions{ - PageSize: setting.UI.User.RepoPagingNum, - Page: page, - }) - if err != nil { - ctx.ServerError("GetFollowers", err) - return - } - ctx.Data["Cards"] = items - - total = ctxUser.NumFollowers - case "following": - items, err := ctxUser.GetFollowing(models.ListOptions{ - PageSize: setting.UI.User.RepoPagingNum, - Page: page, - }) - if err != nil { - ctx.ServerError("GetFollowing", err) - return - } - ctx.Data["Cards"] = items - - total = ctxUser.NumFollowing - case "activity": - retrieveFeeds(ctx, models.GetFeedsOptions{RequestedUser: ctxUser, - Actor: ctx.User, - IncludePrivate: showPrivate, - OnlyPerformedBy: true, - IncludeDeleted: false, - }) - if ctx.Written() { - return - } - case "stars": - ctx.Data["PageIsProfileStarList"] = true - repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ - ListOptions: models.ListOptions{ - PageSize: setting.UI.User.RepoPagingNum, - Page: page, - }, - Actor: ctx.User, - Keyword: keyword, - OrderBy: orderBy, - Private: ctx.IsSigned, - StarredByID: ctxUser.ID, - Collaborate: util.OptionalBoolFalse, - TopicOnly: topicOnly, - IncludeDescription: setting.UI.SearchRepoDescription, - }) - if err != nil { - ctx.ServerError("SearchRepository", err) - return - } - - total = int(count) - case "projects": - ctx.Data["OpenProjects"], _, err = models.GetProjects(models.ProjectSearchOptions{ - Page: -1, - IsClosed: util.OptionalBoolFalse, - Type: models.ProjectTypeIndividual, - }) - if err != nil { - ctx.ServerError("GetProjects", err) - return - } - default: - repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ - ListOptions: models.ListOptions{ - PageSize: setting.UI.User.RepoPagingNum, - Page: page, - }, - Actor: ctx.User, - Keyword: keyword, - OwnerID: ctxUser.ID, - OrderBy: orderBy, - Private: ctx.IsSigned, - Collaborate: util.OptionalBoolFalse, - TopicOnly: topicOnly, - IncludeDescription: setting.UI.SearchRepoDescription, - }) - if err != nil { - ctx.ServerError("SearchRepository", err) - return - } - - total = int(count) - } - ctx.Data["Repos"] = repos - ctx.Data["Total"] = total - - pager := context.NewPagination(total, setting.UI.User.RepoPagingNum, page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - - ctx.Data["ShowUserEmail"] = len(ctxUser.Email) > 0 && ctx.IsSigned && (!ctxUser.KeepEmailPrivate || ctxUser.ID == ctx.User.ID) - - ctx.HTML(200, tplProfile) -} - -// Action response for follow/unfollow user request -func Action(ctx *context.Context) { - u := GetUserByParams(ctx) - if ctx.Written() { - return - } - - var err error - switch ctx.Params(":action") { - case "follow": - err = models.FollowUser(ctx.User.ID, u.ID) - case "unfollow": - err = models.UnfollowUser(ctx.User.ID, u.ID) - } - - if err != nil { - ctx.ServerError(fmt.Sprintf("Action (%s)", ctx.Params(":action")), err) - return - } - - ctx.RedirectToFirst(ctx.Query("redirect_to"), u.HomeLink()) -} diff --git a/routers/user/setting/account.go b/routers/user/setting/account.go deleted file mode 100644 index ca9b5b3c3..000000000 --- a/routers/user/setting/account.go +++ /dev/null @@ -1,303 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package setting - -import ( - "errors" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/password" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/services/mailer" -) - -const ( - tplSettingsAccount base.TplName = "user/settings/account" -) - -// Account renders change user's password, user's email and user suicide page -func Account(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsAccount"] = true - ctx.Data["Email"] = ctx.User.Email - - loadAccountData(ctx) - - ctx.HTML(200, tplSettingsAccount) -} - -// AccountPost response for change user's password -func AccountPost(ctx *context.Context, form auth.ChangePasswordForm) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsAccount"] = true - - if ctx.HasError() { - loadAccountData(ctx) - - ctx.HTML(200, tplSettingsAccount) - return - } - - if len(form.Password) < setting.MinPasswordLength { - ctx.Flash.Error(ctx.Tr("auth.password_too_short", setting.MinPasswordLength)) - } else if ctx.User.IsPasswordSet() && !ctx.User.ValidatePassword(form.OldPassword) { - ctx.Flash.Error(ctx.Tr("settings.password_incorrect")) - } else if form.Password != form.Retype { - ctx.Flash.Error(ctx.Tr("form.password_not_match")) - } else if !password.IsComplexEnough(form.Password) { - ctx.Flash.Error(password.BuildComplexityError(ctx)) - } else if pwned, err := password.IsPwned(ctx.Req.Context(), form.Password); pwned || err != nil { - errMsg := ctx.Tr("auth.password_pwned") - if err != nil { - log.Error(err.Error()) - errMsg = ctx.Tr("auth.password_pwned_err") - } - ctx.Flash.Error(errMsg) - } else { - var err error - if err = ctx.User.SetPassword(form.Password); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - if err := models.UpdateUserCols(ctx.User, "salt", "passwd_hash_algo", "passwd"); err != nil { - ctx.ServerError("UpdateUser", err) - return - } - log.Trace("User password updated: %s", ctx.User.Name) - ctx.Flash.Success(ctx.Tr("settings.change_password_success")) - } - - ctx.Redirect(setting.AppSubURL + "/user/settings/account") -} - -// EmailPost response for change user's email -func EmailPost(ctx *context.Context, form auth.AddEmailForm) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsAccount"] = true - - // Make emailaddress primary. - if ctx.Query("_method") == "PRIMARY" { - if err := models.MakeEmailPrimary(&models.EmailAddress{ID: ctx.QueryInt64("id")}); err != nil { - ctx.ServerError("MakeEmailPrimary", err) - return - } - - log.Trace("Email made primary: %s", ctx.User.Name) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - // Send activation Email - if ctx.Query("_method") == "SENDACTIVATION" { - var address string - if ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName) { - log.Error("Send activation: activation still pending") - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - if ctx.Query("id") == "PRIMARY" { - if ctx.User.IsActive { - log.Error("Send activation: email not set for activation") - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - mailer.SendActivateAccountMail(ctx.Locale, ctx.User) - address = ctx.User.Email - } else { - id := ctx.QueryInt64("id") - email, err := models.GetEmailAddressByID(ctx.User.ID, id) - if err != nil { - log.Error("GetEmailAddressByID(%d,%d) error: %v", ctx.User.ID, id, err) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - if email == nil { - log.Error("Send activation: EmailAddress not found; user:%d, id: %d", ctx.User.ID, id) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - if email.IsActivated { - log.Error("Send activation: email not set for activation") - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - mailer.SendActivateEmailMail(ctx.Locale, ctx.User, email) - address = email.Email - } - - if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil { - log.Error("Set cache(MailResendLimit) fail: %v", err) - } - ctx.Flash.Info(ctx.Tr("settings.add_email_confirmation_sent", address, timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()))) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - // Set Email Notification Preference - if ctx.Query("_method") == "NOTIFICATION" { - preference := ctx.Query("preference") - if !(preference == models.EmailNotificationsEnabled || - preference == models.EmailNotificationsOnMention || - preference == models.EmailNotificationsDisabled) { - log.Error("Email notifications preference change returned unrecognized option %s: %s", preference, ctx.User.Name) - ctx.ServerError("SetEmailPreference", errors.New("option unrecognized")) - return - } - if err := ctx.User.SetEmailNotifications(preference); err != nil { - log.Error("Set Email Notifications failed: %v", err) - ctx.ServerError("SetEmailNotifications", err) - return - } - log.Trace("Email notifications preference made %s: %s", preference, ctx.User.Name) - ctx.Flash.Success(ctx.Tr("settings.email_preference_set_success")) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - - if ctx.HasError() { - loadAccountData(ctx) - - ctx.HTML(200, tplSettingsAccount) - return - } - - email := &models.EmailAddress{ - UID: ctx.User.ID, - Email: form.Email, - IsActivated: !setting.Service.RegisterEmailConfirm, - } - if err := models.AddEmailAddress(email); err != nil { - if models.IsErrEmailAlreadyUsed(err) { - loadAccountData(ctx) - - ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSettingsAccount, &form) - return - } else if models.IsErrEmailInvalid(err) { - loadAccountData(ctx) - - ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplSettingsAccount, &form) - return - } - ctx.ServerError("AddEmailAddress", err) - return - } - - // Send confirmation email - if setting.Service.RegisterEmailConfirm { - mailer.SendActivateEmailMail(ctx.Locale, ctx.User, email) - if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil { - log.Error("Set cache(MailResendLimit) fail: %v", err) - } - ctx.Flash.Info(ctx.Tr("settings.add_email_confirmation_sent", email.Email, timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()))) - } else { - ctx.Flash.Success(ctx.Tr("settings.add_email_success")) - } - - log.Trace("Email address added: %s", email.Email) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") -} - -// DeleteEmail response for delete user's email -func DeleteEmail(ctx *context.Context) { - if err := models.DeleteEmailAddress(&models.EmailAddress{ID: ctx.QueryInt64("id"), UID: ctx.User.ID}); err != nil { - ctx.ServerError("DeleteEmail", err) - return - } - log.Trace("Email address deleted: %s", ctx.User.Name) - - ctx.Flash.Success(ctx.Tr("settings.email_deletion_success")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/user/settings/account", - }) -} - -// DeleteAccount render user suicide page and response for delete user himself -func DeleteAccount(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsAccount"] = true - - if _, err := models.UserSignIn(ctx.User.Name, ctx.Query("password")); err != nil { - if models.IsErrUserNotExist(err) { - loadAccountData(ctx) - - ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_password"), tplSettingsAccount, nil) - } else { - ctx.ServerError("UserSignIn", err) - } - return - } - - if err := models.DeleteUser(ctx.User); err != nil { - switch { - case models.IsErrUserOwnRepos(err): - ctx.Flash.Error(ctx.Tr("form.still_own_repo")) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - case models.IsErrUserHasOrgs(err): - ctx.Flash.Error(ctx.Tr("form.still_has_org")) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - default: - ctx.ServerError("DeleteUser", err) - } - } else { - log.Trace("Account deleted: %s", ctx.User.Name) - ctx.Redirect(setting.AppSubURL + "/") - } -} - -// UpdateUIThemePost is used to update users' specific theme -func UpdateUIThemePost(ctx *context.Context, form auth.UpdateThemeForm) { - - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsAccount"] = true - - if ctx.HasError() { - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - - if !form.IsThemeExists() { - ctx.Flash.Error(ctx.Tr("settings.theme_update_error")) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - - if err := ctx.User.UpdateTheme(form.Theme); err != nil { - ctx.Flash.Error(ctx.Tr("settings.theme_update_error")) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") - return - } - - log.Trace("Update user theme: %s", ctx.User.Name) - ctx.Flash.Success(ctx.Tr("settings.theme_update_success")) - ctx.Redirect(setting.AppSubURL + "/user/settings/account") -} - -func loadAccountData(ctx *context.Context) { - emlist, err := models.GetEmailAddresses(ctx.User.ID) - if err != nil { - ctx.ServerError("GetEmailAddresses", err) - return - } - type UserEmail struct { - models.EmailAddress - CanBePrimary bool - } - pendingActivation := ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName) - emails := make([]*UserEmail, len(emlist)) - for i, em := range emlist { - var email UserEmail - email.EmailAddress = *em - email.CanBePrimary = em.IsActivated - emails[i] = &email - } - ctx.Data["Emails"] = emails - ctx.Data["EmailNotificationsPreference"] = ctx.User.EmailNotifications() - ctx.Data["ActivationsPending"] = pendingActivation - ctx.Data["CanAddEmails"] = !pendingActivation || !setting.Service.RegisterEmailConfirm -} diff --git a/routers/user/setting/keys.go b/routers/user/setting/keys.go deleted file mode 100644 index 76c7ef9da..000000000 --- a/routers/user/setting/keys.go +++ /dev/null @@ -1,222 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package setting - -import ( - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/setting" -) - -const ( - tplSettingsKeys base.TplName = "user/settings/keys" -) - -// Keys render user's SSH/GPG public keys page -func Keys(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsKeys"] = true - ctx.Data["DisableSSH"] = setting.SSH.Disabled - ctx.Data["BuiltinSSH"] = setting.SSH.StartBuiltinServer - ctx.Data["AllowPrincipals"] = setting.SSH.AuthorizedPrincipalsEnabled - - loadKeysData(ctx) - - ctx.HTML(200, tplSettingsKeys) -} - -// KeysPost response for change user's SSH/GPG keys -func KeysPost(ctx *context.Context, form auth.AddKeyForm) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsKeys"] = true - ctx.Data["DisableSSH"] = setting.SSH.Disabled - ctx.Data["BuiltinSSH"] = setting.SSH.StartBuiltinServer - ctx.Data["AllowPrincipals"] = setting.SSH.AuthorizedPrincipalsEnabled - - if ctx.HasError() { - loadKeysData(ctx) - - ctx.HTML(200, tplSettingsKeys) - return - } - switch form.Type { - case "principal": - content, err := models.CheckPrincipalKeyString(ctx.User, form.Content) - if err != nil { - if models.IsErrSSHDisabled(err) { - ctx.Flash.Info(ctx.Tr("settings.ssh_disabled")) - } else { - ctx.Flash.Error(ctx.Tr("form.invalid_ssh_principal", err.Error())) - } - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - return - } - if _, err = models.AddPrincipalKey(ctx.User.ID, content, 0); err != nil { - ctx.Data["HasPrincipalError"] = true - switch { - case models.IsErrKeyAlreadyExist(err), models.IsErrKeyNameAlreadyUsed(err): - loadKeysData(ctx) - - ctx.Data["Err_Content"] = true - ctx.RenderWithErr(ctx.Tr("settings.ssh_principal_been_used"), tplSettingsKeys, &form) - default: - ctx.ServerError("AddPrincipalKey", err) - } - return - } - ctx.Flash.Success(ctx.Tr("settings.add_principal_success", form.Content)) - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - case "gpg": - keys, err := models.AddGPGKey(ctx.User.ID, form.Content) - if err != nil { - ctx.Data["HasGPGError"] = true - switch { - case models.IsErrGPGKeyParsing(err): - ctx.Flash.Error(ctx.Tr("form.invalid_gpg_key", err.Error())) - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - case models.IsErrGPGKeyIDAlreadyUsed(err): - loadKeysData(ctx) - - ctx.Data["Err_Content"] = true - ctx.RenderWithErr(ctx.Tr("settings.gpg_key_id_used"), tplSettingsKeys, &form) - case models.IsErrGPGNoEmailFound(err): - loadKeysData(ctx) - - ctx.Data["Err_Content"] = true - ctx.RenderWithErr(ctx.Tr("settings.gpg_no_key_email_found"), tplSettingsKeys, &form) - default: - ctx.ServerError("AddPublicKey", err) - } - return - } - keyIDs := "" - for _, key := range keys { - keyIDs += key.KeyID - keyIDs += ", " - } - if len(keyIDs) > 0 { - keyIDs = keyIDs[:len(keyIDs)-2] - } - ctx.Flash.Success(ctx.Tr("settings.add_gpg_key_success", keyIDs)) - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - case "ssh": - content, err := models.CheckPublicKeyString(form.Content) - if err != nil { - if models.IsErrSSHDisabled(err) { - ctx.Flash.Info(ctx.Tr("settings.ssh_disabled")) - } else if models.IsErrKeyUnableVerify(err) { - ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key")) - } else { - ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error())) - } - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - return - } - - if _, err = models.AddPublicKey(ctx.User.ID, form.Title, content, 0); err != nil { - ctx.Data["HasSSHError"] = true - switch { - case models.IsErrKeyAlreadyExist(err): - loadKeysData(ctx) - - ctx.Data["Err_Content"] = true - ctx.RenderWithErr(ctx.Tr("settings.ssh_key_been_used"), tplSettingsKeys, &form) - case models.IsErrKeyNameAlreadyUsed(err): - loadKeysData(ctx) - - ctx.Data["Err_Title"] = true - ctx.RenderWithErr(ctx.Tr("settings.ssh_key_name_used"), tplSettingsKeys, &form) - case models.IsErrKeyUnableVerify(err): - ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key")) - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - default: - ctx.ServerError("AddPublicKey", err) - } - return - } - ctx.Flash.Success(ctx.Tr("settings.add_key_success", form.Title)) - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - - default: - ctx.Flash.Warning("Function not implemented") - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - } - -} - -// DeleteKey response for delete user's SSH/GPG key -func DeleteKey(ctx *context.Context) { - - switch ctx.Query("type") { - case "gpg": - if err := models.DeleteGPGKey(ctx.User, ctx.QueryInt64("id")); err != nil { - ctx.Flash.Error("DeleteGPGKey: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("settings.gpg_key_deletion_success")) - } - case "ssh": - keyID := ctx.QueryInt64("id") - external, err := models.PublicKeyIsExternallyManaged(keyID) - if err != nil { - ctx.ServerError("sshKeysExternalManaged", err) - return - } - if external { - ctx.Flash.Error(ctx.Tr("setting.ssh_externally_managed")) - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - return - } - if err := models.DeletePublicKey(ctx.User, keyID); err != nil { - ctx.Flash.Error("DeletePublicKey: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("settings.ssh_key_deletion_success")) - } - case "principal": - if err := models.DeletePublicKey(ctx.User, ctx.QueryInt64("id")); err != nil { - ctx.Flash.Error("DeletePublicKey: " + err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("settings.ssh_principal_deletion_success")) - } - default: - ctx.Flash.Warning("Function not implemented") - ctx.Redirect(setting.AppSubURL + "/user/settings/keys") - } - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/user/settings/keys", - }) -} - -func loadKeysData(ctx *context.Context) { - keys, err := models.ListPublicKeys(ctx.User.ID, models.ListOptions{}) - if err != nil { - ctx.ServerError("ListPublicKeys", err) - return - } - ctx.Data["Keys"] = keys - - externalKeys, err := models.PublicKeysAreExternallyManaged(keys) - if err != nil { - ctx.ServerError("ListPublicKeys", err) - return - } - ctx.Data["ExternalKeys"] = externalKeys - - gpgkeys, err := models.ListGPGKeys(ctx.User.ID, models.ListOptions{}) - if err != nil { - ctx.ServerError("ListGPGKeys", err) - return - } - ctx.Data["GPGKeys"] = gpgkeys - - principals, err := models.ListPrincipalKeys(ctx.User.ID, models.ListOptions{}) - if err != nil { - ctx.ServerError("ListPrincipalKeys", err) - return - } - ctx.Data["Principals"] = principals -} diff --git a/routers/user/setting/main_test.go b/routers/user/setting/main_test.go deleted file mode 100644 index d343c02f4..000000000 --- a/routers/user/setting/main_test.go +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package setting - -import ( - "path/filepath" - "testing" - - "code.gitea.io/gitea/models" -) - -func TestMain(m *testing.M) { - models.MainTest(m, filepath.Join("..", "..", "..")) -} diff --git a/routers/user/setting/oauth2.go b/routers/user/setting/oauth2.go deleted file mode 100644 index f42c1123e..000000000 --- a/routers/user/setting/oauth2.go +++ /dev/null @@ -1,155 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package setting - -import ( - "fmt" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" -) - -const ( - tplSettingsOAuthApplications base.TplName = "user/settings/applications_oauth2_edit" -) - -// OAuthApplicationsPost response for adding a oauth2 application -func OAuthApplicationsPost(ctx *context.Context, form auth.EditOAuth2ApplicationForm) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsApplications"] = true - - if ctx.HasError() { - loadApplicationsData(ctx) - - ctx.HTML(200, tplSettingsApplications) - return - } - // TODO validate redirect URI - app, err := models.CreateOAuth2Application(models.CreateOAuth2ApplicationOptions{ - Name: form.Name, - RedirectURIs: []string{form.RedirectURI}, - UserID: ctx.User.ID, - }) - if err != nil { - ctx.ServerError("CreateOAuth2Application", err) - return - } - ctx.Flash.Success(ctx.Tr("settings.create_oauth2_application_success")) - ctx.Data["App"] = app - ctx.Data["ClientSecret"], err = app.GenerateClientSecret() - if err != nil { - ctx.ServerError("GenerateClientSecret", err) - return - } - ctx.HTML(200, tplSettingsOAuthApplications) -} - -// OAuthApplicationsEdit response for editing oauth2 application -func OAuthApplicationsEdit(ctx *context.Context, form auth.EditOAuth2ApplicationForm) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsApplications"] = true - - if ctx.HasError() { - loadApplicationsData(ctx) - - ctx.HTML(200, tplSettingsApplications) - return - } - // TODO validate redirect URI - var err error - if ctx.Data["App"], err = models.UpdateOAuth2Application(models.UpdateOAuth2ApplicationOptions{ - ID: ctx.ParamsInt64("id"), - Name: form.Name, - RedirectURIs: []string{form.RedirectURI}, - UserID: ctx.User.ID, - }); err != nil { - ctx.ServerError("UpdateOAuth2Application", err) - return - } - ctx.Flash.Success(ctx.Tr("settings.update_oauth2_application_success")) - ctx.HTML(200, tplSettingsOAuthApplications) -} - -// OAuthApplicationsRegenerateSecret handles the post request for regenerating the secret -func OAuthApplicationsRegenerateSecret(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsApplications"] = true - - app, err := models.GetOAuth2ApplicationByID(ctx.ParamsInt64("id")) - if err != nil { - if models.IsErrOAuthApplicationNotFound(err) { - ctx.NotFound("Application not found", err) - return - } - ctx.ServerError("GetOAuth2ApplicationByID", err) - return - } - if app.UID != ctx.User.ID { - ctx.NotFound("Application not found", nil) - return - } - ctx.Data["App"] = app - ctx.Data["ClientSecret"], err = app.GenerateClientSecret() - if err != nil { - ctx.ServerError("GenerateClientSecret", err) - return - } - ctx.Flash.Success(ctx.Tr("settings.update_oauth2_application_success")) - ctx.HTML(200, tplSettingsOAuthApplications) -} - -// OAuth2ApplicationShow displays the given application -func OAuth2ApplicationShow(ctx *context.Context) { - app, err := models.GetOAuth2ApplicationByID(ctx.ParamsInt64("id")) - if err != nil { - if models.IsErrOAuthApplicationNotFound(err) { - ctx.NotFound("Application not found", err) - return - } - ctx.ServerError("GetOAuth2ApplicationByID", err) - return - } - if app.UID != ctx.User.ID { - ctx.NotFound("Application not found", nil) - return - } - ctx.Data["App"] = app - ctx.HTML(200, tplSettingsOAuthApplications) -} - -// DeleteOAuth2Application deletes the given oauth2 application -func DeleteOAuth2Application(ctx *context.Context) { - if err := models.DeleteOAuth2Application(ctx.QueryInt64("id"), ctx.User.ID); err != nil { - ctx.ServerError("DeleteOAuth2Application", err) - return - } - log.Trace("OAuth2 Application deleted: %s", ctx.User.Name) - - ctx.Flash.Success(ctx.Tr("settings.remove_oauth2_application_success")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/user/settings/applications", - }) -} - -// RevokeOAuth2Grant revokes the grant with the given id -func RevokeOAuth2Grant(ctx *context.Context) { - if ctx.User.ID == 0 || ctx.QueryInt64("id") == 0 { - ctx.ServerError("RevokeOAuth2Grant", fmt.Errorf("user id or grant id is zero")) - return - } - if err := models.RevokeOAuth2Grant(ctx.QueryInt64("id"), ctx.User.ID); err != nil { - ctx.ServerError("RevokeOAuth2Grant", err) - return - } - - ctx.Flash.Success(ctx.Tr("settings.revoke_oauth2_grant_success")) - ctx.JSON(200, map[string]interface{}{ - "redirect": setting.AppSubURL + "/user/settings/applications", - }) -} diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go deleted file mode 100644 index c935b5623..000000000 --- a/routers/user/setting/profile.go +++ /dev/null @@ -1,305 +0,0 @@ -// Copyright 2014 The Gogs Authors. All rights reserved. -// Copyright 2018 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package setting - -import ( - "errors" - "fmt" - "io/ioutil" - "os" - "path/filepath" - "strings" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" - "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" - - "github.com/unknwon/i18n" -) - -const ( - tplSettingsProfile base.TplName = "user/settings/profile" - tplSettingsOrganization base.TplName = "user/settings/organization" - tplSettingsRepositories base.TplName = "user/settings/repos" -) - -// Profile render user's profile page -func Profile(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsProfile"] = true - - ctx.HTML(200, tplSettingsProfile) -} - -// HandleUsernameChange handle username changes from user settings and admin interface -func HandleUsernameChange(ctx *context.Context, user *models.User, newName string) error { - // Non-local users are not allowed to change their username. - if !user.IsLocal() { - ctx.Flash.Error(ctx.Tr("form.username_change_not_local_user")) - return fmt.Errorf(ctx.Tr("form.username_change_not_local_user")) - } - - // Check if user name has been changed - if user.LowerName != strings.ToLower(newName) { - if err := models.ChangeUserName(user, newName); err != nil { - switch { - case models.IsErrUserAlreadyExist(err): - ctx.Flash.Error(ctx.Tr("form.username_been_taken")) - case models.IsErrEmailAlreadyUsed(err): - ctx.Flash.Error(ctx.Tr("form.email_been_used")) - case models.IsErrNameReserved(err): - ctx.Flash.Error(ctx.Tr("user.form.name_reserved", newName)) - case models.IsErrNamePatternNotAllowed(err): - ctx.Flash.Error(ctx.Tr("user.form.name_pattern_not_allowed", newName)) - case models.IsErrNameCharsNotAllowed(err): - ctx.Flash.Error(ctx.Tr("user.form.name_chars_not_allowed", newName)) - default: - ctx.ServerError("ChangeUserName", err) - } - return err - } - log.Trace("User name changed: %s -> %s", user.Name, newName) - } - return nil -} - -// ProfilePost response for change user's profile -func ProfilePost(ctx *context.Context, form auth.UpdateProfileForm) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsProfile"] = true - - if ctx.HasError() { - ctx.HTML(200, tplSettingsProfile) - return - } - - if len(form.Name) != 0 && ctx.User.Name != form.Name { - if err := HandleUsernameChange(ctx, ctx.User, form.Name); err != nil { - ctx.Redirect(setting.AppSubURL + "/user/settings") - return - } - ctx.User.Name = form.Name - ctx.User.LowerName = strings.ToLower(form.Name) - } - - ctx.User.FullName = form.FullName - ctx.User.KeepEmailPrivate = form.KeepEmailPrivate - ctx.User.Website = form.Website - ctx.User.Location = form.Location - if len(form.Language) != 0 { - if !util.IsStringInSlice(form.Language, setting.Langs) { - ctx.Flash.Error(ctx.Tr("settings.update_language_not_found", form.Language)) - ctx.Redirect(setting.AppSubURL + "/user/settings") - return - } - ctx.User.Language = form.Language - } - ctx.User.Description = form.Description - ctx.User.KeepActivityPrivate = form.KeepActivityPrivate - if err := models.UpdateUserSetting(ctx.User); err != nil { - if _, ok := err.(models.ErrEmailAlreadyUsed); ok { - ctx.Flash.Error(ctx.Tr("form.email_been_used")) - ctx.Redirect(setting.AppSubURL + "/user/settings") - return - } - ctx.ServerError("UpdateUser", err) - return - } - - // Update the language to the one we just set - ctx.SetCookie("lang", ctx.User.Language, nil, setting.AppSubURL, setting.SessionConfig.Domain, setting.SessionConfig.Secure, true) - - log.Trace("User settings updated: %s", ctx.User.Name) - ctx.Flash.Success(i18n.Tr(ctx.User.Language, "settings.update_profile_success")) - ctx.Redirect(setting.AppSubURL + "/user/settings") -} - -// UpdateAvatarSetting update user's avatar -// FIXME: limit size. -func UpdateAvatarSetting(ctx *context.Context, form auth.AvatarForm, ctxUser *models.User) error { - ctxUser.UseCustomAvatar = form.Source == auth.AvatarLocal - if len(form.Gravatar) > 0 { - if form.Avatar != nil { - ctxUser.Avatar = base.EncodeMD5(form.Gravatar) - } else { - ctxUser.Avatar = "" - } - ctxUser.AvatarEmail = form.Gravatar - } - - if form.Avatar != nil && form.Avatar.Filename != "" { - fr, err := form.Avatar.Open() - if err != nil { - return fmt.Errorf("Avatar.Open: %v", err) - } - defer fr.Close() - - if form.Avatar.Size > setting.Avatar.MaxFileSize { - return errors.New(ctx.Tr("settings.uploaded_avatar_is_too_big")) - } - - data, err := ioutil.ReadAll(fr) - if err != nil { - return fmt.Errorf("ioutil.ReadAll: %v", err) - } - if !base.IsImageFile(data) { - return errors.New(ctx.Tr("settings.uploaded_avatar_not_a_image")) - } - if err = ctxUser.UploadAvatar(data); err != nil { - return fmt.Errorf("UploadAvatar: %v", err) - } - } else if ctxUser.UseCustomAvatar && ctxUser.Avatar == "" { - // No avatar is uploaded but setting has been changed to enable, - // generate a random one when needed. - if err := ctxUser.GenerateRandomAvatar(); err != nil { - log.Error("GenerateRandomAvatar[%d]: %v", ctxUser.ID, err) - } - } - - if err := models.UpdateUserCols(ctxUser, "avatar", "avatar_email", "use_custom_avatar"); err != nil { - return fmt.Errorf("UpdateUser: %v", err) - } - - return nil -} - -// AvatarPost response for change user's avatar request -func AvatarPost(ctx *context.Context, form auth.AvatarForm) { - if err := UpdateAvatarSetting(ctx, form, ctx.User); err != nil { - ctx.Flash.Error(err.Error()) - } else { - ctx.Flash.Success(ctx.Tr("settings.update_avatar_success")) - } - - ctx.Redirect(setting.AppSubURL + "/user/settings") -} - -// DeleteAvatar render delete avatar page -func DeleteAvatar(ctx *context.Context) { - if err := ctx.User.DeleteAvatar(); err != nil { - ctx.Flash.Error(err.Error()) - } - - ctx.Redirect(setting.AppSubURL + "/user/settings") -} - -// Organization render all the organization of the user -func Organization(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsOrganization"] = true - orgs, err := models.GetOrgsByUserID(ctx.User.ID, ctx.IsSigned) - if err != nil { - ctx.ServerError("GetOrgsByUserID", err) - return - } - ctx.Data["Orgs"] = orgs - ctx.HTML(200, tplSettingsOrganization) -} - -// Repos display a list of all repositories of the user -func Repos(ctx *context.Context) { - ctx.Data["Title"] = ctx.Tr("settings") - ctx.Data["PageIsSettingsRepos"] = true - ctx.Data["allowAdopt"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowAdoptionOfUnadoptedRepositories - ctx.Data["allowDelete"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowDeleteOfUnadoptedRepositories - - opts := models.ListOptions{ - PageSize: setting.UI.Admin.UserPagingNum, - Page: ctx.QueryInt("page"), - } - - if opts.Page <= 0 { - opts.Page = 1 - } - start := (opts.Page - 1) * opts.PageSize - end := start + opts.PageSize - - adoptOrDelete := ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories) - - ctxUser := ctx.User - count := 0 - - if adoptOrDelete { - repoNames := make([]string, 0, setting.UI.Admin.UserPagingNum) - repos := map[string]*models.Repository{} - // We're going to iterate by pagesize. - root := filepath.Join(models.UserPath(ctxUser.Name)) - if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { - if err != nil { - if os.IsNotExist(err) { - return nil - } - return err - } - if !info.IsDir() || path == root { - return nil - } - name := info.Name() - if !strings.HasSuffix(name, ".git") { - return filepath.SkipDir - } - name = name[:len(name)-4] - if models.IsUsableRepoName(name) != nil || strings.ToLower(name) != name { - return filepath.SkipDir - } - if count >= start && count < end { - repoNames = append(repoNames, name) - } - count++ - return filepath.SkipDir - }); err != nil { - ctx.ServerError("filepath.Walk", err) - return - } - - if err := ctxUser.GetRepositories(models.ListOptions{Page: 1, PageSize: setting.UI.Admin.UserPagingNum}, repoNames...); err != nil { - ctx.ServerError("GetRepositories", err) - return - } - for _, repo := range ctxUser.Repos { - if repo.IsFork { - if err := repo.GetBaseRepo(); err != nil { - ctx.ServerError("GetBaseRepo", err) - return - } - } - repos[repo.LowerName] = repo - } - ctx.Data["Dirs"] = repoNames - ctx.Data["ReposMap"] = repos - } else { - var err error - var count64 int64 - ctxUser.Repos, count64, err = models.GetUserRepositories(&models.SearchRepoOptions{Actor: ctxUser, Private: true, ListOptions: opts}) - - if err != nil { - ctx.ServerError("GetRepositories", err) - return - } - count = int(count64) - repos := ctxUser.Repos - - for i := range repos { - if repos[i].IsFork { - if err := repos[i].GetBaseRepo(); err != nil { - ctx.ServerError("GetBaseRepo", err) - return - } - } - } - - ctx.Data["Repos"] = repos - } - ctx.Data["Owner"] = ctxUser - pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) - pager.SetDefaultParams(ctx) - ctx.Data["Page"] = pager - ctx.HTML(200, tplSettingsRepositories) -} diff --git a/routers/user/task.go b/routers/user/task.go deleted file mode 100644 index a88257ee5..000000000 --- a/routers/user/task.go +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2020 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package user - -import ( - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/context" -) - -// TaskStatus returns task's status -func TaskStatus(ctx *context.Context) { - task, opts, err := models.GetMigratingTaskByID(ctx.ParamsInt64("task"), ctx.User.ID) - if err != nil { - ctx.JSON(500, map[string]interface{}{ - "err": err, - }) - return - } - - ctx.JSON(200, map[string]interface{}{ - "status": task.Status, - "err": task.Errors, - "repo-id": task.RepoID, - "repo-name": opts.RepoName, - "start": task.StartTime, - "end": task.EndTime, - }) -} diff --git a/routers/utils/utils_test.go b/routers/utils/utils_test.go index ec5e69862..bca526331 100644 --- a/routers/utils/utils_test.go +++ b/routers/utils/utils_test.go @@ -35,7 +35,7 @@ func TestIsValidSlackChannel(t *testing.T) { } func TestIsExternalURL(t *testing.T) { - setting.AppURL = "https://try.gitea.io" + setting.AppURL = "https://try.gitea.io/" type test struct { Expected bool RawURL string @@ -62,7 +62,41 @@ func TestIsExternalURL(t *testing.T) { "//try.gitea.io/test?param=false"), newTest(false, "/hey/hey/hey#3244"), + newTest(true, + "://missing protocol scheme"), } { assert.Equal(t, test.Expected, IsExternalURL(test.RawURL)) } } + +func TestSanitizeFlashErrorString(t *testing.T) { + tests := []struct { + name string + arg string + want string + }{ + { + name: "no error", + arg: "", + want: "", + }, + { + name: "normal error", + arg: "can not open file: \"abc.exe\"", + want: "can not open file: "abc.exe"", + }, + { + name: "line break error", + arg: "some error:\n\nawesome!", + want: "some error:

    awesome!", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + if got := SanitizeFlashErrorString(tt.arg); got != tt.want { + t.Errorf("SanitizeFlashErrorString() = '%v', want '%v'", got, tt.want) + } + }) + } +} diff --git a/routers/web/admin/admin.go b/routers/web/admin/admin.go new file mode 100644 index 000000000..ce177ea09 --- /dev/null +++ b/routers/web/admin/admin.go @@ -0,0 +1,484 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "fmt" + "net/http" + "net/url" + "os" + "runtime" + "strconv" + "strings" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/cron" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/process" + "code.gitea.io/gitea/modules/queue" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/mailer" + + "gitea.com/go-chi/session" +) + +const ( + tplDashboard base.TplName = "admin/dashboard" + tplConfig base.TplName = "admin/config" + tplMonitor base.TplName = "admin/monitor" + tplQueue base.TplName = "admin/queue" +) + +var sysStatus struct { + Uptime string + NumGoroutine int + + // General statistics. + MemAllocated string // bytes allocated and still in use + MemTotal string // bytes allocated (even if freed) + MemSys string // bytes obtained from system (sum of XxxSys below) + Lookups uint64 // number of pointer lookups + MemMallocs uint64 // number of mallocs + MemFrees uint64 // number of frees + + // Main allocation heap statistics. + HeapAlloc string // bytes allocated and still in use + HeapSys string // bytes obtained from system + HeapIdle string // bytes in idle spans + HeapInuse string // bytes in non-idle span + HeapReleased string // bytes released to the OS + HeapObjects uint64 // total number of allocated objects + + // Low-level fixed-size structure allocator statistics. + // Inuse is bytes used now. + // Sys is bytes obtained from system. + StackInuse string // bootstrap stacks + StackSys string + MSpanInuse string // mspan structures + MSpanSys string + MCacheInuse string // mcache structures + MCacheSys string + BuckHashSys string // profiling bucket hash table + GCSys string // GC metadata + OtherSys string // other system allocations + + // Garbage collector statistics. + NextGC string // next run in HeapAlloc time (bytes) + LastGC string // last run in absolute time (ns) + PauseTotalNs string + PauseNs string // circular buffer of recent GC pause times, most recent at [(NumGC+255)%256] + NumGC uint32 +} + +func updateSystemStatus() { + sysStatus.Uptime = timeutil.TimeSincePro(setting.AppStartTime, "en") + + m := new(runtime.MemStats) + runtime.ReadMemStats(m) + sysStatus.NumGoroutine = runtime.NumGoroutine() + + sysStatus.MemAllocated = base.FileSize(int64(m.Alloc)) + sysStatus.MemTotal = base.FileSize(int64(m.TotalAlloc)) + sysStatus.MemSys = base.FileSize(int64(m.Sys)) + sysStatus.Lookups = m.Lookups + sysStatus.MemMallocs = m.Mallocs + sysStatus.MemFrees = m.Frees + + sysStatus.HeapAlloc = base.FileSize(int64(m.HeapAlloc)) + sysStatus.HeapSys = base.FileSize(int64(m.HeapSys)) + sysStatus.HeapIdle = base.FileSize(int64(m.HeapIdle)) + sysStatus.HeapInuse = base.FileSize(int64(m.HeapInuse)) + sysStatus.HeapReleased = base.FileSize(int64(m.HeapReleased)) + sysStatus.HeapObjects = m.HeapObjects + + sysStatus.StackInuse = base.FileSize(int64(m.StackInuse)) + sysStatus.StackSys = base.FileSize(int64(m.StackSys)) + sysStatus.MSpanInuse = base.FileSize(int64(m.MSpanInuse)) + sysStatus.MSpanSys = base.FileSize(int64(m.MSpanSys)) + sysStatus.MCacheInuse = base.FileSize(int64(m.MCacheInuse)) + sysStatus.MCacheSys = base.FileSize(int64(m.MCacheSys)) + sysStatus.BuckHashSys = base.FileSize(int64(m.BuckHashSys)) + sysStatus.GCSys = base.FileSize(int64(m.GCSys)) + sysStatus.OtherSys = base.FileSize(int64(m.OtherSys)) + + sysStatus.NextGC = base.FileSize(int64(m.NextGC)) + sysStatus.LastGC = fmt.Sprintf("%.1fs", float64(time.Now().UnixNano()-int64(m.LastGC))/1000/1000/1000) + sysStatus.PauseTotalNs = fmt.Sprintf("%.1fs", float64(m.PauseTotalNs)/1000/1000/1000) + sysStatus.PauseNs = fmt.Sprintf("%.3fs", float64(m.PauseNs[(m.NumGC+255)%256])/1000/1000/1000) + sysStatus.NumGC = m.NumGC +} + +// Dashboard show admin panel dashboard +func Dashboard(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.dashboard") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminDashboard"] = true + ctx.Data["Stats"] = models.GetStatistic() + // FIXME: update periodically + updateSystemStatus() + ctx.Data["SysStatus"] = sysStatus + ctx.Data["SSH"] = setting.SSH + ctx.HTML(http.StatusOK, tplDashboard) +} + +// DashboardPost run an admin operation +func DashboardPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AdminDashboardForm) + ctx.Data["Title"] = ctx.Tr("admin.dashboard") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminDashboard"] = true + ctx.Data["Stats"] = models.GetStatistic() + updateSystemStatus() + ctx.Data["SysStatus"] = sysStatus + + // Run operation. + if form.Op != "" { + task := cron.GetTask(form.Op) + if task != nil { + go task.RunWithUser(ctx.User, nil) + ctx.Flash.Success(ctx.Tr("admin.dashboard.task.started", ctx.Tr("admin.dashboard."+form.Op))) + } else { + ctx.Flash.Error(ctx.Tr("admin.dashboard.task.unknown", form.Op)) + } + } + if form.From == "monitor" { + ctx.Redirect(setting.AppSubURL + "/admin/monitor") + } else { + ctx.Redirect(setting.AppSubURL + "/admin") + } +} + +// SendTestMail send test mail to confirm mail service is OK +func SendTestMail(ctx *context.Context) { + email := ctx.FormString("email") + // Send a test email to the user's email address and redirect back to Config + if err := mailer.SendTestMail(email); err != nil { + ctx.Flash.Error(ctx.Tr("admin.config.test_mail_failed", email, err)) + } else { + ctx.Flash.Info(ctx.Tr("admin.config.test_mail_sent", email)) + } + + ctx.Redirect(setting.AppSubURL + "/admin/config") +} + +func shadowPasswordKV(cfgItem, splitter string) string { + fields := strings.Split(cfgItem, splitter) + for i := 0; i < len(fields); i++ { + if strings.HasPrefix(fields[i], "password=") { + fields[i] = "password=******" + break + } + } + return strings.Join(fields, splitter) +} + +func shadowURL(provider, cfgItem string) string { + u, err := url.Parse(cfgItem) + if err != nil { + log.Error("Shadowing Password for %v failed: %v", provider, err) + return cfgItem + } + if u.User != nil { + atIdx := strings.Index(cfgItem, "@") + if atIdx > 0 { + colonIdx := strings.LastIndex(cfgItem[:atIdx], ":") + if colonIdx > 0 { + return cfgItem[:colonIdx+1] + "******" + cfgItem[atIdx:] + } + } + } + return cfgItem +} + +func shadowPassword(provider, cfgItem string) string { + switch provider { + case "redis": + return shadowPasswordKV(cfgItem, ",") + case "mysql": + //root:@tcp(localhost:3306)/macaron?charset=utf8 + atIdx := strings.Index(cfgItem, "@") + if atIdx > 0 { + colonIdx := strings.Index(cfgItem[:atIdx], ":") + if colonIdx > 0 { + return cfgItem[:colonIdx+1] + "******" + cfgItem[atIdx:] + } + } + return cfgItem + case "postgres": + // user=jiahuachen dbname=macaron port=5432 sslmode=disable + if !strings.HasPrefix(cfgItem, "postgres://") { + return shadowPasswordKV(cfgItem, " ") + } + fallthrough + case "couchbase": + return shadowURL(provider, cfgItem) + // postgres://pqgotest:password@localhost/pqgotest?sslmode=verify-full + // Notice: use shadowURL + } + return cfgItem +} + +// Config show admin config page +func Config(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.config") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminConfig"] = true + + ctx.Data["CustomConf"] = setting.CustomConf + ctx.Data["AppUrl"] = setting.AppURL + ctx.Data["Domain"] = setting.Domain + ctx.Data["OfflineMode"] = setting.OfflineMode + ctx.Data["DisableRouterLog"] = setting.DisableRouterLog + ctx.Data["RunUser"] = setting.RunUser + ctx.Data["RunMode"] = strings.Title(setting.RunMode) + if version, err := git.LocalVersion(); err == nil { + ctx.Data["GitVersion"] = version.Original() + } + ctx.Data["RepoRootPath"] = setting.RepoRootPath + ctx.Data["CustomRootPath"] = setting.CustomPath + ctx.Data["StaticRootPath"] = setting.StaticRootPath + ctx.Data["LogRootPath"] = setting.LogRootPath + ctx.Data["ScriptType"] = setting.ScriptType + ctx.Data["ReverseProxyAuthUser"] = setting.ReverseProxyAuthUser + ctx.Data["ReverseProxyAuthEmail"] = setting.ReverseProxyAuthEmail + + ctx.Data["SSH"] = setting.SSH + ctx.Data["LFS"] = setting.LFS + + ctx.Data["Service"] = setting.Service + ctx.Data["DbCfg"] = setting.Database + ctx.Data["Webhook"] = setting.Webhook + + ctx.Data["MailerEnabled"] = false + if setting.MailService != nil { + ctx.Data["MailerEnabled"] = true + ctx.Data["Mailer"] = setting.MailService + } + + ctx.Data["CacheAdapter"] = setting.CacheService.Adapter + ctx.Data["CacheInterval"] = setting.CacheService.Interval + + ctx.Data["CacheConn"] = shadowPassword(setting.CacheService.Adapter, setting.CacheService.Conn) + ctx.Data["CacheItemTTL"] = setting.CacheService.TTL + + sessionCfg := setting.SessionConfig + if sessionCfg.Provider == "VirtualSession" { + var realSession session.Options + if err := json.Unmarshal([]byte(sessionCfg.ProviderConfig), &realSession); err != nil { + log.Error("Unable to unmarshall session config for virtualed provider config: %s\nError: %v", sessionCfg.ProviderConfig, err) + } + sessionCfg.Provider = realSession.Provider + sessionCfg.ProviderConfig = realSession.ProviderConfig + sessionCfg.CookieName = realSession.CookieName + sessionCfg.CookiePath = realSession.CookiePath + sessionCfg.Gclifetime = realSession.Gclifetime + sessionCfg.Maxlifetime = realSession.Maxlifetime + sessionCfg.Secure = realSession.Secure + sessionCfg.Domain = realSession.Domain + } + sessionCfg.ProviderConfig = shadowPassword(sessionCfg.Provider, sessionCfg.ProviderConfig) + ctx.Data["SessionConfig"] = sessionCfg + + ctx.Data["DisableGravatar"] = setting.DisableGravatar + ctx.Data["EnableFederatedAvatar"] = setting.EnableFederatedAvatar + + ctx.Data["Git"] = setting.Git + + type envVar struct { + Name, Value string + } + + envVars := map[string]*envVar{} + if len(os.Getenv("GITEA_WORK_DIR")) > 0 { + envVars["GITEA_WORK_DIR"] = &envVar{"GITEA_WORK_DIR", os.Getenv("GITEA_WORK_DIR")} + } + if len(os.Getenv("GITEA_CUSTOM")) > 0 { + envVars["GITEA_CUSTOM"] = &envVar{"GITEA_CUSTOM", os.Getenv("GITEA_CUSTOM")} + } + + ctx.Data["EnvVars"] = envVars + ctx.Data["Loggers"] = setting.GetLogDescriptions() + ctx.Data["EnableAccessLog"] = setting.EnableAccessLog + ctx.Data["AccessLogTemplate"] = setting.AccessLogTemplate + ctx.Data["DisableRouterLog"] = setting.DisableRouterLog + ctx.Data["EnableXORMLog"] = setting.EnableXORMLog + ctx.Data["LogSQL"] = setting.Database.LogSQL + + ctx.HTML(http.StatusOK, tplConfig) +} + +// Monitor show admin monitor page +func Monitor(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.monitor") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminMonitor"] = true + ctx.Data["Processes"] = process.GetManager().Processes() + ctx.Data["Entries"] = cron.ListTasks() + ctx.Data["Queues"] = queue.GetManager().ManagedQueues() + ctx.HTML(http.StatusOK, tplMonitor) +} + +// MonitorCancel cancels a process +func MonitorCancel(ctx *context.Context) { + pid := ctx.ParamsInt64("pid") + process.GetManager().Cancel(pid) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/monitor", + }) +} + +// Queue shows details for a specific queue +func Queue(ctx *context.Context) { + qid := ctx.ParamsInt64("qid") + mq := queue.GetManager().GetManagedQueue(qid) + if mq == nil { + ctx.Status(404) + return + } + ctx.Data["Title"] = ctx.Tr("admin.monitor.queue", mq.Name) + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminMonitor"] = true + ctx.Data["Queue"] = mq + ctx.HTML(http.StatusOK, tplQueue) +} + +// WorkerCancel cancels a worker group +func WorkerCancel(ctx *context.Context) { + qid := ctx.ParamsInt64("qid") + mq := queue.GetManager().GetManagedQueue(qid) + if mq == nil { + ctx.Status(404) + return + } + pid := ctx.ParamsInt64("pid") + mq.CancelWorkers(pid) + ctx.Flash.Info(ctx.Tr("admin.monitor.queue.pool.cancelling")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10), + }) +} + +// Flush flushes a queue +func Flush(ctx *context.Context) { + qid := ctx.ParamsInt64("qid") + mq := queue.GetManager().GetManagedQueue(qid) + if mq == nil { + ctx.Status(404) + return + } + timeout, err := time.ParseDuration(ctx.FormString("timeout")) + if err != nil { + timeout = -1 + } + ctx.Flash.Info(ctx.Tr("admin.monitor.queue.pool.flush.added", mq.Name)) + go func() { + err := mq.Flush(timeout) + if err != nil { + log.Error("Flushing failure for %s: Error %v", mq.Name, err) + } + }() + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) +} + +// AddWorkers adds workers to a worker group +func AddWorkers(ctx *context.Context) { + qid := ctx.ParamsInt64("qid") + mq := queue.GetManager().GetManagedQueue(qid) + if mq == nil { + ctx.Status(404) + return + } + number := ctx.FormInt("number") + if number < 1 { + ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.addworkers.mustnumbergreaterzero")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) + return + } + timeout, err := time.ParseDuration(ctx.FormString("timeout")) + if err != nil { + ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.addworkers.musttimeoutduration")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) + return + } + if _, ok := mq.Managed.(queue.ManagedPool); !ok { + ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.none")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) + return + } + mq.AddWorkers(number, timeout) + ctx.Flash.Success(ctx.Tr("admin.monitor.queue.pool.added")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) +} + +// SetQueueSettings sets the maximum number of workers and other settings for this queue +func SetQueueSettings(ctx *context.Context) { + qid := ctx.ParamsInt64("qid") + mq := queue.GetManager().GetManagedQueue(qid) + if mq == nil { + ctx.Status(404) + return + } + if _, ok := mq.Managed.(queue.ManagedPool); !ok { + ctx.Flash.Error(ctx.Tr("admin.monitor.queue.pool.none")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) + return + } + + maxNumberStr := ctx.FormString("max-number") + numberStr := ctx.FormString("number") + timeoutStr := ctx.FormString("timeout") + + var err error + var maxNumber, number int + var timeout time.Duration + if len(maxNumberStr) > 0 { + maxNumber, err = strconv.Atoi(maxNumberStr) + if err != nil { + ctx.Flash.Error(ctx.Tr("admin.monitor.queue.settings.maxnumberworkers.error")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) + return + } + if maxNumber < -1 { + maxNumber = -1 + } + } else { + maxNumber = mq.MaxNumberOfWorkers() + } + + if len(numberStr) > 0 { + number, err = strconv.Atoi(numberStr) + if err != nil || number < 0 { + ctx.Flash.Error(ctx.Tr("admin.monitor.queue.settings.numberworkers.error")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) + return + } + } else { + number = mq.BoostWorkers() + } + + if len(timeoutStr) > 0 { + timeout, err = time.ParseDuration(timeoutStr) + if err != nil { + ctx.Flash.Error(ctx.Tr("admin.monitor.queue.settings.timeout.error")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) + return + } + } else { + timeout = mq.BoostTimeout() + } + + mq.SetPoolSettings(maxNumber, number, timeout) + ctx.Flash.Success(ctx.Tr("admin.monitor.queue.settings.changed")) + ctx.Redirect(setting.AppSubURL + "/admin/monitor/queue/" + strconv.FormatInt(qid, 10)) +} diff --git a/routers/admin/admin_test.go b/routers/web/admin/admin_test.go similarity index 100% rename from routers/admin/admin_test.go rename to routers/web/admin/admin_test.go diff --git a/routers/web/admin/auths.go b/routers/web/admin/auths.go new file mode 100644 index 000000000..342318e04 --- /dev/null +++ b/routers/web/admin/auths.go @@ -0,0 +1,421 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "errors" + "fmt" + "net/http" + "regexp" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/auth/pam" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/auth/source/ldap" + "code.gitea.io/gitea/services/auth/source/oauth2" + pamService "code.gitea.io/gitea/services/auth/source/pam" + "code.gitea.io/gitea/services/auth/source/smtp" + "code.gitea.io/gitea/services/auth/source/sspi" + "code.gitea.io/gitea/services/forms" + + "xorm.io/xorm/convert" +) + +const ( + tplAuths base.TplName = "admin/auth/list" + tplAuthNew base.TplName = "admin/auth/new" + tplAuthEdit base.TplName = "admin/auth/edit" +) + +var ( + separatorAntiPattern = regexp.MustCompile(`[^\w-\.]`) + langCodePattern = regexp.MustCompile(`^[a-z]{2}-[A-Z]{2}$`) +) + +// Authentications show authentication config page +func Authentications(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.authentication") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminAuthentications"] = true + + var err error + ctx.Data["Sources"], err = models.LoginSources() + if err != nil { + ctx.ServerError("LoginSources", err) + return + } + + ctx.Data["Total"] = models.CountLoginSources() + ctx.HTML(http.StatusOK, tplAuths) +} + +type dropdownItem struct { + Name string + Type interface{} +} + +var ( + authSources = func() []dropdownItem { + items := []dropdownItem{ + {models.LoginNames[models.LoginLDAP], models.LoginLDAP}, + {models.LoginNames[models.LoginDLDAP], models.LoginDLDAP}, + {models.LoginNames[models.LoginSMTP], models.LoginSMTP}, + {models.LoginNames[models.LoginOAuth2], models.LoginOAuth2}, + {models.LoginNames[models.LoginSSPI], models.LoginSSPI}, + } + if pam.Supported { + items = append(items, dropdownItem{models.LoginNames[models.LoginPAM], models.LoginPAM}) + } + return items + }() + + securityProtocols = []dropdownItem{ + {ldap.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted], ldap.SecurityProtocolUnencrypted}, + {ldap.SecurityProtocolNames[ldap.SecurityProtocolLDAPS], ldap.SecurityProtocolLDAPS}, + {ldap.SecurityProtocolNames[ldap.SecurityProtocolStartTLS], ldap.SecurityProtocolStartTLS}, + } +) + +// NewAuthSource render adding a new auth source page +func NewAuthSource(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.auths.new") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminAuthentications"] = true + + ctx.Data["type"] = models.LoginLDAP + ctx.Data["CurrentTypeName"] = models.LoginNames[models.LoginLDAP] + ctx.Data["CurrentSecurityProtocol"] = ldap.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted] + ctx.Data["smtp_auth"] = "PLAIN" + ctx.Data["is_active"] = true + ctx.Data["is_sync_enabled"] = true + ctx.Data["AuthSources"] = authSources + ctx.Data["SecurityProtocols"] = securityProtocols + ctx.Data["SMTPAuths"] = smtp.Authenticators + oauth2providers := oauth2.GetOAuth2Providers() + ctx.Data["OAuth2Providers"] = oauth2providers + + ctx.Data["SSPIAutoCreateUsers"] = true + ctx.Data["SSPIAutoActivateUsers"] = true + ctx.Data["SSPIStripDomainNames"] = true + ctx.Data["SSPISeparatorReplacement"] = "_" + ctx.Data["SSPIDefaultLanguage"] = "" + + // only the first as default + ctx.Data["oauth2_provider"] = oauth2providers[0] + + ctx.HTML(http.StatusOK, tplAuthNew) +} + +func parseLDAPConfig(form forms.AuthenticationForm) *ldap.Source { + var pageSize uint32 + if form.UsePagedSearch { + pageSize = uint32(form.SearchPageSize) + } + return &ldap.Source{ + Name: form.Name, + Host: form.Host, + Port: form.Port, + SecurityProtocol: ldap.SecurityProtocol(form.SecurityProtocol), + SkipVerify: form.SkipVerify, + BindDN: form.BindDN, + UserDN: form.UserDN, + BindPassword: form.BindPassword, + UserBase: form.UserBase, + AttributeUsername: form.AttributeUsername, + AttributeName: form.AttributeName, + AttributeSurname: form.AttributeSurname, + AttributeMail: form.AttributeMail, + AttributesInBind: form.AttributesInBind, + AttributeSSHPublicKey: form.AttributeSSHPublicKey, + SearchPageSize: pageSize, + Filter: form.Filter, + GroupsEnabled: form.GroupsEnabled, + GroupDN: form.GroupDN, + GroupFilter: form.GroupFilter, + GroupMemberUID: form.GroupMemberUID, + UserUID: form.UserUID, + AdminFilter: form.AdminFilter, + RestrictedFilter: form.RestrictedFilter, + AllowDeactivateAll: form.AllowDeactivateAll, + Enabled: true, + } +} + +func parseSMTPConfig(form forms.AuthenticationForm) *smtp.Source { + return &smtp.Source{ + Auth: form.SMTPAuth, + Host: form.SMTPHost, + Port: form.SMTPPort, + AllowedDomains: form.AllowedDomains, + ForceSMTPS: form.ForceSMTPS, + SkipVerify: form.SkipVerify, + HeloHostname: form.HeloHostname, + DisableHelo: form.DisableHelo, + } +} + +func parseOAuth2Config(form forms.AuthenticationForm) *oauth2.Source { + var customURLMapping *oauth2.CustomURLMapping + if form.Oauth2UseCustomURL { + customURLMapping = &oauth2.CustomURLMapping{ + TokenURL: form.Oauth2TokenURL, + AuthURL: form.Oauth2AuthURL, + ProfileURL: form.Oauth2ProfileURL, + EmailURL: form.Oauth2EmailURL, + Tenant: form.Oauth2Tenant, + } + } else { + customURLMapping = nil + } + return &oauth2.Source{ + Provider: form.Oauth2Provider, + ClientID: form.Oauth2Key, + ClientSecret: form.Oauth2Secret, + OpenIDConnectAutoDiscoveryURL: form.OpenIDConnectAutoDiscoveryURL, + CustomURLMapping: customURLMapping, + IconURL: form.Oauth2IconURL, + } +} + +func parseSSPIConfig(ctx *context.Context, form forms.AuthenticationForm) (*sspi.Source, error) { + if util.IsEmptyString(form.SSPISeparatorReplacement) { + ctx.Data["Err_SSPISeparatorReplacement"] = true + return nil, errors.New(ctx.Tr("form.SSPISeparatorReplacement") + ctx.Tr("form.require_error")) + } + if separatorAntiPattern.MatchString(form.SSPISeparatorReplacement) { + ctx.Data["Err_SSPISeparatorReplacement"] = true + return nil, errors.New(ctx.Tr("form.SSPISeparatorReplacement") + ctx.Tr("form.alpha_dash_dot_error")) + } + + if form.SSPIDefaultLanguage != "" && !langCodePattern.MatchString(form.SSPIDefaultLanguage) { + ctx.Data["Err_SSPIDefaultLanguage"] = true + return nil, errors.New(ctx.Tr("form.lang_select_error")) + } + + return &sspi.Source{ + AutoCreateUsers: form.SSPIAutoCreateUsers, + AutoActivateUsers: form.SSPIAutoActivateUsers, + StripDomainNames: form.SSPIStripDomainNames, + SeparatorReplacement: form.SSPISeparatorReplacement, + DefaultLanguage: form.SSPIDefaultLanguage, + }, nil +} + +// NewAuthSourcePost response for adding an auth source +func NewAuthSourcePost(ctx *context.Context) { + form := *web.GetForm(ctx).(*forms.AuthenticationForm) + ctx.Data["Title"] = ctx.Tr("admin.auths.new") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminAuthentications"] = true + + ctx.Data["CurrentTypeName"] = models.LoginNames[models.LoginType(form.Type)] + ctx.Data["CurrentSecurityProtocol"] = ldap.SecurityProtocolNames[ldap.SecurityProtocol(form.SecurityProtocol)] + ctx.Data["AuthSources"] = authSources + ctx.Data["SecurityProtocols"] = securityProtocols + ctx.Data["SMTPAuths"] = smtp.Authenticators + oauth2providers := oauth2.GetOAuth2Providers() + ctx.Data["OAuth2Providers"] = oauth2providers + + ctx.Data["SSPIAutoCreateUsers"] = true + ctx.Data["SSPIAutoActivateUsers"] = true + ctx.Data["SSPIStripDomainNames"] = true + ctx.Data["SSPISeparatorReplacement"] = "_" + ctx.Data["SSPIDefaultLanguage"] = "" + + hasTLS := false + var config convert.Conversion + switch models.LoginType(form.Type) { + case models.LoginLDAP, models.LoginDLDAP: + config = parseLDAPConfig(form) + hasTLS = ldap.SecurityProtocol(form.SecurityProtocol) > ldap.SecurityProtocolUnencrypted + case models.LoginSMTP: + config = parseSMTPConfig(form) + hasTLS = true + case models.LoginPAM: + config = &pamService.Source{ + ServiceName: form.PAMServiceName, + EmailDomain: form.PAMEmailDomain, + } + case models.LoginOAuth2: + config = parseOAuth2Config(form) + case models.LoginSSPI: + var err error + config, err = parseSSPIConfig(ctx, form) + if err != nil { + ctx.RenderWithErr(err.Error(), tplAuthNew, form) + return + } + existing, err := models.LoginSourcesByType(models.LoginSSPI) + if err != nil || len(existing) > 0 { + ctx.Data["Err_Type"] = true + ctx.RenderWithErr(ctx.Tr("admin.auths.login_source_of_type_exist"), tplAuthNew, form) + return + } + default: + ctx.Error(http.StatusBadRequest) + return + } + ctx.Data["HasTLS"] = hasTLS + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplAuthNew) + return + } + + if err := models.CreateLoginSource(&models.LoginSource{ + Type: models.LoginType(form.Type), + Name: form.Name, + IsActive: form.IsActive, + IsSyncEnabled: form.IsSyncEnabled, + Cfg: config, + }); err != nil { + if models.IsErrLoginSourceAlreadyExist(err) { + ctx.Data["Err_Name"] = true + ctx.RenderWithErr(ctx.Tr("admin.auths.login_source_exist", err.(models.ErrLoginSourceAlreadyExist).Name), tplAuthNew, form) + } else { + ctx.ServerError("CreateSource", err) + } + return + } + + log.Trace("Authentication created by admin(%s): %s", ctx.User.Name, form.Name) + + ctx.Flash.Success(ctx.Tr("admin.auths.new_success", form.Name)) + ctx.Redirect(setting.AppSubURL + "/admin/auths") +} + +// EditAuthSource render editing auth source page +func EditAuthSource(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.auths.edit") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminAuthentications"] = true + + ctx.Data["SecurityProtocols"] = securityProtocols + ctx.Data["SMTPAuths"] = smtp.Authenticators + oauth2providers := oauth2.GetOAuth2Providers() + ctx.Data["OAuth2Providers"] = oauth2providers + + source, err := models.GetLoginSourceByID(ctx.ParamsInt64(":authid")) + if err != nil { + ctx.ServerError("GetLoginSourceByID", err) + return + } + ctx.Data["Source"] = source + ctx.Data["HasTLS"] = source.HasTLS() + + if source.IsOAuth2() { + type Named interface { + Name() string + } + + for _, provider := range oauth2providers { + if provider.Name() == source.Cfg.(Named).Name() { + ctx.Data["CurrentOAuth2Provider"] = provider + break + } + } + + } + ctx.HTML(http.StatusOK, tplAuthEdit) +} + +// EditAuthSourcePost response for editing auth source +func EditAuthSourcePost(ctx *context.Context) { + form := *web.GetForm(ctx).(*forms.AuthenticationForm) + ctx.Data["Title"] = ctx.Tr("admin.auths.edit") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminAuthentications"] = true + + ctx.Data["SMTPAuths"] = smtp.Authenticators + oauth2providers := oauth2.GetOAuth2Providers() + ctx.Data["OAuth2Providers"] = oauth2providers + + source, err := models.GetLoginSourceByID(ctx.ParamsInt64(":authid")) + if err != nil { + ctx.ServerError("GetLoginSourceByID", err) + return + } + ctx.Data["Source"] = source + ctx.Data["HasTLS"] = source.HasTLS() + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplAuthEdit) + return + } + + var config convert.Conversion + switch models.LoginType(form.Type) { + case models.LoginLDAP, models.LoginDLDAP: + config = parseLDAPConfig(form) + case models.LoginSMTP: + config = parseSMTPConfig(form) + case models.LoginPAM: + config = &pamService.Source{ + ServiceName: form.PAMServiceName, + EmailDomain: form.PAMEmailDomain, + } + case models.LoginOAuth2: + config = parseOAuth2Config(form) + case models.LoginSSPI: + config, err = parseSSPIConfig(ctx, form) + if err != nil { + ctx.RenderWithErr(err.Error(), tplAuthEdit, form) + return + } + default: + ctx.Error(http.StatusBadRequest) + return + } + + source.Name = form.Name + source.IsActive = form.IsActive + source.IsSyncEnabled = form.IsSyncEnabled + source.Cfg = config + if err := models.UpdateSource(source); err != nil { + if models.IsErrOpenIDConnectInitialize(err) { + ctx.Flash.Error(err.Error(), true) + ctx.HTML(http.StatusOK, tplAuthEdit) + } else { + ctx.ServerError("UpdateSource", err) + } + return + } + log.Trace("Authentication changed by admin(%s): %d", ctx.User.Name, source.ID) + + ctx.Flash.Success(ctx.Tr("admin.auths.update_success")) + ctx.Redirect(setting.AppSubURL + "/admin/auths/" + fmt.Sprint(form.ID)) +} + +// DeleteAuthSource response for deleting an auth source +func DeleteAuthSource(ctx *context.Context) { + source, err := models.GetLoginSourceByID(ctx.ParamsInt64(":authid")) + if err != nil { + ctx.ServerError("GetLoginSourceByID", err) + return + } + + if err = models.DeleteSource(source); err != nil { + if models.IsErrLoginSourceInUse(err) { + ctx.Flash.Error(ctx.Tr("admin.auths.still_in_used")) + } else { + ctx.Flash.Error(fmt.Sprintf("DeleteSource: %v", err)) + } + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/auths/" + ctx.Params(":authid"), + }) + return + } + log.Trace("Authentication deleted by admin(%s): %d", ctx.User.Name, source.ID) + + ctx.Flash.Success(ctx.Tr("admin.auths.deletion_success")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/auths", + }) +} diff --git a/routers/admin/emails.go b/routers/web/admin/emails.go similarity index 76% rename from routers/admin/emails.go rename to routers/web/admin/emails.go index 4cc7253ca..017d696e2 100644 --- a/routers/admin/emails.go +++ b/routers/web/admin/emails.go @@ -6,6 +6,7 @@ package admin import ( "bytes" + "net/http" "net/url" "code.gitea.io/gitea/models" @@ -29,7 +30,7 @@ func Emails(ctx *context.Context) { opts := &models.SearchEmailOptions{ ListOptions: models.ListOptions{ PageSize: setting.UI.Admin.UserPagingNum, - Page: ctx.QueryInt("page"), + Page: ctx.FormInt("page"), }, } @@ -50,8 +51,8 @@ func Emails(ctx *context.Context) { orderBy models.SearchEmailOrderBy ) - ctx.Data["SortType"] = ctx.Query("sort") - switch ctx.Query("sort") { + ctx.Data["SortType"] = ctx.FormString("sort") + switch ctx.FormString("sort") { case "email": orderBy = models.SearchEmailOrderByEmail case "reverseemail": @@ -65,13 +66,13 @@ func Emails(ctx *context.Context) { orderBy = models.SearchEmailOrderByEmail } - opts.Keyword = ctx.QueryTrim("q") + opts.Keyword = ctx.FormTrim("q") opts.SortType = orderBy - if len(ctx.Query("is_activated")) != 0 { - opts.IsActivated = util.OptionalBoolOf(ctx.QueryBool("activated")) + if len(ctx.FormString("is_activated")) != 0 { + opts.IsActivated = util.OptionalBoolOf(ctx.FormBool("activated")) } - if len(ctx.Query("is_primary")) != 0 { - opts.IsPrimary = util.OptionalBoolOf(ctx.QueryBool("primary")) + if len(ctx.FormString("is_primary")) != 0 { + opts.IsPrimary = util.OptionalBoolOf(ctx.FormBool("primary")) } if len(opts.Keyword) == 0 || isKeywordValid(opts.Keyword) { @@ -96,7 +97,7 @@ func Emails(ctx *context.Context) { pager.SetDefaultParams(ctx) ctx.Data["Page"] = pager - ctx.HTML(200, tplEmails) + ctx.HTML(http.StatusOK, tplEmails) } var ( @@ -112,20 +113,20 @@ func ActivateEmail(ctx *context.Context) { truefalse := map[string]bool{"1": true, "0": false} - uid := ctx.QueryInt64("uid") - email := ctx.Query("email") - primary, okp := truefalse[ctx.Query("primary")] - activate, oka := truefalse[ctx.Query("activate")] + uid := ctx.FormInt64("uid") + email := ctx.FormString("email") + primary, okp := truefalse[ctx.FormString("primary")] + activate, oka := truefalse[ctx.FormString("activate")] if uid == 0 || len(email) == 0 || !okp || !oka { - ctx.Error(400) + ctx.Error(http.StatusBadRequest) return } log.Info("Changing activation for User ID: %d, email: %s, primary: %v to %v", uid, email, primary, activate) - if err := models.ActivateUserEmail(uid, email, primary, activate); err != nil { - log.Error("ActivateUserEmail(%v,%v,%v,%v): %v", uid, email, primary, activate, err) + if err := models.ActivateUserEmail(uid, email, activate); err != nil { + log.Error("ActivateUserEmail(%v,%v,%v): %v", uid, email, activate, err) if models.IsErrEmailAlreadyUsed(err) { ctx.Flash.Error(ctx.Tr("admin.emails.duplicate_active")) } else { @@ -138,16 +139,16 @@ func ActivateEmail(ctx *context.Context) { redirect, _ := url.Parse(setting.AppSubURL + "/admin/emails") q := url.Values{} - if val := ctx.QueryTrim("q"); len(val) > 0 { + if val := ctx.FormTrim("q"); len(val) > 0 { q.Set("q", val) } - if val := ctx.QueryTrim("sort"); len(val) > 0 { + if val := ctx.FormTrim("sort"); len(val) > 0 { q.Set("sort", val) } - if val := ctx.QueryTrim("is_primary"); len(val) > 0 { + if val := ctx.FormTrim("is_primary"); len(val) > 0 { q.Set("is_primary", val) } - if val := ctx.QueryTrim("is_activated"); len(val) > 0 { + if val := ctx.FormTrim("is_activated"); len(val) > 0 { q.Set("is_activated", val) } redirect.RawQuery = q.Encode() diff --git a/routers/web/admin/hooks.go b/routers/web/admin/hooks.go new file mode 100644 index 000000000..13daa9ac9 --- /dev/null +++ b/routers/web/admin/hooks.go @@ -0,0 +1,72 @@ +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" +) + +const ( + // tplAdminHooks template path to render hook settings + tplAdminHooks base.TplName = "admin/hooks" +) + +// DefaultOrSystemWebhooks renders both admin default and system webhook list pages +func DefaultOrSystemWebhooks(ctx *context.Context) { + var err error + + ctx.Data["PageIsAdminSystemHooks"] = true + ctx.Data["PageIsAdminDefaultHooks"] = true + + def := make(map[string]interface{}, len(ctx.Data)) + sys := make(map[string]interface{}, len(ctx.Data)) + for k, v := range ctx.Data { + def[k] = v + sys[k] = v + } + + sys["Title"] = ctx.Tr("admin.systemhooks") + sys["Description"] = ctx.Tr("admin.systemhooks.desc") + sys["Webhooks"], err = models.GetSystemWebhooks() + sys["BaseLink"] = setting.AppSubURL + "/admin/hooks" + sys["BaseLinkNew"] = setting.AppSubURL + "/admin/system-hooks" + if err != nil { + ctx.ServerError("GetWebhooksAdmin", err) + return + } + + def["Title"] = ctx.Tr("admin.defaulthooks") + def["Description"] = ctx.Tr("admin.defaulthooks.desc") + def["Webhooks"], err = models.GetDefaultWebhooks() + def["BaseLink"] = setting.AppSubURL + "/admin/hooks" + def["BaseLinkNew"] = setting.AppSubURL + "/admin/default-hooks" + if err != nil { + ctx.ServerError("GetWebhooksAdmin", err) + return + } + + ctx.Data["DefaultWebhooks"] = def + ctx.Data["SystemWebhooks"] = sys + + ctx.HTML(http.StatusOK, tplAdminHooks) +} + +// DeleteDefaultOrSystemWebhook handler to delete an admin-defined system or default webhook +func DeleteDefaultOrSystemWebhook(ctx *context.Context) { + if err := models.DeleteDefaultSystemWebhook(ctx.FormInt64("id")); err != nil { + ctx.Flash.Error("DeleteDefaultWebhook: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success")) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/hooks", + }) +} diff --git a/routers/web/admin/main_test.go b/routers/web/admin/main_test.go new file mode 100644 index 000000000..352907c73 --- /dev/null +++ b/routers/web/admin/main_test.go @@ -0,0 +1,16 @@ +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "path/filepath" + "testing" + + "code.gitea.io/gitea/models" +) + +func TestMain(m *testing.M) { + models.MainTest(m, filepath.Join("..", "..", "..")) +} diff --git a/routers/admin/notice.go b/routers/web/admin/notice.go similarity index 94% rename from routers/admin/notice.go rename to routers/web/admin/notice.go index 2ee1b5973..fab3aba53 100644 --- a/routers/admin/notice.go +++ b/routers/web/admin/notice.go @@ -6,6 +6,7 @@ package admin import ( + "net/http" "strconv" "code.gitea.io/gitea/models" @@ -26,7 +27,7 @@ func Notices(ctx *context.Context) { ctx.Data["PageIsAdminNotices"] = true total := models.CountNotices() - page := ctx.QueryInt("page") + page := ctx.FormInt("page") if page <= 1 { page = 1 } @@ -42,12 +43,12 @@ func Notices(ctx *context.Context) { ctx.Data["Page"] = context.NewPagination(int(total), setting.UI.Admin.NoticePagingNum, page, 5) - ctx.HTML(200, tplNotices) + ctx.HTML(http.StatusOK, tplNotices) } // DeleteNotices delete the specific notices func DeleteNotices(ctx *context.Context) { - strs := ctx.QueryStrings("ids[]") + strs := ctx.FormStrings("ids[]") ids := make([]int64, 0, len(strs)) for i := range strs { id, _ := strconv.ParseInt(strs[i], 10, 64) diff --git a/routers/web/admin/orgs.go b/routers/web/admin/orgs.go new file mode 100644 index 000000000..a2b3ed1bc --- /dev/null +++ b/routers/web/admin/orgs.go @@ -0,0 +1,35 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2020 The Gitea Authors. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/routers/web/explore" +) + +const ( + tplOrgs base.TplName = "admin/org/list" +) + +// Organizations show all the organizations +func Organizations(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.organizations") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminOrganizations"] = true + + explore.RenderUserSearch(ctx, &models.SearchUserOptions{ + Actor: ctx.User, + Type: models.UserTypeOrganization, + ListOptions: models.ListOptions{ + PageSize: setting.UI.Admin.OrgPagingNum, + }, + Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate}, + }, tplOrgs) +} diff --git a/routers/web/admin/repos.go b/routers/web/admin/repos.go new file mode 100644 index 000000000..4c3f2ad61 --- /dev/null +++ b/routers/web/admin/repos.go @@ -0,0 +1,165 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "net/http" + "net/url" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/routers/web/explore" + repo_service "code.gitea.io/gitea/services/repository" +) + +const ( + tplRepos base.TplName = "admin/repo/list" + tplUnadoptedRepos base.TplName = "admin/repo/unadopted" +) + +// Repos show all the repositories +func Repos(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.repositories") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminRepositories"] = true + + explore.RenderRepoSearch(ctx, &explore.RepoSearchOptions{ + Private: true, + PageSize: setting.UI.Admin.RepoPagingNum, + TplName: tplRepos, + }) +} + +// DeleteRepo delete one repository +func DeleteRepo(ctx *context.Context) { + repo, err := models.GetRepositoryByID(ctx.FormInt64("id")) + if err != nil { + ctx.ServerError("GetRepositoryByID", err) + return + } + + if ctx.Repo != nil && ctx.Repo.GitRepo != nil && ctx.Repo.Repository != nil && ctx.Repo.Repository.ID == repo.ID { + ctx.Repo.GitRepo.Close() + } + + if err := repo_service.DeleteRepository(ctx.User, repo); err != nil { + ctx.ServerError("DeleteRepository", err) + return + } + log.Trace("Repository deleted: %s", repo.FullName()) + + ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/repos?page=" + ctx.FormString("page") + "&sort=" + ctx.FormString("sort"), + }) +} + +// UnadoptedRepos lists the unadopted repositories +func UnadoptedRepos(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.repositories") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminRepositories"] = true + + opts := models.ListOptions{ + PageSize: setting.UI.Admin.UserPagingNum, + Page: ctx.FormInt("page"), + } + + if opts.Page <= 0 { + opts.Page = 1 + } + + ctx.Data["CurrentPage"] = opts.Page + + doSearch := ctx.FormBool("search") + + ctx.Data["search"] = doSearch + q := ctx.FormString("q") + + if !doSearch { + pager := context.NewPagination(0, opts.PageSize, opts.Page, 5) + pager.SetDefaultParams(ctx) + pager.AddParam(ctx, "search", "search") + ctx.Data["Page"] = pager + ctx.HTML(http.StatusOK, tplUnadoptedRepos) + return + } + + ctx.Data["Keyword"] = q + repoNames, count, err := repository.ListUnadoptedRepositories(q, &opts) + if err != nil { + ctx.ServerError("ListUnadoptedRepositories", err) + } + ctx.Data["Dirs"] = repoNames + pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) + pager.SetDefaultParams(ctx) + pager.AddParam(ctx, "search", "search") + ctx.Data["Page"] = pager + ctx.HTML(http.StatusOK, tplUnadoptedRepos) +} + +// AdoptOrDeleteRepository adopts or deletes a repository +func AdoptOrDeleteRepository(ctx *context.Context) { + dir := ctx.FormString("id") + action := ctx.FormString("action") + page := ctx.FormString("page") + q := ctx.FormString("q") + + dirSplit := strings.SplitN(dir, "/", 2) + if len(dirSplit) != 2 { + ctx.Redirect(setting.AppSubURL + "/admin/repos") + return + } + + ctxUser, err := models.GetUserByName(dirSplit[0]) + if err != nil { + if models.IsErrUserNotExist(err) { + log.Debug("User does not exist: %s", dirSplit[0]) + ctx.Redirect(setting.AppSubURL + "/admin/repos") + return + } + ctx.ServerError("GetUserByName", err) + return + } + + repoName := dirSplit[1] + + // check not a repo + has, err := models.IsRepositoryExist(ctxUser, repoName) + if err != nil { + ctx.ServerError("IsRepositoryExist", err) + return + } + isDir, err := util.IsDir(models.RepoPath(ctxUser.Name, repoName)) + if err != nil { + ctx.ServerError("IsDir", err) + return + } + if has || !isDir { + // Fallthrough to failure mode + } else if action == "adopt" { + if _, err := repository.AdoptRepository(ctx.User, ctxUser, models.CreateRepoOptions{ + Name: dirSplit[1], + IsPrivate: true, + }); err != nil { + ctx.ServerError("repository.AdoptRepository", err) + return + } + ctx.Flash.Success(ctx.Tr("repo.adopt_preexisting_success", dir)) + } else if action == "delete" { + if err := repository.DeleteUnadoptedRepository(ctx.User, ctxUser, dirSplit[1]); err != nil { + ctx.ServerError("repository.AdoptRepository", err) + return + } + ctx.Flash.Success(ctx.Tr("repo.delete_preexisting_success", dir)) + } + ctx.Redirect(setting.AppSubURL + "/admin/repos/unadopted?search=true&q=" + url.QueryEscape(q) + "&page=" + page) +} diff --git a/routers/web/admin/users.go b/routers/web/admin/users.go new file mode 100644 index 000000000..acccc516b --- /dev/null +++ b/routers/web/admin/users.go @@ -0,0 +1,379 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2020 The Gitea Authors. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "fmt" + "net/http" + "strconv" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/password" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/web/explore" + router_user_setting "code.gitea.io/gitea/routers/web/user/setting" + "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/mailer" +) + +const ( + tplUsers base.TplName = "admin/user/list" + tplUserNew base.TplName = "admin/user/new" + tplUserEdit base.TplName = "admin/user/edit" +) + +// Users show all the users +func Users(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.users") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminUsers"] = true + + explore.RenderUserSearch(ctx, &models.SearchUserOptions{ + Actor: ctx.User, + Type: models.UserTypeIndividual, + ListOptions: models.ListOptions{ + PageSize: setting.UI.Admin.UserPagingNum, + }, + SearchByEmail: true, + }, tplUsers) +} + +// NewUser render adding a new user page +func NewUser(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.users.new_account") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminUsers"] = true + ctx.Data["DefaultUserVisibilityMode"] = setting.Service.DefaultUserVisibilityMode + ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice() + + ctx.Data["login_type"] = "0-0" + + sources, err := models.LoginSources() + if err != nil { + ctx.ServerError("LoginSources", err) + return + } + ctx.Data["Sources"] = sources + + ctx.Data["CanSendEmail"] = setting.MailService != nil + ctx.HTML(http.StatusOK, tplUserNew) +} + +// NewUserPost response for adding a new user +func NewUserPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AdminCreateUserForm) + ctx.Data["Title"] = ctx.Tr("admin.users.new_account") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminUsers"] = true + ctx.Data["DefaultUserVisibilityMode"] = setting.Service.DefaultUserVisibilityMode + + sources, err := models.LoginSources() + if err != nil { + ctx.ServerError("LoginSources", err) + return + } + ctx.Data["Sources"] = sources + + ctx.Data["CanSendEmail"] = setting.MailService != nil + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplUserNew) + return + } + + u := &models.User{ + Name: form.UserName, + Email: form.Email, + Passwd: form.Password, + IsActive: true, + LoginType: models.LoginPlain, + } + + if len(form.LoginType) > 0 { + fields := strings.Split(form.LoginType, "-") + if len(fields) == 2 { + lType, _ := strconv.ParseInt(fields[0], 10, 0) + u.LoginType = models.LoginType(lType) + u.LoginSource, _ = strconv.ParseInt(fields[1], 10, 64) + u.LoginName = form.LoginName + } + } + if u.LoginType == models.LoginNoType || u.LoginType == models.LoginPlain { + if len(form.Password) < setting.MinPasswordLength { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplUserNew, &form) + return + } + if !password.IsComplexEnough(form.Password) { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(password.BuildComplexityError(ctx), tplUserNew, &form) + return + } + pwned, err := password.IsPwned(ctx, form.Password) + if pwned { + ctx.Data["Err_Password"] = true + errMsg := ctx.Tr("auth.password_pwned") + if err != nil { + log.Error(err.Error()) + errMsg = ctx.Tr("auth.password_pwned_err") + } + ctx.RenderWithErr(errMsg, tplUserNew, &form) + return + } + u.MustChangePassword = form.MustChangePassword + } + + if err := models.CreateUser(u, &models.CreateUserOverwriteOptions{Visibility: form.Visibility}); err != nil { + switch { + case models.IsErrUserAlreadyExist(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplUserNew, &form) + case models.IsErrEmailAlreadyUsed(err): + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserNew, &form) + case models.IsErrEmailInvalid(err): + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserNew, &form) + case models.IsErrNameReserved(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), tplUserNew, &form) + case models.IsErrNamePatternNotAllowed(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplUserNew, &form) + case models.IsErrNameCharsNotAllowed(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("user.form.name_chars_not_allowed", err.(models.ErrNameCharsNotAllowed).Name), tplUserNew, &form) + default: + ctx.ServerError("CreateUser", err) + } + return + } + log.Trace("Account created by admin (%s): %s", ctx.User.Name, u.Name) + + // Send email notification. + if form.SendNotify { + mailer.SendRegisterNotifyMail(u) + } + + ctx.Flash.Success(ctx.Tr("admin.users.new_success", u.Name)) + ctx.Redirect(setting.AppSubURL + "/admin/users/" + fmt.Sprint(u.ID)) +} + +func prepareUserInfo(ctx *context.Context) *models.User { + u, err := models.GetUserByID(ctx.ParamsInt64(":userid")) + if err != nil { + ctx.ServerError("GetUserByID", err) + return nil + } + ctx.Data["User"] = u + + if u.LoginSource > 0 { + ctx.Data["LoginSource"], err = models.GetLoginSourceByID(u.LoginSource) + if err != nil { + ctx.ServerError("GetLoginSourceByID", err) + return nil + } + } else { + ctx.Data["LoginSource"] = &models.LoginSource{} + } + + sources, err := models.LoginSources() + if err != nil { + ctx.ServerError("LoginSources", err) + return nil + } + ctx.Data["Sources"] = sources + + ctx.Data["TwoFactorEnabled"] = true + _, err = models.GetTwoFactorByUID(u.ID) + if err != nil { + if !models.IsErrTwoFactorNotEnrolled(err) { + ctx.ServerError("IsErrTwoFactorNotEnrolled", err) + return nil + } + ctx.Data["TwoFactorEnabled"] = false + } + + return u +} + +// EditUser show editing user page +func EditUser(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("admin.users.edit_account") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminUsers"] = true + ctx.Data["DisableRegularOrgCreation"] = setting.Admin.DisableRegularOrgCreation + ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations + ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice() + + prepareUserInfo(ctx) + if ctx.Written() { + return + } + + ctx.HTML(http.StatusOK, tplUserEdit) +} + +// EditUserPost response for editing user +func EditUserPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AdminEditUserForm) + ctx.Data["Title"] = ctx.Tr("admin.users.edit_account") + ctx.Data["PageIsAdmin"] = true + ctx.Data["PageIsAdminUsers"] = true + ctx.Data["DisableMigrations"] = setting.Repository.DisableMigrations + + u := prepareUserInfo(ctx) + if ctx.Written() { + return + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplUserEdit) + return + } + + fields := strings.Split(form.LoginType, "-") + if len(fields) == 2 { + loginType, _ := strconv.ParseInt(fields[0], 10, 0) + loginSource, _ := strconv.ParseInt(fields[1], 10, 64) + + if u.LoginSource != loginSource { + u.LoginSource = loginSource + u.LoginType = models.LoginType(loginType) + } + } + + if len(form.Password) > 0 && (u.IsLocal() || u.IsOAuth2()) { + var err error + if len(form.Password) < setting.MinPasswordLength { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplUserEdit, &form) + return + } + if !password.IsComplexEnough(form.Password) { + ctx.RenderWithErr(password.BuildComplexityError(ctx), tplUserEdit, &form) + return + } + pwned, err := password.IsPwned(ctx, form.Password) + if pwned { + ctx.Data["Err_Password"] = true + errMsg := ctx.Tr("auth.password_pwned") + if err != nil { + log.Error(err.Error()) + errMsg = ctx.Tr("auth.password_pwned_err") + } + ctx.RenderWithErr(errMsg, tplUserNew, &form) + return + } + if u.Salt, err = models.GetUserSalt(); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + if err = u.SetPassword(form.Password); err != nil { + ctx.ServerError("SetPassword", err) + return + } + } + + if len(form.UserName) != 0 && u.Name != form.UserName { + if err := router_user_setting.HandleUsernameChange(ctx, u, form.UserName); err != nil { + ctx.Redirect(setting.AppSubURL + "/admin/users") + return + } + u.Name = form.UserName + u.LowerName = strings.ToLower(form.UserName) + } + + if form.Reset2FA { + tf, err := models.GetTwoFactorByUID(u.ID) + if err != nil && !models.IsErrTwoFactorNotEnrolled(err) { + ctx.ServerError("GetTwoFactorByUID", err) + return + } + + if err = models.DeleteTwoFactorByID(tf.ID, u.ID); err != nil { + ctx.ServerError("DeleteTwoFactorByID", err) + return + } + } + + u.LoginName = form.LoginName + u.FullName = form.FullName + u.Email = form.Email + u.Website = form.Website + u.Location = form.Location + u.MaxRepoCreation = form.MaxRepoCreation + u.IsActive = form.Active + u.IsAdmin = form.Admin + u.IsRestricted = form.Restricted + u.AllowGitHook = form.AllowGitHook + u.AllowImportLocal = form.AllowImportLocal + u.AllowCreateOrganization = form.AllowCreateOrganization + + u.Visibility = form.Visibility + + // skip self Prohibit Login + if ctx.User.ID == u.ID { + u.ProhibitLogin = false + } else { + u.ProhibitLogin = form.ProhibitLogin + } + + if err := models.UpdateUser(u); err != nil { + if models.IsErrEmailAlreadyUsed(err) { + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserEdit, &form) + } else if models.IsErrEmailInvalid(err) { + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserEdit, &form) + } else { + ctx.ServerError("UpdateUser", err) + } + return + } + log.Trace("Account profile updated by admin (%s): %s", ctx.User.Name, u.Name) + + ctx.Flash.Success(ctx.Tr("admin.users.update_profile_success")) + ctx.Redirect(setting.AppSubURL + "/admin/users/" + ctx.Params(":userid")) +} + +// DeleteUser response for deleting a user +func DeleteUser(ctx *context.Context) { + u, err := models.GetUserByID(ctx.ParamsInt64(":userid")) + if err != nil { + ctx.ServerError("GetUserByID", err) + return + } + + if err = models.DeleteUser(u); err != nil { + switch { + case models.IsErrUserOwnRepos(err): + ctx.Flash.Error(ctx.Tr("admin.users.still_own_repo")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"), + }) + case models.IsErrUserHasOrgs(err): + ctx.Flash.Error(ctx.Tr("admin.users.still_has_org")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/users/" + ctx.Params(":userid"), + }) + default: + ctx.ServerError("DeleteUser", err) + } + return + } + log.Trace("Account deleted by admin (%s): %s", ctx.User.Name, u.Name) + + ctx.Flash.Success(ctx.Tr("admin.users.deletion_success")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/admin/users", + }) +} diff --git a/routers/web/admin/users_test.go b/routers/web/admin/users_test.go new file mode 100644 index 000000000..3d0b11a77 --- /dev/null +++ b/routers/web/admin/users_test.go @@ -0,0 +1,200 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package admin + +import ( + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" + + "github.com/stretchr/testify/assert" +) + +func TestNewUserPost_MustChangePassword(t *testing.T) { + + models.PrepareTestEnv(t) + ctx := test.MockContext(t, "admin/users/new") + + u := models.AssertExistsAndLoadBean(t, &models.User{ + IsAdmin: true, + ID: 2, + }).(*models.User) + + ctx.User = u + + username := "gitea" + email := "gitea@gitea.io" + + form := forms.AdminCreateUserForm{ + LoginType: "local", + LoginName: "local", + UserName: username, + Email: email, + Password: "abc123ABC!=$", + SendNotify: false, + MustChangePassword: true, + } + + web.SetForm(ctx, &form) + NewUserPost(ctx) + + assert.NotEmpty(t, ctx.Flash.SuccessMsg) + + u, err := models.GetUserByName(username) + + assert.NoError(t, err) + assert.Equal(t, username, u.Name) + assert.Equal(t, email, u.Email) + assert.True(t, u.MustChangePassword) +} + +func TestNewUserPost_MustChangePasswordFalse(t *testing.T) { + models.PrepareTestEnv(t) + ctx := test.MockContext(t, "admin/users/new") + + u := models.AssertExistsAndLoadBean(t, &models.User{ + IsAdmin: true, + ID: 2, + }).(*models.User) + + ctx.User = u + + username := "gitea" + email := "gitea@gitea.io" + + form := forms.AdminCreateUserForm{ + LoginType: "local", + LoginName: "local", + UserName: username, + Email: email, + Password: "abc123ABC!=$", + SendNotify: false, + MustChangePassword: false, + } + + web.SetForm(ctx, &form) + NewUserPost(ctx) + + assert.NotEmpty(t, ctx.Flash.SuccessMsg) + + u, err := models.GetUserByName(username) + + assert.NoError(t, err) + assert.Equal(t, username, u.Name) + assert.Equal(t, email, u.Email) + assert.False(t, u.MustChangePassword) +} + +func TestNewUserPost_InvalidEmail(t *testing.T) { + models.PrepareTestEnv(t) + ctx := test.MockContext(t, "admin/users/new") + + u := models.AssertExistsAndLoadBean(t, &models.User{ + IsAdmin: true, + ID: 2, + }).(*models.User) + + ctx.User = u + + username := "gitea" + email := "gitea@gitea.io\r\n" + + form := forms.AdminCreateUserForm{ + LoginType: "local", + LoginName: "local", + UserName: username, + Email: email, + Password: "abc123ABC!=$", + SendNotify: false, + MustChangePassword: false, + } + + web.SetForm(ctx, &form) + NewUserPost(ctx) + + assert.NotEmpty(t, ctx.Flash.ErrorMsg) +} + +func TestNewUserPost_VisibilityDefaultPublic(t *testing.T) { + models.PrepareTestEnv(t) + ctx := test.MockContext(t, "admin/users/new") + + u := models.AssertExistsAndLoadBean(t, &models.User{ + IsAdmin: true, + ID: 2, + }).(*models.User) + + ctx.User = u + + username := "gitea" + email := "gitea@gitea.io" + + form := forms.AdminCreateUserForm{ + LoginType: "local", + LoginName: "local", + UserName: username, + Email: email, + Password: "abc123ABC!=$", + SendNotify: false, + MustChangePassword: false, + } + + web.SetForm(ctx, &form) + NewUserPost(ctx) + + assert.NotEmpty(t, ctx.Flash.SuccessMsg) + + u, err := models.GetUserByName(username) + + assert.NoError(t, err) + assert.Equal(t, username, u.Name) + assert.Equal(t, email, u.Email) + // As default user visibility + assert.Equal(t, setting.Service.DefaultUserVisibilityMode, u.Visibility) +} + +func TestNewUserPost_VisibilityPrivate(t *testing.T) { + models.PrepareTestEnv(t) + ctx := test.MockContext(t, "admin/users/new") + + u := models.AssertExistsAndLoadBean(t, &models.User{ + IsAdmin: true, + ID: 2, + }).(*models.User) + + ctx.User = u + + username := "gitea" + email := "gitea@gitea.io" + + form := forms.AdminCreateUserForm{ + LoginType: "local", + LoginName: "local", + UserName: username, + Email: email, + Password: "abc123ABC!=$", + SendNotify: false, + MustChangePassword: false, + Visibility: api.VisibleTypePrivate, + } + + web.SetForm(ctx, &form) + NewUserPost(ctx) + + assert.NotEmpty(t, ctx.Flash.SuccessMsg) + + u, err := models.GetUserByName(username) + + assert.NoError(t, err) + assert.Equal(t, username, u.Name) + assert.Equal(t, email, u.Email) + // As default user visibility + assert.True(t, u.Visibility.IsPrivate()) +} diff --git a/routers/web/base.go b/routers/web/base.go new file mode 100644 index 000000000..9238ea217 --- /dev/null +++ b/routers/web/base.go @@ -0,0 +1,189 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package web + +import ( + "errors" + "fmt" + "io" + "net/http" + "os" + "path" + "path/filepath" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/httpcache" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/auth" + + "gitea.com/go-chi/session" +) + +func storageHandler(storageSetting setting.Storage, prefix string, objStore storage.ObjectStorage) func(next http.Handler) http.Handler { + return func(next http.Handler) http.Handler { + if storageSetting.ServeDirect { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if req.Method != "GET" && req.Method != "HEAD" { + next.ServeHTTP(w, req) + return + } + + if !strings.HasPrefix(req.URL.RequestURI(), "/"+prefix) { + next.ServeHTTP(w, req) + return + } + + rPath := strings.TrimPrefix(req.URL.RequestURI(), "/"+prefix) + u, err := objStore.URL(rPath, path.Base(rPath)) + if err != nil { + if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) { + log.Warn("Unable to find %s %s", prefix, rPath) + http.Error(w, "file not found", 404) + return + } + log.Error("Error whilst getting URL for %s %s. Error: %v", prefix, rPath, err) + http.Error(w, fmt.Sprintf("Error whilst getting URL for %s %s", prefix, rPath), 500) + return + } + http.Redirect( + w, + req, + u.String(), + 301, + ) + }) + } + + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + if req.Method != "GET" && req.Method != "HEAD" { + next.ServeHTTP(w, req) + return + } + + prefix := strings.Trim(prefix, "/") + + if !strings.HasPrefix(req.URL.EscapedPath(), "/"+prefix+"/") { + next.ServeHTTP(w, req) + return + } + + rPath := strings.TrimPrefix(req.URL.EscapedPath(), "/"+prefix+"/") + rPath = strings.TrimPrefix(rPath, "/") + if rPath == "" { + http.Error(w, "file not found", 404) + return + } + rPath = path.Clean("/" + filepath.ToSlash(rPath)) + rPath = rPath[1:] + + fi, err := objStore.Stat(rPath) + if err == nil && httpcache.HandleTimeCache(req, w, fi) { + return + } + + //If we have matched and access to release or issue + fr, err := objStore.Open(rPath) + if err != nil { + if os.IsNotExist(err) || errors.Is(err, os.ErrNotExist) { + log.Warn("Unable to find %s %s", prefix, rPath) + http.Error(w, "file not found", 404) + return + } + log.Error("Error whilst opening %s %s. Error: %v", prefix, rPath, err) + http.Error(w, fmt.Sprintf("Error whilst opening %s %s", prefix, rPath), 500) + return + } + defer fr.Close() + + _, err = io.Copy(w, fr) + if err != nil { + log.Error("Error whilst rendering %s %s. Error: %v", prefix, rPath, err) + http.Error(w, fmt.Sprintf("Error whilst rendering %s %s", prefix, rPath), 500) + return + } + }) + } +} + +type dataStore map[string]interface{} + +func (d *dataStore) GetData() map[string]interface{} { + return *d +} + +// Recovery returns a middleware that recovers from any panics and writes a 500 and a log if so. +// This error will be created with the gitea 500 page. +func Recovery() func(next http.Handler) http.Handler { + var rnd = templates.HTMLRenderer() + return func(next http.Handler) http.Handler { + return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { + defer func() { + if err := recover(); err != nil { + combinedErr := fmt.Sprintf("PANIC: %v\n%s", err, string(log.Stack(2))) + log.Error("%v", combinedErr) + + sessionStore := session.GetSession(req) + if sessionStore == nil { + if setting.IsProd() { + http.Error(w, http.StatusText(500), 500) + } else { + http.Error(w, combinedErr, 500) + } + return + } + + var lc = middleware.Locale(w, req) + var store = dataStore{ + "Language": lc.Language(), + "CurrentURL": setting.AppSubURL + req.URL.RequestURI(), + "i18n": lc, + } + + var user *models.User + if apiContext := context.GetAPIContext(req); apiContext != nil { + user = apiContext.User + } + if user == nil { + if ctx := context.GetContext(req); ctx != nil { + user = ctx.User + } + } + if user == nil { + // Get user from session if logged in - do not attempt to sign-in + user = auth.SessionUser(sessionStore) + } + if user != nil { + store["IsSigned"] = true + store["SignedUser"] = user + store["SignedUserID"] = user.ID + store["SignedUserName"] = user.Name + store["IsAdmin"] = user.IsAdmin + } else { + store["SignedUserID"] = int64(0) + store["SignedUserName"] = "" + } + + w.Header().Set(`X-Frame-Options`, setting.CORSConfig.XFrameOptions) + + if !setting.IsProd() { + store["ErrorMsg"] = combinedErr + } + err = rnd.HTML(w, 500, "status/500", templates.BaseVars().Merge(store)) + if err != nil { + log.Error("%v", err) + } + } + }() + + next.ServeHTTP(w, req) + }) + } +} diff --git a/routers/dev/template.go b/routers/web/dev/template.go similarity index 93% rename from routers/dev/template.go rename to routers/web/dev/template.go index 92599a742..de334c4f8 100644 --- a/routers/dev/template.go +++ b/routers/web/dev/template.go @@ -5,6 +5,8 @@ package dev import ( + "net/http" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" @@ -23,5 +25,5 @@ func TemplatePreview(ctx *context.Context) { ctx.Data["ResetPwdCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, ctx.Locale.Language()) ctx.Data["CurDbValue"] = "" - ctx.HTML(200, base.TplName(ctx.Params("*"))) + ctx.HTML(http.StatusOK, base.TplName(ctx.Params("*"))) } diff --git a/routers/web/events/events.go b/routers/web/events/events.go new file mode 100644 index 000000000..a630d9c22 --- /dev/null +++ b/routers/web/events/events.go @@ -0,0 +1,155 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package events + +import ( + "net/http" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" + "code.gitea.io/gitea/modules/eventsource" + "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/routers/web/user" +) + +// Events listens for events +func Events(ctx *context.Context) { + // FIXME: Need to check if resp is actually a http.Flusher! - how though? + + // Set the headers related to event streaming. + ctx.Resp.Header().Set("Content-Type", "text/event-stream") + ctx.Resp.Header().Set("Cache-Control", "no-cache") + ctx.Resp.Header().Set("Connection", "keep-alive") + ctx.Resp.Header().Set("X-Accel-Buffering", "no") + ctx.Resp.WriteHeader(http.StatusOK) + + if !ctx.IsSigned { + // Return unauthorized status event + event := &eventsource.Event{ + Name: "close", + Data: "unauthorized", + } + _, _ = event.WriteTo(ctx) + ctx.Resp.Flush() + return + } + + // Listen to connection close and un-register messageChan + notify := ctx.Done() + ctx.Resp.Flush() + + shutdownCtx := graceful.GetManager().ShutdownContext() + + uid := ctx.User.ID + + messageChan := eventsource.GetManager().Register(uid) + + unregister := func() { + eventsource.GetManager().Unregister(uid, messageChan) + // ensure the messageChan is closed + for { + _, ok := <-messageChan + if !ok { + break + } + } + } + + if _, err := ctx.Resp.Write([]byte("\n")); err != nil { + log.Error("Unable to write to EventStream: %v", err) + unregister() + return + } + + timer := time.NewTicker(30 * time.Second) + + stopwatchTimer := time.NewTicker(setting.UI.Notification.MinTimeout) + +loop: + for { + select { + case <-timer.C: + event := &eventsource.Event{ + Name: "ping", + } + _, err := event.WriteTo(ctx.Resp) + if err != nil { + log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) + go unregister() + break loop + } + ctx.Resp.Flush() + case <-notify: + go unregister() + break loop + case <-shutdownCtx.Done(): + go unregister() + break loop + case <-stopwatchTimer.C: + sws, err := models.GetUserStopwatches(ctx.User.ID, models.ListOptions{}) + if err != nil { + log.Error("Unable to GetUserStopwatches: %v", err) + continue + } + apiSWs, err := convert.ToStopWatches(sws) + if err != nil { + log.Error("Unable to APIFormat stopwatches: %v", err) + continue + } + dataBs, err := json.Marshal(apiSWs) + if err != nil { + log.Error("Unable to marshal stopwatches: %v", err) + continue + } + _, err = (&eventsource.Event{ + Name: "stopwatches", + Data: string(dataBs), + }).WriteTo(ctx.Resp) + if err != nil { + log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) + go unregister() + break loop + } + ctx.Resp.Flush() + case event, ok := <-messageChan: + if !ok { + break loop + } + + // Handle logout + if event.Name == "logout" { + if ctx.Session.ID() == event.Data { + _, _ = (&eventsource.Event{ + Name: "logout", + Data: "here", + }).WriteTo(ctx.Resp) + ctx.Resp.Flush() + go unregister() + user.HandleSignOut(ctx) + break loop + } + // Replace the event - we don't want to expose the session ID to the user + event = &eventsource.Event{ + Name: "logout", + Data: "elsewhere", + } + } + + _, err := event.WriteTo(ctx.Resp) + if err != nil { + log.Error("Unable to write to EventStream for user %s: %v", ctx.User.Name, err) + go unregister() + break loop + } + ctx.Resp.Flush() + } + } + timer.Stop() +} diff --git a/routers/web/explore/code.go b/routers/web/explore/code.go new file mode 100644 index 000000000..a9b159468 --- /dev/null +++ b/routers/web/explore/code.go @@ -0,0 +1,138 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package explore + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + code_indexer "code.gitea.io/gitea/modules/indexer/code" + "code.gitea.io/gitea/modules/setting" +) + +const ( + // tplExploreCode explore code page template + tplExploreCode base.TplName = "explore/code" +) + +// Code render explore code page +func Code(ctx *context.Context) { + if !setting.Indexer.RepoIndexerEnabled { + ctx.Redirect(setting.AppSubURL+"/explore", 302) + return + } + + ctx.Data["UsersIsDisabled"] = setting.Service.Explore.DisableUsersPage + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + ctx.Data["Title"] = ctx.Tr("explore") + ctx.Data["PageIsExplore"] = true + ctx.Data["PageIsExploreCode"] = true + + language := ctx.FormTrim("l") + keyword := ctx.FormTrim("q") + page := ctx.FormInt("page") + if page <= 0 { + page = 1 + } + + queryType := ctx.FormTrim("t") + isMatch := queryType == "match" + + var ( + repoIDs []int64 + err error + isAdmin bool + ) + if ctx.User != nil { + isAdmin = ctx.User.IsAdmin + } + + // guest user or non-admin user + if ctx.User == nil || !isAdmin { + repoIDs, err = models.FindUserAccessibleRepoIDs(ctx.User) + if err != nil { + ctx.ServerError("SearchResults", err) + return + } + } + + var ( + total int + searchResults []*code_indexer.Result + searchResultLanguages []*code_indexer.SearchResultLanguages + ) + + // if non-admin login user, we need check UnitTypeCode at first + if ctx.User != nil && len(repoIDs) > 0 { + repoMaps, err := models.GetRepositoriesMapByIDs(repoIDs) + if err != nil { + ctx.ServerError("SearchResults", err) + return + } + + var rightRepoMap = make(map[int64]*models.Repository, len(repoMaps)) + repoIDs = make([]int64, 0, len(repoMaps)) + for id, repo := range repoMaps { + if repo.CheckUnitUser(ctx.User, models.UnitTypeCode) { + rightRepoMap[id] = repo + repoIDs = append(repoIDs, id) + } + } + + ctx.Data["RepoMaps"] = rightRepoMap + + total, searchResults, searchResultLanguages, err = code_indexer.PerformSearch(repoIDs, language, keyword, page, setting.UI.RepoSearchPagingNum, isMatch) + if err != nil { + ctx.ServerError("SearchResults", err) + return + } + // if non-login user or isAdmin, no need to check UnitTypeCode + } else if (ctx.User == nil && len(repoIDs) > 0) || isAdmin { + total, searchResults, searchResultLanguages, err = code_indexer.PerformSearch(repoIDs, language, keyword, page, setting.UI.RepoSearchPagingNum, isMatch) + if err != nil { + ctx.ServerError("SearchResults", err) + return + } + + var loadRepoIDs = make([]int64, 0, len(searchResults)) + for _, result := range searchResults { + var find bool + for _, id := range loadRepoIDs { + if id == result.RepoID { + find = true + break + } + } + if !find { + loadRepoIDs = append(loadRepoIDs, result.RepoID) + } + } + + repoMaps, err := models.GetRepositoriesMapByIDs(loadRepoIDs) + if err != nil { + ctx.ServerError("SearchResults", err) + return + } + + ctx.Data["RepoMaps"] = repoMaps + } + + ctx.Data["Keyword"] = keyword + ctx.Data["Language"] = language + ctx.Data["queryType"] = queryType + ctx.Data["SearchResults"] = searchResults + ctx.Data["SearchResultLanguages"] = searchResultLanguages + ctx.Data["RequireHighlightJS"] = true + ctx.Data["PageIsViewCode"] = true + + pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5) + pager.SetDefaultParams(ctx) + pager.AddParam(ctx, "l", "Language") + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplExploreCode) +} diff --git a/routers/web/explore/org.go b/routers/web/explore/org.go new file mode 100644 index 000000000..470e0eb85 --- /dev/null +++ b/routers/web/explore/org.go @@ -0,0 +1,39 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package explore + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" +) + +const ( + // tplExploreOrganizations explore organizations page template + tplExploreOrganizations base.TplName = "explore/organizations" +) + +// Organizations render explore organizations page +func Organizations(ctx *context.Context) { + ctx.Data["UsersIsDisabled"] = setting.Service.Explore.DisableUsersPage + ctx.Data["Title"] = ctx.Tr("explore") + ctx.Data["PageIsExplore"] = true + ctx.Data["PageIsExploreOrganizations"] = true + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + + visibleTypes := []structs.VisibleType{structs.VisibleTypePublic} + if ctx.User != nil { + visibleTypes = append(visibleTypes, structs.VisibleTypeLimited, structs.VisibleTypePrivate) + } + + RenderUserSearch(ctx, &models.SearchUserOptions{ + Actor: ctx.User, + Type: models.UserTypeOrganization, + ListOptions: models.ListOptions{PageSize: setting.UI.ExplorePagingNum}, + Visible: visibleTypes, + }, tplExploreOrganizations) +} diff --git a/routers/web/explore/repo.go b/routers/web/explore/repo.go new file mode 100644 index 000000000..dfc6261b3 --- /dev/null +++ b/routers/web/explore/repo.go @@ -0,0 +1,130 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package explore + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" +) + +const ( + // tplExploreRepos explore repositories page template + tplExploreRepos base.TplName = "explore/repos" +) + +// RepoSearchOptions when calling search repositories +type RepoSearchOptions struct { + OwnerID int64 + Private bool + Restricted bool + PageSize int + TplName base.TplName +} + +// RenderRepoSearch render repositories search page +func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) { + page := ctx.FormInt("page") + if page <= 0 { + page = 1 + } + + var ( + repos []*models.Repository + count int64 + err error + orderBy models.SearchOrderBy + ) + + ctx.Data["SortType"] = ctx.FormString("sort") + switch ctx.FormString("sort") { + case "newest": + orderBy = models.SearchOrderByNewest + case "oldest": + orderBy = models.SearchOrderByOldest + case "recentupdate": + orderBy = models.SearchOrderByRecentUpdated + case "leastupdate": + orderBy = models.SearchOrderByLeastUpdated + case "reversealphabetically": + orderBy = models.SearchOrderByAlphabeticallyReverse + case "alphabetically": + orderBy = models.SearchOrderByAlphabetically + case "reversesize": + orderBy = models.SearchOrderBySizeReverse + case "size": + orderBy = models.SearchOrderBySize + case "moststars": + orderBy = models.SearchOrderByStarsReverse + case "feweststars": + orderBy = models.SearchOrderByStars + case "mostforks": + orderBy = models.SearchOrderByForksReverse + case "fewestforks": + orderBy = models.SearchOrderByForks + default: + ctx.Data["SortType"] = "recentupdate" + orderBy = models.SearchOrderByRecentUpdated + } + + keyword := ctx.FormTrim("q") + topicOnly := ctx.FormBool("topic") + ctx.Data["TopicOnly"] = topicOnly + + repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ + ListOptions: models.ListOptions{ + Page: page, + PageSize: opts.PageSize, + }, + Actor: ctx.User, + OrderBy: orderBy, + Private: opts.Private, + Keyword: keyword, + OwnerID: opts.OwnerID, + AllPublic: true, + AllLimited: true, + TopicOnly: topicOnly, + IncludeDescription: setting.UI.SearchRepoDescription, + }) + if err != nil { + ctx.ServerError("SearchRepository", err) + return + } + ctx.Data["Keyword"] = keyword + ctx.Data["Total"] = count + ctx.Data["Repos"] = repos + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + + pager := context.NewPagination(int(count), opts.PageSize, page, 5) + pager.SetDefaultParams(ctx) + pager.AddParam(ctx, "topic", "TopicOnly") + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, opts.TplName) +} + +// Repos render explore repositories page +func Repos(ctx *context.Context) { + ctx.Data["UsersIsDisabled"] = setting.Service.Explore.DisableUsersPage + ctx.Data["Title"] = ctx.Tr("explore") + ctx.Data["PageIsExplore"] = true + ctx.Data["PageIsExploreRepositories"] = true + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + + var ownerID int64 + if ctx.User != nil && !ctx.User.IsAdmin { + ownerID = ctx.User.ID + } + + RenderRepoSearch(ctx, &RepoSearchOptions{ + PageSize: setting.UI.ExplorePagingNum, + OwnerID: ownerID, + Private: ctx.User != nil, + TplName: tplExploreRepos, + }) +} diff --git a/routers/web/explore/user.go b/routers/web/explore/user.go new file mode 100644 index 000000000..aeaaf92c1 --- /dev/null +++ b/routers/web/explore/user.go @@ -0,0 +1,106 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package explore + +import ( + "bytes" + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/util" +) + +const ( + // tplExploreUsers explore users page template + tplExploreUsers base.TplName = "explore/users" +) + +var ( + nullByte = []byte{0x00} +) + +func isKeywordValid(keyword string) bool { + return !bytes.Contains([]byte(keyword), nullByte) +} + +// RenderUserSearch render user search page +func RenderUserSearch(ctx *context.Context, opts *models.SearchUserOptions, tplName base.TplName) { + opts.Page = ctx.FormInt("page") + if opts.Page <= 1 { + opts.Page = 1 + } + + var ( + users []*models.User + count int64 + err error + orderBy models.SearchOrderBy + ) + + ctx.Data["SortType"] = ctx.FormString("sort") + switch ctx.FormString("sort") { + case "newest": + orderBy = models.SearchOrderByIDReverse + case "oldest": + orderBy = models.SearchOrderByID + case "recentupdate": + orderBy = models.SearchOrderByRecentUpdated + case "leastupdate": + orderBy = models.SearchOrderByLeastUpdated + case "reversealphabetically": + orderBy = models.SearchOrderByAlphabeticallyReverse + case "alphabetically": + orderBy = models.SearchOrderByAlphabetically + default: + ctx.Data["SortType"] = "alphabetically" + orderBy = models.SearchOrderByAlphabetically + } + + opts.Keyword = ctx.FormTrim("q") + opts.OrderBy = orderBy + if len(opts.Keyword) == 0 || isKeywordValid(opts.Keyword) { + users, count, err = models.SearchUsers(opts) + if err != nil { + ctx.ServerError("SearchUsers", err) + return + } + } + ctx.Data["Keyword"] = opts.Keyword + ctx.Data["Total"] = count + ctx.Data["Users"] = users + ctx.Data["UsersTwoFaStatus"] = models.UserList(users).GetTwoFaStatus() + ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + + pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplName) +} + +// Users render explore users page +func Users(ctx *context.Context) { + if setting.Service.Explore.DisableUsersPage { + ctx.Redirect(setting.AppSubURL + "/explore/repos") + return + } + ctx.Data["Title"] = ctx.Tr("explore") + ctx.Data["PageIsExplore"] = true + ctx.Data["PageIsExploreUsers"] = true + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + + RenderUserSearch(ctx, &models.SearchUserOptions{ + Actor: ctx.User, + Type: models.UserTypeIndividual, + ListOptions: models.ListOptions{PageSize: setting.UI.ExplorePagingNum}, + IsActive: util.OptionalBoolTrue, + Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate}, + }, tplExploreUsers) +} diff --git a/routers/web/goget.go b/routers/web/goget.go new file mode 100644 index 000000000..9f367a927 --- /dev/null +++ b/routers/web/goget.go @@ -0,0 +1,86 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package web + +import ( + "net/http" + "net/url" + "path" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "github.com/unknwon/com" +) + +func goGet(ctx *context.Context) { + if ctx.Req.Method != "GET" || len(ctx.Req.URL.RawQuery) < 8 || ctx.FormString("go-get") != "1" { + return + } + + parts := strings.SplitN(ctx.Req.URL.EscapedPath(), "/", 4) + + if len(parts) < 3 { + return + } + + ownerName := parts[1] + repoName := parts[2] + + // Quick responses appropriate go-get meta with status 200 + // regardless of if user have access to the repository, + // or the repository does not exist at all. + // This is particular a workaround for "go get" command which does not respect + // .netrc file. + + trimmedRepoName := strings.TrimSuffix(repoName, ".git") + + if ownerName == "" || trimmedRepoName == "" { + _, _ = ctx.Write([]byte(` + + + invalid import path + + +`)) + ctx.Status(400) + return + } + branchName := setting.Repository.DefaultBranch + + repo, err := models.GetRepositoryByOwnerAndName(ownerName, repoName) + if err == nil && len(repo.DefaultBranch) > 0 { + branchName = repo.DefaultBranch + } + prefix := setting.AppURL + path.Join(url.PathEscape(ownerName), url.PathEscape(repoName), "src", "branch", util.PathEscapeSegments(branchName)) + + appURL, _ := url.Parse(setting.AppURL) + + insecure := "" + if appURL.Scheme == string(setting.HTTP) { + insecure = "--insecure " + } + ctx.Header().Set("Content-Type", "text/html") + ctx.Status(http.StatusOK) + _, _ = ctx.Write([]byte(com.Expand(` + + + + + + + go get {Insecure}{GoGetImport} + + +`, map[string]string{ + "GoGetImport": context.ComposeGoGetImport(ownerName, trimmedRepoName), + "CloneLink": models.ComposeHTTPSCloneURL(ownerName, repoName), + "GoDocDirectory": prefix + "{/dir}", + "GoDocFile": prefix + "{/dir}/{file}#L{line}", + "Insecure": insecure, + }))) +} diff --git a/routers/web/home.go b/routers/web/home.go new file mode 100644 index 000000000..f50197691 --- /dev/null +++ b/routers/web/home.go @@ -0,0 +1,65 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package web + +import ( + "net/http" + + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/routers/web/user" +) + +const ( + // tplHome home page template + tplHome base.TplName = "home" +) + +// Home render home page +func Home(ctx *context.Context) { + if ctx.IsSigned { + if !ctx.User.IsActive && setting.Service.RegisterEmailConfirm { + ctx.Data["Title"] = ctx.Tr("auth.active_your_account") + ctx.HTML(http.StatusOK, user.TplActivate) + } else if !ctx.User.IsActive || ctx.User.ProhibitLogin { + log.Info("Failed authentication attempt for %s from %s", ctx.User.Name, ctx.RemoteAddr()) + ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") + ctx.HTML(http.StatusOK, "user/auth/prohibit_login") + } else if ctx.User.MustChangePassword { + ctx.Data["Title"] = ctx.Tr("auth.must_change_password") + ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/change_password" + middleware.SetRedirectToCookie(ctx.Resp, setting.AppSubURL+ctx.Req.URL.RequestURI()) + ctx.Redirect(setting.AppSubURL + "/user/settings/change_password") + } else { + user.Dashboard(ctx) + } + return + // Check non-logged users landing page. + } else if setting.LandingPageURL != setting.LandingPageHome { + ctx.Redirect(setting.AppSubURL + string(setting.LandingPageURL)) + return + } + + // Check auto-login. + uname := ctx.GetCookie(setting.CookieUserName) + if len(uname) != 0 { + ctx.Redirect(setting.AppSubURL + "/user/login") + return + } + + ctx.Data["PageIsHome"] = true + ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled + ctx.HTML(http.StatusOK, tplHome) +} + +// NotFound render 404 page +func NotFound(ctx *context.Context) { + ctx.Data["Title"] = "Page Not Found" + ctx.NotFound("home.NotFound", nil) +} diff --git a/routers/metrics.go b/routers/web/metrics.go similarity index 98% rename from routers/metrics.go rename to routers/web/metrics.go index db2fb8de4..37558ee33 100644 --- a/routers/metrics.go +++ b/routers/web/metrics.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package routers +package web import ( "crypto/subtle" diff --git a/routers/web/org/home.go b/routers/web/org/home.go new file mode 100644 index 000000000..0c1f381d3 --- /dev/null +++ b/routers/web/org/home.go @@ -0,0 +1,151 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package org + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" +) + +const ( + tplOrgHome base.TplName = "org/home" +) + +// Home show organization home page +func Home(ctx *context.Context) { + ctx.SetParams(":org", ctx.Params(":username")) + context.HandleOrgAssignment(ctx) + if ctx.Written() { + return + } + + org := ctx.Org.Organization + + if !models.HasOrgOrUserVisible(org, ctx.User) { + ctx.NotFound("HasOrgOrUserVisible", nil) + return + } + + ctx.Data["PageIsUserProfile"] = true + ctx.Data["Title"] = org.DisplayName() + if len(org.Description) != 0 { + desc, err := markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: map[string]string{"mode": "document"}, + GitRepo: ctx.Repo.GitRepo, + }, org.Description) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + ctx.Data["RenderedDescription"] = desc + } + + var orderBy models.SearchOrderBy + ctx.Data["SortType"] = ctx.FormString("sort") + switch ctx.FormString("sort") { + case "newest": + orderBy = models.SearchOrderByNewest + case "oldest": + orderBy = models.SearchOrderByOldest + case "recentupdate": + orderBy = models.SearchOrderByRecentUpdated + case "leastupdate": + orderBy = models.SearchOrderByLeastUpdated + case "reversealphabetically": + orderBy = models.SearchOrderByAlphabeticallyReverse + case "alphabetically": + orderBy = models.SearchOrderByAlphabetically + case "moststars": + orderBy = models.SearchOrderByStarsReverse + case "feweststars": + orderBy = models.SearchOrderByStars + case "mostforks": + orderBy = models.SearchOrderByForksReverse + case "fewestforks": + orderBy = models.SearchOrderByForks + default: + ctx.Data["SortType"] = "recentupdate" + orderBy = models.SearchOrderByRecentUpdated + } + + keyword := ctx.FormTrim("q") + ctx.Data["Keyword"] = keyword + + page := ctx.FormInt("page") + if page <= 0 { + page = 1 + } + + var ( + repos []*models.Repository + count int64 + err error + ) + repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ + ListOptions: models.ListOptions{ + PageSize: setting.UI.User.RepoPagingNum, + Page: page, + }, + Keyword: keyword, + OwnerID: org.ID, + OrderBy: orderBy, + Private: ctx.IsSigned, + Actor: ctx.User, + IncludeDescription: setting.UI.SearchRepoDescription, + }) + if err != nil { + ctx.ServerError("SearchRepository", err) + return + } + + var opts = &models.FindOrgMembersOpts{ + OrgID: org.ID, + PublicOnly: true, + ListOptions: models.ListOptions{Page: 1, PageSize: 25}, + } + + if ctx.User != nil { + isMember, err := org.IsOrgMember(ctx.User.ID) + if err != nil { + ctx.Error(http.StatusInternalServerError, "IsOrgMember") + return + } + opts.PublicOnly = !isMember && !ctx.User.IsAdmin + } + + members, _, err := models.FindOrgMembers(opts) + if err != nil { + ctx.ServerError("FindOrgMembers", err) + return + } + + membersCount, err := models.CountOrgMembers(opts) + if err != nil { + ctx.ServerError("CountOrgMembers", err) + return + } + + ctx.Data["Owner"] = org + ctx.Data["Repos"] = repos + ctx.Data["Total"] = count + ctx.Data["MembersTotal"] = membersCount + ctx.Data["Members"] = members + ctx.Data["Teams"] = org.Teams + + ctx.Data["DisabledMirrors"] = setting.Repository.DisableMirrors + + pager := context.NewPagination(int(count), setting.UI.User.RepoPagingNum, page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplOrgHome) +} diff --git a/routers/web/org/members.go b/routers/web/org/members.go new file mode 100644 index 000000000..ef5a69e15 --- /dev/null +++ b/routers/web/org/members.go @@ -0,0 +1,135 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2020 The Gitea Authors. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package org + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" +) + +const ( + // tplMembers template for organization members page + tplMembers base.TplName = "org/member/members" +) + +// Members render organization users page +func Members(ctx *context.Context) { + org := ctx.Org.Organization + ctx.Data["Title"] = org.FullName + ctx.Data["PageIsOrgMembers"] = true + + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + + var opts = &models.FindOrgMembersOpts{ + OrgID: org.ID, + PublicOnly: true, + } + + if ctx.User != nil { + isMember, err := ctx.Org.Organization.IsOrgMember(ctx.User.ID) + if err != nil { + ctx.Error(http.StatusInternalServerError, "IsOrgMember") + return + } + opts.PublicOnly = !isMember && !ctx.User.IsAdmin + } + + total, err := models.CountOrgMembers(opts) + if err != nil { + ctx.Error(http.StatusInternalServerError, "CountOrgMembers") + return + } + + pager := context.NewPagination(int(total), setting.UI.MembersPagingNum, page, 5) + opts.ListOptions.Page = page + opts.ListOptions.PageSize = setting.UI.MembersPagingNum + members, membersIsPublic, err := models.FindOrgMembers(opts) + if err != nil { + ctx.ServerError("GetMembers", err) + return + } + ctx.Data["Page"] = pager + ctx.Data["Members"] = members + ctx.Data["MembersIsPublicMember"] = membersIsPublic + ctx.Data["MembersIsUserOrgOwner"] = members.IsUserOrgOwner(org.ID) + ctx.Data["MembersTwoFaStatus"] = members.GetTwoFaStatus() + + ctx.HTML(http.StatusOK, tplMembers) +} + +// MembersAction response for operation to a member of organization +func MembersAction(ctx *context.Context) { + uid := ctx.FormInt64("uid") + if uid == 0 { + ctx.Redirect(ctx.Org.OrgLink + "/members") + return + } + + org := ctx.Org.Organization + var err error + switch ctx.Params(":action") { + case "private": + if ctx.User.ID != uid && !ctx.Org.IsOwner { + ctx.Error(http.StatusNotFound) + return + } + err = models.ChangeOrgUserStatus(org.ID, uid, false) + case "public": + if ctx.User.ID != uid && !ctx.Org.IsOwner { + ctx.Error(http.StatusNotFound) + return + } + err = models.ChangeOrgUserStatus(org.ID, uid, true) + case "remove": + if !ctx.Org.IsOwner { + ctx.Error(http.StatusNotFound) + return + } + err = org.RemoveMember(uid) + if models.IsErrLastOrgOwner(err) { + ctx.Flash.Error(ctx.Tr("form.last_org_owner")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Org.OrgLink + "/members", + }) + return + } + case "leave": + err = org.RemoveMember(ctx.User.ID) + if models.IsErrLastOrgOwner(err) { + ctx.Flash.Error(ctx.Tr("form.last_org_owner")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Org.OrgLink + "/members", + }) + return + } + } + + if err != nil { + log.Error("Action(%s): %v", ctx.Params(":action"), err) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": false, + "err": err.Error(), + }) + return + } + + redirect := ctx.Org.OrgLink + "/members" + if ctx.Params(":action") == "leave" { + redirect = setting.AppSubURL + "/" + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": redirect, + }) +} diff --git a/routers/web/org/org.go b/routers/web/org/org.go new file mode 100644 index 000000000..beba3daca --- /dev/null +++ b/routers/web/org/org.go @@ -0,0 +1,79 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package org + +import ( + "errors" + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" +) + +const ( + // tplCreateOrg template path for create organization + tplCreateOrg base.TplName = "org/create" +) + +// Create render the page for create organization +func Create(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("new_org") + ctx.Data["DefaultOrgVisibilityMode"] = setting.Service.DefaultOrgVisibilityMode + if !ctx.User.CanCreateOrganization() { + ctx.ServerError("Not allowed", errors.New(ctx.Tr("org.form.create_org_not_allowed"))) + return + } + ctx.HTML(http.StatusOK, tplCreateOrg) +} + +// CreatePost response for create organization +func CreatePost(ctx *context.Context) { + form := *web.GetForm(ctx).(*forms.CreateOrgForm) + ctx.Data["Title"] = ctx.Tr("new_org") + + if !ctx.User.CanCreateOrganization() { + ctx.ServerError("Not allowed", errors.New(ctx.Tr("org.form.create_org_not_allowed"))) + return + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplCreateOrg) + return + } + + org := &models.User{ + Name: form.OrgName, + IsActive: true, + Type: models.UserTypeOrganization, + Visibility: form.Visibility, + RepoAdminChangeTeamAccess: form.RepoAdminChangeTeamAccess, + } + + if err := models.CreateOrganization(org, ctx.User); err != nil { + ctx.Data["Err_OrgName"] = true + switch { + case models.IsErrUserAlreadyExist(err): + ctx.RenderWithErr(ctx.Tr("form.org_name_been_taken"), tplCreateOrg, &form) + case models.IsErrNameReserved(err): + ctx.RenderWithErr(ctx.Tr("org.form.name_reserved", err.(models.ErrNameReserved).Name), tplCreateOrg, &form) + case models.IsErrNamePatternNotAllowed(err): + ctx.RenderWithErr(ctx.Tr("org.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplCreateOrg, &form) + case models.IsErrUserNotAllowedCreateOrg(err): + ctx.RenderWithErr(ctx.Tr("org.form.create_org_not_allowed"), tplCreateOrg, &form) + default: + ctx.ServerError("CreateOrganization", err) + } + return + } + log.Trace("Organization created: %s", org.Name) + + ctx.Redirect(org.DashboardLink()) +} diff --git a/routers/org/org_labels.go b/routers/web/org/org_labels.go similarity index 80% rename from routers/org/org_labels.go rename to routers/web/org/org_labels.go index e5b9d9dde..97a5437c6 100644 --- a/routers/org/org_labels.go +++ b/routers/web/org/org_labels.go @@ -5,14 +5,17 @@ package org import ( + "net/http" + "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" ) // RetrieveLabels find all the labels of an organization func RetrieveLabels(ctx *context.Context) { - labels, err := models.GetLabelsByOrgID(ctx.Org.Organization.ID, ctx.Query("sort"), models.ListOptions{}) + labels, err := models.GetLabelsByOrgID(ctx.Org.Organization.ID, ctx.FormString("sort"), models.ListOptions{}) if err != nil { ctx.ServerError("RetrieveLabels.GetLabels", err) return @@ -22,11 +25,12 @@ func RetrieveLabels(ctx *context.Context) { } ctx.Data["Labels"] = labels ctx.Data["NumLabels"] = len(labels) - ctx.Data["SortType"] = ctx.Query("sort") + ctx.Data["SortType"] = ctx.FormString("sort") } // NewLabel create new label for organization -func NewLabel(ctx *context.Context, form auth.CreateLabelForm) { +func NewLabel(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateLabelForm) ctx.Data["Title"] = ctx.Tr("repo.labels") ctx.Data["PageIsLabels"] = true @@ -50,12 +54,13 @@ func NewLabel(ctx *context.Context, form auth.CreateLabelForm) { } // UpdateLabel update a label's name and color -func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm) { +func UpdateLabel(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateLabelForm) l, err := models.GetLabelInOrgByID(ctx.Org.Organization.ID, form.ID) if err != nil { switch { case models.IsErrOrgLabelNotExist(err): - ctx.Error(404) + ctx.Error(http.StatusNotFound) default: ctx.ServerError("UpdateLabel", err) } @@ -74,19 +79,20 @@ func UpdateLabel(ctx *context.Context, form auth.CreateLabelForm) { // DeleteLabel delete a label func DeleteLabel(ctx *context.Context) { - if err := models.DeleteLabel(ctx.Org.Organization.ID, ctx.QueryInt64("id")); err != nil { + if err := models.DeleteLabel(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil { ctx.Flash.Error("DeleteLabel: " + err.Error()) } else { ctx.Flash.Success(ctx.Tr("repo.issues.label_deletion_success")) } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": ctx.Org.OrgLink + "/settings/labels", }) } // InitializeLabels init labels for an organization -func InitializeLabels(ctx *context.Context, form auth.InitializeLabelsForm) { +func InitializeLabels(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.InitializeLabelsForm) if ctx.HasError() { ctx.Redirect(ctx.Repo.RepoLink + "/labels") return diff --git a/routers/web/org/setting.go b/routers/web/org/setting.go new file mode 100644 index 000000000..7e6fc5bf4 --- /dev/null +++ b/routers/web/org/setting.go @@ -0,0 +1,219 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package org + +import ( + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + userSetting "code.gitea.io/gitea/routers/web/user/setting" + "code.gitea.io/gitea/services/forms" +) + +const ( + // tplSettingsOptions template path for render settings + tplSettingsOptions base.TplName = "org/settings/options" + // tplSettingsDelete template path for render delete repository + tplSettingsDelete base.TplName = "org/settings/delete" + // tplSettingsHooks template path for render hook settings + tplSettingsHooks base.TplName = "org/settings/hooks" + // tplSettingsLabels template path for render labels settings + tplSettingsLabels base.TplName = "org/settings/labels" +) + +// Settings render the main settings page +func Settings(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsSettingsOptions"] = true + ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility + ctx.Data["RepoAdminChangeTeamAccess"] = ctx.Org.Organization.RepoAdminChangeTeamAccess + ctx.HTML(http.StatusOK, tplSettingsOptions) +} + +// SettingsPost response for settings change submitted +func SettingsPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.UpdateOrgSettingForm) + ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsSettingsOptions"] = true + ctx.Data["CurrentVisibility"] = ctx.Org.Organization.Visibility + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplSettingsOptions) + return + } + + org := ctx.Org.Organization + nameChanged := org.Name != form.Name + + // Check if organization name has been changed. + if org.LowerName != strings.ToLower(form.Name) { + isExist, err := models.IsUserExist(org.ID, form.Name) + if err != nil { + ctx.ServerError("IsUserExist", err) + return + } else if isExist { + ctx.Data["OrgName"] = true + ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tplSettingsOptions, &form) + return + } else if err = models.ChangeUserName(org, form.Name); err != nil { + if err == models.ErrUserNameIllegal { + ctx.Data["OrgName"] = true + ctx.RenderWithErr(ctx.Tr("form.illegal_username"), tplSettingsOptions, &form) + } else { + ctx.ServerError("ChangeUserName", err) + } + return + } + // reset ctx.org.OrgLink with new name + ctx.Org.OrgLink = setting.AppSubURL + "/org/" + form.Name + log.Trace("Organization name changed: %s -> %s", org.Name, form.Name) + nameChanged = false + } + + // In case it's just a case change. + org.Name = form.Name + org.LowerName = strings.ToLower(form.Name) + + if ctx.User.IsAdmin { + org.MaxRepoCreation = form.MaxRepoCreation + } + + org.FullName = form.FullName + org.Description = form.Description + org.Website = form.Website + org.Location = form.Location + org.RepoAdminChangeTeamAccess = form.RepoAdminChangeTeamAccess + + visibilityChanged := form.Visibility != org.Visibility + org.Visibility = form.Visibility + + if err := models.UpdateUser(org); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + + // update forks visibility + if visibilityChanged { + if err := org.GetRepositories(models.ListOptions{Page: 1, PageSize: org.NumRepos}); err != nil { + ctx.ServerError("GetRepositories", err) + return + } + for _, repo := range org.Repos { + repo.OwnerName = org.Name + if err := models.UpdateRepository(repo, true); err != nil { + ctx.ServerError("UpdateRepository", err) + return + } + } + } else if nameChanged { + if err := models.UpdateRepositoryOwnerNames(org.ID, org.Name); err != nil { + ctx.ServerError("UpdateRepository", err) + return + } + } + + log.Trace("Organization setting updated: %s", org.Name) + ctx.Flash.Success(ctx.Tr("org.settings.update_setting_success")) + ctx.Redirect(ctx.Org.OrgLink + "/settings") +} + +// SettingsAvatar response for change avatar on settings page +func SettingsAvatar(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AvatarForm) + form.Source = forms.AvatarLocal + if err := userSetting.UpdateAvatarSetting(ctx, form, ctx.Org.Organization); err != nil { + ctx.Flash.Error(err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("org.settings.update_avatar_success")) + } + + ctx.Redirect(ctx.Org.OrgLink + "/settings") +} + +// SettingsDeleteAvatar response for delete avatar on settings page +func SettingsDeleteAvatar(ctx *context.Context) { + if err := ctx.Org.Organization.DeleteAvatar(); err != nil { + ctx.Flash.Error(err.Error()) + } + + ctx.Redirect(ctx.Org.OrgLink + "/settings") +} + +// SettingsDelete response for deleting an organization +func SettingsDelete(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsSettingsDelete"] = true + + org := ctx.Org.Organization + if ctx.Req.Method == "POST" { + if org.Name != ctx.FormString("org_name") { + ctx.Data["Err_OrgName"] = true + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_org_name"), tplSettingsDelete, nil) + return + } + + if err := models.DeleteOrganization(org); err != nil { + if models.IsErrUserOwnRepos(err) { + ctx.Flash.Error(ctx.Tr("form.org_still_own_repo")) + ctx.Redirect(ctx.Org.OrgLink + "/settings/delete") + } else { + ctx.ServerError("DeleteOrganization", err) + } + } else { + log.Trace("Organization deleted: %s", org.Name) + ctx.Redirect(setting.AppSubURL + "/") + } + return + } + + ctx.HTML(http.StatusOK, tplSettingsDelete) +} + +// Webhooks render webhook list page +func Webhooks(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("org.settings") + ctx.Data["PageIsSettingsHooks"] = true + ctx.Data["BaseLink"] = ctx.Org.OrgLink + "/settings/hooks" + ctx.Data["BaseLinkNew"] = ctx.Org.OrgLink + "/settings/hooks" + ctx.Data["Description"] = ctx.Tr("org.settings.hooks_desc") + + ws, err := models.ListWebhooksByOpts(&models.ListWebhookOptions{OrgID: ctx.Org.Organization.ID}) + if err != nil { + ctx.ServerError("GetWebhooksByOrgId", err) + return + } + + ctx.Data["Webhooks"] = ws + ctx.HTML(http.StatusOK, tplSettingsHooks) +} + +// DeleteWebhook response for delete webhook +func DeleteWebhook(ctx *context.Context) { + if err := models.DeleteWebhookByOrgID(ctx.Org.Organization.ID, ctx.FormInt64("id")); err != nil { + ctx.Flash.Error("DeleteWebhookByOrgID: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success")) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Org.OrgLink + "/settings/hooks", + }) +} + +// Labels render organization labels page +func Labels(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.labels") + ctx.Data["PageIsOrgSettingsLabels"] = true + ctx.Data["RequireTribute"] = true + ctx.Data["LabelTemplates"] = models.LabelTemplates + ctx.HTML(http.StatusOK, tplSettingsLabels) +} diff --git a/routers/web/org/teams.go b/routers/web/org/teams.go new file mode 100644 index 000000000..c93fcd062 --- /dev/null +++ b/routers/web/org/teams.go @@ -0,0 +1,391 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package org + +import ( + "net/http" + "path" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/utils" + "code.gitea.io/gitea/services/forms" +) + +const ( + // tplTeams template path for teams list page + tplTeams base.TplName = "org/team/teams" + // tplTeamNew template path for create new team page + tplTeamNew base.TplName = "org/team/new" + // tplTeamMembers template path for showing team members page + tplTeamMembers base.TplName = "org/team/members" + // tplTeamRepositories template path for showing team repositories page + tplTeamRepositories base.TplName = "org/team/repositories" +) + +// Teams render teams list page +func Teams(ctx *context.Context) { + org := ctx.Org.Organization + ctx.Data["Title"] = org.FullName + ctx.Data["PageIsOrgTeams"] = true + + for _, t := range org.Teams { + if err := t.GetMembers(&models.SearchMembersOptions{}); err != nil { + ctx.ServerError("GetMembers", err) + return + } + } + ctx.Data["Teams"] = org.Teams + + ctx.HTML(http.StatusOK, tplTeams) +} + +// TeamsAction response for join, leave, remove, add operations to team +func TeamsAction(ctx *context.Context) { + uid := ctx.FormInt64("uid") + if uid == 0 { + ctx.Redirect(ctx.Org.OrgLink + "/teams") + return + } + + page := ctx.FormString("page") + var err error + switch ctx.Params(":action") { + case "join": + if !ctx.Org.IsOwner { + ctx.Error(http.StatusNotFound) + return + } + err = ctx.Org.Team.AddMember(ctx.User.ID) + case "leave": + err = ctx.Org.Team.RemoveMember(ctx.User.ID) + if err != nil { + if models.IsErrLastOrgOwner(err) { + ctx.Flash.Error(ctx.Tr("form.last_org_owner")) + } else { + log.Error("Action(%s): %v", ctx.Params(":action"), err) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": false, + "err": err.Error(), + }) + return + } + } + ctx.JSON(http.StatusOK, + map[string]interface{}{ + "redirect": ctx.Org.OrgLink + "/teams/", + }) + return + case "remove": + if !ctx.Org.IsOwner { + ctx.Error(http.StatusNotFound) + return + } + err = ctx.Org.Team.RemoveMember(uid) + page = "team" + if err != nil { + if models.IsErrLastOrgOwner(err) { + ctx.Flash.Error(ctx.Tr("form.last_org_owner")) + } else { + log.Error("Action(%s): %v", ctx.Params(":action"), err) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": false, + "err": err.Error(), + }) + return + } + } + ctx.JSON(http.StatusOK, + map[string]interface{}{ + "redirect": ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName, + }) + return + case "add": + if !ctx.Org.IsOwner { + ctx.Error(http.StatusNotFound) + return + } + uname := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.FormString("uname"))) + var u *models.User + u, err = models.GetUserByName(uname) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.Flash.Error(ctx.Tr("form.user_not_exist")) + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName) + } else { + ctx.ServerError(" GetUserByName", err) + } + return + } + + if u.IsOrganization() { + ctx.Flash.Error(ctx.Tr("form.cannot_add_org_to_team")) + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName) + return + } + + if ctx.Org.Team.IsMember(u.ID) { + ctx.Flash.Error(ctx.Tr("org.teams.add_duplicate_users")) + } else { + err = ctx.Org.Team.AddMember(u.ID) + } + + page = "team" + } + + if err != nil { + if models.IsErrLastOrgOwner(err) { + ctx.Flash.Error(ctx.Tr("form.last_org_owner")) + } else { + log.Error("Action(%s): %v", ctx.Params(":action"), err) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": false, + "err": err.Error(), + }) + return + } + } + + switch page { + case "team": + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName) + case "home": + ctx.Redirect(ctx.Org.Organization.HomeLink()) + default: + ctx.Redirect(ctx.Org.OrgLink + "/teams") + } +} + +// TeamsRepoAction operate team's repository +func TeamsRepoAction(ctx *context.Context) { + if !ctx.Org.IsOwner { + ctx.Error(http.StatusNotFound) + return + } + + var err error + action := ctx.Params(":action") + switch action { + case "add": + repoName := path.Base(ctx.FormString("repo_name")) + var repo *models.Repository + repo, err = models.GetRepositoryByName(ctx.Org.Organization.ID, repoName) + if err != nil { + if models.IsErrRepoNotExist(err) { + ctx.Flash.Error(ctx.Tr("org.teams.add_nonexistent_repo")) + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories") + return + } + ctx.ServerError("GetRepositoryByName", err) + return + } + err = ctx.Org.Team.AddRepository(repo) + case "remove": + err = ctx.Org.Team.RemoveRepository(ctx.FormInt64("repoid")) + case "addall": + err = ctx.Org.Team.AddAllRepositories() + case "removeall": + err = ctx.Org.Team.RemoveAllRepositories() + } + + if err != nil { + log.Error("Action(%s): '%s' %v", ctx.Params(":action"), ctx.Org.Team.Name, err) + ctx.ServerError("TeamsRepoAction", err) + return + } + + if action == "addall" || action == "removeall" { + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories", + }) + return + } + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + ctx.Org.Team.LowerName + "/repositories") +} + +// NewTeam render create new team page +func NewTeam(ctx *context.Context) { + ctx.Data["Title"] = ctx.Org.Organization.FullName + ctx.Data["PageIsOrgTeams"] = true + ctx.Data["PageIsOrgTeamsNew"] = true + ctx.Data["Team"] = &models.Team{} + ctx.Data["Units"] = models.Units + ctx.HTML(http.StatusOK, tplTeamNew) +} + +// NewTeamPost response for create new team +func NewTeamPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateTeamForm) + ctx.Data["Title"] = ctx.Org.Organization.FullName + ctx.Data["PageIsOrgTeams"] = true + ctx.Data["PageIsOrgTeamsNew"] = true + ctx.Data["Units"] = models.Units + var includesAllRepositories = form.RepoAccess == "all" + + t := &models.Team{ + OrgID: ctx.Org.Organization.ID, + Name: form.TeamName, + Description: form.Description, + Authorize: models.ParseAccessMode(form.Permission), + IncludesAllRepositories: includesAllRepositories, + CanCreateOrgRepo: form.CanCreateOrgRepo, + } + + if t.Authorize < models.AccessModeOwner { + var units = make([]*models.TeamUnit, 0, len(form.Units)) + for _, tp := range form.Units { + units = append(units, &models.TeamUnit{ + OrgID: ctx.Org.Organization.ID, + Type: tp, + }) + } + t.Units = units + } + + ctx.Data["Team"] = t + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplTeamNew) + return + } + + if t.Authorize < models.AccessModeAdmin && len(form.Units) == 0 { + ctx.RenderWithErr(ctx.Tr("form.team_no_units_error"), tplTeamNew, &form) + return + } + + if err := models.NewTeam(t); err != nil { + ctx.Data["Err_TeamName"] = true + switch { + case models.IsErrTeamAlreadyExist(err): + ctx.RenderWithErr(ctx.Tr("form.team_name_been_taken"), tplTeamNew, &form) + default: + ctx.ServerError("NewTeam", err) + } + return + } + log.Trace("Team created: %s/%s", ctx.Org.Organization.Name, t.Name) + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + t.LowerName) +} + +// TeamMembers render team members page +func TeamMembers(ctx *context.Context) { + ctx.Data["Title"] = ctx.Org.Team.Name + ctx.Data["PageIsOrgTeams"] = true + ctx.Data["PageIsOrgTeamMembers"] = true + if err := ctx.Org.Team.GetMembers(&models.SearchMembersOptions{}); err != nil { + ctx.ServerError("GetMembers", err) + return + } + ctx.HTML(http.StatusOK, tplTeamMembers) +} + +// TeamRepositories show the repositories of team +func TeamRepositories(ctx *context.Context) { + ctx.Data["Title"] = ctx.Org.Team.Name + ctx.Data["PageIsOrgTeams"] = true + ctx.Data["PageIsOrgTeamRepos"] = true + if err := ctx.Org.Team.GetRepositories(&models.SearchTeamOptions{}); err != nil { + ctx.ServerError("GetRepositories", err) + return + } + ctx.HTML(http.StatusOK, tplTeamRepositories) +} + +// EditTeam render team edit page +func EditTeam(ctx *context.Context) { + ctx.Data["Title"] = ctx.Org.Organization.FullName + ctx.Data["PageIsOrgTeams"] = true + ctx.Data["team_name"] = ctx.Org.Team.Name + ctx.Data["desc"] = ctx.Org.Team.Description + ctx.Data["Units"] = models.Units + ctx.HTML(http.StatusOK, tplTeamNew) +} + +// EditTeamPost response for modify team information +func EditTeamPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateTeamForm) + t := ctx.Org.Team + ctx.Data["Title"] = ctx.Org.Organization.FullName + ctx.Data["PageIsOrgTeams"] = true + ctx.Data["Team"] = t + ctx.Data["Units"] = models.Units + + isAuthChanged := false + isIncludeAllChanged := false + var includesAllRepositories = form.RepoAccess == "all" + if !t.IsOwnerTeam() { + // Validate permission level. + auth := models.ParseAccessMode(form.Permission) + + t.Name = form.TeamName + if t.Authorize != auth { + isAuthChanged = true + t.Authorize = auth + } + + if t.IncludesAllRepositories != includesAllRepositories { + isIncludeAllChanged = true + t.IncludesAllRepositories = includesAllRepositories + } + } + t.Description = form.Description + if t.Authorize < models.AccessModeOwner { + var units = make([]models.TeamUnit, 0, len(form.Units)) + for _, tp := range form.Units { + units = append(units, models.TeamUnit{ + OrgID: t.OrgID, + TeamID: t.ID, + Type: tp, + }) + } + err := models.UpdateTeamUnits(t, units) + if err != nil { + ctx.Error(http.StatusInternalServerError, "LoadIssue", err.Error()) + return + } + } + t.CanCreateOrgRepo = form.CanCreateOrgRepo + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplTeamNew) + return + } + + if t.Authorize < models.AccessModeAdmin && len(form.Units) == 0 { + ctx.RenderWithErr(ctx.Tr("form.team_no_units_error"), tplTeamNew, &form) + return + } + + if err := models.UpdateTeam(t, isAuthChanged, isIncludeAllChanged); err != nil { + ctx.Data["Err_TeamName"] = true + switch { + case models.IsErrTeamAlreadyExist(err): + ctx.RenderWithErr(ctx.Tr("form.team_name_been_taken"), tplTeamNew, &form) + default: + ctx.ServerError("UpdateTeam", err) + } + return + } + ctx.Redirect(ctx.Org.OrgLink + "/teams/" + t.LowerName) +} + +// DeleteTeam response for the delete team request +func DeleteTeam(ctx *context.Context) { + if err := models.DeleteTeam(ctx.Org.Team); err != nil { + ctx.Flash.Error("DeleteTeam: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("org.teams.delete_team_success")) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Org.OrgLink + "/teams", + }) +} diff --git a/routers/web/repo/activity.go b/routers/web/repo/activity.go new file mode 100644 index 000000000..dcb7bf57c --- /dev/null +++ b/routers/web/repo/activity.go @@ -0,0 +1,103 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "net/http" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" +) + +const ( + tplActivity base.TplName = "repo/activity" +) + +// Activity render the page to show repository latest changes +func Activity(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.activity") + ctx.Data["PageIsActivity"] = true + + ctx.Data["Period"] = ctx.Params("period") + + timeUntil := time.Now() + var timeFrom time.Time + + switch ctx.Data["Period"] { + case "daily": + timeFrom = timeUntil.Add(-time.Hour * 24) + case "halfweekly": + timeFrom = timeUntil.Add(-time.Hour * 72) + case "weekly": + timeFrom = timeUntil.Add(-time.Hour * 168) + case "monthly": + timeFrom = timeUntil.AddDate(0, -1, 0) + case "quarterly": + timeFrom = timeUntil.AddDate(0, -3, 0) + case "semiyearly": + timeFrom = timeUntil.AddDate(0, -6, 0) + case "yearly": + timeFrom = timeUntil.AddDate(-1, 0, 0) + default: + ctx.Data["Period"] = "weekly" + timeFrom = timeUntil.Add(-time.Hour * 168) + } + ctx.Data["DateFrom"] = timeFrom.Format("January 2, 2006") + ctx.Data["DateUntil"] = timeUntil.Format("January 2, 2006") + ctx.Data["PeriodText"] = ctx.Tr("repo.activity.period." + ctx.Data["Period"].(string)) + + var err error + if ctx.Data["Activity"], err = models.GetActivityStats(ctx.Repo.Repository, timeFrom, + ctx.Repo.CanRead(models.UnitTypeReleases), + ctx.Repo.CanRead(models.UnitTypeIssues), + ctx.Repo.CanRead(models.UnitTypePullRequests), + ctx.Repo.CanRead(models.UnitTypeCode)); err != nil { + ctx.ServerError("GetActivityStats", err) + return + } + + if ctx.Data["ActivityTopAuthors"], err = models.GetActivityStatsTopAuthors(ctx.Repo.Repository, timeFrom, 10); err != nil { + ctx.ServerError("GetActivityStatsTopAuthors", err) + return + } + + ctx.HTML(http.StatusOK, tplActivity) +} + +// ActivityAuthors renders JSON with top commit authors for given time period over all branches +func ActivityAuthors(ctx *context.Context) { + timeUntil := time.Now() + var timeFrom time.Time + + switch ctx.Params("period") { + case "daily": + timeFrom = timeUntil.Add(-time.Hour * 24) + case "halfweekly": + timeFrom = timeUntil.Add(-time.Hour * 72) + case "weekly": + timeFrom = timeUntil.Add(-time.Hour * 168) + case "monthly": + timeFrom = timeUntil.AddDate(0, -1, 0) + case "quarterly": + timeFrom = timeUntil.AddDate(0, -3, 0) + case "semiyearly": + timeFrom = timeUntil.AddDate(0, -6, 0) + case "yearly": + timeFrom = timeUntil.AddDate(-1, 0, 0) + default: + timeFrom = timeUntil.Add(-time.Hour * 168) + } + + var err error + authors, err := models.GetActivityStatsTopAuthors(ctx.Repo.Repository, timeFrom, 10) + if err != nil { + ctx.ServerError("GetActivityStatsTopAuthors", err) + return + } + + ctx.JSON(http.StatusOK, authors) +} diff --git a/routers/repo/attachment.go b/routers/web/repo/attachment.go similarity index 78% rename from routers/repo/attachment.go rename to routers/web/repo/attachment.go index 5b699abc8..1a2538479 100644 --- a/routers/repo/attachment.go +++ b/routers/web/repo/attachment.go @@ -10,10 +10,12 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/httpcache" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/storage" "code.gitea.io/gitea/modules/upload" + "code.gitea.io/gitea/routers/common" ) // UploadIssueAttachment response for Issue/PR attachments @@ -29,13 +31,13 @@ func UploadReleaseAttachment(ctx *context.Context) { // UploadAttachment response for uploading attachments func uploadAttachment(ctx *context.Context, allowedTypes string) { if !setting.Attachment.Enabled { - ctx.Error(404, "attachment is not enabled") + ctx.Error(http.StatusNotFound, "attachment is not enabled") return } file, header, err := ctx.Req.FormFile("file") if err != nil { - ctx.Error(500, fmt.Sprintf("FormFile: %v", err)) + ctx.Error(http.StatusInternalServerError, fmt.Sprintf("FormFile: %v", err)) return } defer file.Close() @@ -48,7 +50,7 @@ func uploadAttachment(ctx *context.Context, allowedTypes string) { err = upload.Verify(buf, header.Filename, allowedTypes) if err != nil { - ctx.Error(400, err.Error()) + ctx.Error(http.StatusBadRequest, err.Error()) return } @@ -57,34 +59,34 @@ func uploadAttachment(ctx *context.Context, allowedTypes string) { Name: header.Filename, }, buf, file) if err != nil { - ctx.Error(500, fmt.Sprintf("NewAttachment: %v", err)) + ctx.Error(http.StatusInternalServerError, fmt.Sprintf("NewAttachment: %v", err)) return } log.Trace("New attachment uploaded: %s", attach.UUID) - ctx.JSON(200, map[string]string{ + ctx.JSON(http.StatusOK, map[string]string{ "uuid": attach.UUID, }) } // DeleteAttachment response for deleting issue's attachment func DeleteAttachment(ctx *context.Context) { - file := ctx.Query("file") + file := ctx.FormString("file") attach, err := models.GetAttachmentByUUID(file) if err != nil { - ctx.Error(400, err.Error()) + ctx.Error(http.StatusBadRequest, err.Error()) return } if !ctx.IsSigned || (ctx.User.ID != attach.UploaderID) { - ctx.Error(403) + ctx.Error(http.StatusForbidden) return } err = models.DeleteAttachment(attach, true) if err != nil { - ctx.Error(500, fmt.Sprintf("DeleteAttachment: %v", err)) + ctx.Error(http.StatusInternalServerError, fmt.Sprintf("DeleteAttachment: %v", err)) return } - ctx.JSON(200, map[string]string{ + ctx.JSON(http.StatusOK, map[string]string{ "uuid": attach.UUID, }) } @@ -94,7 +96,7 @@ func GetAttachment(ctx *context.Context) { attach, err := models.GetAttachmentByUUID(ctx.Params(":uuid")) if err != nil { if models.IsErrAttachmentNotExist(err) { - ctx.Error(404) + ctx.Error(http.StatusNotFound) } else { ctx.ServerError("GetAttachmentByUUID", err) } @@ -124,21 +126,25 @@ func GetAttachment(ctx *context.Context) { } } + if err := attach.IncreaseDownloadCount(); err != nil { + ctx.ServerError("IncreaseDownloadCount", err) + return + } + if setting.Attachment.ServeDirect { //If we have a signed url (S3, object storage), redirect to this directly. u, err := storage.Attachments.URL(attach.RelativePath(), attach.Name) if u != nil && err == nil { - if err := attach.IncreaseDownloadCount(); err != nil { - ctx.ServerError("Update", err) - return - } - ctx.Redirect(u.String()) return } } + if httpcache.HandleGenericETagCache(ctx.Req, ctx.Resp, `"`+attach.UUID+`"`) { + return + } + //If we have matched and access to release or issue fr, err := storage.Attachments.Open(attach.RelativePath()) if err != nil { @@ -147,12 +153,7 @@ func GetAttachment(ctx *context.Context) { } defer fr.Close() - if err := attach.IncreaseDownloadCount(); err != nil { - ctx.ServerError("Update", err) - return - } - - if err = ServeData(ctx, attach.Name, fr); err != nil { + if err = common.ServeData(ctx, attach.Name, attach.Size, fr); err != nil { ctx.ServerError("ServeData", err) return } diff --git a/routers/web/repo/blame.go b/routers/web/repo/blame.go new file mode 100644 index 000000000..c2da8e9cd --- /dev/null +++ b/routers/web/repo/blame.go @@ -0,0 +1,259 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "fmt" + "html" + gotemplate "html/template" + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/highlight" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/timeutil" +) + +const ( + tplBlame base.TplName = "repo/home" +) + +type blameRow struct { + RowNumber int + Avatar gotemplate.HTML + RepoLink string + PartSha string + PreviousSha string + PreviousShaURL string + IsFirstCommit bool + CommitURL string + CommitMessage string + CommitSince gotemplate.HTML + Code gotemplate.HTML +} + +// RefBlame render blame page +func RefBlame(ctx *context.Context) { + fileName := ctx.Repo.TreePath + if len(fileName) == 0 { + ctx.NotFound("Blame FileName", nil) + return + } + + userName := ctx.Repo.Owner.Name + repoName := ctx.Repo.Repository.Name + commitID := ctx.Repo.CommitID + + branchLink := ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL() + treeLink := branchLink + rawLink := ctx.Repo.RepoLink + "/raw/" + ctx.Repo.BranchNameSubURL() + + if len(ctx.Repo.TreePath) > 0 { + treeLink += "/" + ctx.Repo.TreePath + } + + var treeNames []string + paths := make([]string, 0, 5) + if len(ctx.Repo.TreePath) > 0 { + treeNames = strings.Split(ctx.Repo.TreePath, "/") + for i := range treeNames { + paths = append(paths, strings.Join(treeNames[:i+1], "/")) + } + + ctx.Data["HasParentPath"] = true + if len(paths)-2 >= 0 { + ctx.Data["ParentPath"] = "/" + paths[len(paths)-1] + } + } + + // Get current entry user currently looking at. + entry, err := ctx.Repo.Commit.GetTreeEntryByPath(ctx.Repo.TreePath) + if err != nil { + ctx.NotFoundOrServerError("Repo.Commit.GetTreeEntryByPath", git.IsErrNotExist, err) + return + } + + blob := entry.Blob() + + ctx.Data["Paths"] = paths + ctx.Data["TreeLink"] = treeLink + ctx.Data["TreeNames"] = treeNames + ctx.Data["BranchLink"] = branchLink + + ctx.Data["RawFileLink"] = rawLink + "/" + ctx.Repo.TreePath + ctx.Data["PageIsViewCode"] = true + + ctx.Data["IsBlame"] = true + + ctx.Data["FileSize"] = blob.Size() + ctx.Data["FileName"] = blob.Name() + + ctx.Data["NumLines"], err = blob.GetBlobLineCount() + if err != nil { + ctx.NotFound("GetBlobLineCount", err) + return + } + + blameReader, err := git.CreateBlameReader(ctx, models.RepoPath(userName, repoName), commitID, fileName) + if err != nil { + ctx.NotFound("CreateBlameReader", err) + return + } + defer blameReader.Close() + + blameParts := make([]git.BlamePart, 0) + + for { + blamePart, err := blameReader.NextPart() + if err != nil { + ctx.NotFound("NextPart", err) + return + } + if blamePart == nil { + break + } + blameParts = append(blameParts, *blamePart) + } + + // Get Topics of this repo + renderRepoTopics(ctx) + if ctx.Written() { + return + } + + commitNames, previousCommits := processBlameParts(ctx, blameParts) + if ctx.Written() { + return + } + + renderBlame(ctx, blameParts, commitNames, previousCommits) + + ctx.HTML(http.StatusOK, tplBlame) +} + +func processBlameParts(ctx *context.Context, blameParts []git.BlamePart) (map[string]*models.UserCommit, map[string]string) { + // store commit data by SHA to look up avatar info etc + commitNames := make(map[string]*models.UserCommit) + // previousCommits contains links from SHA to parent SHA, + // if parent also contains the current TreePath. + previousCommits := make(map[string]string) + // and as blameParts can reference the same commits multiple + // times, we cache the lookup work locally + commits := make([]*git.Commit, 0, len(blameParts)) + commitCache := map[string]*git.Commit{} + commitCache[ctx.Repo.Commit.ID.String()] = ctx.Repo.Commit + + for _, part := range blameParts { + sha := part.Sha + if _, ok := commitNames[sha]; ok { + continue + } + + // find the blamePart commit, to look up parent & email address for avatars + commit, ok := commitCache[sha] + var err error + if !ok { + commit, err = ctx.Repo.GitRepo.GetCommit(sha) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("Repo.GitRepo.GetCommit", err) + } else { + ctx.ServerError("Repo.GitRepo.GetCommit", err) + } + return nil, nil + } + commitCache[sha] = commit + } + + // find parent commit + if commit.ParentCount() > 0 { + psha := commit.Parents[0] + previousCommit, ok := commitCache[psha.String()] + if !ok { + previousCommit, _ = commit.Parent(0) + if previousCommit != nil { + commitCache[psha.String()] = previousCommit + } + } + // only store parent commit ONCE, if it has the file + if previousCommit != nil { + if haz1, _ := previousCommit.HasFile(ctx.Repo.TreePath); haz1 { + previousCommits[commit.ID.String()] = previousCommit.ID.String() + } + } + } + + commits = append(commits, commit) + } + + // populate commit email addresses to later look up avatars. + for _, c := range models.ValidateCommitsWithEmails(commits) { + commitNames[c.ID.String()] = c + } + + return commitNames, previousCommits +} + +func renderBlame(ctx *context.Context, blameParts []git.BlamePart, commitNames map[string]*models.UserCommit, previousCommits map[string]string) { + repoLink := ctx.Repo.RepoLink + + var lines = make([]string, 0) + rows := make([]*blameRow, 0) + + var i = 0 + var commitCnt = 0 + for _, part := range blameParts { + for index, line := range part.Lines { + i++ + lines = append(lines, line) + + br := &blameRow{ + RowNumber: i, + } + + commit := commitNames[part.Sha] + previousSha := previousCommits[part.Sha] + if index == 0 { + // Count commit number + commitCnt++ + + // User avatar image + commitSince := timeutil.TimeSinceUnix(timeutil.TimeStamp(commit.Author.When.Unix()), ctx.Data["Lang"].(string)) + + var avatar string + if commit.User != nil { + avatar = string(templates.Avatar(commit.User, 18, "mr-3")) + } else { + avatar = string(templates.AvatarByEmail(commit.Author.Email, commit.Author.Name, 18, "mr-3")) + } + + br.Avatar = gotemplate.HTML(avatar) + br.RepoLink = repoLink + br.PartSha = part.Sha + br.PreviousSha = previousSha + br.PreviousShaURL = fmt.Sprintf("%s/blame/commit/%s/%s", repoLink, previousSha, ctx.Repo.TreePath) + br.CommitURL = fmt.Sprintf("%s/commit/%s", repoLink, part.Sha) + br.CommitMessage = html.EscapeString(commit.CommitMessage) + br.CommitSince = commitSince + } + + if i != len(lines)-1 { + line += "\n" + } + fileName := fmt.Sprintf("%v", ctx.Data["FileName"]) + line = highlight.Code(fileName, line) + + br.Code = gotemplate.HTML(line) + rows = append(rows, br) + } + } + + ctx.Data["BlameRows"] = rows + ctx.Data["CommitCnt"] = commitCnt +} diff --git a/routers/web/repo/branch.go b/routers/web/repo/branch.go new file mode 100644 index 000000000..32cfc2adf --- /dev/null +++ b/routers/web/repo/branch.go @@ -0,0 +1,408 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "errors" + "fmt" + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/repofiles" + repo_module "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/utils" + "code.gitea.io/gitea/services/forms" + release_service "code.gitea.io/gitea/services/release" + repo_service "code.gitea.io/gitea/services/repository" +) + +const ( + tplBranch base.TplName = "repo/branch/list" +) + +// Branch contains the branch information +type Branch struct { + Name string + Commit *git.Commit + IsProtected bool + IsDeleted bool + IsIncluded bool + DeletedBranch *models.DeletedBranch + CommitsAhead int + CommitsBehind int + LatestPullRequest *models.PullRequest + MergeMovedOn bool +} + +// Branches render repository branch page +func Branches(ctx *context.Context) { + ctx.Data["Title"] = "Branches" + ctx.Data["IsRepoToolbarBranches"] = true + ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch + ctx.Data["AllowsPulls"] = ctx.Repo.Repository.AllowsPulls() + ctx.Data["IsWriter"] = ctx.Repo.CanWrite(models.UnitTypeCode) + ctx.Data["IsMirror"] = ctx.Repo.Repository.IsMirror + ctx.Data["CanPull"] = ctx.Repo.CanWrite(models.UnitTypeCode) || (ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID)) + ctx.Data["PageIsViewCode"] = true + ctx.Data["PageIsBranches"] = true + + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + + limit := ctx.FormInt("limit") + if limit <= 0 || limit > setting.Git.BranchesRangeSize { + limit = setting.Git.BranchesRangeSize + } + + skip := (page - 1) * limit + log.Debug("Branches: skip: %d limit: %d", skip, limit) + branches, branchesCount := loadBranches(ctx, skip, limit) + if ctx.Written() { + return + } + ctx.Data["Branches"] = branches + pager := context.NewPagination(int(branchesCount), setting.Git.BranchesRangeSize, page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplBranch) +} + +// DeleteBranchPost responses for delete merged branch +func DeleteBranchPost(ctx *context.Context) { + defer redirect(ctx) + branchName := ctx.FormString("name") + + if err := repo_service.DeleteBranch(ctx.User, ctx.Repo.Repository, ctx.Repo.GitRepo, branchName); err != nil { + switch { + case git.IsErrBranchNotExist(err): + log.Debug("DeleteBranch: Can't delete non existing branch '%s'", branchName) + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", branchName)) + case errors.Is(err, repo_service.ErrBranchIsDefault): + log.Debug("DeleteBranch: Can't delete default branch '%s'", branchName) + ctx.Flash.Error(ctx.Tr("repo.branch.default_deletion_failed", branchName)) + case errors.Is(err, repo_service.ErrBranchIsProtected): + log.Debug("DeleteBranch: Can't delete protected branch '%s'", branchName) + ctx.Flash.Error(ctx.Tr("repo.branch.protected_deletion_failed", branchName)) + default: + log.Error("DeleteBranch: %v", err) + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", branchName)) + } + + return + } + + ctx.Flash.Success(ctx.Tr("repo.branch.deletion_success", branchName)) +} + +// RestoreBranchPost responses for delete merged branch +func RestoreBranchPost(ctx *context.Context) { + defer redirect(ctx) + + branchID := ctx.FormInt64("branch_id") + branchName := ctx.FormString("name") + + deletedBranch, err := ctx.Repo.Repository.GetDeletedBranchByID(branchID) + if err != nil { + log.Error("GetDeletedBranchByID: %v", err) + ctx.Flash.Error(ctx.Tr("repo.branch.restore_failed", branchName)) + return + } + + if err := git.Push(ctx.Repo.Repository.RepoPath(), git.PushOptions{ + Remote: ctx.Repo.Repository.RepoPath(), + Branch: fmt.Sprintf("%s:%s%s", deletedBranch.Commit, git.BranchPrefix, deletedBranch.Name), + Env: models.PushingEnvironment(ctx.User, ctx.Repo.Repository), + }); err != nil { + if strings.Contains(err.Error(), "already exists") { + log.Debug("RestoreBranch: Can't restore branch '%s', since one with same name already exist", deletedBranch.Name) + ctx.Flash.Error(ctx.Tr("repo.branch.already_exists", deletedBranch.Name)) + return + } + log.Error("RestoreBranch: CreateBranch: %v", err) + ctx.Flash.Error(ctx.Tr("repo.branch.restore_failed", deletedBranch.Name)) + return + } + + // Don't return error below this + if err := repo_service.PushUpdate( + &repo_module.PushUpdateOptions{ + RefFullName: git.BranchPrefix + deletedBranch.Name, + OldCommitID: git.EmptySHA, + NewCommitID: deletedBranch.Commit, + PusherID: ctx.User.ID, + PusherName: ctx.User.Name, + RepoUserName: ctx.Repo.Owner.Name, + RepoName: ctx.Repo.Repository.Name, + }); err != nil { + log.Error("RestoreBranch: Update: %v", err) + } + + ctx.Flash.Success(ctx.Tr("repo.branch.restore_success", deletedBranch.Name)) +} + +func redirect(ctx *context.Context) { + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/branches", + }) +} + +// loadBranches loads branches from the repository limited by page & pageSize. +// NOTE: May write to context on error. +func loadBranches(ctx *context.Context, skip, limit int) ([]*Branch, int) { + defaultBranch, err := repo_module.GetBranch(ctx.Repo.Repository, ctx.Repo.Repository.DefaultBranch) + if err != nil { + log.Error("loadBranches: get default branch: %v", err) + ctx.ServerError("GetDefaultBranch", err) + return nil, 0 + } + + rawBranches, totalNumOfBranches, err := repo_module.GetBranches(ctx.Repo.Repository, skip, limit) + if err != nil { + log.Error("GetBranches: %v", err) + ctx.ServerError("GetBranches", err) + return nil, 0 + } + + protectedBranches, err := ctx.Repo.Repository.GetProtectedBranches() + if err != nil { + ctx.ServerError("GetProtectedBranches", err) + return nil, 0 + } + + repoIDToRepo := map[int64]*models.Repository{} + repoIDToRepo[ctx.Repo.Repository.ID] = ctx.Repo.Repository + + repoIDToGitRepo := map[int64]*git.Repository{} + repoIDToGitRepo[ctx.Repo.Repository.ID] = ctx.Repo.GitRepo + + var branches []*Branch + for i := range rawBranches { + if rawBranches[i].Name == defaultBranch.Name { + // Skip default branch + continue + } + + var branch = loadOneBranch(ctx, rawBranches[i], protectedBranches, repoIDToRepo, repoIDToGitRepo) + if branch == nil { + return nil, 0 + } + + branches = append(branches, branch) + } + + // Always add the default branch + log.Debug("loadOneBranch: load default: '%s'", defaultBranch.Name) + branches = append(branches, loadOneBranch(ctx, defaultBranch, protectedBranches, repoIDToRepo, repoIDToGitRepo)) + + if ctx.Repo.CanWrite(models.UnitTypeCode) { + deletedBranches, err := getDeletedBranches(ctx) + if err != nil { + ctx.ServerError("getDeletedBranches", err) + return nil, 0 + } + branches = append(branches, deletedBranches...) + } + + return branches, totalNumOfBranches +} + +func loadOneBranch(ctx *context.Context, rawBranch *git.Branch, protectedBranches []*models.ProtectedBranch, + repoIDToRepo map[int64]*models.Repository, + repoIDToGitRepo map[int64]*git.Repository) *Branch { + log.Trace("loadOneBranch: '%s'", rawBranch.Name) + + commit, err := rawBranch.GetCommit() + if err != nil { + ctx.ServerError("GetCommit", err) + return nil + } + + branchName := rawBranch.Name + var isProtected bool + for _, b := range protectedBranches { + if b.BranchName == branchName { + isProtected = true + break + } + } + + divergence, divergenceError := repofiles.CountDivergingCommits(ctx.Repo.Repository, git.BranchPrefix+branchName) + if divergenceError != nil { + ctx.ServerError("CountDivergingCommits", divergenceError) + return nil + } + + pr, err := models.GetLatestPullRequestByHeadInfo(ctx.Repo.Repository.ID, branchName) + if err != nil { + ctx.ServerError("GetLatestPullRequestByHeadInfo", err) + return nil + } + headCommit := commit.ID.String() + + mergeMovedOn := false + if pr != nil { + pr.HeadRepo = ctx.Repo.Repository + if err := pr.LoadIssue(); err != nil { + ctx.ServerError("pr.LoadIssue", err) + return nil + } + if repo, ok := repoIDToRepo[pr.BaseRepoID]; ok { + pr.BaseRepo = repo + } else if err := pr.LoadBaseRepo(); err != nil { + ctx.ServerError("pr.LoadBaseRepo", err) + return nil + } else { + repoIDToRepo[pr.BaseRepoID] = pr.BaseRepo + } + pr.Issue.Repo = pr.BaseRepo + + if pr.HasMerged { + baseGitRepo, ok := repoIDToGitRepo[pr.BaseRepoID] + if !ok { + baseGitRepo, err = git.OpenRepository(pr.BaseRepo.RepoPath()) + if err != nil { + ctx.ServerError("OpenRepository", err) + return nil + } + defer baseGitRepo.Close() + repoIDToGitRepo[pr.BaseRepoID] = baseGitRepo + } + pullCommit, err := baseGitRepo.GetRefCommitID(pr.GetGitRefName()) + if err != nil && !git.IsErrNotExist(err) { + ctx.ServerError("GetBranchCommitID", err) + return nil + } + if err == nil && headCommit != pullCommit { + // the head has moved on from the merge - we shouldn't delete + mergeMovedOn = true + } + } + } + + isIncluded := divergence.Ahead == 0 && ctx.Repo.Repository.DefaultBranch != branchName + return &Branch{ + Name: branchName, + Commit: commit, + IsProtected: isProtected, + IsIncluded: isIncluded, + CommitsAhead: divergence.Ahead, + CommitsBehind: divergence.Behind, + LatestPullRequest: pr, + MergeMovedOn: mergeMovedOn, + } +} + +func getDeletedBranches(ctx *context.Context) ([]*Branch, error) { + branches := []*Branch{} + + deletedBranches, err := ctx.Repo.Repository.GetDeletedBranches() + if err != nil { + return branches, err + } + + for i := range deletedBranches { + deletedBranches[i].LoadUser() + branches = append(branches, &Branch{ + Name: deletedBranches[i].Name, + IsDeleted: true, + DeletedBranch: deletedBranches[i], + }) + } + + return branches, nil +} + +// CreateBranch creates new branch in repository +func CreateBranch(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewBranchForm) + if !ctx.Repo.CanCreateBranch() { + ctx.NotFound("CreateBranch", nil) + return + } + + if ctx.HasError() { + ctx.Flash.Error(ctx.GetErrMsg()) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + + var err error + + if form.CreateTag { + if ctx.Repo.IsViewTag { + err = release_service.CreateNewTag(ctx.User, ctx.Repo.Repository, ctx.Repo.CommitID, form.NewBranchName, "") + } else { + err = release_service.CreateNewTag(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName, "") + } + } else if ctx.Repo.IsViewBranch { + err = repo_module.CreateNewBranch(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) + } else if ctx.Repo.IsViewTag { + err = repo_module.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.CommitID, form.NewBranchName) + } else { + err = repo_module.CreateNewBranchFromCommit(ctx.User, ctx.Repo.Repository, ctx.Repo.BranchName, form.NewBranchName) + } + if err != nil { + if models.IsErrTagAlreadyExists(err) { + e := err.(models.ErrTagAlreadyExists) + ctx.Flash.Error(ctx.Tr("repo.branch.tag_collision", e.TagName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + if models.IsErrBranchAlreadyExists(err) || git.IsErrPushOutOfDate(err) { + ctx.Flash.Error(ctx.Tr("repo.branch.branch_already_exists", form.NewBranchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + if models.IsErrBranchNameConflict(err) { + e := err.(models.ErrBranchNameConflict) + ctx.Flash.Error(ctx.Tr("repo.branch.branch_name_conflict", form.NewBranchName, e.BranchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + if git.IsErrPushRejected(err) { + e := err.(*git.ErrPushRejected) + if len(e.Message) == 0 { + ctx.Flash.Error(ctx.Tr("repo.editor.push_rejected_no_message")) + } else { + flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ + "Message": ctx.Tr("repo.editor.push_rejected"), + "Summary": ctx.Tr("repo.editor.push_rejected_summary"), + "Details": utils.SanitizeFlashErrorString(e.Message), + }) + if err != nil { + ctx.ServerError("UpdatePullRequest.HTMLString", err) + return + } + ctx.Flash.Error(flashError) + } + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + + ctx.ServerError("CreateNewBranch", err) + return + } + + if form.CreateTag { + ctx.Flash.Success(ctx.Tr("repo.tag.create_success", form.NewBranchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/tag/" + util.PathEscapeSegments(form.NewBranchName)) + return + } + + ctx.Flash.Success(ctx.Tr("repo.branch.create_success", form.NewBranchName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(form.NewBranchName)) +} diff --git a/routers/web/repo/commit.go b/routers/web/repo/commit.go new file mode 100644 index 000000000..810581640 --- /dev/null +++ b/routers/web/repo/commit.go @@ -0,0 +1,390 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "errors" + "net/http" + "path" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/charset" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/gitgraph" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/services/gitdiff" +) + +const ( + tplCommits base.TplName = "repo/commits" + tplGraph base.TplName = "repo/graph" + tplGraphDiv base.TplName = "repo/graph/div" + tplCommitPage base.TplName = "repo/commit_page" +) + +// RefCommits render commits page +func RefCommits(ctx *context.Context) { + switch { + case len(ctx.Repo.TreePath) == 0: + Commits(ctx) + case ctx.Repo.TreePath == "search": + SearchCommits(ctx) + default: + FileHistory(ctx) + } +} + +// Commits render branch's commits +func Commits(ctx *context.Context) { + ctx.Data["PageIsCommits"] = true + if ctx.Repo.Commit == nil { + ctx.NotFound("Commit not found", nil) + return + } + ctx.Data["PageIsViewCode"] = true + + commitsCount, err := ctx.Repo.GetCommitsCount() + if err != nil { + ctx.ServerError("GetCommitsCount", err) + return + } + + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + + pageSize := ctx.FormInt("limit") + if pageSize <= 0 { + pageSize = setting.Git.CommitsRangeSize + } + + // Both `git log branchName` and `git log commitId` work. + commits, err := ctx.Repo.Commit.CommitsByRange(page, pageSize) + if err != nil { + ctx.ServerError("CommitsByRange", err) + return + } + ctx.Data["Commits"] = models.ConvertFromGitCommit(commits, ctx.Repo.Repository) + + ctx.Data["Username"] = ctx.Repo.Owner.Name + ctx.Data["Reponame"] = ctx.Repo.Repository.Name + ctx.Data["CommitCount"] = commitsCount + ctx.Data["Branch"] = ctx.Repo.BranchName + + pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplCommits) +} + +// Graph render commit graph - show commits from all branches. +func Graph(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.commit_graph") + ctx.Data["PageIsCommits"] = true + ctx.Data["PageIsViewCode"] = true + mode := strings.ToLower(ctx.FormTrim("mode")) + if mode != "monochrome" { + mode = "color" + } + ctx.Data["Mode"] = mode + hidePRRefs := ctx.FormBool("hide-pr-refs") + ctx.Data["HidePRRefs"] = hidePRRefs + branches := ctx.FormStrings("branch") + realBranches := make([]string, len(branches)) + copy(realBranches, branches) + for i, branch := range realBranches { + if strings.HasPrefix(branch, "--") { + realBranches[i] = "refs/heads/" + branch + } + } + ctx.Data["SelectedBranches"] = realBranches + files := ctx.FormStrings("file") + + commitsCount, err := ctx.Repo.GetCommitsCount() + if err != nil { + ctx.ServerError("GetCommitsCount", err) + return + } + + graphCommitsCount, err := ctx.Repo.GetCommitGraphsCount(hidePRRefs, realBranches, files) + if err != nil { + log.Warn("GetCommitGraphsCount error for generate graph exclude prs: %t branches: %s in %-v, Will Ignore branches and try again. Underlying Error: %v", hidePRRefs, branches, ctx.Repo.Repository, err) + realBranches = []string{} + branches = []string{} + graphCommitsCount, err = ctx.Repo.GetCommitGraphsCount(hidePRRefs, realBranches, files) + if err != nil { + ctx.ServerError("GetCommitGraphsCount", err) + return + } + } + + page := ctx.FormInt("page") + + graph, err := gitgraph.GetCommitGraph(ctx.Repo.GitRepo, page, 0, hidePRRefs, realBranches, files) + if err != nil { + ctx.ServerError("GetCommitGraph", err) + return + } + + if err := graph.LoadAndProcessCommits(ctx.Repo.Repository, ctx.Repo.GitRepo); err != nil { + ctx.ServerError("LoadAndProcessCommits", err) + return + } + + ctx.Data["Graph"] = graph + + gitRefs, err := ctx.Repo.GitRepo.GetRefs() + if err != nil { + ctx.ServerError("GitRepo.GetRefs", err) + return + } + + ctx.Data["AllRefs"] = gitRefs + + ctx.Data["Username"] = ctx.Repo.Owner.Name + ctx.Data["Reponame"] = ctx.Repo.Repository.Name + ctx.Data["CommitCount"] = commitsCount + ctx.Data["Branch"] = ctx.Repo.BranchName + paginator := context.NewPagination(int(graphCommitsCount), setting.UI.GraphMaxCommitNum, page, 5) + paginator.AddParam(ctx, "mode", "Mode") + paginator.AddParam(ctx, "hide-pr-refs", "HidePRRefs") + for _, branch := range branches { + paginator.AddParamString("branch", branch) + } + for _, file := range files { + paginator.AddParamString("file", file) + } + ctx.Data["Page"] = paginator + if ctx.FormBool("div-only") { + ctx.HTML(http.StatusOK, tplGraphDiv) + return + } + + ctx.HTML(http.StatusOK, tplGraph) +} + +// SearchCommits render commits filtered by keyword +func SearchCommits(ctx *context.Context) { + ctx.Data["PageIsCommits"] = true + ctx.Data["PageIsViewCode"] = true + + query := ctx.FormTrim("q") + if len(query) == 0 { + ctx.Redirect(ctx.Repo.RepoLink + "/commits/" + ctx.Repo.BranchNameSubURL()) + return + } + + all := ctx.FormBool("all") + opts := git.NewSearchCommitsOptions(query, all) + commits, err := ctx.Repo.Commit.SearchCommits(opts) + if err != nil { + ctx.ServerError("SearchCommits", err) + return + } + ctx.Data["CommitCount"] = len(commits) + ctx.Data["Commits"] = models.ConvertFromGitCommit(commits, ctx.Repo.Repository) + + ctx.Data["Keyword"] = query + if all { + ctx.Data["All"] = "checked" + } + ctx.Data["Username"] = ctx.Repo.Owner.Name + ctx.Data["Reponame"] = ctx.Repo.Repository.Name + ctx.Data["Branch"] = ctx.Repo.BranchName + ctx.HTML(http.StatusOK, tplCommits) +} + +// FileHistory show a file's reversions +func FileHistory(ctx *context.Context) { + ctx.Data["IsRepoToolbarCommits"] = true + + fileName := ctx.Repo.TreePath + if len(fileName) == 0 { + Commits(ctx) + return + } + + branchName := ctx.Repo.BranchName + commitsCount, err := ctx.Repo.GitRepo.FileCommitsCount(branchName, fileName) + if err != nil { + ctx.ServerError("FileCommitsCount", err) + return + } else if commitsCount == 0 { + ctx.NotFound("FileCommitsCount", nil) + return + } + + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + + commits, err := ctx.Repo.GitRepo.CommitsByFileAndRange(branchName, fileName, page) + if err != nil { + ctx.ServerError("CommitsByFileAndRange", err) + return + } + ctx.Data["Commits"] = models.ConvertFromGitCommit(commits, ctx.Repo.Repository) + + ctx.Data["Username"] = ctx.Repo.Owner.Name + ctx.Data["Reponame"] = ctx.Repo.Repository.Name + ctx.Data["FileName"] = fileName + ctx.Data["CommitCount"] = commitsCount + ctx.Data["Branch"] = branchName + + pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplCommits) +} + +// Diff show different from current commit to previous commit +func Diff(ctx *context.Context) { + ctx.Data["PageIsDiff"] = true + ctx.Data["RequireHighlightJS"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true + + userName := ctx.Repo.Owner.Name + repoName := ctx.Repo.Repository.Name + commitID := ctx.Params(":sha") + var ( + gitRepo *git.Repository + err error + ) + + if ctx.Data["PageIsWiki"] != nil { + gitRepo, err = git.OpenRepository(ctx.Repo.Repository.WikiPath()) + if err != nil { + ctx.ServerError("Repo.GitRepo.GetCommit", err) + return + } + defer gitRepo.Close() + } else { + gitRepo = ctx.Repo.GitRepo + } + + commit, err := gitRepo.GetCommit(commitID) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("Repo.GitRepo.GetCommit", err) + } else { + ctx.ServerError("Repo.GitRepo.GetCommit", err) + } + return + } + if len(commitID) != 40 { + commitID = commit.ID.String() + } + + statuses, err := models.GetLatestCommitStatus(ctx.Repo.Repository.ID, commitID, models.ListOptions{}) + if err != nil { + log.Error("GetLatestCommitStatus: %v", err) + } + + ctx.Data["CommitStatus"] = models.CalcCommitStatus(statuses) + ctx.Data["CommitStatuses"] = statuses + + diff, err := gitdiff.GetDiffCommitWithWhitespaceBehavior(gitRepo, + commitID, setting.Git.MaxGitDiffLines, + setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, + gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string))) + if err != nil { + ctx.NotFound("GetDiffCommitWithWhitespaceBehavior", err) + return + } + + parents := make([]string, commit.ParentCount()) + for i := 0; i < commit.ParentCount(); i++ { + sha, err := commit.ParentID(i) + if err != nil { + ctx.NotFound("repo.Diff", err) + return + } + parents[i] = sha.String() + } + + ctx.Data["CommitID"] = commitID + ctx.Data["AfterCommitID"] = commitID + ctx.Data["Username"] = userName + ctx.Data["Reponame"] = repoName + + var parentCommit *git.Commit + if commit.ParentCount() > 0 { + parentCommit, err = gitRepo.GetCommit(parents[0]) + if err != nil { + ctx.NotFound("GetParentCommit", err) + return + } + } + headTarget := path.Join(userName, repoName) + setCompareContext(ctx, parentCommit, commit, headTarget) + ctx.Data["Title"] = commit.Summary() + " · " + base.ShortSha(commitID) + ctx.Data["Commit"] = commit + verification := models.ParseCommitWithSignature(commit) + ctx.Data["Verification"] = verification + ctx.Data["Author"] = models.ValidateCommitWithEmail(commit) + ctx.Data["Diff"] = diff + ctx.Data["Parents"] = parents + ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0 + + if err := models.CalculateTrustStatus(verification, ctx.Repo.Repository, nil); err != nil { + ctx.ServerError("CalculateTrustStatus", err) + return + } + + note := &git.Note{} + err = git.GetNote(ctx, ctx.Repo.GitRepo, commitID, note) + if err == nil { + ctx.Data["Note"] = string(charset.ToUTF8WithFallback(note.Message)) + ctx.Data["NoteCommit"] = note.Commit + ctx.Data["NoteAuthor"] = models.ValidateCommitWithEmail(note.Commit) + } + + ctx.Data["BranchName"], err = commit.GetBranchName() + if err != nil { + ctx.ServerError("commit.GetBranchName", err) + return + } + + ctx.Data["TagName"], err = commit.GetTagName() + if err != nil { + ctx.ServerError("commit.GetTagName", err) + return + } + ctx.HTML(http.StatusOK, tplCommitPage) +} + +// RawDiff dumps diff results of repository in given commit ID to io.Writer +func RawDiff(ctx *context.Context) { + var repoPath string + if ctx.Data["PageIsWiki"] != nil { + repoPath = ctx.Repo.Repository.WikiPath() + } else { + repoPath = models.RepoPath(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name) + } + if err := git.GetRawDiff( + repoPath, + ctx.Params(":sha"), + git.RawDiffType(ctx.Params(":ext")), + ctx.Resp, + ); err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("GetRawDiff", + errors.New("commit "+ctx.Params(":sha")+" does not exist.")) + return + } + ctx.ServerError("GetRawDiff", err) + return + } +} diff --git a/routers/repo/compare.go b/routers/web/repo/compare.go similarity index 75% rename from routers/repo/compare.go rename to routers/web/repo/compare.go index aa4b3191b..eb6c37a1a 100644 --- a/routers/repo/compare.go +++ b/routers/web/repo/compare.go @@ -6,18 +6,25 @@ package repo import ( "bufio" + "encoding/csv" + "errors" "fmt" "html" + "net/http" "path" + "path/filepath" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/context" + csv_module "code.gitea.io/gitea/modules/csv" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/upload" + "code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/services/gitdiff" ) @@ -26,6 +33,28 @@ const ( tplBlobExcerpt base.TplName = "repo/diff/blob_excerpt" ) +// setCompareContext sets context data. +func setCompareContext(ctx *context.Context, base *git.Commit, head *git.Commit, headTarget string) { + ctx.Data["BaseCommit"] = base + ctx.Data["HeadCommit"] = head + + ctx.Data["GetBlobByPathForCommit"] = func(commit *git.Commit, path string) *git.Blob { + if commit == nil { + return nil + } + + blob, err := commit.GetBlobByPath(path) + if err != nil { + return nil + } + return blob + } + + setPathsCompareContext(ctx, base, head, headTarget) + setImageCompareContext(ctx) + setCsvCompareContext(ctx) +} + // setPathsCompareContext sets context data for source and raw paths func setPathsCompareContext(ctx *context.Context, base *git.Commit, head *git.Commit, headTarget string) { sourcePath := setting.AppSubURL + "/%s/src/commit/%s" @@ -41,27 +70,78 @@ func setPathsCompareContext(ctx *context.Context, base *git.Commit, head *git.Co } // setImageCompareContext sets context data that is required by image compare template -func setImageCompareContext(ctx *context.Context, base *git.Commit, head *git.Commit) { - ctx.Data["IsImageFileInHead"] = head.IsImageFile - ctx.Data["IsImageFileInBase"] = base.IsImageFile - ctx.Data["ImageInfoBase"] = func(name string) *git.ImageMetaData { - if base == nil { - return nil +func setImageCompareContext(ctx *context.Context) { + ctx.Data["IsBlobAnImage"] = func(blob *git.Blob) bool { + if blob == nil { + return false } - result, err := base.ImageInfo(name) + + st, err := blob.GuessContentType() if err != nil { - log.Error("ImageInfo failed: %v", err) - return nil + log.Error("GuessContentType failed: %v", err) + return false } - return result + return st.IsImage() && (setting.UI.SVG.Enabled || !st.IsSvgImage()) } - ctx.Data["ImageInfo"] = func(name string) *git.ImageMetaData { - result, err := head.ImageInfo(name) - if err != nil { - log.Error("ImageInfo failed: %v", err) - return nil +} + +// setCsvCompareContext sets context data that is required by the CSV compare template +func setCsvCompareContext(ctx *context.Context) { + ctx.Data["IsCsvFile"] = func(diffFile *gitdiff.DiffFile) bool { + extension := strings.ToLower(filepath.Ext(diffFile.Name)) + return extension == ".csv" || extension == ".tsv" + } + + type CsvDiffResult struct { + Sections []*gitdiff.TableDiffSection + Error string + } + + ctx.Data["CreateCsvDiff"] = func(diffFile *gitdiff.DiffFile, baseCommit *git.Commit, headCommit *git.Commit) CsvDiffResult { + if diffFile == nil || baseCommit == nil || headCommit == nil { + return CsvDiffResult{nil, ""} } - return result + + errTooLarge := errors.New(ctx.Locale.Tr("repo.error.csv.too_large")) + + csvReaderFromCommit := func(c *git.Commit) (*csv.Reader, error) { + blob, err := c.GetBlobByPath(diffFile.Name) + if err != nil { + return nil, err + } + + if setting.UI.CSV.MaxFileSize != 0 && setting.UI.CSV.MaxFileSize < blob.Size() { + return nil, errTooLarge + } + + reader, err := blob.DataAsync() + if err != nil { + return nil, err + } + defer reader.Close() + + return csv_module.CreateReaderAndGuessDelimiter(charset.ToUTF8WithFallbackReader(reader)) + } + + baseReader, err := csvReaderFromCommit(baseCommit) + if err == errTooLarge { + return CsvDiffResult{nil, err.Error()} + } + headReader, err := csvReaderFromCommit(headCommit) + if err == errTooLarge { + return CsvDiffResult{nil, err.Error()} + } + + sections, err := gitdiff.CreateCsvDiff(diffFile, baseReader, headReader) + if err != nil { + errMessage, err := csv_module.FormatError(err, ctx.Locale) + if err != nil { + log.Error("RenderCsvDiff failed: %v", err) + return CsvDiffResult{nil, ""} + } + return CsvDiffResult{nil, errMessage} + } + return CsvDiffResult{sections, ""} } } @@ -315,7 +395,7 @@ func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, * if rootRepo != nil && rootRepo.ID != headRepo.ID && rootRepo.ID != baseRepo.ID { - perm, branches, err := getBranchesForRepo(ctx.User, rootRepo) + perm, branches, tags, err := getBranchesAndTagsForRepo(ctx.User, rootRepo) if err != nil { ctx.ServerError("GetBranchesForRepo", err) return nil, nil, nil, nil, "", "" @@ -323,19 +403,20 @@ func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, * if perm { ctx.Data["RootRepo"] = rootRepo ctx.Data["RootRepoBranches"] = branches + ctx.Data["RootRepoTags"] = tags } } // If we have a ownForkRepo and it's different from: // 1. The computed base - // 2. The computed hea + // 2. The computed head // 3. The rootRepo (if we have one) // then get the branches from it. if ownForkRepo != nil && ownForkRepo.ID != headRepo.ID && ownForkRepo.ID != baseRepo.ID && (rootRepo == nil || ownForkRepo.ID != rootRepo.ID) { - perm, branches, err := getBranchesForRepo(ctx.User, ownForkRepo) + perm, branches, tags, err := getBranchesAndTagsForRepo(ctx.User, ownForkRepo) if err != nil { ctx.ServerError("GetBranchesForRepo", err) return nil, nil, nil, nil, "", "" @@ -343,6 +424,7 @@ func ParseCompareInfo(ctx *context.Context) (*models.User, *models.Repository, * if perm { ctx.Data["OwnForkRepo"] = ownForkRepo ctx.Data["OwnForkRepoBranches"] = branches + ctx.Data["OwnForkRepoTags"] = tags } } @@ -411,7 +493,8 @@ func PrepareCompareDiff( headRepo *models.Repository, headGitRepo *git.Repository, compareInfo *git.CompareInfo, - baseBranch, headBranch string) bool { + baseBranch, headBranch string, + whitespaceBehavior string) bool { var ( repo = ctx.Repo.Repository @@ -422,31 +505,32 @@ func PrepareCompareDiff( // Get diff information. ctx.Data["CommitRepoLink"] = headRepo.Link() - headCommitID := headBranch - if ctx.Data["HeadIsCommit"] == false { - if ctx.Data["HeadIsTag"] == true { - headCommitID, err = headGitRepo.GetTagCommitID(headBranch) - } else { - headCommitID, err = headGitRepo.GetBranchCommitID(headBranch) - } - if err != nil { - ctx.ServerError("GetRefCommitID", err) - return false - } - } + headCommitID := compareInfo.HeadCommitID ctx.Data["AfterCommitID"] = headCommitID if headCommitID == compareInfo.MergeBase { ctx.Data["IsNothingToCompare"] = true + if unit, err := repo.GetUnit(models.UnitTypePullRequests); err == nil { + config := unit.PullRequestsConfig() + + if !config.AutodetectManualMerge { + allowEmptyPr := !(baseBranch == headBranch && ctx.Repo.Repository.Name == headRepo.Name) + ctx.Data["AllowEmptyPr"] = allowEmptyPr + + return !allowEmptyPr + } + + ctx.Data["AllowEmptyPr"] = false + } return true } - diff, err := gitdiff.GetDiffRange(models.RepoPath(headUser.Name, headRepo.Name), + diff, err := gitdiff.GetDiffRangeWithWhitespaceBehavior(headGitRepo, compareInfo.MergeBase, headCommitID, setting.Git.MaxGitDiffLines, - setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles) + setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, whitespaceBehavior) if err != nil { - ctx.ServerError("GetDiffRange", err) + ctx.ServerError("GetDiffRangeWithWhitespaceBehavior", err) return false } ctx.Data["Diff"] = diff @@ -459,18 +543,7 @@ func PrepareCompareDiff( } baseGitRepo := ctx.Repo.GitRepo - baseCommitID := baseBranch - if ctx.Data["BaseIsCommit"] == false { - if ctx.Data["BaseIsTag"] == true { - baseCommitID, err = baseGitRepo.GetTagCommitID(baseBranch) - } else { - baseCommitID, err = baseGitRepo.GetBranchCommitID(baseBranch) - } - if err != nil { - ctx.ServerError("GetRefCommitID", err) - return false - } - } + baseCommitID := compareInfo.BaseCommitID baseCommit, err := baseGitRepo.GetCommit(baseCommitID) if err != nil { @@ -478,14 +551,12 @@ func PrepareCompareDiff( return false } - compareInfo.Commits = models.ValidateCommitsWithEmails(compareInfo.Commits) - compareInfo.Commits = models.ParseCommitsWithSignature(compareInfo.Commits, headRepo) - compareInfo.Commits = models.ParseCommitsWithStatus(compareInfo.Commits, headRepo) - ctx.Data["Commits"] = compareInfo.Commits - ctx.Data["CommitCount"] = compareInfo.Commits.Len() + commits := models.ConvertFromGitCommit(compareInfo.Commits, headRepo) + ctx.Data["Commits"] = commits + ctx.Data["CommitCount"] = len(commits) - if compareInfo.Commits.Len() == 1 { - c := compareInfo.Commits.Front().Value.(models.SignCommitWithStatuses) + if len(commits) == 1 { + c := commits[0] title = strings.TrimSpace(c.UserCommit.Summary()) body := strings.Split(strings.TrimSpace(c.UserCommit.Message()), "\n") @@ -495,60 +566,95 @@ func PrepareCompareDiff( } else { title = headBranch } + if len(title) > 255 { + var trailer string + title, trailer = util.SplitStringAtByteN(title, 255) + if len(trailer) > 0 { + if ctx.Data["content"] != nil { + ctx.Data["content"] = fmt.Sprintf("%s\n\n%s", trailer, ctx.Data["content"]) + } else { + ctx.Data["content"] = trailer + "\n" + } + } + } + ctx.Data["title"] = title ctx.Data["Username"] = headUser.Name ctx.Data["Reponame"] = headRepo.Name - setImageCompareContext(ctx, baseCommit, headCommit) headTarget := path.Join(headUser.Name, repo.Name) - setPathsCompareContext(ctx, baseCommit, headCommit, headTarget) + setCompareContext(ctx, baseCommit, headCommit, headTarget) return false } -func getBranchesForRepo(user *models.User, repo *models.Repository) (bool, []string, error) { +func getBranchesAndTagsForRepo(user *models.User, repo *models.Repository) (bool, []string, []string, error) { perm, err := models.GetUserRepoPermission(repo, user) if err != nil { - return false, nil, err + return false, nil, nil, err } if !perm.CanRead(models.UnitTypeCode) { - return false, nil, nil + return false, nil, nil, nil } gitRepo, err := git.OpenRepository(repo.RepoPath()) if err != nil { - return false, nil, err + return false, nil, nil, err } defer gitRepo.Close() - branches, err := gitRepo.GetBranches() + branches, _, err := gitRepo.GetBranches(0, 0) if err != nil { - return false, nil, err + return false, nil, nil, err } - return true, branches, nil + tags, err := gitRepo.GetTags() + if err != nil { + return false, nil, nil, err + } + return true, branches, tags, nil } // CompareDiff show different from one commit to another commit func CompareDiff(ctx *context.Context) { headUser, headRepo, headGitRepo, compareInfo, baseBranch, headBranch := ParseCompareInfo(ctx) + defer func() { + if headGitRepo != nil { + headGitRepo.Close() + } + }() if ctx.Written() { return } - defer headGitRepo.Close() - nothingToCompare := PrepareCompareDiff(ctx, headUser, headRepo, headGitRepo, compareInfo, baseBranch, headBranch) + nothingToCompare := PrepareCompareDiff(ctx, headUser, headRepo, headGitRepo, compareInfo, baseBranch, headBranch, + gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string))) if ctx.Written() { return } + baseGitRepo := ctx.Repo.GitRepo + baseTags, err := baseGitRepo.GetTags() + if err != nil { + ctx.ServerError("GetTags", err) + return + } + ctx.Data["Tags"] = baseTags + + headBranches, _, err := headGitRepo.GetBranches(0, 0) + if err != nil { + ctx.ServerError("GetBranches", err) + return + } + ctx.Data["HeadBranches"] = headBranches + + headTags, err := headGitRepo.GetTags() + if err != nil { + ctx.ServerError("GetTags", err) + return + } + ctx.Data["HeadTags"] = headTags + if ctx.Data["PageIsComparePull"] == true { - headBranches, err := headGitRepo.GetBranches() - if err != nil { - ctx.ServerError("GetBranches", err) - return - } - ctx.Data["HeadBranches"] = headBranches - - pr, err := models.GetUnmergedPullRequest(headRepo.ID, ctx.Repo.Repository.ID, headBranch, baseBranch) + pr, err := models.GetUnmergedPullRequest(headRepo.ID, ctx.Repo.Repository.ID, headBranch, baseBranch, models.PullRequestFlowGithub) if err != nil { if !models.IsErrPullRequestNotExist(err) { ctx.ServerError("GetUnmergedPullRequest", err) @@ -557,7 +663,7 @@ func CompareDiff(ctx *context.Context) { } else { ctx.Data["HasPullRequest"] = true ctx.Data["PullRequest"] = pr - ctx.HTML(200, tplCompareDiff) + ctx.HTML(http.StatusOK, tplCompareDiff) return } @@ -585,26 +691,26 @@ func CompareDiff(ctx *context.Context) { ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypePullRequests) - ctx.HTML(200, tplCompare) + ctx.HTML(http.StatusOK, tplCompare) } // ExcerptBlob render blob excerpt contents func ExcerptBlob(ctx *context.Context) { commitID := ctx.Params("sha") - lastLeft := ctx.QueryInt("last_left") - lastRight := ctx.QueryInt("last_right") - idxLeft := ctx.QueryInt("left") - idxRight := ctx.QueryInt("right") - leftHunkSize := ctx.QueryInt("left_hunk_size") - rightHunkSize := ctx.QueryInt("right_hunk_size") - anchor := ctx.Query("anchor") - direction := ctx.Query("direction") - filePath := ctx.Query("path") + lastLeft := ctx.FormInt("last_left") + lastRight := ctx.FormInt("last_right") + idxLeft := ctx.FormInt("left") + idxRight := ctx.FormInt("right") + leftHunkSize := ctx.FormInt("left_hunk_size") + rightHunkSize := ctx.FormInt("right_hunk_size") + anchor := ctx.FormString("anchor") + direction := ctx.FormString("direction") + filePath := ctx.FormString("path") gitRepo := ctx.Repo.GitRepo chunkSize := gitdiff.BlobExcerptChunkSize commit, err := gitRepo.GetCommit(commitID) if err != nil { - ctx.Error(500, "GetCommit") + ctx.Error(http.StatusInternalServerError, "GetCommit") return } section := &gitdiff.DiffSection{ @@ -622,14 +728,18 @@ func ExcerptBlob(ctx *context.Context) { lastLeft += chunkSize lastRight += chunkSize } else { - section.Lines, err = getExcerptLines(commit, filePath, lastLeft, lastRight, idxRight-lastRight-1) + offset := -1 + if direction == "down" { + offset = 0 + } + section.Lines, err = getExcerptLines(commit, filePath, lastLeft, lastRight, idxRight-lastRight+offset) leftHunkSize = 0 rightHunkSize = 0 idxLeft = lastLeft idxRight = lastRight } if err != nil { - ctx.Error(500, "getExcerptLines") + ctx.Error(http.StatusInternalServerError, "getExcerptLines") return } if idxRight > lastRight { @@ -660,7 +770,7 @@ func ExcerptBlob(ctx *context.Context) { ctx.Data["fileName"] = filePath ctx.Data["AfterCommitID"] = commitID ctx.Data["Anchor"] = anchor - ctx.HTML(200, tplBlobExcerpt) + ctx.HTML(http.StatusOK, tplBlobExcerpt) } func getExcerptLines(commit *git.Commit, filePath string, idxLeft int, idxRight int, chunkSize int) ([]*gitdiff.DiffLine, error) { diff --git a/routers/web/repo/download.go b/routers/web/repo/download.go new file mode 100644 index 000000000..2307f736a --- /dev/null +++ b/routers/web/repo/download.go @@ -0,0 +1,143 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/httpcache" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/routers/common" +) + +// ServeBlobOrLFS download a git.Blob redirecting to LFS if necessary +func ServeBlobOrLFS(ctx *context.Context, blob *git.Blob) error { + if httpcache.HandleGenericETagCache(ctx.Req, ctx.Resp, `"`+blob.ID.String()+`"`) { + return nil + } + + dataRc, err := blob.DataAsync() + if err != nil { + return err + } + closed := false + defer func() { + if closed { + return + } + if err = dataRc.Close(); err != nil { + log.Error("ServeBlobOrLFS: Close: %v", err) + } + }() + + pointer, _ := lfs.ReadPointer(dataRc) + if pointer.IsValid() { + meta, _ := ctx.Repo.Repository.GetLFSMetaObjectByOid(pointer.Oid) + if meta == nil { + if err = dataRc.Close(); err != nil { + log.Error("ServeBlobOrLFS: Close: %v", err) + } + closed = true + return common.ServeBlob(ctx, blob) + } + if httpcache.HandleGenericETagCache(ctx.Req, ctx.Resp, `"`+pointer.Oid+`"`) { + return nil + } + + if setting.LFS.ServeDirect { + //If we have a signed url (S3, object storage), redirect to this directly. + u, err := storage.LFS.URL(pointer.RelativePath(), blob.Name()) + if u != nil && err == nil { + ctx.Redirect(u.String()) + return nil + } + } + + lfsDataRc, err := lfs.ReadMetaObject(meta.Pointer) + if err != nil { + return err + } + defer func() { + if err = lfsDataRc.Close(); err != nil { + log.Error("ServeBlobOrLFS: Close: %v", err) + } + }() + return common.ServeData(ctx, ctx.Repo.TreePath, meta.Size, lfsDataRc) + } + if err = dataRc.Close(); err != nil { + log.Error("ServeBlobOrLFS: Close: %v", err) + } + closed = true + + return common.ServeBlob(ctx, blob) +} + +// SingleDownload download a file by repos path +func SingleDownload(ctx *context.Context) { + blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreePath) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("GetBlobByPath", nil) + } else { + ctx.ServerError("GetBlobByPath", err) + } + return + } + if err = common.ServeBlob(ctx, blob); err != nil { + ctx.ServerError("ServeBlob", err) + } +} + +// SingleDownloadOrLFS download a file by repos path redirecting to LFS if necessary +func SingleDownloadOrLFS(ctx *context.Context) { + blob, err := ctx.Repo.Commit.GetBlobByPath(ctx.Repo.TreePath) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("GetBlobByPath", nil) + } else { + ctx.ServerError("GetBlobByPath", err) + } + return + } + if err = ServeBlobOrLFS(ctx, blob); err != nil { + ctx.ServerError("ServeBlobOrLFS", err) + } +} + +// DownloadByID download a file by sha1 ID +func DownloadByID(ctx *context.Context) { + blob, err := ctx.Repo.GitRepo.GetBlob(ctx.Params("sha")) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("GetBlob", nil) + } else { + ctx.ServerError("GetBlob", err) + } + return + } + if err = common.ServeBlob(ctx, blob); err != nil { + ctx.ServerError("ServeBlob", err) + } +} + +// DownloadByIDOrLFS download a file by sha1 ID taking account of LFS +func DownloadByIDOrLFS(ctx *context.Context) { + blob, err := ctx.Repo.GitRepo.GetBlob(ctx.Params("sha")) + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("GetBlob", nil) + } else { + ctx.ServerError("GetBlob", err) + } + return + } + if err = ServeBlobOrLFS(ctx, blob); err != nil { + ctx.ServerError("ServeBlob", err) + } +} diff --git a/routers/repo/editor.go b/routers/web/repo/editor.go similarity index 87% rename from routers/repo/editor.go rename to routers/web/repo/editor.go index 7538c4cda..a99c1c7c6 100644 --- a/routers/repo/editor.go +++ b/routers/web/repo/editor.go @@ -5,26 +5,28 @@ package repo import ( - "encoding/json" "fmt" "io/ioutil" + "net/http" "path" - "path/filepath" "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/repofiles" repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/typesniffer" "code.gitea.io/gitea/modules/upload" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" "code.gitea.io/gitea/routers/utils" + "code.gitea.io/gitea/services/forms" ) const ( @@ -79,7 +81,11 @@ func editFile(ctx *context.Context, isNewFile bool) { return } - treeNames, treePaths := getParentTreeFields(ctx.Repo.TreePath) + // Check if the filename (and additional path) is specified in the querystring + // (filename is a misnomer, but kept for compatibility with Github) + filePath, fileName := path.Split(ctx.Req.URL.Query().Get("filename")) + filePath = strings.Trim(filePath, "/") + treeNames, treePaths := getParentTreeFields(path.Join(ctx.Repo.TreePath, filePath)) if !isNewFile { entry, err := ctx.Repo.Commit.GetTreeEntryByPath(ctx.Repo.TreePath) @@ -105,6 +111,7 @@ func editFile(ctx *context.Context, isNewFile bool) { ctx.NotFound("blob.Data", err) return } + defer dataRc.Close() ctx.Data["FileSize"] = blob.Size() @@ -115,12 +122,16 @@ func editFile(ctx *context.Context, isNewFile bool) { buf = buf[:n] // Only some file types are editable online as text. - if !base.IsRepresentableAsText(buf) { - ctx.NotFound("base.IsRepresentableAsText", nil) + if !typesniffer.DetectContentType(buf).IsRepresentableAsText() { + ctx.NotFound("typesniffer.IsRepresentableAsText", nil) return } d, _ := ioutil.ReadAll(dataRc) + if err := dataRc.Close(); err != nil { + log.Error("Error whilst closing blob data: %v", err) + } + buf = append(buf, d...) if content, err := charset.ToUTF8WithErr(buf); err != nil { log.Error("ToUTF8WithErr: %v", err) @@ -129,7 +140,8 @@ func editFile(ctx *context.Context, isNewFile bool) { ctx.Data["FileContent"] = content } } else { - treeNames = append(treeNames, "") // Append empty string to allow user name the new file. + // Append filename from query, or empty string to allow user name the new file. + treeNames = append(treeNames, fileName) } ctx.Data["TreeNames"] = treeNames @@ -149,7 +161,7 @@ func editFile(ctx *context.Context, isNewFile bool) { ctx.Data["PreviewableFileModes"] = strings.Join(setting.Repository.Editor.PreviewableFileModes, ",") ctx.Data["Editorconfig"] = GetEditorConfig(ctx, treePath) - ctx.HTML(200, tplEditFile) + ctx.HTML(http.StatusOK, tplEditFile) } // GetEditorConfig returns a editorconfig JSON string for given treePath or "null" @@ -175,7 +187,7 @@ func NewFile(ctx *context.Context) { editFile(ctx, true) } -func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bool) { +func editFilePost(ctx *context.Context, form forms.EditRepoFileForm, isNewFile bool) { canCommit := renderCommitRights(ctx) treeNames, treePaths := getParentTreeFields(form.TreePath) branchName := ctx.Repo.BranchName @@ -204,7 +216,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo ctx.Data["Editorconfig"] = GetEditorConfig(ctx, form.TreePath) if ctx.HasError() { - ctx.HTML(200, tplEditFile) + ctx.HTML(http.StatusOK, tplEditFile) return } @@ -240,6 +252,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo Message: message, Content: strings.ReplaceAll(form.Content, "\r", ""), IsNewFile: isNewFile, + Signoff: form.Signoff, }); err != nil { // This is where we handle all the errors thrown by repofiles.CreateOrUpdateRepoFile if git.IsErrNotExist(err) { @@ -261,10 +274,10 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo case git.EntryModeBlob: ctx.RenderWithErr(ctx.Tr("repo.editor.directory_is_a_file", fileErr.Path), tplEditFile, &form) default: - ctx.Error(500, err.Error()) + ctx.Error(http.StatusInternalServerError, err.Error()) } } else { - ctx.Error(500, err.Error()) + ctx.Error(http.StatusInternalServerError, err.Error()) } } else if models.IsErrRepoFileAlreadyExists(err) { ctx.Data["Err_TreePath"] = true @@ -274,7 +287,7 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo if branchErr, ok := err.(git.ErrBranchNotExist); ok { ctx.RenderWithErr(ctx.Tr("repo.editor.branch_does_not_exist", branchErr.Name), tplEditFile, &form) } else { - ctx.Error(500, err.Error()) + ctx.Error(http.StatusInternalServerError, err.Error()) } } else if models.IsErrBranchAlreadyExists(err) { // For when a user specifies a new branch that already exists @@ -282,12 +295,12 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo if branchErr, ok := err.(models.ErrBranchAlreadyExists); ok { ctx.RenderWithErr(ctx.Tr("repo.editor.branch_already_exists", branchErr.BranchName), tplEditFile, &form) } else { - ctx.Error(500, err.Error()) + ctx.Error(http.StatusInternalServerError, err.Error()) } } else if models.IsErrCommitIDDoesNotMatch(err) { ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+form.LastCommit+"..."+ctx.Repo.CommitID), tplEditFile, &form) } else if git.IsErrPushOutOfDate(err) { - ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+form.LastCommit+"..."+form.NewBranchName), tplEditFile, &form) + ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+form.LastCommit+"..."+util.PathEscapeSegments(form.NewBranchName)), tplEditFile, &form) } else if git.IsErrPushRejected(err) { errPushRej := err.(*git.ErrPushRejected) if len(errPushRej.Message) == 0 { @@ -319,42 +332,45 @@ func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bo } if form.CommitChoice == frmCommitChoiceNewBranch && ctx.Repo.Repository.UnitEnabled(models.UnitTypePullRequests) { - ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + ctx.Repo.BranchName + "..." + form.NewBranchName) + ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + util.PathEscapeSegments(ctx.Repo.BranchName) + "..." + util.PathEscapeSegments(form.NewBranchName)) } else { ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(branchName) + "/" + util.PathEscapeSegments(form.TreePath)) } } // EditFilePost response for editing file -func EditFilePost(ctx *context.Context, form auth.EditRepoFileForm) { - editFilePost(ctx, form, false) +func EditFilePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditRepoFileForm) + editFilePost(ctx, *form, false) } // NewFilePost response for creating file -func NewFilePost(ctx *context.Context, form auth.EditRepoFileForm) { - editFilePost(ctx, form, true) +func NewFilePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditRepoFileForm) + editFilePost(ctx, *form, true) } // DiffPreviewPost render preview diff page -func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm) { +func DiffPreviewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditPreviewDiffForm) treePath := cleanUploadFileName(ctx.Repo.TreePath) if len(treePath) == 0 { - ctx.Error(500, "file name to diff is invalid") + ctx.Error(http.StatusInternalServerError, "file name to diff is invalid") return } entry, err := ctx.Repo.Commit.GetTreeEntryByPath(treePath) if err != nil { - ctx.Error(500, "GetTreeEntryByPath: "+err.Error()) + ctx.Error(http.StatusInternalServerError, "GetTreeEntryByPath: "+err.Error()) return } else if entry.IsDir() { - ctx.Error(422) + ctx.Error(http.StatusUnprocessableEntity) return } diff, err := repofiles.GetDiffPreview(ctx.Repo.Repository, ctx.Repo.BranchName, treePath, form.Content) if err != nil { - ctx.Error(500, "GetDiffPreview: "+err.Error()) + ctx.Error(http.StatusInternalServerError, "GetDiffPreview: "+err.Error()) return } @@ -364,7 +380,7 @@ func DiffPreviewPost(ctx *context.Context, form auth.EditPreviewDiffForm) { } ctx.Data["File"] = diff.Files[0] - ctx.HTML(200, tplEditDiffPreview) + ctx.HTML(http.StatusOK, tplEditDiffPreview) } // DeleteFile render delete file page @@ -391,11 +407,12 @@ func DeleteFile(ctx *context.Context) { } ctx.Data["new_branch_name"] = GetUniquePatchBranchName(ctx) - ctx.HTML(200, tplDeleteFile) + ctx.HTML(http.StatusOK, tplDeleteFile) } // DeleteFilePost response for deleting file -func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm) { +func DeleteFilePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.DeleteRepoFileForm) canCommit := renderCommitRights(ctx) branchName := ctx.Repo.BranchName if form.CommitChoice == frmCommitChoiceNewBranch { @@ -412,7 +429,7 @@ func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm) { ctx.Data["last_commit"] = ctx.Repo.CommitID if ctx.HasError() { - ctx.HTML(200, tplDeleteFile) + ctx.HTML(http.StatusOK, tplDeleteFile) return } @@ -438,6 +455,7 @@ func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm) { NewBranch: branchName, TreePath: ctx.Repo.TreePath, Message: message, + Signoff: form.Signoff, }); err != nil { // This is where we handle all the errors thrown by repofiles.DeleteRepoFile if git.IsErrNotExist(err) || models.IsErrRepoFileDoesNotExist(err) { @@ -466,14 +484,14 @@ func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm) { if branchErr, ok := err.(git.ErrBranchNotExist); ok { ctx.RenderWithErr(ctx.Tr("repo.editor.branch_does_not_exist", branchErr.Name), tplDeleteFile, &form) } else { - ctx.Error(500, err.Error()) + ctx.Error(http.StatusInternalServerError, err.Error()) } } else if models.IsErrBranchAlreadyExists(err) { // For when a user specifies a new branch that already exists if branchErr, ok := err.(models.ErrBranchAlreadyExists); ok { ctx.RenderWithErr(ctx.Tr("repo.editor.branch_already_exists", branchErr.BranchName), tplDeleteFile, &form) } else { - ctx.Error(500, err.Error()) + ctx.Error(http.StatusInternalServerError, err.Error()) } } else if models.IsErrCommitIDDoesNotMatch(err) || git.IsErrPushOutOfDate(err) { ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_deleting", ctx.Repo.RepoLink+"/compare/"+form.LastCommit+"..."+ctx.Repo.CommitID), tplDeleteFile, &form) @@ -500,9 +518,9 @@ func DeleteFilePost(ctx *context.Context, form auth.DeleteRepoFileForm) { ctx.Flash.Success(ctx.Tr("repo.editor.file_delete_success", ctx.Repo.TreePath)) if form.CommitChoice == frmCommitChoiceNewBranch && ctx.Repo.Repository.UnitEnabled(models.UnitTypePullRequests) { - ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + ctx.Repo.BranchName + "..." + form.NewBranchName) + ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + util.PathEscapeSegments(ctx.Repo.BranchName) + "..." + util.PathEscapeSegments(form.NewBranchName)) } else { - treePath := filepath.Dir(ctx.Repo.TreePath) + treePath := path.Dir(ctx.Repo.TreePath) if treePath == "." { treePath = "" // the file deleted was in the root, so we return the user to the root directory } @@ -553,11 +571,12 @@ func UploadFile(ctx *context.Context) { } ctx.Data["new_branch_name"] = GetUniquePatchBranchName(ctx) - ctx.HTML(200, tplUploadFile) + ctx.HTML(http.StatusOK, tplUploadFile) } // UploadFilePost response for uploading file -func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm) { +func UploadFilePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.UploadRepoFileForm) ctx.Data["PageIsUpload"] = true ctx.Data["RequireTribute"] = true ctx.Data["RequireSimpleMDE"] = true @@ -589,7 +608,7 @@ func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm) { ctx.Data["new_branch_name"] = branchName if ctx.HasError() { - ctx.HTML(200, tplUploadFile) + ctx.HTML(http.StatusOK, tplUploadFile) return } @@ -645,6 +664,7 @@ func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm) { TreePath: form.TreePath, Message: message, Files: form.Files, + Signoff: form.Signoff, }); err != nil { if models.IsErrLFSFileLocked(err) { ctx.Data["Err_TreePath"] = true @@ -663,7 +683,7 @@ func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm) { case git.EntryModeBlob: ctx.RenderWithErr(ctx.Tr("repo.editor.directory_is_a_file", fileErr.Path), tplUploadFile, &form) default: - ctx.Error(500, err.Error()) + ctx.Error(http.StatusInternalServerError, err.Error()) } } else if models.IsErrRepoFileAlreadyExists(err) { ctx.Data["Err_TreePath"] = true @@ -677,7 +697,7 @@ func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm) { branchErr := err.(models.ErrBranchAlreadyExists) ctx.RenderWithErr(ctx.Tr("repo.editor.branch_already_exists", branchErr.BranchName), tplUploadFile, &form) } else if git.IsErrPushOutOfDate(err) { - ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+ctx.Repo.CommitID+"..."+form.NewBranchName), tplUploadFile, &form) + ctx.RenderWithErr(ctx.Tr("repo.editor.file_changed_while_editing", ctx.Repo.RepoLink+"/compare/"+ctx.Repo.CommitID+"..."+util.PathEscapeSegments(form.NewBranchName)), tplUploadFile, &form) } else if git.IsErrPushRejected(err) { errPushRej := err.(*git.ErrPushRejected) if len(errPushRej.Message) == 0 { @@ -703,7 +723,7 @@ func UploadFilePost(ctx *context.Context, form auth.UploadRepoFileForm) { } if form.CommitChoice == frmCommitChoiceNewBranch && ctx.Repo.Repository.UnitEnabled(models.UnitTypePullRequests) { - ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + ctx.Repo.BranchName + "..." + form.NewBranchName) + ctx.Redirect(ctx.Repo.RepoLink + "/compare/" + util.PathEscapeSegments(ctx.Repo.BranchName) + "..." + util.PathEscapeSegments(form.NewBranchName)) } else { ctx.Redirect(ctx.Repo.RepoLink + "/src/branch/" + util.PathEscapeSegments(branchName) + "/" + util.PathEscapeSegments(form.TreePath)) } @@ -725,7 +745,7 @@ func cleanUploadFileName(name string) string { func UploadFileToServer(ctx *context.Context) { file, header, err := ctx.Req.FormFile("file") if err != nil { - ctx.Error(500, fmt.Sprintf("FormFile: %v", err)) + ctx.Error(http.StatusInternalServerError, fmt.Sprintf("FormFile: %v", err)) return } defer file.Close() @@ -738,37 +758,38 @@ func UploadFileToServer(ctx *context.Context) { err = upload.Verify(buf, header.Filename, setting.Repository.Upload.AllowedTypes) if err != nil { - ctx.Error(400, err.Error()) + ctx.Error(http.StatusBadRequest, err.Error()) return } name := cleanUploadFileName(header.Filename) if len(name) == 0 { - ctx.Error(500, "Upload file name is invalid") + ctx.Error(http.StatusInternalServerError, "Upload file name is invalid") return } upload, err := models.NewUpload(name, buf, file) if err != nil { - ctx.Error(500, fmt.Sprintf("NewUpload: %v", err)) + ctx.Error(http.StatusInternalServerError, fmt.Sprintf("NewUpload: %v", err)) return } log.Trace("New file uploaded: %s", upload.UUID) - ctx.JSON(200, map[string]string{ + ctx.JSON(http.StatusOK, map[string]string{ "uuid": upload.UUID, }) } // RemoveUploadFileFromServer remove file from server file dir -func RemoveUploadFileFromServer(ctx *context.Context, form auth.RemoveUploadFileForm) { +func RemoveUploadFileFromServer(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.RemoveUploadFileForm) if len(form.File) == 0 { ctx.Status(204) return } if err := models.DeleteUploadByUUID(form.File); err != nil { - ctx.Error(500, fmt.Sprintf("DeleteUploadByUUID: %v", err)) + ctx.Error(http.StatusInternalServerError, fmt.Sprintf("DeleteUploadByUUID: %v", err)) return } @@ -805,10 +826,10 @@ func GetClosestParentWithFiles(treePath string, commit *git.Commit) string { // see if the tree has entries if tree, err := commit.SubTree(treePath); err != nil { // failed to get tree, going up a dir - return GetClosestParentWithFiles(filepath.Dir(treePath), commit) + return GetClosestParentWithFiles(path.Dir(treePath), commit) } else if entries, err := tree.ListEntries(); err != nil || len(entries) == 0 { // no files in this dir, going up a dir - return GetClosestParentWithFiles(filepath.Dir(treePath), commit) + return GetClosestParentWithFiles(path.Dir(treePath), commit) } return treePath } diff --git a/routers/repo/editor_test.go b/routers/web/repo/editor_test.go similarity index 100% rename from routers/repo/editor_test.go rename to routers/web/repo/editor_test.go diff --git a/routers/web/repo/http.go b/routers/web/repo/http.go new file mode 100644 index 000000000..6078d764b --- /dev/null +++ b/routers/web/repo/http.go @@ -0,0 +1,626 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "bytes" + "compress/gzip" + gocontext "context" + "fmt" + "io/ioutil" + "net/http" + "os" + "os/exec" + "path" + "regexp" + "strconv" + "strings" + "sync" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/process" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/util" + repo_service "code.gitea.io/gitea/services/repository" +) + +// httpBase implementation git smart HTTP protocol +func httpBase(ctx *context.Context) (h *serviceHandler) { + if setting.Repository.DisableHTTPGit { + ctx.Resp.WriteHeader(http.StatusForbidden) + _, err := ctx.Resp.Write([]byte("Interacting with repositories by HTTP protocol is not allowed")) + if err != nil { + log.Error(err.Error()) + } + return + } + + if len(setting.Repository.AccessControlAllowOrigin) > 0 { + allowedOrigin := setting.Repository.AccessControlAllowOrigin + // Set CORS headers for browser-based git clients + ctx.Resp.Header().Set("Access-Control-Allow-Origin", allowedOrigin) + ctx.Resp.Header().Set("Access-Control-Allow-Headers", "Content-Type, Authorization, User-Agent") + + // Handle preflight OPTIONS request + if ctx.Req.Method == "OPTIONS" { + if allowedOrigin == "*" { + ctx.Status(http.StatusOK) + } else if allowedOrigin == "null" { + ctx.Status(http.StatusForbidden) + } else { + origin := ctx.Req.Header.Get("Origin") + if len(origin) > 0 && origin == allowedOrigin { + ctx.Status(http.StatusOK) + } else { + ctx.Status(http.StatusForbidden) + } + } + return + } + } + + username := ctx.Params(":username") + reponame := strings.TrimSuffix(ctx.Params(":reponame"), ".git") + + if ctx.FormString("go-get") == "1" { + context.EarlyResponseForGoGetMeta(ctx) + return + } + + var isPull, receivePack bool + service := ctx.FormString("service") + if service == "git-receive-pack" || + strings.HasSuffix(ctx.Req.URL.Path, "git-receive-pack") { + isPull = false + receivePack = true + } else if service == "git-upload-pack" || + strings.HasSuffix(ctx.Req.URL.Path, "git-upload-pack") { + isPull = true + } else if service == "git-upload-archive" || + strings.HasSuffix(ctx.Req.URL.Path, "git-upload-archive") { + isPull = true + } else { + isPull = ctx.Req.Method == "GET" + } + + var accessMode models.AccessMode + if isPull { + accessMode = models.AccessModeRead + } else { + accessMode = models.AccessModeWrite + } + + isWiki := false + var unitType = models.UnitTypeCode + var wikiRepoName string + if strings.HasSuffix(reponame, ".wiki") { + isWiki = true + unitType = models.UnitTypeWiki + wikiRepoName = reponame + reponame = reponame[:len(reponame)-5] + } + + owner, err := models.GetUserByName(username) + if err != nil { + if models.IsErrUserNotExist(err) { + if redirectUserID, err := models.LookupUserRedirect(username); err == nil { + context.RedirectToUser(ctx, username, redirectUserID) + } else { + ctx.NotFound(fmt.Sprintf("User %s does not exist", username), nil) + } + } else { + ctx.ServerError("GetUserByName", err) + } + return + } + if !owner.IsOrganization() && !owner.IsActive { + ctx.HandleText(http.StatusForbidden, "Repository cannot be accessed. You cannot push or open issues/pull-requests.") + return + } + + repoExist := true + repo, err := models.GetRepositoryByName(owner.ID, reponame) + if err != nil { + if models.IsErrRepoNotExist(err) { + if redirectRepoID, err := models.LookupRepoRedirect(owner.ID, reponame); err == nil { + context.RedirectToRepo(ctx, redirectRepoID) + return + } + repoExist = false + } else { + ctx.ServerError("GetRepositoryByName", err) + return + } + } + + // Don't allow pushing if the repo is archived + if repoExist && repo.IsArchived && !isPull { + ctx.HandleText(http.StatusForbidden, "This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.") + return + } + + // Only public pull don't need auth. + isPublicPull := repoExist && !repo.IsPrivate && isPull + var ( + askAuth = !isPublicPull || setting.Service.RequireSignInView + environ []string + ) + + // don't allow anonymous pulls if organization is not public + if isPublicPull { + if err := repo.GetOwner(); err != nil { + ctx.ServerError("GetOwner", err) + return + } + + askAuth = askAuth || (repo.Owner.Visibility != structs.VisibleTypePublic) + } + + // check access + if askAuth { + // rely on the results of Contexter + if !ctx.IsSigned { + // TODO: support digit auth - which would be Authorization header with digit + ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=\".\"") + ctx.Error(http.StatusUnauthorized) + return + } + + if ctx.IsBasicAuth && ctx.Data["IsApiToken"] != true { + _, err = models.GetTwoFactorByUID(ctx.User.ID) + if err == nil { + // TODO: This response should be changed to "invalid credentials" for security reasons once the expectation behind it (creating an app token to authenticate) is properly documented + ctx.HandleText(http.StatusUnauthorized, "Users with two-factor authentication enabled cannot perform HTTP/HTTPS operations via plain username and password. Please create and use a personal access token on the user settings page") + return + } else if !models.IsErrTwoFactorNotEnrolled(err) { + ctx.ServerError("IsErrTwoFactorNotEnrolled", err) + return + } + } + + if !ctx.User.IsActive || ctx.User.ProhibitLogin { + ctx.HandleText(http.StatusForbidden, "Your account is disabled.") + return + } + + if repoExist { + perm, err := models.GetUserRepoPermission(repo, ctx.User) + if err != nil { + ctx.ServerError("GetUserRepoPermission", err) + return + } + + // Because of special ref "refs/for" .. , need delay write permission check + if git.SupportProcReceive { + accessMode = models.AccessModeRead + } + + if !perm.CanAccess(accessMode, unitType) { + ctx.HandleText(http.StatusForbidden, "User permission denied") + return + } + + if !isPull && repo.IsMirror { + ctx.HandleText(http.StatusForbidden, "mirror repository is read-only") + return + } + } + + environ = []string{ + models.EnvRepoUsername + "=" + username, + models.EnvRepoName + "=" + reponame, + models.EnvPusherName + "=" + ctx.User.Name, + models.EnvPusherID + fmt.Sprintf("=%d", ctx.User.ID), + models.EnvIsDeployKey + "=false", + models.EnvAppURL + "=" + setting.AppURL, + } + + if !ctx.User.KeepEmailPrivate { + environ = append(environ, models.EnvPusherEmail+"="+ctx.User.Email) + } + + if isWiki { + environ = append(environ, models.EnvRepoIsWiki+"=true") + } else { + environ = append(environ, models.EnvRepoIsWiki+"=false") + } + } + + if !repoExist { + if !receivePack { + ctx.HandleText(http.StatusNotFound, "Repository not found") + return + } + + if isWiki { // you cannot send wiki operation before create the repository + ctx.HandleText(http.StatusNotFound, "Repository not found") + return + } + + if owner.IsOrganization() && !setting.Repository.EnablePushCreateOrg { + ctx.HandleText(http.StatusForbidden, "Push to create is not enabled for organizations.") + return + } + if !owner.IsOrganization() && !setting.Repository.EnablePushCreateUser { + ctx.HandleText(http.StatusForbidden, "Push to create is not enabled for users.") + return + } + + // Return dummy payload if GET receive-pack + if ctx.Req.Method == http.MethodGet { + dummyInfoRefs(ctx) + return + } + + repo, err = repo_service.PushCreateRepo(ctx.User, owner, reponame) + if err != nil { + log.Error("pushCreateRepo: %v", err) + ctx.Status(http.StatusNotFound) + return + } + } + + if isWiki { + // Ensure the wiki is enabled before we allow access to it + if _, err := repo.GetUnit(models.UnitTypeWiki); err != nil { + if models.IsErrUnitTypeNotExist(err) { + ctx.HandleText(http.StatusForbidden, "repository wiki is disabled") + return + } + log.Error("Failed to get the wiki unit in %-v Error: %v", repo, err) + ctx.ServerError("GetUnit(UnitTypeWiki) for "+repo.FullName(), err) + return + } + } + + environ = append(environ, models.EnvRepoID+fmt.Sprintf("=%d", repo.ID)) + + w := ctx.Resp + r := ctx.Req + cfg := &serviceConfig{ + UploadPack: true, + ReceivePack: true, + Env: environ, + } + + r.URL.Path = strings.ToLower(r.URL.Path) // blue: In case some repo name has upper case name + + dir := models.RepoPath(username, reponame) + if isWiki { + dir = models.RepoPath(username, wikiRepoName) + } + + return &serviceHandler{cfg, w, r, dir, cfg.Env} +} + +var ( + infoRefsCache []byte + infoRefsOnce sync.Once +) + +func dummyInfoRefs(ctx *context.Context) { + infoRefsOnce.Do(func() { + tmpDir, err := ioutil.TempDir(os.TempDir(), "gitea-info-refs-cache") + if err != nil { + log.Error("Failed to create temp dir for git-receive-pack cache: %v", err) + return + } + + defer func() { + if err := util.RemoveAll(tmpDir); err != nil { + log.Error("RemoveAll: %v", err) + } + }() + + if err := git.InitRepository(tmpDir, true); err != nil { + log.Error("Failed to init bare repo for git-receive-pack cache: %v", err) + return + } + + refs, err := git.NewCommand("receive-pack", "--stateless-rpc", "--advertise-refs", ".").RunInDirBytes(tmpDir) + if err != nil { + log.Error(fmt.Sprintf("%v - %s", err, string(refs))) + } + + log.Debug("populating infoRefsCache: \n%s", string(refs)) + infoRefsCache = refs + }) + + ctx.Header().Set("Expires", "Fri, 01 Jan 1980 00:00:00 GMT") + ctx.Header().Set("Pragma", "no-cache") + ctx.Header().Set("Cache-Control", "no-cache, max-age=0, must-revalidate") + ctx.Header().Set("Content-Type", "application/x-git-receive-pack-advertisement") + _, _ = ctx.Write(packetWrite("# service=git-receive-pack\n")) + _, _ = ctx.Write([]byte("0000")) + _, _ = ctx.Write(infoRefsCache) +} + +type serviceConfig struct { + UploadPack bool + ReceivePack bool + Env []string +} + +type serviceHandler struct { + cfg *serviceConfig + w http.ResponseWriter + r *http.Request + dir string + environ []string +} + +func (h *serviceHandler) setHeaderNoCache() { + h.w.Header().Set("Expires", "Fri, 01 Jan 1980 00:00:00 GMT") + h.w.Header().Set("Pragma", "no-cache") + h.w.Header().Set("Cache-Control", "no-cache, max-age=0, must-revalidate") +} + +func (h *serviceHandler) setHeaderCacheForever() { + now := time.Now().Unix() + expires := now + 31536000 + h.w.Header().Set("Date", fmt.Sprintf("%d", now)) + h.w.Header().Set("Expires", fmt.Sprintf("%d", expires)) + h.w.Header().Set("Cache-Control", "public, max-age=31536000") +} + +func containsParentDirectorySeparator(v string) bool { + if !strings.Contains(v, "..") { + return false + } + for _, ent := range strings.FieldsFunc(v, isSlashRune) { + if ent == ".." { + return true + } + } + return false +} + +func isSlashRune(r rune) bool { return r == '/' || r == '\\' } + +func (h *serviceHandler) sendFile(contentType, file string) { + if containsParentDirectorySeparator(file) { + log.Error("request file path contains invalid path: %v", file) + h.w.WriteHeader(http.StatusBadRequest) + return + } + reqFile := path.Join(h.dir, file) + + fi, err := os.Stat(reqFile) + if os.IsNotExist(err) { + h.w.WriteHeader(http.StatusNotFound) + return + } + + h.w.Header().Set("Content-Type", contentType) + h.w.Header().Set("Content-Length", fmt.Sprintf("%d", fi.Size())) + h.w.Header().Set("Last-Modified", fi.ModTime().Format(http.TimeFormat)) + http.ServeFile(h.w, h.r, reqFile) +} + +// one or more key=value pairs separated by colons +var safeGitProtocolHeader = regexp.MustCompile(`^[0-9a-zA-Z]+=[0-9a-zA-Z]+(:[0-9a-zA-Z]+=[0-9a-zA-Z]+)*$`) + +func getGitConfig(option, dir string) string { + out, err := git.NewCommand("config", option).RunInDir(dir) + if err != nil { + log.Error("%v - %s", err, out) + } + return out[0 : len(out)-1] +} + +func getConfigSetting(service, dir string) bool { + service = strings.ReplaceAll(service, "-", "") + setting := getGitConfig("http."+service, dir) + + if service == "uploadpack" { + return setting != "false" + } + + return setting == "true" +} + +func hasAccess(service string, h serviceHandler, checkContentType bool) bool { + if checkContentType { + if h.r.Header.Get("Content-Type") != fmt.Sprintf("application/x-git-%s-request", service) { + return false + } + } + + if !(service == "upload-pack" || service == "receive-pack") { + return false + } + if service == "receive-pack" { + return h.cfg.ReceivePack + } + if service == "upload-pack" { + return h.cfg.UploadPack + } + + return getConfigSetting(service, h.dir) +} + +func serviceRPC(h serviceHandler, service string) { + defer func() { + if err := h.r.Body.Close(); err != nil { + log.Error("serviceRPC: Close: %v", err) + } + + }() + + if !hasAccess(service, h, true) { + h.w.WriteHeader(http.StatusUnauthorized) + return + } + + h.w.Header().Set("Content-Type", fmt.Sprintf("application/x-git-%s-result", service)) + + var err error + var reqBody = h.r.Body + + // Handle GZIP. + if h.r.Header.Get("Content-Encoding") == "gzip" { + reqBody, err = gzip.NewReader(reqBody) + if err != nil { + log.Error("Fail to create gzip reader: %v", err) + h.w.WriteHeader(http.StatusInternalServerError) + return + } + } + + // set this for allow pre-receive and post-receive execute + h.environ = append(h.environ, "SSH_ORIGINAL_COMMAND="+service) + + if protocol := h.r.Header.Get("Git-Protocol"); protocol != "" && safeGitProtocolHeader.MatchString(protocol) { + h.environ = append(h.environ, "GIT_PROTOCOL="+protocol) + } + + ctx, cancel := gocontext.WithCancel(git.DefaultContext) + defer cancel() + var stderr bytes.Buffer + cmd := exec.CommandContext(ctx, git.GitExecutable, service, "--stateless-rpc", h.dir) + cmd.Dir = h.dir + cmd.Env = append(os.Environ(), h.environ...) + cmd.Stdout = h.w + cmd.Stdin = reqBody + cmd.Stderr = &stderr + + pid := process.GetManager().Add(fmt.Sprintf("%s %s %s [repo_path: %s]", git.GitExecutable, service, "--stateless-rpc", h.dir), cancel) + defer process.GetManager().Remove(pid) + + if err := cmd.Run(); err != nil { + log.Error("Fail to serve RPC(%s) in %s: %v - %s", service, h.dir, err, stderr.String()) + return + } +} + +// ServiceUploadPack implements Git Smart HTTP protocol +func ServiceUploadPack(ctx *context.Context) { + h := httpBase(ctx) + if h != nil { + serviceRPC(*h, "upload-pack") + } +} + +// ServiceReceivePack implements Git Smart HTTP protocol +func ServiceReceivePack(ctx *context.Context) { + h := httpBase(ctx) + if h != nil { + serviceRPC(*h, "receive-pack") + } +} + +func getServiceType(r *http.Request) string { + serviceType := r.FormValue("service") + if !strings.HasPrefix(serviceType, "git-") { + return "" + } + return strings.Replace(serviceType, "git-", "", 1) +} + +func updateServerInfo(dir string) []byte { + out, err := git.NewCommand("update-server-info").RunInDirBytes(dir) + if err != nil { + log.Error(fmt.Sprintf("%v - %s", err, string(out))) + } + return out +} + +func packetWrite(str string) []byte { + s := strconv.FormatInt(int64(len(str)+4), 16) + if len(s)%4 != 0 { + s = strings.Repeat("0", 4-len(s)%4) + s + } + return []byte(s + str) +} + +// GetInfoRefs implements Git dumb HTTP +func GetInfoRefs(ctx *context.Context) { + h := httpBase(ctx) + if h == nil { + return + } + h.setHeaderNoCache() + if hasAccess(getServiceType(h.r), *h, false) { + service := getServiceType(h.r) + + if protocol := h.r.Header.Get("Git-Protocol"); protocol != "" && safeGitProtocolHeader.MatchString(protocol) { + h.environ = append(h.environ, "GIT_PROTOCOL="+protocol) + } + h.environ = append(os.Environ(), h.environ...) + + refs, err := git.NewCommand(service, "--stateless-rpc", "--advertise-refs", ".").RunInDirTimeoutEnv(h.environ, -1, h.dir) + if err != nil { + log.Error(fmt.Sprintf("%v - %s", err, string(refs))) + } + + h.w.Header().Set("Content-Type", fmt.Sprintf("application/x-git-%s-advertisement", service)) + h.w.WriteHeader(http.StatusOK) + _, _ = h.w.Write(packetWrite("# service=git-" + service + "\n")) + _, _ = h.w.Write([]byte("0000")) + _, _ = h.w.Write(refs) + } else { + updateServerInfo(h.dir) + h.sendFile("text/plain; charset=utf-8", "info/refs") + } +} + +// GetTextFile implements Git dumb HTTP +func GetTextFile(p string) func(*context.Context) { + return func(ctx *context.Context) { + h := httpBase(ctx) + if h != nil { + h.setHeaderNoCache() + file := ctx.Params("file") + if file != "" { + h.sendFile("text/plain", "objects/info/"+file) + } else { + h.sendFile("text/plain", p) + } + } + } +} + +// GetInfoPacks implements Git dumb HTTP +func GetInfoPacks(ctx *context.Context) { + h := httpBase(ctx) + if h != nil { + h.setHeaderCacheForever() + h.sendFile("text/plain; charset=utf-8", "objects/info/packs") + } +} + +// GetLooseObject implements Git dumb HTTP +func GetLooseObject(ctx *context.Context) { + h := httpBase(ctx) + if h != nil { + h.setHeaderCacheForever() + h.sendFile("application/x-git-loose-object", fmt.Sprintf("objects/%s/%s", + ctx.Params("head"), ctx.Params("hash"))) + } +} + +// GetPackFile implements Git dumb HTTP +func GetPackFile(ctx *context.Context) { + h := httpBase(ctx) + if h != nil { + h.setHeaderCacheForever() + h.sendFile("application/x-git-packed-objects", "objects/pack/pack-"+ctx.Params("file")+".pack") + } +} + +// GetIdxFile implements Git dumb HTTP +func GetIdxFile(ctx *context.Context) { + h := httpBase(ctx) + if h != nil { + h.setHeaderCacheForever() + h.sendFile("application/x-git-packed-objects-toc", "objects/pack/pack-"+ctx.Params("file")+".idx") + } +} diff --git a/routers/web/repo/http_test.go b/routers/web/repo/http_test.go new file mode 100644 index 000000000..58ac1c07a --- /dev/null +++ b/routers/web/repo/http_test.go @@ -0,0 +1,43 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + +func TestContainsParentDirectorySeparator(t *testing.T) { + tests := []struct { + v string + b bool + }{ + { + v: `user2/repo1/info/refs`, + b: false, + }, + { + v: `user2/repo1/HEAD`, + b: false, + }, + { + v: `user2/repo1/some.../strange_file...mp3`, + b: false, + }, + { + v: `user2/repo1/../../custom/conf/app.ini`, + b: true, + }, + { + v: `user2/repo1/objects/info/..\..\..\..\custom\conf\app.ini`, + b: true, + }, + } + + for i := range tests { + assert.EqualValues(t, tests[i].b, containsParentDirectorySeparator(tests[i].v)) + } +} diff --git a/routers/web/repo/issue.go b/routers/web/repo/issue.go new file mode 100644 index 000000000..bb3a0c8a9 --- /dev/null +++ b/routers/web/repo/issue.go @@ -0,0 +1,2610 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "bytes" + "errors" + "fmt" + "io/ioutil" + "net/http" + "path" + "strconv" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/convert" + "code.gitea.io/gitea/modules/git" + issue_indexer "code.gitea.io/gitea/modules/indexer/issues" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/upload" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + comment_service "code.gitea.io/gitea/services/comments" + "code.gitea.io/gitea/services/forms" + issue_service "code.gitea.io/gitea/services/issue" + pull_service "code.gitea.io/gitea/services/pull" + + "github.com/unknwon/com" +) + +const ( + tplAttachment base.TplName = "repo/issue/view_content/attachments" + + tplIssues base.TplName = "repo/issue/list" + tplIssueNew base.TplName = "repo/issue/new" + tplIssueChoose base.TplName = "repo/issue/choose" + tplIssueView base.TplName = "repo/issue/view" + + tplReactions base.TplName = "repo/issue/view_content/reactions" + + issueTemplateKey = "IssueTemplate" + issueTemplateTitleKey = "IssueTemplateTitle" +) + +var ( + // IssueTemplateCandidates issue templates + IssueTemplateCandidates = []string{ + "ISSUE_TEMPLATE.md", + "issue_template.md", + ".gitea/ISSUE_TEMPLATE.md", + ".gitea/issue_template.md", + ".github/ISSUE_TEMPLATE.md", + ".github/issue_template.md", + } +) + +// MustAllowUserComment checks to make sure if an issue is locked. +// If locked and user has permissions to write to the repository, +// then the comment is allowed, else it is blocked +func MustAllowUserComment(ctx *context.Context) { + issue := GetActionIssue(ctx) + if ctx.Written() { + return + } + + if issue.IsLocked && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) && !ctx.User.IsAdmin { + ctx.Flash.Error(ctx.Tr("repo.issues.comment_on_locked")) + ctx.Redirect(issue.HTMLURL()) + return + } +} + +// MustEnableIssues check if repository enable internal issues +func MustEnableIssues(ctx *context.Context) { + if !ctx.Repo.CanRead(models.UnitTypeIssues) && + !ctx.Repo.CanRead(models.UnitTypeExternalTracker) { + ctx.NotFound("MustEnableIssues", nil) + return + } + + unit, err := ctx.Repo.Repository.GetUnit(models.UnitTypeExternalTracker) + if err == nil { + ctx.Redirect(unit.ExternalTrackerConfig().ExternalTrackerURL) + return + } +} + +// MustAllowPulls check if repository enable pull requests and user have right to do that +func MustAllowPulls(ctx *context.Context) { + if !ctx.Repo.Repository.CanEnablePulls() || !ctx.Repo.CanRead(models.UnitTypePullRequests) { + ctx.NotFound("MustAllowPulls", nil) + return + } + + // User can send pull request if owns a forked repository. + if ctx.IsSigned && ctx.User.HasForkedRepo(ctx.Repo.Repository.ID) { + ctx.Repo.PullRequest.Allowed = true + ctx.Repo.PullRequest.HeadInfo = ctx.User.Name + ":" + ctx.Repo.BranchName + } +} + +func issues(ctx *context.Context, milestoneID, projectID int64, isPullOption util.OptionalBool) { + var err error + viewType := ctx.FormString("type") + sortType := ctx.FormString("sort") + types := []string{"all", "your_repositories", "assigned", "created_by", "mentioned", "review_requested"} + if !util.IsStringInSlice(viewType, types, true) { + viewType = "all" + } + + var ( + assigneeID = ctx.FormInt64("assignee") + posterID int64 + mentionedID int64 + reviewRequestedID int64 + forceEmpty bool + ) + + if ctx.IsSigned { + switch viewType { + case "created_by": + posterID = ctx.User.ID + case "mentioned": + mentionedID = ctx.User.ID + case "assigned": + assigneeID = ctx.User.ID + case "review_requested": + reviewRequestedID = ctx.User.ID + } + } + + repo := ctx.Repo.Repository + var labelIDs []int64 + selectLabels := ctx.FormString("labels") + if len(selectLabels) > 0 && selectLabels != "0" { + labelIDs, err = base.StringsToInt64s(strings.Split(selectLabels, ",")) + if err != nil { + ctx.ServerError("StringsToInt64s", err) + return + } + } + + keyword := strings.Trim(ctx.FormString("q"), " ") + if bytes.Contains([]byte(keyword), []byte{0x00}) { + keyword = "" + } + + var issueIDs []int64 + if len(keyword) > 0 { + issueIDs, err = issue_indexer.SearchIssuesByKeyword([]int64{repo.ID}, keyword) + if err != nil { + ctx.ServerError("issueIndexer.Search", err) + return + } + if len(issueIDs) == 0 { + forceEmpty = true + } + } + + var issueStats *models.IssueStats + if forceEmpty { + issueStats = &models.IssueStats{} + } else { + issueStats, err = models.GetIssueStats(&models.IssueStatsOptions{ + RepoID: repo.ID, + Labels: selectLabels, + MilestoneID: milestoneID, + AssigneeID: assigneeID, + MentionedID: mentionedID, + PosterID: posterID, + ReviewRequestedID: reviewRequestedID, + IsPull: isPullOption, + IssueIDs: issueIDs, + }) + if err != nil { + ctx.ServerError("GetIssueStats", err) + return + } + } + + isShowClosed := ctx.FormString("state") == "closed" + // if open issues are zero and close don't, use closed as default + if len(ctx.FormString("state")) == 0 && issueStats.OpenCount == 0 && issueStats.ClosedCount != 0 { + isShowClosed = true + } + + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + + var total int + if !isShowClosed { + total = int(issueStats.OpenCount) + } else { + total = int(issueStats.ClosedCount) + } + pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5) + + var mileIDs []int64 + if milestoneID > 0 { + mileIDs = []int64{milestoneID} + } + + var issues []*models.Issue + if forceEmpty { + issues = []*models.Issue{} + } else { + issues, err = models.Issues(&models.IssuesOptions{ + ListOptions: models.ListOptions{ + Page: pager.Paginater.Current(), + PageSize: setting.UI.IssuePagingNum, + }, + RepoIDs: []int64{repo.ID}, + AssigneeID: assigneeID, + PosterID: posterID, + MentionedID: mentionedID, + ReviewRequestedID: reviewRequestedID, + MilestoneIDs: mileIDs, + ProjectID: projectID, + IsClosed: util.OptionalBoolOf(isShowClosed), + IsPull: isPullOption, + LabelIDs: labelIDs, + SortType: sortType, + IssueIDs: issueIDs, + }) + if err != nil { + ctx.ServerError("Issues", err) + return + } + } + + var issueList = models.IssueList(issues) + approvalCounts, err := issueList.GetApprovalCounts() + if err != nil { + ctx.ServerError("ApprovalCounts", err) + return + } + + // Get posters. + for i := range issues { + // Check read status + if !ctx.IsSigned { + issues[i].IsRead = true + } else if err = issues[i].GetIsRead(ctx.User.ID); err != nil { + ctx.ServerError("GetIsRead", err) + return + } + } + + commitStatus, err := pull_service.GetIssuesLastCommitStatus(issues) + if err != nil { + ctx.ServerError("GetIssuesLastCommitStatus", err) + return + } + + ctx.Data["Issues"] = issues + ctx.Data["CommitStatus"] = commitStatus + + // Get assignees. + ctx.Data["Assignees"], err = repo.GetAssignees() + if err != nil { + ctx.ServerError("GetAssignees", err) + return + } + + handleTeamMentions(ctx) + if ctx.Written() { + return + } + + labels, err := models.GetLabelsByRepoID(repo.ID, "", models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLabelsByRepoID", err) + return + } + + if repo.Owner.IsOrganization() { + orgLabels, err := models.GetLabelsByOrgID(repo.Owner.ID, ctx.FormString("sort"), models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLabelsByOrgID", err) + return + } + + ctx.Data["OrgLabels"] = orgLabels + labels = append(labels, orgLabels...) + } + + for _, l := range labels { + l.LoadSelectedLabelsAfterClick(labelIDs) + } + ctx.Data["Labels"] = labels + ctx.Data["NumLabels"] = len(labels) + + if ctx.FormInt64("assignee") == 0 { + assigneeID = 0 // Reset ID to prevent unexpected selection of assignee. + } + + ctx.Data["IssueRefEndNames"], ctx.Data["IssueRefURLs"] = + issue_service.GetRefEndNamesAndURLs(issues, ctx.Repo.RepoLink) + + ctx.Data["ApprovalCounts"] = func(issueID int64, typ string) int64 { + counts, ok := approvalCounts[issueID] + if !ok || len(counts) == 0 { + return 0 + } + reviewTyp := models.ReviewTypeApprove + if typ == "reject" { + reviewTyp = models.ReviewTypeReject + } else if typ == "waiting" { + reviewTyp = models.ReviewTypeRequest + } + for _, count := range counts { + if count.Type == reviewTyp { + return count.Count + } + } + return 0 + } + ctx.Data["IssueStats"] = issueStats + ctx.Data["SelLabelIDs"] = labelIDs + ctx.Data["SelectLabels"] = selectLabels + ctx.Data["ViewType"] = viewType + ctx.Data["SortType"] = sortType + ctx.Data["MilestoneID"] = milestoneID + ctx.Data["AssigneeID"] = assigneeID + ctx.Data["IsShowClosed"] = isShowClosed + ctx.Data["Keyword"] = keyword + if isShowClosed { + ctx.Data["State"] = "closed" + } else { + ctx.Data["State"] = "open" + } + + pager.AddParam(ctx, "q", "Keyword") + pager.AddParam(ctx, "type", "ViewType") + pager.AddParam(ctx, "sort", "SortType") + pager.AddParam(ctx, "state", "State") + pager.AddParam(ctx, "labels", "SelectLabels") + pager.AddParam(ctx, "milestone", "MilestoneID") + pager.AddParam(ctx, "assignee", "AssigneeID") + ctx.Data["Page"] = pager +} + +// Issues render issues page +func Issues(ctx *context.Context) { + isPullList := ctx.Params(":type") == "pulls" + if isPullList { + MustAllowPulls(ctx) + if ctx.Written() { + return + } + ctx.Data["Title"] = ctx.Tr("repo.pulls") + ctx.Data["PageIsPullList"] = true + } else { + MustEnableIssues(ctx) + if ctx.Written() { + return + } + ctx.Data["Title"] = ctx.Tr("repo.issues") + ctx.Data["PageIsIssueList"] = true + ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 + } + + issues(ctx, ctx.FormInt64("milestone"), ctx.FormInt64("project"), util.OptionalBoolOf(isPullList)) + if ctx.Written() { + return + } + + var err error + // Get milestones + ctx.Data["Milestones"], _, err = models.GetMilestones(models.GetMilestonesOption{ + RepoID: ctx.Repo.Repository.ID, + State: api.StateType(ctx.FormString("state")), + }) + if err != nil { + ctx.ServerError("GetAllRepoMilestones", err) + return + } + + ctx.Data["CanWriteIssuesOrPulls"] = ctx.Repo.CanWriteIssuesOrPulls(isPullList) + + ctx.HTML(http.StatusOK, tplIssues) +} + +// RetrieveRepoMilestonesAndAssignees find all the milestones and assignees of a repository +func RetrieveRepoMilestonesAndAssignees(ctx *context.Context, repo *models.Repository) { + var err error + ctx.Data["OpenMilestones"], _, err = models.GetMilestones(models.GetMilestonesOption{ + RepoID: repo.ID, + State: api.StateOpen, + }) + if err != nil { + ctx.ServerError("GetMilestones", err) + return + } + ctx.Data["ClosedMilestones"], _, err = models.GetMilestones(models.GetMilestonesOption{ + RepoID: repo.ID, + State: api.StateClosed, + }) + if err != nil { + ctx.ServerError("GetMilestones", err) + return + } + + ctx.Data["Assignees"], err = repo.GetAssignees() + if err != nil { + ctx.ServerError("GetAssignees", err) + return + } + + handleTeamMentions(ctx) +} + +func retrieveProjects(ctx *context.Context, repo *models.Repository) { + + var err error + + ctx.Data["OpenProjects"], _, err = models.GetProjects(models.ProjectSearchOptions{ + RepoID: repo.ID, + Page: -1, + IsClosed: util.OptionalBoolFalse, + Type: models.ProjectTypeRepository, + }) + if err != nil { + ctx.ServerError("GetProjects", err) + return + } + + ctx.Data["ClosedProjects"], _, err = models.GetProjects(models.ProjectSearchOptions{ + RepoID: repo.ID, + Page: -1, + IsClosed: util.OptionalBoolTrue, + Type: models.ProjectTypeRepository, + }) + if err != nil { + ctx.ServerError("GetProjects", err) + return + } +} + +// repoReviewerSelection items to bee shown +type repoReviewerSelection struct { + IsTeam bool + Team *models.Team + User *models.User + Review *models.Review + CanChange bool + Checked bool + ItemID int64 +} + +// RetrieveRepoReviewers find all reviewers of a repository +func RetrieveRepoReviewers(ctx *context.Context, repo *models.Repository, issue *models.Issue, canChooseReviewer bool) { + ctx.Data["CanChooseReviewer"] = canChooseReviewer + + originalAuthorReviews, err := models.GetReviewersFromOriginalAuthorsByIssueID(issue.ID) + if err != nil { + ctx.ServerError("GetReviewersFromOriginalAuthorsByIssueID", err) + return + } + ctx.Data["OriginalReviews"] = originalAuthorReviews + + reviews, err := models.GetReviewersByIssueID(issue.ID) + if err != nil { + ctx.ServerError("GetReviewersByIssueID", err) + return + } + + if len(reviews) == 0 && !canChooseReviewer { + return + } + + var ( + pullReviews []*repoReviewerSelection + reviewersResult []*repoReviewerSelection + teamReviewersResult []*repoReviewerSelection + teamReviewers []*models.Team + reviewers []*models.User + ) + + if canChooseReviewer { + posterID := issue.PosterID + if issue.OriginalAuthorID > 0 { + posterID = 0 + } + + reviewers, err = repo.GetReviewers(ctx.User.ID, posterID) + if err != nil { + ctx.ServerError("GetReviewers", err) + return + } + + teamReviewers, err = repo.GetReviewerTeams() + if err != nil { + ctx.ServerError("GetReviewerTeams", err) + return + } + + if len(reviewers) > 0 { + reviewersResult = make([]*repoReviewerSelection, 0, len(reviewers)) + } + + if len(teamReviewers) > 0 { + teamReviewersResult = make([]*repoReviewerSelection, 0, len(teamReviewers)) + } + } + + pullReviews = make([]*repoReviewerSelection, 0, len(reviews)) + + for _, review := range reviews { + tmp := &repoReviewerSelection{ + Checked: review.Type == models.ReviewTypeRequest, + Review: review, + ItemID: review.ReviewerID, + } + if review.ReviewerTeamID > 0 { + tmp.IsTeam = true + tmp.ItemID = -review.ReviewerTeamID + } + + if ctx.Repo.IsAdmin() { + // Admin can dismiss or re-request any review requests + tmp.CanChange = true + } else if ctx.User != nil && ctx.User.ID == review.ReviewerID && review.Type == models.ReviewTypeRequest { + // A user can refuse review requests + tmp.CanChange = true + } else if (canChooseReviewer || (ctx.User != nil && ctx.User.ID == issue.PosterID)) && review.Type != models.ReviewTypeRequest && + ctx.User.ID != review.ReviewerID { + // The poster of the PR, a manager, or official reviewers can re-request review from other reviewers + tmp.CanChange = true + } + + pullReviews = append(pullReviews, tmp) + + if canChooseReviewer { + if tmp.IsTeam { + teamReviewersResult = append(teamReviewersResult, tmp) + } else { + reviewersResult = append(reviewersResult, tmp) + } + } + } + + if len(pullReviews) > 0 { + // Drop all non-existing users and teams from the reviews + currentPullReviewers := make([]*repoReviewerSelection, 0, len(pullReviews)) + for _, item := range pullReviews { + if item.Review.ReviewerID > 0 { + if err = item.Review.LoadReviewer(); err != nil { + if models.IsErrUserNotExist(err) { + continue + } + ctx.ServerError("LoadReviewer", err) + return + } + item.User = item.Review.Reviewer + } else if item.Review.ReviewerTeamID > 0 { + if err = item.Review.LoadReviewerTeam(); err != nil { + if models.IsErrTeamNotExist(err) { + continue + } + ctx.ServerError("LoadReviewerTeam", err) + return + } + item.Team = item.Review.ReviewerTeam + } else { + continue + } + + currentPullReviewers = append(currentPullReviewers, item) + } + ctx.Data["PullReviewers"] = currentPullReviewers + } + + if canChooseReviewer && reviewersResult != nil { + preadded := len(reviewersResult) + for _, reviewer := range reviewers { + found := false + reviewAddLoop: + for _, tmp := range reviewersResult[:preadded] { + if tmp.ItemID == reviewer.ID { + tmp.User = reviewer + found = true + break reviewAddLoop + } + } + + if found { + continue + } + + reviewersResult = append(reviewersResult, &repoReviewerSelection{ + IsTeam: false, + CanChange: true, + User: reviewer, + ItemID: reviewer.ID, + }) + } + + ctx.Data["Reviewers"] = reviewersResult + } + + if canChooseReviewer && teamReviewersResult != nil { + preadded := len(teamReviewersResult) + for _, team := range teamReviewers { + found := false + teamReviewAddLoop: + for _, tmp := range teamReviewersResult[:preadded] { + if tmp.ItemID == -team.ID { + tmp.Team = team + found = true + break teamReviewAddLoop + } + } + + if found { + continue + } + + teamReviewersResult = append(teamReviewersResult, &repoReviewerSelection{ + IsTeam: true, + CanChange: true, + Team: team, + ItemID: -team.ID, + }) + } + + ctx.Data["TeamReviewers"] = teamReviewersResult + } +} + +// RetrieveRepoMetas find all the meta information of a repository +func RetrieveRepoMetas(ctx *context.Context, repo *models.Repository, isPull bool) []*models.Label { + if !ctx.Repo.CanWriteIssuesOrPulls(isPull) { + return nil + } + + labels, err := models.GetLabelsByRepoID(repo.ID, "", models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLabelsByRepoID", err) + return nil + } + ctx.Data["Labels"] = labels + if repo.Owner.IsOrganization() { + orgLabels, err := models.GetLabelsByOrgID(repo.Owner.ID, ctx.FormString("sort"), models.ListOptions{}) + if err != nil { + return nil + } + + ctx.Data["OrgLabels"] = orgLabels + labels = append(labels, orgLabels...) + } + + RetrieveRepoMilestonesAndAssignees(ctx, repo) + if ctx.Written() { + return nil + } + + retrieveProjects(ctx, repo) + if ctx.Written() { + return nil + } + + brs, _, err := ctx.Repo.GitRepo.GetBranches(0, 0) + if err != nil { + ctx.ServerError("GetBranches", err) + return nil + } + ctx.Data["Branches"] = brs + + // Contains true if the user can create issue dependencies + ctx.Data["CanCreateIssueDependencies"] = ctx.Repo.CanCreateIssueDependencies(ctx.User, isPull) + + return labels +} + +func getFileContentFromDefaultBranch(ctx *context.Context, filename string) (string, bool) { + var bytes []byte + + if ctx.Repo.Commit == nil { + var err error + ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) + if err != nil { + return "", false + } + } + + entry, err := ctx.Repo.Commit.GetTreeEntryByPath(filename) + if err != nil { + return "", false + } + if entry.Blob().Size() >= setting.UI.MaxDisplayFileSize { + return "", false + } + r, err := entry.Blob().DataAsync() + if err != nil { + return "", false + } + defer r.Close() + bytes, err = ioutil.ReadAll(r) + if err != nil { + return "", false + } + return string(bytes), true +} + +func setTemplateIfExists(ctx *context.Context, ctxDataKey string, possibleDirs []string, possibleFiles []string) { + templateCandidates := make([]string, 0, len(possibleFiles)) + if ctx.FormString("template") != "" { + for _, dirName := range possibleDirs { + templateCandidates = append(templateCandidates, path.Join(dirName, ctx.FormString("template"))) + } + } + templateCandidates = append(templateCandidates, possibleFiles...) // Append files to the end because they should be fallback + for _, filename := range templateCandidates { + templateContent, found := getFileContentFromDefaultBranch(ctx, filename) + if found { + var meta api.IssueTemplate + templateBody, err := markdown.ExtractMetadata(templateContent, &meta) + if err != nil { + log.Debug("could not extract metadata from %s [%s]: %v", filename, ctx.Repo.Repository.FullName(), err) + ctx.Data[ctxDataKey] = templateContent + return + } + ctx.Data[issueTemplateTitleKey] = meta.Title + ctx.Data[ctxDataKey] = templateBody + labelIDs := make([]string, 0, len(meta.Labels)) + if repoLabels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID, "", models.ListOptions{}); err == nil { + ctx.Data["Labels"] = repoLabels + if ctx.Repo.Owner.IsOrganization() { + if orgLabels, err := models.GetLabelsByOrgID(ctx.Repo.Owner.ID, ctx.FormString("sort"), models.ListOptions{}); err == nil { + ctx.Data["OrgLabels"] = orgLabels + repoLabels = append(repoLabels, orgLabels...) + } + } + + for _, metaLabel := range meta.Labels { + for _, repoLabel := range repoLabels { + if strings.EqualFold(repoLabel.Name, metaLabel) { + repoLabel.IsChecked = true + labelIDs = append(labelIDs, fmt.Sprintf("%d", repoLabel.ID)) + break + } + } + } + } + ctx.Data["HasSelectedLabel"] = len(labelIDs) > 0 + ctx.Data["label_ids"] = strings.Join(labelIDs, ",") + return + } + } +} + +// NewIssue render creating issue page +func NewIssue(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.issues.new") + ctx.Data["PageIsIssueList"] = true + ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 + ctx.Data["RequireHighlightJS"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true + ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes + title := ctx.FormString("title") + ctx.Data["TitleQuery"] = title + body := ctx.FormString("body") + ctx.Data["BodyQuery"] = body + + ctx.Data["IsProjectsEnabled"] = ctx.Repo.CanRead(models.UnitTypeProjects) + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "comment") + + milestoneID := ctx.FormInt64("milestone") + if milestoneID > 0 { + milestone, err := models.GetMilestoneByID(milestoneID) + if err != nil { + log.Error("GetMilestoneByID: %d: %v", milestoneID, err) + } else { + ctx.Data["milestone_id"] = milestoneID + ctx.Data["Milestone"] = milestone + } + } + + projectID := ctx.FormInt64("project") + if projectID > 0 { + project, err := models.GetProjectByID(projectID) + if err != nil { + log.Error("GetProjectByID: %d: %v", projectID, err) + } else if project.RepoID != ctx.Repo.Repository.ID { + log.Error("GetProjectByID: %d: %v", projectID, fmt.Errorf("project[%d] not in repo [%d]", project.ID, ctx.Repo.Repository.ID)) + } else { + ctx.Data["project_id"] = projectID + ctx.Data["Project"] = project + } + + } + + RetrieveRepoMetas(ctx, ctx.Repo.Repository, false) + setTemplateIfExists(ctx, issueTemplateKey, context.IssueTemplateDirCandidates, IssueTemplateCandidates) + if ctx.Written() { + return + } + + ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypeIssues) + + ctx.HTML(http.StatusOK, tplIssueNew) +} + +// NewIssueChooseTemplate render creating issue from template page +func NewIssueChooseTemplate(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.issues.new") + ctx.Data["PageIsIssueList"] = true + ctx.Data["milestone"] = ctx.FormInt64("milestone") + + issueTemplates := ctx.IssueTemplatesFromDefaultBranch() + ctx.Data["NewIssueChooseTemplate"] = len(issueTemplates) > 0 + ctx.Data["IssueTemplates"] = issueTemplates + + ctx.HTML(http.StatusOK, tplIssueChoose) +} + +// ValidateRepoMetas check and returns repository's meta information +func ValidateRepoMetas(ctx *context.Context, form forms.CreateIssueForm, isPull bool) ([]int64, []int64, int64, int64) { + var ( + repo = ctx.Repo.Repository + err error + ) + + labels := RetrieveRepoMetas(ctx, ctx.Repo.Repository, isPull) + if ctx.Written() { + return nil, nil, 0, 0 + } + + var labelIDs []int64 + hasSelected := false + // Check labels. + if len(form.LabelIDs) > 0 { + labelIDs, err = base.StringsToInt64s(strings.Split(form.LabelIDs, ",")) + if err != nil { + return nil, nil, 0, 0 + } + labelIDMark := base.Int64sToMap(labelIDs) + + for i := range labels { + if labelIDMark[labels[i].ID] { + labels[i].IsChecked = true + hasSelected = true + } + } + } + + ctx.Data["Labels"] = labels + ctx.Data["HasSelectedLabel"] = hasSelected + ctx.Data["label_ids"] = form.LabelIDs + + // Check milestone. + milestoneID := form.MilestoneID + if milestoneID > 0 { + ctx.Data["Milestone"], err = repo.GetMilestoneByID(milestoneID) + if err != nil { + ctx.ServerError("GetMilestoneByID", err) + return nil, nil, 0, 0 + } + ctx.Data["milestone_id"] = milestoneID + } + + if form.ProjectID > 0 { + p, err := models.GetProjectByID(form.ProjectID) + if err != nil { + ctx.ServerError("GetProjectByID", err) + return nil, nil, 0, 0 + } + if p.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("", nil) + return nil, nil, 0, 0 + } + + ctx.Data["Project"] = p + ctx.Data["project_id"] = form.ProjectID + } + + // Check assignees + var assigneeIDs []int64 + if len(form.AssigneeIDs) > 0 { + assigneeIDs, err = base.StringsToInt64s(strings.Split(form.AssigneeIDs, ",")) + if err != nil { + return nil, nil, 0, 0 + } + + // Check if the passed assignees actually exists and is assignable + for _, aID := range assigneeIDs { + assignee, err := models.GetUserByID(aID) + if err != nil { + ctx.ServerError("GetUserByID", err) + return nil, nil, 0, 0 + } + + valid, err := models.CanBeAssigned(assignee, repo, isPull) + if err != nil { + ctx.ServerError("CanBeAssigned", err) + return nil, nil, 0, 0 + } + + if !valid { + ctx.ServerError("canBeAssigned", models.ErrUserDoesNotHaveAccessToRepo{UserID: aID, RepoName: repo.Name}) + return nil, nil, 0, 0 + } + } + } + + // Keep the old assignee id thingy for compatibility reasons + if form.AssigneeID > 0 { + assigneeIDs = append(assigneeIDs, form.AssigneeID) + } + + return labelIDs, assigneeIDs, milestoneID, form.ProjectID +} + +// NewIssuePost response for creating new issue +func NewIssuePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateIssueForm) + ctx.Data["Title"] = ctx.Tr("repo.issues.new") + ctx.Data["PageIsIssueList"] = true + ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 + ctx.Data["RequireHighlightJS"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["ReadOnly"] = false + ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "comment") + + var ( + repo = ctx.Repo.Repository + attachments []string + ) + + labelIDs, assigneeIDs, milestoneID, projectID := ValidateRepoMetas(ctx, *form, false) + if ctx.Written() { + return + } + + if setting.Attachment.Enabled { + attachments = form.Files + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplIssueNew) + return + } + + if util.IsEmptyString(form.Title) { + ctx.RenderWithErr(ctx.Tr("repo.issues.new.title_empty"), tplIssueNew, form) + return + } + + issue := &models.Issue{ + RepoID: repo.ID, + Title: form.Title, + PosterID: ctx.User.ID, + Poster: ctx.User, + MilestoneID: milestoneID, + Content: form.Content, + Ref: form.Ref, + } + + if err := issue_service.NewIssue(repo, issue, labelIDs, attachments, assigneeIDs); err != nil { + if models.IsErrUserDoesNotHaveAccessToRepo(err) { + ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err.Error()) + return + } + ctx.ServerError("NewIssue", err) + return + } + + if projectID > 0 { + if err := models.ChangeProjectAssign(issue, ctx.User, projectID); err != nil { + ctx.ServerError("ChangeProjectAssign", err) + return + } + } + + log.Trace("Issue created: %d/%d", repo.ID, issue.ID) + ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + fmt.Sprint(issue.Index)) +} + +// commentTag returns the CommentTag for a comment in/with the given repo, poster and issue +func commentTag(repo *models.Repository, poster *models.User, issue *models.Issue) (models.CommentTag, error) { + perm, err := models.GetUserRepoPermission(repo, poster) + if err != nil { + return models.CommentTagNone, err + } + if perm.IsOwner() { + if !poster.IsAdmin { + return models.CommentTagOwner, nil + } + + ok, err := models.IsUserRealRepoAdmin(repo, poster) + if err != nil { + return models.CommentTagNone, err + } + + if ok { + return models.CommentTagOwner, nil + } + + if ok, err = repo.IsCollaborator(poster.ID); ok && err == nil { + return models.CommentTagWriter, nil + } + + return models.CommentTagNone, err + } + + if perm.CanWrite(models.UnitTypeCode) { + return models.CommentTagWriter, nil + } + + return models.CommentTagNone, nil +} + +func getBranchData(ctx *context.Context, issue *models.Issue) { + ctx.Data["BaseBranch"] = nil + ctx.Data["HeadBranch"] = nil + ctx.Data["HeadUserName"] = nil + ctx.Data["BaseName"] = ctx.Repo.Repository.OwnerName + if issue.IsPull { + pull := issue.PullRequest + ctx.Data["BaseBranch"] = pull.BaseBranch + ctx.Data["HeadBranch"] = pull.HeadBranch + ctx.Data["HeadUserName"] = pull.MustHeadUserName() + } +} + +// ViewIssue render issue view page +func ViewIssue(ctx *context.Context) { + if ctx.Params(":type") == "issues" { + // If issue was requested we check if repo has external tracker and redirect + extIssueUnit, err := ctx.Repo.Repository.GetUnit(models.UnitTypeExternalTracker) + if err == nil && extIssueUnit != nil { + if extIssueUnit.ExternalTrackerConfig().ExternalTrackerStyle == markup.IssueNameStyleNumeric || extIssueUnit.ExternalTrackerConfig().ExternalTrackerStyle == "" { + metas := ctx.Repo.Repository.ComposeMetas() + metas["index"] = ctx.Params(":index") + ctx.Redirect(com.Expand(extIssueUnit.ExternalTrackerConfig().ExternalTrackerFormat, metas)) + return + } + } else if err != nil && !models.IsErrUnitTypeNotExist(err) { + ctx.ServerError("GetUnit", err) + return + } + } + + issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) + if err != nil { + if models.IsErrIssueNotExist(err) { + ctx.NotFound("GetIssueByIndex", err) + } else { + ctx.ServerError("GetIssueByIndex", err) + } + return + } + + // Make sure type and URL matches. + if ctx.Params(":type") == "issues" && issue.IsPull { + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) + return + } else if ctx.Params(":type") == "pulls" && !issue.IsPull { + ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + fmt.Sprint(issue.Index)) + return + } + + if issue.IsPull { + MustAllowPulls(ctx) + if ctx.Written() { + return + } + ctx.Data["PageIsPullList"] = true + ctx.Data["PageIsPullConversation"] = true + } else { + MustEnableIssues(ctx) + if ctx.Written() { + return + } + ctx.Data["PageIsIssueList"] = true + ctx.Data["NewIssueChooseTemplate"] = len(ctx.IssueTemplatesFromDefaultBranch()) > 0 + } + + if issue.IsPull && !ctx.Repo.CanRead(models.UnitTypeIssues) { + ctx.Data["IssueType"] = "pulls" + } else if !issue.IsPull && !ctx.Repo.CanRead(models.UnitTypePullRequests) { + ctx.Data["IssueType"] = "issues" + } else { + ctx.Data["IssueType"] = "all" + } + + ctx.Data["RequireHighlightJS"] = true + ctx.Data["RequireTribute"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["IsProjectsEnabled"] = ctx.Repo.CanRead(models.UnitTypeProjects) + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "comment") + + if err = issue.LoadAttributes(); err != nil { + ctx.ServerError("LoadAttributes", err) + return + } + + if err = filterXRefComments(ctx, issue); err != nil { + ctx.ServerError("filterXRefComments", err) + return + } + + ctx.Data["Title"] = fmt.Sprintf("#%d - %s", issue.Index, issue.Title) + + iw := new(models.IssueWatch) + if ctx.User != nil { + iw.UserID = ctx.User.ID + iw.IssueID = issue.ID + iw.IsWatching, err = models.CheckIssueWatch(ctx.User, issue) + if err != nil { + ctx.ServerError("CheckIssueWatch", err) + return + } + } + ctx.Data["IssueWatch"] = iw + + issue.RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, issue.Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + + repo := ctx.Repo.Repository + + // Get more information if it's a pull request. + if issue.IsPull { + if issue.PullRequest.HasMerged { + ctx.Data["DisableStatusChange"] = issue.PullRequest.HasMerged + PrepareMergedViewPullInfo(ctx, issue) + } else { + PrepareViewPullInfo(ctx, issue) + ctx.Data["DisableStatusChange"] = ctx.Data["IsPullRequestBroken"] == true && issue.IsClosed + } + if ctx.Written() { + return + } + } + + // Metas. + // Check labels. + labelIDMark := make(map[int64]bool) + for i := range issue.Labels { + labelIDMark[issue.Labels[i].ID] = true + } + labels, err := models.GetLabelsByRepoID(repo.ID, "", models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLabelsByRepoID", err) + return + } + ctx.Data["Labels"] = labels + + if repo.Owner.IsOrganization() { + orgLabels, err := models.GetLabelsByOrgID(repo.Owner.ID, ctx.FormString("sort"), models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLabelsByOrgID", err) + return + } + ctx.Data["OrgLabels"] = orgLabels + + labels = append(labels, orgLabels...) + } + + hasSelected := false + for i := range labels { + if labelIDMark[labels[i].ID] { + labels[i].IsChecked = true + hasSelected = true + } + } + ctx.Data["HasSelectedLabel"] = hasSelected + + // Check milestone and assignee. + if ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) { + RetrieveRepoMilestonesAndAssignees(ctx, repo) + retrieveProjects(ctx, repo) + + if ctx.Written() { + return + } + } + + if issue.IsPull { + canChooseReviewer := ctx.Repo.CanWrite(models.UnitTypePullRequests) + if !canChooseReviewer && ctx.User != nil && ctx.IsSigned { + canChooseReviewer, err = models.IsOfficialReviewer(issue, ctx.User) + if err != nil { + ctx.ServerError("IsOfficialReviewer", err) + return + } + } + + RetrieveRepoReviewers(ctx, repo, issue, canChooseReviewer) + if ctx.Written() { + return + } + } + + if ctx.IsSigned { + // Update issue-user. + if err = issue.ReadBy(ctx.User.ID); err != nil { + ctx.ServerError("ReadBy", err) + return + } + } + + var ( + tag models.CommentTag + ok bool + marked = make(map[int64]models.CommentTag) + comment *models.Comment + participants = make([]*models.User, 1, 10) + ) + if ctx.Repo.Repository.IsTimetrackerEnabled() { + if ctx.IsSigned { + // Deal with the stopwatch + ctx.Data["IsStopwatchRunning"] = models.StopwatchExists(ctx.User.ID, issue.ID) + if !ctx.Data["IsStopwatchRunning"].(bool) { + var exists bool + var sw *models.Stopwatch + if exists, sw, err = models.HasUserStopwatch(ctx.User.ID); err != nil { + ctx.ServerError("HasUserStopwatch", err) + return + } + ctx.Data["HasUserStopwatch"] = exists + if exists { + // Add warning if the user has already a stopwatch + var otherIssue *models.Issue + if otherIssue, err = models.GetIssueByID(sw.IssueID); err != nil { + ctx.ServerError("GetIssueByID", err) + return + } + if err = otherIssue.LoadRepo(); err != nil { + ctx.ServerError("LoadRepo", err) + return + } + // Add link to the issue of the already running stopwatch + ctx.Data["OtherStopwatchURL"] = otherIssue.HTMLURL() + } + } + ctx.Data["CanUseTimetracker"] = ctx.Repo.CanUseTimetracker(issue, ctx.User) + } else { + ctx.Data["CanUseTimetracker"] = false + } + if ctx.Data["WorkingUsers"], err = models.TotalTimes(&models.FindTrackedTimesOptions{IssueID: issue.ID}); err != nil { + ctx.ServerError("TotalTimes", err) + return + } + } + + // Check if the user can use the dependencies + ctx.Data["CanCreateIssueDependencies"] = ctx.Repo.CanCreateIssueDependencies(ctx.User, issue.IsPull) + + // check if dependencies can be created across repositories + ctx.Data["AllowCrossRepositoryDependencies"] = setting.Service.AllowCrossRepositoryDependencies + + if issue.ShowTag, err = commentTag(repo, issue.Poster, issue); err != nil { + ctx.ServerError("commentTag", err) + return + } + marked[issue.PosterID] = issue.ShowTag + + // Render comments and and fetch participants. + participants[0] = issue.Poster + for _, comment = range issue.Comments { + comment.Issue = issue + + if err := comment.LoadPoster(); err != nil { + ctx.ServerError("LoadPoster", err) + return + } + + if comment.Type == models.CommentTypeComment { + if err := comment.LoadAttachments(); err != nil { + ctx.ServerError("LoadAttachments", err) + return + } + + comment.RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, comment.Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + // Check tag. + tag, ok = marked[comment.PosterID] + if ok { + comment.ShowTag = tag + continue + } + + comment.ShowTag, err = commentTag(repo, comment.Poster, issue) + if err != nil { + ctx.ServerError("commentTag", err) + return + } + marked[comment.PosterID] = comment.ShowTag + participants = addParticipant(comment.Poster, participants) + } else if comment.Type == models.CommentTypeLabel { + if err = comment.LoadLabel(); err != nil { + ctx.ServerError("LoadLabel", err) + return + } + } else if comment.Type == models.CommentTypeMilestone { + if err = comment.LoadMilestone(); err != nil { + ctx.ServerError("LoadMilestone", err) + return + } + ghostMilestone := &models.Milestone{ + ID: -1, + Name: ctx.Tr("repo.issues.deleted_milestone"), + } + if comment.OldMilestoneID > 0 && comment.OldMilestone == nil { + comment.OldMilestone = ghostMilestone + } + if comment.MilestoneID > 0 && comment.Milestone == nil { + comment.Milestone = ghostMilestone + } + } else if comment.Type == models.CommentTypeProject { + + if err = comment.LoadProject(); err != nil { + ctx.ServerError("LoadProject", err) + return + } + + ghostProject := &models.Project{ + ID: -1, + Title: ctx.Tr("repo.issues.deleted_project"), + } + + if comment.OldProjectID > 0 && comment.OldProject == nil { + comment.OldProject = ghostProject + } + + if comment.ProjectID > 0 && comment.Project == nil { + comment.Project = ghostProject + } + + } else if comment.Type == models.CommentTypeAssignees || comment.Type == models.CommentTypeReviewRequest { + if err = comment.LoadAssigneeUserAndTeam(); err != nil { + ctx.ServerError("LoadAssigneeUserAndTeam", err) + return + } + } else if comment.Type == models.CommentTypeRemoveDependency || comment.Type == models.CommentTypeAddDependency { + if err = comment.LoadDepIssueDetails(); err != nil { + if !models.IsErrIssueNotExist(err) { + ctx.ServerError("LoadDepIssueDetails", err) + return + } + } + } else if comment.Type == models.CommentTypeCode || comment.Type == models.CommentTypeReview || comment.Type == models.CommentTypeDismissReview { + comment.RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, comment.Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + if err = comment.LoadReview(); err != nil && !models.IsErrReviewNotExist(err) { + ctx.ServerError("LoadReview", err) + return + } + participants = addParticipant(comment.Poster, participants) + if comment.Review == nil { + continue + } + if err = comment.Review.LoadAttributes(); err != nil { + if !models.IsErrUserNotExist(err) { + ctx.ServerError("Review.LoadAttributes", err) + return + } + comment.Review.Reviewer = models.NewGhostUser() + } + if err = comment.Review.LoadCodeComments(); err != nil { + ctx.ServerError("Review.LoadCodeComments", err) + return + } + for _, codeComments := range comment.Review.CodeComments { + for _, lineComments := range codeComments { + for _, c := range lineComments { + // Check tag. + tag, ok = marked[c.PosterID] + if ok { + c.ShowTag = tag + continue + } + + c.ShowTag, err = commentTag(repo, c.Poster, issue) + if err != nil { + ctx.ServerError("commentTag", err) + return + } + marked[c.PosterID] = c.ShowTag + participants = addParticipant(c.Poster, participants) + } + } + } + if err = comment.LoadResolveDoer(); err != nil { + ctx.ServerError("LoadResolveDoer", err) + return + } + } else if comment.Type == models.CommentTypePullPush { + participants = addParticipant(comment.Poster, participants) + if err = comment.LoadPushCommits(); err != nil { + ctx.ServerError("LoadPushCommits", err) + return + } + } else if comment.Type == models.CommentTypeAddTimeManual || + comment.Type == models.CommentTypeStopTracking { + // drop error since times could be pruned from DB.. + _ = comment.LoadTime() + } + } + + // Combine multiple label assignments into a single comment + combineLabelComments(issue) + + getBranchData(ctx, issue) + if issue.IsPull { + pull := issue.PullRequest + pull.Issue = issue + canDelete := false + ctx.Data["AllowMerge"] = false + + if ctx.IsSigned { + if err := pull.LoadHeadRepo(); err != nil { + log.Error("LoadHeadRepo: %v", err) + } else if pull.HeadRepo != nil && pull.HeadBranch != pull.HeadRepo.DefaultBranch { + perm, err := models.GetUserRepoPermission(pull.HeadRepo, ctx.User) + if err != nil { + ctx.ServerError("GetUserRepoPermission", err) + return + } + if perm.CanWrite(models.UnitTypeCode) { + // Check if branch is not protected + if protected, err := pull.HeadRepo.IsProtectedBranch(pull.HeadBranch); err != nil { + log.Error("IsProtectedBranch: %v", err) + } else if !protected { + canDelete = true + ctx.Data["DeleteBranchLink"] = ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index) + "/cleanup" + } + } + } + + if err := pull.LoadBaseRepo(); err != nil { + log.Error("LoadBaseRepo: %v", err) + } + perm, err := models.GetUserRepoPermission(pull.BaseRepo, ctx.User) + if err != nil { + ctx.ServerError("GetUserRepoPermission", err) + return + } + ctx.Data["AllowMerge"], err = pull_service.IsUserAllowedToMerge(pull, perm, ctx.User) + if err != nil { + ctx.ServerError("IsUserAllowedToMerge", err) + return + } + + if ctx.Data["CanMarkConversation"], err = models.CanMarkConversation(issue, ctx.User); err != nil { + ctx.ServerError("CanMarkConversation", err) + return + } + } + + prUnit, err := repo.GetUnit(models.UnitTypePullRequests) + if err != nil { + ctx.ServerError("GetUnit", err) + return + } + prConfig := prUnit.PullRequestsConfig() + + // Check correct values and select default + if ms, ok := ctx.Data["MergeStyle"].(models.MergeStyle); !ok || + !prConfig.IsMergeStyleAllowed(ms) { + defaultMergeStyle := prConfig.GetDefaultMergeStyle() + if prConfig.IsMergeStyleAllowed(defaultMergeStyle) && !ok { + ctx.Data["MergeStyle"] = defaultMergeStyle + } else if prConfig.AllowMerge { + ctx.Data["MergeStyle"] = models.MergeStyleMerge + } else if prConfig.AllowRebase { + ctx.Data["MergeStyle"] = models.MergeStyleRebase + } else if prConfig.AllowRebaseMerge { + ctx.Data["MergeStyle"] = models.MergeStyleRebaseMerge + } else if prConfig.AllowSquash { + ctx.Data["MergeStyle"] = models.MergeStyleSquash + } else if prConfig.AllowManualMerge { + ctx.Data["MergeStyle"] = models.MergeStyleManuallyMerged + } else { + ctx.Data["MergeStyle"] = "" + } + } + if err = pull.LoadProtectedBranch(); err != nil { + ctx.ServerError("LoadProtectedBranch", err) + return + } + if pull.ProtectedBranch != nil { + cnt := pull.ProtectedBranch.GetGrantedApprovalsCount(pull) + ctx.Data["IsBlockedByApprovals"] = !pull.ProtectedBranch.HasEnoughApprovals(pull) + ctx.Data["IsBlockedByRejection"] = pull.ProtectedBranch.MergeBlockedByRejectedReview(pull) + ctx.Data["IsBlockedByOfficialReviewRequests"] = pull.ProtectedBranch.MergeBlockedByOfficialReviewRequests(pull) + ctx.Data["IsBlockedByOutdatedBranch"] = pull.ProtectedBranch.MergeBlockedByOutdatedBranch(pull) + ctx.Data["GrantedApprovals"] = cnt + ctx.Data["RequireSigned"] = pull.ProtectedBranch.RequireSignedCommits + ctx.Data["ChangedProtectedFiles"] = pull.ChangedProtectedFiles + ctx.Data["IsBlockedByChangedProtectedFiles"] = len(pull.ChangedProtectedFiles) != 0 + ctx.Data["ChangedProtectedFilesNum"] = len(pull.ChangedProtectedFiles) + } + ctx.Data["WillSign"] = false + if ctx.User != nil { + sign, key, _, err := pull.SignMerge(ctx.User, pull.BaseRepo.RepoPath(), pull.BaseBranch, pull.GetGitRefName()) + ctx.Data["WillSign"] = sign + ctx.Data["SigningKey"] = key + if err != nil { + if models.IsErrWontSign(err) { + ctx.Data["WontSignReason"] = err.(*models.ErrWontSign).Reason + } else { + ctx.Data["WontSignReason"] = "error" + log.Error("Error whilst checking if could sign pr %d in repo %s. Error: %v", pull.ID, pull.BaseRepo.FullName(), err) + } + } + } else { + ctx.Data["WontSignReason"] = "not_signed_in" + } + ctx.Data["IsPullBranchDeletable"] = canDelete && + pull.HeadRepo != nil && + git.IsBranchExist(pull.HeadRepo.RepoPath(), pull.HeadBranch) && + (!pull.HasMerged || ctx.Data["HeadBranchCommitID"] == ctx.Data["PullHeadCommitID"]) + + stillCanManualMerge := func() bool { + if pull.HasMerged || issue.IsClosed || !ctx.IsSigned { + return false + } + if pull.CanAutoMerge() || pull.IsWorkInProgress() || pull.IsChecking() { + return false + } + if (ctx.User.IsAdmin || ctx.Repo.IsAdmin()) && prConfig.AllowManualMerge { + return true + } + + return false + } + + ctx.Data["StillCanManualMerge"] = stillCanManualMerge() + } + + // Get Dependencies + ctx.Data["BlockedByDependencies"], err = issue.BlockedByDependencies() + if err != nil { + ctx.ServerError("BlockedByDependencies", err) + return + } + ctx.Data["BlockingDependencies"], err = issue.BlockingDependencies() + if err != nil { + ctx.ServerError("BlockingDependencies", err) + return + } + + ctx.Data["Participants"] = participants + ctx.Data["NumParticipants"] = len(participants) + ctx.Data["Issue"] = issue + ctx.Data["ReadOnly"] = false + ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login?redirect_to=" + ctx.Data["Link"].(string) + ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID) + ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) + ctx.Data["HasProjectsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypeProjects) + ctx.Data["IsRepoAdmin"] = ctx.IsSigned && (ctx.Repo.IsAdmin() || ctx.User.IsAdmin) + ctx.Data["LockReasons"] = setting.Repository.Issue.LockReasons + ctx.Data["RefEndName"] = git.RefEndName(issue.Ref) + ctx.HTML(http.StatusOK, tplIssueView) +} + +// GetActionIssue will return the issue which is used in the context. +func GetActionIssue(ctx *context.Context) *models.Issue { + issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) + if err != nil { + ctx.NotFoundOrServerError("GetIssueByIndex", models.IsErrIssueNotExist, err) + return nil + } + issue.Repo = ctx.Repo.Repository + checkIssueRights(ctx, issue) + if ctx.Written() { + return nil + } + if err = issue.LoadAttributes(); err != nil { + ctx.ServerError("LoadAttributes", nil) + return nil + } + return issue +} + +func checkIssueRights(ctx *context.Context, issue *models.Issue) { + if issue.IsPull && !ctx.Repo.CanRead(models.UnitTypePullRequests) || + !issue.IsPull && !ctx.Repo.CanRead(models.UnitTypeIssues) { + ctx.NotFound("IssueOrPullRequestUnitNotAllowed", nil) + } +} + +func getActionIssues(ctx *context.Context) []*models.Issue { + commaSeparatedIssueIDs := ctx.FormString("issue_ids") + if len(commaSeparatedIssueIDs) == 0 { + return nil + } + issueIDs := make([]int64, 0, 10) + for _, stringIssueID := range strings.Split(commaSeparatedIssueIDs, ",") { + issueID, err := strconv.ParseInt(stringIssueID, 10, 64) + if err != nil { + ctx.ServerError("ParseInt", err) + return nil + } + issueIDs = append(issueIDs, issueID) + } + issues, err := models.GetIssuesByIDs(issueIDs) + if err != nil { + ctx.ServerError("GetIssuesByIDs", err) + return nil + } + // Check access rights for all issues + issueUnitEnabled := ctx.Repo.CanRead(models.UnitTypeIssues) + prUnitEnabled := ctx.Repo.CanRead(models.UnitTypePullRequests) + for _, issue := range issues { + if issue.IsPull && !prUnitEnabled || !issue.IsPull && !issueUnitEnabled { + ctx.NotFound("IssueOrPullRequestUnitNotAllowed", nil) + return nil + } + if err = issue.LoadAttributes(); err != nil { + ctx.ServerError("LoadAttributes", err) + return nil + } + } + return issues +} + +// UpdateIssueTitle change issue's title +func UpdateIssueTitle(ctx *context.Context) { + issue := GetActionIssue(ctx) + if ctx.Written() { + return + } + + if !ctx.IsSigned || (!issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) { + ctx.Error(http.StatusForbidden) + return + } + + title := ctx.FormTrim("title") + if len(title) == 0 { + ctx.Error(http.StatusNoContent) + return + } + + if err := issue_service.ChangeTitle(issue, ctx.User, title); err != nil { + ctx.ServerError("ChangeTitle", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "title": issue.Title, + }) +} + +// UpdateIssueRef change issue's ref (branch) +func UpdateIssueRef(ctx *context.Context) { + issue := GetActionIssue(ctx) + if ctx.Written() { + return + } + + if !ctx.IsSigned || (!issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) || issue.IsPull { + ctx.Error(http.StatusForbidden) + return + } + + ref := ctx.FormTrim("ref") + + if err := issue_service.ChangeIssueRef(issue, ctx.User, ref); err != nil { + ctx.ServerError("ChangeRef", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ref": ref, + }) +} + +// UpdateIssueContent change issue's content +func UpdateIssueContent(ctx *context.Context) { + issue := GetActionIssue(ctx) + if ctx.Written() { + return + } + + if !ctx.IsSigned || (ctx.User.ID != issue.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) { + ctx.Error(http.StatusForbidden) + return + } + + if err := issue_service.ChangeContent(issue, ctx.User, ctx.Req.FormValue("content")); err != nil { + ctx.ServerError("ChangeContent", err) + return + } + + // when update the request doesn't intend to update attachments (eg: change checkbox state), ignore attachment updates + if !ctx.FormBool("ignore_attachments") { + if err := updateAttachments(issue, ctx.FormStrings("files[]")); err != nil { + ctx.ServerError("UpdateAttachments", err) + return + } + } + + content, err := markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.FormString("context"), + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, issue.Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "content": content, + "attachments": attachmentsHTML(ctx, issue.Attachments, issue.Content), + }) +} + +// UpdateIssueMilestone change issue's milestone +func UpdateIssueMilestone(ctx *context.Context) { + issues := getActionIssues(ctx) + if ctx.Written() { + return + } + + milestoneID := ctx.FormInt64("id") + for _, issue := range issues { + oldMilestoneID := issue.MilestoneID + if oldMilestoneID == milestoneID { + continue + } + issue.MilestoneID = milestoneID + if err := issue_service.ChangeMilestoneAssign(issue, ctx.User, oldMilestoneID); err != nil { + ctx.ServerError("ChangeMilestoneAssign", err) + return + } + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// UpdateIssueAssignee change issue's or pull's assignee +func UpdateIssueAssignee(ctx *context.Context) { + issues := getActionIssues(ctx) + if ctx.Written() { + return + } + + assigneeID := ctx.FormInt64("id") + action := ctx.FormString("action") + + for _, issue := range issues { + switch action { + case "clear": + if err := issue_service.DeleteNotPassedAssignee(issue, ctx.User, []*models.User{}); err != nil { + ctx.ServerError("ClearAssignees", err) + return + } + default: + assignee, err := models.GetUserByID(assigneeID) + if err != nil { + ctx.ServerError("GetUserByID", err) + return + } + + valid, err := models.CanBeAssigned(assignee, issue.Repo, issue.IsPull) + if err != nil { + ctx.ServerError("canBeAssigned", err) + return + } + if !valid { + ctx.ServerError("canBeAssigned", models.ErrUserDoesNotHaveAccessToRepo{UserID: assigneeID, RepoName: issue.Repo.Name}) + return + } + + _, _, err = issue_service.ToggleAssignee(issue, ctx.User, assigneeID) + if err != nil { + ctx.ServerError("ToggleAssignee", err) + return + } + } + } + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// UpdatePullReviewRequest add or remove review request +func UpdatePullReviewRequest(ctx *context.Context) { + issues := getActionIssues(ctx) + if ctx.Written() { + return + } + + reviewID := ctx.FormInt64("id") + action := ctx.FormString("action") + + // TODO: Not support 'clear' now + if action != "attach" && action != "detach" { + ctx.Status(403) + return + } + + for _, issue := range issues { + if err := issue.LoadRepo(); err != nil { + ctx.ServerError("issue.LoadRepo", err) + return + } + + if !issue.IsPull { + log.Warn( + "UpdatePullReviewRequest: refusing to add review request for non-PR issue %-v#%d", + issue.Repo, issue.Index, + ) + ctx.Status(403) + return + } + if reviewID < 0 { + // negative reviewIDs represent team requests + if err := issue.Repo.GetOwner(); err != nil { + ctx.ServerError("issue.Repo.GetOwner", err) + return + } + + if !issue.Repo.Owner.IsOrganization() { + log.Warn( + "UpdatePullReviewRequest: refusing to add team review request for %s#%d owned by non organization UID[%d]", + issue.Repo.FullName(), issue.Index, issue.Repo.ID, + ) + ctx.Status(403) + return + } + + team, err := models.GetTeamByID(-reviewID) + if err != nil { + ctx.ServerError("models.GetTeamByID", err) + return + } + + if team.OrgID != issue.Repo.OwnerID { + log.Warn( + "UpdatePullReviewRequest: refusing to add team review request for UID[%d] team %s to %s#%d owned by UID[%d]", + team.OrgID, team.Name, issue.Repo.FullName(), issue.Index, issue.Repo.ID) + ctx.Status(403) + return + } + + err = issue_service.IsValidTeamReviewRequest(team, ctx.User, action == "attach", issue) + if err != nil { + if models.IsErrNotValidReviewRequest(err) { + log.Warn( + "UpdatePullReviewRequest: refusing to add invalid team review request for UID[%d] team %s to %s#%d owned by UID[%d]: Error: %v", + team.OrgID, team.Name, issue.Repo.FullName(), issue.Index, issue.Repo.ID, + err, + ) + ctx.Status(403) + return + } + ctx.ServerError("IsValidTeamReviewRequest", err) + return + } + + _, err = issue_service.TeamReviewRequest(issue, ctx.User, team, action == "attach") + if err != nil { + ctx.ServerError("TeamReviewRequest", err) + return + } + continue + } + + reviewer, err := models.GetUserByID(reviewID) + if err != nil { + if models.IsErrUserNotExist(err) { + log.Warn( + "UpdatePullReviewRequest: requested reviewer [%d] for %-v to %-v#%d is not exist: Error: %v", + reviewID, issue.Repo, issue.Index, + err, + ) + ctx.Status(403) + return + } + ctx.ServerError("GetUserByID", err) + return + } + + err = issue_service.IsValidReviewRequest(reviewer, ctx.User, action == "attach", issue, nil) + if err != nil { + if models.IsErrNotValidReviewRequest(err) { + log.Warn( + "UpdatePullReviewRequest: refusing to add invalid review request for %-v to %-v#%d: Error: %v", + reviewer, issue.Repo, issue.Index, + err, + ) + ctx.Status(403) + return + } + ctx.ServerError("isValidReviewRequest", err) + return + } + + _, err = issue_service.ReviewRequest(issue, ctx.User, reviewer, action == "attach") + if err != nil { + ctx.ServerError("ReviewRequest", err) + return + } + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// UpdateIssueStatus change issue's status +func UpdateIssueStatus(ctx *context.Context) { + issues := getActionIssues(ctx) + if ctx.Written() { + return + } + + var isClosed bool + switch action := ctx.FormString("action"); action { + case "open": + isClosed = false + case "close": + isClosed = true + default: + log.Warn("Unrecognized action: %s", action) + } + + if _, err := models.IssueList(issues).LoadRepositories(); err != nil { + ctx.ServerError("LoadRepositories", err) + return + } + for _, issue := range issues { + if issue.IsClosed != isClosed { + if err := issue_service.ChangeStatus(issue, ctx.User, isClosed); err != nil { + if models.IsErrDependenciesLeft(err) { + ctx.JSON(http.StatusPreconditionFailed, map[string]interface{}{ + "error": "cannot close this issue because it still has open dependencies", + }) + return + } + ctx.ServerError("ChangeStatus", err) + return + } + } + } + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// NewComment create a comment for issue +func NewComment(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateCommentForm) + issue := GetActionIssue(ctx) + if ctx.Written() { + return + } + + if !ctx.IsSigned || (ctx.User.ID != issue.PosterID && !ctx.Repo.CanReadIssuesOrPulls(issue.IsPull)) { + if log.IsTrace() { + if ctx.IsSigned { + issueType := "issues" + if issue.IsPull { + issueType = "pulls" + } + log.Trace("Permission Denied: User %-v not the Poster (ID: %d) and cannot read %s in Repo %-v.\n"+ + "User in Repo has Permissions: %-+v", + ctx.User, + log.NewColoredIDValue(issue.PosterID), + issueType, + ctx.Repo.Repository, + ctx.Repo.Permission) + } else { + log.Trace("Permission Denied: Not logged in") + } + } + + ctx.Error(http.StatusForbidden) + return + } + + if issue.IsLocked && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) && !ctx.User.IsAdmin { + ctx.Flash.Error(ctx.Tr("repo.issues.comment_on_locked")) + ctx.Redirect(issue.HTMLURL(), http.StatusSeeOther) + return + } + + var attachments []string + if setting.Attachment.Enabled { + attachments = form.Files + } + + if ctx.HasError() { + ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) + ctx.Redirect(issue.HTMLURL()) + return + } + + var comment *models.Comment + defer func() { + // Check if issue admin/poster changes the status of issue. + if (ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) || (ctx.IsSigned && issue.IsPoster(ctx.User.ID))) && + (form.Status == "reopen" || form.Status == "close") && + !(issue.IsPull && issue.PullRequest.HasMerged) { + + // Duplication and conflict check should apply to reopen pull request. + var pr *models.PullRequest + + if form.Status == "reopen" && issue.IsPull { + pull := issue.PullRequest + var err error + pr, err = models.GetUnmergedPullRequest(pull.HeadRepoID, pull.BaseRepoID, pull.HeadBranch, pull.BaseBranch, pull.Flow) + if err != nil { + if !models.IsErrPullRequestNotExist(err) { + ctx.ServerError("GetUnmergedPullRequest", err) + return + } + } + + // Regenerate patch and test conflict. + if pr == nil { + issue.PullRequest.HeadCommitID = "" + pull_service.AddToTaskQueue(issue.PullRequest) + } + } + + if pr != nil { + ctx.Flash.Info(ctx.Tr("repo.pulls.open_unmerged_pull_exists", pr.Index)) + } else { + isClosed := form.Status == "close" + if err := issue_service.ChangeStatus(issue, ctx.User, isClosed); err != nil { + log.Error("ChangeStatus: %v", err) + + if models.IsErrDependenciesLeft(err) { + if issue.IsPull { + ctx.Flash.Error(ctx.Tr("repo.issues.dependency.pr_close_blocked")) + ctx.Redirect(fmt.Sprintf("%s/pulls/%d", ctx.Repo.RepoLink, issue.Index), http.StatusSeeOther) + } else { + ctx.Flash.Error(ctx.Tr("repo.issues.dependency.issue_close_blocked")) + ctx.Redirect(fmt.Sprintf("%s/issues/%d", ctx.Repo.RepoLink, issue.Index), http.StatusSeeOther) + } + return + } + } else { + if err := stopTimerIfAvailable(ctx.User, issue); err != nil { + ctx.ServerError("CreateOrStopIssueStopwatch", err) + return + } + + log.Trace("Issue [%d] status changed to closed: %v", issue.ID, issue.IsClosed) + } + } + } + + // Redirect to comment hashtag if there is any actual content. + typeName := "issues" + if issue.IsPull { + typeName = "pulls" + } + if comment != nil { + ctx.Redirect(fmt.Sprintf("%s/%s/%d#%s", ctx.Repo.RepoLink, typeName, issue.Index, comment.HashTag())) + } else { + ctx.Redirect(fmt.Sprintf("%s/%s/%d", ctx.Repo.RepoLink, typeName, issue.Index)) + } + }() + + // Fix #321: Allow empty comments, as long as we have attachments. + if len(form.Content) == 0 && len(attachments) == 0 { + return + } + + comment, err := comment_service.CreateIssueComment(ctx.User, ctx.Repo.Repository, issue, form.Content, attachments) + if err != nil { + ctx.ServerError("CreateIssueComment", err) + return + } + + log.Trace("Comment created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, comment.ID) +} + +// UpdateCommentContent change comment of issue's content +func UpdateCommentContent(ctx *context.Context) { + comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) + if err != nil { + ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) + return + } + + if err := comment.LoadIssue(); err != nil { + ctx.NotFoundOrServerError("LoadIssue", models.IsErrIssueNotExist, err) + return + } + + if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) { + ctx.Error(http.StatusForbidden) + return + } else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode { + ctx.Error(http.StatusNoContent) + return + } + + oldContent := comment.Content + comment.Content = ctx.FormString("content") + if len(comment.Content) == 0 { + ctx.JSON(http.StatusOK, map[string]interface{}{ + "content": "", + }) + return + } + if err = comment_service.UpdateComment(comment, ctx.User, oldContent); err != nil { + ctx.ServerError("UpdateComment", err) + return + } + + if comment.Type == models.CommentTypeComment { + if err := comment.LoadAttachments(); err != nil { + ctx.ServerError("LoadAttachments", err) + return + } + } + + // when the update request doesn't intend to update attachments (eg: change checkbox state), ignore attachment updates + if !ctx.FormBool("ignore_attachments") { + if err := updateAttachments(comment, ctx.FormStrings("files[]")); err != nil { + ctx.ServerError("UpdateAttachments", err) + return + } + } + + content, err := markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.FormString("context"), + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, comment.Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "content": content, + "attachments": attachmentsHTML(ctx, comment.Attachments, comment.Content), + }) +} + +// DeleteComment delete comment of issue +func DeleteComment(ctx *context.Context) { + comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) + if err != nil { + ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) + return + } + + if err := comment.LoadIssue(); err != nil { + ctx.NotFoundOrServerError("LoadIssue", models.IsErrIssueNotExist, err) + return + } + + if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.CanWriteIssuesOrPulls(comment.Issue.IsPull)) { + ctx.Error(http.StatusForbidden) + return + } else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode { + ctx.Error(http.StatusNoContent) + return + } + + if err = comment_service.DeleteComment(ctx.User, comment); err != nil { + ctx.ServerError("DeleteCommentByID", err) + return + } + + ctx.Status(200) +} + +// ChangeIssueReaction create a reaction for issue +func ChangeIssueReaction(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.ReactionForm) + issue := GetActionIssue(ctx) + if ctx.Written() { + return + } + + if !ctx.IsSigned || (ctx.User.ID != issue.PosterID && !ctx.Repo.CanReadIssuesOrPulls(issue.IsPull)) { + if log.IsTrace() { + if ctx.IsSigned { + issueType := "issues" + if issue.IsPull { + issueType = "pulls" + } + log.Trace("Permission Denied: User %-v not the Poster (ID: %d) and cannot read %s in Repo %-v.\n"+ + "User in Repo has Permissions: %-+v", + ctx.User, + log.NewColoredIDValue(issue.PosterID), + issueType, + ctx.Repo.Repository, + ctx.Repo.Permission) + } else { + log.Trace("Permission Denied: Not logged in") + } + } + + ctx.Error(http.StatusForbidden) + return + } + + if ctx.HasError() { + ctx.ServerError("ChangeIssueReaction", errors.New(ctx.GetErrMsg())) + return + } + + switch ctx.Params(":action") { + case "react": + reaction, err := models.CreateIssueReaction(ctx.User, issue, form.Content) + if err != nil { + if models.IsErrForbiddenIssueReaction(err) { + ctx.ServerError("ChangeIssueReaction", err) + return + } + log.Info("CreateIssueReaction: %s", err) + break + } + // Reload new reactions + issue.Reactions = nil + if err = issue.LoadAttributes(); err != nil { + log.Info("issue.LoadAttributes: %s", err) + break + } + + log.Trace("Reaction for issue created: %d/%d/%d", ctx.Repo.Repository.ID, issue.ID, reaction.ID) + case "unreact": + if err := models.DeleteIssueReaction(ctx.User, issue, form.Content); err != nil { + ctx.ServerError("DeleteIssueReaction", err) + return + } + + // Reload new reactions + issue.Reactions = nil + if err := issue.LoadAttributes(); err != nil { + log.Info("issue.LoadAttributes: %s", err) + break + } + + log.Trace("Reaction for issue removed: %d/%d", ctx.Repo.Repository.ID, issue.ID) + default: + ctx.NotFound(fmt.Sprintf("Unknown action %s", ctx.Params(":action")), nil) + return + } + + if len(issue.Reactions) == 0 { + ctx.JSON(http.StatusOK, map[string]interface{}{ + "empty": true, + "html": "", + }) + return + } + + html, err := ctx.HTMLString(string(tplReactions), map[string]interface{}{ + "ctx": ctx.Data, + "ActionURL": fmt.Sprintf("%s/issues/%d/reactions", ctx.Repo.RepoLink, issue.Index), + "Reactions": issue.Reactions.GroupByType(), + }) + if err != nil { + ctx.ServerError("ChangeIssueReaction.HTMLString", err) + return + } + ctx.JSON(http.StatusOK, map[string]interface{}{ + "html": html, + }) +} + +// ChangeCommentReaction create a reaction for comment +func ChangeCommentReaction(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.ReactionForm) + comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) + if err != nil { + ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) + return + } + + if err := comment.LoadIssue(); err != nil { + ctx.NotFoundOrServerError("LoadIssue", models.IsErrIssueNotExist, err) + return + } + + if !ctx.IsSigned || (ctx.User.ID != comment.PosterID && !ctx.Repo.CanReadIssuesOrPulls(comment.Issue.IsPull)) { + if log.IsTrace() { + if ctx.IsSigned { + issueType := "issues" + if comment.Issue.IsPull { + issueType = "pulls" + } + log.Trace("Permission Denied: User %-v not the Poster (ID: %d) and cannot read %s in Repo %-v.\n"+ + "User in Repo has Permissions: %-+v", + ctx.User, + log.NewColoredIDValue(comment.Issue.PosterID), + issueType, + ctx.Repo.Repository, + ctx.Repo.Permission) + } else { + log.Trace("Permission Denied: Not logged in") + } + } + + ctx.Error(http.StatusForbidden) + return + } else if comment.Type != models.CommentTypeComment && comment.Type != models.CommentTypeCode { + ctx.Error(http.StatusNoContent) + return + } + + switch ctx.Params(":action") { + case "react": + reaction, err := models.CreateCommentReaction(ctx.User, comment.Issue, comment, form.Content) + if err != nil { + if models.IsErrForbiddenIssueReaction(err) { + ctx.ServerError("ChangeIssueReaction", err) + return + } + log.Info("CreateCommentReaction: %s", err) + break + } + // Reload new reactions + comment.Reactions = nil + if err = comment.LoadReactions(ctx.Repo.Repository); err != nil { + log.Info("comment.LoadReactions: %s", err) + break + } + + log.Trace("Reaction for comment created: %d/%d/%d/%d", ctx.Repo.Repository.ID, comment.Issue.ID, comment.ID, reaction.ID) + case "unreact": + if err := models.DeleteCommentReaction(ctx.User, comment.Issue, comment, form.Content); err != nil { + ctx.ServerError("DeleteCommentReaction", err) + return + } + + // Reload new reactions + comment.Reactions = nil + if err = comment.LoadReactions(ctx.Repo.Repository); err != nil { + log.Info("comment.LoadReactions: %s", err) + break + } + + log.Trace("Reaction for comment removed: %d/%d/%d", ctx.Repo.Repository.ID, comment.Issue.ID, comment.ID) + default: + ctx.NotFound(fmt.Sprintf("Unknown action %s", ctx.Params(":action")), nil) + return + } + + if len(comment.Reactions) == 0 { + ctx.JSON(http.StatusOK, map[string]interface{}{ + "empty": true, + "html": "", + }) + return + } + + html, err := ctx.HTMLString(string(tplReactions), map[string]interface{}{ + "ctx": ctx.Data, + "ActionURL": fmt.Sprintf("%s/comments/%d/reactions", ctx.Repo.RepoLink, comment.ID), + "Reactions": comment.Reactions.GroupByType(), + }) + if err != nil { + ctx.ServerError("ChangeCommentReaction.HTMLString", err) + return + } + ctx.JSON(http.StatusOK, map[string]interface{}{ + "html": html, + }) +} + +func addParticipant(poster *models.User, participants []*models.User) []*models.User { + for _, part := range participants { + if poster.ID == part.ID { + return participants + } + } + return append(participants, poster) +} + +func filterXRefComments(ctx *context.Context, issue *models.Issue) error { + // Remove comments that the user has no permissions to see + for i := 0; i < len(issue.Comments); { + c := issue.Comments[i] + if models.CommentTypeIsRef(c.Type) && c.RefRepoID != issue.RepoID && c.RefRepoID != 0 { + var err error + // Set RefRepo for description in template + c.RefRepo, err = models.GetRepositoryByID(c.RefRepoID) + if err != nil { + return err + } + perm, err := models.GetUserRepoPermission(c.RefRepo, ctx.User) + if err != nil { + return err + } + if !perm.CanReadIssuesOrPulls(c.RefIsPull) { + issue.Comments = append(issue.Comments[:i], issue.Comments[i+1:]...) + continue + } + } + i++ + } + return nil +} + +// GetIssueAttachments returns attachments for the issue +func GetIssueAttachments(ctx *context.Context) { + issue := GetActionIssue(ctx) + var attachments = make([]*api.Attachment, len(issue.Attachments)) + for i := 0; i < len(issue.Attachments); i++ { + attachments[i] = convert.ToReleaseAttachment(issue.Attachments[i]) + } + ctx.JSON(http.StatusOK, attachments) +} + +// GetCommentAttachments returns attachments for the comment +func GetCommentAttachments(ctx *context.Context) { + comment, err := models.GetCommentByID(ctx.ParamsInt64(":id")) + if err != nil { + ctx.NotFoundOrServerError("GetCommentByID", models.IsErrCommentNotExist, err) + return + } + var attachments = make([]*api.Attachment, 0) + if comment.Type == models.CommentTypeComment { + if err := comment.LoadAttachments(); err != nil { + ctx.ServerError("LoadAttachments", err) + return + } + for i := 0; i < len(comment.Attachments); i++ { + attachments = append(attachments, convert.ToReleaseAttachment(comment.Attachments[i])) + } + } + ctx.JSON(http.StatusOK, attachments) +} + +func updateAttachments(item interface{}, files []string) error { + var attachments []*models.Attachment + switch content := item.(type) { + case *models.Issue: + attachments = content.Attachments + case *models.Comment: + attachments = content.Attachments + default: + return fmt.Errorf("Unknown Type: %T", content) + } + for i := 0; i < len(attachments); i++ { + if util.IsStringInSlice(attachments[i].UUID, files) { + continue + } + if err := models.DeleteAttachment(attachments[i], true); err != nil { + return err + } + } + var err error + if len(files) > 0 { + switch content := item.(type) { + case *models.Issue: + err = content.UpdateAttachments(files) + case *models.Comment: + err = content.UpdateAttachments(files) + default: + return fmt.Errorf("Unknown Type: %T", content) + } + if err != nil { + return err + } + } + switch content := item.(type) { + case *models.Issue: + content.Attachments, err = models.GetAttachmentsByIssueID(content.ID) + case *models.Comment: + content.Attachments, err = models.GetAttachmentsByCommentID(content.ID) + default: + return fmt.Errorf("Unknown Type: %T", content) + } + return err +} + +func attachmentsHTML(ctx *context.Context, attachments []*models.Attachment, content string) string { + attachHTML, err := ctx.HTMLString(string(tplAttachment), map[string]interface{}{ + "ctx": ctx.Data, + "Attachments": attachments, + "Content": content, + }) + if err != nil { + ctx.ServerError("attachmentsHTML.HTMLString", err) + return "" + } + return attachHTML +} + +// combineLabelComments combine the nearby label comments as one. +func combineLabelComments(issue *models.Issue) { + var prev, cur *models.Comment + for i := 0; i < len(issue.Comments); i++ { + cur = issue.Comments[i] + if i > 0 { + prev = issue.Comments[i-1] + } + if i == 0 || cur.Type != models.CommentTypeLabel || + (prev != nil && prev.PosterID != cur.PosterID) || + (prev != nil && cur.CreatedUnix-prev.CreatedUnix >= 60) { + if cur.Type == models.CommentTypeLabel && cur.Label != nil { + if cur.Content != "1" { + cur.RemovedLabels = append(cur.RemovedLabels, cur.Label) + } else { + cur.AddedLabels = append(cur.AddedLabels, cur.Label) + } + } + continue + } + + if cur.Label != nil { // now cur MUST be label comment + if prev.Type == models.CommentTypeLabel { // we can combine them only prev is a label comment + if cur.Content != "1" { + prev.RemovedLabels = append(prev.RemovedLabels, cur.Label) + } else { + prev.AddedLabels = append(prev.AddedLabels, cur.Label) + } + prev.CreatedUnix = cur.CreatedUnix + // remove the current comment since it has been combined to prev comment + issue.Comments = append(issue.Comments[:i], issue.Comments[i+1:]...) + i-- + } else { // if prev is not a label comment, start a new group + if cur.Content != "1" { + cur.RemovedLabels = append(cur.RemovedLabels, cur.Label) + } else { + cur.AddedLabels = append(cur.AddedLabels, cur.Label) + } + } + } + } +} + +// get all teams that current user can mention +func handleTeamMentions(ctx *context.Context) { + if ctx.User == nil || !ctx.Repo.Owner.IsOrganization() { + return + } + + isAdmin := false + var err error + // Admin has super access. + if ctx.User.IsAdmin { + isAdmin = true + } else { + isAdmin, err = ctx.Repo.Owner.IsOwnedBy(ctx.User.ID) + if err != nil { + ctx.ServerError("IsOwnedBy", err) + return + } + } + + if isAdmin { + if err := ctx.Repo.Owner.LoadTeams(); err != nil { + ctx.ServerError("LoadTeams", err) + return + } + } else { + ctx.Repo.Owner.Teams, err = ctx.Repo.Owner.GetUserTeams(ctx.User.ID) + if err != nil { + ctx.ServerError("GetUserTeams", err) + return + } + } + + ctx.Data["MentionableTeams"] = ctx.Repo.Owner.Teams + ctx.Data["MentionableTeamsOrg"] = ctx.Repo.Owner.Name + ctx.Data["MentionableTeamsOrgAvatar"] = ctx.Repo.Owner.RelAvatarLink() +} diff --git a/routers/repo/issue_dependency.go b/routers/web/repo/issue_dependency.go similarity index 97% rename from routers/repo/issue_dependency.go rename to routers/web/repo/issue_dependency.go index 8a83c7bae..015f31d83 100644 --- a/routers/repo/issue_dependency.go +++ b/routers/web/repo/issue_dependency.go @@ -27,7 +27,7 @@ func AddDependency(ctx *context.Context) { return } - depID := ctx.QueryInt64("newDependency") + depID := ctx.FormInt64("newDependency") if err = issue.LoadRepo(); err != nil { ctx.ServerError("LoadRepo", err) @@ -86,7 +86,7 @@ func RemoveDependency(ctx *context.Context) { return } - depID := ctx.QueryInt64("removeDependencyID") + depID := ctx.FormInt64("removeDependencyID") if err = issue.LoadRepo(); err != nil { ctx.ServerError("LoadRepo", err) diff --git a/routers/web/repo/issue_label.go b/routers/web/repo/issue_label.go new file mode 100644 index 000000000..abb529649 --- /dev/null +++ b/routers/web/repo/issue_label.go @@ -0,0 +1,222 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" + issue_service "code.gitea.io/gitea/services/issue" +) + +const ( + tplLabels base.TplName = "repo/issue/labels" +) + +// Labels render issue's labels page +func Labels(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.labels") + ctx.Data["PageIsIssueList"] = true + ctx.Data["PageIsLabels"] = true + ctx.Data["RequireTribute"] = true + ctx.Data["LabelTemplates"] = models.LabelTemplates + ctx.HTML(http.StatusOK, tplLabels) +} + +// InitializeLabels init labels for a repository +func InitializeLabels(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.InitializeLabelsForm) + if ctx.HasError() { + ctx.Redirect(ctx.Repo.RepoLink + "/labels") + return + } + + if err := models.InitializeLabels(models.DefaultDBContext(), ctx.Repo.Repository.ID, form.TemplateName, false); err != nil { + if models.IsErrIssueLabelTemplateLoad(err) { + originalErr := err.(models.ErrIssueLabelTemplateLoad).OriginalError + ctx.Flash.Error(ctx.Tr("repo.issues.label_templates.fail_to_load_file", form.TemplateName, originalErr)) + ctx.Redirect(ctx.Repo.RepoLink + "/labels") + return + } + ctx.ServerError("InitializeLabels", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/labels") +} + +// RetrieveLabels find all the labels of a repository and organization +func RetrieveLabels(ctx *context.Context) { + labels, err := models.GetLabelsByRepoID(ctx.Repo.Repository.ID, ctx.FormString("sort"), models.ListOptions{}) + if err != nil { + ctx.ServerError("RetrieveLabels.GetLabels", err) + return + } + + for _, l := range labels { + l.CalOpenIssues() + } + + ctx.Data["Labels"] = labels + + if ctx.Repo.Owner.IsOrganization() { + orgLabels, err := models.GetLabelsByOrgID(ctx.Repo.Owner.ID, ctx.FormString("sort"), models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLabelsByOrgID", err) + return + } + for _, l := range orgLabels { + l.CalOpenOrgIssues(ctx.Repo.Repository.ID, l.ID) + } + ctx.Data["OrgLabels"] = orgLabels + + org, err := models.GetOrgByName(ctx.Repo.Owner.LowerName) + if err != nil { + ctx.ServerError("GetOrgByName", err) + return + } + if ctx.User != nil { + ctx.Org.IsOwner, err = org.IsOwnedBy(ctx.User.ID) + if err != nil { + ctx.ServerError("org.IsOwnedBy", err) + return + } + ctx.Org.OrgLink = org.OrganisationLink() + ctx.Data["IsOrganizationOwner"] = ctx.Org.IsOwner + ctx.Data["OrganizationLink"] = ctx.Org.OrgLink + } + } + ctx.Data["NumLabels"] = len(labels) + ctx.Data["SortType"] = ctx.FormString("sort") +} + +// NewLabel create new label for repository +func NewLabel(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateLabelForm) + ctx.Data["Title"] = ctx.Tr("repo.labels") + ctx.Data["PageIsLabels"] = true + + if ctx.HasError() { + ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) + ctx.Redirect(ctx.Repo.RepoLink + "/labels") + return + } + + l := &models.Label{ + RepoID: ctx.Repo.Repository.ID, + Name: form.Title, + Description: form.Description, + Color: form.Color, + } + if err := models.NewLabel(l); err != nil { + ctx.ServerError("NewLabel", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/labels") +} + +// UpdateLabel update a label's name and color +func UpdateLabel(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateLabelForm) + l, err := models.GetLabelInRepoByID(ctx.Repo.Repository.ID, form.ID) + if err != nil { + switch { + case models.IsErrRepoLabelNotExist(err): + ctx.Error(http.StatusNotFound) + default: + ctx.ServerError("UpdateLabel", err) + } + return + } + + l.Name = form.Title + l.Description = form.Description + l.Color = form.Color + if err := models.UpdateLabel(l); err != nil { + ctx.ServerError("UpdateLabel", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/labels") +} + +// DeleteLabel delete a label +func DeleteLabel(ctx *context.Context) { + if err := models.DeleteLabel(ctx.Repo.Repository.ID, ctx.FormInt64("id")); err != nil { + ctx.Flash.Error("DeleteLabel: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("repo.issues.label_deletion_success")) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/labels", + }) +} + +// UpdateIssueLabel change issue's labels +func UpdateIssueLabel(ctx *context.Context) { + issues := getActionIssues(ctx) + if ctx.Written() { + return + } + + switch action := ctx.FormString("action"); action { + case "clear": + for _, issue := range issues { + if err := issue_service.ClearLabels(issue, ctx.User); err != nil { + ctx.ServerError("ClearLabels", err) + return + } + } + case "attach", "detach", "toggle": + label, err := models.GetLabelByID(ctx.FormInt64("id")) + if err != nil { + if models.IsErrRepoLabelNotExist(err) { + ctx.Error(http.StatusNotFound, "GetLabelByID") + } else { + ctx.ServerError("GetLabelByID", err) + } + return + } + + if action == "toggle" { + // detach if any issues already have label, otherwise attach + action = "attach" + for _, issue := range issues { + if issue.HasLabel(label.ID) { + action = "detach" + break + } + } + } + + if action == "attach" { + for _, issue := range issues { + if err = issue_service.AddLabel(issue, ctx.User, label); err != nil { + ctx.ServerError("AddLabel", err) + return + } + } + } else { + for _, issue := range issues { + if err = issue_service.RemoveLabel(issue, ctx.User, label); err != nil { + ctx.ServerError("RemoveLabel", err) + return + } + } + } + default: + log.Warn("Unrecognized action: %s", action) + ctx.Error(http.StatusInternalServerError) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} diff --git a/routers/repo/issue_label_test.go b/routers/web/repo/issue_label_test.go similarity index 94% rename from routers/repo/issue_label_test.go rename to routers/web/repo/issue_label_test.go index bf6251125..bf9e72a6f 100644 --- a/routers/repo/issue_label_test.go +++ b/routers/web/repo/issue_label_test.go @@ -10,8 +10,9 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" "github.com/stretchr/testify/assert" ) @@ -32,7 +33,8 @@ func TestInitializeLabels(t *testing.T) { ctx := test.MockContext(t, "user2/repo1/labels/initialize") test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 2) - InitializeLabels(ctx, auth.InitializeLabelsForm{TemplateName: "Default"}) + web.SetForm(ctx, &forms.InitializeLabelsForm{TemplateName: "Default"}) + InitializeLabels(ctx) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.Label{ RepoID: 2, @@ -74,10 +76,11 @@ func TestNewLabel(t *testing.T) { ctx := test.MockContext(t, "user2/repo1/labels/edit") test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 1) - NewLabel(ctx, auth.CreateLabelForm{ + web.SetForm(ctx, &forms.CreateLabelForm{ Title: "newlabel", Color: "#abcdef", }) + NewLabel(ctx) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.Label{ Name: "newlabel", @@ -91,11 +94,12 @@ func TestUpdateLabel(t *testing.T) { ctx := test.MockContext(t, "user2/repo1/labels/edit") test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 1) - UpdateLabel(ctx, auth.CreateLabelForm{ + web.SetForm(ctx, &forms.CreateLabelForm{ ID: 2, Title: "newnameforlabel", Color: "#abcdef", }) + UpdateLabel(ctx) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.Label{ ID: 2, diff --git a/routers/repo/issue_lock.go b/routers/web/repo/issue_lock.go similarity index 89% rename from routers/repo/issue_lock.go rename to routers/web/repo/issue_lock.go index fa8758831..36894b4be 100644 --- a/routers/repo/issue_lock.go +++ b/routers/web/repo/issue_lock.go @@ -8,14 +8,15 @@ import ( "net/http" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" ) // LockIssue locks an issue. This would limit commenting abilities to // users with write access to the repo. -func LockIssue(ctx *context.Context, form auth.IssueLockForm) { - +func LockIssue(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.IssueLockForm) issue := GetActionIssue(ctx) if ctx.Written() { return diff --git a/routers/web/repo/issue_stopwatch.go b/routers/web/repo/issue_stopwatch.go new file mode 100644 index 000000000..b8efb3b84 --- /dev/null +++ b/routers/web/repo/issue_stopwatch.go @@ -0,0 +1,108 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" +) + +// IssueStopwatch creates or stops a stopwatch for the given issue. +func IssueStopwatch(c *context.Context) { + issue := GetActionIssue(c) + if c.Written() { + return + } + + var showSuccessMessage bool + + if !models.StopwatchExists(c.User.ID, issue.ID) { + showSuccessMessage = true + } + + if !c.Repo.CanUseTimetracker(issue, c.User) { + c.NotFound("CanUseTimetracker", nil) + return + } + + if err := models.CreateOrStopIssueStopwatch(c.User, issue); err != nil { + c.ServerError("CreateOrStopIssueStopwatch", err) + return + } + + if showSuccessMessage { + c.Flash.Success(c.Tr("repo.issues.tracker_auto_close")) + } + + url := issue.HTMLURL() + c.Redirect(url, http.StatusSeeOther) +} + +// CancelStopwatch cancel the stopwatch +func CancelStopwatch(c *context.Context) { + issue := GetActionIssue(c) + if c.Written() { + return + } + if !c.Repo.CanUseTimetracker(issue, c.User) { + c.NotFound("CanUseTimetracker", nil) + return + } + + if err := models.CancelStopwatch(c.User, issue); err != nil { + c.ServerError("CancelStopwatch", err) + return + } + + url := issue.HTMLURL() + c.Redirect(url, http.StatusSeeOther) +} + +// GetActiveStopwatch is the middleware that sets .ActiveStopwatch on context +func GetActiveStopwatch(c *context.Context) { + if strings.HasPrefix(c.Req.URL.Path, "/api") { + return + } + + if !c.IsSigned { + return + } + + _, sw, err := models.HasUserStopwatch(c.User.ID) + if err != nil { + c.ServerError("HasUserStopwatch", err) + return + } + + if sw == nil || sw.ID == 0 { + return + } + + issue, err := models.GetIssueByID(sw.IssueID) + if err != nil || issue == nil { + c.ServerError("GetIssueByID", err) + return + } + if err = issue.LoadRepo(); err != nil { + c.ServerError("LoadRepo", err) + return + } + + c.Data["ActiveStopwatch"] = StopwatchTmplInfo{ + issue.Repo.FullName(), + issue.Index, + sw.Seconds() + 1, // ensure time is never zero in ui + } +} + +// StopwatchTmplInfo is a view on a stopwatch specifically for template rendering +type StopwatchTmplInfo struct { + RepoSlug string + IssueIndex int64 + Seconds int64 +} diff --git a/routers/repo/issue_test.go b/routers/web/repo/issue_test.go similarity index 75% rename from routers/repo/issue_test.go rename to routers/web/repo/issue_test.go index d6efef425..7fb837fa1 100644 --- a/routers/repo/issue_test.go +++ b/routers/web/repo/issue_test.go @@ -13,10 +13,12 @@ import ( func TestCombineLabelComments(t *testing.T) { var kases = []struct { + name string beforeCombined []*models.Comment afterCombined []*models.Comment }{ { + name: "kase 1", beforeCombined: []*models.Comment{ { Type: models.CommentTypeLabel, @@ -72,6 +74,7 @@ func TestCombineLabelComments(t *testing.T) { }, }, { + name: "kase 2", beforeCombined: []*models.Comment{ { Type: models.CommentTypeLabel, @@ -136,6 +139,7 @@ func TestCombineLabelComments(t *testing.T) { }, }, { + name: "kase 3", beforeCombined: []*models.Comment{ { Type: models.CommentTypeLabel, @@ -200,6 +204,7 @@ func TestCombineLabelComments(t *testing.T) { }, }, { + name: "kase 4", beforeCombined: []*models.Comment{ { Type: models.CommentTypeLabel, @@ -240,13 +245,80 @@ func TestCombineLabelComments(t *testing.T) { }, }, }, + { + name: "kase 5", + beforeCombined: []*models.Comment{ + { + Type: models.CommentTypeLabel, + PosterID: 1, + Content: "1", + Label: &models.Label{ + Name: "kind/bug", + }, + CreatedUnix: 0, + }, + { + Type: models.CommentTypeComment, + PosterID: 2, + Content: "testtest", + CreatedUnix: 0, + }, + { + Type: models.CommentTypeLabel, + PosterID: 1, + Content: "", + Label: &models.Label{ + Name: "kind/bug", + }, + CreatedUnix: 0, + }, + }, + afterCombined: []*models.Comment{ + { + Type: models.CommentTypeLabel, + PosterID: 1, + Content: "1", + Label: &models.Label{ + Name: "kind/bug", + }, + AddedLabels: []*models.Label{ + { + Name: "kind/bug", + }, + }, + CreatedUnix: 0, + }, + { + Type: models.CommentTypeComment, + PosterID: 2, + Content: "testtest", + CreatedUnix: 0, + }, + { + Type: models.CommentTypeLabel, + PosterID: 1, + Content: "", + RemovedLabels: []*models.Label{ + { + Name: "kind/bug", + }, + }, + Label: &models.Label{ + Name: "kind/bug", + }, + CreatedUnix: 0, + }, + }, + }, } for _, kase := range kases { - var issue = models.Issue{ - Comments: kase.beforeCombined, - } - combineLabelComments(&issue) - assert.EqualValues(t, kase.afterCombined, issue.Comments) + t.Run(kase.name, func(t *testing.T) { + var issue = models.Issue{ + Comments: kase.beforeCombined, + } + combineLabelComments(&issue) + assert.EqualValues(t, kase.afterCombined, issue.Comments) + }) } } diff --git a/routers/web/repo/issue_timetrack.go b/routers/web/repo/issue_timetrack.go new file mode 100644 index 000000000..3770cd7b4 --- /dev/null +++ b/routers/web/repo/issue_timetrack.go @@ -0,0 +1,86 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "net/http" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" +) + +// AddTimeManually tracks time manually +func AddTimeManually(c *context.Context) { + form := web.GetForm(c).(*forms.AddTimeManuallyForm) + issue := GetActionIssue(c) + if c.Written() { + return + } + if !c.Repo.CanUseTimetracker(issue, c.User) { + c.NotFound("CanUseTimetracker", nil) + return + } + url := issue.HTMLURL() + + if c.HasError() { + c.Flash.Error(c.GetErrMsg()) + c.Redirect(url) + return + } + + total := time.Duration(form.Hours)*time.Hour + time.Duration(form.Minutes)*time.Minute + + if total <= 0 { + c.Flash.Error(c.Tr("repo.issues.add_time_sum_to_small")) + c.Redirect(url, http.StatusSeeOther) + return + } + + if _, err := models.AddTime(c.User, issue, int64(total.Seconds()), time.Now()); err != nil { + c.ServerError("AddTime", err) + return + } + + c.Redirect(url, http.StatusSeeOther) +} + +// DeleteTime deletes tracked time +func DeleteTime(c *context.Context) { + issue := GetActionIssue(c) + if c.Written() { + return + } + if !c.Repo.CanUseTimetracker(issue, c.User) { + c.NotFound("CanUseTimetracker", nil) + return + } + + t, err := models.GetTrackedTimeByID(c.ParamsInt64(":timeid")) + if err != nil { + if models.IsErrNotExist(err) { + c.NotFound("time not found", err) + return + } + c.Error(http.StatusInternalServerError, "GetTrackedTimeByID", err.Error()) + return + } + + // only OP or admin may delete + if !c.IsSigned || (!c.IsUserSiteAdmin() && c.User.ID != t.UserID) { + c.Error(http.StatusForbidden, "not allowed") + return + } + + if err = models.DeleteTime(t); err != nil { + c.ServerError("DeleteTime", err) + return + } + + c.Flash.Success(c.Tr("repo.issues.del_time_history", models.SecToTime(t.Time))) + c.Redirect(issue.HTMLURL()) +} diff --git a/routers/repo/issue_watch.go b/routers/web/repo/issue_watch.go similarity index 97% rename from routers/repo/issue_watch.go rename to routers/web/repo/issue_watch.go index 07671af13..dabbff842 100644 --- a/routers/repo/issue_watch.go +++ b/routers/web/repo/issue_watch.go @@ -38,7 +38,7 @@ func IssueWatch(ctx *context.Context) { log.Trace("Permission Denied: Not logged in") } } - ctx.Error(403) + ctx.Error(http.StatusForbidden) return } diff --git a/routers/web/repo/lfs.go b/routers/web/repo/lfs.go new file mode 100644 index 000000000..e524a9209 --- /dev/null +++ b/routers/web/repo/lfs.go @@ -0,0 +1,537 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "bytes" + "fmt" + gotemplate "html/template" + "io" + "io/ioutil" + "net/http" + "path" + "strconv" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/charset" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/git/pipeline" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/modules/typesniffer" +) + +const ( + tplSettingsLFS base.TplName = "repo/settings/lfs" + tplSettingsLFSLocks base.TplName = "repo/settings/lfs_locks" + tplSettingsLFSFile base.TplName = "repo/settings/lfs_file" + tplSettingsLFSFileFind base.TplName = "repo/settings/lfs_file_find" + tplSettingsLFSPointers base.TplName = "repo/settings/lfs_pointers" +) + +// LFSFiles shows a repository's LFS files +func LFSFiles(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSFiles", nil) + return + } + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + total, err := ctx.Repo.Repository.CountLFSMetaObjects() + if err != nil { + ctx.ServerError("LFSFiles", err) + return + } + ctx.Data["Total"] = total + + pager := context.NewPagination(int(total), setting.UI.ExplorePagingNum, page, 5) + ctx.Data["Title"] = ctx.Tr("repo.settings.lfs") + ctx.Data["PageIsSettingsLFS"] = true + lfsMetaObjects, err := ctx.Repo.Repository.GetLFSMetaObjects(pager.Paginater.Current(), setting.UI.ExplorePagingNum) + if err != nil { + ctx.ServerError("LFSFiles", err) + return + } + ctx.Data["LFSFiles"] = lfsMetaObjects + ctx.Data["Page"] = pager + ctx.HTML(http.StatusOK, tplSettingsLFS) +} + +// LFSLocks shows a repository's LFS locks +func LFSLocks(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSLocks", nil) + return + } + ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" + + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + total, err := models.CountLFSLockByRepoID(ctx.Repo.Repository.ID) + if err != nil { + ctx.ServerError("LFSLocks", err) + return + } + ctx.Data["Total"] = total + + pager := context.NewPagination(int(total), setting.UI.ExplorePagingNum, page, 5) + ctx.Data["Title"] = ctx.Tr("repo.settings.lfs_locks") + ctx.Data["PageIsSettingsLFS"] = true + lfsLocks, err := models.GetLFSLockByRepoID(ctx.Repo.Repository.ID, pager.Paginater.Current(), setting.UI.ExplorePagingNum) + if err != nil { + ctx.ServerError("LFSLocks", err) + return + } + ctx.Data["LFSLocks"] = lfsLocks + + if len(lfsLocks) == 0 { + ctx.Data["Page"] = pager + ctx.HTML(http.StatusOK, tplSettingsLFSLocks) + return + } + + // Clone base repo. + tmpBasePath, err := models.CreateTemporaryPath("locks") + if err != nil { + log.Error("Failed to create temporary path: %v", err) + ctx.ServerError("LFSLocks", err) + return + } + defer func() { + if err := models.RemoveTemporaryPath(tmpBasePath); err != nil { + log.Error("LFSLocks: RemoveTemporaryPath: %v", err) + } + }() + + if err := git.Clone(ctx.Repo.Repository.RepoPath(), tmpBasePath, git.CloneRepoOptions{ + Bare: true, + Shared: true, + }); err != nil { + log.Error("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err) + ctx.ServerError("LFSLocks", fmt.Errorf("Failed to clone repository: %s (%v)", ctx.Repo.Repository.FullName(), err)) + return + } + + gitRepo, err := git.OpenRepository(tmpBasePath) + if err != nil { + log.Error("Unable to open temporary repository: %s (%v)", tmpBasePath, err) + ctx.ServerError("LFSLocks", fmt.Errorf("Failed to open new temporary repository in: %s %v", tmpBasePath, err)) + return + } + defer gitRepo.Close() + + filenames := make([]string, len(lfsLocks)) + + for i, lock := range lfsLocks { + filenames[i] = lock.Path + } + + if err := gitRepo.ReadTreeToIndex(ctx.Repo.Repository.DefaultBranch); err != nil { + log.Error("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err) + ctx.ServerError("LFSLocks", fmt.Errorf("Unable to read the default branch to the index: %s (%v)", ctx.Repo.Repository.DefaultBranch, err)) + return + } + + name2attribute2info, err := gitRepo.CheckAttribute(git.CheckAttributeOpts{ + Attributes: []string{"lockable"}, + Filenames: filenames, + CachedOnly: true, + }) + if err != nil { + log.Error("Unable to check attributes in %s (%v)", tmpBasePath, err) + ctx.ServerError("LFSLocks", err) + return + } + + lockables := make([]bool, len(lfsLocks)) + for i, lock := range lfsLocks { + attribute2info, has := name2attribute2info[lock.Path] + if !has { + continue + } + if attribute2info["lockable"] != "set" { + continue + } + lockables[i] = true + } + ctx.Data["Lockables"] = lockables + + filelist, err := gitRepo.LsFiles(filenames...) + if err != nil { + log.Error("Unable to lsfiles in %s (%v)", tmpBasePath, err) + ctx.ServerError("LFSLocks", err) + return + } + + filemap := make(map[string]bool, len(filelist)) + for _, name := range filelist { + filemap[name] = true + } + + linkable := make([]bool, len(lfsLocks)) + for i, lock := range lfsLocks { + linkable[i] = filemap[lock.Path] + } + ctx.Data["Linkable"] = linkable + + ctx.Data["Page"] = pager + ctx.HTML(http.StatusOK, tplSettingsLFSLocks) +} + +// LFSLockFile locks a file +func LFSLockFile(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSLocks", nil) + return + } + originalPath := ctx.FormString("path") + lockPath := originalPath + if len(lockPath) == 0 { + ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_locking_path", originalPath)) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") + return + } + if lockPath[len(lockPath)-1] == '/' { + ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_lock_directory", originalPath)) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") + return + } + lockPath = path.Clean("/" + lockPath)[1:] + if len(lockPath) == 0 { + ctx.Flash.Error(ctx.Tr("repo.settings.lfs_invalid_locking_path", originalPath)) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") + return + } + + _, err := models.CreateLFSLock(&models.LFSLock{ + Repo: ctx.Repo.Repository, + Path: lockPath, + Owner: ctx.User, + }) + if err != nil { + if models.IsErrLFSLockAlreadyExist(err) { + ctx.Flash.Error(ctx.Tr("repo.settings.lfs_lock_already_exists", originalPath)) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") + return + } + ctx.ServerError("LFSLockFile", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") +} + +// LFSUnlock forcibly unlocks an LFS lock +func LFSUnlock(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSUnlock", nil) + return + } + _, err := models.DeleteLFSLockByID(ctx.ParamsInt64("lid"), ctx.User, true) + if err != nil { + ctx.ServerError("LFSUnlock", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs/locks") +} + +// LFSFileGet serves a single LFS file +func LFSFileGet(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSFileGet", nil) + return + } + ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" + oid := ctx.Params("oid") + ctx.Data["Title"] = oid + ctx.Data["PageIsSettingsLFS"] = true + meta, err := ctx.Repo.Repository.GetLFSMetaObjectByOid(oid) + if err != nil { + if err == models.ErrLFSObjectNotExist { + ctx.NotFound("LFSFileGet", nil) + return + } + ctx.ServerError("LFSFileGet", err) + return + } + ctx.Data["LFSFile"] = meta + dataRc, err := lfs.ReadMetaObject(meta.Pointer) + if err != nil { + ctx.ServerError("LFSFileGet", err) + return + } + defer dataRc.Close() + buf := make([]byte, 1024) + n, err := dataRc.Read(buf) + if err != nil { + ctx.ServerError("Data", err) + return + } + buf = buf[:n] + + st := typesniffer.DetectContentType(buf) + ctx.Data["IsTextFile"] = st.IsText() + isRepresentableAsText := st.IsRepresentableAsText() + + fileSize := meta.Size + ctx.Data["FileSize"] = meta.Size + ctx.Data["RawFileLink"] = fmt.Sprintf("%s%s.git/info/lfs/objects/%s/%s", setting.AppURL, ctx.Repo.Repository.FullName(), meta.Oid, "direct") + switch { + case isRepresentableAsText: + if st.IsSvgImage() { + ctx.Data["IsImageFile"] = true + } + + if fileSize >= setting.UI.MaxDisplayFileSize { + ctx.Data["IsFileTooLarge"] = true + break + } + + buf := charset.ToUTF8WithFallbackReader(io.MultiReader(bytes.NewReader(buf), dataRc)) + + // Building code view blocks with line number on server side. + fileContent, _ := ioutil.ReadAll(buf) + + var output bytes.Buffer + lines := strings.Split(string(fileContent), "\n") + //Remove blank line at the end of file + if len(lines) > 0 && lines[len(lines)-1] == "" { + lines = lines[:len(lines)-1] + } + for index, line := range lines { + line = gotemplate.HTMLEscapeString(line) + if index != len(lines)-1 { + line += "\n" + } + output.WriteString(fmt.Sprintf(`
  • %s
  • `, index+1, index+1, line)) + } + ctx.Data["FileContent"] = gotemplate.HTML(output.String()) + + output.Reset() + for i := 0; i < len(lines); i++ { + output.WriteString(fmt.Sprintf(`%d`, i+1, i+1)) + } + ctx.Data["LineNums"] = gotemplate.HTML(output.String()) + + case st.IsPDF(): + ctx.Data["IsPDFFile"] = true + case st.IsVideo(): + ctx.Data["IsVideoFile"] = true + case st.IsAudio(): + ctx.Data["IsAudioFile"] = true + case st.IsImage() && (setting.UI.SVG.Enabled || !st.IsSvgImage()): + ctx.Data["IsImageFile"] = true + } + ctx.HTML(http.StatusOK, tplSettingsLFSFile) +} + +// LFSDelete disassociates the provided oid from the repository and if the lfs file is no longer associated with any repositories - deletes it +func LFSDelete(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSDelete", nil) + return + } + oid := ctx.Params("oid") + count, err := ctx.Repo.Repository.RemoveLFSMetaObjectByOid(oid) + if err != nil { + ctx.ServerError("LFSDelete", err) + return + } + // FIXME: Warning: the LFS store is not locked - and can't be locked - there could be a race condition here + // Please note a similar condition happens in models/repo.go DeleteRepository + if count == 0 { + oidPath := path.Join(oid[0:2], oid[2:4], oid[4:]) + err = storage.LFS.Delete(oidPath) + if err != nil { + ctx.ServerError("LFSDelete", err) + return + } + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs") +} + +// LFSFileFind guesses a sha for the provided oid (or uses the provided sha) and then finds the commits that contain this sha +func LFSFileFind(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSFind", nil) + return + } + oid := ctx.FormString("oid") + size := ctx.FormInt64("size") + if len(oid) == 0 || size == 0 { + ctx.NotFound("LFSFind", nil) + return + } + sha := ctx.FormString("sha") + ctx.Data["Title"] = oid + ctx.Data["PageIsSettingsLFS"] = true + var hash git.SHA1 + if len(sha) == 0 { + pointer := lfs.Pointer{Oid: oid, Size: size} + hash = git.ComputeBlobHash([]byte(pointer.StringContent())) + sha = hash.String() + } else { + hash = git.MustIDFromString(sha) + } + ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" + ctx.Data["Oid"] = oid + ctx.Data["Size"] = size + ctx.Data["SHA"] = sha + + results, err := pipeline.FindLFSFile(ctx.Repo.GitRepo, hash) + if err != nil && err != io.EOF { + log.Error("Failure in FindLFSFile: %v", err) + ctx.ServerError("LFSFind: FindLFSFile.", err) + return + } + + ctx.Data["Results"] = results + ctx.HTML(http.StatusOK, tplSettingsLFSFileFind) +} + +// LFSPointerFiles will search the repository for pointer files and report which are missing LFS files in the content store +func LFSPointerFiles(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSFileGet", nil) + return + } + ctx.Data["PageIsSettingsLFS"] = true + err := git.LoadGitVersion() + if err != nil { + log.Fatal("Error retrieving git version: %v", err) + } + ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" + + err = func() error { + pointerChan := make(chan lfs.PointerBlob) + errChan := make(chan error, 1) + go lfs.SearchPointerBlobs(ctx, ctx.Repo.GitRepo, pointerChan, errChan) + + numPointers := 0 + var numAssociated, numNoExist, numAssociatable int + + type pointerResult struct { + SHA string + Oid string + Size int64 + InRepo bool + Exists bool + Accessible bool + } + + results := []pointerResult{} + + contentStore := lfs.NewContentStore() + repo := ctx.Repo.Repository + + for pointerBlob := range pointerChan { + numPointers++ + + result := pointerResult{ + SHA: pointerBlob.Hash, + Oid: pointerBlob.Oid, + Size: pointerBlob.Size, + } + + if _, err := repo.GetLFSMetaObjectByOid(pointerBlob.Oid); err != nil { + if err != models.ErrLFSObjectNotExist { + return err + } + } else { + result.InRepo = true + } + + result.Exists, err = contentStore.Exists(pointerBlob.Pointer) + if err != nil { + return err + } + + if result.Exists { + if !result.InRepo { + // Can we fix? + // OK well that's "simple" + // - we need to check whether current user has access to a repo that has access to the file + result.Accessible, err = models.LFSObjectAccessible(ctx.User, pointerBlob.Oid) + if err != nil { + return err + } + } else { + result.Accessible = true + } + } + + if result.InRepo { + numAssociated++ + } + if !result.Exists { + numNoExist++ + } + if !result.InRepo && result.Accessible { + numAssociatable++ + } + + results = append(results, result) + } + + err, has := <-errChan + if has { + return err + } + + ctx.Data["Pointers"] = results + ctx.Data["NumPointers"] = numPointers + ctx.Data["NumAssociated"] = numAssociated + ctx.Data["NumAssociatable"] = numAssociatable + ctx.Data["NumNoExist"] = numNoExist + ctx.Data["NumNotAssociated"] = numPointers - numAssociated + + return nil + }() + if err != nil { + ctx.ServerError("LFSPointerFiles", err) + return + } + + ctx.HTML(http.StatusOK, tplSettingsLFSPointers) +} + +// LFSAutoAssociate auto associates accessible lfs files +func LFSAutoAssociate(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.NotFound("LFSAutoAssociate", nil) + return + } + oids := ctx.FormStrings("oid") + metas := make([]*models.LFSMetaObject, len(oids)) + for i, oid := range oids { + idx := strings.IndexRune(oid, ' ') + if idx < 0 || idx+1 > len(oid) { + ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s", oid)) + return + } + var err error + metas[i] = &models.LFSMetaObject{} + metas[i].Size, err = strconv.ParseInt(oid[idx+1:], 10, 64) + if err != nil { + ctx.ServerError("LFSAutoAssociate", fmt.Errorf("Illegal oid input: %s %v", oid, err)) + return + } + metas[i].Oid = oid[:idx] + //metas[i].RepositoryID = ctx.Repo.Repository.ID + } + if err := models.LFSAutoAssociate(metas, ctx.User, ctx.Repo.Repository.ID); err != nil { + ctx.ServerError("LFSAutoAssociate", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings/lfs") +} diff --git a/routers/web/repo/main_test.go b/routers/web/repo/main_test.go new file mode 100644 index 000000000..47f266365 --- /dev/null +++ b/routers/web/repo/main_test.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "path/filepath" + "testing" + + "code.gitea.io/gitea/models" +) + +func TestMain(m *testing.M) { + models.MainTest(m, filepath.Join("..", "..", "..")) +} diff --git a/routers/repo/middlewares.go b/routers/web/repo/middlewares.go similarity index 95% rename from routers/repo/middlewares.go rename to routers/web/repo/middlewares.go index 1b95a13ba..250544350 100644 --- a/routers/repo/middlewares.go +++ b/routers/web/repo/middlewares.go @@ -34,7 +34,7 @@ func SetEditorconfigIfExists(ctx *context.Context) { // SetDiffViewStyle set diff style as render variable func SetDiffViewStyle(ctx *context.Context) { - queryStyle := ctx.Query("style") + queryStyle := ctx.FormString("style") if !ctx.IsSigned { ctx.Data["IsSplitStyle"] = queryStyle == "split" @@ -62,7 +62,7 @@ func SetDiffViewStyle(ctx *context.Context) { // SetWhitespaceBehavior set whitespace behavior as render variable func SetWhitespaceBehavior(ctx *context.Context) { - whitespaceBehavior := ctx.Query("whitespace") + whitespaceBehavior := ctx.FormString("whitespace") switch whitespaceBehavior { case "ignore-all", "ignore-eol", "ignore-change": ctx.Data["WhitespaceBehavior"] = whitespaceBehavior diff --git a/routers/web/repo/migrate.go b/routers/web/repo/migrate.go new file mode 100644 index 000000000..3d710d044 --- /dev/null +++ b/routers/web/repo/migrate.go @@ -0,0 +1,254 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/migrations" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/task" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" +) + +const ( + tplMigrate base.TplName = "repo/migrate/migrate" +) + +// Migrate render migration of repository page +func Migrate(ctx *context.Context) { + if setting.Repository.DisableMigrations { + ctx.Error(http.StatusForbidden, "Migrate: the site administrator has disabled migrations") + return + } + + serviceType := structs.GitServiceType(ctx.FormInt("service_type")) + + setMigrationContextData(ctx, serviceType) + + if serviceType == 0 { + ctx.Data["Org"] = ctx.FormString("org") + ctx.Data["Mirror"] = ctx.FormString("mirror") + + ctx.HTML(http.StatusOK, tplMigrate) + return + } + + ctx.Data["private"] = getRepoPrivate(ctx) + ctx.Data["mirror"] = ctx.FormString("mirror") == "1" + ctx.Data["lfs"] = ctx.FormString("lfs") == "1" + ctx.Data["wiki"] = ctx.FormString("wiki") == "1" + ctx.Data["milestones"] = ctx.FormString("milestones") == "1" + ctx.Data["labels"] = ctx.FormString("labels") == "1" + ctx.Data["issues"] = ctx.FormString("issues") == "1" + ctx.Data["pull_requests"] = ctx.FormString("pull_requests") == "1" + ctx.Data["releases"] = ctx.FormString("releases") == "1" + + ctxUser := checkContextUser(ctx, ctx.FormInt64("org")) + if ctx.Written() { + return + } + ctx.Data["ContextUser"] = ctxUser + + ctx.HTML(http.StatusOK, base.TplName("repo/migrate/"+serviceType.Name())) +} + +func handleMigrateError(ctx *context.Context, owner *models.User, err error, name string, tpl base.TplName, form *forms.MigrateRepoForm) { + if setting.Repository.DisableMigrations { + ctx.Error(http.StatusForbidden, "MigrateError: the site administrator has disabled migrations") + return + } + + switch { + case migrations.IsRateLimitError(err): + ctx.RenderWithErr(ctx.Tr("form.visit_rate_limit"), tpl, form) + case migrations.IsTwoFactorAuthError(err): + ctx.RenderWithErr(ctx.Tr("form.2fa_auth_required"), tpl, form) + case models.IsErrReachLimitOfRepo(err): + ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form) + case models.IsErrRepoAlreadyExist(err): + ctx.Data["Err_RepoName"] = true + ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form) + case models.IsErrRepoFilesAlreadyExist(err): + ctx.Data["Err_RepoName"] = true + switch { + case ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories): + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt_or_delete"), tpl, form) + case setting.Repository.AllowAdoptionOfUnadoptedRepositories: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt"), tpl, form) + case setting.Repository.AllowDeleteOfUnadoptedRepositories: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.delete"), tpl, form) + default: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist"), tpl, form) + } + case models.IsErrNameReserved(err): + ctx.Data["Err_RepoName"] = true + ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tpl, form) + case models.IsErrNamePatternNotAllowed(err): + ctx.Data["Err_RepoName"] = true + ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tpl, form) + default: + remoteAddr, _ := forms.ParseRemoteAddr(form.CloneAddr, form.AuthUsername, form.AuthPassword) + err = util.NewStringURLSanitizedError(err, remoteAddr, true) + if strings.Contains(err.Error(), "Authentication failed") || + strings.Contains(err.Error(), "Bad credentials") || + strings.Contains(err.Error(), "could not read Username") { + ctx.Data["Err_Auth"] = true + ctx.RenderWithErr(ctx.Tr("form.auth_failed", err.Error()), tpl, form) + } else if strings.Contains(err.Error(), "fatal:") { + ctx.Data["Err_CloneAddr"] = true + ctx.RenderWithErr(ctx.Tr("repo.migrate.failed", err.Error()), tpl, form) + } else { + ctx.ServerError(name, err) + } + } +} + +func handleMigrateRemoteAddrError(ctx *context.Context, err error, tpl base.TplName, form *forms.MigrateRepoForm) { + if models.IsErrInvalidCloneAddr(err) { + addrErr := err.(*models.ErrInvalidCloneAddr) + switch { + case addrErr.IsProtocolInvalid: + ctx.RenderWithErr(ctx.Tr("repo.mirror_address_protocol_invalid"), tpl, form) + case addrErr.IsURLError: + ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, form) + case addrErr.IsPermissionDenied: + if addrErr.LocalPath { + ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tpl, form) + } else if len(addrErr.PrivateNet) == 0 { + ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_blocked"), tpl, form) + } else { + ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_private_ip"), tpl, form) + } + case addrErr.IsInvalidPath: + ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_local_path"), tpl, form) + default: + log.Error("Error whilst updating url: %v", err) + ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, form) + } + } else { + log.Error("Error whilst updating url: %v", err) + ctx.RenderWithErr(ctx.Tr("form.url_error"), tpl, form) + } +} + +// MigratePost response for migrating from external git repository +func MigratePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.MigrateRepoForm) + if setting.Repository.DisableMigrations { + ctx.Error(http.StatusForbidden, "MigratePost: the site administrator has disabled migrations") + return + } + + serviceType := structs.GitServiceType(form.Service) + + setMigrationContextData(ctx, serviceType) + + ctxUser := checkContextUser(ctx, form.UID) + if ctx.Written() { + return + } + ctx.Data["ContextUser"] = ctxUser + + tpl := base.TplName("repo/migrate/" + serviceType.Name()) + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tpl) + return + } + + remoteAddr, err := forms.ParseRemoteAddr(form.CloneAddr, form.AuthUsername, form.AuthPassword) + if err == nil { + err = migrations.IsMigrateURLAllowed(remoteAddr, ctx.User) + } + if err != nil { + ctx.Data["Err_CloneAddr"] = true + handleMigrateRemoteAddrError(ctx, err, tpl, form) + return + } + + form.LFS = form.LFS && setting.LFS.StartServer + + if form.LFS && len(form.LFSEndpoint) > 0 { + ep := lfs.DetermineEndpoint("", form.LFSEndpoint) + if ep == nil { + ctx.Data["Err_LFSEndpoint"] = true + ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_lfs_endpoint"), tpl, &form) + return + } + err = migrations.IsMigrateURLAllowed(ep.String(), ctx.User) + if err != nil { + ctx.Data["Err_LFSEndpoint"] = true + handleMigrateRemoteAddrError(ctx, err, tpl, form) + return + } + } + + var opts = migrations.MigrateOptions{ + OriginalURL: form.CloneAddr, + GitServiceType: serviceType, + CloneAddr: remoteAddr, + RepoName: form.RepoName, + Description: form.Description, + Private: form.Private || setting.Repository.ForcePrivate, + Mirror: form.Mirror && !setting.Repository.DisableMirrors, + LFS: form.LFS, + LFSEndpoint: form.LFSEndpoint, + AuthUsername: form.AuthUsername, + AuthPassword: form.AuthPassword, + AuthToken: form.AuthToken, + Wiki: form.Wiki, + Issues: form.Issues, + Milestones: form.Milestones, + Labels: form.Labels, + Comments: form.Issues || form.PullRequests, + PullRequests: form.PullRequests, + Releases: form.Releases, + } + if opts.Mirror { + opts.Issues = false + opts.Milestones = false + opts.Labels = false + opts.Comments = false + opts.PullRequests = false + opts.Releases = false + } + + err = models.CheckCreateRepository(ctx.User, ctxUser, opts.RepoName, false) + if err != nil { + handleMigrateError(ctx, ctxUser, err, "MigratePost", tpl, form) + return + } + + err = task.MigrateRepository(ctx.User, ctxUser, opts) + if err == nil { + ctx.Redirect(ctxUser.HomeLink() + "/" + opts.RepoName) + return + } + + handleMigrateError(ctx, ctxUser, err, "MigratePost", tpl, form) +} + +func setMigrationContextData(ctx *context.Context, serviceType structs.GitServiceType) { + ctx.Data["Title"] = ctx.Tr("new_migrate") + + ctx.Data["LFSActive"] = setting.LFS.StartServer + ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate + ctx.Data["DisableMirrors"] = setting.Repository.DisableMirrors + + // Plain git should be first + ctx.Data["Services"] = append([]structs.GitServiceType{structs.PlainGitService}, structs.SupportedFullGitService...) + ctx.Data["service"] = serviceType +} diff --git a/routers/repo/milestone.go b/routers/web/repo/milestone.go similarity index 79% rename from routers/repo/milestone.go rename to routers/web/repo/milestone.go index 96f5b4e5f..80f1eb523 100644 --- a/routers/repo/milestone.go +++ b/routers/web/repo/milestone.go @@ -5,17 +5,20 @@ package repo import ( + "net/http" "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" "xorm.io/builder" ) @@ -32,7 +35,7 @@ func Milestones(ctx *context.Context) { ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true - isShowClosed := ctx.Query("state") == "closed" + isShowClosed := ctx.FormString("state") == "closed" stats, err := models.GetMilestonesStatsByRepoCond(builder.And(builder.Eq{"id": ctx.Repo.Repository.ID})) if err != nil { ctx.ServerError("MilestoneStats", err) @@ -41,23 +44,21 @@ func Milestones(ctx *context.Context) { ctx.Data["OpenCount"] = stats.OpenCount ctx.Data["ClosedCount"] = stats.ClosedCount - sortType := ctx.Query("sort") - page := ctx.QueryInt("page") + sortType := ctx.FormString("sort") + + keyword := ctx.FormTrim("q") + + page := ctx.FormInt("page") if page <= 1 { page = 1 } - var total int - var state structs.StateType - if !isShowClosed { - total = int(stats.OpenCount) - state = structs.StateOpen - } else { - total = int(stats.ClosedCount) + state := structs.StateOpen + if isShowClosed { state = structs.StateClosed } - miles, err := models.GetMilestones(models.GetMilestonesOption{ + miles, total, err := models.GetMilestones(models.GetMilestonesOption{ ListOptions: models.ListOptions{ Page: page, PageSize: setting.UI.IssuePagingNum, @@ -65,6 +66,7 @@ func Milestones(ctx *context.Context) { RepoID: ctx.Repo.Repository.ID, State: state, SortType: sortType, + Name: keyword, }) if err != nil { ctx.ServerError("GetMilestones", err) @@ -77,7 +79,16 @@ func Milestones(ctx *context.Context) { } } for _, m := range miles { - m.RenderedContent = string(markdown.Render([]byte(m.Content), ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())) + m.RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, m.Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } } ctx.Data["Milestones"] = miles @@ -88,13 +99,15 @@ func Milestones(ctx *context.Context) { } ctx.Data["SortType"] = sortType + ctx.Data["Keyword"] = keyword ctx.Data["IsShowClosed"] = isShowClosed - pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, 5) + pager := context.NewPagination(int(total), setting.UI.IssuePagingNum, page, 5) pager.AddParam(ctx, "state", "State") + pager.AddParam(ctx, "q", "Keyword") ctx.Data["Page"] = pager - ctx.HTML(200, tplMilestone) + ctx.HTML(http.StatusOK, tplMilestone) } // NewMilestone render creating milestone page @@ -102,17 +115,18 @@ func NewMilestone(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.milestones.new") ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true - ctx.HTML(200, tplMilestoneNew) + ctx.HTML(http.StatusOK, tplMilestoneNew) } // NewMilestonePost response for creating milestone -func NewMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm) { +func NewMilestonePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateMilestoneForm) ctx.Data["Title"] = ctx.Tr("repo.milestones.new") ctx.Data["PageIsIssueList"] = true ctx.Data["PageIsMilestones"] = true if ctx.HasError() { - ctx.HTML(200, tplMilestoneNew) + ctx.HTML(http.StatusOK, tplMilestoneNew) return } @@ -161,17 +175,18 @@ func EditMilestone(ctx *context.Context) { if len(m.DeadlineString) > 0 { ctx.Data["deadline"] = m.DeadlineString } - ctx.HTML(200, tplMilestoneNew) + ctx.HTML(http.StatusOK, tplMilestoneNew) } // EditMilestonePost response for edting milestone -func EditMilestonePost(ctx *context.Context, form auth.CreateMilestoneForm) { +func EditMilestonePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateMilestoneForm) ctx.Data["Title"] = ctx.Tr("repo.milestones.edit") ctx.Data["PageIsMilestones"] = true ctx.Data["PageIsEditMilestone"] = true if ctx.HasError() { - ctx.HTML(200, tplMilestoneNew) + ctx.HTML(http.StatusOK, tplMilestoneNew) return } @@ -233,13 +248,13 @@ func ChangeMilestoneStatus(ctx *context.Context) { // DeleteMilestone delete a milestone func DeleteMilestone(ctx *context.Context) { - if err := models.DeleteMilestoneByRepoID(ctx.Repo.Repository.ID, ctx.QueryInt64("id")); err != nil { + if err := models.DeleteMilestoneByRepoID(ctx.Repo.Repository.ID, ctx.FormInt64("id")); err != nil { ctx.Flash.Error("DeleteMilestoneByRepoID: " + err.Error()) } else { ctx.Flash.Success(ctx.Tr("repo.milestones.deletion_success")) } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": ctx.Repo.RepoLink + "/milestones", }) } @@ -258,7 +273,16 @@ func MilestoneIssuesAndPulls(ctx *context.Context) { return } - milestone.RenderedContent = string(markdown.Render([]byte(milestone.Content), ctx.Repo.RepoLink, ctx.Repo.Repository.ComposeMetas())) + milestone.RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, milestone.Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } ctx.Data["Title"] = milestone.Name ctx.Data["Milestone"] = milestone @@ -269,5 +293,5 @@ func MilestoneIssuesAndPulls(ctx *context.Context) { ctx.Data["CanWriteIssues"] = ctx.Repo.CanWriteIssuesOrPulls(false) ctx.Data["CanWritePulls"] = ctx.Repo.CanWriteIssuesOrPulls(true) - ctx.HTML(200, tplMilestoneIssues) + ctx.HTML(http.StatusOK, tplMilestoneIssues) } diff --git a/routers/web/repo/projects.go b/routers/web/repo/projects.go new file mode 100644 index 000000000..556656e5b --- /dev/null +++ b/routers/web/repo/projects.go @@ -0,0 +1,669 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "fmt" + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" +) + +const ( + tplProjects base.TplName = "repo/projects/list" + tplProjectsNew base.TplName = "repo/projects/new" + tplProjectsView base.TplName = "repo/projects/view" + tplGenericProjectsNew base.TplName = "user/project" +) + +// MustEnableProjects check if projects are enabled in settings +func MustEnableProjects(ctx *context.Context) { + if models.UnitTypeProjects.UnitGlobalDisabled() { + ctx.NotFound("EnableKanbanBoard", nil) + return + } + + if ctx.Repo.Repository != nil { + if !ctx.Repo.CanRead(models.UnitTypeProjects) { + ctx.NotFound("MustEnableProjects", nil) + return + } + } +} + +// Projects renders the home page of projects +func Projects(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.project_board") + + sortType := ctx.FormTrim("sort") + + isShowClosed := strings.ToLower(ctx.FormTrim("state")) == "closed" + repo := ctx.Repo.Repository + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + + ctx.Data["OpenCount"] = repo.NumOpenProjects + ctx.Data["ClosedCount"] = repo.NumClosedProjects + + var total int + if !isShowClosed { + total = repo.NumOpenProjects + } else { + total = repo.NumClosedProjects + } + + projects, count, err := models.GetProjects(models.ProjectSearchOptions{ + RepoID: repo.ID, + Page: page, + IsClosed: util.OptionalBoolOf(isShowClosed), + SortType: sortType, + Type: models.ProjectTypeRepository, + }) + if err != nil { + ctx.ServerError("GetProjects", err) + return + } + + for i := range projects { + projects[i].RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, projects[i].Description) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + } + + ctx.Data["Projects"] = projects + + if isShowClosed { + ctx.Data["State"] = "closed" + } else { + ctx.Data["State"] = "open" + } + + numPages := 0 + if count > 0 { + numPages = int((int(count) - 1) / setting.UI.IssuePagingNum) + } + + pager := context.NewPagination(total, setting.UI.IssuePagingNum, page, numPages) + pager.AddParam(ctx, "state", "State") + ctx.Data["Page"] = pager + + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + ctx.Data["IsShowClosed"] = isShowClosed + ctx.Data["IsProjectsPage"] = true + ctx.Data["SortType"] = sortType + + ctx.HTML(http.StatusOK, tplProjects) +} + +// NewProject render creating a project page +func NewProject(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.projects.new") + ctx.Data["ProjectTypes"] = models.GetProjectsConfig() + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + ctx.HTML(http.StatusOK, tplProjectsNew) +} + +// NewProjectPost creates a new project +func NewProjectPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateProjectForm) + ctx.Data["Title"] = ctx.Tr("repo.projects.new") + + if ctx.HasError() { + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + ctx.Data["ProjectTypes"] = models.GetProjectsConfig() + ctx.HTML(http.StatusOK, tplProjectsNew) + return + } + + if err := models.NewProject(&models.Project{ + RepoID: ctx.Repo.Repository.ID, + Title: form.Title, + Description: form.Content, + CreatorID: ctx.User.ID, + BoardType: form.BoardType, + Type: models.ProjectTypeRepository, + }); err != nil { + ctx.ServerError("NewProject", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.projects.create_success", form.Title)) + ctx.Redirect(ctx.Repo.RepoLink + "/projects") +} + +// ChangeProjectStatus updates the status of a project between "open" and "close" +func ChangeProjectStatus(ctx *context.Context) { + toClose := false + switch ctx.Params(":action") { + case "open": + toClose = false + case "close": + toClose = true + default: + ctx.Redirect(ctx.Repo.RepoLink + "/projects") + } + id := ctx.ParamsInt64(":id") + + if err := models.ChangeProjectStatusByRepoIDAndID(ctx.Repo.Repository.ID, id, toClose); err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", err) + } else { + ctx.ServerError("ChangeProjectStatusByIDAndRepoID", err) + } + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/projects?state=" + ctx.Params(":action")) +} + +// DeleteProject delete a project +func DeleteProject(ctx *context.Context) { + p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return + } + if p.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("", nil) + return + } + + if err := models.DeleteProjectByID(p.ID); err != nil { + ctx.Flash.Error("DeleteProjectByID: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("repo.projects.deletion_success")) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/projects", + }) +} + +// EditProject allows a project to be edited +func EditProject(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.projects.edit") + ctx.Data["PageIsProjects"] = true + ctx.Data["PageIsEditProjects"] = true + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + + p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return + } + if p.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("", nil) + return + } + + ctx.Data["title"] = p.Title + ctx.Data["content"] = p.Description + + ctx.HTML(http.StatusOK, tplProjectsNew) +} + +// EditProjectPost response for editing a project +func EditProjectPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateProjectForm) + ctx.Data["Title"] = ctx.Tr("repo.projects.edit") + ctx.Data["PageIsProjects"] = true + ctx.Data["PageIsEditProjects"] = true + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplProjectsNew) + return + } + + p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return + } + if p.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("", nil) + return + } + + p.Title = form.Title + p.Description = form.Content + if err = models.UpdateProject(p); err != nil { + ctx.ServerError("UpdateProjects", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.projects.edit_success", p.Title)) + ctx.Redirect(ctx.Repo.RepoLink + "/projects") +} + +// ViewProject renders the project board for a project +func ViewProject(ctx *context.Context) { + + project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return + } + if project.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("", nil) + return + } + + boards, err := models.GetProjectBoards(project.ID) + if err != nil { + ctx.ServerError("GetProjectBoards", err) + return + } + + if boards[0].ID == 0 { + boards[0].Title = ctx.Tr("repo.projects.type.uncategorized") + } + + issueList, err := boards.LoadIssues() + if err != nil { + ctx.ServerError("LoadIssuesOfBoards", err) + return + } + ctx.Data["Issues"] = issueList + + linkedPrsMap := make(map[int64][]*models.Issue) + for _, issue := range issueList { + var referencedIds []int64 + for _, comment := range issue.Comments { + if comment.RefIssueID != 0 && comment.RefIsPull { + referencedIds = append(referencedIds, comment.RefIssueID) + } + } + + if len(referencedIds) > 0 { + if linkedPrs, err := models.Issues(&models.IssuesOptions{ + IssueIDs: referencedIds, + IsPull: util.OptionalBoolTrue, + }); err == nil { + linkedPrsMap[issue.ID] = linkedPrs + } + } + } + ctx.Data["LinkedPRs"] = linkedPrsMap + + project.RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, project.Description) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + ctx.Data["Project"] = project + ctx.Data["Boards"] = boards + ctx.Data["PageIsProjects"] = true + ctx.Data["RequiresDraggable"] = true + + ctx.HTML(http.StatusOK, tplProjectsView) +} + +// UpdateIssueProject change an issue's project +func UpdateIssueProject(ctx *context.Context) { + issues := getActionIssues(ctx) + if ctx.Written() { + return + } + + projectID := ctx.FormInt64("id") + for _, issue := range issues { + oldProjectID := issue.ProjectID() + if oldProjectID == projectID { + continue + } + + if err := models.ChangeProjectAssign(issue, ctx.User, projectID); err != nil { + ctx.ServerError("ChangeProjectAssign", err) + return + } + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// DeleteProjectBoard allows for the deletion of a project board +func DeleteProjectBoard(ctx *context.Context) { + if ctx.User == nil { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only signed in users are allowed to perform this action.", + }) + return + } + + if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only authorized users are allowed to perform this action.", + }) + return + } + + project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return + } + + pb, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID")) + if err != nil { + ctx.ServerError("GetProjectBoard", err) + return + } + if pb.ProjectID != ctx.ParamsInt64(":id") { + ctx.JSON(http.StatusUnprocessableEntity, map[string]string{ + "message": fmt.Sprintf("ProjectBoard[%d] is not in Project[%d] as expected", pb.ID, project.ID), + }) + return + } + + if project.RepoID != ctx.Repo.Repository.ID { + ctx.JSON(http.StatusUnprocessableEntity, map[string]string{ + "message": fmt.Sprintf("ProjectBoard[%d] is not in Repository[%d] as expected", pb.ID, ctx.Repo.Repository.ID), + }) + return + } + + if err := models.DeleteProjectBoardByID(ctx.ParamsInt64(":boardID")); err != nil { + ctx.ServerError("DeleteProjectBoardByID", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// AddBoardToProjectPost allows a new board to be added to a project. +func AddBoardToProjectPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditProjectBoardForm) + if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only authorized users are allowed to perform this action.", + }) + return + } + + project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return + } + + if err := models.NewProjectBoard(&models.ProjectBoard{ + ProjectID: project.ID, + Title: form.Title, + CreatorID: ctx.User.ID, + }); err != nil { + ctx.ServerError("NewProjectBoard", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +func checkProjectBoardChangePermissions(ctx *context.Context) (*models.Project, *models.ProjectBoard) { + if ctx.User == nil { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only signed in users are allowed to perform this action.", + }) + return nil, nil + } + + if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only authorized users are allowed to perform this action.", + }) + return nil, nil + } + + project, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return nil, nil + } + + board, err := models.GetProjectBoard(ctx.ParamsInt64(":boardID")) + if err != nil { + ctx.ServerError("GetProjectBoard", err) + return nil, nil + } + if board.ProjectID != ctx.ParamsInt64(":id") { + ctx.JSON(http.StatusUnprocessableEntity, map[string]string{ + "message": fmt.Sprintf("ProjectBoard[%d] is not in Project[%d] as expected", board.ID, project.ID), + }) + return nil, nil + } + + if project.RepoID != ctx.Repo.Repository.ID { + ctx.JSON(http.StatusUnprocessableEntity, map[string]string{ + "message": fmt.Sprintf("ProjectBoard[%d] is not in Repository[%d] as expected", board.ID, ctx.Repo.Repository.ID), + }) + return nil, nil + } + return project, board +} + +// EditProjectBoard allows a project board's to be updated +func EditProjectBoard(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditProjectBoardForm) + _, board := checkProjectBoardChangePermissions(ctx) + if ctx.Written() { + return + } + + if form.Title != "" { + board.Title = form.Title + } + + if form.Sorting != 0 { + board.Sorting = form.Sorting + } + + if err := models.UpdateProjectBoard(board); err != nil { + ctx.ServerError("UpdateProjectBoard", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// SetDefaultProjectBoard set default board for uncategorized issues/pulls +func SetDefaultProjectBoard(ctx *context.Context) { + + project, board := checkProjectBoardChangePermissions(ctx) + if ctx.Written() { + return + } + + if err := models.SetDefaultBoard(project.ID, board.ID); err != nil { + ctx.ServerError("SetDefaultBoard", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// MoveIssueAcrossBoards move a card from one board to another in a project +func MoveIssueAcrossBoards(ctx *context.Context) { + + if ctx.User == nil { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only signed in users are allowed to perform this action.", + }) + return + } + + if !ctx.Repo.IsOwner() && !ctx.Repo.IsAdmin() && !ctx.Repo.CanAccess(models.AccessModeWrite, models.UnitTypeProjects) { + ctx.JSON(http.StatusForbidden, map[string]string{ + "message": "Only authorized users are allowed to perform this action.", + }) + return + } + + p, err := models.GetProjectByID(ctx.ParamsInt64(":id")) + if err != nil { + if models.IsErrProjectNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectByID", err) + } + return + } + if p.RepoID != ctx.Repo.Repository.ID { + ctx.NotFound("", nil) + return + } + + var board *models.ProjectBoard + + if ctx.ParamsInt64(":boardID") == 0 { + + board = &models.ProjectBoard{ + ID: 0, + ProjectID: 0, + Title: ctx.Tr("repo.projects.type.uncategorized"), + } + + } else { + board, err = models.GetProjectBoard(ctx.ParamsInt64(":boardID")) + if err != nil { + if models.IsErrProjectBoardNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetProjectBoard", err) + } + return + } + if board.ProjectID != p.ID { + ctx.NotFound("", nil) + return + } + } + + issue, err := models.GetIssueByID(ctx.ParamsInt64(":index")) + if err != nil { + if models.IsErrIssueNotExist(err) { + ctx.NotFound("", nil) + } else { + ctx.ServerError("GetIssueByID", err) + } + + return + } + + if err := models.MoveIssueAcrossProjectBoards(issue, board); err != nil { + ctx.ServerError("MoveIssueAcrossProjectBoards", err) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "ok": true, + }) +} + +// CreateProject renders the generic project creation page +func CreateProject(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.projects.new") + ctx.Data["ProjectTypes"] = models.GetProjectsConfig() + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + + ctx.HTML(http.StatusOK, tplGenericProjectsNew) +} + +// CreateProjectPost creates an individual and/or organization project +func CreateProjectPost(ctx *context.Context, form forms.UserCreateProjectForm) { + + user := checkContextUser(ctx, form.UID) + if ctx.Written() { + return + } + + ctx.Data["ContextUser"] = user + + if ctx.HasError() { + ctx.Data["CanWriteProjects"] = ctx.Repo.Permission.CanWrite(models.UnitTypeProjects) + ctx.HTML(http.StatusOK, tplGenericProjectsNew) + return + } + + var projectType = models.ProjectTypeIndividual + if user.IsOrganization() { + projectType = models.ProjectTypeOrganization + } + + if err := models.NewProject(&models.Project{ + Title: form.Title, + Description: form.Content, + CreatorID: user.ID, + BoardType: form.BoardType, + Type: projectType, + }); err != nil { + ctx.ServerError("NewProject", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.projects.create_success", form.Title)) + ctx.Redirect(setting.AppSubURL + "/") +} diff --git a/routers/web/repo/projects_test.go b/routers/web/repo/projects_test.go new file mode 100644 index 000000000..c43cf6d95 --- /dev/null +++ b/routers/web/repo/projects_test.go @@ -0,0 +1,28 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/test" + + "github.com/stretchr/testify/assert" +) + +func TestCheckProjectBoardChangePermissions(t *testing.T) { + models.PrepareTestEnv(t) + ctx := test.MockContext(t, "user2/repo1/projects/1/2") + test.LoadUser(t, ctx, 2) + test.LoadRepo(t, ctx, 1) + ctx.SetParams(":id", "1") + ctx.SetParams(":boardID", "2") + + project, board := checkProjectBoardChangePermissions(ctx) + assert.NotNil(t, project) + assert.NotNil(t, board) + assert.False(t, ctx.Written()) +} diff --git a/routers/web/repo/pull.go b/routers/web/repo/pull.go new file mode 100644 index 000000000..885ac3391 --- /dev/null +++ b/routers/web/repo/pull.go @@ -0,0 +1,1408 @@ +// Copyright 2018 The Gitea Authors. +// Copyright 2014 The Gogs Authors. +// All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "crypto/subtle" + "errors" + "fmt" + "net/http" + "path" + "strings" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/upload" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/routers/utils" + "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/gitdiff" + pull_service "code.gitea.io/gitea/services/pull" + repo_service "code.gitea.io/gitea/services/repository" + "github.com/unknwon/com" +) + +const ( + tplFork base.TplName = "repo/pulls/fork" + tplCompareDiff base.TplName = "repo/diff/compare" + tplPullCommits base.TplName = "repo/pulls/commits" + tplPullFiles base.TplName = "repo/pulls/files" + + pullRequestTemplateKey = "PullRequestTemplate" +) + +var ( + pullRequestTemplateCandidates = []string{ + "PULL_REQUEST_TEMPLATE.md", + "pull_request_template.md", + ".gitea/PULL_REQUEST_TEMPLATE.md", + ".gitea/pull_request_template.md", + ".github/PULL_REQUEST_TEMPLATE.md", + ".github/pull_request_template.md", + } +) + +func getRepository(ctx *context.Context, repoID int64) *models.Repository { + repo, err := models.GetRepositoryByID(repoID) + if err != nil { + if models.IsErrRepoNotExist(err) { + ctx.NotFound("GetRepositoryByID", nil) + } else { + ctx.ServerError("GetRepositoryByID", err) + } + return nil + } + + perm, err := models.GetUserRepoPermission(repo, ctx.User) + if err != nil { + ctx.ServerError("GetUserRepoPermission", err) + return nil + } + + if !perm.CanRead(models.UnitTypeCode) { + log.Trace("Permission Denied: User %-v cannot read %-v of repo %-v\n"+ + "User in repo has Permissions: %-+v", + ctx.User, + models.UnitTypeCode, + ctx.Repo, + perm) + ctx.NotFound("getRepository", nil) + return nil + } + return repo +} + +func getForkRepository(ctx *context.Context) *models.Repository { + forkRepo := getRepository(ctx, ctx.ParamsInt64(":repoid")) + if ctx.Written() { + return nil + } + + if forkRepo.IsEmpty { + log.Trace("Empty repository %-v", forkRepo) + ctx.NotFound("getForkRepository", nil) + return nil + } + + if err := forkRepo.GetOwner(); err != nil { + ctx.ServerError("GetOwner", err) + return nil + } + + ctx.Data["repo_name"] = forkRepo.Name + ctx.Data["description"] = forkRepo.Description + ctx.Data["IsPrivate"] = forkRepo.IsPrivate || forkRepo.Owner.Visibility == structs.VisibleTypePrivate + canForkToUser := forkRepo.OwnerID != ctx.User.ID && !ctx.User.HasForkedRepo(forkRepo.ID) + + ctx.Data["ForkFrom"] = forkRepo.Owner.Name + "/" + forkRepo.Name + ctx.Data["ForkFromOwnerID"] = forkRepo.Owner.ID + + if err := ctx.User.GetOwnedOrganizations(); err != nil { + ctx.ServerError("GetOwnedOrganizations", err) + return nil + } + var orgs []*models.User + for _, org := range ctx.User.OwnedOrgs { + if forkRepo.OwnerID != org.ID && !org.HasForkedRepo(forkRepo.ID) { + orgs = append(orgs, org) + } + } + + var traverseParentRepo = forkRepo + var err error + for { + if ctx.User.ID == traverseParentRepo.OwnerID { + canForkToUser = false + } else { + for i, org := range orgs { + if org.ID == traverseParentRepo.OwnerID { + orgs = append(orgs[:i], orgs[i+1:]...) + break + } + } + } + + if !traverseParentRepo.IsFork { + break + } + traverseParentRepo, err = models.GetRepositoryByID(traverseParentRepo.ForkID) + if err != nil { + ctx.ServerError("GetRepositoryByID", err) + return nil + } + } + + ctx.Data["CanForkToUser"] = canForkToUser + ctx.Data["Orgs"] = orgs + + if canForkToUser { + ctx.Data["ContextUser"] = ctx.User + } else if len(orgs) > 0 { + ctx.Data["ContextUser"] = orgs[0] + } + + return forkRepo +} + +// Fork render repository fork page +func Fork(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("new_fork") + + getForkRepository(ctx) + if ctx.Written() { + return + } + + ctx.HTML(http.StatusOK, tplFork) +} + +// ForkPost response for forking a repository +func ForkPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateRepoForm) + ctx.Data["Title"] = ctx.Tr("new_fork") + + ctxUser := checkContextUser(ctx, form.UID) + if ctx.Written() { + return + } + + forkRepo := getForkRepository(ctx) + if ctx.Written() { + return + } + + ctx.Data["ContextUser"] = ctxUser + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplFork) + return + } + + var err error + var traverseParentRepo = forkRepo + for { + if ctxUser.ID == traverseParentRepo.OwnerID { + ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), tplFork, &form) + return + } + repo, has := models.HasForkedRepo(ctxUser.ID, traverseParentRepo.ID) + if has { + ctx.Redirect(ctxUser.HomeLink() + "/" + repo.Name) + return + } + if !traverseParentRepo.IsFork { + break + } + traverseParentRepo, err = models.GetRepositoryByID(traverseParentRepo.ForkID) + if err != nil { + ctx.ServerError("GetRepositoryByID", err) + return + } + } + + // Check ownership of organization. + if ctxUser.IsOrganization() { + isOwner, err := ctxUser.IsOwnedBy(ctx.User.ID) + if err != nil { + ctx.ServerError("IsOwnedBy", err) + return + } else if !isOwner { + ctx.Error(http.StatusForbidden) + return + } + } + + repo, err := repo_service.ForkRepository(ctx.User, ctxUser, models.ForkRepoOptions{ + BaseRepo: forkRepo, + Name: form.RepoName, + Description: form.Description, + }) + if err != nil { + ctx.Data["Err_RepoName"] = true + switch { + case models.IsErrRepoAlreadyExist(err): + ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), tplFork, &form) + case models.IsErrNameReserved(err): + ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tplFork, &form) + case models.IsErrNamePatternNotAllowed(err): + ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplFork, &form) + default: + ctx.ServerError("ForkPost", err) + } + return + } + + log.Trace("Repository forked[%d]: %s/%s", forkRepo.ID, ctxUser.Name, repo.Name) + ctx.Redirect(ctxUser.HomeLink() + "/" + repo.Name) +} + +func checkPullInfo(ctx *context.Context) *models.Issue { + issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) + if err != nil { + if models.IsErrIssueNotExist(err) { + ctx.NotFound("GetIssueByIndex", err) + } else { + ctx.ServerError("GetIssueByIndex", err) + } + return nil + } + if err = issue.LoadPoster(); err != nil { + ctx.ServerError("LoadPoster", err) + return nil + } + if err := issue.LoadRepo(); err != nil { + ctx.ServerError("LoadRepo", err) + return nil + } + ctx.Data["Title"] = fmt.Sprintf("#%d - %s", issue.Index, issue.Title) + ctx.Data["Issue"] = issue + + if !issue.IsPull { + ctx.NotFound("ViewPullCommits", nil) + return nil + } + + if err = issue.LoadPullRequest(); err != nil { + ctx.ServerError("LoadPullRequest", err) + return nil + } + + if err = issue.PullRequest.LoadHeadRepo(); err != nil { + ctx.ServerError("LoadHeadRepo", err) + return nil + } + + if ctx.IsSigned { + // Update issue-user. + if err = issue.ReadBy(ctx.User.ID); err != nil { + ctx.ServerError("ReadBy", err) + return nil + } + } + + return issue +} + +func setMergeTarget(ctx *context.Context, pull *models.PullRequest) { + if ctx.Repo.Owner.Name == pull.MustHeadUserName() { + ctx.Data["HeadTarget"] = pull.HeadBranch + } else if pull.HeadRepo == nil { + ctx.Data["HeadTarget"] = pull.MustHeadUserName() + ":" + pull.HeadBranch + } else { + ctx.Data["HeadTarget"] = pull.MustHeadUserName() + "/" + pull.HeadRepo.Name + ":" + pull.HeadBranch + } + ctx.Data["BaseTarget"] = pull.BaseBranch + ctx.Data["HeadBranchHTMLURL"] = pull.GetHeadBranchHTMLURL() + ctx.Data["BaseBranchHTMLURL"] = pull.GetBaseBranchHTMLURL() +} + +// PrepareMergedViewPullInfo show meta information for a merged pull request view page +func PrepareMergedViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo { + pull := issue.PullRequest + + setMergeTarget(ctx, pull) + ctx.Data["HasMerged"] = true + + compareInfo, err := ctx.Repo.GitRepo.GetCompareInfo(ctx.Repo.Repository.RepoPath(), + pull.MergeBase, pull.GetGitRefName()) + if err != nil { + if strings.Contains(err.Error(), "fatal: Not a valid object name") || strings.Contains(err.Error(), "unknown revision or path not in the working tree") { + ctx.Data["IsPullRequestBroken"] = true + ctx.Data["BaseTarget"] = pull.BaseBranch + ctx.Data["NumCommits"] = 0 + ctx.Data["NumFiles"] = 0 + return nil + } + + ctx.ServerError("GetCompareInfo", err) + return nil + } + ctx.Data["NumCommits"] = len(compareInfo.Commits) + ctx.Data["NumFiles"] = compareInfo.NumFiles + + if len(compareInfo.Commits) != 0 { + sha := compareInfo.Commits[0].ID.String() + commitStatuses, err := models.GetLatestCommitStatus(ctx.Repo.Repository.ID, sha, models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLatestCommitStatus", err) + return nil + } + if len(commitStatuses) != 0 { + ctx.Data["LatestCommitStatuses"] = commitStatuses + ctx.Data["LatestCommitStatus"] = models.CalcCommitStatus(commitStatuses) + } + } + + return compareInfo +} + +// PrepareViewPullInfo show meta information for a pull request preview page +func PrepareViewPullInfo(ctx *context.Context, issue *models.Issue) *git.CompareInfo { + repo := ctx.Repo.Repository + pull := issue.PullRequest + + if err := pull.LoadHeadRepo(); err != nil { + ctx.ServerError("LoadHeadRepo", err) + return nil + } + + if err := pull.LoadBaseRepo(); err != nil { + ctx.ServerError("LoadBaseRepo", err) + return nil + } + + setMergeTarget(ctx, pull) + + if err := pull.LoadProtectedBranch(); err != nil { + ctx.ServerError("LoadProtectedBranch", err) + return nil + } + ctx.Data["EnableStatusCheck"] = pull.ProtectedBranch != nil && pull.ProtectedBranch.EnableStatusCheck + + baseGitRepo, err := git.OpenRepository(pull.BaseRepo.RepoPath()) + if err != nil { + ctx.ServerError("OpenRepository", err) + return nil + } + defer baseGitRepo.Close() + + if !baseGitRepo.IsBranchExist(pull.BaseBranch) { + ctx.Data["IsPullRequestBroken"] = true + ctx.Data["BaseTarget"] = pull.BaseBranch + ctx.Data["HeadTarget"] = pull.HeadBranch + + sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName()) + if err != nil { + ctx.ServerError(fmt.Sprintf("GetRefCommitID(%s)", pull.GetGitRefName()), err) + return nil + } + commitStatuses, err := models.GetLatestCommitStatus(repo.ID, sha, models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLatestCommitStatus", err) + return nil + } + if len(commitStatuses) > 0 { + ctx.Data["LatestCommitStatuses"] = commitStatuses + ctx.Data["LatestCommitStatus"] = models.CalcCommitStatus(commitStatuses) + } + + compareInfo, err := baseGitRepo.GetCompareInfo(pull.BaseRepo.RepoPath(), + pull.MergeBase, pull.GetGitRefName()) + if err != nil { + if strings.Contains(err.Error(), "fatal: Not a valid object name") { + ctx.Data["IsPullRequestBroken"] = true + ctx.Data["BaseTarget"] = pull.BaseBranch + ctx.Data["NumCommits"] = 0 + ctx.Data["NumFiles"] = 0 + return nil + } + + ctx.ServerError("GetCompareInfo", err) + return nil + } + + ctx.Data["NumCommits"] = len(compareInfo.Commits) + ctx.Data["NumFiles"] = compareInfo.NumFiles + return compareInfo + } + + var headBranchExist bool + var headBranchSha string + // HeadRepo may be missing + if pull.HeadRepo != nil { + headGitRepo, err := git.OpenRepository(pull.HeadRepo.RepoPath()) + if err != nil { + ctx.ServerError("OpenRepository", err) + return nil + } + defer headGitRepo.Close() + + if pull.Flow == models.PullRequestFlowGithub { + headBranchExist = headGitRepo.IsBranchExist(pull.HeadBranch) + } else { + headBranchExist = git.IsReferenceExist(baseGitRepo.Path, pull.GetGitRefName()) + } + + if headBranchExist { + if pull.Flow != models.PullRequestFlowGithub { + headBranchSha, err = baseGitRepo.GetRefCommitID(pull.GetGitRefName()) + } else { + headBranchSha, err = headGitRepo.GetBranchCommitID(pull.HeadBranch) + } + if err != nil { + ctx.ServerError("GetBranchCommitID", err) + return nil + } + } + } + + if headBranchExist { + ctx.Data["UpdateAllowed"], ctx.Data["UpdateByRebaseAllowed"], err = pull_service.IsUserAllowedToUpdate(pull, ctx.User) + if err != nil { + ctx.ServerError("IsUserAllowedToUpdate", err) + return nil + } + ctx.Data["GetCommitMessages"] = pull_service.GetSquashMergeCommitMessages(pull) + } + + sha, err := baseGitRepo.GetRefCommitID(pull.GetGitRefName()) + if err != nil { + if git.IsErrNotExist(err) { + ctx.Data["IsPullRequestBroken"] = true + if pull.IsSameRepo() { + ctx.Data["HeadTarget"] = pull.HeadBranch + } else if pull.HeadRepo == nil { + ctx.Data["HeadTarget"] = ":" + pull.HeadBranch + } else { + ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch + } + ctx.Data["BaseTarget"] = pull.BaseBranch + ctx.Data["NumCommits"] = 0 + ctx.Data["NumFiles"] = 0 + return nil + } + ctx.ServerError(fmt.Sprintf("GetRefCommitID(%s)", pull.GetGitRefName()), err) + return nil + } + + commitStatuses, err := models.GetLatestCommitStatus(repo.ID, sha, models.ListOptions{}) + if err != nil { + ctx.ServerError("GetLatestCommitStatus", err) + return nil + } + if len(commitStatuses) > 0 { + ctx.Data["LatestCommitStatuses"] = commitStatuses + ctx.Data["LatestCommitStatus"] = models.CalcCommitStatus(commitStatuses) + } + + if pull.ProtectedBranch != nil && pull.ProtectedBranch.EnableStatusCheck { + ctx.Data["is_context_required"] = func(context string) bool { + for _, c := range pull.ProtectedBranch.StatusCheckContexts { + if c == context { + return true + } + } + return false + } + ctx.Data["RequiredStatusCheckState"] = pull_service.MergeRequiredContextsCommitStatus(commitStatuses, pull.ProtectedBranch.StatusCheckContexts) + } + + ctx.Data["HeadBranchMovedOn"] = headBranchSha != sha + ctx.Data["HeadBranchCommitID"] = headBranchSha + ctx.Data["PullHeadCommitID"] = sha + + if pull.HeadRepo == nil || !headBranchExist || headBranchSha != sha { + ctx.Data["IsPullRequestBroken"] = true + if pull.IsSameRepo() { + ctx.Data["HeadTarget"] = pull.HeadBranch + } else if pull.HeadRepo == nil { + ctx.Data["HeadTarget"] = ":" + pull.HeadBranch + } else { + ctx.Data["HeadTarget"] = pull.HeadRepo.OwnerName + ":" + pull.HeadBranch + } + } + + compareInfo, err := baseGitRepo.GetCompareInfo(pull.BaseRepo.RepoPath(), + git.BranchPrefix+pull.BaseBranch, pull.GetGitRefName()) + if err != nil { + if strings.Contains(err.Error(), "fatal: Not a valid object name") { + ctx.Data["IsPullRequestBroken"] = true + ctx.Data["BaseTarget"] = pull.BaseBranch + ctx.Data["NumCommits"] = 0 + ctx.Data["NumFiles"] = 0 + return nil + } + + ctx.ServerError("GetCompareInfo", err) + return nil + } + + if compareInfo.HeadCommitID == compareInfo.MergeBase { + ctx.Data["IsNothingToCompare"] = true + } + + ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes + + if pull.IsWorkInProgress() { + ctx.Data["IsPullWorkInProgress"] = true + ctx.Data["WorkInProgressPrefix"] = pull.GetWorkInProgressPrefix() + } + + if pull.IsFilesConflicted() { + ctx.Data["IsPullFilesConflicted"] = true + ctx.Data["ConflictedFiles"] = pull.ConflictedFiles + } + + ctx.Data["NumCommits"] = len(compareInfo.Commits) + ctx.Data["NumFiles"] = compareInfo.NumFiles + return compareInfo +} + +// ViewPullCommits show commits for a pull request +func ViewPullCommits(ctx *context.Context) { + ctx.Data["PageIsPullList"] = true + ctx.Data["PageIsPullCommits"] = true + + issue := checkPullInfo(ctx) + if ctx.Written() { + return + } + pull := issue.PullRequest + + var prInfo *git.CompareInfo + if pull.HasMerged { + prInfo = PrepareMergedViewPullInfo(ctx, issue) + } else { + prInfo = PrepareViewPullInfo(ctx, issue) + } + + if ctx.Written() { + return + } else if prInfo == nil { + ctx.NotFound("ViewPullCommits", nil) + return + } + + ctx.Data["Username"] = ctx.Repo.Owner.Name + ctx.Data["Reponame"] = ctx.Repo.Repository.Name + + commits := models.ConvertFromGitCommit(prInfo.Commits, ctx.Repo.Repository) + ctx.Data["Commits"] = commits + ctx.Data["CommitCount"] = len(commits) + + getBranchData(ctx, issue) + ctx.HTML(http.StatusOK, tplPullCommits) +} + +// ViewPullFiles render pull request changed files list page +func ViewPullFiles(ctx *context.Context) { + ctx.Data["PageIsPullList"] = true + ctx.Data["PageIsPullFiles"] = true + + issue := checkPullInfo(ctx) + if ctx.Written() { + return + } + pull := issue.PullRequest + + var ( + startCommitID string + endCommitID string + gitRepo = ctx.Repo.GitRepo + ) + + var prInfo *git.CompareInfo + if pull.HasMerged { + prInfo = PrepareMergedViewPullInfo(ctx, issue) + } else { + prInfo = PrepareViewPullInfo(ctx, issue) + } + + if ctx.Written() { + return + } else if prInfo == nil { + ctx.NotFound("ViewPullFiles", nil) + return + } + + headCommitID, err := gitRepo.GetRefCommitID(pull.GetGitRefName()) + if err != nil { + ctx.ServerError("GetRefCommitID", err) + return + } + + startCommitID = prInfo.MergeBase + endCommitID = headCommitID + + ctx.Data["Username"] = ctx.Repo.Owner.Name + ctx.Data["Reponame"] = ctx.Repo.Repository.Name + ctx.Data["AfterCommitID"] = endCommitID + + diff, err := gitdiff.GetDiffRangeWithWhitespaceBehavior(gitRepo, + startCommitID, endCommitID, setting.Git.MaxGitDiffLines, + setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, + gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string))) + if err != nil { + ctx.ServerError("GetDiffRangeWithWhitespaceBehavior", err) + return + } + + if err = diff.LoadComments(issue, ctx.User); err != nil { + ctx.ServerError("LoadComments", err) + return + } + + if err = pull.LoadProtectedBranch(); err != nil { + ctx.ServerError("LoadProtectedBranch", err) + return + } + + if pull.ProtectedBranch != nil { + glob := pull.ProtectedBranch.GetProtectedFilePatterns() + if len(glob) != 0 { + for _, file := range diff.Files { + file.IsProtected = pull.ProtectedBranch.IsProtectedFile(glob, file.Name) + } + } + } + + ctx.Data["Diff"] = diff + ctx.Data["DiffNotAvailable"] = diff.NumFiles == 0 + + baseCommit, err := ctx.Repo.GitRepo.GetCommit(startCommitID) + if err != nil { + ctx.ServerError("GetCommit", err) + return + } + commit, err := gitRepo.GetCommit(endCommitID) + if err != nil { + ctx.ServerError("GetCommit", err) + return + } + + if ctx.IsSigned && ctx.User != nil { + if ctx.Data["CanMarkConversation"], err = models.CanMarkConversation(issue, ctx.User); err != nil { + ctx.ServerError("CanMarkConversation", err) + return + } + } + + headTarget := path.Join(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name) + setCompareContext(ctx, baseCommit, commit, headTarget) + + ctx.Data["RequireHighlightJS"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true + if ctx.Data["Assignees"], err = ctx.Repo.Repository.GetAssignees(); err != nil { + ctx.ServerError("GetAssignees", err) + return + } + handleTeamMentions(ctx) + if ctx.Written() { + return + } + ctx.Data["CurrentReview"], err = models.GetCurrentReview(ctx.User, issue) + if err != nil && !models.IsErrReviewNotExist(err) { + ctx.ServerError("GetCurrentReview", err) + return + } + getBranchData(ctx, issue) + ctx.Data["IsIssuePoster"] = ctx.IsSigned && issue.IsPoster(ctx.User.ID) + ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull) + + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "comment") + + ctx.HTML(http.StatusOK, tplPullFiles) +} + +// UpdatePullRequest merge PR's baseBranch into headBranch +func UpdatePullRequest(ctx *context.Context) { + issue := checkPullInfo(ctx) + if ctx.Written() { + return + } + if issue.IsClosed { + ctx.NotFound("MergePullRequest", nil) + return + } + if issue.PullRequest.HasMerged { + ctx.NotFound("MergePullRequest", nil) + return + } + + rebase := ctx.FormString("style") == "rebase" + + if err := issue.PullRequest.LoadBaseRepo(); err != nil { + ctx.ServerError("LoadBaseRepo", err) + return + } + if err := issue.PullRequest.LoadHeadRepo(); err != nil { + ctx.ServerError("LoadHeadRepo", err) + return + } + + allowedUpdateByMerge, allowedUpdateByRebase, err := pull_service.IsUserAllowedToUpdate(issue.PullRequest, ctx.User) + if err != nil { + ctx.ServerError("IsUserAllowedToMerge", err) + return + } + + // ToDo: add check if maintainers are allowed to change branch ... (need migration & co) + if (!allowedUpdateByMerge && !rebase) || (rebase && !allowedUpdateByRebase) { + ctx.Flash.Error(ctx.Tr("repo.pulls.update_not_allowed")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) + return + } + + // default merge commit message + message := fmt.Sprintf("Merge branch '%s' into %s", issue.PullRequest.BaseBranch, issue.PullRequest.HeadBranch) + + if err = pull_service.Update(issue.PullRequest, ctx.User, message, rebase); err != nil { + if models.IsErrMergeConflicts(err) { + conflictError := err.(models.ErrMergeConflicts) + flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ + "Message": ctx.Tr("repo.pulls.merge_conflict"), + "Summary": ctx.Tr("repo.pulls.merge_conflict_summary"), + "Details": utils.SanitizeFlashErrorString(conflictError.StdErr) + "
    " + utils.SanitizeFlashErrorString(conflictError.StdOut), + }) + if err != nil { + ctx.ServerError("UpdatePullRequest.HTMLString", err) + return + } + ctx.Flash.Error(flashError) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) + return + } + ctx.Flash.Error(err.Error()) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) + return + } + + time.Sleep(1 * time.Second) + + ctx.Flash.Success(ctx.Tr("repo.pulls.update_branch_success")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) +} + +// MergePullRequest response for merging pull request +func MergePullRequest(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.MergePullRequestForm) + issue := checkPullInfo(ctx) + if ctx.Written() { + return + } + if issue.IsClosed { + if issue.IsPull { + ctx.Flash.Error(ctx.Tr("repo.pulls.is_closed")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) + return + } + ctx.Flash.Error(ctx.Tr("repo.issues.closed_title")) + ctx.Redirect(ctx.Repo.RepoLink + "/issues/" + fmt.Sprint(issue.Index)) + return + } + + pr := issue.PullRequest + + allowedMerge, err := pull_service.IsUserAllowedToMerge(pr, ctx.Repo.Permission, ctx.User) + if err != nil { + ctx.ServerError("IsUserAllowedToMerge", err) + return + } + if !allowedMerge { + ctx.Flash.Error(ctx.Tr("repo.pulls.update_not_allowed")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(issue.Index)) + return + } + + if pr.HasMerged { + ctx.Flash.Error(ctx.Tr("repo.pulls.has_merged")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(issue.Index)) + return + } + + // handle manually-merged mark + if models.MergeStyle(form.Do) == models.MergeStyleManuallyMerged { + if err = pull_service.MergedManually(pr, ctx.User, ctx.Repo.GitRepo, form.MergeCommitID); err != nil { + if models.IsErrInvalidMergeStyle(err) { + ctx.Flash.Error(ctx.Tr("repo.pulls.invalid_merge_option")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(issue.Index)) + return + } else if strings.Contains(err.Error(), "Wrong commit ID") { + ctx.Flash.Error(ctx.Tr("repo.pulls.wrong_commit_id")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(issue.Index)) + return + } + + ctx.ServerError("MergedManually", err) + return + } + + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(issue.Index)) + return + } + + if !pr.CanAutoMerge() { + ctx.Flash.Error(ctx.Tr("repo.pulls.no_merge_not_ready")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + com.ToStr(issue.Index)) + return + } + + if pr.IsWorkInProgress() { + ctx.Flash.Error(ctx.Tr("repo.pulls.no_merge_wip")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } + + if err := pull_service.CheckPRReadyToMerge(pr, false); err != nil { + if !models.IsErrNotAllowedToMerge(err) { + ctx.ServerError("Merge PR status", err) + return + } + if isRepoAdmin, err := models.IsUserRepoAdmin(pr.BaseRepo, ctx.User); err != nil { + ctx.ServerError("IsUserRepoAdmin", err) + return + } else if !isRepoAdmin { + ctx.Flash.Error(ctx.Tr("repo.pulls.no_merge_not_ready")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } + } + + if ctx.HasError() { + ctx.Flash.Error(ctx.Data["ErrorMsg"].(string)) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } + + message := strings.TrimSpace(form.MergeTitleField) + if len(message) == 0 { + if models.MergeStyle(form.Do) == models.MergeStyleMerge { + message = pr.GetDefaultMergeMessage() + } + if models.MergeStyle(form.Do) == models.MergeStyleRebaseMerge { + message = pr.GetDefaultMergeMessage() + } + if models.MergeStyle(form.Do) == models.MergeStyleSquash { + message = pr.GetDefaultSquashMessage() + } + } + + form.MergeMessageField = strings.TrimSpace(form.MergeMessageField) + if len(form.MergeMessageField) > 0 { + message += "\n\n" + form.MergeMessageField + } + + pr.Issue = issue + pr.Issue.Repo = ctx.Repo.Repository + + noDeps, err := models.IssueNoDependenciesLeft(issue) + if err != nil { + return + } + + if !noDeps { + ctx.Flash.Error(ctx.Tr("repo.issues.dependency.pr_close_blocked")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } + + if err = pull_service.Merge(pr, ctx.User, ctx.Repo.GitRepo, models.MergeStyle(form.Do), message); err != nil { + if models.IsErrInvalidMergeStyle(err) { + ctx.Flash.Error(ctx.Tr("repo.pulls.invalid_merge_option")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } else if models.IsErrMergeConflicts(err) { + conflictError := err.(models.ErrMergeConflicts) + flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ + "Message": ctx.Tr("repo.editor.merge_conflict"), + "Summary": ctx.Tr("repo.editor.merge_conflict_summary"), + "Details": utils.SanitizeFlashErrorString(conflictError.StdErr) + "
    " + utils.SanitizeFlashErrorString(conflictError.StdOut), + }) + if err != nil { + ctx.ServerError("MergePullRequest.HTMLString", err) + return + } + ctx.Flash.Error(flashError) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } else if models.IsErrRebaseConflicts(err) { + conflictError := err.(models.ErrRebaseConflicts) + flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ + "Message": ctx.Tr("repo.pulls.rebase_conflict", utils.SanitizeFlashErrorString(conflictError.CommitSHA)), + "Summary": ctx.Tr("repo.pulls.rebase_conflict_summary"), + "Details": utils.SanitizeFlashErrorString(conflictError.StdErr) + "
    " + utils.SanitizeFlashErrorString(conflictError.StdOut), + }) + if err != nil { + ctx.ServerError("MergePullRequest.HTMLString", err) + return + } + ctx.Flash.Error(flashError) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } else if models.IsErrMergeUnrelatedHistories(err) { + log.Debug("MergeUnrelatedHistories error: %v", err) + ctx.Flash.Error(ctx.Tr("repo.pulls.unrelated_histories")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } else if git.IsErrPushOutOfDate(err) { + log.Debug("MergePushOutOfDate error: %v", err) + ctx.Flash.Error(ctx.Tr("repo.pulls.merge_out_of_date")) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } else if git.IsErrPushRejected(err) { + log.Debug("MergePushRejected error: %v", err) + pushrejErr := err.(*git.ErrPushRejected) + message := pushrejErr.Message + if len(message) == 0 { + ctx.Flash.Error(ctx.Tr("repo.pulls.push_rejected_no_message")) + } else { + flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ + "Message": ctx.Tr("repo.pulls.push_rejected"), + "Summary": ctx.Tr("repo.pulls.push_rejected_summary"), + "Details": utils.SanitizeFlashErrorString(pushrejErr.Message), + }) + if err != nil { + ctx.ServerError("MergePullRequest.HTMLString", err) + return + } + ctx.Flash.Error(flashError) + } + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) + return + } + ctx.ServerError("Merge", err) + return + } + + if err := stopTimerIfAvailable(ctx.User, issue); err != nil { + ctx.ServerError("CreateOrStopIssueStopwatch", err) + return + } + + log.Trace("Pull request merged: %d", pr.ID) + + if form.DeleteBranchAfterMerge { + var headRepo *git.Repository + if ctx.Repo != nil && ctx.Repo.Repository != nil && pr.HeadRepoID == ctx.Repo.Repository.ID && ctx.Repo.GitRepo != nil { + headRepo = ctx.Repo.GitRepo + } else { + headRepo, err = git.OpenRepository(pr.HeadRepo.RepoPath()) + if err != nil { + ctx.ServerError(fmt.Sprintf("OpenRepository[%s]", pr.HeadRepo.RepoPath()), err) + return + } + defer headRepo.Close() + } + deleteBranch(ctx, pr, headRepo) + } + + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pr.Index)) +} + +func stopTimerIfAvailable(user *models.User, issue *models.Issue) error { + + if models.StopwatchExists(user.ID, issue.ID) { + if err := models.CreateOrStopIssueStopwatch(user, issue); err != nil { + return err + } + } + + return nil +} + +// CompareAndPullRequestPost response for creating pull request +func CompareAndPullRequestPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateIssueForm) + ctx.Data["Title"] = ctx.Tr("repo.pulls.compare_changes") + ctx.Data["PageIsComparePull"] = true + ctx.Data["IsDiffCompare"] = true + ctx.Data["IsRepoToolbarCommits"] = true + ctx.Data["RequireTribute"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireHighlightJS"] = true + ctx.Data["PullRequestWorkInProgressPrefixes"] = setting.Repository.PullRequest.WorkInProgressPrefixes + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "comment") + ctx.Data["HasIssuesOrPullsWritePermission"] = ctx.Repo.CanWrite(models.UnitTypePullRequests) + + var ( + repo = ctx.Repo.Repository + attachments []string + ) + + headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch := ParseCompareInfo(ctx) + defer func() { + if headGitRepo != nil { + headGitRepo.Close() + } + }() + if ctx.Written() { + return + } + + labelIDs, assigneeIDs, milestoneID, _ := ValidateRepoMetas(ctx, *form, true) + if ctx.Written() { + return + } + + if setting.Attachment.Enabled { + attachments = form.Files + } + + if ctx.HasError() { + middleware.AssignForm(form, ctx.Data) + + // This stage is already stop creating new pull request, so it does not matter if it has + // something to compare or not. + PrepareCompareDiff(ctx, headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch, + gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string))) + if ctx.Written() { + return + } + + if len(form.Title) > 255 { + var trailer string + form.Title, trailer = util.SplitStringAtByteN(form.Title, 255) + + form.Content = trailer + "\n\n" + form.Content + } + middleware.AssignForm(form, ctx.Data) + + ctx.HTML(http.StatusOK, tplCompareDiff) + return + } + + if util.IsEmptyString(form.Title) { + PrepareCompareDiff(ctx, headUser, headRepo, headGitRepo, prInfo, baseBranch, headBranch, + gitdiff.GetWhitespaceFlag(ctx.Data["WhitespaceBehavior"].(string))) + if ctx.Written() { + return + } + + ctx.RenderWithErr(ctx.Tr("repo.issues.new.title_empty"), tplCompareDiff, form) + return + } + + pullIssue := &models.Issue{ + RepoID: repo.ID, + Title: form.Title, + PosterID: ctx.User.ID, + Poster: ctx.User, + MilestoneID: milestoneID, + IsPull: true, + Content: form.Content, + } + pullRequest := &models.PullRequest{ + HeadRepoID: headRepo.ID, + BaseRepoID: repo.ID, + HeadBranch: headBranch, + BaseBranch: baseBranch, + HeadRepo: headRepo, + BaseRepo: repo, + MergeBase: prInfo.MergeBase, + Type: models.PullRequestGitea, + } + // FIXME: check error in the case two people send pull request at almost same time, give nice error prompt + // instead of 500. + + if err := pull_service.NewPullRequest(repo, pullIssue, labelIDs, attachments, pullRequest, assigneeIDs); err != nil { + if models.IsErrUserDoesNotHaveAccessToRepo(err) { + ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err.Error()) + return + } else if git.IsErrPushRejected(err) { + pushrejErr := err.(*git.ErrPushRejected) + message := pushrejErr.Message + if len(message) == 0 { + ctx.Flash.Error(ctx.Tr("repo.pulls.push_rejected_no_message")) + } else { + flashError, err := ctx.HTMLString(string(tplAlertDetails), map[string]interface{}{ + "Message": ctx.Tr("repo.pulls.push_rejected"), + "Summary": ctx.Tr("repo.pulls.push_rejected_summary"), + "Details": utils.SanitizeFlashErrorString(pushrejErr.Message), + }) + if err != nil { + ctx.ServerError("CompareAndPullRequest.HTMLString", err) + return + } + ctx.Flash.Error(flashError) + } + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pullIssue.Index)) + return + } + ctx.ServerError("NewPullRequest", err) + return + } + + log.Trace("Pull request created: %d/%d", repo.ID, pullIssue.ID) + ctx.Redirect(ctx.Repo.RepoLink + "/pulls/" + fmt.Sprint(pullIssue.Index)) +} + +// TriggerTask response for a trigger task request +func TriggerTask(ctx *context.Context) { + pusherID := ctx.FormInt64("pusher") + branch := ctx.FormString("branch") + secret := ctx.FormString("secret") + if len(branch) == 0 || len(secret) == 0 || pusherID <= 0 { + ctx.Error(http.StatusNotFound) + log.Trace("TriggerTask: branch or secret is empty, or pusher ID is not valid") + return + } + owner, repo := parseOwnerAndRepo(ctx) + if ctx.Written() { + return + } + got := []byte(base.EncodeMD5(owner.Salt)) + want := []byte(secret) + if subtle.ConstantTimeCompare(got, want) != 1 { + ctx.Error(http.StatusNotFound) + log.Trace("TriggerTask [%s/%s]: invalid secret", owner.Name, repo.Name) + return + } + + pusher, err := models.GetUserByID(pusherID) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.Error(http.StatusNotFound) + } else { + ctx.ServerError("GetUserByID", err) + } + return + } + + log.Trace("TriggerTask '%s/%s' by %s", repo.Name, branch, pusher.Name) + + go pull_service.AddTestPullRequestTask(pusher, repo.ID, branch, true, "", "") + ctx.Status(202) +} + +// CleanUpPullRequest responses for delete merged branch when PR has been merged +func CleanUpPullRequest(ctx *context.Context) { + issue := checkPullInfo(ctx) + if ctx.Written() { + return + } + + pr := issue.PullRequest + + // Don't cleanup unmerged and unclosed PRs + if !pr.HasMerged && !issue.IsClosed { + ctx.NotFound("CleanUpPullRequest", nil) + return + } + + if err := pr.LoadHeadRepo(); err != nil { + ctx.ServerError("LoadHeadRepo", err) + return + } else if pr.HeadRepo == nil { + // Forked repository has already been deleted + ctx.NotFound("CleanUpPullRequest", nil) + return + } else if err = pr.LoadBaseRepo(); err != nil { + ctx.ServerError("LoadBaseRepo", err) + return + } else if err = pr.HeadRepo.GetOwner(); err != nil { + ctx.ServerError("HeadRepo.GetOwner", err) + return + } + + perm, err := models.GetUserRepoPermission(pr.HeadRepo, ctx.User) + if err != nil { + ctx.ServerError("GetUserRepoPermission", err) + return + } + if !perm.CanWrite(models.UnitTypeCode) { + ctx.NotFound("CleanUpPullRequest", nil) + return + } + + fullBranchName := pr.HeadRepo.Owner.Name + "/" + pr.HeadBranch + + var gitBaseRepo *git.Repository + + // Assume that the base repo is the current context (almost certainly) + if ctx.Repo != nil && ctx.Repo.Repository != nil && ctx.Repo.Repository.ID == pr.BaseRepoID && ctx.Repo.GitRepo != nil { + gitBaseRepo = ctx.Repo.GitRepo + } else { + // If not just open it + gitBaseRepo, err = git.OpenRepository(pr.BaseRepo.RepoPath()) + if err != nil { + ctx.ServerError(fmt.Sprintf("OpenRepository[%s]", pr.BaseRepo.RepoPath()), err) + return + } + defer gitBaseRepo.Close() + } + + // Now assume that the head repo is the same as the base repo (reasonable chance) + gitRepo := gitBaseRepo + // But if not: is it the same as the context? + if pr.BaseRepoID != pr.HeadRepoID && ctx.Repo != nil && ctx.Repo.Repository != nil && ctx.Repo.Repository.ID == pr.HeadRepoID && ctx.Repo.GitRepo != nil { + gitRepo = ctx.Repo.GitRepo + } else if pr.BaseRepoID != pr.HeadRepoID { + // Otherwise just load it up + gitRepo, err = git.OpenRepository(pr.HeadRepo.RepoPath()) + if err != nil { + ctx.ServerError(fmt.Sprintf("OpenRepository[%s]", pr.HeadRepo.RepoPath()), err) + return + } + defer gitRepo.Close() + } + + defer func() { + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": pr.BaseRepo.Link() + "/pulls/" + fmt.Sprint(issue.Index), + }) + }() + + // Check if branch has no new commits + headCommitID, err := gitBaseRepo.GetRefCommitID(pr.GetGitRefName()) + if err != nil { + log.Error("GetRefCommitID: %v", err) + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) + return + } + branchCommitID, err := gitRepo.GetBranchCommitID(pr.HeadBranch) + if err != nil { + log.Error("GetBranchCommitID: %v", err) + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) + return + } + if headCommitID != branchCommitID { + ctx.Flash.Error(ctx.Tr("repo.branch.delete_branch_has_new_commits", fullBranchName)) + return + } + + deleteBranch(ctx, pr, gitRepo) +} + +func deleteBranch(ctx *context.Context, pr *models.PullRequest, gitRepo *git.Repository) { + fullBranchName := pr.HeadRepo.Owner.Name + "/" + pr.HeadBranch + if err := repo_service.DeleteBranch(ctx.User, pr.HeadRepo, gitRepo, pr.HeadBranch); err != nil { + switch { + case git.IsErrBranchNotExist(err): + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) + case errors.Is(err, repo_service.ErrBranchIsDefault): + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) + case errors.Is(err, repo_service.ErrBranchIsProtected): + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) + default: + log.Error("DeleteBranch: %v", err) + ctx.Flash.Error(ctx.Tr("repo.branch.deletion_failed", fullBranchName)) + } + return + } + + if err := models.AddDeletePRBranchComment(ctx.User, pr.BaseRepo, pr.IssueID, pr.HeadBranch); err != nil { + // Do not fail here as branch has already been deleted + log.Error("DeleteBranch: %v", err) + } + + ctx.Flash.Success(ctx.Tr("repo.branch.deletion_success", fullBranchName)) +} + +// DownloadPullDiff render a pull's raw diff +func DownloadPullDiff(ctx *context.Context) { + DownloadPullDiffOrPatch(ctx, false) +} + +// DownloadPullPatch render a pull's raw patch +func DownloadPullPatch(ctx *context.Context) { + DownloadPullDiffOrPatch(ctx, true) +} + +// DownloadPullDiffOrPatch render a pull's raw diff or patch +func DownloadPullDiffOrPatch(ctx *context.Context, patch bool) { + issue, err := models.GetIssueByIndex(ctx.Repo.Repository.ID, ctx.ParamsInt64(":index")) + if err != nil { + if models.IsErrIssueNotExist(err) { + ctx.NotFound("GetIssueByIndex", err) + } else { + ctx.ServerError("GetIssueByIndex", err) + } + return + } + + // Return not found if it's not a pull request + if !issue.IsPull { + ctx.NotFound("DownloadPullDiff", + fmt.Errorf("Issue is not a pull request")) + return + } + + if err = issue.LoadPullRequest(); err != nil { + ctx.ServerError("LoadPullRequest", err) + return + } + + pr := issue.PullRequest + + if err := pull_service.DownloadDiffOrPatch(pr, ctx, patch); err != nil { + ctx.ServerError("DownloadDiffOrPatch", err) + return + } +} + +// UpdatePullRequestTarget change pull request's target branch +func UpdatePullRequestTarget(ctx *context.Context) { + issue := GetActionIssue(ctx) + pr := issue.PullRequest + if ctx.Written() { + return + } + if !issue.IsPull { + ctx.Error(http.StatusNotFound) + return + } + + if !ctx.IsSigned || (!issue.IsPoster(ctx.User.ID) && !ctx.Repo.CanWriteIssuesOrPulls(issue.IsPull)) { + ctx.Error(http.StatusForbidden) + return + } + + targetBranch := ctx.FormTrim("target_branch") + if len(targetBranch) == 0 { + ctx.Error(http.StatusNoContent) + return + } + + if err := pull_service.ChangeTargetBranch(pr, ctx.User, targetBranch); err != nil { + if models.IsErrPullRequestAlreadyExists(err) { + err := err.(models.ErrPullRequestAlreadyExists) + + RepoRelPath := ctx.Repo.Owner.Name + "/" + ctx.Repo.Repository.Name + errorMessage := ctx.Tr("repo.pulls.has_pull_request", ctx.Repo.RepoLink, RepoRelPath, err.IssueID) + + ctx.Flash.Error(errorMessage) + ctx.JSON(http.StatusConflict, map[string]interface{}{ + "error": err.Error(), + "user_error": errorMessage, + }) + } else if models.IsErrIssueIsClosed(err) { + errorMessage := ctx.Tr("repo.pulls.is_closed") + + ctx.Flash.Error(errorMessage) + ctx.JSON(http.StatusConflict, map[string]interface{}{ + "error": err.Error(), + "user_error": errorMessage, + }) + } else if models.IsErrPullRequestHasMerged(err) { + errorMessage := ctx.Tr("repo.pulls.has_merged") + + ctx.Flash.Error(errorMessage) + ctx.JSON(http.StatusConflict, map[string]interface{}{ + "error": err.Error(), + "user_error": errorMessage, + }) + } else if models.IsErrBranchesEqual(err) { + errorMessage := ctx.Tr("repo.pulls.nothing_to_compare") + + ctx.Flash.Error(errorMessage) + ctx.JSON(http.StatusBadRequest, map[string]interface{}{ + "error": err.Error(), + "user_error": errorMessage, + }) + } else { + ctx.ServerError("UpdatePullRequestTarget", err) + } + return + } + notification.NotifyPullRequestChangeTargetBranch(ctx.User, pr, targetBranch) + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "base_branch": pr.BaseBranch, + }) +} diff --git a/routers/repo/pull_review.go b/routers/web/repo/pull_review.go similarity index 81% rename from routers/repo/pull_review.go rename to routers/web/repo/pull_review.go index 0bacc6823..257aa737f 100644 --- a/routers/repo/pull_review.go +++ b/routers/web/repo/pull_review.go @@ -6,12 +6,15 @@ package repo import ( "fmt" + "net/http" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" pull_service "code.gitea.io/gitea/services/pull" ) @@ -40,11 +43,12 @@ func RenderNewCodeCommentForm(ctx *context.Context) { return } ctx.Data["AfterCommitID"] = pullHeadCommitID - ctx.HTML(200, tplNewComment) + ctx.HTML(http.StatusOK, tplNewComment) } // CreateCodeComment will create a code comment including an pending review if required -func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) { +func CreateCodeComment(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CodeCommentForm) issue := GetActionIssue(ctx) if !issue.IsPull { return @@ -97,9 +101,9 @@ func CreateCodeComment(ctx *context.Context, form auth.CodeCommentForm) { // UpdateResolveConversation add or remove an Conversation resolved mark func UpdateResolveConversation(ctx *context.Context) { - origin := ctx.Query("origin") - action := ctx.Query("action") - commentID := ctx.QueryInt64("comment_id") + origin := ctx.FormString("origin") + action := ctx.FormString("action") + commentID := ctx.FormInt64("comment_id") comment, err := models.GetCommentByID(commentID) if err != nil { @@ -118,12 +122,12 @@ func UpdateResolveConversation(ctx *context.Context) { return } if !permResult { - ctx.Error(403) + ctx.Error(http.StatusForbidden) return } if !comment.Issue.IsPull { - ctx.Error(400) + ctx.Error(http.StatusBadRequest) return } @@ -134,7 +138,7 @@ func UpdateResolveConversation(ctx *context.Context) { return } } else { - ctx.Error(400) + ctx.Error(http.StatusBadRequest) return } @@ -142,7 +146,7 @@ func UpdateResolveConversation(ctx *context.Context) { renderConversation(ctx, comment) return } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "ok": true, }) } @@ -167,11 +171,12 @@ func renderConversation(ctx *context.Context, comment *models.Comment) { return } ctx.Data["AfterCommitID"] = pullHeadCommitID - ctx.HTML(200, tplConversation) + ctx.HTML(http.StatusOK, tplConversation) } // SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist -func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) { +func SubmitReview(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.SubmitReviewForm) issue := GetActionIssue(ctx) if !issue.IsPull { return @@ -207,7 +212,12 @@ func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) { } } - _, comm, err := pull_service.SubmitReview(ctx.User, ctx.Repo.GitRepo, issue, reviewType, form.Content, form.CommitID) + var attachments []string + if setting.Attachment.Enabled { + attachments = form.Files + } + + _, comm, err := pull_service.SubmitReview(ctx.User, ctx.Repo.GitRepo, issue, reviewType, form.Content, form.CommitID, attachments) if err != nil { if models.IsContentEmptyErr(err) { ctx.Flash.Error(ctx.Tr("repo.issues.review.content.empty")) @@ -220,3 +230,15 @@ func SubmitReview(ctx *context.Context, form auth.SubmitReviewForm) { ctx.Redirect(fmt.Sprintf("%s/pulls/%d#%s", ctx.Repo.RepoLink, issue.Index, comm.HashTag())) } + +// DismissReview dismissing stale review by repo admin +func DismissReview(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.DismissReviewForm) + comm, err := pull_service.DismissReview(form.ReviewID, form.Message, ctx.User, true) + if err != nil { + ctx.ServerError("pull_service.DismissReview", err) + return + } + + ctx.Redirect(fmt.Sprintf("%s/pulls/%d#%s", ctx.Repo.RepoLink, comm.Issue.Index, comm.HashTag())) +} diff --git a/routers/web/repo/release.go b/routers/web/repo/release.go new file mode 100644 index 000000000..ef98790f5 --- /dev/null +++ b/routers/web/repo/release.go @@ -0,0 +1,538 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "fmt" + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/upload" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" + releaseservice "code.gitea.io/gitea/services/release" +) + +const ( + tplReleases base.TplName = "repo/release/list" + tplReleaseNew base.TplName = "repo/release/new" +) + +// calReleaseNumCommitsBehind calculates given release has how many commits behind release target. +func calReleaseNumCommitsBehind(repoCtx *context.Repository, release *models.Release, countCache map[string]int64) error { + // Fast return if release target is same as default branch. + if repoCtx.BranchName == release.Target { + release.NumCommitsBehind = repoCtx.CommitsCount - release.NumCommits + return nil + } + + // Get count if not exists + if _, ok := countCache[release.Target]; !ok { + if repoCtx.GitRepo.IsBranchExist(release.Target) { + commit, err := repoCtx.GitRepo.GetBranchCommit(release.Target) + if err != nil { + return fmt.Errorf("GetBranchCommit: %v", err) + } + countCache[release.Target], err = commit.CommitsCount() + if err != nil { + return fmt.Errorf("CommitsCount: %v", err) + } + } else { + // Use NumCommits of the newest release on that target + countCache[release.Target] = release.NumCommits + } + } + release.NumCommitsBehind = countCache[release.Target] - release.NumCommits + return nil +} + +// Releases render releases list page +func Releases(ctx *context.Context) { + releasesOrTags(ctx, false) +} + +// TagsList render tags list page +func TagsList(ctx *context.Context) { + releasesOrTags(ctx, true) +} + +func releasesOrTags(ctx *context.Context, isTagList bool) { + ctx.Data["PageIsReleaseList"] = true + ctx.Data["DefaultBranch"] = ctx.Repo.Repository.DefaultBranch + ctx.Data["IsViewBranch"] = false + ctx.Data["IsViewTag"] = true + // Disable the showCreateNewBranch form in the dropdown on this page. + ctx.Data["CanCreateBranch"] = false + ctx.Data["HideBranchesInDropdown"] = true + + if isTagList { + ctx.Data["Title"] = ctx.Tr("repo.release.tags") + ctx.Data["PageIsTagList"] = true + } else { + ctx.Data["Title"] = ctx.Tr("repo.release.releases") + ctx.Data["PageIsTagList"] = false + } + + tags, err := ctx.Repo.GitRepo.GetTags() + if err != nil { + ctx.ServerError("GetTags", err) + return + } + ctx.Data["Tags"] = tags + + writeAccess := ctx.Repo.CanWrite(models.UnitTypeReleases) + ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived + limit := ctx.FormInt("limit") + if limit == 0 { + limit = setting.Repository.Release.DefaultPagingNum + } + if limit > setting.API.MaxResponseItems { + limit = setting.API.MaxResponseItems + } + + opts := models.FindReleasesOptions{ + ListOptions: models.ListOptions{ + Page: ctx.FormInt("page"), + PageSize: limit, + }, + IncludeDrafts: writeAccess && !isTagList, + IncludeTags: isTagList, + } + + releases, err := models.GetReleasesByRepoID(ctx.Repo.Repository.ID, opts) + if err != nil { + ctx.ServerError("GetReleasesByRepoID", err) + return + } + + count, err := models.GetReleaseCountByRepoID(ctx.Repo.Repository.ID, opts) + if err != nil { + ctx.ServerError("GetReleaseCountByRepoID", err) + return + } + + if err = models.GetReleaseAttachments(releases...); err != nil { + ctx.ServerError("GetReleaseAttachments", err) + return + } + + // Temporary cache commits count of used branches to speed up. + countCache := make(map[string]int64) + cacheUsers := make(map[int64]*models.User) + if ctx.User != nil { + cacheUsers[ctx.User.ID] = ctx.User + } + var ok bool + + for _, r := range releases { + if r.Publisher, ok = cacheUsers[r.PublisherID]; !ok { + r.Publisher, err = models.GetUserByID(r.PublisherID) + if err != nil { + if models.IsErrUserNotExist(err) { + r.Publisher = models.NewGhostUser() + } else { + ctx.ServerError("GetUserByID", err) + return + } + } + cacheUsers[r.PublisherID] = r.Publisher + } + + r.Note, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, r.Note) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + + if r.IsDraft { + continue + } + + if err := calReleaseNumCommitsBehind(ctx.Repo, r, countCache); err != nil { + ctx.ServerError("calReleaseNumCommitsBehind", err) + return + } + } + + ctx.Data["Releases"] = releases + ctx.Data["ReleasesNum"] = len(releases) + + pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplReleases) +} + +// SingleRelease renders a single release's page +func SingleRelease(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.release.releases") + ctx.Data["PageIsReleaseList"] = true + + writeAccess := ctx.Repo.CanWrite(models.UnitTypeReleases) + ctx.Data["CanCreateRelease"] = writeAccess && !ctx.Repo.Repository.IsArchived + + release, err := models.GetRelease(ctx.Repo.Repository.ID, ctx.Params("*")) + if err != nil { + if models.IsErrReleaseNotExist(err) { + ctx.NotFound("GetRelease", err) + return + } + ctx.ServerError("GetReleasesByRepoID", err) + return + } + + err = models.GetReleaseAttachments(release) + if err != nil { + ctx.ServerError("GetReleaseAttachments", err) + return + } + + release.Publisher, err = models.GetUserByID(release.PublisherID) + if err != nil { + if models.IsErrUserNotExist(err) { + release.Publisher = models.NewGhostUser() + } else { + ctx.ServerError("GetUserByID", err) + return + } + } + if !release.IsDraft { + if err := calReleaseNumCommitsBehind(ctx.Repo, release, make(map[string]int64)); err != nil { + ctx.ServerError("calReleaseNumCommitsBehind", err) + return + } + } + release.Note, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeMetas(), + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, release.Note) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + + ctx.Data["Releases"] = []*models.Release{release} + ctx.HTML(http.StatusOK, tplReleases) +} + +// LatestRelease redirects to the latest release +func LatestRelease(ctx *context.Context) { + release, err := models.GetLatestReleaseByRepoID(ctx.Repo.Repository.ID) + if err != nil { + if models.IsErrReleaseNotExist(err) { + ctx.NotFound("LatestRelease", err) + return + } + ctx.ServerError("GetLatestReleaseByRepoID", err) + return + } + + if err := release.LoadAttributes(); err != nil { + ctx.ServerError("LoadAttributes", err) + return + } + + ctx.Redirect(release.HTMLURL()) +} + +// NewRelease render creating or edit release page +func NewRelease(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.release.new_release") + ctx.Data["PageIsReleaseList"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true + ctx.Data["tag_target"] = ctx.Repo.Repository.DefaultBranch + if tagName := ctx.FormString("tag"); len(tagName) > 0 { + rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) + if err != nil && !models.IsErrReleaseNotExist(err) { + ctx.ServerError("GetRelease", err) + return + } + + if rel != nil { + rel.Repo = ctx.Repo.Repository + if err := rel.LoadAttributes(); err != nil { + ctx.ServerError("LoadAttributes", err) + return + } + + ctx.Data["tag_name"] = rel.TagName + ctx.Data["tag_target"] = rel.Target + ctx.Data["title"] = rel.Title + ctx.Data["content"] = rel.Note + ctx.Data["attachments"] = rel.Attachments + } + } + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "release") + ctx.HTML(http.StatusOK, tplReleaseNew) +} + +// NewReleasePost response for creating a release +func NewReleasePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewReleaseForm) + ctx.Data["Title"] = ctx.Tr("repo.release.new_release") + ctx.Data["PageIsReleaseList"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplReleaseNew) + return + } + + if !ctx.Repo.GitRepo.IsBranchExist(form.Target) { + ctx.RenderWithErr(ctx.Tr("form.target_branch_not_exist"), tplReleaseNew, &form) + return + } + + var attachmentUUIDs []string + if setting.Attachment.Enabled { + attachmentUUIDs = form.Files + } + + rel, err := models.GetRelease(ctx.Repo.Repository.ID, form.TagName) + if err != nil { + if !models.IsErrReleaseNotExist(err) { + ctx.ServerError("GetRelease", err) + return + } + + msg := "" + if len(form.Title) > 0 && form.AddTagMsg { + msg = form.Title + "\n\n" + form.Content + } + + if len(form.TagOnly) > 0 { + if err = releaseservice.CreateNewTag(ctx.User, ctx.Repo.Repository, form.Target, form.TagName, msg); err != nil { + if models.IsErrTagAlreadyExists(err) { + e := err.(models.ErrTagAlreadyExists) + ctx.Flash.Error(ctx.Tr("repo.branch.tag_collision", e.TagName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + + if models.IsErrInvalidTagName(err) { + ctx.Flash.Error(ctx.Tr("repo.release.tag_name_invalid")) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + + if models.IsErrProtectedTagName(err) { + ctx.Flash.Error(ctx.Tr("repo.release.tag_name_protected")) + ctx.Redirect(ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()) + return + } + + ctx.ServerError("releaseservice.CreateNewTag", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.tag.create_success", form.TagName)) + ctx.Redirect(ctx.Repo.RepoLink + "/src/tag/" + form.TagName) + return + } + + rel = &models.Release{ + RepoID: ctx.Repo.Repository.ID, + Repo: ctx.Repo.Repository, + PublisherID: ctx.User.ID, + Publisher: ctx.User, + Title: form.Title, + TagName: form.TagName, + Target: form.Target, + Note: form.Content, + IsDraft: len(form.Draft) > 0, + IsPrerelease: form.Prerelease, + IsTag: false, + } + + if err = releaseservice.CreateRelease(ctx.Repo.GitRepo, rel, attachmentUUIDs, msg); err != nil { + ctx.Data["Err_TagName"] = true + switch { + case models.IsErrReleaseAlreadyExist(err): + ctx.RenderWithErr(ctx.Tr("repo.release.tag_name_already_exist"), tplReleaseNew, &form) + case models.IsErrInvalidTagName(err): + ctx.RenderWithErr(ctx.Tr("repo.release.tag_name_invalid"), tplReleaseNew, &form) + case models.IsErrProtectedTagName(err): + ctx.RenderWithErr(ctx.Tr("repo.release.tag_name_protected"), tplReleaseNew, &form) + default: + ctx.ServerError("CreateRelease", err) + } + return + } + } else { + if !rel.IsTag { + ctx.Data["Err_TagName"] = true + ctx.RenderWithErr(ctx.Tr("repo.release.tag_name_already_exist"), tplReleaseNew, &form) + return + } + + rel.Title = form.Title + rel.Note = form.Content + rel.Target = form.Target + rel.IsDraft = len(form.Draft) > 0 + rel.IsPrerelease = form.Prerelease + rel.PublisherID = ctx.User.ID + rel.IsTag = false + + if err = releaseservice.UpdateRelease(ctx.User, ctx.Repo.GitRepo, rel, attachmentUUIDs, nil, nil); err != nil { + ctx.Data["Err_TagName"] = true + ctx.ServerError("UpdateRelease", err) + return + } + } + log.Trace("Release created: %s/%s:%s", ctx.User.LowerName, ctx.Repo.Repository.Name, form.TagName) + + ctx.Redirect(ctx.Repo.RepoLink + "/releases") +} + +// EditRelease render release edit page +func EditRelease(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.release.edit_release") + ctx.Data["PageIsReleaseList"] = true + ctx.Data["PageIsEditRelease"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true + ctx.Data["IsAttachmentEnabled"] = setting.Attachment.Enabled + upload.AddUploadContext(ctx, "release") + + tagName := ctx.Params("*") + rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) + if err != nil { + if models.IsErrReleaseNotExist(err) { + ctx.NotFound("GetRelease", err) + } else { + ctx.ServerError("GetRelease", err) + } + return + } + ctx.Data["ID"] = rel.ID + ctx.Data["tag_name"] = rel.TagName + ctx.Data["tag_target"] = rel.Target + ctx.Data["title"] = rel.Title + ctx.Data["content"] = rel.Note + ctx.Data["prerelease"] = rel.IsPrerelease + ctx.Data["IsDraft"] = rel.IsDraft + + rel.Repo = ctx.Repo.Repository + if err := rel.LoadAttributes(); err != nil { + ctx.ServerError("LoadAttributes", err) + return + } + ctx.Data["attachments"] = rel.Attachments + + ctx.HTML(http.StatusOK, tplReleaseNew) +} + +// EditReleasePost response for edit release +func EditReleasePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditReleaseForm) + ctx.Data["Title"] = ctx.Tr("repo.release.edit_release") + ctx.Data["PageIsReleaseList"] = true + ctx.Data["PageIsEditRelease"] = true + ctx.Data["RequireSimpleMDE"] = true + ctx.Data["RequireTribute"] = true + + tagName := ctx.Params("*") + rel, err := models.GetRelease(ctx.Repo.Repository.ID, tagName) + if err != nil { + if models.IsErrReleaseNotExist(err) { + ctx.NotFound("GetRelease", err) + } else { + ctx.ServerError("GetRelease", err) + } + return + } + if rel.IsTag { + ctx.NotFound("GetRelease", err) + return + } + ctx.Data["tag_name"] = rel.TagName + ctx.Data["tag_target"] = rel.Target + ctx.Data["title"] = rel.Title + ctx.Data["content"] = rel.Note + ctx.Data["prerelease"] = rel.IsPrerelease + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplReleaseNew) + return + } + + const delPrefix = "attachment-del-" + const editPrefix = "attachment-edit-" + var addAttachmentUUIDs, delAttachmentUUIDs []string + var editAttachments = make(map[string]string) // uuid -> new name + if setting.Attachment.Enabled { + addAttachmentUUIDs = form.Files + for k, v := range ctx.Req.Form { + if strings.HasPrefix(k, delPrefix) && v[0] == "true" { + delAttachmentUUIDs = append(delAttachmentUUIDs, k[len(delPrefix):]) + } else if strings.HasPrefix(k, editPrefix) { + editAttachments[k[len(editPrefix):]] = v[0] + } + } + } + + rel.Title = form.Title + rel.Note = form.Content + rel.IsDraft = len(form.Draft) > 0 + rel.IsPrerelease = form.Prerelease + if err = releaseservice.UpdateRelease(ctx.User, ctx.Repo.GitRepo, + rel, addAttachmentUUIDs, delAttachmentUUIDs, editAttachments); err != nil { + ctx.ServerError("UpdateRelease", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/releases") +} + +// DeleteRelease delete a release +func DeleteRelease(ctx *context.Context) { + deleteReleaseOrTag(ctx, false) +} + +// DeleteTag delete a tag +func DeleteTag(ctx *context.Context) { + deleteReleaseOrTag(ctx, true) +} + +func deleteReleaseOrTag(ctx *context.Context, isDelTag bool) { + if err := releaseservice.DeleteReleaseByID(ctx.FormInt64("id"), ctx.User, isDelTag); err != nil { + ctx.Flash.Error("DeleteReleaseByID: " + err.Error()) + } else { + if isDelTag { + ctx.Flash.Success(ctx.Tr("repo.release.deletion_tag_success")) + } else { + ctx.Flash.Success(ctx.Tr("repo.release.deletion_success")) + } + } + + if isDelTag { + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/tags", + }) + return + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/releases", + }) +} diff --git a/routers/repo/release_test.go b/routers/web/repo/release_test.go similarity index 84% rename from routers/repo/release_test.go rename to routers/web/repo/release_test.go index 47d1a89b5..004a6ef54 100644 --- a/routers/repo/release_test.go +++ b/routers/web/repo/release_test.go @@ -8,8 +8,9 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" ) func TestNewReleasePost(t *testing.T) { @@ -17,13 +18,13 @@ func TestNewReleasePost(t *testing.T) { RepoID int64 UserID int64 TagName string - Form auth.NewReleaseForm + Form forms.NewReleaseForm }{ { RepoID: 1, UserID: 2, TagName: "v1.1", // pre-existing tag - Form: auth.NewReleaseForm{ + Form: forms.NewReleaseForm{ TagName: "newtag", Target: "master", Title: "title", @@ -34,7 +35,7 @@ func TestNewReleasePost(t *testing.T) { RepoID: 1, UserID: 2, TagName: "newtag", - Form: auth.NewReleaseForm{ + Form: forms.NewReleaseForm{ TagName: "newtag", Target: "master", Title: "title", @@ -48,7 +49,8 @@ func TestNewReleasePost(t *testing.T) { test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 1) test.LoadGitRepo(t, ctx) - NewReleasePost(ctx, testCase.Form) + web.SetForm(ctx, &testCase.Form) + NewReleasePost(ctx) models.AssertExistsAndLoadBean(t, &models.Release{ RepoID: 1, PublisherID: 2, diff --git a/routers/web/repo/repo.go b/routers/web/repo/repo.go new file mode 100644 index 000000000..98f60c6b5 --- /dev/null +++ b/routers/web/repo/repo.go @@ -0,0 +1,488 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "errors" + "fmt" + "net/http" + "strings" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/modules/web" + archiver_service "code.gitea.io/gitea/services/archiver" + "code.gitea.io/gitea/services/forms" + repo_service "code.gitea.io/gitea/services/repository" +) + +const ( + tplCreate base.TplName = "repo/create" + tplAlertDetails base.TplName = "base/alert_details" +) + +// MustBeNotEmpty render when a repo is a empty git dir +func MustBeNotEmpty(ctx *context.Context) { + if ctx.Repo.Repository.IsEmpty { + ctx.NotFound("MustBeNotEmpty", nil) + } +} + +// MustBeEditable check that repo can be edited +func MustBeEditable(ctx *context.Context) { + if !ctx.Repo.Repository.CanEnableEditor() || ctx.Repo.IsViewCommit { + ctx.NotFound("", nil) + return + } +} + +// MustBeAbleToUpload check that repo can be uploaded to +func MustBeAbleToUpload(ctx *context.Context) { + if !setting.Repository.Upload.Enabled { + ctx.NotFound("", nil) + } +} + +func checkContextUser(ctx *context.Context, uid int64) *models.User { + orgs, err := models.GetOrgsCanCreateRepoByUserID(ctx.User.ID) + if err != nil { + ctx.ServerError("GetOrgsCanCreateRepoByUserID", err) + return nil + } + + if !ctx.User.IsAdmin { + orgsAvailable := []*models.User{} + for i := 0; i < len(orgs); i++ { + if orgs[i].CanCreateRepo() { + orgsAvailable = append(orgsAvailable, orgs[i]) + } + } + ctx.Data["Orgs"] = orgsAvailable + } else { + ctx.Data["Orgs"] = orgs + } + + // Not equal means current user is an organization. + if uid == ctx.User.ID || uid == 0 { + return ctx.User + } + + org, err := models.GetUserByID(uid) + if models.IsErrUserNotExist(err) { + return ctx.User + } + + if err != nil { + ctx.ServerError("GetUserByID", fmt.Errorf("[%d]: %v", uid, err)) + return nil + } + + // Check ownership of organization. + if !org.IsOrganization() { + ctx.Error(http.StatusForbidden) + return nil + } + if !ctx.User.IsAdmin { + canCreate, err := org.CanCreateOrgRepo(ctx.User.ID) + if err != nil { + ctx.ServerError("CanCreateOrgRepo", err) + return nil + } else if !canCreate { + ctx.Error(http.StatusForbidden) + return nil + } + } else { + ctx.Data["Orgs"] = orgs + } + return org +} + +func getRepoPrivate(ctx *context.Context) bool { + switch strings.ToLower(setting.Repository.DefaultPrivate) { + case setting.RepoCreatingLastUserVisibility: + return ctx.User.LastRepoVisibility + case setting.RepoCreatingPrivate: + return true + case setting.RepoCreatingPublic: + return false + default: + return ctx.User.LastRepoVisibility + } +} + +// Create render creating repository page +func Create(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("new_repo") + + // Give default value for template to render. + ctx.Data["Gitignores"] = models.Gitignores + ctx.Data["LabelTemplates"] = models.LabelTemplates + ctx.Data["Licenses"] = models.Licenses + ctx.Data["Readmes"] = models.Readmes + ctx.Data["readme"] = "Default" + ctx.Data["private"] = getRepoPrivate(ctx) + ctx.Data["IsForcedPrivate"] = setting.Repository.ForcePrivate + ctx.Data["default_branch"] = setting.Repository.DefaultBranch + + ctxUser := checkContextUser(ctx, ctx.FormInt64("org")) + if ctx.Written() { + return + } + ctx.Data["ContextUser"] = ctxUser + + ctx.Data["repo_template_name"] = ctx.Tr("repo.template_select") + templateID := ctx.FormInt64("template_id") + if templateID > 0 { + templateRepo, err := models.GetRepositoryByID(templateID) + if err == nil && templateRepo.CheckUnitUser(ctxUser, models.UnitTypeCode) { + ctx.Data["repo_template"] = templateID + ctx.Data["repo_template_name"] = templateRepo.Name + } + } + + ctx.Data["CanCreateRepo"] = ctx.User.CanCreateRepo() + ctx.Data["MaxCreationLimit"] = ctx.User.MaxCreationLimit() + + ctx.HTML(http.StatusOK, tplCreate) +} + +func handleCreateError(ctx *context.Context, owner *models.User, err error, name string, tpl base.TplName, form interface{}) { + switch { + case models.IsErrReachLimitOfRepo(err): + ctx.RenderWithErr(ctx.Tr("repo.form.reach_limit_of_creation", owner.MaxCreationLimit()), tpl, form) + case models.IsErrRepoAlreadyExist(err): + ctx.Data["Err_RepoName"] = true + ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tpl, form) + case models.IsErrRepoFilesAlreadyExist(err): + ctx.Data["Err_RepoName"] = true + switch { + case ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories): + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt_or_delete"), tpl, form) + case setting.Repository.AllowAdoptionOfUnadoptedRepositories: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt"), tpl, form) + case setting.Repository.AllowDeleteOfUnadoptedRepositories: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.delete"), tpl, form) + default: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist"), tpl, form) + } + case models.IsErrNameReserved(err): + ctx.Data["Err_RepoName"] = true + ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tpl, form) + case models.IsErrNamePatternNotAllowed(err): + ctx.Data["Err_RepoName"] = true + ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tpl, form) + default: + ctx.ServerError(name, err) + } +} + +// CreatePost response for creating repository +func CreatePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.CreateRepoForm) + ctx.Data["Title"] = ctx.Tr("new_repo") + + ctx.Data["Gitignores"] = models.Gitignores + ctx.Data["LabelTemplates"] = models.LabelTemplates + ctx.Data["Licenses"] = models.Licenses + ctx.Data["Readmes"] = models.Readmes + + ctx.Data["CanCreateRepo"] = ctx.User.CanCreateRepo() + ctx.Data["MaxCreationLimit"] = ctx.User.MaxCreationLimit() + + ctxUser := checkContextUser(ctx, form.UID) + if ctx.Written() { + return + } + ctx.Data["ContextUser"] = ctxUser + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplCreate) + return + } + + var repo *models.Repository + var err error + if form.RepoTemplate > 0 { + opts := models.GenerateRepoOptions{ + Name: form.RepoName, + Description: form.Description, + Private: form.Private, + GitContent: form.GitContent, + Topics: form.Topics, + GitHooks: form.GitHooks, + Webhooks: form.Webhooks, + Avatar: form.Avatar, + IssueLabels: form.Labels, + } + + if !opts.IsValid() { + ctx.RenderWithErr(ctx.Tr("repo.template.one_item"), tplCreate, form) + return + } + + templateRepo := getRepository(ctx, form.RepoTemplate) + if ctx.Written() { + return + } + + if !templateRepo.IsTemplate { + ctx.RenderWithErr(ctx.Tr("repo.template.invalid"), tplCreate, form) + return + } + + repo, err = repo_service.GenerateRepository(ctx.User, ctxUser, templateRepo, opts) + if err == nil { + log.Trace("Repository generated [%d]: %s/%s", repo.ID, ctxUser.Name, repo.Name) + ctx.Redirect(ctxUser.HomeLink() + "/" + repo.Name) + return + } + } else { + repo, err = repo_service.CreateRepository(ctx.User, ctxUser, models.CreateRepoOptions{ + Name: form.RepoName, + Description: form.Description, + Gitignores: form.Gitignores, + IssueLabels: form.IssueLabels, + License: form.License, + Readme: form.Readme, + IsPrivate: form.Private || setting.Repository.ForcePrivate, + DefaultBranch: form.DefaultBranch, + AutoInit: form.AutoInit, + IsTemplate: form.Template, + TrustModel: models.ToTrustModel(form.TrustModel), + }) + if err == nil { + log.Trace("Repository created [%d]: %s/%s", repo.ID, ctxUser.Name, repo.Name) + ctx.Redirect(ctxUser.HomeLink() + "/" + repo.Name) + return + } + } + + handleCreateError(ctx, ctxUser, err, "CreatePost", tplCreate, &form) +} + +// Action response for actions to a repository +func Action(ctx *context.Context) { + var err error + switch ctx.Params(":action") { + case "watch": + err = models.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, true) + case "unwatch": + err = models.WatchRepo(ctx.User.ID, ctx.Repo.Repository.ID, false) + case "star": + err = models.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, true) + case "unstar": + err = models.StarRepo(ctx.User.ID, ctx.Repo.Repository.ID, false) + case "accept_transfer": + err = acceptOrRejectRepoTransfer(ctx, true) + case "reject_transfer": + err = acceptOrRejectRepoTransfer(ctx, false) + case "desc": // FIXME: this is not used + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusNotFound) + return + } + + ctx.Repo.Repository.Description = ctx.FormString("desc") + ctx.Repo.Repository.Website = ctx.FormString("site") + err = models.UpdateRepository(ctx.Repo.Repository, false) + } + + if err != nil { + ctx.ServerError(fmt.Sprintf("Action (%s)", ctx.Params(":action")), err) + return + } + + ctx.RedirectToFirst(ctx.FormString("redirect_to"), ctx.Repo.RepoLink) +} + +func acceptOrRejectRepoTransfer(ctx *context.Context, accept bool) error { + repoTransfer, err := models.GetPendingRepositoryTransfer(ctx.Repo.Repository) + if err != nil { + return err + } + + if err := repoTransfer.LoadAttributes(); err != nil { + return err + } + + if !repoTransfer.CanUserAcceptTransfer(ctx.User) { + return errors.New("user does not have enough permissions") + } + + if accept { + if err := repo_service.TransferOwnership(repoTransfer.Doer, repoTransfer.Recipient, ctx.Repo.Repository, repoTransfer.Teams); err != nil { + return err + } + ctx.Flash.Success(ctx.Tr("repo.settings.transfer.success")) + } else { + if err := models.CancelRepositoryTransfer(ctx.Repo.Repository); err != nil { + return err + } + ctx.Flash.Success(ctx.Tr("repo.settings.transfer.rejected")) + } + + ctx.Redirect(ctx.Repo.Repository.HTMLURL()) + return nil +} + +// RedirectDownload return a file based on the following infos: +func RedirectDownload(ctx *context.Context) { + var ( + vTag = ctx.Params("vTag") + fileName = ctx.Params("fileName") + ) + tagNames := []string{vTag} + curRepo := ctx.Repo.Repository + releases, err := models.GetReleasesByRepoIDAndNames(models.DefaultDBContext(), curRepo.ID, tagNames) + if err != nil { + if models.IsErrAttachmentNotExist(err) { + ctx.Error(http.StatusNotFound) + return + } + ctx.ServerError("RedirectDownload", err) + return + } + if len(releases) == 1 { + release := releases[0] + att, err := models.GetAttachmentByReleaseIDFileName(release.ID, fileName) + if err != nil { + ctx.Error(http.StatusNotFound) + return + } + if att != nil { + ctx.Redirect(att.DownloadURL()) + return + } + } + ctx.Error(http.StatusNotFound) +} + +// Download an archive of a repository +func Download(ctx *context.Context) { + uri := ctx.Params("*") + aReq, err := archiver_service.NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, uri) + if err != nil { + ctx.ServerError("archiver_service.NewRequest", err) + return + } + if aReq == nil { + ctx.Error(http.StatusNotFound) + return + } + + archiver, err := models.GetRepoArchiver(models.DefaultDBContext(), aReq.RepoID, aReq.Type, aReq.CommitID) + if err != nil { + ctx.ServerError("models.GetRepoArchiver", err) + return + } + if archiver != nil && archiver.Status == models.RepoArchiverReady { + download(ctx, aReq.GetArchiveName(), archiver) + return + } + + if err := archiver_service.StartArchive(aReq); err != nil { + ctx.ServerError("archiver_service.StartArchive", err) + return + } + + var times int + var t = time.NewTicker(time.Second * 1) + defer t.Stop() + + for { + select { + case <-graceful.GetManager().HammerContext().Done(): + log.Warn("exit archive download because system stop") + return + case <-t.C: + if times > 20 { + ctx.ServerError("wait download timeout", nil) + return + } + times++ + archiver, err = models.GetRepoArchiver(models.DefaultDBContext(), aReq.RepoID, aReq.Type, aReq.CommitID) + if err != nil { + ctx.ServerError("archiver_service.StartArchive", err) + return + } + if archiver != nil && archiver.Status == models.RepoArchiverReady { + download(ctx, aReq.GetArchiveName(), archiver) + return + } + } + } +} + +func download(ctx *context.Context, archiveName string, archiver *models.RepoArchiver) { + downloadName := ctx.Repo.Repository.Name + "-" + archiveName + + rPath, err := archiver.RelativePath() + if err != nil { + ctx.ServerError("archiver.RelativePath", err) + return + } + + if setting.RepoArchive.ServeDirect { + //If we have a signed url (S3, object storage), redirect to this directly. + u, err := storage.RepoArchives.URL(rPath, downloadName) + if u != nil && err == nil { + ctx.Redirect(u.String()) + return + } + } + + //If we have matched and access to release or issue + fr, err := storage.RepoArchives.Open(rPath) + if err != nil { + ctx.ServerError("Open", err) + return + } + defer fr.Close() + ctx.ServeStream(fr, downloadName) +} + +// InitiateDownload will enqueue an archival request, as needed. It may submit +// a request that's already in-progress, but the archiver service will just +// kind of drop it on the floor if this is the case. +func InitiateDownload(ctx *context.Context) { + uri := ctx.Params("*") + aReq, err := archiver_service.NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, uri) + if err != nil { + ctx.ServerError("archiver_service.NewRequest", err) + return + } + if aReq == nil { + ctx.Error(http.StatusNotFound) + return + } + + archiver, err := models.GetRepoArchiver(models.DefaultDBContext(), aReq.RepoID, aReq.Type, aReq.CommitID) + if err != nil { + ctx.ServerError("archiver_service.StartArchive", err) + return + } + if archiver == nil || archiver.Status != models.RepoArchiverReady { + if err := archiver_service.StartArchive(aReq); err != nil { + ctx.ServerError("archiver_service.StartArchive", err) + return + } + } + + var completed bool + if archiver != nil && archiver.Status == models.RepoArchiverReady { + completed = true + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "complete": completed, + }) +} diff --git a/routers/web/repo/search.go b/routers/web/repo/search.go new file mode 100644 index 000000000..67539c3d7 --- /dev/null +++ b/routers/web/repo/search.go @@ -0,0 +1,54 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "net/http" + + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + code_indexer "code.gitea.io/gitea/modules/indexer/code" + "code.gitea.io/gitea/modules/setting" +) + +const tplSearch base.TplName = "repo/search" + +// Search render repository search page +func Search(ctx *context.Context) { + if !setting.Indexer.RepoIndexerEnabled { + ctx.Redirect(ctx.Repo.RepoLink, 302) + return + } + language := ctx.FormTrim("l") + keyword := ctx.FormTrim("q") + page := ctx.FormInt("page") + if page <= 0 { + page = 1 + } + queryType := ctx.FormTrim("t") + isMatch := queryType == "match" + + total, searchResults, searchResultLanguages, err := code_indexer.PerformSearch([]int64{ctx.Repo.Repository.ID}, + language, keyword, page, setting.UI.RepoSearchPagingNum, isMatch) + if err != nil { + ctx.ServerError("SearchResults", err) + return + } + ctx.Data["Keyword"] = keyword + ctx.Data["Language"] = language + ctx.Data["queryType"] = queryType + ctx.Data["SourcePath"] = ctx.Repo.Repository.HTMLURL() + ctx.Data["SearchResults"] = searchResults + ctx.Data["SearchResultLanguages"] = searchResultLanguages + ctx.Data["RequireHighlightJS"] = true + ctx.Data["PageIsViewCode"] = true + + pager := context.NewPagination(total, setting.UI.RepoSearchPagingNum, page, 5) + pager.SetDefaultParams(ctx) + pager.AddParam(ctx, "l", "Language") + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplSearch) +} diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go new file mode 100644 index 000000000..136e08cb4 --- /dev/null +++ b/routers/web/repo/setting.go @@ -0,0 +1,1164 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "errors" + "fmt" + "io/ioutil" + "net/http" + "strconv" + "strings" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/migrations" + "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/typesniffer" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/validation" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/utils" + "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/mailer" + mirror_service "code.gitea.io/gitea/services/mirror" + repo_service "code.gitea.io/gitea/services/repository" +) + +const ( + tplSettingsOptions base.TplName = "repo/settings/options" + tplCollaboration base.TplName = "repo/settings/collaboration" + tplBranches base.TplName = "repo/settings/branches" + tplTags base.TplName = "repo/settings/tags" + tplGithooks base.TplName = "repo/settings/githooks" + tplGithookEdit base.TplName = "repo/settings/githook_edit" + tplDeployKeys base.TplName = "repo/settings/deploy_keys" + tplProtectedBranch base.TplName = "repo/settings/protected_branch" +) + +// Settings show a repository's settings page +func Settings(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.settings") + ctx.Data["PageIsSettingsOptions"] = true + ctx.Data["ForcePrivate"] = setting.Repository.ForcePrivate + ctx.Data["DisabledMirrors"] = setting.Repository.DisableMirrors + ctx.Data["DefaultMirrorInterval"] = setting.Mirror.DefaultInterval + + signing, _ := models.SigningKey(ctx.Repo.Repository.RepoPath()) + ctx.Data["SigningKeyAvailable"] = len(signing) > 0 + ctx.Data["SigningSettings"] = setting.Repository.Signing + + ctx.HTML(http.StatusOK, tplSettingsOptions) +} + +// SettingsPost response for changes of a repository +func SettingsPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.RepoSettingForm) + ctx.Data["Title"] = ctx.Tr("repo.settings") + ctx.Data["PageIsSettingsOptions"] = true + + repo := ctx.Repo.Repository + + switch ctx.FormString("action") { + case "update": + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplSettingsOptions) + return + } + + newRepoName := form.RepoName + // Check if repository name has been changed. + if repo.LowerName != strings.ToLower(newRepoName) { + // Close the GitRepo if open + if ctx.Repo.GitRepo != nil { + ctx.Repo.GitRepo.Close() + ctx.Repo.GitRepo = nil + } + if err := repo_service.ChangeRepositoryName(ctx.User, repo, newRepoName); err != nil { + ctx.Data["Err_RepoName"] = true + switch { + case models.IsErrRepoAlreadyExist(err): + ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), tplSettingsOptions, &form) + case models.IsErrNameReserved(err): + ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), tplSettingsOptions, &form) + case models.IsErrRepoFilesAlreadyExist(err): + ctx.Data["Err_RepoName"] = true + switch { + case ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories): + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt_or_delete"), tplSettingsOptions, form) + case setting.Repository.AllowAdoptionOfUnadoptedRepositories: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.adopt"), tplSettingsOptions, form) + case setting.Repository.AllowDeleteOfUnadoptedRepositories: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist.delete"), tplSettingsOptions, form) + default: + ctx.RenderWithErr(ctx.Tr("form.repository_files_already_exist"), tplSettingsOptions, form) + } + case models.IsErrNamePatternNotAllowed(err): + ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tplSettingsOptions, &form) + default: + ctx.ServerError("ChangeRepositoryName", err) + } + return + } + + log.Trace("Repository name changed: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newRepoName) + } + // In case it's just a case change. + repo.Name = newRepoName + repo.LowerName = strings.ToLower(newRepoName) + repo.Description = form.Description + repo.Website = form.Website + repo.IsTemplate = form.Template + + // Visibility of forked repository is forced sync with base repository. + if repo.IsFork { + form.Private = repo.BaseRepo.IsPrivate || repo.BaseRepo.Owner.Visibility == structs.VisibleTypePrivate + } + + visibilityChanged := repo.IsPrivate != form.Private + // when ForcePrivate enabled, you could change public repo to private, but only admin users can change private to public + if visibilityChanged && setting.Repository.ForcePrivate && !form.Private && !ctx.User.IsAdmin { + ctx.ServerError("Force Private enabled", errors.New("cannot change private repository to public")) + return + } + + repo.IsPrivate = form.Private + if err := models.UpdateRepository(repo, visibilityChanged); err != nil { + ctx.ServerError("UpdateRepository", err) + return + } + log.Trace("Repository basic settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(repo.Link() + "/settings") + + case "mirror": + if !repo.IsMirror { + ctx.NotFound("", nil) + return + } + + // This section doesn't require repo_name/RepoName to be set in the form, don't show it + // as an error on the UI for this action + ctx.Data["Err_RepoName"] = nil + + interval, err := time.ParseDuration(form.Interval) + if err != nil || (interval != 0 && interval < setting.Mirror.MinInterval) { + ctx.Data["Err_Interval"] = true + ctx.RenderWithErr(ctx.Tr("repo.mirror_interval_invalid"), tplSettingsOptions, &form) + } else { + ctx.Repo.Mirror.EnablePrune = form.EnablePrune + ctx.Repo.Mirror.Interval = interval + if interval != 0 { + ctx.Repo.Mirror.NextUpdateUnix = timeutil.TimeStampNow().AddDuration(interval) + } else { + ctx.Repo.Mirror.NextUpdateUnix = 0 + } + if err := models.UpdateMirror(ctx.Repo.Mirror); err != nil { + ctx.Data["Err_Interval"] = true + ctx.RenderWithErr(ctx.Tr("repo.mirror_interval_invalid"), tplSettingsOptions, &form) + return + } + } + + u, _ := git.GetRemoteAddress(ctx.Repo.Repository.RepoPath(), ctx.Repo.Mirror.GetRemoteName()) + if u.User != nil && form.MirrorPassword == "" && form.MirrorUsername == u.User.Username() { + form.MirrorPassword, _ = u.User.Password() + } + + address, err := forms.ParseRemoteAddr(form.MirrorAddress, form.MirrorUsername, form.MirrorPassword) + if err == nil { + err = migrations.IsMigrateURLAllowed(address, ctx.User) + } + if err != nil { + ctx.Data["Err_MirrorAddress"] = true + handleSettingRemoteAddrError(ctx, err, form) + return + } + + if err := mirror_service.UpdateAddress(ctx.Repo.Mirror, address); err != nil { + ctx.ServerError("UpdateAddress", err) + return + } + + form.LFS = form.LFS && setting.LFS.StartServer + + if len(form.LFSEndpoint) > 0 { + ep := lfs.DetermineEndpoint("", form.LFSEndpoint) + if ep == nil { + ctx.Data["Err_LFSEndpoint"] = true + ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_lfs_endpoint"), tplSettingsOptions, &form) + return + } + err = migrations.IsMigrateURLAllowed(ep.String(), ctx.User) + if err != nil { + ctx.Data["Err_LFSEndpoint"] = true + handleSettingRemoteAddrError(ctx, err, form) + return + } + } + + ctx.Repo.Mirror.LFS = form.LFS + ctx.Repo.Mirror.LFSEndpoint = form.LFSEndpoint + if err := models.UpdateMirror(ctx.Repo.Mirror); err != nil { + ctx.ServerError("UpdateMirror", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(repo.Link() + "/settings") + + case "mirror-sync": + if !repo.IsMirror { + ctx.NotFound("", nil) + return + } + + mirror_service.StartToMirror(repo.ID) + + ctx.Flash.Info(ctx.Tr("repo.settings.mirror_sync_in_progress")) + ctx.Redirect(repo.Link() + "/settings") + + case "push-mirror-sync": + m, err := selectPushMirrorByForm(form, repo) + if err != nil { + ctx.NotFound("", nil) + return + } + + mirror_service.AddPushMirrorToQueue(m.ID) + + ctx.Flash.Info(ctx.Tr("repo.settings.mirror_sync_in_progress")) + ctx.Redirect(repo.Link() + "/settings") + + case "push-mirror-remove": + // This section doesn't require repo_name/RepoName to be set in the form, don't show it + // as an error on the UI for this action + ctx.Data["Err_RepoName"] = nil + + m, err := selectPushMirrorByForm(form, repo) + if err != nil { + ctx.NotFound("", nil) + return + } + + if err = mirror_service.RemovePushMirrorRemote(m); err != nil { + ctx.ServerError("RemovePushMirrorRemote", err) + return + } + + if err = models.DeletePushMirrorByID(m.ID); err != nil { + ctx.ServerError("DeletePushMirrorByID", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(repo.Link() + "/settings") + + case "push-mirror-add": + // This section doesn't require repo_name/RepoName to be set in the form, don't show it + // as an error on the UI for this action + ctx.Data["Err_RepoName"] = nil + + interval, err := time.ParseDuration(form.PushMirrorInterval) + if err != nil || (interval != 0 && interval < setting.Mirror.MinInterval) { + ctx.Data["Err_PushMirrorInterval"] = true + ctx.RenderWithErr(ctx.Tr("repo.mirror_interval_invalid"), tplSettingsOptions, &form) + return + } + + address, err := forms.ParseRemoteAddr(form.PushMirrorAddress, form.PushMirrorUsername, form.PushMirrorPassword) + if err == nil { + err = migrations.IsMigrateURLAllowed(address, ctx.User) + } + if err != nil { + ctx.Data["Err_PushMirrorAddress"] = true + handleSettingRemoteAddrError(ctx, err, form) + return + } + + remoteSuffix, err := util.RandomString(10) + if err != nil { + ctx.ServerError("RandomString", err) + return + } + + m := &models.PushMirror{ + RepoID: repo.ID, + Repo: repo, + RemoteName: fmt.Sprintf("remote_mirror_%s", remoteSuffix), + Interval: interval, + } + if err := models.InsertPushMirror(m); err != nil { + ctx.ServerError("InsertPushMirror", err) + return + } + + if err := mirror_service.AddPushMirrorRemote(m, address); err != nil { + if err := models.DeletePushMirrorByID(m.ID); err != nil { + log.Error("DeletePushMirrorByID %v", err) + } + ctx.ServerError("AddPushMirrorRemote", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(repo.Link() + "/settings") + + case "advanced": + var repoChanged bool + var units []models.RepoUnit + var deleteUnitTypes []models.UnitType + + // This section doesn't require repo_name/RepoName to be set in the form, don't show it + // as an error on the UI for this action + ctx.Data["Err_RepoName"] = nil + + if repo.CloseIssuesViaCommitInAnyBranch != form.EnableCloseIssuesViaCommitInAnyBranch { + repo.CloseIssuesViaCommitInAnyBranch = form.EnableCloseIssuesViaCommitInAnyBranch + repoChanged = true + } + + if form.EnableWiki && form.EnableExternalWiki && !models.UnitTypeExternalWiki.UnitGlobalDisabled() { + if !validation.IsValidExternalURL(form.ExternalWikiURL) { + ctx.Flash.Error(ctx.Tr("repo.settings.external_wiki_url_error")) + ctx.Redirect(repo.Link() + "/settings") + return + } + + units = append(units, models.RepoUnit{ + RepoID: repo.ID, + Type: models.UnitTypeExternalWiki, + Config: &models.ExternalWikiConfig{ + ExternalWikiURL: form.ExternalWikiURL, + }, + }) + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeWiki) + } else if form.EnableWiki && !form.EnableExternalWiki && !models.UnitTypeWiki.UnitGlobalDisabled() { + units = append(units, models.RepoUnit{ + RepoID: repo.ID, + Type: models.UnitTypeWiki, + Config: new(models.UnitConfig), + }) + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalWiki) + } else { + if !models.UnitTypeExternalWiki.UnitGlobalDisabled() { + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalWiki) + } + if !models.UnitTypeWiki.UnitGlobalDisabled() { + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeWiki) + } + } + + if form.EnableIssues && form.EnableExternalTracker && !models.UnitTypeExternalTracker.UnitGlobalDisabled() { + if !validation.IsValidExternalURL(form.ExternalTrackerURL) { + ctx.Flash.Error(ctx.Tr("repo.settings.external_tracker_url_error")) + ctx.Redirect(repo.Link() + "/settings") + return + } + if len(form.TrackerURLFormat) != 0 && !validation.IsValidExternalTrackerURLFormat(form.TrackerURLFormat) { + ctx.Flash.Error(ctx.Tr("repo.settings.tracker_url_format_error")) + ctx.Redirect(repo.Link() + "/settings") + return + } + units = append(units, models.RepoUnit{ + RepoID: repo.ID, + Type: models.UnitTypeExternalTracker, + Config: &models.ExternalTrackerConfig{ + ExternalTrackerURL: form.ExternalTrackerURL, + ExternalTrackerFormat: form.TrackerURLFormat, + ExternalTrackerStyle: form.TrackerIssueStyle, + }, + }) + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeIssues) + } else if form.EnableIssues && !form.EnableExternalTracker && !models.UnitTypeIssues.UnitGlobalDisabled() { + units = append(units, models.RepoUnit{ + RepoID: repo.ID, + Type: models.UnitTypeIssues, + Config: &models.IssuesConfig{ + EnableTimetracker: form.EnableTimetracker, + AllowOnlyContributorsToTrackTime: form.AllowOnlyContributorsToTrackTime, + EnableDependencies: form.EnableIssueDependencies, + }, + }) + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalTracker) + } else { + if !models.UnitTypeExternalTracker.UnitGlobalDisabled() { + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeExternalTracker) + } + if !models.UnitTypeIssues.UnitGlobalDisabled() { + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeIssues) + } + } + + if form.EnableProjects && !models.UnitTypeProjects.UnitGlobalDisabled() { + units = append(units, models.RepoUnit{ + RepoID: repo.ID, + Type: models.UnitTypeProjects, + }) + } else if !models.UnitTypeProjects.UnitGlobalDisabled() { + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypeProjects) + } + + if form.EnablePulls && !models.UnitTypePullRequests.UnitGlobalDisabled() { + units = append(units, models.RepoUnit{ + RepoID: repo.ID, + Type: models.UnitTypePullRequests, + Config: &models.PullRequestsConfig{ + IgnoreWhitespaceConflicts: form.PullsIgnoreWhitespace, + AllowMerge: form.PullsAllowMerge, + AllowRebase: form.PullsAllowRebase, + AllowRebaseMerge: form.PullsAllowRebaseMerge, + AllowSquash: form.PullsAllowSquash, + AllowManualMerge: form.PullsAllowManualMerge, + AutodetectManualMerge: form.EnableAutodetectManualMerge, + DefaultDeleteBranchAfterMerge: form.DefaultDeleteBranchAfterMerge, + DefaultMergeStyle: models.MergeStyle(form.PullsDefaultMergeStyle), + }, + }) + } else if !models.UnitTypePullRequests.UnitGlobalDisabled() { + deleteUnitTypes = append(deleteUnitTypes, models.UnitTypePullRequests) + } + + if err := models.UpdateRepositoryUnits(repo, units, deleteUnitTypes); err != nil { + ctx.ServerError("UpdateRepositoryUnits", err) + return + } + if repoChanged { + if err := models.UpdateRepository(repo, false); err != nil { + ctx.ServerError("UpdateRepository", err) + return + } + } + log.Trace("Repository advanced settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + + case "signing": + changed := false + + trustModel := models.ToTrustModel(form.TrustModel) + if trustModel != repo.TrustModel { + repo.TrustModel = trustModel + changed = true + } + + if changed { + if err := models.UpdateRepository(repo, false); err != nil { + ctx.ServerError("UpdateRepository", err) + return + } + } + log.Trace("Repository signing settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + + case "admin": + if !ctx.User.IsAdmin { + ctx.Error(http.StatusForbidden) + return + } + + if repo.IsFsckEnabled != form.EnableHealthCheck { + repo.IsFsckEnabled = form.EnableHealthCheck + } + + if err := models.UpdateRepository(repo, false); err != nil { + ctx.ServerError("UpdateRepository", err) + return + } + + log.Trace("Repository admin settings updated: %s/%s", ctx.Repo.Owner.Name, repo.Name) + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + + case "convert": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusNotFound) + return + } + if repo.Name != form.RepoName { + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) + return + } + + if !repo.IsMirror { + ctx.Error(http.StatusNotFound) + return + } + repo.IsMirror = false + + if _, err := repository.CleanUpMigrateInfo(repo); err != nil { + ctx.ServerError("CleanUpMigrateInfo", err) + return + } else if err = models.DeleteMirrorByRepoID(ctx.Repo.Repository.ID); err != nil { + ctx.ServerError("DeleteMirrorByRepoID", err) + return + } + log.Trace("Repository converted from mirror to regular: %s", repo.FullName()) + ctx.Flash.Success(ctx.Tr("repo.settings.convert_succeed")) + ctx.Redirect(repo.Link()) + + case "convert_fork": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusNotFound) + return + } + if err := repo.GetOwner(); err != nil { + ctx.ServerError("Convert Fork", err) + return + } + if repo.Name != form.RepoName { + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) + return + } + + if !repo.IsFork { + ctx.Error(http.StatusNotFound) + return + } + + if !ctx.Repo.Owner.CanCreateRepo() { + ctx.Flash.Error(ctx.Tr("repo.form.reach_limit_of_creation", ctx.User.MaxCreationLimit())) + ctx.Redirect(repo.Link() + "/settings") + return + } + + repo.IsFork = false + repo.ForkID = 0 + if err := models.UpdateRepository(repo, false); err != nil { + log.Error("Unable to update repository %-v whilst converting from fork", repo) + ctx.ServerError("Convert Fork", err) + return + } + + log.Trace("Repository converted from fork to regular: %s", repo.FullName()) + ctx.Flash.Success(ctx.Tr("repo.settings.convert_fork_succeed")) + ctx.Redirect(repo.Link()) + + case "transfer": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusNotFound) + return + } + if repo.Name != form.RepoName { + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) + return + } + + newOwner, err := models.GetUserByName(ctx.FormString("new_owner_name")) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), tplSettingsOptions, nil) + return + } + ctx.ServerError("IsUserExist", err) + return + } + + if newOwner.Type == models.UserTypeOrganization { + if !ctx.User.IsAdmin && newOwner.Visibility == structs.VisibleTypePrivate && !newOwner.HasMemberWithUserID(ctx.User.ID) { + // The user shouldn't know about this organization + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_owner_name"), tplSettingsOptions, nil) + return + } + } + + // Close the GitRepo if open + if ctx.Repo.GitRepo != nil { + ctx.Repo.GitRepo.Close() + ctx.Repo.GitRepo = nil + } + + if err := repo_service.StartRepositoryTransfer(ctx.User, newOwner, repo, nil); err != nil { + if models.IsErrRepoAlreadyExist(err) { + ctx.RenderWithErr(ctx.Tr("repo.settings.new_owner_has_same_repo"), tplSettingsOptions, nil) + } else if models.IsErrRepoTransferInProgress(err) { + ctx.RenderWithErr(ctx.Tr("repo.settings.transfer_in_progress"), tplSettingsOptions, nil) + } else { + ctx.ServerError("TransferOwnership", err) + } + + return + } + + log.Trace("Repository transfer process was started: %s/%s -> %s", ctx.Repo.Owner.Name, repo.Name, newOwner) + ctx.Flash.Success(ctx.Tr("repo.settings.transfer_started", newOwner.DisplayName())) + ctx.Redirect(ctx.Repo.Owner.HomeLink() + "/" + repo.Name + "/settings") + + case "cancel_transfer": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusNotFound) + return + } + + repoTransfer, err := models.GetPendingRepositoryTransfer(ctx.Repo.Repository) + if err != nil { + if models.IsErrNoPendingTransfer(err) { + ctx.Flash.Error("repo.settings.transfer_abort_invalid") + ctx.Redirect(ctx.User.HomeLink() + "/" + repo.Name + "/settings") + } else { + ctx.ServerError("GetPendingRepositoryTransfer", err) + } + + return + } + + if err := repoTransfer.LoadAttributes(); err != nil { + ctx.ServerError("LoadRecipient", err) + return + } + + if err := models.CancelRepositoryTransfer(ctx.Repo.Repository); err != nil { + ctx.ServerError("CancelRepositoryTransfer", err) + return + } + + log.Trace("Repository transfer process was cancelled: %s/%s ", ctx.Repo.Owner.Name, repo.Name) + ctx.Flash.Success(ctx.Tr("repo.settings.transfer_abort_success", repoTransfer.Recipient.Name)) + ctx.Redirect(ctx.Repo.Owner.HomeLink() + "/" + repo.Name + "/settings") + + case "delete": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusNotFound) + return + } + if repo.Name != form.RepoName { + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) + return + } + + // Close the gitrepository before doing this. + if ctx.Repo.GitRepo != nil { + ctx.Repo.GitRepo.Close() + } + + if err := repo_service.DeleteRepository(ctx.User, ctx.Repo.Repository); err != nil { + ctx.ServerError("DeleteRepository", err) + return + } + log.Trace("Repository deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name) + + ctx.Flash.Success(ctx.Tr("repo.settings.deletion_success")) + ctx.Redirect(ctx.Repo.Owner.DashboardLink()) + + case "delete-wiki": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusNotFound) + return + } + if repo.Name != form.RepoName { + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_repo_name"), tplSettingsOptions, nil) + return + } + + err := repo.DeleteWiki() + if err != nil { + log.Error("Delete Wiki: %v", err.Error()) + } + log.Trace("Repository wiki deleted: %s/%s", ctx.Repo.Owner.Name, repo.Name) + + ctx.Flash.Success(ctx.Tr("repo.settings.wiki_deletion_success")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + + case "archive": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusForbidden) + return + } + + if repo.IsMirror { + ctx.Flash.Error(ctx.Tr("repo.settings.archive.error_ismirror")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + return + } + + if err := repo.SetArchiveRepoState(true); err != nil { + log.Error("Tried to archive a repo: %s", err) + ctx.Flash.Error(ctx.Tr("repo.settings.archive.error")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.archive.success")) + + log.Trace("Repository was archived: %s/%s", ctx.Repo.Owner.Name, repo.Name) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + case "unarchive": + if !ctx.Repo.IsOwner() { + ctx.Error(http.StatusForbidden) + return + } + + if err := repo.SetArchiveRepoState(false); err != nil { + log.Error("Tried to unarchive a repo: %s", err) + ctx.Flash.Error(ctx.Tr("repo.settings.unarchive.error")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.unarchive.success")) + + log.Trace("Repository was un-archived: %s/%s", ctx.Repo.Owner.Name, repo.Name) + ctx.Redirect(ctx.Repo.RepoLink + "/settings") + + default: + ctx.NotFound("", nil) + } +} + +func handleSettingRemoteAddrError(ctx *context.Context, err error, form *forms.RepoSettingForm) { + if models.IsErrInvalidCloneAddr(err) { + addrErr := err.(*models.ErrInvalidCloneAddr) + switch { + case addrErr.IsProtocolInvalid: + ctx.RenderWithErr(ctx.Tr("repo.mirror_address_protocol_invalid"), tplSettingsOptions, form) + case addrErr.IsURLError: + ctx.RenderWithErr(ctx.Tr("form.url_error"), tplSettingsOptions, form) + case addrErr.IsPermissionDenied: + if addrErr.LocalPath { + ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied"), tplSettingsOptions, form) + } else if len(addrErr.PrivateNet) == 0 { + ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_blocked"), tplSettingsOptions, form) + } else { + ctx.RenderWithErr(ctx.Tr("repo.migrate.permission_denied_private_ip"), tplSettingsOptions, form) + } + case addrErr.IsInvalidPath: + ctx.RenderWithErr(ctx.Tr("repo.migrate.invalid_local_path"), tplSettingsOptions, form) + default: + ctx.ServerError("Unknown error", err) + } + return + } + ctx.RenderWithErr(ctx.Tr("repo.mirror_address_url_invalid"), tplSettingsOptions, form) +} + +// Collaboration render a repository's collaboration page +func Collaboration(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.settings") + ctx.Data["PageIsSettingsCollaboration"] = true + + users, err := ctx.Repo.Repository.GetCollaborators(models.ListOptions{}) + if err != nil { + ctx.ServerError("GetCollaborators", err) + return + } + ctx.Data["Collaborators"] = users + + teams, err := ctx.Repo.Repository.GetRepoTeams() + if err != nil { + ctx.ServerError("GetRepoTeams", err) + return + } + ctx.Data["Teams"] = teams + ctx.Data["Repo"] = ctx.Repo.Repository + ctx.Data["OrgID"] = ctx.Repo.Repository.OwnerID + ctx.Data["OrgName"] = ctx.Repo.Repository.OwnerName + ctx.Data["Org"] = ctx.Repo.Repository.Owner + ctx.Data["Units"] = models.Units + + ctx.HTML(http.StatusOK, tplCollaboration) +} + +// CollaborationPost response for actions for a collaboration of a repository +func CollaborationPost(ctx *context.Context) { + name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.FormString("collaborator"))) + if len(name) == 0 || ctx.Repo.Owner.LowerName == name { + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) + return + } + + u, err := models.GetUserByName(name) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.Flash.Error(ctx.Tr("form.user_not_exist")) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) + } else { + ctx.ServerError("GetUserByName", err) + } + return + } + + if !u.IsActive { + ctx.Flash.Error(ctx.Tr("repo.settings.add_collaborator_inactive_user")) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) + return + } + + // Organization is not allowed to be added as a collaborator. + if u.IsOrganization() { + ctx.Flash.Error(ctx.Tr("repo.settings.org_not_allowed_to_be_collaborator")) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) + return + } + + if got, err := ctx.Repo.Repository.IsCollaborator(u.ID); err == nil && got { + ctx.Flash.Error(ctx.Tr("repo.settings.add_collaborator_duplicate")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") + return + } + + if err = ctx.Repo.Repository.AddCollaborator(u); err != nil { + ctx.ServerError("AddCollaborator", err) + return + } + + if setting.Service.EnableNotifyMail { + mailer.SendCollaboratorMail(u, ctx.User, ctx.Repo.Repository) + } + + ctx.Flash.Success(ctx.Tr("repo.settings.add_collaborator_success")) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) +} + +// ChangeCollaborationAccessMode response for changing access of a collaboration +func ChangeCollaborationAccessMode(ctx *context.Context) { + if err := ctx.Repo.Repository.ChangeCollaborationAccessMode( + ctx.FormInt64("uid"), + models.AccessMode(ctx.FormInt("mode"))); err != nil { + log.Error("ChangeCollaborationAccessMode: %v", err) + } +} + +// DeleteCollaboration delete a collaboration for a repository +func DeleteCollaboration(ctx *context.Context) { + if err := ctx.Repo.Repository.DeleteCollaboration(ctx.FormInt64("id")); err != nil { + ctx.Flash.Error("DeleteCollaboration: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("repo.settings.remove_collaborator_success")) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/settings/collaboration", + }) +} + +// AddTeamPost response for adding a team to a repository +func AddTeamPost(ctx *context.Context) { + if !ctx.Repo.Owner.RepoAdminChangeTeamAccess && !ctx.Repo.IsOwner() { + ctx.Flash.Error(ctx.Tr("repo.settings.change_team_access_not_allowed")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") + return + } + + name := utils.RemoveUsernameParameterSuffix(strings.ToLower(ctx.FormString("team"))) + if len(name) == 0 { + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") + return + } + + team, err := ctx.Repo.Owner.GetTeam(name) + if err != nil { + if models.IsErrTeamNotExist(err) { + ctx.Flash.Error(ctx.Tr("form.team_not_exist")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") + } else { + ctx.ServerError("GetTeam", err) + } + return + } + + if team.OrgID != ctx.Repo.Repository.OwnerID { + ctx.Flash.Error(ctx.Tr("repo.settings.team_not_in_organization")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") + return + } + + if models.HasTeamRepo(ctx.Repo.Repository.OwnerID, team.ID, ctx.Repo.Repository.ID) { + ctx.Flash.Error(ctx.Tr("repo.settings.add_team_duplicate")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") + return + } + + if err = team.AddRepository(ctx.Repo.Repository); err != nil { + ctx.ServerError("team.AddRepository", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.add_team_success")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") +} + +// DeleteTeam response for deleting a team from a repository +func DeleteTeam(ctx *context.Context) { + if !ctx.Repo.Owner.RepoAdminChangeTeamAccess && !ctx.Repo.IsOwner() { + ctx.Flash.Error(ctx.Tr("repo.settings.change_team_access_not_allowed")) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/collaboration") + return + } + + team, err := models.GetTeamByID(ctx.FormInt64("id")) + if err != nil { + ctx.ServerError("GetTeamByID", err) + return + } + + if err = team.RemoveRepository(ctx.Repo.Repository.ID); err != nil { + ctx.ServerError("team.RemoveRepositorys", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.remove_team_success")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/settings/collaboration", + }) +} + +// parseOwnerAndRepo get repos by owner +func parseOwnerAndRepo(ctx *context.Context) (*models.User, *models.Repository) { + owner, err := models.GetUserByName(ctx.Params(":username")) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.NotFound("GetUserByName", err) + } else { + ctx.ServerError("GetUserByName", err) + } + return nil, nil + } + + repo, err := models.GetRepositoryByName(owner.ID, ctx.Params(":reponame")) + if err != nil { + if models.IsErrRepoNotExist(err) { + ctx.NotFound("GetRepositoryByName", err) + } else { + ctx.ServerError("GetRepositoryByName", err) + } + return nil, nil + } + + return owner, repo +} + +// GitHooks hooks of a repository +func GitHooks(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.settings.githooks") + ctx.Data["PageIsSettingsGitHooks"] = true + + hooks, err := ctx.Repo.GitRepo.Hooks() + if err != nil { + ctx.ServerError("Hooks", err) + return + } + ctx.Data["Hooks"] = hooks + + ctx.HTML(http.StatusOK, tplGithooks) +} + +// GitHooksEdit render for editing a hook of repository page +func GitHooksEdit(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.settings.githooks") + ctx.Data["PageIsSettingsGitHooks"] = true + + name := ctx.Params(":name") + hook, err := ctx.Repo.GitRepo.GetHook(name) + if err != nil { + if err == git.ErrNotValidHook { + ctx.NotFound("GetHook", err) + } else { + ctx.ServerError("GetHook", err) + } + return + } + ctx.Data["Hook"] = hook + ctx.HTML(http.StatusOK, tplGithookEdit) +} + +// GitHooksEditPost response for editing a git hook of a repository +func GitHooksEditPost(ctx *context.Context) { + name := ctx.Params(":name") + hook, err := ctx.Repo.GitRepo.GetHook(name) + if err != nil { + if err == git.ErrNotValidHook { + ctx.NotFound("GetHook", err) + } else { + ctx.ServerError("GetHook", err) + } + return + } + hook.Content = ctx.FormString("content") + if err = hook.Update(); err != nil { + ctx.ServerError("hook.Update", err) + return + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings/hooks/git") +} + +// DeployKeys render the deploy keys list of a repository page +func DeployKeys(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys") + ctx.Data["PageIsSettingsKeys"] = true + ctx.Data["DisableSSH"] = setting.SSH.Disabled + + keys, err := models.ListDeployKeys(&models.ListDeployKeysOptions{RepoID: ctx.Repo.Repository.ID}) + if err != nil { + ctx.ServerError("ListDeployKeys", err) + return + } + ctx.Data["Deploykeys"] = keys + + ctx.HTML(http.StatusOK, tplDeployKeys) +} + +// DeployKeysPost response for adding a deploy key of a repository +func DeployKeysPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AddKeyForm) + ctx.Data["Title"] = ctx.Tr("repo.settings.deploy_keys") + ctx.Data["PageIsSettingsKeys"] = true + + keys, err := models.ListDeployKeys(&models.ListDeployKeysOptions{RepoID: ctx.Repo.Repository.ID}) + if err != nil { + ctx.ServerError("ListDeployKeys", err) + return + } + ctx.Data["Deploykeys"] = keys + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplDeployKeys) + return + } + + content, err := models.CheckPublicKeyString(form.Content) + if err != nil { + if models.IsErrSSHDisabled(err) { + ctx.Flash.Info(ctx.Tr("settings.ssh_disabled")) + } else if models.IsErrKeyUnableVerify(err) { + ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key")) + } else { + ctx.Data["HasError"] = true + ctx.Data["Err_Content"] = true + ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error())) + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings/keys") + return + } + + key, err := models.AddDeployKey(ctx.Repo.Repository.ID, form.Title, content, !form.IsWritable) + if err != nil { + ctx.Data["HasError"] = true + switch { + case models.IsErrDeployKeyAlreadyExist(err): + ctx.Data["Err_Content"] = true + ctx.RenderWithErr(ctx.Tr("repo.settings.key_been_used"), tplDeployKeys, &form) + case models.IsErrKeyAlreadyExist(err): + ctx.Data["Err_Content"] = true + ctx.RenderWithErr(ctx.Tr("settings.ssh_key_been_used"), tplDeployKeys, &form) + case models.IsErrKeyNameAlreadyUsed(err): + ctx.Data["Err_Title"] = true + ctx.RenderWithErr(ctx.Tr("repo.settings.key_name_used"), tplDeployKeys, &form) + case models.IsErrDeployKeyNameAlreadyUsed(err): + ctx.Data["Err_Title"] = true + ctx.RenderWithErr(ctx.Tr("repo.settings.key_name_used"), tplDeployKeys, &form) + default: + ctx.ServerError("AddDeployKey", err) + } + return + } + + log.Trace("Deploy key added: %d", ctx.Repo.Repository.ID) + ctx.Flash.Success(ctx.Tr("repo.settings.add_key_success", key.Name)) + ctx.Redirect(ctx.Repo.RepoLink + "/settings/keys") +} + +// DeleteDeployKey response for deleting a deploy key +func DeleteDeployKey(ctx *context.Context) { + if err := models.DeleteDeployKey(ctx.User, ctx.FormInt64("id")); err != nil { + ctx.Flash.Error("DeleteDeployKey: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("repo.settings.deploy_key_deletion_success")) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": ctx.Repo.RepoLink + "/settings/keys", + }) +} + +// UpdateAvatarSetting update repo's avatar +func UpdateAvatarSetting(ctx *context.Context, form forms.AvatarForm) error { + ctxRepo := ctx.Repo.Repository + + if form.Avatar == nil { + // No avatar is uploaded and we not removing it here. + // No random avatar generated here. + // Just exit, no action. + if ctxRepo.CustomAvatarRelativePath() == "" { + log.Trace("No avatar was uploaded for repo: %d. Default icon will appear instead.", ctxRepo.ID) + } + return nil + } + + r, err := form.Avatar.Open() + if err != nil { + return fmt.Errorf("Avatar.Open: %v", err) + } + defer r.Close() + + if form.Avatar.Size > setting.Avatar.MaxFileSize { + return errors.New(ctx.Tr("settings.uploaded_avatar_is_too_big")) + } + + data, err := ioutil.ReadAll(r) + if err != nil { + return fmt.Errorf("ioutil.ReadAll: %v", err) + } + st := typesniffer.DetectContentType(data) + if !(st.IsImage() && !st.IsSvgImage()) { + return errors.New(ctx.Tr("settings.uploaded_avatar_not_a_image")) + } + if err = ctxRepo.UploadAvatar(data); err != nil { + return fmt.Errorf("UploadAvatar: %v", err) + } + return nil +} + +// SettingsAvatar save new POSTed repository avatar +func SettingsAvatar(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AvatarForm) + form.Source = forms.AvatarLocal + if err := UpdateAvatarSetting(ctx, *form); err != nil { + ctx.Flash.Error(err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("repo.settings.update_avatar_success")) + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings") +} + +// SettingsDeleteAvatar delete repository avatar +func SettingsDeleteAvatar(ctx *context.Context) { + if err := ctx.Repo.Repository.DeleteAvatar(); err != nil { + ctx.Flash.Error(fmt.Sprintf("DeleteAvatar: %v", err)) + } + ctx.Redirect(ctx.Repo.RepoLink + "/settings") +} + +func selectPushMirrorByForm(form *forms.RepoSettingForm, repo *models.Repository) (*models.PushMirror, error) { + id, err := strconv.ParseInt(form.PushMirrorID, 10, 64) + if err != nil { + return nil, err + } + + if err = repo.LoadPushMirrors(); err != nil { + return nil, err + } + + for _, m := range repo.PushMirrors { + if m.ID == id { + return m, nil + } + } + + return nil, fmt.Errorf("PushMirror[%v] not associated to repository %v", id, repo) +} diff --git a/routers/repo/setting_protected_branch.go b/routers/web/repo/setting_protected_branch.go similarity index 94% rename from routers/repo/setting_protected_branch.go rename to routers/web/repo/setting_protected_branch.go index c2e7bc8fa..30c7d81b8 100644 --- a/routers/repo/setting_protected_branch.go +++ b/routers/web/repo/setting_protected_branch.go @@ -6,16 +6,18 @@ package repo import ( "fmt" + "net/http" "strings" "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" pull_service "code.gitea.io/gitea/services/pull" ) @@ -48,7 +50,7 @@ func ProtectedBranch(ctx *context.Context) { ctx.Data["LeftBranches"] = leftBranches - ctx.HTML(200, tplBranches) + ctx.HTML(http.StatusOK, tplBranches) } // ProtectedBranchPost response for protect for a branch of a repository @@ -58,14 +60,14 @@ func ProtectedBranchPost(ctx *context.Context) { repo := ctx.Repo.Repository - switch ctx.Query("action") { + switch ctx.FormString("action") { case "default_branch": if ctx.HasError() { - ctx.HTML(200, tplBranches) + ctx.HTML(http.StatusOK, tplBranches) return } - branch := ctx.Query("branch") + branch := ctx.FormString("branch") if !ctx.Repo.GitRepo.IsBranchExist(branch) { ctx.Status(404) return @@ -128,16 +130,16 @@ func SettingsProtectedBranch(c *context.Context) { c.Data["merge_whitelist_users"] = strings.Join(base.Int64sToStrings(protectBranch.MergeWhitelistUserIDs), ",") c.Data["approvals_whitelist_users"] = strings.Join(base.Int64sToStrings(protectBranch.ApprovalsWhitelistUserIDs), ",") contexts, _ := models.FindRepoRecentCommitStatusContexts(c.Repo.Repository.ID, 7*24*time.Hour) // Find last week status check contexts - for _, context := range protectBranch.StatusCheckContexts { + for _, ctx := range protectBranch.StatusCheckContexts { var found bool - for _, ctx := range contexts { - if ctx == context { + for i := range contexts { + if contexts[i] == ctx { found = true break } } if !found { - contexts = append(contexts, context) + contexts = append(contexts, ctx) } } @@ -164,11 +166,12 @@ func SettingsProtectedBranch(c *context.Context) { } c.Data["Branch"] = protectBranch - c.HTML(200, tplProtectedBranch) + c.HTML(http.StatusOK, tplProtectedBranch) } // SettingsProtectedBranchPost updates the protected branch settings -func SettingsProtectedBranchPost(ctx *context.Context, f auth.ProtectBranchForm) { +func SettingsProtectedBranchPost(ctx *context.Context) { + f := web.GetForm(ctx).(*forms.ProtectBranchForm) branch := ctx.Params("*") if !ctx.Repo.GitRepo.IsBranchExist(branch) { ctx.NotFound("IsBranchExist", nil) diff --git a/routers/repo/settings_test.go b/routers/web/repo/settings_test.go similarity index 97% rename from routers/repo/settings_test.go rename to routers/web/repo/settings_test.go index 679bb0d33..5190f12d5 100644 --- a/routers/repo/settings_test.go +++ b/routers/web/repo/settings_test.go @@ -10,11 +10,12 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" "github.com/stretchr/testify/assert" ) @@ -48,11 +49,12 @@ func TestAddReadOnlyDeployKey(t *testing.T) { test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 2) - addKeyForm := auth.AddKeyForm{ + addKeyForm := forms.AddKeyForm{ Title: "read-only", Content: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", } - DeployKeysPost(ctx, addKeyForm) + web.SetForm(ctx, &addKeyForm) + DeployKeysPost(ctx) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.DeployKey{ @@ -76,12 +78,13 @@ func TestAddReadWriteOnlyDeployKey(t *testing.T) { test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 2) - addKeyForm := auth.AddKeyForm{ + addKeyForm := forms.AddKeyForm{ Title: "read-write", Content: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC4cn+iXnA4KvcQYSV88vGn0Yi91vG47t1P7okprVmhNTkipNRIHWr6WdCO4VDr/cvsRkuVJAsLO2enwjGWWueOO6BodiBgyAOZ/5t5nJNMCNuLGT5UIo/RI1b0WRQwxEZTRjt6mFNw6lH14wRd8ulsr9toSWBPMOGWoYs1PDeDL0JuTjL+tr1SZi/EyxCngpYszKdXllJEHyI79KQgeD0Vt3pTrkbNVTOEcCNqZePSVmUH8X8Vhugz3bnE0/iE9Pb5fkWO9c4AnM1FgI/8Bvp27Fw2ShryIXuR6kKvUqhVMTuOSDHwu6A8jLE5Owt3GAYugDpDYuwTVNGrHLXKpPzrGGPE/jPmaLCMZcsdkec95dYeU3zKODEm8UQZFhmJmDeWVJ36nGrGZHL4J5aTTaeFUJmmXDaJYiJ+K2/ioKgXqnXvltu0A9R8/LGy4nrTJRr4JMLuJFoUXvGm1gXQ70w2LSpk6yl71RNC0hCtsBe8BP8IhYCM0EP5jh7eCMQZNvM= nocomment\n", IsWritable: true, } - DeployKeysPost(ctx, addKeyForm) + web.SetForm(ctx, &addKeyForm) + DeployKeysPost(ctx) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) models.AssertExistsAndLoadBean(t, &models.DeployKey{ diff --git a/routers/web/repo/tag.go b/routers/web/repo/tag.go new file mode 100644 index 000000000..a180399c9 --- /dev/null +++ b/routers/web/repo/tag.go @@ -0,0 +1,182 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repo + +import ( + "fmt" + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" +) + +// Tags render the page to protect tags +func Tags(ctx *context.Context) { + if setTagsContext(ctx) != nil { + return + } + + ctx.HTML(http.StatusOK, tplTags) +} + +// NewProtectedTagPost handles creation of a protect tag +func NewProtectedTagPost(ctx *context.Context) { + if setTagsContext(ctx) != nil { + return + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplTags) + return + } + + repo := ctx.Repo.Repository + form := web.GetForm(ctx).(*forms.ProtectTagForm) + + pt := &models.ProtectedTag{ + RepoID: repo.ID, + NamePattern: strings.TrimSpace(form.NamePattern), + } + + if strings.TrimSpace(form.AllowlistUsers) != "" { + pt.AllowlistUserIDs, _ = base.StringsToInt64s(strings.Split(form.AllowlistUsers, ",")) + } + if strings.TrimSpace(form.AllowlistTeams) != "" { + pt.AllowlistTeamIDs, _ = base.StringsToInt64s(strings.Split(form.AllowlistTeams, ",")) + } + + if err := models.InsertProtectedTag(pt); err != nil { + ctx.ServerError("InsertProtectedTag", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(setting.AppSubURL + ctx.Req.URL.Path) +} + +// EditProtectedTag render the page to edit a protect tag +func EditProtectedTag(ctx *context.Context) { + if setTagsContext(ctx) != nil { + return + } + + ctx.Data["PageIsEditProtectedTag"] = true + + pt := selectProtectedTagByContext(ctx) + if pt == nil { + return + } + + ctx.Data["name_pattern"] = pt.NamePattern + ctx.Data["allowlist_users"] = strings.Join(base.Int64sToStrings(pt.AllowlistUserIDs), ",") + ctx.Data["allowlist_teams"] = strings.Join(base.Int64sToStrings(pt.AllowlistTeamIDs), ",") + + ctx.HTML(http.StatusOK, tplTags) +} + +// EditProtectedTagPost handles creation of a protect tag +func EditProtectedTagPost(ctx *context.Context) { + if setTagsContext(ctx) != nil { + return + } + + ctx.Data["PageIsEditProtectedTag"] = true + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplTags) + return + } + + pt := selectProtectedTagByContext(ctx) + if pt == nil { + return + } + + form := web.GetForm(ctx).(*forms.ProtectTagForm) + + pt.NamePattern = strings.TrimSpace(form.NamePattern) + pt.AllowlistUserIDs, _ = base.StringsToInt64s(strings.Split(form.AllowlistUsers, ",")) + pt.AllowlistTeamIDs, _ = base.StringsToInt64s(strings.Split(form.AllowlistTeams, ",")) + + if err := models.UpdateProtectedTag(pt); err != nil { + ctx.ServerError("UpdateProtectedTag", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(ctx.Repo.Repository.Link() + "/settings/tags") +} + +// DeleteProtectedTagPost handles deletion of a protected tag +func DeleteProtectedTagPost(ctx *context.Context) { + pt := selectProtectedTagByContext(ctx) + if pt == nil { + return + } + + if err := models.DeleteProtectedTag(pt); err != nil { + ctx.ServerError("DeleteProtectedTag", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) + ctx.Redirect(ctx.Repo.Repository.Link() + "/settings/tags") +} + +func setTagsContext(ctx *context.Context) error { + ctx.Data["Title"] = ctx.Tr("repo.settings") + ctx.Data["PageIsSettingsTags"] = true + + protectedTags, err := ctx.Repo.Repository.GetProtectedTags() + if err != nil { + ctx.ServerError("GetProtectedTags", err) + return err + } + ctx.Data["ProtectedTags"] = protectedTags + + users, err := ctx.Repo.Repository.GetReaders() + if err != nil { + ctx.ServerError("Repo.Repository.GetReaders", err) + return err + } + ctx.Data["Users"] = users + + if ctx.Repo.Owner.IsOrganization() { + teams, err := ctx.Repo.Owner.TeamsWithAccessToRepo(ctx.Repo.Repository.ID, models.AccessModeRead) + if err != nil { + ctx.ServerError("Repo.Owner.TeamsWithAccessToRepo", err) + return err + } + ctx.Data["Teams"] = teams + } + + return nil +} + +func selectProtectedTagByContext(ctx *context.Context) *models.ProtectedTag { + id := ctx.FormInt64("id") + if id == 0 { + id = ctx.ParamsInt64(":id") + } + + tag, err := models.GetProtectedTagByID(id) + if err != nil { + ctx.ServerError("GetProtectedTagByID", err) + return nil + } + + if tag != nil && tag.RepoID == ctx.Repo.Repository.ID { + return tag + } + + ctx.NotFound("", fmt.Errorf("ProtectedTag[%v] not associated to repository %v", id, ctx.Repo.Repository)) + + return nil +} diff --git a/routers/repo/topic.go b/routers/web/repo/topic.go similarity index 75% rename from routers/repo/topic.go rename to routers/web/repo/topic.go index b23023ceb..41e3f995b 100644 --- a/routers/repo/topic.go +++ b/routers/web/repo/topic.go @@ -5,6 +5,7 @@ package repo import ( + "net/http" "strings" "code.gitea.io/gitea/models" @@ -15,14 +16,14 @@ import ( // TopicsPost response for creating repository func TopicsPost(ctx *context.Context) { if ctx.User == nil { - ctx.JSON(403, map[string]interface{}{ + ctx.JSON(http.StatusForbidden, map[string]interface{}{ "message": "Only owners could change the topics.", }) return } var topics = make([]string, 0) - var topicsStr = strings.TrimSpace(ctx.Query("topics")) + var topicsStr = ctx.FormTrim("topics") if len(topicsStr) > 0 { topics = strings.Split(topicsStr, ",") } @@ -30,7 +31,7 @@ func TopicsPost(ctx *context.Context) { validTopics, invalidTopics := models.SanitizeAndValidateTopics(topics) if len(validTopics) > 25 { - ctx.JSON(422, map[string]interface{}{ + ctx.JSON(http.StatusUnprocessableEntity, map[string]interface{}{ "invalidTopics": nil, "message": ctx.Tr("repo.topic.count_prompt"), }) @@ -38,7 +39,7 @@ func TopicsPost(ctx *context.Context) { } if len(invalidTopics) > 0 { - ctx.JSON(422, map[string]interface{}{ + ctx.JSON(http.StatusUnprocessableEntity, map[string]interface{}{ "invalidTopics": invalidTopics, "message": ctx.Tr("repo.topic.format_prompt"), }) @@ -48,13 +49,13 @@ func TopicsPost(ctx *context.Context) { err := models.SaveTopics(ctx.Repo.Repository.ID, validTopics...) if err != nil { log.Error("SaveTopics failed: %v", err) - ctx.JSON(500, map[string]interface{}{ + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ "message": "Save topics failed.", }) return } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "status": "ok", }) } diff --git a/routers/repo/view.go b/routers/web/repo/view.go similarity index 80% rename from routers/repo/view.go rename to routers/web/repo/view.go index fdb8d5f13..2c703fc1a 100644 --- a/routers/repo/view.go +++ b/routers/web/repo/view.go @@ -10,7 +10,9 @@ import ( "encoding/base64" "fmt" gotemplate "html/template" + "io" "io/ioutil" + "net/http" "net/url" "path" "strconv" @@ -27,6 +29,8 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/typesniffer" ) const ( @@ -139,11 +143,11 @@ func renderDirectory(ctx *context.Context, treeLink string) { var c *git.LastCommitCache if setting.CacheService.LastCommit.Enabled && ctx.Repo.CommitsCount >= setting.CacheService.LastCommit.CommitsCount { - c = git.NewLastCommitCache(ctx.Repo.Repository.FullName(), ctx.Repo.GitRepo, int64(setting.CacheService.LastCommit.TTL.Seconds()), cache.GetCache()) + c = git.NewLastCommitCache(ctx.Repo.Repository.FullName(), ctx.Repo.GitRepo, setting.LastCommitCacheTTLSeconds, cache.GetCache()) } var latestCommit *git.Commit - ctx.Data["Files"], latestCommit, err = entries.GetCommitsInfo(ctx.Repo.Commit, ctx.Repo.TreePath, c) + ctx.Data["Files"], latestCommit, err = entries.GetCommitsInfo(ctx, ctx.Repo.Commit, ctx.Repo.TreePath, c) if err != nil { ctx.ServerError("GetCommitsInfo", err) return @@ -263,7 +267,9 @@ func renderDirectory(ctx *context.Context, treeLink string) { n, _ := dataRc.Read(buf) buf = buf[:n] - isTextFile := base.IsTextFile(buf) + st := typesniffer.DetectContentType(buf) + isTextFile := st.IsText() + ctx.Data["FileIsText"] = isTextFile ctx.Data["FileName"] = readmeFile.name fileSize := int64(0) @@ -272,43 +278,43 @@ func renderDirectory(ctx *context.Context, treeLink string) { // FIXME: what happens when README file is an image? if isTextFile && setting.LFS.StartServer { - meta := lfs.IsPointerFile(&buf) - if meta != nil { - meta, err = ctx.Repo.Repository.GetLFSMetaObjectByOid(meta.Oid) + pointer, _ := lfs.ReadPointerFromBuffer(buf) + if pointer.IsValid() { + meta, err := ctx.Repo.Repository.GetLFSMetaObjectByOid(pointer.Oid) if err != nil && err != models.ErrLFSObjectNotExist { ctx.ServerError("GetLFSMetaObject", err) return } - } + if meta != nil { + ctx.Data["IsLFSFile"] = true + isLFSFile = true - if meta != nil { - ctx.Data["IsLFSFile"] = true - isLFSFile = true + // OK read the lfs object + var err error + dataRc, err = lfs.ReadMetaObject(pointer) + if err != nil { + ctx.ServerError("ReadMetaObject", err) + return + } + defer dataRc.Close() - // OK read the lfs object - var err error - dataRc, err = lfs.ReadMetaObject(meta) - if err != nil { - ctx.ServerError("ReadMetaObject", err) - return + buf = make([]byte, 1024) + n, err = dataRc.Read(buf) + if err != nil { + ctx.ServerError("Data", err) + return + } + buf = buf[:n] + + st = typesniffer.DetectContentType(buf) + isTextFile = st.IsText() + ctx.Data["IsTextFile"] = isTextFile + + fileSize = meta.Size + ctx.Data["FileSize"] = meta.Size + filenameBase64 := base64.RawURLEncoding.EncodeToString([]byte(readmeFile.name)) + ctx.Data["RawFileLink"] = fmt.Sprintf("%s%s.git/info/lfs/objects/%s/%s", setting.AppURL, ctx.Repo.Repository.FullName(), meta.Oid, filenameBase64) } - defer dataRc.Close() - - buf = make([]byte, 1024) - n, err = dataRc.Read(buf) - if err != nil { - ctx.ServerError("Data", err) - return - } - buf = buf[:n] - - isTextFile = base.IsTextFile(buf) - ctx.Data["IsTextFile"] = isTextFile - - fileSize = meta.Size - ctx.Data["FileSize"] = meta.Size - filenameBase64 := base64.RawURLEncoding.EncodeToString([]byte(readmeFile.name)) - ctx.Data["RawFileLink"] = fmt.Sprintf("%s%s.git/info/lfs/objects/%s/%s", setting.AppURL, ctx.Repo.Repository.FullName(), meta.Oid, filenameBase64) } } @@ -323,13 +329,28 @@ func renderDirectory(ctx *context.Context, treeLink string) { ctx.Data["IsTextFile"] = true ctx.Data["FileSize"] = fileSize } else { - d, _ := ioutil.ReadAll(dataRc) - buf = charset.ToUTF8WithFallback(append(buf, d...)) + rd := charset.ToUTF8WithFallbackReader(io.MultiReader(bytes.NewReader(buf), dataRc)) if markupType := markup.Type(readmeFile.name); markupType != "" { ctx.Data["IsMarkup"] = true ctx.Data["MarkupType"] = string(markupType) - ctx.Data["FileContent"] = string(markup.Render(readmeFile.name, buf, readmeTreelink, ctx.Repo.Repository.ComposeDocumentMetas())) + var result strings.Builder + err := markup.Render(&markup.RenderContext{ + Ctx: ctx, + Filename: readmeFile.name, + URLPrefix: readmeTreelink, + Metas: ctx.Repo.Repository.ComposeDocumentMetas(), + GitRepo: ctx.Repo.GitRepo, + }, rd, &result) + if err != nil { + log.Error("Render failed: %v then fallback", err) + bs, _ := ioutil.ReadAll(rd) + ctx.Data["FileContent"] = strings.ReplaceAll( + gotemplate.HTMLEscapeString(string(bs)), "\n", `
    `, + ) + } else { + ctx.Data["FileContent"] = result.String() + } } else { ctx.Data["IsRenderedHTML"] = true ctx.Data["FileContent"] = strings.ReplaceAll( @@ -384,7 +405,6 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st fileSize := blob.Size() ctx.Data["FileIsSymlink"] = entry.IsLink() - ctx.Data["FileSize"] = fileSize ctx.Data["FileName"] = blob.Name() ctx.Data["RawFileLink"] = rawLink + "/" + ctx.Repo.TreePath @@ -392,64 +412,67 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st n, _ := dataRc.Read(buf) buf = buf[:n] - isTextFile := base.IsTextFile(buf) - isLFSFile := false - ctx.Data["IsTextFile"] = isTextFile + st := typesniffer.DetectContentType(buf) + isTextFile := st.IsText() - isDisplayingSource := ctx.Query("display") == "source" + isLFSFile := false + isDisplayingSource := ctx.FormString("display") == "source" isDisplayingRendered := !isDisplayingSource - isRepresentableAsText := base.IsRepresentableAsText(buf) - ctx.Data["IsRepresentableAsText"] = isRepresentableAsText + + //Check for LFS meta file + if isTextFile && setting.LFS.StartServer { + pointer, _ := lfs.ReadPointerFromBuffer(buf) + if pointer.IsValid() { + meta, err := ctx.Repo.Repository.GetLFSMetaObjectByOid(pointer.Oid) + if err != nil && err != models.ErrLFSObjectNotExist { + ctx.ServerError("GetLFSMetaObject", err) + return + } + if meta != nil { + isLFSFile = true + + // OK read the lfs object + var err error + dataRc, err = lfs.ReadMetaObject(pointer) + if err != nil { + ctx.ServerError("ReadMetaObject", err) + return + } + defer dataRc.Close() + + buf = make([]byte, 1024) + n, err = dataRc.Read(buf) + // Error EOF don't mean there is an error, it just means we read to + // the end + if err != nil && err != io.EOF { + ctx.ServerError("Data", err) + return + } + buf = buf[:n] + + st = typesniffer.DetectContentType(buf) + isTextFile = st.IsText() + + fileSize = meta.Size + ctx.Data["RawFileLink"] = fmt.Sprintf("%s/media/%s/%s", ctx.Repo.RepoLink, ctx.Repo.BranchNameSubURL(), ctx.Repo.TreePath) + } + } + } + + isRepresentableAsText := st.IsRepresentableAsText() if !isRepresentableAsText { // If we can't show plain text, always try to render. isDisplayingSource = false isDisplayingRendered = true } + ctx.Data["IsLFSFile"] = isLFSFile + ctx.Data["FileSize"] = fileSize + ctx.Data["IsTextFile"] = isTextFile + ctx.Data["IsRepresentableAsText"] = isRepresentableAsText ctx.Data["IsDisplayingSource"] = isDisplayingSource ctx.Data["IsDisplayingRendered"] = isDisplayingRendered - ctx.Data["IsTextSource"] = isTextFile || isDisplayingSource - //Check for LFS meta file - if isTextFile && setting.LFS.StartServer { - meta := lfs.IsPointerFile(&buf) - if meta != nil { - meta, err = ctx.Repo.Repository.GetLFSMetaObjectByOid(meta.Oid) - if err != nil && err != models.ErrLFSObjectNotExist { - ctx.ServerError("GetLFSMetaObject", err) - return - } - } - if meta != nil { - ctx.Data["IsLFSFile"] = true - isLFSFile = true - - // OK read the lfs object - var err error - dataRc, err = lfs.ReadMetaObject(meta) - if err != nil { - ctx.ServerError("ReadMetaObject", err) - return - } - defer dataRc.Close() - - buf = make([]byte, 1024) - n, err = dataRc.Read(buf) - if err != nil { - ctx.ServerError("Data", err) - return - } - buf = buf[:n] - - isTextFile = base.IsTextFile(buf) - ctx.Data["IsTextFile"] = isTextFile - - fileSize = meta.Size - ctx.Data["FileSize"] = meta.Size - filenameBase64 := base64.RawURLEncoding.EncodeToString([]byte(blob.Name())) - ctx.Data["RawFileLink"] = fmt.Sprintf("%s%s.git/info/lfs/objects/%s/%s", setting.AppURL, ctx.Repo.Repository.FullName(), meta.Oid, filenameBase64) - } - } // Check LFS Lock lfsLock, err := ctx.Repo.Repository.GetTreePathLock(ctx.Repo.TreePath) ctx.Data["LFSLock"] = lfsLock @@ -471,8 +494,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st switch { case isRepresentableAsText: - // This will be true for SVGs. - if base.IsImageFile(buf) { + if st.IsSvgImage() { ctx.Data["IsImageFile"] = true ctx.Data["HasSourceRenderedToggle"] = true } @@ -482,21 +504,33 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st break } - d, _ := ioutil.ReadAll(dataRc) - buf = charset.ToUTF8WithFallback(append(buf, d...)) + rd := charset.ToUTF8WithFallbackReader(io.MultiReader(bytes.NewReader(buf), dataRc)) readmeExist := markup.IsReadmeFile(blob.Name()) ctx.Data["ReadmeExist"] = readmeExist if markupType := markup.Type(blob.Name()); markupType != "" { ctx.Data["IsMarkup"] = true ctx.Data["MarkupType"] = markupType - ctx.Data["FileContent"] = string(markup.Render(blob.Name(), buf, path.Dir(treeLink), ctx.Repo.Repository.ComposeDocumentMetas())) + var result strings.Builder + err := markup.Render(&markup.RenderContext{ + Ctx: ctx, + Filename: blob.Name(), + URLPrefix: path.Dir(treeLink), + Metas: ctx.Repo.Repository.ComposeDocumentMetas(), + GitRepo: ctx.Repo.GitRepo, + }, rd, &result) + if err != nil { + ctx.ServerError("Render", err) + return + } + ctx.Data["FileContent"] = result.String() } else if readmeExist { + buf, _ := ioutil.ReadAll(rd) ctx.Data["IsRenderedHTML"] = true ctx.Data["FileContent"] = strings.ReplaceAll( gotemplate.HTMLEscapeString(string(buf)), "\n", `
    `, ) } else { - buf = charset.ToUTF8WithFallback(buf) + buf, _ := ioutil.ReadAll(rd) lineNums := linesBytesCount(buf) ctx.Data["NumLines"] = strconv.Itoa(lineNums) ctx.Data["NumLinesSet"] = true @@ -518,13 +552,13 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st } } - case base.IsPDFFile(buf): + case st.IsPDF(): ctx.Data["IsPDFFile"] = true - case base.IsVideoFile(buf): + case st.IsVideo(): ctx.Data["IsVideoFile"] = true - case base.IsAudioFile(buf): + case st.IsAudio(): ctx.Data["IsAudioFile"] = true - case base.IsImageFile(buf): + case st.IsImage() && (setting.UI.SVG.Enabled || !st.IsSvgImage()): ctx.Data["IsImageFile"] = true default: if fileSize >= setting.UI.MaxDisplayFileSize { @@ -533,13 +567,23 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st } if markupType := markup.Type(blob.Name()); markupType != "" { - d, _ := ioutil.ReadAll(dataRc) - buf = append(buf, d...) + rd := io.MultiReader(bytes.NewReader(buf), dataRc) ctx.Data["IsMarkup"] = true ctx.Data["MarkupType"] = markupType - ctx.Data["FileContent"] = string(markup.Render(blob.Name(), buf, path.Dir(treeLink), ctx.Repo.Repository.ComposeDocumentMetas())) + var result strings.Builder + err := markup.Render(&markup.RenderContext{ + Ctx: ctx, + Filename: blob.Name(), + URLPrefix: path.Dir(treeLink), + Metas: ctx.Repo.Repository.ComposeDocumentMetas(), + GitRepo: ctx.Repo.GitRepo, + }, rd, &result) + if err != nil { + ctx.ServerError("Render", err) + return + } + ctx.Data["FileContent"] = result.String() } - } if ctx.Repo.CanEnableEditor() { @@ -584,10 +628,19 @@ func Home(ctx *context.Context) { ctx.Data["Repo"] = ctx.Repo ctx.Data["MigrateTask"] = task ctx.Data["CloneAddr"] = safeURL(cfg.CloneAddr) - ctx.HTML(200, tplMigrating) + ctx.Data["Failed"] = task.Status == structs.TaskStatusFailed + ctx.HTML(http.StatusOK, tplMigrating) return } + if ctx.IsSigned { + // Set repo notification-status read if unread + if err := ctx.Repo.Repository.ReadBy(ctx.User.ID); err != nil { + ctx.ServerError("ReadBy", err) + return + } + } + var firstUnit *models.Unit for _, repoUnit := range ctx.Repo.Units { if repoUnit.Type == models.UnitTypeCode { @@ -621,7 +674,7 @@ func renderLanguageStats(ctx *context.Context) { } func renderRepoTopics(ctx *context.Context) { - topics, err := models.FindTopics(&models.FindTopicOptions{ + topics, _, err := models.FindTopics(&models.FindTopicOptions{ RepoID: ctx.Repo.Repository.ID, }) if err != nil { @@ -635,7 +688,7 @@ func renderCode(ctx *context.Context) { ctx.Data["PageIsViewCode"] = true if ctx.Repo.Repository.IsEmpty { - ctx.HTML(200, tplRepoEMPTY) + ctx.HTML(http.StatusOK, tplRepoEMPTY) return } @@ -698,26 +751,29 @@ func renderCode(ctx *context.Context) { ctx.Data["TreeLink"] = treeLink ctx.Data["TreeNames"] = treeNames ctx.Data["BranchLink"] = branchLink - ctx.HTML(200, tplRepoHome) + ctx.HTML(http.StatusOK, tplRepoHome) } -// RenderUserCards render a page show users according the input templaet +// RenderUserCards render a page show users according the input template func RenderUserCards(ctx *context.Context, total int, getter func(opts models.ListOptions) ([]*models.User, error), tpl base.TplName) { - page := ctx.QueryInt("page") + page := ctx.FormInt("page") if page <= 0 { page = 1 } pager := context.NewPagination(total, models.ItemsPerPage, page, 5) ctx.Data["Page"] = pager - items, err := getter(models.ListOptions{Page: pager.Paginater.Current()}) + items, err := getter(models.ListOptions{ + Page: pager.Paginater.Current(), + PageSize: models.ItemsPerPage, + }) if err != nil { ctx.ServerError("getter", err) return } ctx.Data["Cards"] = items - ctx.HTML(200, tpl) + ctx.HTML(http.StatusOK, tpl) } // Watchers render repository's watch users @@ -741,6 +797,7 @@ func Stars(ctx *context.Context) { func Forks(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repos.forks") + // TODO: need pagination forks, err := ctx.Repo.Repository.GetForks(models.ListOptions{}) if err != nil { ctx.ServerError("GetForks", err) @@ -755,5 +812,5 @@ func Forks(ctx *context.Context) { } ctx.Data["Forks"] = forks - ctx.HTML(200, tplForks) + ctx.HTML(http.StatusOK, tplForks) } diff --git a/routers/repo/webhook.go b/routers/web/repo/webhook.go similarity index 79% rename from routers/repo/webhook.go rename to routers/web/repo/webhook.go index 0c3fd1267..0ceb9bc1d 100644 --- a/routers/repo/webhook.go +++ b/routers/web/repo/webhook.go @@ -6,21 +6,23 @@ package repo import ( - "encoding/json" "errors" "fmt" + "net/http" "path" "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" "code.gitea.io/gitea/services/webhook" ) @@ -36,16 +38,17 @@ func Webhooks(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("repo.settings.hooks") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["BaseLink"] = ctx.Repo.RepoLink + "/settings/hooks" + ctx.Data["BaseLinkNew"] = ctx.Repo.RepoLink + "/settings/hooks" ctx.Data["Description"] = ctx.Tr("repo.settings.hooks_desc", "https://docs.gitea.io/en-us/webhooks/") - ws, err := models.GetWebhooksByRepoID(ctx.Repo.Repository.ID, models.ListOptions{}) + ws, err := models.ListWebhooksByOpts(&models.ListWebhookOptions{RepoID: ctx.Repo.Repository.ID}) if err != nil { ctx.ServerError("GetWebhooksByRepoID", err) return } ctx.Data["Webhooks"] = ws - ctx.HTML(200, tplHooks) + ctx.HTML(http.StatusOK, tplHooks) } type orgRepoCtx struct { @@ -54,6 +57,7 @@ type orgRepoCtx struct { IsAdmin bool IsSystemWebhook bool Link string + LinkNew string NewTemplate base.TplName } @@ -63,6 +67,7 @@ func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) { return &orgRepoCtx{ RepoID: ctx.Repo.Repository.ID, Link: path.Join(ctx.Repo.RepoLink, "settings/hooks"), + LinkNew: path.Join(ctx.Repo.RepoLink, "settings/hooks"), NewTemplate: tplHookNew, }, nil } @@ -71,16 +76,18 @@ func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) { return &orgRepoCtx{ OrgID: ctx.Org.Organization.ID, Link: path.Join(ctx.Org.OrgLink, "settings/hooks"), + LinkNew: path.Join(ctx.Org.OrgLink, "settings/hooks"), NewTemplate: tplOrgHookNew, }, nil } if ctx.User.IsAdmin { // Are we looking at default webhooks? - if ctx.Params(":configType") == "hooks" { + if ctx.Params(":configType") == "default-hooks" { return &orgRepoCtx{ IsAdmin: true, Link: path.Join(setting.AppSubURL, "/admin/hooks"), + LinkNew: path.Join(setting.AppSubURL, "/admin/default-hooks"), NewTemplate: tplAdminHookNew, }, nil } @@ -89,7 +96,8 @@ func getOrgRepoCtx(ctx *context.Context) (*orgRepoCtx, error) { return &orgRepoCtx{ IsAdmin: true, IsSystemWebhook: true, - Link: path.Join(setting.AppSubURL, "/admin/system-hooks"), + Link: path.Join(setting.AppSubURL, "/admin/hooks"), + LinkNew: path.Join(setting.AppSubURL, "/admin/system-hooks"), NewTemplate: tplAdminHookNew, }, nil } @@ -121,8 +129,8 @@ func WebhooksNew(ctx *context.Context) { ctx.Data["PageIsAdminSystemHooks"] = true ctx.Data["PageIsAdminSystemHooksNew"] = true } else if orCtx.IsAdmin { - ctx.Data["PageIsAdminHooks"] = true - ctx.Data["PageIsAdminHooksNew"] = true + ctx.Data["PageIsAdminDefaultHooks"] = true + ctx.Data["PageIsAdminDefaultHooksNew"] = true } else { ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -139,13 +147,13 @@ func WebhooksNew(ctx *context.Context) { "IconURL": setting.AppURL + "img/favicon.png", } } - ctx.Data["BaseLink"] = orCtx.Link + ctx.Data["BaseLink"] = orCtx.LinkNew - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) } // ParseHookEvent convert web form content to models.HookEvent -func ParseHookEvent(form auth.WebhookForm) *models.HookEvent { +func ParseHookEvent(form forms.WebhookForm) *models.HookEvent { return &models.HookEvent{ PushOnly: form.PushOnly(), SendEverything: form.SendEverything(), @@ -175,7 +183,8 @@ func ParseHookEvent(form auth.WebhookForm) *models.HookEvent { } // GiteaHooksNewPost response for creating Gitea webhook -func GiteaHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) { +func GiteaHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewWebhookForm) ctx.Data["Title"] = ctx.Tr("repo.settings.add_webhook") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -187,10 +196,10 @@ func GiteaHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) { ctx.ServerError("getOrgRepoCtx", err) return } - ctx.Data["BaseLink"] = orCtx.Link + ctx.Data["BaseLink"] = orCtx.LinkNew if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -224,12 +233,13 @@ func GiteaHooksNewPost(ctx *context.Context, form auth.NewWebhookForm) { } // GogsHooksNewPost response for creating webhook -func GogsHooksNewPost(ctx *context.Context, form auth.NewGogshookForm) { - newGogsWebhookPost(ctx, form, models.GOGS) +func GogsHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewGogshookForm) + newGogsWebhookPost(ctx, *form, models.GOGS) } // newGogsWebhookPost response for creating gogs hook -func newGogsWebhookPost(ctx *context.Context, form auth.NewGogshookForm, kind models.HookTaskType) { +func newGogsWebhookPost(ctx *context.Context, form forms.NewGogshookForm, kind models.HookType) { ctx.Data["Title"] = ctx.Tr("repo.settings.add_webhook") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -241,10 +251,10 @@ func newGogsWebhookPost(ctx *context.Context, form auth.NewGogshookForm, kind mo ctx.ServerError("getOrgRepoCtx", err) return } - ctx.Data["BaseLink"] = orCtx.Link + ctx.Data["BaseLink"] = orCtx.LinkNew if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -277,7 +287,8 @@ func newGogsWebhookPost(ctx *context.Context, form auth.NewGogshookForm, kind mo } // DiscordHooksNewPost response for creating discord hook -func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm) { +func DiscordHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewDiscordHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -291,7 +302,7 @@ func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm) { } if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -328,7 +339,8 @@ func DiscordHooksNewPost(ctx *context.Context, form auth.NewDiscordHookForm) { } // DingtalkHooksNewPost response for creating dingtalk hook -func DingtalkHooksNewPost(ctx *context.Context, form auth.NewDingtalkHookForm) { +func DingtalkHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewDingtalkHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -342,7 +354,7 @@ func DingtalkHooksNewPost(ctx *context.Context, form auth.NewDingtalkHookForm) { } if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -370,7 +382,8 @@ func DingtalkHooksNewPost(ctx *context.Context, form auth.NewDingtalkHookForm) { } // TelegramHooksNewPost response for creating telegram hook -func TelegramHooksNewPost(ctx *context.Context, form auth.NewTelegramHookForm) { +func TelegramHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewTelegramHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -384,7 +397,7 @@ func TelegramHooksNewPost(ctx *context.Context, form auth.NewTelegramHookForm) { } if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -421,7 +434,8 @@ func TelegramHooksNewPost(ctx *context.Context, form auth.NewTelegramHookForm) { } // MatrixHooksNewPost response for creating a Matrix hook -func MatrixHooksNewPost(ctx *context.Context, form auth.NewMatrixHookForm) { +func MatrixHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewMatrixHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -435,7 +449,7 @@ func MatrixHooksNewPost(ctx *context.Context, form auth.NewMatrixHookForm) { } if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -475,7 +489,8 @@ func MatrixHooksNewPost(ctx *context.Context, form auth.NewMatrixHookForm) { } // MSTeamsHooksNewPost response for creating MS Teams hook -func MSTeamsHooksNewPost(ctx *context.Context, form auth.NewMSTeamsHookForm) { +func MSTeamsHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewMSTeamsHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -489,7 +504,7 @@ func MSTeamsHooksNewPost(ctx *context.Context, form auth.NewMSTeamsHookForm) { } if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -517,7 +532,8 @@ func MSTeamsHooksNewPost(ctx *context.Context, form auth.NewMSTeamsHookForm) { } // SlackHooksNewPost response for creating slack hook -func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) { +func SlackHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewSlackHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -531,13 +547,13 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) { } if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } if form.HasInvalidChannel() { ctx.Flash.Error(ctx.Tr("repo.settings.add_webhook.invalid_channel_name")) - ctx.Redirect(orCtx.Link + "/slack/new") + ctx.Redirect(orCtx.LinkNew + "/slack/new") return } @@ -576,7 +592,8 @@ func SlackHooksNewPost(ctx *context.Context, form auth.NewSlackHookForm) { } // FeishuHooksNewPost response for creating feishu hook -func FeishuHooksNewPost(ctx *context.Context, form auth.NewFeishuHookForm) { +func FeishuHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewFeishuHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksNew"] = true @@ -590,7 +607,7 @@ func FeishuHooksNewPost(ctx *context.Context, form auth.NewFeishuHookForm) { } if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -617,6 +634,50 @@ func FeishuHooksNewPost(ctx *context.Context, form auth.NewFeishuHookForm) { ctx.Redirect(orCtx.Link) } +// WechatworkHooksNewPost response for creating wechatwork hook +func WechatworkHooksNewPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewWechatWorkHookForm) + + ctx.Data["Title"] = ctx.Tr("repo.settings") + ctx.Data["PageIsSettingsHooks"] = true + ctx.Data["PageIsSettingsHooksNew"] = true + ctx.Data["Webhook"] = models.Webhook{HookEvent: &models.HookEvent{}} + ctx.Data["HookType"] = models.WECHATWORK + + orCtx, err := getOrgRepoCtx(ctx) + if err != nil { + ctx.ServerError("getOrgRepoCtx", err) + return + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, orCtx.NewTemplate) + return + } + + w := &models.Webhook{ + RepoID: orCtx.RepoID, + URL: form.PayloadURL, + ContentType: models.ContentTypeJSON, + HookEvent: ParseHookEvent(form.WebhookForm), + IsActive: form.Active, + Type: models.WECHATWORK, + Meta: "", + OrgID: orCtx.OrgID, + IsSystemWebhook: orCtx.IsSystemWebhook, + } + if err := w.UpdateEvent(); err != nil { + ctx.ServerError("UpdateEvent", err) + return + } else if err := models.CreateWebhook(w); err != nil { + ctx.ServerError("CreateWebhook", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.add_hook_success")) + ctx.Redirect(orCtx.Link) +} + func checkWebhook(ctx *context.Context) (*orgRepoCtx, *models.Webhook) { ctx.Data["RequireHighlightJS"] = true @@ -632,12 +693,10 @@ func checkWebhook(ctx *context.Context) (*orgRepoCtx, *models.Webhook) { w, err = models.GetWebhookByRepoID(ctx.Repo.Repository.ID, ctx.ParamsInt64(":id")) } else if orCtx.OrgID > 0 { w, err = models.GetWebhookByOrgID(ctx.Org.Organization.ID, ctx.ParamsInt64(":id")) - } else if orCtx.IsSystemWebhook { - w, err = models.GetSystemWebhook(ctx.ParamsInt64(":id")) - } else { - w, err = models.GetDefaultWebhook(ctx.ParamsInt64(":id")) + } else if orCtx.IsAdmin { + w, err = models.GetSystemOrDefaultWebhook(ctx.ParamsInt64(":id")) } - if err != nil { + if err != nil || w == nil { if models.IsErrWebhookNotExist(err) { ctx.NotFound("GetWebhookByID", nil) } else { @@ -677,11 +736,12 @@ func WebHooksEdit(ctx *context.Context) { } ctx.Data["Webhook"] = w - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) } // WebHooksEditPost response for editing web hook -func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) { +func WebHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewWebhookForm) ctx.Data["Title"] = ctx.Tr("repo.settings.update_webhook") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -693,7 +753,7 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -721,7 +781,8 @@ func WebHooksEditPost(ctx *context.Context, form auth.NewWebhookForm) { } // GogsHooksEditPost response for editing gogs hook -func GogsHooksEditPost(ctx *context.Context, form auth.NewGogshookForm) { +func GogsHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewGogshookForm) ctx.Data["Title"] = ctx.Tr("repo.settings.update_webhook") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -733,7 +794,7 @@ func GogsHooksEditPost(ctx *context.Context, form auth.NewGogshookForm) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -760,7 +821,8 @@ func GogsHooksEditPost(ctx *context.Context, form auth.NewGogshookForm) { } // SlackHooksEditPost response for editing slack hook -func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm) { +func SlackHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewSlackHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -772,7 +834,7 @@ func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -810,7 +872,8 @@ func SlackHooksEditPost(ctx *context.Context, form auth.NewSlackHookForm) { } // DiscordHooksEditPost response for editing discord hook -func DiscordHooksEditPost(ctx *context.Context, form auth.NewDiscordHookForm) { +func DiscordHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewDiscordHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -822,7 +885,7 @@ func DiscordHooksEditPost(ctx *context.Context, form auth.NewDiscordHookForm) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -852,7 +915,8 @@ func DiscordHooksEditPost(ctx *context.Context, form auth.NewDiscordHookForm) { } // DingtalkHooksEditPost response for editing discord hook -func DingtalkHooksEditPost(ctx *context.Context, form auth.NewDingtalkHookForm) { +func DingtalkHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewDingtalkHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -864,7 +928,7 @@ func DingtalkHooksEditPost(ctx *context.Context, form auth.NewDingtalkHookForm) ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -884,7 +948,8 @@ func DingtalkHooksEditPost(ctx *context.Context, form auth.NewDingtalkHookForm) } // TelegramHooksEditPost response for editing discord hook -func TelegramHooksEditPost(ctx *context.Context, form auth.NewTelegramHookForm) { +func TelegramHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewTelegramHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -896,9 +961,10 @@ func TelegramHooksEditPost(ctx *context.Context, form auth.NewTelegramHookForm) ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } + meta, err := json.Marshal(&webhook.TelegramMeta{ BotToken: form.BotToken, ChatID: form.ChatID, @@ -924,7 +990,8 @@ func TelegramHooksEditPost(ctx *context.Context, form auth.NewTelegramHookForm) } // MatrixHooksEditPost response for editing a Matrix hook -func MatrixHooksEditPost(ctx *context.Context, form auth.NewMatrixHookForm) { +func MatrixHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewMatrixHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -936,9 +1003,10 @@ func MatrixHooksEditPost(ctx *context.Context, form auth.NewMatrixHookForm) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } + meta, err := json.Marshal(&webhook.MatrixMeta{ HomeserverURL: form.HomeserverURL, Room: form.RoomID, @@ -967,7 +1035,8 @@ func MatrixHooksEditPost(ctx *context.Context, form auth.NewMatrixHookForm) { } // MSTeamsHooksEditPost response for editing MS Teams hook -func MSTeamsHooksEditPost(ctx *context.Context, form auth.NewMSTeamsHookForm) { +func MSTeamsHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewMSTeamsHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -979,7 +1048,7 @@ func MSTeamsHooksEditPost(ctx *context.Context, form auth.NewMSTeamsHookForm) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -999,7 +1068,8 @@ func MSTeamsHooksEditPost(ctx *context.Context, form auth.NewMSTeamsHookForm) { } // FeishuHooksEditPost response for editing feishu hook -func FeishuHooksEditPost(ctx *context.Context, form auth.NewFeishuHookForm) { +func FeishuHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewFeishuHookForm) ctx.Data["Title"] = ctx.Tr("repo.settings") ctx.Data["PageIsSettingsHooks"] = true ctx.Data["PageIsSettingsHooksEdit"] = true @@ -1011,7 +1081,40 @@ func FeishuHooksEditPost(ctx *context.Context, form auth.NewFeishuHookForm) { ctx.Data["Webhook"] = w if ctx.HasError() { - ctx.HTML(200, orCtx.NewTemplate) + ctx.HTML(http.StatusOK, orCtx.NewTemplate) + return + } + + w.URL = form.PayloadURL + w.HookEvent = ParseHookEvent(form.WebhookForm) + w.IsActive = form.Active + if err := w.UpdateEvent(); err != nil { + ctx.ServerError("UpdateEvent", err) + return + } else if err := models.UpdateWebhook(w); err != nil { + ctx.ServerError("UpdateWebhook", err) + return + } + + ctx.Flash.Success(ctx.Tr("repo.settings.update_hook_success")) + ctx.Redirect(fmt.Sprintf("%s/%d", orCtx.Link, w.ID)) +} + +// WechatworkHooksEditPost response for editing wechatwork hook +func WechatworkHooksEditPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewWechatWorkHookForm) + ctx.Data["Title"] = ctx.Tr("repo.settings") + ctx.Data["PageIsSettingsHooks"] = true + ctx.Data["PageIsSettingsHooksEdit"] = true + + orCtx, w := checkWebhook(ctx) + if ctx.Written() { + return + } + ctx.Data["Webhook"] = w + + if ctx.HasError() { + ctx.HTML(http.StatusOK, orCtx.NewTemplate) return } @@ -1052,29 +1155,31 @@ func TestWebhook(ctx *context.Context) { } } - apiUser := convert.ToUser(ctx.User, true, true) - p := &api.PushPayload{ - Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch, - Before: commit.ID.String(), - After: commit.ID.String(), - Commits: []*api.PayloadCommit{ - { - ID: commit.ID.String(), - Message: commit.Message(), - URL: ctx.Repo.Repository.HTMLURL() + "/commit/" + commit.ID.String(), - Author: &api.PayloadUser{ - Name: commit.Author.Name, - Email: commit.Author.Email, - }, - Committer: &api.PayloadUser{ - Name: commit.Committer.Name, - Email: commit.Committer.Email, - }, - }, + apiUser := convert.ToUserWithAccessMode(ctx.User, models.AccessModeNone) + + apiCommit := &api.PayloadCommit{ + ID: commit.ID.String(), + Message: commit.Message(), + URL: ctx.Repo.Repository.HTMLURL() + "/commit/" + commit.ID.String(), + Author: &api.PayloadUser{ + Name: commit.Author.Name, + Email: commit.Author.Email, }, - Repo: convert.ToRepo(ctx.Repo.Repository, models.AccessModeNone), - Pusher: apiUser, - Sender: apiUser, + Committer: &api.PayloadUser{ + Name: commit.Committer.Name, + Email: commit.Committer.Email, + }, + } + + p := &api.PushPayload{ + Ref: git.BranchPrefix + ctx.Repo.Repository.DefaultBranch, + Before: commit.ID.String(), + After: commit.ID.String(), + Commits: []*api.PayloadCommit{apiCommit}, + HeadCommit: apiCommit, + Repo: convert.ToRepo(ctx.Repo.Repository, models.AccessModeNone), + Pusher: apiUser, + Sender: apiUser, } if err := webhook.PrepareWebhook(w, ctx.Repo.Repository, models.HookEventPush, p); err != nil { ctx.Flash.Error("PrepareWebhook: " + err.Error()) @@ -1087,13 +1192,13 @@ func TestWebhook(ctx *context.Context) { // DeleteWebhook delete a webhook func DeleteWebhook(ctx *context.Context) { - if err := models.DeleteWebhookByRepoID(ctx.Repo.Repository.ID, ctx.QueryInt64("id")); err != nil { + if err := models.DeleteWebhookByRepoID(ctx.Repo.Repository.ID, ctx.FormInt64("id")); err != nil { ctx.Flash.Error("DeleteWebhookByRepoID: " + err.Error()) } else { ctx.Flash.Success(ctx.Tr("repo.settings.webhook_deletion_success")) } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": ctx.Repo.RepoLink + "/settings/hooks", }) } diff --git a/routers/repo/wiki.go b/routers/web/repo/wiki.go similarity index 88% rename from routers/repo/wiki.go rename to routers/web/repo/wiki.go index ac650d3fc..f0b91aae9 100644 --- a/routers/repo/wiki.go +++ b/routers/web/repo/wiki.go @@ -6,22 +6,27 @@ package repo import ( + "bytes" "fmt" "io/ioutil" + "net/http" "net/url" "path/filepath" "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/common" + "code.gitea.io/gitea/services/forms" wiki_service "code.gitea.io/gitea/services/wiki" ) @@ -130,6 +135,9 @@ func wikiContentsByName(ctx *context.Context, commit *git.Commit, wikiName strin func renderViewPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) { wikiRepo, commit, err := findWikiRepoCommit(ctx) if err != nil { + if wikiRepo != nil { + wikiRepo.Close() + } if !git.IsErrNotExist(err) { ctx.ServerError("GetBranchCommit", err) } @@ -209,12 +217,43 @@ func renderViewPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) { return nil, nil } - metas := ctx.Repo.Repository.ComposeDocumentMetas() - ctx.Data["content"] = markdown.RenderWiki(data, ctx.Repo.RepoLink, metas) + var rctx = &markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: ctx.Repo.Repository.ComposeDocumentMetas(), + IsWiki: true, + } + + var buf strings.Builder + if err := markdown.Render(rctx, bytes.NewReader(data), &buf); err != nil { + if wikiRepo != nil { + wikiRepo.Close() + } + ctx.ServerError("Render", err) + return nil, nil + } + ctx.Data["content"] = buf.String() + + buf.Reset() + if err := markdown.Render(rctx, bytes.NewReader(sidebarContent), &buf); err != nil { + if wikiRepo != nil { + wikiRepo.Close() + } + ctx.ServerError("Render", err) + return nil, nil + } ctx.Data["sidebarPresent"] = sidebarContent != nil - ctx.Data["sidebarContent"] = markdown.RenderWiki(sidebarContent, ctx.Repo.RepoLink, metas) + ctx.Data["sidebarContent"] = buf.String() + + buf.Reset() + if err := markdown.Render(rctx, bytes.NewReader(footerContent), &buf); err != nil { + if wikiRepo != nil { + wikiRepo.Close() + } + ctx.ServerError("Render", err) + return nil, nil + } ctx.Data["footerPresent"] = footerContent != nil - ctx.Data["footerContent"] = markdown.RenderWiki(footerContent, ctx.Repo.RepoLink, metas) + ctx.Data["footerContent"] = buf.String() // get commit count - wiki revisions commitsCount, _ := wikiRepo.FileCommitsCount("master", pageFilename) @@ -271,7 +310,7 @@ func renderRevisionPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) ctx.Data["CommitCount"] = commitsCount // get page - page := ctx.QueryInt("page") + page := ctx.FormInt("page") if page <= 1 { page = 1 } @@ -285,12 +324,9 @@ func renderRevisionPage(ctx *context.Context) (*git.Repository, *git.TreeEntry) ctx.ServerError("CommitsByFileAndRangeNoFollow", err) return nil, nil } - commitsHistory = models.ValidateCommitsWithEmails(commitsHistory) - commitsHistory = models.ParseCommitsWithSignature(commitsHistory, ctx.Repo.Repository) + ctx.Data["Commits"] = models.ConvertFromGitCommit(commitsHistory, ctx.Repo.Repository) - ctx.Data["Commits"] = commitsHistory - - pager := context.NewPagination(int(commitsCount), git.CommitsRangeSize, page, 5) + pager := context.NewPagination(int(commitsCount), setting.Git.CommitsRangeSize, page, 5) pager.SetDefaultParams(ctx) ctx.Data["Page"] = pager @@ -348,25 +384,22 @@ func Wiki(ctx *context.Context) { if !ctx.Repo.Repository.HasWiki() { ctx.Data["Title"] = ctx.Tr("repo.wiki") - ctx.HTML(200, tplWikiStart) + ctx.HTML(http.StatusOK, tplWikiStart) return } wikiRepo, entry := renderViewPage(ctx) - if ctx.Written() { - if wikiRepo != nil { - wikiRepo.Close() - } - return - } defer func() { if wikiRepo != nil { wikiRepo.Close() } }() + if ctx.Written() { + return + } if entry == nil { ctx.Data["Title"] = ctx.Tr("repo.wiki") - ctx.HTML(200, tplWikiStart) + ctx.HTML(http.StatusOK, tplWikiStart) return } @@ -383,7 +416,7 @@ func Wiki(ctx *context.Context) { } ctx.Data["Author"] = lastCommit.Author - ctx.HTML(200, tplWikiView) + ctx.HTML(http.StatusOK, tplWikiView) } // WikiRevision renders file revision list of wiki page @@ -393,25 +426,23 @@ func WikiRevision(ctx *context.Context) { if !ctx.Repo.Repository.HasWiki() { ctx.Data["Title"] = ctx.Tr("repo.wiki") - ctx.HTML(200, tplWikiStart) + ctx.HTML(http.StatusOK, tplWikiStart) return } wikiRepo, entry := renderRevisionPage(ctx) - if ctx.Written() { - if wikiRepo != nil { - wikiRepo.Close() - } - return - } defer func() { if wikiRepo != nil { wikiRepo.Close() } }() + + if ctx.Written() { + return + } if entry == nil { ctx.Data["Title"] = ctx.Tr("repo.wiki") - ctx.HTML(200, tplWikiStart) + ctx.HTML(http.StatusOK, tplWikiStart) return } @@ -424,7 +455,7 @@ func WikiRevision(ctx *context.Context) { } ctx.Data["Author"] = lastCommit.Author - ctx.HTML(200, tplWikiRevision) + ctx.HTML(http.StatusOK, tplWikiRevision) } // WikiPages render wiki pages list page @@ -445,13 +476,14 @@ func WikiPages(ctx *context.Context) { } return } - - entries, err := commit.ListEntries() - if err != nil { + defer func() { if wikiRepo != nil { wikiRepo.Close() } + }() + entries, err := commit.ListEntries() + if err != nil { ctx.ServerError("ListEntries", err) return } @@ -462,10 +494,6 @@ func WikiPages(ctx *context.Context) { } c, err := wikiRepo.GetCommitByPath(entry.Name()) if err != nil { - if wikiRepo != nil { - wikiRepo.Close() - } - ctx.ServerError("GetCommit", err) return } @@ -474,10 +502,6 @@ func WikiPages(ctx *context.Context) { if models.IsErrWikiInvalidFileName(err) { continue } - if wikiRepo != nil { - wikiRepo.Close() - } - ctx.ServerError("WikiFilenameToName", err) return } @@ -489,21 +513,25 @@ func WikiPages(ctx *context.Context) { } ctx.Data["Pages"] = pages - defer func() { - if wikiRepo != nil { - wikiRepo.Close() - } - }() - ctx.HTML(200, tplWikiPages) + ctx.HTML(http.StatusOK, tplWikiPages) } // WikiRaw outputs raw blob requested by user (image for example) func WikiRaw(ctx *context.Context) { wikiRepo, commit, err := findWikiRepoCommit(ctx) - if err != nil { + defer func() { if wikiRepo != nil { + wikiRepo.Close() + } + }() + + if err != nil { + if git.IsErrNotExist(err) { + ctx.NotFound("findEntryForFile", nil) return } + ctx.ServerError("findEntryForfile", err) + return } providedPath := ctx.Params("*") @@ -519,9 +547,7 @@ func WikiRaw(ctx *context.Context) { if entry == nil { // Try to find a wiki page with that name - if strings.HasSuffix(providedPath, ".md") { - providedPath = providedPath[:len(providedPath)-3] - } + providedPath = strings.TrimSuffix(providedPath, ".md") wikiPath := wiki_service.NameToFilename(providedPath) entry, err = findEntryForFile(commit, wikiPath) @@ -533,7 +559,7 @@ func WikiRaw(ctx *context.Context) { } if entry != nil { - if err = ServeBlob(ctx, entry.Blob()); err != nil { + if err = common.ServeBlob(ctx, entry.Blob()); err != nil { ctx.ServerError("ServeBlob", err) } return @@ -552,17 +578,18 @@ func NewWiki(ctx *context.Context) { ctx.Data["title"] = "Home" } - ctx.HTML(200, tplWikiNew) + ctx.HTML(http.StatusOK, tplWikiNew) } // NewWikiPost response for wiki create request -func NewWikiPost(ctx *context.Context, form auth.NewWikiForm) { +func NewWikiPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewWikiForm) ctx.Data["Title"] = ctx.Tr("repo.wiki.new_page") ctx.Data["PageIsWiki"] = true ctx.Data["RequireSimpleMDE"] = true if ctx.HasError() { - ctx.HTML(200, tplWikiNew) + ctx.HTML(http.StatusOK, tplWikiNew) return } @@ -609,17 +636,18 @@ func EditWiki(ctx *context.Context) { return } - ctx.HTML(200, tplWikiNew) + ctx.HTML(http.StatusOK, tplWikiNew) } // EditWikiPost response for wiki modify request -func EditWikiPost(ctx *context.Context, form auth.NewWikiForm) { +func EditWikiPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewWikiForm) ctx.Data["Title"] = ctx.Tr("repo.wiki.new_page") ctx.Data["PageIsWiki"] = true ctx.Data["RequireSimpleMDE"] = true if ctx.HasError() { - ctx.HTML(200, tplWikiNew) + ctx.HTML(http.StatusOK, tplWikiNew) return } @@ -650,7 +678,7 @@ func DeleteWikiPagePost(ctx *context.Context) { return } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": ctx.Repo.RepoLink + "/wiki/", }) } diff --git a/routers/repo/wiki_test.go b/routers/web/repo/wiki_test.go similarity index 93% rename from routers/repo/wiki_test.go rename to routers/web/repo/wiki_test.go index cc79c808f..bcdb8023a 100644 --- a/routers/repo/wiki_test.go +++ b/routers/web/repo/wiki_test.go @@ -10,9 +10,10 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" wiki_service "code.gitea.io/gitea/services/wiki" "github.com/stretchr/testify/assert" @@ -63,7 +64,7 @@ func assertPagesMetas(t *testing.T, expectedNames []string, metas interface{}) { if !assert.True(t, ok) { return } - if !assert.EqualValues(t, len(expectedNames), len(pageMetas)) { + if !assert.Len(t, pageMetas, len(expectedNames)) { return } for i, pageMeta := range pageMetas { @@ -80,7 +81,7 @@ func TestWiki(t *testing.T) { Wiki(ctx) assert.EqualValues(t, http.StatusOK, ctx.Resp.Status()) assert.EqualValues(t, "Home", ctx.Data["Title"]) - assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name"}, ctx.Data["Pages"]) + assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"]) } func TestWikiPages(t *testing.T) { @@ -90,7 +91,7 @@ func TestWikiPages(t *testing.T) { test.LoadRepo(t, ctx, 1) WikiPages(ctx) assert.EqualValues(t, http.StatusOK, ctx.Resp.Status()) - assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name"}, ctx.Data["Pages"]) + assertPagesMetas(t, []string{"Home", "Page With Image", "Page With Spaced Name", "Unescaped File"}, ctx.Data["Pages"]) } func TestNewWiki(t *testing.T) { @@ -114,11 +115,12 @@ func TestNewWikiPost(t *testing.T) { ctx := test.MockContext(t, "user2/repo1/wiki/_new") test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 1) - NewWikiPost(ctx, auth.NewWikiForm{ + web.SetForm(ctx, &forms.NewWikiForm{ Title: title, Content: content, Message: message, }) + NewWikiPost(ctx) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) assertWikiExists(t, ctx.Repo.Repository, title) assert.Equal(t, wikiContent(t, ctx.Repo.Repository, title), content) @@ -131,11 +133,12 @@ func TestNewWikiPost_ReservedName(t *testing.T) { ctx := test.MockContext(t, "user2/repo1/wiki/_new") test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 1) - NewWikiPost(ctx, auth.NewWikiForm{ + web.SetForm(ctx, &forms.NewWikiForm{ Title: "_edit", Content: content, Message: message, }) + NewWikiPost(ctx) assert.EqualValues(t, http.StatusOK, ctx.Resp.Status()) assert.EqualValues(t, ctx.Tr("repo.wiki.reserved_page"), ctx.Flash.ErrorMsg) assertWikiNotExists(t, ctx.Repo.Repository, "_edit") @@ -164,11 +167,12 @@ func TestEditWikiPost(t *testing.T) { ctx.SetParams(":page", "Home") test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 1) - EditWikiPost(ctx, auth.NewWikiForm{ + web.SetForm(ctx, &forms.NewWikiForm{ Title: title, Content: content, Message: message, }) + EditWikiPost(ctx) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) assertWikiExists(t, ctx.Repo.Repository, title) assert.Equal(t, wikiContent(t, ctx.Repo.Repository, title), content) diff --git a/routers/web/swagger_json.go b/routers/web/swagger_json.go new file mode 100644 index 000000000..82d72698c --- /dev/null +++ b/routers/web/swagger_json.go @@ -0,0 +1,26 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package web + +import ( + "net/http" + + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" +) + +// tplSwaggerV1Json swagger v1 json template +const tplSwaggerV1Json base.TplName = "swagger/v1_json" + +// SwaggerV1Json render swagger v1 json +func SwaggerV1Json(ctx *context.Context) { + t := ctx.Render.TemplateLookup(string(tplSwaggerV1Json)) + ctx.Resp.Header().Set("Content-Type", "application/json") + if err := t.Execute(ctx.Resp, ctx.Data); err != nil { + log.Error("%v", err) + ctx.Error(http.StatusInternalServerError) + } +} diff --git a/routers/web/user/auth.go b/routers/web/user/auth.go new file mode 100644 index 000000000..313a58300 --- /dev/null +++ b/routers/web/user/auth.go @@ -0,0 +1,1776 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "errors" + "fmt" + "io" + "io/ioutil" + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/eventsource" + "code.gitea.io/gitea/modules/hcaptcha" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/password" + "code.gitea.io/gitea/modules/recaptcha" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/routers/utils" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/oauth2" + "code.gitea.io/gitea/services/externalaccount" + "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/mailer" + + "github.com/markbates/goth" + "github.com/tstranex/u2f" +) + +const ( + // tplMustChangePassword template for updating a user's password + tplMustChangePassword = "user/auth/change_passwd" + // tplSignIn template for sign in page + tplSignIn base.TplName = "user/auth/signin" + // tplSignUp template path for sign up page + tplSignUp base.TplName = "user/auth/signup" + // TplActivate template path for activate user + TplActivate base.TplName = "user/auth/activate" + tplForgotPassword base.TplName = "user/auth/forgot_passwd" + tplResetPassword base.TplName = "user/auth/reset_passwd" + tplTwofa base.TplName = "user/auth/twofa" + tplTwofaScratch base.TplName = "user/auth/twofa_scratch" + tplLinkAccount base.TplName = "user/auth/link_account" + tplU2F base.TplName = "user/auth/u2f" +) + +// AutoSignIn reads cookie and try to auto-login. +func AutoSignIn(ctx *context.Context) (bool, error) { + if !models.HasEngine { + return false, nil + } + + uname := ctx.GetCookie(setting.CookieUserName) + if len(uname) == 0 { + return false, nil + } + + isSucceed := false + defer func() { + if !isSucceed { + log.Trace("auto-login cookie cleared: %s", uname) + ctx.DeleteCookie(setting.CookieUserName) + ctx.DeleteCookie(setting.CookieRememberName) + } + }() + + u, err := models.GetUserByName(uname) + if err != nil { + if !models.IsErrUserNotExist(err) { + return false, fmt.Errorf("GetUserByName: %v", err) + } + return false, nil + } + + if val, ok := ctx.GetSuperSecureCookie( + base.EncodeMD5(u.Rands+u.Passwd), setting.CookieRememberName); !ok || val != u.Name { + return false, nil + } + + isSucceed = true + + // Set session IDs + if err := ctx.Session.Set("uid", u.ID); err != nil { + return false, err + } + if err := ctx.Session.Set("uname", u.Name); err != nil { + return false, err + } + if err := ctx.Session.Release(); err != nil { + return false, err + } + + middleware.DeleteCSRFCookie(ctx.Resp) + return true, nil +} + +func checkAutoLogin(ctx *context.Context) bool { + // Check auto-login. + isSucceed, err := AutoSignIn(ctx) + if err != nil { + ctx.ServerError("AutoSignIn", err) + return true + } + + redirectTo := ctx.FormString("redirect_to") + if len(redirectTo) > 0 { + middleware.SetRedirectToCookie(ctx.Resp, redirectTo) + } else { + redirectTo = ctx.GetCookie("redirect_to") + } + + if isSucceed { + middleware.DeleteRedirectToCookie(ctx.Resp) + ctx.RedirectToFirst(redirectTo, setting.AppSubURL+string(setting.LandingPageURL)) + return true + } + + return false +} + +// SignIn render sign in page +func SignIn(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("sign_in") + + // Check auto-login. + if checkAutoLogin(ctx) { + return + } + + orderedOAuth2Names, oauth2Providers, err := oauth2.GetActiveOAuth2Providers() + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + ctx.Data["OrderedOAuth2Names"] = orderedOAuth2Names + ctx.Data["OAuth2Providers"] = oauth2Providers + ctx.Data["Title"] = ctx.Tr("sign_in") + ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login" + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsLogin"] = true + ctx.Data["EnableSSPI"] = models.IsSSPIEnabled() + + ctx.HTML(http.StatusOK, tplSignIn) +} + +// SignInPost response for sign in request +func SignInPost(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("sign_in") + + orderedOAuth2Names, oauth2Providers, err := oauth2.GetActiveOAuth2Providers() + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + ctx.Data["OrderedOAuth2Names"] = orderedOAuth2Names + ctx.Data["OAuth2Providers"] = oauth2Providers + ctx.Data["Title"] = ctx.Tr("sign_in") + ctx.Data["SignInLink"] = setting.AppSubURL + "/user/login" + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsLogin"] = true + ctx.Data["EnableSSPI"] = models.IsSSPIEnabled() + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplSignIn) + return + } + + form := web.GetForm(ctx).(*forms.SignInForm) + u, err := auth.UserSignIn(form.UserName, form.Password) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplSignIn, &form) + log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) + } else if models.IsErrEmailAlreadyUsed(err) { + ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSignIn, &form) + log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) + } else if models.IsErrUserProhibitLogin(err) { + log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) + ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") + ctx.HTML(http.StatusOK, "user/auth/prohibit_login") + } else if models.IsErrUserInactive(err) { + if setting.Service.RegisterEmailConfirm { + ctx.Data["Title"] = ctx.Tr("auth.active_your_account") + ctx.HTML(http.StatusOK, TplActivate) + } else { + log.Info("Failed authentication attempt for %s from %s: %v", form.UserName, ctx.RemoteAddr(), err) + ctx.Data["Title"] = ctx.Tr("auth.prohibit_login") + ctx.HTML(http.StatusOK, "user/auth/prohibit_login") + } + } else { + ctx.ServerError("UserSignIn", err) + } + return + } + // If this user is enrolled in 2FA, we can't sign the user in just yet. + // Instead, redirect them to the 2FA authentication page. + _, err = models.GetTwoFactorByUID(u.ID) + if err != nil { + if models.IsErrTwoFactorNotEnrolled(err) { + handleSignIn(ctx, u, form.Remember) + } else { + ctx.ServerError("UserSignIn", err) + } + return + } + + // User needs to use 2FA, save data and redirect to 2FA page. + if err := ctx.Session.Set("twofaUid", u.ID); err != nil { + ctx.ServerError("UserSignIn: Unable to set twofaUid in session", err) + return + } + if err := ctx.Session.Set("twofaRemember", form.Remember); err != nil { + ctx.ServerError("UserSignIn: Unable to set twofaRemember in session", err) + return + } + if err := ctx.Session.Release(); err != nil { + ctx.ServerError("UserSignIn: Unable to save session", err) + return + } + + regs, err := models.GetU2FRegistrationsByUID(u.ID) + if err == nil && len(regs) > 0 { + ctx.Redirect(setting.AppSubURL + "/user/u2f") + return + } + + ctx.Redirect(setting.AppSubURL + "/user/two_factor") +} + +// TwoFactor shows the user a two-factor authentication page. +func TwoFactor(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("twofa") + + // Check auto-login. + if checkAutoLogin(ctx) { + return + } + + // Ensure user is in a 2FA session. + if ctx.Session.Get("twofaUid") == nil { + ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) + return + } + + ctx.HTML(http.StatusOK, tplTwofa) +} + +// TwoFactorPost validates a user's two-factor authentication token. +func TwoFactorPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.TwoFactorAuthForm) + ctx.Data["Title"] = ctx.Tr("twofa") + + // Ensure user is in a 2FA session. + idSess := ctx.Session.Get("twofaUid") + if idSess == nil { + ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) + return + } + + id := idSess.(int64) + twofa, err := models.GetTwoFactorByUID(id) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + // Validate the passcode with the stored TOTP secret. + ok, err := twofa.ValidateTOTP(form.Passcode) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + if ok && twofa.LastUsedPasscode != form.Passcode { + remember := ctx.Session.Get("twofaRemember").(bool) + u, err := models.GetUserByID(id) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + if ctx.Session.Get("linkAccount") != nil { + gothUser := ctx.Session.Get("linkAccountGothUser") + if gothUser == nil { + ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) + return + } + + err = externalaccount.LinkAccountToUser(u, gothUser.(goth.User)) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + } + + twofa.LastUsedPasscode = form.Passcode + if err = models.UpdateTwoFactor(twofa); err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + handleSignIn(ctx, u, remember) + return + } + + ctx.RenderWithErr(ctx.Tr("auth.twofa_passcode_incorrect"), tplTwofa, forms.TwoFactorAuthForm{}) +} + +// TwoFactorScratch shows the scratch code form for two-factor authentication. +func TwoFactorScratch(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("twofa_scratch") + + // Check auto-login. + if checkAutoLogin(ctx) { + return + } + + // Ensure user is in a 2FA session. + if ctx.Session.Get("twofaUid") == nil { + ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) + return + } + + ctx.HTML(http.StatusOK, tplTwofaScratch) +} + +// TwoFactorScratchPost validates and invalidates a user's two-factor scratch token. +func TwoFactorScratchPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.TwoFactorScratchAuthForm) + ctx.Data["Title"] = ctx.Tr("twofa_scratch") + + // Ensure user is in a 2FA session. + idSess := ctx.Session.Get("twofaUid") + if idSess == nil { + ctx.ServerError("UserSignIn", errors.New("not in 2FA session")) + return + } + + id := idSess.(int64) + twofa, err := models.GetTwoFactorByUID(id) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + // Validate the passcode with the stored TOTP secret. + if twofa.VerifyScratchToken(form.Token) { + // Invalidate the scratch token. + _, err = twofa.GenerateScratchToken() + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + if err = models.UpdateTwoFactor(twofa); err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + remember := ctx.Session.Get("twofaRemember").(bool) + u, err := models.GetUserByID(id) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + handleSignInFull(ctx, u, remember, false) + ctx.Flash.Info(ctx.Tr("auth.twofa_scratch_used")) + ctx.Redirect(setting.AppSubURL + "/user/settings/security") + return + } + + ctx.RenderWithErr(ctx.Tr("auth.twofa_scratch_token_incorrect"), tplTwofaScratch, forms.TwoFactorScratchAuthForm{}) +} + +// U2F shows the U2F login page +func U2F(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("twofa") + ctx.Data["RequireU2F"] = true + // Check auto-login. + if checkAutoLogin(ctx) { + return + } + + // Ensure user is in a 2FA session. + if ctx.Session.Get("twofaUid") == nil { + ctx.ServerError("UserSignIn", errors.New("not in U2F session")) + return + } + + ctx.HTML(http.StatusOK, tplU2F) +} + +// U2FChallenge submits a sign challenge to the browser +func U2FChallenge(ctx *context.Context) { + // Ensure user is in a U2F session. + idSess := ctx.Session.Get("twofaUid") + if idSess == nil { + ctx.ServerError("UserSignIn", errors.New("not in U2F session")) + return + } + id := idSess.(int64) + regs, err := models.GetU2FRegistrationsByUID(id) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + if len(regs) == 0 { + ctx.ServerError("UserSignIn", errors.New("no device registered")) + return + } + challenge, err := u2f.NewChallenge(setting.U2F.AppID, setting.U2F.TrustedFacets) + if err != nil { + ctx.ServerError("u2f.NewChallenge", err) + return + } + if err := ctx.Session.Set("u2fChallenge", challenge); err != nil { + ctx.ServerError("UserSignIn: unable to set u2fChallenge in session", err) + return + } + if err := ctx.Session.Release(); err != nil { + ctx.ServerError("UserSignIn: unable to store session", err) + } + + ctx.JSON(http.StatusOK, challenge.SignRequest(regs.ToRegistrations())) +} + +// U2FSign authenticates the user by signResp +func U2FSign(ctx *context.Context) { + signResp := web.GetForm(ctx).(*u2f.SignResponse) + challSess := ctx.Session.Get("u2fChallenge") + idSess := ctx.Session.Get("twofaUid") + if challSess == nil || idSess == nil { + ctx.ServerError("UserSignIn", errors.New("not in U2F session")) + return + } + challenge := challSess.(*u2f.Challenge) + id := idSess.(int64) + regs, err := models.GetU2FRegistrationsByUID(id) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + for _, reg := range regs { + r, err := reg.Parse() + if err != nil { + log.Fatal("parsing u2f registration: %v", err) + continue + } + newCounter, authErr := r.Authenticate(*signResp, *challenge, reg.Counter) + if authErr == nil { + reg.Counter = newCounter + user, err := models.GetUserByID(id) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + remember := ctx.Session.Get("twofaRemember").(bool) + if err := reg.UpdateCounter(); err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + if ctx.Session.Get("linkAccount") != nil { + gothUser := ctx.Session.Get("linkAccountGothUser") + if gothUser == nil { + ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) + return + } + + err = externalaccount.LinkAccountToUser(user, gothUser.(goth.User)) + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + } + redirect := handleSignInFull(ctx, user, remember, false) + if redirect == "" { + redirect = setting.AppSubURL + "/" + } + ctx.PlainText(200, []byte(redirect)) + return + } + } + ctx.Error(http.StatusUnauthorized) +} + +// This handles the final part of the sign-in process of the user. +func handleSignIn(ctx *context.Context, u *models.User, remember bool) { + handleSignInFull(ctx, u, remember, true) +} + +func handleSignInFull(ctx *context.Context, u *models.User, remember bool, obeyRedirect bool) string { + if remember { + days := 86400 * setting.LogInRememberDays + ctx.SetCookie(setting.CookieUserName, u.Name, days) + ctx.SetSuperSecureCookie(base.EncodeMD5(u.Rands+u.Passwd), + setting.CookieRememberName, u.Name, days) + } + + _ = ctx.Session.Delete("openid_verified_uri") + _ = ctx.Session.Delete("openid_signin_remember") + _ = ctx.Session.Delete("openid_determined_email") + _ = ctx.Session.Delete("openid_determined_username") + _ = ctx.Session.Delete("twofaUid") + _ = ctx.Session.Delete("twofaRemember") + _ = ctx.Session.Delete("u2fChallenge") + _ = ctx.Session.Delete("linkAccount") + if err := ctx.Session.Set("uid", u.ID); err != nil { + log.Error("Error setting uid %d in session: %v", u.ID, err) + } + if err := ctx.Session.Set("uname", u.Name); err != nil { + log.Error("Error setting uname %s session: %v", u.Name, err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("Unable to store session: %v", err) + } + + // Language setting of the user overwrites the one previously set + // If the user does not have a locale set, we save the current one. + if len(u.Language) == 0 { + u.Language = ctx.Locale.Language() + if err := models.UpdateUserCols(u, "language"); err != nil { + log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", u.ID, u.Language)) + return setting.AppSubURL + "/" + } + } + + middleware.SetLocaleCookie(ctx.Resp, u.Language, 0) + + // Clear whatever CSRF has right now, force to generate a new one + middleware.DeleteCSRFCookie(ctx.Resp) + + // Register last login + u.SetLastLogin() + if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { + ctx.ServerError("UpdateUserCols", err) + return setting.AppSubURL + "/" + } + + if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !utils.IsExternalURL(redirectTo) { + middleware.DeleteRedirectToCookie(ctx.Resp) + if obeyRedirect { + ctx.RedirectToFirst(redirectTo) + } + return redirectTo + } + + if obeyRedirect { + ctx.Redirect(setting.AppSubURL + "/") + } + return setting.AppSubURL + "/" +} + +// SignInOAuth handles the OAuth2 login buttons +func SignInOAuth(ctx *context.Context) { + provider := ctx.Params(":provider") + + loginSource, err := models.GetActiveOAuth2LoginSourceByName(provider) + if err != nil { + ctx.ServerError("SignIn", err) + return + } + + // try to do a direct callback flow, so we don't authenticate the user again but use the valid accesstoken to get the user + user, gothUser, err := oAuth2UserLoginCallback(loginSource, ctx.Req, ctx.Resp) + if err == nil && user != nil { + // we got the user without going through the whole OAuth2 authentication flow again + handleOAuth2SignIn(ctx, user, gothUser) + return + } + + if err = loginSource.Cfg.(*oauth2.Source).Callout(ctx.Req, ctx.Resp); err != nil { + if strings.Contains(err.Error(), "no provider for ") { + if err = oauth2.ResetOAuth2(); err != nil { + ctx.ServerError("SignIn", err) + return + } + if err = loginSource.Cfg.(*oauth2.Source).Callout(ctx.Req, ctx.Resp); err != nil { + ctx.ServerError("SignIn", err) + } + return + } + ctx.ServerError("SignIn", err) + } + // redirect is done in oauth2.Auth +} + +// SignInOAuthCallback handles the callback from the given provider +func SignInOAuthCallback(ctx *context.Context) { + provider := ctx.Params(":provider") + + // first look if the provider is still active + loginSource, err := models.GetActiveOAuth2LoginSourceByName(provider) + if err != nil { + ctx.ServerError("SignIn", err) + return + } + + if loginSource == nil { + ctx.ServerError("SignIn", errors.New("No valid provider found, check configured callback url in provider")) + return + } + + u, gothUser, err := oAuth2UserLoginCallback(loginSource, ctx.Req, ctx.Resp) + + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + if u == nil { + if !(setting.Service.DisableRegistration || setting.Service.AllowOnlyInternalRegistration) && setting.OAuth2Client.EnableAutoRegistration { + // create new user with details from oauth2 provider + var missingFields []string + if gothUser.UserID == "" { + missingFields = append(missingFields, "sub") + } + if gothUser.Email == "" { + missingFields = append(missingFields, "email") + } + if setting.OAuth2Client.Username == setting.OAuth2UsernameNickname && gothUser.NickName == "" { + missingFields = append(missingFields, "nickname") + } + if len(missingFields) > 0 { + log.Error("OAuth2 Provider %s returned empty or missing fields: %s", loginSource.Name, missingFields) + if loginSource.IsOAuth2() && loginSource.Cfg.(*oauth2.Source).Provider == "openidConnect" { + log.Error("You may need to change the 'OPENID_CONNECT_SCOPES' setting to request all required fields") + } + err = fmt.Errorf("OAuth2 Provider %s returned empty or missing fields: %s", loginSource.Name, missingFields) + ctx.ServerError("CreateUser", err) + return + } + u = &models.User{ + Name: getUserName(&gothUser), + FullName: gothUser.Name, + Email: gothUser.Email, + IsActive: !setting.OAuth2Client.RegisterEmailConfirm, + LoginType: models.LoginOAuth2, + LoginSource: loginSource.ID, + LoginName: gothUser.UserID, + } + + if !createAndHandleCreatedUser(ctx, base.TplName(""), nil, u, &gothUser, setting.OAuth2Client.AccountLinking != setting.OAuth2AccountLinkingDisabled) { + // error already handled + return + } + } else { + // no existing user is found, request attach or new account + showLinkingLogin(ctx, gothUser) + return + } + } + + handleOAuth2SignIn(ctx, u, gothUser) +} + +func getUserName(gothUser *goth.User) string { + switch setting.OAuth2Client.Username { + case setting.OAuth2UsernameEmail: + return strings.Split(gothUser.Email, "@")[0] + case setting.OAuth2UsernameNickname: + return gothUser.NickName + default: // OAuth2UsernameUserid + return gothUser.UserID + } +} + +func showLinkingLogin(ctx *context.Context, gothUser goth.User) { + if err := ctx.Session.Set("linkAccountGothUser", gothUser); err != nil { + log.Error("Error setting linkAccountGothUser in session: %v", err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("Error storing session: %v", err) + } + ctx.Redirect(setting.AppSubURL + "/user/link_account") +} + +func updateAvatarIfNeed(url string, u *models.User) { + if setting.OAuth2Client.UpdateAvatar && len(url) > 0 { + resp, err := http.Get(url) + if err == nil { + defer func() { + _ = resp.Body.Close() + }() + } + // ignore any error + if err == nil && resp.StatusCode == http.StatusOK { + data, err := ioutil.ReadAll(io.LimitReader(resp.Body, setting.Avatar.MaxFileSize+1)) + if err == nil && int64(len(data)) <= setting.Avatar.MaxFileSize { + _ = u.UploadAvatar(data) + } + } + } +} + +func handleOAuth2SignIn(ctx *context.Context, u *models.User, gothUser goth.User) { + updateAvatarIfNeed(gothUser.AvatarURL, u) + + // If this user is enrolled in 2FA, we can't sign the user in just yet. + // Instead, redirect them to the 2FA authentication page. + _, err := models.GetTwoFactorByUID(u.ID) + if err != nil { + if !models.IsErrTwoFactorNotEnrolled(err) { + ctx.ServerError("UserSignIn", err) + return + } + + if err := ctx.Session.Set("uid", u.ID); err != nil { + log.Error("Error setting uid in session: %v", err) + } + if err := ctx.Session.Set("uname", u.Name); err != nil { + log.Error("Error setting uname in session: %v", err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("Error storing session: %v", err) + } + + // Clear whatever CSRF has right now, force to generate a new one + middleware.DeleteCSRFCookie(ctx.Resp) + + // Register last login + u.SetLastLogin() + if err := models.UpdateUserCols(u, "last_login_unix"); err != nil { + ctx.ServerError("UpdateUserCols", err) + return + } + + // update external user information + if err := models.UpdateExternalUser(u, gothUser); err != nil { + log.Error("UpdateExternalUser failed: %v", err) + } + + if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 { + middleware.DeleteRedirectToCookie(ctx.Resp) + ctx.RedirectToFirst(redirectTo) + return + } + + ctx.Redirect(setting.AppSubURL + "/") + return + } + + // User needs to use 2FA, save data and redirect to 2FA page. + if err := ctx.Session.Set("twofaUid", u.ID); err != nil { + log.Error("Error setting twofaUid in session: %v", err) + } + if err := ctx.Session.Set("twofaRemember", false); err != nil { + log.Error("Error setting twofaRemember in session: %v", err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("Error storing session: %v", err) + } + + // If U2F is enrolled -> Redirect to U2F instead + regs, err := models.GetU2FRegistrationsByUID(u.ID) + if err == nil && len(regs) > 0 { + ctx.Redirect(setting.AppSubURL + "/user/u2f") + return + } + + ctx.Redirect(setting.AppSubURL + "/user/two_factor") +} + +// OAuth2UserLoginCallback attempts to handle the callback from the OAuth2 provider and if successful +// login the user +func oAuth2UserLoginCallback(loginSource *models.LoginSource, request *http.Request, response http.ResponseWriter) (*models.User, goth.User, error) { + gothUser, err := loginSource.Cfg.(*oauth2.Source).Callback(request, response) + if err != nil { + if err.Error() == "securecookie: the value is too long" { + log.Error("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", loginSource.Name, setting.OAuth2.MaxTokenLength) + err = fmt.Errorf("OAuth2 Provider %s returned too long a token. Current max: %d. Either increase the [OAuth2] MAX_TOKEN_LENGTH or reduce the information returned from the OAuth2 provider", loginSource.Name, setting.OAuth2.MaxTokenLength) + } + return nil, goth.User{}, err + } + + user := &models.User{ + LoginName: gothUser.UserID, + LoginType: models.LoginOAuth2, + LoginSource: loginSource.ID, + } + + hasUser, err := models.GetUser(user) + if err != nil { + return nil, goth.User{}, err + } + + if hasUser { + return user, gothUser, nil + } + + // search in external linked users + externalLoginUser := &models.ExternalLoginUser{ + ExternalID: gothUser.UserID, + LoginSourceID: loginSource.ID, + } + hasUser, err = models.GetExternalLogin(externalLoginUser) + if err != nil { + return nil, goth.User{}, err + } + if hasUser { + user, err = models.GetUserByID(externalLoginUser.UserID) + return user, gothUser, err + } + + // no user found to login + return nil, gothUser, nil + +} + +// LinkAccount shows the page where the user can decide to login or create a new account +func LinkAccount(ctx *context.Context) { + ctx.Data["DisablePassword"] = !setting.Service.RequireExternalRegistrationPassword || setting.Service.AllowOnlyExternalRegistration + ctx.Data["Title"] = ctx.Tr("link_account") + ctx.Data["LinkAccountMode"] = true + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha + ctx.Data["Captcha"] = context.GetImageCaptcha() + ctx.Data["CaptchaType"] = setting.Service.CaptchaType + ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL + ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey + ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration + ctx.Data["AllowOnlyInternalRegistration"] = setting.Service.AllowOnlyInternalRegistration + ctx.Data["ShowRegistrationButton"] = false + + // use this to set the right link into the signIn and signUp templates in the link_account template + ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin" + ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/link_account_signup" + + gothUser := ctx.Session.Get("linkAccountGothUser") + if gothUser == nil { + ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) + return + } + + gu, _ := gothUser.(goth.User) + uname := getUserName(&gu) + email := gu.Email + ctx.Data["user_name"] = uname + ctx.Data["email"] = email + + if len(email) != 0 { + u, err := models.GetUserByEmail(email) + if err != nil && !models.IsErrUserNotExist(err) { + ctx.ServerError("UserSignIn", err) + return + } + if u != nil { + ctx.Data["user_exists"] = true + } + } else if len(uname) != 0 { + u, err := models.GetUserByName(uname) + if err != nil && !models.IsErrUserNotExist(err) { + ctx.ServerError("UserSignIn", err) + return + } + if u != nil { + ctx.Data["user_exists"] = true + } + } + + ctx.HTML(http.StatusOK, tplLinkAccount) +} + +// LinkAccountPostSignIn handle the coupling of external account with another account using signIn +func LinkAccountPostSignIn(ctx *context.Context) { + signInForm := web.GetForm(ctx).(*forms.SignInForm) + ctx.Data["DisablePassword"] = !setting.Service.RequireExternalRegistrationPassword || setting.Service.AllowOnlyExternalRegistration + ctx.Data["Title"] = ctx.Tr("link_account") + ctx.Data["LinkAccountMode"] = true + ctx.Data["LinkAccountModeSignIn"] = true + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha + ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL + ctx.Data["Captcha"] = context.GetImageCaptcha() + ctx.Data["CaptchaType"] = setting.Service.CaptchaType + ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey + ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration + ctx.Data["ShowRegistrationButton"] = false + + // use this to set the right link into the signIn and signUp templates in the link_account template + ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin" + ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/link_account_signup" + + gothUser := ctx.Session.Get("linkAccountGothUser") + if gothUser == nil { + ctx.ServerError("UserSignIn", errors.New("not in LinkAccount session")) + return + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplLinkAccount) + return + } + + u, err := auth.UserSignIn(signInForm.UserName, signInForm.Password) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.Data["user_exists"] = true + ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplLinkAccount, &signInForm) + } else { + ctx.ServerError("UserLinkAccount", err) + } + return + } + + linkAccount(ctx, u, gothUser.(goth.User), signInForm.Remember) +} + +func linkAccount(ctx *context.Context, u *models.User, gothUser goth.User, remember bool) { + updateAvatarIfNeed(gothUser.AvatarURL, u) + + // If this user is enrolled in 2FA, we can't sign the user in just yet. + // Instead, redirect them to the 2FA authentication page. + _, err := models.GetTwoFactorByUID(u.ID) + if err != nil { + if !models.IsErrTwoFactorNotEnrolled(err) { + ctx.ServerError("UserLinkAccount", err) + return + } + + err = externalaccount.LinkAccountToUser(u, gothUser) + if err != nil { + ctx.ServerError("UserLinkAccount", err) + return + } + + handleSignIn(ctx, u, remember) + return + } + + // User needs to use 2FA, save data and redirect to 2FA page. + if err := ctx.Session.Set("twofaUid", u.ID); err != nil { + log.Error("Error setting twofaUid in session: %v", err) + } + if err := ctx.Session.Set("twofaRemember", remember); err != nil { + log.Error("Error setting twofaRemember in session: %v", err) + } + if err := ctx.Session.Set("linkAccount", true); err != nil { + log.Error("Error setting linkAccount in session: %v", err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("Error storing session: %v", err) + } + + // If U2F is enrolled -> Redirect to U2F instead + regs, err := models.GetU2FRegistrationsByUID(u.ID) + if err == nil && len(regs) > 0 { + ctx.Redirect(setting.AppSubURL + "/user/u2f") + return + } + + ctx.Redirect(setting.AppSubURL + "/user/two_factor") +} + +// LinkAccountPostRegister handle the creation of a new account for an external account using signUp +func LinkAccountPostRegister(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.RegisterForm) + // TODO Make insecure passwords optional for local accounts also, + // once email-based Second-Factor Auth is available + ctx.Data["DisablePassword"] = !setting.Service.RequireExternalRegistrationPassword || setting.Service.AllowOnlyExternalRegistration + ctx.Data["Title"] = ctx.Tr("link_account") + ctx.Data["LinkAccountMode"] = true + ctx.Data["LinkAccountModeRegister"] = true + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha + ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL + ctx.Data["Captcha"] = context.GetImageCaptcha() + ctx.Data["CaptchaType"] = setting.Service.CaptchaType + ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey + ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration + ctx.Data["ShowRegistrationButton"] = false + + // use this to set the right link into the signIn and signUp templates in the link_account template + ctx.Data["SignInLink"] = setting.AppSubURL + "/user/link_account_signin" + ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/link_account_signup" + + gothUserInterface := ctx.Session.Get("linkAccountGothUser") + if gothUserInterface == nil { + ctx.ServerError("UserSignUp", errors.New("not in LinkAccount session")) + return + } + gothUser, ok := gothUserInterface.(goth.User) + if !ok { + ctx.ServerError("UserSignUp", fmt.Errorf("session linkAccountGothUser type is %t but not goth.User", gothUserInterface)) + return + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplLinkAccount) + return + } + + if setting.Service.DisableRegistration || setting.Service.AllowOnlyInternalRegistration { + ctx.Error(http.StatusForbidden) + return + } + + if setting.Service.EnableCaptcha && setting.Service.RequireExternalRegistrationCaptcha { + var valid bool + var err error + switch setting.Service.CaptchaType { + case setting.ImageCaptcha: + valid = context.GetImageCaptcha().VerifyReq(ctx.Req) + case setting.ReCaptcha: + valid, err = recaptcha.Verify(ctx, form.GRecaptchaResponse) + case setting.HCaptcha: + valid, err = hcaptcha.Verify(ctx, form.HcaptchaResponse) + default: + ctx.ServerError("Unknown Captcha Type", fmt.Errorf("Unknown Captcha Type: %s", setting.Service.CaptchaType)) + return + } + if err != nil { + log.Debug("%s", err.Error()) + } + + if !valid { + ctx.Data["Err_Captcha"] = true + ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), tplLinkAccount, &form) + return + } + } + + if !form.IsEmailDomainAllowed() { + ctx.RenderWithErr(ctx.Tr("auth.email_domain_blacklisted"), tplLinkAccount, &form) + return + } + + if setting.Service.AllowOnlyExternalRegistration || !setting.Service.RequireExternalRegistrationPassword { + // In models.User an empty password is classed as not set, so we set form.Password to empty. + // Eventually the database should be changed to indicate "Second Factor"-enabled accounts + // (accounts that do not introduce the security vulnerabilities of a password). + // If a user decides to circumvent second-factor security, and purposefully create a password, + // they can still do so using the "Recover Account" option. + form.Password = "" + } else { + if (len(strings.TrimSpace(form.Password)) > 0 || len(strings.TrimSpace(form.Retype)) > 0) && form.Password != form.Retype { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplLinkAccount, &form) + return + } + if len(strings.TrimSpace(form.Password)) > 0 && len(form.Password) < setting.MinPasswordLength { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplLinkAccount, &form) + return + } + } + + loginSource, err := models.GetActiveOAuth2LoginSourceByName(gothUser.Provider) + if err != nil { + ctx.ServerError("CreateUser", err) + } + + u := &models.User{ + Name: form.UserName, + Email: form.Email, + Passwd: form.Password, + IsActive: !(setting.Service.RegisterEmailConfirm || setting.Service.RegisterManualConfirm), + LoginType: models.LoginOAuth2, + LoginSource: loginSource.ID, + LoginName: gothUser.UserID, + } + + if !createAndHandleCreatedUser(ctx, tplLinkAccount, form, u, &gothUser, false) { + // error already handled + return + } + + ctx.Redirect(setting.AppSubURL + "/user/login") +} + +// HandleSignOut resets the session and sets the cookies +func HandleSignOut(ctx *context.Context) { + _ = ctx.Session.Flush() + _ = ctx.Session.Destroy(ctx.Resp, ctx.Req) + ctx.DeleteCookie(setting.CookieUserName) + ctx.DeleteCookie(setting.CookieRememberName) + middleware.DeleteCSRFCookie(ctx.Resp) + middleware.DeleteLocaleCookie(ctx.Resp) + middleware.DeleteRedirectToCookie(ctx.Resp) +} + +// SignOut sign out from login status +func SignOut(ctx *context.Context) { + if ctx.User != nil { + eventsource.GetManager().SendMessageBlocking(ctx.User.ID, &eventsource.Event{ + Name: "logout", + Data: ctx.Session.ID(), + }) + } + HandleSignOut(ctx) + ctx.Redirect(setting.AppSubURL + "/") +} + +// SignUp render the register page +func SignUp(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("sign_up") + + ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/sign_up" + + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha + ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL + ctx.Data["Captcha"] = context.GetImageCaptcha() + ctx.Data["CaptchaType"] = setting.Service.CaptchaType + ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey + ctx.Data["PageIsSignUp"] = true + + //Show Disabled Registration message if DisableRegistration or AllowOnlyExternalRegistration options are true + ctx.Data["DisableRegistration"] = setting.Service.DisableRegistration || setting.Service.AllowOnlyExternalRegistration + + ctx.HTML(http.StatusOK, tplSignUp) +} + +// SignUpPost response for sign up information submission +func SignUpPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.RegisterForm) + ctx.Data["Title"] = ctx.Tr("sign_up") + + ctx.Data["SignUpLink"] = setting.AppSubURL + "/user/sign_up" + + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha + ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL + ctx.Data["Captcha"] = context.GetImageCaptcha() + ctx.Data["CaptchaType"] = setting.Service.CaptchaType + ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey + ctx.Data["PageIsSignUp"] = true + + //Permission denied if DisableRegistration or AllowOnlyExternalRegistration options are true + if setting.Service.DisableRegistration || setting.Service.AllowOnlyExternalRegistration { + ctx.Error(http.StatusForbidden) + return + } + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplSignUp) + return + } + + if setting.Service.EnableCaptcha { + var valid bool + var err error + switch setting.Service.CaptchaType { + case setting.ImageCaptcha: + valid = context.GetImageCaptcha().VerifyReq(ctx.Req) + case setting.ReCaptcha: + valid, err = recaptcha.Verify(ctx, form.GRecaptchaResponse) + case setting.HCaptcha: + valid, err = hcaptcha.Verify(ctx, form.HcaptchaResponse) + default: + ctx.ServerError("Unknown Captcha Type", fmt.Errorf("Unknown Captcha Type: %s", setting.Service.CaptchaType)) + return + } + if err != nil { + log.Debug("%s", err.Error()) + } + + if !valid { + ctx.Data["Err_Captcha"] = true + ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), tplSignUp, &form) + return + } + } + + if !form.IsEmailDomainAllowed() { + ctx.RenderWithErr(ctx.Tr("auth.email_domain_blacklisted"), tplSignUp, &form) + return + } + + if form.Password != form.Retype { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplSignUp, &form) + return + } + if len(form.Password) < setting.MinPasswordLength { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplSignUp, &form) + return + } + if !password.IsComplexEnough(form.Password) { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(password.BuildComplexityError(ctx), tplSignUp, &form) + return + } + pwned, err := password.IsPwned(ctx, form.Password) + if pwned { + errMsg := ctx.Tr("auth.password_pwned") + if err != nil { + log.Error(err.Error()) + errMsg = ctx.Tr("auth.password_pwned_err") + } + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(errMsg, tplSignUp, &form) + return + } + + u := &models.User{ + Name: form.UserName, + Email: form.Email, + Passwd: form.Password, + IsActive: !(setting.Service.RegisterEmailConfirm || setting.Service.RegisterManualConfirm), + IsRestricted: setting.Service.DefaultUserIsRestricted, + } + + if !createAndHandleCreatedUser(ctx, tplSignUp, form, u, nil, false) { + // error already handled + return + } + + ctx.Flash.Success(ctx.Tr("auth.sign_up_successful")) + handleSignInFull(ctx, u, false, true) +} + +// createAndHandleCreatedUser calls createUserInContext and +// then handleUserCreated. +func createAndHandleCreatedUser(ctx *context.Context, tpl base.TplName, form interface{}, u *models.User, gothUser *goth.User, allowLink bool) bool { + if !createUserInContext(ctx, tpl, form, u, gothUser, allowLink) { + return false + } + return handleUserCreated(ctx, u, gothUser) +} + +// createUserInContext creates a user and handles errors within a given context. +// Optionally a template can be specified. +func createUserInContext(ctx *context.Context, tpl base.TplName, form interface{}, u *models.User, gothUser *goth.User, allowLink bool) (ok bool) { + if err := models.CreateUser(u); err != nil { + if allowLink && (models.IsErrUserAlreadyExist(err) || models.IsErrEmailAlreadyUsed(err)) { + if setting.OAuth2Client.AccountLinking == setting.OAuth2AccountLinkingAuto { + var user *models.User + user = &models.User{Name: u.Name} + hasUser, err := models.GetUser(user) + if !hasUser || err != nil { + user = &models.User{Email: u.Email} + hasUser, err = models.GetUser(user) + if !hasUser || err != nil { + ctx.ServerError("UserLinkAccount", err) + return + } + } + + // TODO: probably we should respect 'remember' user's choice... + linkAccount(ctx, user, *gothUser, true) + return // user is already created here, all redirects are handled + } else if setting.OAuth2Client.AccountLinking == setting.OAuth2AccountLinkingLogin { + showLinkingLogin(ctx, *gothUser) + return // user will be created only after linking login + } + } + + // handle error without template + if len(tpl) == 0 { + ctx.ServerError("CreateUser", err) + return + } + + // handle error with template + switch { + case models.IsErrUserAlreadyExist(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), tpl, form) + case models.IsErrEmailAlreadyUsed(err): + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tpl, form) + case models.IsErrEmailInvalid(err): + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tpl, form) + case models.IsErrNameReserved(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), tpl, form) + case models.IsErrNamePatternNotAllowed(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), tpl, form) + case models.IsErrNameCharsNotAllowed(err): + ctx.Data["Err_UserName"] = true + ctx.RenderWithErr(ctx.Tr("user.form.name_chars_not_allowed", err.(models.ErrNameCharsNotAllowed).Name), tpl, form) + default: + ctx.ServerError("CreateUser", err) + } + return + } + log.Trace("Account created: %s", u.Name) + return true +} + +// handleUserCreated does additional steps after a new user is created. +// It auto-sets admin for the only user, updates the optional external user and +// sends a confirmation email if required. +func handleUserCreated(ctx *context.Context, u *models.User, gothUser *goth.User) (ok bool) { + // Auto-set admin for the only user. + if models.CountUsers() == 1 { + u.IsAdmin = true + u.IsActive = true + u.SetLastLogin() + if err := models.UpdateUserCols(u, "is_admin", "is_active", "last_login_unix"); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + } + + // update external user information + if gothUser != nil { + if err := models.UpdateExternalUser(u, *gothUser); err != nil { + log.Error("UpdateExternalUser failed: %v", err) + } + } + + // Send confirmation email + if !u.IsActive && u.ID > 1 { + mailer.SendActivateAccountMail(ctx.Locale, u) + + ctx.Data["IsSendRegisterMail"] = true + ctx.Data["Email"] = u.Email + ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()) + ctx.HTML(http.StatusOK, TplActivate) + + if err := ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { + log.Error("Set cache(MailResendLimit) fail: %v", err) + } + return + } + + return true +} + +// Activate render activate user page +func Activate(ctx *context.Context) { + code := ctx.FormString("code") + + if len(code) == 0 { + ctx.Data["IsActivatePage"] = true + if ctx.User == nil || ctx.User.IsActive { + ctx.NotFound("invalid user", nil) + return + } + // Resend confirmation email. + if setting.Service.RegisterEmailConfirm { + if ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName) { + ctx.Data["ResendLimited"] = true + } else { + ctx.Data["ActiveCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()) + mailer.SendActivateAccountMail(ctx.Locale, ctx.User) + + if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil { + log.Error("Set cache(MailResendLimit) fail: %v", err) + } + } + } else { + ctx.Data["ServiceNotEnabled"] = true + } + ctx.HTML(http.StatusOK, TplActivate) + return + } + + user := models.VerifyUserActiveCode(code) + // if code is wrong + if user == nil { + ctx.Data["IsActivateFailed"] = true + ctx.HTML(http.StatusOK, TplActivate) + return + } + + // if account is local account, verify password + if user.LoginSource == 0 { + ctx.Data["Code"] = code + ctx.Data["NeedsPassword"] = true + ctx.HTML(http.StatusOK, TplActivate) + return + } + + handleAccountActivation(ctx, user) +} + +// ActivatePost handles account activation with password check +func ActivatePost(ctx *context.Context) { + code := ctx.FormString("code") + if len(code) == 0 { + ctx.Redirect(setting.AppSubURL + "/user/activate") + return + } + + user := models.VerifyUserActiveCode(code) + // if code is wrong + if user == nil { + ctx.Data["IsActivateFailed"] = true + ctx.HTML(http.StatusOK, TplActivate) + return + } + + // if account is local account, verify password + if user.LoginSource == 0 { + password := ctx.FormString("password") + if len(password) == 0 { + ctx.Data["Code"] = code + ctx.Data["NeedsPassword"] = true + ctx.HTML(http.StatusOK, TplActivate) + return + } + if !user.ValidatePassword(password) { + ctx.Data["IsActivateFailed"] = true + ctx.HTML(http.StatusOK, TplActivate) + return + } + } + + handleAccountActivation(ctx, user) +} + +func handleAccountActivation(ctx *context.Context, user *models.User) { + user.IsActive = true + var err error + if user.Rands, err = models.GetUserSalt(); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + if err := models.UpdateUserCols(user, "is_active", "rands"); err != nil { + if models.IsErrUserNotExist(err) { + ctx.NotFound("UpdateUserCols", err) + } else { + ctx.ServerError("UpdateUser", err) + } + return + } + + if err := models.ActivateUserEmail(user.ID, user.Email, true); err != nil { + log.Error("Unable to activate email for user: %-v with email: %s: %v", user, user.Email, err) + ctx.ServerError("ActivateUserEmail", err) + return + } + + log.Trace("User activated: %s", user.Name) + + if err := ctx.Session.Set("uid", user.ID); err != nil { + log.Error("Error setting uid in session[%s]: %v", ctx.Session.ID(), err) + } + if err := ctx.Session.Set("uname", user.Name); err != nil { + log.Error("Error setting uname in session[%s]: %v", ctx.Session.ID(), err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("Error storing session[%s]: %v", ctx.Session.ID(), err) + } + + ctx.Flash.Success(ctx.Tr("auth.account_activated")) + ctx.Redirect(setting.AppSubURL + "/") +} + +// ActivateEmail render the activate email page +func ActivateEmail(ctx *context.Context) { + code := ctx.FormString("code") + emailStr := ctx.FormString("email") + + // Verify code. + if email := models.VerifyActiveEmailCode(code, emailStr); email != nil { + if err := email.Activate(); err != nil { + ctx.ServerError("ActivateEmail", err) + } + + log.Trace("Email activated: %s", email.Email) + ctx.Flash.Success(ctx.Tr("settings.add_email_success")) + + if u, err := models.GetUserByID(email.UID); err != nil { + log.Warn("GetUserByID: %d", email.UID) + } else { + // Allow user to validate more emails + _ = ctx.Cache.Delete("MailResendLimit_" + u.LowerName) + } + } + + // FIXME: e-mail verification does not require the user to be logged in, + // so this could be redirecting to the login page. + // Should users be logged in automatically here? (consider 2FA requirements, etc.) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") +} + +// ForgotPasswd render the forget password page +func ForgotPasswd(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("auth.forgot_password_title") + + if setting.MailService == nil { + log.Warn(ctx.Tr("auth.disable_forgot_password_mail_admin")) + ctx.Data["IsResetDisable"] = true + ctx.HTML(http.StatusOK, tplForgotPassword) + return + } + + ctx.Data["Email"] = ctx.FormString("email") + + ctx.Data["IsResetRequest"] = true + ctx.HTML(http.StatusOK, tplForgotPassword) +} + +// ForgotPasswdPost response for forget password request +func ForgotPasswdPost(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("auth.forgot_password_title") + + if setting.MailService == nil { + ctx.NotFound("ForgotPasswdPost", nil) + return + } + ctx.Data["IsResetRequest"] = true + + email := ctx.FormString("email") + ctx.Data["Email"] = email + + u, err := models.GetUserByEmail(email) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.Data["ResetPwdCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, ctx.Locale.Language()) + ctx.Data["IsResetSent"] = true + ctx.HTML(http.StatusOK, tplForgotPassword) + return + } + + ctx.ServerError("user.ResetPasswd(check existence)", err) + return + } + + if !u.IsLocal() && !u.IsOAuth2() { + ctx.Data["Err_Email"] = true + ctx.RenderWithErr(ctx.Tr("auth.non_local_account"), tplForgotPassword, nil) + return + } + + if ctx.Cache.IsExist("MailResendLimit_" + u.LowerName) { + ctx.Data["ResendLimited"] = true + ctx.HTML(http.StatusOK, tplForgotPassword) + return + } + + mailer.SendResetPasswordMail(u) + + if err = ctx.Cache.Put("MailResendLimit_"+u.LowerName, u.LowerName, 180); err != nil { + log.Error("Set cache(MailResendLimit) fail: %v", err) + } + + ctx.Data["ResetPwdCodeLives"] = timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, ctx.Locale.Language()) + ctx.Data["IsResetSent"] = true + ctx.HTML(http.StatusOK, tplForgotPassword) +} + +func commonResetPassword(ctx *context.Context) (*models.User, *models.TwoFactor) { + code := ctx.FormString("code") + + ctx.Data["Title"] = ctx.Tr("auth.reset_password") + ctx.Data["Code"] = code + + if nil != ctx.User { + ctx.Data["user_signed_in"] = true + } + + if len(code) == 0 { + ctx.Flash.Error(ctx.Tr("auth.invalid_code")) + return nil, nil + } + + // Fail early, don't frustrate the user + u := models.VerifyUserActiveCode(code) + if u == nil { + ctx.Flash.Error(ctx.Tr("auth.invalid_code")) + return nil, nil + } + + twofa, err := models.GetTwoFactorByUID(u.ID) + if err != nil { + if !models.IsErrTwoFactorNotEnrolled(err) { + ctx.Error(http.StatusInternalServerError, "CommonResetPassword", err.Error()) + return nil, nil + } + } else { + ctx.Data["has_two_factor"] = true + ctx.Data["scratch_code"] = ctx.FormBool("scratch_code") + } + + // Show the user that they are affecting the account that they intended to + ctx.Data["user_email"] = u.Email + + if nil != ctx.User && u.ID != ctx.User.ID { + ctx.Flash.Error(ctx.Tr("auth.reset_password_wrong_user", ctx.User.Email, u.Email)) + return nil, nil + } + + return u, twofa +} + +// ResetPasswd render the account recovery page +func ResetPasswd(ctx *context.Context) { + ctx.Data["IsResetForm"] = true + + commonResetPassword(ctx) + if ctx.Written() { + return + } + + ctx.HTML(http.StatusOK, tplResetPassword) +} + +// ResetPasswdPost response from account recovery request +func ResetPasswdPost(ctx *context.Context) { + u, twofa := commonResetPassword(ctx) + if ctx.Written() { + return + } + + if u == nil { + // Flash error has been set + ctx.HTML(http.StatusOK, tplResetPassword) + return + } + + // Validate password length. + passwd := ctx.FormString("password") + if len(passwd) < setting.MinPasswordLength { + ctx.Data["IsResetForm"] = true + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplResetPassword, nil) + return + } else if !password.IsComplexEnough(passwd) { + ctx.Data["IsResetForm"] = true + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(password.BuildComplexityError(ctx), tplResetPassword, nil) + return + } else if pwned, err := password.IsPwned(ctx, passwd); pwned || err != nil { + errMsg := ctx.Tr("auth.password_pwned") + if err != nil { + log.Error(err.Error()) + errMsg = ctx.Tr("auth.password_pwned_err") + } + ctx.Data["IsResetForm"] = true + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(errMsg, tplResetPassword, nil) + return + } + + // Handle two-factor + regenerateScratchToken := false + if twofa != nil { + if ctx.FormBool("scratch_code") { + if !twofa.VerifyScratchToken(ctx.FormString("token")) { + ctx.Data["IsResetForm"] = true + ctx.Data["Err_Token"] = true + ctx.RenderWithErr(ctx.Tr("auth.twofa_scratch_token_incorrect"), tplResetPassword, nil) + return + } + regenerateScratchToken = true + } else { + passcode := ctx.FormString("passcode") + ok, err := twofa.ValidateTOTP(passcode) + if err != nil { + ctx.Error(http.StatusInternalServerError, "ValidateTOTP", err.Error()) + return + } + if !ok || twofa.LastUsedPasscode == passcode { + ctx.Data["IsResetForm"] = true + ctx.Data["Err_Passcode"] = true + ctx.RenderWithErr(ctx.Tr("auth.twofa_passcode_incorrect"), tplResetPassword, nil) + return + } + + twofa.LastUsedPasscode = passcode + if err = models.UpdateTwoFactor(twofa); err != nil { + ctx.ServerError("ResetPasswdPost: UpdateTwoFactor", err) + return + } + } + } + var err error + if u.Rands, err = models.GetUserSalt(); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + if err = u.SetPassword(passwd); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + u.MustChangePassword = false + if err := models.UpdateUserCols(u, "must_change_password", "passwd", "passwd_hash_algo", "rands", "salt"); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + + log.Trace("User password reset: %s", u.Name) + ctx.Data["IsResetFailed"] = true + remember := len(ctx.FormString("remember")) != 0 + + if regenerateScratchToken { + // Invalidate the scratch token. + _, err = twofa.GenerateScratchToken() + if err != nil { + ctx.ServerError("UserSignIn", err) + return + } + if err = models.UpdateTwoFactor(twofa); err != nil { + ctx.ServerError("UserSignIn", err) + return + } + + handleSignInFull(ctx, u, remember, false) + ctx.Flash.Info(ctx.Tr("auth.twofa_scratch_used")) + ctx.Redirect(setting.AppSubURL + "/user/settings/security") + return + } + + handleSignInFull(ctx, u, remember, true) +} + +// MustChangePassword renders the page to change a user's password +func MustChangePassword(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("auth.must_change_password") + ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/settings/change_password" + ctx.Data["MustChangePassword"] = true + ctx.HTML(http.StatusOK, tplMustChangePassword) +} + +// MustChangePasswordPost response for updating a user's password after his/her +// account was created by an admin +func MustChangePasswordPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.MustChangePasswordForm) + ctx.Data["Title"] = ctx.Tr("auth.must_change_password") + ctx.Data["ChangePasscodeLink"] = setting.AppSubURL + "/user/settings/change_password" + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplMustChangePassword) + return + } + u := ctx.User + // Make sure only requests for users who are eligible to change their password via + // this method passes through + if !u.MustChangePassword { + ctx.ServerError("MustUpdatePassword", errors.New("cannot update password.. Please visit the settings page")) + return + } + + if form.Password != form.Retype { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("form.password_not_match"), tplMustChangePassword, &form) + return + } + + if len(form.Password) < setting.MinPasswordLength { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplMustChangePassword, &form) + return + } + + var err error + if err = u.SetPassword(form.Password); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + + u.MustChangePassword = false + + if err := models.UpdateUserCols(u, "must_change_password", "passwd", "passwd_hash_algo", "salt"); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + + ctx.Flash.Success(ctx.Tr("settings.change_password_success")) + + log.Trace("User updated password: %s", u.Name) + + if redirectTo := ctx.GetCookie("redirect_to"); len(redirectTo) > 0 && !utils.IsExternalURL(redirectTo) { + middleware.DeleteRedirectToCookie(ctx.Resp) + ctx.RedirectToFirst(redirectTo) + return + } + + ctx.Redirect(setting.AppSubURL + "/") +} diff --git a/routers/web/user/auth_openid.go b/routers/web/user/auth_openid.go new file mode 100644 index 000000000..fc419a7f6 --- /dev/null +++ b/routers/web/user/auth_openid.go @@ -0,0 +1,451 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "fmt" + "net/http" + "net/url" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/auth/openid" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/hcaptcha" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/recaptcha" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/forms" +) + +const ( + tplSignInOpenID base.TplName = "user/auth/signin_openid" + tplConnectOID base.TplName = "user/auth/signup_openid_connect" + tplSignUpOID base.TplName = "user/auth/signup_openid_register" +) + +// SignInOpenID render sign in page +func SignInOpenID(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("sign_in") + + if ctx.FormString("openid.return_to") != "" { + signInOpenIDVerify(ctx) + return + } + + // Check auto-login. + isSucceed, err := AutoSignIn(ctx) + if err != nil { + ctx.ServerError("AutoSignIn", err) + return + } + + redirectTo := ctx.FormString("redirect_to") + if len(redirectTo) > 0 { + middleware.SetRedirectToCookie(ctx.Resp, redirectTo) + } else { + redirectTo = ctx.GetCookie("redirect_to") + } + + if isSucceed { + middleware.DeleteRedirectToCookie(ctx.Resp) + ctx.RedirectToFirst(redirectTo) + return + } + + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsLoginOpenID"] = true + ctx.HTML(http.StatusOK, tplSignInOpenID) +} + +// Check if the given OpenID URI is allowed by blacklist/whitelist +func allowedOpenIDURI(uri string) (err error) { + + // In case a Whitelist is present, URI must be in it + // in order to be accepted + if len(setting.Service.OpenIDWhitelist) != 0 { + for _, pat := range setting.Service.OpenIDWhitelist { + if pat.MatchString(uri) { + return nil // pass + } + } + // must match one of this or be refused + return fmt.Errorf("URI not allowed by whitelist") + } + + // A blacklist match expliclty forbids + for _, pat := range setting.Service.OpenIDBlacklist { + if pat.MatchString(uri) { + return fmt.Errorf("URI forbidden by blacklist") + } + } + + return nil +} + +// SignInOpenIDPost response for openid sign in request +func SignInOpenIDPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.SignInOpenIDForm) + ctx.Data["Title"] = ctx.Tr("sign_in") + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsLoginOpenID"] = true + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplSignInOpenID) + return + } + + id, err := openid.Normalize(form.Openid) + if err != nil { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &form) + return + } + form.Openid = id + + log.Trace("OpenID uri: " + id) + + err = allowedOpenIDURI(id) + if err != nil { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &form) + return + } + + redirectTo := setting.AppURL + "user/login/openid" + url, err := openid.RedirectURL(id, redirectTo, setting.AppURL) + if err != nil { + log.Error("Error in OpenID redirect URL: %s, %v", redirectTo, err.Error()) + ctx.RenderWithErr(fmt.Sprintf("Unable to find OpenID provider in %s", redirectTo), tplSignInOpenID, &form) + return + } + + // Request optional nickname and email info + // NOTE: change to `openid.sreg.required` to require it + url += "&openid.ns.sreg=http%3A%2F%2Fopenid.net%2Fextensions%2Fsreg%2F1.1" + url += "&openid.sreg.optional=nickname%2Cemail" + + log.Trace("Form-passed openid-remember: %t", form.Remember) + + if err := ctx.Session.Set("openid_signin_remember", form.Remember); err != nil { + log.Error("SignInOpenIDPost: Could not set openid_signin_remember in session: %v", err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("SignInOpenIDPost: Unable to save changes to the session: %v", err) + } + + ctx.Redirect(url) +} + +// signInOpenIDVerify handles response from OpenID provider +func signInOpenIDVerify(ctx *context.Context) { + + log.Trace("Incoming call to: " + ctx.Req.URL.String()) + + fullURL := setting.AppURL + ctx.Req.URL.String()[1:] + log.Trace("Full URL: " + fullURL) + + var id, err = openid.Verify(fullURL) + if err != nil { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &forms.SignInOpenIDForm{ + Openid: id, + }) + return + } + + log.Trace("Verified ID: " + id) + + /* Now we should seek for the user and log him in, or prompt + * to register if not found */ + + u, err := models.GetUserByOpenID(id) + if err != nil { + if !models.IsErrUserNotExist(err) { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &forms.SignInOpenIDForm{ + Openid: id, + }) + return + } + log.Error("signInOpenIDVerify: %v", err) + } + if u != nil { + log.Trace("User exists, logging in") + remember, _ := ctx.Session.Get("openid_signin_remember").(bool) + log.Trace("Session stored openid-remember: %t", remember) + handleSignIn(ctx, u, remember) + return + } + + log.Trace("User with openid " + id + " does not exist, should connect or register") + + parsedURL, err := url.Parse(fullURL) + if err != nil { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &forms.SignInOpenIDForm{ + Openid: id, + }) + return + } + values, err := url.ParseQuery(parsedURL.RawQuery) + if err != nil { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &forms.SignInOpenIDForm{ + Openid: id, + }) + return + } + email := values.Get("openid.sreg.email") + nickname := values.Get("openid.sreg.nickname") + + log.Trace("User has email=" + email + " and nickname=" + nickname) + + if email != "" { + u, err = models.GetUserByEmail(email) + if err != nil { + if !models.IsErrUserNotExist(err) { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &forms.SignInOpenIDForm{ + Openid: id, + }) + return + } + log.Error("signInOpenIDVerify: %v", err) + } + if u != nil { + log.Trace("Local user " + u.LowerName + " has OpenID provided email " + email) + } + } + + if u == nil && nickname != "" { + u, _ = models.GetUserByName(nickname) + if err != nil { + if !models.IsErrUserNotExist(err) { + ctx.RenderWithErr(err.Error(), tplSignInOpenID, &forms.SignInOpenIDForm{ + Openid: id, + }) + return + } + } + if u != nil { + log.Trace("Local user " + u.LowerName + " has OpenID provided nickname " + nickname) + } + } + + if err := ctx.Session.Set("openid_verified_uri", id); err != nil { + log.Error("signInOpenIDVerify: Could not set openid_verified_uri in session: %v", err) + } + if err := ctx.Session.Set("openid_determined_email", email); err != nil { + log.Error("signInOpenIDVerify: Could not set openid_determined_email in session: %v", err) + } + + if u != nil { + nickname = u.LowerName + } + + if err := ctx.Session.Set("openid_determined_username", nickname); err != nil { + log.Error("signInOpenIDVerify: Could not set openid_determined_username in session: %v", err) + } + if err := ctx.Session.Release(); err != nil { + log.Error("signInOpenIDVerify: Unable to save changes to the session: %v", err) + } + + if u != nil || !setting.Service.EnableOpenIDSignUp || setting.Service.AllowOnlyInternalRegistration { + ctx.Redirect(setting.AppSubURL + "/user/openid/connect") + } else { + ctx.Redirect(setting.AppSubURL + "/user/openid/register") + } +} + +// ConnectOpenID shows a form to connect an OpenID URI to an existing account +func ConnectOpenID(ctx *context.Context) { + oid, _ := ctx.Session.Get("openid_verified_uri").(string) + if oid == "" { + ctx.Redirect(setting.AppSubURL + "/user/login/openid") + return + } + ctx.Data["Title"] = "OpenID connect" + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsOpenIDConnect"] = true + ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp + ctx.Data["AllowOnlyInternalRegistration"] = setting.Service.AllowOnlyInternalRegistration + ctx.Data["OpenID"] = oid + userName, _ := ctx.Session.Get("openid_determined_username").(string) + if userName != "" { + ctx.Data["user_name"] = userName + } + ctx.HTML(http.StatusOK, tplConnectOID) +} + +// ConnectOpenIDPost handles submission of a form to connect an OpenID URI to an existing account +func ConnectOpenIDPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.ConnectOpenIDForm) + oid, _ := ctx.Session.Get("openid_verified_uri").(string) + if oid == "" { + ctx.Redirect(setting.AppSubURL + "/user/login/openid") + return + } + ctx.Data["Title"] = "OpenID connect" + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsOpenIDConnect"] = true + ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp + ctx.Data["OpenID"] = oid + + u, err := auth.UserSignIn(form.UserName, form.Password) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.RenderWithErr(ctx.Tr("form.username_password_incorrect"), tplConnectOID, &form) + } else { + ctx.ServerError("ConnectOpenIDPost", err) + } + return + } + + // add OpenID for the user + userOID := &models.UserOpenID{UID: u.ID, URI: oid} + if err = models.AddUserOpenID(userOID); err != nil { + if models.IsErrOpenIDAlreadyUsed(err) { + ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplConnectOID, &form) + return + } + ctx.ServerError("AddUserOpenID", err) + return + } + + ctx.Flash.Success(ctx.Tr("settings.add_openid_success")) + + remember, _ := ctx.Session.Get("openid_signin_remember").(bool) + log.Trace("Session stored openid-remember: %t", remember) + handleSignIn(ctx, u, remember) +} + +// RegisterOpenID shows a form to create a new user authenticated via an OpenID URI +func RegisterOpenID(ctx *context.Context) { + oid, _ := ctx.Session.Get("openid_verified_uri").(string) + if oid == "" { + ctx.Redirect(setting.AppSubURL + "/user/login/openid") + return + } + ctx.Data["Title"] = "OpenID signup" + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsOpenIDRegister"] = true + ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp + ctx.Data["AllowOnlyInternalRegistration"] = setting.Service.AllowOnlyInternalRegistration + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha + ctx.Data["Captcha"] = context.GetImageCaptcha() + ctx.Data["CaptchaType"] = setting.Service.CaptchaType + ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey + ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL + ctx.Data["OpenID"] = oid + userName, _ := ctx.Session.Get("openid_determined_username").(string) + if userName != "" { + ctx.Data["user_name"] = userName + } + email, _ := ctx.Session.Get("openid_determined_email").(string) + if email != "" { + ctx.Data["email"] = email + } + ctx.HTML(http.StatusOK, tplSignUpOID) +} + +// RegisterOpenIDPost handles submission of a form to create a new user authenticated via an OpenID URI +func RegisterOpenIDPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.SignUpOpenIDForm) + oid, _ := ctx.Session.Get("openid_verified_uri").(string) + if oid == "" { + ctx.Redirect(setting.AppSubURL + "/user/login/openid") + return + } + + ctx.Data["Title"] = "OpenID signup" + ctx.Data["PageIsSignIn"] = true + ctx.Data["PageIsOpenIDRegister"] = true + ctx.Data["EnableOpenIDSignUp"] = setting.Service.EnableOpenIDSignUp + ctx.Data["EnableCaptcha"] = setting.Service.EnableCaptcha + ctx.Data["RecaptchaURL"] = setting.Service.RecaptchaURL + ctx.Data["Captcha"] = context.GetImageCaptcha() + ctx.Data["CaptchaType"] = setting.Service.CaptchaType + ctx.Data["RecaptchaSitekey"] = setting.Service.RecaptchaSitekey + ctx.Data["HcaptchaSitekey"] = setting.Service.HcaptchaSitekey + ctx.Data["OpenID"] = oid + + if setting.Service.AllowOnlyInternalRegistration { + ctx.Error(http.StatusForbidden) + return + } + + if setting.Service.EnableCaptcha { + var valid bool + var err error + switch setting.Service.CaptchaType { + case setting.ImageCaptcha: + valid = context.GetImageCaptcha().VerifyReq(ctx.Req) + case setting.ReCaptcha: + if err := ctx.Req.ParseForm(); err != nil { + ctx.ServerError("", err) + return + } + valid, err = recaptcha.Verify(ctx, form.GRecaptchaResponse) + case setting.HCaptcha: + if err := ctx.Req.ParseForm(); err != nil { + ctx.ServerError("", err) + return + } + valid, err = hcaptcha.Verify(ctx, form.HcaptchaResponse) + default: + ctx.ServerError("Unknown Captcha Type", fmt.Errorf("Unknown Captcha Type: %s", setting.Service.CaptchaType)) + return + } + if err != nil { + log.Debug("%s", err.Error()) + } + + if !valid { + ctx.Data["Err_Captcha"] = true + ctx.RenderWithErr(ctx.Tr("form.captcha_incorrect"), tplSignUpOID, &form) + return + } + } + + length := setting.MinPasswordLength + if length < 256 { + length = 256 + } + password, err := util.RandomString(int64(length)) + if err != nil { + ctx.RenderWithErr(err.Error(), tplSignUpOID, form) + return + } + + u := &models.User{ + Name: form.UserName, + Email: form.Email, + Passwd: password, + IsActive: !(setting.Service.RegisterEmailConfirm || setting.Service.RegisterManualConfirm), + } + if !createUserInContext(ctx, tplSignUpOID, form, u, nil, false) { + // error already handled + return + } + + // add OpenID for the user + userOID := &models.UserOpenID{UID: u.ID, URI: oid} + if err = models.AddUserOpenID(userOID); err != nil { + if models.IsErrOpenIDAlreadyUsed(err) { + ctx.RenderWithErr(ctx.Tr("form.openid_been_used", oid), tplSignUpOID, &form) + return + } + ctx.ServerError("AddUserOpenID", err) + return + } + + if !handleUserCreated(ctx, u, nil) { + // error already handled + return + } + + remember, _ := ctx.Session.Get("openid_signin_remember").(bool) + log.Trace("Session stored openid-remember: %t", remember) + handleSignIn(ctx, u, remember) +} diff --git a/routers/web/user/avatar.go b/routers/web/user/avatar.go new file mode 100644 index 000000000..8a5a36e07 --- /dev/null +++ b/routers/web/user/avatar.go @@ -0,0 +1,98 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "errors" + "net/url" + "path" + "strconv" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" +) + +// Avatar redirect browser to user avatar of requested size +func Avatar(ctx *context.Context) { + userName := ctx.Params(":username") + size, err := strconv.Atoi(ctx.Params(":size")) + if err != nil { + ctx.ServerError("Invalid avatar size", err) + return + } + + log.Debug("Asked avatar for user %v and size %v", userName, size) + + var user *models.User + if strings.ToLower(userName) != "ghost" { + user, err = models.GetUserByName(userName) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.ServerError("Requested avatar for invalid user", err) + } else { + ctx.ServerError("Retrieving user by name", err) + } + return + } + } else { + user = models.NewGhostUser() + } + + ctx.Redirect(user.RealSizedAvatarLink(size)) +} + +// AvatarByEmailHash redirects the browser to the appropriate Avatar link +func AvatarByEmailHash(ctx *context.Context) { + var err error + + hash := ctx.Params(":hash") + if len(hash) == 0 { + ctx.ServerError("invalid avatar hash", errors.New("hash cannot be empty")) + return + } + + var email string + email, err = models.GetEmailForHash(hash) + if err != nil { + ctx.ServerError("invalid avatar hash", err) + return + } + if len(email) == 0 { + ctx.Redirect(models.DefaultAvatarLink()) + return + } + size := ctx.FormInt("size") + if size == 0 { + size = models.DefaultAvatarSize + } + + var avatarURL *url.URL + + if setting.EnableFederatedAvatar && setting.LibravatarService != nil { + avatarURL, err = models.LibravatarURL(email) + if err != nil { + avatarURL, err = url.Parse(models.DefaultAvatarLink()) + if err != nil { + ctx.ServerError("invalid default avatar url", err) + return + } + } + } else if !setting.DisableGravatar { + copyOfGravatarSourceURL := *setting.GravatarSourceURL + avatarURL = ©OfGravatarSourceURL + avatarURL.Path = path.Join(avatarURL.Path, hash) + } else { + avatarURL, err = url.Parse(models.DefaultAvatarLink()) + if err != nil { + ctx.ServerError("invalid default avatar url", err) + return + } + } + + ctx.Redirect(models.MakeFinalAvatarURL(avatarURL, size)) +} diff --git a/routers/web/user/home.go b/routers/web/user/home.go new file mode 100644 index 000000000..bb75558dc --- /dev/null +++ b/routers/web/user/home.go @@ -0,0 +1,914 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "bytes" + "fmt" + "net/http" + "regexp" + "sort" + "strconv" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + issue_indexer "code.gitea.io/gitea/modules/indexer/issues" + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + issue_service "code.gitea.io/gitea/services/issue" + pull_service "code.gitea.io/gitea/services/pull" + + "github.com/keybase/go-crypto/openpgp" + "github.com/keybase/go-crypto/openpgp/armor" + "xorm.io/builder" +) + +const ( + tplDashboard base.TplName = "user/dashboard/dashboard" + tplIssues base.TplName = "user/dashboard/issues" + tplMilestones base.TplName = "user/dashboard/milestones" + tplProfile base.TplName = "user/profile" +) + +// getDashboardContextUser finds out which context user dashboard is being viewed as . +func getDashboardContextUser(ctx *context.Context) *models.User { + ctxUser := ctx.User + orgName := ctx.Params(":org") + if len(orgName) > 0 { + ctxUser = ctx.Org.Organization + ctx.Data["Teams"] = ctx.Org.Organization.Teams + } + ctx.Data["ContextUser"] = ctxUser + + orgs, err := models.GetUserOrgsList(ctx.User) + if err != nil { + ctx.ServerError("GetUserOrgsList", err) + return nil + } + ctx.Data["Orgs"] = orgs + + return ctxUser +} + +// retrieveFeeds loads feeds for the specified user +func retrieveFeeds(ctx *context.Context, options models.GetFeedsOptions) { + actions, err := models.GetFeeds(options) + if err != nil { + ctx.ServerError("GetFeeds", err) + return + } + + userCache := map[int64]*models.User{options.RequestedUser.ID: options.RequestedUser} + if ctx.User != nil { + userCache[ctx.User.ID] = ctx.User + } + for _, act := range actions { + if act.ActUser != nil { + userCache[act.ActUserID] = act.ActUser + } + } + + for _, act := range actions { + repoOwner, ok := userCache[act.Repo.OwnerID] + if !ok { + repoOwner, err = models.GetUserByID(act.Repo.OwnerID) + if err != nil { + if models.IsErrUserNotExist(err) { + continue + } + ctx.ServerError("GetUserByID", err) + return + } + userCache[repoOwner.ID] = repoOwner + } + act.Repo.Owner = repoOwner + } + ctx.Data["Feeds"] = actions +} + +// Dashboard render the dashboard page +func Dashboard(ctx *context.Context) { + ctxUser := getDashboardContextUser(ctx) + if ctx.Written() { + return + } + + ctx.Data["Title"] = ctxUser.DisplayName() + " - " + ctx.Tr("dashboard") + ctx.Data["PageIsDashboard"] = true + ctx.Data["PageIsNews"] = true + ctx.Data["SearchLimit"] = setting.UI.User.RepoPagingNum + + if setting.Service.EnableUserHeatmap { + data, err := models.GetUserHeatmapDataByUserTeam(ctxUser, ctx.Org.Team, ctx.User) + if err != nil { + ctx.ServerError("GetUserHeatmapDataByUserTeam", err) + return + } + ctx.Data["HeatmapData"] = data + } + + var err error + var mirrors []*models.Repository + if ctxUser.IsOrganization() { + var env models.AccessibleReposEnvironment + if ctx.Org.Team != nil { + env = ctxUser.AccessibleTeamReposEnv(ctx.Org.Team) + } else { + env, err = ctxUser.AccessibleReposEnv(ctx.User.ID) + if err != nil { + ctx.ServerError("AccessibleReposEnv", err) + return + } + } + mirrors, err = env.MirrorRepos() + if err != nil { + ctx.ServerError("env.MirrorRepos", err) + return + } + } else { + mirrors, err = ctxUser.GetMirrorRepositories() + if err != nil { + ctx.ServerError("GetMirrorRepositories", err) + return + } + } + ctx.Data["MaxShowRepoNum"] = setting.UI.User.RepoPagingNum + + if err := models.MirrorRepositoryList(mirrors).LoadAttributes(); err != nil { + ctx.ServerError("MirrorRepositoryList.LoadAttributes", err) + return + } + ctx.Data["MirrorCount"] = len(mirrors) + ctx.Data["Mirrors"] = mirrors + + retrieveFeeds(ctx, models.GetFeedsOptions{ + RequestedUser: ctxUser, + RequestedTeam: ctx.Org.Team, + Actor: ctx.User, + IncludePrivate: true, + OnlyPerformedBy: false, + IncludeDeleted: false, + Date: ctx.FormString("date"), + }) + + if ctx.Written() { + return + } + ctx.HTML(http.StatusOK, tplDashboard) +} + +// Milestones render the user milestones page +func Milestones(ctx *context.Context) { + if models.UnitTypeIssues.UnitGlobalDisabled() && models.UnitTypePullRequests.UnitGlobalDisabled() { + log.Debug("Milestones overview page not available as both issues and pull requests are globally disabled") + ctx.Status(404) + return + } + + ctx.Data["Title"] = ctx.Tr("milestones") + ctx.Data["PageIsMilestonesDashboard"] = true + + ctxUser := getDashboardContextUser(ctx) + if ctx.Written() { + return + } + + repoOpts := models.SearchRepoOptions{ + Actor: ctxUser, + OwnerID: ctxUser.ID, + Private: true, + AllPublic: false, // Include also all public repositories of users and public organisations + AllLimited: false, // Include also all public repositories of limited organisations + HasMilestones: util.OptionalBoolTrue, // Just needs display repos has milestones + } + + if ctxUser.IsOrganization() && ctx.Org.Team != nil { + repoOpts.TeamID = ctx.Org.Team.ID + } + + var ( + userRepoCond = models.SearchRepositoryCondition(&repoOpts) // all repo condition user could visit + repoCond = userRepoCond + repoIDs []int64 + + reposQuery = ctx.FormString("repos") + isShowClosed = ctx.FormString("state") == "closed" + sortType = ctx.FormString("sort") + page = ctx.FormInt("page") + keyword = ctx.FormTrim("q") + ) + + if page <= 1 { + page = 1 + } + + if len(reposQuery) != 0 { + if issueReposQueryPattern.MatchString(reposQuery) { + // remove "[" and "]" from string + reposQuery = reposQuery[1 : len(reposQuery)-1] + //for each ID (delimiter ",") add to int to repoIDs + + for _, rID := range strings.Split(reposQuery, ",") { + // Ensure nonempty string entries + if rID != "" && rID != "0" { + rIDint64, err := strconv.ParseInt(rID, 10, 64) + // If the repo id specified by query is not parseable or not accessible by user, just ignore it. + if err == nil { + repoIDs = append(repoIDs, rIDint64) + } + } + } + if len(repoIDs) > 0 { + // Don't just let repoCond = builder.In("id", repoIDs) because user may has no permission on repoIDs + // But the original repoCond has a limitation + repoCond = repoCond.And(builder.In("id", repoIDs)) + } + } else { + log.Warn("issueReposQueryPattern not match with query") + } + } + + counts, err := models.CountMilestonesByRepoCondAndKw(userRepoCond, keyword, isShowClosed) + if err != nil { + ctx.ServerError("CountMilestonesByRepoIDs", err) + return + } + + milestones, err := models.SearchMilestones(repoCond, page, isShowClosed, sortType, keyword) + if err != nil { + ctx.ServerError("SearchMilestones", err) + return + } + + showRepos, _, err := models.SearchRepositoryByCondition(&repoOpts, userRepoCond, false) + if err != nil { + ctx.ServerError("SearchRepositoryByCondition", err) + return + } + sort.Sort(showRepos) + + for i := 0; i < len(milestones); { + for _, repo := range showRepos { + if milestones[i].RepoID == repo.ID { + milestones[i].Repo = repo + break + } + } + if milestones[i].Repo == nil { + log.Warn("Cannot find milestone %d 's repository %d", milestones[i].ID, milestones[i].RepoID) + milestones = append(milestones[:i], milestones[i+1:]...) + continue + } + + milestones[i].RenderedContent, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: milestones[i].Repo.Link(), + Metas: milestones[i].Repo.ComposeMetas(), + Ctx: ctx, + }, milestones[i].Content) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + + if milestones[i].Repo.IsTimetrackerEnabled() { + err := milestones[i].LoadTotalTrackedTime() + if err != nil { + ctx.ServerError("LoadTotalTrackedTime", err) + return + } + } + i++ + } + + milestoneStats, err := models.GetMilestonesStatsByRepoCondAndKw(repoCond, keyword) + if err != nil { + ctx.ServerError("GetMilestoneStats", err) + return + } + + var totalMilestoneStats *models.MilestonesStats + if len(repoIDs) == 0 { + totalMilestoneStats = milestoneStats + } else { + totalMilestoneStats, err = models.GetMilestonesStatsByRepoCondAndKw(userRepoCond, keyword) + if err != nil { + ctx.ServerError("GetMilestoneStats", err) + return + } + } + + var pagerCount int + if isShowClosed { + ctx.Data["State"] = "closed" + ctx.Data["Total"] = totalMilestoneStats.ClosedCount + pagerCount = int(milestoneStats.ClosedCount) + } else { + ctx.Data["State"] = "open" + ctx.Data["Total"] = totalMilestoneStats.OpenCount + pagerCount = int(milestoneStats.OpenCount) + } + + ctx.Data["Milestones"] = milestones + ctx.Data["Repos"] = showRepos + ctx.Data["Counts"] = counts + ctx.Data["MilestoneStats"] = milestoneStats + ctx.Data["SortType"] = sortType + ctx.Data["Keyword"] = keyword + if milestoneStats.Total() != totalMilestoneStats.Total() { + ctx.Data["RepoIDs"] = repoIDs + } + ctx.Data["IsShowClosed"] = isShowClosed + + pager := context.NewPagination(pagerCount, setting.UI.IssuePagingNum, page, 5) + pager.AddParam(ctx, "q", "Keyword") + pager.AddParam(ctx, "repos", "RepoIDs") + pager.AddParam(ctx, "sort", "SortType") + pager.AddParam(ctx, "state", "State") + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplMilestones) +} + +// Pulls renders the user's pull request overview page +func Pulls(ctx *context.Context) { + if models.UnitTypePullRequests.UnitGlobalDisabled() { + log.Debug("Pull request overview page not available as it is globally disabled.") + ctx.Status(404) + return + } + + ctx.Data["Title"] = ctx.Tr("pull_requests") + ctx.Data["PageIsPulls"] = true + buildIssueOverview(ctx, models.UnitTypePullRequests) +} + +// Issues renders the user's issues overview page +func Issues(ctx *context.Context) { + if models.UnitTypeIssues.UnitGlobalDisabled() { + log.Debug("Issues overview page not available as it is globally disabled.") + ctx.Status(404) + return + } + + ctx.Data["Title"] = ctx.Tr("issues") + ctx.Data["PageIsIssues"] = true + buildIssueOverview(ctx, models.UnitTypeIssues) +} + +// Regexp for repos query +var issueReposQueryPattern = regexp.MustCompile(`^\[\d+(,\d+)*,?\]$`) + +func buildIssueOverview(ctx *context.Context, unitType models.UnitType) { + + // ---------------------------------------------------- + // Determine user; can be either user or organization. + // Return with NotFound or ServerError if unsuccessful. + // ---------------------------------------------------- + + ctxUser := getDashboardContextUser(ctx) + if ctx.Written() { + return + } + + var ( + viewType string + sortType = ctx.FormString("sort") + filterMode = models.FilterModeAll + ) + + // -------------------------------------------------------------------------------- + // Distinguish User from Organization. + // Org: + // - Remember pre-determined viewType string for later. Will be posted to ctx.Data. + // Organization does not have view type and filter mode. + // User: + // - Use ctx.FormString("type") to determine filterMode. + // The type is set when clicking for example "assigned to me" on the overview page. + // - Remember either this or a fallback. Will be posted to ctx.Data. + // -------------------------------------------------------------------------------- + + // TODO: distinguish during routing + + viewType = ctx.FormString("type") + switch viewType { + case "assigned": + filterMode = models.FilterModeAssign + case "created_by": + filterMode = models.FilterModeCreate + case "mentioned": + filterMode = models.FilterModeMention + case "review_requested": + filterMode = models.FilterModeReviewRequested + case "your_repositories": // filterMode already set to All + default: + viewType = "your_repositories" + } + + // -------------------------------------------------------------------------- + // Build opts (IssuesOptions), which contains filter information. + // Will eventually be used to retrieve issues relevant for the overview page. + // Note: Non-final states of opts are used in-between, namely for: + // - Keyword search + // - Count Issues by repo + // -------------------------------------------------------------------------- + + isPullList := unitType == models.UnitTypePullRequests + opts := &models.IssuesOptions{ + IsPull: util.OptionalBoolOf(isPullList), + SortType: sortType, + IsArchived: util.OptionalBoolFalse, + } + + // Get repository IDs where User/Org/Team has access. + var team *models.Team + if ctx.Org != nil { + team = ctx.Org.Team + } + userRepoIDs, err := getActiveUserRepoIDs(ctxUser, team, unitType) + if err != nil { + ctx.ServerError("userRepoIDs", err) + return + } + + switch filterMode { + case models.FilterModeAll: + opts.RepoIDs = userRepoIDs + case models.FilterModeAssign: + opts.AssigneeID = ctx.User.ID + case models.FilterModeCreate: + opts.PosterID = ctx.User.ID + case models.FilterModeMention: + opts.MentionedID = ctx.User.ID + case models.FilterModeReviewRequested: + opts.ReviewRequestedID = ctx.User.ID + } + + if ctxUser.IsOrganization() { + opts.RepoIDs = userRepoIDs + } + + // keyword holds the search term entered into the search field. + keyword := strings.Trim(ctx.FormString("q"), " ") + ctx.Data["Keyword"] = keyword + + // Execute keyword search for issues. + // USING NON-FINAL STATE OF opts FOR A QUERY. + issueIDsFromSearch, err := issueIDsFromSearch(ctxUser, keyword, opts) + if err != nil { + ctx.ServerError("issueIDsFromSearch", err) + return + } + + // Ensure no issues are returned if a keyword was provided that didn't match any issues. + var forceEmpty bool + + if len(issueIDsFromSearch) > 0 { + opts.IssueIDs = issueIDsFromSearch + } else if len(keyword) > 0 { + forceEmpty = true + } + + // Educated guess: Do or don't show closed issues. + isShowClosed := ctx.FormString("state") == "closed" + opts.IsClosed = util.OptionalBoolOf(isShowClosed) + + // Filter repos and count issues in them. Count will be used later. + // USING NON-FINAL STATE OF opts FOR A QUERY. + var issueCountByRepo map[int64]int64 + if !forceEmpty { + issueCountByRepo, err = models.CountIssuesByRepo(opts) + if err != nil { + ctx.ServerError("CountIssuesByRepo", err) + return + } + } + + // Make sure page number is at least 1. Will be posted to ctx.Data. + page := ctx.FormInt("page") + if page <= 1 { + page = 1 + } + opts.Page = page + opts.PageSize = setting.UI.IssuePagingNum + + // Get IDs for labels (a filter option for issues/pulls). + // Required for IssuesOptions. + var labelIDs []int64 + selectedLabels := ctx.FormString("labels") + if len(selectedLabels) > 0 && selectedLabels != "0" { + labelIDs, err = base.StringsToInt64s(strings.Split(selectedLabels, ",")) + if err != nil { + ctx.ServerError("StringsToInt64s", err) + return + } + } + opts.LabelIDs = labelIDs + + // Parse ctx.FormString("repos") and remember matched repo IDs for later. + // Gets set when clicking filters on the issues overview page. + repoIDs := getRepoIDs(ctx.FormString("repos")) + if len(repoIDs) > 0 { + opts.RepoIDs = repoIDs + } + + // ------------------------------ + // Get issues as defined by opts. + // ------------------------------ + + // Slice of Issues that will be displayed on the overview page + // USING FINAL STATE OF opts FOR A QUERY. + var issues []*models.Issue + if !forceEmpty { + issues, err = models.Issues(opts) + if err != nil { + ctx.ServerError("Issues", err) + return + } + } else { + issues = []*models.Issue{} + } + + // ---------------------------------- + // Add repository pointers to Issues. + // ---------------------------------- + + // showReposMap maps repository IDs to their Repository pointers. + showReposMap, err := repoIDMap(ctxUser, issueCountByRepo, unitType) + if err != nil { + if models.IsErrRepoNotExist(err) { + ctx.NotFound("GetRepositoryByID", err) + return + } + ctx.ServerError("repoIDMap", err) + return + } + + // a RepositoryList + showRepos := models.RepositoryListOfMap(showReposMap) + sort.Sort(showRepos) + if err = showRepos.LoadAttributes(); err != nil { + ctx.ServerError("LoadAttributes", err) + return + } + + // maps pull request IDs to their CommitStatus. Will be posted to ctx.Data. + for _, issue := range issues { + issue.Repo = showReposMap[issue.RepoID] + } + + commitStatus, err := pull_service.GetIssuesLastCommitStatus(issues) + if err != nil { + ctx.ServerError("GetIssuesLastCommitStatus", err) + return + } + + // ------------------------------- + // Fill stats to post to ctx.Data. + // ------------------------------- + + userIssueStatsOpts := models.UserIssueStatsOptions{ + UserID: ctx.User.ID, + UserRepoIDs: userRepoIDs, + FilterMode: filterMode, + IsPull: isPullList, + IsClosed: isShowClosed, + IsArchived: util.OptionalBoolFalse, + LabelIDs: opts.LabelIDs, + } + if len(repoIDs) > 0 { + userIssueStatsOpts.UserRepoIDs = repoIDs + } + if ctxUser.IsOrganization() { + userIssueStatsOpts.RepoIDs = userRepoIDs + } + userIssueStats, err := models.GetUserIssueStats(userIssueStatsOpts) + if err != nil { + ctx.ServerError("GetUserIssueStats User", err) + return + } + + var shownIssueStats *models.IssueStats + if !forceEmpty { + statsOpts := models.UserIssueStatsOptions{ + UserID: ctx.User.ID, + UserRepoIDs: userRepoIDs, + FilterMode: filterMode, + IsPull: isPullList, + IsClosed: isShowClosed, + IssueIDs: issueIDsFromSearch, + IsArchived: util.OptionalBoolFalse, + LabelIDs: opts.LabelIDs, + } + if len(repoIDs) > 0 { + statsOpts.RepoIDs = repoIDs + } else if ctxUser.IsOrganization() { + statsOpts.RepoIDs = userRepoIDs + } + shownIssueStats, err = models.GetUserIssueStats(statsOpts) + if err != nil { + ctx.ServerError("GetUserIssueStats Shown", err) + return + } + } else { + shownIssueStats = &models.IssueStats{} + } + + var allIssueStats *models.IssueStats + if !forceEmpty { + allIssueStatsOpts := models.UserIssueStatsOptions{ + UserID: ctx.User.ID, + UserRepoIDs: userRepoIDs, + FilterMode: filterMode, + IsPull: isPullList, + IsClosed: isShowClosed, + IssueIDs: issueIDsFromSearch, + IsArchived: util.OptionalBoolFalse, + LabelIDs: opts.LabelIDs, + } + if ctxUser.IsOrganization() { + allIssueStatsOpts.RepoIDs = userRepoIDs + } + allIssueStats, err = models.GetUserIssueStats(allIssueStatsOpts) + if err != nil { + ctx.ServerError("GetUserIssueStats All", err) + return + } + } else { + allIssueStats = &models.IssueStats{} + } + + // Will be posted to ctx.Data. + var shownIssues int + if !isShowClosed { + shownIssues = int(shownIssueStats.OpenCount) + ctx.Data["TotalIssueCount"] = int(allIssueStats.OpenCount) + } else { + shownIssues = int(shownIssueStats.ClosedCount) + ctx.Data["TotalIssueCount"] = int(allIssueStats.ClosedCount) + } + + ctx.Data["IsShowClosed"] = isShowClosed + + ctx.Data["IssueRefEndNames"], ctx.Data["IssueRefURLs"] = + issue_service.GetRefEndNamesAndURLs(issues, ctx.FormString("RepoLink")) + + ctx.Data["Issues"] = issues + + approvalCounts, err := models.IssueList(issues).GetApprovalCounts() + if err != nil { + ctx.ServerError("ApprovalCounts", err) + return + } + ctx.Data["ApprovalCounts"] = func(issueID int64, typ string) int64 { + counts, ok := approvalCounts[issueID] + if !ok || len(counts) == 0 { + return 0 + } + reviewTyp := models.ReviewTypeApprove + if typ == "reject" { + reviewTyp = models.ReviewTypeReject + } else if typ == "waiting" { + reviewTyp = models.ReviewTypeRequest + } + for _, count := range counts { + if count.Type == reviewTyp { + return count.Count + } + } + return 0 + } + ctx.Data["CommitStatus"] = commitStatus + ctx.Data["Repos"] = showRepos + ctx.Data["Counts"] = issueCountByRepo + ctx.Data["IssueStats"] = userIssueStats + ctx.Data["ShownIssueStats"] = shownIssueStats + ctx.Data["ViewType"] = viewType + ctx.Data["SortType"] = sortType + ctx.Data["RepoIDs"] = repoIDs + ctx.Data["IsShowClosed"] = isShowClosed + ctx.Data["SelectLabels"] = selectedLabels + + if isShowClosed { + ctx.Data["State"] = "closed" + } else { + ctx.Data["State"] = "open" + } + + // Convert []int64 to string + reposParam, _ := json.Marshal(repoIDs) + + ctx.Data["ReposParam"] = string(reposParam) + + pager := context.NewPagination(shownIssues, setting.UI.IssuePagingNum, page, 5) + pager.AddParam(ctx, "q", "Keyword") + pager.AddParam(ctx, "type", "ViewType") + pager.AddParam(ctx, "repos", "ReposParam") + pager.AddParam(ctx, "sort", "SortType") + pager.AddParam(ctx, "state", "State") + pager.AddParam(ctx, "labels", "SelectLabels") + pager.AddParam(ctx, "milestone", "MilestoneID") + pager.AddParam(ctx, "assignee", "AssigneeID") + ctx.Data["Page"] = pager + + ctx.HTML(http.StatusOK, tplIssues) +} + +func getRepoIDs(reposQuery string) []int64 { + if len(reposQuery) == 0 || reposQuery == "[]" { + return []int64{} + } + if !issueReposQueryPattern.MatchString(reposQuery) { + log.Warn("issueReposQueryPattern does not match query") + return []int64{} + } + + var repoIDs []int64 + // remove "[" and "]" from string + reposQuery = reposQuery[1 : len(reposQuery)-1] + //for each ID (delimiter ",") add to int to repoIDs + for _, rID := range strings.Split(reposQuery, ",") { + // Ensure nonempty string entries + if rID != "" && rID != "0" { + rIDint64, err := strconv.ParseInt(rID, 10, 64) + if err == nil { + repoIDs = append(repoIDs, rIDint64) + } + } + } + + return repoIDs +} + +func getActiveUserRepoIDs(ctxUser *models.User, team *models.Team, unitType models.UnitType) ([]int64, error) { + var userRepoIDs []int64 + var err error + + if ctxUser.IsOrganization() { + userRepoIDs, err = getActiveTeamOrOrgRepoIds(ctxUser, team, unitType) + if err != nil { + return nil, fmt.Errorf("orgRepoIds: %v", err) + } + } else { + userRepoIDs, err = ctxUser.GetActiveAccessRepoIDs(unitType) + if err != nil { + return nil, fmt.Errorf("ctxUser.GetAccessRepoIDs: %v", err) + } + } + + if len(userRepoIDs) == 0 { + userRepoIDs = []int64{-1} + } + + return userRepoIDs, nil +} + +// getActiveTeamOrOrgRepoIds gets RepoIDs for ctxUser as Organization. +// Should be called if and only if ctxUser.IsOrganization == true. +func getActiveTeamOrOrgRepoIds(ctxUser *models.User, team *models.Team, unitType models.UnitType) ([]int64, error) { + var orgRepoIDs []int64 + var err error + var env models.AccessibleReposEnvironment + + if team != nil { + env = ctxUser.AccessibleTeamReposEnv(team) + } else { + env, err = ctxUser.AccessibleReposEnv(ctxUser.ID) + if err != nil { + return nil, fmt.Errorf("AccessibleReposEnv: %v", err) + } + } + orgRepoIDs, err = env.RepoIDs(1, ctxUser.NumRepos) + if err != nil { + return nil, fmt.Errorf("env.RepoIDs: %v", err) + } + orgRepoIDs, err = models.FilterOutRepoIdsWithoutUnitAccess(ctxUser, orgRepoIDs, unitType) + if err != nil { + return nil, fmt.Errorf("FilterOutRepoIdsWithoutUnitAccess: %v", err) + } + + return orgRepoIDs, nil +} + +func issueIDsFromSearch(ctxUser *models.User, keyword string, opts *models.IssuesOptions) ([]int64, error) { + if len(keyword) == 0 { + return []int64{}, nil + } + + searchRepoIDs, err := models.GetRepoIDsForIssuesOptions(opts, ctxUser) + if err != nil { + return nil, fmt.Errorf("GetRepoIDsForIssuesOptions: %v", err) + } + issueIDsFromSearch, err := issue_indexer.SearchIssuesByKeyword(searchRepoIDs, keyword) + if err != nil { + return nil, fmt.Errorf("SearchIssuesByKeyword: %v", err) + } + + return issueIDsFromSearch, nil +} + +func repoIDMap(ctxUser *models.User, issueCountByRepo map[int64]int64, unitType models.UnitType) (map[int64]*models.Repository, error) { + repoByID := make(map[int64]*models.Repository, len(issueCountByRepo)) + for id := range issueCountByRepo { + if id <= 0 { + continue + } + if _, ok := repoByID[id]; !ok { + repo, err := models.GetRepositoryByID(id) + if models.IsErrRepoNotExist(err) { + return nil, err + } else if err != nil { + return nil, fmt.Errorf("GetRepositoryByID: [%d]%v", id, err) + } + repoByID[id] = repo + } + repo := repoByID[id] + + // Check if user has access to given repository. + perm, err := models.GetUserRepoPermission(repo, ctxUser) + if err != nil { + return nil, fmt.Errorf("GetUserRepoPermission: [%d]%v", id, err) + } + if !perm.CanRead(unitType) { + log.Debug("User created Issues in Repository which they no longer have access to: [%d]", id) + } + } + return repoByID, nil +} + +// ShowSSHKeys output all the ssh keys of user by uid +func ShowSSHKeys(ctx *context.Context, uid int64) { + keys, err := models.ListPublicKeys(uid, models.ListOptions{}) + if err != nil { + ctx.ServerError("ListPublicKeys", err) + return + } + + var buf bytes.Buffer + for i := range keys { + buf.WriteString(keys[i].OmitEmail()) + buf.WriteString("\n") + } + ctx.PlainText(200, buf.Bytes()) +} + +// ShowGPGKeys output all the public GPG keys of user by uid +func ShowGPGKeys(ctx *context.Context, uid int64) { + keys, err := models.ListGPGKeys(uid, models.ListOptions{}) + if err != nil { + ctx.ServerError("ListGPGKeys", err) + return + } + entities := make([]*openpgp.Entity, 0) + failedEntitiesID := make([]string, 0) + for _, k := range keys { + e, err := models.GPGKeyToEntity(k) + if err != nil { + if models.IsErrGPGKeyImportNotExist(err) { + failedEntitiesID = append(failedEntitiesID, k.KeyID) + continue //Skip previous import without backup of imported armored key + } + ctx.ServerError("ShowGPGKeys", err) + return + } + entities = append(entities, e) + } + var buf bytes.Buffer + + headers := make(map[string]string) + if len(failedEntitiesID) > 0 { //If some key need re-import to be exported + headers["Note"] = fmt.Sprintf("The keys with the following IDs couldn't be exported and need to be reuploaded %s", strings.Join(failedEntitiesID, ", ")) + } + writer, _ := armor.Encode(&buf, "PGP PUBLIC KEY BLOCK", headers) + for _, e := range entities { + err = e.Serialize(writer) //TODO find why key are exported with a different cipherTypeByte as original (should not be blocking but strange) + if err != nil { + ctx.ServerError("ShowGPGKeys", err) + return + } + } + writer.Close() + ctx.PlainText(200, buf.Bytes()) +} + +// Email2User show user page via email +func Email2User(ctx *context.Context) { + u, err := models.GetUserByEmail(ctx.FormString("email")) + if err != nil { + if models.IsErrUserNotExist(err) { + ctx.NotFound("GetUserByEmail", err) + } else { + ctx.ServerError("GetUserByEmail", err) + } + return + } + ctx.Redirect(setting.AppSubURL + "/user/" + u.Name) +} diff --git a/routers/user/home_test.go b/routers/web/user/home_test.go similarity index 97% rename from routers/user/home_test.go rename to routers/web/user/home_test.go index ecc02fd33..b0109c354 100644 --- a/routers/user/home_test.go +++ b/routers/web/user/home_test.go @@ -33,9 +33,9 @@ func TestArchivedIssues(t *testing.T) { IsArchived[repo.ID] = repo.IsArchived NumIssues[repo.ID] = repo.NumIssues } - assert.EqualValues(t, false, IsArchived[50]) + assert.False(t, IsArchived[50]) assert.EqualValues(t, 1, NumIssues[50]) - assert.EqualValues(t, true, IsArchived[51]) + assert.True(t, IsArchived[51]) assert.EqualValues(t, 1, NumIssues[51]) // Act diff --git a/routers/web/user/main_test.go b/routers/web/user/main_test.go new file mode 100644 index 000000000..be17dd1f3 --- /dev/null +++ b/routers/web/user/main_test.go @@ -0,0 +1,16 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "path/filepath" + "testing" + + "code.gitea.io/gitea/models" +) + +func TestMain(m *testing.M) { + models.MainTest(m, filepath.Join("..", "..", "..")) +} diff --git a/routers/user/notification.go b/routers/web/user/notification.go similarity index 87% rename from routers/user/notification.go rename to routers/web/user/notification.go index 34939d145..a444669b7 100644 --- a/routers/user/notification.go +++ b/routers/web/user/notification.go @@ -8,7 +8,6 @@ import ( "errors" "fmt" "net/http" - "strconv" "strings" "code.gitea.io/gitea/models" @@ -49,7 +48,8 @@ func Notifications(c *context.Context) { if c.Written() { return } - if c.QueryBool("div-only") { + if c.FormBool("div-only") { + c.Data["SequenceNumber"] = c.FormString("sequence-number") c.HTML(http.StatusOK, tplNotificationDiv) return } @@ -58,10 +58,10 @@ func Notifications(c *context.Context) { func getNotifications(c *context.Context) { var ( - keyword = strings.Trim(c.Query("q"), " ") + keyword = c.FormTrim("q") status models.NotificationStatus - page = c.QueryInt("page") - perPage = c.QueryInt("perPage") + page = c.FormInt("page") + perPage = c.FormInt("perPage") ) if page < 1 { page = 1 @@ -86,7 +86,7 @@ func getNotifications(c *context.Context) { // redirect to last page if request page is more than total pages pager := context.NewPagination(int(total), perPage, page, 5) if pager.Paginater.Current() < page { - c.Redirect(fmt.Sprintf("/notifications?q=%s&page=%d", c.Query("q"), pager.Paginater.Current())) + c.Redirect(fmt.Sprintf("/notifications?q=%s&page=%d", c.FormString("q"), pager.Paginater.Current())) return } @@ -143,9 +143,9 @@ func getNotifications(c *context.Context) { // NotificationStatusPost is a route for changing the status of a notification func NotificationStatusPost(c *context.Context) { var ( - notificationID, _ = strconv.ParseInt(c.Req.PostFormValue("notification_id"), 10, 64) - statusStr = c.Req.PostFormValue("status") - status models.NotificationStatus + notificationID = c.FormInt64("notification_id") + statusStr = c.FormString("status") + status models.NotificationStatus ) switch statusStr { @@ -165,8 +165,8 @@ func NotificationStatusPost(c *context.Context) { return } - if !c.QueryBool("noredirect") { - url := fmt.Sprintf("%s/notifications?page=%s", setting.AppSubURL, c.Query("page")) + if !c.FormBool("noredirect") { + url := fmt.Sprintf("%s/notifications?page=%s", setting.AppSubURL, c.FormString("page")) c.Redirect(url, http.StatusSeeOther) } @@ -174,7 +174,8 @@ func NotificationStatusPost(c *context.Context) { if c.Written() { return } - c.Data["Link"] = fmt.Sprintf("%snotifications", setting.AppURL) + c.Data["Link"] = setting.AppURL + "notifications" + c.Data["SequenceNumber"] = c.Req.PostFormValue("sequence-number") c.HTML(http.StatusOK, tplNotificationDiv) } diff --git a/routers/web/user/oauth.go b/routers/web/user/oauth.go new file mode 100644 index 000000000..cec6a92bb --- /dev/null +++ b/routers/web/user/oauth.go @@ -0,0 +1,703 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "encoding/base64" + "fmt" + "html" + "net/http" + "net/url" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/oauth2" + "code.gitea.io/gitea/services/forms" + + "gitea.com/go-chi/binding" + "github.com/golang-jwt/jwt" +) + +const ( + tplGrantAccess base.TplName = "user/auth/grant" + tplGrantError base.TplName = "user/auth/grant_error" +) + +// TODO move error and responses to SDK or models + +// AuthorizeErrorCode represents an error code specified in RFC 6749 +type AuthorizeErrorCode string + +const ( + // ErrorCodeInvalidRequest represents the according error in RFC 6749 + ErrorCodeInvalidRequest AuthorizeErrorCode = "invalid_request" + // ErrorCodeUnauthorizedClient represents the according error in RFC 6749 + ErrorCodeUnauthorizedClient AuthorizeErrorCode = "unauthorized_client" + // ErrorCodeAccessDenied represents the according error in RFC 6749 + ErrorCodeAccessDenied AuthorizeErrorCode = "access_denied" + // ErrorCodeUnsupportedResponseType represents the according error in RFC 6749 + ErrorCodeUnsupportedResponseType AuthorizeErrorCode = "unsupported_response_type" + // ErrorCodeInvalidScope represents the according error in RFC 6749 + ErrorCodeInvalidScope AuthorizeErrorCode = "invalid_scope" + // ErrorCodeServerError represents the according error in RFC 6749 + ErrorCodeServerError AuthorizeErrorCode = "server_error" + // ErrorCodeTemporaryUnavailable represents the according error in RFC 6749 + ErrorCodeTemporaryUnavailable AuthorizeErrorCode = "temporarily_unavailable" +) + +// AuthorizeError represents an error type specified in RFC 6749 +type AuthorizeError struct { + ErrorCode AuthorizeErrorCode `json:"error" form:"error"` + ErrorDescription string + State string +} + +// Error returns the error message +func (err AuthorizeError) Error() string { + return fmt.Sprintf("%s: %s", err.ErrorCode, err.ErrorDescription) +} + +// AccessTokenErrorCode represents an error code specified in RFC 6749 +type AccessTokenErrorCode string + +const ( + // AccessTokenErrorCodeInvalidRequest represents an error code specified in RFC 6749 + AccessTokenErrorCodeInvalidRequest AccessTokenErrorCode = "invalid_request" + // AccessTokenErrorCodeInvalidClient represents an error code specified in RFC 6749 + AccessTokenErrorCodeInvalidClient = "invalid_client" + // AccessTokenErrorCodeInvalidGrant represents an error code specified in RFC 6749 + AccessTokenErrorCodeInvalidGrant = "invalid_grant" + // AccessTokenErrorCodeUnauthorizedClient represents an error code specified in RFC 6749 + AccessTokenErrorCodeUnauthorizedClient = "unauthorized_client" + // AccessTokenErrorCodeUnsupportedGrantType represents an error code specified in RFC 6749 + AccessTokenErrorCodeUnsupportedGrantType = "unsupported_grant_type" + // AccessTokenErrorCodeInvalidScope represents an error code specified in RFC 6749 + AccessTokenErrorCodeInvalidScope = "invalid_scope" +) + +// AccessTokenError represents an error response specified in RFC 6749 +type AccessTokenError struct { + ErrorCode AccessTokenErrorCode `json:"error" form:"error"` + ErrorDescription string `json:"error_description"` +} + +// Error returns the error message +func (err AccessTokenError) Error() string { + return fmt.Sprintf("%s: %s", err.ErrorCode, err.ErrorDescription) +} + +// TokenType specifies the kind of token +type TokenType string + +const ( + // TokenTypeBearer represents a token type specified in RFC 6749 + TokenTypeBearer TokenType = "bearer" + // TokenTypeMAC represents a token type specified in RFC 6749 + TokenTypeMAC = "mac" +) + +// AccessTokenResponse represents a successful access token response +type AccessTokenResponse struct { + AccessToken string `json:"access_token"` + TokenType TokenType `json:"token_type"` + ExpiresIn int64 `json:"expires_in"` + RefreshToken string `json:"refresh_token"` + IDToken string `json:"id_token,omitempty"` +} + +func newAccessTokenResponse(grant *models.OAuth2Grant, serverKey, clientKey oauth2.JWTSigningKey) (*AccessTokenResponse, *AccessTokenError) { + if setting.OAuth2.InvalidateRefreshTokens { + if err := grant.IncreaseCounter(); err != nil { + return nil, &AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidGrant, + ErrorDescription: "cannot increase the grant counter", + } + } + } + // generate access token to access the API + expirationDate := timeutil.TimeStampNow().Add(setting.OAuth2.AccessTokenExpirationTime) + accessToken := &oauth2.Token{ + GrantID: grant.ID, + Type: oauth2.TypeAccessToken, + StandardClaims: jwt.StandardClaims{ + ExpiresAt: expirationDate.AsTime().Unix(), + }, + } + signedAccessToken, err := accessToken.SignToken(serverKey) + if err != nil { + return nil, &AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot sign token", + } + } + + // generate refresh token to request an access token after it expired later + refreshExpirationDate := timeutil.TimeStampNow().Add(setting.OAuth2.RefreshTokenExpirationTime * 60 * 60).AsTime().Unix() + refreshToken := &oauth2.Token{ + GrantID: grant.ID, + Counter: grant.Counter, + Type: oauth2.TypeRefreshToken, + StandardClaims: jwt.StandardClaims{ + ExpiresAt: refreshExpirationDate, + }, + } + signedRefreshToken, err := refreshToken.SignToken(serverKey) + if err != nil { + return nil, &AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot sign token", + } + } + + // generate OpenID Connect id_token + signedIDToken := "" + if grant.ScopeContains("openid") { + app, err := models.GetOAuth2ApplicationByID(grant.ApplicationID) + if err != nil { + return nil, &AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot find application", + } + } + user, err := models.GetUserByID(grant.UserID) + if err != nil { + if models.IsErrUserNotExist(err) { + return nil, &AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot find user", + } + } + log.Error("Error loading user: %v", err) + return nil, &AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "server error", + } + } + + idToken := &oauth2.OIDCToken{ + StandardClaims: jwt.StandardClaims{ + ExpiresAt: expirationDate.AsTime().Unix(), + Issuer: setting.AppURL, + Audience: app.ClientID, + Subject: fmt.Sprint(grant.UserID), + }, + Nonce: grant.Nonce, + } + if grant.ScopeContains("profile") { + idToken.Name = user.FullName + idToken.PreferredUsername = user.Name + idToken.Profile = user.HTMLURL() + idToken.Picture = user.AvatarLink() + idToken.Website = user.Website + idToken.Locale = user.Language + idToken.UpdatedAt = user.UpdatedUnix + } + if grant.ScopeContains("email") { + idToken.Email = user.Email + idToken.EmailVerified = user.IsActive + } + + signedIDToken, err = idToken.SignToken(clientKey) + if err != nil { + return nil, &AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot sign token", + } + } + } + + return &AccessTokenResponse{ + AccessToken: signedAccessToken, + TokenType: TokenTypeBearer, + ExpiresIn: setting.OAuth2.AccessTokenExpirationTime, + RefreshToken: signedRefreshToken, + IDToken: signedIDToken, + }, nil +} + +type userInfoResponse struct { + Sub string `json:"sub"` + Name string `json:"name"` + Username string `json:"preferred_username"` + Email string `json:"email"` + Picture string `json:"picture"` +} + +// InfoOAuth manages request for userinfo endpoint +func InfoOAuth(ctx *context.Context) { + if ctx.User == nil || ctx.Data["AuthedMethod"] != (&auth.OAuth2{}).Name() { + ctx.Resp.Header().Set("WWW-Authenticate", `Bearer realm=""`) + ctx.HandleText(http.StatusUnauthorized, "no valid authorization") + return + } + response := &userInfoResponse{ + Sub: fmt.Sprint(ctx.User.ID), + Name: ctx.User.FullName, + Username: ctx.User.Name, + Email: ctx.User.Email, + Picture: ctx.User.AvatarLink(), + } + ctx.JSON(http.StatusOK, response) +} + +// IntrospectOAuth introspects an oauth token +func IntrospectOAuth(ctx *context.Context) { + if ctx.User == nil { + ctx.Resp.Header().Set("WWW-Authenticate", `Bearer realm=""`) + ctx.HandleText(http.StatusUnauthorized, "no valid authorization") + return + } + + var response struct { + Active bool `json:"active"` + Scope string `json:"scope,omitempty"` + jwt.StandardClaims + } + + form := web.GetForm(ctx).(*forms.IntrospectTokenForm) + token, err := oauth2.ParseToken(form.Token, oauth2.DefaultSigningKey) + if err == nil { + if token.Valid() == nil { + grant, err := models.GetOAuth2GrantByID(token.GrantID) + if err == nil && grant != nil { + app, err := models.GetOAuth2ApplicationByID(grant.ApplicationID) + if err == nil && app != nil { + response.Active = true + response.Scope = grant.Scope + response.Issuer = setting.AppURL + response.Audience = app.ClientID + response.Subject = fmt.Sprint(grant.UserID) + } + } + } + } + + ctx.JSON(http.StatusOK, response) +} + +// AuthorizeOAuth manages authorize requests +func AuthorizeOAuth(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AuthorizationForm) + errs := binding.Errors{} + errs = form.Validate(ctx.Req, errs) + if len(errs) > 0 { + errstring := "" + for _, e := range errs { + errstring += e.Error() + "\n" + } + ctx.ServerError("AuthorizeOAuth: Validate: ", fmt.Errorf("errors occurred during validation: %s", errstring)) + return + } + + app, err := models.GetOAuth2ApplicationByClientID(form.ClientID) + if err != nil { + if models.IsErrOauthClientIDInvalid(err) { + handleAuthorizeError(ctx, AuthorizeError{ + ErrorCode: ErrorCodeUnauthorizedClient, + ErrorDescription: "Client ID not registered", + State: form.State, + }, "") + return + } + ctx.ServerError("GetOAuth2ApplicationByClientID", err) + return + } + if err := app.LoadUser(); err != nil { + ctx.ServerError("LoadUser", err) + return + } + + if !app.ContainsRedirectURI(form.RedirectURI) { + handleAuthorizeError(ctx, AuthorizeError{ + ErrorCode: ErrorCodeInvalidRequest, + ErrorDescription: "Unregistered Redirect URI", + State: form.State, + }, "") + return + } + + if form.ResponseType != "code" { + handleAuthorizeError(ctx, AuthorizeError{ + ErrorCode: ErrorCodeUnsupportedResponseType, + ErrorDescription: "Only code response type is supported.", + State: form.State, + }, form.RedirectURI) + return + } + + // pkce support + switch form.CodeChallengeMethod { + case "S256": + case "plain": + if err := ctx.Session.Set("CodeChallengeMethod", form.CodeChallengeMethod); err != nil { + handleAuthorizeError(ctx, AuthorizeError{ + ErrorCode: ErrorCodeServerError, + ErrorDescription: "cannot set code challenge method", + State: form.State, + }, form.RedirectURI) + return + } + if err := ctx.Session.Set("CodeChallengeMethod", form.CodeChallenge); err != nil { + handleAuthorizeError(ctx, AuthorizeError{ + ErrorCode: ErrorCodeServerError, + ErrorDescription: "cannot set code challenge", + State: form.State, + }, form.RedirectURI) + return + } + // Here we're just going to try to release the session early + if err := ctx.Session.Release(); err != nil { + // we'll tolerate errors here as they *should* get saved elsewhere + log.Error("Unable to save changes to the session: %v", err) + } + case "": + break + default: + handleAuthorizeError(ctx, AuthorizeError{ + ErrorCode: ErrorCodeInvalidRequest, + ErrorDescription: "unsupported code challenge method", + State: form.State, + }, form.RedirectURI) + return + } + + grant, err := app.GetGrantByUserID(ctx.User.ID) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + return + } + + // Redirect if user already granted access + if grant != nil { + code, err := grant.GenerateNewAuthorizationCode(form.RedirectURI, form.CodeChallenge, form.CodeChallengeMethod) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + return + } + redirect, err := code.GenerateRedirectURI(form.State) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + return + } + // Update nonce to reflect the new session + if len(form.Nonce) > 0 { + err := grant.SetNonce(form.Nonce) + if err != nil { + log.Error("Unable to update nonce: %v", err) + } + } + ctx.Redirect(redirect.String(), 302) + return + } + + // show authorize page to grant access + ctx.Data["Application"] = app + ctx.Data["RedirectURI"] = form.RedirectURI + ctx.Data["State"] = form.State + ctx.Data["Scope"] = form.Scope + ctx.Data["Nonce"] = form.Nonce + ctx.Data["ApplicationUserLink"] = "@" + html.EscapeString(app.User.Name) + "" + ctx.Data["ApplicationRedirectDomainHTML"] = "" + html.EscapeString(form.RedirectURI) + "" + // TODO document SESSION <=> FORM + err = ctx.Session.Set("client_id", app.ClientID) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + log.Error(err.Error()) + return + } + err = ctx.Session.Set("redirect_uri", form.RedirectURI) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + log.Error(err.Error()) + return + } + err = ctx.Session.Set("state", form.State) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + log.Error(err.Error()) + return + } + // Here we're just going to try to release the session early + if err := ctx.Session.Release(); err != nil { + // we'll tolerate errors here as they *should* get saved elsewhere + log.Error("Unable to save changes to the session: %v", err) + } + ctx.HTML(http.StatusOK, tplGrantAccess) +} + +// GrantApplicationOAuth manages the post request submitted when a user grants access to an application +func GrantApplicationOAuth(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.GrantApplicationForm) + if ctx.Session.Get("client_id") != form.ClientID || ctx.Session.Get("state") != form.State || + ctx.Session.Get("redirect_uri") != form.RedirectURI { + ctx.Error(http.StatusBadRequest) + return + } + app, err := models.GetOAuth2ApplicationByClientID(form.ClientID) + if err != nil { + ctx.ServerError("GetOAuth2ApplicationByClientID", err) + return + } + grant, err := app.CreateGrant(ctx.User.ID, form.Scope) + if err != nil { + handleAuthorizeError(ctx, AuthorizeError{ + State: form.State, + ErrorDescription: "cannot create grant for user", + ErrorCode: ErrorCodeServerError, + }, form.RedirectURI) + return + } + if len(form.Nonce) > 0 { + err := grant.SetNonce(form.Nonce) + if err != nil { + log.Error("Unable to update nonce: %v", err) + } + } + + var codeChallenge, codeChallengeMethod string + codeChallenge, _ = ctx.Session.Get("CodeChallenge").(string) + codeChallengeMethod, _ = ctx.Session.Get("CodeChallengeMethod").(string) + + code, err := grant.GenerateNewAuthorizationCode(form.RedirectURI, codeChallenge, codeChallengeMethod) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + return + } + redirect, err := code.GenerateRedirectURI(form.State) + if err != nil { + handleServerError(ctx, form.State, form.RedirectURI) + return + } + ctx.Redirect(redirect.String(), 302) +} + +// OIDCWellKnown generates JSON so OIDC clients know Gitea's capabilities +func OIDCWellKnown(ctx *context.Context) { + t := ctx.Render.TemplateLookup("user/auth/oidc_wellknown") + ctx.Resp.Header().Set("Content-Type", "application/json") + ctx.Data["SigningKey"] = oauth2.DefaultSigningKey + if err := t.Execute(ctx.Resp, ctx.Data); err != nil { + log.Error("%v", err) + ctx.Error(http.StatusInternalServerError) + } +} + +// OIDCKeys generates the JSON Web Key Set +func OIDCKeys(ctx *context.Context) { + jwk, err := oauth2.DefaultSigningKey.ToJWK() + if err != nil { + log.Error("Error converting signing key to JWK: %v", err) + ctx.Error(http.StatusInternalServerError) + return + } + + jwk["use"] = "sig" + + jwks := map[string][]map[string]string{ + "keys": { + jwk, + }, + } + + ctx.Resp.Header().Set("Content-Type", "application/json") + enc := json.NewEncoder(ctx.Resp) + if err := enc.Encode(jwks); err != nil { + log.Error("Failed to encode representation as json. Error: %v", err) + } +} + +// AccessTokenOAuth manages all access token requests by the client +func AccessTokenOAuth(ctx *context.Context) { + form := *web.GetForm(ctx).(*forms.AccessTokenForm) + if form.ClientID == "" { + authHeader := ctx.Req.Header.Get("Authorization") + authContent := strings.SplitN(authHeader, " ", 2) + if len(authContent) == 2 && authContent[0] == "Basic" { + payload, err := base64.StdEncoding.DecodeString(authContent[1]) + if err != nil { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot parse basic auth header", + }) + return + } + pair := strings.SplitN(string(payload), ":", 2) + if len(pair) != 2 { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot parse basic auth header", + }) + return + } + form.ClientID = pair[0] + form.ClientSecret = pair[1] + } + } + + serverKey := oauth2.DefaultSigningKey + clientKey := serverKey + if serverKey.IsSymmetric() { + var err error + clientKey, err = oauth2.CreateJWTSigningKey(serverKey.SigningMethod().Alg(), []byte(form.ClientSecret)) + if err != nil { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "Error creating signing key", + }) + return + } + } + + switch form.GrantType { + case "refresh_token": + handleRefreshToken(ctx, form, serverKey, clientKey) + case "authorization_code": + handleAuthorizationCode(ctx, form, serverKey, clientKey) + default: + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeUnsupportedGrantType, + ErrorDescription: "Only refresh_token or authorization_code grant type is supported", + }) + } +} + +func handleRefreshToken(ctx *context.Context, form forms.AccessTokenForm, serverKey, clientKey oauth2.JWTSigningKey) { + token, err := oauth2.ParseToken(form.RefreshToken, serverKey) + if err != nil { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeUnauthorizedClient, + ErrorDescription: "client is not authorized", + }) + return + } + // get grant before increasing counter + grant, err := models.GetOAuth2GrantByID(token.GrantID) + if err != nil || grant == nil { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidGrant, + ErrorDescription: "grant does not exist", + }) + return + } + + // check if token got already used + if setting.OAuth2.InvalidateRefreshTokens && (grant.Counter != token.Counter || token.Counter == 0) { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeUnauthorizedClient, + ErrorDescription: "token was already used", + }) + log.Warn("A client tried to use a refresh token for grant_id = %d was used twice!", grant.ID) + return + } + accessToken, tokenErr := newAccessTokenResponse(grant, serverKey, clientKey) + if tokenErr != nil { + handleAccessTokenError(ctx, *tokenErr) + return + } + ctx.JSON(http.StatusOK, accessToken) +} + +func handleAuthorizationCode(ctx *context.Context, form forms.AccessTokenForm, serverKey, clientKey oauth2.JWTSigningKey) { + app, err := models.GetOAuth2ApplicationByClientID(form.ClientID) + if err != nil { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidClient, + ErrorDescription: fmt.Sprintf("cannot load client with client id: '%s'", form.ClientID), + }) + return + } + if !app.ValidateClientSecret([]byte(form.ClientSecret)) { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeUnauthorizedClient, + ErrorDescription: "client is not authorized", + }) + return + } + if form.RedirectURI != "" && !app.ContainsRedirectURI(form.RedirectURI) { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeUnauthorizedClient, + ErrorDescription: "client is not authorized", + }) + return + } + authorizationCode, err := models.GetOAuth2AuthorizationByCode(form.Code) + if err != nil || authorizationCode == nil { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeUnauthorizedClient, + ErrorDescription: "client is not authorized", + }) + return + } + // check if code verifier authorizes the client, PKCE support + if !authorizationCode.ValidateCodeChallenge(form.CodeVerifier) { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeUnauthorizedClient, + ErrorDescription: "client is not authorized", + }) + return + } + // check if granted for this application + if authorizationCode.Grant.ApplicationID != app.ID { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidGrant, + ErrorDescription: "invalid grant", + }) + return + } + // remove token from database to deny duplicate usage + if err := authorizationCode.Invalidate(); err != nil { + handleAccessTokenError(ctx, AccessTokenError{ + ErrorCode: AccessTokenErrorCodeInvalidRequest, + ErrorDescription: "cannot proceed your request", + }) + } + resp, tokenErr := newAccessTokenResponse(authorizationCode.Grant, serverKey, clientKey) + if tokenErr != nil { + handleAccessTokenError(ctx, *tokenErr) + return + } + // send successful response + ctx.JSON(http.StatusOK, resp) +} + +func handleAccessTokenError(ctx *context.Context, acErr AccessTokenError) { + ctx.JSON(http.StatusBadRequest, acErr) +} + +func handleServerError(ctx *context.Context, state string, redirectURI string) { + handleAuthorizeError(ctx, AuthorizeError{ + ErrorCode: ErrorCodeServerError, + ErrorDescription: "A server error occurred", + State: state, + }, redirectURI) +} + +func handleAuthorizeError(ctx *context.Context, authErr AuthorizeError, redirectURI string) { + if redirectURI == "" { + log.Warn("Authorization failed: %v", authErr.ErrorDescription) + ctx.Data["Error"] = authErr + ctx.HTML(400, tplGrantError) + return + } + redirect, err := url.Parse(redirectURI) + if err != nil { + ctx.ServerError("url.Parse", err) + return + } + q := redirect.Query() + q.Set("error", string(authErr.ErrorCode)) + q.Set("error_description", authErr.ErrorDescription) + q.Set("state", authErr.State) + redirect.RawQuery = q.Encode() + ctx.Redirect(redirect.String(), 302) +} diff --git a/routers/web/user/oauth_test.go b/routers/web/user/oauth_test.go new file mode 100644 index 000000000..40116d3c1 --- /dev/null +++ b/routers/web/user/oauth_test.go @@ -0,0 +1,74 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth/source/oauth2" + + "github.com/golang-jwt/jwt" + "github.com/stretchr/testify/assert" +) + +func createAndParseToken(t *testing.T, grant *models.OAuth2Grant) *oauth2.OIDCToken { + signingKey, err := oauth2.CreateJWTSigningKey("HS256", make([]byte, 32)) + assert.NoError(t, err) + assert.NotNil(t, signingKey) + + response, terr := newAccessTokenResponse(grant, signingKey, signingKey) + assert.Nil(t, terr) + assert.NotNil(t, response) + + parsedToken, err := jwt.ParseWithClaims(response.IDToken, &oauth2.OIDCToken{}, func(token *jwt.Token) (interface{}, error) { + assert.NotNil(t, token.Method) + assert.Equal(t, signingKey.SigningMethod().Alg(), token.Method.Alg()) + return signingKey.VerifyKey(), nil + }) + assert.NoError(t, err) + assert.True(t, parsedToken.Valid) + + oidcToken, ok := parsedToken.Claims.(*oauth2.OIDCToken) + assert.True(t, ok) + assert.NotNil(t, oidcToken) + + return oidcToken +} + +func TestNewAccessTokenResponse_OIDCToken(t *testing.T) { + assert.NoError(t, models.PrepareTestDatabase()) + + grants, err := models.GetOAuth2GrantsByUserID(3) + assert.NoError(t, err) + assert.Len(t, grants, 1) + + // Scopes: openid + oidcToken := createAndParseToken(t, grants[0]) + assert.Empty(t, oidcToken.Name) + assert.Empty(t, oidcToken.PreferredUsername) + assert.Empty(t, oidcToken.Profile) + assert.Empty(t, oidcToken.Picture) + assert.Empty(t, oidcToken.Website) + assert.Empty(t, oidcToken.UpdatedAt) + assert.Empty(t, oidcToken.Email) + assert.False(t, oidcToken.EmailVerified) + + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 5}).(*models.User) + grants, err = models.GetOAuth2GrantsByUserID(user.ID) + assert.NoError(t, err) + assert.Len(t, grants, 1) + + // Scopes: openid profile email + oidcToken = createAndParseToken(t, grants[0]) + assert.Equal(t, user.FullName, oidcToken.Name) + assert.Equal(t, user.Name, oidcToken.PreferredUsername) + assert.Equal(t, user.HTMLURL(), oidcToken.Profile) + assert.Equal(t, user.AvatarLink(), oidcToken.Picture) + assert.Equal(t, user.Website, oidcToken.Website) + assert.Equal(t, user.UpdatedUnix, oidcToken.UpdatedAt) + assert.Equal(t, user.Email, oidcToken.Email) + assert.Equal(t, user.IsActive, oidcToken.EmailVerified) +} diff --git a/routers/web/user/profile.go b/routers/web/user/profile.go new file mode 100644 index 000000000..9ecdc2345 --- /dev/null +++ b/routers/web/user/profile.go @@ -0,0 +1,337 @@ +// Copyright 2015 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "fmt" + "net/http" + "path" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/markup" + "code.gitea.io/gitea/modules/markup/markdown" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/routers/web/org" +) + +// GetUserByName get user by name +func GetUserByName(ctx *context.Context, name string) *models.User { + user, err := models.GetUserByName(name) + if err != nil { + if models.IsErrUserNotExist(err) { + if redirectUserID, err := models.LookupUserRedirect(name); err == nil { + context.RedirectToUser(ctx, name, redirectUserID) + } else { + ctx.NotFound("GetUserByName", err) + } + } else { + ctx.ServerError("GetUserByName", err) + } + return nil + } + return user +} + +// GetUserByParams returns user whose name is presented in URL paramenter. +func GetUserByParams(ctx *context.Context) *models.User { + return GetUserByName(ctx, ctx.Params(":username")) +} + +// Profile render user's profile page +func Profile(ctx *context.Context) { + uname := ctx.Params(":username") + + // Special handle for FireFox requests favicon.ico. + if uname == "favicon.ico" { + ctx.ServeFile(path.Join(setting.StaticRootPath, "public/img/favicon.png")) + return + } + + if strings.HasSuffix(uname, ".png") { + ctx.Error(http.StatusNotFound) + return + } + + isShowKeys := false + if strings.HasSuffix(uname, ".keys") { + isShowKeys = true + uname = strings.TrimSuffix(uname, ".keys") + } + + isShowGPG := false + if strings.HasSuffix(uname, ".gpg") { + isShowGPG = true + uname = strings.TrimSuffix(uname, ".gpg") + } + + ctxUser := GetUserByName(ctx, uname) + if ctx.Written() { + return + } + + if ctxUser.IsOrganization() { + org.Home(ctx) + return + } + + // check view permissions + if !ctxUser.IsVisibleToUser(ctx.User) { + ctx.NotFound("user", fmt.Errorf(uname)) + return + } + + // Show SSH keys. + if isShowKeys { + ShowSSHKeys(ctx, ctxUser.ID) + return + } + + // Show GPG keys. + if isShowGPG { + ShowGPGKeys(ctx, ctxUser.ID) + return + } + + // Show OpenID URIs + openIDs, err := models.GetUserOpenIDs(ctxUser.ID) + if err != nil { + ctx.ServerError("GetUserOpenIDs", err) + return + } + + ctx.Data["Title"] = ctxUser.DisplayName() + ctx.Data["PageIsUserProfile"] = true + ctx.Data["Owner"] = ctxUser + ctx.Data["OpenIDs"] = openIDs + + if setting.Service.EnableUserHeatmap { + data, err := models.GetUserHeatmapDataByUser(ctxUser, ctx.User) + if err != nil { + ctx.ServerError("GetUserHeatmapDataByUser", err) + return + } + ctx.Data["HeatmapData"] = data + } + + if len(ctxUser.Description) != 0 { + content, err := markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Repo.RepoLink, + Metas: map[string]string{"mode": "document"}, + GitRepo: ctx.Repo.GitRepo, + Ctx: ctx, + }, ctxUser.Description) + if err != nil { + ctx.ServerError("RenderString", err) + return + } + ctx.Data["RenderedDescription"] = content + } + + showPrivate := ctx.IsSigned && (ctx.User.IsAdmin || ctx.User.ID == ctxUser.ID) + + orgs, err := models.GetOrgsByUserID(ctxUser.ID, showPrivate) + if err != nil { + ctx.ServerError("GetOrgsByUserIDDesc", err) + return + } + + ctx.Data["Orgs"] = orgs + ctx.Data["HasOrgsVisible"] = models.HasOrgsVisible(orgs, ctx.User) + + tab := ctx.FormString("tab") + ctx.Data["TabName"] = tab + + page := ctx.FormInt("page") + if page <= 0 { + page = 1 + } + + topicOnly := ctx.FormBool("topic") + + var ( + repos []*models.Repository + count int64 + total int + orderBy models.SearchOrderBy + ) + + ctx.Data["SortType"] = ctx.FormString("sort") + switch ctx.FormString("sort") { + case "newest": + orderBy = models.SearchOrderByNewest + case "oldest": + orderBy = models.SearchOrderByOldest + case "recentupdate": + orderBy = models.SearchOrderByRecentUpdated + case "leastupdate": + orderBy = models.SearchOrderByLeastUpdated + case "reversealphabetically": + orderBy = models.SearchOrderByAlphabeticallyReverse + case "alphabetically": + orderBy = models.SearchOrderByAlphabetically + case "moststars": + orderBy = models.SearchOrderByStarsReverse + case "feweststars": + orderBy = models.SearchOrderByStars + case "mostforks": + orderBy = models.SearchOrderByForksReverse + case "fewestforks": + orderBy = models.SearchOrderByForks + default: + ctx.Data["SortType"] = "recentupdate" + orderBy = models.SearchOrderByRecentUpdated + } + + keyword := ctx.FormTrim("q") + ctx.Data["Keyword"] = keyword + switch tab { + case "followers": + items, err := ctxUser.GetFollowers(models.ListOptions{ + PageSize: setting.UI.User.RepoPagingNum, + Page: page, + }) + if err != nil { + ctx.ServerError("GetFollowers", err) + return + } + ctx.Data["Cards"] = items + + total = ctxUser.NumFollowers + case "following": + items, err := ctxUser.GetFollowing(models.ListOptions{ + PageSize: setting.UI.User.RepoPagingNum, + Page: page, + }) + if err != nil { + ctx.ServerError("GetFollowing", err) + return + } + ctx.Data["Cards"] = items + + total = ctxUser.NumFollowing + case "activity": + retrieveFeeds(ctx, models.GetFeedsOptions{RequestedUser: ctxUser, + Actor: ctx.User, + IncludePrivate: showPrivate, + OnlyPerformedBy: true, + IncludeDeleted: false, + Date: ctx.FormString("date"), + }) + if ctx.Written() { + return + } + case "stars": + ctx.Data["PageIsProfileStarList"] = true + repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ + ListOptions: models.ListOptions{ + PageSize: setting.UI.User.RepoPagingNum, + Page: page, + }, + Actor: ctx.User, + Keyword: keyword, + OrderBy: orderBy, + Private: ctx.IsSigned, + StarredByID: ctxUser.ID, + Collaborate: util.OptionalBoolFalse, + TopicOnly: topicOnly, + IncludeDescription: setting.UI.SearchRepoDescription, + }) + if err != nil { + ctx.ServerError("SearchRepository", err) + return + } + + total = int(count) + case "projects": + ctx.Data["OpenProjects"], _, err = models.GetProjects(models.ProjectSearchOptions{ + Page: -1, + IsClosed: util.OptionalBoolFalse, + Type: models.ProjectTypeIndividual, + }) + if err != nil { + ctx.ServerError("GetProjects", err) + return + } + case "watching": + repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ + ListOptions: models.ListOptions{ + PageSize: setting.UI.User.RepoPagingNum, + Page: page, + }, + Actor: ctx.User, + Keyword: keyword, + OrderBy: orderBy, + Private: ctx.IsSigned, + WatchedByID: ctxUser.ID, + Collaborate: util.OptionalBoolFalse, + TopicOnly: topicOnly, + IncludeDescription: setting.UI.SearchRepoDescription, + }) + if err != nil { + ctx.ServerError("SearchRepository", err) + return + } + + total = int(count) + default: + repos, count, err = models.SearchRepository(&models.SearchRepoOptions{ + ListOptions: models.ListOptions{ + PageSize: setting.UI.User.RepoPagingNum, + Page: page, + }, + Actor: ctx.User, + Keyword: keyword, + OwnerID: ctxUser.ID, + OrderBy: orderBy, + Private: ctx.IsSigned, + Collaborate: util.OptionalBoolFalse, + TopicOnly: topicOnly, + IncludeDescription: setting.UI.SearchRepoDescription, + }) + if err != nil { + ctx.ServerError("SearchRepository", err) + return + } + + total = int(count) + } + ctx.Data["Repos"] = repos + ctx.Data["Total"] = total + + pager := context.NewPagination(total, setting.UI.User.RepoPagingNum, page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + + ctx.Data["ShowUserEmail"] = len(ctxUser.Email) > 0 && ctx.IsSigned && (!ctxUser.KeepEmailPrivate || ctxUser.ID == ctx.User.ID) + + ctx.HTML(http.StatusOK, tplProfile) +} + +// Action response for follow/unfollow user request +func Action(ctx *context.Context) { + u := GetUserByParams(ctx) + if ctx.Written() { + return + } + + var err error + switch ctx.Params(":action") { + case "follow": + err = models.FollowUser(ctx.User.ID, u.ID) + case "unfollow": + err = models.UnfollowUser(ctx.User.ID, u.ID) + } + + if err != nil { + ctx.ServerError(fmt.Sprintf("Action (%s)", ctx.Params(":action")), err) + return + } + + ctx.RedirectToFirst(ctx.FormString("redirect_to"), u.HomeLink()) +} diff --git a/routers/web/user/setting/account.go b/routers/web/user/setting/account.go new file mode 100644 index 000000000..620107895 --- /dev/null +++ b/routers/web/user/setting/account.go @@ -0,0 +1,315 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package setting + +import ( + "errors" + "net/http" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/password" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/mailer" +) + +const ( + tplSettingsAccount base.TplName = "user/settings/account" +) + +// Account renders change user's password, user's email and user suicide page +func Account(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsAccount"] = true + ctx.Data["Email"] = ctx.User.Email + + loadAccountData(ctx) + + ctx.HTML(http.StatusOK, tplSettingsAccount) +} + +// AccountPost response for change user's password +func AccountPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.ChangePasswordForm) + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsAccount"] = true + + if ctx.HasError() { + loadAccountData(ctx) + + ctx.HTML(http.StatusOK, tplSettingsAccount) + return + } + + if len(form.Password) < setting.MinPasswordLength { + ctx.Flash.Error(ctx.Tr("auth.password_too_short", setting.MinPasswordLength)) + } else if ctx.User.IsPasswordSet() && !ctx.User.ValidatePassword(form.OldPassword) { + ctx.Flash.Error(ctx.Tr("settings.password_incorrect")) + } else if form.Password != form.Retype { + ctx.Flash.Error(ctx.Tr("form.password_not_match")) + } else if !password.IsComplexEnough(form.Password) { + ctx.Flash.Error(password.BuildComplexityError(ctx)) + } else if pwned, err := password.IsPwned(ctx, form.Password); pwned || err != nil { + errMsg := ctx.Tr("auth.password_pwned") + if err != nil { + log.Error(err.Error()) + errMsg = ctx.Tr("auth.password_pwned_err") + } + ctx.Flash.Error(errMsg) + } else { + var err error + if err = ctx.User.SetPassword(form.Password); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + if err := models.UpdateUserCols(ctx.User, "salt", "passwd_hash_algo", "passwd"); err != nil { + ctx.ServerError("UpdateUser", err) + return + } + log.Trace("User password updated: %s", ctx.User.Name) + ctx.Flash.Success(ctx.Tr("settings.change_password_success")) + } + + ctx.Redirect(setting.AppSubURL + "/user/settings/account") +} + +// EmailPost response for change user's email +func EmailPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AddEmailForm) + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsAccount"] = true + + // Make emailaddress primary. + if ctx.FormString("_method") == "PRIMARY" { + if err := models.MakeEmailPrimary(&models.EmailAddress{ID: ctx.FormInt64("id")}); err != nil { + ctx.ServerError("MakeEmailPrimary", err) + return + } + + log.Trace("Email made primary: %s", ctx.User.Name) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + // Send activation Email + if ctx.FormString("_method") == "SENDACTIVATION" { + var address string + if ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName) { + log.Error("Send activation: activation still pending") + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + + id := ctx.FormInt64("id") + email, err := models.GetEmailAddressByID(ctx.User.ID, id) + if err != nil { + log.Error("GetEmailAddressByID(%d,%d) error: %v", ctx.User.ID, id, err) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + if email == nil { + log.Warn("Send activation failed: EmailAddress[%d] not found for user: %-v", id, ctx.User) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + if email.IsActivated { + log.Debug("Send activation failed: email %s is already activated for user: %-v", email.Email, ctx.User) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + if email.IsPrimary { + if ctx.User.IsActive && !setting.Service.RegisterEmailConfirm { + log.Debug("Send activation failed: email %s is already activated for user: %-v", email.Email, ctx.User) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + // Only fired when the primary email is inactive (Wrong state) + mailer.SendActivateAccountMail(ctx.Locale, ctx.User) + } else { + mailer.SendActivateEmailMail(ctx.User, email) + } + address = email.Email + + if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil { + log.Error("Set cache(MailResendLimit) fail: %v", err) + } + ctx.Flash.Info(ctx.Tr("settings.add_email_confirmation_sent", address, timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()))) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + // Set Email Notification Preference + if ctx.FormString("_method") == "NOTIFICATION" { + preference := ctx.FormString("preference") + if !(preference == models.EmailNotificationsEnabled || + preference == models.EmailNotificationsOnMention || + preference == models.EmailNotificationsDisabled) { + log.Error("Email notifications preference change returned unrecognized option %s: %s", preference, ctx.User.Name) + ctx.ServerError("SetEmailPreference", errors.New("option unrecognized")) + return + } + if err := ctx.User.SetEmailNotifications(preference); err != nil { + log.Error("Set Email Notifications failed: %v", err) + ctx.ServerError("SetEmailNotifications", err) + return + } + log.Trace("Email notifications preference made %s: %s", preference, ctx.User.Name) + ctx.Flash.Success(ctx.Tr("settings.email_preference_set_success")) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + + if ctx.HasError() { + loadAccountData(ctx) + + ctx.HTML(http.StatusOK, tplSettingsAccount) + return + } + + email := &models.EmailAddress{ + UID: ctx.User.ID, + Email: form.Email, + IsActivated: !setting.Service.RegisterEmailConfirm, + } + if err := models.AddEmailAddress(email); err != nil { + if models.IsErrEmailAlreadyUsed(err) { + loadAccountData(ctx) + + ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSettingsAccount, &form) + return + } else if models.IsErrEmailInvalid(err) { + loadAccountData(ctx) + + ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplSettingsAccount, &form) + return + } + ctx.ServerError("AddEmailAddress", err) + return + } + + // Send confirmation email + if setting.Service.RegisterEmailConfirm { + mailer.SendActivateEmailMail(ctx.User, email) + if err := ctx.Cache.Put("MailResendLimit_"+ctx.User.LowerName, ctx.User.LowerName, 180); err != nil { + log.Error("Set cache(MailResendLimit) fail: %v", err) + } + ctx.Flash.Info(ctx.Tr("settings.add_email_confirmation_sent", email.Email, timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, ctx.Locale.Language()))) + } else { + ctx.Flash.Success(ctx.Tr("settings.add_email_success")) + } + + log.Trace("Email address added: %s", email.Email) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") +} + +// DeleteEmail response for delete user's email +func DeleteEmail(ctx *context.Context) { + if err := models.DeleteEmailAddress(&models.EmailAddress{ID: ctx.FormInt64("id"), UID: ctx.User.ID}); err != nil { + ctx.ServerError("DeleteEmail", err) + return + } + log.Trace("Email address deleted: %s", ctx.User.Name) + + ctx.Flash.Success(ctx.Tr("settings.email_deletion_success")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/user/settings/account", + }) +} + +// DeleteAccount render user suicide page and response for delete user himself +func DeleteAccount(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsAccount"] = true + + if _, err := auth.UserSignIn(ctx.User.Name, ctx.FormString("password")); err != nil { + if models.IsErrUserNotExist(err) { + loadAccountData(ctx) + + ctx.RenderWithErr(ctx.Tr("form.enterred_invalid_password"), tplSettingsAccount, nil) + } else { + ctx.ServerError("UserSignIn", err) + } + return + } + + if err := models.DeleteUser(ctx.User); err != nil { + switch { + case models.IsErrUserOwnRepos(err): + ctx.Flash.Error(ctx.Tr("form.still_own_repo")) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + case models.IsErrUserHasOrgs(err): + ctx.Flash.Error(ctx.Tr("form.still_has_org")) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + default: + ctx.ServerError("DeleteUser", err) + } + } else { + log.Trace("Account deleted: %s", ctx.User.Name) + ctx.Redirect(setting.AppSubURL + "/") + } +} + +// UpdateUIThemePost is used to update users' specific theme +func UpdateUIThemePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.UpdateThemeForm) + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsAccount"] = true + + if ctx.HasError() { + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + + if !form.IsThemeExists() { + ctx.Flash.Error(ctx.Tr("settings.theme_update_error")) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + + if err := ctx.User.UpdateTheme(form.Theme); err != nil { + ctx.Flash.Error(ctx.Tr("settings.theme_update_error")) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") + return + } + + log.Trace("Update user theme: %s", ctx.User.Name) + ctx.Flash.Success(ctx.Tr("settings.theme_update_success")) + ctx.Redirect(setting.AppSubURL + "/user/settings/account") +} + +func loadAccountData(ctx *context.Context) { + emlist, err := models.GetEmailAddresses(ctx.User.ID) + if err != nil { + ctx.ServerError("GetEmailAddresses", err) + return + } + type UserEmail struct { + models.EmailAddress + CanBePrimary bool + } + pendingActivation := ctx.Cache.IsExist("MailResendLimit_" + ctx.User.LowerName) + emails := make([]*UserEmail, len(emlist)) + for i, em := range emlist { + var email UserEmail + email.EmailAddress = *em + email.CanBePrimary = em.IsActivated + emails[i] = &email + } + ctx.Data["Emails"] = emails + ctx.Data["EmailNotificationsPreference"] = ctx.User.EmailNotifications() + ctx.Data["ActivationsPending"] = pendingActivation + ctx.Data["CanAddEmails"] = !pendingActivation || !setting.Service.RegisterEmailConfirm + + if setting.Service.UserDeleteWithCommentsMaxTime != 0 { + ctx.Data["UserDeleteWithCommentsMaxTime"] = setting.Service.UserDeleteWithCommentsMaxTime.String() + ctx.Data["UserDeleteWithComments"] = ctx.User.CreatedUnix.AsTime().Add(setting.Service.UserDeleteWithCommentsMaxTime).After(time.Now()) + } +} diff --git a/routers/user/setting/account_test.go b/routers/web/user/setting/account_test.go similarity index 94% rename from routers/user/setting/account_test.go rename to routers/web/user/setting/account_test.go index 841ecb8ac..25b68da76 100644 --- a/routers/user/setting/account_test.go +++ b/routers/web/user/setting/account_test.go @@ -9,9 +9,10 @@ import ( "testing" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/test" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" "github.com/stretchr/testify/assert" ) @@ -85,11 +86,12 @@ func TestChangePassword(t *testing.T) { test.LoadUser(t, ctx, 2) test.LoadRepo(t, ctx, 1) - AccountPost(ctx, auth.ChangePasswordForm{ + web.SetForm(ctx, &forms.ChangePasswordForm{ OldPassword: req.OldPassword, Password: req.NewPassword, Retype: req.Retype, }) + AccountPost(ctx) assert.Contains(t, ctx.Flash.ErrorMsg, req.Message) assert.EqualValues(t, http.StatusFound, ctx.Resp.Status()) diff --git a/routers/user/setting/adopt.go b/routers/web/user/setting/adopt.go similarity index 96% rename from routers/user/setting/adopt.go rename to routers/web/user/setting/adopt.go index b2d918784..e45a8a132 100644 --- a/routers/user/setting/adopt.go +++ b/routers/web/user/setting/adopt.go @@ -23,8 +23,8 @@ func AdoptOrDeleteRepository(ctx *context.Context) { allowDelete := ctx.IsUserSiteAdmin() || setting.Repository.AllowDeleteOfUnadoptedRepositories ctx.Data["allowDelete"] = allowDelete - dir := ctx.Query("id") - action := ctx.Query("action") + dir := ctx.FormString("id") + action := ctx.FormString("action") ctxUser := ctx.User root := filepath.Join(models.UserPath(ctxUser.LowerName)) diff --git a/routers/user/setting/applications.go b/routers/web/user/setting/applications.go similarity index 85% rename from routers/user/setting/applications.go rename to routers/web/user/setting/applications.go index 04f9d9f7f..5e208afaf 100644 --- a/routers/user/setting/applications.go +++ b/routers/web/user/setting/applications.go @@ -6,11 +6,14 @@ package setting import ( + "net/http" + "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" ) const ( @@ -24,18 +27,19 @@ func Applications(ctx *context.Context) { loadApplicationsData(ctx) - ctx.HTML(200, tplSettingsApplications) + ctx.HTML(http.StatusOK, tplSettingsApplications) } // ApplicationsPost response for add user's access token -func ApplicationsPost(ctx *context.Context, form auth.NewAccessTokenForm) { +func ApplicationsPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.NewAccessTokenForm) ctx.Data["Title"] = ctx.Tr("settings") ctx.Data["PageIsSettingsApplications"] = true if ctx.HasError() { loadApplicationsData(ctx) - ctx.HTML(200, tplSettingsApplications) + ctx.HTML(http.StatusOK, tplSettingsApplications) return } @@ -68,13 +72,13 @@ func ApplicationsPost(ctx *context.Context, form auth.NewAccessTokenForm) { // DeleteApplication response for delete user access token func DeleteApplication(ctx *context.Context) { - if err := models.DeleteAccessTokenByID(ctx.QueryInt64("id"), ctx.User.ID); err != nil { + if err := models.DeleteAccessTokenByID(ctx.FormInt64("id"), ctx.User.ID); err != nil { ctx.Flash.Error("DeleteAccessTokenByID: " + err.Error()) } else { ctx.Flash.Success(ctx.Tr("settings.delete_token_success")) } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": setting.AppSubURL + "/user/settings/applications", }) } diff --git a/routers/web/user/setting/keys.go b/routers/web/user/setting/keys.go new file mode 100644 index 000000000..24b9a9e20 --- /dev/null +++ b/routers/web/user/setting/keys.go @@ -0,0 +1,269 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package setting + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" +) + +const ( + tplSettingsKeys base.TplName = "user/settings/keys" +) + +// Keys render user's SSH/GPG public keys page +func Keys(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsKeys"] = true + ctx.Data["DisableSSH"] = setting.SSH.Disabled + ctx.Data["BuiltinSSH"] = setting.SSH.StartBuiltinServer + ctx.Data["AllowPrincipals"] = setting.SSH.AuthorizedPrincipalsEnabled + + loadKeysData(ctx) + + ctx.HTML(http.StatusOK, tplSettingsKeys) +} + +// KeysPost response for change user's SSH/GPG keys +func KeysPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AddKeyForm) + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsKeys"] = true + ctx.Data["DisableSSH"] = setting.SSH.Disabled + ctx.Data["BuiltinSSH"] = setting.SSH.StartBuiltinServer + ctx.Data["AllowPrincipals"] = setting.SSH.AuthorizedPrincipalsEnabled + + if ctx.HasError() { + loadKeysData(ctx) + + ctx.HTML(http.StatusOK, tplSettingsKeys) + return + } + switch form.Type { + case "principal": + content, err := models.CheckPrincipalKeyString(ctx.User, form.Content) + if err != nil { + if models.IsErrSSHDisabled(err) { + ctx.Flash.Info(ctx.Tr("settings.ssh_disabled")) + } else { + ctx.Flash.Error(ctx.Tr("form.invalid_ssh_principal", err.Error())) + } + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + return + } + if _, err = models.AddPrincipalKey(ctx.User.ID, content, 0); err != nil { + ctx.Data["HasPrincipalError"] = true + switch { + case models.IsErrKeyAlreadyExist(err), models.IsErrKeyNameAlreadyUsed(err): + loadKeysData(ctx) + + ctx.Data["Err_Content"] = true + ctx.RenderWithErr(ctx.Tr("settings.ssh_principal_been_used"), tplSettingsKeys, &form) + default: + ctx.ServerError("AddPrincipalKey", err) + } + return + } + ctx.Flash.Success(ctx.Tr("settings.add_principal_success", form.Content)) + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + case "gpg": + token := models.VerificationToken(ctx.User, 1) + lastToken := models.VerificationToken(ctx.User, 0) + + keys, err := models.AddGPGKey(ctx.User.ID, form.Content, token, form.Signature) + if err != nil && models.IsErrGPGInvalidTokenSignature(err) { + keys, err = models.AddGPGKey(ctx.User.ID, form.Content, lastToken, form.Signature) + } + if err != nil { + ctx.Data["HasGPGError"] = true + switch { + case models.IsErrGPGKeyParsing(err): + ctx.Flash.Error(ctx.Tr("form.invalid_gpg_key", err.Error())) + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + case models.IsErrGPGKeyIDAlreadyUsed(err): + loadKeysData(ctx) + + ctx.Data["Err_Content"] = true + ctx.RenderWithErr(ctx.Tr("settings.gpg_key_id_used"), tplSettingsKeys, &form) + case models.IsErrGPGInvalidTokenSignature(err): + loadKeysData(ctx) + ctx.Data["Err_Content"] = true + ctx.Data["Err_Signature"] = true + ctx.Data["KeyID"] = err.(models.ErrGPGInvalidTokenSignature).ID + ctx.RenderWithErr(ctx.Tr("settings.gpg_invalid_token_signature"), tplSettingsKeys, &form) + case models.IsErrGPGNoEmailFound(err): + loadKeysData(ctx) + + ctx.Data["Err_Content"] = true + ctx.Data["Err_Signature"] = true + ctx.Data["KeyID"] = err.(models.ErrGPGNoEmailFound).ID + ctx.RenderWithErr(ctx.Tr("settings.gpg_no_key_email_found"), tplSettingsKeys, &form) + default: + ctx.ServerError("AddPublicKey", err) + } + return + } + keyIDs := "" + for _, key := range keys { + keyIDs += key.KeyID + keyIDs += ", " + } + if len(keyIDs) > 0 { + keyIDs = keyIDs[:len(keyIDs)-2] + } + ctx.Flash.Success(ctx.Tr("settings.add_gpg_key_success", keyIDs)) + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + case "verify_gpg": + token := models.VerificationToken(ctx.User, 1) + lastToken := models.VerificationToken(ctx.User, 0) + + keyID, err := models.VerifyGPGKey(ctx.User.ID, form.KeyID, token, form.Signature) + if err != nil && models.IsErrGPGInvalidTokenSignature(err) { + keyID, err = models.VerifyGPGKey(ctx.User.ID, form.KeyID, lastToken, form.Signature) + } + if err != nil { + ctx.Data["HasGPGVerifyError"] = true + switch { + case models.IsErrGPGInvalidTokenSignature(err): + loadKeysData(ctx) + ctx.Data["VerifyingID"] = form.KeyID + ctx.Data["Err_Signature"] = true + ctx.Data["KeyID"] = err.(models.ErrGPGInvalidTokenSignature).ID + ctx.RenderWithErr(ctx.Tr("settings.gpg_invalid_token_signature"), tplSettingsKeys, &form) + default: + ctx.ServerError("VerifyGPG", err) + } + } + ctx.Flash.Success(ctx.Tr("settings.verify_gpg_key_success", keyID)) + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + case "ssh": + content, err := models.CheckPublicKeyString(form.Content) + if err != nil { + if models.IsErrSSHDisabled(err) { + ctx.Flash.Info(ctx.Tr("settings.ssh_disabled")) + } else if models.IsErrKeyUnableVerify(err) { + ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key")) + } else { + ctx.Flash.Error(ctx.Tr("form.invalid_ssh_key", err.Error())) + } + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + return + } + + if _, err = models.AddPublicKey(ctx.User.ID, form.Title, content, 0); err != nil { + ctx.Data["HasSSHError"] = true + switch { + case models.IsErrKeyAlreadyExist(err): + loadKeysData(ctx) + + ctx.Data["Err_Content"] = true + ctx.RenderWithErr(ctx.Tr("settings.ssh_key_been_used"), tplSettingsKeys, &form) + case models.IsErrKeyNameAlreadyUsed(err): + loadKeysData(ctx) + + ctx.Data["Err_Title"] = true + ctx.RenderWithErr(ctx.Tr("settings.ssh_key_name_used"), tplSettingsKeys, &form) + case models.IsErrKeyUnableVerify(err): + ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key")) + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + default: + ctx.ServerError("AddPublicKey", err) + } + return + } + ctx.Flash.Success(ctx.Tr("settings.add_key_success", form.Title)) + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + + default: + ctx.Flash.Warning("Function not implemented") + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + } + +} + +// DeleteKey response for delete user's SSH/GPG key +func DeleteKey(ctx *context.Context) { + + switch ctx.FormString("type") { + case "gpg": + if err := models.DeleteGPGKey(ctx.User, ctx.FormInt64("id")); err != nil { + ctx.Flash.Error("DeleteGPGKey: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("settings.gpg_key_deletion_success")) + } + case "ssh": + keyID := ctx.FormInt64("id") + external, err := models.PublicKeyIsExternallyManaged(keyID) + if err != nil { + ctx.ServerError("sshKeysExternalManaged", err) + return + } + if external { + ctx.Flash.Error(ctx.Tr("setting.ssh_externally_managed")) + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + return + } + if err := models.DeletePublicKey(ctx.User, keyID); err != nil { + ctx.Flash.Error("DeletePublicKey: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("settings.ssh_key_deletion_success")) + } + case "principal": + if err := models.DeletePublicKey(ctx.User, ctx.FormInt64("id")); err != nil { + ctx.Flash.Error("DeletePublicKey: " + err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("settings.ssh_principal_deletion_success")) + } + default: + ctx.Flash.Warning("Function not implemented") + ctx.Redirect(setting.AppSubURL + "/user/settings/keys") + } + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/user/settings/keys", + }) +} + +func loadKeysData(ctx *context.Context) { + keys, err := models.ListPublicKeys(ctx.User.ID, models.ListOptions{}) + if err != nil { + ctx.ServerError("ListPublicKeys", err) + return + } + ctx.Data["Keys"] = keys + + externalKeys, err := models.PublicKeysAreExternallyManaged(keys) + if err != nil { + ctx.ServerError("ListPublicKeys", err) + return + } + ctx.Data["ExternalKeys"] = externalKeys + + gpgkeys, err := models.ListGPGKeys(ctx.User.ID, models.ListOptions{}) + if err != nil { + ctx.ServerError("ListGPGKeys", err) + return + } + ctx.Data["GPGKeys"] = gpgkeys + tokenToSign := models.VerificationToken(ctx.User, 1) + + // generate a new aes cipher using the csrfToken + ctx.Data["TokenToSign"] = tokenToSign + + principals, err := models.ListPrincipalKeys(ctx.User.ID, models.ListOptions{}) + if err != nil { + ctx.ServerError("ListPrincipalKeys", err) + return + } + ctx.Data["Principals"] = principals + + ctx.Data["VerifyingID"] = ctx.FormString("verify_gpg") +} diff --git a/routers/web/user/setting/main_test.go b/routers/web/user/setting/main_test.go new file mode 100644 index 000000000..daa3f7fe5 --- /dev/null +++ b/routers/web/user/setting/main_test.go @@ -0,0 +1,16 @@ +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package setting + +import ( + "path/filepath" + "testing" + + "code.gitea.io/gitea/models" +) + +func TestMain(m *testing.M) { + models.MainTest(m, filepath.Join("..", "..", "..", "..")) +} diff --git a/routers/web/user/setting/oauth2.go b/routers/web/user/setting/oauth2.go new file mode 100644 index 000000000..8de0720b5 --- /dev/null +++ b/routers/web/user/setting/oauth2.go @@ -0,0 +1,159 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package setting + +import ( + "fmt" + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" +) + +const ( + tplSettingsOAuthApplications base.TplName = "user/settings/applications_oauth2_edit" +) + +// OAuthApplicationsPost response for adding a oauth2 application +func OAuthApplicationsPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditOAuth2ApplicationForm) + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsApplications"] = true + + if ctx.HasError() { + loadApplicationsData(ctx) + + ctx.HTML(http.StatusOK, tplSettingsApplications) + return + } + // TODO validate redirect URI + app, err := models.CreateOAuth2Application(models.CreateOAuth2ApplicationOptions{ + Name: form.Name, + RedirectURIs: []string{form.RedirectURI}, + UserID: ctx.User.ID, + }) + if err != nil { + ctx.ServerError("CreateOAuth2Application", err) + return + } + ctx.Flash.Success(ctx.Tr("settings.create_oauth2_application_success")) + ctx.Data["App"] = app + ctx.Data["ClientSecret"], err = app.GenerateClientSecret() + if err != nil { + ctx.ServerError("GenerateClientSecret", err) + return + } + ctx.HTML(http.StatusOK, tplSettingsOAuthApplications) +} + +// OAuthApplicationsEdit response for editing oauth2 application +func OAuthApplicationsEdit(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.EditOAuth2ApplicationForm) + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsApplications"] = true + + if ctx.HasError() { + loadApplicationsData(ctx) + + ctx.HTML(http.StatusOK, tplSettingsApplications) + return + } + // TODO validate redirect URI + var err error + if ctx.Data["App"], err = models.UpdateOAuth2Application(models.UpdateOAuth2ApplicationOptions{ + ID: ctx.ParamsInt64("id"), + Name: form.Name, + RedirectURIs: []string{form.RedirectURI}, + UserID: ctx.User.ID, + }); err != nil { + ctx.ServerError("UpdateOAuth2Application", err) + return + } + ctx.Flash.Success(ctx.Tr("settings.update_oauth2_application_success")) + ctx.HTML(http.StatusOK, tplSettingsOAuthApplications) +} + +// OAuthApplicationsRegenerateSecret handles the post request for regenerating the secret +func OAuthApplicationsRegenerateSecret(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsApplications"] = true + + app, err := models.GetOAuth2ApplicationByID(ctx.ParamsInt64("id")) + if err != nil { + if models.IsErrOAuthApplicationNotFound(err) { + ctx.NotFound("Application not found", err) + return + } + ctx.ServerError("GetOAuth2ApplicationByID", err) + return + } + if app.UID != ctx.User.ID { + ctx.NotFound("Application not found", nil) + return + } + ctx.Data["App"] = app + ctx.Data["ClientSecret"], err = app.GenerateClientSecret() + if err != nil { + ctx.ServerError("GenerateClientSecret", err) + return + } + ctx.Flash.Success(ctx.Tr("settings.update_oauth2_application_success")) + ctx.HTML(http.StatusOK, tplSettingsOAuthApplications) +} + +// OAuth2ApplicationShow displays the given application +func OAuth2ApplicationShow(ctx *context.Context) { + app, err := models.GetOAuth2ApplicationByID(ctx.ParamsInt64("id")) + if err != nil { + if models.IsErrOAuthApplicationNotFound(err) { + ctx.NotFound("Application not found", err) + return + } + ctx.ServerError("GetOAuth2ApplicationByID", err) + return + } + if app.UID != ctx.User.ID { + ctx.NotFound("Application not found", nil) + return + } + ctx.Data["App"] = app + ctx.HTML(http.StatusOK, tplSettingsOAuthApplications) +} + +// DeleteOAuth2Application deletes the given oauth2 application +func DeleteOAuth2Application(ctx *context.Context) { + if err := models.DeleteOAuth2Application(ctx.FormInt64("id"), ctx.User.ID); err != nil { + ctx.ServerError("DeleteOAuth2Application", err) + return + } + log.Trace("OAuth2 Application deleted: %s", ctx.User.Name) + + ctx.Flash.Success(ctx.Tr("settings.remove_oauth2_application_success")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/user/settings/applications", + }) +} + +// RevokeOAuth2Grant revokes the grant with the given id +func RevokeOAuth2Grant(ctx *context.Context) { + if ctx.User.ID == 0 || ctx.FormInt64("id") == 0 { + ctx.ServerError("RevokeOAuth2Grant", fmt.Errorf("user id or grant id is zero")) + return + } + if err := models.RevokeOAuth2Grant(ctx.FormInt64("id"), ctx.User.ID); err != nil { + ctx.ServerError("RevokeOAuth2Grant", err) + return + } + + ctx.Flash.Success(ctx.Tr("settings.revoke_oauth2_grant_success")) + ctx.JSON(http.StatusOK, map[string]interface{}{ + "redirect": setting.AppSubURL + "/user/settings/applications", + }) +} diff --git a/routers/web/user/setting/profile.go b/routers/web/user/setting/profile.go new file mode 100644 index 000000000..15c08856b --- /dev/null +++ b/routers/web/user/setting/profile.go @@ -0,0 +1,330 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package setting + +import ( + "errors" + "fmt" + "io/ioutil" + "net/http" + "os" + "path/filepath" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/typesniffer" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/agit" + "code.gitea.io/gitea/services/forms" + + "github.com/unknwon/i18n" +) + +const ( + tplSettingsProfile base.TplName = "user/settings/profile" + tplSettingsOrganization base.TplName = "user/settings/organization" + tplSettingsRepositories base.TplName = "user/settings/repos" +) + +// Profile render user's profile page +func Profile(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsProfile"] = true + ctx.Data["AllowedUserVisibilityModes"] = setting.Service.AllowedUserVisibilityModesSlice.ToVisibleTypeSlice() + + ctx.HTML(http.StatusOK, tplSettingsProfile) +} + +// HandleUsernameChange handle username changes from user settings and admin interface +func HandleUsernameChange(ctx *context.Context, user *models.User, newName string) error { + // Non-local users are not allowed to change their username. + if !user.IsLocal() { + ctx.Flash.Error(ctx.Tr("form.username_change_not_local_user")) + return fmt.Errorf(ctx.Tr("form.username_change_not_local_user")) + } + + // Check if user name has been changed + if user.LowerName != strings.ToLower(newName) { + if err := models.ChangeUserName(user, newName); err != nil { + switch { + case models.IsErrUserAlreadyExist(err): + ctx.Flash.Error(ctx.Tr("form.username_been_taken")) + case models.IsErrEmailAlreadyUsed(err): + ctx.Flash.Error(ctx.Tr("form.email_been_used")) + case models.IsErrNameReserved(err): + ctx.Flash.Error(ctx.Tr("user.form.name_reserved", newName)) + case models.IsErrNamePatternNotAllowed(err): + ctx.Flash.Error(ctx.Tr("user.form.name_pattern_not_allowed", newName)) + case models.IsErrNameCharsNotAllowed(err): + ctx.Flash.Error(ctx.Tr("user.form.name_chars_not_allowed", newName)) + default: + ctx.ServerError("ChangeUserName", err) + } + return err + } + } else { + if err := models.UpdateRepositoryOwnerNames(user.ID, newName); err != nil { + ctx.ServerError("UpdateRepository", err) + return err + } + } + + // update all agit flow pull request header + err := agit.UserNameChanged(user, newName) + if err != nil { + ctx.ServerError("agit.UserNameChanged", err) + return err + } + + log.Trace("User name changed: %s -> %s", user.Name, newName) + return nil +} + +// ProfilePost response for change user's profile +func ProfilePost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.UpdateProfileForm) + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsProfile"] = true + + if ctx.HasError() { + ctx.HTML(http.StatusOK, tplSettingsProfile) + return + } + + if len(form.Name) != 0 && ctx.User.Name != form.Name { + log.Debug("Changing name for %s to %s", ctx.User.Name, form.Name) + if err := HandleUsernameChange(ctx, ctx.User, form.Name); err != nil { + ctx.Redirect(setting.AppSubURL + "/user/settings") + return + } + ctx.User.Name = form.Name + ctx.User.LowerName = strings.ToLower(form.Name) + } + + ctx.User.FullName = form.FullName + ctx.User.KeepEmailPrivate = form.KeepEmailPrivate + ctx.User.Website = form.Website + ctx.User.Location = form.Location + if len(form.Language) != 0 { + if !util.IsStringInSlice(form.Language, setting.Langs) { + ctx.Flash.Error(ctx.Tr("settings.update_language_not_found", form.Language)) + ctx.Redirect(setting.AppSubURL + "/user/settings") + return + } + ctx.User.Language = form.Language + } + ctx.User.Description = form.Description + ctx.User.KeepActivityPrivate = form.KeepActivityPrivate + ctx.User.Visibility = form.Visibility + if err := models.UpdateUserSetting(ctx.User); err != nil { + if _, ok := err.(models.ErrEmailAlreadyUsed); ok { + ctx.Flash.Error(ctx.Tr("form.email_been_used")) + ctx.Redirect(setting.AppSubURL + "/user/settings") + return + } + ctx.ServerError("UpdateUser", err) + return + } + + // Update the language to the one we just set + middleware.SetLocaleCookie(ctx.Resp, ctx.User.Language, 0) + + log.Trace("User settings updated: %s", ctx.User.Name) + ctx.Flash.Success(i18n.Tr(ctx.User.Language, "settings.update_profile_success")) + ctx.Redirect(setting.AppSubURL + "/user/settings") +} + +// UpdateAvatarSetting update user's avatar +// FIXME: limit size. +func UpdateAvatarSetting(ctx *context.Context, form *forms.AvatarForm, ctxUser *models.User) error { + ctxUser.UseCustomAvatar = form.Source == forms.AvatarLocal + if len(form.Gravatar) > 0 { + if form.Avatar != nil { + ctxUser.Avatar = base.EncodeMD5(form.Gravatar) + } else { + ctxUser.Avatar = "" + } + ctxUser.AvatarEmail = form.Gravatar + } + + if form.Avatar != nil && form.Avatar.Filename != "" { + fr, err := form.Avatar.Open() + if err != nil { + return fmt.Errorf("Avatar.Open: %v", err) + } + defer fr.Close() + + if form.Avatar.Size > setting.Avatar.MaxFileSize { + return errors.New(ctx.Tr("settings.uploaded_avatar_is_too_big")) + } + + data, err := ioutil.ReadAll(fr) + if err != nil { + return fmt.Errorf("ioutil.ReadAll: %v", err) + } + + st := typesniffer.DetectContentType(data) + if !(st.IsImage() && !st.IsSvgImage()) { + return errors.New(ctx.Tr("settings.uploaded_avatar_not_a_image")) + } + if err = ctxUser.UploadAvatar(data); err != nil { + return fmt.Errorf("UploadAvatar: %v", err) + } + } else if ctxUser.UseCustomAvatar && ctxUser.Avatar == "" { + // No avatar is uploaded but setting has been changed to enable, + // generate a random one when needed. + if err := ctxUser.GenerateRandomAvatar(); err != nil { + log.Error("GenerateRandomAvatar[%d]: %v", ctxUser.ID, err) + } + } + + if err := models.UpdateUserCols(ctxUser, "avatar", "avatar_email", "use_custom_avatar"); err != nil { + return fmt.Errorf("UpdateUser: %v", err) + } + + return nil +} + +// AvatarPost response for change user's avatar request +func AvatarPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AvatarForm) + if err := UpdateAvatarSetting(ctx, form, ctx.User); err != nil { + ctx.Flash.Error(err.Error()) + } else { + ctx.Flash.Success(ctx.Tr("settings.update_avatar_success")) + } + + ctx.Redirect(setting.AppSubURL + "/user/settings") +} + +// DeleteAvatar render delete avatar page +func DeleteAvatar(ctx *context.Context) { + if err := ctx.User.DeleteAvatar(); err != nil { + ctx.Flash.Error(err.Error()) + } + + ctx.Redirect(setting.AppSubURL + "/user/settings") +} + +// Organization render all the organization of the user +func Organization(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsOrganization"] = true + orgs, err := models.GetOrgsByUserID(ctx.User.ID, ctx.IsSigned) + if err != nil { + ctx.ServerError("GetOrgsByUserID", err) + return + } + ctx.Data["Orgs"] = orgs + ctx.HTML(http.StatusOK, tplSettingsOrganization) +} + +// Repos display a list of all repositories of the user +func Repos(ctx *context.Context) { + ctx.Data["Title"] = ctx.Tr("settings") + ctx.Data["PageIsSettingsRepos"] = true + ctx.Data["allowAdopt"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowAdoptionOfUnadoptedRepositories + ctx.Data["allowDelete"] = ctx.IsUserSiteAdmin() || setting.Repository.AllowDeleteOfUnadoptedRepositories + + opts := models.ListOptions{ + PageSize: setting.UI.Admin.UserPagingNum, + Page: ctx.FormInt("page"), + } + + if opts.Page <= 0 { + opts.Page = 1 + } + start := (opts.Page - 1) * opts.PageSize + end := start + opts.PageSize + + adoptOrDelete := ctx.IsUserSiteAdmin() || (setting.Repository.AllowAdoptionOfUnadoptedRepositories && setting.Repository.AllowDeleteOfUnadoptedRepositories) + + ctxUser := ctx.User + count := 0 + + if adoptOrDelete { + repoNames := make([]string, 0, setting.UI.Admin.UserPagingNum) + repos := map[string]*models.Repository{} + // We're going to iterate by pagesize. + root := filepath.Join(models.UserPath(ctxUser.Name)) + if err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error { + if err != nil { + if os.IsNotExist(err) { + return nil + } + return err + } + if !info.IsDir() || path == root { + return nil + } + name := info.Name() + if !strings.HasSuffix(name, ".git") { + return filepath.SkipDir + } + name = name[:len(name)-4] + if models.IsUsableRepoName(name) != nil || strings.ToLower(name) != name { + return filepath.SkipDir + } + if count >= start && count < end { + repoNames = append(repoNames, name) + } + count++ + return filepath.SkipDir + }); err != nil { + ctx.ServerError("filepath.Walk", err) + return + } + + if err := ctxUser.GetRepositories(models.ListOptions{Page: 1, PageSize: setting.UI.Admin.UserPagingNum}, repoNames...); err != nil { + ctx.ServerError("GetRepositories", err) + return + } + for _, repo := range ctxUser.Repos { + if repo.IsFork { + if err := repo.GetBaseRepo(); err != nil { + ctx.ServerError("GetBaseRepo", err) + return + } + } + repos[repo.LowerName] = repo + } + ctx.Data["Dirs"] = repoNames + ctx.Data["ReposMap"] = repos + } else { + var err error + var count64 int64 + ctxUser.Repos, count64, err = models.GetUserRepositories(&models.SearchRepoOptions{Actor: ctxUser, Private: true, ListOptions: opts}) + + if err != nil { + ctx.ServerError("GetRepositories", err) + return + } + count = int(count64) + repos := ctxUser.Repos + + for i := range repos { + if repos[i].IsFork { + if err := repos[i].GetBaseRepo(); err != nil { + ctx.ServerError("GetBaseRepo", err) + return + } + } + } + + ctx.Data["Repos"] = repos + } + ctx.Data["Owner"] = ctxUser + pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) + pager.SetDefaultParams(ctx) + ctx.Data["Page"] = pager + ctx.HTML(http.StatusOK, tplSettingsRepositories) +} diff --git a/routers/user/setting/security.go b/routers/web/user/setting/security.go similarity index 83% rename from routers/user/setting/security.go rename to routers/web/user/setting/security.go index 787ac922e..340619401 100644 --- a/routers/user/setting/security.go +++ b/routers/web/user/setting/security.go @@ -6,6 +6,8 @@ package setting import ( + "net/http" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/context" @@ -21,20 +23,21 @@ const ( func Security(ctx *context.Context) { ctx.Data["Title"] = ctx.Tr("settings") ctx.Data["PageIsSettingsSecurity"] = true + ctx.Data["RequireU2F"] = true - if ctx.Query("openid.return_to") != "" { + if ctx.FormString("openid.return_to") != "" { settingsOpenIDVerify(ctx) return } loadSecurityData(ctx) - ctx.HTML(200, tplSettingsSecurity) + ctx.HTML(http.StatusOK, tplSettingsSecurity) } // DeleteAccountLink delete a single account link func DeleteAccountLink(ctx *context.Context) { - id := ctx.QueryInt64("id") + id := ctx.FormInt64("id") if id <= 0 { ctx.Flash.Error("Account link id is not given") } else { @@ -45,7 +48,7 @@ func DeleteAccountLink(ctx *context.Context) { } } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": setting.AppSubURL + "/user/settings/security", }) } @@ -68,7 +71,6 @@ func loadSecurityData(ctx *context.Context) { ctx.ServerError("GetU2FRegistrationsByUID", err) return } - ctx.Data["RequireU2F"] = true } tokens, err := models.ListAccessTokens(models.ListAccessTokensOptions{UserID: ctx.User.ID}) @@ -89,9 +91,19 @@ func loadSecurityData(ctx *context.Context) { for _, externalAccount := range accountLinks { if loginSource, err := models.GetLoginSourceByID(externalAccount.LoginSourceID); err == nil { var providerDisplayName string - if loginSource.IsOAuth2() { - providerTechnicalName := loginSource.OAuth2().Provider - providerDisplayName = models.OAuth2Providers[providerTechnicalName].DisplayName + + type DisplayNamed interface { + DisplayName() string + } + + type Named interface { + Name() string + } + + if displayNamed, ok := loginSource.Cfg.(DisplayNamed); ok { + providerDisplayName = displayNamed.DisplayName() + } else if named, ok := loginSource.Cfg.(Named); ok { + providerDisplayName = named.Name() } else { providerDisplayName = loginSource.Name } diff --git a/routers/user/setting/security_openid.go b/routers/web/user/setting/security_openid.go similarity index 80% rename from routers/user/setting/security_openid.go rename to routers/web/user/setting/security_openid.go index 6813765f6..8bb932805 100644 --- a/routers/user/setting/security_openid.go +++ b/routers/web/user/setting/security_openid.go @@ -5,23 +5,27 @@ package setting import ( + "net/http" + "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/auth/openid" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" ) // OpenIDPost response for change user's openid -func OpenIDPost(ctx *context.Context, form auth.AddOpenIDForm) { +func OpenIDPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.AddOpenIDForm) ctx.Data["Title"] = ctx.Tr("settings") ctx.Data["PageIsSettingsSecurity"] = true if ctx.HasError() { loadSecurityData(ctx) - ctx.HTML(200, tplSettingsSecurity) + ctx.HTML(http.StatusOK, tplSettingsSecurity) return } @@ -70,14 +74,14 @@ func OpenIDPost(ctx *context.Context, form auth.AddOpenIDForm) { } func settingsOpenIDVerify(ctx *context.Context) { - log.Trace("Incoming call to: " + ctx.Req.Request.URL.String()) + log.Trace("Incoming call to: " + ctx.Req.URL.String()) - fullURL := setting.AppURL + ctx.Req.Request.URL.String()[1:] + fullURL := setting.AppURL + ctx.Req.URL.String()[1:] log.Trace("Full URL: " + fullURL) id, err := openid.Verify(fullURL) if err != nil { - ctx.RenderWithErr(err.Error(), tplSettingsSecurity, &auth.AddOpenIDForm{ + ctx.RenderWithErr(err.Error(), tplSettingsSecurity, &forms.AddOpenIDForm{ Openid: id, }) return @@ -88,7 +92,7 @@ func settingsOpenIDVerify(ctx *context.Context) { oid := &models.UserOpenID{UID: ctx.User.ID, URI: id} if err = models.AddUserOpenID(oid); err != nil { if models.IsErrOpenIDAlreadyUsed(err) { - ctx.RenderWithErr(ctx.Tr("form.openid_been_used", id), tplSettingsSecurity, &auth.AddOpenIDForm{Openid: id}) + ctx.RenderWithErr(ctx.Tr("form.openid_been_used", id), tplSettingsSecurity, &forms.AddOpenIDForm{Openid: id}) return } ctx.ServerError("AddUserOpenID", err) @@ -102,21 +106,21 @@ func settingsOpenIDVerify(ctx *context.Context) { // DeleteOpenID response for delete user's openid func DeleteOpenID(ctx *context.Context) { - if err := models.DeleteUserOpenID(&models.UserOpenID{ID: ctx.QueryInt64("id"), UID: ctx.User.ID}); err != nil { + if err := models.DeleteUserOpenID(&models.UserOpenID{ID: ctx.FormInt64("id"), UID: ctx.User.ID}); err != nil { ctx.ServerError("DeleteUserOpenID", err) return } log.Trace("OpenID address deleted: %s", ctx.User.Name) ctx.Flash.Success(ctx.Tr("settings.openid_deletion_success")) - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": setting.AppSubURL + "/user/settings/security", }) } // ToggleOpenIDVisibility response for toggle visibility of user's openid func ToggleOpenIDVisibility(ctx *context.Context) { - if err := models.ToggleUserOpenIDVisibility(ctx.QueryInt64("id")); err != nil { + if err := models.ToggleUserOpenIDVisibility(ctx.FormInt64("id")); err != nil { ctx.ServerError("ToggleUserOpenIDVisibility", err) return } diff --git a/routers/user/setting/security_twofa.go b/routers/web/user/setting/security_twofa.go similarity index 92% rename from routers/user/setting/security_twofa.go rename to routers/web/user/setting/security_twofa.go index 4ee698e15..7b08a0593 100644 --- a/routers/user/setting/security_twofa.go +++ b/routers/web/user/setting/security_twofa.go @@ -10,13 +10,15 @@ import ( "encoding/base64" "html/template" "image/png" + "net/http" "strings" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" "github.com/pquerna/otp" "github.com/pquerna/otp/totp" @@ -161,11 +163,12 @@ func EnrollTwoFactor(ctx *context.Context) { return } - ctx.HTML(200, tplSettingsTwofaEnroll) + ctx.HTML(http.StatusOK, tplSettingsTwofaEnroll) } // EnrollTwoFactorPost handles enrolling the user into 2FA. -func EnrollTwoFactorPost(ctx *context.Context, form auth.TwoFactorAuthForm) { +func EnrollTwoFactorPost(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.TwoFactorAuthForm) ctx.Data["Title"] = ctx.Tr("settings") ctx.Data["PageIsSettingsSecurity"] = true @@ -185,17 +188,24 @@ func EnrollTwoFactorPost(ctx *context.Context, form auth.TwoFactorAuthForm) { if !twofaGenerateSecretAndQr(ctx) { return } - ctx.HTML(200, tplSettingsTwofaEnroll) + ctx.HTML(http.StatusOK, tplSettingsTwofaEnroll) return } - secret := ctx.Session.Get("twofaSecret").(string) + secretRaw := ctx.Session.Get("twofaSecret") + if secretRaw == nil { + ctx.Flash.Error(ctx.Tr("settings.twofa_failed_get_secret")) + ctx.Redirect(setting.AppSubURL + "/user/settings/security/two_factor/enroll") + return + } + + secret := secretRaw.(string) if !totp.Validate(form.Passcode, secret) { if !twofaGenerateSecretAndQr(ctx) { return } ctx.Flash.Error(ctx.Tr("settings.passcode_invalid")) - ctx.HTML(200, tplSettingsTwofaEnroll) + ctx.Redirect(setting.AppSubURL + "/user/settings/security/two_factor/enroll") return } diff --git a/routers/user/setting/security_u2f.go b/routers/web/user/setting/security_u2f.go similarity index 79% rename from routers/user/setting/security_u2f.go rename to routers/web/user/setting/security_u2f.go index 7e32b4aae..f9e35549f 100644 --- a/routers/user/setting/security_u2f.go +++ b/routers/web/user/setting/security_u2f.go @@ -6,20 +6,23 @@ package setting import ( "errors" + "net/http" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/auth" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/services/forms" "github.com/tstranex/u2f" ) // U2FRegister initializes the u2f registration procedure -func U2FRegister(ctx *context.Context, form auth.U2FRegistrationForm) { +func U2FRegister(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.U2FRegistrationForm) if form.Name == "" { - ctx.Error(409) + ctx.Error(http.StatusConflict) return } challenge, err := u2f.NewChallenge(setting.U2F.AppID, setting.U2F.TrustedFacets) @@ -38,7 +41,7 @@ func U2FRegister(ctx *context.Context, form auth.U2FRegistrationForm) { } for _, reg := range regs { if reg.Name == form.Name { - ctx.Error(409, "Name already taken") + ctx.Error(http.StatusConflict, "Name already taken") return } } @@ -51,11 +54,12 @@ func U2FRegister(ctx *context.Context, form auth.U2FRegistrationForm) { // we'll tolerate errors here as they *should* get saved elsewhere log.Error("Unable to save changes to the session: %v", err) } - ctx.JSON(200, u2f.NewWebRegisterRequest(challenge, regs.ToRegistrations())) + ctx.JSON(http.StatusOK, u2f.NewWebRegisterRequest(challenge, regs.ToRegistrations())) } // U2FRegisterPost receives the response of the security key -func U2FRegisterPost(ctx *context.Context, response u2f.RegisterResponse) { +func U2FRegisterPost(ctx *context.Context) { + response := web.GetForm(ctx).(*u2f.RegisterResponse) challSess := ctx.Session.Get("u2fChallenge") u2fName := ctx.Session.Get("u2fName") if challSess == nil || u2fName == nil { @@ -69,7 +73,7 @@ func U2FRegisterPost(ctx *context.Context, response u2f.RegisterResponse) { // certificate by default. SkipAttestationVerify: true, } - reg, err := u2f.Register(response, *challenge, config) + reg, err := u2f.Register(*response, *challenge, config) if err != nil { ctx.ServerError("u2f.Register", err) return @@ -82,7 +86,8 @@ func U2FRegisterPost(ctx *context.Context, response u2f.RegisterResponse) { } // U2FDelete deletes an security key by id -func U2FDelete(ctx *context.Context, form auth.U2FDeleteForm) { +func U2FDelete(ctx *context.Context) { + form := web.GetForm(ctx).(*forms.U2FDeleteForm) reg, err := models.GetU2FRegistrationByID(form.ID) if err != nil { if models.IsErrU2FRegistrationNotExist(err) { @@ -100,7 +105,7 @@ func U2FDelete(ctx *context.Context, form auth.U2FDeleteForm) { ctx.ServerError("DeleteRegistration", err) return } - ctx.JSON(200, map[string]interface{}{ + ctx.JSON(http.StatusOK, map[string]interface{}{ "redirect": setting.AppSubURL + "/user/settings/security", }) } diff --git a/routers/web/user/task.go b/routers/web/user/task.go new file mode 100644 index 000000000..c71d43523 --- /dev/null +++ b/routers/web/user/task.go @@ -0,0 +1,47 @@ +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package user + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/json" +) + +// TaskStatus returns task's status +func TaskStatus(ctx *context.Context) { + task, opts, err := models.GetMigratingTaskByID(ctx.ParamsInt64("task"), ctx.User.ID) + if err != nil { + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "err": err, + }) + return + } + + message := task.Message + + if task.Message != "" && task.Message[0] == '{' { + // assume message is actually a translatable string + var translatableMessage models.TranslatableMessage + if err := json.Unmarshal([]byte(message), &translatableMessage); err != nil { + translatableMessage = models.TranslatableMessage{ + Format: "migrate.migrating_failed.error", + Args: []interface{}{task.Message}, + } + } + message = ctx.Tr(translatableMessage.Format, translatableMessage.Args...) + } + + ctx.JSON(http.StatusOK, map[string]interface{}{ + "status": task.Status, + "message": message, + "repo-id": task.RepoID, + "repo-name": opts.RepoName, + "start": task.StartTime, + "end": task.EndTime, + }) +} diff --git a/routers/web/web.go b/routers/web/web.go new file mode 100644 index 000000000..a88b66726 --- /dev/null +++ b/routers/web/web.go @@ -0,0 +1,1063 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package web + +import ( + "encoding/gob" + "net/http" + "os" + "path" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/httpcache" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/metrics" + "code.gitea.io/gitea/modules/public" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/validation" + "code.gitea.io/gitea/modules/web" + "code.gitea.io/gitea/routers/api/v1/misc" + "code.gitea.io/gitea/routers/web/admin" + "code.gitea.io/gitea/routers/web/dev" + "code.gitea.io/gitea/routers/web/events" + "code.gitea.io/gitea/routers/web/explore" + "code.gitea.io/gitea/routers/web/org" + "code.gitea.io/gitea/routers/web/repo" + "code.gitea.io/gitea/routers/web/user" + userSetting "code.gitea.io/gitea/routers/web/user/setting" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/forms" + "code.gitea.io/gitea/services/lfs" + "code.gitea.io/gitea/services/mailer" + + // to registers all internal adapters + _ "code.gitea.io/gitea/modules/session" + + "gitea.com/go-chi/captcha" + "gitea.com/go-chi/session" + "github.com/NYTimes/gziphandler" + "github.com/go-chi/chi/middleware" + "github.com/go-chi/cors" + "github.com/prometheus/client_golang/prometheus" + "github.com/tstranex/u2f" +) + +const ( + // GzipMinSize represents min size to compress for the body size of response + GzipMinSize = 1400 +) + +// CorsHandler return a http handler who set CORS options if enabled by config +func CorsHandler() func(next http.Handler) http.Handler { + if setting.CORSConfig.Enabled { + return cors.Handler(cors.Options{ + //Scheme: setting.CORSConfig.Scheme, // FIXME: the cors middleware needs scheme option + AllowedOrigins: setting.CORSConfig.AllowDomain, + //setting.CORSConfig.AllowSubdomain // FIXME: the cors middleware needs allowSubdomain option + AllowedMethods: setting.CORSConfig.Methods, + AllowCredentials: setting.CORSConfig.AllowCredentials, + MaxAge: int(setting.CORSConfig.MaxAge.Seconds()), + }) + } + + return func(next http.Handler) http.Handler { + return next + } +} + +// Routes returns all web routes +func Routes() *web.Route { + routes := web.NewRoute() + + routes.Use(public.AssetsHandler(&public.Options{ + Directory: path.Join(setting.StaticRootPath, "public"), + Prefix: "/assets", + CorsHandler: CorsHandler(), + })) + + routes.Use(session.Sessioner(session.Options{ + Provider: setting.SessionConfig.Provider, + ProviderConfig: setting.SessionConfig.ProviderConfig, + CookieName: setting.SessionConfig.CookieName, + CookiePath: setting.SessionConfig.CookiePath, + Gclifetime: setting.SessionConfig.Gclifetime, + Maxlifetime: setting.SessionConfig.Maxlifetime, + Secure: setting.SessionConfig.Secure, + SameSite: setting.SessionConfig.SameSite, + Domain: setting.SessionConfig.Domain, + })) + + routes.Use(Recovery()) + + // We use r.Route here over r.Use because this prevents requests that are not for avatars having to go through this additional handler + routes.Route("/avatars/*", "GET, HEAD", storageHandler(setting.Avatar.Storage, "avatars", storage.Avatars)) + routes.Route("/repo-avatars/*", "GET, HEAD", storageHandler(setting.RepoAvatar.Storage, "repo-avatars", storage.RepoAvatars)) + + // for health check - doeesn't need to be passed through gzip handler + routes.Head("/", func(w http.ResponseWriter, req *http.Request) { + w.WriteHeader(http.StatusOK) + }) + + // this png is very likely to always be below the limit for gzip so it doesn't need to pass through gzip + routes.Get("/apple-touch-icon.png", func(w http.ResponseWriter, req *http.Request) { + http.Redirect(w, req, path.Join(setting.StaticURLPrefix, "/assets/img/apple-touch-icon.png"), 301) + }) + + gob.Register(&u2f.Challenge{}) + + common := []interface{}{} + + if setting.EnableGzip { + h, err := gziphandler.GzipHandlerWithOpts(gziphandler.MinSize(GzipMinSize)) + if err != nil { + log.Fatal("GzipHandlerWithOpts failed: %v", err) + } + common = append(common, h) + } + + mailer.InitMailRender(templates.Mailer()) + + if setting.Service.EnableCaptcha { + // The captcha http.Handler should only fire on /captcha/* so we can just mount this on that url + routes.Route("/captcha/*", "GET,HEAD", append(common, captcha.Captchaer(context.GetImageCaptcha()))...) + } + + if setting.HasRobotsTxt { + routes.Get("/robots.txt", append(common, func(w http.ResponseWriter, req *http.Request) { + filePath := path.Join(setting.CustomPath, "robots.txt") + fi, err := os.Stat(filePath) + if err == nil && httpcache.HandleTimeCache(req, w, fi) { + return + } + http.ServeFile(w, req, filePath) + })...) + } + + // prometheus metrics endpoint - do not need to go through contexter + if setting.Metrics.Enabled { + c := metrics.NewCollector() + prometheus.MustRegister(c) + + routes.Get("/metrics", append(common, Metrics)...) + } + + routes.Get("/ssh_info", func(rw http.ResponseWriter, req *http.Request) { + if !git.SupportProcReceive { + rw.WriteHeader(404) + return + } + rw.Header().Set("content-type", "text/json;charset=UTF-8") + _, err := rw.Write([]byte(`{"type":"gitea","version":1}`)) + if err != nil { + log.Error("fail to write result: err: %v", err) + rw.WriteHeader(500) + return + } + rw.WriteHeader(200) + }) + + // Removed: toolbox.Toolboxer middleware will provide debug information which seems unnecessary + common = append(common, context.Contexter()) + + // Get user from session if logged in. + common = append(common, context.Auth(auth.NewGroup(auth.Methods()...))) + + // GetHead allows a HEAD request redirect to GET if HEAD method is not defined for that route + common = append(common, middleware.GetHead) + + if setting.API.EnableSwagger { + // Note: The route moved from apiroutes because it's in fact want to render a web page + routes.Get("/api/swagger", append(common, misc.Swagger)...) // Render V1 by default + } + + // TODO: These really seem like things that could be folded into Contexter or as helper functions + common = append(common, user.GetNotificationCount) + common = append(common, repo.GetActiveStopwatch) + common = append(common, goGet) + + others := web.NewRoute() + for _, middle := range common { + others.Use(middle) + } + + RegisterRoutes(others) + routes.Mount("", others) + return routes +} + +// RegisterRoutes register routes +func RegisterRoutes(m *web.Route) { + reqSignIn := context.Toggle(&context.ToggleOptions{SignInRequired: true}) + ignSignIn := context.Toggle(&context.ToggleOptions{SignInRequired: setting.Service.RequireSignInView}) + ignExploreSignIn := context.Toggle(&context.ToggleOptions{SignInRequired: setting.Service.RequireSignInView || setting.Service.Explore.RequireSigninView}) + ignSignInAndCsrf := context.Toggle(&context.ToggleOptions{DisableCSRF: true}) + reqSignOut := context.Toggle(&context.ToggleOptions{SignOutRequired: true}) + + //bindIgnErr := binding.BindIgnErr + bindIgnErr := web.Bind + validation.AddBindingRules() + + openIDSignInEnabled := func(ctx *context.Context) { + if !setting.Service.EnableOpenIDSignIn { + ctx.Error(http.StatusForbidden) + return + } + } + + openIDSignUpEnabled := func(ctx *context.Context) { + if !setting.Service.EnableOpenIDSignUp { + ctx.Error(http.StatusForbidden) + return + } + } + + reqMilestonesDashboardPageEnabled := func(ctx *context.Context) { + if !setting.Service.ShowMilestonesDashboardPage { + ctx.Error(http.StatusForbidden) + return + } + } + + // webhooksEnabled requires webhooks to be enabled by admin. + webhooksEnabled := func(ctx *context.Context) { + if setting.DisableWebhooks { + ctx.Error(http.StatusForbidden) + return + } + } + + lfsServerEnabled := func(ctx *context.Context) { + if !setting.LFS.StartServer { + ctx.Error(http.StatusNotFound) + return + } + } + + // FIXME: not all routes need go through same middleware. + // Especially some AJAX requests, we can reduce middleware number to improve performance. + // Routers. + // for health check + m.Get("/", Home) + m.Get("/.well-known/openid-configuration", user.OIDCWellKnown) + m.Group("/explore", func() { + m.Get("", func(ctx *context.Context) { + ctx.Redirect(setting.AppSubURL + "/explore/repos") + }) + m.Get("/repos", explore.Repos) + m.Get("/users", explore.Users) + m.Get("/organizations", explore.Organizations) + m.Get("/code", explore.Code) + }, ignExploreSignIn) + m.Get("/issues", reqSignIn, user.Issues) + m.Get("/pulls", reqSignIn, user.Pulls) + m.Get("/milestones", reqSignIn, reqMilestonesDashboardPageEnabled, user.Milestones) + + // ***** START: User ***** + m.Group("/user", func() { + m.Get("/login", user.SignIn) + m.Post("/login", bindIgnErr(forms.SignInForm{}), user.SignInPost) + m.Group("", func() { + m.Combo("/login/openid"). + Get(user.SignInOpenID). + Post(bindIgnErr(forms.SignInOpenIDForm{}), user.SignInOpenIDPost) + }, openIDSignInEnabled) + m.Group("/openid", func() { + m.Combo("/connect"). + Get(user.ConnectOpenID). + Post(bindIgnErr(forms.ConnectOpenIDForm{}), user.ConnectOpenIDPost) + m.Group("/register", func() { + m.Combo(""). + Get(user.RegisterOpenID, openIDSignUpEnabled). + Post(bindIgnErr(forms.SignUpOpenIDForm{}), user.RegisterOpenIDPost) + }, openIDSignUpEnabled) + }, openIDSignInEnabled) + m.Get("/sign_up", user.SignUp) + m.Post("/sign_up", bindIgnErr(forms.RegisterForm{}), user.SignUpPost) + m.Group("/oauth2", func() { + m.Get("/{provider}", user.SignInOAuth) + m.Get("/{provider}/callback", user.SignInOAuthCallback) + }) + m.Get("/link_account", user.LinkAccount) + m.Post("/link_account_signin", bindIgnErr(forms.SignInForm{}), user.LinkAccountPostSignIn) + m.Post("/link_account_signup", bindIgnErr(forms.RegisterForm{}), user.LinkAccountPostRegister) + m.Group("/two_factor", func() { + m.Get("", user.TwoFactor) + m.Post("", bindIgnErr(forms.TwoFactorAuthForm{}), user.TwoFactorPost) + m.Get("/scratch", user.TwoFactorScratch) + m.Post("/scratch", bindIgnErr(forms.TwoFactorScratchAuthForm{}), user.TwoFactorScratchPost) + }) + m.Group("/u2f", func() { + m.Get("", user.U2F) + m.Get("/challenge", user.U2FChallenge) + m.Post("/sign", bindIgnErr(u2f.SignResponse{}), user.U2FSign) + + }) + }, reqSignOut) + + m.Any("/user/events", events.Events) + + m.Group("/login/oauth", func() { + m.Get("/authorize", bindIgnErr(forms.AuthorizationForm{}), user.AuthorizeOAuth) + m.Post("/grant", bindIgnErr(forms.GrantApplicationForm{}), user.GrantApplicationOAuth) + // TODO manage redirection + m.Post("/authorize", bindIgnErr(forms.AuthorizationForm{}), user.AuthorizeOAuth) + }, ignSignInAndCsrf, reqSignIn) + m.Get("/login/oauth/userinfo", ignSignInAndCsrf, user.InfoOAuth) + m.Post("/login/oauth/access_token", CorsHandler(), bindIgnErr(forms.AccessTokenForm{}), ignSignInAndCsrf, user.AccessTokenOAuth) + m.Get("/login/oauth/keys", ignSignInAndCsrf, user.OIDCKeys) + m.Post("/login/oauth/introspect", CorsHandler(), bindIgnErr(forms.IntrospectTokenForm{}), ignSignInAndCsrf, user.IntrospectOAuth) + + m.Group("/user/settings", func() { + m.Get("", userSetting.Profile) + m.Post("", bindIgnErr(forms.UpdateProfileForm{}), userSetting.ProfilePost) + m.Get("/change_password", user.MustChangePassword) + m.Post("/change_password", bindIgnErr(forms.MustChangePasswordForm{}), user.MustChangePasswordPost) + m.Post("/avatar", bindIgnErr(forms.AvatarForm{}), userSetting.AvatarPost) + m.Post("/avatar/delete", userSetting.DeleteAvatar) + m.Group("/account", func() { + m.Combo("").Get(userSetting.Account).Post(bindIgnErr(forms.ChangePasswordForm{}), userSetting.AccountPost) + m.Post("/email", bindIgnErr(forms.AddEmailForm{}), userSetting.EmailPost) + m.Post("/email/delete", userSetting.DeleteEmail) + m.Post("/delete", userSetting.DeleteAccount) + m.Post("/theme", bindIgnErr(forms.UpdateThemeForm{}), userSetting.UpdateUIThemePost) + }) + m.Group("/security", func() { + m.Get("", userSetting.Security) + m.Group("/two_factor", func() { + m.Post("/regenerate_scratch", userSetting.RegenerateScratchTwoFactor) + m.Post("/disable", userSetting.DisableTwoFactor) + m.Get("/enroll", userSetting.EnrollTwoFactor) + m.Post("/enroll", bindIgnErr(forms.TwoFactorAuthForm{}), userSetting.EnrollTwoFactorPost) + }) + m.Group("/u2f", func() { + m.Post("/request_register", bindIgnErr(forms.U2FRegistrationForm{}), userSetting.U2FRegister) + m.Post("/register", bindIgnErr(u2f.RegisterResponse{}), userSetting.U2FRegisterPost) + m.Post("/delete", bindIgnErr(forms.U2FDeleteForm{}), userSetting.U2FDelete) + }) + m.Group("/openid", func() { + m.Post("", bindIgnErr(forms.AddOpenIDForm{}), userSetting.OpenIDPost) + m.Post("/delete", userSetting.DeleteOpenID) + m.Post("/toggle_visibility", userSetting.ToggleOpenIDVisibility) + }, openIDSignInEnabled) + m.Post("/account_link", userSetting.DeleteAccountLink) + }) + m.Group("/applications/oauth2", func() { + m.Get("/{id}", userSetting.OAuth2ApplicationShow) + m.Post("/{id}", bindIgnErr(forms.EditOAuth2ApplicationForm{}), userSetting.OAuthApplicationsEdit) + m.Post("/{id}/regenerate_secret", userSetting.OAuthApplicationsRegenerateSecret) + m.Post("", bindIgnErr(forms.EditOAuth2ApplicationForm{}), userSetting.OAuthApplicationsPost) + m.Post("/delete", userSetting.DeleteOAuth2Application) + m.Post("/revoke", userSetting.RevokeOAuth2Grant) + }) + m.Combo("/applications").Get(userSetting.Applications). + Post(bindIgnErr(forms.NewAccessTokenForm{}), userSetting.ApplicationsPost) + m.Post("/applications/delete", userSetting.DeleteApplication) + m.Combo("/keys").Get(userSetting.Keys). + Post(bindIgnErr(forms.AddKeyForm{}), userSetting.KeysPost) + m.Post("/keys/delete", userSetting.DeleteKey) + m.Get("/organization", userSetting.Organization) + m.Get("/repos", userSetting.Repos) + m.Post("/repos/unadopted", userSetting.AdoptOrDeleteRepository) + }, reqSignIn, func(ctx *context.Context) { + ctx.Data["PageIsUserSettings"] = true + ctx.Data["AllThemes"] = setting.UI.Themes + }) + + m.Group("/user", func() { + // r.Get("/feeds", binding.Bind(auth.FeedsForm{}), user.Feeds) + m.Get("/activate", user.Activate, reqSignIn) + m.Post("/activate", user.ActivatePost, reqSignIn) + m.Any("/activate_email", user.ActivateEmail) + m.Get("/avatar/{username}/{size}", user.Avatar) + m.Get("/email2user", user.Email2User) + m.Get("/recover_account", user.ResetPasswd) + m.Post("/recover_account", user.ResetPasswdPost) + m.Get("/forgot_password", user.ForgotPasswd) + m.Post("/forgot_password", user.ForgotPasswdPost) + m.Post("/logout", user.SignOut) + m.Get("/task/{task}", user.TaskStatus) + }) + // ***** END: User ***** + + m.Get("/avatar/{hash}", user.AvatarByEmailHash) + + adminReq := context.Toggle(&context.ToggleOptions{SignInRequired: true, AdminRequired: true}) + + // ***** START: Admin ***** + m.Group("/admin", func() { + m.Get("", adminReq, admin.Dashboard) + m.Post("", adminReq, bindIgnErr(forms.AdminDashboardForm{}), admin.DashboardPost) + m.Get("/config", admin.Config) + m.Post("/config/test_mail", admin.SendTestMail) + m.Group("/monitor", func() { + m.Get("", admin.Monitor) + m.Post("/cancel/{pid}", admin.MonitorCancel) + m.Group("/queue/{qid}", func() { + m.Get("", admin.Queue) + m.Post("/set", admin.SetQueueSettings) + m.Post("/add", admin.AddWorkers) + m.Post("/cancel/{pid}", admin.WorkerCancel) + m.Post("/flush", admin.Flush) + }) + }) + + m.Group("/users", func() { + m.Get("", admin.Users) + m.Combo("/new").Get(admin.NewUser).Post(bindIgnErr(forms.AdminCreateUserForm{}), admin.NewUserPost) + m.Combo("/{userid}").Get(admin.EditUser).Post(bindIgnErr(forms.AdminEditUserForm{}), admin.EditUserPost) + m.Post("/{userid}/delete", admin.DeleteUser) + }) + + m.Group("/emails", func() { + m.Get("", admin.Emails) + m.Post("/activate", admin.ActivateEmail) + }) + + m.Group("/orgs", func() { + m.Get("", admin.Organizations) + }) + + m.Group("/repos", func() { + m.Get("", admin.Repos) + m.Combo("/unadopted").Get(admin.UnadoptedRepos).Post(admin.AdoptOrDeleteRepository) + m.Post("/delete", admin.DeleteRepo) + }) + + m.Group("/hooks", func() { + m.Get("", admin.DefaultOrSystemWebhooks) + m.Post("/delete", admin.DeleteDefaultOrSystemWebhook) + m.Get("/{id}", repo.WebHooksEdit) + m.Post("/gitea/{id}", bindIgnErr(forms.NewWebhookForm{}), repo.WebHooksEditPost) + m.Post("/gogs/{id}", bindIgnErr(forms.NewGogshookForm{}), repo.GogsHooksEditPost) + m.Post("/slack/{id}", bindIgnErr(forms.NewSlackHookForm{}), repo.SlackHooksEditPost) + m.Post("/discord/{id}", bindIgnErr(forms.NewDiscordHookForm{}), repo.DiscordHooksEditPost) + m.Post("/dingtalk/{id}", bindIgnErr(forms.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) + m.Post("/telegram/{id}", bindIgnErr(forms.NewTelegramHookForm{}), repo.TelegramHooksEditPost) + m.Post("/matrix/{id}", bindIgnErr(forms.NewMatrixHookForm{}), repo.MatrixHooksEditPost) + m.Post("/msteams/{id}", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksEditPost) + m.Post("/feishu/{id}", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksEditPost) + m.Post("/wechatwork/{id}", bindIgnErr(forms.NewWechatWorkHookForm{}), repo.WechatworkHooksEditPost) + }, webhooksEnabled) + + m.Group("/{configType:default-hooks|system-hooks}", func() { + m.Get("/{type}/new", repo.WebhooksNew) + m.Post("/gitea/new", bindIgnErr(forms.NewWebhookForm{}), repo.GiteaHooksNewPost) + m.Post("/gogs/new", bindIgnErr(forms.NewGogshookForm{}), repo.GogsHooksNewPost) + m.Post("/slack/new", bindIgnErr(forms.NewSlackHookForm{}), repo.SlackHooksNewPost) + m.Post("/discord/new", bindIgnErr(forms.NewDiscordHookForm{}), repo.DiscordHooksNewPost) + m.Post("/dingtalk/new", bindIgnErr(forms.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) + m.Post("/telegram/new", bindIgnErr(forms.NewTelegramHookForm{}), repo.TelegramHooksNewPost) + m.Post("/matrix/new", bindIgnErr(forms.NewMatrixHookForm{}), repo.MatrixHooksNewPost) + m.Post("/msteams/new", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost) + m.Post("/feishu/new", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksNewPost) + m.Post("/wechatwork/new", bindIgnErr(forms.NewWechatWorkHookForm{}), repo.WechatworkHooksNewPost) + + }) + + m.Group("/auths", func() { + m.Get("", admin.Authentications) + m.Combo("/new").Get(admin.NewAuthSource).Post(bindIgnErr(forms.AuthenticationForm{}), admin.NewAuthSourcePost) + m.Combo("/{authid}").Get(admin.EditAuthSource). + Post(bindIgnErr(forms.AuthenticationForm{}), admin.EditAuthSourcePost) + m.Post("/{authid}/delete", admin.DeleteAuthSource) + }) + + m.Group("/notices", func() { + m.Get("", admin.Notices) + m.Post("/delete", admin.DeleteNotices) + m.Post("/empty", admin.EmptyNotices) + }) + }, adminReq) + // ***** END: Admin ***** + + m.Group("", func() { + m.Get("/{username}", user.Profile) + m.Get("/attachments/{uuid}", repo.GetAttachment) + }, ignSignIn) + + m.Group("/{username}", func() { + m.Post("/action/{action}", user.Action) + }, reqSignIn) + + if !setting.IsProd() { + m.Get("/template/*", dev.TemplatePreview) + } + + reqRepoAdmin := context.RequireRepoAdmin() + reqRepoCodeWriter := context.RequireRepoWriter(models.UnitTypeCode) + reqRepoCodeReader := context.RequireRepoReader(models.UnitTypeCode) + reqRepoReleaseWriter := context.RequireRepoWriter(models.UnitTypeReleases) + reqRepoReleaseReader := context.RequireRepoReader(models.UnitTypeReleases) + reqRepoWikiWriter := context.RequireRepoWriter(models.UnitTypeWiki) + reqRepoIssueWriter := context.RequireRepoWriter(models.UnitTypeIssues) + reqRepoIssueReader := context.RequireRepoReader(models.UnitTypeIssues) + reqRepoPullsReader := context.RequireRepoReader(models.UnitTypePullRequests) + reqRepoIssuesOrPullsWriter := context.RequireRepoWriterOr(models.UnitTypeIssues, models.UnitTypePullRequests) + reqRepoIssuesOrPullsReader := context.RequireRepoReaderOr(models.UnitTypeIssues, models.UnitTypePullRequests) + reqRepoProjectsReader := context.RequireRepoReader(models.UnitTypeProjects) + reqRepoProjectsWriter := context.RequireRepoWriter(models.UnitTypeProjects) + + // ***** START: Organization ***** + m.Group("/org", func() { + m.Group("", func() { + m.Get("/create", org.Create) + m.Post("/create", bindIgnErr(forms.CreateOrgForm{}), org.CreatePost) + }) + + m.Group("/{org}", func() { + m.Get("/dashboard", user.Dashboard) + m.Get("/dashboard/{team}", user.Dashboard) + m.Get("/issues", user.Issues) + m.Get("/issues/{team}", user.Issues) + m.Get("/pulls", user.Pulls) + m.Get("/pulls/{team}", user.Pulls) + m.Get("/milestones", reqMilestonesDashboardPageEnabled, user.Milestones) + m.Get("/milestones/{team}", reqMilestonesDashboardPageEnabled, user.Milestones) + m.Get("/members", org.Members) + m.Post("/members/action/{action}", org.MembersAction) + m.Get("/teams", org.Teams) + }, context.OrgAssignment(true, false, true)) + + m.Group("/{org}", func() { + m.Get("/teams/{team}", org.TeamMembers) + m.Get("/teams/{team}/repositories", org.TeamRepositories) + m.Post("/teams/{team}/action/{action}", org.TeamsAction) + m.Post("/teams/{team}/action/repo/{action}", org.TeamsRepoAction) + }, context.OrgAssignment(true, false, true)) + + m.Group("/{org}", func() { + m.Get("/teams/new", org.NewTeam) + m.Post("/teams/new", bindIgnErr(forms.CreateTeamForm{}), org.NewTeamPost) + m.Get("/teams/{team}/edit", org.EditTeam) + m.Post("/teams/{team}/edit", bindIgnErr(forms.CreateTeamForm{}), org.EditTeamPost) + m.Post("/teams/{team}/delete", org.DeleteTeam) + + m.Group("/settings", func() { + m.Combo("").Get(org.Settings). + Post(bindIgnErr(forms.UpdateOrgSettingForm{}), org.SettingsPost) + m.Post("/avatar", bindIgnErr(forms.AvatarForm{}), org.SettingsAvatar) + m.Post("/avatar/delete", org.SettingsDeleteAvatar) + + m.Group("/hooks", func() { + m.Get("", org.Webhooks) + m.Post("/delete", org.DeleteWebhook) + m.Get("/{type}/new", repo.WebhooksNew) + m.Post("/gitea/new", bindIgnErr(forms.NewWebhookForm{}), repo.GiteaHooksNewPost) + m.Post("/gogs/new", bindIgnErr(forms.NewGogshookForm{}), repo.GogsHooksNewPost) + m.Post("/slack/new", bindIgnErr(forms.NewSlackHookForm{}), repo.SlackHooksNewPost) + m.Post("/discord/new", bindIgnErr(forms.NewDiscordHookForm{}), repo.DiscordHooksNewPost) + m.Post("/dingtalk/new", bindIgnErr(forms.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) + m.Post("/telegram/new", bindIgnErr(forms.NewTelegramHookForm{}), repo.TelegramHooksNewPost) + m.Post("/matrix/new", bindIgnErr(forms.NewMatrixHookForm{}), repo.MatrixHooksNewPost) + m.Post("/msteams/new", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost) + m.Post("/feishu/new", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksNewPost) + m.Get("/{id}", repo.WebHooksEdit) + m.Post("/gitea/{id}", bindIgnErr(forms.NewWebhookForm{}), repo.WebHooksEditPost) + m.Post("/gogs/{id}", bindIgnErr(forms.NewGogshookForm{}), repo.GogsHooksEditPost) + m.Post("/slack/{id}", bindIgnErr(forms.NewSlackHookForm{}), repo.SlackHooksEditPost) + m.Post("/discord/{id}", bindIgnErr(forms.NewDiscordHookForm{}), repo.DiscordHooksEditPost) + m.Post("/dingtalk/{id}", bindIgnErr(forms.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) + m.Post("/telegram/{id}", bindIgnErr(forms.NewTelegramHookForm{}), repo.TelegramHooksEditPost) + m.Post("/matrix/{id}", bindIgnErr(forms.NewMatrixHookForm{}), repo.MatrixHooksEditPost) + m.Post("/msteams/{id}", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksEditPost) + m.Post("/feishu/{id}", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksEditPost) + }, webhooksEnabled) + + m.Group("/labels", func() { + m.Get("", org.RetrieveLabels, org.Labels) + m.Post("/new", bindIgnErr(forms.CreateLabelForm{}), org.NewLabel) + m.Post("/edit", bindIgnErr(forms.CreateLabelForm{}), org.UpdateLabel) + m.Post("/delete", org.DeleteLabel) + m.Post("/initialize", bindIgnErr(forms.InitializeLabelsForm{}), org.InitializeLabels) + }) + + m.Route("/delete", "GET,POST", org.SettingsDelete) + }) + }, context.OrgAssignment(true, true)) + }, reqSignIn) + // ***** END: Organization ***** + + // ***** START: Repository ***** + m.Group("/repo", func() { + m.Get("/create", repo.Create) + m.Post("/create", bindIgnErr(forms.CreateRepoForm{}), repo.CreatePost) + m.Get("/migrate", repo.Migrate) + m.Post("/migrate", bindIgnErr(forms.MigrateRepoForm{}), repo.MigratePost) + m.Group("/fork", func() { + m.Combo("/{repoid}").Get(repo.Fork). + Post(bindIgnErr(forms.CreateRepoForm{}), repo.ForkPost) + }, context.RepoIDAssignment(), context.UnitTypes(), reqRepoCodeReader) + }, reqSignIn) + + // ***** Release Attachment Download without Signin + m.Get("/{username}/{reponame}/releases/download/{vTag}/{fileName}", ignSignIn, context.RepoAssignment, repo.MustBeNotEmpty, repo.RedirectDownload) + + m.Group("/{username}/{reponame}", func() { + m.Group("/settings", func() { + m.Combo("").Get(repo.Settings). + Post(bindIgnErr(forms.RepoSettingForm{}), repo.SettingsPost) + m.Post("/avatar", bindIgnErr(forms.AvatarForm{}), repo.SettingsAvatar) + m.Post("/avatar/delete", repo.SettingsDeleteAvatar) + + m.Group("/collaboration", func() { + m.Combo("").Get(repo.Collaboration).Post(repo.CollaborationPost) + m.Post("/access_mode", repo.ChangeCollaborationAccessMode) + m.Post("/delete", repo.DeleteCollaboration) + m.Group("/team", func() { + m.Post("", repo.AddTeamPost) + m.Post("/delete", repo.DeleteTeam) + }) + }) + + m.Group("/branches", func() { + m.Combo("").Get(repo.ProtectedBranch).Post(repo.ProtectedBranchPost) + m.Combo("/*").Get(repo.SettingsProtectedBranch). + Post(bindIgnErr(forms.ProtectBranchForm{}), context.RepoMustNotBeArchived(), repo.SettingsProtectedBranchPost) + }, repo.MustBeNotEmpty) + + m.Group("/tags", func() { + m.Get("", repo.Tags) + m.Post("", bindIgnErr(forms.ProtectTagForm{}), context.RepoMustNotBeArchived(), repo.NewProtectedTagPost) + m.Post("/delete", context.RepoMustNotBeArchived(), repo.DeleteProtectedTagPost) + m.Get("/{id}", repo.EditProtectedTag) + m.Post("/{id}", bindIgnErr(forms.ProtectTagForm{}), context.RepoMustNotBeArchived(), repo.EditProtectedTagPost) + }) + + m.Group("/hooks/git", func() { + m.Get("", repo.GitHooks) + m.Combo("/{name}").Get(repo.GitHooksEdit). + Post(repo.GitHooksEditPost) + }, context.GitHookService()) + + m.Group("/hooks", func() { + m.Get("", repo.Webhooks) + m.Post("/delete", repo.DeleteWebhook) + m.Get("/{type}/new", repo.WebhooksNew) + m.Post("/gitea/new", bindIgnErr(forms.NewWebhookForm{}), repo.GiteaHooksNewPost) + m.Post("/gogs/new", bindIgnErr(forms.NewGogshookForm{}), repo.GogsHooksNewPost) + m.Post("/slack/new", bindIgnErr(forms.NewSlackHookForm{}), repo.SlackHooksNewPost) + m.Post("/discord/new", bindIgnErr(forms.NewDiscordHookForm{}), repo.DiscordHooksNewPost) + m.Post("/dingtalk/new", bindIgnErr(forms.NewDingtalkHookForm{}), repo.DingtalkHooksNewPost) + m.Post("/telegram/new", bindIgnErr(forms.NewTelegramHookForm{}), repo.TelegramHooksNewPost) + m.Post("/matrix/new", bindIgnErr(forms.NewMatrixHookForm{}), repo.MatrixHooksNewPost) + m.Post("/msteams/new", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksNewPost) + m.Post("/feishu/new", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksNewPost) + m.Post("/wechatwork/new", bindIgnErr(forms.NewWechatWorkHookForm{}), repo.WechatworkHooksNewPost) + m.Get("/{id}", repo.WebHooksEdit) + m.Post("/{id}/test", repo.TestWebhook) + m.Post("/gitea/{id}", bindIgnErr(forms.NewWebhookForm{}), repo.WebHooksEditPost) + m.Post("/gogs/{id}", bindIgnErr(forms.NewGogshookForm{}), repo.GogsHooksEditPost) + m.Post("/slack/{id}", bindIgnErr(forms.NewSlackHookForm{}), repo.SlackHooksEditPost) + m.Post("/discord/{id}", bindIgnErr(forms.NewDiscordHookForm{}), repo.DiscordHooksEditPost) + m.Post("/dingtalk/{id}", bindIgnErr(forms.NewDingtalkHookForm{}), repo.DingtalkHooksEditPost) + m.Post("/telegram/{id}", bindIgnErr(forms.NewTelegramHookForm{}), repo.TelegramHooksEditPost) + m.Post("/matrix/{id}", bindIgnErr(forms.NewMatrixHookForm{}), repo.MatrixHooksEditPost) + m.Post("/msteams/{id}", bindIgnErr(forms.NewMSTeamsHookForm{}), repo.MSTeamsHooksEditPost) + m.Post("/feishu/{id}", bindIgnErr(forms.NewFeishuHookForm{}), repo.FeishuHooksEditPost) + m.Post("/wechatwork/{id}", bindIgnErr(forms.NewWechatWorkHookForm{}), repo.WechatworkHooksEditPost) + }, webhooksEnabled) + + m.Group("/keys", func() { + m.Combo("").Get(repo.DeployKeys). + Post(bindIgnErr(forms.AddKeyForm{}), repo.DeployKeysPost) + m.Post("/delete", repo.DeleteDeployKey) + }) + + m.Group("/lfs", func() { + m.Get("/", repo.LFSFiles) + m.Get("/show/{oid}", repo.LFSFileGet) + m.Post("/delete/{oid}", repo.LFSDelete) + m.Get("/pointers", repo.LFSPointerFiles) + m.Post("/pointers/associate", repo.LFSAutoAssociate) + m.Get("/find", repo.LFSFileFind) + m.Group("/locks", func() { + m.Get("/", repo.LFSLocks) + m.Post("/", repo.LFSLockFile) + m.Post("/{lid}/unlock", repo.LFSUnlock) + }) + }) + + }, func(ctx *context.Context) { + ctx.Data["PageIsSettings"] = true + ctx.Data["LFSStartServer"] = setting.LFS.StartServer + }) + }, reqSignIn, context.RepoAssignment, context.UnitTypes(), reqRepoAdmin, context.RepoRef()) + + m.Post("/{username}/{reponame}/action/{action}", reqSignIn, context.RepoAssignment, context.UnitTypes(), repo.Action) + + // Grouping for those endpoints not requiring authentication + m.Group("/{username}/{reponame}", func() { + m.Group("/milestone", func() { + m.Get("/{id}", repo.MilestoneIssuesAndPulls) + }, reqRepoIssuesOrPullsReader, context.RepoRef()) + m.Combo("/compare/*", repo.MustBeNotEmpty, reqRepoCodeReader, repo.SetEditorconfigIfExists). + Get(ignSignIn, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.CompareDiff). + Post(reqSignIn, context.RepoMustNotBeArchived(), reqRepoPullsReader, repo.MustAllowPulls, bindIgnErr(forms.CreateIssueForm{}), repo.SetWhitespaceBehavior, repo.CompareAndPullRequestPost) + }, context.RepoAssignment, context.UnitTypes()) + + // Grouping for those endpoints that do require authentication + m.Group("/{username}/{reponame}", func() { + m.Group("/issues", func() { + m.Group("/new", func() { + m.Combo("").Get(context.RepoRef(), repo.NewIssue). + Post(bindIgnErr(forms.CreateIssueForm{}), repo.NewIssuePost) + m.Get("/choose", context.RepoRef(), repo.NewIssueChooseTemplate) + }) + }, context.RepoMustNotBeArchived(), reqRepoIssueReader) + // FIXME: should use different URLs but mostly same logic for comments of issue and pull request. + // So they can apply their own enable/disable logic on routers. + m.Group("/issues", func() { + m.Group("/{index}", func() { + m.Post("/title", repo.UpdateIssueTitle) + m.Post("/content", repo.UpdateIssueContent) + m.Post("/watch", repo.IssueWatch) + m.Post("/ref", repo.UpdateIssueRef) + m.Group("/dependency", func() { + m.Post("/add", repo.AddDependency) + m.Post("/delete", repo.RemoveDependency) + }) + m.Combo("/comments").Post(repo.MustAllowUserComment, bindIgnErr(forms.CreateCommentForm{}), repo.NewComment) + m.Group("/times", func() { + m.Post("/add", bindIgnErr(forms.AddTimeManuallyForm{}), repo.AddTimeManually) + m.Post("/{timeid}/delete", repo.DeleteTime) + m.Group("/stopwatch", func() { + m.Post("/toggle", repo.IssueStopwatch) + m.Post("/cancel", repo.CancelStopwatch) + }) + }) + m.Post("/reactions/{action}", bindIgnErr(forms.ReactionForm{}), repo.ChangeIssueReaction) + m.Post("/lock", reqRepoIssueWriter, bindIgnErr(forms.IssueLockForm{}), repo.LockIssue) + m.Post("/unlock", reqRepoIssueWriter, repo.UnlockIssue) + }, context.RepoMustNotBeArchived()) + m.Group("/{index}", func() { + m.Get("/attachments", repo.GetIssueAttachments) + m.Get("/attachments/{uuid}", repo.GetAttachment) + }) + + m.Post("/labels", reqRepoIssuesOrPullsWriter, repo.UpdateIssueLabel) + m.Post("/milestone", reqRepoIssuesOrPullsWriter, repo.UpdateIssueMilestone) + m.Post("/projects", reqRepoIssuesOrPullsWriter, repo.UpdateIssueProject) + m.Post("/assignee", reqRepoIssuesOrPullsWriter, repo.UpdateIssueAssignee) + m.Post("/request_review", reqRepoIssuesOrPullsReader, repo.UpdatePullReviewRequest) + m.Post("/dismiss_review", reqRepoAdmin, bindIgnErr(forms.DismissReviewForm{}), repo.DismissReview) + m.Post("/status", reqRepoIssuesOrPullsWriter, repo.UpdateIssueStatus) + m.Post("/resolve_conversation", reqRepoIssuesOrPullsReader, repo.UpdateResolveConversation) + m.Post("/attachments", repo.UploadIssueAttachment) + m.Post("/attachments/remove", repo.DeleteAttachment) + }, context.RepoMustNotBeArchived()) + m.Group("/comments/{id}", func() { + m.Post("", repo.UpdateCommentContent) + m.Post("/delete", repo.DeleteComment) + m.Post("/reactions/{action}", bindIgnErr(forms.ReactionForm{}), repo.ChangeCommentReaction) + }, context.RepoMustNotBeArchived()) + m.Group("/comments/{id}", func() { + m.Get("/attachments", repo.GetCommentAttachments) + }) + m.Group("/labels", func() { + m.Post("/new", bindIgnErr(forms.CreateLabelForm{}), repo.NewLabel) + m.Post("/edit", bindIgnErr(forms.CreateLabelForm{}), repo.UpdateLabel) + m.Post("/delete", repo.DeleteLabel) + m.Post("/initialize", bindIgnErr(forms.InitializeLabelsForm{}), repo.InitializeLabels) + }, context.RepoMustNotBeArchived(), reqRepoIssuesOrPullsWriter, context.RepoRef()) + m.Group("/milestones", func() { + m.Combo("/new").Get(repo.NewMilestone). + Post(bindIgnErr(forms.CreateMilestoneForm{}), repo.NewMilestonePost) + m.Get("/{id}/edit", repo.EditMilestone) + m.Post("/{id}/edit", bindIgnErr(forms.CreateMilestoneForm{}), repo.EditMilestonePost) + m.Post("/{id}/{action}", repo.ChangeMilestoneStatus) + m.Post("/delete", repo.DeleteMilestone) + }, context.RepoMustNotBeArchived(), reqRepoIssuesOrPullsWriter, context.RepoRef()) + m.Group("/pull", func() { + m.Post("/{index}/target_branch", repo.UpdatePullRequestTarget) + }, context.RepoMustNotBeArchived()) + + m.Group("", func() { + m.Group("", func() { + m.Combo("/_edit/*").Get(repo.EditFile). + Post(bindIgnErr(forms.EditRepoFileForm{}), repo.EditFilePost) + m.Combo("/_new/*").Get(repo.NewFile). + Post(bindIgnErr(forms.EditRepoFileForm{}), repo.NewFilePost) + m.Post("/_preview/*", bindIgnErr(forms.EditPreviewDiffForm{}), repo.DiffPreviewPost) + m.Combo("/_delete/*").Get(repo.DeleteFile). + Post(bindIgnErr(forms.DeleteRepoFileForm{}), repo.DeleteFilePost) + m.Combo("/_upload/*", repo.MustBeAbleToUpload). + Get(repo.UploadFile). + Post(bindIgnErr(forms.UploadRepoFileForm{}), repo.UploadFilePost) + }, context.RepoRefByType(context.RepoRefBranch), repo.MustBeEditable) + m.Group("", func() { + m.Post("/upload-file", repo.UploadFileToServer) + m.Post("/upload-remove", bindIgnErr(forms.RemoveUploadFileForm{}), repo.RemoveUploadFileFromServer) + }, context.RepoRef(), repo.MustBeEditable, repo.MustBeAbleToUpload) + }, context.RepoMustNotBeArchived(), reqRepoCodeWriter, repo.MustBeNotEmpty) + + m.Group("/branches", func() { + m.Group("/_new", func() { + m.Post("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.CreateBranch) + m.Post("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.CreateBranch) + m.Post("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.CreateBranch) + }, bindIgnErr(forms.NewBranchForm{})) + m.Post("/delete", repo.DeleteBranchPost) + m.Post("/restore", repo.RestoreBranchPost) + }, context.RepoMustNotBeArchived(), reqRepoCodeWriter, repo.MustBeNotEmpty) + + }, reqSignIn, context.RepoAssignment, context.UnitTypes()) + + // Releases + m.Group("/{username}/{reponame}", func() { + m.Get("/tags", repo.TagsList, repo.MustBeNotEmpty, + reqRepoCodeReader, context.RepoRefByType(context.RepoRefTag)) + m.Group("/releases", func() { + m.Get("/", repo.Releases) + m.Get("/tag/*", repo.SingleRelease) + m.Get("/latest", repo.LatestRelease) + }, repo.MustBeNotEmpty, reqRepoReleaseReader, context.RepoRefByType(context.RepoRefTag, true)) + m.Get("/releases/attachments/{uuid}", repo.GetAttachment, repo.MustBeNotEmpty, reqRepoReleaseReader) + m.Group("/releases", func() { + m.Get("/new", repo.NewRelease) + m.Post("/new", bindIgnErr(forms.NewReleaseForm{}), repo.NewReleasePost) + m.Post("/delete", repo.DeleteRelease) + m.Post("/attachments", repo.UploadReleaseAttachment) + m.Post("/attachments/remove", repo.DeleteAttachment) + }, reqSignIn, repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoReleaseWriter, context.RepoRef()) + m.Post("/tags/delete", repo.DeleteTag, reqSignIn, + repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoCodeWriter, context.RepoRef()) + m.Group("/releases", func() { + m.Get("/edit/*", repo.EditRelease) + m.Post("/edit/*", bindIgnErr(forms.EditReleaseForm{}), repo.EditReleasePost) + }, reqSignIn, repo.MustBeNotEmpty, context.RepoMustNotBeArchived(), reqRepoReleaseWriter, func(ctx *context.Context) { + var err error + ctx.Repo.Commit, err = ctx.Repo.GitRepo.GetBranchCommit(ctx.Repo.Repository.DefaultBranch) + if err != nil { + ctx.ServerError("GetBranchCommit", err) + return + } + ctx.Repo.CommitsCount, err = ctx.Repo.GetCommitsCount() + if err != nil { + ctx.ServerError("GetCommitsCount", err) + return + } + ctx.Data["CommitsCount"] = ctx.Repo.CommitsCount + }) + + }, ignSignIn, context.RepoAssignment, context.UnitTypes(), reqRepoReleaseReader) + + // to maintain compatibility with old attachments + m.Group("/{username}/{reponame}", func() { + m.Get("/attachments/{uuid}", repo.GetAttachment) + }, ignSignIn, context.RepoAssignment, context.UnitTypes()) + + m.Group("/{username}/{reponame}", func() { + m.Post("/topics", repo.TopicsPost) + }, context.RepoAssignment, context.RepoMustNotBeArchived(), reqRepoAdmin) + + m.Group("/{username}/{reponame}", func() { + m.Group("", func() { + m.Get("/{type:issues|pulls}", repo.Issues) + m.Get("/{type:issues|pulls}/{index}", repo.ViewIssue) + m.Get("/labels", reqRepoIssuesOrPullsReader, repo.RetrieveLabels, repo.Labels) + m.Get("/milestones", reqRepoIssuesOrPullsReader, repo.Milestones) + }, context.RepoRef()) + + m.Group("/projects", func() { + m.Get("", repo.Projects) + m.Get("/{id}", repo.ViewProject) + m.Group("", func() { + m.Get("/new", repo.NewProject) + m.Post("/new", bindIgnErr(forms.CreateProjectForm{}), repo.NewProjectPost) + m.Group("/{id}", func() { + m.Post("", bindIgnErr(forms.EditProjectBoardForm{}), repo.AddBoardToProjectPost) + m.Post("/delete", repo.DeleteProject) + + m.Get("/edit", repo.EditProject) + m.Post("/edit", bindIgnErr(forms.CreateProjectForm{}), repo.EditProjectPost) + m.Post("/{action:open|close}", repo.ChangeProjectStatus) + + m.Group("/{boardID}", func() { + m.Put("", bindIgnErr(forms.EditProjectBoardForm{}), repo.EditProjectBoard) + m.Delete("", repo.DeleteProjectBoard) + m.Post("/default", repo.SetDefaultProjectBoard) + + m.Post("/{index}", repo.MoveIssueAcrossBoards) + }) + }) + }, reqRepoProjectsWriter, context.RepoMustNotBeArchived()) + }, reqRepoProjectsReader, repo.MustEnableProjects) + + m.Group("/wiki", func() { + m.Get("/", repo.Wiki) + m.Get("/{page}", repo.Wiki) + m.Get("/_pages", repo.WikiPages) + m.Get("/{page}/_revision", repo.WikiRevision) + m.Get("/commit/{sha:[a-f0-9]{7,40}}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff) + m.Get("/commit/{sha:[a-f0-9]{7,40}}.{ext:patch|diff}", repo.RawDiff) + + m.Group("", func() { + m.Combo("/_new").Get(repo.NewWiki). + Post(bindIgnErr(forms.NewWikiForm{}), repo.NewWikiPost) + m.Combo("/{page}/_edit").Get(repo.EditWiki). + Post(bindIgnErr(forms.NewWikiForm{}), repo.EditWikiPost) + m.Post("/{page}/delete", repo.DeleteWikiPagePost) + }, context.RepoMustNotBeArchived(), reqSignIn, reqRepoWikiWriter) + }, repo.MustEnableWiki, context.RepoRef(), func(ctx *context.Context) { + ctx.Data["PageIsWiki"] = true + }) + + m.Group("/wiki", func() { + m.Get("/raw/*", repo.WikiRaw) + }, repo.MustEnableWiki) + + m.Group("/activity", func() { + m.Get("", repo.Activity) + m.Get("/{period}", repo.Activity) + }, context.RepoRef(), repo.MustBeNotEmpty, context.RequireRepoReaderOr(models.UnitTypePullRequests, models.UnitTypeIssues, models.UnitTypeReleases)) + + m.Group("/activity_author_data", func() { + m.Get("", repo.ActivityAuthors) + m.Get("/{period}", repo.ActivityAuthors) + }, context.RepoRef(), repo.MustBeNotEmpty, context.RequireRepoReaderOr(models.UnitTypeCode)) + + m.Group("/archive", func() { + m.Get("/*", repo.Download) + m.Post("/*", repo.InitiateDownload) + }, repo.MustBeNotEmpty, reqRepoCodeReader) + + m.Group("/branches", func() { + m.Get("", repo.Branches) + }, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) + + m.Group("/blob_excerpt", func() { + m.Get("/{sha}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.ExcerptBlob) + }, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) + + m.Group("/pulls/{index}", func() { + m.Get(".diff", repo.DownloadPullDiff) + m.Get(".patch", repo.DownloadPullPatch) + m.Get("/commits", context.RepoRef(), repo.ViewPullCommits) + m.Post("/merge", context.RepoMustNotBeArchived(), bindIgnErr(forms.MergePullRequestForm{}), repo.MergePullRequest) + m.Post("/update", repo.UpdatePullRequest) + m.Post("/cleanup", context.RepoMustNotBeArchived(), context.RepoRef(), repo.CleanUpPullRequest) + m.Group("/files", func() { + m.Get("", context.RepoRef(), repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.ViewPullFiles) + m.Group("/reviews", func() { + m.Get("/new_comment", repo.RenderNewCodeCommentForm) + m.Post("/comments", bindIgnErr(forms.CodeCommentForm{}), repo.CreateCodeComment) + m.Post("/submit", bindIgnErr(forms.SubmitReviewForm{}), repo.SubmitReview) + }, context.RepoMustNotBeArchived()) + }) + }, repo.MustAllowPulls) + + m.Group("/media", func() { + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.SingleDownloadOrLFS) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.SingleDownloadOrLFS) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.SingleDownloadOrLFS) + m.Get("/blob/{sha}", context.RepoRefByType(context.RepoRefBlob), repo.DownloadByIDOrLFS) + // "/*" route is deprecated, and kept for backward compatibility + m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.SingleDownloadOrLFS) + }, repo.MustBeNotEmpty, reqRepoCodeReader) + + m.Group("/raw", func() { + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.SingleDownload) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.SingleDownload) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.SingleDownload) + m.Get("/blob/{sha}", context.RepoRefByType(context.RepoRefBlob), repo.DownloadByID) + // "/*" route is deprecated, and kept for backward compatibility + m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.SingleDownload) + }, repo.MustBeNotEmpty, reqRepoCodeReader) + + m.Group("/commits", func() { + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.RefCommits) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.RefCommits) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.RefCommits) + // "/*" route is deprecated, and kept for backward compatibility + m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.RefCommits) + }, repo.MustBeNotEmpty, reqRepoCodeReader) + + m.Group("/blame", func() { + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.RefBlame) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.RefBlame) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.RefBlame) + }, repo.MustBeNotEmpty, reqRepoCodeReader) + + m.Group("", func() { + m.Get("/graph", repo.Graph) + m.Get("/commit/{sha:([a-f0-9]{7,40})$}", repo.SetEditorconfigIfExists, repo.SetDiffViewStyle, repo.SetWhitespaceBehavior, repo.Diff) + }, repo.MustBeNotEmpty, context.RepoRef(), reqRepoCodeReader) + + m.Group("/src", func() { + m.Get("/branch/*", context.RepoRefByType(context.RepoRefBranch), repo.Home) + m.Get("/tag/*", context.RepoRefByType(context.RepoRefTag), repo.Home) + m.Get("/commit/*", context.RepoRefByType(context.RepoRefCommit), repo.Home) + // "/*" route is deprecated, and kept for backward compatibility + m.Get("/*", context.RepoRefByType(context.RepoRefLegacy), repo.Home) + }, repo.SetEditorconfigIfExists) + + m.Group("", func() { + m.Get("/forks", repo.Forks) + }, context.RepoRef(), reqRepoCodeReader) + m.Get("/commit/{sha:([a-f0-9]{7,40})}.{ext:patch|diff}", + repo.MustBeNotEmpty, reqRepoCodeReader, repo.RawDiff) + }, ignSignIn, context.RepoAssignment, context.UnitTypes()) + m.Group("/{username}/{reponame}", func() { + m.Get("/stars", repo.Stars) + m.Get("/watchers", repo.Watchers) + m.Get("/search", reqRepoCodeReader, repo.Search) + }, ignSignIn, context.RepoAssignment, context.RepoRef(), context.UnitTypes()) + + m.Group("/{username}", func() { + m.Group("/{reponame}", func() { + m.Get("", repo.SetEditorconfigIfExists, repo.Home) + }, ignSignIn, context.RepoAssignment, context.RepoRef(), context.UnitTypes()) + + m.Group("/{reponame}", func() { + m.Group("/info/lfs", func() { + m.Post("/objects/batch", lfs.CheckAcceptMediaType, lfs.BatchHandler) + m.Put("/objects/{oid}/{size}", lfs.UploadHandler) + m.Get("/objects/{oid}/{filename}", lfs.DownloadHandler) + m.Get("/objects/{oid}", lfs.DownloadHandler) + m.Post("/verify", lfs.CheckAcceptMediaType, lfs.VerifyHandler) + m.Group("/locks", func() { + m.Get("/", lfs.GetListLockHandler) + m.Post("/", lfs.PostLockHandler) + m.Post("/verify", lfs.VerifyLockHandler) + m.Post("/{lid}/unlock", lfs.UnLockHandler) + }, lfs.CheckAcceptMediaType) + m.Any("/*", func(ctx *context.Context) { + ctx.NotFound("", nil) + }) + }, ignSignInAndCsrf, lfsServerEnabled) + + m.Group("", func() { + m.PostOptions("/git-upload-pack", repo.ServiceUploadPack) + m.PostOptions("/git-receive-pack", repo.ServiceReceivePack) + m.GetOptions("/info/refs", repo.GetInfoRefs) + m.GetOptions("/HEAD", repo.GetTextFile("HEAD")) + m.GetOptions("/objects/info/alternates", repo.GetTextFile("objects/info/alternates")) + m.GetOptions("/objects/info/http-alternates", repo.GetTextFile("objects/info/http-alternates")) + m.GetOptions("/objects/info/packs", repo.GetInfoPacks) + m.GetOptions("/objects/info/{file:[^/]*}", repo.GetTextFile("")) + m.GetOptions("/objects/{head:[0-9a-f]{2}}/{hash:[0-9a-f]{38}}", repo.GetLooseObject) + m.GetOptions("/objects/pack/pack-{file:[0-9a-f]{40}}.pack", repo.GetPackFile) + m.GetOptions("/objects/pack/pack-{file:[0-9a-f]{40}}.idx", repo.GetIdxFile) + }, ignSignInAndCsrf) + + m.Head("/tasks/trigger", repo.TriggerTask) + }) + }) + // ***** END: Repository ***** + + m.Group("/notifications", func() { + m.Get("", user.Notifications) + m.Post("/status", user.NotificationStatusPost) + m.Post("/purge", user.NotificationPurgePost) + }, reqSignIn) + + if setting.API.EnableSwagger { + m.Get("/swagger.v1.json", SwaggerV1Json) + } +} diff --git a/semantic.json b/semantic.json deleted file mode 100644 index 3b927d58f..000000000 --- a/semantic.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "version": "2.8.7", - "base": "node_modules/fomantic-ui", - "paths": { - "source": { - "config": "src/theme.config", - "definitions": "src/definitions/", - "site": "src/site/", - "themes": "src/themes/" - }, - "output": { - "packaged": "../../web_src/fomantic/build/", - "uncompressed": "../../web_src/fomantic/build/components/", - "compressed": "../../web_src/fomantic/build/components/", - "themes": "../../web_src/fomantic/build/themes/" - }, - "clean": "../../web_src/fomantic/build/" - }, - "permission": false, - "autoInstall": false, - "rtl": false, - "admin": false, - "components": [ - "accordion", - "api", - "breadcrumb", - "button", - "card", - "checkbox", - "comment", - "container", - "dimmer", - "divider", - "dropdown", - "form", - "grid", - "header", - "icon", - "image", - "input", - "item", - "label", - "list", - "loader", - "menu", - "message", - "modal", - "popup", - "progress", - "reset", - "search", - "segment", - "sidebar", - "site", - "tab", - "table", - "text", - "transition" - ] -} diff --git a/services/agit/agit.go b/services/agit/agit.go new file mode 100644 index 000000000..3fca844f9 --- /dev/null +++ b/services/agit/agit.go @@ -0,0 +1,288 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package agit + +import ( + "fmt" + "net/http" + "os" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/notification" + "code.gitea.io/gitea/modules/private" + pull_service "code.gitea.io/gitea/services/pull" +) + +// ProcRecive handle proc receive work +func ProcRecive(ctx *context.PrivateContext, opts *private.HookOptions) []private.HookProcReceiveRefResult { + // TODO: Add more options? + var ( + topicBranch string + title string + description string + forcePush bool + ) + + results := make([]private.HookProcReceiveRefResult, 0, len(opts.OldCommitIDs)) + repo := ctx.Repo.Repository + gitRepo := ctx.Repo.GitRepo + ownerName := ctx.Repo.Repository.OwnerName + repoName := ctx.Repo.Repository.Name + + topicBranch = opts.GitPushOptions["topic"] + _, forcePush = opts.GitPushOptions["force-push"] + + for i := range opts.OldCommitIDs { + if opts.NewCommitIDs[i] == git.EmptySHA { + results = append(results, private.HookProcReceiveRefResult{ + OriginalRef: opts.RefFullNames[i], + OldOID: opts.OldCommitIDs[i], + NewOID: opts.NewCommitIDs[i], + Err: "Can't delete not exist branch", + }) + continue + } + + if !strings.HasPrefix(opts.RefFullNames[i], git.PullRequestPrefix) { + results = append(results, private.HookProcReceiveRefResult{ + IsNotMatched: true, + OriginalRef: opts.RefFullNames[i], + }) + continue + } + + baseBranchName := opts.RefFullNames[i][len(git.PullRequestPrefix):] + curentTopicBranch := "" + if !gitRepo.IsBranchExist(baseBranchName) { + // try match refs/for// + for p, v := range baseBranchName { + if v == '/' && gitRepo.IsBranchExist(baseBranchName[:p]) && p != len(baseBranchName)-1 { + curentTopicBranch = baseBranchName[p+1:] + baseBranchName = baseBranchName[:p] + break + } + } + } + + if len(topicBranch) == 0 && len(curentTopicBranch) == 0 { + results = append(results, private.HookProcReceiveRefResult{ + OriginalRef: opts.RefFullNames[i], + OldOID: opts.OldCommitIDs[i], + NewOID: opts.NewCommitIDs[i], + Err: "topic-branch is not set", + }) + continue + } + + headBranch := "" + userName := strings.ToLower(opts.UserName) + + if len(curentTopicBranch) == 0 { + curentTopicBranch = topicBranch + } + + // because different user maybe want to use same topic, + // So it's better to make sure the topic branch name + // has user name prefix + if !strings.HasPrefix(curentTopicBranch, userName+"/") { + headBranch = userName + "/" + curentTopicBranch + } else { + headBranch = curentTopicBranch + } + + pr, err := models.GetUnmergedPullRequest(repo.ID, repo.ID, headBranch, baseBranchName, models.PullRequestFlowAGit) + if err != nil { + if !models.IsErrPullRequestNotExist(err) { + log.Error("Failed to get unmerged agit flow pull request in repository: %s/%s Error: %v", ownerName, repoName, err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to get unmerged agit flow pull request in repository: %s/%s Error: %v", ownerName, repoName, err), + }) + return nil + } + + // create a new pull request + if len(title) == 0 { + has := false + title, has = opts.GitPushOptions["title"] + if !has || len(title) == 0 { + commit, err := gitRepo.GetCommit(opts.NewCommitIDs[i]) + if err != nil { + log.Error("Failed to get commit %s in repository: %s/%s Error: %v", opts.NewCommitIDs[i], ownerName, repoName, err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to get commit %s in repository: %s/%s Error: %v", opts.NewCommitIDs[i], ownerName, repoName, err), + }) + return nil + } + title = strings.Split(commit.CommitMessage, "\n")[0] + } + description = opts.GitPushOptions["description"] + } + + pusher, err := models.GetUserByID(opts.UserID) + if err != nil { + log.Error("Failed to get user. Error: %v", err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to get user. Error: %v", err), + }) + return nil + } + + prIssue := &models.Issue{ + RepoID: repo.ID, + Title: title, + PosterID: pusher.ID, + Poster: pusher, + IsPull: true, + Content: description, + } + + pr := &models.PullRequest{ + HeadRepoID: repo.ID, + BaseRepoID: repo.ID, + HeadBranch: headBranch, + HeadCommitID: opts.NewCommitIDs[i], + BaseBranch: baseBranchName, + HeadRepo: repo, + BaseRepo: repo, + MergeBase: "", + Type: models.PullRequestGitea, + Flow: models.PullRequestFlowAGit, + } + + if err := pull_service.NewPullRequest(repo, prIssue, []int64{}, []string{}, pr, []int64{}); err != nil { + if models.IsErrUserDoesNotHaveAccessToRepo(err) { + ctx.Error(http.StatusBadRequest, "UserDoesNotHaveAccessToRepo", err.Error()) + return nil + } + ctx.Error(http.StatusInternalServerError, "NewPullRequest", err.Error()) + return nil + } + + log.Trace("Pull request created: %d/%d", repo.ID, prIssue.ID) + + results = append(results, private.HookProcReceiveRefResult{ + Ref: pr.GetGitRefName(), + OriginalRef: opts.RefFullNames[i], + OldOID: git.EmptySHA, + NewOID: opts.NewCommitIDs[i], + }) + continue + } + + // update exist pull request + if err := pr.LoadBaseRepo(); err != nil { + log.Error("Unable to load base repository for PR[%d] Error: %v", pr.ID, err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Unable to load base repository for PR[%d] Error: %v", pr.ID, err), + }) + return nil + } + + oldCommitID, err := gitRepo.GetRefCommitID(pr.GetGitRefName()) + if err != nil { + log.Error("Unable to get ref commit id in base repository for PR[%d] Error: %v", pr.ID, err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Unable to get ref commit id in base repository for PR[%d] Error: %v", pr.ID, err), + }) + return nil + } + + if oldCommitID == opts.NewCommitIDs[i] { + results = append(results, private.HookProcReceiveRefResult{ + OriginalRef: opts.RefFullNames[i], + OldOID: opts.OldCommitIDs[i], + NewOID: opts.NewCommitIDs[i], + Err: "new commit is same with old commit", + }) + continue + } + + if !forcePush { + output, err := git.NewCommand("rev-list", "--max-count=1", oldCommitID, "^"+opts.NewCommitIDs[i]).RunInDirWithEnv(repo.RepoPath(), os.Environ()) + if err != nil { + log.Error("Unable to detect force push between: %s and %s in %-v Error: %v", oldCommitID, opts.NewCommitIDs[i], repo, err) + ctx.JSON(http.StatusInternalServerError, private.Response{ + Err: fmt.Sprintf("Fail to detect force push: %v", err), + }) + return nil + } else if len(output) > 0 { + results = append(results, private.HookProcReceiveRefResult{ + OriginalRef: oldCommitID, + OldOID: opts.OldCommitIDs[i], + NewOID: opts.NewCommitIDs[i], + Err: "request `force-push` push option", + }) + continue + } + } + + pr.HeadCommitID = opts.NewCommitIDs[i] + if err = pull_service.UpdateRef(pr); err != nil { + log.Error("Failed to update pull ref. Error: %v", err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to update pull ref. Error: %v", err), + }) + return nil + } + + pull_service.AddToTaskQueue(pr) + pusher, err := models.GetUserByID(opts.UserID) + if err != nil { + log.Error("Failed to get user. Error: %v", err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to get user. Error: %v", err), + }) + return nil + } + err = pr.LoadIssue() + if err != nil { + log.Error("Failed to load pull issue. Error: %v", err) + ctx.JSON(http.StatusInternalServerError, map[string]interface{}{ + "Err": fmt.Sprintf("Failed to load pull issue. Error: %v", err), + }) + return nil + } + comment, err := models.CreatePushPullComment(pusher, pr, oldCommitID, opts.NewCommitIDs[i]) + if err == nil && comment != nil { + notification.NotifyPullRequestPushCommits(pusher, pr, comment) + } + notification.NotifyPullRequestSynchronized(pusher, pr) + isForcePush := comment != nil && comment.IsForcePush + + results = append(results, private.HookProcReceiveRefResult{ + OldOID: oldCommitID, + NewOID: opts.NewCommitIDs[i], + Ref: pr.GetGitRefName(), + OriginalRef: opts.RefFullNames[i], + IsForcePush: isForcePush, + }) + } + + return results +} + +// UserNameChanged hanle user name change for agit flow pull +func UserNameChanged(user *models.User, newName string) error { + pulls, err := models.GetAllUnmergedAgitPullRequestByPoster(user.ID) + if err != nil { + return err + } + + newName = strings.ToLower(newName) + + for _, pull := range pulls { + pull.HeadBranch = strings.TrimPrefix(pull.HeadBranch, user.LowerName+"/") + pull.HeadBranch = newName + "/" + pull.HeadBranch + if err = pull.UpdateCols("head_branch"); err != nil { + return err + } + } + + return nil +} diff --git a/services/archiver/archiver.go b/services/archiver/archiver.go index 359fc8b62..7ae0a94d7 100644 --- a/services/archiver/archiver.go +++ b/services/archiver/archiver.go @@ -6,22 +6,20 @@ package archiver import ( + "errors" + "fmt" "io" - "io/ioutil" "os" - "path" "regexp" "strings" - "sync" - "time" - "code.gitea.io/gitea/modules/base" - "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/queue" "code.gitea.io/gitea/modules/setting" - "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/modules/storage" ) // ArchiveRequest defines the parameters of an archive request, which notably @@ -30,223 +28,185 @@ import ( // This is entirely opaque to external entities, though, and mostly used as a // handle elsewhere. type ArchiveRequest struct { - uri string - repo *git.Repository - refName string - ext string - archivePath string - archiveType git.ArchiveType - archiveComplete bool - commit *git.Commit - cchan chan struct{} + RepoID int64 + refName string + Type git.ArchiveType + CommitID string } -var archiveInProgress []*ArchiveRequest -var archiveMutex sync.Mutex - // SHA1 hashes will only go up to 40 characters, but SHA256 hashes will go all // the way to 64. var shaRegex = regexp.MustCompile(`^[0-9a-f]{4,64}$`) -// These facilitate testing, by allowing the unit tests to control (to some extent) -// the goroutine used for processing the queue. -var archiveQueueMutex *sync.Mutex -var archiveQueueStartCond *sync.Cond -var archiveQueueReleaseCond *sync.Cond +// NewRequest creates an archival request, based on the URI. The +// resulting ArchiveRequest is suitable for being passed to ArchiveRepository() +// if it's determined that the request still needs to be satisfied. +func NewRequest(repoID int64, repo *git.Repository, uri string) (*ArchiveRequest, error) { + r := &ArchiveRequest{ + RepoID: repoID, + } -// GetArchivePath returns the path from which we can serve this archive. -func (aReq *ArchiveRequest) GetArchivePath() string { - return aReq.archivePath + var ext string + switch { + case strings.HasSuffix(uri, ".zip"): + ext = ".zip" + r.Type = git.ZIP + case strings.HasSuffix(uri, ".tar.gz"): + ext = ".tar.gz" + r.Type = git.TARGZ + case strings.HasSuffix(uri, ".bundle"): + ext = ".bundle" + r.Type = git.BUNDLE + default: + return nil, fmt.Errorf("Unknown format: %s", uri) + } + + r.refName = strings.TrimSuffix(uri, ext) + + var err error + // Get corresponding commit. + if repo.IsBranchExist(r.refName) { + r.CommitID, err = repo.GetBranchCommitID(r.refName) + if err != nil { + return nil, err + } + } else if repo.IsTagExist(r.refName) { + r.CommitID, err = repo.GetTagCommitID(r.refName) + if err != nil { + return nil, err + } + } else if shaRegex.MatchString(r.refName) { + if repo.IsCommitExist(r.refName) { + r.CommitID = r.refName + } else { + return nil, git.ErrNotExist{ + ID: r.refName, + } + } + } else { + return nil, fmt.Errorf("Unknow ref %s type", r.refName) + } + + return r, nil } // GetArchiveName returns the name of the caller, based on the ref used by the // caller to create this request. func (aReq *ArchiveRequest) GetArchiveName() string { - return aReq.refName + aReq.ext + return strings.ReplaceAll(aReq.refName, "/", "-") + "." + aReq.Type.String() } -// IsComplete returns the completion status of this request. -func (aReq *ArchiveRequest) IsComplete() bool { - return aReq.archiveComplete -} - -// WaitForCompletion will wait for this request to complete, with no timeout. -// It returns whether the archive was actually completed, as the channel could -// have also been closed due to an error. -func (aReq *ArchiveRequest) WaitForCompletion(ctx *context.Context) bool { - select { - case <-aReq.cchan: - case <-ctx.Req.Context().Done(): - } - - return aReq.IsComplete() -} - -// TimedWaitForCompletion will wait for this request to complete, with timeout -// happening after the specified Duration. It returns whether the archive is -// now complete and whether we hit the timeout or not. The latter may not be -// useful if the request is complete or we started to shutdown. -func (aReq *ArchiveRequest) TimedWaitForCompletion(ctx *context.Context, dur time.Duration) (bool, bool) { - timeout := false - select { - case <-time.After(dur): - timeout = true - case <-aReq.cchan: - case <-ctx.Req.Context().Done(): - } - - return aReq.IsComplete(), timeout -} - -// The caller must hold the archiveMutex across calls to getArchiveRequest. -func getArchiveRequest(repo *git.Repository, commit *git.Commit, archiveType git.ArchiveType) *ArchiveRequest { - for _, r := range archiveInProgress { - // Need to be referring to the same repository. - if r.repo.Path == repo.Path && r.commit.ID == commit.ID && r.archiveType == archiveType { - return r - } - } - return nil -} - -// DeriveRequestFrom creates an archival request, based on the URI. The -// resulting ArchiveRequest is suitable for being passed to ArchiveRepository() -// if it's determined that the request still needs to be satisfied. -func DeriveRequestFrom(ctx *context.Context, uri string) *ArchiveRequest { - if ctx.Repo == nil || ctx.Repo.GitRepo == nil { - log.Trace("Repo not initialized") - return nil - } - r := &ArchiveRequest{ - uri: uri, - repo: ctx.Repo.GitRepo, - } - - switch { - case strings.HasSuffix(uri, ".zip"): - r.ext = ".zip" - r.archivePath = path.Join(r.repo.Path, "archives/zip") - r.archiveType = git.ZIP - case strings.HasSuffix(uri, ".tar.gz"): - r.ext = ".tar.gz" - r.archivePath = path.Join(r.repo.Path, "archives/targz") - r.archiveType = git.TARGZ - default: - log.Trace("Unknown format: %s", uri) - return nil - } - - r.refName = strings.TrimSuffix(r.uri, r.ext) - isDir, err := util.IsDir(r.archivePath) +func doArchive(r *ArchiveRequest) (*models.RepoArchiver, error) { + ctx, commiter, err := models.TxDBContext() if err != nil { - ctx.ServerError("Download -> util.IsDir(archivePath)", err) - return nil + return nil, err } - if !isDir { - if err := os.MkdirAll(r.archivePath, os.ModePerm); err != nil { - ctx.ServerError("Download -> os.MkdirAll(archivePath)", err) - return nil - } + defer commiter.Close() + + archiver, err := models.GetRepoArchiver(ctx, r.RepoID, r.Type, r.CommitID) + if err != nil { + return nil, err } - // Get corresponding commit. - if r.repo.IsBranchExist(r.refName) { - r.commit, err = r.repo.GetBranchCommit(r.refName) - if err != nil { - ctx.ServerError("GetBranchCommit", err) - return nil - } - } else if r.repo.IsTagExist(r.refName) { - r.commit, err = r.repo.GetTagCommit(r.refName) - if err != nil { - ctx.ServerError("GetTagCommit", err) - return nil - } - } else if shaRegex.MatchString(r.refName) { - r.commit, err = r.repo.GetCommit(r.refName) - if err != nil { - ctx.NotFound("GetCommit", nil) - return nil + if archiver != nil { + // FIXME: If another process are generating it, we think it's not ready and just return + // Or we should wait until the archive generated. + if archiver.Status == models.RepoArchiverGenerating { + return nil, nil } } else { - ctx.NotFound("DeriveRequestFrom", nil) - return nil + archiver = &models.RepoArchiver{ + RepoID: r.RepoID, + Type: r.Type, + CommitID: r.CommitID, + Status: models.RepoArchiverGenerating, + } + if err := models.AddRepoArchiver(ctx, archiver); err != nil { + return nil, err + } } - archiveMutex.Lock() - defer archiveMutex.Unlock() - if rExisting := getArchiveRequest(r.repo, r.commit, r.archiveType); rExisting != nil { - return rExisting - } - - r.archivePath = path.Join(r.archivePath, base.ShortSha(r.commit.ID.String())+r.ext) - r.archiveComplete, err = util.IsFile(r.archivePath) + rPath, err := archiver.RelativePath() if err != nil { - ctx.ServerError("util.IsFile", err) - return nil - } - return r -} - -func doArchive(r *ArchiveRequest) { - var ( - err error - tmpArchive *os.File - destArchive *os.File - ) - - // Close the channel to indicate to potential waiters that this request - // has finished. - defer close(r.cchan) - - // It could have happened that we enqueued two archival requests, due to - // race conditions and difficulties in locking. Do one last check that - // the archive we're referring to doesn't already exist. If it does exist, - // then just mark the request as complete and move on. - isFile, err := util.IsFile(r.archivePath) - if err != nil { - log.Error("Unable to check if %s util.IsFile: %v. Will ignore and recreate.", r.archivePath, err) - } - if isFile { - r.archiveComplete = true - return + return nil, err } - // Create a temporary file to use while the archive is being built. We - // will then copy it into place (r.archivePath) once it's fully - // constructed. - tmpArchive, err = ioutil.TempFile("", "archive") - if err != nil { - log.Error("Unable to create a temporary archive file! Error: %v", err) - return + _, err = storage.RepoArchives.Stat(rPath) + if err == nil { + if archiver.Status == models.RepoArchiverGenerating { + archiver.Status = models.RepoArchiverReady + return archiver, models.UpdateRepoArchiverStatus(ctx, archiver) + } + return archiver, nil } + + if !errors.Is(err, os.ErrNotExist) { + return nil, fmt.Errorf("unable to stat archive: %v", err) + } + + rd, w := io.Pipe() defer func() { - tmpArchive.Close() - os.Remove(tmpArchive.Name()) + w.Close() + rd.Close() }() - - if err = r.commit.CreateArchive(graceful.GetManager().ShutdownContext(), tmpArchive.Name(), git.CreateArchiveOpts{ - Format: r.archiveType, - Prefix: setting.Repository.PrefixArchiveFiles, - }); err != nil { - log.Error("Download -> CreateArchive "+tmpArchive.Name(), err) - return - } - - // Now we copy it into place - if destArchive, err = os.Create(r.archivePath); err != nil { - log.Error("Unable to open archive " + r.archivePath) - return - } - _, err = io.Copy(destArchive, tmpArchive) - destArchive.Close() + var done = make(chan error) + repo, err := archiver.LoadRepo() if err != nil { - log.Error("Unable to write archive " + r.archivePath) - return + return nil, fmt.Errorf("archiver.LoadRepo failed: %v", err) } - // Block any attempt to finalize creating a new request if we're marking - r.archiveComplete = true + gitRepo, err := git.OpenRepository(repo.RepoPath()) + if err != nil { + return nil, err + } + defer gitRepo.Close() + + go func(done chan error, w *io.PipeWriter, archiver *models.RepoArchiver, gitRepo *git.Repository) { + defer func() { + if r := recover(); r != nil { + done <- fmt.Errorf("%v", r) + } + }() + + if archiver.Type == git.BUNDLE { + err = gitRepo.CreateBundle( + graceful.GetManager().ShutdownContext(), + archiver.CommitID, + w, + ) + } else { + err = gitRepo.CreateArchive( + graceful.GetManager().ShutdownContext(), + archiver.Type, + w, + setting.Repository.PrefixArchiveFiles, + archiver.CommitID, + ) + } + _ = w.CloseWithError(err) + done <- err + }(done, w, archiver, gitRepo) + + // TODO: add lfs data to zip + // TODO: add submodule data to zip + + if _, err := storage.RepoArchives.Save(rPath, rd, -1); err != nil { + return nil, fmt.Errorf("unable to write archive: %v", err) + } + + err = <-done + if err != nil { + return nil, err + } + + if archiver.Status == models.RepoArchiverGenerating { + archiver.Status = models.RepoArchiverReady + if err = models.UpdateRepoArchiverStatus(ctx, archiver); err != nil { + return nil, err + } + } + + return archiver, commiter.Commit() } // ArchiveRepository satisfies the ArchiveRequest being passed in. Processing @@ -255,65 +215,46 @@ func doArchive(r *ArchiveRequest) { // anything. In all cases, the caller should be examining the *ArchiveRequest // being returned for completion, as it may be different than the one they passed // in. -func ArchiveRepository(request *ArchiveRequest) *ArchiveRequest { - // We'll return the request that's already been enqueued if it has been - // enqueued, or we'll immediately enqueue it if it has not been enqueued - // and it is not marked complete. - archiveMutex.Lock() - defer archiveMutex.Unlock() - if rExisting := getArchiveRequest(request.repo, request.commit, request.archiveType); rExisting != nil { - return rExisting - } - if request.archiveComplete { - return request - } +func ArchiveRepository(request *ArchiveRequest) (*models.RepoArchiver, error) { + return doArchive(request) +} - request.cchan = make(chan struct{}) - archiveInProgress = append(archiveInProgress, request) - go func() { - // Wait to start, if we have the Cond for it. This is currently only - // useful for testing, so that the start and release of queued entries - // can be controlled to examine the queue. - if archiveQueueStartCond != nil { - archiveQueueMutex.Lock() - archiveQueueStartCond.Wait() - archiveQueueMutex.Unlock() - } +var archiverQueue queue.UniqueQueue - // Drop the mutex while we process the request. This may take a long - // time, and it's not necessary now that we've added the reequest to - // archiveInProgress. - doArchive(request) - - if archiveQueueReleaseCond != nil { - archiveQueueMutex.Lock() - archiveQueueReleaseCond.Wait() - archiveQueueMutex.Unlock() - } - - // Purge this request from the list. To do so, we'll just take the - // index at which we ended up at and swap the final element into that - // position, then chop off the now-redundant final element. The slice - // may have change in between these two segments and we may have moved, - // so we search for it here. We could perhaps avoid this search - // entirely if len(archiveInProgress) == 1, but we should verify - // correctness. - archiveMutex.Lock() - defer archiveMutex.Unlock() - - idx := -1 - for _idx, req := range archiveInProgress { - if req == request { - idx = _idx - break +// Init initlize archive +func Init() error { + handler := func(data ...queue.Data) { + for _, datum := range data { + archiveReq, ok := datum.(*ArchiveRequest) + if !ok { + log.Error("Unable to process provided datum: %v - not possible to cast to IndexerData", datum) + continue + } + log.Trace("ArchiverData Process: %#v", archiveReq) + if _, err := doArchive(archiveReq); err != nil { + log.Error("Archive %v faild: %v", datum, err) } } - if idx == -1 { - log.Error("ArchiveRepository: Failed to find request for removal.") - return - } - archiveInProgress = append(archiveInProgress[:idx], archiveInProgress[idx+1:]...) - }() + } - return request + archiverQueue = queue.CreateUniqueQueue("repo-archive", handler, new(ArchiveRequest)) + if archiverQueue == nil { + return errors.New("unable to create codes indexer queue") + } + + go graceful.GetManager().RunWithShutdownFns(archiverQueue.Run) + + return nil +} + +// StartArchive push the archive request to the queue +func StartArchive(request *ArchiveRequest) error { + has, err := archiverQueue.Has(request) + if err != nil { + return err + } + if has { + return nil + } + return archiverQueue.Push(request) } diff --git a/services/archiver/archiver_test.go b/services/archiver/archiver_test.go index 84bab1481..3f3f36998 100644 --- a/services/archiver/archiver_test.go +++ b/services/archiver/archiver_test.go @@ -6,108 +6,75 @@ package archiver import ( "path/filepath" - "sync" "testing" "time" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/test" - "code.gitea.io/gitea/modules/util" "github.com/stretchr/testify/assert" ) -var queueMutex sync.Mutex - func TestMain(m *testing.M) { models.MainTest(m, filepath.Join("..", "..")) } func waitForCount(t *testing.T, num int) { - var numQueued int - // Wait for up to 10 seconds for the queue to be impacted. - timeout := time.Now().Add(10 * time.Second) - for { - numQueued = len(archiveInProgress) - if numQueued == num || time.Now().After(timeout) { - break - } - } - - assert.Equal(t, num, len(archiveInProgress)) -} - -func releaseOneEntry(t *testing.T, inFlight []*ArchiveRequest) { - var nowQueued, numQueued int - - numQueued = len(archiveInProgress) - - // Release one, then wait up to 10 seconds for it to complete. - queueMutex.Lock() - archiveQueueReleaseCond.Signal() - queueMutex.Unlock() - timeout := time.Now().Add(10 * time.Second) - for { - nowQueued = len(archiveInProgress) - if nowQueued != numQueued || time.Now().After(timeout) { - break - } - } - - // Make sure we didn't just timeout. - assert.NotEqual(t, numQueued, nowQueued) - - // Also make sure that we released only one. - assert.Equal(t, numQueued-1, nowQueued) } func TestArchive_Basic(t *testing.T) { assert.NoError(t, models.PrepareTestDatabase()) - archiveQueueMutex = &queueMutex - archiveQueueStartCond = sync.NewCond(&queueMutex) - archiveQueueReleaseCond = sync.NewCond(&queueMutex) - defer func() { - archiveQueueMutex = nil - archiveQueueStartCond = nil - archiveQueueReleaseCond = nil - }() - ctx := test.MockContext(t, "user27/repo49") firstCommit, secondCommit := "51f84af23134", "aacbdfe9e1c4" - bogusReq := DeriveRequestFrom(ctx, firstCommit+".zip") - assert.Nil(t, bogusReq) - test.LoadRepo(t, ctx, 49) - bogusReq = DeriveRequestFrom(ctx, firstCommit+".zip") - assert.Nil(t, bogusReq) - test.LoadGitRepo(t, ctx) defer ctx.Repo.GitRepo.Close() + bogusReq, err := NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, firstCommit+".zip") + assert.NoError(t, err) + assert.NotNil(t, bogusReq) + assert.EqualValues(t, firstCommit+".zip", bogusReq.GetArchiveName()) + // Check a series of bogus requests. // Step 1, valid commit with a bad extension. - bogusReq = DeriveRequestFrom(ctx, firstCommit+".dilbert") + bogusReq, err = NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, firstCommit+".dilbert") + assert.Error(t, err) assert.Nil(t, bogusReq) // Step 2, missing commit. - bogusReq = DeriveRequestFrom(ctx, "dbffff.zip") + bogusReq, err = NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, "dbffff.zip") + assert.Error(t, err) assert.Nil(t, bogusReq) // Step 3, doesn't look like branch/tag/commit. - bogusReq = DeriveRequestFrom(ctx, "db.zip") + bogusReq, err = NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, "db.zip") + assert.Error(t, err) assert.Nil(t, bogusReq) + bogusReq, err = NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, "master.zip") + assert.NoError(t, err) + assert.NotNil(t, bogusReq) + assert.EqualValues(t, "master.zip", bogusReq.GetArchiveName()) + + bogusReq, err = NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, "test/archive.zip") + assert.NoError(t, err) + assert.NotNil(t, bogusReq) + assert.EqualValues(t, "test-archive.zip", bogusReq.GetArchiveName()) + // Now two valid requests, firstCommit with valid extensions. - zipReq := DeriveRequestFrom(ctx, firstCommit+".zip") + zipReq, err := NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, firstCommit+".zip") + assert.NoError(t, err) assert.NotNil(t, zipReq) - tgzReq := DeriveRequestFrom(ctx, firstCommit+".tar.gz") + tgzReq, err := NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, firstCommit+".tar.gz") + assert.NoError(t, err) assert.NotNil(t, tgzReq) - secondReq := DeriveRequestFrom(ctx, secondCommit+".zip") + secondReq, err := NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, secondCommit+".zip") + assert.NoError(t, err) assert.NotNil(t, secondReq) inFlight := make([]*ArchiveRequest, 3) @@ -128,41 +95,9 @@ func TestArchive_Basic(t *testing.T) { // Sleep two seconds to make sure the queue doesn't change. time.Sleep(2 * time.Second) - assert.Equal(t, 3, len(archiveInProgress)) - // Release them all, they'll then stall at the archiveQueueReleaseCond while - // we examine the queue state. - queueMutex.Lock() - archiveQueueStartCond.Broadcast() - queueMutex.Unlock() - - // Iterate through all of the in-flight requests and wait for their - // completion. - for _, req := range inFlight { - req.WaitForCompletion(ctx) - } - - for _, req := range inFlight { - assert.True(t, req.IsComplete()) - exist, err := util.IsExist(req.GetArchivePath()) - assert.NoError(t, err) - assert.True(t, exist) - } - - arbitraryReq := inFlight[0] - // Reopen the channel so we don't double-close, mark it incomplete. We're - // going to run it back through the archiver, and it should get marked - // complete again. - arbitraryReq.cchan = make(chan struct{}) - arbitraryReq.archiveComplete = false - doArchive(arbitraryReq) - assert.True(t, arbitraryReq.IsComplete()) - - // Queues should not have drained yet, because we haven't released them. - // Do so now. - assert.Equal(t, 3, len(archiveInProgress)) - - zipReq2 := DeriveRequestFrom(ctx, firstCommit+".zip") + zipReq2, err := NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, firstCommit+".zip") + assert.NoError(t, err) // This zipReq should match what's sitting in the queue, as we haven't // let it release yet. From the consumer's point of view, this looks like // a long-running archive task. @@ -173,46 +108,22 @@ func TestArchive_Basic(t *testing.T) { // predecessor has cleared out of the queue. ArchiveRepository(zipReq2) - // Make sure the queue hasn't grown any. - assert.Equal(t, 3, len(archiveInProgress)) - - // Make sure the queue drains properly - releaseOneEntry(t, inFlight) - assert.Equal(t, 2, len(archiveInProgress)) - releaseOneEntry(t, inFlight) - assert.Equal(t, 1, len(archiveInProgress)) - releaseOneEntry(t, inFlight) - assert.Equal(t, 0, len(archiveInProgress)) - // Now we'll submit a request and TimedWaitForCompletion twice, before and // after we release it. We should trigger both the timeout and non-timeout // cases. - var completed, timedout bool - timedReq := DeriveRequestFrom(ctx, secondCommit+".tar.gz") + timedReq, err := NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, secondCommit+".tar.gz") + assert.NoError(t, err) assert.NotNil(t, timedReq) ArchiveRepository(timedReq) - // Guaranteed to timeout; we haven't signalled the request to start.. - completed, timedout = timedReq.TimedWaitForCompletion(ctx, 2*time.Second) - assert.Equal(t, false, completed) - assert.Equal(t, true, timedout) - - queueMutex.Lock() - archiveQueueStartCond.Broadcast() - queueMutex.Unlock() - - // Shouldn't timeout, we've now signalled it and it's a small request. - completed, timedout = timedReq.TimedWaitForCompletion(ctx, 15*time.Second) - assert.Equal(t, true, completed) - assert.Equal(t, false, timedout) - - zipReq2 = DeriveRequestFrom(ctx, firstCommit+".zip") + zipReq2, err = NewRequest(ctx.Repo.Repository.ID, ctx.Repo.GitRepo, firstCommit+".zip") + assert.NoError(t, err) // Now, we're guaranteed to have released the original zipReq from the queue. // Ensure that we don't get handed back the released entry somehow, but they // should remain functionally equivalent in all fields. The exception here // is zipReq.cchan, which will be non-nil because it's a completed request. // It's fine to go ahead and set it to nil now. - zipReq.cchan = nil + assert.Equal(t, zipReq, zipReq2) assert.False(t, zipReq == zipReq2) diff --git a/services/auth/auth.go b/services/auth/auth.go new file mode 100644 index 000000000..11a8c6ed1 --- /dev/null +++ b/services/auth/auth.go @@ -0,0 +1,140 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "fmt" + "net/http" + "reflect" + "regexp" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web/middleware" +) + +// authMethods contains the list of authentication plugins in the order they are expected to be +// executed. +// +// The OAuth2 plugin is expected to be executed first, as it must ignore the user id stored +// in the session (if there is a user id stored in session other plugins might return the user +// object for that id). +// +// The Session plugin is expected to be executed second, in order to skip authentication +// for users that have already signed in. +var authMethods = []Method{ + &OAuth2{}, + &Basic{}, + &Session{}, +} + +// The purpose of the following three function variables is to let the linter know that +// those functions are not dead code and are actually being used +var ( + _ = handleSignIn +) + +// Methods returns the instances of all registered methods +func Methods() []Method { + return authMethods +} + +// Register adds the specified instance to the list of available methods +func Register(method Method) { + authMethods = append(authMethods, method) +} + +// Init should be called exactly once when the application starts to allow plugins +// to allocate necessary resources +func Init() { + if setting.Service.EnableReverseProxyAuth { + Register(&ReverseProxy{}) + } + specialInit() + for _, method := range Methods() { + initializable, ok := method.(Initializable) + if !ok { + continue + } + + err := initializable.Init() + if err != nil { + log.Error("Could not initialize '%s' auth method, error: %s", reflect.TypeOf(method).String(), err) + } + } +} + +// Free should be called exactly once when the application is terminating to allow Auth plugins +// to release necessary resources +func Free() { + for _, method := range Methods() { + freeable, ok := method.(Freeable) + if !ok { + continue + } + + err := freeable.Free() + if err != nil { + log.Error("Could not free '%s' auth method, error: %s", reflect.TypeOf(method).String(), err) + } + } +} + +// isAttachmentDownload check if request is a file download (GET) with URL to an attachment +func isAttachmentDownload(req *http.Request) bool { + return strings.HasPrefix(req.URL.Path, "/attachments/") && req.Method == "GET" +} + +var gitRawPathRe = regexp.MustCompile(`^/[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+/(?:(?:git-(?:(?:upload)|(?:receive))-pack$)|(?:info/refs$)|(?:HEAD$)|(?:objects/)|raw/)`) +var lfsPathRe = regexp.MustCompile(`^/[a-zA-Z0-9_.-]+/[a-zA-Z0-9_.-]+/info/lfs/`) + +func isGitRawOrLFSPath(req *http.Request) bool { + if gitRawPathRe.MatchString(req.URL.Path) { + return true + } + if setting.LFS.StartServer { + return lfsPathRe.MatchString(req.URL.Path) + } + return false +} + +// handleSignIn clears existing session variables and stores new ones for the specified user object +func handleSignIn(resp http.ResponseWriter, req *http.Request, sess SessionStore, user *models.User) { + _ = sess.Delete("openid_verified_uri") + _ = sess.Delete("openid_signin_remember") + _ = sess.Delete("openid_determined_email") + _ = sess.Delete("openid_determined_username") + _ = sess.Delete("twofaUid") + _ = sess.Delete("twofaRemember") + _ = sess.Delete("u2fChallenge") + _ = sess.Delete("linkAccount") + err := sess.Set("uid", user.ID) + if err != nil { + log.Error(fmt.Sprintf("Error setting session: %v", err)) + } + err = sess.Set("uname", user.Name) + if err != nil { + log.Error(fmt.Sprintf("Error setting session: %v", err)) + } + + // Language setting of the user overwrites the one previously set + // If the user does not have a locale set, we save the current one. + if len(user.Language) == 0 { + lc := middleware.Locale(resp, req) + user.Language = lc.Language() + if err := models.UpdateUserCols(user, "language"); err != nil { + log.Error(fmt.Sprintf("Error updating user language [user: %d, locale: %s]", user.ID, user.Language)) + return + } + } + + middleware.SetLocaleCookie(resp, user.Language, 0) + + // Clear whatever CSRF has right now, force to generate a new one + middleware.DeleteCSRFCookie(resp) +} diff --git a/services/auth/auth_test.go b/services/auth/auth_test.go new file mode 100644 index 000000000..f6b43835f --- /dev/null +++ b/services/auth/auth_test.go @@ -0,0 +1,128 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "net/http" + "testing" + + "code.gitea.io/gitea/modules/setting" +) + +func Test_isGitRawOrLFSPath(t *testing.T) { + + tests := []struct { + path string + + want bool + }{ + { + "/owner/repo/git-upload-pack", + true, + }, + { + "/owner/repo/git-receive-pack", + true, + }, + { + "/owner/repo/info/refs", + true, + }, + { + "/owner/repo/HEAD", + true, + }, + { + "/owner/repo/objects/info/alternates", + true, + }, + { + "/owner/repo/objects/info/http-alternates", + true, + }, + { + "/owner/repo/objects/info/packs", + true, + }, + { + "/owner/repo/objects/info/blahahsdhsdkla", + true, + }, + { + "/owner/repo/objects/01/23456789abcdef0123456789abcdef01234567", + true, + }, + { + "/owner/repo/objects/pack/pack-123456789012345678921234567893124567894.pack", + true, + }, + { + "/owner/repo/objects/pack/pack-0123456789abcdef0123456789abcdef0123456.idx", + true, + }, + { + "/owner/repo/raw/branch/foo/fanaso", + true, + }, + { + "/owner/repo/stars", + false, + }, + { + "/notowner", + false, + }, + { + "/owner/repo", + false, + }, + { + "/owner/repo/commit/123456789012345678921234567893124567894", + false, + }, + } + lfsTests := []string{ + "/owner/repo/info/lfs/", + "/owner/repo/info/lfs/objects/batch", + "/owner/repo/info/lfs/objects/oid/filename", + "/owner/repo/info/lfs/objects/oid", + "/owner/repo/info/lfs/objects", + "/owner/repo/info/lfs/verify", + "/owner/repo/info/lfs/locks", + "/owner/repo/info/lfs/locks/verify", + "/owner/repo/info/lfs/locks/123/unlock", + } + + origLFSStartServer := setting.LFS.StartServer + + for _, tt := range tests { + t.Run(tt.path, func(t *testing.T) { + req, _ := http.NewRequest("POST", "http://localhost"+tt.path, nil) + setting.LFS.StartServer = false + if got := isGitRawOrLFSPath(req); got != tt.want { + t.Errorf("isGitOrLFSPath() = %v, want %v", got, tt.want) + } + setting.LFS.StartServer = true + if got := isGitRawOrLFSPath(req); got != tt.want { + t.Errorf("isGitOrLFSPath() = %v, want %v", got, tt.want) + } + }) + } + for _, tt := range lfsTests { + t.Run(tt, func(t *testing.T) { + req, _ := http.NewRequest("POST", tt, nil) + setting.LFS.StartServer = false + if got := isGitRawOrLFSPath(req); got != setting.LFS.StartServer { + t.Errorf("isGitOrLFSPath(%q) = %v, want %v, %v", tt, got, setting.LFS.StartServer, gitRawPathRe.MatchString(tt)) + } + setting.LFS.StartServer = true + if got := isGitRawOrLFSPath(req); got != setting.LFS.StartServer { + t.Errorf("isGitOrLFSPath(%q) = %v, want %v", tt, got, setting.LFS.StartServer) + } + }) + } + setting.LFS.StartServer = origLFSStartServer +} diff --git a/services/auth/basic.go b/services/auth/basic.go new file mode 100644 index 000000000..d492a52a6 --- /dev/null +++ b/services/auth/basic.go @@ -0,0 +1,121 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/base" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web/middleware" +) + +// Ensure the struct implements the interface. +var ( + _ Method = &Basic{} + _ Named = &Basic{} +) + +// Basic implements the Auth interface and authenticates requests (API requests +// only) by looking for Basic authentication data or "x-oauth-basic" token in the "Authorization" +// header. +type Basic struct { +} + +// Name represents the name of auth method +func (b *Basic) Name() string { + return "basic" +} + +// Verify extracts and validates Basic data (username and password/token) from the +// "Authorization" header of the request and returns the corresponding user object for that +// name/token on successful validation. +// Returns nil if header is empty or validation fails. +func (b *Basic) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { + // Basic authentication should only fire on API, Download or on Git or LFSPaths + if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) && !isGitRawOrLFSPath(req) { + return nil + } + + baHead := req.Header.Get("Authorization") + if len(baHead) == 0 { + return nil + } + + auths := strings.SplitN(baHead, " ", 2) + if len(auths) != 2 || (auths[0] != "Basic" && auths[0] != "basic") { + return nil + } + + uname, passwd, _ := base.BasicAuthDecode(auths[1]) + + // Check if username or password is a token + isUsernameToken := len(passwd) == 0 || passwd == "x-oauth-basic" + // Assume username is token + authToken := uname + if !isUsernameToken { + log.Trace("Basic Authorization: Attempting login for: %s", uname) + // Assume password is token + authToken = passwd + } else { + log.Trace("Basic Authorization: Attempting login with username as token") + } + + uid := CheckOAuthAccessToken(authToken) + if uid != 0 { + log.Trace("Basic Authorization: Valid OAuthAccessToken for user[%d]", uid) + + u, err := models.GetUserByID(uid) + if err != nil { + log.Error("GetUserByID: %v", err) + return nil + } + + store.GetData()["IsApiToken"] = true + return u + } + + token, err := models.GetAccessTokenBySHA(authToken) + if err == nil { + log.Trace("Basic Authorization: Valid AccessToken for user[%d]", uid) + u, err := models.GetUserByID(token.UID) + if err != nil { + log.Error("GetUserByID: %v", err) + return nil + } + + token.UpdatedUnix = timeutil.TimeStampNow() + if err = models.UpdateAccessToken(token); err != nil { + log.Error("UpdateAccessToken: %v", err) + } + + store.GetData()["IsApiToken"] = true + return u + } else if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) { + log.Error("GetAccessTokenBySha: %v", err) + } + + if !setting.Service.EnableBasicAuth { + return nil + } + + log.Trace("Basic Authorization: Attempting SignIn for %s", uname) + u, err := UserSignIn(uname, passwd) + if err != nil { + if !models.IsErrUserNotExist(err) { + log.Error("UserSignIn: %v", err) + } + return nil + } + + log.Trace("Basic Authorization: Logged in user %-v", u) + + return u +} diff --git a/services/auth/group.go b/services/auth/group.go new file mode 100644 index 000000000..fb885b818 --- /dev/null +++ b/services/auth/group.go @@ -0,0 +1,81 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "net/http" + + "code.gitea.io/gitea/models" +) + +// Ensure the struct implements the interface. +var ( + _ Method = &Group{} + _ Initializable = &Group{} + _ Freeable = &Group{} +) + +// Group implements the Auth interface with serval Auth. +type Group struct { + methods []Method +} + +// NewGroup creates a new auth group +func NewGroup(methods ...Method) *Group { + return &Group{ + methods: methods, + } +} + +// Init does nothing as the Basic implementation does not need to allocate any resources +func (b *Group) Init() error { + for _, method := range b.methods { + initializable, ok := method.(Initializable) + if !ok { + continue + } + + if err := initializable.Init(); err != nil { + return err + } + } + return nil +} + +// Free does nothing as the Basic implementation does not have to release any resources +func (b *Group) Free() error { + for _, method := range b.methods { + freeable, ok := method.(Freeable) + if !ok { + continue + } + if err := freeable.Free(); err != nil { + return err + } + } + return nil +} + +// Verify extracts and validates +func (b *Group) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { + if !models.HasEngine { + return nil + } + + // Try to sign in with each of the enabled plugins + for _, ssoMethod := range b.methods { + user := ssoMethod.Verify(req, w, store, sess) + if user != nil { + if store.GetData()["AuthedMethod"] == nil { + if named, ok := ssoMethod.(Named); ok { + store.GetData()["AuthedMethod"] = named.Name() + } + } + return user + } + } + + return nil +} diff --git a/services/auth/interface.go b/services/auth/interface.go new file mode 100644 index 000000000..51c704337 --- /dev/null +++ b/services/auth/interface.go @@ -0,0 +1,60 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "context" + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/session" + "code.gitea.io/gitea/modules/web/middleware" +) + +// DataStore represents a data store +type DataStore middleware.DataStore + +// SessionStore represents a session store +type SessionStore session.Store + +// Method represents an authentication method (plugin) for HTTP requests. +type Method interface { + // Verify tries to verify the authentication data contained in the request. + // If verification is successful returns either an existing user object (with id > 0) + // or a new user object (with id = 0) populated with the information that was found + // in the authentication data (username or email). + // Returns nil if verification fails. + Verify(http *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User +} + +// Initializable represents a structure that requires initialization +// It usually should only be called once before anything else is called +type Initializable interface { + // Init should be called exactly once before using any of the other methods, + // in order to allow the plugin to allocate necessary resources + Init() error +} + +// Named represents a named thing +type Named interface { + Name() string +} + +// Freeable represents a structure that is required to be freed +type Freeable interface { + // Free should be called exactly once before application closes, in order to + // give chance to the plugin to free any allocated resources + Free() error +} + +// PasswordAuthenticator represents a source of authentication +type PasswordAuthenticator interface { + Authenticate(user *models.User, login, password string) (*models.User, error) +} + +// SynchronizableSource represents a source that can synchronize users +type SynchronizableSource interface { + Sync(ctx context.Context, updateExisting bool) error +} diff --git a/services/auth/oauth2.go b/services/auth/oauth2.go new file mode 100644 index 000000000..665e5232c --- /dev/null +++ b/services/auth/oauth2.go @@ -0,0 +1,146 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "net/http" + "strings" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/auth/source/oauth2" +) + +// Ensure the struct implements the interface. +var ( + _ Method = &OAuth2{} + _ Named = &OAuth2{} +) + +// CheckOAuthAccessToken returns uid of user from oauth token +func CheckOAuthAccessToken(accessToken string) int64 { + // JWT tokens require a "." + if !strings.Contains(accessToken, ".") { + return 0 + } + token, err := oauth2.ParseToken(accessToken, oauth2.DefaultSigningKey) + if err != nil { + log.Trace("oauth2.ParseToken: %v", err) + return 0 + } + var grant *models.OAuth2Grant + if grant, err = models.GetOAuth2GrantByID(token.GrantID); err != nil || grant == nil { + return 0 + } + if token.Type != oauth2.TypeAccessToken { + return 0 + } + if token.ExpiresAt < time.Now().Unix() || token.IssuedAt > time.Now().Unix() { + return 0 + } + return grant.UserID +} + +// OAuth2 implements the Auth interface and authenticates requests +// (API requests only) by looking for an OAuth token in query parameters or the +// "Authorization" header. +type OAuth2 struct { +} + +// Name represents the name of auth method +func (o *OAuth2) Name() string { + return "oauth2" +} + +// userIDFromToken returns the user id corresponding to the OAuth token. +func (o *OAuth2) userIDFromToken(req *http.Request, store DataStore) int64 { + _ = req.ParseForm() + + // Check access token. + tokenSHA := req.Form.Get("token") + if len(tokenSHA) == 0 { + tokenSHA = req.Form.Get("access_token") + } + if len(tokenSHA) == 0 { + // Well, check with header again. + auHead := req.Header.Get("Authorization") + if len(auHead) > 0 { + auths := strings.Fields(auHead) + if len(auths) == 2 && (auths[0] == "token" || strings.ToLower(auths[0]) == "bearer") { + tokenSHA = auths[1] + } + } + } + if len(tokenSHA) == 0 { + return 0 + } + + // Let's see if token is valid. + if strings.Contains(tokenSHA, ".") { + uid := CheckOAuthAccessToken(tokenSHA) + if uid != 0 { + store.GetData()["IsApiToken"] = true + } + return uid + } + t, err := models.GetAccessTokenBySHA(tokenSHA) + if err != nil { + if !models.IsErrAccessTokenNotExist(err) && !models.IsErrAccessTokenEmpty(err) { + log.Error("GetAccessTokenBySHA: %v", err) + } + return 0 + } + t.UpdatedUnix = timeutil.TimeStampNow() + if err = models.UpdateAccessToken(t); err != nil { + log.Error("UpdateAccessToken: %v", err) + } + store.GetData()["IsApiToken"] = true + return t.UID +} + +// Verify extracts the user ID from the OAuth token in the query parameters +// or the "Authorization" header and returns the corresponding user object for that ID. +// If verification is successful returns an existing user object. +// Returns nil if verification fails. +func (o *OAuth2) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { + if !models.HasEngine { + return nil + } + + if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) && !isAuthenticatedTokenRequest(req) { + return nil + } + + id := o.userIDFromToken(req, store) + if id <= 0 { + return nil + } + log.Trace("OAuth2 Authorization: Found token for user[%d]", id) + + user, err := models.GetUserByID(id) + if err != nil { + if !models.IsErrUserNotExist(err) { + log.Error("GetUserByName: %v", err) + } + return nil + } + + log.Trace("OAuth2 Authorization: Logged in user %-v", user) + return user +} + +func isAuthenticatedTokenRequest(req *http.Request) bool { + switch req.URL.Path { + case "/login/oauth/userinfo": + fallthrough + case "/login/oauth/introspect": + return true + } + return false +} diff --git a/services/auth/placeholder.go b/services/auth/placeholder.go new file mode 100644 index 000000000..d9a0ceae7 --- /dev/null +++ b/services/auth/placeholder.go @@ -0,0 +1,10 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +//go:build !windows +// +build !windows + +package auth + +func specialInit() {} diff --git a/services/auth/reverseproxy.go b/services/auth/reverseproxy.go new file mode 100644 index 000000000..7ff226077 --- /dev/null +++ b/services/auth/reverseproxy.go @@ -0,0 +1,119 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "net/http" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/mailer" + + gouuid "github.com/google/uuid" +) + +// Ensure the struct implements the interface. +var ( + _ Method = &ReverseProxy{} + _ Named = &ReverseProxy{} +) + +// ReverseProxy implements the Auth interface, but actually relies on +// a reverse proxy for authentication of users. +// On successful authentication the proxy is expected to populate the username in the +// "setting.ReverseProxyAuthUser" header. Optionally it can also populate the email of the +// user in the "setting.ReverseProxyAuthEmail" header. +type ReverseProxy struct { +} + +// getUserName extracts the username from the "setting.ReverseProxyAuthUser" header +func (r *ReverseProxy) getUserName(req *http.Request) string { + webAuthUser := strings.TrimSpace(req.Header.Get(setting.ReverseProxyAuthUser)) + if len(webAuthUser) == 0 { + return "" + } + return webAuthUser +} + +// Name represents the name of auth method +func (r *ReverseProxy) Name() string { + return "reverse_proxy" +} + +// Verify extracts the username from the "setting.ReverseProxyAuthUser" header +// of the request and returns the corresponding user object for that name. +// Verification of header data is not performed as it should have already been done by +// the revese proxy. +// If a username is available in the "setting.ReverseProxyAuthUser" header an existing +// user object is returned (populated with username or email found in header). +// Returns nil if header is empty. +func (r *ReverseProxy) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { + username := r.getUserName(req) + if len(username) == 0 { + return nil + } + log.Trace("ReverseProxy Authorization: Found username: %s", username) + + user, err := models.GetUserByName(username) + if err != nil { + if !models.IsErrUserNotExist(err) || !r.isAutoRegisterAllowed() { + log.Error("GetUserByName: %v", err) + return nil + } + user = r.newUser(req) + } + + // Make sure requests to API paths, attachment downloads, git and LFS do not create a new session + if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) && !isGitRawOrLFSPath(req) { + if sess != nil && (sess.Get("uid") == nil || sess.Get("uid").(int64) != user.ID) { + handleSignIn(w, req, sess, user) + } + } + store.GetData()["IsReverseProxy"] = true + + log.Trace("ReverseProxy Authorization: Logged in user %-v", user) + return user +} + +// isAutoRegisterAllowed checks if EnableReverseProxyAutoRegister setting is true +func (r *ReverseProxy) isAutoRegisterAllowed() bool { + return setting.Service.EnableReverseProxyAutoRegister +} + +// newUser creates a new user object for the purpose of automatic registration +// and populates its name and email with the information present in request headers. +func (r *ReverseProxy) newUser(req *http.Request) *models.User { + username := r.getUserName(req) + if len(username) == 0 { + return nil + } + + email := gouuid.New().String() + "@localhost" + if setting.Service.EnableReverseProxyEmail { + webAuthEmail := req.Header.Get(setting.ReverseProxyAuthEmail) + if len(webAuthEmail) > 0 { + email = webAuthEmail + } + } + + user := &models.User{ + Name: username, + Email: email, + IsActive: true, + } + if err := models.CreateUser(user); err != nil { + // FIXME: should I create a system notice? + log.Error("CreateUser: %v", err) + return nil + } + + mailer.SendRegisterNotifyMail(user) + + return user +} diff --git a/services/auth/session.go b/services/auth/session.go new file mode 100644 index 000000000..9a6e2d95d --- /dev/null +++ b/services/auth/session.go @@ -0,0 +1,66 @@ +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" +) + +// Ensure the struct implements the interface. +var ( + _ Method = &Session{} + _ Named = &Session{} +) + +// Session checks if there is a user uid stored in the session and returns the user +// object for that uid. +type Session struct { +} + +// Name represents the name of auth method +func (s *Session) Name() string { + return "session" +} + +// Verify checks if there is a user uid stored in the session and returns the user +// object for that uid. +// Returns nil if there is no user uid stored in the session. +func (s *Session) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { + user := SessionUser(sess) + if user != nil { + return user + } + return nil +} + +// SessionUser returns the user object corresponding to the "uid" session variable. +func SessionUser(sess SessionStore) *models.User { + // Get user ID + uid := sess.Get("uid") + if uid == nil { + return nil + } + log.Trace("Session Authorization: Found user[%d]", uid) + + id, ok := uid.(int64) + if !ok { + return nil + } + + // Get user object + user, err := models.GetUserByID(id) + if err != nil { + if !models.IsErrUserNotExist(err) { + log.Error("GetUserById: %v", err) + } + return nil + } + + log.Trace("Session Authorization: Logged in user %-v", user) + return user +} diff --git a/services/auth/signin.go b/services/auth/signin.go new file mode 100644 index 000000000..2c4bf9b35 --- /dev/null +++ b/services/auth/signin.go @@ -0,0 +1,113 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + + // Register the sources + _ "code.gitea.io/gitea/services/auth/source/db" + _ "code.gitea.io/gitea/services/auth/source/ldap" + _ "code.gitea.io/gitea/services/auth/source/oauth2" + _ "code.gitea.io/gitea/services/auth/source/pam" + _ "code.gitea.io/gitea/services/auth/source/smtp" + _ "code.gitea.io/gitea/services/auth/source/sspi" +) + +// UserSignIn validates user name and password. +func UserSignIn(username, password string) (*models.User, error) { + var user *models.User + if strings.Contains(username, "@") { + user = &models.User{Email: strings.ToLower(strings.TrimSpace(username))} + // check same email + cnt, err := models.Count(user) + if err != nil { + return nil, err + } + if cnt > 1 { + return nil, models.ErrEmailAlreadyUsed{ + Email: user.Email, + } + } + } else { + trimmedUsername := strings.TrimSpace(username) + if len(trimmedUsername) == 0 { + return nil, models.ErrUserNotExist{Name: username} + } + + user = &models.User{LowerName: strings.ToLower(trimmedUsername)} + } + + hasUser, err := models.GetUser(user) + if err != nil { + return nil, err + } + + if hasUser { + source, err := models.GetLoginSourceByID(user.LoginSource) + if err != nil { + return nil, err + } + + if !source.IsActive { + return nil, models.ErrLoginSourceNotActived + } + + authenticator, ok := source.Cfg.(PasswordAuthenticator) + if !ok { + return nil, models.ErrUnsupportedLoginType + } + + user, err := authenticator.Authenticate(user, username, password) + if err != nil { + return nil, err + } + + // WARN: DON'T check user.IsActive, that will be checked on reqSign so that + // user could be hint to resend confirm email. + if user.ProhibitLogin { + return nil, models.ErrUserProhibitLogin{UID: user.ID, Name: user.Name} + } + + return user, nil + } + + sources, err := models.AllActiveLoginSources() + if err != nil { + return nil, err + } + + for _, source := range sources { + if !source.IsActive { + // don't try to authenticate non-active sources + continue + } + + authenticator, ok := source.Cfg.(PasswordAuthenticator) + if !ok { + continue + } + + authUser, err := authenticator.Authenticate(nil, username, password) + + if err == nil { + if !authUser.ProhibitLogin { + return authUser, nil + } + err = models.ErrUserProhibitLogin{UID: authUser.ID, Name: authUser.Name} + } + + if models.IsErrUserNotExist(err) { + log.Debug("Failed to login '%s' via '%s': %v", username, source.Name, err) + } else { + log.Warn("Failed to login '%s' via '%s': %v", username, source.Name, err) + } + } + + return nil, models.ErrUserNotExist{Name: username} +} diff --git a/services/auth/source/db/assert_interface_test.go b/services/auth/source/db/assert_interface_test.go new file mode 100644 index 000000000..2e0fa9ba2 --- /dev/null +++ b/services/auth/source/db/assert_interface_test.go @@ -0,0 +1,21 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package db_test + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/db" +) + +// This test file exists to assert that our Source exposes the interfaces that we expect +// It tightly binds the interfaces and implementation without breaking go import cycles + +type sourceInterface interface { + auth.PasswordAuthenticator + models.LoginConfig +} + +var _ (sourceInterface) = &db.Source{} diff --git a/services/auth/source/db/authenticate.go b/services/auth/source/db/authenticate.go new file mode 100644 index 000000000..e73ab15d2 --- /dev/null +++ b/services/auth/source/db/authenticate.go @@ -0,0 +1,42 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package db + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/setting" +) + +// Authenticate authenticates the provided user against the DB +func Authenticate(user *models.User, login, password string) (*models.User, error) { + if user == nil { + return nil, models.ErrUserNotExist{Name: login} + } + + if !user.IsPasswordSet() || !user.ValidatePassword(password) { + return nil, models.ErrUserNotExist{UID: user.ID, Name: user.Name} + } + + // Update password hash if server password hash algorithm have changed + if user.PasswdHashAlgo != setting.PasswordHashAlgo { + if err := user.SetPassword(password); err != nil { + return nil, err + } + if err := models.UpdateUserCols(user, "passwd", "passwd_hash_algo", "salt"); err != nil { + return nil, err + } + } + + // WARN: DON'T check user.IsActive, that will be checked on reqSign so that + // user could be hint to resend confirm email. + if user.ProhibitLogin { + return nil, models.ErrUserProhibitLogin{ + UID: user.ID, + Name: user.Name, + } + } + + return user, nil +} diff --git a/services/auth/source/db/source.go b/services/auth/source/db/source.go new file mode 100644 index 000000000..182c05f0d --- /dev/null +++ b/services/auth/source/db/source.go @@ -0,0 +1,31 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package db + +import "code.gitea.io/gitea/models" + +// Source is a password authentication service +type Source struct{} + +// FromDB fills up an OAuth2Config from serialized format. +func (source *Source) FromDB(bs []byte) error { + return nil +} + +// ToDB exports an SMTPConfig to a serialized format. +func (source *Source) ToDB() ([]byte, error) { + return nil, nil +} + +// Authenticate queries if login/password is valid against the PAM, +// and create a local user if success when enabled. +func (source *Source) Authenticate(user *models.User, login, password string) (*models.User, error) { + return Authenticate(user, login, password) +} + +func init() { + models.RegisterLoginTypeConfig(models.LoginNoType, &Source{}) + models.RegisterLoginTypeConfig(models.LoginPlain, &Source{}) +} diff --git a/services/auth/source/ldap/README.md b/services/auth/source/ldap/README.md new file mode 100644 index 000000000..3a839fa31 --- /dev/null +++ b/services/auth/source/ldap/README.md @@ -0,0 +1,122 @@ +# Gitea LDAP Authentication Module + +## About + +This authentication module attempts to authorize and authenticate a user +against an LDAP server. It provides two methods of authentication: LDAP via +BindDN, and LDAP simple authentication. + +LDAP via BindDN functions like most LDAP authentication systems. First, it +queries the LDAP server using a Bind DN and searches for the user that is +attempting to sign in. If the user is found, the module attempts to bind to the +server using the user's supplied credentials. If this succeeds, the user has +been authenticated, and his account information is retrieved and passed to the +Gogs login infrastructure. + +LDAP simple authentication does not utilize a Bind DN. Instead, it binds +directly with the LDAP server using the user's supplied credentials. If the bind +succeeds and no filter rules out the user, the user is authenticated. + +LDAP via BindDN is recommended for most users. By using a Bind DN, the server +can perform authorization by restricting which entries the Bind DN account can +read. Further, using a Bind DN with reduced permissions can reduce security risk +in the face of application bugs. + +## Usage + +To use this module, add an LDAP authentication source via the Authentications +section in the admin panel. Both the LDAP via BindDN and the simple auth LDAP +share the following fields: + +* Authorization Name **(required)** + * A name to assign to the new method of authorization. + +* Host **(required)** + * The address where the LDAP server can be reached. + * Example: mydomain.com + +* Port **(required)** + * The port to use when connecting to the server. + * Example: 636 + +* Enable TLS Encryption (optional) + * Whether to use TLS when connecting to the LDAP server. + +* Admin Filter (optional) + * An LDAP filter specifying if a user should be given administrator + privileges. If a user accounts passes the filter, the user will be + privileged as an administrator. + * Example: (objectClass=adminAccount) + +* First name attribute (optional) + * The attribute of the user's LDAP record containing the user's first name. + This will be used to populate their account information. + * Example: givenName + +* Surname attribute (optional) + * The attribute of the user's LDAP record containing the user's surname This + will be used to populate their account information. + * Example: sn + +* E-mail attribute **(required)** + * The attribute of the user's LDAP record containing the user's email + address. This will be used to populate their account information. + * Example: mail + +**LDAP via BindDN** adds the following fields: + +* Bind DN (optional) + * The DN to bind to the LDAP server with when searching for the user. This + may be left blank to perform an anonymous search. + * Example: cn=Search,dc=mydomain,dc=com + +* Bind Password (optional) + * The password for the Bind DN specified above, if any. _Note: The password + is stored in plaintext at the server. As such, ensure that your Bind DN + has as few privileges as possible._ + +* User Search Base **(required)** + * The LDAP base at which user accounts will be searched for. + * Example: ou=Users,dc=mydomain,dc=com + +* User Filter **(required)** + * An LDAP filter declaring how to find the user record that is attempting to + authenticate. The '%s' matching parameter will be substituted with the + user's username. + * Example: (&(objectClass=posixAccount)(uid=%s)) + +**LDAP using simple auth** adds the following fields: + +* User DN **(required)** + * A template to use as the user's DN. The `%s` matching parameter will be + substituted with the user's username. + * Example: cn=%s,ou=Users,dc=mydomain,dc=com + * Example: uid=%s,ou=Users,dc=mydomain,dc=com + +* User Search Base (optional) + * The LDAP base at which user accounts will be searched for. + * Example: ou=Users,dc=mydomain,dc=com + +* User Filter **(required)** + * An LDAP filter declaring when a user should be allowed to log in. The `%s` + matching parameter will be substituted with the user's username. + * Example: (&(objectClass=posixAccount)(cn=%s)) + * Example: (&(objectClass=posixAccount)(uid=%s)) + +**Verify group membership in LDAP** uses the following fields: + +* Group Search Base (optional) + * The LDAP DN used for groups. + * Example: ou=group,dc=mydomain,dc=com + +* Group Name Filter (optional) + * An LDAP filter declaring how to find valid groups in the above DN. + * Example: (|(cn=gitea_users)(cn=admins)) + +* User Attribute in Group (optional) + * Which user LDAP attribute is listed in the group. + * Example: uid + +* Group Attribute for User (optional) + * Which group LDAP attribute contains an array above user attribute names. + * Example: memberUid diff --git a/services/auth/source/ldap/assert_interface_test.go b/services/auth/source/ldap/assert_interface_test.go new file mode 100644 index 000000000..4cf3eafe7 --- /dev/null +++ b/services/auth/source/ldap/assert_interface_test.go @@ -0,0 +1,27 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package ldap_test + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/ldap" +) + +// This test file exists to assert that our Source exposes the interfaces that we expect +// It tightly binds the interfaces and implementation without breaking go import cycles + +type sourceInterface interface { + auth.PasswordAuthenticator + auth.SynchronizableSource + models.SSHKeyProvider + models.LoginConfig + models.SkipVerifiable + models.HasTLSer + models.UseTLSer + models.LoginSourceSettable +} + +var _ (sourceInterface) = &ldap.Source{} diff --git a/services/auth/source/ldap/security_protocol.go b/services/auth/source/ldap/security_protocol.go new file mode 100644 index 000000000..bb0c7770a --- /dev/null +++ b/services/auth/source/ldap/security_protocol.go @@ -0,0 +1,32 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package ldap + +// SecurityProtocol protocol type +type SecurityProtocol int + +// Note: new type must be added at the end of list to maintain compatibility. +const ( + SecurityProtocolUnencrypted SecurityProtocol = iota + SecurityProtocolLDAPS + SecurityProtocolStartTLS +) + +// String returns the name of the SecurityProtocol +func (s SecurityProtocol) String() string { + return SecurityProtocolNames[s] +} + +// Int returns the int value of the SecurityProtocol +func (s SecurityProtocol) Int() int { + return int(s) +} + +// SecurityProtocolNames contains the name of SecurityProtocol values. +var SecurityProtocolNames = map[SecurityProtocol]string{ + SecurityProtocolUnencrypted: "Unencrypted", + SecurityProtocolLDAPS: "LDAPS", + SecurityProtocolStartTLS: "StartTLS", +} diff --git a/services/auth/source/ldap/source.go b/services/auth/source/ldap/source.go new file mode 100644 index 000000000..79f118f78 --- /dev/null +++ b/services/auth/source/ldap/source.go @@ -0,0 +1,118 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package ldap + +import ( + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" + "code.gitea.io/gitea/modules/secret" + "code.gitea.io/gitea/modules/setting" +) + +// .____ ________ _____ __________ +// | | \______ \ / _ \\______ \ +// | | | | \ / /_\ \| ___/ +// | |___ | ` \/ | \ | +// |_______ \/_______ /\____|__ /____| +// \/ \/ \/ + +// Package ldap provide functions & structure to query a LDAP ldap directory +// For now, it's mainly tested again an MS Active Directory service, see README.md for more information + +// Source Basic LDAP authentication service +type Source struct { + Name string // canonical name (ie. corporate.ad) + Host string // LDAP host + Port int // port number + SecurityProtocol SecurityProtocol + SkipVerify bool + BindDN string // DN to bind with + BindPasswordEncrypt string // Encrypted Bind BN password + BindPassword string // Bind DN password + UserBase string // Base search path for users + UserDN string // Template for the DN of the user for simple auth + AttributeUsername string // Username attribute + AttributeName string // First name attribute + AttributeSurname string // Surname attribute + AttributeMail string // E-mail attribute + AttributesInBind bool // fetch attributes in bind context (not user) + AttributeSSHPublicKey string // LDAP SSH Public Key attribute + SearchPageSize uint32 // Search with paging page size + Filter string // Query filter to validate entry + AdminFilter string // Query filter to check if user is admin + RestrictedFilter string // Query filter to check if user is restricted + Enabled bool // if this source is disabled + AllowDeactivateAll bool // Allow an empty search response to deactivate all users from this source + GroupsEnabled bool // if the group checking is enabled + GroupDN string // Group Search Base + GroupFilter string // Group Name Filter + GroupMemberUID string // Group Attribute containing array of UserUID + UserUID string // User Attribute listed in Group + + // reference to the loginSource + loginSource *models.LoginSource +} + +// FromDB fills up a LDAPConfig from serialized format. +func (source *Source) FromDB(bs []byte) error { + err := models.JSONUnmarshalHandleDoubleEncode(bs, &source) + if err != nil { + return err + } + if source.BindPasswordEncrypt != "" { + source.BindPassword, err = secret.DecryptSecret(setting.SecretKey, source.BindPasswordEncrypt) + source.BindPasswordEncrypt = "" + } + return err +} + +// ToDB exports a LDAPConfig to a serialized format. +func (source *Source) ToDB() ([]byte, error) { + var err error + source.BindPasswordEncrypt, err = secret.EncryptSecret(setting.SecretKey, source.BindPassword) + if err != nil { + return nil, err + } + source.BindPassword = "" + return json.Marshal(source) +} + +// SecurityProtocolName returns the name of configured security +// protocol. +func (source *Source) SecurityProtocolName() string { + return SecurityProtocolNames[source.SecurityProtocol] +} + +// IsSkipVerify returns if SkipVerify is set +func (source *Source) IsSkipVerify() bool { + return source.SkipVerify +} + +// HasTLS returns if HasTLS +func (source *Source) HasTLS() bool { + return source.SecurityProtocol > SecurityProtocolUnencrypted +} + +// UseTLS returns if UseTLS +func (source *Source) UseTLS() bool { + return source.SecurityProtocol != SecurityProtocolUnencrypted +} + +// ProvidesSSHKeys returns if this source provides SSH Keys +func (source *Source) ProvidesSSHKeys() bool { + return len(strings.TrimSpace(source.AttributeSSHPublicKey)) > 0 +} + +// SetLoginSource sets the related LoginSource +func (source *Source) SetLoginSource(loginSource *models.LoginSource) { + source.loginSource = loginSource +} + +func init() { + models.RegisterLoginTypeConfig(models.LoginLDAP, &Source{}) + models.RegisterLoginTypeConfig(models.LoginDLDAP, &Source{}) +} diff --git a/services/auth/source/ldap/source_authenticate.go b/services/auth/source/ldap/source_authenticate.go new file mode 100644 index 000000000..ecc95fbd5 --- /dev/null +++ b/services/auth/source/ldap/source_authenticate.go @@ -0,0 +1,99 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package ldap + +import ( + "fmt" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/mailer" +) + +// Authenticate queries if login/password is valid against the LDAP directory pool, +// and create a local user if success when enabled. +func (source *Source) Authenticate(user *models.User, login, password string) (*models.User, error) { + sr := source.SearchEntry(login, password, source.loginSource.Type == models.LoginDLDAP) + if sr == nil { + // User not in LDAP, do nothing + return nil, models.ErrUserNotExist{Name: login} + } + + isAttributeSSHPublicKeySet := len(strings.TrimSpace(source.AttributeSSHPublicKey)) > 0 + + // Update User admin flag if exist + if isExist, err := models.IsUserExist(0, sr.Username); err != nil { + return nil, err + } else if isExist { + if user == nil { + user, err = models.GetUserByName(sr.Username) + if err != nil { + return nil, err + } + } + if user != nil && !user.ProhibitLogin { + cols := make([]string, 0) + if len(source.AdminFilter) > 0 && user.IsAdmin != sr.IsAdmin { + // Change existing admin flag only if AdminFilter option is set + user.IsAdmin = sr.IsAdmin + cols = append(cols, "is_admin") + } + if !user.IsAdmin && len(source.RestrictedFilter) > 0 && user.IsRestricted != sr.IsRestricted { + // Change existing restricted flag only if RestrictedFilter option is set + user.IsRestricted = sr.IsRestricted + cols = append(cols, "is_restricted") + } + if len(cols) > 0 { + err = models.UpdateUserCols(user, cols...) + if err != nil { + return nil, err + } + } + } + } + + if user != nil { + if isAttributeSSHPublicKeySet && models.SynchronizePublicKeys(user, source.loginSource, sr.SSHPublicKey) { + return user, models.RewriteAllPublicKeys() + } + + return user, nil + } + + // Fallback. + if len(sr.Username) == 0 { + sr.Username = login + } + + if len(sr.Mail) == 0 { + sr.Mail = fmt.Sprintf("%s@localhost", sr.Username) + } + + user = &models.User{ + LowerName: strings.ToLower(sr.Username), + Name: sr.Username, + FullName: composeFullName(sr.Name, sr.Surname, sr.Username), + Email: sr.Mail, + LoginType: source.loginSource.Type, + LoginSource: source.loginSource.ID, + LoginName: login, + IsActive: true, + IsAdmin: sr.IsAdmin, + IsRestricted: sr.IsRestricted, + } + + err := models.CreateUser(user) + if err != nil { + return user, err + } + + mailer.SendRegisterNotifyMail(user) + + if isAttributeSSHPublicKeySet && models.AddPublicKeysBySource(user, source.loginSource, sr.SSHPublicKey) { + err = models.RewriteAllPublicKeys() + } + + return user, err +} diff --git a/services/auth/source/ldap/source_search.go b/services/auth/source/ldap/source_search.go new file mode 100644 index 000000000..f2acbb0d4 --- /dev/null +++ b/services/auth/source/ldap/source_search.go @@ -0,0 +1,446 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2020 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package ldap + +import ( + "crypto/tls" + "fmt" + "net" + "strconv" + "strings" + + "code.gitea.io/gitea/modules/log" + + "github.com/go-ldap/ldap/v3" +) + +// SearchResult : user data +type SearchResult struct { + Username string // Username + Name string // Name + Surname string // Surname + Mail string // E-mail address + SSHPublicKey []string // SSH Public Key + IsAdmin bool // if user is administrator + IsRestricted bool // if user is restricted +} + +func (ls *Source) sanitizedUserQuery(username string) (string, bool) { + // See http://tools.ietf.org/search/rfc4515 + badCharacters := "\x00()*\\" + if strings.ContainsAny(username, badCharacters) { + log.Debug("'%s' contains invalid query characters. Aborting.", username) + return "", false + } + + return fmt.Sprintf(ls.Filter, username), true +} + +func (ls *Source) sanitizedUserDN(username string) (string, bool) { + // See http://tools.ietf.org/search/rfc4514: "special characters" + badCharacters := "\x00()*\\,='\"#+;<>" + if strings.ContainsAny(username, badCharacters) { + log.Debug("'%s' contains invalid DN characters. Aborting.", username) + return "", false + } + + return fmt.Sprintf(ls.UserDN, username), true +} + +func (ls *Source) sanitizedGroupFilter(group string) (string, bool) { + // See http://tools.ietf.org/search/rfc4515 + badCharacters := "\x00*\\" + if strings.ContainsAny(group, badCharacters) { + log.Trace("Group filter invalid query characters: %s", group) + return "", false + } + + return group, true +} + +func (ls *Source) sanitizedGroupDN(groupDn string) (string, bool) { + // See http://tools.ietf.org/search/rfc4514: "special characters" + badCharacters := "\x00()*\\'\"#+;<>" + if strings.ContainsAny(groupDn, badCharacters) || strings.HasPrefix(groupDn, " ") || strings.HasSuffix(groupDn, " ") { + log.Trace("Group DN contains invalid query characters: %s", groupDn) + return "", false + } + + return groupDn, true +} + +func (ls *Source) findUserDN(l *ldap.Conn, name string) (string, bool) { + log.Trace("Search for LDAP user: %s", name) + + // A search for the user. + userFilter, ok := ls.sanitizedUserQuery(name) + if !ok { + return "", false + } + + log.Trace("Searching for DN using filter %s and base %s", userFilter, ls.UserBase) + search := ldap.NewSearchRequest( + ls.UserBase, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, + false, userFilter, []string{}, nil) + + // Ensure we found a user + sr, err := l.Search(search) + if err != nil || len(sr.Entries) < 1 { + log.Debug("Failed search using filter[%s]: %v", userFilter, err) + return "", false + } else if len(sr.Entries) > 1 { + log.Debug("Filter '%s' returned more than one user.", userFilter) + return "", false + } + + userDN := sr.Entries[0].DN + if userDN == "" { + log.Error("LDAP search was successful, but found no DN!") + return "", false + } + + return userDN, true +} + +func dial(source *Source) (*ldap.Conn, error) { + log.Trace("Dialing LDAP with security protocol (%v) without verifying: %v", source.SecurityProtocol, source.SkipVerify) + + tlsConfig := &tls.Config{ + ServerName: source.Host, + InsecureSkipVerify: source.SkipVerify, + } + + if source.SecurityProtocol == SecurityProtocolLDAPS { + return ldap.DialTLS("tcp", net.JoinHostPort(source.Host, strconv.Itoa(source.Port)), tlsConfig) + } + + conn, err := ldap.Dial("tcp", net.JoinHostPort(source.Host, strconv.Itoa(source.Port))) + if err != nil { + return nil, fmt.Errorf("error during Dial: %v", err) + } + + if source.SecurityProtocol == SecurityProtocolStartTLS { + if err = conn.StartTLS(tlsConfig); err != nil { + conn.Close() + return nil, fmt.Errorf("error during StartTLS: %v", err) + } + } + + return conn, nil +} + +func bindUser(l *ldap.Conn, userDN, passwd string) error { + log.Trace("Binding with userDN: %s", userDN) + err := l.Bind(userDN, passwd) + if err != nil { + log.Debug("LDAP auth. failed for %s, reason: %v", userDN, err) + return err + } + log.Trace("Bound successfully with userDN: %s", userDN) + return err +} + +func checkAdmin(l *ldap.Conn, ls *Source, userDN string) bool { + if len(ls.AdminFilter) == 0 { + return false + } + log.Trace("Checking admin with filter %s and base %s", ls.AdminFilter, userDN) + search := ldap.NewSearchRequest( + userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, ls.AdminFilter, + []string{ls.AttributeName}, + nil) + + sr, err := l.Search(search) + + if err != nil { + log.Error("LDAP Admin Search failed unexpectedly! (%v)", err) + } else if len(sr.Entries) < 1 { + log.Trace("LDAP Admin Search found no matching entries.") + } else { + return true + } + return false +} + +func checkRestricted(l *ldap.Conn, ls *Source, userDN string) bool { + if len(ls.RestrictedFilter) == 0 { + return false + } + if ls.RestrictedFilter == "*" { + return true + } + log.Trace("Checking restricted with filter %s and base %s", ls.RestrictedFilter, userDN) + search := ldap.NewSearchRequest( + userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, ls.RestrictedFilter, + []string{ls.AttributeName}, + nil) + + sr, err := l.Search(search) + + if err != nil { + log.Error("LDAP Restrictred Search failed unexpectedly! (%v)", err) + } else if len(sr.Entries) < 1 { + log.Trace("LDAP Restricted Search found no matching entries.") + } else { + return true + } + return false +} + +// SearchEntry : search an LDAP source if an entry (name, passwd) is valid and in the specific filter +func (ls *Source) SearchEntry(name, passwd string, directBind bool) *SearchResult { + // See https://tools.ietf.org/search/rfc4513#section-5.1.2 + if len(passwd) == 0 { + log.Debug("Auth. failed for %s, password cannot be empty", name) + return nil + } + l, err := dial(ls) + if err != nil { + log.Error("LDAP Connect error, %s:%v", ls.Host, err) + ls.Enabled = false + return nil + } + defer l.Close() + + var userDN string + if directBind { + log.Trace("LDAP will bind directly via UserDN template: %s", ls.UserDN) + + var ok bool + userDN, ok = ls.sanitizedUserDN(name) + + if !ok { + return nil + } + + err = bindUser(l, userDN, passwd) + if err != nil { + return nil + } + + if ls.UserBase != "" { + // not everyone has a CN compatible with input name so we need to find + // the real userDN in that case + + userDN, ok = ls.findUserDN(l, name) + if !ok { + return nil + } + } + } else { + log.Trace("LDAP will use BindDN.") + + var found bool + + if ls.BindDN != "" && ls.BindPassword != "" { + err := l.Bind(ls.BindDN, ls.BindPassword) + if err != nil { + log.Debug("Failed to bind as BindDN[%s]: %v", ls.BindDN, err) + return nil + } + log.Trace("Bound as BindDN %s", ls.BindDN) + } else { + log.Trace("Proceeding with anonymous LDAP search.") + } + + userDN, found = ls.findUserDN(l, name) + if !found { + return nil + } + } + + if !ls.AttributesInBind { + // binds user (checking password) before looking-up attributes in user context + err = bindUser(l, userDN, passwd) + if err != nil { + return nil + } + } + + userFilter, ok := ls.sanitizedUserQuery(name) + if !ok { + return nil + } + + var isAttributeSSHPublicKeySet = len(strings.TrimSpace(ls.AttributeSSHPublicKey)) > 0 + + attribs := []string{ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail} + if len(strings.TrimSpace(ls.UserUID)) > 0 { + attribs = append(attribs, ls.UserUID) + } + if isAttributeSSHPublicKeySet { + attribs = append(attribs, ls.AttributeSSHPublicKey) + } + + log.Trace("Fetching attributes '%v', '%v', '%v', '%v', '%v', '%v' with filter '%s' and base '%s'", ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail, ls.AttributeSSHPublicKey, ls.UserUID, userFilter, userDN) + search := ldap.NewSearchRequest( + userDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, userFilter, + attribs, nil) + + sr, err := l.Search(search) + if err != nil { + log.Error("LDAP Search failed unexpectedly! (%v)", err) + return nil + } else if len(sr.Entries) < 1 { + if directBind { + log.Trace("User filter inhibited user login.") + } else { + log.Trace("LDAP Search found no matching entries.") + } + + return nil + } + + var sshPublicKey []string + + username := sr.Entries[0].GetAttributeValue(ls.AttributeUsername) + firstname := sr.Entries[0].GetAttributeValue(ls.AttributeName) + surname := sr.Entries[0].GetAttributeValue(ls.AttributeSurname) + mail := sr.Entries[0].GetAttributeValue(ls.AttributeMail) + uid := sr.Entries[0].GetAttributeValue(ls.UserUID) + + // Check group membership + if ls.GroupsEnabled { + groupFilter, ok := ls.sanitizedGroupFilter(ls.GroupFilter) + if !ok { + return nil + } + groupDN, ok := ls.sanitizedGroupDN(ls.GroupDN) + if !ok { + return nil + } + + log.Trace("Fetching groups '%v' with filter '%s' and base '%s'", ls.GroupMemberUID, groupFilter, groupDN) + groupSearch := ldap.NewSearchRequest( + groupDN, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, groupFilter, + []string{ls.GroupMemberUID}, + nil) + + srg, err := l.Search(groupSearch) + if err != nil { + log.Error("LDAP group search failed: %v", err) + return nil + } else if len(srg.Entries) < 1 { + log.Error("LDAP group search failed: 0 entries") + return nil + } + + isMember := false + Entries: + for _, group := range srg.Entries { + for _, member := range group.GetAttributeValues(ls.GroupMemberUID) { + if (ls.UserUID == "dn" && member == sr.Entries[0].DN) || member == uid { + isMember = true + break Entries + } + } + } + + if !isMember { + log.Error("LDAP group membership test failed") + return nil + } + } + + if isAttributeSSHPublicKeySet { + sshPublicKey = sr.Entries[0].GetAttributeValues(ls.AttributeSSHPublicKey) + } + isAdmin := checkAdmin(l, ls, userDN) + var isRestricted bool + if !isAdmin { + isRestricted = checkRestricted(l, ls, userDN) + } + + if !directBind && ls.AttributesInBind { + // binds user (checking password) after looking-up attributes in BindDN context + err = bindUser(l, userDN, passwd) + if err != nil { + return nil + } + } + + return &SearchResult{ + Username: username, + Name: firstname, + Surname: surname, + Mail: mail, + SSHPublicKey: sshPublicKey, + IsAdmin: isAdmin, + IsRestricted: isRestricted, + } +} + +// UsePagedSearch returns if need to use paged search +func (ls *Source) UsePagedSearch() bool { + return ls.SearchPageSize > 0 +} + +// SearchEntries : search an LDAP source for all users matching userFilter +func (ls *Source) SearchEntries() ([]*SearchResult, error) { + l, err := dial(ls) + if err != nil { + log.Error("LDAP Connect error, %s:%v", ls.Host, err) + ls.Enabled = false + return nil, err + } + defer l.Close() + + if ls.BindDN != "" && ls.BindPassword != "" { + err := l.Bind(ls.BindDN, ls.BindPassword) + if err != nil { + log.Debug("Failed to bind as BindDN[%s]: %v", ls.BindDN, err) + return nil, err + } + log.Trace("Bound as BindDN %s", ls.BindDN) + } else { + log.Trace("Proceeding with anonymous LDAP search.") + } + + userFilter := fmt.Sprintf(ls.Filter, "*") + + var isAttributeSSHPublicKeySet = len(strings.TrimSpace(ls.AttributeSSHPublicKey)) > 0 + + attribs := []string{ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail} + if isAttributeSSHPublicKeySet { + attribs = append(attribs, ls.AttributeSSHPublicKey) + } + + log.Trace("Fetching attributes '%v', '%v', '%v', '%v', '%v' with filter %s and base %s", ls.AttributeUsername, ls.AttributeName, ls.AttributeSurname, ls.AttributeMail, ls.AttributeSSHPublicKey, userFilter, ls.UserBase) + search := ldap.NewSearchRequest( + ls.UserBase, ldap.ScopeWholeSubtree, ldap.NeverDerefAliases, 0, 0, false, userFilter, + attribs, nil) + + var sr *ldap.SearchResult + if ls.UsePagedSearch() { + sr, err = l.SearchWithPaging(search, ls.SearchPageSize) + } else { + sr, err = l.Search(search) + } + if err != nil { + log.Error("LDAP Search failed unexpectedly! (%v)", err) + return nil, err + } + + result := make([]*SearchResult, len(sr.Entries)) + + for i, v := range sr.Entries { + result[i] = &SearchResult{ + Username: v.GetAttributeValue(ls.AttributeUsername), + Name: v.GetAttributeValue(ls.AttributeName), + Surname: v.GetAttributeValue(ls.AttributeSurname), + Mail: v.GetAttributeValue(ls.AttributeMail), + IsAdmin: checkAdmin(l, ls, v.DN), + } + if !result[i].IsAdmin { + result[i].IsRestricted = checkRestricted(l, ls, v.DN) + } + if isAttributeSSHPublicKeySet { + result[i].SSHPublicKey = v.GetAttributeValues(ls.AttributeSSHPublicKey) + } + } + + return result, nil +} diff --git a/services/auth/source/ldap/source_sync.go b/services/auth/source/ldap/source_sync.go new file mode 100644 index 000000000..7e4088e57 --- /dev/null +++ b/services/auth/source/ldap/source_sync.go @@ -0,0 +1,184 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package ldap + +import ( + "context" + "fmt" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" +) + +// Sync causes this ldap source to synchronize its users with the db +func (source *Source) Sync(ctx context.Context, updateExisting bool) error { + log.Trace("Doing: SyncExternalUsers[%s]", source.loginSource.Name) + + var existingUsers []int64 + isAttributeSSHPublicKeySet := len(strings.TrimSpace(source.AttributeSSHPublicKey)) > 0 + var sshKeysNeedUpdate bool + + // Find all users with this login type - FIXME: Should this be an iterator? + users, err := models.GetUsersBySource(source.loginSource) + if err != nil { + log.Error("SyncExternalUsers: %v", err) + return err + } + select { + case <-ctx.Done(): + log.Warn("SyncExternalUsers: Cancelled before update of %s", source.loginSource.Name) + return models.ErrCancelledf("Before update of %s", source.loginSource.Name) + default: + } + + sr, err := source.SearchEntries() + if err != nil { + log.Error("SyncExternalUsers LDAP source failure [%s], skipped", source.loginSource.Name) + return nil + } + + if len(sr) == 0 { + if !source.AllowDeactivateAll { + log.Error("LDAP search found no entries but did not report an error. Refusing to deactivate all users") + return nil + } + log.Warn("LDAP search found no entries but did not report an error. All users will be deactivated as per settings") + } + + for _, su := range sr { + select { + case <-ctx.Done(): + log.Warn("SyncExternalUsers: Cancelled at update of %s before completed update of users", source.loginSource.Name) + // Rewrite authorized_keys file if LDAP Public SSH Key attribute is set and any key was added or removed + if sshKeysNeedUpdate { + err = models.RewriteAllPublicKeys() + if err != nil { + log.Error("RewriteAllPublicKeys: %v", err) + } + } + return models.ErrCancelledf("During update of %s before completed update of users", source.loginSource.Name) + default: + } + if len(su.Username) == 0 { + continue + } + + if len(su.Mail) == 0 { + su.Mail = fmt.Sprintf("%s@localhost", su.Username) + } + + var usr *models.User + // Search for existing user + for _, du := range users { + if du.LowerName == strings.ToLower(su.Username) { + usr = du + break + } + } + + fullName := composeFullName(su.Name, su.Surname, su.Username) + // If no existing user found, create one + if usr == nil { + log.Trace("SyncExternalUsers[%s]: Creating user %s", source.loginSource.Name, su.Username) + + usr = &models.User{ + LowerName: strings.ToLower(su.Username), + Name: su.Username, + FullName: fullName, + LoginType: source.loginSource.Type, + LoginSource: source.loginSource.ID, + LoginName: su.Username, + Email: su.Mail, + IsAdmin: su.IsAdmin, + IsRestricted: su.IsRestricted, + IsActive: true, + } + + err = models.CreateUser(usr) + + if err != nil { + log.Error("SyncExternalUsers[%s]: Error creating user %s: %v", source.loginSource.Name, su.Username, err) + } else if isAttributeSSHPublicKeySet { + log.Trace("SyncExternalUsers[%s]: Adding LDAP Public SSH Keys for user %s", source.loginSource.Name, usr.Name) + if models.AddPublicKeysBySource(usr, source.loginSource, su.SSHPublicKey) { + sshKeysNeedUpdate = true + } + } + } else if updateExisting { + existingUsers = append(existingUsers, usr.ID) + + // Synchronize SSH Public Key if that attribute is set + if isAttributeSSHPublicKeySet && models.SynchronizePublicKeys(usr, source.loginSource, su.SSHPublicKey) { + sshKeysNeedUpdate = true + } + + // Check if user data has changed + if (len(source.AdminFilter) > 0 && usr.IsAdmin != su.IsAdmin) || + (len(source.RestrictedFilter) > 0 && usr.IsRestricted != su.IsRestricted) || + !strings.EqualFold(usr.Email, su.Mail) || + usr.FullName != fullName || + !usr.IsActive { + + log.Trace("SyncExternalUsers[%s]: Updating user %s", source.loginSource.Name, usr.Name) + + usr.FullName = fullName + usr.Email = su.Mail + // Change existing admin flag only if AdminFilter option is set + if len(source.AdminFilter) > 0 { + usr.IsAdmin = su.IsAdmin + } + // Change existing restricted flag only if RestrictedFilter option is set + if !usr.IsAdmin && len(source.RestrictedFilter) > 0 { + usr.IsRestricted = su.IsRestricted + } + usr.IsActive = true + + err = models.UpdateUserCols(usr, "full_name", "email", "is_admin", "is_restricted", "is_active") + if err != nil { + log.Error("SyncExternalUsers[%s]: Error updating user %s: %v", source.loginSource.Name, usr.Name, err) + } + } + } + } + + // Rewrite authorized_keys file if LDAP Public SSH Key attribute is set and any key was added or removed + if sshKeysNeedUpdate { + err = models.RewriteAllPublicKeys() + if err != nil { + log.Error("RewriteAllPublicKeys: %v", err) + } + } + + select { + case <-ctx.Done(): + log.Warn("SyncExternalUsers: Cancelled during update of %s before delete users", source.loginSource.Name) + return models.ErrCancelledf("During update of %s before delete users", source.loginSource.Name) + default: + } + + // Deactivate users not present in LDAP + if updateExisting { + for _, usr := range users { + found := false + for _, uid := range existingUsers { + if usr.ID == uid { + found = true + break + } + } + if !found { + log.Trace("SyncExternalUsers[%s]: Deactivating user %s", source.loginSource.Name, usr.Name) + + usr.IsActive = false + err = models.UpdateUserCols(usr, "is_active") + if err != nil { + log.Error("SyncExternalUsers[%s]: Error deactivating user %s: %v", source.loginSource.Name, usr.Name, err) + } + } + } + } + return nil +} diff --git a/services/auth/source/ldap/util.go b/services/auth/source/ldap/util.go new file mode 100644 index 000000000..f27de37c8 --- /dev/null +++ b/services/auth/source/ldap/util.go @@ -0,0 +1,19 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package ldap + +// composeFullName composes a firstname surname or username +func composeFullName(firstname, surname, username string) string { + switch { + case len(firstname) == 0 && len(surname) == 0: + return username + case len(firstname) == 0: + return surname + case len(surname) == 0: + return firstname + default: + return firstname + " " + surname + } +} diff --git a/services/auth/source/oauth2/assert_interface_test.go b/services/auth/source/oauth2/assert_interface_test.go new file mode 100644 index 000000000..4157427ff --- /dev/null +++ b/services/auth/source/oauth2/assert_interface_test.go @@ -0,0 +1,23 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2_test + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/oauth2" +) + +// This test file exists to assert that our Source exposes the interfaces that we expect +// It tightly binds the interfaces and implementation without breaking go import cycles + +type sourceInterface interface { + models.LoginConfig + models.LoginSourceSettable + models.RegisterableSource + auth.PasswordAuthenticator +} + +var _ (sourceInterface) = &oauth2.Source{} diff --git a/services/auth/source/oauth2/init.go b/services/auth/source/oauth2/init.go new file mode 100644 index 000000000..64328aa38 --- /dev/null +++ b/services/auth/source/oauth2/init.go @@ -0,0 +1,88 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "net/http" + "sync" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + + "github.com/google/uuid" + "github.com/markbates/goth/gothic" +) + +var gothRWMutex = sync.RWMutex{} + +// SessionTableName is the table name that OAuth2 will use to store things +const SessionTableName = "oauth2_session" + +// UsersStoreKey is the key for the store +const UsersStoreKey = "gitea-oauth2-sessions" + +// ProviderHeaderKey is the HTTP header key +const ProviderHeaderKey = "gitea-oauth2-provider" + +// Init initializes the oauth source +func Init() error { + if err := InitSigningKey(); err != nil { + return err + } + + store, err := models.CreateStore(SessionTableName, UsersStoreKey) + if err != nil { + return err + } + + // according to the Goth lib: + // set the maxLength of the cookies stored on the disk to a larger number to prevent issues with: + // securecookie: the value is too long + // when using OpenID Connect , since this can contain a large amount of extra information in the id_token + + // Note, when using the FilesystemStore only the session.ID is written to a browser cookie, so this is explicit for the storage on disk + store.MaxLength(setting.OAuth2.MaxTokenLength) + + // Lock our mutex + gothRWMutex.Lock() + + gothic.Store = store + + gothic.SetState = func(req *http.Request) string { + return uuid.New().String() + } + + gothic.GetProviderName = func(req *http.Request) (string, error) { + return req.Header.Get(ProviderHeaderKey), nil + } + + // Unlock our mutex + gothRWMutex.Unlock() + + return initOAuth2LoginSources() +} + +// ResetOAuth2 clears existing OAuth2 providers and loads them from DB +func ResetOAuth2() error { + ClearProviders() + return initOAuth2LoginSources() +} + +// initOAuth2LoginSources is used to load and register all active OAuth2 providers +func initOAuth2LoginSources() error { + loginSources, _ := models.GetActiveOAuth2ProviderLoginSources() + for _, source := range loginSources { + oauth2Source, ok := source.Cfg.(*Source) + if !ok { + continue + } + err := oauth2Source.RegisterSource() + if err != nil { + log.Critical("Unable to register source: %s due to Error: %v.", source.Name, err) + } + } + return nil +} diff --git a/services/auth/source/oauth2/jwtsigningkey.go b/services/auth/source/oauth2/jwtsigningkey.go new file mode 100644 index 000000000..720a9a33f --- /dev/null +++ b/services/auth/source/oauth2/jwtsigningkey.go @@ -0,0 +1,445 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "crypto/ecdsa" + "crypto/ed25519" + "crypto/elliptic" + "crypto/rand" + "crypto/rsa" + "crypto/sha256" + "crypto/x509" + "encoding/base64" + "encoding/pem" + "fmt" + "io/ioutil" + "math/big" + "os" + "path/filepath" + "strings" + + "code.gitea.io/gitea/modules/generate" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/util" + + "github.com/golang-jwt/jwt" + ini "gopkg.in/ini.v1" +) + +// ErrInvalidAlgorithmType represents an invalid algorithm error. +type ErrInvalidAlgorithmType struct { + Algorightm string +} + +func (err ErrInvalidAlgorithmType) Error() string { + return fmt.Sprintf("JWT signing algorithm is not supported: %s", err.Algorightm) +} + +// JWTSigningKey represents a algorithm/key pair to sign JWTs +type JWTSigningKey interface { + IsSymmetric() bool + SigningMethod() jwt.SigningMethod + SignKey() interface{} + VerifyKey() interface{} + ToJWK() (map[string]string, error) + PreProcessToken(*jwt.Token) +} + +type hmacSigningKey struct { + signingMethod jwt.SigningMethod + secret []byte +} + +func (key hmacSigningKey) IsSymmetric() bool { + return true +} + +func (key hmacSigningKey) SigningMethod() jwt.SigningMethod { + return key.signingMethod +} + +func (key hmacSigningKey) SignKey() interface{} { + return key.secret +} + +func (key hmacSigningKey) VerifyKey() interface{} { + return key.secret +} + +func (key hmacSigningKey) ToJWK() (map[string]string, error) { + return map[string]string{ + "kty": "oct", + "alg": key.SigningMethod().Alg(), + }, nil +} + +func (key hmacSigningKey) PreProcessToken(*jwt.Token) {} + +type rsaSingingKey struct { + signingMethod jwt.SigningMethod + key *rsa.PrivateKey + id string +} + +func newRSASingingKey(signingMethod jwt.SigningMethod, key *rsa.PrivateKey) (rsaSingingKey, error) { + kid, err := createPublicKeyFingerprint(key.Public().(*rsa.PublicKey)) + if err != nil { + return rsaSingingKey{}, err + } + + return rsaSingingKey{ + signingMethod, + key, + base64.RawURLEncoding.EncodeToString(kid), + }, nil +} + +func (key rsaSingingKey) IsSymmetric() bool { + return false +} + +func (key rsaSingingKey) SigningMethod() jwt.SigningMethod { + return key.signingMethod +} + +func (key rsaSingingKey) SignKey() interface{} { + return key.key +} + +func (key rsaSingingKey) VerifyKey() interface{} { + return key.key.Public() +} + +func (key rsaSingingKey) ToJWK() (map[string]string, error) { + pubKey := key.key.Public().(*rsa.PublicKey) + + return map[string]string{ + "kty": "RSA", + "alg": key.SigningMethod().Alg(), + "kid": key.id, + "e": base64.RawURLEncoding.EncodeToString(big.NewInt(int64(pubKey.E)).Bytes()), + "n": base64.RawURLEncoding.EncodeToString(pubKey.N.Bytes()), + }, nil +} + +func (key rsaSingingKey) PreProcessToken(token *jwt.Token) { + token.Header["kid"] = key.id +} + +type eddsaSigningKey struct { + signingMethod jwt.SigningMethod + key ed25519.PrivateKey + id string +} + +func newEdDSASingingKey(signingMethod jwt.SigningMethod, key ed25519.PrivateKey) (eddsaSigningKey, error) { + kid, err := createPublicKeyFingerprint(key.Public().(ed25519.PublicKey)) + if err != nil { + return eddsaSigningKey{}, err + } + + return eddsaSigningKey{ + signingMethod, + key, + base64.RawURLEncoding.EncodeToString(kid), + }, nil +} + +func (key eddsaSigningKey) IsSymmetric() bool { + return false +} + +func (key eddsaSigningKey) SigningMethod() jwt.SigningMethod { + return key.signingMethod +} + +func (key eddsaSigningKey) SignKey() interface{} { + return key.key +} + +func (key eddsaSigningKey) VerifyKey() interface{} { + return key.key.Public() +} + +func (key eddsaSigningKey) ToJWK() (map[string]string, error) { + pubKey := key.key.Public().(ed25519.PublicKey) + + return map[string]string{ + "alg": key.SigningMethod().Alg(), + "kid": key.id, + "kty": "OKP", + "crv": "Ed25519", + "x": base64.RawURLEncoding.EncodeToString(pubKey), + }, nil +} + +func (key eddsaSigningKey) PreProcessToken(token *jwt.Token) { + token.Header["kid"] = key.id +} + +type ecdsaSingingKey struct { + signingMethod jwt.SigningMethod + key *ecdsa.PrivateKey + id string +} + +func newECDSASingingKey(signingMethod jwt.SigningMethod, key *ecdsa.PrivateKey) (ecdsaSingingKey, error) { + kid, err := createPublicKeyFingerprint(key.Public().(*ecdsa.PublicKey)) + if err != nil { + return ecdsaSingingKey{}, err + } + + return ecdsaSingingKey{ + signingMethod, + key, + base64.RawURLEncoding.EncodeToString(kid), + }, nil +} + +func (key ecdsaSingingKey) IsSymmetric() bool { + return false +} + +func (key ecdsaSingingKey) SigningMethod() jwt.SigningMethod { + return key.signingMethod +} + +func (key ecdsaSingingKey) SignKey() interface{} { + return key.key +} + +func (key ecdsaSingingKey) VerifyKey() interface{} { + return key.key.Public() +} + +func (key ecdsaSingingKey) ToJWK() (map[string]string, error) { + pubKey := key.key.Public().(*ecdsa.PublicKey) + + return map[string]string{ + "kty": "EC", + "alg": key.SigningMethod().Alg(), + "kid": key.id, + "crv": pubKey.Params().Name, + "x": base64.RawURLEncoding.EncodeToString(pubKey.X.Bytes()), + "y": base64.RawURLEncoding.EncodeToString(pubKey.Y.Bytes()), + }, nil +} + +func (key ecdsaSingingKey) PreProcessToken(token *jwt.Token) { + token.Header["kid"] = key.id +} + +// createPublicKeyFingerprint creates a fingerprint of the given key. +// The fingerprint is the sha256 sum of the PKIX structure of the key. +func createPublicKeyFingerprint(key interface{}) ([]byte, error) { + bytes, err := x509.MarshalPKIXPublicKey(key) + if err != nil { + return nil, err + } + + checksum := sha256.Sum256(bytes) + + return checksum[:], nil +} + +// CreateJWTSigningKey creates a signing key from an algorithm / key pair. +func CreateJWTSigningKey(algorithm string, key interface{}) (JWTSigningKey, error) { + var signingMethod jwt.SigningMethod + switch algorithm { + case "HS256": + signingMethod = jwt.SigningMethodHS256 + case "HS384": + signingMethod = jwt.SigningMethodHS384 + case "HS512": + signingMethod = jwt.SigningMethodHS512 + + case "RS256": + signingMethod = jwt.SigningMethodRS256 + case "RS384": + signingMethod = jwt.SigningMethodRS384 + case "RS512": + signingMethod = jwt.SigningMethodRS512 + + case "ES256": + signingMethod = jwt.SigningMethodES256 + case "ES384": + signingMethod = jwt.SigningMethodES384 + case "ES512": + signingMethod = jwt.SigningMethodES512 + case "EdDSA": + signingMethod = jwt.SigningMethodEdDSA + default: + return nil, ErrInvalidAlgorithmType{algorithm} + } + + switch signingMethod.(type) { + case *jwt.SigningMethodEd25519: + privateKey, ok := key.(ed25519.PrivateKey) + if !ok { + return nil, jwt.ErrInvalidKeyType + } + return newEdDSASingingKey(signingMethod, privateKey) + case *jwt.SigningMethodECDSA: + privateKey, ok := key.(*ecdsa.PrivateKey) + if !ok { + return nil, jwt.ErrInvalidKeyType + } + return newECDSASingingKey(signingMethod, privateKey) + case *jwt.SigningMethodRSA: + privateKey, ok := key.(*rsa.PrivateKey) + if !ok { + return nil, jwt.ErrInvalidKeyType + } + return newRSASingingKey(signingMethod, privateKey) + default: + secret, ok := key.([]byte) + if !ok { + return nil, jwt.ErrInvalidKeyType + } + return hmacSigningKey{signingMethod, secret}, nil + } +} + +// DefaultSigningKey is the default signing key for JWTs. +var DefaultSigningKey JWTSigningKey + +// InitSigningKey creates the default signing key from settings or creates a random key. +func InitSigningKey() error { + var err error + var key interface{} + + switch setting.OAuth2.JWTSigningAlgorithm { + case "HS256": + fallthrough + case "HS384": + fallthrough + case "HS512": + key, err = loadOrCreateSymmetricKey() + + case "RS256": + fallthrough + case "RS384": + fallthrough + case "RS512": + fallthrough + case "ES256": + fallthrough + case "ES384": + fallthrough + case "ES512": + fallthrough + case "EdDSA": + key, err = loadOrCreateAsymmetricKey() + + default: + return ErrInvalidAlgorithmType{setting.OAuth2.JWTSigningAlgorithm} + } + + if err != nil { + return fmt.Errorf("Error while loading or creating JWT key: %v", err) + } + + signingKey, err := CreateJWTSigningKey(setting.OAuth2.JWTSigningAlgorithm, key) + if err != nil { + return err + } + + DefaultSigningKey = signingKey + + return nil +} + +// loadOrCreateSymmetricKey checks if the configured secret is valid. +// If it is not valid a new secret is created and saved in the configuration file. +func loadOrCreateSymmetricKey() (interface{}, error) { + key := make([]byte, 32) + n, err := base64.RawURLEncoding.Decode(key, []byte(setting.OAuth2.JWTSecretBase64)) + if err != nil || n != 32 { + key, err = generate.NewJwtSecret() + if err != nil { + log.Fatal("error generating JWT secret: %v", err) + return nil, err + } + + setting.CreateOrAppendToCustomConf(func(cfg *ini.File) { + secretBase64 := base64.RawURLEncoding.EncodeToString(key) + cfg.Section("oauth2").Key("JWT_SECRET").SetValue(secretBase64) + }) + } + + return key, nil +} + +// loadOrCreateAsymmetricKey checks if the configured private key exists. +// If it does not exist a new random key gets generated and saved on the configured path. +func loadOrCreateAsymmetricKey() (interface{}, error) { + keyPath := setting.OAuth2.JWTSigningPrivateKeyFile + + isExist, err := util.IsExist(keyPath) + if err != nil { + log.Fatal("Unable to check if %s exists. Error: %v", keyPath, err) + } + if !isExist { + err := func() error { + key, err := func() (interface{}, error) { + switch { + case strings.HasPrefix(setting.OAuth2.JWTSigningAlgorithm, "RS"): + return rsa.GenerateKey(rand.Reader, 4096) + case setting.OAuth2.JWTSigningAlgorithm == "EdDSA": + _, pk, err := ed25519.GenerateKey(rand.Reader) + return pk, err + default: + return ecdsa.GenerateKey(elliptic.P256(), rand.Reader) + } + }() + if err != nil { + return err + } + + bytes, err := x509.MarshalPKCS8PrivateKey(key) + if err != nil { + return err + } + + privateKeyPEM := &pem.Block{Type: "PRIVATE KEY", Bytes: bytes} + + if err := os.MkdirAll(filepath.Dir(keyPath), os.ModePerm); err != nil { + return err + } + + f, err := os.OpenFile(keyPath, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0600) + if err != nil { + return err + } + defer func() { + if err = f.Close(); err != nil { + log.Error("Close: %v", err) + } + }() + + return pem.Encode(f, privateKeyPEM) + }() + if err != nil { + log.Fatal("Error generating private key: %v", err) + return nil, err + } + } + + bytes, err := ioutil.ReadFile(keyPath) + if err != nil { + return nil, err + } + + block, _ := pem.Decode(bytes) + if block == nil { + return nil, fmt.Errorf("no valid PEM data found in %s", keyPath) + } else if block.Type != "PRIVATE KEY" { + return nil, fmt.Errorf("expected PRIVATE KEY, got %s in %s", block.Type, keyPath) + } + + return x509.ParsePKCS8PrivateKey(block.Bytes) +} diff --git a/services/auth/source/oauth2/providers.go b/services/auth/source/oauth2/providers.go new file mode 100644 index 000000000..2196e3049 --- /dev/null +++ b/services/auth/source/oauth2/providers.go @@ -0,0 +1,164 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "net/url" + "sort" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + + "github.com/markbates/goth" +) + +// Provider is an interface for describing a single OAuth2 provider +type Provider interface { + Name() string + DisplayName() string + Image() string + CustomURLSettings() *CustomURLSettings +} + +// GothProviderCreator provides a function to create a goth.Provider +type GothProviderCreator interface { + CreateGothProvider(providerName, callbackURL string, source *Source) (goth.Provider, error) +} + +// GothProvider is an interface for describing a single OAuth2 provider +type GothProvider interface { + Provider + GothProviderCreator +} + +// ImagedProvider provide an overrided image setting for the provider +type ImagedProvider struct { + GothProvider + image string +} + +// Image returns the image path for this provider +func (i *ImagedProvider) Image() string { + return i.image +} + +// NewImagedProvider is a constructor function for the ImagedProvider +func NewImagedProvider(image string, provider GothProvider) *ImagedProvider { + return &ImagedProvider{ + GothProvider: provider, + image: image, + } +} + +// Providers contains the map of registered OAuth2 providers in Gitea (based on goth) +// key is used to map the OAuth2Provider with the goth provider type (also in LoginSource.OAuth2Config.Provider) +// value is used to store display data +var gothProviders = map[string]GothProvider{} + +// RegisterGothProvider registers a GothProvider +func RegisterGothProvider(provider GothProvider) { + if _, has := gothProviders[provider.Name()]; has { + log.Fatal("Duplicate oauth2provider type provided: %s", provider.Name()) + } + gothProviders[provider.Name()] = provider +} + +// GetOAuth2Providers returns the map of unconfigured OAuth2 providers +// key is used as technical name (like in the callbackURL) +// values to display +func GetOAuth2Providers() []Provider { + providers := make([]Provider, 0, len(gothProviders)) + + for _, provider := range gothProviders { + providers = append(providers, provider) + } + sort.Slice(providers, func(i, j int) bool { + return providers[i].Name() < providers[j].Name() + }) + return providers +} + +// GetActiveOAuth2Providers returns the map of configured active OAuth2 providers +// key is used as technical name (like in the callbackURL) +// values to display +func GetActiveOAuth2Providers() ([]string, map[string]Provider, error) { + // Maybe also separate used and unused providers so we can force the registration of only 1 active provider for each type + + loginSources, err := models.GetActiveOAuth2ProviderLoginSources() + if err != nil { + return nil, nil, err + } + + var orderedKeys []string + providers := make(map[string]Provider) + for _, source := range loginSources { + prov := gothProviders[source.Cfg.(*Source).Provider] + if source.Cfg.(*Source).IconURL != "" { + prov = &ImagedProvider{prov, source.Cfg.(*Source).IconURL} + } + providers[source.Name] = prov + orderedKeys = append(orderedKeys, source.Name) + } + + sort.Strings(orderedKeys) + + return orderedKeys, providers, nil +} + +// RegisterProviderWithGothic register a OAuth2 provider in goth lib +func RegisterProviderWithGothic(providerName string, source *Source) error { + provider, err := createProvider(providerName, source) + + if err == nil && provider != nil { + gothRWMutex.Lock() + defer gothRWMutex.Unlock() + + goth.UseProviders(provider) + } + + return err +} + +// RemoveProviderFromGothic removes the given OAuth2 provider from the goth lib +func RemoveProviderFromGothic(providerName string) { + gothRWMutex.Lock() + defer gothRWMutex.Unlock() + + delete(goth.GetProviders(), providerName) +} + +// ClearProviders clears all OAuth2 providers from the goth lib +func ClearProviders() { + gothRWMutex.Lock() + defer gothRWMutex.Unlock() + + goth.ClearProviders() +} + +// used to create different types of goth providers +func createProvider(providerName string, source *Source) (goth.Provider, error) { + callbackURL := setting.AppURL + "user/oauth2/" + url.PathEscape(providerName) + "/callback" + + var provider goth.Provider + var err error + + p, ok := gothProviders[source.Provider] + if !ok { + return nil, models.ErrLoginSourceNotActived + } + + provider, err = p.CreateGothProvider(providerName, callbackURL, source) + if err != nil { + return provider, err + } + + // always set the name if provider is created so we can support multiple setups of 1 provider + if err == nil && provider != nil { + provider.SetName(providerName) + } + + return provider, err +} diff --git a/services/auth/source/oauth2/providers_base.go b/services/auth/source/oauth2/providers_base.go new file mode 100644 index 000000000..b6b6d0bbd --- /dev/null +++ b/services/auth/source/oauth2/providers_base.go @@ -0,0 +1,33 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +// BaseProvider represents a common base for Provider +type BaseProvider struct { + name string + displayName string +} + +// Name provides the technical name for this provider +func (b *BaseProvider) Name() string { + return b.name +} + +// DisplayName returns the friendly name for this provider +func (b *BaseProvider) DisplayName() string { + return b.displayName +} + +// Image returns an image path for this provider +func (b *BaseProvider) Image() string { + return "/assets/img/auth/" + b.name + ".png" +} + +// CustomURLSettings returns the custom url settings for this provider +func (b *BaseProvider) CustomURLSettings() *CustomURLSettings { + return nil +} + +var _ (Provider) = &BaseProvider{} diff --git a/services/auth/source/oauth2/providers_custom.go b/services/auth/source/oauth2/providers_custom.go new file mode 100644 index 000000000..f2cff131f --- /dev/null +++ b/services/auth/source/oauth2/providers_custom.go @@ -0,0 +1,118 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "code.gitea.io/gitea/modules/setting" + + "github.com/markbates/goth" + "github.com/markbates/goth/providers/azureadv2" + "github.com/markbates/goth/providers/gitea" + "github.com/markbates/goth/providers/github" + "github.com/markbates/goth/providers/gitlab" + "github.com/markbates/goth/providers/mastodon" + "github.com/markbates/goth/providers/nextcloud" +) + +// CustomProviderNewFn creates a goth.Provider using a custom url mapping +type CustomProviderNewFn func(clientID, secret, callbackURL string, custom *CustomURLMapping) (goth.Provider, error) + +// CustomProvider is a GothProvider that has CustomURL features +type CustomProvider struct { + BaseProvider + customURLSettings *CustomURLSettings + newFn CustomProviderNewFn +} + +// CustomURLSettings returns the CustomURLSettings for this provider +func (c *CustomProvider) CustomURLSettings() *CustomURLSettings { + return c.customURLSettings +} + +// CreateGothProvider creates a GothProvider from this Provider +func (c *CustomProvider) CreateGothProvider(providerName, callbackURL string, source *Source) (goth.Provider, error) { + custom := c.customURLSettings.OverrideWith(source.CustomURLMapping) + + return c.newFn(source.ClientID, source.ClientSecret, callbackURL, custom) +} + +// NewCustomProvider is a constructor function for custom providers +func NewCustomProvider(name, displayName string, customURLSetting *CustomURLSettings, newFn CustomProviderNewFn) *CustomProvider { + return &CustomProvider{ + BaseProvider: BaseProvider{ + name: name, + displayName: displayName, + }, + customURLSettings: customURLSetting, + newFn: newFn, + } +} + +var _ (GothProvider) = &CustomProvider{} + +func init() { + RegisterGothProvider(NewCustomProvider( + "github", "GitHub", &CustomURLSettings{ + TokenURL: availableAttribute(github.TokenURL), + AuthURL: availableAttribute(github.AuthURL), + ProfileURL: availableAttribute(github.ProfileURL), + EmailURL: availableAttribute(github.EmailURL), + }, + func(clientID, secret, callbackURL string, custom *CustomURLMapping) (goth.Provider, error) { + scopes := []string{} + if setting.OAuth2Client.EnableAutoRegistration { + scopes = append(scopes, "user:email") + } + return github.NewCustomisedURL(clientID, secret, callbackURL, custom.AuthURL, custom.TokenURL, custom.ProfileURL, custom.EmailURL, scopes...), nil + })) + + RegisterGothProvider(NewCustomProvider( + "gitlab", "GitLab", &CustomURLSettings{ + AuthURL: availableAttribute(gitlab.AuthURL), + TokenURL: availableAttribute(gitlab.TokenURL), + ProfileURL: availableAttribute(gitlab.ProfileURL), + }, func(clientID, secret, callbackURL string, custom *CustomURLMapping) (goth.Provider, error) { + return gitlab.NewCustomisedURL(clientID, secret, callbackURL, custom.AuthURL, custom.TokenURL, custom.ProfileURL, "read_user"), nil + })) + + RegisterGothProvider(NewCustomProvider( + "gitea", "Gitea", &CustomURLSettings{ + TokenURL: requiredAttribute(gitea.TokenURL), + AuthURL: requiredAttribute(gitea.AuthURL), + ProfileURL: requiredAttribute(gitea.ProfileURL), + }, + func(clientID, secret, callbackURL string, custom *CustomURLMapping) (goth.Provider, error) { + return gitea.NewCustomisedURL(clientID, secret, callbackURL, custom.AuthURL, custom.TokenURL, custom.ProfileURL), nil + })) + + RegisterGothProvider(NewCustomProvider( + "nextcloud", "Nextcloud", &CustomURLSettings{ + TokenURL: requiredAttribute(nextcloud.TokenURL), + AuthURL: requiredAttribute(nextcloud.AuthURL), + ProfileURL: requiredAttribute(nextcloud.ProfileURL), + }, + func(clientID, secret, callbackURL string, custom *CustomURLMapping) (goth.Provider, error) { + return nextcloud.NewCustomisedURL(clientID, secret, callbackURL, custom.AuthURL, custom.TokenURL, custom.ProfileURL), nil + })) + + RegisterGothProvider(NewCustomProvider( + "mastodon", "Mastodon", &CustomURLSettings{ + AuthURL: requiredAttribute(mastodon.InstanceURL), + }, + func(clientID, secret, callbackURL string, custom *CustomURLMapping) (goth.Provider, error) { + return mastodon.NewCustomisedURL(clientID, secret, callbackURL, custom.AuthURL), nil + })) + + RegisterGothProvider(NewCustomProvider( + "azureadv2", "Azure AD v2", &CustomURLSettings{ + Tenant: requiredAttribute("organizations"), + }, + func(clientID, secret, callbackURL string, custom *CustomURLMapping) (goth.Provider, error) { + return azureadv2.New(clientID, secret, callbackURL, azureadv2.ProviderOptions{ + Tenant: azureadv2.TenantType(custom.Tenant), + }), nil + }, + )) +} diff --git a/services/auth/source/oauth2/providers_openid.go b/services/auth/source/oauth2/providers_openid.go new file mode 100644 index 000000000..7c3836503 --- /dev/null +++ b/services/auth/source/oauth2/providers_openid.go @@ -0,0 +1,52 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + + "github.com/markbates/goth" + "github.com/markbates/goth/providers/openidConnect" +) + +// OpenIDProvider is a GothProvider for OpenID +type OpenIDProvider struct { +} + +// Name provides the technical name for this provider +func (o *OpenIDProvider) Name() string { + return "openidConnect" +} + +// DisplayName returns the friendly name for this provider +func (o *OpenIDProvider) DisplayName() string { + return "OpenID Connect" +} + +// Image returns an image path for this provider +func (o *OpenIDProvider) Image() string { + return "/assets/img/auth/openid_connect.svg" +} + +// CreateGothProvider creates a GothProvider from this Provider +func (o *OpenIDProvider) CreateGothProvider(providerName, callbackURL string, source *Source) (goth.Provider, error) { + provider, err := openidConnect.New(source.ClientID, source.ClientSecret, callbackURL, source.OpenIDConnectAutoDiscoveryURL, setting.OAuth2Client.OpenIDConnectScopes...) + if err != nil { + log.Warn("Failed to create OpenID Connect Provider with name '%s' with url '%s': %v", providerName, source.OpenIDConnectAutoDiscoveryURL, err) + } + return provider, err +} + +// CustomURLSettings returns the custom url settings for this provider +func (o *OpenIDProvider) CustomURLSettings() *CustomURLSettings { + return nil +} + +var _ (GothProvider) = &OpenIDProvider{} + +func init() { + RegisterGothProvider(&OpenIDProvider{}) +} diff --git a/services/auth/source/oauth2/providers_simple.go b/services/auth/source/oauth2/providers_simple.go new file mode 100644 index 000000000..5a7062e6c --- /dev/null +++ b/services/auth/source/oauth2/providers_simple.go @@ -0,0 +1,108 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "code.gitea.io/gitea/modules/setting" + + "github.com/markbates/goth" + "github.com/markbates/goth/providers/azuread" + "github.com/markbates/goth/providers/bitbucket" + "github.com/markbates/goth/providers/discord" + "github.com/markbates/goth/providers/dropbox" + "github.com/markbates/goth/providers/facebook" + "github.com/markbates/goth/providers/google" + "github.com/markbates/goth/providers/microsoftonline" + "github.com/markbates/goth/providers/twitter" + "github.com/markbates/goth/providers/yandex" +) + +// SimpleProviderNewFn create goth.Providers without custom url features +type SimpleProviderNewFn func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider + +// SimpleProvider is a GothProvider which does not have custom url features +type SimpleProvider struct { + BaseProvider + scopes []string + newFn SimpleProviderNewFn +} + +// CreateGothProvider creates a GothProvider from this Provider +func (c *SimpleProvider) CreateGothProvider(providerName, callbackURL string, source *Source) (goth.Provider, error) { + return c.newFn(source.ClientID, source.ClientSecret, callbackURL, c.scopes...), nil +} + +// NewSimpleProvider is a constructor function for simple providers +func NewSimpleProvider(name, displayName string, scopes []string, newFn SimpleProviderNewFn) *SimpleProvider { + return &SimpleProvider{ + BaseProvider: BaseProvider{ + name: name, + displayName: displayName, + }, + scopes: scopes, + newFn: newFn, + } +} + +var _ (GothProvider) = &SimpleProvider{} + +func init() { + RegisterGothProvider( + NewSimpleProvider("bitbucket", "Bitbucket", []string{"account"}, + func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { + return bitbucket.New(clientKey, secret, callbackURL, scopes...) + })) + + RegisterGothProvider( + NewSimpleProvider("dropbox", "Dropbox", nil, + func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { + return dropbox.New(clientKey, secret, callbackURL, scopes...) + })) + + RegisterGothProvider(NewSimpleProvider("facebook", "Facebook", nil, + func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { + return facebook.New(clientKey, secret, callbackURL, scopes...) + })) + + // named gplus due to legacy gplus -> google migration (Google killed Google+). This ensures old connections still work + RegisterGothProvider(NewSimpleProvider("gplus", "Google", []string{"email"}, + func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { + if setting.OAuth2Client.UpdateAvatar || setting.OAuth2Client.EnableAutoRegistration { + scopes = append(scopes, "profile") + } + return google.New(clientKey, secret, callbackURL, scopes...) + })) + + RegisterGothProvider(NewSimpleProvider("twitter", "Twitter", nil, + func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { + return twitter.New(clientKey, secret, callbackURL) + })) + + RegisterGothProvider(NewSimpleProvider("discord", "Discord", []string{discord.ScopeIdentify, discord.ScopeEmail}, + func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { + return discord.New(clientKey, secret, callbackURL, scopes...) + })) + + // See https://tech.yandex.com/passport/doc/dg/reference/response-docpage/ + RegisterGothProvider(NewSimpleProvider("yandex", "Yandex", []string{"login:email", "login:info", "login:avatar"}, + func(clientKey, secret, callbackURL string, scopes ...string) goth.Provider { + return yandex.New(clientKey, secret, callbackURL, scopes...) + })) + + RegisterGothProvider(NewSimpleProvider( + "azuread", "Azure AD", nil, + func(clientID, secret, callbackURL string, scopes ...string) goth.Provider { + return azuread.New(clientID, secret, callbackURL, nil, scopes...) + }, + )) + + RegisterGothProvider(NewSimpleProvider( + "microsoftonline", "Microsoft Online", nil, + func(clientID, secret, callbackURL string, scopes ...string) goth.Provider { + return microsoftonline.New(clientID, secret, callbackURL, scopes...) + }, + )) + +} diff --git a/services/auth/source/oauth2/source.go b/services/auth/source/oauth2/source.go new file mode 100644 index 000000000..40d8973b4 --- /dev/null +++ b/services/auth/source/oauth2/source.go @@ -0,0 +1,49 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" +) + +// ________ _____ __ .__ ________ +// \_____ \ / _ \ __ ___/ |_| |__ \_____ \ +// / | \ / /_\ \| | \ __\ | \ / ____/ +// / | \/ | \ | /| | | Y \/ \ +// \_______ /\____|__ /____/ |__| |___| /\_______ \ +// \/ \/ \/ \/ + +// Source holds configuration for the OAuth2 login source. +type Source struct { + Provider string + ClientID string + ClientSecret string + OpenIDConnectAutoDiscoveryURL string + CustomURLMapping *CustomURLMapping + IconURL string + + // reference to the loginSource + loginSource *models.LoginSource +} + +// FromDB fills up an OAuth2Config from serialized format. +func (source *Source) FromDB(bs []byte) error { + return models.JSONUnmarshalHandleDoubleEncode(bs, &source) +} + +// ToDB exports an SMTPConfig to a serialized format. +func (source *Source) ToDB() ([]byte, error) { + return json.Marshal(source) +} + +// SetLoginSource sets the related LoginSource +func (source *Source) SetLoginSource(loginSource *models.LoginSource) { + source.loginSource = loginSource +} + +func init() { + models.RegisterLoginTypeConfig(models.LoginOAuth2, &Source{}) +} diff --git a/services/auth/source/oauth2/source_authenticate.go b/services/auth/source/oauth2/source_authenticate.go new file mode 100644 index 000000000..2e39f245d --- /dev/null +++ b/services/auth/source/oauth2/source_authenticate.go @@ -0,0 +1,15 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth/source/db" +) + +// Authenticate falls back to the db authenticator +func (source *Source) Authenticate(user *models.User, login, password string) (*models.User, error) { + return db.Authenticate(user, login, password) +} diff --git a/services/auth/source/oauth2/source_callout.go b/services/auth/source/oauth2/source_callout.go new file mode 100644 index 000000000..c0ac7e041 --- /dev/null +++ b/services/auth/source/oauth2/source_callout.go @@ -0,0 +1,48 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "net/http" + + "github.com/markbates/goth" + "github.com/markbates/goth/gothic" +) + +// Callout redirects request/response pair to authenticate against the provider +func (source *Source) Callout(request *http.Request, response http.ResponseWriter) error { + // not sure if goth is thread safe (?) when using multiple providers + request.Header.Set(ProviderHeaderKey, source.loginSource.Name) + + // don't use the default gothic begin handler to prevent issues when some error occurs + // normally the gothic library will write some custom stuff to the response instead of our own nice error page + //gothic.BeginAuthHandler(response, request) + + gothRWMutex.RLock() + defer gothRWMutex.RUnlock() + + url, err := gothic.GetAuthURL(response, request) + if err == nil { + http.Redirect(response, request, url, http.StatusTemporaryRedirect) + } + return err +} + +// Callback handles OAuth callback, resolve to a goth user and send back to original url +// this will trigger a new authentication request, but because we save it in the session we can use that +func (source *Source) Callback(request *http.Request, response http.ResponseWriter) (goth.User, error) { + // not sure if goth is thread safe (?) when using multiple providers + request.Header.Set(ProviderHeaderKey, source.loginSource.Name) + + gothRWMutex.RLock() + defer gothRWMutex.RUnlock() + + user, err := gothic.CompleteUserAuth(response, request) + if err != nil { + return user, err + } + + return user, nil +} diff --git a/services/auth/source/oauth2/source_name.go b/services/auth/source/oauth2/source_name.go new file mode 100644 index 000000000..0b794ad65 --- /dev/null +++ b/services/auth/source/oauth2/source_name.go @@ -0,0 +1,19 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +// Name returns the provider name of this source +func (source *Source) Name() string { + return source.Provider +} + +// DisplayName returns the display name of this source +func (source *Source) DisplayName() string { + provider, has := gothProviders[source.Provider] + if !has { + return source.Provider + } + return provider.DisplayName() +} diff --git a/services/auth/source/oauth2/source_register.go b/services/auth/source/oauth2/source_register.go new file mode 100644 index 000000000..24c61a9a5 --- /dev/null +++ b/services/auth/source/oauth2/source_register.go @@ -0,0 +1,30 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "code.gitea.io/gitea/models" +) + +// RegisterSource causes an OAuth2 configuration to be registered +func (source *Source) RegisterSource() error { + err := RegisterProviderWithGothic(source.loginSource.Name, source) + return wrapOpenIDConnectInitializeError(err, source.loginSource.Name, source) +} + +// UnregisterSource causes an OAuth2 configuration to be unregistered +func (source *Source) UnregisterSource() error { + RemoveProviderFromGothic(source.loginSource.Name) + return nil +} + +// wrapOpenIDConnectInitializeError is used to wrap the error but this cannot be done in modules/auth/oauth2 +// inside oauth2: import cycle not allowed models -> modules/auth/oauth2 -> models +func wrapOpenIDConnectInitializeError(err error, providerName string, source *Source) error { + if err != nil && source.Provider == "openidConnect" { + err = models.ErrOpenIDConnectInitialize{ProviderName: providerName, OpenIDConnectAutoDiscoveryURL: source.OpenIDConnectAutoDiscoveryURL, Cause: err} + } + return err +} diff --git a/services/auth/source/oauth2/token.go b/services/auth/source/oauth2/token.go new file mode 100644 index 000000000..16d122084 --- /dev/null +++ b/services/auth/source/oauth2/token.go @@ -0,0 +1,94 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +import ( + "fmt" + "time" + + "code.gitea.io/gitea/modules/timeutil" + "github.com/golang-jwt/jwt" +) + +// ___________ __ +// \__ ___/___ | | __ ____ ____ +// | | / _ \| |/ // __ \ / \ +// | |( <_> ) <\ ___/| | \ +// |____| \____/|__|_ \\___ >___| / +// \/ \/ \/ + +// Token represents an Oauth grant + +// TokenType represents the type of token for an oauth application +type TokenType int + +const ( + // TypeAccessToken is a token with short lifetime to access the api + TypeAccessToken TokenType = 0 + // TypeRefreshToken is token with long lifetime to refresh access tokens obtained by the client + TypeRefreshToken = iota +) + +// Token represents a JWT token used to authenticate a client +type Token struct { + GrantID int64 `json:"gnt"` + Type TokenType `json:"tt"` + Counter int64 `json:"cnt,omitempty"` + jwt.StandardClaims +} + +// ParseToken parses a signed jwt string +func ParseToken(jwtToken string, signingKey JWTSigningKey) (*Token, error) { + parsedToken, err := jwt.ParseWithClaims(jwtToken, &Token{}, func(token *jwt.Token) (interface{}, error) { + if token.Method == nil || token.Method.Alg() != signingKey.SigningMethod().Alg() { + return nil, fmt.Errorf("unexpected signing algo: %v", token.Header["alg"]) + } + return signingKey.VerifyKey(), nil + }) + if err != nil { + return nil, err + } + var token *Token + var ok bool + if token, ok = parsedToken.Claims.(*Token); !ok || !parsedToken.Valid { + return nil, fmt.Errorf("invalid token") + } + return token, nil +} + +// SignToken signs the token with the JWT secret +func (token *Token) SignToken(signingKey JWTSigningKey) (string, error) { + token.IssuedAt = time.Now().Unix() + jwtToken := jwt.NewWithClaims(signingKey.SigningMethod(), token) + signingKey.PreProcessToken(jwtToken) + return jwtToken.SignedString(signingKey.SignKey()) +} + +// OIDCToken represents an OpenID Connect id_token +type OIDCToken struct { + jwt.StandardClaims + Nonce string `json:"nonce,omitempty"` + + // Scope profile + Name string `json:"name,omitempty"` + PreferredUsername string `json:"preferred_username,omitempty"` + Profile string `json:"profile,omitempty"` + Picture string `json:"picture,omitempty"` + Website string `json:"website,omitempty"` + Locale string `json:"locale,omitempty"` + UpdatedAt timeutil.TimeStamp `json:"updated_at,omitempty"` + + // Scope email + Email string `json:"email,omitempty"` + EmailVerified bool `json:"email_verified,omitempty"` +} + +// SignToken signs an id_token with the (symmetric) client secret key +func (token *OIDCToken) SignToken(signingKey JWTSigningKey) (string, error) { + token.IssuedAt = time.Now().Unix() + jwtToken := jwt.NewWithClaims(signingKey.SigningMethod(), token) + signingKey.PreProcessToken(jwtToken) + return jwtToken.SignedString(signingKey.SignKey()) +} diff --git a/services/auth/source/oauth2/urlmapping.go b/services/auth/source/oauth2/urlmapping.go new file mode 100644 index 000000000..43c8dde9a --- /dev/null +++ b/services/auth/source/oauth2/urlmapping.go @@ -0,0 +1,78 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package oauth2 + +// CustomURLMapping describes the urls values to use when customizing OAuth2 provider URLs +type CustomURLMapping struct { + AuthURL string `json:",omitempty"` + TokenURL string `json:",omitempty"` + ProfileURL string `json:",omitempty"` + EmailURL string `json:",omitempty"` + Tenant string `json:",omitempty"` +} + +// CustomURLSettings describes the urls values and availability to use when customizing OAuth2 provider URLs +type CustomURLSettings struct { + AuthURL Attribute `json:",omitempty"` + TokenURL Attribute `json:",omitempty"` + ProfileURL Attribute `json:",omitempty"` + EmailURL Attribute `json:",omitempty"` + Tenant Attribute `json:",omitempty"` +} + +// Attribute describes the availability, and required status for a custom url configuration +type Attribute struct { + Value string + Available bool + Required bool +} + +func availableAttribute(value string) Attribute { + return Attribute{Value: value, Available: true} +} + +func requiredAttribute(value string) Attribute { + return Attribute{Value: value, Available: true, Required: true} +} + +// Required is true if any attribute is required +func (c *CustomURLSettings) Required() bool { + if c == nil { + return false + } + if c.AuthURL.Required || c.EmailURL.Required || c.ProfileURL.Required || c.TokenURL.Required || c.Tenant.Required { + return true + } + return false +} + +// OverrideWith copies the current customURLMapping and overrides it with values from the provided mapping +func (c *CustomURLSettings) OverrideWith(override *CustomURLMapping) *CustomURLMapping { + custom := &CustomURLMapping{ + AuthURL: c.AuthURL.Value, + TokenURL: c.TokenURL.Value, + ProfileURL: c.ProfileURL.Value, + EmailURL: c.EmailURL.Value, + Tenant: c.Tenant.Value, + } + if override != nil { + if len(override.AuthURL) > 0 && c.AuthURL.Available { + custom.AuthURL = override.AuthURL + } + if len(override.TokenURL) > 0 && c.TokenURL.Available { + custom.TokenURL = override.TokenURL + } + if len(override.ProfileURL) > 0 && c.ProfileURL.Available { + custom.ProfileURL = override.ProfileURL + } + if len(override.EmailURL) > 0 && c.EmailURL.Available { + custom.EmailURL = override.EmailURL + } + if len(override.Tenant) > 0 && c.Tenant.Available { + custom.Tenant = override.Tenant + } + } + return custom +} diff --git a/services/auth/source/pam/assert_interface_test.go b/services/auth/source/pam/assert_interface_test.go new file mode 100644 index 000000000..a0bebdf9c --- /dev/null +++ b/services/auth/source/pam/assert_interface_test.go @@ -0,0 +1,22 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package pam_test + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/pam" +) + +// This test file exists to assert that our Source exposes the interfaces that we expect +// It tightly binds the interfaces and implementation without breaking go import cycles + +type sourceInterface interface { + auth.PasswordAuthenticator + models.LoginConfig + models.LoginSourceSettable +} + +var _ (sourceInterface) = &pam.Source{} diff --git a/services/auth/source/pam/source.go b/services/auth/source/pam/source.go new file mode 100644 index 000000000..75aa99e45 --- /dev/null +++ b/services/auth/source/pam/source.go @@ -0,0 +1,45 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package pam + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" +) + +// __________ _____ _____ +// \______ \/ _ \ / \ +// | ___/ /_\ \ / \ / \ +// | | / | \/ Y \ +// |____| \____|__ /\____|__ / +// \/ \/ + +// Source holds configuration for the PAM login source. +type Source struct { + ServiceName string // pam service (e.g. system-auth) + EmailDomain string + + // reference to the loginSource + loginSource *models.LoginSource +} + +// FromDB fills up a PAMConfig from serialized format. +func (source *Source) FromDB(bs []byte) error { + return models.JSONUnmarshalHandleDoubleEncode(bs, &source) +} + +// ToDB exports a PAMConfig to a serialized format. +func (source *Source) ToDB() ([]byte, error) { + return json.Marshal(source) +} + +// SetLoginSource sets the related LoginSource +func (source *Source) SetLoginSource(loginSource *models.LoginSource) { + source.loginSource = loginSource +} + +func init() { + models.RegisterLoginTypeConfig(models.LoginPAM, &Source{}) +} diff --git a/services/auth/source/pam/source_authenticate.go b/services/auth/source/pam/source_authenticate.go new file mode 100644 index 000000000..8241aed72 --- /dev/null +++ b/services/auth/source/pam/source_authenticate.go @@ -0,0 +1,70 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package pam + +import ( + "fmt" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/auth/pam" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/services/mailer" + + "github.com/google/uuid" +) + +// Authenticate queries if login/password is valid against the PAM, +// and create a local user if success when enabled. +func (source *Source) Authenticate(user *models.User, login, password string) (*models.User, error) { + pamLogin, err := pam.Auth(source.ServiceName, login, password) + if err != nil { + if strings.Contains(err.Error(), "Authentication failure") { + return nil, models.ErrUserNotExist{Name: login} + } + return nil, err + } + + if user != nil { + return user, nil + } + + // Allow PAM sources with `@` in their name, like from Active Directory + username := pamLogin + email := pamLogin + idx := strings.Index(pamLogin, "@") + if idx > -1 { + username = pamLogin[:idx] + } + if models.ValidateEmail(email) != nil { + if source.EmailDomain != "" { + email = fmt.Sprintf("%s@%s", username, source.EmailDomain) + } else { + email = fmt.Sprintf("%s@%s", username, setting.Service.NoReplyAddress) + } + if models.ValidateEmail(email) != nil { + email = uuid.New().String() + "@localhost" + } + } + + user = &models.User{ + LowerName: strings.ToLower(username), + Name: username, + Email: email, + Passwd: password, + LoginType: models.LoginPAM, + LoginSource: source.loginSource.ID, + LoginName: login, // This is what the user typed in + IsActive: true, + } + + if err := models.CreateUser(user); err != nil { + return user, err + } + + mailer.SendRegisterNotifyMail(user) + + return user, nil +} diff --git a/services/auth/source/smtp/assert_interface_test.go b/services/auth/source/smtp/assert_interface_test.go new file mode 100644 index 000000000..bc2042e06 --- /dev/null +++ b/services/auth/source/smtp/assert_interface_test.go @@ -0,0 +1,25 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package smtp_test + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth" + "code.gitea.io/gitea/services/auth/source/smtp" +) + +// This test file exists to assert that our Source exposes the interfaces that we expect +// It tightly binds the interfaces and implementation without breaking go import cycles + +type sourceInterface interface { + auth.PasswordAuthenticator + models.LoginConfig + models.SkipVerifiable + models.HasTLSer + models.UseTLSer + models.LoginSourceSettable +} + +var _ (sourceInterface) = &smtp.Source{} diff --git a/services/auth/source/smtp/auth.go b/services/auth/source/smtp/auth.go new file mode 100644 index 000000000..d797982da --- /dev/null +++ b/services/auth/source/smtp/auth.go @@ -0,0 +1,105 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package smtp + +import ( + "crypto/tls" + "fmt" + "net" + "net/smtp" + "os" + "strconv" + + "code.gitea.io/gitea/models" +) + +// _________ __________________________ +// / _____/ / \__ ___/\______ \ +// \_____ \ / \ / \| | | ___/ +// / \/ Y \ | | | +// /_______ /\____|__ /____| |____| +// \/ \/ + +type loginAuthenticator struct { + username, password string +} + +func (auth *loginAuthenticator) Start(server *smtp.ServerInfo) (string, []byte, error) { + return "LOGIN", []byte(auth.username), nil +} + +func (auth *loginAuthenticator) Next(fromServer []byte, more bool) ([]byte, error) { + if more { + switch string(fromServer) { + case "Username:": + return []byte(auth.username), nil + case "Password:": + return []byte(auth.password), nil + } + } + return nil, nil +} + +// SMTP authentication type names. +const ( + PlainAuthentication = "PLAIN" + LoginAuthentication = "LOGIN" + CRAMMD5Authentication = "CRAM-MD5" +) + +// Authenticators contains available SMTP authentication type names. +var Authenticators = []string{PlainAuthentication, LoginAuthentication, CRAMMD5Authentication} + +// Authenticate performs an SMTP authentication. +func Authenticate(a smtp.Auth, source *Source) error { + tlsConfig := &tls.Config{ + InsecureSkipVerify: source.SkipVerify, + ServerName: source.Host, + } + + conn, err := net.Dial("tcp", net.JoinHostPort(source.Host, strconv.Itoa(source.Port))) + if err != nil { + return err + } + defer conn.Close() + + if source.UseTLS() { + conn = tls.Client(conn, tlsConfig) + } + + client, err := smtp.NewClient(conn, source.Host) + if err != nil { + return fmt.Errorf("failed to create NewClient: %w", err) + } + defer client.Close() + + if !source.DisableHelo { + hostname := source.HeloHostname + if len(hostname) == 0 { + hostname, err = os.Hostname() + if err != nil { + return fmt.Errorf("failed to find Hostname: %w", err) + } + } + + if err = client.Hello(hostname); err != nil { + return fmt.Errorf("failed to send Helo: %w", err) + } + } + + // If not using SMTPS, always use STARTTLS if available + hasStartTLS, _ := client.Extension("STARTTLS") + if !source.UseTLS() && hasStartTLS { + if err = client.StartTLS(tlsConfig); err != nil { + return fmt.Errorf("failed to start StartTLS: %v", err) + } + } + + if ok, _ := client.Extension("AUTH"); ok { + return client.Auth(a) + } + + return models.ErrUnsupportedLoginType +} diff --git a/services/auth/source/smtp/source.go b/services/auth/source/smtp/source.go new file mode 100644 index 000000000..39c9851ed --- /dev/null +++ b/services/auth/source/smtp/source.go @@ -0,0 +1,66 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package smtp + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" +) + +// _________ __________________________ +// / _____/ / \__ ___/\______ \ +// \_____ \ / \ / \| | | ___/ +// / \/ Y \ | | | +// /_______ /\____|__ /____| |____| +// \/ \/ + +// Source holds configuration for the SMTP login source. +type Source struct { + Auth string + Host string + Port int + AllowedDomains string `xorm:"TEXT"` + ForceSMTPS bool + SkipVerify bool + HeloHostname string + DisableHelo bool + + // reference to the loginSource + loginSource *models.LoginSource +} + +// FromDB fills up an SMTPConfig from serialized format. +func (source *Source) FromDB(bs []byte) error { + return models.JSONUnmarshalHandleDoubleEncode(bs, &source) +} + +// ToDB exports an SMTPConfig to a serialized format. +func (source *Source) ToDB() ([]byte, error) { + return json.Marshal(source) +} + +// IsSkipVerify returns if SkipVerify is set +func (source *Source) IsSkipVerify() bool { + return source.SkipVerify +} + +// HasTLS returns true for SMTP +func (source *Source) HasTLS() bool { + return true +} + +// UseTLS returns if TLS is set +func (source *Source) UseTLS() bool { + return source.ForceSMTPS || source.Port == 465 +} + +// SetLoginSource sets the related LoginSource +func (source *Source) SetLoginSource(loginSource *models.LoginSource) { + source.loginSource = loginSource +} + +func init() { + models.RegisterLoginTypeConfig(models.LoginSMTP, &Source{}) +} diff --git a/services/auth/source/smtp/source_authenticate.go b/services/auth/source/smtp/source_authenticate.go new file mode 100644 index 000000000..cff64c69d --- /dev/null +++ b/services/auth/source/smtp/source_authenticate.go @@ -0,0 +1,86 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package smtp + +import ( + "errors" + "net/smtp" + "net/textproto" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/util" + "code.gitea.io/gitea/services/mailer" +) + +// Authenticate queries if the provided login/password is authenticates against the SMTP server +// Users will be autoregistered as required +func (source *Source) Authenticate(user *models.User, login, password string) (*models.User, error) { + // Verify allowed domains. + if len(source.AllowedDomains) > 0 { + idx := strings.Index(login, "@") + if idx == -1 { + return nil, models.ErrUserNotExist{Name: login} + } else if !util.IsStringInSlice(login[idx+1:], strings.Split(source.AllowedDomains, ","), true) { + return nil, models.ErrUserNotExist{Name: login} + } + } + + var auth smtp.Auth + switch source.Auth { + case PlainAuthentication: + auth = smtp.PlainAuth("", login, password, source.Host) + case LoginAuthentication: + auth = &loginAuthenticator{login, password} + case CRAMMD5Authentication: + auth = smtp.CRAMMD5Auth(login, password) + default: + return nil, errors.New("unsupported SMTP auth type") + } + + if err := Authenticate(auth, source); err != nil { + // Check standard error format first, + // then fallback to worse case. + tperr, ok := err.(*textproto.Error) + if (ok && tperr.Code == 535) || + strings.Contains(err.Error(), "Username and Password not accepted") { + return nil, models.ErrUserNotExist{Name: login} + } + if (ok && tperr.Code == 534) || + strings.Contains(err.Error(), "Application-specific password required") { + return nil, models.ErrUserNotExist{Name: login} + } + return nil, err + } + + if user != nil { + return user, nil + } + + username := login + idx := strings.Index(login, "@") + if idx > -1 { + username = login[:idx] + } + + user = &models.User{ + LowerName: strings.ToLower(username), + Name: strings.ToLower(username), + Email: login, + Passwd: password, + LoginType: models.LoginSMTP, + LoginSource: source.loginSource.ID, + LoginName: login, + IsActive: true, + } + + if err := models.CreateUser(user); err != nil { + return user, err + } + + mailer.SendRegisterNotifyMail(user) + + return user, nil +} diff --git a/services/auth/source/sspi/assert_interface_test.go b/services/auth/source/sspi/assert_interface_test.go new file mode 100644 index 000000000..605a6ec6c --- /dev/null +++ b/services/auth/source/sspi/assert_interface_test.go @@ -0,0 +1,19 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package sspi_test + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/services/auth/source/sspi" +) + +// This test file exists to assert that our Source exposes the interfaces that we expect +// It tightly binds the interfaces and implementation without breaking go import cycles + +type sourceInterface interface { + models.LoginConfig +} + +var _ (sourceInterface) = &sspi.Source{} diff --git a/services/auth/source/sspi/source.go b/services/auth/source/sspi/source.go new file mode 100644 index 000000000..58cb10de1 --- /dev/null +++ b/services/auth/source/sspi/source.go @@ -0,0 +1,40 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package sspi + +import ( + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/json" +) + +// _________ ___________________.___ +// / _____// _____/\______ \ | +// \_____ \ \_____ \ | ___/ | +// / \/ \ | | | | +// /_______ /_______ / |____| |___| +// \/ \/ + +// Source holds configuration for SSPI single sign-on. +type Source struct { + AutoCreateUsers bool + AutoActivateUsers bool + StripDomainNames bool + SeparatorReplacement string + DefaultLanguage string +} + +// FromDB fills up an SSPIConfig from serialized format. +func (cfg *Source) FromDB(bs []byte) error { + return models.JSONUnmarshalHandleDoubleEncode(bs, &cfg) +} + +// ToDB exports an SSPIConfig to a serialized format. +func (cfg *Source) ToDB() ([]byte, error) { + return json.Marshal(cfg) +} + +func init() { + models.RegisterLoginTypeConfig(models.LoginSSPI, &Source{}) +} diff --git a/modules/auth/sso/sspi_windows.go b/services/auth/sspi_windows.go similarity index 81% rename from modules/auth/sso/sspi_windows.go rename to services/auth/sspi_windows.go index 44dfa81aa..d7e0f5524 100644 --- a/modules/auth/sso/sspi_windows.go +++ b/services/auth/sspi_windows.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package sso +package auth import ( "errors" @@ -14,6 +14,9 @@ import ( "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/services/auth/source/sspi" + "code.gitea.io/gitea/services/mailer" gouuid "github.com/google/uuid" "github.com/quasoft/websspi" @@ -31,7 +34,10 @@ var ( sspiAuth *websspi.Authenticator // Ensure the struct implements the interface. - _ SingleSignOn = &SSPI{} + _ Method = &SSPI{} + _ Named = &SSPI{} + _ Initializable = &SSPI{} + _ Freeable = &SSPI{} ) // SSPI implements the SingleSignOn interface and authenticates requests @@ -56,26 +62,26 @@ func (s *SSPI) Init() error { Funcs: templates.NewFuncMap(), Asset: templates.GetAsset, AssetNames: templates.GetAssetNames, - IsDevelopment: setting.RunMode != "prod", + IsDevelopment: !setting.IsProd(), }) return nil } +// Name represents the name of auth method +func (s *SSPI) Name() string { + return "sspi" +} + // Free releases resources used by the global websspi.Authenticator object func (s *SSPI) Free() error { return sspiAuth.Free() } -// IsEnabled checks if there is an active SSPI authentication source -func (s *SSPI) IsEnabled() bool { - return models.IsSSPIEnabled() -} - -// VerifyAuthData uses SSPI (Windows implementation of SPNEGO) to authenticate the request. -// If authentication is successful, returs the corresponding user object. +// Verify uses SSPI (Windows implementation of SPNEGO) to authenticate the request. +// If authentication is successful, returns the corresponding user object. // If negotiation should continue or authentication fails, immediately returns a 401 HTTP // response code, as required by the SPNEGO protocol. -func (s *SSPI) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { +func (s *SSPI) Verify(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User { if !s.shouldAuthenticate(req) { return nil } @@ -86,6 +92,7 @@ func (s *SSPI) VerifyAuthData(req *http.Request, w http.ResponseWriter, store Da return nil } + log.Trace("SSPI Authorization: Attempting to authenticate") userInfo, outToken, err := sspiAuth.Authenticate(req, w) if err != nil { log.Warn("Authentication failed with error: %v\n", err) @@ -95,7 +102,7 @@ func (s *SSPI) VerifyAuthData(req *http.Request, w http.ResponseWriter, store Da // to login with another authentication method if SSPI authentication // fails store.GetData()["Flash"] = map[string]string{ - "ErrMsg": err.Error(), + "ErrorMsg": err.Error(), } store.GetData()["EnableOpenIDSignIn"] = setting.Service.EnableOpenIDSignIn store.GetData()["EnableSSPI"] = true @@ -135,15 +142,16 @@ func (s *SSPI) VerifyAuthData(req *http.Request, w http.ResponseWriter, store Da } // Make sure requests to API paths and PWA resources do not create a new session - if !isAPIPath(req) && !isAttachmentDownload(req) { + if !middleware.IsAPIPath(req) && !isAttachmentDownload(req) { handleSignIn(w, req, sess, user) } + log.Trace("SSPI Authorization: Logged in user %-v", user) return user } // getConfig retrieves the SSPI configuration from login sources -func (s *SSPI) getConfig() (*models.SSPIConfig, error) { +func (s *SSPI) getConfig() (*sspi.Source, error) { sources, err := models.ActiveLoginSources(models.LoginSSPI) if err != nil { return nil, err @@ -154,7 +162,7 @@ func (s *SSPI) getConfig() (*models.SSPIConfig, error) { if len(sources) > 1 { return nil, errors.New("more than one active login source of type SSPI found") } - return sources[0].SSPI(), nil + return sources[0].Cfg.(*sspi.Source), nil } func (s *SSPI) shouldAuthenticate(req *http.Request) (shouldAuth bool) { @@ -166,9 +174,7 @@ func (s *SSPI) shouldAuthenticate(req *http.Request) (shouldAuth bool) { } else if req.FormValue("auth_with_sspi") == "1" { shouldAuth = true } - } else if isInternalPath(req) { - shouldAuth = false - } else if isAPIPath(req) || isAttachmentDownload(req) { + } else if middleware.IsAPIPath(req) || isAttachmentDownload(req) { shouldAuth = true } return @@ -176,7 +182,7 @@ func (s *SSPI) shouldAuthenticate(req *http.Request) (shouldAuth bool) { // newUser creates a new user object for the purpose of automatic registration // and populates its name and email with the information present in request headers. -func (s *SSPI) newUser(username string, cfg *models.SSPIConfig) (*models.User, error) { +func (s *SSPI) newUser(username string, cfg *sspi.Source) (*models.User, error) { email := gouuid.New().String() + "@localhost.localdomain" user := &models.User{ Name: username, @@ -192,6 +198,9 @@ func (s *SSPI) newUser(username string, cfg *models.SSPIConfig) (*models.User, e if err := models.CreateUser(user); err != nil { return nil, err } + + mailer.SendRegisterNotifyMail(user) + return user, nil } @@ -213,7 +222,7 @@ func stripDomainNames(username string) string { return username } -func replaceSeparators(username string, cfg *models.SSPIConfig) string { +func replaceSeparators(username string, cfg *sspi.Source) string { newSep := cfg.SeparatorReplacement username = strings.ReplaceAll(username, "\\", newSep) username = strings.ReplaceAll(username, "/", newSep) @@ -221,7 +230,7 @@ func replaceSeparators(username string, cfg *models.SSPIConfig) string { return username } -func sanitizeUsername(username string, cfg *models.SSPIConfig) string { +func sanitizeUsername(username string, cfg *sspi.Source) string { if len(username) == 0 { return "" } @@ -234,10 +243,12 @@ func sanitizeUsername(username string, cfg *models.SSPIConfig) string { return username } -// init registers the SSPI auth method as the last method in the list. +// specialInit registers the SSPI auth method as the last method in the list. // The SSPI plugin is expected to be executed last, as it returns 401 status code if negotiation // fails (or if negotiation should continue), which would prevent other authentication methods // to execute at all. -func init() { - Register(&SSPI{}) +func specialInit() { + if models.IsSSPIEnabled() { + Register(&SSPI{}) + } } diff --git a/services/auth/sync.go b/services/auth/sync.go new file mode 100644 index 000000000..a34b4d1d2 --- /dev/null +++ b/services/auth/sync.go @@ -0,0 +1,43 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package auth + +import ( + "context" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/log" +) + +// SyncExternalUsers is used to synchronize users with external authorization source +func SyncExternalUsers(ctx context.Context, updateExisting bool) error { + log.Trace("Doing: SyncExternalUsers") + + ls, err := models.LoginSources() + if err != nil { + log.Error("SyncExternalUsers: %v", err) + return err + } + + for _, s := range ls { + if !s.IsActive || !s.IsSyncEnabled { + continue + } + select { + case <-ctx.Done(): + log.Warn("SyncExternalUsers: Cancelled before update of %s", s.Name) + return models.ErrCancelledf("Before update of %s", s.Name) + default: + } + + if syncable, ok := s.Cfg.(SynchronizableSource); ok { + err := syncable.Sync(ctx, updateExisting) + if err != nil { + return err + } + } + } + return nil +} diff --git a/services/comments/comments.go b/services/comments/comments.go index ad79eec4f..f8bdc8153 100644 --- a/services/comments/comments.go +++ b/services/comments/comments.go @@ -43,8 +43,8 @@ func UpdateComment(c *models.Comment, doer *models.User, oldContent string) erro } // DeleteComment deletes the comment -func DeleteComment(comment *models.Comment, doer *models.User) error { - if err := models.DeleteComment(comment, doer); err != nil { +func DeleteComment(doer *models.User, comment *models.Comment) error { + if err := models.DeleteComment(comment); err != nil { return err } diff --git a/services/forms/admin.go b/services/forms/admin.go new file mode 100644 index 000000000..5abef0550 --- /dev/null +++ b/services/forms/admin.go @@ -0,0 +1,73 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web/middleware" + + "gitea.com/go-chi/binding" +) + +// AdminCreateUserForm form for admin to create user +type AdminCreateUserForm struct { + LoginType string `binding:"Required"` + LoginName string + UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"` + Email string `binding:"Required;Email;MaxSize(254)"` + Password string `binding:"MaxSize(255)"` + SendNotify bool + MustChangePassword bool + Visibility structs.VisibleType +} + +// Validate validates form fields +func (f *AdminCreateUserForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// AdminEditUserForm form for admin to create user +type AdminEditUserForm struct { + LoginType string `binding:"Required"` + UserName string `binding:"AlphaDashDot;MaxSize(40)"` + LoginName string + FullName string `binding:"MaxSize(100)"` + Email string `binding:"Required;Email;MaxSize(254)"` + Password string `binding:"MaxSize(255)"` + Website string `binding:"ValidUrl;MaxSize(255)"` + Location string `binding:"MaxSize(50)"` + MaxRepoCreation int + Active bool + Admin bool + Restricted bool + AllowGitHook bool + AllowImportLocal bool + AllowCreateOrganization bool + ProhibitLogin bool + Reset2FA bool `form:"reset_2fa"` + Visibility structs.VisibleType +} + +// Validate validates form fields +func (f *AdminEditUserForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// AdminDashboardForm form for admin dashboard operations +type AdminDashboardForm struct { + Op string `binding:"required"` + From string +} + +// Validate validates form fields +func (f *AdminDashboardForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} diff --git a/modules/auth/auth_form.go b/services/forms/auth_form.go similarity index 81% rename from modules/auth/auth_form.go rename to services/forms/auth_form.go index e348b01e9..b45ea6ea1 100644 --- a/modules/auth/auth_form.go +++ b/services/forms/auth_form.go @@ -2,11 +2,15 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package auth +package forms import ( - "gitea.com/macaron/binding" - "gitea.com/macaron/macaron" + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web/middleware" + + "gitea.com/go-chi/binding" ) // AuthenticationForm form for authentication @@ -46,7 +50,11 @@ type AuthenticationForm struct { SecurityProtocol int `binding:"Range(0,2)"` TLS bool SkipVerify bool + HeloHostname string + DisableHelo bool + ForceSMTPS bool PAMServiceName string + PAMEmailDomain string Oauth2Provider string Oauth2Key string Oauth2Secret string @@ -57,6 +65,7 @@ type AuthenticationForm struct { Oauth2ProfileURL string Oauth2EmailURL string Oauth2IconURL string + Oauth2Tenant string SSPIAutoCreateUsers bool SSPIAutoActivateUsers bool SSPIStripDomainNames bool @@ -65,6 +74,7 @@ type AuthenticationForm struct { } // Validate validates fields -func (f *AuthenticationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors { - return validate(errs, ctx.Data, f, ctx.Locale) +func (f *AuthenticationForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) } diff --git a/services/forms/org.go b/services/forms/org.go new file mode 100644 index 000000000..3b994770f --- /dev/null +++ b/services/forms/org.go @@ -0,0 +1,78 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2019 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "net/http" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web/middleware" + + "gitea.com/go-chi/binding" +) + +// ________ .__ __ .__ +// \_____ \_______ _________ ____ |__|____________ _/ |_|__| ____ ____ +// / | \_ __ \/ ___\__ \ / \| \___ /\__ \\ __\ |/ _ \ / \ +// / | \ | \/ /_/ > __ \| | \ |/ / / __ \| | | ( <_> ) | \ +// \_______ /__| \___ (____ /___| /__/_____ \(____ /__| |__|\____/|___| / +// \/ /_____/ \/ \/ \/ \/ \/ + +// CreateOrgForm form for creating organization +type CreateOrgForm struct { + OrgName string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"` + Visibility structs.VisibleType + RepoAdminChangeTeamAccess bool +} + +// Validate validates the fields +func (f *CreateOrgForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// UpdateOrgSettingForm form for updating organization settings +type UpdateOrgSettingForm struct { + Name string `binding:"Required;AlphaDashDot;MaxSize(40)" locale:"org.org_name_holder"` + FullName string `binding:"MaxSize(100)"` + Description string `binding:"MaxSize(255)"` + Website string `binding:"ValidUrl;MaxSize(255)"` + Location string `binding:"MaxSize(50)"` + Visibility structs.VisibleType + MaxRepoCreation int + RepoAdminChangeTeamAccess bool +} + +// Validate validates the fields +func (f *UpdateOrgSettingForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ___________ +// \__ ___/___ _____ _____ +// | |_/ __ \\__ \ / \ +// | |\ ___/ / __ \| Y Y \ +// |____| \___ >____ /__|_| / +// \/ \/ \/ + +// CreateTeamForm form for creating team +type CreateTeamForm struct { + TeamName string `binding:"Required;AlphaDashDot;MaxSize(30)"` + Description string `binding:"MaxSize(255)"` + Permission string + Units []models.UnitType + RepoAccess string + CanCreateOrgRepo bool +} + +// Validate validates the fields +func (f *CreateTeamForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} diff --git a/services/forms/repo_branch_form.go b/services/forms/repo_branch_form.go new file mode 100644 index 000000000..88a069b83 --- /dev/null +++ b/services/forms/repo_branch_form.go @@ -0,0 +1,26 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web/middleware" + + "gitea.com/go-chi/binding" +) + +// NewBranchForm form for creating a new branch +type NewBranchForm struct { + NewBranchName string `binding:"Required;MaxSize(100);GitRefName"` + CreateTag bool +} + +// Validate validates the fields +func (f *NewBranchForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} diff --git a/services/forms/repo_form.go b/services/forms/repo_form.go new file mode 100644 index 000000000..c1c146f23 --- /dev/null +++ b/services/forms/repo_form.go @@ -0,0 +1,831 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "net/http" + "net/url" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web/middleware" + "code.gitea.io/gitea/routers/utils" + + "gitea.com/go-chi/binding" +) + +// _______________________________________ _________.______________________ _______________.___. +// \______ \_ _____/\______ \_____ \ / _____/| \__ ___/\_____ \\______ \__ | | +// | _/| __)_ | ___// | \ \_____ \ | | | | / | \| _// | | +// | | \| \ | | / | \/ \| | | | / | \ | \\____ | +// |____|_ /_______ / |____| \_______ /_______ /|___| |____| \_______ /____|_ // ______| +// \/ \/ \/ \/ \/ \/ \/ + +// CreateRepoForm form for creating repository +type CreateRepoForm struct { + UID int64 `binding:"Required"` + RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"` + Private bool + Description string `binding:"MaxSize(255)"` + DefaultBranch string `binding:"GitRefName;MaxSize(100)"` + AutoInit bool + Gitignores string + IssueLabels string + License string + Readme string + Template bool + + RepoTemplate int64 + GitContent bool + Topics bool + GitHooks bool + Webhooks bool + Avatar bool + Labels bool + TrustModel string +} + +// Validate validates the fields +func (f *CreateRepoForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// MigrateRepoForm form for migrating repository +// this is used to interact with web ui +type MigrateRepoForm struct { + // required: true + CloneAddr string `json:"clone_addr" binding:"Required"` + Service structs.GitServiceType `json:"service"` + AuthUsername string `json:"auth_username"` + AuthPassword string `json:"auth_password"` + AuthToken string `json:"auth_token"` + // required: true + UID int64 `json:"uid" binding:"Required"` + // required: true + RepoName string `json:"repo_name" binding:"Required;AlphaDashDot;MaxSize(100)"` + Mirror bool `json:"mirror"` + LFS bool `json:"lfs"` + LFSEndpoint string `json:"lfs_endpoint"` + Private bool `json:"private"` + Description string `json:"description" binding:"MaxSize(255)"` + Wiki bool `json:"wiki"` + Milestones bool `json:"milestones"` + Labels bool `json:"labels"` + Issues bool `json:"issues"` + PullRequests bool `json:"pull_requests"` + Releases bool `json:"releases"` + MirrorInterval string `json:"mirror_interval"` +} + +// Validate validates the fields +func (f *MigrateRepoForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ParseRemoteAddr checks if given remote address is valid, +// and returns composed URL with needed username and password. +func ParseRemoteAddr(remoteAddr, authUsername, authPassword string) (string, error) { + remoteAddr = strings.TrimSpace(remoteAddr) + // Remote address can be HTTP/HTTPS/Git URL or local path. + if strings.HasPrefix(remoteAddr, "http://") || + strings.HasPrefix(remoteAddr, "https://") || + strings.HasPrefix(remoteAddr, "git://") { + u, err := url.Parse(remoteAddr) + if err != nil { + return "", &models.ErrInvalidCloneAddr{IsURLError: true} + } + if len(authUsername)+len(authPassword) > 0 { + u.User = url.UserPassword(authUsername, authPassword) + } + remoteAddr = u.String() + } + + return remoteAddr, nil +} + +// RepoSettingForm form for changing repository settings +type RepoSettingForm struct { + RepoName string `binding:"Required;AlphaDashDot;MaxSize(100)"` + Description string `binding:"MaxSize(255)"` + Website string `binding:"ValidUrl;MaxSize(255)"` + Interval string + MirrorAddress string + MirrorUsername string + MirrorPassword string + LFS bool `form:"mirror_lfs"` + LFSEndpoint string `form:"mirror_lfs_endpoint"` + PushMirrorID string + PushMirrorAddress string + PushMirrorUsername string + PushMirrorPassword string + PushMirrorInterval string + Private bool + Template bool + EnablePrune bool + + // Advanced settings + EnableWiki bool + EnableExternalWiki bool + ExternalWikiURL string + EnableIssues bool + EnableExternalTracker bool + ExternalTrackerURL string + TrackerURLFormat string + TrackerIssueStyle string + EnableCloseIssuesViaCommitInAnyBranch bool + EnableProjects bool + EnablePulls bool + PullsIgnoreWhitespace bool + PullsAllowMerge bool + PullsAllowRebase bool + PullsAllowRebaseMerge bool + PullsAllowSquash bool + PullsAllowManualMerge bool + PullsDefaultMergeStyle string + EnableAutodetectManualMerge bool + DefaultDeleteBranchAfterMerge bool + EnableTimetracker bool + AllowOnlyContributorsToTrackTime bool + EnableIssueDependencies bool + IsArchived bool + + // Signing Settings + TrustModel string + + // Admin settings + EnableHealthCheck bool +} + +// Validate validates the fields +func (f *RepoSettingForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// __________ .__ +// \______ \____________ ____ ____ | |__ +// | | _/\_ __ \__ \ / \_/ ___\| | \ +// | | \ | | \// __ \| | \ \___| Y \ +// |______ / |__| (____ /___| /\___ >___| / +// \/ \/ \/ \/ \/ + +// ProtectBranchForm form for changing protected branch settings +type ProtectBranchForm struct { + Protected bool + EnablePush string + WhitelistUsers string + WhitelistTeams string + WhitelistDeployKeys bool + EnableMergeWhitelist bool + MergeWhitelistUsers string + MergeWhitelistTeams string + EnableStatusCheck bool + StatusCheckContexts []string + RequiredApprovals int64 + EnableApprovalsWhitelist bool + ApprovalsWhitelistUsers string + ApprovalsWhitelistTeams string + BlockOnRejectedReviews bool + BlockOnOfficialReviewRequests bool + BlockOnOutdatedBranch bool + DismissStaleApprovals bool + RequireSignedCommits bool + ProtectedFilePatterns string +} + +// Validate validates the fields +func (f *ProtectBranchForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// __ __ ___. .__ .__ __ +// / \ / \ ____\_ |__ | |__ | |__ ____ | | __ +// \ \/\/ // __ \| __ \| | \| | \ / _ \| |/ / +// \ /\ ___/| \_\ \ Y \ Y ( <_> ) < +// \__/\ / \___ >___ /___| /___| /\____/|__|_ \ +// \/ \/ \/ \/ \/ \/ + +// WebhookForm form for changing web hook +type WebhookForm struct { + Events string + Create bool + Delete bool + Fork bool + Issues bool + IssueAssign bool + IssueLabel bool + IssueMilestone bool + IssueComment bool + Release bool + Push bool + PullRequest bool + PullRequestAssign bool + PullRequestLabel bool + PullRequestMilestone bool + PullRequestComment bool + PullRequestReview bool + PullRequestSync bool + Repository bool + Active bool + BranchFilter string `binding:"GlobPattern"` +} + +// PushOnly if the hook will be triggered when push +func (f WebhookForm) PushOnly() bool { + return f.Events == "push_only" +} + +// SendEverything if the hook will be triggered any event +func (f WebhookForm) SendEverything() bool { + return f.Events == "send_everything" +} + +// ChooseEvents if the hook will be triggered choose events +func (f WebhookForm) ChooseEvents() bool { + return f.Events == "choose_events" +} + +// NewWebhookForm form for creating web hook +type NewWebhookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + HTTPMethod string `binding:"Required;In(POST,GET)"` + ContentType int `binding:"Required"` + Secret string + WebhookForm +} + +// Validate validates the fields +func (f *NewWebhookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewGogshookForm form for creating gogs hook +type NewGogshookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + ContentType int `binding:"Required"` + Secret string + WebhookForm +} + +// Validate validates the fields +func (f *NewGogshookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewSlackHookForm form for creating slack hook +type NewSlackHookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + Channel string `binding:"Required"` + Username string + IconURL string + Color string + WebhookForm +} + +// Validate validates the fields +func (f *NewSlackHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// HasInvalidChannel validates the channel name is in the right format +func (f NewSlackHookForm) HasInvalidChannel() bool { + return !utils.IsValidSlackChannel(f.Channel) +} + +// NewDiscordHookForm form for creating discord hook +type NewDiscordHookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + Username string + IconURL string + WebhookForm +} + +// Validate validates the fields +func (f *NewDiscordHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewDingtalkHookForm form for creating dingtalk hook +type NewDingtalkHookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + WebhookForm +} + +// Validate validates the fields +func (f *NewDingtalkHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewTelegramHookForm form for creating telegram hook +type NewTelegramHookForm struct { + BotToken string `binding:"Required"` + ChatID string `binding:"Required"` + WebhookForm +} + +// Validate validates the fields +func (f *NewTelegramHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewMatrixHookForm form for creating Matrix hook +type NewMatrixHookForm struct { + HomeserverURL string `binding:"Required;ValidUrl"` + RoomID string `binding:"Required"` + AccessToken string `binding:"Required"` + MessageType int + WebhookForm +} + +// Validate validates the fields +func (f *NewMatrixHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewMSTeamsHookForm form for creating MS Teams hook +type NewMSTeamsHookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + WebhookForm +} + +// Validate validates the fields +func (f *NewMSTeamsHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewFeishuHookForm form for creating feishu hook +type NewFeishuHookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + WebhookForm +} + +// Validate validates the fields +func (f *NewFeishuHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewWechatWorkHookForm form for creating wechatwork hook +type NewWechatWorkHookForm struct { + PayloadURL string `binding:"Required;ValidUrl"` + WebhookForm +} + +// Validate validates the fields +func (f *NewWechatWorkHookForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// .___ +// | | ______ ________ __ ____ +// | |/ ___// ___/ | \_/ __ \ +// | |\___ \ \___ \| | /\ ___/ +// |___/____ >____ >____/ \___ > +// \/ \/ \/ + +// CreateIssueForm form for creating issue +type CreateIssueForm struct { + Title string `binding:"Required;MaxSize(255)"` + LabelIDs string `form:"label_ids"` + AssigneeIDs string `form:"assignee_ids"` + Ref string `form:"ref"` + MilestoneID int64 + ProjectID int64 + AssigneeID int64 + Content string + Files []string +} + +// Validate validates the fields +func (f *CreateIssueForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// CreateCommentForm form for creating comment +type CreateCommentForm struct { + Content string + Status string `binding:"OmitEmpty;In(reopen,close)"` + Files []string +} + +// Validate validates the fields +func (f *CreateCommentForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ReactionForm form for adding and removing reaction +type ReactionForm struct { + Content string `binding:"Required"` +} + +// Validate validates the fields +func (f *ReactionForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// IssueLockForm form for locking an issue +type IssueLockForm struct { + Reason string `binding:"Required"` +} + +// Validate validates the fields +func (i *IssueLockForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, i, ctx.Locale) +} + +// HasValidReason checks to make sure that the reason submitted in +// the form matches any of the values in the config +func (i IssueLockForm) HasValidReason() bool { + if strings.TrimSpace(i.Reason) == "" { + return true + } + + for _, v := range setting.Repository.Issue.LockReasons { + if v == i.Reason { + return true + } + } + + return false +} + +// __________ __ __ +// \______ \_______ ____ |__| ____ _____/ |_ ______ +// | ___/\_ __ \/ _ \ | |/ __ \_/ ___\ __\/ ___/ +// | | | | \( <_> ) | \ ___/\ \___| | \___ \ +// |____| |__| \____/\__| |\___ >\___ >__| /____ > +// \______| \/ \/ \/ + +// CreateProjectForm form for creating a project +type CreateProjectForm struct { + Title string `binding:"Required;MaxSize(100)"` + Content string + BoardType models.ProjectBoardType +} + +// UserCreateProjectForm is a from for creating an individual or organization +// form. +type UserCreateProjectForm struct { + Title string `binding:"Required;MaxSize(100)"` + Content string + BoardType models.ProjectBoardType + UID int64 `binding:"Required"` +} + +// EditProjectBoardForm is a form for editing a project board +type EditProjectBoardForm struct { + Title string `binding:"Required;MaxSize(100)"` + Sorting int8 +} + +// _____ .__.__ __ +// / \ |__| | ____ _______/ |_ ____ ____ ____ +// / \ / \| | | _/ __ \ / ___/\ __\/ _ \ / \_/ __ \ +// / Y \ | |_\ ___/ \___ \ | | ( <_> ) | \ ___/ +// \____|__ /__|____/\___ >____ > |__| \____/|___| /\___ > +// \/ \/ \/ \/ \/ + +// CreateMilestoneForm form for creating milestone +type CreateMilestoneForm struct { + Title string `binding:"Required;MaxSize(50)"` + Content string + Deadline string +} + +// Validate validates the fields +func (f *CreateMilestoneForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// .____ ___. .__ +// | | _____ \_ |__ ____ | | +// | | \__ \ | __ \_/ __ \| | +// | |___ / __ \| \_\ \ ___/| |__ +// |_______ (____ /___ /\___ >____/ +// \/ \/ \/ \/ + +// CreateLabelForm form for creating label +type CreateLabelForm struct { + ID int64 + Title string `binding:"Required;MaxSize(50)" locale:"repo.issues.label_title"` + Description string `binding:"MaxSize(200)" locale:"repo.issues.label_description"` + Color string `binding:"Required;Size(7)" locale:"repo.issues.label_color"` +} + +// Validate validates the fields +func (f *CreateLabelForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// InitializeLabelsForm form for initializing labels +type InitializeLabelsForm struct { + TemplateName string `binding:"Required"` +} + +// Validate validates the fields +func (f *InitializeLabelsForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// __________ .__ .__ __________ __ +// \______ \__ __| | | | \______ \ ____ ________ __ ____ _______/ |_ +// | ___/ | \ | | | | _// __ \/ ____/ | \_/ __ \ / ___/\ __\ +// | | | | / |_| |__ | | \ ___< <_| | | /\ ___/ \___ \ | | +// |____| |____/|____/____/ |____|_ /\___ >__ |____/ \___ >____ > |__| +// \/ \/ |__| \/ \/ + +// MergePullRequestForm form for merging Pull Request +// swagger:model MergePullRequestOption +type MergePullRequestForm struct { + // required: true + // enum: merge,rebase,rebase-merge,squash,manually-merged + Do string `binding:"Required;In(merge,rebase,rebase-merge,squash,manually-merged)"` + MergeTitleField string + MergeMessageField string + MergeCommitID string // only used for manually-merged + ForceMerge *bool `json:"force_merge,omitempty"` + DeleteBranchAfterMerge bool `json:"delete_branch_after_merge,omitempty"` +} + +// Validate validates the fields +func (f *MergePullRequestForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// CodeCommentForm form for adding code comments for PRs +type CodeCommentForm struct { + Origin string `binding:"Required;In(timeline,diff)"` + Content string `binding:"Required"` + Side string `binding:"Required;In(previous,proposed)"` + Line int64 + TreePath string `form:"path" binding:"Required"` + IsReview bool `form:"is_review"` + Reply int64 `form:"reply"` + LatestCommitID string +} + +// Validate validates the fields +func (f *CodeCommentForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// SubmitReviewForm for submitting a finished code review +type SubmitReviewForm struct { + Content string + Type string `binding:"Required;In(approve,comment,reject)"` + CommitID string + Files []string +} + +// Validate validates the fields +func (f *SubmitReviewForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ReviewType will return the corresponding reviewtype for type +func (f SubmitReviewForm) ReviewType() models.ReviewType { + switch f.Type { + case "approve": + return models.ReviewTypeApprove + case "comment": + return models.ReviewTypeComment + case "reject": + return models.ReviewTypeReject + default: + return models.ReviewTypeUnknown + } +} + +// HasEmptyContent checks if the content of the review form is empty. +func (f SubmitReviewForm) HasEmptyContent() bool { + reviewType := f.ReviewType() + + return (reviewType == models.ReviewTypeComment || reviewType == models.ReviewTypeReject) && + len(strings.TrimSpace(f.Content)) == 0 +} + +// DismissReviewForm for dismissing stale review by repo admin +type DismissReviewForm struct { + ReviewID int64 `binding:"Required"` + Message string +} + +// __________ .__ +// \______ \ ____ | | ____ _____ ______ ____ +// | _// __ \| | _/ __ \\__ \ / ___// __ \ +// | | \ ___/| |_\ ___/ / __ \_\___ \\ ___/ +// |____|_ /\___ >____/\___ >____ /____ >\___ > +// \/ \/ \/ \/ \/ \/ + +// NewReleaseForm form for creating release +type NewReleaseForm struct { + TagName string `binding:"Required;GitRefName;MaxSize(255)"` + Target string `form:"tag_target" binding:"Required;MaxSize(255)"` + Title string `binding:"Required;MaxSize(255)"` + Content string + Draft string + TagOnly string + Prerelease bool + AddTagMsg bool + Files []string +} + +// Validate validates the fields +func (f *NewReleaseForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// EditReleaseForm form for changing release +type EditReleaseForm struct { + Title string `form:"title" binding:"Required;MaxSize(255)"` + Content string `form:"content"` + Draft string `form:"draft"` + Prerelease bool `form:"prerelease"` + Files []string +} + +// Validate validates the fields +func (f *EditReleaseForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// __ __.__ __ .__ +// / \ / \__| | _|__| +// \ \/\/ / | |/ / | +// \ /| | <| | +// \__/\ / |__|__|_ \__| +// \/ \/ + +// NewWikiForm form for creating wiki +type NewWikiForm struct { + Title string `binding:"Required"` + Content string `binding:"Required"` + Message string +} + +// Validate validates the fields +// FIXME: use code generation to generate this method. +func (f *NewWikiForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ___________ .___.__ __ +// \_ _____/ __| _/|__|/ |_ +// | __)_ / __ | | \ __\ +// | \/ /_/ | | || | +// /_______ /\____ | |__||__| +// \/ \/ + +// EditRepoFileForm form for changing repository file +type EditRepoFileForm struct { + TreePath string `binding:"Required;MaxSize(500)"` + Content string + CommitSummary string `binding:"MaxSize(100)"` + CommitMessage string + CommitChoice string `binding:"Required;MaxSize(50)"` + NewBranchName string `binding:"GitRefName;MaxSize(100)"` + LastCommit string + Signoff bool +} + +// Validate validates the fields +func (f *EditRepoFileForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// EditPreviewDiffForm form for changing preview diff +type EditPreviewDiffForm struct { + Content string +} + +// Validate validates the fields +func (f *EditPreviewDiffForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ____ ___ .__ .___ +// | | \______ | | _________ __| _/ +// | | /\____ \| | / _ \__ \ / __ | +// | | / | |_> > |_( <_> ) __ \_/ /_/ | +// |______/ | __/|____/\____(____ /\____ | +// |__| \/ \/ +// + +// UploadRepoFileForm form for uploading repository file +type UploadRepoFileForm struct { + TreePath string `binding:"MaxSize(500)"` + CommitSummary string `binding:"MaxSize(100)"` + CommitMessage string + CommitChoice string `binding:"Required;MaxSize(50)"` + NewBranchName string `binding:"GitRefName;MaxSize(100)"` + Files []string + Signoff bool +} + +// Validate validates the fields +func (f *UploadRepoFileForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// RemoveUploadFileForm form for removing uploaded file +type RemoveUploadFileForm struct { + File string `binding:"Required;MaxSize(50)"` +} + +// Validate validates the fields +func (f *RemoveUploadFileForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ________ .__ __ +// \______ \ ____ | | _____/ |_ ____ +// | | \_/ __ \| | _/ __ \ __\/ __ \ +// | ` \ ___/| |_\ ___/| | \ ___/ +// /_______ /\___ >____/\___ >__| \___ > +// \/ \/ \/ \/ + +// DeleteRepoFileForm form for deleting repository file +type DeleteRepoFileForm struct { + CommitSummary string `binding:"MaxSize(100)"` + CommitMessage string + CommitChoice string `binding:"Required;MaxSize(50)"` + NewBranchName string `binding:"GitRefName;MaxSize(100)"` + LastCommit string + Signoff bool +} + +// Validate validates the fields +func (f *DeleteRepoFileForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ___________.__ ___________ __ +// \__ ___/|__| _____ ____ \__ ___/___________ ____ | | __ ___________ +// | | | |/ \_/ __ \ | | \_ __ \__ \ _/ ___\| |/ // __ \_ __ \ +// | | | | Y Y \ ___/ | | | | \// __ \\ \___| <\ ___/| | \/ +// |____| |__|__|_| /\___ > |____| |__| (____ /\___ >__|_ \\___ >__| +// \/ \/ \/ \/ \/ \/ + +// AddTimeManuallyForm form that adds spent time manually. +type AddTimeManuallyForm struct { + Hours int `binding:"Range(0,1000)"` + Minutes int `binding:"Range(0,1000)"` +} + +// Validate validates the fields +func (f *AddTimeManuallyForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// SaveTopicForm form for save topics for repository +type SaveTopicForm struct { + Topics []string `binding:"topics;Required;"` +} + +// DeadlineForm hold the validation rules for deadlines +type DeadlineForm struct { + DateString string `form:"date" binding:"Required;Size(10)"` +} + +// Validate validates the fields +func (f *DeadlineForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} diff --git a/modules/auth/repo_form_test.go b/services/forms/repo_form_test.go similarity index 99% rename from modules/auth/repo_form_test.go rename to services/forms/repo_form_test.go index 6bad5d50b..4f65d59ca 100644 --- a/modules/auth/repo_form_test.go +++ b/services/forms/repo_form_test.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE file. -package auth +package forms import ( "testing" diff --git a/services/forms/repo_tag_form.go b/services/forms/repo_tag_form.go new file mode 100644 index 000000000..337e7fe1e --- /dev/null +++ b/services/forms/repo_tag_form.go @@ -0,0 +1,27 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web/middleware" + + "gitea.com/go-chi/binding" +) + +// ProtectTagForm form for changing protected tag settings +type ProtectTagForm struct { + NamePattern string `binding:"Required;GlobOrRegexPattern"` + AllowlistUsers string + AllowlistTeams string +} + +// Validate validates the fields +func (f *ProtectTagForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} diff --git a/services/forms/user_form.go b/services/forms/user_form.go new file mode 100644 index 000000000..7d6b97693 --- /dev/null +++ b/services/forms/user_form.go @@ -0,0 +1,416 @@ +// Copyright 2014 The Gogs Authors. All rights reserved. +// Copyright 2018 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "mime/multipart" + "net/http" + "strings" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/structs" + "code.gitea.io/gitea/modules/web/middleware" + + "gitea.com/go-chi/binding" +) + +// InstallForm form for installation page +type InstallForm struct { + DbType string `binding:"Required"` + DbHost string + DbUser string + DbPasswd string + DbName string + SSLMode string + Charset string `binding:"Required;In(utf8,utf8mb4)"` + DbPath string + DbSchema string + + AppName string `binding:"Required" locale:"install.app_name"` + RepoRootPath string `binding:"Required"` + LFSRootPath string + RunUser string `binding:"Required"` + Domain string `binding:"Required"` + SSHPort int + HTTPPort string `binding:"Required"` + AppURL string `binding:"Required"` + LogRootPath string `binding:"Required"` + + SMTPHost string + SMTPFrom string + SMTPUser string `binding:"OmitEmpty;MaxSize(254)" locale:"install.mailer_user"` + SMTPPasswd string + RegisterConfirm bool + MailNotify bool + + OfflineMode bool + DisableGravatar bool + EnableFederatedAvatar bool + EnableOpenIDSignIn bool + EnableOpenIDSignUp bool + DisableRegistration bool + AllowOnlyExternalRegistration bool + EnableCaptcha bool + RequireSignInView bool + DefaultKeepEmailPrivate bool + DefaultAllowCreateOrganization bool + DefaultEnableTimetracking bool + NoReplyAddress string + + PasswordAlgorithm string + + AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"` + AdminPasswd string `binding:"OmitEmpty;MaxSize(255)" locale:"install.admin_password"` + AdminConfirmPasswd string + AdminEmail string `binding:"OmitEmpty;MinSize(3);MaxSize(254);Include(@)" locale:"install.admin_email"` +} + +// Validate validates the fields +func (f *InstallForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// _____ ____ _________________ ___ +// / _ \ | | \__ ___/ | \ +// / /_\ \| | / | | / ~ \ +// / | \ | / | | \ Y / +// \____|__ /______/ |____| \___|_ / +// \/ \/ + +// RegisterForm form for registering +type RegisterForm struct { + UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"` + Email string `binding:"Required;Email;MaxSize(254)"` + Password string `binding:"MaxSize(255)"` + Retype string + GRecaptchaResponse string `form:"g-recaptcha-response"` + HcaptchaResponse string `form:"h-captcha-response"` +} + +// Validate validates the fields +func (f *RegisterForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// IsEmailDomainListed checks whether the domain of an email address +// matches a list of domains +func IsEmailDomainListed(list []string, email string) bool { + if len(list) == 0 { + return false + } + + n := strings.LastIndex(email, "@") + if n <= 0 { + return false + } + + domain := strings.ToLower(email[n+1:]) + + for _, v := range list { + if strings.ToLower(v) == domain { + return true + } + } + + return false +} + +// IsEmailDomainAllowed validates that the email address +// provided by the user matches what has been configured . +// The email is marked as allowed if it matches any of the +// domains in the whitelist or if it doesn't match any of +// domains in the blocklist, if any such list is not empty. +func (f RegisterForm) IsEmailDomainAllowed() bool { + if len(setting.Service.EmailDomainWhitelist) == 0 { + return !IsEmailDomainListed(setting.Service.EmailDomainBlocklist, f.Email) + } + + return IsEmailDomainListed(setting.Service.EmailDomainWhitelist, f.Email) +} + +// MustChangePasswordForm form for updating your password after account creation +// by an admin +type MustChangePasswordForm struct { + Password string `binding:"Required;MaxSize(255)"` + Retype string +} + +// Validate validates the fields +func (f *MustChangePasswordForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// SignInForm form for signing in with user/password +type SignInForm struct { + UserName string `binding:"Required;MaxSize(254)"` + // TODO remove required from password for SecondFactorAuthentication + Password string `binding:"Required;MaxSize(255)"` + Remember bool +} + +// Validate validates the fields +func (f *SignInForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// AuthorizationForm form for authorizing oauth2 clients +type AuthorizationForm struct { + ResponseType string `binding:"Required;In(code)"` + ClientID string `binding:"Required"` + RedirectURI string + State string + Scope string + Nonce string + + // PKCE support + CodeChallengeMethod string // S256, plain + CodeChallenge string +} + +// Validate validates the fields +func (f *AuthorizationForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// GrantApplicationForm form for authorizing oauth2 clients +type GrantApplicationForm struct { + ClientID string `binding:"Required"` + RedirectURI string + State string + Scope string + Nonce string +} + +// Validate validates the fields +func (f *GrantApplicationForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// AccessTokenForm for issuing access tokens from authorization codes or refresh tokens +type AccessTokenForm struct { + GrantType string `json:"grant_type"` + ClientID string `json:"client_id"` + ClientSecret string `json:"client_secret"` + RedirectURI string `json:"redirect_uri"` + Code string `json:"code"` + RefreshToken string `json:"refresh_token"` + + // PKCE support + CodeVerifier string `json:"code_verifier"` +} + +// Validate validates the fields +func (f *AccessTokenForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// IntrospectTokenForm for introspecting tokens +type IntrospectTokenForm struct { + Token string `json:"token"` +} + +// Validate validates the fields +func (f *IntrospectTokenForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// __________________________________________.___ _______ ________ _________ +// / _____/\_ _____/\__ ___/\__ ___/| |\ \ / _____/ / _____/ +// \_____ \ | __)_ | | | | | |/ | \/ \ ___ \_____ \ +// / \ | \ | | | | | / | \ \_\ \/ \ +// /_______ //_______ / |____| |____| |___\____|__ /\______ /_______ / +// \/ \/ \/ \/ \/ + +// UpdateProfileForm form for updating profile +type UpdateProfileForm struct { + Name string `binding:"AlphaDashDot;MaxSize(40)"` + FullName string `binding:"MaxSize(100)"` + KeepEmailPrivate bool + Website string `binding:"ValidSiteUrl;MaxSize(255)"` + Location string `binding:"MaxSize(50)"` + Language string + Description string `binding:"MaxSize(255)"` + Visibility structs.VisibleType + KeepActivityPrivate bool +} + +// Validate validates the fields +func (f *UpdateProfileForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// Avatar types +const ( + AvatarLocal string = "local" + AvatarByMail string = "bymail" +) + +// AvatarForm form for changing avatar +type AvatarForm struct { + Source string + Avatar *multipart.FileHeader + Gravatar string `binding:"OmitEmpty;Email;MaxSize(254)"` + Federavatar bool +} + +// Validate validates the fields +func (f *AvatarForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// AddEmailForm form for adding new email +type AddEmailForm struct { + Email string `binding:"Required;Email;MaxSize(254)"` +} + +// Validate validates the fields +func (f *AddEmailForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// UpdateThemeForm form for updating a users' theme +type UpdateThemeForm struct { + Theme string `binding:"Required;MaxSize(30)"` +} + +// Validate validates the field +func (f *UpdateThemeForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// IsThemeExists checks if the theme is a theme available in the config. +func (f UpdateThemeForm) IsThemeExists() bool { + var exists bool + + for _, v := range setting.UI.Themes { + if strings.EqualFold(v, f.Theme) { + exists = true + break + } + } + + return exists +} + +// ChangePasswordForm form for changing password +type ChangePasswordForm struct { + OldPassword string `form:"old_password" binding:"MaxSize(255)"` + Password string `form:"password" binding:"Required;MaxSize(255)"` + Retype string `form:"retype"` +} + +// Validate validates the fields +func (f *ChangePasswordForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// AddOpenIDForm is for changing openid uri +type AddOpenIDForm struct { + Openid string `binding:"Required;MaxSize(256)"` +} + +// Validate validates the fields +func (f *AddOpenIDForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// AddKeyForm form for adding SSH/GPG key +type AddKeyForm struct { + Type string `binding:"OmitEmpty"` + Title string `binding:"Required;MaxSize(50)"` + Content string `binding:"Required"` + Signature string `binding:"OmitEmpty"` + KeyID string `binding:"OmitEmpty"` + IsWritable bool +} + +// Validate validates the fields +func (f *AddKeyForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// NewAccessTokenForm form for creating access token +type NewAccessTokenForm struct { + Name string `binding:"Required;MaxSize(255)"` +} + +// Validate validates the fields +func (f *NewAccessTokenForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// EditOAuth2ApplicationForm form for editing oauth2 applications +type EditOAuth2ApplicationForm struct { + Name string `binding:"Required;MaxSize(255)" form:"application_name"` + RedirectURI string `binding:"Required" form:"redirect_uri"` +} + +// Validate validates the fields +func (f *EditOAuth2ApplicationForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// TwoFactorAuthForm for logging in with 2FA token. +type TwoFactorAuthForm struct { + Passcode string `binding:"Required"` +} + +// Validate validates the fields +func (f *TwoFactorAuthForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// TwoFactorScratchAuthForm for logging in with 2FA scratch token. +type TwoFactorScratchAuthForm struct { + Token string `binding:"Required"` +} + +// Validate validates the fields +func (f *TwoFactorScratchAuthForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// U2FRegistrationForm for reserving an U2F name +type U2FRegistrationForm struct { + Name string `binding:"Required"` +} + +// Validate validates the fields +func (f *U2FRegistrationForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// U2FDeleteForm for deleting U2F keys +type U2FDeleteForm struct { + ID int64 `binding:"Required"` +} + +// Validate validates the fields +func (f *U2FDeleteForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} diff --git a/services/forms/user_form_auth_openid.go b/services/forms/user_form_auth_openid.go new file mode 100644 index 000000000..b34f9dcc9 --- /dev/null +++ b/services/forms/user_form_auth_openid.go @@ -0,0 +1,51 @@ +// Copyright 2017 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "net/http" + + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/web/middleware" + "gitea.com/go-chi/binding" +) + +// SignInOpenIDForm form for signing in with OpenID +type SignInOpenIDForm struct { + Openid string `binding:"Required;MaxSize(256)"` + Remember bool +} + +// Validate validates the fields +func (f *SignInOpenIDForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// SignUpOpenIDForm form for signin up with OpenID +type SignUpOpenIDForm struct { + UserName string `binding:"Required;AlphaDashDot;MaxSize(40)"` + Email string `binding:"Required;Email;MaxSize(254)"` + GRecaptchaResponse string `form:"g-recaptcha-response"` + HcaptchaResponse string `form:"h-captcha-response"` +} + +// Validate validates the fields +func (f *SignUpOpenIDForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} + +// ConnectOpenIDForm form for connecting an existing account to an OpenID URI +type ConnectOpenIDForm struct { + UserName string `binding:"Required;MaxSize(254)"` + Password string `binding:"Required;MaxSize(255)"` +} + +// Validate validates the fields +func (f *ConnectOpenIDForm) Validate(req *http.Request, errs binding.Errors) binding.Errors { + ctx := context.GetContext(req) + return middleware.Validate(errs, ctx.Data, f, ctx.Locale) +} diff --git a/services/forms/user_form_test.go b/services/forms/user_form_test.go new file mode 100644 index 000000000..9f67143d1 --- /dev/null +++ b/services/forms/user_form_test.go @@ -0,0 +1,86 @@ +// Copyright 2018 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package forms + +import ( + "testing" + + "code.gitea.io/gitea/modules/setting" + + "github.com/stretchr/testify/assert" +) + +func TestRegisterForm_IsDomainAllowed_Empty(t *testing.T) { + _ = setting.Service + + setting.Service.EmailDomainWhitelist = []string{} + + form := RegisterForm{} + + assert.True(t, form.IsEmailDomainAllowed()) +} + +func TestRegisterForm_IsDomainAllowed_InvalidEmail(t *testing.T) { + _ = setting.Service + + setting.Service.EmailDomainWhitelist = []string{"gitea.io"} + + tt := []struct { + email string + }{ + {"securitygieqqq"}, + {"hdudhdd"}, + } + + for _, v := range tt { + form := RegisterForm{Email: v.email} + + assert.False(t, form.IsEmailDomainAllowed()) + } +} + +func TestRegisterForm_IsDomainAllowed_WhitelistedEmail(t *testing.T) { + _ = setting.Service + + setting.Service.EmailDomainWhitelist = []string{"gitea.io"} + + tt := []struct { + email string + valid bool + }{ + {"security@gitea.io", true}, + {"security@gITea.io", true}, + {"hdudhdd", false}, + {"seee@example.com", false}, + } + + for _, v := range tt { + form := RegisterForm{Email: v.email} + + assert.Equal(t, v.valid, form.IsEmailDomainAllowed()) + } +} + +func TestRegisterForm_IsDomainAllowed_BlocklistedEmail(t *testing.T) { + _ = setting.Service + + setting.Service.EmailDomainWhitelist = []string{} + setting.Service.EmailDomainBlocklist = []string{"gitea.io"} + + tt := []struct { + email string + valid bool + }{ + {"security@gitea.io", false}, + {"security@gitea.example", true}, + {"hdudhdd", true}, + } + + for _, v := range tt { + form := RegisterForm{Email: v.email} + + assert.Equal(t, v.valid, form.IsEmailDomainAllowed()) + } +} diff --git a/services/gitdiff/csv.go b/services/gitdiff/csv.go new file mode 100644 index 000000000..f4310d877 --- /dev/null +++ b/services/gitdiff/csv.go @@ -0,0 +1,379 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitdiff + +import ( + "encoding/csv" + "errors" + "io" + + "code.gitea.io/gitea/modules/util" +) + +const unmappedColumn = -1 +const maxRowsToInspect int = 10 +const minRatioToMatch float32 = 0.8 + +// TableDiffCellType represents the type of a TableDiffCell. +type TableDiffCellType uint8 + +// TableDiffCellType possible values. +const ( + TableDiffCellEqual TableDiffCellType = iota + 1 + TableDiffCellChanged + TableDiffCellAdd + TableDiffCellDel +) + +// TableDiffCell represents a cell of a TableDiffRow +type TableDiffCell struct { + LeftCell string + RightCell string + Type TableDiffCellType +} + +// TableDiffRow represents a row of a TableDiffSection. +type TableDiffRow struct { + RowIdx int + Cells []*TableDiffCell +} + +// TableDiffSection represents a section of a DiffFile. +type TableDiffSection struct { + Rows []*TableDiffRow +} + +// csvReader wraps a csv.Reader which buffers the first rows. +type csvReader struct { + reader *csv.Reader + buffer [][]string + line int + eof bool +} + +// createCsvReader creates a csvReader and fills the buffer +func createCsvReader(reader *csv.Reader, bufferRowCount int) (*csvReader, error) { + csv := &csvReader{reader: reader} + csv.buffer = make([][]string, bufferRowCount) + for i := 0; i < bufferRowCount && !csv.eof; i++ { + row, err := csv.readNextRow() + if err != nil { + return nil, err + } + csv.buffer[i] = row + } + csv.line = bufferRowCount + return csv, nil +} + +// GetRow gets a row from the buffer if present or advances the reader to the requested row. On the end of the file only nil gets returned. +func (csv *csvReader) GetRow(row int) ([]string, error) { + if row < len(csv.buffer) { + return csv.buffer[row], nil + } + if csv.eof { + return nil, nil + } + for { + fields, err := csv.readNextRow() + if err != nil { + return nil, err + } + if csv.eof { + return nil, nil + } + csv.line++ + if csv.line-1 == row { + return fields, nil + } + } +} + +func (csv *csvReader) readNextRow() ([]string, error) { + if csv.eof { + return nil, nil + } + row, err := csv.reader.Read() + if err != nil { + if err != io.EOF { + return nil, err + } + csv.eof = true + } + return row, nil +} + +// CreateCsvDiff creates a tabular diff based on two CSV readers. +func CreateCsvDiff(diffFile *DiffFile, baseReader *csv.Reader, headReader *csv.Reader) ([]*TableDiffSection, error) { + if baseReader != nil && headReader != nil { + return createCsvDiff(diffFile, baseReader, headReader) + } + + if baseReader != nil { + return createCsvDiffSingle(baseReader, TableDiffCellDel) + } + return createCsvDiffSingle(headReader, TableDiffCellAdd) +} + +// createCsvDiffSingle creates a tabular diff based on a single CSV reader. All cells are added or deleted. +func createCsvDiffSingle(reader *csv.Reader, celltype TableDiffCellType) ([]*TableDiffSection, error) { + var rows []*TableDiffRow + i := 1 + for { + row, err := reader.Read() + if err != nil { + if err == io.EOF { + break + } + return nil, err + } + cells := make([]*TableDiffCell, len(row)) + for j := 0; j < len(row); j++ { + cells[j] = &TableDiffCell{LeftCell: row[j], Type: celltype} + } + rows = append(rows, &TableDiffRow{RowIdx: i, Cells: cells}) + i++ + } + + return []*TableDiffSection{{Rows: rows}}, nil +} + +func createCsvDiff(diffFile *DiffFile, baseReader *csv.Reader, headReader *csv.Reader) ([]*TableDiffSection, error) { + a, err := createCsvReader(baseReader, maxRowsToInspect) + if err != nil { + return nil, err + } + + b, err := createCsvReader(headReader, maxRowsToInspect) + if err != nil { + return nil, err + } + + a2b, b2a := getColumnMapping(a, b) + + columns := len(a2b) + countUnmappedColumns(b2a) + if len(a2b) < len(b2a) { + columns = len(b2a) + countUnmappedColumns(a2b) + } + + createDiffRow := func(aline int, bline int) (*TableDiffRow, error) { + cells := make([]*TableDiffCell, columns) + + if aline == 0 || bline == 0 { + var ( + row []string + celltype TableDiffCellType + err error + ) + if bline == 0 { + row, err = a.GetRow(aline - 1) + celltype = TableDiffCellDel + } else { + row, err = b.GetRow(bline - 1) + celltype = TableDiffCellAdd + } + if err != nil { + return nil, err + } + if row == nil { + return nil, nil + } + for i := 0; i < len(row); i++ { + cells[i] = &TableDiffCell{LeftCell: row[i], Type: celltype} + } + return &TableDiffRow{RowIdx: bline, Cells: cells}, nil + } + + arow, err := a.GetRow(aline - 1) + if err != nil { + return nil, err + } + brow, err := b.GetRow(bline - 1) + if err != nil { + return nil, err + } + if len(arow) == 0 && len(brow) == 0 { + return nil, nil + } + + for i := 0; i < len(a2b); i++ { + acell, _ := getCell(arow, i) + if a2b[i] == unmappedColumn { + cells[i] = &TableDiffCell{LeftCell: acell, Type: TableDiffCellDel} + } else { + bcell, _ := getCell(brow, a2b[i]) + + celltype := TableDiffCellChanged + if acell == bcell { + celltype = TableDiffCellEqual + } + + cells[i] = &TableDiffCell{LeftCell: acell, RightCell: bcell, Type: celltype} + } + } + for i := 0; i < len(b2a); i++ { + if b2a[i] == unmappedColumn { + bcell, _ := getCell(brow, i) + cells[i] = &TableDiffCell{LeftCell: bcell, Type: TableDiffCellAdd} + } + } + + return &TableDiffRow{RowIdx: bline, Cells: cells}, nil + } + + var sections []*TableDiffSection + + for i, section := range diffFile.Sections { + var rows []*TableDiffRow + lines := tryMergeLines(section.Lines) + for j, line := range lines { + if i == 0 && j == 0 && (line[0] != 1 || line[1] != 1) { + diffRow, err := createDiffRow(1, 1) + if err != nil { + return nil, err + } + if diffRow != nil { + rows = append(rows, diffRow) + } + } + diffRow, err := createDiffRow(line[0], line[1]) + if err != nil { + return nil, err + } + if diffRow != nil { + rows = append(rows, diffRow) + } + } + + if len(rows) > 0 { + sections = append(sections, &TableDiffSection{Rows: rows}) + } + } + + return sections, nil +} + +// getColumnMapping creates a mapping of columns between a and b +func getColumnMapping(a *csvReader, b *csvReader) ([]int, []int) { + arow, _ := a.GetRow(0) + brow, _ := b.GetRow(0) + + a2b := []int{} + b2a := []int{} + + if arow != nil { + a2b = make([]int, len(arow)) + } + if brow != nil { + b2a = make([]int, len(brow)) + } + + for i := 0; i < len(b2a); i++ { + b2a[i] = unmappedColumn + } + + bcol := 0 + for i := 0; i < len(a2b); i++ { + a2b[i] = unmappedColumn + + acell, ea := getCell(arow, i) + if ea == nil { + for j := bcol; j < len(b2a); j++ { + bcell, eb := getCell(brow, j) + if eb == nil && acell == bcell { + a2b[i] = j + b2a[j] = i + bcol = j + 1 + break + } + } + } + } + + tryMapColumnsByContent(a, a2b, b, b2a) + tryMapColumnsByContent(b, b2a, a, a2b) + + return a2b, b2a +} + +// tryMapColumnsByContent tries to map missing columns by the content of the first lines. +func tryMapColumnsByContent(a *csvReader, a2b []int, b *csvReader, b2a []int) { + start := 0 + for i := 0; i < len(a2b); i++ { + if a2b[i] == unmappedColumn { + if b2a[start] == unmappedColumn { + rows := util.Min(maxRowsToInspect, util.Max(0, util.Min(len(a.buffer), len(b.buffer))-1)) + same := 0 + for j := 1; j <= rows; j++ { + acell, ea := getCell(a.buffer[j], i) + bcell, eb := getCell(b.buffer[j], start+1) + if ea == nil && eb == nil && acell == bcell { + same++ + } + } + if (float32(same) / float32(rows)) > minRatioToMatch { + a2b[i] = start + 1 + b2a[start+1] = i + } + } + } + start = a2b[i] + } +} + +// getCell returns the specific cell or nil if not present. +func getCell(row []string, column int) (string, error) { + if column < len(row) { + return row[column], nil + } + return "", errors.New("Undefined column") +} + +// countUnmappedColumns returns the count of unmapped columns. +func countUnmappedColumns(mapping []int) int { + count := 0 + for i := 0; i < len(mapping); i++ { + if mapping[i] == unmappedColumn { + count++ + } + } + return count +} + +// tryMergeLines maps the separated line numbers of a git diff. The result is assumed to be ordered. +func tryMergeLines(lines []*DiffLine) [][2]int { + ids := make([][2]int, len(lines)) + + i := 0 + for _, line := range lines { + if line.Type != DiffLineSection { + ids[i][0] = line.LeftIdx + ids[i][1] = line.RightIdx + i++ + } + } + + ids = ids[:i] + + result := make([][2]int, len(ids)) + + j := 0 + for i = 0; i < len(ids); i++ { + if ids[i][0] == 0 { + if j > 0 && result[j-1][1] == 0 { + temp := j + for temp > 0 && result[temp-1][1] == 0 { + temp-- + } + result[temp][1] = ids[i][1] + continue + } + } + result[j] = ids[i] + j++ + } + + return result[:j] +} diff --git a/services/gitdiff/csv_test.go b/services/gitdiff/csv_test.go new file mode 100644 index 000000000..fb84d6ed0 --- /dev/null +++ b/services/gitdiff/csv_test.go @@ -0,0 +1,125 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package gitdiff + +import ( + "encoding/csv" + "strings" + "testing" + + csv_module "code.gitea.io/gitea/modules/csv" + "code.gitea.io/gitea/modules/setting" + "github.com/stretchr/testify/assert" +) + +func TestCSVDiff(t *testing.T) { + var cases = []struct { + diff string + base string + head string + cells [][2]TableDiffCellType + }{ + // case 0 + { + diff: `diff --git a/unittest.csv b/unittest.csv +--- a/unittest.csv ++++ b/unittest.csv +@@ -0,0 +1,2 @@ ++col1,col2 ++a,a`, + base: "", + head: "col1,col2\na,a", + cells: [][2]TableDiffCellType{{TableDiffCellAdd, TableDiffCellAdd}, {TableDiffCellAdd, TableDiffCellAdd}}, + }, + // case 1 + { + diff: `diff --git a/unittest.csv b/unittest.csv +--- a/unittest.csv ++++ b/unittest.csv +@@ -1,2 +1,3 @@ + col1,col2 +-a,a ++a,a ++b,b`, + base: "col1,col2\na,a", + head: "col1,col2\na,a\nb,b", + cells: [][2]TableDiffCellType{{TableDiffCellEqual, TableDiffCellEqual}, {TableDiffCellEqual, TableDiffCellEqual}, {TableDiffCellAdd, TableDiffCellAdd}}, + }, + // case 2 + { + diff: `diff --git a/unittest.csv b/unittest.csv +--- a/unittest.csv ++++ b/unittest.csv +@@ -1,3 +1,2 @@ + col1,col2 +-a,a + b,b`, + base: "col1,col2\na,a\nb,b", + head: "col1,col2\nb,b", + cells: [][2]TableDiffCellType{{TableDiffCellEqual, TableDiffCellEqual}, {TableDiffCellDel, TableDiffCellDel}, {TableDiffCellEqual, TableDiffCellEqual}}, + }, + // case 3 + { + diff: `diff --git a/unittest.csv b/unittest.csv +--- a/unittest.csv ++++ b/unittest.csv +@@ -1,2 +1,2 @@ + col1,col2 +-b,b ++b,c`, + base: "col1,col2\nb,b", + head: "col1,col2\nb,c", + cells: [][2]TableDiffCellType{{TableDiffCellEqual, TableDiffCellEqual}, {TableDiffCellEqual, TableDiffCellChanged}}, + }, + // case 4 + { + diff: `diff --git a/unittest.csv b/unittest.csv +--- a/unittest.csv ++++ b/unittest.csv +@@ -1,2 +0,0 @@ +-col1,col2 +-b,c`, + base: "col1,col2\nb,c", + head: "", + cells: [][2]TableDiffCellType{{TableDiffCellDel, TableDiffCellDel}, {TableDiffCellDel, TableDiffCellDel}}, + }, + } + + for n, c := range cases { + diff, err := ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, strings.NewReader(c.diff)) + if err != nil { + t.Errorf("ParsePatch failed: %s", err) + } + + var baseReader *csv.Reader + if len(c.base) > 0 { + baseReader, err = csv_module.CreateReaderAndGuessDelimiter(strings.NewReader(c.base)) + if err != nil { + t.Errorf("CreateReaderAndGuessDelimiter failed: %s", err) + } + } + var headReader *csv.Reader + if len(c.head) > 0 { + headReader, err = csv_module.CreateReaderAndGuessDelimiter(strings.NewReader(c.head)) + if err != nil { + t.Errorf("CreateReaderAndGuessDelimiter failed: %s", err) + } + } + + result, err := CreateCsvDiff(diff.Files[0], baseReader, headReader) + assert.NoError(t, err) + assert.Len(t, result, 1, "case %d: should be one section", n) + + section := result[0] + assert.Len(t, section.Rows, len(c.cells), "case %d: should be %d rows", n, len(c.cells)) + + for i, row := range section.Rows { + assert.Len(t, row.Cells, 2, "case %d: row %d should have two cells", n, i) + for j, cell := range row.Cells { + assert.Equal(t, c.cells[i][j], cell.Type, "case %d: row %d cell %d should be equal", n, i, j) + } + } + } +} diff --git a/services/gitdiff/gitdiff.go b/services/gitdiff/gitdiff.go index 81b92f716..c1d1c40d3 100644 --- a/services/gitdiff/gitdiff.go +++ b/services/gitdiff/gitdiff.go @@ -20,17 +20,20 @@ import ( "regexp" "sort" "strings" + "time" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/charset" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/highlight" + "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/process" "code.gitea.io/gitea/modules/setting" "github.com/sergi/go-diff/diffmatchpatch" stdcharset "golang.org/x/net/html/charset" + "golang.org/x/text/encoding" "golang.org/x/text/transform" ) @@ -73,6 +76,7 @@ const ( type DiffLine struct { LeftIdx int RightIdx int + Match int Type DiffLineType Content string Comments []*models.Comment @@ -182,6 +186,8 @@ var ( removedCodePrefix = []byte(``) codeTagSuffix = []byte(``) ) + +var unfinishedtagRegex = regexp.MustCompile(`<[^>]*$`) var trailingSpanRegex = regexp.MustCompile(`]?$`) var entityRegex = regexp.MustCompile(`&[#]*?[0-9[:alpha:]]*$`) @@ -196,10 +202,218 @@ func shouldWriteInline(diff diffmatchpatch.Diff, lineType DiffLineType) bool { return false } +func fixupBrokenSpans(diffs []diffmatchpatch.Diff) []diffmatchpatch.Diff { + + // Create a new array to store our fixed up blocks + fixedup := make([]diffmatchpatch.Diff, 0, len(diffs)) + + // semantically label some numbers + const insert, delete, equal = 0, 1, 2 + + // record the positions of the last type of each block in the fixedup blocks + last := []int{-1, -1, -1} + operation := []diffmatchpatch.Operation{diffmatchpatch.DiffInsert, diffmatchpatch.DiffDelete, diffmatchpatch.DiffEqual} + + // create a writer for insert and deletes + toWrite := []strings.Builder{ + {}, + {}, + } + + // make some flags for insert and delete + unfinishedTag := []bool{false, false} + unfinishedEnt := []bool{false, false} + + // store stores the provided text in the writer for the typ + store := func(text string, typ int) { + (&(toWrite[typ])).WriteString(text) + } + + // hasStored returns true if there is stored content + hasStored := func(typ int) bool { + return (&toWrite[typ]).Len() > 0 + } + + // stored will return that content + stored := func(typ int) string { + return (&toWrite[typ]).String() + } + + // empty will empty the stored content + empty := func(typ int) { + (&toWrite[typ]).Reset() + } + + // pop will remove the stored content appending to a diff block for that typ + pop := func(typ int, fixedup []diffmatchpatch.Diff) []diffmatchpatch.Diff { + if hasStored(typ) { + if last[typ] > last[equal] { + fixedup[last[typ]].Text += stored(typ) + } else { + fixedup = append(fixedup, diffmatchpatch.Diff{ + Type: operation[typ], + Text: stored(typ), + }) + } + empty(typ) + } + return fixedup + } + + // Now we walk the provided diffs and check the type of each block in turn + for _, diff := range diffs { + + typ := delete // flag for handling insert or delete typs + switch diff.Type { + case diffmatchpatch.DiffEqual: + // First check if there is anything stored + if hasStored(insert) || hasStored(delete) { + // There are two reasons for storing content: + // 1. Unfinished Entity <- Could be more efficient here by not doing this if we're looking for a tag + if unfinishedEnt[insert] || unfinishedEnt[delete] { + // we look for a ';' to finish an entity + idx := strings.IndexRune(diff.Text, ';') + if idx >= 0 { + // if we find a ';' store the preceding content to both insert and delete + store(diff.Text[:idx+1], insert) + store(diff.Text[:idx+1], delete) + + // and remove it from this block + diff.Text = diff.Text[idx+1:] + + // reset the ent flags + unfinishedEnt[insert] = false + unfinishedEnt[delete] = false + } else { + // otherwise store it all on insert and delete + store(diff.Text, insert) + store(diff.Text, delete) + // and empty this block + diff.Text = "" + } + } + // 2. Unfinished Tag + if unfinishedTag[insert] || unfinishedTag[delete] { + // we look for a '>' to finish a tag + idx := strings.IndexRune(diff.Text, '>') + if idx >= 0 { + store(diff.Text[:idx+1], insert) + store(diff.Text[:idx+1], delete) + diff.Text = diff.Text[idx+1:] + unfinishedTag[insert] = false + unfinishedTag[delete] = false + } else { + store(diff.Text, insert) + store(diff.Text, delete) + diff.Text = "" + } + } + + // If we've completed the required tag/entities + if !(unfinishedTag[insert] || unfinishedTag[delete] || unfinishedEnt[insert] || unfinishedEnt[delete]) { + // pop off the stack + fixedup = pop(insert, fixedup) + fixedup = pop(delete, fixedup) + } + + // If that has left this diff block empty then shortcut + if len(diff.Text) == 0 { + continue + } + } + + // check if this block ends in an unfinished tag? + idx := unfinishedtagRegex.FindStringIndex(diff.Text) + if idx != nil { + unfinishedTag[insert] = true + unfinishedTag[delete] = true + } else { + // otherwise does it end in an unfinished entity? + idx = entityRegex.FindStringIndex(diff.Text) + if idx != nil { + unfinishedEnt[insert] = true + unfinishedEnt[delete] = true + } + } + + // If there is an unfinished component + if idx != nil { + // Store the fragment + store(diff.Text[idx[0]:], insert) + store(diff.Text[idx[0]:], delete) + // and remove it from this block + diff.Text = diff.Text[:idx[0]] + } + + // If that hasn't left the block empty + if len(diff.Text) > 0 { + // store the position of the last equal block and store it in our diffs + last[equal] = len(fixedup) + fixedup = append(fixedup, diff) + } + continue + case diffmatchpatch.DiffInsert: + typ = insert + fallthrough + case diffmatchpatch.DiffDelete: + // First check if there is anything stored for this type + if hasStored(typ) { + // if there is prepend it to this block, empty the storage and reset our flags + diff.Text = stored(typ) + diff.Text + empty(typ) + unfinishedEnt[typ] = false + unfinishedTag[typ] = false + } + + // check if this block ends in an unfinished tag + idx := unfinishedtagRegex.FindStringIndex(diff.Text) + if idx != nil { + unfinishedTag[typ] = true + } else { + // otherwise does it end in an unfinished entity + idx = entityRegex.FindStringIndex(diff.Text) + if idx != nil { + unfinishedEnt[typ] = true + } + } + + // If there is an unfinished component + if idx != nil { + // Store the fragment + store(diff.Text[idx[0]:], typ) + // and remove it from this block + diff.Text = diff.Text[:idx[0]] + } + + // If that hasn't left the block empty + if len(diff.Text) > 0 { + // if the last block of this type was after the last equal block + if last[typ] > last[equal] { + // store this blocks content on that block + fixedup[last[typ]].Text += diff.Text + } else { + // otherwise store the position of the last block of this type and store the block + last[typ] = len(fixedup) + fixedup = append(fixedup, diff) + } + } + continue + } + } + + // pop off any remaining stored content + fixedup = pop(insert, fixedup) + fixedup = pop(delete, fixedup) + + return fixedup +} + func diffToHTML(fileName string, diffs []diffmatchpatch.Diff, lineType DiffLineType) template.HTML { buf := bytes.NewBuffer(nil) match := "" + diffs = fixupBrokenSpans(diffs) + for _, diff := range diffs { if shouldWriteInline(diff, lineType) { if len(match) > 0 { @@ -363,20 +577,22 @@ func (diffSection *DiffSection) GetComputedInlineDiffFor(diffLine *DiffLine) tem // DiffFile represents a file diff. type DiffFile struct { - Name string - OldName string - Index int - Addition, Deletion int - Type DiffFileType - IsCreated bool - IsDeleted bool - IsBin bool - IsLFSFile bool - IsRenamed bool - IsSubmodule bool - Sections []*DiffSection - IsIncomplete bool - IsProtected bool + Name string + OldName string + Index int + Addition, Deletion int + Type DiffFileType + IsCreated bool + IsDeleted bool + IsBin bool + IsLFSFile bool + IsRenamed bool + IsAmbiguous bool + IsSubmodule bool + Sections []*DiffSection + IsIncomplete bool + IsIncompleteLineTooLong bool + IsProtected bool } // GetType returns type of diff file. @@ -566,12 +782,32 @@ parsingLoop: if strings.HasSuffix(line, " 160000\n") { curFile.IsSubmodule = true } + case strings.HasPrefix(line, "rename from "): + curFile.IsRenamed = true + curFile.Type = DiffFileRename + if curFile.IsAmbiguous { + curFile.OldName = line[len("rename from ") : len(line)-1] + } + case strings.HasPrefix(line, "rename to "): + curFile.IsRenamed = true + curFile.Type = DiffFileRename + if curFile.IsAmbiguous { + curFile.Name = line[len("rename to ") : len(line)-1] + curFile.IsAmbiguous = false + } case strings.HasPrefix(line, "copy from "): curFile.IsRenamed = true curFile.Type = DiffFileCopy + if curFile.IsAmbiguous { + curFile.OldName = line[len("copy from ") : len(line)-1] + } case strings.HasPrefix(line, "copy to "): curFile.IsRenamed = true curFile.Type = DiffFileCopy + if curFile.IsAmbiguous { + curFile.Name = line[len("copy to ") : len(line)-1] + curFile.IsAmbiguous = false + } case strings.HasPrefix(line, "new file"): curFile.Type = DiffFileAdd curFile.IsCreated = true @@ -593,9 +829,35 @@ parsingLoop: case strings.HasPrefix(line, "Binary"): curFile.IsBin = true case strings.HasPrefix(line, "--- "): - // Do nothing with this line + // Handle ambiguous filenames + if curFile.IsAmbiguous { + if len(line) > 6 && line[4] == 'a' { + curFile.OldName = line[6 : len(line)-1] + if line[len(line)-2] == '\t' { + curFile.OldName = curFile.OldName[:len(curFile.OldName)-1] + } + } else { + curFile.OldName = "" + } + } + // Otherwise do nothing with this line case strings.HasPrefix(line, "+++ "): - // Do nothing with this line + // Handle ambiguous filenames + if curFile.IsAmbiguous { + if len(line) > 6 && line[4] == 'b' { + curFile.Name = line[6 : len(line)-1] + if line[len(line)-2] == '\t' { + curFile.Name = curFile.Name[:len(curFile.Name)-1] + } + if curFile.OldName == "" { + curFile.OldName = curFile.Name + } + } else { + curFile.Name = curFile.OldName + } + curFile.IsAmbiguous = false + } + // Otherwise do nothing with this line, but now switch to parsing hunks lineBytes, isFragment, err := parseHunks(curFile, maxLines, maxLineCharacters, input) diff.TotalAddition += curFile.Addition diff.TotalDeletion += curFile.Deletion @@ -624,35 +886,46 @@ parsingLoop: } - // FIXME: There are numerous issues with this: + // TODO: There are numerous issues with this: // - we might want to consider detecting encoding while parsing but... // - we're likely to fail to get the correct encoding here anyway as we won't have enough information - // - and this doesn't really account for changes in encoding - var buf bytes.Buffer + var diffLineTypeBuffers = make(map[DiffLineType]*bytes.Buffer, 3) + var diffLineTypeDecoders = make(map[DiffLineType]*encoding.Decoder, 3) + diffLineTypeBuffers[DiffLinePlain] = new(bytes.Buffer) + diffLineTypeBuffers[DiffLineAdd] = new(bytes.Buffer) + diffLineTypeBuffers[DiffLineDel] = new(bytes.Buffer) for _, f := range diff.Files { - buf.Reset() + for _, buffer := range diffLineTypeBuffers { + buffer.Reset() + } for _, sec := range f.Sections { for _, l := range sec.Lines { if l.Type == DiffLineSection { continue } - buf.WriteString(l.Content[1:]) - buf.WriteString("\n") + diffLineTypeBuffers[l.Type].WriteString(l.Content[1:]) + diffLineTypeBuffers[l.Type].WriteString("\n") } } - charsetLabel, err := charset.DetectEncoding(buf.Bytes()) - if charsetLabel != "UTF-8" && err == nil { - encoding, _ := stdcharset.Lookup(charsetLabel) - if encoding != nil { - d := encoding.NewDecoder() - for _, sec := range f.Sections { - for _, l := range sec.Lines { - if l.Type == DiffLineSection { - continue - } - if c, _, err := transform.String(d, l.Content[1:]); err == nil { - l.Content = l.Content[0:1] + c - } + for lineType, buffer := range diffLineTypeBuffers { + diffLineTypeDecoders[lineType] = nil + if buffer.Len() == 0 { + continue + } + charsetLabel, err := charset.DetectEncoding(buffer.Bytes()) + if charsetLabel != "UTF-8" && err == nil { + encoding, _ := stdcharset.Lookup(charsetLabel) + if encoding != nil { + diffLineTypeDecoders[lineType] = encoding.NewDecoder() + } + } + } + for _, sec := range f.Sections { + for _, l := range sec.Lines { + decoder := diffLineTypeDecoders[l.Type] + if decoder != nil { + if c, _, err := transform.String(decoder, l.Content[1:]); err == nil { + l.Content = l.Content[0:1] + c } } } @@ -672,11 +945,13 @@ func parseHunks(curFile *DiffFile, maxLines, maxLineCharacters int, input *bufio curFileLFSPrefix bool ) + lastLeftIdx := -1 leftLine, rightLine := 1, 1 for { for isFragment { curFile.IsIncomplete = true + curFile.IsIncompleteLineTooLong = true _, isFragment, err = input.ReadLine() if err != nil { // Now by the definition of ReadLine this cannot be io.EOF @@ -755,8 +1030,21 @@ func parseHunks(curFile *DiffFile, maxLines, maxLineCharacters int, input *bufio curFile.IsIncomplete = true continue } - diffLine := &DiffLine{Type: DiffLineAdd, RightIdx: rightLine} + diffLine := &DiffLine{Type: DiffLineAdd, RightIdx: rightLine, Match: -1} rightLine++ + if curSection == nil { + // Create a new section to represent this hunk + curSection = &DiffSection{} + curFile.Sections = append(curFile.Sections, curSection) + } + if lastLeftIdx > -1 { + diffLine.Match = lastLeftIdx + curSection.Lines[lastLeftIdx].Match = len(curSection.Lines) + lastLeftIdx++ + if lastLeftIdx >= len(curSection.Lines) || curSection.Lines[lastLeftIdx].Type != DiffLineDel { + lastLeftIdx = -1 + } + } curSection.Lines = append(curSection.Lines, diffLine) case '-': curFileLinesCount++ @@ -765,10 +1053,18 @@ func parseHunks(curFile *DiffFile, maxLines, maxLineCharacters int, input *bufio curFile.IsIncomplete = true continue } - diffLine := &DiffLine{Type: DiffLineDel, LeftIdx: leftLine} + diffLine := &DiffLine{Type: DiffLineDel, LeftIdx: leftLine, Match: -1} if leftLine > 0 { leftLine++ } + if curSection == nil { + // Create a new section to represent this hunk + curSection = &DiffSection{} + curFile.Sections = append(curFile.Sections, curSection) + } + if len(curSection.Lines) == 0 || curSection.Lines[len(curSection.Lines)-1].Type != DiffLineDel { + lastLeftIdx = len(curSection.Lines) + } curSection.Lines = append(curSection.Lines, diffLine) case ' ': curFileLinesCount++ @@ -779,6 +1075,12 @@ func parseHunks(curFile *DiffFile, maxLines, maxLineCharacters int, input *bufio diffLine := &DiffLine{Type: DiffLinePlain, LeftIdx: leftLine, RightIdx: rightLine} leftLine++ rightLine++ + lastLeftIdx = -1 + if curSection == nil { + // Create a new section to represent this hunk + curSection = &DiffSection{} + curFile.Sections = append(curFile.Sections, curSection) + } curSection.Lines = append(curSection.Lines, diffLine) default: // This is unexpected @@ -789,6 +1091,7 @@ func parseHunks(curFile *DiffFile, maxLines, maxLineCharacters int, input *bufio line := string(lineBytes) if isFragment { curFile.IsIncomplete = true + curFile.IsIncompleteLineTooLong = true for isFragment { lineBytes, isFragment, err = input.ReadLine() if err != nil { @@ -800,17 +1103,18 @@ func parseHunks(curFile *DiffFile, maxLines, maxLineCharacters int, input *bufio } if len(line) > maxLineCharacters { curFile.IsIncomplete = true + curFile.IsIncompleteLineTooLong = true line = line[:maxLineCharacters] } curSection.Lines[len(curSection.Lines)-1].Content = line // handle LFS - if line[1:] == models.LFSMetaFileIdentifier { + if line[1:] == lfs.MetaFileIdentifier { curFileLFSPrefix = true - } else if curFileLFSPrefix && strings.HasPrefix(line[1:], models.LFSMetaFileOidPrefix) { - oid := strings.TrimPrefix(line[1:], models.LFSMetaFileOidPrefix) + } else if curFileLFSPrefix && strings.HasPrefix(line[1:], lfs.MetaFileOidPrefix) { + oid := strings.TrimPrefix(line[1:], lfs.MetaFileOidPrefix) if len(oid) == 64 { - m := &models.LFSMetaObject{Oid: oid} + m := &models.LFSMetaObject{Pointer: lfs.Pointer{Oid: oid}} count, err := models.Count(m) if err == nil && count > 0 { @@ -846,13 +1150,33 @@ func createDiffFile(diff *Diff, line string) *DiffFile { rd := strings.NewReader(line[len(cmdDiffHead):] + " ") curFile.Type = DiffFileChange - curFile.OldName = readFileName(rd) - curFile.Name = readFileName(rd) + oldNameAmbiguity := false + newNameAmbiguity := false + + curFile.OldName, oldNameAmbiguity = readFileName(rd) + curFile.Name, newNameAmbiguity = readFileName(rd) + if oldNameAmbiguity && newNameAmbiguity { + curFile.IsAmbiguous = true + // OK we should bet that the oldName and the newName are the same if they can be made to be same + // So we need to start again ... + if (len(line)-len(cmdDiffHead)-1)%2 == 0 { + // diff --git a/b b/b b/b b/b b/b b/b + // + midpoint := (len(line) + len(cmdDiffHead) - 1) / 2 + new, old := line[len(cmdDiffHead):midpoint], line[midpoint+1:] + if len(new) > 2 && len(old) > 2 && new[2:] == old[2:] { + curFile.OldName = old[2:] + curFile.Name = old[2:] + } + } + } + curFile.IsRenamed = curFile.Name != curFile.OldName return curFile } -func readFileName(rd *strings.Reader) string { +func readFileName(rd *strings.Reader) (string, bool) { + ambiguity := false var name string char, _ := rd.ReadByte() _ = rd.UnreadByte() @@ -862,36 +1186,40 @@ func readFileName(rd *strings.Reader) string { name = name[1:] } } else { + // This technique is potentially ambiguous it may not be possible to uniquely identify the filenames from the diff line alone + ambiguity = true fmt.Fscanf(rd, "%s ", &name) + char, _ := rd.ReadByte() + _ = rd.UnreadByte() + for !(char == 0 || char == '"' || char == 'b') { + var suffix string + fmt.Fscanf(rd, "%s ", &suffix) + name += " " + suffix + char, _ = rd.ReadByte() + _ = rd.UnreadByte() + } } - return name[2:] -} - -// GetDiffRange builds a Diff between two commits of a repository. -// passing the empty string as beforeCommitID returns a diff from the -// parent commit. -func GetDiffRange(repoPath, beforeCommitID, afterCommitID string, maxLines, maxLineCharacters, maxFiles int) (*Diff, error) { - return GetDiffRangeWithWhitespaceBehavior(repoPath, beforeCommitID, afterCommitID, maxLines, maxLineCharacters, maxFiles, "") + if len(name) < 2 { + log.Error("Unable to determine name from reader: %v", rd) + return "", true + } + return name[2:], ambiguity } // GetDiffRangeWithWhitespaceBehavior builds a Diff between two commits of a repository. // Passing the empty string as beforeCommitID returns a diff from the parent commit. // The whitespaceBehavior is either an empty string or a git flag -func GetDiffRangeWithWhitespaceBehavior(repoPath, beforeCommitID, afterCommitID string, maxLines, maxLineCharacters, maxFiles int, whitespaceBehavior string) (*Diff, error) { - gitRepo, err := git.OpenRepository(repoPath) - if err != nil { - return nil, err - } - defer gitRepo.Close() +func GetDiffRangeWithWhitespaceBehavior(gitRepo *git.Repository, beforeCommitID, afterCommitID string, maxLines, maxLineCharacters, maxFiles int, whitespaceBehavior string) (*Diff, error) { + repoPath := gitRepo.Path commit, err := gitRepo.GetCommit(afterCommitID) if err != nil { return nil, err } - // FIXME: graceful: These commands should likely have a timeout - ctx, cancel := context.WithCancel(git.DefaultContext) + ctx, cancel := context.WithTimeout(git.DefaultContext, time.Duration(setting.Git.Timeout.Default)*time.Second) defer cancel() + var cmd *exec.Cmd if (len(beforeCommitID) == 0 || beforeCommitID == git.EmptySHA) && commit.ParentCount() == 0 { diffArgs := []string{"diff", "--src-prefix=\\a/", "--dst-prefix=\\b/", "-M"} @@ -965,9 +1293,10 @@ func GetDiffRangeWithWhitespaceBehavior(repoPath, beforeCommitID, afterCommitID return diff, nil } -// GetDiffCommit builds a Diff representing the given commitID. -func GetDiffCommit(repoPath, commitID string, maxLines, maxLineCharacters, maxFiles int) (*Diff, error) { - return GetDiffRange(repoPath, "", commitID, maxLines, maxLineCharacters, maxFiles) +// GetDiffCommitWithWhitespaceBehavior builds a Diff representing the given commitID. +// The whitespaceBehavior is either an empty string or a git flag +func GetDiffCommitWithWhitespaceBehavior(gitRepo *git.Repository, commitID string, maxLines, maxLineCharacters, maxFiles int, whitespaceBehavior string) (*Diff, error) { + return GetDiffRangeWithWhitespaceBehavior(gitRepo, "", commitID, maxLines, maxLineCharacters, maxFiles, whitespaceBehavior) } // CommentAsDiff returns c.Patch as *Diff @@ -975,6 +1304,7 @@ func CommentAsDiff(c *models.Comment) (*Diff, error) { diff, err := ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, strings.NewReader(c.Patch)) if err != nil { + log.Error("Unable to parse patch: %v", err) return nil, err } if len(diff.Files) == 0 { @@ -989,9 +1319,28 @@ func CommentAsDiff(c *models.Comment) (*Diff, error) { // CommentMustAsDiff executes AsDiff and logs the error instead of returning func CommentMustAsDiff(c *models.Comment) *Diff { + if c == nil { + return nil + } + defer func() { + if err := recover(); err != nil { + log.Error("PANIC whilst retrieving diff for comment[%d] Error: %v\nStack: %s", c.ID, err, log.Stack(2)) + } + }() diff, err := CommentAsDiff(c) if err != nil { log.Warn("CommentMustAsDiff: %v", err) } return diff } + +// GetWhitespaceFlag returns git diff flag for treating whitespaces +func GetWhitespaceFlag(whiteSpaceBehavior string) string { + whitespaceFlags := map[string]string{ + "ignore-all": "-w", + "ignore-change": "-b", + "ignore-eol": "--ignore-space-at-eol", + "": ""} + + return whitespaceFlags[whiteSpaceBehavior] +} diff --git a/services/gitdiff/gitdiff_test.go b/services/gitdiff/gitdiff_test.go index cd7b2273c..57364ace3 100644 --- a/services/gitdiff/gitdiff_test.go +++ b/services/gitdiff/gitdiff_test.go @@ -6,7 +6,6 @@ package gitdiff import ( - "encoding/json" "fmt" "html/template" "strconv" @@ -15,7 +14,10 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/highlight" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/setting" + dmp "github.com/sergi/go-diff/diffmatchpatch" "github.com/stretchr/testify/assert" "gopkg.in/ini.v1" @@ -23,7 +25,7 @@ import ( func assertEqual(t *testing.T, s1 string, s2 template.HTML) { if s1 != string(s2) { - t.Errorf("%s should be equal %s", s2, s1) + t.Errorf("Did not receive expected results:\nExpected: %s\nActual: %s", s1, s2) } } @@ -61,7 +63,7 @@ func TestDiffToHTML(t *testing.T) { {Type: dmp.DiffEqual, Text: ")"}, }, DiffLineDel)) - assertEqual(t, "r.WrapperRenderer(w, language, true, attrs, false)", diffToHTML("", []dmp.Diff{ + assertEqual(t, "r.WrapperRenderer(w, language, true, attrs, false)", diffToHTML("", []dmp.Diff{ {Type: dmp.DiffEqual, Text: "r.WrapperRenderer(w, "}, {Type: dmp.DiffDelete, Text: "language, false)"}, }, DiffLineDel)) - assertEqual(t, "language, true, attrs, false)", diffToHTML("", []dmp.Diff{ + assertEqual(t, "language, true, attrs, false)", diffToHTML("", []dmp.Diff{ {Type: dmp.DiffInsert, Text: "language, true, attrs"}, {Type: dmp.DiffEqual, Text: ", false)"}, }, DiffLineAdd)) - assertEqual(t, "print("// ", sys.argv)", diffToHTML("", []dmp.Diff{ + assertEqual(t, "print("// ", sys.argv)", diffToHTML("", []dmp.Diff{ {Type: dmp.DiffEqual, Text: "print"}, {Type: dmp.DiffInsert, Text: ")"}, }, DiffLineAdd)) - assertEqual(t, "sh 'useradd -u $(stat -c "%u" .gitignore) jenkins'", diffToHTML("", []dmp.Diff{ + assertEqual(t, "sh 'useradd -u $(stat -c "%u" .gitignore) jenkins'", diffToHTML("", []dmp.Diff{ {Type: dmp.DiffEqual, Text: "sh "}, {Type: dmp.DiffDelete, Text: "4;useradd -u 111 jenkins""}, {Type: dmp.DiffInsert, Text: "9;useradd -u $(stat -c "%u" .gitignore) jenkins'"}, {Type: dmp.DiffEqual, Text: ";"}, }, DiffLineAdd)) - assertEqual(t, " <h4 class="release-list-title df ac">", diffToHTML("", []dmp.Diff{ + assertEqual(t, " <h4 class="release-list-title df ac">", diffToHTML("", []dmp.Diff{ {Type: dmp.DiffEqual, Text: " <h"}, {Type: dmp.DiffInsert, Text: "4 class=&#"}, {Type: dmp.DiffEqual, Text: "3"}, @@ -207,6 +209,66 @@ rename to a b/a a/file b/b file oldFilename: "a b/file b/a a/file", filename: "a b/a a/file b/b file", }, + { + name: "ambiguous deleted", + gitdiff: `diff --git a/b b/b b/b b/b +deleted file mode 100644 +index 92e798b..0000000 +--- a/b b/b` + "\t" + ` ++++ /dev/null +@@ -1 +0,0 @@ +-b b/b +`, + oldFilename: "b b/b", + filename: "b b/b", + addition: 0, + deletion: 1, + }, + { + name: "ambiguous addition", + gitdiff: `diff --git a/b b/b b/b b/b +new file mode 100644 +index 0000000..92e798b +--- /dev/null ++++ b/b b/b` + "\t" + ` +@@ -0,0 +1 @@ ++b b/b +`, + oldFilename: "b b/b", + filename: "b b/b", + addition: 1, + deletion: 0, + }, + { + name: "rename", + gitdiff: `diff --git a/b b/b b/b b/b b/b b/b +similarity index 100% +rename from b b/b b/b b/b b/b +rename to b +`, + oldFilename: "b b/b b/b b/b b/b", + filename: "b", + }, + { + name: "ambiguous 1", + gitdiff: `diff --git a/b b/b b/b b/b b/b b/b +similarity index 100% +rename from b b/b b/b b/b b/b +rename to b +`, + oldFilename: "b b/b b/b b/b b/b", + filename: "b", + }, + { + name: "ambiguous 2", + gitdiff: `diff --git a/b b/b b/b b/b b/b b/b +similarity index 100% +rename from b b/b b/b b/b +rename to b b/b +`, + oldFilename: "b b/b b/b b/b", + filename: "b b/b", + }, { name: "minuses-and-pluses", gitdiff: `diff --git a/minuses-and-pluses b/minuses-and-pluses @@ -234,32 +296,33 @@ index 6961180..9ba1a00 100644 t.Run(testcase.name, func(t *testing.T) { got, err := ParsePatch(setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLineCharacters, setting.Git.MaxGitDiffFiles, strings.NewReader(testcase.gitdiff)) if (err != nil) != testcase.wantErr { - t.Errorf("ParsePatch() error = %v, wantErr %v", err, testcase.wantErr) + t.Errorf("ParsePatch(%q) error = %v, wantErr %v", testcase.name, err, testcase.wantErr) return } - gotMarshaled, _ := json.MarshalIndent(got, " ", " ") + + gotMarshaled, _ := json.MarshalIndent(got, "", " ") if got.NumFiles != 1 { - t.Errorf("ParsePath() did not receive 1 file:\n%s", string(gotMarshaled)) + t.Errorf("ParsePath(%q) did not receive 1 file:\n%s", testcase.name, string(gotMarshaled)) return } if got.TotalAddition != testcase.addition { - t.Errorf("ParsePath() does not have correct totalAddition %d, wanted %d", got.TotalAddition, testcase.addition) + t.Errorf("ParsePath(%q) does not have correct totalAddition %d, wanted %d", testcase.name, got.TotalAddition, testcase.addition) } if got.TotalDeletion != testcase.deletion { - t.Errorf("ParsePath() did not have correct totalDeletion %d, wanted %d", got.TotalDeletion, testcase.deletion) + t.Errorf("ParsePath(%q) did not have correct totalDeletion %d, wanted %d", testcase.name, got.TotalDeletion, testcase.deletion) } file := got.Files[0] if file.Addition != testcase.addition { - t.Errorf("ParsePath() does not have correct file addition %d, wanted %d", file.Addition, testcase.addition) + t.Errorf("ParsePath(%q) does not have correct file addition %d, wanted %d", testcase.name, file.Addition, testcase.addition) } if file.Deletion != testcase.deletion { - t.Errorf("ParsePath() did not have correct file deletion %d, wanted %d", file.Deletion, testcase.deletion) + t.Errorf("ParsePath(%q) did not have correct file deletion %d, wanted %d", testcase.name, file.Deletion, testcase.deletion) } if file.OldName != testcase.oldFilename { - t.Errorf("ParsePath() did not have correct OldName %s, wanted %s", file.OldName, testcase.oldFilename) + t.Errorf("ParsePath(%q) did not have correct OldName %q, wanted %q", testcase.name, file.OldName, testcase.oldFilename) } if file.Name != testcase.filename { - t.Errorf("ParsePath() did not have correct Name %s, wanted %s", file.Name, testcase.filename) + t.Errorf("ParsePath(%q) did not have correct Name %q, wanted %q", testcase.name, file.Name, testcase.filename) } }) } @@ -452,9 +515,13 @@ func TestDiffLine_GetCommentSide(t *testing.T) { } func TestGetDiffRangeWithWhitespaceBehavior(t *testing.T) { - git.Debug = true + gitRepo, err := git.OpenRepository("./testdata/academic-module") + if !assert.NoError(t, err) { + return + } + defer gitRepo.Close() for _, behavior := range []string{"-w", "--ignore-space-at-eol", "-b", ""} { - diffs, err := GetDiffRangeWithWhitespaceBehavior("./testdata/academic-module", "559c156f8e0178b71cb44355428f24001b08fc68", "bd7063cc7c04689c4d082183d32a604ed27a24f9", + diffs, err := GetDiffRangeWithWhitespaceBehavior(gitRepo, "559c156f8e0178b71cb44355428f24001b08fc68", "bd7063cc7c04689c4d082183d32a604ed27a24f9", setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffLines, setting.Git.MaxGitDiffFiles, behavior) assert.NoError(t, err, fmt.Sprintf("Error when diff with %s", behavior)) for _, f := range diffs.Files { @@ -462,3 +529,14 @@ func TestGetDiffRangeWithWhitespaceBehavior(t *testing.T) { } } } + +func TestDiffToHTML_14231(t *testing.T) { + setting.Cfg = ini.Empty() + diffRecord := diffMatchPatch.DiffMain(highlight.Code("main.v", " run()\n"), highlight.Code("main.v", " run(db)\n"), true) + diffRecord = diffMatchPatch.DiffCleanupEfficiency(diffRecord) + + expected := ` run(db)` + output := diffToHTML("main.v", diffRecord, DiffLineAdd) + + assertEqual(t, expected, output) +} diff --git a/services/issue/assignee.go b/services/issue/assignee.go index f24a242f6..12addede7 100644 --- a/services/issue/assignee.go +++ b/services/issue/assignee.go @@ -25,7 +25,7 @@ func DeleteNotPassedAssignee(issue *models.Issue, doer *models.User, assignees [ } if !found { - // This function also does comments and hooks, which is why we call it seperatly instead of directly removing the assignees here + // This function also does comments and hooks, which is why we call it separately instead of directly removing the assignees here if _, _, err := ToggleAssignee(issue, doer, assignee.ID); err != nil { return err } diff --git a/services/issue/assignee_test.go b/services/issue/assignee_test.go index bdd2009bf..2d96368ec 100644 --- a/services/issue/assignee_test.go +++ b/services/issue/assignee_test.go @@ -33,5 +33,5 @@ func TestDeleteNotPassedAssignee(t *testing.T) { // Check they're gone assignees, err := models.GetAssigneesByIssue(issue) assert.NoError(t, err) - assert.Equal(t, 0, len(assignees)) + assert.Empty(t, assignees) } diff --git a/services/issue/issue.go b/services/issue/issue.go index 14de0290a..90f689a55 100644 --- a/services/issue/issue.go +++ b/services/issue/issue.go @@ -29,6 +29,12 @@ func NewIssue(repo *models.Repository, issue *models.Issue, labelIDs []int64, uu } notification.NotifyNewIssue(issue, mentions) + if len(issue.Labels) > 0 { + notification.NotifyIssueChangeLabels(issue.Poster, issue, issue.Labels, nil) + } + if issue.Milestone != nil { + notification.NotifyIssueChangeMilestone(issue.Poster, issue, 0) + } return nil } diff --git a/modules/lfs/locks.go b/services/lfs/locks.go similarity index 76% rename from modules/lfs/locks.go rename to services/lfs/locks.go index a529afe1b..ac72fff6a 100644 --- a/modules/lfs/locks.go +++ b/services/lfs/locks.go @@ -5,108 +5,84 @@ package lfs import ( - "encoding/json" + "net/http" "strconv" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/convert" + "code.gitea.io/gitea/modules/json" + lfs_module "code.gitea.io/gitea/modules/lfs" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" ) -//checkIsValidRequest check if it a valid request in case of bad request it write the response to ctx. -func checkIsValidRequest(ctx *context.Context) bool { - if !setting.LFS.StartServer { - log.Debug("Attempt to access LFS server but LFS server is disabled") - writeStatus(ctx, 404) - return false - } - if !MetaMatcher(ctx.Req) { - log.Info("Attempt access LOCKs without accepting the correct media type: %s", metaMediaType) - writeStatus(ctx, 400) - return false - } - if !ctx.IsSigned { - user, _, _, err := parseToken(ctx.Req.Header.Get("Authorization")) - if err != nil { - ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") - writeStatus(ctx, 401) - return false - } - ctx.User = user - } - return true -} - func handleLockListOut(ctx *context.Context, repo *models.Repository, lock *models.LFSLock, err error) { if err != nil { if models.IsErrLFSLockNotExist(err) { - ctx.JSON(200, api.LFSLockList{ + ctx.JSON(http.StatusOK, api.LFSLockList{ Locks: []*api.LFSLock{}, }) return } - ctx.JSON(500, api.LFSLockError{ + ctx.JSON(http.StatusInternalServerError, api.LFSLockError{ Message: "unable to list locks : Internal Server Error", }) return } if repo.ID != lock.RepoID { - ctx.JSON(200, api.LFSLockList{ + ctx.JSON(http.StatusOK, api.LFSLockList{ Locks: []*api.LFSLock{}, }) return } - ctx.JSON(200, api.LFSLockList{ + ctx.JSON(http.StatusOK, api.LFSLockList{ Locks: []*api.LFSLock{convert.ToLFSLock(lock)}, }) } // GetListLockHandler list locks func GetListLockHandler(ctx *context.Context) { - if !checkIsValidRequest(ctx) { - // Status is written in checkIsValidRequest - return - } - ctx.Resp.Header().Set("Content-Type", metaMediaType) - - rv := unpack(ctx) + rv := getRequestContext(ctx) repository, err := models.GetRepositoryByOwnerAndName(rv.User, rv.Repo) if err != nil { log.Debug("Could not find repository: %s/%s - %s", rv.User, rv.Repo, err) - writeStatus(ctx, 404) - return - } - repository.MustOwner() - - authenticated := authenticate(ctx, repository, rv.Authorization, false) - if !authenticated { ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") ctx.JSON(401, api.LFSLockError{ Message: "You must have pull access to list locks", }) return } + repository.MustOwner() - cursor := ctx.QueryInt("cursor") + authenticated := authenticate(ctx, repository, rv.Authorization, true, false) + if !authenticated { + ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") + ctx.JSON(http.StatusUnauthorized, api.LFSLockError{ + Message: "You must have pull access to list locks", + }) + return + } + ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) + + cursor := ctx.FormInt("cursor") if cursor < 0 { cursor = 0 } - limit := ctx.QueryInt("limit") + limit := ctx.FormInt("limit") if limit > setting.LFS.LocksPagingNum && setting.LFS.LocksPagingNum > 0 { limit = setting.LFS.LocksPagingNum } else if limit < 0 { limit = 0 } - id := ctx.Query("id") + id := ctx.FormString("id") if id != "" { //Case where we request a specific id v, err := strconv.ParseInt(id, 10, 64) if err != nil { - ctx.JSON(400, api.LFSLockError{ + ctx.JSON(http.StatusBadRequest, api.LFSLockError{ Message: "bad request : " + err.Error(), }) return @@ -119,7 +95,7 @@ func GetListLockHandler(ctx *context.Context) { return } - path := ctx.Query("path") + path := ctx.FormString("path") if path != "" { //Case where we request a specific id lock, err := models.GetLFSLock(repository, path) if err != nil && !models.IsErrLFSLockNotExist(err) { @@ -133,7 +109,7 @@ func GetListLockHandler(ctx *context.Context) { lockList, err := models.GetLFSLockByRepoID(repository.ID, cursor, limit) if err != nil { log.Error("Unable to list locks for repository ID[%d]: Error: %v", repository.ID, err) - ctx.JSON(500, api.LFSLockError{ + ctx.JSON(http.StatusInternalServerError, api.LFSLockError{ Message: "unable to list locks : Internal Server Error", }) return @@ -146,7 +122,7 @@ func GetListLockHandler(ctx *context.Context) { if limit > 0 && len(lockList) == limit { next = strconv.Itoa(cursor + 1) } - ctx.JSON(200, api.LFSLockList{ + ctx.JSON(http.StatusOK, api.LFSLockList{ Locks: lockListAPI, Next: next, }) @@ -154,12 +130,6 @@ func GetListLockHandler(ctx *context.Context) { // PostLockHandler create lock func PostLockHandler(ctx *context.Context) { - if !checkIsValidRequest(ctx) { - // Status is written in checkIsValidRequest - return - } - ctx.Resp.Header().Set("Content-Type", metaMediaType) - userName := ctx.Params("username") repoName := strings.TrimSuffix(ctx.Params("reponame"), ".git") authorization := ctx.Req.Header.Get("Authorization") @@ -167,23 +137,29 @@ func PostLockHandler(ctx *context.Context) { repository, err := models.GetRepositoryByOwnerAndName(userName, repoName) if err != nil { log.Error("Unable to get repository: %s/%s Error: %v", userName, repoName, err) - writeStatus(ctx, 404) - return - } - repository.MustOwner() - - authenticated := authenticate(ctx, repository, authorization, true) - if !authenticated { ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") ctx.JSON(401, api.LFSLockError{ Message: "You must have push access to create locks", }) return } + repository.MustOwner() + + authenticated := authenticate(ctx, repository, authorization, true, true) + if !authenticated { + ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") + ctx.JSON(http.StatusUnauthorized, api.LFSLockError{ + Message: "You must have push access to create locks", + }) + return + } + + ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) var req api.LFSLockRequest - bodyReader := ctx.Req.Body().ReadCloser() + bodyReader := ctx.Req.Body defer bodyReader.Close() + dec := json.NewDecoder(bodyReader) if err := dec.Decode(&req); err != nil { log.Warn("Failed to decode lock request as json. Error: %v", err) @@ -198,7 +174,7 @@ func PostLockHandler(ctx *context.Context) { }) if err != nil { if models.IsErrLFSLockAlreadyExist(err) { - ctx.JSON(409, api.LFSLockError{ + ctx.JSON(http.StatusConflict, api.LFSLockError{ Lock: convert.ToLFSLock(lock), Message: "already created lock", }) @@ -206,28 +182,22 @@ func PostLockHandler(ctx *context.Context) { } if models.IsErrLFSUnauthorizedAction(err) { ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") - ctx.JSON(401, api.LFSLockError{ + ctx.JSON(http.StatusUnauthorized, api.LFSLockError{ Message: "You must have push access to create locks : " + err.Error(), }) return } log.Error("Unable to CreateLFSLock in repository %-v at %s for user %-v: Error: %v", repository, req.Path, ctx.User, err) - ctx.JSON(500, api.LFSLockError{ + ctx.JSON(http.StatusInternalServerError, api.LFSLockError{ Message: "internal server error : Internal Server Error", }) return } - ctx.JSON(201, api.LFSLockResponse{Lock: convert.ToLFSLock(lock)}) + ctx.JSON(http.StatusCreated, api.LFSLockResponse{Lock: convert.ToLFSLock(lock)}) } // VerifyLockHandler list locks for verification func VerifyLockHandler(ctx *context.Context) { - if !checkIsValidRequest(ctx) { - // Status is written in checkIsValidRequest - return - } - ctx.Resp.Header().Set("Content-Type", metaMediaType) - userName := ctx.Params("username") repoName := strings.TrimSuffix(ctx.Params("reponame"), ".git") authorization := ctx.Req.Header.Get("Authorization") @@ -235,25 +205,30 @@ func VerifyLockHandler(ctx *context.Context) { repository, err := models.GetRepositoryByOwnerAndName(userName, repoName) if err != nil { log.Error("Unable to get repository: %s/%s Error: %v", userName, repoName, err) - writeStatus(ctx, 404) - return - } - repository.MustOwner() - - authenticated := authenticate(ctx, repository, authorization, true) - if !authenticated { ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") ctx.JSON(401, api.LFSLockError{ Message: "You must have push access to verify locks", }) return } + repository.MustOwner() - cursor := ctx.QueryInt("cursor") + authenticated := authenticate(ctx, repository, authorization, true, true) + if !authenticated { + ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") + ctx.JSON(http.StatusUnauthorized, api.LFSLockError{ + Message: "You must have push access to verify locks", + }) + return + } + + ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) + + cursor := ctx.FormInt("cursor") if cursor < 0 { cursor = 0 } - limit := ctx.QueryInt("limit") + limit := ctx.FormInt("limit") if limit > setting.LFS.LocksPagingNum && setting.LFS.LocksPagingNum > 0 { limit = setting.LFS.LocksPagingNum } else if limit < 0 { @@ -262,7 +237,7 @@ func VerifyLockHandler(ctx *context.Context) { lockList, err := models.GetLFSLockByRepoID(repository.ID, cursor, limit) if err != nil { log.Error("Unable to list locks for repository ID[%d]: Error: %v", repository.ID, err) - ctx.JSON(500, api.LFSLockError{ + ctx.JSON(http.StatusInternalServerError, api.LFSLockError{ Message: "unable to list locks : Internal Server Error", }) return @@ -280,7 +255,7 @@ func VerifyLockHandler(ctx *context.Context) { lockTheirsListAPI = append(lockTheirsListAPI, convert.ToLFSLock(l)) } } - ctx.JSON(200, api.LFSLockListVerify{ + ctx.JSON(http.StatusOK, api.LFSLockListVerify{ Ours: lockOursListAPI, Theirs: lockTheirsListAPI, Next: next, @@ -289,12 +264,6 @@ func VerifyLockHandler(ctx *context.Context) { // UnLockHandler delete locks func UnLockHandler(ctx *context.Context) { - if !checkIsValidRequest(ctx) { - // Status is written in checkIsValidRequest - return - } - ctx.Resp.Header().Set("Content-Type", metaMediaType) - userName := ctx.Params("username") repoName := strings.TrimSuffix(ctx.Params("reponame"), ".git") authorization := ctx.Req.Header.Get("Authorization") @@ -302,23 +271,29 @@ func UnLockHandler(ctx *context.Context) { repository, err := models.GetRepositoryByOwnerAndName(userName, repoName) if err != nil { log.Error("Unable to get repository: %s/%s Error: %v", userName, repoName, err) - writeStatus(ctx, 404) - return - } - repository.MustOwner() - - authenticated := authenticate(ctx, repository, authorization, true) - if !authenticated { ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") ctx.JSON(401, api.LFSLockError{ Message: "You must have push access to delete locks", }) return } + repository.MustOwner() + + authenticated := authenticate(ctx, repository, authorization, true, true) + if !authenticated { + ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") + ctx.JSON(http.StatusUnauthorized, api.LFSLockError{ + Message: "You must have push access to delete locks", + }) + return + } + + ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) var req api.LFSLockDeleteRequest - bodyReader := ctx.Req.Body().ReadCloser() + bodyReader := ctx.Req.Body defer bodyReader.Close() + dec := json.NewDecoder(bodyReader) if err := dec.Decode(&req); err != nil { log.Warn("Failed to decode lock request as json. Error: %v", err) @@ -330,16 +305,16 @@ func UnLockHandler(ctx *context.Context) { if err != nil { if models.IsErrLFSUnauthorizedAction(err) { ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") - ctx.JSON(401, api.LFSLockError{ + ctx.JSON(http.StatusUnauthorized, api.LFSLockError{ Message: "You must have push access to delete locks : " + err.Error(), }) return } log.Error("Unable to DeleteLFSLockByID[%d] by user %-v with force %t: Error: %v", ctx.ParamsInt64("lid"), ctx.User, req.Force, err) - ctx.JSON(500, api.LFSLockError{ + ctx.JSON(http.StatusInternalServerError, api.LFSLockError{ Message: "unable to delete lock : Internal Server Error", }) return } - ctx.JSON(200, api.LFSLockResponse{Lock: convert.ToLFSLock(lock)}) + ctx.JSON(http.StatusOK, api.LFSLockResponse{Lock: convert.ToLFSLock(lock)}) } diff --git a/services/lfs/server.go b/services/lfs/server.go new file mode 100644 index 000000000..946437fb2 --- /dev/null +++ b/services/lfs/server.go @@ -0,0 +1,564 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package lfs + +import ( + "crypto/sha256" + "encoding/base64" + "encoding/hex" + "errors" + "fmt" + "io" + "net/http" + "path" + "regexp" + "strconv" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/context" + "code.gitea.io/gitea/modules/json" + lfs_module "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/storage" + + "github.com/golang-jwt/jwt" +) + +// requestContext contain variables from the HTTP request. +type requestContext struct { + User string + Repo string + Authorization string +} + +// Claims is a JWT Token Claims +type Claims struct { + RepoID int64 + Op string + UserID int64 + jwt.StandardClaims +} + +// DownloadLink builds a URL to download the object. +func (rc *requestContext) DownloadLink(p lfs_module.Pointer) string { + return setting.AppURL + path.Join(rc.User, rc.Repo+".git", "info/lfs/objects", p.Oid) +} + +// UploadLink builds a URL to upload the object. +func (rc *requestContext) UploadLink(p lfs_module.Pointer) string { + return setting.AppURL + path.Join(rc.User, rc.Repo+".git", "info/lfs/objects", p.Oid, strconv.FormatInt(p.Size, 10)) +} + +// VerifyLink builds a URL for verifying the object. +func (rc *requestContext) VerifyLink(p lfs_module.Pointer) string { + return setting.AppURL + path.Join(rc.User, rc.Repo+".git", "info/lfs/verify") +} + +// CheckAcceptMediaType checks if the client accepts the LFS media type. +func CheckAcceptMediaType(ctx *context.Context) { + mediaParts := strings.Split(ctx.Req.Header.Get("Accept"), ";") + + if mediaParts[0] != lfs_module.MediaType { + log.Trace("Calling a LFS method without accepting the correct media type: %s", lfs_module.MediaType) + writeStatus(ctx, http.StatusUnsupportedMediaType) + return + } +} + +// DownloadHandler gets the content from the content store +func DownloadHandler(ctx *context.Context) { + rc := getRequestContext(ctx) + p := lfs_module.Pointer{Oid: ctx.Params("oid")} + + meta := getAuthenticatedMeta(ctx, rc, p, false) + if meta == nil { + return + } + + // Support resume download using Range header + var fromByte, toByte int64 + toByte = meta.Size - 1 + statusCode := http.StatusOK + if rangeHdr := ctx.Req.Header.Get("Range"); rangeHdr != "" { + regex := regexp.MustCompile(`bytes=(\d+)\-(\d*).*`) + match := regex.FindStringSubmatch(rangeHdr) + if len(match) > 1 { + statusCode = http.StatusPartialContent + fromByte, _ = strconv.ParseInt(match[1], 10, 32) + + if fromByte >= meta.Size { + writeStatus(ctx, http.StatusRequestedRangeNotSatisfiable) + return + } + + if match[2] != "" { + _toByte, _ := strconv.ParseInt(match[2], 10, 32) + if _toByte >= fromByte && _toByte < toByte { + toByte = _toByte + } + } + + ctx.Resp.Header().Set("Content-Range", fmt.Sprintf("bytes %d-%d/%d", fromByte, toByte, meta.Size-fromByte)) + ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Range") + } + } + + contentStore := lfs_module.NewContentStore() + content, err := contentStore.Get(meta.Pointer) + if err != nil { + writeStatus(ctx, http.StatusNotFound) + return + } + defer content.Close() + + if fromByte > 0 { + _, err = content.Seek(fromByte, io.SeekStart) + if err != nil { + log.Error("Whilst trying to read LFS OID[%s]: Unable to seek to %d Error: %v", meta.Oid, fromByte, err) + + writeStatus(ctx, http.StatusInternalServerError) + return + } + } + + contentLength := toByte + 1 - fromByte + ctx.Resp.Header().Set("Content-Length", strconv.FormatInt(contentLength, 10)) + ctx.Resp.Header().Set("Content-Type", "application/octet-stream") + + filename := ctx.Params("filename") + if len(filename) > 0 { + decodedFilename, err := base64.RawURLEncoding.DecodeString(filename) + if err == nil { + ctx.Resp.Header().Set("Content-Disposition", "attachment; filename=\""+string(decodedFilename)+"\"") + ctx.Resp.Header().Set("Access-Control-Expose-Headers", "Content-Disposition") + } + } + + ctx.Resp.WriteHeader(statusCode) + if written, err := io.CopyN(ctx.Resp, content, contentLength); err != nil { + log.Error("Error whilst copying LFS OID[%s] to the response after %d bytes. Error: %v", meta.Oid, written, err) + } +} + +// BatchHandler provides the batch api +func BatchHandler(ctx *context.Context) { + var br lfs_module.BatchRequest + if err := decodeJSON(ctx.Req, &br); err != nil { + log.Trace("Unable to decode BATCH request vars: Error: %v", err) + writeStatus(ctx, http.StatusBadRequest) + return + } + + var isUpload bool + if br.Operation == "upload" { + isUpload = true + } else if br.Operation == "download" { + isUpload = false + } else { + log.Trace("Attempt to BATCH with invalid operation: %s", br.Operation) + writeStatus(ctx, http.StatusBadRequest) + return + } + + rc := getRequestContext(ctx) + + repository := getAuthenticatedRepository(ctx, rc, isUpload) + if repository == nil { + return + } + + contentStore := lfs_module.NewContentStore() + + var responseObjects []*lfs_module.ObjectResponse + + for _, p := range br.Objects { + if !p.IsValid() { + responseObjects = append(responseObjects, buildObjectResponse(rc, p, false, false, &lfs_module.ObjectError{ + Code: http.StatusUnprocessableEntity, + Message: "Oid or size are invalid", + })) + continue + } + + exists, err := contentStore.Exists(p) + if err != nil { + log.Error("Unable to check if LFS OID[%s] exist. Error: %v", p.Oid, rc.User, rc.Repo, err) + writeStatus(ctx, http.StatusInternalServerError) + return + } + + meta, err := repository.GetLFSMetaObjectByOid(p.Oid) + if err != nil && err != models.ErrLFSObjectNotExist { + log.Error("Unable to get LFS MetaObject [%s] for %s/%s. Error: %v", p.Oid, rc.User, rc.Repo, err) + writeStatus(ctx, http.StatusInternalServerError) + return + } + + if meta != nil && p.Size != meta.Size { + responseObjects = append(responseObjects, buildObjectResponse(rc, p, false, false, &lfs_module.ObjectError{ + Code: http.StatusUnprocessableEntity, + Message: fmt.Sprintf("Object %s is not %d bytes", p.Oid, p.Size), + })) + continue + } + + var responseObject *lfs_module.ObjectResponse + if isUpload { + var err *lfs_module.ObjectError + if !exists && setting.LFS.MaxFileSize > 0 && p.Size > setting.LFS.MaxFileSize { + err = &lfs_module.ObjectError{ + Code: http.StatusUnprocessableEntity, + Message: fmt.Sprintf("Size must be less than or equal to %d", setting.LFS.MaxFileSize), + } + } + + if exists && meta == nil { + accessible, err := models.LFSObjectAccessible(ctx.User, p.Oid) + if err != nil { + log.Error("Unable to check if LFS MetaObject [%s] is accessible. Error: %v", p.Oid, err) + writeStatus(ctx, http.StatusInternalServerError) + return + } + if accessible { + _, err := models.NewLFSMetaObject(&models.LFSMetaObject{Pointer: p, RepositoryID: repository.ID}) + if err != nil { + log.Error("Unable to create LFS MetaObject [%s] for %s/%s. Error: %v", p.Oid, rc.User, rc.Repo, err) + writeStatus(ctx, http.StatusInternalServerError) + return + } + } else { + exists = false + } + } + + responseObject = buildObjectResponse(rc, p, false, !exists, err) + } else { + var err *lfs_module.ObjectError + if !exists || meta == nil { + err = &lfs_module.ObjectError{ + Code: http.StatusNotFound, + Message: http.StatusText(http.StatusNotFound), + } + } + + responseObject = buildObjectResponse(rc, p, true, false, err) + } + responseObjects = append(responseObjects, responseObject) + } + + respobj := &lfs_module.BatchResponse{Objects: responseObjects} + + ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) + + enc := json.NewEncoder(ctx.Resp) + if err := enc.Encode(respobj); err != nil { + log.Error("Failed to encode representation as json. Error: %v", err) + } +} + +// UploadHandler receives data from the client and puts it into the content store +func UploadHandler(ctx *context.Context) { + rc := getRequestContext(ctx) + + p := lfs_module.Pointer{Oid: ctx.Params("oid")} + var err error + if p.Size, err = strconv.ParseInt(ctx.Params("size"), 10, 64); err != nil { + writeStatusMessage(ctx, http.StatusUnprocessableEntity, err.Error()) + } + + if !p.IsValid() { + log.Trace("Attempt to access invalid LFS OID[%s] in %s/%s", p.Oid, rc.User, rc.Repo) + writeStatus(ctx, http.StatusUnprocessableEntity) + return + } + + repository := getAuthenticatedRepository(ctx, rc, true) + if repository == nil { + return + } + + contentStore := lfs_module.NewContentStore() + exists, err := contentStore.Exists(p) + if err != nil { + log.Error("Unable to check if LFS OID[%s] exist. Error: %v", p.Oid, err) + writeStatus(ctx, http.StatusInternalServerError) + return + } + + uploadOrVerify := func() error { + if exists { + accessible, err := models.LFSObjectAccessible(ctx.User, p.Oid) + if err != nil { + log.Error("Unable to check if LFS MetaObject [%s] is accessible. Error: %v", p.Oid, err) + return err + } + if !accessible { + // The file exists but the user has no access to it. + // The upload gets verified by hashing and size comparison to prove access to it. + hash := sha256.New() + written, err := io.Copy(hash, ctx.Req.Body) + if err != nil { + log.Error("Error creating hash. Error: %v", err) + return err + } + + if written != p.Size { + return lfs_module.ErrSizeMismatch + } + if hex.EncodeToString(hash.Sum(nil)) != p.Oid { + return lfs_module.ErrHashMismatch + } + } + } else if err := contentStore.Put(p, ctx.Req.Body); err != nil { + log.Error("Error putting LFS MetaObject [%s] into content store. Error: %v", p.Oid, err) + return err + } + _, err := models.NewLFSMetaObject(&models.LFSMetaObject{Pointer: p, RepositoryID: repository.ID}) + return err + } + + defer ctx.Req.Body.Close() + if err := uploadOrVerify(); err != nil { + if errors.Is(err, lfs_module.ErrSizeMismatch) || errors.Is(err, lfs_module.ErrHashMismatch) { + log.Error("Upload does not match LFS MetaObject [%s]. Error: %v", p.Oid, err) + writeStatusMessage(ctx, http.StatusUnprocessableEntity, err.Error()) + } else { + writeStatus(ctx, http.StatusInternalServerError) + } + if _, err = repository.RemoveLFSMetaObjectByOid(p.Oid); err != nil { + log.Error("Error whilst removing metaobject for LFS OID[%s]: %v", p.Oid, err) + } + return + } + + writeStatus(ctx, http.StatusOK) +} + +// VerifyHandler verify oid and its size from the content store +func VerifyHandler(ctx *context.Context) { + var p lfs_module.Pointer + if err := decodeJSON(ctx.Req, &p); err != nil { + writeStatus(ctx, http.StatusUnprocessableEntity) + return + } + + rc := getRequestContext(ctx) + + meta := getAuthenticatedMeta(ctx, rc, p, true) + if meta == nil { + return + } + + contentStore := lfs_module.NewContentStore() + ok, err := contentStore.Verify(meta.Pointer) + + status := http.StatusOK + if err != nil { + status = http.StatusInternalServerError + } else if !ok { + status = http.StatusNotFound + } + writeStatus(ctx, status) +} + +func decodeJSON(req *http.Request, v interface{}) error { + defer req.Body.Close() + + dec := json.NewDecoder(req.Body) + return dec.Decode(v) +} + +func getRequestContext(ctx *context.Context) *requestContext { + return &requestContext{ + User: ctx.Params("username"), + Repo: strings.TrimSuffix(ctx.Params("reponame"), ".git"), + Authorization: ctx.Req.Header.Get("Authorization"), + } +} + +func getAuthenticatedMeta(ctx *context.Context, rc *requestContext, p lfs_module.Pointer, requireWrite bool) *models.LFSMetaObject { + if !p.IsValid() { + log.Info("Attempt to access invalid LFS OID[%s] in %s/%s", p.Oid, rc.User, rc.Repo) + writeStatusMessage(ctx, http.StatusUnprocessableEntity, "Oid or size are invalid") + return nil + } + + repository := getAuthenticatedRepository(ctx, rc, requireWrite) + if repository == nil { + return nil + } + + meta, err := repository.GetLFSMetaObjectByOid(p.Oid) + if err != nil { + log.Error("Unable to get LFS OID[%s] Error: %v", p.Oid, err) + writeStatus(ctx, http.StatusNotFound) + return nil + } + + return meta +} + +func getAuthenticatedRepository(ctx *context.Context, rc *requestContext, requireWrite bool) *models.Repository { + repository, err := models.GetRepositoryByOwnerAndName(rc.User, rc.Repo) + if err != nil { + log.Error("Unable to get repository: %s/%s Error: %v", rc.User, rc.Repo, err) + writeStatus(ctx, http.StatusNotFound) + return nil + } + + if !authenticate(ctx, repository, rc.Authorization, false, requireWrite) { + requireAuth(ctx) + return nil + } + + return repository +} + +func buildObjectResponse(rc *requestContext, pointer lfs_module.Pointer, download, upload bool, err *lfs_module.ObjectError) *lfs_module.ObjectResponse { + rep := &lfs_module.ObjectResponse{Pointer: pointer} + if err != nil { + rep.Error = err + } else { + rep.Actions = make(map[string]*lfs_module.Link) + + header := make(map[string]string) + + if len(rc.Authorization) > 0 { + header["Authorization"] = rc.Authorization + } + + if download { + rep.Actions["download"] = &lfs_module.Link{Href: rc.DownloadLink(pointer), Header: header} + if setting.LFS.ServeDirect { + //If we have a signed url (S3, object storage), redirect to this directly. + u, err := storage.LFS.URL(pointer.RelativePath(), pointer.Oid) + if u != nil && err == nil { + rep.Actions["download"] = &lfs_module.Link{Href: u.String(), Header: header} + } + } + } + if upload { + rep.Actions["upload"] = &lfs_module.Link{Href: rc.UploadLink(pointer), Header: header} + + verifyHeader := make(map[string]string) + for key, value := range header { + verifyHeader[key] = value + } + + // This is only needed to workaround https://github.com/git-lfs/git-lfs/issues/3662 + verifyHeader["Accept"] = lfs_module.MediaType + + rep.Actions["verify"] = &lfs_module.Link{Href: rc.VerifyLink(pointer), Header: verifyHeader} + } + } + return rep +} + +func writeStatus(ctx *context.Context, status int) { + writeStatusMessage(ctx, status, http.StatusText(status)) +} + +func writeStatusMessage(ctx *context.Context, status int, message string) { + ctx.Resp.Header().Set("Content-Type", lfs_module.MediaType) + ctx.Resp.WriteHeader(status) + + er := lfs_module.ErrorResponse{Message: message} + + enc := json.NewEncoder(ctx.Resp) + if err := enc.Encode(er); err != nil { + log.Error("Failed to encode error response as json. Error: %v", err) + } +} + +// authenticate uses the authorization string to determine whether +// or not to proceed. This server assumes an HTTP Basic auth format. +func authenticate(ctx *context.Context, repository *models.Repository, authorization string, requireSigned, requireWrite bool) bool { + accessMode := models.AccessModeRead + if requireWrite { + accessMode = models.AccessModeWrite + } + + // ctx.IsSigned is unnecessary here, this will be checked in perm.CanAccess + perm, err := models.GetUserRepoPermission(repository, ctx.User) + if err != nil { + log.Error("Unable to GetUserRepoPermission for user %-v in repo %-v Error: %v", ctx.User, repository) + return false + } + + canRead := perm.CanAccess(accessMode, models.UnitTypeCode) + if canRead && (!requireSigned || ctx.IsSigned) { + return true + } + + user, err := parseToken(authorization, repository, accessMode) + if err != nil { + // Most of these are Warn level - the true internal server errors are logged in parseToken already + log.Warn("Authentication failure for provided token with Error: %v", err) + return false + } + ctx.User = user + return true +} + +func handleLFSToken(tokenSHA string, target *models.Repository, mode models.AccessMode) (*models.User, error) { + if !strings.Contains(tokenSHA, ".") { + return nil, nil + } + token, err := jwt.ParseWithClaims(tokenSHA, &Claims{}, func(t *jwt.Token) (interface{}, error) { + if _, ok := t.Method.(*jwt.SigningMethodHMAC); !ok { + return nil, fmt.Errorf("unexpected signing method: %v", t.Header["alg"]) + } + return setting.LFS.JWTSecretBytes, nil + }) + if err != nil { + return nil, nil + } + + claims, claimsOk := token.Claims.(*Claims) + if !token.Valid || !claimsOk { + return nil, fmt.Errorf("invalid token claim") + } + + if claims.RepoID != target.ID { + return nil, fmt.Errorf("invalid token claim") + } + + if mode == models.AccessModeWrite && claims.Op != "upload" { + return nil, fmt.Errorf("invalid token claim") + } + + u, err := models.GetUserByID(claims.UserID) + if err != nil { + log.Error("Unable to GetUserById[%d]: Error: %v", claims.UserID, err) + return nil, err + } + return u, nil +} + +func parseToken(authorization string, target *models.Repository, mode models.AccessMode) (*models.User, error) { + if authorization == "" { + return nil, fmt.Errorf("no token") + } + + parts := strings.SplitN(authorization, " ", 2) + if len(parts) != 2 { + return nil, fmt.Errorf("no token") + } + tokenSHA := parts[1] + switch strings.ToLower(parts[0]) { + case "bearer": + fallthrough + case "token": + return handleLFSToken(tokenSHA, target, mode) + } + return nil, fmt.Errorf("token not found") +} + +func requireAuth(ctx *context.Context) { + ctx.Resp.Header().Set("WWW-Authenticate", "Basic realm=gitea-lfs") + writeStatus(ctx, http.StatusUnauthorized) +} diff --git a/services/mailer/mail.go b/services/mailer/mail.go index b4217c046..979f8aa22 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -11,6 +11,7 @@ import ( "html/template" "mime" "regexp" + "strconv" "strings" texttmpl "text/template" @@ -21,7 +22,9 @@ import ( "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/templates" "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/translation" "gopkg.in/gomail.v2" ) @@ -34,6 +37,8 @@ const ( mailNotifyCollaborator base.TplName = "notify/collaborator" + mailRepoTransferNotify base.TplName = "notify/repo_transfer" + // There's no actual limit for subject in RFC 5322 mailMaxSubjectRunes = 256 ) @@ -52,16 +57,26 @@ func InitMailRender(subjectTpl *texttmpl.Template, bodyTpl *template.Template) { // SendTestMail sends a test mail func SendTestMail(email string) error { + if setting.MailService == nil { + // No mail service configured + return nil + } return gomail.Send(Sender, NewMessage([]string{email}, "Gitea Test Email!", "Gitea Test Email!").ToMessage()) } -// SendUserMail sends a mail to the user -func SendUserMail(language string, u *models.User, tpl base.TplName, code, subject, info string) { +// sendUserMail sends a mail to the user +func sendUserMail(language string, u *models.User, tpl base.TplName, code, subject, info string) { + locale := translation.NewLocale(language) data := map[string]interface{}{ "DisplayName": u.DisplayName(), "ActiveCodeLives": timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, language), "ResetPwdCodeLives": timeutil.MinutesToFriendly(setting.Service.ResetPwdCodeLives, language), "Code": code, + "Language": locale.Language(), + // helper + "i18n": locale, + "Str2html": templates.Str2html, + "TrN": templates.TrN, } var content bytes.Buffer @@ -77,29 +92,42 @@ func SendUserMail(language string, u *models.User, tpl base.TplName, code, subje SendAsync(msg) } -// Locale represents an interface to translation -type Locale interface { - Language() string - Tr(string, ...interface{}) string -} - // SendActivateAccountMail sends an activation mail to the user (new user registration) -func SendActivateAccountMail(locale Locale, u *models.User) { - SendUserMail(locale.Language(), u, mailAuthActivate, u.GenerateActivateCode(), locale.Tr("mail.activate_account"), "activate account") +func SendActivateAccountMail(locale translation.Locale, u *models.User) { + if setting.MailService == nil { + // No mail service configured + return + } + sendUserMail(locale.Language(), u, mailAuthActivate, u.GenerateEmailActivateCode(u.Email), locale.Tr("mail.activate_account"), "activate account") } // SendResetPasswordMail sends a password reset mail to the user -func SendResetPasswordMail(locale Locale, u *models.User) { - SendUserMail(locale.Language(), u, mailAuthResetPassword, u.GenerateActivateCode(), locale.Tr("mail.reset_password"), "recover account") +func SendResetPasswordMail(u *models.User) { + if setting.MailService == nil { + // No mail service configured + return + } + locale := translation.NewLocale(u.Language) + sendUserMail(u.Language, u, mailAuthResetPassword, u.GenerateEmailActivateCode(u.Email), locale.Tr("mail.reset_password"), "recover account") } // SendActivateEmailMail sends confirmation email to confirm new email address -func SendActivateEmailMail(locale Locale, u *models.User, email *models.EmailAddress) { +func SendActivateEmailMail(u *models.User, email *models.EmailAddress) { + if setting.MailService == nil { + // No mail service configured + return + } + locale := translation.NewLocale(u.Language) data := map[string]interface{}{ "DisplayName": u.DisplayName(), "ActiveCodeLives": timeutil.MinutesToFriendly(setting.Service.ActiveCodeLives, locale.Language()), "Code": u.GenerateEmailActivateCode(email.Email), "Email": email.Email, + "Language": locale.Language(), + // helper + "i18n": locale, + "Str2html": templates.Str2html, + "TrN": templates.TrN, } var content bytes.Buffer @@ -116,15 +144,21 @@ func SendActivateEmailMail(locale Locale, u *models.User, email *models.EmailAdd } // SendRegisterNotifyMail triggers a notify e-mail by admin created a account. -func SendRegisterNotifyMail(locale Locale, u *models.User) { +func SendRegisterNotifyMail(u *models.User) { if setting.MailService == nil { - log.Warn("SendRegisterNotifyMail is being invoked but mail service hasn't been initialized") + // No mail service configured return } + locale := translation.NewLocale(u.Language) data := map[string]interface{}{ "DisplayName": u.DisplayName(), "Username": u.Name, + "Language": locale.Language(), + // helper + "i18n": locale, + "Str2html": templates.Str2html, + "TrN": templates.TrN, } var content bytes.Buffer @@ -142,13 +176,23 @@ func SendRegisterNotifyMail(locale Locale, u *models.User) { // SendCollaboratorMail sends mail notification to new collaborator. func SendCollaboratorMail(u, doer *models.User, repo *models.Repository) { + if setting.MailService == nil { + // No mail service configured + return + } + locale := translation.NewLocale(u.Language) repoName := repo.FullName() - subject := fmt.Sprintf("%s added you to %s", doer.DisplayName(), repoName) + subject := locale.Tr("mail.repo.collaborator.added.subject", doer.DisplayName(), repoName) data := map[string]interface{}{ "Subject": subject, "RepoName": repoName, "Link": repo.HTMLURL(), + "Language": locale.Language(), + // helper + "i18n": locale, + "Str2html": templates.Str2html, + "TrN": templates.TrN, } var content bytes.Buffer @@ -164,8 +208,7 @@ func SendCollaboratorMail(u, doer *models.User, repo *models.Repository) { SendAsync(msg) } -func composeIssueCommentMessages(ctx *mailCommentContext, tos []string, fromMention bool, info string) []*Message { - +func composeIssueCommentMessages(ctx *mailCommentContext, lang string, recipients []*models.User, fromMention bool, info string) ([]*Message, error) { var ( subject string link string @@ -189,7 +232,13 @@ func composeIssueCommentMessages(ctx *mailCommentContext, tos []string, fromMent } // This is the body of the new issue or comment, not the mail body - body := string(markup.RenderByType(markdown.MarkupName, []byte(ctx.Content), ctx.Issue.Repo.HTMLURL(), ctx.Issue.Repo.ComposeMetas())) + body, err := markdown.RenderString(&markup.RenderContext{ + URLPrefix: ctx.Issue.Repo.HTMLURL(), + Metas: ctx.Issue.Repo.ComposeMetas(), + }, ctx.Content) + if err != nil { + return nil, err + } actType, actName, tplName := actionToTemplate(ctx.Issue, ctx.ActionType, commentType, reviewType) @@ -206,6 +255,7 @@ func composeIssueCommentMessages(ctx *mailCommentContext, tos []string, fromMent } } } + locale := translation.NewLocale(lang) mailMeta := map[string]interface{}{ "FallbackSubject": fallback, @@ -222,17 +272,21 @@ func composeIssueCommentMessages(ctx *mailCommentContext, tos []string, fromMent "ActionType": actType, "ActionName": actName, "ReviewComments": reviewComments, + "Language": locale.Language(), + // helper + "i18n": locale, + "Str2html": templates.Str2html, + "TrN": templates.TrN, } var mailSubject bytes.Buffer if err := subjectTemplates.ExecuteTemplate(&mailSubject, string(tplName), mailMeta); err == nil { subject = sanitizeSubject(mailSubject.String()) + if subject == "" { + subject = fallback + } } else { - log.Error("ExecuteTemplate [%s]: %v", string(tplName)+"/subject", err) - } - - if subject == "" { - subject = fallback + log.Error("ExecuteTemplate [%s]: %v", tplName+"/subject", err) } subject = emoji.ReplaceAliases(subject) @@ -246,9 +300,9 @@ func composeIssueCommentMessages(ctx *mailCommentContext, tos []string, fromMent } // Make sure to compose independent messages to avoid leaking user emails - msgs := make([]*Message, 0, len(tos)) - for _, to := range tos { - msg := NewMessageFrom([]string{to}, ctx.Doer.DisplayName(), setting.MailService.FromEmail, subject, mailBody.String()) + msgs := make([]*Message, 0, len(recipients)) + for _, recipient := range recipients { + msg := NewMessageFrom([]string{recipient.Email}, ctx.Doer.DisplayName(), setting.MailService.FromEmail, subject, mailBody.String()) msg.Info = fmt.Sprintf("Subject: %s, %s", subject, info) // Set Message-ID on first message so replies know what to reference @@ -258,10 +312,49 @@ func composeIssueCommentMessages(ctx *mailCommentContext, tos []string, fromMent msg.SetHeader("In-Reply-To", "<"+ctx.Issue.ReplyReference()+">") msg.SetHeader("References", "<"+ctx.Issue.ReplyReference()+">") } + + for key, value := range generateAdditionalHeaders(ctx, actType, recipient) { + msg.SetHeader(key, value) + } + msgs = append(msgs, msg) } - return msgs + return msgs, nil +} + +func generateAdditionalHeaders(ctx *mailCommentContext, reason string, recipient *models.User) map[string]string { + repo := ctx.Issue.Repo + + return map[string]string{ + // https://datatracker.ietf.org/doc/html/rfc2919 + "List-ID": fmt.Sprintf("%s <%s.%s.%s>", repo.FullName(), repo.Name, repo.OwnerName, setting.Domain), + + // https://datatracker.ietf.org/doc/html/rfc2369 + "List-Archive": fmt.Sprintf("<%s>", repo.HTMLURL()), + //"List-Post": https://github.com/go-gitea/gitea/pull/13585 + //"List-Unsubscribe": https://github.com/go-gitea/gitea/issues/10808, https://github.com/go-gitea/gitea/issues/13283 + + "X-Gitea-Reason": reason, + "X-Gitea-Sender": ctx.Doer.DisplayName(), + "X-Gitea-Recipient": recipient.DisplayName(), + "X-Gitea-Recipient-Address": recipient.Email, + "X-Gitea-Repository": repo.Name, + "X-Gitea-Repository-Path": repo.FullName(), + "X-Gitea-Repository-Link": repo.HTMLURL(), + "X-Gitea-Issue-ID": strconv.FormatInt(ctx.Issue.Index, 10), + "X-Gitea-Issue-Link": ctx.Issue.HTMLURL(), + + "X-GitHub-Reason": reason, + "X-GitHub-Sender": ctx.Doer.DisplayName(), + "X-GitHub-Recipient": recipient.DisplayName(), + "X-GitHub-Recipient-Address": recipient.Email, + + "X-GitLab-NotificationReason": reason, + "X-GitLab-Project": repo.Name, + "X-GitLab-Project-Path": repo.FullName(), + "X-GitLab-Issue-IID": strconv.FormatInt(ctx.Issue.Index, 10), + } } func sanitizeSubject(subject string) string { @@ -274,14 +367,30 @@ func sanitizeSubject(subject string) string { } // SendIssueAssignedMail composes and sends issue assigned email -func SendIssueAssignedMail(issue *models.Issue, doer *models.User, content string, comment *models.Comment, tos []string) { - SendAsyncs(composeIssueCommentMessages(&mailCommentContext{ - Issue: issue, - Doer: doer, - ActionType: models.ActionType(0), - Content: content, - Comment: comment, - }, tos, false, "issue assigned")) +func SendIssueAssignedMail(issue *models.Issue, doer *models.User, content string, comment *models.Comment, recipients []*models.User) error { + if setting.MailService == nil { + // No mail service configured + return nil + } + langMap := make(map[string][]*models.User) + for _, user := range recipients { + langMap[user.Language] = append(langMap[user.Language], user) + } + + for lang, tos := range langMap { + msgs, err := composeIssueCommentMessages(&mailCommentContext{ + Issue: issue, + Doer: doer, + ActionType: models.ActionType(0), + Content: content, + Comment: comment, + }, lang, tos, false, "issue assigned") + if err != nil { + return err + } + SendAsyncs(msgs) + } + return nil } // actionToTemplate returns the type and name of the action facing the user @@ -304,6 +413,10 @@ func actionToTemplate(issue *models.Issue, actionType models.ActionType, name = "reopen" case models.ActionMergePullRequest: name = "merge" + case models.ActionPullReviewDismissed: + name = "review_dismissed" + case models.ActionPullRequestReadyForReview: + name = "ready_for_review" default: switch commentType { case models.CommentTypeReview: diff --git a/services/mailer/mail_comment.go b/services/mailer/mail_comment.go index 2f166720d..eef71557e 100644 --- a/services/mailer/mail_comment.go +++ b/services/mailer/mail_comment.go @@ -7,27 +7,28 @@ package mailer import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" ) -// MailParticipantsComment sends new comment emails to repository watchers -// and mentioned people. +// MailParticipantsComment sends new comment emails to repository watchers and mentioned people. func MailParticipantsComment(c *models.Comment, opType models.ActionType, issue *models.Issue, mentions []*models.User) error { - return mailParticipantsComment(c, opType, issue, mentions) -} - -func mailParticipantsComment(c *models.Comment, opType models.ActionType, issue *models.Issue, mentions []*models.User) (err error) { - mentionedIDs := make([]int64, len(mentions)) - for i, u := range mentions { - mentionedIDs[i] = u.ID + if setting.MailService == nil { + // No mail service configured + return nil } - if err = mailIssueCommentToParticipants( + + content := c.Content + if c.Type == models.CommentTypePullPush { + content = "" + } + if err := mailIssueCommentToParticipants( &mailCommentContext{ Issue: issue, Doer: c.Poster, ActionType: opType, - Content: c.Content, + Content: content, Comment: c, - }, mentionedIDs); err != nil { + }, mentions); err != nil { log.Error("mailIssueCommentToParticipants: %v", err) } return nil @@ -35,10 +36,11 @@ func mailParticipantsComment(c *models.Comment, opType models.ActionType, issue // MailMentionsComment sends email to users mentioned in a code comment func MailMentionsComment(pr *models.PullRequest, c *models.Comment, mentions []*models.User) (err error) { - mentionedIDs := make([]int64, len(mentions)) - for i, u := range mentions { - mentionedIDs[i] = u.ID + if setting.MailService == nil { + // No mail service configured + return nil } + visited := make(map[int64]bool, len(mentions)+1) visited[c.Poster.ID] = true if err = mailIssueCommentBatch( @@ -48,7 +50,7 @@ func MailMentionsComment(pr *models.PullRequest, c *models.Comment, mentions []* ActionType: models.ActionCommentPull, Content: c.Content, Comment: c, - }, mentionedIDs, visited, true); err != nil { + }, mentions, visited, true); err != nil { log.Error("mailIssueCommentBatch: %v", err) } return nil diff --git a/services/mailer/mail_issue.go b/services/mailer/mail_issue.go index b600060a6..6f401e5f9 100644 --- a/services/mailer/mail_issue.go +++ b/services/mailer/mail_issue.go @@ -9,6 +9,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/setting" ) func fallbackMailSubject(issue *models.Issue) string { @@ -23,11 +24,16 @@ type mailCommentContext struct { Comment *models.Comment } +const ( + // MailBatchSize set the batch size used in mailIssueCommentBatch + MailBatchSize = 100 +) + // mailIssueCommentToParticipants can be used for both new issue creation and comment. // This function sends two list of emails: -// 1. Repository watchers and users who are participated in comments. +// 1. Repository watchers (except for WIP pull requests) and users who are participated in comments. // 2. Users who are not in 1. but get mentioned in current issue/comment. -func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []int64) error { +func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []*models.User) error { // Required by the mail composer; make sure to load these before calling the async function if err := ctx.Issue.LoadRepo(); err != nil { @@ -69,11 +75,13 @@ func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []int64) e // =========== Repo watchers =========== // Make repo watchers last, since it's likely the list with the most users - ids, err = models.GetRepoWatchersIDs(ctx.Issue.RepoID) - if err != nil { - return fmt.Errorf("GetRepoWatchersIDs(%d): %v", ctx.Issue.RepoID, err) + if !(ctx.Issue.IsPull && ctx.Issue.PullRequest.IsWorkInProgress() && ctx.ActionType != models.ActionCreatePullRequest) { + ids, err = models.GetRepoWatchersIDs(ctx.Issue.RepoID) + if err != nil { + return fmt.Errorf("GetRepoWatchersIDs(%d): %v", ctx.Issue.RepoID, err) + } + unfiltered = append(ids, unfiltered...) } - unfiltered = append(ids, unfiltered...) visited := make(map[int64]bool, len(unfiltered)+len(mentions)+1) @@ -94,78 +102,87 @@ func mailIssueCommentToParticipants(ctx *mailCommentContext, mentions []int64) e visited[i] = true } - if err = mailIssueCommentBatch(ctx, unfiltered, visited, false); err != nil { + unfilteredUsers, err := models.GetMaileableUsersByIDs(unfiltered, false) + if err != nil { + return err + } + if err = mailIssueCommentBatch(ctx, unfilteredUsers, visited, false); err != nil { return fmt.Errorf("mailIssueCommentBatch(): %v", err) } return nil } -func mailIssueCommentBatch(ctx *mailCommentContext, ids []int64, visited map[int64]bool, fromMention bool) error { - const batchSize = 100 - for i := 0; i < len(ids); i += batchSize { - var last int - if i+batchSize < len(ids) { - last = i + batchSize - } else { - last = len(ids) - } - unique := make([]int64, 0, last-i) - for j := i; j < last; j++ { - id := ids[j] - if _, ok := visited[id]; !ok { - unique = append(unique, id) - visited[id] = true - } - } - recipients, err := models.GetMaileableUsersByIDs(unique, fromMention) - if err != nil { - return err - } - - checkUnit := models.UnitTypeIssues - if ctx.Issue.IsPull { - checkUnit = models.UnitTypePullRequests - } - // Make sure all recipients can still see the issue - idx := 0 - for _, r := range recipients { - if ctx.Issue.Repo.CheckUnitUser(r, checkUnit) { - recipients[idx] = r - idx++ - } - } - recipients = recipients[:idx] - - // TODO: Separate recipients by language for i18n mail templates - tos := make([]string, len(recipients)) - for i := range recipients { - tos[i] = recipients[i].Email - } - SendAsyncs(composeIssueCommentMessages(ctx, tos, fromMention, "issue comments")) +func mailIssueCommentBatch(ctx *mailCommentContext, users []*models.User, visited map[int64]bool, fromMention bool) error { + checkUnit := models.UnitTypeIssues + if ctx.Issue.IsPull { + checkUnit = models.UnitTypePullRequests } + + langMap := make(map[string][]*models.User) + for _, user := range users { + // At this point we exclude: + // user that don't have all mails enabled or users only get mail on mention and this is one ... + if !(user.EmailNotificationsPreference == models.EmailNotificationsEnabled || + fromMention && user.EmailNotificationsPreference == models.EmailNotificationsOnMention) { + continue + } + + // if we have already visited this user we exclude them + if _, ok := visited[user.ID]; ok { + continue + } + + // now mark them as visited + visited[user.ID] = true + + // test if this user is allowed to see the issue/pull + if !ctx.Issue.Repo.CheckUnitUser(user, checkUnit) { + continue + } + + langMap[user.Language] = append(langMap[user.Language], user) + } + + for lang, receivers := range langMap { + // because we know that the len(receivers) > 0 and we don't care about the order particularly + // working backwards from the last (possibly) incomplete batch. If len(receivers) can be 0 this + // starting condition will need to be changed slightly + for i := ((len(receivers) - 1) / MailBatchSize) * MailBatchSize; i >= 0; i -= MailBatchSize { + msgs, err := composeIssueCommentMessages(ctx, lang, receivers[i:], fromMention, "issue comments") + if err != nil { + return err + } + SendAsyncs(msgs) + receivers = receivers[:i] + } + } + return nil } // MailParticipants sends new issue thread created emails to repository watchers // and mentioned people. func MailParticipants(issue *models.Issue, doer *models.User, opType models.ActionType, mentions []*models.User) error { - return mailParticipants(issue, doer, opType, mentions) -} - -func mailParticipants(issue *models.Issue, doer *models.User, opType models.ActionType, mentions []*models.User) (err error) { - mentionedIDs := make([]int64, len(mentions)) - for i, u := range mentions { - mentionedIDs[i] = u.ID + if setting.MailService == nil { + // No mail service configured + return nil } - if err = mailIssueCommentToParticipants( + + content := issue.Content + if opType == models.ActionCloseIssue || opType == models.ActionClosePullRequest || + opType == models.ActionReopenIssue || opType == models.ActionReopenPullRequest || + opType == models.ActionMergePullRequest { + content = "" + } + if err := mailIssueCommentToParticipants( &mailCommentContext{ Issue: issue, Doer: doer, ActionType: opType, - Content: issue.Content, + Content: content, Comment: nil, - }, mentionedIDs); err != nil { + }, mentions); err != nil { log.Error("mailIssueCommentToParticipants: %v", err) } return nil diff --git a/services/mailer/mail_release.go b/services/mailer/mail_release.go index f278c853a..a6fc28a5c 100644 --- a/services/mailer/mail_release.go +++ b/services/mailer/mail_release.go @@ -6,13 +6,15 @@ package mailer import ( "bytes" - "fmt" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/base" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/markup" "code.gitea.io/gitea/modules/markup/markdown" "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/translation" ) const ( @@ -21,6 +23,11 @@ const ( // MailNewRelease send new release notify to all all repo watchers. func MailNewRelease(rel *models.Release) { + if setting.MailService == nil { + // No mail service configured + return + } + watcherIDList, err := models.GetRepoWatchersIDs(rel.RepoID) if err != nil { log.Error("GetRepoWatchersIDs(%d): %v", rel.RepoID, err) @@ -33,29 +40,50 @@ func MailNewRelease(rel *models.Release) { return } - tos := make([]string, 0, len(recipients)) - for _, to := range recipients { - if to.ID != rel.PublisherID { - tos = append(tos, to.Email) + langMap := make(map[string][]string) + for _, user := range recipients { + if user.ID != rel.PublisherID { + langMap[user.Language] = append(langMap[user.Language], user.Email) } } - rel.RenderedNote = markdown.RenderString(rel.Note, rel.Repo.Link(), rel.Repo.ComposeMetas()) - subject := fmt.Sprintf("%s in %s released", rel.TagName, rel.Repo.FullName()) + for lang, tos := range langMap { + mailNewRelease(lang, tos, rel) + } +} +func mailNewRelease(lang string, tos []string, rel *models.Release) { + locale := translation.NewLocale(lang) + + var err error + rel.RenderedNote, err = markdown.RenderString(&markup.RenderContext{ + URLPrefix: rel.Repo.Link(), + Metas: rel.Repo.ComposeMetas(), + }, rel.Note) + if err != nil { + log.Error("markdown.RenderString(%d): %v", rel.RepoID, err) + return + } + + subject := locale.Tr("mail.release.new.subject", rel.TagName, rel.Repo.FullName()) mailMeta := map[string]interface{}{ - "Release": rel, - "Subject": subject, + "Release": rel, + "Subject": subject, + "Language": locale.Language(), + // helper + "i18n": locale, + "Str2html": templates.Str2html, + "TrN": templates.TrN, } var mailBody bytes.Buffer - if err = bodyTemplates.ExecuteTemplate(&mailBody, string(tplNewReleaseMail), mailMeta); err != nil { + if err := bodyTemplates.ExecuteTemplate(&mailBody, string(tplNewReleaseMail), mailMeta); err != nil { log.Error("ExecuteTemplate [%s]: %v", string(tplNewReleaseMail)+"/body", err) return } - msgs := make([]*Message, 0, len(recipients)) + msgs := make([]*Message, 0, len(tos)) publisherName := rel.Publisher.DisplayName() relURL := "<" + rel.HTMLURL() + ">" for _, to := range tos { diff --git a/services/mailer/mail_repo.go b/services/mailer/mail_repo.go new file mode 100644 index 000000000..ef85f4aa5 --- /dev/null +++ b/services/mailer/mail_repo.go @@ -0,0 +1,84 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package mailer + +import ( + "bytes" + "fmt" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/templates" + "code.gitea.io/gitea/modules/translation" +) + +// SendRepoTransferNotifyMail triggers a notification e-mail when a pending repository transfer was created +func SendRepoTransferNotifyMail(doer, newOwner *models.User, repo *models.Repository) error { + if setting.MailService == nil { + // No mail service configured + return nil + } + + if newOwner.IsOrganization() { + users, err := models.GetUsersWhoCanCreateOrgRepo(newOwner.ID) + if err != nil { + return err + } + + langMap := make(map[string][]string) + for _, user := range users { + langMap[user.Language] = append(langMap[user.Language], user.Email) + } + + for lang, tos := range langMap { + if err := sendRepoTransferNotifyMailPerLang(lang, newOwner, doer, tos, repo); err != nil { + return err + } + } + + return nil + } + + return sendRepoTransferNotifyMailPerLang(newOwner.Language, newOwner, doer, []string{newOwner.Email}, repo) +} + +// sendRepoTransferNotifyMail triggers a notification e-mail when a pending repository transfer was created for each language +func sendRepoTransferNotifyMailPerLang(lang string, newOwner, doer *models.User, emails []string, repo *models.Repository) error { + var ( + locale = translation.NewLocale(lang) + content bytes.Buffer + ) + + destination := locale.Tr("mail.repo.transfer.to_you") + subject := locale.Tr("mail.repo.transfer.subject_to_you", doer.DisplayName(), repo.FullName()) + if newOwner.IsOrganization() { + destination = newOwner.DisplayName() + subject = locale.Tr("mail.repo.transfer.subject_to", doer.DisplayName(), repo.FullName(), destination) + } + + data := map[string]interface{}{ + "Doer": doer, + "User": repo.Owner, + "Repo": repo.FullName(), + "Link": repo.HTMLURL(), + "Subject": subject, + "Language": locale.Language(), + "Destination": destination, + // helper + "i18n": locale, + "Str2html": templates.Str2html, + "TrN": templates.TrN, + } + + if err := bodyTemplates.ExecuteTemplate(&content, string(mailRepoTransferNotify), data); err != nil { + return err + } + + msg := NewMessage(emails, subject, content.String()) + msg.Info = fmt.Sprintf("UID: %d, repository pending transfer notification", newOwner.ID) + + SendAsync(msg) + return nil +} diff --git a/services/mailer/mail_test.go b/services/mailer/mail_test.go index d7d02d9de..0a9112f3b 100644 --- a/services/mailer/mail_test.go +++ b/services/mailer/mail_test.go @@ -39,7 +39,7 @@ const bodyTpl = ` ` -func TestComposeIssueCommentMessage(t *testing.T) { +func prepareMailerTest(t *testing.T) (doer *models.User, repo *models.Repository, issue *models.Issue, comment *models.Comment) { assert.NoError(t, models.PrepareTestDatabase()) var mailService = setting.Mailer{ From: "test@gitea.com", @@ -48,18 +48,25 @@ func TestComposeIssueCommentMessage(t *testing.T) { setting.MailService = &mailService setting.Domain = "localhost" - doer := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) - repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1, Owner: doer}).(*models.Repository) - issue := models.AssertExistsAndLoadBean(t, &models.Issue{ID: 1, Repo: repo, Poster: doer}).(*models.Issue) - comment := models.AssertExistsAndLoadBean(t, &models.Comment{ID: 2, Issue: issue}).(*models.Comment) + doer = models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + repo = models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1, Owner: doer}).(*models.Repository) + issue = models.AssertExistsAndLoadBean(t, &models.Issue{ID: 1, Repo: repo, Poster: doer}).(*models.Issue) + assert.NoError(t, issue.LoadRepo()) + comment = models.AssertExistsAndLoadBean(t, &models.Comment{ID: 2, Issue: issue}).(*models.Comment) + return +} + +func TestComposeIssueCommentMessage(t *testing.T) { + doer, _, issue, comment := prepareMailerTest(t) stpl := texttmpl.Must(texttmpl.New("issue/comment").Parse(subjectTpl)) btpl := template.Must(template.New("issue/comment").Parse(bodyTpl)) InitMailRender(stpl, btpl) - tos := []string{"test@gitea.com", "test2@gitea.com"} - msgs := composeIssueCommentMessages(&mailCommentContext{Issue: issue, Doer: doer, ActionType: models.ActionCommentIssue, - Content: "test body", Comment: comment}, tos, false, "issue comment") + recipients := []*models.User{{Name: "Test", Email: "test@gitea.com"}, {Name: "Test2", Email: "test2@gitea.com"}} + msgs, err := composeIssueCommentMessages(&mailCommentContext{Issue: issue, Doer: doer, ActionType: models.ActionCommentIssue, + Content: "test body", Comment: comment}, "en-US", recipients, false, "issue comment") + assert.NoError(t, err) assert.Len(t, msgs, 2) gomailMsg := msgs[0].ToMessage() mailto := gomailMsg.GetHeader("To") @@ -75,25 +82,16 @@ func TestComposeIssueCommentMessage(t *testing.T) { } func TestComposeIssueMessage(t *testing.T) { - assert.NoError(t, models.PrepareTestDatabase()) - var mailService = setting.Mailer{ - From: "test@gitea.com", - } - - setting.MailService = &mailService - setting.Domain = "localhost" - - doer := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) - repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1, Owner: doer}).(*models.Repository) - issue := models.AssertExistsAndLoadBean(t, &models.Issue{ID: 1, Repo: repo, Poster: doer}).(*models.Issue) + doer, _, issue, _ := prepareMailerTest(t) stpl := texttmpl.Must(texttmpl.New("issue/new").Parse(subjectTpl)) btpl := template.Must(template.New("issue/new").Parse(bodyTpl)) InitMailRender(stpl, btpl) - tos := []string{"test@gitea.com", "test2@gitea.com"} - msgs := composeIssueCommentMessages(&mailCommentContext{Issue: issue, Doer: doer, ActionType: models.ActionCreateIssue, - Content: "test body"}, tos, false, "issue create") + recipients := []*models.User{{Name: "Test", Email: "test@gitea.com"}, {Name: "Test2", Email: "test2@gitea.com"}} + msgs, err := composeIssueCommentMessages(&mailCommentContext{Issue: issue, Doer: doer, ActionType: models.ActionCreateIssue, + Content: "test body"}, "en-US", recipients, false, "issue create") + assert.NoError(t, err) assert.Len(t, msgs, 2) gomailMsg := msgs[0].ToMessage() @@ -109,18 +107,8 @@ func TestComposeIssueMessage(t *testing.T) { } func TestTemplateSelection(t *testing.T) { - assert.NoError(t, models.PrepareTestDatabase()) - var mailService = setting.Mailer{ - From: "test@gitea.com", - } - - setting.MailService = &mailService - setting.Domain = "localhost" - - doer := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) - repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1, Owner: doer}).(*models.Repository) - issue := models.AssertExistsAndLoadBean(t, &models.Issue{ID: 1, Repo: repo, Poster: doer}).(*models.Issue) - tos := []string{"test@gitea.com"} + doer, repo, issue, comment := prepareMailerTest(t) + recipients := []*models.User{{Name: "Test", Email: "test@gitea.com"}} stpl := texttmpl.Must(texttmpl.New("issue/default").Parse("issue/default/subject")) texttmpl.Must(stpl.New("issue/new").Parse("issue/new/subject")) @@ -144,38 +132,26 @@ func TestTemplateSelection(t *testing.T) { } msg := testComposeIssueCommentMessage(t, &mailCommentContext{Issue: issue, Doer: doer, ActionType: models.ActionCreateIssue, - Content: "test body"}, tos, false, "TestTemplateSelection") + Content: "test body"}, recipients, false, "TestTemplateSelection") expect(t, msg, "issue/new/subject", "issue/new/body") - comment := models.AssertExistsAndLoadBean(t, &models.Comment{ID: 2, Issue: issue}).(*models.Comment) msg = testComposeIssueCommentMessage(t, &mailCommentContext{Issue: issue, Doer: doer, ActionType: models.ActionCommentIssue, - Content: "test body", Comment: comment}, tos, false, "TestTemplateSelection") + Content: "test body", Comment: comment}, recipients, false, "TestTemplateSelection") expect(t, msg, "issue/default/subject", "issue/default/body") pull := models.AssertExistsAndLoadBean(t, &models.Issue{ID: 2, Repo: repo, Poster: doer}).(*models.Issue) comment = models.AssertExistsAndLoadBean(t, &models.Comment{ID: 4, Issue: pull}).(*models.Comment) msg = testComposeIssueCommentMessage(t, &mailCommentContext{Issue: pull, Doer: doer, ActionType: models.ActionCommentPull, - Content: "test body", Comment: comment}, tos, false, "TestTemplateSelection") + Content: "test body", Comment: comment}, recipients, false, "TestTemplateSelection") expect(t, msg, "pull/comment/subject", "pull/comment/body") msg = testComposeIssueCommentMessage(t, &mailCommentContext{Issue: issue, Doer: doer, ActionType: models.ActionCloseIssue, - Content: "test body", Comment: comment}, tos, false, "TestTemplateSelection") + Content: "test body", Comment: comment}, recipients, false, "TestTemplateSelection") expect(t, msg, "Re: [user2/repo1] issue1 (#1)", "issue/close/body") } func TestTemplateServices(t *testing.T) { - assert.NoError(t, models.PrepareTestDatabase()) - var mailService = setting.Mailer{ - From: "test@gitea.com", - } - - setting.MailService = &mailService - setting.Domain = "localhost" - - doer := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) - repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1, Owner: doer}).(*models.Repository) - issue := models.AssertExistsAndLoadBean(t, &models.Issue{ID: 1, Repo: repo, Poster: doer}).(*models.Issue) - comment := models.AssertExistsAndLoadBean(t, &models.Comment{ID: 2, Issue: issue}).(*models.Comment) + doer, _, issue, comment := prepareMailerTest(t) assert.NoError(t, issue.LoadRepo()) expect := func(t *testing.T, issue *models.Issue, comment *models.Comment, doer *models.User, @@ -185,9 +161,9 @@ func TestTemplateServices(t *testing.T) { btpl := template.Must(template.New("issue/default").Parse(tplBody)) InitMailRender(stpl, btpl) - tos := []string{"test@gitea.com"} + recipients := []*models.User{{Name: "Test", Email: "test@gitea.com"}} msg := testComposeIssueCommentMessage(t, &mailCommentContext{Issue: issue, Doer: doer, ActionType: actionType, - Content: "test body", Comment: comment}, tos, fromMention, "TestTemplateServices") + Content: "test body", Comment: comment}, recipients, fromMention, "TestTemplateServices") subject := msg.ToMessage().GetHeader("Subject") msgbuf := new(bytes.Buffer) @@ -217,8 +193,38 @@ func TestTemplateServices(t *testing.T) { "//Re: //") } -func testComposeIssueCommentMessage(t *testing.T, ctx *mailCommentContext, tos []string, fromMention bool, info string) *Message { - msgs := composeIssueCommentMessages(ctx, tos, fromMention, info) +func testComposeIssueCommentMessage(t *testing.T, ctx *mailCommentContext, recipients []*models.User, fromMention bool, info string) *Message { + msgs, err := composeIssueCommentMessages(ctx, "en-US", recipients, fromMention, info) + assert.NoError(t, err) assert.Len(t, msgs, 1) return msgs[0] } + +func TestGenerateAdditionalHeaders(t *testing.T) { + doer, _, issue, _ := prepareMailerTest(t) + + ctx := &mailCommentContext{Issue: issue, Doer: doer} + recipient := &models.User{Name: "Test", Email: "test@gitea.com"} + + headers := generateAdditionalHeaders(ctx, "dummy-reason", recipient) + + expected := map[string]string{ + "List-ID": "user2/repo1 ", + "List-Archive": "", + "X-Gitea-Reason": "dummy-reason", + "X-Gitea-Sender": "< Ur Tw ><", + "X-Gitea-Recipient": "Test", + "X-Gitea-Recipient-Address": "test@gitea.com", + "X-Gitea-Repository": "repo1", + "X-Gitea-Repository-Path": "user2/repo1", + "X-Gitea-Repository-Link": "https://try.gitea.io/user2/repo1", + "X-Gitea-Issue-ID": "1", + "X-Gitea-Issue-Link": "https://try.gitea.io/user2/repo1/issues/1", + } + + for key, value := range expected { + if assert.Contains(t, headers, key) { + assert.Equal(t, value, headers[key]) + } + } +} diff --git a/services/mailer/mailer.go b/services/mailer/mailer.go index 2e7beffa1..fae8d473e 100644 --- a/services/mailer/mailer.go +++ b/services/mailer/mailer.go @@ -304,7 +304,7 @@ var Sender gomail.Sender // NewContext start mail queue service func NewContext() { // Need to check if mailQueue is nil because in during reinstall (user had installed - // before but swithed install lock off), this function will be called again + // before but switched install lock off), this function will be called again // while mail queue is already processing tasks, and produces a race condition. if setting.MailService == nil || mailQueue != nil { return @@ -337,13 +337,16 @@ func NewContext() { // SendAsync send mail asynchronously func SendAsync(msg *Message) { - go func() { - _ = mailQueue.Push(msg) - }() + SendAsyncs([]*Message{msg}) } // SendAsyncs send mails asynchronously func SendAsyncs(msgs []*Message) { + if setting.MailService == nil { + log.Error("Mailer: SendAsyncs is being invoked but mail service hasn't been initialized") + return + } + go func() { for _, msg := range msgs { _ = mailQueue.Push(msg) diff --git a/services/mirror/mirror.go b/services/mirror/mirror.go index 328e23ad2..1e30c919e 100644 --- a/services/mirror/mirror.go +++ b/services/mirror/mirror.go @@ -7,584 +7,97 @@ package mirror import ( "context" "fmt" - "net/url" "strconv" "strings" - "time" "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/cache" - "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" - "code.gitea.io/gitea/modules/notification" - repo_module "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/sync" - "code.gitea.io/gitea/modules/timeutil" - "code.gitea.io/gitea/modules/util" ) // mirrorQueue holds an UniqueQueue object of the mirror var mirrorQueue = sync.NewUniqueQueue(setting.Repository.MirrorQueueLength) -func readAddress(m *models.Mirror) { - if len(m.Address) > 0 { - return - } - var err error - m.Address, err = remoteAddress(m.Repo.RepoPath()) - if err != nil { - log.Error("remoteAddress: %v", err) - } -} - -func remoteAddress(repoPath string) (string, error) { - var cmd *git.Command - err := git.LoadGitVersion() - if err != nil { - return "", err - } - if git.CheckGitVersionAtLeast("2.7") == nil { - cmd = git.NewCommand("remote", "get-url", "origin") - } else { - cmd = git.NewCommand("config", "--get", "remote.origin.url") - } - - result, err := cmd.RunInDir(repoPath) - if err != nil { - if strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { - return "", nil - } - return "", err - } - if len(result) > 0 { - return result[:len(result)-1], nil - } - return "", nil -} - -// sanitizeOutput sanitizes output of a command, replacing occurrences of the -// repository's remote address with a sanitized version. -func sanitizeOutput(output, repoPath string) (string, error) { - remoteAddr, err := remoteAddress(repoPath) - if err != nil { - // if we're unable to load the remote address, then we're unable to - // sanitize. - return "", err - } - return util.SanitizeMessage(output, remoteAddr), nil -} - -// AddressNoCredentials returns mirror address from Git repository config without credentials. -func AddressNoCredentials(m *models.Mirror) string { - readAddress(m) - u, err := url.Parse(m.Address) - if err != nil { - // this shouldn't happen but just return it unsanitised - return m.Address - } - u.User = nil - return u.String() -} - -// UpdateAddress writes new address to Git repository and database -func UpdateAddress(m *models.Mirror, addr string) error { - repoPath := m.Repo.RepoPath() - // Remove old origin - _, err := git.NewCommand("remote", "rm", "origin").RunInDir(repoPath) - if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { - return err - } - - _, err = git.NewCommand("remote", "add", "origin", "--mirror=fetch", addr).RunInDir(repoPath) - if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { - return err - } - - if m.Repo.HasWiki() { - wikiPath := m.Repo.WikiPath() - wikiRemotePath := repo_module.WikiRemoteURL(addr) - // Remove old origin of wiki - _, err := git.NewCommand("remote", "rm", "origin").RunInDir(wikiPath) - if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { - return err - } - - _, err = git.NewCommand("remote", "add", "origin", "--mirror=fetch", wikiRemotePath).RunInDir(wikiPath) - if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { - return err - } - } - - m.Repo.OriginalURL = addr - return models.UpdateRepositoryCols(m.Repo, "original_url") -} - -// gitShortEmptySha Git short empty SHA -const gitShortEmptySha = "0000000" - -// mirrorSyncResult contains information of a updated reference. -// If the oldCommitID is "0000000", it means a new reference, the value of newCommitID is empty. -// If the newCommitID is "0000000", it means the reference is deleted, the value of oldCommitID is empty. -type mirrorSyncResult struct { - refName string - oldCommitID string - newCommitID string -} - -// parseRemoteUpdateOutput detects create, update and delete operations of references from upstream. -func parseRemoteUpdateOutput(output string) []*mirrorSyncResult { - results := make([]*mirrorSyncResult, 0, 3) - lines := strings.Split(output, "\n") - for i := range lines { - // Make sure reference name is presented before continue - idx := strings.Index(lines[i], "-> ") - if idx == -1 { - continue - } - - refName := lines[i][idx+3:] - - switch { - case strings.HasPrefix(lines[i], " * "): // New reference - if strings.HasPrefix(lines[i], " * [new tag]") { - refName = git.TagPrefix + refName - } else if strings.HasPrefix(lines[i], " * [new branch]") { - refName = git.BranchPrefix + refName - } - results = append(results, &mirrorSyncResult{ - refName: refName, - oldCommitID: gitShortEmptySha, - }) - case strings.HasPrefix(lines[i], " - "): // Delete reference - results = append(results, &mirrorSyncResult{ - refName: refName, - newCommitID: gitShortEmptySha, - }) - case strings.HasPrefix(lines[i], " + "): // Force update - if idx := strings.Index(refName, " "); idx > -1 { - refName = refName[:idx] - } - delimIdx := strings.Index(lines[i][3:], " ") - if delimIdx == -1 { - log.Error("SHA delimiter not found: %q", lines[i]) - continue - } - shas := strings.Split(lines[i][3:delimIdx+3], "...") - if len(shas) != 2 { - log.Error("Expect two SHAs but not what found: %q", lines[i]) - continue - } - results = append(results, &mirrorSyncResult{ - refName: refName, - oldCommitID: shas[0], - newCommitID: shas[1], - }) - case strings.HasPrefix(lines[i], " "): // New commits of a reference - delimIdx := strings.Index(lines[i][3:], " ") - if delimIdx == -1 { - log.Error("SHA delimiter not found: %q", lines[i]) - continue - } - shas := strings.Split(lines[i][3:delimIdx+3], "..") - if len(shas) != 2 { - log.Error("Expect two SHAs but not what found: %q", lines[i]) - continue - } - results = append(results, &mirrorSyncResult{ - refName: refName, - oldCommitID: shas[0], - newCommitID: shas[1], - }) - - default: - log.Warn("parseRemoteUpdateOutput: unexpected update line %q", lines[i]) - } - } - return results -} - -// runSync returns true if sync finished without error. -func runSync(m *models.Mirror) ([]*mirrorSyncResult, bool) { - repoPath := m.Repo.RepoPath() - wikiPath := m.Repo.WikiPath() - timeout := time.Duration(setting.Git.Timeout.Mirror) * time.Second - - log.Trace("SyncMirrors [repo: %-v]: running git remote update...", m.Repo) - gitArgs := []string{"remote", "update"} - if m.EnablePrune { - gitArgs = append(gitArgs, "--prune") - } - - stdoutBuilder := strings.Builder{} - stderrBuilder := strings.Builder{} - if err := git.NewCommand(gitArgs...). - SetDescription(fmt.Sprintf("Mirror.runSync: %s", m.Repo.FullName())). - RunInDirTimeoutPipeline(timeout, repoPath, &stdoutBuilder, &stderrBuilder); err != nil { - stdout := stdoutBuilder.String() - stderr := stderrBuilder.String() - // sanitize the output, since it may contain the remote address, which may - // contain a password - stderrMessage, sanitizeErr := sanitizeOutput(stderr, repoPath) - if sanitizeErr != nil { - log.Error("sanitizeOutput failed on stderr: %v", sanitizeErr) - log.Error("Failed to update mirror repository %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdout, stderr, err) - return nil, false - } - stdoutMessage, err := sanitizeOutput(stdout, repoPath) - if err != nil { - log.Error("sanitizeOutput failed: %v", sanitizeErr) - log.Error("Failed to update mirror repository %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdout, stderrMessage, err) - return nil, false - } - - log.Error("Failed to update mirror repository %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err) - desc := fmt.Sprintf("Failed to update mirror repository '%s': %s", repoPath, stderrMessage) - if err = models.CreateRepositoryNotice(desc); err != nil { - log.Error("CreateRepositoryNotice: %v", err) - } - return nil, false - } - output := stderrBuilder.String() - - gitRepo, err := git.OpenRepository(repoPath) - if err != nil { - log.Error("OpenRepository: %v", err) - return nil, false - } - - log.Trace("SyncMirrors [repo: %-v]: syncing releases with tags...", m.Repo) - if err = repo_module.SyncReleasesWithTags(m.Repo, gitRepo); err != nil { - gitRepo.Close() - log.Error("Failed to synchronize tags to releases for repository: %v", err) - } - gitRepo.Close() - - log.Trace("SyncMirrors [repo: %-v]: updating size of repository", m.Repo) - if err := m.Repo.UpdateSize(models.DefaultDBContext()); err != nil { - log.Error("Failed to update size for mirror repository: %v", err) - } - - if m.Repo.HasWiki() { - log.Trace("SyncMirrors [repo: %-v Wiki]: running git remote update...", m.Repo) - stderrBuilder.Reset() - stdoutBuilder.Reset() - if err := git.NewCommand("remote", "update", "--prune"). - SetDescription(fmt.Sprintf("Mirror.runSync Wiki: %s ", m.Repo.FullName())). - RunInDirTimeoutPipeline(timeout, wikiPath, &stdoutBuilder, &stderrBuilder); err != nil { - stdout := stdoutBuilder.String() - stderr := stderrBuilder.String() - // sanitize the output, since it may contain the remote address, which may - // contain a password - stderrMessage, sanitizeErr := sanitizeOutput(stderr, repoPath) - if sanitizeErr != nil { - log.Error("sanitizeOutput failed on stderr: %v", sanitizeErr) - log.Error("Failed to update mirror repository wiki %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdout, stderr, err) - return nil, false - } - stdoutMessage, err := sanitizeOutput(stdout, repoPath) - if err != nil { - log.Error("sanitizeOutput failed: %v", sanitizeErr) - log.Error("Failed to update mirror repository wiki %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdout, stderrMessage, err) - return nil, false - } - - log.Error("Failed to update mirror repository wiki %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err) - desc := fmt.Sprintf("Failed to update mirror repository wiki '%s': %s", wikiPath, stderrMessage) - if err = models.CreateRepositoryNotice(desc); err != nil { - log.Error("CreateRepositoryNotice: %v", err) - } - return nil, false - } - log.Trace("SyncMirrors [repo: %-v Wiki]: git remote update complete", m.Repo) - } - - log.Trace("SyncMirrors [repo: %-v]: invalidating mirror branch caches...", m.Repo) - branches, err := repo_module.GetBranches(m.Repo) - if err != nil { - log.Error("GetBranches: %v", err) - return nil, false - } - - for _, branch := range branches { - cache.Remove(m.Repo.GetCommitsCountCacheKey(branch.Name, true)) - } - - m.UpdatedUnix = timeutil.TimeStampNow() - return parseRemoteUpdateOutput(output), true -} - -// Address returns mirror address from Git repository config without credentials. -func Address(m *models.Mirror) string { - readAddress(m) - return util.SanitizeURLCredentials(m.Address, false) -} - -// Username returns the mirror address username -func Username(m *models.Mirror) string { - readAddress(m) - u, err := url.Parse(m.Address) - if err != nil { - // this shouldn't happen but if it does return "" - return "" - } - return u.User.Username() -} - -// Password returns the mirror address password -func Password(m *models.Mirror) string { - readAddress(m) - u, err := url.Parse(m.Address) - if err != nil { - // this shouldn't happen but if it does return "" - return "" - } - password, _ := u.User.Password() - return password -} - // Update checks and updates mirror repositories. func Update(ctx context.Context) error { log.Trace("Doing: Update") - if err := models.MirrorsIterate(func(idx int, bean interface{}) error { - m := bean.(*models.Mirror) - if m.Repo == nil { - log.Error("Disconnected mirror repository found: %d", m.ID) + + handler := func(idx int, bean interface{}) error { + var item string + if m, ok := bean.(*models.Mirror); ok { + if m.Repo == nil { + log.Error("Disconnected mirror found: %d", m.ID) + return nil + } + item = fmt.Sprintf("pull %d", m.RepoID) + } else if m, ok := bean.(*models.PushMirror); ok { + if m.Repo == nil { + log.Error("Disconnected push-mirror found: %d", m.ID) + return nil + } + item = fmt.Sprintf("push %d", m.ID) + } else { + log.Error("Unknown bean: %v", bean) return nil } + select { case <-ctx.Done(): return fmt.Errorf("Aborted") default: - mirrorQueue.Add(m.RepoID) + mirrorQueue.Add(item) return nil } - }); err != nil { - log.Trace("Update: %v", err) + } + + if err := models.MirrorsIterate(handler); err != nil { + log.Error("MirrorsIterate: %v", err) + return err + } + if err := models.PushMirrorsIterate(handler); err != nil { + log.Error("PushMirrorsIterate: %v", err) return err } log.Trace("Finished: Update") return nil } -// SyncMirrors checks and syncs mirrors. +// syncMirrors checks and syncs mirrors. // FIXME: graceful: this should be a persistable queue -func SyncMirrors(ctx context.Context) { +func syncMirrors(ctx context.Context) { // Start listening on new sync requests. for { select { case <-ctx.Done(): mirrorQueue.Close() return - case repoID := <-mirrorQueue.Queue(): - syncMirror(repoID) - } - } -} - -func syncMirror(repoID string) { - log.Trace("SyncMirrors [repo_id: %v]", repoID) - defer func() { - err := recover() - if err == nil { - return - } - // There was a panic whilst syncMirrors... - log.Error("PANIC whilst syncMirrors[%s] Panic: %v\nStacktrace: %s", repoID, err, log.Stack(2)) - }() - mirrorQueue.Remove(repoID) - - id, _ := strconv.ParseInt(repoID, 10, 64) - m, err := models.GetMirrorByRepoID(id) - if err != nil { - log.Error("GetMirrorByRepoID [%s]: %v", repoID, err) - return - } - - log.Trace("SyncMirrors [repo: %-v]: Running Sync", m.Repo) - results, ok := runSync(m) - if !ok { - return - } - - log.Trace("SyncMirrors [repo: %-v]: Scheduling next update", m.Repo) - m.ScheduleNextUpdate() - if err = models.UpdateMirror(m); err != nil { - log.Error("UpdateMirror [%s]: %v", repoID, err) - return - } - - var gitRepo *git.Repository - if len(results) == 0 { - log.Trace("SyncMirrors [repo: %-v]: no branches updated", m.Repo) - } else { - log.Trace("SyncMirrors [repo: %-v]: %d branches updated", m.Repo, len(results)) - gitRepo, err = git.OpenRepository(m.Repo.RepoPath()) - if err != nil { - log.Error("OpenRepository [%d]: %v", m.RepoID, err) - return - } - defer gitRepo.Close() - - if ok := checkAndUpdateEmptyRepository(m, gitRepo, results); !ok { - return - } - } - - for _, result := range results { - // Discard GitHub pull requests, i.e. refs/pull/* - if strings.HasPrefix(result.refName, "refs/pull/") { - continue - } - - tp, _ := git.SplitRefName(result.refName) - - // Create reference - if result.oldCommitID == gitShortEmptySha { - if tp == git.TagPrefix { - tp = "tag" - } else if tp == git.BranchPrefix { - tp = "branch" + case item := <-mirrorQueue.Queue(): + id, _ := strconv.ParseInt(item[5:], 10, 64) + if strings.HasPrefix(item, "pull") { + _ = SyncPullMirror(ctx, id) + } else if strings.HasPrefix(item, "push") { + _ = SyncPushMirror(ctx, id) + } else { + log.Error("Unknown item in queue: %v", item) } - commitID, err := gitRepo.GetRefCommitID(result.refName) - if err != nil { - log.Error("gitRepo.GetRefCommitID [repo_id: %s, ref_name: %s]: %v", m.RepoID, result.refName, err) - continue - } - notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, &repo_module.PushUpdateOptions{ - RefFullName: result.refName, - OldCommitID: git.EmptySHA, - NewCommitID: commitID, - }, repo_module.NewPushCommits()) - notification.NotifySyncCreateRef(m.Repo.MustOwner(), m.Repo, tp, result.refName) - continue - } - - // Delete reference - if result.newCommitID == gitShortEmptySha { - notification.NotifySyncDeleteRef(m.Repo.MustOwner(), m.Repo, tp, result.refName) - continue - } - - // Push commits - oldCommitID, err := git.GetFullCommitID(gitRepo.Path, result.oldCommitID) - if err != nil { - log.Error("GetFullCommitID [%d]: %v", m.RepoID, err) - continue - } - newCommitID, err := git.GetFullCommitID(gitRepo.Path, result.newCommitID) - if err != nil { - log.Error("GetFullCommitID [%d]: %v", m.RepoID, err) - continue - } - commits, err := gitRepo.CommitsBetweenIDs(newCommitID, oldCommitID) - if err != nil { - log.Error("CommitsBetweenIDs [repo_id: %d, new_commit_id: %s, old_commit_id: %s]: %v", m.RepoID, newCommitID, oldCommitID, err) - continue - } - - theCommits := repo_module.ListToPushCommits(commits) - if len(theCommits.Commits) > setting.UI.FeedMaxCommitNum { - theCommits.Commits = theCommits.Commits[:setting.UI.FeedMaxCommitNum] - } - - theCommits.CompareURL = m.Repo.ComposeCompareURL(oldCommitID, newCommitID) - - notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, &repo_module.PushUpdateOptions{ - RefFullName: result.refName, - OldCommitID: oldCommitID, - NewCommitID: newCommitID, - }, theCommits) - } - log.Trace("SyncMirrors [repo: %-v]: done notifying updated branches/tags - now updating last commit time", m.Repo) - - // Get latest commit date and update to current repository updated time - commitDate, err := git.GetLatestCommitTime(m.Repo.RepoPath()) - if err != nil { - log.Error("GetLatestCommitDate [%d]: %v", m.RepoID, err) - return - } - - if err = models.UpdateRepositoryUpdatedTime(m.RepoID, commitDate); err != nil { - log.Error("Update repository 'updated_unix' [%d]: %v", m.RepoID, err) - return - } - - log.Trace("SyncMirrors [repo: %-v]: Successfully updated", m.Repo) -} - -func checkAndUpdateEmptyRepository(m *models.Mirror, gitRepo *git.Repository, results []*mirrorSyncResult) bool { - if !m.Repo.IsEmpty { - return true - } - - hasDefault := false - hasMaster := false - hasMain := false - defaultBranchName := m.Repo.DefaultBranch - if len(defaultBranchName) == 0 { - defaultBranchName = setting.Repository.DefaultBranch - } - firstName := "" - for _, result := range results { - if strings.HasPrefix(result.refName, "refs/pull/") { - continue - } - tp, name := git.SplitRefName(result.refName) - if len(tp) > 0 && tp != git.BranchPrefix { - continue - } - if len(firstName) == 0 { - firstName = name - } - - hasDefault = hasDefault || name == defaultBranchName - hasMaster = hasMaster || name == "master" - hasMain = hasMain || name == "main" - } - - if len(firstName) > 0 { - if hasDefault { - m.Repo.DefaultBranch = defaultBranchName - } else if hasMaster { - m.Repo.DefaultBranch = "master" - } else if hasMain { - m.Repo.DefaultBranch = "main" - } else { - m.Repo.DefaultBranch = firstName - } - // Update the git repository default branch - if err := gitRepo.SetDefaultBranch(m.Repo.DefaultBranch); err != nil { - if !git.IsErrUnsupportedVersion(err) { - log.Error("Failed to update default branch of underlying git repository %-v. Error: %v", m.Repo, err) - desc := fmt.Sprintf("Failed to uupdate default branch of underlying git repository '%s': %v", m.Repo.RepoPath(), err) - if err = models.CreateRepositoryNotice(desc); err != nil { - log.Error("CreateRepositoryNotice: %v", err) - } - return false - } - } - m.Repo.IsEmpty = false - // Update the is empty and default_branch columns - if err := models.UpdateRepositoryCols(m.Repo, "default_branch", "is_empty"); err != nil { - log.Error("Failed to update default branch of repository %-v. Error: %v", m.Repo, err) - desc := fmt.Sprintf("Failed to uupdate default branch of repository '%s': %v", m.Repo.RepoPath(), err) - if err = models.CreateRepositoryNotice(desc); err != nil { - log.Error("CreateRepositoryNotice: %v", err) - } - return false + mirrorQueue.Remove(item) } } - return true } // InitSyncMirrors initializes a go routine to sync the mirrors func InitSyncMirrors() { - go graceful.GetManager().RunWithShutdownContext(SyncMirrors) + go graceful.GetManager().RunWithShutdownContext(syncMirrors) } // StartToMirror adds repoID to mirror queue func StartToMirror(repoID int64) { - go mirrorQueue.Add(repoID) + go mirrorQueue.Add(fmt.Sprintf("pull %d", repoID)) +} + +// AddPushMirrorToQueue adds the push mirror to the queue +func AddPushMirrorToQueue(mirrorID int64) { + go mirrorQueue.Add(fmt.Sprintf("push %d", mirrorID)) } diff --git a/services/mirror/mirror_pull.go b/services/mirror/mirror_pull.go new file mode 100644 index 000000000..5bd08fa9b --- /dev/null +++ b/services/mirror/mirror_pull.go @@ -0,0 +1,452 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package mirror + +import ( + "context" + "fmt" + "strings" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/cache" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/notification" + repo_module "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" +) + +// gitShortEmptySha Git short empty SHA +const gitShortEmptySha = "0000000" + +// UpdateAddress writes new address to Git repository and database +func UpdateAddress(m *models.Mirror, addr string) error { + remoteName := m.GetRemoteName() + repoPath := m.Repo.RepoPath() + // Remove old remote + _, err := git.NewCommand("remote", "rm", remoteName).RunInDir(repoPath) + if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { + return err + } + + _, err = git.NewCommand("remote", "add", remoteName, "--mirror=fetch", addr).RunInDir(repoPath) + if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { + return err + } + + if m.Repo.HasWiki() { + wikiPath := m.Repo.WikiPath() + wikiRemotePath := repo_module.WikiRemoteURL(addr) + // Remove old remote of wiki + _, err := git.NewCommand("remote", "rm", remoteName).RunInDir(wikiPath) + if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { + return err + } + + _, err = git.NewCommand("remote", "add", remoteName, "--mirror=fetch", wikiRemotePath).RunInDir(wikiPath) + if err != nil && !strings.HasPrefix(err.Error(), "exit status 128 - fatal: No such remote ") { + return err + } + } + + m.Repo.OriginalURL = addr + return models.UpdateRepositoryCols(m.Repo, "original_url") +} + +// mirrorSyncResult contains information of a updated reference. +// If the oldCommitID is "0000000", it means a new reference, the value of newCommitID is empty. +// If the newCommitID is "0000000", it means the reference is deleted, the value of oldCommitID is empty. +type mirrorSyncResult struct { + refName string + oldCommitID string + newCommitID string +} + +// parseRemoteUpdateOutput detects create, update and delete operations of references from upstream. +func parseRemoteUpdateOutput(output string) []*mirrorSyncResult { + results := make([]*mirrorSyncResult, 0, 3) + lines := strings.Split(output, "\n") + for i := range lines { + // Make sure reference name is presented before continue + idx := strings.Index(lines[i], "-> ") + if idx == -1 { + continue + } + + refName := lines[i][idx+3:] + + switch { + case strings.HasPrefix(lines[i], " * "): // New reference + if strings.HasPrefix(lines[i], " * [new tag]") { + refName = git.TagPrefix + refName + } else if strings.HasPrefix(lines[i], " * [new branch]") { + refName = git.BranchPrefix + refName + } + results = append(results, &mirrorSyncResult{ + refName: refName, + oldCommitID: gitShortEmptySha, + }) + case strings.HasPrefix(lines[i], " - "): // Delete reference + results = append(results, &mirrorSyncResult{ + refName: refName, + newCommitID: gitShortEmptySha, + }) + case strings.HasPrefix(lines[i], " + "): // Force update + if idx := strings.Index(refName, " "); idx > -1 { + refName = refName[:idx] + } + delimIdx := strings.Index(lines[i][3:], " ") + if delimIdx == -1 { + log.Error("SHA delimiter not found: %q", lines[i]) + continue + } + shas := strings.Split(lines[i][3:delimIdx+3], "...") + if len(shas) != 2 { + log.Error("Expect two SHAs but not what found: %q", lines[i]) + continue + } + results = append(results, &mirrorSyncResult{ + refName: refName, + oldCommitID: shas[0], + newCommitID: shas[1], + }) + case strings.HasPrefix(lines[i], " "): // New commits of a reference + delimIdx := strings.Index(lines[i][3:], " ") + if delimIdx == -1 { + log.Error("SHA delimiter not found: %q", lines[i]) + continue + } + shas := strings.Split(lines[i][3:delimIdx+3], "..") + if len(shas) != 2 { + log.Error("Expect two SHAs but not what found: %q", lines[i]) + continue + } + results = append(results, &mirrorSyncResult{ + refName: refName, + oldCommitID: shas[0], + newCommitID: shas[1], + }) + + default: + log.Warn("parseRemoteUpdateOutput: unexpected update line %q", lines[i]) + } + } + return results +} + +// runSync returns true if sync finished without error. +func runSync(ctx context.Context, m *models.Mirror) ([]*mirrorSyncResult, bool) { + repoPath := m.Repo.RepoPath() + wikiPath := m.Repo.WikiPath() + timeout := time.Duration(setting.Git.Timeout.Mirror) * time.Second + + log.Trace("SyncMirrors [repo: %-v]: running git remote update...", m.Repo) + gitArgs := []string{"remote", "update"} + if m.EnablePrune { + gitArgs = append(gitArgs, "--prune") + } + gitArgs = append(gitArgs, m.GetRemoteName()) + + remoteAddr, remoteErr := git.GetRemoteAddress(repoPath, m.GetRemoteName()) + if remoteErr != nil { + log.Error("GetRemoteAddress Error %v", remoteErr) + } + + stdoutBuilder := strings.Builder{} + stderrBuilder := strings.Builder{} + if err := git.NewCommand(gitArgs...). + SetDescription(fmt.Sprintf("Mirror.runSync: %s", m.Repo.FullName())). + RunInDirTimeoutPipeline(timeout, repoPath, &stdoutBuilder, &stderrBuilder); err != nil { + stdout := stdoutBuilder.String() + stderr := stderrBuilder.String() + + // sanitize the output, since it may contain the remote address, which may + // contain a password + + sanitizer := util.NewURLSanitizer(remoteAddr, true) + stderrMessage := sanitizer.Replace(stderr) + stdoutMessage := sanitizer.Replace(stdout) + + log.Error("Failed to update mirror repository %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err) + desc := fmt.Sprintf("Failed to update mirror repository '%s': %s", repoPath, stderrMessage) + if err = models.CreateRepositoryNotice(desc); err != nil { + log.Error("CreateRepositoryNotice: %v", err) + } + return nil, false + } + output := stderrBuilder.String() + + gitRepo, err := git.OpenRepository(repoPath) + if err != nil { + log.Error("OpenRepository: %v", err) + return nil, false + } + + log.Trace("SyncMirrors [repo: %-v]: syncing releases with tags...", m.Repo) + if err = repo_module.SyncReleasesWithTags(m.Repo, gitRepo); err != nil { + log.Error("Failed to synchronize tags to releases for repository: %v", err) + } + + if m.LFS && setting.LFS.StartServer { + log.Trace("SyncMirrors [repo: %-v]: syncing LFS objects...", m.Repo) + ep := lfs.DetermineEndpoint(remoteAddr.String(), m.LFSEndpoint) + if err = repo_module.StoreMissingLfsObjectsInRepository(ctx, m.Repo, gitRepo, ep, false); err != nil { + log.Error("Failed to synchronize LFS objects for repository: %v", err) + } + } + gitRepo.Close() + + log.Trace("SyncMirrors [repo: %-v]: updating size of repository", m.Repo) + if err := m.Repo.UpdateSize(models.DefaultDBContext()); err != nil { + log.Error("Failed to update size for mirror repository: %v", err) + } + + if m.Repo.HasWiki() { + log.Trace("SyncMirrors [repo: %-v Wiki]: running git remote update...", m.Repo) + stderrBuilder.Reset() + stdoutBuilder.Reset() + if err := git.NewCommand("remote", "update", "--prune", m.GetRemoteName()). + SetDescription(fmt.Sprintf("Mirror.runSync Wiki: %s ", m.Repo.FullName())). + RunInDirTimeoutPipeline(timeout, wikiPath, &stdoutBuilder, &stderrBuilder); err != nil { + stdout := stdoutBuilder.String() + stderr := stderrBuilder.String() + + // sanitize the output, since it may contain the remote address, which may + // contain a password + + remoteAddr, remoteErr := git.GetRemoteAddress(wikiPath, m.GetRemoteName()) + if remoteErr != nil { + log.Error("GetRemoteAddress Error %v", remoteErr) + } + + sanitizer := util.NewURLSanitizer(remoteAddr, true) + stderrMessage := sanitizer.Replace(stderr) + stdoutMessage := sanitizer.Replace(stdout) + + log.Error("Failed to update mirror repository wiki %v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err) + desc := fmt.Sprintf("Failed to update mirror repository wiki '%s': %s", wikiPath, stderrMessage) + if err = models.CreateRepositoryNotice(desc); err != nil { + log.Error("CreateRepositoryNotice: %v", err) + } + return nil, false + } + log.Trace("SyncMirrors [repo: %-v Wiki]: git remote update complete", m.Repo) + } + + log.Trace("SyncMirrors [repo: %-v]: invalidating mirror branch caches...", m.Repo) + branches, _, err := repo_module.GetBranches(m.Repo, 0, 0) + if err != nil { + log.Error("GetBranches: %v", err) + return nil, false + } + + for _, branch := range branches { + cache.Remove(m.Repo.GetCommitsCountCacheKey(branch.Name, true)) + } + + m.UpdatedUnix = timeutil.TimeStampNow() + return parseRemoteUpdateOutput(output), true +} + +// SyncPullMirror starts the sync of the pull mirror and schedules the next run. +func SyncPullMirror(ctx context.Context, repoID int64) bool { + log.Trace("SyncMirrors [repo_id: %v]", repoID) + defer func() { + err := recover() + if err == nil { + return + } + // There was a panic whilst syncMirrors... + log.Error("PANIC whilst syncMirrors[%d] Panic: %v\nStacktrace: %s", repoID, err, log.Stack(2)) + }() + + m, err := models.GetMirrorByRepoID(repoID) + if err != nil { + log.Error("GetMirrorByRepoID [%d]: %v", repoID, err) + return false + } + + log.Trace("SyncMirrors [repo: %-v]: Running Sync", m.Repo) + results, ok := runSync(ctx, m) + if !ok { + return false + } + + log.Trace("SyncMirrors [repo: %-v]: Scheduling next update", m.Repo) + m.ScheduleNextUpdate() + if err = models.UpdateMirror(m); err != nil { + log.Error("UpdateMirror [%d]: %v", m.RepoID, err) + return false + } + + var gitRepo *git.Repository + if len(results) == 0 { + log.Trace("SyncMirrors [repo: %-v]: no branches updated", m.Repo) + } else { + log.Trace("SyncMirrors [repo: %-v]: %d branches updated", m.Repo, len(results)) + gitRepo, err = git.OpenRepository(m.Repo.RepoPath()) + if err != nil { + log.Error("OpenRepository [%d]: %v", m.RepoID, err) + return false + } + defer gitRepo.Close() + + if ok := checkAndUpdateEmptyRepository(m, gitRepo, results); !ok { + return false + } + } + + for _, result := range results { + // Discard GitHub pull requests, i.e. refs/pull/* + if strings.HasPrefix(result.refName, "refs/pull/") { + continue + } + + tp, _ := git.SplitRefName(result.refName) + + // Create reference + if result.oldCommitID == gitShortEmptySha { + if tp == git.TagPrefix { + tp = "tag" + } else if tp == git.BranchPrefix { + tp = "branch" + } + commitID, err := gitRepo.GetRefCommitID(result.refName) + if err != nil { + log.Error("gitRepo.GetRefCommitID [repo_id: %d, ref_name: %s]: %v", m.RepoID, result.refName, err) + continue + } + notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, &repo_module.PushUpdateOptions{ + RefFullName: result.refName, + OldCommitID: git.EmptySHA, + NewCommitID: commitID, + }, repo_module.NewPushCommits()) + notification.NotifySyncCreateRef(m.Repo.MustOwner(), m.Repo, tp, result.refName) + continue + } + + // Delete reference + if result.newCommitID == gitShortEmptySha { + notification.NotifySyncDeleteRef(m.Repo.MustOwner(), m.Repo, tp, result.refName) + continue + } + + // Push commits + oldCommitID, err := git.GetFullCommitID(gitRepo.Path, result.oldCommitID) + if err != nil { + log.Error("GetFullCommitID [%d]: %v", m.RepoID, err) + continue + } + newCommitID, err := git.GetFullCommitID(gitRepo.Path, result.newCommitID) + if err != nil { + log.Error("GetFullCommitID [%d]: %v", m.RepoID, err) + continue + } + commits, err := gitRepo.CommitsBetweenIDs(newCommitID, oldCommitID) + if err != nil { + log.Error("CommitsBetweenIDs [repo_id: %d, new_commit_id: %s, old_commit_id: %s]: %v", m.RepoID, newCommitID, oldCommitID, err) + continue + } + + theCommits := repo_module.GitToPushCommits(commits) + if len(theCommits.Commits) > setting.UI.FeedMaxCommitNum { + theCommits.Commits = theCommits.Commits[:setting.UI.FeedMaxCommitNum] + } + + theCommits.CompareURL = m.Repo.ComposeCompareURL(oldCommitID, newCommitID) + + notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, &repo_module.PushUpdateOptions{ + RefFullName: result.refName, + OldCommitID: oldCommitID, + NewCommitID: newCommitID, + }, theCommits) + } + log.Trace("SyncMirrors [repo: %-v]: done notifying updated branches/tags - now updating last commit time", m.Repo) + + // Get latest commit date and update to current repository updated time + commitDate, err := git.GetLatestCommitTime(m.Repo.RepoPath()) + if err != nil { + log.Error("GetLatestCommitDate [%d]: %v", m.RepoID, err) + return false + } + + if err = models.UpdateRepositoryUpdatedTime(m.RepoID, commitDate); err != nil { + log.Error("Update repository 'updated_unix' [%d]: %v", m.RepoID, err) + return false + } + + log.Trace("SyncMirrors [repo: %-v]: Successfully updated", m.Repo) + + return true +} + +func checkAndUpdateEmptyRepository(m *models.Mirror, gitRepo *git.Repository, results []*mirrorSyncResult) bool { + if !m.Repo.IsEmpty { + return true + } + + hasDefault := false + hasMaster := false + hasMain := false + defaultBranchName := m.Repo.DefaultBranch + if len(defaultBranchName) == 0 { + defaultBranchName = setting.Repository.DefaultBranch + } + firstName := "" + for _, result := range results { + if strings.HasPrefix(result.refName, "refs/pull/") { + continue + } + tp, name := git.SplitRefName(result.refName) + if len(tp) > 0 && tp != git.BranchPrefix { + continue + } + if len(firstName) == 0 { + firstName = name + } + + hasDefault = hasDefault || name == defaultBranchName + hasMaster = hasMaster || name == "master" + hasMain = hasMain || name == "main" + } + + if len(firstName) > 0 { + if hasDefault { + m.Repo.DefaultBranch = defaultBranchName + } else if hasMaster { + m.Repo.DefaultBranch = "master" + } else if hasMain { + m.Repo.DefaultBranch = "main" + } else { + m.Repo.DefaultBranch = firstName + } + // Update the git repository default branch + if err := gitRepo.SetDefaultBranch(m.Repo.DefaultBranch); err != nil { + if !git.IsErrUnsupportedVersion(err) { + log.Error("Failed to update default branch of underlying git repository %-v. Error: %v", m.Repo, err) + desc := fmt.Sprintf("Failed to uupdate default branch of underlying git repository '%s': %v", m.Repo.RepoPath(), err) + if err = models.CreateRepositoryNotice(desc); err != nil { + log.Error("CreateRepositoryNotice: %v", err) + } + return false + } + } + m.Repo.IsEmpty = false + // Update the is empty and default_branch columns + if err := models.UpdateRepositoryCols(m.Repo, "default_branch", "is_empty"); err != nil { + log.Error("Failed to update default branch of repository %-v. Error: %v", m.Repo, err) + desc := fmt.Sprintf("Failed to uupdate default branch of repository '%s': %v", m.Repo.RepoPath(), err) + if err = models.CreateRepositoryNotice(desc); err != nil { + log.Error("CreateRepositoryNotice: %v", err) + } + return false + } + } + return true +} diff --git a/services/mirror/mirror_push.go b/services/mirror/mirror_push.go new file mode 100644 index 000000000..c1f53196e --- /dev/null +++ b/services/mirror/mirror_push.go @@ -0,0 +1,242 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package mirror + +import ( + "context" + "errors" + "io" + "net/url" + "regexp" + "time" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/lfs" + "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/repository" + "code.gitea.io/gitea/modules/setting" + "code.gitea.io/gitea/modules/timeutil" + "code.gitea.io/gitea/modules/util" +) + +var stripExitStatus = regexp.MustCompile(`exit status \d+ - `) + +// AddPushMirrorRemote registers the push mirror remote. +func AddPushMirrorRemote(m *models.PushMirror, addr string) error { + addRemoteAndConfig := func(addr, path string) error { + if _, err := git.NewCommand("remote", "add", "--mirror=push", m.RemoteName, addr).RunInDir(path); err != nil { + return err + } + if _, err := git.NewCommand("config", "--add", "remote."+m.RemoteName+".push", "+refs/heads/*:refs/heads/*").RunInDir(path); err != nil { + return err + } + if _, err := git.NewCommand("config", "--add", "remote."+m.RemoteName+".push", "+refs/tags/*:refs/tags/*").RunInDir(path); err != nil { + return err + } + return nil + } + + if err := addRemoteAndConfig(addr, m.Repo.RepoPath()); err != nil { + return err + } + + if m.Repo.HasWiki() { + wikiRemoteURL := repository.WikiRemoteURL(addr) + if len(wikiRemoteURL) > 0 { + if err := addRemoteAndConfig(wikiRemoteURL, m.Repo.WikiPath()); err != nil { + return err + } + } + } + + return nil +} + +// RemovePushMirrorRemote removes the push mirror remote. +func RemovePushMirrorRemote(m *models.PushMirror) error { + cmd := git.NewCommand("remote", "rm", m.RemoteName) + + if _, err := cmd.RunInDir(m.Repo.RepoPath()); err != nil { + return err + } + + if m.Repo.HasWiki() { + if _, err := cmd.RunInDir(m.Repo.WikiPath()); err != nil { + // The wiki remote may not exist + log.Warn("Wiki Remote[%d] could not be removed: %v", m.ID, err) + } + } + + return nil +} + +// SyncPushMirror starts the sync of the push mirror and schedules the next run. +func SyncPushMirror(ctx context.Context, mirrorID int64) bool { + log.Trace("SyncPushMirror [mirror: %d]", mirrorID) + defer func() { + err := recover() + if err == nil { + return + } + // There was a panic whilst syncPushMirror... + log.Error("PANIC whilst syncPushMirror[%d] Panic: %v\nStacktrace: %s", mirrorID, err, log.Stack(2)) + }() + + m, err := models.GetPushMirrorByID(mirrorID) + if err != nil { + log.Error("GetPushMirrorByID [%d]: %v", mirrorID, err) + return false + } + + m.LastError = "" + + log.Trace("SyncPushMirror [mirror: %d][repo: %-v]: Running Sync", m.ID, m.Repo) + err = runPushSync(ctx, m) + if err != nil { + log.Error("SyncPushMirror [mirror: %d][repo: %-v]: %v", m.ID, m.Repo, err) + m.LastError = stripExitStatus.ReplaceAllLiteralString(err.Error(), "") + } + + m.LastUpdateUnix = timeutil.TimeStampNow() + + if err := models.UpdatePushMirror(m); err != nil { + log.Error("UpdatePushMirror [%d]: %v", m.ID, err) + + return false + } + + log.Trace("SyncPushMirror [mirror: %d][repo: %-v]: Finished", m.ID, m.Repo) + + return err == nil +} + +func runPushSync(ctx context.Context, m *models.PushMirror) error { + timeout := time.Duration(setting.Git.Timeout.Mirror) * time.Second + + performPush := func(path string) error { + remoteAddr, err := git.GetRemoteAddress(path, m.RemoteName) + if err != nil { + log.Error("GetRemoteAddress(%s) Error %v", path, err) + return errors.New("Unexpected error") + } + + if setting.LFS.StartServer { + log.Trace("SyncMirrors [repo: %-v]: syncing LFS objects...", m.Repo) + + gitRepo, err := git.OpenRepository(path) + if err != nil { + log.Error("OpenRepository: %v", err) + return errors.New("Unexpected error") + } + defer gitRepo.Close() + + ep := lfs.DetermineEndpoint(remoteAddr.String(), "") + if err := pushAllLFSObjects(ctx, gitRepo, ep, false); err != nil { + return util.NewURLSanitizedError(err, remoteAddr, true) + } + } + + log.Trace("Pushing %s mirror[%d] remote %s", path, m.ID, m.RemoteName) + + if err := git.Push(path, git.PushOptions{ + Remote: m.RemoteName, + Force: true, + Mirror: true, + Timeout: timeout, + }); err != nil { + log.Error("Error pushing %s mirror[%d] remote %s: %v", path, m.ID, m.RemoteName, err) + + return util.NewURLSanitizedError(err, remoteAddr, true) + } + + return nil + } + + err := performPush(m.Repo.RepoPath()) + if err != nil { + return err + } + + if m.Repo.HasWiki() { + wikiPath := m.Repo.WikiPath() + _, err := git.GetRemoteAddress(wikiPath, m.RemoteName) + if err == nil { + err := performPush(wikiPath) + if err != nil { + return err + } + } else { + log.Trace("Skipping wiki: No remote configured") + } + } + + return nil +} + +func pushAllLFSObjects(ctx context.Context, gitRepo *git.Repository, endpoint *url.URL, skipTLSVerify bool) error { + client := lfs.NewClient(endpoint, skipTLSVerify) + contentStore := lfs.NewContentStore() + + pointerChan := make(chan lfs.PointerBlob) + errChan := make(chan error, 1) + go lfs.SearchPointerBlobs(ctx, gitRepo, pointerChan, errChan) + + uploadObjects := func(pointers []lfs.Pointer) error { + err := client.Upload(ctx, pointers, func(p lfs.Pointer, objectError error) (io.ReadCloser, error) { + if objectError != nil { + return nil, objectError + } + + content, err := contentStore.Get(p) + if err != nil { + log.Error("Error reading LFS object %v: %v", p, err) + } + return content, err + }) + if err != nil { + select { + case <-ctx.Done(): + return nil + default: + } + } + return err + } + + var batch []lfs.Pointer + for pointerBlob := range pointerChan { + exists, err := contentStore.Exists(pointerBlob.Pointer) + if err != nil { + log.Error("Error checking if LFS object %v exists: %v", pointerBlob.Pointer, err) + return err + } + if !exists { + log.Trace("Skipping missing LFS object %v", pointerBlob.Pointer) + continue + } + + batch = append(batch, pointerBlob.Pointer) + if len(batch) >= client.BatchSize() { + if err := uploadObjects(batch); err != nil { + return err + } + batch = nil + } + } + if len(batch) > 0 { + if err := uploadObjects(batch); err != nil { + return err + } + } + + err, has := <-errChan + if has { + log.Error("Error enumerating LFS objects for repository: %v", err) + return err + } + + return nil +} diff --git a/services/mirror/mirror_test.go b/services/mirror/mirror_test.go deleted file mode 100644 index ddfb6c676..000000000 --- a/services/mirror/mirror_test.go +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright 2019 The Gitea Authors. All rights reserved. -// Use of this source code is governed by a MIT-style -// license that can be found in the LICENSE file. - -package mirror - -import ( - "context" - "path/filepath" - "testing" - - "code.gitea.io/gitea/models" - "code.gitea.io/gitea/modules/git" - migration "code.gitea.io/gitea/modules/migrations/base" - "code.gitea.io/gitea/modules/repository" - release_service "code.gitea.io/gitea/services/release" - - "github.com/stretchr/testify/assert" -) - -func TestMain(m *testing.M) { - models.MainTest(m, filepath.Join("..", "..")) -} - -func TestRelease_MirrorDelete(t *testing.T) { - assert.NoError(t, models.PrepareTestDatabase()) - - user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) - repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) - repoPath := models.RepoPath(user.Name, repo.Name) - - opts := migration.MigrateOptions{ - RepoName: "test_mirror", - Description: "Test mirror", - Private: false, - Mirror: true, - CloneAddr: repoPath, - Wiki: true, - Releases: false, - } - - mirrorRepo, err := repository.CreateRepository(user, user, models.CreateRepoOptions{ - Name: opts.RepoName, - Description: opts.Description, - IsPrivate: opts.Private, - IsMirror: opts.Mirror, - Status: models.RepositoryBeingMigrated, - }) - assert.NoError(t, err) - - mirror, err := repository.MigrateRepositoryGitData(context.Background(), user, mirrorRepo, opts) - assert.NoError(t, err) - - gitRepo, err := git.OpenRepository(repoPath) - assert.NoError(t, err) - defer gitRepo.Close() - - findOptions := models.FindReleasesOptions{IncludeDrafts: true, IncludeTags: true} - initCount, err := models.GetReleaseCountByRepoID(mirror.ID, findOptions) - assert.NoError(t, err) - - assert.NoError(t, release_service.CreateRelease(gitRepo, &models.Release{ - RepoID: repo.ID, - PublisherID: user.ID, - TagName: "v0.2", - Target: "master", - Title: "v0.2 is released", - Note: "v0.2 is released", - IsDraft: false, - IsPrerelease: false, - IsTag: true, - }, nil)) - - err = mirror.GetMirror() - assert.NoError(t, err) - - _, ok := runSync(mirror.Mirror) - assert.True(t, ok) - - count, err := models.GetReleaseCountByRepoID(mirror.ID, findOptions) - assert.NoError(t, err) - assert.EqualValues(t, initCount+1, count) - - release, err := models.GetRelease(repo.ID, "v0.2") - assert.NoError(t, err) - assert.NoError(t, release_service.DeleteReleaseByID(release.ID, user, true)) - - _, ok = runSync(mirror.Mirror) - assert.True(t, ok) - - count, err = models.GetReleaseCountByRepoID(mirror.ID, findOptions) - assert.NoError(t, err) - assert.EqualValues(t, initCount, count) -} diff --git a/services/pull/check.go b/services/pull/check.go index 5acee8174..1e757ef28 100644 --- a/services/pull/check.go +++ b/services/pull/check.go @@ -28,21 +28,19 @@ var prQueue queue.UniqueQueue // AddToTaskQueue adds itself to pull request test task queue. func AddToTaskQueue(pr *models.PullRequest) { - go func() { - err := prQueue.PushFunc(strconv.FormatInt(pr.ID, 10), func() error { - pr.Status = models.PullRequestStatusChecking - err := pr.UpdateColsIfNotMerged("status") - if err != nil { - log.Error("AddToTaskQueue.UpdateCols[%d].(add to queue): %v", pr.ID, err) - } else { - log.Trace("Adding PR ID: %d to the test pull requests queue", pr.ID) - } - return err - }) - if err != nil && err != queue.ErrAlreadyInQueue { - log.Error("Error adding prID %d to the test pull requests queue: %v", pr.ID, err) + err := prQueue.PushFunc(strconv.FormatInt(pr.ID, 10), func() error { + pr.Status = models.PullRequestStatusChecking + err := pr.UpdateColsIfNotMerged("status") + if err != nil { + log.Error("AddToTaskQueue.UpdateCols[%d].(add to queue): %v", pr.ID, err) + } else { + log.Trace("Adding PR ID: %d to the test pull requests queue", pr.ID) } - }() + return err + }) + if err != nil && err != queue.ErrAlreadyInQueue { + log.Error("Error adding prID %d to the test pull requests queue: %v", pr.ID, err) + } } // checkAndUpdateStatus checks if pull request is possible to leaving checking status, @@ -116,7 +114,7 @@ func getMergeCommit(pr *models.PullRequest) (*git.Commit, error) { if err != nil { return nil, fmt.Errorf("git rev-list --ancestry-path --merges --reverse: %v", err) } else if len(mergeCommit) < 40 { - // PR was fast-forwarded, so just use last commit of PR + // PR was maybe fast-forwarded, so just use last commit of PR mergeCommit = commitID[:40] } @@ -128,7 +126,7 @@ func getMergeCommit(pr *models.PullRequest) (*git.Commit, error) { commit, err := gitRepo.GetCommit(mergeCommit[:40]) if err != nil { - return nil, fmt.Errorf("GetCommit: %v", err) + return nil, fmt.Errorf("GetMergeCommit[%v]: %v", mergeCommit[:40], err) } return commit, nil @@ -137,6 +135,21 @@ func getMergeCommit(pr *models.PullRequest) (*git.Commit, error) { // manuallyMerged checks if a pull request got manually merged // When a pull request got manually merged mark the pull request as merged func manuallyMerged(pr *models.PullRequest) bool { + if err := pr.LoadBaseRepo(); err != nil { + log.Error("PullRequest[%d].LoadBaseRepo: %v", pr.ID, err) + return false + } + + if unit, err := pr.BaseRepo.GetUnit(models.UnitTypePullRequests); err == nil { + config := unit.PullRequestsConfig() + if !config.AutodetectManualMerge { + return false + } + } else { + log.Error("PullRequest[%d].BaseRepo.GetUnit(models.UnitTypePullRequests): %v", pr.ID, err) + return false + } + commit, err := getMergeCommit(pr) if err != nil { log.Error("PullRequest[%d].getMergeCommit: %v", pr.ID, err) diff --git a/services/pull/check_test.go b/services/pull/check_test.go index 33a230e5a..f6614ea0a 100644 --- a/services/pull/check_test.go +++ b/services/pull/check_test.go @@ -6,7 +6,6 @@ package pull import ( - "context" "strconv" "testing" "time" @@ -54,9 +53,9 @@ func TestPullRequest_AddToTaskQueue(t *testing.T) { assert.True(t, has) assert.NoError(t, err) - prQueue.Run(func(_ context.Context, shutdown func()) { + prQueue.Run(func(shutdown func()) { queueShutdown = append(queueShutdown, shutdown) - }, func(_ context.Context, terminate func()) { + }, func(terminate func()) { queueTerminate = append(queueTerminate, terminate) }) diff --git a/services/pull/commit_status.go b/services/pull/commit_status.go index b8fb10944..c5c930ee0 100644 --- a/services/pull/commit_status.go +++ b/services/pull/commit_status.go @@ -108,13 +108,21 @@ func GetPullRequestCommitStatusState(pr *models.PullRequest) (structs.CommitStat } defer headGitRepo.Close() - if !headGitRepo.IsBranchExist(pr.HeadBranch) { + if pr.Flow == models.PullRequestFlowGithub && !headGitRepo.IsBranchExist(pr.HeadBranch) { + return "", errors.New("Head branch does not exist, can not merge") + } + if pr.Flow == models.PullRequestFlowAGit && !git.IsReferenceExist(headGitRepo.Path, pr.GetGitRefName()) { return "", errors.New("Head branch does not exist, can not merge") } - sha, err := headGitRepo.GetBranchCommitID(pr.HeadBranch) + var sha string + if pr.Flow == models.PullRequestFlowGithub { + sha, err = headGitRepo.GetBranchCommitID(pr.HeadBranch) + } else { + sha, err = headGitRepo.GetRefCommitID(pr.GetGitRefName()) + } if err != nil { - return "", errors.Wrap(err, "GetBranchCommitID") + return "", err } if err := pr.LoadBaseRepo(); err != nil { diff --git a/services/pull/lfs.go b/services/pull/lfs.go index a1981b825..b902c6361 100644 --- a/services/pull/lfs.go +++ b/services/pull/lfs.go @@ -70,6 +70,8 @@ func createLFSMetaObjectsFromCatFileBatch(catFileBatchReader *io.PipeReader, wg defer wg.Done() defer catFileBatchReader.Close() + contentStore := lfs.NewContentStore() + bufferedReader := bufio.NewReader(catFileBatchReader) buf := make([]byte, 1025) for { @@ -101,10 +103,16 @@ func createLFSMetaObjectsFromCatFileBatch(catFileBatchReader *io.PipeReader, wg } pointerBuf = pointerBuf[:size] // Now we need to check if the pointerBuf is an LFS pointer - pointer := lfs.IsPointerFile(&pointerBuf) - if pointer == nil { + pointer, _ := lfs.ReadPointerFromBuffer(pointerBuf) + if !pointer.IsValid() { continue } + + exist, _ := contentStore.Exists(pointer) + if !exist { + continue + } + // Then we need to check that this pointer is in the db if _, err := pr.HeadRepo.GetLFSMetaObjectByOid(pointer.Oid); err != nil { if err == models.ErrLFSObjectNotExist { @@ -117,8 +125,9 @@ func createLFSMetaObjectsFromCatFileBatch(catFileBatchReader *io.PipeReader, wg // OK we have a pointer that is associated with the head repo // and is actually a file in the LFS // Therefore it should be associated with the base repo - pointer.RepositoryID = pr.BaseRepoID - if _, err := models.NewLFSMetaObject(pointer); err != nil { + meta := &models.LFSMetaObject{Pointer: pointer} + meta.RepositoryID = pr.BaseRepoID + if _, err := models.NewLFSMetaObject(meta); err != nil { _ = catFileBatchReader.CloseWithError(err) break } diff --git a/services/pull/merge.go b/services/pull/merge.go index 9d6eadc52..ef797e1ca 100644 --- a/services/pull/merge.go +++ b/services/pull/merge.go @@ -64,7 +64,7 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor pr.Merger = doer pr.MergerID = doer.ID - if _, err = pr.SetMerged(); err != nil { + if _, err := pr.SetMerged(); err != nil { log.Error("setMerged [%d]: %v", pr.ID, err) } @@ -98,7 +98,7 @@ func Merge(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repositor if err = ref.Issue.LoadRepo(); err != nil { return err } - close := (ref.RefAction == references.XRefActionCloses) + close := ref.RefAction == references.XRefActionCloses if close != ref.Issue.IsClosed { if err = issue_service.ChangeStatus(ref.Issue, doer, close); err != nil { return err @@ -253,6 +253,8 @@ func rawMerge(pr *models.PullRequest, doer *models.User, mergeStyle models.Merge } case models.MergeStyleRebase: fallthrough + case models.MergeStyleRebaseUpdate: + fallthrough case models.MergeStyleRebaseMerge: // Checkout head branch if err := git.NewCommand("checkout", "-b", stagingBranch, trackingBranch).RunInDirPipeline(tmpBasePath, &outbuf, &errbuf); err != nil { @@ -305,6 +307,11 @@ func rawMerge(pr *models.PullRequest, doer *models.User, mergeStyle models.Merge outbuf.Reset() errbuf.Reset() + // not need merge, just update by rebase. so skip + if mergeStyle == models.MergeStyleRebaseUpdate { + break + } + // Checkout base branch again if err := git.NewCommand("checkout", baseBranch).RunInDirPipeline(tmpBasePath, &outbuf, &errbuf); err != nil { log.Error("git checkout base prior to merge post staging rebase [%s:%s -> %s:%s]: %v\n%s\n%s", pr.HeadRepo.FullName(), pr.HeadBranch, pr.BaseRepo.FullName(), pr.BaseBranch, err, outbuf.String(), errbuf.String()) @@ -410,8 +417,16 @@ func rawMerge(pr *models.PullRequest, doer *models.User, mergeStyle models.Merge pr.ID, ) + var pushCmd *git.Command + if mergeStyle == models.MergeStyleRebaseUpdate { + // force push the rebase result to head brach + pushCmd = git.NewCommand("push", "-f", "head_repo", stagingBranch+":refs/heads/"+pr.HeadBranch) + } else { + pushCmd = git.NewCommand("push", "origin", baseBranch+":refs/heads/"+pr.BaseBranch) + } + // Push back to upstream. - if err := git.NewCommand("push", "origin", baseBranch+":refs/heads/"+pr.BaseBranch).RunInDirTimeoutEnvPipeline(env, -1, tmpBasePath, &outbuf, &errbuf); err != nil { + if err := pushCmd.RunInDirTimeoutEnvPipeline(env, -1, tmpBasePath, &outbuf, &errbuf); err != nil { if strings.Contains(errbuf.String(), "non-fast-forward") { return "", &git.ErrPushOutOfDate{ StdOut: outbuf.String(), @@ -615,3 +630,54 @@ func CheckPRReadyToMerge(pr *models.PullRequest, skipProtectedFilesCheck bool) ( return nil } + +// MergedManually mark pr as merged manually +func MergedManually(pr *models.PullRequest, doer *models.User, baseGitRepo *git.Repository, commitID string) (err error) { + prUnit, err := pr.BaseRepo.GetUnit(models.UnitTypePullRequests) + if err != nil { + return + } + prConfig := prUnit.PullRequestsConfig() + + // Check if merge style is correct and allowed + if !prConfig.IsMergeStyleAllowed(models.MergeStyleManuallyMerged) { + return models.ErrInvalidMergeStyle{ID: pr.BaseRepo.ID, Style: models.MergeStyleManuallyMerged} + } + + if len(commitID) < 40 { + return fmt.Errorf("Wrong commit ID") + } + + commit, err := baseGitRepo.GetCommit(commitID) + if err != nil { + if git.IsErrNotExist(err) { + return fmt.Errorf("Wrong commit ID") + } + return + } + + ok, err := baseGitRepo.IsCommitInBranch(commitID, pr.BaseBranch) + if err != nil { + return + } + if !ok { + return fmt.Errorf("Wrong commit ID") + } + + pr.MergedCommitID = commitID + pr.MergedUnix = timeutil.TimeStamp(commit.Author.When.Unix()) + pr.Status = models.PullRequestStatusManuallyMerged + pr.Merger = doer + pr.MergerID = doer.ID + + merged := false + if merged, err = pr.SetMerged(); err != nil { + return + } else if !merged { + return fmt.Errorf("SetMerged failed") + } + + notification.NotifyMergePullRequest(pr, doer) + log.Info("manuallyMerged[%d]: Marked as manually merged into %s/%s by commit id: %s", pr.ID, pr.BaseRepo.Name, pr.BaseBranch, commit.ID.String()) + return nil +} diff --git a/services/pull/patch.go b/services/pull/patch.go index 2692d848c..72b459bf2 100644 --- a/services/pull/patch.go +++ b/services/pull/patch.go @@ -80,7 +80,7 @@ func TestPatch(pr *models.PullRequest) error { pr.MergeBase = strings.TrimSpace(pr.MergeBase) // 2. Check for conflicts - if conflicts, err := checkConflicts(pr, gitRepo, tmpBasePath); err != nil || conflicts { + if conflicts, err := checkConflicts(pr, gitRepo, tmpBasePath); err != nil || conflicts || pr.Status == models.PullRequestStatusEmpty { return err } @@ -125,8 +125,9 @@ func checkConflicts(pr *models.PullRequest, gitRepo *git.Repository, tmpBasePath // 1a. if the size of that patch is 0 - there can be no conflicts! if stat.Size() == 0 { log.Debug("PullRequest[%d]: Patch is empty - ignoring", pr.ID) - pr.Status = models.PullRequestStatusMergeable + pr.Status = models.PullRequestStatusEmpty pr.ConflictedFiles = []string{} + pr.ChangedProtectedFiles = []string{} return false, nil } diff --git a/services/pull/pull.go b/services/pull/pull.go index 1886448ee..23407ea67 100644 --- a/services/pull/pull.go +++ b/services/pull/pull.go @@ -8,15 +8,15 @@ import ( "bufio" "bytes" "context" - "encoding/json" - "errors" "fmt" + "regexp" "strings" "time" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/graceful" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" @@ -49,7 +49,12 @@ func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int6 pr.Issue = pull pull.PullRequest = pr - if err := PushToBaseRepo(pr); err != nil { + if pr.Flow == models.PullRequestFlowGithub { + err = PushToBaseRepo(pr) + } else { + err = UpdateRef(pr) + } + if err != nil { return err } @@ -59,6 +64,12 @@ func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int6 } notification.NotifyNewPullRequest(pr, mentions) + if len(pull.Labels) > 0 { + notification.NotifyIssueChangeLabels(pull.Poster, pull, pull.Labels, nil) + } + if pull.Milestone != nil { + notification.NotifyIssueChangeMilestone(pull.Poster, pull, 0) + } // add first push codes comment baseGitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) @@ -73,11 +84,11 @@ func NewPullRequest(repo *models.Repository, pull *models.Issue, labelIDs []int6 return err } - if compareInfo.Commits.Len() > 0 { + if len(compareInfo.Commits) > 0 { data := models.PushActionContent{IsForcePush: false} - data.CommitIDs = make([]string, 0, compareInfo.Commits.Len()) - for e := compareInfo.Commits.Back(); e != nil; e = e.Prev() { - data.CommitIDs = append(data.CommitIDs, e.Value.(*git.Commit).ID.String()) + data.CommitIDs = make([]string, 0, len(compareInfo.Commits)) + for i := len(compareInfo.Commits) - 1; i >= 0; i-- { + data.CommitIDs = append(data.CommitIDs, compareInfo.Commits[i].ID.String()) } dataJSON, err := json.Marshal(data) @@ -139,7 +150,7 @@ func ChangeTargetBranch(pr *models.PullRequest, doer *models.User, targetBranch } // Check if pull request for the new target branch already exists - existingPr, err := models.GetUnmergedPullRequest(pr.HeadRepoID, pr.BaseRepoID, pr.HeadBranch, targetBranch) + existingPr, err := models.GetUnmergedPullRequest(pr.HeadRepoID, pr.BaseRepoID, pr.HeadBranch, targetBranch, models.PullRequestFlowGithub) if existingPr != nil { return models.ErrPullRequestAlreadyExists{ ID: existingPr.ID, @@ -275,8 +286,12 @@ func AddTestPullRequestTask(doer *models.User, repoID int64, branch string, isSy for _, pr := range prs { log.Trace("Updating PR[%d]: composing new test task", pr.ID) - if err := PushToBaseRepo(pr); err != nil { - log.Error("PushToBaseRepo: %v", err) + if pr.Flow == models.PullRequestFlowGithub { + if err := PushToBaseRepo(pr); err != nil { + log.Error("PushToBaseRepo: %v", err) + continue + } + } else { continue } @@ -296,7 +311,11 @@ func AddTestPullRequestTask(doer *models.User, repoID int64, branch string, isSy for _, pr := range prs { divergence, err := GetDiverging(pr) if err != nil { - log.Error("GetDiverging: %v", err) + if models.IsErrBranchDoesNotExist(err) && !git.IsBranchExist(pr.HeadRepo.RepoPath(), pr.HeadBranch) { + log.Warn("Cannot test PR %s/%d: head_branch %s no longer exists", pr.BaseRepo.Name, pr.IssueID, pr.HeadBranch) + } else { + log.Error("GetDiverging: %v", err) + } } else { err = pr.UpdateCommitDivergence(divergence.Ahead, divergence.Behind) if err != nil { @@ -383,6 +402,10 @@ func checkIfPRContentChanged(pr *models.PullRequest, oldCommitID, newCommitID st // corresponding branches of base repository. // FIXME: Only push branches that are actually updates? func PushToBaseRepo(pr *models.PullRequest) (err error) { + return pushToBaseRepoHelper(pr, "") +} + +func pushToBaseRepoHelper(pr *models.PullRequest, prefixHeadBranch string) (err error) { log.Trace("PushToBaseRepo[%d]: pushing commits to base repo '%s'", pr.BaseRepoID, pr.GetGitRefName()) if err := pr.LoadHeadRepo(); err != nil { @@ -408,7 +431,7 @@ func PushToBaseRepo(pr *models.PullRequest) (err error) { if err := git.Push(headRepoPath, git.PushOptions{ Remote: baseRepoPath, - Branch: pr.HeadBranch + ":" + gitRefName, + Branch: prefixHeadBranch + pr.HeadBranch + ":" + gitRefName, Force: true, // Use InternalPushingEnvironment here because we know that pre-receive and post-receive do not run on a refs/pulls/... Env: models.InternalPushingEnvironment(pr.Issue.Poster, pr.BaseRepo), @@ -421,6 +444,14 @@ func PushToBaseRepo(pr *models.PullRequest) (err error) { rejectErr := err.(*git.ErrPushRejected) log.Info("Unable to push PR head for %s#%d (%-v:%s) due to rejection:\nStdout: %s\nStderr: %s\nError: %v", pr.BaseRepo.FullName(), pr.Index, pr.BaseRepo, gitRefName, rejectErr.StdOut, rejectErr.StdErr, rejectErr.Err) return err + } else if git.IsErrMoreThanOne(err) { + if prefixHeadBranch != "" { + log.Info("Can't push with %s%s", prefixHeadBranch, pr.HeadBranch) + return err + } + log.Info("Retrying to push with refs/heads/%s", pr.HeadBranch) + err = pushToBaseRepoHelper(pr, "refs/heads/") + return err } log.Error("Unable to push PR head for %s#%d (%-v:%s) due to Error: %v", pr.BaseRepo.FullName(), pr.Index, pr.BaseRepo, gitRefName, err) return fmt.Errorf("Push: %s:%s %s:%s %v", pr.HeadRepo.FullName(), pr.HeadBranch, pr.BaseRepo.FullName(), gitRefName, err) @@ -429,6 +460,22 @@ func PushToBaseRepo(pr *models.PullRequest) (err error) { return nil } +// UpdateRef update refs/pull/id/head directly for agit flow pull request +func UpdateRef(pr *models.PullRequest) (err error) { + log.Trace("UpdateRef[%d]: upgate pull request ref in base repo '%s'", pr.ID, pr.GetGitRefName()) + if err := pr.LoadBaseRepo(); err != nil { + log.Error("Unable to load base repository for PR[%d] Error: %v", pr.ID, err) + return err + } + + _, err = git.NewCommand("update-ref", pr.GetGitRefName(), pr.HeadCommitID).RunInDir(pr.BaseRepo.RepoPath()) + if err != nil { + log.Error("Unable to update ref in base repository for PR[%d] Error: %v", pr.ID, err) + } + + return err +} + type errlist []error func (errs errlist) Error() string { @@ -474,9 +521,9 @@ func CloseBranchPulls(doer *models.User, repoID int64, branch string) error { return nil } -// CloseRepoBranchesPulls close all pull requests which head branches are in the given repository +// CloseRepoBranchesPulls close all pull requests which head branches are in the given repository, but only whose base repo is not in the given repository func CloseRepoBranchesPulls(doer *models.User, repo *models.Repository) error { - branches, err := git.GetBranchesByPath(repo.RepoPath()) + branches, _, err := git.GetBranchesByPath(repo.RepoPath(), 0, 0) if err != nil { return err } @@ -493,6 +540,11 @@ func CloseRepoBranchesPulls(doer *models.User, repo *models.Repository) error { } for _, pr := range prs { + // If the base repository for this pr is this repository there is no need to close it + // as it is going to be deleted anyway + if pr.BaseRepoID == repo.ID { + continue + } if err = issue_service.ChangeStatus(pr.Issue, doer, true); err != nil && !models.IsErrPullWasClosed(err) { errs = append(errs, err) } @@ -505,6 +557,8 @@ func CloseRepoBranchesPulls(doer *models.User, repo *models.Repository) error { return nil } +var commitMessageTrailersPattern = regexp.MustCompile(`(?:^|\n\n)(?:[\w-]+[ \t]*:[^\n]+\n*(?:[ \t]+[^\n]+\n*)*)+$`) + // GetSquashMergeCommitMessages returns the commit messages between head and merge base (if there is one) func GetSquashMergeCommitMessages(pr *models.PullRequest) string { if err := pr.LoadIssue(); err != nil { @@ -533,7 +587,17 @@ func GetSquashMergeCommitMessages(pr *models.PullRequest) string { } defer gitRepo.Close() - headCommit, err := gitRepo.GetBranchCommit(pr.HeadBranch) + var headCommit *git.Commit + if pr.Flow == models.PullRequestFlowGithub { + headCommit, err = gitRepo.GetBranchCommit(pr.HeadBranch) + } else { + pr.HeadCommitID, err = gitRepo.GetRefCommitID(pr.GetGitRefName()) + if err != nil { + log.Error("Unable to get head commit: %s Error: %v", pr.GetGitRefName(), err) + return "" + } + headCommit, err = gitRepo.GetCommit(pr.HeadCommitID) + } if err != nil { log.Error("Unable to get head commit: %s Error: %v", pr.HeadBranch, err) return "" @@ -547,7 +611,7 @@ func GetSquashMergeCommitMessages(pr *models.PullRequest) string { limit := setting.Repository.PullRequest.DefaultMergeMessageCommitsLimit - list, err := gitRepo.CommitsBetweenLimit(headCommit, mergeBase, limit, 0) + commits, err := gitRepo.CommitsBetweenLimit(headCommit, mergeBase, limit, 0) if err != nil { log.Error("Unable to get commits between: %s %s Error: %v", pr.HeadBranch, pr.MergeBase, err) return "" @@ -556,25 +620,56 @@ func GetSquashMergeCommitMessages(pr *models.PullRequest) string { posterSig := pr.Issue.Poster.NewGitSig().String() authorsMap := map[string]bool{} - authors := make([]string, 0, list.Len()) + authors := make([]string, 0, len(commits)) stringBuilder := strings.Builder{} - stringBuilder.WriteString(pr.Issue.Content) - if stringBuilder.Len() > 0 { - stringBuilder.WriteRune('\n') - stringBuilder.WriteRune('\n') + if !setting.Repository.PullRequest.PopulateSquashCommentWithCommitMessages { + message := strings.TrimSpace(pr.Issue.Content) + stringBuilder.WriteString(message) + if stringBuilder.Len() > 0 { + stringBuilder.WriteRune('\n') + if !commitMessageTrailersPattern.MatchString(message) { + stringBuilder.WriteRune('\n') + } + } } // commits list is in reverse chronological order - element := list.Back() - for element != nil { - commit := element.Value.(*git.Commit) + first := true + for i := len(commits) - 1; i >= 0; i-- { + commit := commits[i] + + if setting.Repository.PullRequest.PopulateSquashCommentWithCommitMessages { + maxSize := setting.Repository.PullRequest.DefaultMergeMessageSize + if maxSize < 0 || stringBuilder.Len() < maxSize { + var toWrite []byte + if first { + first = false + toWrite = []byte(strings.TrimPrefix(commit.CommitMessage, pr.Issue.Title)) + } else { + toWrite = []byte(commit.CommitMessage) + } + + if len(toWrite) > maxSize-stringBuilder.Len() && maxSize > -1 { + toWrite = append(toWrite[:maxSize-stringBuilder.Len()], "..."...) + } + if _, err := stringBuilder.Write(toWrite); err != nil { + log.Error("Unable to write commit message Error: %v", err) + return "" + } + + if _, err := stringBuilder.WriteRune('\n'); err != nil { + log.Error("Unable to write commit message Error: %v", err) + return "" + } + } + } + authorString := commit.Author.String() if !authorsMap[authorString] && authorString != posterSig { authors = append(authors, authorString) authorsMap[authorString] = true } - element = element.Prev() } // Consider collecting the remaining authors @@ -582,37 +677,26 @@ func GetSquashMergeCommitMessages(pr *models.PullRequest) string { skip := limit limit = 30 for { - list, err := gitRepo.CommitsBetweenLimit(headCommit, mergeBase, limit, skip) + commits, err := gitRepo.CommitsBetweenLimit(headCommit, mergeBase, limit, skip) if err != nil { log.Error("Unable to get commits between: %s %s Error: %v", pr.HeadBranch, pr.MergeBase, err) return "" } - if list.Len() == 0 { + if len(commits) == 0 { break } - element := list.Front() - for element != nil { - commit := element.Value.(*git.Commit) - + for _, commit := range commits { authorString := commit.Author.String() if !authorsMap[authorString] && authorString != posterSig { authors = append(authors, authorString) authorsMap[authorString] = true } - element = element.Next() } skip += limit } } - if len(authors) > 0 { - if _, err := stringBuilder.WriteRune('\n'); err != nil { - log.Error("Unable to write to string builder Error: %v", err) - return "" - } - } - for _, author := range authors { if _, err := stringBuilder.Write([]byte("Co-authored-by: ")); err != nil { log.Error("Unable to write to string builder Error: %v", err) @@ -631,33 +715,75 @@ func GetSquashMergeCommitMessages(pr *models.PullRequest) string { return stringBuilder.String() } -// GetLastCommitStatus returns list of commit statuses for latest commit on this pull request. -func GetLastCommitStatus(pr *models.PullRequest) (status []*models.CommitStatus, err error) { - if err = pr.LoadBaseRepo(); err != nil { +// GetIssuesLastCommitStatus returns a map +func GetIssuesLastCommitStatus(issues models.IssueList) (map[int64]*models.CommitStatus, error) { + if err := issues.LoadPullRequests(); err != nil { + return nil, err + } + if _, err := issues.LoadRepositories(); err != nil { return nil, err } + var ( + gitRepos = make(map[int64]*git.Repository) + res = make(map[int64]*models.CommitStatus) + err error + ) + defer func() { + for _, gitRepo := range gitRepos { + gitRepo.Close() + } + }() + + for _, issue := range issues { + if !issue.IsPull { + continue + } + gitRepo, ok := gitRepos[issue.RepoID] + if !ok { + gitRepo, err = git.OpenRepository(issue.Repo.RepoPath()) + if err != nil { + return nil, err + } + gitRepos[issue.RepoID] = gitRepo + } + + status, err := getLastCommitStatus(gitRepo, issue.PullRequest) + if err != nil { + log.Error("getLastCommitStatus: cant get last commit of pull [%d]: %v", issue.PullRequest.ID, err) + continue + } + res[issue.PullRequest.ID] = status + } + return res, nil +} + +// GetLastCommitStatus returns list of commit statuses for latest commit on this pull request. +func GetLastCommitStatus(pr *models.PullRequest) (status *models.CommitStatus, err error) { + if err = pr.LoadBaseRepo(); err != nil { + return nil, err + } gitRepo, err := git.OpenRepository(pr.BaseRepo.RepoPath()) if err != nil { return nil, err } defer gitRepo.Close() - compareInfo, err := gitRepo.GetCompareInfo(pr.BaseRepo.RepoPath(), pr.MergeBase, pr.GetGitRefName()) + return getLastCommitStatus(gitRepo, pr) +} + +// getLastCommitStatus get pr's last commit status. PR's last commit status is the head commit id's last commit status +func getLastCommitStatus(gitRepo *git.Repository, pr *models.PullRequest) (status *models.CommitStatus, err error) { + sha, err := gitRepo.GetRefCommitID(pr.GetGitRefName()) if err != nil { return nil, err } - if compareInfo.Commits.Len() == 0 { - return nil, errors.New("pull request has no commits") - } - - sha := compareInfo.Commits.Front().Value.(*git.Commit).ID.String() statusList, err := models.GetLatestCommitStatus(pr.BaseRepo.ID, sha, models.ListOptions{}) if err != nil { return nil, err } - return statusList, nil + return models.CalcCommitStatus(statusList), nil } // IsHeadEqualWithBranch returns if the commits of branchName are available in pull request head @@ -686,9 +812,20 @@ func IsHeadEqualWithBranch(pr *models.PullRequest, branchName string) (bool, err } defer headGitRepo.Close() - headCommit, err := headGitRepo.GetBranchCommit(pr.HeadBranch) - if err != nil { - return false, err + var headCommit *git.Commit + if pr.Flow == models.PullRequestFlowGithub { + headCommit, err = headGitRepo.GetBranchCommit(pr.HeadBranch) + if err != nil { + return false, err + } + } else { + pr.HeadCommitID, err = baseGitRepo.GetRefCommitID(pr.GetGitRefName()) + if err != nil { + return false, err + } + if headCommit, err = baseGitRepo.GetCommit(pr.HeadCommitID); err != nil { + return false, err + } } return baseCommit.HasPreviousCommit(headCommit.ID) } diff --git a/services/pull/pull_test.go b/services/pull/pull_test.go index 64920e355..81627ebb7 100644 --- a/services/pull/pull_test.go +++ b/services/pull/pull_test.go @@ -5,4 +5,27 @@ package pull +import ( + "testing" + + "github.com/stretchr/testify/assert" +) + // TODO TestPullRequest_PushToBaseRepo + +func TestPullRequest_CommitMessageTrailersPattern(t *testing.T) { + // Not a valid trailer section + assert.False(t, commitMessageTrailersPattern.MatchString("")) + assert.False(t, commitMessageTrailersPattern.MatchString("No trailer.")) + assert.False(t, commitMessageTrailersPattern.MatchString("Signed-off-by: Bob \nNot a trailer due to following text.")) + assert.False(t, commitMessageTrailersPattern.MatchString("Message body not correctly separated from trailer section by empty line.\nSigned-off-by: Bob ")) + // Valid trailer section + assert.True(t, commitMessageTrailersPattern.MatchString("Signed-off-by: Bob ")) + assert.True(t, commitMessageTrailersPattern.MatchString("Signed-off-by: Bob \nOther-Trailer: Value")) + assert.True(t, commitMessageTrailersPattern.MatchString("Message body correctly separated from trailer section by empty line.\n\nSigned-off-by: Bob ")) + assert.True(t, commitMessageTrailersPattern.MatchString("Multiple trailers.\n\nSigned-off-by: Bob \nOther-Trailer: Value")) + assert.True(t, commitMessageTrailersPattern.MatchString("Newline after trailer section.\n\nSigned-off-by: Bob \n")) + assert.True(t, commitMessageTrailersPattern.MatchString("No space after colon is accepted.\n\nSigned-off-by:Bob ")) + assert.True(t, commitMessageTrailersPattern.MatchString("Additional whitespace is accepted.\n\nSigned-off-by \t : \tBob ")) + assert.True(t, commitMessageTrailersPattern.MatchString("Folded value.\n\nFolded-trailer: This is\n a folded\n trailer value\nOther-Trailer: Value")) +} diff --git a/services/pull/review.go b/services/pull/review.go index 8994a9e78..3aa457062 100644 --- a/services/pull/review.go +++ b/services/pull/review.go @@ -6,13 +6,14 @@ package pull import ( - "bytes" "fmt" + "io" "regexp" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/notification" "code.gitea.io/gitea/modules/setting" ) @@ -99,7 +100,7 @@ func CreateCodeComment(doer *models.User, gitRepo *git.Repository, issue *models if !isReview && !existsReview { // Submit the review we've just created so the comment shows up in the issue view - if _, _, err = SubmitReview(doer, gitRepo, issue, models.ReviewTypeComment, "", latestCommitID); err != nil { + if _, _, err = SubmitReview(doer, gitRepo, issue, models.ReviewTypeComment, "", latestCommitID, nil); err != nil { return nil, err } } @@ -131,7 +132,7 @@ func createCodeComment(doer *models.User, repo *models.Repository, issue *models head := pr.GetGitRefName() if line > 0 { if reviewID != 0 { - first, err := models.FindComments(models.FindCommentsOptions{ + first, err := models.FindComments(&models.FindCommentsOptions{ ReviewID: reviewID, Line: line, TreePath: treePath, @@ -179,11 +180,24 @@ func createCodeComment(doer *models.User, repo *models.Repository, issue *models if len(commitID) == 0 { commitID = headCommitID } - patchBuf := new(bytes.Buffer) - if err := git.GetRepoRawDiffForFile(gitRepo, pr.MergeBase, headCommitID, git.RawDiffNormal, treePath, patchBuf); err != nil { - return nil, fmt.Errorf("GetRawDiffForLine[%s, %s, %s, %s]: %v", gitRepo.Path, pr.MergeBase, headCommitID, treePath, err) + reader, writer := io.Pipe() + defer func() { + _ = reader.Close() + _ = writer.Close() + }() + go func() { + if err := git.GetRepoRawDiffForFile(gitRepo, pr.MergeBase, headCommitID, git.RawDiffNormal, treePath, writer); err != nil { + _ = writer.CloseWithError(fmt.Errorf("GetRawDiffForLine[%s, %s, %s, %s]: %v", gitRepo.Path, pr.MergeBase, headCommitID, treePath, err)) + return + } + _ = writer.Close() + }() + + patch, err = git.CutDiffAroundLine(reader, int64((&models.Comment{Line: line}).UnsignedLine()), line < 0, setting.UI.CodeCommentLines) + if err != nil { + log.Error("Error whilst generating patch: %v", err) + return nil, err } - patch = git.CutDiffAroundLine(patchBuf, int64((&models.Comment{Line: line}).UnsignedLine()), line < 0, setting.UI.CodeCommentLines) } return models.CreateComment(&models.CreateCommentOptions{ Type: models.CommentTypeCode, @@ -201,7 +215,7 @@ func createCodeComment(doer *models.User, repo *models.Repository, issue *models } // SubmitReview creates a review out of the existing pending review or creates a new one if no pending review exist -func SubmitReview(doer *models.User, gitRepo *git.Repository, issue *models.Issue, reviewType models.ReviewType, content, commitID string) (*models.Review, *models.Comment, error) { +func SubmitReview(doer *models.User, gitRepo *git.Repository, issue *models.Issue, reviewType models.ReviewType, content, commitID string, attachmentUUIDs []string) (*models.Review, *models.Comment, error) { pr, err := issue.GetPullRequest() if err != nil { return nil, nil, err @@ -226,7 +240,7 @@ func SubmitReview(doer *models.User, gitRepo *git.Repository, issue *models.Issu } } - review, comm, err := models.SubmitReview(doer, issue, reviewType, content, commitID, stale) + review, comm, err := models.SubmitReview(doer, issue, reviewType, content, commitID, stale, attachmentUUIDs) if err != nil { return nil, nil, err } @@ -253,3 +267,54 @@ func SubmitReview(doer *models.User, gitRepo *git.Repository, issue *models.Issu return review, comm, nil } + +// DismissReview dismissing stale review by repo admin +func DismissReview(reviewID int64, message string, doer *models.User, isDismiss bool) (comment *models.Comment, err error) { + review, err := models.GetReviewByID(reviewID) + if err != nil { + return + } + + if review.Type != models.ReviewTypeApprove && review.Type != models.ReviewTypeReject { + return nil, fmt.Errorf("not need to dismiss this review because it's type is not Approve or change request") + } + + if err = models.DismissReview(review, isDismiss); err != nil { + return + } + + if !isDismiss { + return nil, nil + } + + // load data for notify + if err = review.LoadAttributes(); err != nil { + return + } + if err = review.Issue.LoadPullRequest(); err != nil { + return + } + if err = review.Issue.LoadAttributes(); err != nil { + return + } + + comment, err = models.CreateComment(&models.CreateCommentOptions{ + Doer: doer, + Content: message, + Type: models.CommentTypeDismissReview, + ReviewID: review.ID, + Issue: review.Issue, + Repo: review.Issue.Repo, + }) + if err != nil { + return + } + + comment.Review = review + comment.Poster = doer + comment.Issue = review.Issue + + notification.NotifyPullRevieweDismiss(doer, review, comment) + + return +} diff --git a/services/pull/temp_repo.go b/services/pull/temp_repo.go index 45cd10b65..54d09c815 100644 --- a/services/pull/temp_repo.go +++ b/services/pull/temp_repo.go @@ -140,12 +140,25 @@ func createTemporaryRepo(pr *models.PullRequest) (string, error) { trackingBranch := "tracking" // Fetch head branch - if err := git.NewCommand("fetch", "--no-tags", remoteRepoName, git.BranchPrefix+pr.HeadBranch+":"+trackingBranch).RunInDirPipeline(tmpBasePath, &outbuf, &errbuf); err != nil { - log.Error("Unable to fetch head_repo head branch [%s:%s -> tracking in %s]: %v:\n%s\n%s", pr.HeadRepo.FullName(), pr.HeadBranch, tmpBasePath, err, outbuf.String(), errbuf.String()) + var headBranch string + if pr.Flow == models.PullRequestFlowGithub { + headBranch = git.BranchPrefix + pr.HeadBranch + } else if len(pr.HeadCommitID) == 40 { // for not created pull request + headBranch = pr.HeadCommitID + } else { + headBranch = pr.GetGitRefName() + } + if err := git.NewCommand("fetch", "--no-tags", remoteRepoName, headBranch+":"+trackingBranch).RunInDirPipeline(tmpBasePath, &outbuf, &errbuf); err != nil { if err := models.RemoveTemporaryPath(tmpBasePath); err != nil { log.Error("CreateTempRepo: RemoveTemporaryPath: %s", err) } - return "", fmt.Errorf("Unable to fetch head_repo head branch [%s:%s -> tracking in tmpBasePath]: %v\n%s\n%s", pr.HeadRepo.FullName(), pr.HeadBranch, err, outbuf.String(), errbuf.String()) + if !git.IsBranchExist(pr.HeadRepo.RepoPath(), pr.HeadBranch) { + return "", models.ErrBranchDoesNotExist{ + BranchName: pr.HeadBranch, + } + } + log.Error("Unable to fetch head_repo head branch [%s:%s -> tracking in %s]: %v:\n%s\n%s", pr.HeadRepo.FullName(), pr.HeadBranch, tmpBasePath, err, outbuf.String(), errbuf.String()) + return "", fmt.Errorf("Unable to fetch head_repo head branch [%s:%s -> tracking in tmpBasePath]: %v\n%s\n%s", pr.HeadRepo.FullName(), headBranch, err, outbuf.String(), errbuf.String()) } outbuf.Reset() errbuf.Reset() diff --git a/services/pull/update.go b/services/pull/update.go index 0829b1c5d..4b4e67797 100644 --- a/services/pull/update.go +++ b/services/pull/update.go @@ -13,13 +13,29 @@ import ( ) // Update updates pull request with base branch. -func Update(pull *models.PullRequest, doer *models.User, message string) error { - //use merge functions but switch repo's and branch's - pr := &models.PullRequest{ - HeadRepoID: pull.BaseRepoID, - BaseRepoID: pull.HeadRepoID, - HeadBranch: pull.BaseBranch, - BaseBranch: pull.HeadBranch, +func Update(pull *models.PullRequest, doer *models.User, message string, rebase bool) error { + var ( + pr *models.PullRequest + style models.MergeStyle + ) + + if rebase { + pr = pull + style = models.MergeStyleRebaseUpdate + } else { + //use merge functions but switch repo's and branch's + pr = &models.PullRequest{ + HeadRepoID: pull.BaseRepoID, + BaseRepoID: pull.HeadRepoID, + HeadBranch: pull.BaseBranch, + BaseBranch: pull.HeadBranch, + } + style = models.MergeStyleMerge + } + + if pull.Flow == models.PullRequestFlowAGit { + // TODO: Not support update agit flow pull request's head branch + return fmt.Errorf("Not support update agit flow pull request's head branch") } if err := pr.LoadHeadRepo(); err != nil { @@ -37,9 +53,13 @@ func Update(pull *models.PullRequest, doer *models.User, message string) error { return fmt.Errorf("HeadBranch of PR %d is up to date", pull.Index) } - _, err = rawMerge(pr, doer, models.MergeStyleMerge, message) + _, err = rawMerge(pr, doer, style, message) defer func() { + if rebase { + go AddTestPullRequestTask(doer, pr.BaseRepo.ID, pr.BaseBranch, false, "", "") + return + } go AddTestPullRequestTask(doer, pr.HeadRepo.ID, pr.HeadBranch, false, "", "") }() @@ -47,10 +67,17 @@ func Update(pull *models.PullRequest, doer *models.User, message string) error { } // IsUserAllowedToUpdate check if user is allowed to update PR with given permissions and branch protections -func IsUserAllowedToUpdate(pull *models.PullRequest, user *models.User) (bool, error) { +func IsUserAllowedToUpdate(pull *models.PullRequest, user *models.User) (mergeAllowed, rebaseAllowed bool, err error) { + if pull.Flow == models.PullRequestFlowAGit { + return false, false, nil + } + + if user == nil { + return false, false, nil + } headRepoPerm, err := models.GetUserRepoPermission(pull.HeadRepo, user) if err != nil { - return false, err + return false, false, err } pr := &models.PullRequest{ @@ -62,15 +89,25 @@ func IsUserAllowedToUpdate(pull *models.PullRequest, user *models.User) (bool, e err = pr.LoadProtectedBranch() if err != nil { - return false, err + return false, false, err + } + + // can't do rebase on protected branch because need force push + if pr.ProtectedBranch == nil { + rebaseAllowed = true } // Update function need push permission if pr.ProtectedBranch != nil && !pr.ProtectedBranch.CanUserPush(user.ID) { - return false, nil + return false, false, nil } - return IsUserAllowedToMerge(pr, headRepoPerm, user) + mergeAllowed, err = IsUserAllowedToMerge(pr, headRepoPerm, user) + if err != nil { + return false, false, err + } + + return mergeAllowed, rebaseAllowed, nil } // GetDiverging determines how many commits a PR is ahead or behind the PR base branch @@ -85,7 +122,9 @@ func GetDiverging(pr *models.PullRequest) (*git.DivergeObject, error) { tmpRepo, err := createTemporaryRepo(pr) if err != nil { - log.Error("CreateTemporaryPath: %v", err) + if !models.IsErrBranchDoesNotExist(err) { + log.Error("CreateTemporaryRepo: %v", err) + } return nil, err } defer func() { diff --git a/services/release/release.go b/services/release/release.go index fd821cc81..4a55f73a3 100644 --- a/services/release/release.go +++ b/services/release/release.go @@ -5,6 +5,7 @@ package release import ( + "errors" "fmt" "strings" @@ -17,31 +18,57 @@ import ( "code.gitea.io/gitea/modules/timeutil" ) -func createTag(gitRepo *git.Repository, rel *models.Release) error { +func createTag(gitRepo *git.Repository, rel *models.Release, msg string) (bool, error) { + var created bool // Only actual create when publish. if !rel.IsDraft { if !gitRepo.IsTagExist(rel.TagName) { + if err := rel.LoadAttributes(); err != nil { + log.Error("LoadAttributes: %v", err) + return false, err + } + + protectedTags, err := rel.Repo.GetProtectedTags() + if err != nil { + return false, fmt.Errorf("GetProtectedTags: %v", err) + } + isAllowed, err := models.IsUserAllowedToControlTag(protectedTags, rel.TagName, rel.PublisherID) + if err != nil { + return false, err + } + if !isAllowed { + return false, models.ErrProtectedTagName{ + TagName: rel.TagName, + } + } + commit, err := gitRepo.GetCommit(rel.Target) if err != nil { - return fmt.Errorf("GetCommit: %v", err) + return false, fmt.Errorf("createTag::GetCommit[%v]: %v", rel.Target, err) } // Trim '--' prefix to prevent command line argument vulnerability. rel.TagName = strings.TrimPrefix(rel.TagName, "--") - if err = gitRepo.CreateTag(rel.TagName, commit.ID.String()); err != nil { + if len(msg) > 0 { + if err = gitRepo.CreateAnnotatedTag(rel.TagName, msg, commit.ID.String()); err != nil { + if strings.Contains(err.Error(), "is not a valid tag name") { + return false, models.ErrInvalidTagName{ + TagName: rel.TagName, + } + } + return false, err + } + } else if err = gitRepo.CreateTag(rel.TagName, commit.ID.String()); err != nil { if strings.Contains(err.Error(), "is not a valid tag name") { - return models.ErrInvalidTagName{ + return false, models.ErrInvalidTagName{ TagName: rel.TagName, } } - return err + return false, err } + created = true rel.LowerTagName = strings.ToLower(rel.TagName) - // Prepare Notify - if err := rel.LoadAttributes(); err != nil { - log.Error("LoadAttributes: %v", err) - return err - } + notification.NotifyPushCommits( rel.Publisher, rel.Repo, &repository.PushUpdateOptions{ @@ -54,13 +81,13 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error { } commit, err := gitRepo.GetTagCommit(rel.TagName) if err != nil { - return fmt.Errorf("GetTagCommit: %v", err) + return false, fmt.Errorf("GetTagCommit: %v", err) } rel.Sha1 = commit.ID.String() rel.NumCommits, err = commit.CommitsCount() if err != nil { - return fmt.Errorf("CommitsCount: %v", err) + return false, fmt.Errorf("CommitsCount: %v", err) } if rel.PublisherID <= 0 { @@ -69,15 +96,14 @@ func createTag(gitRepo *git.Repository, rel *models.Release) error { rel.PublisherID = u.ID } } - } else { rel.CreatedUnix = timeutil.TimeStampNow() } - return nil + return created, nil } // CreateRelease creates a new release of repository. -func CreateRelease(gitRepo *git.Repository, rel *models.Release, attachmentUUIDs []string) error { +func CreateRelease(gitRepo *git.Repository, rel *models.Release, attachmentUUIDs []string, msg string) error { isExist, err := models.IsReleaseExist(rel.RepoID, rel.TagName) if err != nil { return err @@ -87,7 +113,7 @@ func CreateRelease(gitRepo *git.Repository, rel *models.Release, attachmentUUIDs } } - if err = createTag(gitRepo, rel); err != nil { + if _, err = createTag(gitRepo, rel, msg); err != nil { return err } @@ -96,7 +122,7 @@ func CreateRelease(gitRepo *git.Repository, rel *models.Release, attachmentUUIDs return err } - if err = models.AddReleaseAttachments(rel.ID, attachmentUUIDs); err != nil { + if err = models.AddReleaseAttachments(models.DefaultDBContext(), rel.ID, attachmentUUIDs); err != nil { return err } @@ -107,22 +133,137 @@ func CreateRelease(gitRepo *git.Repository, rel *models.Release, attachmentUUIDs return nil } -// UpdateReleaseOrCreatReleaseFromTag updates information of a release or create release from tag. -func UpdateReleaseOrCreatReleaseFromTag(doer *models.User, gitRepo *git.Repository, rel *models.Release, attachmentUUIDs []string, isCreate bool) (err error) { - if err = createTag(gitRepo, rel); err != nil { +// CreateNewTag creates a new repository tag +func CreateNewTag(doer *models.User, repo *models.Repository, commit, tagName, msg string) error { + isExist, err := models.IsReleaseExist(repo.ID, tagName) + if err != nil { + return err + } else if isExist { + return models.ErrTagAlreadyExists{ + TagName: tagName, + } + } + + gitRepo, err := git.OpenRepository(repo.RepoPath()) + if err != nil { + return err + } + defer gitRepo.Close() + + rel := &models.Release{ + RepoID: repo.ID, + Repo: repo, + PublisherID: doer.ID, + Publisher: doer, + TagName: tagName, + Target: commit, + IsDraft: false, + IsPrerelease: false, + IsTag: true, + } + + if _, err = createTag(gitRepo, rel, msg); err != nil { + return err + } + + if err = models.InsertRelease(rel); err != nil { + return err + } + + return err +} + +// UpdateRelease updates information, attachments of a release and will create tag if it's not a draft and tag not exist. +// addAttachmentUUIDs accept a slice of new created attachments' uuids which will be reassigned release_id as the created release +// delAttachmentUUIDs accept a slice of attachments' uuids which will be deleted from the release +// editAttachments accept a map of attachment uuid to new attachment name which will be updated with attachments. +func UpdateRelease(doer *models.User, gitRepo *git.Repository, rel *models.Release, + addAttachmentUUIDs, delAttachmentUUIDs []string, editAttachments map[string]string) (err error) { + if rel.ID == 0 { + return errors.New("UpdateRelease only accepts an exist release") + } + isCreated, err := createTag(gitRepo, rel, "") + if err != nil { return err } rel.LowerTagName = strings.ToLower(rel.TagName) - if err = models.UpdateRelease(models.DefaultDBContext(), rel); err != nil { + ctx, commiter, err := models.TxDBContext() + if err != nil { + return err + } + defer commiter.Close() + + if err = models.UpdateRelease(ctx, rel); err != nil { return err } - if err = models.AddReleaseAttachments(rel.ID, attachmentUUIDs); err != nil { - log.Error("AddReleaseAttachments: %v", err) + if err = models.AddReleaseAttachments(ctx, rel.ID, addAttachmentUUIDs); err != nil { + return fmt.Errorf("AddReleaseAttachments: %v", err) } - if !isCreate { + var deletedUUIDsMap = make(map[string]bool) + if len(delAttachmentUUIDs) > 0 { + // Check attachments + attachments, err := models.GetAttachmentsByUUIDs(ctx, delAttachmentUUIDs) + if err != nil { + return fmt.Errorf("GetAttachmentsByUUIDs [uuids: %v]: %v", delAttachmentUUIDs, err) + } + for _, attach := range attachments { + if attach.ReleaseID != rel.ID { + return errors.New("delete attachement of release permission denied") + } + deletedUUIDsMap[attach.UUID] = true + } + + if _, err := models.DeleteAttachments(ctx, attachments, false); err != nil { + return fmt.Errorf("DeleteAttachments [uuids: %v]: %v", delAttachmentUUIDs, err) + } + } + + if len(editAttachments) > 0 { + var updateAttachmentsList = make([]string, 0, len(editAttachments)) + for k := range editAttachments { + updateAttachmentsList = append(updateAttachmentsList, k) + } + // Check attachments + attachments, err := models.GetAttachmentsByUUIDs(ctx, updateAttachmentsList) + if err != nil { + return fmt.Errorf("GetAttachmentsByUUIDs [uuids: %v]: %v", updateAttachmentsList, err) + } + for _, attach := range attachments { + if attach.ReleaseID != rel.ID { + return errors.New("update attachement of release permission denied") + } + } + + for uuid, newName := range editAttachments { + if !deletedUUIDsMap[uuid] { + if err = models.UpdateAttachmentByUUID(ctx, &models.Attachment{ + UUID: uuid, + Name: newName, + }, "name"); err != nil { + return err + } + } + } + } + + if err = commiter.Commit(); err != nil { + return + } + + for _, uuid := range delAttachmentUUIDs { + if err := storage.Attachments.Delete(models.AttachmentRelativePath(uuid)); err != nil { + // Even delete files failed, but the attachments has been removed from database, so we + // should not return error but only record the error on logs. + // users have to delete this attachments manually or we should have a + // synchronize between database attachment table and attachment storage + log.Error("delete attachment[uuid: %s] failed: %v", uuid, err) + } + } + + if !isCreated { notification.NotifyUpdateRelease(doer, rel) return } diff --git a/services/release/release_test.go b/services/release/release_test.go index f50fca71e..9f665faba 100644 --- a/services/release/release_test.go +++ b/services/release/release_test.go @@ -6,6 +6,7 @@ package release import ( "path/filepath" + "strings" "testing" "time" @@ -32,7 +33,9 @@ func TestRelease_Create(t *testing.T) { assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v0.1", Target: "master", Title: "v0.1 is released", @@ -40,11 +43,13 @@ func TestRelease_Create(t *testing.T) { IsDraft: false, IsPrerelease: false, IsTag: false, - }, nil)) + }, nil, "")) assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v0.1.1", Target: "65f1bf27bc3bf70f64657658635e66094edbcb4d", Title: "v0.1.1 is released", @@ -52,11 +57,13 @@ func TestRelease_Create(t *testing.T) { IsDraft: false, IsPrerelease: false, IsTag: false, - }, nil)) + }, nil, "")) assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v0.1.2", Target: "65f1bf2", Title: "v0.1.2 is released", @@ -64,11 +71,13 @@ func TestRelease_Create(t *testing.T) { IsDraft: false, IsPrerelease: false, IsTag: false, - }, nil)) + }, nil, "")) assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v0.1.3", Target: "65f1bf2", Title: "v0.1.3 is released", @@ -76,11 +85,13 @@ func TestRelease_Create(t *testing.T) { IsDraft: true, IsPrerelease: false, IsTag: false, - }, nil)) + }, nil, "")) assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v0.1.4", Target: "65f1bf2", Title: "v0.1.4 is released", @@ -88,11 +99,19 @@ func TestRelease_Create(t *testing.T) { IsDraft: false, IsPrerelease: true, IsTag: false, - }, nil)) + }, nil, "")) - assert.NoError(t, CreateRelease(gitRepo, &models.Release{ + attach, err := models.NewAttachment(&models.Attachment{ + UploaderID: user.ID, + Name: "test.txt", + }, []byte{}, strings.NewReader("testtest")) + assert.NoError(t, err) + + var release = models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v0.1.5", Target: "65f1bf2", Title: "v0.1.5 is released", @@ -100,7 +119,8 @@ func TestRelease_Create(t *testing.T) { IsDraft: false, IsPrerelease: false, IsTag: true, - }, nil)) + } + assert.NoError(t, CreateRelease(gitRepo, &release, []string{attach.UUID}, "test")) } func TestRelease_Update(t *testing.T) { @@ -117,7 +137,9 @@ func TestRelease_Update(t *testing.T) { // Test a changed release assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v1.1.1", Target: "master", Title: "v1.1.1 is released", @@ -125,13 +147,13 @@ func TestRelease_Update(t *testing.T) { IsDraft: false, IsPrerelease: false, IsTag: false, - }, nil)) + }, nil, "")) release, err := models.GetRelease(repo.ID, "v1.1.1") assert.NoError(t, err) releaseCreatedUnix := release.CreatedUnix time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp release.Note = "Changed note" - assert.NoError(t, UpdateReleaseOrCreatReleaseFromTag(user, gitRepo, release, nil, false)) + assert.NoError(t, UpdateRelease(user, gitRepo, release, nil, nil, nil)) release, err = models.GetReleaseByID(release.ID) assert.NoError(t, err) assert.Equal(t, int64(releaseCreatedUnix), int64(release.CreatedUnix)) @@ -139,7 +161,9 @@ func TestRelease_Update(t *testing.T) { // Test a changed draft assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v1.2.1", Target: "65f1bf2", Title: "v1.2.1 is draft", @@ -147,13 +171,13 @@ func TestRelease_Update(t *testing.T) { IsDraft: true, IsPrerelease: false, IsTag: false, - }, nil)) + }, nil, "")) release, err = models.GetRelease(repo.ID, "v1.2.1") assert.NoError(t, err) releaseCreatedUnix = release.CreatedUnix time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp release.Title = "Changed title" - assert.NoError(t, UpdateReleaseOrCreatReleaseFromTag(user, gitRepo, release, nil, false)) + assert.NoError(t, UpdateRelease(user, gitRepo, release, nil, nil, nil)) release, err = models.GetReleaseByID(release.ID) assert.NoError(t, err) assert.Less(t, int64(releaseCreatedUnix), int64(release.CreatedUnix)) @@ -161,7 +185,9 @@ func TestRelease_Update(t *testing.T) { // Test a changed pre-release assert.NoError(t, CreateRelease(gitRepo, &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v1.3.1", Target: "65f1bf2", Title: "v1.3.1 is pre-released", @@ -169,17 +195,73 @@ func TestRelease_Update(t *testing.T) { IsDraft: false, IsPrerelease: true, IsTag: false, - }, nil)) + }, nil, "")) release, err = models.GetRelease(repo.ID, "v1.3.1") assert.NoError(t, err) releaseCreatedUnix = release.CreatedUnix time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp release.Title = "Changed title" release.Note = "Changed note" - assert.NoError(t, UpdateReleaseOrCreatReleaseFromTag(user, gitRepo, release, nil, false)) + assert.NoError(t, UpdateRelease(user, gitRepo, release, nil, nil, nil)) release, err = models.GetReleaseByID(release.ID) assert.NoError(t, err) assert.Equal(t, int64(releaseCreatedUnix), int64(release.CreatedUnix)) + + // Test create release + release = &models.Release{ + RepoID: repo.ID, + Repo: repo, + PublisherID: user.ID, + Publisher: user, + TagName: "v1.1.2", + Target: "master", + Title: "v1.1.2 is released", + Note: "v1.1.2 is released", + IsDraft: true, + IsPrerelease: false, + IsTag: false, + } + assert.NoError(t, CreateRelease(gitRepo, release, nil, "")) + assert.Greater(t, release.ID, int64(0)) + + release.IsDraft = false + tagName := release.TagName + + assert.NoError(t, UpdateRelease(user, gitRepo, release, nil, nil, nil)) + release, err = models.GetReleaseByID(release.ID) + assert.NoError(t, err) + assert.Equal(t, tagName, release.TagName) + + // Add new attachments + attach, err := models.NewAttachment(&models.Attachment{ + UploaderID: user.ID, + Name: "test.txt", + }, []byte{}, strings.NewReader("testtest")) + assert.NoError(t, err) + + assert.NoError(t, UpdateRelease(user, gitRepo, release, []string{attach.UUID}, nil, nil)) + assert.NoError(t, models.GetReleaseAttachments(release)) + assert.Len(t, release.Attachments, 1) + assert.EqualValues(t, attach.UUID, release.Attachments[0].UUID) + assert.EqualValues(t, release.ID, release.Attachments[0].ReleaseID) + assert.EqualValues(t, attach.Name, release.Attachments[0].Name) + + // update the attachment name + assert.NoError(t, UpdateRelease(user, gitRepo, release, nil, nil, map[string]string{ + attach.UUID: "test2.txt", + })) + release.Attachments = nil + assert.NoError(t, models.GetReleaseAttachments(release)) + assert.Len(t, release.Attachments, 1) + assert.EqualValues(t, attach.UUID, release.Attachments[0].UUID) + assert.EqualValues(t, release.ID, release.Attachments[0].ReleaseID) + assert.EqualValues(t, "test2.txt", release.Attachments[0].Name) + + // delete the attachment + assert.NoError(t, UpdateRelease(user, gitRepo, release, nil, []string{attach.UUID}, nil)) + release.Attachments = nil + assert.NoError(t, models.GetReleaseAttachments(release)) + assert.Empty(t, release.Attachments) } func TestRelease_createTag(t *testing.T) { @@ -196,7 +278,9 @@ func TestRelease_createTag(t *testing.T) { // Test a changed release release := &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v2.1.1", Target: "master", Title: "v2.1.1 is released", @@ -205,18 +289,22 @@ func TestRelease_createTag(t *testing.T) { IsPrerelease: false, IsTag: false, } - assert.NoError(t, createTag(gitRepo, release)) + _, err = createTag(gitRepo, release, "") + assert.NoError(t, err) assert.NotEmpty(t, release.CreatedUnix) releaseCreatedUnix := release.CreatedUnix time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp release.Note = "Changed note" - assert.NoError(t, createTag(gitRepo, release)) + _, err = createTag(gitRepo, release, "") + assert.NoError(t, err) assert.Equal(t, int64(releaseCreatedUnix), int64(release.CreatedUnix)) // Test a changed draft release = &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v2.2.1", Target: "65f1bf2", Title: "v2.2.1 is draft", @@ -225,17 +313,21 @@ func TestRelease_createTag(t *testing.T) { IsPrerelease: false, IsTag: false, } - assert.NoError(t, createTag(gitRepo, release)) + _, err = createTag(gitRepo, release, "") + assert.NoError(t, err) releaseCreatedUnix = release.CreatedUnix time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp release.Title = "Changed title" - assert.NoError(t, createTag(gitRepo, release)) + _, err = createTag(gitRepo, release, "") + assert.NoError(t, err) assert.Less(t, int64(releaseCreatedUnix), int64(release.CreatedUnix)) // Test a changed pre-release release = &models.Release{ RepoID: repo.ID, + Repo: repo, PublisherID: user.ID, + Publisher: user, TagName: "v2.3.1", Target: "65f1bf2", Title: "v2.3.1 is pre-released", @@ -244,11 +336,22 @@ func TestRelease_createTag(t *testing.T) { IsPrerelease: true, IsTag: false, } - assert.NoError(t, createTag(gitRepo, release)) + _, err = createTag(gitRepo, release, "") + assert.NoError(t, err) releaseCreatedUnix = release.CreatedUnix time.Sleep(2 * time.Second) // sleep 2 seconds to ensure a different timestamp release.Title = "Changed title" release.Note = "Changed note" - assert.NoError(t, createTag(gitRepo, release)) + _, err = createTag(gitRepo, release, "") + assert.NoError(t, err) assert.Equal(t, int64(releaseCreatedUnix), int64(release.CreatedUnix)) } + +func TestCreateNewTag(t *testing.T) { + assert.NoError(t, models.PrepareTestDatabase()) + user := models.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + + assert.NoError(t, CreateNewTag(user, repo, "master", "v2.0", + "v2.0 is released \n\n BUGFIX: .... \n\n 123")) +} diff --git a/services/repository/branch.go b/services/repository/branch.go new file mode 100644 index 000000000..28d24f121 --- /dev/null +++ b/services/repository/branch.go @@ -0,0 +1,72 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package repository + +import ( + "errors" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/log" + repo_module "code.gitea.io/gitea/modules/repository" + pull_service "code.gitea.io/gitea/services/pull" +) + +// enmuerates all branch related errors +var ( + ErrBranchIsDefault = errors.New("branch is default") + ErrBranchIsProtected = errors.New("branch is protected") +) + +// DeleteBranch delete branch +func DeleteBranch(doer *models.User, repo *models.Repository, gitRepo *git.Repository, branchName string) error { + if branchName == repo.DefaultBranch { + return ErrBranchIsDefault + } + + isProtected, err := repo.IsProtectedBranch(branchName) + if err != nil { + return err + } + + if isProtected { + return ErrBranchIsProtected + } + + commit, err := gitRepo.GetBranchCommit(branchName) + if err != nil { + return err + } + + if err := gitRepo.DeleteBranch(branchName, git.DeleteBranchOptions{ + Force: true, + }); err != nil { + return err + } + + if err := pull_service.CloseBranchPulls(doer, repo.ID, branchName); err != nil { + return err + } + + // Don't return error below this + if err := PushUpdate( + &repo_module.PushUpdateOptions{ + RefFullName: git.BranchPrefix + branchName, + OldCommitID: commit.ID.String(), + NewCommitID: git.EmptySHA, + PusherID: doer.ID, + PusherName: doer.Name, + RepoUserName: repo.OwnerName, + RepoName: repo.Name, + }); err != nil { + log.Error("Update: %v", err) + } + + if err := repo.AddDeletedBranch(branchName, commit.ID.String(), doer.ID); err != nil { + log.Warn("AddDeletedBranch: %v", err) + } + + return nil +} diff --git a/services/repository/generate.go b/services/repository/generate.go index 067f8f61d..43cbb45a4 100644 --- a/services/repository/generate.go +++ b/services/repository/generate.go @@ -13,6 +13,12 @@ import ( // GenerateRepository generates a repository from a template func GenerateRepository(doer, owner *models.User, templateRepo *models.Repository, opts models.GenerateRepoOptions) (_ *models.Repository, err error) { + if !doer.IsAdmin && !owner.CanCreateRepo() { + return nil, models.ErrReachLimitOfRepo{ + Limit: owner.MaxRepoCreation, + } + } + var generateRepo *models.Repository if err = models.WithTx(func(ctx models.DBContext) error { generateRepo, err = repo_module.GenerateRepository(ctx, doer, owner, templateRepo, opts) diff --git a/services/repository/push.go b/services/repository/push.go index bed5c575f..cf7060ade 100644 --- a/services/repository/push.go +++ b/services/repository/push.go @@ -5,7 +5,6 @@ package repository import ( - "container/list" "fmt" "time" @@ -95,7 +94,6 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error { if opts.IsNewRef() && opts.IsDelRef() { return fmt.Errorf("Old and new revisions are both %s", git.EmptySHA) } - var commits = &repo_module.PushCommits{} if opts.IsTag() { // If is tag reference if pusher == nil || pusher.ID != opts.PusherID { var err error @@ -148,7 +146,7 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error { refName := opts.RefName() // Push new branch. - var l *list.List + var l []*git.Commit if opts.IsNewRef() { if repo.IsEmpty { // Change default branch and empty status only if pushed ref is non-empty branch. repo.DefaultBranch = refName @@ -192,23 +190,25 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error { } } - commits = repo_module.ListToPushCommits(l) + commits := repo_module.GitToPushCommits(l) + commits.HeadCommit = repo_module.CommitToPushCommit(newCommit) + + if err := repofiles.UpdateIssuesCommit(pusher, repo, commits.Commits, refName); err != nil { + log.Error("updateIssuesCommit: %v", err) + } + if len(commits.Commits) > setting.UI.FeedMaxCommitNum { commits.Commits = commits.Commits[:setting.UI.FeedMaxCommitNum] } commits.CompareURL = repo.ComposeCompareURL(opts.OldCommitID, opts.NewCommitID) notification.NotifyPushCommits(pusher, repo, opts, commits) - if err := repofiles.UpdateIssuesCommit(pusher, repo, commits.Commits, refName); err != nil { - log.Error("updateIssuesCommit: %v", err) - } - if err = models.RemoveDeletedBranch(repo.ID, branch); err != nil { log.Error("models.RemoveDeletedBranch %s/%s failed: %v", repo.ID, branch, err) } // Cache for big repository - if err := repo_module.CacheRef(repo, gitRepo, opts.RefFullName); err != nil { + if err := repo_module.CacheRef(graceful.GetManager().HammerContext(), repo, gitRepo, opts.RefFullName); err != nil { log.Error("repo_module.CacheRef %s/%s failed: %v", repo.ID, branch, err) } } else { diff --git a/services/repository/repository.go b/services/repository/repository.go index 20d630424..cde4af2af 100644 --- a/services/repository/repository.go +++ b/services/repository/repository.go @@ -47,13 +47,13 @@ func DeleteUnadoptedRepository(doer, owner *models.User, name string) error { } // ForkRepository forks a repository -func ForkRepository(doer, u *models.User, oldRepo *models.Repository, name, desc string) (*models.Repository, error) { - repo, err := repo_module.ForkRepository(doer, u, oldRepo, name, desc) +func ForkRepository(doer, u *models.User, opts models.ForkRepoOptions) (*models.Repository, error) { + repo, err := repo_module.ForkRepository(doer, u, opts) if err != nil { return nil, err } - notification.NotifyForkRepository(doer, oldRepo, repo) + notification.NotifyForkRepository(doer, opts.BaseRepo, repo) return repo, nil } diff --git a/services/repository/transfer.go b/services/repository/transfer.go index e2416cf8d..bb323c1c0 100644 --- a/services/repository/transfer.go +++ b/services/repository/transfer.go @@ -70,3 +70,52 @@ func ChangeRepositoryName(doer *models.User, repo *models.Repository, newRepoNam return nil } + +// StartRepositoryTransfer transfer a repo from one owner to a new one. +// it make repository into pending transfer state, if doer can not create repo for new owner. +func StartRepositoryTransfer(doer, newOwner *models.User, repo *models.Repository, teams []*models.Team) error { + if err := models.TestRepositoryReadyForTransfer(repo.Status); err != nil { + return err + } + + // Admin is always allowed to transfer || user transfer repo back to his account + if doer.IsAdmin || doer.ID == newOwner.ID { + return TransferOwnership(doer, newOwner, repo, teams) + } + + // If new owner is an org and user can create repos he can transfer directly too + if newOwner.IsOrganization() { + allowed, err := models.CanCreateOrgRepo(newOwner.ID, doer.ID) + if err != nil { + return err + } + if allowed { + return TransferOwnership(doer, newOwner, repo, teams) + } + } + + // In case the new owner would not have sufficient access to the repo, give access rights for read + hasAccess, err := models.HasAccess(newOwner.ID, repo) + if err != nil { + return err + } + if !hasAccess { + if err := repo.AddCollaborator(newOwner); err != nil { + return err + } + if err := repo.ChangeCollaborationAccessMode(newOwner.ID, models.AccessModeRead); err != nil { + return err + } + } + + // Make repo as pending for transfer + repo.Status = models.RepositoryPendingTransfer + if err := models.CreatePendingRepositoryTransfer(doer, newOwner, repo.ID, teams); err != nil { + return err + } + + // notify users who are able to accept / reject transfer + notification.NotifyRepoPendingTransfer(doer, newOwner, repo) + + return nil +} diff --git a/services/repository/transfer_test.go b/services/repository/transfer_test.go index 052b8c995..c92844674 100644 --- a/services/repository/transfer_test.go +++ b/services/repository/transfer_test.go @@ -52,3 +52,24 @@ func TestTransferOwnership(t *testing.T) { models.CheckConsistencyFor(t, &models.Repository{}, &models.User{}, &models.Team{}) } + +func TestStartRepositoryTransferSetPermission(t *testing.T) { + assert.NoError(t, models.PrepareTestDatabase()) + + doer := models.AssertExistsAndLoadBean(t, &models.User{ID: 3}).(*models.User) + recipient := models.AssertExistsAndLoadBean(t, &models.User{ID: 5}).(*models.User) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 3}).(*models.Repository) + repo.Owner = models.AssertExistsAndLoadBean(t, &models.User{ID: repo.OwnerID}).(*models.User) + + hasAccess, err := models.HasAccess(recipient.ID, repo) + assert.NoError(t, err) + assert.False(t, hasAccess) + + assert.NoError(t, StartRepositoryTransfer(doer, recipient, repo, nil)) + + hasAccess, err = models.HasAccess(recipient.ID, repo) + assert.NoError(t, err) + assert.True(t, hasAccess) + + models.CheckConsistencyFor(t, &models.Repository{}, &models.User{}, &models.Team{}) +} diff --git a/services/webhook/deliver.go b/services/webhook/deliver.go index 44c1a18b6..d0e115b13 100644 --- a/services/webhook/deliver.go +++ b/services/webhook/deliver.go @@ -6,8 +6,13 @@ package webhook import ( "context" + "crypto/hmac" + "crypto/sha1" + "crypto/sha256" "crypto/tls" + "encoding/hex" "fmt" + "io" "io/ioutil" "net" "net/http" @@ -20,33 +25,39 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/graceful" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/proxy" "code.gitea.io/gitea/modules/setting" "github.com/gobwas/glob" ) // Deliver deliver hook task func Deliver(t *models.HookTask) error { + w, err := models.GetWebhookByID(t.HookID) + if err != nil { + return err + } + defer func() { err := recover() if err == nil { return } // There was a panic whilst delivering a hook... - log.Error("PANIC whilst trying to deliver webhook[%d] for repo[%d] to %s Panic: %v\nStacktrace: %s", t.ID, t.RepoID, t.URL, err, log.Stack(2)) + log.Error("PANIC whilst trying to deliver webhook[%d] for repo[%d] to %s Panic: %v\nStacktrace: %s", t.ID, t.RepoID, w.URL, err, log.Stack(2)) }() + t.IsDelivered = true var req *http.Request - var err error - switch t.HTTPMethod { + switch w.HTTPMethod { case "": log.Info("HTTP Method for webhook %d empty, setting to POST as default", t.ID) fallthrough case http.MethodPost: - switch t.ContentType { + switch w.ContentType { case models.ContentTypeJSON: - req, err = http.NewRequest("POST", t.URL, strings.NewReader(t.PayloadContent)) + req, err = http.NewRequest("POST", w.URL, strings.NewReader(t.PayloadContent)) if err != nil { return err } @@ -57,16 +68,15 @@ func Deliver(t *models.HookTask) error { "payload": []string{t.PayloadContent}, } - req, err = http.NewRequest("POST", t.URL, strings.NewReader(forms.Encode())) + req, err = http.NewRequest("POST", w.URL, strings.NewReader(forms.Encode())) if err != nil { - return err } req.Header.Set("Content-Type", "application/x-www-form-urlencoded") } case http.MethodGet: - u, err := url.Parse(t.URL) + u, err := url.Parse(w.URL) if err != nil { return err } @@ -78,31 +88,48 @@ func Deliver(t *models.HookTask) error { return err } case http.MethodPut: - switch t.Typ { + switch w.Type { case models.MATRIX: - req, err = getMatrixHookRequest(t) + req, err = getMatrixHookRequest(w, t) if err != nil { return err } default: - return fmt.Errorf("Invalid http method for webhook: [%d] %v", t.ID, t.HTTPMethod) + return fmt.Errorf("Invalid http method for webhook: [%d] %v", t.ID, w.HTTPMethod) } default: - return fmt.Errorf("Invalid http method for webhook: [%d] %v", t.ID, t.HTTPMethod) + return fmt.Errorf("Invalid http method for webhook: [%d] %v", t.ID, w.HTTPMethod) + } + + var signatureSHA1 string + var signatureSHA256 string + if len(w.Secret) > 0 { + sig1 := hmac.New(sha1.New, []byte(w.Secret)) + sig256 := hmac.New(sha256.New, []byte(w.Secret)) + _, err = io.MultiWriter(sig1, sig256).Write([]byte(t.PayloadContent)) + if err != nil { + log.Error("prepareWebhooks.sigWrite: %v", err) + } + signatureSHA1 = hex.EncodeToString(sig1.Sum(nil)) + signatureSHA256 = hex.EncodeToString(sig256.Sum(nil)) } req.Header.Add("X-Gitea-Delivery", t.UUID) req.Header.Add("X-Gitea-Event", t.EventType.Event()) - req.Header.Add("X-Gitea-Signature", t.Signature) + req.Header.Add("X-Gitea-Signature", signatureSHA256) req.Header.Add("X-Gogs-Delivery", t.UUID) req.Header.Add("X-Gogs-Event", t.EventType.Event()) - req.Header.Add("X-Gogs-Signature", t.Signature) + req.Header.Add("X-Gogs-Signature", signatureSHA256) + req.Header.Add("X-Hub-Signature", "sha1="+signatureSHA1) + req.Header.Add("X-Hub-Signature-256", "sha256="+signatureSHA256) req.Header["X-GitHub-Delivery"] = []string{t.UUID} req.Header["X-GitHub-Event"] = []string{t.EventType.Event()} // Record delivery information. t.RequestInfo = &models.HookRequest{ - Headers: map[string]string{}, + URL: req.URL.String(), + HTTPMethod: req.Method, + Headers: map[string]string{}, } for k, vals := range req.Header { t.RequestInfo.Headers[k] = strings.Join(vals, ",") @@ -125,11 +152,6 @@ func Deliver(t *models.HookTask) error { } // Update webhook last delivery status. - w, err := models.GetWebhookByID(t.HookID) - if err != nil { - log.Error("GetWebhookByID: %v", err) - return - } if t.IsSucceed { w.LastStatus = models.HookStatusSucceed } else { @@ -141,6 +163,10 @@ func Deliver(t *models.HookTask) error { } }() + if setting.DisableWebhooks { + return fmt.Errorf("Webhook task skipped (webhooks disabled): [%d]", t.ID) + } + resp, err := webhookHTTPClient.Do(req) if err != nil { t.ResponseInfo.Body = fmt.Sprintf("Delivery: %v", err) @@ -235,7 +261,7 @@ var ( func webhookProxy() func(req *http.Request) (*url.URL, error) { if setting.Webhook.ProxyURL == "" { - return http.ProxyFromEnvironment + return proxy.Proxy() } once.Do(func() { @@ -267,14 +293,10 @@ func InitDeliverHooks() { TLSClientConfig: &tls.Config{InsecureSkipVerify: setting.Webhook.SkipTLSVerify}, Proxy: webhookProxy(), Dial: func(netw, addr string) (net.Conn, error) { - conn, err := net.DialTimeout(netw, addr, timeout) - if err != nil { - return nil, err - } - - return conn, conn.SetDeadline(time.Now().Add(timeout)) + return net.DialTimeout(netw, addr, timeout) // dial timeout }, }, + Timeout: timeout, // request timeout } go graceful.GetManager().RunWithShutdownContext(DeliverHooks) diff --git a/services/webhook/dingtalk.go b/services/webhook/dingtalk.go index a9032db04..3296b1114 100644 --- a/services/webhook/dingtalk.go +++ b/services/webhook/dingtalk.go @@ -5,12 +5,12 @@ package webhook import ( - "encoding/json" "fmt" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" dingtalk "github.com/lunny/dingtalk_webhook" @@ -25,9 +25,6 @@ var ( _ PayloadConvertor = &DingtalkPayload{} ) -// SetSecret sets the dingtalk secret -func (d *DingtalkPayload) SetSecret(_ string) {} - // JSONPayload Marshals the DingtalkPayload to json func (d *DingtalkPayload) JSONPayload() ([]byte, error) { data, err := json.MarshalIndent(d, "", " ") @@ -43,16 +40,7 @@ func (d *DingtalkPayload) Create(p *api.CreatePayload) (api.Payloader, error) { refName := git.RefEndName(p.Ref) title := fmt.Sprintf("[%s] %s %s created", p.Repo.FullName, p.RefType, refName) - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: title, - Title: title, - HideAvatar: "0", - SingleTitle: fmt.Sprintf("view ref %s", refName), - SingleURL: p.Repo.HTMLURL + "/src/" + refName, - }, - }, nil + return createDingtalkPayload(title, title, fmt.Sprintf("view ref %s", refName), p.Repo.HTMLURL+"/src/"+refName), nil } // Delete implements PayloadConvertor Delete method @@ -61,32 +49,14 @@ func (d *DingtalkPayload) Delete(p *api.DeletePayload) (api.Payloader, error) { refName := git.RefEndName(p.Ref) title := fmt.Sprintf("[%s] %s %s deleted", p.Repo.FullName, p.RefType, refName) - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: title, - Title: title, - HideAvatar: "0", - SingleTitle: fmt.Sprintf("view ref %s", refName), - SingleURL: p.Repo.HTMLURL + "/src/" + refName, - }, - }, nil + return createDingtalkPayload(title, title, fmt.Sprintf("view ref %s", refName), p.Repo.HTMLURL+"/src/"+refName), nil } // Fork implements PayloadConvertor Fork method func (d *DingtalkPayload) Fork(p *api.ForkPayload) (api.Payloader, error) { title := fmt.Sprintf("%s is forked to %s", p.Forkee.FullName, p.Repo.FullName) - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: title, - Title: title, - HideAvatar: "0", - SingleTitle: fmt.Sprintf("view forked repo %s", p.Repo.FullName), - SingleURL: p.Repo.HTMLURL, - }, - }, nil + return createDingtalkPayload(title, title, fmt.Sprintf("view forked repo %s", p.Repo.FullName), p.Repo.HTMLURL), nil } // Push implements PayloadConvertor Push method @@ -123,70 +93,32 @@ func (d *DingtalkPayload) Push(p *api.PushPayload) (api.Payloader, error) { strings.TrimRight(commit.Message, "\r\n")) + authorName // add linebreak to each commit but the last if i < len(p.Commits)-1 { - text += "\n" + text += "\r\n" } } - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: text, - Title: title, - HideAvatar: "0", - SingleTitle: linkText, - SingleURL: titleLink, - }, - }, nil + return createDingtalkPayload(title, text, linkText, titleLink), nil } // Issue implements PayloadConvertor Issue method func (d *DingtalkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) { text, issueTitle, attachmentText, _ := getIssuesPayloadInfo(p, noneLinkFormatter, true) - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: text + "\r\n\r\n" + attachmentText, - //Markdown: "# " + title + "\n" + text, - Title: issueTitle, - HideAvatar: "0", - SingleTitle: "view issue", - SingleURL: p.Issue.HTMLURL, - }, - }, nil + return createDingtalkPayload(issueTitle, text+"\r\n\r\n"+attachmentText, "view issue", p.Issue.HTMLURL), nil } // IssueComment implements PayloadConvertor IssueComment method func (d *DingtalkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) { text, issueTitle, _ := getIssueCommentPayloadInfo(p, noneLinkFormatter, true) - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: text + "\r\n\r\n" + p.Comment.Body, - Title: issueTitle, - HideAvatar: "0", - SingleTitle: "view issue comment", - SingleURL: p.Comment.HTMLURL, - }, - }, nil + return createDingtalkPayload(issueTitle, text+"\r\n\r\n"+p.Comment.Body, "view issue comment", p.Comment.HTMLURL), nil } // PullRequest implements PayloadConvertor PullRequest method func (d *DingtalkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) { text, issueTitle, attachmentText, _ := getPullRequestPayloadInfo(p, noneLinkFormatter, true) - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: text + "\r\n\r\n" + attachmentText, - //Markdown: "# " + title + "\n" + text, - Title: issueTitle, - HideAvatar: "0", - SingleTitle: "view pull request", - SingleURL: p.PullRequest.HTMLURL, - }, - }, nil + return createDingtalkPayload(issueTitle, text+"\r\n\r\n"+attachmentText, "view pull request", p.PullRequest.HTMLURL), nil } // Review implements PayloadConvertor Review method @@ -204,37 +136,17 @@ func (d *DingtalkPayload) Review(p *api.PullRequestPayload, event models.HookEve } - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: title + "\r\n\r\n" + text, - Title: title, - HideAvatar: "0", - SingleTitle: "view pull request", - SingleURL: p.PullRequest.HTMLURL, - }, - }, nil + return createDingtalkPayload(title, title+"\r\n\r\n"+text, "view pull request", p.PullRequest.HTMLURL), nil } // Repository implements PayloadConvertor Repository method func (d *DingtalkPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) { - var title, url string switch p.Action { case api.HookRepoCreated: - title = fmt.Sprintf("[%s] Repository created", p.Repository.FullName) - url = p.Repository.HTMLURL - return &DingtalkPayload{ - MsgType: "actionCard", - ActionCard: dingtalk.ActionCard{ - Text: title, - Title: title, - HideAvatar: "0", - SingleTitle: "view repository", - SingleURL: url, - }, - }, nil + title := fmt.Sprintf("[%s] Repository created", p.Repository.FullName) + return createDingtalkPayload(title, title, "view repository", p.Repository.HTMLURL), nil case api.HookRepoDeleted: - title = fmt.Sprintf("[%s] Repository deleted", p.Repository.FullName) + title := fmt.Sprintf("[%s] Repository deleted", p.Repository.FullName) return &DingtalkPayload{ MsgType: "text", Text: struct { @@ -252,16 +164,20 @@ func (d *DingtalkPayload) Repository(p *api.RepositoryPayload) (api.Payloader, e func (d *DingtalkPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, noneLinkFormatter, true) + return createDingtalkPayload(text, text, "view release", p.Release.URL), nil +} + +func createDingtalkPayload(title, text, singleTitle, singleURL string) *DingtalkPayload { return &DingtalkPayload{ MsgType: "actionCard", ActionCard: dingtalk.ActionCard{ - Text: text, - Title: text, + Text: strings.TrimSpace(text), + Title: strings.TrimSpace(title), HideAvatar: "0", - SingleTitle: "view release", - SingleURL: p.Release.URL, + SingleTitle: singleTitle, + SingleURL: singleURL, }, - }, nil + } } // GetDingtalkPayload converts a ding talk webhook into a DingtalkPayload diff --git a/services/webhook/dingtalk_test.go b/services/webhook/dingtalk_test.go index e5aa0fca3..213ad1a28 100644 --- a/services/webhook/dingtalk_test.go +++ b/services/webhook/dingtalk_test.go @@ -7,25 +7,202 @@ package webhook import ( "testing" + "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestGetDingTalkIssuesPayload(t *testing.T) { - p := issueTestPayload() - d := new(DingtalkPayload) - p.Action = api.HookIssueOpened - pl, err := d.Issue(p) - require.NoError(t, err) - require.NotNil(t, pl) - assert.Equal(t, "#2 crash", pl.(*DingtalkPayload).ActionCard.Title) - assert.Equal(t, "[test/repo] Issue opened: #2 crash by user1\r\n\r\n", pl.(*DingtalkPayload).ActionCard.Text) +func TestDingTalkPayload(t *testing.T) { + t.Run("Create", func(t *testing.T) { + p := createTestPayload() - p.Action = api.HookIssueClosed - pl, err = d.Issue(p) + d := new(DingtalkPayload) + pl, err := d.Create(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] branch test created", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] branch test created", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view ref test", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("Delete", func(t *testing.T) { + p := deleteTestPayload() + + d := new(DingtalkPayload) + pl, err := d.Delete(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] branch test deleted", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] branch test deleted", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view ref test", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("Fork", func(t *testing.T) { + p := forkTestPayload() + + d := new(DingtalkPayload) + pl, err := d.Fork(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "test/repo2 is forked to test/repo", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "test/repo2 is forked to test/repo", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view forked repo test/repo", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("Push", func(t *testing.T) { + p := pushTestPayload() + + d := new(DingtalkPayload) + pl, err := d.Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1\r\n[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo:test] 2 new commits", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view commit 2020558...2020558", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("Issue", func(t *testing.T) { + p := issueTestPayload() + + d := new(DingtalkPayload) + p.Action = api.HookIssueOpened + pl, err := d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Issue opened: #2 crash by user1\r\n\r\nissue body", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "#2 crash", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view issue", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2", pl.(*DingtalkPayload).ActionCard.SingleURL) + + p.Action = api.HookIssueClosed + pl, err = d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Issue closed: #2 crash by user1", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "#2 crash", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view issue", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("IssueComment", func(t *testing.T) { + p := issueCommentTestPayload() + + d := new(DingtalkPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] New comment on issue #2 crash by user1\r\n\r\nmore info needed", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "#2 crash", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view issue comment", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2#issuecomment-4", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("PullRequest", func(t *testing.T) { + p := pullRequestTestPayload() + + d := new(DingtalkPayload) + pl, err := d.PullRequest(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Pull request opened: #12 Fix bug by user1\r\n\r\nfixes bug #2", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "#12 Fix bug", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view pull request", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("PullRequestComment", func(t *testing.T) { + p := pullRequestCommentTestPayload() + + d := new(DingtalkPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] New comment on pull request #12 Fix bug by user1\r\n\r\nchanges requested", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "#12 Fix bug", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view issue comment", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12#issuecomment-4", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("Review", func(t *testing.T) { + p := pullRequestTestPayload() + p.Action = api.HookIssueReviewed + + d := new(DingtalkPayload) + pl, err := d.Review(p, models.HookEventPullRequestReviewApproved) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Pull request review approved : #12 Fix bug\r\n\r\ngood job", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] Pull request review approved : #12 Fix bug", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view pull request", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("Repository", func(t *testing.T) { + p := repositoryTestPayload() + + d := new(DingtalkPayload) + pl, err := d.Repository(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Repository created", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] Repository created", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view repository", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/test/repo", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) + + t.Run("Release", func(t *testing.T) { + p := pullReleaseTestPayload() + + d := new(DingtalkPayload) + pl, err := d.Release(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DingtalkPayload{}, pl) + + assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*DingtalkPayload).ActionCard.Text) + assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*DingtalkPayload).ActionCard.Title) + assert.Equal(t, "view release", pl.(*DingtalkPayload).ActionCard.SingleTitle) + assert.Equal(t, "http://localhost:3000/api/v1/repos/test/repo/releases/2", pl.(*DingtalkPayload).ActionCard.SingleURL) + }) +} + +func TestDingTalkJSONPayload(t *testing.T) { + p := pushTestPayload() + + pl, err := new(DingtalkPayload).Push(p) require.NoError(t, err) require.NotNil(t, pl) - assert.Equal(t, "#2 crash", pl.(*DingtalkPayload).ActionCard.Title) - assert.Equal(t, "[test/repo] Issue closed: #2 crash by user1\r\n\r\n", pl.(*DingtalkPayload).ActionCard.Text) + require.IsType(t, &DingtalkPayload{}, pl) + + json, err := pl.JSONPayload() + require.NoError(t, err) + assert.NotEmpty(t, json) } diff --git a/services/webhook/discord.go b/services/webhook/discord.go index 530e7adbd..9a8f8a27a 100644 --- a/services/webhook/discord.go +++ b/services/webhook/discord.go @@ -5,7 +5,6 @@ package webhook import ( - "encoding/json" "errors" "fmt" "strconv" @@ -13,6 +12,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -96,9 +96,6 @@ var ( redColor = color("ff3232") ) -// SetSecret sets the discord secret -func (d *DiscordPayload) SetSecret(_ string) {} - // JSONPayload Marshals the DiscordPayload to json func (d *DiscordPayload) JSONPayload() ([]byte, error) { data, err := json.MarshalIndent(d, "", " ") @@ -118,22 +115,7 @@ func (d *DiscordPayload) Create(p *api.CreatePayload) (api.Payloader, error) { refName := git.RefEndName(p.Ref) title := fmt.Sprintf("[%s] %s %s created", p.Repo.FullName, p.RefType, refName) - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: title, - URL: p.Repo.HTMLURL + "/src/" + refName, - Color: greenColor, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, "", p.Repo.HTMLURL+"/src/"+refName, greenColor), nil } // Delete implements PayloadConvertor Delete method @@ -142,44 +124,14 @@ func (d *DiscordPayload) Delete(p *api.DeletePayload) (api.Payloader, error) { refName := git.RefEndName(p.Ref) title := fmt.Sprintf("[%s] %s %s deleted", p.Repo.FullName, p.RefType, refName) - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: title, - URL: p.Repo.HTMLURL + "/src/" + refName, - Color: redColor, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, "", p.Repo.HTMLURL+"/src/"+refName, redColor), nil } // Fork implements PayloadConvertor Fork method func (d *DiscordPayload) Fork(p *api.ForkPayload) (api.Payloader, error) { title := fmt.Sprintf("%s is forked to %s", p.Forkee.FullName, p.Repo.FullName) - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: title, - URL: p.Repo.HTMLURL, - Color: greenColor, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, "", p.Repo.HTMLURL, greenColor), nil } // Push implements PayloadConvertor Push method @@ -214,92 +166,28 @@ func (d *DiscordPayload) Push(p *api.PushPayload) (api.Payloader, error) { } } - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: title, - Description: text, - URL: titleLink, - Color: greenColor, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, text, titleLink, greenColor), nil } // Issue implements PayloadConvertor Issue method func (d *DiscordPayload) Issue(p *api.IssuePayload) (api.Payloader, error) { - text, _, attachmentText, color := getIssuesPayloadInfo(p, noneLinkFormatter, false) + title, _, text, color := getIssuesPayloadInfo(p, noneLinkFormatter, false) - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: text, - Description: attachmentText, - URL: p.Issue.HTMLURL, - Color: color, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, text, p.Issue.HTMLURL, color), nil } // IssueComment implements PayloadConvertor IssueComment method func (d *DiscordPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) { - text, _, color := getIssueCommentPayloadInfo(p, noneLinkFormatter, false) + title, _, color := getIssueCommentPayloadInfo(p, noneLinkFormatter, false) - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: text, - Description: p.Comment.Body, - URL: p.Comment.HTMLURL, - Color: color, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, p.Comment.Body, p.Comment.HTMLURL, color), nil } // PullRequest implements PayloadConvertor PullRequest method func (d *DiscordPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) { - text, _, attachmentText, color := getPullRequestPayloadInfo(p, noneLinkFormatter, false) + title, _, text, color := getPullRequestPayloadInfo(p, noneLinkFormatter, false) - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: text, - Description: attachmentText, - URL: p.PullRequest.HTMLURL, - Color: color, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, text, p.PullRequest.HTMLURL, color), nil } // Review implements PayloadConvertor Review method @@ -328,23 +216,7 @@ func (d *DiscordPayload) Review(p *api.PullRequestPayload, event models.HookEven } } - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: title, - Description: text, - URL: p.PullRequest.HTMLURL, - Color: color, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, text, p.PullRequest.HTMLURL, color), nil } // Repository implements PayloadConvertor Repository method @@ -361,45 +233,14 @@ func (d *DiscordPayload) Repository(p *api.RepositoryPayload) (api.Payloader, er color = redColor } - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: title, - URL: url, - Color: color, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, title, "", url, color), nil } // Release implements PayloadConvertor Release method func (d *DiscordPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, color := getReleasePayloadInfo(p, noneLinkFormatter, false) - return &DiscordPayload{ - Username: d.Username, - AvatarURL: d.AvatarURL, - Embeds: []DiscordEmbed{ - { - Title: text, - Description: p.Release.Note, - URL: p.Release.URL, - Color: color, - Author: DiscordEmbedAuthor{ - Name: p.Sender.UserName, - URL: setting.AppURL + p.Sender.UserName, - IconURL: p.Sender.AvatarURL, - }, - }, - }, - }, nil + return d.createPayload(p.Sender, text, p.Release.Note, p.Release.URL, color), nil } // GetDiscordPayload converts a discord webhook into a DiscordPayload @@ -430,3 +271,23 @@ func parseHookPullRequestEventType(event models.HookEventType) (string, error) { return "", errors.New("unknown event type") } } + +func (d *DiscordPayload) createPayload(s *api.User, title, text, url string, color int) *DiscordPayload { + return &DiscordPayload{ + Username: d.Username, + AvatarURL: d.AvatarURL, + Embeds: []DiscordEmbed{ + { + Title: title, + Description: text, + URL: url, + Color: color, + Author: DiscordEmbedAuthor{ + Name: s.UserName, + URL: setting.AppURL + s.UserName, + IconURL: s.AvatarURL, + }, + }, + }, + } +} diff --git a/services/webhook/discord_test.go b/services/webhook/discord_test.go new file mode 100644 index 000000000..fd7d2856c --- /dev/null +++ b/services/webhook/discord_test.go @@ -0,0 +1,245 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package webhook + +import ( + "testing" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/setting" + api "code.gitea.io/gitea/modules/structs" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestDiscordPayload(t *testing.T) { + t.Run("Create", func(t *testing.T) { + p := createTestPayload() + + d := new(DiscordPayload) + pl, err := d.Create(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] branch test created", pl.(*DiscordPayload).Embeds[0].Title) + assert.Empty(t, pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("Delete", func(t *testing.T) { + p := deleteTestPayload() + + d := new(DiscordPayload) + pl, err := d.Delete(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] branch test deleted", pl.(*DiscordPayload).Embeds[0].Title) + assert.Empty(t, pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("Fork", func(t *testing.T) { + p := forkTestPayload() + + d := new(DiscordPayload) + pl, err := d.Fork(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "test/repo2 is forked to test/repo", pl.(*DiscordPayload).Embeds[0].Title) + assert.Empty(t, pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("Push", func(t *testing.T) { + p := pushTestPayload() + + d := new(DiscordPayload) + pl, err := d.Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo:test] 2 new commits", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1\n[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("Issue", func(t *testing.T) { + p := issueTestPayload() + + d := new(DiscordPayload) + p.Action = api.HookIssueOpened + pl, err := d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Issue opened: #2 crash", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "issue body", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + + p.Action = api.HookIssueClosed + pl, err = d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Issue closed: #2 crash", pl.(*DiscordPayload).Embeds[0].Title) + assert.Empty(t, pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("IssueComment", func(t *testing.T) { + p := issueCommentTestPayload() + + d := new(DiscordPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] New comment on issue #2 crash", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "more info needed", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2#issuecomment-4", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("PullRequest", func(t *testing.T) { + p := pullRequestTestPayload() + + d := new(DiscordPayload) + pl, err := d.PullRequest(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Pull request opened: #12 Fix bug", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "fixes bug #2", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("PullRequestComment", func(t *testing.T) { + p := pullRequestCommentTestPayload() + + d := new(DiscordPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] New comment on pull request #12 Fix bug", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "changes requested", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12#issuecomment-4", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("Review", func(t *testing.T) { + p := pullRequestTestPayload() + p.Action = api.HookIssueReviewed + + d := new(DiscordPayload) + pl, err := d.Review(p, models.HookEventPullRequestReviewApproved) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Pull request review approved: #12 Fix bug", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "good job", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("Repository", func(t *testing.T) { + p := repositoryTestPayload() + + d := new(DiscordPayload) + pl, err := d.Repository(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Repository created", pl.(*DiscordPayload).Embeds[0].Title) + assert.Empty(t, pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/test/repo", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) + + t.Run("Release", func(t *testing.T) { + p := pullReleaseTestPayload() + + d := new(DiscordPayload) + pl, err := d.Release(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + assert.Len(t, pl.(*DiscordPayload).Embeds, 1) + assert.Equal(t, "[test/repo] Release created: v1.0", pl.(*DiscordPayload).Embeds[0].Title) + assert.Equal(t, "Note of first stable release", pl.(*DiscordPayload).Embeds[0].Description) + assert.Equal(t, "http://localhost:3000/api/v1/repos/test/repo/releases/2", pl.(*DiscordPayload).Embeds[0].URL) + assert.Equal(t, p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.Name) + assert.Equal(t, setting.AppURL+p.Sender.UserName, pl.(*DiscordPayload).Embeds[0].Author.URL) + assert.Equal(t, p.Sender.AvatarURL, pl.(*DiscordPayload).Embeds[0].Author.IconURL) + }) +} + +func TestDiscordJSONPayload(t *testing.T) { + p := pushTestPayload() + + pl, err := new(DiscordPayload).Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &DiscordPayload{}, pl) + + json, err := pl.JSONPayload() + require.NoError(t, err) + assert.NotEmpty(t, json) +} diff --git a/services/webhook/feishu.go b/services/webhook/feishu.go index 3d789e6c1..4428d54f9 100644 --- a/services/webhook/feishu.go +++ b/services/webhook/feishu.go @@ -5,12 +5,12 @@ package webhook import ( - "encoding/json" "fmt" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" ) @@ -30,14 +30,11 @@ func newFeishuTextPayload(text string) *FeishuPayload { Content: struct { Text string `json:"text"` }{ - Text: text, + Text: strings.TrimSpace(text), }, } } -// SetSecret sets the Feishu secret -func (f *FeishuPayload) SetSecret(_ string) {} - // JSONPayload Marshals the FeishuPayload to json func (f *FeishuPayload) JSONPayload() ([]byte, error) { data, err := json.MarshalIndent(f, "", " ") @@ -83,7 +80,7 @@ func (f *FeishuPayload) Push(p *api.PushPayload) (api.Payloader, error) { commitDesc string ) - var text = fmt.Sprintf("[%s:%s] %s\n", p.Repo.FullName, branchName, commitDesc) + var text = fmt.Sprintf("[%s:%s] %s\r\n", p.Repo.FullName, branchName, commitDesc) // for each commit, generate attachment text for i, commit := range p.Commits { var authorName string @@ -94,7 +91,7 @@ func (f *FeishuPayload) Push(p *api.PushPayload) (api.Payloader, error) { strings.TrimRight(commit.Message, "\r\n")) + authorName // add linebreak to each commit but the last if i < len(p.Commits)-1 { - text += "\n" + text += "\r\n" } } @@ -124,19 +121,14 @@ func (f *FeishuPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, e // Review implements PayloadConvertor Review method func (f *FeishuPayload) Review(p *api.PullRequestPayload, event models.HookEventType) (api.Payloader, error) { - var text, title string - switch p.Action { - case api.HookIssueSynchronized: - action, err := parseHookPullRequestEventType(event) - if err != nil { - return nil, err - } - - title = fmt.Sprintf("[%s] Pull request review %s : #%d %s", p.Repository.FullName, action, p.Index, p.PullRequest.Title) - text = p.Review.Content - + action, err := parseHookPullRequestEventType(event) + if err != nil { + return nil, err } + title := fmt.Sprintf("[%s] Pull request review %s : #%d %s", p.Repository.FullName, action, p.Index, p.PullRequest.Title) + text := p.Review.Content + return newFeishuTextPayload(title + "\r\n\r\n" + text), nil } diff --git a/services/webhook/feishu_test.go b/services/webhook/feishu_test.go new file mode 100644 index 000000000..7f3508c14 --- /dev/null +++ b/services/webhook/feishu_test.go @@ -0,0 +1,172 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package webhook + +import ( + "testing" + + "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestFeishuPayload(t *testing.T) { + t.Run("Create", func(t *testing.T) { + p := createTestPayload() + + d := new(FeishuPayload) + pl, err := d.Create(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, `[test/repo] branch test created`, pl.(*FeishuPayload).Content.Text) + }) + + t.Run("Delete", func(t *testing.T) { + p := deleteTestPayload() + + d := new(FeishuPayload) + pl, err := d.Delete(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, `[test/repo] branch test deleted`, pl.(*FeishuPayload).Content.Text) + }) + + t.Run("Fork", func(t *testing.T) { + p := forkTestPayload() + + d := new(FeishuPayload) + pl, err := d.Fork(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, `test/repo2 is forked to test/repo`, pl.(*FeishuPayload).Content.Text) + }) + + t.Run("Push", func(t *testing.T) { + p := pushTestPayload() + + d := new(FeishuPayload) + pl, err := d.Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "[test/repo:test] \r\n[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1\r\n[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1", pl.(*FeishuPayload).Content.Text) + }) + + t.Run("Issue", func(t *testing.T) { + p := issueTestPayload() + + d := new(FeishuPayload) + p.Action = api.HookIssueOpened + pl, err := d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "#2 crash\r\n[test/repo] Issue opened: #2 crash by user1\r\n\r\nissue body", pl.(*FeishuPayload).Content.Text) + + p.Action = api.HookIssueClosed + pl, err = d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "#2 crash\r\n[test/repo] Issue closed: #2 crash by user1", pl.(*FeishuPayload).Content.Text) + }) + + t.Run("IssueComment", func(t *testing.T) { + p := issueCommentTestPayload() + + d := new(FeishuPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "#2 crash\r\n[test/repo] New comment on issue #2 crash by user1\r\n\r\nmore info needed", pl.(*FeishuPayload).Content.Text) + }) + + t.Run("PullRequest", func(t *testing.T) { + p := pullRequestTestPayload() + + d := new(FeishuPayload) + pl, err := d.PullRequest(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "#12 Fix bug\r\n[test/repo] Pull request opened: #12 Fix bug by user1\r\n\r\nfixes bug #2", pl.(*FeishuPayload).Content.Text) + }) + + t.Run("PullRequestComment", func(t *testing.T) { + p := pullRequestCommentTestPayload() + + d := new(FeishuPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "#12 Fix bug\r\n[test/repo] New comment on pull request #12 Fix bug by user1\r\n\r\nchanges requested", pl.(*FeishuPayload).Content.Text) + }) + + t.Run("Review", func(t *testing.T) { + p := pullRequestTestPayload() + p.Action = api.HookIssueReviewed + + d := new(FeishuPayload) + pl, err := d.Review(p, models.HookEventPullRequestReviewApproved) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "[test/repo] Pull request review approved : #12 Fix bug\r\n\r\ngood job", pl.(*FeishuPayload).Content.Text) + }) + + t.Run("Repository", func(t *testing.T) { + p := repositoryTestPayload() + + d := new(FeishuPayload) + pl, err := d.Repository(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "[test/repo] Repository created", pl.(*FeishuPayload).Content.Text) + }) + + t.Run("Release", func(t *testing.T) { + p := pullReleaseTestPayload() + + d := new(FeishuPayload) + pl, err := d.Release(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*FeishuPayload).Content.Text) + }) +} + +func TestFeishuJSONPayload(t *testing.T) { + p := pushTestPayload() + + pl, err := new(FeishuPayload).Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &FeishuPayload{}, pl) + + json, err := pl.JSONPayload() + require.NoError(t, err) + assert.NotEmpty(t, json) +} diff --git a/services/webhook/general.go b/services/webhook/general.go index ec247a241..777ae086b 100644 --- a/services/webhook/general.go +++ b/services/webhook/general.go @@ -44,8 +44,11 @@ func getIssuesPayloadInfo(p *api.IssuePayload, linkFormatter linkFormatter, with case api.HookIssueEdited: text = fmt.Sprintf("[%s] Issue edited: %s", repoLink, titleLink) case api.HookIssueAssigned: - text = fmt.Sprintf("[%s] Issue assigned to %s: %s", repoLink, - linkFormatter(setting.AppURL+p.Issue.Assignee.UserName, p.Issue.Assignee.UserName), titleLink) + list := make([]string, len(p.Issue.Assignees)) + for i, user := range p.Issue.Assignees { + list[i] = linkFormatter(setting.AppURL+user.UserName, user.UserName) + } + text = fmt.Sprintf("[%s] Issue assigned to %s: %s", repoLink, strings.Join(list, ", "), titleLink) color = greenColor case api.HookIssueUnassigned: text = fmt.Sprintf("[%s] Issue unassigned: %s", repoLink, titleLink) @@ -102,7 +105,7 @@ func getPullRequestPayloadInfo(p *api.PullRequestPayload, linkFormatter linkForm for i, user := range p.PullRequest.Assignees { list[i] = linkFormatter(setting.AppURL+user.UserName, user.UserName) } - text = fmt.Sprintf("[%s] Pull request assigned: %s to %s", repoLink, + text = fmt.Sprintf("[%s] Pull request assigned to %s: %s", repoLink, strings.Join(list, ", "), titleLink) color = greenColor case api.HookIssueUnassigned: @@ -115,7 +118,7 @@ func getPullRequestPayloadInfo(p *api.PullRequestPayload, linkFormatter linkForm text = fmt.Sprintf("[%s] Pull request synchronized: %s", repoLink, titleLink) case api.HookIssueMilestoned: mileStoneLink := fmt.Sprintf("%s/milestone/%d", p.Repository.HTMLURL, p.PullRequest.Milestone.ID) - text = fmt.Sprintf("[%s] Pull request milestoned: %s to %s", repoLink, + text = fmt.Sprintf("[%s] Pull request milestoned to %s: %s", repoLink, linkFormatter(mileStoneLink, p.PullRequest.Milestone.Title), titleLink) case api.HookIssueDemilestoned: text = fmt.Sprintf("[%s] Pull request milestone cleared: %s", repoLink, titleLink) diff --git a/services/webhook/general_test.go b/services/webhook/general_test.go index 3033b5788..4d73afe06 100644 --- a/services/webhook/general_test.go +++ b/services/webhook/general_test.go @@ -5,14 +5,111 @@ package webhook import ( + "testing" + api "code.gitea.io/gitea/modules/structs" + + "github.com/stretchr/testify/assert" ) +func createTestPayload() *api.CreatePayload { + return &api.CreatePayload{ + Sha: "2020558fe2e34debb818a514715839cabd25e777", + Ref: "refs/heads/test", + RefType: "branch", + Repo: &api.Repository{ + HTMLURL: "http://localhost:3000/test/repo", + Name: "repo", + FullName: "test/repo", + }, + Sender: &api.User{ + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + } +} + +func deleteTestPayload() *api.DeletePayload { + return &api.DeletePayload{ + Ref: "refs/heads/test", + RefType: "branch", + Repo: &api.Repository{ + HTMLURL: "http://localhost:3000/test/repo", + Name: "repo", + FullName: "test/repo", + }, + Sender: &api.User{ + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + } +} + +func forkTestPayload() *api.ForkPayload { + return &api.ForkPayload{ + Forkee: &api.Repository{ + HTMLURL: "http://localhost:3000/test/repo2", + Name: "repo2", + FullName: "test/repo2", + }, + Repo: &api.Repository{ + HTMLURL: "http://localhost:3000/test/repo", + Name: "repo", + FullName: "test/repo", + }, + Sender: &api.User{ + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + } +} + +func pushTestPayload() *api.PushPayload { + commit := &api.PayloadCommit{ + ID: "2020558fe2e34debb818a514715839cabd25e778", + Message: "commit message", + URL: "http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778", + Author: &api.PayloadUser{ + Name: "user1", + Email: "user1@localhost", + UserName: "user1", + }, + Committer: &api.PayloadUser{ + Name: "user1", + Email: "user1@localhost", + UserName: "user1", + }, + } + + return &api.PushPayload{ + Ref: "refs/heads/test", + Before: "2020558fe2e34debb818a514715839cabd25e777", + After: "2020558fe2e34debb818a514715839cabd25e778", + CompareURL: "", + HeadCommit: commit, + Commits: []*api.PayloadCommit{commit, commit}, + Repo: &api.Repository{ + HTMLURL: "http://localhost:3000/test/repo", + Name: "repo", + FullName: "test/repo", + }, + Pusher: &api.User{ + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + Sender: &api.User{ + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + } +} + func issueTestPayload() *api.IssuePayload { return &api.IssuePayload{ Index: 2, Sender: &api.User{ - UserName: "user1", + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", }, Repository: &api.Repository{ HTMLURL: "http://localhost:3000/test/repo", @@ -20,10 +117,23 @@ func issueTestPayload() *api.IssuePayload { FullName: "test/repo", }, Issue: &api.Issue{ - ID: 2, - Index: 2, - URL: "http://localhost:3000/api/v1/repos/test/repo/issues/2", - Title: "crash", + ID: 2, + Index: 2, + URL: "http://localhost:3000/api/v1/repos/test/repo/issues/2", + HTMLURL: "http://localhost:3000/test/repo/issues/2", + Title: "crash", + Body: "issue body", + Assignees: []*api.User{ + { + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + }, + Milestone: &api.Milestone{ + ID: 1, + Title: "Milestone Title", + Description: "Milestone Description", + }, }, } } @@ -32,7 +142,8 @@ func issueCommentTestPayload() *api.IssueCommentPayload { return &api.IssueCommentPayload{ Action: api.HookIssueCommentCreated, Sender: &api.User{ - UserName: "user1", + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", }, Repository: &api.Repository{ HTMLURL: "http://localhost:3000/test/repo", @@ -45,11 +156,12 @@ func issueCommentTestPayload() *api.IssueCommentPayload { Body: "more info needed", }, Issue: &api.Issue{ - ID: 2, - Index: 2, - URL: "http://localhost:3000/api/v1/repos/test/repo/issues/2", - Title: "crash", - Body: "this happened", + ID: 2, + Index: 2, + URL: "http://localhost:3000/api/v1/repos/test/repo/issues/2", + HTMLURL: "http://localhost:3000/test/repo/issues/2", + Title: "crash", + Body: "this happened", }, } } @@ -58,7 +170,8 @@ func pullRequestCommentTestPayload() *api.IssueCommentPayload { return &api.IssueCommentPayload{ Action: api.HookIssueCommentCreated, Sender: &api.User{ - UserName: "user1", + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", }, Repository: &api.Repository{ HTMLURL: "http://localhost:3000/test/repo", @@ -66,16 +179,17 @@ func pullRequestCommentTestPayload() *api.IssueCommentPayload { FullName: "test/repo", }, Comment: &api.Comment{ - HTMLURL: "http://localhost:3000/test/repo/pulls/2#issuecomment-4", - PRURL: "http://localhost:3000/test/repo/pulls/2", + HTMLURL: "http://localhost:3000/test/repo/pulls/12#issuecomment-4", + PRURL: "http://localhost:3000/test/repo/pulls/12", Body: "changes requested", }, Issue: &api.Issue{ - ID: 2, - Index: 2, - URL: "http://localhost:3000/api/v1/repos/test/repo/issues/2", - Title: "Fix bug", - Body: "fixes bug #2", + ID: 12, + Index: 12, + URL: "http://localhost:3000/api/v1/repos/test/repo/pulls/12", + HTMLURL: "http://localhost:3000/test/repo/pulls/12", + Title: "Fix bug", + Body: "fixes bug #2", }, IsPull: true, } @@ -85,7 +199,8 @@ func pullReleaseTestPayload() *api.ReleasePayload { return &api.ReleasePayload{ Action: api.HookReleasePublished, Sender: &api.User{ - UserName: "user1", + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", }, Repository: &api.Repository{ HTMLURL: "http://localhost:3000/test/repo", @@ -96,6 +211,7 @@ func pullReleaseTestPayload() *api.ReleasePayload { TagName: "v1.0", Target: "master", Title: "First stable release", + Note: "Note of first stable release", URL: "http://localhost:3000/api/v1/repos/test/repo/releases/2", }, } @@ -104,9 +220,10 @@ func pullReleaseTestPayload() *api.ReleasePayload { func pullRequestTestPayload() *api.PullRequestPayload { return &api.PullRequestPayload{ Action: api.HookIssueOpened, - Index: 2, + Index: 12, Sender: &api.User{ - UserName: "user1", + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", }, Repository: &api.Repository{ HTMLURL: "http://localhost:3000/test/repo", @@ -114,12 +231,311 @@ func pullRequestTestPayload() *api.PullRequestPayload { FullName: "test/repo", }, PullRequest: &api.PullRequest{ - ID: 2, - Index: 2, + ID: 12, + Index: 12, URL: "http://localhost:3000/test/repo/pulls/12", + HTMLURL: "http://localhost:3000/test/repo/pulls/12", Title: "Fix bug", Body: "fixes bug #2", Mergeable: true, + Assignees: []*api.User{ + { + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + }, + Milestone: &api.Milestone{ + ID: 1, + Title: "Milestone Title", + Description: "Milestone Description", + }, + }, + Review: &api.ReviewPayload{ + Content: "good job", }, } } + +func repositoryTestPayload() *api.RepositoryPayload { + return &api.RepositoryPayload{ + Action: api.HookRepoCreated, + Sender: &api.User{ + UserName: "user1", + AvatarURL: "http://localhost:3000/user1/avatar", + }, + Repository: &api.Repository{ + HTMLURL: "http://localhost:3000/test/repo", + Name: "repo", + FullName: "test/repo", + }, + } +} + +func TestGetIssuesPayloadInfo(t *testing.T) { + p := issueTestPayload() + + cases := []struct { + action api.HookIssueAction + text string + issueTitle string + attachmentText string + color int + }{ + { + api.HookIssueOpened, + "[test/repo] Issue opened: #2 crash by user1", + "#2 crash", + "issue body", + orangeColor, + }, + { + api.HookIssueClosed, + "[test/repo] Issue closed: #2 crash by user1", + "#2 crash", + "", + redColor, + }, + { + api.HookIssueReOpened, + "[test/repo] Issue re-opened: #2 crash by user1", + "#2 crash", + "", + yellowColor, + }, + { + api.HookIssueEdited, + "[test/repo] Issue edited: #2 crash by user1", + "#2 crash", + "issue body", + yellowColor, + }, + { + api.HookIssueAssigned, + "[test/repo] Issue assigned to user1: #2 crash by user1", + "#2 crash", + "", + greenColor, + }, + { + api.HookIssueUnassigned, + "[test/repo] Issue unassigned: #2 crash by user1", + "#2 crash", + "", + yellowColor, + }, + { + api.HookIssueLabelUpdated, + "[test/repo] Issue labels updated: #2 crash by user1", + "#2 crash", + "", + yellowColor, + }, + { + api.HookIssueLabelCleared, + "[test/repo] Issue labels cleared: #2 crash by user1", + "#2 crash", + "", + yellowColor, + }, + { + api.HookIssueSynchronized, + "[test/repo] Issue synchronized: #2 crash by user1", + "#2 crash", + "", + yellowColor, + }, + { + api.HookIssueMilestoned, + "[test/repo] Issue milestoned to Milestone Title: #2 crash by user1", + "#2 crash", + "", + yellowColor, + }, + { + api.HookIssueDemilestoned, + "[test/repo] Issue milestone cleared: #2 crash by user1", + "#2 crash", + "", + yellowColor, + }, + } + + for i, c := range cases { + p.Action = c.action + text, issueTitle, attachmentText, color := getIssuesPayloadInfo(p, noneLinkFormatter, true) + assert.Equal(t, c.text, text, "case %d", i) + assert.Equal(t, c.issueTitle, issueTitle, "case %d", i) + assert.Equal(t, c.attachmentText, attachmentText, "case %d", i) + assert.Equal(t, c.color, color, "case %d", i) + } +} + +func TestGetPullRequestPayloadInfo(t *testing.T) { + p := pullRequestTestPayload() + + cases := []struct { + action api.HookIssueAction + text string + issueTitle string + attachmentText string + color int + }{ + { + api.HookIssueOpened, + "[test/repo] Pull request opened: #12 Fix bug by user1", + "#12 Fix bug", + "fixes bug #2", + greenColor, + }, + { + api.HookIssueClosed, + "[test/repo] Pull request closed: #12 Fix bug by user1", + "#12 Fix bug", + "", + redColor, + }, + { + api.HookIssueReOpened, + "[test/repo] Pull request re-opened: #12 Fix bug by user1", + "#12 Fix bug", + "", + yellowColor, + }, + { + api.HookIssueEdited, + "[test/repo] Pull request edited: #12 Fix bug by user1", + "#12 Fix bug", + "fixes bug #2", + yellowColor, + }, + { + api.HookIssueAssigned, + "[test/repo] Pull request assigned to user1: #12 Fix bug by user1", + "#12 Fix bug", + "", + greenColor, + }, + { + api.HookIssueUnassigned, + "[test/repo] Pull request unassigned: #12 Fix bug by user1", + "#12 Fix bug", + "", + yellowColor, + }, + { + api.HookIssueLabelUpdated, + "[test/repo] Pull request labels updated: #12 Fix bug by user1", + "#12 Fix bug", + "", + yellowColor, + }, + { + api.HookIssueLabelCleared, + "[test/repo] Pull request labels cleared: #12 Fix bug by user1", + "#12 Fix bug", + "", + yellowColor, + }, + { + api.HookIssueSynchronized, + "[test/repo] Pull request synchronized: #12 Fix bug by user1", + "#12 Fix bug", + "", + yellowColor, + }, + { + api.HookIssueMilestoned, + "[test/repo] Pull request milestoned to Milestone Title: #12 Fix bug by user1", + "#12 Fix bug", + "", + yellowColor, + }, + { + api.HookIssueDemilestoned, + "[test/repo] Pull request milestone cleared: #12 Fix bug by user1", + "#12 Fix bug", + "", + yellowColor, + }, + } + + for i, c := range cases { + p.Action = c.action + text, issueTitle, attachmentText, color := getPullRequestPayloadInfo(p, noneLinkFormatter, true) + assert.Equal(t, c.text, text, "case %d", i) + assert.Equal(t, c.issueTitle, issueTitle, "case %d", i) + assert.Equal(t, c.attachmentText, attachmentText, "case %d", i) + assert.Equal(t, c.color, color, "case %d", i) + } +} + +func TestGetReleasePayloadInfo(t *testing.T) { + p := pullReleaseTestPayload() + + cases := []struct { + action api.HookReleaseAction + text string + color int + }{ + { + api.HookReleasePublished, + "[test/repo] Release created: v1.0 by user1", + greenColor, + }, + { + api.HookReleaseUpdated, + "[test/repo] Release updated: v1.0 by user1", + yellowColor, + }, + { + api.HookReleaseDeleted, + "[test/repo] Release deleted: v1.0 by user1", + redColor, + }, + } + + for i, c := range cases { + p.Action = c.action + text, color := getReleasePayloadInfo(p, noneLinkFormatter, true) + assert.Equal(t, c.text, text, "case %d", i) + assert.Equal(t, c.color, color, "case %d", i) + } +} + +func TestGetIssueCommentPayloadInfo(t *testing.T) { + p := pullRequestCommentTestPayload() + + cases := []struct { + action api.HookIssueCommentAction + text string + issueTitle string + color int + }{ + { + api.HookIssueCommentCreated, + "[test/repo] New comment on pull request #12 Fix bug by user1", + "#12 Fix bug", + greenColorLight, + }, + { + api.HookIssueCommentEdited, + "[test/repo] Comment edited on pull request #12 Fix bug by user1", + "#12 Fix bug", + yellowColor, + }, + { + api.HookIssueCommentDeleted, + "[test/repo] Comment deleted on pull request #12 Fix bug by user1", + "#12 Fix bug", + redColor, + }, + } + + for i, c := range cases { + p.Action = c.action + text, issueTitle, color := getIssueCommentPayloadInfo(p, noneLinkFormatter, true) + assert.Equal(t, c.text, text, "case %d", i) + assert.Equal(t, c.issueTitle, issueTitle, "case %d", i) + assert.Equal(t, c.color, color, "case %d", i) + } +} diff --git a/services/webhook/matrix.go b/services/webhook/matrix.go index 063147198..10e0c8fd1 100644 --- a/services/webhook/matrix.go +++ b/services/webhook/matrix.go @@ -6,7 +6,6 @@ package webhook import ( "crypto/sha1" - "encoding/json" "errors" "fmt" "html" @@ -16,6 +15,7 @@ import ( "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -75,9 +75,6 @@ type MatrixPayloadSafe struct { Commits []*api.PayloadCommit `json:"io.gitea.commits,omitempty"` } -// SetSecret sets the Matrix secret -func (m *MatrixPayloadUnsafe) SetSecret(_ string) {} - // JSONPayload Marshals the MatrixPayloadUnsafe to json func (m *MatrixPayloadUnsafe) JSONPayload() ([]byte, error) { data, err := json.MarshalIndent(m, "", " ") @@ -260,7 +257,7 @@ func getMessageBody(htmlText string) string { // getMatrixHookRequest creates a new request which contains an Authorization header. // The access_token is removed from t.PayloadContent -func getMatrixHookRequest(t *models.HookTask) (*http.Request, error) { +func getMatrixHookRequest(w *models.Webhook, t *models.HookTask) (*http.Request, error) { payloadunsafe := MatrixPayloadUnsafe{} if err := json.Unmarshal([]byte(t.PayloadContent), &payloadunsafe); err != nil { log.Error("Matrix Hook delivery failed: %v", err) @@ -284,9 +281,9 @@ func getMatrixHookRequest(t *models.HookTask) (*http.Request, error) { return nil, fmt.Errorf("getMatrixHookRequest: unable to hash payload: %+v", err) } - t.URL = fmt.Sprintf("%s/%s", t.URL, txnID) + url := fmt.Sprintf("%s/%s", w.URL, txnID) - req, err := http.NewRequest(t.HTTPMethod, t.URL, strings.NewReader(string(payload))) + req, err := http.NewRequest(w.HTTPMethod, url, strings.NewReader(string(payload))) if err != nil { return nil, err } diff --git a/services/webhook/matrix_test.go b/services/webhook/matrix_test.go index 771146f2f..451dff694 100644 --- a/services/webhook/matrix_test.go +++ b/services/webhook/matrix_test.go @@ -14,74 +14,178 @@ import ( "github.com/stretchr/testify/require" ) -func TestMatrixIssuesPayloadOpened(t *testing.T) { - p := issueTestPayload() - m := new(MatrixPayloadUnsafe) +func TestMatrixPayload(t *testing.T) { + t.Run("Create", func(t *testing.T) { + p := createTestPayload() - p.Action = api.HookIssueOpened - pl, err := m.Issue(p) - require.NoError(t, err) - require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue opened: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) - assert.Equal(t, "[test/repo] Issue opened: #2 crash by user1", pl.(*MatrixPayloadUnsafe).FormattedBody) + d := new(MatrixPayloadUnsafe) + pl, err := d.Create(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) - p.Action = api.HookIssueClosed - pl, err = m.Issue(p) - require.NoError(t, err) - require.NotNil(t, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue closed: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) - assert.Equal(t, "[test/repo] Issue closed: #2 crash by user1", pl.(*MatrixPayloadUnsafe).FormattedBody) + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo):[test](http://localhost:3000/test/repo/src/branch/test)] branch created by user1", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo:test] branch created by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("Delete", func(t *testing.T) { + p := deleteTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.Delete(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo):test] branch deleted by user1", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo:test] branch deleted by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("Fork", func(t *testing.T) { + p := forkTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.Fork(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[test/repo2](http://localhost:3000/test/repo2) is forked to [test/repo](http://localhost:3000/test/repo)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `test/repo2 is forked to test/repo`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("Push", func(t *testing.T) { + p := pushTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] user1 pushed 2 commits to [test](http://localhost:3000/test/repo/src/branch/test):\n[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778): commit message - user1\n[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778): commit message - user1", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] user1 pushed 2 commits to test:
    2020558: commit message - user1
    2020558: commit message - user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("Issue", func(t *testing.T) { + p := issueTestPayload() + + d := new(MatrixPayloadUnsafe) + p.Action = api.HookIssueOpened + pl, err := d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue opened: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Issue opened: #2 crash by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + + p.Action = api.HookIssueClosed + pl, err = d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Issue closed: [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Issue closed: #2 crash by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("IssueComment", func(t *testing.T) { + p := issueCommentTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on issue [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] New comment on issue #2 crash by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("PullRequest", func(t *testing.T) { + p := pullRequestTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.PullRequest(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Pull request opened: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Pull request opened: #12 Fix bug by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("PullRequestComment", func(t *testing.T) { + p := pullRequestCommentTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on pull request [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] New comment on pull request #12 Fix bug by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("Review", func(t *testing.T) { + p := pullRequestTestPayload() + p.Action = api.HookIssueReviewed + + d := new(MatrixPayloadUnsafe) + pl, err := d.Review(p, models.HookEventPullRequestReviewApproved) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Pull request review approved: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Pull request review approved: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("Repository", func(t *testing.T) { + p := repositoryTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.Repository(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, `[[test/repo](http://localhost:3000/test/repo)] Repository created by [user1](https://try.gitea.io/user1)`, pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Repository created by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) + + t.Run("Release", func(t *testing.T) { + p := pullReleaseTestPayload() + + d := new(MatrixPayloadUnsafe) + pl, err := d.Release(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) + + assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Release created: [v1.0](http://localhost:3000/test/repo/src/v1.0) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) + assert.Equal(t, `[test/repo] Release created: v1.0 by user1`, pl.(*MatrixPayloadUnsafe).FormattedBody) + }) } -func TestMatrixIssueCommentPayload(t *testing.T) { - p := issueCommentTestPayload() - m := new(MatrixPayloadUnsafe) +func TestMatrixJSONPayload(t *testing.T) { + p := pushTestPayload() - pl, err := m.IssueComment(p) + pl, err := new(MatrixPayloadUnsafe).Push(p) require.NoError(t, err) require.NotNil(t, pl) + require.IsType(t, &MatrixPayloadUnsafe{}, pl) - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on issue [#2 crash](http://localhost:3000/test/repo/issues/2) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) - assert.Equal(t, "[test/repo] New comment on issue #2 crash by user1", pl.(*MatrixPayloadUnsafe).FormattedBody) -} - -func TestMatrixPullRequestCommentPayload(t *testing.T) { - p := pullRequestCommentTestPayload() - m := new(MatrixPayloadUnsafe) - - pl, err := m.IssueComment(p) + json, err := pl.JSONPayload() require.NoError(t, err) - require.NotNil(t, pl) - - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] New comment on pull request [#2 Fix bug](http://localhost:3000/test/repo/pulls/2) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) - assert.Equal(t, "[test/repo] New comment on pull request #2 Fix bug by user1", pl.(*MatrixPayloadUnsafe).FormattedBody) -} - -func TestMatrixReleasePayload(t *testing.T) { - p := pullReleaseTestPayload() - m := new(MatrixPayloadUnsafe) - - pl, err := m.Release(p) - require.NoError(t, err) - require.NotNil(t, pl) - - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Release created: [v1.0](http://localhost:3000/test/repo/src/v1.0) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) - assert.Equal(t, "[test/repo] Release created: v1.0 by user1", pl.(*MatrixPayloadUnsafe).FormattedBody) -} - -func TestMatrixPullRequestPayload(t *testing.T) { - p := pullRequestTestPayload() - m := new(MatrixPayloadUnsafe) - - pl, err := m.PullRequest(p) - require.NoError(t, err) - require.NotNil(t, pl) - - assert.Equal(t, "[[test/repo](http://localhost:3000/test/repo)] Pull request opened: [#2 Fix bug](http://localhost:3000/test/repo/pulls/12) by [user1](https://try.gitea.io/user1)", pl.(*MatrixPayloadUnsafe).Body) - assert.Equal(t, "[test/repo] Pull request opened: #2 Fix bug by user1", pl.(*MatrixPayloadUnsafe).FormattedBody) + assert.NotEmpty(t, json) } func TestMatrixHookRequest(t *testing.T) { + w := &models.Webhook{} + h := &models.HookTask{ PayloadContent: `{ "body": "[[user1/test](http://localhost:3000/user1/test)] user1 pushed 1 commit to [master](http://localhost:3000/user1/test/src/branch/master):\n[5175ef2](http://localhost:3000/user1/test/commit/5175ef26201c58b035a3404b3fe02b4e8d436eee): Merge pull request 'Change readme.md' (#2) from add-matrix-webhook into master\n\nReviewed-on: http://localhost:3000/user1/test/pulls/2\n - user1", @@ -143,7 +247,7 @@ func TestMatrixHookRequest(t *testing.T) { ] }` - req, err := getMatrixHookRequest(h) + req, err := getMatrixHookRequest(w, h) require.NoError(t, err) require.NotNil(t, req) diff --git a/services/webhook/msteams.go b/services/webhook/msteams.go index a68c97ea3..ed5e65905 100644 --- a/services/webhook/msteams.go +++ b/services/webhook/msteams.go @@ -5,12 +5,12 @@ package webhook import ( - "encoding/json" "fmt" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" api "code.gitea.io/gitea/modules/structs" ) @@ -55,9 +55,6 @@ type ( } ) -// SetSecret sets the MSTeams secret -func (m *MSTeamsPayload) SetSecret(_ string) {} - // JSONPayload Marshals the MSTeamsPayload to json func (m *MSTeamsPayload) JSONPayload() ([]byte, error) { data, err := json.MarshalIndent(m, "", " ") @@ -77,42 +74,15 @@ func (m *MSTeamsPayload) Create(p *api.CreatePayload) (api.Payloader, error) { refName := git.RefEndName(p.Ref) title := fmt.Sprintf("[%s] %s %s created", p.Repo.FullName, p.RefType, refName) - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", greenColor), - Title: title, - Summary: title, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repo.FullName, - }, - { - Name: fmt.Sprintf("%s:", p.RefType), - Value: refName, - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.Repo.HTMLURL + "/src/" + refName, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repo, + p.Sender, + title, + "", + p.Repo.HTMLURL+"/src/"+refName, + greenColor, + &MSTeamsFact{fmt.Sprintf("%s:", p.RefType), refName}, + ), nil } // Delete implements PayloadConvertor Delete method @@ -121,84 +91,30 @@ func (m *MSTeamsPayload) Delete(p *api.DeletePayload) (api.Payloader, error) { refName := git.RefEndName(p.Ref) title := fmt.Sprintf("[%s] %s %s deleted", p.Repo.FullName, p.RefType, refName) - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", yellowColor), - Title: title, - Summary: title, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repo.FullName, - }, - { - Name: fmt.Sprintf("%s:", p.RefType), - Value: refName, - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.Repo.HTMLURL + "/src/" + refName, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repo, + p.Sender, + title, + "", + p.Repo.HTMLURL+"/src/"+refName, + yellowColor, + &MSTeamsFact{fmt.Sprintf("%s:", p.RefType), refName}, + ), nil } // Fork implements PayloadConvertor Fork method func (m *MSTeamsPayload) Fork(p *api.ForkPayload) (api.Payloader, error) { title := fmt.Sprintf("%s is forked to %s", p.Forkee.FullName, p.Repo.FullName) - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", greenColor), - Title: title, - Summary: title, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Facts: []MSTeamsFact{ - { - Name: "Forkee:", - Value: p.Forkee.FullName, - }, - { - Name: "Repository:", - Value: p.Repo.FullName, - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.Repo.HTMLURL, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repo, + p.Sender, + title, + "", + p.Repo.HTMLURL, + greenColor, + &MSTeamsFact{"Forkee:", p.Forkee.FullName}, + ), nil } // Push implements PayloadConvertor Push method @@ -233,172 +149,60 @@ func (m *MSTeamsPayload) Push(p *api.PushPayload) (api.Payloader, error) { } } - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", greenColor), - Title: title, - Summary: title, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Text: text, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repo.FullName, - }, - { - Name: "Commit count:", - Value: fmt.Sprintf("%d", len(p.Commits)), - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: titleLink, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repo, + p.Sender, + title, + text, + titleLink, + greenColor, + &MSTeamsFact{"Commit count:", fmt.Sprintf("%d", len(p.Commits))}, + ), nil } // Issue implements PayloadConvertor Issue method func (m *MSTeamsPayload) Issue(p *api.IssuePayload) (api.Payloader, error) { - text, _, attachmentText, color := getIssuesPayloadInfo(p, noneLinkFormatter, false) + title, _, attachmentText, color := getIssuesPayloadInfo(p, noneLinkFormatter, false) - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", color), - Title: text, - Summary: text, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Text: attachmentText, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repository.FullName, - }, - { - Name: "Issue #:", - Value: fmt.Sprintf("%d", p.Issue.ID), - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.Issue.HTMLURL, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repository, + p.Sender, + title, + attachmentText, + p.Issue.HTMLURL, + color, + &MSTeamsFact{"Issue #:", fmt.Sprintf("%d", p.Issue.ID)}, + ), nil } // IssueComment implements PayloadConvertor IssueComment method func (m *MSTeamsPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) { - text, _, color := getIssueCommentPayloadInfo(p, noneLinkFormatter, false) + title, _, color := getIssueCommentPayloadInfo(p, noneLinkFormatter, false) - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", color), - Title: text, - Summary: text, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Text: p.Comment.Body, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repository.FullName, - }, - { - Name: "Issue #:", - Value: fmt.Sprintf("%d", p.Issue.ID), - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.Comment.HTMLURL, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repository, + p.Sender, + title, + p.Comment.Body, + p.Comment.HTMLURL, + color, + &MSTeamsFact{"Issue #:", fmt.Sprintf("%d", p.Issue.ID)}, + ), nil } // PullRequest implements PayloadConvertor PullRequest method func (m *MSTeamsPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) { - text, _, attachmentText, color := getPullRequestPayloadInfo(p, noneLinkFormatter, false) + title, _, attachmentText, color := getPullRequestPayloadInfo(p, noneLinkFormatter, false) - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", color), - Title: text, - Summary: text, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Text: attachmentText, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repository.FullName, - }, - { - Name: "Pull request #:", - Value: fmt.Sprintf("%d", p.PullRequest.ID), - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.PullRequest.HTMLURL, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repository, + p.Sender, + title, + attachmentText, + p.PullRequest.HTMLURL, + color, + &MSTeamsFact{"Pull request #:", fmt.Sprintf("%d", p.PullRequest.ID)}, + ), nil } // Review implements PayloadConvertor Review method @@ -427,43 +231,15 @@ func (m *MSTeamsPayload) Review(p *api.PullRequestPayload, event models.HookEven } } - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", color), - Title: title, - Summary: title, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Text: text, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repository.FullName, - }, - { - Name: "Pull request #:", - Value: fmt.Sprintf("%d", p.PullRequest.ID), - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.PullRequest.HTMLURL, - }, - }, - }, - }, - }, nil + return createMSTeamsPayload( + p.Repository, + p.Sender, + title, + text, + p.PullRequest.HTMLURL, + color, + &MSTeamsFact{"Pull request #:", fmt.Sprintf("%d", p.PullRequest.ID)}, + ), nil } // Repository implements PayloadConvertor Repository method @@ -480,6 +256,48 @@ func (m *MSTeamsPayload) Repository(p *api.RepositoryPayload) (api.Payloader, er color = yellowColor } + return createMSTeamsPayload( + p.Repository, + p.Sender, + title, + "", + url, + color, + nil, + ), nil +} + +// Release implements PayloadConvertor Release method +func (m *MSTeamsPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { + title, color := getReleasePayloadInfo(p, noneLinkFormatter, false) + + return createMSTeamsPayload( + p.Repository, + p.Sender, + title, + "", + p.Release.URL, + color, + &MSTeamsFact{"Tag:", p.Release.TagName}, + ), nil +} + +// GetMSTeamsPayload converts a MSTeams webhook into a MSTeamsPayload +func GetMSTeamsPayload(p api.Payloader, event models.HookEventType, meta string) (api.Payloader, error) { + return convertPayloader(new(MSTeamsPayload), p, event) +} + +func createMSTeamsPayload(r *api.Repository, s *api.User, title, text, actionTarget string, color int, fact *MSTeamsFact) *MSTeamsPayload { + facts := []MSTeamsFact{ + { + Name: "Repository:", + Value: r.FullName, + }, + } + if fact != nil { + facts = append(facts, *fact) + } + return &MSTeamsPayload{ Type: "MessageCard", Context: "https://schema.org/extensions", @@ -488,15 +306,11 @@ func (m *MSTeamsPayload) Repository(p *api.RepositoryPayload) (api.Payloader, er Summary: title, Sections: []MSTeamsSection{ { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repository.FullName, - }, - }, + ActivityTitle: s.FullName, + ActivitySubtitle: s.UserName, + ActivityImage: s.AvatarURL, + Text: text, + Facts: facts, }, }, PotentialAction: []MSTeamsAction{ @@ -506,58 +320,10 @@ func (m *MSTeamsPayload) Repository(p *api.RepositoryPayload) (api.Payloader, er Targets: []MSTeamsActionTarget{ { Os: "default", - URI: url, + URI: actionTarget, }, }, }, }, - }, nil -} - -// Release implements PayloadConvertor Release method -func (m *MSTeamsPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { - text, color := getReleasePayloadInfo(p, noneLinkFormatter, false) - - return &MSTeamsPayload{ - Type: "MessageCard", - Context: "https://schema.org/extensions", - ThemeColor: fmt.Sprintf("%x", color), - Title: text, - Summary: text, - Sections: []MSTeamsSection{ - { - ActivityTitle: p.Sender.FullName, - ActivitySubtitle: p.Sender.UserName, - ActivityImage: p.Sender.AvatarURL, - Text: p.Release.Note, - Facts: []MSTeamsFact{ - { - Name: "Repository:", - Value: p.Repository.FullName, - }, - { - Name: "Tag:", - Value: p.Release.TagName, - }, - }, - }, - }, - PotentialAction: []MSTeamsAction{ - { - Type: "OpenUri", - Name: "View in Gitea", - Targets: []MSTeamsActionTarget{ - { - Os: "default", - URI: p.Release.URL, - }, - }, - }, - }, - }, nil -} - -// GetMSTeamsPayload converts a MSTeams webhook into a MSTeamsPayload -func GetMSTeamsPayload(p api.Payloader, event models.HookEventType, meta string) (api.Payloader, error) { - return convertPayloader(new(MSTeamsPayload), p, event) + } } diff --git a/services/webhook/msteams_test.go b/services/webhook/msteams_test.go new file mode 100644 index 000000000..2f54c39d3 --- /dev/null +++ b/services/webhook/msteams_test.go @@ -0,0 +1,374 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package webhook + +import ( + "testing" + + "code.gitea.io/gitea/models" + api "code.gitea.io/gitea/modules/structs" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +func TestMSTeamsPayload(t *testing.T) { + t.Run("Create", func(t *testing.T) { + p := createTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.Create(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] branch test created", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] branch test created", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Empty(t, pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repo.FullName, fact.Value) + } else if fact.Name == "branch:" { + assert.Equal(t, "test", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("Delete", func(t *testing.T) { + p := deleteTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.Delete(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] branch test deleted", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] branch test deleted", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Empty(t, pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repo.FullName, fact.Value) + } else if fact.Name == "branch:" { + assert.Equal(t, "test", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("Fork", func(t *testing.T) { + p := forkTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.Fork(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "test/repo2 is forked to test/repo", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "test/repo2 is forked to test/repo", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Empty(t, pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repo.FullName, fact.Value) + } else if fact.Name == "Forkee:" { + assert.Equal(t, p.Forkee.FullName, fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("Push", func(t *testing.T) { + p := pushTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo:test] 2 new commits", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo:test] 2 new commits", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1\n\n[2020558](http://localhost:3000/test/repo/commit/2020558fe2e34debb818a514715839cabd25e778) commit message - user1", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repo.FullName, fact.Value) + } else if fact.Name == "Commit count:" { + assert.Equal(t, "2", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/src/test", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("Issue", func(t *testing.T) { + p := issueTestPayload() + + d := new(MSTeamsPayload) + p.Action = api.HookIssueOpened + pl, err := d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Issue opened: #2 crash", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Issue opened: #2 crash", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "issue body", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else if fact.Name == "Issue #:" { + assert.Equal(t, "2", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + + p.Action = api.HookIssueClosed + pl, err = d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Issue closed: #2 crash", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Issue closed: #2 crash", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Empty(t, pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else if fact.Name == "Issue #:" { + assert.Equal(t, "2", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("IssueComment", func(t *testing.T) { + p := issueCommentTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] New comment on issue #2 crash", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] New comment on issue #2 crash", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "more info needed", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else if fact.Name == "Issue #:" { + assert.Equal(t, "2", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/issues/2#issuecomment-4", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("PullRequest", func(t *testing.T) { + p := pullRequestTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.PullRequest(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Pull request opened: #12 Fix bug", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Pull request opened: #12 Fix bug", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "fixes bug #2", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else if fact.Name == "Pull request #:" { + assert.Equal(t, "12", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("PullRequestComment", func(t *testing.T) { + p := pullRequestCommentTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] New comment on pull request #12 Fix bug", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] New comment on pull request #12 Fix bug", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "changes requested", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else if fact.Name == "Issue #:" { + assert.Equal(t, "12", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12#issuecomment-4", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("Review", func(t *testing.T) { + p := pullRequestTestPayload() + p.Action = api.HookIssueReviewed + + d := new(MSTeamsPayload) + pl, err := d.Review(p, models.HookEventPullRequestReviewApproved) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Pull request review approved: #12 Fix bug", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Pull request review approved: #12 Fix bug", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Equal(t, "good job", pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else if fact.Name == "Pull request #:" { + assert.Equal(t, "12", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo/pulls/12", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("Repository", func(t *testing.T) { + p := repositoryTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.Repository(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Repository created", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Repository created", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Empty(t, pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 1) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/test/repo", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) + + t.Run("Release", func(t *testing.T) { + p := pullReleaseTestPayload() + + d := new(MSTeamsPayload) + pl, err := d.Release(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + assert.Equal(t, "[test/repo] Release created: v1.0", pl.(*MSTeamsPayload).Title) + assert.Equal(t, "[test/repo] Release created: v1.0", pl.(*MSTeamsPayload).Summary) + assert.Len(t, pl.(*MSTeamsPayload).Sections, 1) + assert.Equal(t, "user1", pl.(*MSTeamsPayload).Sections[0].ActivitySubtitle) + assert.Empty(t, pl.(*MSTeamsPayload).Sections[0].Text) + assert.Len(t, pl.(*MSTeamsPayload).Sections[0].Facts, 2) + for _, fact := range pl.(*MSTeamsPayload).Sections[0].Facts { + if fact.Name == "Repository:" { + assert.Equal(t, p.Repository.FullName, fact.Value) + } else if fact.Name == "Tag:" { + assert.Equal(t, "v1.0", fact.Value) + } else { + t.Fail() + } + } + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction, 1) + assert.Len(t, pl.(*MSTeamsPayload).PotentialAction[0].Targets, 1) + assert.Equal(t, "http://localhost:3000/api/v1/repos/test/repo/releases/2", pl.(*MSTeamsPayload).PotentialAction[0].Targets[0].URI) + }) +} + +func TestMSTeamsJSONPayload(t *testing.T) { + p := pushTestPayload() + + pl, err := new(MSTeamsPayload).Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &MSTeamsPayload{}, pl) + + json, err := pl.JSONPayload() + require.NoError(t, err) + assert.NotEmpty(t, json) +} diff --git a/services/webhook/slack.go b/services/webhook/slack.go index aaecad6c6..803b5de0b 100644 --- a/services/webhook/slack.go +++ b/services/webhook/slack.go @@ -5,13 +5,13 @@ package webhook import ( - "encoding/json" "errors" "fmt" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" @@ -55,9 +55,6 @@ type SlackAttachment struct { Text string `json:"text"` } -// SetSecret sets the slack secret -func (s *SlackPayload) SetSecret(_ string) {} - // JSONPayload Marshals the SlackPayload to json func (s *SlackPayload) JSONPayload() ([]byte, error) { data, err := json.MarshalIndent(s, "", " ") @@ -109,12 +106,7 @@ func (s *SlackPayload) Create(p *api.CreatePayload) (api.Payloader, error) { refLink := SlackLinkToRef(p.Repo.HTMLURL, p.Ref) text := fmt.Sprintf("[%s:%s] %s created by %s", repoLink, refLink, p.RefType, p.Sender.UserName) - return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - }, nil + return s.createPayload(text, nil), nil } // Delete composes Slack payload for delete a branch or tag. @@ -122,12 +114,8 @@ func (s *SlackPayload) Delete(p *api.DeletePayload) (api.Payloader, error) { refName := git.RefEndName(p.Ref) repoLink := SlackLinkFormatter(p.Repo.HTMLURL, p.Repo.FullName) text := fmt.Sprintf("[%s:%s] %s deleted by %s", repoLink, refName, p.RefType, p.Sender.UserName) - return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - }, nil + + return s.createPayload(text, nil), nil } // Fork composes Slack payload for forked by a repository. @@ -135,66 +123,46 @@ func (s *SlackPayload) Fork(p *api.ForkPayload) (api.Payloader, error) { baseLink := SlackLinkFormatter(p.Forkee.HTMLURL, p.Forkee.FullName) forkLink := SlackLinkFormatter(p.Repo.HTMLURL, p.Repo.FullName) text := fmt.Sprintf("%s is forked to %s", baseLink, forkLink) - return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - }, nil + + return s.createPayload(text, nil), nil } // Issue implements PayloadConvertor Issue method func (s *SlackPayload) Issue(p *api.IssuePayload) (api.Payloader, error) { text, issueTitle, attachmentText, color := getIssuesPayloadInfo(p, SlackLinkFormatter, true) - pl := &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - } + var attachments []SlackAttachment if attachmentText != "" { attachmentText = SlackTextFormatter(attachmentText) issueTitle = SlackTextFormatter(issueTitle) - pl.Attachments = []SlackAttachment{{ + attachments = append(attachments, SlackAttachment{ Color: fmt.Sprintf("%x", color), Title: issueTitle, TitleLink: p.Issue.HTMLURL, Text: attachmentText, - }} + }) } - return pl, nil + return s.createPayload(text, attachments), nil } // IssueComment implements PayloadConvertor IssueComment method func (s *SlackPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) { text, issueTitle, color := getIssueCommentPayloadInfo(p, SlackLinkFormatter, true) - return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - Attachments: []SlackAttachment{{ - Color: fmt.Sprintf("%x", color), - Title: issueTitle, - TitleLink: p.Comment.HTMLURL, - Text: SlackTextFormatter(p.Comment.Body), - }}, - }, nil + return s.createPayload(text, []SlackAttachment{{ + Color: fmt.Sprintf("%x", color), + Title: issueTitle, + TitleLink: p.Comment.HTMLURL, + Text: SlackTextFormatter(p.Comment.Body), + }}), nil } // Release implements PayloadConvertor Release method func (s *SlackPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, SlackLinkFormatter, true) - return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - }, nil + return s.createPayload(text, nil), nil } // Push implements PayloadConvertor Push method @@ -230,42 +198,31 @@ func (s *SlackPayload) Push(p *api.PushPayload) (api.Payloader, error) { } } - return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - Attachments: []SlackAttachment{{ - Color: s.Color, - Title: p.Repo.HTMLURL, - TitleLink: p.Repo.HTMLURL, - Text: attachmentText, - }}, - }, nil + return s.createPayload(text, []SlackAttachment{{ + Color: s.Color, + Title: p.Repo.HTMLURL, + TitleLink: p.Repo.HTMLURL, + Text: attachmentText, + }}), nil } // PullRequest implements PayloadConvertor PullRequest method func (s *SlackPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) { text, issueTitle, attachmentText, color := getPullRequestPayloadInfo(p, SlackLinkFormatter, true) - pl := &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - } + var attachments []SlackAttachment if attachmentText != "" { attachmentText = SlackTextFormatter(p.PullRequest.Body) issueTitle = SlackTextFormatter(issueTitle) - pl.Attachments = []SlackAttachment{{ + attachments = append(attachments, SlackAttachment{ Color: fmt.Sprintf("%x", color), Title: issueTitle, TitleLink: p.PullRequest.URL, Text: attachmentText, - }} + }) } - return pl, nil + return s.createPayload(text, attachments), nil } // Review implements PayloadConvertor Review method @@ -286,12 +243,7 @@ func (s *SlackPayload) Review(p *api.PullRequestPayload, event models.HookEventT text = fmt.Sprintf("[%s] Pull request review %s: [%s](%s) by %s", repoLink, action, title, titleLink, senderLink) } - return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - }, nil + return s.createPayload(text, nil), nil } // Repository implements PayloadConvertor Repository method @@ -307,12 +259,17 @@ func (s *SlackPayload) Repository(p *api.RepositoryPayload) (api.Payloader, erro text = fmt.Sprintf("[%s] Repository deleted by %s", repoLink, senderLink) } + return s.createPayload(text, nil), nil +} + +func (s *SlackPayload) createPayload(text string, attachments []SlackAttachment) *SlackPayload { return &SlackPayload{ - Channel: s.Channel, - Text: text, - Username: s.Username, - IconURL: s.IconURL, - }, nil + Channel: s.Channel, + Text: text, + Username: s.Username, + IconURL: s.IconURL, + Attachments: attachments, + } } // GetSlackPayload converts a slack webhook into a SlackPayload diff --git a/services/webhook/slack_test.go b/services/webhook/slack_test.go index 20de80bd6..3f279810c 100644 --- a/services/webhook/slack_test.go +++ b/services/webhook/slack_test.go @@ -7,74 +7,166 @@ package webhook import ( "testing" + "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestSlackIssuesPayloadOpened(t *testing.T) { - p := issueTestPayload() - p.Action = api.HookIssueOpened +func TestSlackPayload(t *testing.T) { + t.Run("Create", func(t *testing.T) { + p := createTestPayload() - s := new(SlackPayload) - s.Username = p.Sender.UserName + d := new(SlackPayload) + pl, err := d.Create(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) - pl, err := s.Issue(p) - require.NoError(t, err) - require.NotNil(t, pl) - assert.Equal(t, "[] Issue opened: by ", pl.(*SlackPayload).Text) + assert.Equal(t, "[:] branch created by user1", pl.(*SlackPayload).Text) + }) - p.Action = api.HookIssueClosed - pl, err = s.Issue(p) - require.NoError(t, err) - require.NotNil(t, pl) - assert.Equal(t, "[] Issue closed: by ", pl.(*SlackPayload).Text) + t.Run("Delete", func(t *testing.T) { + p := deleteTestPayload() + + d := new(SlackPayload) + pl, err := d.Delete(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[:test] branch deleted by user1", pl.(*SlackPayload).Text) + }) + + t.Run("Fork", func(t *testing.T) { + p := forkTestPayload() + + d := new(SlackPayload) + pl, err := d.Fork(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, " is forked to ", pl.(*SlackPayload).Text) + }) + + t.Run("Push", func(t *testing.T) { + p := pushTestPayload() + + d := new(SlackPayload) + pl, err := d.Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[:] 2 new commits pushed by user1", pl.(*SlackPayload).Text) + }) + + t.Run("Issue", func(t *testing.T) { + p := issueTestPayload() + + d := new(SlackPayload) + p.Action = api.HookIssueOpened + pl, err := d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Issue opened: by ", pl.(*SlackPayload).Text) + + p.Action = api.HookIssueClosed + pl, err = d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Issue closed: by ", pl.(*SlackPayload).Text) + }) + + t.Run("IssueComment", func(t *testing.T) { + p := issueCommentTestPayload() + + d := new(SlackPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] New comment on issue by ", pl.(*SlackPayload).Text) + }) + + t.Run("PullRequest", func(t *testing.T) { + p := pullRequestTestPayload() + + d := new(SlackPayload) + pl, err := d.PullRequest(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Pull request opened: by ", pl.(*SlackPayload).Text) + }) + + t.Run("PullRequestComment", func(t *testing.T) { + p := pullRequestCommentTestPayload() + + d := new(SlackPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] New comment on pull request by ", pl.(*SlackPayload).Text) + }) + + t.Run("Review", func(t *testing.T) { + p := pullRequestTestPayload() + p.Action = api.HookIssueReviewed + + d := new(SlackPayload) + pl, err := d.Review(p, models.HookEventPullRequestReviewApproved) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Pull request review approved: [#12 Fix bug](http://localhost:3000/test/repo/pulls/12) by ", pl.(*SlackPayload).Text) + }) + + t.Run("Repository", func(t *testing.T) { + p := repositoryTestPayload() + + d := new(SlackPayload) + pl, err := d.Repository(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Repository created by ", pl.(*SlackPayload).Text) + }) + + t.Run("Release", func(t *testing.T) { + p := pullReleaseTestPayload() + + d := new(SlackPayload) + pl, err := d.Release(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) + + assert.Equal(t, "[] Release created: by ", pl.(*SlackPayload).Text) + }) } -func TestSlackIssueCommentPayload(t *testing.T) { - p := issueCommentTestPayload() - s := new(SlackPayload) - s.Username = p.Sender.UserName +func TestSlackJSONPayload(t *testing.T) { + p := pushTestPayload() - pl, err := s.IssueComment(p) + pl, err := new(SlackPayload).Push(p) require.NoError(t, err) require.NotNil(t, pl) + require.IsType(t, &SlackPayload{}, pl) - assert.Equal(t, "[] New comment on issue by ", pl.(*SlackPayload).Text) -} - -func TestSlackPullRequestCommentPayload(t *testing.T) { - p := pullRequestCommentTestPayload() - s := new(SlackPayload) - s.Username = p.Sender.UserName - - pl, err := s.IssueComment(p) + json, err := pl.JSONPayload() require.NoError(t, err) - require.NotNil(t, pl) - - assert.Equal(t, "[] New comment on pull request by ", pl.(*SlackPayload).Text) -} - -func TestSlackReleasePayload(t *testing.T) { - p := pullReleaseTestPayload() - s := new(SlackPayload) - s.Username = p.Sender.UserName - - pl, err := s.Release(p) - require.NoError(t, err) - require.NotNil(t, pl) - - assert.Equal(t, "[] Release created: by ", pl.(*SlackPayload).Text) -} - -func TestSlackPullRequestPayload(t *testing.T) { - p := pullRequestTestPayload() - s := new(SlackPayload) - s.Username = p.Sender.UserName - - pl, err := s.PullRequest(p) - require.NoError(t, err) - require.NotNil(t, pl) - - assert.Equal(t, "[] Pull request opened: by ", pl.(*SlackPayload).Text) + assert.NotEmpty(t, json) } diff --git a/services/webhook/telegram.go b/services/webhook/telegram.go index 84fc21004..c5a26f687 100644 --- a/services/webhook/telegram.go +++ b/services/webhook/telegram.go @@ -5,12 +5,12 @@ package webhook import ( - "encoding/json" "fmt" "strings" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" "code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/markup" api "code.gitea.io/gitea/modules/structs" @@ -44,9 +44,6 @@ var ( _ PayloadConvertor = &TelegramPayload{} ) -// SetSecret sets the telegram secret -func (t *TelegramPayload) SetSecret(_ string) {} - // JSONPayload Marshals the TelegramPayload to json func (t *TelegramPayload) JSONPayload() ([]byte, error) { t.ParseMode = "HTML" @@ -66,9 +63,7 @@ func (t *TelegramPayload) Create(p *api.CreatePayload) (api.Payloader, error) { title := fmt.Sprintf(`[%s] %s %s created`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType, p.Repo.HTMLURL+"/src/"+refName, refName) - return &TelegramPayload{ - Message: title, - }, nil + return createTelegramPayload(title), nil } // Delete implements PayloadConvertor Delete method @@ -78,18 +73,14 @@ func (t *TelegramPayload) Delete(p *api.DeletePayload) (api.Payloader, error) { title := fmt.Sprintf(`[%s] %s %s deleted`, p.Repo.HTMLURL, p.Repo.FullName, p.RefType, p.Repo.HTMLURL+"/src/"+refName, refName) - return &TelegramPayload{ - Message: title, - }, nil + return createTelegramPayload(title), nil } // Fork implements PayloadConvertor Fork method func (t *TelegramPayload) Fork(p *api.ForkPayload) (api.Payloader, error) { title := fmt.Sprintf(`%s is forked to %s`, p.Forkee.FullName, p.Repo.HTMLURL, p.Repo.FullName) - return &TelegramPayload{ - Message: title, - }, nil + return createTelegramPayload(title), nil } // Push implements PayloadConvertor Push method @@ -127,36 +118,28 @@ func (t *TelegramPayload) Push(p *api.PushPayload) (api.Payloader, error) { } } - return &TelegramPayload{ - Message: title + "\n" + text, - }, nil + return createTelegramPayload(title + "\n" + text), nil } // Issue implements PayloadConvertor Issue method func (t *TelegramPayload) Issue(p *api.IssuePayload) (api.Payloader, error) { text, _, attachmentText, _ := getIssuesPayloadInfo(p, htmlLinkFormatter, true) - return &TelegramPayload{ - Message: text + "\n\n" + attachmentText, - }, nil + return createTelegramPayload(text + "\n\n" + attachmentText), nil } // IssueComment implements PayloadConvertor IssueComment method func (t *TelegramPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) { text, _, _ := getIssueCommentPayloadInfo(p, htmlLinkFormatter, true) - return &TelegramPayload{ - Message: text + "\n" + p.Comment.Body, - }, nil + return createTelegramPayload(text + "\n" + p.Comment.Body), nil } // PullRequest implements PayloadConvertor PullRequest method func (t *TelegramPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) { text, _, attachmentText, _ := getPullRequestPayloadInfo(p, htmlLinkFormatter, true) - return &TelegramPayload{ - Message: text + "\n" + attachmentText, - }, nil + return createTelegramPayload(text + "\n" + attachmentText), nil } // Review implements PayloadConvertor Review method @@ -171,12 +154,9 @@ func (t *TelegramPayload) Review(p *api.PullRequestPayload, event models.HookEve text = fmt.Sprintf("[%s] Pull request review %s: #%d %s", p.Repository.FullName, action, p.Index, p.PullRequest.Title) attachmentText = p.Review.Content - } - return &TelegramPayload{ - Message: text + "\n" + attachmentText, - }, nil + return createTelegramPayload(text + "\n" + attachmentText), nil } // Repository implements PayloadConvertor Repository method @@ -185,14 +165,10 @@ func (t *TelegramPayload) Repository(p *api.RepositoryPayload) (api.Payloader, e switch p.Action { case api.HookRepoCreated: title = fmt.Sprintf(`[%s] Repository created`, p.Repository.HTMLURL, p.Repository.FullName) - return &TelegramPayload{ - Message: title, - }, nil + return createTelegramPayload(title), nil case api.HookRepoDeleted: title = fmt.Sprintf("[%s] Repository deleted", p.Repository.FullName) - return &TelegramPayload{ - Message: title, - }, nil + return createTelegramPayload(title), nil } return nil, nil } @@ -201,12 +177,16 @@ func (t *TelegramPayload) Repository(p *api.RepositoryPayload) (api.Payloader, e func (t *TelegramPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { text, _ := getReleasePayloadInfo(p, htmlLinkFormatter, true) - return &TelegramPayload{ - Message: text + "\n", - }, nil + return createTelegramPayload(text), nil } // GetTelegramPayload converts a telegram webhook into a TelegramPayload func GetTelegramPayload(p api.Payloader, event models.HookEventType, meta string) (api.Payloader, error) { return convertPayloader(new(TelegramPayload), p, event) } + +func createTelegramPayload(message string) *TelegramPayload { + return &TelegramPayload{ + Message: strings.TrimSpace(message), + } +} diff --git a/services/webhook/telegram_test.go b/services/webhook/telegram_test.go index 0e909343a..037a2481d 100644 --- a/services/webhook/telegram_test.go +++ b/services/webhook/telegram_test.go @@ -7,18 +7,166 @@ package webhook import ( "testing" + "code.gitea.io/gitea/models" api "code.gitea.io/gitea/modules/structs" + "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) -func TestGetTelegramIssuesPayload(t *testing.T) { - p := issueTestPayload() - p.Action = api.HookIssueClosed +func TestTelegramPayload(t *testing.T) { + t.Run("Create", func(t *testing.T) { + p := createTestPayload() - pl, err := new(TelegramPayload).Issue(p) + d := new(TelegramPayload) + pl, err := d.Create(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] branch test created`, pl.(*TelegramPayload).Message) + }) + + t.Run("Delete", func(t *testing.T) { + p := deleteTestPayload() + + d := new(TelegramPayload) + pl, err := d.Delete(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] branch test deleted`, pl.(*TelegramPayload).Message) + }) + + t.Run("Fork", func(t *testing.T) { + p := forkTestPayload() + + d := new(TelegramPayload) + pl, err := d.Fork(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `test/repo2 is forked to test/repo`, pl.(*TelegramPayload).Message) + }) + + t.Run("Push", func(t *testing.T) { + p := pushTestPayload() + + d := new(TelegramPayload) + pl, err := d.Push(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, "[test/repo:test] 2 new commits\n[2020558] commit message - user1\n[2020558] commit message - user1", pl.(*TelegramPayload).Message) + }) + + t.Run("Issue", func(t *testing.T) { + p := issueTestPayload() + + d := new(TelegramPayload) + p.Action = api.HookIssueOpened + pl, err := d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, "[test/repo] Issue opened: #2 crash by user1\n\nissue body", pl.(*TelegramPayload).Message) + + p.Action = api.HookIssueClosed + pl, err = d.Issue(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] Issue closed: #2 crash by user1`, pl.(*TelegramPayload).Message) + }) + + t.Run("IssueComment", func(t *testing.T) { + p := issueCommentTestPayload() + + d := new(TelegramPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, "[test/repo] New comment on issue #2 crash by user1\nmore info needed", pl.(*TelegramPayload).Message) + }) + + t.Run("PullRequest", func(t *testing.T) { + p := pullRequestTestPayload() + + d := new(TelegramPayload) + pl, err := d.PullRequest(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, "[test/repo] Pull request opened: #12 Fix bug by user1\nfixes bug #2", pl.(*TelegramPayload).Message) + }) + + t.Run("PullRequestComment", func(t *testing.T) { + p := pullRequestCommentTestPayload() + + d := new(TelegramPayload) + pl, err := d.IssueComment(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, "[test/repo] New comment on pull request #12 Fix bug by user1\nchanges requested", pl.(*TelegramPayload).Message) + }) + + t.Run("Review", func(t *testing.T) { + p := pullRequestTestPayload() + p.Action = api.HookIssueReviewed + + d := new(TelegramPayload) + pl, err := d.Review(p, models.HookEventPullRequestReviewApproved) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, "[test/repo] Pull request review approved: #12 Fix bug\ngood job", pl.(*TelegramPayload).Message) + }) + + t.Run("Repository", func(t *testing.T) { + p := repositoryTestPayload() + + d := new(TelegramPayload) + pl, err := d.Repository(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] Repository created`, pl.(*TelegramPayload).Message) + }) + + t.Run("Release", func(t *testing.T) { + p := pullReleaseTestPayload() + + d := new(TelegramPayload) + pl, err := d.Release(p) + require.NoError(t, err) + require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) + + assert.Equal(t, `[test/repo] Release created: v1.0 by user1`, pl.(*TelegramPayload).Message) + }) +} + +func TestTelegramJSONPayload(t *testing.T) { + p := pushTestPayload() + + pl, err := new(TelegramPayload).Push(p) require.NoError(t, err) require.NotNil(t, pl) + require.IsType(t, &TelegramPayload{}, pl) - assert.Equal(t, "[test/repo] Issue closed: #2 crash by user1\n\n", pl.(*TelegramPayload).Message) + json, err := pl.JSONPayload() + require.NoError(t, err) + assert.NotEmpty(t, json) } diff --git a/services/webhook/webhook.go b/services/webhook/webhook.go index 7b6bc555f..00b2ef05b 100644 --- a/services/webhook/webhook.go +++ b/services/webhook/webhook.go @@ -5,9 +5,6 @@ package webhook import ( - "crypto/hmac" - "crypto/sha256" - "encoding/hex" "fmt" "strings" @@ -17,16 +14,18 @@ import ( "code.gitea.io/gitea/modules/setting" api "code.gitea.io/gitea/modules/structs" "code.gitea.io/gitea/modules/sync" + "code.gitea.io/gitea/modules/util" + "github.com/gobwas/glob" ) type webhook struct { - name models.HookTaskType + name models.HookType payloadCreator func(p api.Payloader, event models.HookEventType, meta string) (api.Payloader, error) } var ( - webhooks = map[models.HookTaskType]*webhook{ + webhooks = map[models.HookType]*webhook{ models.SLACK: { name: models.SLACK, payloadCreator: GetSlackPayload, @@ -55,12 +54,16 @@ var ( name: models.MATRIX, payloadCreator: GetMatrixPayload, }, + models.WECHATWORK: { + name: models.WECHATWORK, + payloadCreator: GetWechatworkPayload, + }, } ) // RegisterWebhook registers a webhook func RegisterWebhook(name string, webhook *webhook) { - webhooks[models.HookTaskType(name)] = webhook + webhooks[models.HookType(name)] = webhook } // IsValidHookTaskType returns true if a webhook registered @@ -68,7 +71,7 @@ func IsValidHookTaskType(name string) bool { if name == models.GITEA || name == models.GOGS { return true } - _, ok := webhooks[models.HookTaskType(name)] + _, ok := webhooks[models.HookType(name)] return ok } @@ -120,11 +123,18 @@ func checkBranch(w *models.Webhook, branch string) bool { } func prepareWebhook(w *models.Webhook, repo *models.Repository, event models.HookEventType, p api.Payloader) error { + // Skip sending if webhooks are disabled. + if setting.DisableWebhooks { + return nil + } + for _, e := range w.EventCheckers() { if event == e.Type { if !e.Has() { return nil } + + break } } @@ -154,35 +164,14 @@ func prepareWebhook(w *models.Webhook, repo *models.Repository, event models.Hoo return fmt.Errorf("create payload for %s[%s]: %v", w.Type, event, err) } } else { - p.SetSecret(w.Secret) payloader = p } - var signature string - if len(w.Secret) > 0 { - data, err := payloader.JSONPayload() - if err != nil { - log.Error("prepareWebhooks.JSONPayload: %v", err) - } - sig := hmac.New(sha256.New, []byte(w.Secret)) - _, err = sig.Write(data) - if err != nil { - log.Error("prepareWebhooks.sigWrite: %v", err) - } - signature = hex.EncodeToString(sig.Sum(nil)) - } - if err = models.CreateHookTask(&models.HookTask{ - RepoID: repo.ID, - HookID: w.ID, - Typ: w.Type, - URL: w.URL, - Signature: signature, - Payloader: payloader, - HTTPMethod: w.HTTPMethod, - ContentType: w.ContentType, - EventType: event, - IsSSL: w.IsSSL, + RepoID: repo.ID, + HookID: w.ID, + Payloader: payloader, + EventType: event, }); err != nil { return fmt.Errorf("CreateHookTask: %v", err) } @@ -200,7 +189,10 @@ func PrepareWebhooks(repo *models.Repository, event models.HookEventType, p api. } func prepareWebhooks(repo *models.Repository, event models.HookEventType, p api.Payloader) error { - ws, err := models.GetActiveWebhooksByRepoID(repo.ID) + ws, err := models.ListWebhooksByOpts(&models.ListWebhookOptions{ + RepoID: repo.ID, + IsActive: util.OptionalBoolTrue, + }) if err != nil { return fmt.Errorf("GetActiveWebhooksByRepoID: %v", err) } @@ -208,7 +200,10 @@ func prepareWebhooks(repo *models.Repository, event models.HookEventType, p api. // check if repo belongs to org and append additional webhooks if repo.MustOwner().IsOrganization() { // get hooks for org - orgHooks, err := models.GetActiveWebhooksByOrgID(repo.OwnerID) + orgHooks, err := models.ListWebhooksByOpts(&models.ListWebhookOptions{ + OrgID: repo.OwnerID, + IsActive: util.OptionalBoolTrue, + }) if err != nil { return fmt.Errorf("GetActiveWebhooksByOrgID: %v", err) } diff --git a/services/webhook/wechatwork.go b/services/webhook/wechatwork.go new file mode 100644 index 000000000..08c77ff2a --- /dev/null +++ b/services/webhook/wechatwork.go @@ -0,0 +1,188 @@ +// Copyright 2021 The Gitea Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package webhook + +import ( + "fmt" + "strings" + + "code.gitea.io/gitea/models" + "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/json" + api "code.gitea.io/gitea/modules/structs" +) + +type ( + // WechatworkPayload represents + WechatworkPayload struct { + Msgtype string `json:"msgtype"` + Text struct { + Content string `json:"content"` + MentionedList []string `json:"mentioned_list"` + MentionedMobileList []string `json:"mentioned_mobile_list"` + } `json:"text"` + Markdown struct { + Content string `json:"content"` + } `json:"markdown"` + } +) + +// SetSecret sets the Wechatwork secret +func (f *WechatworkPayload) SetSecret(_ string) {} + +// JSONPayload Marshals the WechatworkPayload to json +func (f *WechatworkPayload) JSONPayload() ([]byte, error) { + data, err := json.MarshalIndent(f, "", " ") + if err != nil { + return []byte{}, err + } + return data, nil +} + +func newWechatworkMarkdownPayload(title string) *WechatworkPayload { + return &WechatworkPayload{ + Msgtype: "markdown", + Markdown: struct { + Content string `json:"content"` + }{ + Content: title, + }, + } +} + +var ( + _ PayloadConvertor = &WechatworkPayload{} +) + +// Create implements PayloadConvertor Create method +func (f *WechatworkPayload) Create(p *api.CreatePayload) (api.Payloader, error) { + // created tag/branch + refName := git.RefEndName(p.Ref) + title := fmt.Sprintf("[%s] %s %s created", p.Repo.FullName, p.RefType, refName) + + return newWechatworkMarkdownPayload(title), nil +} + +// Delete implements PayloadConvertor Delete method +func (f *WechatworkPayload) Delete(p *api.DeletePayload) (api.Payloader, error) { + // created tag/branch + refName := git.RefEndName(p.Ref) + title := fmt.Sprintf("[%s] %s %s deleted", p.Repo.FullName, p.RefType, refName) + + return newWechatworkMarkdownPayload(title), nil + +} + +// Fork implements PayloadConvertor Fork method +func (f *WechatworkPayload) Fork(p *api.ForkPayload) (api.Payloader, error) { + + title := fmt.Sprintf("%s is forked to %s", p.Forkee.FullName, p.Repo.FullName) + + return newWechatworkMarkdownPayload(title), nil +} + +// Push implements PayloadConvertor Push method +func (f *WechatworkPayload) Push(p *api.PushPayload) (api.Payloader, error) { + var ( + branchName = git.RefEndName(p.Ref) + commitDesc string + ) + + title := fmt.Sprintf("# %s:%s %s ", p.Repo.FullName, branchName, commitDesc) + + var text string + // for each commit, generate attachment text + for i, commit := range p.Commits { + var authorName string + if commit.Author != nil { + authorName = "Author:" + commit.Author.Name + } + + message := strings.ReplaceAll(commit.Message, "\n\n", "\r\n") + text += fmt.Sprintf(" > [%s](%s) \r\n >%s \n >%s", commit.ID[:7], commit.URL, + message, authorName) + + // add linebreak to each commit but the last + if i < len(p.Commits)-1 { + text += "\n" + } + } + return newWechatworkMarkdownPayload(title + "\r\n\r\n" + text), nil + +} + +// Issue implements PayloadConvertor Issue method +func (f *WechatworkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) { + text, issueTitle, attachmentText, _ := getIssuesPayloadInfo(p, noneLinkFormatter, true) + var content string + content += fmt.Sprintf(" >%s\n >%s \n > %s", text, attachmentText, issueTitle) + + return newWechatworkMarkdownPayload(content), nil + +} + +// IssueComment implements PayloadConvertor IssueComment method +func (f *WechatworkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) { + text, issueTitle, _ := getIssueCommentPayloadInfo(p, noneLinkFormatter, true) + var content string + content += fmt.Sprintf(" >%s\n >%s \n >%s", text, p.Comment.Body, issueTitle) + + return newWechatworkMarkdownPayload(content), nil + +} + +// PullRequest implements PayloadConvertor PullRequest method +func (f *WechatworkPayload) PullRequest(p *api.PullRequestPayload) (api.Payloader, error) { + text, issueTitle, attachmentText, _ := getPullRequestPayloadInfo(p, noneLinkFormatter, true) + pr := fmt.Sprintf("> %s \r\n > %s \r\n > %s \r\n", + text, issueTitle, attachmentText) + + return newWechatworkMarkdownPayload(pr), nil + +} + +// Review implements PayloadConvertor Review method +func (f *WechatworkPayload) Review(p *api.PullRequestPayload, event models.HookEventType) (api.Payloader, error) { + var text, title string + switch p.Action { + case api.HookIssueSynchronized: + action, err := parseHookPullRequestEventType(event) + if err != nil { + return nil, err + } + title = fmt.Sprintf("[%s] Pull request review %s : #%d %s", p.Repository.FullName, action, p.Index, p.PullRequest.Title) + text = p.Review.Content + } + + return newWechatworkMarkdownPayload("# " + title + "\r\n\r\n >" + text), nil + +} + +// Repository implements PayloadConvertor Repository method +func (f *WechatworkPayload) Repository(p *api.RepositoryPayload) (api.Payloader, error) { + var title string + switch p.Action { + case api.HookRepoCreated: + title = fmt.Sprintf("[%s] Repository created", p.Repository.FullName) + return newWechatworkMarkdownPayload(title), nil + case api.HookRepoDeleted: + title = fmt.Sprintf("[%s] Repository deleted", p.Repository.FullName) + return newWechatworkMarkdownPayload(title), nil + } + + return nil, nil +} + +// Release implements PayloadConvertor Release method +func (f *WechatworkPayload) Release(p *api.ReleasePayload) (api.Payloader, error) { + text, _ := getReleasePayloadInfo(p, noneLinkFormatter, true) + + return newWechatworkMarkdownPayload(text), nil +} + +// GetWechatworkPayload GetWechatworkPayload converts a ding talk webhook into a WechatworkPayload +func GetWechatworkPayload(p api.Payloader, event models.HookEventType, meta string) (api.Payloader, error) { + return convertPayloader(new(WechatworkPayload), p, event) +} diff --git a/services/wiki/wiki.go b/services/wiki/wiki.go index 75b9d1d1f..e1590f461 100644 --- a/services/wiki/wiki.go +++ b/services/wiki/wiki.go @@ -81,6 +81,37 @@ func InitWiki(repo *models.Repository) error { return nil } +// prepareWikiFileName try to find a suitable file path with file name by the given raw wiki name. +// return: existence, prepared file path with name, error +func prepareWikiFileName(gitRepo *git.Repository, wikiName string) (bool, string, error) { + unescaped := wikiName + ".md" + escaped := NameToFilename(wikiName) + + // Look for both files + filesInIndex, err := gitRepo.LsTree("master", unescaped, escaped) + if err != nil { + if strings.Contains(err.Error(), "Not a valid object name master") { + return false, escaped, nil + } + log.Error("%v", err) + return false, escaped, err + } + + foundEscaped := false + for _, filename := range filesInIndex { + switch filename { + case unescaped: + // if we find the unescaped file return it + return true, unescaped, nil + case escaped: + foundEscaped = true + } + } + + // If not return whether the escaped file exists, and the escaped filename to keep backwards compatibility. + return foundEscaped, escaped, nil +} + // updateWikiPage adds a new page to the repository wiki. func updateWikiPage(doer *models.User, repo *models.Repository, oldWikiName, newWikiName, content, message string, isNew bool) (err error) { if err = nameAllowed(newWikiName); err != nil { @@ -133,27 +164,29 @@ func updateWikiPage(doer *models.User, repo *models.Repository, oldWikiName, new } } - newWikiPath := NameToFilename(newWikiName) + isWikiExist, newWikiPath, err := prepareWikiFileName(gitRepo, newWikiName) + if err != nil { + return err + } + if isNew { - filesInIndex, err := gitRepo.LsFiles(newWikiPath) - if err != nil { - log.Error("%v", err) - return err - } - if util.IsStringInSlice(newWikiPath, filesInIndex) { + if isWikiExist { return models.ErrWikiAlreadyExist{ Title: newWikiPath, } } } else { - oldWikiPath := NameToFilename(oldWikiName) - filesInIndex, err := gitRepo.LsFiles(oldWikiPath) - if err != nil { - log.Error("%v", err) - return err + // avoid check existence again if wiki name is not changed since gitRepo.LsFiles(...) is not free. + isOldWikiExist := true + oldWikiPath := newWikiPath + if oldWikiName != newWikiName { + isOldWikiExist, oldWikiPath, err = prepareWikiFileName(gitRepo, oldWikiName) + if err != nil { + return err + } } - if util.IsStringInSlice(oldWikiPath, filesInIndex) { + if isOldWikiExist { err := gitRepo.RemoveFilesFromIndex(oldWikiPath) if err != nil { log.Error("%v", err) @@ -278,14 +311,9 @@ func DeleteWikiPage(doer *models.User, repo *models.Repository, wikiName string) return fmt.Errorf("Unable to read HEAD tree to index in: %s %v", basePath, err) } - wikiPath := NameToFilename(wikiName) - filesInIndex, err := gitRepo.LsFiles(wikiPath) - found := false - for _, file := range filesInIndex { - if file == wikiPath { - found = true - break - } + found, wikiPath, err := prepareWikiFileName(gitRepo, wikiName) + if err != nil { + return err } if found { err := gitRepo.RemoveFilesFromIndex(wikiPath) diff --git a/services/wiki/wiki_test.go b/services/wiki/wiki_test.go index 0e1d460a2..6c861d556 100644 --- a/services/wiki/wiki_test.go +++ b/services/wiki/wiki_test.go @@ -5,11 +5,15 @@ package wiki import ( + "io/ioutil" + "os" "path/filepath" "testing" "code.gitea.io/gitea/models" "code.gitea.io/gitea/modules/git" + "code.gitea.io/gitea/modules/util" + "github.com/stretchr/testify/assert" ) @@ -140,7 +144,7 @@ func TestRepository_AddWikiPage(t *testing.T) { wikiPath := NameToFilename(wikiName) entry, err := masterTree.GetTreeEntryByPath(wikiPath) assert.NoError(t, err) - assert.Equal(t, wikiPath, entry.Name(), "%s not addded correctly", wikiName) + assert.Equal(t, wikiPath, entry.Name(), "%s not added correctly", wikiName) }) } @@ -162,6 +166,8 @@ func TestRepository_AddWikiPage(t *testing.T) { } func TestRepository_EditWikiPage(t *testing.T) { + assert.NoError(t, models.PrepareTestDatabase()) + const newWikiContent = "This is the new content" const commitMsg = "Commit message" repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) @@ -208,3 +214,79 @@ func TestRepository_DeleteWikiPage(t *testing.T) { _, err = masterTree.GetTreeEntryByPath(wikiPath) assert.Error(t, err) } + +func TestPrepareWikiFileName(t *testing.T) { + models.PrepareTestEnv(t) + repo := models.AssertExistsAndLoadBean(t, &models.Repository{ID: 1}).(*models.Repository) + gitRepo, err := git.OpenRepository(repo.WikiPath()) + defer gitRepo.Close() + assert.NoError(t, err) + + tests := []struct { + name string + arg string + existence bool + wikiPath string + wantErr bool + }{{ + name: "add suffix", + arg: "Home", + existence: true, + wikiPath: "Home.md", + wantErr: false, + }, { + name: "test special chars", + arg: "home of and & or wiki page!", + existence: false, + wikiPath: "home-of-and-%26-or-wiki-page%21.md", + wantErr: false, + }, { + name: "fount unescaped cases", + arg: "Unescaped File", + existence: true, + wikiPath: "Unescaped File.md", + wantErr: false, + }} + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + existence, newWikiPath, err := prepareWikiFileName(gitRepo, tt.arg) + if (err != nil) != tt.wantErr { + assert.NoError(t, err) + return + } + if existence != tt.existence { + if existence { + t.Errorf("expect to find no escaped file but we detect one") + } else { + t.Errorf("expect to find an escaped file but we could not detect one") + } + } + assert.Equal(t, tt.wikiPath, newWikiPath) + }) + } +} + +func TestPrepareWikiFileName_FirstPage(t *testing.T) { + models.PrepareTestEnv(t) + + // Now create a temporaryDirectory + tmpDir, err := ioutil.TempDir("", "empty-wiki") + assert.NoError(t, err) + defer func() { + if _, err := os.Stat(tmpDir); !os.IsNotExist(err) { + _ = util.RemoveAll(tmpDir) + } + }() + + err = git.InitRepository(tmpDir, true) + assert.NoError(t, err) + + gitRepo, err := git.OpenRepository(tmpDir) + defer gitRepo.Close() + assert.NoError(t, err) + + existence, newWikiPath, err := prepareWikiFileName(gitRepo, "Home") + assert.False(t, existence) + assert.NoError(t, err) + assert.Equal(t, "Home.md", newWikiPath) +} diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6f19fe5ed..cd989dfbb 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -25,14 +25,14 @@ environment: apps: gitea: command: gitea - plugs: [network, network-bind] + plugs: [network, network-bind, removable-media] web: command: gitea web daemon: simple - plugs: [network, network-bind] + plugs: [network, network-bind, removable-media] dump: command: gitea dump - plugs: [home] + plugs: [home, removable-media] version: command: gitea --version sqlite: diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 6b2485839..109186a17 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -12,7 +12,7 @@
    - + {{.Source.TypeName}}
    @@ -22,7 +22,7 @@ {{if or .Source.IsLDAP .Source.IsDLDAP}} - {{ $cfg:=.Source.LDAP }} + {{ $cfg:=.Source.Cfg }}
    @@ -44,6 +44,12 @@
    +
    +
    + + +
    +
    {{if .Source.IsLDAP}}
    @@ -53,7 +59,6 @@
    -

    {{.i18n.Tr "admin.auths.bind_password_helper"}}

    {{end}}
    @@ -96,8 +101,8 @@
    - - + +
    @@ -152,7 +157,7 @@ {{if .Source.IsSMTP}} - {{ $cfg:=.Source.SMTP }} + {{ $cfg:=.Source.Cfg }}
    +
    +
    + + +
    +

    {{.i18n.Tr "admin.auths.force_smtps_helper"}}

    +
    +
    +
    + + +
    +
    +
    + + +

    {{.i18n.Tr "admin.auths.helo_hostname_helper"}}

    +
    +
    +
    + + +
    +
    @@ -183,16 +212,20 @@ {{if .Source.IsPAM}} - {{ $cfg:=.Source.PAM }} + {{ $cfg:=.Source.Cfg }}
    +
    + + +
    {{end}} {{if .Source.IsOAuth2}} - {{ $cfg:=.Source.OAuth2 }} + {{ $cfg:=.Source.Cfg }}
    @@ -215,9 +248,9 @@
    - - -
    + + +
    @@ -245,17 +278,24 @@
    - {{if .OAuth2DefaultCustomURLMappings}}{{range $key, $value := .OAuth2DefaultCustomURLMappings}} - - - - +
    + + +
    + + {{range .OAuth2Providers}}{{if .CustomURLSettings}} + + + + + + {{end}}{{end}} {{end}} {{if .Source.IsSSPI}} - {{ $cfg:=.Source.SSPI }} + {{ $cfg:=.Source.Cfg }}
    @@ -298,31 +338,18 @@

    {{.i18n.Tr "admin.auths.sspi_default_language_helper"}}

    {{end}} - -
    -
    - - -
    -
    -
    -
    - - -
    -
    {{if .Source.IsLDAP}} -
    -
    - - +
    +
    + + +
    -
    {{end}}
    - +
    @@ -337,7 +364,7 @@ diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index dbadd31f1..295e001cf 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -7,7 +7,7 @@ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
    @@ -20,6 +20,12 @@
    +
    +
    + + +
    +
    @@ -28,7 +34,6 @@
    -

    {{.i18n.Tr "admin.auths.bind_password_helper"}}

    @@ -68,8 +73,8 @@
    - - + +
    diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl index 1489ab839..b19fe3d42 100644 --- a/templates/admin/auth/source/oauth.tmpl +++ b/templates/admin/auth/source/oauth.tmpl @@ -2,12 +2,12 @@
    @@ -21,9 +21,9 @@
    - - -
    + + +
    @@ -51,12 +51,17 @@
    - {{if .OAuth2DefaultCustomURLMappings}} - {{range $key, $value := .OAuth2DefaultCustomURLMappings}} - - - - - {{end}} - {{end}} +
    + + +
    + + {{range .OAuth2Providers}}{{if .CustomURLSettings}} + + + + + + + {{end}}{{end}}
    diff --git a/templates/admin/auth/source/smtp.tmpl b/templates/admin/auth/source/smtp.tmpl index 670c4b3b5..b0f643b8c 100644 --- a/templates/admin/auth/source/smtp.tmpl +++ b/templates/admin/auth/source/smtp.tmpl @@ -20,6 +20,30 @@
    +
    +
    + + +

    {{.i18n.Tr "admin.auths.force_smtps_helper"}}

    +
    +
    +
    +
    + + +
    +
    +
    + + +

    {{.i18n.Tr "admin.auths.helo_hostname_helper"}}

    +
    +
    +
    + + +
    +
    diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl index 8a7af53da..e4e7e2d46 100644 --- a/templates/admin/base/search.tmpl +++ b/templates/admin/base/search.tmpl @@ -17,7 +17,7 @@
    - - + +
    diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 3fbb80caf..b419d04a1 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -70,7 +70,7 @@
    {{if not .SSH.Disabled}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{if not .SSH.Disabled}}
    {{.i18n.Tr "admin.config.ssh_start_builtin_server"}}
    -
    {{if not .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{if .SSH.StartBuiltinServer}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{.i18n.Tr "admin.config.ssh_domain"}}
    {{.SSH.Domain}}
    {{.i18n.Tr "admin.config.ssh_port"}}
    @@ -149,6 +149,8 @@
    {{if .Service.RegisterEmailConfirm}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{.i18n.Tr "admin.config.disable_register"}}
    {{if .Service.DisableRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    +
    {{.i18n.Tr "admin.config.allow_only_internal_registration"}}
    +
    {{if .Service.AllowOnlyInternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{.i18n.Tr "admin.config.allow_only_external_registration"}}
    {{if .Service.AllowOnlyExternalRegistration}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}
    {{.i18n.Tr "admin.config.show_registration_button"}}
    @@ -340,11 +342,13 @@
    {{.Config | JsonPrettyPrint}}
    {{end}}
    -
    {{$.i18n.Tr "admin.config.macaron_log_mode"}}
    - {{if .RedirectMacaronLog}} - {{if .Loggers.macaron.SubLogDescriptions}} +
    {{$.i18n.Tr "admin.config.router_log_mode"}}
    + {{if .DisableRouterLog}} +
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    + {{else}} + {{if .Loggers.router.SubLogDescriptions}}
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    - {{range .Loggers.macaron.SubLogDescriptions}} + {{range .Loggers.router.SubLogDescriptions}}
    {{$.i18n.Tr "admin.config.log_mode"}}
    {{.Name}} ({{.Provider}})
    {{$.i18n.Tr "admin.config.log_config"}}
    @@ -353,29 +357,6 @@ {{else}}
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    {{end}} - {{else}} -
    {{$.i18n.Tr "admin.config.go_log"}}
    - {{end}} -
    -
    {{$.i18n.Tr "admin.config.router_log_mode"}}
    - {{if .DisableRouterLog}} -
    {{$.i18n.Tr "admin.config.disabled_logger"}}
    - {{else}} - {{if .RedirectMacaronLog}} - {{if .Loggers.router.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.own_named_logger"}}
    - {{range .Loggers.router.SubLogDescriptions}} -
    {{$.i18n.Tr "admin.config.log_mode"}}
    -
    {{.Name}} ({{.Provider}})
    -
    {{$.i18n.Tr "admin.config.log_config"}}
    -
    {{.Config | JsonPrettyPrint}}
    - {{end}} - {{else}} -
    {{$.i18n.Tr "admin.config.routes_to_default_logger"}}
    - {{end}} - {{else}} -
    {{$.i18n.Tr "admin.config.go_log"}}
    - {{end}} {{end}}
    {{$.i18n.Tr "admin.config.access_log_mode"}}
    diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index e6d9f57c2..de01f95ea 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -36,17 +36,17 @@ {{if and (not .SSH.Disabled) (not .SSH.StartBuiltinServer)}} - - {{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}
    - {{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}} - - + + {{.i18n.Tr "admin.dashboard.resync_all_sshkeys"}}
    + {{.i18n.Tr "admin.dashboard.resync_all_sshkeys.desc"}} + + + + {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals"}}
    + {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals.desc"}} + + {{end}} - - {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals"}}
    - {{.i18n.Tr "admin.dashboard.resync_all_sshprincipals.desc"}} - - {{.i18n.Tr "admin.dashboard.resync_all_hooks"}} diff --git a/templates/admin/hook_new.tmpl b/templates/admin/hook_new.tmpl index c6f02ee20..4710498b2 100644 --- a/templates/admin/hook_new.tmpl +++ b/templates/admin/hook_new.tmpl @@ -4,30 +4,36 @@
    {{template "base/alert" .}}

    - {{if .PageIsAdminHooksNew}} - {{.i18n.Tr "admin.hooks.add_webhook"}} + {{if .PageIsAdminDefaultHooksNew}} + {{.i18n.Tr "admin.defaulthooks.add_webhook"}} + {{else if .PageIsAdminSystemHooksNew}} + {{.i18n.Tr "admin.systemhooks.add_webhook"}} + {{else if .Webhook.IsSystemWebhook}} + {{.i18n.Tr "admin.systemhooks.update_webhook"}} {{else}} - {{.i18n.Tr "admin.hooks.update_webhook"}} + {{.i18n.Tr "admin.defaulthooks.update_webhook"}} {{end}}
    {{if eq .HookType "gitea"}} - + {{else if eq .HookType "gogs"}} - + {{else if eq .HookType "slack"}} - + {{else if eq .HookType "discord"}} - + {{else if eq .HookType "dingtalk"}} - + {{else if eq .HookType "telegram"}} - + {{else if eq .HookType "msteams"}} - + {{else if eq .HookType "feishu"}} - + {{else if eq .HookType "matrix"}} - + + {{else if eq .HookType "wechatwork"}} + {{end}}

    @@ -41,6 +47,7 @@ {{template "repo/settings/webhook/msteams" .}} {{template "repo/settings/webhook/feishu" .}} {{template "repo/settings/webhook/matrix" .}} + {{template "repo/settings/webhook/wechatwork" .}}
    {{template "repo/settings/webhook/history" .}} diff --git a/templates/admin/hooks.tmpl b/templates/admin/hooks.tmpl index c09c6fcaf..a23cff434 100644 --- a/templates/admin/hooks.tmpl +++ b/templates/admin/hooks.tmpl @@ -2,7 +2,12 @@
    {{template "admin/navbar" .}}
    - {{template "repo/settings/webhook/list" .}} + {{template "base/alert" .}} + + {{template "repo/settings/webhook/base_list" .SystemWebhooks}} + {{template "repo/settings/webhook/base_list" .DefaultWebhooks}} + + {{template "repo/settings/webhook/delete_modal" .}}
    {{template "base/footer" .}} diff --git a/templates/admin/monitor.tmpl b/templates/admin/monitor.tmpl index a8431cbd7..16c4d8800 100644 --- a/templates/admin/monitor.tmpl +++ b/templates/admin/monitor.tmpl @@ -86,7 +86,7 @@ {{.Description}} {{DateFmtLong .Start}} {{TimeSince .Start $.Lang}} - {{svg "octicon-trashcan" 16 "text-red"}} + {{svg "octicon-trash" 16 "text-red"}} {{end}} diff --git a/templates/admin/navbar.tmpl b/templates/admin/navbar.tmpl index 8c895b8c2..c656d0619 100644 --- a/templates/admin/navbar.tmpl +++ b/templates/admin/navbar.tmpl @@ -12,12 +12,11 @@ {{.i18n.Tr "admin.repositories"}} - - {{.i18n.Tr "admin.hooks"}} - - - {{.i18n.Tr "admin.systemhooks"}} - + {{if not DisableWebhooks}} + + {{.i18n.Tr "admin.hooks"}} + + {{end}} {{.i18n.Tr "admin.authentication"}} diff --git a/templates/admin/org/list.tmpl b/templates/admin/org/list.tmpl index e0c9ac39a..75c4d3919 100644 --- a/templates/admin/org/list.tmpl +++ b/templates/admin/org/list.tmpl @@ -45,7 +45,7 @@ {{.NumMembers}} {{.NumRepos}} {{.CreatedUnix.FormatShort}} - {{svg "octicon-pencil"}} + {{svg "octicon-pencil"}} {{end}} diff --git a/templates/admin/queue.tmpl b/templates/admin/queue.tmpl index 278b24650..3d9cc9559 100644 --- a/templates/admin/queue.tmpl +++ b/templates/admin/queue.tmpl @@ -130,7 +130,7 @@ {{DateFmtLong .Start}} {{if .HasTimeout}}{{DateFmtLong .Timeout}}{{else}}-{{end}} - {{svg "octicon-trashcan"}} + {{svg "octicon-trash"}} {{else}} diff --git a/templates/admin/repo/list.tmpl b/templates/admin/repo/list.tmpl index 17a6871b3..e96d9ebb3 100644 --- a/templates/admin/repo/list.tmpl +++ b/templates/admin/repo/list.tmpl @@ -7,7 +7,7 @@ {{.i18n.Tr "admin.repos.repo_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) +
    {{template "admin/repo/search" .}} @@ -52,8 +52,30 @@ {{.Name}} - {{if .IsPrivate}} - {{svg "octicon-lock"}} + {{if .IsArchived}} + {{$.i18n.Tr "repo.desc.archived"}} + {{end}} + {{if .IsTemplate}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private_template"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal_template"}} + {{end}} + {{end}} + {{else}} + {{if .IsPrivate}} + {{$.i18n.Tr "repo.desc.private"}} + {{else}} + {{if .Owner.Visibility.IsPrivate}} + {{$.i18n.Tr "repo.desc.internal"}} + {{end}} + {{end}} + {{end}} + {{if .IsFork}} + {{svg "octicon-repo-forked"}} + {{else if .IsMirror}} + {{svg "octicon-mirror"}} {{end}} {{.NumWatches}} @@ -62,7 +84,7 @@ {{.NumIssues}} {{SizeFmt .Size}} {{.CreatedUnix.FormatShort}} - {{svg "octicon-trashcan"}} + {{svg "octicon-trash"}} {{end}} @@ -75,7 +97,7 @@ {{template "base/footer" .}} diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl index a07f3a105..60cd8ad52 100644 --- a/templates/admin/user/edit.tmpl +++ b/templates/admin/user/edit.tmpl @@ -17,17 +17,44 @@
    + +
    + + +
    +
    @@ -133,7 +160,7 @@ + +
    + + +
    +
    diff --git a/templates/base/alert_details.tmpl b/templates/base/alert_details.tmpl index 38a2721bf..1d7ec15dc 100644 --- a/templates/base/alert_details.tmpl +++ b/templates/base/alert_details.tmpl @@ -1,7 +1,7 @@ {{.Message}}
    - {{.Summary}} - - {{.Details | Str2html}} - + {{.Summary}} + + {{.Details | Str2html}} +
    diff --git a/templates/base/delete_modal_actions.tmpl b/templates/base/delete_modal_actions.tmpl index 7a0760b12..ba9a94d0b 100644 --- a/templates/base/delete_modal_actions.tmpl +++ b/templates/base/delete_modal_actions.tmpl @@ -1,6 +1,6 @@
    - {{svg "octicon-trashcan"}} + {{svg "octicon-trash"}} {{.i18n.Tr "modal.no"}}
    diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl index bc45315ef..25e163b19 100644 --- a/templates/base/footer.tmpl +++ b/templates/base/footer.tmpl @@ -12,17 +12,17 @@ {{template "base/footer_content" .}} {{if .RequireSimpleMDE}} - - - + + + {{end}} {{if .RequireU2F}} - + {{end}} {{if .EnableCaptcha}} {{if eq .CaptchaType "recaptcha"}} @@ -32,7 +32,7 @@ {{end}} {{end}} - + {{template "custom/footer" .}} diff --git a/templates/base/footer_content.tmpl b/templates/base/footer_content.tmpl index f0d8a6f5a..e30fe7076 100644 --- a/templates/base/footer_content.tmpl +++ b/templates/base/footer_content.tmpl @@ -16,7 +16,7 @@ {{end}}
    - {{.i18n.Tr "licenses"}} + {{.i18n.Tr "licenses"}} {{if .EnableSwagger}}API{{end}} {{.i18n.Tr "website"}} {{template "custom/extra_links_footer" .}} diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 3c2371f0e..328661eb9 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -1,9 +1,8 @@ - + - {{if .Title}}{{.Title | RenderEmojiPlain}} - {{end}} {{if .Repository.Name}}{{.Repository.Name}} - {{end}}{{AppName}} @@ -30,19 +29,20 @@ window.config = { AppVer: '{{AppVer}}', AppSubUrl: '{{AppSubUrl}}', - StaticUrlPrefix: '{{StaticUrlPrefix}}', + AssetUrlPrefix: '{{AssetUrlPrefix}}', + CustomEmojis: {{CustomEmojis}}, UseServiceWorker: {{UseServiceWorker}}, csrf: '{{.CsrfToken}}', HighlightJS: {{if .RequireHighlightJS}}true{{else}}false{{end}}, SimpleMDE: {{if .RequireSimpleMDE}}true{{else}}false{{end}}, Tribute: {{if .RequireTribute}}true{{else}}false{{end}}, - U2F: {{if .RequireU2F}}true{{else}}false{{end}}, NotificationSettings: { MinTimeout: {{NotificationSettings.MinTimeout}}, TimeoutStep: {{NotificationSettings.TimeoutStep}}, MaxTimeout: {{NotificationSettings.MaxTimeout}}, EventSourceUpdateTime: {{NotificationSettings.EventSourceUpdateTime}}, }, + EnableTimetracking: {{if EnableTimetracking}}true{{else}}false{{end}}, PageIsProjects: {{if .PageIsProjects }}true{{else}}false{{end}}, {{if .RequireTribute}} tributeValues: Array.from(new Map([ @@ -55,19 +55,20 @@ name: '{{.Name}}', fullname: '{{.FullName}}', avatar: '{{.RelAvatarLink}}'}], {{ end }} {{ range .MentionableTeams }} - ['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}', + ['{{$.MentionableTeamsOrg}}/{{.Name}}', {key: '{{$.MentionableTeamsOrg}}/{{.Name}}', value: '{{$.MentionableTeamsOrg}}/{{.Name}}', name: '{{$.MentionableTeamsOrg}}/{{.Name}}', avatar: '{{$.MentionableTeamsOrgAvatar}}'}], {{ end }} ]).values()), {{end}} + MermaidMaxSourceCharacters: {{MermaidMaxSourceCharacters}}, }; - - + + {{if .RequireSimpleMDE}} - + {{end}} - +
    ": -4.321923, - "": -8.364974, - "": -8.364974, - "": -6.755536, - "": -8.364974, - "": -6.755536, - "
  • ": -4.930987, - "": -6.573215, - "

    ": -4.997678, - "": -7.671827, - "": -5.800025, - "": -6.978680, - "": -5.474602, - "
    ": -7.671827, - "": -8.364974, - "": -5.880067, - "": -8.364974, - "": -5.032769, - "": -6.573215, - "": -6.978680, - "": -5.725917, - "": -6.285532, - "": -8.364974, - "

    ": -8.364974, - "": -4.116479, - "": -6.573215, - "
    ": -7.266362, - "
    ": -6.573215, - "